summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FAQ.md54
-rw-r--r--INSTALL.md29
-rw-r--r--Makefile78
-rw-r--r--README.md1
-rw-r--r--audio.asm13
-rw-r--r--audio/cries.asm6
-rw-r--r--audio/cry_headers.asm258
-rw-r--r--audio/cry_pointers.asm2
-rw-r--r--audio/drumkits.asm301
-rw-r--r--audio/engine.asm471
-rw-r--r--audio/music_pointers.asm4
-rw-r--r--audio/notes.asm27
-rw-r--r--audio/sfx.asm46
-rw-r--r--audio/sfx_pointers.asm8
-rw-r--r--audio/trainer_encounters.asm96
-rw-r--r--audio/wave_samples.asm14
-rw-r--r--battle/ai/items.asm48
-rwxr-xr-xbattle/ai/move.asm2
-rwxr-xr-xbattle/ai/redundant.asm4
-rw-r--r--battle/ai/scoring.asm51
-rw-r--r--battle/anim_commands.asm45
-rw-r--r--battle/bg_effects.asm16
-rw-r--r--battle/core.asm450
-rw-r--r--battle/effect_command_pointers.asm3
-rw-r--r--battle/effect_commands.asm165
-rwxr-xr-xbattle/effects/attract.asm4
-rw-r--r--battle/effects/thief.asm4
-rwxr-xr-xbattle/effects/transform.asm4
-rw-r--r--battle/hidden_power.asm2
-rwxr-xr-xbattle/link_result.asm2
-rw-r--r--battle/magikarp_length.asm214
-rwxr-xr-xbattle/menu.asm8
-rw-r--r--battle/misc.asm4
-rw-r--r--battle/move_names.asm1
-rw-r--r--battle/moves/move_descriptions.asm4
-rw-r--r--battle/moves/move_effects.asm4
-rw-r--r--battle/moves/move_effects_pointers.asm2
-rw-r--r--battle/moves/moves.asm3
-rwxr-xr-xbattle/objects/data.asm774
-rwxr-xr-xbattle/objects/engine.asm8
-rwxr-xr-xbattle/objects/functions.asm20
-rwxr-xr-xbattle/objects/gfx_headers.asm5
-rwxr-xr-xbattle/trainer_huds.asm6
-rwxr-xr-xbattle/used_move_text.asm2
-rw-r--r--constants.asm12
-rw-r--r--constants/animation_constants.asm49
-rwxr-xr-xconstants/audio_constants.asm119
-rw-r--r--constants/battle_constants.asm107
-rwxr-xr-xconstants/battle_tower_constants.asm26
-rwxr-xr-xconstants/cgb_constants.asm1
-rw-r--r--constants/collision_constants.asm115
-rw-r--r--constants/credits_constants.asm115
-rwxr-xr-xconstants/cry_constants.asm1
-rw-r--r--constants/deco_constants.asm98
-rw-r--r--constants/engine_flags.asm35
-rw-r--r--constants/event_flags.asm84
-rw-r--r--constants/gfx_constants.asm28
-rw-r--r--constants/hardware_constants.asm135
-rw-r--r--constants/input_constants.asm26
-rw-r--r--constants/item_constants.asm59
-rw-r--r--constants/landmark_constants.asm6
-rw-r--r--constants/map_constants.asm662
-rw-r--r--constants/map_dimension_constants.asm488
-rw-r--r--constants/map_setup_constants.asm8
-rw-r--r--constants/misc_constants.asm278
-rw-r--r--constants/mobile_constants.asm21
-rw-r--r--constants/move_constants.asm572
-rw-r--r--constants/music_constants.asm11
-rw-r--r--constants/npctrade_constants.asm21
-rw-r--r--constants/phone_constants.asm6
-rw-r--r--constants/pokemon_constants.asm595
-rw-r--r--constants/pokemon_data_constants.asm154
-rwxr-xr-xconstants/printer_constants.asm2
-rw-r--r--constants/radio_constants.asm16
-rw-r--r--constants/script_constants.asm3
-rw-r--r--constants/serial_constants.asm12
-rw-r--r--constants/sfx_constants.asm6
-rw-r--r--constants/sprite_constants.asm508
-rw-r--r--constants/sprite_data_constants.asm511
-rw-r--r--constants/std_constants.asm2
-rw-r--r--constants/tilemap_constants.asm53
-rw-r--r--constants/tileset_constants.asm49
-rw-r--r--constants/trainer_constants.asm98
-rw-r--r--constants/type_constants.asm4
-rw-r--r--constants/wram_constants.asm147
-rw-r--r--data/base_stats.asm253
-rw-r--r--data/base_stats/abra.asm22
-rw-r--r--data/base_stats/aerodactyl.asm22
-rw-r--r--data/base_stats/aipom.asm22
-rw-r--r--data/base_stats/alakazam.asm22
-rw-r--r--data/base_stats/ampharos.asm22
-rw-r--r--data/base_stats/arbok.asm22
-rw-r--r--data/base_stats/arcanine.asm22
-rw-r--r--data/base_stats/ariados.asm22
-rw-r--r--data/base_stats/articuno.asm22
-rw-r--r--data/base_stats/azumarill.asm22
-rw-r--r--data/base_stats/bayleef.asm22
-rw-r--r--data/base_stats/beedrill.asm22
-rw-r--r--data/base_stats/bellossom.asm22
-rw-r--r--data/base_stats/bellsprout.asm22
-rw-r--r--data/base_stats/blastoise.asm22
-rw-r--r--data/base_stats/blissey.asm22
-rw-r--r--data/base_stats/bulbasaur.asm22
-rw-r--r--data/base_stats/butterfree.asm22
-rw-r--r--data/base_stats/caterpie.asm22
-rw-r--r--data/base_stats/celebi.asm22
-rw-r--r--data/base_stats/chansey.asm22
-rw-r--r--data/base_stats/charizard.asm22
-rw-r--r--data/base_stats/charmander.asm22
-rw-r--r--data/base_stats/charmeleon.asm22
-rw-r--r--data/base_stats/chikorita.asm22
-rw-r--r--data/base_stats/chinchou.asm22
-rw-r--r--data/base_stats/clefable.asm22
-rw-r--r--data/base_stats/clefairy.asm22
-rw-r--r--data/base_stats/cleffa.asm22
-rw-r--r--data/base_stats/cloyster.asm22
-rw-r--r--data/base_stats/corsola.asm22
-rw-r--r--data/base_stats/crobat.asm22
-rw-r--r--data/base_stats/croconaw.asm22
-rw-r--r--data/base_stats/cubone.asm22
-rw-r--r--data/base_stats/cyndaquil.asm22
-rw-r--r--data/base_stats/delibird.asm22
-rw-r--r--data/base_stats/dewgong.asm22
-rw-r--r--data/base_stats/diglett.asm22
-rw-r--r--data/base_stats/ditto.asm22
-rw-r--r--data/base_stats/dodrio.asm22
-rw-r--r--data/base_stats/doduo.asm22
-rw-r--r--data/base_stats/donphan.asm22
-rw-r--r--data/base_stats/dragonair.asm22
-rw-r--r--data/base_stats/dragonite.asm22
-rw-r--r--data/base_stats/dratini.asm22
-rw-r--r--data/base_stats/drowzee.asm22
-rw-r--r--data/base_stats/dugtrio.asm22
-rw-r--r--data/base_stats/dunsparce.asm22
-rw-r--r--data/base_stats/eevee.asm22
-rw-r--r--data/base_stats/ekans.asm22
-rw-r--r--data/base_stats/electabuzz.asm22
-rw-r--r--data/base_stats/electrode.asm22
-rw-r--r--data/base_stats/elekid.asm22
-rw-r--r--data/base_stats/entei.asm22
-rw-r--r--data/base_stats/espeon.asm22
-rw-r--r--data/base_stats/exeggcute.asm22
-rw-r--r--data/base_stats/exeggutor.asm22
-rw-r--r--data/base_stats/farfetch_d.asm22
-rw-r--r--data/base_stats/fearow.asm22
-rw-r--r--data/base_stats/feraligatr.asm22
-rw-r--r--data/base_stats/flaaffy.asm22
-rw-r--r--data/base_stats/flareon.asm22
-rw-r--r--data/base_stats/forretress.asm22
-rw-r--r--data/base_stats/furret.asm22
-rw-r--r--data/base_stats/gastly.asm22
-rw-r--r--data/base_stats/gengar.asm22
-rw-r--r--data/base_stats/geodude.asm22
-rw-r--r--data/base_stats/girafarig.asm22
-rw-r--r--data/base_stats/gligar.asm22
-rw-r--r--data/base_stats/gloom.asm22
-rw-r--r--data/base_stats/golbat.asm22
-rw-r--r--data/base_stats/goldeen.asm22
-rw-r--r--data/base_stats/golduck.asm22
-rw-r--r--data/base_stats/golem.asm22
-rw-r--r--data/base_stats/granbull.asm22
-rw-r--r--data/base_stats/graveler.asm22
-rw-r--r--data/base_stats/grimer.asm22
-rw-r--r--data/base_stats/growlithe.asm22
-rw-r--r--data/base_stats/gyarados.asm22
-rw-r--r--data/base_stats/haunter.asm22
-rw-r--r--data/base_stats/heracross.asm22
-rw-r--r--data/base_stats/hitmonchan.asm22
-rw-r--r--data/base_stats/hitmonlee.asm22
-rw-r--r--data/base_stats/hitmontop.asm22
-rw-r--r--data/base_stats/ho_oh.asm22
-rw-r--r--data/base_stats/hoothoot.asm22
-rw-r--r--data/base_stats/hoppip.asm22
-rw-r--r--data/base_stats/horsea.asm22
-rw-r--r--data/base_stats/houndoom.asm22
-rw-r--r--data/base_stats/houndour.asm22
-rw-r--r--data/base_stats/hypno.asm22
-rw-r--r--data/base_stats/igglybuff.asm22
-rw-r--r--data/base_stats/ivysaur.asm22
-rw-r--r--data/base_stats/jigglypuff.asm22
-rw-r--r--data/base_stats/jolteon.asm22
-rw-r--r--data/base_stats/jumpluff.asm22
-rw-r--r--data/base_stats/jynx.asm22
-rw-r--r--data/base_stats/kabuto.asm22
-rw-r--r--data/base_stats/kabutops.asm22
-rw-r--r--data/base_stats/kadabra.asm22
-rw-r--r--data/base_stats/kakuna.asm22
-rw-r--r--data/base_stats/kangaskhan.asm22
-rw-r--r--data/base_stats/kingdra.asm22
-rw-r--r--data/base_stats/kingler.asm22
-rw-r--r--data/base_stats/koffing.asm22
-rw-r--r--data/base_stats/krabby.asm22
-rw-r--r--data/base_stats/lanturn.asm22
-rw-r--r--data/base_stats/lapras.asm22
-rw-r--r--data/base_stats/larvitar.asm22
-rw-r--r--data/base_stats/ledian.asm22
-rw-r--r--data/base_stats/ledyba.asm22
-rw-r--r--data/base_stats/lickitung.asm22
-rw-r--r--data/base_stats/lugia.asm22
-rw-r--r--data/base_stats/machamp.asm22
-rw-r--r--data/base_stats/machoke.asm22
-rw-r--r--data/base_stats/machop.asm22
-rw-r--r--data/base_stats/magby.asm22
-rw-r--r--data/base_stats/magcargo.asm22
-rw-r--r--data/base_stats/magikarp.asm22
-rw-r--r--data/base_stats/magmar.asm22
-rw-r--r--data/base_stats/magnemite.asm22
-rw-r--r--data/base_stats/magneton.asm22
-rw-r--r--data/base_stats/mankey.asm22
-rw-r--r--data/base_stats/mantine.asm22
-rw-r--r--data/base_stats/mareep.asm22
-rw-r--r--data/base_stats/marill.asm22
-rw-r--r--data/base_stats/marowak.asm22
-rw-r--r--data/base_stats/meganium.asm22
-rw-r--r--data/base_stats/meowth.asm22
-rw-r--r--data/base_stats/metapod.asm22
-rw-r--r--data/base_stats/mew.asm22
-rw-r--r--data/base_stats/mewtwo.asm22
-rw-r--r--data/base_stats/miltank.asm22
-rw-r--r--data/base_stats/misdreavus.asm22
-rw-r--r--data/base_stats/moltres.asm22
-rw-r--r--data/base_stats/mr__mime.asm22
-rw-r--r--data/base_stats/muk.asm22
-rw-r--r--data/base_stats/murkrow.asm22
-rw-r--r--data/base_stats/natu.asm22
-rw-r--r--data/base_stats/nidoking.asm22
-rw-r--r--data/base_stats/nidoqueen.asm22
-rw-r--r--data/base_stats/nidoran_f.asm22
-rw-r--r--data/base_stats/nidoran_m.asm22
-rw-r--r--data/base_stats/nidorina.asm22
-rw-r--r--data/base_stats/nidorino.asm22
-rw-r--r--data/base_stats/ninetales.asm22
-rw-r--r--data/base_stats/noctowl.asm22
-rw-r--r--data/base_stats/octillery.asm22
-rw-r--r--data/base_stats/oddish.asm22
-rw-r--r--data/base_stats/omanyte.asm22
-rw-r--r--data/base_stats/omastar.asm22
-rw-r--r--data/base_stats/onix.asm22
-rw-r--r--data/base_stats/paras.asm22
-rw-r--r--data/base_stats/parasect.asm22
-rw-r--r--data/base_stats/persian.asm22
-rw-r--r--data/base_stats/phanpy.asm22
-rw-r--r--data/base_stats/pichu.asm22
-rw-r--r--data/base_stats/pidgeot.asm22
-rw-r--r--data/base_stats/pidgeotto.asm22
-rw-r--r--data/base_stats/pidgey.asm22
-rw-r--r--data/base_stats/pikachu.asm22
-rw-r--r--data/base_stats/piloswine.asm22
-rw-r--r--data/base_stats/pineco.asm22
-rw-r--r--data/base_stats/pinsir.asm22
-rw-r--r--data/base_stats/politoed.asm22
-rw-r--r--data/base_stats/poliwag.asm22
-rw-r--r--data/base_stats/poliwhirl.asm22
-rw-r--r--data/base_stats/poliwrath.asm22
-rw-r--r--data/base_stats/ponyta.asm22
-rw-r--r--data/base_stats/porygon.asm22
-rw-r--r--data/base_stats/porygon2.asm22
-rw-r--r--data/base_stats/primeape.asm22
-rw-r--r--data/base_stats/psyduck.asm22
-rw-r--r--data/base_stats/pupitar.asm22
-rw-r--r--data/base_stats/quagsire.asm22
-rw-r--r--data/base_stats/quilava.asm22
-rw-r--r--data/base_stats/qwilfish.asm22
-rw-r--r--data/base_stats/raichu.asm22
-rw-r--r--data/base_stats/raikou.asm22
-rw-r--r--data/base_stats/rapidash.asm22
-rw-r--r--data/base_stats/raticate.asm22
-rw-r--r--data/base_stats/rattata.asm22
-rw-r--r--data/base_stats/remoraid.asm22
-rw-r--r--data/base_stats/rhydon.asm22
-rw-r--r--data/base_stats/rhyhorn.asm22
-rw-r--r--data/base_stats/sandshrew.asm22
-rw-r--r--data/base_stats/sandslash.asm22
-rw-r--r--data/base_stats/scizor.asm22
-rw-r--r--data/base_stats/scyther.asm22
-rw-r--r--data/base_stats/seadra.asm22
-rw-r--r--data/base_stats/seaking.asm22
-rw-r--r--data/base_stats/seel.asm22
-rw-r--r--data/base_stats/sentret.asm22
-rw-r--r--data/base_stats/shellder.asm22
-rw-r--r--data/base_stats/shuckle.asm22
-rw-r--r--data/base_stats/skarmory.asm22
-rw-r--r--data/base_stats/skiploom.asm22
-rw-r--r--data/base_stats/slowbro.asm22
-rw-r--r--data/base_stats/slowking.asm22
-rw-r--r--data/base_stats/slowpoke.asm22
-rw-r--r--data/base_stats/slugma.asm22
-rw-r--r--data/base_stats/smeargle.asm22
-rw-r--r--data/base_stats/smoochum.asm22
-rw-r--r--data/base_stats/sneasel.asm22
-rw-r--r--data/base_stats/snorlax.asm22
-rw-r--r--data/base_stats/snubbull.asm22
-rw-r--r--data/base_stats/spearow.asm22
-rw-r--r--data/base_stats/spinarak.asm22
-rw-r--r--data/base_stats/squirtle.asm22
-rw-r--r--data/base_stats/stantler.asm22
-rw-r--r--data/base_stats/starmie.asm22
-rw-r--r--data/base_stats/staryu.asm22
-rw-r--r--data/base_stats/steelix.asm22
-rw-r--r--data/base_stats/sudowoodo.asm22
-rw-r--r--data/base_stats/suicune.asm22
-rw-r--r--data/base_stats/sunflora.asm22
-rw-r--r--data/base_stats/sunkern.asm22
-rw-r--r--data/base_stats/swinub.asm22
-rw-r--r--data/base_stats/tangela.asm22
-rw-r--r--data/base_stats/tauros.asm22
-rw-r--r--data/base_stats/teddiursa.asm22
-rw-r--r--data/base_stats/tentacool.asm22
-rw-r--r--data/base_stats/tentacruel.asm22
-rw-r--r--data/base_stats/togepi.asm22
-rw-r--r--data/base_stats/togetic.asm22
-rw-r--r--data/base_stats/totodile.asm22
-rw-r--r--data/base_stats/typhlosion.asm22
-rw-r--r--data/base_stats/tyranitar.asm22
-rw-r--r--data/base_stats/tyrogue.asm22
-rw-r--r--data/base_stats/umbreon.asm22
-rw-r--r--data/base_stats/unown.asm22
-rw-r--r--data/base_stats/ursaring.asm22
-rw-r--r--data/base_stats/vaporeon.asm22
-rw-r--r--data/base_stats/venomoth.asm22
-rw-r--r--data/base_stats/venonat.asm22
-rw-r--r--data/base_stats/venusaur.asm22
-rw-r--r--data/base_stats/victreebel.asm22
-rw-r--r--data/base_stats/vileplume.asm22
-rw-r--r--data/base_stats/voltorb.asm22
-rw-r--r--data/base_stats/vulpix.asm22
-rw-r--r--data/base_stats/wartortle.asm22
-rw-r--r--data/base_stats/weedle.asm22
-rw-r--r--data/base_stats/weepinbell.asm22
-rw-r--r--data/base_stats/weezing.asm22
-rw-r--r--data/base_stats/wigglytuff.asm22
-rw-r--r--data/base_stats/wobbuffet.asm22
-rw-r--r--data/base_stats/wooper.asm22
-rw-r--r--data/base_stats/xatu.asm22
-rw-r--r--data/base_stats/yanma.asm22
-rw-r--r--data/base_stats/zapdos.asm22
-rw-r--r--data/base_stats/zubat.asm22
-rw-r--r--data/battle/ball_colors.asm16
-rw-r--r--data/battle/flee_mons.asm36
-rw-r--r--data/battle_tower.asm211
-rw-r--r--data/bug_contest_winners.asm74
-rw-r--r--data/collision_permissions.asm262
-rw-r--r--data/collision_stdscripts.asm13
-rw-r--r--data/credits_script.asm287
-rw-r--r--data/credits_strings.asm221
-rw-r--r--data/decoration_attributes.asm63
-rw-r--r--data/default_options.asm18
-rw-r--r--data/egg_move_pointers.asm256
-rw-r--r--data/egg_moves.asm870
-rw-r--r--data/emote_headers.asm22
-rw-r--r--data/engine_flags.asm206
-rw-r--r--data/evos_attacks.asm3398
-rw-r--r--data/evos_attacks_pointers.asm256
-rw-r--r--data/facings.asm264
-rw-r--r--data/field_move_blocks.asm53
-rw-r--r--data/flypoints.asm38
-rw-r--r--data/growth_rates.asm20
-rw-r--r--data/happiness_changes.asm22
-rw-r--r--data/items/bargain_shop.asm9
-rw-r--r--data/items/buena_prizes.asm13
-rw-r--r--data/items/fruit_trees.asm33
-rw-r--r--data/items/item_attributes.asm521
-rw-r--r--data/items/item_descriptions.asm1042
-rw-r--r--data/items/item_names.asm257
-rw-r--r--data/items/marts.asm (renamed from items/marts.asm)0
-rw-r--r--data/items/mom_phone.asm27
-rw-r--r--data/items/rooftop_sale.asm18
-rw-r--r--data/mail_input_chars.asm19
-rwxr-xr-xdata/map_objects.asm79
-rw-r--r--data/maps/landmarks.asm208
-rw-r--r--data/maps/map_scenes.asm89
-rw-r--r--data/maps/mapgroup_roofs.asm31
-rw-r--r--data/maps/outdoor_sprites.asm696
-rw-r--r--data/maps/spawn_points.asm41
-rw-r--r--data/mystery_gift/decos.asm40
-rw-r--r--data/mystery_gift/items.asm40
-rw-r--r--data/name_input_chars.asm31
-rw-r--r--data/npc_trades.asm22
-rw-r--r--data/odd_eggs.asm103
-rw-r--r--data/palettes/49757.pal39
-rw-r--r--data/palettes/979c.pal29
-rw-r--r--data/palettes/b6f1.pal24
-rw-r--r--data/palettes/b719.pal9
-rw-r--r--data/palettes/b789.pal19
-rw-r--r--data/palettes/card_flip.pal44
-rw-r--r--data/palettes/credits.pal19
-rw-r--r--data/palettes/crystal_intro/fade.pal41
-rw-r--r--data/palettes/crystal_intro/gamefreak_logo.pal23
-rw-r--r--data/palettes/crystal_intro/intro_1.pal79
-rw-r--r--data/palettes/crystal_intro/intro_2.pal79
-rw-r--r--data/palettes/crystal_intro/intro_3.pal79
-rw-r--r--data/palettes/crystal_intro/intro_4.pal79
-rw-r--r--data/palettes/crystal_intro/intro_5.pal79
-rw-r--r--data/palettes/debug/bg.pal43
-rw-r--r--data/palettes/debug/ob.pal42
-rw-r--r--data/palettes/diploma.pal39
-rw-r--r--data/palettes/mail.pal49
-rw-r--r--data/palettes/map_objects.pal39
-rw-r--r--data/palettes/mg_mobile.pal24
-rw-r--r--data/palettes/pack.pal29
-rw-r--r--data/palettes/pack_f.pal29
-rw-r--r--data/palettes/party_menu.pal69
-rw-r--r--data/palettes/pokegear.pal29
-rw-r--r--data/palettes/pokegear_f.pal29
-rw-r--r--data/palettes/predef.pal394
-rw-r--r--data/palettes/roofs.pal161
-rw-r--r--data/palettes/sgb_border.pal79
-rw-r--r--data/palettes/slot_machine.pal79
-rw-r--r--data/palettes/tileset_bg.pal227
-rw-r--r--data/palettes/title.pal81
-rw-r--r--data/palettes/town_map.asm34
-rw-r--r--data/palettes/trade_room.pal29
-rw-r--r--data/palettes/unused_title/bg.pal39
-rw-r--r--data/palettes/unused_title/ob.pal319
-rw-r--r--data/phone_contacts.asm51
-rw-r--r--data/phone_special.asm18
-rw-r--r--data/pokedex/entries.asm25
-rw-r--r--data/pokedex/entries_1.asm64
-rw-r--r--data/pokedex/entries_2.asm64
-rw-r--r--data/pokedex/entries_3.asm64
-rw-r--r--data/pokedex/entries_4.asm59
-rw-r--r--data/pokedex/entries_crystal.asm2
-rw-r--r--data/pokedex/entry_pointers.asm325
-rw-r--r--data/pokedex/order_alpha.asm253
-rw-r--r--data/pokedex/order_new.asm253
-rw-r--r--data/pokemon/base_stats.asm252
-rw-r--r--data/pokemon/base_stats/abra.asm22
-rw-r--r--data/pokemon/base_stats/aerodactyl.asm22
-rw-r--r--data/pokemon/base_stats/aipom.asm22
-rw-r--r--data/pokemon/base_stats/alakazam.asm22
-rw-r--r--data/pokemon/base_stats/ampharos.asm22
-rw-r--r--data/pokemon/base_stats/arbok.asm22
-rw-r--r--data/pokemon/base_stats/arcanine.asm22
-rw-r--r--data/pokemon/base_stats/ariados.asm22
-rw-r--r--data/pokemon/base_stats/articuno.asm22
-rw-r--r--data/pokemon/base_stats/azumarill.asm22
-rw-r--r--data/pokemon/base_stats/bayleef.asm22
-rw-r--r--data/pokemon/base_stats/beedrill.asm22
-rw-r--r--data/pokemon/base_stats/bellossom.asm22
-rw-r--r--data/pokemon/base_stats/bellsprout.asm22
-rw-r--r--data/pokemon/base_stats/blastoise.asm22
-rw-r--r--data/pokemon/base_stats/blissey.asm22
-rw-r--r--data/pokemon/base_stats/bulbasaur.asm22
-rw-r--r--data/pokemon/base_stats/butterfree.asm22
-rw-r--r--data/pokemon/base_stats/caterpie.asm22
-rw-r--r--data/pokemon/base_stats/celebi.asm22
-rw-r--r--data/pokemon/base_stats/chansey.asm22
-rw-r--r--data/pokemon/base_stats/charizard.asm22
-rw-r--r--data/pokemon/base_stats/charmander.asm22
-rw-r--r--data/pokemon/base_stats/charmeleon.asm22
-rw-r--r--data/pokemon/base_stats/chikorita.asm22
-rw-r--r--data/pokemon/base_stats/chinchou.asm22
-rw-r--r--data/pokemon/base_stats/clefable.asm22
-rw-r--r--data/pokemon/base_stats/clefairy.asm22
-rw-r--r--data/pokemon/base_stats/cleffa.asm22
-rw-r--r--data/pokemon/base_stats/cloyster.asm22
-rw-r--r--data/pokemon/base_stats/corsola.asm22
-rw-r--r--data/pokemon/base_stats/crobat.asm22
-rw-r--r--data/pokemon/base_stats/croconaw.asm22
-rw-r--r--data/pokemon/base_stats/cubone.asm22
-rw-r--r--data/pokemon/base_stats/cyndaquil.asm22
-rw-r--r--data/pokemon/base_stats/delibird.asm22
-rw-r--r--data/pokemon/base_stats/dewgong.asm22
-rw-r--r--data/pokemon/base_stats/diglett.asm22
-rw-r--r--data/pokemon/base_stats/ditto.asm22
-rw-r--r--data/pokemon/base_stats/dodrio.asm22
-rw-r--r--data/pokemon/base_stats/doduo.asm22
-rw-r--r--data/pokemon/base_stats/donphan.asm22
-rw-r--r--data/pokemon/base_stats/dragonair.asm22
-rw-r--r--data/pokemon/base_stats/dragonite.asm22
-rw-r--r--data/pokemon/base_stats/dratini.asm22
-rw-r--r--data/pokemon/base_stats/drowzee.asm22
-rw-r--r--data/pokemon/base_stats/dugtrio.asm22
-rw-r--r--data/pokemon/base_stats/dunsparce.asm22
-rw-r--r--data/pokemon/base_stats/eevee.asm22
-rw-r--r--data/pokemon/base_stats/ekans.asm22
-rw-r--r--data/pokemon/base_stats/electabuzz.asm22
-rw-r--r--data/pokemon/base_stats/electrode.asm22
-rw-r--r--data/pokemon/base_stats/elekid.asm22
-rw-r--r--data/pokemon/base_stats/entei.asm22
-rw-r--r--data/pokemon/base_stats/espeon.asm22
-rw-r--r--data/pokemon/base_stats/exeggcute.asm22
-rw-r--r--data/pokemon/base_stats/exeggutor.asm22
-rw-r--r--data/pokemon/base_stats/farfetch_d.asm22
-rw-r--r--data/pokemon/base_stats/fearow.asm22
-rw-r--r--data/pokemon/base_stats/feraligatr.asm22
-rw-r--r--data/pokemon/base_stats/flaaffy.asm22
-rw-r--r--data/pokemon/base_stats/flareon.asm22
-rw-r--r--data/pokemon/base_stats/forretress.asm22
-rw-r--r--data/pokemon/base_stats/furret.asm22
-rw-r--r--data/pokemon/base_stats/gastly.asm22
-rw-r--r--data/pokemon/base_stats/gengar.asm22
-rw-r--r--data/pokemon/base_stats/geodude.asm22
-rw-r--r--data/pokemon/base_stats/girafarig.asm22
-rw-r--r--data/pokemon/base_stats/gligar.asm22
-rw-r--r--data/pokemon/base_stats/gloom.asm22
-rw-r--r--data/pokemon/base_stats/golbat.asm22
-rw-r--r--data/pokemon/base_stats/goldeen.asm22
-rw-r--r--data/pokemon/base_stats/golduck.asm22
-rw-r--r--data/pokemon/base_stats/golem.asm22
-rw-r--r--data/pokemon/base_stats/granbull.asm22
-rw-r--r--data/pokemon/base_stats/graveler.asm22
-rw-r--r--data/pokemon/base_stats/grimer.asm22
-rw-r--r--data/pokemon/base_stats/growlithe.asm22
-rw-r--r--data/pokemon/base_stats/gyarados.asm22
-rw-r--r--data/pokemon/base_stats/haunter.asm22
-rw-r--r--data/pokemon/base_stats/heracross.asm22
-rw-r--r--data/pokemon/base_stats/hitmonchan.asm22
-rw-r--r--data/pokemon/base_stats/hitmonlee.asm22
-rw-r--r--data/pokemon/base_stats/hitmontop.asm22
-rw-r--r--data/pokemon/base_stats/ho_oh.asm22
-rw-r--r--data/pokemon/base_stats/hoothoot.asm22
-rw-r--r--data/pokemon/base_stats/hoppip.asm22
-rw-r--r--data/pokemon/base_stats/horsea.asm22
-rw-r--r--data/pokemon/base_stats/houndoom.asm22
-rw-r--r--data/pokemon/base_stats/houndour.asm22
-rw-r--r--data/pokemon/base_stats/hypno.asm22
-rw-r--r--data/pokemon/base_stats/igglybuff.asm22
-rw-r--r--data/pokemon/base_stats/ivysaur.asm22
-rw-r--r--data/pokemon/base_stats/jigglypuff.asm22
-rw-r--r--data/pokemon/base_stats/jolteon.asm22
-rw-r--r--data/pokemon/base_stats/jumpluff.asm22
-rw-r--r--data/pokemon/base_stats/jynx.asm22
-rw-r--r--data/pokemon/base_stats/kabuto.asm22
-rw-r--r--data/pokemon/base_stats/kabutops.asm22
-rw-r--r--data/pokemon/base_stats/kadabra.asm22
-rw-r--r--data/pokemon/base_stats/kakuna.asm22
-rw-r--r--data/pokemon/base_stats/kangaskhan.asm22
-rw-r--r--data/pokemon/base_stats/kingdra.asm22
-rw-r--r--data/pokemon/base_stats/kingler.asm22
-rw-r--r--data/pokemon/base_stats/koffing.asm22
-rw-r--r--data/pokemon/base_stats/krabby.asm22
-rw-r--r--data/pokemon/base_stats/lanturn.asm22
-rw-r--r--data/pokemon/base_stats/lapras.asm22
-rw-r--r--data/pokemon/base_stats/larvitar.asm22
-rw-r--r--data/pokemon/base_stats/ledian.asm22
-rw-r--r--data/pokemon/base_stats/ledyba.asm22
-rw-r--r--data/pokemon/base_stats/lickitung.asm22
-rw-r--r--data/pokemon/base_stats/lugia.asm22
-rw-r--r--data/pokemon/base_stats/machamp.asm22
-rw-r--r--data/pokemon/base_stats/machoke.asm22
-rw-r--r--data/pokemon/base_stats/machop.asm22
-rw-r--r--data/pokemon/base_stats/magby.asm22
-rw-r--r--data/pokemon/base_stats/magcargo.asm22
-rw-r--r--data/pokemon/base_stats/magikarp.asm22
-rw-r--r--data/pokemon/base_stats/magmar.asm22
-rw-r--r--data/pokemon/base_stats/magnemite.asm22
-rw-r--r--data/pokemon/base_stats/magneton.asm22
-rw-r--r--data/pokemon/base_stats/mankey.asm22
-rw-r--r--data/pokemon/base_stats/mantine.asm22
-rw-r--r--data/pokemon/base_stats/mareep.asm22
-rw-r--r--data/pokemon/base_stats/marill.asm22
-rw-r--r--data/pokemon/base_stats/marowak.asm22
-rw-r--r--data/pokemon/base_stats/meganium.asm22
-rw-r--r--data/pokemon/base_stats/meowth.asm22
-rw-r--r--data/pokemon/base_stats/metapod.asm22
-rw-r--r--data/pokemon/base_stats/mew.asm22
-rw-r--r--data/pokemon/base_stats/mewtwo.asm22
-rw-r--r--data/pokemon/base_stats/miltank.asm22
-rw-r--r--data/pokemon/base_stats/misdreavus.asm22
-rw-r--r--data/pokemon/base_stats/moltres.asm22
-rw-r--r--data/pokemon/base_stats/mr__mime.asm22
-rw-r--r--data/pokemon/base_stats/muk.asm22
-rw-r--r--data/pokemon/base_stats/murkrow.asm22
-rw-r--r--data/pokemon/base_stats/natu.asm22
-rw-r--r--data/pokemon/base_stats/nidoking.asm22
-rw-r--r--data/pokemon/base_stats/nidoqueen.asm22
-rw-r--r--data/pokemon/base_stats/nidoran_f.asm22
-rw-r--r--data/pokemon/base_stats/nidoran_m.asm22
-rw-r--r--data/pokemon/base_stats/nidorina.asm22
-rw-r--r--data/pokemon/base_stats/nidorino.asm22
-rw-r--r--data/pokemon/base_stats/ninetales.asm22
-rw-r--r--data/pokemon/base_stats/noctowl.asm22
-rw-r--r--data/pokemon/base_stats/octillery.asm22
-rw-r--r--data/pokemon/base_stats/oddish.asm22
-rw-r--r--data/pokemon/base_stats/omanyte.asm22
-rw-r--r--data/pokemon/base_stats/omastar.asm22
-rw-r--r--data/pokemon/base_stats/onix.asm22
-rw-r--r--data/pokemon/base_stats/paras.asm22
-rw-r--r--data/pokemon/base_stats/parasect.asm22
-rw-r--r--data/pokemon/base_stats/persian.asm22
-rw-r--r--data/pokemon/base_stats/phanpy.asm22
-rw-r--r--data/pokemon/base_stats/pichu.asm22
-rw-r--r--data/pokemon/base_stats/pidgeot.asm22
-rw-r--r--data/pokemon/base_stats/pidgeotto.asm22
-rw-r--r--data/pokemon/base_stats/pidgey.asm22
-rw-r--r--data/pokemon/base_stats/pikachu.asm22
-rw-r--r--data/pokemon/base_stats/piloswine.asm22
-rw-r--r--data/pokemon/base_stats/pineco.asm22
-rw-r--r--data/pokemon/base_stats/pinsir.asm22
-rw-r--r--data/pokemon/base_stats/politoed.asm22
-rw-r--r--data/pokemon/base_stats/poliwag.asm22
-rw-r--r--data/pokemon/base_stats/poliwhirl.asm22
-rw-r--r--data/pokemon/base_stats/poliwrath.asm22
-rw-r--r--data/pokemon/base_stats/ponyta.asm22
-rw-r--r--data/pokemon/base_stats/porygon.asm22
-rw-r--r--data/pokemon/base_stats/porygon2.asm22
-rw-r--r--data/pokemon/base_stats/primeape.asm22
-rw-r--r--data/pokemon/base_stats/psyduck.asm22
-rw-r--r--data/pokemon/base_stats/pupitar.asm22
-rw-r--r--data/pokemon/base_stats/quagsire.asm22
-rw-r--r--data/pokemon/base_stats/quilava.asm22
-rw-r--r--data/pokemon/base_stats/qwilfish.asm22
-rw-r--r--data/pokemon/base_stats/raichu.asm22
-rw-r--r--data/pokemon/base_stats/raikou.asm22
-rw-r--r--data/pokemon/base_stats/rapidash.asm22
-rw-r--r--data/pokemon/base_stats/raticate.asm22
-rw-r--r--data/pokemon/base_stats/rattata.asm22
-rw-r--r--data/pokemon/base_stats/remoraid.asm22
-rw-r--r--data/pokemon/base_stats/rhydon.asm22
-rw-r--r--data/pokemon/base_stats/rhyhorn.asm22
-rw-r--r--data/pokemon/base_stats/sandshrew.asm22
-rw-r--r--data/pokemon/base_stats/sandslash.asm22
-rw-r--r--data/pokemon/base_stats/scizor.asm22
-rw-r--r--data/pokemon/base_stats/scyther.asm22
-rw-r--r--data/pokemon/base_stats/seadra.asm22
-rw-r--r--data/pokemon/base_stats/seaking.asm22
-rw-r--r--data/pokemon/base_stats/seel.asm22
-rw-r--r--data/pokemon/base_stats/sentret.asm22
-rw-r--r--data/pokemon/base_stats/shellder.asm22
-rw-r--r--data/pokemon/base_stats/shuckle.asm22
-rw-r--r--data/pokemon/base_stats/skarmory.asm22
-rw-r--r--data/pokemon/base_stats/skiploom.asm22
-rw-r--r--data/pokemon/base_stats/slowbro.asm22
-rw-r--r--data/pokemon/base_stats/slowking.asm22
-rw-r--r--data/pokemon/base_stats/slowpoke.asm22
-rw-r--r--data/pokemon/base_stats/slugma.asm22
-rw-r--r--data/pokemon/base_stats/smeargle.asm22
-rw-r--r--data/pokemon/base_stats/smoochum.asm22
-rw-r--r--data/pokemon/base_stats/sneasel.asm22
-rw-r--r--data/pokemon/base_stats/snorlax.asm22
-rw-r--r--data/pokemon/base_stats/snubbull.asm22
-rw-r--r--data/pokemon/base_stats/spearow.asm22
-rw-r--r--data/pokemon/base_stats/spinarak.asm22
-rw-r--r--data/pokemon/base_stats/squirtle.asm22
-rw-r--r--data/pokemon/base_stats/stantler.asm22
-rw-r--r--data/pokemon/base_stats/starmie.asm22
-rw-r--r--data/pokemon/base_stats/staryu.asm22
-rw-r--r--data/pokemon/base_stats/steelix.asm22
-rw-r--r--data/pokemon/base_stats/sudowoodo.asm22
-rw-r--r--data/pokemon/base_stats/suicune.asm22
-rw-r--r--data/pokemon/base_stats/sunflora.asm22
-rw-r--r--data/pokemon/base_stats/sunkern.asm22
-rw-r--r--data/pokemon/base_stats/swinub.asm22
-rw-r--r--data/pokemon/base_stats/tangela.asm22
-rw-r--r--data/pokemon/base_stats/tauros.asm22
-rw-r--r--data/pokemon/base_stats/teddiursa.asm22
-rw-r--r--data/pokemon/base_stats/tentacool.asm22
-rw-r--r--data/pokemon/base_stats/tentacruel.asm22
-rw-r--r--data/pokemon/base_stats/togepi.asm22
-rw-r--r--data/pokemon/base_stats/togetic.asm22
-rw-r--r--data/pokemon/base_stats/totodile.asm22
-rw-r--r--data/pokemon/base_stats/typhlosion.asm22
-rw-r--r--data/pokemon/base_stats/tyranitar.asm22
-rw-r--r--data/pokemon/base_stats/tyrogue.asm22
-rw-r--r--data/pokemon/base_stats/umbreon.asm22
-rw-r--r--data/pokemon/base_stats/unown.asm22
-rw-r--r--data/pokemon/base_stats/ursaring.asm22
-rw-r--r--data/pokemon/base_stats/vaporeon.asm22
-rw-r--r--data/pokemon/base_stats/venomoth.asm22
-rw-r--r--data/pokemon/base_stats/venonat.asm22
-rw-r--r--data/pokemon/base_stats/venusaur.asm22
-rw-r--r--data/pokemon/base_stats/victreebel.asm22
-rw-r--r--data/pokemon/base_stats/vileplume.asm22
-rw-r--r--data/pokemon/base_stats/voltorb.asm22
-rw-r--r--data/pokemon/base_stats/vulpix.asm22
-rw-r--r--data/pokemon/base_stats/wartortle.asm22
-rw-r--r--data/pokemon/base_stats/weedle.asm22
-rw-r--r--data/pokemon/base_stats/weepinbell.asm22
-rw-r--r--data/pokemon/base_stats/weezing.asm22
-rw-r--r--data/pokemon/base_stats/wigglytuff.asm22
-rw-r--r--data/pokemon/base_stats/wobbuffet.asm22
-rw-r--r--data/pokemon/base_stats/wooper.asm22
-rw-r--r--data/pokemon/base_stats/xatu.asm22
-rw-r--r--data/pokemon/base_stats/yanma.asm22
-rw-r--r--data/pokemon/base_stats/zapdos.asm22
-rw-r--r--data/pokemon/base_stats/zubat.asm22
-rw-r--r--data/pokemon/cry_headers.asm259
-rw-r--r--data/pokemon/dex_entries.asm272
-rw-r--r--data/pokemon/dex_entries/abra.asm (renamed from data/pokedex/entries/abra.asm)0
-rw-r--r--data/pokemon/dex_entries/aerodactyl.asm (renamed from data/pokedex/entries/aerodactyl.asm)0
-rw-r--r--data/pokemon/dex_entries/aipom.asm (renamed from data/pokedex/entries/aipom.asm)0
-rw-r--r--data/pokemon/dex_entries/alakazam.asm (renamed from data/pokedex/entries/alakazam.asm)0
-rw-r--r--data/pokemon/dex_entries/ampharos.asm (renamed from data/pokedex/entries/ampharos.asm)0
-rw-r--r--data/pokemon/dex_entries/arbok.asm (renamed from data/pokedex/entries/arbok.asm)0
-rw-r--r--data/pokemon/dex_entries/arcanine.asm (renamed from data/pokedex/entries/arcanine.asm)0
-rw-r--r--data/pokemon/dex_entries/ariados.asm (renamed from data/pokedex/entries/ariados.asm)0
-rw-r--r--data/pokemon/dex_entries/articuno.asm (renamed from data/pokedex/entries/articuno.asm)0
-rw-r--r--data/pokemon/dex_entries/azumarill.asm (renamed from data/pokedex/entries/azumarill.asm)0
-rw-r--r--data/pokemon/dex_entries/bayleef.asm (renamed from data/pokedex/entries/bayleef.asm)0
-rw-r--r--data/pokemon/dex_entries/beedrill.asm (renamed from data/pokedex/entries/beedrill.asm)0
-rw-r--r--data/pokemon/dex_entries/bellossom.asm (renamed from data/pokedex/entries/bellossom.asm)0
-rw-r--r--data/pokemon/dex_entries/bellsprout.asm (renamed from data/pokedex/entries/bellsprout.asm)0
-rw-r--r--data/pokemon/dex_entries/blastoise.asm (renamed from data/pokedex/entries/blastoise.asm)0
-rw-r--r--data/pokemon/dex_entries/blissey.asm (renamed from data/pokedex/entries/blissey.asm)0
-rw-r--r--data/pokemon/dex_entries/bulbasaur.asm (renamed from data/pokedex/entries/bulbasaur.asm)0
-rw-r--r--data/pokemon/dex_entries/butterfree.asm (renamed from data/pokedex/entries/butterfree.asm)0
-rw-r--r--data/pokemon/dex_entries/caterpie.asm (renamed from data/pokedex/entries/caterpie.asm)0
-rw-r--r--data/pokemon/dex_entries/celebi.asm (renamed from data/pokedex/entries/celebi.asm)0
-rw-r--r--data/pokemon/dex_entries/chansey.asm (renamed from data/pokedex/entries/chansey.asm)0
-rw-r--r--data/pokemon/dex_entries/charizard.asm (renamed from data/pokedex/entries/charizard.asm)0
-rw-r--r--data/pokemon/dex_entries/charmander.asm (renamed from data/pokedex/entries/charmander.asm)0
-rw-r--r--data/pokemon/dex_entries/charmeleon.asm (renamed from data/pokedex/entries/charmeleon.asm)0
-rw-r--r--data/pokemon/dex_entries/chikorita.asm (renamed from data/pokedex/entries/chikorita.asm)0
-rw-r--r--data/pokemon/dex_entries/chinchou.asm (renamed from data/pokedex/entries/chinchou.asm)0
-rw-r--r--data/pokemon/dex_entries/clefable.asm (renamed from data/pokedex/entries/clefable.asm)0
-rw-r--r--data/pokemon/dex_entries/clefairy.asm (renamed from data/pokedex/entries/clefairy.asm)0
-rw-r--r--data/pokemon/dex_entries/cleffa.asm (renamed from data/pokedex/entries/cleffa.asm)0
-rw-r--r--data/pokemon/dex_entries/cloyster.asm (renamed from data/pokedex/entries/cloyster.asm)0
-rw-r--r--data/pokemon/dex_entries/corsola.asm (renamed from data/pokedex/entries/corsola.asm)0
-rw-r--r--data/pokemon/dex_entries/crobat.asm (renamed from data/pokedex/entries/crobat.asm)0
-rw-r--r--data/pokemon/dex_entries/croconaw.asm (renamed from data/pokedex/entries/croconaw.asm)0
-rw-r--r--data/pokemon/dex_entries/cubone.asm (renamed from data/pokedex/entries/cubone.asm)0
-rw-r--r--data/pokemon/dex_entries/cyndaquil.asm (renamed from data/pokedex/entries/cyndaquil.asm)0
-rw-r--r--data/pokemon/dex_entries/delibird.asm (renamed from data/pokedex/entries/delibird.asm)0
-rw-r--r--data/pokemon/dex_entries/dewgong.asm (renamed from data/pokedex/entries/dewgong.asm)0
-rw-r--r--data/pokemon/dex_entries/diglett.asm (renamed from data/pokedex/entries/diglett.asm)0
-rw-r--r--data/pokemon/dex_entries/ditto.asm (renamed from data/pokedex/entries/ditto.asm)0
-rw-r--r--data/pokemon/dex_entries/dodrio.asm (renamed from data/pokedex/entries/dodrio.asm)0
-rw-r--r--data/pokemon/dex_entries/doduo.asm (renamed from data/pokedex/entries/doduo.asm)0
-rw-r--r--data/pokemon/dex_entries/donphan.asm (renamed from data/pokedex/entries/donphan.asm)0
-rw-r--r--data/pokemon/dex_entries/dragonair.asm (renamed from data/pokedex/entries/dragonair.asm)0
-rw-r--r--data/pokemon/dex_entries/dragonite.asm (renamed from data/pokedex/entries/dragonite.asm)0
-rw-r--r--data/pokemon/dex_entries/dratini.asm (renamed from data/pokedex/entries/dratini.asm)0
-rw-r--r--data/pokemon/dex_entries/drowzee.asm (renamed from data/pokedex/entries/drowzee.asm)0
-rw-r--r--data/pokemon/dex_entries/dugtrio.asm (renamed from data/pokedex/entries/dugtrio.asm)0
-rw-r--r--data/pokemon/dex_entries/dunsparce.asm (renamed from data/pokedex/entries/dunsparce.asm)0
-rw-r--r--data/pokemon/dex_entries/eevee.asm (renamed from data/pokedex/entries/eevee.asm)0
-rw-r--r--data/pokemon/dex_entries/ekans.asm (renamed from data/pokedex/entries/ekans.asm)0
-rw-r--r--data/pokemon/dex_entries/electabuzz.asm (renamed from data/pokedex/entries/electabuzz.asm)0
-rw-r--r--data/pokemon/dex_entries/electrode.asm (renamed from data/pokedex/entries/electrode.asm)0
-rw-r--r--data/pokemon/dex_entries/elekid.asm (renamed from data/pokedex/entries/elekid.asm)0
-rw-r--r--data/pokemon/dex_entries/entei.asm (renamed from data/pokedex/entries/entei.asm)0
-rw-r--r--data/pokemon/dex_entries/espeon.asm (renamed from data/pokedex/entries/espeon.asm)0
-rw-r--r--data/pokemon/dex_entries/exeggcute.asm (renamed from data/pokedex/entries/exeggcute.asm)0
-rw-r--r--data/pokemon/dex_entries/exeggutor.asm (renamed from data/pokedex/entries/exeggutor.asm)0
-rw-r--r--data/pokemon/dex_entries/farfetch_d.asm (renamed from data/pokedex/entries/farfetch_d.asm)0
-rw-r--r--data/pokemon/dex_entries/fearow.asm (renamed from data/pokedex/entries/fearow.asm)0
-rw-r--r--data/pokemon/dex_entries/feraligatr.asm (renamed from data/pokedex/entries/feraligatr.asm)0
-rw-r--r--data/pokemon/dex_entries/flaaffy.asm (renamed from data/pokedex/entries/flaaffy.asm)0
-rw-r--r--data/pokemon/dex_entries/flareon.asm (renamed from data/pokedex/entries/flareon.asm)0
-rw-r--r--data/pokemon/dex_entries/forretress.asm (renamed from data/pokedex/entries/forretress.asm)0
-rw-r--r--data/pokemon/dex_entries/furret.asm (renamed from data/pokedex/entries/furret.asm)0
-rw-r--r--data/pokemon/dex_entries/gastly.asm (renamed from data/pokedex/entries/gastly.asm)0
-rw-r--r--data/pokemon/dex_entries/gengar.asm (renamed from data/pokedex/entries/gengar.asm)0
-rw-r--r--data/pokemon/dex_entries/geodude.asm (renamed from data/pokedex/entries/geodude.asm)0
-rw-r--r--data/pokemon/dex_entries/girafarig.asm (renamed from data/pokedex/entries/girafarig.asm)0
-rw-r--r--data/pokemon/dex_entries/gligar.asm (renamed from data/pokedex/entries/gligar.asm)0
-rw-r--r--data/pokemon/dex_entries/gloom.asm (renamed from data/pokedex/entries/gloom.asm)0
-rw-r--r--data/pokemon/dex_entries/golbat.asm (renamed from data/pokedex/entries/golbat.asm)0
-rw-r--r--data/pokemon/dex_entries/goldeen.asm (renamed from data/pokedex/entries/goldeen.asm)0
-rw-r--r--data/pokemon/dex_entries/golduck.asm (renamed from data/pokedex/entries/golduck.asm)0
-rw-r--r--data/pokemon/dex_entries/golem.asm (renamed from data/pokedex/entries/golem.asm)0
-rw-r--r--data/pokemon/dex_entries/granbull.asm (renamed from data/pokedex/entries/granbull.asm)0
-rw-r--r--data/pokemon/dex_entries/graveler.asm (renamed from data/pokedex/entries/graveler.asm)0
-rw-r--r--data/pokemon/dex_entries/grimer.asm (renamed from data/pokedex/entries/grimer.asm)0
-rw-r--r--data/pokemon/dex_entries/growlithe.asm (renamed from data/pokedex/entries/growlithe.asm)0
-rw-r--r--data/pokemon/dex_entries/gyarados.asm (renamed from data/pokedex/entries/gyarados.asm)0
-rw-r--r--data/pokemon/dex_entries/haunter.asm (renamed from data/pokedex/entries/haunter.asm)0
-rw-r--r--data/pokemon/dex_entries/heracross.asm (renamed from data/pokedex/entries/heracross.asm)0
-rw-r--r--data/pokemon/dex_entries/hitmonchan.asm (renamed from data/pokedex/entries/hitmonchan.asm)0
-rw-r--r--data/pokemon/dex_entries/hitmonlee.asm (renamed from data/pokedex/entries/hitmonlee.asm)0
-rw-r--r--data/pokemon/dex_entries/hitmontop.asm (renamed from data/pokedex/entries/hitmontop.asm)0
-rw-r--r--data/pokemon/dex_entries/ho_oh.asm (renamed from data/pokedex/entries/ho_oh.asm)0
-rw-r--r--data/pokemon/dex_entries/hoothoot.asm (renamed from data/pokedex/entries/hoothoot.asm)0
-rw-r--r--data/pokemon/dex_entries/hoppip.asm (renamed from data/pokedex/entries/hoppip.asm)0
-rw-r--r--data/pokemon/dex_entries/horsea.asm (renamed from data/pokedex/entries/horsea.asm)0
-rw-r--r--data/pokemon/dex_entries/houndoom.asm (renamed from data/pokedex/entries/houndoom.asm)0
-rw-r--r--data/pokemon/dex_entries/houndour.asm (renamed from data/pokedex/entries/houndour.asm)0
-rw-r--r--data/pokemon/dex_entries/hypno.asm (renamed from data/pokedex/entries/hypno.asm)0
-rw-r--r--data/pokemon/dex_entries/igglybuff.asm (renamed from data/pokedex/entries/igglybuff.asm)0
-rw-r--r--data/pokemon/dex_entries/ivysaur.asm (renamed from data/pokedex/entries/ivysaur.asm)0
-rw-r--r--data/pokemon/dex_entries/jigglypuff.asm (renamed from data/pokedex/entries/jigglypuff.asm)0
-rw-r--r--data/pokemon/dex_entries/jolteon.asm (renamed from data/pokedex/entries/jolteon.asm)0
-rw-r--r--data/pokemon/dex_entries/jumpluff.asm (renamed from data/pokedex/entries/jumpluff.asm)0
-rw-r--r--data/pokemon/dex_entries/jynx.asm (renamed from data/pokedex/entries/jynx.asm)0
-rw-r--r--data/pokemon/dex_entries/kabuto.asm (renamed from data/pokedex/entries/kabuto.asm)0
-rw-r--r--data/pokemon/dex_entries/kabutops.asm (renamed from data/pokedex/entries/kabutops.asm)0
-rw-r--r--data/pokemon/dex_entries/kadabra.asm (renamed from data/pokedex/entries/kadabra.asm)0
-rw-r--r--data/pokemon/dex_entries/kakuna.asm (renamed from data/pokedex/entries/kakuna.asm)0
-rw-r--r--data/pokemon/dex_entries/kangaskhan.asm (renamed from data/pokedex/entries/kangaskhan.asm)0
-rw-r--r--data/pokemon/dex_entries/kingdra.asm (renamed from data/pokedex/entries/kingdra.asm)0
-rw-r--r--data/pokemon/dex_entries/kingler.asm (renamed from data/pokedex/entries/kingler.asm)0
-rw-r--r--data/pokemon/dex_entries/koffing.asm (renamed from data/pokedex/entries/koffing.asm)0
-rw-r--r--data/pokemon/dex_entries/krabby.asm (renamed from data/pokedex/entries/krabby.asm)0
-rw-r--r--data/pokemon/dex_entries/lanturn.asm (renamed from data/pokedex/entries/lanturn.asm)0
-rw-r--r--data/pokemon/dex_entries/lapras.asm (renamed from data/pokedex/entries/lapras.asm)0
-rw-r--r--data/pokemon/dex_entries/larvitar.asm (renamed from data/pokedex/entries/larvitar.asm)0
-rw-r--r--data/pokemon/dex_entries/ledian.asm (renamed from data/pokedex/entries/ledian.asm)0
-rw-r--r--data/pokemon/dex_entries/ledyba.asm (renamed from data/pokedex/entries/ledyba.asm)0
-rw-r--r--data/pokemon/dex_entries/lickitung.asm (renamed from data/pokedex/entries/lickitung.asm)0
-rw-r--r--data/pokemon/dex_entries/lugia.asm (renamed from data/pokedex/entries/lugia.asm)0
-rw-r--r--data/pokemon/dex_entries/machamp.asm (renamed from data/pokedex/entries/machamp.asm)0
-rw-r--r--data/pokemon/dex_entries/machoke.asm (renamed from data/pokedex/entries/machoke.asm)0
-rw-r--r--data/pokemon/dex_entries/machop.asm (renamed from data/pokedex/entries/machop.asm)0
-rw-r--r--data/pokemon/dex_entries/magby.asm (renamed from data/pokedex/entries/magby.asm)0
-rw-r--r--data/pokemon/dex_entries/magcargo.asm (renamed from data/pokedex/entries/magcargo.asm)0
-rw-r--r--data/pokemon/dex_entries/magikarp.asm (renamed from data/pokedex/entries/magikarp.asm)0
-rw-r--r--data/pokemon/dex_entries/magmar.asm (renamed from data/pokedex/entries/magmar.asm)0
-rw-r--r--data/pokemon/dex_entries/magnemite.asm (renamed from data/pokedex/entries/magnemite.asm)0
-rw-r--r--data/pokemon/dex_entries/magneton.asm (renamed from data/pokedex/entries/magneton.asm)0
-rw-r--r--data/pokemon/dex_entries/mankey.asm (renamed from data/pokedex/entries/mankey.asm)0
-rw-r--r--data/pokemon/dex_entries/mantine.asm (renamed from data/pokedex/entries/mantine.asm)0
-rw-r--r--data/pokemon/dex_entries/mareep.asm (renamed from data/pokedex/entries/mareep.asm)0
-rw-r--r--data/pokemon/dex_entries/marill.asm (renamed from data/pokedex/entries/marill.asm)0
-rw-r--r--data/pokemon/dex_entries/marowak.asm (renamed from data/pokedex/entries/marowak.asm)0
-rw-r--r--data/pokemon/dex_entries/meganium.asm (renamed from data/pokedex/entries/meganium.asm)0
-rw-r--r--data/pokemon/dex_entries/meowth.asm (renamed from data/pokedex/entries/meowth.asm)0
-rw-r--r--data/pokemon/dex_entries/metapod.asm (renamed from data/pokedex/entries/metapod.asm)0
-rw-r--r--data/pokemon/dex_entries/mew.asm (renamed from data/pokedex/entries/mew.asm)0
-rw-r--r--data/pokemon/dex_entries/mewtwo.asm (renamed from data/pokedex/entries/mewtwo.asm)0
-rw-r--r--data/pokemon/dex_entries/miltank.asm (renamed from data/pokedex/entries/miltank.asm)0
-rw-r--r--data/pokemon/dex_entries/misdreavus.asm (renamed from data/pokedex/entries/misdreavus.asm)0
-rw-r--r--data/pokemon/dex_entries/moltres.asm (renamed from data/pokedex/entries/moltres.asm)0
-rw-r--r--data/pokemon/dex_entries/mr__mime.asm (renamed from data/pokedex/entries/mr__mime.asm)0
-rw-r--r--data/pokemon/dex_entries/muk.asm (renamed from data/pokedex/entries/muk.asm)0
-rw-r--r--data/pokemon/dex_entries/murkrow.asm (renamed from data/pokedex/entries/murkrow.asm)0
-rw-r--r--data/pokemon/dex_entries/natu.asm (renamed from data/pokedex/entries/natu.asm)0
-rw-r--r--data/pokemon/dex_entries/nidoking.asm (renamed from data/pokedex/entries/nidoking.asm)0
-rw-r--r--data/pokemon/dex_entries/nidoqueen.asm (renamed from data/pokedex/entries/nidoqueen.asm)0
-rw-r--r--data/pokemon/dex_entries/nidoran_f.asm (renamed from data/pokedex/entries/nidoran_f.asm)0
-rw-r--r--data/pokemon/dex_entries/nidoran_m.asm (renamed from data/pokedex/entries/nidoran_m.asm)0
-rw-r--r--data/pokemon/dex_entries/nidorina.asm (renamed from data/pokedex/entries/nidorina.asm)0
-rw-r--r--data/pokemon/dex_entries/nidorino.asm (renamed from data/pokedex/entries/nidorino.asm)0
-rw-r--r--data/pokemon/dex_entries/ninetales.asm (renamed from data/pokedex/entries/ninetales.asm)0
-rw-r--r--data/pokemon/dex_entries/noctowl.asm (renamed from data/pokedex/entries/noctowl.asm)0
-rw-r--r--data/pokemon/dex_entries/octillery.asm (renamed from data/pokedex/entries/octillery.asm)0
-rw-r--r--data/pokemon/dex_entries/oddish.asm (renamed from data/pokedex/entries/oddish.asm)0
-rw-r--r--data/pokemon/dex_entries/omanyte.asm (renamed from data/pokedex/entries/omanyte.asm)0
-rw-r--r--data/pokemon/dex_entries/omastar.asm (renamed from data/pokedex/entries/omastar.asm)0
-rw-r--r--data/pokemon/dex_entries/onix.asm (renamed from data/pokedex/entries/onix.asm)0
-rw-r--r--data/pokemon/dex_entries/paras.asm (renamed from data/pokedex/entries/paras.asm)0
-rw-r--r--data/pokemon/dex_entries/parasect.asm (renamed from data/pokedex/entries/parasect.asm)0
-rw-r--r--data/pokemon/dex_entries/persian.asm (renamed from data/pokedex/entries/persian.asm)0
-rw-r--r--data/pokemon/dex_entries/phanpy.asm (renamed from data/pokedex/entries/phanpy.asm)0
-rw-r--r--data/pokemon/dex_entries/pichu.asm (renamed from data/pokedex/entries/pichu.asm)0
-rw-r--r--data/pokemon/dex_entries/pidgeot.asm (renamed from data/pokedex/entries/pidgeot.asm)0
-rw-r--r--data/pokemon/dex_entries/pidgeotto.asm (renamed from data/pokedex/entries/pidgeotto.asm)0
-rw-r--r--data/pokemon/dex_entries/pidgey.asm (renamed from data/pokedex/entries/pidgey.asm)0
-rw-r--r--data/pokemon/dex_entries/pikachu.asm (renamed from data/pokedex/entries/pikachu.asm)0
-rw-r--r--data/pokemon/dex_entries/piloswine.asm (renamed from data/pokedex/entries/piloswine.asm)0
-rw-r--r--data/pokemon/dex_entries/pineco.asm (renamed from data/pokedex/entries/pineco.asm)0
-rw-r--r--data/pokemon/dex_entries/pinsir.asm (renamed from data/pokedex/entries/pinsir.asm)0
-rw-r--r--data/pokemon/dex_entries/politoed.asm (renamed from data/pokedex/entries/politoed.asm)0
-rw-r--r--data/pokemon/dex_entries/poliwag.asm (renamed from data/pokedex/entries/poliwag.asm)0
-rw-r--r--data/pokemon/dex_entries/poliwhirl.asm (renamed from data/pokedex/entries/poliwhirl.asm)0
-rw-r--r--data/pokemon/dex_entries/poliwrath.asm (renamed from data/pokedex/entries/poliwrath.asm)0
-rw-r--r--data/pokemon/dex_entries/ponyta.asm (renamed from data/pokedex/entries/ponyta.asm)0
-rw-r--r--data/pokemon/dex_entries/porygon.asm (renamed from data/pokedex/entries/porygon.asm)0
-rw-r--r--data/pokemon/dex_entries/porygon2.asm (renamed from data/pokedex/entries/porygon2.asm)0
-rw-r--r--data/pokemon/dex_entries/primeape.asm (renamed from data/pokedex/entries/primeape.asm)0
-rw-r--r--data/pokemon/dex_entries/psyduck.asm (renamed from data/pokedex/entries/psyduck.asm)0
-rw-r--r--data/pokemon/dex_entries/pupitar.asm (renamed from data/pokedex/entries/pupitar.asm)0
-rw-r--r--data/pokemon/dex_entries/quagsire.asm (renamed from data/pokedex/entries/quagsire.asm)0
-rw-r--r--data/pokemon/dex_entries/quilava.asm (renamed from data/pokedex/entries/quilava.asm)0
-rw-r--r--data/pokemon/dex_entries/qwilfish.asm (renamed from data/pokedex/entries/qwilfish.asm)0
-rw-r--r--data/pokemon/dex_entries/raichu.asm (renamed from data/pokedex/entries/raichu.asm)0
-rw-r--r--data/pokemon/dex_entries/raikou.asm (renamed from data/pokedex/entries/raikou.asm)0
-rw-r--r--data/pokemon/dex_entries/rapidash.asm (renamed from data/pokedex/entries/rapidash.asm)0
-rw-r--r--data/pokemon/dex_entries/raticate.asm (renamed from data/pokedex/entries/raticate.asm)0
-rw-r--r--data/pokemon/dex_entries/rattata.asm (renamed from data/pokedex/entries/rattata.asm)0
-rw-r--r--data/pokemon/dex_entries/remoraid.asm (renamed from data/pokedex/entries/remoraid.asm)0
-rw-r--r--data/pokemon/dex_entries/rhydon.asm (renamed from data/pokedex/entries/rhydon.asm)0
-rw-r--r--data/pokemon/dex_entries/rhyhorn.asm (renamed from data/pokedex/entries/rhyhorn.asm)0
-rw-r--r--data/pokemon/dex_entries/sandshrew.asm (renamed from data/pokedex/entries/sandshrew.asm)0
-rw-r--r--data/pokemon/dex_entries/sandslash.asm (renamed from data/pokedex/entries/sandslash.asm)0
-rw-r--r--data/pokemon/dex_entries/scizor.asm (renamed from data/pokedex/entries/scizor.asm)0
-rw-r--r--data/pokemon/dex_entries/scyther.asm (renamed from data/pokedex/entries/scyther.asm)0
-rw-r--r--data/pokemon/dex_entries/seadra.asm (renamed from data/pokedex/entries/seadra.asm)0
-rw-r--r--data/pokemon/dex_entries/seaking.asm (renamed from data/pokedex/entries/seaking.asm)0
-rw-r--r--data/pokemon/dex_entries/seel.asm (renamed from data/pokedex/entries/seel.asm)0
-rw-r--r--data/pokemon/dex_entries/sentret.asm (renamed from data/pokedex/entries/sentret.asm)0
-rw-r--r--data/pokemon/dex_entries/shellder.asm (renamed from data/pokedex/entries/shellder.asm)0
-rw-r--r--data/pokemon/dex_entries/shuckle.asm (renamed from data/pokedex/entries/shuckle.asm)0
-rw-r--r--data/pokemon/dex_entries/skarmory.asm (renamed from data/pokedex/entries/skarmory.asm)0
-rw-r--r--data/pokemon/dex_entries/skiploom.asm (renamed from data/pokedex/entries/skiploom.asm)0
-rw-r--r--data/pokemon/dex_entries/slowbro.asm (renamed from data/pokedex/entries/slowbro.asm)0
-rw-r--r--data/pokemon/dex_entries/slowking.asm (renamed from data/pokedex/entries/slowking.asm)0
-rw-r--r--data/pokemon/dex_entries/slowpoke.asm (renamed from data/pokedex/entries/slowpoke.asm)0
-rw-r--r--data/pokemon/dex_entries/slugma.asm (renamed from data/pokedex/entries/slugma.asm)0
-rw-r--r--data/pokemon/dex_entries/smeargle.asm (renamed from data/pokedex/entries/smeargle.asm)0
-rw-r--r--data/pokemon/dex_entries/smoochum.asm (renamed from data/pokedex/entries/smoochum.asm)0
-rw-r--r--data/pokemon/dex_entries/sneasel.asm (renamed from data/pokedex/entries/sneasel.asm)0
-rw-r--r--data/pokemon/dex_entries/snorlax.asm (renamed from data/pokedex/entries/snorlax.asm)0
-rw-r--r--data/pokemon/dex_entries/snubbull.asm (renamed from data/pokedex/entries/snubbull.asm)0
-rw-r--r--data/pokemon/dex_entries/spearow.asm (renamed from data/pokedex/entries/spearow.asm)0
-rw-r--r--data/pokemon/dex_entries/spinarak.asm (renamed from data/pokedex/entries/spinarak.asm)0
-rw-r--r--data/pokemon/dex_entries/squirtle.asm (renamed from data/pokedex/entries/squirtle.asm)0
-rw-r--r--data/pokemon/dex_entries/stantler.asm (renamed from data/pokedex/entries/stantler.asm)0
-rw-r--r--data/pokemon/dex_entries/starmie.asm (renamed from data/pokedex/entries/starmie.asm)0
-rw-r--r--data/pokemon/dex_entries/staryu.asm (renamed from data/pokedex/entries/staryu.asm)0
-rw-r--r--data/pokemon/dex_entries/steelix.asm (renamed from data/pokedex/entries/steelix.asm)0
-rw-r--r--data/pokemon/dex_entries/sudowoodo.asm (renamed from data/pokedex/entries/sudowoodo.asm)0
-rw-r--r--data/pokemon/dex_entries/suicune.asm (renamed from data/pokedex/entries/suicune.asm)0
-rw-r--r--data/pokemon/dex_entries/sunflora.asm (renamed from data/pokedex/entries/sunflora.asm)0
-rw-r--r--data/pokemon/dex_entries/sunkern.asm (renamed from data/pokedex/entries/sunkern.asm)0
-rw-r--r--data/pokemon/dex_entries/swinub.asm (renamed from data/pokedex/entries/swinub.asm)0
-rw-r--r--data/pokemon/dex_entries/tangela.asm (renamed from data/pokedex/entries/tangela.asm)0
-rw-r--r--data/pokemon/dex_entries/tauros.asm (renamed from data/pokedex/entries/tauros.asm)0
-rw-r--r--data/pokemon/dex_entries/teddiursa.asm (renamed from data/pokedex/entries/teddiursa.asm)0
-rw-r--r--data/pokemon/dex_entries/tentacool.asm (renamed from data/pokedex/entries/tentacool.asm)0
-rw-r--r--data/pokemon/dex_entries/tentacruel.asm (renamed from data/pokedex/entries/tentacruel.asm)0
-rw-r--r--data/pokemon/dex_entries/togepi.asm (renamed from data/pokedex/entries/togepi.asm)0
-rw-r--r--data/pokemon/dex_entries/togetic.asm (renamed from data/pokedex/entries/togetic.asm)0
-rw-r--r--data/pokemon/dex_entries/totodile.asm (renamed from data/pokedex/entries/totodile.asm)0
-rw-r--r--data/pokemon/dex_entries/typhlosion.asm (renamed from data/pokedex/entries/typhlosion.asm)0
-rw-r--r--data/pokemon/dex_entries/tyranitar.asm (renamed from data/pokedex/entries/tyranitar.asm)0
-rw-r--r--data/pokemon/dex_entries/tyrogue.asm (renamed from data/pokedex/entries/tyrogue.asm)0
-rw-r--r--data/pokemon/dex_entries/umbreon.asm (renamed from data/pokedex/entries/umbreon.asm)0
-rw-r--r--data/pokemon/dex_entries/unown.asm (renamed from data/pokedex/entries/unown.asm)0
-rw-r--r--data/pokemon/dex_entries/ursaring.asm (renamed from data/pokedex/entries/ursaring.asm)0
-rw-r--r--data/pokemon/dex_entries/vaporeon.asm (renamed from data/pokedex/entries/vaporeon.asm)0
-rw-r--r--data/pokemon/dex_entries/venomoth.asm (renamed from data/pokedex/entries/venomoth.asm)0
-rw-r--r--data/pokemon/dex_entries/venonat.asm (renamed from data/pokedex/entries/venonat.asm)0
-rw-r--r--data/pokemon/dex_entries/venusaur.asm (renamed from data/pokedex/entries/venusaur.asm)0
-rw-r--r--data/pokemon/dex_entries/victreebel.asm (renamed from data/pokedex/entries/victreebel.asm)0
-rw-r--r--data/pokemon/dex_entries/vileplume.asm (renamed from data/pokedex/entries/vileplume.asm)0
-rw-r--r--data/pokemon/dex_entries/voltorb.asm (renamed from data/pokedex/entries/voltorb.asm)0
-rw-r--r--data/pokemon/dex_entries/vulpix.asm (renamed from data/pokedex/entries/vulpix.asm)0
-rw-r--r--data/pokemon/dex_entries/wartortle.asm (renamed from data/pokedex/entries/wartortle.asm)0
-rw-r--r--data/pokemon/dex_entries/weedle.asm (renamed from data/pokedex/entries/weedle.asm)0
-rw-r--r--data/pokemon/dex_entries/weepinbell.asm (renamed from data/pokedex/entries/weepinbell.asm)0
-rw-r--r--data/pokemon/dex_entries/weezing.asm (renamed from data/pokedex/entries/weezing.asm)0
-rw-r--r--data/pokemon/dex_entries/wigglytuff.asm (renamed from data/pokedex/entries/wigglytuff.asm)0
-rw-r--r--data/pokemon/dex_entries/wobbuffet.asm (renamed from data/pokedex/entries/wobbuffet.asm)0
-rw-r--r--data/pokemon/dex_entries/wooper.asm (renamed from data/pokedex/entries/wooper.asm)0
-rw-r--r--data/pokemon/dex_entries/xatu.asm (renamed from data/pokedex/entries/xatu.asm)0
-rw-r--r--data/pokemon/dex_entries/yanma.asm (renamed from data/pokedex/entries/yanma.asm)0
-rw-r--r--data/pokemon/dex_entries/zapdos.asm (renamed from data/pokedex/entries/zapdos.asm)0
-rw-r--r--data/pokemon/dex_entries/zubat.asm (renamed from data/pokedex/entries/zubat.asm)0
-rw-r--r--data/pokemon/dex_entry_pointers.asm254
-rw-r--r--data/pokemon/dex_order_alpha.asm255
-rw-r--r--data/pokemon/dex_order_new.asm255
-rw-r--r--data/pokemon/egg_move_pointers.asm257
-rw-r--r--data/pokemon/egg_moves.asm872
-rw-r--r--data/pokemon/evos_attacks.asm3398
-rw-r--r--data/pokemon/evos_attacks_pointers.asm255
-rw-r--r--data/pokemon/menu_icons.asm255
-rw-r--r--data/pokemon/pokemon_names.asm257
-rw-r--r--data/pokemon_names.asm256
-rw-r--r--data/sgb_border_map.asm29
-rwxr-xr-xdata/sprite_anim_frames.asm499
-rw-r--r--data/sprite_anim_oam.asm1131
-rw-r--r--data/sprite_anim_seqs.asm49
-rwxr-xr-xdata/sprite_engine.asm1647
-rw-r--r--data/sprite_mons.asm38
-rw-r--r--data/text_buffers.asm9
-rw-r--r--data/time_capsule/catch_rate_items.asm19
-rw-r--r--data/time_capsule/mon_order.asm255
-rw-r--r--data/time_capsule/special_stats.asm155
-rw-r--r--data/tmhm_moves.asm69
-rw-r--r--data/trainers/encounter_music.asm75
-rw-r--r--data/trainers/gendered_trainers.asm40
-rw-r--r--data/trainers/parties.asm8829
-rw-r--r--data/trainers/party_pointers.asm (renamed from trainers/trainer_pointers.asm)0
-rw-r--r--data/trainers/trainer_attributes.asm406
-rwxr-xr-xdata/trainers/trainer_class_names.asm69
-rw-r--r--data/trainers/trainer_dvs.asm93
-rw-r--r--data/unown_words.asm67
-rw-r--r--data/wild/bug_contest_mons.asm14
-rw-r--r--data/wild/johto_grass.asm2
-rw-r--r--data/wild/johto_water.asm2
-rw-r--r--data/wild/kanto_grass.asm2
-rw-r--r--data/wild/kanto_water.asm2
-rw-r--r--data/wild/probabilities.asm15
-rw-r--r--data/wild/roammon_maps.asm33
-rw-r--r--data/wild/swarm_grass.asm4
-rw-r--r--data/wild/swarm_water.asm4
-rw-r--r--data/wild/treemon_maps.asm50
-rw-r--r--data/wild/treemons.asm128
-rw-r--r--docs/assembly_programming.md15
-rw-r--r--docs/bugs_and_glitches.md1455
-rw-r--r--docs/effect_commands.md358
-rw-r--r--docs/event_commands.md348
-rw-r--r--docs/images/hp_exp_bar_border.pngbin0 -> 125 bytes
-rw-r--r--docs/images/hp_exp_bar_border_fix.pngbin0 -> 124 bytes
-rw-r--r--docs/images/port.pngbin0 -> 1055 bytes
-rw-r--r--docs/images/port_fix.pngbin0 -> 1056 bytes
-rw-r--r--docs/map_scripts.md139
-rw-r--r--docs/move_anim_commands.md102
-rw-r--r--docs/movement_commands.md84
-rw-r--r--docs/music_commands.md96
-rw-r--r--docs/pic_animations.md31
-rw-r--r--docs/text_commands.md164
-rwxr-xr-xengine/anim_hp_bar.asm6
-rw-r--r--engine/battle_start.asm865
-rw-r--r--engine/battle_tower.asm210
-rw-r--r--engine/battle_transition.asm873
-rwxr-xr-xengine/billspc.asm50
-rwxr-xr-xengine/billspctop.asm16
-rwxr-xr-xengine/breeding.asm993
-rwxr-xr-xengine/breeding/egg.asm993
-rwxr-xr-xengine/buy_sell_toss.asm4
-rwxr-xr-xengine/card_flip.asm85
-rw-r--r--engine/caught_data.asm247
-rw-r--r--engine/cgb_layouts.asm1071
-rwxr-xr-xengine/clock_reset.asm22
-rw-r--r--engine/color.asm956
-rw-r--r--engine/credits.asm708
-rwxr-xr-xengine/crystal_colors.asm336
-rwxr-xr-xengine/crystal_intro.asm575
-rwxr-xr-xengine/debug.asm95
-rwxr-xr-xengine/decorations.asm98
-rwxr-xr-xengine/delete_save_change_clock.asm10
-rw-r--r--engine/diploma.asm7
-rwxr-xr-xengine/dma_transfer.asm626
-rwxr-xr-xengine/dummy_game.asm8
-rw-r--r--engine/engine_flags.asm204
-rw-r--r--engine/european_mail.asm129
-rw-r--r--engine/events.asm110
-rw-r--r--engine/events_2.asm45
-rwxr-xr-xengine/events_3.asm223
-rwxr-xr-xengine/evolution_animation.asm14
-rwxr-xr-xengine/evolve.asm10
-rw-r--r--engine/experience.asm162
-rw-r--r--engine/facings.asm268
-rw-r--r--engine/fish.asm2
-rw-r--r--engine/fruit_trees.asm37
-rw-r--r--engine/gbc_only.asm149
-rwxr-xr-xengine/healmachineanim.asm265
-rwxr-xr-xengine/health.asm2
-rwxr-xr-xengine/init_gender.asm8
-rw-r--r--engine/init_hof_credits.asm79
-rw-r--r--engine/init_map.asm103
-rwxr-xr-xengine/intro_menu.asm142
-rw-r--r--engine/item_effects.asm3316
-rwxr-xr-xengine/items.asm4
-rw-r--r--engine/landmarks.asm208
-rwxr-xr-xengine/link.asm154
-rw-r--r--engine/link_2.asm91
-rwxr-xr-xengine/link_trade.asm24
-rwxr-xr-xengine/mail.asm26
-rwxr-xr-xengine/main_menu.asm10
-rwxr-xr-xengine/map_object_action.asm52
-rw-r--r--engine/map_objects.asm117
-rw-r--r--engine/map_objects_2.asm70
-rw-r--r--engine/map_palettes.asm86
-rw-r--r--engine/map_setup.asm16
-rw-r--r--engine/map_triggers.asm91
-rwxr-xr-xengine/mart.asm64
-rwxr-xr-xengine/menu.asm10
-rw-r--r--engine/menu_2.asm263
-rwxr-xr-xengine/mon_icons.asm54
-rwxr-xr-xengine/mon_menu.asm15
-rw-r--r--engine/mon_stats.asm486
-rwxr-xr-xengine/money.asm4
-rw-r--r--engine/more_phone_scripts.asm1660
-rwxr-xr-xengine/move_mon.asm74
-rwxr-xr-xengine/move_mon_wo_mail.asm2
-rw-r--r--engine/movement.asm41
-rwxr-xr-xengine/mystery_gift.asm1735
-rwxr-xr-xengine/mystery_gift_2.asm152
-rwxr-xr-xengine/mysterygift.asm1735
-rwxr-xr-xengine/mysterygift2.asm227
-rwxr-xr-xengine/namingscreen.asm81
-rwxr-xr-xengine/npc_movement.asm19
-rwxr-xr-xengine/npctrade.asm62
-rw-r--r--engine/odd_eggs.asm96
-rwxr-xr-xengine/options_menu.asm128
-rwxr-xr-xengine/overworld.asm795
-rw-r--r--engine/pack.asm68
-rw-r--r--engine/party_menu.asm8
-rw-r--r--engine/phone.asm878
-rw-r--r--engine/phone/buenas_password.asm (renamed from engine/buena_phone_scripts.asm)0
-rw-r--r--engine/phone/generic_calls.asm1266
-rw-r--r--engine/phone/phone.asm800
-rw-r--r--engine/phone/phone_callers.asm961
-rw-r--r--engine/phone/phone_gossip.asm698
-rw-r--r--engine/phone/phone_scripts.asm1886
-rw-r--r--engine/phone_scripts.asm3153
-rw-r--r--engine/player_gfx.asm263
-rwxr-xr-xengine/player_movement.asm95
-rwxr-xr-xengine/player_object.asm12
-rwxr-xr-xengine/player_step.asm2
-rwxr-xr-xengine/pokecenter_pc.asm62
-rw-r--r--engine/pokedex.asm78
-rw-r--r--engine/pokedex_2.asm286
-rw-r--r--engine/pokedex_3.asm162
-rwxr-xr-xengine/pokegear.asm296
-rwxr-xr-xengine/pokepic.asm2
-rw-r--r--engine/pokerus/apply_pokerus_tick.asm26
-rw-r--r--engine/pokerus/check_pokerus.asm25
-rw-r--r--engine/pokerus/pokerus.asm160
-rw-r--r--engine/predef.asm10
-rwxr-xr-xengine/print_party.asm362
-rwxr-xr-xengine/printer.asm18
-rwxr-xr-xengine/printer/serial.asm645
-rwxr-xr-xengine/printer_serial.asm645
-rwxr-xr-xengine/printnum.asm2
-rwxr-xr-xengine/prof_oaks_pc.asm44
-rw-r--r--engine/radio.asm33
-rw-r--r--engine/read_trainer_attributes.asm64
-rwxr-xr-xengine/read_trainer_party.asm (renamed from trainers/read_party.asm)0
-rw-r--r--engine/routines/battlestart_copytilemapatonce.asm3
-rw-r--r--engine/routines/checkbattlescene.asm47
-rw-r--r--engine/routines/checknickerrors.asm74
-rw-r--r--engine/routines/checksave.asm20
-rw-r--r--engine/routines/checktime.asm19
-rw-r--r--engine/routines/consumehelditem.asm80
-rw-r--r--engine/routines/correcterrorsinplayerparty.asm229
-rw-r--r--engine/routines/drawkrispackgfx.asm20
-rw-r--r--engine/routines/emptyallsrambanks.asm19
-rw-r--r--engine/routines/flagpredef.asm70
-rw-r--r--engine/routines/getbreedmonlevelgrowth.asm27
-rwxr-xr-xengine/routines/getpokeballwobble.asm (renamed from items/pokeball_wobble.asm)0
-rw-r--r--engine/routines/getsquareroot.asm30
-rw-r--r--engine/routines/initlist.asm54
-rw-r--r--engine/routines/knowsmove.asm25
-rw-r--r--engine/routines/kurt_selectquantity_interpretjoypad.asm4
-rw-r--r--engine/routines/leveluphappinessmod.asm20
-rw-r--r--engine/routines/loadmappart.asm36
-rw-r--r--engine/routines/loadpushoam.asm21
-rw-r--r--engine/routines/newpokedexentry.asm52
-rw-r--r--engine/routines/phonering_copytilemapatonce.asm80
-rw-r--r--engine/routines/placegraphic.asm56
-rw-r--r--engine/routines/placewaitingtext.asm24
-rw-r--r--engine/routines/playslowcry.asm31
-rw-r--r--engine/routines/printhoursmins.asm64
-rw-r--r--engine/routines/returntobattle_useball.asm19
-rw-r--r--engine/routines/savemenu_copytilemapatonce.asm77
-rwxr-xr-xengine/routines/sine.asm (renamed from engine/sine.asm)0
-rw-r--r--engine/routines/switchpartymons.asm145
-rw-r--r--engine/routines/townmap_convertlinebreakcharacters.asm21
-rw-r--r--engine/routines/trademonfrontpic.asm38
-rw-r--r--engine/routines/updatebattlehuds.asm9
-rw-r--r--engine/routines/updateitemdescription.asm13
-rwxr-xr-xengine/rtc.asm26
-rw-r--r--engine/save.asm99
-rw-r--r--engine/scripting.asm265
-rwxr-xr-xengine/search.asm4
-rwxr-xr-xengine/select_menu.asm189
-rwxr-xr-xengine/selectmenu.asm189
-rw-r--r--engine/sgb_layouts.asm636
-rwxr-xr-xengine/slot_machine.asm35
-rw-r--r--engine/spawn_points.asm51
-rw-r--r--engine/specials.asm56
-rwxr-xr-xengine/sprite_anims.asm180
-rwxr-xr-xengine/sprites.asm78
-rw-r--r--engine/start_battle.asm197
-rwxr-xr-xengine/start_menu.asm1974
-rwxr-xr-xengine/startmenu.asm1974
-rwxr-xr-xengine/stats_screen.asm69
-rw-r--r--engine/std_scripts.asm24
-rw-r--r--engine/tempmon.asm127
-rwxr-xr-xengine/tile_events.asm68
-rwxr-xr-xengine/time.asm4
-rwxr-xr-xengine/time_capsule.asm147
-rwxr-xr-xengine/time_capsule/conversion.asm682
-rw-r--r--engine/time_capsule_2.asm39
-rw-r--r--engine/timeofdaypals.asm24
-rwxr-xr-xengine/timeset.asm101
-rw-r--r--engine/title.asm94
-rwxr-xr-xengine/tmhm.asm66
-rwxr-xr-xengine/tmhm2.asm22
-rwxr-xr-xengine/trade/animation.asm1627
-rwxr-xr-xengine/trade_animation.asm1628
-rwxr-xr-xengine/trainer_card.asm16
-rw-r--r--engine/trainer_scripts.asm31
-rwxr-xr-xengine/unown_dex.asm52
-rwxr-xr-xengine/unown_puzzle.asm5
-rwxr-xr-xengine/unowndex.asm118
-rw-r--r--engine/unused_title.asm201
-rwxr-xr-xengine/variables.asm8
-rwxr-xr-xengine/warp_connection.asm32
-rwxr-xr-xengine/wildmons.asm72
-rwxr-xr-xevent/basement_key.asm4
-rw-r--r--event/buena.asm30
-rw-r--r--event/buena_menu.asm58
-rw-r--r--event/bug_contest/caught_mon.asm38
-rw-r--r--event/bug_contest/contest.asm43
-rwxr-xr-xevent/bug_contest/contest_2.asm (renamed from event/bug_contest_2.asm)0
-rw-r--r--event/bug_contest/display_stats.asm107
-rwxr-xr-xevent/bug_contest/judging.asm395
-rwxr-xr-xevent/bug_contest_judging.asm465
-rw-r--r--event/catch_tutorial.asm81
-rw-r--r--event/catch_tutorial_input.asm43
-rwxr-xr-xevent/celebi.asm19
-rwxr-xr-xevent/daycare.asm66
-rwxr-xr-xevent/elevator.asm10
-rwxr-xr-xevent/field_moves.asm36
-rwxr-xr-xevent/halloffame.asm48
-rwxr-xr-xevent/happiness_egg.asm59
-rwxr-xr-xevent/heal_machine_anim.asm265
-rwxr-xr-xevent/itemball.asm54
-rwxr-xr-xevent/itemfinder.asm2
-rw-r--r--event/kurt.asm10
-rw-r--r--event/lucky_number.asm226
-rw-r--r--event/magikarp.asm30
-rwxr-xr-xevent/magnet_train.asm18
-rwxr-xr-xevent/misc_scripts.asm62
-rw-r--r--event/misc_scripts_2.asm51
-rw-r--r--event/mom.asm18
-rwxr-xr-xevent/mom_phone.asm58
-rw-r--r--event/move_deleter.asm4
-rw-r--r--event/move_tutor.asm103
-rw-r--r--event/name_rater.asm4
-rwxr-xr-xevent/overworld.asm114
-rwxr-xr-xevent/photo.asm295
-rwxr-xr-xevent/poisonstep.asm4
-rw-r--r--event/poisonstep_pals.asm48
-rw-r--r--event/poke_seer.asm4
-rwxr-xr-xevent/print_photo.asm61
-rw-r--r--event/print_unown.asm233
-rw-r--r--event/print_unown_2.asm111
-rwxr-xr-xevent/special.asm16
-rwxr-xr-xevent/squirtbottle.asm2
-rw-r--r--event/std_collision.asm29
-rwxr-xr-xevent/sweet_scent.asm8
-rw-r--r--event/unown.asm12
-rwxr-xr-xevent/whiteout.asm6
-rw-r--r--gbhw.asm130
-rw-r--r--gfx/battle/dude.2bpp.lz.d13fb490 (renamed from gfx/misc/dude.2bpp.lz.d13fb490)bin320 -> 320 bytes
-rw-r--r--gfx/battle/dude.png (renamed from gfx/misc/dude.png)bin375 -> 375 bytes
-rw-r--r--gfx/card_flip/card_flip.tilemapbin0 -> 132 bytes
-rw-r--r--gfx/card_flip/card_flip_1.2bpp.lz.86f267e8 (renamed from gfx/unknown/0e0d16.2bpp.lz.86f267e8)bin402 -> 402 bytes
-rw-r--r--gfx/card_flip/card_flip_1.png (renamed from gfx/unknown/0e0d16.png)bin494 -> 494 bytes
-rw-r--r--gfx/card_flip/card_flip_2.2bpp.lz.6a6c671d (renamed from gfx/unknown/0e0ea8.2bpp.lz.6a6c671d)bin612 -> 612 bytes
-rw-r--r--[-rwxr-xr-x]gfx/card_flip/card_flip_2.png (renamed from gfx/unknown/0e0ea8.png)bin1304 -> 1304 bytes
-rw-r--r--gfx/card_flip/card_flip_3.2bpp.lz.53679db7 (renamed from gfx/unknown/0e0cdb.2bpp.lz.53679db7)bin27 -> 27 bytes
-rw-r--r--gfx/card_flip/card_flip_3.png (renamed from gfx/unknown/0e0cdb.png)bin99 -> 99 bytes
-rw-r--r--gfx/card_flip/off.png (renamed from gfx/unknown/0e0cf6.png)bin79 -> 79 bytes
-rw-r--r--gfx/card_flip/on.png (renamed from gfx/unknown/0e0d06.png)bin79 -> 79 bytes
-rw-r--r--gfx/credits.asm7
-rw-r--r--gfx/diploma/diploma.2bpp.lz.7b56f7e5 (renamed from gfx/unknown/1dd805.2bpp.lz.7b56f7e5)bin1094 -> 1094 bytes
-rw-r--r--gfx/diploma/diploma.png (renamed from gfx/unknown/1dd805.png)bin938 -> 938 bytes
-rw-r--r--gfx/diploma/page1.tilemap (renamed from gfx/unknown/1ddc4b.tilemap)bin360 -> 360 bytes
-rw-r--r--gfx/diploma/page2.tilemap (renamed from gfx/unknown/1dddb3.tilemap)bin361 -> 361 bytes
-rw-r--r--gfx/dummy_game/dummy_game.2bpp.lz.821ba441 (renamed from gfx/unknown/0e2221.2bpp.lz.821ba441)bin368 -> 368 bytes
-rw-r--r--gfx/dummy_game/dummy_game.png (renamed from gfx/unknown/0e2221.png)bin445 -> 445 bytes
-rw-r--r--gfx/emotes.asm12
-rw-r--r--gfx/evo/egg_hatch.png (renamed from gfx/unknown/017393.png)bin107 -> 107 bytes
-rwxr-xr-xgfx/font.asm48
-rw-r--r--gfx/font/feet_inches.png (renamed from gfx/unknown/0fbbbb.png)bin89 -> 89 bytes
-rw-r--r--gfx/font/font.png (renamed from gfx/misc/font.png)bin770 -> 770 bytes
-rw-r--r--gfx/font/font_battle_extra.png (renamed from gfx/misc/font_battle_extra.png)bin280 -> 280 bytes
-rw-r--r--gfx/font/font_extra.png (renamed from gfx/misc/font_extra.png)bin293 -> 293 bytes
-rw-r--r--gfx/font/font_inversed.png (renamed from gfx/misc/font_inversed.png)bin736 -> 736 bytes
-rw-r--r--gfx/font/overworld_phone_icon.png (renamed from gfx/mobile/overworld_phone_icon.png)bin82 -> 82 bytes
-rw-r--r--gfx/font/unown_font.png (renamed from gfx/misc/unown_font.png)bin294 -> 294 bytes
-rw-r--r--gfx/font/unused_bold_font.png (renamed from gfx/unknown/0f8f34.png)bin575 -> 575 bytes
-rw-r--r--gfx/font/unused_weekday_kanji.png (renamed from gfx/font/weekday_kanji.png)bin142 -> 142 bytes
-rw-r--r--gfx/font/up_arrow.png (renamed from gfx/unknown/0f9424.png)bin86 -> 86 bytes
-rw-r--r--gfx/footprints.asm587
-rw-r--r--gfx/footprints/252.pngbin0 -> 134 bytes
-rw-r--r--gfx/footprints/253.pngbin0 -> 134 bytes
-rw-r--r--gfx/footprints/254.pngbin0 -> 136 bytes
-rw-r--r--gfx/footprints/255.pngbin0 -> 134 bytes
-rw-r--r--gfx/footprints/256.pngbin0 -> 134 bytes
-rw-r--r--gfx/footprints/abra.pngbin0 -> 120 bytes
-rw-r--r--gfx/footprints/aerodactyl.pngbin0 -> 120 bytes
-rw-r--r--gfx/footprints/aipom.pngbin0 -> 114 bytes
-rw-r--r--gfx/footprints/alakazam.pngbin0 -> 124 bytes
-rw-r--r--gfx/footprints/ampharos.pngbin0 -> 118 bytes
-rw-r--r--gfx/footprints/arbok.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/arcanine.pngbin0 -> 126 bytes
-rw-r--r--gfx/footprints/ariados.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/articuno.pngbin0 -> 134 bytes
-rw-r--r--gfx/footprints/azumarill.pngbin0 -> 113 bytes
-rw-r--r--gfx/footprints/bayleef.pngbin0 -> 115 bytes
-rw-r--r--gfx/footprints/beedrill.pngbin0 -> 111 bytes
-rw-r--r--gfx/footprints/bellossom.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/bellsprout.pngbin0 -> 134 bytes
-rw-r--r--gfx/footprints/blastoise.pngbin0 -> 127 bytes
-rw-r--r--gfx/footprints/blissey.pngbin0 -> 123 bytes
-rw-r--r--gfx/footprints/bulbasaur.pngbin0 -> 114 bytes
-rw-r--r--gfx/footprints/butterfree.pngbin0 -> 114 bytes
-rw-r--r--gfx/footprints/caterpie.pngbin0 -> 108 bytes
-rw-r--r--gfx/footprints/celebi.pngbin0 -> 113 bytes
-rw-r--r--gfx/footprints/chansey.pngbin0 -> 115 bytes
-rw-r--r--gfx/footprints/charizard.pngbin0 -> 122 bytes
-rw-r--r--gfx/footprints/charmander.pngbin0 -> 118 bytes
-rw-r--r--gfx/footprints/charmeleon.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/chikorita.pngbin0 -> 109 bytes
-rw-r--r--gfx/footprints/chinchou.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/clefable.pngbin0 -> 126 bytes
-rw-r--r--gfx/footprints/clefairy.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/cleffa.pngbin0 -> 107 bytes
-rw-r--r--gfx/footprints/cloyster.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/corsola.pngbin0 -> 108 bytes
-rw-r--r--gfx/footprints/crobat.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/croconaw.pngbin0 -> 113 bytes
-rw-r--r--gfx/footprints/cubone.pngbin0 -> 114 bytes
-rw-r--r--gfx/footprints/cyndaquil.pngbin0 -> 111 bytes
-rw-r--r--gfx/footprints/delibird.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/dewgong.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/diglett.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/ditto.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/dodrio.pngbin0 -> 137 bytes
-rw-r--r--gfx/footprints/doduo.pngbin0 -> 126 bytes
-rw-r--r--gfx/footprints/donphan.pngbin0 -> 130 bytes
-rw-r--r--gfx/footprints/dragonair.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/dragonite.pngbin0 -> 120 bytes
-rw-r--r--gfx/footprints/dratini.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/drowzee.pngbin0 -> 115 bytes
-rw-r--r--gfx/footprints/dugtrio.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/dunsparce.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/eevee.pngbin0 -> 123 bytes
-rw-r--r--gfx/footprints/ekans.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/electabuzz.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/electrode.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/elekid.pngbin0 -> 114 bytes
-rw-r--r--gfx/footprints/entei.pngbin0 -> 129 bytes
-rw-r--r--gfx/footprints/espeon.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/exeggcute.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/exeggutor.pngbin0 -> 120 bytes
-rw-r--r--gfx/footprints/farfetch_d.pngbin0 -> 127 bytes
-rw-r--r--gfx/footprints/fearow.pngbin0 -> 130 bytes
-rw-r--r--gfx/footprints/feraligatr.pngbin0 -> 120 bytes
-rw-r--r--gfx/footprints/flaaffy.pngbin0 -> 109 bytes
-rw-r--r--gfx/footprints/flareon.pngbin0 -> 130 bytes
-rw-r--r--gfx/footprints/forretress.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/furret.pngbin0 -> 108 bytes
-rw-r--r--gfx/footprints/gastly.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/gengar.pngbin0 -> 118 bytes
-rw-r--r--gfx/footprints/geodude.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/girafarig.pngbin0 -> 108 bytes
-rw-r--r--gfx/footprints/gligar.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/gloom.pngbin0 -> 116 bytes
-rw-r--r--gfx/footprints/golbat.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/goldeen.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/golduck.pngbin0 -> 125 bytes
-rw-r--r--gfx/footprints/golem.pngbin0 -> 126 bytes
-rw-r--r--gfx/footprints/granbull.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/graveler.pngbin0 -> 119 bytes
-rw-r--r--gfx/footprints/grimer.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/growlithe.pngbin0 -> 116 bytes
-rw-r--r--gfx/footprints/gyarados.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/haunter.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/heracross.pngbin0 -> 118 bytes
-rw-r--r--gfx/footprints/hitmonchan.pngbin0 -> 118 bytes
-rw-r--r--gfx/footprints/hitmonlee.pngbin0 -> 133 bytes
-rw-r--r--gfx/footprints/hitmontop.pngbin0 -> 131 bytes
-rw-r--r--gfx/footprints/ho_oh.pngbin0 -> 122 bytes
-rw-r--r--gfx/footprints/hoothoot.pngbin0 -> 127 bytes
-rw-r--r--gfx/footprints/hoppip.pngbin0 -> 108 bytes
-rw-r--r--gfx/footprints/horsea.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/houndoom.pngbin0 -> 130 bytes
-rw-r--r--gfx/footprints/houndour.pngbin0 -> 119 bytes
-rw-r--r--gfx/footprints/hypno.pngbin0 -> 123 bytes
-rw-r--r--gfx/footprints/igglybuff.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/ivysaur.pngbin0 -> 124 bytes
-rw-r--r--gfx/footprints/jigglypuff.pngbin0 -> 113 bytes
-rw-r--r--gfx/footprints/jolteon.pngbin0 -> 119 bytes
-rw-r--r--gfx/footprints/jumpluff.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/jynx.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/kabuto.pngbin0 -> 104 bytes
-rw-r--r--gfx/footprints/kabutops.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/kadabra.pngbin0 -> 129 bytes
-rw-r--r--gfx/footprints/kakuna.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/kangaskhan.pngbin0 -> 123 bytes
-rw-r--r--gfx/footprints/kingdra.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/kingler.pngbin0 -> 118 bytes
-rw-r--r--gfx/footprints/koffing.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/krabby.pngbin0 -> 113 bytes
-rw-r--r--gfx/footprints/lanturn.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/lapras.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/larvitar.pngbin0 -> 107 bytes
-rw-r--r--gfx/footprints/ledian.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/ledyba.pngbin0 -> 124 bytes
-rw-r--r--gfx/footprints/lickitung.pngbin0 -> 129 bytes
-rw-r--r--gfx/footprints/lugia.pngbin0 -> 123 bytes
-rw-r--r--gfx/footprints/machamp.pngbin0 -> 127 bytes
-rw-r--r--gfx/footprints/machoke.pngbin0 -> 124 bytes
-rw-r--r--gfx/footprints/machop.pngbin0 -> 118 bytes
-rw-r--r--gfx/footprints/magby.pngbin0 -> 115 bytes
-rw-r--r--gfx/footprints/magcargo.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/magikarp.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/magmar.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/magnemite.pngbin0 -> 110 bytes
-rw-r--r--gfx/footprints/magneton.pngbin0 -> 116 bytes
-rw-r--r--gfx/footprints/mankey.pngbin0 -> 137 bytes
-rw-r--r--gfx/footprints/mantine.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/mareep.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/marill.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/marowak.pngbin0 -> 114 bytes
-rw-r--r--gfx/footprints/meganium.pngbin0 -> 123 bytes
-rw-r--r--gfx/footprints/meowth.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/metapod.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/mew.pngbin0 -> 115 bytes
-rw-r--r--gfx/footprints/mewtwo.pngbin0 -> 129 bytes
-rw-r--r--gfx/footprints/miltank.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/misdreavus.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/moltres.pngbin0 -> 128 bytes
-rw-r--r--gfx/footprints/mr__mime.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/muk.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/murkrow.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/natu.pngbin0 -> 111 bytes
-rw-r--r--gfx/footprints/nidoking.pngbin0 -> 123 bytes
-rw-r--r--gfx/footprints/nidoqueen.pngbin0 -> 126 bytes
-rw-r--r--gfx/footprints/nidoran_f.pngbin0 -> 114 bytes
-rw-r--r--gfx/footprints/nidoran_m.pngbin0 -> 116 bytes
-rw-r--r--gfx/footprints/nidorina.pngbin0 -> 122 bytes
-rw-r--r--gfx/footprints/nidorino.pngbin0 -> 126 bytes
-rw-r--r--gfx/footprints/ninetales.pngbin0 -> 122 bytes
-rw-r--r--gfx/footprints/noctowl.pngbin0 -> 125 bytes
-rw-r--r--gfx/footprints/octillery.pngbin0 -> 126 bytes
-rw-r--r--gfx/footprints/oddish.pngbin0 -> 109 bytes
-rw-r--r--gfx/footprints/omanyte.pngbin0 -> 107 bytes
-rw-r--r--gfx/footprints/omastar.pngbin0 -> 111 bytes
-rw-r--r--gfx/footprints/onix.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/paras.pngbin0 -> 111 bytes
-rw-r--r--gfx/footprints/parasect.pngbin0 -> 111 bytes
-rw-r--r--gfx/footprints/persian.pngbin0 -> 126 bytes
-rw-r--r--gfx/footprints/phanpy.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/pichu.pngbin0 -> 111 bytes
-rw-r--r--gfx/footprints/pidgeot.pngbin0 -> 127 bytes
-rw-r--r--gfx/footprints/pidgeotto.pngbin0 -> 120 bytes
-rw-r--r--gfx/footprints/pidgey.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/pikachu.pngbin0 -> 111 bytes
-rw-r--r--gfx/footprints/piloswine.pngbin0 -> 122 bytes
-rw-r--r--gfx/footprints/pineco.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/pinsir.pngbin0 -> 118 bytes
-rw-r--r--gfx/footprints/politoed.pngbin0 -> 124 bytes
-rw-r--r--gfx/footprints/poliwag.pngbin0 -> 113 bytes
-rw-r--r--gfx/footprints/poliwhirl.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/poliwrath.pngbin0 -> 119 bytes
-rw-r--r--gfx/footprints/ponyta.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/porygon.pngbin0 -> 115 bytes
-rw-r--r--gfx/footprints/porygon2.pngbin0 -> 115 bytes
-rw-r--r--gfx/footprints/primeape.pngbin0 -> 127 bytes
-rw-r--r--gfx/footprints/psyduck.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/pupitar.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/quagsire.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/quilava.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/qwilfish.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/raichu.pngbin0 -> 115 bytes
-rw-r--r--gfx/footprints/raikou.pngbin0 -> 122 bytes
-rw-r--r--gfx/footprints/rapidash.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/raticate.pngbin0 -> 122 bytes
-rw-r--r--gfx/footprints/rattata.pngbin0 -> 113 bytes
-rw-r--r--gfx/footprints/remoraid.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/rhydon.pngbin0 -> 126 bytes
-rw-r--r--gfx/footprints/rhyhorn.pngbin0 -> 113 bytes
-rw-r--r--gfx/footprints/sandshrew.pngbin0 -> 118 bytes
-rw-r--r--gfx/footprints/sandslash.pngbin0 -> 118 bytes
-rw-r--r--gfx/footprints/scizor.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/scyther.pngbin0 -> 126 bytes
-rw-r--r--gfx/footprints/seadra.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/seaking.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/seel.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/sentret.pngbin0 -> 108 bytes
-rw-r--r--gfx/footprints/shellder.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/shuckle.pngbin0 -> 113 bytes
-rw-r--r--gfx/footprints/skarmory.pngbin0 -> 128 bytes
-rw-r--r--gfx/footprints/skiploom.pngbin0 -> 114 bytes
-rw-r--r--gfx/footprints/slowbro.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/slowking.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/slowpoke.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/slugma.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/smeargle.pngbin0 -> 122 bytes
-rw-r--r--gfx/footprints/smoochum.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/sneasel.pngbin0 -> 120 bytes
-rw-r--r--gfx/footprints/snorlax.pngbin0 -> 128 bytes
-rw-r--r--gfx/footprints/snubbull.pngbin0 -> 115 bytes
-rw-r--r--gfx/footprints/spearow.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/spinarak.pngbin0 -> 104 bytes
-rw-r--r--gfx/footprints/squirtle.pngbin0 -> 115 bytes
-rw-r--r--gfx/footprints/stantler.pngbin0 -> 122 bytes
-rw-r--r--gfx/footprints/starmie.pngbin0 -> 108 bytes
-rw-r--r--gfx/footprints/staryu.pngbin0 -> 108 bytes
-rw-r--r--gfx/footprints/steelix.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/sudowoodo.pngbin0 -> 114 bytes
-rw-r--r--gfx/footprints/suicune.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/sunflora.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/sunkern.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/swinub.pngbin0 -> 111 bytes
-rw-r--r--gfx/footprints/tangela.pngbin0 -> 123 bytes
-rw-r--r--gfx/footprints/tauros.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/teddiursa.pngbin0 -> 118 bytes
-rw-r--r--gfx/footprints/tentacool.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/tentacruel.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/togepi.pngbin0 -> 112 bytes
-rw-r--r--gfx/footprints/togetic.pngbin0 -> 116 bytes
-rw-r--r--gfx/footprints/totodile.pngbin0 -> 115 bytes
-rw-r--r--gfx/footprints/typhlosion.pngbin0 -> 115 bytes
-rw-r--r--gfx/footprints/tyranitar.pngbin0 -> 122 bytes
-rw-r--r--gfx/footprints/tyrogue.pngbin0 -> 109 bytes
-rw-r--r--gfx/footprints/umbreon.pngbin0 -> 109 bytes
-rw-r--r--gfx/footprints/unown.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/ursaring.pngbin0 -> 125 bytes
-rw-r--r--gfx/footprints/vaporeon.pngbin0 -> 122 bytes
-rw-r--r--gfx/footprints/venomoth.pngbin0 -> 104 bytes
-rw-r--r--gfx/footprints/venonat.pngbin0 -> 115 bytes
-rw-r--r--gfx/footprints/venusaur.pngbin0 -> 123 bytes
-rw-r--r--gfx/footprints/victreebel.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/vileplume.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/voltorb.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/vulpix.pngbin0 -> 122 bytes
-rw-r--r--gfx/footprints/wartortle.pngbin0 -> 121 bytes
-rw-r--r--gfx/footprints/weedle.pngbin0 -> 108 bytes
-rw-r--r--gfx/footprints/weepinbell.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/weezing.pngbin0 -> 99 bytes
-rw-r--r--gfx/footprints/wigglytuff.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/wobbuffet.pngbin0 -> 109 bytes
-rw-r--r--gfx/footprints/wooper.pngbin0 -> 122 bytes
-rw-r--r--gfx/footprints/xatu.pngbin0 -> 117 bytes
-rw-r--r--gfx/footprints/yanma.pngbin0 -> 109 bytes
-rw-r--r--gfx/footprints/zapdos.pngbin0 -> 132 bytes
-rw-r--r--gfx/footprints/zubat.pngbin0 -> 99 bytes
-rw-r--r--gfx/icon_pointers.asm41
-rw-r--r--gfx/icons.asm40
-rwxr-xr-xgfx/load_pics.asm18
-rwxr-xr-xgfx/mail.asm6
-rw-r--r--gfx/misc/footprints.pngbin3012 -> 0 bytes
-rw-r--r--gfx/mobile/ascii_font.png (renamed from gfx/unknown/171db1.png)bin762 -> 762 bytes
-rw-r--r--gfx/mobile/down_arrow.png (renamed from gfx/unknown/0488cb.png)bin77 -> 77 bytes
-rw-r--r--gfx/mobile/electro_ball.2bpp.lz.3eaf004f (renamed from gfx/unknown/1715a4.2bpp.lz.3eaf004f)bin676 -> 676 bytes
-rw-r--r--gfx/mobile/electro_ball.png (renamed from gfx/unknown/1715a4.png)bin692 -> 692 bytes
-rwxr-xr-xgfx/mobile/electro_ball_nonmatching.png (renamed from gfx/unknown/1715a4_nonmatching.png)bin1422 -> 1422 bytes
-rw-r--r--gfx/mobile/mobile_adapter.png (renamed from gfx/misc/mobile_adapter.png)bin1633 -> 1633 bytes
-rw-r--r--gfx/mobile/mobile_splash.attrmap (renamed from gfx/unknown/16c79b.tilemap)bin360 -> 360 bytes
-rwxr-xr-xgfx/mobile/mobile_splash.png (renamed from gfx/unknown/16c173.png)bin1681 -> 1681 bytes
-rw-r--r--gfx/mobile/mobile_splash.tilemap (renamed from gfx/unknown/16c633.tilemap)bin360 -> 360 bytes
-rw-r--r--gfx/mobile/pichu_animated.2bpp.lz.5d6d2ad4 (renamed from gfx/unknown/170d16.2bpp.lz.5d6d2ad4)bin2190 -> 2190 bytes
-rw-r--r--gfx/mobile/pichu_animated.png (renamed from gfx/unknown/170d16.png)bin1939 -> 1939 bytes
-rw-r--r--gfx/mobile/up_arrow.png (renamed from gfx/unknown/0488c3.png)bin77 -> 77 bytes
-rw-r--r--gfx/mystery_gift/mystery_gift.png (renamed from gfx/misc/mystery_gift.png)bin747 -> 747 bytes
-rw-r--r--gfx/mystery_gift/mystery_gift_jp.png (renamed from gfx/misc/mystery_gift_jp.png)bin686 -> 686 bytes
-rw-r--r--gfx/namingscreen/border.png (renamed from gfx/unknown/011cb7.png)bin82 -> 82 bytes
-rw-r--r--gfx/namingscreen/cursor.png (renamed from gfx/unknown/011cc7.png)bin78 -> 78 bytes
-rw-r--r--gfx/namingscreen/end.png (renamed from gfx/unknown/011e5d.png)bin82 -> 82 bytes
-rw-r--r--gfx/namingscreen/middle_line.png (renamed from gfx/unknown/011e65.png)bin76 -> 76 bytes
-rw-r--r--gfx/namingscreen/underline.png (renamed from gfx/unknown/011e6d.png)bin74 -> 74 bytes
-rw-r--r--gfx/overworld/boulder_dust.png (renamed from gfx/misc/boulderdust.png)bin106 -> 106 bytes
-rw-r--r--gfx/overworld/celebi/1.png (renamed from gfx/special/celebi/1.png)bin148 -> 148 bytes
-rw-r--r--gfx/overworld/celebi/2.png (renamed from gfx/special/celebi/2.png)bin148 -> 148 bytes
-rw-r--r--gfx/overworld/celebi/3.png (renamed from gfx/special/celebi/3.png)bin148 -> 148 bytes
-rw-r--r--gfx/overworld/celebi/4.png (renamed from gfx/special/celebi/4.png)bin148 -> 148 bytes
-rw-r--r--gfx/overworld/cut_grass.png (renamed from gfx/misc/cut_grass.png)bin134 -> 134 bytes
-rw-r--r--gfx/overworld/cut_tree.png (renamed from gfx/misc/cut_tree.png)bin140 -> 140 bytes
-rw-r--r--gfx/overworld/fishing_rod.png (renamed from gfx/misc/fishing2.png)bin103 -> 103 bytes
-rw-r--r--gfx/overworld/grass_rustle.png (renamed from gfx/misc/fishing4.png)bin88 -> 88 bytes
-rw-r--r--gfx/overworld/heal_machine.png (renamed from gfx/unknown/0123fc.png)bin93 -> 93 bytes
-rw-r--r--gfx/overworld/shadow.png (renamed from gfx/misc/shadow.png)bin84 -> 84 bytes
-rw-r--r--gfx/overworld/sprite_headers.asm419
-rw-r--r--gfx/overworld/sprites_1.asm44
-rw-r--r--gfx/overworld/sprites_2.asm58
-rw-r--r--gfx/overworld_font.asm17
-rw-r--r--gfx/pack/pack.png (renamed from gfx/misc/pack.png)bin282 -> 282 bytes
-rw-r--r--gfx/pack/pack_f.png (renamed from gfx/misc/pack_f.png)bin356 -> 356 bytes
-rw-r--r--gfx/pack/pack_menu.png (renamed from gfx/misc/pack_menu.png)bin360 -> 360 bytes
-rw-r--r--gfx/pc/pc.2bpp.lz.2201c1aa (renamed from gfx/pc.2bpp.lz.2201c1aa)bin132 -> 132 bytes
-rw-r--r--gfx/pc/pc.png (renamed from gfx/pc.png)bin115 -> 115 bytes
-rw-r--r--gfx/pc/pc_mail.png (renamed from gfx/pc_mail.png)bin114 -> 114 bytes
-rw-r--r--gfx/pics.asm12
-rw-r--r--gfx/pics/animation.asm36
-rw-r--r--gfx/pics/pic_pointers.asm1005
-rw-r--r--gfx/pics/trainer_pic_pointers.asm68
-rw-r--r--gfx/pics/unown_pic_pointers.asm107
-rw-r--r--gfx/player/chris.png (renamed from gfx/misc/chris.png)bin417 -> 417 bytes
-rw-r--r--gfx/player/chris_back.2bpp.lz.0312ddce (renamed from gfx/misc/player.2bpp.lz.0312ddce)bin400 -> 400 bytes
-rw-r--r--gfx/player/chris_back.png (renamed from gfx/misc/player.png)bin458 -> 458 bytes
-rw-r--r--gfx/player/kris.png (renamed from gfx/misc/kris.png)bin418 -> 418 bytes
-rw-r--r--gfx/player/kris_back.png (renamed from gfx/misc/kris_back.png)bin484 -> 484 bytes
-rw-r--r--gfx/pokegear/fast_ship.png (renamed from gfx/misc/fast_ship.png)bin154 -> 154 bytes
-rw-r--r--gfx/pokegear/johto.bin (renamed from gfx/misc/johto.bin)bin361 -> 361 bytes
-rw-r--r--gfx/pokegear/kanto.bin (renamed from gfx/misc/kanto.bin)bin361 -> 361 bytes
-rw-r--r--gfx/pokegear/pokegear.2bpp.lz.42315ab4 (renamed from gfx/misc/pokegear.2bpp.lz.42315ab4)bin740 -> 740 bytes
-rw-r--r--gfx/pokegear/pokegear.png (renamed from gfx/misc/pokegear.png)bin388 -> 388 bytes
-rw-r--r--gfx/pokegear/pokegear_sprites.2bpp.lz.7a3cc91f (renamed from gfx/misc/pokegear_sprites.2bpp.lz.7a3cc91f)bin48 -> 48 bytes
-rw-r--r--gfx/pokegear/pokegear_sprites.png (renamed from gfx/misc/pokegear_sprites.png)bin133 -> 133 bytes
-rw-r--r--gfx/pokegear/town_map.2bpp.lz.c0587c86 (renamed from gfx/misc/town_map.2bpp.lz.c0587c86)bin772 -> 772 bytes
-rw-r--r--gfx/pokegear/town_map.png (renamed from gfx/misc/town_map.png)bin464 -> 464 bytes
-rw-r--r--gfx/printer/bold_a.png (renamed from gfx/unknown/016d9c.png)bin85 -> 85 bytes
-rw-r--r--gfx/printer/bold_b.png (renamed from gfx/unknown/016da4.png)bin77 -> 77 bytes
-rw-r--r--gfx/printer/hp.png (renamed from gfx/mobile/hp.png)bin84 -> 84 bytes
-rw-r--r--gfx/printer/lv.png (renamed from gfx/mobile/lv.png)bin79 -> 79 bytes
-rw-r--r--gfx/sgb/gbc_only.2bpp.lz.4a5bba0e (renamed from gfx/misc/gbc_only.2bpp.lz.4a5bba0e)bin1350 -> 1350 bytes
-rw-r--r--gfx/sgb/gbc_only.png (renamed from gfx/misc/gbc_only.png)bin896 -> 896 bytes
-rw-r--r--gfx/sgb/sgb_border.png (renamed from gfx/misc/sgb_border.png)bin632 -> 632 bytes
-rw-r--r--gfx/shrink/shrink1.2bpp.lz.d4443930 (renamed from gfx/shrink1.2bpp.lz.d4443930)bin144 -> 144 bytes
-rw-r--r--gfx/shrink/shrink1.png (renamed from gfx/shrink1.png)bin188 -> 188 bytes
-rw-r--r--gfx/shrink/shrink2.2bpp.lz.3f58480a (renamed from gfx/shrink2.2bpp.lz.3f58480a)bin64 -> 64 bytes
-rw-r--r--gfx/shrink/shrink2.png (renamed from gfx/shrink2.png)bin156 -> 156 bytes
-rw-r--r--gfx/slots/slots.tilemap (renamed from gfx/slots.tilemap)bin240 -> 240 bytes
-rw-r--r--gfx/slots/slots_1.2bpp.lz.b22ddc13 (renamed from gfx/slots_1.2bpp.lz.b22ddc13)bin384 -> 384 bytes
-rw-r--r--gfx/slots/slots_1.png (renamed from gfx/slots_1.png)bin446 -> 446 bytes
-rw-r--r--gfx/slots/slots_2.2bpp.lz.b28f76e3 (renamed from gfx/slots_2.2bpp.lz.b28f76e3)bin608 -> 608 bytes
-rw-r--r--gfx/slots/slots_2.png (renamed from gfx/slots_2.png)bin664 -> 664 bytes
-rw-r--r--gfx/slots/slots_3.2bpp.lz.70c2984c (renamed from gfx/slots_3.2bpp.lz.70c2984c)bin528 -> 528 bytes
-rw-r--r--[-rwxr-xr-x]gfx/slots/slots_3.png (renamed from gfx/slots_3.png)bin1916 -> 1916 bytes
-rw-r--r--gfx/special/celebi/leaf.pngbin134 -> 0 bytes
-rw-r--r--gfx/splash/copyright.png (renamed from gfx/misc/copyright.png)bin262 -> 262 bytes
-rw-r--r--gfx/sprite_headers.asm111
-rw-r--r--gfx/sprites.asm108
-rw-r--r--gfx/sprites/big_lapras.png (renamed from gfx/overworld/070.png)bin193 -> 193 bytes
-rw-r--r--gfx/sprites/big_onix.png (renamed from gfx/overworld/079.png)bin262 -> 262 bytes
-rw-r--r--gfx/sprites/big_snorlax.png (renamed from gfx/overworld/050.png)bin183 -> 183 bytes
-rw-r--r--gfx/sprites/biker.png (renamed from gfx/overworld/073.png)bin346 -> 346 bytes
-rw-r--r--gfx/sprites/bill.png (renamed from gfx/overworld/007.png)bin307 -> 307 bytes
-rw-r--r--gfx/sprites/bird.png (renamed from gfx/overworld/077.png)bin354 -> 354 bytes
-rw-r--r--gfx/sprites/black_belt.png (renamed from gfx/overworld/064.png)bin279 -> 279 bytes
-rw-r--r--gfx/sprites/blaine.png (renamed from gfx/overworld/012.png)bin304 -> 304 bytes
-rw-r--r--gfx/sprites/blue.png (renamed from gfx/overworld/006.png)bin321 -> 321 bytes
-rw-r--r--gfx/sprites/boulder.png (renamed from gfx/overworld/089.png)bin143 -> 143 bytes
-rw-r--r--gfx/sprites/brock.png (renamed from gfx/overworld/025.png)bin276 -> 276 bytes
-rw-r--r--gfx/sprites/bruno.png (renamed from gfx/overworld/027.png)bin286 -> 286 bytes
-rw-r--r--gfx/sprites/buena.png (renamed from gfx/overworld/041.png)bin263 -> 263 bytes
-rw-r--r--gfx/sprites/bug_catcher.png (renamed from gfx/overworld/036.png)bin237 -> 237 bytes
-rw-r--r--gfx/sprites/bugsy.png (renamed from gfx/overworld/019.png)bin277 -> 277 bytes
-rw-r--r--gfx/sprites/cal.png (renamed from gfx/overworld/067.png)bin305 -> 305 bytes
-rw-r--r--gfx/sprites/captain.png (renamed from gfx/overworld/069.png)bin227 -> 227 bytes
-rw-r--r--gfx/sprites/chris.png (renamed from gfx/overworld/000.png)bin300 -> 300 bytes
-rw-r--r--gfx/sprites/chris_bike.png (renamed from gfx/overworld/001.png)bin373 -> 373 bytes
-rw-r--r--gfx/sprites/chuck.png (renamed from gfx/overworld/021.png)bin276 -> 276 bytes
-rw-r--r--gfx/sprites/clair.png (renamed from gfx/overworld/024.png)bin350 -> 350 bytes
-rw-r--r--gfx/sprites/clerk.png (renamed from gfx/overworld/056.png)bin292 -> 292 bytes
-rw-r--r--gfx/sprites/cooltrainer_f.png (renamed from gfx/overworld/035.png)bin349 -> 349 bytes
-rw-r--r--gfx/sprites/cooltrainer_m.png (renamed from gfx/overworld/034.png)bin286 -> 286 bytes
-rw-r--r--gfx/sprites/daisy.png (renamed from gfx/overworld/014.png)bin277 -> 277 bytes
-rw-r--r--gfx/sprites/dragon.png (renamed from gfx/overworld/078.png)bin327 -> 327 bytes
-rw-r--r--gfx/sprites/elder.png (renamed from gfx/overworld/008.png)bin319 -> 319 bytes
-rw-r--r--gfx/sprites/elm.png (renamed from gfx/overworld/015.png)bin314 -> 314 bytes
-rw-r--r--gfx/sprites/entei.png (renamed from gfx/overworld/099.png)bin144 -> 144 bytes
-rw-r--r--gfx/sprites/erika.png (renamed from gfx/overworld/031.png)bin233 -> 233 bytes
-rw-r--r--gfx/sprites/fairy.png (renamed from gfx/overworld/076.png)bin317 -> 317 bytes
-rw-r--r--gfx/sprites/falkner.png (renamed from gfx/overworld/017.png)bin303 -> 303 bytes
-rw-r--r--gfx/sprites/famicom.png (renamed from gfx/overworld/091.png)bin110 -> 110 bytes
-rw-r--r--gfx/sprites/fisher.png (renamed from gfx/overworld/057.png)bin308 -> 308 bytes
-rw-r--r--gfx/sprites/fishing_guru.png (renamed from gfx/overworld/058.png)bin269 -> 269 bytes
-rw-r--r--gfx/sprites/fruit_tree.png (renamed from gfx/overworld/092.png)bin148 -> 148 bytes
-rw-r--r--gfx/sprites/gameboy_kid.png (renamed from gfx/overworld/002.png)bin209 -> 209 bytes
-rw-r--r--gfx/sprites/gentleman.png (renamed from gfx/overworld/063.png)bin264 -> 264 bytes
-rw-r--r--gfx/sprites/gold_trophy.png (renamed from gfx/overworld/093.png)bin121 -> 121 bytes
-rw-r--r--gfx/sprites/gramps.png (renamed from gfx/overworld/046.png)bin338 -> 338 bytes
-rw-r--r--gfx/sprites/granny.png (renamed from gfx/overworld/047.png)bin360 -> 360 bytes
-rw-r--r--gfx/sprites/gym_guy.png (renamed from gfx/overworld/071.png)bin295 -> 295 bytes
-rw-r--r--gfx/sprites/janine.png (renamed from gfx/overworld/009.png)bin259 -> 259 bytes
-rw-r--r--gfx/sprites/jasmine.png (renamed from gfx/overworld/022.png)bin293 -> 293 bytes
-rw-r--r--gfx/sprites/karen.png (renamed from gfx/overworld/026.png)bin207 -> 207 bytes
-rw-r--r--gfx/sprites/kimono_girl.png (renamed from gfx/overworld/060.png)bin305 -> 305 bytes
-rw-r--r--gfx/sprites/koga.png (renamed from gfx/overworld/032.png)bin253 -> 253 bytes
-rw-r--r--gfx/sprites/kris.png (renamed from gfx/overworld/095.png)bin308 -> 308 bytes
-rw-r--r--gfx/sprites/kris_bike.png (renamed from gfx/overworld/096.png)bin414 -> 414 bytes
-rw-r--r--gfx/sprites/kurt.png (renamed from gfx/overworld/010.png)bin309 -> 309 bytes
-rw-r--r--gfx/sprites/kurt_outside.png (renamed from gfx/overworld/097.png)bin224 -> 224 bytes
-rw-r--r--gfx/sprites/lance.png (renamed from gfx/overworld/029.png)bin287 -> 287 bytes
-rw-r--r--gfx/sprites/lass.png (renamed from gfx/overworld/039.png)bin305 -> 305 bytes
-rw-r--r--gfx/sprites/link_receptionist.png (renamed from gfx/overworld/055.png)bin266 -> 266 bytes
-rw-r--r--gfx/sprites/misty.png (renamed from gfx/overworld/028.png)bin274 -> 274 bytes
-rw-r--r--gfx/sprites/mom.png (renamed from gfx/overworld/011.png)bin253 -> 253 bytes
-rw-r--r--gfx/sprites/monster.png (renamed from gfx/overworld/075.png)bin350 -> 350 bytes
-rw-r--r--gfx/sprites/morty.png (renamed from gfx/overworld/020.png)bin282 -> 282 bytes
-rw-r--r--gfx/sprites/n64.png (renamed from gfx/overworld/080.png)bin142 -> 142 bytes
-rw-r--r--gfx/sprites/nurse.png (renamed from gfx/overworld/054.png)bin210 -> 210 bytes
-rw-r--r--gfx/sprites/oak.png (renamed from gfx/overworld/004.png)bin305 -> 305 bytes
-rw-r--r--gfx/sprites/officer.png (renamed from gfx/overworld/066.png)bin285 -> 285 bytes
-rw-r--r--gfx/sprites/old_link_receptionist.png (renamed from gfx/overworld/087.png)bin141 -> 141 bytes
-rw-r--r--gfx/sprites/paper.png (renamed from gfx/overworld/085.png)bin111 -> 111 bytes
-rw-r--r--gfx/sprites/pharmacist.png (renamed from gfx/overworld/074.png)bin292 -> 292 bytes
-rw-r--r--gfx/sprites/poke_ball.png (renamed from gfx/overworld/083.png)bin119 -> 119 bytes
-rw-r--r--gfx/sprites/pokedex.png (renamed from gfx/overworld/084.png)bin121 -> 121 bytes
-rw-r--r--gfx/sprites/pokefan_f.png (renamed from gfx/overworld/045.png)bin264 -> 264 bytes
-rw-r--r--gfx/sprites/pokefan_m.png (renamed from gfx/overworld/044.png)bin289 -> 289 bytes
-rw-r--r--gfx/sprites/pryce.png (renamed from gfx/overworld/023.png)bin298 -> 298 bytes
-rw-r--r--gfx/sprites/raikou.png (renamed from gfx/overworld/100.png)bin145 -> 145 bytes
-rw-r--r--gfx/sprites/receptionist.png (renamed from gfx/overworld/065.png)bin237 -> 237 bytes
-rw-r--r--gfx/sprites/red.png (renamed from gfx/overworld/005.png)bin294 -> 294 bytes
-rw-r--r--gfx/sprites/reds_mom.png (renamed from gfx/overworld/013.png)bin281 -> 281 bytes
-rw-r--r--gfx/sprites/rock.png (renamed from gfx/overworld/088.png)bin146 -> 146 bytes
-rw-r--r--gfx/sprites/rocker.png (renamed from gfx/overworld/043.png)bin296 -> 296 bytes
-rw-r--r--gfx/sprites/rocket.png (renamed from gfx/overworld/052.png)bin247 -> 247 bytes
-rw-r--r--gfx/sprites/rocket_girl.png (renamed from gfx/overworld/053.png)bin253 -> 253 bytes
-rw-r--r--gfx/sprites/sabrina.png (renamed from gfx/overworld/033.png)bin260 -> 260 bytes
-rw-r--r--gfx/sprites/sage.png (renamed from gfx/overworld/061.png)bin305 -> 305 bytes
-rw-r--r--gfx/sprites/sailor.png (renamed from gfx/overworld/072.png)bin307 -> 307 bytes
-rw-r--r--gfx/sprites/scientist.png (renamed from gfx/overworld/059.png)bin283 -> 283 bytes
-rw-r--r--gfx/sprites/silver.png (renamed from gfx/overworld/003.png)bin300 -> 300 bytes
-rw-r--r--gfx/sprites/silver_trophy.png (renamed from gfx/overworld/094.png)bin120 -> 120 bytes
-rw-r--r--gfx/sprites/slowpoke.png (renamed from gfx/overworld/068.png)bin139 -> 139 bytes
-rw-r--r--gfx/sprites/snes.png (renamed from gfx/overworld/090.png)bin109 -> 109 bytes
-rw-r--r--gfx/sprites/standing_youngster.png (renamed from gfx/overworld/101.png)bin214 -> 214 bytes
-rw-r--r--gfx/sprites/sudowoodo.png (renamed from gfx/overworld/081.png)bin180 -> 180 bytes
-rw-r--r--gfx/sprites/suicune.png (renamed from gfx/overworld/098.png)bin140 -> 140 bytes
-rw-r--r--gfx/sprites/super_nerd.png (renamed from gfx/overworld/042.png)bin293 -> 293 bytes
-rw-r--r--gfx/sprites/surf.png (renamed from gfx/overworld/082.png)bin355 -> 355 bytes
-rw-r--r--gfx/sprites/surfing_pikachu.png (renamed from gfx/overworld/051.png)bin443 -> 443 bytes
-rw-r--r--gfx/sprites/surge.png (renamed from gfx/overworld/030.png)bin277 -> 277 bytes
-rw-r--r--gfx/sprites/swimmer_girl.png (renamed from gfx/overworld/049.png)bin328 -> 328 bytes
-rw-r--r--gfx/sprites/swimmer_guy.png (renamed from gfx/overworld/048.png)bin303 -> 303 bytes
-rw-r--r--gfx/sprites/teacher.png (renamed from gfx/overworld/040.png)bin283 -> 283 bytes
-rw-r--r--gfx/sprites/twin.png (renamed from gfx/overworld/037.png)bin254 -> 254 bytes
-rw-r--r--gfx/sprites/unused_guy.png (renamed from gfx/overworld/062.png)bin250 -> 250 bytes
-rw-r--r--gfx/sprites/virtual_boy.png (renamed from gfx/overworld/086.png)bin127 -> 127 bytes
-rw-r--r--gfx/sprites/whitney.png (renamed from gfx/overworld/018.png)bin298 -> 298 bytes
-rw-r--r--gfx/sprites/will.png (renamed from gfx/overworld/016.png)bin216 -> 216 bytes
-rw-r--r--gfx/sprites/youngster.png (renamed from gfx/overworld/038.png)bin281 -> 281 bytes
-rw-r--r--gfx/stats/exp_bar_ends.png (renamed from gfx/unknown/0f8aa0.png)bin76 -> 76 bytes
-rw-r--r--gfx/stats/stats_tiles.png (renamed from gfx/unknown/0f89b0.png)bin195 -> 195 bytes
-rw-r--r--gfx/tilesets/01.2bpp.lz.0c7e555abin3080 -> 0 bytes
-rw-r--r--gfx/tilesets/01.pngbin2084 -> 0 bytes
-rw-r--r--gfx/tilesets/aerodactyl_word_room.2bpp.lz.8b42470b (renamed from gfx/tilesets/26.2bpp.lz.8b42470b)bin3080 -> 3080 bytes
-rw-r--r--gfx/tilesets/aerodactyl_word_room.png (renamed from gfx/tilesets/26.png)bin1909 -> 1909 bytes
-rw-r--r--gfx/tilesets/battle_tower.2bpp.lz.467b6a2d (renamed from gfx/tilesets/22.2bpp.lz.467b6a2d)bin832 -> 832 bytes
-rw-r--r--gfx/tilesets/battle_tower.png (renamed from gfx/tilesets/22.png)bin993 -> 993 bytes
-rw-r--r--gfx/tilesets/battle_tower_outside.2bpp.lz.391603fb (renamed from gfx/tilesets/02.2bpp.lz.391603fb)bin3080 -> 3080 bytes
-rw-r--r--gfx/tilesets/battle_tower_outside.png (renamed from gfx/tilesets/02.png)bin2341 -> 2341 bytes
-rw-r--r--gfx/tilesets/beta_word_room.2bpp.lz.8b42470b (renamed from gfx/tilesets/32.2bpp.lz.8b42470b)bin3080 -> 3080 bytes
-rw-r--r--gfx/tilesets/beta_word_room.png (renamed from gfx/tilesets/32.png)bin1909 -> 1909 bytes
-rw-r--r--gfx/tilesets/cave.2bpp.lz.3437812a (renamed from gfx/tilesets/24.2bpp.lz.3437812a)bin912 -> 912 bytes
-rw-r--r--gfx/tilesets/cave.png (renamed from gfx/tilesets/24.png)bin1044 -> 1044 bytes
-rw-r--r--gfx/tilesets/celadon_mansion.2bpp.lz.63b414d4 (renamed from gfx/tilesets/13.2bpp.lz.63b414d4)bin1888 -> 1888 bytes
-rw-r--r--gfx/tilesets/celadon_mansion.png (renamed from gfx/tilesets/13.png)bin2047 -> 2047 bytes
-rw-r--r--gfx/tilesets/game_corner.2bpp.lz.71d29a2f (renamed from gfx/tilesets/14.2bpp.lz.71d29a2f)bin1472 -> 1472 bytes
-rw-r--r--gfx/tilesets/game_corner.png (renamed from gfx/tilesets/14.png)bin1583 -> 1583 bytes
-rw-r--r--gfx/tilesets/gate.2bpp.lz.f5a55006 (renamed from gfx/tilesets/08.2bpp.lz.f5a55006)bin1024 -> 1024 bytes
-rw-r--r--gfx/tilesets/gate.png (renamed from gfx/tilesets/08.png)bin1146 -> 1146 bytes
-rw-r--r--gfx/tilesets/gym_1.2bpp.lz.c1f2ed8f (renamed from gfx/tilesets/15.2bpp.lz.c1f2ed8f)bin1248 -> 1248 bytes
-rw-r--r--gfx/tilesets/gym_1.png (renamed from gfx/tilesets/15.png)bin1282 -> 1282 bytes
-rw-r--r--gfx/tilesets/ho_oh_word_room.2bpp.lz.8b42470b (renamed from gfx/tilesets/33.2bpp.lz.8b42470b)bin3080 -> 3080 bytes
-rw-r--r--gfx/tilesets/ho_oh_word_room.png (renamed from gfx/tilesets/33.png)bin1909 -> 1909 bytes
-rw-r--r--gfx/tilesets/house_1.2bpp.lz.c848ef13 (renamed from gfx/tilesets/05.2bpp.lz.c848ef13)bin1200 -> 1200 bytes
-rw-r--r--gfx/tilesets/house_1.png (renamed from gfx/tilesets/05.png)bin1264 -> 1264 bytes
-rw-r--r--gfx/tilesets/ice_path.2bpp.lz.e23bc89f (renamed from gfx/tilesets/29.2bpp.lz.e23bc89f)bin2352 -> 2352 bytes
-rw-r--r--gfx/tilesets/ice_path.png (renamed from gfx/tilesets/29.png)bin2592 -> 2592 bytes
-rw-r--r--gfx/tilesets/ilex_forest.2bpp.lz.6b0ac896 (renamed from gfx/tilesets/31.2bpp.lz.6b0ac896)bin976 -> 976 bytes
-rw-r--r--gfx/tilesets/ilex_forest.png (renamed from gfx/tilesets/31.png)bin1264 -> 1264 bytes
-rw-r--r--gfx/tilesets/johto_1.2bpp.lz.0c7e555a (renamed from gfx/tilesets/00.2bpp.lz.0c7e555a)bin3080 -> 3080 bytes
-rw-r--r--gfx/tilesets/johto_1.png (renamed from gfx/tilesets/00.png)bin2084 -> 2084 bytes
-rw-r--r--gfx/tilesets/johto_2.2bpp.lz.391603fb (renamed from gfx/tilesets/04.2bpp.lz.391603fb)bin3080 -> 3080 bytes
-rw-r--r--gfx/tilesets/johto_2.png (renamed from gfx/tilesets/04.png)bin2341 -> 2341 bytes
-rw-r--r--gfx/tilesets/kabuto_word_room.2bpp.lz.8b42470b (renamed from gfx/tilesets/34.2bpp.lz.8b42470b)bin3080 -> 3080 bytes
-rw-r--r--gfx/tilesets/kabuto_word_room.png (renamed from gfx/tilesets/34.png)bin1909 -> 1909 bytes
-rw-r--r--gfx/tilesets/kanto.2bpp.lz.a29f5d51 (renamed from gfx/tilesets/03.2bpp.lz.a29f5d51)bin1542 -> 1542 bytes
-rw-r--r--gfx/tilesets/kanto.png (renamed from gfx/tilesets/03.png)bin1316 -> 1316 bytes
-rw-r--r--gfx/tilesets/kurts_house.2bpp.lz.dd51d079 (renamed from gfx/tilesets/16.2bpp.lz.dd51d079)bin1216 -> 1216 bytes
-rw-r--r--gfx/tilesets/kurts_house.png (renamed from gfx/tilesets/16.png)bin1203 -> 1203 bytes
-rw-r--r--gfx/tilesets/lab.2bpp.lz.b8d0f547 (renamed from gfx/tilesets/10.2bpp.lz.b8d0f547)bin2048 -> 2048 bytes
-rw-r--r--gfx/tilesets/lab.png (renamed from gfx/tilesets/10.png)bin2041 -> 2041 bytes
-rw-r--r--gfx/tilesets/lighthouse.2bpp.lz.0c1544c1 (renamed from gfx/tilesets/19.2bpp.lz.0c1544c1)bin1136 -> 1136 bytes
-rw-r--r--gfx/tilesets/lighthouse.png (renamed from gfx/tilesets/19.png)bin1226 -> 1226 bytes
-rw-r--r--gfx/tilesets/mart.2bpp.lz.e2e94f92 (renamed from gfx/tilesets/12.2bpp.lz.e2e94f92)bin1872 -> 1872 bytes
-rw-r--r--gfx/tilesets/mart.png (renamed from gfx/tilesets/12.png)bin1773 -> 1773 bytes
-rw-r--r--gfx/tilesets/olivine_gym.2bpp.lz.93800351 (renamed from gfx/tilesets/18.2bpp.lz.93800351)bin2176 -> 2176 bytes
-rw-r--r--gfx/tilesets/olivine_gym.png (renamed from gfx/tilesets/18.png)bin2284 -> 2284 bytes
-rw-r--r--gfx/tilesets/omanyte_word_room.2bpp.lz.8b42470b (renamed from gfx/tilesets/35.2bpp.lz.8b42470b)bin3080 -> 3080 bytes
-rw-r--r--gfx/tilesets/omanyte_word_room.png (renamed from gfx/tilesets/35.png)bin1909 -> 1909 bytes
-rw-r--r--gfx/tilesets/park.2bpp.lz.7fcb81d6 (renamed from gfx/tilesets/25.2bpp.lz.7fcb81d6)bin1184 -> 1184 bytes
-rw-r--r--gfx/tilesets/park.png (renamed from gfx/tilesets/25.png)bin1334 -> 1334 bytes
-rw-r--r--gfx/tilesets/players_house.2bpp.lz.252cbd8f (renamed from gfx/tilesets/06.2bpp.lz.252cbd8f)bin992 -> 992 bytes
-rw-r--r--gfx/tilesets/players_house.png (renamed from gfx/tilesets/06.png)bin1005 -> 1005 bytes
-rw-r--r--gfx/tilesets/players_house_2f.2bpp.lz.35e51007 (renamed from gfx/tilesets/20.2bpp.lz.35e51007)bin1216 -> 1216 bytes
-rw-r--r--gfx/tilesets/players_house_2f.png (renamed from gfx/tilesets/20.png)bin1250 -> 1250 bytes
-rw-r--r--gfx/tilesets/pokecenter.2bpp.lz.e1c4014c (renamed from gfx/tilesets/07.2bpp.lz.e1c4014c)bin1072 -> 1072 bytes
-rw-r--r--gfx/tilesets/pokecenter.png (renamed from gfx/tilesets/07.png)bin1195 -> 1195 bytes
-rw-r--r--gfx/tilesets/pokecom_center.2bpp.lz.febbc4ec (renamed from gfx/tilesets/21.2bpp.lz.febbc4ec)bin2208 -> 2208 bytes
-rw-r--r--gfx/tilesets/pokecom_center.png (renamed from gfx/tilesets/21.png)bin2498 -> 2498 bytes
-rw-r--r--gfx/tilesets/port.2bpp.lz.56b1a405 (renamed from gfx/tilesets/09.2bpp.lz.56b1a405)bin1040 -> 1040 bytes
-rw-r--r--gfx/tilesets/port.png (renamed from gfx/tilesets/09.png)bin1062 -> 1062 bytes
-rw-r--r--gfx/tilesets/power_plant.2bpp.lz.454cfd8b (renamed from gfx/tilesets/11.2bpp.lz.454cfd8b)bin1056 -> 1056 bytes
-rw-r--r--gfx/tilesets/power_plant.png (renamed from gfx/tilesets/11.png)bin1131 -> 1131 bytes
-rw-r--r--gfx/tilesets/radio_tower.2bpp.lz.27cdd9ad (renamed from gfx/tilesets/27.2bpp.lz.27cdd9ad)bin1376 -> 1376 bytes
-rw-r--r--gfx/tilesets/radio_tower.png (renamed from gfx/tilesets/27.png)bin1419 -> 1419 bytes
-rw-r--r--gfx/tilesets/ruins_of_alph.2bpp.lz.8b42470b (renamed from gfx/tilesets/36.2bpp.lz.8b42470b)bin3080 -> 3080 bytes
-rw-r--r--gfx/tilesets/ruins_of_alph.png (renamed from gfx/tilesets/36.png)bin1909 -> 1909 bytes
-rw-r--r--gfx/tilesets/sprout_tower.2bpp.lz.bc56789c (renamed from gfx/tilesets/23.2bpp.lz.bc56789c)bin1376 -> 1376 bytes
-rw-r--r--gfx/tilesets/sprout_tower.png (renamed from gfx/tilesets/23.png)bin1505 -> 1505 bytes
-rw-r--r--gfx/tilesets/train_station.2bpp.lz.1600ca86 (renamed from gfx/tilesets/17.2bpp.lz.1600ca86)bin928 -> 928 bytes
-rw-r--r--gfx/tilesets/train_station.png (renamed from gfx/tilesets/17.png)bin1156 -> 1156 bytes
-rw-r--r--gfx/tilesets/underground.2bpp.lz.cace291c (renamed from gfx/tilesets/28.2bpp.lz.cace291c)bin976 -> 976 bytes
-rw-r--r--gfx/tilesets/underground.png (renamed from gfx/tilesets/28.png)bin1143 -> 1143 bytes
-rw-r--r--gfx/tilesets/water/water.png (renamed from gfx/tilesets/water.png)bin100 -> 100 bytes
-rw-r--r--gfx/tilesets/whirl_islands.2bpp.lz.25b9c4b6 (renamed from gfx/tilesets/30.2bpp.lz.25b9c4b6)bin832 -> 832 bytes
-rw-r--r--gfx/tilesets/whirl_islands.png (renamed from gfx/tilesets/30.png)bin851 -> 851 bytes
-rw-r--r--gfx/timeset/background.png (renamed from gfx/unknown/0908fb.png)bin68 -> 68 bytes
-rw-r--r--gfx/timeset/down_arrow.png (renamed from gfx/unknown/09090b.png)bin82 -> 82 bytes
-rw-r--r--gfx/timeset/up_arrow.png (renamed from gfx/unknown/090903.png)bin82 -> 82 bytes
-rw-r--r--gfx/trade/border_cable_bottom.tilemap (renamed from gfx/unknown/16d5f5.tilemap)0
-rw-r--r--gfx/trade/border_cable_top.tilemap (renamed from gfx/unknown/16d5cd.tilemap)0
-rw-r--r--gfx/trade/border_mobile_fullscreen.tilemap (renamed from gfx/unknown/16d465.tilemap)0
-rw-r--r--gfx/trade/border_tiles.png (renamed from gfx/unknown/16cfc1.png)bin542 -> 542 bytes
-rw-r--r--gfx/trade/unused_gen_1_border_tiles.png (renamed from gfx/unknown/029f54.png)bin175 -> 175 bytes
-rw-r--r--gfx/trainer_card/badges.png (renamed from gfx/misc/badges.png)bin517 -> 517 bytes
-rw-r--r--gfx/trainer_card/card_right_corner.png (renamed from gfx/misc/card_right_corner.png)bin90 -> 90 bytes
-rw-r--r--gfx/trainer_card/card_status.png (renamed from gfx/misc/card_status.png)bin121 -> 121 bytes
-rw-r--r--gfx/trainer_card/chris_card.png (renamed from gfx/misc/chris_card.png)bin412 -> 412 bytes
-rw-r--r--gfx/trainer_card/kris_card.png (renamed from gfx/misc/kris_card.png)bin414 -> 414 bytes
-rw-r--r--gfx/trainer_card/leaders.png (renamed from gfx/misc/leaders.png)bin958 -> 958 bytes
-rw-r--r--gfx/trainer_card/trainer_card.png (renamed from gfx/misc/trainer_card.png)bin135 -> 135 bytes
-rw-r--r--gfx/trainer_palettes.asm76
-rw-r--r--gfx/trainer_pic_pointers.asm69
-rw-r--r--gfx/trainers/palette_pointers.asm82
-rw-r--r--gfx/unknown/unknown_egg.2bpp.lz.a5b6cbfa (renamed from gfx/misc/unknown_egg.2bpp.lz.a5b6cbfa)bin146 -> 146 bytes
-rw-r--r--gfx/unknown/unknown_egg.png (renamed from gfx/misc/unknown_egg.png)bin219 -> 219 bytes
-rw-r--r--home.asm623
-rw-r--r--home/audio.asm6
-rw-r--r--home/battle.asm4
-rw-r--r--home/copy.asm12
-rw-r--r--home/flag.asm16
-rw-r--r--home/hm_moves.asm27
-rw-r--r--home/init.asm8
-rw-r--r--home/item.asm4
-rw-r--r--home/joypad.asm8
-rw-r--r--home/map.asm239
-rw-r--r--home/map_objects.asm84
-rw-r--r--home/math.asm2
-rw-r--r--home/menu.asm6
-rw-r--r--home/movement.asm12
-rw-r--r--home/names.asm278
-rw-r--r--home/rtc.asm4
-rw-r--r--home/serial.asm4
-rw-r--r--home/text.asm84
-rw-r--r--home/tilemap.asm6
-rw-r--r--home/time.asm7
-rw-r--r--home/trainers.asm263
-rw-r--r--home/window.asm6
-rw-r--r--interrupts.asm10
-rw-r--r--items/item_attributes.asm778
-rw-r--r--items/item_descriptions.asm1042
-rw-r--r--items/item_effects.asm3313
-rw-r--r--items/item_names.asm256
-rw-r--r--lib/mobile/main.asm6
-rw-r--r--macros.asm326
-rw-r--r--macros/base_stats.asm67
-rw-r--r--macros/basestats.asm66
-rw-r--r--macros/charmap.asm378
-rw-r--r--macros/code.asm55
-rw-r--r--macros/color.asm15
-rw-r--r--macros/coords.asm51
-rw-r--r--macros/data.asm121
-rw-r--r--macros/event.asm1068
-rw-r--r--macros/map.asm189
-rw-r--r--macros/mobile.asm2
-rw-r--r--macros/move_anim.asm293
-rw-r--r--macros/move_effect.asm186
-rw-r--r--macros/movement.asm246
-rwxr-xr-xmacros/pals.asm9
-rw-r--r--macros/pic.asm4
-rw-r--r--macros/rst.asm18
-rw-r--r--macros/scripts/audio.asm269
-rw-r--r--macros/scripts/effect_commands.asm187
-rw-r--r--macros/scripts/event.asm1069
-rw-r--r--macros/scripts/gfx_anim.asm44
-rw-r--r--macros/scripts/maps.asm108
-rw-r--r--macros/scripts/move_anim.asm294
-rw-r--r--macros/scripts/movement.asm246
-rw-r--r--macros/scripts/text.asm133
-rw-r--r--macros/scripts/trade_anim.asm255
-rw-r--r--macros/sound.asm263
-rw-r--r--macros/text.asm137
-rwxr-xr-xmacros/tilesets.asm15
-rwxr-xr-xmacros/trade_anim.asm253
-rw-r--r--macros/trainer.asm11
-rwxr-xr-xmacros/wram.asm280
-rw-r--r--main.asm5894
-rw-r--r--maps.asm142
-rw-r--r--maps/AzaleaGym.asm32
-rw-r--r--maps/AzaleaMart.asm28
-rw-r--r--maps/AzaleaPokeCenter1F.asm102
-rw-r--r--maps/AzaleaPokecenter1F.asm100
-rw-r--r--maps/AzaleaTown.asm121
-rw-r--r--maps/BattleTower1F.asm50
-rw-r--r--maps/BattleTowerBattleRoom.asm22
-rw-r--r--maps/BattleTowerElevator.asm22
-rw-r--r--maps/BattleTowerHallway.asm24
-rw-r--r--maps/BattleTowerOutside.asm20
-rw-r--r--maps/BetaRuinsOfAlphUnsolvedPuzzleRoom.blk (renamed from maps/BetaAlphRuinUnsolvedPuzzleRoom.blk)0
-rw-r--r--maps/BetaSSAquaInsideCutOut.blk (renamed from maps/BetaSsAquaInsideCutOut.blk)0
-rw-r--r--maps/BillsHouse.asm10
-rw-r--r--maps/BlackthornCity.asm46
-rw-r--r--maps/BlackthornDragonSpeechHouse.asm26
-rw-r--r--maps/BlackthornEmysHouse.asm16
-rw-r--r--maps/BlackthornGym1F.asm48
-rw-r--r--maps/BlackthornGym2F.asm42
-rw-r--r--maps/BlackthornMart.asm28
-rw-r--r--maps/BlackthornPokeCenter1F.asm73
-rw-r--r--maps/BlackthornPokecenter1F.asm73
-rw-r--r--maps/BluesHouse.asm66
-rw-r--r--maps/BrunosRoom.asm25
-rw-r--r--maps/BurnedTower1F.asm57
-rw-r--r--maps/BurnedTowerB1F.asm53
-rw-r--r--maps/CeladonCafe.asm22
-rw-r--r--maps/CeladonCity.asm100
-rw-r--r--maps/CeladonDeptStore1F.asm36
-rw-r--r--maps/CeladonDeptStore2F.asm32
-rw-r--r--maps/CeladonDeptStore3F.asm46
-rw-r--r--maps/CeladonDeptStore4F.asm30
-rw-r--r--maps/CeladonDeptStore5F.asm40
-rw-r--r--maps/CeladonDeptStore6F.asm46
-rw-r--r--maps/CeladonDeptStoreElevator.asm38
-rw-r--r--maps/CeladonGameCorner.asm198
-rw-r--r--maps/CeladonGameCornerPrizeRoom.asm20
-rw-r--r--maps/CeladonGym.asm64
-rw-r--r--maps/CeladonMansion1F.asm22
-rw-r--r--maps/CeladonMansion2F.asm14
-rw-r--r--maps/CeladonMansion3F.asm36
-rw-r--r--maps/CeladonMansionRoof.asm18
-rw-r--r--maps/CeladonMansionRoofHouse.asm10
-rw-r--r--maps/CeladonPokeCenter1F.asm170
-rw-r--r--maps/CeladonPokeCenter2FBeta.asm23
-rw-r--r--maps/CeladonPokecenter1F.asm170
-rw-r--r--maps/CeladonPokecenter2FBeta.asm23
-rw-r--r--maps/CeruleanCity.asm110
-rw-r--r--maps/CeruleanGym.asm70
-rw-r--r--maps/CeruleanGymBadgeSpeechHouse.asm16
-rw-r--r--maps/CeruleanMart.asm14
-rw-r--r--maps/CeruleanPokeCenter1F.asm85
-rw-r--r--maps/CeruleanPokeCenter2FBeta.asm23
-rw-r--r--maps/CeruleanPokecenter1F.asm85
-rw-r--r--maps/CeruleanPokecenter2FBeta.asm23
-rw-r--r--maps/CeruleanPoliceStation.asm26
-rw-r--r--maps/CeruleanTradeSpeechHouse.asm28
-rw-r--r--maps/CharcoalKiln.asm20
-rw-r--r--maps/CherrygroveCity.asm62
-rw-r--r--maps/CherrygroveEvolutionSpeechHouse.asm16
-rw-r--r--maps/CherrygroveGymSpeechHouse.asm28
-rw-r--r--maps/CherrygroveMart.asm20
-rw-r--r--maps/CherrygrovePokeCenter1F.asm92
-rw-r--r--maps/CherrygrovePokecenter1F.asm92
-rw-r--r--maps/CianwoodCity.asm76
-rw-r--r--maps/CianwoodCityPhotoStudio.asm10
-rw-r--r--maps/CianwoodGym.asm34
-rw-r--r--maps/CianwoodLugiaSpeechHouse.asm36
-rw-r--r--maps/CianwoodPharmacy.asm20
-rw-r--r--maps/CianwoodPokeCenter1F.asm155
-rw-r--r--maps/CianwoodPokecenter1F.asm155
-rw-r--r--maps/CinnabarIsland.asm22
-rw-r--r--maps/CinnabarPokeCenter1F.asm57
-rw-r--r--maps/CinnabarPokeCenter2FBeta.asm23
-rw-r--r--maps/CinnabarPokecenter1F.asm57
-rw-r--r--maps/CinnabarPokecenter2FBeta.asm23
-rw-r--r--maps/Colosseum.asm52
-rw-r--r--maps/CopycatsHouse1F.asm20
-rw-r--r--maps/CopycatsHouse2F.asm27
-rw-r--r--maps/DanceTheatre.asm82
-rw-r--r--maps/DarkCaveBlackthornEntrance.asm32
-rw-r--r--maps/DarkCaveVioletEntrance.asm26
-rw-r--r--maps/DayCare.asm35
-rw-r--r--maps/DiglettsCave.asm18
-rw-r--r--maps/DragonShrine.asm54
-rw-r--r--maps/DragonsDen1F.asm8
-rw-r--r--maps/DragonsDenB1F.asm85
-rw-r--r--maps/EarlsPokemonAcademy.asm60
-rw-r--r--maps/EcruteakCity.asm74
-rw-r--r--maps/EcruteakGym.asm74
-rw-r--r--maps/EcruteakHouse.asm57
-rw-r--r--maps/EcruteakItemfinderHouse.asm14
-rw-r--r--maps/EcruteakLugiaSpeechHouse.asm26
-rw-r--r--maps/EcruteakMart.asm26
-rw-r--r--maps/EcruteakPokeCenter1F.asm233
-rw-r--r--maps/EcruteakPokecenter1F.asm231
-rw-r--r--maps/ElmsHouse.asm18
-rw-r--r--maps/ElmsLab.asm137
-rw-r--r--maps/FastShip1F.asm60
-rw-r--r--maps/FastShipB1F.asm132
-rw-r--r--maps/FastShipCabins_NNW_NNE_NE.asm78
-rw-r--r--maps/FastShipCabins_SE_SSE_CaptainsCabin.asm94
-rw-r--r--maps/FastShipCabins_SW_SSW_NW.asm50
-rw-r--r--maps/FightingDojo.asm16
-rw-r--r--maps/FuchsiaBillSpeechHouse.asm24
-rw-r--r--maps/FuchsiaCity.asm38
-rw-r--r--maps/FuchsiaGym.asm24
-rw-r--r--maps/FuchsiaMart.asm26
-rw-r--r--maps/FuchsiaPokeCenter1F.asm114
-rw-r--r--maps/FuchsiaPokeCenter2FBeta.asm23
-rw-r--r--maps/FuchsiaPokecenter1F.asm112
-rw-r--r--maps/FuchsiaPokecenter2FBeta.asm23
-rw-r--r--maps/GoldenrodBikeShop.asm30
-rw-r--r--maps/GoldenrodBillsHouse.asm20
-rw-r--r--maps/GoldenrodCity.asm152
-rw-r--r--maps/GoldenrodDeptStore1F.asm44
-rw-r--r--maps/GoldenrodDeptStore2F.asm40
-rw-r--r--maps/GoldenrodDeptStore3F.asm30
-rw-r--r--maps/GoldenrodDeptStore4F.asm32
-rw-r--r--maps/GoldenrodDeptStore5F.asm41
-rw-r--r--maps/GoldenrodDeptStore6F.asm38
-rw-r--r--maps/GoldenrodDeptStoreB1F.asm54
-rw-r--r--maps/GoldenrodDeptStoreElevator.asm54
-rw-r--r--maps/GoldenrodDeptStoreRoof.asm66
-rw-r--r--maps/GoldenrodFlowerShop.asm12
-rw-r--r--maps/GoldenrodGameCorner.asm99
-rw-r--r--maps/GoldenrodGym.asm76
-rw-r--r--maps/GoldenrodHappinessRater.asm32
-rw-r--r--maps/GoldenrodMagnetTrainStation.asm26
-rw-r--r--maps/GoldenrodNameRater.asm18
-rw-r--r--maps/GoldenrodPPSpeechHouse.asm30
-rw-r--r--maps/GoldenrodPokeCenter1F.asm832
-rw-r--r--maps/GoldenrodPokeComCenter2FMobile.asm46
-rw-r--r--maps/GoldenrodPokecenter1F.asm832
-rw-r--r--maps/GoldenrodUnderground.asm683
-rw-r--r--maps/GoldenrodUnderground.blk (renamed from maps/WarehouseEntrance.blk)0
-rw-r--r--maps/GoldenrodUndergroundSwitchRoomEntrances.asm974
-rw-r--r--maps/GoldenrodUndergroundSwitchRoomEntrances.blk (renamed from maps/UndergroundPathSwitchRoomEntrances.blk)0
-rw-r--r--maps/GoldenrodUndergroundWarehouse.asm237
-rw-r--r--maps/GoldenrodUndergroundWarehouse.blk (renamed from maps/UndergroundWarehouse.blk)0
-rw-r--r--maps/GuideGentsHouse.asm14
-rw-r--r--maps/HallOfFame.asm28
-rw-r--r--maps/IcePath1F.asm14
-rw-r--r--maps/IcePathB1F.asm23
-rw-r--r--maps/IcePathB2FBlackthornSide.asm12
-rw-r--r--maps/IcePathB2FMahoganySide.asm22
-rw-r--r--maps/IcePathB3F.asm12
-rw-r--r--maps/IlexForest.asm115
-rw-r--r--maps/IlexForestAzaleaGate.asm24
-rw-r--r--maps/IndigoPlateauPokeCenter1F.asm336
-rw-r--r--maps/IndigoPlateauPokecenter1F.asm331
-rw-r--r--maps/IndigoPlateauPokecenter1F.blk (renamed from maps/IndigoPlateauPokeCenter1F.blk)0
-rw-r--r--maps/KarensRoom.asm25
-rw-r--r--maps/KogasRoom.asm25
-rw-r--r--maps/KrissHouse1F.asm44
-rw-r--r--maps/KrissHouse2F.asm29
-rw-r--r--maps/KrissNeighborsHouse.asm18
-rw-r--r--maps/KurtsHouse.asm53
-rw-r--r--maps/LakeOfRage.asm532
-rw-r--r--maps/LakeOfRage.blk (renamed from maps/LakeofRage.blk)0
-rw-r--r--maps/LakeOfRageHiddenPowerHouse.asm89
-rw-r--r--maps/LakeOfRageMagikarpHouse.asm227
-rw-r--r--maps/LakeofRage.asm537
-rw-r--r--maps/LakeofRageHiddenPowerHouse.asm89
-rw-r--r--maps/LakeofRageMagikarpHouse.asm227
-rw-r--r--maps/LancesRoom.asm49
-rw-r--r--maps/LavRadioTower1F.asm40
-rw-r--r--maps/LavenderMart.asm26
-rw-r--r--maps/LavenderNameRater.asm19
-rw-r--r--maps/LavenderPokeCenter1F.asm104
-rw-r--r--maps/LavenderPokeCenter2FBeta.asm23
-rw-r--r--maps/LavenderPokecenter1F.asm104
-rw-r--r--maps/LavenderPokecenter2FBeta.asm23
-rw-r--r--maps/LavenderTown.asm58
-rw-r--r--maps/LavenderTownSpeechHouse.asm20
-rw-r--r--maps/MahoganyGym.asm70
-rw-r--r--maps/MahoganyMart1F.asm41
-rw-r--r--maps/MahoganyPokeCenter1F.asm77
-rw-r--r--maps/MahoganyPokecenter1F.asm77
-rw-r--r--maps/MahoganyRedGyaradosSpeechHouse.asm18
-rw-r--r--maps/MahoganyTown.asm54
-rw-r--r--maps/ManiasHouse.asm10
-rw-r--r--maps/MobileBattleRoom.asm28
-rw-r--r--maps/MobileTradeRoomMobile.asm28
-rw-r--r--maps/MountMoon.asm28
-rw-r--r--maps/MountMoonGiftShop.asm22
-rw-r--r--maps/MountMoonSquare.asm29
-rw-r--r--maps/MountMortar1FInside.asm46
-rw-r--r--maps/MountMortar1FOutside.asm14
-rw-r--r--maps/MountMortar2FInside.asm32
-rw-r--r--maps/MountMortarB1F.asm24
-rw-r--r--maps/MoveDeletersHouse.asm14
-rw-r--r--maps/MrFujisHouse.asm34
-rw-r--r--maps/MrPokemonsHouse.asm38
-rw-r--r--maps/MrPsychicsHouse.asm16
-rw-r--r--maps/NationalPark.asm98
-rw-r--r--maps/NationalParkBugContest.asm40
-rw-r--r--maps/NewBarkTown.asm42
-rw-r--r--maps/OaksLab.asm52
-rw-r--r--maps/OlivineCafe.asm26
-rw-r--r--maps/OlivineCity.asm66
-rw-r--r--maps/OlivineGoodRodHouse.asm10
-rw-r--r--maps/OlivineGym.asm20
-rw-r--r--maps/OlivineHouseBeta.asm22
-rw-r--r--maps/OlivineLighthouse1F.asm24
-rw-r--r--maps/OlivineLighthouse2F.asm24
-rw-r--r--maps/OlivineLighthouse3F.asm40
-rw-r--r--maps/OlivineLighthouse4F.asm28
-rw-r--r--maps/OlivineLighthouse5F.asm36
-rw-r--r--maps/OlivineLighthouse6F.asm14
-rw-r--r--maps/OlivineMart.asm26
-rw-r--r--maps/OlivinePokeCenter1F.asm71
-rw-r--r--maps/OlivinePokecenter1F.asm71
-rw-r--r--maps/OlivinePort.asm50
-rw-r--r--maps/OlivinePortPassage.asm16
-rw-r--r--maps/OlivinePunishmentSpeechHouse.asm16
-rw-r--r--maps/OlivineTimsHouse.asm16
-rw-r--r--maps/PalletTown.asm34
-rw-r--r--maps/PewterCity.asm50
-rw-r--r--maps/PewterGym.asm26
-rw-r--r--maps/PewterMart.asm26
-rw-r--r--maps/PewterNidoranSpeechHouse.asm18
-rw-r--r--maps/PewterPokeCenter1F.asm92
-rw-r--r--maps/PewterPokeCenter2FBeta.asm23
-rw-r--r--maps/PewterPokecenter1F.asm92
-rw-r--r--maps/PewterPokecenter2FBeta.asm23
-rw-r--r--maps/PewterSnoozeSpeechHouse.asm20
-rw-r--r--maps/PokeCenter2F.asm1052
-rw-r--r--maps/PokeSeersHouse.asm10
-rw-r--r--maps/Pokecenter1F.blk (renamed from maps/PokeCenter1F.blk)0
-rw-r--r--maps/Pokecenter2F.asm1050
-rw-r--r--maps/Pokecenter2F.blk (renamed from maps/PokeCenter2F.blk)0
-rw-r--r--maps/PokemonFanClub.asm36
-rw-r--r--maps/PowerPlant.asm46
-rw-r--r--maps/RadioTower1F.asm44
-rw-r--r--maps/RadioTower2F.asm94
-rw-r--r--maps/RadioTower3F.asm73
-rw-r--r--maps/RadioTower4F.asm64
-rw-r--r--maps/RadioTower5F.asm68
-rw-r--r--maps/RedsHouse1F.asm22
-rw-r--r--maps/RedsHouse2F.asm24
-rw-r--r--maps/RockTunnel1F.asm16
-rw-r--r--maps/RockTunnelB1F.asm16
-rw-r--r--maps/Route1.asm32
-rw-r--r--maps/Route10North.asm14
-rw-r--r--maps/Route10PokeCenter1F.asm104
-rw-r--r--maps/Route10PokeCenter2FBeta.asm23
-rw-r--r--maps/Route10Pokecenter1F.asm104
-rw-r--r--maps/Route10Pokecenter2FBeta.asm23
-rw-r--r--maps/Route10South.asm30
-rw-r--r--maps/Route11.asm54
-rw-r--r--maps/Route12.asm58
-rw-r--r--maps/Route12SuperRodHouse.asm10
-rw-r--r--maps/Route13.asm66
-rw-r--r--maps/Route14.asm42
-rw-r--r--maps/Route15.asm72
-rw-r--r--maps/Route15FuchsiaGate.asm16
-rw-r--r--maps/Route16.asm23
-rw-r--r--maps/Route16FuchsiaSpeechHouse.asm20
-rw-r--r--maps/Route16Gate.asm26
-rw-r--r--maps/Route17.asm59
-rw-r--r--maps/Route1718Gate.asm26
-rw-r--r--maps/Route18.asm30
-rw-r--r--maps/Route19.asm59
-rw-r--r--maps/Route19FuchsiaGate.asm10
-rw-r--r--maps/Route2.asm62
-rw-r--r--maps/Route20.asm43
-rw-r--r--maps/Route21.asm38
-rw-r--r--maps/Route22.asm10
-rw-r--r--maps/Route23.asm12
-rw-r--r--maps/Route24.asm10
-rw-r--r--maps/Route25.asm108
-rw-r--r--maps/Route26.asm66
-rw-r--r--maps/Route26DayofWeekSiblingsHouse.asm10
-rw-r--r--maps/Route26HealSpeechHouse.asm14
-rw-r--r--maps/Route27.asm92
-rw-r--r--maps/Route27SandstormHouse.asm14
-rw-r--r--maps/Route28.asm12
-rw-r--r--maps/Route28FamousSpeechHouse.asm22
-rw-r--r--maps/Route29.asm53
-rw-r--r--maps/Route2946Gate.asm24
-rw-r--r--maps/Route2Gate.asm16
-rw-r--r--maps/Route2NuggetSpeechHouse.asm10
-rw-r--r--maps/Route3.asm50
-rw-r--r--maps/Route30.asm40
-rw-r--r--maps/Route30BerrySpeechHouse.asm14
-rw-r--r--maps/Route31.asm29
-rw-r--r--maps/Route31VioletGate.asm24
-rw-r--r--maps/Route32.asm81
-rw-r--r--maps/Route32PokeCenter1F.asm117
-rw-r--r--maps/Route32Pokecenter1F.asm117
-rw-r--r--maps/Route32RuinsOfAlphGate.asm70
-rw-r--r--maps/Route32RuinsofAlphGate.asm70
-rw-r--r--maps/Route33.asm16
-rw-r--r--maps/Route34.asm89
-rw-r--r--maps/Route34IlexForestGate.asm35
-rw-r--r--maps/Route35.asm90
-rw-r--r--maps/Route35GoldenrodGate.asm219
-rw-r--r--maps/Route35Goldenrodgate.asm219
-rw-r--r--maps/Route35NationalParkGate.asm462
-rw-r--r--maps/Route35NationalParkGate.blk (renamed from maps/Route35NationalParkgate.blk)0
-rw-r--r--maps/Route35NationalParkgate.asm468
-rw-r--r--maps/Route36.asm59
-rw-r--r--maps/Route36NationalParkGate.asm884
-rw-r--r--maps/Route36NationalParkGate.blk (renamed from maps/Route36NationalParkgate.blk)0
-rw-r--r--maps/Route36NationalParkgate.asm890
-rw-r--r--maps/Route36RuinsOfAlphGate.asm57
-rw-r--r--maps/Route36RuinsofAlphgate.asm57
-rw-r--r--maps/Route37.asm57
-rw-r--r--maps/Route38.asm66
-rw-r--r--maps/Route38EcruteakGate.asm16
-rw-r--r--maps/Route39.asm64
-rw-r--r--maps/Route39Barn.asm14
-rw-r--r--maps/Route39Farmhouse.asm16
-rw-r--r--maps/Route4.asm44
-rw-r--r--maps/Route40.asm93
-rw-r--r--maps/Route40BattleTowerGate.asm31
-rw-r--r--maps/Route41.asm110
-rw-r--r--maps/Route42.asm72
-rw-r--r--maps/Route42EcruteakGate.asm16
-rw-r--r--maps/Route43.asm85
-rw-r--r--maps/Route43Gate.asm63
-rw-r--r--maps/Route43MahoganyGate.asm10
-rw-r--r--maps/Route44.asm84
-rw-r--r--maps/Route45.asm86
-rw-r--r--maps/Route46.asm42
-rw-r--r--maps/Route5.asm22
-rw-r--r--maps/Route5CleanseTagSpeechHouse.asm22
-rw-r--r--maps/Route5SaffronCityGate.asm16
-rw-r--r--maps/Route5UndergroundEntrance.asm40
-rw-r--r--maps/Route5UndergroundPathEntrance.asm40
-rw-r--r--maps/Route6.asm40
-rw-r--r--maps/Route6SaffronGate.asm16
-rw-r--r--maps/Route6UndergroundEntrance.asm25
-rw-r--r--maps/Route6UndergroundPathEntrance.asm25
-rw-r--r--maps/Route7.asm12
-rw-r--r--maps/Route7SaffronGate.asm10
-rw-r--r--maps/Route8.asm64
-rw-r--r--maps/Route8SaffronGate.asm16
-rw-r--r--maps/Route9.asm72
-rw-r--r--maps/RuinsOfAlphAerodactylChamber.asm171
-rw-r--r--maps/RuinsOfAlphAerodactylItemRoom.asm59
-rw-r--r--maps/RuinsOfAlphAerodactylWordRoom.asm25
-rw-r--r--maps/RuinsOfAlphAerodactylWordRoom.blk (renamed from maps/RuinsofAlphAerodactylWordRoom.blk)0
-rw-r--r--maps/RuinsOfAlphHoOhChamber.asm172
-rw-r--r--maps/RuinsOfAlphHoOhItemRoom.asm59
-rw-r--r--maps/RuinsOfAlphHoOhWordRoom.asm25
-rw-r--r--maps/RuinsOfAlphHoOhWordRoom.blk (renamed from maps/RuinsofAlphHoOhWordRoom.blk)0
-rw-r--r--maps/RuinsOfAlphInnerChamber.asm131
-rw-r--r--maps/RuinsOfAlphInnerChamber.blk (renamed from maps/RuinsofAlphInnerChamber.blk)0
-rw-r--r--maps/RuinsOfAlphItemRoom.blk (renamed from maps/RuinsofAlphItemRoom.blk)0
-rw-r--r--maps/RuinsOfAlphKabutoChamber.asm285
-rw-r--r--maps/RuinsOfAlphKabutoItemRoom.asm59
-rw-r--r--maps/RuinsOfAlphKabutoWordRoom.asm25
-rw-r--r--maps/RuinsOfAlphKabutoWordRoom.blk (renamed from maps/RuinsofAlphKabutoWordRoom.blk)0
-rw-r--r--maps/RuinsOfAlphOmanyteChamber.asm172
-rw-r--r--maps/RuinsOfAlphOmanyteItemRoom.asm59
-rw-r--r--maps/RuinsOfAlphOmanyteWordRoom.asm25
-rw-r--r--maps/RuinsOfAlphOmanyteWordRoom.blk (renamed from maps/RuinsofAlphOmanyteWordRoom.blk)0
-rw-r--r--maps/RuinsOfAlphOutside.asm320
-rw-r--r--maps/RuinsOfAlphOutside.blk (renamed from maps/RuinsofAlphOutside.blk)0
-rw-r--r--maps/RuinsOfAlphPuzzleChamber.blk (renamed from maps/RuinsofAlphPuzzleChamber.blk)0
-rw-r--r--maps/RuinsOfAlphResearchCenter.asm417
-rw-r--r--maps/RuinsOfAlphResearchCenter.blk (renamed from maps/RuinsofAlphResearchCenter.blk)0
-rw-r--r--maps/RuinsofAlphAerodactylChamber.asm176
-rw-r--r--maps/RuinsofAlphAerodactylItemRoom.asm59
-rw-r--r--maps/RuinsofAlphAerodactylWordRoom.asm25
-rw-r--r--maps/RuinsofAlphHoOhChamber.asm177
-rw-r--r--maps/RuinsofAlphHoOhItemRoom.asm59
-rw-r--r--maps/RuinsofAlphHoOhWordRoom.asm25
-rw-r--r--maps/RuinsofAlphInnerChamber.asm135
-rw-r--r--maps/RuinsofAlphKabutoChamber.asm292
-rw-r--r--maps/RuinsofAlphKabutoItemRoom.asm59
-rw-r--r--maps/RuinsofAlphKabutoWordRoom.asm25
-rw-r--r--maps/RuinsofAlphOmanyteChamber.asm177
-rw-r--r--maps/RuinsofAlphOmanyteItemRoom.asm59
-rw-r--r--maps/RuinsofAlphOmanyteWordRoom.asm25
-rw-r--r--maps/RuinsofAlphOutside.asm325
-rw-r--r--maps/RuinsofAlphResearchCenter.asm422
-rw-r--r--maps/SafariZoneBeta.asm8
-rw-r--r--maps/SafariZoneFuchsiaGateBeta.asm8
-rw-r--r--maps/SafariZoneMainOffice.asm8
-rw-r--r--maps/SafariZoneWardensHome.asm18
-rw-r--r--maps/SaffronCity.asm76
-rw-r--r--maps/SaffronGym.asm54
-rw-r--r--maps/SaffronMart.asm26
-rw-r--r--maps/SaffronPokeCenter1F.asm135
-rw-r--r--maps/SaffronPokeCenter2FBeta.asm23
-rw-r--r--maps/SaffronPokecenter1F.asm135
-rw-r--r--maps/SaffronPokecenter2FBeta.asm23
-rw-r--r--maps/SaffronTrainStation.asm36
-rw-r--r--maps/SeafoamGym.asm18
-rw-r--r--maps/SilphCo1F.asm12
-rw-r--r--maps/SilverCaveItemRooms.asm12
-rw-r--r--maps/SilverCaveOutside.asm18
-rw-r--r--maps/SilverCavePokeCenter1F.asm51
-rw-r--r--maps/SilverCavePokecenter1F.asm51
-rw-r--r--maps/SilverCaveRoom1.asm20
-rw-r--r--maps/SilverCaveRoom2.asm16
-rw-r--r--maps/SilverCaveRoom3.asm10
-rw-r--r--maps/SlowpokeWellB1F.asm64
-rw-r--r--maps/SlowpokeWellB2F.asm12
-rw-r--r--maps/SoulHouse.asm34
-rw-r--r--maps/SproutTower1F.asm56
-rw-r--r--maps/SproutTower2F.asm32
-rw-r--r--maps/SproutTower3F.asm74
-rw-r--r--maps/TeamRocketBaseB1F.asm163
-rw-r--r--maps/TeamRocketBaseB2F.asm187
-rw-r--r--maps/TeamRocketBaseB3F.asm130
-rw-r--r--maps/TimeCapsule.asm41
-rw-r--r--maps/TinTower1F.asm178
-rw-r--r--maps/TinTower2F.asm8
-rw-r--r--maps/TinTower3F.asm10
-rw-r--r--maps/TinTower4F.asm16
-rw-r--r--maps/TinTower5F.asm14
-rw-r--r--maps/TinTower6F.asm10
-rw-r--r--maps/TinTower7F.asm10
-rw-r--r--maps/TinTower8F.asm14
-rw-r--r--maps/TinTower9F.asm16
-rw-r--r--maps/TinTowerRoof.asm13
-rw-r--r--maps/TohjoFalls.asm10
-rw-r--r--maps/TradeCenter.asm41
-rw-r--r--maps/TrainerHouse1F.asm54
-rw-r--r--maps/TrainerHouseB1F.asm20
-rw-r--r--maps/Underground.asm34
-rw-r--r--maps/UndergroundPath.asm34
-rw-r--r--maps/UndergroundPath.blk (renamed from maps/Underground.blk)0
-rw-r--r--maps/UndergroundPathSwitchRoomEntrances.asm981
-rw-r--r--maps/UndergroundWarehouse.asm240
-rw-r--r--maps/UnionCave1F.asm66
-rw-r--r--maps/UnionCaveB1F.asm54
-rw-r--r--maps/UnionCaveB2F.asm47
-rw-r--r--maps/VermilionCity.asm54
-rw-r--r--maps/VermilionGym.asm78
-rw-r--r--maps/VermilionHouseDiglettsCaveSpeechHouse.asm16
-rw-r--r--maps/VermilionHouseFishingSpeechHouse.asm12
-rw-r--r--maps/VermilionMagnetTrainSpeechHouse.asm28
-rw-r--r--maps/VermilionMart.asm26
-rw-r--r--maps/VermilionPokeCenter1F.asm100
-rw-r--r--maps/VermilionPokeCenter2FBeta.asm23
-rw-r--r--maps/VermilionPokecenter1F.asm100
-rw-r--r--maps/VermilionPokecenter2FBeta.asm23
-rw-r--r--maps/VermilionPort.asm38
-rw-r--r--maps/VermilionPortPassage.asm16
-rw-r--r--maps/VictoryRoad.asm50
-rw-r--r--maps/VictoryRoadGate.asm68
-rw-r--r--maps/VioletCity.asm46
-rw-r--r--maps/VioletGym.asm42
-rw-r--r--maps/VioletKylesHouse.asm53
-rw-r--r--maps/VioletMart.asm26
-rw-r--r--maps/VioletNicknameSpeechHouse.asm26
-rw-r--r--maps/VioletOnixTradeHouse.asm53
-rw-r--r--maps/VioletPokeCenter1F.asm240
-rw-r--r--maps/VioletPokecenter1F.asm240
-rw-r--r--maps/ViridianCity.asm40
-rw-r--r--maps/ViridianGym.asm16
-rw-r--r--maps/ViridianMart.asm26
-rw-r--r--maps/ViridianNicknameSpeechHouse.asm28
-rw-r--r--maps/ViridianPokeCenter1F.asm95
-rw-r--r--maps/ViridianPokeCenter2FBeta.asm23
-rw-r--r--maps/ViridianPokecenter1F.asm95
-rw-r--r--maps/ViridianPokecenter2FBeta.asm23
-rw-r--r--maps/WarehouseEntrance.asm691
-rw-r--r--maps/WhirlIslandB1F.asm26
-rw-r--r--maps/WhirlIslandB2F.asm14
-rw-r--r--maps/WhirlIslandCave.asm8
-rw-r--r--maps/WhirlIslandLugiaChamber.asm13
-rw-r--r--maps/WhirlIslandNE.asm10
-rw-r--r--maps/WhirlIslandNW.asm8
-rw-r--r--maps/WhirlIslandSE.asm8
-rw-r--r--maps/WhirlIslandSW.asm10
-rw-r--r--maps/WillsRoom.asm33
-rw-r--r--maps/WiseTriosRoom.asm81
-rw-r--r--maps/blockdata.asm1047
-rw-r--r--maps/blockdata_1.asm309
-rw-r--r--maps/blockdata_2.asm462
-rw-r--r--maps/blockdata_3.asm266
-rw-r--r--maps/map_headers.asm296
-rw-r--r--maps/second_map_headers.asm217
-rw-r--r--menu/mon_icons.asm349
-rwxr-xr-xmisc/battle_tower_47.asm784
-rwxr-xr-xmisc/battle_tower_5c.asm1772
-rw-r--r--misc/crystal_misc.asm931
-rwxr-xr-xmisc/fixed_words.asm4293
-rw-r--r--misc/gbc_only.asm149
-rwxr-xr-xmisc/gfx_41.asm638
-rwxr-xr-xmisc/mobile_12.asm1845
-rwxr-xr-xmisc/mobile_12_2.asm936
-rw-r--r--misc/mobile_22.asm4448
-rw-r--r--misc/mobile_22_2.asm1162
-rw-r--r--misc/mobile_40.asm8156
-rwxr-xr-xmisc/mobile_41.asm1115
-rw-r--r--misc/mobile_42.asm2009
-rw-r--r--misc/mobile_45.asm7690
-rwxr-xr-xmisc/mobile_45_sprite_engine.asm922
-rwxr-xr-xmisc/mobile_46.asm7986
-rwxr-xr-xmisc/mobile_5b.asm833
-rwxr-xr-xmisc/mobile_5c.asm943
-rw-r--r--misc/mobile_5f.asm5310
-rwxr-xr-xmisc/mobile_menu.asm879
-rwxr-xr-xmisc/printer_77.asm356
-rw-r--r--misc/unused_title.asm556
-rwxr-xr-xmobile/battle_tower_47.asm784
-rwxr-xr-xmobile/battle_tower_5c.asm1772
-rwxr-xr-xmobile/fixed_words.asm4294
-rw-r--r--mobile/get_trainer_class.asm46
-rwxr-xr-xmobile/mobile_12.asm1845
-rwxr-xr-xmobile/mobile_12_2.asm936
-rw-r--r--mobile/mobile_22.asm4450
-rw-r--r--mobile/mobile_22_2.asm1162
-rw-r--r--mobile/mobile_40.asm8158
-rwxr-xr-xmobile/mobile_41.asm1113
-rw-r--r--mobile/mobile_42.asm2009
-rw-r--r--mobile/mobile_45.asm7690
-rwxr-xr-xmobile/mobile_45_sprite_engine.asm922
-rwxr-xr-xmobile/mobile_46.asm7987
-rwxr-xr-xmobile/mobile_5b.asm833
-rwxr-xr-xmobile/mobile_5c.asm946
-rw-r--r--mobile/mobile_5e.asm925
-rw-r--r--mobile/mobile_5f.asm5306
-rwxr-xr-xmobile/mobile_menu.asm879
-rw-r--r--mobile/news/news.asm44
-rw-r--r--mobile/news/news_1.bin (renamed from unknown/1f4018.bin)bin3494 -> 3494 bytes
-rw-r--r--mobile/news/news_2.bin (renamed from unknown/1f4dd3.bin)bin4044 -> 4044 bytes
-rw-r--r--mobile/news/news_3.bin (renamed from unknown/1f5db4.bin)bin1462 -> 1462 bytes
-rw-r--r--mobile/print_opp_message.asm30
-rw-r--r--mobile/stadium/stadium2_1.bin (renamed from misc/stadium2_1.bin)bin544 -> 544 bytes
-rw-r--r--mobile/stadium/stadium2_2.bin (renamed from misc/stadium2_2.bin)bin544 -> 544 bytes
-rw-r--r--pokecrystal.link41
-rw-r--r--predef/cgb.asm1121
-rwxr-xr-xpredef/crystal.asm614
-rw-r--r--predef/sgb.asm636
-rw-r--r--sram.asm247
-rw-r--r--text/battle.asm2
-rw-r--r--text/common_text.asm6
-rw-r--r--text/phone/extra.asm64
-rw-r--r--text/phone/extra2.asm1927
-rw-r--r--text/phone/extra3.asm1927
-rw-r--r--text/phone/mom.asm8
-rw-r--r--text/stdtext.asm2
-rwxr-xr-xtext/trainer_class_names.asm67
-rw-r--r--text/unused_gen_1_trainers.asm92
-rw-r--r--text/unused_sweet_honey.asm (renamed from text/sweethoney.asm)0
-rw-r--r--tilesets/00_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/00_metatiles.binbin1024 -> 0 bytes
-rw-r--r--tilesets/01_collision.binbin512 -> 0 bytes
-rw-r--r--tilesets/01_palette_map.asm29
-rw-r--r--tilesets/02_collision.binbin512 -> 0 bytes
-rw-r--r--tilesets/03_collision.binbin512 -> 0 bytes
-rw-r--r--tilesets/04_collision.binbin512 -> 0 bytes
-rw-r--r--tilesets/05_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/06_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/07_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/08_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/09_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/10_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/11_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/12_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/13_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/14_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/15_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/16_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/17_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/18_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/19_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/20_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/21_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/22_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/23_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/24_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/25_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/26_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/27_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/28_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/29_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/30_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/31_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/32_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/33_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/34_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/35_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/36_collision.binbin256 -> 0 bytes
-rw-r--r--tilesets/aerodactyl_word_room_collision.asm64
-rw-r--r--tilesets/aerodactyl_word_room_metatiles.bin (renamed from tilesets/36_metatiles.bin)0
-rw-r--r--tilesets/aerodactyl_word_room_palette_map.asm (renamed from tilesets/26_palette_map.asm)0
-rw-r--r--tilesets/animations.asm78
-rw-r--r--tilesets/battle_tower.pal15
-rw-r--r--tilesets/battle_tower_collision.asm64
-rw-r--r--tilesets/battle_tower_metatiles.bin (renamed from tilesets/22_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/battle_tower_outside_collision.asm128
-rw-r--r--tilesets/battle_tower_outside_metatiles.bin (renamed from tilesets/04_metatiles.bin)bin2048 -> 2048 bytes
-rw-r--r--tilesets/battle_tower_outside_palette_map.asm (renamed from tilesets/04_palette_map.asm)0
-rw-r--r--tilesets/battle_tower_palette_map.asm (renamed from tilesets/22_palette_map.asm)0
-rw-r--r--tilesets/beta_word_room_collision.asm64
-rw-r--r--tilesets/beta_word_room_metatiles.bin (renamed from tilesets/32_metatiles.bin)0
-rw-r--r--tilesets/beta_word_room_palette_map.asm (renamed from tilesets/32_palette_map.asm)0
-rw-r--r--tilesets/bg.pal209
-rw-r--r--tilesets/cave_collision.asm64
-rw-r--r--tilesets/cave_metatiles.bin (renamed from tilesets/24_metatiles.bin)0
-rw-r--r--tilesets/cave_palette_map.asm (renamed from tilesets/24_palette_map.asm)0
-rw-r--r--tilesets/celadon_mansion_collision.asm64
-rw-r--r--tilesets/celadon_mansion_metatiles.bin (renamed from tilesets/13_metatiles.bin)0
-rw-r--r--tilesets/celadon_mansion_palette_map.asm (renamed from tilesets/13_palette_map.asm)0
-rwxr-xr-xtilesets/collision.asm264
-rw-r--r--tilesets/data.asm434
-rw-r--r--tilesets/data_1.asm50
-rw-r--r--tilesets/data_2.asm61
-rw-r--r--tilesets/data_3.asm64
-rw-r--r--tilesets/data_4.asm59
-rw-r--r--tilesets/data_5.asm60
-rw-r--r--tilesets/data_6.asm75
-rw-r--r--tilesets/data_7.asm16
-rw-r--r--tilesets/data_8.asm15
-rw-r--r--tilesets/game_corner_collision.asm64
-rw-r--r--tilesets/game_corner_metatiles.bin (renamed from tilesets/14_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/game_corner_palette_map.asm (renamed from tilesets/14_palette_map.asm)0
-rw-r--r--tilesets/gate_collision.asm64
-rw-r--r--tilesets/gate_metatiles.bin (renamed from tilesets/08_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/gate_palette_map.asm (renamed from tilesets/08_palette_map.asm)0
-rw-r--r--tilesets/gym_1_collision.asm64
-rw-r--r--tilesets/gym_1_metatiles.bin (renamed from tilesets/15_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/gym_1_palette_map.asm (renamed from tilesets/15_palette_map.asm)0
-rw-r--r--tilesets/ho_oh_word_room_collision.asm64
-rw-r--r--tilesets/ho_oh_word_room_metatiles.bin (renamed from tilesets/33_metatiles.bin)0
-rw-r--r--tilesets/ho_oh_word_room_palette_map.asm (renamed from tilesets/33_palette_map.asm)0
-rw-r--r--tilesets/house.pal39
-rw-r--r--tilesets/house_1.pal40
-rw-r--r--tilesets/house_1_collision.asm64
-rw-r--r--tilesets/house_1_metatiles.bin (renamed from tilesets/05_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/house_1_palette_map.asm (renamed from tilesets/05_palette_map.asm)0
-rw-r--r--tilesets/ice_path.pal15
-rw-r--r--tilesets/ice_path_collision.asm64
-rw-r--r--tilesets/ice_path_metatiles.bin (renamed from tilesets/29_metatiles.bin)0
-rw-r--r--tilesets/ice_path_palette_map.asm (renamed from tilesets/29_palette_map.asm)0
-rw-r--r--tilesets/ilex_forest_collision.asm64
-rw-r--r--tilesets/ilex_forest_metatiles.bin (renamed from tilesets/31_metatiles.bin)0
-rw-r--r--tilesets/ilex_forest_palette_map.asm (renamed from tilesets/31_palette_map.asm)0
-rw-r--r--tilesets/johto_1_collision.asm128
-rw-r--r--tilesets/johto_1_metatiles.bin (renamed from tilesets/01_metatiles.bin)bin2048 -> 2048 bytes
-rw-r--r--[-rwxr-xr-x]tilesets/johto_1_palette_map.asm (renamed from tilesets/00_palette_map.asm)0
-rw-r--r--tilesets/johto_2_collision.asm128
-rw-r--r--tilesets/johto_2_metatiles.bin (renamed from tilesets/02_metatiles.bin)bin2048 -> 2048 bytes
-rw-r--r--tilesets/johto_2_palette_map.asm (renamed from tilesets/02_palette_map.asm)0
-rw-r--r--tilesets/kabuto_word_room_collision.asm64
-rw-r--r--tilesets/kabuto_word_room_metatiles.bin (renamed from tilesets/34_metatiles.bin)0
-rw-r--r--tilesets/kabuto_word_room_palette_map.asm (renamed from tilesets/34_palette_map.asm)0
-rw-r--r--tilesets/kanto_collision.asm128
-rw-r--r--tilesets/kanto_metatiles.bin (renamed from tilesets/03_metatiles.bin)bin2048 -> 2048 bytes
-rw-r--r--tilesets/kanto_palette_map.asm (renamed from tilesets/03_palette_map.asm)0
-rw-r--r--tilesets/kurts_house_collision.asm64
-rw-r--r--tilesets/kurts_house_metatiles.bin (renamed from tilesets/16_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/kurts_house_palette_map.asm (renamed from tilesets/16_palette_map.asm)0
-rw-r--r--tilesets/lab_collision.asm64
-rw-r--r--tilesets/lab_metatiles.bin (renamed from tilesets/10_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/lab_palette_map.asm (renamed from tilesets/10_palette_map.asm)0
-rw-r--r--tilesets/lighthouse_collision.asm64
-rw-r--r--tilesets/lighthouse_metatiles.bin (renamed from tilesets/19_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/lighthouse_palette_map.asm (renamed from tilesets/19_palette_map.asm)0
-rw-r--r--tilesets/mart_collision.asm64
-rw-r--r--tilesets/mart_metatiles.bin (renamed from tilesets/12_metatiles.bin)0
-rw-r--r--tilesets/mart_palette_map.asm (renamed from tilesets/12_palette_map.asm)0
-rw-r--r--tilesets/ob.pal159
-rw-r--r--tilesets/olivine_gym_collision.asm64
-rw-r--r--tilesets/olivine_gym_metatiles.bin (renamed from tilesets/18_metatiles.bin)0
-rw-r--r--tilesets/olivine_gym_palette_map.asm (renamed from tilesets/18_palette_map.asm)0
-rw-r--r--tilesets/omanyte_word_room_collision.asm64
-rw-r--r--tilesets/omanyte_word_room_metatiles.bin (renamed from tilesets/35_metatiles.bin)0
-rw-r--r--tilesets/omanyte_word_room_palette_map.asm (renamed from tilesets/35_palette_map.asm)0
-rw-r--r--tilesets/palette_maps.asm142
-rw-r--r--tilesets/park_collision.asm64
-rw-r--r--tilesets/park_metatiles.bin (renamed from tilesets/25_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/park_palette_map.asm (renamed from tilesets/25_palette_map.asm)0
-rw-r--r--tilesets/players_house_2f_collision.asm64
-rw-r--r--tilesets/players_house_2f_metatiles.bin (renamed from tilesets/20_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/players_house_2f_palette_map.asm (renamed from tilesets/20_palette_map.asm)0
-rw-r--r--tilesets/players_house_collision.asm64
-rw-r--r--tilesets/players_house_metatiles.bin (renamed from tilesets/06_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/players_house_palette_map.asm (renamed from tilesets/06_palette_map.asm)0
-rw-r--r--tilesets/pokecenter_collision.asm64
-rw-r--r--tilesets/pokecenter_metatiles.bin (renamed from tilesets/07_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/pokecenter_palette_map.asm (renamed from tilesets/07_palette_map.asm)0
-rw-r--r--tilesets/pokecom.pal39
-rw-r--r--tilesets/pokecom_center.pal40
-rw-r--r--tilesets/pokecom_center_collision.asm64
-rw-r--r--tilesets/pokecom_center_metatiles.bin (renamed from tilesets/21_metatiles.bin)0
-rw-r--r--tilesets/pokecom_center_palette_map.asm (renamed from tilesets/21_palette_map.asm)0
-rw-r--r--tilesets/port_collision.asm64
-rw-r--r--tilesets/port_metatiles.bin (renamed from tilesets/09_metatiles.bin)0
-rw-r--r--tilesets/port_palette_map.asm (renamed from tilesets/09_palette_map.asm)0
-rw-r--r--tilesets/power_plant_collision.asm64
-rw-r--r--tilesets/power_plant_metatiles.bin (renamed from tilesets/11_metatiles.bin)0
-rw-r--r--tilesets/power_plant_palette_map.asm (renamed from tilesets/11_palette_map.asm)0
-rw-r--r--tilesets/radio_tower_collision.asm64
-rw-r--r--tilesets/radio_tower_metatiles.bin (renamed from tilesets/27_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/radio_tower_palette_map.asm (renamed from tilesets/27_palette_map.asm)0
-rw-r--r--tilesets/roof.pal161
-rw-r--r--tilesets/roofs.asm33
-rw-r--r--tilesets/ruins_of_alph_collision.asm64
-rw-r--r--tilesets/ruins_of_alph_metatiles.bin (renamed from tilesets/26_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/ruins_of_alph_palette_map.asm (renamed from tilesets/36_palette_map.asm)0
-rw-r--r--tilesets/special_palettes.asm200
-rw-r--r--tilesets/sprout_tower_collision.asm64
-rw-r--r--tilesets/sprout_tower_metatiles.bin (renamed from tilesets/23_metatiles.bin)0
-rw-r--r--tilesets/sprout_tower_palette_map.asm (renamed from tilesets/23_palette_map.asm)0
-rw-r--r--tilesets/tileset_headers.asm79
-rw-r--r--tilesets/train_station_collision.asm64
-rw-r--r--tilesets/train_station_metatiles.bin (renamed from tilesets/17_metatiles.bin)bin1024 -> 1024 bytes
-rw-r--r--tilesets/train_station_palette_map.asm (renamed from tilesets/17_palette_map.asm)0
-rw-r--r--tilesets/underground_collision.asm64
-rw-r--r--tilesets/underground_metatiles.bin (renamed from tilesets/28_metatiles.bin)0
-rw-r--r--tilesets/underground_palette_map.asm (renamed from tilesets/28_palette_map.asm)0
-rw-r--r--tilesets/unused_30_collision.binbin512 -> 0 bytes
-rw-r--r--tilesets/unused_museum_palette_map.asm32
-rw-r--r--tilesets/unused_palette_map_1.binbin112 -> 0 bytes
-rw-r--r--tilesets/unused_palette_map_2.bin1
-rw-r--r--tilesets/unused_whirl_islands_collision.asm128
-rw-r--r--tilesets/unused_whirl_islands_metatiles.bin (renamed from tilesets/unused_30_metatiles.bin)bin2048 -> 2048 bytes
-rw-r--r--tilesets/whirl_islands_collision.asm64
-rw-r--r--tilesets/whirl_islands_metatiles.bin (renamed from tilesets/30_metatiles.bin)0
-rw-r--r--tilesets/whirl_islands_palette_map.asm (renamed from tilesets/30_palette_map.asm)0
-rwxr-xr-xtools/compare.sh (renamed from compare.sh)0
-rwxr-xr-xtools/compare2.sh (renamed from compare2.sh)0
-rw-r--r--tools/toc.py89
-rw-r--r--trainers/attributes.asm405
-rw-r--r--trainers/dvs.asm92
-rw-r--r--trainers/trainers.asm8829
-rwxr-xr-xunknown/013a47.asm229
-rw-r--r--wram.asm3360
2573 files changed, 152924 insertions, 147804 deletions
diff --git a/FAQ.md b/FAQ.md
new file mode 100644
index 000000000..c40dc25d4
--- /dev/null
+++ b/FAQ.md
@@ -0,0 +1,54 @@
+# FAQ
+
+
+## Questions
+
+- [What is pokecrystal11.gbc?](#what-is-pokecrystal11gbc)
+- [Can't build ROM; "ERROR: `UNION` already defined"](#cant-build-rom-error-union-already-defined)
+- [Can't build ROM; "Segmentation fault" from `rgbgfx`](#cant-build-rom-segmentation-fault-from-rgbgfx)
+- [Can't build ROM; "Section is too big" or "Unable to place section in bank"](#cant-build-rom-section-is-too-big-or-unable-to-place-section-in-bank)
+- [How do I edit maps?](#how-do-i-edit-maps)
+- [How do I write new features?](#how-do-i-write-new-features)
+- [I need more help!](#i-need-more-help)
+
+
+## What is pokecrystal11.gbc?
+
+Version 1.1 of Pokémon Crystal, which fixed some issues with the initial international release. `make crystal11` defines `CRYSTAL11` so the assembly builds the changed version.
+
+
+## Can't build ROM; "ERROR: `UNION` already defined"
+
+Download [**rgbds 0.3.3**](rgbds). Earlier versions will not work.
+
+
+## Can't build ROM; "Segmentation fault" from `rgbgfx`
+
+If you are using 64-bit Windows, download [**64-bit Cygwin**](cygwin) and [**64-bit rgbds**](rgbds).
+
+
+## Can't build ROM; "Section is too big" or "Unable to place section in bank"
+
+If you have not changed any of the asm, make sure you have the latest version of pokecrystal and the correct version of rgbds (see [INSTALL.md](INSTALL.md)).
+
+If you added or changed any code, it has to fit in the **memory banks**. The 2MB ROM is divided into 128 banks of 4KB each, numbered $00 to $7F. The linkerscript **pokecrystal.link** lists which **`SECTION`**s go in which banks. Try moving some code into a new section.
+
+
+## How do I edit maps?
+
+For `asm` scripts, read [docs/map_scripts.md](docs/map_scripts.md). For `blk` layouts, try [crowdmap](crowdmap) or [Polished Map](polished-map).
+
+
+## How do I write new features?
+
+There are a number of special-purpose scripting languages used for different purposes, as described in [docs](docs/). For more general features, you'll need to code directly in assembly language. See [docs/assembly_programming.md](docs/assembly_programming.md).
+
+
+## I need more help!
+
+Try asking on IRC or Discord (see [README.md](README.md)).
+
+[cygwin]: https://cygwin.com/install.html
+[rgbds]: https://github.com/rednex/rgbds/releases
+[crowdmap]: https://github.com/yenatch/crowdmap/
+[polished-map]: https://github.com/roukaour/polished-map
diff --git a/INSTALL.md b/INSTALL.md
index 40cffb61c..2bfc34085 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,10 +1,12 @@
-The source files are assembled into a rom using [**rgbds**](https://github.com/rednex/rgbds).
+# Instructions
+
+The source files are assembled into a ROM using [**rgbds**](https://github.com/rednex/rgbds).
These instructions explain how to set up the tools required to build.
-If you run into trouble, ask for help on irc or discord (see [README.md](README.md)).
+If you run into trouble, ask for help on IRC or Discord (see [README.md](README.md)).
-# Linux
+## Linux
```bash
sudo apt-get install make gcc bison git libpng-dev
@@ -25,7 +27,7 @@ make
```
-# Mac
+## Mac
In **Terminal**, run:
@@ -48,24 +50,23 @@ make
```
-# Windows
+## Windows
+
+Download [**Cygwin**](http://cygwin.com/install.html): **setup-x86_64.exe** for 64-bit Windows, **setup-x86.exe** for 32-bit.
-To build on Windows, install [**Cygwin**](http://cygwin.com/install.html) with the default settings.
+Run setup and leave the default settings. At "Select Packages", choose to install the following:
-In the installer, select the following packages:
- `make`
- `git`
- `gcc-core`
-Then download [**rgbds**](https://github.com/rednex/rgbds/releases/).
-Extract the archive and put all the `exe` and `dll` files individually in `C:\cygwin64\usr\local\bin`.
+Then download [**rgbds**](https://github.com/rednex/rgbds/releases/): the latest **win64.tar.gz** or **win32.tar.gz** release. Extract it and put all the `exe` and `dll` files individually in **C:\Cygwin64\usr\local\bin**.
**Note: If you have an older rgbds, you will need to update to 0.3.3 or newer.** Ignore this if you have never installed rgbds before.
-In the **Cygwin terminal**:
+In the **Cygwin terminal**, enter these commands:
```bash
-
git clone https://github.com/pret/pokecrystal
cd pokecrystal
```
@@ -75,3 +76,9 @@ To build **pokecrystal.gbc**:
```bash
make
```
+
+To build **pokecrystal11.gbc**:
+
+```bash
+make crystal11
+```
diff --git a/Makefile b/Makefile
index 6cbc1e1df..4a4c640f9 100644
--- a/Makefile
+++ b/Makefile
@@ -17,20 +17,20 @@ RGBLINK := rgblink
crystal_obj := \
-wram.o \
-main.o \
-lib/mobile/main.o \
-home.o \
audio.o \
+home.o \
+main.o \
maps.o \
-engine/events.o \
+wram.o \
+data/pokemon/dex_entries.o \
+data/pokemon/egg_moves.o \
+data/pokemon/evos_attacks.o \
engine/credits.o \
-data/egg_moves.o \
-data/evos_attacks.o \
-data/pokedex/entries.o \
-misc/crystal_misc.o \
-text/common_text.o \
-gfx/pics.o
+engine/events.o \
+gfx/pics.o \
+gfx/sprites.o \
+lib/mobile/main.o \
+text/common_text.o
crystal11_obj := $(crystal_obj:.o=11.o)
@@ -140,8 +140,8 @@ gfx/pics/%/front.animated.tilemap: gfx/pics/%/front.2bpp gfx/pics/%/front.dimens
### Misc file-specific graphics rules
-gfx/shrink1.2bpp: rgbgfx += -h
-gfx/shrink2.2bpp: rgbgfx += -h
+gfx/shrink/shrink1.2bpp: rgbgfx += -h
+gfx/shrink/shrink2.2bpp: rgbgfx += -h
gfx/trainers/%.2bpp: rgbgfx += -h
gfx/trainers/%.pal: gfx/trainers/%.gbcpal
@@ -153,7 +153,9 @@ gfx/mail/0b9d86.1bpp: tools/gfx += --remove-whitespace
gfx/mail/0b9dc6.1bpp: tools/gfx += --remove-whitespace
gfx/mail/0b9cfe.1bpp: tools/gfx += --remove-whitespace
-gfx/pokedex/%.2bpp: tools/gfx += --trim-whitespace
+gfx/pokedex/pokedex.2bpp: tools/gfx += --trim-whitespace
+gfx/pokedex/sgb.2bpp: tools/gfx += --trim-whitespace
+gfx/pokedex/slowpoke.2bpp: tools/gfx += --trim-whitespace
gfx/title/crystal.2bpp: tools/gfx += --interleave --png=$<
gfx/title/old_fg.2bpp: tools/gfx += --interleave --png=$<
@@ -162,10 +164,10 @@ gfx/title/logo.2bpp: rgbgfx += -x 4
gfx/trade/ball.2bpp: tools/gfx += --remove-whitespace
gfx/trade/game_boy_n64.2bpp: tools/gfx += --trim-whitespace
-gfx/slots_2.2bpp: tools/gfx += --interleave --png=$<
-gfx/slots_3.2bpp: tools/gfx += --interleave --png=$< --remove-duplicates --keep-whitespace --remove-xflip
-gfx/slots_3a.2bpp: tools/gfx += --interleave --png=$<
-gfx/slots_3b.2bpp: tools/gfx += --interleave --png=$< --remove-duplicates --keep-whitespace --remove-xflip
+gfx/slots/slots_2.2bpp: tools/gfx += --interleave --png=$<
+gfx/slots/slots_3.2bpp: tools/gfx += --interleave --png=$< --remove-duplicates --keep-whitespace --remove-xflip
+
+gfx/card_flip/card_flip_2.2bpp: tools/gfx += --remove-whitespace
gfx/fx/angels.2bpp: tools/gfx += --trim-whitespace
gfx/fx/beam.2bpp: tools/gfx += --remove-xflip --remove-yflip --remove-whitespace
@@ -185,24 +187,28 @@ gfx/fx/rocks.2bpp: tools/gfx += --remove-whitespace
gfx/fx/skyattack.2bpp: tools/gfx += --remove-whitespace
gfx/fx/status.2bpp: tools/gfx += --remove-whitespace
-gfx/misc/chris.2bpp: rgbgfx += -h
-gfx/misc/chris_card.2bpp: rgbgfx += -h
-gfx/misc/kris.2bpp: rgbgfx += -h
-gfx/misc/kris_card.2bpp: rgbgfx += -h
-gfx/misc/kris_back.2bpp: rgbgfx += -h
-gfx/misc/dude.2bpp: rgbgfx += -h
-gfx/misc/unknown_egg.2bpp: rgbgfx += -h
-gfx/misc/player.2bpp: rgbgfx += -h
-gfx/misc/pokegear.2bpp: rgbgfx += -x2
-gfx/misc/pokegear_sprites.2bpp: tools/gfx += --trim-whitespace
-
-gfx/unknown/0e0ea8.2bpp: tools/gfx += --remove-whitespace
-gfx/unknown/0f8f34.1bpp: tools/gfx += --trim-whitespace
-gfx/unknown/16c173.2bpp: tools/gfx += --remove-duplicates --remove-xflip
-gfx/unknown/170d16.2bpp: tools/gfx += --trim-whitespace
-gfx/unknown/1715a4.2bpp: tools/gfx += --trim-whitespace
-gfx/unknown/1715a4_nonmatching.2bpp: tools/gfx += --remove-duplicates --remove-xflip
-gfx/unknown/171db1.2bpp: tools/gfx += --trim-whitespace
+gfx/player/chris.2bpp: rgbgfx += -h
+gfx/player/chris_back.2bpp: rgbgfx += -h
+gfx/player/kris.2bpp: rgbgfx += -h
+gfx/player/kris_back.2bpp: rgbgfx += -h
+
+gfx/trainer_card/chris_card.2bpp: rgbgfx += -h
+gfx/trainer_card/kris_card.2bpp: rgbgfx += -h
+
+gfx/battle/dude.2bpp: rgbgfx += -h
+
+gfx/font/unused_bold_font.1bpp: tools/gfx += --trim-whitespace
+
+gfx/pokegear/pokegear.2bpp: rgbgfx += -x2
+gfx/pokegear/pokegear_sprites.2bpp: tools/gfx += --trim-whitespace
+
+gfx/mobile/ascii_font.2bpp: tools/gfx += --trim-whitespace
+gfx/mobile/electro_ball.2bpp: tools/gfx += --trim-whitespace
+gfx/mobile/electro_ball_nonmatching.2bpp: tools/gfx += --remove-duplicates --remove-xflip
+gfx/mobile/mobile_splash.2bpp: tools/gfx += --remove-duplicates --remove-xflip
+gfx/mobile/pichu_animated.2bpp: tools/gfx += --trim-whitespace
+
+gfx/unknown/unknown_egg.2bpp: rgbgfx += -h
%.bin: ;
diff --git a/README.md b/README.md
index 5ec1bbf73..95940bd89 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,7 @@ It builds the following roms:
To set up the repository, see [INSTALL.md](INSTALL.md).
## See also
+
* Disassembly of [**Pokémon Red/Blue**][pokered]
* Disassembly of [**Pokémon Yellow**][pokeyellow]
* Disassembly of [**Pokémon Pinball**][pokepinball]
diff --git a/audio.asm b/audio.asm
index 203684d69..c358e4d9b 100644
--- a/audio.asm
+++ b/audio.asm
@@ -4,19 +4,10 @@ INCLUDE "includes.asm"
SECTION "Audio", ROMX
INCLUDE "audio/engine.asm"
-
-; What music plays when a trainer notices you
-INCLUDE "audio/trainer_encounters.asm"
-
-Music:
+INCLUDE "data/trainers/encounter_music.asm"
INCLUDE "audio/music_pointers.asm"
-
INCLUDE "audio/music/nothing.asm"
-
-Cries:
INCLUDE "audio/cry_pointers.asm"
-
-SFX:
INCLUDE "audio/sfx_pointers.asm"
@@ -166,6 +157,6 @@ INCLUDE "audio/sfx_crystal.asm"
SECTION "Cries", ROMX
-CryHeaders:: INCLUDE "audio/cry_headers.asm"
+INCLUDE "data/pokemon/cry_headers.asm"
INCLUDE "audio/cries.asm"
diff --git a/audio/cries.asm b/audio/cries.asm
index 66b6d3c98..7848d185e 100644
--- a/audio/cries.asm
+++ b/audio/cries.asm
@@ -1166,7 +1166,7 @@ Cry_Weepinbell: ; f35ca
musicheader 1, 8, Cry_Weepinbell_Ch8
; f35d3
-Unknown_Cry_Ch5: ; f35d3
+Unused_Cry_Ch5: ; f35d3
sound_duty 0, 0, 3, 3
sound __, 16, $e0, $0780
sound __, 16, $f0, $0784
@@ -1177,7 +1177,7 @@ Unknown_Cry_Ch5: ; f35d3
endchannel
; f35ee
-Unknown_Cry_Ch6: ; f35ee
+Unused_Cry_Ch6: ; f35ee
sound_duty 1, 1, 0, 0
sound __, 16, $a0, $0741
sound __, 16, $b0, $0743
@@ -1188,7 +1188,7 @@ Unknown_Cry_Ch6: ; f35ee
endchannel
; f3609
-Unknown_Cry_Ch8: ; f3609
+Unused_Cry_Ch8: ; f3609
noise __, 3, $f2, $4c
noise __, 7, $e0, $3a
noise __, 16, $d0, $3a
diff --git a/audio/cry_headers.asm b/audio/cry_headers.asm
deleted file mode 100644
index 863539dc9..000000000
--- a/audio/cry_headers.asm
+++ /dev/null
@@ -1,258 +0,0 @@
-; f2787
-; index, pitch, length
-BulbasaurCryHeader: cry_header CRY_BULBASAUR, $080, $081
-IvysaurCryHeader: cry_header CRY_BULBASAUR, $020, $100
-VenusaurCryHeader: cry_header CRY_BULBASAUR, $000, $140
-CharmanderCryHeader: cry_header CRY_CHARMANDER, $060, $0c0
-CharmeleonCryHeader: cry_header CRY_CHARMANDER, $020, $0c0
-CharizardCryHeader: cry_header CRY_CHARMANDER, $000, $100
-SquirtleCryHeader: cry_header CRY_SQUIRTLE, $060, $0c0
-WartortleCryHeader: cry_header CRY_SQUIRTLE, $020, $0c0
-BlastoiseCryHeader: cry_header CRY_BLASTOISE, $000, $100
-CaterpieCryHeader: cry_header CRY_CATERPIE, $080, $0a0
-MetapodCryHeader: cry_header CRY_METAPOD, $0cc, $081
-ButterfreeCryHeader: cry_header CRY_CATERPIE, $077, $0c0
-WeedleCryHeader: cry_header CRY_WEEDLE, $0ee, $081
-KakunaCryHeader: cry_header CRY_BLASTOISE, $0ff, $081
-BeedrillCryHeader: cry_header CRY_BLASTOISE, $060, $100
-PidgeyCryHeader: cry_header CRY_PIDGEY, $0df, $084
-PidgeottoCryHeader: cry_header CRY_PIDGEOTTO, $028, $140
-PidgeotCryHeader: cry_header CRY_PIDGEOTTO, $011, $17f
-RattataCryHeader: cry_header CRY_RATTATA, $000, $100
-RaticateCryHeader: cry_header CRY_RATTATA, $020, $17f
-SpearowCryHeader: cry_header CRY_SPEAROW, $000, $100
-FearowCryHeader: cry_header CRY_FEAROW, $040, $120
-EkansCryHeader: cry_header CRY_EKANS, $012, $0c0
-ArbokCryHeader: cry_header CRY_EKANS, $0e0, $090
-PikachuCryHeader: cry_header CRY_BULBASAUR, $0ee, $081
-RaichuCryHeader: cry_header CRY_RAICHU, $0ee, $088
-SandshrewCryHeader: cry_header CRY_NIDORAN_M, $020, $0c0
-SandslashCryHeader: cry_header CRY_NIDORAN_M, $0ff, $17f
-NidoranFCryHeader: cry_header CRY_NIDORAN_F, $000, $100
-NidorinaCryHeader: cry_header CRY_NIDORAN_F, $02c, $160
-NidoqueenCryHeader: cry_header CRY_NIDOQUEEN, $000, $100
-NidoranMCryHeader: cry_header CRY_NIDORAN_M, $000, $100
-NidorinoCryHeader: cry_header CRY_NIDORAN_M, $02c, $140
-NidokingCryHeader: cry_header CRY_RAICHU, $000, $100
-ClefairyCryHeader: cry_header CRY_CLEFAIRY, $0cc, $081
-ClefableCryHeader: cry_header CRY_CLEFAIRY, $0aa, $0a0
-VulpixCryHeader: cry_header CRY_VULPIX, $04f, $090
-NinetalesCryHeader: cry_header CRY_VULPIX, $088, $0e0
-JigglypuffCryHeader: cry_header CRY_PIDGEY, $0ff, $0b5
-WigglytuffCryHeader: cry_header CRY_PIDGEY, $068, $0e0
-ZubatCryHeader: cry_header CRY_SQUIRTLE, $0e0, $100
-GolbatCryHeader: cry_header CRY_SQUIRTLE, $0fa, $100
-OddishCryHeader: cry_header CRY_ODDISH, $0dd, $081
-GloomCryHeader: cry_header CRY_ODDISH, $0aa, $0c0
-VileplumeCryHeader: cry_header CRY_VILEPLUME, $022, $17f
-ParasCryHeader: cry_header CRY_PARAS, $020, $160
-ParasectCryHeader: cry_header CRY_PARAS, $042, $17f
-VenonatCryHeader: cry_header CRY_VENONAT, $044, $0c0
-VenomothCryHeader: cry_header CRY_VENONAT, $029, $100
-DiglettCryHeader: cry_header CRY_DIGLETT, $0aa, $081
-DugtrioCryHeader: cry_header CRY_DIGLETT, $02a, $090
-MeowthCryHeader: cry_header CRY_CLEFAIRY, $077, $090
-PersianCryHeader: cry_header CRY_CLEFAIRY, $099, $17f
-PsyduckCryHeader: cry_header CRY_PSYDUCK, $020, $0e0
-GolduckCryHeader: cry_header CRY_PSYDUCK, $0ff, $0c0
-MankeyCryHeader: cry_header CRY_NIDOQUEEN, $0dd, $0e0
-PrimeapeCryHeader: cry_header CRY_NIDOQUEEN, $0af, $0c0
-GrowlitheCryHeader: cry_header CRY_GROWLITHE, $020, $0c0
-ArcanineCryHeader: cry_header CRY_WEEDLE, $000, $100
-PoliwagCryHeader: cry_header CRY_PIDGEY, $0ff, $17f
-PoliwhirlCryHeader: cry_header CRY_PIDGEY, $077, $0e0
-PoliwrathCryHeader: cry_header CRY_PIDGEY, $000, $17f
-AbraCryHeader: cry_header CRY_METAPOD, $0c0, $081
-KadabraCryHeader: cry_header CRY_METAPOD, $0a8, $140
-AlakazamCryHeader: cry_header CRY_METAPOD, $098, $17f
-MachopCryHeader: cry_header CRY_GROWLITHE, $0ee, $081
-MachokeCryHeader: cry_header CRY_GROWLITHE, $048, $0e0
-MachampCryHeader: cry_header CRY_GROWLITHE, $008, $140
-BellsproutCryHeader: cry_header CRY_PSYDUCK, $055, $081
-WeepinbellCryHeader: cry_header CRY_WEEPINBELL, $044, $0a0
-VictreebelCryHeader: cry_header CRY_WEEPINBELL, $066, $14c
-TentacoolCryHeader: cry_header CRY_VENONAT, $000, $100
-TentacruelCryHeader: cry_header CRY_VENONAT, $0ee, $17f
-GeodudeCryHeader: cry_header CRY_VULPIX, $0f0, $090
-GravelerCryHeader: cry_header CRY_VULPIX, $000, $100
-GolemCryHeader: cry_header CRY_GOLEM, $0e0, $0c0
-PonytaCryHeader: cry_header CRY_WEEPINBELL, $000, $100
-RapidashCryHeader: cry_header CRY_WEEPINBELL, $020, $140
-SlowpokeCryHeader: cry_header CRY_SLOWPOKE, $000, $100
-SlowbroCryHeader: cry_header CRY_GROWLITHE, $000, $100
-MagnemiteCryHeader: cry_header CRY_METAPOD, $080, $0e0
-MagnetonCryHeader: cry_header CRY_METAPOD, $020, $140
-FarfetchDCryHeader: cry_header CRY_SPEAROW, $0dd, $081
-DoduoCryHeader: cry_header CRY_DIGLETT, $0bb, $081
-DodrioCryHeader: cry_header CRY_DIGLETT, $099, $0a0
-SeelCryHeader: cry_header CRY_SEEL, $088, $140
-DewgongCryHeader: cry_header CRY_SEEL, $023, $17f
-GrimerCryHeader: cry_header CRY_GRIMER, $000, $100
-MukCryHeader: cry_header CRY_MUK, $0ef, $17f
-ShellderCryHeader: cry_header CRY_FEAROW, $000, $100
-CloysterCryHeader: cry_header CRY_FEAROW, $06f, $160
-GastlyCryHeader: cry_header CRY_METAPOD, $000, $100
-HaunterCryHeader: cry_header CRY_METAPOD, $030, $0c0
-GengarCryHeader: cry_header CRY_MUK, $000, $17f
-OnixCryHeader: cry_header CRY_EKANS, $0ff, $140
-DrowzeeCryHeader: cry_header CRY_DROWZEE, $088, $0a0
-HypnoCryHeader: cry_header CRY_DROWZEE, $0ee, $0c0
-KrabbyCryHeader: cry_header CRY_KRABBY, $020, $160
-KinglerCryHeader: cry_header CRY_KRABBY, $0ee, $160
-VoltorbCryHeader: cry_header CRY_VOLTORB, $0ed, $100
-ElectrodeCryHeader: cry_header CRY_VOLTORB, $0a8, $110
-ExeggcuteCryHeader: cry_header CRY_DIGLETT, $000, $100
-ExeggutorCryHeader: cry_header CRY_DROWZEE, $000, $100
-CuboneCryHeader: cry_header CRY_CLEFAIRY, $000, $100
-MarowakCryHeader: cry_header CRY_ODDISH, $04f, $0e0
-HitmonleeCryHeader: cry_header CRY_GOLEM, $080, $140
-HitmonchanCryHeader: cry_header CRY_SEEL, $0ee, $140
-LickitungCryHeader: cry_header CRY_SEEL, $000, $100
-KoffingCryHeader: cry_header CRY_GOLEM, $0e6, $15d
-WeezingCryHeader: cry_header CRY_GOLEM, $0ff, $17f
-RhyhornCryHeader: cry_header CRY_CHARMANDER, $000, $100
-RhydonCryHeader: cry_header CRY_RHYDON, $000, $100
-ChanseyCryHeader: cry_header CRY_PIDGEOTTO, $00a, $140
-TangelaCryHeader: cry_header CRY_GOLEM, $000, $100
-KangaskhanCryHeader: cry_header CRY_KANGASKHAN, $000, $100
-HorseaCryHeader: cry_header CRY_CLEFAIRY, $099, $090
-SeadraCryHeader: cry_header CRY_CLEFAIRY, $03c, $081
-GoldeenCryHeader: cry_header CRY_CATERPIE, $080, $0c0
-SeakingCryHeader: cry_header CRY_CATERPIE, $010, $17f
-StaryuCryHeader: cry_header CRY_PARAS, $002, $0a0
-StarmieCryHeader: cry_header CRY_PARAS, $000, $100
-MrMimeCryHeader: cry_header CRY_KRABBY, $008, $0c0
-ScytherCryHeader: cry_header CRY_CATERPIE, $000, $100
-JynxCryHeader: cry_header CRY_DROWZEE, $0ff, $17f
-ElectabuzzCryHeader: cry_header CRY_VOLTORB, $08f, $17f
-MagmarCryHeader: cry_header CRY_CHARMANDER, $0ff, $0b0
-PinsirCryHeader: cry_header CRY_PIDGEOTTO, $000, $100
-TaurosCryHeader: cry_header CRY_SQUIRTLE, $011, $0c0
-MagikarpCryHeader: cry_header CRY_EKANS, $080, $080
-GyaradosCryHeader: cry_header CRY_EKANS, $000, $100
-LaprasCryHeader: cry_header CRY_LAPRAS, $000, $100
-DittoCryHeader: cry_header CRY_PIDGEY, $0ff, $17f
-EeveeCryHeader: cry_header CRY_VENONAT, $088, $0e0
-VaporeonCryHeader: cry_header CRY_VENONAT, $0aa, $17f
-JolteonCryHeader: cry_header CRY_VENONAT, $03d, $100
-FlareonCryHeader: cry_header CRY_VENONAT, $010, $0a0
-PorygonCryHeader: cry_header CRY_WEEPINBELL, $0aa, $17f
-OmanyteCryHeader: cry_header CRY_GROWLITHE, $0f0, $081
-OmastarCryHeader: cry_header CRY_GROWLITHE, $0ff, $0c0
-KabutoCryHeader: cry_header CRY_CATERPIE, $0bb, $0c0
-KabutopsCryHeader: cry_header CRY_FEAROW, $0ee, $081
-AerodactylCryHeader: cry_header CRY_VILEPLUME, $020, $170
-SnorlaxCryHeader: cry_header CRY_GRIMER, $055, $081
-ArticunoCryHeader: cry_header CRY_RAICHU, $080, $0c0
-ZapdosCryHeader: cry_header CRY_FEAROW, $0ff, $100
-MoltresCryHeader: cry_header CRY_RAICHU, $0f8, $0c0
-DratiniCryHeader: cry_header CRY_BULBASAUR, $060, $0c0
-DragonairCryHeader: cry_header CRY_BULBASAUR, $040, $100
-DragoniteCryHeader: cry_header CRY_BULBASAUR, $03c, $140
-MewtwoCryHeader: cry_header CRY_PARAS, $099, $17f
-MewCryHeader: cry_header CRY_PARAS, $0ee, $17f
-ChikoritaCryHeader: cry_header CRY_CHIKORITA, -$010, $0b0
-BayleefCryHeader: cry_header CRY_CHIKORITA, -$022, $120
-MeganiumCryHeader: cry_header CRY_CHIKORITA, -$0b7, $200
-CyndaquilCryHeader: cry_header CRY_CYNDAQUIL, $347, $080
-QuilavaCryHeader: cry_header CRY_CYNDAQUIL, $321, $120
-TyphlosionCryHeader: cry_header CRY_TYPHLOSION, $f00, $0d4
-TotodileCryHeader: cry_header CRY_TOTODILE, $46c, $0e8
-CroconawCryHeader: cry_header CRY_TOTODILE, $440, $110
-FeraligatrCryHeader: cry_header CRY_TOTODILE, $3fc, $180
-SentretCryHeader: cry_header CRY_SENTRET, $08a, $0b8
-FurretCryHeader: cry_header CRY_SENTRET, $06b, $102
-HoothootCryHeader: cry_header CRY_HOOTHOOT, $091, $0d8
-NoctowlCryHeader: cry_header CRY_HOOTHOOT, $000, $1a0
-LedybaCryHeader: cry_header CRY_LEDYBA, $000, $0de
-LedianCryHeader: cry_header CRY_LEDYBA, -$096, $138
-SpinarakCryHeader: cry_header CRY_SPINARAK, $011, $200
-AriadosCryHeader: cry_header CRY_SPINARAK, -$0ae, $1e2
-CrobatCryHeader: cry_header CRY_SQUIRTLE, -$010, $140
-ChinchouCryHeader: cry_header CRY_CYNDAQUIL, $3c9, $140
-LanturnCryHeader: cry_header CRY_CYNDAQUIL, $2d0, $110
-PichuCryHeader: cry_header CRY_PICHU, $000, $140
-CleffaCryHeader: cry_header CRY_CLEFFA, $061, $091
-IgglybuffCryHeader: cry_header CRY_CHIKORITA, $0e8, $0e8
-TogepiCryHeader: cry_header CRY_TOGEPI, $010, $100
-TogeticCryHeader: cry_header CRY_TOGETIC, $03b, $038
-NatuCryHeader: cry_header CRY_NATU, -$067, $100
-XatuCryHeader: cry_header CRY_NATU, -$0a7, $168
-MareepCryHeader: cry_header CRY_MAREEP, $022, $0d8
-FlaaffyCryHeader: cry_header CRY_MAREEP, -$007, $180
-AmpharosCryHeader: cry_header CRY_AMPHAROS, -$07c, $0e8
-BellossomCryHeader: cry_header CRY_CLEFFA, $084, $150
-MarillCryHeader: cry_header CRY_MARILL, $11b, $120
-AzumarillCryHeader: cry_header CRY_MARILL, $0b6, $180
-SudowoodoCryHeader: cry_header CRY_CLEFFA, $f40, $180
-PolitoedCryHeader: cry_header CRY_CLEFFA, -$2a3, $1c8
-HoppipCryHeader: cry_header CRY_CLEFFA, $03b, $0c8
-SkiploomCryHeader: cry_header CRY_CLEFFA, $027, $138
-JumpluffCryHeader: cry_header CRY_CLEFFA, $000, $180
-AipomCryHeader: cry_header CRY_AIPOM, -$051, $0e8
-SunkernCryHeader: cry_header CRY_MARILL, $12b, $0b8
-SunfloraCryHeader: cry_header CRY_SUNFLORA, -$020, $180
-YanmaCryHeader: cry_header CRY_TOTODILE, $031, $0c8
-WooperCryHeader: cry_header CRY_WOOPER, $093, $0af
-QuagsireCryHeader: cry_header CRY_WOOPER, -$0c6, $140
-EspeonCryHeader: cry_header CRY_AIPOM, $0a2, $140
-UmbreonCryHeader: cry_header CRY_VENONAT, -$0e9, $0f0
-MurkrowCryHeader: cry_header CRY_MARILL, -$01f, $180
-SlowkingCryHeader: cry_header CRY_SLOWKING, $104, $200
-MisdreavusCryHeader: cry_header CRY_HOOTHOOT, $130, $0e8
-UnownCryHeader: cry_header CRY_HOOTHOOT, $162, $100
-WobbuffetCryHeader: cry_header CRY_AMPHAROS, $27b, $144
-GirafarigCryHeader: cry_header CRY_GIRAFARIG, $041, $200
-PinecoCryHeader: cry_header CRY_SLOWKING, $080, $100
-ForretressCryHeader: cry_header CRY_SLOWKING, $000, $180
-DunsparceCryHeader: cry_header CRY_DUNSPARCE, $1c4, $100
-GligarCryHeader: cry_header CRY_GLIGAR, -$102, $100
-SteelixCryHeader: cry_header CRY_TYPHLOSION, $0ef, $0f7
-SnubbullCryHeader: cry_header CRY_DUNSPARCE, $112, $0e8
-GranbullCryHeader: cry_header CRY_DUNSPARCE, $000, $180
-QwilfishCryHeader: cry_header CRY_SLOWKING, $160, $0e0
-ScizorCryHeader: cry_header CRY_AMPHAROS, $000, $160
-ShuckleCryHeader: cry_header CRY_DUNSPARCE, $290, $0a8
-HeracrossCryHeader: cry_header CRY_AMPHAROS, $035, $0e0
-SneaselCryHeader: cry_header CRY_WOOPER, $053, $0af
-TeddiursaCryHeader: cry_header CRY_TEDDIURSA, $7a2, $06e
-UrsaringCryHeader: cry_header CRY_TEDDIURSA, $640, $0d8
-SlugmaCryHeader: cry_header CRY_SLUGMA, -$1d8, $140
-MagcargoCryHeader: cry_header CRY_MAGCARGO, -$20d, $1c0
-SwinubCryHeader: cry_header CRY_CYNDAQUIL, $1fe, $140
-PiloswineCryHeader: cry_header CRY_MAGCARGO, -$109, $100
-CorsolaCryHeader: cry_header CRY_MAGCARGO, $0a1, $0e8
-RemoraidCryHeader: cry_header CRY_SUNFLORA, $00d, $100
-OctilleryCryHeader: cry_header CRY_TOTODILE, $000, $180
-DelibirdCryHeader: cry_header CRY_TEDDIURSA, $002, $06a
-MantineCryHeader: cry_header CRY_MANTINE, -$0be, $0f0
-SkarmoryCryHeader: cry_header CRY_AMPHAROS, $8a9, $180
-HoundourCryHeader: cry_header CRY_CYNDAQUIL, $039, $140
-HoundoomCryHeader: cry_header CRY_TOTODILE, -$10a, $100
-KingdraCryHeader: cry_header CRY_SLUGMA, $2fb, $100
-PhanpyCryHeader: cry_header CRY_SENTRET, $048, $230
-DonphanCryHeader: cry_header CRY_DONPHAN, $000, $1a0
-Porygon2CryHeader: cry_header CRY_GIRAFARIG, $073, $240
-StantlerCryHeader: cry_header CRY_AIPOM, -$160, $180
-SmeargleCryHeader: cry_header CRY_PICHU, -$21a, $1f0
-TyrogueCryHeader: cry_header CRY_AIPOM, $02c, $108
-HitmontopCryHeader: cry_header CRY_SLUGMA, $000, $100
-SmoochumCryHeader: cry_header CRY_MARILL, $068, $100
-ElekidCryHeader: cry_header CRY_SUNFLORA, -$2d8, $0b4
-MagbyCryHeader: cry_header CRY_TEDDIURSA, $176, $03a
-MiltankCryHeader: cry_header CRY_GLIGAR, -$1cd, $1a0
-BlisseyCryHeader: cry_header CRY_SLOWKING, $293, $140
-RaikouCryHeader: cry_header CRY_RAIKOU, $22e, $120
-EnteiCryHeader: cry_header CRY_ENTEI, $000, $1a0
-SuicuneCryHeader: cry_header CRY_MAGCARGO, $000, $180
-LarvitarCryHeader: cry_header CRY_RAIKOU, $05f, $0d0
-PupitarCryHeader: cry_header CRY_SPINARAK, -$1db, $150
-TyranitarCryHeader: cry_header CRY_RAIKOU, -$100, $180
-LugiaCryHeader: cry_header CRY_TYPHLOSION, $000, $100
-HoOhCryHeader: cry_header CRY_AIPOM, $000, $180
-CelebiCryHeader: cry_header CRY_ENTEI, $14a, $111
-CryHeader252: cry_header CRY_NIDORAN_M, 0, 0
-CryHeader253: cry_header CRY_NIDORAN_M, 0, 0
-CryHeader254: cry_header CRY_NIDORAN_M, 0, 0
-CryHeader255: cry_header CRY_NIDORAN_M, 0, 0
-; f2d81
diff --git a/audio/cry_pointers.asm b/audio/cry_pointers.asm
index 12ea45325..9ea69efdd 100644
--- a/audio/cry_pointers.asm
+++ b/audio/cry_pointers.asm
@@ -1,4 +1,4 @@
-; e91b0
+Cries: ; e91b0
dba Cry_Nidoran_M
dba Cry_Nidoran_F
dba Cry_Slowpoke
diff --git a/audio/drumkits.asm b/audio/drumkits.asm
new file mode 100644
index 000000000..4e311a2e5
--- /dev/null
+++ b/audio/drumkits.asm
@@ -0,0 +1,301 @@
+Drumkits: ; e8e52
+ dw Drumkit0
+ dw Drumkit1
+ dw Drumkit2
+ dw Drumkit3
+ dw Drumkit4
+ dw Drumkit5
+; e8e5e
+
+Drumkit0: ; e8e5e
+ dw Drum00 ; rest
+ dw Snare1 ; c
+ dw Snare2 ; c#
+ dw Snare3 ; d
+ dw Snare4 ; d#
+ dw Drum05 ; e
+ dw Triangle1 ; f
+ dw Triangle2 ; f#
+ dw HiHat1 ; g
+ dw Snare5 ; g#
+ dw Snare6 ; a
+ dw Snare7 ; a#
+ dw HiHat2 ; b
+Drumkit1: ; e8e78
+ dw Drum00
+ dw HiHat1
+ dw Snare5
+ dw Snare6
+ dw Snare7
+ dw HiHat2
+ dw HiHat3
+ dw Snare8
+ dw Triangle3
+ dw Triangle4
+ dw Snare9
+ dw Snare10
+ dw Snare11
+Drumkit2: ; e8e92
+ dw Drum00
+ dw Snare1
+ dw Snare9
+ dw Snare10
+ dw Snare11
+ dw Drum05
+ dw Triangle1
+ dw Triangle2
+ dw HiHat1
+ dw Snare5
+ dw Snare6
+ dw Snare7
+ dw HiHat2
+Drumkit3: ; e8eac
+ dw Drum21
+ dw Snare12
+ dw Snare13
+ dw Snare14
+ dw Kick1
+ dw Triangle5
+ dw Drum20
+ dw Drum27
+ dw Drum28
+ dw Drum29
+ dw Drum21
+ dw Kick2
+ dw Crash2
+Drumkit4: ; e8ec6
+ dw Drum21
+ dw Drum20
+ dw Snare13
+ dw Snare14
+ dw Kick1
+ dw Drum33
+ dw Triangle5
+ dw Drum35
+ dw Drum31
+ dw Drum32
+ dw Drum36
+ dw Kick2
+ dw Crash1
+Drumkit5: ; e8ee0
+ dw Drum00
+ dw Snare9
+ dw Snare10
+ dw Snare11
+ dw Drum27
+ dw Drum28
+ dw Drum29
+ dw Drum05
+ dw Triangle1
+ dw Crash1
+ dw Snare14
+ dw Snare13
+ dw Kick2
+; e8efa
+
+Drum00: ; e8efa
+; unused
+ noise C#, 1, $11, $00
+ endchannel
+; e8efe
+
+Snare1: ; e8efe
+ noise C#, 1, $c1, $33
+ endchannel
+; e8f02
+
+Snare2: ; e8f02
+ noise C#, 1, $b1, $33
+ endchannel
+; e8f06
+
+Snare3: ; e8f06
+ noise C#, 1, $a1, $33
+ endchannel
+; e8f0a
+
+Snare4: ; e8f0a
+ noise C#, 1, $81, $33
+ endchannel
+; e8f0e
+
+Drum05: ; e8f0e
+ noise C#, 8, $84, $37
+ noise C#, 7, $84, $36
+ noise C#, 6, $83, $35
+ noise C#, 5, $83, $34
+ noise C#, 4, $82, $33
+ noise C#, 3, $81, $32
+ endchannel
+; e8f21
+
+Triangle1: ; e8f21
+ noise C#, 1, $51, $2a
+ endchannel
+; e8f25
+
+Triangle2: ; e8f25
+ noise C#, 2, $41, $2b
+ noise C#, 1, $61, $2a
+ endchannel
+; e8f2c
+
+HiHat1: ; e8f2c
+ noise C#, 1, $81, $10
+ endchannel
+; e8f30
+
+Snare5: ; e8f30
+ noise C#, 1, $82, $23
+ endchannel
+; e8f34
+
+Snare6: ; e8f34
+ noise C#, 1, $82, $25
+ endchannel
+; e8f38
+
+Snare7: ; e8f38
+ noise C#, 1, $82, $26
+ endchannel
+; e8f3c
+
+HiHat2: ; e8f3c
+ noise C#, 1, $a1, $10
+ endchannel
+; e8f40
+
+HiHat3: ; e8f40
+ noise C#, 1, $a2, $11
+ endchannel
+; e8f44
+
+Snare8: ; e8f44
+ noise C#, 1, $a2, $50
+ endchannel
+; e8f48
+
+Triangle3: ; e8f48
+ noise C#, 1, $a1, $18
+ noise C#, 1, $31, $33
+ endchannel
+; e8f4f
+
+Triangle4: ; e8f4f
+ noise C#, 3, $91, $28
+ noise C#, 1, $71, $18
+ endchannel
+; e8f56
+
+Snare9: ; e8f56
+ noise C#, 1, $91, $22
+ endchannel
+; e8f5a
+
+Snare10: ; e8f5a
+ noise C#, 1, $71, $22
+ endchannel
+; e8f5e
+
+Snare11: ; e8f5e
+ noise C#, 1, $61, $22
+ endchannel
+; e8f62
+
+Drum20: ; e8f62
+ noise C#, 1, $11, $11
+ endchannel
+; e8f66
+
+Drum21: ; e8f66
+ endchannel
+; e8f67
+
+Snare12: ; e8f67
+ noise C#, 1, $91, $33
+ endchannel
+; e8f6b
+
+Snare13: ; e8f6b
+ noise C#, 1, $51, $32
+ endchannel
+; e8f6f
+
+Snare14: ; e8f6f
+ noise C#, 1, $81, $31
+ endchannel
+; e8f73
+
+Kick1: ; e8f73
+ noise C#, 1, $88, $6b
+ noise C#, 1, $71, $00
+ endchannel
+; e8f7a
+
+Triangle5: ; e8f7a
+ noise D_, 1, $91, $18
+ endchannel
+; e8f7e
+
+Drum27: ; e8f7e
+ noise C#, 8, $92, $10
+ endchannel
+; e8f82
+
+Drum28: ; e8f82
+ noise D_, 4, $91, $00
+ noise D_, 4, $11, $00
+ endchannel
+; e8f89
+
+Drum29: ; e8f89
+ noise D_, 4, $91, $11
+ noise D_, 4, $11, $00
+ endchannel
+; e8f90
+
+Crash1: ; e8f90
+ noise D_, 4, $88, $15
+ noise C#, 1, $65, $12
+ endchannel
+; e8f97
+
+Drum31: ; e8f97
+ noise D_, 4, $51, $21
+ noise D_, 4, $11, $11
+ endchannel
+; e8f9e
+
+Drum32: ; e8f9e
+ noise D_, 4, $51, $50
+ noise D_, 4, $11, $11
+ endchannel
+; e8fa5
+
+Drum33: ; e8fa5
+ noise C#, 1, $a1, $31
+ endchannel
+; e8fa9
+
+Crash2: ; e8fa9
+ noise C#, 1, $84, $12
+ endchannel
+; e8fad
+
+Drum35: ; e8fad
+ noise D_, 4, $81, $00
+ noise D_, 4, $11, $00
+ endchannel
+; e8fb4
+
+Drum36: ; e8fb4
+ noise D_, 4, $81, $21
+ noise D_, 4, $11, $11
+ endchannel
+; e8fbb
+
+Kick2: ; e8fbb
+ noise C#, 1, $a8, $6b
+ noise C#, 1, $71, $00
+ endchannel
+; e8fc2
diff --git a/audio/engine.asm b/audio/engine.asm
index 57418246b..cd68bc96d 100644
--- a/audio/engine.asm
+++ b/audio/engine.asm
@@ -22,7 +22,7 @@ _MapSetup_Sound_Off:: ; e8000
ld [hli], a ; ff26 ; music channels
ld hl, rNR10 ; sound channel registers
- ld e, $4 ; number of channels
+ ld e, NUM_MUSIC_CHANS
.clearsound
; sound channel 1 2 3 4
xor a
@@ -47,7 +47,7 @@ _MapSetup_Sound_Off:: ; e8000
ld a, e
or d
jr nz, .clearchannels
- ld a, $77 ; max
+ ld a, MAX_VOLUME
ld [Volume], a
call MusicOn
pop af
@@ -60,15 +60,15 @@ _MapSetup_Sound_Off:: ; e8000
MusicFadeRestart: ; e803d
; restart but keep the music id to fade in to
- ld a, [MusicFadeIDHi]
+ ld a, [MusicFadeID + 1]
push af
- ld a, [MusicFadeIDLo]
+ ld a, [MusicFadeID]
push af
call _MapSetup_Sound_Off
pop af
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
pop af
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ret
; e8051
@@ -151,7 +151,7 @@ _UpdateSound:: ; e805c
jr z, .next
; are we in a sfx channel right now?
ld a, [CurChannel]
- cp $4
+ cp CHAN5
jr nc, .next
; are any sfx channels active?
; if so, mute
@@ -174,7 +174,7 @@ _UpdateSound:: ; e805c
.next
; are we in a sfx channel right now?
ld a, [CurChannel]
- cp $4 ; sfx
+ cp CHAN5
jr nc, .sfx_channel
ld hl, Channel5Flags - Channel1
add hl, bc
@@ -245,7 +245,7 @@ UpdateChannels: ; e8125
.Channel1:
ld a, [Danger]
- bit 7, a
+ bit DANGER_ON_F, a
ret nz
.Channel5:
ld hl, Channel1NoteFlags - Channel1
@@ -537,9 +537,9 @@ _CheckSFX: ; e82e7
PlayDanger: ; e8307
ld a, [Danger]
- bit 7, a
+ bit DANGER_ON_F, a
ret z
- and $7f
+ and $ff - (1 << DANGER_ON_F)
ld d, a
call _CheckSFX
jr c, .asm_e8335
@@ -573,7 +573,7 @@ PlayDanger: ; e8307
jr c, .asm_e833c
xor a
.asm_e833c
- or $80
+ or 1 << DANGER_ON_F
ld [Danger], a
; is hw ch1 on?
ld a, [SoundOutput]
@@ -632,9 +632,9 @@ FadeMusic: ; e8358
ld [MusicFadeCount], a
; get SO1 volume
ld a, [Volume]
- and $7
+ and VOLUME_SO1_LEVEL
; which way are we fading?
- bit 7, d
+ bit MUSIC_FADE_IN_F, d
jr nz, .fadein
; fading out
and a
@@ -648,17 +648,17 @@ FadeMusic: ; e8358
ld [Volume], a
; did we just get on a bike?
ld a, [PlayerState]
- cp $1 ; bicycle
+ cp PLAYER_BIKE
jr z, .bicycle
push bc
; restart sound
call MusicFadeRestart
; get new song id
- ld a, [MusicFadeIDLo]
+ ld a, [MusicFadeID]
and a
jr z, .quit ; this assumes there are fewer than 256 songs!
ld e, a
- ld a, [MusicFadeIDHi]
+ ld a, [MusicFadeID + 1]
ld d, a
; load new song
call _PlayMusic
@@ -679,16 +679,16 @@ FadeMusic: ; e8358
xor a
ld [Volume], a
; get new song id
- ld a, [MusicFadeIDLo]
+ ld a, [MusicFadeID]
ld e, a
- ld a, [MusicFadeIDHi]
+ ld a, [MusicFadeID + 1]
ld d, a
; load new song
call _PlayMusic
pop bc
; fade in
ld hl, MusicFade
- set 7, [hl]
+ set MUSIC_FADE_IN_F, [hl]
ret
.fadein
@@ -744,7 +744,7 @@ LoadNote: ; e83d1
sub [hl]
ld e, a
ld a, d
- sbc a, 0
+ sbc 0
ld d, a
ld hl, Channel1PitchWheelTarget + 1 - Channel1
add hl, bc
@@ -766,7 +766,7 @@ LoadNote: ; e83d1
sub e
ld e, a
ld a, d
- sbc a, 0
+ sbc 0
ld d, a
; ????
ld hl, Channel1PitchWheelTarget + 1 - Channel1
@@ -793,7 +793,7 @@ LoadNote: ; e83d1
sub [hl]
ld e, a
ld a, d
- sbc a, 0
+ sbc 0
ld d, a
ld hl, Channel1PitchWheelTarget + 1 - Channel1
add hl, bc
@@ -1021,7 +1021,7 @@ ApplyPitchWheel: ; e84f9
sub e
ld e, a
ld a, d
- sbc a, 0
+ sbc 0
ld d, a
; [Channel*Field0x25] *= 2
; if rollover: Frequency -= 1
@@ -1031,10 +1031,10 @@ ApplyPitchWheel: ; e84f9
add a
ld [hl], a
ld a, e
- sbc a, 0
+ sbc 0
ld e, a
ld a, d
- sbc a, 0
+ sbc 0
ld d, a
; Compare the dw at [Channel*PitchWheelTarget] to de.
; If frequency is lower, we're finished.
@@ -1223,7 +1223,7 @@ ParseMusic: ; e85e1
bit SOUND_SUBROUTINE, [hl] ; in a subroutine?
jr nz, .readcommand ; execute
ld a, [CurChannel]
- cp $4 ; channels 0-3?
+ cp CHAN5
jr nc, .chan_5to8
; ????
ld hl, Channel5Flags - Channel1
@@ -1237,7 +1237,7 @@ ParseMusic: ; e85e1
call nz, RestoreVolume
; end music
ld a, [CurChannel]
- cp $4 ; channel 5?
+ cp CHAN5
jr nz, .ok
; ????
xor a
@@ -1266,7 +1266,7 @@ ParseMusic: ; e85e1
RestoreVolume: ; e8679
; ch5 only
ld a, [CurChannel]
- cp $4
+ cp CHAN5
ret nz
xor a
ld hl, Channel6CryPitch
@@ -1364,9 +1364,9 @@ GetNoiseSample: ; e86c5
add hl, de
; load sample pointer into NoiseSampleAddress
ld a, [hli]
- ld [NoiseSampleAddressLo], a
+ ld [NoiseSampleAddress], a
ld a, [hl]
- ld [NoiseSampleAddressHi], a
+ ld [NoiseSampleAddress + 1], a
; clear ????
xor a
ld [wNoiseSampleDelay], a
@@ -1378,7 +1378,7 @@ ParseMusicCommand: ; e870f
; reload command
ld a, [CurMusicByte]
; get command #
- sub a, $d0 ; first command
+ sub $d0 ; first command
ld e, a
ld d, 0
; seek command pointer
@@ -1394,8 +1394,7 @@ ParseMusicCommand: ; e870f
; e8720
MusicCommands: ; e8720
-; pointer to each command in order
- ; octaves
+; entries correspond to macros/sound.asm enumeration
dw Music_Octave8 ; octave 8
dw Music_Octave7 ; octave 7
dw Music_Octave6 ; octave 6
@@ -1968,7 +1967,7 @@ Music_NoteType: ; e8963
ld [hl], a
ld a, [CurChannel]
and $3
- cp CHAN4 ; CHAN8 & $3
+ cp CHAN8 & $3
ret z
; intensity
call Music_Intensity
@@ -2063,7 +2062,7 @@ Music_StereoPanning: ; e89ba
; params: 1
; stereo on?
ld a, [Options]
- bit 5, a ; stereo
+ bit STEREO, a
jr nz, Music_Panning
; skip param
call GetMusicByte
@@ -2160,9 +2159,9 @@ Music_RestartChannel: ; e8a08
ld hl, Channel1MusicID - Channel1
add hl, bc
ld a, [hli]
- ld [MusicIDLo], a
+ ld [MusicID], a
ld a, [hl]
- ld [MusicIDHi], a
+ ld [MusicID + 1], a
; update music bank
ld hl, Channel1MusicBank - Channel1
add hl, bc
@@ -2437,7 +2436,7 @@ _PlayMusic:: ; e8b30
ld hl, MusicID
ld [hl], e ; song number
inc hl
- ld [hl], d ; MusicIDHi (always $)
+ ld [hl], d ; (always 0)
ld hl, Music
add hl, de ; three
add hl, de ; byte
@@ -2466,8 +2465,8 @@ _PlayMusic:: ; e8b30
ld [Channel2JumpCondition], a
ld [Channel3JumpCondition], a
ld [Channel4JumpCondition], a
- ld [NoiseSampleAddressLo], a
- ld [NoiseSampleAddressHi], a
+ ld [NoiseSampleAddress], a
+ ld [NoiseSampleAddress + 1], a
ld [wNoiseSampleDelay], a
ld [MusicNoiseSampleSet], a
call MusicOn
@@ -2552,7 +2551,7 @@ _PlayCryHeader:: ; e8b79
; This only applies in-battle.
ld a, [Options]
- bit 5, a ; stereo
+ bit STEREO, a
jr z, .next
; [Tracks] &= [CryTracks]
@@ -2577,7 +2576,7 @@ _PlayCryHeader:: ; e8b79
ld a, [Volume]
ld [LastVolume], a
- ld a, $77
+ ld a, MAX_VOLUME
ld [Volume], a
.end
@@ -2647,8 +2646,8 @@ _PlaySFX:: ; e8c04
ld a, $80
ld [rNR44], a ; restart sound (freq hi = 0)
xor a
- ld [NoiseSampleAddressLo], a
- ld [NoiseSampleAddressHi], a
+ ld [NoiseSampleAddress], a
+ ld [NoiseSampleAddress + 1], a
.chscleared
; start reading sfx header for # chs
ld hl, MusicID
@@ -2696,7 +2695,7 @@ PlayStereoSFX:: ; e8ca6
; standard procedure if stereo's off
ld a, [Options]
- bit 5, a
+ bit STEREO, a
jp z, _PlaySFX
; else, let's go ahead with this
@@ -2825,9 +2824,9 @@ LoadChannel: ; e8d1b
; load music id
ld hl, Channel1MusicID - Channel1
add hl, bc
- ld a, [MusicIDLo]
+ ld a, [MusicID]
ld [hli], a
- ld a, [MusicIDHi]
+ ld a, [MusicID + 1]
ld [hl], a
; load music bank
ld hl, Channel1MusicBank - Channel1
@@ -2882,356 +2881,19 @@ LoadMusicByte:: ; e8d76
; e8d80
-FrequencyTable: ; e8d80
- dw 0 ; __
- dw $f82c ; C_
- dw $f89d ; C#
- dw $f907 ; D_
- dw $f96b ; D#
- dw $f9ca ; E_
- dw $fa23 ; F_
- dw $fa77 ; F#
- dw $fac7 ; G_
- dw $fb12 ; G#
- dw $fb58 ; A_
- dw $fb9b ; A#
- dw $fbda ; B_
- dw $fc16 ; C_
- dw $fc4e ; C#
- dw $fc83 ; D_
- dw $fcb5 ; D#
- dw $fce5 ; E_
- dw $fd11 ; F_
- dw $fd3b ; F#
- dw $fd63 ; G_
- dw $fd89 ; G#
- dw $fdac ; A_
- dw $fdcd ; A#
- dw $fded ; B_
-; e8db2
-
-WaveSamples: ; e8db2
- ; these are streams of 32 4-bit values used as wavepatterns
- ; nothing interesting here!
- dn 0, 2, 4, 6, 8, 10, 12, 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1
- dn 0, 2, 4, 6, 8, 10, 12, 14, 14, 15, 15, 15, 15, 14, 14, 14, 13, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 1, 1
- dn 1, 3, 6, 9, 11, 13, 14, 14, 14, 14, 15, 15, 15, 15, 14, 13, 13, 14, 15, 15, 15, 15, 14, 14, 14, 14, 13, 11, 9, 6, 3, 1
- dn 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 15, 14, 13, 14, 15, 15, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
- dn 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 14, 15, 7, 7, 15, 14, 14, 13, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1, 0
- dn 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 3, 3, 2, 2, 1, 1, 15, 15, 14, 14, 12, 12, 10, 10, 8, 8, 10, 10, 12, 12, 14, 14
- dn 0, 2, 4, 6, 8, 10, 12, 14, 12, 11, 10, 9, 8, 7, 6, 5, 15, 15, 15, 14, 14, 13, 13, 12, 4, 4, 3, 3, 2, 2, 1, 1
- dn 12, 0, 10, 9, 8, 7, 15, 5, 15, 15, 15, 14, 14, 13, 13, 12, 4, 4, 3, 3, 2, 2, 15, 1, 0, 2, 4, 6, 8, 10, 12, 14
- dn 4, 4, 3, 3, 2, 2, 1, 15, 0, 0, 4, 6, 8, 10, 12, 14, 15, 8, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5
- dn 1, 1, 0, 0, 0, 0, 0, 8, 0, 0, 1, 3, 5, 7, 9, 10, 11, 4, 11, 10, 10, 9, 9, 8, 8, 7, 6, 5, 4, 3, 2, 1
-; e8e52
-
-Drumkits: ; e8e52
- dw Drumkit0
- dw Drumkit1
- dw Drumkit2
- dw Drumkit3
- dw Drumkit4
- dw Drumkit5
-; e8e5e
-
-Drumkit0: ; e8e5e
- dw Drum00 ; rest
- dw Snare1 ; c
- dw Snare2 ; c#
- dw Snare3 ; d
- dw Snare4 ; d#
- dw Drum05 ; e
- dw Triangle1 ; f
- dw Triangle2 ; f#
- dw HiHat1 ; g
- dw Snare5 ; g#
- dw Snare6 ; a
- dw Snare7 ; a#
- dw HiHat2 ; b
-Drumkit1: ; e8e78
- dw Drum00
- dw HiHat1
- dw Snare5
- dw Snare6
- dw Snare7
- dw HiHat2
- dw HiHat3
- dw Snare8
- dw Triangle3
- dw Triangle4
- dw Snare9
- dw Snare10
- dw Snare11
-Drumkit2: ; e8e92
- dw Drum00
- dw Snare1
- dw Snare9
- dw Snare10
- dw Snare11
- dw Drum05
- dw Triangle1
- dw Triangle2
- dw HiHat1
- dw Snare5
- dw Snare6
- dw Snare7
- dw HiHat2
-Drumkit3: ; e8eac
- dw Drum21
- dw Snare12
- dw Snare13
- dw Snare14
- dw Kick1
- dw Triangle5
- dw Drum20
- dw Drum27
- dw Drum28
- dw Drum29
- dw Drum21
- dw Kick2
- dw Crash2
-Drumkit4: ; e8ec6
- dw Drum21
- dw Drum20
- dw Snare13
- dw Snare14
- dw Kick1
- dw Drum33
- dw Triangle5
- dw Drum35
- dw Drum31
- dw Drum32
- dw Drum36
- dw Kick2
- dw Crash1
-Drumkit5: ; e8ee0
- dw Drum00
- dw Snare9
- dw Snare10
- dw Snare11
- dw Drum27
- dw Drum28
- dw Drum29
- dw Drum05
- dw Triangle1
- dw Crash1
- dw Snare14
- dw Snare13
- dw Kick2
-; e8efa
-
-Drum00: ; e8efa
-; unused
- noise C#, 1, $11, $00
- endchannel
-; e8efe
-
-Snare1: ; e8efe
- noise C#, 1, $c1, $33
- endchannel
-; e8f02
-
-Snare2: ; e8f02
- noise C#, 1, $b1, $33
- endchannel
-; e8f06
-
-Snare3: ; e8f06
- noise C#, 1, $a1, $33
- endchannel
-; e8f0a
-
-Snare4: ; e8f0a
- noise C#, 1, $81, $33
- endchannel
-; e8f0e
-
-Drum05: ; e8f0e
- noise C#, 8, $84, $37
- noise C#, 7, $84, $36
- noise C#, 6, $83, $35
- noise C#, 5, $83, $34
- noise C#, 4, $82, $33
- noise C#, 3, $81, $32
- endchannel
-; e8f21
-
-Triangle1: ; e8f21
- noise C#, 1, $51, $2a
- endchannel
-; e8f25
-
-Triangle2: ; e8f25
- noise C#, 2, $41, $2b
- noise C#, 1, $61, $2a
- endchannel
-; e8f2c
-
-HiHat1: ; e8f2c
- noise C#, 1, $81, $10
- endchannel
-; e8f30
-
-Snare5: ; e8f30
- noise C#, 1, $82, $23
- endchannel
-; e8f34
-
-Snare6: ; e8f34
- noise C#, 1, $82, $25
- endchannel
-; e8f38
-
-Snare7: ; e8f38
- noise C#, 1, $82, $26
- endchannel
-; e8f3c
-
-HiHat2: ; e8f3c
- noise C#, 1, $a1, $10
- endchannel
-; e8f40
-
-HiHat3: ; e8f40
- noise C#, 1, $a2, $11
- endchannel
-; e8f44
-
-Snare8: ; e8f44
- noise C#, 1, $a2, $50
- endchannel
-; e8f48
-
-Triangle3: ; e8f48
- noise C#, 1, $a1, $18
- noise C#, 1, $31, $33
- endchannel
-; e8f4f
-
-Triangle4: ; e8f4f
- noise C#, 3, $91, $28
- noise C#, 1, $71, $18
- endchannel
-; e8f56
-
-Snare9: ; e8f56
- noise C#, 1, $91, $22
- endchannel
-; e8f5a
-
-Snare10: ; e8f5a
- noise C#, 1, $71, $22
- endchannel
-; e8f5e
-
-Snare11: ; e8f5e
- noise C#, 1, $61, $22
- endchannel
-; e8f62
-
-Drum20: ; e8f62
- noise C#, 1, $11, $11
- endchannel
-; e8f66
-
-Drum21: ; e8f66
- endchannel
-; e8f67
-
-Snare12: ; e8f67
- noise C#, 1, $91, $33
- endchannel
-; e8f6b
-
-Snare13: ; e8f6b
- noise C#, 1, $51, $32
- endchannel
-; e8f6f
-
-Snare14: ; e8f6f
- noise C#, 1, $81, $31
- endchannel
-; e8f73
-
-Kick1: ; e8f73
- noise C#, 1, $88, $6b
- noise C#, 1, $71, $00
- endchannel
-; e8f7a
-
-Triangle5: ; e8f7a
- noise D_, 1, $91, $18
- endchannel
-; e8f7e
-
-Drum27: ; e8f7e
- noise C#, 8, $92, $10
- endchannel
-; e8f82
-
-Drum28: ; e8f82
- noise D_, 4, $91, $00
- noise D_, 4, $11, $00
- endchannel
-; e8f89
-
-Drum29: ; e8f89
- noise D_, 4, $91, $11
- noise D_, 4, $11, $00
- endchannel
-; e8f90
-
-Crash1: ; e8f90
- noise D_, 4, $88, $15
- noise C#, 1, $65, $12
- endchannel
-; e8f97
-
-Drum31: ; e8f97
- noise D_, 4, $51, $21
- noise D_, 4, $11, $11
- endchannel
-; e8f9e
-
-Drum32: ; e8f9e
- noise D_, 4, $51, $50
- noise D_, 4, $11, $11
- endchannel
-; e8fa5
-
-Drum33: ; e8fa5
- noise C#, 1, $a1, $31
- endchannel
-; e8fa9
-
-Crash2: ; e8fa9
- noise C#, 1, $84, $12
- endchannel
-; e8fad
-
-Drum35: ; e8fad
- noise D_, 4, $81, $00
- noise D_, 4, $11, $00
- endchannel
-; e8fb4
-
-Drum36: ; e8fb4
- noise D_, 4, $81, $21
- noise D_, 4, $11, $11
- endchannel
-; e8fbb
-
-Kick2: ; e8fbb
- noise C#, 1, $a8, $6b
- noise C#, 1, $71, $00
- endchannel
-; e8fc2
+
+INCLUDE "audio/notes.asm"
+
+INCLUDE "audio/wave_samples.asm"
+
+INCLUDE "audio/drumkits.asm"
+
GetLRTracks: ; e8fc2
; gets the default sound l/r channels
; stores mono/stereo table in hl
ld a, [Options]
- bit 5, a ; stereo
+ bit STEREO, a
; made redundant, could have had a purpose in gold
jr nz, .stereo
ld hl, MonoTracks
@@ -3279,7 +2941,7 @@ ClearChannels:: ; e8fe9
ld a, $80
ld [hli], a
ld hl, rNR10
- ld e, $4
+ ld e, NUM_MUSIC_CHANS
.loop
call ClearChannel
dec e
@@ -3306,3 +2968,24 @@ ClearChannel: ; e8ffe
ret
; e900a
+
+PlayTrainerEncounterMusic:: ; e900a
+; input: e = trainer type
+ ; turn fade off
+ xor a
+ ld [MusicFade], a
+ ; play nothing for one frame
+ push de
+ ld de, MUSIC_NONE
+ call PlayMusic
+ call DelayFrame
+ ; play new song
+ call MaxVolume
+ pop de
+ ld d, $00
+ ld hl, TrainerEncounterMusic
+ add hl, de
+ ld e, [hl]
+ call PlayMusic
+ ret
+; e9027
diff --git a/audio/music_pointers.asm b/audio/music_pointers.asm
index 5bc3b44be..eb6869896 100644
--- a/audio/music_pointers.asm
+++ b/audio/music_pointers.asm
@@ -1,6 +1,8 @@
; See song sections in audio.asm.
-; e906e
+Music: ; e906e
+; entries correspond to MUSIC_* constants
+
dba Music_Nothing ; 0xe91a3
dba Music_TitleScreen ; 0xeb808
dba Music_Route1 ; 0xec000
diff --git a/audio/notes.asm b/audio/notes.asm
new file mode 100644
index 000000000..543672a4a
--- /dev/null
+++ b/audio/notes.asm
@@ -0,0 +1,27 @@
+FrequencyTable: ; e8d80
+ dw 0 ; __
+ dw $f82c ; C_
+ dw $f89d ; C#
+ dw $f907 ; D_
+ dw $f96b ; D#
+ dw $f9ca ; E_
+ dw $fa23 ; F_
+ dw $fa77 ; F#
+ dw $fac7 ; G_
+ dw $fb12 ; G#
+ dw $fb58 ; A_
+ dw $fb9b ; A#
+ dw $fbda ; B_
+ dw $fc16 ; C_
+ dw $fc4e ; C#
+ dw $fc83 ; D_
+ dw $fcb5 ; D#
+ dw $fce5 ; E_
+ dw $fd11 ; F_
+ dw $fd3b ; F#
+ dw $fd63 ; G_
+ dw $fd89 ; G#
+ dw $fdac ; A_
+ dw $fdcd ; A#
+ dw $fded ; B_
+; e8db2
diff --git a/audio/sfx.asm b/audio/sfx.asm
index 0a13717e2..a47f521e0 100644
--- a/audio/sfx.asm
+++ b/audio/sfx.asm
@@ -968,14 +968,14 @@ Sfx_Fanfare2: ; f0d56
musicheader 1, 8, Sfx_Fanfare2_Ch8
; f0d5f
-UnknownSfx: ; f0d5f
- musicheader 4, 5, UnknownSfx_Ch5
- musicheader 1, 6, UnknownSfx_Ch6
- musicheader 1, 7, UnknownSfx_Ch7
- musicheader 1, 8, UnknownSfx_Ch8
+UnusedSfx: ; f0d5f
+ musicheader 4, 5, UnusedSfx_Ch5
+ musicheader 1, 6, UnusedSfx_Ch6
+ musicheader 1, 7, UnusedSfx_Ch7
+ musicheader 1, 8, UnusedSfx_Ch8
; f0d6b
-UnknownSfx_Ch5: ; f0d6b
+UnusedSfx_Ch5: ; f0d6b
togglesfx
tempo 124
volume $77
@@ -1000,7 +1000,7 @@ UnknownSfx_Ch5: ; f0d6b
endchannel
; f0d8a
-UnknownSfx_Ch6: ; f0d8a
+UnusedSfx_Ch6: ; f0d8a
togglesfx
vibrato $8, $27
dutycycle $2
@@ -1025,7 +1025,7 @@ UnknownSfx_Ch6: ; f0d8a
endchannel
; f0da6
-UnknownSfx_Ch7: ; f0da6
+UnusedSfx_Ch7: ; f0da6
togglesfx
notetype $c, $25
octave 4
@@ -1041,7 +1041,7 @@ UnknownSfx_Ch7: ; f0da6
endchannel
; f0db6
-UnknownSfx_Ch8: ; f0db6
+UnusedSfx_Ch8: ; f0db6
togglesfx
sfxtogglenoise $4
notetype $c
@@ -1211,16 +1211,16 @@ Sfx_3RdPlace_Ch7: ; f0e56
togglesfx
-Sfx_GetEggFromDaycareLady: ; f0e66
-Sfx_GetEggFromDaycareMan: ; f0e66
- musicheader 4, 5, Sfx_GetEggFromDaycareLady_Ch5
- musicheader 1, 6, Sfx_GetEggFromDaycareLady_Ch6
- musicheader 1, 7, Sfx_GetEggFromDaycareLady_Ch7
- musicheader 1, 8, Sfx_GetEggFromDaycareLady_Ch8
+Sfx_GetEggFromDayCareLady: ; f0e66
+Sfx_GetEggFromDayCareMan: ; f0e66
+ musicheader 4, 5, Sfx_GetEggFromDayCareLady_Ch5
+ musicheader 1, 6, Sfx_GetEggFromDayCareLady_Ch6
+ musicheader 1, 7, Sfx_GetEggFromDayCareLady_Ch7
+ musicheader 1, 8, Sfx_GetEggFromDayCareLady_Ch8
; f0e72
-Sfx_GetEggFromDaycareLady_Ch5: ; f0e72
-Sfx_GetEggFromDaycareMan_Ch5: ; f0e72
+Sfx_GetEggFromDayCareLady_Ch5: ; f0e72
+Sfx_GetEggFromDayCareMan_Ch5: ; f0e72
togglesfx
tempo 120
volume $77
@@ -1253,8 +1253,8 @@ Sfx_GetEggFromDaycareMan_Ch5: ; f0e72
togglesfx
-Sfx_GetEggFromDaycareLady_Ch6: ; f0e9b
-Sfx_GetEggFromDaycareMan_Ch6: ; f0e9b
+Sfx_GetEggFromDayCareLady_Ch6: ; f0e9b
+Sfx_GetEggFromDayCareMan_Ch6: ; f0e9b
togglesfx
vibrato $12, $34
dutycycle $3
@@ -1284,8 +1284,8 @@ Sfx_GetEggFromDaycareMan_Ch6: ; f0e9b
togglesfx
-Sfx_GetEggFromDaycareLady_Ch7: ; f0ebe
-Sfx_GetEggFromDaycareMan_Ch7: ; f0ebe
+Sfx_GetEggFromDayCareLady_Ch7: ; f0ebe
+Sfx_GetEggFromDayCareMan_Ch7: ; f0ebe
togglesfx
notetype $8, $25
note __, 2
@@ -1305,8 +1305,8 @@ Sfx_GetEggFromDaycareMan_Ch7: ; f0ebe
togglesfx
-Sfx_GetEggFromDaycareLady_Ch8: ; f0ed0
-Sfx_GetEggFromDaycareMan_Ch8: ; f0ed0
+Sfx_GetEggFromDayCareLady_Ch8: ; f0ed0
+Sfx_GetEggFromDayCareMan_Ch8: ; f0ed0
togglesfx
sfxtogglenoise $4
notetype $8
diff --git a/audio/sfx_pointers.asm b/audio/sfx_pointers.asm
index 270d4f94e..64c4108c8 100644
--- a/audio/sfx_pointers.asm
+++ b/audio/sfx_pointers.asm
@@ -1,4 +1,6 @@
-; e927c
+SFX: ; e927c
+; entries correspond to SFX_* constants
+
dba Sfx_DexFanfare5079
dba Sfx_Item
dba Sfx_CaughtMon
@@ -148,8 +150,8 @@
dba Sfx_Fanfare2
dba Sfx_RegisterPhoneNumber
dba Sfx_3RdPlace
- dba Sfx_GetEggFromDaycareMan
- dba Sfx_GetEggFromDaycareLady
+ dba Sfx_GetEggFromDayCareMan
+ dba Sfx_GetEggFromDayCareLady
dba Sfx_MoveDeleted
dba Sfx_2ndPlace
dba Sfx_1stPlace
diff --git a/audio/trainer_encounters.asm b/audio/trainer_encounters.asm
deleted file mode 100644
index e909c96e6..000000000
--- a/audio/trainer_encounters.asm
+++ /dev/null
@@ -1,96 +0,0 @@
-; Currently, must be in the same bank as the sound engine.
-
-PlayTrainerEncounterMusic:: ; e900a
-; input: e = trainer type
- ; turn fade off
- xor a
- ld [MusicFade], a
- ; play nothing for one frame
- push de
- ld de, 0 ; id: Music_Nothing
- call PlayMusic
- call DelayFrame
- ; play new song
- call MaxVolume
- pop de
- ld d, $00
- ld hl, TrainerEncounterMusic
- add hl, de
- ld e, [hl]
- call PlayMusic
- ret
-; e9027
-
-TrainerEncounterMusic: ; e9027
- db MUSIC_HIKER_ENCOUNTER
- db MUSIC_YOUNGSTER_ENCOUNTER ; falkner
- db MUSIC_LASS_ENCOUNTER ; whitney
- db MUSIC_YOUNGSTER_ENCOUNTER ; bugsy
- db MUSIC_OFFICER_ENCOUNTER ; morty
- db MUSIC_OFFICER_ENCOUNTER ; pryce
- db MUSIC_LASS_ENCOUNTER ; jasmine
- db MUSIC_OFFICER_ENCOUNTER ; chuck
- db MUSIC_BEAUTY_ENCOUNTER ; clair
- db MUSIC_RIVAL_ENCOUNTER ; rival1
- db MUSIC_HIKER_ENCOUNTER ; pokemon_prof
- db MUSIC_HIKER_ENCOUNTER ; will
- db MUSIC_HIKER_ENCOUNTER ; cal
- db MUSIC_OFFICER_ENCOUNTER ; bruno
- db MUSIC_HIKER_ENCOUNTER ; karen
- db MUSIC_HIKER_ENCOUNTER ; koga
- db MUSIC_OFFICER_ENCOUNTER ; champion
- db MUSIC_YOUNGSTER_ENCOUNTER ; brock
- db MUSIC_LASS_ENCOUNTER ; misty
- db MUSIC_OFFICER_ENCOUNTER ; lt_surge
- db MUSIC_ROCKET_ENCOUNTER ; scientist
- db MUSIC_OFFICER_ENCOUNTER ; erika
- db MUSIC_YOUNGSTER_ENCOUNTER ; youngster
- db MUSIC_YOUNGSTER_ENCOUNTER ; schoolboy
- db MUSIC_YOUNGSTER_ENCOUNTER ; bird_keeper
- db MUSIC_LASS_ENCOUNTER ; lass
- db MUSIC_LASS_ENCOUNTER ; janine
- db MUSIC_HIKER_ENCOUNTER ; cooltrainerm
- db MUSIC_BEAUTY_ENCOUNTER ; cooltrainerf
- db MUSIC_BEAUTY_ENCOUNTER ; beauty
- db MUSIC_POKEMANIAC_ENCOUNTER ; pokemaniac
- db MUSIC_ROCKET_ENCOUNTER ; gruntm
- db MUSIC_HIKER_ENCOUNTER ; gentleman
- db MUSIC_BEAUTY_ENCOUNTER ; skier
- db MUSIC_BEAUTY_ENCOUNTER ; teacher
- db MUSIC_BEAUTY_ENCOUNTER ; sabrina
- db MUSIC_YOUNGSTER_ENCOUNTER ; bug_catcher
- db MUSIC_HIKER_ENCOUNTER ; fisher
- db MUSIC_HIKER_ENCOUNTER ; swimmerm
- db MUSIC_BEAUTY_ENCOUNTER ; swimmerf
- db MUSIC_HIKER_ENCOUNTER ; sailor
- db MUSIC_POKEMANIAC_ENCOUNTER ; super_nerd
- db MUSIC_RIVAL_ENCOUNTER ; rival2
- db MUSIC_HIKER_ENCOUNTER ; guitarist
- db MUSIC_HIKER_ENCOUNTER ; hiker
- db MUSIC_HIKER_ENCOUNTER ; biker
- db MUSIC_OFFICER_ENCOUNTER ; blaine
- db MUSIC_POKEMANIAC_ENCOUNTER ; burglar
- db MUSIC_HIKER_ENCOUNTER ; firebreather
- db MUSIC_POKEMANIAC_ENCOUNTER ; juggler
- db MUSIC_HIKER_ENCOUNTER ; blackbelt_t
- db MUSIC_ROCKET_ENCOUNTER ; executivem
- db MUSIC_YOUNGSTER_ENCOUNTER ; psychic_t
- db MUSIC_LASS_ENCOUNTER ; picnicker
- db MUSIC_YOUNGSTER_ENCOUNTER ; camper
- db MUSIC_ROCKET_ENCOUNTER ; executivef
- db MUSIC_SAGE_ENCOUNTER ; sage
- db MUSIC_SAGE_ENCOUNTER ; medium
- db MUSIC_HIKER_ENCOUNTER ; boarder
- db MUSIC_HIKER_ENCOUNTER ; pokefanm
- db MUSIC_KIMONO_ENCOUNTER ; kimono_girl
- db MUSIC_LASS_ENCOUNTER ; twins
- db MUSIC_BEAUTY_ENCOUNTER ; pokefanf
- db MUSIC_HIKER_ENCOUNTER ; red
- db MUSIC_RIVAL_ENCOUNTER ; blue
- db MUSIC_HIKER_ENCOUNTER ; officer
- db MUSIC_ROCKET_ENCOUNTER ; gruntf
- db MUSIC_HIKER_ENCOUNTER ; mysticalman
- db MUSIC_HIKER_ENCOUNTER
- db MUSIC_HIKER_ENCOUNTER
- db MUSIC_HIKER_ENCOUNTER
-; e906e
diff --git a/audio/wave_samples.asm b/audio/wave_samples.asm
new file mode 100644
index 000000000..8c5bafa75
--- /dev/null
+++ b/audio/wave_samples.asm
@@ -0,0 +1,14 @@
+WaveSamples: ; e8db2
+ ; these are streams of 32 4-bit values used as wavepatterns
+ ; nothing interesting here!
+ dn 0, 2, 4, 6, 8, 10, 12, 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1
+ dn 0, 2, 4, 6, 8, 10, 12, 14, 14, 15, 15, 15, 15, 14, 14, 14, 13, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 1, 1
+ dn 1, 3, 6, 9, 11, 13, 14, 14, 14, 14, 15, 15, 15, 15, 14, 13, 13, 14, 15, 15, 15, 15, 14, 14, 14, 14, 13, 11, 9, 6, 3, 1
+ dn 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 15, 14, 13, 14, 15, 15, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
+ dn 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 14, 15, 7, 7, 15, 14, 14, 13, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1, 0
+ dn 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 3, 3, 2, 2, 1, 1, 15, 15, 14, 14, 12, 12, 10, 10, 8, 8, 10, 10, 12, 12, 14, 14
+ dn 0, 2, 4, 6, 8, 10, 12, 14, 12, 11, 10, 9, 8, 7, 6, 5, 15, 15, 15, 14, 14, 13, 13, 12, 4, 4, 3, 3, 2, 2, 1, 1
+ dn 12, 0, 10, 9, 8, 7, 15, 5, 15, 15, 15, 14, 14, 13, 13, 12, 4, 4, 3, 3, 2, 2, 15, 1, 0, 2, 4, 6, 8, 10, 12, 14
+ dn 4, 4, 3, 3, 2, 2, 1, 15, 0, 0, 4, 6, 8, 10, 12, 14, 15, 8, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5
+ dn 1, 1, 0, 0, 0, 0, 0, 8, 0, 0, 1, 3, 5, 7, 9, 10, 11, 4, 11, 10, 10, 9, 9, 8, 8, 7, 6, 5, 4, 3, 2, 1
+; e8e52
diff --git a/battle/ai/items.asm b/battle/ai/items.asm
index 325c7b555..09595077a 100644
--- a/battle/ai/items.asm
+++ b/battle/ai/items.asm
@@ -9,7 +9,7 @@ AI_SwitchOrTryItem: ; 38000
and a
ret nz
- callba CheckEnemyLockedIn
+ farcall CheckEnemyLockedIn
ret nz
ld a, [PlayerSubStatus5]
@@ -27,7 +27,7 @@ AI_SwitchOrTryItem: ; 38000
ld a, [TrainerClass]
dec a
- ld bc, 7
+ ld bc, NUM_TRAINER_ATTRIBUTES
call AddNTimes
.ok
bit SWITCH_OFTEN_F, [hl]
@@ -44,7 +44,7 @@ DontSwitch: ; 38041
; 38045
SwitchOften: ; 38045
- callab CheckAbleToSwitch
+ callfar CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
@@ -80,7 +80,7 @@ SwitchOften: ; 38045
; 38083
SwitchRarely: ; 38083
- callab CheckAbleToSwitch
+ callfar CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
@@ -115,7 +115,7 @@ SwitchRarely: ; 38083
; 380c1
SwitchSometimes: ; 380c1
- callab CheckAbleToSwitch
+ callfar CheckAbleToSwitch
ld a, [wEnemySwitchMonParam]
and $f0
jp z, DontSwitch
@@ -174,8 +174,8 @@ AI_TryItem: ; 38105
ld a, [TrainerClass]
dec a
- ld hl, TrainerClassAttributes + 5
- ld bc, 7
+ ld hl, TrainerClassAttributes + TRNATTR_AI_ITEM_SWITCH
+ ld bc, NUM_TRAINER_ATTRIBUTES
call AddNTimes
ld b, h
ld c, l
@@ -358,12 +358,12 @@ AI_Items: ; 39196
ld a, [bc]
bit CONTEXT_USE_F, a
jr nz, .CheckHalfOrQuarterHP
- callab AICheckEnemyHalfHP
+ callfar AICheckEnemyHalfHP
jp c, .DontUse
ld a, [bc]
bit UNKNOWN_USE_F, a
jp nz, .CheckQuarterHP
- callab AICheckEnemyQuarterHP
+ callfar AICheckEnemyQuarterHP
jp nc, .UseHealItem
call Random
cp 1 + 50 percent
@@ -371,7 +371,7 @@ AI_Items: ; 39196
jp .DontUse
.CheckQuarterHP: ; 38254 (e:4254)
- callab AICheckEnemyQuarterHP
+ callfar AICheckEnemyQuarterHP
jp c, .DontUse
call Random
cp -1 + 20 percent
@@ -379,9 +379,9 @@ AI_Items: ; 39196
jr .UseHealItem
.CheckHalfOrQuarterHP: ; 38267 (e:4267)
- callab AICheckEnemyHalfHP
+ callfar AICheckEnemyHalfHP
jp c, .DontUse
- callab AICheckEnemyQuarterHP
+ callfar AICheckEnemyQuarterHP
jp nc, .UseHealItem
call Random
cp -1 + 20 percent
@@ -416,7 +416,7 @@ AI_Items: ; 39196
; 382ae
.asm_382ae ; This appears to be unused
- callab AICheckEnemyMaxHP
+ callfar AICheckEnemyMaxHP
jr c, .dont_use
push bc
ld de, EnemyMonMaxHP + 1
@@ -433,7 +433,7 @@ AI_Items: ; 39196
ld a, c
cp b
jp c, .check_50_percent
- callab AICheckEnemyQuarterHP
+ callfar AICheckEnemyQuarterHP
jr c, .check_40_percent
.check_50_percent
@@ -545,7 +545,7 @@ AI_Items: ; 39196
AIUpdateHUD: ; 38387
call UpdateEnemyMonInParty
- callba UpdateEnemyHUD
+ farcall UpdateEnemyHUD
ld a, $1
ld [hBGMapMode], a
ld hl, wEnemyItemState
@@ -705,7 +705,7 @@ AI_Switch: ; 3846c
res SUBSTATUS_RAGE, [hl]
xor a
ld [hBattleTurn], a
- callab PursuitSwitch
+ callfar PursuitSwitch
push af
ld a, [CurOTMon]
@@ -726,12 +726,12 @@ AI_Switch: ; 3846c
.skiptext
ld a, 1
ld [wBattleHasJustStarted], a
- callab NewEnemyMonStatus
- callab ResetEnemyStatLevels
+ callfar NewEnemyMonStatus
+ callfar ResetEnemyStatLevels
ld hl, PlayerSubStatus1
res SUBSTATUS_IN_LOVE, [hl]
- callba EnemySwitch
- callba ResetBattleParticipants
+ farcall EnemySwitch
+ farcall ResetBattleParticipants
xor a
ld [wBattleHasJustStarted], a
ld a, [wLinkMode]
@@ -749,7 +749,7 @@ TextJump_EnemyWithdrew: ; 384d0
Function384d5: ; This appears to be unused
call AIUsedItemSound
call AI_HealStatus
- ld a, X_SPEED
+ ld a, FULL_HEAL_RED ; X_SPEED
jp PrintText_UsedItemOn_AND_AIUpdateHUD
; 384e0
@@ -761,6 +761,10 @@ AI_HealStatus: ; 384e0
xor a
ld [hl], a
ld [EnemyMonStatus], a
+ ; Bug: this should reset SUBSTATUS_NIGHTMARE too
+ ; Uncomment the lines below to fix
+ ; ld hl, EnemySubStatus1
+ ; res SUBSTATUS_NIGHTMARE, [hl]
ld hl, EnemySubStatus5
res SUBSTATUS_TOXIC, [hl]
ret
@@ -847,7 +851,7 @@ EnemyUsedXItem:
push bc
call PrintText_UsedItemOn
pop bc
- callba CheckIfStatCanBeRaised
+ farcall CheckIfStatCanBeRaised
jp AIUpdateHUD
; 38568
diff --git a/battle/ai/move.asm b/battle/ai/move.asm
index 6e5aca358..11586c0da 100755
--- a/battle/ai/move.asm
+++ b/battle/ai/move.asm
@@ -12,7 +12,7 @@ AIChooseMove: ; 440ce
ret nz
; No use picking a move if there's no choice.
- callba CheckEnemyLockedIn
+ farcall CheckEnemyLockedIn
ret nz
diff --git a/battle/ai/redundant.asm b/battle/ai/redundant.asm
index e3dda8c4b..2e8f7c6df 100755
--- a/battle/ai/redundant.asm
+++ b/battle/ai/redundant.asm
@@ -141,7 +141,7 @@ AI_Redundant: ; 2c41a
jr .NotRedundant
.Attract: ; 2c4fe
- callba CheckOppositeGender
+ farcall CheckOppositeGender
jr c, .Redundant
ld a, [PlayerSubStatus1]
bit SUBSTATUS_IN_LOVE, a
@@ -184,7 +184,7 @@ AI_Redundant: ; 2c41a
.MorningSun:
.Synthesis:
.Moonlight: ; 2c539
- callba AICheckEnemyMaxHP
+ farcall AICheckEnemyMaxHP
jr nc, .NotRedundant
.Teleport:
diff --git a/battle/ai/scoring.asm b/battle/ai/scoring.asm
index b52f37311..6391e3b29 100644
--- a/battle/ai/scoring.asm
+++ b/battle/ai/scoring.asm
@@ -1,3 +1,5 @@
+AIScoring: ; 38591
+
AI_Basic: ; 38591
; Don't do anything redundant:
; -Using status-only moves if the player can't be statused
@@ -27,7 +29,7 @@ AI_Basic: ; 38591
push hl
push de
push bc
- callba AI_Redundant
+ farcall AI_Redundant
pop bc
pop de
pop hl
@@ -174,7 +176,7 @@ AI_Types: ; 38635
push de
ld a, 1
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
pop de
pop bc
pop hl
@@ -427,7 +429,7 @@ AI_Smart_LeechHit: ; 387f7
push hl
ld a, 1
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
pop hl
; 60% chance to discourage this move if not very effective.
@@ -508,7 +510,7 @@ AI_Smart_LockOn: ; 3881d
push hl
push bc
- callba BattleCheckTypeMatchup
+ farcall BattleCheckTypeMatchup
ld a, [wd265]
cp $a
pop bc
@@ -570,7 +572,7 @@ AI_Smart_Selfdestruct: ; 388a6
; Unless this is the enemy's last Pokemon...
push hl
- callba FindAliveEnemyMons
+ farcall FindAliveEnemyMons
pop hl
jr nc, .asm_388b7
@@ -968,7 +970,7 @@ AI_Smart_ForceSwitch: ; 38a2a
; Consider player's type(s) if its moves are unknown.
push hl
- callab CheckPlayerMoveTypeMatchups
+ callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp 10 ; neutral
pop hl
@@ -1366,7 +1368,7 @@ AI_Smart_Mimic: ; 38ba8
ld a, $1
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
ld a, [wd265]
cp $a
@@ -1761,9 +1763,9 @@ AI_Smart_PriorityHit: ; 38d5a
ld a, $1
ld [hBattleTurn], a
push hl
- callab EnemyAttackDamage
- callab BattleCommand_DamageCalc
- callab BattleCommand_Stab
+ callfar EnemyAttackDamage
+ callfar BattleCommand_DamageCalc
+ callfar BattleCommand_Stab
pop hl
ld a, [CurDamage + 1]
ld c, a
@@ -1809,7 +1811,7 @@ AI_Smart_Conversion2: ; 38d98
xor a
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
ld a, [wd265]
cp $a
@@ -1874,7 +1876,8 @@ AI_Smart_MeanLook: ; 38dfb
pop hl
jp z, AIDiscourageMove
-; 80% chance to greatly encourage this move if the enemy is badly poisoned (weird).
+; 80% chance to greatly encourage this move if the enemy is badly poisoned (buggy).
+; Should check PlayerSubStatus5 instead.
ld a, [EnemySubStatus5]
bit SUBSTATUS_TOXIC, a
jr nz, .asm_38e26
@@ -1887,7 +1890,7 @@ AI_Smart_MeanLook: ; 38dfb
; Otherwise, discourage this move unless the player only has not very effective moves against the enemy.
push hl
- callab CheckPlayerMoveTypeMatchups
+ callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp $b ; not very effective
pop hl
@@ -2005,7 +2008,7 @@ AI_Smart_Curse: ; 38e5c
jp nz, AIDiscourageMove
push hl
- callba FindAliveEnemyMons
+ farcall FindAliveEnemyMons
pop hl
jr nc, .asm_38eb0
@@ -2134,7 +2137,7 @@ AI_Smart_Foresight: ; 38f1d
AI_Smart_PerishSong: ; 38f4a
push hl
- callab FindAliveEnemyMons
+ callfar FindAliveEnemyMons
pop hl
jr c, .no
@@ -2143,7 +2146,7 @@ AI_Smart_PerishSong: ; 38f4a
jr nz, .yes
push hl
- callab CheckPlayerMoveTypeMatchups
+ callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp 10 ; 1.0
pop hl
@@ -2401,7 +2404,7 @@ AI_Smart_BatonPass: ; 39062
; Consider player's type(s) if its moves are unknown.
push hl
- callab CheckPlayerMoveTypeMatchups
+ callfar CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
cp 10 ; neutral
pop hl
@@ -2463,8 +2466,8 @@ AI_Smart_HiddenPower: ; 3909e
ld [hBattleTurn], a
; Calculate Hidden Power's type and base power based on enemy's DVs.
- callab HiddenPowerDamage
- callab BattleCheckTypeMatchup
+ callfar HiddenPowerDamage
+ callfar BattleCheckTypeMatchup
pop hl
; Discourage Hidden Power if not very effective.
@@ -3333,13 +3336,13 @@ AIDamageCalc: ; 393e7
ld hl, .ConstantDamageEffects
call IsInArray
jr nc, .asm_39400
- callab BattleCommand_ConstantDamage
+ callfar BattleCommand_ConstantDamage
ret
.asm_39400
- callab EnemyAttackDamage
- callab BattleCommand_DamageCalc
- callab BattleCommand_Stab
+ callfar EnemyAttackDamage
+ callfar BattleCommand_DamageCalc
+ callfar BattleCommand_Stab
ret
.ConstantDamageEffects:
@@ -3456,7 +3459,7 @@ AI_Status: ; 39453
push de
ld a, 1
ld [hBattleTurn], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
pop de
pop bc
pop hl
diff --git a/battle/anim_commands.asm b/battle/anim_commands.asm
index 958dcfe40..510f44d2b 100644
--- a/battle/anim_commands.asm
+++ b/battle/anim_commands.asm
@@ -57,11 +57,11 @@ _PlayBattleAnim: ; cc0e4
BattleAnimRunScript: ; cc11c
- ld a, [FXAnimIDHi]
+ ld a, [FXAnimID + 1]
and a
jr nz, .hi_byte
- callba CheckBattleScene
+ farcall CheckBattleScene
jr c, .disabled
call BattleAnimClearHud
@@ -86,9 +86,9 @@ BattleAnimRunScript: ; cc11c
ld de, ANIM_MISS
add hl, de
ld a, l
- ld [FXAnimIDLo], a
+ ld [FXAnimID], a
ld a, h
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
.hi_byte
call WaitSFX
@@ -112,11 +112,11 @@ RunBattleAnimScript: ; cc163
call BattleAnimRequestPals
; Speed up Rollout's animation.
- ld a, [FXAnimIDHi]
+ ld a, [FXAnimID + 1]
or a
jr nz, .not_rollout
- ld a, [FXAnimIDLo]
+ ld a, [FXAnimID]
cp ROLLOUT
jr nz, .not_rollout
@@ -169,7 +169,7 @@ BattleAnimRestoreHuds: ; cc1bb
ld hl, UpdateBattleHuds
ld a, BANK(UpdatePlayerHUD)
- rst FarCall ; Why the heck is this a callab?
+ rst FarCall ; Why not "call UpdateBattleHuds"?
pop af
ld [rSVBK], a
@@ -352,6 +352,7 @@ RunBattleAnimCommand: ; cc25f
BattleAnimCommands:: ; cc2a4 (33:42a4)
+; entries correspond to macros/move_anim.asm enumeration
dw BattleAnimCmd_Obj
dw BattleAnimCmd_1GFX
dw BattleAnimCmd_2GFX
@@ -906,7 +907,7 @@ BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e)
ret
BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0)
- callab GetPokeBallWobble
+ callfar GetPokeBallWobble
ld a, c
ld [BattleAnimVar], a
ret
@@ -931,7 +932,7 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc)
ld hl, BattleMonDVs ; BattleMonDVs
predef GetUnownLetter
ld de, VTiles0 tile $00
- predef GetFrontpic
+ predef GetMonFrontpic
jr .done
.player
@@ -940,7 +941,7 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc)
ld hl, EnemyMonDVs ; EnemyMonDVs
predef GetUnownLetter
ld de, VTiles0 tile $00
- predef GetBackpic
+ predef GetMonBackpic
.done
pop af
@@ -1127,11 +1128,11 @@ BattleAnimCmd_DropSub: ; cc750 (33:4750)
and a
jr z, .player
- callab DropEnemySub
+ callfar DropEnemySub
jr .done
.player
- callab DropPlayerSub
+ callfar DropPlayerSub
.done
pop af
@@ -1158,14 +1159,14 @@ BattleAnimCmd_BeatUp: ; cc776 (33:4776)
ld hl, BattleMonDVs
predef GetUnownLetter
ld de, VTiles2 tile $00
- predef GetFrontpic
+ predef GetMonFrontpic
jr .done
.player
ld hl, EnemyMonDVs
predef GetUnownLetter
ld de, VTiles2 tile $31
- predef GetBackpic
+ predef GetMonBackpic
.done
pop af
@@ -1220,7 +1221,7 @@ BattleAnimCmd_Sound: ; cc7cd (33:47cd)
call GetBattleAnimByte
ld e, a
ld d, 0
- callab PlayStereoSFX
+ callfar PlayStereoSFX
ret
; cc7f8 (33:47f8)
@@ -1310,7 +1311,7 @@ endr
ld a, 1
ld [wStereoPanningMask], a
- callab _PlayCryHeader
+ callfar _PlayCryHeader
.done
pop af
@@ -1393,7 +1394,7 @@ ClearBattleAnims: ; cc8d3
or b
jr nz, .loop
- ld hl, FXAnimIDLo
+ ld hl, FXAnimID
ld e, [hl]
inc hl
ld d, [hl]
@@ -1437,13 +1438,13 @@ BattleAnim_SetBGPals: ; cc91a
ld de, UnknBGPals
ld a, [rBGP]
ld b, a
- ld c, $7
+ ld c, 7
call CopyPals
ld hl, OBPals
ld de, UnknOBPals
ld a, [rBGP]
ld b, a
- ld c, $2
+ ld c, 2
call CopyPals
pop af
ld [rSVBK], a
@@ -1461,11 +1462,11 @@ BattleAnim_SetOBPals: ; cc94b
push af
ld a, $5
ld [rSVBK], a
- ld hl, OBPals + $10
- ld de, UnknOBPals + $10
+ ld hl, OBPals palette PAL_BATTLE_OB_GRAY
+ ld de, UnknOBPals palette PAL_BATTLE_OB_GRAY
ld a, [rOBP0]
ld b, a
- ld c, $2
+ ld c, 2
call CopyPals
pop af
ld [rSVBK], a
diff --git a/battle/bg_effects.asm b/battle/bg_effects.asm
index 22807f77d..cfd342df7 100644
--- a/battle/bg_effects.asm
+++ b/battle/bg_effects.asm
@@ -550,7 +550,7 @@ BattleBGEffect_HeadFollow: ; c8281 (32:4281)
ret
_QueueBattleAnimation: ; c82ee (32:42ee)
- callab QueueBattleAnimation
+ callfar QueueBattleAnimation
ret
BattleBGEffect_27: ; c82f5 (32:42f5)
@@ -868,7 +868,7 @@ BattleBGEffect_RunPicResizeScript: ; c83ed (32:43ed)
.BGSquares:
bgsquare: MACRO
- dn \1,\2
+ dn \1, \2
dw \3
endm
@@ -1538,10 +1538,10 @@ Tackle_BGEffect25_2d_two:
Functionc88a5: ; c88a5 (32:48a5)
push af
- ld a, [FXAnimIDHi] ; FXAnimIDHi
+ ld a, [FXAnimID + 1] ; FXAnimID + 1
or a
jr nz, .not_rollout
- ld a, [FXAnimIDLo] ; FXAnimID
+ ld a, [FXAnimID] ; FXAnimID
cp ROLLOUT
jr z, .rollout
.not_rollout
@@ -2581,8 +2581,8 @@ BGEffects_LoadBGPal0_OBPal1: ; c8e52 (32:4e52)
ld a, h
push bc
push af
- ld hl, BGPals ; BGPals
- ld de, UnknBGPals ; wd000
+ ld hl, BGPals
+ ld de, UnknBGPals
ld b, a
ld c, $1
call CopyPals
@@ -2944,13 +2944,13 @@ BattleBGEffects_CheckSGB: ; c9059 (32:5059)
BattleBGEffects_Sine: ; c905d (32:505d)
ld e, a
- callab BattleAnim_Sine_e
+ callfar BattleAnim_Sine_e
ld a, e
ret
BattleBGEffects_Cosine: ; c9066 (32:5066)
ld e, a
- callab BattleAnim_Cosine_e
+ callfar BattleAnim_Cosine_e
ld a, e
ret
diff --git a/battle/core.asm b/battle/core.asm
index 1bffd407e..9cae539c3 100644
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -175,13 +175,13 @@ BattleTurn: ; 3c12f
call HandleBerserkGene
call UpdateBattleMonInParty
- callba AIChooseMove
+ farcall AIChooseMove
call IsMobileBattle
jr nz, .not_disconnected
- callba Function100da5
- callba StartMobileInactivityTimer
- callba Function100dd8
+ farcall Function100da5
+ farcall StartMobileInactivityTimer
+ farcall Function100dd8
jp c, .quit
.not_disconnected
@@ -377,7 +377,7 @@ HandleBerserkGene: ; 3c27c
.go
push de
push bc
- callab GetUserItem
+ callfar GetUserItem
ld a, [hl]
ld [wd265], a
sub BERSERK_GENE
@@ -405,14 +405,14 @@ HandleBerserkGene: ; 3c27c
ld [hl], a
ld [AttackMissed], a
ld [EffectFailed], a
- callba BattleCommand_AttackUp2
+ farcall BattleCommand_AttackUp2
pop af
pop hl
ld [hl], a
call GetItemName
ld hl, BattleText_UsersStringBuffer1Activated
call StdBattleTextBox
- callab BattleCommand_StatUpMessage
+ callfar BattleCommand_StatUpMessage
pop af
bit SUBSTATUS_CONFUSED, a
ret nz
@@ -473,7 +473,7 @@ DetermineMoveOrder: ; 3c314
jp .player_first
.switch
- callab AI_Switch
+ callfar AI_Switch
call SetEnemyTurn
call SpikesDamage
jp .enemy_first
@@ -489,9 +489,9 @@ DetermineMoveOrder: ; 3c314
.equal_priority
call SetPlayerTurn
- callab GetUserItem
+ callfar GetUserItem
push bc
- callab GetOpponentItem
+ callfar GetOpponentItem
pop de
ld a, d
cp HELD_QUICK_CLAW
@@ -633,7 +633,7 @@ ParsePlayerAction: ; 3c434
xor a
ld [wMoveSelectionMenuType], a
inc a ; POUND
- ld [FXAnimIDLo], a
+ ld [FXAnimID], a
call MoveSelectionScreen
push af
call Call_LoadTempTileMapToTileMap
@@ -651,7 +651,7 @@ ParsePlayerAction: ; 3c434
.encored
call SetPlayerTurn
- callab UpdateMoveData
+ callfar UpdateMoveData
xor a
ld [wPlayerCharging], a
ld a, [wPlayerMoveStruct + MOVE_EFFECT]
@@ -820,41 +820,7 @@ TryEnemyFlee: ; 3c543
ret
; 3c59a
-FleeMons:
-
-SometimesFleeMons: ; 3c59a
- db MAGNEMITE
- db GRIMER
- db TANGELA
- db MR__MIME
- db EEVEE
- db PORYGON
- db DRATINI
- db DRAGONAIR
- db TOGETIC
- db UMBREON
- db UNOWN
- db SNUBBULL
- db HERACROSS
- db -1
-
-OftenFleeMons: ; 3c5a8
- db CUBONE
- db ARTICUNO
- db ZAPDOS
- db MOLTRES
- db QUAGSIRE
- db DELIBIRD
- db PHANPY
- db TEDDIURSA
- db -1
-
-AlwaysFleeMons: ; 3c5b1
- db RAIKOU
- db ENTEI
-; db SUICUNE
- db -1
-; 3c5b4
+INCLUDE "data/battle/flee_mons.asm"
CompareMovePriority: ; 3c5b4
; Compare the priority of the player and enemy's moves.
@@ -876,7 +842,7 @@ GetMovePriority: ; 3c5c5
ld b, a
- ; Vital throw goes last.
+ ; Vital Throw goes last.
cp VITAL_THROW
ld a, 0
ret z
@@ -928,7 +894,7 @@ Battle_EnemyFirst: ; 3c5fe
call SetEnemyTurn
ld a, $1
ld [wEnemyGoesFirst], a
- callab AI_SwitchOrTryItem
+ callfar AI_SwitchOrTryItem
jr c, .switch_item
call EnemyTurn_EndOpponentProtectEndureDestinyBond
call CheckMobileBattleError
@@ -969,7 +935,7 @@ Battle_PlayerFirst: ; 3c664
xor a
ld [wEnemyGoesFirst], a
call SetEnemyTurn
- callab AI_SwitchOrTryItem
+ callfar AI_SwitchOrTryItem
push af
call PlayerTurn_EndOpponentProtectEndureDestinyBond
pop bc
@@ -1018,14 +984,14 @@ Battle_PlayerFirst: ; 3c664
PlayerTurn_EndOpponentProtectEndureDestinyBond: ; 3c6cf
call SetPlayerTurn
call EndUserDestinyBond
- callab DoPlayerTurn
+ callfar DoPlayerTurn
jp EndOpponentProtectEndureDestinyBond
; 3c6de
EnemyTurn_EndOpponentProtectEndureDestinyBond: ; 3c6de
call SetEnemyTurn
call EndUserDestinyBond
- callab DoEnemyTurn
+ callfar DoEnemyTurn
jp EndOpponentProtectEndureDestinyBond
; 3c6ed
@@ -1305,7 +1271,7 @@ HandleWrap: ; 3c874
ld a, [de]
ld [wd265], a
- ld [FXAnimIDLo], a
+ ld [FXAnimID], a
call GetMoveName
dec [hl]
jr z, .release_from_bounds
@@ -1318,7 +1284,7 @@ HandleWrap: ; 3c874
call SwitchTurnCore
xor a
ld [wNumHits], a
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
predef PlayBattleAnim
call SwitchTurnCore
@@ -1357,7 +1323,7 @@ HandleLeftovers: ; 3c8eb
call SetPlayerTurn
.do_it
- callab GetUserItem
+ callfar GetUserItem
ld a, [hl]
ld [wd265], a
call GetItemName
@@ -1407,7 +1373,7 @@ HandleMysteryberry: ; 3c93c
call SetPlayerTurn
.do_it
- callab GetUserItem
+ callfar GetUserItem
ld a, b
cp HELD_RESTORE_PP
jr nz, .quit
@@ -1504,7 +1470,7 @@ HandleMysteryberry: ; 3c93c
add b
ld [de], a
.skip_checks
- callab GetUserItem
+ callfar GetUserItem
ld a, [hl]
ld [wd265], a
xor a
@@ -1570,13 +1536,13 @@ HandleFutureSight: ; 3ca26
ld a, FUTURE_SIGHT
ld [hl], a
- callab UpdateMoveData
+ callfar UpdateMoveData
xor a
ld [AttackMissed], a
ld [AlreadyDisobeyed], a
ld a, 10
ld [TypeModifier], a
- callab DoMove
+ callfar DoMove
xor a
ld [CurDamage], a
ld [CurDamage + 1], a
@@ -2393,7 +2359,7 @@ HandleEnemySwitch: ; 3cf4a
ld e, HP_BAR_LENGTH_PX
call UpdateHPPal
call WaitBGMap
- callba EnemySwitch_TrainerHud
+ farcall EnemySwitch_TrainerHud
ld a, [wLinkMode]
and a
jr z, .not_linked
@@ -2451,7 +2417,7 @@ WinTrainerBattle: ; 3cfa4
and a
ld a, b
call z, PlayVictoryMusic
- callab Battle_GetTrainerName
+ callfar Battle_GetTrainerName
ld hl, BattleText_EnemyWasDefeated
call StdBattleTextBox
@@ -2486,7 +2452,7 @@ WinTrainerBattle: ; 3cfa4
ld c, 40
call DelayFrames
ld c, $4 ; win
- callba Mobile_PrintOpponentBattleMessage
+ farcall Mobile_PrintOpponentBattleMessage
ret
.battle_tower
@@ -2495,7 +2461,7 @@ WinTrainerBattle: ; 3cfa4
call DelayFrames
call EmptyBattleTextBox
ld c, $3
- callba BattleTowerText
+ farcall BattleTowerText
call WaitPressAorB_BlinkCursor
ld hl, wPayDayMoney
ld a, [hli]
@@ -2607,11 +2573,11 @@ WinTrainerBattle: ; 3cfa4
.CheckMaxedOutMomMoney: ; 3d0b1
ld hl, wMomsMoney + 2
ld a, [hld]
- cp 999999 % $100
+ cp MAX_MONEY % $100
ld a, [hld]
- sbc 999999 / $100 % $100
+ sbc MAX_MONEY / $100 % $100
ld a, [hl]
- sbc 999999 / $10000 % $100
+ sbc MAX_MONEY / $10000 % $100
ret
; 3d0be
@@ -2623,7 +2589,7 @@ AddBattleMoneyToAccount: ; 3d0be
push bc
ld b, h
ld c, l
- callba TrainerRankings_AddToBattlePayouts
+ farcall TrainerRankings_AddToBattlePayouts
pop bc
pop hl
.loop
@@ -2636,17 +2602,17 @@ AddBattleMoneyToAccount: ; 3d0be
jr nz, .loop
pop hl
ld a, [hld]
- cp 999999 % $100
+ cp MAX_MONEY % $100
ld a, [hld]
- sbc 999999 / $100 % $100
+ sbc MAX_MONEY / $100 % $100
ld a, [hl]
- sbc 999999 / $10000 % $100
+ sbc MAX_MONEY / $10000 % $100
ret c
- ld [hl], 999999 / $10000 % $100
+ ld [hl], MAX_MONEY / $10000 % $100
inc hl
- ld [hl], 999999 / $100 % $100
+ ld [hl], MAX_MONEY / $100 % $100
inc hl
- ld [hl], 999999 % $100
+ ld [hl], MAX_MONEY % $100
ret
; 3d0ea
@@ -2817,7 +2783,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa
.got_param
ld a, [CurBattleMon]
ld [CurPartyMon], a
- callab ChangeHappiness
+ callfar ChangeHappiness
ld a, [wBattleResult]
and %11000000
add $1
@@ -2966,16 +2932,16 @@ IsMobileBattle: ; 3d2f1
SetUpBattlePartyMenu_NoLoop: ; 3d2f7
call ClearBGPalettes
SetUpBattlePartyMenu: ; switch to fullscreen menu?
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuBGPal7
- callba InitPartyMenuGFX
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuBGPal7
+ farcall InitPartyMenuGFX
ret
; 3d313
JumpToPartyMenuAndPrintText: ; 3d313
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
@@ -2985,11 +2951,11 @@ JumpToPartyMenuAndPrintText: ; 3d313
SelectBattleMon: ; 3d329
call IsMobileBattle
jr z, .mobile
- callba PartyMenuSelect
+ farcall PartyMenuSelect
ret
.mobile
- callba Mobile_PartyMenuSelect
+ farcall Mobile_PartyMenuSelect
ret
; 3d33c
@@ -3101,7 +3067,7 @@ LostBattle: ; 3d38e
call EmptyBattleTextBox
ld c, 2
- callba BattleTowerText
+ farcall BattleTowerText
call WaitPressAorB_BlinkCursor
call ClearTileMap
call ClearBGPalettes
@@ -3152,7 +3118,7 @@ LostBattle: ; 3d38e
call DelayFrames
ld c, $3 ; lost
- callba Mobile_PrintOpponentBattleMessage
+ farcall Mobile_PrintOpponentBattleMessage
scf
ret
; 3d432
@@ -3458,7 +3424,7 @@ LookUpTheEffectivenessOfEveryMove: ; 3d5d7
ld a, BANK(Moves)
call FarCopyBytes
call SetEnemyTurn
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
pop bc
pop de
pop hl
@@ -3484,23 +3450,23 @@ IsThePlayerPkmnTypesEffectiveAgainstOTPkmn: ; 3d618
add hl, bc
ld a, [hl]
dec a
- ld hl, BaseData + 7 ; type
- ld bc, BaseData1 - BaseData0
+ ld hl, BaseData + BASE_TYPES
+ ld bc, BASE_DATA_SIZE
call AddNTimes
ld de, EnemyMonType
- ld bc, 2
+ ld bc, BASE_CATCH_RATE - BASE_TYPES
ld a, BANK(BaseData)
call FarCopyBytes
ld a, [BattleMonType1]
ld [wPlayerMoveStruct + MOVE_TYPE], a
call SetPlayerTurn
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
ld a, [wd265]
cp 10 + 1 ; 1.0 + 0.1
jr nc, .super_effective
ld a, [BattleMonType2]
ld [wPlayerMoveStruct + MOVE_TYPE], a
- callab BattleCheckTypeMatchup
+ callfar BattleCheckTypeMatchup
ld a, [wd265]
cp 10 + 1 ; 1.0 + 0.1
jr nc, .super_effective
@@ -3642,7 +3608,7 @@ CheckWhetherToAskSwitch: ; 3d714
push af
ld a, [CurBattleMon]
ld [CurPartyMon], a
- callba CheckCurPartyMonFainted
+ farcall CheckCurPartyMonFainted
pop bc
ld a, b
ld [CurPartyMon], a
@@ -3658,7 +3624,7 @@ CheckWhetherToAskSwitch: ; 3d714
OfferSwitch: ; 3d74b
ld a, [CurPartyMon]
push af
- callab Battle_GetTrainerName
+ callfar Battle_GetTrainerName
ld hl, BattleText_EnemyIsAboutToUseWillPlayerChangePkmn
call StdBattleTextBox
lb bc, 1, 7
@@ -3709,7 +3675,7 @@ ClearEnemyMonBox: ; 3d7a0
; 3d7b8
Function_BattleTextEnemySentOut: ; 3d7b8
- callab Battle_GetTrainerName
+ callfar Battle_GetTrainerName
ld hl, BattleText_EnemySentOut
call StdBattleTextBox
jp WaitBGMap
@@ -3723,7 +3689,7 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
ld a, OTPARTYMON
ld [MonType], a
predef CopyPkmnToTempMon
- call GetMonFrontpic
+ call GetEnemyMonFrontpic
xor a
ld [wNumHits], a
@@ -3741,9 +3707,9 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
.not_shiny
ld bc, TempMonSpecies
- callba CheckFaintedFrzSlp
+ farcall CheckFaintedFrzSlp
jr c, .skip_cry
- callba CheckBattleScene
+ farcall CheckBattleScene
jr c, .cry_no_anim
hlcoord 12, 0
ld d, $0
@@ -3885,7 +3851,7 @@ TryToRunAwayFromBattle: ; 3d8b3
ld a, [BattleMonItem]
ld [wd265], a
ld b, a
- callab GetItemHeldEffect
+ callfar GetItemHeldEffect
ld a, b
cp HELD_ESCAPE
pop de
@@ -4088,7 +4054,7 @@ BattleCheckEnemyShininess: ; 3da79
BattleCheckShininess: ; 3da7c
ld b, h
ld c, l
- callab CheckShininess
+ callfar CheckShininess
ret
; 3da85
@@ -4210,10 +4176,10 @@ SendOutPlayerMon: ; 3db5f
call WaitBGMap
xor a
ld [hBGMapMode], a
- call GetMonBackpic
+ call GetBattleMonBackpic
xor a
ld [hGraphicStartTile], a
- ld [wd0d2], a
+ ld [wBattleMenuCursorBuffer], a
ld [CurMoveNum], a
ld [TypeModifier], a
ld [wPlayerMoveStruct + MOVE_ANIM], a
@@ -4242,7 +4208,7 @@ SendOutPlayerMon: ; 3db5f
call GetPartyParamLocation
ld b, h
ld c, l
- callba CheckFaintedFrzSlp
+ farcall CheckFaintedFrzSlp
jr c, .statused
ld a, $f0
ld [CryTracks], a
@@ -4452,9 +4418,9 @@ HandleHealingItems: ; 3dcf9
; 3dd2f
HandleHPHealingItem: ; 3dd2f
- callab GetOpponentItem
+ callfar GetOpponentItem
ld a, b
- cp $1
+ cp HELD_BERRY
ret nz
ld de, EnemyMonHP + 1
ld hl, EnemyMonMaxHP
@@ -4536,11 +4502,11 @@ HandleHPHealingItem: ; 3dd2f
predef AnimateHPBar
UseOpponentItem:
call RefreshBattleHuds
- callab GetOpponentItem
+ callfar GetOpponentItem
ld a, [hl]
ld [wNamedObjectIndexBuffer], a
call GetItemName
- callab ConsumeHeldItem
+ callfar ConsumeHeldItem
ld hl, RecoveredUsingText
jp StdBattleTextBox
; 3ddc8
@@ -4551,11 +4517,11 @@ ItemRecoveryAnim: ; 3ddc8
push bc
call EmptyBattleTextBox
ld a, RECOVER
- ld [FXAnimIDLo], a
+ ld [FXAnimID], a
call SwitchTurnCore
xor a
ld [wNumHits], a
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
predef PlayBattleAnim
call SwitchTurnCore
pop bc
@@ -4565,7 +4531,7 @@ ItemRecoveryAnim: ; 3ddc8
; 3dde9
UseHeldStatusHealingItem: ; 3dde9
- callab GetOpponentItem
+ callfar GetOpponentItem
ld hl, .Statuses
.loop
ld a, [hli]
@@ -4634,7 +4600,7 @@ UseConfusionHealingItem: ; 3de51
call GetBattleVar
bit SUBSTATUS_CONFUSED, a
ret z
- callab GetOpponentItem
+ callfar GetOpponentItem
ld a, b
cp HELD_HEAL_CONFUSION
jr z, .heal_status
@@ -4701,7 +4667,7 @@ HandleStatBoostingHeldItems: ; 3de97
push bc
ld a, [bc]
ld b, a
- callab GetItemHeldEffect
+ callfar GetItemHeldEffect
ld hl, .StatUpItems
.loop
ld a, [hli]
@@ -4733,7 +4699,7 @@ HandleStatBoostingHeldItems: ; 3de97
call GetItemName
ld hl, BattleText_UsersStringBuffer1Activated
call StdBattleTextBox
- callab BattleCommand_StatUpMessage
+ callfar BattleCommand_StatUpMessage
ret
.finish
@@ -4808,7 +4774,7 @@ DrawPlayerHUD: ; 3df58
lb bc, 5, 11
call ClearBox
- callba DrawPlayerHUDBorder
+ farcall DrawPlayerHUDBorder
hlcoord 18, 9
ld [hl], $73 ; vertical bar
@@ -4856,12 +4822,12 @@ CheckDanger: ; 3df9e
.no_danger
ld hl, Danger
- res 7, [hl]
+ res DANGER_ON_F, [hl]
jr .done
.danger
ld hl, Danger
- set 7, [hl]
+ set DANGER_ON_F, [hl]
.done
ret
@@ -4901,7 +4867,7 @@ PrintPlayerHUD: ; 3dfbf
ld a, TEMPMON
ld [MonType], a
- callab GetGender
+ callfar GetGender
ld a, " "
jr c, .got_gender_char
ld a, "♂"
@@ -4950,7 +4916,7 @@ DrawEnemyHUD: ; 3e043
lb bc, 4, 11
call ClearBox
- callba DrawEnemyHUDBorder
+ farcall DrawEnemyHUDBorder
ld a, [TempEnemyMonSpecies]
ld [CurSpecies], a
@@ -4979,7 +4945,7 @@ DrawEnemyHUD: ; 3e043
ld a, TEMPMON
ld [MonType], a
- callab GetGender
+ callfar GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
@@ -5114,7 +5080,7 @@ BattleMenu: ; 3e139
ld a, [BattleType]
cp BATTLETYPE_CONTEST
jr nz, .not_contest
- callba ContestBattleMenu
+ farcall ContestBattleMenu
jr .next
.not_contest
@@ -5122,7 +5088,7 @@ BattleMenu: ; 3e139
ld a, [InputType]
or a
jr z, .skip_dude_pack_select
- callba _DudeAutoInput_DownA
+ farcall _DudeAutoInput_DownA
.skip_dude_pack_select
call LoadBattleMenu2
ret c
@@ -5130,7 +5096,7 @@ BattleMenu: ; 3e139
.next
ld a, $1
ld [hBGMapMode], a
- ld a, [wd0d2]
+ ld a, [wBattleMenuCursorBuffer]
cp $1
jp z, BattleMenu_Fight
cp $3
@@ -5154,12 +5120,12 @@ LoadBattleMenu2: ; 3e19b
call IsMobileBattle
jr z, .mobile
- callba LoadBattleMenu
+ farcall LoadBattleMenu
and a
ret
.mobile
- callba Function100b12
+ farcall Function100b12
ld a, [wcd2b]
and a
ret z
@@ -5193,14 +5159,14 @@ BattleMenu_Pack: ; 3e1c7
cp BATTLETYPE_CONTEST
jr z, .contest
- callba BattlePack
+ farcall BattlePack
ld a, [wPlayerAction]
and a
jr z, .didnt_use_item
jr .got_item
.tutorial
- callba TutorialPack
+ farcall TutorialPack
ld a, POKE_BALL
ld [CurItem], a
call DoItemEffect
@@ -5219,8 +5185,8 @@ BattleMenu_Pack: ; 3e1c7
call ClearPalettes
call DelayFrame
call _LoadBattleFontsHPBar
- call GetMonBackpic
- call GetMonFrontpic
+ call GetBattleMonBackpic
+ call GetEnemyMonFrontpic
call ExitMenu
call WaitBGMap
call FinishBattleAnim
@@ -5238,7 +5204,7 @@ BattleMenu_Pack: ; 3e1c7
ld a, [wWildMon]
and a
jr nz, .run
- callab CheckItemPocket
+ callfar CheckItemPocket
ld a, [wItemAttributeParamBuffer]
cp BALL
jr z, .ball
@@ -5252,10 +5218,10 @@ BattleMenu_Pack: ; 3e1c7
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jr z, .tutorial2
- call GetMonBackpic
+ call GetBattleMonBackpic
.tutorial2
- call GetMonFrontpic
+ call GetEnemyMonFrontpic
ld a, $1
ld [wMenuCursorY], a
call ExitMenu
@@ -5293,7 +5259,7 @@ BattleMenuPKMN_Loop:
call SelectBattleMon
jr c, .Cancel
.loop
- callba FreezeMonIcons
+ farcall FreezeMonIcons
call .GetMenu
jr c, .PressedB
call PlaceHollowCursor
@@ -5332,11 +5298,11 @@ BattleMenuPKMN_Loop:
.GetMenu: ; 3e2f5
call IsMobileBattle
jr z, .mobile
- callba BattleMonMenu
+ farcall BattleMonMenu
ret
.mobile
- callba MobileBattleMonMenu
+ farcall MobileBattleMonMenu
ret
; 3e308
@@ -5359,7 +5325,7 @@ Battle_StatsScreen: ; 3e308
call LowVolume
xor a ; PARTYMON
ld [MonType], a
- callba BattleStatsScreenInit
+ farcall BattleStatsScreenInit
call MaxVolume
call DisableLCD
@@ -5468,7 +5434,7 @@ PlayerSwitch: ; 3e3ad
; 3e3ff
EnemyMonEntrance: ; 3e3ff
- callab AI_Switch
+ callfar AI_Switch
call SetEnemyTurn
jp SpikesDamage
; 3e40b
@@ -5551,7 +5517,7 @@ BattleMenu_Run: ; 3e489
CheckAmuletCoin: ; 3e4a8
ld a, [BattleMonItem]
ld b, a
- callab GetItemHeldEffect
+ callfar GetItemHeldEffect
ld a, b
cp HELD_AMULET_COIN
ret nz
@@ -5563,7 +5529,7 @@ CheckAmuletCoin: ; 3e4a8
MoveSelectionScreen: ; 3e4bc
call IsMobileBattle
jr nz, .not_mobile
- callba MobileMoveSelectionScreen
+ farcall MobileMoveSelectionScreen
ret
.not_mobile
@@ -5918,7 +5884,7 @@ MoveInfoBox: ; 3e6c8
ld [CurPartyMon], a
ld a, WILDMON
ld [MonType], a
- callab GetMaxPPOfMove
+ callfar GetMaxPPOfMove
ld hl, wMenuCursorY
ld c, [hl]
@@ -5938,7 +5904,7 @@ MoveInfoBox: ; 3e6c8
hlcoord 7, 11
ld [hl], "/"
- callab UpdateMoveData
+ callfar UpdateMoveData
ld a, [wPlayerMoveStruct + MOVE_ANIM]
ld b, a
hlcoord 2, 10
@@ -5998,7 +5964,7 @@ CheckPlayerHasUsableMoves: ; 3e786
swap a
and $f
ld b, a
- ld d, $5
+ ld d, NUM_MOVES + 1
xor a
.loop
dec d
@@ -6011,7 +5977,9 @@ CheckPlayerHasUsableMoves: ; 3e786
jr .loop
.done
- and a ; This is probably a bug, and will result in a move with PP Up confusing the game.
+ ; Bug: this will result in a move with PP Up confusing the game.
+ ; Replace with "and $3f" to fix.
+ and a
ret nz
.force_struggle
@@ -6136,7 +6104,7 @@ ParseEnemyAction: ; 3e7c1
.skip_load
call SetEnemyTurn
- callab UpdateMoveData
+ callfar UpdateMoveData
call CheckEnemyLockedIn
jr nz, .raging
xor a
@@ -6199,7 +6167,7 @@ CheckEnemyLockedIn: ; 3e8d1
; 3e8e4
LinkBattleSendReceiveAction: ; 3e8e4
- callba _LinkBattleSendReceiveAction
+ farcall _LinkBattleSendReceiveAction
ret
; 3e8eb
@@ -6267,13 +6235,13 @@ LoadEnemyMon: ; 3e8eb
; 25% chance of getting an item
call BattleRandom
- cp a, 1 + (75 percent)
+ cp 1 + (75 percent)
ld a, NO_ITEM
jr c, .UpdateItem
; From there, an 8% chance for Item2
call BattleRandom
- cp a, 8 percent ; 8% of 25% = 2% Item2
+ cp 8 percent ; 8% of 25% = 2% Item2
ld a, [BaseItems]
jr nc, .UpdateItem
ld a, [BaseItems+1]
@@ -6308,7 +6276,7 @@ LoadEnemyMon: ; 3e8eb
; All trainers have preset DVs, determined by class
; See GetTrainerDVs for more on that
- callba GetTrainerDVs
+ farcall GetTrainerDVs
; These are the DVs we'll use if we're actually in a trainer battle
ld a, [wBattleMode]
dec a
@@ -6320,7 +6288,7 @@ LoadEnemyMon: ; 3e8eb
; Roaming monsters (Entei, Raikou) work differently
; They have their own structs, which are shorter than normal
ld a, [BattleType]
- cp a, BATTLETYPE_ROAMING
+ cp BATTLETYPE_ROAMING
jr nz, .NotRoaming
; Grab HP
@@ -6361,7 +6329,7 @@ LoadEnemyMon: ; 3e8eb
; Forced shiny battle type
; Used by Red Gyarados at Lake of Rage
- cp a, BATTLETYPE_SHINY
+ cp BATTLETYPE_SHINY
jr nz, .GenerateDVs
ld b, ATKDEFDV_SHINY ; $ea
@@ -6391,7 +6359,7 @@ LoadEnemyMon: ; 3e8eb
; Unown
ld a, [TempEnemyMonSpecies]
- cp a, UNOWN
+ cp UNOWN
jr nz, .Magikarp
; Get letter based on DVs
@@ -6406,35 +6374,35 @@ LoadEnemyMon: ; 3e8eb
; Skimming this part recommended
ld a, [TempEnemyMonSpecies]
- cp a, MAGIKARP
+ cp MAGIKARP
jr nz, .Happiness
; Get Magikarp's length
ld de, EnemyMonDVs
ld bc, PlayerID
- callab CalcMagikarpLength
+ callfar CalcMagikarpLength
; We're clear if the length is < 1536
- ld a, [MagikarpLength]
- cp a, $06 ; $600 = 1536
+ ld a, [wMagikarpLength]
+ cp $06 ; $600 = 1536
jr nz, .CheckMagikarpArea
; 5% chance of skipping size checks
call Random
- cp a, $0c ; / $100
+ cp $0c ; / $100
jr c, .CheckMagikarpArea
; Try again if > 1614
- ld a, [MagikarpLength + 1]
- cp a, $50
+ ld a, [wMagikarpLength + 1]
+ cp $50
jr nc, .GenerateDVs
; 20% chance of skipping this check
call Random
- cp a, $32 ; / $100
+ cp $32 ; / $100
jr c, .CheckMagikarpArea
; Try again if > 1598
- ld a, [MagikarpLength + 1]
- cp a, $40
+ ld a, [wMagikarpLength + 1]
+ cp $40
jr nc, .GenerateDVs
.CheckMagikarpArea:
@@ -6448,18 +6416,18 @@ LoadEnemyMon: ; 3e8eb
; Intended behavior enforces a minimum size at Lake of Rage
; The real behavior prevents size flooring in the Lake of Rage area
ld a, [MapGroup]
- cp a, GROUP_LAKE_OF_RAGE
+ cp GROUP_LAKE_OF_RAGE
jr z, .Happiness
ld a, [MapNumber]
- cp a, MAP_LAKE_OF_RAGE
+ cp MAP_LAKE_OF_RAGE
jr z, .Happiness
; 40% chance of not flooring
call Random
- cp a, $64 ; / $100
+ cp $64 ; / $100
jr c, .Happiness
; Floor at length 1024
- ld a, [MagikarpLength]
- cp a, 1024 >> 8
+ ld a, [wMagikarpLength]
+ cp 1024 >> 8
jr c, .GenerateDVs ; try again
; Finally done with DVs
@@ -6480,7 +6448,7 @@ LoadEnemyMon: ; 3e8eb
; If we're in a trainer battle,
; get the rest of the parameters from the party struct
ld a, [wBattleMode]
- cp a, TRAINER_BATTLE
+ cp TRAINER_BATTLE
jr z, .OpponentParty
; If we're in a wild battle, check wild-specific stuff
@@ -6515,7 +6483,7 @@ LoadEnemyMon: ; 3e8eb
; ..unless it's a RoamMon
ld a, [BattleType]
- cp a, BATTLETYPE_ROAMING
+ cp BATTLETYPE_ROAMING
jr nz, .Moves
; Grab HP
@@ -6568,7 +6536,7 @@ LoadEnemyMon: ; 3e8eb
ld de, EnemyMonMoves
; Are we in a trainer battle?
ld a, [wBattleMode]
- cp a, TRAINER_BATTLE
+ cp TRAINER_BATTLE
jr nz, .WildMoves
; Then copy moves from the party struct
ld hl, OTPartyMon1Moves
@@ -6588,14 +6556,14 @@ LoadEnemyMon: ; 3e8eb
ld [hli], a
ld [hl], a
; Make sure the predef knows this isn't a partymon
- ld [MagikarpLength], a
+ ld [wEvolutionOldSpecies], a
; Fill moves based on level
predef FillMoves
.PP:
; Trainer battle?
ld a, [wBattleMode]
- cp a, TRAINER_BATTLE
+ cp TRAINER_BATTLE
jr z, .TrainerPP
; Fill wild PP
@@ -6670,13 +6638,13 @@ CheckSleepingTreeMon: ; 3eb38
; Don't do anything if this isn't a tree encounter
ld a, [BattleType]
- cp a, BATTLETYPE_TREE
+ cp BATTLETYPE_TREE
jr nz, .NotSleeping
; Get list for the time of day
ld hl, .Morn
ld a, [TimeOfDay]
- cp a, DAY
+ cp DAY_F
jr c, .Check
ld hl, .Day
jr z, .Check
@@ -6759,7 +6727,7 @@ CheckUnownLetter: ; 3eb75
inc e
inc e
ld a, e
- cp a, .Set1 - .LetterSets
+ cp .Set1 - .LetterSets
jr c, .loop
; Hasn't been unlocked, or the letter is invalid
@@ -6812,7 +6780,7 @@ BattleWinSlideInEnemyTrainerFrontpic: ; 3ebd8
ld a, [OtherTrainerClass]
ld [TrainerClass], a
ld de, VTiles2
- callab GetTrainerPic
+ callfar GetTrainerPic
hlcoord 19, 0
ld c, 0
@@ -7041,14 +7009,14 @@ ApplyStatLevelMultiplier: ; 3ecb7
; Cap at 999.
ld a, [hQuotient + 2]
- sub 999 % $100
+ sub MAX_STAT_VALUE % $100
ld a, [hQuotient + 1]
- sbc 999 / $100
+ sbc MAX_STAT_VALUE / $100
jp c, .okay3
- ld a, 999 / $100
+ ld a, MAX_STAT_VALUE / $100
ld [hQuotient + 1], a
- ld a, 999 % $100
+ ld a, MAX_STAT_VALUE % $100
ld [hQuotient + 2], a
.okay3
@@ -7164,24 +7132,24 @@ BoostStat: ; 3ed7c
; Cap at 999.
ld a, [hld]
- sub 999 % $100
+ sub MAX_STAT_VALUE % $100
ld a, [hl]
- sbc 999 / $100
+ sbc MAX_STAT_VALUE / $100
ret c
- ld a, 999 / $100
+ ld a, MAX_STAT_VALUE / $100
ld [hli], a
- ld a, 999 % $100
+ ld a, MAX_STAT_VALUE % $100
ld [hld], a
ret
; 3ed9f
_LoadBattleFontsHPBar: ; 3ed9f
- callab LoadBattleFontsHPBar
+ callfar LoadBattleFontsHPBar
ret
; 3eda6
_LoadHPBar: ; 3eda6
- callab LoadHPBar
+ callfar LoadHPBar
ret
; 3edad
@@ -7285,9 +7253,9 @@ Call_PlayBattleAnim_OnlyIfVisible: ; 3ee0f
Call_PlayBattleAnim: ; 3ee17
ld a, e
- ld [FXAnimIDLo], a
+ ld [FXAnimID], a
ld a, d
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
call WaitBGMap
predef_jump PlayBattleAnim
; 3ee27
@@ -7487,7 +7455,7 @@ GiveExperiencePoints: ; 3ee3b
call GetBaseData
push bc
ld d, MAX_LEVEL
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
pop bc
ld hl, MON_STAT_EXP - 1
add hl, bc
@@ -7516,7 +7484,7 @@ GiveExperiencePoints: ; 3ee3b
xor a ; PARTYMON
ld [MonType], a
predef CopyPkmnToTempMon
- callab CalcLevel
+ callfar CalcLevel
pop bc
ld hl, MON_LEVEL
add hl, bc
@@ -7603,16 +7571,16 @@ GiveExperiencePoints: ; 3ee3b
xor a
ld [wd265], a
call ApplyStatLevelMultiplierOnAllStats
- callab ApplyStatusEffectOnPlayerStats
- callab BadgeStatBoosts
- callab UpdatePlayerHUD
+ callfar ApplyStatusEffectOnPlayerStats
+ callfar BadgeStatBoosts
+ callfar UpdatePlayerHUD
call EmptyBattleTextBox
call LoadTileMapToTempTileMap
ld a, $1
ld [hBGMapMode], a
.skip_animation
- callba LevelUpHappinessMod
+ farcall LevelUpHappinessMod
ld a, [CurBattleMon]
ld b, a
ld a, [CurPartyMon]
@@ -7813,7 +7781,7 @@ AnimateExpBar: ; 3f136
.NoOverflow:
ld d, MAX_LEVEL
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
ld a, [hProduct + 1]
ld b, a
ld a, [hProduct + 2]
@@ -7836,7 +7804,7 @@ AnimateExpBar: ; 3f136
ld [hld], a
.AlreadyAtMaxExp:
- callab CalcLevel
+ callfar CalcLevel
ld a, d
pop bc
pop de
@@ -7868,7 +7836,7 @@ AnimateExpBar: ; 3f136
call TerminateExpBarSound
ld de, SFX_HIT_END_OF_EXP_BAR
call PlaySFX
- callba AnimateEndOfExpBar
+ farcall AnimateEndOfExpBar
call WaitSFX
ld hl, BattleText_StringBuffer1GrewToLevel
call StdBattleTextBox
@@ -8174,7 +8142,7 @@ CalcExpBar: ; 3f39c
push de
ld d, b
push de
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
pop de
; exp at current level gets pushed to the stack
ld hl, hMultiplicand
@@ -8186,7 +8154,7 @@ CalcExpBar: ; 3f39c
push af
; next level
inc d
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
; back up the next level exp, and subtract the two levels
ld hl, hMultiplicand + 2
ld a, [hl]
@@ -8301,17 +8269,17 @@ PlaceExpBar: ; 3f41c
ret
; 3f43d
-GetMonBackpic: ; 3f43d
+GetBattleMonBackpic: ; 3f43d
ld a, [PlayerSubStatus4]
bit SUBSTATUS_SUBSTITUTE, a
ld hl, BattleAnimCmd_RaiseSub
- jr nz, GetBackpic_DoAnim ; substitute
+ jr nz, GetBattleMonBackpic_DoAnim ; substitute
DropPlayerSub: ; 3f447
ld a, [wPlayerMinimized]
and a
ld hl, BattleAnimCmd_MinimizeOpp
- jr nz, GetBackpic_DoAnim
+ jr nz, GetBattleMonBackpic_DoAnim
ld a, [CurPartySpecies]
push af
ld a, [BattleMonSpecies]
@@ -8319,13 +8287,13 @@ DropPlayerSub: ; 3f447
ld hl, BattleMonDVs
predef GetUnownLetter
ld de, VTiles2 tile $31
- predef GetBackpic
+ predef GetMonBackpic
pop af
ld [CurPartySpecies], a
ret
; 3f46f
-GetBackpic_DoAnim: ; 3f46f
+GetBattleMonBackpic_DoAnim: ; 3f46f
ld a, [hBattleTurn]
push af
xor a
@@ -8337,17 +8305,17 @@ GetBackpic_DoAnim: ; 3f46f
ret
; 3f47c
-GetMonFrontpic: ; 3f47c
+GetEnemyMonFrontpic: ; 3f47c
ld a, [EnemySubStatus4]
bit SUBSTATUS_SUBSTITUTE, a
ld hl, BattleAnimCmd_RaiseSub
- jr nz, GetFrontpic_DoAnim
+ jr nz, GetEnemyMonFrontpic_DoAnim
DropEnemySub: ; 3f486
ld a, [wEnemyMinimized]
and a
ld hl, BattleAnimCmd_MinimizeOpp
- jr nz, GetFrontpic_DoAnim
+ jr nz, GetEnemyMonFrontpic_DoAnim
ld a, [CurPartySpecies]
push af
@@ -8358,13 +8326,13 @@ DropEnemySub: ; 3f486
ld hl, EnemyMonDVs
predef GetUnownLetter
ld de, VTiles2
- predef FrontpicPredef
+ predef GetAnimatedFrontpicPredef
pop af
ld [CurPartySpecies], a
ret
; 3f4b4
-GetFrontpic_DoAnim: ; 3f4b4
+GetEnemyMonFrontpic_DoAnim: ; 3f4b4
ld a, [hBattleTurn]
push af
call SetEnemyTurn
@@ -8401,18 +8369,18 @@ _DoBattle: ; 3f4d9
; 3f4dd
BattleIntro: ; 3f4dd
- callba TrainerRankings_Battles ; mobile
+ farcall TrainerRankings_Battles ; mobile
call LoadTrainerOrWildMonPic
xor a
ld [TempBattleMonSpecies], a
- ld [wd0d2], a
+ ld [wBattleMenuCursorBuffer], a
xor a
ld [hMapAnims], a
- callba PlayBattleMusic
- callba ShowLinkBattleParticipants
- callba FindFirstAliveMonAndStartBattle
+ farcall PlayBattleMusic
+ farcall ShowLinkBattleParticipants
+ farcall FindFirstAliveMonAndStartBattle
call DisableSpriteUpdates
- callba ClearBattleRAM
+ farcall ClearBattleRAM
call InitEnemy
call BackUpVBGMap2
ld b, SCGB_BATTLE_GRAYSCALE
@@ -8486,11 +8454,11 @@ BackUpVBGMap2: ; 3f568
InitEnemyTrainer: ; 3f594
ld [TrainerClass], a
- callba TrainerRankings_TrainerBattles
+ farcall TrainerRankings_TrainerBattles
xor a
ld [TempEnemyMonSpecies], a
- callab GetTrainerAttributes
- callab ReadTrainerParty
+ callfar GetTrainerAttributes
+ callfar ReadTrainerParty
ld a, [TrainerClass]
cp RIVAL1
@@ -8500,7 +8468,7 @@ InitEnemyTrainer: ; 3f594
.ok
ld de, VTiles2
- callab GetTrainerPic
+ callfar GetTrainerPic
xor a
ld [hGraphicStartTile], a
dec a
@@ -8527,7 +8495,7 @@ InitEnemyTrainer: ; 3f594
or [hl]
jr z, .skipfaintedmon
ld c, HAPPINESS_GYMBATTLE
- callab ChangeHappiness
+ callfar ChangeHappiness
.skipfaintedmon
pop bc
dec b
@@ -8542,7 +8510,7 @@ InitEnemyTrainer: ; 3f594
InitEnemyWildmon: ; 3f607
ld a, WILD_BATTLE
ld [wBattleMode], a
- callba TrainerRankings_WildBattles
+ farcall TrainerRankings_WildBattles
call LoadEnemyMon
ld hl, EnemyMonMoves
ld de, wWildMonMoves
@@ -8564,7 +8532,7 @@ InitEnemyWildmon: ; 3f607
ld [wFirstUnownSeen], a
.skip_unown
ld de, VTiles2
- predef FrontpicPredef
+ predef GetAnimatedFrontpicPredef
xor a
ld [TrainerClass], a
ld [hGraphicStartTile], a
@@ -8651,7 +8619,7 @@ ExitBattle: ; 3f69e
xor a
ld [wForceEvolution], a
predef EvolveAfterBattle
- callba GivePokerusAndConvertBerries
+ farcall GivePokerusAndConvertBerries
ret
; 3f6d0
@@ -8670,7 +8638,7 @@ CleanUpBattleRAM: ; 3f6d0
ld [wPartyMenuCursor], a
ld [wKeyItemsPocketCursor], a
ld [wItemsPocketCursor], a
- ld [wd0d2], a
+ ld [wBattleMenuCursorBuffer], a
ld [CurMoveNum], a
ld [wBallsPocketCursor], a
ld [wLastPocket], a
@@ -8725,20 +8693,20 @@ CheckPayDay: ; 3f71d
; 3f759
ShowLinkBattleParticipantsAfterEnd: ; 3f759
- callba TrainerRankings_LinkBattles
- callba BackupMobileEventIndex
+ farcall TrainerRankings_LinkBattles
+ farcall BackupMobileEventIndex
ld a, [CurOTMon]
ld hl, OTPartyMon1Status
call GetPartyLocation
ld a, [EnemyMonStatus]
ld [hl], a
call ClearTileMap
- callba _ShowLinkBattleParticipants
+ farcall _ShowLinkBattleParticipants
ret
; 3f77c
DisplayLinkBattleResult: ; 3f77c
- callba CheckMobileBattleError
+ farcall CheckMobileBattleError
jp c, .Mobile_InvalidBattle
call IsMobileBattle2
jr nz, .proceed
@@ -8747,7 +8715,7 @@ DisplayLinkBattleResult: ; 3f77c
bit 4, [hl]
jr z, .proceed
- callba DetermineLinkBattleResult
+ farcall DetermineLinkBattleResult
.proceed
ld a, [wBattleResult]
@@ -8755,24 +8723,24 @@ DisplayLinkBattleResult: ; 3f77c
cp $1
jr c, .victory
jr z, .loss
- callba TrainerRankings_ColosseumDraws
+ farcall TrainerRankings_ColosseumDraws
ld de, .Draw
jr .store_result
.victory
- callba TrainerRankings_ColosseumWins
+ farcall TrainerRankings_ColosseumWins
ld de, .Win
jr .store_result
.loss
- callba TrainerRankings_ColosseumLosses
+ farcall TrainerRankings_ColosseumLosses
ld de, .Lose
jr .store_result
.store_result
hlcoord 6, 8
call PlaceString
- callba BackupMobileEventIndex
+ farcall BackupMobileEventIndex
ld c, 200
call DelayFrames
@@ -9009,7 +8977,7 @@ BattleEnd_HandleRoamMons: ; 3f998
ret nz
.update_roam_mons
- callab UpdateRoamMons
+ callfar UpdateRoamMons
ret
; 3f9d1
@@ -9167,10 +9135,10 @@ AddLastMobileBattleToLinkRecord: ; 3fa42
dec hl
ld a, [hl]
inc hl
- cp 9999 / $100
+ cp MAX_LINK_RECORD / $100
ret c
ld a, [hl]
- cp 9999 % $100
+ cp MAX_LINK_RECORD % $100
ret
; 3fac8
@@ -9301,7 +9269,7 @@ InitBattleDisplay: ; 3fb6c
ld b, 4
ld c, 18
call TextBox
- callba MobileTextBorder
+ farcall MobileTextBorder
hlcoord 1, 5
lb bc, 3, 7
call ClearBox
@@ -9317,7 +9285,7 @@ InitBattleDisplay: ; 3fb6c
call WaitBGMap
xor a
ld [hBGMapMode], a
- callba BattleIntroSlidingPics
+ farcall BattleIntroSlidingPics
ld a, $1
ld [hBGMapMode], a
ld a, $31
@@ -9386,7 +9354,7 @@ GetTrainerBackpic: ; 3fbff
jr z, .Chris
; It's a girl.
- callba GetKrisBackpic
+ farcall GetKrisBackpic
ret
.Chris:
@@ -9471,7 +9439,7 @@ BattleStartMessage: ; 3fc8b
ld c, 20
call DelayFrames
- callba Battle_GetTrainerName
+ farcall Battle_GetTrainerName
ld hl, WantsToBattleText
jr .PlaceBattleStartText
@@ -9490,10 +9458,10 @@ BattleStartMessage: ; 3fc8b
call Call_PlayBattleAnim
.not_shiny
- callba CheckSleepingTreeMon
+ farcall CheckSleepingTreeMon
jr c, .skip_cry
- callba CheckBattleScene
+ farcall CheckBattleScene
jr c, .cry_no_anim
hlcoord 12, 0
@@ -9513,7 +9481,7 @@ BattleStartMessage: ; 3fc8b
cp BATTLETYPE_FISH
jr nz, .NotFishing
- callba TrainerRankings_HookedEncounters
+ farcall TrainerRankings_HookedEncounters
ld hl, HookedPokemonAttackedText
jr .PlaceBattleStartText
@@ -9529,7 +9497,7 @@ BattleStartMessage: ; 3fc8b
.PlaceBattleStartText:
push hl
- callba BattleStart_TrainerHuds
+ farcall BattleStart_TrainerHuds
pop hl
call StdBattleTextBox
@@ -9537,7 +9505,7 @@ BattleStartMessage: ; 3fc8b
ret nz
ld c, $2 ; start
- callba Mobile_PrintOpponentBattleMessage
+ farcall Mobile_PrintOpponentBattleMessage
ret
; 3fd26
diff --git a/battle/effect_command_pointers.asm b/battle/effect_command_pointers.asm
index 8a9014fa5..5dd6be786 100644
--- a/battle/effect_command_pointers.asm
+++ b/battle/effect_command_pointers.asm
@@ -1,6 +1,7 @@
dw 0 ; padding
BattleCommandPointers: ; 3fd28
+; entries correspond to macros/scripts/effect_commands.asm
dw BattleCommand_CheckTurn ; 34084
dw BattleCommand_CheckObedience ; 343db
dw BattleCommand_UsedMoveText ; 34541
@@ -77,7 +78,7 @@ BattleCommandPointers: ; 3fd28
dw BattleCommand_Spite ; 35c0f
dw BattleCommand_FalseSwipe ; 35c94
dw BattleCommand_HealBell ; 35cc9
- dw BattleCommand_KingsRock ; 36ac9
+ dw BattleCommand_HeldFlinch ; 36ac9
dw BattleCommand_TripleKick ; 346b2
dw BattleCommand_KickCounter ; 346cd
dw BattleCommand_Thief ; 37492
diff --git a/battle/effect_commands.asm b/battle/effect_commands.asm
index 23ff3deaf..86b8cc080 100644
--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -70,25 +70,25 @@ DoMove: ; 3402c
; Start at the first command.
ld hl, BattleScriptBuffer
ld a, l
- ld [BattleScriptBufferLoc], a
+ ld [BattleScriptBufferAddress], a
ld a, h
- ld [BattleScriptBufferLoc + 1], a
+ ld [BattleScriptBufferAddress + 1], a
.ReadMoveEffectCommand:
-; ld a, [BattleScriptBufferLoc++]
- ld a, [BattleScriptBufferLoc]
+; ld a, [BattleScriptBufferAddress++]
+ ld a, [BattleScriptBufferAddress]
ld l, a
- ld a, [BattleScriptBufferLoc + 1]
+ ld a, [BattleScriptBufferAddress + 1]
ld h, a
ld a, [hli]
push af
ld a, l
- ld [BattleScriptBufferLoc], a
+ ld [BattleScriptBufferAddress], a
ld a, h
- ld [BattleScriptBufferLoc + 1], a
+ ld [BattleScriptBufferAddress + 1], a
pop af
; endturn_command (-2) is used to terminate branches without ending the read cycle.
@@ -1016,7 +1016,7 @@ IgnoreSleepOnly: ; 3451f
BattleCommand_UsedMoveText: ; 34541
; usedmovetext
- callba DisplayUsedMoveText
+ farcall DisplayUsedMoveText
ret
; 34548
@@ -1385,14 +1385,14 @@ BattleCommand_Stab: ; 346d2
push hl
push de
push bc
- callba DoWeatherModifiers
+ farcall DoWeatherModifiers
pop bc
pop de
pop hl
push de
push bc
- callba DoBadgeTypeBoosts
+ farcall DoBadgeTypeBoosts
pop bc
pop de
@@ -2103,7 +2103,7 @@ BattleCommand_LowerSub: ; 34eee
xor a
ld [wNumHits], a
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
inc a
ld [wKickCounter], a
ld a, SUBSTITUTE
@@ -2280,7 +2280,7 @@ BattleCommand_RaiseSub: ; 35004
xor a
ld [wNumHits], a
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
ld a, $2
ld [wKickCounter], a
ld a, SUBSTITUTE
@@ -2645,7 +2645,7 @@ BattleCommand_CheckDestinyBond: ; 351c0
call BattleCommand_SwitchTurn
xor a
ld [wNumHits], a
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
inc a
ld [wKickCounter], a
ld a, DESTINY_BOND
@@ -2743,9 +2743,9 @@ BattleCommand_RageDamage: ; 3527b
EndMoveEffect: ; 352a3
- ld a, [BattleScriptBufferLoc]
+ ld a, [BattleScriptBufferAddress]
ld l, a
- ld a, [BattleScriptBufferLoc + 1]
+ ld a, [BattleScriptBufferAddress + 1]
ld h, a
ld a, $ff
ld [hli], a
@@ -3191,6 +3191,8 @@ BattleCommand_BeatUp: ; 35461
ld a, [wd002]
ld c, a
ld a, [CurBattleMon]
+ ; BUG: this can desynchronize link battles
+ ; Change "cp [hl]" to "cp c" to fix
cp [hl]
ld hl, BattleMonStatus
jr z, .active_mon
@@ -3860,7 +3862,7 @@ BattleCommand_Counter: ; 35813
ret z
ld b, a
- callab GetMoveEffect
+ callfar GetMoveEffect
ld a, b
cp EFFECT_COUNTER
ret z
@@ -3879,11 +3881,11 @@ BattleCommand_Counter: ; 35813
ld de, StringBuffer1
call GetMoveData
- ld a, [StringBuffer1 + 2]
+ ld a, [StringBuffer1 + MOVE_POWER]
and a
ret z
- ld a, [StringBuffer1 + 3]
+ ld a, [StringBuffer1 + MOVE_TYPE]
cp SPECIAL
ret nc
@@ -4066,7 +4068,7 @@ BattleCommand_PainSplit: ; 35926
call ResetDamage
hlcoord 2, 2
predef AnimateHPBar
- callba _UpdateBattleHUDs
+ farcall _UpdateBattleHUDs
ld hl, SharedPainText
jp StdBattleTextBox
@@ -4516,7 +4518,7 @@ BattleCommand_SleepTalk: ; 35b33
push bc
ld b, a
- callab GetMoveEffect
+ callfar GetMoveEffect
ld a, b
pop bc
@@ -4738,14 +4740,14 @@ FarPlayBattleAnimation: ; 35d00
PlayFXAnimID: ; 35d08
ld a, e
- ld [FXAnimIDLo], a
+ ld [FXAnimID], a
ld a, d
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
ld c, 3
call DelayFrames
- callab PlayBattleAnim
+ callfar PlayBattleAnim
ret
@@ -5015,7 +5017,7 @@ BattleCommand_SleepTarget: ; 35e5c
ld hl, FellAsleepText
call StdBattleTextBox
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
jp z, OpponentCantMove
ret
@@ -5092,7 +5094,7 @@ BattleCommand_PoisonTarget: ; 35eee
ld hl, WasPoisonedText
call StdBattleTextBox
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
ret
; 35f2c
@@ -5177,7 +5179,7 @@ BattleCommand_Poison: ; 35f2c
call StdBattleTextBox
.finished
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
ret
.failed
@@ -5380,7 +5382,7 @@ BattleCommand_BurnTarget: ; 3608c
ld hl, WasBurnedText
call StdBattleTextBox
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
ret
; 360dd
@@ -5453,7 +5455,7 @@ BattleCommand_FreezeTarget: ; 36102
ld hl, WasFrozenText
call StdBattleTextBox
- callba UseHeldStatusHealingItem
+ farcall UseHeldStatusHealingItem
ret nz
call OpponentCantMove
@@ -5649,10 +5651,10 @@ CheckIfStatCanBeRaised: ; 361ef
.no_carry
pop bc
ld a, [hld]
- sub 999 % $100
+ sub MAX_STAT_VALUE % $100
jr nz, .not_already_max
ld a, [hl]
- sbc 999 / $100
+ sbc MAX_STAT_VALUE / $100
jp z, .stats_already_max
.not_already_max
ld a, [hBattleTurn]
@@ -6297,11 +6299,11 @@ BattleCommand_Curl: ; 365a7
BattleCommand_RaiseSubNoAnim: ; 365af
- ld hl, GetMonBackpic
+ ld hl, GetBattleMonBackpic
ld a, [hBattleTurn]
and a
jr z, .PlayerTurn
- ld hl, GetMonFrontpic
+ ld hl, GetEnemyMonFrontpic
.PlayerTurn:
xor a
ld [hBGMapMode], a
@@ -6415,14 +6417,14 @@ CalcStats: ; 3661d
.check_maxed_out
ld a, [hQuotient + 2]
- cp 999 % $100
+ cp MAX_STAT_VALUE % $100
ld a, b
- sbc 999 / $100
+ sbc MAX_STAT_VALUE / $100
jr c, .not_maxed_out
- ld a, 999 % $100
+ ld a, MAX_STAT_VALUE % $100
ld [hQuotient + 2], a
- ld a, 999 / $100
+ ld a, MAX_STAT_VALUE / $100
ld [hQuotient + 1], a
.not_maxed_out
@@ -6814,7 +6816,7 @@ BattleCommand_ForceSwitch: ; 3680f
ld a, d
inc a
ld [wEnemySwitchMonIndex], a
- callab ForceEnemySwitch
+ callfar ForceEnemySwitch
ld hl, DraggedOutText
call StdBattleTextBox
@@ -7097,9 +7099,9 @@ BattleCommand_EndLoop: ; 369b6
; Loop back to the command before 'critical'.
.loop_back_to_critical
- ld a, [BattleScriptBufferLoc + 1]
+ ld a, [BattleScriptBufferAddress + 1]
ld h, a
- ld a, [BattleScriptBufferLoc]
+ ld a, [BattleScriptBufferAddress]
ld l, a
.not_critical
ld a, [hld]
@@ -7107,9 +7109,9 @@ BattleCommand_EndLoop: ; 369b6
jr nz, .not_critical
inc hl
ld a, h
- ld [BattleScriptBufferLoc + 1], a
+ ld [BattleScriptBufferAddress + 1], a
ld a, l
- ld [BattleScriptBufferLoc], a
+ ld [BattleScriptBufferAddress], a
ret
; 36a82
@@ -7182,7 +7184,7 @@ CheckOpponentWentFirst: ; 36abf
; 36ac9
-BattleCommand_KingsRock: ; 36ac9
+BattleCommand_HeldFlinch: ; 36ac9
; kingsrock
ld a, [AttackMissed]
@@ -7191,7 +7193,7 @@ BattleCommand_KingsRock: ; 36ac9
call GetUserItem
ld a, b
- cp HELD_TRADE_EVOLVE ; Only King's Rock has this effect
+ cp HELD_FLINCH
ret nz
call CheckSubstituteOpp
@@ -7882,7 +7884,7 @@ BattleCommand_Substitute: ; 36e7c
xor a
ld [wNumHits], a
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
ld [wKickCounter], a
ld a, SUBSTITUTE
call LoadAnim
@@ -8079,7 +8081,7 @@ BattleCommand_LeechSeed: ; 36f9d
BattleCommand_Splash: ; 36fe1
call AnimateCurrentMove
- callba TrainerRankings_Splash
+ farcall TrainerRankings_Splash
jp PrintNothingHappened
; 36fed
@@ -8283,7 +8285,7 @@ BattleCommand_Conversion: ; 3707f
inc de
ld [de], a
ld [wNamedObjectIndexBuffer], a
- callba GetTypeName
+ farcall GetTypeName
call AnimateCurrentMove
ld hl, TransformedTypeText
jp StdBattleTextBox
@@ -8606,7 +8608,7 @@ CheckSubstituteOpp: ; 37378
BattleCommand_Selfdestruct: ; 37380
- callba TrainerRankings_Selfdestruct
+ farcall TrainerRankings_Selfdestruct
ld a, BATTLEANIM_PLAYER_DAMAGE
ld [wNumHits], a
ld c, 3
@@ -8630,8 +8632,8 @@ BattleCommand_Selfdestruct: ; 37380
res SUBSTATUS_DESTINY_BOND, [hl]
call _CheckBattleScene
ret nc
- callba DrawPlayerHUD
- callba DrawEnemyHUD
+ farcall DrawPlayerHUD
+ farcall DrawEnemyHUD
call WaitBGMap
jp RefreshBattleHuds
@@ -9030,13 +9032,13 @@ BattleCommand_BatonPass: ; 379c9
; Transition into switchmon menu
call LoadStandardMenuDataHeader
- callba SetUpBattlePartyMenu_NoLoop
+ farcall SetUpBattlePartyMenu_NoLoop
- callba ForcePickSwitchMonInBattle
+ farcall ForcePickSwitchMonInBattle
; Return to battle scene
call ClearPalettes
- callba _LoadBattleFontsHPBar
+ farcall _LoadBattleFontsHPBar
call CloseWindow
call ClearSprites
hlcoord 1, 0
@@ -9048,7 +9050,7 @@ BattleCommand_BatonPass: ; 379c9
call BatonPass_LinkPlayerSwitch
; Mobile link battles handle entrances differently
- callba CheckMobileBattleError
+ farcall CheckMobileBattleError
jp c, EndMoveEffect
ld hl, PassedBattleMonEntrance
@@ -9073,7 +9075,7 @@ BattleCommand_BatonPass: ; 379c9
call BatonPass_LinkEnemySwitch
; Mobile link battles handle entrances differently
- callba CheckMobileBattleError
+ farcall CheckMobileBattleError
jp c, EndMoveEffect
; Passed enemy PartyMon entrance
@@ -9323,21 +9325,21 @@ BattleCommand_ClearHazards: ; 37b39
BattleCommand_HealMorn: ; 37b74
; healmorn
- ld b, MORN
+ ld b, MORN_F
jr BattleCommand_TimeBasedHealContinue
; 37b78
BattleCommand_HealDay: ; 37b78
; healday
- ld b, DAY
+ ld b, DAY_F
jr BattleCommand_TimeBasedHealContinue
; 37b7c
BattleCommand_HealNite: ; 37b7c
; healnite
- ld b, NITE
+ ld b, NITE_F
; fallthrough
; 37b7e
@@ -9401,7 +9403,7 @@ BattleCommand_TimeBasedHealContinue: ; 37b7e
call AnimateCurrentMove
call BattleCommand_SwitchTurn
- callab RestoreHP
+ callfar RestoreHP
call BattleCommand_SwitchTurn
call UpdateUserInParty
@@ -9431,7 +9433,7 @@ BattleCommand_HiddenPower: ; 37be8
ld a, [AttackMissed]
and a
ret nz
- callba HiddenPowerDamage
+ farcall HiddenPowerDamage
ret
; 37bf4
@@ -9473,14 +9475,14 @@ BattleCommand_BellyDrum: ; 37c1a
and a
jr nz, .failed
- callab GetHalfMaxHP
- callab CheckUserHasEnoughHP
+ callfar GetHalfMaxHP
+ callfar CheckUserHasEnoughHP
jr nc, .failed
push bc
call AnimateCurrentMove
pop bc
- callab SubtractHPFromUser
+ callfar SubtractHPFromUser
call UpdateUserInParty
ld a, 5
@@ -9566,7 +9568,7 @@ BattleCommand_MirrorCoat: ; 37c95
ret z
ld b, a
- callab GetMoveEffect
+ callfar GetMoveEffect
ld a, b
cp EFFECT_MIRROR_COAT
ret z
@@ -9763,6 +9765,7 @@ BattleCommand_ThunderAccuracy: ; 37d94
CheckHiddenOpponent: ; 37daa
+; BUG: This routine should account for Lock-On and Mind Reader.
ld a, BATTLE_VARS_SUBSTATUS3_OPP
call GetBattleVar
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
@@ -9806,11 +9809,11 @@ GetItemHeldEffect: ; 37dd0
ret z
push hl
- ld hl, ItemAttributes + 2
+ ld hl, ItemAttributes + ITEMATTR_EFFECT
dec a
ld c, a
ld b, 0
- ld a, Item2Attributes - Item1Attributes
+ ld a, ITEMATTR_STRUCT_LENGTH
call AddNTimes
ld a, BANK(ItemAttributes)
call GetFarHalfword
@@ -9862,14 +9865,14 @@ AnimateCurrentMove: ; 37e01
PlayDamageAnim: ; 37e19
xor a
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
and a
ret z
- ld [FXAnimIDLo], a
+ ld [FXAnimID], a
ld a, [hBattleTurn]
and a
@@ -9888,7 +9891,7 @@ PlayDamageAnim: ; 37e19
LoadMoveAnim: ; 37e36
xor a
ld [wNumHits], a
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
@@ -9901,7 +9904,7 @@ LoadMoveAnim: ; 37e36
LoadAnim: ; 37e44
- ld [FXAnimIDLo], a
+ ld [FXAnimID], a
; fallthrough
; 37e47
@@ -9911,7 +9914,7 @@ PlayUserBattleAnim: ; 37e47
push hl
push de
push bc
- callab PlayBattleAnim
+ callfar PlayBattleAnim
pop bc
pop de
pop hl
@@ -9922,9 +9925,9 @@ PlayUserBattleAnim: ; 37e47
PlayOpponentBattleAnim: ; 37e54
ld a, e
- ld [FXAnimIDLo], a
+ ld [FXAnimID], a
ld a, d
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
xor a
ld [wNumHits], a
@@ -9933,7 +9936,7 @@ PlayOpponentBattleAnim: ; 37e54
push bc
call BattleCommand_SwitchTurn
- callab PlayBattleAnim
+ callfar PlayBattleAnim
call BattleCommand_SwitchTurn
pop bc
@@ -9983,9 +9986,9 @@ BattleCommand_ClearText: ; 37e85
SkipToBattleCommand: ; 37e8c
; Skip over commands until reaching command b.
- ld a, [BattleScriptBufferLoc + 1]
+ ld a, [BattleScriptBufferAddress + 1]
ld h, a
- ld a, [BattleScriptBufferLoc]
+ ld a, [BattleScriptBufferAddress]
ld l, a
.loop
ld a, [hli]
@@ -9993,9 +9996,9 @@ SkipToBattleCommand: ; 37e8c
jr nz, .loop
ld a, h
- ld [BattleScriptBufferLoc + 1], a
+ ld [BattleScriptBufferAddress + 1], a
ld a, l
- ld [BattleScriptBufferLoc], a
+ ld [BattleScriptBufferAddress], a
ret
; 37ea1
@@ -10032,21 +10035,21 @@ GetMoveByte: ; 37ebb
DisappearUser: ; 37ec0
- callba _DisappearUser
+ farcall _DisappearUser
ret
; 37ec7
AppearUserLowerSub: ; 37ec7
- callba _AppearUserLowerSub
+ farcall _AppearUserLowerSub
ret
; 37ece
AppearUserRaiseSub: ; 37ece
- callba _AppearUserRaiseSub
+ farcall _AppearUserRaiseSub
ret
; 37ed5
@@ -10057,7 +10060,7 @@ _CheckBattleScene: ; 37ed5
push hl
push de
push bc
- callba CheckBattleScene
+ farcall CheckBattleScene
pop bc
pop de
pop hl
diff --git a/battle/effects/attract.asm b/battle/effects/attract.asm
index f1bc590eb..0a6d7c975 100755
--- a/battle/effects/attract.asm
+++ b/battle/effects/attract.asm
@@ -35,7 +35,7 @@ CheckOppositeGender: ; 377f5
xor a
ld [MonType], a
- callba GetGender
+ farcall GetGender
jr c, .genderless_samegender
ld b, 1
@@ -58,7 +58,7 @@ CheckOppositeGender: ; 377f5
ld [TempMonDVs + 1], a
ld a, 3
ld [MonType], a
- callba GetGender
+ farcall GetGender
pop bc
jr c, .genderless_samegender
diff --git a/battle/effects/thief.asm b/battle/effects/thief.asm
index f344edef9..6d32d68d4 100644
--- a/battle/effects/thief.asm
+++ b/battle/effects/thief.asm
@@ -23,7 +23,7 @@ BattleCommand_Thief: ; 37492
ld [wd265], a
ld d, a
- callba ItemIsMail
+ farcall ItemIsMail
ret c
ld a, [EffectFailed]
@@ -71,7 +71,7 @@ BattleCommand_Thief: ; 37492
ld [wd265], a
ld d, a
- callba ItemIsMail
+ farcall ItemIsMail
ret c
ld a, [EffectFailed]
diff --git a/battle/effects/transform.asm b/battle/effects/transform.asm
index eb80aea8a..65c3f3e60 100755
--- a/battle/effects/transform.asm
+++ b/battle/effects/transform.asm
@@ -11,7 +11,7 @@ BattleCommand_Transform: ; 371cd
jp nz, BattleEffect_ButItFailed
xor a
ld [wNumHits], a
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
ld a, $1
ld [wKickCounter], a
ld a, BATTLE_VARS_SUBSTATUS4
@@ -129,7 +129,7 @@ BattleCommand_Transform: ; 371cd
.after_anim
xor a
ld [wNumHits], a
- ld [FXAnimIDHi], a
+ ld [FXAnimID + 1], a
ld a, $2
ld [wKickCounter], a
pop af
diff --git a/battle/hidden_power.asm b/battle/hidden_power.asm
index 184c597d0..c75a67ab3 100644
--- a/battle/hidden_power.asm
+++ b/battle/hidden_power.asm
@@ -104,7 +104,7 @@ HiddenPowerDamage: ; fbced
; based on the new type, but keep base power.
ld a, d
push af
- callba BattleCommand_DamageStats ; damagestats
+ farcall BattleCommand_DamageStats ; damagestats
pop af
ld d, a
ret
diff --git a/battle/link_result.asm b/battle/link_result.asm
index 5739bbdc0..cf6102acc 100755
--- a/battle/link_result.asm
+++ b/battle/link_result.asm
@@ -1,5 +1,5 @@
DetermineLinkBattleResult: ; 2b930
- callba UpdateEnemyMonInParty
+ farcall UpdateEnemyMonInParty
ld hl, PartyMon1HP
call .CountMonsRemaining
push bc
diff --git a/battle/magikarp_length.asm b/battle/magikarp_length.asm
deleted file mode 100644
index 160912c53..000000000
--- a/battle/magikarp_length.asm
+++ /dev/null
@@ -1,214 +0,0 @@
-CalcMagikarpLength: ; fbbfc
-; Return Magikarp's length (in mm) at MagikarpLength (big endian).
-;
-; input:
-; de: EnemyMonDVs
-; bc: PlayerID
-
-; This function is poorly commented.
-
-; In short, it generates a value between 190 and 1786 using
-; a Magikarp's DVs and its trainer ID. This value is further
-; filtered in LoadEnemyMon to make longer Magikarp even rarer.
-
-; The value is generated from a lookup table.
-; The index is determined by the dv xored with the player's trainer id.
-
-; bc = rrc(dv[0]) ++ rrc(dv[1]) ^ rrc(id)
-
-; if bc < 10: [MagikarpLength] = c + 190
-; if bc >= $ff00: [MagikarpLength] = c + 1370
-; else: [MagikarpLength] = z * 100 + (bc - x) / y
-
-; X, Y, and Z depend on the value of b as follows:
-
-; if b = 0: x = 310, y = 2, z = 3
-; if b = 1: x = 710, y = 4, z = 4
-; if b = 2-9: x = 2710, y = 20, z = 5
-; if b = 10-29: x = 7710, y = 50, z = 6
-; if b = 30-68: x = 17710, y = 100, z = 7
-; if b = 69-126: x = 32710, y = 150, z = 8
-; if b = 127-185: x = 47710, y = 150, z = 9
-; if b = 186-224: x = 57710, y = 100, z = 10
-; if b = 225-243: x = 62710, y = 50, z = 11
-; if b = 244-251: x = 64710, y = 20, z = 12
-; if b = 252-253: x = 65210, y = 5, z = 13
-; if b = 254: x = 65410, y = 2, z = 14
-
-
- ; bc = rrc(dv[0]) ++ rrc(dv[1]) ^ rrc(id)
-
- ; id
- ld h, b
- ld l, c
- ld a, [hli]
- ld b, a
- ld c, [hl]
- rrc b
- rrc c
-
- ; dv
- ld a, [de]
- inc de
- rrca
- rrca
- xor b
- ld b, a
-
- ld a, [de]
- rrca
- rrca
- xor c
- ld c, a
-
- ; if bc < 10:
- ; de = bc + 190
- ; break
-
- ld a, b
- and a
- jr nz, .no
- ld a, c
- cp 10
- jr nc, .no
-
- ld hl, 190
- add hl, bc
- ld d, h
- ld e, l
- jr .done
-
-.no
-
- ld hl, .Lengths
- ld a, 2
- ld [wd265], a
-
-.read
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- call .BCLessThanDE
- jr nc, .next
-
- ; c = (bc - de) / [hl]
- call .BCMinusDE
- ld a, b
- ld [hDividend + 0], a
- ld a, c
- ld [hDividend + 1], a
- ld a, [hl]
- ld [hDivisor], a
- ld b, 2
- call Divide
- ld a, [hQuotient + 2]
- ld c, a
-
- ; de = c + 100 * (2 + i)
- xor a
- ld [hMultiplicand + 0], a
- ld [hMultiplicand + 1], a
- ld a, 100
- ld [hMultiplicand + 2], a
- ld a, [wd265]
- ld [hMultiplier], a
- call Multiply
- ld b, 0
- ld a, [hProduct + 3]
- add c
- ld e, a
- ld a, [hProduct + 2]
- adc b
- ld d, a
- jr .done
-
-.next
- inc hl ; align to next triplet
- ld a, [wd265]
- inc a
- ld [wd265], a
- cp 16
- jr c, .read
-
- call .BCMinusDE
- ld hl, 1600
- add hl, bc
- ld d, h
- ld e, l
-
-.done
- ; hl = de * 10
- ld h, d
- ld l, e
- add hl, hl
- add hl, hl
- add hl, de
- add hl, hl
-
- ; hl = hl / 254
- ld de, -254
- ld a, -1
-.div_254
- inc a
- add hl, de
- jr c, .div_254
-
- ; d, e = hl / 12, hl % 12
- ld d, 0
-.mod_12
- cp 12
- jr c, .ok
- sub 12
- inc d
- jr .mod_12
-.ok
- ld e, a
-
- ld hl, MagikarpLength
- ld [hl], d
- inc hl
- ld [hl], e
- ret
-; fbc9a
-
-.BCLessThanDE: ; fbc9a
-; Intention: Return bc < de.
-; Reality: Return b < d.
- ld a, b
- cp d
- ret c
- ret nc ; whoops
- ld a, c
- cp e
- ret
-; fbca1
-
-.BCMinusDE: ; fbca1
-; bc -= de
- ld a, c
- sub e
- ld c, a
- ld a, b
- sbc d
- ld b, a
- ret
-; fbca8
-
-.Lengths: ; fbca8
-; ????, divisor
- dwb 110, 1
- dwb 310, 2
- dwb 710, 4
- dwb 2710, 20
- dwb 7710, 50
- dwb 17710, 100
- dwb 32710, 150
- dwb 47710, 150
- dwb 57710, 100
- dwb 62710, 50
- dwb 64710, 20
- dwb 65210, 5
- dwb 65410, 2
- dwb 65510, 1 ; not used
-; fbcd2
diff --git a/battle/menu.asm b/battle/menu.asm
index 3efcc0079..07d3e6081 100755
--- a/battle/menu.asm
+++ b/battle/menu.asm
@@ -1,11 +1,11 @@
LoadBattleMenu: ; 24ef2
ld hl, BattleMenuDataHeader
call LoadMenuDataHeader
- ld a, [wd0d2]
+ ld a, [wBattleMenuCursorBuffer]
ld [wMenuCursorBuffer], a
call InterpretBattleMenu
ld a, [wMenuCursorBuffer]
- ld [wd0d2], a
+ ld [wBattleMenuCursorBuffer], a
call ExitMenu
ret
; 24f0b
@@ -23,11 +23,11 @@ ContestBattleMenu: ; 24f13
; 24f19
Function24f19: ; 24f19
- ld a, [wd0d2]
+ ld a, [wBattleMenuCursorBuffer]
ld [wMenuCursorBuffer], a
call _2DMenu
ld a, [wMenuCursorBuffer]
- ld [wd0d2], a
+ ld [wBattleMenuCursorBuffer], a
call ExitMenu
ret
; 24f2c
diff --git a/battle/misc.asm b/battle/misc.asm
index 0fed74e38..b05dc8071 100644
--- a/battle/misc.asm
+++ b/battle/misc.asm
@@ -13,11 +13,11 @@ _DisappearUser: ; fbd54
jr FinishAppearDisappearUser
_AppearUserRaiseSub: ; fbd69 (3e:7d69)
- callba BattleCommand_RaiseSubNoAnim
+ farcall BattleCommand_RaiseSubNoAnim
jr AppearUser
_AppearUserLowerSub: ; fbd71 (3e:7d71)
- callba BattleCommand_LowerSubNoAnim
+ farcall BattleCommand_LowerSubNoAnim
AppearUser: ; fbd77 (3e:7d77)
xor a
diff --git a/battle/move_names.asm b/battle/move_names.asm
index e4470a998..cfc7ac54f 100644
--- a/battle/move_names.asm
+++ b/battle/move_names.asm
@@ -1,3 +1,4 @@
+MoveNames::
db "POUND@"
db "KARATE CHOP@"
db "DOUBLESLAP@"
diff --git a/battle/moves/move_descriptions.asm b/battle/moves/move_descriptions.asm
index df31fd38a..d86ceea37 100644
--- a/battle/moves/move_descriptions.asm
+++ b/battle/moves/move_descriptions.asm
@@ -1,4 +1,5 @@
-; MoveDescriptions: ; 2cb52
+MoveDescriptions:: ; 2cb52
+; entries correspond to move ids (see constants/move_constants.asm)
dw PoundDescription
dw KarateChopDescription
dw DoubleslapDescription
@@ -262,7 +263,6 @@ MoveFDDescription:
MoveFEDescription:
MoveFFDescription:
Move00Description:
-UnknownMoveDescription:
db "?@"
PoundDescription:
diff --git a/battle/moves/move_effects.asm b/battle/moves/move_effects.asm
index 73bc3cbec..c56ff2560 100644
--- a/battle/moves/move_effects.asm
+++ b/battle/moves/move_effects.asm
@@ -1,3 +1,5 @@
+MoveEffects: ; 2732e
+
NormalHit:
checkobedience
usedmovetext
@@ -571,7 +573,7 @@ DefenseDownHit:
supereffectivetext
checkdestinybond
buildopponentrage
- effectchance
+ effectchance ; bug: duplicate effectchance shouldn't be here
defensedown
statdownmessage
endmove
diff --git a/battle/moves/move_effects_pointers.asm b/battle/moves/move_effects_pointers.asm
index 2e4f1ea31..a12092881 100644
--- a/battle/moves/move_effects_pointers.asm
+++ b/battle/moves/move_effects_pointers.asm
@@ -1,3 +1,5 @@
+MoveEffectsPointers: ; 271f4
+; entries correspond to EFFECT_* constants
dw NormalHit
dw DoSleep
dw PoisonHit
diff --git a/battle/moves/moves.asm b/battle/moves/moves.asm
index 43ba6f10d..b576fbaff 100644
--- a/battle/moves/moves.asm
+++ b/battle/moves/moves.asm
@@ -1,4 +1,3 @@
-Moves: ; 41afb
; Characteristics of each move.
move: MACRO
@@ -11,6 +10,8 @@ move: MACRO
db \7 percent ; effect chance
ENDM
+Moves: ; 41afb
+; entries correspond to constants/move_constants.asm
move POUND, EFFECT_NORMAL_HIT, 40, NORMAL, 100, 35, 0
move KARATE_CHOP, EFFECT_NORMAL_HIT, 50, FIGHTING, 100, 25, 0
move DOUBLESLAP, EFFECT_MULTI_HIT, 15, NORMAL, 85, 10, 0
diff --git a/battle/objects/data.asm b/battle/objects/data.asm
index fa5dff269..8117d8495 100755
--- a/battle/objects/data.asm
+++ b/battle/objects/data.asm
@@ -1,573 +1,209 @@
-BattleAnimObjects: ; ccb56
-battleanimobj: MACRO
+ABSOLUTE_X EQU $00
+RELATIVE_X EQU $01
-; ??, ??, frameset, function, ??, tile offset
- db \1, \2, \3, \4, \5, \6
+battleanimobj: MACRO
+ db \1 ; flags
+ ; bit 7: priority
+ ; bit 6: y flip (for enemy)
+ ; bit 5: x flip (for enemy)
+ ; bit 0: enable enemy animation coord fixing (x = $b4 - x; see below for y)
+ db \2 ; enemy animation y fix param
+ ; if $FF: y = y + 5 tiles
+ ; else: y = -y - (1 tile) * (is_softboiled_animation)
+ db \3 ; video sequence
+ db \4 ; callback
+ db \5 ; palette
+ db \6 ; tile offset
endm
-
-; ANIM_OBJ_00
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_00, BATTLEANIMFUNC_00, $02, $01
-
-; ANIM_OBJ_01
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_01, BATTLEANIMFUNC_00, $02, $01
-
-; ANIM_OBJ_02
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_02, BATTLEANIMFUNC_00, $02, $01
-
-; ANIM_OBJ_03
- battleanimobj $01, $90, BATTLEANIMFRAMESET_00, BATTLEANIMFUNC_00, $02, $01
-
-; ANIM_OBJ_04
- battleanimobj $01, $90, BATTLEANIMFRAMESET_01, BATTLEANIMFUNC_00, $02, $01
-
-; ANIM_OBJ_05
- battleanimobj $01, $90, BATTLEANIMFRAMESET_02, BATTLEANIMFUNC_00, $02, $01
-
-; ANIM_OBJ_06
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_03, BATTLEANIMFUNC_00, $02, $01
-
-; ANIM_OBJ_07
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_04, BATTLEANIMFUNC_1B, $02, $01
-
-; ANIM_OBJ_08
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_05, BATTLEANIMFUNC_00, $02, $01
-
-; ANIM_OBJ_09
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_06, BATTLEANIMFUNC_00, $02, $01
-
-; ANIM_OBJ_0A
- battleanimobj $01, $90, BATTLEANIMFRAMESET_07, BATTLEANIMFUNC_09, $02, $01
-
-; ANIM_OBJ_0B
- battleanimobj $01, $aa, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_10, $04, $03
-
-; ANIM_OBJ_0C
- battleanimobj $01, $90, BATTLEANIMFRAMESET_0E, BATTLEANIMFUNC_04, $04, $03
-
-; ANIM_OBJ_0D
- battleanimobj $01, $90, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_03, $04, $03
-
-; ANIM_OBJ_0E
- battleanimobj $01, $90, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_08, $04, $03
-
-; ANIM_OBJ_0F
- battleanimobj $01, $90, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_0A, $04, $03
-
-; ANIM_OBJ_BURNED
- battleanimobj $01, $90, BATTLEANIMFRAMESET_11, BATTLEANIMFUNC_03, $04, $03
-
-; ANIM_OBJ_BLIZZARD
- battleanimobj $01, $90, BATTLEANIMFRAMESET_12, BATTLEANIMFUNC_08, $06, $0a
-
-; ANIM_OBJ_12
- battleanimobj $01, $90, BATTLEANIMFRAMESET_13, BATTLEANIMFUNC_00, $06, $0a
-
-; ANIM_OBJ_ICE_BEAM
- battleanimobj $01, $90, BATTLEANIMFRAMESET_14, BATTLEANIMFUNC_01, $06, $0a
-
-; ANIM_OBJ_RAZOR_LEAF
- battleanimobj $21, $78, BATTLEANIMFRAMESET_16, BATTLEANIMFUNC_RAZOR_LEAF, $05, $06
-
-; ANIM_OBJ_POKE_BALL
- battleanimobj $00, $00, BATTLEANIMFRAMESET_09, BATTLEANIMFUNC_12, $04, $0b
-
-; ANIM_OBJ_POKE_BALL_BLOCKED
- battleanimobj $00, $00, BATTLEANIMFRAMESET_09, BATTLEANIMFUNC_13, $04, $0b
-
-; ANIM_OBJ_17
- battleanimobj $01, $90, BATTLEANIMFRAMESET_18, BATTLEANIMFUNC_00, $04, $08
-
-; ANIM_OBJ_18
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_18, BATTLEANIMFUNC_00, $04, $08
-
-; ANIM_OBJ_19
- battleanimobj $01, $90, BATTLEANIMFRAMESET_1D, BATTLEANIMFUNC_06, $02, $0c
-
-; ANIM_OBJ_1A
- battleanimobj $01, $b4, BATTLEANIMFRAMESET_1F, BATTLEANIMFUNC_38, $02, $0c
-
-; ANIM_OBJ_1B
- battleanimobj $01, $90, BATTLEANIMFRAMESET_08, BATTLEANIMFUNC_00, $02, $07
-
-; ANIM_OBJ_BALL_POOF
- battleanimobj $01, $a0, BATTLEANIMFRAMESET_08, BATTLEANIMFUNC_00, $02, $07
-
-; ANIM_OBJ_1D
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_07, $07, $09
-
-; ANIM_OBJ_1E
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_1A, BATTLEANIMFUNC_07, $07, $09
-
-; ANIM_OBJ_1F
- battleanimobj $01, $b0, BATTLEANIMFRAMESET_1B, BATTLEANIMFUNC_36, $07, $09
-
-; ANIM_OBJ_20
- battleanimobj $01, $b0, BATTLEANIMFRAMESET_84, BATTLEANIMFUNC_36, $06, $21
-
-; ANIM_OBJ_BUBBLE
- battleanimobj $01, $90, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_0C, $06, $0d
-
-; ANIM_OBJ_22
- battleanimobj $00, $00, BATTLEANIMFRAMESET_23, BATTLEANIMFUNC_0D, $06, $0d
-
-; ANIM_OBJ_23
- battleanimobj $01, $90, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_0E, $02, $0e
-
-; ANIM_OBJ_24
- battleanimobj $61, $80, BATTLEANIMFRAMESET_27, BATTLEANIMFUNC_0F, $06, $04
-
-; ANIM_OBJ_25
- battleanimobj $01, $b4, BATTLEANIMFRAMESET_2A, BATTLEANIMFUNC_00, $06, $04
-
-; ANIM_OBJ_26
- battleanimobj $01, $40, BATTLEANIMFRAMESET_2B, BATTLEANIMFUNC_11, $05, $0f
-
-; ANIM_OBJ_27
- battleanimobj $61, $98, BATTLEANIMFRAMESET_2C, BATTLEANIMFUNC_00, $03, $10
-
-; ANIM_OBJ_28
- battleanimobj $61, $98, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_09, $03, $10
-
-; ANIM_OBJ_ICE_BUILDUP
- battleanimobj $01, $b8, BATTLEANIMFRAMESET_2E, BATTLEANIMFUNC_00, $06, $0a
-
-; ANIM_OBJ_FROZEN
- battleanimobj $01, $b8, BATTLEANIMFRAMESET_2F, BATTLEANIMFUNC_00, $06, $0a
-
-; ANIM_OBJ_MASTER_BALL_SPARKLE
- battleanimobj $01, $b8, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_14, $07, $11
-
-; ANIM_OBJ_2C
- battleanimobj $01, $90, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_14, $03, $0d
-
-; ANIM_OBJ_2D
- battleanimobj $21, $b0, BATTLEANIMFRAMESET_31, BATTLEANIMFUNC_00, $03, $05
-
-; ANIM_OBJ_2E
- battleanimobj $21, $b0, BATTLEANIMFRAMESET_32, BATTLEANIMFUNC_00, $03, $05
-
-; ANIM_OBJ_2F
- battleanimobj $21, $b0, BATTLEANIMFRAMESET_33, BATTLEANIMFUNC_00, $03, $05
-
-; ANIM_OBJ_30
- battleanimobj $21, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_15, $03, $05
-
-; ANIM_OBJ_31
- battleanimobj $21, $90, BATTLEANIMFRAMESET_36, BATTLEANIMFUNC_00, $03, $05
-
-; ANIM_OBJ_LIGHTNING_BOLT
- battleanimobj $21, $90, BATTLEANIMFRAMESET_37, BATTLEANIMFUNC_03, $02, $08
-
-; ANIM_OBJ_33
- battleanimobj $21, $90, BATTLEANIMFRAMESET_38, BATTLEANIMFUNC_00, $03, $05
-
-; ANIM_OBJ_34
- battleanimobj $21, $90, BATTLEANIMFRAMESET_39, BATTLEANIMFUNC_03, $02, $08
-
-; ANIM_OBJ_35
- battleanimobj $21, $90, BATTLEANIMFRAMESET_3A, BATTLEANIMFUNC_16, $02, $02
-
-; ANIM_OBJ_36
- battleanimobj $01, $90, BATTLEANIMFRAMESET_3C, BATTLEANIMFUNC_17, $02, $02
-
-; ANIM_OBJ_37
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_3E, BATTLEANIMFUNC_00, $02, $02
-
-; ANIM_OBJ_38
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_3F, BATTLEANIMFUNC_00, $02, $02
-
-; ANIM_OBJ_39
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_40, BATTLEANIMFUNC_00, $02, $02
-
-; ANIM_OBJ_3A
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_41, BATTLEANIMFUNC_00, $02, $02
-
-; ANIM_OBJ_3B
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_42, BATTLEANIMFUNC_00, $02, $02
-
-; ANIM_OBJ_3C
- battleanimobj $01, $88, BATTLEANIMFRAMESET_43, BATTLEANIMFUNC_18, $05, $12
-
-; ANIM_OBJ_3D
- battleanimobj $01, $88, BATTLEANIMFRAMESET_44, BATTLEANIMFUNC_00, $05, $12
-
-; ANIM_OBJ_GUST
- battleanimobj $21, $b8, BATTLEANIMFRAMESET_45, BATTLEANIMFUNC_19, $02, $13
-
-; ANIM_OBJ_3F
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_46, BATTLEANIMFUNC_00, $02, $14
-
-; ANIM_OBJ_40
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_47, BATTLEANIMFUNC_00, $02, $14
-
-; ANIM_OBJ_41
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_48, BATTLEANIMFUNC_1A, $02, $14
-
-; ANIM_OBJ_42
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_49, BATTLEANIMFUNC_1A, $02, $14
-
-; ANIM_OBJ_43
- battleanimobj $21, $98, BATTLEANIMFRAMESET_4A, BATTLEANIMFUNC_01, $02, $14
-
-; ANIM_OBJ_44
- battleanimobj $21, $80, BATTLEANIMFRAMESET_4B, BATTLEANIMFUNC_00, $03, $11
-
-; ANIM_OBJ_ABSORB
- battleanimobj $01, $88, BATTLEANIMFRAMESET_4C, BATTLEANIMFUNC_1C, $05, $12
-
-; ANIM_OBJ_46
- battleanimobj $21, $b0, BATTLEANIMFRAMESET_4D, BATTLEANIMFUNC_1D, $02, $15
-
-; ANIM_OBJ_47
- battleanimobj $01, $b0, BATTLEANIMFRAMESET_51, BATTLEANIMFUNC_1E, $03, $11
-
-; ANIM_OBJ_48
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_52, BATTLEANIMFUNC_1F, $05, $16
-
-; ANIM_OBJ_49
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_54, BATTLEANIMFUNC_1F, $05, $16
-
-; ANIM_OBJ_LEECH_SEED
- battleanimobj $21, $68, BATTLEANIMFRAMESET_56, BATTLEANIMFUNC_LEECH_SEED, $05, $06
-
-; ANIM_OBJ_4B
- battleanimobj $21, $90, BATTLEANIMFRAMESET_59, BATTLEANIMFUNC_21, $02, $0e
-
-; ANIM_OBJ_4C
- battleanimobj $21, $90, BATTLEANIMFRAMESET_5C, BATTLEANIMFUNC_02, $02, $17
-
-; ANIM_OBJ_4D
- battleanimobj $01, $90, BATTLEANIMFRAMESET_5D, BATTLEANIMFUNC_22, $03, $11
-
-; ANIM_OBJ_4E
- battleanimobj $61, $88, BATTLEANIMFRAMESET_5F, BATTLEANIMFUNC_00, $03, $10
-
-; ANIM_OBJ_4F
- battleanimobj $61, $88, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_09, $03, $10
-
-; ANIM_OBJ_50
- battleanimobj $21, $88, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_00, $03, $18
-
-; ANIM_OBJ_51
- battleanimobj $21, $80, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_00, $02, $18
-
-; ANIM_OBJ_CHICK
- battleanimobj $21, $50, BATTLEANIMFRAMESET_61, BATTLEANIMFUNC_23, $03, $19
-
-; ANIM_OBJ_53
- battleanimobj $01, $80, BATTLEANIMFRAMESET_63, BATTLEANIMFUNC_24, $02, $19
-
-; ANIM_OBJ_54
- battleanimobj $01, $80, BATTLEANIMFRAMESET_66, BATTLEANIMFUNC_25, $02, $19
-
-; ANIM_OBJ_SKULL
- battleanimobj $01, $50, BATTLEANIMFRAMESET_1C, BATTLEANIMFUNC_00, $02, $0c
-
-; ANIM_OBJ_56
- battleanimobj $21, $a8, BATTLEANIMFRAMESET_67, BATTLEANIMFUNC_26, $07, $1a
-
-; ANIM_OBJ_57
- battleanimobj $21, $a8, BATTLEANIMFRAMESET_68, BATTLEANIMFUNC_00, $07, $1a
-
-; ANIM_OBJ_58
- battleanimobj $21, $90, BATTLEANIMFRAMESET_69, BATTLEANIMFUNC_01, $02, $1a
-
-; ANIM_OBJ_PARALYZED
- battleanimobj $21, $90, BATTLEANIMFRAMESET_6D, BATTLEANIMFUNC_28, $03, $19
-
-; ANIM_OBJ_5A
- battleanimobj $21, $90, BATTLEANIMFRAMESET_6A, BATTLEANIMFUNC_27, $02, $1b
-
-; ANIM_OBJ_HAZE
- battleanimobj $00, $00, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SPRIAL_DESCENT, $02, $1c
-
-; ANIM_OBJ_MIST
- battleanimobj $21, $48, BATTLEANIMFRAMESET_70, BATTLEANIMFUNC_SPRIAL_DESCENT, $02, $1c
-
-; ANIM_OBJ_SMOG
- battleanimobj $21, $48, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SPRIAL_DESCENT, $02, $1c
-
-; ANIM_OBJ_POISON_GAS
- battleanimobj $21, $78, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_POISON_GAS, $02, $1c
-
-; ANIM_OBJ_HORN
- battleanimobj $61, $90, BATTLEANIMFRAMESET_71, BATTLEANIMFUNC_HORN, $02, $1d
-
-; ANIM_OBJ_60
- battleanimobj $61, $90, BATTLEANIMFRAMESET_72, BATTLEANIMFUNC_2C, $02, $1d
-
-; ANIM_OBJ_61
- battleanimobj $01, $48, BATTLEANIMFRAMESET_73, BATTLEANIMFUNC_2D, $04, $1e
-
-; ANIM_OBJ_62
- battleanimobj $01, $90, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_06, $02, $15
-
-; ANIM_OBJ_63
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_75, BATTLEANIMFUNC_2E, $07, $19
-
-; ANIM_OBJ_64
- battleanimobj $21, $90, BATTLEANIMFRAMESET_4A, BATTLEANIMFUNC_02, $02, $14
-
-; ANIM_OBJ_65
- battleanimobj $01, $80, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_2F, $02, $11
-
-; ANIM_OBJ_66
- battleanimobj $01, $78, BATTLEANIMFRAMESET_76, BATTLEANIMFUNC_POISON_GAS, $04, $23
-
-; ANIM_OBJ_67
- battleanimobj $01, $80, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_30, $02, $1f
-
-; ANIM_OBJ_68
- battleanimobj $01, $90, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_02, $02, $1f
-
-; ANIM_OBJ_69
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_00, $02, $1f
-
-; ANIM_OBJ_6A
- battleanimobj $01, $80, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_08, $03, $23
-
-; ANIM_OBJ_6B
- battleanimobj $21, $90, BATTLEANIMFRAMESET_79, BATTLEANIMFUNC_00, $02, $1f
-
-; ANIM_OBJ_6C
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_31, $03, $11
-
-; ANIM_OBJ_6D
- battleanimobj $01, $88, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_31, $03, $11
-
-; ANIM_OBJ_SKY_ATTACK_FEAROW
- battleanimobj $21, $88, BATTLEANIMFRAMESET_7B, BATTLEANIMFUNC_32, $02, $20
-
-; ANIM_OBJ_LICK
- battleanimobj $21, $98, BATTLEANIMFRAMESET_7C, BATTLEANIMFUNC_00, $02, $04
-
-; ANIM_OBJ_WITHDRAW
- battleanimobj $21, $80, BATTLEANIMFRAMESET_7D, BATTLEANIMFUNC_00, $02, $18
-
-; ANIM_OBJ_71
- battleanimobj $01, $80, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_2F, $06, $0d
-
-; ANIM_OBJ_72
- battleanimobj $01, $b0, BATTLEANIMFRAMESET_7E, BATTLEANIMFUNC_33, $03, $12
-
-; ANIM_OBJ_73
- battleanimobj $01, $80, BATTLEANIMFRAMESET_7F, BATTLEANIMFUNC_2F, $02, $08
-
-; ANIM_OBJ_74
- battleanimobj $21, $a0, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_34, $02, $1c
-
-; ANIM_OBJ_75
- battleanimobj $21, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_35, $02, $15
-
-; ANIM_OBJ_76
- battleanimobj $21, $b0, BATTLEANIMFRAMESET_80, BATTLEANIMFUNC_33, $02, $14
-
-; ANIM_OBJ_77
- battleanimobj $01, $88, BATTLEANIMFRAMESET_81, BATTLEANIMFUNC_37, $02, $11
-
-; ANIM_OBJ_78
- battleanimobj $01, $88, BATTLEANIMFRAMESET_85, BATTLEANIMFUNC_00, $02, $22
-
-; ANIM_OBJ_79
- battleanimobj $01, $88, BATTLEANIMFRAMESET_86, BATTLEANIMFUNC_00, $02, $22
-
-; ANIM_OBJ_7A
- battleanimobj $01, $90, BATTLEANIMFRAMESET_87, BATTLEANIMFUNC_39, $02, $1f
-
-; ANIM_OBJ_7B
- battleanimobj $01, $80, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_3A, $03, $11
-
-; ANIM_OBJ_7C
- battleanimobj $21, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_00, $03, $05
-
-; ANIM_OBJ_7D
- battleanimobj $a1, $88, BATTLEANIMFRAMESET_88, BATTLEANIMFUNC_3B, $06, $13
-
-; ANIM_OBJ_HEART
- battleanimobj $01, $80, BATTLEANIMFRAMESET_76, BATTLEANIMFUNC_25, $04, $23
-
-; ANIM_OBJ_7F
- battleanimobj $01, $98, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_34, $04, $03
-
-; ANIM_OBJ_80
- battleanimobj $01, $a8, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_3C, $04, $03
-
-; ANIM_OBJ_COTTON_SPORE
- battleanimobj $21, $68, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_SPRIAL_DESCENT, $02, $1f
-
-; ANIM_OBJ_82
- battleanimobj $21, $b0, BATTLEANIMFRAMESET_8A, BATTLEANIMFUNC_00, $02, $1f
-
-; ANIM_OBJ_83
- battleanimobj $21, $80, BATTLEANIMFRAMESET_8C, BATTLEANIMFUNC_00, $02, $1f
-
-; ANIM_OBJ_84
- battleanimobj $21, $50, BATTLEANIMFRAMESET_8D, BATTLEANIMFUNC_00, $03, $1f
-
-; ANIM_OBJ_85
- battleanimobj $01, $40, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_40, $02, $0e
-
-; ANIM_OBJ_86
- battleanimobj $21, $a8, BATTLEANIMFRAMESET_8E, BATTLEANIMFUNC_41, $04, $1f
-
-; ANIM_OBJ_87
- battleanimobj $21, $88, BATTLEANIMFRAMESET_8F, BATTLEANIMFUNC_3E, $02, $1f
-
-; ANIM_OBJ_88
- battleanimobj $21, $88, BATTLEANIMFRAMESET_93, BATTLEANIMFUNC_3E, $02, $1f
-
-; ANIM_OBJ_89
- battleanimobj $21, $90, BATTLEANIMFRAMESET_97, BATTLEANIMFUNC_3D, $02, $1f
-
-; ANIM_OBJ_8A
- battleanimobj $21, $90, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_3D, $03, $23
-
-; ANIM_OBJ_8B
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_2E, $02, $19
-
-; ANIM_OBJ_8C
- battleanimobj $21, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_02, $02, $15
-
-; ANIM_OBJ_8D
- battleanimobj $21, $a0, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_35, $04, $19
-
-; ANIM_OBJ_SPIKES
- battleanimobj $21, $70, BATTLEANIMFRAMESET_8B, BATTLEANIMFUNC_3F, $02, $1f
-
-; ANIM_OBJ_8F
- battleanimobj $01, $90, BATTLEANIMFRAMESET_15, BATTLEANIMFUNC_08, $02, $0a
-
-; ANIM_OBJ_90
- battleanimobj $01, $90, BATTLEANIMFRAMESET_11, BATTLEANIMFUNC_02, $04, $03
-
-; ANIM_OBJ_91
- battleanimobj $01, $80, BATTLEANIMFRAMESET_7F, BATTLEANIMFUNC_42, $02, $08
-
-; ANIM_OBJ_92
- battleanimobj $01, $90, BATTLEANIMFRAMESET_9A, BATTLEANIMFUNC_00, $02, $1b
-
-; ANIM_OBJ_93
- battleanimobj $21, $a0, BATTLEANIMFRAMESET_9B, BATTLEANIMFUNC_35, $04, $23
-
-; ANIM_OBJ_94
- battleanimobj $21, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_23, $02, $25
-
-; ANIM_OBJ_95
- battleanimobj $21, $80, BATTLEANIMFRAMESET_9D, BATTLEANIMFUNC_25, $02, $25
-
-; ANIM_OBJ_96
- battleanimobj $21, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_00, $02, $25
-
-; ANIM_OBJ_97
- battleanimobj $21, $80, BATTLEANIMFRAMESET_9E, BATTLEANIMFUNC_00, $06, $25
-
-; ANIM_OBJ_98
- battleanimobj $61, $80, BATTLEANIMFRAMESET_9F, BATTLEANIMFUNC_3A, $05, $23
-
-; ANIM_OBJ_99
- battleanimobj $21, $80, BATTLEANIMFRAMESET_A0, BATTLEANIMFUNC_16, $02, $23
-
-; ANIM_OBJ_9A
- battleanimobj $21, $70, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_43, $03, $23
-
-; ANIM_OBJ_9B
- battleanimobj $21, $c0, BATTLEANIMFRAMESET_A2, BATTLEANIMFUNC_01, $02, $25
-
-; ANIM_OBJ_9C
- battleanimobj $21, $40, BATTLEANIMFRAMESET_A3, BATTLEANIMFUNC_44, $03, $24
-
-; ANIM_OBJ_9D
- battleanimobj $01, $80, BATTLEANIMFRAMESET_A4, BATTLEANIMFUNC_00, $02, $24
-
-; ANIM_OBJ_9E
- battleanimobj $01, $80, BATTLEANIMFRAMESET_A5, BATTLEANIMFUNC_00, $03, $24
-
-; ANIM_OBJ_9F
- battleanimobj $01, $88, BATTLEANIMFRAMESET_43, BATTLEANIMFUNC_45, $04, $12
-
-; ANIM_OBJ_A0
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_A6, BATTLEANIMFUNC_00, $02, $02
-
-; ANIM_OBJ_A1
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_A7, BATTLEANIMFUNC_00, $02, $02
-
-; ANIM_OBJ_A2
- battleanimobj $21, $00, BATTLEANIMFRAMESET_B4, BATTLEANIMFUNC_4A, $07, $0f
-
-; ANIM_OBJ_A3
- battleanimobj $21, $90, BATTLEANIMFRAMESET_A8, BATTLEANIMFUNC_02, $03, $05
-
-; ANIM_OBJ_A4
- battleanimobj $21, $40, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_11, $02, $25
-
-; ANIM_OBJ_A5
- battleanimobj $61, $90, BATTLEANIMFRAMESET_A9, BATTLEANIMFUNC_46, $02, $23
-
-; ANIM_OBJ_PERISH_SONG
- battleanimobj $00, $00, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_47, $02, $0e
-
-; ANIM_OBJ_A7
- battleanimobj $01, $80, BATTLEANIMFRAMESET_AA, BATTLEANIMFUNC_00, $02, $24
-
-; ANIM_OBJ_A8
- battleanimobj $21, $b8, BATTLEANIMFRAMESET_AB, BATTLEANIMFUNC_48, $02, $13
-
-; ANIM_OBJ_A9
- battleanimobj $21, $90, BATTLEANIMFRAMESET_AC, BATTLEANIMFUNC_44, $02, $13
-
-; ANIM_OBJ_AA
- battleanimobj $01, $a8, BATTLEANIMFRAMESET_05, BATTLEANIMFUNC_00, $02, $01
-
-; ANIM_OBJ_AB
- battleanimobj $01, $90, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_43, $02, $0e
-
-; ANIM_OBJ_AC
- battleanimobj $01, $88, BATTLEANIMFRAMESET_AD, BATTLEANIMFUNC_00, $06, $17
-
-; ANIM_OBJ_AD
- battleanimobj $01, $a8, BATTLEANIMFRAMESET_AE, BATTLEANIMFUNC_49, $02, $01
-
-; ANIM_OBJ_AE
- battleanimobj $21, $90, BATTLEANIMFRAMESET_AF, BATTLEANIMFUNC_01, $03, $11
-
-; ANIM_OBJ_AF
- battleanimobj $21, $00, BATTLEANIMFRAMESET_B0, BATTLEANIMFUNC_4A, $02, $04
-
-; ANIM_OBJ_B0
- battleanimobj $00, $00, BATTLEANIMFRAMESET_70, BATTLEANIMFUNC_4B, $04, $1c
-
-; ANIM_OBJ_B1
- battleanimobj $01, $88, BATTLEANIMFRAMESET_B1, BATTLEANIMFUNC_4C, $02, $19
-
-; ANIM_OBJ_B2
- battleanimobj $01, $b8, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_4D, $07, $09
-
-; ANIM_OBJ_B3
- battleanimobj $61, $98, BATTLEANIMFRAMESET_B3, BATTLEANIMFUNC_00, $03, $27
-
-; ANIM_OBJ_B4
- battleanimobj $61, $98, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_04, $06, $15
-
-; ANIM_OBJ_B5
- battleanimobj $21, $ff, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_4E, $07, $09
-
-; ANIM_OBJ_FLOWER
- battleanimobj $01, $90, BATTLEANIMFRAMESET_73, BATTLEANIMFUNC_08, $04, $1e
-
-; ANIM_OBJ_COTTON
- battleanimobj $01, $ff, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_4F, $04, $1f
-
-; ANIM_OBJ_PLAYERFEETFOLLOW
- battleanimobj $00, $00, BATTLEANIMFRAMESET_B5, BATTLEANIMFUNC_00, $00, $28
-
-; ANIM_OBJ_ENEMYFEETFOLLOW
- battleanimobj $00, $00, BATTLEANIMFRAMESET_B6, BATTLEANIMFUNC_00, $01, $29
-
-; ANIM_OBJ_BA
- battleanimobj $00, $00, BATTLEANIMFRAMESET_B7, BATTLEANIMFUNC_00, $00, $28
-
-; ANIM_OBJ_BB
- battleanimobj $00, $00, BATTLEANIMFRAMESET_B8, BATTLEANIMFUNC_00, $01, $29
-
+BattleAnimObjects: ; ccb56
+; entries correspond to ANIM_OBJ_* constants
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_00, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_00
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_01, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_01
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_02, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_02
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_00, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_03
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_01, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_04
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_02, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_05
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_03, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_06
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_04, BATTLEANIMFUNC_1B, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_07
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_05, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_08
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_06, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_09
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_07, BATTLEANIMFUNC_09, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_0A
+ battleanimobj RELATIVE_X, $aa, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_10, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_0B
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_0E, BATTLEANIMFUNC_04, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_0C
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_03, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_0D
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_08, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_0E
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_0A, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_0F
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_11, BATTLEANIMFUNC_03, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_BURNED
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_12, BATTLEANIMFUNC_08, PAL_BATTLE_OB_BLUE, $0a ; ANIM_OBJ_BLIZZARD
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_13, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $0a ; ANIM_OBJ_12
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_14, BATTLEANIMFUNC_01, PAL_BATTLE_OB_BLUE, $0a ; ANIM_OBJ_ICE_BEAM
+ battleanimobj RELATIVE_X | X_FLIP, $78, BATTLEANIMFRAMESET_16, BATTLEANIMFUNC_RAZOR_LEAF, PAL_BATTLE_OB_GREEN, $06 ; ANIM_OBJ_RAZOR_LEAF
+ battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_09, BATTLEANIMFUNC_12, PAL_BATTLE_OB_RED, $0b ; ANIM_OBJ_POKE_BALL
+ battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_09, BATTLEANIMFUNC_13, PAL_BATTLE_OB_RED, $0b ; ANIM_OBJ_POKE_BALL_BLOCKED
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_18, BATTLEANIMFUNC_00, PAL_BATTLE_OB_RED, $08 ; ANIM_OBJ_17
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_18, BATTLEANIMFUNC_00, PAL_BATTLE_OB_RED, $08 ; ANIM_OBJ_18
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_1D, BATTLEANIMFUNC_06, PAL_BATTLE_OB_GRAY, $0c ; ANIM_OBJ_19
+ battleanimobj RELATIVE_X, $b4, BATTLEANIMFRAMESET_1F, BATTLEANIMFUNC_38, PAL_BATTLE_OB_GRAY, $0c ; ANIM_OBJ_1A
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_08, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $07 ; ANIM_OBJ_1B
+ battleanimobj RELATIVE_X, $a0, BATTLEANIMFRAMESET_08, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $07 ; ANIM_OBJ_BALL_POOF
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_07, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_1D
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_1A, BATTLEANIMFUNC_07, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_1E
+ battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_1B, BATTLEANIMFUNC_36, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_1F
+ battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_84, BATTLEANIMFUNC_36, PAL_BATTLE_OB_BLUE, $21 ; ANIM_OBJ_20
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_0C, PAL_BATTLE_OB_BLUE, $0d ; ANIM_OBJ_BUBBLE
+ battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_23, BATTLEANIMFUNC_0D, PAL_BATTLE_OB_BLUE, $0d ; ANIM_OBJ_22
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_0E, PAL_BATTLE_OB_GRAY, $0e ; ANIM_OBJ_23
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $80, BATTLEANIMFRAMESET_27, BATTLEANIMFUNC_0F, PAL_BATTLE_OB_BLUE, $04 ; ANIM_OBJ_24
+ battleanimobj RELATIVE_X, $b4, BATTLEANIMFRAMESET_2A, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $04 ; ANIM_OBJ_25
+ battleanimobj RELATIVE_X, $40, BATTLEANIMFRAMESET_2B, BATTLEANIMFUNC_11, PAL_BATTLE_OB_GREEN, $0f ; ANIM_OBJ_26
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_2C, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $10 ; ANIM_OBJ_27
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_09, PAL_BATTLE_OB_YELLOW, $10 ; ANIM_OBJ_28
+ battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_2E, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $0a ; ANIM_OBJ_ICE_BUILDUP
+ battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_2F, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $0a ; ANIM_OBJ_FROZEN
+ battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_14, PAL_BATTLE_OB_BROWN, $11 ; ANIM_OBJ_MASTER_BALL_SPARKLE
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_14, PAL_BATTLE_OB_YELLOW, $0d ; ANIM_OBJ_2C
+ battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_31, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_2D
+ battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_32, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_2E
+ battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_33, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_2F
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_15, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_30
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_36, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_31
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_37, BATTLEANIMFUNC_03, PAL_BATTLE_OB_GRAY, $08 ; ANIM_OBJ_LIGHTNING_BOLT
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_38, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_33
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_39, BATTLEANIMFUNC_03, PAL_BATTLE_OB_GRAY, $08 ; ANIM_OBJ_34
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_3A, BATTLEANIMFUNC_16, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_35
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_3C, BATTLEANIMFUNC_17, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_36
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_3E, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_37
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_3F, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_38
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_40, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_39
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_41, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_3A
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_42, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_3B
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_43, BATTLEANIMFUNC_18, PAL_BATTLE_OB_GREEN, $12 ; ANIM_OBJ_3C
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_44, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GREEN, $12 ; ANIM_OBJ_3D
+ battleanimobj RELATIVE_X | X_FLIP, $b8, BATTLEANIMFRAMESET_45, BATTLEANIMFUNC_19, PAL_BATTLE_OB_GRAY, $13 ; ANIM_OBJ_GUST
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_46, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_3F
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_47, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_40
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_48, BATTLEANIMFUNC_1A, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_41
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_49, BATTLEANIMFUNC_1A, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_42
+ battleanimobj RELATIVE_X | X_FLIP, $98, BATTLEANIMFRAMESET_4A, BATTLEANIMFUNC_01, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_43
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_4B, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_44
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_4C, BATTLEANIMFUNC_1C, PAL_BATTLE_OB_GREEN, $12 ; ANIM_OBJ_ABSORB
+ battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_4D, BATTLEANIMFUNC_1D, PAL_BATTLE_OB_GRAY, $15 ; ANIM_OBJ_46
+ battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_51, BATTLEANIMFUNC_1E, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_47
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_52, BATTLEANIMFUNC_1F, PAL_BATTLE_OB_GREEN, $16 ; ANIM_OBJ_48
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_54, BATTLEANIMFUNC_1F, PAL_BATTLE_OB_GREEN, $16 ; ANIM_OBJ_49
+ battleanimobj RELATIVE_X | X_FLIP, $68, BATTLEANIMFRAMESET_56, BATTLEANIMFUNC_LEECH_SEED, PAL_BATTLE_OB_GREEN, $06 ; ANIM_OBJ_LEECH_SEED
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_59, BATTLEANIMFUNC_21, PAL_BATTLE_OB_GRAY, $0e ; ANIM_OBJ_4B
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_5C, BATTLEANIMFUNC_02, PAL_BATTLE_OB_GRAY, $17 ; ANIM_OBJ_4C
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_5D, BATTLEANIMFUNC_22, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_4D
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $88, BATTLEANIMFRAMESET_5F, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $10 ; ANIM_OBJ_4E
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $88, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_09, PAL_BATTLE_OB_YELLOW, $10 ; ANIM_OBJ_4F
+ battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $18 ; ANIM_OBJ_50
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $18 ; ANIM_OBJ_51
+ battleanimobj RELATIVE_X | X_FLIP, $50, BATTLEANIMFRAMESET_61, BATTLEANIMFUNC_23, PAL_BATTLE_OB_YELLOW, $19 ; ANIM_OBJ_CHICK
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_63, BATTLEANIMFUNC_24, PAL_BATTLE_OB_GRAY, $19 ; ANIM_OBJ_53
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_66, BATTLEANIMFUNC_25, PAL_BATTLE_OB_GRAY, $19 ; ANIM_OBJ_54
+ battleanimobj RELATIVE_X, $50, BATTLEANIMFRAMESET_1C, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $0c ; ANIM_OBJ_SKULL
+ battleanimobj RELATIVE_X | X_FLIP, $a8, BATTLEANIMFRAMESET_67, BATTLEANIMFUNC_26, PAL_BATTLE_OB_BROWN, $1a ; ANIM_OBJ_56
+ battleanimobj RELATIVE_X | X_FLIP, $a8, BATTLEANIMFRAMESET_68, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BROWN, $1a ; ANIM_OBJ_57
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_69, BATTLEANIMFUNC_01, PAL_BATTLE_OB_GRAY, $1a ; ANIM_OBJ_58
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_6D, BATTLEANIMFUNC_28, PAL_BATTLE_OB_YELLOW, $19 ; ANIM_OBJ_PARALYZED
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_6A, BATTLEANIMFUNC_27, PAL_BATTLE_OB_GRAY, $1b ; ANIM_OBJ_5A
+ battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SPRIAL_DESCENT, PAL_BATTLE_OB_GRAY, $1c ; ANIM_OBJ_HAZE
+ battleanimobj RELATIVE_X | X_FLIP, $48, BATTLEANIMFRAMESET_70, BATTLEANIMFUNC_SPRIAL_DESCENT, PAL_BATTLE_OB_GRAY, $1c ; ANIM_OBJ_MIST
+ battleanimobj RELATIVE_X | X_FLIP, $48, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SPRIAL_DESCENT, PAL_BATTLE_OB_GRAY, $1c ; ANIM_OBJ_SMOG
+ battleanimobj RELATIVE_X | X_FLIP, $78, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_POISON_GAS, PAL_BATTLE_OB_GRAY, $1c ; ANIM_OBJ_POISON_GAS
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLEANIMFRAMESET_71, BATTLEANIMFUNC_HORN, PAL_BATTLE_OB_GRAY, $1d ; ANIM_OBJ_HORN
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLEANIMFRAMESET_72, BATTLEANIMFUNC_2C, PAL_BATTLE_OB_GRAY, $1d ; ANIM_OBJ_60
+ battleanimobj RELATIVE_X, $48, BATTLEANIMFRAMESET_73, BATTLEANIMFUNC_2D, PAL_BATTLE_OB_RED, $1e ; ANIM_OBJ_61
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_06, PAL_BATTLE_OB_GRAY, $15 ; ANIM_OBJ_62
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_75, BATTLEANIMFUNC_2E, PAL_BATTLE_OB_BROWN, $19 ; ANIM_OBJ_63
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_4A, BATTLEANIMFUNC_02, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_64
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_2F, PAL_BATTLE_OB_GRAY, $11 ; ANIM_OBJ_65
+ battleanimobj RELATIVE_X, $78, BATTLEANIMFRAMESET_76, BATTLEANIMFUNC_POISON_GAS, PAL_BATTLE_OB_RED, $23 ; ANIM_OBJ_66
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_30, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_67
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_02, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_68
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_69
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_08, PAL_BATTLE_OB_YELLOW, $23 ; ANIM_OBJ_6A
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_79, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_6B
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_31, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_6C
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_31, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_6D
+ battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_7B, BATTLEANIMFUNC_32, PAL_BATTLE_OB_GRAY, $20 ; ANIM_OBJ_SKY_ATTACK_FEAROW
+ battleanimobj RELATIVE_X | X_FLIP, $98, BATTLEANIMFRAMESET_7C, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $04 ; ANIM_OBJ_LICK
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_7D, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $18 ; ANIM_OBJ_WITHDRAW
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_2F, PAL_BATTLE_OB_BLUE, $0d ; ANIM_OBJ_71
+ battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_7E, BATTLEANIMFUNC_33, PAL_BATTLE_OB_YELLOW, $12 ; ANIM_OBJ_72
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_7F, BATTLEANIMFUNC_2F, PAL_BATTLE_OB_GRAY, $08 ; ANIM_OBJ_73
+ battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_34, PAL_BATTLE_OB_GRAY, $1c ; ANIM_OBJ_74
+ battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_35, PAL_BATTLE_OB_GRAY, $15 ; ANIM_OBJ_75
+ battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_80, BATTLEANIMFUNC_33, PAL_BATTLE_OB_GRAY, $14 ; ANIM_OBJ_76
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_81, BATTLEANIMFUNC_37, PAL_BATTLE_OB_GRAY, $11 ; ANIM_OBJ_77
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_85, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $22 ; ANIM_OBJ_78
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_86, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $22 ; ANIM_OBJ_79
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_87, BATTLEANIMFUNC_39, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_7A
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_3A, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_7B
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_7C
+ battleanimobj RELATIVE_X | X_FLIP | BEHIND_BG, $88, BATTLEANIMFRAMESET_88, BATTLEANIMFUNC_3B, PAL_BATTLE_OB_BLUE, $13 ; ANIM_OBJ_7D
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_76, BATTLEANIMFUNC_25, PAL_BATTLE_OB_RED, $23 ; ANIM_OBJ_HEART
+ battleanimobj RELATIVE_X, $98, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_34, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_7F
+ battleanimobj RELATIVE_X, $a8, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_3C, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_80
+ battleanimobj RELATIVE_X | X_FLIP, $68, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_SPRIAL_DESCENT, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_COTTON_SPORE
+ battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_8A, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_82
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_8C, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_83
+ battleanimobj RELATIVE_X | X_FLIP, $50, BATTLEANIMFRAMESET_8D, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $1f ; ANIM_OBJ_84
+ battleanimobj RELATIVE_X, $40, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_40, PAL_BATTLE_OB_GRAY, $0e ; ANIM_OBJ_85
+ battleanimobj RELATIVE_X | X_FLIP, $a8, BATTLEANIMFRAMESET_8E, BATTLEANIMFUNC_41, PAL_BATTLE_OB_RED, $1f ; ANIM_OBJ_86
+ battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_8F, BATTLEANIMFUNC_3E, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_87
+ battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_93, BATTLEANIMFUNC_3E, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_88
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_97, BATTLEANIMFUNC_3D, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_89
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_3D, PAL_BATTLE_OB_YELLOW, $23 ; ANIM_OBJ_8A
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_2E, PAL_BATTLE_OB_GRAY, $19 ; ANIM_OBJ_8B
+ battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_02, PAL_BATTLE_OB_GRAY, $15 ; ANIM_OBJ_8C
+ battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_35, PAL_BATTLE_OB_RED, $19 ; ANIM_OBJ_8D
+ battleanimobj RELATIVE_X | X_FLIP, $70, BATTLEANIMFRAMESET_8B, BATTLEANIMFUNC_3F, PAL_BATTLE_OB_GRAY, $1f ; ANIM_OBJ_SPIKES
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_15, BATTLEANIMFUNC_08, PAL_BATTLE_OB_GRAY, $0a ; ANIM_OBJ_8F
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_11, BATTLEANIMFUNC_02, PAL_BATTLE_OB_RED, $03 ; ANIM_OBJ_90
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_7F, BATTLEANIMFUNC_42, PAL_BATTLE_OB_GRAY, $08 ; ANIM_OBJ_91
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_9A, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $1b ; ANIM_OBJ_92
+ battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_9B, BATTLEANIMFUNC_35, PAL_BATTLE_OB_RED, $23 ; ANIM_OBJ_93
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_23, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_94
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9D, BATTLEANIMFUNC_25, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_95
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_96
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9E, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $25 ; ANIM_OBJ_97
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $80, BATTLEANIMFRAMESET_9F, BATTLEANIMFUNC_3A, PAL_BATTLE_OB_GREEN, $23 ; ANIM_OBJ_98
+ battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_A0, BATTLEANIMFUNC_16, PAL_BATTLE_OB_GRAY, $23 ; ANIM_OBJ_99
+ battleanimobj RELATIVE_X | X_FLIP, $70, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_43, PAL_BATTLE_OB_YELLOW, $23 ; ANIM_OBJ_9A
+ battleanimobj RELATIVE_X | X_FLIP, $c0, BATTLEANIMFRAMESET_A2, BATTLEANIMFUNC_01, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_9B
+ battleanimobj RELATIVE_X | X_FLIP, $40, BATTLEANIMFRAMESET_A3, BATTLEANIMFUNC_44, PAL_BATTLE_OB_YELLOW, $24 ; ANIM_OBJ_9C
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_A4, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $24 ; ANIM_OBJ_9D
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_A5, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $24 ; ANIM_OBJ_9E
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_43, BATTLEANIMFUNC_45, PAL_BATTLE_OB_RED, $12 ; ANIM_OBJ_9F
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_A6, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_A0
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_A7, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $02 ; ANIM_OBJ_A1
+ battleanimobj RELATIVE_X | X_FLIP, $00, BATTLEANIMFRAMESET_B4, BATTLEANIMFUNC_4A, PAL_BATTLE_OB_BROWN, $0f ; ANIM_OBJ_A2
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_A8, BATTLEANIMFUNC_02, PAL_BATTLE_OB_YELLOW, $05 ; ANIM_OBJ_A3
+ battleanimobj RELATIVE_X | X_FLIP, $40, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_11, PAL_BATTLE_OB_GRAY, $25 ; ANIM_OBJ_A4
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLEANIMFRAMESET_A9, BATTLEANIMFUNC_46, PAL_BATTLE_OB_GRAY, $23 ; ANIM_OBJ_A5
+ battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_47, PAL_BATTLE_OB_GRAY, $0e ; ANIM_OBJ_PERISH_SONG
+ battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_AA, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $24 ; ANIM_OBJ_A7
+ battleanimobj RELATIVE_X | X_FLIP, $b8, BATTLEANIMFRAMESET_AB, BATTLEANIMFUNC_48, PAL_BATTLE_OB_GRAY, $13 ; ANIM_OBJ_A8
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_AC, BATTLEANIMFUNC_44, PAL_BATTLE_OB_GRAY, $13 ; ANIM_OBJ_A9
+ battleanimobj RELATIVE_X, $a8, BATTLEANIMFRAMESET_05, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_AA
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_43, PAL_BATTLE_OB_GRAY, $0e ; ANIM_OBJ_AB
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_AD, BATTLEANIMFUNC_00, PAL_BATTLE_OB_BLUE, $17 ; ANIM_OBJ_AC
+ battleanimobj RELATIVE_X, $a8, BATTLEANIMFRAMESET_AE, BATTLEANIMFUNC_49, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_AD
+ battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_AF, BATTLEANIMFUNC_01, PAL_BATTLE_OB_YELLOW, $11 ; ANIM_OBJ_AE
+ battleanimobj RELATIVE_X | X_FLIP, $00, BATTLEANIMFRAMESET_B0, BATTLEANIMFUNC_4A, PAL_BATTLE_OB_GRAY, $04 ; ANIM_OBJ_AF
+ battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_70, BATTLEANIMFUNC_4B, PAL_BATTLE_OB_RED, $1c ; ANIM_OBJ_B0
+ battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_B1, BATTLEANIMFUNC_4C, PAL_BATTLE_OB_GRAY, $19 ; ANIM_OBJ_B1
+ battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_4D, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_B2
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_B3, BATTLEANIMFUNC_00, PAL_BATTLE_OB_YELLOW, $27 ; ANIM_OBJ_B3
+ battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_04, PAL_BATTLE_OB_BLUE, $15 ; ANIM_OBJ_B4
+ battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_4E, PAL_BATTLE_OB_BROWN, $09 ; ANIM_OBJ_B5
+ battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_73, BATTLEANIMFUNC_08, PAL_BATTLE_OB_RED, $1e ; ANIM_OBJ_FLOWER
+ battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_4F, PAL_BATTLE_OB_RED, $1f ; ANIM_OBJ_COTTON
+ battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B5, BATTLEANIMFUNC_00, PAL_BATTLE_OB_ENEMY, $28 ; ANIM_OBJ_PLAYERFEETFOLLOW
+ battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B6, BATTLEANIMFUNC_00, PAL_BATTLE_OB_PLAYER, $29 ; ANIM_OBJ_ENEMYFEETFOLLOW
+ battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B7, BATTLEANIMFUNC_00, PAL_BATTLE_OB_ENEMY, $28 ; ANIM_OBJ_BA
+ battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B8, BATTLEANIMFUNC_00, PAL_BATTLE_OB_PLAYER, $29 ; ANIM_OBJ_BB
; ccfbe
diff --git a/battle/objects/engine.asm b/battle/objects/engine.asm
index eca0af8a1..6a4f86902 100755
--- a/battle/objects/engine.asm
+++ b/battle/objects/engine.asm
@@ -249,10 +249,10 @@ InitBattleAnimBuffer: ; ccaaa
.check_kinesis_softboiled_milkdrink
sub d
push af
- ld a, [FXAnimIDHi]
+ ld a, [FXAnimID + 1]
or a
jr nz, .no_sub
- ld a, [FXAnimIDLo]
+ ld a, [FXAnimID]
cp KINESIS
jr z, .kinesis
cp SOFTBOILED
@@ -302,13 +302,13 @@ GetBattleAnimTileOffset: ; ccb31 (33:4b31)
ret
_ExecuteBGEffects: ; ccb48
- callab ExecuteBGEffects
+ callfar ExecuteBGEffects
ret
; ccb4f
_QueueBGEffect: ; ccb4f (33:4b4f)
- callab QueueBGEffect
+ callfar QueueBGEffect
ret
; ccb56 (33:4b56)
diff --git a/battle/objects/functions.asm b/battle/objects/functions.asm
index debfcf04d..64c390cbe 100755
--- a/battle/objects/functions.asm
+++ b/battle/objects/functions.asm
@@ -424,7 +424,7 @@ BattleAnimFunction_PokeBallBlocked: ; cd212 (33:5212)
ret
GetBallAnimPal: ; cd249 (33:5249)
- ld hl, .balls
+ ld hl, BallColors
ld a, [rSVBK]
push af
ld a, $1
@@ -448,22 +448,10 @@ GetBallAnimPal: ; cd249 (33:5249)
add hl, bc
ld [hl], a
ret
-
; cd26c (33:526c)
-.balls
- db MASTER_BALL, 5
- db ULTRA_BALL, 3
- db GREAT_BALL, 6
- db POKE_BALL, 4
- db HEAVY_BALL, 2
- db LEVEL_BALL, 7
- db LURE_BALL, 6
- db FAST_BALL, 6
- db FRIEND_BALL, 3
- db MOON_BALL, 2
- db LOVE_BALL, 4
- db -1, 2
-; cd284
+
+INCLUDE "data/battle/ball_colors.asm"
+
BattleAnimFunction_10: ; cd284 (33:5284)
call BattleAnim_AnonJumptable
.anon_dw
diff --git a/battle/objects/gfx_headers.asm b/battle/objects/gfx_headers.asm
index 60164918b..901144ec7 100755
--- a/battle/objects/gfx_headers.asm
+++ b/battle/objects/gfx_headers.asm
@@ -1,12 +1,11 @@
-
-AnimObjGFX: ; cfcf6
-
object_gfx: MACRO
; # tiles, label
db \1
dba \2
ENDM
+AnimObjGFX: ; cfcf6
+; entries correspond to ANIM_GFX_* constants
object_gfx 0, AnimObj00GFX
object_gfx 21, AnimObjHitGFX
object_gfx 6, AnimObjCutGFX
diff --git a/battle/trainer_huds.asm b/battle/trainer_huds.asm
index 03a85b9f4..9efe08414 100755
--- a/battle/trainer_huds.asm
+++ b/battle/trainer_huds.asm
@@ -256,10 +256,10 @@ _ShowLinkBattleParticipants: ; 2c1b2
ld de, OTPlayerName
call PlaceString
hlcoord 9, 8
- ld a, $69 ; "V"
+ ld a, "<BOLD_V>"
ld [hli], a
- ld [hl], $6a ; "S"
- callba LinkBattle_TrainerHuds ; no need to callba
+ ld [hl], "<BOLD_S>"
+ farcall LinkBattle_TrainerHuds ; no need to farcall
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
diff --git a/battle/used_move_text.asm b/battle/used_move_text.asm
index 5b7fcef1a..ea2351005 100755
--- a/battle/used_move_text.asm
+++ b/battle/used_move_text.asm
@@ -32,7 +32,7 @@ UsedMoveText: ; 105db9
ld [wd265], a
push hl
- callba CheckUserIsCharging
+ farcall CheckUserIsCharging
pop hl
jr nz, .grammar
diff --git a/constants.asm b/constants.asm
index 782950e40..b8c38cc46 100644
--- a/constants.asm
+++ b/constants.asm
@@ -1,13 +1,14 @@
INCLUDE "macros.asm"
-INCLUDE "gbhw.asm"
INCLUDE "hram.asm"
+INCLUDE "constants/hardware_constants.asm"
INCLUDE "constants/wram_constants.asm"
INCLUDE "constants/pokemon_constants.asm"
INCLUDE "constants/type_constants.asm"
INCLUDE "constants/move_constants.asm"
INCLUDE "constants/battle_constants.asm"
+INCLUDE "constants/map_dimension_constants.asm"
INCLUDE "constants/map_constants.asm"
INCLUDE "constants/map_setup_constants.asm"
INCLUDE "constants/landmark_constants.asm"
@@ -20,14 +21,21 @@ INCLUDE "constants/music_constants.asm"
INCLUDE "constants/sfx_constants.asm"
INCLUDE "constants/animation_constants.asm"
INCLUDE "constants/phone_constants.asm"
+INCLUDE "constants/credits_constants.asm"
INCLUDE "constants/gfx_constants.asm"
+INCLUDE "constants/input_constants.asm"
INCLUDE "constants/pokemon_data_constants.asm"
+INCLUDE "constants/serial_constants.asm"
+INCLUDE "constants/mobile_constants.asm"
INCLUDE "constants/misc_constants.asm"
INCLUDE "constants/std_constants.asm"
INCLUDE "constants/deco_constants.asm"
INCLUDE "constants/radio_constants.asm"
+INCLUDE "constants/npctrade_constants.asm"
INCLUDE "constants/sprite_constants.asm"
-INCLUDE "constants/tilemap_constants.asm"
+INCLUDE "constants/sprite_data_constants.asm"
+INCLUDE "constants/tileset_constants.asm"
+INCLUDE "constants/collision_constants.asm"
INCLUDE "constants/cgb_constants.asm"
INCLUDE "constants/battle_tower_constants.asm"
INCLUDE "constants/cry_constants.asm"
diff --git a/constants/animation_constants.asm b/constants/animation_constants.asm
index ea052aabb..e7c844c12 100644
--- a/constants/animation_constants.asm
+++ b/constants/animation_constants.asm
@@ -1,3 +1,4 @@
+; battle_anim_struct members (see macros/wram.asm)
const_def
const BATTLEANIMSTRUCT_INDEX
const BATTLEANIMSTRUCT_01
@@ -25,6 +26,7 @@
const BATTLEANIMSTRUCT_17
BATTLEANIMSTRUCT_LENGTH EQU const_value
+; BattleAnimObjects indexes (see battle/objects/data.asm)
const_def
const ANIM_OBJ_00
const ANIM_OBJ_01
@@ -215,6 +217,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_BA
const ANIM_OBJ_BB
+; DoBattleAnimFrame arguments (see battle/objects/functions.asm)
const_def
const BATTLEANIMFUNC_00
const BATTLEANIMFUNC_01
@@ -297,6 +300,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const BATTLEANIMFUNC_4E
const BATTLEANIMFUNC_4F
+; BattleAnimFrameData indexes (see battle/objects/framesets.asm)
const_def
const BATTLEANIMFRAMESET_00
const BATTLEANIMFRAMESET_01
@@ -484,6 +488,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const BATTLEANIMFRAMESET_B7
const BATTLEANIMFRAMESET_B8
+; BattleAnimOAMData indexes (see battle/objects/oam.asm)
const_def
const BATTLEANIMOAMSET_00
const BATTLEANIMOAMSET_01
@@ -702,6 +707,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const BATTLEANIMOAMSET_D6
const BATTLEANIMOAMSET_D7
+; BattleBGEffects indexes (see battle/bg_effects.asm)
const_value SET 1
const ANIM_BG_FLASH_INVERTED
const ANIM_BG_FLASH_WHITE
@@ -757,17 +763,19 @@ const_value SET 1
const ANIM_BG_WOBBLE_MON
const ANIM_BG_35
+; PokeAnims indexes (see gfx/pics/animation.asm)
const_def
- const ANIM_MON_SLOW ; 0
- const ANIM_MON_NORMAL ; 1
- const ANIM_MON_MENU ; 2
- const ANIM_MON_TRADE ; 3
- const ANIM_MON_EVOLVE ; 4
- const ANIM_MON_HATCH ; 5
- const ANIM_MON_UNUSED ; 6
- const ANIM_MON_EGG1 ; 7
- const ANIM_MON_EGG2 ; 8
+ const ANIM_MON_SLOW
+ const ANIM_MON_NORMAL
+ const ANIM_MON_MENU
+ const ANIM_MON_TRADE
+ const ANIM_MON_EVOLVE
+ const ANIM_MON_HATCH
+ const ANIM_MON_UNUSED
+ const ANIM_MON_EGG1
+ const ANIM_MON_EGG2
+; AnimObjGFX indexes (see battle/objects/gfx_headers.asm)
const_value SET 1
const ANIM_GFX_HIT
const ANIM_GFX_CUT
@@ -809,8 +817,31 @@ const_value SET 1
const ANIM_GFX_WAVE
const ANIM_GFX_AEROBLAST
+; battle_bg_effect struct members (see macros/wram.asm)
const_def
const BG_EFFECT_STRUCT_FUNCTION
const BG_EFFECT_STRUCT_JT_INDEX
const BG_EFFECT_STRUCT_BATTLE_TURN
const BG_EFFECT_STRUCT_03
+
+; battle palettes
+ const_def
+ const PAL_BATTLE_BG_PLAYER ; 0
+ const PAL_BATTLE_BG_ENEMY ; 1
+ const PAL_BATTLE_BG_ENEMY_HP ; 2
+ const PAL_BATTLE_BG_PLAYER_HP ; 3
+ const PAL_BATTLE_BG_EXP ; 4
+ const PAL_BATTLE_BG_5 ; 5
+ const PAL_BATTLE_BG_6 ; 6
+ const PAL_BATTLE_BG_TEXT ; 7
+
+; animation object palettes
+ const_def
+ const PAL_BATTLE_OB_ENEMY ; 0
+ const PAL_BATTLE_OB_PLAYER ; 1
+ const PAL_BATTLE_OB_GRAY ; 2
+ const PAL_BATTLE_OB_YELLOW ; 3
+ const PAL_BATTLE_OB_RED ; 4
+ const PAL_BATTLE_OB_GREEN ; 5
+ const PAL_BATTLE_OB_BLUE ; 6
+ const PAL_BATTLE_OB_BROWN ; 7
diff --git a/constants/audio_constants.asm b/constants/audio_constants.asm
index bc50e3db2..861c35ee0 100755
--- a/constants/audio_constants.asm
+++ b/constants/audio_constants.asm
@@ -1,63 +1,88 @@
-
-
; pitch
+; FrequencyTable indexes (see audio/notes.asm)
const_def
- const __
- const C_
- const C#
- const D_
- const D#
- const E_
- const F_
- const F#
- const G_
- const G#
- const A_
- const A#
- const B_
- const CC ; used for pitchoffset
+ const __ ; 0
+ const C_ ; 1
+ const C# ; 2
+ const D_ ; 3
+ const D# ; 4
+ const E_ ; 5
+ const F_ ; 6
+ const F# ; 7
+ const G_ ; 8
+ const G# ; 9
+ const A_ ; a
+ const A# ; b
+ const B_ ; c
+ const CC ; d (used for pitchoffset)
; channel
+; ChannelPointers indexes (see engine/audio.asm)
const_def
- const CHAN1
- const CHAN2
- const CHAN3
- const CHAN4
+ const CHAN1 ; 0
+ const CHAN2 ; 1
+ const CHAN3 ; 2
+ const CHAN4 ; 3
NUM_MUSIC_CHANS EQU const_value
NUM_NOISE_CHANS EQU const_value
- const CHAN5
- const CHAN6
- const CHAN7
- const CHAN8
+ const CHAN5 ; 4
+ const CHAN6 ; 5
+ const CHAN7 ; 6
+ const CHAN8 ; 7
NUM_CHANNELS EQU const_value
; Flags1
-SOUND_CHANNEL_ON EQU 0
-SOUND_SUBROUTINE EQU 1
-SOUND_LOOPING EQU 2
-SOUND_SFX EQU 3
-SOUND_NOISE EQU 4
-SOUND_REST EQU 5
+ const_def
+ const SOUND_CHANNEL_ON ; 0
+ const SOUND_SUBROUTINE ; 1
+ const SOUND_LOOPING ; 2
+ const SOUND_SFX ; 3
+ const SOUND_NOISE ; 4
+ const SOUND_REST ; 5
; Flags2
-
-SOUND_VIBRATO EQU 0
-SOUND_PITCH_WHEEL EQU 1
-SOUND_DUTY EQU 2
-SOUND_UNKN_0B EQU 3
-SOUND_CRY_PITCH EQU 4
-SOUND_UNKN_0D EQU 5
-SOUND_UNKN_0E EQU 6
-SOUND_UNKN_0F EQU 7
+ const_def
+ const SOUND_VIBRATO ; 0
+ const SOUND_PITCH_WHEEL ; 1
+ const SOUND_DUTY ; 2
+ const SOUND_UNKN_0B ; 3
+ const SOUND_CRY_PITCH ; 4
+ const SOUND_UNKN_0D ; 5
+ const SOUND_UNKN_0E ; 6
+ const SOUND_UNKN_0F ; 7
; Flags3
-SOUND_VIBRATO_DIR EQU 0
-SOUND_PITCH_WHEEL_DIR EQU 1
+ const_def
+ const SOUND_VIBRATO_DIR ; 0
+ const SOUND_PITCH_WHEEL_DIR ; 1
; NoteFlags
-NOTE_DUTY_OVERRIDE EQU 0
-NOTE_FREQ_OVERRIDE EQU 1
-NOTE_UNKN_3 EQU 3
-NOTE_NOISE_SAMPLING EQU 4
-NOTE_REST EQU 5
-NOTE_VIBRATO_OVERRIDE EQU 6
+ const_def
+ const NOTE_DUTY_OVERRIDE ; 0
+ const NOTE_FREQ_OVERRIDE ; 1
+ const NOTE_UNUSED ; 2
+ const NOTE_UNKN_3 ; 3
+ const NOTE_NOISE_SAMPLING ; 4
+ const NOTE_REST ; 5
+ const NOTE_VIBRATO_OVERRIDE ; 6
+
+; Volume:
+VOLUME_SO1_F EQU 3
+VOLUME_SO2_F EQU 7
+VOLUME_SO1_LEVEL EQU %00000111
+VOLUME_SO2_LEVEL EQU %01110000
+MAX_VOLUME EQU $77
+
+; SoundInput:
+SOUND_INPUT_CH1_F EQU 0
+SOUND_INPUT_CH2_F EQU 1
+SOUND_INPUT_CH3_F EQU 2
+SOUND_INPUT_CH4_F EQU 3
+SOUND_INPUT_GLOBAL_F EQU 7
+
+; Danger:
+DANGER_PITCH_F EQU 4
+DANGER_ON_F EQU 7
+
+; MusicFade:
+MUSIC_FADE_IN_F EQU 7
diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm
index 523713574..f86cd0873 100644
--- a/constants/battle_constants.asm
+++ b/constants/battle_constants.asm
@@ -1,12 +1,20 @@
+; significant level values
MAX_LEVEL EQU 100
MIN_LEVEL EQU 2
EGG_LEVEL EQU 5
+
+; maximum moves known per mon
NUM_MOVES EQU 4
-REST_TURNS EQU 2
-MAX_STAT_LEVEL EQU 13
+; significant stat values
BASE_STAT_LEVEL EQU 7
+MAX_STAT_LEVEL EQU 13
+; turns that Rest sleep lasts
+REST_TURNS EQU 2
+
+; PlayerStatLevels and EnemyStatLevels indexes
+; used for GetStatName
const_def
const ATTACK
const DEFENSE
@@ -15,10 +23,10 @@ BASE_STAT_LEVEL EQU 7
const SP_DEFENSE
const ACCURACY
const EVASION
- const ABILITY
+ const ABILITY ; used for BattleCommand_Curse
NUM_LEVEL_STATS EQU const_value
-; move struct
+; move struct members (see battle/moves/moves.asm)
const_def
const MOVE_ANIM
const MOVE_EFFECT
@@ -30,6 +38,9 @@ NUM_LEVEL_STATS EQU const_value
const MOVE_LENGTH
; stat constants
+; indexes for:
+; - PlayerStats and EnemyStats (see wram.asm)
+; - party_struct and battle_struct members (see macros/wram.asm)
const_value SET 1
const STAT_HP
const STAT_ATK
@@ -38,19 +49,23 @@ const_value SET 1
const STAT_SATK
const STAT_SDEF
NUM_STATS EQU const_value
+
+; stat formula constants
STAT_MIN_NORMAL EQU 5
STAT_MIN_HP EQU 10
+MAX_STAT_VALUE EQU 999
+
; shiny dvs
ATKDEFDV_SHINY EQU $EA
SPDSPCDV_SHINY EQU $AA
-; battle classes
+; battle classes (wBattleMode values)
const_value SET 1
const WILD_BATTLE
const TRAINER_BATTLE
-; battle types
+; battle types (BattleType values)
const_def
const BATTLETYPE_NORMAL
const BATTLETYPE_CANLOSE
@@ -66,7 +81,7 @@ const_value SET 1
const BATTLETYPE_CELEBI
const BATTLETYPE_SUICUNE
-; battle variables
+; GetBattleVar and GetBattleVarAddr arguments (see home/battle.asm)
const_def
const BATTLE_VARS_SUBSTATUS1
const BATTLE_VARS_SUBSTATUS2
@@ -90,8 +105,37 @@ const_value SET 1
const BATTLE_VARS_LAST_MOVE
const BATTLE_VARS_LAST_MOVE_OPP
-; status
-SLP EQU 7 ; 0-7 turns
+; GetBattleVar and GetBattleVarAddr internal indexes (see home/battle.asm)
+ const_def
+ const PLAYER_SUBSTATUS_1
+ const ENEMY_SUBSTATUS_1
+ const PLAYER_SUBSTATUS_2
+ const ENEMY_SUBSTATUS_2
+ const PLAYER_SUBSTATUS_3
+ const ENEMY_SUBSTATUS_3
+ const PLAYER_SUBSTATUS_4
+ const ENEMY_SUBSTATUS_4
+ const PLAYER_SUBSTATUS_5
+ const ENEMY_SUBSTATUS_5
+ const PLAYER_STATUS
+ const ENEMY_STATUS
+ const PLAYER_MOVE_ANIMATION
+ const ENEMY_MOVE_ANIMATION
+ const PLAYER_MOVE_EFFECT
+ const ENEMY_MOVE_EFFECT
+ const PLAYER_MOVE_POWER
+ const ENEMY_MOVE_POWER
+ const PLAYER_MOVE_TYPE
+ const ENEMY_MOVE_TYPE
+ const PLAYER_CUR_MOVE
+ const ENEMY_CUR_MOVE
+ const PLAYER_COUNTER_MOVE
+ const ENEMY_COUNTER_MOVE
+ const PLAYER_LAST_MOVE
+ const ENEMY_LAST_MOVE
+
+; status condition bit flags
+SLP EQU %111 ; 0-7 turns
const_value SET 3
const PSN
const BRN
@@ -100,7 +144,7 @@ const_value SET 3
ALL_STATUS EQU (1 << PSN) + (1 << BRN) + (1 << FRZ) + (1 << PAR) + SLP
-; substatus
+; PlayerSubStatus1 or EnemySubStatus1 bit flags
enum_start 7, -1
enum SUBSTATUS_IN_LOVE
enum SUBSTATUS_ROLLOUT
@@ -111,8 +155,10 @@ ALL_STATUS EQU (1 << PSN) + (1 << BRN) + (1 << FRZ) + (1 << PAR) + SLP
enum SUBSTATUS_CURSE
enum SUBSTATUS_NIGHTMARE
-SUBSTATUS_CURLED EQU 0
+; PlayerSubStatus2 or EnemySubStatus2 bit flags
+SUBSTATUS_CURLED EQU 0
+; PlayerSubStatus3 or EnemySubStatus3 bit flags
enum_start 7, -1
enum SUBSTATUS_CONFUSED
enum SUBSTATUS_FLYING
@@ -123,6 +169,7 @@ SUBSTATUS_CURLED EQU 0
enum SUBSTATUS_RAMPAGE
enum SUBSTATUS_BIDE
+; PlayerSubStatus4 or EnemySubStatus4 bit flags
enum_start 7, -1
enum SUBSTATUS_LEECH_SEED
enum SUBSTATUS_RAGE
@@ -133,6 +180,7 @@ SUBSTATUS_CURLED EQU 0
enum SUBSTATUS_MIST
enum SUBSTATUS_X_ACCURACY
+; PlayerSubStatus5 or EnemySubStatus5 bit flags
enum_start 7, -1
enum SUBSTATUS_CANT_RUN
enum SUBSTATUS_DESTINY_BOND
@@ -143,7 +191,7 @@ SUBSTATUS_CURLED EQU 0
enum SUBSTATUS_UNKNOWN_3
enum SUBSTATUS_TOXIC
-; environmental
+; PlayerScreens or EnemyScreens bit flags
enum_start 4, -1
enum SCREENS_REFLECT
enum SCREENS_LIGHT_SCREEN
@@ -151,7 +199,7 @@ SUBSTATUS_CURLED EQU 0
enum SCREENS_UNUSED
enum SCREENS_SPIKES
-; weather
+; Weather values
const_def
const WEATHER_NONE
const WEATHER_RAIN
@@ -161,8 +209,7 @@ SUBSTATUS_CURLED EQU 0
const WEATHER_SUN_END
const WEATHER_SANDSTORM_END
-
-; move effects
+; MoveEffectsPointers indexes (see battle/moves/move_effects_pointers.asm)
const_def
const EFFECT_NORMAL_HIT
const EFFECT_SLEEP
@@ -322,35 +369,6 @@ SUBSTATUS_CURLED EQU 0
const EFFECT_FLY
const EFFECT_DEFENSE_CURL
-; Battle vars used in home/battle.asm
- const_def
- const PLAYER_SUBSTATUS_1
- const ENEMY_SUBSTATUS_1
- const PLAYER_SUBSTATUS_2
- const ENEMY_SUBSTATUS_2
- const PLAYER_SUBSTATUS_3
- const ENEMY_SUBSTATUS_3
- const PLAYER_SUBSTATUS_4
- const ENEMY_SUBSTATUS_4
- const PLAYER_SUBSTATUS_5
- const ENEMY_SUBSTATUS_5
- const PLAYER_STATUS
- const ENEMY_STATUS
- const PLAYER_MOVE_ANIMATION
- const ENEMY_MOVE_ANIMATION
- const PLAYER_MOVE_EFFECT
- const ENEMY_MOVE_EFFECT
- const PLAYER_MOVE_POWER
- const ENEMY_MOVE_POWER
- const PLAYER_MOVE_TYPE
- const ENEMY_MOVE_TYPE
- const PLAYER_CUR_MOVE
- const ENEMY_CUR_MOVE
- const PLAYER_COUNTER_MOVE
- const ENEMY_COUNTER_MOVE
- const PLAYER_LAST_MOVE
- const ENEMY_LAST_MOVE
-
; wBattleAction
const_def
const BATTLEACTION_MOVE1
@@ -370,6 +388,7 @@ SUBSTATUS_CURLED EQU 0
const BATTLEACTION_E
const BATTLEACTION_FORFEIT
+; wBattleResult
const_def
const WIN
const LOSE
diff --git a/constants/battle_tower_constants.asm b/constants/battle_tower_constants.asm
index 481c1f19b..74df3a36a 100755
--- a/constants/battle_tower_constants.asm
+++ b/constants/battle_tower_constants.asm
@@ -1,3 +1,4 @@
+; BattleTowerAction arguments (see mobile/battle_tower_5c.asm)
const_def
const BATTLETOWERACTION_CHECK_EXPLANATION_READ
const BATTLETOWERACTION_SET_EXPLANATION_READ
@@ -19,8 +20,8 @@
const BATTLETOWERACTION_11 ; store 0 in 5:aa8d
const BATTLETOWERACTION_12 ; store 1 in 5:aa8d
const BATTLETOWERACTION_13 ; check 5:aa8d
- const BATTLETOWERACTION_14 ; if save file is yours: bit 0, [s1_be4f]
- const BATTLETOWERACTION_15 ; set 0, [s1_be4f]
+ const BATTLETOWERACTION_14 ; if save file is yours: bit 0, [sBattleTowerSaveFileFlags]
+ const BATTLETOWERACTION_15 ; set 0, [sBattleTowerSaveFileFlags]
const BATTLETOWERACTION_16 ; update time in SRAM bank 5
const BATTLETOWERACTION_17 ; check time in SRAM bank 5
const BATTLETOWERACTION_LEVEL_CHECK
@@ -32,8 +33,19 @@
const BATTLETOWERACTION_CHOOSEREWARD ; save options
const BATTLETOWERACTION_SAVEOPTIONS
-BATTLETOWER_NO_CHALLENGE EQU 0
-BATTLETOWER_SAVED_AND_LEFT EQU 1
-BATTLETOWER_CHALLENGE_IN_PROGESS EQU 2
-BATTLETOWER_WON_CHALLENGE EQU 3
-BATTLETOWER_RECEIVED_REWARD EQU 4
+; sBattleTowerChallengeState
+ const_def
+ const BATTLETOWER_NO_CHALLENGE
+ const BATTLETOWER_SAVED_AND_LEFT
+ const BATTLETOWER_CHALLENGE_IN_PROGESS
+ const BATTLETOWER_WON_CHALLENGE
+ const BATTLETOWER_RECEIVED_REWARD
+
+BATTLETOWER_NROFPKMNS EQU 3
+BATTLETOWER_TRAINERDATALENGTH EQU $24
+BATTLETOWER_NROFTRAINERS EQU 7
+BATTLETOWER_NRMONSPERLEVELBRACKET EQU BATTLETOWER_NROFPKMNS * BATTLETOWER_NROFTRAINERS
+BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + 3 * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
+
+; return value from BattleTowerAction(BATTLETOWERACTION_CHECKMOBILEEVENT)
+MOBILE_EVENT_OBJECT_GS_BALL EQU $b
diff --git a/constants/cgb_constants.asm b/constants/cgb_constants.asm
index 36cf369c2..c419cd465 100755
--- a/constants/cgb_constants.asm
+++ b/constants/cgb_constants.asm
@@ -1,3 +1,4 @@
+; GetSGBLayout arguments (see engine/cgb_layouts.asm and engine/sgb_layouts.asm)
const_def
const SCGB_BATTLE_GRAYSCALE
const SCGB_BATTLE_COLORS
diff --git a/constants/collision_constants.asm b/constants/collision_constants.asm
new file mode 100644
index 000000000..88fe9ca6e
--- /dev/null
+++ b/constants/collision_constants.asm
@@ -0,0 +1,115 @@
+; collision permissions (see tilesets/collision_permissions.asm)
+LANDTILE EQU $00
+WATERTILE EQU $01
+WALLTILE EQU $0f
+TALK EQU $10
+
+; collision data types (see tilesets/*_collision.asm)
+; TileCollisionTable indexes (see data/collision_permissions.asm)
+COLL_FLOOR EQU $00
+COLL_01 EQU $01 ; garbage
+COLL_03 EQU $03 ; garbage
+COLL_04 EQU $04 ; garbage
+COLL_WALL EQU $07
+COLL_CUT_08 EQU $08 ; unused
+COLL_TALL_GRASS_10 EQU $10 ; unused
+COLL_CUT_TREE EQU $12
+COLL_LONG_GRASS EQU $14
+COLL_HEADBUTT_TREE EQU $15
+COLL_TALL_GRASS EQU $18
+COLL_CUT_TREE_1A EQU $1a ; unused
+COLL_LONG_GRASS_1C EQU $1c ; unused
+COLL_HEADBUTT_TREE_1D EQU $1d ; unused
+COLL_WATER_21 EQU $21 ; ???
+COLL_ICE EQU $23
+COLL_WHIRLPOOL EQU $24
+COLL_BUOY EQU $27
+COLL_CUT_28 EQU $28 ; garbage
+COLL_WATER EQU $29
+COLL_ICE_2B EQU $2b ; unused
+COLL_WHIRLPOOL_2C EQU $2c ; unused
+COLL_WATERFALL_RIGHT EQU $30 ; unused !!!
+COLL_WATERFALL_LEFT EQU $31 ; unused !!!
+COLL_WATERFALL_UP EQU $32 ; unused !!!
+COLL_WATERFALL EQU $33
+COLL_CURRENT_RIGHT EQU $38 ; unused !!!
+COLL_CURRENT_LEFT EQU $39 ; unused !!!
+COLL_CURRENT_UP EQU $3a ; unused !!!
+COLL_CURRENT_DOWN EQU $3b ; unused !!!
+COLL_BRAKE EQU $40 ; unused !!!
+COLL_WALK_RIGHT EQU $41 ; unused !!!
+COLL_WALK_LEFT EQU $42 ; unused !!!
+COLL_WALK_UP EQU $43 ; unused !!!
+COLL_WALK_DOWN EQU $44 ; unused !!!
+COLL_BRAKE_45 EQU $45 ; garbage
+COLL_BRAKE_46 EQU $46 ; unused
+COLL_BRAKE_47 EQU $47 ; unused
+COLL_GRASS_48 EQU $48 ; unused
+COLL_GRASS_49 EQU $49 ; unused
+COLL_GRASS_4A EQU $4a ; garbage
+COLL_GRASS_4B EQU $4b ; garbage
+COLL_GRASS_4C EQU $4c ; unused
+COLL_WALK_RIGHT_ALT EQU $50 ; unused
+COLL_WALK_LEFT_ALT EQU $51 ; unused
+COLL_WALK_UP_ALT EQU $52 ; unused
+COLL_WALK_DOWN_ALT EQU $53 ; unused
+COLL_BRAKE_ALT EQU $54 ; unused
+COLL_BRAKE_55 EQU $55 ; unused
+COLL_BRAKE_56 EQU $56 ; unused
+COLL_BRAKE_57 EQU $57 ; unused
+COLL_5B EQU $5b ; garbage
+COLL_PIT EQU $60
+COLL_VIRTUAL_BOY EQU $61 ; garbage
+COLL_64 EQU $64 ; garbage
+COLL_65 EQU $65 ; garbage
+COLL_PIT_68 EQU $68 ; unused
+COLL_WARP_CARPET_DOWN EQU $70
+COLL_DOOR EQU $71
+COLL_LADDER EQU $72
+COLL_STAIRCASE_73 EQU $73 ; unused
+COLL_CAVE_74 EQU $74 ; unused
+COLL_DOOR_75 EQU $75 ; unused
+COLL_WARP_CARPET_LEFT EQU $76
+COLL_WARP_77 EQU $77 ; unused
+COLL_WARP_CARPET_UP EQU $78
+COLL_DOOR_79 EQU $79 ; unused
+COLL_STAIRCASE EQU $7a
+COLL_CAVE EQU $7b
+COLL_WARP_PANEL EQU $7c
+COLL_DOOR_7D EQU $7d ; unused
+COLL_WARP_CARPET_RIGHT EQU $7e
+COLL_WARP_7F EQU $7f ; unused
+COLL_COUNTER EQU $90
+COLL_BOOKSHELF EQU $91
+COLL_PC EQU $93
+COLL_RADIO EQU $94
+COLL_TOWN_MAP EQU $95
+COLL_MART_SHELF EQU $96
+COLL_TV EQU $97
+COLL_COUNTER_98 EQU $98 ; unused
+COLL_9C EQU $9c ; garbage
+COLL_WINDOW EQU $9d
+COLL_INCENSE_BURNER EQU $9f
+COLL_HOP_RIGHT EQU $a0
+COLL_HOP_LEFT EQU $a1
+COLL_HOP_UP EQU $a2 ; unused !!!
+COLL_HOP_DOWN EQU $a3
+COLL_HOP_DOWN_RIGHT EQU $a4
+COLL_HOP_DOWN_LEFT EQU $a5
+COLL_HOP_UP_RIGHT EQU $a6 ; unused !!!
+COLL_HOP_UP_LEFT EQU $a7 ; unused !!!
+COLL_RIGHT_WALL EQU $b0
+COLL_LEFT_WALL EQU $b1
+COLL_UP_WALL EQU $b2
+COLL_DOWN_WALL EQU $b3 ; unused !!!
+COLL_FF EQU $ff ; garbage
+
+; collision data type nybbles
+LO_NYBBLE_GRASS EQU $07
+HI_NYBBLE_TALL_GRASS EQU $10
+HI_NYBBLE_WATER EQU $20
+HI_NYBBLE_CURRENT EQU $30
+HI_NYBBLE_WALK EQU $40
+HI_NYBBLE_WALK_ALT EQU $50
+HI_NYBBLE_WARPS EQU $70
+HI_NYBBLE_LEDGES EQU $a0
diff --git a/constants/credits_constants.asm b/constants/credits_constants.asm
new file mode 100644
index 000000000..8ee0391de
--- /dev/null
+++ b/constants/credits_constants.asm
@@ -0,0 +1,115 @@
+; CreditsStrings indexes (see data/credits_text.asm)
+ const_def
+ const SATOSHI_TAJIRI
+ const JUNICHI_MASUDA
+ const TETSUYA_WATANABE
+ const SHIGEKI_MORIMOTO
+ const SOUSUKE_TAMADA
+ const TAKENORI_OOTA
+ const KEN_SUGIMORI
+ const MOTOFUMI_FUJIWARA
+ const ATSUKO_NISHIDA
+ const MUNEO_SAITO
+ const SATOSHI_OOTA
+ const RENA_YOSHIKAWA
+ const JUN_OKUTANI
+ const HIRONOBU_YOSHIDA
+ const ASUKA_IWASHITA
+ const GO_ICHINOSE
+ const MORIKAZU_AOKI
+ const KOHJI_NISHINO
+ const KENJI_MATSUSHIMA
+ const TOSHINOBU_MATSUMIYA
+ const SATORU_IWATA
+ const NOBUHIRO_SEYA
+ const KAZUHITO_SEKINE
+ const TETSUJI_OOTA
+ const NCL_SUPER_MARIO_CLUB
+ const SARUGAKUCHO
+ const AKITO_MORI
+ const TAKAHIRO_HARADA
+ const TOHRU_HASHIMOTO
+ const NOBORU_MATSUMOTO
+ const TAKEHIRO_IZUSHI
+ const TAKASHI_KAWAGUCHI
+ const TSUNEKAZU_ISHIHARA
+ const HIROSHI_YAMAUCHI
+ const KENJI_SAIKI
+ const ATSUSHI_TADA
+ const NAOKO_KAWAKAMI
+ const HIROYUKI_ZINNAI
+ const KUNIMI_KAWAMURA
+ const HISASHI_SOGABE
+ const KEITA_KAGAYA
+ const YOSHINORI_MATSUDA
+ const HITOMI_SATO
+ const TORU_OSAWA
+ const TAKAO_OHARA
+ const YUICHIRO_ITO
+ const TAKAO_SHIMIZU
+ const PLANNING
+ const KEITA_NAKAMURA
+ const HIROTAKA_UEMURA
+ const HIROAKI_TAMURA
+ const NORIAKI_SAKAGUCHI
+ const MIYUKI_SATO
+ const GAKUZI_NOMOTO
+ const AI_MASHIMA
+ const MIKIHIRO_ISHIKAWA
+ const HIDEYUKI_HASHIMOTO
+ const SATOSHI_YAMATO
+ const SHIGERU_MIYAMOTO
+ const GAIL_TILDEN
+ const NOB_OGASAWARA
+ const SETH_MCMAHILL
+ const HIROTO_ALEXANDER
+ const TERESA_LILLYGREN
+ const THOMAS_HERTZOG
+ const ERIK_JOHNSON
+ const HIRO_NAKAMURA
+ const TERUKI_MURAKAWA
+ const KAZUYOSHI_OSAWA
+ const KIMIKO_NAKAMICHI
+ const CREDIT_END
+ const CREDIT_UNKNOWN
+ const STAFF
+ const DIRECTOR
+ const CODIRECTOR
+ const PROGRAMMERS
+ const GRAPHICS_DIRECTOR
+ const MONSTER_DESIGN
+ const GRAPHICS_DESIGN
+ const CREDIT_MUSIC
+ const CREDIT_SOUND_EFFECTS
+ const GAME_DESIGN
+ const GAME_SCENARIO
+ const TOOL_PROGRAMMING
+ const PARAMETRIC_DESIGN
+ const SCRIPT_DESIGN
+ const MAP_DATA_DESIGN
+ const MAP_DESIGN
+ const PRODUCT_TESTING
+ const SPECIAL_THANKS
+ const PRODUCERS
+ const EXECUTIVE_PRODUCER
+ const POKEMON_ANIMATION
+ const POKEDEX_TEXT
+ const MOBILE_PRJ_LEADER
+ const MOBILE_SYSTEM_AD
+ const MOBILE_STADIUM_DIR
+ const COORDINATION
+ const COPYRIGHT
+ const US_VERSION_STAFF
+ const US_COORDINATION
+ const TEXT_TRANSLATION
+ const PAAD_TESTING
+
+; CreditsScript indexes (see data/credits_script.asm)
+const_value SET -7
+ const CREDITS_THEEND
+ const CREDITS_WAIT2
+ const CREDITS_MUSIC
+ const CREDITS_CLEAR
+ const CREDITS_SCENE
+ const CREDITS_WAIT
+ const CREDITS_END
diff --git a/constants/cry_constants.asm b/constants/cry_constants.asm
index da40877cc..654aac523 100755
--- a/constants/cry_constants.asm
+++ b/constants/cry_constants.asm
@@ -1,3 +1,4 @@
+; Cries indexes (see audio/cry_pointers.asm)
const_def
; gen 1
diff --git a/constants/deco_constants.asm b/constants/deco_constants.asm
index 22cf1e670..433b11e25 100644
--- a/constants/deco_constants.asm
+++ b/constants/deco_constants.asm
@@ -1,3 +1,4 @@
+; decoration types
const_value = 1
const DECO_PLANT
const DECO_BED
@@ -6,6 +7,7 @@ const_value = 1
const DECO_DOLL
const DECO_BIGDOLL
+; DecorationNames indexes (see engine/decorations.asm)
const_value = 1
const PUT_IT_AWAY
const MAGNAPLANT
@@ -33,6 +35,7 @@ const_value = 1
const YELLOW_CARPET
const GREEN_CARPET
+; DoDecorationAction2 arguments (see engine/decorations.asm)
const_value = 1
const SET_UP_BED
const PUT_AWAY_BED
@@ -56,66 +59,67 @@ deco: MACRO
enum DECOFLAG_\1
endm
+; decorations (see data/decoration_attribute.asm)
const_value = 1
__enum__ = 0
const BEDS
- deco FEATHERY_BED ; 2 (0)
- deco PINK_BED ; 3 (1)
- deco POLKADOT_BED ; 4 (2)
- deco PIKACHU_BED ; 5 (3)
+ deco FEATHERY_BED
+ deco PINK_BED
+ deco POLKADOT_BED
+ deco PIKACHU_BED
const CARPETS
- deco RED_CARPET ; 7 (4)
- deco BLUE_CARPET ; 8 (5)
- deco YELLOW_CARPET ; 9 (6)
- deco GREEN_CARPET ; a (7)
+ deco RED_CARPET
+ deco BLUE_CARPET
+ deco YELLOW_CARPET
+ deco GREEN_CARPET
const PLANTS
- deco MAGNAPLANT ; c (8)
- deco TROPICPLANT ; d (9)
- deco JUMBOPLANT ; e (a)
+ deco MAGNAPLANT
+ deco TROPICPLANT
+ deco JUMBOPLANT
const POSTERS
- deco TOWN_MAP ; 10 (b)
- deco PIKACHU_POSTER ; 11 (c)
- deco CLEFAIRY_POSTER ; 12 (d)
- deco JIGGLYPUFF_POSTER ; 13(e)
+ deco TOWN_MAP
+ deco PIKACHU_POSTER
+ deco CLEFAIRY_POSTER
+ deco JIGGLYPUFF_POSTER
const CONSOLES
- deco FAMICOM ; 15 (f)
- deco SNES ; 16 (10)
- deco N64 ; 17 (11)
- deco VIRTUAL_BOY ; 18 (12)
+ deco FAMICOM
+ deco SNES
+ deco N64
+ deco VIRTUAL_BOY
const BIG_DOLLS
- deco BIG_SNORLAX_DOLL ; 1a (13)
- deco BIG_ONIX_DOLL ; 1b (14)
- deco BIG_LAPRAS_DOLL ; 1c (15)
+ deco BIG_SNORLAX_DOLL
+ deco BIG_ONIX_DOLL
+ deco BIG_LAPRAS_DOLL
const DOLLS
- deco PIKACHU_DOLL ; 1e (16)
- deco SURF_PIKACHU_DOLL ; 1f (17)
- deco CLEFAIRY_DOLL ; 20 (18)
- deco JIGGLYPUFF_DOLL ; 21 (19)
- deco BULBASAUR_DOLL ; 22 (1a)
- deco CHARMANDER_DOLL ; 23 (1b)
- deco SQUIRTLE_DOLL ; 24 (1c)
- deco POLIWAG_DOLL ; 25 (1d)
- deco DIGLETT_DOLL ; 26 (1e)
- deco STARMIE_DOLL ; 27 (1f)
- deco MAGIKARP_DOLL ; 28 (20)
- deco ODDISH_DOLL ; 29 (21)
- deco GENGAR_DOLL ; 2a (22)
- deco SHELLDER_DOLL ; 2b (23)
- deco GRIMER_DOLL ; 2c (24)
- deco VOLTORB_DOLL ; 2d (25)
- deco WEEDLE_DOLL ; 2e (26)
- deco UNOWN_DOLL ; 2f (27)
- deco GEODUDE_DOLL ; 30 (28)
- deco MACHOP_DOLL ; 31 (29)
- deco TENTACOOL_DOLL ; 32 (2a)
- deco GOLD_TROPHY_DOLL ; 33 (2b)
- deco SILVER_TROPHY_DOLL ; 34 (2c)
+ deco PIKACHU_DOLL
+ deco SURF_PIKACHU_DOLL
+ deco CLEFAIRY_DOLL
+ deco JIGGLYPUFF_DOLL
+ deco BULBASAUR_DOLL
+ deco CHARMANDER_DOLL
+ deco SQUIRTLE_DOLL
+ deco POLIWAG_DOLL
+ deco DIGLETT_DOLL
+ deco STARMIE_DOLL
+ deco MAGIKARP_DOLL
+ deco ODDISH_DOLL
+ deco GENGAR_DOLL
+ deco SHELLDER_DOLL
+ deco GRIMER_DOLL
+ deco VOLTORB_DOLL
+ deco WEEDLE_DOLL
+ deco UNOWN_DOLL
+ deco GEODUDE_DOLL
+ deco MACHOP_DOLL
+ deco TENTACOOL_DOLL
+ deco GOLD_TROPHY_DOLL
+ deco SILVER_TROPHY_DOLL
-NUM_NON_TROPHY_DECOS EQU $2b
-NUM_DECOS EQU $2d
+NUM_DECOS = __enum__
+NUM_NON_TROPHY_DECOS = NUM_DECOS +- 2
diff --git a/constants/engine_flags.asm b/constants/engine_flags.asm
index 31a038196..3c088596d 100644
--- a/constants/engine_flags.asm
+++ b/constants/engine_flags.asm
@@ -1,22 +1,29 @@
+; EngineFlags indexes (see engine/engine_flasg.asm)
const_def
-
+; wPokegearFlags
const ENGINE_RADIO_CARD
const ENGINE_MAP_CARD
const ENGINE_PHONE_CARD
const ENGINE_EXPN_CARD
const ENGINE_POKEGEAR
- const ENGINE_DAYCARE_MAN_HAS_EGG
- const ENGINE_DAYCARE_MAN_HAS_MON
- const ENGINE_DAYCARE_LADY_HAS_MON
+; wDayCareMan
+ const ENGINE_DAY_CARE_MAN_HAS_EGG
+ const ENGINE_DAY_CARE_MAN_HAS_MON
+; wDayCareLady
+ const ENGINE_DAY_CARE_LADY_HAS_MON
+; wMomSavingMoney
const ENGINE_MOM_SAVING_MONEY
const ENGINE_DST
+; wUnusedTwoDayTimerOn
const ENGINE_0A
+; StatusFlags
const ENGINE_POKEDEX
const ENGINE_UNOWN_DEX
const ENGINE_POKERUS
const ENGINE_ROCKET_SIGNAL_ON_CH20
const ENGINE_CREDITS_SKIP
const ENGINE_BUG_CONTEST_ON ; 10
+; StatusFlags2
const ENGINE_BUG_CONTEST_TIMER
const ENGINE_SAFARI_ZONE
const ENGINE_ROCKETS_IN_RADIO_TOWER
@@ -24,9 +31,11 @@
const ENGINE_GIVE_POKERUS
const ENGINE_FLORIA
const ENGINE_ROCKETS_IN_MAHOGANY
+; BikeFlags
const ENGINE_STRENGTH_ACTIVE
const ENGINE_ALWAYS_ON_BIKE
const ENGINE_DOWNHILL
+; JohtoBadges
const ENGINE_ZEPHYRBADGE
const ENGINE_HIVEBADGE
const ENGINE_PLAINBADGE
@@ -35,6 +44,7 @@
const ENGINE_STORMBADGE ; 20
const ENGINE_GLACIERBADGE
const ENGINE_RISINGBADGE
+; KantoBadges
const ENGINE_BOULDERBADGE
const ENGINE_CASCADEBADGE
const ENGINE_THUNDERBADGE
@@ -43,6 +53,7 @@
const ENGINE_MARSHBADGE
const ENGINE_VOLCANOBADGE
const ENGINE_EARTHBADGE
+; UnlockedUnowns
const ENGINE_UNLOCKED_UNOWNS_1
const ENGINE_UNLOCKED_UNOWNS_2
const ENGINE_UNLOCKED_UNOWNS_3
@@ -51,6 +62,7 @@
const ENGINE_UNLOCKED_UNOWNS_6 ; 30
const ENGINE_UNLOCKED_UNOWNS_7
const ENGINE_UNLOCKED_UNOWNS_8
+; VisitedSpawns
const ENGINE_FLYPOINT_KRISS_HOUSE
const ENGINE_FLYPOINT_VIRIDIAN_POKECENTER
const ENGINE_FLYPOINT_PALLET
@@ -78,8 +90,11 @@
const ENGINE_FLYPOINT_BLACKTHORN
const ENGINE_FLYPOINT_SILVER_CAVE
const ENGINE_FLYPOINT_UNUSED
+; wLuckyNumberShowFlag
const ENGINE_LUCKY_NUMBER_SHOW
+; StatusFlags2
const ENGINE_4F
+; DailyFlags
const ENGINE_KURT_MAKING_BALLS ; 50
const ENGINE_DAILY_BUG_CONTEST
const ENGINE_SPECIAL_WILDDATA
@@ -88,6 +103,7 @@
const ENGINE_SHUCKLE_GIVEN
const ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED
const ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY
+; WeeklyFlags
const ENGINE_MT_MOON_SQUARE_CLEFAIRY
const ENGINE_UNION_CAVE_LAPRAS
const ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
@@ -96,11 +112,16 @@
const ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
const ENGINE_DAILY_MOVE_TUTOR
const ENGINE_BUENAS_PASSWORD
+; SwarmFlags
const ENGINE_BUENAS_PASSWORD_2 ; 60
const ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
+; GameTimerPause
const ENGINE_62
+; PlayerGender
const ENGINE_PLAYER_IS_FEMALE
+; wCelebiEvent
const ENGINE_HAVE_EXAMINED_GS_BALL
+; wDailyRematchFlags
const ENGINE_JACK
const ENGINE_HUEY
const ENGINE_GAVEN
@@ -125,6 +146,7 @@
const ENGINE_WILTON
const ENGINE_PARRY
const ENGINE_ERIN
+; wDailyPhoneItemFlags
const ENGINE_BEVERLY_HAS_NUGGET
const ENGINE_JOSE_HAS_STAR_PIECE
const ENGINE_WADE_HAS_ITEM
@@ -135,6 +157,7 @@
const ENGINE_TULLY_HAS_WATER_STONE
const ENGINE_TIFFANY_HAS_PINK_BOW
const ENGINE_WILTON_HAS_ITEM
+; wDailyPhoneTimeOfDayFlags
const ENGINE_JACK_MONDAY_MORNING
const ENGINE_HUEY_WEDNESDAY_NIGHT
const ENGINE_GAVEN_THURSDAY_MORNING
@@ -156,10 +179,12 @@
const ENGINE_BRENT_MONDAY_MORNING
const ENGINE_TIFFANY_TUESDAY_AFTERNOON
const ENGINE_VANCE_WEDNESDAY_NIGHT
- const ENGINE_WILTON_THRUSDAY_MORNING
+ const ENGINE_WILTON_THURSDAY_MORNING
const ENGINE_PARRY_FRIDAY_AFTERNOON
const ENGINE_ERIN_SATURDAY_NIGHT
+; wPlayerSpriteSetupFlags
const ENGINE_KRIS_IN_CABLE_CLUB
+; SwarmFlags
const ENGINE_DUNSPARCE_SWARM ; a0
const ENGINE_YANMA_SWARM
NUM_ENGINE_FLAGS EQU const_value
diff --git a/constants/event_flags.asm b/constants/event_flags.asm
index 636d0226c..4c7e9a582 100644
--- a/constants/event_flags.asm
+++ b/constants/event_flags.asm
@@ -1,7 +1,6 @@
-
+; EventFlags bit flags
const_def
-
-; These first eight flags are reset upon reloading the map.
+; The first eight flags are reset upon reloading the map
const EVENT_GAVE_KURT_APRICORNS ; 000
const EVENT_RECEIVED_BALLS_FROM_KURT
const EVENT_DRAGON_SHRINE_QUESTION_2
@@ -10,7 +9,7 @@
const EVENT_DRAGON_SHRINE_QUESTION_5
const EVENT_JUST_RECEIVED_DRATINI
const EVENT_IN_YOUR_ROOM
-; Johto story events
+; Johto Gym Leader TM gifts
const EVENT_GOT_TM31_MUD_SLAP
const EVENT_GOT_TM49_FURY_CUTTER
const EVENT_GOT_TM01_DYNAMICPUNCH
@@ -19,6 +18,7 @@
const EVENT_GOT_TM23_IRON_TAIL
const EVENT_GOT_TM16_ICY_WIND
const EVENT_GOT_TM24_DRAGONBREATH
+; HMs (EVENT_GOT_HM07_WATERFALL is with the Johto itemballs)
const EVENT_GOT_HM01_CUT
const EVENT_GOT_HM02_FLY
const EVENT_GOT_HM03_SURF
@@ -26,9 +26,11 @@
const EVENT_GOT_HM05_FLASH
const EVENT_GOT_HM06_WHIRLPOOL
const EVENT_016
+; Rods
const EVENT_GOT_OLD_ROD
const EVENT_GOT_GOOD_ROD
const EVENT_GOT_SUPER_ROD
+; Johto story events
const EVENT_GOT_A_POKEMON_FROM_ELM
const EVENT_GOT_CYNDAQUIL_FROM_ELM
const EVENT_GOT_TOTODILE_FROM_ELM
@@ -128,7 +130,7 @@
const EVENT_GOT_TM12_SWEET_SCENT
const EVENT_RELEASED_THE_BEASTS
const EVENT_GOT_MASTER_BALL_FROM_ELM
-; Johto Signpost Items
+; Johto hidden items
const EVENT_TIN_TOWER_4F_HIDDEN_MAX_POTION
const EVENT_TIN_TOWER_5F_HIDDEN_FULL_RESTORE
const EVENT_TIN_TOWER_5F_HIDDEN_CARBOS
@@ -143,11 +145,11 @@
const EVENT_ILEX_FOREST_HIDDEN_ETHER
const EVENT_ILEX_FOREST_HIDDEN_SUPER_POTION
const EVENT_ILEX_FOREST_HIDDEN_FULL_HEAL
- const EVENT_WAREHOUSE_ENTRANCE_HIDDEN_PARLYZ_HEAL
- const EVENT_WAREHOUSE_ENTRANCE_HIDDEN_SUPER_POTION
- const EVENT_WAREHOUSE_ENTRANCE_HIDDEN_ANTIDOTE
- const EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION
- const EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE
+ const EVENT_GOLDENROD_UNDERGROUND_HIDDEN_PARLYZ_HEAL
+ const EVENT_GOLDENROD_UNDERGROUND_HIDDEN_SUPER_POTION
+ const EVENT_GOLDENROD_UNDERGROUND_HIDDEN_ANTIDOTE
+ const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION
+ const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE
const EVENT_MOUNT_MORTAR_1F_OUTSIDE_HIDDEN_HYPER_POTION
const EVENT_MOUNT_MORTAR_1F_INSIDE_HIDDEN_MAX_REPEL
const EVENT_MOUNT_MORTAR_2F_INSIDE_HIDDEN_FULL_RESTORE
@@ -234,10 +236,10 @@
const EVENT_TALKED_TO_OAK_IN_KANTO
const EVENT_GOT_HP_UP_FROM_VERMILION_GUY
const EVENT_GOT_TM29_PSYCHIC
-; Kanto Signpost Items
+; Kanto hidden items
const EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE
- const EVENT_UNDERGROUND_HIDDEN_FULL_RESTORE
- const EVENT_UNDERGROUND_HIDDEN_X_SPECIAL
+ const EVENT_UNDERGROUND_PATH_HIDDEN_FULL_RESTORE
+ const EVENT_UNDERGROUND_PATH_HIDDEN_X_SPECIAL
const EVENT_ROCK_TUNNEL_1F_HIDDEN_X_ACCURACY
const EVENT_ROCK_TUNNEL_1F_HIDDEN_X_DEFEND
const EVENT_ROCK_TUNNEL_B1F_HIDDEN_MAX_POTION
@@ -608,7 +610,7 @@
const EVENT_255
const EVENT_256
const EVENT_257
-; Kurt events
+; Kurt Apricorn events
const EVENT_GAVE_KURT_RED_APRICORN
const EVENT_GAVE_KURT_BLU_APRICORN
const EVENT_GAVE_KURT_YLW_APRICORN
@@ -682,7 +684,7 @@
const EVENT_ERIN_ASKED_FOR_PHONE_NUMBER
const EVENT_BUENA_OFFERED_HER_PHONE_NUMBER_NO_BLUE_CARD
const EVENT_29F
-; Ruins Of Alph puzzles
+; Ruins of Alph puzzles
const EVENT_SOLVED_HO_OH_PUZZLE ; 2a0
const EVENT_SOLVED_KABUTO_PUZZLE
const EVENT_SOLVED_OMANYTE_PUZZLE
@@ -734,7 +736,7 @@
const EVENT_DECO_BIG_SNORLAX_DOLL
const EVENT_DECO_BIG_ONIX_DOLL ; 2d0
const EVENT_DECO_BIG_LAPRAS_DOLL
-; More Johto events
+; More Johto story events
const EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE
const EVENT_SWITCH_1
const EVENT_SWITCH_2
@@ -785,10 +787,10 @@
const EVENT_LEARNED_SLOWPOKETAIL
const EVENT_LEARNED_RATICATE_TAIL
const EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE
- const EVENT_WAREHOUSE_LAYOUT_1
- const EVENT_WAREHOUSE_LAYOUT_2
- const EVENT_WAREHOUSE_LAYOUT_3
- const EVENT_WAREHOUSE_BLOCKED_OFF
+ const EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
+ const EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
+ const EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
+ const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF
const EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
const EVENT_WILLS_ROOM_ENTRANCE_CLOSED
const EVENT_WILLS_ROOM_EXIT_OPEN
@@ -818,7 +820,7 @@
const EVENT_GOT_WATER_STONE_FROM_BILLS_GRANDPA
const EVENT_GOT_FIRE_STONE_FROM_BILLS_GRANDPA
const EVENT_GOT_THUNDERSTONE_FROM_BILLS_GRANDPA
-; More Crystal-specific events
+; More Crystal-exclusive events in Johto
const EVENT_LISTENED_TO_INITIAL_RADIO
const EVENT_WALL_OPENED_IN_HO_OH_CHAMBER
const EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
@@ -1015,7 +1017,7 @@
const EVENT_3E5
const EVENT_3E6
const EVENT_3E7
-; Trainer Flags
+; Trainer flags
; Swimmer F
const EVENT_BEAT_SWIMMERF_ELAINE
const EVENT_BEAT_SWIMMERF_PAULA
@@ -1530,7 +1532,7 @@
const EVENT_BEAT_ELITE_4_BRUNO
const EVENT_BEAT_ELITE_4_KAREN
const EVENT_BEAT_CHAMPION_LANCE
-; New to Crystal
+; Crystal-exclusive trainer flags
const EVENT_BEAT_COOLTRAINERM_DARIN
const EVENT_BEAT_COOLTRAINERF_CARA
const EVENT_BEAT_TWINS_LEA_AND_PIA
@@ -1663,10 +1665,11 @@
const EVENT_63D
const EVENT_63E
const EVENT_63F
-; Sprite visibility: When these events are cleared, the sprite becomes visible; when set, the sprite is hidden.
+; Sprite visibility flags
+; When these events are cleared, the sprite becomes visible; when set, the sprite is hidden.
; The map script command macros `disappear` and `appear` set/clear these flags and immediately apply the effect on visibility.
; The map script command macros `setevent` and `clearevent` set/clear these flags, and their effects will be seen when the map is reloaded.
-; Johto items: 0x640
+; Johto itemballs
const EVENT_CYNDAQUIL_POKEBALL_IN_ELMS_LAB
const EVENT_TOTODILE_POKEBALL_IN_ELMS_LAB
const EVENT_CHIKORITA_POKEBALL_IN_ELMS_LAB
@@ -1688,7 +1691,7 @@
const EVENT_TIN_TOWER_8F_MAX_ELIXER
const EVENT_TIN_TOWER_8F_FULL_RESTORE
const EVENT_TEAM_ROCKET_BASE_B3F_ULTRA_BALL
- const EVENT_UNDERGROUND_WAREHOUSE_ULTRA_BALL
+ const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_ULTRA_BALL
const EVENT_BURNED_TOWER_1F_HP_UP
const EVENT_BURNED_TOWER_B1F_TM_ENDURE
const EVENT_NATIONAL_PARK_PARLYZ_HEAL
@@ -1717,15 +1720,15 @@
const EVENT_TEAM_ROCKET_BASE_B3F_FULL_HEAL
const EVENT_TEAM_ROCKET_BASE_B3F_ICE_HEAL
const EVENT_ILEX_FOREST_REVIVE
- const EVENT_WAREHOUSE_ENTRANCE_COIN_CASE
- const EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_SMOKE_BALL
- const EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_FULL_HEAL
+ const EVENT_GOLDENROD_UNDERGROUND_COIN_CASE
+ const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_SMOKE_BALL
+ const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_FULL_HEAL
const EVENT_GOLDENROD_DEPT_STORE_B1F_ETHER
const EVENT_GOLDENROD_DEPT_STORE_B1F_AMULET_COIN
const EVENT_GOLDENROD_DEPT_STORE_B1F_BURN_HEAL
const EVENT_GOLDENROD_DEPT_STORE_B1F_ULTRA_BALL
- const EVENT_UNDERGROUND_WAREHOUSE_MAX_ETHER
- const EVENT_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK
+ const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_MAX_ETHER
+ const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK
const EVENT_MOUNT_MORTAR_1F_OUTSIDE_ETHER
const EVENT_MOUNT_MORTAR_1F_OUTSIDE_REVIVE
const EVENT_MOUNT_MORTAR_1F_INSIDE_ESCAPE_ROPE
@@ -1797,7 +1800,7 @@
const EVENT_RIVAL_CHERRYGROVE_CITY
const EVENT_RIVAL_AZALEA_TOWN
const EVENT_RIVAL_TEAM_ROCKET_BASE
- const EVENT_RIVAL_UNDERGROUND_PATH
+ const EVENT_RIVAL_GOLDENROD_UNDERGROUND
const EVENT_RIVAL_VICTORY_ROAD
const EVENT_RIVAL_OLIVINE_CITY
const EVENT_RIVAL_SPROUT_TOWER
@@ -1833,10 +1836,10 @@
const EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_3
const EVENT_BLACKTHORN_CITY_SUPER_NERD_BLOCKS_GYM
const EVENT_BLACKTHORN_CITY_SUPER_NERD_DOES_NOT_BLOCK_GYM
- const EVENT_DAYCARE_MAN_IN_DAYCARE
- const EVENT_DAYCARE_MAN_ON_ROUTE_34
- const EVENT_DAYCARE_MON_1
- const EVENT_DAYCARE_MON_2
+ const EVENT_DAY_CARE_MAN_IN_DAY_CARE
+ const EVENT_DAY_CARE_MAN_ON_ROUTE_34
+ const EVENT_DAY_CARE_MON_1
+ const EVENT_DAY_CARE_MON_2
const EVENT_ILEX_FOREST_FARFETCHD
const EVENT_ROUTE_34_ILEX_FOREST_GATE_TEACHER_BEHIND_COUNTER
const EVENT_ROUTE_34_ILEX_FOREST_GATE_LASS
@@ -1942,10 +1945,10 @@
const EVENT_OPENED_MT_SILVER
const EVENT_FOUGHT_SNORLAX ; 750
const EVENT_LAKE_OF_RAGE_RED_GYARADOS
- const EVENT_WAREHOUSE_ENTRANCE_GRANNY
- const EVENT_WAREHOUSE_ENTRANCE_GRAMPS
- const EVENT_WAREHOUSE_ENTRANCE_OLDER_HAIRCUT_BROTHER
- const EVENT_WAREHOUSE_ENTRANCE_YOUNGER_HAIRCUT_BROTHER
+ const EVENT_GOLDENROD_UNDERGROUND_GRANNY
+ const EVENT_GOLDENROD_UNDERGROUND_GRAMPS
+ const EVENT_GOLDENROD_UNDERGROUND_OLDER_HAIRCUT_BROTHER
+ const EVENT_GOLDENROD_UNDERGROUND_YOUNGER_HAIRCUT_BROTHER
const EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST
const EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_GYM
const EVENT_ROUTE_32_FRIEDA_OF_FRIDAY
@@ -1986,6 +1989,7 @@
const EVENT_MT_MOON_RIVAL
const EVENT_INDIGO_PLATEAU_POKECENTER_RIVAL
const EVENT_TELEPORT_GUY
+; Kanto itemballs
const EVENT_PICKED_UP_FOCUS_BAND
const EVENT_ROCK_TUNNEL_1F_ELIXER
const EVENT_ROCK_TUNNEL_1F_TM_STEEL_WING
diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm
index 9478cd123..4c3b23fc9 100644
--- a/constants/gfx_constants.asm
+++ b/constants/gfx_constants.asm
@@ -1,4 +1,24 @@
-LEN_2BPP_TILE EQU 16
-LEN_1BPP_TILE EQU 8
-TILES_PER_FRAME EQU 6
-TILESIZE EQU $10
+LEN_1BPP_TILE EQU 8 ; bytes
+LEN_2BPP_TILE EQU 16 ; bytes
+
+TILE_WIDTH EQU 8 ; pixels
+
+NUM_PAL_COLORS EQU 4
+
+SCREEN_WIDTH EQU 20 ; tiles
+SCREEN_HEIGHT EQU 18 ; tiles
+SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels
+SCREEN_HEIGHT_PX EQU SCREEN_HEIGHT * TILE_WIDTH ; pixels
+
+BG_MAP_WIDTH EQU 32 ; tiles
+BG_MAP_HEIGHT EQU 32 ; tiles
+WMISC_WIDTH EQU 6 * 4
+WMISC_HEIGHT EQU 5 * 4
+
+HP_BAR_LENGTH EQU 6 ; tiles
+HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels
+EXP_BAR_LENGTH EQU 8 ; tiles
+EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * TILE_WIDTH ; pixels
+
+
+PALPACKET_LENGTH EQU $10
diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm
new file mode 100644
index 000000000..ae2e97a6b
--- /dev/null
+++ b/constants/hardware_constants.asm
@@ -0,0 +1,135 @@
+; Graciously aped from http://nocash.emubase.de/pandocs.htm .
+
+; MBC3
+MBC3SRamEnable EQU $0000
+MBC3RomBank EQU $2000
+MBC3SRamBank EQU $4000
+MBC3LatchClock EQU $6000
+MBC3RTC EQU $a000
+
+SRAM_DISABLE EQU $00
+SRAM_ENABLE EQU $0a
+
+NUM_SRAM_BANKS EQU 4
+
+RTC_S EQU $08 ; Seconds 0-59 (0-3Bh)
+RTC_M EQU $09 ; Minutes 0-59 (0-3Bh)
+RTC_H EQU $0a ; Hours 0-23 (0-17h)
+RTC_DL EQU $0b ; Lower 8 bits of Day Counter (0-FFh)
+RTC_DH EQU $0c ; Upper 1 bit of Day Counter, Carry Bit, Halt Flag
+ ; Bit 0 Most significant bit of Day Counter (Bit 8)
+ ; Bit 6 Halt (0=Active, 1=Stop Timer)
+ ; Bit 7 Day Counter Carry Bit (1=Counter Overflow)
+
+; interrupt flags
+VBLANK EQU 0
+LCD_STAT EQU 1
+TIMER EQU 2
+SERIAL EQU 3
+JOYPAD EQU 4
+
+; OAM attribute flags
+OAM_TILE_BANK EQU 3
+OAM_OBP_NUM EQU 4 ; non CGB Mode Only
+OAM_X_FLIP EQU 5
+OAM_Y_FLIP EQU 6
+OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3)
+
+PALETTE_MASK EQU %111
+VRAM_BANK_1 EQU 1 << OAM_TILE_BANK ; $08
+OBP_NUM EQU 1 << OAM_OBP_NUM ; $10
+X_FLIP EQU 1 << OAM_X_FLIP ; $20
+Y_FLIP EQU 1 << OAM_Y_FLIP ; $40
+BEHIND_BG EQU 1 << OAM_PRIORITY ; $80
+
+; Hardware registers
+rJOYP EQU $ff00 ; Joypad (R/W)
+rSB EQU $ff01 ; Serial transfer data (R/W)
+rSC EQU $ff02 ; Serial Transfer Control (R/W)
+rSC_ON EQU 7
+rSC_CGB EQU 1
+rSC_CLOCK EQU 0
+rDIV EQU $ff04 ; Divider Register (R/W)
+rTIMA EQU $ff05 ; Timer counter (R/W)
+rTMA EQU $ff06 ; Timer Modulo (R/W)
+rTAC EQU $ff07 ; Timer Control (R/W)
+rTAC_ON EQU 2
+rTAC_4096_HZ EQU 0
+rTAC_262144_HZ EQU 1
+rTAC_65536_HZ EQU 2
+rTAC_16384_HZ EQU 3
+rIF EQU $ff0f ; Interrupt Flag (R/W)
+rNR10 EQU $ff10 ; Channel 1 Sweep register (R/W)
+rNR11 EQU $ff11 ; Channel 1 Sound length/Wave pattern duty (R/W)
+rNR12 EQU $ff12 ; Channel 1 Volume Envelope (R/W)
+rNR13 EQU $ff13 ; Channel 1 Frequency lo (Write Only)
+rNR14 EQU $ff14 ; Channel 1 Frequency hi (R/W)
+rNR20 EQU $ff15 ; Channel 2 Sweep register (R/W)
+rNR21 EQU $ff16 ; Channel 2 Sound Length/Wave Pattern Duty (R/W)
+rNR22 EQU $ff17 ; Channel 2 Volume Envelope (R/W)
+rNR23 EQU $ff18 ; Channel 2 Frequency lo data (W)
+rNR24 EQU $ff19 ; Channel 2 Frequency hi data (R/W)
+rNR30 EQU $ff1a ; Channel 3 Sound on/off (R/W)
+rNR31 EQU $ff1b ; Channel 3 Sound Length
+rNR32 EQU $ff1c ; Channel 3 Select output level (R/W)
+rNR33 EQU $ff1d ; Channel 3 Frequency's lower data (W)
+rNR34 EQU $ff1e ; Channel 3 Frequency's higher data (R/W)
+rNR40 EQU $ff1f ; Channel 4 Sweep register (R/W)
+rNR41 EQU $ff20 ; Channel 4 Sound Length (R/W)
+rNR42 EQU $ff21 ; Channel 4 Volume Envelope (R/W)
+rNR43 EQU $ff22 ; Channel 4 Polynomial Counter (R/W)
+rNR44 EQU $ff23 ; Channel 4 Counter/consecutive; Inital (R/W)
+rNR50 EQU $ff24 ; Channel control / ON-OFF / Volume (R/W)
+rNR51 EQU $ff25 ; Selection of Sound output terminal (R/W)
+rNR52 EQU $ff26 ; Sound on/off
+rWave_0 EQU $ff30
+rWave_1 EQU $ff31
+rWave_2 EQU $ff32
+rWave_3 EQU $ff33
+rWave_4 EQU $ff34
+rWave_5 EQU $ff35
+rWave_6 EQU $ff36
+rWave_7 EQU $ff37
+rWave_8 EQU $ff38
+rWave_9 EQU $ff39
+rWave_a EQU $ff3a
+rWave_b EQU $ff3b
+rWave_c EQU $ff3c
+rWave_d EQU $ff3d
+rWave_e EQU $ff3e
+rWave_f EQU $ff3f
+rLCDC EQU $ff40 ; LCD Control (R/W)
+rSTAT EQU $ff41 ; LCDC Status (R/W)
+rSCY EQU $ff42 ; Scroll Y (R/W)
+rSCX EQU $ff43 ; Scroll X (R/W)
+rLY EQU $ff44 ; LCDC Y-Coordinate (R)
+rLYC EQU $ff45 ; LY Compare (R/W)
+rDMA EQU $ff46 ; DMA Transfer and Start Address (W)
+rBGP EQU $ff47 ; BG Palette Data (R/W) - Non CGB Mode Only
+rOBP0 EQU $ff48 ; Object Palette 0 Data (R/W) - Non CGB Mode Only
+rOBP1 EQU $ff49 ; Object Palette 1 Data (R/W) - Non CGB Mode Only
+rWY EQU $ff4a ; Window Y Position (R/W)
+rWX EQU $ff4b ; Window X Position minus 7 (R/W)
+rLCDMODE EQU $ff4c
+rKEY1 EQU $ff4d ; CGB Mode Only - Prepare Speed Switch
+rVBK EQU $ff4f ; CGB Mode Only - VRAM Bank
+rBLCK EQU $ff50
+rHDMA1 EQU $ff51 ; CGB Mode Only - New DMA Source, High
+rHDMA2 EQU $ff52 ; CGB Mode Only - New DMA Source, Low
+rHDMA3 EQU $ff53 ; CGB Mode Only - New DMA Destination, High
+rHDMA4 EQU $ff54 ; CGB Mode Only - New DMA Destination, Low
+rHDMA5 EQU $ff55 ; CGB Mode Only - New DMA Length/Mode/Start
+rRP EQU $ff56 ; CGB Mode Only - Infrared Communications Port
+rBGPI EQU $ff68 ; CGB Mode Only - Background Palette Index
+rBGPD EQU $ff69 ; CGB Mode Only - Background Palette Data
+rOBPI EQU $ff6a ; CGB Mode Only - Sprite Palette Index
+rOBPD EQU $ff6b ; CGB Mode Only - Sprite Palette Data
+rUNKNOWN1 EQU $ff6c ; (FEh) Bit 0 (Read/Write) - CGB Mode Only
+rSVBK EQU $ff70 ; CGB Mode Only - WRAM Bank
+rUNKNOWN2 EQU $ff72 ; (00h) - Bit 0-7 (Read/Write)
+rUNKNOWN3 EQU $ff73 ; (00h) - Bit 0-7 (Read/Write)
+rUNKNOWN4 EQU $ff74 ; (00h) - Bit 0-7 (Read/Write) - CGB Mode Only
+rUNKNOWN5 EQU $ff75 ; (8Fh) - Bit 4-6 (Read/Write)
+rUNKNOWN6 EQU $ff76 ; (00h) - Always 00h (Read Only)
+rUNKNOWN7 EQU $ff77 ; (00h) - Always 00h (Read Only)
+rIE EQU $ffff ; Interrupt Enable (R/W)
diff --git a/constants/input_constants.asm b/constants/input_constants.asm
new file mode 100644
index 000000000..3042c3f89
--- /dev/null
+++ b/constants/input_constants.asm
@@ -0,0 +1,26 @@
+; joypad buttons
+ const_def
+ const A_BUTTON_F ; 0
+ const B_BUTTON_F ; 1
+ const SELECT_F ; 2
+ const START_F ; 3
+ const D_RIGHT_F ; 4
+ const D_LEFT_F ; 5
+ const D_UP_F ; 6
+ const D_DOWN_F ; 7
+
+NO_INPUT EQU %00000000
+A_BUTTON EQU 1 << A_BUTTON_F
+B_BUTTON EQU 1 << B_BUTTON_F
+SELECT EQU 1 << SELECT_F
+START EQU 1 << START_F
+D_RIGHT EQU 1 << D_RIGHT_F
+D_LEFT EQU 1 << D_LEFT_F
+D_UP EQU 1 << D_UP_F
+D_DOWN EQU 1 << D_DOWN_F
+
+BUTTONS EQU A_BUTTON | B_BUTTON | SELECT | START
+D_PAD EQU D_RIGHT | D_LEFT | D_UP | D_DOWN
+
+R_DPAD EQU %00100000
+R_BUTTONS EQU %00010000
diff --git a/constants/item_constants.asm b/constants/item_constants.asm
index 76eaba5ca..5dc506604 100644
--- a/constants/item_constants.asm
+++ b/constants/item_constants.asm
@@ -1,3 +1,9 @@
+; item ids
+; indexes for:
+; - ItemAttributes (see data/items/item_attributes.asm)
+; - ItemDescriptions (see data/items/item_descriptions.asm)
+; - ItemEffects (see engine/item_effects.asm)
+; - ItemNames (see data/items/item_names.asm)
const_def
const NO_ITEM ; $00
const MASTER_BALL ; $01
@@ -191,6 +197,7 @@
const MIRAGE_MAIL ; $BD
const ITEM_BE ; $BE
+; see data/tmhm_moves.asm for moves
add_tm DYNAMICPUNCH ; $BF
add_tm HEADBUTT ; $C0
add_tm CURSE ; $C1
@@ -221,7 +228,7 @@
add_tm RETURN ; $DA
add_tm DIG ; $DB
const ITEM_DC ; $DC
- add_tm PSYCHIC ; $DD
+ add_tm PSYCHIC_M ; $DD
add_tm SHADOW_BALL ; $DE
add_tm MUD_SLAP ; $DF
add_tm DOUBLE_TEAM ; $E0
@@ -243,7 +250,7 @@
add_tm FIRE_PUNCH ; $F0
add_tm FURY_CUTTER ; $F1
add_tm NIGHTMARE ; $F2
-NUM_TMS = const_value - TM01 - 2
+NUM_TMS = const_value - TM01 - 2 ; discount ITEM_C3 and ITEM_DC
add_hm CUT ; $F3
add_hm FLY ; $F4
@@ -253,27 +260,37 @@ NUM_TMS = const_value - TM01 - 2
add_hm WHIRLPOOL ; $F8
add_hm WATERFALL ; $F9
NUM_HMS = const_value - HM01
- const HM_08 ; $FA
+ const ITEM_FA ; $FA
add_mt FLAMETHROWER
add_mt THUNDERBOLT
add_mt ICE_BEAM
+NUM_TM_HM_TUTOR = __enum__ +- 1
-ITEM_FROM_MEM EQU $ff
-
+ITEM_FROM_MEM EQU $FF
; leftovers from red
-SAFARI_BALL EQU 8 ; MOON_STONE
-MOON_STONE_RED EQU 10 ; BURN_HEAL
-FULL_HEAL_RED EQU 52 ; X_SPEED
-MAIL_MAX_LENGTH EQU $20
+SAFARI_BALL EQU $08 ; MOON_STONE
+MOON_STONE_RED EQU $0A ; BURN_HEAL
+FULL_HEAL_RED EQU $34 ; X_SPEED
+
+; mail
+MAIL_MSG_LENGTH EQU $20
+MAILBOX_CAPACITY EQU 10
+MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct
-; pockets
+; pack pockets
ITEM EQU 1
KEY_ITEM EQU 2
BALL EQU 3
TM_HM EQU 4
+; pack pocket sizes
+MAX_ITEMS EQU 20
+MAX_KEY_ITEMS EQU 25
+MAX_BALLS EQU 12
+MAX_PC_ITEMS EQU 50
+
; item actions
CANT_SELECT EQU 1 << 6
CANT_TOSS EQU 1 << 7
@@ -281,7 +298,6 @@ CANT_TOSS EQU 1 << 7
; held item effects
const_def
-
const HELD_NONE
const HELD_BERRY
const HELD_2
@@ -350,12 +366,13 @@ const_value SET 70
const HELD_ESCAPE
const HELD_CRITICAL_UP
const HELD_QUICK_CLAW
- const HELD_TRADE_EVOLVE
+ const HELD_FLINCH
const HELD_AMULET_COIN
const HELD_BRIGHTPOWDER
const HELD_78
const HELD_FOCUS_BAND
+; item_attribute struct members (see data/items/item_attributes.asm)
const_def
const ITEMATTR_PRICE
const ITEMATTR_PRICE_HI
@@ -364,13 +381,15 @@ const_value SET 70
const ITEMATTR_PERMISSIONS
const ITEMATTR_POCKET
const ITEMATTR_HELP
-NUM_ITEMATTRS EQU const_value
+ITEMATTR_STRUCT_LENGTH EQU const_value
-ITEMMENU_NOUSE EQU 0
-ITEMMENU_CURRENT EQU 4
-ITEMMENU_PARTY EQU 5
-ITEMMENU_CLOSE EQU 6
+; item menu types
+ITEMMENU_NOUSE EQU 0
+ITEMMENU_CURRENT EQU 4
+ITEMMENU_PARTY EQU 5
+ITEMMENU_CLOSE EQU 6
+; mart types (see engine/mart.asm)
const_def
const MARTTYPE_STANDARD
const MARTTYPE_BITTER
@@ -378,6 +397,7 @@ ITEMMENU_CLOSE EQU 6
const MARTTYPE_PHARMACY
const MARTTYPE_ROOFTOP
+; Marts indexes (see data/items/marts.asm)
const_def
const MART_CHERRYGROVE
const MART_CHERRYGROVE_DEX
@@ -414,7 +434,8 @@ ITEMMENU_CLOSE EQU 6
const MART_INDIGO_PLATEAU
const MART_UNDERGROUND
-; PartyMenuActionText
+; PartyMenuActionText values
+; GetPartyMenuTilemapPointers arguments (see engine/party_menu.asm)
const_def
const PARTYMENUACTION_CHOOSE_POKEMON
const PARTYMENUACTION_HEALING_ITEM
@@ -426,7 +447,7 @@ ITEMMENU_CLOSE EQU 6
const PARTYMENUACTION_GIVE_MON_FEMALE ; unused
const PARTYMENUACTION_GIVE_ITEM
const PARTYMENUACTION_MOBILE ; mobile
-
+; PrintPartyMenuActionText arguments (see engine/party_menu.asm)
const_value set $f0
const PARTYMENUTEXT_HEAL_PSN
const PARTYMENUTEXT_HEAL_BRN
diff --git a/constants/landmark_constants.asm b/constants/landmark_constants.asm
index 5aa14f972..4a15928f0 100644
--- a/constants/landmark_constants.asm
+++ b/constants/landmark_constants.asm
@@ -1,6 +1,7 @@
-
+; Landmarks indexes (see data/maps/landmarks.asm)
const_def
+; Johto landmarks
const SPECIAL_MAP ; 00
const NEW_BARK_TOWN ; 01
const ROUTE_29 ; 02
@@ -50,7 +51,6 @@
const SILVER_CAVE ; 2e
KANTO_LANDMARK EQU const_value
-
const PALLET_TOWN ; 2f
const ROUTE_1 ; 30
const VIRIDIAN_CITY ; 31
@@ -63,7 +63,7 @@ KANTO_LANDMARK EQU const_value
const ROUTE_24 ; 38
const ROUTE_25 ; 39
const ROUTE_5 ; 3a
- const UNDERGROUND ; 3b
+ const UNDERGROUND_PATH ; 3b
const ROUTE_6 ; 3c
const VERMILION_CITY ; 3d
const DIGLETTS_CAVE ; 3e
diff --git a/constants/map_constants.asm b/constants/map_constants.asm
index 1ed12662f..1af4215a1 100644
--- a/constants/map_constants.asm
+++ b/constants/map_constants.asm
@@ -1,497 +1,56 @@
GROUP_N_A EQU -1
MAP_N_A EQU -1
-
GROUP_NONE EQU 0
MAP_NONE EQU 0
-; map group ids
+; map header fields (see maps/map_headers.asm)
const_def
- newgroup ; 1
-
- mapgroup OLIVINE_POKECENTER_1F, 4, 5 ; 1
- mapgroup OLIVINE_GYM, 8, 5 ; 2
- mapgroup OLIVINE_TIMS_HOUSE, 4, 4 ; 3
- mapgroup OLIVINE_HOUSE_BETA, 4, 4 ; 4
- mapgroup OLIVINE_PUNISHMENT_SPEECH_HOUSE, 4, 4 ; 5
- mapgroup OLIVINE_GOOD_ROD_HOUSE, 4, 4 ; 6
- mapgroup OLIVINE_CAFE, 4, 4 ; 7
- mapgroup OLIVINE_MART, 4, 6 ; 8
- mapgroup ROUTE_38_ECRUTEAK_GATE, 4, 5 ; 9
- mapgroup ROUTE_39_BARN, 4, 4 ; 10
- mapgroup ROUTE_39_FARMHOUSE, 4, 4 ; 11
- mapgroup ROUTE_38, 9, 20 ; 12
- mapgroup ROUTE_39, 18, 10 ; 13
- mapgroup OLIVINE_CITY, 18, 20 ; 14
-
- newgroup ; 2
-
- mapgroup MAHOGANY_RED_GYARADOS_SPEECH_HOUSE, 4, 4 ; 1
- mapgroup MAHOGANY_GYM, 9, 5 ; 2
- mapgroup MAHOGANY_POKECENTER_1F, 4, 5 ; 3
- mapgroup ROUTE_42_ECRUTEAK_GATE, 4, 5 ; 4
- mapgroup ROUTE_42, 9, 30 ; 5
- mapgroup ROUTE_44, 9, 30 ; 6
- mapgroup MAHOGANY_TOWN, 9, 10 ; 7
-
- newgroup ; 3
-
- mapgroup SPROUT_TOWER_1F, 8, 10 ; 1
- mapgroup SPROUT_TOWER_2F, 8, 10 ; 2
- mapgroup SPROUT_TOWER_3F, 8, 10 ; 3
- mapgroup TIN_TOWER_1F, 9, 10 ; 4
- mapgroup TIN_TOWER_2F, 9, 10 ; 5
- mapgroup TIN_TOWER_3F, 9, 10 ; 6
- mapgroup TIN_TOWER_4F, 9, 10 ; 7
- mapgroup TIN_TOWER_5F, 9, 10 ; 8
- mapgroup TIN_TOWER_6F, 9, 10 ; 9
- mapgroup TIN_TOWER_7F, 9, 10 ; 10
- mapgroup TIN_TOWER_8F, 9, 10 ; 11
- mapgroup TIN_TOWER_9F, 9, 10 ; 12
- mapgroup BURNED_TOWER_1F, 9, 10 ; 13
- mapgroup BURNED_TOWER_B1F, 9, 10 ; 14
- mapgroup NATIONAL_PARK, 27, 20 ; 15
- mapgroup NATIONAL_PARK_BUG_CONTEST, 27, 20 ; 16
- mapgroup RADIO_TOWER_1F, 4, 9 ; 17
- mapgroup RADIO_TOWER_2F, 4, 9 ; 18
- mapgroup RADIO_TOWER_3F, 4, 9 ; 19
- mapgroup RADIO_TOWER_4F, 4, 9 ; 20
- mapgroup RADIO_TOWER_5F, 4, 9 ; 21
- mapgroup RUINS_OF_ALPH_OUTSIDE, 18, 10 ; 22
- mapgroup RUINS_OF_ALPH_HO_OH_CHAMBER, 5, 4 ; 23
- mapgroup RUINS_OF_ALPH_KABUTO_CHAMBER, 5, 4 ; 24
- mapgroup RUINS_OF_ALPH_OMANYTE_CHAMBER, 5, 4 ; 25
- mapgroup RUINS_OF_ALPH_AERODACTYL_CHAMBER, 5, 4 ; 26
- mapgroup RUINS_OF_ALPH_INNER_CHAMBER, 14, 10 ; 27
- mapgroup RUINS_OF_ALPH_RESEARCH_CENTER, 4, 4 ; 28
- mapgroup RUINS_OF_ALPH_HO_OH_ITEM_ROOM, 5, 4 ; 29
- mapgroup RUINS_OF_ALPH_KABUTO_ITEM_ROOM, 5, 4 ; 30
- mapgroup RUINS_OF_ALPH_OMANYTE_ITEM_ROOM, 5, 4 ; 31
- mapgroup RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM, 5, 4 ; 32
- mapgroup RUINS_OF_ALPH_HO_OH_WORD_ROOM, 12, 10 ; 33
- mapgroup RUINS_OF_ALPH_KABUTO_WORD_ROOM, 7, 10 ; 34
- mapgroup RUINS_OF_ALPH_OMANYTE_WORD_ROOM, 8, 10 ; 35
- mapgroup RUINS_OF_ALPH_AERODACTYL_WORD_ROOM, 7, 10 ; 36
- mapgroup UNION_CAVE_1F, 18, 10 ; 37
- mapgroup UNION_CAVE_B1F, 18, 10 ; 38
- mapgroup UNION_CAVE_B2F, 18, 10 ; 39
- mapgroup SLOWPOKE_WELL_B1F, 9, 10 ; 40
- mapgroup SLOWPOKE_WELL_B2F, 9, 10 ; 41
- mapgroup OLIVINE_LIGHTHOUSE_1F, 9, 10 ; 42
- mapgroup OLIVINE_LIGHTHOUSE_2F, 9, 10 ; 43
- mapgroup OLIVINE_LIGHTHOUSE_3F, 9, 10 ; 44
- mapgroup OLIVINE_LIGHTHOUSE_4F, 9, 10 ; 45
- mapgroup OLIVINE_LIGHTHOUSE_5F, 9, 10 ; 46
- mapgroup OLIVINE_LIGHTHOUSE_6F, 9, 10 ; 47
- mapgroup MAHOGANY_MART_1F, 4, 4 ; 48
- mapgroup TEAM_ROCKET_BASE_B1F, 9, 15 ; 49
- mapgroup TEAM_ROCKET_BASE_B2F, 9, 15 ; 50
- mapgroup TEAM_ROCKET_BASE_B3F, 9, 15 ; 51
- mapgroup ILEX_FOREST, 27, 15 ; 52
- mapgroup WAREHOUSE_ENTRANCE, 18, 15 ; 53
- mapgroup UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES, 18, 15 ; 54
- mapgroup GOLDENROD_DEPT_STORE_B1F, 9, 10 ; 55
- mapgroup UNDERGROUND_WAREHOUSE, 9, 10 ; 56
- mapgroup MOUNT_MORTAR_1F_OUTSIDE, 18, 20 ; 57
- mapgroup MOUNT_MORTAR_1F_INSIDE, 27, 20 ; 58
- mapgroup MOUNT_MORTAR_2F_INSIDE, 18, 20 ; 59
- mapgroup MOUNT_MORTAR_B1F, 18, 20 ; 60
- mapgroup ICE_PATH_1F, 18, 20 ; 61
- mapgroup ICE_PATH_B1F, 18, 10 ; 62
- mapgroup ICE_PATH_B2F_MAHOGANY_SIDE, 9, 10 ; 63
- mapgroup ICE_PATH_B2F_BLACKTHORN_SIDE, 9, 5 ; 64
- mapgroup ICE_PATH_B3F, 9, 10 ; 65
- mapgroup WHIRL_ISLAND_NW, 9, 5 ; 66
- mapgroup WHIRL_ISLAND_NE, 9, 10 ; 67
- mapgroup WHIRL_ISLAND_SW, 9, 10 ; 68
- mapgroup WHIRL_ISLAND_CAVE, 9, 5 ; 69
- mapgroup WHIRL_ISLAND_SE, 9, 5 ; 70
- mapgroup WHIRL_ISLAND_B1F, 18, 20 ; 71
- mapgroup WHIRL_ISLAND_B2F, 18, 10 ; 72
- mapgroup WHIRL_ISLAND_LUGIA_CHAMBER, 9, 10 ; 73
- mapgroup SILVER_CAVE_ROOM_1, 18, 10 ; 74
- mapgroup SILVER_CAVE_ROOM_2, 18, 15 ; 75
- mapgroup SILVER_CAVE_ROOM_3, 18, 10 ; 76
- mapgroup SILVER_CAVE_ITEM_ROOMS, 9, 10 ; 77
- mapgroup DARK_CAVE_VIOLET_ENTRANCE, 18, 20 ; 78
- mapgroup DARK_CAVE_BLACKTHORN_ENTRANCE, 18, 15 ; 79
- mapgroup DRAGONS_DEN_1F, 9, 5 ; 80
- mapgroup DRAGONS_DEN_B1F, 18, 20 ; 81
- mapgroup DRAGON_SHRINE, 5, 5 ; 82
- mapgroup TOHJO_FALLS, 9, 15 ; 83
- mapgroup DIGLETTS_CAVE, 18, 10 ; 84
- mapgroup MOUNT_MOON, 9, 15 ; 85
- mapgroup UNDERGROUND, 14, 3 ; 86
- mapgroup ROCK_TUNNEL_1F, 18, 15 ; 87
- mapgroup ROCK_TUNNEL_B1F, 18, 15 ; 88
- mapgroup SAFARI_ZONE_FUCHSIA_GATE_BETA, 4, 5 ; 89
- mapgroup SAFARI_ZONE_BETA, 18, 10 ; 90
- mapgroup VICTORY_ROAD, 36, 10 ; 91
-
- newgroup ; 4
-
- mapgroup ECRUTEAK_HOUSE, 9, 10 ; 1
- mapgroup WISE_TRIOS_ROOM, 4, 4 ; 2
- mapgroup ECRUTEAK_POKECENTER_1F, 4, 5 ; 3
- mapgroup ECRUTEAK_LUGIA_SPEECH_HOUSE, 4, 4 ; 4
- mapgroup DANCE_THEATRE, 7, 6 ; 5
- mapgroup ECRUTEAK_MART, 4, 6 ; 6
- mapgroup ECRUTEAK_GYM, 9, 5 ; 7
- mapgroup ECRUTEAK_ITEMFINDER_HOUSE, 4, 4 ; 8
- mapgroup ECRUTEAK_CITY, 18, 20 ; 9
-
- newgroup ; 5
-
- mapgroup BLACKTHORN_GYM_1F, 9, 5 ; 1
- mapgroup BLACKTHORN_GYM_2F, 9, 5 ; 2
- mapgroup BLACKTHORN_DRAGON_SPEECH_HOUSE, 4, 4 ; 3
- mapgroup BLACKTHORN_EMYS_HOUSE, 4, 4 ; 4
- mapgroup BLACKTHORN_MART, 4, 6 ; 5
- mapgroup BLACKTHORN_POKECENTER_1F, 4, 5 ; 6
- mapgroup MOVE_DELETERS_HOUSE, 4, 4 ; 7
- mapgroup ROUTE_45, 45, 10 ; 8
- mapgroup ROUTE_46, 18, 10 ; 9
- mapgroup BLACKTHORN_CITY, 18, 20 ; 10
-
- newgroup ; 6
-
- mapgroup CINNABAR_POKECENTER_1F, 4, 5 ; 1
- mapgroup CINNABAR_POKECENTER_2F_BETA, 4, 8 ; 2
- mapgroup ROUTE_19___FUCHSIA_GATE, 4, 5 ; 3
- mapgroup SEAFOAM_GYM, 4, 5 ; 4
- mapgroup ROUTE_19, 18, 10 ; 5
- mapgroup ROUTE_20, 9, 30 ; 6
- mapgroup ROUTE_21, 18, 10 ; 7
- mapgroup CINNABAR_ISLAND, 9, 10 ; 8
-
- newgroup ; 7
-
- mapgroup CERULEAN_GYM_BADGE_SPEECH_HOUSE, 4, 4 ; 1
- mapgroup CERULEAN_POLICE_STATION, 4, 4 ; 2
- mapgroup CERULEAN_TRADE_SPEECH_HOUSE, 4, 4 ; 3
- mapgroup CERULEAN_POKECENTER_1F, 4, 5 ; 4
- mapgroup CERULEAN_POKECENTER_2F_BETA, 4, 8 ; 5
- mapgroup CERULEAN_GYM, 8, 5 ; 6
- mapgroup CERULEAN_MART, 4, 6 ; 7
- mapgroup ROUTE_10_POKECENTER_1F, 4, 5 ; 8
- mapgroup ROUTE_10_POKECENTER_2F_BETA, 4, 8 ; 9
- mapgroup POWER_PLANT, 9, 10 ; 10
- mapgroup BILLS_HOUSE, 4, 4 ; 11
- mapgroup ROUTE_4, 9, 20 ; 12
- mapgroup ROUTE_9, 9, 30 ; 13
- mapgroup ROUTE_10_NORTH, 9, 10 ; 14
- mapgroup ROUTE_24, 9, 10 ; 15
- mapgroup ROUTE_25, 9, 30 ; 16
- mapgroup CERULEAN_CITY, 18, 20 ; 17
-
- newgroup ; 8
-
- mapgroup AZALEA_POKECENTER_1F, 4, 5 ; 1
- mapgroup CHARCOAL_KILN, 4, 4 ; 2
- mapgroup AZALEA_MART, 4, 6 ; 3
- mapgroup KURTS_HOUSE, 4, 8 ; 4
- mapgroup AZALEA_GYM, 8, 5 ; 5
- mapgroup ROUTE_33, 9, 10 ; 6
- mapgroup AZALEA_TOWN, 9, 20 ; 7
-
- newgroup ; 9
-
- mapgroup LAKE_OF_RAGE_HIDDEN_POWER_HOUSE, 4, 4 ; 1
- mapgroup LAKE_OF_RAGE_MAGIKARP_HOUSE, 4, 4 ; 2
- mapgroup ROUTE_43_MAHOGANY_GATE, 4, 5 ; 3
- mapgroup ROUTE_43_GATE, 4, 5 ; 4
- mapgroup ROUTE_43, 27, 10 ; 5
- mapgroup LAKE_OF_RAGE, 18, 20 ; 6
-
- newgroup ; 10
-
- mapgroup ROUTE_32, 45, 10 ; 1
- mapgroup ROUTE_35, 18, 10 ; 2
- mapgroup ROUTE_36, 9, 30 ; 3
- mapgroup ROUTE_37, 9, 10 ; 4
- mapgroup VIOLET_CITY, 18, 20 ; 5
- mapgroup VIOLET_MART, 4, 6 ; 6
- mapgroup VIOLET_GYM, 8, 5 ; 7
- mapgroup EARLS_POKEMON_ACADEMY, 8, 4 ; 8
- mapgroup VIOLET_NICKNAME_SPEECH_HOUSE, 4, 4 ; 9
- mapgroup VIOLET_POKECENTER_1F, 4, 5 ; 10
- mapgroup VIOLET_ONIX_TRADE_HOUSE, 4, 4 ; 11
- mapgroup ROUTE_32_RUINS_OF_ALPH_GATE, 4, 5 ; 12
- mapgroup ROUTE_32_POKECENTER_1F, 4, 5 ; 13
- mapgroup ROUTE_35_GOLDENROD_GATE, 4, 5 ; 14
- mapgroup ROUTE_35_NATIONAL_PARK_GATE, 4, 4 ; 15
- mapgroup ROUTE_36_RUINS_OF_ALPH_GATE, 4, 5 ; 16
- mapgroup ROUTE_36_NATIONAL_PARK_GATE, 4, 5 ; 17
-
- newgroup ; 11
-
- mapgroup ROUTE_34, 27, 10 ; 1
- mapgroup GOLDENROD_CITY, 18, 20 ; 2
- mapgroup GOLDENROD_GYM, 9, 10 ; 3
- mapgroup GOLDENROD_BIKE_SHOP, 4, 4 ; 4
- mapgroup GOLDENROD_HAPPINESS_RATER, 4, 4 ; 5
- mapgroup GOLDENROD_BILLS_HOUSE, 4, 4 ; 6
- mapgroup GOLDENROD_MAGNET_TRAIN_STATION, 9, 10 ; 7
- mapgroup GOLDENROD_FLOWER_SHOP, 4, 4 ; 8
- mapgroup GOLDENROD_PP_SPEECH_HOUSE, 4, 4 ; 9
- mapgroup GOLDENROD_NAME_RATER, 4, 4 ; 10
- mapgroup GOLDENROD_DEPT_STORE_1F, 4, 8 ; 11
- mapgroup GOLDENROD_DEPT_STORE_2F, 4, 8 ; 12
- mapgroup GOLDENROD_DEPT_STORE_3F, 4, 8 ; 13
- mapgroup GOLDENROD_DEPT_STORE_4F, 4, 8 ; 14
- mapgroup GOLDENROD_DEPT_STORE_5F, 4, 8 ; 15
- mapgroup GOLDENROD_DEPT_STORE_6F, 4, 8 ; 16
- mapgroup GOLDENROD_DEPT_STORE_ELEVATOR, 2, 2 ; 17
- mapgroup GOLDENROD_DEPT_STORE_ROOF, 4, 8 ; 18
- mapgroup GOLDENROD_GAME_CORNER, 7, 10 ; 19
- mapgroup GOLDENROD_POKECENTER_1F, 4, 5 ; 20
- mapgroup GOLDENROD_POKECOM_CENTER_2F_MOBILE, 16, 16 ; 21
- mapgroup ILEX_FOREST_AZALEA_GATE, 4, 5 ; 22
- mapgroup ROUTE_34_ILEX_FOREST_GATE, 4, 5 ; 23
- mapgroup DAYCARE, 4, 5 ; 24
-
- newgroup ; 12
-
- mapgroup ROUTE_6, 9, 10 ; 1
- mapgroup ROUTE_11, 9, 20 ; 2
- mapgroup VERMILION_CITY, 18, 20 ; 3
- mapgroup VERMILION_HOUSE_FISHING_SPEECH_HOUSE, 4, 4 ; 4
- mapgroup VERMILION_POKECENTER_1F, 4, 5 ; 5
- mapgroup VERMILION_POKECENTER_2F_BETA, 4, 8 ; 6
- mapgroup POKEMON_FAN_CLUB, 4, 5 ; 7
- mapgroup VERMILION_MAGNET_TRAIN_SPEECH_HOUSE, 4, 4 ; 8
- mapgroup VERMILION_MART, 4, 6 ; 9
- mapgroup VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE, 4, 4 ; 10
- mapgroup VERMILION_GYM, 9, 5 ; 11
- mapgroup ROUTE_6_SAFFRON_GATE, 4, 5 ; 12
- mapgroup ROUTE_6_UNDERGROUND_ENTRANCE, 4, 4 ; 13
-
- newgroup ; 13
-
- mapgroup ROUTE_1, 18, 10 ; 1
- mapgroup PALLET_TOWN, 9, 10 ; 2
- mapgroup REDS_HOUSE_1F, 4, 4 ; 3
- mapgroup REDS_HOUSE_2F, 4, 4 ; 4
- mapgroup BLUES_HOUSE, 4, 4 ; 5
- mapgroup OAKS_LAB, 6, 5 ; 6
-
- newgroup ; 14
-
- mapgroup ROUTE_3, 9, 30 ; 1
- mapgroup PEWTER_CITY, 18, 20 ; 2
- mapgroup PEWTER_NIDORAN_SPEECH_HOUSE, 4, 4 ; 3
- mapgroup PEWTER_GYM, 7, 5 ; 4
- mapgroup PEWTER_MART, 4, 6 ; 5
- mapgroup PEWTER_POKECENTER_1F, 4, 5 ; 6
- mapgroup PEWTER_POKECENTER_2F_BETA, 4, 8 ; 7
- mapgroup PEWTER_SNOOZE_SPEECH_HOUSE, 4, 4 ; 8
-
- newgroup ; 15
-
- mapgroup OLIVINE_PORT, 18, 10 ; 1
- mapgroup VERMILION_PORT, 18, 10 ; 2
- mapgroup FAST_SHIP_1F, 9, 16 ; 3
- mapgroup FAST_SHIP_CABINS_NNW_NNE_NE, 16, 4 ; 4
- mapgroup FAST_SHIP_CABINS_SW_SSW_NW, 16, 4 ; 5
- mapgroup FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN, 17, 5 ; 6
- mapgroup FAST_SHIP_B1F, 8, 16 ; 7
- mapgroup OLIVINE_PORT_PASSAGE, 9, 10 ; 8
- mapgroup VERMILION_PORT_PASSAGE, 9, 10 ; 9
- mapgroup MOUNT_MOON_SQUARE, 9, 15 ; 10
- mapgroup MOUNT_MOON_GIFT_SHOP, 4, 4 ; 11
- mapgroup TIN_TOWER_ROOF, 9, 10 ; 12
-
- newgroup ; 16
-
- mapgroup ROUTE_23, 9, 10 ; 1
- mapgroup INDIGO_PLATEAU_POKECENTER_1F, 7, 9 ; 2
- mapgroup WILLS_ROOM, 9, 5 ; 3
- mapgroup KOGAS_ROOM, 9, 5 ; 4
- mapgroup BRUNOS_ROOM, 9, 5 ; 5
- mapgroup KARENS_ROOM, 9, 5 ; 6
- mapgroup LANCES_ROOM, 12, 5 ; 7
- mapgroup HALL_OF_FAME, 7, 5 ; 8
-
- newgroup ; 17
-
- mapgroup ROUTE_13, 9, 30 ; 1
- mapgroup ROUTE_14, 18, 10 ; 2
- mapgroup ROUTE_15, 9, 20 ; 3
- mapgroup ROUTE_18, 9, 10 ; 4
- mapgroup FUCHSIA_CITY, 18, 20 ; 5
- mapgroup FUCHSIA_MART, 4, 6 ; 6
- mapgroup SAFARI_ZONE_MAIN_OFFICE, 4, 4 ; 7
- mapgroup FUCHSIA_GYM, 9, 5 ; 8
- mapgroup FUCHSIA_BILL_SPEECH_HOUSE, 4, 4 ; 9
- mapgroup FUCHSIA_POKECENTER_1F, 4, 5 ; 10
- mapgroup FUCHSIA_POKECENTER_2F_BETA, 4, 8 ; 11
- mapgroup SAFARI_ZONE_WARDENS_HOME, 4, 5 ; 12
- mapgroup ROUTE_15_FUCHSIA_GATE, 4, 5 ; 13
-
- newgroup ; 18
-
- mapgroup ROUTE_8, 9, 20 ; 1
- mapgroup ROUTE_12, 27, 10 ; 2
- mapgroup ROUTE_10_SOUTH, 9, 10 ; 3
- mapgroup LAVENDER_TOWN, 9, 10 ; 4
- mapgroup LAVENDER_POKECENTER_1F, 4, 5 ; 5
- mapgroup LAVENDER_POKECENTER_2F_BETA, 4, 8 ; 6
- mapgroup MR_FUJIS_HOUSE, 4, 5 ; 7
- mapgroup LAVENDER_TOWN_SPEECH_HOUSE, 4, 4 ; 8
- mapgroup LAVENDER_NAME_RATER, 4, 4 ; 9
- mapgroup LAVENDER_MART, 4, 6 ; 10
- mapgroup SOUL_HOUSE, 4, 5 ; 11
- mapgroup LAV_RADIO_TOWER_1F, 4, 10 ; 12
- mapgroup ROUTE_8_SAFFRON_GATE, 4, 5 ; 13
- mapgroup ROUTE_12_SUPER_ROD_HOUSE, 4, 4 ; 14
-
- newgroup ; 19
-
- mapgroup ROUTE_28, 9, 20 ; 1
- mapgroup SILVER_CAVE_OUTSIDE, 18, 20 ; 2
- mapgroup SILVER_CAVE_POKECENTER_1F, 4, 5 ; 3
- mapgroup ROUTE_28_FAMOUS_SPEECH_HOUSE, 4, 4 ; 4
-
- newgroup ; 20
-
- mapgroup POKECENTER_2F, 4, 8 ; 1
- mapgroup TRADE_CENTER, 4, 5 ; 2
- mapgroup COLOSSEUM, 4, 5 ; 3
- mapgroup TIME_CAPSULE, 4, 5 ; 4
- mapgroup MOBILE_TRADE_ROOM_MOBILE, 4, 5 ; 5
- mapgroup MOBILE_BATTLE_ROOM, 4, 5 ; 6
-
- newgroup ; 21
-
- mapgroup ROUTE_7, 9, 10 ; 1
- mapgroup ROUTE_16, 9, 10 ; 2
- mapgroup ROUTE_17, 45, 10 ; 3
- mapgroup CELADON_CITY, 18, 20 ; 4
- mapgroup CELADON_DEPT_STORE_1F, 4, 8 ; 5
- mapgroup CELADON_DEPT_STORE_2F, 4, 8 ; 6
- mapgroup CELADON_DEPT_STORE_3F, 4, 8 ; 7
- mapgroup CELADON_DEPT_STORE_4F, 4, 8 ; 8
- mapgroup CELADON_DEPT_STORE_5F, 4, 8 ; 9
- mapgroup CELADON_DEPT_STORE_6F, 4, 8 ; 10
- mapgroup CELADON_DEPT_STORE_ELEVATOR, 2, 2 ; 11
- mapgroup CELADON_MANSION_1F, 5, 4 ; 12
- mapgroup CELADON_MANSION_2F, 5, 4 ; 13
- mapgroup CELADON_MANSION_3F, 5, 4 ; 14
- mapgroup CELADON_MANSION_ROOF, 5, 4 ; 15
- mapgroup CELADON_MANSION_ROOF_HOUSE, 4, 4 ; 16
- mapgroup CELADON_POKECENTER_1F, 4, 5 ; 17
- mapgroup CELADON_POKECENTER_2F_BETA, 4, 8 ; 18
- mapgroup CELADON_GAME_CORNER, 7, 10 ; 19
- mapgroup CELADON_GAME_CORNER_PRIZE_ROOM, 3, 3 ; 20
- mapgroup CELADON_GYM, 9, 5 ; 21
- mapgroup CELADON_CAFE, 4, 6 ; 22
- mapgroup ROUTE_16_FUCHSIA_SPEECH_HOUSE, 4, 4 ; 23
- mapgroup ROUTE_16_GATE, 4, 5 ; 24
- mapgroup ROUTE_7_SAFFRON_GATE, 4, 5 ; 25
- mapgroup ROUTE_17_18_GATE, 4, 5 ; 26
-
- newgroup ; 22
-
- mapgroup ROUTE_40, 18, 10 ; 1
- mapgroup ROUTE_41, 27, 25 ; 2
- mapgroup CIANWOOD_CITY, 27, 15 ; 3
- mapgroup MANIAS_HOUSE, 4, 4 ; 4
- mapgroup CIANWOOD_GYM, 9, 5 ; 5
- mapgroup CIANWOOD_POKECENTER_1F, 4, 5 ; 6
- mapgroup CIANWOOD_PHARMACY, 4, 4 ; 7
- mapgroup CIANWOOD_CITY_PHOTO_STUDIO, 4, 4 ; 8
- mapgroup CIANWOOD_LUGIA_SPEECH_HOUSE, 4, 4 ; 9
- mapgroup POKE_SEERS_HOUSE, 4, 4 ; 10
- mapgroup BATTLE_TOWER_1F, 5, 8 ; 11
- mapgroup BATTLE_TOWER_BATTLE_ROOM, 4, 4 ; 12
- mapgroup BATTLE_TOWER_ELEVATOR, 2, 2 ; 13
- mapgroup BATTLE_TOWER_HALLWAY, 2, 11 ; 14
- mapgroup ROUTE_40_BATTLE_TOWER_GATE, 4, 5 ; 15
- mapgroup BATTLE_TOWER_OUTSIDE, 14, 10 ; 16
-
- newgroup ; 23
-
- mapgroup ROUTE_2, 27, 10 ; 1
- mapgroup ROUTE_22, 9, 20 ; 2
- mapgroup VIRIDIAN_CITY, 18, 20 ; 3
- mapgroup VIRIDIAN_GYM, 9, 5 ; 4
- mapgroup VIRIDIAN_NICKNAME_SPEECH_HOUSE, 4, 4 ; 5
- mapgroup TRAINER_HOUSE_1F, 7, 5 ; 6
- mapgroup TRAINER_HOUSE_B1F, 8, 5 ; 7
- mapgroup VIRIDIAN_MART, 4, 6 ; 8
- mapgroup VIRIDIAN_POKECENTER_1F, 4, 5 ; 9
- mapgroup VIRIDIAN_POKECENTER_2F_BETA, 4, 8 ; 10
- mapgroup ROUTE_2_NUGGET_SPEECH_HOUSE, 4, 4 ; 11
- mapgroup ROUTE_2_GATE, 4, 5 ; 12
- mapgroup VICTORY_ROAD_GATE, 9, 10 ; 13
-
- newgroup ; 24
-
- mapgroup ROUTE_26, 54, 10 ; 1
- mapgroup ROUTE_27, 9, 40 ; 2
- mapgroup ROUTE_29, 9, 30 ; 3
- mapgroup NEW_BARK_TOWN, 9, 10 ; 4
- mapgroup ELMS_LAB, 6, 5 ; 5
- mapgroup KRISS_HOUSE_1F, 4, 5 ; 6
- mapgroup KRISS_HOUSE_2F, 3, 4 ; 7
- mapgroup KRISS_NEIGHBORS_HOUSE, 4, 4 ; 8
- mapgroup ELMS_HOUSE, 4, 4 ; 9
- mapgroup ROUTE_26_HEAL_SPEECH_HOUSE, 4, 4 ; 10
- mapgroup ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE, 4, 4 ; 11
- mapgroup ROUTE_27_SANDSTORM_HOUSE, 4, 4 ; 12
- mapgroup ROUTE_29_46_GATE, 4, 5 ; 13
-
- newgroup ; 25
-
- mapgroup ROUTE_5, 9, 10 ; 1
- mapgroup SAFFRON_CITY, 18, 20 ; 2
- mapgroup FIGHTING_DOJO, 6, 5 ; 3
- mapgroup SAFFRON_GYM, 9, 10 ; 4
- mapgroup SAFFRON_MART, 4, 6 ; 5
- mapgroup SAFFRON_POKECENTER_1F, 4, 5 ; 6
- mapgroup SAFFRON_POKECENTER_2F_BETA, 4, 8 ; 7
- mapgroup MR_PSYCHICS_HOUSE, 4, 4 ; 8
- mapgroup SAFFRON_TRAIN_STATION, 9, 10 ; 9
- mapgroup SILPH_CO_1F, 4, 8 ; 10
- mapgroup COPYCATS_HOUSE_1F, 4, 4 ; 11
- mapgroup COPYCATS_HOUSE_2F, 3, 5 ; 12
- mapgroup ROUTE_5_UNDERGROUND_ENTRANCE, 4, 4 ; 13
- mapgroup ROUTE_5_SAFFRON_CITY_GATE, 4, 5 ; 14
- mapgroup ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE, 4, 4 ; 15
-
- newgroup ; 26
-
- mapgroup ROUTE_30, 27, 10 ; 1
- mapgroup ROUTE_31, 9, 20 ; 2
- mapgroup CHERRYGROVE_CITY, 9, 20 ; 3
- mapgroup CHERRYGROVE_MART, 4, 6 ; 4
- mapgroup CHERRYGROVE_POKECENTER_1F, 4, 5 ; 5
- mapgroup CHERRYGROVE_GYM_SPEECH_HOUSE, 4, 4 ; 6
- mapgroup GUIDE_GENTS_HOUSE, 4, 4 ; 7
- mapgroup CHERRYGROVE_EVOLUTION_SPEECH_HOUSE, 4, 4 ; 8
- mapgroup ROUTE_30_BERRY_SPEECH_HOUSE, 4, 4 ; 9
- mapgroup MR_POKEMONS_HOUSE, 4, 4 ; 10
- mapgroup ROUTE_31_VIOLET_GATE, 4, 5 ; 11
-
+ const MAPHEADER_MAPHEADER2_BANK ; 0
+ const MAPHEADER_TILESET ; 1
+ const MAPHEADER_ENVIRONMENT ; 2
+ const MAPHEADER_MAPHEADER2 ; 3
+ const MAPHEADER_MAPHEADER2_HI ; 4
+ const MAPHEADER_LOCATION ; 5
+ const MAPHEADER_MUSIC ; 6
+ const MAPHEADER_PALETTE ; 7
+ const MAPHEADER_FISHGROUP ; 8
+NUM_MAPHEADER_ATTRIBUTES EQU const_value
+
+; map environments (wEnvironment)
+const_value SET 1
+ const TOWN
+ const ROUTE
+ const INDOOR
+ const CAVE
+ const ENVIRONMENT_5
+ const GATE
+ const DUNGEON
-; elevator floors
+; map palettes (wEnvironment)
+ const_def
+ const PALETTE_AUTO
+ const PALETTE_DAY
+ const PALETTE_NITE
+ const PALETTE_MORN
+ const PALETTE_DARK
+; fish groups
const_def
- const _B4F
- const _B3F
- const _B2F
- const _B1F
- const _1F
- const _2F
- const _3F
- const _4F
- const _5F
- const _6F
- const _7F
- const _8F
- const _9F
- const _10F
- const _11F
- const _ROOF
+ const FISHGROUP_NONE
+ const FISHGROUP_SHORE
+ const FISHGROUP_OCEAN
+ const FISHGROUP_LAKE
+ const FISHGROUP_POND
+ const FISHGROUP_DRATINI
+ const FISHGROUP_QWILFISH_SWARM
+ const FISHGROUP_REMORAID_SWARM
+ const FISHGROUP_GYARADOS
+ const FISHGROUP_DRATINI_2
+ const FISHGROUP_WHIRL_ISLANDS
+ const FISHGROUP_QWILFISH
+ const FISHGROUP_REMORAID
+ const FISHGROUP_QWILFISH_NO_SWARM
+
; connection directions
const_def
@@ -500,23 +59,15 @@ MAP_NONE EQU 0
const SOUTH_F
const NORTH_F
+; MapConnections
const_def
shift_const EAST
shift_const WEST
shift_const SOUTH
shift_const NORTH
-; permissions
-const_value SET 1
- const TOWN
- const ROUTE
- const INDOOR
- const CAVE
- const PERM_5
- const GATE
- const DUNGEON
-; object struct
+; object_struct members (see macros/wram.asm)
const_def
const OBJECT_SPRITE ; 00
const OBJECT_MAP_OBJECT_INDEX ; 01
@@ -553,7 +104,7 @@ const_value SET 1
const OBJECT_RANGE ; 20
; 33-39 are not used
-; map object struct
+; map_object struct members (see macros/wram.asm)
const_def
const MAPOBJECT_OBJECT_STRUCT_ID ; 0
const MAPOBJECT_SPRITE ; 1
@@ -576,46 +127,25 @@ OBJECT_LENGTH EQU const_value
MAPOBJECT_SCREEN_HEIGHT EQU 11
MAPOBJECT_SCREEN_WIDTH EQU 12
+; object_struct OBJECT_FACING values
OW_DOWN EQU DOWN << 2
OW_UP EQU UP << 2
OW_LEFT EQU LEFT << 2
OW_RIGHT EQU RIGHT << 2
- const_def
- const EMOTE_SHOCK ; 0
- const EMOTE_QUESTION ; 1
- const EMOTE_HAPPY ; 2
- const EMOTE_SAD ; 3
- const EMOTE_HEART ; 4
- const EMOTE_BOLT ; 5
- const EMOTE_SLEEP ; 6
- const EMOTE_FISH ; 7
- const EMOTE_SHADOW ; 8
- const EMOTE_ROD ; 9
- const EMOTE_BOULDER_DUST ; 10
- const EMOTE_0B ; 11
-EMOTE_MEM EQU -1
-
- const_def
- const SIGNPOST_READ
- const SIGNPOST_UP
- const SIGNPOST_DOWN
- const SIGNPOST_RIGHT
- const SIGNPOST_LEFT
- const SIGNPOST_IFSET
- const SIGNPOST_IFNOTSET
- const SIGNPOST_ITEM
- const SIGNPOST_COPY
-
-; I'm relocating spawn constants here, so that they can be used anywhere in the disassembly.
+; object_struct OBJECT_FLAGS1 bit flags
+INVISIBLE EQU 0
+FIXED_FACING EQU 2
+SLIDING EQU 3
+EMOTE_OBJECT EQU 7
+; SpawnPoints indexes (see data/maps/spawn_points.asm)
const_value = -1
const SPAWN_N_A
-
const SPAWN_HOME
const SPAWN_DEBUG
-
+; kanto
const SPAWN_PALLET
const SPAWN_VIRIDIAN
const SPAWN_PEWTER
@@ -628,7 +158,7 @@ const_value = -1
const SPAWN_FUCHSIA
const SPAWN_CINNABAR
const SPAWN_INDIGO
-
+; johto
const SPAWN_NEW_BARK
const SPAWN_CHERRYGROVE
const SPAWN_VIOLET
@@ -645,28 +175,48 @@ const_value = -1
const SPAWN_FAST_SHIP
NUM_SPAWNS EQU const_value
+
+; TryBGEvent arguments (see engine/events.asm)
const_def
- const PALETTE_AUTO
- const PALETTE_DAY
- const PALETTE_NITE
- const PALETTE_MORN
- const PALETTE_DARK
+ const BGEVENT_READ
+ const BGEVENT_UP
+ const BGEVENT_DOWN
+ const BGEVENT_RIGHT
+ const BGEVENT_LEFT
+ const BGEVENT_IFSET
+ const BGEVENT_IFNOTSET
+ const BGEVENT_ITEM
+ const BGEVENT_COPY
+
+; object_event types
+; TryObjectEvent arguments (see engine/events.asm)
+ const_def
+ const OBJECTTYPE_SCRIPT
+ const OBJECTTYPE_ITEMBALL
+ const OBJECTTYPE_TRAINER
+ const OBJECTTYPE_3
+ const OBJECTTYPE_4
+ const OBJECTTYPE_5
+ const OBJECTTYPE_6
-INVISIBLE EQU 0
-FIXED_FACING EQU 2
-SLIDING EQU 3
-EMOTE_OBJECT EQU 7
+; EmotesPointers indexes (see engine/overworld.asm)
const_def
- const PERSONTYPE_SCRIPT
- const PERSONTYPE_ITEMBALL
- const PERSONTYPE_TRAINER
- const PERSONTYPE_3
- const PERSONTYPE_4
- const PERSONTYPE_5
- const PERSONTYPE_6
+ const EMOTE_SHOCK ; 0
+ const EMOTE_QUESTION ; 1
+ const EMOTE_HAPPY ; 2
+ const EMOTE_SAD ; 3
+ const EMOTE_HEART ; 4
+ const EMOTE_BOLT ; 5
+ const EMOTE_SLEEP ; 6
+ const EMOTE_FISH ; 7
+ const EMOTE_SHADOW ; 8
+ const EMOTE_ROD ; 9
+ const EMOTE_BOULDER_DUST ; 10
+ const EMOTE_GRASS_RUSTLE ; 11
+EMOTE_MEM EQU -1
-; fruit trees
+; FruitTreeItems indexes (see data/items/fruit_trees.asm)
const_value SET 1
const FRUITTREE_ROUTE_29 ; 01
const FRUITTREE_ROUTE_30_1 ; 02
@@ -700,6 +250,27 @@ const_value SET 1
const FRUITTREE_FUCHSIA_CITY ; 1e
NUM_FRUIT_TREES EQU const_value +- 1
+; elevator floors
+; used by `elevfloor`
+ const_def
+ const FLOOR_B4F
+ const FLOOR_B3F
+ const FLOOR_B2F
+ const FLOOR_B1F
+ const FLOOR_1F
+ const FLOOR_2F
+ const FLOOR_3F
+ const FLOOR_4F
+ const FLOOR_5F
+ const FLOOR_6F
+ const FLOOR_7F
+ const FLOOR_8F
+ const FLOOR_9F
+ const FLOOR_10F
+ const FLOOR_11F
+ const FLOOR_ROOF
+
+; command queue members
CMDQUEUE_TYPE EQU 0
CMDQUEUE_ADDR EQU 1
CMDQUEUE_03 EQU 3
@@ -708,4 +279,9 @@ CMDQUEUE_05 EQU 5
CMDQUEUE_ENTRY_SIZE EQU 6
CMDQUEUE_CAPACITY EQU 4
+; command queue types
CMDQUEUE_STONETABLE EQU 2
+
+; see engine/overworld.asm
+MAX_OUTDOOR_SPRITES EQU 23
+SPRITE_GFX_LIST_CAPACITY EQU $20
diff --git a/constants/map_dimension_constants.asm b/constants/map_dimension_constants.asm
new file mode 100644
index 000000000..be12cca02
--- /dev/null
+++ b/constants/map_dimension_constants.asm
@@ -0,0 +1,488 @@
+newgroup: macro
+const_value = const_value + 1
+ enum_start 1
+endm
+
+mapgroup: macro
+;\1: map id
+;\2: height: in blocks
+;\3: width: in blocks
+GROUP_\1 EQU const_value
+ enum MAP_\1
+\1_HEIGHT EQU \2
+\1_WIDTH EQU \3
+endm
+
+; map group ids
+; `newgroup` indexes are for:
+; - MapGroupPointers (see maps/map_headers.asm)
+; - OutdoorSprites (see data/maps/outdoor_sprites.asm)
+; - MapGroupRoofs (see data/maps/mapgroup_roofs.asm)
+; `mapgroup` indexes are for the sub-tables of MapGroupPointers (see maps/map_headers.asm)
+ const_def
+
+ newgroup ; 1
+
+ mapgroup OLIVINE_POKECENTER_1F, 4, 5 ; 1
+ mapgroup OLIVINE_GYM, 8, 5 ; 2
+ mapgroup OLIVINE_TIMS_HOUSE, 4, 4 ; 3
+ mapgroup OLIVINE_HOUSE_BETA, 4, 4 ; 4
+ mapgroup OLIVINE_PUNISHMENT_SPEECH_HOUSE, 4, 4 ; 5
+ mapgroup OLIVINE_GOOD_ROD_HOUSE, 4, 4 ; 6
+ mapgroup OLIVINE_CAFE, 4, 4 ; 7
+ mapgroup OLIVINE_MART, 4, 6 ; 8
+ mapgroup ROUTE_38_ECRUTEAK_GATE, 4, 5 ; 9
+ mapgroup ROUTE_39_BARN, 4, 4 ; 10
+ mapgroup ROUTE_39_FARMHOUSE, 4, 4 ; 11
+ mapgroup ROUTE_38, 9, 20 ; 12
+ mapgroup ROUTE_39, 18, 10 ; 13
+ mapgroup OLIVINE_CITY, 18, 20 ; 14
+
+ newgroup ; 2
+
+ mapgroup MAHOGANY_RED_GYARADOS_SPEECH_HOUSE, 4, 4 ; 1
+ mapgroup MAHOGANY_GYM, 9, 5 ; 2
+ mapgroup MAHOGANY_POKECENTER_1F, 4, 5 ; 3
+ mapgroup ROUTE_42_ECRUTEAK_GATE, 4, 5 ; 4
+ mapgroup ROUTE_42, 9, 30 ; 5
+ mapgroup ROUTE_44, 9, 30 ; 6
+ mapgroup MAHOGANY_TOWN, 9, 10 ; 7
+
+ newgroup ; 3
+
+ mapgroup SPROUT_TOWER_1F, 8, 10 ; 1
+ mapgroup SPROUT_TOWER_2F, 8, 10 ; 2
+ mapgroup SPROUT_TOWER_3F, 8, 10 ; 3
+ mapgroup TIN_TOWER_1F, 9, 10 ; 4
+ mapgroup TIN_TOWER_2F, 9, 10 ; 5
+ mapgroup TIN_TOWER_3F, 9, 10 ; 6
+ mapgroup TIN_TOWER_4F, 9, 10 ; 7
+ mapgroup TIN_TOWER_5F, 9, 10 ; 8
+ mapgroup TIN_TOWER_6F, 9, 10 ; 9
+ mapgroup TIN_TOWER_7F, 9, 10 ; 10
+ mapgroup TIN_TOWER_8F, 9, 10 ; 11
+ mapgroup TIN_TOWER_9F, 9, 10 ; 12
+ mapgroup BURNED_TOWER_1F, 9, 10 ; 13
+ mapgroup BURNED_TOWER_B1F, 9, 10 ; 14
+ mapgroup NATIONAL_PARK, 27, 20 ; 15
+ mapgroup NATIONAL_PARK_BUG_CONTEST, 27, 20 ; 16
+ mapgroup RADIO_TOWER_1F, 4, 9 ; 17
+ mapgroup RADIO_TOWER_2F, 4, 9 ; 18
+ mapgroup RADIO_TOWER_3F, 4, 9 ; 19
+ mapgroup RADIO_TOWER_4F, 4, 9 ; 20
+ mapgroup RADIO_TOWER_5F, 4, 9 ; 21
+ mapgroup RUINS_OF_ALPH_OUTSIDE, 18, 10 ; 22
+ mapgroup RUINS_OF_ALPH_HO_OH_CHAMBER, 5, 4 ; 23
+ mapgroup RUINS_OF_ALPH_KABUTO_CHAMBER, 5, 4 ; 24
+ mapgroup RUINS_OF_ALPH_OMANYTE_CHAMBER, 5, 4 ; 25
+ mapgroup RUINS_OF_ALPH_AERODACTYL_CHAMBER, 5, 4 ; 26
+ mapgroup RUINS_OF_ALPH_INNER_CHAMBER, 14, 10 ; 27
+ mapgroup RUINS_OF_ALPH_RESEARCH_CENTER, 4, 4 ; 28
+ mapgroup RUINS_OF_ALPH_HO_OH_ITEM_ROOM, 5, 4 ; 29
+ mapgroup RUINS_OF_ALPH_KABUTO_ITEM_ROOM, 5, 4 ; 30
+ mapgroup RUINS_OF_ALPH_OMANYTE_ITEM_ROOM, 5, 4 ; 31
+ mapgroup RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM, 5, 4 ; 32
+ mapgroup RUINS_OF_ALPH_HO_OH_WORD_ROOM, 12, 10 ; 33
+ mapgroup RUINS_OF_ALPH_KABUTO_WORD_ROOM, 7, 10 ; 34
+ mapgroup RUINS_OF_ALPH_OMANYTE_WORD_ROOM, 8, 10 ; 35
+ mapgroup RUINS_OF_ALPH_AERODACTYL_WORD_ROOM, 7, 10 ; 36
+ mapgroup UNION_CAVE_1F, 18, 10 ; 37
+ mapgroup UNION_CAVE_B1F, 18, 10 ; 38
+ mapgroup UNION_CAVE_B2F, 18, 10 ; 39
+ mapgroup SLOWPOKE_WELL_B1F, 9, 10 ; 40
+ mapgroup SLOWPOKE_WELL_B2F, 9, 10 ; 41
+ mapgroup OLIVINE_LIGHTHOUSE_1F, 9, 10 ; 42
+ mapgroup OLIVINE_LIGHTHOUSE_2F, 9, 10 ; 43
+ mapgroup OLIVINE_LIGHTHOUSE_3F, 9, 10 ; 44
+ mapgroup OLIVINE_LIGHTHOUSE_4F, 9, 10 ; 45
+ mapgroup OLIVINE_LIGHTHOUSE_5F, 9, 10 ; 46
+ mapgroup OLIVINE_LIGHTHOUSE_6F, 9, 10 ; 47
+ mapgroup MAHOGANY_MART_1F, 4, 4 ; 48
+ mapgroup TEAM_ROCKET_BASE_B1F, 9, 15 ; 49
+ mapgroup TEAM_ROCKET_BASE_B2F, 9, 15 ; 50
+ mapgroup TEAM_ROCKET_BASE_B3F, 9, 15 ; 51
+ mapgroup ILEX_FOREST, 27, 15 ; 52
+ mapgroup GOLDENROD_UNDERGROUND, 18, 15 ; 53
+ mapgroup GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, 18, 15 ; 54
+ mapgroup GOLDENROD_DEPT_STORE_B1F, 9, 10 ; 55
+ mapgroup GOLDENROD_UNDERGROUND_WAREHOUSE, 9, 10 ; 56
+ mapgroup MOUNT_MORTAR_1F_OUTSIDE, 18, 20 ; 57
+ mapgroup MOUNT_MORTAR_1F_INSIDE, 27, 20 ; 58
+ mapgroup MOUNT_MORTAR_2F_INSIDE, 18, 20 ; 59
+ mapgroup MOUNT_MORTAR_B1F, 18, 20 ; 60
+ mapgroup ICE_PATH_1F, 18, 20 ; 61
+ mapgroup ICE_PATH_B1F, 18, 10 ; 62
+ mapgroup ICE_PATH_B2F_MAHOGANY_SIDE, 9, 10 ; 63
+ mapgroup ICE_PATH_B2F_BLACKTHORN_SIDE, 9, 5 ; 64
+ mapgroup ICE_PATH_B3F, 9, 10 ; 65
+ mapgroup WHIRL_ISLAND_NW, 9, 5 ; 66
+ mapgroup WHIRL_ISLAND_NE, 9, 10 ; 67
+ mapgroup WHIRL_ISLAND_SW, 9, 10 ; 68
+ mapgroup WHIRL_ISLAND_CAVE, 9, 5 ; 69
+ mapgroup WHIRL_ISLAND_SE, 9, 5 ; 70
+ mapgroup WHIRL_ISLAND_B1F, 18, 20 ; 71
+ mapgroup WHIRL_ISLAND_B2F, 18, 10 ; 72
+ mapgroup WHIRL_ISLAND_LUGIA_CHAMBER, 9, 10 ; 73
+ mapgroup SILVER_CAVE_ROOM_1, 18, 10 ; 74
+ mapgroup SILVER_CAVE_ROOM_2, 18, 15 ; 75
+ mapgroup SILVER_CAVE_ROOM_3, 18, 10 ; 76
+ mapgroup SILVER_CAVE_ITEM_ROOMS, 9, 10 ; 77
+ mapgroup DARK_CAVE_VIOLET_ENTRANCE, 18, 20 ; 78
+ mapgroup DARK_CAVE_BLACKTHORN_ENTRANCE, 18, 15 ; 79
+ mapgroup DRAGONS_DEN_1F, 9, 5 ; 80
+ mapgroup DRAGONS_DEN_B1F, 18, 20 ; 81
+ mapgroup DRAGON_SHRINE, 5, 5 ; 82
+ mapgroup TOHJO_FALLS, 9, 15 ; 83
+ mapgroup DIGLETTS_CAVE, 18, 10 ; 84
+ mapgroup MOUNT_MOON, 9, 15 ; 85
+ mapgroup UNDERGROUND_PATH, 14, 3 ; 86
+ mapgroup ROCK_TUNNEL_1F, 18, 15 ; 87
+ mapgroup ROCK_TUNNEL_B1F, 18, 15 ; 88
+ mapgroup SAFARI_ZONE_FUCHSIA_GATE_BETA, 4, 5 ; 89
+ mapgroup SAFARI_ZONE_BETA, 18, 10 ; 90
+ mapgroup VICTORY_ROAD, 36, 10 ; 91
+
+ newgroup ; 4
+
+ mapgroup ECRUTEAK_HOUSE, 9, 10 ; 1
+ mapgroup WISE_TRIOS_ROOM, 4, 4 ; 2
+ mapgroup ECRUTEAK_POKECENTER_1F, 4, 5 ; 3
+ mapgroup ECRUTEAK_LUGIA_SPEECH_HOUSE, 4, 4 ; 4
+ mapgroup DANCE_THEATRE, 7, 6 ; 5
+ mapgroup ECRUTEAK_MART, 4, 6 ; 6
+ mapgroup ECRUTEAK_GYM, 9, 5 ; 7
+ mapgroup ECRUTEAK_ITEMFINDER_HOUSE, 4, 4 ; 8
+ mapgroup ECRUTEAK_CITY, 18, 20 ; 9
+
+ newgroup ; 5
+
+ mapgroup BLACKTHORN_GYM_1F, 9, 5 ; 1
+ mapgroup BLACKTHORN_GYM_2F, 9, 5 ; 2
+ mapgroup BLACKTHORN_DRAGON_SPEECH_HOUSE, 4, 4 ; 3
+ mapgroup BLACKTHORN_EMYS_HOUSE, 4, 4 ; 4
+ mapgroup BLACKTHORN_MART, 4, 6 ; 5
+ mapgroup BLACKTHORN_POKECENTER_1F, 4, 5 ; 6
+ mapgroup MOVE_DELETERS_HOUSE, 4, 4 ; 7
+ mapgroup ROUTE_45, 45, 10 ; 8
+ mapgroup ROUTE_46, 18, 10 ; 9
+ mapgroup BLACKTHORN_CITY, 18, 20 ; 10
+
+ newgroup ; 6
+
+ mapgroup CINNABAR_POKECENTER_1F, 4, 5 ; 1
+ mapgroup CINNABAR_POKECENTER_2F_BETA, 4, 8 ; 2
+ mapgroup ROUTE_19___FUCHSIA_GATE, 4, 5 ; 3
+ mapgroup SEAFOAM_GYM, 4, 5 ; 4
+ mapgroup ROUTE_19, 18, 10 ; 5
+ mapgroup ROUTE_20, 9, 30 ; 6
+ mapgroup ROUTE_21, 18, 10 ; 7
+ mapgroup CINNABAR_ISLAND, 9, 10 ; 8
+
+ newgroup ; 7
+
+ mapgroup CERULEAN_GYM_BADGE_SPEECH_HOUSE, 4, 4 ; 1
+ mapgroup CERULEAN_POLICE_STATION, 4, 4 ; 2
+ mapgroup CERULEAN_TRADE_SPEECH_HOUSE, 4, 4 ; 3
+ mapgroup CERULEAN_POKECENTER_1F, 4, 5 ; 4
+ mapgroup CERULEAN_POKECENTER_2F_BETA, 4, 8 ; 5
+ mapgroup CERULEAN_GYM, 8, 5 ; 6
+ mapgroup CERULEAN_MART, 4, 6 ; 7
+ mapgroup ROUTE_10_POKECENTER_1F, 4, 5 ; 8
+ mapgroup ROUTE_10_POKECENTER_2F_BETA, 4, 8 ; 9
+ mapgroup POWER_PLANT, 9, 10 ; 10
+ mapgroup BILLS_HOUSE, 4, 4 ; 11
+ mapgroup ROUTE_4, 9, 20 ; 12
+ mapgroup ROUTE_9, 9, 30 ; 13
+ mapgroup ROUTE_10_NORTH, 9, 10 ; 14
+ mapgroup ROUTE_24, 9, 10 ; 15
+ mapgroup ROUTE_25, 9, 30 ; 16
+ mapgroup CERULEAN_CITY, 18, 20 ; 17
+
+ newgroup ; 8
+
+ mapgroup AZALEA_POKECENTER_1F, 4, 5 ; 1
+ mapgroup CHARCOAL_KILN, 4, 4 ; 2
+ mapgroup AZALEA_MART, 4, 6 ; 3
+ mapgroup KURTS_HOUSE, 4, 8 ; 4
+ mapgroup AZALEA_GYM, 8, 5 ; 5
+ mapgroup ROUTE_33, 9, 10 ; 6
+ mapgroup AZALEA_TOWN, 9, 20 ; 7
+
+ newgroup ; 9
+
+ mapgroup LAKE_OF_RAGE_HIDDEN_POWER_HOUSE, 4, 4 ; 1
+ mapgroup LAKE_OF_RAGE_MAGIKARP_HOUSE, 4, 4 ; 2
+ mapgroup ROUTE_43_MAHOGANY_GATE, 4, 5 ; 3
+ mapgroup ROUTE_43_GATE, 4, 5 ; 4
+ mapgroup ROUTE_43, 27, 10 ; 5
+ mapgroup LAKE_OF_RAGE, 18, 20 ; 6
+
+ newgroup ; 10
+
+ mapgroup ROUTE_32, 45, 10 ; 1
+ mapgroup ROUTE_35, 18, 10 ; 2
+ mapgroup ROUTE_36, 9, 30 ; 3
+ mapgroup ROUTE_37, 9, 10 ; 4
+ mapgroup VIOLET_CITY, 18, 20 ; 5
+ mapgroup VIOLET_MART, 4, 6 ; 6
+ mapgroup VIOLET_GYM, 8, 5 ; 7
+ mapgroup EARLS_POKEMON_ACADEMY, 8, 4 ; 8
+ mapgroup VIOLET_NICKNAME_SPEECH_HOUSE, 4, 4 ; 9
+ mapgroup VIOLET_POKECENTER_1F, 4, 5 ; 10
+ mapgroup VIOLET_KYLES_HOUSE, 4, 4 ; 11
+ mapgroup ROUTE_32_RUINS_OF_ALPH_GATE, 4, 5 ; 12
+ mapgroup ROUTE_32_POKECENTER_1F, 4, 5 ; 13
+ mapgroup ROUTE_35_GOLDENROD_GATE, 4, 5 ; 14
+ mapgroup ROUTE_35_NATIONAL_PARK_GATE, 4, 4 ; 15
+ mapgroup ROUTE_36_RUINS_OF_ALPH_GATE, 4, 5 ; 16
+ mapgroup ROUTE_36_NATIONAL_PARK_GATE, 4, 5 ; 17
+
+ newgroup ; 11
+
+ mapgroup ROUTE_34, 27, 10 ; 1
+ mapgroup GOLDENROD_CITY, 18, 20 ; 2
+ mapgroup GOLDENROD_GYM, 9, 10 ; 3
+ mapgroup GOLDENROD_BIKE_SHOP, 4, 4 ; 4
+ mapgroup GOLDENROD_HAPPINESS_RATER, 4, 4 ; 5
+ mapgroup GOLDENROD_BILLS_HOUSE, 4, 4 ; 6
+ mapgroup GOLDENROD_MAGNET_TRAIN_STATION, 9, 10 ; 7
+ mapgroup GOLDENROD_FLOWER_SHOP, 4, 4 ; 8
+ mapgroup GOLDENROD_PP_SPEECH_HOUSE, 4, 4 ; 9
+ mapgroup GOLDENROD_NAME_RATER, 4, 4 ; 10
+ mapgroup GOLDENROD_DEPT_STORE_1F, 4, 8 ; 11
+ mapgroup GOLDENROD_DEPT_STORE_2F, 4, 8 ; 12
+ mapgroup GOLDENROD_DEPT_STORE_3F, 4, 8 ; 13
+ mapgroup GOLDENROD_DEPT_STORE_4F, 4, 8 ; 14
+ mapgroup GOLDENROD_DEPT_STORE_5F, 4, 8 ; 15
+ mapgroup GOLDENROD_DEPT_STORE_6F, 4, 8 ; 16
+ mapgroup GOLDENROD_DEPT_STORE_ELEVATOR, 2, 2 ; 17
+ mapgroup GOLDENROD_DEPT_STORE_ROOF, 4, 8 ; 18
+ mapgroup GOLDENROD_GAME_CORNER, 7, 10 ; 19
+ mapgroup GOLDENROD_POKECENTER_1F, 4, 5 ; 20
+ mapgroup GOLDENROD_POKECOM_CENTER_2F_MOBILE, 16, 16 ; 21
+ mapgroup ILEX_FOREST_AZALEA_GATE, 4, 5 ; 22
+ mapgroup ROUTE_34_ILEX_FOREST_GATE, 4, 5 ; 23
+ mapgroup DAY_CARE, 4, 5 ; 24
+
+ newgroup ; 12
+
+ mapgroup ROUTE_6, 9, 10 ; 1
+ mapgroup ROUTE_11, 9, 20 ; 2
+ mapgroup VERMILION_CITY, 18, 20 ; 3
+ mapgroup VERMILION_HOUSE_FISHING_SPEECH_HOUSE, 4, 4 ; 4
+ mapgroup VERMILION_POKECENTER_1F, 4, 5 ; 5
+ mapgroup VERMILION_POKECENTER_2F_BETA, 4, 8 ; 6
+ mapgroup POKEMON_FAN_CLUB, 4, 5 ; 7
+ mapgroup VERMILION_MAGNET_TRAIN_SPEECH_HOUSE, 4, 4 ; 8
+ mapgroup VERMILION_MART, 4, 6 ; 9
+ mapgroup VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE, 4, 4 ; 10
+ mapgroup VERMILION_GYM, 9, 5 ; 11
+ mapgroup ROUTE_6_SAFFRON_GATE, 4, 5 ; 12
+ mapgroup ROUTE_6_UNDERGROUND_PATH_ENTRANCE, 4, 4 ; 13
+
+ newgroup ; 13
+
+ mapgroup ROUTE_1, 18, 10 ; 1
+ mapgroup PALLET_TOWN, 9, 10 ; 2
+ mapgroup REDS_HOUSE_1F, 4, 4 ; 3
+ mapgroup REDS_HOUSE_2F, 4, 4 ; 4
+ mapgroup BLUES_HOUSE, 4, 4 ; 5
+ mapgroup OAKS_LAB, 6, 5 ; 6
+
+ newgroup ; 14
+
+ mapgroup ROUTE_3, 9, 30 ; 1
+ mapgroup PEWTER_CITY, 18, 20 ; 2
+ mapgroup PEWTER_NIDORAN_SPEECH_HOUSE, 4, 4 ; 3
+ mapgroup PEWTER_GYM, 7, 5 ; 4
+ mapgroup PEWTER_MART, 4, 6 ; 5
+ mapgroup PEWTER_POKECENTER_1F, 4, 5 ; 6
+ mapgroup PEWTER_POKECENTER_2F_BETA, 4, 8 ; 7
+ mapgroup PEWTER_SNOOZE_SPEECH_HOUSE, 4, 4 ; 8
+
+ newgroup ; 15
+
+ mapgroup OLIVINE_PORT, 18, 10 ; 1
+ mapgroup VERMILION_PORT, 18, 10 ; 2
+ mapgroup FAST_SHIP_1F, 9, 16 ; 3
+ mapgroup FAST_SHIP_CABINS_NNW_NNE_NE, 16, 4 ; 4
+ mapgroup FAST_SHIP_CABINS_SW_SSW_NW, 16, 4 ; 5
+ mapgroup FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN, 17, 5 ; 6
+ mapgroup FAST_SHIP_B1F, 8, 16 ; 7
+ mapgroup OLIVINE_PORT_PASSAGE, 9, 10 ; 8
+ mapgroup VERMILION_PORT_PASSAGE, 9, 10 ; 9
+ mapgroup MOUNT_MOON_SQUARE, 9, 15 ; 10
+ mapgroup MOUNT_MOON_GIFT_SHOP, 4, 4 ; 11
+ mapgroup TIN_TOWER_ROOF, 9, 10 ; 12
+
+ newgroup ; 16
+
+ mapgroup ROUTE_23, 9, 10 ; 1
+ mapgroup INDIGO_PLATEAU_POKECENTER_1F, 7, 9 ; 2
+ mapgroup WILLS_ROOM, 9, 5 ; 3
+ mapgroup KOGAS_ROOM, 9, 5 ; 4
+ mapgroup BRUNOS_ROOM, 9, 5 ; 5
+ mapgroup KARENS_ROOM, 9, 5 ; 6
+ mapgroup LANCES_ROOM, 12, 5 ; 7
+ mapgroup HALL_OF_FAME, 7, 5 ; 8
+
+ newgroup ; 17
+
+ mapgroup ROUTE_13, 9, 30 ; 1
+ mapgroup ROUTE_14, 18, 10 ; 2
+ mapgroup ROUTE_15, 9, 20 ; 3
+ mapgroup ROUTE_18, 9, 10 ; 4
+ mapgroup FUCHSIA_CITY, 18, 20 ; 5
+ mapgroup FUCHSIA_MART, 4, 6 ; 6
+ mapgroup SAFARI_ZONE_MAIN_OFFICE, 4, 4 ; 7
+ mapgroup FUCHSIA_GYM, 9, 5 ; 8
+ mapgroup FUCHSIA_BILL_SPEECH_HOUSE, 4, 4 ; 9
+ mapgroup FUCHSIA_POKECENTER_1F, 4, 5 ; 10
+ mapgroup FUCHSIA_POKECENTER_2F_BETA, 4, 8 ; 11
+ mapgroup SAFARI_ZONE_WARDENS_HOME, 4, 5 ; 12
+ mapgroup ROUTE_15_FUCHSIA_GATE, 4, 5 ; 13
+
+ newgroup ; 18
+
+ mapgroup ROUTE_8, 9, 20 ; 1
+ mapgroup ROUTE_12, 27, 10 ; 2
+ mapgroup ROUTE_10_SOUTH, 9, 10 ; 3
+ mapgroup LAVENDER_TOWN, 9, 10 ; 4
+ mapgroup LAVENDER_POKECENTER_1F, 4, 5 ; 5
+ mapgroup LAVENDER_POKECENTER_2F_BETA, 4, 8 ; 6
+ mapgroup MR_FUJIS_HOUSE, 4, 5 ; 7
+ mapgroup LAVENDER_TOWN_SPEECH_HOUSE, 4, 4 ; 8
+ mapgroup LAVENDER_NAME_RATER, 4, 4 ; 9
+ mapgroup LAVENDER_MART, 4, 6 ; 10
+ mapgroup SOUL_HOUSE, 4, 5 ; 11
+ mapgroup LAV_RADIO_TOWER_1F, 4, 10 ; 12
+ mapgroup ROUTE_8_SAFFRON_GATE, 4, 5 ; 13
+ mapgroup ROUTE_12_SUPER_ROD_HOUSE, 4, 4 ; 14
+
+ newgroup ; 19
+
+ mapgroup ROUTE_28, 9, 20 ; 1
+ mapgroup SILVER_CAVE_OUTSIDE, 18, 20 ; 2
+ mapgroup SILVER_CAVE_POKECENTER_1F, 4, 5 ; 3
+ mapgroup ROUTE_28_FAMOUS_SPEECH_HOUSE, 4, 4 ; 4
+
+ newgroup ; 20
+
+ mapgroup POKECENTER_2F, 4, 8 ; 1
+ mapgroup TRADE_CENTER, 4, 5 ; 2
+ mapgroup COLOSSEUM, 4, 5 ; 3
+ mapgroup TIME_CAPSULE, 4, 5 ; 4
+ mapgroup MOBILE_TRADE_ROOM_MOBILE, 4, 5 ; 5
+ mapgroup MOBILE_BATTLE_ROOM, 4, 5 ; 6
+
+ newgroup ; 21
+
+ mapgroup ROUTE_7, 9, 10 ; 1
+ mapgroup ROUTE_16, 9, 10 ; 2
+ mapgroup ROUTE_17, 45, 10 ; 3
+ mapgroup CELADON_CITY, 18, 20 ; 4
+ mapgroup CELADON_DEPT_STORE_1F, 4, 8 ; 5
+ mapgroup CELADON_DEPT_STORE_2F, 4, 8 ; 6
+ mapgroup CELADON_DEPT_STORE_3F, 4, 8 ; 7
+ mapgroup CELADON_DEPT_STORE_4F, 4, 8 ; 8
+ mapgroup CELADON_DEPT_STORE_5F, 4, 8 ; 9
+ mapgroup CELADON_DEPT_STORE_6F, 4, 8 ; 10
+ mapgroup CELADON_DEPT_STORE_ELEVATOR, 2, 2 ; 11
+ mapgroup CELADON_MANSION_1F, 5, 4 ; 12
+ mapgroup CELADON_MANSION_2F, 5, 4 ; 13
+ mapgroup CELADON_MANSION_3F, 5, 4 ; 14
+ mapgroup CELADON_MANSION_ROOF, 5, 4 ; 15
+ mapgroup CELADON_MANSION_ROOF_HOUSE, 4, 4 ; 16
+ mapgroup CELADON_POKECENTER_1F, 4, 5 ; 17
+ mapgroup CELADON_POKECENTER_2F_BETA, 4, 8 ; 18
+ mapgroup CELADON_GAME_CORNER, 7, 10 ; 19
+ mapgroup CELADON_GAME_CORNER_PRIZE_ROOM, 3, 3 ; 20
+ mapgroup CELADON_GYM, 9, 5 ; 21
+ mapgroup CELADON_CAFE, 4, 6 ; 22
+ mapgroup ROUTE_16_FUCHSIA_SPEECH_HOUSE, 4, 4 ; 23
+ mapgroup ROUTE_16_GATE, 4, 5 ; 24
+ mapgroup ROUTE_7_SAFFRON_GATE, 4, 5 ; 25
+ mapgroup ROUTE_17_18_GATE, 4, 5 ; 26
+
+ newgroup ; 22
+
+ mapgroup ROUTE_40, 18, 10 ; 1
+ mapgroup ROUTE_41, 27, 25 ; 2
+ mapgroup CIANWOOD_CITY, 27, 15 ; 3
+ mapgroup MANIAS_HOUSE, 4, 4 ; 4
+ mapgroup CIANWOOD_GYM, 9, 5 ; 5
+ mapgroup CIANWOOD_POKECENTER_1F, 4, 5 ; 6
+ mapgroup CIANWOOD_PHARMACY, 4, 4 ; 7
+ mapgroup CIANWOOD_CITY_PHOTO_STUDIO, 4, 4 ; 8
+ mapgroup CIANWOOD_LUGIA_SPEECH_HOUSE, 4, 4 ; 9
+ mapgroup POKE_SEERS_HOUSE, 4, 4 ; 10
+ mapgroup BATTLE_TOWER_1F, 5, 8 ; 11
+ mapgroup BATTLE_TOWER_BATTLE_ROOM, 4, 4 ; 12
+ mapgroup BATTLE_TOWER_ELEVATOR, 2, 2 ; 13
+ mapgroup BATTLE_TOWER_HALLWAY, 2, 11 ; 14
+ mapgroup ROUTE_40_BATTLE_TOWER_GATE, 4, 5 ; 15
+ mapgroup BATTLE_TOWER_OUTSIDE, 14, 10 ; 16
+
+ newgroup ; 23
+
+ mapgroup ROUTE_2, 27, 10 ; 1
+ mapgroup ROUTE_22, 9, 20 ; 2
+ mapgroup VIRIDIAN_CITY, 18, 20 ; 3
+ mapgroup VIRIDIAN_GYM, 9, 5 ; 4
+ mapgroup VIRIDIAN_NICKNAME_SPEECH_HOUSE, 4, 4 ; 5
+ mapgroup TRAINER_HOUSE_1F, 7, 5 ; 6
+ mapgroup TRAINER_HOUSE_B1F, 8, 5 ; 7
+ mapgroup VIRIDIAN_MART, 4, 6 ; 8
+ mapgroup VIRIDIAN_POKECENTER_1F, 4, 5 ; 9
+ mapgroup VIRIDIAN_POKECENTER_2F_BETA, 4, 8 ; 10
+ mapgroup ROUTE_2_NUGGET_SPEECH_HOUSE, 4, 4 ; 11
+ mapgroup ROUTE_2_GATE, 4, 5 ; 12
+ mapgroup VICTORY_ROAD_GATE, 9, 10 ; 13
+
+ newgroup ; 24
+
+ mapgroup ROUTE_26, 54, 10 ; 1
+ mapgroup ROUTE_27, 9, 40 ; 2
+ mapgroup ROUTE_29, 9, 30 ; 3
+ mapgroup NEW_BARK_TOWN, 9, 10 ; 4
+ mapgroup ELMS_LAB, 6, 5 ; 5
+ mapgroup KRISS_HOUSE_1F, 4, 5 ; 6
+ mapgroup KRISS_HOUSE_2F, 3, 4 ; 7
+ mapgroup KRISS_NEIGHBORS_HOUSE, 4, 4 ; 8
+ mapgroup ELMS_HOUSE, 4, 4 ; 9
+ mapgroup ROUTE_26_HEAL_SPEECH_HOUSE, 4, 4 ; 10
+ mapgroup ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE, 4, 4 ; 11
+ mapgroup ROUTE_27_SANDSTORM_HOUSE, 4, 4 ; 12
+ mapgroup ROUTE_29_46_GATE, 4, 5 ; 13
+
+ newgroup ; 25
+
+ mapgroup ROUTE_5, 9, 10 ; 1
+ mapgroup SAFFRON_CITY, 18, 20 ; 2
+ mapgroup FIGHTING_DOJO, 6, 5 ; 3
+ mapgroup SAFFRON_GYM, 9, 10 ; 4
+ mapgroup SAFFRON_MART, 4, 6 ; 5
+ mapgroup SAFFRON_POKECENTER_1F, 4, 5 ; 6
+ mapgroup SAFFRON_POKECENTER_2F_BETA, 4, 8 ; 7
+ mapgroup MR_PSYCHICS_HOUSE, 4, 4 ; 8
+ mapgroup SAFFRON_TRAIN_STATION, 9, 10 ; 9
+ mapgroup SILPH_CO_1F, 4, 8 ; 10
+ mapgroup COPYCATS_HOUSE_1F, 4, 4 ; 11
+ mapgroup COPYCATS_HOUSE_2F, 3, 5 ; 12
+ mapgroup ROUTE_5_UNDERGROUND_PATH_ENTRANCE, 4, 4 ; 13
+ mapgroup ROUTE_5_SAFFRON_CITY_GATE, 4, 5 ; 14
+ mapgroup ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE, 4, 4 ; 15
+
+ newgroup ; 26
+
+ mapgroup ROUTE_30, 27, 10 ; 1
+ mapgroup ROUTE_31, 9, 20 ; 2
+ mapgroup CHERRYGROVE_CITY, 9, 20 ; 3
+ mapgroup CHERRYGROVE_MART, 4, 6 ; 4
+ mapgroup CHERRYGROVE_POKECENTER_1F, 4, 5 ; 5
+ mapgroup CHERRYGROVE_GYM_SPEECH_HOUSE, 4, 4 ; 6
+ mapgroup GUIDE_GENTS_HOUSE, 4, 4 ; 7
+ mapgroup CHERRYGROVE_EVOLUTION_SPEECH_HOUSE, 4, 4 ; 8
+ mapgroup ROUTE_30_BERRY_SPEECH_HOUSE, 4, 4 ; 9
+ mapgroup MR_POKEMONS_HOUSE, 4, 4 ; 10
+ mapgroup ROUTE_31_VIOLET_GATE, 4, 5 ; 11
diff --git a/constants/map_setup_constants.asm b/constants/map_setup_constants.asm
index 1a3f60e7b..0dcc2b941 100644
--- a/constants/map_setup_constants.asm
+++ b/constants/map_setup_constants.asm
@@ -1,3 +1,5 @@
+; hMapEntryMethod values
+; MapSetupScripts indexes (see engine/map_setup.asm)
const_value SET $f1
const MAPSETUP_WARP
const MAPSETUP_CONTINUE
@@ -12,6 +14,7 @@ const_value SET $f1
const MAPSETUP_BADWARP
const MAPSETUP_FLY
+; callback types
const_value SET 1
const MAPCALLBACK_TILES
const MAPCALLBACK_OBJECTS
@@ -19,9 +22,10 @@ const_value SET 1
const MAPCALLBACK_SPRITES
const MAPCALLBACK_NEWMAP
-; Command descriptions from Condensation water's scripting compendium.
+; MapSetupCommands indexes (see engine/map_setup.asm)
+; Names taken from Condensation water's scripting compendium
+; https://hax.iimarck.us/files/scriptingcodes_eng.htm
const_def
-
const map_lcd_on ; 00
const map_lcd_off ; 01
const map_sound_off ; 02
diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm
index 77b65a38a..64c625933 100644
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -1,21 +1,33 @@
-PARTY_LENGTH EQU 6
+; Boolean checks
+FALSE EQU 0
+TRUE EQU 1
+
+; genders
+MALE EQU 0
+FEMALE EQU 1
-MAX_ITEMS EQU 20
-MAX_BALLS EQU 12
-MAX_KEY_ITEMS EQU 25
-MAX_PC_ITEMS EQU 50
+; FlagAction arguments (see home/flag.asm)
+RESET_FLAG EQU 0
+SET_FLAG EQU 1
+CHECK_FLAG EQU 2
-; strings
+; GetHPPal return values (see home.asm)
+HP_GREEN EQU 0
+HP_YELLOW EQU 1
+HP_RED EQU 2
+
+
+; name lengths
+NAME_LENGTH EQU 11
PLAYER_NAME_LENGTH EQU 8
-BOX_NAME_LENGTH EQU 9
-PKMN_NAME_LENGTH EQU 11
-MOVE_NAME_LENGTH EQU 13
-ITEM_NAME_LENGTH EQU 13
+BOX_NAME_LENGTH EQU 9
+PKMN_NAME_LENGTH EQU 11
+MOVE_NAME_LENGTH EQU 13
+ITEM_NAME_LENGTH EQU 13
TRAINER_CLASS_NAME_LENGTH EQU 13
-NAME_LENGTH EQU 11
-LV_CHAR EQU $6e
+NAME_LENGTH_JAPANESE EQU 6
-; GetName types
+; GetName types (see home/names.asm)
PKMN_NAME EQU 1
MOVE_NAME EQU 2
; dummied out EQU 3
@@ -25,136 +37,69 @@ ENEMY_OT_NAME EQU 6
TRAINER_NAME EQU 7
; broken ptr EQU 8
-; hp
-HP_GREEN EQU 0
-HP_YELLOW EQU 1
-HP_RED EQU 2
-; boxes
-MONS_PER_BOX EQU 20
-NUM_BOXES EQU 14
+; printing text
+const_value set 5
+ const PRINTNUM_MONEY_F ; 5
+ const PRINTNUM_RIGHTALIGN_F ; 6
+ const PRINTNUM_LEADINGZEROS_F ; 7
-; mail
-MAIL_STRUCT_LENGTH EQU $2f
-MAILBOX_CAPACITY EQU 10
-MAIL_MSG_LENGTH EQU $20
-
-; hall of fame
-HOF_MON_LENGTH = 1 + 2 + 2 + 1 + (PKMN_NAME_LENGTH +- 1) ; species, id, dvs, level, nick
-HOF_LENGTH = 1 + HOF_MON_LENGTH * PARTY_LENGTH + 1 ; win count, party, terminator
-NUM_HOF_TEAMS = 30
-
-
-; flag manipulation
-RESET_FLAG EQU 0
-SET_FLAG EQU 1
-CHECK_FLAG EQU 2
-
-; Boolean checks
-FALSE EQU 0
-TRUE EQU 1
+; PrintNum arguments (see engine/printnum.asm)
+PRINTNUM_MONEY EQU 1 << PRINTNUM_MONEY_F
+PRINTNUM_RIGHTALIGN EQU 1 << PRINTNUM_RIGHTALIGN_F
+PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F
-; joypad
+; DoPlayerMovement.DoStep arguments (see engine/player_movement.asm)
const_def
- const A_BUTTON_F
- const B_BUTTON_F
- const SELECT_F
- const START_F
- const D_RIGHT_F
- const D_LEFT_F
- const D_UP_F
- const D_DOWN_F
-
-NO_INPUT EQU %00000000
-A_BUTTON EQU 1 << A_BUTTON_F
-B_BUTTON EQU 1 << B_BUTTON_F
-SELECT EQU 1 << SELECT_F
-START EQU 1 << START_F
-D_RIGHT EQU 1 << D_RIGHT_F
-D_LEFT EQU 1 << D_LEFT_F
-D_UP EQU 1 << D_UP_F
-D_DOWN EQU 1 << D_DOWN_F
+ const STEP_SLOW ; 0
+ const STEP_WALK ; 1
+ const STEP_BIKE ; 2
+ const STEP_LEDGE ; 3
+ const STEP_ICE ; 4
+ const STEP_TURN ; 5
+ const STEP_BACK_LEDGE ; 6
+ const STEP_WALK_IN_PLACE ; 7
-BUTTONS EQU A_BUTTON | B_BUTTON | SELECT | START
-D_PAD EQU D_RIGHT | D_LEFT | D_UP | D_DOWN
-
-R_DPAD EQU %00100000
-R_BUTTONS EQU %00010000
-
-; screen
-HP_BAR_LENGTH EQU 6
-HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * 8
-EXP_BAR_LENGTH EQU 8
-EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * 8
-
-SCREEN_WIDTH EQU 20
-SCREEN_HEIGHT EQU 18
-SCREEN_WIDTH_PX EQU SCREEN_WIDTH * 8
-SCREEN_HEIGHT_PX EQU SCREEN_HEIGHT * 8
-
-BG_MAP_WIDTH EQU 32
-BG_MAP_HEIGHT EQU 32
-WMISC_WIDTH EQU 6 * 4
-WMISC_HEIGHT EQU 5 * 4
-
-TILE_WIDTH EQU 8
+; hMenuReturn
+HMENURETURN_SCRIPT EQU %10000000
+HMENURETURN_ASM EQU %11111111
-; movement
-STEP_SLOW EQU 0
-STEP_WALK EQU 1
-STEP_BIKE EQU 2
-STEP_LEDGE EQU 3
-STEP_ICE EQU 4
-STEP_TURN EQU 5
-STEP_BACK_LEDGE EQU 6
-STEP_WALK_IN_PLACE EQU 7
+; save file corruption check values
+SAVE_CHECK_VALUE_1 EQU 99
+SAVE_CHECK_VALUE_2 EQU 127
-; ai
-CONTEXT_USE_F EQU 6
-UNKNOWN_USE_F EQU 5
-ALWAYS_USE_F EQU 4
-SWITCH_SOMETIMES_F EQU 2
-SWITCH_RARELY_F EQU 1
-SWITCH_OFTEN_F EQU 0
-CONTEXT_USE EQU 1 << CONTEXT_USE_F
-UNKNOWN_USE EQU 1 << UNKNOWN_USE_F
-ALWAYS_USE EQU 1 << ALWAYS_USE_F
-SWITCH_SOMETIMES EQU 1 << SWITCH_SOMETIMES_F
-SWITCH_RARELY EQU 1 << SWITCH_RARELY_F
-SWITCH_OFTEN EQU 1 << SWITCH_OFTEN_F
-SPRITE_GFX_LIST_CAPACITY EQU $20
+; time of day boundaries
+MORN_HOUR EQU 4 ; 4 AM
+DAY_HOUR EQU 10 ; 10 AM
+NITE_HOUR EQU 18 ; 6 PM
+NOON_HOUR EQU 12 ; 12 PM
+MAX_HOUR EQU 24 ; 12 AM
-const_value = 1
- const MOM_ITEM
- const MOM_DOLL
-BATTLETOWER_NROFPKMNS EQU 3
-BATTLETOWER_TRAINERDATALENGTH EQU $24
-BATTLETOWER_NROFTRAINERS EQU 7
-BATTLETOWER_NRMONSPERLEVELBRACKET EQU BATTLETOWER_NROFPKMNS * BATTLETOWER_NROFTRAINERS
-BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + 3 * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
+; boxes
+MONS_PER_BOX EQU 20
+NUM_BOXES EQU 14
-NUM_WILDMONS_PER_AREA_TIME_OF_DAY EQU 7
-WILDMON_GRASS_STRUCTURE_LENGTH EQU 2 + 3 * (1 + 2 * NUM_WILDMONS_PER_AREA_TIME_OF_DAY)
+; hall of fame
+HOF_MON_LENGTH = 1 + 2 + 2 + 1 + (PKMN_NAME_LENGTH +- 1) ; species, id, dvs, level, nick
+HOF_LENGTH = 1 + HOF_MON_LENGTH * PARTY_LENGTH + 1 ; win count, party, terminator
+NUM_HOF_TEAMS = 30
-MOBILE_EVENT_OBJECT_GS_BALL EQU $b
-MOBILE_LOGIN_PASSWORD_LENGTH EQU 17
+MAX_LINK_RECORD EQU 9999
-MALE EQU 0
-FEMALE EQU 1
-PRINTNUM_MONEY_F EQU 5
-PRINTNUM_RIGHTALIGN_F EQU 6
-PRINTNUM_LEADINGZEROS_F EQU 7
+; significant money values
+START_MONEY EQU 3000
+MOM_MONEY EQU 2300
+MAX_MONEY EQU 999999
+MAX_COINS EQU 9999
-PRINTNUM_MONEY EQU 1 << PRINTNUM_MONEY_F
-PRINTNUM_RIGHTALIGN EQU 1 << PRINTNUM_RIGHTALIGN_F
-PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F
+; ChangeHappiness arguments (see data/happiness_changes.asm)
const_value = 1
const HAPPINESS_GAINLEVEL ; 01
const HAPPINESS_USEDITEM ; 02
@@ -175,88 +120,3 @@ const_value = 1
const HAPPINESS_REVIVALHERB ; 11
const HAPPINESS_MASSAGE ; 12
const HAPPINESS_GAINLEVELATHOME ; 13
-
-
- const_def
- const LINK_NULL
- const LINK_TIMECAPSULE
- const LINK_TRADECENTER
- const LINK_COLOSSEUM
- const LINK_MOBILE
-
-SERIAL_TIMECAPSULE EQU $60
-SERIAL_TRADECENTER EQU $70
-SERIAL_BATTLE EQU $80
-
-HMENURETURN_SCRIPT EQU %10000000
-HMENURETURN_ASM EQU %11111111
-
-NUM_MON_SUBMENU_ITEMS EQU 8
-
- const_def
- const ZEPHYRBADGE
- const HIVEBADGE
- const PLAINBADGE
- const FOGBADGE
- const MINERALBADGE
- const STORMBADGE
- const GLACIERBADGE
- const RISINGBADGE
-NUM_JOHTO_BADGES EQU const_value
- const_def
- const BOULDERBADGE
- const CASCADEBADGE
- const THUNDERBADGE
- const RAINBOWBADGE
- const SOULBADGE
- const MARSHBADGE
- const VOLCANOBADGE
- const EARTHBADGE
-NUM_KANTO_BADGES EQU const_value
-NUM_BADGES EQU NUM_JOHTO_BADGES + NUM_KANTO_BADGES
-NUM_KANA EQU $2d
-
- const_def
- const EZCHAT_POKEMON
- const EZCHAT_TYPES
- const EZCHAT_GREETINGS
- const EZCHAT_PEOPLE
- const EZCHAT_BATTLE
- const EZCHAT_EXCLAMATIONS
- const EZCHAT_CONVERSATION
- const EZCHAT_FEELINGS
- const EZCHAT_CONDITIONS
- const EZCHAT_LIFE
- const EZCHAT_HOBBIES
- const EZCHAT_ACTIONS
- const EZCHAT_TIME
- const EZCHAT_FAREWELLS
- const EZCHAT_THISANDTHAT
-
-SWARM_DUNSPARCE EQU 0
-SWARM_YANMA EQU 1
-
-FISHSWARM_QWILFISH EQU 1
-FISHSWARM_REMORAID EQU 2
-
- const_def
- const FISHGROUP_NONE
- const FISHGROUP_SHORE
- const FISHGROUP_OCEAN
- const FISHGROUP_LAKE
- const FISHGROUP_POND
- const FISHGROUP_DRATINI
- const FISHGROUP_QWILFISH_SWARM
- const FISHGROUP_REMORAID_SWARM
- const FISHGROUP_GYARADOS
- const FISHGROUP_DRATINI_2
- const FISHGROUP_WHIRL_ISLANDS
- const FISHGROUP_QWILFISH
- const FISHGROUP_REMORAID
- const FISHGROUP_QWILFISH_NO_SWARM
-
-INIT_ENEMYOT_LIST EQU 1
-INIT_BAG_ITEM_LIST EQU 2
-INIT_OTHER_ITEM_LIST EQU 3
-INIT_PLAYEROT_LIST EQU 4
-INIT_MON_LIST EQU 5
diff --git a/constants/mobile_constants.asm b/constants/mobile_constants.asm
new file mode 100644
index 000000000..b5894b8e9
--- /dev/null
+++ b/constants/mobile_constants.asm
@@ -0,0 +1,21 @@
+; MobileEZChatCategoryPointers indexes (see mobile/fixed_words.asm)
+ const_def
+ const EZCHAT_POKEMON
+ const EZCHAT_TYPES
+ const EZCHAT_GREETINGS
+ const EZCHAT_PEOPLE
+ const EZCHAT_BATTLE
+ const EZCHAT_EXCLAMATIONS
+ const EZCHAT_CONVERSATION
+ const EZCHAT_FEELINGS
+ const EZCHAT_CONDITIONS
+ const EZCHAT_LIFE
+ const EZCHAT_HOBBIES
+ const EZCHAT_ACTIONS
+ const EZCHAT_TIME
+ const EZCHAT_FAREWELLS
+ const EZCHAT_THISANDTHAT
+
+NUM_KANA EQU 45 ; length of SortedPokemon table (see mobile/fixed_words.asm)
+
+MOBILE_LOGIN_PASSWORD_LENGTH EQU 17
diff --git a/constants/move_constants.asm b/constants/move_constants.asm
index 8492c2415..a4b1a0ba8 100644
--- a/constants/move_constants.asm
+++ b/constants/move_constants.asm
@@ -1,291 +1,293 @@
-
+; move ids
+; indexes for:
+; - MoveDescriptions (see battle/moves/move_descriptions.asm)
+; - Moves (see battle/moves/moves.asm)
+; - MoveNames (see battle/move_names.asm)
+; - BattleAnimations (see battle/anims.asm)
const_def
- const NO_MOVE ; $00
- const POUND ; $01
- const KARATE_CHOP ; $02
- const DOUBLESLAP ; $03
- const COMET_PUNCH ; $04
- const MEGA_PUNCH ; $05
- const PAY_DAY ; $06
- const FIRE_PUNCH ; $07
- const ICE_PUNCH ; $08
- const THUNDERPUNCH ; $09
- const SCRATCH ; $0a
- const VICEGRIP ; $0b
- const GUILLOTINE ; $0c
- const RAZOR_WIND ; $0d
- const SWORDS_DANCE ; $0e
- const CUT ; $0f
- const GUST ; $10
- const WING_ATTACK ; $11
- const WHIRLWIND ; $12
- const FLY ; $13
- const BIND ; $14
- const SLAM ; $15
- const VINE_WHIP ; $16
- const STOMP ; $17
- const DOUBLE_KICK ; $18
- const MEGA_KICK ; $19
- const JUMP_KICK ; $1a
- const ROLLING_KICK ; $1b
- const SAND_ATTACK ; $1c
- const HEADBUTT ; $1d
- const HORN_ATTACK ; $1e
- const FURY_ATTACK ; $1f
- const HORN_DRILL ; $20
- const TACKLE ; $21
- const BODY_SLAM ; $22
- const WRAP ; $23
- const TAKE_DOWN ; $24
- const THRASH ; $25
- const DOUBLE_EDGE ; $26
- const TAIL_WHIP ; $27
- const POISON_STING ; $28
- const TWINEEDLE ; $29
- const PIN_MISSILE ; $2a
- const LEER ; $2b
- const BITE ; $2c
- const GROWL ; $2d
- const ROAR ; $2e
- const SING ; $2f
- const SUPERSONIC ; $30
- const SONICBOOM ; $31
- const DISABLE ; $32
- const ACID ; $33
- const EMBER ; $34
- const FLAMETHROWER ; $35
- const MIST ; $36
- const WATER_GUN ; $37
- const HYDRO_PUMP ; $38
- const SURF ; $39
- const ICE_BEAM ; $3a
- const BLIZZARD ; $3b
- const PSYBEAM ; $3c
- const BUBBLEBEAM ; $3d
- const AURORA_BEAM ; $3e
- const HYPER_BEAM ; $3f
- const PECK ; $40
- const DRILL_PECK ; $41
- const SUBMISSION ; $42
- const LOW_KICK ; $43
- const COUNTER ; $44
- const SEISMIC_TOSS ; $45
- const STRENGTH ; $46
- const ABSORB ; $47
- const MEGA_DRAIN ; $48
- const LEECH_SEED ; $49
- const GROWTH ; $4a
- const RAZOR_LEAF ; $4b
- const SOLARBEAM ; $4c
- const POISONPOWDER ; $4d
- const STUN_SPORE ; $4e
- const SLEEP_POWDER ; $4f
- const PETAL_DANCE ; $50
- const STRING_SHOT ; $51
- const DRAGON_RAGE ; $52
- const FIRE_SPIN ; $53
- const THUNDERSHOCK ; $54
- const THUNDERBOLT ; $55
- const THUNDER_WAVE ; $56
- const THUNDER ; $57
- const ROCK_THROW ; $58
- const EARTHQUAKE ; $59
- const FISSURE ; $5a
- const DIG ; $5b
- const TOXIC ; $5c
- const CONFUSION ; $5d
- const PSYCHIC_M ; $5e
- const HYPNOSIS ; $5f
- const MEDITATE ; $60
- const AGILITY ; $61
- const QUICK_ATTACK ; $62
- const RAGE ; $63
- const TELEPORT ; $64
- const NIGHT_SHADE ; $65
- const MIMIC ; $66
- const SCREECH ; $67
- const DOUBLE_TEAM ; $68
- const RECOVER ; $69
- const HARDEN ; $6a
- const MINIMIZE ; $6b
- const SMOKESCREEN ; $6c
- const CONFUSE_RAY ; $6d
- const WITHDRAW ; $6e
- const DEFENSE_CURL ; $6f
- const BARRIER ; $70
- const LIGHT_SCREEN ; $71
- const HAZE ; $72
- const REFLECT ; $73
- const FOCUS_ENERGY ; $74
- const BIDE ; $75
- const METRONOME ; $76
- const MIRROR_MOVE ; $77
- const SELFDESTRUCT ; $78
- const EGG_BOMB ; $79
- const LICK ; $7a
- const SMOG ; $7b
- const SLUDGE ; $7c
- const BONE_CLUB ; $7d
- const FIRE_BLAST ; $7e
- const WATERFALL ; $7f
- const CLAMP ; $80
- const SWIFT ; $81
- const SKULL_BASH ; $82
- const SPIKE_CANNON ; $83
- const CONSTRICT ; $84
- const AMNESIA ; $85
- const KINESIS ; $86
- const SOFTBOILED ; $87
- const HI_JUMP_KICK ; $88
- const GLARE ; $89
- const DREAM_EATER ; $8a
- const POISON_GAS ; $8b
- const BARRAGE ; $8c
- const LEECH_LIFE ; $8d
- const LOVELY_KISS ; $8e
- const SKY_ATTACK ; $8f
- const TRANSFORM ; $90
- const BUBBLE ; $91
- const DIZZY_PUNCH ; $92
- const SPORE ; $93
- const FLASH ; $94
- const PSYWAVE ; $95
- const SPLASH ; $96
- const ACID_ARMOR ; $97
- const CRABHAMMER ; $98
- const EXPLOSION ; $99
- const FURY_SWIPES ; $9a
- const BONEMERANG ; $9b
- const REST ; $9c
- const ROCK_SLIDE ; $9d
- const HYPER_FANG ; $9e
- const SHARPEN ; $9f
- const CONVERSION ; $a0
- const TRI_ATTACK ; $a1
- const SUPER_FANG ; $a2
- const SLASH ; $a3
- const SUBSTITUTE ; $a4
- const STRUGGLE ; $a5
- const SKETCH ; $a6
- const TRIPLE_KICK ; $a7
- const THIEF ; $a8
- const SPIDER_WEB ; $a9
- const MIND_READER ; $aa
- const NIGHTMARE ; $ab
- const FLAME_WHEEL ; $ac
- const SNORE ; $ad
- const CURSE ; $ae
- const FLAIL ; $af
- const CONVERSION2 ; $b0
- const AEROBLAST ; $b1
- const COTTON_SPORE ; $b2
- const REVERSAL ; $b3
- const SPITE ; $b4
- const POWDER_SNOW ; $b5
- const PROTECT ; $b6
- const MACH_PUNCH ; $b7
- const SCARY_FACE ; $b8
- const FAINT_ATTACK ; $b9
- const SWEET_KISS ; $ba
- const BELLY_DRUM ; $bb
- const SLUDGE_BOMB ; $bc
- const MUD_SLAP ; $bd
- const OCTAZOOKA ; $be
- const SPIKES ; $bf
- const ZAP_CANNON ; $c0
- const FORESIGHT ; $c1
- const DESTINY_BOND ; $c2
- const PERISH_SONG ; $c3
- const ICY_WIND ; $c4
- const DETECT ; $c5
- const BONE_RUSH ; $c6
- const LOCK_ON ; $c7
- const OUTRAGE ; $c8
- const SANDSTORM ; $c9
- const GIGA_DRAIN ; $ca
- const ENDURE ; $cb
- const CHARM ; $cc
- const ROLLOUT ; $cd
- const FALSE_SWIPE ; $ce
- const SWAGGER ; $cf
- const MILK_DRINK ; $d0
- const SPARK ; $d1
- const FURY_CUTTER ; $d2
- const STEEL_WING ; $d3
- const MEAN_LOOK ; $d4
- const ATTRACT ; $d5
- const SLEEP_TALK ; $d6
- const HEAL_BELL ; $d7
- const RETURN ; $d8
- const PRESENT ; $d9
- const FRUSTRATION ; $da
- const SAFEGUARD ; $db
- const PAIN_SPLIT ; $dc
- const SACRED_FIRE ; $dd
- const MAGNITUDE ; $de
- const DYNAMICPUNCH ; $df
- const MEGAHORN ; $e0
- const DRAGONBREATH ; $e1
- const BATON_PASS ; $e2
- const ENCORE ; $e3
- const PURSUIT ; $e4
- const RAPID_SPIN ; $e5
- const SWEET_SCENT ; $e6
- const IRON_TAIL ; $e7
- const METAL_CLAW ; $e8
- const VITAL_THROW ; $e9
- const MORNING_SUN ; $ea
- const SYNTHESIS ; $eb
- const MOONLIGHT ; $ec
- const HIDDEN_POWER ; $ed
- const CROSS_CHOP ; $ee
- const TWISTER ; $ef
- const RAIN_DANCE ; $f0
- const SUNNY_DAY ; $f1
- const CRUNCH ; $f2
- const MIRROR_COAT ; $f3
- const PSYCH_UP ; $f4
- const EXTREMESPEED ; $f5
- const ANCIENTPOWER ; $f6
- const SHADOW_BALL ; $f7
- const FUTURE_SIGHT ; $f8
- const ROCK_SMASH ; $f9
- const WHIRLPOOL ; $fa
- const BEAT_UP ; $fb
-
-const_value SET const_value + -1
+ const NO_MOVE ; 00
+ const POUND ; 01
+ const KARATE_CHOP ; 02
+ const DOUBLESLAP ; 03
+ const COMET_PUNCH ; 04
+ const MEGA_PUNCH ; 05
+ const PAY_DAY ; 06
+ const FIRE_PUNCH ; 07
+ const ICE_PUNCH ; 08
+ const THUNDERPUNCH ; 09
+ const SCRATCH ; 0a
+ const VICEGRIP ; 0b
+ const GUILLOTINE ; 0c
+ const RAZOR_WIND ; 0d
+ const SWORDS_DANCE ; 0e
+ const CUT ; 0f
+ const GUST ; 10
+ const WING_ATTACK ; 11
+ const WHIRLWIND ; 12
+ const FLY ; 13
+ const BIND ; 14
+ const SLAM ; 15
+ const VINE_WHIP ; 16
+ const STOMP ; 17
+ const DOUBLE_KICK ; 18
+ const MEGA_KICK ; 19
+ const JUMP_KICK ; 1a
+ const ROLLING_KICK ; 1b
+ const SAND_ATTACK ; 1c
+ const HEADBUTT ; 1d
+ const HORN_ATTACK ; 1e
+ const FURY_ATTACK ; 1f
+ const HORN_DRILL ; 20
+ const TACKLE ; 21
+ const BODY_SLAM ; 22
+ const WRAP ; 23
+ const TAKE_DOWN ; 24
+ const THRASH ; 25
+ const DOUBLE_EDGE ; 26
+ const TAIL_WHIP ; 27
+ const POISON_STING ; 28
+ const TWINEEDLE ; 29
+ const PIN_MISSILE ; 2a
+ const LEER ; 2b
+ const BITE ; 2c
+ const GROWL ; 2d
+ const ROAR ; 2e
+ const SING ; 2f
+ const SUPERSONIC ; 30
+ const SONICBOOM ; 31
+ const DISABLE ; 32
+ const ACID ; 33
+ const EMBER ; 34
+ const FLAMETHROWER ; 35
+ const MIST ; 36
+ const WATER_GUN ; 37
+ const HYDRO_PUMP ; 38
+ const SURF ; 39
+ const ICE_BEAM ; 3a
+ const BLIZZARD ; 3b
+ const PSYBEAM ; 3c
+ const BUBBLEBEAM ; 3d
+ const AURORA_BEAM ; 3e
+ const HYPER_BEAM ; 3f
+ const PECK ; 40
+ const DRILL_PECK ; 41
+ const SUBMISSION ; 42
+ const LOW_KICK ; 43
+ const COUNTER ; 44
+ const SEISMIC_TOSS ; 45
+ const STRENGTH ; 46
+ const ABSORB ; 47
+ const MEGA_DRAIN ; 48
+ const LEECH_SEED ; 49
+ const GROWTH ; 4a
+ const RAZOR_LEAF ; 4b
+ const SOLARBEAM ; 4c
+ const POISONPOWDER ; 4d
+ const STUN_SPORE ; 4e
+ const SLEEP_POWDER ; 4f
+ const PETAL_DANCE ; 50
+ const STRING_SHOT ; 51
+ const DRAGON_RAGE ; 52
+ const FIRE_SPIN ; 53
+ const THUNDERSHOCK ; 54
+ const THUNDERBOLT ; 55
+ const THUNDER_WAVE ; 56
+ const THUNDER ; 57
+ const ROCK_THROW ; 58
+ const EARTHQUAKE ; 59
+ const FISSURE ; 5a
+ const DIG ; 5b
+ const TOXIC ; 5c
+ const CONFUSION ; 5d
+ const PSYCHIC_M ; 5e
+ const HYPNOSIS ; 5f
+ const MEDITATE ; 60
+ const AGILITY ; 61
+ const QUICK_ATTACK ; 62
+ const RAGE ; 63
+ const TELEPORT ; 64
+ const NIGHT_SHADE ; 65
+ const MIMIC ; 66
+ const SCREECH ; 67
+ const DOUBLE_TEAM ; 68
+ const RECOVER ; 69
+ const HARDEN ; 6a
+ const MINIMIZE ; 6b
+ const SMOKESCREEN ; 6c
+ const CONFUSE_RAY ; 6d
+ const WITHDRAW ; 6e
+ const DEFENSE_CURL ; 6f
+ const BARRIER ; 70
+ const LIGHT_SCREEN ; 71
+ const HAZE ; 72
+ const REFLECT ; 73
+ const FOCUS_ENERGY ; 74
+ const BIDE ; 75
+ const METRONOME ; 76
+ const MIRROR_MOVE ; 77
+ const SELFDESTRUCT ; 78
+ const EGG_BOMB ; 79
+ const LICK ; 7a
+ const SMOG ; 7b
+ const SLUDGE ; 7c
+ const BONE_CLUB ; 7d
+ const FIRE_BLAST ; 7e
+ const WATERFALL ; 7f
+ const CLAMP ; 80
+ const SWIFT ; 81
+ const SKULL_BASH ; 82
+ const SPIKE_CANNON ; 83
+ const CONSTRICT ; 84
+ const AMNESIA ; 85
+ const KINESIS ; 86
+ const SOFTBOILED ; 87
+ const HI_JUMP_KICK ; 88
+ const GLARE ; 89
+ const DREAM_EATER ; 8a
+ const POISON_GAS ; 8b
+ const BARRAGE ; 8c
+ const LEECH_LIFE ; 8d
+ const LOVELY_KISS ; 8e
+ const SKY_ATTACK ; 8f
+ const TRANSFORM ; 90
+ const BUBBLE ; 91
+ const DIZZY_PUNCH ; 92
+ const SPORE ; 93
+ const FLASH ; 94
+ const PSYWAVE ; 95
+ const SPLASH ; 96
+ const ACID_ARMOR ; 97
+ const CRABHAMMER ; 98
+ const EXPLOSION ; 99
+ const FURY_SWIPES ; 9a
+ const BONEMERANG ; 9b
+ const REST ; 9c
+ const ROCK_SLIDE ; 9d
+ const HYPER_FANG ; 9e
+ const SHARPEN ; 9f
+ const CONVERSION ; a0
+ const TRI_ATTACK ; a1
+ const SUPER_FANG ; a2
+ const SLASH ; a3
+ const SUBSTITUTE ; a4
+ const STRUGGLE ; a5
+ const SKETCH ; a6
+ const TRIPLE_KICK ; a7
+ const THIEF ; a8
+ const SPIDER_WEB ; a9
+ const MIND_READER ; aa
+ const NIGHTMARE ; ab
+ const FLAME_WHEEL ; ac
+ const SNORE ; ad
+ const CURSE ; ae
+ const FLAIL ; af
+ const CONVERSION2 ; b0
+ const AEROBLAST ; b1
+ const COTTON_SPORE ; b2
+ const REVERSAL ; b3
+ const SPITE ; b4
+ const POWDER_SNOW ; b5
+ const PROTECT ; b6
+ const MACH_PUNCH ; b7
+ const SCARY_FACE ; b8
+ const FAINT_ATTACK ; b9
+ const SWEET_KISS ; ba
+ const BELLY_DRUM ; bb
+ const SLUDGE_BOMB ; bc
+ const MUD_SLAP ; bd
+ const OCTAZOOKA ; be
+ const SPIKES ; bf
+ const ZAP_CANNON ; c0
+ const FORESIGHT ; c1
+ const DESTINY_BOND ; c2
+ const PERISH_SONG ; c3
+ const ICY_WIND ; c4
+ const DETECT ; c5
+ const BONE_RUSH ; c6
+ const LOCK_ON ; c7
+ const OUTRAGE ; c8
+ const SANDSTORM ; c9
+ const GIGA_DRAIN ; ca
+ const ENDURE ; cb
+ const CHARM ; cc
+ const ROLLOUT ; cd
+ const FALSE_SWIPE ; ce
+ const SWAGGER ; cf
+ const MILK_DRINK ; d0
+ const SPARK ; d1
+ const FURY_CUTTER ; d2
+ const STEEL_WING ; d3
+ const MEAN_LOOK ; d4
+ const ATTRACT ; d5
+ const SLEEP_TALK ; d6
+ const HEAL_BELL ; d7
+ const RETURN ; d8
+ const PRESENT ; d9
+ const FRUSTRATION ; da
+ const SAFEGUARD ; db
+ const PAIN_SPLIT ; dc
+ const SACRED_FIRE ; dd
+ const MAGNITUDE ; de
+ const DYNAMICPUNCH ; df
+ const MEGAHORN ; e0
+ const DRAGONBREATH ; e1
+ const BATON_PASS ; e2
+ const ENCORE ; e3
+ const PURSUIT ; e4
+ const RAPID_SPIN ; e5
+ const SWEET_SCENT ; e6
+ const IRON_TAIL ; e7
+ const METAL_CLAW ; e8
+ const VITAL_THROW ; e9
+ const MORNING_SUN ; ea
+ const SYNTHESIS ; eb
+ const MOONLIGHT ; ec
+ const HIDDEN_POWER ; ed
+ const CROSS_CHOP ; ee
+ const TWISTER ; ef
+ const RAIN_DANCE ; f0
+ const SUNNY_DAY ; f1
+ const CRUNCH ; f2
+ const MIRROR_COAT ; f3
+ const PSYCH_UP ; f4
+ const EXTREMESPEED ; f5
+ const ANCIENTPOWER ; f6
+ const SHADOW_BALL ; f7
+ const FUTURE_SIGHT ; f8
+ const ROCK_SMASH ; f9
+ const WHIRLPOOL ; fa
+ const BEAT_UP ; fb
+NUM_ATTACKS EQU const_value + -1
- const NUM_ATTACKS ; $fb
+ const MOVE_OR_ANIM_FC ; fc
+ const MOVE_OR_ANIM_FD ; fd
+ const MOVE_OR_ANIM_FE ; fe
-; Battle animations use the same constants
-; as the moves up to this point.
- const ANIM_FC ; $fc
- const ANIM_FD ; $fd
- const ANIM_FE ; $fe
- const ANIM_SWEET_SCENT_2 ; $ff
- const ANIM_THROW_POKE_BALL ; $100
- const ANIM_SEND_OUT_MON ; $101
- const ANIM_RETURN_MON ; $102
- const ANIM_CONFUSED ; $103
- const ANIM_SLP ; $104
- const ANIM_BRN ; $105
- const ANIM_PSN ; $106
- const ANIM_SAP ; $107
- const ANIM_FRZ ; $108
- const ANIM_PAR ; $109
- const ANIM_IN_LOVE ; $10a
- const ANIM_IN_SANDSTORM ; $10b
- const ANIM_IN_NIGHTMARE ; $10c
- const ANIM_IN_WHIRLPOOL ; $10d
+; Battle animations use the same constants as the moves up to this point
+ const ANIM_SWEET_SCENT_2 ; ff
+ const ANIM_THROW_POKE_BALL ; 100
+ const ANIM_SEND_OUT_MON ; 101
+ const ANIM_RETURN_MON ; 102
+ const ANIM_CONFUSED ; 103
+ const ANIM_SLP ; 104
+ const ANIM_BRN ; 105
+ const ANIM_PSN ; 106
+ const ANIM_SAP ; 107
+ const ANIM_FRZ ; 108
+ const ANIM_PAR ; 109
+ const ANIM_IN_LOVE ; 10a
+ const ANIM_IN_SANDSTORM ; 10b
+ const ANIM_IN_NIGHTMARE ; 10c
+ const ANIM_IN_WHIRLPOOL ; 10d
; battle anims
- const ANIM_MISS ; $10e
- const ANIM_ENEMY_DAMAGE ; $10f
- const ANIM_ENEMY_STAT_DOWN ; $110
- const ANIM_PLAYER_STAT_DOWN ; $111
- const ANIM_PLAYER_DAMAGE ; $112
- const ANIM_WOBBLE ; $113
- const ANIM_SHAKE ; $114
- const ANIM_HIT_CONFUSION ; $115
+ const ANIM_MISS ; 10e
+ const ANIM_ENEMY_DAMAGE ; 10f
+ const ANIM_ENEMY_STAT_DOWN ; 110
+ const ANIM_PLAYER_STAT_DOWN ; 111
+ const ANIM_PLAYER_DAMAGE ; 112
+ const ANIM_WOBBLE ; 113
+ const ANIM_SHAKE ; 114
+ const ANIM_HIT_CONFUSION ; 115
; wNumHits uses offsets from ANIM_MISS
const_def
@@ -296,4 +298,4 @@ const_value SET const_value + -1
const BATTLEANIM_PLAYER_DAMAGE
const BATTLEANIM_WOBBLE
const BATTLEANIM_SHAKE
- const BATTLEANIM_HIT_CONFUSION \ No newline at end of file
+ const BATTLEANIM_HIT_CONFUSION
diff --git a/constants/music_constants.asm b/constants/music_constants.asm
index 5c54c3dc0..453bf9098 100644
--- a/constants/music_constants.asm
+++ b/constants/music_constants.asm
@@ -1,3 +1,5 @@
+; song ids
+; Music indexes (see audio/music_pointers.asm)
const_def
const MUSIC_NONE ; 00
@@ -93,6 +95,8 @@
const MUSIC_LAKE_OF_RAGE_ROCKET_RADIO ; 5a
const MUSIC_PRINTER ; 5b
const MUSIC_POST_CREDITS ; 5c
+
+; new to Crystal
const MUSIC_CLAIR ; 5d
const MUSIC_MOBILE_ADAPTER_MENU ; 5e
const MUSIC_MOBILE_ADAPTER ; 5f
@@ -104,4 +108,9 @@
const MUSIC_BATTLE_TOWER_LOBBY ; 65
const MUSIC_MOBILE_CENTER ; 66
-MUSIC_MAHOGANY_MART EQU $64 ; leftover from gold
+; GetMapHeaderMusic picks music for this value (see home/map.asm)
+MUSIC_MAHOGANY_MART EQU $64
+
+; GetMapHeaderMusic picks music for this bit flag
+RADIO_TOWER_MUSIC_F EQU 7
+RADIO_TOWER_MUSIC EQU 1 << RADIO_TOWER_MUSIC_F
diff --git a/constants/npctrade_constants.asm b/constants/npctrade_constants.asm
new file mode 100644
index 000000000..2da4abd64
--- /dev/null
+++ b/constants/npctrade_constants.asm
@@ -0,0 +1,21 @@
+; npctrade struct members (see data/npc_trades.asm)
+TRADE_DIALOG EQU 0
+TRADE_GIVEMON EQU 1
+TRADE_GETMON EQU 2
+TRADE_NICK EQU 3
+TRADE_DVS EQU 14
+TRADE_ITEM EQU 16
+TRADE_OT_ID EQU 17
+TRADE_OT_NAME EQU 19
+TRADE_GENDER EQU 30
+TRADE_PADDING EQU 31
+
+; NPCTrades indexes (see data/npc_trades.asm)
+ const_def
+ const NPCTRADE_MIKE ; 0
+ const NPCTRADE_KYLE ; 1
+ const NPCTRADE_TIM ; 2
+ const NPCTRADE_EMY ; 3
+ const NPCTRADE_CHRIS ; 4
+ const NPCTRADE_KIM ; 5
+ const NPCTRADE_FOREST ; 6
diff --git a/constants/phone_constants.asm b/constants/phone_constants.asm
index 1eb2b2d23..b2312ab4b 100644
--- a/constants/phone_constants.asm
+++ b/constants/phone_constants.asm
@@ -1,4 +1,4 @@
-
+; PhoneContacts indexes (see data/phone_contacts.asm)
const_def
const PHONE_00
const PHONE_MOM
@@ -39,6 +39,7 @@
const PHONE_PICNICKER_ERIN
const PHONE_BUENA
+; SpecialPhoneCallList indexes (see data/phone_special.asm)
const_def
const SPECIALCALL_NONE
const SPECIALCALL_POKERUS
@@ -50,6 +51,7 @@
const SPECIALCALL_WORRIED
const SPECIALCALL_MASTERBALL
+; phone struct members
const_def
const PHONE_CONTACT_TRAINER_CLASS
const PHONE_CONTACT_TRAINER_NUMBER
@@ -64,4 +66,6 @@
const PHONE_CONTACT_SCRIPT2_ADDR_LO
const PHONE_CONTACT_SCRIPT2_ADDR_HI
PHONE_TABLE_WIDTH EQU const_value
+
+; maximum number of pokegear contacts
CONTACT_LIST_SIZE EQU 10
diff --git a/constants/pokemon_constants.asm b/constants/pokemon_constants.asm
index 5041f7064..13cb577bb 100644
--- a/constants/pokemon_constants.asm
+++ b/constants/pokemon_constants.asm
@@ -1,321 +1,278 @@
-
-; pokemon
+; pokemon ids
+; indexes for:
+; - CryHeaders (see data/pokemon/cry_headers.asm)
+; - BaseData (see data/pokemon/base_stats.asm)
+; - EggMovePointers (see data/pokemon/egg_move_pointers.asm)
+; - EvosAttacksPointers (see data/pokemon/evos_attacks_pointers.asm)
+; - PokemonNames (see data/pokemon/pokemon_names.asm)
+; - PokedexDataPointerTable (see data/pokemon/dex_entry_pointers.asm)
+; - AnimationPointers (see gfx/pics/anim_pointers.asm)
+; - BitmasksPointers (see gfx/pics/bitmask_pointers.asm)
+; - AnimationExtraPointers (see gfx/pics/extra_pointers.asm)
+; - FramesPointers (see gfx/pics/frame_pointers.asm)
+; - PokemonPalettes (see gfx/pics/palette_pointers.asm)
+; - PicPointers (see gfx/pics/pic_pointers.asm)
+; - AlphabeticalPokedexOrder (see data/pokemon/dex_order_alpha.asm)
+; - NewPokedexOrder (see data/pokemon/dex_order_new.asm)
+; - MonMenuIcons (see data/pokemon/menu_icons.asm)
+; - Pokered_MonIndices (see data/time_capsule/mon_order.asm)
+; - SortedPokemon (see mobile/fixed_words.asm)
const_value set 1
- const BULBASAUR
- const IVYSAUR
- const VENUSAUR
- const CHARMANDER
- const CHARMELEON
- const CHARIZARD
- const SQUIRTLE
- const WARTORTLE
- const BLASTOISE
- const CATERPIE
- const METAPOD
- const BUTTERFREE
- const WEEDLE
- const KAKUNA
- const BEEDRILL
- const PIDGEY
- const PIDGEOTTO
- const PIDGEOT
- const RATTATA
- const RATICATE
- const SPEAROW
- const FEAROW
- const EKANS
- const ARBOK
- const PIKACHU
- const RAICHU
- const SANDSHREW
- const SANDSLASH
- const NIDORAN_F
- const NIDORINA
- const NIDOQUEEN
- const NIDORAN_M
- const NIDORINO
- const NIDOKING
- const CLEFAIRY
- const CLEFABLE
- const VULPIX
- const NINETALES
- const JIGGLYPUFF
- const WIGGLYTUFF
- const ZUBAT
- const GOLBAT
- const ODDISH
- const GLOOM
- const VILEPLUME
- const PARAS
- const PARASECT
- const VENONAT
- const VENOMOTH
- const DIGLETT
- const DUGTRIO
- const MEOWTH
- const PERSIAN
- const PSYDUCK
- const GOLDUCK
- const MANKEY
- const PRIMEAPE
- const GROWLITHE
- const ARCANINE
- const POLIWAG
- const POLIWHIRL
- const POLIWRATH
- const ABRA
- const KADABRA
- const ALAKAZAM
- const MACHOP
- const MACHOKE
- const MACHAMP
- const BELLSPROUT
- const WEEPINBELL
- const VICTREEBEL
- const TENTACOOL
- const TENTACRUEL
- const GEODUDE
- const GRAVELER
- const GOLEM
- const PONYTA
- const RAPIDASH
- const SLOWPOKE
- const SLOWBRO
- const MAGNEMITE
- const MAGNETON
- const FARFETCH_D
- const DODUO
- const DODRIO
- const SEEL
- const DEWGONG
- const GRIMER
- const MUK
- const SHELLDER
- const CLOYSTER
- const GASTLY
- const HAUNTER
- const GENGAR
- const ONIX
- const DROWZEE
- const HYPNO
- const KRABBY
- const KINGLER
- const VOLTORB
- const ELECTRODE
- const EXEGGCUTE
- const EXEGGUTOR
- const CUBONE
- const MAROWAK
- const HITMONLEE
- const HITMONCHAN
- const LICKITUNG
- const KOFFING
- const WEEZING
- const RHYHORN
- const RHYDON
- const CHANSEY
- const TANGELA
- const KANGASKHAN
- const HORSEA
- const SEADRA
- const GOLDEEN
- const SEAKING
- const STARYU
- const STARMIE
- const MR__MIME
- const SCYTHER
- const JYNX
- const ELECTABUZZ
- const MAGMAR
- const PINSIR
- const TAUROS
- const MAGIKARP
- const GYARADOS
- const LAPRAS
- const DITTO
- const EEVEE
- const VAPOREON
- const JOLTEON
- const FLAREON
- const PORYGON
- const OMANYTE
- const OMASTAR
- const KABUTO
- const KABUTOPS
- const AERODACTYL
- const SNORLAX
- const ARTICUNO
- const ZAPDOS
- const MOLTRES
- const DRATINI
- const DRAGONAIR
- const DRAGONITE
- const MEWTWO
- const MEW
- const CHIKORITA
- const BAYLEEF
- const MEGANIUM
- const CYNDAQUIL
- const QUILAVA
- const TYPHLOSION
- const TOTODILE
- const CROCONAW
- const FERALIGATR
- const SENTRET
- const FURRET
- const HOOTHOOT
- const NOCTOWL
- const LEDYBA
- const LEDIAN
- const SPINARAK
- const ARIADOS
- const CROBAT
- const CHINCHOU
- const LANTURN
- const PICHU
- const CLEFFA
- const IGGLYBUFF
- const TOGEPI
- const TOGETIC
- const NATU
- const XATU
- const MAREEP
- const FLAAFFY
- const AMPHAROS
- const BELLOSSOM
- const MARILL
- const AZUMARILL
- const SUDOWOODO
- const POLITOED
- const HOPPIP
- const SKIPLOOM
- const JUMPLUFF
- const AIPOM
- const SUNKERN
- const SUNFLORA
- const YANMA
- const WOOPER
- const QUAGSIRE
- const ESPEON
- const UMBREON
- const MURKROW
- const SLOWKING
- const MISDREAVUS
- const UNOWN
- const WOBBUFFET
- const GIRAFARIG
- const PINECO
- const FORRETRESS
- const DUNSPARCE
- const GLIGAR
- const STEELIX
- const SNUBBULL
- const GRANBULL
- const QWILFISH
- const SCIZOR
- const SHUCKLE
- const HERACROSS
- const SNEASEL
- const TEDDIURSA
- const URSARING
- const SLUGMA
- const MAGCARGO
- const SWINUB
- const PILOSWINE
- const CORSOLA
- const REMORAID
- const OCTILLERY
- const DELIBIRD
- const MANTINE
- const SKARMORY
- const HOUNDOUR
- const HOUNDOOM
- const KINGDRA
- const PHANPY
- const DONPHAN
- const PORYGON2
- const STANTLER
- const SMEARGLE
- const TYROGUE
- const HITMONTOP
- const SMOOCHUM
- const ELEKID
- const MAGBY
- const MILTANK
- const BLISSEY
- const RAIKOU
- const ENTEI
- const SUICUNE
- const LARVITAR
- const PUPITAR
- const TYRANITAR
- const LUGIA
- const HO_OH
- const CELEBI
-
-const_value SET const_value + -1
-
-NUM_POKEMON EQU const_value
-
-EGG EQU 253
-
-; pokemon structure in RAM
-MON_SPECIES EQUS "(PartyMon1Species - PartyMon1)"
-MON_ITEM EQUS "(PartyMon1Item - PartyMon1)"
-MON_MOVES EQUS "(PartyMon1Moves - PartyMon1)"
-MON_ID EQUS "(PartyMon1ID - PartyMon1)"
-MON_EXP EQUS "(PartyMon1Exp - PartyMon1)"
-MON_STAT_EXP EQUS "(PartyMon1StatExp - PartyMon1)"
-MON_HP_EXP EQUS "(PartyMon1HPExp - PartyMon1)"
-MON_ATK_EXP EQUS "(PartyMon1AtkExp - PartyMon1)"
-MON_DEF_EXP EQUS "(PartyMon1DefExp - PartyMon1)"
-MON_SPD_EXP EQUS "(PartyMon1SpdExp - PartyMon1)"
-MON_SPC_EXP EQUS "(PartyMon1SpcExp - PartyMon1)"
-MON_DVS EQUS "(PartyMon1DVs - PartyMon1)"
-MON_PP EQUS "(PartyMon1PP - PartyMon1)"
-MON_HAPPINESS EQUS "(PartyMon1Happiness - PartyMon1)"
-MON_PKRUS EQUS "(PartyMon1PokerusStatus - PartyMon1)"
-MON_CAUGHTDATA EQUS "(PartyMon1CaughtData - PartyMon1)"
-MON_CAUGHTLEVEL EQUS "(PartyMon1CaughtLevel - PartyMon1)"
-MON_CAUGHTTIME EQUS "(PartyMon1CaughtTime - PartyMon1)"
-MON_CAUGHTGENDER EQUS "(PartyMon1CaughtGender - PartyMon1)"
-MON_CAUGHTLOCATION EQUS "(PartyMon1CaughtLocation - PartyMon1)"
-MON_LEVEL EQUS "(PartyMon1Level - PartyMon1)"
-MON_STATUS EQUS "(PartyMon1Status - PartyMon1)"
-MON_HP EQUS "(PartyMon1HP - PartyMon1)"
-MON_MAXHP EQUS "(PartyMon1MaxHP - PartyMon1)"
-MON_ATK EQUS "(PartyMon1Attack - PartyMon1)"
-MON_DEF EQUS "(PartyMon1Defense - PartyMon1)"
-MON_SPD EQUS "(PartyMon1Speed - PartyMon1)"
-MON_SAT EQUS "(PartyMon1SpclAtk - PartyMon1)"
-MON_SDF EQUS "(PartyMon1SpclDef - PartyMon1)"
-BOXMON_STRUCT_LENGTH EQUS "(PartyMon1End - PartyMon1)"
-PARTYMON_STRUCT_LENGTH EQUS "(PartyMon1StatsEnd - PartyMon1)"
-REDMON_STRUCT_LENGTH EQU 44
-
-const_value SET 1
- const MONMENU_CUT ; 1
- const MONMENU_FLY ; 2
- const MONMENU_SURF ; 3
- const MONMENU_STRENGTH ; 4
- const MONMENU_WATERFALL ; 5
- const MONMENU_FLASH ; 6
- const MONMENU_WHIRLPOOL ; 7
- const MONMENU_DIG ; 8
- const MONMENU_TELEPORT ; 9
- const MONMENU_SOFTBOILED ; 10
- const MONMENU_HEADBUTT ; 11
- const MONMENU_ROCKSMASH ; 12
- const MONMENU_MILKDRINK ; 13
- const MONMENU_SWEETSCENT ; 14
-
- const MONMENU_STATS ; 15
- const MONMENU_SWITCH ; 16
- const MONMENU_ITEM ; 17
- const MONMENU_CANCEL ; 18
- const MONMENU_MOVE ; 19
- const MONMENU_MAIL ; 20
- const MONMENU_ERROR ; 21
+ const BULBASAUR ; 01
+ const IVYSAUR ; 02
+ const VENUSAUR ; 03
+ const CHARMANDER ; 04
+ const CHARMELEON ; 05
+ const CHARIZARD ; 06
+ const SQUIRTLE ; 07
+ const WARTORTLE ; 08
+ const BLASTOISE ; 09
+ const CATERPIE ; 0a
+ const METAPOD ; 0b
+ const BUTTERFREE ; 0c
+ const WEEDLE ; 0d
+ const KAKUNA ; 0e
+ const BEEDRILL ; 0f
+ const PIDGEY ; 10
+ const PIDGEOTTO ; 11
+ const PIDGEOT ; 12
+ const RATTATA ; 13
+ const RATICATE ; 14
+ const SPEAROW ; 15
+ const FEAROW ; 16
+ const EKANS ; 17
+ const ARBOK ; 18
+ const PIKACHU ; 19
+ const RAICHU ; 1a
+ const SANDSHREW ; 1b
+ const SANDSLASH ; 1c
+ const NIDORAN_F ; 1d
+ const NIDORINA ; 1e
+ const NIDOQUEEN ; 1f
+ const NIDORAN_M ; 20
+ const NIDORINO ; 21
+ const NIDOKING ; 22
+ const CLEFAIRY ; 23
+ const CLEFABLE ; 24
+ const VULPIX ; 25
+ const NINETALES ; 26
+ const JIGGLYPUFF ; 27
+ const WIGGLYTUFF ; 28
+ const ZUBAT ; 29
+ const GOLBAT ; 2a
+ const ODDISH ; 2b
+ const GLOOM ; 2c
+ const VILEPLUME ; 2d
+ const PARAS ; 2e
+ const PARASECT ; 2f
+ const VENONAT ; 30
+ const VENOMOTH ; 31
+ const DIGLETT ; 32
+ const DUGTRIO ; 33
+ const MEOWTH ; 34
+ const PERSIAN ; 35
+ const PSYDUCK ; 36
+ const GOLDUCK ; 37
+ const MANKEY ; 38
+ const PRIMEAPE ; 39
+ const GROWLITHE ; 3a
+ const ARCANINE ; 3b
+ const POLIWAG ; 3c
+ const POLIWHIRL ; 3d
+ const POLIWRATH ; 3e
+ const ABRA ; 3f
+ const KADABRA ; 40
+ const ALAKAZAM ; 41
+ const MACHOP ; 42
+ const MACHOKE ; 43
+ const MACHAMP ; 44
+ const BELLSPROUT ; 45
+ const WEEPINBELL ; 46
+ const VICTREEBEL ; 47
+ const TENTACOOL ; 48
+ const TENTACRUEL ; 49
+ const GEODUDE ; 4a
+ const GRAVELER ; 4b
+ const GOLEM ; 4c
+ const PONYTA ; 4d
+ const RAPIDASH ; 4e
+ const SLOWPOKE ; 4f
+ const SLOWBRO ; 50
+ const MAGNEMITE ; 51
+ const MAGNETON ; 52
+ const FARFETCH_D ; 53
+ const DODUO ; 54
+ const DODRIO ; 55
+ const SEEL ; 56
+ const DEWGONG ; 57
+ const GRIMER ; 58
+ const MUK ; 59
+ const SHELLDER ; 5a
+ const CLOYSTER ; 5b
+ const GASTLY ; 5c
+ const HAUNTER ; 5d
+ const GENGAR ; 5e
+ const ONIX ; 5f
+ const DROWZEE ; 60
+ const HYPNO ; 61
+ const KRABBY ; 62
+ const KINGLER ; 63
+ const VOLTORB ; 64
+ const ELECTRODE ; 65
+ const EXEGGCUTE ; 66
+ const EXEGGUTOR ; 67
+ const CUBONE ; 68
+ const MAROWAK ; 69
+ const HITMONLEE ; 6a
+ const HITMONCHAN ; 6b
+ const LICKITUNG ; 6c
+ const KOFFING ; 6d
+ const WEEZING ; 6e
+ const RHYHORN ; 6f
+ const RHYDON ; 70
+ const CHANSEY ; 71
+ const TANGELA ; 72
+ const KANGASKHAN ; 73
+ const HORSEA ; 74
+ const SEADRA ; 75
+ const GOLDEEN ; 76
+ const SEAKING ; 77
+ const STARYU ; 78
+ const STARMIE ; 79
+ const MR__MIME ; 7a
+ const SCYTHER ; 7b
+ const JYNX ; 7c
+ const ELECTABUZZ ; 7d
+ const MAGMAR ; 7e
+ const PINSIR ; 7f
+ const TAUROS ; 80
+ const MAGIKARP ; 81
+ const GYARADOS ; 82
+ const LAPRAS ; 83
+ const DITTO ; 84
+ const EEVEE ; 85
+ const VAPOREON ; 86
+ const JOLTEON ; 87
+ const FLAREON ; 88
+ const PORYGON ; 89
+ const OMANYTE ; 8a
+ const OMASTAR ; 8b
+ const KABUTO ; 8c
+ const KABUTOPS ; 8d
+ const AERODACTYL ; 8e
+ const SNORLAX ; 8f
+ const ARTICUNO ; 90
+ const ZAPDOS ; 91
+ const MOLTRES ; 92
+ const DRATINI ; 93
+ const DRAGONAIR ; 94
+ const DRAGONITE ; 95
+ const MEWTWO ; 96
+ const MEW ; 97
+ const CHIKORITA ; 98
+ const BAYLEEF ; 99
+ const MEGANIUM ; 9a
+ const CYNDAQUIL ; 9b
+ const QUILAVA ; 9c
+ const TYPHLOSION ; 9d
+ const TOTODILE ; 9e
+ const CROCONAW ; 9f
+ const FERALIGATR ; a0
+ const SENTRET ; a1
+ const FURRET ; a2
+ const HOOTHOOT ; a3
+ const NOCTOWL ; a4
+ const LEDYBA ; a5
+ const LEDIAN ; a6
+ const SPINARAK ; a7
+ const ARIADOS ; a8
+ const CROBAT ; a9
+ const CHINCHOU ; aa
+ const LANTURN ; ab
+ const PICHU ; ac
+ const CLEFFA ; ad
+ const IGGLYBUFF ; ae
+ const TOGEPI ; af
+ const TOGETIC ; b0
+ const NATU ; b1
+ const XATU ; b2
+ const MAREEP ; b3
+ const FLAAFFY ; b4
+ const AMPHAROS ; b5
+ const BELLOSSOM ; b6
+ const MARILL ; b7
+ const AZUMARILL ; b8
+ const SUDOWOODO ; b9
+ const POLITOED ; ba
+ const HOPPIP ; bb
+ const SKIPLOOM ; bc
+ const JUMPLUFF ; bd
+ const AIPOM ; be
+ const SUNKERN ; bf
+ const SUNFLORA ; c0
+ const YANMA ; c1
+ const WOOPER ; c2
+ const QUAGSIRE ; c3
+ const ESPEON ; c4
+ const UMBREON ; c5
+ const MURKROW ; c6
+ const SLOWKING ; c7
+ const MISDREAVUS ; c8
+ const UNOWN ; c9
+ const WOBBUFFET ; ca
+ const GIRAFARIG ; cb
+ const PINECO ; cc
+ const FORRETRESS ; cd
+ const DUNSPARCE ; ce
+ const GLIGAR ; cf
+ const STEELIX ; d0
+ const SNUBBULL ; d1
+ const GRANBULL ; d2
+ const QWILFISH ; d3
+ const SCIZOR ; d4
+ const SHUCKLE ; d5
+ const HERACROSS ; d6
+ const SNEASEL ; d7
+ const TEDDIURSA ; d8
+ const URSARING ; d9
+ const SLUGMA ; da
+ const MAGCARGO ; db
+ const SWINUB ; dc
+ const PILOSWINE ; dd
+ const CORSOLA ; de
+ const REMORAID ; df
+ const OCTILLERY ; e0
+ const DELIBIRD ; e1
+ const MANTINE ; e2
+ const SKARMORY ; e3
+ const HOUNDOUR ; e4
+ const HOUNDOOM ; e5
+ const KINGDRA ; e6
+ const PHANPY ; e7
+ const DONPHAN ; e8
+ const PORYGON2 ; e9
+ const STANTLER ; ea
+ const SMEARGLE ; eb
+ const TYROGUE ; ec
+ const HITMONTOP ; ed
+ const SMOOCHUM ; ee
+ const ELEKID ; ef
+ const MAGBY ; f0
+ const MILTANK ; f1
+ const BLISSEY ; f2
+ const RAIKOU ; f3
+ const ENTEI ; f4
+ const SUICUNE ; f5
+ const LARVITAR ; f6
+ const PUPITAR ; f7
+ const TYRANITAR ; f8
+ const LUGIA ; f9
+ const HO_OH ; fa
+ const CELEBI ; fb
+NUM_POKEMON EQU const_value +- 1
+ const MON_FC ; fc
+ const EGG ; fd
+ const MON_FE ; fe
-MONMENU_FIELD_MOVE EQU 0
-MONMENU_MENUOPTION EQU 1
+; number of Unown forms
+NUM_UNOWN EQU 26
diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm
index 9a34e2ae5..4093adfa9 100644
--- a/constants/pokemon_data_constants.asm
+++ b/constants/pokemon_data_constants.asm
@@ -1,4 +1,41 @@
-; growth rate
+; base data struct members (see data/pokemon/base_stats/*.asm)
+BASE_DEX_NO EQUS "(BaseDexNo - CurBaseData)"
+BASE_STATS EQUS "(BaseStats - CurBaseData)"
+BASE_HP EQUS "(BaseHP - CurBaseData)"
+BASE_ATK EQUS "(BaseAttack - CurBaseData)"
+BASE_SPD EQUS "(BaseSpeed - CurBaseData)"
+BASE_SAT EQUS "(BaseSpecialAttack - CurBaseData)"
+BASE_SDF EQUS "(BaseSpecialDefense - CurBaseData)"
+BASE_TYPES EQUS "(BaseType - CurBaseData)"
+BASE_TYPE_1 EQUS "(BaseType1 - CurBaseData)"
+BASE_TYPE_2 EQUS "(BaseType2 - CurBaseData)"
+BASE_CATCH_RATE EQUS "(BaseCatchRate - CurBaseData)"
+BASE_EXP EQUS "(BaseExp - CurBaseData)"
+BASE_ITEMS EQUS "(BaseItems - CurBaseData)"
+BASE_ITEM_1 EQUS "(BaseItem1 - CurBaseData)"
+BASE_ITEM_2 EQUS "(BaseItem2 - CurBaseData)"
+BASE_GENDER EQUS "(BaseGender - CurBaseData)"
+BASE_UNKNOWN_1 EQUS "(BaseUnknown1 - CurBaseData)"
+BASE_EGG_STEPS EQUS "(BaseEggSteps - CurBaseData)"
+BASE_UNKNOWN_2 EQUS "(BaseUnknown2 - CurBaseData)"
+BASE_PIC_SIZE EQUS "(BasePicSize - CurBaseData)"
+BASE_PADDING EQUS "(BasePadding - CurBaseData)"
+BASE_GROWTH_RATE EQUS "(BaseGrowthRate - CurBaseData)"
+BASE_EGG_GROUPS EQUS "(BaseEggGroups - CurBaseData)"
+BASE_TMHM EQUS "(BaseTMHM - CurBaseData)"
+BASE_DATA_SIZE EQUS "(CurBaseDataEnd - CurBaseData)"
+
+; gender ratio constants
+GENDER_F0 EQU 0 percent
+GENDER_F12_5 EQU 31 ; 12.5 percent
+GENDER_F25 EQU 25 percent
+GENDER_F50 EQU 50 percent
+GENDER_F75 EQU 75 percent
+GENDER_F100 EQU 254 ; 100 percent
+GENDERLESS EQU 255
+
+; BaseGrowthRate values
+; GrowthRates indexes (see data/growth_rates.asm)
const_def
const MEDIUM_FAST
const SLIGHTLY_FAST
@@ -7,7 +44,7 @@
const FAST
const SLOW
-; egg group constants
+; BaseEggGroups values
const_value SET 1
const MONSTER ; 1
const AMPHIBIAN ; 2
@@ -26,8 +63,48 @@ const_value SET 1
const NO_EGGS ; f
-; menu sprites
-const_value SET 1
+; party_struct members (see macros/wram.asm)
+MON_SPECIES EQUS "(PartyMon1Species - PartyMon1)"
+MON_ITEM EQUS "(PartyMon1Item - PartyMon1)"
+MON_MOVES EQUS "(PartyMon1Moves - PartyMon1)"
+MON_ID EQUS "(PartyMon1ID - PartyMon1)"
+MON_EXP EQUS "(PartyMon1Exp - PartyMon1)"
+MON_STAT_EXP EQUS "(PartyMon1StatExp - PartyMon1)"
+MON_HP_EXP EQUS "(PartyMon1HPExp - PartyMon1)"
+MON_ATK_EXP EQUS "(PartyMon1AtkExp - PartyMon1)"
+MON_DEF_EXP EQUS "(PartyMon1DefExp - PartyMon1)"
+MON_SPD_EXP EQUS "(PartyMon1SpdExp - PartyMon1)"
+MON_SPC_EXP EQUS "(PartyMon1SpcExp - PartyMon1)"
+MON_DVS EQUS "(PartyMon1DVs - PartyMon1)"
+MON_PP EQUS "(PartyMon1PP - PartyMon1)"
+MON_HAPPINESS EQUS "(PartyMon1Happiness - PartyMon1)"
+MON_PKRUS EQUS "(PartyMon1PokerusStatus - PartyMon1)"
+MON_CAUGHTDATA EQUS "(PartyMon1CaughtData - PartyMon1)"
+MON_CAUGHTLEVEL EQUS "(PartyMon1CaughtLevel - PartyMon1)"
+MON_CAUGHTTIME EQUS "(PartyMon1CaughtTime - PartyMon1)"
+MON_CAUGHTGENDER EQUS "(PartyMon1CaughtGender - PartyMon1)"
+MON_CAUGHTLOCATION EQUS "(PartyMon1CaughtLocation - PartyMon1)"
+MON_LEVEL EQUS "(PartyMon1Level - PartyMon1)"
+MON_STATUS EQUS "(PartyMon1Status - PartyMon1)"
+MON_HP EQUS "(PartyMon1HP - PartyMon1)"
+MON_MAXHP EQUS "(PartyMon1MaxHP - PartyMon1)"
+MON_ATK EQUS "(PartyMon1Attack - PartyMon1)"
+MON_DEF EQUS "(PartyMon1Defense - PartyMon1)"
+MON_SPD EQUS "(PartyMon1Speed - PartyMon1)"
+MON_SAT EQUS "(PartyMon1SpclAtk - PartyMon1)"
+MON_SDF EQUS "(PartyMon1SpclDef - PartyMon1)"
+BOXMON_STRUCT_LENGTH EQUS "(PartyMon1End - PartyMon1)"
+PARTYMON_STRUCT_LENGTH EQUS "(PartyMon1StatsEnd - PartyMon1)"
+REDMON_STRUCT_LENGTH EQU 44
+
+
+; maximum number of party pokemon
+PARTY_LENGTH EQU 6
+
+
+; IconPointers indexes (see gfx/icon_pointers.asm)
+ const_def
+ const ICON_NULL
const ICON_POLIWAG
const ICON_JIGGLYPUFF
const ICON_DIGLETT
@@ -68,7 +145,7 @@ const_value SET 1
const ICON_BIGMON
-; evolution types
+; evolution types (used in data/pokemon/evos_attacks.asm)
const_value SET 1
const EVOLVE_LEVEL
const EVOLVE_ITEM
@@ -76,26 +153,73 @@ const_value SET 1
const EVOLVE_HAPPINESS
const EVOLVE_STAT
-
-BASE_HAPPINESS EQU 70
-FRIEND_BALL_HAPPINESS EQU 200
-
-; happiness evolution triggers
-HAPPINESS_TO_EVOLVE EQU 220
+; EVOLVE_HAPPINESS triggers
const_value SET 1
const TR_ANYTIME
const TR_MORNDAY
const TR_NITE
-
-; stat evolution triggers
+; EVOLVE_STAT triggers
const_value SET 1
const ATK_GT_DEF
const ATK_LT_DEF
const ATK_EQ_DEF
-NUM_GRASSMON EQU 7
-NUM_WATERMON EQU 3
+
+; significant happiness values
+BASE_HAPPINESS EQU 70
+FRIEND_BALL_HAPPINESS EQU 200
+HAPPINESS_TO_EVOLVE EQU 220
+HAPPINESS_THRESHOLD_1 EQU 100
+HAPPINESS_THRESHOLD_2 EQU 200
+
+
+; wild data
+
+NUM_GRASSMON EQU 7 ; data/wild/*_grass.asm table size
+NUM_WATERMON EQU 3 ; data/wild/*_water.asm table size
GRASS_WILDDATA_LENGTH EQU (NUM_GRASSMON * 2 + 1) * 3 + 2
WATER_WILDDATA_LENGTH EQU (NUM_WATERMON * 2 + 1) * 1 + 2
+
+
+; swarms
+
+SWARM_DUNSPARCE EQU 0
+SWARM_YANMA EQU 1
+
+FISHSWARM_QWILFISH EQU 1
+FISHSWARM_REMORAID EQU 2
+
+
+; MonMenuOptions indexes (see engine/mon_menu.asm)
+const_value SET 1
+; moves
+ const MONMENU_CUT ; 1
+ const MONMENU_FLY ; 2
+ const MONMENU_SURF ; 3
+ const MONMENU_STRENGTH ; 4
+ const MONMENU_WATERFALL ; 5
+ const MONMENU_FLASH ; 6
+ const MONMENU_WHIRLPOOL ; 7
+ const MONMENU_DIG ; 8
+ const MONMENU_TELEPORT ; 9
+ const MONMENU_SOFTBOILED ; 10
+ const MONMENU_HEADBUTT ; 11
+ const MONMENU_ROCKSMASH ; 12
+ const MONMENU_MILKDRINK ; 13
+ const MONMENU_SWEETSCENT ; 14
+; options
+ const MONMENU_STATS ; 15
+ const MONMENU_SWITCH ; 16
+ const MONMENU_ITEM ; 17
+ const MONMENU_CANCEL ; 18
+ const MONMENU_MOVE ; 19
+ const MONMENU_MAIL ; 20
+ const MONMENU_ERROR ; 21
+
+; MonMenuOptions types
+MONMENU_FIELD_MOVE EQU 0
+MONMENU_MENUOPTION EQU 1
+
+NUM_MONMENU_ITEMS EQU 8
diff --git a/constants/printer_constants.asm b/constants/printer_constants.asm
index 5cd8fcd77..3cbaa049a 100755
--- a/constants/printer_constants.asm
+++ b/constants/printer_constants.asm
@@ -1,5 +1,5 @@
+; wPrinterStatus
const_value SET 1
-
const PRINTER_STATUS_CHECKING
const PRINTER_STATUS_TRANSMITTING
const PRINTER_STATUS_PRINTING
diff --git a/constants/radio_constants.asm b/constants/radio_constants.asm
index 14bc75a41..86817081e 100644
--- a/constants/radio_constants.asm
+++ b/constants/radio_constants.asm
@@ -1,3 +1,4 @@
+; PlayRadioShow arguments, RadioJumptable indexes (see engine/radio.asm)
const_def
const OAKS_POKEMON_TALK ; $00
const POKEDEX_SHOW ; $01
@@ -88,6 +89,7 @@
const POKEDEX_SHOW_7 ; $56
const POKEDEX_SHOW_8 ; $57
+; PlayRadio arguments (see engine/pokegear.asm)
const_def
const MAPRADIO_POKEMON_CHANNEL
const MAPRADIO_OAKS_MON_TALK
@@ -99,12 +101,7 @@
const MAPRADIO_LETS_ALL_SING
const MAPRADIO_ROCKET
- const_def
- const BUENA_MON
- const BUENA_ITEM
- const BUENA_MOVE
- const BUENA_STRING
-
+; PasswordTable indexes (see engine/radio.asm)
const_def
const BUENA_STARTERS
const BUENA_DRINKS
@@ -119,3 +116,10 @@
const BUENA_STATIONS
NUM_PASSWORD_CATEGORIES EQU const_value
NUM_PASSWORDS_PER_CATEGORY EQU 3
+
+; PasswordTable string types (see engine/radio.asm)
+ const_def
+ const BUENA_MON
+ const BUENA_ITEM
+ const BUENA_MOVE
+ const BUENA_STRING
diff --git a/constants/script_constants.asm b/constants/script_constants.asm
index b695c4ee9..9dd4987f8 100644
--- a/constants/script_constants.asm
+++ b/constants/script_constants.asm
@@ -2,6 +2,7 @@
PLAYER EQU 0
LAST_TALKED EQU -2
+; GetVarAction arguments (see engine/variables.asm)
const_def
const VAR_STRINGBUFFER2 ; 00
const VAR_PARTYCOUNT ; 01
@@ -32,10 +33,12 @@ LAST_TALKED EQU -2
const VAR_KENJI_BREAK ; 1a
NUM_VARS EQU const_value ; 1b
+; variable action types
RETVAR_STRBUF2 EQU (0 << 6)
RETVAR_ADDR_DE EQU (1 << 6)
RETVAR_EXECUTE EQU (2 << 6)
+; PlayerEventScriptPointers indexes (see engine/events.asm)
const_value SET -1
const PLAYEREVENT_MAPSCRIPT
const PLAYEREVENT_NONE
diff --git a/constants/serial_constants.asm b/constants/serial_constants.asm
new file mode 100644
index 000000000..e7b4c4b2c
--- /dev/null
+++ b/constants/serial_constants.asm
@@ -0,0 +1,12 @@
+; link types
+ const_def
+ const LINK_NULL ; 0
+ const LINK_TIMECAPSULE ; 1
+ const LINK_TRADECENTER ; 2
+ const LINK_COLOSSEUM ; 3
+ const LINK_MOBILE ; 4
+
+
+SERIAL_TIMECAPSULE EQU $60
+SERIAL_TRADECENTER EQU $70
+SERIAL_BATTLE EQU $80
diff --git a/constants/sfx_constants.asm b/constants/sfx_constants.asm
index 65abfc3ca..0dee70793 100644
--- a/constants/sfx_constants.asm
+++ b/constants/sfx_constants.asm
@@ -1,3 +1,4 @@
+; SFX indexes (see audio/sfx_pointers.asm)
const_def
const SFX_DEX_FANFARE_50_79 ; 00
@@ -149,8 +150,8 @@
const SFX_FANFARE_2 ; 92
const SFX_REGISTER_PHONE_NUMBER ; 93
const SFX_3RD_PLACE ; 94
- const SFX_GET_EGG_FROM_DAYCARE_MAN ; 95
- const SFX_GET_EGG_FROM_DAYCARE_LADY ; 96
+ const SFX_GET_EGG_FROM_DAY_CARE_MAN ; 95
+ const SFX_GET_EGG_FROM_DAY_CARE_LADY ; 96
const SFX_MOVE_DELETED ; 97
const SFX_2ND_PLACE ; 98
const SFX_1ST_PLACE ; 99
@@ -191,6 +192,7 @@
const SFX_GLASS_TING ; bc
const SFX_GLASS_TING_2 ; bd
+; new to Crystal
const SFX_INTRO_UNOWN_1 ; be
const SFX_INTRO_UNOWN_2 ; bf
const SFX_INTRO_UNOWN_3 ; c0
diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm
index f9cc7ec77..b008ac6c2 100644
--- a/constants/sprite_constants.asm
+++ b/constants/sprite_constants.asm
@@ -1,5 +1,5 @@
-
-; sprites
+; sprite ids
+; SpriteHeaders indexes (see gfx/sprite_headers.asm)
const_def
const SPRITE_NONE ; 00
const SPRITE_CHRIS ; 01
@@ -105,8 +105,8 @@
const SPRITE_RAIKOU ; 65
const SPRITE_STANDING_YOUNGSTER ; 66
+; SpriteMons indexes (see data/sprite_mons.asm)
const_value SET $80
-
SPRITE_POKEMON EQU const_value
const SPRITE_UNOWN ; 80
const SPRITE_GEODUDE ; 81
@@ -144,10 +144,12 @@ SPRITE_POKEMON EQU const_value
const SPRITE_LUGIA ; a1
const SPRITE_HO_OH ; a2
+; special GetMonSprite values (see engine/overworld.asm)
const_value SET $e0
- const SPRITE_DAYCARE_MON_1 ; e0
- const SPRITE_DAYCARE_MON_2 ; e1
+ const SPRITE_DAY_CARE_MON_1 ; e0
+ const SPRITE_DAY_CARE_MON_2 ; e1
+; VariableSprites indexes (see wram.asm)
const_value SET $f0
SPRITE_VARS EQU const_value
const SPRITE_CONSOLE ; f0
@@ -163,499 +165,3 @@ SPRITE_VARS EQU const_value
const SPRITE_FUCHSIA_GYM_4 ; fa
const SPRITE_COPYCAT ; fb
const SPRITE_JANINE_IMPERSONATOR ; fc
-
-; sprite types
-const_value SET 1
- const WALKING_SPRITE
- const STANDING_SPRITE
- const STILL_SPRITE
-
-; sprite header fields
- const_def
- const SPRITEHEADER_ADDR_LO
- const SPRITEHEADER_ADDR_HI
- const SPRITEHEADER_SIZE
- const SPRITEHEADER_BANK
- const SPRITEHEADER_TYPE
- const SPRITEHEADER_PALETTE
-NUM_SPRITEHEADER_FIELDS EQU const_value
-
-; sprite palettes
- const_def
- const PAL_OW_RED
- const PAL_OW_BLUE
- const PAL_OW_GREEN
- const PAL_OW_BROWN
- const PAL_OW_PINK
- const PAL_OW_SILVER
- const PAL_OW_TREE
- const PAL_OW_ROCK
-
-; sprite movement data table indices
- const_def
- const SPRITEMOVEDATA_00 ; 00
- const SPRITEMOVEDATA_ITEM_TREE ; 01
- const SPRITEMOVEDATA_WANDER ; 02
- const SPRITEMOVEDATA_SPINRANDOM_SLOW ; 03
- const SPRITEMOVEDATA_WALK_UP_DOWN ; 04
- const SPRITEMOVEDATA_WALK_LEFT_RIGHT ; 05
- const SPRITEMOVEDATA_STANDING_DOWN ; 06
- const SPRITEMOVEDATA_STANDING_UP ; 07
- const SPRITEMOVEDATA_STANDING_LEFT ; 08
- const SPRITEMOVEDATA_STANDING_RIGHT ; 09
- const SPRITEMOVEDATA_SPINRANDOM_FAST ; 0a
- const SPRITEMOVEDATA_PLAYER ; 0b
- const SPRITEMOVEDATA_0C ; 0c
- const SPRITEMOVEDATA_0D ; 0d
- const SPRITEMOVEDATA_0E ; 0e
- const SPRITEMOVEDATA_0F ; 0f
- const SPRITEMOVEDATA_10 ; 10
- const SPRITEMOVEDATA_11 ; 11
- const SPRITEMOVEDATA_12 ; 12
- const SPRITEMOVEDATA_FOLLOWING ; 13
- const SPRITEMOVEDATA_SCRIPTED ; 14
- const SPRITEMOVEDATA_SNORLAX ; 15
- const SPRITEMOVEDATA_POKEMON ; 16
- const SPRITEMOVEDATA_SUDOWOODO ; 17
- const SPRITEMOVEDATA_SMASHABLE_ROCK ; 18
- const SPRITEMOVEDATA_STRENGTH_BOULDER ; 19
- const SPRITEMOVEDATA_FOLLOWNOTEXACT ; 1a
- const SPRITEMOVEDATA_SHADOW ; 1b
- const SPRITEMOVEDATA_EMOTE ; 1c
- const SPRITEMOVEDATA_SCREENSHAKE ; 1d
- const SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE ; 1e
- const SPRITEMOVEDATA_SPINCLOCKWISE ; 1f
- const SPRITEMOVEDATA_20 ; 20
- const SPRITEMOVEDATA_BIGDOLL ; 21
- const SPRITEMOVEDATA_BOULDERDUST ; 22
- const SPRITEMOVEDATA_GRASS ; 23
- const SPRITEMOVEDATA_LAPRAS ; 24
-NUM_SPRITEMOVEDATA EQU const_value
-SPRITEMOVEDATA_FIELDS EQU 6
-
-; sprite movement functions
- const_def
- const SPRITEMOVEFN_00
- const SPRITEMOVEFN_RANDOM_WALK_Y
- const SPRITEMOVEFN_RANDOM_WALK_X
- const SPRITEMOVEFN_RANDOM_WALK_XY
- const SPRITEMOVEFN_SLOW_RANDOM_SPIN
- const SPRITEMOVEFN_FAST_RANDOM_SPIN
- const SPRITEMOVEFN_STANDING
- const SPRITEMOVEFN_OBEY_DPAD
- const SPRITEMOVEFN_08
- const SPRITEMOVEFN_09
- const SPRITEMOVEFN_0A
- const SPRITEMOVEFN_0B
- const SPRITEMOVEFN_0C
- const SPRITEMOVEFN_0D
- const SPRITEMOVEFN_0E
- const SPRITEMOVEFN_FOLLOW
- const SPRITEMOVEFN_SCRIPTED
- const SPRITEMOVEFN_STRENGTH
- const SPRITEMOVEFN_FOLLOWNOTEXACT
- const SPRITEMOVEFN_SHADOW
- const SPRITEMOVEFN_EMOTE
- const SPRITEMOVEFN_BIG_SNORLAX
- const SPRITEMOVEFN_BOUNCE
- const SPRITEMOVEFN_SCREENSHAKE
- const SPRITEMOVEFN_SPIN_CLOCKWISE
- const SPRITEMOVEFN_SPIN_COUNTERCLOCKWISE
- const SPRITEMOVEFN_BOULDERDUST
- const SPRITEMOVEFN_GRASS
-
-MAX_OUTDOOR_SPRITES EQU 23
-
- const_def
- const STEP_TYPE_00
- const STEP_TYPE_SLEEP
- const STEP_TYPE_NPC_WALK
- const STEP_TYPE_03
- const STEP_TYPE_04
- const STEP_TYPE_05
- const STEP_TYPE_PLAYER_WALK
- const STEP_TYPE_07
- const STEP_TYPE_NPC_JUMP
- const STEP_TYPE_PLAYER_JUMP
- const STEP_TYPE_HALF_STEP
- const STEP_TYPE_BUMP
- const STEP_TYPE_TELEPORT_FROM
- const STEP_TYPE_TELEPORT_TO
- const STEP_TYPE_SKYFALL
- const STEP_TYPE_0F
- const STEP_TYPE_GOT_BITE
- const STEP_TYPE_ROCK_SMASH
- const STEP_TYPE_RETURN_DIG
- const STEP_TYPE_TRACKING_OBJECT
- const STEP_TYPE_14
- const STEP_TYPE_15
- const STEP_TYPE_16
- const STEP_TYPE_17
- const STEP_TYPE_18
- const STEP_TYPE_SKYFALL_TOP
-
- const_def
- const PERSON_ACTION_00
- const PERSON_ACTION_STAND
- const PERSON_ACTION_STEP
- const PERSON_ACTION_BUMP
- const PERSON_ACTION_SPIN
- const PERSON_ACTION_SPIN_FLICKER
- const PERSON_ACTION_FISHING
- const PERSON_ACTION_SHADOW
- const PERSON_ACTION_EMOTE
- const PERSON_ACTION_BIG_SNORLAX
- const PERSON_ACTION_BOUNCE
- const PERSON_ACTION_WEIRD_TREE
- const PERSON_ACTION_BIG_LAPRAS
- const PERSON_ACTION_BIG_DOLL
- const PERSON_ACTION_BOULDER_DUST
- const PERSON_ACTION_GRASS_SHAKE
- const PERSON_ACTION_SKYFALL
-
- const_def
- const FACING_STEP_DOWN_0
- const FACING_STEP_DOWN_1
- const FACING_STEP_DOWN_2
- const FACING_STEP_DOWN_3
- const FACING_STEP_UP_0
- const FACING_STEP_UP_1
- const FACING_STEP_UP_2
- const FACING_STEP_UP_3
- const FACING_STEP_LEFT_0
- const FACING_STEP_LEFT_1
- const FACING_STEP_LEFT_2
- const FACING_STEP_LEFT_3
- const FACING_STEP_RIGHT_0
- const FACING_STEP_RIGHT_1
- const FACING_STEP_RIGHT_2
- const FACING_STEP_RIGHT_3
- const FACING_FISH_DOWN
- const FACING_FISH_UP
- const FACING_FISH_LEFT
- const FACING_FISH_RIGHT
- const FACING_EMOTE
- const FACING_SHADOW
- const FACING_BIG_DOLL_ASYM
- const FACING_BIG_DOLL_SYM
- const FACING_WEIRD_TREE_0
- const FACING_WEIRD_TREE_1
- const FACING_WEIRD_TREE_2
- const FACING_WEIRD_TREE_3
- const FACING_BOULDER_DUST_1
- const FACING_BOULDER_DUST_2
- const FACING_GRASS_1
- const FACING_GRASS_2
-
- const_def
- const SPRITEANIMSTRUCT_INDEX ; 0
- const SPRITEANIMSTRUCT_FRAMESET_ID ; 1
- const SPRITEANIMSTRUCT_ANIM_SEQ_ID ; 2
- const SPRITEANIMSTRUCT_TILE_ID ; 3
- const SPRITEANIMSTRUCT_XCOORD ; 4
- const SPRITEANIMSTRUCT_YCOORD ; 5
- const SPRITEANIMSTRUCT_XOFFSET ; 6
- const SPRITEANIMSTRUCT_YOFFSET ; 7
- const SPRITEANIMSTRUCT_DURATION ; 8
- const SPRITEANIMSTRUCT_DURATIONOFFSET ; 9
- const SPRITEANIMSTRUCT_FRAME ; a
- const SPRITEANIMSTRUCT_JUMPTABLE_INDEX ; b
- const SPRITEANIMSTRUCT_0C ; c
- const SPRITEANIMSTRUCT_0D ; d
- const SPRITEANIMSTRUCT_0E ; e
- const SPRITEANIMSTRUCT_0F ; f
-
- const_def
- const SPRITE_ANIM_FRAMESET_00
- const SPRITE_ANIM_FRAMESET_PARTY_MON
- const SPRITE_ANIM_FRAMESET_02 ; unused?
- const SPRITE_ANIM_FRAMESET_03 ; unused?
- const SPRITE_ANIM_FRAMESET_04 ; unused?
- const SPRITE_ANIM_FRAMESET_05 ; unused?
- const SPRITE_ANIM_FRAMESET_06 ; unused?
- const SPRITE_ANIM_FRAMESET_07
- const SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR
- const SPRITE_ANIM_FRAMESET_09 ; unused?
- const SPRITE_ANIM_FRAMESET_GAMEFREAK_LOGO
- const SPRITE_ANIM_FRAMESET_0B
- const SPRITE_ANIM_FRAMESET_0C
- const SPRITE_ANIM_FRAMESET_SLOTS_GOLEM
- const SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY
- const SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY_2
- const SPRITE_ANIM_FRAMESET_SLOTS_EGG
- const SPRITE_ANIM_FRAMESET_WALK_CYCLE
- const SPRITE_ANIM_FRAMESET_STILL_CURSOR
- const SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL
- const SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL_0
- const SPRITE_ANIM_FRAMESET_TRADE_POOF
- const SPRITE_ANIM_FRAMESET_TRADE_TUBE_BULGE
- const SPRITE_ANIM_FRAMESET_TRADEMON_ICON
- const SPRITE_ANIM_FRAMESET_TRADEMON_BUBBLE
- const SPRITE_ANIM_FRAMESET_EVOLUTION_BALL_OF_LIGHT
- const SPRITE_ANIM_FRAMESET_RADIO_TUNING_KNOB
- const SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_RED
- const SPRITE_ANIM_FRAMESET_1C ; unused?
- const SPRITE_ANIM_FRAMESET_LEAF
- const SPRITE_ANIM_FRAMESET_CUT_TREE
- const SPRITE_ANIM_FRAMESET_EGG_CRACK
- const SPRITE_ANIM_FRAMESET_EGG_HATCH
- const SPRITE_ANIM_FRAMESET_21 ; unused?
- const SPRITE_ANIM_FRAMESET_22 ; unused?
- const SPRITE_ANIM_FRAMESET_23 ; unused?
- const SPRITE_ANIM_FRAMESET_24
- const SPRITE_ANIM_FRAMESET_HEADBUTT
- const SPRITE_ANIM_FRAMESET_26
- const SPRITE_ANIM_FRAMESET_27 ; unused?
- const SPRITE_ANIM_FRAMESET_28 ; unused?
- const SPRITE_ANIM_FRAMESET_29 ; unused?
- const SPRITE_ANIM_FRAMESET_2A ; unused?
- const SPRITE_ANIM_FRAMESET_2B ; unused?
- const SPRITE_ANIM_FRAMESET_2C ; unused?
- const SPRITE_ANIM_FRAMESET_BLUE_WALK
- const SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_BLUE
- const SPRITE_ANIM_FRAMESET_2F
- const SPRITE_ANIM_FRAMESET_30
- const SPRITE_ANIM_FRAMESET_31
- const SPRITE_ANIM_FRAMESET_32
- const SPRITE_ANIM_FRAMESET_33
- const SPRITE_ANIM_FRAMESET_34
- const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE
- const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_2
- const SPRITE_ANIM_FRAMESET_INTRO_PICHU
- const SPRITE_ANIM_FRAMESET_INTRO_WOOPER
- const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_1
- const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_2
- const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_3
- const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_4
- const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F_2
- const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_AWAY
- const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F
- const SPRITE_ANIM_FRAMESET_CELEBI_LEFT
- const SPRITE_ANIM_FRAMESET_CELEBI_RIGHT
-
- const_def
- const SPRITE_ANIM_SEQ_NULL
- const SPRITE_ANIM_SEQ_01
- const SPRITE_ANIM_SEQ_02
- const SPRITE_ANIM_SEQ_03
- const SPRITE_ANIM_SEQ_04
- const SPRITE_ANIM_SEQ_05
- const SPRITE_ANIM_SEQ_GAMEFREAK_LOGO
- const SPRITE_ANIM_SEQ_07
- const SPRITE_ANIM_SEQ_08
- const SPRITE_ANIM_SEQ_SLOT_GOLEM
- const SPRITE_ANIM_SEQ_SLOTS_CHANSEY
- const SPRITE_ANIM_SEQ_SLOTS_EGG
- const SPRITE_ANIM_SEQ_0C
- const SPRITE_ANIM_SEQ_0D
- const SPRITE_ANIM_SEQ_0E
- const SPRITE_ANIM_SEQ_0F
- const SPRITE_ANIM_SEQ_10
- const SPRITE_ANIM_SEQ_11
- const SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE
- const SPRITE_ANIM_SEQ_13
- const SPRITE_ANIM_SEQ_14
- const SPRITE_ANIM_SEQ_15
- const SPRITE_ANIM_SEQ_FLY_FROM
- const SPRITE_ANIM_SEQ_FLY_LEAF
- const SPRITE_ANIM_SEQ_FLY_TO
- const SPRITE_ANIM_SEQ_19
- const SPRITE_ANIM_SEQ_1A
- const SPRITE_ANIM_SEQ_1B
- const SPRITE_ANIM_SEQ_1C
- const SPRITE_ANIM_SEQ_1D
- const SPRITE_ANIM_SEQ_1E
- const SPRITE_ANIM_SEQ_1F
- const SPRITE_ANIM_SEQ_20
- const SPRITE_ANIM_SEQ_21
- const SPRITE_ANIM_SEQ_22
-
- const_def
- const SPRITE_ANIM_INDEX_00
- const SPRITE_ANIM_INDEX_01
- const SPRITE_ANIM_INDEX_02
- const SPRITE_ANIM_INDEX_GAMEFREAK_LOGO
- const SPRITE_ANIM_INDEX_04
- const SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR
- const SPRITE_ANIM_INDEX_SLOT_GOLEM
- const SPRITE_ANIM_INDEX_SLOTS_CHANSEY
- const SPRITE_ANIM_INDEX_SLOTS_EGG
- const SPRITE_ANIM_INDEX_09
- const SPRITE_ANIM_INDEX_RED_WALK
- const SPRITE_ANIM_INDEX_0B
- const SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR
- const SPRITE_ANIM_INDEX_0D
- const SPRITE_ANIM_INDEX_0E
- const SPRITE_ANIM_INDEX_0F
- const SPRITE_ANIM_INDEX_10
- const SPRITE_ANIM_INDEX_TRADEMON_ICON
- const SPRITE_ANIM_INDEX_TRADEMON_BUBBLE
- const SPRITE_ANIM_INDEX_13
- const SPRITE_ANIM_INDEX_14
- const SPRITE_ANIM_INDEX_15
- const SPRITE_ANIM_INDEX_LEAF
- const SPRITE_ANIM_INDEX_CUT_TREE
- const SPRITE_ANIM_INDEX_FLY_LEAF
- const SPRITE_ANIM_INDEX_19
- const SPRITE_ANIM_INDEX_1A
- const SPRITE_ANIM_INDEX_1B
- const SPRITE_ANIM_INDEX_1C
- const SPRITE_ANIM_INDEX_1D
- const SPRITE_ANIM_INDEX_BLUE_WALK
- const SPRITE_ANIM_INDEX_1F
- const SPRITE_ANIM_INDEX_20
- const SPRITE_ANIM_INDEX_21
- const SPRITE_ANIM_INDEX_22
- const SPRITE_ANIM_INDEX_23
- const SPRITE_ANIM_INDEX_24
- const SPRITE_ANIM_INDEX_25
- const SPRITE_ANIM_INDEX_26
- const SPRITE_ANIM_INDEX_27
- const SPRITE_ANIM_INDEX_28
- const SPRITE_ANIM_INDEX_29
- const SPRITE_ANIM_INDEX_2A
- const SPRITE_ANIM_INDEX_2B
- const SPRITE_ANIM_INDEX_2C
-
- const_def
-
- const SPRITE_ANIM_FRAME_IDX_00
- const SPRITE_ANIM_FRAME_IDX_01
- const SPRITE_ANIM_FRAME_IDX_02
- const SPRITE_ANIM_FRAME_IDX_03
- const SPRITE_ANIM_FRAME_IDX_04
- const SPRITE_ANIM_FRAME_IDX_05
- const SPRITE_ANIM_FRAME_IDX_06
- const SPRITE_ANIM_FRAME_IDX_07
- const SPRITE_ANIM_FRAME_IDX_08
- const SPRITE_ANIM_FRAME_IDX_09
- const SPRITE_ANIM_FRAME_IDX_0A
- const SPRITE_ANIM_FRAME_IDX_0B
- const SPRITE_ANIM_FRAME_IDX_0C
- const SPRITE_ANIM_FRAME_IDX_0D
- const SPRITE_ANIM_FRAME_IDX_0E
- const SPRITE_ANIM_FRAME_IDX_0F
- const SPRITE_ANIM_FRAME_IDX_10
- const SPRITE_ANIM_FRAME_IDX_11
- const SPRITE_ANIM_FRAME_IDX_12
- const SPRITE_ANIM_FRAME_IDX_13
- const SPRITE_ANIM_FRAME_IDX_14
- const SPRITE_ANIM_FRAME_IDX_15
- const SPRITE_ANIM_FRAME_IDX_16
- const SPRITE_ANIM_FRAME_IDX_17
- const SPRITE_ANIM_FRAME_IDX_18
- const SPRITE_ANIM_FRAME_IDX_19
- const SPRITE_ANIM_FRAME_IDX_1A
- const SPRITE_ANIM_FRAME_IDX_1B
- const SPRITE_ANIM_FRAME_IDX_1C
- const SPRITE_ANIM_FRAME_IDX_1D
- const SPRITE_ANIM_FRAME_IDX_1E
- const SPRITE_ANIM_FRAME_IDX_1F
- const SPRITE_ANIM_FRAME_IDX_20
- const SPRITE_ANIM_FRAME_IDX_21
- const SPRITE_ANIM_FRAME_IDX_22
- const SPRITE_ANIM_FRAME_IDX_23
- const SPRITE_ANIM_FRAME_IDX_24
- const SPRITE_ANIM_FRAME_IDX_25
- const SPRITE_ANIM_FRAME_IDX_26
- const SPRITE_ANIM_FRAME_IDX_27
- const SPRITE_ANIM_FRAME_IDX_28
- const SPRITE_ANIM_FRAME_IDX_29
- const SPRITE_ANIM_FRAME_IDX_2A
- const SPRITE_ANIM_FRAME_IDX_2B
- const SPRITE_ANIM_FRAME_IDX_2C
- const SPRITE_ANIM_FRAME_IDX_2D
- const SPRITE_ANIM_FRAME_IDX_2E
- const SPRITE_ANIM_FRAME_IDX_2F
- const SPRITE_ANIM_FRAME_IDX_30
- const SPRITE_ANIM_FRAME_IDX_31
- const SPRITE_ANIM_FRAME_IDX_32
- const SPRITE_ANIM_FRAME_IDX_33
- const SPRITE_ANIM_FRAME_IDX_34
- const SPRITE_ANIM_FRAME_IDX_35
- const SPRITE_ANIM_FRAME_IDX_36
- const SPRITE_ANIM_FRAME_IDX_37
- const SPRITE_ANIM_FRAME_IDX_38
- const SPRITE_ANIM_FRAME_IDX_39
- const SPRITE_ANIM_FRAME_IDX_3A
- const SPRITE_ANIM_FRAME_IDX_3B
- const SPRITE_ANIM_FRAME_IDX_3C
- const SPRITE_ANIM_FRAME_IDX_3D
- const SPRITE_ANIM_FRAME_IDX_3E
- const SPRITE_ANIM_FRAME_IDX_3F
- const SPRITE_ANIM_FRAME_IDX_40
- const SPRITE_ANIM_FRAME_IDX_41
- const SPRITE_ANIM_FRAME_IDX_42
- const SPRITE_ANIM_FRAME_IDX_43
- const SPRITE_ANIM_FRAME_IDX_44
- const SPRITE_ANIM_FRAME_IDX_45
- const SPRITE_ANIM_FRAME_IDX_46
- const SPRITE_ANIM_FRAME_IDX_47
- const SPRITE_ANIM_FRAME_IDX_48
- const SPRITE_ANIM_FRAME_IDX_49
- const SPRITE_ANIM_FRAME_IDX_4A
- const SPRITE_ANIM_FRAME_IDX_4B
- const SPRITE_ANIM_FRAME_IDX_4C
- const SPRITE_ANIM_FRAME_IDX_4D
- const SPRITE_ANIM_FRAME_IDX_4E
- const SPRITE_ANIM_FRAME_IDX_4F
- const SPRITE_ANIM_FRAME_IDX_50
- const SPRITE_ANIM_FRAME_IDX_51
- const SPRITE_ANIM_FRAME_IDX_52
- const SPRITE_ANIM_FRAME_IDX_53
- const SPRITE_ANIM_FRAME_IDX_54
- const SPRITE_ANIM_FRAME_IDX_55
- const SPRITE_ANIM_FRAME_IDX_56
- const SPRITE_ANIM_FRAME_IDX_57
- const SPRITE_ANIM_FRAME_IDX_58
- const SPRITE_ANIM_FRAME_IDX_59
- const SPRITE_ANIM_FRAME_IDX_5A
- const SPRITE_ANIM_FRAME_IDX_5B
- const SPRITE_ANIM_FRAME_IDX_5C
- const SPRITE_ANIM_FRAME_IDX_5D
- const SPRITE_ANIM_FRAME_IDX_5E
- const SPRITE_ANIM_FRAME_IDX_5F
- const SPRITE_ANIM_FRAME_IDX_60
- const SPRITE_ANIM_FRAME_IDX_61
- const SPRITE_ANIM_FRAME_IDX_62
- const SPRITE_ANIM_FRAME_IDX_63
- const SPRITE_ANIM_FRAME_IDX_64
- const SPRITE_ANIM_FRAME_IDX_65
- const SPRITE_ANIM_FRAME_IDX_66
- const SPRITE_ANIM_FRAME_IDX_67
- const SPRITE_ANIM_FRAME_IDX_68
- const SPRITE_ANIM_FRAME_IDX_69
- const SPRITE_ANIM_FRAME_IDX_6A
- const SPRITE_ANIM_FRAME_IDX_6B
- const SPRITE_ANIM_FRAME_IDX_6C
- const SPRITE_ANIM_FRAME_IDX_6D
- const SPRITE_ANIM_FRAME_IDX_6E
- const SPRITE_ANIM_FRAME_IDX_6F
- const SPRITE_ANIM_FRAME_IDX_70
- const SPRITE_ANIM_FRAME_IDX_71
- const SPRITE_ANIM_FRAME_IDX_72
- const SPRITE_ANIM_FRAME_IDX_73
- const SPRITE_ANIM_FRAME_IDX_74
- const SPRITE_ANIM_FRAME_IDX_75
- const SPRITE_ANIM_FRAME_IDX_76
- const SPRITE_ANIM_FRAME_IDX_77
- const SPRITE_ANIM_FRAME_IDX_78
- const SPRITE_ANIM_FRAME_IDX_79
- const SPRITE_ANIM_FRAME_IDX_7A
- const SPRITE_ANIM_FRAME_IDX_7B
- const SPRITE_ANIM_FRAME_IDX_7C
- const SPRITE_ANIM_FRAME_IDX_7D
- const SPRITE_ANIM_FRAME_IDX_7E
- const SPRITE_ANIM_FRAME_IDX_7F
- const SPRITE_ANIM_FRAME_IDX_80
- const SPRITE_ANIM_FRAME_IDX_81
- const SPRITE_ANIM_FRAME_IDX_82
- const SPRITE_ANIM_FRAME_IDX_83
- const SPRITE_ANIM_FRAME_IDX_84
- const SPRITE_ANIM_FRAME_IDX_85
- const SPRITE_ANIM_FRAME_IDX_86
- const SPRITE_ANIM_FRAME_IDX_87
- const SPRITE_ANIM_FRAME_IDX_88
- const SPRITE_ANIM_FRAME_IDX_89
- const SPRITE_ANIM_FRAME_IDX_8A
- const SPRITE_ANIM_FRAME_IDX_8B
diff --git a/constants/sprite_data_constants.asm b/constants/sprite_data_constants.asm
new file mode 100644
index 000000000..77d9e3975
--- /dev/null
+++ b/constants/sprite_data_constants.asm
@@ -0,0 +1,511 @@
+; sprite_header struct members (see gfx/sprite_headers.asm)
+ const_def
+ const SPRITEHEADER_ADDR_LO ; 0
+ const SPRITEHEADER_ADDR_HI ; 1
+ const SPRITEHEADER_SIZE ; 2
+ const SPRITEHEADER_BANK ; 3
+ const SPRITEHEADER_TYPE ; 4
+ const SPRITEHEADER_PALETTE ; 5
+NUM_SPRITEHEADER_FIELDS EQU const_value
+
+; sprite types
+const_value SET 1
+ const WALKING_SPRITE ; 1
+ const STANDING_SPRITE ; 2
+ const STILL_SPRITE ; 3
+
+; sprite palettes
+ const_def
+ const PAL_OW_RED ; 0
+ const PAL_OW_BLUE ; 1
+ const PAL_OW_GREEN ; 2
+ const PAL_OW_BROWN ; 3
+ const PAL_OW_PINK ; 4
+ const PAL_OW_SILVER ; 5
+ const PAL_OW_TREE ; 6
+ const PAL_OW_ROCK ; 7
+
+; object_events set bit 3 so as not to use the sprite's default palette
+const_value set (1 << 3)
+ const PAL_NPC_RED ; 8
+ const PAL_NPC_BLUE ; 9
+ const PAL_NPC_GREEN ; a
+ const PAL_NPC_BROWN ; b
+ const PAL_NPC_PINK ; c
+ const PAL_NPC_SILVER ; d
+ const PAL_NPC_TREE ; e
+ const PAL_NPC_ROCK ; f
+
+; SpriteMovementData indexes (see data/map_objects.asm)
+ const_def
+ const SPRITEMOVEDATA_00 ; 00
+ const SPRITEMOVEDATA_ITEM_TREE ; 01
+ const SPRITEMOVEDATA_WANDER ; 02
+ const SPRITEMOVEDATA_SPINRANDOM_SLOW ; 03
+ const SPRITEMOVEDATA_WALK_UP_DOWN ; 04
+ const SPRITEMOVEDATA_WALK_LEFT_RIGHT ; 05
+ const SPRITEMOVEDATA_STANDING_DOWN ; 06
+ const SPRITEMOVEDATA_STANDING_UP ; 07
+ const SPRITEMOVEDATA_STANDING_LEFT ; 08
+ const SPRITEMOVEDATA_STANDING_RIGHT ; 09
+ const SPRITEMOVEDATA_SPINRANDOM_FAST ; 0a
+ const SPRITEMOVEDATA_PLAYER ; 0b
+ const SPRITEMOVEDATA_0C ; 0c
+ const SPRITEMOVEDATA_0D ; 0d
+ const SPRITEMOVEDATA_0E ; 0e
+ const SPRITEMOVEDATA_0F ; 0f
+ const SPRITEMOVEDATA_10 ; 10
+ const SPRITEMOVEDATA_11 ; 11
+ const SPRITEMOVEDATA_12 ; 12
+ const SPRITEMOVEDATA_FOLLOWING ; 13
+ const SPRITEMOVEDATA_SCRIPTED ; 14
+ const SPRITEMOVEDATA_SNORLAX ; 15
+ const SPRITEMOVEDATA_POKEMON ; 16
+ const SPRITEMOVEDATA_SUDOWOODO ; 17
+ const SPRITEMOVEDATA_SMASHABLE_ROCK ; 18
+ const SPRITEMOVEDATA_STRENGTH_BOULDER ; 19
+ const SPRITEMOVEDATA_FOLLOWNOTEXACT ; 1a
+ const SPRITEMOVEDATA_SHADOW ; 1b
+ const SPRITEMOVEDATA_EMOTE ; 1c
+ const SPRITEMOVEDATA_SCREENSHAKE ; 1d
+ const SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE ; 1e
+ const SPRITEMOVEDATA_SPINCLOCKWISE ; 1f
+ const SPRITEMOVEDATA_20 ; 20
+ const SPRITEMOVEDATA_BIGDOLL ; 21
+ const SPRITEMOVEDATA_BOULDERDUST ; 22
+ const SPRITEMOVEDATA_GRASS ; 23
+ const SPRITEMOVEDATA_LAPRAS ; 24
+NUM_SPRITEMOVEDATA EQU const_value
+SPRITEMOVEDATA_FIELDS EQU 6
+
+; MapObjectMovementPattern.Pointers indexes (see engine/map_objects.asm)
+ const_def
+ const SPRITEMOVEFN_00 ; 00
+ const SPRITEMOVEFN_RANDOM_WALK_Y ; 01
+ const SPRITEMOVEFN_RANDOM_WALK_X ; 02
+ const SPRITEMOVEFN_RANDOM_WALK_XY ; 03
+ const SPRITEMOVEFN_SLOW_RANDOM_SPIN ; 04
+ const SPRITEMOVEFN_FAST_RANDOM_SPIN ; 05
+ const SPRITEMOVEFN_STANDING ; 06
+ const SPRITEMOVEFN_OBEY_DPAD ; 07
+ const SPRITEMOVEFN_08 ; 08
+ const SPRITEMOVEFN_09 ; 09
+ const SPRITEMOVEFN_0A ; 0a
+ const SPRITEMOVEFN_0B ; 0b
+ const SPRITEMOVEFN_0C ; 0c
+ const SPRITEMOVEFN_0D ; 0d
+ const SPRITEMOVEFN_0E ; 0e
+ const SPRITEMOVEFN_FOLLOW ; 0f
+ const SPRITEMOVEFN_SCRIPTED ; 10
+ const SPRITEMOVEFN_STRENGTH ; 11
+ const SPRITEMOVEFN_FOLLOWNOTEXACT ; 12
+ const SPRITEMOVEFN_SHADOW ; 13
+ const SPRITEMOVEFN_EMOTE ; 14
+ const SPRITEMOVEFN_BIG_SNORLAX ; 15
+ const SPRITEMOVEFN_BOUNCE ; 16
+ const SPRITEMOVEFN_SCREENSHAKE ; 17
+ const SPRITEMOVEFN_SPIN_CLOCKWISE ; 18
+ const SPRITEMOVEFN_SPIN_COUNTERCLOCKWISE ; 19
+ const SPRITEMOVEFN_BOULDERDUST ; 1a
+ const SPRITEMOVEFN_GRASS ; 1b
+
+; StepTypesJumptable indexes (see engine/map_objects.asm)
+ const_def
+ const STEP_TYPE_00 ; 00
+ const STEP_TYPE_SLEEP ; 01
+ const STEP_TYPE_NPC_WALK ; 02
+ const STEP_TYPE_03 ; 03
+ const STEP_TYPE_04 ; 04
+ const STEP_TYPE_05 ; 05
+ const STEP_TYPE_PLAYER_WALK ; 06
+ const STEP_TYPE_07 ; 07
+ const STEP_TYPE_NPC_JUMP ; 08
+ const STEP_TYPE_PLAYER_JUMP ; 09
+ const STEP_TYPE_HALF_STEP ; 0a
+ const STEP_TYPE_BUMP ; 0b
+ const STEP_TYPE_TELEPORT_FROM ; 0c
+ const STEP_TYPE_TELEPORT_TO ; 0d
+ const STEP_TYPE_SKYFALL ; 0e
+ const STEP_TYPE_0F ; 0f
+ const STEP_TYPE_GOT_BITE ; 10
+ const STEP_TYPE_ROCK_SMASH ; 11
+ const STEP_TYPE_RETURN_DIG ; 12
+ const STEP_TYPE_TRACKING_OBJECT ; 13
+ const STEP_TYPE_14 ; 14
+ const STEP_TYPE_15 ; 15
+ const STEP_TYPE_16 ; 16
+ const STEP_TYPE_17 ; 17
+ const STEP_TYPE_18 ; 18
+ const STEP_TYPE_SKYFALL_TOP ; 19
+
+; ObjectActionPairPointers indexes (see engine/map_object_action.asm)
+ const_def
+ const OBJECT_ACTION_00 ; 00
+ const OBJECT_ACTION_STAND ; 01
+ const OBJECT_ACTION_STEP ; 02
+ const OBJECT_ACTION_BUMP ; 03
+ const OBJECT_ACTION_SPIN ; 04
+ const OBJECT_ACTION_SPIN_FLICKER ; 05
+ const OBJECT_ACTION_FISHING ; 06
+ const OBJECT_ACTION_SHADOW ; 07
+ const OBJECT_ACTION_EMOTE ; 08
+ const OBJECT_ACTION_BIG_SNORLAX ; 09
+ const OBJECT_ACTION_BOUNCE ; 0a
+ const OBJECT_ACTION_WEIRD_TREE ; 0b
+ const OBJECT_ACTION_BIG_LAPRAS ; 0c
+ const OBJECT_ACTION_BIG_DOLL ; 0d
+ const OBJECT_ACTION_BOULDER_DUST ; 0e
+ const OBJECT_ACTION_GRASS_SHAKE ; 0f
+ const OBJECT_ACTION_SKYFALL ; 10
+
+; Facings indexes (see data/facings.asm)
+ const_def
+ const FACING_STEP_DOWN_0 ; 00
+ const FACING_STEP_DOWN_1 ; 01
+ const FACING_STEP_DOWN_2 ; 02
+ const FACING_STEP_DOWN_3 ; 03
+ const FACING_STEP_UP_0 ; 04
+ const FACING_STEP_UP_1 ; 05
+ const FACING_STEP_UP_2 ; 06
+ const FACING_STEP_UP_3 ; 07
+ const FACING_STEP_LEFT_0 ; 08
+ const FACING_STEP_LEFT_1 ; 09
+ const FACING_STEP_LEFT_2 ; 0a
+ const FACING_STEP_LEFT_3 ; 0b
+ const FACING_STEP_RIGHT_0 ; 0c
+ const FACING_STEP_RIGHT_1 ; 0d
+ const FACING_STEP_RIGHT_2 ; 0e
+ const FACING_STEP_RIGHT_3 ; 0f
+ const FACING_FISH_DOWN ; 10
+ const FACING_FISH_UP ; 11
+ const FACING_FISH_LEFT ; 12
+ const FACING_FISH_RIGHT ; 13
+ const FACING_EMOTE ; 14
+ const FACING_SHADOW ; 15
+ const FACING_BIG_DOLL_ASYM ; 16
+ const FACING_BIG_DOLL_SYM ; 17
+ const FACING_WEIRD_TREE_0 ; 18
+ const FACING_WEIRD_TREE_1 ; 19
+ const FACING_WEIRD_TREE_2 ; 1a
+ const FACING_WEIRD_TREE_3 ; 1b
+ const FACING_BOULDER_DUST_1 ; 1c
+ const FACING_BOULDER_DUST_2 ; 1d
+ const FACING_GRASS_1 ; 1e
+ const FACING_GRASS_2 ; 1f
+
+; sprite_anim_struct members (see macros/wram.asm)
+ const_def
+ const SPRITEANIMSTRUCT_INDEX ; 0
+ const SPRITEANIMSTRUCT_FRAMESET_ID ; 1
+ const SPRITEANIMSTRUCT_ANIM_SEQ_ID ; 2
+ const SPRITEANIMSTRUCT_TILE_ID ; 3
+ const SPRITEANIMSTRUCT_XCOORD ; 4
+ const SPRITEANIMSTRUCT_YCOORD ; 5
+ const SPRITEANIMSTRUCT_XOFFSET ; 6
+ const SPRITEANIMSTRUCT_YOFFSET ; 7
+ const SPRITEANIMSTRUCT_DURATION ; 8
+ const SPRITEANIMSTRUCT_DURATIONOFFSET ; 9
+ const SPRITEANIMSTRUCT_FRAME ; a
+ const SPRITEANIMSTRUCT_JUMPTABLE_INDEX ; b
+ const SPRITEANIMSTRUCT_0C ; c
+ const SPRITEANIMSTRUCT_0D ; d
+ const SPRITEANIMSTRUCT_0E ; e
+ const SPRITEANIMSTRUCT_0F ; f
+
+; SpriteAnimSeqData indexes (see data/sprite_anim_seqs.asm)
+ const_def
+ const SPRITE_ANIM_INDEX_PARTY_MON ; 00
+ const SPRITE_ANIM_INDEX_GS_TITLE_TRAIL ; 01
+ const SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR ; 02
+ const SPRITE_ANIM_INDEX_GAMEFREAK_LOGO ; 03
+ const SPRITE_ANIM_INDEX_GS_INTRO_STAR ; 04
+ const SPRITE_ANIM_INDEX_GS_INTRO_SPARKLE ; 05
+ const SPRITE_ANIM_INDEX_SLOTS_GOLEM ; 06
+ const SPRITE_ANIM_INDEX_SLOTS_CHANSEY ; 07
+ const SPRITE_ANIM_INDEX_SLOTS_EGG ; 08
+ const SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR ; 09
+ const SPRITE_ANIM_INDEX_RED_WALK ; 0a
+ const SPRITE_ANIM_INDEX_UNUSED_CURSOR ; 0b
+ const SPRITE_ANIM_INDEX_DUMMY_GAME ; 0c
+ const SPRITE_ANIM_INDEX_POKEGEAR_ARROW ; 0d
+ const SPRITE_ANIM_INDEX_TRADE_POKE_BALL ; 0e
+ const SPRITE_ANIM_INDEX_TRADE_POOF ; 0f
+ const SPRITE_ANIM_INDEX_TRADE_TUBE_BULGE ; 10
+ const SPRITE_ANIM_INDEX_TRADEMON_ICON ; 11
+ const SPRITE_ANIM_INDEX_TRADEMON_BUBBLE ; 12
+ const SPRITE_ANIM_INDEX_EVOLUTION_BALL_OF_LIGHT ; 13
+ const SPRITE_ANIM_INDEX_RADIO_TUNING_KNOB ; 14
+ const SPRITE_ANIM_INDEX_MAGNET_TRAIN_RED ; 15
+ const SPRITE_ANIM_INDEX_LEAF ; 16
+ const SPRITE_ANIM_INDEX_CUT_TREE ; 17
+ const SPRITE_ANIM_INDEX_FLY_LEAF ; 18
+ const SPRITE_ANIM_INDEX_EGG_CRACK ; 19
+ const SPRITE_ANIM_INDEX_1A ; 1a
+ const SPRITE_ANIM_INDEX_HEADBUTT ; 1b
+ const SPRITE_ANIM_INDEX_EGG_HATCH ; 1c
+ const SPRITE_ANIM_INDEX_1D ; 1d
+ const SPRITE_ANIM_INDEX_BLUE_WALK ; 1e
+ const SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE ; 1f
+ const SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL ; 20
+ const SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL ; 21
+ const SPRITE_ANIM_INDEX_MOBILE_22 ; 22
+ const SPRITE_ANIM_INDEX_MOBILE_23 ; 23
+ const SPRITE_ANIM_INDEX_MOBILE_24 ; 24
+ const SPRITE_ANIM_INDEX_MOBILE_25 ; 25
+ const SPRITE_ANIM_INDEX_INTRO_SUICUNE ; 26
+ const SPRITE_ANIM_INDEX_INTRO_PICHU ; 27
+ const SPRITE_ANIM_INDEX_INTRO_WOOPER ; 28
+ const SPRITE_ANIM_INDEX_INTRO_UNOWN ; 29
+ const SPRITE_ANIM_INDEX_INTRO_UNOWN_F ; 2a
+ const SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY ; 2b
+ const SPRITE_ANIM_INDEX_CELEBI ; 2c
+
+; DoAnimFrame.Jumptable indexes (see engine/sprite_anims.asm)
+ const_def
+ const SPRITE_ANIM_SEQ_NULL ; 00
+ const SPRITE_ANIM_SEQ_PARTY_MON ; 01
+ const SPRITE_ANIM_SEQ_PARTY_MON_SWITCH ; 02
+ const SPRITE_ANIM_SEQ_PARTY_MON_SELECTED ; 03
+ const SPRITE_ANIM_SEQ_GS_TITLE_TRAIL ; 04
+ const SPRITE_ANIM_SEQ_NAMING_SCREEN_CURSOR ; 05
+ const SPRITE_ANIM_SEQ_GAMEFREAK_LOGO ; 06
+ const SPRITE_ANIM_SEQ_GS_INTRO_STAR ; 07
+ const SPRITE_ANIM_SEQ_GS_INTRO_SPARKLE ; 08
+ const SPRITE_ANIM_SEQ_SLOTS_GOLEM ; 09
+ const SPRITE_ANIM_SEQ_SLOTS_CHANSEY ; 0a
+ const SPRITE_ANIM_SEQ_SLOTS_EGG ; 0b
+ const SPRITE_ANIM_SEQ_MAIL_CURSOR ; 0c
+ const SPRITE_ANIM_SEQ_FOR_UNUSED_CURSOR ; 0d
+ const SPRITE_ANIM_SEQ_DUMMY_GAME_CURSOR ; 0e
+ const SPRITE_ANIM_SEQ_POKEGEAR_ARROW ; 0f
+ const SPRITE_ANIM_SEQ_TRADE_POKE_BALL ; 10
+ const SPRITE_ANIM_SEQ_TRADE_TUBE_BULGE ; 11
+ const SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE ; 12
+ const SPRITE_ANIM_SEQ_REVEAL_NEW_MON ; 13
+ const SPRITE_ANIM_SEQ_RADIO_TUNING_KNOB ; 14
+ const SPRITE_ANIM_SEQ_CUT_LEAVES ; 15
+ const SPRITE_ANIM_SEQ_FLY_FROM ; 16
+ const SPRITE_ANIM_SEQ_FLY_LEAF ; 17
+ const SPRITE_ANIM_SEQ_FLY_TO ; 18
+ const SPRITE_ANIM_SEQ_19 ; 19
+ const SPRITE_ANIM_SEQ_1A ; 1a
+ const SPRITE_ANIM_SEQ_FOR_MOBILE_23 ; 1b
+ const SPRITE_ANIM_SEQ_FOR_MOBILE_24 ; 1c
+ const SPRITE_ANIM_SEQ_INTRO_SUICUNE ; 1d
+ const SPRITE_ANIM_SEQ_INTRO_PICHU_WOOPER ; 1e
+ const SPRITE_ANIM_SEQ_CELEBI ; 1f
+ const SPRITE_ANIM_SEQ_INTRO_UNOWN ; 20
+ const SPRITE_ANIM_SEQ_INTRO_UNOWN_F ; 21
+ const SPRITE_ANIM_SEQ_INTRO_SUICUNE_AWAY ; 22
+
+; SpriteAnimFrameData indexes (see data/sprite_anim_frames.asm)
+ const_def
+ const SPRITE_ANIM_FRAMESET_00
+ const SPRITE_ANIM_FRAMESET_PARTY_MON ; 01
+ const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_MAIL ; 02
+ const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_ITEM ; 03
+ const SPRITE_ANIM_FRAMESET_PARTY_MON_FAST ; 04
+ const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_MAIL_FAST ; 05
+ const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_ITEM_FAST ; 06
+ const SPRITE_ANIM_FRAMESET_GS_TITLE_TRAIL ; 07
+ const SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR ; 08
+ const SPRITE_ANIM_FRAMESET_09
+ const SPRITE_ANIM_FRAMESET_GAMEFREAK_LOGO ; 0a
+ const SPRITE_ANIM_FRAMESET_GS_INTRO_STAR ; 0b
+ const SPRITE_ANIM_FRAMESET_GS_INTRO_SPARKLE ; 0c
+ const SPRITE_ANIM_FRAMESET_SLOTS_GOLEM ; 0d
+ const SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY ; 0e
+ const SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY_2 ; 0f
+ const SPRITE_ANIM_FRAMESET_SLOTS_EGG ; 10
+ const SPRITE_ANIM_FRAMESET_RED_WALK ; 11
+ const SPRITE_ANIM_FRAMESET_STILL_CURSOR ; 12
+ const SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL ; 13
+ const SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL_0 ; 14
+ const SPRITE_ANIM_FRAMESET_TRADE_POOF ; 15
+ const SPRITE_ANIM_FRAMESET_TRADE_TUBE_BULGE ; 16
+ const SPRITE_ANIM_FRAMESET_TRADEMON_ICON ; 17
+ const SPRITE_ANIM_FRAMESET_TRADEMON_BUBBLE ; 18
+ const SPRITE_ANIM_FRAMESET_EVOLUTION_BALL_OF_LIGHT ; 19
+ const SPRITE_ANIM_FRAMESET_RADIO_TUNING_KNOB ; 1a
+ const SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_RED ; 1b
+ const SPRITE_ANIM_FRAMESET_1C
+ const SPRITE_ANIM_FRAMESET_LEAF ; 1d
+ const SPRITE_ANIM_FRAMESET_CUT_TREE ; 1e
+ const SPRITE_ANIM_FRAMESET_EGG_CRACK ; 1f
+ const SPRITE_ANIM_FRAMESET_EGG_HATCH ; 20
+ const SPRITE_ANIM_FRAMESET_21
+ const SPRITE_ANIM_FRAMESET_22
+ const SPRITE_ANIM_FRAMESET_23
+ const SPRITE_ANIM_FRAMESET_24
+ const SPRITE_ANIM_FRAMESET_HEADBUTT ; 25
+ const SPRITE_ANIM_FRAMESET_26
+ const SPRITE_ANIM_FRAMESET_27
+ const SPRITE_ANIM_FRAMESET_28
+ const SPRITE_ANIM_FRAMESET_29
+ const SPRITE_ANIM_FRAMESET_2A
+ const SPRITE_ANIM_FRAMESET_2B
+ const SPRITE_ANIM_FRAMESET_2C
+ const SPRITE_ANIM_FRAMESET_BLUE_WALK ; 2d
+ const SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_BLUE ; 2e
+ const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_SENT_BALL ; 2f
+ const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_OT_BALL ; 30
+ const SPRITE_ANIM_FRAMESET_FOR_MOBILE_22 ; 31
+ const SPRITE_ANIM_FRAMESET_FOR_MOBILE_23 ; 32
+ const SPRITE_ANIM_FRAMESET_FOR_MOBILE_24 ; 33
+ const SPRITE_ANIM_FRAMESET_FOR_MOBILE_25 ; 34
+ const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE ; 35
+ const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_2 ; 36
+ const SPRITE_ANIM_FRAMESET_INTRO_PICHU ; 37
+ const SPRITE_ANIM_FRAMESET_INTRO_WOOPER ; 38
+ const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_1 ; 39
+ const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_2 ; 3a
+ const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_3 ; 3b
+ const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_4 ; 3c
+ const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F_2 ; 3d
+ const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_AWAY ; 3e
+ const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F ; 3f
+ const SPRITE_ANIM_FRAMESET_CELEBI_LEFT ; 40
+ const SPRITE_ANIM_FRAMESET_CELEBI_RIGHT ; 41
+
+; SpriteAnimOAMData indexes (see data/sprite_anim_oam.asm)
+ const_def
+ const SPRITE_ANIM_FRAME_IDX_RED_WALK_1 ; 00
+ const SPRITE_ANIM_FRAME_IDX_RED_WALK_2 ; 01
+ const SPRITE_ANIM_FRAME_IDX_02
+ const SPRITE_ANIM_FRAME_IDX_03
+ const SPRITE_ANIM_FRAME_IDX_04
+ const SPRITE_ANIM_FRAME_IDX_05
+ const SPRITE_ANIM_FRAME_IDX_06
+ const SPRITE_ANIM_FRAME_IDX_07
+ const SPRITE_ANIM_FRAME_IDX_08
+ const SPRITE_ANIM_FRAME_IDX_09
+ const SPRITE_ANIM_FRAME_IDX_0A
+ const SPRITE_ANIM_FRAME_IDX_0B
+ const SPRITE_ANIM_FRAME_IDX_0C
+ const SPRITE_ANIM_FRAME_IDX_0D
+ const SPRITE_ANIM_FRAME_IDX_0E
+ const SPRITE_ANIM_FRAME_IDX_0F
+ const SPRITE_ANIM_FRAME_IDX_10
+ const SPRITE_ANIM_FRAME_IDX_11
+ const SPRITE_ANIM_FRAME_IDX_12
+ const SPRITE_ANIM_FRAME_IDX_13
+ const SPRITE_ANIM_FRAME_IDX_14
+ const SPRITE_ANIM_FRAME_IDX_15
+ const SPRITE_ANIM_FRAME_IDX_16
+ const SPRITE_ANIM_FRAME_IDX_17
+ const SPRITE_ANIM_FRAME_IDX_18
+ const SPRITE_ANIM_FRAME_IDX_19
+ const SPRITE_ANIM_FRAME_IDX_1A
+ const SPRITE_ANIM_FRAME_IDX_1B
+ const SPRITE_ANIM_FRAME_IDX_1C
+ const SPRITE_ANIM_FRAME_IDX_1D
+ const SPRITE_ANIM_FRAME_IDX_GS_TITLE_TRAIL_1 ; 1e
+ const SPRITE_ANIM_FRAME_IDX_GS_TITLE_TRAIL_2 ; 1f
+ const SPRITE_ANIM_FRAME_IDX_TEXT_ENTRY_CURSOR ; 20
+ const SPRITE_ANIM_FRAME_IDX_FOR_FRAMESET_09 ; 21
+ const SPRITE_ANIM_FRAME_IDX_22
+ const SPRITE_ANIM_FRAME_IDX_GS_INTRO_STAR ; 23
+ const SPRITE_ANIM_FRAME_IDX_GS_INTRO_SPARKLE_1 ; 24
+ const SPRITE_ANIM_FRAME_IDX_GS_INTRO_SPARKLE_2 ; 25
+ const SPRITE_ANIM_FRAME_IDX_GS_INTRO_SPARKLE_3 ; 26
+ const SPRITE_ANIM_FRAME_IDX_SLOTS_GOLEM_1 ; 27
+ const SPRITE_ANIM_FRAME_IDX_SLOTS_GOLEM_2 ; 28
+ const SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_1 ; 29
+ const SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_2 ; 2a
+ const SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_3 ; 2b
+ const SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_4 ; 2c
+ const SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_5 ; 2d
+ const SPRITE_ANIM_FRAME_IDX_SLOTS_EGG ; 2e
+ const SPRITE_ANIM_FRAME_IDX_STILL_CURSOR ; 2f
+ const SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1 ; 30
+ const SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2 ; 31
+ const SPRITE_ANIM_FRAME_IDX_TRADE_POOF_1 ; 32
+ const SPRITE_ANIM_FRAME_IDX_TRADE_POOF_2 ; 33
+ const SPRITE_ANIM_FRAME_IDX_TRADE_POOF_3 ; 34
+ const SPRITE_ANIM_FRAME_IDX_35
+ const SPRITE_ANIM_FRAME_IDX_36
+ const SPRITE_ANIM_FRAME_IDX_TRADEMON_ICON_1 ; 37
+ const SPRITE_ANIM_FRAME_IDX_TRADEMON_ICON_2 ; 38
+ const SPRITE_ANIM_FRAME_IDX_TRADEMON_BUBBLE ; 39
+ const SPRITE_ANIM_FRAME_IDX_EVOLUTION_BALL_OF_LIGHT_1 ; 3a
+ const SPRITE_ANIM_FRAME_IDX_EVOLUTION_BALL_OF_LIGHT_2 ; 3b
+ const SPRITE_ANIM_FRAME_IDX_RADIO_TUNING_KNOB ; 3c
+ const SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_MAIL_1 ; 3d
+ const SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_MAIL_2 ; 3e
+ const SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_ITEM_1 ; 3f
+ const SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_ITEM_2 ; 40
+ const SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_RED_1 ; 41
+ const SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_RED_2 ; 42
+ const SPRITE_ANIM_FRAME_IDX_43
+ const SPRITE_ANIM_FRAME_IDX_44
+ const SPRITE_ANIM_FRAME_IDX_45
+ const SPRITE_ANIM_FRAME_IDX_46
+ const SPRITE_ANIM_FRAME_IDX_47
+ const SPRITE_ANIM_FRAME_IDX_48
+ const SPRITE_ANIM_FRAME_IDX_49
+ const SPRITE_ANIM_FRAME_IDX_4A
+ const SPRITE_ANIM_FRAME_IDX_4B
+ const SPRITE_ANIM_FRAME_IDX_4C
+ const SPRITE_ANIM_FRAME_IDX_4D
+ const SPRITE_ANIM_FRAME_IDX_4E
+ const SPRITE_ANIM_FRAME_IDX_LEAF ; 4f
+ const SPRITE_ANIM_FRAME_IDX_TREE_1 ; 50
+ const SPRITE_ANIM_FRAME_IDX_CUT_TREE_2 ; 51
+ const SPRITE_ANIM_FRAME_IDX_CUT_TREE_3 ; 52
+ const SPRITE_ANIM_FRAME_IDX_CUT_TREE_4 ; 53
+ const SPRITE_ANIM_FRAME_IDX_EGG_CRACK ; 54
+ const SPRITE_ANIM_FRAME_IDX_55
+ const SPRITE_ANIM_FRAME_IDX_56
+ const SPRITE_ANIM_FRAME_IDX_57
+ const SPRITE_ANIM_FRAME_IDX_58
+ const SPRITE_ANIM_FRAME_IDX_59
+ const SPRITE_ANIM_FRAME_IDX_5A
+ const SPRITE_ANIM_FRAME_IDX_HEADBUTT_TREE_2 ; 5b
+ const SPRITE_ANIM_FRAME_IDX_5C
+ const SPRITE_ANIM_FRAME_IDX_5D
+ const SPRITE_ANIM_FRAME_IDX_5E
+ const SPRITE_ANIM_FRAME_IDX_5F
+ const SPRITE_ANIM_FRAME_IDX_60
+ const SPRITE_ANIM_FRAME_IDX_61
+ const SPRITE_ANIM_FRAME_IDX_62
+ const SPRITE_ANIM_FRAME_IDX_BLUE_WALK_1 ; 63
+ const SPRITE_ANIM_FRAME_IDX_BLUE_WALK_2 ; 64
+ const SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_BLUE_1 ; 65
+ const SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_BLUE_2 ; 66
+ const SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_22_1 ; 67
+ const SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_22_2 ; 68
+ const SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_25_1 ; 69
+ const SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_25_2 ; 6a
+ const SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_25_3 ; 6b
+ const SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_23 ; 6c
+ const SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_24 ; 6d
+ const SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_1 ; 6e
+ const SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_2 ; 6f
+ const SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_3 ; 70
+ const SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_4 ; 71
+ const SPRITE_ANIM_FRAME_IDX_INTRO_PICHU_1 ; 72
+ const SPRITE_ANIM_FRAME_IDX_INTRO_PICHU_2 ; 73
+ const SPRITE_ANIM_FRAME_IDX_INTRO_PICHU_3 ; 74
+ const SPRITE_ANIM_FRAME_IDX_INTRO_WOOPER ; 75
+ const SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_1 ; 76
+ const SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_2 ; 77
+ const SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_3 ; 78
+ const SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_1 ; 79
+ const SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_2 ; 7a
+ const SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_3 ; 7b
+ const SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_4 ; 7c
+ const SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_5 ; 7d
+ const SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_AWAY ; 7e
+ const SPRITE_ANIM_FRAME_IDX_CELEBI_1 ; 7f
+ const SPRITE_ANIM_FRAME_IDX_CELEBI_2 ; 80
+ const SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_1 ; 81
+ const SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_2 ; 82
+ const SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_3 ; 83
+ const SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_4 ; 84
+ const SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_5 ; 85
+ const SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_6 ; 86
+ const SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_7 ; 87
+ const SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_8 ; 88
+ const SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_9 ; 89
+ const SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_10 ; 8A
+ const SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_11 ; 8B
diff --git a/constants/std_constants.asm b/constants/std_constants.asm
index 039b27073..21fb6791f 100644
--- a/constants/std_constants.asm
+++ b/constants/std_constants.asm
@@ -1,3 +1,5 @@
+; StdScripts indexes (see engine/std_scripts.asm)
+; also used in TileCollisionStdScripts (see data/collision_stdscripts.asm)
enum_start
enum pokecenternurse
enum difficultbookshelf
diff --git a/constants/tilemap_constants.asm b/constants/tilemap_constants.asm
deleted file mode 100644
index 04f9bcaaa..000000000
--- a/constants/tilemap_constants.asm
+++ /dev/null
@@ -1,53 +0,0 @@
-LANDTILE EQU 0
-WALLTILE EQU $f
-WATERTILE EQU 1
-
-TALK EQU 1 << 4
-
-const_value SET 1
- const TILESET_JOHTO_1 ; 01
- const TILESET_JOHTO_2 ; 02
- const TILESET_KANTO ; 03
- const TILESET_BATTLE_TOWER_OUTSIDE ; 04
- const TILESET_HOUSE_1 ; 05
- const TILESET_KRISS_HOUSE ; 06
- const TILESET_POKECENTER ; 07
- const TILESET_GATE ; 08
- const TILESET_PORT ; 09
- const TILESET_LAB ; 0a
- const TILESET_POWER_PLANT ; 0b
- const TILESET_MART ; 0c
- const TILESET_CELADON_MANSION ; 0d
- const TILESET_GAME_CORNER ; 0e
- const TILESET_GYM_1 ; 0f
- const TILESET_KURT_HOUSE ; 10
- const TILESET_TRAIN_STATION ; 11
- const TILESET_OLIVINE_GYM ; 12
- const TILESET_LIGHTHOUSE ; 13
- const TILESET_KRISS_HOUSE_2F ; 14
- const TILESET_POKECOM_CENTER ; 15
- const TILESET_BATTLE_TOWER ; 16
- const TILESET_SPROUT_TOWER ; 17
- const TILESET_CAVE ; 18
- const TILESET_PARK ; 19
- const TILESET_RUINS_OF_ALPH ; 1a
- const TILESET_RADIO_TOWER ; 1b
- const TILESET_UNDERGROUND ; 1c
- const TILESET_ICE_PATH ; 1d
- const TILESET_WHIRL_ISLANDS ; 1e
- const TILESET_ILEX_FOREST ; 1f
- const TILESET_32 ; 20
- const TILESET_HO_OH_WORD_ROOM ; 21
- const TILESET_KABUTO_WORD_ROOM ; 22
- const TILESET_OMANYTE_WORD_ROOM ; 23
- const TILESET_AERODACTYL_WORD_ROOM ; 24
-
- const_def
- const PAL_BG_GRAY
- const PAL_BG_RED
- const PAL_BG_GREEN
- const PAL_BG_WATER
- const PAL_BG_YELLOW
- const PAL_BG_BROWN
- const PAL_BG_ROOF
- const PAL_BG_TEXT
diff --git a/constants/tileset_constants.asm b/constants/tileset_constants.asm
new file mode 100644
index 000000000..6a73f61d9
--- /dev/null
+++ b/constants/tileset_constants.asm
@@ -0,0 +1,49 @@
+; Tilesets indexes (see tilesets/tileset_headers.asm)
+const_value SET 1
+ const TILESET_JOHTO_1 ; 01
+ const TILESET_JOHTO_2 ; 02
+ const TILESET_KANTO ; 03
+ const TILESET_BATTLE_TOWER_OUTSIDE ; 04
+ const TILESET_HOUSE_1 ; 05
+ const TILESET_PLAYERS_HOUSE ; 06
+ const TILESET_POKECENTER ; 07
+ const TILESET_GATE ; 08
+ const TILESET_PORT ; 09
+ const TILESET_LAB ; 0a
+ const TILESET_POWER_PLANT ; 0b
+ const TILESET_MART ; 0c
+ const TILESET_CELADON_MANSION ; 0d
+ const TILESET_GAME_CORNER ; 0e
+ const TILESET_GYM_1 ; 0f
+ const TILESET_KURTS_HOUSE ; 10
+ const TILESET_TRAIN_STATION ; 11
+ const TILESET_OLIVINE_GYM ; 12
+ const TILESET_LIGHTHOUSE ; 13
+ const TILESET_PLAYERS_HOUSE_2F ; 14
+ const TILESET_POKECOM_CENTER ; 15
+ const TILESET_BATTLE_TOWER ; 16
+ const TILESET_SPROUT_TOWER ; 17
+ const TILESET_CAVE ; 18
+ const TILESET_PARK ; 19
+ const TILESET_RUINS_OF_ALPH ; 1a
+ const TILESET_RADIO_TOWER ; 1b
+ const TILESET_UNDERGROUND ; 1c
+ const TILESET_ICE_PATH ; 1d
+ const TILESET_WHIRL_ISLANDS ; 1e
+ const TILESET_ILEX_FOREST ; 1f
+ const TILESET_BETA_WORD_ROOM ; 20
+ const TILESET_HO_OH_WORD_ROOM ; 21
+ const TILESET_KABUTO_WORD_ROOM ; 22
+ const TILESET_OMANYTE_WORD_ROOM ; 23
+ const TILESET_AERODACTYL_WORD_ROOM ; 24
+
+; bg palette values (see tilesets/*_palette_map.asm)
+ const_def
+ const PAL_BG_GRAY ; 0
+ const PAL_BG_RED ; 1
+ const PAL_BG_GREEN ; 2
+ const PAL_BG_WATER ; 3
+ const PAL_BG_YELLOW ; 4
+ const PAL_BG_BROWN ; 5
+ const PAL_BG_ROOF ; 6
+ const PAL_BG_TEXT ; 7
diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm
index 70692c822..c41a6ed58 100644
--- a/constants/trainer_constants.asm
+++ b/constants/trainer_constants.asm
@@ -1,4 +1,17 @@
-; trainer groups
+trainerclass: MACRO
+ enum \1
+const_value = 1
+ENDM
+
+; trainer class ids
+; `trainerclass` indexes are for:
+; - TrainerClassAttributes (see data/trainers/trainer_attributes.asm)
+; - TrainerClassDVs (see data/trainers/trainer_dvs.asm)
+; - TrainerClassNames (see data/trainers/trainer_class_names.asm)
+; - TrainerEncounterMusic (see data/trainers/encounter_music.asm)
+; - TrainerGroups (see data/trainers/party_pointers.asm)
+; - BTTrainerClassGenders (see data/trainers/gendered_trainers.asm)
+; trainer constants are Trainers indexes, for the sub-tables of TrainerGroups (see data/trainers/parties.asm)
enum_start
CHRIS EQU __enum__
trainerclass TRAINER_NONE ; 0
@@ -26,21 +39,21 @@ KRIS EQU __enum__
trainerclass CLAIR ; 8
trainerclass RIVAL1 ; 9
- const RIVAL1_1
- const RIVAL1_2
- const RIVAL1_3
- const RIVAL1_4
- const RIVAL1_5
- const RIVAL1_6
- const RIVAL1_7
- const RIVAL1_8
- const RIVAL1_9
- const RIVAL1_10
- const RIVAL1_11
- const RIVAL1_12
- const RIVAL1_13
- const RIVAL1_14
- const RIVAL1_15
+ const RIVAL1_1_CHIKORITA
+ const RIVAL1_1_CYNDAQUIL
+ const RIVAL1_1_TOTODILE
+ const RIVAL1_2_CHIKORITA
+ const RIVAL1_2_CYNDAQUIL
+ const RIVAL1_2_TOTODILE
+ const RIVAL1_3_CHIKORITA
+ const RIVAL1_3_CYNDAQUIL
+ const RIVAL1_3_TOTODILE
+ const RIVAL1_4_CHIKORITA
+ const RIVAL1_4_CYNDAQUIL
+ const RIVAL1_4_TOTODILE
+ const RIVAL1_5_CHIKORITA
+ const RIVAL1_5_CYNDAQUIL
+ const RIVAL1_5_TOTODILE
trainerclass POKEMON_PROF ; a
@@ -415,6 +428,12 @@ KRIS EQU __enum__
const MARKUS
trainerclass RIVAL2 ; 2a
+ const RIVAL2_1_CHIKORITA
+ const RIVAL2_1_CYNDAQUIL
+ const RIVAL2_1_TOTODILE
+ const RIVAL2_2_CHIKORITA
+ const RIVAL2_2_CYNDAQUIL
+ const RIVAL2_2_TOTODILE
trainerclass GUITARIST ; 2b
const CLYDE
@@ -492,6 +511,10 @@ KRIS EQU __enum__
const WAI
trainerclass EXECUTIVEM ; 33
+ const EXECUTIVEM_1
+ const EXECUTIVEM_2
+ const EXECUTIVEM_3
+ const EXECUTIVEM_4
trainerclass PSYCHIC_T ; 34
const NATHAN
@@ -560,6 +583,8 @@ KRIS EQU __enum__
const QUENTIN
trainerclass EXECUTIVEF ; 37
+ const EXECUTIVEF_1
+ const EXECUTIVEF_2
trainerclass SAGE ; 38
const CHOW
@@ -648,12 +673,23 @@ KRIS EQU __enum__
const GRUNTF_4
const GRUNTF_5
-
trainerclass MYSTICALMAN ; 43
const EUSINE
NUM_TRAINER_CLASSES EQU __enum__
+; TrainerClassAttributes fields (see data/trainers/trainer_attributes.asm)
+ const_def
+ const TRNATTR_ITEM1 ; 0
+ const TRNATTR_ITEM2 ; 1
+ const TRNATTR_BASEMONEY ; 2
+ const TRNATTR_AI_MOVE_WEIGHTS ; 3
+ const TRNATTR_AI2 ; 4
+ const TRNATTR_AI_ITEM_SWITCH ; 5
+ const TRNATTR_AI4 ; 6
+NUM_TRAINER_ATTRIBUTES EQU const_value
+
+; TRNATTR_AI_MOVE_WEIGHTS bit flags (wEnemyTrainerAIFlags)
const_def
const NO_AI
const_value = 0
@@ -674,12 +710,24 @@ const_value = 0
shift_const AI_14
shift_const AI_15
+; TRNATTR_AI_ITEM_SWITCH bit flags
+CONTEXT_USE_F EQU 6
+UNKNOWN_USE_F EQU 5
+ALWAYS_USE_F EQU 4
+SWITCH_SOMETIMES_F EQU 2
+SWITCH_RARELY_F EQU 1
+SWITCH_OFTEN_F EQU 0
+
+CONTEXT_USE EQU 1 << CONTEXT_USE_F
+UNKNOWN_USE EQU 1 << UNKNOWN_USE_F
+ALWAYS_USE EQU 1 << ALWAYS_USE_F
+SWITCH_SOMETIMES EQU 1 << SWITCH_SOMETIMES_F
+SWITCH_RARELY EQU 1 << SWITCH_RARELY_F
+SWITCH_OFTEN EQU 1 << SWITCH_OFTEN_F
+
+; TrainerTypes indexes (see trainers/read_party.asm)
const_def
- const TRNATTR_ITEM1
- const TRNATTR_ITEM2
- const TRNATTR_BASEMONEY
- const TRNATTR_AI_MOVE_WEIGHTS
- const TRNATTR_AI2
- const TRNATTR_AI_ITEM_SWITCH
- const TRNATTR_AI4
-NUM_TRAINER_ATTRIBUTES EQU const_value
+ const TRAINERTYPE_NORMAL
+ const TRAINERTYPE_MOVES
+ const TRAINERTYPE_ITEM
+ const TRAINERTYPE_ITEM_MOVES
diff --git a/constants/type_constants.asm b/constants/type_constants.asm
index b7b350e33..6f389617b 100644
--- a/constants/type_constants.asm
+++ b/constants/type_constants.asm
@@ -1,3 +1,7 @@
+; TypeNames indexes (see text/types.asm)
+; also used in:
+; - TypeMatchup (see battle.type_matchup.asm)
+; - Pokedex_SearchForMons.TypeConversionTable and Pokedex_PlaceSearchScreenTypeStrings.TypeStrings (see engine/pokedex.asm)
const_def
PHYSICAL EQU const_value
diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm
index 09d457f5e..c8c49621e 100644
--- a/constants/wram_constants.asm
+++ b/constants/wram_constants.asm
@@ -1,37 +1,57 @@
-
; MonType: ; cf5f
-PARTYMON EQU 0
-OTPARTYMON EQU 1
-BOXMON EQU 2
-TEMPMON EQU 3
-WILDMON EQU 4
-
-; Options: ; cfcc
-FAST_TEXT EQU 0
-MED_TEXT EQU 1
-SLOW_TEXT EQU 2
-NO_TEXT_SCROLL EQU 4
-; bits
-STEREO EQU 5
-BATTLE_SHIFT EQU 6
-BATTLE_SCENE EQU 7
+ const_def
+ const PARTYMON ; 0
+ const OTPARTYMON ; 1
+ const BOXMON ; 2
+ const TEMPMON ; 3
+ const WILDMON ; 4
+
+; Options: (bits) ; cfcc
+const_value SET 4
+ const NO_TEXT_SCROLL ; 4
+ const STEREO ; 5
+ const BATTLE_SHIFT ; 6
+ const BATTLE_SCENE ; 7
+
+; Options: (bits 0-2)
+TEXT_DELAY_FAST EQU 1
+TEXT_DELAY_MED EQU 3
+TEXT_DELAY_SLOW EQU 5
+
+; TextBoxFrame: ; cfce
+ const_def
+ const FRAME_1 ; 0
+ const FRAME_2 ; 1
+ const FRAME_3 ; 2
+ const FRAME_4 ; 3
+ const FRAME_5 ; 4
+ const FRAME_6 ; 5
+ const FRAME_7 ; 6
+ const FRAME_8 ; 7
; Options2:
-MENU_ACCOUNT EQU 0
+ const_def
+ const MENU_ACCOUNT ; 0
; GBPrinter:
-PRINT_LIGHTEST EQU $00
-PRINT_LIGHTER EQU $20
-PRINT_NORMAL EQU $40
-PRINT_DARKER EQU $60
-PRINT_DARKEST EQU $7f
+GBPRINTER_LIGHTEST EQU $00
+GBPRINTER_LIGHTER EQU $20
+GBPRINTER_NORMAL EQU $40
+GBPRINTER_DARKER EQU $60
+GBPRINTER_DARKEST EQU $7f
; WalkingDirection: ; d043
-STANDING EQU -1
-DOWN EQU 0
-UP EQU 1
-LEFT EQU 2
-RIGHT EQU 3
+const_value SET -1
+ const STANDING ; -1
+ const DOWN ; 0
+ const UP ; 1
+ const LEFT ; 2
+ const RIGHT ; 3
+
+DOWN_MASK EQU 1 << DOWN
+UP_MASK EQU 1 << UP
+LEFT_MASK EQU 1 << LEFT
+RIGHT_MASK EQU 1 << RIGHT
; FacingDirection: ; d044
FACE_CURRENT EQU 0
@@ -41,10 +61,16 @@ FACE_LEFT EQU 2
FACE_RIGHT EQU 1
; TimeOfDay: ; d269
-MORN EQU 0
-DAY EQU 1
-NITE EQU 2
-DARKNESS EQU 3
+ const_def
+ const MORN_F ; 0
+ const DAY_F ; 1
+ const NITE_F ; 2
+ const DARKNESS_F ; 3
+
+MORN EQU 1 << MORN_F
+DAY EQU 1 << DAY_F
+NITE EQU 1 << NITE_F
+DARKNESS EQU 1 << DARKNESS_F
; ScriptFlags: ; d434
SCRIPT_RUNNING EQU 2
@@ -56,13 +82,14 @@ SCRIPT_WAIT_MOVEMENT EQU 2
SCRIPT_WAIT EQU 3
; CurDay: ; d4cb
-SUNDAY EQU 0
-MONDAY EQU 1
-TUESDAY EQU 2
-WEDNESDAY EQU 3
-THURSDAY EQU 4
-FRIDAY EQU 5
-SATURDAY EQU 6
+ const_def
+ const SUNDAY ; 0
+ const MONDAY ; 1
+ const TUESDAY ; 2
+ const WEDNESDAY ; 3
+ const THURSDAY ; 4
+ const FRIDAY ; 5
+ const SATURDAY ; 6
; MapObjects: ; d71e
@@ -80,7 +107,7 @@ REGISTERED_NUMBER EQU %00111111
; PlayerState: ; d95d
PLAYER_NORMAL EQU 0
PLAYER_BIKE EQU 1
-PLAYER_SLIP EQU 2
+PLAYER_SKATE EQU 2
PLAYER_SURF EQU 4
PLAYER_SURF_PIKA EQU 8
@@ -89,13 +116,13 @@ NUM_OBJECT_STRUCTS EQU 13
; After-Champion Spawn
SPAWN_LANCE EQU 1
-SPAWN_RED EQU 2
+SPAWN_RED EQU 2
; wPokemonWithdrawDepositParameter
-PC_WITHDRAW EQU 0
-PC_DEPOSIT EQU 1
-DAYCARE_WITHDRAW EQU 2
-DAYCARE_DEPOSIT EQU 3
+PC_WITHDRAW EQU 0
+PC_DEPOSIT EQU 1
+DAY_CARE_WITHDRAW EQU 2
+DAY_CARE_DEPOSIT EQU 3
; wCurrentDexMode
const_def
@@ -103,3 +130,35 @@ DAYCARE_DEPOSIT EQU 3
const DEXMODE_OLD
const DEXMODE_ABC
const DEXMODE_UNOWN
+
+; JohtoBadges:
+ const_def
+ const ZEPHYRBADGE
+ const HIVEBADGE
+ const PLAINBADGE
+ const FOGBADGE
+ const MINERALBADGE
+ const STORMBADGE
+ const GLACIERBADGE
+ const RISINGBADGE
+NUM_JOHTO_BADGES EQU const_value
+
+; KantoBadges:
+ const_def
+ const BOULDERBADGE
+ const CASCADEBADGE
+ const THUNDERBADGE
+ const RAINBOWBADGE
+ const SOULBADGE
+ const MARSHBADGE
+ const VOLCANOBADGE
+ const EARTHBADGE
+NUM_KANTO_BADGES EQU const_value
+NUM_BADGES EQU NUM_JOHTO_BADGES + NUM_KANTO_BADGES
+
+; wInitListType:
+INIT_ENEMYOT_LIST EQU 1
+INIT_BAG_ITEM_LIST EQU 2
+INIT_OTHER_ITEM_LIST EQU 3
+INIT_PLAYEROT_LIST EQU 4
+INIT_MON_LIST EQU 5
diff --git a/data/base_stats.asm b/data/base_stats.asm
deleted file mode 100644
index b3e67d9a8..000000000
--- a/data/base_stats.asm
+++ /dev/null
@@ -1,253 +0,0 @@
-BaseData0::
-INCLUDE "data/base_stats/bulbasaur.asm"
-BaseData1::
-INCLUDE "data/base_stats/ivysaur.asm"
-INCLUDE "data/base_stats/venusaur.asm"
-INCLUDE "data/base_stats/charmander.asm"
-INCLUDE "data/base_stats/charmeleon.asm"
-INCLUDE "data/base_stats/charizard.asm"
-INCLUDE "data/base_stats/squirtle.asm"
-INCLUDE "data/base_stats/wartortle.asm"
-INCLUDE "data/base_stats/blastoise.asm"
-INCLUDE "data/base_stats/caterpie.asm"
-INCLUDE "data/base_stats/metapod.asm"
-INCLUDE "data/base_stats/butterfree.asm"
-INCLUDE "data/base_stats/weedle.asm"
-INCLUDE "data/base_stats/kakuna.asm"
-INCLUDE "data/base_stats/beedrill.asm"
-INCLUDE "data/base_stats/pidgey.asm"
-INCLUDE "data/base_stats/pidgeotto.asm"
-INCLUDE "data/base_stats/pidgeot.asm"
-INCLUDE "data/base_stats/rattata.asm"
-INCLUDE "data/base_stats/raticate.asm"
-INCLUDE "data/base_stats/spearow.asm"
-INCLUDE "data/base_stats/fearow.asm"
-INCLUDE "data/base_stats/ekans.asm"
-INCLUDE "data/base_stats/arbok.asm"
-INCLUDE "data/base_stats/pikachu.asm"
-INCLUDE "data/base_stats/raichu.asm"
-INCLUDE "data/base_stats/sandshrew.asm"
-INCLUDE "data/base_stats/sandslash.asm"
-INCLUDE "data/base_stats/nidoran_f.asm"
-INCLUDE "data/base_stats/nidorina.asm"
-INCLUDE "data/base_stats/nidoqueen.asm"
-INCLUDE "data/base_stats/nidoran_m.asm"
-INCLUDE "data/base_stats/nidorino.asm"
-INCLUDE "data/base_stats/nidoking.asm"
-INCLUDE "data/base_stats/clefairy.asm"
-INCLUDE "data/base_stats/clefable.asm"
-INCLUDE "data/base_stats/vulpix.asm"
-INCLUDE "data/base_stats/ninetales.asm"
-INCLUDE "data/base_stats/jigglypuff.asm"
-INCLUDE "data/base_stats/wigglytuff.asm"
-INCLUDE "data/base_stats/zubat.asm"
-INCLUDE "data/base_stats/golbat.asm"
-INCLUDE "data/base_stats/oddish.asm"
-INCLUDE "data/base_stats/gloom.asm"
-INCLUDE "data/base_stats/vileplume.asm"
-INCLUDE "data/base_stats/paras.asm"
-INCLUDE "data/base_stats/parasect.asm"
-INCLUDE "data/base_stats/venonat.asm"
-INCLUDE "data/base_stats/venomoth.asm"
-INCLUDE "data/base_stats/diglett.asm"
-INCLUDE "data/base_stats/dugtrio.asm"
-INCLUDE "data/base_stats/meowth.asm"
-INCLUDE "data/base_stats/persian.asm"
-INCLUDE "data/base_stats/psyduck.asm"
-INCLUDE "data/base_stats/golduck.asm"
-INCLUDE "data/base_stats/mankey.asm"
-INCLUDE "data/base_stats/primeape.asm"
-INCLUDE "data/base_stats/growlithe.asm"
-INCLUDE "data/base_stats/arcanine.asm"
-INCLUDE "data/base_stats/poliwag.asm"
-INCLUDE "data/base_stats/poliwhirl.asm"
-INCLUDE "data/base_stats/poliwrath.asm"
-INCLUDE "data/base_stats/abra.asm"
-INCLUDE "data/base_stats/kadabra.asm"
-INCLUDE "data/base_stats/alakazam.asm"
-INCLUDE "data/base_stats/machop.asm"
-INCLUDE "data/base_stats/machoke.asm"
-INCLUDE "data/base_stats/machamp.asm"
-INCLUDE "data/base_stats/bellsprout.asm"
-INCLUDE "data/base_stats/weepinbell.asm"
-INCLUDE "data/base_stats/victreebel.asm"
-INCLUDE "data/base_stats/tentacool.asm"
-INCLUDE "data/base_stats/tentacruel.asm"
-INCLUDE "data/base_stats/geodude.asm"
-INCLUDE "data/base_stats/graveler.asm"
-INCLUDE "data/base_stats/golem.asm"
-INCLUDE "data/base_stats/ponyta.asm"
-INCLUDE "data/base_stats/rapidash.asm"
-INCLUDE "data/base_stats/slowpoke.asm"
-INCLUDE "data/base_stats/slowbro.asm"
-INCLUDE "data/base_stats/magnemite.asm"
-INCLUDE "data/base_stats/magneton.asm"
-INCLUDE "data/base_stats/farfetch_d.asm"
-INCLUDE "data/base_stats/doduo.asm"
-INCLUDE "data/base_stats/dodrio.asm"
-INCLUDE "data/base_stats/seel.asm"
-INCLUDE "data/base_stats/dewgong.asm"
-INCLUDE "data/base_stats/grimer.asm"
-INCLUDE "data/base_stats/muk.asm"
-INCLUDE "data/base_stats/shellder.asm"
-INCLUDE "data/base_stats/cloyster.asm"
-INCLUDE "data/base_stats/gastly.asm"
-INCLUDE "data/base_stats/haunter.asm"
-INCLUDE "data/base_stats/gengar.asm"
-INCLUDE "data/base_stats/onix.asm"
-INCLUDE "data/base_stats/drowzee.asm"
-INCLUDE "data/base_stats/hypno.asm"
-INCLUDE "data/base_stats/krabby.asm"
-INCLUDE "data/base_stats/kingler.asm"
-INCLUDE "data/base_stats/voltorb.asm"
-INCLUDE "data/base_stats/electrode.asm"
-INCLUDE "data/base_stats/exeggcute.asm"
-INCLUDE "data/base_stats/exeggutor.asm"
-INCLUDE "data/base_stats/cubone.asm"
-INCLUDE "data/base_stats/marowak.asm"
-INCLUDE "data/base_stats/hitmonlee.asm"
-INCLUDE "data/base_stats/hitmonchan.asm"
-INCLUDE "data/base_stats/lickitung.asm"
-INCLUDE "data/base_stats/koffing.asm"
-INCLUDE "data/base_stats/weezing.asm"
-INCLUDE "data/base_stats/rhyhorn.asm"
-INCLUDE "data/base_stats/rhydon.asm"
-INCLUDE "data/base_stats/chansey.asm"
-INCLUDE "data/base_stats/tangela.asm"
-INCLUDE "data/base_stats/kangaskhan.asm"
-INCLUDE "data/base_stats/horsea.asm"
-INCLUDE "data/base_stats/seadra.asm"
-INCLUDE "data/base_stats/goldeen.asm"
-INCLUDE "data/base_stats/seaking.asm"
-INCLUDE "data/base_stats/staryu.asm"
-INCLUDE "data/base_stats/starmie.asm"
-INCLUDE "data/base_stats/mr__mime.asm"
-INCLUDE "data/base_stats/scyther.asm"
-INCLUDE "data/base_stats/jynx.asm"
-INCLUDE "data/base_stats/electabuzz.asm"
-INCLUDE "data/base_stats/magmar.asm"
-INCLUDE "data/base_stats/pinsir.asm"
-INCLUDE "data/base_stats/tauros.asm"
-INCLUDE "data/base_stats/magikarp.asm"
-INCLUDE "data/base_stats/gyarados.asm"
-INCLUDE "data/base_stats/lapras.asm"
-INCLUDE "data/base_stats/ditto.asm"
-INCLUDE "data/base_stats/eevee.asm"
-INCLUDE "data/base_stats/vaporeon.asm"
-INCLUDE "data/base_stats/jolteon.asm"
-INCLUDE "data/base_stats/flareon.asm"
-INCLUDE "data/base_stats/porygon.asm"
-INCLUDE "data/base_stats/omanyte.asm"
-INCLUDE "data/base_stats/omastar.asm"
-INCLUDE "data/base_stats/kabuto.asm"
-INCLUDE "data/base_stats/kabutops.asm"
-INCLUDE "data/base_stats/aerodactyl.asm"
-INCLUDE "data/base_stats/snorlax.asm"
-INCLUDE "data/base_stats/articuno.asm"
-INCLUDE "data/base_stats/zapdos.asm"
-INCLUDE "data/base_stats/moltres.asm"
-INCLUDE "data/base_stats/dratini.asm"
-INCLUDE "data/base_stats/dragonair.asm"
-INCLUDE "data/base_stats/dragonite.asm"
-INCLUDE "data/base_stats/mewtwo.asm"
-INCLUDE "data/base_stats/mew.asm"
-INCLUDE "data/base_stats/chikorita.asm"
-INCLUDE "data/base_stats/bayleef.asm"
-INCLUDE "data/base_stats/meganium.asm"
-INCLUDE "data/base_stats/cyndaquil.asm"
-INCLUDE "data/base_stats/quilava.asm"
-INCLUDE "data/base_stats/typhlosion.asm"
-INCLUDE "data/base_stats/totodile.asm"
-INCLUDE "data/base_stats/croconaw.asm"
-INCLUDE "data/base_stats/feraligatr.asm"
-INCLUDE "data/base_stats/sentret.asm"
-INCLUDE "data/base_stats/furret.asm"
-INCLUDE "data/base_stats/hoothoot.asm"
-INCLUDE "data/base_stats/noctowl.asm"
-INCLUDE "data/base_stats/ledyba.asm"
-INCLUDE "data/base_stats/ledian.asm"
-INCLUDE "data/base_stats/spinarak.asm"
-INCLUDE "data/base_stats/ariados.asm"
-INCLUDE "data/base_stats/crobat.asm"
-INCLUDE "data/base_stats/chinchou.asm"
-INCLUDE "data/base_stats/lanturn.asm"
-INCLUDE "data/base_stats/pichu.asm"
-INCLUDE "data/base_stats/cleffa.asm"
-INCLUDE "data/base_stats/igglybuff.asm"
-INCLUDE "data/base_stats/togepi.asm"
-INCLUDE "data/base_stats/togetic.asm"
-INCLUDE "data/base_stats/natu.asm"
-INCLUDE "data/base_stats/xatu.asm"
-INCLUDE "data/base_stats/mareep.asm"
-INCLUDE "data/base_stats/flaaffy.asm"
-INCLUDE "data/base_stats/ampharos.asm"
-INCLUDE "data/base_stats/bellossom.asm"
-INCLUDE "data/base_stats/marill.asm"
-INCLUDE "data/base_stats/azumarill.asm"
-INCLUDE "data/base_stats/sudowoodo.asm"
-INCLUDE "data/base_stats/politoed.asm"
-INCLUDE "data/base_stats/hoppip.asm"
-INCLUDE "data/base_stats/skiploom.asm"
-INCLUDE "data/base_stats/jumpluff.asm"
-INCLUDE "data/base_stats/aipom.asm"
-INCLUDE "data/base_stats/sunkern.asm"
-INCLUDE "data/base_stats/sunflora.asm"
-INCLUDE "data/base_stats/yanma.asm"
-INCLUDE "data/base_stats/wooper.asm"
-INCLUDE "data/base_stats/quagsire.asm"
-INCLUDE "data/base_stats/espeon.asm"
-INCLUDE "data/base_stats/umbreon.asm"
-INCLUDE "data/base_stats/murkrow.asm"
-INCLUDE "data/base_stats/slowking.asm"
-INCLUDE "data/base_stats/misdreavus.asm"
-INCLUDE "data/base_stats/unown.asm"
-INCLUDE "data/base_stats/wobbuffet.asm"
-INCLUDE "data/base_stats/girafarig.asm"
-INCLUDE "data/base_stats/pineco.asm"
-INCLUDE "data/base_stats/forretress.asm"
-INCLUDE "data/base_stats/dunsparce.asm"
-INCLUDE "data/base_stats/gligar.asm"
-INCLUDE "data/base_stats/steelix.asm"
-INCLUDE "data/base_stats/snubbull.asm"
-INCLUDE "data/base_stats/granbull.asm"
-INCLUDE "data/base_stats/qwilfish.asm"
-INCLUDE "data/base_stats/scizor.asm"
-INCLUDE "data/base_stats/shuckle.asm"
-INCLUDE "data/base_stats/heracross.asm"
-INCLUDE "data/base_stats/sneasel.asm"
-INCLUDE "data/base_stats/teddiursa.asm"
-INCLUDE "data/base_stats/ursaring.asm"
-INCLUDE "data/base_stats/slugma.asm"
-INCLUDE "data/base_stats/magcargo.asm"
-INCLUDE "data/base_stats/swinub.asm"
-INCLUDE "data/base_stats/piloswine.asm"
-INCLUDE "data/base_stats/corsola.asm"
-INCLUDE "data/base_stats/remoraid.asm"
-INCLUDE "data/base_stats/octillery.asm"
-INCLUDE "data/base_stats/delibird.asm"
-INCLUDE "data/base_stats/mantine.asm"
-INCLUDE "data/base_stats/skarmory.asm"
-INCLUDE "data/base_stats/houndour.asm"
-INCLUDE "data/base_stats/houndoom.asm"
-INCLUDE "data/base_stats/kingdra.asm"
-INCLUDE "data/base_stats/phanpy.asm"
-INCLUDE "data/base_stats/donphan.asm"
-INCLUDE "data/base_stats/porygon2.asm"
-INCLUDE "data/base_stats/stantler.asm"
-INCLUDE "data/base_stats/smeargle.asm"
-INCLUDE "data/base_stats/tyrogue.asm"
-INCLUDE "data/base_stats/hitmontop.asm"
-INCLUDE "data/base_stats/smoochum.asm"
-INCLUDE "data/base_stats/elekid.asm"
-INCLUDE "data/base_stats/magby.asm"
-INCLUDE "data/base_stats/miltank.asm"
-INCLUDE "data/base_stats/blissey.asm"
-INCLUDE "data/base_stats/raikou.asm"
-INCLUDE "data/base_stats/entei.asm"
-INCLUDE "data/base_stats/suicune.asm"
-INCLUDE "data/base_stats/larvitar.asm"
-INCLUDE "data/base_stats/pupitar.asm"
-INCLUDE "data/base_stats/tyranitar.asm"
-INCLUDE "data/base_stats/lugia.asm"
-INCLUDE "data/base_stats/ho_oh.asm"
-INCLUDE "data/base_stats/celebi.asm"
diff --git a/data/base_stats/abra.asm b/data/base_stats/abra.asm
deleted file mode 100644
index f3a39edbb..000000000
--- a/data/base_stats/abra.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ABRA ; 063
-
- db 25, 20, 15, 90, 105, 55
- ; hp atk def spd sat sdf
-
- db PSYCHIC, PSYCHIC
- db 200 ; catch rate
- db 73 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 63 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/abra/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, FLASH
- ; end
diff --git a/data/base_stats/aerodactyl.asm b/data/base_stats/aerodactyl.asm
deleted file mode 100644
index 56530206c..000000000
--- a/data/base_stats/aerodactyl.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db AERODACTYL ; 142
-
- db 80, 105, 65, 130, 60, 75
- ; hp atk def spd sat sdf
-
- db ROCK, FLYING
- db 45 ; catch rate
- db 202 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 35 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/aerodactyl/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, EARTHQUAKE, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DETECT, REST, ATTRACT, STEEL_WING, FLY, FLAMETHROWER
- ; end
diff --git a/data/base_stats/aipom.asm b/data/base_stats/aipom.asm
deleted file mode 100644
index aa9ca45a1..000000000
--- a/data/base_stats/aipom.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db AIPOM ; 190
-
- db 55, 70, 55, 85, 40, 55
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 45 ; catch rate
- db 94 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/aipom/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, NIGHTMARE, CUT, STRENGTH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/alakazam.asm b/data/base_stats/alakazam.asm
deleted file mode 100644
index 79e2e99ee..000000000
--- a/data/base_stats/alakazam.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ALAKAZAM ; 065
-
- db 55, 50, 45, 120, 135, 85
- ; hp atk def spd sat sdf
-
- db PSYCHIC, PSYCHIC
- db 50 ; catch rate
- db 186 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 63 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/alakazam/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DIG, PSYCHIC, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, FLASH
- ; end
diff --git a/data/base_stats/ampharos.asm b/data/base_stats/ampharos.asm
deleted file mode 100644
index a0a2c48f7..000000000
--- a/data/base_stats/ampharos.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db AMPHAROS ; 181
-
- db 90, 75, 75, 55, 115, 90
- ; hp atk def spd sat sdf
-
- db ELECTRIC, ELECTRIC
- db 45 ; catch rate
- db 194 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/ampharos/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, STRENGTH, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/arbok.asm b/data/base_stats/arbok.asm
deleted file mode 100644
index 48129fc36..000000000
--- a/data/base_stats/arbok.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ARBOK ; 024
-
- db 60, 85, 69, 80, 65, 79
- ; hp atk def spd sat sdf
-
- db POISON, POISON
- db 90 ; catch rate
- db 147 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/arbok/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, REPTILE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, STRENGTH
- ; end
diff --git a/data/base_stats/arcanine.asm b/data/base_stats/arcanine.asm
deleted file mode 100644
index 81452dd19..000000000
--- a/data/base_stats/arcanine.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ARCANINE ; 059
-
- db 90, 110, 80, 95, 100, 80
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 75 ; catch rate
- db 213 ; base exp
- db BURNT_BERRY ; item 1
- db BURNT_BERRY ; item 2
- db 63 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/arcanine/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER
- ; end
diff --git a/data/base_stats/ariados.asm b/data/base_stats/ariados.asm
deleted file mode 100644
index 244c70d86..000000000
--- a/data/base_stats/ariados.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ARIADOS ; 168
-
- db 70, 90, 70, 40, 60, 60
- ; hp atk def spd sat sdf
-
- db BUG, POISON
- db 90 ; catch rate
- db 134 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/ariados/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, FLASH
- ; end
diff --git a/data/base_stats/articuno.asm b/data/base_stats/articuno.asm
deleted file mode 100644
index 320e210c6..000000000
--- a/data/base_stats/articuno.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ARTICUNO ; 144
-
- db 90, 85, 100, 85, 95, 125
- ; hp atk def spd sat sdf
-
- db ICE, FLYING
- db 3 ; catch rate
- db 215 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 80 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/articuno/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, STEEL_WING, FLY, ICE_BEAM
- ; end
diff --git a/data/base_stats/azumarill.asm b/data/base_stats/azumarill.asm
deleted file mode 100644
index c18e517c4..000000000
--- a/data/base_stats/azumarill.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db AZUMARILL ; 184
-
- db 100, 50, 80, 50, 50, 80
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 75 ; catch rate
- db 153 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/azumarill/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn AMPHIBIAN, FAIRY ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/bayleef.asm b/data/base_stats/bayleef.asm
deleted file mode 100644
index bb439ccd3..000000000
--- a/data/base_stats/bayleef.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db BAYLEEF ; 153
-
- db 60, 62, 80, 60, 63, 80
- ; hp atk def spd sat sdf
-
- db GRASS, GRASS
- db 45 ; catch rate
- db 141 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/bayleef/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, PLANT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, STRENGTH, FLASH
- ; end
diff --git a/data/base_stats/beedrill.asm b/data/base_stats/beedrill.asm
deleted file mode 100644
index 465b076de..000000000
--- a/data/base_stats/beedrill.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db BEEDRILL ; 015
-
- db 65, 80, 40, 75, 45, 80
- ; hp atk def spd sat sdf
-
- db BUG, POISON
- db 45 ; catch rate
- db 159 ; base exp
- db NO_ITEM ; item 1
- db POISON_BARB ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/beedrill/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SWIFT, REST, ATTRACT, FURY_CUTTER, CUT
- ; end
diff --git a/data/base_stats/bellossom.asm b/data/base_stats/bellossom.asm
deleted file mode 100644
index 6489fe50c..000000000
--- a/data/base_stats/bellossom.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db BELLOSSOM ; 182
-
- db 75, 80, 85, 50, 90, 100
- ; hp atk def spd sat sdf
-
- db GRASS, GRASS
- db 45 ; catch rate
- db 184 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/bellossom/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn PLANT, PLANT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, CUT, FLASH
- ; end
diff --git a/data/base_stats/bellsprout.asm b/data/base_stats/bellsprout.asm
deleted file mode 100644
index d8e3160e6..000000000
--- a/data/base_stats/bellsprout.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db BELLSPROUT ; 069
-
- db 50, 75, 35, 40, 70, 30
- ; hp atk def spd sat sdf
-
- db GRASS, POISON
- db 255 ; catch rate
- db 84 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/bellsprout/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn PLANT, PLANT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
- ; end
diff --git a/data/base_stats/blastoise.asm b/data/base_stats/blastoise.asm
deleted file mode 100644
index 1a2df93b3..000000000
--- a/data/base_stats/blastoise.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db BLASTOISE ; 009
-
- db 79, 83, 100, 78, 85, 105
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 45 ; catch rate
- db 210 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/blastoise/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/blissey.asm b/data/base_stats/blissey.asm
deleted file mode 100644
index d9c870da4..000000000
--- a/data/base_stats/blissey.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db BLISSEY ; 242
-
- db 255, 10, 10, 55, 75, 135
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 30 ; catch rate
- db 255 ; base exp
- db NO_ITEM ; item 1
- db LUCKY_EGG ; item 2
- db 254 ; gender
- db 100 ; unknown
- db 40 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/blissey/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn FAIRY, FAIRY ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, DREAM_EATER, REST, ATTRACT, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/bulbasaur.asm b/data/base_stats/bulbasaur.asm
deleted file mode 100644
index eb4bec3f6..000000000
--- a/data/base_stats/bulbasaur.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db BULBASAUR ; 001
-
- db 45, 49, 49, 45, 65, 65
- ; hp atk def spd sat sdf
-
- db GRASS, POISON
- db 45 ; catch rate
- db 64 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/bulbasaur/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, PLANT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FURY_CUTTER, CUT, FLASH
- ; end
diff --git a/data/base_stats/butterfree.asm b/data/base_stats/butterfree.asm
deleted file mode 100644
index ca1609d1e..000000000
--- a/data/base_stats/butterfree.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db BUTTERFREE ; 012
-
- db 60, 45, 50, 70, 80, 80
- ; hp atk def spd sat sdf
-
- db BUG, FLYING
- db 45 ; catch rate
- db 160 ; base exp
- db NO_ITEM ; item 1
- db SILVERPOWDER ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/butterfree/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, NIGHTMARE, FLASH
- ; end
diff --git a/data/base_stats/caterpie.asm b/data/base_stats/caterpie.asm
deleted file mode 100644
index 47e0b5210..000000000
--- a/data/base_stats/caterpie.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CATERPIE ; 010
-
- db 45, 30, 35, 45, 20, 20
- ; hp atk def spd sat sdf
-
- db BUG, BUG
- db 255 ; catch rate
- db 53 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/caterpie/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm
- ; end
diff --git a/data/base_stats/celebi.asm b/data/base_stats/celebi.asm
deleted file mode 100644
index 2a09691bd..000000000
--- a/data/base_stats/celebi.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CELEBI ; 251
-
- db 100, 100, 100, 100, 100, 100
- ; hp atk def spd sat sdf
-
- db PSYCHIC, GRASS
- db 45 ; catch rate
- db 64 ; base exp
- db NO_ITEM ; item 1
- db MIRACLEBERRY ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 120 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/celebi/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, NIGHTMARE, FLASH
- ; end
diff --git a/data/base_stats/chansey.asm b/data/base_stats/chansey.asm
deleted file mode 100644
index 2ba6091f9..000000000
--- a/data/base_stats/chansey.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CHANSEY ; 113
-
- db 250, 05, 05, 50, 35, 105
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 30 ; catch rate
- db 255 ; base exp
- db NO_ITEM ; item 1
- db LUCKY_EGG ; item 2
- db 254 ; gender
- db 100 ; unknown
- db 40 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/chansey/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn FAIRY, FAIRY ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, DREAM_EATER, REST, ATTRACT, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/charizard.asm b/data/base_stats/charizard.asm
deleted file mode 100644
index d8b1ee769..000000000
--- a/data/base_stats/charizard.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CHARIZARD ; 006
-
- db 78, 84, 78, 100, 109, 85
- ; hp atk def spd sat sdf
-
- db FIRE, FLYING
- db 45 ; catch rate
- db 209 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/charizard/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, REPTILE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DEFENSE_CURL, REST, ATTRACT, STEEL_WING, FIRE_PUNCH, FURY_CUTTER, CUT, FLY, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/charmander.asm b/data/base_stats/charmander.asm
deleted file mode 100644
index ba6822529..000000000
--- a/data/base_stats/charmander.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CHARMANDER ; 004
-
- db 39, 52, 43, 65, 60, 50
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 45 ; catch rate
- db 65 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/charmander/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, REPTILE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/charmeleon.asm b/data/base_stats/charmeleon.asm
deleted file mode 100644
index 0be9be06f..000000000
--- a/data/base_stats/charmeleon.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CHARMELEON ; 005
-
- db 58, 64, 58, 80, 80, 65
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 45 ; catch rate
- db 142 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/charmeleon/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, REPTILE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/chikorita.asm b/data/base_stats/chikorita.asm
deleted file mode 100644
index 74f77ae8f..000000000
--- a/data/base_stats/chikorita.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CHIKORITA ; 152
-
- db 45, 49, 65, 45, 49, 65
- ; hp atk def spd sat sdf
-
- db GRASS, GRASS
- db 45 ; catch rate
- db 64 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/chikorita/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, PLANT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, CUT, FLASH
- ; end
diff --git a/data/base_stats/chinchou.asm b/data/base_stats/chinchou.asm
deleted file mode 100644
index 13fb43872..000000000
--- a/data/base_stats/chinchou.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CHINCHOU ; 170
-
- db 75, 38, 38, 67, 56, 56
- ; hp atk def spd sat sdf
-
- db WATER, ELECTRIC
- db 190 ; catch rate
- db 90 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/chinchou/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn FISH, FISH ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, SURF, FLASH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/clefable.asm b/data/base_stats/clefable.asm
deleted file mode 100644
index ffa07d9dc..000000000
--- a/data/base_stats/clefable.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CLEFABLE ; 036
-
- db 95, 70, 73, 60, 85, 90
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 25 ; catch rate
- db 129 ; base exp
- db MYSTERYBERRY ; item 1
- db MOON_STONE ; item 2
- db 191 ; gender
- db 100 ; unknown
- db 10 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/clefable/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn FAIRY, FAIRY ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/clefairy.asm b/data/base_stats/clefairy.asm
deleted file mode 100644
index ee1f38d04..000000000
--- a/data/base_stats/clefairy.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CLEFAIRY ; 035
-
- db 70, 45, 48, 35, 60, 65
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 150 ; catch rate
- db 68 ; base exp
- db MYSTERYBERRY ; item 1
- db MOON_STONE ; item 2
- db 191 ; gender
- db 100 ; unknown
- db 10 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/clefairy/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn FAIRY, FAIRY ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/cleffa.asm b/data/base_stats/cleffa.asm
deleted file mode 100644
index 3afb4c6c6..000000000
--- a/data/base_stats/cleffa.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CLEFFA ; 173
-
- db 50, 25, 28, 15, 45, 55
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 150 ; catch rate
- db 37 ; base exp
- db MYSTERYBERRY ; item 1
- db MOON_STONE ; item 2
- db 191 ; gender
- db 100 ; unknown
- db 10 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/cleffa/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, NIGHTMARE, FLASH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/cloyster.asm b/data/base_stats/cloyster.asm
deleted file mode 100644
index f7de0467d..000000000
--- a/data/base_stats/cloyster.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CLOYSTER ; 091
-
- db 50, 95, 180, 70, 85, 45
- ; hp atk def spd sat sdf
-
- db WATER, ICE
- db 60 ; catch rate
- db 203 ; base exp
- db PEARL ; item 1
- db BIG_PEARL ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/cloyster/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn INVERTEBRATE, INVERTEBRATE ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/corsola.asm b/data/base_stats/corsola.asm
deleted file mode 100644
index 5a3adde57..000000000
--- a/data/base_stats/corsola.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CORSOLA ; 222
-
- db 55, 55, 85, 35, 65, 85
- ; hp atk def spd sat sdf
-
- db WATER, ROCK
- db 60 ; catch rate
- db 113 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 191 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/corsola/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn AMPHIBIAN, INVERTEBRATE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/crobat.asm b/data/base_stats/crobat.asm
deleted file mode 100644
index 923ca38a9..000000000
--- a/data/base_stats/crobat.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CROBAT ; 169
-
- db 85, 90, 80, 130, 70, 80
- ; hp atk def spd sat sdf
-
- db POISON, FLYING
- db 90 ; catch rate
- db 204 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/crobat/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY
- ; end
diff --git a/data/base_stats/croconaw.asm b/data/base_stats/croconaw.asm
deleted file mode 100644
index 66fb9f10c..000000000
--- a/data/base_stats/croconaw.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CROCONAW ; 159
-
- db 65, 80, 80, 58, 59, 63
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 45 ; catch rate
- db 143 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/croconaw/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/cubone.asm b/data/base_stats/cubone.asm
deleted file mode 100644
index 7c8d32d82..000000000
--- a/data/base_stats/cubone.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CUBONE ; 104
-
- db 50, 50, 95, 35, 40, 50
- ; hp atk def spd sat sdf
-
- db GROUND, GROUND
- db 190 ; catch rate
- db 87 ; base exp
- db NO_ITEM ; item 1
- db THICK_CLUB ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/cubone/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn MONSTER, MONSTER ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER, ICE_BEAM
- ; end
diff --git a/data/base_stats/cyndaquil.asm b/data/base_stats/cyndaquil.asm
deleted file mode 100644
index b1f294907..000000000
--- a/data/base_stats/cyndaquil.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db CYNDAQUIL ; 155
-
- db 39, 52, 43, 65, 60, 50
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 45 ; catch rate
- db 65 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/cyndaquil/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, CUT, FLAMETHROWER
- ; end
diff --git a/data/base_stats/delibird.asm b/data/base_stats/delibird.asm
deleted file mode 100644
index 139bfb66b..000000000
--- a/data/base_stats/delibird.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db DELIBIRD ; 225
-
- db 45, 55, 45, 75, 65, 45
- ; hp atk def spd sat sdf
-
- db ICE, FLYING
- db 45 ; catch rate
- db 183 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/delibird/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn AMPHIBIAN, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, FLY, ICE_BEAM
- ; end
diff --git a/data/base_stats/dewgong.asm b/data/base_stats/dewgong.asm
deleted file mode 100644
index e73de86b3..000000000
--- a/data/base_stats/dewgong.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db DEWGONG ; 087
-
- db 90, 70, 80, 70, 70, 95
- ; hp atk def spd sat sdf
-
- db WATER, ICE
- db 75 ; catch rate
- db 176 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/dewgong/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/diglett.asm b/data/base_stats/diglett.asm
deleted file mode 100644
index 9e9005114..000000000
--- a/data/base_stats/diglett.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db DIGLETT ; 050
-
- db 10, 55, 25, 95, 35, 45
- ; hp atk def spd sat sdf
-
- db GROUND, GROUND
- db 255 ; catch rate
- db 81 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/diglett/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, CUT
- ; end
diff --git a/data/base_stats/ditto.asm b/data/base_stats/ditto.asm
deleted file mode 100644
index 6cbbe60ca..000000000
--- a/data/base_stats/ditto.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db DITTO ; 132
-
- db 48, 48, 48, 48, 48, 48
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 35 ; catch rate
- db 61 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/ditto/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn LADIES_MAN, LADIES_MAN ; egg groups
-
- ; tmhm
- tmhm
- ; end
diff --git a/data/base_stats/dodrio.asm b/data/base_stats/dodrio.asm
deleted file mode 100644
index dd96b10aa..000000000
--- a/data/base_stats/dodrio.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db DODRIO ; 085
-
- db 60, 110, 70, 100, 60, 60
- ; hp atk def spd sat sdf
-
- db NORMAL, FLYING
- db 45 ; catch rate
- db 158 ; base exp
- db NO_ITEM ; item 1
- db SHARP_BEAK ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/dodrio/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, THIEF, STEEL_WING, FLY
- ; end
diff --git a/data/base_stats/doduo.asm b/data/base_stats/doduo.asm
deleted file mode 100644
index 02c1e792a..000000000
--- a/data/base_stats/doduo.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db DODUO ; 084
-
- db 35, 85, 45, 75, 35, 35
- ; hp atk def spd sat sdf
-
- db NORMAL, FLYING
- db 190 ; catch rate
- db 96 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/doduo/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, THIEF, STEEL_WING, FLY
- ; end
diff --git a/data/base_stats/donphan.asm b/data/base_stats/donphan.asm
deleted file mode 100644
index 6e66787e1..000000000
--- a/data/base_stats/donphan.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db DONPHAN ; 232
-
- db 90, 120, 120, 50, 60, 60
- ; hp atk def spd sat sdf
-
- db GROUND, GROUND
- db 60 ; catch rate
- db 189 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/donphan/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, STRENGTH
- ; end
diff --git a/data/base_stats/dragonair.asm b/data/base_stats/dragonair.asm
deleted file mode 100644
index 621b50d51..000000000
--- a/data/base_stats/dragonair.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db DRAGONAIR ; 148
-
- db 61, 84, 65, 70, 70, 70
- ; hp atk def spd sat sdf
-
- db DRAGON, DRAGON
- db 45 ; catch rate
- db 144 ; base exp
- db NO_ITEM ; item 1
- db DRAGON_SCALE ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 40 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/dragonair/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn AMPHIBIAN, REPTILE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DETECT, REST, ATTRACT, SURF, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/dragonite.asm b/data/base_stats/dragonite.asm
deleted file mode 100644
index 83bbbb3eb..000000000
--- a/data/base_stats/dragonite.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db DRAGONITE ; 149
-
- db 91, 134, 95, 80, 100, 100
- ; hp atk def spd sat sdf
-
- db DRAGON, FLYING
- db 45 ; catch rate
- db 218 ; base exp
- db NO_ITEM ; item 1
- db DRAGON_SCALE ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 40 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/dragonite/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn AMPHIBIAN, REPTILE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, THUNDERPUNCH, DETECT, REST, ATTRACT, STEEL_WING, FIRE_PUNCH, FURY_CUTTER, FLY, SURF, STRENGTH, WHIRLPOOL, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/dratini.asm b/data/base_stats/dratini.asm
deleted file mode 100644
index f9cf27faf..000000000
--- a/data/base_stats/dratini.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db DRATINI ; 147
-
- db 41, 64, 45, 50, 50, 50
- ; hp atk def spd sat sdf
-
- db DRAGON, DRAGON
- db 45 ; catch rate
- db 67 ; base exp
- db NO_ITEM ; item 1
- db DRAGON_SCALE ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 40 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/dratini/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn AMPHIBIAN, REPTILE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DETECT, REST, ATTRACT, SURF, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/drowzee.asm b/data/base_stats/drowzee.asm
deleted file mode 100644
index 04d7780bb..000000000
--- a/data/base_stats/drowzee.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db DROWZEE ; 096
-
- db 60, 48, 45, 42, 43, 90
- ; hp atk def spd sat sdf
-
- db PSYCHIC, PSYCHIC
- db 190 ; catch rate
- db 102 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/drowzee/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, FLASH
- ; end
diff --git a/data/base_stats/dugtrio.asm b/data/base_stats/dugtrio.asm
deleted file mode 100644
index 402cc6c03..000000000
--- a/data/base_stats/dugtrio.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db DUGTRIO ; 051
-
- db 35, 80, 50, 120, 50, 70
- ; hp atk def spd sat sdf
-
- db GROUND, GROUND
- db 50 ; catch rate
- db 153 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/dugtrio/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, CUT
- ; end
diff --git a/data/base_stats/dunsparce.asm b/data/base_stats/dunsparce.asm
deleted file mode 100644
index e3ed6a9df..000000000
--- a/data/base_stats/dunsparce.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db DUNSPARCE ; 206
-
- db 100, 70, 70, 45, 65, 65
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 190 ; catch rate
- db 75 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/dunsparce/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, FLAMETHROWER, THUNDERBOLT
- ; end
diff --git a/data/base_stats/eevee.asm b/data/base_stats/eevee.asm
deleted file mode 100644
index 44584c15d..000000000
--- a/data/base_stats/eevee.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db EEVEE ; 133
-
- db 55, 55, 50, 55, 45, 65
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 45 ; catch rate
- db 92 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 35 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/eevee/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT
- ; end
diff --git a/data/base_stats/ekans.asm b/data/base_stats/ekans.asm
deleted file mode 100644
index 0876d169a..000000000
--- a/data/base_stats/ekans.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db EKANS ; 023
-
- db 35, 60, 44, 55, 40, 54
- ; hp atk def spd sat sdf
-
- db POISON, POISON
- db 255 ; catch rate
- db 62 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/ekans/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, REPTILE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, STRENGTH
- ; end
diff --git a/data/base_stats/electabuzz.asm b/data/base_stats/electabuzz.asm
deleted file mode 100644
index 7b690eae2..000000000
--- a/data/base_stats/electabuzz.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ELECTABUZZ ; 125
-
- db 65, 83, 57, 105, 95, 85
- ; hp atk def spd sat sdf
-
- db ELECTRIC, ELECTRIC
- db 45 ; catch rate
- db 156 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 63 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/electabuzz/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, PSYCHIC, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/electrode.asm b/data/base_stats/electrode.asm
deleted file mode 100644
index 3c2895384..000000000
--- a/data/base_stats/electrode.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ELECTRODE ; 101
-
- db 60, 50, 70, 140, 80, 80
- ; hp atk def spd sat sdf
-
- db ELECTRIC, ELECTRIC
- db 60 ; catch rate
- db 150 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/electrode/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INANIMATE, INANIMATE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/elekid.asm b/data/base_stats/elekid.asm
deleted file mode 100644
index 9fae865c6..000000000
--- a/data/base_stats/elekid.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ELEKID ; 239
-
- db 45, 63, 37, 95, 65, 55
- ; hp atk def spd sat sdf
-
- db ELECTRIC, ELECTRIC
- db 45 ; catch rate
- db 106 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 63 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/elekid/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/entei.asm b/data/base_stats/entei.asm
deleted file mode 100644
index c05954720..000000000
--- a/data/base_stats/entei.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ENTEI ; 244
-
- db 115, 115, 85, 100, 90, 75
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 3 ; catch rate
- db 217 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 80 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/entei/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DETECT, REST, CUT, STRENGTH, FLASH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/espeon.asm b/data/base_stats/espeon.asm
deleted file mode 100644
index deebb0902..000000000
--- a/data/base_stats/espeon.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ESPEON ; 196
-
- db 65, 65, 60, 110, 130, 95
- ; hp atk def spd sat sdf
-
- db PSYCHIC, PSYCHIC
- db 45 ; catch rate
- db 197 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 35 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/espeon/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, NIGHTMARE, CUT, FLASH
- ; end
diff --git a/data/base_stats/exeggcute.asm b/data/base_stats/exeggcute.asm
deleted file mode 100644
index 95daf462b..000000000
--- a/data/base_stats/exeggcute.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db EXEGGCUTE ; 102
-
- db 60, 40, 80, 40, 60, 45
- ; hp atk def spd sat sdf
-
- db GRASS, PSYCHIC
- db 90 ; catch rate
- db 98 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/exeggcute/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn PLANT, PLANT ; egg groups
-
- ; tmhm
- tmhm CURSE, ROLLOUT, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, FLASH
- ; end
diff --git a/data/base_stats/exeggutor.asm b/data/base_stats/exeggutor.asm
deleted file mode 100644
index d7561e6eb..000000000
--- a/data/base_stats/exeggutor.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db EXEGGUTOR ; 103
-
- db 95, 95, 85, 55, 125, 65
- ; hp atk def spd sat sdf
-
- db GRASS, PSYCHIC
- db 45 ; catch rate
- db 212 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/exeggutor/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn PLANT, PLANT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, FLASH
- ; end
diff --git a/data/base_stats/farfetch_d.asm b/data/base_stats/farfetch_d.asm
deleted file mode 100644
index 2ab5fb9e8..000000000
--- a/data/base_stats/farfetch_d.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db FARFETCH_D ; 083
-
- db 52, 65, 55, 60, 58, 62
- ; hp atk def spd sat sdf
-
- db NORMAL, FLYING
- db 45 ; catch rate
- db 94 ; base exp
- db NO_ITEM ; item 1
- db STICK ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/farfetch_d/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AVIAN, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, CUT, FLY
- ; end
diff --git a/data/base_stats/fearow.asm b/data/base_stats/fearow.asm
deleted file mode 100644
index 6cb670332..000000000
--- a/data/base_stats/fearow.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db FEAROW ; 022
-
- db 65, 90, 65, 100, 61, 61
- ; hp atk def spd sat sdf
-
- db NORMAL, FLYING
- db 90 ; catch rate
- db 162 ; base exp
- db NO_ITEM ; item 1
- db SHARP_BEAK ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/fearow/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY
- ; end
diff --git a/data/base_stats/feraligatr.asm b/data/base_stats/feraligatr.asm
deleted file mode 100644
index 758fdb1da..000000000
--- a/data/base_stats/feraligatr.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db FERALIGATR ; 160
-
- db 85, 105, 100, 78, 79, 83
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 45 ; catch rate
- db 210 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/feraligatr/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/flaaffy.asm b/data/base_stats/flaaffy.asm
deleted file mode 100644
index 936ee3b1d..000000000
--- a/data/base_stats/flaaffy.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db FLAAFFY ; 180
-
- db 70, 55, 55, 45, 80, 60
- ; hp atk def spd sat sdf
-
- db ELECTRIC, ELECTRIC
- db 120 ; catch rate
- db 117 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/flaaffy/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, STRENGTH, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/flareon.asm b/data/base_stats/flareon.asm
deleted file mode 100644
index 345b9a385..000000000
--- a/data/base_stats/flareon.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db FLAREON ; 136
-
- db 65, 130, 60, 65, 95, 110
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 45 ; catch rate
- db 198 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 35 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/flareon/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DETECT, REST, ATTRACT, FLAMETHROWER
- ; end
diff --git a/data/base_stats/forretress.asm b/data/base_stats/forretress.asm
deleted file mode 100644
index ab36e1827..000000000
--- a/data/base_stats/forretress.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db FORRETRESS ; 205
-
- db 75, 90, 140, 40, 60, 60
- ; hp atk def spd sat sdf
-
- db BUG, STEEL
- db 75 ; catch rate
- db 118 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/forretress/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, STRENGTH
- ; end
diff --git a/data/base_stats/furret.asm b/data/base_stats/furret.asm
deleted file mode 100644
index 75180036c..000000000
--- a/data/base_stats/furret.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db FURRET ; 162
-
- db 85, 76, 64, 90, 45, 55
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 90 ; catch rate
- db 116 ; base exp
- db BERRY ; item 1
- db GOLD_BERRY ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/furret/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, CUT, SURF, STRENGTH
- ; end
diff --git a/data/base_stats/gastly.asm b/data/base_stats/gastly.asm
deleted file mode 100644
index dcec2fdca..000000000
--- a/data/base_stats/gastly.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GASTLY ; 092
-
- db 30, 35, 30, 80, 100, 35
- ; hp atk def spd sat sdf
-
- db GHOST, POISON
- db 190 ; catch rate
- db 95 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/gastly/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn AMORPHOUS, AMORPHOUS ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC, SHADOW_BALL, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, THUNDERBOLT
- ; end
diff --git a/data/base_stats/gengar.asm b/data/base_stats/gengar.asm
deleted file mode 100644
index 5fe8894ef..000000000
--- a/data/base_stats/gengar.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GENGAR ; 094
-
- db 60, 65, 60, 110, 130, 75
- ; hp atk def spd sat sdf
-
- db GHOST, POISON
- db 45 ; catch rate
- db 190 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/gengar/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn AMORPHOUS, AMORPHOUS ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, STRENGTH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/geodude.asm b/data/base_stats/geodude.asm
deleted file mode 100644
index 2b472bafc..000000000
--- a/data/base_stats/geodude.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GEODUDE ; 074
-
- db 40, 80, 100, 20, 30, 30
- ; hp atk def spd sat sdf
-
- db ROCK, GROUND
- db 255 ; catch rate
- db 86 ; base exp
- db NO_ITEM ; item 1
- db EVERSTONE ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/geodude/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn INANIMATE, INANIMATE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/girafarig.asm b/data/base_stats/girafarig.asm
deleted file mode 100644
index 3180513f7..000000000
--- a/data/base_stats/girafarig.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GIRAFARIG ; 203
-
- db 70, 80, 65, 85, 90, 65
- ; hp atk def spd sat sdf
-
- db NORMAL, PSYCHIC
- db 60 ; catch rate
- db 149 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/girafarig/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/gligar.asm b/data/base_stats/gligar.asm
deleted file mode 100644
index 3197e0203..000000000
--- a/data/base_stats/gligar.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GLIGAR ; 207
-
- db 65, 75, 105, 85, 35, 65
- ; hp atk def spd sat sdf
-
- db GROUND, FLYING
- db 60 ; catch rate
- db 108 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/gligar/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, SWIFT, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH
- ; end
diff --git a/data/base_stats/gloom.asm b/data/base_stats/gloom.asm
deleted file mode 100644
index d67f73d54..000000000
--- a/data/base_stats/gloom.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GLOOM ; 044
-
- db 60, 65, 70, 40, 85, 75
- ; hp atk def spd sat sdf
-
- db GRASS, POISON
- db 120 ; catch rate
- db 132 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/gloom/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn PLANT, PLANT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
- ; end
diff --git a/data/base_stats/golbat.asm b/data/base_stats/golbat.asm
deleted file mode 100644
index be69af4cf..000000000
--- a/data/base_stats/golbat.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GOLBAT ; 042
-
- db 75, 80, 70, 90, 65, 75
- ; hp atk def spd sat sdf
-
- db POISON, FLYING
- db 90 ; catch rate
- db 171 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/golbat/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING
- ; end
diff --git a/data/base_stats/goldeen.asm b/data/base_stats/goldeen.asm
deleted file mode 100644
index 3769ce1b6..000000000
--- a/data/base_stats/goldeen.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GOLDEEN ; 118
-
- db 45, 67, 60, 63, 35, 50
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 225 ; catch rate
- db 111 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/goldeen/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FISH, FISH ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/golduck.asm b/data/base_stats/golduck.asm
deleted file mode 100644
index b32d538b5..000000000
--- a/data/base_stats/golduck.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GOLDUCK ; 055
-
- db 80, 82, 78, 85, 95, 80
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 75 ; catch rate
- db 174 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/golduck/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, FURY_CUTTER, SURF, STRENGTH, FLASH, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/golem.asm b/data/base_stats/golem.asm
deleted file mode 100644
index b8fb85054..000000000
--- a/data/base_stats/golem.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GOLEM ; 076
-
- db 80, 110, 130, 45, 55, 65
- ; hp atk def spd sat sdf
-
- db ROCK, GROUND
- db 45 ; catch rate
- db 177 ; base exp
- db NO_ITEM ; item 1
- db EVERSTONE ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/golem/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn INANIMATE, INANIMATE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/granbull.asm b/data/base_stats/granbull.asm
deleted file mode 100644
index c2dcda517..000000000
--- a/data/base_stats/granbull.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GRANBULL ; 210
-
- db 90, 120, 75, 45, 60, 60
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 75 ; catch rate
- db 178 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 191 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/granbull/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn FIELD, FAIRY ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/graveler.asm b/data/base_stats/graveler.asm
deleted file mode 100644
index 17e4e8905..000000000
--- a/data/base_stats/graveler.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GRAVELER ; 075
-
- db 55, 95, 115, 35, 45, 45
- ; hp atk def spd sat sdf
-
- db ROCK, GROUND
- db 120 ; catch rate
- db 134 ; base exp
- db NO_ITEM ; item 1
- db EVERSTONE ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/graveler/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn INANIMATE, INANIMATE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/grimer.asm b/data/base_stats/grimer.asm
deleted file mode 100644
index 7fb64eb07..000000000
--- a/data/base_stats/grimer.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GRIMER ; 088
-
- db 80, 80, 50, 25, 40, 50
- ; hp atk def spd sat sdf
-
- db POISON, POISON
- db 190 ; catch rate
- db 90 ; base exp
- db NO_ITEM ; item 1
- db NUGGET ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/grimer/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMORPHOUS, AMORPHOUS ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, FLAMETHROWER, THUNDERBOLT
- ; end
diff --git a/data/base_stats/growlithe.asm b/data/base_stats/growlithe.asm
deleted file mode 100644
index a5e8676f6..000000000
--- a/data/base_stats/growlithe.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GROWLITHE ; 058
-
- db 55, 70, 45, 60, 70, 50
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 190 ; catch rate
- db 91 ; base exp
- db BURNT_BERRY ; item 1
- db BURNT_BERRY ; item 2
- db 63 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/growlithe/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER
- ; end
diff --git a/data/base_stats/gyarados.asm b/data/base_stats/gyarados.asm
deleted file mode 100644
index 9b57391c5..000000000
--- a/data/base_stats/gyarados.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db GYARADOS ; 130
-
- db 95, 125, 79, 81, 60, 100
- ; hp atk def spd sat sdf
-
- db WATER, FLYING
- db 45 ; catch rate
- db 214 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 5 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/gyarados/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn FISH, REPTILE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, DRAGONBREATH, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/haunter.asm b/data/base_stats/haunter.asm
deleted file mode 100644
index 76f18a739..000000000
--- a/data/base_stats/haunter.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db HAUNTER ; 093
-
- db 45, 50, 45, 95, 115, 55
- ; hp atk def spd sat sdf
-
- db GHOST, POISON
- db 90 ; catch rate
- db 126 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/haunter/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn AMORPHOUS, AMORPHOUS ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC, SHADOW_BALL, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, THUNDERBOLT
- ; end
diff --git a/data/base_stats/heracross.asm b/data/base_stats/heracross.asm
deleted file mode 100644
index 5d625bf58..000000000
--- a/data/base_stats/heracross.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db HERACROSS ; 214
-
- db 80, 125, 75, 85, 40, 95
- ; hp atk def spd sat sdf
-
- db BUG, FIGHTING
- db 45 ; catch rate
- db 200 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/heracross/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH
- ; end
diff --git a/data/base_stats/hitmonchan.asm b/data/base_stats/hitmonchan.asm
deleted file mode 100644
index dbad48c61..000000000
--- a/data/base_stats/hitmonchan.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db HITMONCHAN ; 107
-
- db 50, 105, 79, 76, 35, 110
- ; hp atk def spd sat sdf
-
- db FIGHTING, FIGHTING
- db 45 ; catch rate
- db 140 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 0 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/hitmonchan/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH
- ; end
diff --git a/data/base_stats/hitmonlee.asm b/data/base_stats/hitmonlee.asm
deleted file mode 100644
index 2a7c5a553..000000000
--- a/data/base_stats/hitmonlee.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db HITMONLEE ; 106
-
- db 50, 120, 53, 87, 35, 110
- ; hp atk def spd sat sdf
-
- db FIGHTING, FIGHTING
- db 45 ; catch rate
- db 139 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 0 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/hitmonlee/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STRENGTH
- ; end
diff --git a/data/base_stats/hitmontop.asm b/data/base_stats/hitmontop.asm
deleted file mode 100644
index b4e33a3ee..000000000
--- a/data/base_stats/hitmontop.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db HITMONTOP ; 237
-
- db 50, 95, 95, 70, 35, 110
- ; hp atk def spd sat sdf
-
- db FIGHTING, FIGHTING
- db 45 ; catch rate
- db 138 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 0 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/hitmontop/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STRENGTH
- ; end
diff --git a/data/base_stats/ho_oh.asm b/data/base_stats/ho_oh.asm
deleted file mode 100644
index 5e58d46ae..000000000
--- a/data/base_stats/ho_oh.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db HO_OH ; 250
-
- db 106, 130, 90, 90, 110, 154
- ; hp atk def spd sat sdf
-
- db FIRE, FLYING
- db 3 ; catch rate
- db 220 ; base exp
- db SACRED_ASH ; item 1
- db SACRED_ASH ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 120 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/ho_oh/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, DRAGONBREATH, THUNDER, EARTHQUAKE, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DREAM_EATER, DETECT, REST, STEEL_WING, NIGHTMARE, FLY, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT
- ; end
diff --git a/data/base_stats/hoothoot.asm b/data/base_stats/hoothoot.asm
deleted file mode 100644
index 1af3a01db..000000000
--- a/data/base_stats/hoothoot.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db HOOTHOOT ; 163
-
- db 60, 30, 30, 50, 36, 56
- ; hp atk def spd sat sdf
-
- db NORMAL, FLYING
- db 255 ; catch rate
- db 58 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/hoothoot/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, STEEL_WING, NIGHTMARE, FLY, FLASH
- ; end
diff --git a/data/base_stats/hoppip.asm b/data/base_stats/hoppip.asm
deleted file mode 100644
index ad2bb7a02..000000000
--- a/data/base_stats/hoppip.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db HOPPIP ; 187
-
- db 35, 35, 40, 50, 35, 55
- ; hp atk def spd sat sdf
-
- db GRASS, FLYING
- db 255 ; catch rate
- db 74 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/hoppip/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn FAIRY, PLANT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FLASH
- ; end
diff --git a/data/base_stats/horsea.asm b/data/base_stats/horsea.asm
deleted file mode 100644
index 5a4e06b84..000000000
--- a/data/base_stats/horsea.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db HORSEA ; 116
-
- db 30, 40, 70, 60, 70, 25
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 225 ; catch rate
- db 83 ; base exp
- db NO_ITEM ; item 1
- db DRAGON_SCALE ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/horsea/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, REPTILE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, DRAGONBREATH, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/houndoom.asm b/data/base_stats/houndoom.asm
deleted file mode 100644
index 82271238c..000000000
--- a/data/base_stats/houndoom.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db HOUNDOOM ; 229
-
- db 75, 90, 50, 95, 110, 80
- ; hp atk def spd sat sdf
-
- db DARK, FIRE
- db 45 ; catch rate
- db 204 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/houndoom/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/houndour.asm b/data/base_stats/houndour.asm
deleted file mode 100644
index 6f97bd086..000000000
--- a/data/base_stats/houndour.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db HOUNDOUR ; 228
-
- db 45, 60, 30, 65, 80, 50
- ; hp atk def spd sat sdf
-
- db DARK, FIRE
- db 120 ; catch rate
- db 114 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/houndour/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, FLAMETHROWER
- ; end
diff --git a/data/base_stats/hypno.asm b/data/base_stats/hypno.asm
deleted file mode 100644
index 1bf322d95..000000000
--- a/data/base_stats/hypno.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db HYPNO ; 097
-
- db 85, 73, 70, 67, 73, 115
- ; hp atk def spd sat sdf
-
- db PSYCHIC, PSYCHIC
- db 75 ; catch rate
- db 165 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/hypno/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, FLASH
- ; end
diff --git a/data/base_stats/igglybuff.asm b/data/base_stats/igglybuff.asm
deleted file mode 100644
index 1951f5aa0..000000000
--- a/data/base_stats/igglybuff.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db IGGLYBUFF ; 174
-
- db 90, 30, 15, 15, 40, 20
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 170 ; catch rate
- db 39 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 191 ; gender
- db 100 ; unknown
- db 10 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/igglybuff/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, NIGHTMARE, FLASH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/ivysaur.asm b/data/base_stats/ivysaur.asm
deleted file mode 100644
index 032c2408c..000000000
--- a/data/base_stats/ivysaur.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db IVYSAUR ; 002
-
- db 60, 62, 63, 60, 80, 80
- ; hp atk def spd sat sdf
-
- db GRASS, POISON
- db 45 ; catch rate
- db 141 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/ivysaur/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, PLANT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FURY_CUTTER, CUT, FLASH
- ; end
diff --git a/data/base_stats/jigglypuff.asm b/data/base_stats/jigglypuff.asm
deleted file mode 100644
index 66ab23227..000000000
--- a/data/base_stats/jigglypuff.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db JIGGLYPUFF ; 039
-
- db 115, 45, 20, 20, 45, 25
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 170 ; catch rate
- db 76 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 191 ; gender
- db 100 ; unknown
- db 10 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/jigglypuff/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn FAIRY, FAIRY ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/jolteon.asm b/data/base_stats/jolteon.asm
deleted file mode 100644
index 3f956946a..000000000
--- a/data/base_stats/jolteon.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db JOLTEON ; 135
-
- db 65, 65, 60, 130, 110, 95
- ; hp atk def spd sat sdf
-
- db ELECTRIC, ELECTRIC
- db 45 ; catch rate
- db 197 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 35 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/jolteon/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/jumpluff.asm b/data/base_stats/jumpluff.asm
deleted file mode 100644
index 7a857dec4..000000000
--- a/data/base_stats/jumpluff.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db JUMPLUFF ; 189
-
- db 75, 55, 70, 110, 55, 85
- ; hp atk def spd sat sdf
-
- db GRASS, FLYING
- db 45 ; catch rate
- db 176 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/jumpluff/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn FAIRY, PLANT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FLASH
- ; end
diff --git a/data/base_stats/jynx.asm b/data/base_stats/jynx.asm
deleted file mode 100644
index 054dca9ae..000000000
--- a/data/base_stats/jynx.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db JYNX ; 124
-
- db 65, 50, 35, 95, 115, 95
- ; hp atk def spd sat sdf
-
- db ICE, PSYCHIC
- db 45 ; catch rate
- db 137 ; base exp
- db ICE_BERRY ; item 1
- db ICE_BERRY ; item 2
- db 254 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/jynx/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SWEET_SCENT, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, ICE_BEAM
- ; end
diff --git a/data/base_stats/kabuto.asm b/data/base_stats/kabuto.asm
deleted file mode 100644
index 024f2791d..000000000
--- a/data/base_stats/kabuto.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db KABUTO ; 140
-
- db 30, 80, 90, 55, 55, 45
- ; hp atk def spd sat sdf
-
- db ROCK, WATER
- db 45 ; catch rate
- db 119 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 30 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/kabuto/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, INVERTEBRATE ; egg groups
-
- ; tmhm
- tmhm CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, THIEF, ICE_BEAM
- ; end
diff --git a/data/base_stats/kabutops.asm b/data/base_stats/kabutops.asm
deleted file mode 100644
index 3c5076954..000000000
--- a/data/base_stats/kabutops.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db KABUTOPS ; 141
-
- db 60, 115, 105, 80, 65, 70
- ; hp atk def spd sat sdf
-
- db ROCK, WATER
- db 45 ; catch rate
- db 201 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 30 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/kabutops/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, INVERTEBRATE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, SURF, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/kadabra.asm b/data/base_stats/kadabra.asm
deleted file mode 100644
index bf5f33638..000000000
--- a/data/base_stats/kadabra.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db KADABRA ; 064
-
- db 40, 35, 30, 105, 120, 70
- ; hp atk def spd sat sdf
-
- db PSYCHIC, PSYCHIC
- db 100 ; catch rate
- db 145 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 63 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/kadabra/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DIG, PSYCHIC, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, FLASH
- ; end
diff --git a/data/base_stats/kakuna.asm b/data/base_stats/kakuna.asm
deleted file mode 100644
index 827e17262..000000000
--- a/data/base_stats/kakuna.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db KAKUNA ; 014
-
- db 45, 25, 50, 35, 25, 25
- ; hp atk def spd sat sdf
-
- db BUG, POISON
- db 120 ; catch rate
- db 71 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/kakuna/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm
- ; end
diff --git a/data/base_stats/kangaskhan.asm b/data/base_stats/kangaskhan.asm
deleted file mode 100644
index ca6094ad7..000000000
--- a/data/base_stats/kangaskhan.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db KANGASKHAN ; 115
-
- db 105, 95, 80, 90, 40, 80
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 45 ; catch rate
- db 175 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 254 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/kangaskhan/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn MONSTER, MONSTER ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/kingdra.asm b/data/base_stats/kingdra.asm
deleted file mode 100644
index ac4dfd659..000000000
--- a/data/base_stats/kingdra.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db KINGDRA ; 230
-
- db 75, 95, 95, 85, 95, 95
- ; hp atk def spd sat sdf
-
- db WATER, DRAGON
- db 45 ; catch rate
- db 207 ; base exp
- db NO_ITEM ; item 1
- db DRAGON_SCALE ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/kingdra/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, REPTILE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, DRAGONBREATH, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/kingler.asm b/data/base_stats/kingler.asm
deleted file mode 100644
index 65c3344ac..000000000
--- a/data/base_stats/kingler.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db KINGLER ; 099
-
- db 55, 130, 115, 75, 50, 50
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 60 ; catch rate
- db 206 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/kingler/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INVERTEBRATE, INVERTEBRATE ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/koffing.asm b/data/base_stats/koffing.asm
deleted file mode 100644
index b46e8241e..000000000
--- a/data/base_stats/koffing.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db KOFFING ; 109
-
- db 40, 65, 95, 35, 60, 45
- ; hp atk def spd sat sdf
-
- db POISON, POISON
- db 190 ; catch rate
- db 114 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/koffing/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMORPHOUS, AMORPHOUS ; egg groups
-
- ; tmhm
- tmhm CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, REST, ATTRACT, THIEF, FLAMETHROWER, THUNDERBOLT
- ; end
diff --git a/data/base_stats/krabby.asm b/data/base_stats/krabby.asm
deleted file mode 100644
index 517d3bd07..000000000
--- a/data/base_stats/krabby.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db KRABBY ; 098
-
- db 30, 105, 90, 50, 25, 25
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 225 ; catch rate
- db 115 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/krabby/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INVERTEBRATE, INVERTEBRATE ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/lanturn.asm b/data/base_stats/lanturn.asm
deleted file mode 100644
index f4dd4cd3a..000000000
--- a/data/base_stats/lanturn.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db LANTURN ; 171
-
- db 125, 58, 58, 67, 76, 76
- ; hp atk def spd sat sdf
-
- db WATER, ELECTRIC
- db 75 ; catch rate
- db 156 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/lanturn/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn FISH, FISH ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, SURF, FLASH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/lapras.asm b/data/base_stats/lapras.asm
deleted file mode 100644
index e57154bc6..000000000
--- a/data/base_stats/lapras.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db LAPRAS ; 131
-
- db 130, 85, 80, 60, 85, 95
- ; hp atk def spd sat sdf
-
- db WATER, ICE
- db 45 ; catch rate
- db 219 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 40 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/lapras/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn MONSTER, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, RETURN, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, NIGHTMARE, SURF, STRENGTH, WHIRLPOOL, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/larvitar.asm b/data/base_stats/larvitar.asm
deleted file mode 100644
index 03a9be50f..000000000
--- a/data/base_stats/larvitar.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db LARVITAR ; 246
-
- db 50, 64, 50, 41, 45, 50
- ; hp atk def spd sat sdf
-
- db ROCK, GROUND
- db 45 ; catch rate
- db 67 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 40 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/larvitar/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn MONSTER, MONSTER ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DETECT, REST, ATTRACT
- ; end
diff --git a/data/base_stats/ledian.asm b/data/base_stats/ledian.asm
deleted file mode 100644
index a1ca61629..000000000
--- a/data/base_stats/ledian.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db LEDIAN ; 166
-
- db 55, 35, 50, 85, 55, 110
- ; hp atk def spd sat sdf
-
- db BUG, FLYING
- db 90 ; catch rate
- db 134 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/ledian/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, REST, ATTRACT, THIEF, FLASH
- ; end
diff --git a/data/base_stats/ledyba.asm b/data/base_stats/ledyba.asm
deleted file mode 100644
index a01e329b1..000000000
--- a/data/base_stats/ledyba.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db LEDYBA ; 165
-
- db 40, 20, 30, 55, 40, 80
- ; hp atk def spd sat sdf
-
- db BUG, FLYING
- db 255 ; catch rate
- db 54 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/ledyba/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, REST, ATTRACT, THIEF, FLASH
- ; end
diff --git a/data/base_stats/lickitung.asm b/data/base_stats/lickitung.asm
deleted file mode 100644
index 8b915bc59..000000000
--- a/data/base_stats/lickitung.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db LICKITUNG ; 108
-
- db 90, 55, 75, 30, 60, 75
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 45 ; catch rate
- db 127 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/lickitung/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn MONSTER, MONSTER ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, CUT, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/lugia.asm b/data/base_stats/lugia.asm
deleted file mode 100644
index 26f337e2a..000000000
--- a/data/base_stats/lugia.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db LUGIA ; 249
-
- db 106, 90, 130, 110, 90, 154
- ; hp atk def spd sat sdf
-
- db PSYCHIC, FLYING
- db 3 ; catch rate
- db 220 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 120 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/lugia/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, EARTHQUAKE, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DREAM_EATER, DETECT, REST, STEEL_WING, NIGHTMARE, FLY, SURF, STRENGTH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/machamp.asm b/data/base_stats/machamp.asm
deleted file mode 100644
index 056ce3945..000000000
--- a/data/base_stats/machamp.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MACHAMP ; 068
-
- db 90, 130, 80, 55, 65, 85
- ; hp atk def spd sat sdf
-
- db FIGHTING, FIGHTING
- db 45 ; catch rate
- db 193 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 63 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/machamp/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/machoke.asm b/data/base_stats/machoke.asm
deleted file mode 100644
index 3fdec0eb2..000000000
--- a/data/base_stats/machoke.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MACHOKE ; 067
-
- db 80, 100, 70, 45, 50, 60
- ; hp atk def spd sat sdf
-
- db FIGHTING, FIGHTING
- db 90 ; catch rate
- db 146 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 63 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/machoke/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/machop.asm b/data/base_stats/machop.asm
deleted file mode 100644
index bdde42528..000000000
--- a/data/base_stats/machop.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MACHOP ; 066
-
- db 70, 80, 50, 35, 35, 35
- ; hp atk def spd sat sdf
-
- db FIGHTING, FIGHTING
- db 180 ; catch rate
- db 88 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 63 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/machop/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/magby.asm b/data/base_stats/magby.asm
deleted file mode 100644
index 876bceb3f..000000000
--- a/data/base_stats/magby.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MAGBY ; 240
-
- db 45, 75, 37, 83, 70, 55
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 45 ; catch rate
- db 117 ; base exp
- db BURNT_BERRY ; item 1
- db BURNT_BERRY ; item 2
- db 63 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/magby/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, PSYCHIC, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/magcargo.asm b/data/base_stats/magcargo.asm
deleted file mode 100644
index bdbd0ca97..000000000
--- a/data/base_stats/magcargo.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MAGCARGO ; 219
-
- db 50, 50, 120, 30, 80, 80
- ; hp atk def spd sat sdf
-
- db FIRE, ROCK
- db 75 ; catch rate
- db 154 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/magcargo/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMORPHOUS, AMORPHOUS ; egg groups
-
- ; tmhm
- tmhm CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/magikarp.asm b/data/base_stats/magikarp.asm
deleted file mode 100644
index 5d489fbff..000000000
--- a/data/base_stats/magikarp.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MAGIKARP ; 129
-
- db 20, 10, 55, 80, 15, 20
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 255 ; catch rate
- db 20 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 5 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/magikarp/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn FISH, REPTILE ; egg groups
-
- ; tmhm
- tmhm
- ; end
diff --git a/data/base_stats/magmar.asm b/data/base_stats/magmar.asm
deleted file mode 100644
index 3c27ad670..000000000
--- a/data/base_stats/magmar.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MAGMAR ; 126
-
- db 65, 95, 57, 93, 100, 85
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 45 ; catch rate
- db 167 ; base exp
- db BURNT_BERRY ; item 1
- db BURNT_BERRY ; item 2
- db 63 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/magmar/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, PSYCHIC, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/magnemite.asm b/data/base_stats/magnemite.asm
deleted file mode 100644
index 78a3ddea6..000000000
--- a/data/base_stats/magnemite.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MAGNEMITE ; 081
-
- db 25, 35, 70, 45, 95, 55
- ; hp atk def spd sat sdf
-
- db ELECTRIC, STEEL
- db 190 ; catch rate
- db 89 ; base exp
- db NO_ITEM ; item 1
- db METAL_COAT ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/magnemite/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INANIMATE, INANIMATE ; egg groups
-
- ; tmhm
- tmhm CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/magneton.asm b/data/base_stats/magneton.asm
deleted file mode 100644
index 8b9158bba..000000000
--- a/data/base_stats/magneton.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MAGNETON ; 082
-
- db 50, 60, 95, 70, 120, 70
- ; hp atk def spd sat sdf
-
- db ELECTRIC, STEEL
- db 60 ; catch rate
- db 161 ; base exp
- db NO_ITEM ; item 1
- db METAL_COAT ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/magneton/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INANIMATE, INANIMATE ; egg groups
-
- ; tmhm
- tmhm CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/mankey.asm b/data/base_stats/mankey.asm
deleted file mode 100644
index 7ee15d3f7..000000000
--- a/data/base_stats/mankey.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MANKEY ; 056
-
- db 40, 80, 35, 70, 35, 45
- ; hp atk def spd sat sdf
-
- db FIGHTING, FIGHTING
- db 190 ; catch rate
- db 74 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/mankey/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/mantine.asm b/data/base_stats/mantine.asm
deleted file mode 100644
index e8730d787..000000000
--- a/data/base_stats/mantine.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MANTINE ; 226
-
- db 65, 40, 70, 70, 80, 140
- ; hp atk def spd sat sdf
-
- db WATER, FLYING
- db 25 ; catch rate
- db 168 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/mantine/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn AMPHIBIAN, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/mareep.asm b/data/base_stats/mareep.asm
deleted file mode 100644
index 366863245..000000000
--- a/data/base_stats/mareep.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MAREEP ; 179
-
- db 55, 40, 40, 35, 65, 45
- ; hp atk def spd sat sdf
-
- db ELECTRIC, ELECTRIC
- db 235 ; catch rate
- db 59 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/mareep/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/marill.asm b/data/base_stats/marill.asm
deleted file mode 100644
index 7d9f4ce8a..000000000
--- a/data/base_stats/marill.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MARILL ; 183
-
- db 70, 20, 50, 40, 20, 50
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 190 ; catch rate
- db 58 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/marill/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn AMPHIBIAN, FAIRY ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/marowak.asm b/data/base_stats/marowak.asm
deleted file mode 100644
index 76b7e4870..000000000
--- a/data/base_stats/marowak.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MAROWAK ; 105
-
- db 60, 80, 110, 45, 50, 80
- ; hp atk def spd sat sdf
-
- db GROUND, GROUND
- db 75 ; catch rate
- db 124 ; base exp
- db NO_ITEM ; item 1
- db THICK_CLUB ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/marowak/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn MONSTER, MONSTER ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER, ICE_BEAM
- ; end
diff --git a/data/base_stats/meganium.asm b/data/base_stats/meganium.asm
deleted file mode 100644
index 57f228c28..000000000
--- a/data/base_stats/meganium.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MEGANIUM ; 154
-
- db 80, 82, 100, 80, 83, 100
- ; hp atk def spd sat sdf
-
- db GRASS, GRASS
- db 45 ; catch rate
- db 208 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/meganium/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, PLANT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, STRENGTH, FLASH
- ; end
diff --git a/data/base_stats/meowth.asm b/data/base_stats/meowth.asm
deleted file mode 100644
index f795aa4c2..000000000
--- a/data/base_stats/meowth.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MEOWTH ; 052
-
- db 40, 45, 35, 90, 40, 40
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 255 ; catch rate
- db 69 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/meowth/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, THUNDERBOLT
- ; end
diff --git a/data/base_stats/metapod.asm b/data/base_stats/metapod.asm
deleted file mode 100644
index deb7bc8e7..000000000
--- a/data/base_stats/metapod.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db METAPOD ; 011
-
- db 50, 20, 55, 30, 25, 25
- ; hp atk def spd sat sdf
-
- db BUG, BUG
- db 120 ; catch rate
- db 72 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/metapod/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm
- ; end
diff --git a/data/base_stats/mew.asm b/data/base_stats/mew.asm
deleted file mode 100644
index 7544467c7..000000000
--- a/data/base_stats/mew.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MEW ; 151
-
- db 100, 100, 100, 100, 100, 100
- ; hp atk def spd sat sdf
-
- db PSYCHIC, PSYCHIC
- db 45 ; catch rate
- db 64 ; base exp
- db NO_ITEM ; item 1
- db MIRACLEBERRY ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 120 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/mew/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, DRAGONBREATH, THUNDER, EARTHQUAKE, RETURN, DIG, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, FIRE_BLAST, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FIRE_PUNCH, FURY_CUTTER, NIGHTMARE, CUT, FLY, SURF, STRENGTH, FLASH, WHIRLPOOL, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/mewtwo.asm b/data/base_stats/mewtwo.asm
deleted file mode 100644
index 61e01c32c..000000000
--- a/data/base_stats/mewtwo.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MEWTWO ; 150
-
- db 106, 110, 90, 130, 154, 90
- ; hp atk def spd sat sdf
-
- db PSYCHIC, PSYCHIC
- db 3 ; catch rate
- db 220 ; base exp
- db NO_ITEM ; item 1
- db BERSERK_GENE ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 120 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/mewtwo/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, THUNDERPUNCH, DREAM_EATER, DETECT, REST, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/miltank.asm b/data/base_stats/miltank.asm
deleted file mode 100644
index 7083c15c7..000000000
--- a/data/base_stats/miltank.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MILTANK ; 241
-
- db 95, 80, 105, 100, 40, 70
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 45 ; catch rate
- db 200 ; base exp
- db MOOMOO_MILK ; item 1
- db MOOMOO_MILK ; item 2
- db 254 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/miltank/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, SURF, STRENGTH, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/misdreavus.asm b/data/base_stats/misdreavus.asm
deleted file mode 100644
index 5811aa665..000000000
--- a/data/base_stats/misdreavus.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MISDREAVUS ; 200
-
- db 60, 60, 60, 85, 85, 85
- ; hp atk def spd sat sdf
-
- db GHOST, GHOST
- db 45 ; catch rate
- db 147 ; base exp
- db NO_ITEM ; item 1
- db SPELL_TAG ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/misdreavus/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn AMORPHOUS, AMORPHOUS ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC, SHADOW_BALL, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/moltres.asm b/data/base_stats/moltres.asm
deleted file mode 100644
index 13eb7e7af..000000000
--- a/data/base_stats/moltres.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MOLTRES ; 146
-
- db 90, 100, 90, 90, 125, 85
- ; hp atk def spd sat sdf
-
- db FIRE, FLYING
- db 3 ; catch rate
- db 217 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 80 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/moltres/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DETECT, REST, STEEL_WING, FLY, FLAMETHROWER
- ; end
diff --git a/data/base_stats/mr__mime.asm b/data/base_stats/mr__mime.asm
deleted file mode 100644
index 3a271baf4..000000000
--- a/data/base_stats/mr__mime.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MR__MIME ; 122
-
- db 40, 45, 65, 90, 100, 120
- ; hp atk def spd sat sdf
-
- db PSYCHIC, PSYCHIC
- db 45 ; catch rate
- db 136 ; base exp
- db NO_ITEM ; item 1
- db MYSTERYBERRY ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/mr__mime/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn HUMANSHAPE, HUMANSHAPE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/muk.asm b/data/base_stats/muk.asm
deleted file mode 100644
index 7669e59b0..000000000
--- a/data/base_stats/muk.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MUK ; 089
-
- db 105, 105, 75, 50, 65, 100
- ; hp atk def spd sat sdf
-
- db POISON, POISON
- db 75 ; catch rate
- db 157 ; base exp
- db NO_ITEM ; item 1
- db NUGGET ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/muk/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMORPHOUS, AMORPHOUS ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, FLAMETHROWER, THUNDERBOLT
- ; end
diff --git a/data/base_stats/murkrow.asm b/data/base_stats/murkrow.asm
deleted file mode 100644
index 08a1d7143..000000000
--- a/data/base_stats/murkrow.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db MURKROW ; 198
-
- db 60, 85, 42, 91, 85, 42
- ; hp atk def spd sat sdf
-
- db DARK, FLYING
- db 30 ; catch rate
- db 107 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/murkrow/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, STEEL_WING, NIGHTMARE, FLY
- ; end
diff --git a/data/base_stats/natu.asm b/data/base_stats/natu.asm
deleted file mode 100644
index 2f65b73ba..000000000
--- a/data/base_stats/natu.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db NATU ; 177
-
- db 40, 50, 45, 70, 70, 45
- ; hp atk def spd sat sdf
-
- db PSYCHIC, FLYING
- db 190 ; catch rate
- db 73 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/natu/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, FLASH
- ; end
diff --git a/data/base_stats/nidoking.asm b/data/base_stats/nidoking.asm
deleted file mode 100644
index a5d6abef0..000000000
--- a/data/base_stats/nidoking.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db NIDOKING ; 034
-
- db 81, 92, 77, 85, 85, 75
- ; hp atk def spd sat sdf
-
- db POISON, GROUND
- db 45 ; catch rate
- db 195 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 0 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/nidoking/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/nidoqueen.asm b/data/base_stats/nidoqueen.asm
deleted file mode 100644
index cf888b7eb..000000000
--- a/data/base_stats/nidoqueen.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db NIDOQUEEN ; 031
-
- db 90, 82, 87, 76, 75, 85
- ; hp atk def spd sat sdf
-
- db POISON, GROUND
- db 45 ; catch rate
- db 194 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 254 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/nidoqueen/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/nidoran_f.asm b/data/base_stats/nidoran_f.asm
deleted file mode 100644
index e80b622c9..000000000
--- a/data/base_stats/nidoran_f.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db NIDORAN_F ; 029
-
- db 55, 47, 52, 41, 40, 40
- ; hp atk def spd sat sdf
-
- db POISON, POISON
- db 235 ; catch rate
- db 59 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 254 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/nidoran_f/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, THUNDERBOLT
- ; end
diff --git a/data/base_stats/nidoran_m.asm b/data/base_stats/nidoran_m.asm
deleted file mode 100644
index 1029a2511..000000000
--- a/data/base_stats/nidoran_m.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db NIDORAN_M ; 032
-
- db 46, 57, 40, 50, 40, 40
- ; hp atk def spd sat sdf
-
- db POISON, POISON
- db 235 ; catch rate
- db 60 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 0 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/nidoran_m/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, THUNDERBOLT
- ; end
diff --git a/data/base_stats/nidorina.asm b/data/base_stats/nidorina.asm
deleted file mode 100644
index 3ca843e85..000000000
--- a/data/base_stats/nidorina.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db NIDORINA ; 030
-
- db 70, 62, 67, 56, 55, 55
- ; hp atk def spd sat sdf
-
- db POISON, POISON
- db 120 ; catch rate
- db 117 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 254 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/nidorina/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, STRENGTH, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/nidorino.asm b/data/base_stats/nidorino.asm
deleted file mode 100644
index c853ef943..000000000
--- a/data/base_stats/nidorino.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db NIDORINO ; 033
-
- db 61, 72, 57, 65, 55, 55
- ; hp atk def spd sat sdf
-
- db POISON, POISON
- db 120 ; catch rate
- db 118 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 0 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/nidorino/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, STRENGTH, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/ninetales.asm b/data/base_stats/ninetales.asm
deleted file mode 100644
index c651f8c57..000000000
--- a/data/base_stats/ninetales.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db NINETALES ; 038
-
- db 73, 76, 75, 100, 81, 100
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 75 ; catch rate
- db 178 ; base exp
- db BURNT_BERRY ; item 1
- db BURNT_BERRY ; item 2
- db 191 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/ninetales/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER
- ; end
diff --git a/data/base_stats/noctowl.asm b/data/base_stats/noctowl.asm
deleted file mode 100644
index 7c97fd769..000000000
--- a/data/base_stats/noctowl.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db NOCTOWL ; 164
-
- db 100, 50, 50, 70, 76, 96
- ; hp atk def spd sat sdf
-
- db NORMAL, FLYING
- db 90 ; catch rate
- db 162 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/noctowl/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, STEEL_WING, NIGHTMARE, FLY, FLASH
- ; end
diff --git a/data/base_stats/octillery.asm b/data/base_stats/octillery.asm
deleted file mode 100644
index 1d64afa82..000000000
--- a/data/base_stats/octillery.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db OCTILLERY ; 224
-
- db 75, 105, 75, 45, 105, 75
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 75 ; catch rate
- db 164 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/octillery/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, FISH ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, FLAMETHROWER, ICE_BEAM
- ; end
diff --git a/data/base_stats/oddish.asm b/data/base_stats/oddish.asm
deleted file mode 100644
index dc91485b6..000000000
--- a/data/base_stats/oddish.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ODDISH ; 043
-
- db 45, 50, 55, 30, 75, 65
- ; hp atk def spd sat sdf
-
- db GRASS, POISON
- db 255 ; catch rate
- db 78 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/oddish/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn PLANT, PLANT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
- ; end
diff --git a/data/base_stats/omanyte.asm b/data/base_stats/omanyte.asm
deleted file mode 100644
index 0e511f244..000000000
--- a/data/base_stats/omanyte.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db OMANYTE ; 138
-
- db 35, 40, 100, 35, 90, 55
- ; hp atk def spd sat sdf
-
- db ROCK, WATER
- db 45 ; catch rate
- db 120 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 30 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/omanyte/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, INVERTEBRATE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/omastar.asm b/data/base_stats/omastar.asm
deleted file mode 100644
index 7e35a8987..000000000
--- a/data/base_stats/omastar.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db OMASTAR ; 139
-
- db 70, 60, 125, 55, 115, 70
- ; hp atk def spd sat sdf
-
- db ROCK, WATER
- db 45 ; catch rate
- db 199 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 30 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/omastar/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, INVERTEBRATE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/onix.asm b/data/base_stats/onix.asm
deleted file mode 100644
index f67c1eb86..000000000
--- a/data/base_stats/onix.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ONIX ; 095
-
- db 35, 45, 160, 70, 30, 45
- ; hp atk def spd sat sdf
-
- db ROCK, GROUND
- db 45 ; catch rate
- db 108 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/onix/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INANIMATE, INANIMATE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, STRENGTH
- ; end
diff --git a/data/base_stats/paras.asm b/data/base_stats/paras.asm
deleted file mode 100644
index 4994aa8dd..000000000
--- a/data/base_stats/paras.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PARAS ; 046
-
- db 35, 70, 55, 25, 45, 55
- ; hp atk def spd sat sdf
-
- db BUG, GRASS
- db 190 ; catch rate
- db 70 ; base exp
- db TINYMUSHROOM ; item 1
- db BIG_MUSHROOM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/paras/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, PLANT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, FLASH
- ; end
diff --git a/data/base_stats/parasect.asm b/data/base_stats/parasect.asm
deleted file mode 100644
index 310eba07f..000000000
--- a/data/base_stats/parasect.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PARASECT ; 047
-
- db 60, 95, 80, 30, 60, 80
- ; hp atk def spd sat sdf
-
- db BUG, GRASS
- db 75 ; catch rate
- db 128 ; base exp
- db TINYMUSHROOM ; item 1
- db BIG_MUSHROOM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/parasect/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, PLANT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, FLASH
- ; end
diff --git a/data/base_stats/persian.asm b/data/base_stats/persian.asm
deleted file mode 100644
index f76ecaaae..000000000
--- a/data/base_stats/persian.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PERSIAN ; 053
-
- db 65, 70, 60, 115, 65, 65
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 90 ; catch rate
- db 148 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/persian/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, THUNDERBOLT
- ; end
diff --git a/data/base_stats/phanpy.asm b/data/base_stats/phanpy.asm
deleted file mode 100644
index 08ff39595..000000000
--- a/data/base_stats/phanpy.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PHANPY ; 231
-
- db 90, 60, 60, 40, 40, 40
- ; hp atk def spd sat sdf
-
- db GROUND, GROUND
- db 120 ; catch rate
- db 124 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/phanpy/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, STRENGTH
- ; end
diff --git a/data/base_stats/pichu.asm b/data/base_stats/pichu.asm
deleted file mode 100644
index dbadc22d3..000000000
--- a/data/base_stats/pichu.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PICHU ; 172
-
- db 20, 40, 15, 60, 35, 35
- ; hp atk def spd sat sdf
-
- db ELECTRIC, ELECTRIC
- db 190 ; catch rate
- db 42 ; base exp
- db NO_ITEM ; item 1
- db BERRY ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 10 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/pichu/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/pidgeot.asm b/data/base_stats/pidgeot.asm
deleted file mode 100644
index 1024b6624..000000000
--- a/data/base_stats/pidgeot.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PIDGEOT ; 018
-
- db 83, 80, 75, 91, 70, 70
- ; hp atk def spd sat sdf
-
- db NORMAL, FLYING
- db 45 ; catch rate
- db 172 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/pidgeot/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY
- ; end
diff --git a/data/base_stats/pidgeotto.asm b/data/base_stats/pidgeotto.asm
deleted file mode 100644
index 8e9d434a3..000000000
--- a/data/base_stats/pidgeotto.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PIDGEOTTO ; 017
-
- db 63, 60, 55, 71, 50, 50
- ; hp atk def spd sat sdf
-
- db NORMAL, FLYING
- db 120 ; catch rate
- db 113 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/pidgeotto/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY
- ; end
diff --git a/data/base_stats/pidgey.asm b/data/base_stats/pidgey.asm
deleted file mode 100644
index d5f8fa630..000000000
--- a/data/base_stats/pidgey.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PIDGEY ; 016
-
- db 40, 45, 40, 56, 35, 35
- ; hp atk def spd sat sdf
-
- db NORMAL, FLYING
- db 255 ; catch rate
- db 55 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/pidgey/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY
- ; end
diff --git a/data/base_stats/pikachu.asm b/data/base_stats/pikachu.asm
deleted file mode 100644
index 5875b1ea7..000000000
--- a/data/base_stats/pikachu.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PIKACHU ; 025
-
- db 35, 55, 30, 90, 50, 40
- ; hp atk def spd sat sdf
-
- db ELECTRIC, ELECTRIC
- db 190 ; catch rate
- db 82 ; base exp
- db NO_ITEM ; item 1
- db BERRY ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 10 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/pikachu/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FAIRY ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, STRENGTH, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/piloswine.asm b/data/base_stats/piloswine.asm
deleted file mode 100644
index 3da32746b..000000000
--- a/data/base_stats/piloswine.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PILOSWINE ; 221
-
- db 100, 100, 80, 50, 60, 60
- ; hp atk def spd sat sdf
-
- db ICE, GROUND
- db 75 ; catch rate
- db 160 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/piloswine/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, STRENGTH, ICE_BEAM
- ; end
diff --git a/data/base_stats/pineco.asm b/data/base_stats/pineco.asm
deleted file mode 100644
index 43289701c..000000000
--- a/data/base_stats/pineco.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PINECO ; 204
-
- db 50, 65, 90, 15, 35, 35
- ; hp atk def spd sat sdf
-
- db BUG, BUG
- db 190 ; catch rate
- db 60 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/pineco/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, STRENGTH
- ; end
diff --git a/data/base_stats/pinsir.asm b/data/base_stats/pinsir.asm
deleted file mode 100644
index cd07cde27..000000000
--- a/data/base_stats/pinsir.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PINSIR ; 127
-
- db 65, 125, 100, 85, 55, 70
- ; hp atk def spd sat sdf
-
- db BUG, BUG
- db 45 ; catch rate
- db 200 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/pinsir/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH
- ; end
diff --git a/data/base_stats/politoed.asm b/data/base_stats/politoed.asm
deleted file mode 100644
index 8b510fc8f..000000000
--- a/data/base_stats/politoed.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db POLITOED ; 186
-
- db 90, 75, 75, 70, 90, 100
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 45 ; catch rate
- db 185 ; base exp
- db NO_ITEM ; item 1
- db KINGS_ROCK ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/politoed/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn AMPHIBIAN, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/poliwag.asm b/data/base_stats/poliwag.asm
deleted file mode 100644
index abcab97e2..000000000
--- a/data/base_stats/poliwag.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db POLIWAG ; 060
-
- db 40, 50, 40, 90, 40, 40
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 255 ; catch rate
- db 77 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/poliwag/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn AMPHIBIAN, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/poliwhirl.asm b/data/base_stats/poliwhirl.asm
deleted file mode 100644
index c2aac43f7..000000000
--- a/data/base_stats/poliwhirl.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db POLIWHIRL ; 061
-
- db 65, 65, 65, 90, 50, 50
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 120 ; catch rate
- db 131 ; base exp
- db NO_ITEM ; item 1
- db KINGS_ROCK ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/poliwhirl/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn AMPHIBIAN, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/poliwrath.asm b/data/base_stats/poliwrath.asm
deleted file mode 100644
index 1e3130078..000000000
--- a/data/base_stats/poliwrath.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db POLIWRATH ; 062
-
- db 90, 85, 95, 70, 70, 90
- ; hp atk def spd sat sdf
-
- db WATER, FIGHTING
- db 45 ; catch rate
- db 185 ; base exp
- db NO_ITEM ; item 1
- db KINGS_ROCK ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/poliwrath/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn AMPHIBIAN, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/ponyta.asm b/data/base_stats/ponyta.asm
deleted file mode 100644
index 2366b1b12..000000000
--- a/data/base_stats/ponyta.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PONYTA ; 077
-
- db 50, 85, 55, 90, 65, 65
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 190 ; catch rate
- db 152 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/ponyta/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER
- ; end
diff --git a/data/base_stats/porygon.asm b/data/base_stats/porygon.asm
deleted file mode 100644
index 340c79af1..000000000
--- a/data/base_stats/porygon.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PORYGON ; 137
-
- db 65, 60, 70, 40, 85, 75
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 45 ; catch rate
- db 130 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/porygon/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INANIMATE, INANIMATE ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, REST, THIEF, NIGHTMARE, FLASH, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/porygon2.asm b/data/base_stats/porygon2.asm
deleted file mode 100644
index 6c5a518a7..000000000
--- a/data/base_stats/porygon2.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PORYGON2 ; 233
-
- db 85, 80, 90, 60, 105, 95
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 45 ; catch rate
- db 180 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/porygon2/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INANIMATE, INANIMATE ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, REST, THIEF, NIGHTMARE, FLASH, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/primeape.asm b/data/base_stats/primeape.asm
deleted file mode 100644
index 4abd0b68f..000000000
--- a/data/base_stats/primeape.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PRIMEAPE ; 057
-
- db 65, 105, 60, 95, 60, 70
- ; hp atk def spd sat sdf
-
- db FIGHTING, FIGHTING
- db 75 ; catch rate
- db 149 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/primeape/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/psyduck.asm b/data/base_stats/psyduck.asm
deleted file mode 100644
index bbd0e64e3..000000000
--- a/data/base_stats/psyduck.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PSYDUCK ; 054
-
- db 50, 52, 48, 55, 65, 50
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 190 ; catch rate
- db 80 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/psyduck/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, STRENGTH, FLASH, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/pupitar.asm b/data/base_stats/pupitar.asm
deleted file mode 100644
index 643b88e34..000000000
--- a/data/base_stats/pupitar.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db PUPITAR ; 247
-
- db 70, 84, 70, 51, 65, 70
- ; hp atk def spd sat sdf
-
- db ROCK, GROUND
- db 45 ; catch rate
- db 144 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 40 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/pupitar/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn MONSTER, MONSTER ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DETECT, REST, ATTRACT
- ; end
diff --git a/data/base_stats/quagsire.asm b/data/base_stats/quagsire.asm
deleted file mode 100644
index 3e65ce4a1..000000000
--- a/data/base_stats/quagsire.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db QUAGSIRE ; 195
-
- db 95, 85, 85, 35, 65, 65
- ; hp atk def spd sat sdf
-
- db WATER, GROUND
- db 90 ; catch rate
- db 137 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/quagsire/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, FLASH, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/quilava.asm b/data/base_stats/quilava.asm
deleted file mode 100644
index f1d9a8b3c..000000000
--- a/data/base_stats/quilava.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db QUILAVA ; 156
-
- db 58, 64, 58, 80, 80, 65
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 45 ; catch rate
- db 142 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/quilava/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/qwilfish.asm b/data/base_stats/qwilfish.asm
deleted file mode 100644
index 5308e60ef..000000000
--- a/data/base_stats/qwilfish.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db QWILFISH ; 211
-
- db 65, 95, 75, 85, 55, 55
- ; hp atk def spd sat sdf
-
- db WATER, POISON
- db 45 ; catch rate
- db 100 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/qwilfish/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FISH, FISH ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SWIFT, DEFENSE_CURL, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/raichu.asm b/data/base_stats/raichu.asm
deleted file mode 100644
index aefc56713..000000000
--- a/data/base_stats/raichu.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db RAICHU ; 026
-
- db 60, 90, 55, 100, 90, 80
- ; hp atk def spd sat sdf
-
- db ELECTRIC, ELECTRIC
- db 75 ; catch rate
- db 122 ; base exp
- db NO_ITEM ; item 1
- db BERRY ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 10 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/raichu/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FAIRY ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, STRENGTH, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/raikou.asm b/data/base_stats/raikou.asm
deleted file mode 100644
index 26966258d..000000000
--- a/data/base_stats/raikou.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db RAIKOU ; 243
-
- db 90, 85, 75, 115, 115, 100
- ; hp atk def spd sat sdf
-
- db ELECTRIC, ELECTRIC
- db 3 ; catch rate
- db 216 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 80 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/raikou/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, CUT, STRENGTH, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/rapidash.asm b/data/base_stats/rapidash.asm
deleted file mode 100644
index a55f7cd36..000000000
--- a/data/base_stats/rapidash.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db RAPIDASH ; 078
-
- db 65, 100, 70, 105, 80, 80
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 60 ; catch rate
- db 192 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/rapidash/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER
- ; end
diff --git a/data/base_stats/raticate.asm b/data/base_stats/raticate.asm
deleted file mode 100644
index 6248cf4ca..000000000
--- a/data/base_stats/raticate.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db RATICATE ; 020
-
- db 55, 81, 60, 97, 50, 70
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 90 ; catch rate
- db 116 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/raticate/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, THIEF, CUT, STRENGTH, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/rattata.asm b/data/base_stats/rattata.asm
deleted file mode 100644
index 0fb688d58..000000000
--- a/data/base_stats/rattata.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db RATTATA ; 019
-
- db 30, 56, 35, 72, 25, 35
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 255 ; catch rate
- db 57 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/rattata/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, THIEF
- ; end
diff --git a/data/base_stats/remoraid.asm b/data/base_stats/remoraid.asm
deleted file mode 100644
index 4af024564..000000000
--- a/data/base_stats/remoraid.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db REMORAID ; 223
-
- db 35, 65, 35, 65, 65, 35
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 190 ; catch rate
- db 78 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/remoraid/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, FISH ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, FLAMETHROWER, ICE_BEAM
- ; end
diff --git a/data/base_stats/rhydon.asm b/data/base_stats/rhydon.asm
deleted file mode 100644
index 8890718a5..000000000
--- a/data/base_stats/rhydon.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db RHYDON ; 112
-
- db 105, 130, 120, 40, 45, 45
- ; hp atk def spd sat sdf
-
- db GROUND, ROCK
- db 60 ; catch rate
- db 204 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/rhydon/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn MONSTER, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/rhyhorn.asm b/data/base_stats/rhyhorn.asm
deleted file mode 100644
index 33cff8b54..000000000
--- a/data/base_stats/rhyhorn.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db RHYHORN ; 111
-
- db 80, 85, 95, 25, 30, 30
- ; hp atk def spd sat sdf
-
- db GROUND, ROCK
- db 120 ; catch rate
- db 135 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/rhyhorn/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn MONSTER, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, REST, ATTRACT, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/sandshrew.asm b/data/base_stats/sandshrew.asm
deleted file mode 100644
index f2148f9fa..000000000
--- a/data/base_stats/sandshrew.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SANDSHREW ; 027
-
- db 50, 75, 85, 40, 20, 30
- ; hp atk def spd sat sdf
-
- db GROUND, GROUND
- db 255 ; catch rate
- db 93 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/sandshrew/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH
- ; end
diff --git a/data/base_stats/sandslash.asm b/data/base_stats/sandslash.asm
deleted file mode 100644
index ae4c38df0..000000000
--- a/data/base_stats/sandslash.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SANDSLASH ; 028
-
- db 75, 100, 110, 65, 45, 55
- ; hp atk def spd sat sdf
-
- db GROUND, GROUND
- db 90 ; catch rate
- db 163 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/sandslash/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH
- ; end
diff --git a/data/base_stats/scizor.asm b/data/base_stats/scizor.asm
deleted file mode 100644
index c05fa7aca..000000000
--- a/data/base_stats/scizor.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SCIZOR ; 212
-
- db 70, 130, 100, 65, 55, 80
- ; hp atk def spd sat sdf
-
- db BUG, STEEL
- db 25 ; catch rate
- db 200 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/scizor/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FURY_CUTTER, CUT, STRENGTH
- ; end
diff --git a/data/base_stats/scyther.asm b/data/base_stats/scyther.asm
deleted file mode 100644
index e01386c6e..000000000
--- a/data/base_stats/scyther.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SCYTHER ; 123
-
- db 70, 110, 80, 105, 55, 80
- ; hp atk def spd sat sdf
-
- db BUG, FLYING
- db 45 ; catch rate
- db 187 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/scyther/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FURY_CUTTER, CUT
- ; end
diff --git a/data/base_stats/seadra.asm b/data/base_stats/seadra.asm
deleted file mode 100644
index b242641c3..000000000
--- a/data/base_stats/seadra.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SEADRA ; 117
-
- db 55, 65, 95, 85, 95, 45
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 75 ; catch rate
- db 155 ; base exp
- db NO_ITEM ; item 1
- db DRAGON_SCALE ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/seadra/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, REPTILE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, DRAGONBREATH, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/seaking.asm b/data/base_stats/seaking.asm
deleted file mode 100644
index 381c61298..000000000
--- a/data/base_stats/seaking.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SEAKING ; 119
-
- db 80, 92, 65, 68, 65, 80
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 60 ; catch rate
- db 170 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/seaking/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FISH, FISH ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/seel.asm b/data/base_stats/seel.asm
deleted file mode 100644
index 2589fc272..000000000
--- a/data/base_stats/seel.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SEEL ; 086
-
- db 65, 45, 55, 45, 45, 70
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 190 ; catch rate
- db 100 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/seel/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/sentret.asm b/data/base_stats/sentret.asm
deleted file mode 100644
index 25c7b779c..000000000
--- a/data/base_stats/sentret.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SENTRET ; 161
-
- db 35, 46, 34, 20, 35, 45
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 255 ; catch rate
- db 57 ; base exp
- db NO_ITEM ; item 1
- db BERRY ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/sentret/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, CUT, SURF
- ; end
diff --git a/data/base_stats/shellder.asm b/data/base_stats/shellder.asm
deleted file mode 100644
index 7d7f801d7..000000000
--- a/data/base_stats/shellder.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SHELLDER ; 090
-
- db 30, 65, 100, 40, 45, 25
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 190 ; catch rate
- db 97 ; base exp
- db PEARL ; item 1
- db BIG_PEARL ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/shellder/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn INVERTEBRATE, INVERTEBRATE ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/shuckle.asm b/data/base_stats/shuckle.asm
deleted file mode 100644
index 9f2cee33b..000000000
--- a/data/base_stats/shuckle.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SHUCKLE ; 213
-
- db 20, 10, 230, 05, 10, 230
- ; hp atk def spd sat sdf
-
- db BUG, ROCK
- db 190 ; catch rate
- db 80 ; base exp
- db BERRY ; item 1
- db BERRY ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/shuckle/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, STRENGTH, FLASH
- ; end
diff --git a/data/base_stats/skarmory.asm b/data/base_stats/skarmory.asm
deleted file mode 100644
index 106cee7f3..000000000
--- a/data/base_stats/skarmory.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SKARMORY ; 227
-
- db 65, 80, 140, 70, 40, 70
- ; hp atk def spd sat sdf
-
- db STEEL, FLYING
- db 25 ; catch rate
- db 168 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/skarmory/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, CUT, FLY
- ; end
diff --git a/data/base_stats/skiploom.asm b/data/base_stats/skiploom.asm
deleted file mode 100644
index 2920f19f0..000000000
--- a/data/base_stats/skiploom.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SKIPLOOM ; 188
-
- db 55, 45, 50, 80, 45, 65
- ; hp atk def spd sat sdf
-
- db GRASS, FLYING
- db 120 ; catch rate
- db 136 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/skiploom/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn FAIRY, PLANT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FLASH
- ; end
diff --git a/data/base_stats/slowbro.asm b/data/base_stats/slowbro.asm
deleted file mode 100644
index 7c6520d8a..000000000
--- a/data/base_stats/slowbro.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SLOWBRO ; 080
-
- db 95, 75, 110, 30, 100, 80
- ; hp atk def spd sat sdf
-
- db WATER, PSYCHIC
- db 75 ; catch rate
- db 164 ; base exp
- db NO_ITEM ; item 1
- db KINGS_ROCK ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/slowbro/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn MONSTER, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DREAM_EATER, REST, ATTRACT, FURY_CUTTER, NIGHTMARE, SURF, STRENGTH, FLASH, FLAMETHROWER, ICE_BEAM
- ; end
diff --git a/data/base_stats/slowking.asm b/data/base_stats/slowking.asm
deleted file mode 100644
index 4974b23c5..000000000
--- a/data/base_stats/slowking.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SLOWKING ; 199
-
- db 95, 75, 80, 30, 100, 110
- ; hp atk def spd sat sdf
-
- db WATER, PSYCHIC
- db 70 ; catch rate
- db 164 ; base exp
- db NO_ITEM ; item 1
- db KINGS_ROCK ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/slowking/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn MONSTER, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DREAM_EATER, REST, ATTRACT, FURY_CUTTER, NIGHTMARE, SURF, STRENGTH, FLASH, WHIRLPOOL, FLAMETHROWER, ICE_BEAM
- ; end
diff --git a/data/base_stats/slowpoke.asm b/data/base_stats/slowpoke.asm
deleted file mode 100644
index 4ad676ab0..000000000
--- a/data/base_stats/slowpoke.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SLOWPOKE ; 079
-
- db 90, 65, 65, 15, 40, 40
- ; hp atk def spd sat sdf
-
- db WATER, PSYCHIC
- db 190 ; catch rate
- db 99 ; base exp
- db NO_ITEM ; item 1
- db KINGS_ROCK ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/slowpoke/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn MONSTER, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DREAM_EATER, REST, ATTRACT, NIGHTMARE, SURF, STRENGTH, FLASH, FLAMETHROWER, ICE_BEAM
- ; end
diff --git a/data/base_stats/slugma.asm b/data/base_stats/slugma.asm
deleted file mode 100644
index 52da7221f..000000000
--- a/data/base_stats/slugma.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SLUGMA ; 218
-
- db 40, 40, 40, 20, 70, 40
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 190 ; catch rate
- db 78 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/slugma/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMORPHOUS, AMORPHOUS ; egg groups
-
- ; tmhm
- tmhm CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, FLAMETHROWER
- ; end
diff --git a/data/base_stats/smeargle.asm b/data/base_stats/smeargle.asm
deleted file mode 100644
index e3011c8d2..000000000
--- a/data/base_stats/smeargle.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SMEARGLE ; 235
-
- db 55, 20, 35, 75, 20, 45
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 45 ; catch rate
- db 106 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/smeargle/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm
- ; end
diff --git a/data/base_stats/smoochum.asm b/data/base_stats/smoochum.asm
deleted file mode 100644
index 985a52a19..000000000
--- a/data/base_stats/smoochum.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SMOOCHUM ; 238
-
- db 45, 30, 15, 65, 85, 65
- ; hp atk def spd sat sdf
-
- db ICE, PSYCHIC
- db 45 ; catch rate
- db 87 ; base exp
- db ICE_BERRY ; item 1
- db ICE_BERRY ; item 2
- db 254 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/smoochum/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SWEET_SCENT, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, ICE_BEAM
- ; end
diff --git a/data/base_stats/sneasel.asm b/data/base_stats/sneasel.asm
deleted file mode 100644
index eb62897eb..000000000
--- a/data/base_stats/sneasel.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SNEASEL ; 215
-
- db 55, 95, 55, 115, 35, 75
- ; hp atk def spd sat sdf
-
- db DARK, ICE
- db 60 ; catch rate
- db 132 ; base exp
- db NO_ITEM ; item 1
- db QUICK_CLAW ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/sneasel/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, NIGHTMARE, CUT, SURF, STRENGTH, ICE_BEAM
- ; end
diff --git a/data/base_stats/snorlax.asm b/data/base_stats/snorlax.asm
deleted file mode 100644
index e04cd1442..000000000
--- a/data/base_stats/snorlax.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SNORLAX ; 143
-
- db 160, 110, 65, 30, 65, 110
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 25 ; catch rate
- db 154 ; base exp
- db LEFTOVERS ; item 1
- db LEFTOVERS ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 40 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/snorlax/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn MONSTER, MONSTER ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, EARTHQUAKE, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/snubbull.asm b/data/base_stats/snubbull.asm
deleted file mode 100644
index 3ac629f26..000000000
--- a/data/base_stats/snubbull.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SNUBBULL ; 209
-
- db 60, 80, 50, 30, 40, 40
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 190 ; catch rate
- db 63 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 191 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/snubbull/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn FIELD, FAIRY ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/spearow.asm b/data/base_stats/spearow.asm
deleted file mode 100644
index 4321aa799..000000000
--- a/data/base_stats/spearow.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SPEAROW ; 021
-
- db 40, 60, 30, 70, 31, 31
- ; hp atk def spd sat sdf
-
- db NORMAL, FLYING
- db 255 ; catch rate
- db 58 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/spearow/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY
- ; end
diff --git a/data/base_stats/spinarak.asm b/data/base_stats/spinarak.asm
deleted file mode 100644
index 7f00a4677..000000000
--- a/data/base_stats/spinarak.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SPINARAK ; 167
-
- db 40, 60, 40, 30, 40, 40
- ; hp atk def spd sat sdf
-
- db BUG, POISON
- db 255 ; catch rate
- db 54 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/spinarak/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, FLASH
- ; end
diff --git a/data/base_stats/squirtle.asm b/data/base_stats/squirtle.asm
deleted file mode 100644
index 06484e52c..000000000
--- a/data/base_stats/squirtle.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SQUIRTLE ; 007
-
- db 44, 48, 65, 43, 50, 64
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 45 ; catch rate
- db 66 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/squirtle/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/stantler.asm b/data/base_stats/stantler.asm
deleted file mode 100644
index 911e1904f..000000000
--- a/data/base_stats/stantler.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db STANTLER ; 234
-
- db 73, 95, 62, 85, 85, 65
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 45 ; catch rate
- db 165 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/stantler/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, FLASH
- ; end
diff --git a/data/base_stats/starmie.asm b/data/base_stats/starmie.asm
deleted file mode 100644
index dbc2122bb..000000000
--- a/data/base_stats/starmie.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db STARMIE ; 121
-
- db 60, 75, 85, 115, 100, 85
- ; hp atk def spd sat sdf
-
- db WATER, PSYCHIC
- db 60 ; catch rate
- db 207 ; base exp
- db STARDUST ; item 1
- db STAR_PIECE ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/starmie/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn INVERTEBRATE, INVERTEBRATE ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, REST, ATTRACT, NIGHTMARE, SURF, FLASH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/staryu.asm b/data/base_stats/staryu.asm
deleted file mode 100644
index 6d0d90eb3..000000000
--- a/data/base_stats/staryu.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db STARYU ; 120
-
- db 30, 45, 55, 85, 70, 55
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 225 ; catch rate
- db 106 ; base exp
- db STARDUST ; item 1
- db STAR_PIECE ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/staryu/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn INVERTEBRATE, INVERTEBRATE ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, FLASH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/steelix.asm b/data/base_stats/steelix.asm
deleted file mode 100644
index f740d0c02..000000000
--- a/data/base_stats/steelix.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db STEELIX ; 208
-
- db 75, 85, 200, 30, 55, 65
- ; hp atk def spd sat sdf
-
- db STEEL, GROUND
- db 25 ; catch rate
- db 196 ; base exp
- db NO_ITEM ; item 1
- db METAL_COAT ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/steelix/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INANIMATE, INANIMATE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, CUT, STRENGTH
- ; end
diff --git a/data/base_stats/sudowoodo.asm b/data/base_stats/sudowoodo.asm
deleted file mode 100644
index 6ddc4cd57..000000000
--- a/data/base_stats/sudowoodo.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SUDOWOODO ; 185
-
- db 70, 100, 115, 30, 30, 65
- ; hp atk def spd sat sdf
-
- db ROCK, ROCK
- db 65 ; catch rate
- db 135 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/sudowoodo/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INANIMATE, INANIMATE ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH
- ; end
diff --git a/data/base_stats/suicune.asm b/data/base_stats/suicune.asm
deleted file mode 100644
index 6262bd513..000000000
--- a/data/base_stats/suicune.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SUICUNE ; 245
-
- db 100, 75, 115, 85, 90, 115
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 3 ; catch rate
- db 215 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 80 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/suicune/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, CUT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/sunflora.asm b/data/base_stats/sunflora.asm
deleted file mode 100644
index d8f01ebad..000000000
--- a/data/base_stats/sunflora.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SUNFLORA ; 192
-
- db 75, 75, 55, 30, 105, 85
- ; hp atk def spd sat sdf
-
- db GRASS, GRASS
- db 120 ; catch rate
- db 146 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/sunflora/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn PLANT, PLANT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
- ; end
diff --git a/data/base_stats/sunkern.asm b/data/base_stats/sunkern.asm
deleted file mode 100644
index 2cab9d9a1..000000000
--- a/data/base_stats/sunkern.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SUNKERN ; 191
-
- db 30, 30, 30, 30, 30, 30
- ; hp atk def spd sat sdf
-
- db GRASS, GRASS
- db 235 ; catch rate
- db 52 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/sunkern/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn PLANT, PLANT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
- ; end
diff --git a/data/base_stats/swinub.asm b/data/base_stats/swinub.asm
deleted file mode 100644
index 70b389b30..000000000
--- a/data/base_stats/swinub.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db SWINUB ; 220
-
- db 50, 50, 40, 50, 30, 30
- ; hp atk def spd sat sdf
-
- db ICE, GROUND
- db 225 ; catch rate
- db 78 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/swinub/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, STRENGTH, ICE_BEAM
- ; end
diff --git a/data/base_stats/tangela.asm b/data/base_stats/tangela.asm
deleted file mode 100644
index d379fdb92..000000000
--- a/data/base_stats/tangela.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db TANGELA ; 114
-
- db 65, 55, 115, 60, 100, 40
- ; hp atk def spd sat sdf
-
- db GRASS, GRASS
- db 45 ; catch rate
- db 166 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/tangela/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn PLANT, PLANT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, CUT, FLASH
- ; end
diff --git a/data/base_stats/tauros.asm b/data/base_stats/tauros.asm
deleted file mode 100644
index 365de3f8d..000000000
--- a/data/base_stats/tauros.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db TAUROS ; 128
-
- db 75, 100, 95, 110, 40, 70
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 45 ; catch rate
- db 211 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 0 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/tauros/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, REST, ATTRACT, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/teddiursa.asm b/data/base_stats/teddiursa.asm
deleted file mode 100644
index 0269d4c68..000000000
--- a/data/base_stats/teddiursa.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db TEDDIURSA ; 216
-
- db 60, 80, 50, 40, 50, 50
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 120 ; catch rate
- db 124 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/teddiursa/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH
- ; end
diff --git a/data/base_stats/tentacool.asm b/data/base_stats/tentacool.asm
deleted file mode 100644
index e225309e5..000000000
--- a/data/base_stats/tentacool.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db TENTACOOL ; 072
-
- db 40, 40, 35, 70, 50, 100
- ; hp atk def spd sat sdf
-
- db WATER, POISON
- db 190 ; catch rate
- db 105 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/tentacool/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn INVERTEBRATE, INVERTEBRATE ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, SURF, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/tentacruel.asm b/data/base_stats/tentacruel.asm
deleted file mode 100644
index 22b2a3808..000000000
--- a/data/base_stats/tentacruel.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db TENTACRUEL ; 073
-
- db 80, 70, 65, 100, 80, 120
- ; hp atk def spd sat sdf
-
- db WATER, POISON
- db 60 ; catch rate
- db 205 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/tentacruel/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn INVERTEBRATE, INVERTEBRATE ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, SURF, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/togepi.asm b/data/base_stats/togepi.asm
deleted file mode 100644
index 1bf6cc339..000000000
--- a/data/base_stats/togepi.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db TOGEPI ; 175
-
- db 35, 20, 65, 20, 40, 65
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 190 ; catch rate
- db 74 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 10 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/togepi/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, FLASH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/togetic.asm b/data/base_stats/togetic.asm
deleted file mode 100644
index f8330c50f..000000000
--- a/data/base_stats/togetic.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db TOGETIC ; 176
-
- db 55, 40, 85, 40, 80, 105
- ; hp atk def spd sat sdf
-
- db NORMAL, FLYING
- db 75 ; catch rate
- db 114 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 10 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/togetic/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn AVIAN, FAIRY ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, STEEL_WING, FLY, FLASH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/totodile.asm b/data/base_stats/totodile.asm
deleted file mode 100644
index 3d57dbc89..000000000
--- a/data/base_stats/totodile.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db TOTODILE ; 158
-
- db 50, 65, 64, 43, 44, 48
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 45 ; catch rate
- db 66 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/totodile/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, CUT, SURF, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/typhlosion.asm b/data/base_stats/typhlosion.asm
deleted file mode 100644
index a73529cef..000000000
--- a/data/base_stats/typhlosion.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db TYPHLOSION ; 157
-
- db 78, 84, 78, 100, 109, 85
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 45 ; catch rate
- db 209 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/typhlosion/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH, FLAMETHROWER
- ; end
diff --git a/data/base_stats/tyranitar.asm b/data/base_stats/tyranitar.asm
deleted file mode 100644
index c116bdde3..000000000
--- a/data/base_stats/tyranitar.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db TYRANITAR ; 248
-
- db 100, 134, 110, 61, 95, 100
- ; hp atk def spd sat sdf
-
- db ROCK, DARK
- db 45 ; catch rate
- db 218 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 40 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/tyranitar/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn MONSTER, MONSTER ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DETECT, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, NIGHTMARE, CUT, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/tyrogue.asm b/data/base_stats/tyrogue.asm
deleted file mode 100644
index 87d44a3c5..000000000
--- a/data/base_stats/tyrogue.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db TYROGUE ; 236
-
- db 35, 35, 35, 35, 35, 35
- ; hp atk def spd sat sdf
-
- db FIGHTING, FIGHTING
- db 75 ; catch rate
- db 91 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 0 ; gender
- db 100 ; unknown
- db 25 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/tyrogue/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STRENGTH
- ; end
diff --git a/data/base_stats/umbreon.asm b/data/base_stats/umbreon.asm
deleted file mode 100644
index 1274f6afa..000000000
--- a/data/base_stats/umbreon.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db UMBREON ; 197
-
- db 95, 65, 110, 65, 60, 130
- ; hp atk def spd sat sdf
-
- db DARK, DARK
- db 45 ; catch rate
- db 197 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 35 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/umbreon/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, NIGHTMARE, CUT, FLASH
- ; end
diff --git a/data/base_stats/unown.asm b/data/base_stats/unown.asm
deleted file mode 100644
index d447757eb..000000000
--- a/data/base_stats/unown.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db UNOWN ; 201
-
- db 48, 72, 48, 48, 72, 48
- ; hp atk def spd sat sdf
-
- db PSYCHIC, PSYCHIC
- db 225 ; catch rate
- db 61 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 40 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/unown_a/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm
- ; end
diff --git a/data/base_stats/ursaring.asm b/data/base_stats/ursaring.asm
deleted file mode 100644
index ba87a54ff..000000000
--- a/data/base_stats/ursaring.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db URSARING ; 217
-
- db 90, 130, 75, 55, 75, 75
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 60 ; catch rate
- db 189 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/ursaring/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH
- ; end
diff --git a/data/base_stats/vaporeon.asm b/data/base_stats/vaporeon.asm
deleted file mode 100644
index 7d024d5fd..000000000
--- a/data/base_stats/vaporeon.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db VAPOREON ; 134
-
- db 130, 65, 60, 65, 110, 95
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 45 ; catch rate
- db 196 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 35 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/vaporeon/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/venomoth.asm b/data/base_stats/venomoth.asm
deleted file mode 100644
index c2ac64222..000000000
--- a/data/base_stats/venomoth.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db VENOMOTH ; 049
-
- db 70, 65, 60, 90, 90, 75
- ; hp atk def spd sat sdf
-
- db BUG, POISON
- db 75 ; catch rate
- db 138 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/venomoth/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SWIFT, REST, ATTRACT, THIEF, FLASH
- ; end
diff --git a/data/base_stats/venonat.asm b/data/base_stats/venonat.asm
deleted file mode 100644
index ef662fb91..000000000
--- a/data/base_stats/venonat.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db VENONAT ; 048
-
- db 60, 55, 50, 45, 40, 55
- ; hp atk def spd sat sdf
-
- db BUG, POISON
- db 190 ; catch rate
- db 75 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/venonat/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SWIFT, REST, ATTRACT, THIEF
- ; end
diff --git a/data/base_stats/venusaur.asm b/data/base_stats/venusaur.asm
deleted file mode 100644
index 728508bee..000000000
--- a/data/base_stats/venusaur.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db VENUSAUR ; 003
-
- db 80, 82, 83, 80, 100, 100
- ; hp atk def spd sat sdf
-
- db GRASS, POISON
- db 45 ; catch rate
- db 208 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/venusaur/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, PLANT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROAR, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FURY_CUTTER, CUT, FLASH
- ; end
diff --git a/data/base_stats/victreebel.asm b/data/base_stats/victreebel.asm
deleted file mode 100644
index fd33d5c1c..000000000
--- a/data/base_stats/victreebel.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db VICTREEBEL ; 071
-
- db 80, 105, 65, 70, 100, 60
- ; hp atk def spd sat sdf
-
- db GRASS, POISON
- db 45 ; catch rate
- db 191 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/victreebel/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn PLANT, PLANT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
- ; end
diff --git a/data/base_stats/vileplume.asm b/data/base_stats/vileplume.asm
deleted file mode 100644
index f6f4b370e..000000000
--- a/data/base_stats/vileplume.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db VILEPLUME ; 045
-
- db 75, 80, 85, 50, 100, 90
- ; hp atk def spd sat sdf
-
- db GRASS, POISON
- db 45 ; catch rate
- db 184 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/vileplume/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn PLANT, PLANT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
- ; end
diff --git a/data/base_stats/voltorb.asm b/data/base_stats/voltorb.asm
deleted file mode 100644
index 5daf64af9..000000000
--- a/data/base_stats/voltorb.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db VOLTORB ; 100
-
- db 40, 30, 50, 100, 55, 55
- ; hp atk def spd sat sdf
-
- db ELECTRIC, ELECTRIC
- db 190 ; catch rate
- db 103 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/voltorb/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INANIMATE, INANIMATE ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/vulpix.asm b/data/base_stats/vulpix.asm
deleted file mode 100644
index 0212212ff..000000000
--- a/data/base_stats/vulpix.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db VULPIX ; 037
-
- db 38, 41, 40, 65, 50, 65
- ; hp atk def spd sat sdf
-
- db FIRE, FIRE
- db 190 ; catch rate
- db 63 ; base exp
- db BURNT_BERRY ; item 1
- db BURNT_BERRY ; item 2
- db 191 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/vulpix/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn FIELD, FIELD ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER
- ; end
diff --git a/data/base_stats/wartortle.asm b/data/base_stats/wartortle.asm
deleted file mode 100644
index 751d881ef..000000000
--- a/data/base_stats/wartortle.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db WARTORTLE ; 008
-
- db 59, 63, 80, 58, 65, 80
- ; hp atk def spd sat sdf
-
- db WATER, WATER
- db 45 ; catch rate
- db 143 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 31 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/wartortle/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn MONSTER, AMPHIBIAN ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
- ; end
diff --git a/data/base_stats/weedle.asm b/data/base_stats/weedle.asm
deleted file mode 100644
index acc241e74..000000000
--- a/data/base_stats/weedle.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db WEEDLE ; 013
-
- db 40, 35, 30, 50, 20, 20
- ; hp atk def spd sat sdf
-
- db BUG, POISON
- db 255 ; catch rate
- db 52 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/weedle/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm
- ; end
diff --git a/data/base_stats/weepinbell.asm b/data/base_stats/weepinbell.asm
deleted file mode 100644
index b87ba6326..000000000
--- a/data/base_stats/weepinbell.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db WEEPINBELL ; 070
-
- db 65, 90, 50, 55, 85, 45
- ; hp atk def spd sat sdf
-
- db GRASS, POISON
- db 120 ; catch rate
- db 151 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/weepinbell/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_SLOW ; growth rate
- dn PLANT, PLANT ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
- ; end
diff --git a/data/base_stats/weezing.asm b/data/base_stats/weezing.asm
deleted file mode 100644
index 96a645828..000000000
--- a/data/base_stats/weezing.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db WEEZING ; 110
-
- db 65, 90, 120, 60, 85, 70
- ; hp atk def spd sat sdf
-
- db POISON, POISON
- db 60 ; catch rate
- db 173 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/weezing/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMORPHOUS, AMORPHOUS ; egg groups
-
- ; tmhm
- tmhm CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, REST, ATTRACT, THIEF, FLAMETHROWER, THUNDERBOLT
- ; end
diff --git a/data/base_stats/wigglytuff.asm b/data/base_stats/wigglytuff.asm
deleted file mode 100644
index 82321d595..000000000
--- a/data/base_stats/wigglytuff.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db WIGGLYTUFF ; 040
-
- db 140, 70, 45, 45, 75, 50
- ; hp atk def spd sat sdf
-
- db NORMAL, NORMAL
- db 50 ; catch rate
- db 109 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 191 ; gender
- db 100 ; unknown
- db 10 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/wigglytuff/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db FAST ; growth rate
- dn FAIRY, FAIRY ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, RETURN, PSYCHIC, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
- ; end
diff --git a/data/base_stats/wobbuffet.asm b/data/base_stats/wobbuffet.asm
deleted file mode 100644
index 4b865b33c..000000000
--- a/data/base_stats/wobbuffet.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db WOBBUFFET ; 202
-
- db 190, 33, 58, 33, 33, 58
- ; hp atk def spd sat sdf
-
- db PSYCHIC, PSYCHIC
- db 45 ; catch rate
- db 177 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/wobbuffet/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMORPHOUS, AMORPHOUS ; egg groups
-
- ; tmhm
- tmhm
- ; end
diff --git a/data/base_stats/wooper.asm b/data/base_stats/wooper.asm
deleted file mode 100644
index 0f0d53630..000000000
--- a/data/base_stats/wooper.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db WOOPER ; 194
-
- db 55, 45, 45, 15, 25, 25
- ; hp atk def spd sat sdf
-
- db WATER, GROUND
- db 255 ; catch rate
- db 52 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/wooper/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AMPHIBIAN, FIELD ; egg groups
-
- ; tmhm
- tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, SURF, FLASH, WHIRLPOOL, ICE_BEAM
- ; end
diff --git a/data/base_stats/xatu.asm b/data/base_stats/xatu.asm
deleted file mode 100644
index ba0e964af..000000000
--- a/data/base_stats/xatu.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db XATU ; 178
-
- db 65, 75, 70, 95, 95, 70
- ; hp atk def spd sat sdf
-
- db PSYCHIC, FLYING
- db 75 ; catch rate
- db 171 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/xatu/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, FLY, FLASH
- ; end
diff --git a/data/base_stats/yanma.asm b/data/base_stats/yanma.asm
deleted file mode 100644
index 96cf497be..000000000
--- a/data/base_stats/yanma.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db YANMA ; 193
-
- db 65, 65, 45, 95, 75, 45
- ; hp atk def spd sat sdf
-
- db BUG, FLYING
- db 75 ; catch rate
- db 147 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 20 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/yanma/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn INSECT, INSECT ; egg groups
-
- ; tmhm
- tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, FLASH
- ; end
diff --git a/data/base_stats/zapdos.asm b/data/base_stats/zapdos.asm
deleted file mode 100644
index eece9b897..000000000
--- a/data/base_stats/zapdos.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ZAPDOS ; 145
-
- db 90, 90, 85, 100, 125, 90
- ; hp atk def spd sat sdf
-
- db ELECTRIC, FLYING
- db 3 ; catch rate
- db 216 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 255 ; gender
- db 100 ; unknown
- db 80 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/zapdos/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db SLOW ; growth rate
- dn NO_EGGS, NO_EGGS ; egg groups
-
- ; tmhm
- tmhm CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, STEEL_WING, FLY, FLASH, THUNDERBOLT
- ; end
diff --git a/data/base_stats/zubat.asm b/data/base_stats/zubat.asm
deleted file mode 100644
index ac5f450d1..000000000
--- a/data/base_stats/zubat.asm
+++ /dev/null
@@ -1,22 +0,0 @@
- db ZUBAT ; 041
-
- db 40, 45, 35, 55, 30, 40
- ; hp atk def spd sat sdf
-
- db POISON, FLYING
- db 255 ; catch rate
- db 54 ; base exp
- db NO_ITEM ; item 1
- db NO_ITEM ; item 2
- db 127 ; gender
- db 100 ; unknown
- db 15 ; step cycles to hatch
- db 5 ; unknown
- INCBIN "gfx/pics/zubat/front.dimensions"
- db 0, 0, 0, 0 ; padding
- db MEDIUM_FAST ; growth rate
- dn AVIAN, AVIAN ; egg groups
-
- ; tmhm
- tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING
- ; end
diff --git a/data/battle/ball_colors.asm b/data/battle/ball_colors.asm
new file mode 100644
index 000000000..c3ba9d2b4
--- /dev/null
+++ b/data/battle/ball_colors.asm
@@ -0,0 +1,16 @@
+; colors of balls thrown in battle
+
+BallColors: ; cd26c (33:526c)
+ db MASTER_BALL, PAL_BATTLE_OB_GREEN
+ db ULTRA_BALL, PAL_BATTLE_OB_YELLOW
+ db GREAT_BALL, PAL_BATTLE_OB_BLUE
+ db POKE_BALL, PAL_BATTLE_OB_RED
+ db HEAVY_BALL, PAL_BATTLE_OB_GRAY
+ db LEVEL_BALL, PAL_BATTLE_OB_BROWN
+ db LURE_BALL, PAL_BATTLE_OB_BLUE
+ db FAST_BALL, PAL_BATTLE_OB_BLUE
+ db FRIEND_BALL, PAL_BATTLE_OB_YELLOW
+ db MOON_BALL, PAL_BATTLE_OB_GRAY
+ db LOVE_BALL, PAL_BATTLE_OB_RED
+ db -1, PAL_BATTLE_OB_GRAY
+; cd284
diff --git a/data/battle/flee_mons.asm b/data/battle/flee_mons.asm
new file mode 100644
index 000000000..1b1cea036
--- /dev/null
+++ b/data/battle/flee_mons.asm
@@ -0,0 +1,36 @@
+FleeMons:
+; referenced by TryEnemyFlee and FastBallMultiplier
+
+SometimesFleeMons: ; 3c59a
+ db MAGNEMITE
+ db GRIMER
+ db TANGELA
+ db MR__MIME
+ db EEVEE
+ db PORYGON
+ db DRATINI
+ db DRAGONAIR
+ db TOGETIC
+ db UMBREON
+ db UNOWN
+ db SNUBBULL
+ db HERACROSS
+ db -1
+
+OftenFleeMons: ; 3c5a8
+ db CUBONE
+ db ARTICUNO
+ db ZAPDOS
+ db MOLTRES
+ db QUAGSIRE
+ db DELIBIRD
+ db PHANPY
+ db TEDDIURSA
+ db -1
+
+AlwaysFleeMons: ; 3c5b1
+ db RAIKOU
+ db ENTEI
+; db SUICUNE
+ db -1
+; 3c5b4
diff --git a/data/battle_tower.asm b/data/battle_tower.asm
index 8997a53b8..d2e07fac3 100644
--- a/data/battle_tower.asm
+++ b/data/battle_tower.asm
@@ -1,216 +1,7 @@
-Function_LoadOpponentTrainerAndPokemons: ; 1f8000
- ld a, [rSVBK]
- push af
- ld a, BANK(BT_OTTrainer)
- ld [rSVBK], a
-
- ; Fill BT_OTTrainer with zeros
- xor a
- ld hl, BT_OTTrainer
- ld bc, BT_OTTrainerEnd - BT_OTTrainer
- call ByteFill
-
- ; Write $ff into the Item-Slots
- ld a, $ff
- ld [BT_OTPkmn1Item], a
- ld [BT_OTPkmn2Item], a
- ld [BT_OTPkmn3Item], a
-
- ; Set BT_OTTrainer as start address to write the following data to
- ld de, BT_OTTrainer
-
- ld a, [hRandomAdd]
- ld b, a
-.resample ; loop to find a random trainer
- call Random
- ld a, [hRandomAdd]
- add b
- ld b, a ; b contains the nr of the trainer
-IF DEF(CRYSTAL11)
- and (1 << 7) - 1
- cp 70
-ELSE
- and (1 << 5) - 1
- cp 21
-ENDC
- jr nc, .resample
- ld b, a
-
- ld a, BANK(sBTTrainers)
- call GetSRAMBank
-
- ld c, BATTLETOWER_NROFTRAINERS
- ld hl, sBTTrainers
-.next_trainer
- ld a, [hli]
- cp b
- jr z, .resample
- dec c
- jr nz, .next_trainer ; c <= 7 initialise all 7 trainers?
-
- ld hl, sBTTrainers
- ld a, [sNrOfBeatenBattleTowerTrainers]
- ld c, a
- ld a, b
- ld b, 0
- add hl, bc
- ld [hl], a
-
- call CloseSRAM
-
- push af
-; Copy name (10 bytes) and class (1 byte) of trainer
- ld hl, BattleTowerTrainers
- ld bc, NAME_LENGTH
- call AddNTimes
- ld bc, NAME_LENGTH
- call CopyBytes
-
- call Function_LoadRandomBattleTowerPkmn
- pop af
-
- ld hl, BattleTowerTrainerData
- ld bc, BATTLETOWER_TRAINERDATALENGTH
- call AddNTimes
- ld bc, BATTLETOWER_TRAINERDATALENGTH
-.copy_bt_trainer_data_loop
- ld a, BANK(BattleTowerTrainerData)
- call GetFarByte
- ld [de], a
- inc hl
- inc de
- dec bc
- ld a, b
- or c
- jr nz, .copy_bt_trainer_data_loop
-
- pop af
- ld [rSVBK], a
-
- ret
-
-
-Function_LoadRandomBattleTowerPkmn: ; 1f8081
- ld c, BATTLETOWER_NROFPKMNS
-.loop
- push bc
- ld a, BANK(sBTPkmnPrevTrainer1)
- call GetSRAMBank
-
-.FindARandomBattleTowerPkmn:
- ; From Which LevelGroup are the Pkmn loaded
- ; a = 1..10
- ld a, [wBTChoiceOfLvlGroup] ; [$d800]
- dec a
- ld hl, BattleTowerMons
- ld bc, BattleTowerMons2 - BattleTowerMons1
- call AddNTimes
-
- ld a, [hRandomAdd]
- ld b, a
-.resample
- call Random
- ld a, [hRandomAdd]
- add b
- ld b, a
- and $1f
- cp BATTLETOWER_NRMONSPERLEVELBRACKET
- jr nc, .resample
- ; in register 'a' is the chosen Pkmn of the LevelGroup
-
- ; Check if Pkmn was already loaded before
- ; Check current and the 2 previous teams
- ; includes check if item is double at the current team
- ld bc, PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH
- call AddNTimes
- ld a, [hli]
- ld b, a
- ld a, [hld]
- ld c, a
- ld a, [BT_OTPkmn1]
- cp b
- jr z, .FindARandomBattleTowerPkmn
- ld a, [BT_OTPkmn1Item]
- cp c
- jr z, .FindARandomBattleTowerPkmn
- ld a, [BT_OTPkmn2]
- cp b
- jr z, .FindARandomBattleTowerPkmn
- ld a, [BT_OTPkmn2Item]
- cp c
- jr z, .FindARandomBattleTowerPkmn
- ld a, [BT_OTPkmn3]
- cp b
- jr z, .FindARandomBattleTowerPkmn
- ld a, [BT_OTPkmn3Item]
- cp c
- jr z, .FindARandomBattleTowerPkmn
- ld a, [sBTPkmnPrevTrainer1]
- cp b
- jr z, .FindARandomBattleTowerPkmn
- ld a, [sBTPkmnPrevTrainer2]
- cp b
- jr z, .FindARandomBattleTowerPkmn
- ld a, [sBTPkmnPrevTrainer3]
- cp b
- jr z, .FindARandomBattleTowerPkmn
- ld a, [sBTPkmnPrevPrevTrainer1]
- cp b
- jr z, .FindARandomBattleTowerPkmn
- ld a, [sBTPkmnPrevPrevTrainer2]
- cp b
- jr z, .FindARandomBattleTowerPkmn
- ld a, [sBTPkmnPrevPrevTrainer3]
- cp b
- jr z, .FindARandomBattleTowerPkmn
-
- ld bc, PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH
- call CopyBytes
-
- ld a, [wNamedObjectIndexBuffer]
- push af
- push de
- ld hl, - (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH)
- add hl, de
- ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
- ld bc, PARTYMON_STRUCT_LENGTH
- add hl, bc
- push hl
- call GetPokemonName
- ld h, d
- ld l, e
- pop de
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
-
- pop de
- pop af
- ld [wNamedObjectIndexBuffer], a
- pop bc
- dec c
- jp nz, .loop
-
- ld a, [sBTPkmnPrevTrainer1]
- ld [sBTPkmnPrevPrevTrainer1], a
- ld a, [sBTPkmnPrevTrainer2]
- ld [sBTPkmnPrevPrevTrainer2], a
- ld a, [sBTPkmnPrevTrainer3]
- ld [sBTPkmnPrevPrevTrainer3], a
- ld a, [BT_OTPkmn1]
- ld [sBTPkmnPrevTrainer1], a
- ld a, [BT_OTPkmn2]
- ld [sBTPkmnPrevTrainer2], a
- ld a, [BT_OTPkmn3]
- ld [sBTPkmnPrevTrainer3], a
- call CloseSRAM
- ret
-; 1f814e
-
BattleTowerTrainers: ; 1f814e
; The trainer class is not used in Crystal 1.0 due to a bug.
; Instead, the sixth character in the trainer's name is used.
-; See misc/battle_tower_47.asm
+; See mobile/battle_tower_47.asm
db "HANSON@@@@", FISHER
db "SAWYER@@@@", POKEMANIAC
db "MASUDA@@@@", GUITARIST
diff --git a/data/bug_contest_winners.asm b/data/bug_contest_winners.asm
new file mode 100644
index 000000000..8529ed0f0
--- /dev/null
+++ b/data/bug_contest_winners.asm
@@ -0,0 +1,74 @@
+BugContestantPointers: ; 13783
+ dw BugContestant_BugCatcherDon ; This reverts back to the player
+ dw BugContestant_BugCatcherDon
+ dw BugContestant_BugCatcherEd
+ dw BugContestant_CooltrainerMNick
+ dw BugContestant_PokefanMWilliam
+ dw BugContestant_BugCatcherBenny
+ dw BugContestant_CamperBarry
+ dw BugContestant_PicnickerCindy
+ dw BugContestant_BugCatcherJosh
+ dw BugContestant_YoungsterSamuel
+ dw BugContestant_SchoolboyKipp
+; 13799
+
+BugContestant_BugCatcherDon:
+ db BUG_CATCHER, DON
+ dbw KAKUNA, 300
+ dbw METAPOD, 285
+ dbw CATERPIE, 226
+
+BugContestant_BugCatcherEd:
+ db BUG_CATCHER, ED
+ dbw BUTTERFREE, 286
+ dbw BUTTERFREE, 251
+ dbw CATERPIE, 237
+
+BugContestant_CooltrainerMNick:
+ db COOLTRAINERM, NICK
+ dbw SCYTHER, 357
+ dbw BUTTERFREE, 349
+ dbw PINSIR, 368
+
+BugContestant_PokefanMWilliam:
+ db POKEFANM, WILLIAM
+ dbw PINSIR, 332
+ dbw BUTTERFREE, 324
+ dbw VENONAT, 321
+
+BugContestant_BugCatcherBenny:
+ db BUG_CATCHER, BUG_CATCHER_BENNY
+ dbw BUTTERFREE, 318
+ dbw WEEDLE, 295
+ dbw CATERPIE, 285
+
+BugContestant_CamperBarry:
+ db CAMPER, BARRY
+ dbw PINSIR, 366
+ dbw VENONAT, 329
+ dbw KAKUNA, 314
+
+BugContestant_PicnickerCindy:
+ db PICNICKER, CINDY
+ dbw BUTTERFREE, 341
+ dbw METAPOD, 301
+ dbw CATERPIE, 264
+
+BugContestant_BugCatcherJosh:
+ db BUG_CATCHER, JOSH
+ dbw SCYTHER, 326
+ dbw BUTTERFREE, 292
+ dbw METAPOD, 282
+
+BugContestant_YoungsterSamuel:
+ db YOUNGSTER, SAMUEL
+ dbw WEEDLE, 270
+ dbw PINSIR, 282
+ dbw CATERPIE, 251
+
+BugContestant_SchoolboyKipp:
+ db SCHOOLBOY, KIPP
+ dbw VENONAT, 267
+ dbw PARAS, 254
+ dbw KAKUNA, 259
+; 13807
diff --git a/data/collision_permissions.asm b/data/collision_permissions.asm
new file mode 100644
index 000000000..867bacbb0
--- /dev/null
+++ b/data/collision_permissions.asm
@@ -0,0 +1,262 @@
+NONTALKABLE EQUS "db"
+TALKABLE EQUS "db TALK +"
+
+TileCollisionTable:: ; 4ce1f
+; entries correspond to COLL_* constants
+ NONTALKABLE LANDTILE ; COLL_FLOOR
+ NONTALKABLE LANDTILE ; COLL_01
+ NONTALKABLE LANDTILE ; 02
+ NONTALKABLE LANDTILE ; COLL_03
+ NONTALKABLE LANDTILE ; COLL_04
+ NONTALKABLE LANDTILE ; 05
+ NONTALKABLE LANDTILE ; 06
+ NONTALKABLE WALLTILE ; COLL_WALL
+ NONTALKABLE LANDTILE ; COLL_CUT_08
+ NONTALKABLE LANDTILE ; 09
+ NONTALKABLE LANDTILE ; 0a
+ NONTALKABLE LANDTILE ; 0b
+ NONTALKABLE LANDTILE ; 0c
+ NONTALKABLE LANDTILE ; 0d
+ NONTALKABLE LANDTILE ; 0e
+ NONTALKABLE WALLTILE ; 0f
+ NONTALKABLE LANDTILE ; COLL_TALL_GRASS_10
+ NONTALKABLE LANDTILE ; 11
+ TALKABLE WALLTILE ; COLL_CUT_TREE
+ NONTALKABLE LANDTILE ; 13
+ NONTALKABLE LANDTILE ; COLL_LONG_GRASS
+ TALKABLE WALLTILE ; COLL_HEADBUTT_TREE
+ NONTALKABLE LANDTILE ; 16
+ NONTALKABLE LANDTILE ; 17
+ NONTALKABLE LANDTILE ; COLL_TALL_GRASS
+ NONTALKABLE LANDTILE ; 19
+ TALKABLE WALLTILE ; COLL_CUT_TREE_1A
+ NONTALKABLE LANDTILE ; 1b
+ NONTALKABLE LANDTILE ; COLL_LONG_GRASS_1C
+ TALKABLE WALLTILE ; COLL_HEADBUTT_TREE_1D
+ NONTALKABLE LANDTILE ; 1e
+ NONTALKABLE LANDTILE ; 1f
+ NONTALKABLE WATERTILE ; 20
+ NONTALKABLE WATERTILE ; COLL_WATER_21
+ TALKABLE WATERTILE ; 22
+ NONTALKABLE LANDTILE ; COLL_ICE
+ TALKABLE WATERTILE ; COLL_WHIRLPOOL
+ NONTALKABLE WATERTILE ; 25
+ NONTALKABLE WATERTILE ; 26
+ NONTALKABLE WALLTILE ; COLL_BUOY
+ NONTALKABLE WATERTILE ; COLL_CUT_28
+ NONTALKABLE WATERTILE ; COLL_WATER
+ TALKABLE WATERTILE ; 2a
+ NONTALKABLE LANDTILE ; COLL_ICE_2B
+ TALKABLE WATERTILE ; COLL_WHIRLPOOL_2C
+ NONTALKABLE WATERTILE ; 2d
+ NONTALKABLE WATERTILE ; 2e
+ NONTALKABLE WALLTILE ; 2f
+ NONTALKABLE WATERTILE ; COLL_WATERFALL_RIGHT
+ NONTALKABLE WATERTILE ; COLL_WATERFALL_LEFT
+ NONTALKABLE WATERTILE ; COLL_WATERFALL_UP
+ NONTALKABLE WATERTILE ; COLL_WATERFALL
+ NONTALKABLE WATERTILE ; 34
+ NONTALKABLE WATERTILE ; 35
+ NONTALKABLE WATERTILE ; 36
+ NONTALKABLE WATERTILE ; 37
+ NONTALKABLE WATERTILE ; COLL_CURRENT_RIGHT
+ NONTALKABLE WATERTILE ; COLL_CURRENT_LEFT
+ NONTALKABLE WATERTILE ; COLL_CURRENT_UP
+ NONTALKABLE WATERTILE ; COLL_CURRENT_DOWN
+ NONTALKABLE WATERTILE ; 3c
+ NONTALKABLE WATERTILE ; 3d
+ NONTALKABLE WATERTILE ; 3e
+ NONTALKABLE WATERTILE ; 3f
+ NONTALKABLE LANDTILE ; COLL_BRAKE
+ NONTALKABLE LANDTILE ; COLL_WALK_RIGHT
+ NONTALKABLE LANDTILE ; COLL_WALK_LEFT
+ NONTALKABLE LANDTILE ; COLL_WALK_UP
+ NONTALKABLE LANDTILE ; COLL_WALK_DOWN
+ NONTALKABLE LANDTILE ; COLL_BRAKE_45
+ NONTALKABLE LANDTILE ; COLL_BRAKE_46
+ NONTALKABLE LANDTILE ; COLL_BRAKE_47
+ NONTALKABLE LANDTILE ; COLL_GRASS_48
+ NONTALKABLE LANDTILE ; COLL_GRASS_49
+ NONTALKABLE LANDTILE ; COLL_GRASS_4A
+ NONTALKABLE LANDTILE ; COLL_GRASS_4B
+ NONTALKABLE LANDTILE ; COLL_GRASS_4C
+ NONTALKABLE LANDTILE ; 4d
+ NONTALKABLE LANDTILE ; 4e
+ NONTALKABLE LANDTILE ; 4f
+ NONTALKABLE LANDTILE ; COLL_WALK_RIGHT_ALT
+ NONTALKABLE LANDTILE ; COLL_WALK_LEFT_ALT
+ NONTALKABLE LANDTILE ; COLL_WALK_UP_ALT
+ NONTALKABLE LANDTILE ; COLL_WALK_DOWN_ALT
+ NONTALKABLE LANDTILE ; COLL_BRAKE_ALT
+ NONTALKABLE LANDTILE ; COLL_BRAKE_55
+ NONTALKABLE LANDTILE ; COLL_BRAKE_56
+ NONTALKABLE LANDTILE ; COLL_BRAKE_57
+ NONTALKABLE LANDTILE ; 58
+ NONTALKABLE LANDTILE ; 59
+ NONTALKABLE LANDTILE ; 5a
+ NONTALKABLE LANDTILE ; COLL_5B
+ NONTALKABLE LANDTILE ; 5c
+ NONTALKABLE LANDTILE ; 5d
+ NONTALKABLE LANDTILE ; 5e
+ NONTALKABLE LANDTILE ; 5f
+ NONTALKABLE LANDTILE ; COLL_PIT
+ NONTALKABLE LANDTILE ; COLL_VIRTUAL_BOY
+ NONTALKABLE WALLTILE ; 62
+ NONTALKABLE LANDTILE ; 63
+ NONTALKABLE LANDTILE ; COLL_64
+ NONTALKABLE LANDTILE ; COLL_65
+ NONTALKABLE LANDTILE ; 66
+ NONTALKABLE LANDTILE ; 67
+ NONTALKABLE LANDTILE ; COLL_PIT_68
+ NONTALKABLE LANDTILE ; 69
+ NONTALKABLE WALLTILE ; 6a
+ NONTALKABLE LANDTILE ; 6b
+ NONTALKABLE LANDTILE ; 6c
+ NONTALKABLE LANDTILE ; 6d
+ NONTALKABLE LANDTILE ; 6e
+ NONTALKABLE LANDTILE ; 6f
+ NONTALKABLE LANDTILE ; COLL_WARP_CARPET_DOWN
+ NONTALKABLE LANDTILE ; COLL_DOOR
+ NONTALKABLE LANDTILE ; COLL_LADDER
+ NONTALKABLE LANDTILE ; COLL_STAIRCASE_73
+ NONTALKABLE LANDTILE ; COLL_CAVE_74
+ NONTALKABLE LANDTILE ; COLL_DOOR_75
+ NONTALKABLE LANDTILE ; COLL_WARP_CARPET_LEFT
+ NONTALKABLE LANDTILE ; COLL_WARP_77
+ NONTALKABLE LANDTILE ; COLL_WARP_CARPET_UP
+ NONTALKABLE LANDTILE ; COLL_DOOR_79
+ NONTALKABLE LANDTILE ; COLL_STAIRCASE
+ NONTALKABLE LANDTILE ; COLL_CAVE
+ NONTALKABLE LANDTILE ; COLL_WARP_PANEL
+ NONTALKABLE LANDTILE ; COLL_DOOR_7D
+ NONTALKABLE LANDTILE ; COLL_WARP_CARPET_RIGHT
+ NONTALKABLE LANDTILE ; COLL_WARP_7F
+ NONTALKABLE WALLTILE ; 80
+ NONTALKABLE WALLTILE ; 81
+ NONTALKABLE WALLTILE ; 82
+ NONTALKABLE WALLTILE ; 83
+ NONTALKABLE WALLTILE ; 84
+ NONTALKABLE LANDTILE ; 85
+ NONTALKABLE LANDTILE ; 86
+ NONTALKABLE LANDTILE ; 87
+ NONTALKABLE WALLTILE ; 88
+ NONTALKABLE WALLTILE ; 89
+ NONTALKABLE WALLTILE ; 8a
+ NONTALKABLE WALLTILE ; 8b
+ NONTALKABLE WALLTILE ; 8c
+ NONTALKABLE LANDTILE ; 8d
+ NONTALKABLE LANDTILE ; 8e
+ NONTALKABLE LANDTILE ; 8f
+ NONTALKABLE WALLTILE ; COLL_COUNTER
+ NONTALKABLE WALLTILE ; COLL_BOOKSHELF
+ NONTALKABLE WALLTILE ; 92
+ NONTALKABLE WALLTILE ; COLL_PC
+ NONTALKABLE WALLTILE ; COLL_RADIO
+ NONTALKABLE WALLTILE ; COLL_TOWN_MAP
+ NONTALKABLE WALLTILE ; COLL_MART_SHELF
+ NONTALKABLE WALLTILE ; COLL_TV
+ NONTALKABLE WALLTILE ; COLL_COUNTER_98
+ NONTALKABLE WALLTILE ; 99
+ NONTALKABLE WALLTILE ; 9a
+ NONTALKABLE WALLTILE ; 9b
+ NONTALKABLE WALLTILE ; COLL_9C
+ NONTALKABLE WALLTILE ; COLL_WINDOW
+ NONTALKABLE WALLTILE ; 9e
+ NONTALKABLE WALLTILE ; COLL_INCENSE_BURNER
+ NONTALKABLE LANDTILE ; COLL_HOP_RIGHT
+ NONTALKABLE LANDTILE ; COLL_HOP_LEFT
+ NONTALKABLE LANDTILE ; COLL_HOP_UP
+ NONTALKABLE LANDTILE ; COLL_HOP_DOWN
+ NONTALKABLE LANDTILE ; COLL_HOP_DOWN_RIGHT
+ NONTALKABLE LANDTILE ; COLL_HOP_DOWN_LEFT
+ NONTALKABLE LANDTILE ; COLL_HOP_UP_RIGHT
+ NONTALKABLE LANDTILE ; COLL_HOP_UP_LEFT
+ NONTALKABLE LANDTILE ; a8
+ NONTALKABLE LANDTILE ; a9
+ NONTALKABLE LANDTILE ; aa
+ NONTALKABLE LANDTILE ; ab
+ NONTALKABLE LANDTILE ; ac
+ NONTALKABLE LANDTILE ; ad
+ NONTALKABLE LANDTILE ; ae
+ NONTALKABLE LANDTILE ; af
+ NONTALKABLE LANDTILE ; COLL_RIGHT_WALL
+ NONTALKABLE LANDTILE ; COLL_LEFT_WALL
+ NONTALKABLE LANDTILE ; COLL_UP_WALL
+ NONTALKABLE LANDTILE ; COLL_DOWN_WALL
+ NONTALKABLE LANDTILE ; b4
+ NONTALKABLE LANDTILE ; b5
+ NONTALKABLE LANDTILE ; b6
+ NONTALKABLE LANDTILE ; b7
+ NONTALKABLE LANDTILE ; b8
+ NONTALKABLE LANDTILE ; b9
+ NONTALKABLE LANDTILE ; ba
+ NONTALKABLE LANDTILE ; bb
+ NONTALKABLE LANDTILE ; bc
+ NONTALKABLE LANDTILE ; bd
+ NONTALKABLE LANDTILE ; be
+ NONTALKABLE LANDTILE ; bf
+ NONTALKABLE WATERTILE ; c0
+ NONTALKABLE WATERTILE ; c1
+ NONTALKABLE WATERTILE ; c2
+ NONTALKABLE WATERTILE ; c3
+ NONTALKABLE WATERTILE ; c4
+ NONTALKABLE WATERTILE ; c5
+ NONTALKABLE WATERTILE ; c6
+ NONTALKABLE WATERTILE ; c7
+ NONTALKABLE WATERTILE ; c8
+ NONTALKABLE WATERTILE ; c9
+ NONTALKABLE WATERTILE ; ca
+ NONTALKABLE WATERTILE ; cb
+ NONTALKABLE WATERTILE ; cc
+ NONTALKABLE WATERTILE ; cd
+ NONTALKABLE WATERTILE ; ce
+ NONTALKABLE WATERTILE ; cf
+ NONTALKABLE LANDTILE ; d0
+ NONTALKABLE LANDTILE ; d1
+ NONTALKABLE LANDTILE ; d2
+ NONTALKABLE LANDTILE ; d3
+ NONTALKABLE LANDTILE ; d4
+ NONTALKABLE LANDTILE ; d5
+ NONTALKABLE LANDTILE ; d6
+ NONTALKABLE LANDTILE ; d7
+ NONTALKABLE LANDTILE ; d8
+ NONTALKABLE LANDTILE ; d9
+ NONTALKABLE LANDTILE ; da
+ NONTALKABLE LANDTILE ; db
+ NONTALKABLE LANDTILE ; dc
+ NONTALKABLE LANDTILE ; dd
+ NONTALKABLE LANDTILE ; de
+ NONTALKABLE LANDTILE ; df
+ NONTALKABLE LANDTILE ; e0
+ NONTALKABLE LANDTILE ; e1
+ NONTALKABLE LANDTILE ; e2
+ NONTALKABLE LANDTILE ; e3
+ NONTALKABLE LANDTILE ; e4
+ NONTALKABLE LANDTILE ; e5
+ NONTALKABLE LANDTILE ; e6
+ NONTALKABLE LANDTILE ; e7
+ NONTALKABLE LANDTILE ; e8
+ NONTALKABLE LANDTILE ; e9
+ NONTALKABLE LANDTILE ; ea
+ NONTALKABLE LANDTILE ; eb
+ NONTALKABLE LANDTILE ; ec
+ NONTALKABLE LANDTILE ; ed
+ NONTALKABLE LANDTILE ; ee
+ NONTALKABLE LANDTILE ; ef
+ NONTALKABLE LANDTILE ; f0
+ NONTALKABLE LANDTILE ; f1
+ NONTALKABLE LANDTILE ; f2
+ NONTALKABLE LANDTILE ; f3
+ NONTALKABLE LANDTILE ; f4
+ NONTALKABLE LANDTILE ; f5
+ NONTALKABLE LANDTILE ; f6
+ NONTALKABLE LANDTILE ; f7
+ NONTALKABLE LANDTILE ; f8
+ NONTALKABLE LANDTILE ; f9
+ NONTALKABLE LANDTILE ; fa
+ NONTALKABLE LANDTILE ; fb
+ NONTALKABLE LANDTILE ; fc
+ NONTALKABLE LANDTILE ; fd
+ NONTALKABLE LANDTILE ; fe
+ NONTALKABLE WALLTILE ; COLL_FF
+; 4cf1f
diff --git a/data/collision_stdscripts.asm b/data/collision_stdscripts.asm
new file mode 100644
index 000000000..8156d039d
--- /dev/null
+++ b/data/collision_stdscripts.asm
@@ -0,0 +1,13 @@
+; stdscripts associated with tile collisions
+
+TileCollisionStdScripts:
+ ; collision type, stdscript
+ dbw COLL_BOOKSHELF, magazinebookshelf
+ dbw COLL_PC, pcscript
+ dbw COLL_RADIO, radio1
+ dbw COLL_TOWN_MAP, townmap
+ dbw COLL_MART_SHELF, merchandiseshelf
+ dbw COLL_TV, tv
+ dbw COLL_WINDOW, window
+ dbw COLL_INCENSE_BURNER, incenseburner
+ db -1 ; end
diff --git a/data/credits_script.asm b/data/credits_script.asm
new file mode 100644
index 000000000..810e61c83
--- /dev/null
+++ b/data/credits_script.asm
@@ -0,0 +1,287 @@
+CreditsScript: ; 10acb4
+
+; Clear the banner.
+ db CREDITS_CLEAR
+
+; Pokemon Crystal Version Staff
+ db STAFF, 1
+
+ db CREDITS_WAIT, 8
+
+; Play the credits music.
+ db CREDITS_MUSIC
+
+ db CREDITS_WAIT2, 10
+
+ db CREDITS_WAIT, 1
+
+; Update the banner.
+ db CREDITS_SCENE, 0 ; Pichu
+
+ db DIRECTOR, 1
+ db SATOSHI_TAJIRI, 2
+
+ db CREDITS_WAIT, 12
+
+ db CODIRECTOR, 1
+ db JUNICHI_MASUDA, 2
+
+ db CREDITS_WAIT, 12
+
+ db PROGRAMMERS, 0
+ db SOUSUKE_TAMADA, 1
+ db HISASHI_SOGABE, 2
+ db KEITA_KAGAYA, 3
+ db YOSHINORI_MATSUDA, 4
+
+ db CREDITS_WAIT, 12
+
+ db PROGRAMMERS, 0
+ db SHIGEKI_MORIMOTO, 1
+ db TETSUYA_WATANABE, 2
+ db TAKENORI_OOTA, 3
+
+ db CREDITS_WAIT, 12
+
+ db GRAPHICS_DIRECTOR, 1
+ db KEN_SUGIMORI, 2
+
+ db CREDITS_WAIT, 12
+
+ db MONSTER_DESIGN, 0
+ db KEN_SUGIMORI, 1
+ db MOTOFUMI_FUJIWARA, 2
+ db SHIGEKI_MORIMOTO, 3
+ db HIRONOBU_YOSHIDA, 4
+ db SATOSHI_OOTA, 5
+
+ db CREDITS_WAIT, 12
+
+ db MONSTER_DESIGN, 0
+ db ATSUKO_NISHIDA, 1
+ db MUNEO_SAITO, 2
+ db RENA_YOSHIKAWA, 3
+
+ db CREDITS_WAIT, 12
+
+ db POKEMON_ANIMATION, 1
+ db HIRONOBU_YOSHIDA, 2
+ db JUN_OKUTANI, 3
+
+ db CREDITS_WAIT, 12
+
+; Clear the banner.
+ db CREDITS_CLEAR
+
+ db CREDITS_WAIT, 1
+
+; Update the banner.
+ db CREDITS_SCENE, 1 ; Smoochum
+
+ db GRAPHICS_DESIGN, 0
+ db HIRONOBU_YOSHIDA, 1
+ db JUN_OKUTANI, 2
+ db ASUKA_IWASHITA, 3
+ db TETSUYA_WATANABE, 4
+
+ db CREDITS_WAIT, 12
+
+ db CREDIT_MUSIC, 0
+ db JUNICHI_MASUDA, 1
+ db MORIKAZU_AOKI, 2
+ db GO_ICHINOSE, 3
+
+ db CREDITS_WAIT, 12
+
+ db CREDIT_SOUND_EFFECTS, 0
+ db MORIKAZU_AOKI, 1
+ db JUNICHI_MASUDA, 2
+ db TETSUYA_WATANABE, 3
+
+ db CREDITS_WAIT, 12
+
+ db GAME_DESIGN, 0
+ db JUNICHI_MASUDA, 1
+ db SHIGEKI_MORIMOTO, 2
+ db KOHJI_NISHINO, 3
+
+ db CREDITS_WAIT, 12
+
+ db GAME_DESIGN, 0
+ db TETSUJI_OOTA, 1
+ db HITOMI_SATO, 2
+ db KENJI_MATSUSHIMA, 3
+
+ db CREDITS_WAIT, 12
+
+ db GAME_SCENARIO, 0
+ db JUNICHI_MASUDA, 1
+ db KOHJI_NISHINO, 2
+ db TOSHINOBU_MATSUMIYA, 3
+ db KENJI_MATSUSHIMA, 4
+
+ db CREDITS_WAIT, 12
+
+ db POKEDEX_TEXT, 1
+ db TOSHINOBU_MATSUMIYA, 2
+
+ db CREDITS_WAIT, 12
+
+ db TOOL_PROGRAMMING, 1
+ db SOUSUKE_TAMADA, 2
+ db TAKENORI_OOTA, 3
+
+ db CREDITS_WAIT, 12
+
+ db PARAMETRIC_DESIGN, 1
+ db KOHJI_NISHINO, 2
+
+ db CREDITS_WAIT, 12
+
+; Clear the banner.
+ db CREDITS_CLEAR
+
+ db CREDITS_WAIT, 1
+
+; Update the banner.
+ db CREDITS_SCENE, 2 ; Ditto
+
+ db SCRIPT_DESIGN, 1
+ db TETSUJI_OOTA, 2
+ db NOBUHIRO_SEYA, 3
+
+ db CREDITS_WAIT, 12
+
+ db MAP_DATA_DESIGN, 1
+ db TETSUJI_OOTA, 2
+ db KAZUHITO_SEKINE, 3
+
+ db CREDITS_WAIT, 12
+
+ db MAP_DESIGN, 0
+ db TETSUJI_OOTA, 1
+ db KOHJI_NISHINO, 2
+ db NOBUHIRO_SEYA, 3
+
+ db CREDITS_WAIT, 12
+
+ db COORDINATION, 1
+ db HIROYUKI_ZINNAI, 2
+
+ db CREDITS_WAIT, 12
+
+ db PRODUCERS, 0
+ db SATORU_IWATA, 1
+ db SATOSHI_YAMATO, 2
+ db SHIGERU_MIYAMOTO, 3
+
+ db CREDITS_WAIT, 12
+
+ db PRODUCERS, 1
+ db TSUNEKAZU_ISHIHARA, 2
+
+ db CREDITS_WAIT, 12
+
+; Clear the banner.
+ db CREDITS_CLEAR
+
+ db CREDITS_WAIT, 1
+
+; Update the banner.
+ db CREDITS_SCENE, 3 ; Igglybuff
+
+ db US_VERSION_STAFF, 2
+
+ db CREDITS_WAIT, 9
+
+ db US_COORDINATION, 1
+ db GAIL_TILDEN, 2
+ db HIRO_NAKAMURA, 3
+
+ db CREDITS_WAIT, 12
+
+ db US_COORDINATION, 1
+ db JUNICHI_MASUDA, 2
+ db SETH_MCMAHILL, 3
+
+ db CREDITS_WAIT, 12
+
+ db US_COORDINATION, 1
+ db HIROTO_ALEXANDER, 2
+ db TERESA_LILLYGREN, 3
+
+ db CREDITS_WAIT, 12
+
+ db TEXT_TRANSLATION, 1
+ db NOB_OGASAWARA, 2
+
+ db CREDITS_WAIT, 12
+
+ db PROGRAMMERS, 1
+ db TERUKI_MURAKAWA, 2
+ db KAZUYOSHI_OSAWA, 3
+
+ db CREDITS_WAIT, 12
+
+ db PAAD_TESTING, 1
+ db THOMAS_HERTZOG, 2
+ db ERIK_JOHNSON, 3
+
+ db CREDITS_WAIT, 12
+
+ db PRODUCT_TESTING, 0
+ db PLANNING, 1
+
+ db CREDITS_WAIT, 12
+
+ db PRODUCT_TESTING, 0
+ db KEITA_NAKAMURA, 1
+ db HIROTAKA_UEMURA, 2
+ db HIROAKI_TAMURA, 3
+ db NORIAKI_SAKAGUCHI, 4
+
+ db CREDITS_WAIT, 12
+
+ db PRODUCT_TESTING, 0
+ db NCL_SUPER_MARIO_CLUB, 1
+ db KENJI_SAIKI, 2
+ db ATSUSHI_TADA, 3
+ db MIYUKI_SATO, 4
+
+ db CREDITS_WAIT, 12
+
+ db SPECIAL_THANKS, 0
+ db KIMIKO_NAKAMICHI, 1
+ db AKITO_MORI, 2
+
+ db CREDITS_WAIT, 12
+
+ db SPECIAL_THANKS, 0
+ db GAKUZI_NOMOTO, 1
+ db AI_MASHIMA, 2
+ db KUNIMI_KAWAMURA, 3
+
+ db CREDITS_WAIT, 12
+
+ db SPECIAL_THANKS, 0
+ db MIKIHIRO_ISHIKAWA, 1
+ db HIDEYUKI_HASHIMOTO, 2
+
+ db CREDITS_WAIT, 12
+
+ db EXECUTIVE_PRODUCER, 1
+ db HIROSHI_YAMAUCHI, 2
+
+ db CREDITS_WAIT, 12
+
+ db COPYRIGHT, 1
+
+ db CREDITS_WAIT, 9
+
+; Display "The End" graphic.
+ db CREDITS_THEEND
+
+ db CREDITS_WAIT, 20
+
+ db CREDITS_END
+; 10ae13
diff --git a/data/credits_strings.asm b/data/credits_strings.asm
new file mode 100644
index 000000000..f885e2152
--- /dev/null
+++ b/data/credits_strings.asm
@@ -0,0 +1,221 @@
+CreditsStrings:
+; entries correspond to constants/credits_constants.asm
+ dw .SatoshiTajiri
+ dw .JunichiMasuda
+ dw .TetsuyaWatanabe
+ dw .ShigekiMorimoto
+ dw .SousukeTamada
+ dw .TakenoriOota
+ dw .KenSugimori
+ dw .MotofumiFujiwara
+ dw .AtsukoNishida
+ dw .MuneoSaito
+ dw .SatoshiOota
+ dw .RenaYoshikawa
+ dw .JunOkutani
+ dw .HironobuYoshida
+ dw .AsukaIwashita
+ dw .GoIchinose
+ dw .MorikazuAoki
+ dw .KohjiNishino
+ dw .KenjiMatsushima
+ dw .ToshinobuMatsumiya
+ dw .SatoruIwata
+ dw .NobuhiroSeya
+ dw .KazuhitoSekine
+ dw .TetsujiOota
+ dw .NclSuperMarioClub
+ dw .Sarugakucho
+ dw .AkitoMori
+ dw .TakahiroHarada
+ dw .TohruHashimoto
+ dw .NoboruMatsumoto
+ dw .TakehiroIzushi
+ dw .TakashiKawaguchi
+ dw .TsunekazuIshihara
+ dw .HiroshiYamauchi
+ dw .KenjiSaiki
+ dw .AtsushiTada
+ dw .NaokoKawakami
+ dw .HiroyukiZinnai
+ dw .KunimiKawamura
+ dw .HisashiSogabe
+ dw .KeitaKagaya
+ dw .YoshinoriMatsuda
+ dw .HitomiSato
+ dw .ToruOsawa
+ dw .TakaoOhara
+ dw .YuichiroIto
+ dw .TakaoShimizu
+ dw .Planning
+ dw .KeitaNakamura
+ dw .HirotakaUemura
+ dw .HiroakiTamura
+ dw .NoriakiSakaguchi
+ dw .MiyukiSato
+ dw .GakuziNomoto
+ dw .AiMashima
+ dw .MikihiroIshikawa
+ dw .HideyukiHashimoto
+ dw .SatoshiYamato
+ dw .ShigeruMiyamoto
+ dw .GailTilden
+ dw .NobOgasawara
+ dw .SethMcMahill
+ dw .HirotoAlexander
+ dw .TeresaLillygren
+ dw .ThomasHertzog
+ dw .ErikJohnson
+ dw .HiroNakamura
+ dw .TerukiMurakawa
+ dw .KazuyoshiOsawa
+ dw .KimikoNakamichi
+ dw .End
+ dw .Unknown
+ dw .Staff
+ dw .Director
+ dw .CoDirector
+ dw .Programmers
+ dw .GraphicsDirector
+ dw .MonsterDesign
+ dw .GraphicsDesign
+ dw .Music
+ dw .SoundEffects
+ dw .GameDesign
+ dw .GameScenario
+ dw .ToolProgramming
+ dw .ParametricDesign
+ dw .ScriptDesign
+ dw .MapDataDesign
+ dw .MapDesign
+ dw .ProductTesting
+ dw .SpecialThanks
+ dw .Producers
+ dw .ExecutiveProducer
+ dw .PokemonAnimation
+ dw .PokedexText
+ dw .MobilePrjLeader
+ dw .MobileSystemAd
+ dw .MobileStadiumDir
+ dw .Coordination
+ dw .Copyright
+ dw .UsVersionStaff
+ dw .UsCoordination
+ dw .TextTranslation
+ dw .PaadTesting
+
+.SatoshiTajiri: db " SATOSHI TAJIRI@" ; "たじり さとし@"
+.JunichiMasuda: db " JUNICHI MASUDA@" ; "ますだ じゅんいち@"
+.TetsuyaWatanabe: db " TETSUYA WATANABE@" ; "わたなべ てつや@"
+.ShigekiMorimoto: db " SHIGEKI MORIMOTO@" ; "もりもと しげき@"
+.SousukeTamada: db " SOUSUKE TAMADA@" ; "たまだ そうすけ@"
+.TakenoriOota: db " TAKENORI OOTA@" ; "おおた たけのり@"
+.KenSugimori: db " KEN SUGIMORI@" ; "すぎもり けん@"
+.MotofumiFujiwara: db " MOTOFUMI FUJIWARA@" ; "ふじわら もとふみ@"
+.AtsukoNishida: db " ATSUKO NISHIDA@" ; "にしだ あつこ@"
+.MuneoSaito: db " MUNEO SAITO@" ; "さいとう むねお@"
+.SatoshiOota: db " SATOSHI OOTA@" ; "おおた さとし@"
+.RenaYoshikawa: db " RENA YOSHIKAWA@" ; "よしかわ れな@"
+.JunOkutani: db " JUN OKUTANI@" ; "おくたに じゅん@"
+.HironobuYoshida: db " HIRONOBU YOSHIDA@" ; "よしだ ひろのぶ@"
+.AsukaIwashita: db " ASUKA IWASHITA@" ; "いわした あすか@"
+.GoIchinose: db " GO ICHINOSE@" ; "いちのせ ごう@"
+.MorikazuAoki: db " MORIKAZU AOKI@" ; "あおき もりかず@"
+.KohjiNishino: db " KOHJI NISHINO@" ; "にしの こうじ@"
+.KenjiMatsushima: db " KENJI MATSUSHIMA@" ; "まつしま けんじ@"
+.ToshinobuMatsumiya: db "TOSHINOBU MATSUMIYA@" ; "まつみや としのぶ@"
+.SatoruIwata: db " SATORU IWATA@" ; "いわた さとる@"
+.NobuhiroSeya: db " NOBUHIRO SEYA@" ; "せや のぶひろ@"
+.KazuhitoSekine: db " KAZUHITO SEKINE@" ; "せきね かずひと@"
+.TetsujiOota: db " TETSUJI OOTA@" ; "おおた てつじ@"
+.NclSuperMarioClub: db "NCL SUPER MARIO CLUB@" ; "スーパーマりォクラブ@"
+.Sarugakucho: db " SARUGAKUCHO@" ; "さるがくちょう@"
+.AkitoMori: db " AKITO MORI@" ; "もり あきと@"
+.TakahiroHarada: db " TAKAHIRO HARADA@" ; "はらだ たかひろ@"
+.TohruHashimoto: db " TOHRU HASHIMOTO@" ; "はしもと とおる@"
+.NoboruMatsumoto: db " NOBORU MATSUMOTO@" ; "まつもと のぼる@"
+.TakehiroIzushi: db " TAKEHIRO IZUSHI@" ; "いずし たけひろ@"
+.TakashiKawaguchi: db " TAKASHI KAWAGUCHI@" ; "かわぐち たかし@"
+.TsunekazuIshihara: db " TSUNEKAZU ISHIHARA@" ; "いしはら つねかず@"
+.HiroshiYamauchi: db " HIROSHI YAMAUCHI@" ; "やまうち ひろし@"
+.KenjiSaiki: db " KENJI SAIKI@" ; "さいき けんじ@"
+.AtsushiTada: db " ATSUSHI TADA@" ; "ただ あつし@"
+.NaokoKawakami: db " NAOKO KAWAKAMI@" ; "かわかみ なおこ@"
+.HiroyukiZinnai: db " HIROYUKI ZINNAI@" ; "じんない ひろゆき@"
+.KunimiKawamura: db " KUNIMI KAWAMURA@" ; "かわむら くにみ@"
+.HisashiSogabe: db " HISASHI SOGABE@" ; "そがべ ひさし@"
+.KeitaKagaya: db " KEITA KAGAYA@" ; "かがや けいた@"
+.YoshinoriMatsuda: db " YOSHINORI MATSUDA@" ; "まつだ よしのり@"
+.HitomiSato: db " HITOMI SATO@" ; "さとう ひとみ@"
+.ToruOsawa: db " TORU OSAWA@" ; "おおさわ とおる@"
+.TakaoOhara: db " TAKAO OHARA@" ; "おおはら たかお@"
+.YuichiroIto: db " YUICHIRO ITO@" ; "いとう ゆういちろう@"
+.TakaoShimizu: db " TAKAO SHIMIZU@" ; "しみず たかお@"
+.Planning: db " SPECIAL PRODUCTION"
+ next " PLANNING" ; "きかくかいはつぶ@"
+ next " & DEVELOPMENT DEPT.@"
+.KeitaNakamura: db " KEITA NAKAMURA@" ; "なかむら けいた@"
+.HirotakaUemura: db " HIROTAKA UEMURA@" ; "うえむら ひろたか@"
+.HiroakiTamura: db " HIROAKI TAMURA@" ; "たむら ひろあき@"
+.NoriakiSakaguchi: db " NORIAKI SAKAGUCHI@" ; "さかぐち のりあき@"
+.MiyukiSato: db " MIYUKI SATO@" ; "さとう みゆき@"
+.GakuziNomoto: db " GAKUZI NOMOTO@" ; "のもと がくじ@"
+.AiMashima: db " AI MASHIMA@" ; "ましま あい@"
+.MikihiroIshikawa: db " MIKIHIRO ISHIKAWA@" ; "いしかわ みきひろ@"
+.HideyukiHashimoto: db " HIDEYUKI HASHIMOTO@" ; "はしもと ひでゆき@"
+.SatoshiYamato: db " SATOSHI YAMATO@" ; "やまと さとし@"
+.ShigeruMiyamoto: db " SHIGERU MIYAMOTO@" ; "みやもと しげる@"
+.End: db " END@" ; "おしまい@"
+.Unknown: db " ????????@" ; "????????@"
+.GailTilden: db " GAIL TILDEN@"
+.NobOgasawara: db " NOB OGASAWARA@"
+.SethMcMahill: db " SETH McMAHILL@"
+.HirotoAlexander: db " HIROTO ALEXANDER@"
+.TeresaLillygren: db " TERESA LILLYGREN@"
+.ThomasHertzog: db " THOMAS HERTZOG@"
+.ErikJohnson: db " ERIK JOHNSON@"
+.HiroNakamura: db " HIRO NAKAMURA@"
+.TerukiMurakawa: db " TERUKI MURAKAWA@"
+.KazuyoshiOsawa: db " KAZUYOSHI OSAWA@"
+.KimikoNakamichi: db " KIMIKO NAKAMICHI@"
+.Staff: db " #MON" ; "ポケットモンスター"
+ next " CRYSTAL VERSION" ; " クりスタル バージョン"
+ next " STAFF@" ; " スタッフ@"
+.Director: db " DIRECTOR@" ; "エグゼクティブ ディレクター@"
+.CoDirector: db " CO-DIRECTOR@" ; "ディレクター@"
+.Programmers: db " PROGRAMMERS@" ; "プログラム@"
+.GraphicsDirector: db " GRAPHICS DIRECTOR@" ; "グラフィック ディレクター@"
+.MonsterDesign: db " MONSTER DESIGN@" ; "# デザイン@"
+.GraphicsDesign: db " GRAPHICS DESIGN@" ; "グラフィック デザイン@"
+.Music: db " MUSIC@" ; "おんがく@"
+.SoundEffects: db " SOUND EFFECTS@" ; "サウンド エフ→クト@"
+.GameDesign: db " GAME DESIGN@" ; "ゲームデザイン@"
+.GameScenario: db " GAME SCENARIO@" ; "シナりォ@"
+.ToolProgramming: db " TOOL PROGRAMMING@" ; "ツール プログラム@"
+.ParametricDesign: db " PARAMETRIC DESIGN@" ; "パラメーター せってい@"
+.ScriptDesign: db " SCRIPT DESIGN@" ; "スクりプト せってい@"
+.MapDataDesign: db " MAP DATA DESIGN@" ; "マップデータ せってい@"
+.MapDesign: db " MAP DESIGN@" ; "マップ デザイン@"
+.ProductTesting: db " PRODUCT TESTING@" ; "デバッグプレイ@"
+.SpecialThanks: db " SPECIAL THANKS@" ; "スぺシャルサンクス@"
+.Producers: db " PRODUCERS@" ; "プロデューサー@"
+.ExecutiveProducer: db " EXECUTIVE PRODUCER@" ; "エグゼクティブ プロデューサー@"
+.PokemonAnimation: db " #MON ANIMATION@" ; "# アニメーション@"
+.PokedexText: db " #DEX TEXT@" ; "ずかん テキスト@"
+.MobilePrjLeader: db " MOBILE PRJ. LEADER@" ; "モバイルプロジ→クト りーダー@"
+.MobileSystemAd: db " MOBILE SYSTEM AD.@" ; "モバイル システムアドバイザー@"
+.MobileStadiumDir: db "MOBILE STADIUM DIR.@" ; "モバイルスタジアム ディレクター@"
+.Coordination: db " COORDINATION@" ; "コーディネーター@"
+.UsVersionStaff: db " US VERSION STAFF@"
+.UsCoordination: db " US COORDINATION@"
+.TextTranslation: db " TEXT TRANSLATION@"
+.PaadTesting: db " PAAD TESTING@"
+
+.Copyright:
+ ; (C) 1 9 9 5 - 2 0 0 1 N i n t e n d o
+ db $60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$6a,$6b,$6c
+ ; (C) 1 9 9 5 - 2 0 0 1 C r e a t u r e s i n c .
+ next $60,$61,$62,$63,$64,$65,$66,$6d,$6e,$6f,$70,$71,$72, $7a,$7b,$7c
+ ; (C) 1 9 9 5 - 2 0 0 1 G A M E F R E A K i n c .
+ next $60,$61,$62,$63,$64,$65,$66,$73,$74,$75,$76,$77,$78,$79, $7a,$7b,$7c
+ db "@"
diff --git a/data/decoration_attributes.asm b/data/decoration_attributes.asm
new file mode 100644
index 000000000..209662a6f
--- /dev/null
+++ b/data/decoration_attributes.asm
@@ -0,0 +1,63 @@
+decoration: MACRO
+ ; type, name, command, event flag, tile/sprite
+ db \1, \2, \3
+ dw \4
+ db \5
+ENDM
+
+DecorationAttributes: ; 26a4f
+; entries correspond to deco constants
+ decoration DECO_PLANT, $00, $0, EVENT_GAVE_KURT_APRICORNS, $00
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_BED, EVENT_GAVE_KURT_APRICORNS, $00
+ decoration DECO_BED, FEATHERY_BED, SET_UP_BED, EVENT_DECO_BED_1, $1b
+ decoration DECO_BED, PINK_BED, SET_UP_BED, EVENT_DECO_BED_2, $1c
+ decoration DECO_BED, POLKADOT_BED, SET_UP_BED, EVENT_DECO_BED_3, $1d
+ decoration DECO_BED, PIKACHU_BED, SET_UP_BED, EVENT_DECO_BED_4, $1e
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_CARPET, EVENT_GAVE_KURT_APRICORNS, $00
+ decoration DECO_CARPET, RED_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_1, $08
+ decoration DECO_CARPET, BLUE_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_2, $0b
+ decoration DECO_CARPET, YELLOW_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_3, $0e
+ decoration DECO_CARPET, GREEN_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_4, $11
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_PLANT, EVENT_GAVE_KURT_APRICORNS, $00
+ decoration DECO_PLANT, MAGNAPLANT, SET_UP_PLANT, EVENT_DECO_PLANT_1, $20
+ decoration DECO_PLANT, TROPICPLANT, SET_UP_PLANT, EVENT_DECO_PLANT_2, $21
+ decoration DECO_PLANT, JUMBOPLANT, SET_UP_PLANT, EVENT_DECO_PLANT_3, $22
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_POSTER, EVENT_GAVE_KURT_APRICORNS, $00
+ decoration DECO_PLANT, TOWN_MAP_D, SET_UP_POSTER, EVENT_DECO_PLANT_4, $1f
+ decoration DECO_POSTER, PIKACHU, SET_UP_POSTER, EVENT_DECO_POSTER_1, $23
+ decoration DECO_POSTER, CLEFAIRY, SET_UP_POSTER, EVENT_DECO_POSTER_2, $24
+ decoration DECO_POSTER, JIGGLYPUFF, SET_UP_POSTER, EVENT_DECO_POSTER_3, $25
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_CONSOLE, EVENT_GAVE_KURT_APRICORNS, $00
+ decoration DECO_PLANT, FAMICOM, SET_UP_CONSOLE, EVENT_DECO_FAMICOM, SPRITE_FAMICOM
+ decoration DECO_PLANT, SUPER_NES, SET_UP_CONSOLE, EVENT_DECO_SNES, SPRITE_SNES
+ decoration DECO_PLANT, NINTENDO_64, SET_UP_CONSOLE, EVENT_DECO_N64, SPRITE_N64
+ decoration DECO_PLANT, VIRTUAL_BOY, SET_UP_CONSOLE, EVENT_DECO_VIRTUAL_BOY, SPRITE_VIRTUAL_BOY
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_BIG_DOLL, EVENT_GAVE_KURT_APRICORNS, $00
+ decoration DECO_BIGDOLL, SNORLAX, SET_UP_BIG_DOLL, EVENT_DECO_BIG_SNORLAX_DOLL, SPRITE_BIG_SNORLAX
+ decoration DECO_BIGDOLL, ONIX, SET_UP_BIG_DOLL, EVENT_DECO_BIG_ONIX_DOLL, SPRITE_BIG_ONIX
+ decoration DECO_BIGDOLL, LAPRAS, SET_UP_BIG_DOLL, EVENT_DECO_BIG_LAPRAS_DOLL, SPRITE_BIG_LAPRAS
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_DOLL, EVENT_GAVE_KURT_APRICORNS, $00
+ decoration DECO_DOLL, PIKACHU, SET_UP_DOLL, EVENT_DECO_PIKACHU_DOLL, SPRITE_PIKACHU
+ decoration DECO_PLANT, SURF_PIKA_DOLL, SET_UP_DOLL, EVENT_DECO_SURFING_PIKACHU_DOLL, SPRITE_SURFING_PIKACHU
+ decoration DECO_DOLL, CLEFAIRY, SET_UP_DOLL, EVENT_DECO_CLEFAIRY_DOLL, SPRITE_CLEFAIRY
+ decoration DECO_DOLL, JIGGLYPUFF, SET_UP_DOLL, EVENT_DECO_JIGGLYPUFF_DOLL, SPRITE_JIGGLYPUFF
+ decoration DECO_DOLL, BULBASAUR, SET_UP_DOLL, EVENT_DECO_BULBASAUR_DOLL, SPRITE_BULBASAUR
+ decoration DECO_DOLL, CHARMANDER, SET_UP_DOLL, EVENT_DECO_CHARMANDER_DOLL, SPRITE_CHARMANDER
+ decoration DECO_DOLL, SQUIRTLE, SET_UP_DOLL, EVENT_DECO_SQUIRTLE_DOLL, SPRITE_SQUIRTLE
+ decoration DECO_DOLL, POLIWAG, SET_UP_DOLL, EVENT_DECO_POLIWAG_DOLL, SPRITE_POLIWAG
+ decoration DECO_DOLL, DIGLETT, SET_UP_DOLL, EVENT_DECO_DIGLETT_DOLL, SPRITE_DIGLETT
+ decoration DECO_DOLL, STARYU, SET_UP_DOLL, EVENT_DECO_STARMIE_DOLL, SPRITE_STARMIE
+ decoration DECO_DOLL, MAGIKARP, SET_UP_DOLL, EVENT_DECO_MAGIKARP_DOLL, SPRITE_MAGIKARP
+ decoration DECO_DOLL, ODDISH, SET_UP_DOLL, EVENT_DECO_ODDISH_DOLL, SPRITE_ODDISH
+ decoration DECO_DOLL, GENGAR, SET_UP_DOLL, EVENT_DECO_GENGAR_DOLL, SPRITE_GENGAR
+ decoration DECO_DOLL, SHELLDER, SET_UP_DOLL, EVENT_DECO_SHELLDER_DOLL, SPRITE_SHELLDER
+ decoration DECO_DOLL, GRIMER, SET_UP_DOLL, EVENT_DECO_GRIMER_DOLL, SPRITE_GRIMER
+ decoration DECO_DOLL, VOLTORB, SET_UP_DOLL, EVENT_DECO_VOLTORB_DOLL, SPRITE_VOLTORB
+ decoration DECO_DOLL, WEEDLE, SET_UP_DOLL, EVENT_DECO_WEEDLE_DOLL, SPRITE_WEEDLE
+ decoration DECO_DOLL, UNOWN, SET_UP_DOLL, EVENT_DECO_UNOWN_DOLL, SPRITE_UNOWN
+ decoration DECO_DOLL, GEODUDE, SET_UP_DOLL, EVENT_DECO_GEODUDE_DOLL, SPRITE_GEODUDE
+ decoration DECO_DOLL, MACHOP, SET_UP_DOLL, EVENT_DECO_MACHOP_DOLL, SPRITE_MACHOP
+ decoration DECO_DOLL, TENTACOOL, SET_UP_DOLL, EVENT_DECO_TENTACOOL_DOLL, SPRITE_TENTACOOL
+ decoration DECO_PLANT, GOLD_TROPHY, SET_UP_DOLL, EVENT_DECO_GOLD_TROPHY, SPRITE_GOLD_TROPHY
+ decoration DECO_PLANT, SILVER_TROPHY, SET_UP_DOLL, EVENT_DECO_SILVER_TROPHY, SPRITE_SILVER_TROPHY
+; 26b8d
diff --git a/data/default_options.asm b/data/default_options.asm
new file mode 100644
index 000000000..b1916b88c
--- /dev/null
+++ b/data/default_options.asm
@@ -0,0 +1,18 @@
+DefaultOptions: ; 14f7c
+; Options: med text speed
+ db TEXT_DELAY_MED
+; wSaveFileExists: no
+ db $00
+; TextBoxFrame: frame 1
+ db FRAME_1
+; TextBoxFlags: ??
+ db $01
+; GBPrinter: normal brightness
+ db GBPRINTER_NORMAL
+; Options2: menu account on
+ db $01
+; $cfd2: ??
+ db $00
+; $cfd3: ??
+ db $00
+; 14f84
diff --git a/data/egg_move_pointers.asm b/data/egg_move_pointers.asm
deleted file mode 100644
index 11665f23e..000000000
--- a/data/egg_move_pointers.asm
+++ /dev/null
@@ -1,256 +0,0 @@
-EggMovePointers:: ; 0x23b11
- dw BulbasaurEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw CharmanderEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw SquirtleEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw PidgeyEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw RattataEggMoves
- dw NoEggMoves
- dw SpearowEggMoves
- dw NoEggMoves
- dw EkansEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw SandshrewEggMoves
- dw NoEggMoves
- dw NidoranFEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NidoranMEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw VulpixEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw ZubatEggMoves
- dw NoEggMoves
- dw OddishEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw ParasEggMoves
- dw NoEggMoves
- dw VenonatEggMoves
- dw NoEggMoves
- dw DiglettEggMoves
- dw NoEggMoves
- dw MeowthEggMoves
- dw NoEggMoves
- dw PsyduckEggMoves
- dw NoEggMoves
- dw MankeyEggMoves
- dw NoEggMoves
- dw GrowlitheEggMoves
- dw NoEggMoves
- dw PoliwagEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw AbraEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw MachopEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw BellsproutEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw TentacoolEggMoves
- dw NoEggMoves
- dw GeodudeEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw PonytaEggMoves
- dw NoEggMoves
- dw SlowpokeEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw FarfetchDEggMoves
- dw DoduoEggMoves
- dw NoEggMoves
- dw SeelEggMoves
- dw NoEggMoves
- dw GrimerEggMoves
- dw NoEggMoves
- dw ShellderEggMoves
- dw NoEggMoves
- dw GastlyEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw OnixEggMoves
- dw DrowzeeEggMoves
- dw NoEggMoves
- dw KrabbyEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw ExeggcuteEggMoves
- dw NoEggMoves
- dw CuboneEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw LickitungEggMoves
- dw KoffingEggMoves
- dw NoEggMoves
- dw RhyhornEggMoves
- dw NoEggMoves
- dw ChanseyEggMoves
- dw TangelaEggMoves
- dw KangaskhanEggMoves
- dw HorseaEggMoves
- dw NoEggMoves
- dw GoldeenEggMoves
- dw NoEggMoves
-if _CRYSTAL
- dw NoEggMoves
-else
- dw StaryuEggMoves
-endc
- dw NoEggMoves
- dw MrMimeEggMoves
- dw ScytherEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw PinsirEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw LaprasEggMoves
- dw NoEggMoves
- dw EeveeEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw OmanyteEggMoves
- dw NoEggMoves
- dw KabutoEggMoves
- dw NoEggMoves
- dw AerodactylEggMoves
- dw SnorlaxEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw DratiniEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw ChikoritaEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw CyndaquilEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw TotodileEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw SentretEggMoves
- dw NoEggMoves
- dw HoothootEggMoves
- dw NoEggMoves
- dw LedybaEggMoves
- dw NoEggMoves
- dw SpinarakEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw ChinchouEggMoves
- dw NoEggMoves
- dw PichuEggMoves
- dw CleffaEggMoves
- dw IgglybuffEggMoves
- dw TogepiEggMoves
- dw NoEggMoves
- dw NatuEggMoves
- dw NoEggMoves
- dw MareepEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw MarillEggMoves
- dw NoEggMoves
- dw SudowoodoEggMoves
- dw NoEggMoves
- dw HoppipEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw AipomEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw YanmaEggMoves
- dw WooperEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw MurkrowEggMoves
- dw NoEggMoves
- dw MisdreavusEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw GirafarigEggMoves
- dw PinecoEggMoves
- dw NoEggMoves
- dw DunsparceEggMoves
- dw GligarEggMoves
- dw NoEggMoves
- dw SnubbullEggMoves
- dw NoEggMoves
- dw QwilfishEggMoves
- dw NoEggMoves
- dw ShuckleEggMoves
- dw HeracrossEggMoves
- dw SneaselEggMoves
- dw TeddiursaEggMoves
- dw NoEggMoves
- dw SlugmaEggMoves
- dw NoEggMoves
- dw SwinubEggMoves
- dw NoEggMoves
- dw CorsolaEggMoves
- dw RemoraidEggMoves
- dw NoEggMoves
- dw DelibirdEggMoves
- dw MantineEggMoves
- dw SkarmoryEggMoves
- dw HoundourEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw PhanpyEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw StantlerEggMoves
- dw NoEggMoves
- dw TyrogueEggMoves
- dw NoEggMoves
- dw SmoochumEggMoves
- dw ElekidEggMoves
- dw MagbyEggMoves
- dw MiltankEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw LarvitarEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
- dw NoEggMoves
diff --git a/data/egg_moves.asm b/data/egg_moves.asm
deleted file mode 100644
index 2fcf47232..000000000
--- a/data/egg_moves.asm
+++ /dev/null
@@ -1,870 +0,0 @@
-INCLUDE "includes.asm"
-
-
-SECTION "Egg Moves", ROMX
-
-; All instances of Charm, Steel Wing, Sweet Scent, and Lovely Kiss were
-; removed from egg move lists in Crystal, because they are also TMs.
-
-; Staryu's egg moves were removed in Crystal, because Staryu is genderless
-; and can only breed with Ditto.
-
-
-INCLUDE "data/egg_move_pointers.asm"
-
-
-EggMoves::
-
-BulbasaurEggMoves:
- db LIGHT_SCREEN
- db SKULL_BASH
- db SAFEGUARD
-if !_CRYSTAL
- db CHARM
-endc
- db RAZOR_WIND
- db PETAL_DANCE
- db $ff
-
-CharmanderEggMoves:
- db BELLY_DRUM
- db ANCIENTPOWER
- db ROCK_SLIDE
- db BITE
- db OUTRAGE
- db BEAT_UP
- db $ff
-
-SquirtleEggMoves:
- db MIRROR_COAT
- db HAZE
- db MIST
- db CONFUSION
- db FORESIGHT
- db FLAIL
- db $ff
-
-PidgeyEggMoves:
- db PURSUIT
- db FAINT_ATTACK
- db FORESIGHT
-if !_CRYSTAL
- db STEEL_WING
-endc
- db $ff
-
-RattataEggMoves:
- db SCREECH
- db FLAME_WHEEL
- db FURY_SWIPES
- db BITE
- db COUNTER
- db REVERSAL
- db $ff
-
-SpearowEggMoves:
- db FAINT_ATTACK
- db FALSE_SWIPE
- db SCARY_FACE
- db QUICK_ATTACK
- db TRI_ATTACK
- db $ff
-
-EkansEggMoves:
- db PURSUIT
- db SLAM
- db SPITE
- db BEAT_UP
-if _CRYSTAL
- db CRUNCH
-endc
- db $ff
-
-SandshrewEggMoves:
- db FLAIL
- db SAFEGUARD
- db COUNTER
- db RAPID_SPIN
-if _CRYSTAL
- db METAL_CLAW
-endc
- db $ff
-
-NidoranFEggMoves:
- db SUPERSONIC
- db DISABLE
- db TAKE_DOWN
- db FOCUS_ENERGY
- db CHARM
- db COUNTER
- db BEAT_UP
- db $ff
-
-NidoranMEggMoves:
- db SUPERSONIC
- db DISABLE
- db TAKE_DOWN
- db CONFUSION
- db AMNESIA
- db COUNTER
- db BEAT_UP
- db $ff
-
-VulpixEggMoves:
- db FAINT_ATTACK
- db HYPNOSIS
- db FLAIL
- db SPITE
- db DISABLE
- db $ff
-
-ZubatEggMoves:
- db QUICK_ATTACK
- db PURSUIT
- db FAINT_ATTACK
- db GUST
- db WHIRLWIND
- db $ff
-
-OddishEggMoves:
- db SWORDS_DANCE
- db RAZOR_LEAF
- db FLAIL
- db SYNTHESIS
-if !_CRYSTAL
- db CHARM
-endc
- db $ff
-
-ParasEggMoves:
- db FALSE_SWIPE
- db SCREECH
- db COUNTER
- db PSYBEAM
- db FLAIL
-if !_CRYSTAL
- db SWEET_SCENT
-endc
- db LIGHT_SCREEN
- db PURSUIT
- db $ff
-
-VenonatEggMoves:
- db BATON_PASS
- db SCREECH
- db GIGA_DRAIN
- db $ff
-
-DiglettEggMoves:
- db FAINT_ATTACK
- db SCREECH
- db ANCIENTPOWER
- db PURSUIT
- db BEAT_UP
- db $ff
-
-MeowthEggMoves:
- db SPITE
- db CHARM
- db HYPNOSIS
- db AMNESIA
- db $ff
-
-PsyduckEggMoves:
- db ICE_BEAM
- db HYPNOSIS
- db PSYBEAM
- db FORESIGHT
- db LIGHT_SCREEN
- db FUTURE_SIGHT
- db PSYCHIC_M
-if _CRYSTAL
- db CROSS_CHOP
-endc
- db $ff
-
-MankeyEggMoves:
- db ROCK_SLIDE
- db FORESIGHT
- db MEDITATE
- db COUNTER
- db REVERSAL
- db BEAT_UP
- db $ff
-
-GrowlitheEggMoves:
- db BODY_SLAM
- db SAFEGUARD
- db CRUNCH
- db THRASH
- db FIRE_SPIN
- db $ff
-
-PoliwagEggMoves:
- db MIST
- db SPLASH
- db BUBBLEBEAM
- db HAZE
- db MIND_READER
- db $ff
-
-AbraEggMoves:
- db LIGHT_SCREEN
- db ENCORE
- db BARRIER
- db $ff
-
-MachopEggMoves:
- db LIGHT_SCREEN
- db MEDITATE
- db ROLLING_KICK
- db ENCORE
- db $ff
-
-BellsproutEggMoves:
- db SWORDS_DANCE
- db ENCORE
- db REFLECT
- db SYNTHESIS
- db LEECH_LIFE
- db $ff
-
-TentacoolEggMoves:
- db AURORA_BEAM
- db MIRROR_COAT
- db RAPID_SPIN
- db HAZE
- db SAFEGUARD
- db $ff
-
-GeodudeEggMoves:
- db MEGA_PUNCH
- db ROCK_SLIDE
- db $ff
-
-PonytaEggMoves:
- db FLAME_WHEEL
- db THRASH
- db DOUBLE_KICK
- db HYPNOSIS
- db CHARM
- db QUICK_ATTACK
- db $ff
-
-SlowpokeEggMoves:
- db SAFEGUARD
- db BELLY_DRUM
- db FUTURE_SIGHT
- db STOMP
- db $ff
-
-FarfetchDEggMoves:
-if !_CRYSTAL
- db STEEL_WING
-endc
- db FORESIGHT
- db MIRROR_MOVE
- db GUST
- db QUICK_ATTACK
- db FLAIL
- db $ff
-
-DoduoEggMoves:
- db QUICK_ATTACK
- db SUPERSONIC
- db HAZE
- db FAINT_ATTACK
- db FLAIL
- db $ff
-
-SeelEggMoves:
- db LICK
- db PERISH_SONG
- db DISABLE
- db PECK
- db SLAM
- db ENCORE
- db $ff
-
-GrimerEggMoves:
- db HAZE
- db MEAN_LOOK
- db LICK
- db $ff
-
-ShellderEggMoves:
- db BUBBLEBEAM
- db TAKE_DOWN
- db BARRIER
- db RAPID_SPIN
- db SCREECH
- db $ff
-
-GastlyEggMoves:
- db PSYWAVE
- db PERISH_SONG
- db HAZE
- db $ff
-
-OnixEggMoves:
- db ROCK_SLIDE
- db FLAIL
- db $ff
-
-DrowzeeEggMoves:
- db LIGHT_SCREEN
- db BARRIER
- db $ff
-
-KrabbyEggMoves:
- db DIG
- db HAZE
- db AMNESIA
- db FLAIL
- db SLAM
- db $ff
-
-ExeggcuteEggMoves:
- db SYNTHESIS
- db MOONLIGHT
- db REFLECT
- db MEGA_DRAIN
- db ANCIENTPOWER
- db $ff
-
-CuboneEggMoves:
- db ROCK_SLIDE
- db ANCIENTPOWER
- db BELLY_DRUM
- db SCREECH
- db SKULL_BASH
- db PERISH_SONG
-if _CRYSTAL
- db SWORDS_DANCE
-endc
- db $ff
-
-LickitungEggMoves:
- db BELLY_DRUM
- db MAGNITUDE
- db BODY_SLAM
- db $ff
-
-KoffingEggMoves:
- db SCREECH
- db PSYWAVE
- db PSYBEAM
- db DESTINY_BOND
- db PAIN_SPLIT
- db $ff
-
-RhyhornEggMoves:
- db CRUNCH
- db REVERSAL
- db ROCK_SLIDE
- db THRASH
- db PURSUIT
- db COUNTER
- db MAGNITUDE
- db $ff
-
-ChanseyEggMoves:
- db PRESENT
- db METRONOME
- db HEAL_BELL
- db $ff
-
-TangelaEggMoves:
- db FLAIL
- db CONFUSION
- db MEGA_DRAIN
- db REFLECT
- db AMNESIA
- db $ff
-
-KangaskhanEggMoves:
- db STOMP
- db FORESIGHT
- db FOCUS_ENERGY
- db SAFEGUARD
- db DISABLE
- db $ff
-
-HorseaEggMoves:
- db FLAIL
- db AURORA_BEAM
- db OCTAZOOKA
- db DISABLE
- db SPLASH
- db DRAGON_RAGE
- db $ff
-
-GoldeenEggMoves:
- db PSYBEAM
- db HAZE
- db HYDRO_PUMP
- db $ff
-
-if !_CRYSTAL
-StaryuEggMoves:
- db AURORA_BEAM
- db BARRIER
- db SUPERSONIC
- db $ff
-endc
-
-MrMimeEggMoves:
- db FUTURE_SIGHT
- db HYPNOSIS
- db MIMIC
- db $ff
-
-ScytherEggMoves:
- db COUNTER
- db SAFEGUARD
- db BATON_PASS
- db RAZOR_WIND
- db REVERSAL
- db LIGHT_SCREEN
- db $ff
-
-PinsirEggMoves:
- db FURY_ATTACK
- db FLAIL
- db $ff
-
-LaprasEggMoves:
- db AURORA_BEAM
- db FORESIGHT
- db $ff
-
-EeveeEggMoves:
- db FLAIL
- db CHARM
- db $ff
-
-OmanyteEggMoves:
- db BUBBLEBEAM
- db AURORA_BEAM
- db SLAM
- db SUPERSONIC
- db HAZE
- db $ff
-
-KabutoEggMoves:
- db BUBBLEBEAM
- db AURORA_BEAM
- db RAPID_SPIN
- db DIG
- db FLAIL
- db $ff
-
-AerodactylEggMoves:
- db WHIRLWIND
- db PURSUIT
- db FORESIGHT
-if !_CRYSTAL
- db STEEL_WING
-endc
- db $ff
-
-SnorlaxEggMoves:
- db LICK
-if !_CRYSTAL
- db CHARM
-endc
- db $ff
-
-DratiniEggMoves:
- db LIGHT_SCREEN
- db MIST
- db HAZE
- db SUPERSONIC
- db $ff
-
-ChikoritaEggMoves:
- db VINE_WHIP
- db LEECH_SEED
- db COUNTER
- db ANCIENTPOWER
- db FLAIL
- db SWORDS_DANCE
- db $ff
-
-CyndaquilEggMoves:
- db FURY_SWIPES
- db QUICK_ATTACK
- db REVERSAL
- db THRASH
- db FORESIGHT
-if _CRYSTAL
- db SUBMISSION
-endc
- db $ff
-
-TotodileEggMoves:
- db CRUNCH
- db THRASH
- db HYDRO_PUMP
- db ANCIENTPOWER
- db RAZOR_WIND
- db ROCK_SLIDE
- db $ff
-
-SentretEggMoves:
- db DOUBLE_EDGE
- db PURSUIT
- db SLASH
- db FOCUS_ENERGY
- db REVERSAL
- db $ff
-
-HoothootEggMoves:
- db MIRROR_MOVE
- db SUPERSONIC
- db FAINT_ATTACK
- db WING_ATTACK
- db WHIRLWIND
-if _CRYSTAL
- db SKY_ATTACK
-endc
- db $ff
-
-LedybaEggMoves:
- db PSYBEAM
- db BIDE
- db LIGHT_SCREEN
- db $ff
-
-SpinarakEggMoves:
- db PSYBEAM
- db DISABLE
- db SONICBOOM
- db BATON_PASS
- db PURSUIT
- db $ff
-
-ChinchouEggMoves:
- db FLAIL
- db SUPERSONIC
- db SCREECH
- db $ff
-
-PichuEggMoves:
- db REVERSAL
- db BIDE
- db PRESENT
- db ENCORE
- db DOUBLESLAP
- db $ff
-
-CleffaEggMoves:
- db PRESENT
- db METRONOME
- db AMNESIA
- db BELLY_DRUM
- db SPLASH
- db MIMIC
- db $ff
-
-IgglybuffEggMoves:
- db PERISH_SONG
- db PRESENT
- db FAINT_ATTACK
- db $ff
-
-TogepiEggMoves:
- db PRESENT
- db MIRROR_MOVE
- db PECK
- db FORESIGHT
- db FUTURE_SIGHT
- db $ff
-
-NatuEggMoves:
- db HAZE
- db DRILL_PECK
- db QUICK_ATTACK
- db FAINT_ATTACK
- db STEEL_WING
- db $ff
-
-MareepEggMoves:
- db THUNDERBOLT
- db TAKE_DOWN
- db BODY_SLAM
- db SAFEGUARD
- db SCREECH
- db REFLECT
- db $ff
-
-MarillEggMoves:
- db LIGHT_SCREEN
- db PRESENT
- db AMNESIA
- db FUTURE_SIGHT
- db BELLY_DRUM
- db PERISH_SONG
- db SUPERSONIC
- db FORESIGHT
- db $ff
-
-SudowoodoEggMoves:
- db SELFDESTRUCT
- db $ff
-
-HoppipEggMoves:
- db CONFUSION
- db GROWL
- db ENCORE
- db DOUBLE_EDGE
- db REFLECT
- db AMNESIA
- db PAY_DAY
- db $ff
-
-AipomEggMoves:
- db COUNTER
- db SCREECH
- db PURSUIT
- db AGILITY
- db SPITE
- db SLAM
- db DOUBLESLAP
- db BEAT_UP
- db $ff
-
-YanmaEggMoves:
- db WHIRLWIND
- db REVERSAL
- db LEECH_LIFE
- db $ff
-
-WooperEggMoves:
- db BODY_SLAM
- db ANCIENTPOWER
- db SAFEGUARD
- db $ff
-
-MurkrowEggMoves:
- db WHIRLWIND
- db DRILL_PECK
- db QUICK_ATTACK
- db MIRROR_MOVE
- db WING_ATTACK
-if _CRYSTAL
- db SKY_ATTACK
-endc
- db $ff
-
-MisdreavusEggMoves:
- db SCREECH
- db DESTINY_BOND
- db $ff
-
-GirafarigEggMoves:
- db TAKE_DOWN
- db AMNESIA
- db FORESIGHT
- db FUTURE_SIGHT
- db BEAT_UP
- db $ff
-
-PinecoEggMoves:
- db REFLECT
- db PIN_MISSILE
- db FLAIL
- db SWIFT
- db $ff
-
-DunsparceEggMoves:
- db BIDE
- db ANCIENTPOWER
- db ROCK_SLIDE
- db BITE
- db RAGE
- db $ff
-
-GligarEggMoves:
- db METAL_CLAW
- db WING_ATTACK
- db RAZOR_WIND
- db COUNTER
- db $ff
-
-SnubbullEggMoves:
- db METRONOME
- db FAINT_ATTACK
- db REFLECT
- db PRESENT
- db CRUNCH
- db HEAL_BELL
- db LICK
- db LEER
- db $ff
-
-QwilfishEggMoves:
- db FLAIL
- db HAZE
- db BUBBLEBEAM
- db SUPERSONIC
- db $ff
-
-ShuckleEggMoves:
- db SWEET_SCENT
- db $ff
-
-HeracrossEggMoves:
- db HARDEN
- db BIDE
- db FLAIL
- db $ff
-
-SneaselEggMoves:
- db COUNTER
- db SPITE
- db FORESIGHT
- db REFLECT
- db BITE
- db $ff
-
-TeddiursaEggMoves:
- db CRUNCH
- db TAKE_DOWN
- db SEISMIC_TOSS
- db FOCUS_ENERGY
- db COUNTER
-if _CRYSTAL
- db METAL_CLAW
-endc
- db $ff
-
-SlugmaEggMoves:
- db ACID_ARMOR
- db $ff
-
-SwinubEggMoves:
- db TAKE_DOWN
- db BITE
- db BODY_SLAM
- db ROCK_SLIDE
- db ANCIENTPOWER
- db $ff
-
-CorsolaEggMoves:
- db ROCK_SLIDE
- db SAFEGUARD
- db SCREECH
- db MIST
- db AMNESIA
- db $ff
-
-RemoraidEggMoves:
- db AURORA_BEAM
- db OCTAZOOKA
- db SUPERSONIC
- db HAZE
- db SCREECH
- db $ff
-
-DelibirdEggMoves:
- db AURORA_BEAM
- db QUICK_ATTACK
- db FUTURE_SIGHT
- db SPLASH
- db RAPID_SPIN
- db $ff
-
-MantineEggMoves:
- db TWISTER
- db HYDRO_PUMP
- db HAZE
- db SLAM
- db $ff
-
-SkarmoryEggMoves:
- db DRILL_PECK
- db PURSUIT
- db WHIRLWIND
-if _CRYSTAL
- db SKY_ATTACK
-endc
- db $ff
-
-HoundourEggMoves:
- db FIRE_SPIN
- db RAGE
- db PURSUIT
- db COUNTER
- db SPITE
- db REVERSAL
- db BEAT_UP
- db $ff
-
-PhanpyEggMoves:
- db FOCUS_ENERGY
- db BODY_SLAM
- db ANCIENTPOWER
-if _CRYSTAL
- db WATER_GUN
-endc
- db $ff
-
-StantlerEggMoves:
- db REFLECT
- db SPITE
- db DISABLE
- db LIGHT_SCREEN
- db BITE
- db $ff
-
-TyrogueEggMoves:
- db RAPID_SPIN
- db HI_JUMP_KICK
- db MACH_PUNCH
- db MIND_READER
- db $ff
-
-SmoochumEggMoves:
-if !_CRYSTAL
- db LOVELY_KISS
-endc
- db MEDITATE
- db $ff
-
-ElekidEggMoves:
- db KARATE_CHOP
- db BARRIER
- db ROLLING_KICK
- db MEDITATE
-if _CRYSTAL
- db CROSS_CHOP
-endc
- db $ff
-
-MagbyEggMoves:
- db KARATE_CHOP
- db MEGA_PUNCH
- db BARRIER
- db SCREECH
-if _CRYSTAL
- db CROSS_CHOP
-endc
- db $ff
-
-MiltankEggMoves:
- db PRESENT
- db REVERSAL
- db SEISMIC_TOSS
- db $ff
-
-LarvitarEggMoves:
- db PURSUIT
- db STOMP
- db OUTRAGE
- db FOCUS_ENERGY
- db ANCIENTPOWER
- db $ff
-
-NoEggMoves:
- db $ff
diff --git a/data/emote_headers.asm b/data/emote_headers.asm
new file mode 100644
index 000000000..2618d3b0a
--- /dev/null
+++ b/data/emote_headers.asm
@@ -0,0 +1,22 @@
+emote_header: MACRO
+; graphics pointer, length, starting tile
+ dw \1
+ db \2 tiles, BANK(\1)
+ dw VTiles1 tile \3
+ENDM
+
+EmotesPointers: ; 144d
+; entries correspond to EMOTE_* constants
+ emote_header ShockEmote, 4, $78
+ emote_header QuestionEmote, 4, $78
+ emote_header HappyEmote, 4, $78
+ emote_header SadEmote, 4, $78
+ emote_header HeartEmote, 4, $78
+ emote_header BoltEmote, 4, $78
+ emote_header SleepEmote, 4, $78
+ emote_header FishEmote, 4, $78
+ emote_header JumpShadowGFX, 1, $7c
+ emote_header FishingRodGFX, 2, $7c
+ emote_header BoulderDustGFX, 2, $7e
+ emote_header GrassRustleGFX, 1, $7e
+; 14495
diff --git a/data/engine_flags.asm b/data/engine_flags.asm
new file mode 100644
index 000000000..8dfc251c6
--- /dev/null
+++ b/data/engine_flags.asm
@@ -0,0 +1,206 @@
+engine_flag: MACRO
+ dwb \1, 1 << \2
+ENDM
+
+EngineFlags: ; 80462
+ ; location, bit
+ ; (all locations are in WRAM bank 1)
+
+ ; pokegear
+ engine_flag wPokegearFlags, 1 ; radio card ; $0
+ engine_flag wPokegearFlags, 0 ; map card
+ engine_flag wPokegearFlags, 2 ; phone card
+ engine_flag wPokegearFlags, 3 ; expn card
+ engine_flag wPokegearFlags, 7 ; on/off
+
+ ; wDayCareMan, 7 ; day-care 1 on
+ engine_flag wDayCareMan, 6 ; egg is ready
+ ; wDayCareMan, 5 ; monster 1 and 2 are compatible
+ engine_flag wDayCareMan, 0 ; monster 1 in day-care
+
+ ; wDayCareLady, 7 = day-care 2 on
+ engine_flag wDayCareLady, 0 ; monster 2 in day-care
+
+ engine_flag wMomSavingMoney, 0 ; mom saving money ; $8
+ engine_flag wMomSavingMoney, 7 ; dst
+
+ engine_flag wUnusedTwoDayTimerOn, 0 ; unused, possibly related to a 2-day timer
+
+ engine_flag StatusFlags, 0 ; pokedex
+ engine_flag StatusFlags, 1 ; unown dex
+ engine_flag StatusFlags, 3 ; pokerus
+ engine_flag StatusFlags, 4 ; rocket signal on ch20
+ engine_flag StatusFlags, 6 ; credits skip
+ engine_flag StatusFlags, 7 ; bug contest on ; $10
+ engine_flag StatusFlags2, 2 ; bug contest timer
+ engine_flag StatusFlags2, 1 ; safari zone?
+ engine_flag StatusFlags2, 0 ; rockets in radio tower
+ engine_flag StatusFlags2, 4 ; bike shop call enabled (1024 bike steps reqd)
+ engine_flag StatusFlags2, 5 ; give pokerus
+ engine_flag StatusFlags2, 6 ; berry -> berry juice when trading?
+ engine_flag StatusFlags2, 7 ; rockets in mahogany
+
+ engine_flag BikeFlags, 0 ; strength active ; $18
+ engine_flag BikeFlags, 1 ; always on bike (cant surf)
+ engine_flag BikeFlags, 2 ; downhill (cycling road)
+
+ engine_flag JohtoBadges, 0 ; zephyrbadge
+ engine_flag JohtoBadges, 1 ; hivebadge
+ engine_flag JohtoBadges, 2 ; plainbadge
+ engine_flag JohtoBadges, 3 ; fogbadge
+ engine_flag JohtoBadges, 4 ; mineralbadge
+ engine_flag JohtoBadges, 5 ; stormbadge ; $20
+ engine_flag JohtoBadges, 6 ; glacierbadge
+ engine_flag JohtoBadges, 7 ; risingbadge
+
+ engine_flag KantoBadges, 0 ; boulderbadge
+ engine_flag KantoBadges, 1 ; cascadebadge
+ engine_flag KantoBadges, 2 ; thunderbadge
+ engine_flag KantoBadges, 3 ; rainbowbadge
+ engine_flag KantoBadges, 4 ; soulbadge
+ engine_flag KantoBadges, 5 ; marshbadge ; $28
+ engine_flag KantoBadges, 6 ; volcanobadge
+ engine_flag KantoBadges, 7 ; earthbadge
+
+ ; unown sets
+ engine_flag UnlockedUnowns, 0 ; 1
+ engine_flag UnlockedUnowns, 1 ; 2
+ engine_flag UnlockedUnowns, 2 ; 3
+ engine_flag UnlockedUnowns, 3 ; 4
+ engine_flag UnlockedUnowns, 4 ; 5
+ engine_flag UnlockedUnowns, 5 ; 6 ; $30
+ engine_flag UnlockedUnowns, 6 ; 7
+ engine_flag UnlockedUnowns, 7 ; 8
+
+ ; fly
+ engine_flag VisitedSpawns, 0 ; your house
+ engine_flag VisitedSpawns, 1 ; viridian pokecenter
+ engine_flag VisitedSpawns, 2 ; pallet
+ engine_flag VisitedSpawns, 3 ; viridian
+ engine_flag VisitedSpawns, 4 ; pewter
+ engine_flag VisitedSpawns, 5 ; cerulean ; $38
+ engine_flag VisitedSpawns, 6 ; rock tunnel
+ engine_flag VisitedSpawns, 7 ; vermilion
+ engine_flag VisitedSpawns + 1, 0 ; lavender
+ engine_flag VisitedSpawns + 1, 1 ; saffron
+ engine_flag VisitedSpawns + 1, 2 ; celadon
+ engine_flag VisitedSpawns + 1, 3 ; fuchsia
+ engine_flag VisitedSpawns + 1, 4 ; cinnabar
+ engine_flag VisitedSpawns + 1, 5 ; indigo plateau ; $40
+ engine_flag VisitedSpawns + 1, 6 ; new bark
+ engine_flag VisitedSpawns + 1, 7 ; cherrygrove
+ engine_flag VisitedSpawns + 2, 0 ; violet
+ ; union cave
+ engine_flag VisitedSpawns + 2, 2 ; azalea
+ engine_flag VisitedSpawns + 2, 3 ; cianwood
+ engine_flag VisitedSpawns + 2, 4 ; goldenrod
+ engine_flag VisitedSpawns + 2, 5 ; olivine
+ engine_flag VisitedSpawns + 2, 6 ; ecruteak ; $48
+ engine_flag VisitedSpawns + 2, 7 ; mahogany
+ engine_flag VisitedSpawns + 3, 0 ; lake of rage
+ engine_flag VisitedSpawns + 3, 1 ; blackthorn
+ engine_flag VisitedSpawns + 3, 2 ; silver cave
+ ; fast ship
+ engine_flag VisitedSpawns + 3, 4 ; unused
+
+ engine_flag wLuckyNumberShowFlag, 0 ; lucky number show
+ engine_flag StatusFlags2, 3 ; ????
+
+ engine_flag DailyFlags, 0 ; kurt making balls ; $50
+ engine_flag DailyFlags, 1 ; ????
+ engine_flag DailyFlags, 2 ; special wilddata?
+ engine_flag DailyFlags, 3 ; time capsule (24h wait)
+ engine_flag DailyFlags, 4 ; all fruit trees
+ engine_flag DailyFlags, 5 ; shuckle given
+ engine_flag DailyFlags, 6 ; goldenrod underground merchant closed
+ engine_flag DailyFlags, 7 ; fought in trainer hall today
+
+ engine_flag WeeklyFlags, 0 ; mt moon square clefairy ; $58
+ engine_flag WeeklyFlags, 1 ; union cave lapras
+ engine_flag WeeklyFlags, 2 ; goldenrod underground haircut used
+ engine_flag WeeklyFlags, 3 ; goldenrod mall happiness event floor05 object07
+ engine_flag WeeklyFlags, 4 ; tea in blues house
+ engine_flag WeeklyFlags, 5 ; indigo plateau rival fight
+ engine_flag WeeklyFlags, 6 ; move tutor
+ engine_flag WeeklyFlags, 7 ; buenas password
+
+ engine_flag SwarmFlags, 0 ; buenas password 2
+ engine_flag SwarmFlags, 1 ; goldenrod dept store sale is on
+
+ engine_flag GameTimerPause, 7 ; $62
+
+ engine_flag PlayerGender, 0 ; player is female
+
+ engine_flag wCelebiEvent, 2 ; have gs ball after kurt examined it
+
+ ; rematches
+ engine_flag wDailyRematchFlags, 0 ; jack
+ engine_flag wDailyRematchFlags, 1 ; huey
+ engine_flag wDailyRematchFlags, 2 ; gaven
+ engine_flag wDailyRematchFlags, 3 ; beth ; $68
+ engine_flag wDailyRematchFlags, 4 ; jose
+ engine_flag wDailyRematchFlags, 5 ; reena
+ engine_flag wDailyRematchFlags, 6 ; joey
+ engine_flag wDailyRematchFlags, 7 ; wade
+ engine_flag wDailyRematchFlags + 1, 0 ; ralph
+ engine_flag wDailyRematchFlags + 1, 1 ; liz
+ engine_flag wDailyRematchFlags + 1, 2 ; anthony
+ engine_flag wDailyRematchFlags + 1, 3 ; todd ; $70
+ engine_flag wDailyRematchFlags + 1, 4 ; gina
+ engine_flag wDailyRematchFlags + 1, 5 ; arnie
+ engine_flag wDailyRematchFlags + 1, 6 ; alan
+ engine_flag wDailyRematchFlags + 1, 7 ; dana
+ engine_flag wDailyRematchFlags + 2, 0 ; chad
+ engine_flag wDailyRematchFlags + 2, 1 ; tully
+ engine_flag wDailyRematchFlags + 2, 2 ; brent
+ engine_flag wDailyRematchFlags + 2, 3 ; tiffany ; $78
+ engine_flag wDailyRematchFlags + 2, 4 ; vance
+ engine_flag wDailyRematchFlags + 2, 5 ; wilton
+ engine_flag wDailyRematchFlags + 2, 6 ; parry
+ engine_flag wDailyRematchFlags + 2, 7 ; erin
+
+ engine_flag wDailyPhoneItemFlags, 0 ; beverly has nugget
+ engine_flag wDailyPhoneItemFlags, 1 ; jose has star piece
+ engine_flag wDailyPhoneItemFlags, 2 ; wade has item (see EVENT_WADE_HAS_*** in constants/event_flags.asm)
+ engine_flag wDailyPhoneItemFlags, 3 ; gina has leaf stone ; $80
+ engine_flag wDailyPhoneItemFlags, 4 ; alan has fire stone
+ engine_flag wDailyPhoneItemFlags, 5 ; liz has thunderstone
+ engine_flag wDailyPhoneItemFlags, 6 ; derek has nugget
+ engine_flag wDailyPhoneItemFlags, 7 ; tully has water stone
+
+ engine_flag wDailyPhoneItemFlags + 1, 0 ; tiffany has pink bow
+ engine_flag wDailyPhoneItemFlags + 1, 1 ; wilton has item (see EVENT_WILTON_HAS_*** in constants/event_flags.asm)
+
+ engine_flag wDailyPhoneTimeOfDayFlags, 0
+ engine_flag wDailyPhoneTimeOfDayFlags, 1 ; $88
+ engine_flag wDailyPhoneTimeOfDayFlags, 2
+ engine_flag wDailyPhoneTimeOfDayFlags, 3
+ engine_flag wDailyPhoneTimeOfDayFlags, 4
+ engine_flag wDailyPhoneTimeOfDayFlags, 5
+ engine_flag wDailyPhoneTimeOfDayFlags, 6
+ engine_flag wDailyPhoneTimeOfDayFlags, 7
+
+ engine_flag wDailyPhoneTimeOfDayFlags + 1, 0
+ engine_flag wDailyPhoneTimeOfDayFlags + 1, 1 ; $90
+ engine_flag wDailyPhoneTimeOfDayFlags + 1, 2
+ engine_flag wDailyPhoneTimeOfDayFlags + 1, 3
+ engine_flag wDailyPhoneTimeOfDayFlags + 1, 4
+ engine_flag wDailyPhoneTimeOfDayFlags + 1, 5
+ engine_flag wDailyPhoneTimeOfDayFlags + 1, 6
+ engine_flag wDailyPhoneTimeOfDayFlags + 1, 7
+
+ engine_flag wDailyPhoneTimeOfDayFlags + 2, 0
+ engine_flag wDailyPhoneTimeOfDayFlags + 2, 1 ; $98
+ engine_flag wDailyPhoneTimeOfDayFlags + 2, 2
+ engine_flag wDailyPhoneTimeOfDayFlags + 2, 3
+ engine_flag wDailyPhoneTimeOfDayFlags + 2, 4
+ engine_flag wDailyPhoneTimeOfDayFlags + 2, 5
+ engine_flag wDailyPhoneTimeOfDayFlags + 2, 6
+ engine_flag wDailyPhoneTimeOfDayFlags + 2, 7
+
+ engine_flag wPlayerSpriteSetupFlags, 2 ; female player has been transformed into male
+
+ engine_flag SwarmFlags, 2 ; dunsparce swarm ; $a0
+ engine_flag SwarmFlags, 3 ; yanma swarm
+
+; 80648
diff --git a/data/evos_attacks.asm b/data/evos_attacks.asm
deleted file mode 100644
index 749731812..000000000
--- a/data/evos_attacks.asm
+++ /dev/null
@@ -1,3398 +0,0 @@
-INCLUDE "includes.asm"
-
-
-SECTION "Evolutions and Attacks", ROMX
-
-
-INCLUDE "data/evos_attacks_pointers.asm"
-
-
-EvosAttacks::
-
-BulbasaurEvosAttacks:
- db EVOLVE_LEVEL, 16, IVYSAUR
- db 0 ; no more evolutions
- db 1, TACKLE
- db 4, GROWL
- db 7, LEECH_SEED
- db 10, VINE_WHIP
- db 15, POISONPOWDER
- db 15, SLEEP_POWDER
- db 20, RAZOR_LEAF
- db 25, SWEET_SCENT
- db 32, GROWTH
- db 39, SYNTHESIS
- db 46, SOLARBEAM
- db 0 ; no more level-up moves
-
-IvysaurEvosAttacks:
- db EVOLVE_LEVEL, 32, VENUSAUR
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, GROWL
- db 1, LEECH_SEED
- db 4, GROWL
- db 7, LEECH_SEED
- db 10, VINE_WHIP
- db 15, POISONPOWDER
- db 15, SLEEP_POWDER
- db 22, RAZOR_LEAF
- db 29, SWEET_SCENT
- db 38, GROWTH
- db 47, SYNTHESIS
- db 56, SOLARBEAM
- db 0 ; no more level-up moves
-
-VenusaurEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, GROWL
- db 1, LEECH_SEED
- db 1, VINE_WHIP
- db 4, GROWL
- db 7, LEECH_SEED
- db 10, VINE_WHIP
- db 15, POISONPOWDER
- db 15, SLEEP_POWDER
- db 22, RAZOR_LEAF
- db 29, SWEET_SCENT
- db 41, GROWTH
- db 53, SYNTHESIS
- db 65, SOLARBEAM
- db 0 ; no more level-up moves
-
-CharmanderEvosAttacks:
- db EVOLVE_LEVEL, 16, CHARMELEON
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, GROWL
- db 7, EMBER
- db 13, SMOKESCREEN
- db 19, RAGE
- db 25, SCARY_FACE
- db 31, FLAMETHROWER
- db 37, SLASH
- db 43, DRAGON_RAGE
- db 49, FIRE_SPIN
- db 0 ; no more level-up moves
-
-CharmeleonEvosAttacks:
- db EVOLVE_LEVEL, 36, CHARIZARD
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, GROWL
- db 1, EMBER
- db 7, EMBER
- db 13, SMOKESCREEN
- db 20, RAGE
- db 27, SCARY_FACE
- db 34, FLAMETHROWER
- db 41, SLASH
- db 48, DRAGON_RAGE
- db 55, FIRE_SPIN
- db 0 ; no more level-up moves
-
-CharizardEvosAttacks:
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, GROWL
- db 1, EMBER
- db 1, SMOKESCREEN
- db 7, EMBER
- db 13, SMOKESCREEN
- db 20, RAGE
- db 27, SCARY_FACE
- db 34, FLAMETHROWER
- db 36, WING_ATTACK
- db 44, SLASH
- db 54, DRAGON_RAGE
- db 64, FIRE_SPIN
- db 0 ; no more level-up moves
-
-SquirtleEvosAttacks:
- db EVOLVE_LEVEL, 16, WARTORTLE
- db 0 ; no more evolutions
- db 1, TACKLE
- db 4, TAIL_WHIP
- db 7, BUBBLE
- db 10, WITHDRAW
- db 13, WATER_GUN
- db 18, BITE
- db 23, RAPID_SPIN
- db 28, PROTECT
- db 33, RAIN_DANCE
- db 40, SKULL_BASH
- db 47, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-WartortleEvosAttacks:
- db EVOLVE_LEVEL, 36, BLASTOISE
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, TAIL_WHIP
- db 1, BUBBLE
- db 4, TAIL_WHIP
- db 7, BUBBLE
- db 10, WITHDRAW
- db 13, WATER_GUN
- db 19, BITE
- db 25, RAPID_SPIN
- db 31, PROTECT
- db 37, RAIN_DANCE
- db 45, SKULL_BASH
- db 53, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-BlastoiseEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, TAIL_WHIP
- db 1, BUBBLE
- db 1, WITHDRAW
- db 4, TAIL_WHIP
- db 7, BUBBLE
- db 10, WITHDRAW
- db 13, WATER_GUN
- db 19, BITE
- db 25, RAPID_SPIN
- db 31, PROTECT
- db 42, RAIN_DANCE
- db 55, SKULL_BASH
- db 68, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-CaterpieEvosAttacks:
- db EVOLVE_LEVEL, 7, METAPOD
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, STRING_SHOT
- db 0 ; no more level-up moves
-
-MetapodEvosAttacks:
- db EVOLVE_LEVEL, 10, BUTTERFREE
- db 0 ; no more evolutions
- db 1, HARDEN
- db 7, HARDEN
- db 0 ; no more level-up moves
-
-ButterfreeEvosAttacks:
- db 0 ; no more evolutions
- db 1, CONFUSION
- db 10, CONFUSION
- db 13, POISONPOWDER
- db 14, STUN_SPORE
- db 15, SLEEP_POWDER
- db 18, SUPERSONIC
- db 23, WHIRLWIND
- db 28, GUST
- db 34, PSYBEAM
- db 40, SAFEGUARD
- db 0 ; no more level-up moves
-
-WeedleEvosAttacks:
- db EVOLVE_LEVEL, 7, KAKUNA
- db 0 ; no more evolutions
- db 1, POISON_STING
- db 1, STRING_SHOT
- db 0 ; no more level-up moves
-
-KakunaEvosAttacks:
- db EVOLVE_LEVEL, 10, BEEDRILL
- db 0 ; no more evolutions
- db 1, HARDEN
- db 7, HARDEN
- db 0 ; no more level-up moves
-
-BeedrillEvosAttacks:
- db 0 ; no more evolutions
- db 1, FURY_ATTACK
- db 10, FURY_ATTACK
- db 15, FOCUS_ENERGY
- db 20, TWINEEDLE
- db 25, RAGE
- db 30, PURSUIT
- db 35, PIN_MISSILE
- db 40, AGILITY
- db 0 ; no more level-up moves
-
-PidgeyEvosAttacks:
- db EVOLVE_LEVEL, 18, PIDGEOTTO
- db 0 ; no more evolutions
- db 1, TACKLE
- db 5, SAND_ATTACK
- db 9, GUST
- db 15, QUICK_ATTACK
- db 21, WHIRLWIND
- db 29, WING_ATTACK
- db 37, AGILITY
- db 47, MIRROR_MOVE
- db 0 ; no more level-up moves
-
-PidgeottoEvosAttacks:
- db EVOLVE_LEVEL, 36, PIDGEOT
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, SAND_ATTACK
- db 1, GUST
- db 5, SAND_ATTACK
- db 9, GUST
- db 15, QUICK_ATTACK
- db 23, WHIRLWIND
- db 33, WING_ATTACK
- db 43, AGILITY
- db 55, MIRROR_MOVE
- db 0 ; no more level-up moves
-
-PidgeotEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, SAND_ATTACK
- db 1, GUST
- db 1, QUICK_ATTACK
- db 5, SAND_ATTACK
- db 9, GUST
- db 15, QUICK_ATTACK
- db 23, WHIRLWIND
- db 33, WING_ATTACK
- db 46, AGILITY
- db 61, MIRROR_MOVE
- db 0 ; no more level-up moves
-
-RattataEvosAttacks:
- db EVOLVE_LEVEL, 20, RATICATE
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, TAIL_WHIP
- db 7, QUICK_ATTACK
- db 13, HYPER_FANG
- db 20, FOCUS_ENERGY
- db 27, PURSUIT
- db 34, SUPER_FANG
- db 0 ; no more level-up moves
-
-RaticateEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, TAIL_WHIP
- db 1, QUICK_ATTACK
- db 7, QUICK_ATTACK
- db 13, HYPER_FANG
- db 20, SCARY_FACE
- db 30, PURSUIT
- db 40, SUPER_FANG
- db 0 ; no more level-up moves
-
-SpearowEvosAttacks:
- db EVOLVE_LEVEL, 20, FEAROW
- db 0 ; no more evolutions
- db 1, PECK
- db 1, GROWL
- db 7, LEER
- db 13, FURY_ATTACK
- db 25, PURSUIT
- db 31, MIRROR_MOVE
- db 37, DRILL_PECK
- db 43, AGILITY
- db 0 ; no more level-up moves
-
-FearowEvosAttacks:
- db 0 ; no more evolutions
- db 1, PECK
- db 1, GROWL
- db 1, LEER
- db 1, FURY_ATTACK
- db 7, LEER
- db 13, FURY_ATTACK
- db 26, PURSUIT
- db 32, MIRROR_MOVE
- db 40, DRILL_PECK
- db 47, AGILITY
- db 0 ; no more level-up moves
-
-EkansEvosAttacks:
- db EVOLVE_LEVEL, 22, ARBOK
- db 0 ; no more evolutions
- db 1, WRAP
- db 1, LEER
- db 9, POISON_STING
- db 15, BITE
- db 23, GLARE
- db 29, SCREECH
- db 37, ACID
- db 43, HAZE
- db 0 ; no more level-up moves
-
-ArbokEvosAttacks:
- db 0 ; no more evolutions
- db 1, WRAP
- db 1, LEER
- db 1, POISON_STING
- db 1, BITE
- db 9, POISON_STING
- db 15, BITE
- db 25, GLARE
- db 33, SCREECH
- db 43, ACID
- db 51, HAZE
- db 0 ; no more level-up moves
-
-PikachuEvosAttacks:
- db EVOLVE_ITEM, THUNDERSTONE, RAICHU
- db 0 ; no more evolutions
- db 1, THUNDERSHOCK
- db 1, GROWL
- db 6, TAIL_WHIP
- db 8, THUNDER_WAVE
- db 11, QUICK_ATTACK
- db 15, DOUBLE_TEAM
- db 20, SLAM
- db 26, THUNDERBOLT
- db 33, AGILITY
- db 41, THUNDER
- db 50, LIGHT_SCREEN
- db 0 ; no more level-up moves
-
-RaichuEvosAttacks:
- db 0 ; no more evolutions
- db 1, THUNDERSHOCK
- db 1, TAIL_WHIP
- db 1, QUICK_ATTACK
- db 1, THUNDERBOLT
- db 0 ; no more level-up moves
-
-SandshrewEvosAttacks:
- db EVOLVE_LEVEL, 22, SANDSLASH
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 6, DEFENSE_CURL
- db 11, SAND_ATTACK
- db 17, POISON_STING
- db 23, SLASH
- db 30, SWIFT
- db 37, FURY_SWIPES
- db 45, SANDSTORM
- db 0 ; no more level-up moves
-
-SandslashEvosAttacks:
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, DEFENSE_CURL
- db 1, SAND_ATTACK
- db 6, DEFENSE_CURL
- db 11, SAND_ATTACK
- db 17, POISON_STING
- db 24, SLASH
- db 33, SWIFT
- db 42, FURY_SWIPES
- db 52, SANDSTORM
- db 0 ; no more level-up moves
-
-NidoranFEvosAttacks:
- db EVOLVE_LEVEL, 16, NIDORINA
- db 0 ; no more evolutions
- db 1, GROWL
- db 1, TACKLE
- db 8, SCRATCH
- db 12, DOUBLE_KICK
- db 17, POISON_STING
- db 23, TAIL_WHIP
- db 30, BITE
- db 38, FURY_SWIPES
- db 0 ; no more level-up moves
-
-NidorinaEvosAttacks:
- db EVOLVE_ITEM, MOON_STONE, NIDOQUEEN
- db 0 ; no more evolutions
- db 1, GROWL
- db 1, TACKLE
- db 8, SCRATCH
- db 12, DOUBLE_KICK
- db 19, POISON_STING
- db 27, TAIL_WHIP
- db 36, BITE
- db 46, FURY_SWIPES
- db 0 ; no more level-up moves
-
-NidoqueenEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, SCRATCH
- db 1, DOUBLE_KICK
- db 1, TAIL_WHIP
- db 23, BODY_SLAM
- db 0 ; no more level-up moves
-
-NidoranMEvosAttacks:
- db EVOLVE_LEVEL, 16, NIDORINO
- db 0 ; no more evolutions
- db 1, LEER
- db 1, TACKLE
- db 8, HORN_ATTACK
- db 12, DOUBLE_KICK
- db 17, POISON_STING
- db 23, FOCUS_ENERGY
- db 30, FURY_ATTACK
- db 38, HORN_DRILL
- db 0 ; no more level-up moves
-
-NidorinoEvosAttacks:
- db EVOLVE_ITEM, MOON_STONE, NIDOKING
- db 0 ; no more evolutions
- db 1, LEER
- db 1, TACKLE
- db 8, HORN_ATTACK
- db 12, DOUBLE_KICK
- db 19, POISON_STING
- db 27, FOCUS_ENERGY
- db 36, FURY_ATTACK
- db 46, HORN_DRILL
- db 0 ; no more level-up moves
-
-NidokingEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, HORN_ATTACK
- db 1, DOUBLE_KICK
- db 1, POISON_STING
- db 23, THRASH
- db 0 ; no more level-up moves
-
-ClefairyEvosAttacks:
- db EVOLVE_ITEM, MOON_STONE, CLEFABLE
- db 0 ; no more evolutions
- db 1, POUND
- db 1, GROWL
- db 4, ENCORE
- db 8, SING
- db 13, DOUBLESLAP
- db 19, MINIMIZE
- db 26, DEFENSE_CURL
- db 34, METRONOME
- db 43, MOONLIGHT
- db 53, LIGHT_SCREEN
- db 0 ; no more level-up moves
-
-ClefableEvosAttacks:
- db 0 ; no more evolutions
- db 1, SING
- db 1, DOUBLESLAP
- db 1, METRONOME
- db 1, MOONLIGHT
- db 0 ; no more level-up moves
-
-VulpixEvosAttacks:
- db EVOLVE_ITEM, FIRE_STONE, NINETALES
- db 0 ; no more evolutions
- db 1, EMBER
- db 1, TAIL_WHIP
- db 7, QUICK_ATTACK
- db 13, ROAR
- db 19, CONFUSE_RAY
- db 25, SAFEGUARD
- db 31, FLAMETHROWER
- db 37, FIRE_SPIN
- db 0 ; no more level-up moves
-
-NinetalesEvosAttacks:
- db 0 ; no more evolutions
- db 1, EMBER
- db 1, QUICK_ATTACK
- db 1, CONFUSE_RAY
- db 1, SAFEGUARD
- db 43, FIRE_SPIN
- db 0 ; no more level-up moves
-
-JigglypuffEvosAttacks:
- db EVOLVE_ITEM, MOON_STONE, WIGGLYTUFF
- db 0 ; no more evolutions
- db 1, SING
- db 4, DEFENSE_CURL
- db 9, POUND
- db 14, DISABLE
- db 19, ROLLOUT
- db 24, DOUBLESLAP
- db 29, REST
- db 34, BODY_SLAM
- db 39, DOUBLE_EDGE
- db 0 ; no more level-up moves
-
-WigglytuffEvosAttacks:
- db 0 ; no more evolutions
- db 1, SING
- db 1, DISABLE
- db 1, DEFENSE_CURL
- db 1, DOUBLESLAP
- db 0 ; no more level-up moves
-
-ZubatEvosAttacks:
- db EVOLVE_LEVEL, 22, GOLBAT
- db 0 ; no more evolutions
- db 1, LEECH_LIFE
- db 6, SUPERSONIC
- db 12, BITE
- db 19, CONFUSE_RAY
- db 27, WING_ATTACK
- db 36, MEAN_LOOK
- db 46, HAZE
- db 0 ; no more level-up moves
-
-GolbatEvosAttacks:
- db EVOLVE_HAPPINESS, TR_ANYTIME, CROBAT
- db 0 ; no more evolutions
- db 1, SCREECH
- db 1, LEECH_LIFE
- db 1, SUPERSONIC
- db 6, SUPERSONIC
- db 12, BITE
- db 19, CONFUSE_RAY
- db 30, WING_ATTACK
- db 42, MEAN_LOOK
- db 55, HAZE
- db 0 ; no more level-up moves
-
-OddishEvosAttacks:
- db EVOLVE_LEVEL, 21, GLOOM
- db 0 ; no more evolutions
- db 1, ABSORB
- db 7, SWEET_SCENT
- db 14, POISONPOWDER
- db 16, STUN_SPORE
- db 18, SLEEP_POWDER
- db 23, ACID
- db 32, MOONLIGHT
- db 39, PETAL_DANCE
- db 0 ; no more level-up moves
-
-GloomEvosAttacks:
- db EVOLVE_ITEM, LEAF_STONE, VILEPLUME
- db EVOLVE_ITEM, SUN_STONE, BELLOSSOM
- db 0 ; no more evolutions
- db 1, ABSORB
- db 1, SWEET_SCENT
- db 1, POISONPOWDER
- db 7, SWEET_SCENT
- db 14, POISONPOWDER
- db 16, STUN_SPORE
- db 18, SLEEP_POWDER
- db 24, ACID
- db 35, MOONLIGHT
- db 44, PETAL_DANCE
- db 0 ; no more level-up moves
-
-VileplumeEvosAttacks:
- db 0 ; no more evolutions
- db 1, ABSORB
- db 1, SWEET_SCENT
- db 1, STUN_SPORE
- db 1, PETAL_DANCE
- db 0 ; no more level-up moves
-
-ParasEvosAttacks:
- db EVOLVE_LEVEL, 24, PARASECT
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 7, STUN_SPORE
- db 13, POISONPOWDER
- db 19, LEECH_LIFE
- db 25, SPORE
- db 31, SLASH
- db 37, GROWTH
- db 43, GIGA_DRAIN
- db 0 ; no more level-up moves
-
-ParasectEvosAttacks:
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, STUN_SPORE
- db 1, POISONPOWDER
- db 7, STUN_SPORE
- db 13, POISONPOWDER
- db 19, LEECH_LIFE
- db 28, SPORE
- db 37, SLASH
- db 46, GROWTH
- db 55, GIGA_DRAIN
- db 0 ; no more level-up moves
-
-VenonatEvosAttacks:
- db EVOLVE_LEVEL, 31, VENOMOTH
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, DISABLE
- db 1, FORESIGHT
- db 9, SUPERSONIC
- db 17, CONFUSION
- db 20, POISONPOWDER
- db 25, LEECH_LIFE
- db 28, STUN_SPORE
- db 33, PSYBEAM
- db 36, SLEEP_POWDER
- db 41, PSYCHIC_M
- db 0 ; no more level-up moves
-
-VenomothEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, DISABLE
- db 1, FORESIGHT
- db 1, SUPERSONIC
- db 9, SUPERSONIC
- db 17, CONFUSION
- db 20, POISONPOWDER
- db 25, LEECH_LIFE
- db 28, STUN_SPORE
- db 31, GUST
- db 36, PSYBEAM
- db 42, SLEEP_POWDER
- db 52, PSYCHIC_M
- db 0 ; no more level-up moves
-
-DiglettEvosAttacks:
- db EVOLVE_LEVEL, 26, DUGTRIO
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 5, GROWL
- db 9, MAGNITUDE
- db 17, DIG
- db 25, SAND_ATTACK
- db 33, SLASH
- db 41, EARTHQUAKE
- db 49, FISSURE
- db 0 ; no more level-up moves
-
-DugtrioEvosAttacks:
- db 0 ; no more evolutions
-if _CRYSTAL
- db 1, TRI_ATTACK
-endc
- db 1, SCRATCH
- db 1, GROWL
- db 1, MAGNITUDE
- db 5, GROWL
- db 9, MAGNITUDE
- db 17, DIG
- db 25, SAND_ATTACK
- db 37, SLASH
- db 49, EARTHQUAKE
- db 61, FISSURE
- db 0 ; no more level-up moves
-
-MeowthEvosAttacks:
- db EVOLVE_LEVEL, 28, PERSIAN
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, GROWL
- db 11, BITE
- db 20, PAY_DAY
- db 28, FAINT_ATTACK
- db 35, SCREECH
- db 41, FURY_SWIPES
- db 46, SLASH
- db 0 ; no more level-up moves
-
-PersianEvosAttacks:
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, GROWL
- db 1, BITE
- db 11, BITE
- db 20, PAY_DAY
- db 29, FAINT_ATTACK
- db 38, SCREECH
- db 46, FURY_SWIPES
- db 53, SLASH
- db 0 ; no more level-up moves
-
-PsyduckEvosAttacks:
- db EVOLVE_LEVEL, 33, GOLDUCK
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 5, TAIL_WHIP
- db 10, DISABLE
- db 16, CONFUSION
- db 23, SCREECH
- db 31, PSYCH_UP
- db 40, FURY_SWIPES
- db 50, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-GolduckEvosAttacks:
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, TAIL_WHIP
- db 1, DISABLE
- db 1, CONFUSION
- db 5, TAIL_WHIP
- db 10, DISABLE
- db 16, CONFUSION
- db 23, SCREECH
- db 31, PSYCH_UP
- db 44, FURY_SWIPES
- db 58, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-MankeyEvosAttacks:
- db EVOLVE_LEVEL, 28, PRIMEAPE
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, LEER
- db 9, LOW_KICK
- db 15, KARATE_CHOP
- db 21, FURY_SWIPES
- db 27, FOCUS_ENERGY
- db 33, SEISMIC_TOSS
- db 39, CROSS_CHOP
- db 45, SCREECH
- db 51, THRASH
- db 0 ; no more level-up moves
-
-PrimeapeEvosAttacks:
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, LEER
- db 1, LOW_KICK
- db 1, RAGE
- db 9, LOW_KICK
- db 15, KARATE_CHOP
- db 21, FURY_SWIPES
- db 27, FOCUS_ENERGY
- db 28, RAGE
- db 36, SEISMIC_TOSS
- db 45, CROSS_CHOP
- db 54, SCREECH
- db 63, THRASH
- db 0 ; no more level-up moves
-
-GrowlitheEvosAttacks:
- db EVOLVE_ITEM, FIRE_STONE, ARCANINE
- db 0 ; no more evolutions
- db 1, BITE
- db 1, ROAR
- db 9, EMBER
- db 18, LEER
- db 26, TAKE_DOWN
- db 34, FLAME_WHEEL
- db 42, AGILITY
- db 50, FLAMETHROWER
- db 0 ; no more level-up moves
-
-ArcanineEvosAttacks:
- db 0 ; no more evolutions
- db 1, ROAR
- db 1, LEER
- db 1, TAKE_DOWN
- db 1, FLAME_WHEEL
- db 50, EXTREMESPEED
- db 0 ; no more level-up moves
-
-PoliwagEvosAttacks:
- db EVOLVE_LEVEL, 25, POLIWHIRL
- db 0 ; no more evolutions
- db 1, BUBBLE
- db 7, HYPNOSIS
- db 13, WATER_GUN
- db 19, DOUBLESLAP
- db 25, RAIN_DANCE
- db 31, BODY_SLAM
- db 37, BELLY_DRUM
- db 43, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-PoliwhirlEvosAttacks:
- db EVOLVE_ITEM, WATER_STONE, POLIWRATH
- db EVOLVE_TRADE, KINGS_ROCK, POLITOED
- db 0 ; no more evolutions
- db 1, BUBBLE
- db 1, HYPNOSIS
- db 1, WATER_GUN
- db 7, HYPNOSIS
- db 13, WATER_GUN
- db 19, DOUBLESLAP
- db 27, RAIN_DANCE
- db 35, BODY_SLAM
- db 43, BELLY_DRUM
- db 51, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-PoliwrathEvosAttacks:
- db 0 ; no more evolutions
- db 1, WATER_GUN
- db 1, HYPNOSIS
- db 1, DOUBLESLAP
- db 1, SUBMISSION
- db 35, SUBMISSION
- db 51, MIND_READER
- db 0 ; no more level-up moves
-
-AbraEvosAttacks:
- db EVOLVE_LEVEL, 16, KADABRA
- db 0 ; no more evolutions
- db 1, TELEPORT
- db 0 ; no more level-up moves
-
-KadabraEvosAttacks:
- db EVOLVE_TRADE, $ff, ALAKAZAM
- db 0 ; no more evolutions
- db 1, TELEPORT
- db 1, KINESIS
- db 1, CONFUSION
- db 16, CONFUSION
- db 18, DISABLE
- db 21, PSYBEAM
- db 26, RECOVER
- db 31, FUTURE_SIGHT
- db 38, PSYCHIC_M
- db 45, REFLECT
- db 0 ; no more level-up moves
-
-AlakazamEvosAttacks:
- db 0 ; no more evolutions
- db 1, TELEPORT
- db 1, KINESIS
- db 1, CONFUSION
- db 16, CONFUSION
- db 18, DISABLE
- db 21, PSYBEAM
- db 26, RECOVER
- db 31, FUTURE_SIGHT
- db 38, PSYCHIC_M
- db 45, REFLECT
- db 0 ; no more level-up moves
-
-MachopEvosAttacks:
- db EVOLVE_LEVEL, 28, MACHOKE
- db 0 ; no more evolutions
- db 1, LOW_KICK
- db 1, LEER
- db 7, FOCUS_ENERGY
- db 13, KARATE_CHOP
- db 19, SEISMIC_TOSS
- db 25, FORESIGHT
- db 31, VITAL_THROW
- db 37, CROSS_CHOP
- db 43, SCARY_FACE
- db 49, SUBMISSION
- db 0 ; no more level-up moves
-
-MachokeEvosAttacks:
- db EVOLVE_TRADE, $ff, MACHAMP
- db 0 ; no more evolutions
- db 1, LOW_KICK
- db 1, LEER
- db 1, FOCUS_ENERGY
- db 8, FOCUS_ENERGY
- db 15, KARATE_CHOP
- db 19, SEISMIC_TOSS
- db 25, FORESIGHT
- db 34, VITAL_THROW
- db 43, CROSS_CHOP
- db 52, SCARY_FACE
- db 61, SUBMISSION
- db 0 ; no more level-up moves
-
-MachampEvosAttacks:
- db 0 ; no more evolutions
- db 1, LOW_KICK
- db 1, LEER
- db 1, FOCUS_ENERGY
- db 8, FOCUS_ENERGY
- db 15, KARATE_CHOP
- db 19, SEISMIC_TOSS
- db 25, FORESIGHT
- db 34, VITAL_THROW
- db 43, CROSS_CHOP
- db 52, SCARY_FACE
- db 61, SUBMISSION
- db 0 ; no more level-up moves
-
-BellsproutEvosAttacks:
- db EVOLVE_LEVEL, 21, WEEPINBELL
- db 0 ; no more evolutions
- db 1, VINE_WHIP
- db 6, GROWTH
- db 11, WRAP
- db 15, SLEEP_POWDER
- db 17, POISONPOWDER
- db 19, STUN_SPORE
- db 23, ACID
- db 30, SWEET_SCENT
- db 37, RAZOR_LEAF
- db 45, SLAM
- db 0 ; no more level-up moves
-
-WeepinbellEvosAttacks:
- db EVOLVE_ITEM, LEAF_STONE, VICTREEBEL
- db 0 ; no more evolutions
- db 1, VINE_WHIP
- db 1, GROWTH
- db 1, WRAP
- db 6, GROWTH
- db 11, WRAP
- db 15, SLEEP_POWDER
- db 17, POISONPOWDER
- db 19, STUN_SPORE
- db 24, ACID
- db 33, SWEET_SCENT
- db 42, RAZOR_LEAF
- db 54, SLAM
- db 0 ; no more level-up moves
-
-VictreebelEvosAttacks:
- db 0 ; no more evolutions
- db 1, VINE_WHIP
- db 1, SLEEP_POWDER
- db 1, SWEET_SCENT
- db 1, RAZOR_LEAF
- db 0 ; no more level-up moves
-
-TentacoolEvosAttacks:
- db EVOLVE_LEVEL, 30, TENTACRUEL
- db 0 ; no more evolutions
- db 1, POISON_STING
- db 6, SUPERSONIC
- db 12, CONSTRICT
- db 19, ACID
- db 25, BUBBLEBEAM
- db 30, WRAP
- db 36, BARRIER
- db 43, SCREECH
- db 49, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-TentacruelEvosAttacks:
- db 0 ; no more evolutions
- db 1, POISON_STING
- db 1, SUPERSONIC
- db 1, CONSTRICT
- db 6, SUPERSONIC
- db 12, CONSTRICT
- db 19, ACID
- db 25, BUBBLEBEAM
- db 30, WRAP
- db 38, BARRIER
- db 47, SCREECH
- db 55, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-GeodudeEvosAttacks:
- db EVOLVE_LEVEL, 25, GRAVELER
- db 0 ; no more evolutions
- db 1, TACKLE
- db 6, DEFENSE_CURL
- db 11, ROCK_THROW
- db 16, MAGNITUDE
- db 21, SELFDESTRUCT
- db 26, HARDEN
- db 31, ROLLOUT
- db 36, EARTHQUAKE
- db 41, EXPLOSION
- db 0 ; no more level-up moves
-
-GravelerEvosAttacks:
- db EVOLVE_TRADE, $ff, GOLEM
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, DEFENSE_CURL
- db 1, ROCK_THROW
- db 6, DEFENSE_CURL
- db 11, ROCK_THROW
- db 16, MAGNITUDE
- db 21, SELFDESTRUCT
- db 27, HARDEN
- db 34, ROLLOUT
- db 41, EARTHQUAKE
- db 48, EXPLOSION
- db 0 ; no more level-up moves
-
-GolemEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, DEFENSE_CURL
- db 1, ROCK_THROW
- db 1, MAGNITUDE
- db 6, DEFENSE_CURL
- db 11, ROCK_THROW
- db 16, MAGNITUDE
- db 21, SELFDESTRUCT
- db 27, HARDEN
- db 34, ROLLOUT
- db 41, EARTHQUAKE
- db 48, EXPLOSION
- db 0 ; no more level-up moves
-
-PonytaEvosAttacks:
- db EVOLVE_LEVEL, 40, RAPIDASH
- db 0 ; no more evolutions
- db 1, TACKLE
- db 4, GROWL
- db 8, TAIL_WHIP
- db 13, EMBER
- db 19, STOMP
- db 26, FIRE_SPIN
- db 34, TAKE_DOWN
- db 43, AGILITY
- db 53, FIRE_BLAST
- db 0 ; no more level-up moves
-
-RapidashEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, GROWL
- db 1, TAIL_WHIP
- db 1, EMBER
- db 4, GROWL
- db 8, TAIL_WHIP
- db 13, EMBER
- db 19, STOMP
- db 26, FIRE_SPIN
- db 34, TAKE_DOWN
- db 40, FURY_ATTACK
- db 47, AGILITY
- db 61, FIRE_BLAST
- db 0 ; no more level-up moves
-
-SlowpokeEvosAttacks:
- db EVOLVE_LEVEL, 37, SLOWBRO
- db EVOLVE_TRADE, KINGS_ROCK, SLOWKING
- db 0 ; no more evolutions
- db 1, CURSE
- db 1, TACKLE
- db 6, GROWL
- db 15, WATER_GUN
- db 20, CONFUSION
- db 29, DISABLE
- db 34, HEADBUTT
- db 43, AMNESIA
- db 48, PSYCHIC_M
- db 0 ; no more level-up moves
-
-SlowbroEvosAttacks:
- db 0 ; no more evolutions
- db 1, CURSE
- db 1, TACKLE
- db 1, GROWL
- db 1, WATER_GUN
- db 6, GROWL
- db 15, WATER_GUN
- db 20, CONFUSION
- db 29, DISABLE
- db 34, HEADBUTT
- db 37, WITHDRAW
- db 46, AMNESIA
- db 54, PSYCHIC_M
- db 0 ; no more level-up moves
-
-MagnemiteEvosAttacks:
- db EVOLVE_LEVEL, 30, MAGNETON
- db 0 ; no more evolutions
- db 1, TACKLE
- db 6, THUNDERSHOCK
- db 11, SUPERSONIC
- db 16, SONICBOOM
- db 21, THUNDER_WAVE
- db 27, LOCK_ON
- db 33, SWIFT
- db 39, SCREECH
- db 45, ZAP_CANNON
- db 0 ; no more level-up moves
-
-MagnetonEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, THUNDERSHOCK
- db 1, SUPERSONIC
- db 1, SONICBOOM
- db 6, THUNDERSHOCK
- db 11, SUPERSONIC
- db 16, SONICBOOM
- db 21, THUNDER_WAVE
- db 27, LOCK_ON
-if _CRYSTAL
- db 35, TRI_ATTACK
-else
- db 35, SWIFT
-endc
- db 43, SCREECH
- db 53, ZAP_CANNON
- db 0 ; no more level-up moves
-
-FarfetchDEvosAttacks:
- db 0 ; no more evolutions
- db 1, PECK
- db 7, SAND_ATTACK
- db 13, LEER
- db 19, FURY_ATTACK
- db 25, SWORDS_DANCE
- db 31, AGILITY
- db 37, SLASH
- db 44, FALSE_SWIPE
- db 0 ; no more level-up moves
-
-DoduoEvosAttacks:
- db EVOLVE_LEVEL, 31, DODRIO
- db 0 ; no more evolutions
- db 1, PECK
- db 1, GROWL
- db 9, PURSUIT
- db 13, FURY_ATTACK
- db 21, TRI_ATTACK
- db 25, RAGE
- db 33, DRILL_PECK
- db 37, AGILITY
- db 0 ; no more level-up moves
-
-DodrioEvosAttacks:
- db 0 ; no more evolutions
- db 1, PECK
- db 1, GROWL
- db 1, PURSUIT
- db 1, FURY_ATTACK
- db 9, PURSUIT
- db 13, FURY_ATTACK
- db 21, TRI_ATTACK
- db 25, RAGE
- db 38, DRILL_PECK
- db 47, AGILITY
- db 0 ; no more level-up moves
-
-SeelEvosAttacks:
- db EVOLVE_LEVEL, 34, DEWGONG
- db 0 ; no more evolutions
- db 1, HEADBUTT
- db 5, GROWL
- db 16, AURORA_BEAM
- db 21, REST
- db 32, TAKE_DOWN
- db 37, ICE_BEAM
- db 48, SAFEGUARD
- db 0 ; no more level-up moves
-
-DewgongEvosAttacks:
- db 0 ; no more evolutions
- db 1, HEADBUTT
- db 1, GROWL
- db 1, AURORA_BEAM
- db 5, GROWL
- db 16, AURORA_BEAM
- db 21, REST
- db 32, TAKE_DOWN
- db 43, ICE_BEAM
- db 60, SAFEGUARD
- db 0 ; no more level-up moves
-
-GrimerEvosAttacks:
- db EVOLVE_LEVEL, 38, MUK
- db 0 ; no more evolutions
- db 1, POISON_GAS
- db 1, POUND
- db 5, HARDEN
- db 10, DISABLE
- db 16, SLUDGE
- db 23, MINIMIZE
- db 31, SCREECH
- db 40, ACID_ARMOR
- db 50, SLUDGE_BOMB
- db 0 ; no more level-up moves
-
-MukEvosAttacks:
- db 0 ; no more evolutions
- db 1, POISON_GAS
- db 1, POUND
- db 1, HARDEN
- db 33, HARDEN
- db 37, DISABLE
- db 45, SLUDGE
- db 23, MINIMIZE
- db 31, SCREECH
- db 45, ACID_ARMOR
- db 60, SLUDGE_BOMB
- db 0 ; no more level-up moves
-
-ShellderEvosAttacks:
- db EVOLVE_ITEM, WATER_STONE, CLOYSTER
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, WITHDRAW
- db 9, SUPERSONIC
- db 17, AURORA_BEAM
- db 25, PROTECT
- db 33, LEER
- db 41, CLAMP
- db 49, ICE_BEAM
- db 0 ; no more level-up moves
-
-CloysterEvosAttacks:
- db 0 ; no more evolutions
- db 1, WITHDRAW
- db 1, SUPERSONIC
- db 1, AURORA_BEAM
- db 1, PROTECT
-if _CRYSTAL
- db 33, SPIKES
-endc
- db 41, SPIKE_CANNON
- db 0 ; no more level-up moves
-
-GastlyEvosAttacks:
- db EVOLVE_LEVEL, 25, HAUNTER
- db 0 ; no more evolutions
- db 1, HYPNOSIS
- db 1, LICK
- db 8, SPITE
- db 13, MEAN_LOOK
- db 16, CURSE
- db 21, NIGHT_SHADE
- db 28, CONFUSE_RAY
- db 33, DREAM_EATER
- db 36, DESTINY_BOND
- db 0 ; no more level-up moves
-
-HaunterEvosAttacks:
- db EVOLVE_TRADE, $ff, GENGAR
- db 0 ; no more evolutions
- db 1, HYPNOSIS
- db 1, LICK
- db 1, SPITE
- db 8, SPITE
- db 13, MEAN_LOOK
- db 16, CURSE
- db 21, NIGHT_SHADE
- db 31, CONFUSE_RAY
- db 39, DREAM_EATER
- db 48, DESTINY_BOND
- db 0 ; no more level-up moves
-
-GengarEvosAttacks:
- db 0 ; no more evolutions
- db 1, HYPNOSIS
- db 1, LICK
- db 1, SPITE
- db 8, SPITE
- db 13, MEAN_LOOK
- db 16, CURSE
- db 21, NIGHT_SHADE
- db 31, CONFUSE_RAY
- db 39, DREAM_EATER
- db 48, DESTINY_BOND
- db 0 ; no more level-up moves
-
-OnixEvosAttacks:
- db EVOLVE_TRADE, METAL_COAT, STEELIX
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, SCREECH
- db 10, BIND
- db 14, ROCK_THROW
- db 23, HARDEN
- db 27, RAGE
- db 36, SANDSTORM
- db 40, SLAM
- db 0 ; no more level-up moves
-
-DrowzeeEvosAttacks:
- db EVOLVE_LEVEL, 26, HYPNO
- db 0 ; no more evolutions
- db 1, POUND
- db 1, HYPNOSIS
- db 10, DISABLE
- db 18, CONFUSION
- db 25, HEADBUTT
- db 31, POISON_GAS
- db 36, MEDITATE
- db 40, PSYCHIC_M
- db 43, PSYCH_UP
- db 45, FUTURE_SIGHT
- db 0 ; no more level-up moves
-
-HypnoEvosAttacks:
- db 0 ; no more evolutions
- db 1, POUND
- db 1, HYPNOSIS
- db 1, DISABLE
- db 1, CONFUSION
- db 10, DISABLE
- db 18, CONFUSION
- db 25, HEADBUTT
- db 33, POISON_GAS
- db 40, MEDITATE
- db 49, PSYCHIC_M
- db 55, PSYCH_UP
- db 60, FUTURE_SIGHT
- db 0 ; no more level-up moves
-
-KrabbyEvosAttacks:
- db EVOLVE_LEVEL, 28, KINGLER
- db 0 ; no more evolutions
- db 1, BUBBLE
- db 5, LEER
- db 12, VICEGRIP
- db 16, HARDEN
- db 23, STOMP
- db 27, GUILLOTINE
- db 34, PROTECT
- db 41, CRABHAMMER
- db 0 ; no more level-up moves
-
-KinglerEvosAttacks:
- db 0 ; no more evolutions
- db 1, BUBBLE
- db 1, LEER
- db 1, VICEGRIP
- db 5, LEER
- db 12, VICEGRIP
- db 16, HARDEN
- db 23, STOMP
- db 27, GUILLOTINE
- db 38, PROTECT
- db 49, CRABHAMMER
- db 0 ; no more level-up moves
-
-VoltorbEvosAttacks:
- db EVOLVE_LEVEL, 30, ELECTRODE
- db 0 ; no more evolutions
- db 1, TACKLE
- db 9, SCREECH
- db 17, SONICBOOM
- db 23, SELFDESTRUCT
- db 29, ROLLOUT
- db 33, LIGHT_SCREEN
- db 37, SWIFT
- db 39, EXPLOSION
- db 41, MIRROR_COAT
- db 0 ; no more level-up moves
-
-ElectrodeEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, SCREECH
- db 1, SONICBOOM
- db 1, SELFDESTRUCT
- db 9, SCREECH
- db 17, SONICBOOM
- db 23, SELFDESTRUCT
- db 29, ROLLOUT
- db 34, LIGHT_SCREEN
- db 40, SWIFT
- db 44, EXPLOSION
- db 48, MIRROR_COAT
- db 0 ; no more level-up moves
-
-ExeggcuteEvosAttacks:
- db EVOLVE_ITEM, LEAF_STONE, EXEGGUTOR
- db 0 ; no more evolutions
- db 1, BARRAGE
- db 1, HYPNOSIS
- db 7, REFLECT
- db 13, LEECH_SEED
- db 19, CONFUSION
- db 25, STUN_SPORE
- db 31, POISONPOWDER
- db 37, SLEEP_POWDER
- db 43, SOLARBEAM
- db 0 ; no more level-up moves
-
-ExeggutorEvosAttacks:
- db 0 ; no more evolutions
- db 1, BARRAGE
- db 1, HYPNOSIS
- db 1, CONFUSION
- db 19, STOMP
- db 31, EGG_BOMB
- db 0 ; no more level-up moves
-
-CuboneEvosAttacks:
- db EVOLVE_LEVEL, 28, MAROWAK
- db 0 ; no more evolutions
- db 1, GROWL
- db 5, TAIL_WHIP
- db 9, BONE_CLUB
- db 13, HEADBUTT
- db 17, LEER
- db 21, FOCUS_ENERGY
- db 25, BONEMERANG
- db 29, RAGE
- db 33, FALSE_SWIPE
- db 37, THRASH
- db 41, BONE_RUSH
- db 0 ; no more level-up moves
-
-MarowakEvosAttacks:
- db 0 ; no more evolutions
- db 1, GROWL
- db 1, TAIL_WHIP
- db 1, BONE_CLUB
- db 1, HEADBUTT
- db 5, TAIL_WHIP
- db 9, BONE_CLUB
- db 13, HEADBUTT
- db 17, LEER
- db 21, FOCUS_ENERGY
- db 25, BONEMERANG
- db 32, RAGE
- db 39, FALSE_SWIPE
- db 46, THRASH
- db 53, BONE_RUSH
- db 0 ; no more level-up moves
-
-HitmonleeEvosAttacks:
- db 0 ; no more evolutions
- db 1, DOUBLE_KICK
- db 6, MEDITATE
- db 11, ROLLING_KICK
- db 16, JUMP_KICK
- db 21, FOCUS_ENERGY
- db 26, HI_JUMP_KICK
- db 31, MIND_READER
- db 36, FORESIGHT
- db 41, ENDURE
- db 46, MEGA_KICK
- db 51, REVERSAL
- db 0 ; no more level-up moves
-
-HitmonchanEvosAttacks:
- db 0 ; no more evolutions
- db 1, COMET_PUNCH
- db 7, AGILITY
- db 13, PURSUIT
- db 26, THUNDERPUNCH
- db 26, ICE_PUNCH
- db 26, FIRE_PUNCH
- db 32, MACH_PUNCH
- db 38, MEGA_PUNCH
- db 44, DETECT
- db 50, COUNTER
- db 0 ; no more level-up moves
-
-LickitungEvosAttacks:
- db 0 ; no more evolutions
- db 1, LICK
- db 7, SUPERSONIC
- db 13, DEFENSE_CURL
- db 19, STOMP
- db 25, WRAP
- db 31, DISABLE
- db 37, SLAM
- db 43, SCREECH
- db 0 ; no more level-up moves
-
-KoffingEvosAttacks:
- db EVOLVE_LEVEL, 35, WEEZING
- db 0 ; no more evolutions
- db 1, POISON_GAS
- db 1, TACKLE
- db 9, SMOG
- db 17, SELFDESTRUCT
- db 21, SLUDGE
- db 25, SMOKESCREEN
- db 33, HAZE
- db 41, EXPLOSION
- db 45, DESTINY_BOND
- db 0 ; no more level-up moves
-
-WeezingEvosAttacks:
- db 0 ; no more evolutions
- db 1, POISON_GAS
- db 1, TACKLE
- db 1, SMOG
- db 1, SELFDESTRUCT
- db 9, SMOG
- db 17, SELFDESTRUCT
- db 21, SLUDGE
- db 25, SMOKESCREEN
- db 33, HAZE
- db 44, EXPLOSION
- db 51, DESTINY_BOND
- db 0 ; no more level-up moves
-
-RhyhornEvosAttacks:
- db EVOLVE_LEVEL, 42, RHYDON
- db 0 ; no more evolutions
- db 1, HORN_ATTACK
- db 1, TAIL_WHIP
- db 13, STOMP
- db 19, FURY_ATTACK
- db 31, SCARY_FACE
- db 37, HORN_DRILL
- db 49, TAKE_DOWN
- db 55, EARTHQUAKE
- db 0 ; no more level-up moves
-
-RhydonEvosAttacks:
- db 0 ; no more evolutions
- db 1, HORN_ATTACK
- db 1, TAIL_WHIP
- db 1, STOMP
- db 1, FURY_ATTACK
- db 13, STOMP
- db 19, FURY_ATTACK
- db 31, SCARY_FACE
- db 37, HORN_DRILL
- db 54, TAKE_DOWN
- db 65, EARTHQUAKE
- db 0 ; no more level-up moves
-
-ChanseyEvosAttacks:
- db EVOLVE_HAPPINESS, TR_ANYTIME, BLISSEY
- db 0 ; no more evolutions
- db 1, POUND
- db 5, GROWL
- db 9, TAIL_WHIP
- db 13, SOFTBOILED
- db 17, DOUBLESLAP
- db 23, MINIMIZE
- db 29, SING
- db 35, EGG_BOMB
- db 41, DEFENSE_CURL
- db 49, LIGHT_SCREEN
- db 57, DOUBLE_EDGE
- db 0 ; no more level-up moves
-
-TangelaEvosAttacks:
- db 0 ; no more evolutions
- db 1, CONSTRICT
- db 4, SLEEP_POWDER
- db 10, ABSORB
- db 13, POISONPOWDER
- db 19, VINE_WHIP
- db 25, BIND
- db 31, MEGA_DRAIN
- db 34, STUN_SPORE
- db 40, SLAM
- db 46, GROWTH
- db 0 ; no more level-up moves
-
-KangaskhanEvosAttacks:
- db 0 ; no more evolutions
- db 1, COMET_PUNCH
- db 7, LEER
- db 13, BITE
- db 19, TAIL_WHIP
- db 25, MEGA_PUNCH
- db 31, RAGE
- db 37, ENDURE
- db 43, DIZZY_PUNCH
- db 49, REVERSAL
- db 0 ; no more level-up moves
-
-HorseaEvosAttacks:
- db EVOLVE_LEVEL, 32, SEADRA
- db 0 ; no more evolutions
- db 1, BUBBLE
- db 8, SMOKESCREEN
- db 15, LEER
- db 22, WATER_GUN
- db 29, TWISTER
- db 36, AGILITY
- db 43, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-SeadraEvosAttacks:
- db EVOLVE_TRADE, DRAGON_SCALE, KINGDRA
- db 0 ; no more evolutions
- db 1, BUBBLE
- db 1, SMOKESCREEN
- db 1, LEER
- db 1, WATER_GUN
- db 8, SMOKESCREEN
- db 15, LEER
- db 22, WATER_GUN
- db 29, TWISTER
- db 40, AGILITY
- db 51, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-GoldeenEvosAttacks:
- db EVOLVE_LEVEL, 33, SEAKING
- db 0 ; no more evolutions
- db 1, PECK
- db 1, TAIL_WHIP
- db 10, SUPERSONIC
- db 15, HORN_ATTACK
- db 24, FLAIL
- db 29, FURY_ATTACK
- db 38, WATERFALL
- db 43, HORN_DRILL
- db 52, AGILITY
- db 0 ; no more level-up moves
-
-SeakingEvosAttacks:
- db 0 ; no more evolutions
- db 1, PECK
- db 1, TAIL_WHIP
- db 1, TAIL_WHIP
- db 10, SUPERSONIC
- db 15, HORN_ATTACK
- db 24, FLAIL
- db 29, FURY_ATTACK
- db 41, WATERFALL
- db 49, HORN_DRILL
- db 61, AGILITY
- db 0 ; no more level-up moves
-
-StaryuEvosAttacks:
- db EVOLVE_ITEM, WATER_STONE, STARMIE
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, HARDEN
- db 7, WATER_GUN
- db 13, RAPID_SPIN
- db 19, RECOVER
- db 25, SWIFT
- db 31, BUBBLEBEAM
- db 37, MINIMIZE
- db 43, LIGHT_SCREEN
- db 50, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-StarmieEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, RAPID_SPIN
- db 1, RECOVER
- db 1, BUBBLEBEAM
- db 37, CONFUSE_RAY
- db 0 ; no more level-up moves
-
-MrMimeEvosAttacks:
- db 0 ; no more evolutions
- db 1, BARRIER
- db 6, CONFUSION
- db 11, SUBSTITUTE
- db 16, MEDITATE
- db 21, DOUBLESLAP
- db 26, LIGHT_SCREEN
- db 26, REFLECT
- db 31, ENCORE
- db 36, PSYBEAM
- db 41, BATON_PASS
- db 46, SAFEGUARD
- db 0 ; no more level-up moves
-
-ScytherEvosAttacks:
- db EVOLVE_TRADE, METAL_COAT, SCIZOR
- db 0 ; no more evolutions
- db 1, QUICK_ATTACK
- db 1, LEER
- db 6, FOCUS_ENERGY
- db 12, PURSUIT
- db 18, FALSE_SWIPE
- db 24, AGILITY
- db 30, WING_ATTACK
- db 36, SLASH
- db 42, SWORDS_DANCE
- db 48, DOUBLE_TEAM
- db 0 ; no more level-up moves
-
-JynxEvosAttacks:
- db 0 ; no more evolutions
- db 1, POUND
- db 1, LICK
- db 1, LOVELY_KISS
- db 1, POWDER_SNOW
- db 9, LOVELY_KISS
- db 13, POWDER_SNOW
- db 21, DOUBLESLAP
- db 25, ICE_PUNCH
- db 35, MEAN_LOOK
- db 41, BODY_SLAM
- db 51, PERISH_SONG
- db 57, BLIZZARD
- db 0 ; no more level-up moves
-
-ElectabuzzEvosAttacks:
- db 0 ; no more evolutions
- db 1, QUICK_ATTACK
- db 1, LEER
- db 1, THUNDERPUNCH
- db 9, THUNDERPUNCH
- db 17, LIGHT_SCREEN
- db 25, SWIFT
- db 36, SCREECH
- db 47, THUNDERBOLT
- db 58, THUNDER
- db 0 ; no more level-up moves
-
-MagmarEvosAttacks:
- db 0 ; no more evolutions
- db 1, EMBER
- db 1, LEER
- db 1, SMOG
- db 1, FIRE_PUNCH
- db 7, LEER
- db 13, SMOG
- db 19, FIRE_PUNCH
- db 25, SMOKESCREEN
- db 33, SUNNY_DAY
- db 41, FLAMETHROWER
- db 49, CONFUSE_RAY
- db 57, FIRE_BLAST
- db 0 ; no more level-up moves
-
-PinsirEvosAttacks:
- db 0 ; no more evolutions
- db 1, VICEGRIP
- db 7, FOCUS_ENERGY
- db 13, BIND
- db 19, SEISMIC_TOSS
- db 25, HARDEN
- db 31, GUILLOTINE
- db 37, SUBMISSION
- db 43, SWORDS_DANCE
- db 0 ; no more level-up moves
-
-TaurosEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 4, TAIL_WHIP
- db 8, RAGE
- db 13, HORN_ATTACK
- db 19, SCARY_FACE
- db 26, PURSUIT
- db 34, REST
- db 43, THRASH
- db 53, TAKE_DOWN
- db 0 ; no more level-up moves
-
-MagikarpEvosAttacks:
- db EVOLVE_LEVEL, 20, GYARADOS
- db 0 ; no more evolutions
- db 1, SPLASH
- db 15, TACKLE
- db 30, FLAIL
- db 0 ; no more level-up moves
-
-GyaradosEvosAttacks:
- db 0 ; no more evolutions
- db 1, THRASH
- db 20, BITE
- db 25, DRAGON_RAGE
- db 30, LEER
- db 35, TWISTER
- db 40, HYDRO_PUMP
- db 45, RAIN_DANCE
- db 50, HYPER_BEAM
- db 0 ; no more level-up moves
-
-LaprasEvosAttacks:
- db 0 ; no more evolutions
- db 1, WATER_GUN
- db 1, GROWL
- db 1, SING
- db 8, MIST
- db 15, BODY_SLAM
- db 22, CONFUSE_RAY
- db 29, PERISH_SONG
- db 36, ICE_BEAM
- db 43, RAIN_DANCE
- db 50, SAFEGUARD
- db 57, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-DittoEvosAttacks:
- db 0 ; no more evolutions
- db 1, TRANSFORM
- db 0 ; no more level-up moves
-
-EeveeEvosAttacks:
- db EVOLVE_ITEM, THUNDERSTONE, JOLTEON
- db EVOLVE_ITEM, WATER_STONE, VAPOREON
- db EVOLVE_ITEM, FIRE_STONE, FLAREON
- db EVOLVE_HAPPINESS, TR_MORNDAY, ESPEON
- db EVOLVE_HAPPINESS, TR_NITE, UMBREON
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, TAIL_WHIP
- db 8, SAND_ATTACK
- db 16, GROWL
- db 23, QUICK_ATTACK
- db 30, BITE
-if _CRYSTAL
- db 36, BATON_PASS
-else
- db 36, FOCUS_ENERGY
-endc
- db 42, TAKE_DOWN
- db 0 ; no more level-up moves
-
-VaporeonEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, TAIL_WHIP
- db 8, SAND_ATTACK
- db 16, WATER_GUN
- db 23, QUICK_ATTACK
- db 30, BITE
- db 36, AURORA_BEAM
- db 42, HAZE
- db 47, ACID_ARMOR
- db 52, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-JolteonEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, TAIL_WHIP
- db 8, SAND_ATTACK
- db 16, THUNDERSHOCK
- db 23, QUICK_ATTACK
- db 30, DOUBLE_KICK
- db 36, PIN_MISSILE
- db 42, THUNDER_WAVE
- db 47, AGILITY
- db 52, THUNDER
- db 0 ; no more level-up moves
-
-FlareonEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, TAIL_WHIP
- db 8, SAND_ATTACK
- db 16, EMBER
- db 23, QUICK_ATTACK
- db 30, BITE
- db 36, FIRE_SPIN
- db 42, SMOG
- db 47, LEER
- db 52, FLAMETHROWER
- db 0 ; no more level-up moves
-
-PorygonEvosAttacks:
- db EVOLVE_TRADE, UP_GRADE, PORYGON2
- db 0 ; no more evolutions
- db 1, CONVERSION2
- db 1, TACKLE
- db 1, CONVERSION
- db 9, AGILITY
- db 12, PSYBEAM
- db 20, RECOVER
- db 24, SHARPEN
- db 32, LOCK_ON
- db 36, TRI_ATTACK
- db 44, ZAP_CANNON
- db 0 ; no more level-up moves
-
-OmanyteEvosAttacks:
- db EVOLVE_LEVEL, 40, OMASTAR
- db 0 ; no more evolutions
- db 1, CONSTRICT
- db 1, WITHDRAW
- db 13, BITE
- db 19, WATER_GUN
- db 31, LEER
- db 37, PROTECT
- db 49, ANCIENTPOWER
- db 55, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-OmastarEvosAttacks:
- db 0 ; no more evolutions
- db 1, CONSTRICT
- db 1, WITHDRAW
- db 1, BITE
- db 13, BITE
- db 19, WATER_GUN
- db 31, LEER
- db 37, PROTECT
- db 40, SPIKE_CANNON
- db 54, ANCIENTPOWER
- db 65, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-KabutoEvosAttacks:
- db EVOLVE_LEVEL, 40, KABUTOPS
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, HARDEN
- db 10, ABSORB
- db 19, LEER
- db 28, SAND_ATTACK
- db 37, ENDURE
- db 46, MEGA_DRAIN
- db 55, ANCIENTPOWER
- db 0 ; no more level-up moves
-
-KabutopsEvosAttacks:
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, HARDEN
- db 1, ABSORB
- db 10, ABSORB
- db 19, LEER
- db 28, SAND_ATTACK
- db 37, ENDURE
- db 40, SLASH
- db 51, MEGA_DRAIN
- db 65, ANCIENTPOWER
- db 0 ; no more level-up moves
-
-AerodactylEvosAttacks:
- db 0 ; no more evolutions
- db 1, WING_ATTACK
- db 8, AGILITY
- db 15, BITE
- db 22, SUPERSONIC
- db 29, ANCIENTPOWER
- db 36, SCARY_FACE
- db 43, TAKE_DOWN
- db 50, HYPER_BEAM
- db 0 ; no more level-up moves
-
-SnorlaxEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 8, AMNESIA
- db 15, DEFENSE_CURL
- db 22, BELLY_DRUM
- db 29, HEADBUTT
- db 36, SNORE
- db 36, REST
- db 43, BODY_SLAM
- db 50, ROLLOUT
- db 57, HYPER_BEAM
- db 0 ; no more level-up moves
-
-ArticunoEvosAttacks:
- db 0 ; no more evolutions
- db 1, GUST
- db 1, POWDER_SNOW
- db 13, MIST
- db 25, AGILITY
- db 37, MIND_READER
- db 49, ICE_BEAM
- db 61, REFLECT
- db 73, BLIZZARD
- db 0 ; no more level-up moves
-
-ZapdosEvosAttacks:
- db 0 ; no more evolutions
- db 1, PECK
- db 1, THUNDERSHOCK
- db 13, THUNDER_WAVE
- db 25, AGILITY
- db 37, DETECT
- db 49, DRILL_PECK
- db 61, LIGHT_SCREEN
- db 73, THUNDER
- db 0 ; no more level-up moves
-
-MoltresEvosAttacks:
- db 0 ; no more evolutions
- db 1, WING_ATTACK
- db 1, EMBER
- db 13, FIRE_SPIN
- db 25, AGILITY
- db 37, ENDURE
- db 49, FLAMETHROWER
- db 61, SAFEGUARD
- db 73, SKY_ATTACK
- db 0 ; no more level-up moves
-
-DratiniEvosAttacks:
- db EVOLVE_LEVEL, 30, DRAGONAIR
- db 0 ; no more evolutions
- db 1, WRAP
- db 1, LEER
- db 8, THUNDER_WAVE
- db 15, TWISTER
- db 22, DRAGON_RAGE
- db 29, SLAM
- db 36, AGILITY
- db 43, SAFEGUARD
- db 50, OUTRAGE
- db 57, HYPER_BEAM
- db 0 ; no more level-up moves
-
-DragonairEvosAttacks:
- db EVOLVE_LEVEL, 55, DRAGONITE
- db 0 ; no more evolutions
- db 1, WRAP
- db 1, LEER
- db 1, THUNDER_WAVE
- db 1, TWISTER
- db 8, THUNDER_WAVE
- db 15, TWISTER
- db 22, DRAGON_RAGE
- db 29, SLAM
- db 38, AGILITY
- db 47, SAFEGUARD
- db 56, OUTRAGE
- db 65, HYPER_BEAM
- db 0 ; no more level-up moves
-
-DragoniteEvosAttacks:
- db 0 ; no more evolutions
- db 1, WRAP
- db 1, LEER
- db 1, THUNDER_WAVE
- db 1, TWISTER
- db 8, THUNDER_WAVE
- db 15, TWISTER
- db 22, DRAGON_RAGE
- db 29, SLAM
- db 38, AGILITY
- db 47, SAFEGUARD
- db 55, WING_ATTACK
- db 61, OUTRAGE
- db 75, HYPER_BEAM
- db 0 ; no more level-up moves
-
-MewtwoEvosAttacks:
- db 0 ; no more evolutions
- db 1, CONFUSION
- db 1, DISABLE
- db 11, BARRIER
- db 22, SWIFT
- db 33, PSYCH_UP
- db 44, FUTURE_SIGHT
- db 55, MIST
- db 66, PSYCHIC_M
- db 77, AMNESIA
- db 88, RECOVER
- db 99, SAFEGUARD
- db 0 ; no more level-up moves
-
-MewEvosAttacks:
- db 0 ; no more evolutions
- db 1, POUND
- db 10, TRANSFORM
- db 20, MEGA_PUNCH
- db 30, METRONOME
- db 40, PSYCHIC_M
- db 50, ANCIENTPOWER
- db 0 ; no more level-up moves
-
-ChikoritaEvosAttacks:
- db EVOLVE_LEVEL, 16, BAYLEEF
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, GROWL
- db 8, RAZOR_LEAF
- db 12, REFLECT
- db 15, POISONPOWDER
- db 22, SYNTHESIS
- db 29, BODY_SLAM
- db 36, LIGHT_SCREEN
- db 43, SAFEGUARD
- db 50, SOLARBEAM
- db 0 ; no more level-up moves
-
-BayleefEvosAttacks:
- db EVOLVE_LEVEL, 32, MEGANIUM
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, GROWL
- db 1, RAZOR_LEAF
- db 1, REFLECT
- db 8, RAZOR_LEAF
- db 12, REFLECT
- db 15, POISONPOWDER
- db 23, SYNTHESIS
- db 31, BODY_SLAM
- db 39, LIGHT_SCREEN
- db 47, SAFEGUARD
- db 55, SOLARBEAM
- db 0 ; no more level-up moves
-
-MeganiumEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, GROWL
- db 1, RAZOR_LEAF
- db 1, REFLECT
- db 8, RAZOR_LEAF
- db 12, REFLECT
- db 15, POISONPOWDER
- db 23, SYNTHESIS
- db 31, BODY_SLAM
- db 41, LIGHT_SCREEN
- db 51, SAFEGUARD
- db 61, SOLARBEAM
- db 0 ; no more level-up moves
-
-CyndaquilEvosAttacks:
- db EVOLVE_LEVEL, 14, QUILAVA
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, LEER
- db 6, SMOKESCREEN
- db 12, EMBER
- db 19, QUICK_ATTACK
- db 27, FLAME_WHEEL
- db 36, SWIFT
- db 46, FLAMETHROWER
- db 0 ; no more level-up moves
-
-QuilavaEvosAttacks:
- db EVOLVE_LEVEL, 36, TYPHLOSION
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, LEER
- db 1, SMOKESCREEN
- db 6, SMOKESCREEN
- db 12, EMBER
- db 21, QUICK_ATTACK
- db 31, FLAME_WHEEL
- db 42, SWIFT
- db 54, FLAMETHROWER
- db 0 ; no more level-up moves
-
-TyphlosionEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, LEER
- db 1, SMOKESCREEN
- db 1, EMBER
- db 6, SMOKESCREEN
- db 12, EMBER
- db 21, QUICK_ATTACK
- db 31, FLAME_WHEEL
- db 45, SWIFT
- db 60, FLAMETHROWER
- db 0 ; no more level-up moves
-
-TotodileEvosAttacks:
- db EVOLVE_LEVEL, 18, CROCONAW
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, LEER
- db 7, RAGE
- db 13, WATER_GUN
- db 20, BITE
- db 27, SCARY_FACE
- db 35, SLASH
- db 43, SCREECH
- db 52, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-CroconawEvosAttacks:
- db EVOLVE_LEVEL, 30, FERALIGATR
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, LEER
- db 1, RAGE
- db 7, RAGE
- db 13, WATER_GUN
- db 21, BITE
- db 28, SCARY_FACE
- db 37, SLASH
- db 45, SCREECH
- db 55, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-FeraligatrEvosAttacks:
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, LEER
- db 1, RAGE
- db 1, WATER_GUN
- db 7, RAGE
- db 13, WATER_GUN
- db 21, BITE
- db 28, SCARY_FACE
- db 38, SLASH
- db 47, SCREECH
- db 58, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-SentretEvosAttacks:
- db EVOLVE_LEVEL, 15, FURRET
- db 0 ; no more evolutions
- db 1, TACKLE
- db 5, DEFENSE_CURL
- db 11, QUICK_ATTACK
- db 17, FURY_SWIPES
- db 25, SLAM
- db 33, REST
- db 41, AMNESIA
- db 0 ; no more level-up moves
-
-FurretEvosAttacks:
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, DEFENSE_CURL
- db 1, QUICK_ATTACK
- db 5, DEFENSE_CURL
- db 11, QUICK_ATTACK
- db 18, FURY_SWIPES
- db 28, SLAM
- db 38, REST
- db 48, AMNESIA
- db 0 ; no more level-up moves
-
-HoothootEvosAttacks:
- db EVOLVE_LEVEL, 20, NOCTOWL
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, GROWL
- db 6, FORESIGHT
- db 11, PECK
- db 16, HYPNOSIS
- db 22, REFLECT
- db 28, TAKE_DOWN
- db 34, CONFUSION
- db 48, DREAM_EATER
- db 0 ; no more level-up moves
-
-NoctowlEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, GROWL
- db 1, FORESIGHT
- db 1, PECK
- db 6, FORESIGHT
- db 11, PECK
- db 16, HYPNOSIS
- db 25, REFLECT
- db 33, TAKE_DOWN
- db 41, CONFUSION
- db 57, DREAM_EATER
- db 0 ; no more level-up moves
-
-LedybaEvosAttacks:
- db EVOLVE_LEVEL, 18, LEDIAN
- db 0 ; no more evolutions
- db 1, TACKLE
- db 8, SUPERSONIC
- db 15, COMET_PUNCH
- db 22, LIGHT_SCREEN
- db 22, REFLECT
- db 22, SAFEGUARD
- db 29, BATON_PASS
- db 36, SWIFT
- db 43, AGILITY
- db 50, DOUBLE_EDGE
- db 0 ; no more level-up moves
-
-LedianEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, SUPERSONIC
- db 8, SUPERSONIC
- db 15, COMET_PUNCH
- db 24, LIGHT_SCREEN
- db 24, REFLECT
- db 24, SAFEGUARD
- db 33, BATON_PASS
- db 42, SWIFT
- db 51, AGILITY
- db 60, DOUBLE_EDGE
- db 0 ; no more level-up moves
-
-SpinarakEvosAttacks:
- db EVOLVE_LEVEL, 22, ARIADOS
- db 0 ; no more evolutions
- db 1, POISON_STING
- db 1, STRING_SHOT
- db 6, SCARY_FACE
- db 11, CONSTRICT
- db 17, NIGHT_SHADE
- db 23, LEECH_LIFE
- db 30, FURY_SWIPES
- db 37, SPIDER_WEB
-if _CRYSTAL
- db 45, AGILITY
-else
- db 45, SCREECH
-endc
- db 53, PSYCHIC_M
- db 0 ; no more level-up moves
-
-AriadosEvosAttacks:
- db 0 ; no more evolutions
- db 1, POISON_STING
- db 1, STRING_SHOT
- db 1, SCARY_FACE
- db 1, CONSTRICT
- db 6, SCARY_FACE
- db 11, CONSTRICT
- db 17, NIGHT_SHADE
- db 25, LEECH_LIFE
- db 34, FURY_SWIPES
- db 43, SPIDER_WEB
-if _CRYSTAL
- db 53, AGILITY
-else
- db 53, SCREECH
-endc
- db 63, PSYCHIC_M
- db 0 ; no more level-up moves
-
-CrobatEvosAttacks:
- db 0 ; no more evolutions
- db 1, SCREECH
- db 1, LEECH_LIFE
- db 1, SUPERSONIC
- db 6, SUPERSONIC
- db 12, BITE
- db 19, CONFUSE_RAY
- db 30, WING_ATTACK
- db 42, MEAN_LOOK
- db 55, HAZE
- db 0 ; no more level-up moves
-
-ChinchouEvosAttacks:
- db EVOLVE_LEVEL, 27, LANTURN
- db 0 ; no more evolutions
- db 1, BUBBLE
- db 1, THUNDER_WAVE
- db 5, SUPERSONIC
- db 13, FLAIL
- db 17, WATER_GUN
- db 25, SPARK
- db 29, CONFUSE_RAY
- db 37, TAKE_DOWN
- db 41, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-LanturnEvosAttacks:
- db 0 ; no more evolutions
- db 1, BUBBLE
- db 1, THUNDER_WAVE
- db 1, SUPERSONIC
- db 5, SUPERSONIC
- db 13, FLAIL
- db 17, WATER_GUN
- db 25, SPARK
- db 33, CONFUSE_RAY
- db 45, TAKE_DOWN
- db 53, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-PichuEvosAttacks:
- db EVOLVE_HAPPINESS, TR_ANYTIME, PIKACHU
- db 0 ; no more evolutions
- db 1, THUNDERSHOCK
- db 1, CHARM
- db 6, TAIL_WHIP
- db 8, THUNDER_WAVE
- db 11, SWEET_KISS
- db 0 ; no more level-up moves
-
-CleffaEvosAttacks:
- db EVOLVE_HAPPINESS, TR_ANYTIME, CLEFAIRY
- db 0 ; no more evolutions
- db 1, POUND
- db 1, CHARM
- db 4, ENCORE
- db 8, SING
- db 13, SWEET_KISS
- db 0 ; no more level-up moves
-
-IgglybuffEvosAttacks:
- db EVOLVE_HAPPINESS, TR_ANYTIME, JIGGLYPUFF
- db 0 ; no more evolutions
- db 1, SING
- db 1, CHARM
- db 4, DEFENSE_CURL
- db 9, POUND
- db 14, SWEET_KISS
- db 0 ; no more level-up moves
-
-TogepiEvosAttacks:
- db EVOLVE_HAPPINESS, TR_ANYTIME, TOGETIC
- db 0 ; no more evolutions
- db 1, GROWL
- db 1, CHARM
- db 7, METRONOME
- db 18, SWEET_KISS
- db 25, ENCORE
- db 31, SAFEGUARD
- db 38, DOUBLE_EDGE
- db 0 ; no more level-up moves
-
-TogeticEvosAttacks:
- db 0 ; no more evolutions
- db 1, GROWL
- db 1, CHARM
- db 7, METRONOME
- db 18, SWEET_KISS
- db 25, ENCORE
- db 31, SAFEGUARD
- db 38, DOUBLE_EDGE
- db 0 ; no more level-up moves
-
-NatuEvosAttacks:
- db EVOLVE_LEVEL, 25, XATU
- db 0 ; no more evolutions
- db 1, PECK
- db 1, LEER
- db 10, NIGHT_SHADE
- db 20, TELEPORT
- db 30, FUTURE_SIGHT
- db 40, CONFUSE_RAY
- db 50, PSYCHIC_M
- db 0 ; no more level-up moves
-
-XatuEvosAttacks:
- db 0 ; no more evolutions
- db 1, PECK
- db 1, LEER
- db 1, NIGHT_SHADE
- db 10, NIGHT_SHADE
- db 20, TELEPORT
- db 35, FUTURE_SIGHT
- db 50, CONFUSE_RAY
- db 65, PSYCHIC_M
- db 0 ; no more level-up moves
-
-MareepEvosAttacks:
- db EVOLVE_LEVEL, 15, FLAAFFY
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, GROWL
- db 9, THUNDERSHOCK
- db 16, THUNDER_WAVE
- db 23, COTTON_SPORE
- db 30, LIGHT_SCREEN
- db 37, THUNDER
- db 0 ; no more level-up moves
-
-FlaaffyEvosAttacks:
- db EVOLVE_LEVEL, 30, AMPHAROS
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, GROWL
- db 1, THUNDERSHOCK
- db 9, THUNDERSHOCK
- db 18, THUNDER_WAVE
- db 27, COTTON_SPORE
- db 36, LIGHT_SCREEN
- db 45, THUNDER
- db 0 ; no more level-up moves
-
-AmpharosEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, GROWL
- db 1, THUNDERSHOCK
- db 1, THUNDER_WAVE
- db 9, THUNDERSHOCK
- db 18, THUNDER_WAVE
- db 27, COTTON_SPORE
- db 30, THUNDERPUNCH
- db 42, LIGHT_SCREEN
- db 57, THUNDER
- db 0 ; no more level-up moves
-
-BellossomEvosAttacks:
- db 0 ; no more evolutions
- db 1, ABSORB
- db 1, SWEET_SCENT
- db 1, STUN_SPORE
- db 1, PETAL_DANCE
- db 55, SOLARBEAM
- db 0 ; no more level-up moves
-
-MarillEvosAttacks:
- db EVOLVE_LEVEL, 18, AZUMARILL
- db 0 ; no more evolutions
- db 1, TACKLE
- db 3, DEFENSE_CURL
- db 6, TAIL_WHIP
- db 10, WATER_GUN
- db 15, ROLLOUT
- db 21, BUBBLEBEAM
- db 28, DOUBLE_EDGE
- db 36, RAIN_DANCE
- db 0 ; no more level-up moves
-
-AzumarillEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, DEFENSE_CURL
- db 1, TAIL_WHIP
- db 1, WATER_GUN
- db 3, DEFENSE_CURL
- db 6, TAIL_WHIP
- db 10, WATER_GUN
- db 15, ROLLOUT
- db 25, BUBBLEBEAM
- db 36, DOUBLE_EDGE
- db 48, RAIN_DANCE
- db 0 ; no more level-up moves
-
-SudowoodoEvosAttacks:
- db 0 ; no more evolutions
- db 1, ROCK_THROW
- db 1, MIMIC
- db 10, FLAIL
- db 19, LOW_KICK
- db 28, ROCK_SLIDE
- db 37, FAINT_ATTACK
- db 46, SLAM
- db 0 ; no more level-up moves
-
-PolitoedEvosAttacks:
- db 0 ; no more evolutions
- db 1, WATER_GUN
- db 1, HYPNOSIS
- db 1, DOUBLESLAP
- db 1, PERISH_SONG
- db 35, PERISH_SONG
- db 51, SWAGGER
- db 0 ; no more level-up moves
-
-HoppipEvosAttacks:
- db EVOLVE_LEVEL, 18, SKIPLOOM
- db 0 ; no more evolutions
- db 1, SPLASH
-if _CRYSTAL
- db 5, SYNTHESIS
-else
- db 1, SYNTHESIS
-endc
- db 5, TAIL_WHIP
- db 10, TACKLE
- db 13, POISONPOWDER
- db 15, STUN_SPORE
- db 17, SLEEP_POWDER
- db 20, LEECH_SEED
- db 25, COTTON_SPORE
- db 30, MEGA_DRAIN
- db 0 ; no more level-up moves
-
-SkiploomEvosAttacks:
- db EVOLVE_LEVEL, 27, JUMPLUFF
- db 0 ; no more evolutions
- db 1, SPLASH
- db 1, SYNTHESIS
- db 1, TAIL_WHIP
- db 1, TACKLE
-if _CRYSTAL
- db 5, SYNTHESIS
-endc
- db 5, TAIL_WHIP
- db 10, TACKLE
- db 13, POISONPOWDER
- db 15, STUN_SPORE
- db 17, SLEEP_POWDER
- db 22, LEECH_SEED
- db 29, COTTON_SPORE
- db 36, MEGA_DRAIN
- db 0 ; no more level-up moves
-
-JumpluffEvosAttacks:
- db 0 ; no more evolutions
- db 1, SPLASH
- db 1, SYNTHESIS
- db 1, TAIL_WHIP
- db 1, TACKLE
-if _CRYSTAL
- db 5, SYNTHESIS
-endc
- db 5, TAIL_WHIP
- db 10, TACKLE
- db 13, POISONPOWDER
- db 15, STUN_SPORE
- db 17, SLEEP_POWDER
- db 22, LEECH_SEED
- db 33, COTTON_SPORE
- db 44, MEGA_DRAIN
- db 0 ; no more level-up moves
-
-AipomEvosAttacks:
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, TAIL_WHIP
- db 6, SAND_ATTACK
- db 12, BATON_PASS
- db 19, FURY_SWIPES
- db 27, SWIFT
- db 36, SCREECH
- db 46, AGILITY
- db 0 ; no more level-up moves
-
-SunkernEvosAttacks:
- db EVOLVE_ITEM, SUN_STONE, SUNFLORA
- db 0 ; no more evolutions
- db 1, ABSORB
- db 4, GROWTH
- db 10, MEGA_DRAIN
- db 19, SUNNY_DAY
- db 31, SYNTHESIS
- db 46, GIGA_DRAIN
- db 0 ; no more level-up moves
-
-SunfloraEvosAttacks:
- db 0 ; no more evolutions
- db 1, ABSORB
- db 1, POUND
- db 4, GROWTH
- db 10, RAZOR_LEAF
- db 19, SUNNY_DAY
- db 31, PETAL_DANCE
- db 46, SOLARBEAM
- db 0 ; no more level-up moves
-
-YanmaEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, FORESIGHT
- db 7, QUICK_ATTACK
- db 13, DOUBLE_TEAM
- db 19, SONICBOOM
- db 25, DETECT
- db 31, SUPERSONIC
-if _CRYSTAL
- db 37, WING_ATTACK
-else
- db 37, SWIFT
-endc
- db 43, SCREECH
- db 0 ; no more level-up moves
-
-WooperEvosAttacks:
- db EVOLVE_LEVEL, 20, QUAGSIRE
- db 0 ; no more evolutions
- db 1, WATER_GUN
- db 1, TAIL_WHIP
- db 11, SLAM
- db 21, AMNESIA
- db 31, EARTHQUAKE
- db 41, RAIN_DANCE
- db 51, MIST
- db 51, HAZE
- db 0 ; no more level-up moves
-
-QuagsireEvosAttacks:
- db 0 ; no more evolutions
- db 1, WATER_GUN
- db 1, TAIL_WHIP
- db 11, SLAM
- db 23, AMNESIA
- db 35, EARTHQUAKE
- db 47, RAIN_DANCE
- db 59, MIST
- db 59, HAZE
- db 0 ; no more level-up moves
-
-EspeonEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, TAIL_WHIP
- db 8, SAND_ATTACK
- db 16, CONFUSION
- db 23, QUICK_ATTACK
- db 30, SWIFT
- db 36, PSYBEAM
- db 42, PSYCH_UP
- db 47, PSYCHIC_M
- db 52, MORNING_SUN
- db 0 ; no more level-up moves
-
-UmbreonEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, TAIL_WHIP
- db 8, SAND_ATTACK
- db 16, PURSUIT
- db 23, QUICK_ATTACK
- db 30, CONFUSE_RAY
- db 36, FAINT_ATTACK
- db 42, MEAN_LOOK
- db 47, SCREECH
- db 52, MOONLIGHT
- db 0 ; no more level-up moves
-
-MurkrowEvosAttacks:
- db 0 ; no more evolutions
- db 1, PECK
- db 11, PURSUIT
- db 16, HAZE
- db 26, NIGHT_SHADE
- db 31, FAINT_ATTACK
- db 41, MEAN_LOOK
- db 0 ; no more level-up moves
-
-SlowkingEvosAttacks:
- db 0 ; no more evolutions
- db 1, CURSE
- db 1, TACKLE
- db 6, GROWL
- db 15, WATER_GUN
- db 20, CONFUSION
- db 29, DISABLE
- db 34, HEADBUTT
- db 43, SWAGGER
- db 48, PSYCHIC_M
- db 0 ; no more level-up moves
-
-MisdreavusEvosAttacks:
- db 0 ; no more evolutions
- db 1, GROWL
- db 1, PSYWAVE
- db 6, SPITE
- db 12, CONFUSE_RAY
- db 19, MEAN_LOOK
- db 27, PSYBEAM
- db 36, PAIN_SPLIT
- db 46, PERISH_SONG
- db 0 ; no more level-up moves
-
-UnownEvosAttacks:
- db 0 ; no more evolutions
- db 1, HIDDEN_POWER
- db 0 ; no more level-up moves
-
-WobbuffetEvosAttacks:
- db 0 ; no more evolutions
- db 1, COUNTER
- db 1, MIRROR_COAT
- db 1, SAFEGUARD
- db 1, DESTINY_BOND
- db 0 ; no more level-up moves
-
-GirafarigEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, GROWL
- db 1, CONFUSION
- db 1, STOMP
- db 7, CONFUSION
- db 13, STOMP
- db 20, AGILITY
- db 30, BATON_PASS
- db 41, PSYBEAM
- db 54, CRUNCH
- db 0 ; no more level-up moves
-
-PinecoEvosAttacks:
- db EVOLVE_LEVEL, 31, FORRETRESS
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, PROTECT
- db 8, SELFDESTRUCT
- db 15, TAKE_DOWN
- db 22, RAPID_SPIN
- db 29, BIDE
- db 36, EXPLOSION
- db 43, SPIKES
- db 50, DOUBLE_EDGE
- db 0 ; no more level-up moves
-
-ForretressEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, PROTECT
- db 1, SELFDESTRUCT
- db 8, SELFDESTRUCT
- db 15, TAKE_DOWN
- db 22, RAPID_SPIN
- db 29, BIDE
- db 39, EXPLOSION
- db 49, SPIKES
- db 59, DOUBLE_EDGE
- db 0 ; no more level-up moves
-
-DunsparceEvosAttacks:
- db 0 ; no more evolutions
- db 1, RAGE
- db 5, DEFENSE_CURL
- db 13, GLARE
- db 18, SPITE
- db 26, PURSUIT
- db 30, SCREECH
- db 38, TAKE_DOWN
- db 0 ; no more level-up moves
-
-GligarEvosAttacks:
- db 0 ; no more evolutions
- db 1, POISON_STING
- db 6, SAND_ATTACK
- db 13, HARDEN
- db 20, QUICK_ATTACK
- db 28, FAINT_ATTACK
- db 36, SLASH
- db 44, SCREECH
- db 52, GUILLOTINE
- db 0 ; no more level-up moves
-
-SteelixEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, SCREECH
- db 10, BIND
- db 14, ROCK_THROW
- db 23, HARDEN
- db 27, RAGE
- db 36, SANDSTORM
- db 40, SLAM
- db 49, CRUNCH
- db 0 ; no more level-up moves
-
-SnubbullEvosAttacks:
- db EVOLVE_LEVEL, 23, GRANBULL
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, SCARY_FACE
- db 4, TAIL_WHIP
- db 8, CHARM
- db 13, BITE
- db 19, LICK
- db 26, ROAR
- db 34, RAGE
- db 43, TAKE_DOWN
- db 0 ; no more level-up moves
-
-GranbullEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, SCARY_FACE
- db 4, TAIL_WHIP
- db 8, CHARM
- db 13, BITE
- db 19, LICK
- db 28, ROAR
- db 38, RAGE
- db 51, TAKE_DOWN
- db 0 ; no more level-up moves
-
-QwilfishEvosAttacks:
- db 0 ; no more evolutions
-if _CRYSTAL
- db 1, SPIKES
-endc
- db 1, TACKLE
- db 1, POISON_STING
- db 10, HARDEN
- db 10, MINIMIZE
- db 19, WATER_GUN
- db 28, PIN_MISSILE
- db 37, TAKE_DOWN
- db 46, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-ScizorEvosAttacks:
- db 0 ; no more evolutions
- db 1, QUICK_ATTACK
- db 1, LEER
- db 6, FOCUS_ENERGY
- db 12, PURSUIT
- db 18, FALSE_SWIPE
- db 24, AGILITY
- db 30, METAL_CLAW
- db 36, SLASH
- db 42, SWORDS_DANCE
- db 48, DOUBLE_TEAM
- db 0 ; no more level-up moves
-
-ShuckleEvosAttacks:
- db 0 ; no more evolutions
- db 1, CONSTRICT
- db 1, WITHDRAW
- db 9, WRAP
- db 14, ENCORE
- db 23, SAFEGUARD
- db 28, BIDE
- db 37, REST
- db 0 ; no more level-up moves
-
-HeracrossEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, LEER
- db 6, HORN_ATTACK
- db 12, ENDURE
- db 19, FURY_ATTACK
- db 27, COUNTER
- db 35, TAKE_DOWN
- db 44, REVERSAL
- db 54, MEGAHORN
- db 0 ; no more level-up moves
-
-SneaselEvosAttacks:
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, LEER
- db 9, QUICK_ATTACK
- db 17, SCREECH
- db 25, FAINT_ATTACK
- db 33, FURY_SWIPES
- db 41, AGILITY
- db 49, SLASH
- db 57, BEAT_UP
-if _CRYSTAL
- db 65, METAL_CLAW
-endc
- db 0 ; no more level-up moves
-
-TeddiursaEvosAttacks:
- db EVOLVE_LEVEL, 30, URSARING
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, LEER
- db 8, LICK
- db 15, FURY_SWIPES
- db 22, FAINT_ATTACK
- db 29, REST
- db 36, SLASH
- db 43, SNORE
- db 50, THRASH
- db 0 ; no more level-up moves
-
-UrsaringEvosAttacks:
- db 0 ; no more evolutions
- db 1, SCRATCH
- db 1, LEER
- db 1, LICK
- db 1, FURY_SWIPES
- db 8, LICK
- db 15, FURY_SWIPES
- db 22, FAINT_ATTACK
- db 29, REST
- db 39, SLASH
- db 49, SNORE
- db 59, THRASH
- db 0 ; no more level-up moves
-
-SlugmaEvosAttacks:
- db EVOLVE_LEVEL, 38, MAGCARGO
- db 0 ; no more evolutions
- db 1, SMOG
- db 8, EMBER
- db 15, ROCK_THROW
- db 22, HARDEN
- db 29, AMNESIA
- db 36, FLAMETHROWER
- db 43, ROCK_SLIDE
- db 50, BODY_SLAM
- db 0 ; no more level-up moves
-
-MagcargoEvosAttacks:
- db 0 ; no more evolutions
- db 1, SMOG
- db 1, EMBER
- db 1, ROCK_THROW
- db 8, EMBER
- db 15, ROCK_THROW
- db 22, HARDEN
- db 29, AMNESIA
- db 36, FLAMETHROWER
- db 48, ROCK_SLIDE
- db 60, BODY_SLAM
- db 0 ; no more level-up moves
-
-SwinubEvosAttacks:
- db EVOLVE_LEVEL, 33, PILOSWINE
- db 0 ; no more evolutions
- db 1, TACKLE
- db 10, POWDER_SNOW
- db 19, ENDURE
- db 28, TAKE_DOWN
- db 37, MIST
- db 46, BLIZZARD
-if _CRYSTAL
- db 55, AMNESIA
-endc
- db 0 ; no more level-up moves
-
-PiloswineEvosAttacks:
- db 0 ; no more evolutions
- db 1, HORN_ATTACK
- db 1, POWDER_SNOW
- db 1, ENDURE
- db 10, POWDER_SNOW
- db 19, ENDURE
- db 28, TAKE_DOWN
- db 33, FURY_ATTACK
- db 42, MIST
- db 56, BLIZZARD
-if _CRYSTAL
- db 70, AMNESIA
-endc
- db 0 ; no more level-up moves
-
-CorsolaEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 7, HARDEN
- db 13, BUBBLE
- db 19, RECOVER
- db 25, BUBBLEBEAM
- db 31, SPIKE_CANNON
- db 37, MIRROR_COAT
- db 43, ANCIENTPOWER
- db 0 ; no more level-up moves
-
-RemoraidEvosAttacks:
- db EVOLVE_LEVEL, 25, OCTILLERY
- db 0 ; no more evolutions
- db 1, WATER_GUN
- db 11, LOCK_ON
- db 22, PSYBEAM
- db 22, AURORA_BEAM
- db 22, BUBBLEBEAM
- db 33, FOCUS_ENERGY
- db 44, ICE_BEAM
- db 55, HYPER_BEAM
- db 0 ; no more level-up moves
-
-OctilleryEvosAttacks:
- db 0 ; no more evolutions
- db 1, WATER_GUN
- db 11, CONSTRICT
- db 22, PSYBEAM
- db 22, AURORA_BEAM
- db 22, BUBBLEBEAM
- db 25, OCTAZOOKA
- db 38, FOCUS_ENERGY
- db 54, ICE_BEAM
- db 70, HYPER_BEAM
- db 0 ; no more level-up moves
-
-DelibirdEvosAttacks:
- db 0 ; no more evolutions
- db 1, PRESENT
- db 0 ; no more level-up moves
-
-MantineEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, BUBBLE
- db 10, SUPERSONIC
- db 18, BUBBLEBEAM
- db 25, TAKE_DOWN
- db 32, AGILITY
- db 40, WING_ATTACK
- db 49, CONFUSE_RAY
- db 0 ; no more level-up moves
-
-SkarmoryEvosAttacks:
- db 0 ; no more evolutions
- db 1, LEER
- db 1, PECK
- db 13, SAND_ATTACK
- db 19, SWIFT
- db 25, AGILITY
- db 37, FURY_ATTACK
- db 49, STEEL_WING
- db 0 ; no more level-up moves
-
-HoundourEvosAttacks:
- db EVOLVE_LEVEL, 24, HOUNDOOM
- db 0 ; no more evolutions
- db 1, LEER
- db 1, EMBER
- db 7, ROAR
- db 13, SMOG
- db 20, BITE
- db 27, FAINT_ATTACK
- db 35, FLAMETHROWER
- db 43, CRUNCH
- db 0 ; no more level-up moves
-
-HoundoomEvosAttacks:
- db 0 ; no more evolutions
- db 1, LEER
- db 1, EMBER
- db 7, ROAR
- db 13, SMOG
- db 20, BITE
- db 30, FAINT_ATTACK
- db 41, FLAMETHROWER
- db 52, CRUNCH
- db 0 ; no more level-up moves
-
-KingdraEvosAttacks:
- db 0 ; no more evolutions
- db 1, BUBBLE
- db 1, SMOKESCREEN
- db 1, LEER
- db 1, WATER_GUN
- db 8, SMOKESCREEN
- db 15, LEER
- db 22, WATER_GUN
- db 29, TWISTER
- db 40, AGILITY
- db 51, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-PhanpyEvosAttacks:
- db EVOLVE_LEVEL, 25, DONPHAN
- db 0 ; no more evolutions
- db 1, TACKLE
- db 1, GROWL
- db 9, DEFENSE_CURL
- db 17, FLAIL
- db 25, TAKE_DOWN
- db 33, ROLLOUT
- db 41, ENDURE
- db 49, DOUBLE_EDGE
- db 0 ; no more level-up moves
-
-DonphanEvosAttacks:
- db 0 ; no more evolutions
- db 1, HORN_ATTACK
- db 1, GROWL
- db 9, DEFENSE_CURL
- db 17, FLAIL
- db 25, FURY_ATTACK
- db 33, ROLLOUT
- db 41, RAPID_SPIN
- db 49, EARTHQUAKE
- db 0 ; no more level-up moves
-
-Porygon2EvosAttacks:
- db 0 ; no more evolutions
- db 1, CONVERSION2
- db 1, TACKLE
- db 1, CONVERSION
- db 9, AGILITY
- db 12, PSYBEAM
- db 20, RECOVER
- db 24, DEFENSE_CURL
- db 32, LOCK_ON
- db 36, TRI_ATTACK
- db 44, ZAP_CANNON
- db 0 ; no more level-up moves
-
-StantlerEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 8, LEER
- db 15, HYPNOSIS
- db 23, STOMP
- db 31, SAND_ATTACK
- db 40, TAKE_DOWN
- db 49, CONFUSE_RAY
- db 0 ; no more level-up moves
-
-SmeargleEvosAttacks:
- db 0 ; no more evolutions
- db 1, SKETCH
- db 11, SKETCH
- db 21, SKETCH
- db 31, SKETCH
- db 41, SKETCH
- db 51, SKETCH
- db 61, SKETCH
- db 71, SKETCH
- db 81, SKETCH
- db 91, SKETCH
- db 0 ; no more level-up moves
-
-TyrogueEvosAttacks:
- db EVOLVE_STAT, 20, ATK_LT_DEF, HITMONCHAN
- db EVOLVE_STAT, 20, ATK_GT_DEF, HITMONLEE
- db EVOLVE_STAT, 20, ATK_EQ_DEF, HITMONTOP
- db 0 ; no more evolutions
- db 1, TACKLE
- db 0 ; no more level-up moves
-
-HitmontopEvosAttacks:
- db 0 ; no more evolutions
- db 1, ROLLING_KICK
- db 7, FOCUS_ENERGY
- db 13, PURSUIT
- db 19, QUICK_ATTACK
- db 25, RAPID_SPIN
- db 31, COUNTER
- db 37, AGILITY
- db 43, DETECT
- db 49, TRIPLE_KICK
- db 0 ; no more level-up moves
-
-SmoochumEvosAttacks:
- db EVOLVE_LEVEL, 30, JYNX
- db 0 ; no more evolutions
- db 1, POUND
- db 1, LICK
- db 9, SWEET_KISS
- db 13, POWDER_SNOW
- db 21, CONFUSION
- db 25, SING
- db 33, MEAN_LOOK
- db 37, PSYCHIC_M
- db 45, PERISH_SONG
- db 49, BLIZZARD
- db 0 ; no more level-up moves
-
-ElekidEvosAttacks:
- db EVOLVE_LEVEL, 30, ELECTABUZZ
- db 0 ; no more evolutions
- db 1, QUICK_ATTACK
- db 1, LEER
- db 9, THUNDERPUNCH
- db 17, LIGHT_SCREEN
- db 25, SWIFT
- db 33, SCREECH
- db 41, THUNDERBOLT
- db 49, THUNDER
- db 0 ; no more level-up moves
-
-MagbyEvosAttacks:
- db EVOLVE_LEVEL, 30, MAGMAR
- db 0 ; no more evolutions
- db 1, EMBER
- db 7, LEER
- db 13, SMOG
- db 19, FIRE_PUNCH
- db 25, SMOKESCREEN
- db 31, SUNNY_DAY
- db 37, FLAMETHROWER
- db 43, CONFUSE_RAY
- db 49, FIRE_BLAST
- db 0 ; no more level-up moves
-
-MiltankEvosAttacks:
- db 0 ; no more evolutions
- db 1, TACKLE
- db 4, GROWL
- db 8, DEFENSE_CURL
- db 13, STOMP
- db 19, MILK_DRINK
- db 26, BIDE
- db 34, ROLLOUT
- db 43, BODY_SLAM
- db 53, HEAL_BELL
- db 0 ; no more level-up moves
-
-BlisseyEvosAttacks:
- db 0 ; no more evolutions
- db 1, POUND
- db 4, GROWL
- db 7, TAIL_WHIP
- db 10, SOFTBOILED
- db 13, DOUBLESLAP
- db 18, MINIMIZE
- db 23, SING
- db 28, EGG_BOMB
- db 33, DEFENSE_CURL
- db 40, LIGHT_SCREEN
- db 47, DOUBLE_EDGE
- db 0 ; no more level-up moves
-
-RaikouEvosAttacks:
- db 0 ; no more evolutions
- db 1, BITE
- db 1, LEER
- db 11, THUNDERSHOCK
- db 21, ROAR
- db 31, QUICK_ATTACK
- db 41, SPARK
- db 51, REFLECT
- db 61, CRUNCH
- db 71, THUNDER
- db 0 ; no more level-up moves
-
-EnteiEvosAttacks:
- db 0 ; no more evolutions
- db 1, BITE
- db 1, LEER
- db 11, EMBER
- db 21, ROAR
- db 31, FIRE_SPIN
- db 41, STOMP
- db 51, FLAMETHROWER
- db 61, SWAGGER
- db 71, FIRE_BLAST
- db 0 ; no more level-up moves
-
-SuicuneEvosAttacks:
- db 0 ; no more evolutions
- db 1, BITE
- db 1, LEER
-if _CRYSTAL
- db 11, BUBBLEBEAM
- db 21, RAIN_DANCE
- db 31, GUST
- db 41, AURORA_BEAM
-else
- db 11, WATER_GUN
- db 21, ROAR
- db 31, GUST
- db 41, BUBBLEBEAM
-endc
- db 51, MIST
- db 61, MIRROR_COAT
- db 71, HYDRO_PUMP
- db 0 ; no more level-up moves
-
-LarvitarEvosAttacks:
- db EVOLVE_LEVEL, 30, PUPITAR
- db 0 ; no more evolutions
- db 1, BITE
- db 1, LEER
- db 8, SANDSTORM
- db 15, SCREECH
- db 22, ROCK_SLIDE
- db 29, THRASH
- db 36, SCARY_FACE
- db 43, CRUNCH
- db 50, EARTHQUAKE
- db 57, HYPER_BEAM
- db 0 ; no more level-up moves
-
-PupitarEvosAttacks:
- db EVOLVE_LEVEL, 55, TYRANITAR
- db 0 ; no more evolutions
- db 1, BITE
- db 1, LEER
- db 1, SANDSTORM
- db 1, SCREECH
- db 8, SANDSTORM
- db 15, SCREECH
- db 22, ROCK_SLIDE
- db 29, THRASH
- db 38, SCARY_FACE
- db 47, CRUNCH
- db 56, EARTHQUAKE
- db 65, HYPER_BEAM
- db 0 ; no more level-up moves
-
-TyranitarEvosAttacks:
- db 0 ; no more evolutions
- db 1, BITE
- db 1, LEER
- db 1, SANDSTORM
- db 1, SCREECH
- db 8, SANDSTORM
- db 15, SCREECH
- db 22, ROCK_SLIDE
- db 29, THRASH
- db 38, SCARY_FACE
- db 47, CRUNCH
- db 61, EARTHQUAKE
- db 75, HYPER_BEAM
- db 0 ; no more level-up moves
-
-LugiaEvosAttacks:
- db 0 ; no more evolutions
- db 1, AEROBLAST
- db 11, SAFEGUARD
- db 22, GUST
- db 33, RECOVER
- db 44, HYDRO_PUMP
- db 55, RAIN_DANCE
- db 66, SWIFT
- db 77, WHIRLWIND
- db 88, ANCIENTPOWER
- db 99, FUTURE_SIGHT
- db 0 ; no more level-up moves
-
-HoOhEvosAttacks:
- db 0 ; no more evolutions
- db 1, SACRED_FIRE
- db 11, SAFEGUARD
- db 22, GUST
- db 33, RECOVER
- db 44, FIRE_BLAST
- db 55, SUNNY_DAY
- db 66, SWIFT
- db 77, WHIRLWIND
- db 88, ANCIENTPOWER
- db 99, FUTURE_SIGHT
- db 0 ; no more level-up moves
-
-CelebiEvosAttacks:
- db 0 ; no more evolutions
- db 1, LEECH_SEED
- db 1, CONFUSION
- db 1, RECOVER
- db 1, HEAL_BELL
- db 10, SAFEGUARD
- db 20, ANCIENTPOWER
- db 30, FUTURE_SIGHT
- db 40, BATON_PASS
- db 50, PERISH_SONG
- db 0 ; no more level-up moves
diff --git a/data/evos_attacks_pointers.asm b/data/evos_attacks_pointers.asm
deleted file mode 100644
index 4ce10b105..000000000
--- a/data/evos_attacks_pointers.asm
+++ /dev/null
@@ -1,256 +0,0 @@
-; Pointer table for evolutions and attacks.
-
-; These are grouped together since they're both checked at level-up.
-
-EvosAttacksPointers:: ; 0x425b1
- dw BulbasaurEvosAttacks
- dw IvysaurEvosAttacks
- dw VenusaurEvosAttacks
- dw CharmanderEvosAttacks
- dw CharmeleonEvosAttacks
- dw CharizardEvosAttacks
- dw SquirtleEvosAttacks
- dw WartortleEvosAttacks
- dw BlastoiseEvosAttacks
- dw CaterpieEvosAttacks
- dw MetapodEvosAttacks
- dw ButterfreeEvosAttacks
- dw WeedleEvosAttacks
- dw KakunaEvosAttacks
- dw BeedrillEvosAttacks
- dw PidgeyEvosAttacks
- dw PidgeottoEvosAttacks
- dw PidgeotEvosAttacks
- dw RattataEvosAttacks
- dw RaticateEvosAttacks
- dw SpearowEvosAttacks
- dw FearowEvosAttacks
- dw EkansEvosAttacks
- dw ArbokEvosAttacks
- dw PikachuEvosAttacks
- dw RaichuEvosAttacks
- dw SandshrewEvosAttacks
- dw SandslashEvosAttacks
- dw NidoranFEvosAttacks
- dw NidorinaEvosAttacks
- dw NidoqueenEvosAttacks
- dw NidoranMEvosAttacks
- dw NidorinoEvosAttacks
- dw NidokingEvosAttacks
- dw ClefairyEvosAttacks
- dw ClefableEvosAttacks
- dw VulpixEvosAttacks
- dw NinetalesEvosAttacks
- dw JigglypuffEvosAttacks
- dw WigglytuffEvosAttacks
- dw ZubatEvosAttacks
- dw GolbatEvosAttacks
- dw OddishEvosAttacks
- dw GloomEvosAttacks
- dw VileplumeEvosAttacks
- dw ParasEvosAttacks
- dw ParasectEvosAttacks
- dw VenonatEvosAttacks
- dw VenomothEvosAttacks
- dw DiglettEvosAttacks
- dw DugtrioEvosAttacks
- dw MeowthEvosAttacks
- dw PersianEvosAttacks
- dw PsyduckEvosAttacks
- dw GolduckEvosAttacks
- dw MankeyEvosAttacks
- dw PrimeapeEvosAttacks
- dw GrowlitheEvosAttacks
- dw ArcanineEvosAttacks
- dw PoliwagEvosAttacks
- dw PoliwhirlEvosAttacks
- dw PoliwrathEvosAttacks
- dw AbraEvosAttacks
- dw KadabraEvosAttacks
- dw AlakazamEvosAttacks
- dw MachopEvosAttacks
- dw MachokeEvosAttacks
- dw MachampEvosAttacks
- dw BellsproutEvosAttacks
- dw WeepinbellEvosAttacks
- dw VictreebelEvosAttacks
- dw TentacoolEvosAttacks
- dw TentacruelEvosAttacks
- dw GeodudeEvosAttacks
- dw GravelerEvosAttacks
- dw GolemEvosAttacks
- dw PonytaEvosAttacks
- dw RapidashEvosAttacks
- dw SlowpokeEvosAttacks
- dw SlowbroEvosAttacks
- dw MagnemiteEvosAttacks
- dw MagnetonEvosAttacks
- dw FarfetchDEvosAttacks
- dw DoduoEvosAttacks
- dw DodrioEvosAttacks
- dw SeelEvosAttacks
- dw DewgongEvosAttacks
- dw GrimerEvosAttacks
- dw MukEvosAttacks
- dw ShellderEvosAttacks
- dw CloysterEvosAttacks
- dw GastlyEvosAttacks
- dw HaunterEvosAttacks
- dw GengarEvosAttacks
- dw OnixEvosAttacks
- dw DrowzeeEvosAttacks
- dw HypnoEvosAttacks
- dw KrabbyEvosAttacks
- dw KinglerEvosAttacks
- dw VoltorbEvosAttacks
- dw ElectrodeEvosAttacks
- dw ExeggcuteEvosAttacks
- dw ExeggutorEvosAttacks
- dw CuboneEvosAttacks
- dw MarowakEvosAttacks
- dw HitmonleeEvosAttacks
- dw HitmonchanEvosAttacks
- dw LickitungEvosAttacks
- dw KoffingEvosAttacks
- dw WeezingEvosAttacks
- dw RhyhornEvosAttacks
- dw RhydonEvosAttacks
- dw ChanseyEvosAttacks
- dw TangelaEvosAttacks
- dw KangaskhanEvosAttacks
- dw HorseaEvosAttacks
- dw SeadraEvosAttacks
- dw GoldeenEvosAttacks
- dw SeakingEvosAttacks
- dw StaryuEvosAttacks
- dw StarmieEvosAttacks
- dw MrMimeEvosAttacks
- dw ScytherEvosAttacks
- dw JynxEvosAttacks
- dw ElectabuzzEvosAttacks
- dw MagmarEvosAttacks
- dw PinsirEvosAttacks
- dw TaurosEvosAttacks
- dw MagikarpEvosAttacks
- dw GyaradosEvosAttacks
- dw LaprasEvosAttacks
- dw DittoEvosAttacks
- dw EeveeEvosAttacks
- dw VaporeonEvosAttacks
- dw JolteonEvosAttacks
- dw FlareonEvosAttacks
- dw PorygonEvosAttacks
- dw OmanyteEvosAttacks
- dw OmastarEvosAttacks
- dw KabutoEvosAttacks
- dw KabutopsEvosAttacks
- dw AerodactylEvosAttacks
- dw SnorlaxEvosAttacks
- dw ArticunoEvosAttacks
- dw ZapdosEvosAttacks
- dw MoltresEvosAttacks
- dw DratiniEvosAttacks
- dw DragonairEvosAttacks
- dw DragoniteEvosAttacks
- dw MewtwoEvosAttacks
- dw MewEvosAttacks
- dw ChikoritaEvosAttacks
- dw BayleefEvosAttacks
- dw MeganiumEvosAttacks
- dw CyndaquilEvosAttacks
- dw QuilavaEvosAttacks
- dw TyphlosionEvosAttacks
- dw TotodileEvosAttacks
- dw CroconawEvosAttacks
- dw FeraligatrEvosAttacks
- dw SentretEvosAttacks
- dw FurretEvosAttacks
- dw HoothootEvosAttacks
- dw NoctowlEvosAttacks
- dw LedybaEvosAttacks
- dw LedianEvosAttacks
- dw SpinarakEvosAttacks
- dw AriadosEvosAttacks
- dw CrobatEvosAttacks
- dw ChinchouEvosAttacks
- dw LanturnEvosAttacks
- dw PichuEvosAttacks
- dw CleffaEvosAttacks
- dw IgglybuffEvosAttacks
- dw TogepiEvosAttacks
- dw TogeticEvosAttacks
- dw NatuEvosAttacks
- dw XatuEvosAttacks
- dw MareepEvosAttacks
- dw FlaaffyEvosAttacks
- dw AmpharosEvosAttacks
- dw BellossomEvosAttacks
- dw MarillEvosAttacks
- dw AzumarillEvosAttacks
- dw SudowoodoEvosAttacks
- dw PolitoedEvosAttacks
- dw HoppipEvosAttacks
- dw SkiploomEvosAttacks
- dw JumpluffEvosAttacks
- dw AipomEvosAttacks
- dw SunkernEvosAttacks
- dw SunfloraEvosAttacks
- dw YanmaEvosAttacks
- dw WooperEvosAttacks
- dw QuagsireEvosAttacks
- dw EspeonEvosAttacks
- dw UmbreonEvosAttacks
- dw MurkrowEvosAttacks
- dw SlowkingEvosAttacks
- dw MisdreavusEvosAttacks
- dw UnownEvosAttacks
- dw WobbuffetEvosAttacks
- dw GirafarigEvosAttacks
- dw PinecoEvosAttacks
- dw ForretressEvosAttacks
- dw DunsparceEvosAttacks
- dw GligarEvosAttacks
- dw SteelixEvosAttacks
- dw SnubbullEvosAttacks
- dw GranbullEvosAttacks
- dw QwilfishEvosAttacks
- dw ScizorEvosAttacks
- dw ShuckleEvosAttacks
- dw HeracrossEvosAttacks
- dw SneaselEvosAttacks
- dw TeddiursaEvosAttacks
- dw UrsaringEvosAttacks
- dw SlugmaEvosAttacks
- dw MagcargoEvosAttacks
- dw SwinubEvosAttacks
- dw PiloswineEvosAttacks
- dw CorsolaEvosAttacks
- dw RemoraidEvosAttacks
- dw OctilleryEvosAttacks
- dw DelibirdEvosAttacks
- dw MantineEvosAttacks
- dw SkarmoryEvosAttacks
- dw HoundourEvosAttacks
- dw HoundoomEvosAttacks
- dw KingdraEvosAttacks
- dw PhanpyEvosAttacks
- dw DonphanEvosAttacks
- dw Porygon2EvosAttacks
- dw StantlerEvosAttacks
- dw SmeargleEvosAttacks
- dw TyrogueEvosAttacks
- dw HitmontopEvosAttacks
- dw SmoochumEvosAttacks
- dw ElekidEvosAttacks
- dw MagbyEvosAttacks
- dw MiltankEvosAttacks
- dw BlisseyEvosAttacks
- dw RaikouEvosAttacks
- dw EnteiEvosAttacks
- dw SuicuneEvosAttacks
- dw LarvitarEvosAttacks
- dw PupitarEvosAttacks
- dw TyranitarEvosAttacks
- dw LugiaEvosAttacks
- dw HoOhEvosAttacks
- dw CelebiEvosAttacks
diff --git a/data/facings.asm b/data/facings.asm
new file mode 100644
index 000000000..4d2a55364
--- /dev/null
+++ b/data/facings.asm
@@ -0,0 +1,264 @@
+Facings: ; 4049
+; entries correspond to FACING_* constants
+ dw FacingStepDown0
+ dw FacingStepDown1
+ dw FacingStepDown2
+ dw FacingStepDown3
+ dw FacingStepUp0
+ dw FacingStepUp1
+ dw FacingStepUp2
+ dw FacingStepUp3
+ dw FacingStepLeft0
+ dw FacingStepLeft1
+ dw FacingStepLeft2
+ dw FacingStepLeft3
+ dw FacingStepRight0
+ dw FacingStepRight1
+ dw FacingStepRight2
+ dw FacingStepRight3
+ dw FacingFishDown
+ dw FacingFishUp
+ dw FacingFishLeft
+ dw FacingFishRight
+ dw FacingEmote
+ dw FacingShadow
+ dw FacingBigDollAsymmetric
+ dw FacingBigDollSymmetric
+ dw FacingWeirdTree0
+ dw FacingWeirdTree1
+ dw FacingWeirdTree2
+ dw FacingWeirdTree3
+ dw FacingBoulderDust1
+ dw FacingBoulderDust2
+ dw FacingGrass1
+ dw FacingGrass2
+FacingsEnd:
+ dw 0
+
+NUM_FACINGS EQU (FacingsEnd - Facings) / 2
+
+
+; Tables used as a reference to transform OAM data.
+
+; Format:
+; db y, x, attributes, tile index
+
+FacingStepDown0:
+FacingStepDown2:
+FacingWeirdTree0:
+FacingWeirdTree2: ; standing down
+ db 4 ; #
+ db 0, 0, 0, $00
+ db 0, 8, 0, $01
+ db 8, 0, 2, $02
+ db 8, 8, 2, $03
+; 409c
+
+FacingStepDown1: ; walking down 1
+ db 4 ; #
+ db 0, 0, 0, $80
+ db 0, 8, 0, $81
+ db 8, 0, 2, $82
+ db 8, 8, 2, $83
+; 40ad
+
+FacingStepDown3: ; walking down 2
+ db 4 ; #
+ db 0, 8, X_FLIP, $80
+ db 0, 0, X_FLIP, $81
+ db 8, 8, 2 | X_FLIP, $82
+ db 8, 0, 2 | X_FLIP, $83
+; 40be
+
+FacingStepUp0:
+FacingStepUp2: ; standing up
+ db 4 ; #
+ db 0, 0, 0, $04
+ db 0, 8, 0, $05
+ db 8, 0, 2, $06
+ db 8, 8, 2, $07
+; 40cf
+
+FacingStepUp1: ; walking up 1
+ db 4 ; #
+ db 0, 0, 0, $84
+ db 0, 8, 0, $85
+ db 8, 0, 2, $86
+ db 8, 8, 2, $87
+; 40e0
+
+FacingStepUp3: ; walking up 2
+ db 4 ; #
+ db 0, 8, X_FLIP, $84
+ db 0, 0, X_FLIP, $85
+ db 8, 8, 2 | X_FLIP, $86
+ db 8, 0, 2 | X_FLIP, $87
+; 40f1
+
+FacingStepLeft0:
+FacingStepLeft2: ; standing left
+ db 4 ; #
+ db 0, 0, 0, $08
+ db 0, 8, 0, $09
+ db 8, 0, 2, $0a
+ db 8, 8, 2, $0b
+; 4102
+
+FacingStepRight0:
+FacingStepRight2: ; standing right
+ db 4 ; #
+ db 0, 8, X_FLIP, $08
+ db 0, 0, X_FLIP, $09
+ db 8, 8, 2 | X_FLIP, $0a
+ db 8, 0, 2 | X_FLIP, $0b
+; 4113
+
+FacingStepLeft1:
+FacingStepLeft3: ; walking left
+ db 4 ; #
+ db 0, 0, 0, $88
+ db 0, 8, 0, $89
+ db 8, 0, 2, $8a
+ db 8, 8, 2, $8b
+; 4124
+
+FacingStepRight1:
+FacingStepRight3: ; walking right
+ db 4 ; #
+ db 0, 8, X_FLIP, $88
+ db 0, 0, X_FLIP, $89
+ db 8, 8, 2 | X_FLIP, $8a
+ db 8, 0, 2 | X_FLIP, $8b
+; 4135
+
+FacingFishDown: ; fishing down
+ db 5 ; #
+ db 0, 0, 0, $00
+ db 0, 8, 0, $01
+ db 8, 0, 2, $02
+ db 8, 8, 2, $03
+ db 16, 0, 4, $fc
+; 414a
+
+FacingFishUp: ; fishing up
+ db 5 ; #
+ db 0, 0, 0, $04
+ db 0, 8, 0, $05
+ db 8, 0, 2, $06
+ db 8, 8, 2, $07
+ db -8, 0, 4, $fc
+; 415f
+
+FacingFishLeft: ; fishing left
+ db 5 ; #
+ db 0, 0, 0, $08
+ db 0, 8, 0, $09
+ db 8, 0, 2, $0a
+ db 8, 8, 2, $0b
+ db 5, -8, 4 | X_FLIP, $fd
+; 4174
+
+FacingFishRight: ; fishing right
+ db 5 ; #
+ db 0, 8, X_FLIP, $08
+ db 0, 0, X_FLIP, $09
+ db 8, 8, 2 | X_FLIP, $0a
+ db 8, 0, 2 | X_FLIP, $0b
+ db 5, 16, 4, $fd
+; 4189
+
+FacingEmote: ; emote
+ db 4 ; #
+ db 0, 0, 4, $f8
+ db 0, 8, 4, $f9
+ db 8, 0, 4, $fa
+ db 8, 8, 4, $fb
+; 419a
+
+FacingShadow: ; shadow
+ db 2 ; #
+ db 0, 0, 4, $fc
+ db 0, 8, 4 | X_FLIP, $fc
+; 41a3
+
+FacingBigDollSymmetric: ; big snorlax or lapras doll
+ db 16 ; #
+ db 0, 0, 0, $00
+ db 0, 8, 0, $01
+ db 8, 0, 0, $02
+ db 8, 8, 0, $03
+ db 16, 0, 0, $04
+ db 16, 8, 0, $05
+ db 24, 0, 0, $06
+ db 24, 8, 0, $07
+ db 0, 24, X_FLIP, $00
+ db 0, 16, X_FLIP, $01
+ db 8, 24, X_FLIP, $02
+ db 8, 16, X_FLIP, $03
+ db 16, 24, X_FLIP, $04
+ db 16, 16, X_FLIP, $05
+ db 24, 24, X_FLIP, $06
+ db 24, 16, X_FLIP, $07
+; 41e4
+
+FacingWeirdTree1: ; 41e4
+ db 4 ; #
+ db 0, 0, 0, $04
+ db 0, 8, 0, $05
+ db 8, 0, 0, $06
+ db 8, 8, 0, $07
+; 41f5
+
+FacingWeirdTree3: ; 41f5
+ db 4 ; #
+ db 0, 8, X_FLIP, $04
+ db 0, 0, X_FLIP, $05
+ db 8, 8, X_FLIP, $06
+ db 8, 0, X_FLIP, $07
+; 4206
+
+FacingBigDollAsymmetric: ; big doll other than snorlax or lapras
+ db 14 ; #
+ db 0, 0, 0, $00
+ db 0, 8, 0, $01
+ db 8, 0, 0, $04
+ db 8, 8, 0, $05
+ db 16, 8, 0, $07
+ db 24, 8, 0, $0a
+ db 0, 24, 0, $03
+ db 0, 16, 0, $02
+ db 8, 24, X_FLIP, $02
+ db 8, 16, 0, $06
+ db 16, 24, 0, $09
+ db 16, 16, 0, $08
+ db 24, 24, X_FLIP, $04
+ db 24, 16, 0, $0b
+; 423f
+
+FacingBoulderDust1: ; boulder dust 1
+ db 4 ; #
+ db 0, 0, 4, $fe
+ db 0, 8, 4, $fe
+ db 8, 0, 4, $fe
+ db 8, 8, 4, $fe
+; 4250
+
+FacingBoulderDust2: ; boulder dust 2
+ db 4 ; #
+ db 0, 0, 4, $ff
+ db 0, 8, 4, $ff
+ db 8, 0, 4, $ff
+ db 8, 8, 4, $ff
+; 4261
+
+FacingGrass1: ; 4261
+ db 2 ; #
+ db 8, 0, 4, $fe
+ db 8, 8, 4 | X_FLIP, $fe
+; 426a
+
+FacingGrass2: ; 426a
+ db 2 ; #
+ db 9, -1, 4, $fe
+ db 9, 9, 4 | X_FLIP, $fe
+; 4273
diff --git a/data/field_move_blocks.asm b/data/field_move_blocks.asm
new file mode 100644
index 000000000..5e9bbc1f4
--- /dev/null
+++ b/data/field_move_blocks.asm
@@ -0,0 +1,53 @@
+CutTreeBlockPointers: ; c862
+; tileset, block list pointer
+ dbw TILESET_JOHTO_1, .johto1
+ dbw TILESET_JOHTO_2, .johto2
+ dbw TILESET_KANTO, .kanto
+ dbw TILESET_PARK, .park
+ dbw TILESET_ILEX_FOREST, .ilex
+ db -1
+
+.johto1 ; Johto OW
+; facing block, replacement block, animation
+ db $03, $02, $01 ; grass
+ db $5b, $3c, $00 ; tree
+ db $5f, $3d, $00 ; tree
+ db $63, $3f, $00 ; tree
+ db $67, $3e, $00 ; tree
+ db -1
+
+.johto2 ; Goldenrod area
+; facing block, replacement block, animation
+ db $03, $02, $01 ; grass
+ db -1
+
+.kanto ; Kanto OW
+; facing block, replacement block, animation
+ db $0b, $0a, $01 ; grass
+ db $32, $6d, $00 ; tree
+ db $33, $6c, $00 ; tree
+ db $34, $6f, $00 ; tree
+ db $35, $4c, $00 ; tree
+ db $60, $6e, $00 ; tree
+ db -1
+
+.park ; National Park
+; facing block, replacement block, animation
+ db $13, $03, $01 ; grass
+ db $03, $04, $01 ; grass
+ db -1
+
+.ilex ; Ilex Forest
+; facing block, replacement block, animation
+ db $0f, $17, $00
+ db -1
+
+
+WhirlpoolBlockPointers: ; c8a4
+ dbw TILESET_JOHTO_1, .johto
+ db -1
+
+.johto ; c8a8
+; facing block, replacement block, animation
+ db $07, $36, $00
+ db -1
diff --git a/data/flypoints.asm b/data/flypoints.asm
new file mode 100644
index 000000000..b41db0ea1
--- /dev/null
+++ b/data/flypoints.asm
@@ -0,0 +1,38 @@
+flypoint: MACRO
+ const FLY_\1
+ db \2, SPAWN_\1
+ENDM
+
+Flypoints: ; 91c5e
+; landmark, spawn point
+ const_def
+; Johto
+ flypoint NEW_BARK, NEW_BARK_TOWN
+ flypoint CHERRYGROVE, CHERRYGROVE_CITY
+ flypoint VIOLET, VIOLET_CITY
+ flypoint AZALEA, AZALEA_TOWN
+ flypoint GOLDENROD, GOLDENROD_CITY
+ flypoint ECRUTEAK, ECRUTEAK_CITY
+ flypoint OLIVINE, OLIVINE_CITY
+ flypoint CIANWOOD, CIANWOOD_CITY
+ flypoint MAHOGANY, MAHOGANY_TOWN
+ flypoint LAKE, LAKE_OF_RAGE
+ flypoint BLACKTHORN, BLACKTHORN_CITY
+ flypoint MT_SILVER, SILVER_CAVE
+
+; Kanto
+KANTO_FLYPOINT EQU const_value
+ flypoint PALLET, PALLET_TOWN
+ flypoint VIRIDIAN, VIRIDIAN_CITY
+ flypoint PEWTER, PEWTER_CITY
+ flypoint CERULEAN, CERULEAN_CITY
+ flypoint VERMILION, VERMILION_CITY
+ flypoint ROCK_TUNNEL, ROCK_TUNNEL
+ flypoint LAVENDER, LAVENDER_TOWN
+ flypoint CELADON, CELADON_CITY
+ flypoint SAFFRON, SAFFRON_CITY
+ flypoint FUCHSIA, FUCHSIA_CITY
+ flypoint CINNABAR, CINNABAR_ISLAND
+ flypoint INDIGO, INDIGO_PLATEAU
+ db -1
+; 91c8f
diff --git a/data/growth_rates.asm b/data/growth_rates.asm
new file mode 100644
index 000000000..4a1564515
--- /dev/null
+++ b/data/growth_rates.asm
@@ -0,0 +1,20 @@
+growth_rate: MACRO
+; [1]/[2]*n**3 + [3]*n**2 + [4]*n - [5]
+ dn \1, \2
+ if \3 & $80 ; signed
+ db -\3 | $80
+ else
+ db \3
+ endc
+ db \4, \5
+ENDM
+
+GrowthRates: ; 50efa
+; entries correspond to base growth rate constants (see constants/pokemon_data_constants.asm)
+ growth_rate 1, 1, 0, 0, 0 ; Medium Fast
+ growth_rate 3, 4, 10, 0, 30 ; Slightly Fast
+ growth_rate 3, 4, 20, 0, 70 ; Slightly Slow
+ growth_rate 6, 5, -15, 100, 140 ; Medium Slow
+ growth_rate 4, 5, 0, 0, 0 ; Fast
+ growth_rate 5, 4, 0, 0, 0 ; Slow
+; 50f12
diff --git a/data/happiness_changes.asm b/data/happiness_changes.asm
new file mode 100644
index 000000000..de60ea32d
--- /dev/null
+++ b/data/happiness_changes.asm
@@ -0,0 +1,22 @@
+HappinessChanges:
+; entries correspond to HAPPINESS_* constants
+; change if happiness < 100, change if happiness < 200, change otherwise
+ db +5, +3, +2 ; Gained a level
+ db +5, +3, +2 ; Vitamin
+ db +1, +1, +0 ; X Item
+ db +3, +2, +1 ; Battled a Gym Leader
+ db +1, +1, +0 ; Learned a move
+ db -1, -1, -1 ; Lost to an enemy
+ db -5, -5, -10 ; Fainted due to poison
+ db -5, -5, -10 ; Lost to a much stronger enemy
+ db +1, +1, +1 ; Haircut (Y1)
+ db +3, +3, +1 ; Haircut (Y2)
+ db +5, +5, +2 ; Haircut (Y3)
+ db +1, +1, +1 ; Haircut (O1)
+ db +3, +3, +1 ; Haircut (O2)
+ db +10, +10, +4 ; Haircut (O3)
+ db -5, -5, -10 ; Used Heal Powder or Energypowder (bitter)
+ db -10, -10, -15 ; Used Energy Root (bitter)
+ db -15, -15, -20 ; Used Revival Herb (bitter)
+ db +3, +3, +1 ; Grooming
+ db +10, +6, +4 ; Gained a level in the place where it was caught
diff --git a/data/items/bargain_shop.asm b/data/items/bargain_shop.asm
new file mode 100644
index 000000000..e4da96210
--- /dev/null
+++ b/data/items/bargain_shop.asm
@@ -0,0 +1,9 @@
+BargainShopData: ; 15c51
+ db 5
+ dbw NUGGET, 4500
+ dbw PEARL, 650
+ dbw BIG_PEARL, 3500
+ dbw STARDUST, 900
+ dbw STAR_PIECE, 4600
+ db -1
+; 15c62
diff --git a/data/items/buena_prizes.asm b/data/items/buena_prizes.asm
new file mode 100644
index 000000000..8aecf2bd0
--- /dev/null
+++ b/data/items/buena_prizes.asm
@@ -0,0 +1,13 @@
+BuenaPrizeItems: ; 8b15e
+; there are NUM_BUENA_PRIZES items (see event/buena.asm)
+ db ULTRA_BALL, 2
+ db FULL_RESTORE, 2
+ db NUGGET, 3
+ db RARE_CANDY, 3
+ db PROTEIN, 5
+ db IRON, 5
+ db CARBOS, 5
+ db CALCIUM, 5
+ db HP_UP, 5
+BuenaPrizeItemsEnd:
+; 8b170
diff --git a/data/items/fruit_trees.asm b/data/items/fruit_trees.asm
new file mode 100644
index 000000000..67b8f51ad
--- /dev/null
+++ b/data/items/fruit_trees.asm
@@ -0,0 +1,33 @@
+FruitTreeItems: ; 44097
+; entries correspond to FRUITTREE_* constants
+ db BERRY ; ROUTE_29
+ db BERRY ; ROUTE_30_1
+ db BERRY ; ROUTE_38
+ db BERRY ; ROUTE_46_1
+ db PSNCUREBERRY ; ROUTE_30_2
+ db PSNCUREBERRY ; ROUTE_33
+ db BITTER_BERRY ; ROUTE_31
+ db BITTER_BERRY ; ROUTE_43
+ db PRZCUREBERRY ; VIOLET_CITY
+ db PRZCUREBERRY ; ROUTE_46_2
+ db MYSTERYBERRY ; ROUTE_35
+ db MYSTERYBERRY ; ROUTE_45
+ db ICE_BERRY ; ROUTE_36
+ db ICE_BERRY ; ROUTE_26
+ db MINT_BERRY ; ROUTE_39
+ db BURNT_BERRY ; ROUTE_44
+ db RED_APRICORN ; ROUTE_37_1
+ db BLU_APRICORN ; ROUTE_37_2
+ db BLK_APRICORN ; ROUTE_37_3
+ db WHT_APRICORN ; AZALEA_TOWN
+ db PNK_APRICORN ; ROUTE_42_1
+ db GRN_APRICORN ; ROUTE_42_2
+ db YLW_APRICORN ; ROUTE_42_3
+ db BERRY ; ROUTE_11
+ db PSNCUREBERRY ; ROUTE_2
+ db BITTER_BERRY ; ROUTE_1
+ db PRZCUREBERRY ; ROUTE_8
+ db ICE_BERRY ; PEWTER_CITY_1
+ db MINT_BERRY ; PEWTER_CITY_2
+ db BURNT_BERRY ; FUCHSIA_CITY
+; 440b5
diff --git a/data/items/item_attributes.asm b/data/items/item_attributes.asm
new file mode 100644
index 000000000..dc2842760
--- /dev/null
+++ b/data/items/item_attributes.asm
@@ -0,0 +1,521 @@
+item_attribute: MACRO
+; price, held effect, parameter, property, pocket, field menu, battle menu
+ dw \1
+ db \2, \3, \4, \5
+ dn \6, \7
+ENDM
+
+ItemAttributes: ; 67c1
+; entries correspond to constants/item_constants.asm
+; MASTER BALL
+ item_attribute 0, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; ULTRA BALL
+ item_attribute 1200, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; BRIGHTPOWDER
+ item_attribute 10, HELD_BRIGHTPOWDER, 20, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; GREAT BALL
+ item_attribute 600, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; # BALL
+ item_attribute 200, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BICYCLE
+ item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
+; MOON STONE
+ item_attribute 0, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; ANTIDOTE
+ item_attribute 100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; BURN HEAL
+ item_attribute 250, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; ICE HEAL
+ item_attribute 250, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; AWAKENING
+ item_attribute 250, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; PARLYZ HEAL
+ item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; FULL RESTORE
+ item_attribute 3000, 0, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; MAX POTION
+ item_attribute 2500, 0, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; HYPER POTION
+ item_attribute 1200, 0, 200, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; SUPER POTION
+ item_attribute 700, 0, 50, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; POTION
+ item_attribute 300, 0, 20, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; ESCAPE ROPE
+ item_attribute 550, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
+; REPEL
+ item_attribute 350, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
+; MAX ELIXER
+ item_attribute 4500, 0, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; FIRE STONE
+ item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; THUNDERSTONE
+ item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; WATER STONE
+ item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; HP UP
+ item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; PROTEIN
+ item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; IRON
+ item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; CARBOS
+ item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; LUCKY PUNCH
+ item_attribute 10, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; CALCIUM
+ item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; RARE CANDY
+ item_attribute 4800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; X ACCURACY
+ item_attribute 950, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; LEAF STONE
+ item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; METAL POWDER
+ item_attribute 10, HELD_METAL_POWDER, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; NUGGET
+ item_attribute 10000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; # DOLL
+ item_attribute 1000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; FULL HEAL
+ item_attribute 600, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; REVIVE
+ item_attribute 1500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; MAX REVIVE
+ item_attribute 4000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; GUARD SPEC.
+ item_attribute 700, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; SUPER REPEL
+ item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
+; MAX REPEL
+ item_attribute 700, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
+; DIRE HIT
+ item_attribute 650, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; FRESH WATER
+ item_attribute 200, 0, 50, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; SODA POP
+ item_attribute 300, 0, 60, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; LEMONADE
+ item_attribute 350, 0, 80, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; X ATTACK
+ item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; X DEFEND
+ item_attribute 550, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; X SPEED
+ item_attribute 350, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; X SPECIAL
+ item_attribute 350, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; COIN CASE
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
+; ITEMFINDER
+ item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; EXP.SHARE
+ item_attribute 3000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; OLD ROD
+ item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
+; GOOD ROD
+ item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
+; SILVER LEAF
+ item_attribute 1000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; SUPER ROD
+ item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
+; PP UP
+ item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; ETHER
+ item_attribute 1200, 0, 10, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; MAX ETHER
+ item_attribute 2000, 0, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; ELIXER
+ item_attribute 3000, 0, 10, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; RED SCALE
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; SECRETPOTION
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; S.S.TICKET
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; MYSTERY EGG
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; CLEAR BELL
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; SILVER WING
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; MOOMOO MILK
+ item_attribute 500, 0, 100, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; QUICK CLAW
+ item_attribute 100, HELD_QUICK_CLAW, 60, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; PSNCUREBERRY
+ item_attribute 10, HELD_HEAL_POISON, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; GOLD LEAF
+ item_attribute 1000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; SOFT SAND
+ item_attribute 100, HELD_GROUND_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; SHARP BEAK
+ item_attribute 100, HELD_FLYING_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; PRZCUREBERRY
+ item_attribute 10, HELD_HEAL_PARALYZE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; BURNT BERRY
+ item_attribute 10, HELD_HEAL_FREEZE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; ICE BERRY
+ item_attribute 10, HELD_HEAL_BURN, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; POISON BARB
+ item_attribute 100, HELD_POISON_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; KING'S ROCK
+ item_attribute 100, HELD_FLINCH, 30, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BITTER BERRY
+ item_attribute 10, HELD_HEAL_CONFUSION, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_PARTY
+; MINT BERRY
+ item_attribute 10, HELD_HEAL_SLEEP, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; RED APRICORN
+ item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TINYMUSHROOM
+ item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BIG MUSHROOM
+ item_attribute 5000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; SILVERPOWDER
+ item_attribute 100, HELD_BUG_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BLU APRICORN
+ item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; AMULET COIN
+ item_attribute 100, HELD_AMULET_COIN, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; YLW APRICORN
+ item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; GRN APRICORN
+ item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; CLEANSE TAG
+ item_attribute 200, HELD_CLEANSE_TAG, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; MYSTIC WATER
+ item_attribute 100, HELD_WATER_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TWISTEDSPOON
+ item_attribute 100, HELD_PSYCHIC_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; WHT APRICORN
+ item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BLACKBELT
+ item_attribute 100, HELD_FIGHTING_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BLK APRICORN
+ item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; PNK APRICORN
+ item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BLACKGLASSES
+ item_attribute 100, HELD_DARK_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; SLOWPOKETAIL
+ item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; PINK BOW
+ item_attribute 100, HELD_NORMAL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; STICK
+ item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; SMOKE BALL
+ item_attribute 200, HELD_ESCAPE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; NEVERMELTICE
+ item_attribute 100, HELD_ICE_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; MAGNET
+ item_attribute 100, HELD_ELECTRIC_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; MIRACLEBERRY
+ item_attribute 10, HELD_HEAL_STATUS, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; PEARL
+ item_attribute 1400, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BIG PEARL
+ item_attribute 7500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; EVERSTONE
+ item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; SPELL TAG
+ item_attribute 100, HELD_GHOST_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; RAGECANDYBAR
+ item_attribute 300, 0, 20, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; GS BALL
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BLUE CARD
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
+; MIRACLE SEED
+ item_attribute 100, HELD_GRASS_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; THICK CLUB
+ item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; FOCUS BAND
+ item_attribute 200, HELD_FOCUS_BAND, 30, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; ENERGYPOWDER
+ item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; ENERGY ROOT
+ item_attribute 800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; HEAL POWDER
+ item_attribute 450, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; REVIVAL HERB
+ item_attribute 2800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; HARD STONE
+ item_attribute 100, HELD_ROCK_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; LUCKY EGG
+ item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; CARD KEY
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
+; MACHINE PART
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; EGG TICKET
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; LOST ITEM
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; STARDUST
+ item_attribute 2000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; STAR PIECE
+ item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BASEMENT KEY
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
+; PASS
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; CHARCOAL
+ item_attribute 9800, HELD_FIRE_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BERRY JUICE
+ item_attribute 100, HELD_BERRY, 20, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; SCOPE LENS
+ item_attribute 200, HELD_CRITICAL_UP, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; METAL COAT
+ item_attribute 100, HELD_STEEL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; DRAGON FANG
+ item_attribute 100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; LEFTOVERS
+ item_attribute 200, HELD_LEFTOVERS, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; MYSTERYBERRY
+ item_attribute 10, HELD_RESTORE_PP, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; DRAGON SCALE
+ item_attribute 2100, HELD_DRAGON_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BERSERK GENE
+ item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; SACRED ASH
+ item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
+; HEAVY BALL
+ item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; FLOWER MAIL
+ item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; LEVEL BALL
+ item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; LURE BALL
+ item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; FAST BALL
+ item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; LIGHT BALL
+ item_attribute 100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; FRIEND BALL
+ item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; MOON BALL
+ item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; LOVE BALL
+ item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; NORMAL BOX
+ item_attribute 10, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
+; GORGEOUS BOX
+ item_attribute 10, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
+; SUN STONE
+ item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; POLKADOT BOW
+ item_attribute 100, HELD_NORMAL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; UP-GRADE
+ item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BERRY
+ item_attribute 10, HELD_BERRY, 10, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; GOLD BERRY
+ item_attribute 10, HELD_BERRY, 30, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
+; SQUIRTBOTTLE
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; PARK BALL
+ item_attribute 0, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
+; RAINBOW WING
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BRICK PIECE
+ item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; SURF MAIL
+ item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; LITEBLUEMAIL
+ item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; PORTRAITMAIL
+ item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; LOVELY MAIL
+ item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; EON MAIL
+ item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; MORPH MAIL
+ item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; BLUESKY MAIL
+ item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; MUSIC MAIL
+ item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; MIRAGE MAIL
+ item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TM01
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM02
+ item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM03
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM04
+ item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TM05
+ item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM06
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM07
+ item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM08
+ item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM09
+ item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM10
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM11
+ item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM12
+ item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM13
+ item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM14
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM15
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM16
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM17
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM18
+ item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM19
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM20
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM21
+ item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM22
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM23
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM24
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM25
+ item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM26
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM27
+ item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM28
+ item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TM29
+ item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM30
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM31
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM32
+ item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM33
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM34
+ item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM35
+ item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM36
+ item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM37
+ item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM38
+ item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM39
+ item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM40
+ item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM41
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM42
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM43
+ item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM44
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM45
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM46
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM47
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM48
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM49
+ item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TM50
+ item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; HM01
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; HM02
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; HM03
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; HM04
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; HM05
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; HM06
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; HM07
+ item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; TERU-SAMA
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+; ?
+ item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
diff --git a/data/items/item_descriptions.asm b/data/items/item_descriptions.asm
new file mode 100644
index 000000000..e5b01e8fd
--- /dev/null
+++ b/data/items/item_descriptions.asm
@@ -0,0 +1,1042 @@
+PrintItemDescription: ; 0x1c8955
+; Print the description for item [CurSpecies] at de.
+
+ ld a, [CurSpecies]
+ cp TM01
+ jr c, .not_a_tm
+
+ ld [CurItem], a
+ push de
+ farcall GetTMHMItemMove
+ pop hl
+ ld a, [wd265]
+ ld [CurSpecies], a
+ predef PrintMoveDesc
+ ret
+
+.not_a_tm
+ push de
+ ld hl, ItemDescriptions
+ ld a, [CurSpecies]
+ dec a
+ ld c, a
+ ld b, 0
+ add hl, bc
+ add hl, bc
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ pop hl
+ jp PlaceString
+; 0x1c8987
+
+
+ItemDescriptions:
+ dw MasterBallDesc
+ dw UltraBallDesc
+ dw BrightpowderDesc
+ dw GreatBallDesc
+ dw PokeBallDesc
+ dw TeruSama1Desc
+ dw BicycleDesc
+ dw MoonStoneDesc
+ dw AntidoteDesc
+ dw BurnHealDesc
+ dw IceHealDesc
+ dw AwakeningDesc
+ dw ParlyzHealDesc
+ dw FullRestoreDesc
+ dw MaxPotionDesc
+ dw HyperPotionDesc
+ dw SuperPotionDesc
+ dw PotionDesc
+ dw EscapeRopeDesc
+ dw RepelDesc
+ dw MaxElixerDesc
+ dw FireStoneDesc
+ dw ThunderStoneDesc
+ dw WaterStoneDesc
+ dw TeruSama2Desc
+ dw HPUpDesc
+ dw ProteinDesc
+ dw IronDesc
+ dw CarbosDesc
+ dw LuckyPunchDesc
+ dw CalciumDesc
+ dw RareCandyDesc
+ dw XAccuracyDesc
+ dw LeafStoneDesc
+ dw MetalPowderDesc
+ dw NuggetDesc
+ dw PokeDollDesc
+ dw FullHealDesc
+ dw ReviveDesc
+ dw MaxReviveDesc
+ dw GuardSpecDesc
+ dw SuperRepelDesc
+ dw MaxRepelDesc
+ dw DireHitDesc
+ dw TeruSama3Desc
+ dw FreshWaterDesc
+ dw SodaPopDesc
+ dw LemonadeDesc
+ dw XAttackDesc
+ dw TeruSama4Desc
+ dw XDefendDesc
+ dw XSpeedDesc
+ dw XSpecialDesc
+ dw CoinCaseDesc
+ dw ItemfinderDesc
+ dw TeruSama5Desc
+ dw ExpShareDesc
+ dw OldRodDesc
+ dw GoodRodDesc
+ dw SilverLeafDesc
+ dw SuperRodDesc
+ dw PPUpDesc
+ dw EtherDesc
+ dw MaxEtherDesc
+ dw ElixerDesc
+ dw RedScaleDesc
+ dw SecretPotionDesc
+ dw SSTicketDesc
+ dw MysteryEggDesc
+ dw ClearBellDesc
+ dw SilverWingDesc
+ dw MoomooMilkDesc
+ dw QuickClawDesc
+ dw PsnCureBerryDesc
+ dw GoldLeafDesc
+ dw SoftSandDesc
+ dw SharpBeakDesc
+ dw PrzCureBerryDesc
+ dw BurntBerryDesc
+ dw IceBerryDesc
+ dw PoisonBarbDesc
+ dw KingsRockDesc
+ dw BitterBerryDesc
+ dw MintBerryDesc
+ dw RedApricornDesc
+ dw TinyMushroomDesc
+ dw BigMushroomDesc
+ dw SilverPowderDesc
+ dw BluApricornDesc
+ dw TeruSama6Desc
+ dw AmuletCoinDesc
+ dw YlwApricornDesc
+ dw GrnApricornDesc
+ dw CleanseTagDesc
+ dw MysticWaterDesc
+ dw TwistedSpoonDesc
+ dw WhtApricornDesc
+ dw BlackbeltDesc
+ dw BlkApricornDesc
+ dw TeruSama7Desc
+ dw PnkApricornDesc
+ dw BlackGlassesDesc
+ dw SlowpokeTailDesc
+ dw PinkBowDesc
+ dw StickDesc
+ dw SmokeBallDesc
+ dw NeverMeltIceDesc
+ dw MagnetDesc
+ dw MiracleBerryDesc
+ dw PearlDesc
+ dw BigPearlDesc
+ dw EverStoneDesc
+ dw SpellTagDesc
+ dw RageCandyBarDesc
+ dw GSBallDesc
+ dw BlueCardDesc
+ dw MiracleSeedDesc
+ dw ThickClubDesc
+ dw FocusBandDesc
+ dw TeruSama8Desc
+ dw EnergyPowderDesc
+ dw EnergyRootDesc
+ dw HealPowderDesc
+ dw RevivalHerbDesc
+ dw HardStoneDesc
+ dw LuckyEggDesc
+ dw CardKeyDesc
+ dw MachinePartDesc
+ dw EggTicketDesc
+ dw LostItemDesc
+ dw StardustDesc
+ dw StarPieceDesc
+ dw BasementKeyDesc
+ dw PassDesc
+ dw TeruSama9Desc
+ dw TeruSama10Desc
+ dw TeruSama11Desc
+ dw CharcoalDesc
+ dw BerryJuiceDesc
+ dw ScopeLensDesc
+ dw TeruSama12Desc
+ dw TeruSama13Desc
+ dw MetalCoatDesc
+ dw DragonFangDesc
+ dw TeruSama14Desc
+ dw LeftoversDesc
+ dw TeruSama15Desc
+ dw TeruSama16Desc
+ dw TeruSama17Desc
+ dw MysteryBerryDesc
+ dw DragonScaleDesc
+ dw BerserkGeneDesc
+ dw TeruSama18Desc
+ dw TeruSama19Desc
+ dw TeruSama20Desc
+ dw SacredAshDesc
+ dw HeavyBallDesc
+ dw FlowerMailDesc
+ dw LevelBallDesc
+ dw LureBallDesc
+ dw FastBallDesc
+ dw TeruSama21Desc
+ dw LightBallDesc
+ dw FriendBallDesc
+ dw MoonBallDesc
+ dw LoveBallDesc
+ dw NormalBoxDesc
+ dw GorgeousBoxDesc
+ dw SunStoneDesc
+ dw PolkadotBowDesc
+ dw TeruSama22Desc
+ dw UpGradeDesc
+ dw BerryDesc
+ dw GoldBerryDesc
+ dw SquirtBottleDesc
+ dw TeruSama23Desc
+ dw ParkBallDesc
+ dw RainbowWingDesc
+ dw TeruSama24Desc
+ dw BrickPieceDesc
+ dw SurfMailDesc
+ dw LiteBlueMailDesc
+ dw PortraitMailDesc
+ dw LovelyMailDesc
+ dw EonMailDesc
+ dw MorphMailDesc
+ dw BlueSkyMailDesc
+ dw MusicMailDesc
+ dw MewMailDesc
+ dw TeruSama25Desc
+ dw TeruSama26Desc
+ dw TeruSama26Desc
+ dw TeruSama26Desc
+ dw TeruSama26Desc
+ dw TeruSama26Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama27Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama28Desc
+ dw TeruSama29Desc
+ dw TeruSama30Desc
+ dw TeruSama31Desc
+ dw TeruSama32Desc
+ dw TeruSama33Desc
+
+MasterBallDesc:
+ db "The best BALL. It"
+ next "never misses.@"
+
+UltraBallDesc:
+ db "A BALL with a high"
+ next "rate of success.@"
+
+BrightpowderDesc:
+ db "Lowers the foe's"
+ next "accuracy. (HOLD)@"
+
+GreatBallDesc:
+ db "A BALL with a de-"
+ next "cent success rate.@"
+
+PokeBallDesc:
+ db "An item for catch-"
+ next "ing #MON.@"
+
+TeruSama1Desc:
+ db "?@"
+
+BicycleDesc:
+ db "A collapsible bike"
+ next "for fast movement.@"
+
+MoonStoneDesc:
+ db "Evolves certain"
+ next "kinds of #MON.@"
+
+AntidoteDesc:
+ db "Cures poisoned"
+ next "#MON.@"
+
+BurnHealDesc:
+ db "Heals burned"
+ next "#MON.@"
+
+IceHealDesc:
+ db "Defrosts frozen"
+ next "#MON.@"
+
+AwakeningDesc:
+ db "Awakens sleeping"
+ next "#MON.@"
+
+ParlyzHealDesc:
+ db "Heals paralyzed"
+ next "#MON.@"
+
+FullRestoreDesc:
+ db "Fully restores HP"
+ next "& status.@"
+
+MaxPotionDesc:
+ db "Fully restores"
+ next "#MON HP.@"
+
+HyperPotionDesc:
+ db "Restores #MON"
+ next "HP by 200.@"
+
+SuperPotionDesc:
+ db "Restores #MON"
+ next "HP by 50.@"
+
+PotionDesc:
+ db "Restores #MON"
+ next "HP by 20.@"
+
+EscapeRopeDesc:
+ db "Use for escaping"
+ next "from caves, etc.@"
+
+RepelDesc:
+ db "Repels weak #-"
+ next "MON for 100 steps.@"
+
+MaxElixerDesc:
+ db "Fully restores the"
+ next "PP of one #MON.@"
+
+FireStoneDesc:
+ db "Evolves certain"
+ next "kinds of #MON.@"
+
+ThunderStoneDesc:
+ db "Evolves certain"
+ next "kinds of #MON.@"
+
+WaterStoneDesc:
+ db "Evolves certain"
+ next "kinds of #MON.@"
+
+TeruSama2Desc:
+ db "?@"
+
+HPUpDesc:
+ db "Raises the HP of"
+ next "one #MON.@"
+
+ProteinDesc:
+ db "Raises ATTACK of"
+ next "one #MON.@"
+
+IronDesc:
+ db "Raises DEFENSE of"
+ next "one #MON.@"
+
+CarbosDesc:
+ db "Raises SPEED of"
+ next "one #MON.@"
+
+LuckyPunchDesc:
+ db "Ups critical hit"
+ next "ratio of CHANSEY.@"
+
+CalciumDesc:
+ db "Ups SPECIAL stats"
+ next "of one #MON.@"
+
+RareCandyDesc:
+ db "Raises level of a"
+ next "#MON by one.@"
+
+XAccuracyDesc:
+ db "Raises accuracy."
+ next "(1 BTL)@"
+
+LeafStoneDesc:
+ db "Evolves certain"
+ next "kinds of #MON.@"
+
+MetalPowderDesc:
+ db "Raises DEFENSE of"
+ next "DITTO. (HOLD)@"
+
+NuggetDesc:
+ db "Made of pure gold."
+ next "Sell high.@"
+
+PokeDollDesc:
+ db "Use to escape from"
+ next "a wild #MON.@"
+
+FullHealDesc:
+ db "Eliminates all"
+ next "status problems.@"
+
+ReviveDesc:
+ db "Restores a fainted"
+ next "#MON to 1/2 HP.@"
+
+MaxReviveDesc:
+ db "Fully restores a"
+ next "fainted #MON.@"
+
+GuardSpecDesc:
+ db "Prevents stats"
+ next "reduction. (1 BTL)@"
+
+SuperRepelDesc:
+ db "Repels weak #-"
+ next "MON for 200 steps.@"
+
+MaxRepelDesc:
+ db "Repels weak #-"
+ next "MON for 250 steps.@"
+
+DireHitDesc:
+ db "Ups critical hit"
+ next "ratio. (1 BTL)@"
+
+TeruSama3Desc:
+ db "?@"
+
+FreshWaterDesc:
+ db "Restores #MON"
+ next "HP by 50.@"
+
+SodaPopDesc:
+ db "Restores #MON"
+ next "HP by 60.@"
+
+LemonadeDesc:
+ db "Restores #MON"
+ next "HP by 80.@"
+
+XAttackDesc:
+ db "Raises ATTACK."
+ next "(1 BTL)@"
+
+TeruSama4Desc:
+ db "?@"
+
+XDefendDesc:
+ db "Raises DEFENSE."
+ next "(1 BTL)@"
+
+XSpeedDesc:
+ db "Raises SPEED."
+ next "(1 BTL)@"
+
+XSpecialDesc:
+ db "Raises SPECIAL"
+ next "ATTACK. (1 BTL)@"
+
+CoinCaseDesc:
+ db "Holds up to 9,999"
+ next "game coins.@"
+
+ItemfinderDesc:
+ db "Checks for unseen"
+ next "items in the area.@"
+
+TeruSama5Desc:
+ db "?@"
+
+ExpShareDesc:
+ db "Shares battle EXP."
+ next "Points. (HOLD)@"
+
+OldRodDesc:
+ db "Use by water to"
+ next "fish for #MON.@"
+
+GoodRodDesc:
+ db "A good ROD for"
+ next "catching #MON.@"
+
+SilverLeafDesc:
+ db "A strange, silver-"
+ next "colored leaf.@"
+
+SuperRodDesc:
+ db "The best ROD for"
+ next "catching #MON.@"
+
+PPUpDesc:
+ db "Raises max PP of"
+ next "a selected move.@"
+
+EtherDesc:
+ db "Restores PP of one"
+ next "move by 10.@"
+
+MaxEtherDesc:
+ db "Fully restores PP"
+ next "of one move.@"
+
+ElixerDesc:
+ db "Restores PP of all"
+ next "moves by 10.@"
+
+RedScaleDesc:
+ db "A scale from the"
+ next "red GYARADOS.@"
+
+SecretPotionDesc:
+ db "Fully heals any"
+ next "#MON.@"
+
+SSTicketDesc:
+ db "A ticket for the"
+ next "S.S.AQUA.@"
+
+MysteryEggDesc:
+ db "An EGG obtained"
+ next "from MR.#MON.@"
+
+ClearBellDesc:
+ db "Makes a gentle"
+ next "ringing.@"
+
+SilverWingDesc:
+ db "A strange, silver-"
+ next "colored feather.@"
+
+MoomooMilkDesc:
+ db "Restores #MON"
+ next "HP by 100.@"
+
+QuickClawDesc:
+ db "Raises 1st strike"
+ next "ratio. (HOLD)@"
+
+PsnCureBerryDesc:
+ db "A self-cure for"
+ next "poison. (HOLD)@"
+
+GoldLeafDesc:
+ db "A strange, gold-"
+ next "colored leaf.@"
+
+SoftSandDesc:
+ db "Powers up ground-"
+ next "type moves. (HOLD)@"
+
+SharpBeakDesc:
+ db "Powers up flying-"
+ next "type moves. (HOLD)@"
+
+PrzCureBerryDesc:
+ db "A self-cure for"
+ next "paralysis. (HOLD)@"
+
+BurntBerryDesc:
+ db "A self-cure for"
+ next "freezing. (HOLD)@"
+
+IceBerryDesc:
+ db "A self-heal for a"
+ next "burn. (HOLD)@"
+
+PoisonBarbDesc:
+ db "Powers up poison-"
+ next "type moves. (HOLD)@"
+
+KingsRockDesc:
+ db "May make the foe"
+ next "flinch. (HOLD)@"
+
+BitterBerryDesc:
+ db "A self-cure for"
+ next "confusion. (HOLD)@"
+
+MintBerryDesc:
+ db "A self-awakening"
+ next "for sleep. (HOLD)@"
+
+RedApricornDesc:
+ db "A red APRICORN.@"
+
+TinyMushroomDesc:
+ db "An ordinary mush-"
+ next "room. Sell low.@"
+
+BigMushroomDesc:
+ db "A rare mushroom."
+ next "Sell high.@"
+
+SilverPowderDesc:
+ db "Powers up bug-type"
+ next "moves. (HOLD)@"
+
+BluApricornDesc:
+ db "A blue APRICORN.@"
+
+TeruSama6Desc:
+ db "?@"
+
+AmuletCoinDesc:
+ db "Doubles monetary"
+ next "earnings. (HOLD)@"
+
+YlwApricornDesc:
+ db "A yellow APRICORN.@"
+
+GrnApricornDesc:
+ db "A green APRICORN.@"
+
+CleanseTagDesc:
+ db "Helps repel wild"
+ next "#MON. (HOLD)@"
+
+MysticWaterDesc:
+ db "Powers up water-"
+ next "type moves. (HOLD)@"
+
+TwistedSpoonDesc:
+ db "Powers up psychic-"
+ next "type moves. (HOLD)@"
+
+WhtApricornDesc:
+ db "A white APRICORN.@"
+
+BlackbeltDesc:
+ db "Boosts fighting-"
+ next "type moves. (HOLD)@"
+
+BlkApricornDesc:
+ db "A black APRICORN."
+ next "@"
+
+TeruSama7Desc:
+ db "?@"
+
+PnkApricornDesc:
+ db "A pink APRICORN."
+ next "@"
+
+BlackGlassesDesc:
+ db "Powers up dark-"
+ next "type moves. (HOLD)@"
+
+SlowpokeTailDesc:
+ db "Very tasty. Sell"
+ next "high.@"
+
+PinkBowDesc:
+ db "Powers up normal-"
+ next "type moves. (HOLD)@"
+
+StickDesc:
+ db "An ordinary stick."
+ next "Sell low.@"
+
+SmokeBallDesc:
+ db "Escape from wild"
+ next "#MON. (HOLD)@"
+
+NeverMeltIceDesc:
+ db "Powers up ice-type"
+ next "moves. (HOLD)@"
+
+MagnetDesc:
+ db "Boosts electric-"
+ next "type moves. (HOLD)@"
+
+MiracleBerryDesc:
+ db "Cures all status"
+ next "problems. (HOLD)@"
+
+PearlDesc:
+ db "A beautiful pearl."
+ next "Sell low.@"
+
+BigPearlDesc:
+ db "A big, beautiful"
+ next "pearl. Sell high.@"
+
+EverStoneDesc:
+ db "Stops evolution."
+ next "(HOLD)@"
+
+SpellTagDesc:
+ db "Powers up ghost-"
+ next "type moves. (HOLD)@"
+
+RageCandyBarDesc:
+ db "Restores #MON"
+ next "HP by 20.@"
+
+GSBallDesc:
+ db "The mysterious"
+ next "BALL.@"
+
+BlueCardDesc:
+ db "Card to save"
+ next "points.@"
+
+MiracleSeedDesc:
+ db "Powers up grass-"
+ next "type moves. (HOLD)@"
+
+ThickClubDesc:
+ db "A bone of some"
+ next "sort. Sell low.@"
+
+FocusBandDesc:
+ db "May prevent faint-"
+ next "ing. (HOLD)@"
+
+TeruSama8Desc:
+ db "?@"
+
+EnergyPowderDesc:
+ db "Restores #MON"
+ next "HP by 50. Bitter.@"
+
+EnergyRootDesc:
+ db "Restores #MON"
+ next "HP by 200. Bitter.@"
+
+HealPowderDesc:
+ db "Cures all status"
+ next "problems. Bitter.@"
+
+RevivalHerbDesc:
+ db "Revives fainted"
+ next "#MON. Bitter.@"
+
+HardStoneDesc:
+ db "Powers up rock-"
+ next "type moves. (HOLD)@"
+
+LuckyEggDesc:
+ db "Earns extra EXP."
+ next "points. (HOLD)@"
+
+CardKeyDesc:
+ db "Opens shutters in"
+ next "the RADIO TOWER.@"
+
+MachinePartDesc:
+ db "A machine part for"
+ next "the POWER PLANT.@"
+
+EggTicketDesc:
+ db "May use at Golden-"
+ next "rod trade corner.@"
+
+LostItemDesc:
+ db "The # DOLL lost"
+ next "by the COPYCAT.@"
+
+StardustDesc:
+ db "Pretty, red sand."
+ next "Sell high.@"
+
+StarPieceDesc:
+ db "A hunk of red gem."
+ next "Sell very high.@"
+
+BasementKeyDesc:
+ db "Opens doors.@"
+
+PassDesc:
+ db "A ticket for the"
+ next "MAGNET TRAIN.@"
+
+TeruSama9Desc:
+ db "?@"
+
+TeruSama10Desc:
+ db "?@"
+
+TeruSama11Desc:
+ db "?@"
+
+CharcoalDesc:
+ db "Powers up fire-"
+ next "type moves. (HOLD)@"
+
+BerryJuiceDesc:
+ db "Restores #MON"
+ next "HP by 20.@"
+
+ScopeLensDesc:
+ db "Raises critical"
+ next "hit ratio. (HOLD)@"
+
+TeruSama12Desc:
+ db "?@"
+
+TeruSama13Desc:
+ db "?@"
+
+MetalCoatDesc:
+ db "Powers up steel-"
+ next "type moves. (HOLD)@"
+
+DragonFangDesc:
+ db "Powers up dragon-"
+ next "type moves. (HOLD)@"
+
+TeruSama14Desc:
+ db "?@"
+
+LeftoversDesc:
+ db "Restores HP during"
+ next "battle. (HOLD)@"
+
+TeruSama15Desc:
+ db "?@"
+
+TeruSama16Desc:
+ db "?@"
+
+TeruSama17Desc:
+ db "?@"
+
+MysteryBerryDesc:
+ db "A self-restore"
+ next "for PP. (HOLD)@"
+
+DragonScaleDesc:
+ db "A rare dragon-type"
+ next "item.@"
+
+BerserkGeneDesc:
+ db "Boosts ATTACK but"
+ next "causes confusion.@"
+
+TeruSama18Desc:
+ db "?@"
+
+TeruSama19Desc:
+ db "?@"
+
+TeruSama20Desc:
+ db "?@"
+
+SacredAshDesc:
+ db "Fully revives all"
+ next "fainted #MON.@"
+
+HeavyBallDesc:
+ db "A BALL for catch-"
+ next "ing heavy #MON.@"
+
+FlowerMailDesc:
+ db "Flower-print MAIL."
+ next "(HOLD)@"
+
+LevelBallDesc:
+ db "A BALL for lower-"
+ next "level #MON.@"
+
+LureBallDesc:
+ db "A BALL for #MON"
+ next "hooked by a ROD.@"
+
+FastBallDesc:
+ db "A BALL for catch-"
+ next "ing fast #MON.@"
+
+TeruSama21Desc:
+ db "?@"
+
+LightBallDesc:
+ db "An odd, electrical"
+ next "orb. (HOLD)@"
+
+FriendBallDesc:
+ db "A BALL that makes"
+ next "#MON friendly.@"
+
+MoonBallDesc:
+ db "A BALL for MOON"
+ next "STONE evolvers.@"
+
+LoveBallDesc:
+ db "For catching the"
+ next "opposite gender.@"
+
+NormalBoxDesc:
+ db "Open it and see"
+ next "what's inside.@"
+
+GorgeousBoxDesc:
+ db "Open it and see"
+ next "what's inside.@"
+
+SunStoneDesc:
+ db "Evolves certain"
+ next "kinds of #MON.@"
+
+PolkadotBowDesc:
+ db "Powers up normal-"
+ next "type moves. (HOLD)@"
+
+TeruSama22Desc:
+ db "?@"
+
+UpGradeDesc:
+ db "A mysterious box"
+ next "made by SILPH CO.@"
+
+BerryDesc:
+ db "A self-restore"
+ next "item. (10HP, HOLD)@"
+
+GoldBerryDesc:
+ db "A self-restore"
+ next "item. (30HP, HOLD)@"
+
+SquirtBottleDesc:
+ db "A bottle used for"
+ next "watering plants.@"
+
+TeruSama23Desc:
+ db "?@"
+
+ParkBallDesc:
+ db "The Bug-Catching"
+ next "Contest BALL.@"
+
+RainbowWingDesc:
+ db "A mystical feather"
+ next "of rainbow colors.@"
+
+TeruSama24Desc:
+ db "?@"
+
+BrickPieceDesc:
+ db "A rare chunk of"
+ next "tile.@"
+
+SurfMailDesc:
+ db "LAPRAS-print MAIL."
+ next "(HOLD)@"
+
+LiteBlueMailDesc:
+ db "DRATINI-print"
+ next "MAIL. (HOLD)@"
+
+PortraitMailDesc:
+ db "MAIL featuring the"
+ next "holder's likeness.@"
+
+LovelyMailDesc:
+ db "Heart-print MAIL."
+ next "(HOLD)@"
+
+EonMailDesc:
+ db "EEVEE-print MAIL."
+ next "(HOLD)@"
+
+MorphMailDesc:
+ db "DITTO-print MAIL."
+ next "(HOLD)@"
+
+BlueSkyMailDesc:
+ db "Sky-print MAIL."
+ next "(HOLD)@"
+
+MusicMailDesc:
+ db "NATU-print MAIL."
+ next "(HOLD)@"
+
+MewMailDesc:
+ db "MEW-print MAIL."
+ next "(HOLD)@"
+
+TeruSama25Desc:
+ db "?@"
+
+TeruSama26Desc:
+ db "?@"
+
+TeruSama27Desc:
+ db "?@"
+
+TeruSama28Desc:
+ db "?@"
+
+TeruSama29Desc:
+ db "?@"
+
+TeruSama30Desc:
+ db "?@"
+
+TeruSama31Desc:
+ db "?@"
+
+TeruSama32Desc:
+ db "?@"
+
+TeruSama33Desc:
+ db "?@"
diff --git a/data/items/item_names.asm b/data/items/item_names.asm
new file mode 100644
index 000000000..f44100ab3
--- /dev/null
+++ b/data/items/item_names.asm
@@ -0,0 +1,257 @@
+ItemNames::
+ db "MASTER BALL@"
+ db "ULTRA BALL@"
+ db "BRIGHTPOWDER@"
+ db "GREAT BALL@"
+ db "# BALL@"
+ db "TERU-SAMA@"
+ db "BICYCLE@"
+ db "MOON STONE@"
+ db "ANTIDOTE@"
+ db "BURN HEAL@"
+ db "ICE HEAL@"
+ db "AWAKENING@"
+ db "PARLYZ HEAL@"
+ db "FULL RESTORE@"
+ db "MAX POTION@"
+ db "HYPER POTION@"
+ db "SUPER POTION@"
+ db "POTION@"
+ db "ESCAPE ROPE@"
+ db "REPEL@"
+ db "MAX ELIXER@"
+ db "FIRE STONE@"
+ db "THUNDERSTONE@"
+ db "WATER STONE@"
+ db "TERU-SAMA@"
+ db "HP UP@"
+ db "PROTEIN@"
+ db "IRON@"
+ db "CARBOS@"
+ db "LUCKY PUNCH@"
+ db "CALCIUM@"
+ db "RARE CANDY@"
+ db "X ACCURACY@"
+ db "LEAF STONE@"
+ db "METAL POWDER@"
+ db "NUGGET@"
+ db "# DOLL@"
+ db "FULL HEAL@"
+ db "REVIVE@"
+ db "MAX REVIVE@"
+ db "GUARD SPEC.@"
+ db "SUPER REPEL@"
+ db "MAX REPEL@"
+ db "DIRE HIT@"
+ db "TERU-SAMA@"
+ db "FRESH WATER@"
+ db "SODA POP@"
+ db "LEMONADE@"
+ db "X ATTACK@"
+ db "TERU-SAMA@"
+ db "X DEFEND@"
+ db "X SPEED@"
+ db "X SPECIAL@"
+ db "COIN CASE@"
+ db "ITEMFINDER@"
+ db "TERU-SAMA@"
+ db "EXP.SHARE@"
+ db "OLD ROD@"
+ db "GOOD ROD@"
+ db "SILVER LEAF@"
+ db "SUPER ROD@"
+ db "PP UP@"
+ db "ETHER@"
+ db "MAX ETHER@"
+ db "ELIXER@"
+ db "RED SCALE@"
+ db "SECRETPOTION@"
+ db "S.S.TICKET@"
+ db "MYSTERY EGG@"
+ db "CLEAR BELL@"
+ db "SILVER WING@"
+ db "MOOMOO MILK@"
+ db "QUICK CLAW@"
+ db "PSNCUREBERRY@"
+ db "GOLD LEAF@"
+ db "SOFT SAND@"
+ db "SHARP BEAK@"
+ db "PRZCUREBERRY@"
+ db "BURNT BERRY@"
+ db "ICE BERRY@"
+ db "POISON BARB@"
+ db "KING'S ROCK@"
+ db "BITTER BERRY@"
+ db "MINT BERRY@"
+ db "RED APRICORN@"
+ db "TINYMUSHROOM@"
+ db "BIG MUSHROOM@"
+ db "SILVERPOWDER@"
+ db "BLU APRICORN@"
+ db "TERU-SAMA@"
+ db "AMULET COIN@"
+ db "YLW APRICORN@"
+ db "GRN APRICORN@"
+ db "CLEANSE TAG@"
+ db "MYSTIC WATER@"
+ db "TWISTEDSPOON@"
+ db "WHT APRICORN@"
+ db "BLACKBELT@"
+ db "BLK APRICORN@"
+ db "TERU-SAMA@"
+ db "PNK APRICORN@"
+ db "BLACKGLASSES@"
+ db "SLOWPOKETAIL@"
+ db "PINK BOW@"
+ db "STICK@"
+ db "SMOKE BALL@"
+ db "NEVERMELTICE@"
+ db "MAGNET@"
+ db "MIRACLEBERRY@"
+ db "PEARL@"
+ db "BIG PEARL@"
+ db "EVERSTONE@"
+ db "SPELL TAG@"
+ db "RAGECANDYBAR@"
+ db "GS BALL@"
+ db "BLUE CARD@"
+ db "MIRACLE SEED@"
+ db "THICK CLUB@"
+ db "FOCUS BAND@"
+ db "TERU-SAMA@"
+ db "ENERGYPOWDER@"
+ db "ENERGY ROOT@"
+ db "HEAL POWDER@"
+ db "REVIVAL HERB@"
+ db "HARD STONE@"
+ db "LUCKY EGG@"
+ db "CARD KEY@"
+ db "MACHINE PART@"
+ db "EGG TICKET@"
+ db "LOST ITEM@"
+ db "STARDUST@"
+ db "STAR PIECE@"
+ db "BASEMENT KEY@"
+ db "PASS@"
+ db "TERU-SAMA@"
+ db "TERU-SAMA@"
+ db "TERU-SAMA@"
+ db "CHARCOAL@"
+ db "BERRY JUICE@"
+ db "SCOPE LENS@"
+ db "TERU-SAMA@"
+ db "TERU-SAMA@"
+ db "METAL COAT@"
+ db "DRAGON FANG@"
+ db "TERU-SAMA@"
+ db "LEFTOVERS@"
+ db "TERU-SAMA@"
+ db "TERU-SAMA@"
+ db "TERU-SAMA@"
+ db "MYSTERYBERRY@"
+ db "DRAGON SCALE@"
+ db "BERSERK GENE@"
+ db "TERU-SAMA@"
+ db "TERU-SAMA@"
+ db "TERU-SAMA@"
+ db "SACRED ASH@"
+ db "HEAVY BALL@"
+ db "FLOWER MAIL@"
+ db "LEVEL BALL@"
+ db "LURE BALL@"
+ db "FAST BALL@"
+ db "TERU-SAMA@"
+ db "LIGHT BALL@"
+ db "FRIEND BALL@"
+ db "MOON BALL@"
+ db "LOVE BALL@"
+ db "NORMAL BOX@"
+ db "GORGEOUS BOX@"
+ db "SUN STONE@"
+ db "POLKADOT BOW@"
+ db "TERU-SAMA@"
+ db "UP-GRADE@"
+ db "BERRY@"
+ db "GOLD BERRY@"
+ db "SQUIRTBOTTLE@"
+ db "TERU-SAMA@"
+ db "PARK BALL@"
+ db "RAINBOW WING@"
+ db "TERU-SAMA@"
+ db "BRICK PIECE@"
+ db "SURF MAIL@"
+ db "LITEBLUEMAIL@"
+ db "PORTRAITMAIL@"
+ db "LOVELY MAIL@"
+ db "EON MAIL@"
+ db "MORPH MAIL@"
+ db "BLUESKY MAIL@"
+ db "MUSIC MAIL@"
+ db "MIRAGE MAIL@"
+ db "TERU-SAMA@"
+ db "TM01@"
+ db "TM02@"
+ db "TM03@"
+ db "TM04@"
+ db "TERU-SAMA@"
+ db "TM05@"
+ db "TM06@"
+ db "TM07@"
+ db "TM08@"
+ db "TM09@"
+ db "TM10@"
+ db "TM11@"
+ db "TM12@"
+ db "TM13@"
+ db "TM14@"
+ db "TM15@"
+ db "TM16@"
+ db "TM17@"
+ db "TM18@"
+ db "TM19@"
+ db "TM20@"
+ db "TM21@"
+ db "TM22@"
+ db "TM23@"
+ db "TM24@"
+ db "TM25@"
+ db "TM26@"
+ db "TM27@"
+ db "TM28@"
+ db "TERU-SAMA@"
+ db "TM29@"
+ db "TM30@"
+ db "TM31@"
+ db "TM32@"
+ db "TM33@"
+ db "TM34@"
+ db "TM35@"
+ db "TM36@"
+ db "TM37@"
+ db "TM38@"
+ db "TM39@"
+ db "TM40@"
+ db "TM41@"
+ db "TM42@"
+ db "TM43@"
+ db "TM44@"
+ db "TM45@"
+ db "TM46@"
+ db "TM47@"
+ db "TM48@"
+ db "TM49@"
+ db "TM50@"
+ db "HM01@"
+ db "HM02@"
+ db "HM03@"
+ db "HM04@"
+ db "HM05@"
+ db "HM06@"
+ db "HM07@"
+ db "TERU-SAMA@"
+ db "TERU-SAMA@"
+ db "TERU-SAMA@"
+ db "TERU-SAMA@"
+ db "TERU-SAMA@"
+ db "TERU-SAMA@"
+ db "?@"
diff --git a/items/marts.asm b/data/items/marts.asm
index cd17ca36b..cd17ca36b 100644
--- a/items/marts.asm
+++ b/data/items/marts.asm
diff --git a/data/items/mom_phone.asm b/data/items/mom_phone.asm
new file mode 100644
index 000000000..533241ca1
--- /dev/null
+++ b/data/items/mom_phone.asm
@@ -0,0 +1,27 @@
+momitem: macro
+; money to trigger, cost, kind, item
+ dt \1
+ dt \2
+ db \3, \4
+ENDM
+
+MomItems_1: ; fd136
+ momitem 0, 600, MOM_ITEM, SUPER_POTION
+ momitem 0, 90, MOM_ITEM, ANTIDOTE
+ momitem 0, 180, MOM_ITEM, POKE_BALL
+ momitem 0, 450, MOM_ITEM, ESCAPE_ROPE
+ momitem 0, 500, MOM_ITEM, GREAT_BALL
+MomItems_1End: ; fd15e
+
+MomItems_2: ; fd15e
+ momitem 900, 600, MOM_ITEM, SUPER_POTION
+ momitem 4000, 270, MOM_ITEM, REPEL
+ momitem 7000, 600, MOM_ITEM, SUPER_POTION
+ momitem 10000, 1800, MOM_DOLL, DECO_CHARMANDER_DOLL
+ momitem 15000, 3000, MOM_ITEM, MOON_STONE
+ momitem 19000, 600, MOM_ITEM, SUPER_POTION
+ momitem 30000, 4800, MOM_DOLL, DECO_CLEFAIRY_DOLL
+ momitem 40000, 900, MOM_ITEM, HYPER_POTION
+ momitem 50000, 8000, MOM_DOLL, DECO_PIKACHU_DOLL
+ momitem 100000, 22800, MOM_DOLL, DECO_BIG_SNORLAX_DOLL
+MomItems_2End: ; fd1ae
diff --git a/data/items/rooftop_sale.asm b/data/items/rooftop_sale.asm
new file mode 100644
index 000000000..b16724cdc
--- /dev/null
+++ b/data/items/rooftop_sale.asm
@@ -0,0 +1,18 @@
+RooftopSaleData1: ; 15aee
+ db 5
+ dbw POKE_BALL, 150
+ dbw GREAT_BALL, 500
+ dbw SUPER_POTION, 500
+ dbw FULL_HEAL, 500
+ dbw REVIVE, 1200
+ db -1
+
+RooftopSaleData2: ; 15aff
+ db 5
+ dbw HYPER_POTION, 1000
+ dbw FULL_RESTORE, 2000
+ dbw FULL_HEAL, 500
+ dbw ULTRA_BALL, 1000
+ dbw PROTEIN, 7800
+ db -1
+; 15b10
diff --git a/data/mail_input_chars.asm b/data/mail_input_chars.asm
new file mode 100644
index 000000000..befdc0cf7
--- /dev/null
+++ b/data/mail_input_chars.asm
@@ -0,0 +1,19 @@
+; see engine/naming_screen.asm
+
+MailEntry_Uppercase: ; 122dd
+ db "A B C D E F G H I J"
+ db "K L M N O P Q R S T"
+ db "U V W X Y Z , ? !"
+ db "1 2 3 4 5 6 7 8 9 0"
+ db "<PK> <MN> <PO> <KE> é ♂ ♀ ¥ … ×"
+ db "lower DEL END "
+; 1224f
+
+MailEntry_Lowercase: ; 1224f
+ db "a b c d e f g h i j"
+ db "k l m n o p q r s t"
+ db "u v w x y z . - /"
+ db "'d 'l 'm 'r 's 't 'v & ( )"
+ db "<``> <''> [ ] ' : ; "
+ db "UPPER DEL END "
+; 122c1
diff --git a/data/map_objects.asm b/data/map_objects.asm
index ec4a859b3..09de8dc52 100755
--- a/data/map_objects.asm
+++ b/data/map_objects.asm
@@ -3,42 +3,45 @@ sprite_movement_data: macro
dn \6, 0
endm
+SpriteMovementData:: ; 4273
+; entries correspond to SPRITEMOVEDATA_* constants
; function, facing, action, flags1, flags2, palette flags
- sprite_movement_data SPRITEMOVEFN_00, DOWN, PERSON_ACTION_STAND, $02, $00, %0000 ; 00
- sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, PERSON_ACTION_STAND, $0c, $00, %0000 ; 01
- sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_XY, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 02
- sprite_movement_data SPRITEMOVEFN_SLOW_RANDOM_SPIN, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 03
- sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_Y, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 04
- sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_X, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 05
- sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 06
- sprite_movement_data SPRITEMOVEFN_STANDING, UP, PERSON_ACTION_STAND, $00, $00, %0000 ; 07
- sprite_movement_data SPRITEMOVEFN_STANDING, LEFT, PERSON_ACTION_STAND, $00, $00, %0000 ; 08
- sprite_movement_data SPRITEMOVEFN_STANDING, RIGHT, PERSON_ACTION_STAND, $00, $00, %0000 ; 09
- sprite_movement_data SPRITEMOVEFN_FAST_RANDOM_SPIN, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 0a
- sprite_movement_data SPRITEMOVEFN_OBEY_DPAD, DOWN, PERSON_ACTION_STAND, $02, $00, %0000 ; 0b
- sprite_movement_data SPRITEMOVEFN_08, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 0c
- sprite_movement_data SPRITEMOVEFN_09, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 0d
- sprite_movement_data SPRITEMOVEFN_0A, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 0e
- sprite_movement_data SPRITEMOVEFN_0B, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 0f
- sprite_movement_data SPRITEMOVEFN_0C, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 10
- sprite_movement_data SPRITEMOVEFN_0D, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 11
- sprite_movement_data SPRITEMOVEFN_0E, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 12
- sprite_movement_data SPRITEMOVEFN_FOLLOW, DOWN, PERSON_ACTION_STAND, $02, $00, %0000 ; 13
- sprite_movement_data SPRITEMOVEFN_SCRIPTED, DOWN, PERSON_ACTION_STAND, $02, $00, %0000 ; 14
- sprite_movement_data SPRITEMOVEFN_BIG_SNORLAX, DOWN, PERSON_ACTION_BIG_SNORLAX, $2e, $01, %1100 ; 15
- sprite_movement_data SPRITEMOVEFN_BOUNCE, DOWN, PERSON_ACTION_BOUNCE, $2e, $00, %0000 ; 16
- sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, PERSON_ACTION_STAND, $0c, $00, %0000 ; 17
- sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, PERSON_ACTION_STAND, $2e, $10, %0000 ; 18
- sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, PERSON_ACTION_STAND, $2e, $00, %0100 ; 19
- sprite_movement_data SPRITEMOVEFN_FOLLOWNOTEXACT, DOWN, PERSON_ACTION_STAND, $02, $00, %0000 ; 1a
- sprite_movement_data SPRITEMOVEFN_SHADOW, DOWN, PERSON_ACTION_00, $8e, $01, %0000 ; 1b
- sprite_movement_data SPRITEMOVEFN_EMOTE, DOWN, PERSON_ACTION_EMOTE, $8e, $02, %0000 ; 1c
- sprite_movement_data SPRITEMOVEFN_SCREENSHAKE, DOWN, PERSON_ACTION_00, $82, $00, %0000 ; 1d
- sprite_movement_data SPRITEMOVEFN_SPIN_COUNTERCLOCKWISE, LEFT, PERSON_ACTION_STAND, $00, $00, %0000 ; 1e
- sprite_movement_data SPRITEMOVEFN_SPIN_CLOCKWISE, RIGHT, PERSON_ACTION_STAND, $00, $00, %0000 ; 1f
- sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, PERSON_ACTION_BIG_LAPRAS, $2e, $01, %1100 ; 20
- sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, PERSON_ACTION_BIG_DOLL, $2e, $01, %1100 ; 21
- sprite_movement_data SPRITEMOVEFN_BOULDERDUST, DOWN, PERSON_ACTION_BOULDER_DUST, $8e, $01, %0000 ; 22
- sprite_movement_data SPRITEMOVEFN_GRASS, DOWN, PERSON_ACTION_GRASS_SHAKE, $8e, $02, %0000 ; 23
- sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_XY, DOWN, PERSON_ACTION_STAND, $00, $00, %0010 ; 24
- sprite_movement_data SPRITEMOVEFN_00, DOWN, PERSON_ACTION_STAND, $00, $00, %0000 ; 25
+ sprite_movement_data SPRITEMOVEFN_00, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; 00
+ sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, OBJECT_ACTION_STAND, $0c, $00, %0000 ; 01
+ sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_XY, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 02
+ sprite_movement_data SPRITEMOVEFN_SLOW_RANDOM_SPIN, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 03
+ sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_Y, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 04
+ sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_X, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 05
+ sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 06
+ sprite_movement_data SPRITEMOVEFN_STANDING, UP, OBJECT_ACTION_STAND, $00, $00, %0000 ; 07
+ sprite_movement_data SPRITEMOVEFN_STANDING, LEFT, OBJECT_ACTION_STAND, $00, $00, %0000 ; 08
+ sprite_movement_data SPRITEMOVEFN_STANDING, RIGHT, OBJECT_ACTION_STAND, $00, $00, %0000 ; 09
+ sprite_movement_data SPRITEMOVEFN_FAST_RANDOM_SPIN, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 0a
+ sprite_movement_data SPRITEMOVEFN_OBEY_DPAD, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; 0b
+ sprite_movement_data SPRITEMOVEFN_08, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 0c
+ sprite_movement_data SPRITEMOVEFN_09, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 0d
+ sprite_movement_data SPRITEMOVEFN_0A, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 0e
+ sprite_movement_data SPRITEMOVEFN_0B, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 0f
+ sprite_movement_data SPRITEMOVEFN_0C, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 10
+ sprite_movement_data SPRITEMOVEFN_0D, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 11
+ sprite_movement_data SPRITEMOVEFN_0E, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 12
+ sprite_movement_data SPRITEMOVEFN_FOLLOW, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; 13
+ sprite_movement_data SPRITEMOVEFN_SCRIPTED, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; 14
+ sprite_movement_data SPRITEMOVEFN_BIG_SNORLAX, DOWN, OBJECT_ACTION_BIG_SNORLAX, $2e, $01, %1100 ; 15
+ sprite_movement_data SPRITEMOVEFN_BOUNCE, DOWN, OBJECT_ACTION_BOUNCE, $2e, $00, %0000 ; 16
+ sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, OBJECT_ACTION_STAND, $0c, $00, %0000 ; 17
+ sprite_movement_data SPRITEMOVEFN_STANDING, DOWN, OBJECT_ACTION_STAND, $2e, $10, %0000 ; 18
+ sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, OBJECT_ACTION_STAND, $2e, $00, %0100 ; 19
+ sprite_movement_data SPRITEMOVEFN_FOLLOWNOTEXACT, DOWN, OBJECT_ACTION_STAND, $02, $00, %0000 ; 1a
+ sprite_movement_data SPRITEMOVEFN_SHADOW, DOWN, OBJECT_ACTION_00, $8e, $01, %0000 ; 1b
+ sprite_movement_data SPRITEMOVEFN_EMOTE, DOWN, OBJECT_ACTION_EMOTE, $8e, $02, %0000 ; 1c
+ sprite_movement_data SPRITEMOVEFN_SCREENSHAKE, DOWN, OBJECT_ACTION_00, $82, $00, %0000 ; 1d
+ sprite_movement_data SPRITEMOVEFN_SPIN_COUNTERCLOCKWISE, LEFT, OBJECT_ACTION_STAND, $00, $00, %0000 ; 1e
+ sprite_movement_data SPRITEMOVEFN_SPIN_CLOCKWISE, RIGHT, OBJECT_ACTION_STAND, $00, $00, %0000 ; 1f
+ sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, OBJECT_ACTION_BIG_LAPRAS, $2e, $01, %1100 ; 20
+ sprite_movement_data SPRITEMOVEFN_STRENGTH, DOWN, OBJECT_ACTION_BIG_DOLL, $2e, $01, %1100 ; 21
+ sprite_movement_data SPRITEMOVEFN_BOULDERDUST, DOWN, OBJECT_ACTION_BOULDER_DUST, $8e, $01, %0000 ; 22
+ sprite_movement_data SPRITEMOVEFN_GRASS, DOWN, OBJECT_ACTION_GRASS_SHAKE, $8e, $02, %0000 ; 23
+ sprite_movement_data SPRITEMOVEFN_RANDOM_WALK_XY, DOWN, OBJECT_ACTION_STAND, $00, $00, %0010 ; 24
+ sprite_movement_data SPRITEMOVEFN_00, DOWN, OBJECT_ACTION_STAND, $00, $00, %0000 ; 25
+; 4357
diff --git a/data/maps/landmarks.asm b/data/maps/landmarks.asm
new file mode 100644
index 000000000..0b927aaf6
--- /dev/null
+++ b/data/maps/landmarks.asm
@@ -0,0 +1,208 @@
+landmark: MACRO
+; x, y, name
+ db \1, \2
+ dw \3
+ENDM
+
+Landmarks: ; 0x1ca8c3
+; entries correspond to constants/landmark_constants.asm
+ landmark 0, 0, SpecialMapName
+ landmark 148, 116, NewBarkTownName
+ landmark 136, 116, Route29Name
+ landmark 108, 116, CherrygroveCityName
+ landmark 108, 96, Route30Name
+ landmark 104, 76, Route31Name
+ landmark 92, 76, VioletCityName
+ landmark 93, 74, SproutTowerName
+ landmark 92, 108, Route32Name
+ landmark 84, 92, RuinsOfAlphName
+ landmark 92, 140, UnionCaveName
+ landmark 90, 140, Route33Name
+ landmark 76, 140, AzaleaTownName
+ landmark 78, 138, SlowpokeWellName
+ landmark 60, 136, IlexForestName
+ landmark 60, 128, Route34Name
+ landmark 60, 108, GoldenrodCityName
+ landmark 58, 108, RadioTowerName
+ landmark 60, 92, Route35Name
+ landmark 60, 76, NationalParkName
+ landmark 72, 76, Route36Name
+ landmark 76, 68, Route37Name
+ landmark 76, 60, EcruteakCityName
+ landmark 78, 58, TinTowerName
+ landmark 74, 58, BurnedTowerName
+ landmark 60, 60, Route38Name
+ landmark 44, 64, Route39Name
+ landmark 44, 76, OlivineCityName
+ landmark 46, 78, LighthouseName
+ landmark 36, 72, BattleTowerName
+ landmark 36, 80, Route40Name
+ landmark 36, 108, WhirlIslandsName
+ landmark 36, 116, Route41Name
+ landmark 28, 116, CianwoodCityName
+ landmark 100, 60, Route42Name
+ landmark 92, 60, MtMortarName
+ landmark 116, 60, MahoganyTownName
+ landmark 116, 52, Route43Name
+ landmark 116, 44, LakeOfRageName
+ landmark 128, 60, Route44Name
+ landmark 138, 54, IcePathName
+ landmark 140, 60, BlackthornCityName
+ landmark 140, 52, DragonsDenName
+ landmark 140, 80, Route45Name
+ landmark 120, 88, DarkCaveName
+ landmark 132, 104, Route46Name
+ landmark 156, 84, SilverCaveName
+ landmark 60, 124, PalletTownName
+ landmark 60, 108, Route1Name
+ landmark 60, 92, ViridianCityName
+ landmark 60, 80, Route2Name
+ landmark 60, 68, PewterCityName
+ landmark 72, 68, Route3Name
+ landmark 84, 68, MtMoonName
+ landmark 96, 68, Route4Name
+ landmark 108, 68, CeruleanCityName
+ landmark 108, 60, Route24Name
+ landmark 116, 52, Route25Name
+ landmark 108, 76, Route5Name
+ landmark 116, 92, UndergroundName
+ landmark 108, 92, Route6Name
+ landmark 108, 100, VermilionCityName
+ landmark 96, 76, DiglettsCaveName
+ landmark 96, 84, Route7Name
+ landmark 124, 84, Route8Name
+ landmark 124, 68, Route9Name
+ landmark 140, 68, RockTunnelName
+ landmark 140, 72, Route10Name
+ landmark 140, 76, PowerPlantName
+ landmark 140, 84, LavenderTownName
+ landmark 148, 84, LavRadioTowerName
+ landmark 84, 84, CeladonCityName
+ landmark 108, 84, SaffronCityName
+ landmark 124, 100, Route11Name
+ landmark 140, 96, Route12Name
+ landmark 132, 116, Route13Name
+ landmark 124, 128, Route14Name
+ landmark 112, 132, Route15Name
+ landmark 76, 84, Route16Name
+ landmark 76, 108, Route17Name
+ landmark 88, 132, Route18Name
+ landmark 100, 132, FuchsiaCityName
+ landmark 100, 144, Route19Name
+ landmark 84, 148, Route20Name
+ landmark 76, 148, SeafoamIslandsName
+ landmark 60, 148, CinnabarIslandName
+ landmark 60, 136, Route21Name
+ landmark 44, 84, Route22Name
+ landmark 36, 68, VictoryRoadName
+ landmark 36, 60, Route23Name
+ landmark 36, 52, IndigoPlateauName
+ landmark 36, 108, Route26Name
+ landmark 28, 116, Route27Name
+ landmark 20, 116, TohjoFallsName
+ landmark 28, 84, Route28Name
+ landmark 148, 132, FastShipName
+; 0x1caa43
+
+NewBarkTownName: db "NEW BARK¯TOWN@"
+CherrygroveCityName: db "CHERRYGROVE¯CITY@"
+VioletCityName: db "VIOLET CITY@"
+AzaleaTownName: db "AZALEA TOWN@"
+GoldenrodCityName: db "GOLDENROD¯CITY@"
+EcruteakCityName: db "ECRUTEAK¯CITY@"
+OlivineCityName: db "OLIVINE¯CITY@"
+CianwoodCityName: db "CIANWOOD¯CITY@"
+MahoganyTownName: db "MAHOGANY¯TOWN@"
+BlackthornCityName: db "BLACKTHORN¯CITY@"
+LakeOfRageName: db "LAKE OF¯RAGE@"
+SilverCaveName: db "SILVER CAVE@"
+SproutTowerName: db "SPROUT¯TOWER@"
+RuinsOfAlphName: db "RUINS¯OF ALPH@"
+UnionCaveName: db "UNION CAVE@"
+SlowpokeWellName: db "SLOWPOKE¯WELL@"
+RadioTowerName: db "RADIO TOWER@"
+PowerPlantName: db "POWER PLANT@"
+NationalParkName: db "NATIONAL¯PARK@"
+TinTowerName: db "TIN TOWER@"
+LighthouseName: db "LIGHTHOUSE@"
+WhirlIslandsName: db "WHIRL¯ISLANDS@"
+MtMortarName: db "MT.MORTAR@"
+DragonsDenName: db "DRAGON'S¯DEN@"
+IcePathName: db "ICE PATH@"
+NotApplicableName: db "N/A@"
+PalletTownName: db "PALLET TOWN@"
+ViridianCityName: db "VIRIDIAN¯CITY@"
+PewterCityName: db "PEWTER CITY@"
+CeruleanCityName: db "CERULEAN¯CITY@"
+LavenderTownName: db "LAVENDER¯TOWN@"
+VermilionCityName: db "VERMILION¯CITY@"
+CeladonCityName: db "CELADON¯CITY@"
+SaffronCityName: db "SAFFRON¯CITY@"
+FuchsiaCityName: db "FUCHSIA¯CITY@"
+CinnabarIslandName: db "CINNABAR¯ISLAND@"
+IndigoPlateauName: db "INDIGO¯PLATEAU@"
+VictoryRoadName: db "VICTORY¯ROAD@"
+MtMoonName: db "MT.MOON@"
+RockTunnelName: db "ROCK TUNNEL@"
+LavRadioTowerName: db "LAV¯RADIO TOWER@"
+SilphCoName: db "SILPH CO.@"
+SafariZoneName: db "SAFARI ZONE@"
+SeafoamIslandsName: db "SEAFOAM¯ISLANDS@"
+PokemonMansionName: db "#MON¯MANSION@"
+CeruleanCaveName: db "CERULEAN¯CAVE@"
+Route1Name: db "ROUTE 1@"
+Route2Name: db "ROUTE 2@"
+Route3Name: db "ROUTE 3@"
+Route4Name: db "ROUTE 4@"
+Route5Name: db "ROUTE 5@"
+Route6Name: db "ROUTE 6@"
+Route7Name: db "ROUTE 7@"
+Route8Name: db "ROUTE 8@"
+Route9Name: db "ROUTE 9@"
+Route10Name: db "ROUTE 10@"
+Route11Name: db "ROUTE 11@"
+Route12Name: db "ROUTE 12@"
+Route13Name: db "ROUTE 13@"
+Route14Name: db "ROUTE 14@"
+Route15Name: db "ROUTE 15@"
+Route16Name: db "ROUTE 16@"
+Route17Name: db "ROUTE 17@"
+Route18Name: db "ROUTE 18@"
+Route19Name: db "ROUTE 19@"
+Route20Name: db "ROUTE 20@"
+Route21Name: db "ROUTE 21@"
+Route22Name: db "ROUTE 22@"
+Route23Name: db "ROUTE 23@"
+Route24Name: db "ROUTE 24@"
+Route25Name: db "ROUTE 25@"
+Route26Name: db "ROUTE 26@"
+Route27Name: db "ROUTE 27@"
+Route28Name: db "ROUTE 28@"
+Route29Name: db "ROUTE 29@"
+Route30Name: db "ROUTE 30@"
+Route31Name: db "ROUTE 31@"
+Route32Name: db "ROUTE 32@"
+Route33Name: db "ROUTE 33@"
+Route34Name: db "ROUTE 34@"
+Route35Name: db "ROUTE 35@"
+Route36Name: db "ROUTE 36@"
+Route37Name: db "ROUTE 37@"
+Route38Name: db "ROUTE 38@"
+Route39Name: db "ROUTE 39@"
+Route40Name: db "ROUTE 40@"
+Route41Name: db "ROUTE 41@"
+Route42Name: db "ROUTE 42@"
+Route43Name: db "ROUTE 43@"
+Route44Name: db "ROUTE 44@"
+Route45Name: db "ROUTE 45@"
+Route46Name: db "ROUTE 46@"
+DarkCaveName: db "DARK CAVE@"
+IlexForestName: db "ILEX¯FOREST@"
+BurnedTowerName: db "BURNED¯TOWER@"
+FastShipName: db "FAST SHIP@"
+ViridianForestName: db "VIRIDIAN¯FOREST@"
+DiglettsCaveName: db "DIGLETT'S¯CAVE@"
+TohjoFallsName: db "TOHJO FALLS@"
+UndergroundName: db "UNDERGROUND@"
+BattleTowerName: db "BATTLE¯TOWER@"
+SpecialMapName: db "SPECIAL@"
diff --git a/data/maps/map_scenes.asm b/data/maps/map_scenes.asm
new file mode 100644
index 000000000..3d9600407
--- /dev/null
+++ b/data/maps/map_scenes.asm
@@ -0,0 +1,89 @@
+scene_def: MACRO
+; db group, map
+; dw address
+ map \1
+ dw \2
+ENDM
+
+MapScenes:: ; 4d01e
+ scene_def POKECENTER_2F, wPokecenter2FSceneID
+ scene_def TRADE_CENTER, wTradeCenterSceneID
+ scene_def COLOSSEUM, wColosseumSceneID
+ scene_def TIME_CAPSULE, wTimeCapsuleSceneID
+ scene_def POWER_PLANT, wPowerPlantSceneID
+ scene_def CERULEAN_GYM, wCeruleanGymSceneID
+ scene_def ROUTE_25, wRoute25SceneID
+ scene_def TRAINER_HOUSE_B1F, wTrainerHouseB1FSceneID
+ scene_def VICTORY_ROAD_GATE, wVictoryRoadGateSceneID
+ scene_def SAFFRON_TRAIN_STATION, wSaffronTrainStationSceneID
+ scene_def ROUTE_16_GATE, wRoute16GateSceneID
+ scene_def ROUTE_17_18_GATE, wRoute1718GateSceneID
+ scene_def INDIGO_PLATEAU_POKECENTER_1F, wIndigoPlateauPokecenter1FSceneID
+ scene_def WILLS_ROOM, wWillsRoomSceneID
+ scene_def KOGAS_ROOM, wKogasRoomSceneID
+ scene_def BRUNOS_ROOM, wBrunosRoomSceneID
+ scene_def KARENS_ROOM, wKarensRoomSceneID
+ scene_def LANCES_ROOM, wLancesRoomSceneID
+ scene_def HALL_OF_FAME, wHallOfFameSceneID
+ scene_def ROUTE_27, wRoute27SceneID
+ scene_def NEW_BARK_TOWN, wNewBarkTownSceneID
+ scene_def ELMS_LAB, wElmsLabSceneID
+ scene_def KRISS_HOUSE_1F, wKrissHouse1FSceneID
+ scene_def ROUTE_29, wRoute29SceneID
+ scene_def CHERRYGROVE_CITY, wCherrygroveCitySceneID
+ scene_def MR_POKEMONS_HOUSE, wMrPokemonsHouseSceneID
+ scene_def ROUTE_32, wRoute32SceneID
+ scene_def ROUTE_35_NATIONAL_PARK_GATE, wRoute35NationalParkGateSceneID
+ scene_def ROUTE_36, wRoute36SceneID
+ scene_def ROUTE_36_NATIONAL_PARK_GATE, wRoute36NationalParkGateSceneID
+ scene_def AZALEA_TOWN, wAzaleaTownSceneID
+ scene_def GOLDENROD_GYM, wGoldenrodGymSceneID
+ scene_def GOLDENROD_MAGNET_TRAIN_STATION, wGoldenrodMagnetTrainStationSceneID
+ scene_def GOLDENROD_POKECENTER_1F, wGoldenrodPokecenter1FSceneID
+ scene_def OLIVINE_CITY, wOlivineCitySceneID
+ scene_def ROUTE_34, wRoute34SceneID
+ scene_def ROUTE_34_ILEX_FOREST_GATE, wRoute34IlexForestGateSceneID
+ scene_def ECRUTEAK_HOUSE, wEcruteakHouseSceneID
+ scene_def WISE_TRIOS_ROOM, wWiseTriosRoomSceneID
+ scene_def ECRUTEAK_POKECENTER_1F, wEcruteakPokecenter1FSceneID
+ scene_def ECRUTEAK_GYM, wEcruteakGymSceneID
+ scene_def MAHOGANY_TOWN, wMahoganyTownSceneID
+ scene_def ROUTE_42, wRoute42SceneID
+ scene_def CIANWOOD_CITY, wCianwoodCitySceneID
+ scene_def BATTLE_TOWER_1F, wBattleTower1FSceneID
+ scene_def BATTLE_TOWER_BATTLE_ROOM, wBattleTowerBattleRoomSceneID
+ scene_def BATTLE_TOWER_ELEVATOR, wBattleTowerElevatorSceneID
+ scene_def BATTLE_TOWER_HALLWAY, wBattleTowerHallwaySceneID
+ scene_def BATTLE_TOWER_OUTSIDE, wBattleTowerOutsideSceneID
+ scene_def ROUTE_43_GATE, wRoute43GateSceneID
+ scene_def MOUNT_MOON, wMountMoonSceneID
+ scene_def SPROUT_TOWER_3F, wSproutTower3FSceneID
+ scene_def TIN_TOWER_1F, wTinTower1FSceneID
+ scene_def BURNED_TOWER_1F, wBurnedTower1FSceneID
+ scene_def BURNED_TOWER_B1F, wBurnedTowerB1FSceneID
+ scene_def RADIO_TOWER_5F, wRadioTower5FSceneID
+ scene_def RUINS_OF_ALPH_OUTSIDE, wRuinsOfAlphOutsideSceneID
+ scene_def RUINS_OF_ALPH_RESEARCH_CENTER, wRuinsOfAlphResearchCenterSceneID
+ scene_def RUINS_OF_ALPH_HO_OH_CHAMBER, wRuinsOfAlphHoOhChamberSceneID
+ scene_def RUINS_OF_ALPH_KABUTO_CHAMBER, wRuinsOfAlphKabutoChamberSceneID
+ scene_def RUINS_OF_ALPH_OMANYTE_CHAMBER, wRuinsOfAlphOmanyteChamberSceneID
+ scene_def RUINS_OF_ALPH_AERODACTYL_CHAMBER, wRuinsOfAlphAerodactylChamberSceneID
+ scene_def RUINS_OF_ALPH_INNER_CHAMBER, wRuinsOfAlphInnerChamberSceneID
+ scene_def MAHOGANY_MART_1F, wMahoganyMart1FSceneID
+ scene_def TEAM_ROCKET_BASE_B1F, wTeamRocketBaseB1FSceneID
+ scene_def TEAM_ROCKET_BASE_B2F, wTeamRocketBaseB2FSceneID
+ scene_def TEAM_ROCKET_BASE_B3F, wTeamRocketBaseB3FSceneID
+ scene_def GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, wGoldenrodUndergroundSwitchRoomEntrancesSceneID
+ scene_def SILVER_CAVE_ROOM_3, wSilverCaveRoom3SceneID
+ scene_def VICTORY_ROAD, wVictoryRoadSceneID
+ scene_def DRAGONS_DEN_B1F, wDragonsDenB1FSceneID
+ scene_def DRAGON_SHRINE, wDragonShrineSceneID
+ scene_def OLIVINE_PORT, wOlivinePortSceneID
+ scene_def VERMILION_PORT, wVermilionPortSceneID
+ scene_def FAST_SHIP_1F, wFastShip1FSceneID
+ scene_def FAST_SHIP_B1F, wFastShipB1FSceneID
+ scene_def MOUNT_MOON_SQUARE, wMountMoonSquareSceneID
+ scene_def MOBILE_TRADE_ROOM_MOBILE, wMobileTradeRoomMobileSceneID
+ scene_def MOBILE_BATTLE_ROOM, wMobileBattleRoomSceneID
+ db -1
+; 4d15b
diff --git a/data/maps/mapgroup_roofs.asm b/data/maps/mapgroup_roofs.asm
new file mode 100644
index 000000000..0cad8a0e3
--- /dev/null
+++ b/data/maps/mapgroup_roofs.asm
@@ -0,0 +1,31 @@
+; valid roofs: 0, 1, 2, 3, 4, or -1 for none
+
+MapGroupRoofs: ; 1c021i
+ db -1 ; group 0 (unused)
+ db 3 ; group 1 (Olivine)
+ db 2 ; group 2 (Mahogany)
+ db -1 ; group 3
+ db 1 ; group 4 (Ecruteak)
+ db 2 ; group 5 (Blackthorn)
+ db -1 ; group 6
+ db -1 ; group 7
+ db 2 ; group 8 (Azalea)
+ db 2 ; group 9 (Lake of Rage)
+ db 1 ; group 10 (Violet)
+ db 4 ; group 11 (Goldenrod)
+ db -1 ; group 12
+ db -1 ; group 13
+ db -1 ; group 14
+ db -1 ; group 15
+ db -1 ; group 16
+ db -1 ; group 17
+ db -1 ; group 18
+ db 0 ; group 19 (Silver Cave)
+ db -1 ; group 20
+ db -1 ; group 21
+ db 3 ; group 22 (Cianwood)
+ db -1 ; group 23
+ db 0 ; group 24 (New Bark)
+ db -1 ; group 25
+ db 0 ; group 26 (Cherrygrove)
+; 1c03c
diff --git a/data/maps/outdoor_sprites.asm b/data/maps/outdoor_sprites.asm
new file mode 100644
index 000000000..8064a63e9
--- /dev/null
+++ b/data/maps/outdoor_sprites.asm
@@ -0,0 +1,696 @@
+; Valid sprite IDs for each map group.
+; Maps with environment ROUTE or TOWN can only use these sprites.
+
+OutdoorSprites: ; 144b8
+ dw OlivineGroupSprites
+ dw MahoganyGroupSprites
+ dw DungeonsGroupSprites
+ dw EcruteakGroupSprites
+ dw BlackthornGroupSprites
+ dw CinnabarGroupSprites
+ dw CeruleanGroupSprites
+ dw AzaleaGroupSprites
+ dw LakeOfRageGroupSprites
+ dw VioletGroupSprites
+ dw GoldenrodGroupSprites
+ dw VermilionGroupSprites
+ dw PalletGroupSprites
+ dw PewterGroupSprites
+ dw FastShipGroupSprites
+ dw IndigoGroupSprites
+ dw FuchsiaGroupSprites
+ dw LavenderGroupSprites
+ dw SilverGroupSprites
+ dw CableClubGroupSprites
+ dw CeladonGroupSprites
+ dw CianwoodGroupSprites
+ dw ViridianGroupSprites
+ dw NewBarkGroupSprites
+ dw SaffronGroupSprites
+ dw CherrygroveGroupSprites
+; 144ec
+
+
+PalletGroupSprites: ; 144ec
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_TEACHER
+ db SPRITE_FISHER
+ db SPRITE_YOUNGSTER
+ db SPRITE_BLUE
+ db SPRITE_GRAMPS
+ db SPRITE_BUG_CATCHER
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_SWIMMER_GIRL
+ db SPRITE_SWIMMER_GUY
+ db SPRITE_POKE_BALL
+ db SPRITE_FRUIT_TREE
+; 14503
+
+ViridianGroupSprites: ; 14503
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_TEACHER
+ db SPRITE_FISHER
+ db SPRITE_YOUNGSTER
+ db SPRITE_BLUE
+ db SPRITE_GRAMPS
+ db SPRITE_BUG_CATCHER
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_SWIMMER_GIRL
+ db SPRITE_SWIMMER_GUY
+ db SPRITE_POKE_BALL
+ db SPRITE_FRUIT_TREE
+; 1451a
+
+PewterGroupSprites: ; 1451a
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_TEACHER
+ db SPRITE_FISHER
+ db SPRITE_YOUNGSTER
+ db SPRITE_BLUE
+ db SPRITE_GRAMPS
+ db SPRITE_BUG_CATCHER
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_SWIMMER_GIRL
+ db SPRITE_SWIMMER_GUY
+ db SPRITE_POKE_BALL
+ db SPRITE_FRUIT_TREE
+; 14531
+
+CinnabarGroupSprites: ; 14531
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_TEACHER
+ db SPRITE_FISHER
+ db SPRITE_YOUNGSTER
+ db SPRITE_BLUE
+ db SPRITE_GRAMPS
+ db SPRITE_BUG_CATCHER
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_SWIMMER_GIRL
+ db SPRITE_SWIMMER_GUY
+ db SPRITE_POKE_BALL
+ db SPRITE_FRUIT_TREE
+; 14548
+
+CeruleanGroupSprites: ; 14548
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_SUPER_NERD
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_FISHER
+ db SPRITE_YOUNGSTER
+ db SPRITE_LASS
+ db SPRITE_POKEFAN_M
+ db SPRITE_ROCKET
+ db SPRITE_MISTY
+ db SPRITE_POKE_BALL
+ db SPRITE_SLOWPOKE
+; 1455f
+
+SaffronGroupSprites: ; 1455f
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_SUPER_NERD
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_FISHER
+ db SPRITE_YOUNGSTER
+ db SPRITE_LASS
+ db SPRITE_POKEFAN_M
+ db SPRITE_ROCKET
+ db SPRITE_MISTY
+ db SPRITE_POKE_BALL
+ db SPRITE_SLOWPOKE
+; 14576
+
+CeladonGroupSprites: ; 14576
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_FISHER
+ db SPRITE_POLIWAG
+ db SPRITE_TEACHER
+ db SPRITE_GRAMPS
+ db SPRITE_YOUNGSTER
+ db SPRITE_LASS
+ db SPRITE_BIKER
+ db SPRITE_SILVER
+ db SPRITE_BLUE
+ db SPRITE_POKE_BALL
+ db SPRITE_FRUIT_TREE
+; 1458d
+
+LavenderGroupSprites: ; 1458d
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_POKEFAN_M
+ db SPRITE_MACHOP
+ db SPRITE_GRAMPS
+ db SPRITE_YOUNGSTER
+ db SPRITE_FISHER
+ db SPRITE_TEACHER
+ db SPRITE_SUPER_NERD
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_BIKER
+ db SPRITE_POKE_BALL
+ db SPRITE_FRUIT_TREE
+; 145a4
+
+VermilionGroupSprites: ; 145a4
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_POKEFAN_M
+ db SPRITE_MACHOP
+ db SPRITE_GRAMPS
+ db SPRITE_YOUNGSTER
+ db SPRITE_FISHER
+ db SPRITE_TEACHER
+ db SPRITE_SUPER_NERD
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_BIKER
+ db SPRITE_POKE_BALL
+ db SPRITE_FRUIT_TREE
+; 145bb
+
+FuchsiaGroupSprites: ; 145bb
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_POKEFAN_M
+ db SPRITE_MACHOP
+ db SPRITE_GRAMPS
+ db SPRITE_YOUNGSTER
+ db SPRITE_FISHER
+ db SPRITE_TEACHER
+ db SPRITE_SUPER_NERD
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_BIKER
+ db SPRITE_POKE_BALL
+ db SPRITE_FRUIT_TREE
+; 145d2
+
+IndigoGroupSprites: ; 145d2
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_POKEFAN_M
+ db SPRITE_BUENA
+ db SPRITE_GRAMPS
+ db SPRITE_YOUNGSTER
+ db SPRITE_FISHER
+ db SPRITE_TEACHER
+ db SPRITE_SUPER_NERD
+ db SPRITE_MACHOP
+ db SPRITE_BIKER
+ db SPRITE_POKE_BALL
+ db SPRITE_BOULDER
+; 145e9
+
+NewBarkGroupSprites: ; 145e9
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_SILVER
+ db SPRITE_TEACHER
+ db SPRITE_FISHER
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_YOUNGSTER
+ db SPRITE_MONSTER
+ db SPRITE_GRAMPS
+ db SPRITE_BUG_CATCHER
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_POKE_BALL
+ db SPRITE_FRUIT_TREE
+; 14600
+
+CherrygroveGroupSprites: ; 14600
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_SILVER
+ db SPRITE_TEACHER
+ db SPRITE_FISHER
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_YOUNGSTER
+ db SPRITE_MONSTER
+ db SPRITE_GRAMPS
+ db SPRITE_BUG_CATCHER
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_POKE_BALL
+ db SPRITE_FRUIT_TREE
+; 14617
+
+SilverGroupSprites: ; 14617
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_SILVER
+ db SPRITE_TEACHER
+ db SPRITE_FISHER
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_YOUNGSTER
+ db SPRITE_MONSTER
+ db SPRITE_GRAMPS
+ db SPRITE_BUG_CATCHER
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_POKE_BALL
+ db SPRITE_FRUIT_TREE
+; 1462e
+
+VioletGroupSprites: ; 1462e
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_FISHER
+ db SPRITE_LASS
+ db SPRITE_OFFICER
+ db SPRITE_GRAMPS
+ db SPRITE_YOUNGSTER
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_BUG_CATCHER
+ db SPRITE_SUPER_NERD
+ db SPRITE_WEIRD_TREE
+ db SPRITE_POKE_BALL
+ db SPRITE_FRUIT_TREE
+; 14645
+
+EcruteakGroupSprites: ; 14645
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_FISHER
+ db SPRITE_LASS
+ db SPRITE_OFFICER
+ db SPRITE_GRAMPS
+ db SPRITE_YOUNGSTER
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_BUG_CATCHER
+ db SPRITE_SUPER_NERD
+ db SPRITE_WEIRD_TREE
+ db SPRITE_POKE_BALL
+ db SPRITE_FRUIT_TREE
+; 1465c
+
+AzaleaGroupSprites: ; 1465c
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_KURT_OUTSIDE
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_GRAMPS
+ db SPRITE_YOUNGSTER
+ db SPRITE_OFFICER
+ db SPRITE_POKEFAN_M
+ db SPRITE_BLACK_BELT
+ db SPRITE_TEACHER
+ db SPRITE_AZALEA_ROCKET
+ db SPRITE_LASS
+ db SPRITE_SILVER
+ db SPRITE_FRUIT_TREE
+ db SPRITE_SLOWPOKE
+; 14673
+
+GoldenrodGroupSprites: ; 14673
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_POKE_BALL
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_GRAMPS
+ db SPRITE_YOUNGSTER
+ db SPRITE_OFFICER
+ db SPRITE_POKEFAN_M
+ db SPRITE_DAY_CARE_MON_1
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_ROCKET
+ db SPRITE_LASS
+ db SPRITE_DAY_CARE_MON_2
+ db SPRITE_FRUIT_TREE
+ db SPRITE_SLOWPOKE
+; 1468a
+
+CianwoodGroupSprites: ; 1468a
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_STANDING_YOUNGSTER
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_OLIVINE_RIVAL
+ db SPRITE_POKEFAN_M
+ db SPRITE_LASS
+ db SPRITE_BUENA
+ db SPRITE_SWIMMER_GIRL
+ db SPRITE_SAILOR
+ db SPRITE_POKEFAN_F
+ db SPRITE_SUPER_NERD
+ db SPRITE_TAUROS
+ db SPRITE_FRUIT_TREE
+ db SPRITE_ROCK
+; 146a1
+
+OlivineGroupSprites: ; 146a1
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_STANDING_YOUNGSTER
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_OLIVINE_RIVAL
+ db SPRITE_POKEFAN_M
+ db SPRITE_LASS
+ db SPRITE_BUENA
+ db SPRITE_SWIMMER_GIRL
+ db SPRITE_SAILOR
+ db SPRITE_POKEFAN_F
+ db SPRITE_SUPER_NERD
+ db SPRITE_TAUROS
+ db SPRITE_FRUIT_TREE
+ db SPRITE_ROCK
+; 146b8
+
+LakeOfRageGroupSprites: ; 146b8
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_LANCE
+ db SPRITE_GRAMPS
+ db SPRITE_SUPER_NERD
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_FISHER
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_LASS
+ db SPRITE_YOUNGSTER
+ db SPRITE_GYARADOS
+ db SPRITE_FRUIT_TREE
+ db SPRITE_POKE_BALL
+; 146cf
+
+MahoganyGroupSprites: ; 146cf
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_GRAMPS
+ db SPRITE_YOUNGSTER
+ db SPRITE_LASS
+ db SPRITE_SUPER_NERD
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_POKEFAN_M
+ db SPRITE_BLACK_BELT
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_FISHER
+ db SPRITE_FRUIT_TREE
+ db SPRITE_POKE_BALL
+; 146e6
+
+BlackthornGroupSprites: ; 146e6
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_GRAMPS
+ db SPRITE_YOUNGSTER
+ db SPRITE_LASS
+ db SPRITE_SUPER_NERD
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_POKEFAN_M
+ db SPRITE_BLACK_BELT
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_FISHER
+ db SPRITE_FRUIT_TREE
+ db SPRITE_POKE_BALL
+; 146fd
+
+DungeonsGroupSprites: ; 146fd
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_GAMEBOY_KID
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_LASS
+ db SPRITE_POKEFAN_F
+ db SPRITE_TEACHER
+ db SPRITE_YOUNGSTER
+ db SPRITE_GROWLITHE
+ db SPRITE_POKEFAN_M
+ db SPRITE_ROCKER
+ db SPRITE_FISHER
+ db SPRITE_SCIENTIST
+ db SPRITE_POKE_BALL
+ db SPRITE_BOULDER
+; 14714
+
+FastShipGroupSprites: ; 14714
+ db SPRITE_SUICUNE
+ db SPRITE_SILVER_TROPHY
+ db SPRITE_FAMICOM
+ db SPRITE_POKEDEX
+ db SPRITE_WILL
+ db SPRITE_KAREN
+ db SPRITE_NURSE
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_BIG_LAPRAS
+ db SPRITE_BIG_ONIX
+ db SPRITE_SUDOWOODO
+ db SPRITE_BIG_SNORLAX
+ db SPRITE_SAILOR
+ db SPRITE_FISHING_GURU
+ db SPRITE_GENTLEMAN
+ db SPRITE_SUPER_NERD
+ db SPRITE_HO_OH
+ db SPRITE_TEACHER
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_YOUNGSTER
+ db SPRITE_FAIRY
+ db SPRITE_POKE_BALL
+ db SPRITE_ROCK
+; 1472b
+
+CableClubGroupSprites: ; 1472b
+ db SPRITE_OAK
+ db SPRITE_FISHER
+ db SPRITE_TEACHER
+ db SPRITE_TWIN
+ db SPRITE_POKEFAN_M
+ db SPRITE_GRAMPS
+ db SPRITE_FAIRY
+ db SPRITE_SILVER
+ db SPRITE_FISHING_GURU
+ db SPRITE_POKE_BALL
+ db SPRITE_POKEDEX
+; 14736
diff --git a/data/maps/spawn_points.asm b/data/maps/spawn_points.asm
new file mode 100644
index 000000000..49ba362d7
--- /dev/null
+++ b/data/maps/spawn_points.asm
@@ -0,0 +1,41 @@
+spawn: MACRO
+; map, y, x
+ map \1
+ db \2, \3
+ENDM
+
+SpawnPoints: ; 0x152ab
+; entries correspond to SPAWN_* constants
+
+ spawn KRISS_HOUSE_2F, 3, 3
+ spawn VIRIDIAN_POKECENTER_1F, 5, 3
+
+ spawn PALLET_TOWN, 5, 6
+ spawn VIRIDIAN_CITY, 23, 26
+ spawn PEWTER_CITY, 13, 26
+ spawn CERULEAN_CITY, 19, 22
+ spawn ROUTE_10_NORTH, 11, 2
+ spawn VERMILION_CITY, 9, 6
+ spawn LAVENDER_TOWN, 5, 6
+ spawn SAFFRON_CITY, 9, 30
+ spawn CELADON_CITY, 29, 10
+ spawn FUCHSIA_CITY, 19, 28
+ spawn CINNABAR_ISLAND, 11, 12
+ spawn ROUTE_23, 9, 6
+
+ spawn NEW_BARK_TOWN, 13, 6
+ spawn CHERRYGROVE_CITY, 29, 4
+ spawn VIOLET_CITY, 31, 26
+ spawn ROUTE_32, 11, 74
+ spawn AZALEA_TOWN, 15, 10
+ spawn CIANWOOD_CITY, 23, 44
+ spawn GOLDENROD_CITY, 15, 28
+ spawn OLIVINE_CITY, 13, 22
+ spawn ECRUTEAK_CITY, 23, 28
+ spawn MAHOGANY_TOWN, 15, 14
+ spawn LAKE_OF_RAGE, 21, 29
+ spawn BLACKTHORN_CITY, 21, 30
+ spawn SILVER_CAVE_OUTSIDE, 23, 20
+ spawn FAST_SHIP_CABINS_SW_SSW_NW, 6, 2
+ spawn N_A, -1, -1
+; 1531f
diff --git a/data/mystery_gift/decos.asm b/data/mystery_gift/decos.asm
new file mode 100644
index 000000000..bdd4694c6
--- /dev/null
+++ b/data/mystery_gift/decos.asm
@@ -0,0 +1,40 @@
+MysteryGiftDecos: ; 2c74a
+ db DECOFLAG_PIKACHU_DOLL
+ db DECOFLAG_BULBASAUR_DOLL
+ db DECOFLAG_CHARMANDER_DOLL
+ db DECOFLAG_SQUIRTLE_DOLL
+ db DECOFLAG_POLIWAG_DOLL
+ db DECOFLAG_DIGLETT_DOLL
+ db DECOFLAG_STARMIE_DOLL
+ db DECOFLAG_MAGIKARP_DOLL
+ db DECOFLAG_ODDISH_DOLL
+ db DECOFLAG_GENGAR_DOLL
+ db DECOFLAG_CLEFAIRY_POSTER
+ db DECOFLAG_JIGGLYPUFF_POSTER
+ db DECOFLAG_SNES
+ db DECOFLAG_SHELLDER_DOLL
+ db DECOFLAG_VOLTORB_DOLL
+ db DECOFLAG_WEEDLE_DOLL
+ db DECOFLAG_MAGNAPLANT
+ db DECOFLAG_TROPICPLANT
+ db DECOFLAG_FAMICOM
+ db DECOFLAG_N64
+ db DECOFLAG_SURF_PIKACHU_DOLL
+ db DECOFLAG_JIGGLYPUFF_DOLL
+ db DECOFLAG_PINK_BED
+ db DECOFLAG_POLKADOT_BED
+ db DECOFLAG_RED_CARPET
+ db DECOFLAG_BLUE_CARPET
+ db DECOFLAG_YELLOW_CARPET
+ db DECOFLAG_GREEN_CARPET
+ db DECOFLAG_JUMBOPLANT
+ db DECOFLAG_VIRTUAL_BOY
+ db DECOFLAG_MACHOP_DOLL
+ db DECOFLAG_PIKACHU_POSTER
+ db DECOFLAG_TENTACOOL_DOLL
+ db DECOFLAG_BIG_ONIX_DOLL
+ db DECOFLAG_PIKACHU_BED
+ db DECOFLAG_GRIMER_DOLL
+ db DECOFLAG_UNOWN_DOLL
+MysteryGiftDecosEnd
+; 2c76f
diff --git a/data/mystery_gift/items.asm b/data/mystery_gift/items.asm
new file mode 100644
index 000000000..b2379071e
--- /dev/null
+++ b/data/mystery_gift/items.asm
@@ -0,0 +1,40 @@
+MysteryGiftItems: ; 2c725
+ db BERRY
+ db PRZCUREBERRY
+ db MINT_BERRY
+ db ICE_BERRY
+ db BURNT_BERRY
+ db PSNCUREBERRY
+ db GUARD_SPEC
+ db X_DEFEND
+ db X_ATTACK
+ db BITTER_BERRY
+ db DIRE_HIT
+ db X_SPECIAL
+ db X_ACCURACY
+ db EON_MAIL
+ db MORPH_MAIL
+ db MUSIC_MAIL
+ db MIRACLEBERRY
+ db GOLD_BERRY
+ db REVIVE
+ db GREAT_BALL
+ db SUPER_REPEL
+ db MAX_REPEL
+ db ELIXER
+ db ETHER
+ db WATER_STONE
+ db FIRE_STONE
+ db LEAF_STONE
+ db THUNDERSTONE
+ db MAX_ETHER
+ db MAX_ELIXER
+ db MAX_REVIVE
+ db SCOPE_LENS
+ db HP_UP
+ db PP_UP
+ db RARE_CANDY
+ db BLUESKY_MAIL
+ db MIRAGE_MAIL
+MysteryGiftItemsEnd:
+; 2c74a
diff --git a/data/name_input_chars.asm b/data/name_input_chars.asm
new file mode 100644
index 000000000..d89289142
--- /dev/null
+++ b/data/name_input_chars.asm
@@ -0,0 +1,31 @@
+; see engine/naming_screen.asm
+
+NameInputLower:
+ db "a b c d e f g h i"
+ db "j k l m n o p q r"
+ db "s t u v w x y z "
+ db "× ( ) : ; [ ] <PK> <MN>"
+ db "UPPER DEL END "
+
+BoxNameInputLower:
+ db "a b c d e f g h i"
+ db "j k l m n o p q r"
+ db "s t u v w x y z "
+ db "é 'd 'l 'm 'r 's 't 'v 0"
+ db "1 2 3 4 5 6 7 8 9"
+ db "UPPER DEL END "
+
+NameInputUpper:
+ db "A B C D E F G H I"
+ db "J K L M N O P Q R"
+ db "S T U V W X Y Z "
+ db "- ? ! / . , "
+ db "lower DEL END "
+
+BoxNameInputUpper:
+ db "A B C D E F G H I"
+ db "J K L M N O P Q R"
+ db "S T U V W X Y Z "
+ db "× ( ) : ; [ ] <PK> <MN>"
+ db "- ? ! ♂ ♀ / . , &"
+ db "lower DEL END "
diff --git a/data/npc_trades.asm b/data/npc_trades.asm
new file mode 100644
index 000000000..57b2411d3
--- /dev/null
+++ b/data/npc_trades.asm
@@ -0,0 +1,22 @@
+TRADE_EITHER_GENDER EQU 0
+TRADE_MALE_ONLY EQU 1
+TRADE_FEMALE_ONLY EQU 2
+
+npctrade: MACRO
+; dialog set, requested mon, offered mon, nickname, dvs, item, OT ID, OT name, gender requested
+ db \1, \2, \3, \4, \5, \6, \7
+ shift
+ dw \7
+ db \8, \9, 0
+ENDM
+
+NPCTrades: ; fce58
+; entries correspond to NPCTRADE_* constants
+ npctrade 0, ABRA, MACHOP, "MUSCLE@@@@@", $37, $66, GOLD_BERRY, 37460, "MIKE@@@@@@@", TRADE_EITHER_GENDER
+ npctrade 0, BELLSPROUT, ONIX, "ROCKY@@@@@@", $96, $66, BITTER_BERRY, 48926, "KYLE@@@@@@@", TRADE_EITHER_GENDER
+ npctrade 1, KRABBY, VOLTORB, "VOLTY@@@@@@", $98, $88, PRZCUREBERRY, 29189, "TIM@@@@@@@@", TRADE_EITHER_GENDER
+ npctrade 3, DRAGONAIR, DODRIO, "DORIS@@@@@@", $77, $66, SMOKE_BALL, 00283, "EMY@@@@@@@@", TRADE_FEMALE_ONLY
+ npctrade 2, HAUNTER, XATU, "PAUL@@@@@@@", $96, $86, MYSTERYBERRY, 15616, "CHRIS@@@@@@", TRADE_EITHER_GENDER
+ npctrade 3, CHANSEY, AERODACTYL, "AEROY@@@@@@", $96, $66, GOLD_BERRY, 26491, "KIM@@@@@@@@", TRADE_EITHER_GENDER
+ npctrade 0, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $96, $66, METAL_COAT, 50082, "FOREST@@@@@", TRADE_EITHER_GENDER
+; fcf38
diff --git a/data/odd_eggs.asm b/data/odd_eggs.asm
index 2a1e7d997..a46d84bdc 100644
--- a/data/odd_eggs.asm
+++ b/data/odd_eggs.asm
@@ -1,106 +1,9 @@
-GiveOddEgg: ; 1fb4b6
-
- ; Figure out which egg to give.
-
- ; Compare a random word to
- ; probabilities out of 0xffff.
- call Random
- ld hl, .Probabilities
- ld c, 0
- ld b, c
-.loop
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
-
- ; Break on $ffff.
- ld a, d
- cp $ffff / $100
- jr nz, .not_done
- ld a, e
- cp $ffff % $100
- jr z, .done
-.not_done
-
- ; Break when [hRandom] <= de.
- ld a, [hRandom + 1]
- cp d
- jr c, .done
- jr z, .ok
- jr .next
-.ok
- ld a, [hRandom + 0]
- cp e
- jr c, .done
- jr z, .done
-.next
- inc bc
- jr .loop
-.done
-
- ld hl, OddEggs
- ld a, OddEgg2 - OddEgg1
- call AddNTimes
-
- ld de, OddEggSpecies
- ld bc, PARTYMON_STRUCT_LENGTH + 2 * PKMN_NAME_LENGTH
- call CopyBytes
-
- ld a, EGG_TICKET
- ld [CurItem], a
- ld a, 1
- ld [wItemQuantityChangeBuffer], a
- ld a, -1
- ld [CurItemQuantity], a
- ld hl, NumItems
- call TossItem
-
- ; load species in wcd2a
- ld a, EGG
- ld [wMobileMonSpeciesBuffer], a
-
- ; load pointer to (wMobileMonSpeciesBuffer - 1) in wMobileMonSpeciesPointerBuffer
- ld a, (wMobileMonSpeciesBuffer - 1) % $100
- ld [wMobileMonSpeciesPointerBuffer], a
- ld a, (wMobileMonSpeciesBuffer - 1) / $100
- ld [wMobileMonSpeciesPointerBuffer + 1], a
- ; load pointer to OddEggSpecies in wMobileMonStructurePointerBuffer
- ld a, OddEggSpecies % $100
- ld [wMobileMonStructurePointerBuffer], a
- ld a, OddEggSpecies / $100
- ld [wMobileMonStructurePointerBuffer + 1], a
-
- ; load Odd Egg Name in wTempOddEggNickname
- ld hl, .Odd
- ld de, wTempOddEggNickname
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
-
- ; load pointer to wTempOddEggNickname in wMobileMonOTNamePointerBuffer
- ld a, wTempOddEggNickname % $100
- ld [wMobileMonOTNamePointerBuffer], a
- ld a, wTempOddEggNickname / $100
- ld [wMobileMonOTNamePointerBuffer + 1], a
- ; load pointer to wOddEggName in wMobileMonNicknamePointerBuffer
- ld a, wOddEggName % $100
- ld [wMobileMonNicknamePointerBuffer], a
- ld a, wOddEggName / $100
- ld [wMobileMonNicknamePointerBuffer + 1], a
- callba AddMobileMonToParty
- ret
-; 1fb546
-
-.Odd:
- db "ODD@@@@@@@@@"
-
-.Probabilities:
-
-prob: MACRO
+prob: macro
prob_total = prob_total + (\1)
dw prob_total * $ffff / 100
-ENDM
+endm
+OddEggProbabilities:
prob_total = 0
; Pichu
prob 8
diff --git a/data/palettes/49757.pal b/data/palettes/49757.pal
new file mode 100644
index 000000000..93e884046
--- /dev/null
+++ b/data/palettes/49757.pal
@@ -0,0 +1,39 @@
+ RGB 31, 31, 63
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 63
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 04, 02, 15
+ RGB 21, 00, 21
+ RGB 31, 00, 00
+ RGB 31, 31, 31
+
+ RGB 04, 02, 15
+ RGB 21, 00, 21
+ RGB 30, 16, 26
+ RGB 31, 31, 31
+
+ RGB 04, 02, 15
+ RGB 21, 00, 21
+ RGB 16, 16, 16
+ RGB 31, 31, 31
+
+ RGB 04, 02, 15
+ RGB 21, 00, 21
+ RGB 31, 12, 12
+ RGB 31, 31, 31
+
+ RGB 04, 02, 15
+ RGB 21, 00, 21
+ RGB 07, 08, 31
+ RGB 31, 31, 31
+
+ RGB 04, 02, 15
+ RGB 21, 00, 21
+ RGB 29, 28, 09
+ RGB 31, 31, 31
diff --git a/data/palettes/979c.pal b/data/palettes/979c.pal
new file mode 100644
index 000000000..3940a030a
--- /dev/null
+++ b/data/palettes/979c.pal
@@ -0,0 +1,29 @@
+ RGB 31, 31, 31
+ RGB 25, 25, 25
+ RGB 13, 13, 13
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 07
+ RGB 31, 16, 01
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 19, 24
+ RGB 30, 10, 06
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 12, 25, 01
+ RGB 05, 14, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 08, 12, 31
+ RGB 01, 04, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 24, 18, 07
+ RGB 20, 15, 03
+ RGB 00, 00, 00
diff --git a/data/palettes/b6f1.pal b/data/palettes/b6f1.pal
new file mode 100644
index 000000000..1dd56f50f
--- /dev/null
+++ b/data/palettes/b6f1.pal
@@ -0,0 +1,24 @@
+ RGB 31, 31, 31
+ RGB 18, 23, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 22, 00, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 00, 00
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 25, 22, 00
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 23, 26, 31
+ RGB 18, 23, 31
+ RGB 00, 00, 00
diff --git a/data/palettes/b719.pal b/data/palettes/b719.pal
new file mode 100644
index 000000000..09dd9a364
--- /dev/null
+++ b/data/palettes/b719.pal
@@ -0,0 +1,9 @@
+ RGB 31, 31, 31
+ RGB 07, 06, 03
+ RGB 07, 06, 03
+ RGB 07, 06, 03
+
+ RGB 31, 31, 31
+ RGB 31, 31, 00
+ RGB 26, 22, 00
+ RGB 00, 00, 00
diff --git a/data/palettes/b789.pal b/data/palettes/b789.pal
new file mode 100644
index 000000000..cce760662
--- /dev/null
+++ b/data/palettes/b789.pal
@@ -0,0 +1,19 @@
+ RGB 31, 31, 31
+ RGB 30, 22, 24
+ RGB 18, 18, 18
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 10, 11, 31
+ RGB 18, 18, 18
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 12, 31, 11
+ RGB 18, 18, 18
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 29, 26, 05
+ RGB 18, 18, 18
+ RGB 00, 00, 00
diff --git a/data/palettes/card_flip.pal b/data/palettes/card_flip.pal
new file mode 100644
index 000000000..24c5566f8
--- /dev/null
+++ b/data/palettes/card_flip.pal
@@ -0,0 +1,44 @@
+ RGB 31, 31, 31
+ RGB 17, 07, 31
+ RGB 06, 19, 08
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 29, 25, 00
+ RGB 06, 19, 08
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 13, 30
+ RGB 06, 19, 08
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 08, 17, 30
+ RGB 06, 19, 08
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 08, 31, 08
+ RGB 06, 19, 08
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 17, 07, 31
+ RGB 06, 19, 08
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 17, 07, 31
+ RGB 06, 19, 08
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 17, 07, 31
+ RGB 06, 19, 08
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 00, 00
+ RGB 31, 00, 00
diff --git a/data/palettes/credits.pal b/data/palettes/credits.pal
new file mode 100644
index 000000000..c473f0414
--- /dev/null
+++ b/data/palettes/credits.pal
@@ -0,0 +1,19 @@
+; pichu
+ RGB 31,00,31, 31,25,00, 11,14,31, 07,07,07
+ RGB 31,05,05, 11,14,31, 11,14,31, 31,31,31
+ RGB 31,05,05, 00,00,00, 31,31,31, 31,31,31
+
+; smoochum
+ RGB 31,31,31, 31,27,00, 26,06,31, 07,07,07
+ RGB 03,13,31, 20,00,24, 26,06,31, 31,31,31
+ RGB 03,13,31, 00,00,00, 31,31,31, 31,31,31
+
+; ditto
+ RGB 31,31,31, 23,12,28, 31,22,00, 07,07,07
+ RGB 03,20,00, 31,22,00, 31,22,00, 31,31,31
+ RGB 03,20,00, 00,00,00, 31,31,31, 31,31,31
+
+; igglybuff
+ RGB 31,31,31, 31,10,31, 31,00,09, 07,07,07
+ RGB 31,14,00, 31,00,09, 31,00,09, 31,31,31
+ RGB 31,14,00, 31,31,31, 31,31,31, 31,31,31
diff --git a/data/palettes/crystal_intro/fade.pal b/data/palettes/crystal_intro/fade.pal
new file mode 100644
index 000000000..8e03cbc43
--- /dev/null
+++ b/data/palettes/crystal_intro/fade.pal
@@ -0,0 +1,41 @@
+; Fade to white.
+
+ RGB 24, 12, 09
+ RGB 31, 31, 31
+ RGB 12, 00, 31
+ RGB 00, 00, 00
+
+ RGB 31, 19, 05
+ RGB 31, 31, 31
+ RGB 15, 05, 31
+ RGB 07, 07, 07
+
+ RGB 31, 21, 09
+ RGB 31, 31, 31
+ RGB 18, 09, 31
+ RGB 11, 11, 11
+
+ RGB 31, 23, 13
+ RGB 31, 31, 31
+ RGB 21, 13, 31
+ RGB 15, 15, 15
+
+ RGB 31, 25, 17
+ RGB 31, 31, 31
+ RGB 25, 17, 31
+ RGB 19, 19, 19
+
+ RGB 31, 27, 21
+ RGB 31, 31, 31
+ RGB 27, 21, 31
+ RGB 23, 23, 23
+
+ RGB 31, 29, 25
+ RGB 31, 31, 31
+ RGB 29, 26, 31
+ RGB 27, 27, 27
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
diff --git a/data/palettes/crystal_intro/gamefreak_logo.pal b/data/palettes/crystal_intro/gamefreak_logo.pal
new file mode 100644
index 000000000..c3a526b82
--- /dev/null
+++ b/data/palettes/crystal_intro/gamefreak_logo.pal
@@ -0,0 +1,23 @@
+; Ditto's color as it turns into the Game Freak logo.
+; Fade from pink to orange.
+; One color per step.
+
+ RGB 23, 12, 28
+ RGB 23, 12, 27
+ RGB 23, 13, 26
+ RGB 23, 13, 24
+
+ RGB 24, 14, 22
+ RGB 24, 14, 20
+ RGB 24, 15, 18
+ RGB 24, 15, 16
+
+ RGB 25, 16, 14
+ RGB 25, 16, 12
+ RGB 25, 17, 10
+ RGB 25, 17, 08
+
+ RGB 26, 18, 06
+ RGB 26, 18, 04
+ RGB 26, 19, 02
+ RGB 26, 19, 00
diff --git a/data/palettes/crystal_intro/intro_1.pal b/data/palettes/crystal_intro/intro_1.pal
new file mode 100644
index 000000000..ae0faadac
--- /dev/null
+++ b/data/palettes/crystal_intro/intro_1.pal
@@ -0,0 +1,79 @@
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 0, 4, 5
+ RGB 1, 8, 5
+ RGB 4, 12, 9
+ RGB 24, 12, 9
+
+ RGB 0, 4, 5
+ RGB 9, 6, 8
+ RGB 8, 16, 5
+ RGB 5, 10, 4
+
+ RGB 31, 31, 31
+ RGB 9, 6, 8
+ RGB 18, 9, 9
+ RGB 13, 8, 9
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 2, 5, 22
+ RGB 1, 5, 12
+
+ RGB 31, 31, 31
+ RGB 31, 10, 25
+ RGB 31, 21, 0
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 21, 31
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
diff --git a/data/palettes/crystal_intro/intro_2.pal b/data/palettes/crystal_intro/intro_2.pal
new file mode 100644
index 000000000..5f83df020
--- /dev/null
+++ b/data/palettes/crystal_intro/intro_2.pal
@@ -0,0 +1,79 @@
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 10, 0, 10
+ RGB 19, 0, 19
+ RGB 31, 0, 31
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
diff --git a/data/palettes/crystal_intro/intro_3.pal b/data/palettes/crystal_intro/intro_3.pal
new file mode 100644
index 000000000..95f3e052a
--- /dev/null
+++ b/data/palettes/crystal_intro/intro_3.pal
@@ -0,0 +1,79 @@
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
diff --git a/data/palettes/crystal_intro/intro_4.pal b/data/palettes/crystal_intro/intro_4.pal
new file mode 100644
index 000000000..fdcf058de
--- /dev/null
+++ b/data/palettes/crystal_intro/intro_4.pal
@@ -0,0 +1,79 @@
+ RGB 24, 12, 9
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 24, 12, 9
+ RGB 31, 31, 31
+ RGB 8, 9, 31
+ RGB 0, 0, 0
+
+ RGB 24, 12, 9
+ RGB 12, 20, 31
+ RGB 19, 8, 31
+ RGB 0, 0, 0
+
+ RGB 12, 20, 31
+ RGB 8, 9, 31
+ RGB 19, 8, 31
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 12, 20, 31
+ RGB 8, 9, 31
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
diff --git a/data/palettes/crystal_intro/intro_5.pal b/data/palettes/crystal_intro/intro_5.pal
new file mode 100644
index 000000000..5b1be1a5f
--- /dev/null
+++ b/data/palettes/crystal_intro/intro_5.pal
@@ -0,0 +1,79 @@
+ RGB 24, 12, 9
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 24, 12, 9
+ RGB 31, 31, 31
+ RGB 8, 9, 31
+ RGB 0, 0, 0
+
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+ RGB 24, 12, 9
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 12, 0, 31
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 21, 9, 0
+ RGB 21, 9, 0
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
diff --git a/data/palettes/debug/bg.pal b/data/palettes/debug/bg.pal
new file mode 100644
index 000000000..d0b573598
--- /dev/null
+++ b/data/palettes/debug/bg.pal
@@ -0,0 +1,43 @@
+ ; white
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+
+ ; red
+ RGB 31, 00, 00
+ RGB 31, 00, 00
+ RGB 31, 00, 00
+ RGB 00, 00, 00
+
+ ; green
+ RGB 00, 31, 00
+ RGB 00, 31, 00
+ RGB 00, 31, 00
+ RGB 00, 00, 00
+
+ ; blue
+ RGB 00, 00, 31
+ RGB 00, 00, 31
+ RGB 00, 00, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 00, 00, 00
diff --git a/data/palettes/debug/ob.pal b/data/palettes/debug/ob.pal
new file mode 100644
index 000000000..2a03f4e8f
--- /dev/null
+++ b/data/palettes/debug/ob.pal
@@ -0,0 +1,42 @@
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+
+ ; red
+ RGB 31, 31, 31
+ RGB 31, 00, 00
+ RGB 31, 00, 00
+ RGB 00, 00, 00
+
+ ; green
+ RGB 31, 31, 31
+ RGB 00, 31, 00
+ RGB 00, 31, 00
+ RGB 00, 00, 00
+
+ ; blue
+ RGB 31, 31, 31
+ RGB 00, 00, 31
+ RGB 00, 00, 31
+ RGB 00, 00, 00
diff --git a/data/palettes/diploma.pal b/data/palettes/diploma.pal
new file mode 100644
index 000000000..2c9ec6453
--- /dev/null
+++ b/data/palettes/diploma.pal
@@ -0,0 +1,39 @@
+ RGB 27, 31, 27
+ RGB 21, 21, 21
+ RGB 13, 13, 13
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 07, 06
+ RGB 20, 02, 03
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 10, 31, 09
+ RGB 04, 14, 01
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 08, 12, 31
+ RGB 01, 04, 31
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 31, 07
+ RGB 31, 16, 01
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 22, 16, 08
+ RGB 13, 07, 01
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 15, 31, 31
+ RGB 05, 17, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 11, 11, 19
+ RGB 07, 07, 12
+ RGB 00, 00, 00
diff --git a/data/palettes/mail.pal b/data/palettes/mail.pal
new file mode 100644
index 000000000..4096ffae1
--- /dev/null
+++ b/data/palettes/mail.pal
@@ -0,0 +1,49 @@
+ RGB 20, 31, 11
+ RGB 31, 19, 00
+ RGB 31, 10, 09
+ RGB 00, 00, 00
+
+ RGB 15, 20, 31
+ RGB 30, 26, 00
+ RGB 31, 12, 00
+ RGB 00, 00, 00
+
+ RGB 24, 17, 31
+ RGB 30, 26, 00
+ RGB 08, 11, 31
+ RGB 00, 00, 00
+
+ RGB 31, 25, 17
+ RGB 31, 18, 04
+ RGB 28, 12, 05
+ RGB 00, 00, 00
+
+ RGB 19, 26, 31
+ RGB 31, 05, 08
+ RGB 31, 09, 31
+ RGB 00, 00, 00
+
+ RGB 31, 19, 28
+ RGB 31, 21, 00
+ RGB 12, 22, 00
+ RGB 00, 00, 00
+
+ RGB 19, 17, 23
+ RGB 30, 26, 00
+ RGB 31, 12, 00
+ RGB 00, 00, 00
+
+ RGB 07, 26, 31
+ RGB 26, 26, 27
+ RGB 31, 11, 11
+ RGB 00, 00, 00
+
+ RGB 21, 31, 21
+ RGB 30, 26, 00
+ RGB 31, 12, 00
+ RGB 00, 00, 00
+
+ RGB 07, 26, 31
+ RGB 31, 31, 00
+ RGB 00, 21, 00
+ RGB 00, 00, 00
diff --git a/data/palettes/map_objects.pal b/data/palettes/map_objects.pal
new file mode 100644
index 000000000..a6e20d7f0
--- /dev/null
+++ b/data/palettes/map_objects.pal
@@ -0,0 +1,39 @@
+ ; morn
+ RGB 28,31,16, 31,19,10, 31,07,01, 00,00,00 ; red
+ RGB 28,31,16, 31,19,10, 10,09,31, 00,00,00 ; blue
+ RGB 28,31,16, 31,19,10, 07,23,03, 00,00,00 ; green
+ RGB 28,31,16, 31,19,10, 15,10,03, 00,00,00 ; brown
+ RGB 28,31,16, 31,19,10, 30,10,06, 00,00,00 ; pink
+ RGB 31,31,31, 31,31,31, 13,13,13, 00,00,00 ; silver
+ RGB 22,31,10, 12,25,01, 05,14,00, 07,07,07 ; tree
+ RGB 28,31,16, 24,18,07, 20,15,03, 07,07,07 ; rock
+
+ ; day
+ RGB 27,31,27, 31,19,10, 31,07,01, 00,00,00 ; red
+ RGB 27,31,27, 31,19,10, 10,09,31, 00,00,00 ; blue
+ RGB 27,31,27, 31,19,10, 07,23,03, 00,00,00 ; green
+ RGB 27,31,27, 31,19,10, 15,10,03, 00,00,00 ; brown
+ RGB 27,31,27, 31,19,10, 30,10,06, 00,00,00 ; pink
+ RGB 31,31,31, 31,31,31, 13,13,13, 00,00,00 ; silver
+ RGB 22,31,10, 12,25,01, 05,14,00, 07,07,07 ; tree
+ RGB 27,31,27, 24,18,07, 20,15,03, 07,07,07 ; rock
+
+ ; nite
+ RGB 15,14,24, 31,19,10, 31,07,01, 00,00,00 ; red
+ RGB 15,14,24, 31,19,10, 10,09,31, 00,00,00 ; blue
+ RGB 15,14,24, 31,19,10, 07,23,03, 00,00,00 ; green
+ RGB 15,14,24, 31,19,10, 15,10,03, 00,00,00 ; brown
+ RGB 15,14,24, 31,19,10, 30,10,06, 00,00,00 ; pink
+ RGB 31,31,31, 31,31,31, 13,13,13, 00,00,00 ; silver
+ RGB 15,14,24, 08,13,19, 00,11,13, 00,00,00 ; tree
+ RGB 15,14,24, 12,09,15, 08,04,05, 00,00,00 ; rock
+
+ ; dark
+ RGB 01,01,02, 31,19,10, 31,07,01, 00,00,00 ; red
+ RGB 01,01,02, 31,19,10, 10,09,31, 00,00,00 ; blue
+ RGB 01,01,02, 31,19,10, 07,23,03, 00,00,00 ; green
+ RGB 01,01,02, 31,19,10, 15,10,03, 00,00,00 ; brown
+ RGB 01,01,02, 31,19,10, 30,10,06, 00,00,00 ; pink
+ RGB 31,31,31, 31,31,31, 13,13,13, 00,00,00 ; silver
+ RGB 01,01,02, 00,00,00, 00,00,00, 00,00,00 ; tree
+ RGB 01,01,02, 00,00,00, 00,00,00, 00,00,00 ; rock
diff --git a/data/palettes/mg_mobile.pal b/data/palettes/mg_mobile.pal
new file mode 100644
index 000000000..c77e8c63f
--- /dev/null
+++ b/data/palettes/mg_mobile.pal
@@ -0,0 +1,24 @@
+ RGB 03, 07, 09
+ RGB 26, 31, 00
+ RGB 20, 16, 03
+ RGB 31, 31, 31
+
+ RGB 13, 24, 29
+ RGB 11, 16, 30
+ RGB 07, 11, 22
+ RGB 05, 06, 18
+
+ RGB 31, 31, 31
+ RGB 20, 26, 31
+ RGB 13, 24, 29
+ RGB 11, 16, 30
+
+ RGB 31, 31, 31
+ RGB 20, 26, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 20, 16, 08
+ RGB 31, 00, 00
+ RGB 00, 00, 00
diff --git a/data/palettes/pack.pal b/data/palettes/pack.pal
new file mode 100644
index 000000000..e8b4979bb
--- /dev/null
+++ b/data/palettes/pack.pal
@@ -0,0 +1,29 @@
+ RGB 31, 31, 31
+ RGB 15, 15, 31
+ RGB 00, 00, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 15, 15, 31
+ RGB 00, 00, 31
+ RGB 00, 00, 00
+
+ RGB 31, 11, 31
+ RGB 15, 15, 31
+ RGB 00, 00, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 15, 15, 31
+ RGB 00, 00, 31
+ RGB 31, 00, 00
+
+ RGB 31, 31, 31
+ RGB 15, 15, 31
+ RGB 31, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 07, 19, 07
+ RGB 07, 19, 07
+ RGB 00, 00, 00
diff --git a/data/palettes/pack_f.pal b/data/palettes/pack_f.pal
new file mode 100644
index 000000000..a962d97d1
--- /dev/null
+++ b/data/palettes/pack_f.pal
@@ -0,0 +1,29 @@
+ RGB 31, 31, 31
+ RGB 31, 14, 31
+ RGB 31, 07, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 14, 31
+ RGB 31, 07, 31
+ RGB 00, 00, 00
+
+ RGB 15, 15, 31
+ RGB 31, 14, 31
+ RGB 31, 07, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 14, 31
+ RGB 31, 07, 31
+ RGB 31, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 14, 31
+ RGB 31, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 07, 19, 07
+ RGB 07, 19, 07
+ RGB 00, 00, 00
diff --git a/data/palettes/party_menu.pal b/data/palettes/party_menu.pal
new file mode 100644
index 000000000..70af517be
--- /dev/null
+++ b/data/palettes/party_menu.pal
@@ -0,0 +1,69 @@
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 10, 14, 20
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 27, 31, 27
+ RGB 31, 19, 10
+ RGB 31, 07, 04
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 21, 21, 21
+ RGB 13, 13, 13
+ RGB 07, 07, 07
+
+ RGB 31, 31, 31
+ RGB 31, 31, 07
+ RGB 31, 16, 01
+ RGB 07, 07, 07
+
+ RGB 31, 31, 31
+ RGB 31, 19, 24
+ RGB 30, 10, 06
+ RGB 07, 07, 07
+
+ RGB 31, 31, 31
+ RGB 12, 25, 01
+ RGB 05, 14, 00
+ RGB 07, 07, 07
+
+ RGB 31, 31, 31
+ RGB 08, 12, 31
+ RGB 01, 04, 31
+ RGB 07, 07, 07
+
+ RGB 31, 31, 31
+ RGB 24, 18, 07
+ RGB 20, 15, 03
+ RGB 07, 07, 07
diff --git a/data/palettes/pokegear.pal b/data/palettes/pokegear.pal
new file mode 100644
index 000000000..397986dec
--- /dev/null
+++ b/data/palettes/pokegear.pal
@@ -0,0 +1,29 @@
+ RGB 28, 31, 20
+ RGB 21, 21, 21
+ RGB 13, 13, 13
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 00, 00, 31
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 15, 07, 00
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 31, 15, 00
+ RGB 15, 07, 00
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 00, 00, 31
+ RGB 31, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 15, 07, 00
+ RGB 31, 00, 00
diff --git a/data/palettes/pokegear_f.pal b/data/palettes/pokegear_f.pal
new file mode 100644
index 000000000..3f797c866
--- /dev/null
+++ b/data/palettes/pokegear_f.pal
@@ -0,0 +1,29 @@
+ RGB 28, 31, 20
+ RGB 21, 21, 21
+ RGB 13, 13, 13
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 00, 00, 31
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 15, 07, 00
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 10, 18, 31
+ RGB 13, 06, 31
+ RGB 00, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 00, 00, 31
+ RGB 31, 00, 00
+
+ RGB 28, 31, 20
+ RGB 00, 31, 00
+ RGB 15, 07, 00
+ RGB 31, 00, 00
diff --git a/data/palettes/predef.pal b/data/palettes/predef.pal
new file mode 100644
index 000000000..6975f17a2
--- /dev/null
+++ b/data/palettes/predef.pal
@@ -0,0 +1,394 @@
+ RGB 31, 31, 31
+ RGB 22, 25, 19
+ RGB 16, 21, 30
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 27, 28, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 24, 28, 19
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 24, 24, 24
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 21, 23, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 24, 21, 27
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 24, 16
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 25, 30, 26
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 25, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 20, 19
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 26, 19
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 27, 28, 27
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 24, 30, 23
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 29, 24, 29
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 23, 29
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 25, 23, 20
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 29, 26, 18
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 21, 18
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 25, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 22, 21, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 22, 25, 21
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 21, 21, 22
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 20, 20
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 26, 26
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 21, 14, 09
+ RGB 15, 20, 20
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 12, 28, 22
+ RGB 15, 20, 20
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 07, 07, 07
+ RGB 02, 03, 03
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 22, 17
+ RGB 16, 14, 19
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 18, 20, 27
+ RGB 11, 15, 23
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 20, 10
+ RGB 26, 10, 06
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 21, 25, 29
+ RGB 14, 19, 25
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 27, 22, 24
+ RGB 21, 15, 23
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 28, 20, 15
+ RGB 21, 14, 09
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 20, 26, 16
+ RGB 09, 20, 11
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 22, 24
+ RGB 28, 15, 21
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 28, 14
+ RGB 26, 20, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 21, 22
+ RGB 15, 15, 18
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 23, 19, 13
+ RGB 14, 12, 17
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 18, 21
+ RGB 10, 12, 18
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 22, 15, 16
+ RGB 17, 02, 05
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 15, 20, 20
+ RGB 05, 16, 16
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 23, 15, 19
+ RGB 14, 04, 12
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 20, 17, 18
+ RGB 18, 13, 11
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 23, 21, 16
+ RGB 12, 12, 10
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 21, 25, 29
+ RGB 30, 22, 24
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 23, 16
+ RGB 29, 14, 09
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 18, 18, 18
+ RGB 10, 10, 10
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 26, 15
+ RGB 00, 23, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 26, 15
+ RGB 31, 23, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 26, 15
+ RGB 31, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 29, 26, 19
+ RGB 27, 20, 14
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 24, 20, 10
+ RGB 21, 00, 04
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 20, 10
+ RGB 21, 00, 04
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 26, 16
+ RGB 16, 12, 09
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 15, 28, 26
+ RGB 12, 22, 26
+ RGB 03, 16, 14
+
+ RGB 31, 31, 31
+ RGB 15, 28, 26
+ RGB 23, 24, 24
+ RGB 00, 00, 00
+
+ RGB 31, 31, 24
+ RGB 07, 27, 19
+ RGB 26, 20, 10
+ RGB 19, 12, 08
+
+ RGB 31, 31, 31
+ RGB 31, 28, 14
+ RGB 31, 13, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 18, 21
+ RGB 10, 12, 18
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 23, 21, 16
+ RGB 12, 12, 10
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 14, 00
+ RGB 07, 11, 15
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 21, 22
+ RGB 26, 10, 06
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 27, 04
+ RGB 24, 20, 11
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 13, 25
+ RGB 24, 20, 11
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 19, 29
+ RGB 24, 20, 11
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 22, 24
+ RGB 18, 18, 18
+ RGB 16, 10, 07
+
+ RGB 31, 31, 31
+ RGB 21, 25, 29
+ RGB 18, 18, 18
+ RGB 16, 10, 07
+
+ RGB 31, 31, 31
+ RGB 20, 26, 16
+ RGB 18, 18, 18
+ RGB 16, 10, 07
+
+ RGB 31, 31, 31
+ RGB 31, 28, 14
+ RGB 18, 18, 18
+ RGB 16, 10, 07
+
+ RGB 31, 31, 31
+ RGB 18, 18, 18
+ RGB 26, 10, 06
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 22, 24
+ RGB 28, 15, 21
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 26, 20, 00
+ RGB 16, 19, 29
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 02, 30
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 13, 04
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 28, 04, 02
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 18, 23, 31
+ RGB 15, 20, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 24, 20, 11
+ RGB 18, 13, 11
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 25, 30, 00
+ RGB 25, 30, 00
+
+ RGB 00, 00, 00
+ RGB 08, 11, 11
+ RGB 21, 21, 21
+ RGB 31, 31, 31
diff --git a/data/palettes/roofs.pal b/data/palettes/roofs.pal
new file mode 100644
index 000000000..ba65fc7d2
--- /dev/null
+++ b/data/palettes/roofs.pal
@@ -0,0 +1,161 @@
+; group 0 (unused)
+ RGB 21, 21, 21
+ RGB 11, 11, 11
+ RGB 21, 21, 21
+ RGB 11, 11, 11
+
+; group 1 (Olivine)
+ RGB 14, 17, 31
+ RGB 07, 11, 15
+ RGB 09, 09, 17
+ RGB 05, 07, 13
+
+; group 2 (Mahogany)
+ RGB 12, 19, 00
+ RGB 06, 10, 00
+ RGB 06, 09, 07
+ RGB 04, 05, 06
+
+; group 3
+ RGB 21, 21, 21
+ RGB 11, 11, 11
+ RGB 21, 21, 21
+ RGB 17, 08, 07
+
+; group 4 (Ecruteak)
+ RGB 31, 19, 00
+ RGB 27, 10, 05
+ RGB 15, 07, 02
+ RGB 11, 04, 02
+
+; group 5 (Blackthorn)
+ RGB 11, 10, 16
+ RGB 05, 06, 07
+ RGB 03, 04, 08
+ RGB 00, 00, 00
+
+; group 6 (Cinnabar)
+ RGB 31, 10, 00
+ RGB 18, 06, 00
+ RGB 18, 05, 09
+ RGB 17, 08, 07
+
+; group 7 (Cerulean)
+ RGB 17, 27, 31
+ RGB 05, 15, 31
+ RGB 07, 08, 22
+ RGB 07, 07, 16
+
+; group 8 (Azalea)
+ RGB 22, 20, 10
+ RGB 17, 14, 03
+ RGB 11, 11, 05
+ RGB 10, 09, 07
+
+; group 9 (Lake of Rage)
+ RGB 31, 08, 04
+ RGB 09, 09, 08
+ RGB 18, 05, 09
+ RGB 09, 09, 08
+
+; group 10 (Violet)
+ RGB 24, 14, 31
+ RGB 13, 07, 21
+ RGB 12, 03, 18
+ RGB 09, 03, 15
+
+; group 11 (Goldenrod)
+ RGB 25, 25, 00
+ RGB 20, 17, 08
+ RGB 12, 12, 00
+ RGB 10, 09, 05
+
+; group 12 (Vermilion)
+ RGB 27, 23, 01
+ RGB 23, 11, 00
+ RGB 15, 11, 01
+ RGB 11, 10, 01
+
+; group 13 (Pallet)
+ RGB 27, 28, 31
+ RGB 17, 19, 22
+ RGB 14, 14, 18
+ RGB 10, 09, 13
+
+; group 14 (Pewter)
+ RGB 19, 19, 16
+ RGB 10, 12, 15
+ RGB 09, 09, 11
+ RGB 04, 05, 07
+
+; group 15 (Mount Moon Square)
+ RGB 14, 17, 31
+ RGB 07, 11, 15
+ RGB 09, 13, 19
+ RGB 07, 07, 16
+
+; group 16 (Route 23)
+ RGB 21, 21, 21
+ RGB 13, 13, 13
+ RGB 11, 11, 19
+ RGB 07, 07, 12
+
+; group 17 (Fuchsia)
+ RGB 31, 18, 29
+ RGB 17, 13, 20
+ RGB 14, 06, 12
+ RGB 11, 03, 10
+
+; group 18 (Lavender)
+ RGB 23, 15, 31
+ RGB 16, 05, 31
+ RGB 12, 07, 17
+ RGB 08, 06, 10
+
+; group 19 (Route 28)
+ RGB 21, 21, 25
+ RGB 16, 16, 16
+ RGB 13, 13, 13
+ RGB 07, 07, 07
+
+; group 20
+ RGB 21, 21, 21
+ RGB 11, 11, 11
+ RGB 21, 21, 21
+ RGB 11, 11, 11
+
+; group 21 (Celadon)
+ RGB 19, 31, 15
+ RGB 31, 22, 02
+ RGB 12, 13, 09
+ RGB 09, 12, 03
+
+; group 22 (Cianwood)
+ RGB 15, 10, 31
+ RGB 07, 05, 15
+ RGB 06, 05, 17
+ RGB 02, 02, 08
+
+; group 23 (Viridian)
+ RGB 21, 31, 07
+ RGB 13, 25, 04
+ RGB 09, 14, 08
+ RGB 06, 10, 04
+
+; group 24 (New Bark)
+ RGB 20, 31, 14
+ RGB 11, 23, 05
+ RGB 09, 13, 08
+ RGB 06, 09, 04
+
+; group 25 (Saffron)
+ RGB 31, 26, 00
+ RGB 31, 15, 00
+ RGB 13, 13, 01
+ RGB 08, 08, 01
+
+; group 26 (Cherrygrove)
+ RGB 31, 14, 28
+ RGB 31, 05, 21
+ RGB 14, 07, 17
+ RGB 13, 00, 08
diff --git a/data/palettes/sgb_border.pal b/data/palettes/sgb_border.pal
new file mode 100644
index 000000000..fd5aec402
--- /dev/null
+++ b/data/palettes/sgb_border.pal
@@ -0,0 +1,79 @@
+ RGB 24, 06, 06
+ RGB 24, 24, 26
+ RGB 14, 15, 20
+ RGB 04, 07, 10
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 18, 24, 18
+ RGB 31, 26, 15
+ RGB 26, 19, 10
+ RGB 12, 07, 05
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 18, 06, 31
+ RGB 31, 31, 29
+ RGB 31, 12, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 12, 31, 06
+ RGB 22, 26, 30
+ RGB 16, 17, 21
+ RGB 00, 03, 00
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
+ RGB 31, 31, 25
diff --git a/data/palettes/slot_machine.pal b/data/palettes/slot_machine.pal
new file mode 100644
index 000000000..0eec479f2
--- /dev/null
+++ b/data/palettes/slot_machine.pal
@@ -0,0 +1,79 @@
+ RGB 31, 31, 31
+ RGB 24, 25, 28
+ RGB 24, 24, 09
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 10, 06
+ RGB 24, 24, 09
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 15, 31, 00
+ RGB 24, 24, 09
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 15, 31
+ RGB 24, 24, 09
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 15, 21, 31
+ RGB 24, 24, 09
+ RGB 00, 00, 00
+
+ RGB 31, 31, 11
+ RGB 31, 31, 06
+ RGB 24, 24, 09
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 19, 29
+ RGB 25, 22, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 21, 21, 21
+ RGB 13, 13, 13
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 30, 10, 06
+ RGB 31, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 12, 25, 01
+ RGB 05, 14, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 12, 25, 01
+ RGB 30, 10, 06
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 06
+ RGB 20, 15, 03
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 06
+ RGB 15, 21, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 06
+ RGB 20, 15, 03
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 24, 21
+ RGB 31, 13, 31
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
diff --git a/data/palettes/tileset_bg.pal b/data/palettes/tileset_bg.pal
new file mode 100644
index 000000000..3cd14d142
--- /dev/null
+++ b/data/palettes/tileset_bg.pal
@@ -0,0 +1,227 @@
+; morn
+
+; gray
+ RGB 28, 31, 16
+ RGB 21, 21, 21
+ RGB 13, 13, 13
+ RGB 07, 07, 07
+; red
+ RGB 28, 31, 16
+ RGB 31, 19, 24
+ RGB 30, 10, 06
+ RGB 07, 07, 07
+; green
+ RGB 22, 31, 10
+ RGB 12, 25, 01
+ RGB 05, 14, 00
+ RGB 07, 07, 07
+; water
+ RGB 31, 31, 31
+ RGB 08, 12, 31
+ RGB 01, 04, 31
+ RGB 07, 07, 07
+; yellow
+ RGB 28, 31, 16
+ RGB 31, 31, 07
+ RGB 31, 16, 01
+ RGB 07, 07, 07
+; brown
+ RGB 28, 31, 16
+ RGB 24, 18, 07
+ RGB 20, 15, 03
+ RGB 07, 07, 07
+; roof
+ RGB 28, 31, 16
+ RGB 15, 31, 31
+ RGB 05, 17, 31
+ RGB 07, 07, 07
+; text
+ RGB 31, 31, 16
+ RGB 31, 31, 16
+ RGB 14, 09, 00
+ RGB 00, 00, 00
+
+; day
+
+; gray
+ RGB 27, 31, 27
+ RGB 21, 21, 21
+ RGB 13, 13, 13
+ RGB 07, 07, 07
+; red
+ RGB 27, 31, 27
+ RGB 31, 19, 24
+ RGB 30, 10, 06
+ RGB 07, 07, 07
+; green
+ RGB 22, 31, 10
+ RGB 12, 25, 01
+ RGB 05, 14, 00
+ RGB 07, 07, 07
+; water
+ RGB 31, 31, 31
+ RGB 08, 12, 31
+ RGB 01, 04, 31
+ RGB 07, 07, 07
+; yellow
+ RGB 27, 31, 27
+ RGB 31, 31, 07
+ RGB 31, 16, 01
+ RGB 07, 07, 07
+; brown
+ RGB 27, 31, 27
+ RGB 24, 18, 07
+ RGB 20, 15, 03
+ RGB 07, 07, 07
+; roof
+ RGB 27, 31, 27
+ RGB 15, 31, 31
+ RGB 05, 17, 31
+ RGB 07, 07, 07
+; text
+ RGB 31, 31, 16
+ RGB 31, 31, 16
+ RGB 14, 09, 00
+ RGB 00, 00, 00
+
+; nite
+
+; gray
+ RGB 15, 14, 24
+ RGB 11, 11, 19
+ RGB 07, 07, 12
+ RGB 00, 00, 00
+; red
+ RGB 15, 14, 24
+ RGB 14, 07, 17
+ RGB 13, 00, 08
+ RGB 00, 00, 00
+; green
+ RGB 15, 14, 24
+ RGB 08, 13, 19
+ RGB 00, 11, 13
+ RGB 00, 00, 00
+; water
+ RGB 15, 14, 24
+ RGB 05, 05, 17
+ RGB 03, 03, 10
+ RGB 00, 00, 00
+; yellow
+ RGB 30, 30, 11
+ RGB 16, 14, 18
+ RGB 16, 14, 10
+ RGB 00, 00, 00
+; brown
+ RGB 15, 14, 24
+ RGB 12, 09, 15
+ RGB 08, 04, 05
+ RGB 00, 00, 00
+; roof
+ RGB 15, 14, 24
+ RGB 13, 12, 23
+ RGB 11, 09, 20
+ RGB 00, 00, 00
+; text
+ RGB 31, 31, 16
+ RGB 31, 31, 16
+ RGB 14, 09, 00
+ RGB 00, 00, 00
+
+; dark
+
+; gray
+ RGB 01, 01, 02
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+; red
+ RGB 01, 01, 02
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+; green
+ RGB 01, 01, 02
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+; water
+ RGB 01, 01, 02
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+; yellow
+ RGB 30, 30, 11
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+; brown
+ RGB 01, 01, 02
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+; roof
+ RGB 01, 01, 02
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+; text
+ RGB 31, 31, 16
+ RGB 31, 31, 16
+ RGB 14, 09, 00
+ RGB 00, 00, 00
+
+; indoor
+
+; gray
+ RGB 30, 28, 26
+ RGB 19, 19, 19
+ RGB 13, 13, 13
+ RGB 07, 07, 07
+; red
+ RGB 30, 28, 26
+ RGB 31, 19, 24
+ RGB 30, 10, 06
+ RGB 07, 07, 07
+; green
+ RGB 18, 24, 09
+ RGB 15, 20, 01
+ RGB 09, 13, 00
+ RGB 07, 07, 07
+; water
+ RGB 30, 28, 26
+ RGB 15, 16, 31
+ RGB 09, 09, 31
+ RGB 07, 07, 07
+; yellow
+ RGB 30, 28, 26
+ RGB 31, 31, 07
+ RGB 31, 16, 01
+ RGB 07, 07, 07
+; brown
+ RGB 26, 24, 17
+ RGB 21, 17, 07
+ RGB 16, 13, 03
+ RGB 07, 07, 07
+; roof
+ RGB 30, 28, 26
+ RGB 17, 19, 31
+ RGB 14, 16, 31
+ RGB 07, 07, 07
+; text
+ RGB 31, 31, 16
+ RGB 31, 31, 16
+ RGB 14, 09, 00
+ RGB 00, 00, 00
+
+; overworld water
+
+; morn/day
+ RGB 23, 23, 31
+ RGB 18, 19, 31
+ RGB 13, 12, 31
+ RGB 07, 07, 07
+; nite
+ RGB 15, 13, 27
+ RGB 10, 09, 20
+ RGB 04, 03, 18
+ RGB 00, 00, 00
diff --git a/data/palettes/title.pal b/data/palettes/title.pal
new file mode 100644
index 000000000..95bc2a394
--- /dev/null
+++ b/data/palettes/title.pal
@@ -0,0 +1,81 @@
+; BG
+ RGB 00, 00, 00
+ RGB 19, 00, 00
+ RGB 15, 08, 31
+ RGB 15, 08, 31
+
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 15, 16, 31
+ RGB 31, 01, 13
+
+ RGB 00, 00, 00
+ RGB 07, 07, 07
+ RGB 31, 31, 31
+ RGB 02, 03, 30
+
+ RGB 00, 00, 00
+ RGB 13, 13, 13
+ RGB 31, 31, 18
+ RGB 02, 03, 30
+
+ RGB 00, 00, 00
+ RGB 19, 19, 19
+ RGB 29, 28, 12
+ RGB 02, 03, 30
+
+ RGB 00, 00, 00
+ RGB 25, 25, 25
+ RGB 28, 25, 06
+ RGB 02, 03, 30
+
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 26, 21, 00
+ RGB 02, 03, 30
+
+ RGB 00, 00, 00
+ RGB 11, 11, 19
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+
+; OBJ
+ RGB 00, 00, 00
+ RGB 10, 00, 15
+ RGB 17, 05, 22
+ RGB 19, 09, 31
+
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
diff --git a/data/palettes/town_map.asm b/data/palettes/town_map.asm
new file mode 100644
index 000000000..49fb7a9ce
--- /dev/null
+++ b/data/palettes/town_map.asm
@@ -0,0 +1,34 @@
+ const_def
+ const PAL_TOWNMAP_BORDER ; 0
+ const PAL_TOWNMAP_EARTH ; 1
+ const PAL_TOWNMAP_MOUNTAIN ; 2
+ const PAL_TOWNMAP_CITY ; 3
+ const PAL_TOWNMAP_POI ; 4
+ const PAL_TOWNMAP_POI_MTN ; 5
+
+townmappals: macro
+rept _NARG / 2
+ dn PAL_TOWNMAP_\2, PAL_TOWNMAP_\1
+ shift
+ shift
+endr
+endm
+
+; gfx/pokegear/town_map.png
+ townmappals EARTH, EARTH, EARTH, MOUNTAIN, MOUNTAIN, MOUNTAIN
+ townmappals BORDER, BORDER, EARTH, EARTH, CITY, EARTH
+ townmappals POI, POI_MTN, POI, POI_MTN, EARTH, EARTH
+ townmappals EARTH, MOUNTAIN, MOUNTAIN, MOUNTAIN, BORDER, BORDER
+ townmappals EARTH, EARTH, BORDER, EARTH, EARTH, BORDER
+ townmappals BORDER, BORDER, EARTH, EARTH, EARTH, MOUNTAIN
+ townmappals MOUNTAIN, MOUNTAIN, BORDER, BORDER, BORDER, BORDER
+ townmappals BORDER, BORDER, BORDER, BORDER, BORDER, BORDER
+; gfx/pokegear/pokegear.png
+ townmappals BORDER, BORDER, BORDER, BORDER, POI, POI
+ townmappals POI, BORDER, BORDER, BORDER, BORDER, BORDER
+ townmappals BORDER, BORDER, BORDER, BORDER, CITY, CITY
+ townmappals CITY, CITY, CITY, CITY, CITY, CITY
+ townmappals CITY, CITY, CITY, CITY, CITY, CITY
+ townmappals CITY, BORDER, CITY, CITY, CITY, CITY
+ townmappals CITY, CITY, CITY, CITY, BORDER, BORDER
+ townmappals BORDER, BORDER, BORDER, BORDER, BORDER, BORDER
diff --git a/data/palettes/trade_room.pal b/data/palettes/trade_room.pal
new file mode 100644
index 000000000..b5615248e
--- /dev/null
+++ b/data/palettes/trade_room.pal
@@ -0,0 +1,29 @@
+ RGB 04, 02, 15
+ RGB 07, 09, 31
+ RGB 31, 00, 00
+ RGB 31, 31, 31
+
+ RGB 04, 02, 15
+ RGB 07, 09, 31
+ RGB 15, 23, 30
+ RGB 31, 31, 31
+
+ RGB 04, 02, 15
+ RGB 07, 09, 31
+ RGB 16, 16, 16
+ RGB 31, 31, 31
+
+ RGB 04, 02, 15
+ RGB 07, 09, 31
+ RGB 25, 07, 04
+ RGB 31, 31, 31
+
+ RGB 04, 02, 15
+ RGB 07, 09, 31
+ RGB 03, 22, 08
+ RGB 31, 31, 31
+
+ RGB 04, 02, 15
+ RGB 07, 09, 31
+ RGB 29, 28, 09
+ RGB 31, 31, 31
diff --git a/data/palettes/unused_title/bg.pal b/data/palettes/unused_title/bg.pal
new file mode 100644
index 000000000..f0604a261
--- /dev/null
+++ b/data/palettes/unused_title/bg.pal
@@ -0,0 +1,39 @@
+ RGB 00, 00, 00
+ RGB 25, 15, 28
+ RGB 22, 11, 28
+ RGB 19, 08, 26
+
+ RGB 00, 00, 00
+ RGB 17, 07, 22
+ RGB 13, 07, 16
+ RGB 19, 08, 26
+
+ RGB 25, 15, 28
+ RGB 22, 11, 28
+ RGB 19, 08, 26
+ RGB 17, 07, 22
+
+ RGB 22, 11, 28
+ RGB 19, 08, 26
+ RGB 17, 07, 22
+ RGB 13, 07, 16
+
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 16, 16, 24
+ RGB 02, 13, 21
+
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 12, 12, 12
+
+ RGB 00, 00, 00
+ RGB 01, 11, 23
+ RGB 16, 16, 24
+ RGB 02, 13, 21
+
+ RGB 00, 00, 00
+ RGB 22, 10, 31
+ RGB 19, 08, 26
+ RGB 17, 07, 22
diff --git a/data/palettes/unused_title/ob.pal b/data/palettes/unused_title/ob.pal
new file mode 100644
index 000000000..80e7d9896
--- /dev/null
+++ b/data/palettes/unused_title/ob.pal
@@ -0,0 +1,319 @@
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 16, 16, 24
+ RGB 02, 13, 21
+
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 12, 12, 12
+
+ RGB 00, 00, 00
+ RGB 01, 11, 23
+ RGB 16, 16, 24
+ RGB 02, 13, 21
+
+ RGB 00, 00, 00
+ RGB 31, 22, 00
+ RGB 31, 27, 00
+ RGB 31, 31, 00
+
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 16, 16, 24
+ RGB 02, 13, 21
+
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 12, 12, 12
+
+ RGB 00, 00, 00
+ RGB 01, 11, 23
+ RGB 16, 16, 24
+ RGB 02, 13, 21
+
+ RGB 16, 31, 00
+ RGB 22, 31, 00
+ RGB 27, 31, 00
+ RGB 31, 31, 00
+
+ RGB 31, 00, 18
+ RGB 31, 31, 31
+ RGB 16, 16, 24
+ RGB 02, 13, 21
+
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 12, 12, 12
+
+ RGB 00, 00, 00
+ RGB 01, 11, 23
+ RGB 16, 16, 24
+ RGB 02, 13, 21
+
+ RGB 16, 31, 00
+ RGB 22, 31, 00
+ RGB 27, 31, 00
+ RGB 31, 31, 00
+
+ RGB 24, 18, 31
+ RGB 31, 31, 00
+ RGB 31, 31, 01
+ RGB 31, 31, 03
+
+ RGB 31, 31, 05
+ RGB 31, 31, 08
+ RGB 31, 31, 10
+ RGB 31, 31, 12
+
+ RGB 31, 31, 14
+ RGB 31, 31, 16
+ RGB 31, 31, 18
+ RGB 31, 31, 20
+
+ RGB 31, 31, 22
+ RGB 31, 31, 25
+ RGB 31, 31, 27
+ RGB 31, 31, 29
+
+ RGB 24, 06, 06
+ RGB 01, 01, 01
+ RGB 03, 03, 03
+ RGB 05, 05, 05
+
+ RGB 08, 08, 08
+ RGB 10, 10, 10
+ RGB 12, 12, 12
+ RGB 14, 14, 14
+
+ RGB 16, 16, 16
+ RGB 18, 18, 18
+ RGB 20, 20, 20
+ RGB 22, 22, 22
+
+ RGB 25, 25, 25
+ RGB 27, 27, 27
+ RGB 29, 29, 29
+ RGB 31, 31, 31
+
+ RGB 18, 24, 18
+ RGB 31, 29, 01
+ RGB 31, 27, 03
+ RGB 31, 25, 05
+
+ RGB 31, 22, 08
+ RGB 31, 20, 10
+ RGB 31, 18, 12
+ RGB 31, 16, 14
+
+ RGB 31, 14, 16
+ RGB 31, 12, 18
+ RGB 31, 10, 20
+ RGB 31, 08, 22
+
+ RGB 31, 05, 25
+ RGB 31, 03, 27
+ RGB 31, 01, 29
+ RGB 31, 00, 31
+
+ RGB 18, 06, 31
+ RGB 00, 31, 31
+ RGB 00, 31, 29
+ RGB 00, 31, 27
+
+ RGB 00, 31, 25
+ RGB 00, 31, 22
+ RGB 00, 31, 20
+ RGB 00, 31, 18
+
+ RGB 00, 31, 16
+ RGB 00, 31, 14
+ RGB 00, 31, 12
+ RGB 00, 31, 10
+
+ RGB 00, 31, 08
+ RGB 00, 31, 05
+ RGB 00, 31, 03
+ RGB 00, 31, 01
+
+ RGB 12, 31, 06
+ RGB 00, 00, 31
+ RGB 00, 01, 31
+ RGB 00, 03, 31
+
+ RGB 00, 05, 31
+ RGB 00, 08, 31
+ RGB 00, 10, 31
+ RGB 00, 12, 31
+
+ RGB 00, 14, 31
+ RGB 00, 16, 31
+ RGB 00, 18, 31
+ RGB 00, 20, 31
+
+ RGB 00, 22, 31
+ RGB 00, 25, 31
+ RGB 00, 27, 31
+ RGB 00, 29, 31
+
+ RGB 00, 00, 00
+ RGB 06, 00, 04
+ RGB 19, 02, 09
+ RGB 28, 04, 11
+
+ RGB 31, 07, 16
+ RGB 31, 17, 23
+ RGB 31, 26, 30
+ RGB 07, 05, 10
+
+ RGB 14, 10, 18
+ RGB 20, 20, 25
+ RGB 25, 27, 31
+ RGB 09, 05, 06
+
+ RGB 23, 16, 13
+ RGB 30, 23, 22
+ RGB 31, 28, 28
+ RGB 31, 31, 31
+
+ RGB 06, 31, 31
+ RGB 04, 00, 04
+ RGB 11, 02, 04
+ RGB 17, 02, 04
+
+ RGB 24, 05, 04
+ RGB 28, 07, 04
+ RGB 31, 11, 04
+ RGB 02, 01, 15
+
+ RGB 04, 11, 22
+ RGB 12, 25, 25
+ RGB 20, 31, 31
+ RGB 09, 04, 03
+
+ RGB 22, 11, 08
+ RGB 27, 19, 16
+ RGB 30, 28, 26
+ RGB 31, 31, 31
+
+ RGB 06, 18, 06
+ RGB 04, 04, 02
+ RGB 07, 07, 02
+ RGB 18, 18, 04
+
+ RGB 24, 24, 06
+ RGB 27, 27, 11
+ RGB 31, 31, 20
+ RGB 02, 03, 10
+
+ RGB 04, 05, 13
+ RGB 06, 10, 25
+ RGB 08, 15, 31
+ RGB 04, 00, 06
+
+ RGB 11, 07, 14
+ RGB 21, 16, 23
+ RGB 29, 26, 31
+ RGB 31, 31, 31
+
+ RGB 06, 00, 18
+ RGB 00, 04, 03
+ RGB 02, 09, 05
+ RGB 11, 19, 07
+
+ RGB 16, 24, 08
+ RGB 22, 31, 09
+ RGB 24, 31, 18
+ RGB 03, 01, 03
+
+ RGB 10, 04, 10
+ RGB 20, 08, 20
+ RGB 31, 17, 31
+ RGB 01, 03, 06
+
+ RGB 05, 09, 10
+ RGB 15, 21, 21
+ RGB 23, 25, 25
+ RGB 31, 31, 31
+
+ RGB 00, 18, 31
+ RGB 00, 05, 07
+ RGB 00, 08, 13
+ RGB 00, 12, 17
+
+ RGB 01, 20, 24
+ RGB 04, 27, 31
+ RGB 14, 31, 31
+ RGB 04, 02, 02
+
+ RGB 15, 01, 03
+ RGB 26, 04, 07
+ RGB 31, 13, 16
+ RGB 00, 05, 02
+
+ RGB 01, 11, 03
+ RGB 06, 21, 06
+ RGB 13, 31, 16
+ RGB 31, 31, 31
+
+ RGB 00, 06, 06
+ RGB 00, 01, 08
+ RGB 00, 05, 14
+ RGB 00, 08, 19
+
+ RGB 02, 14, 26
+ RGB 04, 21, 31
+ RGB 06, 26, 31
+ RGB 13, 00, 00
+
+ RGB 27, 07, 00
+ RGB 31, 17, 05
+ RGB 31, 25, 16
+ RGB 02, 04, 00
+
+ RGB 07, 11, 03
+ RGB 17, 19, 05
+ RGB 27, 31, 16
+ RGB 31, 31, 31
+
+ RGB 02, 00, 00
+ RGB 04, 01, 06
+ RGB 11, 03, 14
+ RGB 16, 04, 19
+
+ RGB 20, 07, 22
+ RGB 26, 12, 27
+ RGB 26, 20, 31
+ RGB 04, 07, 00
+
+ RGB 16, 20, 07
+ RGB 24, 28, 15
+ RGB 29, 31, 24
+ RGB 05, 02, 02
+
+ RGB 15, 04, 02
+ RGB 24, 11, 10
+ RGB 31, 22, 20
+ RGB 31, 31, 31
+
+ RGB 00, 00, 14
+ RGB 12, 00, 00
+ RGB 27, 05, 00
+ RGB 31, 15, 05
+
+ RGB 31, 26, 13
+ RGB 31, 30, 21
+ RGB 05, 07, 16
+ RGB 04, 16, 20
+
+ RGB 04, 24, 26
+ RGB 08, 31, 31
+ RGB 23, 31, 31
+ RGB 00, 00, 00
+
+ RGB 05, 05, 05
+ RGB 17, 17, 15
+ RGB 28, 28, 24
+ RGB 31, 31, 31
diff --git a/data/phone_contacts.asm b/data/phone_contacts.asm
new file mode 100644
index 000000000..0c21049bb
--- /dev/null
+++ b/data/phone_contacts.asm
@@ -0,0 +1,51 @@
+phone: macro
+; trainer class, trainer id, map, ?, script 1, ?, script 2
+ db \1, \2
+ map \3
+ db \4
+ dba \5
+ db \6
+ dba \7
+endm
+
+PhoneContacts: ; 9045f
+; entries correspond to PHONE_* constants
+ phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
+ phone TRAINER_NONE, PHONECONTACT_MOM, KRISS_HOUSE_1F, 7, MomPhoneScript, 0, UnusedPhoneScript
+ phone TRAINER_NONE, PHONECONTACT_BIKESHOP, OAKS_LAB, 0, UnusedPhoneScript, 0, UnusedPhoneScript
+ phone TRAINER_NONE, PHONECONTACT_BILL, N_A, 7, BillPhoneScript1, 0, BillPhoneScript2
+ phone TRAINER_NONE, PHONECONTACT_ELM, ELMS_LAB, 7, ElmPhoneScript1, 0, ElmPhoneScript2
+ phone SCHOOLBOY, JACK1, NATIONAL_PARK, 7, JackPhoneScript1, 7, JackPhoneScript2
+ phone POKEFANF, BEVERLY1, NATIONAL_PARK, 7, BeverlyPhoneScript1, 7, BeverlyPhoneScript2
+ phone SAILOR, HUEY1, OLIVINE_LIGHTHOUSE_2F, 7, HueyPhoneScript1, 7, HueyPhoneScript2
+ phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
+ phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
+ phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
+ phone COOLTRAINERM, GAVEN3, ROUTE_26, 7, GavenPhoneScript1, 7, GavenPhoneScript2
+ phone COOLTRAINERF, BETH1, ROUTE_26, 7, BethPhoneScript1, 7, BethPhoneScript2
+ phone BIRD_KEEPER, JOSE2, ROUTE_27, 7, JosePhoneScript1, 7, JosePhoneScript2
+ phone COOLTRAINERF, REENA1, ROUTE_27, 7, ReenaPhoneScript1, 7, ReenaPhoneScript2
+ phone YOUNGSTER, JOEY1, ROUTE_30, 7, JoeyPhoneScript1, 7, JoeyPhoneScript2
+ phone BUG_CATCHER, WADE1, ROUTE_31, 7, WadePhoneScript1, 7, WadePhoneScript2
+ phone FISHER, RALPH1, ROUTE_32, 7, RalphPhoneScript1, 7, RalphPhoneScript2
+ phone PICNICKER, LIZ1, ROUTE_32, 7, LizPhoneScript1, 7, LizPhoneScript2
+ phone HIKER, ANTHONY2, ROUTE_33, 7, AnthonyPhoneScript1, 7, AnthonyPhoneScript2
+ phone CAMPER, TODD1, ROUTE_34, 7, ToddPhoneScript1, 7, ToddPhoneScript2
+ phone PICNICKER, GINA1, ROUTE_34, 7, GinaPhoneScript1, 7, GinaPhoneScript2
+ phone JUGGLER, IRWIN1, ROUTE_35, 7, IrwinPhoneScript1, 7, IrwinPhoneScript2
+ phone BUG_CATCHER, ARNIE1, ROUTE_35, 7, ArniePhoneScript1, 7, ArniePhoneScript2
+ phone SCHOOLBOY, ALAN1, ROUTE_36, 7, AlanPhoneScript1, 7, AlanPhoneScript2
+ phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
+ phone LASS, DANA1, ROUTE_38, 7, DanaPhoneScript1, 7, DanaPhoneScript2
+ phone SCHOOLBOY, CHAD1, ROUTE_38, 7, ChadPhoneScript1, 7, ChadPhoneScript2
+ phone POKEFANM, DEREK1, ROUTE_39, 7, DerekPhoneScript1, 7, DerekPhoneScript2
+ phone FISHER, TULLY1, ROUTE_42, 7, TullyPhoneScript1, 7, TullyPhoneScript2
+ phone POKEMANIAC, BRENT1, ROUTE_43, 7, BrentPhoneScript1, 7, BrentPhoneScript2
+ phone PICNICKER, TIFFANY3, ROUTE_43, 7, TiffanyPhoneScript1, 7, TiffanyPhoneScript2
+ phone BIRD_KEEPER, VANCE1, ROUTE_44, 7, VancePhoneScript1, 7, VancePhoneScript2
+ phone FISHER, WILTON1, ROUTE_44, 7, WiltonPhoneScript1, 7, WiltonPhoneScript2
+ phone BLACKBELT_T, KENJI3, ROUTE_45, 7, KenjiPhoneScript1, 7, KenjiPhoneScript2
+ phone HIKER, PARRY1, ROUTE_45, 7, ParryPhoneScript1, 7, ParryPhoneScript2
+ phone PICNICKER, ERIN1, ROUTE_46, 7, ErinPhoneScript1, 7, ErinPhoneScript2
+ phone TRAINER_NONE, PHONECONTACT_BUENA, GOLDENROD_DEPT_STORE_ROOF, 7, BuenaPhoneScript1, 7, BuenaPhoneScript2
+; 90627
diff --git a/data/phone_special.asm b/data/phone_special.asm
new file mode 100644
index 000000000..c66c9ff77
--- /dev/null
+++ b/data/phone_special.asm
@@ -0,0 +1,18 @@
+specialcall: macro
+; condition, contact, script
+ dw \1
+ db \2
+ dba \3
+endm
+
+SpecialPhoneCallList: ; 90627
+; entries correspond to SPECIALCALL_* constants
+ specialcall SpecialCallOnlyWhenOutside, PHONE_ELM, ElmPhoneScript2
+ specialcall SpecialCallOnlyWhenOutside, PHONE_ELM, ElmPhoneScript2
+ specialcall SpecialCallOnlyWhenOutside, PHONE_ELM, ElmPhoneScript2
+ specialcall SpecialCallOnlyWhenOutside, PHONE_ELM, ElmPhoneScript2
+ specialcall SpecialCallWhereverYouAre, PHONE_ELM, ElmPhoneScript2
+ specialcall SpecialCallWhereverYouAre, PHONE_OAK, BikeShopPhoneScript
+ specialcall SpecialCallWhereverYouAre, PHONE_MOM, MomPhoneLectureScript
+ specialcall SpecialCallOnlyWhenOutside, PHONE_ELM, ElmPhoneScript2
+; 90657
diff --git a/data/pokedex/entries.asm b/data/pokedex/entries.asm
deleted file mode 100644
index c54f5e245..000000000
--- a/data/pokedex/entries.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-INCLUDE "includes.asm"
-
-
-SECTION "Pokedex Entries 001-064", ROMX
-
-PokedexEntries1::
-INCLUDE "data/pokedex/entries_1.asm"
-
-
-SECTION "Pokedex Entries 065-128", ROMX
-
-PokedexEntries2::
-INCLUDE "data/pokedex/entries_2.asm"
-
-
-SECTION "Pokedex Entries 129-192", ROMX
-
-PokedexEntries3::
-INCLUDE "data/pokedex/entries_3.asm"
-
-
-SECTION "Pokedex Entries 193-251", ROMX
-
-PokedexEntries4::
-INCLUDE "data/pokedex/entries_4.asm"
diff --git a/data/pokedex/entries_1.asm b/data/pokedex/entries_1.asm
deleted file mode 100644
index 7f3c04cd6..000000000
--- a/data/pokedex/entries_1.asm
+++ /dev/null
@@ -1,64 +0,0 @@
-BulbasaurPokedexEntry:: INCLUDE "data/pokedex/entries/bulbasaur.asm"
-IvysaurPokedexEntry:: INCLUDE "data/pokedex/entries/ivysaur.asm"
-VenusaurPokedexEntry:: INCLUDE "data/pokedex/entries/venusaur.asm"
-CharmanderPokedexEntry:: INCLUDE "data/pokedex/entries/charmander.asm"
-CharmeleonPokedexEntry:: INCLUDE "data/pokedex/entries/charmeleon.asm"
-CharizardPokedexEntry:: INCLUDE "data/pokedex/entries/charizard.asm"
-SquirtlePokedexEntry:: INCLUDE "data/pokedex/entries/squirtle.asm"
-WartortlePokedexEntry:: INCLUDE "data/pokedex/entries/wartortle.asm"
-BlastoisePokedexEntry:: INCLUDE "data/pokedex/entries/blastoise.asm"
-CaterpiePokedexEntry:: INCLUDE "data/pokedex/entries/caterpie.asm"
-MetapodPokedexEntry:: INCLUDE "data/pokedex/entries/metapod.asm"
-ButterfreePokedexEntry:: INCLUDE "data/pokedex/entries/butterfree.asm"
-WeedlePokedexEntry:: INCLUDE "data/pokedex/entries/weedle.asm"
-KakunaPokedexEntry:: INCLUDE "data/pokedex/entries/kakuna.asm"
-BeedrillPokedexEntry:: INCLUDE "data/pokedex/entries/beedrill.asm"
-PidgeyPokedexEntry:: INCLUDE "data/pokedex/entries/pidgey.asm"
-PidgeottoPokedexEntry:: INCLUDE "data/pokedex/entries/pidgeotto.asm"
-PidgeotPokedexEntry:: INCLUDE "data/pokedex/entries/pidgeot.asm"
-RattataPokedexEntry:: INCLUDE "data/pokedex/entries/rattata.asm"
-RaticatePokedexEntry:: INCLUDE "data/pokedex/entries/raticate.asm"
-SpearowPokedexEntry:: INCLUDE "data/pokedex/entries/spearow.asm"
-FearowPokedexEntry:: INCLUDE "data/pokedex/entries/fearow.asm"
-EkansPokedexEntry:: INCLUDE "data/pokedex/entries/ekans.asm"
-ArbokPokedexEntry:: INCLUDE "data/pokedex/entries/arbok.asm"
-PikachuPokedexEntry:: INCLUDE "data/pokedex/entries/pikachu.asm"
-RaichuPokedexEntry:: INCLUDE "data/pokedex/entries/raichu.asm"
-SandshrewPokedexEntry:: INCLUDE "data/pokedex/entries/sandshrew.asm"
-SandslashPokedexEntry:: INCLUDE "data/pokedex/entries/sandslash.asm"
-NidoranFPokedexEntry:: INCLUDE "data/pokedex/entries/nidoran_f.asm"
-NidorinaPokedexEntry:: INCLUDE "data/pokedex/entries/nidorina.asm"
-NidoqueenPokedexEntry:: INCLUDE "data/pokedex/entries/nidoqueen.asm"
-NidoranMPokedexEntry:: INCLUDE "data/pokedex/entries/nidoran_m.asm"
-NidorinoPokedexEntry:: INCLUDE "data/pokedex/entries/nidorino.asm"
-NidokingPokedexEntry:: INCLUDE "data/pokedex/entries/nidoking.asm"
-ClefairyPokedexEntry:: INCLUDE "data/pokedex/entries/clefairy.asm"
-ClefablePokedexEntry:: INCLUDE "data/pokedex/entries/clefable.asm"
-VulpixPokedexEntry:: INCLUDE "data/pokedex/entries/vulpix.asm"
-NinetalesPokedexEntry:: INCLUDE "data/pokedex/entries/ninetales.asm"
-JigglypuffPokedexEntry:: INCLUDE "data/pokedex/entries/jigglypuff.asm"
-WigglytuffPokedexEntry:: INCLUDE "data/pokedex/entries/wigglytuff.asm"
-ZubatPokedexEntry:: INCLUDE "data/pokedex/entries/zubat.asm"
-GolbatPokedexEntry:: INCLUDE "data/pokedex/entries/golbat.asm"
-OddishPokedexEntry:: INCLUDE "data/pokedex/entries/oddish.asm"
-GloomPokedexEntry:: INCLUDE "data/pokedex/entries/gloom.asm"
-VileplumePokedexEntry:: INCLUDE "data/pokedex/entries/vileplume.asm"
-ParasPokedexEntry:: INCLUDE "data/pokedex/entries/paras.asm"
-ParasectPokedexEntry:: INCLUDE "data/pokedex/entries/parasect.asm"
-VenonatPokedexEntry:: INCLUDE "data/pokedex/entries/venonat.asm"
-VenomothPokedexEntry:: INCLUDE "data/pokedex/entries/venomoth.asm"
-DiglettPokedexEntry:: INCLUDE "data/pokedex/entries/diglett.asm"
-DugtrioPokedexEntry:: INCLUDE "data/pokedex/entries/dugtrio.asm"
-MeowthPokedexEntry:: INCLUDE "data/pokedex/entries/meowth.asm"
-PersianPokedexEntry:: INCLUDE "data/pokedex/entries/persian.asm"
-PsyduckPokedexEntry:: INCLUDE "data/pokedex/entries/psyduck.asm"
-GolduckPokedexEntry:: INCLUDE "data/pokedex/entries/golduck.asm"
-MankeyPokedexEntry:: INCLUDE "data/pokedex/entries/mankey.asm"
-PrimeapePokedexEntry:: INCLUDE "data/pokedex/entries/primeape.asm"
-GrowlithePokedexEntry:: INCLUDE "data/pokedex/entries/growlithe.asm"
-ArcaninePokedexEntry:: INCLUDE "data/pokedex/entries/arcanine.asm"
-PoliwagPokedexEntry:: INCLUDE "data/pokedex/entries/poliwag.asm"
-PoliwhirlPokedexEntry:: INCLUDE "data/pokedex/entries/poliwhirl.asm"
-PoliwrathPokedexEntry:: INCLUDE "data/pokedex/entries/poliwrath.asm"
-AbraPokedexEntry:: INCLUDE "data/pokedex/entries/abra.asm"
-KadabraPokedexEntry:: INCLUDE "data/pokedex/entries/kadabra.asm"
diff --git a/data/pokedex/entries_2.asm b/data/pokedex/entries_2.asm
deleted file mode 100644
index 881986d92..000000000
--- a/data/pokedex/entries_2.asm
+++ /dev/null
@@ -1,64 +0,0 @@
-AlakazamPokedexEntry:: INCLUDE "data/pokedex/entries/alakazam.asm"
-MachopPokedexEntry:: INCLUDE "data/pokedex/entries/machop.asm"
-MachokePokedexEntry:: INCLUDE "data/pokedex/entries/machoke.asm"
-MachampPokedexEntry:: INCLUDE "data/pokedex/entries/machamp.asm"
-BellsproutPokedexEntry:: INCLUDE "data/pokedex/entries/bellsprout.asm"
-WeepinbellPokedexEntry:: INCLUDE "data/pokedex/entries/weepinbell.asm"
-VictreebelPokedexEntry:: INCLUDE "data/pokedex/entries/victreebel.asm"
-TentacoolPokedexEntry:: INCLUDE "data/pokedex/entries/tentacool.asm"
-TentacruelPokedexEntry:: INCLUDE "data/pokedex/entries/tentacruel.asm"
-GeodudePokedexEntry:: INCLUDE "data/pokedex/entries/geodude.asm"
-GravelerPokedexEntry:: INCLUDE "data/pokedex/entries/graveler.asm"
-GolemPokedexEntry:: INCLUDE "data/pokedex/entries/golem.asm"
-PonytaPokedexEntry:: INCLUDE "data/pokedex/entries/ponyta.asm"
-RapidashPokedexEntry:: INCLUDE "data/pokedex/entries/rapidash.asm"
-SlowpokePokedexEntry:: INCLUDE "data/pokedex/entries/slowpoke.asm"
-SlowbroPokedexEntry:: INCLUDE "data/pokedex/entries/slowbro.asm"
-MagnemitePokedexEntry:: INCLUDE "data/pokedex/entries/magnemite.asm"
-MagnetonPokedexEntry:: INCLUDE "data/pokedex/entries/magneton.asm"
-FarfetchDPokedexEntry:: INCLUDE "data/pokedex/entries/farfetch_d.asm"
-DoduoPokedexEntry:: INCLUDE "data/pokedex/entries/doduo.asm"
-DodrioPokedexEntry:: INCLUDE "data/pokedex/entries/dodrio.asm"
-SeelPokedexEntry:: INCLUDE "data/pokedex/entries/seel.asm"
-DewgongPokedexEntry:: INCLUDE "data/pokedex/entries/dewgong.asm"
-GrimerPokedexEntry:: INCLUDE "data/pokedex/entries/grimer.asm"
-MukPokedexEntry:: INCLUDE "data/pokedex/entries/muk.asm"
-ShellderPokedexEntry:: INCLUDE "data/pokedex/entries/shellder.asm"
-CloysterPokedexEntry:: INCLUDE "data/pokedex/entries/cloyster.asm"
-GastlyPokedexEntry:: INCLUDE "data/pokedex/entries/gastly.asm"
-HaunterPokedexEntry:: INCLUDE "data/pokedex/entries/haunter.asm"
-GengarPokedexEntry:: INCLUDE "data/pokedex/entries/gengar.asm"
-OnixPokedexEntry:: INCLUDE "data/pokedex/entries/onix.asm"
-DrowzeePokedexEntry:: INCLUDE "data/pokedex/entries/drowzee.asm"
-HypnoPokedexEntry:: INCLUDE "data/pokedex/entries/hypno.asm"
-KrabbyPokedexEntry:: INCLUDE "data/pokedex/entries/krabby.asm"
-KinglerPokedexEntry:: INCLUDE "data/pokedex/entries/kingler.asm"
-VoltorbPokedexEntry:: INCLUDE "data/pokedex/entries/voltorb.asm"
-ElectrodePokedexEntry:: INCLUDE "data/pokedex/entries/electrode.asm"
-ExeggcutePokedexEntry:: INCLUDE "data/pokedex/entries/exeggcute.asm"
-ExeggutorPokedexEntry:: INCLUDE "data/pokedex/entries/exeggutor.asm"
-CubonePokedexEntry:: INCLUDE "data/pokedex/entries/cubone.asm"
-MarowakPokedexEntry:: INCLUDE "data/pokedex/entries/marowak.asm"
-HitmonleePokedexEntry:: INCLUDE "data/pokedex/entries/hitmonlee.asm"
-HitmonchanPokedexEntry:: INCLUDE "data/pokedex/entries/hitmonchan.asm"
-LickitungPokedexEntry:: INCLUDE "data/pokedex/entries/lickitung.asm"
-KoffingPokedexEntry:: INCLUDE "data/pokedex/entries/koffing.asm"
-WeezingPokedexEntry:: INCLUDE "data/pokedex/entries/weezing.asm"
-RhyhornPokedexEntry:: INCLUDE "data/pokedex/entries/rhyhorn.asm"
-RhydonPokedexEntry:: INCLUDE "data/pokedex/entries/rhydon.asm"
-ChanseyPokedexEntry:: INCLUDE "data/pokedex/entries/chansey.asm"
-TangelaPokedexEntry:: INCLUDE "data/pokedex/entries/tangela.asm"
-KangaskhanPokedexEntry:: INCLUDE "data/pokedex/entries/kangaskhan.asm"
-HorseaPokedexEntry:: INCLUDE "data/pokedex/entries/horsea.asm"
-SeadraPokedexEntry:: INCLUDE "data/pokedex/entries/seadra.asm"
-GoldeenPokedexEntry:: INCLUDE "data/pokedex/entries/goldeen.asm"
-SeakingPokedexEntry:: INCLUDE "data/pokedex/entries/seaking.asm"
-StaryuPokedexEntry:: INCLUDE "data/pokedex/entries/staryu.asm"
-StarmiePokedexEntry:: INCLUDE "data/pokedex/entries/starmie.asm"
-MrMimePokedexEntry:: INCLUDE "data/pokedex/entries/mr__mime.asm"
-ScytherPokedexEntry:: INCLUDE "data/pokedex/entries/scyther.asm"
-JynxPokedexEntry:: INCLUDE "data/pokedex/entries/jynx.asm"
-ElectabuzzPokedexEntry:: INCLUDE "data/pokedex/entries/electabuzz.asm"
-MagmarPokedexEntry:: INCLUDE "data/pokedex/entries/magmar.asm"
-PinsirPokedexEntry:: INCLUDE "data/pokedex/entries/pinsir.asm"
-TaurosPokedexEntry:: INCLUDE "data/pokedex/entries/tauros.asm"
diff --git a/data/pokedex/entries_3.asm b/data/pokedex/entries_3.asm
deleted file mode 100644
index 869252baa..000000000
--- a/data/pokedex/entries_3.asm
+++ /dev/null
@@ -1,64 +0,0 @@
-MagikarpPokedexEntry:: INCLUDE "data/pokedex/entries/magikarp.asm"
-GyaradosPokedexEntry:: INCLUDE "data/pokedex/entries/gyarados.asm"
-LaprasPokedexEntry:: INCLUDE "data/pokedex/entries/lapras.asm"
-DittoPokedexEntry:: INCLUDE "data/pokedex/entries/ditto.asm"
-EeveePokedexEntry:: INCLUDE "data/pokedex/entries/eevee.asm"
-VaporeonPokedexEntry:: INCLUDE "data/pokedex/entries/vaporeon.asm"
-JolteonPokedexEntry:: INCLUDE "data/pokedex/entries/jolteon.asm"
-FlareonPokedexEntry:: INCLUDE "data/pokedex/entries/flareon.asm"
-PorygonPokedexEntry:: INCLUDE "data/pokedex/entries/porygon.asm"
-OmanytePokedexEntry:: INCLUDE "data/pokedex/entries/omanyte.asm"
-OmastarPokedexEntry:: INCLUDE "data/pokedex/entries/omastar.asm"
-KabutoPokedexEntry:: INCLUDE "data/pokedex/entries/kabuto.asm"
-KabutopsPokedexEntry:: INCLUDE "data/pokedex/entries/kabutops.asm"
-AerodactylPokedexEntry:: INCLUDE "data/pokedex/entries/aerodactyl.asm"
-SnorlaxPokedexEntry:: INCLUDE "data/pokedex/entries/snorlax.asm"
-ArticunoPokedexEntry:: INCLUDE "data/pokedex/entries/articuno.asm"
-ZapdosPokedexEntry:: INCLUDE "data/pokedex/entries/zapdos.asm"
-MoltresPokedexEntry:: INCLUDE "data/pokedex/entries/moltres.asm"
-DratiniPokedexEntry:: INCLUDE "data/pokedex/entries/dratini.asm"
-DragonairPokedexEntry:: INCLUDE "data/pokedex/entries/dragonair.asm"
-DragonitePokedexEntry:: INCLUDE "data/pokedex/entries/dragonite.asm"
-MewtwoPokedexEntry:: INCLUDE "data/pokedex/entries/mewtwo.asm"
-MewPokedexEntry:: INCLUDE "data/pokedex/entries/mew.asm"
-ChikoritaPokedexEntry:: INCLUDE "data/pokedex/entries/chikorita.asm"
-BayleefPokedexEntry:: INCLUDE "data/pokedex/entries/bayleef.asm"
-MeganiumPokedexEntry:: INCLUDE "data/pokedex/entries/meganium.asm"
-CyndaquilPokedexEntry:: INCLUDE "data/pokedex/entries/cyndaquil.asm"
-QuilavaPokedexEntry:: INCLUDE "data/pokedex/entries/quilava.asm"
-TyphlosionPokedexEntry:: INCLUDE "data/pokedex/entries/typhlosion.asm"
-TotodilePokedexEntry:: INCLUDE "data/pokedex/entries/totodile.asm"
-CroconawPokedexEntry:: INCLUDE "data/pokedex/entries/croconaw.asm"
-FeraligatrPokedexEntry:: INCLUDE "data/pokedex/entries/feraligatr.asm"
-SentretPokedexEntry:: INCLUDE "data/pokedex/entries/sentret.asm"
-FurretPokedexEntry:: INCLUDE "data/pokedex/entries/furret.asm"
-HoothootPokedexEntry:: INCLUDE "data/pokedex/entries/hoothoot.asm"
-NoctowlPokedexEntry:: INCLUDE "data/pokedex/entries/noctowl.asm"
-LedybaPokedexEntry:: INCLUDE "data/pokedex/entries/ledyba.asm"
-LedianPokedexEntry:: INCLUDE "data/pokedex/entries/ledian.asm"
-SpinarakPokedexEntry:: INCLUDE "data/pokedex/entries/spinarak.asm"
-AriadosPokedexEntry:: INCLUDE "data/pokedex/entries/ariados.asm"
-CrobatPokedexEntry:: INCLUDE "data/pokedex/entries/crobat.asm"
-ChinchouPokedexEntry:: INCLUDE "data/pokedex/entries/chinchou.asm"
-LanturnPokedexEntry:: INCLUDE "data/pokedex/entries/lanturn.asm"
-PichuPokedexEntry:: INCLUDE "data/pokedex/entries/pichu.asm"
-CleffaPokedexEntry:: INCLUDE "data/pokedex/entries/cleffa.asm"
-IgglybuffPokedexEntry:: INCLUDE "data/pokedex/entries/igglybuff.asm"
-TogepiPokedexEntry:: INCLUDE "data/pokedex/entries/togepi.asm"
-TogeticPokedexEntry:: INCLUDE "data/pokedex/entries/togetic.asm"
-NatuPokedexEntry:: INCLUDE "data/pokedex/entries/natu.asm"
-XatuPokedexEntry:: INCLUDE "data/pokedex/entries/xatu.asm"
-MareepPokedexEntry:: INCLUDE "data/pokedex/entries/mareep.asm"
-FlaaffyPokedexEntry:: INCLUDE "data/pokedex/entries/flaaffy.asm"
-AmpharosPokedexEntry:: INCLUDE "data/pokedex/entries/ampharos.asm"
-BellossomPokedexEntry:: INCLUDE "data/pokedex/entries/bellossom.asm"
-MarillPokedexEntry:: INCLUDE "data/pokedex/entries/marill.asm"
-AzumarillPokedexEntry:: INCLUDE "data/pokedex/entries/azumarill.asm"
-SudowoodoPokedexEntry:: INCLUDE "data/pokedex/entries/sudowoodo.asm"
-PolitoedPokedexEntry:: INCLUDE "data/pokedex/entries/politoed.asm"
-HoppipPokedexEntry:: INCLUDE "data/pokedex/entries/hoppip.asm"
-SkiploomPokedexEntry:: INCLUDE "data/pokedex/entries/skiploom.asm"
-JumpluffPokedexEntry:: INCLUDE "data/pokedex/entries/jumpluff.asm"
-AipomPokedexEntry:: INCLUDE "data/pokedex/entries/aipom.asm"
-SunkernPokedexEntry:: INCLUDE "data/pokedex/entries/sunkern.asm"
-SunfloraPokedexEntry:: INCLUDE "data/pokedex/entries/sunflora.asm"
diff --git a/data/pokedex/entries_4.asm b/data/pokedex/entries_4.asm
deleted file mode 100644
index 240f87e3e..000000000
--- a/data/pokedex/entries_4.asm
+++ /dev/null
@@ -1,59 +0,0 @@
-YanmaPokedexEntry:: INCLUDE "data/pokedex/entries/yanma.asm"
-WooperPokedexEntry:: INCLUDE "data/pokedex/entries/wooper.asm"
-QuagsirePokedexEntry:: INCLUDE "data/pokedex/entries/quagsire.asm"
-EspeonPokedexEntry:: INCLUDE "data/pokedex/entries/espeon.asm"
-UmbreonPokedexEntry:: INCLUDE "data/pokedex/entries/umbreon.asm"
-MurkrowPokedexEntry:: INCLUDE "data/pokedex/entries/murkrow.asm"
-SlowkingPokedexEntry:: INCLUDE "data/pokedex/entries/slowking.asm"
-MisdreavusPokedexEntry:: INCLUDE "data/pokedex/entries/misdreavus.asm"
-UnownPokedexEntry:: INCLUDE "data/pokedex/entries/unown.asm"
-WobbuffetPokedexEntry:: INCLUDE "data/pokedex/entries/wobbuffet.asm"
-GirafarigPokedexEntry:: INCLUDE "data/pokedex/entries/girafarig.asm"
-PinecoPokedexEntry:: INCLUDE "data/pokedex/entries/pineco.asm"
-ForretressPokedexEntry:: INCLUDE "data/pokedex/entries/forretress.asm"
-DunsparcePokedexEntry:: INCLUDE "data/pokedex/entries/dunsparce.asm"
-GligarPokedexEntry:: INCLUDE "data/pokedex/entries/gligar.asm"
-SteelixPokedexEntry:: INCLUDE "data/pokedex/entries/steelix.asm"
-SnubbullPokedexEntry:: INCLUDE "data/pokedex/entries/snubbull.asm"
-GranbullPokedexEntry:: INCLUDE "data/pokedex/entries/granbull.asm"
-QwilfishPokedexEntry:: INCLUDE "data/pokedex/entries/qwilfish.asm"
-ScizorPokedexEntry:: INCLUDE "data/pokedex/entries/scizor.asm"
-ShucklePokedexEntry:: INCLUDE "data/pokedex/entries/shuckle.asm"
-HeracrossPokedexEntry:: INCLUDE "data/pokedex/entries/heracross.asm"
-SneaselPokedexEntry:: INCLUDE "data/pokedex/entries/sneasel.asm"
-TeddiursaPokedexEntry:: INCLUDE "data/pokedex/entries/teddiursa.asm"
-UrsaringPokedexEntry:: INCLUDE "data/pokedex/entries/ursaring.asm"
-SlugmaPokedexEntry:: INCLUDE "data/pokedex/entries/slugma.asm"
-MagcargoPokedexEntry:: INCLUDE "data/pokedex/entries/magcargo.asm"
-SwinubPokedexEntry:: INCLUDE "data/pokedex/entries/swinub.asm"
-PiloswinePokedexEntry:: INCLUDE "data/pokedex/entries/piloswine.asm"
-CorsolaPokedexEntry:: INCLUDE "data/pokedex/entries/corsola.asm"
-RemoraidPokedexEntry:: INCLUDE "data/pokedex/entries/remoraid.asm"
-OctilleryPokedexEntry:: INCLUDE "data/pokedex/entries/octillery.asm"
-DelibirdPokedexEntry:: INCLUDE "data/pokedex/entries/delibird.asm"
-MantinePokedexEntry:: INCLUDE "data/pokedex/entries/mantine.asm"
-SkarmoryPokedexEntry:: INCLUDE "data/pokedex/entries/skarmory.asm"
-HoundourPokedexEntry:: INCLUDE "data/pokedex/entries/houndour.asm"
-HoundoomPokedexEntry:: INCLUDE "data/pokedex/entries/houndoom.asm"
-KingdraPokedexEntry:: INCLUDE "data/pokedex/entries/kingdra.asm"
-PhanpyPokedexEntry:: INCLUDE "data/pokedex/entries/phanpy.asm"
-DonphanPokedexEntry:: INCLUDE "data/pokedex/entries/donphan.asm"
-Porygon2PokedexEntry:: INCLUDE "data/pokedex/entries/porygon2.asm"
-StantlerPokedexEntry:: INCLUDE "data/pokedex/entries/stantler.asm"
-SmearglePokedexEntry:: INCLUDE "data/pokedex/entries/smeargle.asm"
-TyroguePokedexEntry:: INCLUDE "data/pokedex/entries/tyrogue.asm"
-HitmontopPokedexEntry:: INCLUDE "data/pokedex/entries/hitmontop.asm"
-SmoochumPokedexEntry:: INCLUDE "data/pokedex/entries/smoochum.asm"
-ElekidPokedexEntry:: INCLUDE "data/pokedex/entries/elekid.asm"
-MagbyPokedexEntry:: INCLUDE "data/pokedex/entries/magby.asm"
-MiltankPokedexEntry:: INCLUDE "data/pokedex/entries/miltank.asm"
-BlisseyPokedexEntry:: INCLUDE "data/pokedex/entries/blissey.asm"
-RaikouPokedexEntry:: INCLUDE "data/pokedex/entries/raikou.asm"
-EnteiPokedexEntry:: INCLUDE "data/pokedex/entries/entei.asm"
-SuicunePokedexEntry:: INCLUDE "data/pokedex/entries/suicune.asm"
-LarvitarPokedexEntry:: INCLUDE "data/pokedex/entries/larvitar.asm"
-PupitarPokedexEntry:: INCLUDE "data/pokedex/entries/pupitar.asm"
-TyranitarPokedexEntry:: INCLUDE "data/pokedex/entries/tyranitar.asm"
-LugiaPokedexEntry:: INCLUDE "data/pokedex/entries/lugia.asm"
-HoOhPokedexEntry:: INCLUDE "data/pokedex/entries/ho_oh.asm"
-CelebiPokedexEntry:: INCLUDE "data/pokedex/entries/celebi.asm"
diff --git a/data/pokedex/entries_crystal.asm b/data/pokedex/entries_crystal.asm
deleted file mode 100644
index fc38b063d..000000000
--- a/data/pokedex/entries_crystal.asm
+++ /dev/null
@@ -1,2 +0,0 @@
-INCLUDE "pokecrystal.asm"
-INCLUDE "data/pokedex/entries.asm"
diff --git a/data/pokedex/entry_pointers.asm b/data/pokedex/entry_pointers.asm
deleted file mode 100644
index 5a432e661..000000000
--- a/data/pokedex/entry_pointers.asm
+++ /dev/null
@@ -1,325 +0,0 @@
-GetDexEntryPointer: ; 44333
-; return dex entry pointer b:de
- push hl
- ld hl, PokedexDataPointerTable
- ld a, b
- dec a
- ld d, 0
- ld e, a
- add hl, de
- add hl, de
- ld e, [hl]
- inc hl
- ld d, [hl]
- push de
- rlca
- rlca
- and $3
- ld hl, .PokedexEntryBanks
- ld d, 0
- ld e, a
- add hl, de
- ld b, [hl]
- pop de
- pop hl
- ret
-
-.PokedexEntryBanks: ; 44351
-
-GLOBAL PokedexEntries1
-GLOBAL PokedexEntries2
-GLOBAL PokedexEntries3
-GLOBAL PokedexEntries4
-
- db BANK(PokedexEntries1)
- db BANK(PokedexEntries2)
- db BANK(PokedexEntries3)
- db BANK(PokedexEntries4)
-
-GetDexEntryPagePointer: ; 44355
- call GetDexEntryPointer ; b:de
- push hl
- ld h, d
- ld l, e
-; skip species name
-.loop1
- ld a, b
- call GetFarByte
- inc hl
- cp "@"
- jr nz, .loop1
-; skip height and weight
-rept 4
- inc hl
-endr
-; if c != 1: skip entry
- dec c
- jr z, .done
-; skip entry
-.loop2
- ld a, b
- call GetFarByte
- inc hl
- cp "@"
- jr nz, .loop2
-
-.done
- ld d, h
- ld e, l
- pop hl
- ret
-
-PokedexDataPointerTable: ; 0x44378
-; Pointers to all the Pokedex entries.
-
- dw BulbasaurPokedexEntry
- dw IvysaurPokedexEntry
- dw VenusaurPokedexEntry
- dw CharmanderPokedexEntry
- dw CharmeleonPokedexEntry
- dw CharizardPokedexEntry
- dw SquirtlePokedexEntry
- dw WartortlePokedexEntry
- dw BlastoisePokedexEntry
- dw CaterpiePokedexEntry
- dw MetapodPokedexEntry
- dw ButterfreePokedexEntry
- dw WeedlePokedexEntry
- dw KakunaPokedexEntry
- dw BeedrillPokedexEntry
- dw PidgeyPokedexEntry
- dw PidgeottoPokedexEntry
- dw PidgeotPokedexEntry
- dw RattataPokedexEntry
- dw RaticatePokedexEntry
- dw SpearowPokedexEntry
- dw FearowPokedexEntry
- dw EkansPokedexEntry
- dw ArbokPokedexEntry
- dw PikachuPokedexEntry
- dw RaichuPokedexEntry
- dw SandshrewPokedexEntry
- dw SandslashPokedexEntry
- dw NidoranFPokedexEntry
- dw NidorinaPokedexEntry
- dw NidoqueenPokedexEntry
- dw NidoranMPokedexEntry
- dw NidorinoPokedexEntry
- dw NidokingPokedexEntry
- dw ClefairyPokedexEntry
- dw ClefablePokedexEntry
- dw VulpixPokedexEntry
- dw NinetalesPokedexEntry
- dw JigglypuffPokedexEntry
- dw WigglytuffPokedexEntry
- dw ZubatPokedexEntry
- dw GolbatPokedexEntry
- dw OddishPokedexEntry
- dw GloomPokedexEntry
- dw VileplumePokedexEntry
- dw ParasPokedexEntry
- dw ParasectPokedexEntry
- dw VenonatPokedexEntry
- dw VenomothPokedexEntry
- dw DiglettPokedexEntry
- dw DugtrioPokedexEntry
- dw MeowthPokedexEntry
- dw PersianPokedexEntry
- dw PsyduckPokedexEntry
- dw GolduckPokedexEntry
- dw MankeyPokedexEntry
- dw PrimeapePokedexEntry
- dw GrowlithePokedexEntry
- dw ArcaninePokedexEntry
- dw PoliwagPokedexEntry
- dw PoliwhirlPokedexEntry
- dw PoliwrathPokedexEntry
- dw AbraPokedexEntry
- dw KadabraPokedexEntry
- dw AlakazamPokedexEntry
- dw MachopPokedexEntry
- dw MachokePokedexEntry
- dw MachampPokedexEntry
- dw BellsproutPokedexEntry
- dw WeepinbellPokedexEntry
- dw VictreebelPokedexEntry
- dw TentacoolPokedexEntry
- dw TentacruelPokedexEntry
- dw GeodudePokedexEntry
- dw GravelerPokedexEntry
- dw GolemPokedexEntry
- dw PonytaPokedexEntry
- dw RapidashPokedexEntry
- dw SlowpokePokedexEntry
- dw SlowbroPokedexEntry
- dw MagnemitePokedexEntry
- dw MagnetonPokedexEntry
- dw FarfetchDPokedexEntry
- dw DoduoPokedexEntry
- dw DodrioPokedexEntry
- dw SeelPokedexEntry
- dw DewgongPokedexEntry
- dw GrimerPokedexEntry
- dw MukPokedexEntry
- dw ShellderPokedexEntry
- dw CloysterPokedexEntry
- dw GastlyPokedexEntry
- dw HaunterPokedexEntry
- dw GengarPokedexEntry
- dw OnixPokedexEntry
- dw DrowzeePokedexEntry
- dw HypnoPokedexEntry
- dw KrabbyPokedexEntry
- dw KinglerPokedexEntry
- dw VoltorbPokedexEntry
- dw ElectrodePokedexEntry
- dw ExeggcutePokedexEntry
- dw ExeggutorPokedexEntry
- dw CubonePokedexEntry
- dw MarowakPokedexEntry
- dw HitmonleePokedexEntry
- dw HitmonchanPokedexEntry
- dw LickitungPokedexEntry
- dw KoffingPokedexEntry
- dw WeezingPokedexEntry
- dw RhyhornPokedexEntry
- dw RhydonPokedexEntry
- dw ChanseyPokedexEntry
- dw TangelaPokedexEntry
- dw KangaskhanPokedexEntry
- dw HorseaPokedexEntry
- dw SeadraPokedexEntry
- dw GoldeenPokedexEntry
- dw SeakingPokedexEntry
- dw StaryuPokedexEntry
- dw StarmiePokedexEntry
- dw MrMimePokedexEntry
- dw ScytherPokedexEntry
- dw JynxPokedexEntry
- dw ElectabuzzPokedexEntry
- dw MagmarPokedexEntry
- dw PinsirPokedexEntry
- dw TaurosPokedexEntry
- dw MagikarpPokedexEntry
- dw GyaradosPokedexEntry
- dw LaprasPokedexEntry
- dw DittoPokedexEntry
- dw EeveePokedexEntry
- dw VaporeonPokedexEntry
- dw JolteonPokedexEntry
- dw FlareonPokedexEntry
- dw PorygonPokedexEntry
- dw OmanytePokedexEntry
- dw OmastarPokedexEntry
- dw KabutoPokedexEntry
- dw KabutopsPokedexEntry
- dw AerodactylPokedexEntry
- dw SnorlaxPokedexEntry
- dw ArticunoPokedexEntry
- dw ZapdosPokedexEntry
- dw MoltresPokedexEntry
- dw DratiniPokedexEntry
- dw DragonairPokedexEntry
- dw DragonitePokedexEntry
- dw MewtwoPokedexEntry
- dw MewPokedexEntry
- dw ChikoritaPokedexEntry
- dw BayleefPokedexEntry
- dw MeganiumPokedexEntry
- dw CyndaquilPokedexEntry
- dw QuilavaPokedexEntry
- dw TyphlosionPokedexEntry
- dw TotodilePokedexEntry
- dw CroconawPokedexEntry
- dw FeraligatrPokedexEntry
- dw SentretPokedexEntry
- dw FurretPokedexEntry
- dw HoothootPokedexEntry
- dw NoctowlPokedexEntry
- dw LedybaPokedexEntry
- dw LedianPokedexEntry
- dw SpinarakPokedexEntry
- dw AriadosPokedexEntry
- dw CrobatPokedexEntry
- dw ChinchouPokedexEntry
- dw LanturnPokedexEntry
- dw PichuPokedexEntry
- dw CleffaPokedexEntry
- dw IgglybuffPokedexEntry
- dw TogepiPokedexEntry
- dw TogeticPokedexEntry
- dw NatuPokedexEntry
- dw XatuPokedexEntry
- dw MareepPokedexEntry
- dw FlaaffyPokedexEntry
- dw AmpharosPokedexEntry
- dw BellossomPokedexEntry
- dw MarillPokedexEntry
- dw AzumarillPokedexEntry
- dw SudowoodoPokedexEntry
- dw PolitoedPokedexEntry
- dw HoppipPokedexEntry
- dw SkiploomPokedexEntry
- dw JumpluffPokedexEntry
- dw AipomPokedexEntry
- dw SunkernPokedexEntry
- dw SunfloraPokedexEntry
- dw YanmaPokedexEntry
- dw WooperPokedexEntry
- dw QuagsirePokedexEntry
- dw EspeonPokedexEntry
- dw UmbreonPokedexEntry
- dw MurkrowPokedexEntry
- dw SlowkingPokedexEntry
- dw MisdreavusPokedexEntry
- dw UnownPokedexEntry
- dw WobbuffetPokedexEntry
- dw GirafarigPokedexEntry
- dw PinecoPokedexEntry
- dw ForretressPokedexEntry
- dw DunsparcePokedexEntry
- dw GligarPokedexEntry
- dw SteelixPokedexEntry
- dw SnubbullPokedexEntry
- dw GranbullPokedexEntry
- dw QwilfishPokedexEntry
- dw ScizorPokedexEntry
- dw ShucklePokedexEntry
- dw HeracrossPokedexEntry
- dw SneaselPokedexEntry
- dw TeddiursaPokedexEntry
- dw UrsaringPokedexEntry
- dw SlugmaPokedexEntry
- dw MagcargoPokedexEntry
- dw SwinubPokedexEntry
- dw PiloswinePokedexEntry
- dw CorsolaPokedexEntry
- dw RemoraidPokedexEntry
- dw OctilleryPokedexEntry
- dw DelibirdPokedexEntry
- dw MantinePokedexEntry
- dw SkarmoryPokedexEntry
- dw HoundourPokedexEntry
- dw HoundoomPokedexEntry
- dw KingdraPokedexEntry
- dw PhanpyPokedexEntry
- dw DonphanPokedexEntry
- dw Porygon2PokedexEntry
- dw StantlerPokedexEntry
- dw SmearglePokedexEntry
- dw TyroguePokedexEntry
- dw HitmontopPokedexEntry
- dw SmoochumPokedexEntry
- dw ElekidPokedexEntry
- dw MagbyPokedexEntry
- dw MiltankPokedexEntry
- dw BlisseyPokedexEntry
- dw RaikouPokedexEntry
- dw EnteiPokedexEntry
- dw SuicunePokedexEntry
- dw LarvitarPokedexEntry
- dw PupitarPokedexEntry
- dw TyranitarPokedexEntry
- dw LugiaPokedexEntry
- dw HoOhPokedexEntry
- dw CelebiPokedexEntry
diff --git a/data/pokedex/order_alpha.asm b/data/pokedex/order_alpha.asm
deleted file mode 100644
index bab0a981d..000000000
--- a/data/pokedex/order_alpha.asm
+++ /dev/null
@@ -1,253 +0,0 @@
-; Every Pokemon sorted alphabetically by name.
-
- db ABRA
- db AERODACTYL
- db AIPOM
- db ALAKAZAM
- db AMPHAROS
- db ARBOK
- db ARCANINE
- db ARIADOS
- db ARTICUNO
- db AZUMARILL
- db BAYLEEF
- db BEEDRILL
- db BELLOSSOM
- db BELLSPROUT
- db BLASTOISE
- db BLISSEY
- db BULBASAUR
- db BUTTERFREE
- db CATERPIE
- db CELEBI
- db CHANSEY
- db CHARIZARD
- db CHARMANDER
- db CHARMELEON
- db CHIKORITA
- db CHINCHOU
- db CLEFABLE
- db CLEFAIRY
- db CLEFFA
- db CLOYSTER
- db CORSOLA
- db CROBAT
- db CROCONAW
- db CUBONE
- db CYNDAQUIL
- db DELIBIRD
- db DEWGONG
- db DIGLETT
- db DITTO
- db DODRIO
- db DODUO
- db DONPHAN
- db DRAGONAIR
- db DRAGONITE
- db DRATINI
- db DROWZEE
- db DUGTRIO
- db DUNSPARCE
- db EEVEE
- db EKANS
- db ELECTABUZZ
- db ELECTRODE
- db ELEKID
- db ENTEI
- db ESPEON
- db EXEGGCUTE
- db EXEGGUTOR
- db FARFETCH_D
- db FEAROW
- db FERALIGATR
- db FLAAFFY
- db FLAREON
- db FORRETRESS
- db FURRET
- db GASTLY
- db GENGAR
- db GEODUDE
- db GIRAFARIG
- db GLIGAR
- db GLOOM
- db GOLBAT
- db GOLDEEN
- db GOLDUCK
- db GOLEM
- db GRANBULL
- db GRAVELER
- db GRIMER
- db GROWLITHE
- db GYARADOS
- db HAUNTER
- db HERACROSS
- db HITMONCHAN
- db HITMONLEE
- db HITMONTOP
- db HO_OH
- db HOOTHOOT
- db HOPPIP
- db HORSEA
- db HOUNDOOM
- db HOUNDOUR
- db HYPNO
- db IGGLYBUFF
- db IVYSAUR
- db JIGGLYPUFF
- db JOLTEON
- db JUMPLUFF
- db JYNX
- db KABUTO
- db KABUTOPS
- db KADABRA
- db KAKUNA
- db KANGASKHAN
- db KINGDRA
- db KINGLER
- db KOFFING
- db KRABBY
- db LANTURN
- db LAPRAS
- db LARVITAR
- db LEDIAN
- db LEDYBA
- db LICKITUNG
- db LUGIA
- db MACHAMP
- db MACHOKE
- db MACHOP
- db MAGBY
- db MAGCARGO
- db MAGIKARP
- db MAGMAR
- db MAGNEMITE
- db MAGNETON
- db MANKEY
- db MANTINE
- db MAREEP
- db MARILL
- db MAROWAK
- db MEGANIUM
- db MEOWTH
- db METAPOD
- db MEW
- db MEWTWO
- db MILTANK
- db MISDREAVUS
- db MOLTRES
- db MR__MIME
- db MUK
- db MURKROW
- db NATU
- db NIDOKING
- db NIDOQUEEN
- db NIDORAN_F
- db NIDORAN_M
- db NIDORINA
- db NIDORINO
- db NINETALES
- db NOCTOWL
- db OCTILLERY
- db ODDISH
- db OMANYTE
- db OMASTAR
- db ONIX
- db PARAS
- db PARASECT
- db PERSIAN
- db PHANPY
- db PICHU
- db PIDGEOT
- db PIDGEOTTO
- db PIDGEY
- db PIKACHU
- db PILOSWINE
- db PINECO
- db PINSIR
- db POLITOED
- db POLIWAG
- db POLIWHIRL
- db POLIWRATH
- db PONYTA
- db PORYGON
- db PORYGON2
- db PRIMEAPE
- db PSYDUCK
- db PUPITAR
- db QUAGSIRE
- db QUILAVA
- db QWILFISH
- db RAICHU
- db RAIKOU
- db RAPIDASH
- db RATICATE
- db RATTATA
- db REMORAID
- db RHYDON
- db RHYHORN
- db SANDSHREW
- db SANDSLASH
- db SCIZOR
- db SCYTHER
- db SEADRA
- db SEAKING
- db SEEL
- db SENTRET
- db SHELLDER
- db SHUCKLE
- db SKARMORY
- db SKIPLOOM
- db SLOWBRO
- db SLOWKING
- db SLOWPOKE
- db SLUGMA
- db SMEARGLE
- db SMOOCHUM
- db SNEASEL
- db SNORLAX
- db SNUBBULL
- db SPEAROW
- db SPINARAK
- db SQUIRTLE
- db STANTLER
- db STARMIE
- db STARYU
- db STEELIX
- db SUDOWOODO
- db SUICUNE
- db SUNFLORA
- db SUNKERN
- db SWINUB
- db TANGELA
- db TAUROS
- db TEDDIURSA
- db TENTACOOL
- db TENTACRUEL
- db TOGEPI
- db TOGETIC
- db TOTODILE
- db TYPHLOSION
- db TYRANITAR
- db TYROGUE
- db UMBREON
- db UNOWN
- db URSARING
- db VAPOREON
- db VENOMOTH
- db VENONAT
- db VENUSAUR
- db VICTREEBEL
- db VILEPLUME
- db VOLTORB
- db VULPIX
- db WARTORTLE
- db WEEDLE
- db WEEPINBELL
- db WEEZING
- db WIGGLYTUFF
- db WOBBUFFET
- db WOOPER
- db XATU
- db YANMA
- db ZAPDOS
- db ZUBAT
diff --git a/data/pokedex/order_new.asm b/data/pokedex/order_new.asm
deleted file mode 100644
index a98a658cd..000000000
--- a/data/pokedex/order_new.asm
+++ /dev/null
@@ -1,253 +0,0 @@
-; Every Pokemon sorted in New Pokedex Order.
-
- db CHIKORITA
- db BAYLEEF
- db MEGANIUM
- db CYNDAQUIL
- db QUILAVA
- db TYPHLOSION
- db TOTODILE
- db CROCONAW
- db FERALIGATR
- db PIDGEY
- db PIDGEOTTO
- db PIDGEOT
- db SPEAROW
- db FEAROW
- db HOOTHOOT
- db NOCTOWL
- db RATTATA
- db RATICATE
- db SENTRET
- db FURRET
- db PICHU
- db PIKACHU
- db RAICHU
- db CATERPIE
- db METAPOD
- db BUTTERFREE
- db WEEDLE
- db KAKUNA
- db BEEDRILL
- db LEDYBA
- db LEDIAN
- db SPINARAK
- db ARIADOS
- db GEODUDE
- db GRAVELER
- db GOLEM
- db ZUBAT
- db GOLBAT
- db CROBAT
- db CLEFFA
- db CLEFAIRY
- db CLEFABLE
- db IGGLYBUFF
- db JIGGLYPUFF
- db WIGGLYTUFF
- db TOGEPI
- db TOGETIC
- db SANDSHREW
- db SANDSLASH
- db EKANS
- db ARBOK
- db DUNSPARCE
- db MAREEP
- db FLAAFFY
- db AMPHAROS
- db WOOPER
- db QUAGSIRE
- db GASTLY
- db HAUNTER
- db GENGAR
- db UNOWN
- db ONIX
- db STEELIX
- db BELLSPROUT
- db WEEPINBELL
- db VICTREEBEL
- db HOPPIP
- db SKIPLOOM
- db JUMPLUFF
- db PARAS
- db PARASECT
- db POLIWAG
- db POLIWHIRL
- db POLIWRATH
- db POLITOED
- db MAGIKARP
- db GYARADOS
- db GOLDEEN
- db SEAKING
- db SLOWPOKE
- db SLOWBRO
- db SLOWKING
- db ODDISH
- db GLOOM
- db VILEPLUME
- db BELLOSSOM
- db DROWZEE
- db HYPNO
- db ABRA
- db KADABRA
- db ALAKAZAM
- db DITTO
- db PINECO
- db FORRETRESS
- db NIDORAN_F
- db NIDORINA
- db NIDOQUEEN
- db NIDORAN_M
- db NIDORINO
- db NIDOKING
- db YANMA
- db SUNKERN
- db SUNFLORA
- db EXEGGCUTE
- db EXEGGUTOR
- db SUDOWOODO
- db WOBBUFFET
- db VENONAT
- db VENOMOTH
- db SCYTHER
- db SCIZOR
- db PINSIR
- db HERACROSS
- db KOFFING
- db WEEZING
- db GRIMER
- db MUK
- db MAGNEMITE
- db MAGNETON
- db VOLTORB
- db ELECTRODE
- db AIPOM
- db SNUBBULL
- db GRANBULL
- db VULPIX
- db NINETALES
- db GROWLITHE
- db ARCANINE
- db STANTLER
- db MARILL
- db AZUMARILL
- db DIGLETT
- db DUGTRIO
- db MANKEY
- db PRIMEAPE
- db MEOWTH
- db PERSIAN
- db PSYDUCK
- db GOLDUCK
- db MACHOP
- db MACHOKE
- db MACHAMP
- db TYROGUE
- db HITMONLEE
- db HITMONCHAN
- db HITMONTOP
- db GIRAFARIG
- db TAUROS
- db MILTANK
- db MAGBY
- db MAGMAR
- db SMOOCHUM
- db JYNX
- db ELEKID
- db ELECTABUZZ
- db MR__MIME
- db SMEARGLE
- db FARFETCH_D
- db NATU
- db XATU
- db QWILFISH
- db TENTACOOL
- db TENTACRUEL
- db KRABBY
- db KINGLER
- db SHUCKLE
- db STARYU
- db STARMIE
- db SHELLDER
- db CLOYSTER
- db CORSOLA
- db REMORAID
- db OCTILLERY
- db CHINCHOU
- db LANTURN
- db SEEL
- db DEWGONG
- db LICKITUNG
- db TANGELA
- db EEVEE
- db VAPOREON
- db JOLTEON
- db FLAREON
- db ESPEON
- db UMBREON
- db HORSEA
- db SEADRA
- db KINGDRA
- db GLIGAR
- db DELIBIRD
- db SWINUB
- db PILOSWINE
- db TEDDIURSA
- db URSARING
- db PHANPY
- db DONPHAN
- db MANTINE
- db SKARMORY
- db DODUO
- db DODRIO
- db PONYTA
- db RAPIDASH
- db CUBONE
- db MAROWAK
- db KANGASKHAN
- db RHYHORN
- db RHYDON
- db MURKROW
- db HOUNDOUR
- db HOUNDOOM
- db SLUGMA
- db MAGCARGO
- db SNEASEL
- db MISDREAVUS
- db PORYGON
- db PORYGON2
- db CHANSEY
- db BLISSEY
- db LAPRAS
- db OMANYTE
- db OMASTAR
- db KABUTO
- db KABUTOPS
- db AERODACTYL
- db SNORLAX
- db BULBASAUR
- db IVYSAUR
- db VENUSAUR
- db CHARMANDER
- db CHARMELEON
- db CHARIZARD
- db SQUIRTLE
- db WARTORTLE
- db BLASTOISE
- db ARTICUNO
- db ZAPDOS
- db MOLTRES
- db RAIKOU
- db ENTEI
- db SUICUNE
- db DRATINI
- db DRAGONAIR
- db DRAGONITE
- db LARVITAR
- db PUPITAR
- db TYRANITAR
- db LUGIA
- db HO_OH
- db MEWTWO
- db MEW
- db CELEBI
diff --git a/data/pokemon/base_stats.asm b/data/pokemon/base_stats.asm
new file mode 100644
index 000000000..8a6435a40
--- /dev/null
+++ b/data/pokemon/base_stats.asm
@@ -0,0 +1,252 @@
+BaseData::
+INCLUDE "data/pokemon/base_stats/bulbasaur.asm"
+INCLUDE "data/pokemon/base_stats/ivysaur.asm"
+INCLUDE "data/pokemon/base_stats/venusaur.asm"
+INCLUDE "data/pokemon/base_stats/charmander.asm"
+INCLUDE "data/pokemon/base_stats/charmeleon.asm"
+INCLUDE "data/pokemon/base_stats/charizard.asm"
+INCLUDE "data/pokemon/base_stats/squirtle.asm"
+INCLUDE "data/pokemon/base_stats/wartortle.asm"
+INCLUDE "data/pokemon/base_stats/blastoise.asm"
+INCLUDE "data/pokemon/base_stats/caterpie.asm"
+INCLUDE "data/pokemon/base_stats/metapod.asm"
+INCLUDE "data/pokemon/base_stats/butterfree.asm"
+INCLUDE "data/pokemon/base_stats/weedle.asm"
+INCLUDE "data/pokemon/base_stats/kakuna.asm"
+INCLUDE "data/pokemon/base_stats/beedrill.asm"
+INCLUDE "data/pokemon/base_stats/pidgey.asm"
+INCLUDE "data/pokemon/base_stats/pidgeotto.asm"
+INCLUDE "data/pokemon/base_stats/pidgeot.asm"
+INCLUDE "data/pokemon/base_stats/rattata.asm"
+INCLUDE "data/pokemon/base_stats/raticate.asm"
+INCLUDE "data/pokemon/base_stats/spearow.asm"
+INCLUDE "data/pokemon/base_stats/fearow.asm"
+INCLUDE "data/pokemon/base_stats/ekans.asm"
+INCLUDE "data/pokemon/base_stats/arbok.asm"
+INCLUDE "data/pokemon/base_stats/pikachu.asm"
+INCLUDE "data/pokemon/base_stats/raichu.asm"
+INCLUDE "data/pokemon/base_stats/sandshrew.asm"
+INCLUDE "data/pokemon/base_stats/sandslash.asm"
+INCLUDE "data/pokemon/base_stats/nidoran_f.asm"
+INCLUDE "data/pokemon/base_stats/nidorina.asm"
+INCLUDE "data/pokemon/base_stats/nidoqueen.asm"
+INCLUDE "data/pokemon/base_stats/nidoran_m.asm"
+INCLUDE "data/pokemon/base_stats/nidorino.asm"
+INCLUDE "data/pokemon/base_stats/nidoking.asm"
+INCLUDE "data/pokemon/base_stats/clefairy.asm"
+INCLUDE "data/pokemon/base_stats/clefable.asm"
+INCLUDE "data/pokemon/base_stats/vulpix.asm"
+INCLUDE "data/pokemon/base_stats/ninetales.asm"
+INCLUDE "data/pokemon/base_stats/jigglypuff.asm"
+INCLUDE "data/pokemon/base_stats/wigglytuff.asm"
+INCLUDE "data/pokemon/base_stats/zubat.asm"
+INCLUDE "data/pokemon/base_stats/golbat.asm"
+INCLUDE "data/pokemon/base_stats/oddish.asm"
+INCLUDE "data/pokemon/base_stats/gloom.asm"
+INCLUDE "data/pokemon/base_stats/vileplume.asm"
+INCLUDE "data/pokemon/base_stats/paras.asm"
+INCLUDE "data/pokemon/base_stats/parasect.asm"
+INCLUDE "data/pokemon/base_stats/venonat.asm"
+INCLUDE "data/pokemon/base_stats/venomoth.asm"
+INCLUDE "data/pokemon/base_stats/diglett.asm"
+INCLUDE "data/pokemon/base_stats/dugtrio.asm"
+INCLUDE "data/pokemon/base_stats/meowth.asm"
+INCLUDE "data/pokemon/base_stats/persian.asm"
+INCLUDE "data/pokemon/base_stats/psyduck.asm"
+INCLUDE "data/pokemon/base_stats/golduck.asm"
+INCLUDE "data/pokemon/base_stats/mankey.asm"
+INCLUDE "data/pokemon/base_stats/primeape.asm"
+INCLUDE "data/pokemon/base_stats/growlithe.asm"
+INCLUDE "data/pokemon/base_stats/arcanine.asm"
+INCLUDE "data/pokemon/base_stats/poliwag.asm"
+INCLUDE "data/pokemon/base_stats/poliwhirl.asm"
+INCLUDE "data/pokemon/base_stats/poliwrath.asm"
+INCLUDE "data/pokemon/base_stats/abra.asm"
+INCLUDE "data/pokemon/base_stats/kadabra.asm"
+INCLUDE "data/pokemon/base_stats/alakazam.asm"
+INCLUDE "data/pokemon/base_stats/machop.asm"
+INCLUDE "data/pokemon/base_stats/machoke.asm"
+INCLUDE "data/pokemon/base_stats/machamp.asm"
+INCLUDE "data/pokemon/base_stats/bellsprout.asm"
+INCLUDE "data/pokemon/base_stats/weepinbell.asm"
+INCLUDE "data/pokemon/base_stats/victreebel.asm"
+INCLUDE "data/pokemon/base_stats/tentacool.asm"
+INCLUDE "data/pokemon/base_stats/tentacruel.asm"
+INCLUDE "data/pokemon/base_stats/geodude.asm"
+INCLUDE "data/pokemon/base_stats/graveler.asm"
+INCLUDE "data/pokemon/base_stats/golem.asm"
+INCLUDE "data/pokemon/base_stats/ponyta.asm"
+INCLUDE "data/pokemon/base_stats/rapidash.asm"
+INCLUDE "data/pokemon/base_stats/slowpoke.asm"
+INCLUDE "data/pokemon/base_stats/slowbro.asm"
+INCLUDE "data/pokemon/base_stats/magnemite.asm"
+INCLUDE "data/pokemon/base_stats/magneton.asm"
+INCLUDE "data/pokemon/base_stats/farfetch_d.asm"
+INCLUDE "data/pokemon/base_stats/doduo.asm"
+INCLUDE "data/pokemon/base_stats/dodrio.asm"
+INCLUDE "data/pokemon/base_stats/seel.asm"
+INCLUDE "data/pokemon/base_stats/dewgong.asm"
+INCLUDE "data/pokemon/base_stats/grimer.asm"
+INCLUDE "data/pokemon/base_stats/muk.asm"
+INCLUDE "data/pokemon/base_stats/shellder.asm"
+INCLUDE "data/pokemon/base_stats/cloyster.asm"
+INCLUDE "data/pokemon/base_stats/gastly.asm"
+INCLUDE "data/pokemon/base_stats/haunter.asm"
+INCLUDE "data/pokemon/base_stats/gengar.asm"
+INCLUDE "data/pokemon/base_stats/onix.asm"
+INCLUDE "data/pokemon/base_stats/drowzee.asm"
+INCLUDE "data/pokemon/base_stats/hypno.asm"
+INCLUDE "data/pokemon/base_stats/krabby.asm"
+INCLUDE "data/pokemon/base_stats/kingler.asm"
+INCLUDE "data/pokemon/base_stats/voltorb.asm"
+INCLUDE "data/pokemon/base_stats/electrode.asm"
+INCLUDE "data/pokemon/base_stats/exeggcute.asm"
+INCLUDE "data/pokemon/base_stats/exeggutor.asm"
+INCLUDE "data/pokemon/base_stats/cubone.asm"
+INCLUDE "data/pokemon/base_stats/marowak.asm"
+INCLUDE "data/pokemon/base_stats/hitmonlee.asm"
+INCLUDE "data/pokemon/base_stats/hitmonchan.asm"
+INCLUDE "data/pokemon/base_stats/lickitung.asm"
+INCLUDE "data/pokemon/base_stats/koffing.asm"
+INCLUDE "data/pokemon/base_stats/weezing.asm"
+INCLUDE "data/pokemon/base_stats/rhyhorn.asm"
+INCLUDE "data/pokemon/base_stats/rhydon.asm"
+INCLUDE "data/pokemon/base_stats/chansey.asm"
+INCLUDE "data/pokemon/base_stats/tangela.asm"
+INCLUDE "data/pokemon/base_stats/kangaskhan.asm"
+INCLUDE "data/pokemon/base_stats/horsea.asm"
+INCLUDE "data/pokemon/base_stats/seadra.asm"
+INCLUDE "data/pokemon/base_stats/goldeen.asm"
+INCLUDE "data/pokemon/base_stats/seaking.asm"
+INCLUDE "data/pokemon/base_stats/staryu.asm"
+INCLUDE "data/pokemon/base_stats/starmie.asm"
+INCLUDE "data/pokemon/base_stats/mr__mime.asm"
+INCLUDE "data/pokemon/base_stats/scyther.asm"
+INCLUDE "data/pokemon/base_stats/jynx.asm"
+INCLUDE "data/pokemon/base_stats/electabuzz.asm"
+INCLUDE "data/pokemon/base_stats/magmar.asm"
+INCLUDE "data/pokemon/base_stats/pinsir.asm"
+INCLUDE "data/pokemon/base_stats/tauros.asm"
+INCLUDE "data/pokemon/base_stats/magikarp.asm"
+INCLUDE "data/pokemon/base_stats/gyarados.asm"
+INCLUDE "data/pokemon/base_stats/lapras.asm"
+INCLUDE "data/pokemon/base_stats/ditto.asm"
+INCLUDE "data/pokemon/base_stats/eevee.asm"
+INCLUDE "data/pokemon/base_stats/vaporeon.asm"
+INCLUDE "data/pokemon/base_stats/jolteon.asm"
+INCLUDE "data/pokemon/base_stats/flareon.asm"
+INCLUDE "data/pokemon/base_stats/porygon.asm"
+INCLUDE "data/pokemon/base_stats/omanyte.asm"
+INCLUDE "data/pokemon/base_stats/omastar.asm"
+INCLUDE "data/pokemon/base_stats/kabuto.asm"
+INCLUDE "data/pokemon/base_stats/kabutops.asm"
+INCLUDE "data/pokemon/base_stats/aerodactyl.asm"
+INCLUDE "data/pokemon/base_stats/snorlax.asm"
+INCLUDE "data/pokemon/base_stats/articuno.asm"
+INCLUDE "data/pokemon/base_stats/zapdos.asm"
+INCLUDE "data/pokemon/base_stats/moltres.asm"
+INCLUDE "data/pokemon/base_stats/dratini.asm"
+INCLUDE "data/pokemon/base_stats/dragonair.asm"
+INCLUDE "data/pokemon/base_stats/dragonite.asm"
+INCLUDE "data/pokemon/base_stats/mewtwo.asm"
+INCLUDE "data/pokemon/base_stats/mew.asm"
+INCLUDE "data/pokemon/base_stats/chikorita.asm"
+INCLUDE "data/pokemon/base_stats/bayleef.asm"
+INCLUDE "data/pokemon/base_stats/meganium.asm"
+INCLUDE "data/pokemon/base_stats/cyndaquil.asm"
+INCLUDE "data/pokemon/base_stats/quilava.asm"
+INCLUDE "data/pokemon/base_stats/typhlosion.asm"
+INCLUDE "data/pokemon/base_stats/totodile.asm"
+INCLUDE "data/pokemon/base_stats/croconaw.asm"
+INCLUDE "data/pokemon/base_stats/feraligatr.asm"
+INCLUDE "data/pokemon/base_stats/sentret.asm"
+INCLUDE "data/pokemon/base_stats/furret.asm"
+INCLUDE "data/pokemon/base_stats/hoothoot.asm"
+INCLUDE "data/pokemon/base_stats/noctowl.asm"
+INCLUDE "data/pokemon/base_stats/ledyba.asm"
+INCLUDE "data/pokemon/base_stats/ledian.asm"
+INCLUDE "data/pokemon/base_stats/spinarak.asm"
+INCLUDE "data/pokemon/base_stats/ariados.asm"
+INCLUDE "data/pokemon/base_stats/crobat.asm"
+INCLUDE "data/pokemon/base_stats/chinchou.asm"
+INCLUDE "data/pokemon/base_stats/lanturn.asm"
+INCLUDE "data/pokemon/base_stats/pichu.asm"
+INCLUDE "data/pokemon/base_stats/cleffa.asm"
+INCLUDE "data/pokemon/base_stats/igglybuff.asm"
+INCLUDE "data/pokemon/base_stats/togepi.asm"
+INCLUDE "data/pokemon/base_stats/togetic.asm"
+INCLUDE "data/pokemon/base_stats/natu.asm"
+INCLUDE "data/pokemon/base_stats/xatu.asm"
+INCLUDE "data/pokemon/base_stats/mareep.asm"
+INCLUDE "data/pokemon/base_stats/flaaffy.asm"
+INCLUDE "data/pokemon/base_stats/ampharos.asm"
+INCLUDE "data/pokemon/base_stats/bellossom.asm"
+INCLUDE "data/pokemon/base_stats/marill.asm"
+INCLUDE "data/pokemon/base_stats/azumarill.asm"
+INCLUDE "data/pokemon/base_stats/sudowoodo.asm"
+INCLUDE "data/pokemon/base_stats/politoed.asm"
+INCLUDE "data/pokemon/base_stats/hoppip.asm"
+INCLUDE "data/pokemon/base_stats/skiploom.asm"
+INCLUDE "data/pokemon/base_stats/jumpluff.asm"
+INCLUDE "data/pokemon/base_stats/aipom.asm"
+INCLUDE "data/pokemon/base_stats/sunkern.asm"
+INCLUDE "data/pokemon/base_stats/sunflora.asm"
+INCLUDE "data/pokemon/base_stats/yanma.asm"
+INCLUDE "data/pokemon/base_stats/wooper.asm"
+INCLUDE "data/pokemon/base_stats/quagsire.asm"
+INCLUDE "data/pokemon/base_stats/espeon.asm"
+INCLUDE "data/pokemon/base_stats/umbreon.asm"
+INCLUDE "data/pokemon/base_stats/murkrow.asm"
+INCLUDE "data/pokemon/base_stats/slowking.asm"
+INCLUDE "data/pokemon/base_stats/misdreavus.asm"
+INCLUDE "data/pokemon/base_stats/unown.asm"
+INCLUDE "data/pokemon/base_stats/wobbuffet.asm"
+INCLUDE "data/pokemon/base_stats/girafarig.asm"
+INCLUDE "data/pokemon/base_stats/pineco.asm"
+INCLUDE "data/pokemon/base_stats/forretress.asm"
+INCLUDE "data/pokemon/base_stats/dunsparce.asm"
+INCLUDE "data/pokemon/base_stats/gligar.asm"
+INCLUDE "data/pokemon/base_stats/steelix.asm"
+INCLUDE "data/pokemon/base_stats/snubbull.asm"
+INCLUDE "data/pokemon/base_stats/granbull.asm"
+INCLUDE "data/pokemon/base_stats/qwilfish.asm"
+INCLUDE "data/pokemon/base_stats/scizor.asm"
+INCLUDE "data/pokemon/base_stats/shuckle.asm"
+INCLUDE "data/pokemon/base_stats/heracross.asm"
+INCLUDE "data/pokemon/base_stats/sneasel.asm"
+INCLUDE "data/pokemon/base_stats/teddiursa.asm"
+INCLUDE "data/pokemon/base_stats/ursaring.asm"
+INCLUDE "data/pokemon/base_stats/slugma.asm"
+INCLUDE "data/pokemon/base_stats/magcargo.asm"
+INCLUDE "data/pokemon/base_stats/swinub.asm"
+INCLUDE "data/pokemon/base_stats/piloswine.asm"
+INCLUDE "data/pokemon/base_stats/corsola.asm"
+INCLUDE "data/pokemon/base_stats/remoraid.asm"
+INCLUDE "data/pokemon/base_stats/octillery.asm"
+INCLUDE "data/pokemon/base_stats/delibird.asm"
+INCLUDE "data/pokemon/base_stats/mantine.asm"
+INCLUDE "data/pokemon/base_stats/skarmory.asm"
+INCLUDE "data/pokemon/base_stats/houndour.asm"
+INCLUDE "data/pokemon/base_stats/houndoom.asm"
+INCLUDE "data/pokemon/base_stats/kingdra.asm"
+INCLUDE "data/pokemon/base_stats/phanpy.asm"
+INCLUDE "data/pokemon/base_stats/donphan.asm"
+INCLUDE "data/pokemon/base_stats/porygon2.asm"
+INCLUDE "data/pokemon/base_stats/stantler.asm"
+INCLUDE "data/pokemon/base_stats/smeargle.asm"
+INCLUDE "data/pokemon/base_stats/tyrogue.asm"
+INCLUDE "data/pokemon/base_stats/hitmontop.asm"
+INCLUDE "data/pokemon/base_stats/smoochum.asm"
+INCLUDE "data/pokemon/base_stats/elekid.asm"
+INCLUDE "data/pokemon/base_stats/magby.asm"
+INCLUDE "data/pokemon/base_stats/miltank.asm"
+INCLUDE "data/pokemon/base_stats/blissey.asm"
+INCLUDE "data/pokemon/base_stats/raikou.asm"
+INCLUDE "data/pokemon/base_stats/entei.asm"
+INCLUDE "data/pokemon/base_stats/suicune.asm"
+INCLUDE "data/pokemon/base_stats/larvitar.asm"
+INCLUDE "data/pokemon/base_stats/pupitar.asm"
+INCLUDE "data/pokemon/base_stats/tyranitar.asm"
+INCLUDE "data/pokemon/base_stats/lugia.asm"
+INCLUDE "data/pokemon/base_stats/ho_oh.asm"
+INCLUDE "data/pokemon/base_stats/celebi.asm"
diff --git a/data/pokemon/base_stats/abra.asm b/data/pokemon/base_stats/abra.asm
new file mode 100644
index 000000000..5167eb5cc
--- /dev/null
+++ b/data/pokemon/base_stats/abra.asm
@@ -0,0 +1,22 @@
+ db ABRA ; 063
+
+ db 25, 20, 15, 90, 105, 55
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, PSYCHIC
+ db 200 ; catch rate
+ db 73 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F25 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/abra/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/aerodactyl.asm b/data/pokemon/base_stats/aerodactyl.asm
new file mode 100644
index 000000000..897311399
--- /dev/null
+++ b/data/pokemon/base_stats/aerodactyl.asm
@@ -0,0 +1,22 @@
+ db AERODACTYL ; 142
+
+ db 80, 105, 65, 130, 60, 75
+ ; hp atk def spd sat sdf
+
+ db ROCK, FLYING
+ db 45 ; catch rate
+ db 202 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 35 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/aerodactyl/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, EARTHQUAKE, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DETECT, REST, ATTRACT, STEEL_WING, FLY, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/aipom.asm b/data/pokemon/base_stats/aipom.asm
new file mode 100644
index 000000000..839bff358
--- /dev/null
+++ b/data/pokemon/base_stats/aipom.asm
@@ -0,0 +1,22 @@
+ db AIPOM ; 190
+
+ db 55, 70, 55, 85, 40, 55
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 45 ; catch rate
+ db 94 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/aipom/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, NIGHTMARE, CUT, STRENGTH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/alakazam.asm b/data/pokemon/base_stats/alakazam.asm
new file mode 100644
index 000000000..594d6241d
--- /dev/null
+++ b/data/pokemon/base_stats/alakazam.asm
@@ -0,0 +1,22 @@
+ db ALAKAZAM ; 065
+
+ db 55, 50, 45, 120, 135, 85
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, PSYCHIC
+ db 50 ; catch rate
+ db 186 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F25 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/alakazam/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DIG, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/ampharos.asm b/data/pokemon/base_stats/ampharos.asm
new file mode 100644
index 000000000..ec361a08d
--- /dev/null
+++ b/data/pokemon/base_stats/ampharos.asm
@@ -0,0 +1,22 @@
+ db AMPHAROS ; 181
+
+ db 90, 75, 75, 55, 115, 90
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, ELECTRIC
+ db 45 ; catch rate
+ db 194 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/ampharos/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, STRENGTH, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/arbok.asm b/data/pokemon/base_stats/arbok.asm
new file mode 100644
index 000000000..ed84e5dc8
--- /dev/null
+++ b/data/pokemon/base_stats/arbok.asm
@@ -0,0 +1,22 @@
+ db ARBOK ; 024
+
+ db 60, 85, 69, 80, 65, 79
+ ; hp atk def spd sat sdf
+
+ db POISON, POISON
+ db 90 ; catch rate
+ db 147 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/arbok/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, REPTILE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/arcanine.asm b/data/pokemon/base_stats/arcanine.asm
new file mode 100644
index 000000000..d543bb8da
--- /dev/null
+++ b/data/pokemon/base_stats/arcanine.asm
@@ -0,0 +1,22 @@
+ db ARCANINE ; 059
+
+ db 90, 110, 80, 95, 100, 80
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 75 ; catch rate
+ db 213 ; base exp
+ db BURNT_BERRY ; item 1
+ db BURNT_BERRY ; item 2
+ db GENDER_F25 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/arcanine/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/ariados.asm b/data/pokemon/base_stats/ariados.asm
new file mode 100644
index 000000000..7b77b1afd
--- /dev/null
+++ b/data/pokemon/base_stats/ariados.asm
@@ -0,0 +1,22 @@
+ db ARIADOS ; 168
+
+ db 70, 90, 70, 40, 60, 60
+ ; hp atk def spd sat sdf
+
+ db BUG, POISON
+ db 90 ; catch rate
+ db 134 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/ariados/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/articuno.asm b/data/pokemon/base_stats/articuno.asm
new file mode 100644
index 000000000..ddf85599b
--- /dev/null
+++ b/data/pokemon/base_stats/articuno.asm
@@ -0,0 +1,22 @@
+ db ARTICUNO ; 144
+
+ db 90, 85, 100, 85, 95, 125
+ ; hp atk def spd sat sdf
+
+ db ICE, FLYING
+ db 3 ; catch rate
+ db 215 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 80 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/articuno/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, STEEL_WING, FLY, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/azumarill.asm b/data/pokemon/base_stats/azumarill.asm
new file mode 100644
index 000000000..c4286ad5d
--- /dev/null
+++ b/data/pokemon/base_stats/azumarill.asm
@@ -0,0 +1,22 @@
+ db AZUMARILL ; 184
+
+ db 100, 50, 80, 50, 50, 80
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 75 ; catch rate
+ db 153 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/azumarill/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn AMPHIBIAN, FAIRY ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/bayleef.asm b/data/pokemon/base_stats/bayleef.asm
new file mode 100644
index 000000000..82caf4ae7
--- /dev/null
+++ b/data/pokemon/base_stats/bayleef.asm
@@ -0,0 +1,22 @@
+ db BAYLEEF ; 153
+
+ db 60, 62, 80, 60, 63, 80
+ ; hp atk def spd sat sdf
+
+ db GRASS, GRASS
+ db 45 ; catch rate
+ db 141 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/bayleef/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, PLANT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, STRENGTH, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/beedrill.asm b/data/pokemon/base_stats/beedrill.asm
new file mode 100644
index 000000000..c76accff8
--- /dev/null
+++ b/data/pokemon/base_stats/beedrill.asm
@@ -0,0 +1,22 @@
+ db BEEDRILL ; 015
+
+ db 65, 80, 40, 75, 45, 80
+ ; hp atk def spd sat sdf
+
+ db BUG, POISON
+ db 45 ; catch rate
+ db 159 ; base exp
+ db NO_ITEM ; item 1
+ db POISON_BARB ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/beedrill/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SWIFT, REST, ATTRACT, FURY_CUTTER, CUT
+ ; end
diff --git a/data/pokemon/base_stats/bellossom.asm b/data/pokemon/base_stats/bellossom.asm
new file mode 100644
index 000000000..9131b2b38
--- /dev/null
+++ b/data/pokemon/base_stats/bellossom.asm
@@ -0,0 +1,22 @@
+ db BELLOSSOM ; 182
+
+ db 75, 80, 85, 50, 90, 100
+ ; hp atk def spd sat sdf
+
+ db GRASS, GRASS
+ db 45 ; catch rate
+ db 184 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/bellossom/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn PLANT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/bellsprout.asm b/data/pokemon/base_stats/bellsprout.asm
new file mode 100644
index 000000000..94a8ded6b
--- /dev/null
+++ b/data/pokemon/base_stats/bellsprout.asm
@@ -0,0 +1,22 @@
+ db BELLSPROUT ; 069
+
+ db 50, 75, 35, 40, 70, 30
+ ; hp atk def spd sat sdf
+
+ db GRASS, POISON
+ db 255 ; catch rate
+ db 84 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/bellsprout/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn PLANT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/blastoise.asm b/data/pokemon/base_stats/blastoise.asm
new file mode 100644
index 000000000..7bb267d72
--- /dev/null
+++ b/data/pokemon/base_stats/blastoise.asm
@@ -0,0 +1,22 @@
+ db BLASTOISE ; 009
+
+ db 79, 83, 100, 78, 85, 105
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 45 ; catch rate
+ db 210 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/blastoise/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/blissey.asm b/data/pokemon/base_stats/blissey.asm
new file mode 100644
index 000000000..d1da5ea85
--- /dev/null
+++ b/data/pokemon/base_stats/blissey.asm
@@ -0,0 +1,22 @@
+ db BLISSEY ; 242
+
+ db 255, 10, 10, 55, 75, 135
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 30 ; catch rate
+ db 255 ; base exp
+ db NO_ITEM ; item 1
+ db LUCKY_EGG ; item 2
+ db GENDER_F100 ; gender
+ db 100 ; unknown
+ db 40 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/blissey/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn FAIRY, FAIRY ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, DREAM_EATER, REST, ATTRACT, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/bulbasaur.asm b/data/pokemon/base_stats/bulbasaur.asm
new file mode 100644
index 000000000..bc843bcd3
--- /dev/null
+++ b/data/pokemon/base_stats/bulbasaur.asm
@@ -0,0 +1,22 @@
+ db BULBASAUR ; 001
+
+ db 45, 49, 49, 45, 65, 65
+ ; hp atk def spd sat sdf
+
+ db GRASS, POISON
+ db 45 ; catch rate
+ db 64 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/bulbasaur/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, PLANT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FURY_CUTTER, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/butterfree.asm b/data/pokemon/base_stats/butterfree.asm
new file mode 100644
index 000000000..2392f4139
--- /dev/null
+++ b/data/pokemon/base_stats/butterfree.asm
@@ -0,0 +1,22 @@
+ db BUTTERFREE ; 012
+
+ db 60, 45, 50, 70, 80, 80
+ ; hp atk def spd sat sdf
+
+ db BUG, FLYING
+ db 45 ; catch rate
+ db 160 ; base exp
+ db NO_ITEM ; item 1
+ db SILVERPOWDER ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/butterfree/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, NIGHTMARE, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/caterpie.asm b/data/pokemon/base_stats/caterpie.asm
new file mode 100644
index 000000000..cdac5bf26
--- /dev/null
+++ b/data/pokemon/base_stats/caterpie.asm
@@ -0,0 +1,22 @@
+ db CATERPIE ; 010
+
+ db 45, 30, 35, 45, 20, 20
+ ; hp atk def spd sat sdf
+
+ db BUG, BUG
+ db 255 ; catch rate
+ db 53 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/caterpie/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm
+ ; end
diff --git a/data/pokemon/base_stats/celebi.asm b/data/pokemon/base_stats/celebi.asm
new file mode 100644
index 000000000..986ebcc83
--- /dev/null
+++ b/data/pokemon/base_stats/celebi.asm
@@ -0,0 +1,22 @@
+ db CELEBI ; 251
+
+ db 100, 100, 100, 100, 100, 100
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, GRASS
+ db 45 ; catch rate
+ db 64 ; base exp
+ db NO_ITEM ; item 1
+ db MIRACLEBERRY ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 120 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/celebi/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, NIGHTMARE, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/chansey.asm b/data/pokemon/base_stats/chansey.asm
new file mode 100644
index 000000000..aeb4aa1d5
--- /dev/null
+++ b/data/pokemon/base_stats/chansey.asm
@@ -0,0 +1,22 @@
+ db CHANSEY ; 113
+
+ db 250, 05, 05, 50, 35, 105
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 30 ; catch rate
+ db 255 ; base exp
+ db NO_ITEM ; item 1
+ db LUCKY_EGG ; item 2
+ db GENDER_F100 ; gender
+ db 100 ; unknown
+ db 40 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/chansey/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn FAIRY, FAIRY ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, DREAM_EATER, REST, ATTRACT, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/charizard.asm b/data/pokemon/base_stats/charizard.asm
new file mode 100644
index 000000000..8d32f3f91
--- /dev/null
+++ b/data/pokemon/base_stats/charizard.asm
@@ -0,0 +1,22 @@
+ db CHARIZARD ; 006
+
+ db 78, 84, 78, 100, 109, 85
+ ; hp atk def spd sat sdf
+
+ db FIRE, FLYING
+ db 45 ; catch rate
+ db 209 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/charizard/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, REPTILE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DEFENSE_CURL, REST, ATTRACT, STEEL_WING, FIRE_PUNCH, FURY_CUTTER, CUT, FLY, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/charmander.asm b/data/pokemon/base_stats/charmander.asm
new file mode 100644
index 000000000..98383865c
--- /dev/null
+++ b/data/pokemon/base_stats/charmander.asm
@@ -0,0 +1,22 @@
+ db CHARMANDER ; 004
+
+ db 39, 52, 43, 65, 60, 50
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 45 ; catch rate
+ db 65 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/charmander/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, REPTILE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/charmeleon.asm b/data/pokemon/base_stats/charmeleon.asm
new file mode 100644
index 000000000..9f7f32b51
--- /dev/null
+++ b/data/pokemon/base_stats/charmeleon.asm
@@ -0,0 +1,22 @@
+ db CHARMELEON ; 005
+
+ db 58, 64, 58, 80, 80, 65
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 45 ; catch rate
+ db 142 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/charmeleon/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, REPTILE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/chikorita.asm b/data/pokemon/base_stats/chikorita.asm
new file mode 100644
index 000000000..fdf120402
--- /dev/null
+++ b/data/pokemon/base_stats/chikorita.asm
@@ -0,0 +1,22 @@
+ db CHIKORITA ; 152
+
+ db 45, 49, 65, 45, 49, 65
+ ; hp atk def spd sat sdf
+
+ db GRASS, GRASS
+ db 45 ; catch rate
+ db 64 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/chikorita/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, PLANT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/chinchou.asm b/data/pokemon/base_stats/chinchou.asm
new file mode 100644
index 000000000..caa5d06e1
--- /dev/null
+++ b/data/pokemon/base_stats/chinchou.asm
@@ -0,0 +1,22 @@
+ db CHINCHOU ; 170
+
+ db 75, 38, 38, 67, 56, 56
+ ; hp atk def spd sat sdf
+
+ db WATER, ELECTRIC
+ db 190 ; catch rate
+ db 90 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/chinchou/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn FISH, FISH ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, SURF, FLASH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/clefable.asm b/data/pokemon/base_stats/clefable.asm
new file mode 100644
index 000000000..6e72b9614
--- /dev/null
+++ b/data/pokemon/base_stats/clefable.asm
@@ -0,0 +1,22 @@
+ db CLEFABLE ; 036
+
+ db 95, 70, 73, 60, 85, 90
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 25 ; catch rate
+ db 129 ; base exp
+ db MYSTERYBERRY ; item 1
+ db MOON_STONE ; item 2
+ db GENDER_F75 ; gender
+ db 100 ; unknown
+ db 10 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/clefable/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn FAIRY, FAIRY ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/clefairy.asm b/data/pokemon/base_stats/clefairy.asm
new file mode 100644
index 000000000..53688a158
--- /dev/null
+++ b/data/pokemon/base_stats/clefairy.asm
@@ -0,0 +1,22 @@
+ db CLEFAIRY ; 035
+
+ db 70, 45, 48, 35, 60, 65
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 150 ; catch rate
+ db 68 ; base exp
+ db MYSTERYBERRY ; item 1
+ db MOON_STONE ; item 2
+ db GENDER_F75 ; gender
+ db 100 ; unknown
+ db 10 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/clefairy/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn FAIRY, FAIRY ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/cleffa.asm b/data/pokemon/base_stats/cleffa.asm
new file mode 100644
index 000000000..c431ae2bf
--- /dev/null
+++ b/data/pokemon/base_stats/cleffa.asm
@@ -0,0 +1,22 @@
+ db CLEFFA ; 173
+
+ db 50, 25, 28, 15, 45, 55
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 150 ; catch rate
+ db 37 ; base exp
+ db MYSTERYBERRY ; item 1
+ db MOON_STONE ; item 2
+ db GENDER_F75 ; gender
+ db 100 ; unknown
+ db 10 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/cleffa/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, NIGHTMARE, FLASH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/cloyster.asm b/data/pokemon/base_stats/cloyster.asm
new file mode 100644
index 000000000..4119dbec2
--- /dev/null
+++ b/data/pokemon/base_stats/cloyster.asm
@@ -0,0 +1,22 @@
+ db CLOYSTER ; 091
+
+ db 50, 95, 180, 70, 85, 45
+ ; hp atk def spd sat sdf
+
+ db WATER, ICE
+ db 60 ; catch rate
+ db 203 ; base exp
+ db PEARL ; item 1
+ db BIG_PEARL ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/cloyster/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn INVERTEBRATE, INVERTEBRATE ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/corsola.asm b/data/pokemon/base_stats/corsola.asm
new file mode 100644
index 000000000..5c559c64b
--- /dev/null
+++ b/data/pokemon/base_stats/corsola.asm
@@ -0,0 +1,22 @@
+ db CORSOLA ; 222
+
+ db 55, 55, 85, 35, 65, 85
+ ; hp atk def spd sat sdf
+
+ db WATER, ROCK
+ db 60 ; catch rate
+ db 113 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F75 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/corsola/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn AMPHIBIAN, INVERTEBRATE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/crobat.asm b/data/pokemon/base_stats/crobat.asm
new file mode 100644
index 000000000..71c012079
--- /dev/null
+++ b/data/pokemon/base_stats/crobat.asm
@@ -0,0 +1,22 @@
+ db CROBAT ; 169
+
+ db 85, 90, 80, 130, 70, 80
+ ; hp atk def spd sat sdf
+
+ db POISON, FLYING
+ db 90 ; catch rate
+ db 204 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/crobat/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY
+ ; end
diff --git a/data/pokemon/base_stats/croconaw.asm b/data/pokemon/base_stats/croconaw.asm
new file mode 100644
index 000000000..8dbd57632
--- /dev/null
+++ b/data/pokemon/base_stats/croconaw.asm
@@ -0,0 +1,22 @@
+ db CROCONAW ; 159
+
+ db 65, 80, 80, 58, 59, 63
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 45 ; catch rate
+ db 143 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/croconaw/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/cubone.asm b/data/pokemon/base_stats/cubone.asm
new file mode 100644
index 000000000..dc15c8773
--- /dev/null
+++ b/data/pokemon/base_stats/cubone.asm
@@ -0,0 +1,22 @@
+ db CUBONE ; 104
+
+ db 50, 50, 95, 35, 40, 50
+ ; hp atk def spd sat sdf
+
+ db GROUND, GROUND
+ db 190 ; catch rate
+ db 87 ; base exp
+ db NO_ITEM ; item 1
+ db THICK_CLUB ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/cubone/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn MONSTER, MONSTER ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/cyndaquil.asm b/data/pokemon/base_stats/cyndaquil.asm
new file mode 100644
index 000000000..137e8c78d
--- /dev/null
+++ b/data/pokemon/base_stats/cyndaquil.asm
@@ -0,0 +1,22 @@
+ db CYNDAQUIL ; 155
+
+ db 39, 52, 43, 65, 60, 50
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 45 ; catch rate
+ db 65 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/cyndaquil/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, CUT, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/delibird.asm b/data/pokemon/base_stats/delibird.asm
new file mode 100644
index 000000000..8ddb23e7c
--- /dev/null
+++ b/data/pokemon/base_stats/delibird.asm
@@ -0,0 +1,22 @@
+ db DELIBIRD ; 225
+
+ db 45, 55, 45, 75, 65, 45
+ ; hp atk def spd sat sdf
+
+ db ICE, FLYING
+ db 45 ; catch rate
+ db 183 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/delibird/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn AMPHIBIAN, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, FLY, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/dewgong.asm b/data/pokemon/base_stats/dewgong.asm
new file mode 100644
index 000000000..951a1e87e
--- /dev/null
+++ b/data/pokemon/base_stats/dewgong.asm
@@ -0,0 +1,22 @@
+ db DEWGONG ; 087
+
+ db 90, 70, 80, 70, 70, 95
+ ; hp atk def spd sat sdf
+
+ db WATER, ICE
+ db 75 ; catch rate
+ db 176 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/dewgong/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/diglett.asm b/data/pokemon/base_stats/diglett.asm
new file mode 100644
index 000000000..b93947622
--- /dev/null
+++ b/data/pokemon/base_stats/diglett.asm
@@ -0,0 +1,22 @@
+ db DIGLETT ; 050
+
+ db 10, 55, 25, 95, 35, 45
+ ; hp atk def spd sat sdf
+
+ db GROUND, GROUND
+ db 255 ; catch rate
+ db 81 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/diglett/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, CUT
+ ; end
diff --git a/data/pokemon/base_stats/ditto.asm b/data/pokemon/base_stats/ditto.asm
new file mode 100644
index 000000000..b88780bed
--- /dev/null
+++ b/data/pokemon/base_stats/ditto.asm
@@ -0,0 +1,22 @@
+ db DITTO ; 132
+
+ db 48, 48, 48, 48, 48, 48
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 35 ; catch rate
+ db 61 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/ditto/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn LADIES_MAN, LADIES_MAN ; egg groups
+
+ ; tmhm
+ tmhm
+ ; end
diff --git a/data/pokemon/base_stats/dodrio.asm b/data/pokemon/base_stats/dodrio.asm
new file mode 100644
index 000000000..6f8463663
--- /dev/null
+++ b/data/pokemon/base_stats/dodrio.asm
@@ -0,0 +1,22 @@
+ db DODRIO ; 085
+
+ db 60, 110, 70, 100, 60, 60
+ ; hp atk def spd sat sdf
+
+ db NORMAL, FLYING
+ db 45 ; catch rate
+ db 158 ; base exp
+ db NO_ITEM ; item 1
+ db SHARP_BEAK ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/dodrio/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, THIEF, STEEL_WING, FLY
+ ; end
diff --git a/data/pokemon/base_stats/doduo.asm b/data/pokemon/base_stats/doduo.asm
new file mode 100644
index 000000000..1ef229455
--- /dev/null
+++ b/data/pokemon/base_stats/doduo.asm
@@ -0,0 +1,22 @@
+ db DODUO ; 084
+
+ db 35, 85, 45, 75, 35, 35
+ ; hp atk def spd sat sdf
+
+ db NORMAL, FLYING
+ db 190 ; catch rate
+ db 96 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/doduo/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, THIEF, STEEL_WING, FLY
+ ; end
diff --git a/data/pokemon/base_stats/donphan.asm b/data/pokemon/base_stats/donphan.asm
new file mode 100644
index 000000000..ee0418de0
--- /dev/null
+++ b/data/pokemon/base_stats/donphan.asm
@@ -0,0 +1,22 @@
+ db DONPHAN ; 232
+
+ db 90, 120, 120, 50, 60, 60
+ ; hp atk def spd sat sdf
+
+ db GROUND, GROUND
+ db 60 ; catch rate
+ db 189 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/donphan/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/dragonair.asm b/data/pokemon/base_stats/dragonair.asm
new file mode 100644
index 000000000..e0ca4b8e9
--- /dev/null
+++ b/data/pokemon/base_stats/dragonair.asm
@@ -0,0 +1,22 @@
+ db DRAGONAIR ; 148
+
+ db 61, 84, 65, 70, 70, 70
+ ; hp atk def spd sat sdf
+
+ db DRAGON, DRAGON
+ db 45 ; catch rate
+ db 144 ; base exp
+ db NO_ITEM ; item 1
+ db DRAGON_SCALE ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 40 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/dragonair/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn AMPHIBIAN, REPTILE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DETECT, REST, ATTRACT, SURF, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/dragonite.asm b/data/pokemon/base_stats/dragonite.asm
new file mode 100644
index 000000000..8ca777e96
--- /dev/null
+++ b/data/pokemon/base_stats/dragonite.asm
@@ -0,0 +1,22 @@
+ db DRAGONITE ; 149
+
+ db 91, 134, 95, 80, 100, 100
+ ; hp atk def spd sat sdf
+
+ db DRAGON, FLYING
+ db 45 ; catch rate
+ db 218 ; base exp
+ db NO_ITEM ; item 1
+ db DRAGON_SCALE ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 40 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/dragonite/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn AMPHIBIAN, REPTILE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, THUNDERPUNCH, DETECT, REST, ATTRACT, STEEL_WING, FIRE_PUNCH, FURY_CUTTER, FLY, SURF, STRENGTH, WHIRLPOOL, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/dratini.asm b/data/pokemon/base_stats/dratini.asm
new file mode 100644
index 000000000..c1c173c86
--- /dev/null
+++ b/data/pokemon/base_stats/dratini.asm
@@ -0,0 +1,22 @@
+ db DRATINI ; 147
+
+ db 41, 64, 45, 50, 50, 50
+ ; hp atk def spd sat sdf
+
+ db DRAGON, DRAGON
+ db 45 ; catch rate
+ db 67 ; base exp
+ db NO_ITEM ; item 1
+ db DRAGON_SCALE ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 40 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/dratini/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn AMPHIBIAN, REPTILE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DETECT, REST, ATTRACT, SURF, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/drowzee.asm b/data/pokemon/base_stats/drowzee.asm
new file mode 100644
index 000000000..0a456e8b8
--- /dev/null
+++ b/data/pokemon/base_stats/drowzee.asm
@@ -0,0 +1,22 @@
+ db DROWZEE ; 096
+
+ db 60, 48, 45, 42, 43, 90
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, PSYCHIC
+ db 190 ; catch rate
+ db 102 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/drowzee/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/dugtrio.asm b/data/pokemon/base_stats/dugtrio.asm
new file mode 100644
index 000000000..e245f8320
--- /dev/null
+++ b/data/pokemon/base_stats/dugtrio.asm
@@ -0,0 +1,22 @@
+ db DUGTRIO ; 051
+
+ db 35, 80, 50, 120, 50, 70
+ ; hp atk def spd sat sdf
+
+ db GROUND, GROUND
+ db 50 ; catch rate
+ db 153 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/dugtrio/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, CUT
+ ; end
diff --git a/data/pokemon/base_stats/dunsparce.asm b/data/pokemon/base_stats/dunsparce.asm
new file mode 100644
index 000000000..5cbdb5807
--- /dev/null
+++ b/data/pokemon/base_stats/dunsparce.asm
@@ -0,0 +1,22 @@
+ db DUNSPARCE ; 206
+
+ db 100, 70, 70, 45, 65, 65
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 190 ; catch rate
+ db 75 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/dunsparce/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, FLAMETHROWER, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/eevee.asm b/data/pokemon/base_stats/eevee.asm
new file mode 100644
index 000000000..79bbafbcf
--- /dev/null
+++ b/data/pokemon/base_stats/eevee.asm
@@ -0,0 +1,22 @@
+ db EEVEE ; 133
+
+ db 55, 55, 50, 55, 45, 65
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 45 ; catch rate
+ db 92 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 35 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/eevee/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT
+ ; end
diff --git a/data/pokemon/base_stats/ekans.asm b/data/pokemon/base_stats/ekans.asm
new file mode 100644
index 000000000..0aa84fde2
--- /dev/null
+++ b/data/pokemon/base_stats/ekans.asm
@@ -0,0 +1,22 @@
+ db EKANS ; 023
+
+ db 35, 60, 44, 55, 40, 54
+ ; hp atk def spd sat sdf
+
+ db POISON, POISON
+ db 255 ; catch rate
+ db 62 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/ekans/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, REPTILE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/electabuzz.asm b/data/pokemon/base_stats/electabuzz.asm
new file mode 100644
index 000000000..a787adcb2
--- /dev/null
+++ b/data/pokemon/base_stats/electabuzz.asm
@@ -0,0 +1,22 @@
+ db ELECTABUZZ ; 125
+
+ db 65, 83, 57, 105, 95, 85
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, ELECTRIC
+ db 45 ; catch rate
+ db 156 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F25 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/electabuzz/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/electrode.asm b/data/pokemon/base_stats/electrode.asm
new file mode 100644
index 000000000..44d92de66
--- /dev/null
+++ b/data/pokemon/base_stats/electrode.asm
@@ -0,0 +1,22 @@
+ db ELECTRODE ; 101
+
+ db 60, 50, 70, 140, 80, 80
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, ELECTRIC
+ db 60 ; catch rate
+ db 150 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/electrode/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INANIMATE, INANIMATE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/elekid.asm b/data/pokemon/base_stats/elekid.asm
new file mode 100644
index 000000000..999a85103
--- /dev/null
+++ b/data/pokemon/base_stats/elekid.asm
@@ -0,0 +1,22 @@
+ db ELEKID ; 239
+
+ db 45, 63, 37, 95, 65, 55
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, ELECTRIC
+ db 45 ; catch rate
+ db 106 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F25 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/elekid/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/entei.asm b/data/pokemon/base_stats/entei.asm
new file mode 100644
index 000000000..63f5f0af6
--- /dev/null
+++ b/data/pokemon/base_stats/entei.asm
@@ -0,0 +1,22 @@
+ db ENTEI ; 244
+
+ db 115, 115, 85, 100, 90, 75
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 3 ; catch rate
+ db 217 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 80 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/entei/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DETECT, REST, CUT, STRENGTH, FLASH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/espeon.asm b/data/pokemon/base_stats/espeon.asm
new file mode 100644
index 000000000..626b5bdd9
--- /dev/null
+++ b/data/pokemon/base_stats/espeon.asm
@@ -0,0 +1,22 @@
+ db ESPEON ; 196
+
+ db 65, 65, 60, 110, 130, 95
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, PSYCHIC
+ db 45 ; catch rate
+ db 197 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 35 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/espeon/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, NIGHTMARE, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/exeggcute.asm b/data/pokemon/base_stats/exeggcute.asm
new file mode 100644
index 000000000..8c9cadc43
--- /dev/null
+++ b/data/pokemon/base_stats/exeggcute.asm
@@ -0,0 +1,22 @@
+ db EXEGGCUTE ; 102
+
+ db 60, 40, 80, 40, 60, 45
+ ; hp atk def spd sat sdf
+
+ db GRASS, PSYCHIC
+ db 90 ; catch rate
+ db 98 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/exeggcute/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn PLANT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, ROLLOUT, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/exeggutor.asm b/data/pokemon/base_stats/exeggutor.asm
new file mode 100644
index 000000000..259a1014e
--- /dev/null
+++ b/data/pokemon/base_stats/exeggutor.asm
@@ -0,0 +1,22 @@
+ db EXEGGUTOR ; 103
+
+ db 95, 95, 85, 55, 125, 65
+ ; hp atk def spd sat sdf
+
+ db GRASS, PSYCHIC
+ db 45 ; catch rate
+ db 212 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/exeggutor/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn PLANT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/farfetch_d.asm b/data/pokemon/base_stats/farfetch_d.asm
new file mode 100644
index 000000000..8da2b08a4
--- /dev/null
+++ b/data/pokemon/base_stats/farfetch_d.asm
@@ -0,0 +1,22 @@
+ db FARFETCH_D ; 083
+
+ db 52, 65, 55, 60, 58, 62
+ ; hp atk def spd sat sdf
+
+ db NORMAL, FLYING
+ db 45 ; catch rate
+ db 94 ; base exp
+ db NO_ITEM ; item 1
+ db STICK ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/farfetch_d/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AVIAN, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, CUT, FLY
+ ; end
diff --git a/data/pokemon/base_stats/fearow.asm b/data/pokemon/base_stats/fearow.asm
new file mode 100644
index 000000000..2ce86b1bf
--- /dev/null
+++ b/data/pokemon/base_stats/fearow.asm
@@ -0,0 +1,22 @@
+ db FEAROW ; 022
+
+ db 65, 90, 65, 100, 61, 61
+ ; hp atk def spd sat sdf
+
+ db NORMAL, FLYING
+ db 90 ; catch rate
+ db 162 ; base exp
+ db NO_ITEM ; item 1
+ db SHARP_BEAK ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/fearow/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY
+ ; end
diff --git a/data/pokemon/base_stats/feraligatr.asm b/data/pokemon/base_stats/feraligatr.asm
new file mode 100644
index 000000000..c59ca6ffb
--- /dev/null
+++ b/data/pokemon/base_stats/feraligatr.asm
@@ -0,0 +1,22 @@
+ db FERALIGATR ; 160
+
+ db 85, 105, 100, 78, 79, 83
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 45 ; catch rate
+ db 210 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/feraligatr/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/flaaffy.asm b/data/pokemon/base_stats/flaaffy.asm
new file mode 100644
index 000000000..2cf5e15bc
--- /dev/null
+++ b/data/pokemon/base_stats/flaaffy.asm
@@ -0,0 +1,22 @@
+ db FLAAFFY ; 180
+
+ db 70, 55, 55, 45, 80, 60
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, ELECTRIC
+ db 120 ; catch rate
+ db 117 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/flaaffy/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, STRENGTH, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/flareon.asm b/data/pokemon/base_stats/flareon.asm
new file mode 100644
index 000000000..00faecec6
--- /dev/null
+++ b/data/pokemon/base_stats/flareon.asm
@@ -0,0 +1,22 @@
+ db FLAREON ; 136
+
+ db 65, 130, 60, 65, 95, 110
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 45 ; catch rate
+ db 198 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 35 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/flareon/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DETECT, REST, ATTRACT, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/forretress.asm b/data/pokemon/base_stats/forretress.asm
new file mode 100644
index 000000000..08fec2745
--- /dev/null
+++ b/data/pokemon/base_stats/forretress.asm
@@ -0,0 +1,22 @@
+ db FORRETRESS ; 205
+
+ db 75, 90, 140, 40, 60, 60
+ ; hp atk def spd sat sdf
+
+ db BUG, STEEL
+ db 75 ; catch rate
+ db 118 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/forretress/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/furret.asm b/data/pokemon/base_stats/furret.asm
new file mode 100644
index 000000000..3e3b7a656
--- /dev/null
+++ b/data/pokemon/base_stats/furret.asm
@@ -0,0 +1,22 @@
+ db FURRET ; 162
+
+ db 85, 76, 64, 90, 45, 55
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 90 ; catch rate
+ db 116 ; base exp
+ db BERRY ; item 1
+ db GOLD_BERRY ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/furret/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, CUT, SURF, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/gastly.asm b/data/pokemon/base_stats/gastly.asm
new file mode 100644
index 000000000..8b0547b6a
--- /dev/null
+++ b/data/pokemon/base_stats/gastly.asm
@@ -0,0 +1,22 @@
+ db GASTLY ; 092
+
+ db 30, 35, 30, 80, 100, 35
+ ; hp atk def spd sat sdf
+
+ db GHOST, POISON
+ db 190 ; catch rate
+ db 95 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/gastly/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn AMORPHOUS, AMORPHOUS ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/gengar.asm b/data/pokemon/base_stats/gengar.asm
new file mode 100644
index 000000000..a152f7e43
--- /dev/null
+++ b/data/pokemon/base_stats/gengar.asm
@@ -0,0 +1,22 @@
+ db GENGAR ; 094
+
+ db 60, 65, 60, 110, 130, 75
+ ; hp atk def spd sat sdf
+
+ db GHOST, POISON
+ db 45 ; catch rate
+ db 190 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/gengar/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn AMORPHOUS, AMORPHOUS ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, STRENGTH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/geodude.asm b/data/pokemon/base_stats/geodude.asm
new file mode 100644
index 000000000..86b627107
--- /dev/null
+++ b/data/pokemon/base_stats/geodude.asm
@@ -0,0 +1,22 @@
+ db GEODUDE ; 074
+
+ db 40, 80, 100, 20, 30, 30
+ ; hp atk def spd sat sdf
+
+ db ROCK, GROUND
+ db 255 ; catch rate
+ db 86 ; base exp
+ db NO_ITEM ; item 1
+ db EVERSTONE ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/geodude/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn INANIMATE, INANIMATE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/girafarig.asm b/data/pokemon/base_stats/girafarig.asm
new file mode 100644
index 000000000..f832b2c28
--- /dev/null
+++ b/data/pokemon/base_stats/girafarig.asm
@@ -0,0 +1,22 @@
+ db GIRAFARIG ; 203
+
+ db 70, 80, 65, 85, 90, 65
+ ; hp atk def spd sat sdf
+
+ db NORMAL, PSYCHIC
+ db 60 ; catch rate
+ db 149 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/girafarig/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/gligar.asm b/data/pokemon/base_stats/gligar.asm
new file mode 100644
index 000000000..5bb7fdca8
--- /dev/null
+++ b/data/pokemon/base_stats/gligar.asm
@@ -0,0 +1,22 @@
+ db GLIGAR ; 207
+
+ db 65, 75, 105, 85, 35, 65
+ ; hp atk def spd sat sdf
+
+ db GROUND, FLYING
+ db 60 ; catch rate
+ db 108 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/gligar/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, SWIFT, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/gloom.asm b/data/pokemon/base_stats/gloom.asm
new file mode 100644
index 000000000..33cea01f2
--- /dev/null
+++ b/data/pokemon/base_stats/gloom.asm
@@ -0,0 +1,22 @@
+ db GLOOM ; 044
+
+ db 60, 65, 70, 40, 85, 75
+ ; hp atk def spd sat sdf
+
+ db GRASS, POISON
+ db 120 ; catch rate
+ db 132 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/gloom/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn PLANT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/golbat.asm b/data/pokemon/base_stats/golbat.asm
new file mode 100644
index 000000000..06769b880
--- /dev/null
+++ b/data/pokemon/base_stats/golbat.asm
@@ -0,0 +1,22 @@
+ db GOLBAT ; 042
+
+ db 75, 80, 70, 90, 65, 75
+ ; hp atk def spd sat sdf
+
+ db POISON, FLYING
+ db 90 ; catch rate
+ db 171 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/golbat/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING
+ ; end
diff --git a/data/pokemon/base_stats/goldeen.asm b/data/pokemon/base_stats/goldeen.asm
new file mode 100644
index 000000000..314852a3e
--- /dev/null
+++ b/data/pokemon/base_stats/goldeen.asm
@@ -0,0 +1,22 @@
+ db GOLDEEN ; 118
+
+ db 45, 67, 60, 63, 35, 50
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 225 ; catch rate
+ db 111 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/goldeen/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FISH, FISH ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/golduck.asm b/data/pokemon/base_stats/golduck.asm
new file mode 100644
index 000000000..9c4dbb5f5
--- /dev/null
+++ b/data/pokemon/base_stats/golduck.asm
@@ -0,0 +1,22 @@
+ db GOLDUCK ; 055
+
+ db 80, 82, 78, 85, 95, 80
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 75 ; catch rate
+ db 174 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/golduck/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, FURY_CUTTER, SURF, STRENGTH, FLASH, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/golem.asm b/data/pokemon/base_stats/golem.asm
new file mode 100644
index 000000000..9a9f04451
--- /dev/null
+++ b/data/pokemon/base_stats/golem.asm
@@ -0,0 +1,22 @@
+ db GOLEM ; 076
+
+ db 80, 110, 130, 45, 55, 65
+ ; hp atk def spd sat sdf
+
+ db ROCK, GROUND
+ db 45 ; catch rate
+ db 177 ; base exp
+ db NO_ITEM ; item 1
+ db EVERSTONE ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/golem/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn INANIMATE, INANIMATE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/granbull.asm b/data/pokemon/base_stats/granbull.asm
new file mode 100644
index 000000000..088e17dd8
--- /dev/null
+++ b/data/pokemon/base_stats/granbull.asm
@@ -0,0 +1,22 @@
+ db GRANBULL ; 210
+
+ db 90, 120, 75, 45, 60, 60
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 75 ; catch rate
+ db 178 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F75 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/granbull/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn FIELD, FAIRY ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/graveler.asm b/data/pokemon/base_stats/graveler.asm
new file mode 100644
index 000000000..dfbeb770c
--- /dev/null
+++ b/data/pokemon/base_stats/graveler.asm
@@ -0,0 +1,22 @@
+ db GRAVELER ; 075
+
+ db 55, 95, 115, 35, 45, 45
+ ; hp atk def spd sat sdf
+
+ db ROCK, GROUND
+ db 120 ; catch rate
+ db 134 ; base exp
+ db NO_ITEM ; item 1
+ db EVERSTONE ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/graveler/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn INANIMATE, INANIMATE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/grimer.asm b/data/pokemon/base_stats/grimer.asm
new file mode 100644
index 000000000..86dacd1e6
--- /dev/null
+++ b/data/pokemon/base_stats/grimer.asm
@@ -0,0 +1,22 @@
+ db GRIMER ; 088
+
+ db 80, 80, 50, 25, 40, 50
+ ; hp atk def spd sat sdf
+
+ db POISON, POISON
+ db 190 ; catch rate
+ db 90 ; base exp
+ db NO_ITEM ; item 1
+ db NUGGET ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/grimer/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMORPHOUS, AMORPHOUS ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, FLAMETHROWER, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/growlithe.asm b/data/pokemon/base_stats/growlithe.asm
new file mode 100644
index 000000000..ef5cc53b3
--- /dev/null
+++ b/data/pokemon/base_stats/growlithe.asm
@@ -0,0 +1,22 @@
+ db GROWLITHE ; 058
+
+ db 55, 70, 45, 60, 70, 50
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 190 ; catch rate
+ db 91 ; base exp
+ db BURNT_BERRY ; item 1
+ db BURNT_BERRY ; item 2
+ db GENDER_F25 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/growlithe/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/gyarados.asm b/data/pokemon/base_stats/gyarados.asm
new file mode 100644
index 000000000..1bdceff88
--- /dev/null
+++ b/data/pokemon/base_stats/gyarados.asm
@@ -0,0 +1,22 @@
+ db GYARADOS ; 130
+
+ db 95, 125, 79, 81, 60, 100
+ ; hp atk def spd sat sdf
+
+ db WATER, FLYING
+ db 45 ; catch rate
+ db 214 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 5 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/gyarados/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn FISH, REPTILE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, DRAGONBREATH, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/haunter.asm b/data/pokemon/base_stats/haunter.asm
new file mode 100644
index 000000000..c0a192d67
--- /dev/null
+++ b/data/pokemon/base_stats/haunter.asm
@@ -0,0 +1,22 @@
+ db HAUNTER ; 093
+
+ db 45, 50, 45, 95, 115, 55
+ ; hp atk def spd sat sdf
+
+ db GHOST, POISON
+ db 90 ; catch rate
+ db 126 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/haunter/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn AMORPHOUS, AMORPHOUS ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/heracross.asm b/data/pokemon/base_stats/heracross.asm
new file mode 100644
index 000000000..1f81d9c7b
--- /dev/null
+++ b/data/pokemon/base_stats/heracross.asm
@@ -0,0 +1,22 @@
+ db HERACROSS ; 214
+
+ db 80, 125, 75, 85, 40, 95
+ ; hp atk def spd sat sdf
+
+ db BUG, FIGHTING
+ db 45 ; catch rate
+ db 200 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/heracross/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/hitmonchan.asm b/data/pokemon/base_stats/hitmonchan.asm
new file mode 100644
index 000000000..3eeb23dd4
--- /dev/null
+++ b/data/pokemon/base_stats/hitmonchan.asm
@@ -0,0 +1,22 @@
+ db HITMONCHAN ; 107
+
+ db 50, 105, 79, 76, 35, 110
+ ; hp atk def spd sat sdf
+
+ db FIGHTING, FIGHTING
+ db 45 ; catch rate
+ db 140 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F0 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/hitmonchan/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/hitmonlee.asm b/data/pokemon/base_stats/hitmonlee.asm
new file mode 100644
index 000000000..a31352209
--- /dev/null
+++ b/data/pokemon/base_stats/hitmonlee.asm
@@ -0,0 +1,22 @@
+ db HITMONLEE ; 106
+
+ db 50, 120, 53, 87, 35, 110
+ ; hp atk def spd sat sdf
+
+ db FIGHTING, FIGHTING
+ db 45 ; catch rate
+ db 139 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F0 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/hitmonlee/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/hitmontop.asm b/data/pokemon/base_stats/hitmontop.asm
new file mode 100644
index 000000000..532b8a6d8
--- /dev/null
+++ b/data/pokemon/base_stats/hitmontop.asm
@@ -0,0 +1,22 @@
+ db HITMONTOP ; 237
+
+ db 50, 95, 95, 70, 35, 110
+ ; hp atk def spd sat sdf
+
+ db FIGHTING, FIGHTING
+ db 45 ; catch rate
+ db 138 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F0 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/hitmontop/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/ho_oh.asm b/data/pokemon/base_stats/ho_oh.asm
new file mode 100644
index 000000000..f0792d427
--- /dev/null
+++ b/data/pokemon/base_stats/ho_oh.asm
@@ -0,0 +1,22 @@
+ db HO_OH ; 250
+
+ db 106, 130, 90, 90, 110, 154
+ ; hp atk def spd sat sdf
+
+ db FIRE, FLYING
+ db 3 ; catch rate
+ db 220 ; base exp
+ db SACRED_ASH ; item 1
+ db SACRED_ASH ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 120 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/ho_oh/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, DRAGONBREATH, THUNDER, EARTHQUAKE, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DREAM_EATER, DETECT, REST, STEEL_WING, NIGHTMARE, FLY, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/hoothoot.asm b/data/pokemon/base_stats/hoothoot.asm
new file mode 100644
index 000000000..0442fe414
--- /dev/null
+++ b/data/pokemon/base_stats/hoothoot.asm
@@ -0,0 +1,22 @@
+ db HOOTHOOT ; 163
+
+ db 60, 30, 30, 50, 36, 56
+ ; hp atk def spd sat sdf
+
+ db NORMAL, FLYING
+ db 255 ; catch rate
+ db 58 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/hoothoot/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, STEEL_WING, NIGHTMARE, FLY, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/hoppip.asm b/data/pokemon/base_stats/hoppip.asm
new file mode 100644
index 000000000..b1918d699
--- /dev/null
+++ b/data/pokemon/base_stats/hoppip.asm
@@ -0,0 +1,22 @@
+ db HOPPIP ; 187
+
+ db 35, 35, 40, 50, 35, 55
+ ; hp atk def spd sat sdf
+
+ db GRASS, FLYING
+ db 255 ; catch rate
+ db 74 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/hoppip/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn FAIRY, PLANT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/horsea.asm b/data/pokemon/base_stats/horsea.asm
new file mode 100644
index 000000000..3296f52af
--- /dev/null
+++ b/data/pokemon/base_stats/horsea.asm
@@ -0,0 +1,22 @@
+ db HORSEA ; 116
+
+ db 30, 40, 70, 60, 70, 25
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 225 ; catch rate
+ db 83 ; base exp
+ db NO_ITEM ; item 1
+ db DRAGON_SCALE ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/horsea/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, REPTILE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, DRAGONBREATH, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/houndoom.asm b/data/pokemon/base_stats/houndoom.asm
new file mode 100644
index 000000000..234832675
--- /dev/null
+++ b/data/pokemon/base_stats/houndoom.asm
@@ -0,0 +1,22 @@
+ db HOUNDOOM ; 229
+
+ db 75, 90, 50, 95, 110, 80
+ ; hp atk def spd sat sdf
+
+ db DARK, FIRE
+ db 45 ; catch rate
+ db 204 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/houndoom/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/houndour.asm b/data/pokemon/base_stats/houndour.asm
new file mode 100644
index 000000000..f743cd81e
--- /dev/null
+++ b/data/pokemon/base_stats/houndour.asm
@@ -0,0 +1,22 @@
+ db HOUNDOUR ; 228
+
+ db 45, 60, 30, 65, 80, 50
+ ; hp atk def spd sat sdf
+
+ db DARK, FIRE
+ db 120 ; catch rate
+ db 114 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/houndour/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/hypno.asm b/data/pokemon/base_stats/hypno.asm
new file mode 100644
index 000000000..25aea318a
--- /dev/null
+++ b/data/pokemon/base_stats/hypno.asm
@@ -0,0 +1,22 @@
+ db HYPNO ; 097
+
+ db 85, 73, 70, 67, 73, 115
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, PSYCHIC
+ db 75 ; catch rate
+ db 165 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/hypno/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/igglybuff.asm b/data/pokemon/base_stats/igglybuff.asm
new file mode 100644
index 000000000..c8c7ca7bf
--- /dev/null
+++ b/data/pokemon/base_stats/igglybuff.asm
@@ -0,0 +1,22 @@
+ db IGGLYBUFF ; 174
+
+ db 90, 30, 15, 15, 40, 20
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 170 ; catch rate
+ db 39 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F75 ; gender
+ db 100 ; unknown
+ db 10 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/igglybuff/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, NIGHTMARE, FLASH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/ivysaur.asm b/data/pokemon/base_stats/ivysaur.asm
new file mode 100644
index 000000000..7d98b4b6d
--- /dev/null
+++ b/data/pokemon/base_stats/ivysaur.asm
@@ -0,0 +1,22 @@
+ db IVYSAUR ; 002
+
+ db 60, 62, 63, 60, 80, 80
+ ; hp atk def spd sat sdf
+
+ db GRASS, POISON
+ db 45 ; catch rate
+ db 141 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/ivysaur/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, PLANT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FURY_CUTTER, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/jigglypuff.asm b/data/pokemon/base_stats/jigglypuff.asm
new file mode 100644
index 000000000..09b3a7dbb
--- /dev/null
+++ b/data/pokemon/base_stats/jigglypuff.asm
@@ -0,0 +1,22 @@
+ db JIGGLYPUFF ; 039
+
+ db 115, 45, 20, 20, 45, 25
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 170 ; catch rate
+ db 76 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F75 ; gender
+ db 100 ; unknown
+ db 10 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/jigglypuff/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn FAIRY, FAIRY ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/jolteon.asm b/data/pokemon/base_stats/jolteon.asm
new file mode 100644
index 000000000..665a40d1d
--- /dev/null
+++ b/data/pokemon/base_stats/jolteon.asm
@@ -0,0 +1,22 @@
+ db JOLTEON ; 135
+
+ db 65, 65, 60, 130, 110, 95
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, ELECTRIC
+ db 45 ; catch rate
+ db 197 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 35 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/jolteon/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/jumpluff.asm b/data/pokemon/base_stats/jumpluff.asm
new file mode 100644
index 000000000..623fbe82d
--- /dev/null
+++ b/data/pokemon/base_stats/jumpluff.asm
@@ -0,0 +1,22 @@
+ db JUMPLUFF ; 189
+
+ db 75, 55, 70, 110, 55, 85
+ ; hp atk def spd sat sdf
+
+ db GRASS, FLYING
+ db 45 ; catch rate
+ db 176 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/jumpluff/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn FAIRY, PLANT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/jynx.asm b/data/pokemon/base_stats/jynx.asm
new file mode 100644
index 000000000..3018dfa8e
--- /dev/null
+++ b/data/pokemon/base_stats/jynx.asm
@@ -0,0 +1,22 @@
+ db JYNX ; 124
+
+ db 65, 50, 35, 95, 115, 95
+ ; hp atk def spd sat sdf
+
+ db ICE, PSYCHIC
+ db 45 ; catch rate
+ db 137 ; base exp
+ db ICE_BERRY ; item 1
+ db ICE_BERRY ; item 2
+ db GENDER_F100 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/jynx/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SWEET_SCENT, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/kabuto.asm b/data/pokemon/base_stats/kabuto.asm
new file mode 100644
index 000000000..9a38cbcba
--- /dev/null
+++ b/data/pokemon/base_stats/kabuto.asm
@@ -0,0 +1,22 @@
+ db KABUTO ; 140
+
+ db 30, 80, 90, 55, 55, 45
+ ; hp atk def spd sat sdf
+
+ db ROCK, WATER
+ db 45 ; catch rate
+ db 119 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 30 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/kabuto/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, INVERTEBRATE ; egg groups
+
+ ; tmhm
+ tmhm CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, THIEF, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/kabutops.asm b/data/pokemon/base_stats/kabutops.asm
new file mode 100644
index 000000000..b8de99fa1
--- /dev/null
+++ b/data/pokemon/base_stats/kabutops.asm
@@ -0,0 +1,22 @@
+ db KABUTOPS ; 141
+
+ db 60, 115, 105, 80, 65, 70
+ ; hp atk def spd sat sdf
+
+ db ROCK, WATER
+ db 45 ; catch rate
+ db 201 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 30 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/kabutops/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, INVERTEBRATE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, SURF, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/kadabra.asm b/data/pokemon/base_stats/kadabra.asm
new file mode 100644
index 000000000..a32a0c5a9
--- /dev/null
+++ b/data/pokemon/base_stats/kadabra.asm
@@ -0,0 +1,22 @@
+ db KADABRA ; 064
+
+ db 40, 35, 30, 105, 120, 70
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, PSYCHIC
+ db 100 ; catch rate
+ db 145 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F25 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/kadabra/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DIG, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/kakuna.asm b/data/pokemon/base_stats/kakuna.asm
new file mode 100644
index 000000000..83241fbcd
--- /dev/null
+++ b/data/pokemon/base_stats/kakuna.asm
@@ -0,0 +1,22 @@
+ db KAKUNA ; 014
+
+ db 45, 25, 50, 35, 25, 25
+ ; hp atk def spd sat sdf
+
+ db BUG, POISON
+ db 120 ; catch rate
+ db 71 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/kakuna/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm
+ ; end
diff --git a/data/pokemon/base_stats/kangaskhan.asm b/data/pokemon/base_stats/kangaskhan.asm
new file mode 100644
index 000000000..21af227f0
--- /dev/null
+++ b/data/pokemon/base_stats/kangaskhan.asm
@@ -0,0 +1,22 @@
+ db KANGASKHAN ; 115
+
+ db 105, 95, 80, 90, 40, 80
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 45 ; catch rate
+ db 175 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F100 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/kangaskhan/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn MONSTER, MONSTER ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/kingdra.asm b/data/pokemon/base_stats/kingdra.asm
new file mode 100644
index 000000000..e62d0f23e
--- /dev/null
+++ b/data/pokemon/base_stats/kingdra.asm
@@ -0,0 +1,22 @@
+ db KINGDRA ; 230
+
+ db 75, 95, 95, 85, 95, 95
+ ; hp atk def spd sat sdf
+
+ db WATER, DRAGON
+ db 45 ; catch rate
+ db 207 ; base exp
+ db NO_ITEM ; item 1
+ db DRAGON_SCALE ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/kingdra/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, REPTILE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, DRAGONBREATH, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/kingler.asm b/data/pokemon/base_stats/kingler.asm
new file mode 100644
index 000000000..01ac23a99
--- /dev/null
+++ b/data/pokemon/base_stats/kingler.asm
@@ -0,0 +1,22 @@
+ db KINGLER ; 099
+
+ db 55, 130, 115, 75, 50, 50
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 60 ; catch rate
+ db 206 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/kingler/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INVERTEBRATE, INVERTEBRATE ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/koffing.asm b/data/pokemon/base_stats/koffing.asm
new file mode 100644
index 000000000..70e8bd114
--- /dev/null
+++ b/data/pokemon/base_stats/koffing.asm
@@ -0,0 +1,22 @@
+ db KOFFING ; 109
+
+ db 40, 65, 95, 35, 60, 45
+ ; hp atk def spd sat sdf
+
+ db POISON, POISON
+ db 190 ; catch rate
+ db 114 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/koffing/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMORPHOUS, AMORPHOUS ; egg groups
+
+ ; tmhm
+ tmhm CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, REST, ATTRACT, THIEF, FLAMETHROWER, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/krabby.asm b/data/pokemon/base_stats/krabby.asm
new file mode 100644
index 000000000..60ce4c7f4
--- /dev/null
+++ b/data/pokemon/base_stats/krabby.asm
@@ -0,0 +1,22 @@
+ db KRABBY ; 098
+
+ db 30, 105, 90, 50, 25, 25
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 225 ; catch rate
+ db 115 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/krabby/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INVERTEBRATE, INVERTEBRATE ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/lanturn.asm b/data/pokemon/base_stats/lanturn.asm
new file mode 100644
index 000000000..f5b747fad
--- /dev/null
+++ b/data/pokemon/base_stats/lanturn.asm
@@ -0,0 +1,22 @@
+ db LANTURN ; 171
+
+ db 125, 58, 58, 67, 76, 76
+ ; hp atk def spd sat sdf
+
+ db WATER, ELECTRIC
+ db 75 ; catch rate
+ db 156 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/lanturn/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn FISH, FISH ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, SURF, FLASH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/lapras.asm b/data/pokemon/base_stats/lapras.asm
new file mode 100644
index 000000000..e6ccec359
--- /dev/null
+++ b/data/pokemon/base_stats/lapras.asm
@@ -0,0 +1,22 @@
+ db LAPRAS ; 131
+
+ db 130, 85, 80, 60, 85, 95
+ ; hp atk def spd sat sdf
+
+ db WATER, ICE
+ db 45 ; catch rate
+ db 219 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 40 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/lapras/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn MONSTER, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, NIGHTMARE, SURF, STRENGTH, WHIRLPOOL, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/larvitar.asm b/data/pokemon/base_stats/larvitar.asm
new file mode 100644
index 000000000..7de66ca7f
--- /dev/null
+++ b/data/pokemon/base_stats/larvitar.asm
@@ -0,0 +1,22 @@
+ db LARVITAR ; 246
+
+ db 50, 64, 50, 41, 45, 50
+ ; hp atk def spd sat sdf
+
+ db ROCK, GROUND
+ db 45 ; catch rate
+ db 67 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 40 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/larvitar/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn MONSTER, MONSTER ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DETECT, REST, ATTRACT
+ ; end
diff --git a/data/pokemon/base_stats/ledian.asm b/data/pokemon/base_stats/ledian.asm
new file mode 100644
index 000000000..84a06c092
--- /dev/null
+++ b/data/pokemon/base_stats/ledian.asm
@@ -0,0 +1,22 @@
+ db LEDIAN ; 166
+
+ db 55, 35, 50, 85, 55, 110
+ ; hp atk def spd sat sdf
+
+ db BUG, FLYING
+ db 90 ; catch rate
+ db 134 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/ledian/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, REST, ATTRACT, THIEF, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/ledyba.asm b/data/pokemon/base_stats/ledyba.asm
new file mode 100644
index 000000000..68a20d1ea
--- /dev/null
+++ b/data/pokemon/base_stats/ledyba.asm
@@ -0,0 +1,22 @@
+ db LEDYBA ; 165
+
+ db 40, 20, 30, 55, 40, 80
+ ; hp atk def spd sat sdf
+
+ db BUG, FLYING
+ db 255 ; catch rate
+ db 54 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/ledyba/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, REST, ATTRACT, THIEF, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/lickitung.asm b/data/pokemon/base_stats/lickitung.asm
new file mode 100644
index 000000000..0f8f351da
--- /dev/null
+++ b/data/pokemon/base_stats/lickitung.asm
@@ -0,0 +1,22 @@
+ db LICKITUNG ; 108
+
+ db 90, 55, 75, 30, 60, 75
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 45 ; catch rate
+ db 127 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/lickitung/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn MONSTER, MONSTER ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, CUT, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/lugia.asm b/data/pokemon/base_stats/lugia.asm
new file mode 100644
index 000000000..6649c9954
--- /dev/null
+++ b/data/pokemon/base_stats/lugia.asm
@@ -0,0 +1,22 @@
+ db LUGIA ; 249
+
+ db 106, 90, 130, 110, 90, 154
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, FLYING
+ db 3 ; catch rate
+ db 220 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 120 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/lugia/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, EARTHQUAKE, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DREAM_EATER, DETECT, REST, STEEL_WING, NIGHTMARE, FLY, SURF, STRENGTH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/machamp.asm b/data/pokemon/base_stats/machamp.asm
new file mode 100644
index 000000000..bb716cf25
--- /dev/null
+++ b/data/pokemon/base_stats/machamp.asm
@@ -0,0 +1,22 @@
+ db MACHAMP ; 068
+
+ db 90, 130, 80, 55, 65, 85
+ ; hp atk def spd sat sdf
+
+ db FIGHTING, FIGHTING
+ db 45 ; catch rate
+ db 193 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F25 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/machamp/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/machoke.asm b/data/pokemon/base_stats/machoke.asm
new file mode 100644
index 000000000..79caf8c70
--- /dev/null
+++ b/data/pokemon/base_stats/machoke.asm
@@ -0,0 +1,22 @@
+ db MACHOKE ; 067
+
+ db 80, 100, 70, 45, 50, 60
+ ; hp atk def spd sat sdf
+
+ db FIGHTING, FIGHTING
+ db 90 ; catch rate
+ db 146 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F25 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/machoke/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/machop.asm b/data/pokemon/base_stats/machop.asm
new file mode 100644
index 000000000..6b0cbaab7
--- /dev/null
+++ b/data/pokemon/base_stats/machop.asm
@@ -0,0 +1,22 @@
+ db MACHOP ; 066
+
+ db 70, 80, 50, 35, 35, 35
+ ; hp atk def spd sat sdf
+
+ db FIGHTING, FIGHTING
+ db 180 ; catch rate
+ db 88 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F25 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/machop/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/magby.asm b/data/pokemon/base_stats/magby.asm
new file mode 100644
index 000000000..d593d0272
--- /dev/null
+++ b/data/pokemon/base_stats/magby.asm
@@ -0,0 +1,22 @@
+ db MAGBY ; 240
+
+ db 45, 75, 37, 83, 70, 55
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 45 ; catch rate
+ db 117 ; base exp
+ db BURNT_BERRY ; item 1
+ db BURNT_BERRY ; item 2
+ db GENDER_F25 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/magby/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/magcargo.asm b/data/pokemon/base_stats/magcargo.asm
new file mode 100644
index 000000000..45493135b
--- /dev/null
+++ b/data/pokemon/base_stats/magcargo.asm
@@ -0,0 +1,22 @@
+ db MAGCARGO ; 219
+
+ db 50, 50, 120, 30, 80, 80
+ ; hp atk def spd sat sdf
+
+ db FIRE, ROCK
+ db 75 ; catch rate
+ db 154 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/magcargo/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMORPHOUS, AMORPHOUS ; egg groups
+
+ ; tmhm
+ tmhm CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/magikarp.asm b/data/pokemon/base_stats/magikarp.asm
new file mode 100644
index 000000000..2519b475b
--- /dev/null
+++ b/data/pokemon/base_stats/magikarp.asm
@@ -0,0 +1,22 @@
+ db MAGIKARP ; 129
+
+ db 20, 10, 55, 80, 15, 20
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 255 ; catch rate
+ db 20 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 5 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/magikarp/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn FISH, REPTILE ; egg groups
+
+ ; tmhm
+ tmhm
+ ; end
diff --git a/data/pokemon/base_stats/magmar.asm b/data/pokemon/base_stats/magmar.asm
new file mode 100644
index 000000000..899b3f39f
--- /dev/null
+++ b/data/pokemon/base_stats/magmar.asm
@@ -0,0 +1,22 @@
+ db MAGMAR ; 126
+
+ db 65, 95, 57, 93, 100, 85
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 45 ; catch rate
+ db 167 ; base exp
+ db BURNT_BERRY ; item 1
+ db BURNT_BERRY ; item 2
+ db GENDER_F25 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/magmar/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/magnemite.asm b/data/pokemon/base_stats/magnemite.asm
new file mode 100644
index 000000000..19a85a9a1
--- /dev/null
+++ b/data/pokemon/base_stats/magnemite.asm
@@ -0,0 +1,22 @@
+ db MAGNEMITE ; 081
+
+ db 25, 35, 70, 45, 95, 55
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, STEEL
+ db 190 ; catch rate
+ db 89 ; base exp
+ db NO_ITEM ; item 1
+ db METAL_COAT ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/magnemite/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INANIMATE, INANIMATE ; egg groups
+
+ ; tmhm
+ tmhm CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/magneton.asm b/data/pokemon/base_stats/magneton.asm
new file mode 100644
index 000000000..5fdbe68f4
--- /dev/null
+++ b/data/pokemon/base_stats/magneton.asm
@@ -0,0 +1,22 @@
+ db MAGNETON ; 082
+
+ db 50, 60, 95, 70, 120, 70
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, STEEL
+ db 60 ; catch rate
+ db 161 ; base exp
+ db NO_ITEM ; item 1
+ db METAL_COAT ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/magneton/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INANIMATE, INANIMATE ; egg groups
+
+ ; tmhm
+ tmhm CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/mankey.asm b/data/pokemon/base_stats/mankey.asm
new file mode 100644
index 000000000..77cc260d4
--- /dev/null
+++ b/data/pokemon/base_stats/mankey.asm
@@ -0,0 +1,22 @@
+ db MANKEY ; 056
+
+ db 40, 80, 35, 70, 35, 45
+ ; hp atk def spd sat sdf
+
+ db FIGHTING, FIGHTING
+ db 190 ; catch rate
+ db 74 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/mankey/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/mantine.asm b/data/pokemon/base_stats/mantine.asm
new file mode 100644
index 000000000..bfe113428
--- /dev/null
+++ b/data/pokemon/base_stats/mantine.asm
@@ -0,0 +1,22 @@
+ db MANTINE ; 226
+
+ db 65, 40, 70, 70, 80, 140
+ ; hp atk def spd sat sdf
+
+ db WATER, FLYING
+ db 25 ; catch rate
+ db 168 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/mantine/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn AMPHIBIAN, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/mareep.asm b/data/pokemon/base_stats/mareep.asm
new file mode 100644
index 000000000..cc190b664
--- /dev/null
+++ b/data/pokemon/base_stats/mareep.asm
@@ -0,0 +1,22 @@
+ db MAREEP ; 179
+
+ db 55, 40, 40, 35, 65, 45
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, ELECTRIC
+ db 235 ; catch rate
+ db 59 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/mareep/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/marill.asm b/data/pokemon/base_stats/marill.asm
new file mode 100644
index 000000000..73708d1df
--- /dev/null
+++ b/data/pokemon/base_stats/marill.asm
@@ -0,0 +1,22 @@
+ db MARILL ; 183
+
+ db 70, 20, 50, 40, 20, 50
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 190 ; catch rate
+ db 58 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/marill/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn AMPHIBIAN, FAIRY ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/marowak.asm b/data/pokemon/base_stats/marowak.asm
new file mode 100644
index 000000000..3e04b9697
--- /dev/null
+++ b/data/pokemon/base_stats/marowak.asm
@@ -0,0 +1,22 @@
+ db MAROWAK ; 105
+
+ db 60, 80, 110, 45, 50, 80
+ ; hp atk def spd sat sdf
+
+ db GROUND, GROUND
+ db 75 ; catch rate
+ db 124 ; base exp
+ db NO_ITEM ; item 1
+ db THICK_CLUB ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/marowak/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn MONSTER, MONSTER ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/meganium.asm b/data/pokemon/base_stats/meganium.asm
new file mode 100644
index 000000000..cf1125003
--- /dev/null
+++ b/data/pokemon/base_stats/meganium.asm
@@ -0,0 +1,22 @@
+ db MEGANIUM ; 154
+
+ db 80, 82, 100, 80, 83, 100
+ ; hp atk def spd sat sdf
+
+ db GRASS, GRASS
+ db 45 ; catch rate
+ db 208 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/meganium/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, PLANT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, STRENGTH, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/meowth.asm b/data/pokemon/base_stats/meowth.asm
new file mode 100644
index 000000000..f177f0efd
--- /dev/null
+++ b/data/pokemon/base_stats/meowth.asm
@@ -0,0 +1,22 @@
+ db MEOWTH ; 052
+
+ db 40, 45, 35, 90, 40, 40
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 255 ; catch rate
+ db 69 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/meowth/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/metapod.asm b/data/pokemon/base_stats/metapod.asm
new file mode 100644
index 000000000..e26e31fc5
--- /dev/null
+++ b/data/pokemon/base_stats/metapod.asm
@@ -0,0 +1,22 @@
+ db METAPOD ; 011
+
+ db 50, 20, 55, 30, 25, 25
+ ; hp atk def spd sat sdf
+
+ db BUG, BUG
+ db 120 ; catch rate
+ db 72 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/metapod/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm
+ ; end
diff --git a/data/pokemon/base_stats/mew.asm b/data/pokemon/base_stats/mew.asm
new file mode 100644
index 000000000..1961cef4e
--- /dev/null
+++ b/data/pokemon/base_stats/mew.asm
@@ -0,0 +1,22 @@
+ db MEW ; 151
+
+ db 100, 100, 100, 100, 100, 100
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, PSYCHIC
+ db 45 ; catch rate
+ db 64 ; base exp
+ db NO_ITEM ; item 1
+ db MIRACLEBERRY ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 120 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/mew/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, DRAGONBREATH, THUNDER, EARTHQUAKE, RETURN, DIG, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, FIRE_BLAST, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FIRE_PUNCH, FURY_CUTTER, NIGHTMARE, CUT, FLY, SURF, STRENGTH, FLASH, WHIRLPOOL, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/mewtwo.asm b/data/pokemon/base_stats/mewtwo.asm
new file mode 100644
index 000000000..748a1c3fb
--- /dev/null
+++ b/data/pokemon/base_stats/mewtwo.asm
@@ -0,0 +1,22 @@
+ db MEWTWO ; 150
+
+ db 106, 110, 90, 130, 154, 90
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, PSYCHIC
+ db 3 ; catch rate
+ db 220 ; base exp
+ db NO_ITEM ; item 1
+ db BERSERK_GENE ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 120 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/mewtwo/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, THUNDERPUNCH, DREAM_EATER, DETECT, REST, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/miltank.asm b/data/pokemon/base_stats/miltank.asm
new file mode 100644
index 000000000..63ed422bc
--- /dev/null
+++ b/data/pokemon/base_stats/miltank.asm
@@ -0,0 +1,22 @@
+ db MILTANK ; 241
+
+ db 95, 80, 105, 100, 40, 70
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 45 ; catch rate
+ db 200 ; base exp
+ db MOOMOO_MILK ; item 1
+ db MOOMOO_MILK ; item 2
+ db GENDER_F100 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/miltank/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, SURF, STRENGTH, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/misdreavus.asm b/data/pokemon/base_stats/misdreavus.asm
new file mode 100644
index 000000000..11c5f239d
--- /dev/null
+++ b/data/pokemon/base_stats/misdreavus.asm
@@ -0,0 +1,22 @@
+ db MISDREAVUS ; 200
+
+ db 60, 60, 60, 85, 85, 85
+ ; hp atk def spd sat sdf
+
+ db GHOST, GHOST
+ db 45 ; catch rate
+ db 147 ; base exp
+ db NO_ITEM ; item 1
+ db SPELL_TAG ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/misdreavus/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn AMORPHOUS, AMORPHOUS ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/moltres.asm b/data/pokemon/base_stats/moltres.asm
new file mode 100644
index 000000000..bf70c2821
--- /dev/null
+++ b/data/pokemon/base_stats/moltres.asm
@@ -0,0 +1,22 @@
+ db MOLTRES ; 146
+
+ db 90, 100, 90, 90, 125, 85
+ ; hp atk def spd sat sdf
+
+ db FIRE, FLYING
+ db 3 ; catch rate
+ db 217 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 80 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/moltres/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DETECT, REST, STEEL_WING, FLY, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/mr__mime.asm b/data/pokemon/base_stats/mr__mime.asm
new file mode 100644
index 000000000..9728c296f
--- /dev/null
+++ b/data/pokemon/base_stats/mr__mime.asm
@@ -0,0 +1,22 @@
+ db MR__MIME ; 122
+
+ db 40, 45, 65, 90, 100, 120
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, PSYCHIC
+ db 45 ; catch rate
+ db 136 ; base exp
+ db NO_ITEM ; item 1
+ db MYSTERYBERRY ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/mr__mime/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn HUMANSHAPE, HUMANSHAPE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/muk.asm b/data/pokemon/base_stats/muk.asm
new file mode 100644
index 000000000..30c6414fd
--- /dev/null
+++ b/data/pokemon/base_stats/muk.asm
@@ -0,0 +1,22 @@
+ db MUK ; 089
+
+ db 105, 105, 75, 50, 65, 100
+ ; hp atk def spd sat sdf
+
+ db POISON, POISON
+ db 75 ; catch rate
+ db 157 ; base exp
+ db NO_ITEM ; item 1
+ db NUGGET ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/muk/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMORPHOUS, AMORPHOUS ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, FLAMETHROWER, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/murkrow.asm b/data/pokemon/base_stats/murkrow.asm
new file mode 100644
index 000000000..7f459e8aa
--- /dev/null
+++ b/data/pokemon/base_stats/murkrow.asm
@@ -0,0 +1,22 @@
+ db MURKROW ; 198
+
+ db 60, 85, 42, 91, 85, 42
+ ; hp atk def spd sat sdf
+
+ db DARK, FLYING
+ db 30 ; catch rate
+ db 107 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/murkrow/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, STEEL_WING, NIGHTMARE, FLY
+ ; end
diff --git a/data/pokemon/base_stats/natu.asm b/data/pokemon/base_stats/natu.asm
new file mode 100644
index 000000000..54ef8af58
--- /dev/null
+++ b/data/pokemon/base_stats/natu.asm
@@ -0,0 +1,22 @@
+ db NATU ; 177
+
+ db 40, 50, 45, 70, 70, 45
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, FLYING
+ db 190 ; catch rate
+ db 73 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/natu/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/nidoking.asm b/data/pokemon/base_stats/nidoking.asm
new file mode 100644
index 000000000..316f71e87
--- /dev/null
+++ b/data/pokemon/base_stats/nidoking.asm
@@ -0,0 +1,22 @@
+ db NIDOKING ; 034
+
+ db 81, 92, 77, 85, 85, 75
+ ; hp atk def spd sat sdf
+
+ db POISON, GROUND
+ db 45 ; catch rate
+ db 195 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F0 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/nidoking/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/nidoqueen.asm b/data/pokemon/base_stats/nidoqueen.asm
new file mode 100644
index 000000000..e9d2ae611
--- /dev/null
+++ b/data/pokemon/base_stats/nidoqueen.asm
@@ -0,0 +1,22 @@
+ db NIDOQUEEN ; 031
+
+ db 90, 82, 87, 76, 75, 85
+ ; hp atk def spd sat sdf
+
+ db POISON, GROUND
+ db 45 ; catch rate
+ db 194 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F100 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/nidoqueen/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/nidoran_f.asm b/data/pokemon/base_stats/nidoran_f.asm
new file mode 100644
index 000000000..1cd53b17a
--- /dev/null
+++ b/data/pokemon/base_stats/nidoran_f.asm
@@ -0,0 +1,22 @@
+ db NIDORAN_F ; 029
+
+ db 55, 47, 52, 41, 40, 40
+ ; hp atk def spd sat sdf
+
+ db POISON, POISON
+ db 235 ; catch rate
+ db 59 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F100 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/nidoran_f/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/nidoran_m.asm b/data/pokemon/base_stats/nidoran_m.asm
new file mode 100644
index 000000000..cf0c1e1b2
--- /dev/null
+++ b/data/pokemon/base_stats/nidoran_m.asm
@@ -0,0 +1,22 @@
+ db NIDORAN_M ; 032
+
+ db 46, 57, 40, 50, 40, 40
+ ; hp atk def spd sat sdf
+
+ db POISON, POISON
+ db 235 ; catch rate
+ db 60 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F0 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/nidoran_m/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/nidorina.asm b/data/pokemon/base_stats/nidorina.asm
new file mode 100644
index 000000000..42b3aebf8
--- /dev/null
+++ b/data/pokemon/base_stats/nidorina.asm
@@ -0,0 +1,22 @@
+ db NIDORINA ; 030
+
+ db 70, 62, 67, 56, 55, 55
+ ; hp atk def spd sat sdf
+
+ db POISON, POISON
+ db 120 ; catch rate
+ db 117 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F100 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/nidorina/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, STRENGTH, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/nidorino.asm b/data/pokemon/base_stats/nidorino.asm
new file mode 100644
index 000000000..f31e8df3d
--- /dev/null
+++ b/data/pokemon/base_stats/nidorino.asm
@@ -0,0 +1,22 @@
+ db NIDORINO ; 033
+
+ db 61, 72, 57, 65, 55, 55
+ ; hp atk def spd sat sdf
+
+ db POISON, POISON
+ db 120 ; catch rate
+ db 118 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F0 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/nidorino/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, STRENGTH, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/ninetales.asm b/data/pokemon/base_stats/ninetales.asm
new file mode 100644
index 000000000..5fd84b886
--- /dev/null
+++ b/data/pokemon/base_stats/ninetales.asm
@@ -0,0 +1,22 @@
+ db NINETALES ; 038
+
+ db 73, 76, 75, 100, 81, 100
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 75 ; catch rate
+ db 178 ; base exp
+ db BURNT_BERRY ; item 1
+ db BURNT_BERRY ; item 2
+ db GENDER_F75 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/ninetales/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/noctowl.asm b/data/pokemon/base_stats/noctowl.asm
new file mode 100644
index 000000000..e2c8565bd
--- /dev/null
+++ b/data/pokemon/base_stats/noctowl.asm
@@ -0,0 +1,22 @@
+ db NOCTOWL ; 164
+
+ db 100, 50, 50, 70, 76, 96
+ ; hp atk def spd sat sdf
+
+ db NORMAL, FLYING
+ db 90 ; catch rate
+ db 162 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/noctowl/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, STEEL_WING, NIGHTMARE, FLY, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/octillery.asm b/data/pokemon/base_stats/octillery.asm
new file mode 100644
index 000000000..80b5ad97a
--- /dev/null
+++ b/data/pokemon/base_stats/octillery.asm
@@ -0,0 +1,22 @@
+ db OCTILLERY ; 224
+
+ db 75, 105, 75, 45, 105, 75
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 75 ; catch rate
+ db 164 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/octillery/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, FISH ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, FLAMETHROWER, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/oddish.asm b/data/pokemon/base_stats/oddish.asm
new file mode 100644
index 000000000..df75f6485
--- /dev/null
+++ b/data/pokemon/base_stats/oddish.asm
@@ -0,0 +1,22 @@
+ db ODDISH ; 043
+
+ db 45, 50, 55, 30, 75, 65
+ ; hp atk def spd sat sdf
+
+ db GRASS, POISON
+ db 255 ; catch rate
+ db 78 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/oddish/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn PLANT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/omanyte.asm b/data/pokemon/base_stats/omanyte.asm
new file mode 100644
index 000000000..6278f4e3c
--- /dev/null
+++ b/data/pokemon/base_stats/omanyte.asm
@@ -0,0 +1,22 @@
+ db OMANYTE ; 138
+
+ db 35, 40, 100, 35, 90, 55
+ ; hp atk def spd sat sdf
+
+ db ROCK, WATER
+ db 45 ; catch rate
+ db 120 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 30 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/omanyte/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, INVERTEBRATE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/omastar.asm b/data/pokemon/base_stats/omastar.asm
new file mode 100644
index 000000000..d3f3b15e1
--- /dev/null
+++ b/data/pokemon/base_stats/omastar.asm
@@ -0,0 +1,22 @@
+ db OMASTAR ; 139
+
+ db 70, 60, 125, 55, 115, 70
+ ; hp atk def spd sat sdf
+
+ db ROCK, WATER
+ db 45 ; catch rate
+ db 199 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 30 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/omastar/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, INVERTEBRATE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/onix.asm b/data/pokemon/base_stats/onix.asm
new file mode 100644
index 000000000..2fc5bd175
--- /dev/null
+++ b/data/pokemon/base_stats/onix.asm
@@ -0,0 +1,22 @@
+ db ONIX ; 095
+
+ db 35, 45, 160, 70, 30, 45
+ ; hp atk def spd sat sdf
+
+ db ROCK, GROUND
+ db 45 ; catch rate
+ db 108 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/onix/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INANIMATE, INANIMATE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/paras.asm b/data/pokemon/base_stats/paras.asm
new file mode 100644
index 000000000..d86a51765
--- /dev/null
+++ b/data/pokemon/base_stats/paras.asm
@@ -0,0 +1,22 @@
+ db PARAS ; 046
+
+ db 35, 70, 55, 25, 45, 55
+ ; hp atk def spd sat sdf
+
+ db BUG, GRASS
+ db 190 ; catch rate
+ db 70 ; base exp
+ db TINYMUSHROOM ; item 1
+ db BIG_MUSHROOM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/paras/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/parasect.asm b/data/pokemon/base_stats/parasect.asm
new file mode 100644
index 000000000..5c4320fd3
--- /dev/null
+++ b/data/pokemon/base_stats/parasect.asm
@@ -0,0 +1,22 @@
+ db PARASECT ; 047
+
+ db 60, 95, 80, 30, 60, 80
+ ; hp atk def spd sat sdf
+
+ db BUG, GRASS
+ db 75 ; catch rate
+ db 128 ; base exp
+ db TINYMUSHROOM ; item 1
+ db BIG_MUSHROOM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/parasect/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/persian.asm b/data/pokemon/base_stats/persian.asm
new file mode 100644
index 000000000..fd2677e16
--- /dev/null
+++ b/data/pokemon/base_stats/persian.asm
@@ -0,0 +1,22 @@
+ db PERSIAN ; 053
+
+ db 65, 70, 60, 115, 65, 65
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 90 ; catch rate
+ db 148 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/persian/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/phanpy.asm b/data/pokemon/base_stats/phanpy.asm
new file mode 100644
index 000000000..93a26d43c
--- /dev/null
+++ b/data/pokemon/base_stats/phanpy.asm
@@ -0,0 +1,22 @@
+ db PHANPY ; 231
+
+ db 90, 60, 60, 40, 40, 40
+ ; hp atk def spd sat sdf
+
+ db GROUND, GROUND
+ db 120 ; catch rate
+ db 124 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/phanpy/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/pichu.asm b/data/pokemon/base_stats/pichu.asm
new file mode 100644
index 000000000..da497bdf8
--- /dev/null
+++ b/data/pokemon/base_stats/pichu.asm
@@ -0,0 +1,22 @@
+ db PICHU ; 172
+
+ db 20, 40, 15, 60, 35, 35
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, ELECTRIC
+ db 190 ; catch rate
+ db 42 ; base exp
+ db NO_ITEM ; item 1
+ db BERRY ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 10 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/pichu/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/pidgeot.asm b/data/pokemon/base_stats/pidgeot.asm
new file mode 100644
index 000000000..35222d2be
--- /dev/null
+++ b/data/pokemon/base_stats/pidgeot.asm
@@ -0,0 +1,22 @@
+ db PIDGEOT ; 018
+
+ db 83, 80, 75, 91, 70, 70
+ ; hp atk def spd sat sdf
+
+ db NORMAL, FLYING
+ db 45 ; catch rate
+ db 172 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/pidgeot/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY
+ ; end
diff --git a/data/pokemon/base_stats/pidgeotto.asm b/data/pokemon/base_stats/pidgeotto.asm
new file mode 100644
index 000000000..13b2d8e0c
--- /dev/null
+++ b/data/pokemon/base_stats/pidgeotto.asm
@@ -0,0 +1,22 @@
+ db PIDGEOTTO ; 017
+
+ db 63, 60, 55, 71, 50, 50
+ ; hp atk def spd sat sdf
+
+ db NORMAL, FLYING
+ db 120 ; catch rate
+ db 113 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/pidgeotto/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY
+ ; end
diff --git a/data/pokemon/base_stats/pidgey.asm b/data/pokemon/base_stats/pidgey.asm
new file mode 100644
index 000000000..0290f1717
--- /dev/null
+++ b/data/pokemon/base_stats/pidgey.asm
@@ -0,0 +1,22 @@
+ db PIDGEY ; 016
+
+ db 40, 45, 40, 56, 35, 35
+ ; hp atk def spd sat sdf
+
+ db NORMAL, FLYING
+ db 255 ; catch rate
+ db 55 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/pidgey/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY
+ ; end
diff --git a/data/pokemon/base_stats/pikachu.asm b/data/pokemon/base_stats/pikachu.asm
new file mode 100644
index 000000000..cd998aead
--- /dev/null
+++ b/data/pokemon/base_stats/pikachu.asm
@@ -0,0 +1,22 @@
+ db PIKACHU ; 025
+
+ db 35, 55, 30, 90, 50, 40
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, ELECTRIC
+ db 190 ; catch rate
+ db 82 ; base exp
+ db NO_ITEM ; item 1
+ db BERRY ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 10 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/pikachu/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FAIRY ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, STRENGTH, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/piloswine.asm b/data/pokemon/base_stats/piloswine.asm
new file mode 100644
index 000000000..dd8bf950b
--- /dev/null
+++ b/data/pokemon/base_stats/piloswine.asm
@@ -0,0 +1,22 @@
+ db PILOSWINE ; 221
+
+ db 100, 100, 80, 50, 60, 60
+ ; hp atk def spd sat sdf
+
+ db ICE, GROUND
+ db 75 ; catch rate
+ db 160 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/piloswine/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, STRENGTH, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/pineco.asm b/data/pokemon/base_stats/pineco.asm
new file mode 100644
index 000000000..2c27a9913
--- /dev/null
+++ b/data/pokemon/base_stats/pineco.asm
@@ -0,0 +1,22 @@
+ db PINECO ; 204
+
+ db 50, 65, 90, 15, 35, 35
+ ; hp atk def spd sat sdf
+
+ db BUG, BUG
+ db 190 ; catch rate
+ db 60 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/pineco/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/pinsir.asm b/data/pokemon/base_stats/pinsir.asm
new file mode 100644
index 000000000..697bba44c
--- /dev/null
+++ b/data/pokemon/base_stats/pinsir.asm
@@ -0,0 +1,22 @@
+ db PINSIR ; 127
+
+ db 65, 125, 100, 85, 55, 70
+ ; hp atk def spd sat sdf
+
+ db BUG, BUG
+ db 45 ; catch rate
+ db 200 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/pinsir/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/politoed.asm b/data/pokemon/base_stats/politoed.asm
new file mode 100644
index 000000000..b3dc1e98a
--- /dev/null
+++ b/data/pokemon/base_stats/politoed.asm
@@ -0,0 +1,22 @@
+ db POLITOED ; 186
+
+ db 90, 75, 75, 70, 90, 100
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 45 ; catch rate
+ db 185 ; base exp
+ db NO_ITEM ; item 1
+ db KINGS_ROCK ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/politoed/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn AMPHIBIAN, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/poliwag.asm b/data/pokemon/base_stats/poliwag.asm
new file mode 100644
index 000000000..00e328990
--- /dev/null
+++ b/data/pokemon/base_stats/poliwag.asm
@@ -0,0 +1,22 @@
+ db POLIWAG ; 060
+
+ db 40, 50, 40, 90, 40, 40
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 255 ; catch rate
+ db 77 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/poliwag/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn AMPHIBIAN, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/poliwhirl.asm b/data/pokemon/base_stats/poliwhirl.asm
new file mode 100644
index 000000000..f62849cc9
--- /dev/null
+++ b/data/pokemon/base_stats/poliwhirl.asm
@@ -0,0 +1,22 @@
+ db POLIWHIRL ; 061
+
+ db 65, 65, 65, 90, 50, 50
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 120 ; catch rate
+ db 131 ; base exp
+ db NO_ITEM ; item 1
+ db KINGS_ROCK ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/poliwhirl/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn AMPHIBIAN, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/poliwrath.asm b/data/pokemon/base_stats/poliwrath.asm
new file mode 100644
index 000000000..04f74c42a
--- /dev/null
+++ b/data/pokemon/base_stats/poliwrath.asm
@@ -0,0 +1,22 @@
+ db POLIWRATH ; 062
+
+ db 90, 85, 95, 70, 70, 90
+ ; hp atk def spd sat sdf
+
+ db WATER, FIGHTING
+ db 45 ; catch rate
+ db 185 ; base exp
+ db NO_ITEM ; item 1
+ db KINGS_ROCK ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/poliwrath/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn AMPHIBIAN, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/ponyta.asm b/data/pokemon/base_stats/ponyta.asm
new file mode 100644
index 000000000..5c1f77c98
--- /dev/null
+++ b/data/pokemon/base_stats/ponyta.asm
@@ -0,0 +1,22 @@
+ db PONYTA ; 077
+
+ db 50, 85, 55, 90, 65, 65
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 190 ; catch rate
+ db 152 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/ponyta/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/porygon.asm b/data/pokemon/base_stats/porygon.asm
new file mode 100644
index 000000000..ecec59045
--- /dev/null
+++ b/data/pokemon/base_stats/porygon.asm
@@ -0,0 +1,22 @@
+ db PORYGON ; 137
+
+ db 65, 60, 70, 40, 85, 75
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 45 ; catch rate
+ db 130 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/porygon/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INANIMATE, INANIMATE ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, REST, THIEF, NIGHTMARE, FLASH, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/porygon2.asm b/data/pokemon/base_stats/porygon2.asm
new file mode 100644
index 000000000..6bd464d3c
--- /dev/null
+++ b/data/pokemon/base_stats/porygon2.asm
@@ -0,0 +1,22 @@
+ db PORYGON2 ; 233
+
+ db 85, 80, 90, 60, 105, 95
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 45 ; catch rate
+ db 180 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/porygon2/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INANIMATE, INANIMATE ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, REST, THIEF, NIGHTMARE, FLASH, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/primeape.asm b/data/pokemon/base_stats/primeape.asm
new file mode 100644
index 000000000..249f9bee4
--- /dev/null
+++ b/data/pokemon/base_stats/primeape.asm
@@ -0,0 +1,22 @@
+ db PRIMEAPE ; 057
+
+ db 65, 105, 60, 95, 60, 70
+ ; hp atk def spd sat sdf
+
+ db FIGHTING, FIGHTING
+ db 75 ; catch rate
+ db 149 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/primeape/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/psyduck.asm b/data/pokemon/base_stats/psyduck.asm
new file mode 100644
index 000000000..261fdde99
--- /dev/null
+++ b/data/pokemon/base_stats/psyduck.asm
@@ -0,0 +1,22 @@
+ db PSYDUCK ; 054
+
+ db 50, 52, 48, 55, 65, 50
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 190 ; catch rate
+ db 80 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/psyduck/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, STRENGTH, FLASH, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/pupitar.asm b/data/pokemon/base_stats/pupitar.asm
new file mode 100644
index 000000000..63c0a41a7
--- /dev/null
+++ b/data/pokemon/base_stats/pupitar.asm
@@ -0,0 +1,22 @@
+ db PUPITAR ; 247
+
+ db 70, 84, 70, 51, 65, 70
+ ; hp atk def spd sat sdf
+
+ db ROCK, GROUND
+ db 45 ; catch rate
+ db 144 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 40 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/pupitar/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn MONSTER, MONSTER ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DETECT, REST, ATTRACT
+ ; end
diff --git a/data/pokemon/base_stats/quagsire.asm b/data/pokemon/base_stats/quagsire.asm
new file mode 100644
index 000000000..0f49866e7
--- /dev/null
+++ b/data/pokemon/base_stats/quagsire.asm
@@ -0,0 +1,22 @@
+ db QUAGSIRE ; 195
+
+ db 95, 85, 85, 35, 65, 65
+ ; hp atk def spd sat sdf
+
+ db WATER, GROUND
+ db 90 ; catch rate
+ db 137 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/quagsire/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, FLASH, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/quilava.asm b/data/pokemon/base_stats/quilava.asm
new file mode 100644
index 000000000..efadeda06
--- /dev/null
+++ b/data/pokemon/base_stats/quilava.asm
@@ -0,0 +1,22 @@
+ db QUILAVA ; 156
+
+ db 58, 64, 58, 80, 80, 65
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 45 ; catch rate
+ db 142 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/quilava/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/qwilfish.asm b/data/pokemon/base_stats/qwilfish.asm
new file mode 100644
index 000000000..70648e5fd
--- /dev/null
+++ b/data/pokemon/base_stats/qwilfish.asm
@@ -0,0 +1,22 @@
+ db QWILFISH ; 211
+
+ db 65, 95, 75, 85, 55, 55
+ ; hp atk def spd sat sdf
+
+ db WATER, POISON
+ db 45 ; catch rate
+ db 100 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/qwilfish/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FISH, FISH ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SWIFT, DEFENSE_CURL, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/raichu.asm b/data/pokemon/base_stats/raichu.asm
new file mode 100644
index 000000000..cdc5193cd
--- /dev/null
+++ b/data/pokemon/base_stats/raichu.asm
@@ -0,0 +1,22 @@
+ db RAICHU ; 026
+
+ db 60, 90, 55, 100, 90, 80
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, ELECTRIC
+ db 75 ; catch rate
+ db 122 ; base exp
+ db NO_ITEM ; item 1
+ db BERRY ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 10 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/raichu/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FAIRY ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, STRENGTH, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/raikou.asm b/data/pokemon/base_stats/raikou.asm
new file mode 100644
index 000000000..a68f16181
--- /dev/null
+++ b/data/pokemon/base_stats/raikou.asm
@@ -0,0 +1,22 @@
+ db RAIKOU ; 243
+
+ db 90, 85, 75, 115, 115, 100
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, ELECTRIC
+ db 3 ; catch rate
+ db 216 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 80 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/raikou/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, CUT, STRENGTH, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/rapidash.asm b/data/pokemon/base_stats/rapidash.asm
new file mode 100644
index 000000000..0167e7439
--- /dev/null
+++ b/data/pokemon/base_stats/rapidash.asm
@@ -0,0 +1,22 @@
+ db RAPIDASH ; 078
+
+ db 65, 100, 70, 105, 80, 80
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 60 ; catch rate
+ db 192 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/rapidash/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/raticate.asm b/data/pokemon/base_stats/raticate.asm
new file mode 100644
index 000000000..1cfc65906
--- /dev/null
+++ b/data/pokemon/base_stats/raticate.asm
@@ -0,0 +1,22 @@
+ db RATICATE ; 020
+
+ db 55, 81, 60, 97, 50, 70
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 90 ; catch rate
+ db 116 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/raticate/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, THIEF, CUT, STRENGTH, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/rattata.asm b/data/pokemon/base_stats/rattata.asm
new file mode 100644
index 000000000..13c21e889
--- /dev/null
+++ b/data/pokemon/base_stats/rattata.asm
@@ -0,0 +1,22 @@
+ db RATTATA ; 019
+
+ db 30, 56, 35, 72, 25, 35
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 255 ; catch rate
+ db 57 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/rattata/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, THIEF
+ ; end
diff --git a/data/pokemon/base_stats/remoraid.asm b/data/pokemon/base_stats/remoraid.asm
new file mode 100644
index 000000000..10ae15479
--- /dev/null
+++ b/data/pokemon/base_stats/remoraid.asm
@@ -0,0 +1,22 @@
+ db REMORAID ; 223
+
+ db 35, 65, 35, 65, 65, 35
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 190 ; catch rate
+ db 78 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/remoraid/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, FISH ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, FLAMETHROWER, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/rhydon.asm b/data/pokemon/base_stats/rhydon.asm
new file mode 100644
index 000000000..cdcfb4cad
--- /dev/null
+++ b/data/pokemon/base_stats/rhydon.asm
@@ -0,0 +1,22 @@
+ db RHYDON ; 112
+
+ db 105, 130, 120, 40, 45, 45
+ ; hp atk def spd sat sdf
+
+ db GROUND, ROCK
+ db 60 ; catch rate
+ db 204 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/rhydon/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn MONSTER, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/rhyhorn.asm b/data/pokemon/base_stats/rhyhorn.asm
new file mode 100644
index 000000000..67d438751
--- /dev/null
+++ b/data/pokemon/base_stats/rhyhorn.asm
@@ -0,0 +1,22 @@
+ db RHYHORN ; 111
+
+ db 80, 85, 95, 25, 30, 30
+ ; hp atk def spd sat sdf
+
+ db GROUND, ROCK
+ db 120 ; catch rate
+ db 135 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/rhyhorn/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn MONSTER, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, REST, ATTRACT, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/sandshrew.asm b/data/pokemon/base_stats/sandshrew.asm
new file mode 100644
index 000000000..cc0a4c492
--- /dev/null
+++ b/data/pokemon/base_stats/sandshrew.asm
@@ -0,0 +1,22 @@
+ db SANDSHREW ; 027
+
+ db 50, 75, 85, 40, 20, 30
+ ; hp atk def spd sat sdf
+
+ db GROUND, GROUND
+ db 255 ; catch rate
+ db 93 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/sandshrew/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/sandslash.asm b/data/pokemon/base_stats/sandslash.asm
new file mode 100644
index 000000000..75f66b363
--- /dev/null
+++ b/data/pokemon/base_stats/sandslash.asm
@@ -0,0 +1,22 @@
+ db SANDSLASH ; 028
+
+ db 75, 100, 110, 65, 45, 55
+ ; hp atk def spd sat sdf
+
+ db GROUND, GROUND
+ db 90 ; catch rate
+ db 163 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/sandslash/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/scizor.asm b/data/pokemon/base_stats/scizor.asm
new file mode 100644
index 000000000..127110c7a
--- /dev/null
+++ b/data/pokemon/base_stats/scizor.asm
@@ -0,0 +1,22 @@
+ db SCIZOR ; 212
+
+ db 70, 130, 100, 65, 55, 80
+ ; hp atk def spd sat sdf
+
+ db BUG, STEEL
+ db 25 ; catch rate
+ db 200 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/scizor/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FURY_CUTTER, CUT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/scyther.asm b/data/pokemon/base_stats/scyther.asm
new file mode 100644
index 000000000..4c4779f0f
--- /dev/null
+++ b/data/pokemon/base_stats/scyther.asm
@@ -0,0 +1,22 @@
+ db SCYTHER ; 123
+
+ db 70, 110, 80, 105, 55, 80
+ ; hp atk def spd sat sdf
+
+ db BUG, FLYING
+ db 45 ; catch rate
+ db 187 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/scyther/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FURY_CUTTER, CUT
+ ; end
diff --git a/data/pokemon/base_stats/seadra.asm b/data/pokemon/base_stats/seadra.asm
new file mode 100644
index 000000000..b4dc47c20
--- /dev/null
+++ b/data/pokemon/base_stats/seadra.asm
@@ -0,0 +1,22 @@
+ db SEADRA ; 117
+
+ db 55, 65, 95, 85, 95, 45
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 75 ; catch rate
+ db 155 ; base exp
+ db NO_ITEM ; item 1
+ db DRAGON_SCALE ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/seadra/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, REPTILE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, DRAGONBREATH, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/seaking.asm b/data/pokemon/base_stats/seaking.asm
new file mode 100644
index 000000000..4d6d2f91e
--- /dev/null
+++ b/data/pokemon/base_stats/seaking.asm
@@ -0,0 +1,22 @@
+ db SEAKING ; 119
+
+ db 80, 92, 65, 68, 65, 80
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 60 ; catch rate
+ db 170 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/seaking/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FISH, FISH ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/seel.asm b/data/pokemon/base_stats/seel.asm
new file mode 100644
index 000000000..39b44fad8
--- /dev/null
+++ b/data/pokemon/base_stats/seel.asm
@@ -0,0 +1,22 @@
+ db SEEL ; 086
+
+ db 65, 45, 55, 45, 45, 70
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 190 ; catch rate
+ db 100 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/seel/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/sentret.asm b/data/pokemon/base_stats/sentret.asm
new file mode 100644
index 000000000..12e120087
--- /dev/null
+++ b/data/pokemon/base_stats/sentret.asm
@@ -0,0 +1,22 @@
+ db SENTRET ; 161
+
+ db 35, 46, 34, 20, 35, 45
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 255 ; catch rate
+ db 57 ; base exp
+ db NO_ITEM ; item 1
+ db BERRY ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/sentret/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, CUT, SURF
+ ; end
diff --git a/data/pokemon/base_stats/shellder.asm b/data/pokemon/base_stats/shellder.asm
new file mode 100644
index 000000000..fb60ff262
--- /dev/null
+++ b/data/pokemon/base_stats/shellder.asm
@@ -0,0 +1,22 @@
+ db SHELLDER ; 090
+
+ db 30, 65, 100, 40, 45, 25
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 190 ; catch rate
+ db 97 ; base exp
+ db PEARL ; item 1
+ db BIG_PEARL ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/shellder/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn INVERTEBRATE, INVERTEBRATE ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/shuckle.asm b/data/pokemon/base_stats/shuckle.asm
new file mode 100644
index 000000000..7cd31ad79
--- /dev/null
+++ b/data/pokemon/base_stats/shuckle.asm
@@ -0,0 +1,22 @@
+ db SHUCKLE ; 213
+
+ db 20, 10, 230, 05, 10, 230
+ ; hp atk def spd sat sdf
+
+ db BUG, ROCK
+ db 190 ; catch rate
+ db 80 ; base exp
+ db BERRY ; item 1
+ db BERRY ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/shuckle/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, STRENGTH, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/skarmory.asm b/data/pokemon/base_stats/skarmory.asm
new file mode 100644
index 000000000..cf271b39f
--- /dev/null
+++ b/data/pokemon/base_stats/skarmory.asm
@@ -0,0 +1,22 @@
+ db SKARMORY ; 227
+
+ db 65, 80, 140, 70, 40, 70
+ ; hp atk def spd sat sdf
+
+ db STEEL, FLYING
+ db 25 ; catch rate
+ db 168 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/skarmory/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, CUT, FLY
+ ; end
diff --git a/data/pokemon/base_stats/skiploom.asm b/data/pokemon/base_stats/skiploom.asm
new file mode 100644
index 000000000..46bbc8a8c
--- /dev/null
+++ b/data/pokemon/base_stats/skiploom.asm
@@ -0,0 +1,22 @@
+ db SKIPLOOM ; 188
+
+ db 55, 45, 50, 80, 45, 65
+ ; hp atk def spd sat sdf
+
+ db GRASS, FLYING
+ db 120 ; catch rate
+ db 136 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/skiploom/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn FAIRY, PLANT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/slowbro.asm b/data/pokemon/base_stats/slowbro.asm
new file mode 100644
index 000000000..a6b3a47b3
--- /dev/null
+++ b/data/pokemon/base_stats/slowbro.asm
@@ -0,0 +1,22 @@
+ db SLOWBRO ; 080
+
+ db 95, 75, 110, 30, 100, 80
+ ; hp atk def spd sat sdf
+
+ db WATER, PSYCHIC
+ db 75 ; catch rate
+ db 164 ; base exp
+ db NO_ITEM ; item 1
+ db KINGS_ROCK ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/slowbro/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn MONSTER, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DREAM_EATER, REST, ATTRACT, FURY_CUTTER, NIGHTMARE, SURF, STRENGTH, FLASH, FLAMETHROWER, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/slowking.asm b/data/pokemon/base_stats/slowking.asm
new file mode 100644
index 000000000..e60da7fd6
--- /dev/null
+++ b/data/pokemon/base_stats/slowking.asm
@@ -0,0 +1,22 @@
+ db SLOWKING ; 199
+
+ db 95, 75, 80, 30, 100, 110
+ ; hp atk def spd sat sdf
+
+ db WATER, PSYCHIC
+ db 70 ; catch rate
+ db 164 ; base exp
+ db NO_ITEM ; item 1
+ db KINGS_ROCK ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/slowking/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn MONSTER, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DREAM_EATER, REST, ATTRACT, FURY_CUTTER, NIGHTMARE, SURF, STRENGTH, FLASH, WHIRLPOOL, FLAMETHROWER, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/slowpoke.asm b/data/pokemon/base_stats/slowpoke.asm
new file mode 100644
index 000000000..a987d9bfa
--- /dev/null
+++ b/data/pokemon/base_stats/slowpoke.asm
@@ -0,0 +1,22 @@
+ db SLOWPOKE ; 079
+
+ db 90, 65, 65, 15, 40, 40
+ ; hp atk def spd sat sdf
+
+ db WATER, PSYCHIC
+ db 190 ; catch rate
+ db 99 ; base exp
+ db NO_ITEM ; item 1
+ db KINGS_ROCK ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/slowpoke/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn MONSTER, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DREAM_EATER, REST, ATTRACT, NIGHTMARE, SURF, STRENGTH, FLASH, FLAMETHROWER, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/slugma.asm b/data/pokemon/base_stats/slugma.asm
new file mode 100644
index 000000000..a760dd40e
--- /dev/null
+++ b/data/pokemon/base_stats/slugma.asm
@@ -0,0 +1,22 @@
+ db SLUGMA ; 218
+
+ db 40, 40, 40, 20, 70, 40
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 190 ; catch rate
+ db 78 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/slugma/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMORPHOUS, AMORPHOUS ; egg groups
+
+ ; tmhm
+ tmhm CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/smeargle.asm b/data/pokemon/base_stats/smeargle.asm
new file mode 100644
index 000000000..d80443acf
--- /dev/null
+++ b/data/pokemon/base_stats/smeargle.asm
@@ -0,0 +1,22 @@
+ db SMEARGLE ; 235
+
+ db 55, 20, 35, 75, 20, 45
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 45 ; catch rate
+ db 106 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/smeargle/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm
+ ; end
diff --git a/data/pokemon/base_stats/smoochum.asm b/data/pokemon/base_stats/smoochum.asm
new file mode 100644
index 000000000..b3c6fdda0
--- /dev/null
+++ b/data/pokemon/base_stats/smoochum.asm
@@ -0,0 +1,22 @@
+ db SMOOCHUM ; 238
+
+ db 45, 30, 15, 65, 85, 65
+ ; hp atk def spd sat sdf
+
+ db ICE, PSYCHIC
+ db 45 ; catch rate
+ db 87 ; base exp
+ db ICE_BERRY ; item 1
+ db ICE_BERRY ; item 2
+ db GENDER_F100 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/smoochum/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SWEET_SCENT, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/sneasel.asm b/data/pokemon/base_stats/sneasel.asm
new file mode 100644
index 000000000..3abea4b7a
--- /dev/null
+++ b/data/pokemon/base_stats/sneasel.asm
@@ -0,0 +1,22 @@
+ db SNEASEL ; 215
+
+ db 55, 95, 55, 115, 35, 75
+ ; hp atk def spd sat sdf
+
+ db DARK, ICE
+ db 60 ; catch rate
+ db 132 ; base exp
+ db NO_ITEM ; item 1
+ db QUICK_CLAW ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/sneasel/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, NIGHTMARE, CUT, SURF, STRENGTH, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/snorlax.asm b/data/pokemon/base_stats/snorlax.asm
new file mode 100644
index 000000000..0d5a4c813
--- /dev/null
+++ b/data/pokemon/base_stats/snorlax.asm
@@ -0,0 +1,22 @@
+ db SNORLAX ; 143
+
+ db 160, 110, 65, 30, 65, 110
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 25 ; catch rate
+ db 154 ; base exp
+ db LEFTOVERS ; item 1
+ db LEFTOVERS ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 40 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/snorlax/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn MONSTER, MONSTER ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, EARTHQUAKE, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/snubbull.asm b/data/pokemon/base_stats/snubbull.asm
new file mode 100644
index 000000000..00d94a3cb
--- /dev/null
+++ b/data/pokemon/base_stats/snubbull.asm
@@ -0,0 +1,22 @@
+ db SNUBBULL ; 209
+
+ db 60, 80, 50, 30, 40, 40
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 190 ; catch rate
+ db 63 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F75 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/snubbull/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn FIELD, FAIRY ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/spearow.asm b/data/pokemon/base_stats/spearow.asm
new file mode 100644
index 000000000..b94e3559c
--- /dev/null
+++ b/data/pokemon/base_stats/spearow.asm
@@ -0,0 +1,22 @@
+ db SPEAROW ; 021
+
+ db 40, 60, 30, 70, 31, 31
+ ; hp atk def spd sat sdf
+
+ db NORMAL, FLYING
+ db 255 ; catch rate
+ db 58 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/spearow/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY
+ ; end
diff --git a/data/pokemon/base_stats/spinarak.asm b/data/pokemon/base_stats/spinarak.asm
new file mode 100644
index 000000000..5a19ec797
--- /dev/null
+++ b/data/pokemon/base_stats/spinarak.asm
@@ -0,0 +1,22 @@
+ db SPINARAK ; 167
+
+ db 40, 60, 40, 30, 40, 40
+ ; hp atk def spd sat sdf
+
+ db BUG, POISON
+ db 255 ; catch rate
+ db 54 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/spinarak/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/squirtle.asm b/data/pokemon/base_stats/squirtle.asm
new file mode 100644
index 000000000..1d9faa25d
--- /dev/null
+++ b/data/pokemon/base_stats/squirtle.asm
@@ -0,0 +1,22 @@
+ db SQUIRTLE ; 007
+
+ db 44, 48, 65, 43, 50, 64
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 45 ; catch rate
+ db 66 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/squirtle/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/stantler.asm b/data/pokemon/base_stats/stantler.asm
new file mode 100644
index 000000000..762b2f26b
--- /dev/null
+++ b/data/pokemon/base_stats/stantler.asm
@@ -0,0 +1,22 @@
+ db STANTLER ; 234
+
+ db 73, 95, 62, 85, 85, 65
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 45 ; catch rate
+ db 165 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/stantler/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/starmie.asm b/data/pokemon/base_stats/starmie.asm
new file mode 100644
index 000000000..55b6ed63c
--- /dev/null
+++ b/data/pokemon/base_stats/starmie.asm
@@ -0,0 +1,22 @@
+ db STARMIE ; 121
+
+ db 60, 75, 85, 115, 100, 85
+ ; hp atk def spd sat sdf
+
+ db WATER, PSYCHIC
+ db 60 ; catch rate
+ db 207 ; base exp
+ db STARDUST ; item 1
+ db STAR_PIECE ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/starmie/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn INVERTEBRATE, INVERTEBRATE ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, REST, ATTRACT, NIGHTMARE, SURF, FLASH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/staryu.asm b/data/pokemon/base_stats/staryu.asm
new file mode 100644
index 000000000..40700a47e
--- /dev/null
+++ b/data/pokemon/base_stats/staryu.asm
@@ -0,0 +1,22 @@
+ db STARYU ; 120
+
+ db 30, 45, 55, 85, 70, 55
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 225 ; catch rate
+ db 106 ; base exp
+ db STARDUST ; item 1
+ db STAR_PIECE ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/staryu/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn INVERTEBRATE, INVERTEBRATE ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, FLASH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/steelix.asm b/data/pokemon/base_stats/steelix.asm
new file mode 100644
index 000000000..df5d8940c
--- /dev/null
+++ b/data/pokemon/base_stats/steelix.asm
@@ -0,0 +1,22 @@
+ db STEELIX ; 208
+
+ db 75, 85, 200, 30, 55, 65
+ ; hp atk def spd sat sdf
+
+ db STEEL, GROUND
+ db 25 ; catch rate
+ db 196 ; base exp
+ db NO_ITEM ; item 1
+ db METAL_COAT ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/steelix/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INANIMATE, INANIMATE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, CUT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/sudowoodo.asm b/data/pokemon/base_stats/sudowoodo.asm
new file mode 100644
index 000000000..1c6c33984
--- /dev/null
+++ b/data/pokemon/base_stats/sudowoodo.asm
@@ -0,0 +1,22 @@
+ db SUDOWOODO ; 185
+
+ db 70, 100, 115, 30, 30, 65
+ ; hp atk def spd sat sdf
+
+ db ROCK, ROCK
+ db 65 ; catch rate
+ db 135 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/sudowoodo/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INANIMATE, INANIMATE ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/suicune.asm b/data/pokemon/base_stats/suicune.asm
new file mode 100644
index 000000000..04ece5516
--- /dev/null
+++ b/data/pokemon/base_stats/suicune.asm
@@ -0,0 +1,22 @@
+ db SUICUNE ; 245
+
+ db 100, 75, 115, 85, 90, 115
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 3 ; catch rate
+ db 215 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 80 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/suicune/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, CUT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/sunflora.asm b/data/pokemon/base_stats/sunflora.asm
new file mode 100644
index 000000000..97974939c
--- /dev/null
+++ b/data/pokemon/base_stats/sunflora.asm
@@ -0,0 +1,22 @@
+ db SUNFLORA ; 192
+
+ db 75, 75, 55, 30, 105, 85
+ ; hp atk def spd sat sdf
+
+ db GRASS, GRASS
+ db 120 ; catch rate
+ db 146 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/sunflora/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn PLANT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/sunkern.asm b/data/pokemon/base_stats/sunkern.asm
new file mode 100644
index 000000000..054625425
--- /dev/null
+++ b/data/pokemon/base_stats/sunkern.asm
@@ -0,0 +1,22 @@
+ db SUNKERN ; 191
+
+ db 30, 30, 30, 30, 30, 30
+ ; hp atk def spd sat sdf
+
+ db GRASS, GRASS
+ db 235 ; catch rate
+ db 52 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/sunkern/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn PLANT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/swinub.asm b/data/pokemon/base_stats/swinub.asm
new file mode 100644
index 000000000..37f1dd67d
--- /dev/null
+++ b/data/pokemon/base_stats/swinub.asm
@@ -0,0 +1,22 @@
+ db SWINUB ; 220
+
+ db 50, 50, 40, 50, 30, 30
+ ; hp atk def spd sat sdf
+
+ db ICE, GROUND
+ db 225 ; catch rate
+ db 78 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/swinub/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, STRENGTH, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/tangela.asm b/data/pokemon/base_stats/tangela.asm
new file mode 100644
index 000000000..9bb27ffca
--- /dev/null
+++ b/data/pokemon/base_stats/tangela.asm
@@ -0,0 +1,22 @@
+ db TANGELA ; 114
+
+ db 65, 55, 115, 60, 100, 40
+ ; hp atk def spd sat sdf
+
+ db GRASS, GRASS
+ db 45 ; catch rate
+ db 166 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/tangela/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn PLANT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/tauros.asm b/data/pokemon/base_stats/tauros.asm
new file mode 100644
index 000000000..553458e83
--- /dev/null
+++ b/data/pokemon/base_stats/tauros.asm
@@ -0,0 +1,22 @@
+ db TAUROS ; 128
+
+ db 75, 100, 95, 110, 40, 70
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 45 ; catch rate
+ db 211 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F0 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/tauros/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, REST, ATTRACT, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/teddiursa.asm b/data/pokemon/base_stats/teddiursa.asm
new file mode 100644
index 000000000..d636aed87
--- /dev/null
+++ b/data/pokemon/base_stats/teddiursa.asm
@@ -0,0 +1,22 @@
+ db TEDDIURSA ; 216
+
+ db 60, 80, 50, 40, 50, 50
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 120 ; catch rate
+ db 124 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/teddiursa/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/tentacool.asm b/data/pokemon/base_stats/tentacool.asm
new file mode 100644
index 000000000..b13879b47
--- /dev/null
+++ b/data/pokemon/base_stats/tentacool.asm
@@ -0,0 +1,22 @@
+ db TENTACOOL ; 072
+
+ db 40, 40, 35, 70, 50, 100
+ ; hp atk def spd sat sdf
+
+ db WATER, POISON
+ db 190 ; catch rate
+ db 105 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/tentacool/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn INVERTEBRATE, INVERTEBRATE ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, SURF, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/tentacruel.asm b/data/pokemon/base_stats/tentacruel.asm
new file mode 100644
index 000000000..a678d13a8
--- /dev/null
+++ b/data/pokemon/base_stats/tentacruel.asm
@@ -0,0 +1,22 @@
+ db TENTACRUEL ; 073
+
+ db 80, 70, 65, 100, 80, 120
+ ; hp atk def spd sat sdf
+
+ db WATER, POISON
+ db 60 ; catch rate
+ db 205 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/tentacruel/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn INVERTEBRATE, INVERTEBRATE ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, SURF, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/togepi.asm b/data/pokemon/base_stats/togepi.asm
new file mode 100644
index 000000000..82f549e9a
--- /dev/null
+++ b/data/pokemon/base_stats/togepi.asm
@@ -0,0 +1,22 @@
+ db TOGEPI ; 175
+
+ db 35, 20, 65, 20, 40, 65
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 190 ; catch rate
+ db 74 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 10 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/togepi/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, FLASH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/togetic.asm b/data/pokemon/base_stats/togetic.asm
new file mode 100644
index 000000000..cec61edb3
--- /dev/null
+++ b/data/pokemon/base_stats/togetic.asm
@@ -0,0 +1,22 @@
+ db TOGETIC ; 176
+
+ db 55, 40, 85, 40, 80, 105
+ ; hp atk def spd sat sdf
+
+ db NORMAL, FLYING
+ db 75 ; catch rate
+ db 114 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 10 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/togetic/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn AVIAN, FAIRY ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, STEEL_WING, FLY, FLASH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/totodile.asm b/data/pokemon/base_stats/totodile.asm
new file mode 100644
index 000000000..1753d5af0
--- /dev/null
+++ b/data/pokemon/base_stats/totodile.asm
@@ -0,0 +1,22 @@
+ db TOTODILE ; 158
+
+ db 50, 65, 64, 43, 44, 48
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 45 ; catch rate
+ db 66 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/totodile/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, CUT, SURF, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/typhlosion.asm b/data/pokemon/base_stats/typhlosion.asm
new file mode 100644
index 000000000..698a4e0a0
--- /dev/null
+++ b/data/pokemon/base_stats/typhlosion.asm
@@ -0,0 +1,22 @@
+ db TYPHLOSION ; 157
+
+ db 78, 84, 78, 100, 109, 85
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 45 ; catch rate
+ db 209 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/typhlosion/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/tyranitar.asm b/data/pokemon/base_stats/tyranitar.asm
new file mode 100644
index 000000000..b695007f1
--- /dev/null
+++ b/data/pokemon/base_stats/tyranitar.asm
@@ -0,0 +1,22 @@
+ db TYRANITAR ; 248
+
+ db 100, 134, 110, 61, 95, 100
+ ; hp atk def spd sat sdf
+
+ db ROCK, DARK
+ db 45 ; catch rate
+ db 218 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 40 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/tyranitar/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn MONSTER, MONSTER ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DETECT, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, NIGHTMARE, CUT, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/tyrogue.asm b/data/pokemon/base_stats/tyrogue.asm
new file mode 100644
index 000000000..4e5e7ee43
--- /dev/null
+++ b/data/pokemon/base_stats/tyrogue.asm
@@ -0,0 +1,22 @@
+ db TYROGUE ; 236
+
+ db 35, 35, 35, 35, 35, 35
+ ; hp atk def spd sat sdf
+
+ db FIGHTING, FIGHTING
+ db 75 ; catch rate
+ db 91 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F0 ; gender
+ db 100 ; unknown
+ db 25 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/tyrogue/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/umbreon.asm b/data/pokemon/base_stats/umbreon.asm
new file mode 100644
index 000000000..75e3700da
--- /dev/null
+++ b/data/pokemon/base_stats/umbreon.asm
@@ -0,0 +1,22 @@
+ db UMBREON ; 197
+
+ db 95, 65, 110, 65, 60, 130
+ ; hp atk def spd sat sdf
+
+ db DARK, DARK
+ db 45 ; catch rate
+ db 197 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 35 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/umbreon/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, NIGHTMARE, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/unown.asm b/data/pokemon/base_stats/unown.asm
new file mode 100644
index 000000000..0b13f3eca
--- /dev/null
+++ b/data/pokemon/base_stats/unown.asm
@@ -0,0 +1,22 @@
+ db UNOWN ; 201
+
+ db 48, 72, 48, 48, 72, 48
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, PSYCHIC
+ db 225 ; catch rate
+ db 61 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 40 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/unown_a/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm
+ ; end
diff --git a/data/pokemon/base_stats/ursaring.asm b/data/pokemon/base_stats/ursaring.asm
new file mode 100644
index 000000000..7aa8a4265
--- /dev/null
+++ b/data/pokemon/base_stats/ursaring.asm
@@ -0,0 +1,22 @@
+ db URSARING ; 217
+
+ db 90, 130, 75, 55, 75, 75
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 60 ; catch rate
+ db 189 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/ursaring/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH
+ ; end
diff --git a/data/pokemon/base_stats/vaporeon.asm b/data/pokemon/base_stats/vaporeon.asm
new file mode 100644
index 000000000..0e55a1946
--- /dev/null
+++ b/data/pokemon/base_stats/vaporeon.asm
@@ -0,0 +1,22 @@
+ db VAPOREON ; 134
+
+ db 130, 65, 60, 65, 110, 95
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 45 ; catch rate
+ db 196 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 35 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/vaporeon/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/venomoth.asm b/data/pokemon/base_stats/venomoth.asm
new file mode 100644
index 000000000..b34581360
--- /dev/null
+++ b/data/pokemon/base_stats/venomoth.asm
@@ -0,0 +1,22 @@
+ db VENOMOTH ; 049
+
+ db 70, 65, 60, 90, 90, 75
+ ; hp atk def spd sat sdf
+
+ db BUG, POISON
+ db 75 ; catch rate
+ db 138 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/venomoth/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SWIFT, REST, ATTRACT, THIEF, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/venonat.asm b/data/pokemon/base_stats/venonat.asm
new file mode 100644
index 000000000..4a6a568f3
--- /dev/null
+++ b/data/pokemon/base_stats/venonat.asm
@@ -0,0 +1,22 @@
+ db VENONAT ; 048
+
+ db 60, 55, 50, 45, 40, 55
+ ; hp atk def spd sat sdf
+
+ db BUG, POISON
+ db 190 ; catch rate
+ db 75 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/venonat/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SWIFT, REST, ATTRACT, THIEF
+ ; end
diff --git a/data/pokemon/base_stats/venusaur.asm b/data/pokemon/base_stats/venusaur.asm
new file mode 100644
index 000000000..f5d6a3a33
--- /dev/null
+++ b/data/pokemon/base_stats/venusaur.asm
@@ -0,0 +1,22 @@
+ db VENUSAUR ; 003
+
+ db 80, 82, 83, 80, 100, 100
+ ; hp atk def spd sat sdf
+
+ db GRASS, POISON
+ db 45 ; catch rate
+ db 208 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/venusaur/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, PLANT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROAR, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FURY_CUTTER, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/victreebel.asm b/data/pokemon/base_stats/victreebel.asm
new file mode 100644
index 000000000..0efade3ad
--- /dev/null
+++ b/data/pokemon/base_stats/victreebel.asm
@@ -0,0 +1,22 @@
+ db VICTREEBEL ; 071
+
+ db 80, 105, 65, 70, 100, 60
+ ; hp atk def spd sat sdf
+
+ db GRASS, POISON
+ db 45 ; catch rate
+ db 191 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/victreebel/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn PLANT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/vileplume.asm b/data/pokemon/base_stats/vileplume.asm
new file mode 100644
index 000000000..12170e167
--- /dev/null
+++ b/data/pokemon/base_stats/vileplume.asm
@@ -0,0 +1,22 @@
+ db VILEPLUME ; 045
+
+ db 75, 80, 85, 50, 100, 90
+ ; hp atk def spd sat sdf
+
+ db GRASS, POISON
+ db 45 ; catch rate
+ db 184 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/vileplume/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn PLANT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/voltorb.asm b/data/pokemon/base_stats/voltorb.asm
new file mode 100644
index 000000000..7c2255729
--- /dev/null
+++ b/data/pokemon/base_stats/voltorb.asm
@@ -0,0 +1,22 @@
+ db VOLTORB ; 100
+
+ db 40, 30, 50, 100, 55, 55
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, ELECTRIC
+ db 190 ; catch rate
+ db 103 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/voltorb/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INANIMATE, INANIMATE ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/vulpix.asm b/data/pokemon/base_stats/vulpix.asm
new file mode 100644
index 000000000..9cea11f93
--- /dev/null
+++ b/data/pokemon/base_stats/vulpix.asm
@@ -0,0 +1,22 @@
+ db VULPIX ; 037
+
+ db 38, 41, 40, 65, 50, 65
+ ; hp atk def spd sat sdf
+
+ db FIRE, FIRE
+ db 190 ; catch rate
+ db 63 ; base exp
+ db BURNT_BERRY ; item 1
+ db BURNT_BERRY ; item 2
+ db GENDER_F75 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/vulpix/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn FIELD, FIELD ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER
+ ; end
diff --git a/data/pokemon/base_stats/wartortle.asm b/data/pokemon/base_stats/wartortle.asm
new file mode 100644
index 000000000..437342a8b
--- /dev/null
+++ b/data/pokemon/base_stats/wartortle.asm
@@ -0,0 +1,22 @@
+ db WARTORTLE ; 008
+
+ db 59, 63, 80, 58, 65, 80
+ ; hp atk def spd sat sdf
+
+ db WATER, WATER
+ db 45 ; catch rate
+ db 143 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F12_5 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/wartortle/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn MONSTER, AMPHIBIAN ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/weedle.asm b/data/pokemon/base_stats/weedle.asm
new file mode 100644
index 000000000..b47a720ec
--- /dev/null
+++ b/data/pokemon/base_stats/weedle.asm
@@ -0,0 +1,22 @@
+ db WEEDLE ; 013
+
+ db 40, 35, 30, 50, 20, 20
+ ; hp atk def spd sat sdf
+
+ db BUG, POISON
+ db 255 ; catch rate
+ db 52 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/weedle/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm
+ ; end
diff --git a/data/pokemon/base_stats/weepinbell.asm b/data/pokemon/base_stats/weepinbell.asm
new file mode 100644
index 000000000..4a70c5bb2
--- /dev/null
+++ b/data/pokemon/base_stats/weepinbell.asm
@@ -0,0 +1,22 @@
+ db WEEPINBELL ; 070
+
+ db 65, 90, 50, 55, 85, 45
+ ; hp atk def spd sat sdf
+
+ db GRASS, POISON
+ db 120 ; catch rate
+ db 151 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/weepinbell/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_SLOW ; growth rate
+ dn PLANT, PLANT ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/weezing.asm b/data/pokemon/base_stats/weezing.asm
new file mode 100644
index 000000000..49161c69b
--- /dev/null
+++ b/data/pokemon/base_stats/weezing.asm
@@ -0,0 +1,22 @@
+ db WEEZING ; 110
+
+ db 65, 90, 120, 60, 85, 70
+ ; hp atk def spd sat sdf
+
+ db POISON, POISON
+ db 60 ; catch rate
+ db 173 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/weezing/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMORPHOUS, AMORPHOUS ; egg groups
+
+ ; tmhm
+ tmhm CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, REST, ATTRACT, THIEF, FLAMETHROWER, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/wigglytuff.asm b/data/pokemon/base_stats/wigglytuff.asm
new file mode 100644
index 000000000..b94bb3482
--- /dev/null
+++ b/data/pokemon/base_stats/wigglytuff.asm
@@ -0,0 +1,22 @@
+ db WIGGLYTUFF ; 040
+
+ db 140, 70, 45, 45, 75, 50
+ ; hp atk def spd sat sdf
+
+ db NORMAL, NORMAL
+ db 50 ; catch rate
+ db 109 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F75 ; gender
+ db 100 ; unknown
+ db 10 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/wigglytuff/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db FAST ; growth rate
+ dn FAIRY, FAIRY ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/wobbuffet.asm b/data/pokemon/base_stats/wobbuffet.asm
new file mode 100644
index 000000000..c476dd828
--- /dev/null
+++ b/data/pokemon/base_stats/wobbuffet.asm
@@ -0,0 +1,22 @@
+ db WOBBUFFET ; 202
+
+ db 190, 33, 58, 33, 33, 58
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, PSYCHIC
+ db 45 ; catch rate
+ db 177 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/wobbuffet/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMORPHOUS, AMORPHOUS ; egg groups
+
+ ; tmhm
+ tmhm
+ ; end
diff --git a/data/pokemon/base_stats/wooper.asm b/data/pokemon/base_stats/wooper.asm
new file mode 100644
index 000000000..6e621fe4b
--- /dev/null
+++ b/data/pokemon/base_stats/wooper.asm
@@ -0,0 +1,22 @@
+ db WOOPER ; 194
+
+ db 55, 45, 45, 15, 25, 25
+ ; hp atk def spd sat sdf
+
+ db WATER, GROUND
+ db 255 ; catch rate
+ db 52 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/wooper/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AMPHIBIAN, FIELD ; egg groups
+
+ ; tmhm
+ tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, SURF, FLASH, WHIRLPOOL, ICE_BEAM
+ ; end
diff --git a/data/pokemon/base_stats/xatu.asm b/data/pokemon/base_stats/xatu.asm
new file mode 100644
index 000000000..f2966ddb4
--- /dev/null
+++ b/data/pokemon/base_stats/xatu.asm
@@ -0,0 +1,22 @@
+ db XATU ; 178
+
+ db 65, 75, 70, 95, 95, 70
+ ; hp atk def spd sat sdf
+
+ db PSYCHIC, FLYING
+ db 75 ; catch rate
+ db 171 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/xatu/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, FLY, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/yanma.asm b/data/pokemon/base_stats/yanma.asm
new file mode 100644
index 000000000..98449c720
--- /dev/null
+++ b/data/pokemon/base_stats/yanma.asm
@@ -0,0 +1,22 @@
+ db YANMA ; 193
+
+ db 65, 65, 45, 95, 75, 45
+ ; hp atk def spd sat sdf
+
+ db BUG, FLYING
+ db 75 ; catch rate
+ db 147 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 20 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/yanma/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn INSECT, INSECT ; egg groups
+
+ ; tmhm
+ tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, FLASH
+ ; end
diff --git a/data/pokemon/base_stats/zapdos.asm b/data/pokemon/base_stats/zapdos.asm
new file mode 100644
index 000000000..44c1a8e82
--- /dev/null
+++ b/data/pokemon/base_stats/zapdos.asm
@@ -0,0 +1,22 @@
+ db ZAPDOS ; 145
+
+ db 90, 90, 85, 100, 125, 90
+ ; hp atk def spd sat sdf
+
+ db ELECTRIC, FLYING
+ db 3 ; catch rate
+ db 216 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDERLESS ; gender
+ db 100 ; unknown
+ db 80 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/zapdos/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db SLOW ; growth rate
+ dn NO_EGGS, NO_EGGS ; egg groups
+
+ ; tmhm
+ tmhm CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, STEEL_WING, FLY, FLASH, THUNDERBOLT
+ ; end
diff --git a/data/pokemon/base_stats/zubat.asm b/data/pokemon/base_stats/zubat.asm
new file mode 100644
index 000000000..e8fd33ea2
--- /dev/null
+++ b/data/pokemon/base_stats/zubat.asm
@@ -0,0 +1,22 @@
+ db ZUBAT ; 041
+
+ db 40, 45, 35, 55, 30, 40
+ ; hp atk def spd sat sdf
+
+ db POISON, FLYING
+ db 255 ; catch rate
+ db 54 ; base exp
+ db NO_ITEM ; item 1
+ db NO_ITEM ; item 2
+ db GENDER_F50 ; gender
+ db 100 ; unknown
+ db 15 ; step cycles to hatch
+ db 5 ; unknown
+ INCBIN "gfx/pics/zubat/front.dimensions"
+ db 0, 0, 0, 0 ; padding
+ db MEDIUM_FAST ; growth rate
+ dn AVIAN, AVIAN ; egg groups
+
+ ; tmhm
+ tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING
+ ; end
diff --git a/data/pokemon/cry_headers.asm b/data/pokemon/cry_headers.asm
new file mode 100644
index 000000000..0651fa7f1
--- /dev/null
+++ b/data/pokemon/cry_headers.asm
@@ -0,0 +1,259 @@
+CryHeaders:: ; f2787
+; entries correspond to constants/pokemon_constants.asm
+; index, pitch, length
+BulbasaurCryHeader: cry_header CRY_BULBASAUR, $080, $081
+IvysaurCryHeader: cry_header CRY_BULBASAUR, $020, $100
+VenusaurCryHeader: cry_header CRY_BULBASAUR, $000, $140
+CharmanderCryHeader: cry_header CRY_CHARMANDER, $060, $0c0
+CharmeleonCryHeader: cry_header CRY_CHARMANDER, $020, $0c0
+CharizardCryHeader: cry_header CRY_CHARMANDER, $000, $100
+SquirtleCryHeader: cry_header CRY_SQUIRTLE, $060, $0c0
+WartortleCryHeader: cry_header CRY_SQUIRTLE, $020, $0c0
+BlastoiseCryHeader: cry_header CRY_BLASTOISE, $000, $100
+CaterpieCryHeader: cry_header CRY_CATERPIE, $080, $0a0
+MetapodCryHeader: cry_header CRY_METAPOD, $0cc, $081
+ButterfreeCryHeader: cry_header CRY_CATERPIE, $077, $0c0
+WeedleCryHeader: cry_header CRY_WEEDLE, $0ee, $081
+KakunaCryHeader: cry_header CRY_BLASTOISE, $0ff, $081
+BeedrillCryHeader: cry_header CRY_BLASTOISE, $060, $100
+PidgeyCryHeader: cry_header CRY_PIDGEY, $0df, $084
+PidgeottoCryHeader: cry_header CRY_PIDGEOTTO, $028, $140
+PidgeotCryHeader: cry_header CRY_PIDGEOTTO, $011, $17f
+RattataCryHeader: cry_header CRY_RATTATA, $000, $100
+RaticateCryHeader: cry_header CRY_RATTATA, $020, $17f
+SpearowCryHeader: cry_header CRY_SPEAROW, $000, $100
+FearowCryHeader: cry_header CRY_FEAROW, $040, $120
+EkansCryHeader: cry_header CRY_EKANS, $012, $0c0
+ArbokCryHeader: cry_header CRY_EKANS, $0e0, $090
+PikachuCryHeader: cry_header CRY_BULBASAUR, $0ee, $081
+RaichuCryHeader: cry_header CRY_RAICHU, $0ee, $088
+SandshrewCryHeader: cry_header CRY_NIDORAN_M, $020, $0c0
+SandslashCryHeader: cry_header CRY_NIDORAN_M, $0ff, $17f
+NidoranFCryHeader: cry_header CRY_NIDORAN_F, $000, $100
+NidorinaCryHeader: cry_header CRY_NIDORAN_F, $02c, $160
+NidoqueenCryHeader: cry_header CRY_NIDOQUEEN, $000, $100
+NidoranMCryHeader: cry_header CRY_NIDORAN_M, $000, $100
+NidorinoCryHeader: cry_header CRY_NIDORAN_M, $02c, $140
+NidokingCryHeader: cry_header CRY_RAICHU, $000, $100
+ClefairyCryHeader: cry_header CRY_CLEFAIRY, $0cc, $081
+ClefableCryHeader: cry_header CRY_CLEFAIRY, $0aa, $0a0
+VulpixCryHeader: cry_header CRY_VULPIX, $04f, $090
+NinetalesCryHeader: cry_header CRY_VULPIX, $088, $0e0
+JigglypuffCryHeader: cry_header CRY_PIDGEY, $0ff, $0b5
+WigglytuffCryHeader: cry_header CRY_PIDGEY, $068, $0e0
+ZubatCryHeader: cry_header CRY_SQUIRTLE, $0e0, $100
+GolbatCryHeader: cry_header CRY_SQUIRTLE, $0fa, $100
+OddishCryHeader: cry_header CRY_ODDISH, $0dd, $081
+GloomCryHeader: cry_header CRY_ODDISH, $0aa, $0c0
+VileplumeCryHeader: cry_header CRY_VILEPLUME, $022, $17f
+ParasCryHeader: cry_header CRY_PARAS, $020, $160
+ParasectCryHeader: cry_header CRY_PARAS, $042, $17f
+VenonatCryHeader: cry_header CRY_VENONAT, $044, $0c0
+VenomothCryHeader: cry_header CRY_VENONAT, $029, $100
+DiglettCryHeader: cry_header CRY_DIGLETT, $0aa, $081
+DugtrioCryHeader: cry_header CRY_DIGLETT, $02a, $090
+MeowthCryHeader: cry_header CRY_CLEFAIRY, $077, $090
+PersianCryHeader: cry_header CRY_CLEFAIRY, $099, $17f
+PsyduckCryHeader: cry_header CRY_PSYDUCK, $020, $0e0
+GolduckCryHeader: cry_header CRY_PSYDUCK, $0ff, $0c0
+MankeyCryHeader: cry_header CRY_NIDOQUEEN, $0dd, $0e0
+PrimeapeCryHeader: cry_header CRY_NIDOQUEEN, $0af, $0c0
+GrowlitheCryHeader: cry_header CRY_GROWLITHE, $020, $0c0
+ArcanineCryHeader: cry_header CRY_WEEDLE, $000, $100
+PoliwagCryHeader: cry_header CRY_PIDGEY, $0ff, $17f
+PoliwhirlCryHeader: cry_header CRY_PIDGEY, $077, $0e0
+PoliwrathCryHeader: cry_header CRY_PIDGEY, $000, $17f
+AbraCryHeader: cry_header CRY_METAPOD, $0c0, $081
+KadabraCryHeader: cry_header CRY_METAPOD, $0a8, $140
+AlakazamCryHeader: cry_header CRY_METAPOD, $098, $17f
+MachopCryHeader: cry_header CRY_GROWLITHE, $0ee, $081
+MachokeCryHeader: cry_header CRY_GROWLITHE, $048, $0e0
+MachampCryHeader: cry_header CRY_GROWLITHE, $008, $140
+BellsproutCryHeader: cry_header CRY_PSYDUCK, $055, $081
+WeepinbellCryHeader: cry_header CRY_WEEPINBELL, $044, $0a0
+VictreebelCryHeader: cry_header CRY_WEEPINBELL, $066, $14c
+TentacoolCryHeader: cry_header CRY_VENONAT, $000, $100
+TentacruelCryHeader: cry_header CRY_VENONAT, $0ee, $17f
+GeodudeCryHeader: cry_header CRY_VULPIX, $0f0, $090
+GravelerCryHeader: cry_header CRY_VULPIX, $000, $100
+GolemCryHeader: cry_header CRY_GOLEM, $0e0, $0c0
+PonytaCryHeader: cry_header CRY_WEEPINBELL, $000, $100
+RapidashCryHeader: cry_header CRY_WEEPINBELL, $020, $140
+SlowpokeCryHeader: cry_header CRY_SLOWPOKE, $000, $100
+SlowbroCryHeader: cry_header CRY_GROWLITHE, $000, $100
+MagnemiteCryHeader: cry_header CRY_METAPOD, $080, $0e0
+MagnetonCryHeader: cry_header CRY_METAPOD, $020, $140
+FarfetchDCryHeader: cry_header CRY_SPEAROW, $0dd, $081
+DoduoCryHeader: cry_header CRY_DIGLETT, $0bb, $081
+DodrioCryHeader: cry_header CRY_DIGLETT, $099, $0a0
+SeelCryHeader: cry_header CRY_SEEL, $088, $140
+DewgongCryHeader: cry_header CRY_SEEL, $023, $17f
+GrimerCryHeader: cry_header CRY_GRIMER, $000, $100
+MukCryHeader: cry_header CRY_MUK, $0ef, $17f
+ShellderCryHeader: cry_header CRY_FEAROW, $000, $100
+CloysterCryHeader: cry_header CRY_FEAROW, $06f, $160
+GastlyCryHeader: cry_header CRY_METAPOD, $000, $100
+HaunterCryHeader: cry_header CRY_METAPOD, $030, $0c0
+GengarCryHeader: cry_header CRY_MUK, $000, $17f
+OnixCryHeader: cry_header CRY_EKANS, $0ff, $140
+DrowzeeCryHeader: cry_header CRY_DROWZEE, $088, $0a0
+HypnoCryHeader: cry_header CRY_DROWZEE, $0ee, $0c0
+KrabbyCryHeader: cry_header CRY_KRABBY, $020, $160
+KinglerCryHeader: cry_header CRY_KRABBY, $0ee, $160
+VoltorbCryHeader: cry_header CRY_VOLTORB, $0ed, $100
+ElectrodeCryHeader: cry_header CRY_VOLTORB, $0a8, $110
+ExeggcuteCryHeader: cry_header CRY_DIGLETT, $000, $100
+ExeggutorCryHeader: cry_header CRY_DROWZEE, $000, $100
+CuboneCryHeader: cry_header CRY_CLEFAIRY, $000, $100
+MarowakCryHeader: cry_header CRY_ODDISH, $04f, $0e0
+HitmonleeCryHeader: cry_header CRY_GOLEM, $080, $140
+HitmonchanCryHeader: cry_header CRY_SEEL, $0ee, $140
+LickitungCryHeader: cry_header CRY_SEEL, $000, $100
+KoffingCryHeader: cry_header CRY_GOLEM, $0e6, $15d
+WeezingCryHeader: cry_header CRY_GOLEM, $0ff, $17f
+RhyhornCryHeader: cry_header CRY_CHARMANDER, $000, $100
+RhydonCryHeader: cry_header CRY_RHYDON, $000, $100
+ChanseyCryHeader: cry_header CRY_PIDGEOTTO, $00a, $140
+TangelaCryHeader: cry_header CRY_GOLEM, $000, $100
+KangaskhanCryHeader: cry_header CRY_KANGASKHAN, $000, $100
+HorseaCryHeader: cry_header CRY_CLEFAIRY, $099, $090
+SeadraCryHeader: cry_header CRY_CLEFAIRY, $03c, $081
+GoldeenCryHeader: cry_header CRY_CATERPIE, $080, $0c0
+SeakingCryHeader: cry_header CRY_CATERPIE, $010, $17f
+StaryuCryHeader: cry_header CRY_PARAS, $002, $0a0
+StarmieCryHeader: cry_header CRY_PARAS, $000, $100
+MrMimeCryHeader: cry_header CRY_KRABBY, $008, $0c0
+ScytherCryHeader: cry_header CRY_CATERPIE, $000, $100
+JynxCryHeader: cry_header CRY_DROWZEE, $0ff, $17f
+ElectabuzzCryHeader: cry_header CRY_VOLTORB, $08f, $17f
+MagmarCryHeader: cry_header CRY_CHARMANDER, $0ff, $0b0
+PinsirCryHeader: cry_header CRY_PIDGEOTTO, $000, $100
+TaurosCryHeader: cry_header CRY_SQUIRTLE, $011, $0c0
+MagikarpCryHeader: cry_header CRY_EKANS, $080, $080
+GyaradosCryHeader: cry_header CRY_EKANS, $000, $100
+LaprasCryHeader: cry_header CRY_LAPRAS, $000, $100
+DittoCryHeader: cry_header CRY_PIDGEY, $0ff, $17f
+EeveeCryHeader: cry_header CRY_VENONAT, $088, $0e0
+VaporeonCryHeader: cry_header CRY_VENONAT, $0aa, $17f
+JolteonCryHeader: cry_header CRY_VENONAT, $03d, $100
+FlareonCryHeader: cry_header CRY_VENONAT, $010, $0a0
+PorygonCryHeader: cry_header CRY_WEEPINBELL, $0aa, $17f
+OmanyteCryHeader: cry_header CRY_GROWLITHE, $0f0, $081
+OmastarCryHeader: cry_header CRY_GROWLITHE, $0ff, $0c0
+KabutoCryHeader: cry_header CRY_CATERPIE, $0bb, $0c0
+KabutopsCryHeader: cry_header CRY_FEAROW, $0ee, $081
+AerodactylCryHeader: cry_header CRY_VILEPLUME, $020, $170
+SnorlaxCryHeader: cry_header CRY_GRIMER, $055, $081
+ArticunoCryHeader: cry_header CRY_RAICHU, $080, $0c0
+ZapdosCryHeader: cry_header CRY_FEAROW, $0ff, $100
+MoltresCryHeader: cry_header CRY_RAICHU, $0f8, $0c0
+DratiniCryHeader: cry_header CRY_BULBASAUR, $060, $0c0
+DragonairCryHeader: cry_header CRY_BULBASAUR, $040, $100
+DragoniteCryHeader: cry_header CRY_BULBASAUR, $03c, $140
+MewtwoCryHeader: cry_header CRY_PARAS, $099, $17f
+MewCryHeader: cry_header CRY_PARAS, $0ee, $17f
+ChikoritaCryHeader: cry_header CRY_CHIKORITA, -$010, $0b0
+BayleefCryHeader: cry_header CRY_CHIKORITA, -$022, $120
+MeganiumCryHeader: cry_header CRY_CHIKORITA, -$0b7, $200
+CyndaquilCryHeader: cry_header CRY_CYNDAQUIL, $347, $080
+QuilavaCryHeader: cry_header CRY_CYNDAQUIL, $321, $120
+TyphlosionCryHeader: cry_header CRY_TYPHLOSION, $f00, $0d4
+TotodileCryHeader: cry_header CRY_TOTODILE, $46c, $0e8
+CroconawCryHeader: cry_header CRY_TOTODILE, $440, $110
+FeraligatrCryHeader: cry_header CRY_TOTODILE, $3fc, $180
+SentretCryHeader: cry_header CRY_SENTRET, $08a, $0b8
+FurretCryHeader: cry_header CRY_SENTRET, $06b, $102
+HoothootCryHeader: cry_header CRY_HOOTHOOT, $091, $0d8
+NoctowlCryHeader: cry_header CRY_HOOTHOOT, $000, $1a0
+LedybaCryHeader: cry_header CRY_LEDYBA, $000, $0de
+LedianCryHeader: cry_header CRY_LEDYBA, -$096, $138
+SpinarakCryHeader: cry_header CRY_SPINARAK, $011, $200
+AriadosCryHeader: cry_header CRY_SPINARAK, -$0ae, $1e2
+CrobatCryHeader: cry_header CRY_SQUIRTLE, -$010, $140
+ChinchouCryHeader: cry_header CRY_CYNDAQUIL, $3c9, $140
+LanturnCryHeader: cry_header CRY_CYNDAQUIL, $2d0, $110
+PichuCryHeader: cry_header CRY_PICHU, $000, $140
+CleffaCryHeader: cry_header CRY_CLEFFA, $061, $091
+IgglybuffCryHeader: cry_header CRY_CHIKORITA, $0e8, $0e8
+TogepiCryHeader: cry_header CRY_TOGEPI, $010, $100
+TogeticCryHeader: cry_header CRY_TOGETIC, $03b, $038
+NatuCryHeader: cry_header CRY_NATU, -$067, $100
+XatuCryHeader: cry_header CRY_NATU, -$0a7, $168
+MareepCryHeader: cry_header CRY_MAREEP, $022, $0d8
+FlaaffyCryHeader: cry_header CRY_MAREEP, -$007, $180
+AmpharosCryHeader: cry_header CRY_AMPHAROS, -$07c, $0e8
+BellossomCryHeader: cry_header CRY_CLEFFA, $084, $150
+MarillCryHeader: cry_header CRY_MARILL, $11b, $120
+AzumarillCryHeader: cry_header CRY_MARILL, $0b6, $180
+SudowoodoCryHeader: cry_header CRY_CLEFFA, $f40, $180
+PolitoedCryHeader: cry_header CRY_CLEFFA, -$2a3, $1c8
+HoppipCryHeader: cry_header CRY_CLEFFA, $03b, $0c8
+SkiploomCryHeader: cry_header CRY_CLEFFA, $027, $138
+JumpluffCryHeader: cry_header CRY_CLEFFA, $000, $180
+AipomCryHeader: cry_header CRY_AIPOM, -$051, $0e8
+SunkernCryHeader: cry_header CRY_MARILL, $12b, $0b8
+SunfloraCryHeader: cry_header CRY_SUNFLORA, -$020, $180
+YanmaCryHeader: cry_header CRY_TOTODILE, $031, $0c8
+WooperCryHeader: cry_header CRY_WOOPER, $093, $0af
+QuagsireCryHeader: cry_header CRY_WOOPER, -$0c6, $140
+EspeonCryHeader: cry_header CRY_AIPOM, $0a2, $140
+UmbreonCryHeader: cry_header CRY_VENONAT, -$0e9, $0f0
+MurkrowCryHeader: cry_header CRY_MARILL, -$01f, $180
+SlowkingCryHeader: cry_header CRY_SLOWKING, $104, $200
+MisdreavusCryHeader: cry_header CRY_HOOTHOOT, $130, $0e8
+UnownCryHeader: cry_header CRY_HOOTHOOT, $162, $100
+WobbuffetCryHeader: cry_header CRY_AMPHAROS, $27b, $144
+GirafarigCryHeader: cry_header CRY_GIRAFARIG, $041, $200
+PinecoCryHeader: cry_header CRY_SLOWKING, $080, $100
+ForretressCryHeader: cry_header CRY_SLOWKING, $000, $180
+DunsparceCryHeader: cry_header CRY_DUNSPARCE, $1c4, $100
+GligarCryHeader: cry_header CRY_GLIGAR, -$102, $100
+SteelixCryHeader: cry_header CRY_TYPHLOSION, $0ef, $0f7
+SnubbullCryHeader: cry_header CRY_DUNSPARCE, $112, $0e8
+GranbullCryHeader: cry_header CRY_DUNSPARCE, $000, $180
+QwilfishCryHeader: cry_header CRY_SLOWKING, $160, $0e0
+ScizorCryHeader: cry_header CRY_AMPHAROS, $000, $160
+ShuckleCryHeader: cry_header CRY_DUNSPARCE, $290, $0a8
+HeracrossCryHeader: cry_header CRY_AMPHAROS, $035, $0e0
+SneaselCryHeader: cry_header CRY_WOOPER, $053, $0af
+TeddiursaCryHeader: cry_header CRY_TEDDIURSA, $7a2, $06e
+UrsaringCryHeader: cry_header CRY_TEDDIURSA, $640, $0d8
+SlugmaCryHeader: cry_header CRY_SLUGMA, -$1d8, $140
+MagcargoCryHeader: cry_header CRY_MAGCARGO, -$20d, $1c0
+SwinubCryHeader: cry_header CRY_CYNDAQUIL, $1fe, $140
+PiloswineCryHeader: cry_header CRY_MAGCARGO, -$109, $100
+CorsolaCryHeader: cry_header CRY_MAGCARGO, $0a1, $0e8
+RemoraidCryHeader: cry_header CRY_SUNFLORA, $00d, $100
+OctilleryCryHeader: cry_header CRY_TOTODILE, $000, $180
+DelibirdCryHeader: cry_header CRY_TEDDIURSA, $002, $06a
+MantineCryHeader: cry_header CRY_MANTINE, -$0be, $0f0
+SkarmoryCryHeader: cry_header CRY_AMPHAROS, $8a9, $180
+HoundourCryHeader: cry_header CRY_CYNDAQUIL, $039, $140
+HoundoomCryHeader: cry_header CRY_TOTODILE, -$10a, $100
+KingdraCryHeader: cry_header CRY_SLUGMA, $2fb, $100
+PhanpyCryHeader: cry_header CRY_SENTRET, $048, $230
+DonphanCryHeader: cry_header CRY_DONPHAN, $000, $1a0
+Porygon2CryHeader: cry_header CRY_GIRAFARIG, $073, $240
+StantlerCryHeader: cry_header CRY_AIPOM, -$160, $180
+SmeargleCryHeader: cry_header CRY_PICHU, -$21a, $1f0
+TyrogueCryHeader: cry_header CRY_AIPOM, $02c, $108
+HitmontopCryHeader: cry_header CRY_SLUGMA, $000, $100
+SmoochumCryHeader: cry_header CRY_MARILL, $068, $100
+ElekidCryHeader: cry_header CRY_SUNFLORA, -$2d8, $0b4
+MagbyCryHeader: cry_header CRY_TEDDIURSA, $176, $03a
+MiltankCryHeader: cry_header CRY_GLIGAR, -$1cd, $1a0
+BlisseyCryHeader: cry_header CRY_SLOWKING, $293, $140
+RaikouCryHeader: cry_header CRY_RAIKOU, $22e, $120
+EnteiCryHeader: cry_header CRY_ENTEI, $000, $1a0
+SuicuneCryHeader: cry_header CRY_MAGCARGO, $000, $180
+LarvitarCryHeader: cry_header CRY_RAIKOU, $05f, $0d0
+PupitarCryHeader: cry_header CRY_SPINARAK, -$1db, $150
+TyranitarCryHeader: cry_header CRY_RAIKOU, -$100, $180
+LugiaCryHeader: cry_header CRY_TYPHLOSION, $000, $100
+HoOhCryHeader: cry_header CRY_AIPOM, $000, $180
+CelebiCryHeader: cry_header CRY_ENTEI, $14a, $111
+CryHeader252: cry_header CRY_NIDORAN_M, 0, 0
+CryHeader253: cry_header CRY_NIDORAN_M, 0, 0
+CryHeader254: cry_header CRY_NIDORAN_M, 0, 0
+CryHeader255: cry_header CRY_NIDORAN_M, 0, 0
+; f2d81
diff --git a/data/pokemon/dex_entries.asm b/data/pokemon/dex_entries.asm
new file mode 100644
index 000000000..92b9c6b06
--- /dev/null
+++ b/data/pokemon/dex_entries.asm
@@ -0,0 +1,272 @@
+INCLUDE "includes.asm"
+
+
+SECTION "Pokedex Entries 001-064", ROMX
+
+PokedexEntries1::
+BulbasaurPokedexEntry:: INCLUDE "data/pokemon/dex_entries/bulbasaur.asm"
+IvysaurPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ivysaur.asm"
+VenusaurPokedexEntry:: INCLUDE "data/pokemon/dex_entries/venusaur.asm"
+CharmanderPokedexEntry:: INCLUDE "data/pokemon/dex_entries/charmander.asm"
+CharmeleonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/charmeleon.asm"
+CharizardPokedexEntry:: INCLUDE "data/pokemon/dex_entries/charizard.asm"
+SquirtlePokedexEntry:: INCLUDE "data/pokemon/dex_entries/squirtle.asm"
+WartortlePokedexEntry:: INCLUDE "data/pokemon/dex_entries/wartortle.asm"
+BlastoisePokedexEntry:: INCLUDE "data/pokemon/dex_entries/blastoise.asm"
+CaterpiePokedexEntry:: INCLUDE "data/pokemon/dex_entries/caterpie.asm"
+MetapodPokedexEntry:: INCLUDE "data/pokemon/dex_entries/metapod.asm"
+ButterfreePokedexEntry:: INCLUDE "data/pokemon/dex_entries/butterfree.asm"
+WeedlePokedexEntry:: INCLUDE "data/pokemon/dex_entries/weedle.asm"
+KakunaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kakuna.asm"
+BeedrillPokedexEntry:: INCLUDE "data/pokemon/dex_entries/beedrill.asm"
+PidgeyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pidgey.asm"
+PidgeottoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pidgeotto.asm"
+PidgeotPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pidgeot.asm"
+RattataPokedexEntry:: INCLUDE "data/pokemon/dex_entries/rattata.asm"
+RaticatePokedexEntry:: INCLUDE "data/pokemon/dex_entries/raticate.asm"
+SpearowPokedexEntry:: INCLUDE "data/pokemon/dex_entries/spearow.asm"
+FearowPokedexEntry:: INCLUDE "data/pokemon/dex_entries/fearow.asm"
+EkansPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ekans.asm"
+ArbokPokedexEntry:: INCLUDE "data/pokemon/dex_entries/arbok.asm"
+PikachuPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pikachu.asm"
+RaichuPokedexEntry:: INCLUDE "data/pokemon/dex_entries/raichu.asm"
+SandshrewPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sandshrew.asm"
+SandslashPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sandslash.asm"
+NidoranFPokedexEntry:: INCLUDE "data/pokemon/dex_entries/nidoran_f.asm"
+NidorinaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/nidorina.asm"
+NidoqueenPokedexEntry:: INCLUDE "data/pokemon/dex_entries/nidoqueen.asm"
+NidoranMPokedexEntry:: INCLUDE "data/pokemon/dex_entries/nidoran_m.asm"
+NidorinoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/nidorino.asm"
+NidokingPokedexEntry:: INCLUDE "data/pokemon/dex_entries/nidoking.asm"
+ClefairyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/clefairy.asm"
+ClefablePokedexEntry:: INCLUDE "data/pokemon/dex_entries/clefable.asm"
+VulpixPokedexEntry:: INCLUDE "data/pokemon/dex_entries/vulpix.asm"
+NinetalesPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ninetales.asm"
+JigglypuffPokedexEntry:: INCLUDE "data/pokemon/dex_entries/jigglypuff.asm"
+WigglytuffPokedexEntry:: INCLUDE "data/pokemon/dex_entries/wigglytuff.asm"
+ZubatPokedexEntry:: INCLUDE "data/pokemon/dex_entries/zubat.asm"
+GolbatPokedexEntry:: INCLUDE "data/pokemon/dex_entries/golbat.asm"
+OddishPokedexEntry:: INCLUDE "data/pokemon/dex_entries/oddish.asm"
+GloomPokedexEntry:: INCLUDE "data/pokemon/dex_entries/gloom.asm"
+VileplumePokedexEntry:: INCLUDE "data/pokemon/dex_entries/vileplume.asm"
+ParasPokedexEntry:: INCLUDE "data/pokemon/dex_entries/paras.asm"
+ParasectPokedexEntry:: INCLUDE "data/pokemon/dex_entries/parasect.asm"
+VenonatPokedexEntry:: INCLUDE "data/pokemon/dex_entries/venonat.asm"
+VenomothPokedexEntry:: INCLUDE "data/pokemon/dex_entries/venomoth.asm"
+DiglettPokedexEntry:: INCLUDE "data/pokemon/dex_entries/diglett.asm"
+DugtrioPokedexEntry:: INCLUDE "data/pokemon/dex_entries/dugtrio.asm"
+MeowthPokedexEntry:: INCLUDE "data/pokemon/dex_entries/meowth.asm"
+PersianPokedexEntry:: INCLUDE "data/pokemon/dex_entries/persian.asm"
+PsyduckPokedexEntry:: INCLUDE "data/pokemon/dex_entries/psyduck.asm"
+GolduckPokedexEntry:: INCLUDE "data/pokemon/dex_entries/golduck.asm"
+MankeyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/mankey.asm"
+PrimeapePokedexEntry:: INCLUDE "data/pokemon/dex_entries/primeape.asm"
+GrowlithePokedexEntry:: INCLUDE "data/pokemon/dex_entries/growlithe.asm"
+ArcaninePokedexEntry:: INCLUDE "data/pokemon/dex_entries/arcanine.asm"
+PoliwagPokedexEntry:: INCLUDE "data/pokemon/dex_entries/poliwag.asm"
+PoliwhirlPokedexEntry:: INCLUDE "data/pokemon/dex_entries/poliwhirl.asm"
+PoliwrathPokedexEntry:: INCLUDE "data/pokemon/dex_entries/poliwrath.asm"
+AbraPokedexEntry:: INCLUDE "data/pokemon/dex_entries/abra.asm"
+KadabraPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kadabra.asm"
+
+
+SECTION "Pokedex Entries 065-128", ROMX
+
+PokedexEntries2::
+AlakazamPokedexEntry:: INCLUDE "data/pokemon/dex_entries/alakazam.asm"
+MachopPokedexEntry:: INCLUDE "data/pokemon/dex_entries/machop.asm"
+MachokePokedexEntry:: INCLUDE "data/pokemon/dex_entries/machoke.asm"
+MachampPokedexEntry:: INCLUDE "data/pokemon/dex_entries/machamp.asm"
+BellsproutPokedexEntry:: INCLUDE "data/pokemon/dex_entries/bellsprout.asm"
+WeepinbellPokedexEntry:: INCLUDE "data/pokemon/dex_entries/weepinbell.asm"
+VictreebelPokedexEntry:: INCLUDE "data/pokemon/dex_entries/victreebel.asm"
+TentacoolPokedexEntry:: INCLUDE "data/pokemon/dex_entries/tentacool.asm"
+TentacruelPokedexEntry:: INCLUDE "data/pokemon/dex_entries/tentacruel.asm"
+GeodudePokedexEntry:: INCLUDE "data/pokemon/dex_entries/geodude.asm"
+GravelerPokedexEntry:: INCLUDE "data/pokemon/dex_entries/graveler.asm"
+GolemPokedexEntry:: INCLUDE "data/pokemon/dex_entries/golem.asm"
+PonytaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ponyta.asm"
+RapidashPokedexEntry:: INCLUDE "data/pokemon/dex_entries/rapidash.asm"
+SlowpokePokedexEntry:: INCLUDE "data/pokemon/dex_entries/slowpoke.asm"
+SlowbroPokedexEntry:: INCLUDE "data/pokemon/dex_entries/slowbro.asm"
+MagnemitePokedexEntry:: INCLUDE "data/pokemon/dex_entries/magnemite.asm"
+MagnetonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/magneton.asm"
+FarfetchDPokedexEntry:: INCLUDE "data/pokemon/dex_entries/farfetch_d.asm"
+DoduoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/doduo.asm"
+DodrioPokedexEntry:: INCLUDE "data/pokemon/dex_entries/dodrio.asm"
+SeelPokedexEntry:: INCLUDE "data/pokemon/dex_entries/seel.asm"
+DewgongPokedexEntry:: INCLUDE "data/pokemon/dex_entries/dewgong.asm"
+GrimerPokedexEntry:: INCLUDE "data/pokemon/dex_entries/grimer.asm"
+MukPokedexEntry:: INCLUDE "data/pokemon/dex_entries/muk.asm"
+ShellderPokedexEntry:: INCLUDE "data/pokemon/dex_entries/shellder.asm"
+CloysterPokedexEntry:: INCLUDE "data/pokemon/dex_entries/cloyster.asm"
+GastlyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/gastly.asm"
+HaunterPokedexEntry:: INCLUDE "data/pokemon/dex_entries/haunter.asm"
+GengarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/gengar.asm"
+OnixPokedexEntry:: INCLUDE "data/pokemon/dex_entries/onix.asm"
+DrowzeePokedexEntry:: INCLUDE "data/pokemon/dex_entries/drowzee.asm"
+HypnoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/hypno.asm"
+KrabbyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/krabby.asm"
+KinglerPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kingler.asm"
+VoltorbPokedexEntry:: INCLUDE "data/pokemon/dex_entries/voltorb.asm"
+ElectrodePokedexEntry:: INCLUDE "data/pokemon/dex_entries/electrode.asm"
+ExeggcutePokedexEntry:: INCLUDE "data/pokemon/dex_entries/exeggcute.asm"
+ExeggutorPokedexEntry:: INCLUDE "data/pokemon/dex_entries/exeggutor.asm"
+CubonePokedexEntry:: INCLUDE "data/pokemon/dex_entries/cubone.asm"
+MarowakPokedexEntry:: INCLUDE "data/pokemon/dex_entries/marowak.asm"
+HitmonleePokedexEntry:: INCLUDE "data/pokemon/dex_entries/hitmonlee.asm"
+HitmonchanPokedexEntry:: INCLUDE "data/pokemon/dex_entries/hitmonchan.asm"
+LickitungPokedexEntry:: INCLUDE "data/pokemon/dex_entries/lickitung.asm"
+KoffingPokedexEntry:: INCLUDE "data/pokemon/dex_entries/koffing.asm"
+WeezingPokedexEntry:: INCLUDE "data/pokemon/dex_entries/weezing.asm"
+RhyhornPokedexEntry:: INCLUDE "data/pokemon/dex_entries/rhyhorn.asm"
+RhydonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/rhydon.asm"
+ChanseyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/chansey.asm"
+TangelaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/tangela.asm"
+KangaskhanPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kangaskhan.asm"
+HorseaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/horsea.asm"
+SeadraPokedexEntry:: INCLUDE "data/pokemon/dex_entries/seadra.asm"
+GoldeenPokedexEntry:: INCLUDE "data/pokemon/dex_entries/goldeen.asm"
+SeakingPokedexEntry:: INCLUDE "data/pokemon/dex_entries/seaking.asm"
+StaryuPokedexEntry:: INCLUDE "data/pokemon/dex_entries/staryu.asm"
+StarmiePokedexEntry:: INCLUDE "data/pokemon/dex_entries/starmie.asm"
+MrMimePokedexEntry:: INCLUDE "data/pokemon/dex_entries/mr__mime.asm"
+ScytherPokedexEntry:: INCLUDE "data/pokemon/dex_entries/scyther.asm"
+JynxPokedexEntry:: INCLUDE "data/pokemon/dex_entries/jynx.asm"
+ElectabuzzPokedexEntry:: INCLUDE "data/pokemon/dex_entries/electabuzz.asm"
+MagmarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/magmar.asm"
+PinsirPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pinsir.asm"
+TaurosPokedexEntry:: INCLUDE "data/pokemon/dex_entries/tauros.asm"
+
+
+SECTION "Pokedex Entries 129-192", ROMX
+
+PokedexEntries3::
+MagikarpPokedexEntry:: INCLUDE "data/pokemon/dex_entries/magikarp.asm"
+GyaradosPokedexEntry:: INCLUDE "data/pokemon/dex_entries/gyarados.asm"
+LaprasPokedexEntry:: INCLUDE "data/pokemon/dex_entries/lapras.asm"
+DittoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ditto.asm"
+EeveePokedexEntry:: INCLUDE "data/pokemon/dex_entries/eevee.asm"
+VaporeonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/vaporeon.asm"
+JolteonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/jolteon.asm"
+FlareonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/flareon.asm"
+PorygonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/porygon.asm"
+OmanytePokedexEntry:: INCLUDE "data/pokemon/dex_entries/omanyte.asm"
+OmastarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/omastar.asm"
+KabutoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kabuto.asm"
+KabutopsPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kabutops.asm"
+AerodactylPokedexEntry:: INCLUDE "data/pokemon/dex_entries/aerodactyl.asm"
+SnorlaxPokedexEntry:: INCLUDE "data/pokemon/dex_entries/snorlax.asm"
+ArticunoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/articuno.asm"
+ZapdosPokedexEntry:: INCLUDE "data/pokemon/dex_entries/zapdos.asm"
+MoltresPokedexEntry:: INCLUDE "data/pokemon/dex_entries/moltres.asm"
+DratiniPokedexEntry:: INCLUDE "data/pokemon/dex_entries/dratini.asm"
+DragonairPokedexEntry:: INCLUDE "data/pokemon/dex_entries/dragonair.asm"
+DragonitePokedexEntry:: INCLUDE "data/pokemon/dex_entries/dragonite.asm"
+MewtwoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/mewtwo.asm"
+MewPokedexEntry:: INCLUDE "data/pokemon/dex_entries/mew.asm"
+ChikoritaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/chikorita.asm"
+BayleefPokedexEntry:: INCLUDE "data/pokemon/dex_entries/bayleef.asm"
+MeganiumPokedexEntry:: INCLUDE "data/pokemon/dex_entries/meganium.asm"
+CyndaquilPokedexEntry:: INCLUDE "data/pokemon/dex_entries/cyndaquil.asm"
+QuilavaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/quilava.asm"
+TyphlosionPokedexEntry:: INCLUDE "data/pokemon/dex_entries/typhlosion.asm"
+TotodilePokedexEntry:: INCLUDE "data/pokemon/dex_entries/totodile.asm"
+CroconawPokedexEntry:: INCLUDE "data/pokemon/dex_entries/croconaw.asm"
+FeraligatrPokedexEntry:: INCLUDE "data/pokemon/dex_entries/feraligatr.asm"
+SentretPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sentret.asm"
+FurretPokedexEntry:: INCLUDE "data/pokemon/dex_entries/furret.asm"
+HoothootPokedexEntry:: INCLUDE "data/pokemon/dex_entries/hoothoot.asm"
+NoctowlPokedexEntry:: INCLUDE "data/pokemon/dex_entries/noctowl.asm"
+LedybaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ledyba.asm"
+LedianPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ledian.asm"
+SpinarakPokedexEntry:: INCLUDE "data/pokemon/dex_entries/spinarak.asm"
+AriadosPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ariados.asm"
+CrobatPokedexEntry:: INCLUDE "data/pokemon/dex_entries/crobat.asm"
+ChinchouPokedexEntry:: INCLUDE "data/pokemon/dex_entries/chinchou.asm"
+LanturnPokedexEntry:: INCLUDE "data/pokemon/dex_entries/lanturn.asm"
+PichuPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pichu.asm"
+CleffaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/cleffa.asm"
+IgglybuffPokedexEntry:: INCLUDE "data/pokemon/dex_entries/igglybuff.asm"
+TogepiPokedexEntry:: INCLUDE "data/pokemon/dex_entries/togepi.asm"
+TogeticPokedexEntry:: INCLUDE "data/pokemon/dex_entries/togetic.asm"
+NatuPokedexEntry:: INCLUDE "data/pokemon/dex_entries/natu.asm"
+XatuPokedexEntry:: INCLUDE "data/pokemon/dex_entries/xatu.asm"
+MareepPokedexEntry:: INCLUDE "data/pokemon/dex_entries/mareep.asm"
+FlaaffyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/flaaffy.asm"
+AmpharosPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ampharos.asm"
+BellossomPokedexEntry:: INCLUDE "data/pokemon/dex_entries/bellossom.asm"
+MarillPokedexEntry:: INCLUDE "data/pokemon/dex_entries/marill.asm"
+AzumarillPokedexEntry:: INCLUDE "data/pokemon/dex_entries/azumarill.asm"
+SudowoodoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sudowoodo.asm"
+PolitoedPokedexEntry:: INCLUDE "data/pokemon/dex_entries/politoed.asm"
+HoppipPokedexEntry:: INCLUDE "data/pokemon/dex_entries/hoppip.asm"
+SkiploomPokedexEntry:: INCLUDE "data/pokemon/dex_entries/skiploom.asm"
+JumpluffPokedexEntry:: INCLUDE "data/pokemon/dex_entries/jumpluff.asm"
+AipomPokedexEntry:: INCLUDE "data/pokemon/dex_entries/aipom.asm"
+SunkernPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sunkern.asm"
+SunfloraPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sunflora.asm"
+
+
+SECTION "Pokedex Entries 193-251", ROMX
+
+PokedexEntries4::
+YanmaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/yanma.asm"
+WooperPokedexEntry:: INCLUDE "data/pokemon/dex_entries/wooper.asm"
+QuagsirePokedexEntry:: INCLUDE "data/pokemon/dex_entries/quagsire.asm"
+EspeonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/espeon.asm"
+UmbreonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/umbreon.asm"
+MurkrowPokedexEntry:: INCLUDE "data/pokemon/dex_entries/murkrow.asm"
+SlowkingPokedexEntry:: INCLUDE "data/pokemon/dex_entries/slowking.asm"
+MisdreavusPokedexEntry:: INCLUDE "data/pokemon/dex_entries/misdreavus.asm"
+UnownPokedexEntry:: INCLUDE "data/pokemon/dex_entries/unown.asm"
+WobbuffetPokedexEntry:: INCLUDE "data/pokemon/dex_entries/wobbuffet.asm"
+GirafarigPokedexEntry:: INCLUDE "data/pokemon/dex_entries/girafarig.asm"
+PinecoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pineco.asm"
+ForretressPokedexEntry:: INCLUDE "data/pokemon/dex_entries/forretress.asm"
+DunsparcePokedexEntry:: INCLUDE "data/pokemon/dex_entries/dunsparce.asm"
+GligarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/gligar.asm"
+SteelixPokedexEntry:: INCLUDE "data/pokemon/dex_entries/steelix.asm"
+SnubbullPokedexEntry:: INCLUDE "data/pokemon/dex_entries/snubbull.asm"
+GranbullPokedexEntry:: INCLUDE "data/pokemon/dex_entries/granbull.asm"
+QwilfishPokedexEntry:: INCLUDE "data/pokemon/dex_entries/qwilfish.asm"
+ScizorPokedexEntry:: INCLUDE "data/pokemon/dex_entries/scizor.asm"
+ShucklePokedexEntry:: INCLUDE "data/pokemon/dex_entries/shuckle.asm"
+HeracrossPokedexEntry:: INCLUDE "data/pokemon/dex_entries/heracross.asm"
+SneaselPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sneasel.asm"
+TeddiursaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/teddiursa.asm"
+UrsaringPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ursaring.asm"
+SlugmaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/slugma.asm"
+MagcargoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/magcargo.asm"
+SwinubPokedexEntry:: INCLUDE "data/pokemon/dex_entries/swinub.asm"
+PiloswinePokedexEntry:: INCLUDE "data/pokemon/dex_entries/piloswine.asm"
+CorsolaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/corsola.asm"
+RemoraidPokedexEntry:: INCLUDE "data/pokemon/dex_entries/remoraid.asm"
+OctilleryPokedexEntry:: INCLUDE "data/pokemon/dex_entries/octillery.asm"
+DelibirdPokedexEntry:: INCLUDE "data/pokemon/dex_entries/delibird.asm"
+MantinePokedexEntry:: INCLUDE "data/pokemon/dex_entries/mantine.asm"
+SkarmoryPokedexEntry:: INCLUDE "data/pokemon/dex_entries/skarmory.asm"
+HoundourPokedexEntry:: INCLUDE "data/pokemon/dex_entries/houndour.asm"
+HoundoomPokedexEntry:: INCLUDE "data/pokemon/dex_entries/houndoom.asm"
+KingdraPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kingdra.asm"
+PhanpyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/phanpy.asm"
+DonphanPokedexEntry:: INCLUDE "data/pokemon/dex_entries/donphan.asm"
+Porygon2PokedexEntry:: INCLUDE "data/pokemon/dex_entries/porygon2.asm"
+StantlerPokedexEntry:: INCLUDE "data/pokemon/dex_entries/stantler.asm"
+SmearglePokedexEntry:: INCLUDE "data/pokemon/dex_entries/smeargle.asm"
+TyroguePokedexEntry:: INCLUDE "data/pokemon/dex_entries/tyrogue.asm"
+HitmontopPokedexEntry:: INCLUDE "data/pokemon/dex_entries/hitmontop.asm"
+SmoochumPokedexEntry:: INCLUDE "data/pokemon/dex_entries/smoochum.asm"
+ElekidPokedexEntry:: INCLUDE "data/pokemon/dex_entries/elekid.asm"
+MagbyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/magby.asm"
+MiltankPokedexEntry:: INCLUDE "data/pokemon/dex_entries/miltank.asm"
+BlisseyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/blissey.asm"
+RaikouPokedexEntry:: INCLUDE "data/pokemon/dex_entries/raikou.asm"
+EnteiPokedexEntry:: INCLUDE "data/pokemon/dex_entries/entei.asm"
+SuicunePokedexEntry:: INCLUDE "data/pokemon/dex_entries/suicune.asm"
+LarvitarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/larvitar.asm"
+PupitarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pupitar.asm"
+TyranitarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/tyranitar.asm"
+LugiaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/lugia.asm"
+HoOhPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ho_oh.asm"
+CelebiPokedexEntry:: INCLUDE "data/pokemon/dex_entries/celebi.asm"
diff --git a/data/pokedex/entries/abra.asm b/data/pokemon/dex_entries/abra.asm
index be3b263cd..be3b263cd 100644
--- a/data/pokedex/entries/abra.asm
+++ b/data/pokemon/dex_entries/abra.asm
diff --git a/data/pokedex/entries/aerodactyl.asm b/data/pokemon/dex_entries/aerodactyl.asm
index d6189500b..d6189500b 100644
--- a/data/pokedex/entries/aerodactyl.asm
+++ b/data/pokemon/dex_entries/aerodactyl.asm
diff --git a/data/pokedex/entries/aipom.asm b/data/pokemon/dex_entries/aipom.asm
index 3fadb9169..3fadb9169 100644
--- a/data/pokedex/entries/aipom.asm
+++ b/data/pokemon/dex_entries/aipom.asm
diff --git a/data/pokedex/entries/alakazam.asm b/data/pokemon/dex_entries/alakazam.asm
index 1d34fa1f7..1d34fa1f7 100644
--- a/data/pokedex/entries/alakazam.asm
+++ b/data/pokemon/dex_entries/alakazam.asm
diff --git a/data/pokedex/entries/ampharos.asm b/data/pokemon/dex_entries/ampharos.asm
index 1f48fe322..1f48fe322 100644
--- a/data/pokedex/entries/ampharos.asm
+++ b/data/pokemon/dex_entries/ampharos.asm
diff --git a/data/pokedex/entries/arbok.asm b/data/pokemon/dex_entries/arbok.asm
index c5d5b7704..c5d5b7704 100644
--- a/data/pokedex/entries/arbok.asm
+++ b/data/pokemon/dex_entries/arbok.asm
diff --git a/data/pokedex/entries/arcanine.asm b/data/pokemon/dex_entries/arcanine.asm
index e319bcb6a..e319bcb6a 100644
--- a/data/pokedex/entries/arcanine.asm
+++ b/data/pokemon/dex_entries/arcanine.asm
diff --git a/data/pokedex/entries/ariados.asm b/data/pokemon/dex_entries/ariados.asm
index a27d13fef..a27d13fef 100644
--- a/data/pokedex/entries/ariados.asm
+++ b/data/pokemon/dex_entries/ariados.asm
diff --git a/data/pokedex/entries/articuno.asm b/data/pokemon/dex_entries/articuno.asm
index 92b297d28..92b297d28 100644
--- a/data/pokedex/entries/articuno.asm
+++ b/data/pokemon/dex_entries/articuno.asm
diff --git a/data/pokedex/entries/azumarill.asm b/data/pokemon/dex_entries/azumarill.asm
index bdbc83d1d..bdbc83d1d 100644
--- a/data/pokedex/entries/azumarill.asm
+++ b/data/pokemon/dex_entries/azumarill.asm
diff --git a/data/pokedex/entries/bayleef.asm b/data/pokemon/dex_entries/bayleef.asm
index ac66dccd5..ac66dccd5 100644
--- a/data/pokedex/entries/bayleef.asm
+++ b/data/pokemon/dex_entries/bayleef.asm
diff --git a/data/pokedex/entries/beedrill.asm b/data/pokemon/dex_entries/beedrill.asm
index 505396ca1..505396ca1 100644
--- a/data/pokedex/entries/beedrill.asm
+++ b/data/pokemon/dex_entries/beedrill.asm
diff --git a/data/pokedex/entries/bellossom.asm b/data/pokemon/dex_entries/bellossom.asm
index 0d13ed65d..0d13ed65d 100644
--- a/data/pokedex/entries/bellossom.asm
+++ b/data/pokemon/dex_entries/bellossom.asm
diff --git a/data/pokedex/entries/bellsprout.asm b/data/pokemon/dex_entries/bellsprout.asm
index fcd42c125..fcd42c125 100644
--- a/data/pokedex/entries/bellsprout.asm
+++ b/data/pokemon/dex_entries/bellsprout.asm
diff --git a/data/pokedex/entries/blastoise.asm b/data/pokemon/dex_entries/blastoise.asm
index ea2a18d05..ea2a18d05 100644
--- a/data/pokedex/entries/blastoise.asm
+++ b/data/pokemon/dex_entries/blastoise.asm
diff --git a/data/pokedex/entries/blissey.asm b/data/pokemon/dex_entries/blissey.asm
index 10151a398..10151a398 100644
--- a/data/pokedex/entries/blissey.asm
+++ b/data/pokemon/dex_entries/blissey.asm
diff --git a/data/pokedex/entries/bulbasaur.asm b/data/pokemon/dex_entries/bulbasaur.asm
index fdfe39c8c..fdfe39c8c 100644
--- a/data/pokedex/entries/bulbasaur.asm
+++ b/data/pokemon/dex_entries/bulbasaur.asm
diff --git a/data/pokedex/entries/butterfree.asm b/data/pokemon/dex_entries/butterfree.asm
index edf9e2599..edf9e2599 100644
--- a/data/pokedex/entries/butterfree.asm
+++ b/data/pokemon/dex_entries/butterfree.asm
diff --git a/data/pokedex/entries/caterpie.asm b/data/pokemon/dex_entries/caterpie.asm
index 940aa014f..940aa014f 100644
--- a/data/pokedex/entries/caterpie.asm
+++ b/data/pokemon/dex_entries/caterpie.asm
diff --git a/data/pokedex/entries/celebi.asm b/data/pokemon/dex_entries/celebi.asm
index 3922d1749..3922d1749 100644
--- a/data/pokedex/entries/celebi.asm
+++ b/data/pokemon/dex_entries/celebi.asm
diff --git a/data/pokedex/entries/chansey.asm b/data/pokemon/dex_entries/chansey.asm
index fd45cf121..fd45cf121 100644
--- a/data/pokedex/entries/chansey.asm
+++ b/data/pokemon/dex_entries/chansey.asm
diff --git a/data/pokedex/entries/charizard.asm b/data/pokemon/dex_entries/charizard.asm
index 53a542fb5..53a542fb5 100644
--- a/data/pokedex/entries/charizard.asm
+++ b/data/pokemon/dex_entries/charizard.asm
diff --git a/data/pokedex/entries/charmander.asm b/data/pokemon/dex_entries/charmander.asm
index a89b138f8..a89b138f8 100644
--- a/data/pokedex/entries/charmander.asm
+++ b/data/pokemon/dex_entries/charmander.asm
diff --git a/data/pokedex/entries/charmeleon.asm b/data/pokemon/dex_entries/charmeleon.asm
index 2891764c3..2891764c3 100644
--- a/data/pokedex/entries/charmeleon.asm
+++ b/data/pokemon/dex_entries/charmeleon.asm
diff --git a/data/pokedex/entries/chikorita.asm b/data/pokemon/dex_entries/chikorita.asm
index 3ba17e1f8..3ba17e1f8 100644
--- a/data/pokedex/entries/chikorita.asm
+++ b/data/pokemon/dex_entries/chikorita.asm
diff --git a/data/pokedex/entries/chinchou.asm b/data/pokemon/dex_entries/chinchou.asm
index 22d887859..22d887859 100644
--- a/data/pokedex/entries/chinchou.asm
+++ b/data/pokemon/dex_entries/chinchou.asm
diff --git a/data/pokedex/entries/clefable.asm b/data/pokemon/dex_entries/clefable.asm
index 240d70eb5..240d70eb5 100644
--- a/data/pokedex/entries/clefable.asm
+++ b/data/pokemon/dex_entries/clefable.asm
diff --git a/data/pokedex/entries/clefairy.asm b/data/pokemon/dex_entries/clefairy.asm
index b5973b21a..b5973b21a 100644
--- a/data/pokedex/entries/clefairy.asm
+++ b/data/pokemon/dex_entries/clefairy.asm
diff --git a/data/pokedex/entries/cleffa.asm b/data/pokemon/dex_entries/cleffa.asm
index 897bb2501..897bb2501 100644
--- a/data/pokedex/entries/cleffa.asm
+++ b/data/pokemon/dex_entries/cleffa.asm
diff --git a/data/pokedex/entries/cloyster.asm b/data/pokemon/dex_entries/cloyster.asm
index b1eaf80b9..b1eaf80b9 100644
--- a/data/pokedex/entries/cloyster.asm
+++ b/data/pokemon/dex_entries/cloyster.asm
diff --git a/data/pokedex/entries/corsola.asm b/data/pokemon/dex_entries/corsola.asm
index 52fbd0c44..52fbd0c44 100644
--- a/data/pokedex/entries/corsola.asm
+++ b/data/pokemon/dex_entries/corsola.asm
diff --git a/data/pokedex/entries/crobat.asm b/data/pokemon/dex_entries/crobat.asm
index 107683110..107683110 100644
--- a/data/pokedex/entries/crobat.asm
+++ b/data/pokemon/dex_entries/crobat.asm
diff --git a/data/pokedex/entries/croconaw.asm b/data/pokemon/dex_entries/croconaw.asm
index 0edcf80cc..0edcf80cc 100644
--- a/data/pokedex/entries/croconaw.asm
+++ b/data/pokemon/dex_entries/croconaw.asm
diff --git a/data/pokedex/entries/cubone.asm b/data/pokemon/dex_entries/cubone.asm
index 911377864..911377864 100644
--- a/data/pokedex/entries/cubone.asm
+++ b/data/pokemon/dex_entries/cubone.asm
diff --git a/data/pokedex/entries/cyndaquil.asm b/data/pokemon/dex_entries/cyndaquil.asm
index 47329d37f..47329d37f 100644
--- a/data/pokedex/entries/cyndaquil.asm
+++ b/data/pokemon/dex_entries/cyndaquil.asm
diff --git a/data/pokedex/entries/delibird.asm b/data/pokemon/dex_entries/delibird.asm
index 2c998d8be..2c998d8be 100644
--- a/data/pokedex/entries/delibird.asm
+++ b/data/pokemon/dex_entries/delibird.asm
diff --git a/data/pokedex/entries/dewgong.asm b/data/pokemon/dex_entries/dewgong.asm
index a3ff9b6f5..a3ff9b6f5 100644
--- a/data/pokedex/entries/dewgong.asm
+++ b/data/pokemon/dex_entries/dewgong.asm
diff --git a/data/pokedex/entries/diglett.asm b/data/pokemon/dex_entries/diglett.asm
index 469d9311d..469d9311d 100644
--- a/data/pokedex/entries/diglett.asm
+++ b/data/pokemon/dex_entries/diglett.asm
diff --git a/data/pokedex/entries/ditto.asm b/data/pokemon/dex_entries/ditto.asm
index 5a838b5b8..5a838b5b8 100644
--- a/data/pokedex/entries/ditto.asm
+++ b/data/pokemon/dex_entries/ditto.asm
diff --git a/data/pokedex/entries/dodrio.asm b/data/pokemon/dex_entries/dodrio.asm
index ef495b99b..ef495b99b 100644
--- a/data/pokedex/entries/dodrio.asm
+++ b/data/pokemon/dex_entries/dodrio.asm
diff --git a/data/pokedex/entries/doduo.asm b/data/pokemon/dex_entries/doduo.asm
index 124469457..124469457 100644
--- a/data/pokedex/entries/doduo.asm
+++ b/data/pokemon/dex_entries/doduo.asm
diff --git a/data/pokedex/entries/donphan.asm b/data/pokemon/dex_entries/donphan.asm
index 4dc489938..4dc489938 100644
--- a/data/pokedex/entries/donphan.asm
+++ b/data/pokemon/dex_entries/donphan.asm
diff --git a/data/pokedex/entries/dragonair.asm b/data/pokemon/dex_entries/dragonair.asm
index cef4f8f29..cef4f8f29 100644
--- a/data/pokedex/entries/dragonair.asm
+++ b/data/pokemon/dex_entries/dragonair.asm
diff --git a/data/pokedex/entries/dragonite.asm b/data/pokemon/dex_entries/dragonite.asm
index bbbc6cff0..bbbc6cff0 100644
--- a/data/pokedex/entries/dragonite.asm
+++ b/data/pokemon/dex_entries/dragonite.asm
diff --git a/data/pokedex/entries/dratini.asm b/data/pokemon/dex_entries/dratini.asm
index ef16aa20c..ef16aa20c 100644
--- a/data/pokedex/entries/dratini.asm
+++ b/data/pokemon/dex_entries/dratini.asm
diff --git a/data/pokedex/entries/drowzee.asm b/data/pokemon/dex_entries/drowzee.asm
index 34ae54435..34ae54435 100644
--- a/data/pokedex/entries/drowzee.asm
+++ b/data/pokemon/dex_entries/drowzee.asm
diff --git a/data/pokedex/entries/dugtrio.asm b/data/pokemon/dex_entries/dugtrio.asm
index 829e2aa09..829e2aa09 100644
--- a/data/pokedex/entries/dugtrio.asm
+++ b/data/pokemon/dex_entries/dugtrio.asm
diff --git a/data/pokedex/entries/dunsparce.asm b/data/pokemon/dex_entries/dunsparce.asm
index 7a9d812f3..7a9d812f3 100644
--- a/data/pokedex/entries/dunsparce.asm
+++ b/data/pokemon/dex_entries/dunsparce.asm
diff --git a/data/pokedex/entries/eevee.asm b/data/pokemon/dex_entries/eevee.asm
index 3081a5829..3081a5829 100644
--- a/data/pokedex/entries/eevee.asm
+++ b/data/pokemon/dex_entries/eevee.asm
diff --git a/data/pokedex/entries/ekans.asm b/data/pokemon/dex_entries/ekans.asm
index 23faa4854..23faa4854 100644
--- a/data/pokedex/entries/ekans.asm
+++ b/data/pokemon/dex_entries/ekans.asm
diff --git a/data/pokedex/entries/electabuzz.asm b/data/pokemon/dex_entries/electabuzz.asm
index e6bf15587..e6bf15587 100644
--- a/data/pokedex/entries/electabuzz.asm
+++ b/data/pokemon/dex_entries/electabuzz.asm
diff --git a/data/pokedex/entries/electrode.asm b/data/pokemon/dex_entries/electrode.asm
index 48d523c69..48d523c69 100644
--- a/data/pokedex/entries/electrode.asm
+++ b/data/pokemon/dex_entries/electrode.asm
diff --git a/data/pokedex/entries/elekid.asm b/data/pokemon/dex_entries/elekid.asm
index 6a046bda4..6a046bda4 100644
--- a/data/pokedex/entries/elekid.asm
+++ b/data/pokemon/dex_entries/elekid.asm
diff --git a/data/pokedex/entries/entei.asm b/data/pokemon/dex_entries/entei.asm
index 3784a898c..3784a898c 100644
--- a/data/pokedex/entries/entei.asm
+++ b/data/pokemon/dex_entries/entei.asm
diff --git a/data/pokedex/entries/espeon.asm b/data/pokemon/dex_entries/espeon.asm
index 059b01fbe..059b01fbe 100644
--- a/data/pokedex/entries/espeon.asm
+++ b/data/pokemon/dex_entries/espeon.asm
diff --git a/data/pokedex/entries/exeggcute.asm b/data/pokemon/dex_entries/exeggcute.asm
index 01453955e..01453955e 100644
--- a/data/pokedex/entries/exeggcute.asm
+++ b/data/pokemon/dex_entries/exeggcute.asm
diff --git a/data/pokedex/entries/exeggutor.asm b/data/pokemon/dex_entries/exeggutor.asm
index abefffd69..abefffd69 100644
--- a/data/pokedex/entries/exeggutor.asm
+++ b/data/pokemon/dex_entries/exeggutor.asm
diff --git a/data/pokedex/entries/farfetch_d.asm b/data/pokemon/dex_entries/farfetch_d.asm
index c9e756a6a..c9e756a6a 100644
--- a/data/pokedex/entries/farfetch_d.asm
+++ b/data/pokemon/dex_entries/farfetch_d.asm
diff --git a/data/pokedex/entries/fearow.asm b/data/pokemon/dex_entries/fearow.asm
index 90de6a612..90de6a612 100644
--- a/data/pokedex/entries/fearow.asm
+++ b/data/pokemon/dex_entries/fearow.asm
diff --git a/data/pokedex/entries/feraligatr.asm b/data/pokemon/dex_entries/feraligatr.asm
index cb3672c92..cb3672c92 100644
--- a/data/pokedex/entries/feraligatr.asm
+++ b/data/pokemon/dex_entries/feraligatr.asm
diff --git a/data/pokedex/entries/flaaffy.asm b/data/pokemon/dex_entries/flaaffy.asm
index 04bcc0668..04bcc0668 100644
--- a/data/pokedex/entries/flaaffy.asm
+++ b/data/pokemon/dex_entries/flaaffy.asm
diff --git a/data/pokedex/entries/flareon.asm b/data/pokemon/dex_entries/flareon.asm
index ba3e0399d..ba3e0399d 100644
--- a/data/pokedex/entries/flareon.asm
+++ b/data/pokemon/dex_entries/flareon.asm
diff --git a/data/pokedex/entries/forretress.asm b/data/pokemon/dex_entries/forretress.asm
index 8644b4b39..8644b4b39 100644
--- a/data/pokedex/entries/forretress.asm
+++ b/data/pokemon/dex_entries/forretress.asm
diff --git a/data/pokedex/entries/furret.asm b/data/pokemon/dex_entries/furret.asm
index 653a3dead..653a3dead 100644
--- a/data/pokedex/entries/furret.asm
+++ b/data/pokemon/dex_entries/furret.asm
diff --git a/data/pokedex/entries/gastly.asm b/data/pokemon/dex_entries/gastly.asm
index db7f6d57d..db7f6d57d 100644
--- a/data/pokedex/entries/gastly.asm
+++ b/data/pokemon/dex_entries/gastly.asm
diff --git a/data/pokedex/entries/gengar.asm b/data/pokemon/dex_entries/gengar.asm
index e9650fb39..e9650fb39 100644
--- a/data/pokedex/entries/gengar.asm
+++ b/data/pokemon/dex_entries/gengar.asm
diff --git a/data/pokedex/entries/geodude.asm b/data/pokemon/dex_entries/geodude.asm
index 389ce042a..389ce042a 100644
--- a/data/pokedex/entries/geodude.asm
+++ b/data/pokemon/dex_entries/geodude.asm
diff --git a/data/pokedex/entries/girafarig.asm b/data/pokemon/dex_entries/girafarig.asm
index 527aa9807..527aa9807 100644
--- a/data/pokedex/entries/girafarig.asm
+++ b/data/pokemon/dex_entries/girafarig.asm
diff --git a/data/pokedex/entries/gligar.asm b/data/pokemon/dex_entries/gligar.asm
index 43c4c95ce..43c4c95ce 100644
--- a/data/pokedex/entries/gligar.asm
+++ b/data/pokemon/dex_entries/gligar.asm
diff --git a/data/pokedex/entries/gloom.asm b/data/pokemon/dex_entries/gloom.asm
index 0552a8d0c..0552a8d0c 100644
--- a/data/pokedex/entries/gloom.asm
+++ b/data/pokemon/dex_entries/gloom.asm
diff --git a/data/pokedex/entries/golbat.asm b/data/pokemon/dex_entries/golbat.asm
index 434108bf4..434108bf4 100644
--- a/data/pokedex/entries/golbat.asm
+++ b/data/pokemon/dex_entries/golbat.asm
diff --git a/data/pokedex/entries/goldeen.asm b/data/pokemon/dex_entries/goldeen.asm
index 101edf434..101edf434 100644
--- a/data/pokedex/entries/goldeen.asm
+++ b/data/pokemon/dex_entries/goldeen.asm
diff --git a/data/pokedex/entries/golduck.asm b/data/pokemon/dex_entries/golduck.asm
index b38cfd2dc..b38cfd2dc 100644
--- a/data/pokedex/entries/golduck.asm
+++ b/data/pokemon/dex_entries/golduck.asm
diff --git a/data/pokedex/entries/golem.asm b/data/pokemon/dex_entries/golem.asm
index dbb5a8e3d..dbb5a8e3d 100644
--- a/data/pokedex/entries/golem.asm
+++ b/data/pokemon/dex_entries/golem.asm
diff --git a/data/pokedex/entries/granbull.asm b/data/pokemon/dex_entries/granbull.asm
index 15f3e194c..15f3e194c 100644
--- a/data/pokedex/entries/granbull.asm
+++ b/data/pokemon/dex_entries/granbull.asm
diff --git a/data/pokedex/entries/graveler.asm b/data/pokemon/dex_entries/graveler.asm
index 3bf04148c..3bf04148c 100644
--- a/data/pokedex/entries/graveler.asm
+++ b/data/pokemon/dex_entries/graveler.asm
diff --git a/data/pokedex/entries/grimer.asm b/data/pokemon/dex_entries/grimer.asm
index bda09cf94..bda09cf94 100644
--- a/data/pokedex/entries/grimer.asm
+++ b/data/pokemon/dex_entries/grimer.asm
diff --git a/data/pokedex/entries/growlithe.asm b/data/pokemon/dex_entries/growlithe.asm
index cd261d886..cd261d886 100644
--- a/data/pokedex/entries/growlithe.asm
+++ b/data/pokemon/dex_entries/growlithe.asm
diff --git a/data/pokedex/entries/gyarados.asm b/data/pokemon/dex_entries/gyarados.asm
index 767380680..767380680 100644
--- a/data/pokedex/entries/gyarados.asm
+++ b/data/pokemon/dex_entries/gyarados.asm
diff --git a/data/pokedex/entries/haunter.asm b/data/pokemon/dex_entries/haunter.asm
index 6efe4b15c..6efe4b15c 100644
--- a/data/pokedex/entries/haunter.asm
+++ b/data/pokemon/dex_entries/haunter.asm
diff --git a/data/pokedex/entries/heracross.asm b/data/pokemon/dex_entries/heracross.asm
index ed709b526..ed709b526 100644
--- a/data/pokedex/entries/heracross.asm
+++ b/data/pokemon/dex_entries/heracross.asm
diff --git a/data/pokedex/entries/hitmonchan.asm b/data/pokemon/dex_entries/hitmonchan.asm
index e5686b1a5..e5686b1a5 100644
--- a/data/pokedex/entries/hitmonchan.asm
+++ b/data/pokemon/dex_entries/hitmonchan.asm
diff --git a/data/pokedex/entries/hitmonlee.asm b/data/pokemon/dex_entries/hitmonlee.asm
index 0215d3bdc..0215d3bdc 100644
--- a/data/pokedex/entries/hitmonlee.asm
+++ b/data/pokemon/dex_entries/hitmonlee.asm
diff --git a/data/pokedex/entries/hitmontop.asm b/data/pokemon/dex_entries/hitmontop.asm
index 14175ec8a..14175ec8a 100644
--- a/data/pokedex/entries/hitmontop.asm
+++ b/data/pokemon/dex_entries/hitmontop.asm
diff --git a/data/pokedex/entries/ho_oh.asm b/data/pokemon/dex_entries/ho_oh.asm
index 1d74cd058..1d74cd058 100644
--- a/data/pokedex/entries/ho_oh.asm
+++ b/data/pokemon/dex_entries/ho_oh.asm
diff --git a/data/pokedex/entries/hoothoot.asm b/data/pokemon/dex_entries/hoothoot.asm
index 88039eea8..88039eea8 100644
--- a/data/pokedex/entries/hoothoot.asm
+++ b/data/pokemon/dex_entries/hoothoot.asm
diff --git a/data/pokedex/entries/hoppip.asm b/data/pokemon/dex_entries/hoppip.asm
index 734ddc766..734ddc766 100644
--- a/data/pokedex/entries/hoppip.asm
+++ b/data/pokemon/dex_entries/hoppip.asm
diff --git a/data/pokedex/entries/horsea.asm b/data/pokemon/dex_entries/horsea.asm
index dd50057e7..dd50057e7 100644
--- a/data/pokedex/entries/horsea.asm
+++ b/data/pokemon/dex_entries/horsea.asm
diff --git a/data/pokedex/entries/houndoom.asm b/data/pokemon/dex_entries/houndoom.asm
index 6a21602f3..6a21602f3 100644
--- a/data/pokedex/entries/houndoom.asm
+++ b/data/pokemon/dex_entries/houndoom.asm
diff --git a/data/pokedex/entries/houndour.asm b/data/pokemon/dex_entries/houndour.asm
index 5fa89fe85..5fa89fe85 100644
--- a/data/pokedex/entries/houndour.asm
+++ b/data/pokemon/dex_entries/houndour.asm
diff --git a/data/pokedex/entries/hypno.asm b/data/pokemon/dex_entries/hypno.asm
index 2309a6bfa..2309a6bfa 100644
--- a/data/pokedex/entries/hypno.asm
+++ b/data/pokemon/dex_entries/hypno.asm
diff --git a/data/pokedex/entries/igglybuff.asm b/data/pokemon/dex_entries/igglybuff.asm
index aa1c1cabf..aa1c1cabf 100644
--- a/data/pokedex/entries/igglybuff.asm
+++ b/data/pokemon/dex_entries/igglybuff.asm
diff --git a/data/pokedex/entries/ivysaur.asm b/data/pokemon/dex_entries/ivysaur.asm
index 66d16d323..66d16d323 100644
--- a/data/pokedex/entries/ivysaur.asm
+++ b/data/pokemon/dex_entries/ivysaur.asm
diff --git a/data/pokedex/entries/jigglypuff.asm b/data/pokemon/dex_entries/jigglypuff.asm
index 01a3b4480..01a3b4480 100644
--- a/data/pokedex/entries/jigglypuff.asm
+++ b/data/pokemon/dex_entries/jigglypuff.asm
diff --git a/data/pokedex/entries/jolteon.asm b/data/pokemon/dex_entries/jolteon.asm
index 9b9149d9a..9b9149d9a 100644
--- a/data/pokedex/entries/jolteon.asm
+++ b/data/pokemon/dex_entries/jolteon.asm
diff --git a/data/pokedex/entries/jumpluff.asm b/data/pokemon/dex_entries/jumpluff.asm
index 0aade0b75..0aade0b75 100644
--- a/data/pokedex/entries/jumpluff.asm
+++ b/data/pokemon/dex_entries/jumpluff.asm
diff --git a/data/pokedex/entries/jynx.asm b/data/pokemon/dex_entries/jynx.asm
index b4b9eac8c..b4b9eac8c 100644
--- a/data/pokedex/entries/jynx.asm
+++ b/data/pokemon/dex_entries/jynx.asm
diff --git a/data/pokedex/entries/kabuto.asm b/data/pokemon/dex_entries/kabuto.asm
index 9231fb9be..9231fb9be 100644
--- a/data/pokedex/entries/kabuto.asm
+++ b/data/pokemon/dex_entries/kabuto.asm
diff --git a/data/pokedex/entries/kabutops.asm b/data/pokemon/dex_entries/kabutops.asm
index 8f5e1348b..8f5e1348b 100644
--- a/data/pokedex/entries/kabutops.asm
+++ b/data/pokemon/dex_entries/kabutops.asm
diff --git a/data/pokedex/entries/kadabra.asm b/data/pokemon/dex_entries/kadabra.asm
index 26226724f..26226724f 100644
--- a/data/pokedex/entries/kadabra.asm
+++ b/data/pokemon/dex_entries/kadabra.asm
diff --git a/data/pokedex/entries/kakuna.asm b/data/pokemon/dex_entries/kakuna.asm
index 469e14bf6..469e14bf6 100644
--- a/data/pokedex/entries/kakuna.asm
+++ b/data/pokemon/dex_entries/kakuna.asm
diff --git a/data/pokedex/entries/kangaskhan.asm b/data/pokemon/dex_entries/kangaskhan.asm
index ec2050845..ec2050845 100644
--- a/data/pokedex/entries/kangaskhan.asm
+++ b/data/pokemon/dex_entries/kangaskhan.asm
diff --git a/data/pokedex/entries/kingdra.asm b/data/pokemon/dex_entries/kingdra.asm
index 555601b51..555601b51 100644
--- a/data/pokedex/entries/kingdra.asm
+++ b/data/pokemon/dex_entries/kingdra.asm
diff --git a/data/pokedex/entries/kingler.asm b/data/pokemon/dex_entries/kingler.asm
index 25685d517..25685d517 100644
--- a/data/pokedex/entries/kingler.asm
+++ b/data/pokemon/dex_entries/kingler.asm
diff --git a/data/pokedex/entries/koffing.asm b/data/pokemon/dex_entries/koffing.asm
index 20bde8671..20bde8671 100644
--- a/data/pokedex/entries/koffing.asm
+++ b/data/pokemon/dex_entries/koffing.asm
diff --git a/data/pokedex/entries/krabby.asm b/data/pokemon/dex_entries/krabby.asm
index 2435cd64d..2435cd64d 100644
--- a/data/pokedex/entries/krabby.asm
+++ b/data/pokemon/dex_entries/krabby.asm
diff --git a/data/pokedex/entries/lanturn.asm b/data/pokemon/dex_entries/lanturn.asm
index 3aa2b5523..3aa2b5523 100644
--- a/data/pokedex/entries/lanturn.asm
+++ b/data/pokemon/dex_entries/lanturn.asm
diff --git a/data/pokedex/entries/lapras.asm b/data/pokemon/dex_entries/lapras.asm
index 550d6e12c..550d6e12c 100644
--- a/data/pokedex/entries/lapras.asm
+++ b/data/pokemon/dex_entries/lapras.asm
diff --git a/data/pokedex/entries/larvitar.asm b/data/pokemon/dex_entries/larvitar.asm
index 14ec08c7b..14ec08c7b 100644
--- a/data/pokedex/entries/larvitar.asm
+++ b/data/pokemon/dex_entries/larvitar.asm
diff --git a/data/pokedex/entries/ledian.asm b/data/pokemon/dex_entries/ledian.asm
index a112aa722..a112aa722 100644
--- a/data/pokedex/entries/ledian.asm
+++ b/data/pokemon/dex_entries/ledian.asm
diff --git a/data/pokedex/entries/ledyba.asm b/data/pokemon/dex_entries/ledyba.asm
index 1e62ab4b1..1e62ab4b1 100644
--- a/data/pokedex/entries/ledyba.asm
+++ b/data/pokemon/dex_entries/ledyba.asm
diff --git a/data/pokedex/entries/lickitung.asm b/data/pokemon/dex_entries/lickitung.asm
index 0003f14dc..0003f14dc 100644
--- a/data/pokedex/entries/lickitung.asm
+++ b/data/pokemon/dex_entries/lickitung.asm
diff --git a/data/pokedex/entries/lugia.asm b/data/pokemon/dex_entries/lugia.asm
index c15345300..c15345300 100644
--- a/data/pokedex/entries/lugia.asm
+++ b/data/pokemon/dex_entries/lugia.asm
diff --git a/data/pokedex/entries/machamp.asm b/data/pokemon/dex_entries/machamp.asm
index 0ff42bf5f..0ff42bf5f 100644
--- a/data/pokedex/entries/machamp.asm
+++ b/data/pokemon/dex_entries/machamp.asm
diff --git a/data/pokedex/entries/machoke.asm b/data/pokemon/dex_entries/machoke.asm
index 53523a832..53523a832 100644
--- a/data/pokedex/entries/machoke.asm
+++ b/data/pokemon/dex_entries/machoke.asm
diff --git a/data/pokedex/entries/machop.asm b/data/pokemon/dex_entries/machop.asm
index aba71bc04..aba71bc04 100644
--- a/data/pokedex/entries/machop.asm
+++ b/data/pokemon/dex_entries/machop.asm
diff --git a/data/pokedex/entries/magby.asm b/data/pokemon/dex_entries/magby.asm
index 53f9e1129..53f9e1129 100644
--- a/data/pokedex/entries/magby.asm
+++ b/data/pokemon/dex_entries/magby.asm
diff --git a/data/pokedex/entries/magcargo.asm b/data/pokemon/dex_entries/magcargo.asm
index 5f1122906..5f1122906 100644
--- a/data/pokedex/entries/magcargo.asm
+++ b/data/pokemon/dex_entries/magcargo.asm
diff --git a/data/pokedex/entries/magikarp.asm b/data/pokemon/dex_entries/magikarp.asm
index 765840899..765840899 100644
--- a/data/pokedex/entries/magikarp.asm
+++ b/data/pokemon/dex_entries/magikarp.asm
diff --git a/data/pokedex/entries/magmar.asm b/data/pokemon/dex_entries/magmar.asm
index 1bfa961f9..1bfa961f9 100644
--- a/data/pokedex/entries/magmar.asm
+++ b/data/pokemon/dex_entries/magmar.asm
diff --git a/data/pokedex/entries/magnemite.asm b/data/pokemon/dex_entries/magnemite.asm
index e7703e050..e7703e050 100644
--- a/data/pokedex/entries/magnemite.asm
+++ b/data/pokemon/dex_entries/magnemite.asm
diff --git a/data/pokedex/entries/magneton.asm b/data/pokemon/dex_entries/magneton.asm
index 115506ad6..115506ad6 100644
--- a/data/pokedex/entries/magneton.asm
+++ b/data/pokemon/dex_entries/magneton.asm
diff --git a/data/pokedex/entries/mankey.asm b/data/pokemon/dex_entries/mankey.asm
index 59dfc4919..59dfc4919 100644
--- a/data/pokedex/entries/mankey.asm
+++ b/data/pokemon/dex_entries/mankey.asm
diff --git a/data/pokedex/entries/mantine.asm b/data/pokemon/dex_entries/mantine.asm
index 880c4f179..880c4f179 100644
--- a/data/pokedex/entries/mantine.asm
+++ b/data/pokemon/dex_entries/mantine.asm
diff --git a/data/pokedex/entries/mareep.asm b/data/pokemon/dex_entries/mareep.asm
index 94f78ee31..94f78ee31 100644
--- a/data/pokedex/entries/mareep.asm
+++ b/data/pokemon/dex_entries/mareep.asm
diff --git a/data/pokedex/entries/marill.asm b/data/pokemon/dex_entries/marill.asm
index 6afbc2902..6afbc2902 100644
--- a/data/pokedex/entries/marill.asm
+++ b/data/pokemon/dex_entries/marill.asm
diff --git a/data/pokedex/entries/marowak.asm b/data/pokemon/dex_entries/marowak.asm
index 01baf04e3..01baf04e3 100644
--- a/data/pokedex/entries/marowak.asm
+++ b/data/pokemon/dex_entries/marowak.asm
diff --git a/data/pokedex/entries/meganium.asm b/data/pokemon/dex_entries/meganium.asm
index dead64ff5..dead64ff5 100644
--- a/data/pokedex/entries/meganium.asm
+++ b/data/pokemon/dex_entries/meganium.asm
diff --git a/data/pokedex/entries/meowth.asm b/data/pokemon/dex_entries/meowth.asm
index 9fe66977b..9fe66977b 100644
--- a/data/pokedex/entries/meowth.asm
+++ b/data/pokemon/dex_entries/meowth.asm
diff --git a/data/pokedex/entries/metapod.asm b/data/pokemon/dex_entries/metapod.asm
index b2c6b78b7..b2c6b78b7 100644
--- a/data/pokedex/entries/metapod.asm
+++ b/data/pokemon/dex_entries/metapod.asm
diff --git a/data/pokedex/entries/mew.asm b/data/pokemon/dex_entries/mew.asm
index 9da7f6a17..9da7f6a17 100644
--- a/data/pokedex/entries/mew.asm
+++ b/data/pokemon/dex_entries/mew.asm
diff --git a/data/pokedex/entries/mewtwo.asm b/data/pokemon/dex_entries/mewtwo.asm
index eb41ebb90..eb41ebb90 100644
--- a/data/pokedex/entries/mewtwo.asm
+++ b/data/pokemon/dex_entries/mewtwo.asm
diff --git a/data/pokedex/entries/miltank.asm b/data/pokemon/dex_entries/miltank.asm
index 1f85ef668..1f85ef668 100644
--- a/data/pokedex/entries/miltank.asm
+++ b/data/pokemon/dex_entries/miltank.asm
diff --git a/data/pokedex/entries/misdreavus.asm b/data/pokemon/dex_entries/misdreavus.asm
index c3f1b002a..c3f1b002a 100644
--- a/data/pokedex/entries/misdreavus.asm
+++ b/data/pokemon/dex_entries/misdreavus.asm
diff --git a/data/pokedex/entries/moltres.asm b/data/pokemon/dex_entries/moltres.asm
index f459d622e..f459d622e 100644
--- a/data/pokedex/entries/moltres.asm
+++ b/data/pokemon/dex_entries/moltres.asm
diff --git a/data/pokedex/entries/mr__mime.asm b/data/pokemon/dex_entries/mr__mime.asm
index dce25be67..dce25be67 100644
--- a/data/pokedex/entries/mr__mime.asm
+++ b/data/pokemon/dex_entries/mr__mime.asm
diff --git a/data/pokedex/entries/muk.asm b/data/pokemon/dex_entries/muk.asm
index 49512c99f..49512c99f 100644
--- a/data/pokedex/entries/muk.asm
+++ b/data/pokemon/dex_entries/muk.asm
diff --git a/data/pokedex/entries/murkrow.asm b/data/pokemon/dex_entries/murkrow.asm
index 6a0f42145..6a0f42145 100644
--- a/data/pokedex/entries/murkrow.asm
+++ b/data/pokemon/dex_entries/murkrow.asm
diff --git a/data/pokedex/entries/natu.asm b/data/pokemon/dex_entries/natu.asm
index 20958dbff..20958dbff 100644
--- a/data/pokedex/entries/natu.asm
+++ b/data/pokemon/dex_entries/natu.asm
diff --git a/data/pokedex/entries/nidoking.asm b/data/pokemon/dex_entries/nidoking.asm
index 97c203064..97c203064 100644
--- a/data/pokedex/entries/nidoking.asm
+++ b/data/pokemon/dex_entries/nidoking.asm
diff --git a/data/pokedex/entries/nidoqueen.asm b/data/pokemon/dex_entries/nidoqueen.asm
index c0f711eb4..c0f711eb4 100644
--- a/data/pokedex/entries/nidoqueen.asm
+++ b/data/pokemon/dex_entries/nidoqueen.asm
diff --git a/data/pokedex/entries/nidoran_f.asm b/data/pokemon/dex_entries/nidoran_f.asm
index 4e7299b0d..4e7299b0d 100644
--- a/data/pokedex/entries/nidoran_f.asm
+++ b/data/pokemon/dex_entries/nidoran_f.asm
diff --git a/data/pokedex/entries/nidoran_m.asm b/data/pokemon/dex_entries/nidoran_m.asm
index 8970afc36..8970afc36 100644
--- a/data/pokedex/entries/nidoran_m.asm
+++ b/data/pokemon/dex_entries/nidoran_m.asm
diff --git a/data/pokedex/entries/nidorina.asm b/data/pokemon/dex_entries/nidorina.asm
index 93c1e164d..93c1e164d 100644
--- a/data/pokedex/entries/nidorina.asm
+++ b/data/pokemon/dex_entries/nidorina.asm
diff --git a/data/pokedex/entries/nidorino.asm b/data/pokemon/dex_entries/nidorino.asm
index 6b1403ad2..6b1403ad2 100644
--- a/data/pokedex/entries/nidorino.asm
+++ b/data/pokemon/dex_entries/nidorino.asm
diff --git a/data/pokedex/entries/ninetales.asm b/data/pokemon/dex_entries/ninetales.asm
index fd3a66ffb..fd3a66ffb 100644
--- a/data/pokedex/entries/ninetales.asm
+++ b/data/pokemon/dex_entries/ninetales.asm
diff --git a/data/pokedex/entries/noctowl.asm b/data/pokemon/dex_entries/noctowl.asm
index b939cfe05..b939cfe05 100644
--- a/data/pokedex/entries/noctowl.asm
+++ b/data/pokemon/dex_entries/noctowl.asm
diff --git a/data/pokedex/entries/octillery.asm b/data/pokemon/dex_entries/octillery.asm
index 902c1bf9a..902c1bf9a 100644
--- a/data/pokedex/entries/octillery.asm
+++ b/data/pokemon/dex_entries/octillery.asm
diff --git a/data/pokedex/entries/oddish.asm b/data/pokemon/dex_entries/oddish.asm
index 84560c113..84560c113 100644
--- a/data/pokedex/entries/oddish.asm
+++ b/data/pokemon/dex_entries/oddish.asm
diff --git a/data/pokedex/entries/omanyte.asm b/data/pokemon/dex_entries/omanyte.asm
index 9f7948fe0..9f7948fe0 100644
--- a/data/pokedex/entries/omanyte.asm
+++ b/data/pokemon/dex_entries/omanyte.asm
diff --git a/data/pokedex/entries/omastar.asm b/data/pokemon/dex_entries/omastar.asm
index 65ba92356..65ba92356 100644
--- a/data/pokedex/entries/omastar.asm
+++ b/data/pokemon/dex_entries/omastar.asm
diff --git a/data/pokedex/entries/onix.asm b/data/pokemon/dex_entries/onix.asm
index f0f88fcff..f0f88fcff 100644
--- a/data/pokedex/entries/onix.asm
+++ b/data/pokemon/dex_entries/onix.asm
diff --git a/data/pokedex/entries/paras.asm b/data/pokemon/dex_entries/paras.asm
index 152e1fcc0..152e1fcc0 100644
--- a/data/pokedex/entries/paras.asm
+++ b/data/pokemon/dex_entries/paras.asm
diff --git a/data/pokedex/entries/parasect.asm b/data/pokemon/dex_entries/parasect.asm
index bd912212e..bd912212e 100644
--- a/data/pokedex/entries/parasect.asm
+++ b/data/pokemon/dex_entries/parasect.asm
diff --git a/data/pokedex/entries/persian.asm b/data/pokemon/dex_entries/persian.asm
index 7ce74f6f8..7ce74f6f8 100644
--- a/data/pokedex/entries/persian.asm
+++ b/data/pokemon/dex_entries/persian.asm
diff --git a/data/pokedex/entries/phanpy.asm b/data/pokemon/dex_entries/phanpy.asm
index a7393e546..a7393e546 100644
--- a/data/pokedex/entries/phanpy.asm
+++ b/data/pokemon/dex_entries/phanpy.asm
diff --git a/data/pokedex/entries/pichu.asm b/data/pokemon/dex_entries/pichu.asm
index b31976aaf..b31976aaf 100644
--- a/data/pokedex/entries/pichu.asm
+++ b/data/pokemon/dex_entries/pichu.asm
diff --git a/data/pokedex/entries/pidgeot.asm b/data/pokemon/dex_entries/pidgeot.asm
index 16a877427..16a877427 100644
--- a/data/pokedex/entries/pidgeot.asm
+++ b/data/pokemon/dex_entries/pidgeot.asm
diff --git a/data/pokedex/entries/pidgeotto.asm b/data/pokemon/dex_entries/pidgeotto.asm
index 1ab6fde5c..1ab6fde5c 100644
--- a/data/pokedex/entries/pidgeotto.asm
+++ b/data/pokemon/dex_entries/pidgeotto.asm
diff --git a/data/pokedex/entries/pidgey.asm b/data/pokemon/dex_entries/pidgey.asm
index 491dfb9b9..491dfb9b9 100644
--- a/data/pokedex/entries/pidgey.asm
+++ b/data/pokemon/dex_entries/pidgey.asm
diff --git a/data/pokedex/entries/pikachu.asm b/data/pokemon/dex_entries/pikachu.asm
index 680e24673..680e24673 100644
--- a/data/pokedex/entries/pikachu.asm
+++ b/data/pokemon/dex_entries/pikachu.asm
diff --git a/data/pokedex/entries/piloswine.asm b/data/pokemon/dex_entries/piloswine.asm
index 326ea4503..326ea4503 100644
--- a/data/pokedex/entries/piloswine.asm
+++ b/data/pokemon/dex_entries/piloswine.asm
diff --git a/data/pokedex/entries/pineco.asm b/data/pokemon/dex_entries/pineco.asm
index 9781b094e..9781b094e 100644
--- a/data/pokedex/entries/pineco.asm
+++ b/data/pokemon/dex_entries/pineco.asm
diff --git a/data/pokedex/entries/pinsir.asm b/data/pokemon/dex_entries/pinsir.asm
index c236b3594..c236b3594 100644
--- a/data/pokedex/entries/pinsir.asm
+++ b/data/pokemon/dex_entries/pinsir.asm
diff --git a/data/pokedex/entries/politoed.asm b/data/pokemon/dex_entries/politoed.asm
index 0dea3d572..0dea3d572 100644
--- a/data/pokedex/entries/politoed.asm
+++ b/data/pokemon/dex_entries/politoed.asm
diff --git a/data/pokedex/entries/poliwag.asm b/data/pokemon/dex_entries/poliwag.asm
index d21677cc4..d21677cc4 100644
--- a/data/pokedex/entries/poliwag.asm
+++ b/data/pokemon/dex_entries/poliwag.asm
diff --git a/data/pokedex/entries/poliwhirl.asm b/data/pokemon/dex_entries/poliwhirl.asm
index 69a6ee206..69a6ee206 100644
--- a/data/pokedex/entries/poliwhirl.asm
+++ b/data/pokemon/dex_entries/poliwhirl.asm
diff --git a/data/pokedex/entries/poliwrath.asm b/data/pokemon/dex_entries/poliwrath.asm
index bb3e7dda5..bb3e7dda5 100644
--- a/data/pokedex/entries/poliwrath.asm
+++ b/data/pokemon/dex_entries/poliwrath.asm
diff --git a/data/pokedex/entries/ponyta.asm b/data/pokemon/dex_entries/ponyta.asm
index fa123cde1..fa123cde1 100644
--- a/data/pokedex/entries/ponyta.asm
+++ b/data/pokemon/dex_entries/ponyta.asm
diff --git a/data/pokedex/entries/porygon.asm b/data/pokemon/dex_entries/porygon.asm
index 9a73c9623..9a73c9623 100644
--- a/data/pokedex/entries/porygon.asm
+++ b/data/pokemon/dex_entries/porygon.asm
diff --git a/data/pokedex/entries/porygon2.asm b/data/pokemon/dex_entries/porygon2.asm
index 8591e0039..8591e0039 100644
--- a/data/pokedex/entries/porygon2.asm
+++ b/data/pokemon/dex_entries/porygon2.asm
diff --git a/data/pokedex/entries/primeape.asm b/data/pokemon/dex_entries/primeape.asm
index 7d7f211cc..7d7f211cc 100644
--- a/data/pokedex/entries/primeape.asm
+++ b/data/pokemon/dex_entries/primeape.asm
diff --git a/data/pokedex/entries/psyduck.asm b/data/pokemon/dex_entries/psyduck.asm
index 088b4ff76..088b4ff76 100644
--- a/data/pokedex/entries/psyduck.asm
+++ b/data/pokemon/dex_entries/psyduck.asm
diff --git a/data/pokedex/entries/pupitar.asm b/data/pokemon/dex_entries/pupitar.asm
index d35e457ad..d35e457ad 100644
--- a/data/pokedex/entries/pupitar.asm
+++ b/data/pokemon/dex_entries/pupitar.asm
diff --git a/data/pokedex/entries/quagsire.asm b/data/pokemon/dex_entries/quagsire.asm
index 053058d54..053058d54 100644
--- a/data/pokedex/entries/quagsire.asm
+++ b/data/pokemon/dex_entries/quagsire.asm
diff --git a/data/pokedex/entries/quilava.asm b/data/pokemon/dex_entries/quilava.asm
index aaf8069af..aaf8069af 100644
--- a/data/pokedex/entries/quilava.asm
+++ b/data/pokemon/dex_entries/quilava.asm
diff --git a/data/pokedex/entries/qwilfish.asm b/data/pokemon/dex_entries/qwilfish.asm
index d9529146f..d9529146f 100644
--- a/data/pokedex/entries/qwilfish.asm
+++ b/data/pokemon/dex_entries/qwilfish.asm
diff --git a/data/pokedex/entries/raichu.asm b/data/pokemon/dex_entries/raichu.asm
index 886aef283..886aef283 100644
--- a/data/pokedex/entries/raichu.asm
+++ b/data/pokemon/dex_entries/raichu.asm
diff --git a/data/pokedex/entries/raikou.asm b/data/pokemon/dex_entries/raikou.asm
index 315eb84ae..315eb84ae 100644
--- a/data/pokedex/entries/raikou.asm
+++ b/data/pokemon/dex_entries/raikou.asm
diff --git a/data/pokedex/entries/rapidash.asm b/data/pokemon/dex_entries/rapidash.asm
index ae98e2cb8..ae98e2cb8 100644
--- a/data/pokedex/entries/rapidash.asm
+++ b/data/pokemon/dex_entries/rapidash.asm
diff --git a/data/pokedex/entries/raticate.asm b/data/pokemon/dex_entries/raticate.asm
index f009c29aa..f009c29aa 100644
--- a/data/pokedex/entries/raticate.asm
+++ b/data/pokemon/dex_entries/raticate.asm
diff --git a/data/pokedex/entries/rattata.asm b/data/pokemon/dex_entries/rattata.asm
index 0a066eb74..0a066eb74 100644
--- a/data/pokedex/entries/rattata.asm
+++ b/data/pokemon/dex_entries/rattata.asm
diff --git a/data/pokedex/entries/remoraid.asm b/data/pokemon/dex_entries/remoraid.asm
index aaa6f1a49..aaa6f1a49 100644
--- a/data/pokedex/entries/remoraid.asm
+++ b/data/pokemon/dex_entries/remoraid.asm
diff --git a/data/pokedex/entries/rhydon.asm b/data/pokemon/dex_entries/rhydon.asm
index c820666b3..c820666b3 100644
--- a/data/pokedex/entries/rhydon.asm
+++ b/data/pokemon/dex_entries/rhydon.asm
diff --git a/data/pokedex/entries/rhyhorn.asm b/data/pokemon/dex_entries/rhyhorn.asm
index b2f26e204..b2f26e204 100644
--- a/data/pokedex/entries/rhyhorn.asm
+++ b/data/pokemon/dex_entries/rhyhorn.asm
diff --git a/data/pokedex/entries/sandshrew.asm b/data/pokemon/dex_entries/sandshrew.asm
index 2ef83f9c3..2ef83f9c3 100644
--- a/data/pokedex/entries/sandshrew.asm
+++ b/data/pokemon/dex_entries/sandshrew.asm
diff --git a/data/pokedex/entries/sandslash.asm b/data/pokemon/dex_entries/sandslash.asm
index fd2492f91..fd2492f91 100644
--- a/data/pokedex/entries/sandslash.asm
+++ b/data/pokemon/dex_entries/sandslash.asm
diff --git a/data/pokedex/entries/scizor.asm b/data/pokemon/dex_entries/scizor.asm
index a000a6586..a000a6586 100644
--- a/data/pokedex/entries/scizor.asm
+++ b/data/pokemon/dex_entries/scizor.asm
diff --git a/data/pokedex/entries/scyther.asm b/data/pokemon/dex_entries/scyther.asm
index ca47c46b6..ca47c46b6 100644
--- a/data/pokedex/entries/scyther.asm
+++ b/data/pokemon/dex_entries/scyther.asm
diff --git a/data/pokedex/entries/seadra.asm b/data/pokemon/dex_entries/seadra.asm
index 91731c64a..91731c64a 100644
--- a/data/pokedex/entries/seadra.asm
+++ b/data/pokemon/dex_entries/seadra.asm
diff --git a/data/pokedex/entries/seaking.asm b/data/pokemon/dex_entries/seaking.asm
index 0d7d1fe48..0d7d1fe48 100644
--- a/data/pokedex/entries/seaking.asm
+++ b/data/pokemon/dex_entries/seaking.asm
diff --git a/data/pokedex/entries/seel.asm b/data/pokemon/dex_entries/seel.asm
index 53d179097..53d179097 100644
--- a/data/pokedex/entries/seel.asm
+++ b/data/pokemon/dex_entries/seel.asm
diff --git a/data/pokedex/entries/sentret.asm b/data/pokemon/dex_entries/sentret.asm
index 9e70418c8..9e70418c8 100644
--- a/data/pokedex/entries/sentret.asm
+++ b/data/pokemon/dex_entries/sentret.asm
diff --git a/data/pokedex/entries/shellder.asm b/data/pokemon/dex_entries/shellder.asm
index 0c7553c43..0c7553c43 100644
--- a/data/pokedex/entries/shellder.asm
+++ b/data/pokemon/dex_entries/shellder.asm
diff --git a/data/pokedex/entries/shuckle.asm b/data/pokemon/dex_entries/shuckle.asm
index 3795942e3..3795942e3 100644
--- a/data/pokedex/entries/shuckle.asm
+++ b/data/pokemon/dex_entries/shuckle.asm
diff --git a/data/pokedex/entries/skarmory.asm b/data/pokemon/dex_entries/skarmory.asm
index 2558065af..2558065af 100644
--- a/data/pokedex/entries/skarmory.asm
+++ b/data/pokemon/dex_entries/skarmory.asm
diff --git a/data/pokedex/entries/skiploom.asm b/data/pokemon/dex_entries/skiploom.asm
index f6e62266c..f6e62266c 100644
--- a/data/pokedex/entries/skiploom.asm
+++ b/data/pokemon/dex_entries/skiploom.asm
diff --git a/data/pokedex/entries/slowbro.asm b/data/pokemon/dex_entries/slowbro.asm
index fdfb36e98..fdfb36e98 100644
--- a/data/pokedex/entries/slowbro.asm
+++ b/data/pokemon/dex_entries/slowbro.asm
diff --git a/data/pokedex/entries/slowking.asm b/data/pokemon/dex_entries/slowking.asm
index f52bdb1b7..f52bdb1b7 100644
--- a/data/pokedex/entries/slowking.asm
+++ b/data/pokemon/dex_entries/slowking.asm
diff --git a/data/pokedex/entries/slowpoke.asm b/data/pokemon/dex_entries/slowpoke.asm
index 2341758f8..2341758f8 100644
--- a/data/pokedex/entries/slowpoke.asm
+++ b/data/pokemon/dex_entries/slowpoke.asm
diff --git a/data/pokedex/entries/slugma.asm b/data/pokemon/dex_entries/slugma.asm
index ea1fc01f2..ea1fc01f2 100644
--- a/data/pokedex/entries/slugma.asm
+++ b/data/pokemon/dex_entries/slugma.asm
diff --git a/data/pokedex/entries/smeargle.asm b/data/pokemon/dex_entries/smeargle.asm
index 8b265c1ea..8b265c1ea 100644
--- a/data/pokedex/entries/smeargle.asm
+++ b/data/pokemon/dex_entries/smeargle.asm
diff --git a/data/pokedex/entries/smoochum.asm b/data/pokemon/dex_entries/smoochum.asm
index b619b1720..b619b1720 100644
--- a/data/pokedex/entries/smoochum.asm
+++ b/data/pokemon/dex_entries/smoochum.asm
diff --git a/data/pokedex/entries/sneasel.asm b/data/pokemon/dex_entries/sneasel.asm
index 5c1e70f09..5c1e70f09 100644
--- a/data/pokedex/entries/sneasel.asm
+++ b/data/pokemon/dex_entries/sneasel.asm
diff --git a/data/pokedex/entries/snorlax.asm b/data/pokemon/dex_entries/snorlax.asm
index e56651fb8..e56651fb8 100644
--- a/data/pokedex/entries/snorlax.asm
+++ b/data/pokemon/dex_entries/snorlax.asm
diff --git a/data/pokedex/entries/snubbull.asm b/data/pokemon/dex_entries/snubbull.asm
index 97b27ed8f..97b27ed8f 100644
--- a/data/pokedex/entries/snubbull.asm
+++ b/data/pokemon/dex_entries/snubbull.asm
diff --git a/data/pokedex/entries/spearow.asm b/data/pokemon/dex_entries/spearow.asm
index 16b89d22f..16b89d22f 100644
--- a/data/pokedex/entries/spearow.asm
+++ b/data/pokemon/dex_entries/spearow.asm
diff --git a/data/pokedex/entries/spinarak.asm b/data/pokemon/dex_entries/spinarak.asm
index e6e4c7203..e6e4c7203 100644
--- a/data/pokedex/entries/spinarak.asm
+++ b/data/pokemon/dex_entries/spinarak.asm
diff --git a/data/pokedex/entries/squirtle.asm b/data/pokemon/dex_entries/squirtle.asm
index 6fd442a13..6fd442a13 100644
--- a/data/pokedex/entries/squirtle.asm
+++ b/data/pokemon/dex_entries/squirtle.asm
diff --git a/data/pokedex/entries/stantler.asm b/data/pokemon/dex_entries/stantler.asm
index 0fce8f2b5..0fce8f2b5 100644
--- a/data/pokedex/entries/stantler.asm
+++ b/data/pokemon/dex_entries/stantler.asm
diff --git a/data/pokedex/entries/starmie.asm b/data/pokemon/dex_entries/starmie.asm
index 83393b9c2..83393b9c2 100644
--- a/data/pokedex/entries/starmie.asm
+++ b/data/pokemon/dex_entries/starmie.asm
diff --git a/data/pokedex/entries/staryu.asm b/data/pokemon/dex_entries/staryu.asm
index 9f1fadc9c..9f1fadc9c 100644
--- a/data/pokedex/entries/staryu.asm
+++ b/data/pokemon/dex_entries/staryu.asm
diff --git a/data/pokedex/entries/steelix.asm b/data/pokemon/dex_entries/steelix.asm
index 6bbfe6c28..6bbfe6c28 100644
--- a/data/pokedex/entries/steelix.asm
+++ b/data/pokemon/dex_entries/steelix.asm
diff --git a/data/pokedex/entries/sudowoodo.asm b/data/pokemon/dex_entries/sudowoodo.asm
index 060db1d8d..060db1d8d 100644
--- a/data/pokedex/entries/sudowoodo.asm
+++ b/data/pokemon/dex_entries/sudowoodo.asm
diff --git a/data/pokedex/entries/suicune.asm b/data/pokemon/dex_entries/suicune.asm
index c60c002f7..c60c002f7 100644
--- a/data/pokedex/entries/suicune.asm
+++ b/data/pokemon/dex_entries/suicune.asm
diff --git a/data/pokedex/entries/sunflora.asm b/data/pokemon/dex_entries/sunflora.asm
index 2d0e78111..2d0e78111 100644
--- a/data/pokedex/entries/sunflora.asm
+++ b/data/pokemon/dex_entries/sunflora.asm
diff --git a/data/pokedex/entries/sunkern.asm b/data/pokemon/dex_entries/sunkern.asm
index 680e1799e..680e1799e 100644
--- a/data/pokedex/entries/sunkern.asm
+++ b/data/pokemon/dex_entries/sunkern.asm
diff --git a/data/pokedex/entries/swinub.asm b/data/pokemon/dex_entries/swinub.asm
index 3e6d61dc8..3e6d61dc8 100644
--- a/data/pokedex/entries/swinub.asm
+++ b/data/pokemon/dex_entries/swinub.asm
diff --git a/data/pokedex/entries/tangela.asm b/data/pokemon/dex_entries/tangela.asm
index 4e011b082..4e011b082 100644
--- a/data/pokedex/entries/tangela.asm
+++ b/data/pokemon/dex_entries/tangela.asm
diff --git a/data/pokedex/entries/tauros.asm b/data/pokemon/dex_entries/tauros.asm
index bd7851165..bd7851165 100644
--- a/data/pokedex/entries/tauros.asm
+++ b/data/pokemon/dex_entries/tauros.asm
diff --git a/data/pokedex/entries/teddiursa.asm b/data/pokemon/dex_entries/teddiursa.asm
index 35b32c322..35b32c322 100644
--- a/data/pokedex/entries/teddiursa.asm
+++ b/data/pokemon/dex_entries/teddiursa.asm
diff --git a/data/pokedex/entries/tentacool.asm b/data/pokemon/dex_entries/tentacool.asm
index 5ed4b4fa0..5ed4b4fa0 100644
--- a/data/pokedex/entries/tentacool.asm
+++ b/data/pokemon/dex_entries/tentacool.asm
diff --git a/data/pokedex/entries/tentacruel.asm b/data/pokemon/dex_entries/tentacruel.asm
index 27dad758f..27dad758f 100644
--- a/data/pokedex/entries/tentacruel.asm
+++ b/data/pokemon/dex_entries/tentacruel.asm
diff --git a/data/pokedex/entries/togepi.asm b/data/pokemon/dex_entries/togepi.asm
index eb185b1f1..eb185b1f1 100644
--- a/data/pokedex/entries/togepi.asm
+++ b/data/pokemon/dex_entries/togepi.asm
diff --git a/data/pokedex/entries/togetic.asm b/data/pokemon/dex_entries/togetic.asm
index 7d1519d73..7d1519d73 100644
--- a/data/pokedex/entries/togetic.asm
+++ b/data/pokemon/dex_entries/togetic.asm
diff --git a/data/pokedex/entries/totodile.asm b/data/pokemon/dex_entries/totodile.asm
index 78a1b761e..78a1b761e 100644
--- a/data/pokedex/entries/totodile.asm
+++ b/data/pokemon/dex_entries/totodile.asm
diff --git a/data/pokedex/entries/typhlosion.asm b/data/pokemon/dex_entries/typhlosion.asm
index e11823cf5..e11823cf5 100644
--- a/data/pokedex/entries/typhlosion.asm
+++ b/data/pokemon/dex_entries/typhlosion.asm
diff --git a/data/pokedex/entries/tyranitar.asm b/data/pokemon/dex_entries/tyranitar.asm
index 9786a6430..9786a6430 100644
--- a/data/pokedex/entries/tyranitar.asm
+++ b/data/pokemon/dex_entries/tyranitar.asm
diff --git a/data/pokedex/entries/tyrogue.asm b/data/pokemon/dex_entries/tyrogue.asm
index d8900c160..d8900c160 100644
--- a/data/pokedex/entries/tyrogue.asm
+++ b/data/pokemon/dex_entries/tyrogue.asm
diff --git a/data/pokedex/entries/umbreon.asm b/data/pokemon/dex_entries/umbreon.asm
index 483322f18..483322f18 100644
--- a/data/pokedex/entries/umbreon.asm
+++ b/data/pokemon/dex_entries/umbreon.asm
diff --git a/data/pokedex/entries/unown.asm b/data/pokemon/dex_entries/unown.asm
index 5be078b8a..5be078b8a 100644
--- a/data/pokedex/entries/unown.asm
+++ b/data/pokemon/dex_entries/unown.asm
diff --git a/data/pokedex/entries/ursaring.asm b/data/pokemon/dex_entries/ursaring.asm
index acf7626f9..acf7626f9 100644
--- a/data/pokedex/entries/ursaring.asm
+++ b/data/pokemon/dex_entries/ursaring.asm
diff --git a/data/pokedex/entries/vaporeon.asm b/data/pokemon/dex_entries/vaporeon.asm
index 36617899f..36617899f 100644
--- a/data/pokedex/entries/vaporeon.asm
+++ b/data/pokemon/dex_entries/vaporeon.asm
diff --git a/data/pokedex/entries/venomoth.asm b/data/pokemon/dex_entries/venomoth.asm
index 4ff583940..4ff583940 100644
--- a/data/pokedex/entries/venomoth.asm
+++ b/data/pokemon/dex_entries/venomoth.asm
diff --git a/data/pokedex/entries/venonat.asm b/data/pokemon/dex_entries/venonat.asm
index 8e52b4c82..8e52b4c82 100644
--- a/data/pokedex/entries/venonat.asm
+++ b/data/pokemon/dex_entries/venonat.asm
diff --git a/data/pokedex/entries/venusaur.asm b/data/pokemon/dex_entries/venusaur.asm
index 1b9cc6e43..1b9cc6e43 100644
--- a/data/pokedex/entries/venusaur.asm
+++ b/data/pokemon/dex_entries/venusaur.asm
diff --git a/data/pokedex/entries/victreebel.asm b/data/pokemon/dex_entries/victreebel.asm
index 552051572..552051572 100644
--- a/data/pokedex/entries/victreebel.asm
+++ b/data/pokemon/dex_entries/victreebel.asm
diff --git a/data/pokedex/entries/vileplume.asm b/data/pokemon/dex_entries/vileplume.asm
index cf2ea191d..cf2ea191d 100644
--- a/data/pokedex/entries/vileplume.asm
+++ b/data/pokemon/dex_entries/vileplume.asm
diff --git a/data/pokedex/entries/voltorb.asm b/data/pokemon/dex_entries/voltorb.asm
index 5a532e2d0..5a532e2d0 100644
--- a/data/pokedex/entries/voltorb.asm
+++ b/data/pokemon/dex_entries/voltorb.asm
diff --git a/data/pokedex/entries/vulpix.asm b/data/pokemon/dex_entries/vulpix.asm
index f5bbd03a1..f5bbd03a1 100644
--- a/data/pokedex/entries/vulpix.asm
+++ b/data/pokemon/dex_entries/vulpix.asm
diff --git a/data/pokedex/entries/wartortle.asm b/data/pokemon/dex_entries/wartortle.asm
index 927af5fd2..927af5fd2 100644
--- a/data/pokedex/entries/wartortle.asm
+++ b/data/pokemon/dex_entries/wartortle.asm
diff --git a/data/pokedex/entries/weedle.asm b/data/pokemon/dex_entries/weedle.asm
index 9b81fa11d..9b81fa11d 100644
--- a/data/pokedex/entries/weedle.asm
+++ b/data/pokemon/dex_entries/weedle.asm
diff --git a/data/pokedex/entries/weepinbell.asm b/data/pokemon/dex_entries/weepinbell.asm
index 81eb7c215..81eb7c215 100644
--- a/data/pokedex/entries/weepinbell.asm
+++ b/data/pokemon/dex_entries/weepinbell.asm
diff --git a/data/pokedex/entries/weezing.asm b/data/pokemon/dex_entries/weezing.asm
index 1a7b268fd..1a7b268fd 100644
--- a/data/pokedex/entries/weezing.asm
+++ b/data/pokemon/dex_entries/weezing.asm
diff --git a/data/pokedex/entries/wigglytuff.asm b/data/pokemon/dex_entries/wigglytuff.asm
index 8ba563cce..8ba563cce 100644
--- a/data/pokedex/entries/wigglytuff.asm
+++ b/data/pokemon/dex_entries/wigglytuff.asm
diff --git a/data/pokedex/entries/wobbuffet.asm b/data/pokemon/dex_entries/wobbuffet.asm
index 95aae69ab..95aae69ab 100644
--- a/data/pokedex/entries/wobbuffet.asm
+++ b/data/pokemon/dex_entries/wobbuffet.asm
diff --git a/data/pokedex/entries/wooper.asm b/data/pokemon/dex_entries/wooper.asm
index d612f2070..d612f2070 100644
--- a/data/pokedex/entries/wooper.asm
+++ b/data/pokemon/dex_entries/wooper.asm
diff --git a/data/pokedex/entries/xatu.asm b/data/pokemon/dex_entries/xatu.asm
index 21a53d8fc..21a53d8fc 100644
--- a/data/pokedex/entries/xatu.asm
+++ b/data/pokemon/dex_entries/xatu.asm
diff --git a/data/pokedex/entries/yanma.asm b/data/pokemon/dex_entries/yanma.asm
index 9843ad289..9843ad289 100644
--- a/data/pokedex/entries/yanma.asm
+++ b/data/pokemon/dex_entries/yanma.asm
diff --git a/data/pokedex/entries/zapdos.asm b/data/pokemon/dex_entries/zapdos.asm
index ea61198a0..ea61198a0 100644
--- a/data/pokedex/entries/zapdos.asm
+++ b/data/pokemon/dex_entries/zapdos.asm
diff --git a/data/pokedex/entries/zubat.asm b/data/pokemon/dex_entries/zubat.asm
index 8232f8bd6..8232f8bd6 100644
--- a/data/pokedex/entries/zubat.asm
+++ b/data/pokemon/dex_entries/zubat.asm
diff --git a/data/pokemon/dex_entry_pointers.asm b/data/pokemon/dex_entry_pointers.asm
new file mode 100644
index 000000000..c4ddc7280
--- /dev/null
+++ b/data/pokemon/dex_entry_pointers.asm
@@ -0,0 +1,254 @@
+PokedexDataPointerTable: ; 0x44378
+; entries correspond to constants/pokemon_constants.asm
+ dw BulbasaurPokedexEntry
+ dw IvysaurPokedexEntry
+ dw VenusaurPokedexEntry
+ dw CharmanderPokedexEntry
+ dw CharmeleonPokedexEntry
+ dw CharizardPokedexEntry
+ dw SquirtlePokedexEntry
+ dw WartortlePokedexEntry
+ dw BlastoisePokedexEntry
+ dw CaterpiePokedexEntry
+ dw MetapodPokedexEntry
+ dw ButterfreePokedexEntry
+ dw WeedlePokedexEntry
+ dw KakunaPokedexEntry
+ dw BeedrillPokedexEntry
+ dw PidgeyPokedexEntry
+ dw PidgeottoPokedexEntry
+ dw PidgeotPokedexEntry
+ dw RattataPokedexEntry
+ dw RaticatePokedexEntry
+ dw SpearowPokedexEntry
+ dw FearowPokedexEntry
+ dw EkansPokedexEntry
+ dw ArbokPokedexEntry
+ dw PikachuPokedexEntry
+ dw RaichuPokedexEntry
+ dw SandshrewPokedexEntry
+ dw SandslashPokedexEntry
+ dw NidoranFPokedexEntry
+ dw NidorinaPokedexEntry
+ dw NidoqueenPokedexEntry
+ dw NidoranMPokedexEntry
+ dw NidorinoPokedexEntry
+ dw NidokingPokedexEntry
+ dw ClefairyPokedexEntry
+ dw ClefablePokedexEntry
+ dw VulpixPokedexEntry
+ dw NinetalesPokedexEntry
+ dw JigglypuffPokedexEntry
+ dw WigglytuffPokedexEntry
+ dw ZubatPokedexEntry
+ dw GolbatPokedexEntry
+ dw OddishPokedexEntry
+ dw GloomPokedexEntry
+ dw VileplumePokedexEntry
+ dw ParasPokedexEntry
+ dw ParasectPokedexEntry
+ dw VenonatPokedexEntry
+ dw VenomothPokedexEntry
+ dw DiglettPokedexEntry
+ dw DugtrioPokedexEntry
+ dw MeowthPokedexEntry
+ dw PersianPokedexEntry
+ dw PsyduckPokedexEntry
+ dw GolduckPokedexEntry
+ dw MankeyPokedexEntry
+ dw PrimeapePokedexEntry
+ dw GrowlithePokedexEntry
+ dw ArcaninePokedexEntry
+ dw PoliwagPokedexEntry
+ dw PoliwhirlPokedexEntry
+ dw PoliwrathPokedexEntry
+ dw AbraPokedexEntry
+ dw KadabraPokedexEntry
+ dw AlakazamPokedexEntry
+ dw MachopPokedexEntry
+ dw MachokePokedexEntry
+ dw MachampPokedexEntry
+ dw BellsproutPokedexEntry
+ dw WeepinbellPokedexEntry
+ dw VictreebelPokedexEntry
+ dw TentacoolPokedexEntry
+ dw TentacruelPokedexEntry
+ dw GeodudePokedexEntry
+ dw GravelerPokedexEntry
+ dw GolemPokedexEntry
+ dw PonytaPokedexEntry
+ dw RapidashPokedexEntry
+ dw SlowpokePokedexEntry
+ dw SlowbroPokedexEntry
+ dw MagnemitePokedexEntry
+ dw MagnetonPokedexEntry
+ dw FarfetchDPokedexEntry
+ dw DoduoPokedexEntry
+ dw DodrioPokedexEntry
+ dw SeelPokedexEntry
+ dw DewgongPokedexEntry
+ dw GrimerPokedexEntry
+ dw MukPokedexEntry
+ dw ShellderPokedexEntry
+ dw CloysterPokedexEntry
+ dw GastlyPokedexEntry
+ dw HaunterPokedexEntry
+ dw GengarPokedexEntry
+ dw OnixPokedexEntry
+ dw DrowzeePokedexEntry
+ dw HypnoPokedexEntry
+ dw KrabbyPokedexEntry
+ dw KinglerPokedexEntry
+ dw VoltorbPokedexEntry
+ dw ElectrodePokedexEntry
+ dw ExeggcutePokedexEntry
+ dw ExeggutorPokedexEntry
+ dw CubonePokedexEntry
+ dw MarowakPokedexEntry
+ dw HitmonleePokedexEntry
+ dw HitmonchanPokedexEntry
+ dw LickitungPokedexEntry
+ dw KoffingPokedexEntry
+ dw WeezingPokedexEntry
+ dw RhyhornPokedexEntry
+ dw RhydonPokedexEntry
+ dw ChanseyPokedexEntry
+ dw TangelaPokedexEntry
+ dw KangaskhanPokedexEntry
+ dw HorseaPokedexEntry
+ dw SeadraPokedexEntry
+ dw GoldeenPokedexEntry
+ dw SeakingPokedexEntry
+ dw StaryuPokedexEntry
+ dw StarmiePokedexEntry
+ dw MrMimePokedexEntry
+ dw ScytherPokedexEntry
+ dw JynxPokedexEntry
+ dw ElectabuzzPokedexEntry
+ dw MagmarPokedexEntry
+ dw PinsirPokedexEntry
+ dw TaurosPokedexEntry
+ dw MagikarpPokedexEntry
+ dw GyaradosPokedexEntry
+ dw LaprasPokedexEntry
+ dw DittoPokedexEntry
+ dw EeveePokedexEntry
+ dw VaporeonPokedexEntry
+ dw JolteonPokedexEntry
+ dw FlareonPokedexEntry
+ dw PorygonPokedexEntry
+ dw OmanytePokedexEntry
+ dw OmastarPokedexEntry
+ dw KabutoPokedexEntry
+ dw KabutopsPokedexEntry
+ dw AerodactylPokedexEntry
+ dw SnorlaxPokedexEntry
+ dw ArticunoPokedexEntry
+ dw ZapdosPokedexEntry
+ dw MoltresPokedexEntry
+ dw DratiniPokedexEntry
+ dw DragonairPokedexEntry
+ dw DragonitePokedexEntry
+ dw MewtwoPokedexEntry
+ dw MewPokedexEntry
+ dw ChikoritaPokedexEntry
+ dw BayleefPokedexEntry
+ dw MeganiumPokedexEntry
+ dw CyndaquilPokedexEntry
+ dw QuilavaPokedexEntry
+ dw TyphlosionPokedexEntry
+ dw TotodilePokedexEntry
+ dw CroconawPokedexEntry
+ dw FeraligatrPokedexEntry
+ dw SentretPokedexEntry
+ dw FurretPokedexEntry
+ dw HoothootPokedexEntry
+ dw NoctowlPokedexEntry
+ dw LedybaPokedexEntry
+ dw LedianPokedexEntry
+ dw SpinarakPokedexEntry
+ dw AriadosPokedexEntry
+ dw CrobatPokedexEntry
+ dw ChinchouPokedexEntry
+ dw LanturnPokedexEntry
+ dw PichuPokedexEntry
+ dw CleffaPokedexEntry
+ dw IgglybuffPokedexEntry
+ dw TogepiPokedexEntry
+ dw TogeticPokedexEntry
+ dw NatuPokedexEntry
+ dw XatuPokedexEntry
+ dw MareepPokedexEntry
+ dw FlaaffyPokedexEntry
+ dw AmpharosPokedexEntry
+ dw BellossomPokedexEntry
+ dw MarillPokedexEntry
+ dw AzumarillPokedexEntry
+ dw SudowoodoPokedexEntry
+ dw PolitoedPokedexEntry
+ dw HoppipPokedexEntry
+ dw SkiploomPokedexEntry
+ dw JumpluffPokedexEntry
+ dw AipomPokedexEntry
+ dw SunkernPokedexEntry
+ dw SunfloraPokedexEntry
+ dw YanmaPokedexEntry
+ dw WooperPokedexEntry
+ dw QuagsirePokedexEntry
+ dw EspeonPokedexEntry
+ dw UmbreonPokedexEntry
+ dw MurkrowPokedexEntry
+ dw SlowkingPokedexEntry
+ dw MisdreavusPokedexEntry
+ dw UnownPokedexEntry
+ dw WobbuffetPokedexEntry
+ dw GirafarigPokedexEntry
+ dw PinecoPokedexEntry
+ dw ForretressPokedexEntry
+ dw DunsparcePokedexEntry
+ dw GligarPokedexEntry
+ dw SteelixPokedexEntry
+ dw SnubbullPokedexEntry
+ dw GranbullPokedexEntry
+ dw QwilfishPokedexEntry
+ dw ScizorPokedexEntry
+ dw ShucklePokedexEntry
+ dw HeracrossPokedexEntry
+ dw SneaselPokedexEntry
+ dw TeddiursaPokedexEntry
+ dw UrsaringPokedexEntry
+ dw SlugmaPokedexEntry
+ dw MagcargoPokedexEntry
+ dw SwinubPokedexEntry
+ dw PiloswinePokedexEntry
+ dw CorsolaPokedexEntry
+ dw RemoraidPokedexEntry
+ dw OctilleryPokedexEntry
+ dw DelibirdPokedexEntry
+ dw MantinePokedexEntry
+ dw SkarmoryPokedexEntry
+ dw HoundourPokedexEntry
+ dw HoundoomPokedexEntry
+ dw KingdraPokedexEntry
+ dw PhanpyPokedexEntry
+ dw DonphanPokedexEntry
+ dw Porygon2PokedexEntry
+ dw StantlerPokedexEntry
+ dw SmearglePokedexEntry
+ dw TyroguePokedexEntry
+ dw HitmontopPokedexEntry
+ dw SmoochumPokedexEntry
+ dw ElekidPokedexEntry
+ dw MagbyPokedexEntry
+ dw MiltankPokedexEntry
+ dw BlisseyPokedexEntry
+ dw RaikouPokedexEntry
+ dw EnteiPokedexEntry
+ dw SuicunePokedexEntry
+ dw LarvitarPokedexEntry
+ dw PupitarPokedexEntry
+ dw TyranitarPokedexEntry
+ dw LugiaPokedexEntry
+ dw HoOhPokedexEntry
+ dw CelebiPokedexEntry
+; 0x4456e
diff --git a/data/pokemon/dex_order_alpha.asm b/data/pokemon/dex_order_alpha.asm
new file mode 100644
index 000000000..8fcb0acd1
--- /dev/null
+++ b/data/pokemon/dex_order_alpha.asm
@@ -0,0 +1,255 @@
+; Every Pokémon sorted alphabetically by name.
+
+AlphabeticalPokedexOrder: ; 0x40c65
+ db ABRA
+ db AERODACTYL
+ db AIPOM
+ db ALAKAZAM
+ db AMPHAROS
+ db ARBOK
+ db ARCANINE
+ db ARIADOS
+ db ARTICUNO
+ db AZUMARILL
+ db BAYLEEF
+ db BEEDRILL
+ db BELLOSSOM
+ db BELLSPROUT
+ db BLASTOISE
+ db BLISSEY
+ db BULBASAUR
+ db BUTTERFREE
+ db CATERPIE
+ db CELEBI
+ db CHANSEY
+ db CHARIZARD
+ db CHARMANDER
+ db CHARMELEON
+ db CHIKORITA
+ db CHINCHOU
+ db CLEFABLE
+ db CLEFAIRY
+ db CLEFFA
+ db CLOYSTER
+ db CORSOLA
+ db CROBAT
+ db CROCONAW
+ db CUBONE
+ db CYNDAQUIL
+ db DELIBIRD
+ db DEWGONG
+ db DIGLETT
+ db DITTO
+ db DODRIO
+ db DODUO
+ db DONPHAN
+ db DRAGONAIR
+ db DRAGONITE
+ db DRATINI
+ db DROWZEE
+ db DUGTRIO
+ db DUNSPARCE
+ db EEVEE
+ db EKANS
+ db ELECTABUZZ
+ db ELECTRODE
+ db ELEKID
+ db ENTEI
+ db ESPEON
+ db EXEGGCUTE
+ db EXEGGUTOR
+ db FARFETCH_D
+ db FEAROW
+ db FERALIGATR
+ db FLAAFFY
+ db FLAREON
+ db FORRETRESS
+ db FURRET
+ db GASTLY
+ db GENGAR
+ db GEODUDE
+ db GIRAFARIG
+ db GLIGAR
+ db GLOOM
+ db GOLBAT
+ db GOLDEEN
+ db GOLDUCK
+ db GOLEM
+ db GRANBULL
+ db GRAVELER
+ db GRIMER
+ db GROWLITHE
+ db GYARADOS
+ db HAUNTER
+ db HERACROSS
+ db HITMONCHAN
+ db HITMONLEE
+ db HITMONTOP
+ db HO_OH
+ db HOOTHOOT
+ db HOPPIP
+ db HORSEA
+ db HOUNDOOM
+ db HOUNDOUR
+ db HYPNO
+ db IGGLYBUFF
+ db IVYSAUR
+ db JIGGLYPUFF
+ db JOLTEON
+ db JUMPLUFF
+ db JYNX
+ db KABUTO
+ db KABUTOPS
+ db KADABRA
+ db KAKUNA
+ db KANGASKHAN
+ db KINGDRA
+ db KINGLER
+ db KOFFING
+ db KRABBY
+ db LANTURN
+ db LAPRAS
+ db LARVITAR
+ db LEDIAN
+ db LEDYBA
+ db LICKITUNG
+ db LUGIA
+ db MACHAMP
+ db MACHOKE
+ db MACHOP
+ db MAGBY
+ db MAGCARGO
+ db MAGIKARP
+ db MAGMAR
+ db MAGNEMITE
+ db MAGNETON
+ db MANKEY
+ db MANTINE
+ db MAREEP
+ db MARILL
+ db MAROWAK
+ db MEGANIUM
+ db MEOWTH
+ db METAPOD
+ db MEW
+ db MEWTWO
+ db MILTANK
+ db MISDREAVUS
+ db MOLTRES
+ db MR__MIME
+ db MUK
+ db MURKROW
+ db NATU
+ db NIDOKING
+ db NIDOQUEEN
+ db NIDORAN_F
+ db NIDORAN_M
+ db NIDORINA
+ db NIDORINO
+ db NINETALES
+ db NOCTOWL
+ db OCTILLERY
+ db ODDISH
+ db OMANYTE
+ db OMASTAR
+ db ONIX
+ db PARAS
+ db PARASECT
+ db PERSIAN
+ db PHANPY
+ db PICHU
+ db PIDGEOT
+ db PIDGEOTTO
+ db PIDGEY
+ db PIKACHU
+ db PILOSWINE
+ db PINECO
+ db PINSIR
+ db POLITOED
+ db POLIWAG
+ db POLIWHIRL
+ db POLIWRATH
+ db PONYTA
+ db PORYGON
+ db PORYGON2
+ db PRIMEAPE
+ db PSYDUCK
+ db PUPITAR
+ db QUAGSIRE
+ db QUILAVA
+ db QWILFISH
+ db RAICHU
+ db RAIKOU
+ db RAPIDASH
+ db RATICATE
+ db RATTATA
+ db REMORAID
+ db RHYDON
+ db RHYHORN
+ db SANDSHREW
+ db SANDSLASH
+ db SCIZOR
+ db SCYTHER
+ db SEADRA
+ db SEAKING
+ db SEEL
+ db SENTRET
+ db SHELLDER
+ db SHUCKLE
+ db SKARMORY
+ db SKIPLOOM
+ db SLOWBRO
+ db SLOWKING
+ db SLOWPOKE
+ db SLUGMA
+ db SMEARGLE
+ db SMOOCHUM
+ db SNEASEL
+ db SNORLAX
+ db SNUBBULL
+ db SPEAROW
+ db SPINARAK
+ db SQUIRTLE
+ db STANTLER
+ db STARMIE
+ db STARYU
+ db STEELIX
+ db SUDOWOODO
+ db SUICUNE
+ db SUNFLORA
+ db SUNKERN
+ db SWINUB
+ db TANGELA
+ db TAUROS
+ db TEDDIURSA
+ db TENTACOOL
+ db TENTACRUEL
+ db TOGEPI
+ db TOGETIC
+ db TOTODILE
+ db TYPHLOSION
+ db TYRANITAR
+ db TYROGUE
+ db UMBREON
+ db UNOWN
+ db URSARING
+ db VAPOREON
+ db VENOMOTH
+ db VENONAT
+ db VENUSAUR
+ db VICTREEBEL
+ db VILEPLUME
+ db VOLTORB
+ db VULPIX
+ db WARTORTLE
+ db WEEDLE
+ db WEEPINBELL
+ db WEEZING
+ db WIGGLYTUFF
+ db WOBBUFFET
+ db WOOPER
+ db XATU
+ db YANMA
+ db ZAPDOS
+ db ZUBAT
+; 0x40d60
diff --git a/data/pokemon/dex_order_new.asm b/data/pokemon/dex_order_new.asm
new file mode 100644
index 000000000..bf7e3d298
--- /dev/null
+++ b/data/pokemon/dex_order_new.asm
@@ -0,0 +1,255 @@
+; Every Pokémon sorted in New Pokédex Order.
+
+NewPokedexOrder: ; 0x40d60
+ db CHIKORITA
+ db BAYLEEF
+ db MEGANIUM
+ db CYNDAQUIL
+ db QUILAVA
+ db TYPHLOSION
+ db TOTODILE
+ db CROCONAW
+ db FERALIGATR
+ db PIDGEY
+ db PIDGEOTTO
+ db PIDGEOT
+ db SPEAROW
+ db FEAROW
+ db HOOTHOOT
+ db NOCTOWL
+ db RATTATA
+ db RATICATE
+ db SENTRET
+ db FURRET
+ db PICHU
+ db PIKACHU
+ db RAICHU
+ db CATERPIE
+ db METAPOD
+ db BUTTERFREE
+ db WEEDLE
+ db KAKUNA
+ db BEEDRILL
+ db LEDYBA
+ db LEDIAN
+ db SPINARAK
+ db ARIADOS
+ db GEODUDE
+ db GRAVELER
+ db GOLEM
+ db ZUBAT
+ db GOLBAT
+ db CROBAT
+ db CLEFFA
+ db CLEFAIRY
+ db CLEFABLE
+ db IGGLYBUFF
+ db JIGGLYPUFF
+ db WIGGLYTUFF
+ db TOGEPI
+ db TOGETIC
+ db SANDSHREW
+ db SANDSLASH
+ db EKANS
+ db ARBOK
+ db DUNSPARCE
+ db MAREEP
+ db FLAAFFY
+ db AMPHAROS
+ db WOOPER
+ db QUAGSIRE
+ db GASTLY
+ db HAUNTER
+ db GENGAR
+ db UNOWN
+ db ONIX
+ db STEELIX
+ db BELLSPROUT
+ db WEEPINBELL
+ db VICTREEBEL
+ db HOPPIP
+ db SKIPLOOM
+ db JUMPLUFF
+ db PARAS
+ db PARASECT
+ db POLIWAG
+ db POLIWHIRL
+ db POLIWRATH
+ db POLITOED
+ db MAGIKARP
+ db GYARADOS
+ db GOLDEEN
+ db SEAKING
+ db SLOWPOKE
+ db SLOWBRO
+ db SLOWKING
+ db ODDISH
+ db GLOOM
+ db VILEPLUME
+ db BELLOSSOM
+ db DROWZEE
+ db HYPNO
+ db ABRA
+ db KADABRA
+ db ALAKAZAM
+ db DITTO
+ db PINECO
+ db FORRETRESS
+ db NIDORAN_F
+ db NIDORINA
+ db NIDOQUEEN
+ db NIDORAN_M
+ db NIDORINO
+ db NIDOKING
+ db YANMA
+ db SUNKERN
+ db SUNFLORA
+ db EXEGGCUTE
+ db EXEGGUTOR
+ db SUDOWOODO
+ db WOBBUFFET
+ db VENONAT
+ db VENOMOTH
+ db SCYTHER
+ db SCIZOR
+ db PINSIR
+ db HERACROSS
+ db KOFFING
+ db WEEZING
+ db GRIMER
+ db MUK
+ db MAGNEMITE
+ db MAGNETON
+ db VOLTORB
+ db ELECTRODE
+ db AIPOM
+ db SNUBBULL
+ db GRANBULL
+ db VULPIX
+ db NINETALES
+ db GROWLITHE
+ db ARCANINE
+ db STANTLER
+ db MARILL
+ db AZUMARILL
+ db DIGLETT
+ db DUGTRIO
+ db MANKEY
+ db PRIMEAPE
+ db MEOWTH
+ db PERSIAN
+ db PSYDUCK
+ db GOLDUCK
+ db MACHOP
+ db MACHOKE
+ db MACHAMP
+ db TYROGUE
+ db HITMONLEE
+ db HITMONCHAN
+ db HITMONTOP
+ db GIRAFARIG
+ db TAUROS
+ db MILTANK
+ db MAGBY
+ db MAGMAR
+ db SMOOCHUM
+ db JYNX
+ db ELEKID
+ db ELECTABUZZ
+ db MR__MIME
+ db SMEARGLE
+ db FARFETCH_D
+ db NATU
+ db XATU
+ db QWILFISH
+ db TENTACOOL
+ db TENTACRUEL
+ db KRABBY
+ db KINGLER
+ db SHUCKLE
+ db STARYU
+ db STARMIE
+ db SHELLDER
+ db CLOYSTER
+ db CORSOLA
+ db REMORAID
+ db OCTILLERY
+ db CHINCHOU
+ db LANTURN
+ db SEEL
+ db DEWGONG
+ db LICKITUNG
+ db TANGELA
+ db EEVEE
+ db VAPOREON
+ db JOLTEON
+ db FLAREON
+ db ESPEON
+ db UMBREON
+ db HORSEA
+ db SEADRA
+ db KINGDRA
+ db GLIGAR
+ db DELIBIRD
+ db SWINUB
+ db PILOSWINE
+ db TEDDIURSA
+ db URSARING
+ db PHANPY
+ db DONPHAN
+ db MANTINE
+ db SKARMORY
+ db DODUO
+ db DODRIO
+ db PONYTA
+ db RAPIDASH
+ db CUBONE
+ db MAROWAK
+ db KANGASKHAN
+ db RHYHORN
+ db RHYDON
+ db MURKROW
+ db HOUNDOUR
+ db HOUNDOOM
+ db SLUGMA
+ db MAGCARGO
+ db SNEASEL
+ db MISDREAVUS
+ db PORYGON
+ db PORYGON2
+ db CHANSEY
+ db BLISSEY
+ db LAPRAS
+ db OMANYTE
+ db OMASTAR
+ db KABUTO
+ db KABUTOPS
+ db AERODACTYL
+ db SNORLAX
+ db BULBASAUR
+ db IVYSAUR
+ db VENUSAUR
+ db CHARMANDER
+ db CHARMELEON
+ db CHARIZARD
+ db SQUIRTLE
+ db WARTORTLE
+ db BLASTOISE
+ db ARTICUNO
+ db ZAPDOS
+ db MOLTRES
+ db RAIKOU
+ db ENTEI
+ db SUICUNE
+ db DRATINI
+ db DRAGONAIR
+ db DRAGONITE
+ db LARVITAR
+ db PUPITAR
+ db TYRANITAR
+ db LUGIA
+ db HO_OH
+ db MEWTWO
+ db MEW
+ db CELEBI
+; 0x40e5b
diff --git a/data/pokemon/egg_move_pointers.asm b/data/pokemon/egg_move_pointers.asm
new file mode 100644
index 000000000..caa9ed7c0
--- /dev/null
+++ b/data/pokemon/egg_move_pointers.asm
@@ -0,0 +1,257 @@
+EggMovePointers:: ; 0x23b11
+ dw BulbasaurEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw CharmanderEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw SquirtleEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw PidgeyEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw RattataEggMoves
+ dw NoEggMoves
+ dw SpearowEggMoves
+ dw NoEggMoves
+ dw EkansEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw SandshrewEggMoves
+ dw NoEggMoves
+ dw NidoranFEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NidoranMEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw VulpixEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw ZubatEggMoves
+ dw NoEggMoves
+ dw OddishEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw ParasEggMoves
+ dw NoEggMoves
+ dw VenonatEggMoves
+ dw NoEggMoves
+ dw DiglettEggMoves
+ dw NoEggMoves
+ dw MeowthEggMoves
+ dw NoEggMoves
+ dw PsyduckEggMoves
+ dw NoEggMoves
+ dw MankeyEggMoves
+ dw NoEggMoves
+ dw GrowlitheEggMoves
+ dw NoEggMoves
+ dw PoliwagEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw AbraEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw MachopEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw BellsproutEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw TentacoolEggMoves
+ dw NoEggMoves
+ dw GeodudeEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw PonytaEggMoves
+ dw NoEggMoves
+ dw SlowpokeEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw FarfetchDEggMoves
+ dw DoduoEggMoves
+ dw NoEggMoves
+ dw SeelEggMoves
+ dw NoEggMoves
+ dw GrimerEggMoves
+ dw NoEggMoves
+ dw ShellderEggMoves
+ dw NoEggMoves
+ dw GastlyEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw OnixEggMoves
+ dw DrowzeeEggMoves
+ dw NoEggMoves
+ dw KrabbyEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw ExeggcuteEggMoves
+ dw NoEggMoves
+ dw CuboneEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw LickitungEggMoves
+ dw KoffingEggMoves
+ dw NoEggMoves
+ dw RhyhornEggMoves
+ dw NoEggMoves
+ dw ChanseyEggMoves
+ dw TangelaEggMoves
+ dw KangaskhanEggMoves
+ dw HorseaEggMoves
+ dw NoEggMoves
+ dw GoldeenEggMoves
+ dw NoEggMoves
+if _CRYSTAL
+ dw NoEggMoves
+else
+ dw StaryuEggMoves
+endc
+ dw NoEggMoves
+ dw MrMimeEggMoves
+ dw ScytherEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw PinsirEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw LaprasEggMoves
+ dw NoEggMoves
+ dw EeveeEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw OmanyteEggMoves
+ dw NoEggMoves
+ dw KabutoEggMoves
+ dw NoEggMoves
+ dw AerodactylEggMoves
+ dw SnorlaxEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw DratiniEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw ChikoritaEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw CyndaquilEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw TotodileEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw SentretEggMoves
+ dw NoEggMoves
+ dw HoothootEggMoves
+ dw NoEggMoves
+ dw LedybaEggMoves
+ dw NoEggMoves
+ dw SpinarakEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw ChinchouEggMoves
+ dw NoEggMoves
+ dw PichuEggMoves
+ dw CleffaEggMoves
+ dw IgglybuffEggMoves
+ dw TogepiEggMoves
+ dw NoEggMoves
+ dw NatuEggMoves
+ dw NoEggMoves
+ dw MareepEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw MarillEggMoves
+ dw NoEggMoves
+ dw SudowoodoEggMoves
+ dw NoEggMoves
+ dw HoppipEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw AipomEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw YanmaEggMoves
+ dw WooperEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw MurkrowEggMoves
+ dw NoEggMoves
+ dw MisdreavusEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw GirafarigEggMoves
+ dw PinecoEggMoves
+ dw NoEggMoves
+ dw DunsparceEggMoves
+ dw GligarEggMoves
+ dw NoEggMoves
+ dw SnubbullEggMoves
+ dw NoEggMoves
+ dw QwilfishEggMoves
+ dw NoEggMoves
+ dw ShuckleEggMoves
+ dw HeracrossEggMoves
+ dw SneaselEggMoves
+ dw TeddiursaEggMoves
+ dw NoEggMoves
+ dw SlugmaEggMoves
+ dw NoEggMoves
+ dw SwinubEggMoves
+ dw NoEggMoves
+ dw CorsolaEggMoves
+ dw RemoraidEggMoves
+ dw NoEggMoves
+ dw DelibirdEggMoves
+ dw MantineEggMoves
+ dw SkarmoryEggMoves
+ dw HoundourEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw PhanpyEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw StantlerEggMoves
+ dw NoEggMoves
+ dw TyrogueEggMoves
+ dw NoEggMoves
+ dw SmoochumEggMoves
+ dw ElekidEggMoves
+ dw MagbyEggMoves
+ dw MiltankEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw LarvitarEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+ dw NoEggMoves
+; 0x23d07
diff --git a/data/pokemon/egg_moves.asm b/data/pokemon/egg_moves.asm
new file mode 100644
index 000000000..52d244c39
--- /dev/null
+++ b/data/pokemon/egg_moves.asm
@@ -0,0 +1,872 @@
+INCLUDE "includes.asm"
+
+
+SECTION "Egg Moves", ROMX
+
+; All instances of Charm, Steel Wing, Sweet Scent, and Lovely Kiss were
+; removed from egg move lists in Crystal.
+; Sweet Scent and Steel Wing were redundant since they're TMs, and
+; Charm and Lovely Kiss were unobtainable.
+
+; Staryu's egg moves were removed in Crystal, because Staryu is genderless
+; and can only breed with Ditto.
+
+
+INCLUDE "data/pokemon/egg_move_pointers.asm"
+
+
+EggMoves::
+
+BulbasaurEggMoves:
+ db LIGHT_SCREEN
+ db SKULL_BASH
+ db SAFEGUARD
+if !_CRYSTAL
+ db CHARM
+endc
+ db RAZOR_WIND
+ db PETAL_DANCE
+ db $ff
+
+CharmanderEggMoves:
+ db BELLY_DRUM
+ db ANCIENTPOWER
+ db ROCK_SLIDE
+ db BITE
+ db OUTRAGE
+ db BEAT_UP
+ db $ff
+
+SquirtleEggMoves:
+ db MIRROR_COAT
+ db HAZE
+ db MIST
+ db CONFUSION
+ db FORESIGHT
+ db FLAIL
+ db $ff
+
+PidgeyEggMoves:
+ db PURSUIT
+ db FAINT_ATTACK
+ db FORESIGHT
+if !_CRYSTAL
+ db STEEL_WING
+endc
+ db $ff
+
+RattataEggMoves:
+ db SCREECH
+ db FLAME_WHEEL
+ db FURY_SWIPES
+ db BITE
+ db COUNTER
+ db REVERSAL
+ db $ff
+
+SpearowEggMoves:
+ db FAINT_ATTACK
+ db FALSE_SWIPE
+ db SCARY_FACE
+ db QUICK_ATTACK
+ db TRI_ATTACK
+ db $ff
+
+EkansEggMoves:
+ db PURSUIT
+ db SLAM
+ db SPITE
+ db BEAT_UP
+if _CRYSTAL
+ db CRUNCH
+endc
+ db $ff
+
+SandshrewEggMoves:
+ db FLAIL
+ db SAFEGUARD
+ db COUNTER
+ db RAPID_SPIN
+if _CRYSTAL
+ db METAL_CLAW
+endc
+ db $ff
+
+NidoranFEggMoves:
+ db SUPERSONIC
+ db DISABLE
+ db TAKE_DOWN
+ db FOCUS_ENERGY
+ db CHARM
+ db COUNTER
+ db BEAT_UP
+ db $ff
+
+NidoranMEggMoves:
+ db SUPERSONIC
+ db DISABLE
+ db TAKE_DOWN
+ db CONFUSION
+ db AMNESIA
+ db COUNTER
+ db BEAT_UP
+ db $ff
+
+VulpixEggMoves:
+ db FAINT_ATTACK
+ db HYPNOSIS
+ db FLAIL
+ db SPITE
+ db DISABLE
+ db $ff
+
+ZubatEggMoves:
+ db QUICK_ATTACK
+ db PURSUIT
+ db FAINT_ATTACK
+ db GUST
+ db WHIRLWIND
+ db $ff
+
+OddishEggMoves:
+ db SWORDS_DANCE
+ db RAZOR_LEAF
+ db FLAIL
+ db SYNTHESIS
+if !_CRYSTAL
+ db CHARM
+endc
+ db $ff
+
+ParasEggMoves:
+ db FALSE_SWIPE
+ db SCREECH
+ db COUNTER
+ db PSYBEAM
+ db FLAIL
+if !_CRYSTAL
+ db SWEET_SCENT
+endc
+ db LIGHT_SCREEN
+ db PURSUIT
+ db $ff
+
+VenonatEggMoves:
+ db BATON_PASS
+ db SCREECH
+ db GIGA_DRAIN
+ db $ff
+
+DiglettEggMoves:
+ db FAINT_ATTACK
+ db SCREECH
+ db ANCIENTPOWER
+ db PURSUIT
+ db BEAT_UP
+ db $ff
+
+MeowthEggMoves:
+ db SPITE
+ db CHARM
+ db HYPNOSIS
+ db AMNESIA
+ db $ff
+
+PsyduckEggMoves:
+ db ICE_BEAM
+ db HYPNOSIS
+ db PSYBEAM
+ db FORESIGHT
+ db LIGHT_SCREEN
+ db FUTURE_SIGHT
+ db PSYCHIC_M
+if _CRYSTAL
+ db CROSS_CHOP
+endc
+ db $ff
+
+MankeyEggMoves:
+ db ROCK_SLIDE
+ db FORESIGHT
+ db MEDITATE
+ db COUNTER
+ db REVERSAL
+ db BEAT_UP
+ db $ff
+
+GrowlitheEggMoves:
+ db BODY_SLAM
+ db SAFEGUARD
+ db CRUNCH
+ db THRASH
+ db FIRE_SPIN
+ db $ff
+
+PoliwagEggMoves:
+ db MIST
+ db SPLASH
+ db BUBBLEBEAM
+ db HAZE
+ db MIND_READER
+ db $ff
+
+AbraEggMoves:
+ db LIGHT_SCREEN
+ db ENCORE
+ db BARRIER
+ db $ff
+
+MachopEggMoves:
+ db LIGHT_SCREEN
+ db MEDITATE
+ db ROLLING_KICK
+ db ENCORE
+ db $ff
+
+BellsproutEggMoves:
+ db SWORDS_DANCE
+ db ENCORE
+ db REFLECT
+ db SYNTHESIS
+ db LEECH_LIFE
+ db $ff
+
+TentacoolEggMoves:
+ db AURORA_BEAM
+ db MIRROR_COAT
+ db RAPID_SPIN
+ db HAZE
+ db SAFEGUARD
+ db $ff
+
+GeodudeEggMoves:
+ db MEGA_PUNCH
+ db ROCK_SLIDE
+ db $ff
+
+PonytaEggMoves:
+ db FLAME_WHEEL
+ db THRASH
+ db DOUBLE_KICK
+ db HYPNOSIS
+ db CHARM
+ db QUICK_ATTACK
+ db $ff
+
+SlowpokeEggMoves:
+ db SAFEGUARD
+ db BELLY_DRUM
+ db FUTURE_SIGHT
+ db STOMP
+ db $ff
+
+FarfetchDEggMoves:
+if !_CRYSTAL
+ db STEEL_WING
+endc
+ db FORESIGHT
+ db MIRROR_MOVE
+ db GUST
+ db QUICK_ATTACK
+ db FLAIL
+ db $ff
+
+DoduoEggMoves:
+ db QUICK_ATTACK
+ db SUPERSONIC
+ db HAZE
+ db FAINT_ATTACK
+ db FLAIL
+ db $ff
+
+SeelEggMoves:
+ db LICK
+ db PERISH_SONG
+ db DISABLE
+ db PECK
+ db SLAM
+ db ENCORE
+ db $ff
+
+GrimerEggMoves:
+ db HAZE
+ db MEAN_LOOK
+ db LICK
+ db $ff
+
+ShellderEggMoves:
+ db BUBBLEBEAM
+ db TAKE_DOWN
+ db BARRIER
+ db RAPID_SPIN
+ db SCREECH
+ db $ff
+
+GastlyEggMoves:
+ db PSYWAVE
+ db PERISH_SONG
+ db HAZE
+ db $ff
+
+OnixEggMoves:
+ db ROCK_SLIDE
+ db FLAIL
+ db $ff
+
+DrowzeeEggMoves:
+ db LIGHT_SCREEN
+ db BARRIER
+ db $ff
+
+KrabbyEggMoves:
+ db DIG
+ db HAZE
+ db AMNESIA
+ db FLAIL
+ db SLAM
+ db $ff
+
+ExeggcuteEggMoves:
+ db SYNTHESIS
+ db MOONLIGHT
+ db REFLECT
+ db MEGA_DRAIN
+ db ANCIENTPOWER
+ db $ff
+
+CuboneEggMoves:
+ db ROCK_SLIDE
+ db ANCIENTPOWER
+ db BELLY_DRUM
+ db SCREECH
+ db SKULL_BASH
+ db PERISH_SONG
+if _CRYSTAL
+ db SWORDS_DANCE
+endc
+ db $ff
+
+LickitungEggMoves:
+ db BELLY_DRUM
+ db MAGNITUDE
+ db BODY_SLAM
+ db $ff
+
+KoffingEggMoves:
+ db SCREECH
+ db PSYWAVE
+ db PSYBEAM
+ db DESTINY_BOND
+ db PAIN_SPLIT
+ db $ff
+
+RhyhornEggMoves:
+ db CRUNCH
+ db REVERSAL
+ db ROCK_SLIDE
+ db THRASH
+ db PURSUIT
+ db COUNTER
+ db MAGNITUDE
+ db $ff
+
+ChanseyEggMoves:
+ db PRESENT
+ db METRONOME
+ db HEAL_BELL
+ db $ff
+
+TangelaEggMoves:
+ db FLAIL
+ db CONFUSION
+ db MEGA_DRAIN
+ db REFLECT
+ db AMNESIA
+ db $ff
+
+KangaskhanEggMoves:
+ db STOMP
+ db FORESIGHT
+ db FOCUS_ENERGY
+ db SAFEGUARD
+ db DISABLE
+ db $ff
+
+HorseaEggMoves:
+ db FLAIL
+ db AURORA_BEAM
+ db OCTAZOOKA
+ db DISABLE
+ db SPLASH
+ db DRAGON_RAGE
+ db $ff
+
+GoldeenEggMoves:
+ db PSYBEAM
+ db HAZE
+ db HYDRO_PUMP
+ db $ff
+
+if !_CRYSTAL
+StaryuEggMoves:
+ db AURORA_BEAM
+ db BARRIER
+ db SUPERSONIC
+ db $ff
+endc
+
+MrMimeEggMoves:
+ db FUTURE_SIGHT
+ db HYPNOSIS
+ db MIMIC
+ db $ff
+
+ScytherEggMoves:
+ db COUNTER
+ db SAFEGUARD
+ db BATON_PASS
+ db RAZOR_WIND
+ db REVERSAL
+ db LIGHT_SCREEN
+ db $ff
+
+PinsirEggMoves:
+ db FURY_ATTACK
+ db FLAIL
+ db $ff
+
+LaprasEggMoves:
+ db AURORA_BEAM
+ db FORESIGHT
+ db $ff
+
+EeveeEggMoves:
+ db FLAIL
+ db CHARM
+ db $ff
+
+OmanyteEggMoves:
+ db BUBBLEBEAM
+ db AURORA_BEAM
+ db SLAM
+ db SUPERSONIC
+ db HAZE
+ db $ff
+
+KabutoEggMoves:
+ db BUBBLEBEAM
+ db AURORA_BEAM
+ db RAPID_SPIN
+ db DIG
+ db FLAIL
+ db $ff
+
+AerodactylEggMoves:
+ db WHIRLWIND
+ db PURSUIT
+ db FORESIGHT
+if !_CRYSTAL
+ db STEEL_WING
+endc
+ db $ff
+
+SnorlaxEggMoves:
+ db LICK
+if !_CRYSTAL
+ db CHARM
+endc
+ db $ff
+
+DratiniEggMoves:
+ db LIGHT_SCREEN
+ db MIST
+ db HAZE
+ db SUPERSONIC
+ db $ff
+
+ChikoritaEggMoves:
+ db VINE_WHIP
+ db LEECH_SEED
+ db COUNTER
+ db ANCIENTPOWER
+ db FLAIL
+ db SWORDS_DANCE
+ db $ff
+
+CyndaquilEggMoves:
+ db FURY_SWIPES
+ db QUICK_ATTACK
+ db REVERSAL
+ db THRASH
+ db FORESIGHT
+if _CRYSTAL
+ db SUBMISSION
+endc
+ db $ff
+
+TotodileEggMoves:
+ db CRUNCH
+ db THRASH
+ db HYDRO_PUMP
+ db ANCIENTPOWER
+ db RAZOR_WIND
+ db ROCK_SLIDE
+ db $ff
+
+SentretEggMoves:
+ db DOUBLE_EDGE
+ db PURSUIT
+ db SLASH
+ db FOCUS_ENERGY
+ db REVERSAL
+ db $ff
+
+HoothootEggMoves:
+ db MIRROR_MOVE
+ db SUPERSONIC
+ db FAINT_ATTACK
+ db WING_ATTACK
+ db WHIRLWIND
+if _CRYSTAL
+ db SKY_ATTACK
+endc
+ db $ff
+
+LedybaEggMoves:
+ db PSYBEAM
+ db BIDE
+ db LIGHT_SCREEN
+ db $ff
+
+SpinarakEggMoves:
+ db PSYBEAM
+ db DISABLE
+ db SONICBOOM
+ db BATON_PASS
+ db PURSUIT
+ db $ff
+
+ChinchouEggMoves:
+ db FLAIL
+ db SUPERSONIC
+ db SCREECH
+ db $ff
+
+PichuEggMoves:
+ db REVERSAL
+ db BIDE
+ db PRESENT
+ db ENCORE
+ db DOUBLESLAP
+ db $ff
+
+CleffaEggMoves:
+ db PRESENT
+ db METRONOME
+ db AMNESIA
+ db BELLY_DRUM
+ db SPLASH
+ db MIMIC
+ db $ff
+
+IgglybuffEggMoves:
+ db PERISH_SONG
+ db PRESENT
+ db FAINT_ATTACK
+ db $ff
+
+TogepiEggMoves:
+ db PRESENT
+ db MIRROR_MOVE
+ db PECK
+ db FORESIGHT
+ db FUTURE_SIGHT
+ db $ff
+
+NatuEggMoves:
+ db HAZE
+ db DRILL_PECK
+ db QUICK_ATTACK
+ db FAINT_ATTACK
+ db STEEL_WING
+ db $ff
+
+MareepEggMoves:
+ db THUNDERBOLT
+ db TAKE_DOWN
+ db BODY_SLAM
+ db SAFEGUARD
+ db SCREECH
+ db REFLECT
+ db $ff
+
+MarillEggMoves:
+ db LIGHT_SCREEN
+ db PRESENT
+ db AMNESIA
+ db FUTURE_SIGHT
+ db BELLY_DRUM
+ db PERISH_SONG
+ db SUPERSONIC
+ db FORESIGHT
+ db $ff
+
+SudowoodoEggMoves:
+ db SELFDESTRUCT
+ db $ff
+
+HoppipEggMoves:
+ db CONFUSION
+ db GROWL
+ db ENCORE
+ db DOUBLE_EDGE
+ db REFLECT
+ db AMNESIA
+ db PAY_DAY
+ db $ff
+
+AipomEggMoves:
+ db COUNTER
+ db SCREECH
+ db PURSUIT
+ db AGILITY
+ db SPITE
+ db SLAM
+ db DOUBLESLAP
+ db BEAT_UP
+ db $ff
+
+YanmaEggMoves:
+ db WHIRLWIND
+ db REVERSAL
+ db LEECH_LIFE
+ db $ff
+
+WooperEggMoves:
+ db BODY_SLAM
+ db ANCIENTPOWER
+ db SAFEGUARD
+ db $ff
+
+MurkrowEggMoves:
+ db WHIRLWIND
+ db DRILL_PECK
+ db QUICK_ATTACK
+ db MIRROR_MOVE
+ db WING_ATTACK
+if _CRYSTAL
+ db SKY_ATTACK
+endc
+ db $ff
+
+MisdreavusEggMoves:
+ db SCREECH
+ db DESTINY_BOND
+ db $ff
+
+GirafarigEggMoves:
+ db TAKE_DOWN
+ db AMNESIA
+ db FORESIGHT
+ db FUTURE_SIGHT
+ db BEAT_UP
+ db $ff
+
+PinecoEggMoves:
+ db REFLECT
+ db PIN_MISSILE
+ db FLAIL
+ db SWIFT
+ db $ff
+
+DunsparceEggMoves:
+ db BIDE
+ db ANCIENTPOWER
+ db ROCK_SLIDE
+ db BITE
+ db RAGE
+ db $ff
+
+GligarEggMoves:
+ db METAL_CLAW
+ db WING_ATTACK
+ db RAZOR_WIND
+ db COUNTER
+ db $ff
+
+SnubbullEggMoves:
+ db METRONOME
+ db FAINT_ATTACK
+ db REFLECT
+ db PRESENT
+ db CRUNCH
+ db HEAL_BELL
+ db LICK
+ db LEER
+ db $ff
+
+QwilfishEggMoves:
+ db FLAIL
+ db HAZE
+ db BUBBLEBEAM
+ db SUPERSONIC
+ db $ff
+
+ShuckleEggMoves:
+ db SWEET_SCENT
+ db $ff
+
+HeracrossEggMoves:
+ db HARDEN
+ db BIDE
+ db FLAIL
+ db $ff
+
+SneaselEggMoves:
+ db COUNTER
+ db SPITE
+ db FORESIGHT
+ db REFLECT
+ db BITE
+ db $ff
+
+TeddiursaEggMoves:
+ db CRUNCH
+ db TAKE_DOWN
+ db SEISMIC_TOSS
+ db FOCUS_ENERGY
+ db COUNTER
+if _CRYSTAL
+ db METAL_CLAW
+endc
+ db $ff
+
+SlugmaEggMoves:
+ db ACID_ARMOR
+ db $ff
+
+SwinubEggMoves:
+ db TAKE_DOWN
+ db BITE
+ db BODY_SLAM
+ db ROCK_SLIDE
+ db ANCIENTPOWER
+ db $ff
+
+CorsolaEggMoves:
+ db ROCK_SLIDE
+ db SAFEGUARD
+ db SCREECH
+ db MIST
+ db AMNESIA
+ db $ff
+
+RemoraidEggMoves:
+ db AURORA_BEAM
+ db OCTAZOOKA
+ db SUPERSONIC
+ db HAZE
+ db SCREECH
+ db $ff
+
+DelibirdEggMoves:
+ db AURORA_BEAM
+ db QUICK_ATTACK
+ db FUTURE_SIGHT
+ db SPLASH
+ db RAPID_SPIN
+ db $ff
+
+MantineEggMoves:
+ db TWISTER
+ db HYDRO_PUMP
+ db HAZE
+ db SLAM
+ db $ff
+
+SkarmoryEggMoves:
+ db DRILL_PECK
+ db PURSUIT
+ db WHIRLWIND
+if _CRYSTAL
+ db SKY_ATTACK
+endc
+ db $ff
+
+HoundourEggMoves:
+ db FIRE_SPIN
+ db RAGE
+ db PURSUIT
+ db COUNTER
+ db SPITE
+ db REVERSAL
+ db BEAT_UP
+ db $ff
+
+PhanpyEggMoves:
+ db FOCUS_ENERGY
+ db BODY_SLAM
+ db ANCIENTPOWER
+if _CRYSTAL
+ db WATER_GUN
+endc
+ db $ff
+
+StantlerEggMoves:
+ db REFLECT
+ db SPITE
+ db DISABLE
+ db LIGHT_SCREEN
+ db BITE
+ db $ff
+
+TyrogueEggMoves:
+ db RAPID_SPIN
+ db HI_JUMP_KICK
+ db MACH_PUNCH
+ db MIND_READER
+ db $ff
+
+SmoochumEggMoves:
+if !_CRYSTAL
+ db LOVELY_KISS
+endc
+ db MEDITATE
+ db $ff
+
+ElekidEggMoves:
+ db KARATE_CHOP
+ db BARRIER
+ db ROLLING_KICK
+ db MEDITATE
+if _CRYSTAL
+ db CROSS_CHOP
+endc
+ db $ff
+
+MagbyEggMoves:
+ db KARATE_CHOP
+ db MEGA_PUNCH
+ db BARRIER
+ db SCREECH
+if _CRYSTAL
+ db CROSS_CHOP
+endc
+ db $ff
+
+MiltankEggMoves:
+ db PRESENT
+ db REVERSAL
+ db SEISMIC_TOSS
+ db $ff
+
+LarvitarEggMoves:
+ db PURSUIT
+ db STOMP
+ db OUTRAGE
+ db FOCUS_ENERGY
+ db ANCIENTPOWER
+ db $ff
+
+NoEggMoves:
+ db $ff
diff --git a/data/pokemon/evos_attacks.asm b/data/pokemon/evos_attacks.asm
new file mode 100644
index 000000000..f21febf87
--- /dev/null
+++ b/data/pokemon/evos_attacks.asm
@@ -0,0 +1,3398 @@
+INCLUDE "includes.asm"
+
+
+SECTION "Evolutions and Attacks", ROMX
+
+
+INCLUDE "data/pokemon/evos_attacks_pointers.asm"
+
+
+EvosAttacks::
+
+BulbasaurEvosAttacks:
+ db EVOLVE_LEVEL, 16, IVYSAUR
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 4, GROWL
+ db 7, LEECH_SEED
+ db 10, VINE_WHIP
+ db 15, POISONPOWDER
+ db 15, SLEEP_POWDER
+ db 20, RAZOR_LEAF
+ db 25, SWEET_SCENT
+ db 32, GROWTH
+ db 39, SYNTHESIS
+ db 46, SOLARBEAM
+ db 0 ; no more level-up moves
+
+IvysaurEvosAttacks:
+ db EVOLVE_LEVEL, 32, VENUSAUR
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, GROWL
+ db 1, LEECH_SEED
+ db 4, GROWL
+ db 7, LEECH_SEED
+ db 10, VINE_WHIP
+ db 15, POISONPOWDER
+ db 15, SLEEP_POWDER
+ db 22, RAZOR_LEAF
+ db 29, SWEET_SCENT
+ db 38, GROWTH
+ db 47, SYNTHESIS
+ db 56, SOLARBEAM
+ db 0 ; no more level-up moves
+
+VenusaurEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, GROWL
+ db 1, LEECH_SEED
+ db 1, VINE_WHIP
+ db 4, GROWL
+ db 7, LEECH_SEED
+ db 10, VINE_WHIP
+ db 15, POISONPOWDER
+ db 15, SLEEP_POWDER
+ db 22, RAZOR_LEAF
+ db 29, SWEET_SCENT
+ db 41, GROWTH
+ db 53, SYNTHESIS
+ db 65, SOLARBEAM
+ db 0 ; no more level-up moves
+
+CharmanderEvosAttacks:
+ db EVOLVE_LEVEL, 16, CHARMELEON
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, GROWL
+ db 7, EMBER
+ db 13, SMOKESCREEN
+ db 19, RAGE
+ db 25, SCARY_FACE
+ db 31, FLAMETHROWER
+ db 37, SLASH
+ db 43, DRAGON_RAGE
+ db 49, FIRE_SPIN
+ db 0 ; no more level-up moves
+
+CharmeleonEvosAttacks:
+ db EVOLVE_LEVEL, 36, CHARIZARD
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, GROWL
+ db 1, EMBER
+ db 7, EMBER
+ db 13, SMOKESCREEN
+ db 20, RAGE
+ db 27, SCARY_FACE
+ db 34, FLAMETHROWER
+ db 41, SLASH
+ db 48, DRAGON_RAGE
+ db 55, FIRE_SPIN
+ db 0 ; no more level-up moves
+
+CharizardEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, GROWL
+ db 1, EMBER
+ db 1, SMOKESCREEN
+ db 7, EMBER
+ db 13, SMOKESCREEN
+ db 20, RAGE
+ db 27, SCARY_FACE
+ db 34, FLAMETHROWER
+ db 36, WING_ATTACK
+ db 44, SLASH
+ db 54, DRAGON_RAGE
+ db 64, FIRE_SPIN
+ db 0 ; no more level-up moves
+
+SquirtleEvosAttacks:
+ db EVOLVE_LEVEL, 16, WARTORTLE
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 4, TAIL_WHIP
+ db 7, BUBBLE
+ db 10, WITHDRAW
+ db 13, WATER_GUN
+ db 18, BITE
+ db 23, RAPID_SPIN
+ db 28, PROTECT
+ db 33, RAIN_DANCE
+ db 40, SKULL_BASH
+ db 47, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+WartortleEvosAttacks:
+ db EVOLVE_LEVEL, 36, BLASTOISE
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, TAIL_WHIP
+ db 1, BUBBLE
+ db 4, TAIL_WHIP
+ db 7, BUBBLE
+ db 10, WITHDRAW
+ db 13, WATER_GUN
+ db 19, BITE
+ db 25, RAPID_SPIN
+ db 31, PROTECT
+ db 37, RAIN_DANCE
+ db 45, SKULL_BASH
+ db 53, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+BlastoiseEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, TAIL_WHIP
+ db 1, BUBBLE
+ db 1, WITHDRAW
+ db 4, TAIL_WHIP
+ db 7, BUBBLE
+ db 10, WITHDRAW
+ db 13, WATER_GUN
+ db 19, BITE
+ db 25, RAPID_SPIN
+ db 31, PROTECT
+ db 42, RAIN_DANCE
+ db 55, SKULL_BASH
+ db 68, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+CaterpieEvosAttacks:
+ db EVOLVE_LEVEL, 7, METAPOD
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, STRING_SHOT
+ db 0 ; no more level-up moves
+
+MetapodEvosAttacks:
+ db EVOLVE_LEVEL, 10, BUTTERFREE
+ db 0 ; no more evolutions
+ db 1, HARDEN
+ db 7, HARDEN
+ db 0 ; no more level-up moves
+
+ButterfreeEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, CONFUSION
+ db 10, CONFUSION
+ db 13, POISONPOWDER
+ db 14, STUN_SPORE
+ db 15, SLEEP_POWDER
+ db 18, SUPERSONIC
+ db 23, WHIRLWIND
+ db 28, GUST
+ db 34, PSYBEAM
+ db 40, SAFEGUARD
+ db 0 ; no more level-up moves
+
+WeedleEvosAttacks:
+ db EVOLVE_LEVEL, 7, KAKUNA
+ db 0 ; no more evolutions
+ db 1, POISON_STING
+ db 1, STRING_SHOT
+ db 0 ; no more level-up moves
+
+KakunaEvosAttacks:
+ db EVOLVE_LEVEL, 10, BEEDRILL
+ db 0 ; no more evolutions
+ db 1, HARDEN
+ db 7, HARDEN
+ db 0 ; no more level-up moves
+
+BeedrillEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, FURY_ATTACK
+ db 10, FURY_ATTACK
+ db 15, FOCUS_ENERGY
+ db 20, TWINEEDLE
+ db 25, RAGE
+ db 30, PURSUIT
+ db 35, PIN_MISSILE
+ db 40, AGILITY
+ db 0 ; no more level-up moves
+
+PidgeyEvosAttacks:
+ db EVOLVE_LEVEL, 18, PIDGEOTTO
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 5, SAND_ATTACK
+ db 9, GUST
+ db 15, QUICK_ATTACK
+ db 21, WHIRLWIND
+ db 29, WING_ATTACK
+ db 37, AGILITY
+ db 47, MIRROR_MOVE
+ db 0 ; no more level-up moves
+
+PidgeottoEvosAttacks:
+ db EVOLVE_LEVEL, 36, PIDGEOT
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, SAND_ATTACK
+ db 1, GUST
+ db 5, SAND_ATTACK
+ db 9, GUST
+ db 15, QUICK_ATTACK
+ db 23, WHIRLWIND
+ db 33, WING_ATTACK
+ db 43, AGILITY
+ db 55, MIRROR_MOVE
+ db 0 ; no more level-up moves
+
+PidgeotEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, SAND_ATTACK
+ db 1, GUST
+ db 1, QUICK_ATTACK
+ db 5, SAND_ATTACK
+ db 9, GUST
+ db 15, QUICK_ATTACK
+ db 23, WHIRLWIND
+ db 33, WING_ATTACK
+ db 46, AGILITY
+ db 61, MIRROR_MOVE
+ db 0 ; no more level-up moves
+
+RattataEvosAttacks:
+ db EVOLVE_LEVEL, 20, RATICATE
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, TAIL_WHIP
+ db 7, QUICK_ATTACK
+ db 13, HYPER_FANG
+ db 20, FOCUS_ENERGY
+ db 27, PURSUIT
+ db 34, SUPER_FANG
+ db 0 ; no more level-up moves
+
+RaticateEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, TAIL_WHIP
+ db 1, QUICK_ATTACK
+ db 7, QUICK_ATTACK
+ db 13, HYPER_FANG
+ db 20, SCARY_FACE
+ db 30, PURSUIT
+ db 40, SUPER_FANG
+ db 0 ; no more level-up moves
+
+SpearowEvosAttacks:
+ db EVOLVE_LEVEL, 20, FEAROW
+ db 0 ; no more evolutions
+ db 1, PECK
+ db 1, GROWL
+ db 7, LEER
+ db 13, FURY_ATTACK
+ db 25, PURSUIT
+ db 31, MIRROR_MOVE
+ db 37, DRILL_PECK
+ db 43, AGILITY
+ db 0 ; no more level-up moves
+
+FearowEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, PECK
+ db 1, GROWL
+ db 1, LEER
+ db 1, FURY_ATTACK
+ db 7, LEER
+ db 13, FURY_ATTACK
+ db 26, PURSUIT
+ db 32, MIRROR_MOVE
+ db 40, DRILL_PECK
+ db 47, AGILITY
+ db 0 ; no more level-up moves
+
+EkansEvosAttacks:
+ db EVOLVE_LEVEL, 22, ARBOK
+ db 0 ; no more evolutions
+ db 1, WRAP
+ db 1, LEER
+ db 9, POISON_STING
+ db 15, BITE
+ db 23, GLARE
+ db 29, SCREECH
+ db 37, ACID
+ db 43, HAZE
+ db 0 ; no more level-up moves
+
+ArbokEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, WRAP
+ db 1, LEER
+ db 1, POISON_STING
+ db 1, BITE
+ db 9, POISON_STING
+ db 15, BITE
+ db 25, GLARE
+ db 33, SCREECH
+ db 43, ACID
+ db 51, HAZE
+ db 0 ; no more level-up moves
+
+PikachuEvosAttacks:
+ db EVOLVE_ITEM, THUNDERSTONE, RAICHU
+ db 0 ; no more evolutions
+ db 1, THUNDERSHOCK
+ db 1, GROWL
+ db 6, TAIL_WHIP
+ db 8, THUNDER_WAVE
+ db 11, QUICK_ATTACK
+ db 15, DOUBLE_TEAM
+ db 20, SLAM
+ db 26, THUNDERBOLT
+ db 33, AGILITY
+ db 41, THUNDER
+ db 50, LIGHT_SCREEN
+ db 0 ; no more level-up moves
+
+RaichuEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, THUNDERSHOCK
+ db 1, TAIL_WHIP
+ db 1, QUICK_ATTACK
+ db 1, THUNDERBOLT
+ db 0 ; no more level-up moves
+
+SandshrewEvosAttacks:
+ db EVOLVE_LEVEL, 22, SANDSLASH
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 6, DEFENSE_CURL
+ db 11, SAND_ATTACK
+ db 17, POISON_STING
+ db 23, SLASH
+ db 30, SWIFT
+ db 37, FURY_SWIPES
+ db 45, SANDSTORM
+ db 0 ; no more level-up moves
+
+SandslashEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, DEFENSE_CURL
+ db 1, SAND_ATTACK
+ db 6, DEFENSE_CURL
+ db 11, SAND_ATTACK
+ db 17, POISON_STING
+ db 24, SLASH
+ db 33, SWIFT
+ db 42, FURY_SWIPES
+ db 52, SANDSTORM
+ db 0 ; no more level-up moves
+
+NidoranFEvosAttacks:
+ db EVOLVE_LEVEL, 16, NIDORINA
+ db 0 ; no more evolutions
+ db 1, GROWL
+ db 1, TACKLE
+ db 8, SCRATCH
+ db 12, DOUBLE_KICK
+ db 17, POISON_STING
+ db 23, TAIL_WHIP
+ db 30, BITE
+ db 38, FURY_SWIPES
+ db 0 ; no more level-up moves
+
+NidorinaEvosAttacks:
+ db EVOLVE_ITEM, MOON_STONE, NIDOQUEEN
+ db 0 ; no more evolutions
+ db 1, GROWL
+ db 1, TACKLE
+ db 8, SCRATCH
+ db 12, DOUBLE_KICK
+ db 19, POISON_STING
+ db 27, TAIL_WHIP
+ db 36, BITE
+ db 46, FURY_SWIPES
+ db 0 ; no more level-up moves
+
+NidoqueenEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, SCRATCH
+ db 1, DOUBLE_KICK
+ db 1, TAIL_WHIP
+ db 23, BODY_SLAM
+ db 0 ; no more level-up moves
+
+NidoranMEvosAttacks:
+ db EVOLVE_LEVEL, 16, NIDORINO
+ db 0 ; no more evolutions
+ db 1, LEER
+ db 1, TACKLE
+ db 8, HORN_ATTACK
+ db 12, DOUBLE_KICK
+ db 17, POISON_STING
+ db 23, FOCUS_ENERGY
+ db 30, FURY_ATTACK
+ db 38, HORN_DRILL
+ db 0 ; no more level-up moves
+
+NidorinoEvosAttacks:
+ db EVOLVE_ITEM, MOON_STONE, NIDOKING
+ db 0 ; no more evolutions
+ db 1, LEER
+ db 1, TACKLE
+ db 8, HORN_ATTACK
+ db 12, DOUBLE_KICK
+ db 19, POISON_STING
+ db 27, FOCUS_ENERGY
+ db 36, FURY_ATTACK
+ db 46, HORN_DRILL
+ db 0 ; no more level-up moves
+
+NidokingEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, HORN_ATTACK
+ db 1, DOUBLE_KICK
+ db 1, POISON_STING
+ db 23, THRASH
+ db 0 ; no more level-up moves
+
+ClefairyEvosAttacks:
+ db EVOLVE_ITEM, MOON_STONE, CLEFABLE
+ db 0 ; no more evolutions
+ db 1, POUND
+ db 1, GROWL
+ db 4, ENCORE
+ db 8, SING
+ db 13, DOUBLESLAP
+ db 19, MINIMIZE
+ db 26, DEFENSE_CURL
+ db 34, METRONOME
+ db 43, MOONLIGHT
+ db 53, LIGHT_SCREEN
+ db 0 ; no more level-up moves
+
+ClefableEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SING
+ db 1, DOUBLESLAP
+ db 1, METRONOME
+ db 1, MOONLIGHT
+ db 0 ; no more level-up moves
+
+VulpixEvosAttacks:
+ db EVOLVE_ITEM, FIRE_STONE, NINETALES
+ db 0 ; no more evolutions
+ db 1, EMBER
+ db 1, TAIL_WHIP
+ db 7, QUICK_ATTACK
+ db 13, ROAR
+ db 19, CONFUSE_RAY
+ db 25, SAFEGUARD
+ db 31, FLAMETHROWER
+ db 37, FIRE_SPIN
+ db 0 ; no more level-up moves
+
+NinetalesEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, EMBER
+ db 1, QUICK_ATTACK
+ db 1, CONFUSE_RAY
+ db 1, SAFEGUARD
+ db 43, FIRE_SPIN
+ db 0 ; no more level-up moves
+
+JigglypuffEvosAttacks:
+ db EVOLVE_ITEM, MOON_STONE, WIGGLYTUFF
+ db 0 ; no more evolutions
+ db 1, SING
+ db 4, DEFENSE_CURL
+ db 9, POUND
+ db 14, DISABLE
+ db 19, ROLLOUT
+ db 24, DOUBLESLAP
+ db 29, REST
+ db 34, BODY_SLAM
+ db 39, DOUBLE_EDGE
+ db 0 ; no more level-up moves
+
+WigglytuffEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SING
+ db 1, DISABLE
+ db 1, DEFENSE_CURL
+ db 1, DOUBLESLAP
+ db 0 ; no more level-up moves
+
+ZubatEvosAttacks:
+ db EVOLVE_LEVEL, 22, GOLBAT
+ db 0 ; no more evolutions
+ db 1, LEECH_LIFE
+ db 6, SUPERSONIC
+ db 12, BITE
+ db 19, CONFUSE_RAY
+ db 27, WING_ATTACK
+ db 36, MEAN_LOOK
+ db 46, HAZE
+ db 0 ; no more level-up moves
+
+GolbatEvosAttacks:
+ db EVOLVE_HAPPINESS, TR_ANYTIME, CROBAT
+ db 0 ; no more evolutions
+ db 1, SCREECH
+ db 1, LEECH_LIFE
+ db 1, SUPERSONIC
+ db 6, SUPERSONIC
+ db 12, BITE
+ db 19, CONFUSE_RAY
+ db 30, WING_ATTACK
+ db 42, MEAN_LOOK
+ db 55, HAZE
+ db 0 ; no more level-up moves
+
+OddishEvosAttacks:
+ db EVOLVE_LEVEL, 21, GLOOM
+ db 0 ; no more evolutions
+ db 1, ABSORB
+ db 7, SWEET_SCENT
+ db 14, POISONPOWDER
+ db 16, STUN_SPORE
+ db 18, SLEEP_POWDER
+ db 23, ACID
+ db 32, MOONLIGHT
+ db 39, PETAL_DANCE
+ db 0 ; no more level-up moves
+
+GloomEvosAttacks:
+ db EVOLVE_ITEM, LEAF_STONE, VILEPLUME
+ db EVOLVE_ITEM, SUN_STONE, BELLOSSOM
+ db 0 ; no more evolutions
+ db 1, ABSORB
+ db 1, SWEET_SCENT
+ db 1, POISONPOWDER
+ db 7, SWEET_SCENT
+ db 14, POISONPOWDER
+ db 16, STUN_SPORE
+ db 18, SLEEP_POWDER
+ db 24, ACID
+ db 35, MOONLIGHT
+ db 44, PETAL_DANCE
+ db 0 ; no more level-up moves
+
+VileplumeEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, ABSORB
+ db 1, SWEET_SCENT
+ db 1, STUN_SPORE
+ db 1, PETAL_DANCE
+ db 0 ; no more level-up moves
+
+ParasEvosAttacks:
+ db EVOLVE_LEVEL, 24, PARASECT
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 7, STUN_SPORE
+ db 13, POISONPOWDER
+ db 19, LEECH_LIFE
+ db 25, SPORE
+ db 31, SLASH
+ db 37, GROWTH
+ db 43, GIGA_DRAIN
+ db 0 ; no more level-up moves
+
+ParasectEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, STUN_SPORE
+ db 1, POISONPOWDER
+ db 7, STUN_SPORE
+ db 13, POISONPOWDER
+ db 19, LEECH_LIFE
+ db 28, SPORE
+ db 37, SLASH
+ db 46, GROWTH
+ db 55, GIGA_DRAIN
+ db 0 ; no more level-up moves
+
+VenonatEvosAttacks:
+ db EVOLVE_LEVEL, 31, VENOMOTH
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, DISABLE
+ db 1, FORESIGHT
+ db 9, SUPERSONIC
+ db 17, CONFUSION
+ db 20, POISONPOWDER
+ db 25, LEECH_LIFE
+ db 28, STUN_SPORE
+ db 33, PSYBEAM
+ db 36, SLEEP_POWDER
+ db 41, PSYCHIC_M
+ db 0 ; no more level-up moves
+
+VenomothEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, DISABLE
+ db 1, FORESIGHT
+ db 1, SUPERSONIC
+ db 9, SUPERSONIC
+ db 17, CONFUSION
+ db 20, POISONPOWDER
+ db 25, LEECH_LIFE
+ db 28, STUN_SPORE
+ db 31, GUST
+ db 36, PSYBEAM
+ db 42, SLEEP_POWDER
+ db 52, PSYCHIC_M
+ db 0 ; no more level-up moves
+
+DiglettEvosAttacks:
+ db EVOLVE_LEVEL, 26, DUGTRIO
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 5, GROWL
+ db 9, MAGNITUDE
+ db 17, DIG
+ db 25, SAND_ATTACK
+ db 33, SLASH
+ db 41, EARTHQUAKE
+ db 49, FISSURE
+ db 0 ; no more level-up moves
+
+DugtrioEvosAttacks:
+ db 0 ; no more evolutions
+if _CRYSTAL
+ db 1, TRI_ATTACK
+endc
+ db 1, SCRATCH
+ db 1, GROWL
+ db 1, MAGNITUDE
+ db 5, GROWL
+ db 9, MAGNITUDE
+ db 17, DIG
+ db 25, SAND_ATTACK
+ db 37, SLASH
+ db 49, EARTHQUAKE
+ db 61, FISSURE
+ db 0 ; no more level-up moves
+
+MeowthEvosAttacks:
+ db EVOLVE_LEVEL, 28, PERSIAN
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, GROWL
+ db 11, BITE
+ db 20, PAY_DAY
+ db 28, FAINT_ATTACK
+ db 35, SCREECH
+ db 41, FURY_SWIPES
+ db 46, SLASH
+ db 0 ; no more level-up moves
+
+PersianEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, GROWL
+ db 1, BITE
+ db 11, BITE
+ db 20, PAY_DAY
+ db 29, FAINT_ATTACK
+ db 38, SCREECH
+ db 46, FURY_SWIPES
+ db 53, SLASH
+ db 0 ; no more level-up moves
+
+PsyduckEvosAttacks:
+ db EVOLVE_LEVEL, 33, GOLDUCK
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 5, TAIL_WHIP
+ db 10, DISABLE
+ db 16, CONFUSION
+ db 23, SCREECH
+ db 31, PSYCH_UP
+ db 40, FURY_SWIPES
+ db 50, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+GolduckEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, TAIL_WHIP
+ db 1, DISABLE
+ db 1, CONFUSION
+ db 5, TAIL_WHIP
+ db 10, DISABLE
+ db 16, CONFUSION
+ db 23, SCREECH
+ db 31, PSYCH_UP
+ db 44, FURY_SWIPES
+ db 58, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+MankeyEvosAttacks:
+ db EVOLVE_LEVEL, 28, PRIMEAPE
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, LEER
+ db 9, LOW_KICK
+ db 15, KARATE_CHOP
+ db 21, FURY_SWIPES
+ db 27, FOCUS_ENERGY
+ db 33, SEISMIC_TOSS
+ db 39, CROSS_CHOP
+ db 45, SCREECH
+ db 51, THRASH
+ db 0 ; no more level-up moves
+
+PrimeapeEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, LEER
+ db 1, LOW_KICK
+ db 1, RAGE
+ db 9, LOW_KICK
+ db 15, KARATE_CHOP
+ db 21, FURY_SWIPES
+ db 27, FOCUS_ENERGY
+ db 28, RAGE
+ db 36, SEISMIC_TOSS
+ db 45, CROSS_CHOP
+ db 54, SCREECH
+ db 63, THRASH
+ db 0 ; no more level-up moves
+
+GrowlitheEvosAttacks:
+ db EVOLVE_ITEM, FIRE_STONE, ARCANINE
+ db 0 ; no more evolutions
+ db 1, BITE
+ db 1, ROAR
+ db 9, EMBER
+ db 18, LEER
+ db 26, TAKE_DOWN
+ db 34, FLAME_WHEEL
+ db 42, AGILITY
+ db 50, FLAMETHROWER
+ db 0 ; no more level-up moves
+
+ArcanineEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, ROAR
+ db 1, LEER
+ db 1, TAKE_DOWN
+ db 1, FLAME_WHEEL
+ db 50, EXTREMESPEED
+ db 0 ; no more level-up moves
+
+PoliwagEvosAttacks:
+ db EVOLVE_LEVEL, 25, POLIWHIRL
+ db 0 ; no more evolutions
+ db 1, BUBBLE
+ db 7, HYPNOSIS
+ db 13, WATER_GUN
+ db 19, DOUBLESLAP
+ db 25, RAIN_DANCE
+ db 31, BODY_SLAM
+ db 37, BELLY_DRUM
+ db 43, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+PoliwhirlEvosAttacks:
+ db EVOLVE_ITEM, WATER_STONE, POLIWRATH
+ db EVOLVE_TRADE, KINGS_ROCK, POLITOED
+ db 0 ; no more evolutions
+ db 1, BUBBLE
+ db 1, HYPNOSIS
+ db 1, WATER_GUN
+ db 7, HYPNOSIS
+ db 13, WATER_GUN
+ db 19, DOUBLESLAP
+ db 27, RAIN_DANCE
+ db 35, BODY_SLAM
+ db 43, BELLY_DRUM
+ db 51, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+PoliwrathEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, WATER_GUN
+ db 1, HYPNOSIS
+ db 1, DOUBLESLAP
+ db 1, SUBMISSION
+ db 35, SUBMISSION
+ db 51, MIND_READER
+ db 0 ; no more level-up moves
+
+AbraEvosAttacks:
+ db EVOLVE_LEVEL, 16, KADABRA
+ db 0 ; no more evolutions
+ db 1, TELEPORT
+ db 0 ; no more level-up moves
+
+KadabraEvosAttacks:
+ db EVOLVE_TRADE, $ff, ALAKAZAM
+ db 0 ; no more evolutions
+ db 1, TELEPORT
+ db 1, KINESIS
+ db 1, CONFUSION
+ db 16, CONFUSION
+ db 18, DISABLE
+ db 21, PSYBEAM
+ db 26, RECOVER
+ db 31, FUTURE_SIGHT
+ db 38, PSYCHIC_M
+ db 45, REFLECT
+ db 0 ; no more level-up moves
+
+AlakazamEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TELEPORT
+ db 1, KINESIS
+ db 1, CONFUSION
+ db 16, CONFUSION
+ db 18, DISABLE
+ db 21, PSYBEAM
+ db 26, RECOVER
+ db 31, FUTURE_SIGHT
+ db 38, PSYCHIC_M
+ db 45, REFLECT
+ db 0 ; no more level-up moves
+
+MachopEvosAttacks:
+ db EVOLVE_LEVEL, 28, MACHOKE
+ db 0 ; no more evolutions
+ db 1, LOW_KICK
+ db 1, LEER
+ db 7, FOCUS_ENERGY
+ db 13, KARATE_CHOP
+ db 19, SEISMIC_TOSS
+ db 25, FORESIGHT
+ db 31, VITAL_THROW
+ db 37, CROSS_CHOP
+ db 43, SCARY_FACE
+ db 49, SUBMISSION
+ db 0 ; no more level-up moves
+
+MachokeEvosAttacks:
+ db EVOLVE_TRADE, $ff, MACHAMP
+ db 0 ; no more evolutions
+ db 1, LOW_KICK
+ db 1, LEER
+ db 1, FOCUS_ENERGY
+ db 8, FOCUS_ENERGY
+ db 15, KARATE_CHOP
+ db 19, SEISMIC_TOSS
+ db 25, FORESIGHT
+ db 34, VITAL_THROW
+ db 43, CROSS_CHOP
+ db 52, SCARY_FACE
+ db 61, SUBMISSION
+ db 0 ; no more level-up moves
+
+MachampEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, LOW_KICK
+ db 1, LEER
+ db 1, FOCUS_ENERGY
+ db 8, FOCUS_ENERGY
+ db 15, KARATE_CHOP
+ db 19, SEISMIC_TOSS
+ db 25, FORESIGHT
+ db 34, VITAL_THROW
+ db 43, CROSS_CHOP
+ db 52, SCARY_FACE
+ db 61, SUBMISSION
+ db 0 ; no more level-up moves
+
+BellsproutEvosAttacks:
+ db EVOLVE_LEVEL, 21, WEEPINBELL
+ db 0 ; no more evolutions
+ db 1, VINE_WHIP
+ db 6, GROWTH
+ db 11, WRAP
+ db 15, SLEEP_POWDER
+ db 17, POISONPOWDER
+ db 19, STUN_SPORE
+ db 23, ACID
+ db 30, SWEET_SCENT
+ db 37, RAZOR_LEAF
+ db 45, SLAM
+ db 0 ; no more level-up moves
+
+WeepinbellEvosAttacks:
+ db EVOLVE_ITEM, LEAF_STONE, VICTREEBEL
+ db 0 ; no more evolutions
+ db 1, VINE_WHIP
+ db 1, GROWTH
+ db 1, WRAP
+ db 6, GROWTH
+ db 11, WRAP
+ db 15, SLEEP_POWDER
+ db 17, POISONPOWDER
+ db 19, STUN_SPORE
+ db 24, ACID
+ db 33, SWEET_SCENT
+ db 42, RAZOR_LEAF
+ db 54, SLAM
+ db 0 ; no more level-up moves
+
+VictreebelEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, VINE_WHIP
+ db 1, SLEEP_POWDER
+ db 1, SWEET_SCENT
+ db 1, RAZOR_LEAF
+ db 0 ; no more level-up moves
+
+TentacoolEvosAttacks:
+ db EVOLVE_LEVEL, 30, TENTACRUEL
+ db 0 ; no more evolutions
+ db 1, POISON_STING
+ db 6, SUPERSONIC
+ db 12, CONSTRICT
+ db 19, ACID
+ db 25, BUBBLEBEAM
+ db 30, WRAP
+ db 36, BARRIER
+ db 43, SCREECH
+ db 49, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+TentacruelEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, POISON_STING
+ db 1, SUPERSONIC
+ db 1, CONSTRICT
+ db 6, SUPERSONIC
+ db 12, CONSTRICT
+ db 19, ACID
+ db 25, BUBBLEBEAM
+ db 30, WRAP
+ db 38, BARRIER
+ db 47, SCREECH
+ db 55, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+GeodudeEvosAttacks:
+ db EVOLVE_LEVEL, 25, GRAVELER
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 6, DEFENSE_CURL
+ db 11, ROCK_THROW
+ db 16, MAGNITUDE
+ db 21, SELFDESTRUCT
+ db 26, HARDEN
+ db 31, ROLLOUT
+ db 36, EARTHQUAKE
+ db 41, EXPLOSION
+ db 0 ; no more level-up moves
+
+GravelerEvosAttacks:
+ db EVOLVE_TRADE, $ff, GOLEM
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, DEFENSE_CURL
+ db 1, ROCK_THROW
+ db 6, DEFENSE_CURL
+ db 11, ROCK_THROW
+ db 16, MAGNITUDE
+ db 21, SELFDESTRUCT
+ db 27, HARDEN
+ db 34, ROLLOUT
+ db 41, EARTHQUAKE
+ db 48, EXPLOSION
+ db 0 ; no more level-up moves
+
+GolemEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, DEFENSE_CURL
+ db 1, ROCK_THROW
+ db 1, MAGNITUDE
+ db 6, DEFENSE_CURL
+ db 11, ROCK_THROW
+ db 16, MAGNITUDE
+ db 21, SELFDESTRUCT
+ db 27, HARDEN
+ db 34, ROLLOUT
+ db 41, EARTHQUAKE
+ db 48, EXPLOSION
+ db 0 ; no more level-up moves
+
+PonytaEvosAttacks:
+ db EVOLVE_LEVEL, 40, RAPIDASH
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 4, GROWL
+ db 8, TAIL_WHIP
+ db 13, EMBER
+ db 19, STOMP
+ db 26, FIRE_SPIN
+ db 34, TAKE_DOWN
+ db 43, AGILITY
+ db 53, FIRE_BLAST
+ db 0 ; no more level-up moves
+
+RapidashEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, GROWL
+ db 1, TAIL_WHIP
+ db 1, EMBER
+ db 4, GROWL
+ db 8, TAIL_WHIP
+ db 13, EMBER
+ db 19, STOMP
+ db 26, FIRE_SPIN
+ db 34, TAKE_DOWN
+ db 40, FURY_ATTACK
+ db 47, AGILITY
+ db 61, FIRE_BLAST
+ db 0 ; no more level-up moves
+
+SlowpokeEvosAttacks:
+ db EVOLVE_LEVEL, 37, SLOWBRO
+ db EVOLVE_TRADE, KINGS_ROCK, SLOWKING
+ db 0 ; no more evolutions
+ db 1, CURSE
+ db 1, TACKLE
+ db 6, GROWL
+ db 15, WATER_GUN
+ db 20, CONFUSION
+ db 29, DISABLE
+ db 34, HEADBUTT
+ db 43, AMNESIA
+ db 48, PSYCHIC_M
+ db 0 ; no more level-up moves
+
+SlowbroEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, CURSE
+ db 1, TACKLE
+ db 1, GROWL
+ db 1, WATER_GUN
+ db 6, GROWL
+ db 15, WATER_GUN
+ db 20, CONFUSION
+ db 29, DISABLE
+ db 34, HEADBUTT
+ db 37, WITHDRAW
+ db 46, AMNESIA
+ db 54, PSYCHIC_M
+ db 0 ; no more level-up moves
+
+MagnemiteEvosAttacks:
+ db EVOLVE_LEVEL, 30, MAGNETON
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 6, THUNDERSHOCK
+ db 11, SUPERSONIC
+ db 16, SONICBOOM
+ db 21, THUNDER_WAVE
+ db 27, LOCK_ON
+ db 33, SWIFT
+ db 39, SCREECH
+ db 45, ZAP_CANNON
+ db 0 ; no more level-up moves
+
+MagnetonEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, THUNDERSHOCK
+ db 1, SUPERSONIC
+ db 1, SONICBOOM
+ db 6, THUNDERSHOCK
+ db 11, SUPERSONIC
+ db 16, SONICBOOM
+ db 21, THUNDER_WAVE
+ db 27, LOCK_ON
+if _CRYSTAL
+ db 35, TRI_ATTACK
+else
+ db 35, SWIFT
+endc
+ db 43, SCREECH
+ db 53, ZAP_CANNON
+ db 0 ; no more level-up moves
+
+FarfetchDEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, PECK
+ db 7, SAND_ATTACK
+ db 13, LEER
+ db 19, FURY_ATTACK
+ db 25, SWORDS_DANCE
+ db 31, AGILITY
+ db 37, SLASH
+ db 44, FALSE_SWIPE
+ db 0 ; no more level-up moves
+
+DoduoEvosAttacks:
+ db EVOLVE_LEVEL, 31, DODRIO
+ db 0 ; no more evolutions
+ db 1, PECK
+ db 1, GROWL
+ db 9, PURSUIT
+ db 13, FURY_ATTACK
+ db 21, TRI_ATTACK
+ db 25, RAGE
+ db 33, DRILL_PECK
+ db 37, AGILITY
+ db 0 ; no more level-up moves
+
+DodrioEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, PECK
+ db 1, GROWL
+ db 1, PURSUIT
+ db 1, FURY_ATTACK
+ db 9, PURSUIT
+ db 13, FURY_ATTACK
+ db 21, TRI_ATTACK
+ db 25, RAGE
+ db 38, DRILL_PECK
+ db 47, AGILITY
+ db 0 ; no more level-up moves
+
+SeelEvosAttacks:
+ db EVOLVE_LEVEL, 34, DEWGONG
+ db 0 ; no more evolutions
+ db 1, HEADBUTT
+ db 5, GROWL
+ db 16, AURORA_BEAM
+ db 21, REST
+ db 32, TAKE_DOWN
+ db 37, ICE_BEAM
+ db 48, SAFEGUARD
+ db 0 ; no more level-up moves
+
+DewgongEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, HEADBUTT
+ db 1, GROWL
+ db 1, AURORA_BEAM
+ db 5, GROWL
+ db 16, AURORA_BEAM
+ db 21, REST
+ db 32, TAKE_DOWN
+ db 43, ICE_BEAM
+ db 60, SAFEGUARD
+ db 0 ; no more level-up moves
+
+GrimerEvosAttacks:
+ db EVOLVE_LEVEL, 38, MUK
+ db 0 ; no more evolutions
+ db 1, POISON_GAS
+ db 1, POUND
+ db 5, HARDEN
+ db 10, DISABLE
+ db 16, SLUDGE
+ db 23, MINIMIZE
+ db 31, SCREECH
+ db 40, ACID_ARMOR
+ db 50, SLUDGE_BOMB
+ db 0 ; no more level-up moves
+
+MukEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, POISON_GAS
+ db 1, POUND
+ db 1, HARDEN
+ db 33, HARDEN
+ db 37, DISABLE
+ db 45, SLUDGE
+ db 23, MINIMIZE
+ db 31, SCREECH
+ db 45, ACID_ARMOR
+ db 60, SLUDGE_BOMB
+ db 0 ; no more level-up moves
+
+ShellderEvosAttacks:
+ db EVOLVE_ITEM, WATER_STONE, CLOYSTER
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, WITHDRAW
+ db 9, SUPERSONIC
+ db 17, AURORA_BEAM
+ db 25, PROTECT
+ db 33, LEER
+ db 41, CLAMP
+ db 49, ICE_BEAM
+ db 0 ; no more level-up moves
+
+CloysterEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, WITHDRAW
+ db 1, SUPERSONIC
+ db 1, AURORA_BEAM
+ db 1, PROTECT
+if _CRYSTAL
+ db 33, SPIKES
+endc
+ db 41, SPIKE_CANNON
+ db 0 ; no more level-up moves
+
+GastlyEvosAttacks:
+ db EVOLVE_LEVEL, 25, HAUNTER
+ db 0 ; no more evolutions
+ db 1, HYPNOSIS
+ db 1, LICK
+ db 8, SPITE
+ db 13, MEAN_LOOK
+ db 16, CURSE
+ db 21, NIGHT_SHADE
+ db 28, CONFUSE_RAY
+ db 33, DREAM_EATER
+ db 36, DESTINY_BOND
+ db 0 ; no more level-up moves
+
+HaunterEvosAttacks:
+ db EVOLVE_TRADE, $ff, GENGAR
+ db 0 ; no more evolutions
+ db 1, HYPNOSIS
+ db 1, LICK
+ db 1, SPITE
+ db 8, SPITE
+ db 13, MEAN_LOOK
+ db 16, CURSE
+ db 21, NIGHT_SHADE
+ db 31, CONFUSE_RAY
+ db 39, DREAM_EATER
+ db 48, DESTINY_BOND
+ db 0 ; no more level-up moves
+
+GengarEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, HYPNOSIS
+ db 1, LICK
+ db 1, SPITE
+ db 8, SPITE
+ db 13, MEAN_LOOK
+ db 16, CURSE
+ db 21, NIGHT_SHADE
+ db 31, CONFUSE_RAY
+ db 39, DREAM_EATER
+ db 48, DESTINY_BOND
+ db 0 ; no more level-up moves
+
+OnixEvosAttacks:
+ db EVOLVE_TRADE, METAL_COAT, STEELIX
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, SCREECH
+ db 10, BIND
+ db 14, ROCK_THROW
+ db 23, HARDEN
+ db 27, RAGE
+ db 36, SANDSTORM
+ db 40, SLAM
+ db 0 ; no more level-up moves
+
+DrowzeeEvosAttacks:
+ db EVOLVE_LEVEL, 26, HYPNO
+ db 0 ; no more evolutions
+ db 1, POUND
+ db 1, HYPNOSIS
+ db 10, DISABLE
+ db 18, CONFUSION
+ db 25, HEADBUTT
+ db 31, POISON_GAS
+ db 36, MEDITATE
+ db 40, PSYCHIC_M
+ db 43, PSYCH_UP
+ db 45, FUTURE_SIGHT
+ db 0 ; no more level-up moves
+
+HypnoEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, POUND
+ db 1, HYPNOSIS
+ db 1, DISABLE
+ db 1, CONFUSION
+ db 10, DISABLE
+ db 18, CONFUSION
+ db 25, HEADBUTT
+ db 33, POISON_GAS
+ db 40, MEDITATE
+ db 49, PSYCHIC_M
+ db 55, PSYCH_UP
+ db 60, FUTURE_SIGHT
+ db 0 ; no more level-up moves
+
+KrabbyEvosAttacks:
+ db EVOLVE_LEVEL, 28, KINGLER
+ db 0 ; no more evolutions
+ db 1, BUBBLE
+ db 5, LEER
+ db 12, VICEGRIP
+ db 16, HARDEN
+ db 23, STOMP
+ db 27, GUILLOTINE
+ db 34, PROTECT
+ db 41, CRABHAMMER
+ db 0 ; no more level-up moves
+
+KinglerEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, BUBBLE
+ db 1, LEER
+ db 1, VICEGRIP
+ db 5, LEER
+ db 12, VICEGRIP
+ db 16, HARDEN
+ db 23, STOMP
+ db 27, GUILLOTINE
+ db 38, PROTECT
+ db 49, CRABHAMMER
+ db 0 ; no more level-up moves
+
+VoltorbEvosAttacks:
+ db EVOLVE_LEVEL, 30, ELECTRODE
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 9, SCREECH
+ db 17, SONICBOOM
+ db 23, SELFDESTRUCT
+ db 29, ROLLOUT
+ db 33, LIGHT_SCREEN
+ db 37, SWIFT
+ db 39, EXPLOSION
+ db 41, MIRROR_COAT
+ db 0 ; no more level-up moves
+
+ElectrodeEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, SCREECH
+ db 1, SONICBOOM
+ db 1, SELFDESTRUCT
+ db 9, SCREECH
+ db 17, SONICBOOM
+ db 23, SELFDESTRUCT
+ db 29, ROLLOUT
+ db 34, LIGHT_SCREEN
+ db 40, SWIFT
+ db 44, EXPLOSION
+ db 48, MIRROR_COAT
+ db 0 ; no more level-up moves
+
+ExeggcuteEvosAttacks:
+ db EVOLVE_ITEM, LEAF_STONE, EXEGGUTOR
+ db 0 ; no more evolutions
+ db 1, BARRAGE
+ db 1, HYPNOSIS
+ db 7, REFLECT
+ db 13, LEECH_SEED
+ db 19, CONFUSION
+ db 25, STUN_SPORE
+ db 31, POISONPOWDER
+ db 37, SLEEP_POWDER
+ db 43, SOLARBEAM
+ db 0 ; no more level-up moves
+
+ExeggutorEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, BARRAGE
+ db 1, HYPNOSIS
+ db 1, CONFUSION
+ db 19, STOMP
+ db 31, EGG_BOMB
+ db 0 ; no more level-up moves
+
+CuboneEvosAttacks:
+ db EVOLVE_LEVEL, 28, MAROWAK
+ db 0 ; no more evolutions
+ db 1, GROWL
+ db 5, TAIL_WHIP
+ db 9, BONE_CLUB
+ db 13, HEADBUTT
+ db 17, LEER
+ db 21, FOCUS_ENERGY
+ db 25, BONEMERANG
+ db 29, RAGE
+ db 33, FALSE_SWIPE
+ db 37, THRASH
+ db 41, BONE_RUSH
+ db 0 ; no more level-up moves
+
+MarowakEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, GROWL
+ db 1, TAIL_WHIP
+ db 1, BONE_CLUB
+ db 1, HEADBUTT
+ db 5, TAIL_WHIP
+ db 9, BONE_CLUB
+ db 13, HEADBUTT
+ db 17, LEER
+ db 21, FOCUS_ENERGY
+ db 25, BONEMERANG
+ db 32, RAGE
+ db 39, FALSE_SWIPE
+ db 46, THRASH
+ db 53, BONE_RUSH
+ db 0 ; no more level-up moves
+
+HitmonleeEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, DOUBLE_KICK
+ db 6, MEDITATE
+ db 11, ROLLING_KICK
+ db 16, JUMP_KICK
+ db 21, FOCUS_ENERGY
+ db 26, HI_JUMP_KICK
+ db 31, MIND_READER
+ db 36, FORESIGHT
+ db 41, ENDURE
+ db 46, MEGA_KICK
+ db 51, REVERSAL
+ db 0 ; no more level-up moves
+
+HitmonchanEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, COMET_PUNCH
+ db 7, AGILITY
+ db 13, PURSUIT
+ db 26, THUNDERPUNCH
+ db 26, ICE_PUNCH
+ db 26, FIRE_PUNCH
+ db 32, MACH_PUNCH
+ db 38, MEGA_PUNCH
+ db 44, DETECT
+ db 50, COUNTER
+ db 0 ; no more level-up moves
+
+LickitungEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, LICK
+ db 7, SUPERSONIC
+ db 13, DEFENSE_CURL
+ db 19, STOMP
+ db 25, WRAP
+ db 31, DISABLE
+ db 37, SLAM
+ db 43, SCREECH
+ db 0 ; no more level-up moves
+
+KoffingEvosAttacks:
+ db EVOLVE_LEVEL, 35, WEEZING
+ db 0 ; no more evolutions
+ db 1, POISON_GAS
+ db 1, TACKLE
+ db 9, SMOG
+ db 17, SELFDESTRUCT
+ db 21, SLUDGE
+ db 25, SMOKESCREEN
+ db 33, HAZE
+ db 41, EXPLOSION
+ db 45, DESTINY_BOND
+ db 0 ; no more level-up moves
+
+WeezingEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, POISON_GAS
+ db 1, TACKLE
+ db 1, SMOG
+ db 1, SELFDESTRUCT
+ db 9, SMOG
+ db 17, SELFDESTRUCT
+ db 21, SLUDGE
+ db 25, SMOKESCREEN
+ db 33, HAZE
+ db 44, EXPLOSION
+ db 51, DESTINY_BOND
+ db 0 ; no more level-up moves
+
+RhyhornEvosAttacks:
+ db EVOLVE_LEVEL, 42, RHYDON
+ db 0 ; no more evolutions
+ db 1, HORN_ATTACK
+ db 1, TAIL_WHIP
+ db 13, STOMP
+ db 19, FURY_ATTACK
+ db 31, SCARY_FACE
+ db 37, HORN_DRILL
+ db 49, TAKE_DOWN
+ db 55, EARTHQUAKE
+ db 0 ; no more level-up moves
+
+RhydonEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, HORN_ATTACK
+ db 1, TAIL_WHIP
+ db 1, STOMP
+ db 1, FURY_ATTACK
+ db 13, STOMP
+ db 19, FURY_ATTACK
+ db 31, SCARY_FACE
+ db 37, HORN_DRILL
+ db 54, TAKE_DOWN
+ db 65, EARTHQUAKE
+ db 0 ; no more level-up moves
+
+ChanseyEvosAttacks:
+ db EVOLVE_HAPPINESS, TR_ANYTIME, BLISSEY
+ db 0 ; no more evolutions
+ db 1, POUND
+ db 5, GROWL
+ db 9, TAIL_WHIP
+ db 13, SOFTBOILED
+ db 17, DOUBLESLAP
+ db 23, MINIMIZE
+ db 29, SING
+ db 35, EGG_BOMB
+ db 41, DEFENSE_CURL
+ db 49, LIGHT_SCREEN
+ db 57, DOUBLE_EDGE
+ db 0 ; no more level-up moves
+
+TangelaEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, CONSTRICT
+ db 4, SLEEP_POWDER
+ db 10, ABSORB
+ db 13, POISONPOWDER
+ db 19, VINE_WHIP
+ db 25, BIND
+ db 31, MEGA_DRAIN
+ db 34, STUN_SPORE
+ db 40, SLAM
+ db 46, GROWTH
+ db 0 ; no more level-up moves
+
+KangaskhanEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, COMET_PUNCH
+ db 7, LEER
+ db 13, BITE
+ db 19, TAIL_WHIP
+ db 25, MEGA_PUNCH
+ db 31, RAGE
+ db 37, ENDURE
+ db 43, DIZZY_PUNCH
+ db 49, REVERSAL
+ db 0 ; no more level-up moves
+
+HorseaEvosAttacks:
+ db EVOLVE_LEVEL, 32, SEADRA
+ db 0 ; no more evolutions
+ db 1, BUBBLE
+ db 8, SMOKESCREEN
+ db 15, LEER
+ db 22, WATER_GUN
+ db 29, TWISTER
+ db 36, AGILITY
+ db 43, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+SeadraEvosAttacks:
+ db EVOLVE_TRADE, DRAGON_SCALE, KINGDRA
+ db 0 ; no more evolutions
+ db 1, BUBBLE
+ db 1, SMOKESCREEN
+ db 1, LEER
+ db 1, WATER_GUN
+ db 8, SMOKESCREEN
+ db 15, LEER
+ db 22, WATER_GUN
+ db 29, TWISTER
+ db 40, AGILITY
+ db 51, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+GoldeenEvosAttacks:
+ db EVOLVE_LEVEL, 33, SEAKING
+ db 0 ; no more evolutions
+ db 1, PECK
+ db 1, TAIL_WHIP
+ db 10, SUPERSONIC
+ db 15, HORN_ATTACK
+ db 24, FLAIL
+ db 29, FURY_ATTACK
+ db 38, WATERFALL
+ db 43, HORN_DRILL
+ db 52, AGILITY
+ db 0 ; no more level-up moves
+
+SeakingEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, PECK
+ db 1, TAIL_WHIP
+ db 1, TAIL_WHIP
+ db 10, SUPERSONIC
+ db 15, HORN_ATTACK
+ db 24, FLAIL
+ db 29, FURY_ATTACK
+ db 41, WATERFALL
+ db 49, HORN_DRILL
+ db 61, AGILITY
+ db 0 ; no more level-up moves
+
+StaryuEvosAttacks:
+ db EVOLVE_ITEM, WATER_STONE, STARMIE
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, HARDEN
+ db 7, WATER_GUN
+ db 13, RAPID_SPIN
+ db 19, RECOVER
+ db 25, SWIFT
+ db 31, BUBBLEBEAM
+ db 37, MINIMIZE
+ db 43, LIGHT_SCREEN
+ db 50, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+StarmieEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, RAPID_SPIN
+ db 1, RECOVER
+ db 1, BUBBLEBEAM
+ db 37, CONFUSE_RAY
+ db 0 ; no more level-up moves
+
+MrMimeEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, BARRIER
+ db 6, CONFUSION
+ db 11, SUBSTITUTE
+ db 16, MEDITATE
+ db 21, DOUBLESLAP
+ db 26, LIGHT_SCREEN
+ db 26, REFLECT
+ db 31, ENCORE
+ db 36, PSYBEAM
+ db 41, BATON_PASS
+ db 46, SAFEGUARD
+ db 0 ; no more level-up moves
+
+ScytherEvosAttacks:
+ db EVOLVE_TRADE, METAL_COAT, SCIZOR
+ db 0 ; no more evolutions
+ db 1, QUICK_ATTACK
+ db 1, LEER
+ db 6, FOCUS_ENERGY
+ db 12, PURSUIT
+ db 18, FALSE_SWIPE
+ db 24, AGILITY
+ db 30, WING_ATTACK
+ db 36, SLASH
+ db 42, SWORDS_DANCE
+ db 48, DOUBLE_TEAM
+ db 0 ; no more level-up moves
+
+JynxEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, POUND
+ db 1, LICK
+ db 1, LOVELY_KISS
+ db 1, POWDER_SNOW
+ db 9, LOVELY_KISS
+ db 13, POWDER_SNOW
+ db 21, DOUBLESLAP
+ db 25, ICE_PUNCH
+ db 35, MEAN_LOOK
+ db 41, BODY_SLAM
+ db 51, PERISH_SONG
+ db 57, BLIZZARD
+ db 0 ; no more level-up moves
+
+ElectabuzzEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, QUICK_ATTACK
+ db 1, LEER
+ db 1, THUNDERPUNCH
+ db 9, THUNDERPUNCH
+ db 17, LIGHT_SCREEN
+ db 25, SWIFT
+ db 36, SCREECH
+ db 47, THUNDERBOLT
+ db 58, THUNDER
+ db 0 ; no more level-up moves
+
+MagmarEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, EMBER
+ db 1, LEER
+ db 1, SMOG
+ db 1, FIRE_PUNCH
+ db 7, LEER
+ db 13, SMOG
+ db 19, FIRE_PUNCH
+ db 25, SMOKESCREEN
+ db 33, SUNNY_DAY
+ db 41, FLAMETHROWER
+ db 49, CONFUSE_RAY
+ db 57, FIRE_BLAST
+ db 0 ; no more level-up moves
+
+PinsirEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, VICEGRIP
+ db 7, FOCUS_ENERGY
+ db 13, BIND
+ db 19, SEISMIC_TOSS
+ db 25, HARDEN
+ db 31, GUILLOTINE
+ db 37, SUBMISSION
+ db 43, SWORDS_DANCE
+ db 0 ; no more level-up moves
+
+TaurosEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 4, TAIL_WHIP
+ db 8, RAGE
+ db 13, HORN_ATTACK
+ db 19, SCARY_FACE
+ db 26, PURSUIT
+ db 34, REST
+ db 43, THRASH
+ db 53, TAKE_DOWN
+ db 0 ; no more level-up moves
+
+MagikarpEvosAttacks:
+ db EVOLVE_LEVEL, 20, GYARADOS
+ db 0 ; no more evolutions
+ db 1, SPLASH
+ db 15, TACKLE
+ db 30, FLAIL
+ db 0 ; no more level-up moves
+
+GyaradosEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, THRASH
+ db 20, BITE
+ db 25, DRAGON_RAGE
+ db 30, LEER
+ db 35, TWISTER
+ db 40, HYDRO_PUMP
+ db 45, RAIN_DANCE
+ db 50, HYPER_BEAM
+ db 0 ; no more level-up moves
+
+LaprasEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, WATER_GUN
+ db 1, GROWL
+ db 1, SING
+ db 8, MIST
+ db 15, BODY_SLAM
+ db 22, CONFUSE_RAY
+ db 29, PERISH_SONG
+ db 36, ICE_BEAM
+ db 43, RAIN_DANCE
+ db 50, SAFEGUARD
+ db 57, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+DittoEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TRANSFORM
+ db 0 ; no more level-up moves
+
+EeveeEvosAttacks:
+ db EVOLVE_ITEM, THUNDERSTONE, JOLTEON
+ db EVOLVE_ITEM, WATER_STONE, VAPOREON
+ db EVOLVE_ITEM, FIRE_STONE, FLAREON
+ db EVOLVE_HAPPINESS, TR_MORNDAY, ESPEON
+ db EVOLVE_HAPPINESS, TR_NITE, UMBREON
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, TAIL_WHIP
+ db 8, SAND_ATTACK
+ db 16, GROWL
+ db 23, QUICK_ATTACK
+ db 30, BITE
+if _CRYSTAL
+ db 36, BATON_PASS
+else
+ db 36, FOCUS_ENERGY
+endc
+ db 42, TAKE_DOWN
+ db 0 ; no more level-up moves
+
+VaporeonEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, TAIL_WHIP
+ db 8, SAND_ATTACK
+ db 16, WATER_GUN
+ db 23, QUICK_ATTACK
+ db 30, BITE
+ db 36, AURORA_BEAM
+ db 42, HAZE
+ db 47, ACID_ARMOR
+ db 52, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+JolteonEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, TAIL_WHIP
+ db 8, SAND_ATTACK
+ db 16, THUNDERSHOCK
+ db 23, QUICK_ATTACK
+ db 30, DOUBLE_KICK
+ db 36, PIN_MISSILE
+ db 42, THUNDER_WAVE
+ db 47, AGILITY
+ db 52, THUNDER
+ db 0 ; no more level-up moves
+
+FlareonEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, TAIL_WHIP
+ db 8, SAND_ATTACK
+ db 16, EMBER
+ db 23, QUICK_ATTACK
+ db 30, BITE
+ db 36, FIRE_SPIN
+ db 42, SMOG
+ db 47, LEER
+ db 52, FLAMETHROWER
+ db 0 ; no more level-up moves
+
+PorygonEvosAttacks:
+ db EVOLVE_TRADE, UP_GRADE, PORYGON2
+ db 0 ; no more evolutions
+ db 1, CONVERSION2
+ db 1, TACKLE
+ db 1, CONVERSION
+ db 9, AGILITY
+ db 12, PSYBEAM
+ db 20, RECOVER
+ db 24, SHARPEN
+ db 32, LOCK_ON
+ db 36, TRI_ATTACK
+ db 44, ZAP_CANNON
+ db 0 ; no more level-up moves
+
+OmanyteEvosAttacks:
+ db EVOLVE_LEVEL, 40, OMASTAR
+ db 0 ; no more evolutions
+ db 1, CONSTRICT
+ db 1, WITHDRAW
+ db 13, BITE
+ db 19, WATER_GUN
+ db 31, LEER
+ db 37, PROTECT
+ db 49, ANCIENTPOWER
+ db 55, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+OmastarEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, CONSTRICT
+ db 1, WITHDRAW
+ db 1, BITE
+ db 13, BITE
+ db 19, WATER_GUN
+ db 31, LEER
+ db 37, PROTECT
+ db 40, SPIKE_CANNON
+ db 54, ANCIENTPOWER
+ db 65, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+KabutoEvosAttacks:
+ db EVOLVE_LEVEL, 40, KABUTOPS
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, HARDEN
+ db 10, ABSORB
+ db 19, LEER
+ db 28, SAND_ATTACK
+ db 37, ENDURE
+ db 46, MEGA_DRAIN
+ db 55, ANCIENTPOWER
+ db 0 ; no more level-up moves
+
+KabutopsEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, HARDEN
+ db 1, ABSORB
+ db 10, ABSORB
+ db 19, LEER
+ db 28, SAND_ATTACK
+ db 37, ENDURE
+ db 40, SLASH
+ db 51, MEGA_DRAIN
+ db 65, ANCIENTPOWER
+ db 0 ; no more level-up moves
+
+AerodactylEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, WING_ATTACK
+ db 8, AGILITY
+ db 15, BITE
+ db 22, SUPERSONIC
+ db 29, ANCIENTPOWER
+ db 36, SCARY_FACE
+ db 43, TAKE_DOWN
+ db 50, HYPER_BEAM
+ db 0 ; no more level-up moves
+
+SnorlaxEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 8, AMNESIA
+ db 15, DEFENSE_CURL
+ db 22, BELLY_DRUM
+ db 29, HEADBUTT
+ db 36, SNORE
+ db 36, REST
+ db 43, BODY_SLAM
+ db 50, ROLLOUT
+ db 57, HYPER_BEAM
+ db 0 ; no more level-up moves
+
+ArticunoEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, GUST
+ db 1, POWDER_SNOW
+ db 13, MIST
+ db 25, AGILITY
+ db 37, MIND_READER
+ db 49, ICE_BEAM
+ db 61, REFLECT
+ db 73, BLIZZARD
+ db 0 ; no more level-up moves
+
+ZapdosEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, PECK
+ db 1, THUNDERSHOCK
+ db 13, THUNDER_WAVE
+ db 25, AGILITY
+ db 37, DETECT
+ db 49, DRILL_PECK
+ db 61, LIGHT_SCREEN
+ db 73, THUNDER
+ db 0 ; no more level-up moves
+
+MoltresEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, WING_ATTACK
+ db 1, EMBER
+ db 13, FIRE_SPIN
+ db 25, AGILITY
+ db 37, ENDURE
+ db 49, FLAMETHROWER
+ db 61, SAFEGUARD
+ db 73, SKY_ATTACK
+ db 0 ; no more level-up moves
+
+DratiniEvosAttacks:
+ db EVOLVE_LEVEL, 30, DRAGONAIR
+ db 0 ; no more evolutions
+ db 1, WRAP
+ db 1, LEER
+ db 8, THUNDER_WAVE
+ db 15, TWISTER
+ db 22, DRAGON_RAGE
+ db 29, SLAM
+ db 36, AGILITY
+ db 43, SAFEGUARD
+ db 50, OUTRAGE
+ db 57, HYPER_BEAM
+ db 0 ; no more level-up moves
+
+DragonairEvosAttacks:
+ db EVOLVE_LEVEL, 55, DRAGONITE
+ db 0 ; no more evolutions
+ db 1, WRAP
+ db 1, LEER
+ db 1, THUNDER_WAVE
+ db 1, TWISTER
+ db 8, THUNDER_WAVE
+ db 15, TWISTER
+ db 22, DRAGON_RAGE
+ db 29, SLAM
+ db 38, AGILITY
+ db 47, SAFEGUARD
+ db 56, OUTRAGE
+ db 65, HYPER_BEAM
+ db 0 ; no more level-up moves
+
+DragoniteEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, WRAP
+ db 1, LEER
+ db 1, THUNDER_WAVE
+ db 1, TWISTER
+ db 8, THUNDER_WAVE
+ db 15, TWISTER
+ db 22, DRAGON_RAGE
+ db 29, SLAM
+ db 38, AGILITY
+ db 47, SAFEGUARD
+ db 55, WING_ATTACK
+ db 61, OUTRAGE
+ db 75, HYPER_BEAM
+ db 0 ; no more level-up moves
+
+MewtwoEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, CONFUSION
+ db 1, DISABLE
+ db 11, BARRIER
+ db 22, SWIFT
+ db 33, PSYCH_UP
+ db 44, FUTURE_SIGHT
+ db 55, MIST
+ db 66, PSYCHIC_M
+ db 77, AMNESIA
+ db 88, RECOVER
+ db 99, SAFEGUARD
+ db 0 ; no more level-up moves
+
+MewEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, POUND
+ db 10, TRANSFORM
+ db 20, MEGA_PUNCH
+ db 30, METRONOME
+ db 40, PSYCHIC_M
+ db 50, ANCIENTPOWER
+ db 0 ; no more level-up moves
+
+ChikoritaEvosAttacks:
+ db EVOLVE_LEVEL, 16, BAYLEEF
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, GROWL
+ db 8, RAZOR_LEAF
+ db 12, REFLECT
+ db 15, POISONPOWDER
+ db 22, SYNTHESIS
+ db 29, BODY_SLAM
+ db 36, LIGHT_SCREEN
+ db 43, SAFEGUARD
+ db 50, SOLARBEAM
+ db 0 ; no more level-up moves
+
+BayleefEvosAttacks:
+ db EVOLVE_LEVEL, 32, MEGANIUM
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, GROWL
+ db 1, RAZOR_LEAF
+ db 1, REFLECT
+ db 8, RAZOR_LEAF
+ db 12, REFLECT
+ db 15, POISONPOWDER
+ db 23, SYNTHESIS
+ db 31, BODY_SLAM
+ db 39, LIGHT_SCREEN
+ db 47, SAFEGUARD
+ db 55, SOLARBEAM
+ db 0 ; no more level-up moves
+
+MeganiumEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, GROWL
+ db 1, RAZOR_LEAF
+ db 1, REFLECT
+ db 8, RAZOR_LEAF
+ db 12, REFLECT
+ db 15, POISONPOWDER
+ db 23, SYNTHESIS
+ db 31, BODY_SLAM
+ db 41, LIGHT_SCREEN
+ db 51, SAFEGUARD
+ db 61, SOLARBEAM
+ db 0 ; no more level-up moves
+
+CyndaquilEvosAttacks:
+ db EVOLVE_LEVEL, 14, QUILAVA
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, LEER
+ db 6, SMOKESCREEN
+ db 12, EMBER
+ db 19, QUICK_ATTACK
+ db 27, FLAME_WHEEL
+ db 36, SWIFT
+ db 46, FLAMETHROWER
+ db 0 ; no more level-up moves
+
+QuilavaEvosAttacks:
+ db EVOLVE_LEVEL, 36, TYPHLOSION
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, LEER
+ db 1, SMOKESCREEN
+ db 6, SMOKESCREEN
+ db 12, EMBER
+ db 21, QUICK_ATTACK
+ db 31, FLAME_WHEEL
+ db 42, SWIFT
+ db 54, FLAMETHROWER
+ db 0 ; no more level-up moves
+
+TyphlosionEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, LEER
+ db 1, SMOKESCREEN
+ db 1, EMBER
+ db 6, SMOKESCREEN
+ db 12, EMBER
+ db 21, QUICK_ATTACK
+ db 31, FLAME_WHEEL
+ db 45, SWIFT
+ db 60, FLAMETHROWER
+ db 0 ; no more level-up moves
+
+TotodileEvosAttacks:
+ db EVOLVE_LEVEL, 18, CROCONAW
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, LEER
+ db 7, RAGE
+ db 13, WATER_GUN
+ db 20, BITE
+ db 27, SCARY_FACE
+ db 35, SLASH
+ db 43, SCREECH
+ db 52, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+CroconawEvosAttacks:
+ db EVOLVE_LEVEL, 30, FERALIGATR
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, LEER
+ db 1, RAGE
+ db 7, RAGE
+ db 13, WATER_GUN
+ db 21, BITE
+ db 28, SCARY_FACE
+ db 37, SLASH
+ db 45, SCREECH
+ db 55, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+FeraligatrEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, LEER
+ db 1, RAGE
+ db 1, WATER_GUN
+ db 7, RAGE
+ db 13, WATER_GUN
+ db 21, BITE
+ db 28, SCARY_FACE
+ db 38, SLASH
+ db 47, SCREECH
+ db 58, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+SentretEvosAttacks:
+ db EVOLVE_LEVEL, 15, FURRET
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 5, DEFENSE_CURL
+ db 11, QUICK_ATTACK
+ db 17, FURY_SWIPES
+ db 25, SLAM
+ db 33, REST
+ db 41, AMNESIA
+ db 0 ; no more level-up moves
+
+FurretEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, DEFENSE_CURL
+ db 1, QUICK_ATTACK
+ db 5, DEFENSE_CURL
+ db 11, QUICK_ATTACK
+ db 18, FURY_SWIPES
+ db 28, SLAM
+ db 38, REST
+ db 48, AMNESIA
+ db 0 ; no more level-up moves
+
+HoothootEvosAttacks:
+ db EVOLVE_LEVEL, 20, NOCTOWL
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, GROWL
+ db 6, FORESIGHT
+ db 11, PECK
+ db 16, HYPNOSIS
+ db 22, REFLECT
+ db 28, TAKE_DOWN
+ db 34, CONFUSION
+ db 48, DREAM_EATER
+ db 0 ; no more level-up moves
+
+NoctowlEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, GROWL
+ db 1, FORESIGHT
+ db 1, PECK
+ db 6, FORESIGHT
+ db 11, PECK
+ db 16, HYPNOSIS
+ db 25, REFLECT
+ db 33, TAKE_DOWN
+ db 41, CONFUSION
+ db 57, DREAM_EATER
+ db 0 ; no more level-up moves
+
+LedybaEvosAttacks:
+ db EVOLVE_LEVEL, 18, LEDIAN
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 8, SUPERSONIC
+ db 15, COMET_PUNCH
+ db 22, LIGHT_SCREEN
+ db 22, REFLECT
+ db 22, SAFEGUARD
+ db 29, BATON_PASS
+ db 36, SWIFT
+ db 43, AGILITY
+ db 50, DOUBLE_EDGE
+ db 0 ; no more level-up moves
+
+LedianEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, SUPERSONIC
+ db 8, SUPERSONIC
+ db 15, COMET_PUNCH
+ db 24, LIGHT_SCREEN
+ db 24, REFLECT
+ db 24, SAFEGUARD
+ db 33, BATON_PASS
+ db 42, SWIFT
+ db 51, AGILITY
+ db 60, DOUBLE_EDGE
+ db 0 ; no more level-up moves
+
+SpinarakEvosAttacks:
+ db EVOLVE_LEVEL, 22, ARIADOS
+ db 0 ; no more evolutions
+ db 1, POISON_STING
+ db 1, STRING_SHOT
+ db 6, SCARY_FACE
+ db 11, CONSTRICT
+ db 17, NIGHT_SHADE
+ db 23, LEECH_LIFE
+ db 30, FURY_SWIPES
+ db 37, SPIDER_WEB
+if _CRYSTAL
+ db 45, AGILITY
+else
+ db 45, SCREECH
+endc
+ db 53, PSYCHIC_M
+ db 0 ; no more level-up moves
+
+AriadosEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, POISON_STING
+ db 1, STRING_SHOT
+ db 1, SCARY_FACE
+ db 1, CONSTRICT
+ db 6, SCARY_FACE
+ db 11, CONSTRICT
+ db 17, NIGHT_SHADE
+ db 25, LEECH_LIFE
+ db 34, FURY_SWIPES
+ db 43, SPIDER_WEB
+if _CRYSTAL
+ db 53, AGILITY
+else
+ db 53, SCREECH
+endc
+ db 63, PSYCHIC_M
+ db 0 ; no more level-up moves
+
+CrobatEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SCREECH
+ db 1, LEECH_LIFE
+ db 1, SUPERSONIC
+ db 6, SUPERSONIC
+ db 12, BITE
+ db 19, CONFUSE_RAY
+ db 30, WING_ATTACK
+ db 42, MEAN_LOOK
+ db 55, HAZE
+ db 0 ; no more level-up moves
+
+ChinchouEvosAttacks:
+ db EVOLVE_LEVEL, 27, LANTURN
+ db 0 ; no more evolutions
+ db 1, BUBBLE
+ db 1, THUNDER_WAVE
+ db 5, SUPERSONIC
+ db 13, FLAIL
+ db 17, WATER_GUN
+ db 25, SPARK
+ db 29, CONFUSE_RAY
+ db 37, TAKE_DOWN
+ db 41, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+LanturnEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, BUBBLE
+ db 1, THUNDER_WAVE
+ db 1, SUPERSONIC
+ db 5, SUPERSONIC
+ db 13, FLAIL
+ db 17, WATER_GUN
+ db 25, SPARK
+ db 33, CONFUSE_RAY
+ db 45, TAKE_DOWN
+ db 53, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+PichuEvosAttacks:
+ db EVOLVE_HAPPINESS, TR_ANYTIME, PIKACHU
+ db 0 ; no more evolutions
+ db 1, THUNDERSHOCK
+ db 1, CHARM
+ db 6, TAIL_WHIP
+ db 8, THUNDER_WAVE
+ db 11, SWEET_KISS
+ db 0 ; no more level-up moves
+
+CleffaEvosAttacks:
+ db EVOLVE_HAPPINESS, TR_ANYTIME, CLEFAIRY
+ db 0 ; no more evolutions
+ db 1, POUND
+ db 1, CHARM
+ db 4, ENCORE
+ db 8, SING
+ db 13, SWEET_KISS
+ db 0 ; no more level-up moves
+
+IgglybuffEvosAttacks:
+ db EVOLVE_HAPPINESS, TR_ANYTIME, JIGGLYPUFF
+ db 0 ; no more evolutions
+ db 1, SING
+ db 1, CHARM
+ db 4, DEFENSE_CURL
+ db 9, POUND
+ db 14, SWEET_KISS
+ db 0 ; no more level-up moves
+
+TogepiEvosAttacks:
+ db EVOLVE_HAPPINESS, TR_ANYTIME, TOGETIC
+ db 0 ; no more evolutions
+ db 1, GROWL
+ db 1, CHARM
+ db 7, METRONOME
+ db 18, SWEET_KISS
+ db 25, ENCORE
+ db 31, SAFEGUARD
+ db 38, DOUBLE_EDGE
+ db 0 ; no more level-up moves
+
+TogeticEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, GROWL
+ db 1, CHARM
+ db 7, METRONOME
+ db 18, SWEET_KISS
+ db 25, ENCORE
+ db 31, SAFEGUARD
+ db 38, DOUBLE_EDGE
+ db 0 ; no more level-up moves
+
+NatuEvosAttacks:
+ db EVOLVE_LEVEL, 25, XATU
+ db 0 ; no more evolutions
+ db 1, PECK
+ db 1, LEER
+ db 10, NIGHT_SHADE
+ db 20, TELEPORT
+ db 30, FUTURE_SIGHT
+ db 40, CONFUSE_RAY
+ db 50, PSYCHIC_M
+ db 0 ; no more level-up moves
+
+XatuEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, PECK
+ db 1, LEER
+ db 1, NIGHT_SHADE
+ db 10, NIGHT_SHADE
+ db 20, TELEPORT
+ db 35, FUTURE_SIGHT
+ db 50, CONFUSE_RAY
+ db 65, PSYCHIC_M
+ db 0 ; no more level-up moves
+
+MareepEvosAttacks:
+ db EVOLVE_LEVEL, 15, FLAAFFY
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, GROWL
+ db 9, THUNDERSHOCK
+ db 16, THUNDER_WAVE
+ db 23, COTTON_SPORE
+ db 30, LIGHT_SCREEN
+ db 37, THUNDER
+ db 0 ; no more level-up moves
+
+FlaaffyEvosAttacks:
+ db EVOLVE_LEVEL, 30, AMPHAROS
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, GROWL
+ db 1, THUNDERSHOCK
+ db 9, THUNDERSHOCK
+ db 18, THUNDER_WAVE
+ db 27, COTTON_SPORE
+ db 36, LIGHT_SCREEN
+ db 45, THUNDER
+ db 0 ; no more level-up moves
+
+AmpharosEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, GROWL
+ db 1, THUNDERSHOCK
+ db 1, THUNDER_WAVE
+ db 9, THUNDERSHOCK
+ db 18, THUNDER_WAVE
+ db 27, COTTON_SPORE
+ db 30, THUNDERPUNCH
+ db 42, LIGHT_SCREEN
+ db 57, THUNDER
+ db 0 ; no more level-up moves
+
+BellossomEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, ABSORB
+ db 1, SWEET_SCENT
+ db 1, STUN_SPORE
+ db 1, PETAL_DANCE
+ db 55, SOLARBEAM
+ db 0 ; no more level-up moves
+
+MarillEvosAttacks:
+ db EVOLVE_LEVEL, 18, AZUMARILL
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 3, DEFENSE_CURL
+ db 6, TAIL_WHIP
+ db 10, WATER_GUN
+ db 15, ROLLOUT
+ db 21, BUBBLEBEAM
+ db 28, DOUBLE_EDGE
+ db 36, RAIN_DANCE
+ db 0 ; no more level-up moves
+
+AzumarillEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, DEFENSE_CURL
+ db 1, TAIL_WHIP
+ db 1, WATER_GUN
+ db 3, DEFENSE_CURL
+ db 6, TAIL_WHIP
+ db 10, WATER_GUN
+ db 15, ROLLOUT
+ db 25, BUBBLEBEAM
+ db 36, DOUBLE_EDGE
+ db 48, RAIN_DANCE
+ db 0 ; no more level-up moves
+
+SudowoodoEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, ROCK_THROW
+ db 1, MIMIC
+ db 10, FLAIL
+ db 19, LOW_KICK
+ db 28, ROCK_SLIDE
+ db 37, FAINT_ATTACK
+ db 46, SLAM
+ db 0 ; no more level-up moves
+
+PolitoedEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, WATER_GUN
+ db 1, HYPNOSIS
+ db 1, DOUBLESLAP
+ db 1, PERISH_SONG
+ db 35, PERISH_SONG
+ db 51, SWAGGER
+ db 0 ; no more level-up moves
+
+HoppipEvosAttacks:
+ db EVOLVE_LEVEL, 18, SKIPLOOM
+ db 0 ; no more evolutions
+ db 1, SPLASH
+if _CRYSTAL
+ db 5, SYNTHESIS
+else
+ db 1, SYNTHESIS
+endc
+ db 5, TAIL_WHIP
+ db 10, TACKLE
+ db 13, POISONPOWDER
+ db 15, STUN_SPORE
+ db 17, SLEEP_POWDER
+ db 20, LEECH_SEED
+ db 25, COTTON_SPORE
+ db 30, MEGA_DRAIN
+ db 0 ; no more level-up moves
+
+SkiploomEvosAttacks:
+ db EVOLVE_LEVEL, 27, JUMPLUFF
+ db 0 ; no more evolutions
+ db 1, SPLASH
+ db 1, SYNTHESIS
+ db 1, TAIL_WHIP
+ db 1, TACKLE
+if _CRYSTAL
+ db 5, SYNTHESIS
+endc
+ db 5, TAIL_WHIP
+ db 10, TACKLE
+ db 13, POISONPOWDER
+ db 15, STUN_SPORE
+ db 17, SLEEP_POWDER
+ db 22, LEECH_SEED
+ db 29, COTTON_SPORE
+ db 36, MEGA_DRAIN
+ db 0 ; no more level-up moves
+
+JumpluffEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SPLASH
+ db 1, SYNTHESIS
+ db 1, TAIL_WHIP
+ db 1, TACKLE
+if _CRYSTAL
+ db 5, SYNTHESIS
+endc
+ db 5, TAIL_WHIP
+ db 10, TACKLE
+ db 13, POISONPOWDER
+ db 15, STUN_SPORE
+ db 17, SLEEP_POWDER
+ db 22, LEECH_SEED
+ db 33, COTTON_SPORE
+ db 44, MEGA_DRAIN
+ db 0 ; no more level-up moves
+
+AipomEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, TAIL_WHIP
+ db 6, SAND_ATTACK
+ db 12, BATON_PASS
+ db 19, FURY_SWIPES
+ db 27, SWIFT
+ db 36, SCREECH
+ db 46, AGILITY
+ db 0 ; no more level-up moves
+
+SunkernEvosAttacks:
+ db EVOLVE_ITEM, SUN_STONE, SUNFLORA
+ db 0 ; no more evolutions
+ db 1, ABSORB
+ db 4, GROWTH
+ db 10, MEGA_DRAIN
+ db 19, SUNNY_DAY
+ db 31, SYNTHESIS
+ db 46, GIGA_DRAIN
+ db 0 ; no more level-up moves
+
+SunfloraEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, ABSORB
+ db 1, POUND
+ db 4, GROWTH
+ db 10, RAZOR_LEAF
+ db 19, SUNNY_DAY
+ db 31, PETAL_DANCE
+ db 46, SOLARBEAM
+ db 0 ; no more level-up moves
+
+YanmaEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, FORESIGHT
+ db 7, QUICK_ATTACK
+ db 13, DOUBLE_TEAM
+ db 19, SONICBOOM
+ db 25, DETECT
+ db 31, SUPERSONIC
+if _CRYSTAL
+ db 37, WING_ATTACK
+else
+ db 37, SWIFT
+endc
+ db 43, SCREECH
+ db 0 ; no more level-up moves
+
+WooperEvosAttacks:
+ db EVOLVE_LEVEL, 20, QUAGSIRE
+ db 0 ; no more evolutions
+ db 1, WATER_GUN
+ db 1, TAIL_WHIP
+ db 11, SLAM
+ db 21, AMNESIA
+ db 31, EARTHQUAKE
+ db 41, RAIN_DANCE
+ db 51, MIST
+ db 51, HAZE
+ db 0 ; no more level-up moves
+
+QuagsireEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, WATER_GUN
+ db 1, TAIL_WHIP
+ db 11, SLAM
+ db 23, AMNESIA
+ db 35, EARTHQUAKE
+ db 47, RAIN_DANCE
+ db 59, MIST
+ db 59, HAZE
+ db 0 ; no more level-up moves
+
+EspeonEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, TAIL_WHIP
+ db 8, SAND_ATTACK
+ db 16, CONFUSION
+ db 23, QUICK_ATTACK
+ db 30, SWIFT
+ db 36, PSYBEAM
+ db 42, PSYCH_UP
+ db 47, PSYCHIC_M
+ db 52, MORNING_SUN
+ db 0 ; no more level-up moves
+
+UmbreonEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, TAIL_WHIP
+ db 8, SAND_ATTACK
+ db 16, PURSUIT
+ db 23, QUICK_ATTACK
+ db 30, CONFUSE_RAY
+ db 36, FAINT_ATTACK
+ db 42, MEAN_LOOK
+ db 47, SCREECH
+ db 52, MOONLIGHT
+ db 0 ; no more level-up moves
+
+MurkrowEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, PECK
+ db 11, PURSUIT
+ db 16, HAZE
+ db 26, NIGHT_SHADE
+ db 31, FAINT_ATTACK
+ db 41, MEAN_LOOK
+ db 0 ; no more level-up moves
+
+SlowkingEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, CURSE
+ db 1, TACKLE
+ db 6, GROWL
+ db 15, WATER_GUN
+ db 20, CONFUSION
+ db 29, DISABLE
+ db 34, HEADBUTT
+ db 43, SWAGGER
+ db 48, PSYCHIC_M
+ db 0 ; no more level-up moves
+
+MisdreavusEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, GROWL
+ db 1, PSYWAVE
+ db 6, SPITE
+ db 12, CONFUSE_RAY
+ db 19, MEAN_LOOK
+ db 27, PSYBEAM
+ db 36, PAIN_SPLIT
+ db 46, PERISH_SONG
+ db 0 ; no more level-up moves
+
+UnownEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, HIDDEN_POWER
+ db 0 ; no more level-up moves
+
+WobbuffetEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, COUNTER
+ db 1, MIRROR_COAT
+ db 1, SAFEGUARD
+ db 1, DESTINY_BOND
+ db 0 ; no more level-up moves
+
+GirafarigEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, GROWL
+ db 1, CONFUSION
+ db 1, STOMP
+ db 7, CONFUSION
+ db 13, STOMP
+ db 20, AGILITY
+ db 30, BATON_PASS
+ db 41, PSYBEAM
+ db 54, CRUNCH
+ db 0 ; no more level-up moves
+
+PinecoEvosAttacks:
+ db EVOLVE_LEVEL, 31, FORRETRESS
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, PROTECT
+ db 8, SELFDESTRUCT
+ db 15, TAKE_DOWN
+ db 22, RAPID_SPIN
+ db 29, BIDE
+ db 36, EXPLOSION
+ db 43, SPIKES
+ db 50, DOUBLE_EDGE
+ db 0 ; no more level-up moves
+
+ForretressEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, PROTECT
+ db 1, SELFDESTRUCT
+ db 8, SELFDESTRUCT
+ db 15, TAKE_DOWN
+ db 22, RAPID_SPIN
+ db 29, BIDE
+ db 39, EXPLOSION
+ db 49, SPIKES
+ db 59, DOUBLE_EDGE
+ db 0 ; no more level-up moves
+
+DunsparceEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, RAGE
+ db 5, DEFENSE_CURL
+ db 13, GLARE
+ db 18, SPITE
+ db 26, PURSUIT
+ db 30, SCREECH
+ db 38, TAKE_DOWN
+ db 0 ; no more level-up moves
+
+GligarEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, POISON_STING
+ db 6, SAND_ATTACK
+ db 13, HARDEN
+ db 20, QUICK_ATTACK
+ db 28, FAINT_ATTACK
+ db 36, SLASH
+ db 44, SCREECH
+ db 52, GUILLOTINE
+ db 0 ; no more level-up moves
+
+SteelixEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, SCREECH
+ db 10, BIND
+ db 14, ROCK_THROW
+ db 23, HARDEN
+ db 27, RAGE
+ db 36, SANDSTORM
+ db 40, SLAM
+ db 49, CRUNCH
+ db 0 ; no more level-up moves
+
+SnubbullEvosAttacks:
+ db EVOLVE_LEVEL, 23, GRANBULL
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, SCARY_FACE
+ db 4, TAIL_WHIP
+ db 8, CHARM
+ db 13, BITE
+ db 19, LICK
+ db 26, ROAR
+ db 34, RAGE
+ db 43, TAKE_DOWN
+ db 0 ; no more level-up moves
+
+GranbullEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, SCARY_FACE
+ db 4, TAIL_WHIP
+ db 8, CHARM
+ db 13, BITE
+ db 19, LICK
+ db 28, ROAR
+ db 38, RAGE
+ db 51, TAKE_DOWN
+ db 0 ; no more level-up moves
+
+QwilfishEvosAttacks:
+ db 0 ; no more evolutions
+if _CRYSTAL
+ db 1, SPIKES
+endc
+ db 1, TACKLE
+ db 1, POISON_STING
+ db 10, HARDEN
+ db 10, MINIMIZE
+ db 19, WATER_GUN
+ db 28, PIN_MISSILE
+ db 37, TAKE_DOWN
+ db 46, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+ScizorEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, QUICK_ATTACK
+ db 1, LEER
+ db 6, FOCUS_ENERGY
+ db 12, PURSUIT
+ db 18, FALSE_SWIPE
+ db 24, AGILITY
+ db 30, METAL_CLAW
+ db 36, SLASH
+ db 42, SWORDS_DANCE
+ db 48, DOUBLE_TEAM
+ db 0 ; no more level-up moves
+
+ShuckleEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, CONSTRICT
+ db 1, WITHDRAW
+ db 9, WRAP
+ db 14, ENCORE
+ db 23, SAFEGUARD
+ db 28, BIDE
+ db 37, REST
+ db 0 ; no more level-up moves
+
+HeracrossEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, LEER
+ db 6, HORN_ATTACK
+ db 12, ENDURE
+ db 19, FURY_ATTACK
+ db 27, COUNTER
+ db 35, TAKE_DOWN
+ db 44, REVERSAL
+ db 54, MEGAHORN
+ db 0 ; no more level-up moves
+
+SneaselEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, LEER
+ db 9, QUICK_ATTACK
+ db 17, SCREECH
+ db 25, FAINT_ATTACK
+ db 33, FURY_SWIPES
+ db 41, AGILITY
+ db 49, SLASH
+ db 57, BEAT_UP
+if _CRYSTAL
+ db 65, METAL_CLAW
+endc
+ db 0 ; no more level-up moves
+
+TeddiursaEvosAttacks:
+ db EVOLVE_LEVEL, 30, URSARING
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, LEER
+ db 8, LICK
+ db 15, FURY_SWIPES
+ db 22, FAINT_ATTACK
+ db 29, REST
+ db 36, SLASH
+ db 43, SNORE
+ db 50, THRASH
+ db 0 ; no more level-up moves
+
+UrsaringEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SCRATCH
+ db 1, LEER
+ db 1, LICK
+ db 1, FURY_SWIPES
+ db 8, LICK
+ db 15, FURY_SWIPES
+ db 22, FAINT_ATTACK
+ db 29, REST
+ db 39, SLASH
+ db 49, SNORE
+ db 59, THRASH
+ db 0 ; no more level-up moves
+
+SlugmaEvosAttacks:
+ db EVOLVE_LEVEL, 38, MAGCARGO
+ db 0 ; no more evolutions
+ db 1, SMOG
+ db 8, EMBER
+ db 15, ROCK_THROW
+ db 22, HARDEN
+ db 29, AMNESIA
+ db 36, FLAMETHROWER
+ db 43, ROCK_SLIDE
+ db 50, BODY_SLAM
+ db 0 ; no more level-up moves
+
+MagcargoEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SMOG
+ db 1, EMBER
+ db 1, ROCK_THROW
+ db 8, EMBER
+ db 15, ROCK_THROW
+ db 22, HARDEN
+ db 29, AMNESIA
+ db 36, FLAMETHROWER
+ db 48, ROCK_SLIDE
+ db 60, BODY_SLAM
+ db 0 ; no more level-up moves
+
+SwinubEvosAttacks:
+ db EVOLVE_LEVEL, 33, PILOSWINE
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 10, POWDER_SNOW
+ db 19, ENDURE
+ db 28, TAKE_DOWN
+ db 37, MIST
+ db 46, BLIZZARD
+if _CRYSTAL
+ db 55, AMNESIA
+endc
+ db 0 ; no more level-up moves
+
+PiloswineEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, HORN_ATTACK
+ db 1, POWDER_SNOW
+ db 1, ENDURE
+ db 10, POWDER_SNOW
+ db 19, ENDURE
+ db 28, TAKE_DOWN
+ db 33, FURY_ATTACK
+ db 42, MIST
+ db 56, BLIZZARD
+if _CRYSTAL
+ db 70, AMNESIA
+endc
+ db 0 ; no more level-up moves
+
+CorsolaEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 7, HARDEN
+ db 13, BUBBLE
+ db 19, RECOVER
+ db 25, BUBBLEBEAM
+ db 31, SPIKE_CANNON
+ db 37, MIRROR_COAT
+ db 43, ANCIENTPOWER
+ db 0 ; no more level-up moves
+
+RemoraidEvosAttacks:
+ db EVOLVE_LEVEL, 25, OCTILLERY
+ db 0 ; no more evolutions
+ db 1, WATER_GUN
+ db 11, LOCK_ON
+ db 22, PSYBEAM
+ db 22, AURORA_BEAM
+ db 22, BUBBLEBEAM
+ db 33, FOCUS_ENERGY
+ db 44, ICE_BEAM
+ db 55, HYPER_BEAM
+ db 0 ; no more level-up moves
+
+OctilleryEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, WATER_GUN
+ db 11, CONSTRICT
+ db 22, PSYBEAM
+ db 22, AURORA_BEAM
+ db 22, BUBBLEBEAM
+ db 25, OCTAZOOKA
+ db 38, FOCUS_ENERGY
+ db 54, ICE_BEAM
+ db 70, HYPER_BEAM
+ db 0 ; no more level-up moves
+
+DelibirdEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, PRESENT
+ db 0 ; no more level-up moves
+
+MantineEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, BUBBLE
+ db 10, SUPERSONIC
+ db 18, BUBBLEBEAM
+ db 25, TAKE_DOWN
+ db 32, AGILITY
+ db 40, WING_ATTACK
+ db 49, CONFUSE_RAY
+ db 0 ; no more level-up moves
+
+SkarmoryEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, LEER
+ db 1, PECK
+ db 13, SAND_ATTACK
+ db 19, SWIFT
+ db 25, AGILITY
+ db 37, FURY_ATTACK
+ db 49, STEEL_WING
+ db 0 ; no more level-up moves
+
+HoundourEvosAttacks:
+ db EVOLVE_LEVEL, 24, HOUNDOOM
+ db 0 ; no more evolutions
+ db 1, LEER
+ db 1, EMBER
+ db 7, ROAR
+ db 13, SMOG
+ db 20, BITE
+ db 27, FAINT_ATTACK
+ db 35, FLAMETHROWER
+ db 43, CRUNCH
+ db 0 ; no more level-up moves
+
+HoundoomEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, LEER
+ db 1, EMBER
+ db 7, ROAR
+ db 13, SMOG
+ db 20, BITE
+ db 30, FAINT_ATTACK
+ db 41, FLAMETHROWER
+ db 52, CRUNCH
+ db 0 ; no more level-up moves
+
+KingdraEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, BUBBLE
+ db 1, SMOKESCREEN
+ db 1, LEER
+ db 1, WATER_GUN
+ db 8, SMOKESCREEN
+ db 15, LEER
+ db 22, WATER_GUN
+ db 29, TWISTER
+ db 40, AGILITY
+ db 51, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+PhanpyEvosAttacks:
+ db EVOLVE_LEVEL, 25, DONPHAN
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 1, GROWL
+ db 9, DEFENSE_CURL
+ db 17, FLAIL
+ db 25, TAKE_DOWN
+ db 33, ROLLOUT
+ db 41, ENDURE
+ db 49, DOUBLE_EDGE
+ db 0 ; no more level-up moves
+
+DonphanEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, HORN_ATTACK
+ db 1, GROWL
+ db 9, DEFENSE_CURL
+ db 17, FLAIL
+ db 25, FURY_ATTACK
+ db 33, ROLLOUT
+ db 41, RAPID_SPIN
+ db 49, EARTHQUAKE
+ db 0 ; no more level-up moves
+
+Porygon2EvosAttacks:
+ db 0 ; no more evolutions
+ db 1, CONVERSION2
+ db 1, TACKLE
+ db 1, CONVERSION
+ db 9, AGILITY
+ db 12, PSYBEAM
+ db 20, RECOVER
+ db 24, DEFENSE_CURL
+ db 32, LOCK_ON
+ db 36, TRI_ATTACK
+ db 44, ZAP_CANNON
+ db 0 ; no more level-up moves
+
+StantlerEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 8, LEER
+ db 15, HYPNOSIS
+ db 23, STOMP
+ db 31, SAND_ATTACK
+ db 40, TAKE_DOWN
+ db 49, CONFUSE_RAY
+ db 0 ; no more level-up moves
+
+SmeargleEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SKETCH
+ db 11, SKETCH
+ db 21, SKETCH
+ db 31, SKETCH
+ db 41, SKETCH
+ db 51, SKETCH
+ db 61, SKETCH
+ db 71, SKETCH
+ db 81, SKETCH
+ db 91, SKETCH
+ db 0 ; no more level-up moves
+
+TyrogueEvosAttacks:
+ db EVOLVE_STAT, 20, ATK_LT_DEF, HITMONCHAN
+ db EVOLVE_STAT, 20, ATK_GT_DEF, HITMONLEE
+ db EVOLVE_STAT, 20, ATK_EQ_DEF, HITMONTOP
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 0 ; no more level-up moves
+
+HitmontopEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, ROLLING_KICK
+ db 7, FOCUS_ENERGY
+ db 13, PURSUIT
+ db 19, QUICK_ATTACK
+ db 25, RAPID_SPIN
+ db 31, COUNTER
+ db 37, AGILITY
+ db 43, DETECT
+ db 49, TRIPLE_KICK
+ db 0 ; no more level-up moves
+
+SmoochumEvosAttacks:
+ db EVOLVE_LEVEL, 30, JYNX
+ db 0 ; no more evolutions
+ db 1, POUND
+ db 1, LICK
+ db 9, SWEET_KISS
+ db 13, POWDER_SNOW
+ db 21, CONFUSION
+ db 25, SING
+ db 33, MEAN_LOOK
+ db 37, PSYCHIC_M
+ db 45, PERISH_SONG
+ db 49, BLIZZARD
+ db 0 ; no more level-up moves
+
+ElekidEvosAttacks:
+ db EVOLVE_LEVEL, 30, ELECTABUZZ
+ db 0 ; no more evolutions
+ db 1, QUICK_ATTACK
+ db 1, LEER
+ db 9, THUNDERPUNCH
+ db 17, LIGHT_SCREEN
+ db 25, SWIFT
+ db 33, SCREECH
+ db 41, THUNDERBOLT
+ db 49, THUNDER
+ db 0 ; no more level-up moves
+
+MagbyEvosAttacks:
+ db EVOLVE_LEVEL, 30, MAGMAR
+ db 0 ; no more evolutions
+ db 1, EMBER
+ db 7, LEER
+ db 13, SMOG
+ db 19, FIRE_PUNCH
+ db 25, SMOKESCREEN
+ db 31, SUNNY_DAY
+ db 37, FLAMETHROWER
+ db 43, CONFUSE_RAY
+ db 49, FIRE_BLAST
+ db 0 ; no more level-up moves
+
+MiltankEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, TACKLE
+ db 4, GROWL
+ db 8, DEFENSE_CURL
+ db 13, STOMP
+ db 19, MILK_DRINK
+ db 26, BIDE
+ db 34, ROLLOUT
+ db 43, BODY_SLAM
+ db 53, HEAL_BELL
+ db 0 ; no more level-up moves
+
+BlisseyEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, POUND
+ db 4, GROWL
+ db 7, TAIL_WHIP
+ db 10, SOFTBOILED
+ db 13, DOUBLESLAP
+ db 18, MINIMIZE
+ db 23, SING
+ db 28, EGG_BOMB
+ db 33, DEFENSE_CURL
+ db 40, LIGHT_SCREEN
+ db 47, DOUBLE_EDGE
+ db 0 ; no more level-up moves
+
+RaikouEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, BITE
+ db 1, LEER
+ db 11, THUNDERSHOCK
+ db 21, ROAR
+ db 31, QUICK_ATTACK
+ db 41, SPARK
+ db 51, REFLECT
+ db 61, CRUNCH
+ db 71, THUNDER
+ db 0 ; no more level-up moves
+
+EnteiEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, BITE
+ db 1, LEER
+ db 11, EMBER
+ db 21, ROAR
+ db 31, FIRE_SPIN
+ db 41, STOMP
+ db 51, FLAMETHROWER
+ db 61, SWAGGER
+ db 71, FIRE_BLAST
+ db 0 ; no more level-up moves
+
+SuicuneEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, BITE
+ db 1, LEER
+if _CRYSTAL
+ db 11, BUBBLEBEAM
+ db 21, RAIN_DANCE
+ db 31, GUST
+ db 41, AURORA_BEAM
+else
+ db 11, WATER_GUN
+ db 21, ROAR
+ db 31, GUST
+ db 41, BUBBLEBEAM
+endc
+ db 51, MIST
+ db 61, MIRROR_COAT
+ db 71, HYDRO_PUMP
+ db 0 ; no more level-up moves
+
+LarvitarEvosAttacks:
+ db EVOLVE_LEVEL, 30, PUPITAR
+ db 0 ; no more evolutions
+ db 1, BITE
+ db 1, LEER
+ db 8, SANDSTORM
+ db 15, SCREECH
+ db 22, ROCK_SLIDE
+ db 29, THRASH
+ db 36, SCARY_FACE
+ db 43, CRUNCH
+ db 50, EARTHQUAKE
+ db 57, HYPER_BEAM
+ db 0 ; no more level-up moves
+
+PupitarEvosAttacks:
+ db EVOLVE_LEVEL, 55, TYRANITAR
+ db 0 ; no more evolutions
+ db 1, BITE
+ db 1, LEER
+ db 1, SANDSTORM
+ db 1, SCREECH
+ db 8, SANDSTORM
+ db 15, SCREECH
+ db 22, ROCK_SLIDE
+ db 29, THRASH
+ db 38, SCARY_FACE
+ db 47, CRUNCH
+ db 56, EARTHQUAKE
+ db 65, HYPER_BEAM
+ db 0 ; no more level-up moves
+
+TyranitarEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, BITE
+ db 1, LEER
+ db 1, SANDSTORM
+ db 1, SCREECH
+ db 8, SANDSTORM
+ db 15, SCREECH
+ db 22, ROCK_SLIDE
+ db 29, THRASH
+ db 38, SCARY_FACE
+ db 47, CRUNCH
+ db 61, EARTHQUAKE
+ db 75, HYPER_BEAM
+ db 0 ; no more level-up moves
+
+LugiaEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, AEROBLAST
+ db 11, SAFEGUARD
+ db 22, GUST
+ db 33, RECOVER
+ db 44, HYDRO_PUMP
+ db 55, RAIN_DANCE
+ db 66, SWIFT
+ db 77, WHIRLWIND
+ db 88, ANCIENTPOWER
+ db 99, FUTURE_SIGHT
+ db 0 ; no more level-up moves
+
+HoOhEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, SACRED_FIRE
+ db 11, SAFEGUARD
+ db 22, GUST
+ db 33, RECOVER
+ db 44, FIRE_BLAST
+ db 55, SUNNY_DAY
+ db 66, SWIFT
+ db 77, WHIRLWIND
+ db 88, ANCIENTPOWER
+ db 99, FUTURE_SIGHT
+ db 0 ; no more level-up moves
+
+CelebiEvosAttacks:
+ db 0 ; no more evolutions
+ db 1, LEECH_SEED
+ db 1, CONFUSION
+ db 1, RECOVER
+ db 1, HEAL_BELL
+ db 10, SAFEGUARD
+ db 20, ANCIENTPOWER
+ db 30, FUTURE_SIGHT
+ db 40, BATON_PASS
+ db 50, PERISH_SONG
+ db 0 ; no more level-up moves
diff --git a/data/pokemon/evos_attacks_pointers.asm b/data/pokemon/evos_attacks_pointers.asm
new file mode 100644
index 000000000..f6582e786
--- /dev/null
+++ b/data/pokemon/evos_attacks_pointers.asm
@@ -0,0 +1,255 @@
+; Evolutions and attacks are grouped together since they're both checked at level-up.
+
+EvosAttacksPointers:: ; 0x425b1
+ dw BulbasaurEvosAttacks
+ dw IvysaurEvosAttacks
+ dw VenusaurEvosAttacks
+ dw CharmanderEvosAttacks
+ dw CharmeleonEvosAttacks
+ dw CharizardEvosAttacks
+ dw SquirtleEvosAttacks
+ dw WartortleEvosAttacks
+ dw BlastoiseEvosAttacks
+ dw CaterpieEvosAttacks
+ dw MetapodEvosAttacks
+ dw ButterfreeEvosAttacks
+ dw WeedleEvosAttacks
+ dw KakunaEvosAttacks
+ dw BeedrillEvosAttacks
+ dw PidgeyEvosAttacks
+ dw PidgeottoEvosAttacks
+ dw PidgeotEvosAttacks
+ dw RattataEvosAttacks
+ dw RaticateEvosAttacks
+ dw SpearowEvosAttacks
+ dw FearowEvosAttacks
+ dw EkansEvosAttacks
+ dw ArbokEvosAttacks
+ dw PikachuEvosAttacks
+ dw RaichuEvosAttacks
+ dw SandshrewEvosAttacks
+ dw SandslashEvosAttacks
+ dw NidoranFEvosAttacks
+ dw NidorinaEvosAttacks
+ dw NidoqueenEvosAttacks
+ dw NidoranMEvosAttacks
+ dw NidorinoEvosAttacks
+ dw NidokingEvosAttacks
+ dw ClefairyEvosAttacks
+ dw ClefableEvosAttacks
+ dw VulpixEvosAttacks
+ dw NinetalesEvosAttacks
+ dw JigglypuffEvosAttacks
+ dw WigglytuffEvosAttacks
+ dw ZubatEvosAttacks
+ dw GolbatEvosAttacks
+ dw OddishEvosAttacks
+ dw GloomEvosAttacks
+ dw VileplumeEvosAttacks
+ dw ParasEvosAttacks
+ dw ParasectEvosAttacks
+ dw VenonatEvosAttacks
+ dw VenomothEvosAttacks
+ dw DiglettEvosAttacks
+ dw DugtrioEvosAttacks
+ dw MeowthEvosAttacks
+ dw PersianEvosAttacks
+ dw PsyduckEvosAttacks
+ dw GolduckEvosAttacks
+ dw MankeyEvosAttacks
+ dw PrimeapeEvosAttacks
+ dw GrowlitheEvosAttacks
+ dw ArcanineEvosAttacks
+ dw PoliwagEvosAttacks
+ dw PoliwhirlEvosAttacks
+ dw PoliwrathEvosAttacks
+ dw AbraEvosAttacks
+ dw KadabraEvosAttacks
+ dw AlakazamEvosAttacks
+ dw MachopEvosAttacks
+ dw MachokeEvosAttacks
+ dw MachampEvosAttacks
+ dw BellsproutEvosAttacks
+ dw WeepinbellEvosAttacks
+ dw VictreebelEvosAttacks
+ dw TentacoolEvosAttacks
+ dw TentacruelEvosAttacks
+ dw GeodudeEvosAttacks
+ dw GravelerEvosAttacks
+ dw GolemEvosAttacks
+ dw PonytaEvosAttacks
+ dw RapidashEvosAttacks
+ dw SlowpokeEvosAttacks
+ dw SlowbroEvosAttacks
+ dw MagnemiteEvosAttacks
+ dw MagnetonEvosAttacks
+ dw FarfetchDEvosAttacks
+ dw DoduoEvosAttacks
+ dw DodrioEvosAttacks
+ dw SeelEvosAttacks
+ dw DewgongEvosAttacks
+ dw GrimerEvosAttacks
+ dw MukEvosAttacks
+ dw ShellderEvosAttacks
+ dw CloysterEvosAttacks
+ dw GastlyEvosAttacks
+ dw HaunterEvosAttacks
+ dw GengarEvosAttacks
+ dw OnixEvosAttacks
+ dw DrowzeeEvosAttacks
+ dw HypnoEvosAttacks
+ dw KrabbyEvosAttacks
+ dw KinglerEvosAttacks
+ dw VoltorbEvosAttacks
+ dw ElectrodeEvosAttacks
+ dw ExeggcuteEvosAttacks
+ dw ExeggutorEvosAttacks
+ dw CuboneEvosAttacks
+ dw MarowakEvosAttacks
+ dw HitmonleeEvosAttacks
+ dw HitmonchanEvosAttacks
+ dw LickitungEvosAttacks
+ dw KoffingEvosAttacks
+ dw WeezingEvosAttacks
+ dw RhyhornEvosAttacks
+ dw RhydonEvosAttacks
+ dw ChanseyEvosAttacks
+ dw TangelaEvosAttacks
+ dw KangaskhanEvosAttacks
+ dw HorseaEvosAttacks
+ dw SeadraEvosAttacks
+ dw GoldeenEvosAttacks
+ dw SeakingEvosAttacks
+ dw StaryuEvosAttacks
+ dw StarmieEvosAttacks
+ dw MrMimeEvosAttacks
+ dw ScytherEvosAttacks
+ dw JynxEvosAttacks
+ dw ElectabuzzEvosAttacks
+ dw MagmarEvosAttacks
+ dw PinsirEvosAttacks
+ dw TaurosEvosAttacks
+ dw MagikarpEvosAttacks
+ dw GyaradosEvosAttacks
+ dw LaprasEvosAttacks
+ dw DittoEvosAttacks
+ dw EeveeEvosAttacks
+ dw VaporeonEvosAttacks
+ dw JolteonEvosAttacks
+ dw FlareonEvosAttacks
+ dw PorygonEvosAttacks
+ dw OmanyteEvosAttacks
+ dw OmastarEvosAttacks
+ dw KabutoEvosAttacks
+ dw KabutopsEvosAttacks
+ dw AerodactylEvosAttacks
+ dw SnorlaxEvosAttacks
+ dw ArticunoEvosAttacks
+ dw ZapdosEvosAttacks
+ dw MoltresEvosAttacks
+ dw DratiniEvosAttacks
+ dw DragonairEvosAttacks
+ dw DragoniteEvosAttacks
+ dw MewtwoEvosAttacks
+ dw MewEvosAttacks
+ dw ChikoritaEvosAttacks
+ dw BayleefEvosAttacks
+ dw MeganiumEvosAttacks
+ dw CyndaquilEvosAttacks
+ dw QuilavaEvosAttacks
+ dw TyphlosionEvosAttacks
+ dw TotodileEvosAttacks
+ dw CroconawEvosAttacks
+ dw FeraligatrEvosAttacks
+ dw SentretEvosAttacks
+ dw FurretEvosAttacks
+ dw HoothootEvosAttacks
+ dw NoctowlEvosAttacks
+ dw LedybaEvosAttacks
+ dw LedianEvosAttacks
+ dw SpinarakEvosAttacks
+ dw AriadosEvosAttacks
+ dw CrobatEvosAttacks
+ dw ChinchouEvosAttacks
+ dw LanturnEvosAttacks
+ dw PichuEvosAttacks
+ dw CleffaEvosAttacks
+ dw IgglybuffEvosAttacks
+ dw TogepiEvosAttacks
+ dw TogeticEvosAttacks
+ dw NatuEvosAttacks
+ dw XatuEvosAttacks
+ dw MareepEvosAttacks
+ dw FlaaffyEvosAttacks
+ dw AmpharosEvosAttacks
+ dw BellossomEvosAttacks
+ dw MarillEvosAttacks
+ dw AzumarillEvosAttacks
+ dw SudowoodoEvosAttacks
+ dw PolitoedEvosAttacks
+ dw HoppipEvosAttacks
+ dw SkiploomEvosAttacks
+ dw JumpluffEvosAttacks
+ dw AipomEvosAttacks
+ dw SunkernEvosAttacks
+ dw SunfloraEvosAttacks
+ dw YanmaEvosAttacks
+ dw WooperEvosAttacks
+ dw QuagsireEvosAttacks
+ dw EspeonEvosAttacks
+ dw UmbreonEvosAttacks
+ dw MurkrowEvosAttacks
+ dw SlowkingEvosAttacks
+ dw MisdreavusEvosAttacks
+ dw UnownEvosAttacks
+ dw WobbuffetEvosAttacks
+ dw GirafarigEvosAttacks
+ dw PinecoEvosAttacks
+ dw ForretressEvosAttacks
+ dw DunsparceEvosAttacks
+ dw GligarEvosAttacks
+ dw SteelixEvosAttacks
+ dw SnubbullEvosAttacks
+ dw GranbullEvosAttacks
+ dw QwilfishEvosAttacks
+ dw ScizorEvosAttacks
+ dw ShuckleEvosAttacks
+ dw HeracrossEvosAttacks
+ dw SneaselEvosAttacks
+ dw TeddiursaEvosAttacks
+ dw UrsaringEvosAttacks
+ dw SlugmaEvosAttacks
+ dw MagcargoEvosAttacks
+ dw SwinubEvosAttacks
+ dw PiloswineEvosAttacks
+ dw CorsolaEvosAttacks
+ dw RemoraidEvosAttacks
+ dw OctilleryEvosAttacks
+ dw DelibirdEvosAttacks
+ dw MantineEvosAttacks
+ dw SkarmoryEvosAttacks
+ dw HoundourEvosAttacks
+ dw HoundoomEvosAttacks
+ dw KingdraEvosAttacks
+ dw PhanpyEvosAttacks
+ dw DonphanEvosAttacks
+ dw Porygon2EvosAttacks
+ dw StantlerEvosAttacks
+ dw SmeargleEvosAttacks
+ dw TyrogueEvosAttacks
+ dw HitmontopEvosAttacks
+ dw SmoochumEvosAttacks
+ dw ElekidEvosAttacks
+ dw MagbyEvosAttacks
+ dw MiltankEvosAttacks
+ dw BlisseyEvosAttacks
+ dw RaikouEvosAttacks
+ dw EnteiEvosAttacks
+ dw SuicuneEvosAttacks
+ dw LarvitarEvosAttacks
+ dw PupitarEvosAttacks
+ dw TyranitarEvosAttacks
+ dw LugiaEvosAttacks
+ dw HoOhEvosAttacks
+ dw CelebiEvosAttacks
+; 0x427a7
diff --git a/data/pokemon/menu_icons.asm b/data/pokemon/menu_icons.asm
new file mode 100644
index 000000000..360b206a2
--- /dev/null
+++ b/data/pokemon/menu_icons.asm
@@ -0,0 +1,255 @@
+; party menu icons
+
+MonMenuIcons: ; 8eac4
+ db ICON_BULBASAUR ; BULBASAUR
+ db ICON_BULBASAUR ; IVYSAUR
+ db ICON_BULBASAUR ; VENUSAUR
+ db ICON_CHARMANDER ; CHARMANDER
+ db ICON_CHARMANDER ; CHARMELEON
+ db ICON_BIGMON ; CHARIZARD
+ db ICON_SQUIRTLE ; SQUIRTLE
+ db ICON_SQUIRTLE ; WARTORTLE
+ db ICON_SQUIRTLE ; BLASTOISE
+ db ICON_CATERPILLAR ; CATERPIE
+ db ICON_CATERPILLAR ; METAPOD
+ db ICON_MOTH ; BUTTERFREE
+ db ICON_CATERPILLAR ; WEEDLE
+ db ICON_CATERPILLAR ; KAKUNA
+ db ICON_BUG ; BEEDRILL
+ db ICON_BIRD ; PIDGEY
+ db ICON_BIRD ; PIDGEOTTO
+ db ICON_BIRD ; PIDGEOT
+ db ICON_FOX ; RATTATA
+ db ICON_FOX ; RATICATE
+ db ICON_BIRD ; SPEAROW
+ db ICON_BIRD ; FEAROW
+ db ICON_SERPENT ; EKANS
+ db ICON_SERPENT ; ARBOK
+ db ICON_PIKACHU ; PIKACHU
+ db ICON_PIKACHU ; RAICHU
+ db ICON_MONSTER ; SANDSHREW
+ db ICON_MONSTER ; SANDSLASH
+ db ICON_FOX ; NIDORAN_F
+ db ICON_FOX ; NIDORINA
+ db ICON_MONSTER ; NIDOQUEEN
+ db ICON_FOX ; NIDORAN_M
+ db ICON_FOX ; NIDORINO
+ db ICON_MONSTER ; NIDOKING
+ db ICON_CLEFAIRY ; CLEFAIRY
+ db ICON_CLEFAIRY ; CLEFABLE
+ db ICON_FOX ; VULPIX
+ db ICON_FOX ; NINETALES
+ db ICON_JIGGLYPUFF ; JIGGLYPUFF
+ db ICON_JIGGLYPUFF ; WIGGLYTUFF
+ db ICON_BAT ; ZUBAT
+ db ICON_BAT ; GOLBAT
+ db ICON_ODDISH ; ODDISH
+ db ICON_ODDISH ; GLOOM
+ db ICON_ODDISH ; VILEPLUME
+ db ICON_BUG ; PARAS
+ db ICON_BUG ; PARASECT
+ db ICON_CATERPILLAR ; VENONAT
+ db ICON_MOTH ; VENOMOTH
+ db ICON_DIGLETT ; DIGLETT
+ db ICON_DIGLETT ; DUGTRIO
+ db ICON_FOX ; MEOWTH
+ db ICON_FOX ; PERSIAN
+ db ICON_MONSTER ; PSYDUCK
+ db ICON_MONSTER ; GOLDUCK
+ db ICON_FIGHTER ; MANKEY
+ db ICON_FIGHTER ; PRIMEAPE
+ db ICON_FOX ; GROWLITHE
+ db ICON_FOX ; ARCANINE
+ db ICON_POLIWAG ; POLIWAG
+ db ICON_POLIWAG ; POLIWHIRL
+ db ICON_POLIWAG ; POLIWRATH
+ db ICON_HUMANSHAPE ; ABRA
+ db ICON_HUMANSHAPE ; KADABRA
+ db ICON_HUMANSHAPE ; ALAKAZAM
+ db ICON_FIGHTER ; MACHOP
+ db ICON_FIGHTER ; MACHOKE
+ db ICON_FIGHTER ; MACHAMP
+ db ICON_ODDISH ; BELLSPROUT
+ db ICON_ODDISH ; WEEPINBELL
+ db ICON_ODDISH ; VICTREEBEL
+ db ICON_JELLYFISH ; TENTACOOL
+ db ICON_JELLYFISH ; TENTACRUEL
+ db ICON_GEODUDE ; GEODUDE
+ db ICON_GEODUDE ; GRAVELER
+ db ICON_GEODUDE ; GOLEM
+ db ICON_EQUINE ; PONYTA
+ db ICON_EQUINE ; RAPIDASH
+ db ICON_SLOWPOKE ; SLOWPOKE
+ db ICON_SLOWPOKE ; SLOWBRO
+ db ICON_VOLTORB ; MAGNEMITE
+ db ICON_VOLTORB ; MAGNETON
+ db ICON_BIRD ; FARFETCH_D
+ db ICON_BIRD ; DODUO
+ db ICON_BIRD ; DODRIO
+ db ICON_LAPRAS ; SEEL
+ db ICON_LAPRAS ; DEWGONG
+ db ICON_BLOB ; GRIMER
+ db ICON_BLOB ; MUK
+ db ICON_SHELL ; SHELLDER
+ db ICON_SHELL ; CLOYSTER
+ db ICON_GHOST ; GASTLY
+ db ICON_GHOST ; HAUNTER
+ db ICON_GHOST ; GENGAR
+ db ICON_SERPENT ; ONIX
+ db ICON_HUMANSHAPE ; DROWZEE
+ db ICON_HUMANSHAPE ; HYPNO
+ db ICON_SHELL ; KRABBY
+ db ICON_SHELL ; KINGLER
+ db ICON_VOLTORB ; VOLTORB
+ db ICON_VOLTORB ; ELECTRODE
+ db ICON_ODDISH ; EXEGGCUTE
+ db ICON_ODDISH ; EXEGGUTOR
+ db ICON_MONSTER ; CUBONE
+ db ICON_MONSTER ; MAROWAK
+ db ICON_FIGHTER ; HITMONLEE
+ db ICON_FIGHTER ; HITMONCHAN
+ db ICON_MONSTER ; LICKITUNG
+ db ICON_BLOB ; KOFFING
+ db ICON_BLOB ; WEEZING
+ db ICON_EQUINE ; RHYHORN
+ db ICON_MONSTER ; RHYDON
+ db ICON_CLEFAIRY ; CHANSEY
+ db ICON_ODDISH ; TANGELA
+ db ICON_MONSTER ; KANGASKHAN
+ db ICON_FISH ; HORSEA
+ db ICON_FISH ; SEADRA
+ db ICON_FISH ; GOLDEEN
+ db ICON_FISH ; SEAKING
+ db ICON_STARYU ; STARYU
+ db ICON_STARYU ; STARMIE
+ db ICON_HUMANSHAPE ; MR__MIME
+ db ICON_BUG ; SCYTHER
+ db ICON_HUMANSHAPE ; JYNX
+ db ICON_HUMANSHAPE ; ELECTABUZZ
+ db ICON_HUMANSHAPE ; MAGMAR
+ db ICON_BUG ; PINSIR
+ db ICON_EQUINE ; TAUROS
+ db ICON_FISH ; MAGIKARP
+ db ICON_GYARADOS ; GYARADOS
+ db ICON_LAPRAS ; LAPRAS
+ db ICON_BLOB ; DITTO
+ db ICON_FOX ; EEVEE
+ db ICON_FOX ; VAPOREON
+ db ICON_FOX ; JOLTEON
+ db ICON_FOX ; FLAREON
+ db ICON_VOLTORB ; PORYGON
+ db ICON_SHELL ; OMANYTE
+ db ICON_SHELL ; OMASTAR
+ db ICON_SHELL ; KABUTO
+ db ICON_SHELL ; KABUTOPS
+ db ICON_BIRD ; AERODACTYL
+ db ICON_SNORLAX ; SNORLAX
+ db ICON_BIRD ; ARTICUNO
+ db ICON_BIRD ; ZAPDOS
+ db ICON_BIRD ; MOLTRES
+ db ICON_SERPENT ; DRATINI
+ db ICON_SERPENT ; DRAGONAIR
+ db ICON_BIGMON ; DRAGONITE
+ db ICON_HUMANSHAPE ; MEWTWO
+ db ICON_HUMANSHAPE ; MEW
+ db ICON_ODDISH ; CHIKORITA
+ db ICON_ODDISH ; BAYLEEF
+ db ICON_ODDISH ; MEGANIUM
+ db ICON_FOX ; CYNDAQUIL
+ db ICON_FOX ; QUILAVA
+ db ICON_FOX ; TYPHLOSION
+ db ICON_MONSTER ; TOTODILE
+ db ICON_MONSTER ; CROCONAW
+ db ICON_MONSTER ; FERALIGATR
+ db ICON_FOX ; SENTRET
+ db ICON_FOX ; FURRET
+ db ICON_BIRD ; HOOTHOOT
+ db ICON_BIRD ; NOCTOWL
+ db ICON_BUG ; LEDYBA
+ db ICON_BUG ; LEDIAN
+ db ICON_BUG ; SPINARAK
+ db ICON_BUG ; ARIADOS
+ db ICON_BAT ; CROBAT
+ db ICON_FISH ; CHINCHOU
+ db ICON_FISH ; LANTURN
+ db ICON_PIKACHU ; PICHU
+ db ICON_CLEFAIRY ; CLEFFA
+ db ICON_JIGGLYPUFF ; IGGLYBUFF
+ db ICON_CLEFAIRY ; TOGEPI
+ db ICON_BIRD ; TOGETIC
+ db ICON_BIRD ; NATU
+ db ICON_BIRD ; XATU
+ db ICON_FOX ; MAREEP
+ db ICON_MONSTER ; FLAAFFY
+ db ICON_MONSTER ; AMPHAROS
+ db ICON_ODDISH ; BELLOSSOM
+ db ICON_JIGGLYPUFF ; MARILL
+ db ICON_JIGGLYPUFF ; AZUMARILL
+ db ICON_SUDOWOODO ; SUDOWOODO
+ db ICON_POLIWAG ; POLITOED
+ db ICON_ODDISH ; HOPPIP
+ db ICON_ODDISH ; SKIPLOOM
+ db ICON_ODDISH ; JUMPLUFF
+ db ICON_MONSTER ; AIPOM
+ db ICON_ODDISH ; SUNKERN
+ db ICON_ODDISH ; SUNFLORA
+ db ICON_BUG ; YANMA
+ db ICON_MONSTER ; WOOPER
+ db ICON_MONSTER ; QUAGSIRE
+ db ICON_FOX ; ESPEON
+ db ICON_FOX ; UMBREON
+ db ICON_BIRD ; MURKROW
+ db ICON_SLOWPOKE ; SLOWKING
+ db ICON_GHOST ; MISDREAVUS
+ db ICON_UNOWN ; UNOWN
+ db ICON_GHOST ; WOBBUFFET
+ db ICON_EQUINE ; GIRAFARIG
+ db ICON_BUG ; PINECO
+ db ICON_BUG ; FORRETRESS
+ db ICON_SERPENT ; DUNSPARCE
+ db ICON_BUG ; GLIGAR
+ db ICON_SERPENT ; STEELIX
+ db ICON_MONSTER ; SNUBBULL
+ db ICON_MONSTER ; GRANBULL
+ db ICON_FISH ; QWILFISH
+ db ICON_BUG ; SCIZOR
+ db ICON_BUG ; SHUCKLE
+ db ICON_BUG ; HERACROSS
+ db ICON_FOX ; SNEASEL
+ db ICON_MONSTER ; TEDDIURSA
+ db ICON_MONSTER ; URSARING
+ db ICON_BLOB ; SLUGMA
+ db ICON_BLOB ; MAGCARGO
+ db ICON_EQUINE ; SWINUB
+ db ICON_EQUINE ; PILOSWINE
+ db ICON_SHELL ; CORSOLA
+ db ICON_FISH ; REMORAID
+ db ICON_FISH ; OCTILLERY
+ db ICON_MONSTER ; DELIBIRD
+ db ICON_FISH ; MANTINE
+ db ICON_BIRD ; SKARMORY
+ db ICON_FOX ; HOUNDOUR
+ db ICON_FOX ; HOUNDOOM
+ db ICON_BIGMON ; KINGDRA
+ db ICON_EQUINE ; PHANPY
+ db ICON_EQUINE ; DONPHAN
+ db ICON_VOLTORB ; PORYGON2
+ db ICON_EQUINE ; STANTLER
+ db ICON_MONSTER ; SMEARGLE
+ db ICON_FIGHTER ; TYROGUE
+ db ICON_FIGHTER ; HITMONTOP
+ db ICON_HUMANSHAPE ; SMOOCHUM
+ db ICON_HUMANSHAPE ; ELEKID
+ db ICON_HUMANSHAPE ; MAGBY
+ db ICON_EQUINE ; MILTANK
+ db ICON_CLEFAIRY ; BLISSEY
+ db ICON_FOX ; RAIKOU
+ db ICON_FOX ; ENTEI
+ db ICON_FOX ; SUICUNE
+ db ICON_MONSTER ; LARVITAR
+ db ICON_MONSTER ; PUPITAR
+ db ICON_MONSTER ; TYRANITAR
+ db ICON_LUGIA ; LUGIA
+ db ICON_HO_OH ; HO_OH
+ db ICON_HUMANSHAPE ; CELEBI
+; 8ebbf
diff --git a/data/pokemon/pokemon_names.asm b/data/pokemon/pokemon_names.asm
new file mode 100644
index 000000000..266b0c020
--- /dev/null
+++ b/data/pokemon/pokemon_names.asm
@@ -0,0 +1,257 @@
+PokemonNames::
+ db "BULBASAUR@"
+ db "IVYSAUR@@@"
+ db "VENUSAUR@@"
+ db "CHARMANDER"
+ db "CHARMELEON"
+ db "CHARIZARD@"
+ db "SQUIRTLE@@"
+ db "WARTORTLE@"
+ db "BLASTOISE@"
+ db "CATERPIE@@"
+ db "METAPOD@@@"
+ db "BUTTERFREE"
+ db "WEEDLE@@@@"
+ db "KAKUNA@@@@"
+ db "BEEDRILL@@"
+ db "PIDGEY@@@@"
+ db "PIDGEOTTO@"
+ db "PIDGEOT@@@"
+ db "RATTATA@@@"
+ db "RATICATE@@"
+ db "SPEAROW@@@"
+ db "FEAROW@@@@"
+ db "EKANS@@@@@"
+ db "ARBOK@@@@@"
+ db "PIKACHU@@@"
+ db "RAICHU@@@@"
+ db "SANDSHREW@"
+ db "SANDSLASH@"
+ db "NIDORAN♀@@"
+ db "NIDORINA@@"
+ db "NIDOQUEEN@"
+ db "NIDORAN♂@@"
+ db "NIDORINO@@"
+ db "NIDOKING@@"
+ db "CLEFAIRY@@"
+ db "CLEFABLE@@"
+ db "VULPIX@@@@"
+ db "NINETALES@"
+ db "JIGGLYPUFF"
+ db "WIGGLYTUFF"
+ db "ZUBAT@@@@@"
+ db "GOLBAT@@@@"
+ db "ODDISH@@@@"
+ db "GLOOM@@@@@"
+ db "VILEPLUME@"
+ db "PARAS@@@@@"
+ db "PARASECT@@"
+ db "VENONAT@@@"
+ db "VENOMOTH@@"
+ db "DIGLETT@@@"
+ db "DUGTRIO@@@"
+ db "MEOWTH@@@@"
+ db "PERSIAN@@@"
+ db "PSYDUCK@@@"
+ db "GOLDUCK@@@"
+ db "MANKEY@@@@"
+ db "PRIMEAPE@@"
+ db "GROWLITHE@"
+ db "ARCANINE@@"
+ db "POLIWAG@@@"
+ db "POLIWHIRL@"
+ db "POLIWRATH@"
+ db "ABRA@@@@@@"
+ db "KADABRA@@@"
+ db "ALAKAZAM@@"
+ db "MACHOP@@@@"
+ db "MACHOKE@@@"
+ db "MACHAMP@@@"
+ db "BELLSPROUT"
+ db "WEEPINBELL"
+ db "VICTREEBEL"
+ db "TENTACOOL@"
+ db "TENTACRUEL"
+ db "GEODUDE@@@"
+ db "GRAVELER@@"
+ db "GOLEM@@@@@"
+ db "PONYTA@@@@"
+ db "RAPIDASH@@"
+ db "SLOWPOKE@@"
+ db "SLOWBRO@@@"
+ db "MAGNEMITE@"
+ db "MAGNETON@@"
+ db "FARFETCH'D"
+ db "DODUO@@@@@"
+ db "DODRIO@@@@"
+ db "SEEL@@@@@@"
+ db "DEWGONG@@@"
+ db "GRIMER@@@@"
+ db "MUK@@@@@@@"
+ db "SHELLDER@@"
+ db "CLOYSTER@@"
+ db "GASTLY@@@@"
+ db "HAUNTER@@@"
+ db "GENGAR@@@@"
+ db "ONIX@@@@@@"
+ db "DROWZEE@@@"
+ db "HYPNO@@@@@"
+ db "KRABBY@@@@"
+ db "KINGLER@@@"
+ db "VOLTORB@@@"
+ db "ELECTRODE@"
+ db "EXEGGCUTE@"
+ db "EXEGGUTOR@"
+ db "CUBONE@@@@"
+ db "MAROWAK@@@"
+ db "HITMONLEE@"
+ db "HITMONCHAN"
+ db "LICKITUNG@"
+ db "KOFFING@@@"
+ db "WEEZING@@@"
+ db "RHYHORN@@@"
+ db "RHYDON@@@@"
+ db "CHANSEY@@@"
+ db "TANGELA@@@"
+ db "KANGASKHAN"
+ db "HORSEA@@@@"
+ db "SEADRA@@@@"
+ db "GOLDEEN@@@"
+ db "SEAKING@@@"
+ db "STARYU@@@@"
+ db "STARMIE@@@"
+ db "MR.MIME@@@"
+ db "SCYTHER@@@"
+ db "JYNX@@@@@@"
+ db "ELECTABUZZ"
+ db "MAGMAR@@@@"
+ db "PINSIR@@@@"
+ db "TAUROS@@@@"
+ db "MAGIKARP@@"
+ db "GYARADOS@@"
+ db "LAPRAS@@@@"
+ db "DITTO@@@@@"
+ db "EEVEE@@@@@"
+ db "VAPOREON@@"
+ db "JOLTEON@@@"
+ db "FLAREON@@@"
+ db "PORYGON@@@"
+ db "OMANYTE@@@"
+ db "OMASTAR@@@"
+ db "KABUTO@@@@"
+ db "KABUTOPS@@"
+ db "AERODACTYL"
+ db "SNORLAX@@@"
+ db "ARTICUNO@@"
+ db "ZAPDOS@@@@"
+ db "MOLTRES@@@"
+ db "DRATINI@@@"
+ db "DRAGONAIR@"
+ db "DRAGONITE@"
+ db "MEWTWO@@@@"
+ db "MEW@@@@@@@"
+ db "CHIKORITA@"
+ db "BAYLEEF@@@"
+ db "MEGANIUM@@"
+ db "CYNDAQUIL@"
+ db "QUILAVA@@@"
+ db "TYPHLOSION"
+ db "TOTODILE@@"
+ db "CROCONAW@@"
+ db "FERALIGATR"
+ db "SENTRET@@@"
+ db "FURRET@@@@"
+ db "HOOTHOOT@@"
+ db "NOCTOWL@@@"
+ db "LEDYBA@@@@"
+ db "LEDIAN@@@@"
+ db "SPINARAK@@"
+ db "ARIADOS@@@"
+ db "CROBAT@@@@"
+ db "CHINCHOU@@"
+ db "LANTURN@@@"
+ db "PICHU@@@@@"
+ db "CLEFFA@@@@"
+ db "IGGLYBUFF@"
+ db "TOGEPI@@@@"
+ db "TOGETIC@@@"
+ db "NATU@@@@@@"
+ db "XATU@@@@@@"
+ db "MAREEP@@@@"
+ db "FLAAFFY@@@"
+ db "AMPHAROS@@"
+ db "BELLOSSOM@"
+ db "MARILL@@@@"
+ db "AZUMARILL@"
+ db "SUDOWOODO@"
+ db "POLITOED@@"
+ db "HOPPIP@@@@"
+ db "SKIPLOOM@@"
+ db "JUMPLUFF@@"
+ db "AIPOM@@@@@"
+ db "SUNKERN@@@"
+ db "SUNFLORA@@"
+ db "YANMA@@@@@"
+ db "WOOPER@@@@"
+ db "QUAGSIRE@@"
+ db "ESPEON@@@@"
+ db "UMBREON@@@"
+ db "MURKROW@@@"
+ db "SLOWKING@@"
+ db "MISDREAVUS"
+ db "UNOWN@@@@@"
+ db "WOBBUFFET@"
+ db "GIRAFARIG@"
+ db "PINECO@@@@"
+ db "FORRETRESS"
+ db "DUNSPARCE@"
+ db "GLIGAR@@@@"
+ db "STEELIX@@@"
+ db "SNUBBULL@@"
+ db "GRANBULL@@"
+ db "QWILFISH@@"
+ db "SCIZOR@@@@"
+ db "SHUCKLE@@@"
+ db "HERACROSS@"
+ db "SNEASEL@@@"
+ db "TEDDIURSA@"
+ db "URSARING@@"
+ db "SLUGMA@@@@"
+ db "MAGCARGO@@"
+ db "SWINUB@@@@"
+ db "PILOSWINE@"
+ db "CORSOLA@@@"
+ db "REMORAID@@"
+ db "OCTILLERY@"
+ db "DELIBIRD@@"
+ db "MANTINE@@@"
+ db "SKARMORY@@"
+ db "HOUNDOUR@@"
+ db "HOUNDOOM@@"
+ db "KINGDRA@@@"
+ db "PHANPY@@@@"
+ db "DONPHAN@@@"
+ db "PORYGON2@@"
+ db "STANTLER@@"
+ db "SMEARGLE@@"
+ db "TYROGUE@@@"
+ db "HITMONTOP@"
+ db "SMOOCHUM@@"
+ db "ELEKID@@@@"
+ db "MAGBY@@@@@"
+ db "MILTANK@@@"
+ db "BLISSEY@@@"
+ db "RAIKOU@@@@"
+ db "ENTEI@@@@@"
+ db "SUICUNE@@@"
+ db "LARVITAR@@"
+ db "PUPITAR@@@"
+ db "TYRANITAR@"
+ db "LUGIA@@@@@"
+ db "HO-OH@@@@@"
+ db "CELEBI@@@@"
+ db "?????@@@@@"
+ db "EGG@@@@@@@"
+ db "?????@@@@@"
+ db "?????@@@@@"
+ db "?????@@@@@"
diff --git a/data/pokemon_names.asm b/data/pokemon_names.asm
deleted file mode 100644
index 06b1a6e55..000000000
--- a/data/pokemon_names.asm
+++ /dev/null
@@ -1,256 +0,0 @@
- db "BULBASAUR@"
- db "IVYSAUR@@@"
- db "VENUSAUR@@"
- db "CHARMANDER"
- db "CHARMELEON"
- db "CHARIZARD@"
- db "SQUIRTLE@@"
- db "WARTORTLE@"
- db "BLASTOISE@"
- db "CATERPIE@@"
- db "METAPOD@@@"
- db "BUTTERFREE"
- db "WEEDLE@@@@"
- db "KAKUNA@@@@"
- db "BEEDRILL@@"
- db "PIDGEY@@@@"
- db "PIDGEOTTO@"
- db "PIDGEOT@@@"
- db "RATTATA@@@"
- db "RATICATE@@"
- db "SPEAROW@@@"
- db "FEAROW@@@@"
- db "EKANS@@@@@"
- db "ARBOK@@@@@"
- db "PIKACHU@@@"
- db "RAICHU@@@@"
- db "SANDSHREW@"
- db "SANDSLASH@"
- db "NIDORAN♀@@"
- db "NIDORINA@@"
- db "NIDOQUEEN@"
- db "NIDORAN♂@@"
- db "NIDORINO@@"
- db "NIDOKING@@"
- db "CLEFAIRY@@"
- db "CLEFABLE@@"
- db "VULPIX@@@@"
- db "NINETALES@"
- db "JIGGLYPUFF"
- db "WIGGLYTUFF"
- db "ZUBAT@@@@@"
- db "GOLBAT@@@@"
- db "ODDISH@@@@"
- db "GLOOM@@@@@"
- db "VILEPLUME@"
- db "PARAS@@@@@"
- db "PARASECT@@"
- db "VENONAT@@@"
- db "VENOMOTH@@"
- db "DIGLETT@@@"
- db "DUGTRIO@@@"
- db "MEOWTH@@@@"
- db "PERSIAN@@@"
- db "PSYDUCK@@@"
- db "GOLDUCK@@@"
- db "MANKEY@@@@"
- db "PRIMEAPE@@"
- db "GROWLITHE@"
- db "ARCANINE@@"
- db "POLIWAG@@@"
- db "POLIWHIRL@"
- db "POLIWRATH@"
- db "ABRA@@@@@@"
- db "KADABRA@@@"
- db "ALAKAZAM@@"
- db "MACHOP@@@@"
- db "MACHOKE@@@"
- db "MACHAMP@@@"
- db "BELLSPROUT"
- db "WEEPINBELL"
- db "VICTREEBEL"
- db "TENTACOOL@"
- db "TENTACRUEL"
- db "GEODUDE@@@"
- db "GRAVELER@@"
- db "GOLEM@@@@@"
- db "PONYTA@@@@"
- db "RAPIDASH@@"
- db "SLOWPOKE@@"
- db "SLOWBRO@@@"
- db "MAGNEMITE@"
- db "MAGNETON@@"
- db "FARFETCH'D"
- db "DODUO@@@@@"
- db "DODRIO@@@@"
- db "SEEL@@@@@@"
- db "DEWGONG@@@"
- db "GRIMER@@@@"
- db "MUK@@@@@@@"
- db "SHELLDER@@"
- db "CLOYSTER@@"
- db "GASTLY@@@@"
- db "HAUNTER@@@"
- db "GENGAR@@@@"
- db "ONIX@@@@@@"
- db "DROWZEE@@@"
- db "HYPNO@@@@@"
- db "KRABBY@@@@"
- db "KINGLER@@@"
- db "VOLTORB@@@"
- db "ELECTRODE@"
- db "EXEGGCUTE@"
- db "EXEGGUTOR@"
- db "CUBONE@@@@"
- db "MAROWAK@@@"
- db "HITMONLEE@"
- db "HITMONCHAN"
- db "LICKITUNG@"
- db "KOFFING@@@"
- db "WEEZING@@@"
- db "RHYHORN@@@"
- db "RHYDON@@@@"
- db "CHANSEY@@@"
- db "TANGELA@@@"
- db "KANGASKHAN"
- db "HORSEA@@@@"
- db "SEADRA@@@@"
- db "GOLDEEN@@@"
- db "SEAKING@@@"
- db "STARYU@@@@"
- db "STARMIE@@@"
- db "MR.MIME@@@"
- db "SCYTHER@@@"
- db "JYNX@@@@@@"
- db "ELECTABUZZ"
- db "MAGMAR@@@@"
- db "PINSIR@@@@"
- db "TAUROS@@@@"
- db "MAGIKARP@@"
- db "GYARADOS@@"
- db "LAPRAS@@@@"
- db "DITTO@@@@@"
- db "EEVEE@@@@@"
- db "VAPOREON@@"
- db "JOLTEON@@@"
- db "FLAREON@@@"
- db "PORYGON@@@"
- db "OMANYTE@@@"
- db "OMASTAR@@@"
- db "KABUTO@@@@"
- db "KABUTOPS@@"
- db "AERODACTYL"
- db "SNORLAX@@@"
- db "ARTICUNO@@"
- db "ZAPDOS@@@@"
- db "MOLTRES@@@"
- db "DRATINI@@@"
- db "DRAGONAIR@"
- db "DRAGONITE@"
- db "MEWTWO@@@@"
- db "MEW@@@@@@@"
- db "CHIKORITA@"
- db "BAYLEEF@@@"
- db "MEGANIUM@@"
- db "CYNDAQUIL@"
- db "QUILAVA@@@"
- db "TYPHLOSION"
- db "TOTODILE@@"
- db "CROCONAW@@"
- db "FERALIGATR"
- db "SENTRET@@@"
- db "FURRET@@@@"
- db "HOOTHOOT@@"
- db "NOCTOWL@@@"
- db "LEDYBA@@@@"
- db "LEDIAN@@@@"
- db "SPINARAK@@"
- db "ARIADOS@@@"
- db "CROBAT@@@@"
- db "CHINCHOU@@"
- db "LANTURN@@@"
- db "PICHU@@@@@"
- db "CLEFFA@@@@"
- db "IGGLYBUFF@"
- db "TOGEPI@@@@"
- db "TOGETIC@@@"
- db "NATU@@@@@@"
- db "XATU@@@@@@"
- db "MAREEP@@@@"
- db "FLAAFFY@@@"
- db "AMPHAROS@@"
- db "BELLOSSOM@"
- db "MARILL@@@@"
- db "AZUMARILL@"
- db "SUDOWOODO@"
- db "POLITOED@@"
- db "HOPPIP@@@@"
- db "SKIPLOOM@@"
- db "JUMPLUFF@@"
- db "AIPOM@@@@@"
- db "SUNKERN@@@"
- db "SUNFLORA@@"
- db "YANMA@@@@@"
- db "WOOPER@@@@"
- db "QUAGSIRE@@"
- db "ESPEON@@@@"
- db "UMBREON@@@"
- db "MURKROW@@@"
- db "SLOWKING@@"
- db "MISDREAVUS"
- db "UNOWN@@@@@"
- db "WOBBUFFET@"
- db "GIRAFARIG@"
- db "PINECO@@@@"
- db "FORRETRESS"
- db "DUNSPARCE@"
- db "GLIGAR@@@@"
- db "STEELIX@@@"
- db "SNUBBULL@@"
- db "GRANBULL@@"
- db "QWILFISH@@"
- db "SCIZOR@@@@"
- db "SHUCKLE@@@"
- db "HERACROSS@"
- db "SNEASEL@@@"
- db "TEDDIURSA@"
- db "URSARING@@"
- db "SLUGMA@@@@"
- db "MAGCARGO@@"
- db "SWINUB@@@@"
- db "PILOSWINE@"
- db "CORSOLA@@@"
- db "REMORAID@@"
- db "OCTILLERY@"
- db "DELIBIRD@@"
- db "MANTINE@@@"
- db "SKARMORY@@"
- db "HOUNDOUR@@"
- db "HOUNDOOM@@"
- db "KINGDRA@@@"
- db "PHANPY@@@@"
- db "DONPHAN@@@"
- db "PORYGON2@@"
- db "STANTLER@@"
- db "SMEARGLE@@"
- db "TYROGUE@@@"
- db "HITMONTOP@"
- db "SMOOCHUM@@"
- db "ELEKID@@@@"
- db "MAGBY@@@@@"
- db "MILTANK@@@"
- db "BLISSEY@@@"
- db "RAIKOU@@@@"
- db "ENTEI@@@@@"
- db "SUICUNE@@@"
- db "LARVITAR@@"
- db "PUPITAR@@@"
- db "TYRANITAR@"
- db "LUGIA@@@@@"
- db "HO-OH@@@@@"
- db "CELEBI@@@@"
- db "?????@@@@@"
- db "EGG@@@@@@@"
- db "?????@@@@@"
- db "?????@@@@@"
- db "?????@@@@@"
diff --git a/data/sgb_border_map.asm b/data/sgb_border_map.asm
new file mode 100644
index 000000000..d9efb8ead
--- /dev/null
+++ b/data/sgb_border_map.asm
@@ -0,0 +1,29 @@
+
+ db $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $14, $14, $15, $14, $16, $14, $17, $14, $17, $54, $16, $54, $15, $54, $14, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14
+ db $01, $14, $02, $14, $03, $14, $03, $54, $02, $54, $01, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $24, $14, $25, $14, $26, $14, $07, $14, $07, $54, $26, $54, $25, $54, $24, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $54, $01, $14, $02, $14, $03, $14, $03, $54, $02, $54, $01, $54
+ db $11, $14, $12, $14, $13, $14, $13, $54, $12, $54, $11, $54, $10, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $24, $14, $34, $14, $35, $14, $35, $54, $34, $54, $33, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $10, $14, $11, $14, $12, $14, $13, $14, $13, $54, $12, $54, $11, $54
+ db $21, $14, $22, $14, $23, $14, $23, $54, $22, $54, $21, $54, $20, $54, $07, $14, $08, $14, $09, $14, $0a, $14, $0b, $14, $0c, $14, $0d, $14, $07, $14, $07, $14, $18, $14, $09, $14, $1a, $14, $1b, $14, $0d, $14, $0c, $14, $1c, $14, $29, $14, $07, $14, $20, $14, $21, $14, $22, $14, $23, $14, $23, $54, $22, $54, $21, $54
+ db $31, $14, $32, $14, $07, $14, $07, $14, $32, $54, $36, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $27, $10, $32, $14, $07, $54, $07, $54, $32, $54, $31, $54
+ db $05, $14, $06, $14, $07, $14, $07, $54, $06, $54, $1f, $10, $37, $10, $06, $14, $07, $14, $07, $54, $06, $54, $05, $54
+ db $15, $14, $16, $14, $17, $14, $17, $54, $16, $54, $1f, $10, $37, $10, $16, $14, $17, $14, $17, $54, $16, $54, $15, $54
+ db $25, $14, $26, $14, $07, $14, $07, $54, $26, $54, $1f, $10, $37, $10, $26, $14, $07, $14, $07, $54, $26, $54, $25, $54
+ db $33, $14, $34, $14, $35, $14, $35, $54, $34, $54, $1f, $10, $37, $10, $34, $14, $35, $14, $35, $54, $34, $54, $33, $54
+ db $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14
+ db $02, $54, $01, $54, $07, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $07, $14, $01, $14, $02, $14
+ db $12, $54, $11, $54, $10, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $10, $14, $11, $14, $12, $14
+ db $22, $54, $21, $54, $20, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $20, $14, $21, $14, $22, $14
+ db $32, $54, $31, $54, $30, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $30, $14, $31, $14, $32, $14
+ db $06, $54, $05, $54, $04, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $04, $14, $05, $14, $06, $14
+ db $16, $54, $15, $54, $14, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $14, $14, $15, $14, $16, $14
+ db $26, $54, $25, $54, $24, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $24, $14, $25, $14, $26, $14
+ db $34, $54, $33, $54, $07, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $07, $14, $33, $14, $34, $14
+ db $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14
+ db $01, $14, $02, $14, $03, $14, $03, $54, $02, $54, $1f, $10, $37, $10, $02, $14, $03, $14, $03, $54, $02, $54, $01, $54
+ db $11, $14, $12, $14, $13, $14, $13, $54, $12, $54, $1f, $10, $37, $10, $12, $14, $13, $14, $13, $54, $12, $54, $11, $54
+ db $21, $14, $22, $14, $23, $14, $23, $54, $22, $54, $1f, $10, $37, $10, $22, $14, $23, $14, $23, $54, $22, $54, $21, $54
+ db $31, $14, $32, $14, $07, $14, $07, $14, $32, $54, $1f, $10, $37, $10, $32, $14, $07, $54, $07, $54, $32, $54, $31, $54
+ db $05, $14, $06, $14, $07, $14, $07, $54, $06, $54, $2e, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2d, $10, $06, $14, $07, $14, $07, $54, $06, $54, $05, $54
+ db $15, $14, $16, $14, $17, $14, $17, $54, $16, $54, $15, $54, $14, $54, $07, $14, $07, $14, $39, $14, $0e, $14, $09, $14, $0f, $14, $28, $14, $07, $14, $19, $14, $0c, $14, $1c, $14, $29, $14, $2a, $14, $2b, $14, $2c, $14, $39, $14, $07, $14, $07, $14, $14, $14, $15, $14, $16, $14, $17, $14, $17, $54, $16, $54, $15, $54
+ db $25, $14, $26, $14, $07, $14, $07, $54, $26, $54, $25, $54, $24, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $01, $14, $02, $14, $03, $14, $03, $54, $02, $54, $01, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $24, $14, $25, $14, $26, $14, $07, $14, $07, $54, $26, $54, $25, $54
+ db $33, $14, $34, $14, $35, $14, $35, $54, $34, $54, $24, $54, $07, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $10, $14, $11, $14, $12, $14, $13, $14, $13, $54, $12, $54, $11, $54, $10, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $24, $14, $34, $14, $35, $14, $35, $54, $34, $54, $33, $54
+ db $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $20, $14, $21, $14, $22, $14, $23, $14, $23, $54, $22, $54, $21, $54, $20, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14
diff --git a/data/sprite_anim_frames.asm b/data/sprite_anim_frames.asm
new file mode 100755
index 000000000..e69792ec1
--- /dev/null
+++ b/data/sprite_anim_frames.asm
@@ -0,0 +1,499 @@
+SpriteAnimFrameData: ; 8d6e6
+; entries correspond to SPRITE_ANIM_FRAMESET_* constants
+ dw .Frameset_00
+ dw .Frameset_PartyMon
+ dw .Frameset_PartyMonWithMail
+ dw .Frameset_PartyMonWithItem
+ dw .Frameset_PartyMonFast
+ dw .Frameset_PartyMonWithMailFast
+ dw .Frameset_PartyMonWithItemFast
+ dw .Frameset_GSTitleTrail
+ dw .Frameset_TextEntryCursor
+ dw .Frameset_09
+ dw .Frameset_GameFreakLogo
+ dw .Frameset_GSIntroStar
+ dw .Frameset_GSIntroSparkle
+ dw .Frameset_SlotsGolem
+ dw .Frameset_SlotsChansey
+ dw .Frameset_SlotsChansey2
+ dw .Frameset_SlotsEgg
+ dw .Frameset_RedWalk
+ dw .Frameset_StillCursor
+ dw .Frameset_TradePokeBall
+ dw .Frameset_TradePokeBall0
+ dw .Frameset_TradePoof
+ dw .Frameset_TradeTubeBulge
+ dw .Frameset_TrademonIcon
+ dw .Frameset_TrademonBubble
+ dw .Frameset_EvolutionBallOfLight
+ dw .Frameset_RadioTuningKnob
+ dw .Frameset_MagnetTrainRed
+ dw .Frameset_1c
+ dw .Frameset_Leaf
+ dw .Frameset_CutTree
+ dw .Frameset_EggCrack
+ dw .Frameset_EggHatch
+ dw .Frameset_21
+ dw .Frameset_22
+ dw .Frameset_23
+ dw .Frameset_24
+ dw .Frameset_HeadbuttTree
+ dw .Frameset_26
+ dw .Frameset_27
+ dw .Frameset_28
+ dw .Frameset_29
+ dw .Frameset_2a
+ dw .Frameset_2b
+ dw .Frameset_2c
+ dw .Frameset_BlueWalk
+ dw .Frameset_MagnetTrainBlue
+ dw .Frameset_MobileTradeSentBall
+ dw .Frameset_MobileTradeOTBall
+ dw .Frameset_ForMobile22
+ dw .Frameset_ForMobile23
+ dw .Frameset_ForMobile24
+ dw .Frameset_ForMobile25
+ dw .Frameset_IntroSuicune
+ dw .Frameset_IntroSuicune2
+ dw .Frameset_IntroPichu
+ dw .Frameset_IntroWooper
+ dw .Frameset_IntroUnown1
+ dw .Frameset_IntroUnown2
+ dw .Frameset_IntroUnown3
+ dw .Frameset_IntroUnown4
+ dw .Frameset_IntroUnownF2
+ dw .Frameset_IntroSuicuneAway
+ dw .Frameset_IntroUnownF
+ dw .Frameset_CelebiLeft
+ dw .Frameset_CelebiRight
+; 8d76a
+
+.Frameset_00:
+ frame SPRITE_ANIM_FRAME_IDX_RED_WALK_1, 32
+ endanim
+
+.Frameset_PartyMon:
+ frame SPRITE_ANIM_FRAME_IDX_RED_WALK_1, 8
+ frame SPRITE_ANIM_FRAME_IDX_RED_WALK_2, 8
+ dorestart
+
+.Frameset_PartyMonWithMail:
+ frame SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_MAIL_1, 8
+ frame SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_MAIL_2, 8
+ dorestart
+
+.Frameset_PartyMonWithItem:
+ frame SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_ITEM_1, 8
+ frame SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_ITEM_2, 8
+ dorestart
+
+.Frameset_PartyMonFast:
+ frame SPRITE_ANIM_FRAME_IDX_RED_WALK_1, 4
+ frame SPRITE_ANIM_FRAME_IDX_RED_WALK_2, 4
+ dorestart
+
+.Frameset_PartyMonWithMailFast:
+ frame SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_MAIL_1, 4
+ frame SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_MAIL_2, 4
+ dorestart
+
+.Frameset_PartyMonWithItemFast:
+ frame SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_ITEM_1, 4
+ frame SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_ITEM_2, 4
+ dorestart
+
+.Frameset_RedWalk:
+ frame SPRITE_ANIM_FRAME_IDX_RED_WALK_1, 8
+ frame SPRITE_ANIM_FRAME_IDX_RED_WALK_2, 8
+ frame SPRITE_ANIM_FRAME_IDX_RED_WALK_1, 8
+ frame SPRITE_ANIM_FRAME_IDX_RED_WALK_2, 8, OAM_X_FLIP
+ dorestart
+
+.Frameset_BlueWalk:
+ frame SPRITE_ANIM_FRAME_IDX_BLUE_WALK_1, 8
+ frame SPRITE_ANIM_FRAME_IDX_BLUE_WALK_2, 8
+ frame SPRITE_ANIM_FRAME_IDX_BLUE_WALK_1, 8
+ frame SPRITE_ANIM_FRAME_IDX_BLUE_WALK_2, 8, OAM_X_FLIP
+ dorestart
+
+.Frameset_MagnetTrainBlue:
+ frame SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_BLUE_1, 8
+ frame SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_BLUE_2, 8
+ frame SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_BLUE_1, 8
+ frame SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_BLUE_2, 8, OAM_X_FLIP
+ dorestart
+
+.Frameset_GSTitleTrail:
+ frame SPRITE_ANIM_FRAME_IDX_GS_TITLE_TRAIL_1, 1
+ frame SPRITE_ANIM_FRAME_IDX_GS_TITLE_TRAIL_2, 1
+ dorestart
+
+.Frameset_TextEntryCursor:
+ frame SPRITE_ANIM_FRAME_IDX_TEXT_ENTRY_CURSOR, 1
+ dorepeat 1
+ dorestart
+
+.Frameset_09:
+ frame SPRITE_ANIM_FRAME_IDX_FOR_FRAMESET_09, 1
+ dorepeat 1
+ dorestart
+
+.Frameset_GameFreakLogo:
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_1, 12
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_2, 1
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_3, 1
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_2, 4
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_1, 12
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_2, 12
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_3, 4
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_4, 32
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_5, 3
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_6, 3
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_7, 4
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_8, 4
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_9, 4
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_10, 10
+ frame SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_11, 7
+ endanim
+
+.Frameset_GSIntroStar:
+ frame SPRITE_ANIM_FRAME_IDX_GS_INTRO_STAR, 3
+ frame SPRITE_ANIM_FRAME_IDX_GS_INTRO_STAR, 3, OAM_Y_FLIP
+ dorestart
+
+.Frameset_GSIntroSparkle:
+ frame SPRITE_ANIM_FRAME_IDX_GS_INTRO_SPARKLE_1, 2
+ frame SPRITE_ANIM_FRAME_IDX_GS_INTRO_SPARKLE_2, 2
+ frame SPRITE_ANIM_FRAME_IDX_GS_INTRO_SPARKLE_3, 2
+ frame SPRITE_ANIM_FRAME_IDX_GS_INTRO_SPARKLE_2, 2
+ dorestart
+
+.Frameset_SlotsGolem:
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_GOLEM_1, 7
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_GOLEM_2, 7
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_GOLEM_1, 7, OAM_Y_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_GOLEM_2, 7, OAM_X_FLIP
+ dorestart
+
+.Frameset_SlotsChansey:
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_1, 7
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_2, 7
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_1, 7
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_3, 7
+ dorestart
+
+.Frameset_SlotsChansey2:
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_1, 7
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_4, 7
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_5, 7
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_4, 7
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_1, 7
+ endanim
+
+.Frameset_SlotsEgg:
+ frame SPRITE_ANIM_FRAME_IDX_SLOTS_EGG, 20
+ endanim
+
+.Frameset_StillCursor:
+ frame SPRITE_ANIM_FRAME_IDX_STILL_CURSOR, 32
+ endanim
+
+.Frameset_TradePokeBall:
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 32
+ endanim
+
+.Frameset_TradePokeBall0:
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3, OAM_X_FLIP
+ dorestart
+
+.Frameset_TradePoof:
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POOF_1, 4
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POOF_2, 4
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POOF_3, 4
+ delanim
+
+.Frameset_TradeTubeBulge:
+ frame SPRITE_ANIM_FRAME_IDX_35, 3
+ frame SPRITE_ANIM_FRAME_IDX_36, 3
+ dorestart
+
+.Frameset_TrademonIcon:
+ frame SPRITE_ANIM_FRAME_IDX_TRADEMON_ICON_1, 7
+ frame SPRITE_ANIM_FRAME_IDX_TRADEMON_ICON_2, 7
+ dorestart
+
+.Frameset_TrademonBubble:
+ frame SPRITE_ANIM_FRAME_IDX_TRADEMON_BUBBLE, 32
+ endanim
+
+.Frameset_EvolutionBallOfLight:
+ frame SPRITE_ANIM_FRAME_IDX_EVOLUTION_BALL_OF_LIGHT_2, 2
+ frame SPRITE_ANIM_FRAME_IDX_EVOLUTION_BALL_OF_LIGHT_1, 2
+ frame SPRITE_ANIM_FRAME_IDX_EVOLUTION_BALL_OF_LIGHT_2, 2
+ endanim
+
+.Frameset_RadioTuningKnob:
+ frame SPRITE_ANIM_FRAME_IDX_RADIO_TUNING_KNOB, 32
+ endanim
+
+.Frameset_MagnetTrainRed:
+ frame SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_RED_1, 8
+ frame SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_RED_2, 8
+ frame SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_RED_1, 8
+ frame SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_RED_2, 8, OAM_X_FLIP
+ dorestart
+
+; XXX
+ frame SPRITE_ANIM_FRAME_IDX_43, 8
+ frame SPRITE_ANIM_FRAME_IDX_44, 8
+ dorestart
+
+; XXX
+ frame SPRITE_ANIM_FRAME_IDX_45, 8
+ frame SPRITE_ANIM_FRAME_IDX_46, 8
+ dorestart
+
+; XXX
+ frame SPRITE_ANIM_FRAME_IDX_47, 8
+ frame SPRITE_ANIM_FRAME_IDX_48, 8
+ dorestart
+
+; XXX
+ frame SPRITE_ANIM_FRAME_IDX_49, 1
+ frame SPRITE_ANIM_FRAME_IDX_49, 1, OAM_X_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_49, 1, OAM_X_FLIP, OAM_Y_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_49, 1, OAM_Y_FLIP
+ dorestart
+
+; XXX
+ frame SPRITE_ANIM_FRAME_IDX_4A, 32
+ endanim
+
+; XXX
+ frame SPRITE_ANIM_FRAME_IDX_4B, 32
+ endanim
+
+; XXX
+ frame SPRITE_ANIM_FRAME_IDX_4C, 32
+ endanim
+
+; XXX
+ frame SPRITE_ANIM_FRAME_IDX_4D, 32
+ endanim
+
+; XXX
+ frame SPRITE_ANIM_FRAME_IDX_4E, 3
+ dorepeat 3
+ dorestart
+
+.Frameset_1c:
+ dorepeat 32
+ endanim
+
+.Frameset_Leaf:
+ frame SPRITE_ANIM_FRAME_IDX_LEAF, 32
+ endanim
+
+.Frameset_CutTree:
+ frame SPRITE_ANIM_FRAME_IDX_TREE_1, 2
+ frame SPRITE_ANIM_FRAME_IDX_CUT_TREE_2, 16
+ dorepeat 1
+ frame SPRITE_ANIM_FRAME_IDX_CUT_TREE_3, 1
+ dorepeat 1
+ frame SPRITE_ANIM_FRAME_IDX_CUT_TREE_4, 1
+ delanim
+
+.Frameset_EggCrack:
+ frame SPRITE_ANIM_FRAME_IDX_EGG_CRACK, 32
+ endanim
+
+.Frameset_EggHatch:
+ frame SPRITE_ANIM_FRAME_IDX_55, 32
+ endanim
+
+.Frameset_21:
+ frame SPRITE_ANIM_FRAME_IDX_55, 32, OAM_X_FLIP
+ endanim
+
+.Frameset_22:
+ frame SPRITE_ANIM_FRAME_IDX_55, 32, OAM_Y_FLIP
+ endanim
+
+.Frameset_23:
+ frame SPRITE_ANIM_FRAME_IDX_55, 32, OAM_X_FLIP, OAM_Y_FLIP
+ endanim
+
+.Frameset_24:
+ frame SPRITE_ANIM_FRAME_IDX_56, 10
+ frame SPRITE_ANIM_FRAME_IDX_57, 9
+ frame SPRITE_ANIM_FRAME_IDX_58, 10
+ frame SPRITE_ANIM_FRAME_IDX_59, 10
+ frame SPRITE_ANIM_FRAME_IDX_58, 9
+ frame SPRITE_ANIM_FRAME_IDX_5A, 10
+ dorestart
+
+.Frameset_HeadbuttTree:
+ frame SPRITE_ANIM_FRAME_IDX_TREE_1, 2
+ frame SPRITE_ANIM_FRAME_IDX_HEADBUTT_TREE_2, 2
+ frame SPRITE_ANIM_FRAME_IDX_TREE_1, 2
+ frame SPRITE_ANIM_FRAME_IDX_HEADBUTT_TREE_2, 2, OAM_X_FLIP
+ dorestart
+
+.Frameset_26:
+ frame SPRITE_ANIM_FRAME_IDX_5C, 2
+ endanim
+
+.Frameset_27:
+ frame SPRITE_ANIM_FRAME_IDX_5D, 2
+ endanim
+
+.Frameset_28:
+ frame SPRITE_ANIM_FRAME_IDX_5E, 2
+ endanim
+
+.Frameset_29:
+ frame SPRITE_ANIM_FRAME_IDX_5F, 2
+ endanim
+
+.Frameset_2a:
+ frame SPRITE_ANIM_FRAME_IDX_60, 2
+ endanim
+
+.Frameset_2b:
+ frame SPRITE_ANIM_FRAME_IDX_61, 2
+ endanim
+
+.Frameset_2c:
+ frame SPRITE_ANIM_FRAME_IDX_62, 2
+ endanim
+
+.Frameset_MobileTradeSentBall:
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POOF_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POOF_2, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POOF_3, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3, OAM_X_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3, OAM_X_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3, OAM_X_FLIP
+ endanim
+
+.Frameset_MobileTradeOTBall:
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3, OAM_X_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3, OAM_X_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2, 3, OAM_X_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POOF_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POOF_2, 3
+ frame SPRITE_ANIM_FRAME_IDX_TRADE_POOF_3, 3
+ delanim
+
+.Frameset_ForMobile22:
+ frame SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_22_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_22_2, 3
+ dorestart
+
+.Frameset_ForMobile23:
+ frame SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_23, 3
+ endanim
+
+.Frameset_ForMobile24:
+ frame SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_24, 3
+ endanim
+
+.Frameset_ForMobile25:
+ frame SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_25_1, 2
+ frame SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_25_2, 2
+ frame SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_25_3, 2
+ delanim
+
+.Frameset_IntroSuicune:
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_2, 3
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_3, 3
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_4, 3
+ dorestart
+
+.Frameset_IntroSuicune2:
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_4, 3
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_1, 7
+ endanim
+
+.Frameset_IntroPichu:
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_PICHU_1, 32
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_PICHU_2, 7
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_PICHU_3, 7
+ endanim
+
+.Frameset_IntroWooper:
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_WOOPER, 3
+ endanim
+
+.Frameset_IntroUnown1:
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_2, 3
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_3, 7
+ delanim
+
+.Frameset_IntroUnown2:
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_1, 3, OAM_X_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_2, 3, OAM_X_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_3, 7, OAM_X_FLIP
+ delanim
+
+.Frameset_IntroUnown3:
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_1, 3, OAM_Y_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_2, 3, OAM_Y_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_3, 7, OAM_Y_FLIP
+ delanim
+
+.Frameset_IntroUnown4:
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_1, 3, OAM_X_FLIP, OAM_Y_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_2, 3, OAM_X_FLIP, OAM_Y_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_3, 7, OAM_X_FLIP, OAM_Y_FLIP
+ delanim
+
+.Frameset_IntroUnownF2:
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_1, 3
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_2, 3
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_3, 3
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_4, 7
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_5, 7
+ endanim
+
+.Frameset_IntroSuicuneAway:
+ frame SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_AWAY, 3
+ endanim
+
+.Frameset_IntroUnownF:
+ dorepeat 0
+ endanim
+
+.Frameset_CelebiLeft:
+ frame SPRITE_ANIM_FRAME_IDX_CELEBI_1, 8
+ frame SPRITE_ANIM_FRAME_IDX_CELEBI_2, 8
+ endanim
+
+.Frameset_CelebiRight:
+ frame SPRITE_ANIM_FRAME_IDX_CELEBI_1, 8, OAM_X_FLIP
+ frame SPRITE_ANIM_FRAME_IDX_CELEBI_2, 8, OAM_X_FLIP
+ endanim
+; 8d94d
diff --git a/data/sprite_anim_oam.asm b/data/sprite_anim_oam.asm
new file mode 100644
index 000000000..fea73f596
--- /dev/null
+++ b/data/sprite_anim_oam.asm
@@ -0,0 +1,1131 @@
+SpriteAnimOAMData: ; 8d94d
+; entries correspond to SPRITE_ANIM_FRAME_IDX_* constants
+ ; vtile offset, pointer
+ dbw $00, .OAMData_RedWalk ; SPRITE_ANIM_FRAME_IDX_RED_WALK_1
+ dbw $04, .OAMData_RedWalk ; SPRITE_ANIM_FRAME_IDX_RED_WALK_2
+ dbw $4c, .OAMData_1x1_Palette0 ; SPRITE_ANIM_FRAME_IDX_02
+ dbw $5c, .OAMData_1x1_Palette0 ; SPRITE_ANIM_FRAME_IDX_03
+ dbw $6c, .OAMData_04 ; SPRITE_ANIM_FRAME_IDX_04
+ dbw $6e, .OAMData_04 ; SPRITE_ANIM_FRAME_IDX_05
+ dbw $2d, .OAMData_06 ; SPRITE_ANIM_FRAME_IDX_06
+ dbw $4d, .OAMData_06 ; SPRITE_ANIM_FRAME_IDX_07
+ dbw $60, .OAMData_08 ; SPRITE_ANIM_FRAME_IDX_08
+ dbw $00, .OAMData_08 ; SPRITE_ANIM_FRAME_IDX_09
+ dbw $00, .OAMData_08 ; SPRITE_ANIM_FRAME_IDX_0A
+ dbw $06, .OAMData_08 ; SPRITE_ANIM_FRAME_IDX_0B
+ dbw $0c, .OAMData_0c ; SPRITE_ANIM_FRAME_IDX_0C
+ dbw $0d, .OAMData_1x1_Palette0 ; SPRITE_ANIM_FRAME_IDX_0D
+ dbw $00, .OAMData_0e ; SPRITE_ANIM_FRAME_IDX_0E
+ dbw $04, .OAMData_0e ; SPRITE_ANIM_FRAME_IDX_0F
+ dbw $08, .OAMData_0e ; SPRITE_ANIM_FRAME_IDX_10
+ dbw $40, .OAMData_0e ; SPRITE_ANIM_FRAME_IDX_11
+ dbw $44, .OAMData_0e ; SPRITE_ANIM_FRAME_IDX_12
+ dbw $48, .OAMData_0e ; SPRITE_ANIM_FRAME_IDX_13
+ dbw $4c, .OAMData_0e ; SPRITE_ANIM_FRAME_IDX_14
+ dbw $80, .OAMData_15 ; SPRITE_ANIM_FRAME_IDX_15
+ dbw $85, .OAMData_15 ; SPRITE_ANIM_FRAME_IDX_16
+ dbw $8a, .OAMData_15 ; SPRITE_ANIM_FRAME_IDX_17
+ dbw $00, .OAMData_18 ; SPRITE_ANIM_FRAME_IDX_18
+ dbw $01, .OAMData_TradePoofBubble ; SPRITE_ANIM_FRAME_IDX_19
+ dbw $09, .OAMData_1a ; SPRITE_ANIM_FRAME_IDX_1A
+ dbw $10, .OAMData_1b ; SPRITE_ANIM_FRAME_IDX_1B
+ dbw $29, .OAMData_1b ; SPRITE_ANIM_FRAME_IDX_1C
+ dbw $42, .OAMData_1b ; SPRITE_ANIM_FRAME_IDX_1D
+ dbw $f8, .OAMData_GSTitleTrail ; SPRITE_ANIM_FRAME_IDX_GS_TITLE_TRAIL_1
+ dbw $fa, .OAMData_GSTitleTrail ; SPRITE_ANIM_FRAME_IDX_GS_TITLE_TRAIL_2
+ dbw $00, .OAMData_TextEntryCursor ; SPRITE_ANIM_FRAME_IDX_TEXT_ENTRY_CURSOR
+ dbw $00, .OAMData_ForFrameset09 ; SPRITE_ANIM_FRAME_IDX_FOR_FRAMESET_09
+ dbw $00, .OAMData_22 ; SPRITE_ANIM_FRAME_IDX_22
+ dbw $0f, .OAMData_GSIntroStar ; SPRITE_ANIM_FRAME_IDX_GS_INTRO_STAR
+ dbw $11, .OAMData_1x1_Palette0 ; SPRITE_ANIM_FRAME_IDX_GS_INTRO_SPARKLE_1
+ dbw $12, .OAMData_1x1_Palette0 ; SPRITE_ANIM_FRAME_IDX_GS_INTRO_SPARKLE_2
+ dbw $13, .OAMData_1x1_Palette0 ; SPRITE_ANIM_FRAME_IDX_GS_INTRO_SPARKLE_3
+ dbw $00, .OAMData_SlotsGolem ; SPRITE_ANIM_FRAME_IDX_SLOTS_GOLEM_1
+ dbw $08, .OAMData_SlotsGolem ; SPRITE_ANIM_FRAME_IDX_SLOTS_GOLEM_2
+ dbw $10, .OAMData_SlotsChansey1 ; SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_1
+ dbw $10, .OAMData_SlotsChansey2 ; SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_2
+ dbw $10, .OAMData_SlotsChansey3 ; SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_3
+ dbw $10, .OAMData_SlotsChansey4 ; SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_4
+ dbw $10, .OAMData_SlotsChansey5 ; SPRITE_ANIM_FRAME_IDX_SLOTS_CHANSEY_5
+ dbw $3a, .OAMData_1x1_Palette0 ; SPRITE_ANIM_FRAME_IDX_SLOTS_EGG
+ dbw $00, .OAMData_RedWalk ; SPRITE_ANIM_FRAME_IDX_STILL_CURSOR
+ dbw $00, .OAMData_TradePokeBall1 ; SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_1
+ dbw $02, .OAMData_MagnetTrainRed ; SPRITE_ANIM_FRAME_IDX_TRADE_POKE_BALL_2
+ dbw $06, .OAMData_TradePoofBubble ; SPRITE_ANIM_FRAME_IDX_TRADE_POOF_1
+ dbw $0a, .OAMData_TradePoofBubble ; SPRITE_ANIM_FRAME_IDX_TRADE_POOF_2
+ dbw $0e, .OAMData_TradePoofBubble ; SPRITE_ANIM_FRAME_IDX_TRADE_POOF_3
+ dbw $12, .OAMData_35 ; SPRITE_ANIM_FRAME_IDX_35
+ dbw $13, .OAMData_35 ; SPRITE_ANIM_FRAME_IDX_36
+ dbw $00, .OAMData_RedWalk ; SPRITE_ANIM_FRAME_IDX_TRADEMON_ICON_1
+ dbw $04, .OAMData_RedWalk ; SPRITE_ANIM_FRAME_IDX_TRADEMON_ICON_2
+ dbw $10, .OAMData_TradePoofBubble ; SPRITE_ANIM_FRAME_IDX_TRADEMON_BUBBLE
+ dbw $00, .OAMData_MagnetTrainRed ; SPRITE_ANIM_FRAME_IDX_EVOLUTION_BALL_OF_LIGHT_1
+ dbw $04, .OAMData_1x1_Palette0 ; SPRITE_ANIM_FRAME_IDX_EVOLUTION_BALL_OF_LIGHT_2
+ dbw $00, .OAMData_RadioTuningKnob ; SPRITE_ANIM_FRAME_IDX_RADIO_TUNING_KNOB
+ dbw $00, .OAMData_PartyMonWithMail1 ; SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_MAIL_1
+ dbw $00, .OAMData_PartyMonWithMail2 ; SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_MAIL_2
+ dbw $00, .OAMData_PartyMonWithItem1 ; SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_ITEM_1
+ dbw $00, .OAMData_PartyMonWithItem2 ; SPRITE_ANIM_FRAME_IDX_PARTY_MON_WITH_ITEM_2
+ dbw $00, .OAMData_MagnetTrainRed ; SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_RED_1
+ dbw $04, .OAMData_MagnetTrainRed ; SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_RED_2
+ dbw $00, .OAMData_43 ; SPRITE_ANIM_FRAME_IDX_43
+ dbw $30, .OAMData_43 ; SPRITE_ANIM_FRAME_IDX_44
+ dbw $03, .OAMData_43 ; SPRITE_ANIM_FRAME_IDX_45
+ dbw $33, .OAMData_43 ; SPRITE_ANIM_FRAME_IDX_46
+ dbw $06, .OAMData_43 ; SPRITE_ANIM_FRAME_IDX_47
+ dbw $36, .OAMData_43 ; SPRITE_ANIM_FRAME_IDX_48
+ dbw $09, .OAMData_43 ; SPRITE_ANIM_FRAME_IDX_49
+ dbw $39, .OAMData_43 ; SPRITE_ANIM_FRAME_IDX_4A
+ dbw $0c, .OAMData_4b ; SPRITE_ANIM_FRAME_IDX_4B
+ dbw $0c, .OAMData_4c ; SPRITE_ANIM_FRAME_IDX_4C
+ dbw $3c, .OAMData_1x1_Palette0 ; SPRITE_ANIM_FRAME_IDX_4D
+ dbw $3e, .OAMData_1x1_Palette0 ; SPRITE_ANIM_FRAME_IDX_4E
+ dbw $00, .OAMData_Leaf ; SPRITE_ANIM_FRAME_IDX_LEAF
+ dbw $00, .OAMData_Tree ; SPRITE_ANIM_FRAME_IDX_TREE_1
+ dbw $00, .OAMData_CutTree2 ; SPRITE_ANIM_FRAME_IDX_CUT_TREE_2
+ dbw $00, .OAMData_CutTree3 ; SPRITE_ANIM_FRAME_IDX_CUT_TREE_3
+ dbw $00, .OAMData_CutTree4 ; SPRITE_ANIM_FRAME_IDX_CUT_TREE_4
+ dbw $00, .OAMData_1x1_Palette0 ; SPRITE_ANIM_FRAME_IDX_EGG_CRACK
+ dbw $01, .OAMData_1x1_Palette0 ; SPRITE_ANIM_FRAME_IDX_55
+ dbw $00, .OAMData_56 ; SPRITE_ANIM_FRAME_IDX_56
+ dbw $00, .OAMData_57 ; SPRITE_ANIM_FRAME_IDX_57
+ dbw $00, .OAMData_58 ; SPRITE_ANIM_FRAME_IDX_58
+ dbw $00, .OAMData_59 ; SPRITE_ANIM_FRAME_IDX_59
+ dbw $00, .OAMData_5a ; SPRITE_ANIM_FRAME_IDX_5A
+ dbw $04, .OAMData_Tree ; SPRITE_ANIM_FRAME_IDX_HEADBUTT_TREE_2
+ dbw $00, .OAMData_5c ; SPRITE_ANIM_FRAME_IDX_5C
+ dbw $00, .OAMData_5d ; SPRITE_ANIM_FRAME_IDX_5D
+ dbw $00, .OAMData_5e ; SPRITE_ANIM_FRAME_IDX_5E
+ dbw $00, .OAMData_5f ; SPRITE_ANIM_FRAME_IDX_5F
+ dbw $00, .OAMData_60 ; SPRITE_ANIM_FRAME_IDX_60
+ dbw $00, .OAMData_61 ; SPRITE_ANIM_FRAME_IDX_61
+ dbw $00, .OAMData_62 ; SPRITE_ANIM_FRAME_IDX_62
+ dbw $00, .OAMData_BlueWalk ; SPRITE_ANIM_FRAME_IDX_BLUE_WALK_1
+ dbw $04, .OAMData_BlueWalk ; SPRITE_ANIM_FRAME_IDX_BLUE_WALK_2
+ dbw $00, .OAMData_MagnetTrainBlue ; SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_BLUE_1
+ dbw $04, .OAMData_MagnetTrainBlue ; SPRITE_ANIM_FRAME_IDX_MAGNET_TRAIN_BLUE_2
+ dbw $20, .OAMData_ForMobile22 ; SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_22_1
+ dbw $21, .OAMData_ForMobile22 ; SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_22_2
+ dbw $22, .OAMData_ForMobile25_1 ; SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_25_1
+ dbw $23, .OAMData_ForMobile25_2 ; SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_25_2
+ dbw $27, .OAMData_ForMobile25_3 ; SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_25_3
+ dbw $2a, .OAMData_ForMobile23 ; SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_23
+ dbw $2a, .OAMData_ForMobile24 ; SPRITE_ANIM_FRAME_IDX_FOR_MOBILE_24
+ dbw $00, .OAMData_IntroSuicune1 ; SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_1
+ dbw $08, .OAMData_IntroSuicune2 ; SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_2
+ dbw $60, .OAMData_IntroSuicune3 ; SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_3
+ dbw $68, .OAMData_IntroSuicune4 ; SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_4
+ dbw $00, .OAMData_IntroPichu ; SPRITE_ANIM_FRAME_IDX_INTRO_PICHU_1
+ dbw $05, .OAMData_IntroPichu ; SPRITE_ANIM_FRAME_IDX_INTRO_PICHU_2
+ dbw $0a, .OAMData_IntroPichu ; SPRITE_ANIM_FRAME_IDX_INTRO_PICHU_3
+ dbw $50, .OAMData_IntroWooper ; SPRITE_ANIM_FRAME_IDX_INTRO_WOOPER
+ dbw $00, .OAMData_IntroUnown1 ; SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_1
+ dbw $01, .OAMData_IntroUnown2 ; SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_2
+ dbw $04, .OAMData_IntroUnown3 ; SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_3
+ dbw $00, .OAMData_18 ; SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_1
+ dbw $01, .OAMData_IntroUnownF2_2 ; SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_2
+ dbw $03, .OAMData_IntroUnownF2_3 ; SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_3
+ dbw $08, .OAMData_IntroUnownF2_4_5 ; SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_4
+ dbw $1c, .OAMData_IntroUnownF2_4_5 ; SPRITE_ANIM_FRAME_IDX_INTRO_UNOWN_F_2_5
+ dbw $80, .OAMData_IntroSuicuneAway ; SPRITE_ANIM_FRAME_IDX_INTRO_SUICUNE_AWAY
+ dbw $00, .OAMData_Celebi ; SPRITE_ANIM_FRAME_IDX_CELEBI_1
+ dbw $04, .OAMData_Celebi ; SPRITE_ANIM_FRAME_IDX_CELEBI_2
+ dbw $d0, .OAMData_GameFreakLogo1_3 ; SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_1
+ dbw $d3, .OAMData_GameFreakLogo1_3 ; SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_2
+ dbw $d6, .OAMData_GameFreakLogo1_3 ; SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_3
+ dbw $6c, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_4
+ dbw $68, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_5
+ dbw $64, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_6
+ dbw $60, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_7
+ dbw $0c, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_8
+ dbw $08, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_9
+ dbw $04, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_10
+ dbw $00, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_FRAME_IDX_GAMEFREAK_LOGO_11
+
+.OAMData_1x1_Palette0:
+ db 1
+ dsprite -1, 4, -1, 4, $00, $00
+
+.OAMData_04:
+ db 4
+ dsprite -1, 0, -1, 0, $00, $00
+ dsprite -1, 0, 0, 0, $01, $00
+ dsprite 0, 0, -1, 0, $10, $00
+ dsprite 0, 0, 0, 0, $11, $00
+
+.OAMData_GSIntroStar:
+ db 4
+ dsprite -1, 0, -1, 0, $00, 0
+ dsprite -1, 0, 0, 0, $00, 0 | X_FLIP
+ dsprite 0, 0, -1, 0, $01, 0
+ dsprite 0, 0, 0, 0, $01, 0 | X_FLIP
+
+.OAMData_TradePokeBall1:
+ db 4
+ dsprite -1, 0, -1, 0, $00, $80
+ dsprite -1, 0, 0, 0, $00, $a0
+ dsprite 0, 0, -1, 0, $01, $80
+ dsprite 0, 0, 0, 0, $01, $a0
+
+.OAMData_18:
+ db 4
+ dsprite -1, 0, -1, 0, $00, $00
+ dsprite -1, 0, 0, 0, $00, $20
+ dsprite 0, 0, -1, 0, $00, $40
+ dsprite 0, 0, 0, 0, $00, $60
+
+.OAMData_35:
+ db 4
+ dsprite -1, 0, -1, 0, $00, $07
+ dsprite -1, 0, 0, 0, $00, $27
+ dsprite 0, 0, -1, 0, $00, $47
+ dsprite 0, 0, 0, 0, $00, $67
+; 8db4b
+
+; 8db4b
+ db 4
+ dsprite -1, 0, -1, 0, $00, $80
+ dsprite -1, 0, 0, 0, $00, $a0
+ dsprite 0, 0, -1, 0, $00, $c0
+ dsprite 0, 0, 0, 0, $00, $e0
+
+.OAMData_TradePoofBubble:
+ db 16
+ dsprite -2, 0, -2, 0, $00, 0
+ dsprite -2, 0, -1, 0, $01, 0
+ dsprite -1, 0, -2, 0, $02, 0
+ dsprite -1, 0, -1, 0, $03, 0
+ dsprite -2, 0, 0, 0, $01, 0 | X_FLIP
+ dsprite -2, 0, 1, 0, $00, 0 | X_FLIP
+ dsprite -1, 0, 0, 0, $03, 0 | X_FLIP
+ dsprite -1, 0, 1, 0, $02, 0 | X_FLIP
+ dsprite 0, 0, -2, 0, $02, 0 | Y_FLIP
+ dsprite 0, 0, -1, 0, $03, 0 | Y_FLIP
+ dsprite 1, 0, -2, 0, $00, 0 | Y_FLIP
+ dsprite 1, 0, -1, 0, $01, 0 | Y_FLIP
+ dsprite 0, 0, 0, 0, $03, 0 | X_FLIP | Y_FLIP
+ dsprite 0, 0, 1, 0, $02, 0 | X_FLIP | Y_FLIP
+ dsprite 1, 0, 0, 0, $01, 0 | X_FLIP | Y_FLIP
+ dsprite 1, 0, 1, 0, $00, 0 | X_FLIP | Y_FLIP
+
+.OAMData_1a:
+ db 36
+ dsprite -3, 0, -3, 0, $00, $00
+ dsprite -3, 0, -2, 0, $01, $00
+ dsprite -3, 0, -1, 0, $02, $00
+ dsprite -2, 0, -3, 0, $03, $00
+ dsprite -2, 0, -2, 0, $04, $00
+ dsprite -2, 0, -1, 0, $05, $00
+ dsprite -1, 0, -3, 0, $06, $00
+ dsprite -1, 0, -2, 0, $05, $00
+ dsprite -1, 0, -1, 0, $05, $00
+ dsprite -3, 0, 0, 0, $02, $20
+ dsprite -3, 0, 1, 0, $01, $20
+ dsprite -3, 0, 2, 0, $00, $20
+ dsprite -2, 0, 0, 0, $05, $20
+ dsprite -2, 0, 1, 0, $04, $20
+ dsprite -2, 0, 2, 0, $03, $20
+ dsprite -1, 0, 0, 0, $05, $20
+ dsprite -1, 0, 1, 0, $05, $20
+ dsprite -1, 0, 2, 0, $06, $20
+ dsprite 0, 0, -3, 0, $06, $40
+ dsprite 0, 0, -2, 0, $05, $40
+ dsprite 0, 0, -1, 0, $05, $40
+ dsprite 1, 0, -3, 0, $03, $40
+ dsprite 1, 0, -2, 0, $04, $40
+ dsprite 1, 0, -1, 0, $05, $40
+ dsprite 2, 0, -3, 0, $00, $40
+ dsprite 2, 0, -2, 0, $01, $40
+ dsprite 2, 0, -1, 0, $02, $40
+ dsprite 0, 0, 0, 0, $05, $60
+ dsprite 0, 0, 1, 0, $05, $60
+ dsprite 0, 0, 2, 0, $06, $60
+ dsprite 1, 0, 0, 0, $05, $60
+ dsprite 1, 0, 1, 0, $04, $60
+ dsprite 1, 0, 2, 0, $03, $60
+ dsprite 2, 0, 0, 0, $02, $60
+ dsprite 2, 0, 1, 0, $01, $60
+ dsprite 2, 0, 2, 0, $00, $60
+
+.OAMData_43:
+ db 9
+ dsprite -2, 4, -2, 4, $00, $00
+ dsprite -2, 4, -1, 4, $01, $00
+ dsprite -2, 4, 0, 4, $02, $00
+ dsprite -1, 4, -2, 4, $10, $00
+ dsprite -1, 4, -1, 4, $11, $00
+ dsprite -1, 4, 0, 4, $12, $00
+ dsprite 0, 4, -2, 4, $20, $00
+ dsprite 0, 4, -1, 4, $21, $00
+ dsprite 0, 4, 0, 4, $22, $00
+
+.OAMData_0e:
+ db 16
+ dsprite -2, 0, -2, 0, $00, $00
+ dsprite -2, 0, -1, 0, $01, $00
+ dsprite -2, 0, 0, 0, $02, $00
+ dsprite -2, 0, 1, 0, $03, $00
+ dsprite -1, 0, -2, 0, $10, $00
+ dsprite -1, 0, -1, 0, $11, $00
+ dsprite -1, 0, 0, 0, $12, $00
+ dsprite -1, 0, 1, 0, $13, $00
+ dsprite 0, 0, -2, 0, $20, $00
+ dsprite 0, 0, -1, 0, $21, $00
+ dsprite 0, 0, 0, 0, $22, $00
+ dsprite 0, 0, 1, 0, $23, $00
+ dsprite 1, 0, -2, 0, $30, $00
+ dsprite 1, 0, -1, 0, $31, $00
+ dsprite 1, 0, 0, 0, $32, $00
+ dsprite 1, 0, 1, 0, $33, $00
+
+.OAMData_1b:
+ db 25
+ dsprite -3, 4, -3, 4, $00, $00
+ dsprite -2, 4, -3, 4, $01, $00
+ dsprite -1, 4, -3, 4, $02, $00
+ dsprite 0, 4, -3, 4, $03, $00
+ dsprite 1, 4, -3, 4, $04, $00
+ dsprite -3, 4, -2, 4, $05, $00
+ dsprite -2, 4, -2, 4, $06, $00
+ dsprite -1, 4, -2, 4, $07, $00
+ dsprite 0, 4, -2, 4, $08, $00
+ dsprite 1, 4, -2, 4, $09, $00
+ dsprite -3, 4, -1, 4, $0a, $00
+ dsprite -2, 4, -1, 4, $0b, $00
+ dsprite -1, 4, -1, 4, $0c, $00
+ dsprite 0, 4, -1, 4, $0d, $00
+ dsprite 1, 4, -1, 4, $0e, $00
+ dsprite -3, 4, 0, 4, $0f, $00
+ dsprite -2, 4, 0, 4, $10, $00
+ dsprite -1, 4, 0, 4, $11, $00
+ dsprite 0, 4, 0, 4, $12, $00
+ dsprite 1, 4, 0, 4, $13, $00
+ dsprite -3, 4, 1, 4, $14, $00
+ dsprite -2, 4, 1, 4, $15, $00
+ dsprite -1, 4, 1, 4, $16, $00
+ dsprite 0, 4, 1, 4, $17, $00
+ dsprite 1, 4, 1, 4, $18, $00
+; 8dcf9
+
+; 8dcf9
+ db 36
+ dsprite -3, 0, -3, 0, $00, $00
+ dsprite -3, 0, -2, 0, $01, $00
+ dsprite -3, 0, -1, 0, $02, $00
+ dsprite -3, 0, 0, 0, $03, $00
+ dsprite -3, 0, 1, 0, $04, $00
+ dsprite -3, 0, 2, 0, $05, $00
+ dsprite -2, 0, -3, 0, $06, $00
+ dsprite -2, 0, -2, 0, $07, $00
+ dsprite -2, 0, -1, 0, $08, $00
+ dsprite -2, 0, 0, 0, $09, $00
+ dsprite -2, 0, 1, 0, $0a, $00
+ dsprite -2, 0, 2, 0, $0b, $00
+ dsprite -1, 0, -3, 0, $0c, $00
+ dsprite -1, 0, -2, 0, $0d, $00
+ dsprite -1, 0, -1, 0, $0e, $00
+ dsprite -1, 0, 0, 0, $0f, $00
+ dsprite -1, 0, 1, 0, $10, $00
+ dsprite -1, 0, 2, 0, $11, $00
+ dsprite 0, 0, -3, 0, $12, $00
+ dsprite 0, 0, -2, 0, $13, $00
+ dsprite 0, 0, -1, 0, $14, $00
+ dsprite 0, 0, 0, 0, $15, $00
+ dsprite 0, 0, 1, 0, $16, $00
+ dsprite 0, 0, 2, 0, $17, $00
+ dsprite 1, 0, -3, 0, $18, $00
+ dsprite 1, 0, -2, 0, $19, $00
+ dsprite 1, 0, -1, 0, $1a, $00
+ dsprite 1, 0, 0, 0, $1b, $00
+ dsprite 1, 0, 1, 0, $1c, $00
+ dsprite 1, 0, 2, 0, $1d, $00
+ dsprite 2, 0, -3, 0, $1e, $00
+ dsprite 2, 0, -2, 0, $1f, $00
+ dsprite 2, 0, -1, 0, $20, $00
+ dsprite 2, 0, 0, 0, $21, $00
+ dsprite 2, 0, 1, 0, $22, $00
+ dsprite 2, 0, 2, 0, $23, $00
+
+.OAMData_RedWalk:
+ db 4
+ dsprite -1, 0, -1, 0, $00, PAL_OW_RED
+ dsprite -1, 0, 0, 0, $01, PAL_OW_RED
+ dsprite 0, 0, -1, 0, $02, PAL_OW_RED
+ dsprite 0, 0, 0, 0, $03, PAL_OW_RED
+
+.OAMData_MagnetTrainRed:
+ db 4
+ dsprite -1, 0, -1, 0, $00, PAL_OW_RED | BEHIND_BG
+ dsprite -1, 0, 0, 0, $01, PAL_OW_RED | BEHIND_BG
+ dsprite 0, 0, -1, 0, $02, PAL_OW_RED | BEHIND_BG
+ dsprite 0, 0, 0, 0, $03, PAL_OW_RED | BEHIND_BG
+
+.OAMData_PartyMonWithMail1:
+ db 4
+ dsprite -1, 0, -1, 0, $00, PAL_OW_RED
+ dsprite -1, 0, 0, 0, $01, PAL_OW_RED
+ dsprite 0, 0, -1, 0, $08, PAL_OW_RED
+ dsprite 0, 0, 0, 0, $03, PAL_OW_RED
+
+.OAMData_PartyMonWithMail2:
+ db 4
+ dsprite -1, 0, -1, 0, $04, PAL_OW_RED
+ dsprite -1, 0, 0, 0, $05, PAL_OW_RED
+ dsprite 0, 0, -1, 0, $08, PAL_OW_RED
+ dsprite 0, 0, 0, 0, $07, PAL_OW_RED
+
+.OAMData_PartyMonWithItem1:
+ db 4
+ dsprite -1, 0, -1, 0, $00, PAL_OW_RED
+ dsprite -1, 0, 0, 0, $01, PAL_OW_RED
+ dsprite 0, 0, -1, 0, $09, PAL_OW_RED
+ dsprite 0, 0, 0, 0, $03, PAL_OW_RED
+
+.OAMData_PartyMonWithItem2:
+ db 4
+ dsprite -1, 0, -1, 0, $04, PAL_OW_RED
+ dsprite -1, 0, 0, 0, $05, PAL_OW_RED
+ dsprite 0, 0, -1, 0, $09, PAL_OW_RED
+ dsprite 0, 0, 0, 0, $07, PAL_OW_RED
+
+.OAMData_06:
+ db 6
+ dsprite -1, 0, -2, 4, $00, $01
+ dsprite -1, 0, -1, 4, $01, $01
+ dsprite -1, 0, 0, 4, $02, $01
+ dsprite 0, 0, -2, 4, $10, $01
+ dsprite 0, 0, -1, 4, $11, $01
+ dsprite 0, 0, 0, 4, $12, $01
+
+.OAMData_08:
+ db 29
+ dsprite -3, 0, -3, 0, $00, $00
+ dsprite -3, 0, -2, 0, $01, $00
+ dsprite -3, 0, -1, 0, $02, $00
+ dsprite -3, 0, 0, 0, $03, $00
+ dsprite -2, 0, -3, 0, $10, $00
+ dsprite -2, 0, -2, 0, $11, $00
+ dsprite -2, 0, -1, 0, $12, $00
+ dsprite -2, 0, 0, 0, $13, $00
+ dsprite -1, 0, -3, 0, $20, $00
+ dsprite -1, 0, -2, 0, $21, $00
+ dsprite -1, 0, -1, 0, $22, $00
+ dsprite -1, 0, 0, 0, $23, $00
+ dsprite -1, 0, 1, 0, $24, $00
+ dsprite 0, 0, -3, 0, $30, $80
+ dsprite 0, 0, -2, 0, $31, $80
+ dsprite 0, 0, -1, 0, $32, $80
+ dsprite 0, 0, 0, 0, $33, $80
+ dsprite 0, 0, 1, 0, $34, $80
+ dsprite 1, 0, -3, 0, $40, $80
+ dsprite 1, 0, -2, 0, $41, $80
+ dsprite 1, 0, -1, 0, $42, $80
+ dsprite 1, 0, 0, 0, $43, $80
+ dsprite 1, 0, 1, 0, $44, $80
+ dsprite 1, 0, 2, 0, $45, $80
+ dsprite 2, 0, -2, 0, $51, $80
+ dsprite 2, 0, -1, 0, $52, $80
+ dsprite 2, 0, 0, 0, $53, $80
+ dsprite 2, 0, 1, 0, $54, $80
+ dsprite 2, 0, 2, 0, $55, $80
+
+.OAMData_0c:
+ db 2
+ dsprite -1, 0, -1, 4, $00, $00
+ dsprite 0, 0, -1, 4, $10, $00
+
+.OAMData_15:
+ db 5
+ dsprite -2, 0, 3, 0, $00, $00
+ dsprite -2, 0, 4, 0, $01, $00
+ dsprite -1, 0, 2, 0, $02, $00
+ dsprite -1, 0, 3, 0, $03, $00
+ dsprite 0, 0, 2, 0, $04, $00
+
+.OAMData_Leaf:
+ db 1
+ dsprite -1, 4, -1, 4, $00, PAL_OW_TREE
+
+.OAMData_Tree:
+ db 4
+ dsprite -1, 0, -1, 0, $00, PAL_OW_TREE
+ dsprite -1, 0, 0, 0, $01, PAL_OW_TREE
+ dsprite 0, 0, -1, 0, $02, PAL_OW_TREE
+ dsprite 0, 0, 0, 0, $03, PAL_OW_TREE
+
+.OAMData_TextEntryCursor:
+ db 4
+ dsprite -1, 7, -1, 7, $00, 0
+ dsprite -1, 7, 0, 0, $00, 0 | X_FLIP
+ dsprite 0, 0, -1, 7, $00, 0 | Y_FLIP
+ dsprite 0, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP
+
+.OAMData_ForFrameset09:
+ db 10
+ dsprite -1, 7, 0, 0, $00, 0
+ dsprite -1, 7, 1, 0, $01, 0
+ dsprite -1, 7, 2, 0, $01, 0
+ dsprite -1, 7, 3, 0, $01, 0
+ dsprite -1, 7, 4, 0, $00, 0 | X_FLIP
+ dsprite 0, 0, 0, 0, $00, 0 | Y_FLIP
+ dsprite 0, 0, 1, 0, $01, 0 | Y_FLIP
+ dsprite 0, 0, 2, 0, $01, 0 | Y_FLIP
+ dsprite 0, 0, 3, 0, $01, 0 | Y_FLIP
+ dsprite 0, 0, 4, 0, $00, 0 | X_FLIP | Y_FLIP
+
+.OAMData_22:
+ db 15
+ dsprite -3, 4, -2, 4, $00, $11
+ dsprite -3, 4, -1, 4, $01, $11
+ dsprite -3, 4, 0, 4, $02, $11
+ dsprite -2, 4, -2, 4, $03, $11
+ dsprite -2, 4, -1, 4, $04, $11
+ dsprite -2, 4, 0, 4, $05, $11
+ dsprite -1, 4, -2, 4, $06, $11
+ dsprite -1, 4, -1, 4, $07, $11
+ dsprite -1, 4, 0, 4, $08, $11
+ dsprite 0, 4, -2, 4, $09, $11
+ dsprite 0, 4, -1, 4, $0a, $11
+ dsprite 0, 4, 0, 4, $0b, $11
+ dsprite 1, 4, -2, 4, $0c, $11
+ dsprite 1, 4, -1, 4, $0d, $11
+ dsprite 1, 4, 0, 4, $0e, $11
+
+.OAMData_SlotsGolem:
+ db 6
+ dsprite -2, 4, -2, 4, $00, 5 | OBP_NUM
+ dsprite -2, 4, -1, 4, $02, 5 | OBP_NUM
+ dsprite -2, 4, 0, 4, $00, 5 | OBP_NUM | X_FLIP
+ dsprite 0, 4, -2, 4, $04, 5 | OBP_NUM
+ dsprite 0, 4, -1, 4, $06, 5 | OBP_NUM
+ dsprite 0, 4, 0, 4, $04, 5 | OBP_NUM | X_FLIP
+
+.OAMData_SlotsChansey1:
+ db 6
+ dsprite -2, 4, -2, 4, $00, 6 | OBP_NUM
+ dsprite -2, 4, -1, 4, $02, 6 | OBP_NUM
+ dsprite -2, 4, 0, 4, $04, 6 | OBP_NUM
+ dsprite 0, 4, -2, 4, $06, 6 | OBP_NUM
+ dsprite 0, 4, -1, 4, $08, 6 | OBP_NUM
+ dsprite 0, 4, 0, 4, $0a, 6 | OBP_NUM
+
+.OAMData_SlotsChansey2:
+ db 6
+ dsprite -2, 4, -2, 4, $00, 6 | OBP_NUM
+ dsprite -2, 4, -1, 4, $02, 6 | OBP_NUM
+ dsprite -2, 4, 0, 4, $04, 6 | OBP_NUM
+ dsprite 0, 4, -2, 4, $0c, 6 | OBP_NUM
+ dsprite 0, 4, -1, 4, $0e, 6 | OBP_NUM
+ dsprite 0, 4, 0, 4, $10, 6 | OBP_NUM
+
+.OAMData_SlotsChansey3:
+ db 6
+ dsprite -2, 4, -2, 4, $00, 6 | OBP_NUM
+ dsprite -2, 4, -1, 4, $02, 6 | OBP_NUM
+ dsprite -2, 4, 0, 4, $04, 6 | OBP_NUM
+ dsprite 0, 4, -2, 4, $12, 6 | OBP_NUM
+ dsprite 0, 4, -1, 4, $14, 6 | OBP_NUM
+ dsprite 0, 4, 0, 4, $16, 6 | OBP_NUM
+
+.OAMData_SlotsChansey4:
+ db 6
+ dsprite -2, 4, -2, 4, $00, 6 | OBP_NUM
+ dsprite -2, 4, -1, 4, $02, 6 | OBP_NUM
+ dsprite -2, 4, 0, 4, $04, 6 | OBP_NUM
+ dsprite 0, 4, -2, 4, $18, 6 | OBP_NUM
+ dsprite 0, 4, -1, 4, $1a, 6 | OBP_NUM
+ dsprite 0, 4, 0, 4, $1c, 6 | OBP_NUM
+
+.OAMData_SlotsChansey5:
+ db 6
+ dsprite -2, 4, -2, 4, $1e, 6 | OBP_NUM
+ dsprite -2, 4, -1, 4, $20, 6 | OBP_NUM
+ dsprite -2, 4, 0, 4, $22, 6 | OBP_NUM
+ dsprite 0, 4, -2, 4, $24, 6 | OBP_NUM
+ dsprite 0, 4, -1, 4, $26, 6 | OBP_NUM
+ dsprite 0, 4, 0, 4, $28, 6 | OBP_NUM
+
+.OAMData_RadioTuningKnob:
+ db 3
+ dsprite -2, 4, -1, 4, $00, 0 | OBP_NUM
+ dsprite -1, 4, -1, 4, $00, 0 | OBP_NUM
+ dsprite 0, 4, -1, 4, $00, 0 | OBP_NUM
+
+.OAMData_4b:
+ db 6
+ dsprite 0, 0, 0, 0, $00, $00
+ dsprite 0, 0, 1, 0, $01, $00
+ dsprite 0, 0, 2, 0, $01, $00
+ dsprite 0, 0, 3, 0, $01, $00
+ dsprite 0, 0, 4, 0, $02, $00
+ dsprite 0, 0, 5, 0, $03, $00
+
+.OAMData_4c:
+ db 4
+ dsprite 0, 0, 0, 0, $00, $00
+ dsprite 0, 0, 1, 0, $01, $00
+ dsprite 0, 0, 2, 0, $02, $00
+ dsprite 0, 0, 3, 0, $03, $00
+
+.OAMData_CutTree2:
+ db 4
+ dsprite -1, 0, -2, 6, $00, PAL_OW_TREE
+ dsprite -1, 0, 0, 2, $01, PAL_OW_TREE
+ dsprite 0, 0, -2, 6, $02, PAL_OW_TREE
+ dsprite 0, 0, 0, 2, $03, PAL_OW_TREE
+
+.OAMData_CutTree3:
+ db 4
+ dsprite -1, 0, -2, 4, $00, PAL_OW_TREE
+ dsprite -1, 0, 0, 4, $01, PAL_OW_TREE
+ dsprite 0, 0, -2, 4, $02, PAL_OW_TREE
+ dsprite 0, 0, 0, 4, $03, PAL_OW_TREE
+
+.OAMData_CutTree4:
+ db 4
+ dsprite -1, 0, -2, 0, $00, PAL_OW_TREE
+ dsprite -1, 0, 1, 0, $01, PAL_OW_TREE
+ dsprite 0, 0, -2, 0, $02, PAL_OW_TREE
+ dsprite 0, 0, 1, 0, $03, PAL_OW_TREE
+
+.OAMData_56:
+ db 19
+ dsprite -1, 0, -4, 0, $00, $00
+ dsprite -2, 0, -3, 0, $02, $00
+ dsprite 0, 0, -3, 0, $04, $00
+ dsprite -3, 0, -2, 0, $06, $00
+ dsprite -1, 0, -2, 0, $08, $00
+ dsprite 1, 0, -2, 0, $0a, $00
+ dsprite -3, 0, -1, 0, $0c, $00
+ dsprite -1, 0, -1, 0, $0e, $00
+ dsprite 1, 0, -1, 0, $10, $00
+ dsprite -3, 0, 0, 0, $12, $00
+ dsprite -1, 0, 0, 0, $14, $00
+ dsprite 1, 0, 0, 0, $16, $00
+ dsprite -3, 0, 1, 0, $18, $00
+ dsprite -1, 0, 1, 0, $1a, $00
+ dsprite 1, 0, 1, 0, $1c, $00
+ dsprite -1, 0, 2, 0, $1e, $00
+ dsprite 1, 0, 2, 0, $20, $00
+ dsprite -2, 0, 3, 0, $22, $00
+ dsprite 0, 0, 3, 0, $24, $00
+
+.OAMData_57:
+ db 16
+ dsprite -1, 0, -4, 0, $00, $00
+ dsprite -2, 0, -3, 0, $02, $00
+ dsprite 0, 0, -3, 0, $04, $00
+ dsprite -1, 0, -2, 0, $26, $00
+ dsprite 1, 0, -2, 0, $0a, $00
+ dsprite -3, 0, -1, 0, $28, $00
+ dsprite -1, 0, -1, 0, $2a, $00
+ dsprite 1, 0, -1, 0, $10, $00
+ dsprite -1, 0, 0, 0, $2c, $00
+ dsprite 1, 0, 0, 0, $16, $00
+ dsprite -1, 0, 1, 0, $30, $00
+ dsprite 1, 0, 1, 0, $1c, $00
+ dsprite -1, 0, 2, 0, $1e, $00
+ dsprite 1, 0, 2, 0, $20, $00
+ dsprite -2, 0, 3, 0, $22, $00
+ dsprite 0, 0, 3, 0, $24, $00
+
+.OAMData_58:
+ db 15
+ dsprite -1, 0, -4, 0, $00, $00
+ dsprite -2, 0, -3, 0, $02, $00
+ dsprite 0, 0, -3, 0, $32, $00
+ dsprite -1, 0, -2, 0, $34, $00
+ dsprite 1, 0, -2, 0, $36, $00
+ dsprite -1, 0, -1, 0, $38, $00
+ dsprite 1, 0, -1, 0, $3a, $00
+ dsprite -1, 0, 0, 0, $3c, $00
+ dsprite 1, 0, 0, 0, $3e, $00
+ dsprite -1, 0, 1, 0, $30, $00
+ dsprite 1, 0, 1, 0, $1c, $00
+ dsprite -1, 0, 2, 0, $1e, $00
+ dsprite 1, 0, 2, 0, $20, $00
+ dsprite -2, 0, 3, 0, $22, $00
+ dsprite 0, 0, 3, 0, $24, $00
+
+.OAMData_59:
+ db 17
+ dsprite -1, 0, -4, 0, $00, $00
+ dsprite -2, 0, -3, 0, $02, $00
+ dsprite 0, 0, -3, 0, $04, $00
+ dsprite -1, 0, -2, 0, $40, $00
+ dsprite 1, 0, -2, 0, $42, $00
+ dsprite 3, 0, -2, 0, $44, $00
+ dsprite -1, 0, -1, 0, $46, $00
+ dsprite 1, 0, -1, 0, $48, $00
+ dsprite 3, 0, -1, 0, $4a, $00
+ dsprite -1, 0, 0, 0, $4c, $00
+ dsprite 1, 0, 0, 0, $4e, $00
+ dsprite -1, 0, 1, 0, $30, $00
+ dsprite 1, 0, 1, 0, $1c, $00
+ dsprite -1, 0, 2, 0, $1e, $00
+ dsprite 1, 0, 2, 0, $20, $00
+ dsprite -2, 0, 3, 0, $22, $00
+ dsprite 0, 0, 3, 0, $24, $00
+
+.OAMData_5a:
+ db 17
+ dsprite -1, 0, -4, 0, $00, $00
+ dsprite -2, 0, -3, 0, $02, $00
+ dsprite 0, 0, -3, 0, $04, $00
+ dsprite -1, 0, -2, 0, $50, $00
+ dsprite 1, 0, -2, 0, $0a, $00
+ dsprite -3, 0, -1, 0, $52, $00
+ dsprite -1, 0, -1, 0, $54, $00
+ dsprite 1, 0, -1, 0, $10, $00
+ dsprite -3, 0, 0, 0, $56, $00
+ dsprite -1, 0, 0, 0, $2e, $00
+ dsprite 1, 0, 0, 0, $16, $00
+ dsprite -1, 0, 1, 0, $30, $00
+ dsprite 1, 0, 1, 0, $1c, $00
+ dsprite -1, 0, 2, 0, $1e, $00
+ dsprite 1, 0, 2, 0, $20, $00
+ dsprite -2, 0, 3, 0, $22, $00
+ dsprite 0, 0, 3, 0, $24, $00
+
+.OAMData_GSTitleTrail:
+ db 1
+ dsprite -1, 4, -1, 4, $00, 1 | OBP_NUM
+
+.OAMData_5c:
+ db 12
+ dsprite 0, 0, 0, 0, $30, $00
+ dsprite 0, 0, 1, 0, $31, $00
+ dsprite 0, 0, 2, 0, $31, $00
+ dsprite 0, 0, 3, 0, $31, $00
+ dsprite 0, 0, 4, 0, $31, $00
+ dsprite 0, 0, 5, 0, $32, $00
+ dsprite 1, 0, 0, 0, $33, $00
+ dsprite 1, 0, 1, 0, $34, $00
+ dsprite 1, 0, 2, 0, $34, $00
+ dsprite 1, 0, 3, 0, $34, $00
+ dsprite 1, 0, 4, 0, $34, $00
+ dsprite 1, 0, 5, 0, $35, $00
+
+.OAMData_5d:
+ db 1
+ dsprite 0, 0, 0, 0, $ed, $00
+
+.OAMData_5e:
+ db 4
+ dsprite -1, 7, -1, 7, $30, $00
+ dsprite -1, 7, 0, 1, $32, $00
+ dsprite 0, 1, -1, 7, $33, $00
+ dsprite 0, 1, 0, 1, $35, $00
+
+.OAMData_5f:
+ db 8
+ dsprite -1, 7, -1, 7, $30, $00
+ dsprite -1, 7, 0, 4, $31, $00
+ dsprite -1, 7, 1, 4, $31, $00
+ dsprite -1, 7, 2, 1, $32, $00
+ dsprite 0, 1, -1, 7, $33, $00
+ dsprite 0, 1, 0, 4, $34, $00
+ dsprite 0, 1, 1, 4, $34, $00
+ dsprite 0, 1, 2, 1, $35, $00
+
+.OAMData_60:
+ db 1
+ dsprite 0, 0, 0, 0, $34, $00
+
+.OAMData_61:
+ db 2
+ dsprite 0, 0, 0, 0, $30, $00
+ dsprite 1, 0, 0, 0, $33, $00
+
+.OAMData_62:
+ db 2
+ dsprite 0, 0, 0, 0, $32, $00
+ dsprite 1, 0, 0, 0, $35, $00
+
+.OAMData_BlueWalk:
+ db 4
+ dsprite -1, 0, -1, 0, $00, PAL_OW_BLUE
+ dsprite -1, 0, 0, 0, $01, PAL_OW_BLUE
+ dsprite 0, 0, -1, 0, $02, PAL_OW_BLUE
+ dsprite 0, 0, 0, 0, $03, PAL_OW_BLUE
+
+.OAMData_MagnetTrainBlue:
+ db 4
+ dsprite -1, 0, -1, 0, $00, PAL_OW_BLUE | BEHIND_BG
+ dsprite -1, 0, 0, 0, $01, PAL_OW_BLUE | BEHIND_BG
+ dsprite 0, 0, -1, 0, $02, PAL_OW_BLUE | BEHIND_BG
+ dsprite 0, 0, 0, 0, $03, PAL_OW_BLUE | BEHIND_BG
+
+.OAMData_ForMobile22:
+ db 1
+ dsprite -1, 4, -1, 4, $00, 2
+
+.OAMData_ForMobile23:
+ db 4
+ dsprite -2, 0, -1, 4, $00, 3
+ dsprite -1, 0, -1, 4, $01, 3
+ dsprite 0, 0, -1, 4, $02, 3
+ dsprite 1, 0, -1, 4, $03, 3
+
+.OAMData_ForMobile24:
+ db 4
+ dsprite -2, 0, -1, 4, $03, 4 | Y_FLIP
+ dsprite -1, 0, -1, 4, $02, 4 | Y_FLIP
+ dsprite 0, 0, -1, 4, $01, 4 | Y_FLIP
+ dsprite 1, 0, -1, 4, $00, 4 | Y_FLIP
+
+.OAMData_ForMobile25_1:
+ db 4
+ dsprite -1, 0, -1, 0, $00, 1
+ dsprite -1, 0, 0, 0, $00, 1 | X_FLIP
+ dsprite 0, 0, -1, 0, $00, 1 | Y_FLIP
+ dsprite 0, 0, 0, 0, $00, 1 | X_FLIP | Y_FLIP
+
+.OAMData_ForMobile25_2:
+ db 8
+ dsprite -2, 4, -2, 4, $00, 1
+ dsprite -2, 4, -1, 4, $01, 1
+ dsprite -2, 4, 0, 4, $00, 1 | X_FLIP
+ dsprite -1, 4, -2, 4, $02, 1
+ dsprite -1, 4, 0, 4, $02, 1 | X_FLIP
+ dsprite 0, 4, -2, 4, $00, 1 | Y_FLIP
+ dsprite 0, 4, -1, 4, $01, 1 | Y_FLIP
+ dsprite 0, 4, 0, 4, $00, 1 | X_FLIP | Y_FLIP
+
+.OAMData_ForMobile25_3:
+ db 12
+ dsprite -2, 0, -2, 0, $00, 1
+ dsprite -2, 0, -1, 0, $01, 1
+ dsprite -1, 0, -2, 0, $02, 1
+ dsprite -2, 0, 0, 0, $01, 1 | X_FLIP
+ dsprite -2, 0, 1, 0, $00, 1 | X_FLIP
+ dsprite -1, 0, 1, 0, $02, 1 | X_FLIP
+ dsprite 0, 0, -2, 0, $02, 1 | Y_FLIP
+ dsprite 1, 0, -2, 0, $00, 1 | Y_FLIP
+ dsprite 1, 0, -1, 0, $01, 1 | Y_FLIP
+ dsprite 0, 0, 1, 0, $02, 1 | X_FLIP | Y_FLIP
+ dsprite 1, 0, 0, 0, $01, 1 | X_FLIP | Y_FLIP
+ dsprite 1, 0, 1, 0, $00, 1 | X_FLIP | Y_FLIP
+
+.OAMData_IntroSuicune1:
+ db 36
+ dsprite -3, 0, 1, 0, $05, 0
+ dsprite -3, 0, 2, 0, $06, 0
+ dsprite -3, 0, 3, 0, $07, 0
+ dsprite -2, 0, -3, 0, $11, 0
+ dsprite -2, 0, -2, 0, $12, 0
+ dsprite -2, 0, -1, 0, $13, 0
+ dsprite -2, 0, 0, 0, $14, 0
+ dsprite -2, 0, 1, 0, $15, 0
+ dsprite -2, 0, 2, 0, $16, 0
+ dsprite -2, 0, 3, 0, $17, 0
+ dsprite -1, 0, -4, 0, $20, 0
+ dsprite -1, 0, -3, 0, $21, 0
+ dsprite -1, 0, -2, 0, $22, 0
+ dsprite -1, 0, -1, 0, $23, 0
+ dsprite -1, 0, 0, 0, $24, 0
+ dsprite -1, 0, 1, 0, $25, 0
+ dsprite -1, 0, 2, 0, $26, 0
+ dsprite -1, 0, 3, 0, $27, 0
+ dsprite 0, 0, -4, 0, $30, 0
+ dsprite 0, 0, -3, 0, $31, 0
+ dsprite 0, 0, -2, 0, $32, 0
+ dsprite 0, 0, -1, 0, $33, 0
+ dsprite 0, 0, 0, 0, $34, 0
+ dsprite 0, 0, 1, 0, $35, 0
+ dsprite 0, 0, 2, 0, $36, 0
+ dsprite 1, 0, -4, 0, $40, 0
+ dsprite 1, 0, -3, 0, $41, 0
+ dsprite 1, 0, -2, 0, $42, 0
+ dsprite 1, 0, -1, 0, $43, 0
+ dsprite 1, 0, 0, 0, $44, 0
+ dsprite 1, 0, 1, 0, $45, 0
+ dsprite 1, 0, 2, 0, $46, 0
+ dsprite 1, 0, 3, 0, $47, 0
+ dsprite 2, 0, -4, 0, $50, 0
+ dsprite 2, 0, -3, 0, $51, 0
+ dsprite 2, 0, 3, 0, $57, 0
+
+.OAMData_IntroSuicune2:
+ db 28
+ dsprite -3, 0, 0, 0, $04, 0
+ dsprite -3, 0, 1, 0, $05, 0
+ dsprite -3, 0, 2, 0, $06, 0
+ dsprite -2, 0, -3, 0, $11, 0
+ dsprite -2, 0, -2, 0, $12, 0
+ dsprite -2, 0, -1, 0, $13, 0
+ dsprite -2, 0, 0, 0, $14, 0
+ dsprite -2, 0, 1, 0, $15, 0
+ dsprite -2, 0, 2, 0, $16, 0
+ dsprite -1, 0, -3, 0, $21, 0
+ dsprite -1, 0, -2, 0, $22, 0
+ dsprite -1, 0, -1, 0, $23, 0
+ dsprite -1, 0, 0, 0, $24, 0
+ dsprite -1, 0, 1, 0, $25, 0
+ dsprite -1, 0, 2, 0, $26, 0
+ dsprite 0, 0, -4, 0, $30, 0
+ dsprite 0, 0, -3, 0, $31, 0
+ dsprite 0, 0, -2, 0, $32, 0
+ dsprite 0, 0, -1, 0, $33, 0
+ dsprite 0, 0, 0, 0, $34, 0
+ dsprite 0, 0, 1, 0, $35, 0
+ dsprite 1, 0, -2, 0, $42, 0
+ dsprite 1, 0, -1, 0, $43, 0
+ dsprite 1, 0, 0, 0, $44, 0
+ dsprite 1, 0, 1, 0, $45, 0
+ dsprite 2, 0, -1, 0, $53, 0
+ dsprite 2, 0, 0, 0, $54, 0
+ dsprite 2, 0, 1, 0, $55, 0
+
+.OAMData_IntroSuicune3:
+ db 30
+ dsprite -3, 0, 0, 0, $04, 0
+ dsprite -3, 0, 1, 0, $05, 0
+ dsprite -2, 0, -3, 0, $11, 0
+ dsprite -2, 0, -2, 0, $12, 0
+ dsprite -2, 0, -1, 0, $13, 0
+ dsprite -2, 0, 0, 0, $14, 0
+ dsprite -2, 0, 1, 0, $15, 0
+ dsprite -2, 0, 2, 0, $16, 0
+ dsprite -2, 0, 3, 0, $17, 0
+ dsprite -1, 0, -4, 0, $20, 0
+ dsprite -1, 0, -3, 0, $21, 0
+ dsprite -1, 0, -2, 0, $22, 0
+ dsprite -1, 0, -1, 0, $23, 0
+ dsprite -1, 0, 0, 0, $24, 0
+ dsprite -1, 0, 1, 0, $25, 0
+ dsprite -1, 0, 2, 0, $26, 0
+ dsprite 0, 0, -4, 0, $30, 0
+ dsprite 0, 0, -3, 0, $31, 0
+ dsprite 0, 0, -2, 0, $32, 0
+ dsprite 0, 0, -1, 0, $33, 0
+ dsprite 0, 0, 0, 0, $34, 0
+ dsprite 0, 0, 1, 0, $35, 0
+ dsprite 1, 0, -2, 0, $42, 0
+ dsprite 1, 0, -1, 0, $43, 0
+ dsprite 1, 0, 0, 0, $44, 0
+ dsprite 1, 0, 1, 0, $45, 0
+ dsprite 2, 0, -2, 0, $52, 0
+ dsprite 2, 0, -1, 0, $53, 0
+ dsprite 2, 0, 0, 0, $54, 0
+ dsprite 2, 0, 1, 0, $55, 0
+
+.OAMData_IntroSuicune4:
+ db 31
+ dsprite -2, 0, -3, 0, $11, 0
+ dsprite -2, 0, -2, 0, $12, 0
+ dsprite -2, 0, -1, 0, $13, 0
+ dsprite -2, 0, 0, 0, $14, 0
+ dsprite -2, 0, 1, 0, $15, 0
+ dsprite -2, 0, 2, 0, $16, 0
+ dsprite -2, 0, 3, 0, $17, 0
+ dsprite -1, 0, -4, 0, $20, 0
+ dsprite -1, 0, -3, 0, $21, 0
+ dsprite -1, 0, -2, 0, $22, 0
+ dsprite -1, 0, -1, 0, $23, 0
+ dsprite -1, 0, 0, 0, $24, 0
+ dsprite -1, 0, 1, 0, $25, 0
+ dsprite -1, 0, 2, 0, $26, 0
+ dsprite -1, 0, 3, 0, $27, 0
+ dsprite 0, 0, -4, 0, $30, 0
+ dsprite 0, 0, -3, 0, $31, 0
+ dsprite 0, 0, -2, 0, $32, 0
+ dsprite 0, 0, -1, 0, $33, 0
+ dsprite 0, 0, 0, 0, $34, 0
+ dsprite 0, 0, 1, 0, $35, 0
+ dsprite 0, 0, 2, 0, $36, 0
+ dsprite 1, 0, -3, 0, $41, 0
+ dsprite 1, 0, -2, 0, $42, 0
+ dsprite 1, 0, -1, 0, $43, 0
+ dsprite 1, 0, 0, 0, $44, 0
+ dsprite 1, 0, 1, 0, $45, 0
+ dsprite 2, 0, -3, 0, $51, 0
+ dsprite 2, 0, -2, 0, $52, 0
+ dsprite 2, 0, 0, 0, $54, 0
+ dsprite 2, 0, 1, 0, $55, 0
+
+.OAMData_IntroPichu:
+ db 25
+ dsprite -3, 4, -3, 4, $00, 1 | VRAM_BANK_1
+ dsprite -3, 4, -2, 4, $01, 1 | VRAM_BANK_1
+ dsprite -3, 4, -1, 4, $02, 1 | VRAM_BANK_1
+ dsprite -3, 4, 0, 4, $03, 1 | VRAM_BANK_1
+ dsprite -3, 4, 1, 4, $04, 1 | VRAM_BANK_1
+ dsprite -2, 4, -3, 4, $10, 1 | VRAM_BANK_1
+ dsprite -2, 4, -2, 4, $11, 1 | VRAM_BANK_1
+ dsprite -2, 4, -1, 4, $12, 1 | VRAM_BANK_1
+ dsprite -2, 4, 0, 4, $13, 1 | VRAM_BANK_1
+ dsprite -2, 4, 1, 4, $14, 1 | VRAM_BANK_1
+ dsprite -1, 4, -3, 4, $20, 1 | VRAM_BANK_1
+ dsprite -1, 4, -2, 4, $21, 1 | VRAM_BANK_1
+ dsprite -1, 4, -1, 4, $22, 1 | VRAM_BANK_1
+ dsprite -1, 4, 0, 4, $23, 1 | VRAM_BANK_1
+ dsprite -1, 4, 1, 4, $24, 1 | VRAM_BANK_1
+ dsprite 0, 4, -3, 4, $30, 1 | VRAM_BANK_1
+ dsprite 0, 4, -2, 4, $31, 1 | VRAM_BANK_1
+ dsprite 0, 4, -1, 4, $32, 1 | VRAM_BANK_1
+ dsprite 0, 4, 0, 4, $33, 1 | VRAM_BANK_1
+ dsprite 0, 4, 1, 4, $34, 1 | VRAM_BANK_1
+ dsprite 1, 4, -3, 4, $40, 1 | VRAM_BANK_1
+ dsprite 1, 4, -2, 4, $41, 1 | VRAM_BANK_1
+ dsprite 1, 4, -1, 4, $42, 1 | VRAM_BANK_1
+ dsprite 1, 4, 0, 4, $43, 1 | VRAM_BANK_1
+ dsprite 1, 4, 1, 4, $44, 1 | VRAM_BANK_1
+
+.OAMData_IntroWooper:
+ db 16
+ dsprite -2, 0, -3, 4, $00, 2 | VRAM_BANK_1
+ dsprite -2, 0, -2, 4, $01, 2 | VRAM_BANK_1
+ dsprite -2, 0, -1, 4, $02, 2 | VRAM_BANK_1
+ dsprite -2, 0, 0, 4, $03, 2 | VRAM_BANK_1
+ dsprite -1, 0, -3, 4, $04, 2 | VRAM_BANK_1
+ dsprite -1, 0, -2, 4, $05, 2 | VRAM_BANK_1
+ dsprite -1, 0, -1, 4, $06, 2 | VRAM_BANK_1
+ dsprite -1, 0, 0, 4, $07, 2 | VRAM_BANK_1
+ dsprite 0, 0, -3, 4, $08, 2 | VRAM_BANK_1
+ dsprite 0, 0, -2, 4, $09, 2 | VRAM_BANK_1
+ dsprite 0, 0, -1, 4, $0a, 2 | VRAM_BANK_1
+ dsprite 0, 0, 0, 4, $0b, 2 | VRAM_BANK_1
+ dsprite 1, 0, -3, 4, $0c, 2 | VRAM_BANK_1
+ dsprite 1, 0, -2, 4, $0d, 2 | VRAM_BANK_1
+ dsprite 1, 0, -1, 4, $0e, 2 | VRAM_BANK_1
+ dsprite 1, 0, 0, 4, $0f, 2 | VRAM_BANK_1
+
+.OAMData_IntroUnown1:
+ db 1
+ dsprite -1, 4, -1, 4, $00, $00
+
+.OAMData_IntroUnown2:
+ db 3
+ dsprite 0, 0, -1, 0, $00, $00
+ dsprite -1, 0, -1, 0, $01, $00
+ dsprite -1, 0, 0, 0, $02, $00
+
+.OAMData_IntroUnown3:
+ db 7
+ dsprite 1, 0, -2, 0, $00, $00
+ dsprite 0, 0, -2, 0, $01, $00
+ dsprite -1, 0, -2, 0, $02, $00
+ dsprite -1, 0, -1, 0, $03, $00
+ dsprite -2, 0, -1, 0, $04, $00
+ dsprite -2, 0, 0, 0, $05, $00
+ dsprite -2, 0, 1, 0, $06, $00
+
+.OAMData_IntroUnownF2_2:
+ db 8
+ dsprite -1, 0, -2, 0, $00, 0
+ dsprite -1, 0, -1, 0, $01, 0
+ dsprite -1, 0, 0, 0, $01, 0 | X_FLIP
+ dsprite -1, 0, 1, 0, $00, 0 | X_FLIP
+ dsprite 0, 0, -2, 0, $00, 0 | Y_FLIP
+ dsprite 0, 0, -1, 0, $01, 0 | Y_FLIP
+ dsprite 0, 0, 0, 0, $01, 0 | X_FLIP | Y_FLIP
+ dsprite 0, 0, 1, 0, $00, 0 | X_FLIP | Y_FLIP
+
+.OAMData_IntroUnownF2_3:
+ db 12
+ dsprite -3, 0, -1, 0, $00, 0
+ dsprite -2, 0, -1, 0, $01, 0
+ dsprite -1, 0, -1, 0, $02, 0
+ dsprite -3, 0, 0, 0, $00, 0 | X_FLIP
+ dsprite -2, 0, 0, 0, $01, 0 | X_FLIP
+ dsprite -1, 0, 0, 0, $02, 0 | X_FLIP
+ dsprite 0, 0, -1, 0, $02, 0 | Y_FLIP
+ dsprite 1, 0, -1, 0, $01, 0 | Y_FLIP
+ dsprite 2, 0, -1, 0, $00, 0 | Y_FLIP
+ dsprite 0, 0, 0, 0, $02, 0 | X_FLIP | Y_FLIP
+ dsprite 1, 0, 0, 0, $01, 0 | X_FLIP | Y_FLIP
+ dsprite 2, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP
+
+.OAMData_IntroUnownF2_4_5:
+ db 20
+ dsprite -3, 4, -2, 0, $00, 0
+ dsprite -3, 4, -1, 0, $01, 0
+ dsprite -3, 4, 0, 0, $02, 0
+ dsprite -3, 4, 1, 0, $03, 0
+ dsprite -2, 4, -2, 0, $04, 0
+ dsprite -2, 4, -1, 0, $05, 0
+ dsprite -2, 4, 0, 0, $06, 0
+ dsprite -2, 4, 1, 0, $07, 0
+ dsprite -1, 4, -2, 0, $08, 0
+ dsprite -1, 4, -1, 0, $09, 0
+ dsprite -1, 4, 0, 0, $0a, 0
+ dsprite -1, 4, 1, 0, $0b, 0
+ dsprite 0, 4, -2, 0, $0c, 0
+ dsprite 0, 4, -1, 0, $0d, 0
+ dsprite 0, 4, 0, 0, $0e, 0
+ dsprite 0, 4, 1, 0, $0f, 0
+ dsprite 1, 4, -2, 0, $10, 0
+ dsprite 1, 4, -1, 0, $11, 0
+ dsprite 1, 4, 0, 0, $12, 0
+ dsprite 1, 4, 1, 0, $13, 0
+
+.OAMData_IntroSuicuneAway:
+ db 20
+ dsprite 0, 0, 1, 0, $00, 1 | BEHIND_BG
+ dsprite 1, 0, 2, 0, $00, 1 | BEHIND_BG
+ dsprite 2, 0, 3, 0, $00, 1 | BEHIND_BG
+ dsprite 3, 0, 4, 0, $00, 1 | BEHIND_BG
+ dsprite 4, 0, 5, 0, $00, 1 | BEHIND_BG
+ dsprite 3, 0, 6, 0, $00, 1 | BEHIND_BG
+ dsprite 2, 0, 7, 0, $00, 1 | BEHIND_BG
+ dsprite 1, 0, 8, 0, $00, 1 | BEHIND_BG
+ dsprite 0, 0, 9, 0, $00, 1 | BEHIND_BG
+ dsprite 1, 0, 10, 0, $00, 1 | BEHIND_BG
+ dsprite 2, 0, 11, 0, $00, 1 | BEHIND_BG
+ dsprite 3, 0, 12, 0, $00, 1 | BEHIND_BG
+ dsprite 4, 0, 13, 0, $00, 1 | BEHIND_BG
+ dsprite 3, 0, 14, 0, $00, 1 | BEHIND_BG
+ dsprite 2, 0, 15, 0, $00, 1 | BEHIND_BG
+ dsprite 1, 0, 16, 0, $00, 1 | BEHIND_BG
+ dsprite 0, 0, -15, 0, $00, 1 | BEHIND_BG
+ dsprite 1, 0, -14, 0, $00, 1 | BEHIND_BG
+ dsprite 2, 0, -13, 0, $00, 1 | BEHIND_BG
+ dsprite 3, 0, -12, 0, $00, 1 | BEHIND_BG
+
+.OAMData_Celebi:
+ db 4
+ dsprite -1, 0, -1, 0, $00, PAL_OW_GREEN
+ dsprite -1, 0, 0, 0, $01, PAL_OW_GREEN
+ dsprite 0, 0, -1, 0, $02, PAL_OW_GREEN
+ dsprite 0, 0, 0, 0, $03, PAL_OW_GREEN
+
+.OAMData_GameFreakLogo1_3:
+ db 9
+ dsprite -2, 0, -2, 4, $00, 1
+ dsprite -2, 0, -1, 4, $01, 1
+ dsprite -2, 0, 0, 4, $02, 1
+ dsprite -1, 0, -2, 4, $10, 1
+ dsprite -1, 0, -1, 4, $11, 1
+ dsprite -1, 0, 0, 4, $12, 1
+ dsprite 0, 0, -2, 4, $20, 1
+ dsprite 0, 0, -1, 4, $21, 1
+ dsprite 0, 0, 0, 4, $22, 1
+
+.OAMData_GameFreakLogo4_11:
+ db 24
+ dsprite -5, 0, -2, 4, $00, 1
+ dsprite -5, 0, -1, 4, $01, 1
+ dsprite -5, 0, 0, 4, $02, 1
+ dsprite -5, 0, 1, 4, $03, 1
+ dsprite -4, 0, -2, 4, $10, 1
+ dsprite -4, 0, -1, 4, $11, 1
+ dsprite -4, 0, 0, 4, $12, 1
+ dsprite -4, 0, 1, 4, $13, 1
+ dsprite -3, 0, -2, 4, $20, 1
+ dsprite -3, 0, -1, 4, $21, 1
+ dsprite -3, 0, 0, 4, $22, 1
+ dsprite -3, 0, 1, 4, $23, 1
+ dsprite -2, 0, -2, 4, $30, 1
+ dsprite -2, 0, -1, 4, $31, 1
+ dsprite -2, 0, 0, 4, $32, 1
+ dsprite -2, 0, 1, 4, $33, 1
+ dsprite -1, 0, -2, 4, $40, 1
+ dsprite -1, 0, -1, 4, $41, 1
+ dsprite -1, 0, 0, 4, $42, 1
+ dsprite -1, 0, 1, 4, $43, 1
+ dsprite 0, 0, -2, 4, $50, 1
+ dsprite 0, 0, -1, 4, $51, 1
+ dsprite 0, 0, 0, 4, $52, 1
+ dsprite 0, 0, 1, 4, $53, 1
+; 8e706
diff --git a/data/sprite_anim_seqs.asm b/data/sprite_anim_seqs.asm
new file mode 100644
index 000000000..70544a60a
--- /dev/null
+++ b/data/sprite_anim_seqs.asm
@@ -0,0 +1,49 @@
+SpriteAnimSeqData: ; 8d1c4
+; entries correspond to SPRITE_ANIM_INDEX_* constants
+ ; frameset sequence, tile
+ db SPRITE_ANIM_FRAMESET_PARTY_MON, SPRITE_ANIM_SEQ_PARTY_MON, $00 ; SPRITE_ANIM_INDEX_PARTY_MON
+ db SPRITE_ANIM_FRAMESET_GS_TITLE_TRAIL, SPRITE_ANIM_SEQ_GS_TITLE_TRAIL, $00 ; SPRITE_ANIM_INDEX_GS_TITLE_TRAIL
+ db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_NAMING_SCREEN_CURSOR, $05 ; SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR
+ db SPRITE_ANIM_FRAMESET_GAMEFREAK_LOGO, SPRITE_ANIM_SEQ_GAMEFREAK_LOGO, $00 ; SPRITE_ANIM_INDEX_GAMEFREAK_LOGO
+ db SPRITE_ANIM_FRAMESET_GS_INTRO_STAR, SPRITE_ANIM_SEQ_GS_INTRO_STAR, $06 ; SPRITE_ANIM_INDEX_GS_INTRO_STAR
+ db SPRITE_ANIM_FRAMESET_GS_INTRO_SPARKLE, SPRITE_ANIM_SEQ_GS_INTRO_SPARKLE, $06 ; SPRITE_ANIM_INDEX_GS_INTRO_SPARKLE
+ db SPRITE_ANIM_FRAMESET_SLOTS_GOLEM, SPRITE_ANIM_SEQ_SLOTS_GOLEM, $07 ; SPRITE_ANIM_INDEX_SLOTS_GOLEM
+ db SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY, SPRITE_ANIM_SEQ_SLOTS_CHANSEY, $07 ; SPRITE_ANIM_INDEX_SLOTS_CHANSEY
+ db SPRITE_ANIM_FRAMESET_SLOTS_EGG, SPRITE_ANIM_SEQ_SLOTS_EGG, $07 ; SPRITE_ANIM_INDEX_SLOTS_EGG
+ db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_MAIL_CURSOR, $05 ; SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR
+ db SPRITE_ANIM_FRAMESET_RED_WALK, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_RED_WALK
+ db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_FOR_UNUSED_CURSOR, $08 ; SPRITE_ANIM_INDEX_UNUSED_CURSOR
+ db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_DUMMY_GAME_CURSOR, $08 ; SPRITE_ANIM_INDEX_DUMMY_GAME
+ db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_POKEGEAR_ARROW, $08 ; SPRITE_ANIM_INDEX_POKEGEAR_ARROW
+ db SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL, SPRITE_ANIM_SEQ_TRADE_POKE_BALL, $00 ; SPRITE_ANIM_INDEX_TRADE_POKE_BALL
+ db SPRITE_ANIM_FRAMESET_TRADE_POOF, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_TRADE_POOF
+ db SPRITE_ANIM_FRAMESET_TRADE_TUBE_BULGE, SPRITE_ANIM_SEQ_TRADE_TUBE_BULGE, $00 ; SPRITE_ANIM_INDEX_TRADE_TUBE_BULGE
+ db SPRITE_ANIM_FRAMESET_TRADEMON_ICON, SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE, $00 ; SPRITE_ANIM_INDEX_TRADEMON_ICON
+ db SPRITE_ANIM_FRAMESET_TRADEMON_BUBBLE, SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE, $00 ; SPRITE_ANIM_INDEX_TRADEMON_BUBBLE
+ db SPRITE_ANIM_FRAMESET_EVOLUTION_BALL_OF_LIGHT, SPRITE_ANIM_SEQ_REVEAL_NEW_MON, $00 ; SPRITE_ANIM_INDEX_EVOLUTION_BALL_OF_LIGHT
+ db SPRITE_ANIM_FRAMESET_RADIO_TUNING_KNOB, SPRITE_ANIM_SEQ_RADIO_TUNING_KNOB, $00 ; SPRITE_ANIM_INDEX_RADIO_TUNING_KNOB
+ db SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_RED, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MAGNET_TRAIN_RED
+ db SPRITE_ANIM_FRAMESET_LEAF, SPRITE_ANIM_SEQ_CUT_LEAVES, $00 ; SPRITE_ANIM_INDEX_LEAF
+ db SPRITE_ANIM_FRAMESET_CUT_TREE, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_CUT_TREE
+ db SPRITE_ANIM_FRAMESET_LEAF, SPRITE_ANIM_SEQ_FLY_LEAF, $00 ; SPRITE_ANIM_INDEX_FLY_LEAF
+ db SPRITE_ANIM_FRAMESET_EGG_CRACK, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_EGG_CRACK
+ db SPRITE_ANIM_FRAMESET_24, SPRITE_ANIM_SEQ_19, $00 ; SPRITE_ANIM_INDEX_1A
+ db SPRITE_ANIM_FRAMESET_HEADBUTT, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_HEADBUTT
+ db SPRITE_ANIM_FRAMESET_EGG_HATCH, SPRITE_ANIM_SEQ_REVEAL_NEW_MON, $00 ; SPRITE_ANIM_INDEX_EGG_HATCH
+ db SPRITE_ANIM_FRAMESET_26, SPRITE_ANIM_SEQ_1A, $00 ; SPRITE_ANIM_INDEX_1D
+ db SPRITE_ANIM_FRAMESET_BLUE_WALK, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_BLUE_WALK
+ db SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_BLUE, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE
+ db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_SENT_BALL, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL
+ db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_OT_BALL, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL
+ db SPRITE_ANIM_FRAMESET_FOR_MOBILE_22, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MOBILE_22
+ db SPRITE_ANIM_FRAMESET_FOR_MOBILE_23, SPRITE_ANIM_SEQ_FOR_MOBILE_23, $00 ; SPRITE_ANIM_INDEX_MOBILE_23
+ db SPRITE_ANIM_FRAMESET_FOR_MOBILE_24, SPRITE_ANIM_SEQ_FOR_MOBILE_24, $00 ; SPRITE_ANIM_INDEX_MOBILE_24
+ db SPRITE_ANIM_FRAMESET_FOR_MOBILE_25, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_MOBILE_25
+ db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE, SPRITE_ANIM_SEQ_INTRO_SUICUNE, $00 ; SPRITE_ANIM_INDEX_INTRO_SUICUNE
+ db SPRITE_ANIM_FRAMESET_INTRO_PICHU, SPRITE_ANIM_SEQ_INTRO_PICHU_WOOPER, $00 ; SPRITE_ANIM_INDEX_INTRO_PICHU
+ db SPRITE_ANIM_FRAMESET_INTRO_WOOPER, SPRITE_ANIM_SEQ_INTRO_PICHU_WOOPER, $00 ; SPRITE_ANIM_INDEX_INTRO_WOOPER
+ db SPRITE_ANIM_FRAMESET_INTRO_UNOWN_1, SPRITE_ANIM_SEQ_INTRO_UNOWN, $00 ; SPRITE_ANIM_INDEX_INTRO_UNOWN
+ db SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F, SPRITE_ANIM_SEQ_INTRO_UNOWN_F, $00 ; SPRITE_ANIM_INDEX_INTRO_UNOWN_F
+ db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_AWAY, SPRITE_ANIM_SEQ_INTRO_SUICUNE_AWAY, $00 ; SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY
+ db SPRITE_ANIM_FRAMESET_CELEBI_LEFT, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_CELEBI
+; 8d24b
diff --git a/data/sprite_engine.asm b/data/sprite_engine.asm
deleted file mode 100755
index 7a8a49bbe..000000000
--- a/data/sprite_engine.asm
+++ /dev/null
@@ -1,1647 +0,0 @@
-SpriteAnimFrameData: ; 8d6e6
- dw .Frameset_00 ; 00
- dw .Frameset_01 ; 01
- dw .Frameset_02 ; 02
- dw .Frameset_03 ; 03
- dw .Frameset_04 ; 04
- dw .Frameset_05 ; 05
- dw .Frameset_06 ; 06
- dw .Frameset_07 ; 07
- dw .Frameset_08 ; 08
- dw .Frameset_09 ; 09
- dw .Frameset_0a ; 0a
- dw .Frameset_0b ; 0b
- dw .Frameset_0c ; 0c
- dw .Frameset_0d ; 0d
- dw .Frameset_0e ; 0e
- dw .Frameset_0f ; 0f
- dw .Frameset_10 ; 10
- dw .Frameset_11 ; 11
- dw .Frameset_12 ; 12
- dw .Frameset_13 ; 13
- dw .Frameset_14 ; 14
- dw .Frameset_15 ; 15
- dw .Frameset_16 ; 16
- dw .Frameset_17 ; 17
- dw .Frameset_18 ; 18
- dw .Frameset_19 ; 19
- dw .Frameset_1a ; 1a
- dw .Frameset_1b ; 1b
- dw .Frameset_1c ; 1c
- dw .Frameset_1d ; 1d
- dw .Frameset_1e ; 1e
- dw .Frameset_1f ; 1f
- dw .Frameset_20 ; 20
- dw .Frameset_21 ; 21
- dw .Frameset_22 ; 22
- dw .Frameset_23 ; 23
- dw .Frameset_24 ; 24
- dw .Frameset_25 ; 25 headbutt
- dw .Frameset_26 ; 26
- dw .Frameset_27 ; 27
- dw .Frameset_28 ; 28
- dw .Frameset_29 ; 29
- dw .Frameset_2a ; 2a
- dw .Frameset_2b ; 2b
- dw .Frameset_2c ; 2c
- dw .Frameset_2d ; 2d
- dw .Frameset_2e ; 2e
- dw .Frameset_2f ; 2f
- dw .Frameset_30 ; 30
- dw .Frameset_31 ; 31
- dw .Frameset_32 ; 32
- dw .Frameset_33 ; 33
- dw .Frameset_34 ; 34
- dw .Frameset_35 ; 35
- dw .Frameset_36 ; 36
- dw .Frameset_37 ; 37
- dw .Frameset_38 ; 38
- dw .Frameset_39 ; 39 unown in intro
- dw .Frameset_3a ; 3a unown in intro
- dw .Frameset_3b ; 3b unown in intro
- dw .Frameset_3c ; 3c unown in intro
- dw .Frameset_3d ; 3d
- dw .Frameset_3e ; 3e
- dw .Frameset_3f ; 3f
- dw .Frameset_40 ; 40 celebi on the left
- dw .Frameset_41 ; 41 celebi on the right
-; 8d76a
-
-.Frameset_00:
- frame SPRITE_ANIM_FRAME_IDX_00, 32
- endanim
-
-.Frameset_01:
- frame SPRITE_ANIM_FRAME_IDX_00, 8
- frame SPRITE_ANIM_FRAME_IDX_01, 8
- dorestart
-
-.Frameset_02:
- frame SPRITE_ANIM_FRAME_IDX_3D, 8
- frame SPRITE_ANIM_FRAME_IDX_3E, 8
- dorestart
-
-.Frameset_03:
- frame SPRITE_ANIM_FRAME_IDX_3F, 8
- frame SPRITE_ANIM_FRAME_IDX_40, 8
- dorestart
-
-.Frameset_04:
- frame SPRITE_ANIM_FRAME_IDX_00, 4
- frame SPRITE_ANIM_FRAME_IDX_01, 4
- dorestart
-
-.Frameset_05:
- frame SPRITE_ANIM_FRAME_IDX_3D, 4
- frame SPRITE_ANIM_FRAME_IDX_3E, 4
- dorestart
-
-.Frameset_06:
- frame SPRITE_ANIM_FRAME_IDX_3F, 4
- frame SPRITE_ANIM_FRAME_IDX_40, 4
- dorestart
-
-.Frameset_11:
- frame SPRITE_ANIM_FRAME_IDX_00, 8
- frame SPRITE_ANIM_FRAME_IDX_01, 8
- frame SPRITE_ANIM_FRAME_IDX_00, 8
- frame SPRITE_ANIM_FRAME_IDX_01, 8, OAM_X_FLIP
- dorestart
-
-.Frameset_2d:
- frame SPRITE_ANIM_FRAME_IDX_63, 8
- frame SPRITE_ANIM_FRAME_IDX_64, 8
- frame SPRITE_ANIM_FRAME_IDX_63, 8
- frame SPRITE_ANIM_FRAME_IDX_64, 8, OAM_X_FLIP
- dorestart
-
-.Frameset_2e:
- frame SPRITE_ANIM_FRAME_IDX_65, 8
- frame SPRITE_ANIM_FRAME_IDX_66, 8
- frame SPRITE_ANIM_FRAME_IDX_65, 8
- frame SPRITE_ANIM_FRAME_IDX_66, 8, OAM_X_FLIP
- dorestart
-
-.Frameset_07:
- frame SPRITE_ANIM_FRAME_IDX_1E, 1
- frame SPRITE_ANIM_FRAME_IDX_1F, 1
- dorestart
-
-.Frameset_08:
- frame SPRITE_ANIM_FRAME_IDX_20, 1
- dorepeat 1
- dorestart
-
-.Frameset_09:
- frame SPRITE_ANIM_FRAME_IDX_21, 1
- dorepeat 1
- dorestart
-
-.Frameset_0a:
- frame SPRITE_ANIM_FRAME_IDX_81, 12
- frame SPRITE_ANIM_FRAME_IDX_82, 1
- frame SPRITE_ANIM_FRAME_IDX_83, 1
- frame SPRITE_ANIM_FRAME_IDX_82, 4
- frame SPRITE_ANIM_FRAME_IDX_81, 12
- frame SPRITE_ANIM_FRAME_IDX_82, 12
- frame SPRITE_ANIM_FRAME_IDX_83, 4
- frame SPRITE_ANIM_FRAME_IDX_84, 32
- frame SPRITE_ANIM_FRAME_IDX_85, 3
- frame SPRITE_ANIM_FRAME_IDX_86, 3
- frame SPRITE_ANIM_FRAME_IDX_87, 4
- frame SPRITE_ANIM_FRAME_IDX_88, 4
- frame SPRITE_ANIM_FRAME_IDX_89, 4
- frame SPRITE_ANIM_FRAME_IDX_8A, 10
- frame SPRITE_ANIM_FRAME_IDX_8B, 7
- endanim
-
-.Frameset_0b:
- frame SPRITE_ANIM_FRAME_IDX_23, 3
- frame SPRITE_ANIM_FRAME_IDX_23, 3, OAM_Y_FLIP
- dorestart
-
-.Frameset_0c:
- frame SPRITE_ANIM_FRAME_IDX_24, 2
- frame SPRITE_ANIM_FRAME_IDX_25, 2
- frame SPRITE_ANIM_FRAME_IDX_26, 2
- frame SPRITE_ANIM_FRAME_IDX_25, 2
- dorestart
-
-.Frameset_0d:
- frame SPRITE_ANIM_FRAME_IDX_27, 7
- frame SPRITE_ANIM_FRAME_IDX_28, 7
- frame SPRITE_ANIM_FRAME_IDX_27, 7, OAM_Y_FLIP
- frame SPRITE_ANIM_FRAME_IDX_28, 7, OAM_X_FLIP
- dorestart
-
-.Frameset_0e:
- frame SPRITE_ANIM_FRAME_IDX_29, 7
- frame SPRITE_ANIM_FRAME_IDX_2A, 7
- frame SPRITE_ANIM_FRAME_IDX_29, 7
- frame SPRITE_ANIM_FRAME_IDX_2B, 7
- dorestart
-
-.Frameset_0f:
- frame SPRITE_ANIM_FRAME_IDX_29, 7
- frame SPRITE_ANIM_FRAME_IDX_2C, 7
- frame SPRITE_ANIM_FRAME_IDX_2D, 7
- frame SPRITE_ANIM_FRAME_IDX_2C, 7
- frame SPRITE_ANIM_FRAME_IDX_29, 7
- endanim
-
-.Frameset_10:
- frame SPRITE_ANIM_FRAME_IDX_2E, 20
- endanim
-
-.Frameset_12:
- frame SPRITE_ANIM_FRAME_IDX_2F, 32
- endanim
-
-.Frameset_13:
- frame SPRITE_ANIM_FRAME_IDX_30, 32
- endanim
-
-.Frameset_14:
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3, OAM_X_FLIP
- dorestart
-
-.Frameset_15:
- frame SPRITE_ANIM_FRAME_IDX_32, 4
- frame SPRITE_ANIM_FRAME_IDX_33, 4
- frame SPRITE_ANIM_FRAME_IDX_34, 4
- delanim
-
-.Frameset_16:
- frame SPRITE_ANIM_FRAME_IDX_35, 3
- frame SPRITE_ANIM_FRAME_IDX_36, 3
- dorestart
-
-.Frameset_17:
- frame SPRITE_ANIM_FRAME_IDX_37, 7
- frame SPRITE_ANIM_FRAME_IDX_38, 7
- dorestart
-
-.Frameset_18:
- frame SPRITE_ANIM_FRAME_IDX_39, 32
- endanim
-
-.Frameset_19:
- frame SPRITE_ANIM_FRAME_IDX_3B, 2
- frame SPRITE_ANIM_FRAME_IDX_3A, 2
- frame SPRITE_ANIM_FRAME_IDX_3B, 2
- endanim
-
-.Frameset_1a:
- frame SPRITE_ANIM_FRAME_IDX_3C, 32
- endanim
-
-.Frameset_1b:
- frame SPRITE_ANIM_FRAME_IDX_41, 8
- frame SPRITE_ANIM_FRAME_IDX_42, 8
- frame SPRITE_ANIM_FRAME_IDX_41, 8
- frame SPRITE_ANIM_FRAME_IDX_42, 8, OAM_X_FLIP
- dorestart
-
-; XXX
- frame SPRITE_ANIM_FRAME_IDX_43, 8
- frame SPRITE_ANIM_FRAME_IDX_44, 8
- dorestart
-
-; XXX
- frame SPRITE_ANIM_FRAME_IDX_45, 8
- frame SPRITE_ANIM_FRAME_IDX_46, 8
- dorestart
-
-; XXX
- frame SPRITE_ANIM_FRAME_IDX_47, 8
- frame SPRITE_ANIM_FRAME_IDX_48, 8
- dorestart
-
-; XXX
- frame SPRITE_ANIM_FRAME_IDX_49, 1
- frame SPRITE_ANIM_FRAME_IDX_49, 1, OAM_X_FLIP
- frame SPRITE_ANIM_FRAME_IDX_49, 1, OAM_X_FLIP, OAM_Y_FLIP
- frame SPRITE_ANIM_FRAME_IDX_49, 1, OAM_Y_FLIP
- dorestart
-
-; XXX
- frame SPRITE_ANIM_FRAME_IDX_4A, 32
- endanim
-
-; XXX
- frame SPRITE_ANIM_FRAME_IDX_4B, 32
- endanim
-
-; XXX
- frame SPRITE_ANIM_FRAME_IDX_4C, 32
- endanim
-
-; XXX
- frame SPRITE_ANIM_FRAME_IDX_4D, 32
- endanim
-
-; XXX
- frame SPRITE_ANIM_FRAME_IDX_4E, 3
- dorepeat 3
- dorestart
-
-.Frameset_1c:
- dorepeat 32
- endanim
-
-.Frameset_1d:
- frame SPRITE_ANIM_FRAME_IDX_4F, 32
- endanim
-
-.Frameset_1e:
- frame SPRITE_ANIM_FRAME_IDX_50, 2
- frame SPRITE_ANIM_FRAME_IDX_51, 16
- dorepeat 1
- frame SPRITE_ANIM_FRAME_IDX_52, 1
- dorepeat 1
- frame SPRITE_ANIM_FRAME_IDX_53, 1
- delanim
-
-.Frameset_1f:
- frame SPRITE_ANIM_FRAME_IDX_54, 32
- endanim
-
-.Frameset_20:
- frame SPRITE_ANIM_FRAME_IDX_55, 32
- endanim
-
-.Frameset_21:
- frame SPRITE_ANIM_FRAME_IDX_55, 32, OAM_X_FLIP
- endanim
-
-.Frameset_22:
- frame SPRITE_ANIM_FRAME_IDX_55, 32, OAM_Y_FLIP
- endanim
-
-.Frameset_23:
- frame SPRITE_ANIM_FRAME_IDX_55, 32, OAM_X_FLIP, OAM_Y_FLIP
- endanim
-
-.Frameset_24:
- frame SPRITE_ANIM_FRAME_IDX_56, 10
- frame SPRITE_ANIM_FRAME_IDX_57, 9
- frame SPRITE_ANIM_FRAME_IDX_58, 10
- frame SPRITE_ANIM_FRAME_IDX_59, 10
- frame SPRITE_ANIM_FRAME_IDX_58, 9
- frame SPRITE_ANIM_FRAME_IDX_5A, 10
- dorestart
-
-.Frameset_25:
- frame SPRITE_ANIM_FRAME_IDX_50, 2
- frame SPRITE_ANIM_FRAME_IDX_5B, 2
- frame SPRITE_ANIM_FRAME_IDX_50, 2
- frame SPRITE_ANIM_FRAME_IDX_5B, 2, OAM_X_FLIP
- dorestart
-
-.Frameset_26:
- frame SPRITE_ANIM_FRAME_IDX_5C, 2
- endanim
-
-.Frameset_27:
- frame SPRITE_ANIM_FRAME_IDX_5D, 2
- endanim
-
-.Frameset_28:
- frame SPRITE_ANIM_FRAME_IDX_5E, 2
- endanim
-
-.Frameset_29:
- frame SPRITE_ANIM_FRAME_IDX_5F, 2
- endanim
-
-.Frameset_2a:
- frame SPRITE_ANIM_FRAME_IDX_60, 2
- endanim
-
-.Frameset_2b:
- frame SPRITE_ANIM_FRAME_IDX_61, 2
- endanim
-
-.Frameset_2c:
- frame SPRITE_ANIM_FRAME_IDX_62, 2
- endanim
-
-.Frameset_2f:
- frame SPRITE_ANIM_FRAME_IDX_32, 3
- frame SPRITE_ANIM_FRAME_IDX_33, 3
- frame SPRITE_ANIM_FRAME_IDX_34, 3
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3, OAM_X_FLIP
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3, OAM_X_FLIP
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3, OAM_X_FLIP
- endanim
-
-.Frameset_30:
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3, OAM_X_FLIP
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3, OAM_X_FLIP
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3
- frame SPRITE_ANIM_FRAME_IDX_30, 3
- frame SPRITE_ANIM_FRAME_IDX_31, 3, OAM_X_FLIP
- frame SPRITE_ANIM_FRAME_IDX_32, 3
- frame SPRITE_ANIM_FRAME_IDX_33, 3
- frame SPRITE_ANIM_FRAME_IDX_34, 3
- delanim
-
-.Frameset_31:
- frame SPRITE_ANIM_FRAME_IDX_67, 3
- frame SPRITE_ANIM_FRAME_IDX_68, 3
- dorestart
-
-.Frameset_32:
- frame SPRITE_ANIM_FRAME_IDX_6C, 3
- endanim
-
-.Frameset_33:
- frame SPRITE_ANIM_FRAME_IDX_6D, 3
- endanim
-
-.Frameset_34:
- frame SPRITE_ANIM_FRAME_IDX_69, 2
- frame SPRITE_ANIM_FRAME_IDX_6A, 2
- frame SPRITE_ANIM_FRAME_IDX_6B, 2
- delanim
-
-.Frameset_35:
- frame SPRITE_ANIM_FRAME_IDX_6E, 3
- frame SPRITE_ANIM_FRAME_IDX_6F, 3
- frame SPRITE_ANIM_FRAME_IDX_70, 3
- frame SPRITE_ANIM_FRAME_IDX_71, 3
- dorestart
-
-.Frameset_36:
- frame SPRITE_ANIM_FRAME_IDX_71, 3
- frame SPRITE_ANIM_FRAME_IDX_6E, 7
- endanim
-
-.Frameset_37:
- frame SPRITE_ANIM_FRAME_IDX_72, 32
- frame SPRITE_ANIM_FRAME_IDX_73, 7
- frame SPRITE_ANIM_FRAME_IDX_74, 7
- endanim
-
-.Frameset_38:
- frame SPRITE_ANIM_FRAME_IDX_75, 3
- endanim
-
-.Frameset_39:
- frame SPRITE_ANIM_FRAME_IDX_76, 3
- frame SPRITE_ANIM_FRAME_IDX_77, 3
- frame SPRITE_ANIM_FRAME_IDX_78, 7
- delanim
-
-.Frameset_3a:
- frame SPRITE_ANIM_FRAME_IDX_76, 3, OAM_X_FLIP
- frame SPRITE_ANIM_FRAME_IDX_77, 3, OAM_X_FLIP
- frame SPRITE_ANIM_FRAME_IDX_78, 7, OAM_X_FLIP
- delanim
-
-.Frameset_3b:
- frame SPRITE_ANIM_FRAME_IDX_76, 3, OAM_Y_FLIP
- frame SPRITE_ANIM_FRAME_IDX_77, 3, OAM_Y_FLIP
- frame SPRITE_ANIM_FRAME_IDX_78, 7, OAM_Y_FLIP
- delanim
-
-.Frameset_3c:
- frame SPRITE_ANIM_FRAME_IDX_76, 3, OAM_X_FLIP, OAM_Y_FLIP
- frame SPRITE_ANIM_FRAME_IDX_77, 3, OAM_X_FLIP, OAM_Y_FLIP
- frame SPRITE_ANIM_FRAME_IDX_78, 7, OAM_X_FLIP, OAM_Y_FLIP
- delanim
-
-.Frameset_3d:
- frame SPRITE_ANIM_FRAME_IDX_79, 3
- frame SPRITE_ANIM_FRAME_IDX_7A, 3
- frame SPRITE_ANIM_FRAME_IDX_7B, 3
- frame SPRITE_ANIM_FRAME_IDX_7C, 7
- frame SPRITE_ANIM_FRAME_IDX_7D, 7
- endanim
-
-.Frameset_3e:
- frame SPRITE_ANIM_FRAME_IDX_7E, 3
- endanim
-
-.Frameset_3f:
- dorepeat 0
- endanim
-
-.Frameset_40:
- frame SPRITE_ANIM_FRAME_IDX_7F, 8
- frame SPRITE_ANIM_FRAME_IDX_80, 8
- endanim
-
-.Frameset_41:
- frame SPRITE_ANIM_FRAME_IDX_7F, 8, OAM_X_FLIP
- frame SPRITE_ANIM_FRAME_IDX_80, 8, OAM_X_FLIP
- endanim
-; 8d94d
-
-SpriteAnimOAMData: ; 8d94d
- ; vtile offset, pointer
- dbw $00, .OAMData_00 ; 00
- dbw $04, .OAMData_00 ; 01
- dbw $4c, .OAMData_02 ; 02
- dbw $5c, .OAMData_02 ; 03
- dbw $6c, .OAMData_04 ; 04
- dbw $6e, .OAMData_04 ; 05
- dbw $2d, .OAMData_06 ; 06
- dbw $4d, .OAMData_06 ; 07
- dbw $60, .OAMData_08 ; 08
- dbw $00, .OAMData_08 ; 09
- dbw $00, .OAMData_08 ; 0a
- dbw $06, .OAMData_08 ; 0b
- dbw $0c, .OAMData_0c ; 0c
- dbw $0d, .OAMData_02 ; 0d
- dbw $00, .OAMData_0e ; 0e
- dbw $04, .OAMData_0e ; 0f
- dbw $08, .OAMData_0e ; 10
- dbw $40, .OAMData_0e ; 11
- dbw $44, .OAMData_0e ; 12
- dbw $48, .OAMData_0e ; 13
- dbw $4c, .OAMData_0e ; 14
- dbw $80, .OAMData_15 ; 15
- dbw $85, .OAMData_15 ; 16
- dbw $8a, .OAMData_15 ; 17
- dbw $00, .OAMData_18 ; 18
- dbw $01, .OAMData_19 ; 19
- dbw $09, .OAMData_1a ; 1a
- dbw $10, .OAMData_1b ; 1b
- dbw $29, .OAMData_1b ; 1c
- dbw $42, .OAMData_1b ; 1d
- dbw $f8, .OAMData_1e ; 1e
- dbw $fa, .OAMData_1e ; 1f
- dbw $00, .OAMData_20 ; 20
- dbw $00, .OAMData_21 ; 21
- dbw $00, .OAMData_22 ; 22
- dbw $0f, .OAMData_23 ; 23
- dbw $11, .OAMData_02 ; 24
- dbw $12, .OAMData_02 ; 25
- dbw $13, .OAMData_02 ; 26
- dbw $00, .OAMData_27 ; 27
- dbw $08, .OAMData_27 ; 28
- dbw $10, .OAMData_29 ; 29
- dbw $10, .OAMData_2a ; 2a
- dbw $10, .OAMData_2b ; 2b
- dbw $10, .OAMData_2c ; 2c
- dbw $10, .OAMData_2d ; 2d
- dbw $3a, .OAMData_02 ; 2e
- dbw $00, .OAMData_00 ; 2f
- dbw $00, .OAMData_30 ; 30
- dbw $02, .OAMData_31 ; 31
- dbw $06, .OAMData_19 ; 32
- dbw $0a, .OAMData_19 ; 33
- dbw $0e, .OAMData_19 ; 34
- dbw $12, .OAMData_35 ; 35
- dbw $13, .OAMData_35 ; 36
- dbw $00, .OAMData_00 ; 37
- dbw $04, .OAMData_00 ; 38
- dbw $10, .OAMData_19 ; 39
- dbw $00, .OAMData_31 ; 3a
- dbw $04, .OAMData_02 ; 3b
- dbw $00, .OAMData_3c ; 3c
- dbw $00, .OAMData_3d ; 3d
- dbw $00, .OAMData_3e ; 3e
- dbw $00, .OAMData_3f ; 3f
- dbw $00, .OAMData_40 ; 40
- dbw $00, .OAMData_31 ; 41
- dbw $04, .OAMData_31 ; 42
- dbw $00, .OAMData_43 ; 43
- dbw $30, .OAMData_43 ; 44
- dbw $03, .OAMData_43 ; 45
- dbw $33, .OAMData_43 ; 46
- dbw $06, .OAMData_43 ; 47
- dbw $36, .OAMData_43 ; 48
- dbw $09, .OAMData_43 ; 49
- dbw $39, .OAMData_43 ; 4a
- dbw $0c, .OAMData_4b ; 4b
- dbw $0c, .OAMData_4c ; 4c
- dbw $3c, .OAMData_02 ; 4d
- dbw $3e, .OAMData_02 ; 4e
- dbw $00, .OAMData_4f ; 4f
- dbw $00, .OAMData_50 ; 50
- dbw $00, .OAMData_51 ; 51
- dbw $00, .OAMData_52 ; 52
- dbw $00, .OAMData_53 ; 53
- dbw $00, .OAMData_02 ; 54
- dbw $01, .OAMData_02 ; 55
- dbw $00, .OAMData_56 ; 56
- dbw $00, .OAMData_57 ; 57
- dbw $00, .OAMData_58 ; 58
- dbw $00, .OAMData_59 ; 59
- dbw $00, .OAMData_5a ; 5a
- dbw $04, .OAMData_50 ; 5b
- dbw $00, .OAMData_5c ; 5c
- dbw $00, .OAMData_5d ; 5d
- dbw $00, .OAMData_5e ; 5e
- dbw $00, .OAMData_5f ; 5f
- dbw $00, .OAMData_60 ; 60
- dbw $00, .OAMData_61 ; 61
- dbw $00, .OAMData_62 ; 62
- dbw $00, .OAMData_63 ; 63
- dbw $04, .OAMData_63 ; 64
- dbw $00, .OAMData_65 ; 65
- dbw $04, .OAMData_65 ; 66
- dbw $20, .OAMData_67 ; 67
- dbw $21, .OAMData_67 ; 68
- dbw $22, .OAMData_69 ; 69
- dbw $23, .OAMData_6a ; 6a
- dbw $27, .OAMData_6b ; 6b
- dbw $2a, .OAMData_6c ; 6c
- dbw $2a, .OAMData_6d ; 6d
- dbw $00, .OAMData_6e ; 6e
- dbw $08, .OAMData_6f ; 6f
- dbw $60, .OAMData_70 ; 70
- dbw $68, .OAMData_71 ; 71
- dbw $00, .OAMData_72 ; 72
- dbw $05, .OAMData_72 ; 73
- dbw $0a, .OAMData_72 ; 74
- dbw $50, .OAMData_75 ; 75
- dbw $00, .OAMData_76 ; 76
- dbw $01, .OAMData_77 ; 77
- dbw $04, .OAMData_78 ; 78
- dbw $00, .OAMData_18 ; 79
- dbw $01, .OAMData_7a ; 7a
- dbw $03, .OAMData_7b ; 7b
- dbw $08, .OAMData_7c ; 7c
- dbw $1c, .OAMData_7c ; 7d
- dbw $80, .OAMData_7e ; 7e
- dbw $00, .OAMData_7f ; 7f
- dbw $04, .OAMData_7f ; 80
- dbw $d0, .OAMData_81 ; 81
- dbw $d3, .OAMData_81 ; 82
- dbw $d6, .OAMData_81 ; 83
- dbw $6c, .OAMData_84 ; 84
- dbw $68, .OAMData_84 ; 85
- dbw $64, .OAMData_84 ; 86
- dbw $60, .OAMData_84 ; 87
- dbw $0c, .OAMData_84 ; 88
- dbw $08, .OAMData_84 ; 89
- dbw $04, .OAMData_84 ; 8a
- dbw $00, .OAMData_84 ; 8b
-
-.OAMData_02:
- db 1
- dsprite -1, 4, -1, 4, $00, $00
-
-.OAMData_04:
- db 4
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $01, $00
- dsprite 0, 0, -1, 0, $10, $00
- dsprite 0, 0, 0, 0, $11, $00
-
-.OAMData_23:
- db 4
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $00, $20
- dsprite 0, 0, -1, 0, $01, $00
- dsprite 0, 0, 0, 0, $01, $20
-
-.OAMData_30:
- db 4
- dsprite -1, 0, -1, 0, $00, $80
- dsprite -1, 0, 0, 0, $00, $a0
- dsprite 0, 0, -1, 0, $01, $80
- dsprite 0, 0, 0, 0, $01, $a0
-
-.OAMData_18:
- db 4
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $00, $20
- dsprite 0, 0, -1, 0, $00, $40
- dsprite 0, 0, 0, 0, $00, $60
-
-.OAMData_35:
- db 4
- dsprite -1, 0, -1, 0, $00, $07
- dsprite -1, 0, 0, 0, $00, $27
- dsprite 0, 0, -1, 0, $00, $47
- dsprite 0, 0, 0, 0, $00, $67
-; 8db4b
-
-; 8db4b
- db 4
- dsprite -1, 0, -1, 0, $00, $80
- dsprite -1, 0, 0, 0, $00, $a0
- dsprite 0, 0, -1, 0, $00, $c0
- dsprite 0, 0, 0, 0, $00, $e0
-
-.OAMData_19:
- db 16
- dsprite -2, 0, -2, 0, $00, $00
- dsprite -2, 0, -1, 0, $01, $00
- dsprite -1, 0, -2, 0, $02, $00
- dsprite -1, 0, -1, 0, $03, $00
- dsprite -2, 0, 0, 0, $01, $20
- dsprite -2, 0, 1, 0, $00, $20
- dsprite -1, 0, 0, 0, $03, $20
- dsprite -1, 0, 1, 0, $02, $20
- dsprite 0, 0, -2, 0, $02, $40
- dsprite 0, 0, -1, 0, $03, $40
- dsprite 1, 0, -2, 0, $00, $40
- dsprite 1, 0, -1, 0, $01, $40
- dsprite 0, 0, 0, 0, $03, $60
- dsprite 0, 0, 1, 0, $02, $60
- dsprite 1, 0, 0, 0, $01, $60
- dsprite 1, 0, 1, 0, $00, $60
-
-.OAMData_1a:
- db 36
- dsprite -3, 0, -3, 0, $00, $00
- dsprite -3, 0, -2, 0, $01, $00
- dsprite -3, 0, -1, 0, $02, $00
- dsprite -2, 0, -3, 0, $03, $00
- dsprite -2, 0, -2, 0, $04, $00
- dsprite -2, 0, -1, 0, $05, $00
- dsprite -1, 0, -3, 0, $06, $00
- dsprite -1, 0, -2, 0, $05, $00
- dsprite -1, 0, -1, 0, $05, $00
- dsprite -3, 0, 0, 0, $02, $20
- dsprite -3, 0, 1, 0, $01, $20
- dsprite -3, 0, 2, 0, $00, $20
- dsprite -2, 0, 0, 0, $05, $20
- dsprite -2, 0, 1, 0, $04, $20
- dsprite -2, 0, 2, 0, $03, $20
- dsprite -1, 0, 0, 0, $05, $20
- dsprite -1, 0, 1, 0, $05, $20
- dsprite -1, 0, 2, 0, $06, $20
- dsprite 0, 0, -3, 0, $06, $40
- dsprite 0, 0, -2, 0, $05, $40
- dsprite 0, 0, -1, 0, $05, $40
- dsprite 1, 0, -3, 0, $03, $40
- dsprite 1, 0, -2, 0, $04, $40
- dsprite 1, 0, -1, 0, $05, $40
- dsprite 2, 0, -3, 0, $00, $40
- dsprite 2, 0, -2, 0, $01, $40
- dsprite 2, 0, -1, 0, $02, $40
- dsprite 0, 0, 0, 0, $05, $60
- dsprite 0, 0, 1, 0, $05, $60
- dsprite 0, 0, 2, 0, $06, $60
- dsprite 1, 0, 0, 0, $05, $60
- dsprite 1, 0, 1, 0, $04, $60
- dsprite 1, 0, 2, 0, $03, $60
- dsprite 2, 0, 0, 0, $02, $60
- dsprite 2, 0, 1, 0, $01, $60
- dsprite 2, 0, 2, 0, $00, $60
-
-.OAMData_43:
- db 9
- dsprite -2, 4, -2, 4, $00, $00
- dsprite -2, 4, -1, 4, $01, $00
- dsprite -2, 4, 0, 4, $02, $00
- dsprite -1, 4, -2, 4, $10, $00
- dsprite -1, 4, -1, 4, $11, $00
- dsprite -1, 4, 0, 4, $12, $00
- dsprite 0, 4, -2, 4, $20, $00
- dsprite 0, 4, -1, 4, $21, $00
- dsprite 0, 4, 0, 4, $22, $00
-
-.OAMData_0e:
- db 16
- dsprite -2, 0, -2, 0, $00, $00
- dsprite -2, 0, -1, 0, $01, $00
- dsprite -2, 0, 0, 0, $02, $00
- dsprite -2, 0, 1, 0, $03, $00
- dsprite -1, 0, -2, 0, $10, $00
- dsprite -1, 0, -1, 0, $11, $00
- dsprite -1, 0, 0, 0, $12, $00
- dsprite -1, 0, 1, 0, $13, $00
- dsprite 0, 0, -2, 0, $20, $00
- dsprite 0, 0, -1, 0, $21, $00
- dsprite 0, 0, 0, 0, $22, $00
- dsprite 0, 0, 1, 0, $23, $00
- dsprite 1, 0, -2, 0, $30, $00
- dsprite 1, 0, -1, 0, $31, $00
- dsprite 1, 0, 0, 0, $32, $00
- dsprite 1, 0, 1, 0, $33, $00
-
-.OAMData_1b:
- db 25
- dsprite -3, 4, -3, 4, $00, $00
- dsprite -2, 4, -3, 4, $01, $00
- dsprite -1, 4, -3, 4, $02, $00
- dsprite 0, 4, -3, 4, $03, $00
- dsprite 1, 4, -3, 4, $04, $00
- dsprite -3, 4, -2, 4, $05, $00
- dsprite -2, 4, -2, 4, $06, $00
- dsprite -1, 4, -2, 4, $07, $00
- dsprite 0, 4, -2, 4, $08, $00
- dsprite 1, 4, -2, 4, $09, $00
- dsprite -3, 4, -1, 4, $0a, $00
- dsprite -2, 4, -1, 4, $0b, $00
- dsprite -1, 4, -1, 4, $0c, $00
- dsprite 0, 4, -1, 4, $0d, $00
- dsprite 1, 4, -1, 4, $0e, $00
- dsprite -3, 4, 0, 4, $0f, $00
- dsprite -2, 4, 0, 4, $10, $00
- dsprite -1, 4, 0, 4, $11, $00
- dsprite 0, 4, 0, 4, $12, $00
- dsprite 1, 4, 0, 4, $13, $00
- dsprite -3, 4, 1, 4, $14, $00
- dsprite -2, 4, 1, 4, $15, $00
- dsprite -1, 4, 1, 4, $16, $00
- dsprite 0, 4, 1, 4, $17, $00
- dsprite 1, 4, 1, 4, $18, $00
-; 8dcf9
-
-; 8dcf9
- db 36
- dsprite -3, 0, -3, 0, $00, $00
- dsprite -3, 0, -2, 0, $01, $00
- dsprite -3, 0, -1, 0, $02, $00
- dsprite -3, 0, 0, 0, $03, $00
- dsprite -3, 0, 1, 0, $04, $00
- dsprite -3, 0, 2, 0, $05, $00
- dsprite -2, 0, -3, 0, $06, $00
- dsprite -2, 0, -2, 0, $07, $00
- dsprite -2, 0, -1, 0, $08, $00
- dsprite -2, 0, 0, 0, $09, $00
- dsprite -2, 0, 1, 0, $0a, $00
- dsprite -2, 0, 2, 0, $0b, $00
- dsprite -1, 0, -3, 0, $0c, $00
- dsprite -1, 0, -2, 0, $0d, $00
- dsprite -1, 0, -1, 0, $0e, $00
- dsprite -1, 0, 0, 0, $0f, $00
- dsprite -1, 0, 1, 0, $10, $00
- dsprite -1, 0, 2, 0, $11, $00
- dsprite 0, 0, -3, 0, $12, $00
- dsprite 0, 0, -2, 0, $13, $00
- dsprite 0, 0, -1, 0, $14, $00
- dsprite 0, 0, 0, 0, $15, $00
- dsprite 0, 0, 1, 0, $16, $00
- dsprite 0, 0, 2, 0, $17, $00
- dsprite 1, 0, -3, 0, $18, $00
- dsprite 1, 0, -2, 0, $19, $00
- dsprite 1, 0, -1, 0, $1a, $00
- dsprite 1, 0, 0, 0, $1b, $00
- dsprite 1, 0, 1, 0, $1c, $00
- dsprite 1, 0, 2, 0, $1d, $00
- dsprite 2, 0, -3, 0, $1e, $00
- dsprite 2, 0, -2, 0, $1f, $00
- dsprite 2, 0, -1, 0, $20, $00
- dsprite 2, 0, 0, 0, $21, $00
- dsprite 2, 0, 1, 0, $22, $00
- dsprite 2, 0, 2, 0, $23, $00
-
-.OAMData_00:
-; party menu icons
- db 4
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $01, $00
- dsprite 0, 0, -1, 0, $02, $00
- dsprite 0, 0, 0, 0, $03, $00
-
-.OAMData_31:
- db 4
- dsprite -1, 0, -1, 0, $00, $80
- dsprite -1, 0, 0, 0, $01, $80
- dsprite 0, 0, -1, 0, $02, $80
- dsprite 0, 0, 0, 0, $03, $80
-
-.OAMData_3d:
-; party menu icon with mail, frame 1
- db 4
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $01, $00
- dsprite 0, 0, -1, 0, $08, $00
- dsprite 0, 0, 0, 0, $03, $00
-
-.OAMData_3e:
-; party menu icon with mail, frame 2
- db 4
- dsprite -1, 0, -1, 0, $04, $00
- dsprite -1, 0, 0, 0, $05, $00
- dsprite 0, 0, -1, 0, $08, $00
- dsprite 0, 0, 0, 0, $07, $00
-
-.OAMData_3f:
-; party menu icon with item, frame 1
- db 4
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $01, $00
- dsprite 0, 0, -1, 0, $09, $00
- dsprite 0, 0, 0, 0, $03, $00
-
-.OAMData_40:
-; party menu icon with item, frame 2
- db 4
- dsprite -1, 0, -1, 0, $04, $00
- dsprite -1, 0, 0, 0, $05, $00
- dsprite 0, 0, -1, 0, $09, $00
- dsprite 0, 0, 0, 0, $07, $00
-
-.OAMData_06:
- db 6
- dsprite -1, 0, -2, 4, $00, $01
- dsprite -1, 0, -1, 4, $01, $01
- dsprite -1, 0, 0, 4, $02, $01
- dsprite 0, 0, -2, 4, $10, $01
- dsprite 0, 0, -1, 4, $11, $01
- dsprite 0, 0, 0, 4, $12, $01
-
-.OAMData_08:
- db 29
- dsprite -3, 0, -3, 0, $00, $00
- dsprite -3, 0, -2, 0, $01, $00
- dsprite -3, 0, -1, 0, $02, $00
- dsprite -3, 0, 0, 0, $03, $00
- dsprite -2, 0, -3, 0, $10, $00
- dsprite -2, 0, -2, 0, $11, $00
- dsprite -2, 0, -1, 0, $12, $00
- dsprite -2, 0, 0, 0, $13, $00
- dsprite -1, 0, -3, 0, $20, $00
- dsprite -1, 0, -2, 0, $21, $00
- dsprite -1, 0, -1, 0, $22, $00
- dsprite -1, 0, 0, 0, $23, $00
- dsprite -1, 0, 1, 0, $24, $00
- dsprite 0, 0, -3, 0, $30, $80
- dsprite 0, 0, -2, 0, $31, $80
- dsprite 0, 0, -1, 0, $32, $80
- dsprite 0, 0, 0, 0, $33, $80
- dsprite 0, 0, 1, 0, $34, $80
- dsprite 1, 0, -3, 0, $40, $80
- dsprite 1, 0, -2, 0, $41, $80
- dsprite 1, 0, -1, 0, $42, $80
- dsprite 1, 0, 0, 0, $43, $80
- dsprite 1, 0, 1, 0, $44, $80
- dsprite 1, 0, 2, 0, $45, $80
- dsprite 2, 0, -2, 0, $51, $80
- dsprite 2, 0, -1, 0, $52, $80
- dsprite 2, 0, 0, 0, $53, $80
- dsprite 2, 0, 1, 0, $54, $80
- dsprite 2, 0, 2, 0, $55, $80
-
-.OAMData_0c:
- db 2
- dsprite -1, 0, -1, 4, $00, $00
- dsprite 0, 0, -1, 4, $10, $00
-
-.OAMData_15:
- db 5
- dsprite -2, 0, 3, 0, $00, $00
- dsprite -2, 0, 4, 0, $01, $00
- dsprite -1, 0, 2, 0, $02, $00
- dsprite -1, 0, 3, 0, $03, $00
- dsprite 0, 0, 2, 0, $04, $00
-
-.OAMData_4f:
- db 1
- dsprite -1, 4, -1, 4, $00, $06
-
-.OAMData_50:
- db 4
- dsprite -1, 0, -1, 0, $00, $06
- dsprite -1, 0, 0, 0, $01, $06
- dsprite 0, 0, -1, 0, $02, $06
- dsprite 0, 0, 0, 0, $03, $06
-
-.OAMData_20:
- db 4
- dsprite -1, 7, -1, 7, $00, $00
- dsprite -1, 7, 0, 0, $00, $20
- dsprite 0, 0, -1, 7, $00, $40
- dsprite 0, 0, 0, 0, $00, $60
-
-.OAMData_21:
- db 10
- dsprite -1, 7, 0, 0, $00, $00
- dsprite -1, 7, 1, 0, $01, $00
- dsprite -1, 7, 2, 0, $01, $00
- dsprite -1, 7, 3, 0, $01, $00
- dsprite -1, 7, 4, 0, $00, $20
- dsprite 0, 0, 0, 0, $00, $40
- dsprite 0, 0, 1, 0, $01, $40
- dsprite 0, 0, 2, 0, $01, $40
- dsprite 0, 0, 3, 0, $01, $40
- dsprite 0, 0, 4, 0, $00, $60
-
-.OAMData_22:
- db 15
- dsprite -3, 4, -2, 4, $00, $11
- dsprite -3, 4, -1, 4, $01, $11
- dsprite -3, 4, 0, 4, $02, $11
- dsprite -2, 4, -2, 4, $03, $11
- dsprite -2, 4, -1, 4, $04, $11
- dsprite -2, 4, 0, 4, $05, $11
- dsprite -1, 4, -2, 4, $06, $11
- dsprite -1, 4, -1, 4, $07, $11
- dsprite -1, 4, 0, 4, $08, $11
- dsprite 0, 4, -2, 4, $09, $11
- dsprite 0, 4, -1, 4, $0a, $11
- dsprite 0, 4, 0, 4, $0b, $11
- dsprite 1, 4, -2, 4, $0c, $11
- dsprite 1, 4, -1, 4, $0d, $11
- dsprite 1, 4, 0, 4, $0e, $11
-
-.OAMData_27:
- db 6
- dsprite -2, 4, -2, 4, $00, $15
- dsprite -2, 4, -1, 4, $02, $15
- dsprite -2, 4, 0, 4, $00, $35
- dsprite 0, 4, -2, 4, $04, $15
- dsprite 0, 4, -1, 4, $06, $15
- dsprite 0, 4, 0, 4, $04, $35
-
-.OAMData_29:
- db 6
- dsprite -2, 4, -2, 4, $00, $16
- dsprite -2, 4, -1, 4, $02, $16
- dsprite -2, 4, 0, 4, $04, $16
- dsprite 0, 4, -2, 4, $06, $16
- dsprite 0, 4, -1, 4, $08, $16
- dsprite 0, 4, 0, 4, $0a, $16
-
-.OAMData_2a:
- db 6
- dsprite -2, 4, -2, 4, $00, $16
- dsprite -2, 4, -1, 4, $02, $16
- dsprite -2, 4, 0, 4, $04, $16
- dsprite 0, 4, -2, 4, $0c, $16
- dsprite 0, 4, -1, 4, $0e, $16
- dsprite 0, 4, 0, 4, $10, $16
-
-.OAMData_2b:
- db 6
- dsprite -2, 4, -2, 4, $00, $16
- dsprite -2, 4, -1, 4, $02, $16
- dsprite -2, 4, 0, 4, $04, $16
- dsprite 0, 4, -2, 4, $12, $16
- dsprite 0, 4, -1, 4, $14, $16
- dsprite 0, 4, 0, 4, $16, $16
-
-.OAMData_2c:
- db 6
- dsprite -2, 4, -2, 4, $00, $16
- dsprite -2, 4, -1, 4, $02, $16
- dsprite -2, 4, 0, 4, $04, $16
- dsprite 0, 4, -2, 4, $18, $16
- dsprite 0, 4, -1, 4, $1a, $16
- dsprite 0, 4, 0, 4, $1c, $16
-
-.OAMData_2d:
- db 6
- dsprite -2, 4, -2, 4, $1e, $16
- dsprite -2, 4, -1, 4, $20, $16
- dsprite -2, 4, 0, 4, $22, $16
- dsprite 0, 4, -2, 4, $24, $16
- dsprite 0, 4, -1, 4, $26, $16
- dsprite 0, 4, 0, 4, $28, $16
-
-.OAMData_3c:
- db 3
- dsprite -2, 4, -1, 4, $00, $10
- dsprite -1, 4, -1, 4, $00, $10
- dsprite 0, 4, -1, 4, $00, $10
-
-.OAMData_4b:
- db 6
- dsprite 0, 0, 0, 0, $00, $00
- dsprite 0, 0, 1, 0, $01, $00
- dsprite 0, 0, 2, 0, $01, $00
- dsprite 0, 0, 3, 0, $01, $00
- dsprite 0, 0, 4, 0, $02, $00
- dsprite 0, 0, 5, 0, $03, $00
-
-.OAMData_4c:
- db 4
- dsprite 0, 0, 0, 0, $00, $00
- dsprite 0, 0, 1, 0, $01, $00
- dsprite 0, 0, 2, 0, $02, $00
- dsprite 0, 0, 3, 0, $03, $00
-
-.OAMData_51:
- db 4
- dsprite -1, 0, -2, 6, $00, $06
- dsprite -1, 0, 0, 2, $01, $06
- dsprite 0, 0, -2, 6, $02, $06
- dsprite 0, 0, 0, 2, $03, $06
-
-.OAMData_52:
- db 4
- dsprite -1, 0, -2, 4, $00, $06
- dsprite -1, 0, 0, 4, $01, $06
- dsprite 0, 0, -2, 4, $02, $06
- dsprite 0, 0, 0, 4, $03, $06
-
-.OAMData_53:
- db 4
- dsprite -1, 0, -2, 0, $00, $06
- dsprite -1, 0, 1, 0, $01, $06
- dsprite 0, 0, -2, 0, $02, $06
- dsprite 0, 0, 1, 0, $03, $06
-
-.OAMData_56:
- db 19
- dsprite -1, 0, -4, 0, $00, $00
- dsprite -2, 0, -3, 0, $02, $00
- dsprite 0, 0, -3, 0, $04, $00
- dsprite -3, 0, -2, 0, $06, $00
- dsprite -1, 0, -2, 0, $08, $00
- dsprite 1, 0, -2, 0, $0a, $00
- dsprite -3, 0, -1, 0, $0c, $00
- dsprite -1, 0, -1, 0, $0e, $00
- dsprite 1, 0, -1, 0, $10, $00
- dsprite -3, 0, 0, 0, $12, $00
- dsprite -1, 0, 0, 0, $14, $00
- dsprite 1, 0, 0, 0, $16, $00
- dsprite -3, 0, 1, 0, $18, $00
- dsprite -1, 0, 1, 0, $1a, $00
- dsprite 1, 0, 1, 0, $1c, $00
- dsprite -1, 0, 2, 0, $1e, $00
- dsprite 1, 0, 2, 0, $20, $00
- dsprite -2, 0, 3, 0, $22, $00
- dsprite 0, 0, 3, 0, $24, $00
-
-.OAMData_57:
- db 16
- dsprite -1, 0, -4, 0, $00, $00
- dsprite -2, 0, -3, 0, $02, $00
- dsprite 0, 0, -3, 0, $04, $00
- dsprite -1, 0, -2, 0, $26, $00
- dsprite 1, 0, -2, 0, $0a, $00
- dsprite -3, 0, -1, 0, $28, $00
- dsprite -1, 0, -1, 0, $2a, $00
- dsprite 1, 0, -1, 0, $10, $00
- dsprite -1, 0, 0, 0, $2c, $00
- dsprite 1, 0, 0, 0, $16, $00
- dsprite -1, 0, 1, 0, $30, $00
- dsprite 1, 0, 1, 0, $1c, $00
- dsprite -1, 0, 2, 0, $1e, $00
- dsprite 1, 0, 2, 0, $20, $00
- dsprite -2, 0, 3, 0, $22, $00
- dsprite 0, 0, 3, 0, $24, $00
-
-.OAMData_58:
- db 15
- dsprite -1, 0, -4, 0, $00, $00
- dsprite -2, 0, -3, 0, $02, $00
- dsprite 0, 0, -3, 0, $32, $00
- dsprite -1, 0, -2, 0, $34, $00
- dsprite 1, 0, -2, 0, $36, $00
- dsprite -1, 0, -1, 0, $38, $00
- dsprite 1, 0, -1, 0, $3a, $00
- dsprite -1, 0, 0, 0, $3c, $00
- dsprite 1, 0, 0, 0, $3e, $00
- dsprite -1, 0, 1, 0, $30, $00
- dsprite 1, 0, 1, 0, $1c, $00
- dsprite -1, 0, 2, 0, $1e, $00
- dsprite 1, 0, 2, 0, $20, $00
- dsprite -2, 0, 3, 0, $22, $00
- dsprite 0, 0, 3, 0, $24, $00
-
-.OAMData_59:
- db 17
- dsprite -1, 0, -4, 0, $00, $00
- dsprite -2, 0, -3, 0, $02, $00
- dsprite 0, 0, -3, 0, $04, $00
- dsprite -1, 0, -2, 0, $40, $00
- dsprite 1, 0, -2, 0, $42, $00
- dsprite 3, 0, -2, 0, $44, $00
- dsprite -1, 0, -1, 0, $46, $00
- dsprite 1, 0, -1, 0, $48, $00
- dsprite 3, 0, -1, 0, $4a, $00
- dsprite -1, 0, 0, 0, $4c, $00
- dsprite 1, 0, 0, 0, $4e, $00
- dsprite -1, 0, 1, 0, $30, $00
- dsprite 1, 0, 1, 0, $1c, $00
- dsprite -1, 0, 2, 0, $1e, $00
- dsprite 1, 0, 2, 0, $20, $00
- dsprite -2, 0, 3, 0, $22, $00
- dsprite 0, 0, 3, 0, $24, $00
-
-.OAMData_5a:
- db 17
- dsprite -1, 0, -4, 0, $00, $00
- dsprite -2, 0, -3, 0, $02, $00
- dsprite 0, 0, -3, 0, $04, $00
- dsprite -1, 0, -2, 0, $50, $00
- dsprite 1, 0, -2, 0, $0a, $00
- dsprite -3, 0, -1, 0, $52, $00
- dsprite -1, 0, -1, 0, $54, $00
- dsprite 1, 0, -1, 0, $10, $00
- dsprite -3, 0, 0, 0, $56, $00
- dsprite -1, 0, 0, 0, $2e, $00
- dsprite 1, 0, 0, 0, $16, $00
- dsprite -1, 0, 1, 0, $30, $00
- dsprite 1, 0, 1, 0, $1c, $00
- dsprite -1, 0, 2, 0, $1e, $00
- dsprite 1, 0, 2, 0, $20, $00
- dsprite -2, 0, 3, 0, $22, $00
- dsprite 0, 0, 3, 0, $24, $00
-
-.OAMData_1e:
- db 1
- dsprite -1, 4, -1, 4, $00, $11
-
-.OAMData_5c:
- db 12
- dsprite 0, 0, 0, 0, $30, $00
- dsprite 0, 0, 1, 0, $31, $00
- dsprite 0, 0, 2, 0, $31, $00
- dsprite 0, 0, 3, 0, $31, $00
- dsprite 0, 0, 4, 0, $31, $00
- dsprite 0, 0, 5, 0, $32, $00
- dsprite 1, 0, 0, 0, $33, $00
- dsprite 1, 0, 1, 0, $34, $00
- dsprite 1, 0, 2, 0, $34, $00
- dsprite 1, 0, 3, 0, $34, $00
- dsprite 1, 0, 4, 0, $34, $00
- dsprite 1, 0, 5, 0, $35, $00
-
-.OAMData_5d:
- db 1
- dsprite 0, 0, 0, 0, $ed, $00
-
-.OAMData_5e:
- db 4
- dsprite -1, 7, -1, 7, $30, $00
- dsprite -1, 7, 0, 1, $32, $00
- dsprite 0, 1, -1, 7, $33, $00
- dsprite 0, 1, 0, 1, $35, $00
-
-.OAMData_5f:
- db 8
- dsprite -1, 7, -1, 7, $30, $00
- dsprite -1, 7, 0, 4, $31, $00
- dsprite -1, 7, 1, 4, $31, $00
- dsprite -1, 7, 2, 1, $32, $00
- dsprite 0, 1, -1, 7, $33, $00
- dsprite 0, 1, 0, 4, $34, $00
- dsprite 0, 1, 1, 4, $34, $00
- dsprite 0, 1, 2, 1, $35, $00
-
-.OAMData_60:
- db 1
- dsprite 0, 0, 0, 0, $34, $00
-
-.OAMData_61:
- db 2
- dsprite 0, 0, 0, 0, $30, $00
- dsprite 1, 0, 0, 0, $33, $00
-
-.OAMData_62:
- db 2
- dsprite 0, 0, 0, 0, $32, $00
- dsprite 1, 0, 0, 0, $35, $00
-
-.OAMData_63:
- db 4
- dsprite -1, 0, -1, 0, $00, $01
- dsprite -1, 0, 0, 0, $01, $01
- dsprite 0, 0, -1, 0, $02, $01
- dsprite 0, 0, 0, 0, $03, $01
-
-.OAMData_65:
- db 4
- dsprite -1, 0, -1, 0, $00, $81
- dsprite -1, 0, 0, 0, $01, $81
- dsprite 0, 0, -1, 0, $02, $81
- dsprite 0, 0, 0, 0, $03, $81
-
-.OAMData_67:
- db 1
- dsprite -1, 4, -1, 4, $00, $02
-
-.OAMData_6c:
- db 4
- dsprite -2, 0, -1, 4, $00, $03
- dsprite -1, 0, -1, 4, $01, $03
- dsprite 0, 0, -1, 4, $02, $03
- dsprite 1, 0, -1, 4, $03, $03
-
-.OAMData_6d:
- db 4
- dsprite -2, 0, -1, 4, $03, $44
- dsprite -1, 0, -1, 4, $02, $44
- dsprite 0, 0, -1, 4, $01, $44
- dsprite 1, 0, -1, 4, $00, $44
-
-.OAMData_69:
- db 4
- dsprite -1, 0, -1, 0, $00, $01
- dsprite -1, 0, 0, 0, $00, $21
- dsprite 0, 0, -1, 0, $00, $41
- dsprite 0, 0, 0, 0, $00, $61
-
-.OAMData_6a:
- db 8
- dsprite -2, 4, -2, 4, $00, $01
- dsprite -2, 4, -1, 4, $01, $01
- dsprite -2, 4, 0, 4, $00, $21
- dsprite -1, 4, -2, 4, $02, $01
- dsprite -1, 4, 0, 4, $02, $21
- dsprite 0, 4, -2, 4, $00, $41
- dsprite 0, 4, -1, 4, $01, $41
- dsprite 0, 4, 0, 4, $00, $61
-
-.OAMData_6b:
- db 12
- dsprite -2, 0, -2, 0, $00, $01
- dsprite -2, 0, -1, 0, $01, $01
- dsprite -1, 0, -2, 0, $02, $01
- dsprite -2, 0, 0, 0, $01, $21
- dsprite -2, 0, 1, 0, $00, $21
- dsprite -1, 0, 1, 0, $02, $21
- dsprite 0, 0, -2, 0, $02, $41
- dsprite 1, 0, -2, 0, $00, $41
- dsprite 1, 0, -1, 0, $01, $41
- dsprite 0, 0, 1, 0, $02, $61
- dsprite 1, 0, 0, 0, $01, $61
- dsprite 1, 0, 1, 0, $00, $61
-
-.OAMData_6e:
- db 36
- dsprite -3, 0, 1, 0, $05, $00
- dsprite -3, 0, 2, 0, $06, $00
- dsprite -3, 0, 3, 0, $07, $00
- dsprite -2, 0, -3, 0, $11, $00
- dsprite -2, 0, -2, 0, $12, $00
- dsprite -2, 0, -1, 0, $13, $00
- dsprite -2, 0, 0, 0, $14, $00
- dsprite -2, 0, 1, 0, $15, $00
- dsprite -2, 0, 2, 0, $16, $00
- dsprite -2, 0, 3, 0, $17, $00
- dsprite -1, 0, -4, 0, $20, $00
- dsprite -1, 0, -3, 0, $21, $00
- dsprite -1, 0, -2, 0, $22, $00
- dsprite -1, 0, -1, 0, $23, $00
- dsprite -1, 0, 0, 0, $24, $00
- dsprite -1, 0, 1, 0, $25, $00
- dsprite -1, 0, 2, 0, $26, $00
- dsprite -1, 0, 3, 0, $27, $00
- dsprite 0, 0, -4, 0, $30, $00
- dsprite 0, 0, -3, 0, $31, $00
- dsprite 0, 0, -2, 0, $32, $00
- dsprite 0, 0, -1, 0, $33, $00
- dsprite 0, 0, 0, 0, $34, $00
- dsprite 0, 0, 1, 0, $35, $00
- dsprite 0, 0, 2, 0, $36, $00
- dsprite 1, 0, -4, 0, $40, $00
- dsprite 1, 0, -3, 0, $41, $00
- dsprite 1, 0, -2, 0, $42, $00
- dsprite 1, 0, -1, 0, $43, $00
- dsprite 1, 0, 0, 0, $44, $00
- dsprite 1, 0, 1, 0, $45, $00
- dsprite 1, 0, 2, 0, $46, $00
- dsprite 1, 0, 3, 0, $47, $00
- dsprite 2, 0, -4, 0, $50, $00
- dsprite 2, 0, -3, 0, $51, $00
- dsprite 2, 0, 3, 0, $57, $00
-
-.OAMData_6f:
- db 28
- dsprite -3, 0, 0, 0, $04, $00
- dsprite -3, 0, 1, 0, $05, $00
- dsprite -3, 0, 2, 0, $06, $00
- dsprite -2, 0, -3, 0, $11, $00
- dsprite -2, 0, -2, 0, $12, $00
- dsprite -2, 0, -1, 0, $13, $00
- dsprite -2, 0, 0, 0, $14, $00
- dsprite -2, 0, 1, 0, $15, $00
- dsprite -2, 0, 2, 0, $16, $00
- dsprite -1, 0, -3, 0, $21, $00
- dsprite -1, 0, -2, 0, $22, $00
- dsprite -1, 0, -1, 0, $23, $00
- dsprite -1, 0, 0, 0, $24, $00
- dsprite -1, 0, 1, 0, $25, $00
- dsprite -1, 0, 2, 0, $26, $00
- dsprite 0, 0, -4, 0, $30, $00
- dsprite 0, 0, -3, 0, $31, $00
- dsprite 0, 0, -2, 0, $32, $00
- dsprite 0, 0, -1, 0, $33, $00
- dsprite 0, 0, 0, 0, $34, $00
- dsprite 0, 0, 1, 0, $35, $00
- dsprite 1, 0, -2, 0, $42, $00
- dsprite 1, 0, -1, 0, $43, $00
- dsprite 1, 0, 0, 0, $44, $00
- dsprite 1, 0, 1, 0, $45, $00
- dsprite 2, 0, -1, 0, $53, $00
- dsprite 2, 0, 0, 0, $54, $00
- dsprite 2, 0, 1, 0, $55, $00
-
-.OAMData_70:
- db 30
- dsprite -3, 0, 0, 0, $04, $00
- dsprite -3, 0, 1, 0, $05, $00
- dsprite -2, 0, -3, 0, $11, $00
- dsprite -2, 0, -2, 0, $12, $00
- dsprite -2, 0, -1, 0, $13, $00
- dsprite -2, 0, 0, 0, $14, $00
- dsprite -2, 0, 1, 0, $15, $00
- dsprite -2, 0, 2, 0, $16, $00
- dsprite -2, 0, 3, 0, $17, $00
- dsprite -1, 0, -4, 0, $20, $00
- dsprite -1, 0, -3, 0, $21, $00
- dsprite -1, 0, -2, 0, $22, $00
- dsprite -1, 0, -1, 0, $23, $00
- dsprite -1, 0, 0, 0, $24, $00
- dsprite -1, 0, 1, 0, $25, $00
- dsprite -1, 0, 2, 0, $26, $00
- dsprite 0, 0, -4, 0, $30, $00
- dsprite 0, 0, -3, 0, $31, $00
- dsprite 0, 0, -2, 0, $32, $00
- dsprite 0, 0, -1, 0, $33, $00
- dsprite 0, 0, 0, 0, $34, $00
- dsprite 0, 0, 1, 0, $35, $00
- dsprite 1, 0, -2, 0, $42, $00
- dsprite 1, 0, -1, 0, $43, $00
- dsprite 1, 0, 0, 0, $44, $00
- dsprite 1, 0, 1, 0, $45, $00
- dsprite 2, 0, -2, 0, $52, $00
- dsprite 2, 0, -1, 0, $53, $00
- dsprite 2, 0, 0, 0, $54, $00
- dsprite 2, 0, 1, 0, $55, $00
-
-.OAMData_71:
- db 31
- dsprite -2, 0, -3, 0, $11, $00
- dsprite -2, 0, -2, 0, $12, $00
- dsprite -2, 0, -1, 0, $13, $00
- dsprite -2, 0, 0, 0, $14, $00
- dsprite -2, 0, 1, 0, $15, $00
- dsprite -2, 0, 2, 0, $16, $00
- dsprite -2, 0, 3, 0, $17, $00
- dsprite -1, 0, -4, 0, $20, $00
- dsprite -1, 0, -3, 0, $21, $00
- dsprite -1, 0, -2, 0, $22, $00
- dsprite -1, 0, -1, 0, $23, $00
- dsprite -1, 0, 0, 0, $24, $00
- dsprite -1, 0, 1, 0, $25, $00
- dsprite -1, 0, 2, 0, $26, $00
- dsprite -1, 0, 3, 0, $27, $00
- dsprite 0, 0, -4, 0, $30, $00
- dsprite 0, 0, -3, 0, $31, $00
- dsprite 0, 0, -2, 0, $32, $00
- dsprite 0, 0, -1, 0, $33, $00
- dsprite 0, 0, 0, 0, $34, $00
- dsprite 0, 0, 1, 0, $35, $00
- dsprite 0, 0, 2, 0, $36, $00
- dsprite 1, 0, -3, 0, $41, $00
- dsprite 1, 0, -2, 0, $42, $00
- dsprite 1, 0, -1, 0, $43, $00
- dsprite 1, 0, 0, 0, $44, $00
- dsprite 1, 0, 1, 0, $45, $00
- dsprite 2, 0, -3, 0, $51, $00
- dsprite 2, 0, -2, 0, $52, $00
- dsprite 2, 0, 0, 0, $54, $00
- dsprite 2, 0, 1, 0, $55, $00
-
-.OAMData_72:
- db 25
- dsprite -3, 4, -3, 4, $00, $09
- dsprite -3, 4, -2, 4, $01, $09
- dsprite -3, 4, -1, 4, $02, $09
- dsprite -3, 4, 0, 4, $03, $09
- dsprite -3, 4, 1, 4, $04, $09
- dsprite -2, 4, -3, 4, $10, $09
- dsprite -2, 4, -2, 4, $11, $09
- dsprite -2, 4, -1, 4, $12, $09
- dsprite -2, 4, 0, 4, $13, $09
- dsprite -2, 4, 1, 4, $14, $09
- dsprite -1, 4, -3, 4, $20, $09
- dsprite -1, 4, -2, 4, $21, $09
- dsprite -1, 4, -1, 4, $22, $09
- dsprite -1, 4, 0, 4, $23, $09
- dsprite -1, 4, 1, 4, $24, $09
- dsprite 0, 4, -3, 4, $30, $09
- dsprite 0, 4, -2, 4, $31, $09
- dsprite 0, 4, -1, 4, $32, $09
- dsprite 0, 4, 0, 4, $33, $09
- dsprite 0, 4, 1, 4, $34, $09
- dsprite 1, 4, -3, 4, $40, $09
- dsprite 1, 4, -2, 4, $41, $09
- dsprite 1, 4, -1, 4, $42, $09
- dsprite 1, 4, 0, 4, $43, $09
- dsprite 1, 4, 1, 4, $44, $09
-
-.OAMData_75:
- db 16
- dsprite -2, 0, -3, 4, $00, $0a
- dsprite -2, 0, -2, 4, $01, $0a
- dsprite -2, 0, -1, 4, $02, $0a
- dsprite -2, 0, 0, 4, $03, $0a
- dsprite -1, 0, -3, 4, $04, $0a
- dsprite -1, 0, -2, 4, $05, $0a
- dsprite -1, 0, -1, 4, $06, $0a
- dsprite -1, 0, 0, 4, $07, $0a
- dsprite 0, 0, -3, 4, $08, $0a
- dsprite 0, 0, -2, 4, $09, $0a
- dsprite 0, 0, -1, 4, $0a, $0a
- dsprite 0, 0, 0, 4, $0b, $0a
- dsprite 1, 0, -3, 4, $0c, $0a
- dsprite 1, 0, -2, 4, $0d, $0a
- dsprite 1, 0, -1, 4, $0e, $0a
- dsprite 1, 0, 0, 4, $0f, $0a
-
-.OAMData_76:
- db 1
- dsprite -1, 4, -1, 4, $00, $00
-
-.OAMData_77:
- db 3
- dsprite 0, 0, -1, 0, $00, $00
- dsprite -1, 0, -1, 0, $01, $00
- dsprite -1, 0, 0, 0, $02, $00
-
-.OAMData_78:
- db 7
- dsprite 1, 0, -2, 0, $00, $00
- dsprite 0, 0, -2, 0, $01, $00
- dsprite -1, 0, -2, 0, $02, $00
- dsprite -1, 0, -1, 0, $03, $00
- dsprite -2, 0, -1, 0, $04, $00
- dsprite -2, 0, 0, 0, $05, $00
- dsprite -2, 0, 1, 0, $06, $00
-
-.OAMData_7a:
- db 8
- dsprite -1, 0, -2, 0, $00, $00
- dsprite -1, 0, -1, 0, $01, $00
- dsprite -1, 0, 0, 0, $01, $20
- dsprite -1, 0, 1, 0, $00, $20
- dsprite 0, 0, -2, 0, $00, $40
- dsprite 0, 0, -1, 0, $01, $40
- dsprite 0, 0, 0, 0, $01, $60
- dsprite 0, 0, 1, 0, $00, $60
-
-.OAMData_7b:
- db 12
- dsprite -3, 0, -1, 0, $00, $00
- dsprite -2, 0, -1, 0, $01, $00
- dsprite -1, 0, -1, 0, $02, $00
- dsprite -3, 0, 0, 0, $00, $20
- dsprite -2, 0, 0, 0, $01, $20
- dsprite -1, 0, 0, 0, $02, $20
- dsprite 0, 0, -1, 0, $02, $40
- dsprite 1, 0, -1, 0, $01, $40
- dsprite 2, 0, -1, 0, $00, $40
- dsprite 0, 0, 0, 0, $02, $60
- dsprite 1, 0, 0, 0, $01, $60
- dsprite 2, 0, 0, 0, $00, $60
-
-.OAMData_7c:
- db 20
- dsprite -3, 4, -2, 0, $00, $00
- dsprite -3, 4, -1, 0, $01, $00
- dsprite -3, 4, 0, 0, $02, $00
- dsprite -3, 4, 1, 0, $03, $00
- dsprite -2, 4, -2, 0, $04, $00
- dsprite -2, 4, -1, 0, $05, $00
- dsprite -2, 4, 0, 0, $06, $00
- dsprite -2, 4, 1, 0, $07, $00
- dsprite -1, 4, -2, 0, $08, $00
- dsprite -1, 4, -1, 0, $09, $00
- dsprite -1, 4, 0, 0, $0a, $00
- dsprite -1, 4, 1, 0, $0b, $00
- dsprite 0, 4, -2, 0, $0c, $00
- dsprite 0, 4, -1, 0, $0d, $00
- dsprite 0, 4, 0, 0, $0e, $00
- dsprite 0, 4, 1, 0, $0f, $00
- dsprite 1, 4, -2, 0, $10, $00
- dsprite 1, 4, -1, 0, $11, $00
- dsprite 1, 4, 0, 0, $12, $00
- dsprite 1, 4, 1, 0, $13, $00
-
-.OAMData_7e:
- db 20
- dsprite 0, 0, 1, 0, $00, $81
- dsprite 1, 0, 2, 0, $00, $81
- dsprite 2, 0, 3, 0, $00, $81
- dsprite 3, 0, 4, 0, $00, $81
- dsprite 4, 0, 5, 0, $00, $81
- dsprite 3, 0, 6, 0, $00, $81
- dsprite 2, 0, 7, 0, $00, $81
- dsprite 1, 0, 8, 0, $00, $81
- dsprite 0, 0, 9, 0, $00, $81
- dsprite 1, 0, 10, 0, $00, $81
- dsprite 2, 0, 11, 0, $00, $81
- dsprite 3, 0, 12, 0, $00, $81
- dsprite 4, 0, 13, 0, $00, $81
- dsprite 3, 0, 14, 0, $00, $81
- dsprite 2, 0, 15, 0, $00, $81
- dsprite 1, 0, 16, 0, $00, $81
- dsprite 0, 0, -15, 0, $00, $81
- dsprite 1, 0, -14, 0, $00, $81
- dsprite 2, 0, -13, 0, $00, $81
- dsprite 3, 0, -12, 0, $00, $81
-
-.OAMData_7f:
- db 4
- dsprite -1, 0, -1, 0, $00, $02
- dsprite -1, 0, 0, 0, $01, $02
- dsprite 0, 0, -1, 0, $02, $02
- dsprite 0, 0, 0, 0, $03, $02
-
-.OAMData_81:
- db 9
- dsprite -2, 0, -2, 4, $00, $01
- dsprite -2, 0, -1, 4, $01, $01
- dsprite -2, 0, 0, 4, $02, $01
- dsprite -1, 0, -2, 4, $10, $01
- dsprite -1, 0, -1, 4, $11, $01
- dsprite -1, 0, 0, 4, $12, $01
- dsprite 0, 0, -2, 4, $20, $01
- dsprite 0, 0, -1, 4, $21, $01
- dsprite 0, 0, 0, 4, $22, $01
-
-.OAMData_84:
- db 24
- dsprite -5, 0, -2, 4, $00, $01
- dsprite -5, 0, -1, 4, $01, $01
- dsprite -5, 0, 0, 4, $02, $01
- dsprite -5, 0, 1, 4, $03, $01
- dsprite -4, 0, -2, 4, $10, $01
- dsprite -4, 0, -1, 4, $11, $01
- dsprite -4, 0, 0, 4, $12, $01
- dsprite -4, 0, 1, 4, $13, $01
- dsprite -3, 0, -2, 4, $20, $01
- dsprite -3, 0, -1, 4, $21, $01
- dsprite -3, 0, 0, 4, $22, $01
- dsprite -3, 0, 1, 4, $23, $01
- dsprite -2, 0, -2, 4, $30, $01
- dsprite -2, 0, -1, 4, $31, $01
- dsprite -2, 0, 0, 4, $32, $01
- dsprite -2, 0, 1, 4, $33, $01
- dsprite -1, 0, -2, 4, $40, $01
- dsprite -1, 0, -1, 4, $41, $01
- dsprite -1, 0, 0, 4, $42, $01
- dsprite -1, 0, 1, 4, $43, $01
- dsprite 0, 0, -2, 4, $50, $01
- dsprite 0, 0, -1, 4, $51, $01
- dsprite 0, 0, 0, 4, $52, $01
- dsprite 0, 0, 1, 4, $53, $01
-; 8e706
-BrokenStdGFXPointers: ; Broken 2bpp pointers
- dbbw $80, $01, .deleted ; 128-tile 2bpp at 1:672a (inside Multiply)
- dbbw $80, $01, .deleted
- dbbw $80, $01, .deleted
- dbbw $80, $01, .deleted
- dbbw $10, $37, .deleted ; 16-tile 2bpp at 37:672a (within Tileset11GFX)
- dbbw $10, $11, .deleted ; 16-tile 2bpp at 11:672a (empty data)
- dbbw $10, $39, .deleted ; 16-tile 2bpp at 39:672a (empty data)
- dbbw $10, $24, .deleted ; 16-tile 2bpp at 24:672a (inside Function926f7)
- dbbw $10, $21, .deleted ; 16-tile 2bpp at 21:672a (inside Function8671c)
-
-.deleted
-; 8e72a (23:672a)
diff --git a/data/sprite_mons.asm b/data/sprite_mons.asm
new file mode 100644
index 000000000..d3000e2b7
--- /dev/null
+++ b/data/sprite_mons.asm
@@ -0,0 +1,38 @@
+SpriteMons: ; 14495
+; entries correspond to SPRITE_* constants past SPRITE_POKEMON
+ db UNOWN
+ db GEODUDE
+ db GROWLITHE
+ db WEEDLE
+ db SHELLDER
+ db ODDISH
+ db GENGAR
+ db ZUBAT
+ db MAGIKARP
+ db SQUIRTLE
+ db TOGEPI
+ db BUTTERFREE
+ db DIGLETT
+ db POLIWAG
+ db PIKACHU
+ db CLEFAIRY
+ db CHARMANDER
+ db JYNX
+ db STARMIE
+ db BULBASAUR
+ db JIGGLYPUFF
+ db GRIMER
+ db EKANS
+ db PARAS
+ db TENTACOOL
+ db TAUROS
+ db MACHOP
+ db VOLTORB
+ db LAPRAS
+ db RHYDON
+ db MOLTRES
+ db SNORLAX
+ db GYARADOS
+ db LUGIA
+ db HO_OH
+; 144b8
diff --git a/data/text_buffers.asm b/data/text_buffers.asm
new file mode 100644
index 000000000..5a03c8cc7
--- /dev/null
+++ b/data/text_buffers.asm
@@ -0,0 +1,9 @@
+StringBufferPointers:: ; 24000
+; entries correspond to arguments for text_buffer (TX_STRINGBUFFER)
+ dw StringBuffer3 ; 0
+ dw StringBuffer4 ; 1
+ dw StringBuffer5 ; 2
+ dw StringBuffer2 ; 3
+ dw StringBuffer1 ; 4
+ dw EnemyMonNick ; 5
+ dw BattleMonNick ; 6
diff --git a/data/time_capsule/catch_rate_items.asm b/data/time_capsule/catch_rate_items.asm
new file mode 100644
index 000000000..fbab7d434
--- /dev/null
+++ b/data/time_capsule/catch_rate_items.asm
@@ -0,0 +1,19 @@
+; Pokémon traded from RBY do not have held items, so GSC usually interprets the
+; catch rate as an item. However, if the catch rate appears in this table, the
+; item associated with the table entry is used instead.
+
+TimeCapsule_CatchRateItems: ; 28785
+ db ITEM_19, LEFTOVERS
+ db ITEM_2D, BITTER_BERRY
+ db ITEM_32, GOLD_BERRY
+ db ITEM_5A, BERRY
+ db ITEM_64, BERRY
+ db ITEM_78, BERRY
+ db ITEM_87, BERRY
+ db ITEM_BE, BERRY
+ db ITEM_C3, BERRY
+ db ITEM_DC, BERRY
+ db ITEM_FA, BERRY
+ db -1, BERRY
+ db 0 ; end
+; 2879e
diff --git a/data/time_capsule/mon_order.asm b/data/time_capsule/mon_order.asm
new file mode 100644
index 000000000..e40ba0273
--- /dev/null
+++ b/data/time_capsule/mon_order.asm
@@ -0,0 +1,255 @@
+Pokered_MonIndices: ; fb91c
+ db RHYDON
+ db KANGASKHAN
+ db NIDORAN_M
+ db CLEFAIRY
+ db SPEAROW
+ db VOLTORB
+ db NIDOKING
+ db SLOWBRO
+ db IVYSAUR
+ db EXEGGUTOR
+ db LICKITUNG
+ db EXEGGCUTE
+ db GRIMER
+ db GENGAR
+ db NIDORAN_F
+ db NIDOQUEEN
+ db CUBONE
+ db RHYHORN
+ db LAPRAS
+ db ARCANINE
+ db MEW
+ db GYARADOS
+ db SHELLDER
+ db TENTACOOL
+ db GASTLY
+ db SCYTHER
+ db STARYU
+ db BLASTOISE
+ db PINSIR
+ db TANGELA
+ db SCIZOR ; MISSINGNO.
+ db SHUCKLE ; MISSINGNO.
+ db GROWLITHE
+ db ONIX
+ db FEAROW
+ db PIDGEY
+ db SLOWPOKE
+ db KADABRA
+ db GRAVELER
+ db CHANSEY
+ db MACHOKE
+ db MR__MIME
+ db HITMONLEE
+ db HITMONCHAN
+ db ARBOK
+ db PARASECT
+ db PSYDUCK
+ db DROWZEE
+ db GOLEM
+ db HERACROSS ; MISSINGNO.
+ db MAGMAR
+ db HO_OH ; MISSINGNO.
+ db ELECTABUZZ
+ db MAGNETON
+ db KOFFING
+ db SNEASEL ; MISSINGNO.
+ db MANKEY
+ db SEEL
+ db DIGLETT
+ db TAUROS
+ db TEDDIURSA ; MISSINGNO.
+ db URSARING ; MISSINGNO.
+ db SLUGMA ; MISSINGNO.
+ db FARFETCH_D
+ db VENONAT
+ db DRAGONITE
+ db MAGCARGO ; MISSINGNO.
+ db SWINUB ; MISSINGNO.
+ db PILOSWINE ; MISSINGNO.
+ db DODUO
+ db POLIWAG
+ db JYNX
+ db MOLTRES
+ db ARTICUNO
+ db ZAPDOS
+ db DITTO
+ db MEOWTH
+ db KRABBY
+ db CORSOLA ; MISSINGNO.
+ db REMORAID ; MISSINGNO.
+ db OCTILLERY ; MISSINGNO.
+ db VULPIX
+ db NINETALES
+ db PIKACHU
+ db RAICHU
+ db DELIBIRD ; MISSINGNO.
+ db MANTINE ; MISSINGNO.
+ db DRATINI
+ db DRAGONAIR
+ db KABUTO
+ db KABUTOPS
+ db HORSEA
+ db SEADRA
+ db SKARMORY ; MISSINGNO.
+ db HOUNDOUR ; MISSINGNO.
+ db SANDSHREW
+ db SANDSLASH
+ db OMANYTE
+ db OMASTAR
+ db JIGGLYPUFF
+ db WIGGLYTUFF
+ db EEVEE
+ db FLAREON
+ db JOLTEON
+ db VAPOREON
+ db MACHOP
+ db ZUBAT
+ db EKANS
+ db PARAS
+ db POLIWHIRL
+ db POLIWRATH
+ db WEEDLE
+ db KAKUNA
+ db BEEDRILL
+ db HOUNDOOM ; MISSINGNO.
+ db DODRIO
+ db PRIMEAPE
+ db DUGTRIO
+ db VENOMOTH
+ db DEWGONG
+ db KINGDRA ; MISSINGNO.
+ db PHANPY ; MISSINGNO.
+ db CATERPIE
+ db METAPOD
+ db BUTTERFREE
+ db MACHAMP
+ db DONPHAN ; MISSINGNO.
+ db GOLDUCK
+ db HYPNO
+ db GOLBAT
+ db MEWTWO
+ db SNORLAX
+ db MAGIKARP
+ db PORYGON2 ; MISSINGNO.
+ db STANTLER ; MISSINGNO.
+ db MUK
+ db SMEARGLE ; MISSINGNO.
+ db KINGLER
+ db CLOYSTER
+ db TYROGUE ; MISSINGNO.
+ db ELECTRODE
+ db CLEFABLE
+ db WEEZING
+ db PERSIAN
+ db MAROWAK
+ db HITMONTOP ; MISSINGNO.
+ db HAUNTER
+ db ABRA
+ db ALAKAZAM
+ db PIDGEOTTO
+ db PIDGEOT
+ db STARMIE
+ db BULBASAUR
+ db VENUSAUR
+ db TENTACRUEL
+ db SMOOCHUM ; MISSINGNO.
+ db GOLDEEN
+ db SEAKING
+ db ELEKID ; MISSINGNO.
+ db MAGBY ; MISSINGNO.
+ db MILTANK ; MISSINGNO.
+ db BLISSEY ; MISSINGNO.
+ db PONYTA
+ db RAPIDASH
+ db RATTATA
+ db RATICATE
+ db NIDORINO
+ db NIDORINA
+ db GEODUDE
+ db PORYGON
+ db AERODACTYL
+ db RAIKOU ; MISSINGNO.
+ db MAGNEMITE
+ db ENTEI ; MISSINGNO.
+ db SUICUNE ; MISSINGNO.
+ db CHARMANDER
+ db SQUIRTLE
+ db CHARMELEON
+ db WARTORTLE
+ db CHARIZARD
+ db LARVITAR ; MISSINGNO.
+ db PUPITAR ; MISSINGNO. KABUTOPS FOSSIL
+ db TYRANITAR ; MISSINGNO. AERODACTYL FOSSIL
+ db LUGIA ; MISSINGNO. GHOST
+ db ODDISH
+ db GLOOM
+ db VILEPLUME
+ db BELLSPROUT
+ db WEEPINBELL
+ db VICTREEBEL
+
+ db CHIKORITA
+ db BAYLEEF
+ db MEGANIUM
+ db CYNDAQUIL
+ db QUILAVA
+ db TYPHLOSION
+ db TOTODILE
+ db CROCONAW
+ db FERALIGATR
+ db SENTRET
+ db FURRET
+ db HOOTHOOT
+ db NOCTOWL
+ db LEDYBA
+ db LEDIAN
+ db SPINARAK
+ db ARIADOS
+ db CROBAT
+ db CHINCHOU
+ db LANTURN
+ db PICHU
+ db CLEFFA
+ db IGGLYBUFF
+ db TOGEPI
+ db TOGETIC
+ db NATU
+ db XATU
+ db MAREEP
+ db FLAAFFY
+ db AMPHAROS
+ db BELLOSSOM
+ db MARILL
+ db AZUMARILL
+ db SUDOWOODO
+ db POLITOED
+ db HOPPIP
+ db SKIPLOOM
+ db JUMPLUFF
+ db AIPOM
+ db SUNKERN
+ db SUNFLORA
+ db YANMA
+ db WOOPER
+ db QUAGSIRE
+ db ESPEON
+ db UMBREON
+ db MURKROW
+ db SLOWKING
+ db MISDREAVUS
+ db UNOWN
+ db WOBBUFFET
+ db GIRAFARIG
+ db PINECO
+ db FORRETRESS
+ db DUNSPARCE
+ db GLIGAR
+ db STEELIX
+ db SNUBBULL
+ db GRANBULL
+ db QWILFISH
+ db WOBBUFFET
+ db WOBBUFFET
+; fba18
diff --git a/data/time_capsule/special_stats.asm b/data/time_capsule/special_stats.asm
new file mode 100644
index 000000000..9998692ab
--- /dev/null
+++ b/data/time_capsule/special_stats.asm
@@ -0,0 +1,155 @@
+; The original base Special stat for each Pokémon from Red/Blue
+
+KantoMonSpecials: ; fb656
+ db 65 ; BULBASAUR
+ db 80 ; IVYSAUR
+ db 100 ; VENUSAUR
+ db 50 ; CHARMANDER
+ db 65 ; CHARMELEON
+ db 85 ; CHARIZARD
+ db 50 ; SQUIRTLE
+ db 65 ; WARTORTLE
+ db 85 ; BLASTOISE
+ db 20 ; CATERPIE
+ db 25 ; METAPOD
+ db 80 ; BUTTERFREE
+ db 20 ; WEEDLE
+ db 25 ; KAKUNA
+ db 45 ; BEEDRILL
+ db 35 ; PIDGEY
+ db 50 ; PIDGEOTTO
+ db 70 ; PIDGEOT
+ db 25 ; RATTATA
+ db 50 ; RATICATE
+ db 31 ; SPEAROW
+ db 61 ; FEAROW
+ db 40 ; EKANS
+ db 65 ; ARBOK
+ db 50 ; PIKACHU
+ db 90 ; RAICHU
+ db 30 ; SANDSHREW
+ db 55 ; SANDSLASH
+ db 40 ; NIDORAN_F
+ db 55 ; NIDORINA
+ db 75 ; NIDOQUEEN
+ db 40 ; NIDORAN_M
+ db 55 ; NIDORINO
+ db 75 ; NIDOKING
+ db 60 ; CLEFAIRY
+ db 85 ; CLEFABLE
+ db 65 ; VULPIX
+ db 100 ; NINETALES
+ db 25 ; JIGGLYPUFF
+ db 50 ; WIGGLYTUFF
+ db 40 ; ZUBAT
+ db 75 ; GOLBAT
+ db 75 ; ODDISH
+ db 85 ; GLOOM
+ db 100 ; VILEPLUME
+ db 55 ; PARAS
+ db 80 ; PARASECT
+ db 40 ; VENONAT
+ db 90 ; VENOMOTH
+ db 45 ; DIGLETT
+ db 70 ; DUGTRIO
+ db 40 ; MEOWTH
+ db 65 ; PERSIAN
+ db 50 ; PSYDUCK
+ db 80 ; GOLDUCK
+ db 35 ; MANKEY
+ db 60 ; PRIMEAPE
+ db 50 ; GROWLITHE
+ db 80 ; ARCANINE
+ db 40 ; POLIWAG
+ db 50 ; POLIWHIRL
+ db 70 ; POLIWRATH
+ db 105 ; ABRA
+ db 120 ; KADABRA
+ db 135 ; ALAKAZAM
+ db 35 ; MACHOP
+ db 50 ; MACHOKE
+ db 65 ; MACHAMP
+ db 70 ; BELLSPROUT
+ db 85 ; WEEPINBELL
+ db 100 ; VICTREEBEL
+ db 100 ; TENTACOOL
+ db 120 ; TENTACRUEL
+ db 30 ; GEODUDE
+ db 45 ; GRAVELER
+ db 55 ; GOLEM
+ db 65 ; PONYTA
+ db 80 ; RAPIDASH
+ db 40 ; SLOWPOKE
+ db 80 ; SLOWBRO
+ db 95 ; MAGNEMITE
+ db 120 ; MAGNETON
+ db 58 ; FARFETCH_D
+ db 35 ; DODUO
+ db 60 ; DODRIO
+ db 70 ; SEEL
+ db 95 ; DEWGONG
+ db 40 ; GRIMER
+ db 65 ; MUK
+ db 45 ; SHELLDER
+ db 85 ; CLOYSTER
+ db 100 ; GASTLY
+ db 115 ; HAUNTER
+ db 130 ; GENGAR
+ db 30 ; ONIX
+ db 90 ; DROWZEE
+ db 115 ; HYPNO
+ db 25 ; KRABBY
+ db 50 ; KINGLER
+ db 55 ; VOLTORB
+ db 80 ; ELECTRODE
+ db 60 ; EXEGGCUTE
+ db 125 ; EXEGGUTOR
+ db 40 ; CUBONE
+ db 50 ; MAROWAK
+ db 35 ; HITMONLEE
+ db 35 ; HITMONCHAN
+ db 60 ; LICKITUNG
+ db 60 ; KOFFING
+ db 85 ; WEEZING
+ db 30 ; RHYHORN
+ db 45 ; RHYDON
+ db 105 ; CHANSEY
+ db 100 ; TANGELA
+ db 40 ; KANGASKHAN
+ db 70 ; HORSEA
+ db 95 ; SEADRA
+ db 50 ; GOLDEEN
+ db 80 ; SEAKING
+ db 70 ; STARYU
+ db 100 ; STARMIE
+ db 100 ; MR__MIME
+ db 55 ; SCYTHER
+ db 95 ; JYNX
+ db 85 ; ELECTABUZZ
+ db 85 ; MAGMAR
+ db 55 ; PINSIR
+ db 70 ; TAUROS
+ db 20 ; MAGIKARP
+ db 100 ; GYARADOS
+ db 95 ; LAPRAS
+ db 48 ; DITTO
+ db 65 ; EEVEE
+ db 110 ; VAPOREON
+ db 110 ; JOLTEON
+ db 110 ; FLAREON
+ db 75 ; PORYGON
+ db 90 ; OMANYTE
+ db 115 ; OMASTAR
+ db 45 ; KABUTO
+ db 70 ; KABUTOPS
+ db 60 ; AERODACTYL
+ db 65 ; SNORLAX
+ db 125 ; ARTICUNO
+ db 125 ; ZAPDOS
+ db 125 ; MOLTRES
+ db 50 ; DRATINI
+ db 70 ; DRAGONAIR
+ db 100 ; DRAGONITE
+ db 154 ; MEWTWO
+ db 100 ; MEW
+; fb6ed
diff --git a/data/tmhm_moves.asm b/data/tmhm_moves.asm
new file mode 100644
index 000000000..c1af85ec5
--- /dev/null
+++ b/data/tmhm_moves.asm
@@ -0,0 +1,69 @@
+TMHMMoves: ; 1167a
+; TMs
+ db DYNAMICPUNCH
+ db HEADBUTT
+ db CURSE
+ db ROLLOUT
+ db ROAR
+ db TOXIC
+ db ZAP_CANNON
+ db ROCK_SMASH
+ db PSYCH_UP
+ db HIDDEN_POWER
+ db SUNNY_DAY
+ db SWEET_SCENT
+ db SNORE
+ db BLIZZARD
+ db HYPER_BEAM
+ db ICY_WIND
+ db PROTECT
+ db RAIN_DANCE
+ db GIGA_DRAIN
+ db ENDURE
+ db FRUSTRATION
+ db SOLARBEAM
+ db IRON_TAIL
+ db DRAGONBREATH
+ db THUNDER
+ db EARTHQUAKE
+ db RETURN
+ db DIG
+ db PSYCHIC_M
+ db SHADOW_BALL
+ db MUD_SLAP
+ db DOUBLE_TEAM
+ db ICE_PUNCH
+ db SWAGGER
+ db SLEEP_TALK
+ db SLUDGE_BOMB
+ db SANDSTORM
+ db FIRE_BLAST
+ db SWIFT
+ db DEFENSE_CURL
+ db THUNDERPUNCH
+ db DREAM_EATER
+ db DETECT
+ db REST
+ db ATTRACT
+ db THIEF
+ db STEEL_WING
+ db FIRE_PUNCH
+ db FURY_CUTTER
+ db NIGHTMARE
+
+; HMs
+ db CUT
+ db FLY
+ db SURF
+ db STRENGTH
+ db FLASH
+ db WHIRLPOOL
+ db WATERFALL
+
+; Move tutor
+ db FLAMETHROWER
+ db THUNDERBOLT
+ db ICE_BEAM
+
+ db 0 ; end
+; 116b7
diff --git a/data/trainers/encounter_music.asm b/data/trainers/encounter_music.asm
new file mode 100644
index 000000000..cd0348d81
--- /dev/null
+++ b/data/trainers/encounter_music.asm
@@ -0,0 +1,75 @@
+; What music plays when a trainer notices you
+
+TrainerEncounterMusic::
+; entries correspond to trainer classes (see constants/trainer_constants.asm)
+ db MUSIC_HIKER_ENCOUNTER ; none
+ db MUSIC_YOUNGSTER_ENCOUNTER ; falkner
+ db MUSIC_LASS_ENCOUNTER ; whitney
+ db MUSIC_YOUNGSTER_ENCOUNTER ; bugsy
+ db MUSIC_OFFICER_ENCOUNTER ; morty
+ db MUSIC_OFFICER_ENCOUNTER ; pryce
+ db MUSIC_LASS_ENCOUNTER ; jasmine
+ db MUSIC_OFFICER_ENCOUNTER ; chuck
+ db MUSIC_BEAUTY_ENCOUNTER ; clair
+ db MUSIC_RIVAL_ENCOUNTER ; rival1
+ db MUSIC_HIKER_ENCOUNTER ; pokemon_prof
+ db MUSIC_HIKER_ENCOUNTER ; will
+ db MUSIC_HIKER_ENCOUNTER ; cal
+ db MUSIC_OFFICER_ENCOUNTER ; bruno
+ db MUSIC_HIKER_ENCOUNTER ; karen
+ db MUSIC_HIKER_ENCOUNTER ; koga
+ db MUSIC_OFFICER_ENCOUNTER ; champion
+ db MUSIC_YOUNGSTER_ENCOUNTER ; brock
+ db MUSIC_LASS_ENCOUNTER ; misty
+ db MUSIC_OFFICER_ENCOUNTER ; lt_surge
+ db MUSIC_ROCKET_ENCOUNTER ; scientist
+ db MUSIC_OFFICER_ENCOUNTER ; erika
+ db MUSIC_YOUNGSTER_ENCOUNTER ; youngster
+ db MUSIC_YOUNGSTER_ENCOUNTER ; schoolboy
+ db MUSIC_YOUNGSTER_ENCOUNTER ; bird_keeper
+ db MUSIC_LASS_ENCOUNTER ; lass
+ db MUSIC_LASS_ENCOUNTER ; janine
+ db MUSIC_HIKER_ENCOUNTER ; cooltrainerm
+ db MUSIC_BEAUTY_ENCOUNTER ; cooltrainerf
+ db MUSIC_BEAUTY_ENCOUNTER ; beauty
+ db MUSIC_POKEMANIAC_ENCOUNTER ; pokemaniac
+ db MUSIC_ROCKET_ENCOUNTER ; gruntm
+ db MUSIC_HIKER_ENCOUNTER ; gentleman
+ db MUSIC_BEAUTY_ENCOUNTER ; skier
+ db MUSIC_BEAUTY_ENCOUNTER ; teacher
+ db MUSIC_BEAUTY_ENCOUNTER ; sabrina
+ db MUSIC_YOUNGSTER_ENCOUNTER ; bug_catcher
+ db MUSIC_HIKER_ENCOUNTER ; fisher
+ db MUSIC_HIKER_ENCOUNTER ; swimmerm
+ db MUSIC_BEAUTY_ENCOUNTER ; swimmerf
+ db MUSIC_HIKER_ENCOUNTER ; sailor
+ db MUSIC_POKEMANIAC_ENCOUNTER ; super_nerd
+ db MUSIC_RIVAL_ENCOUNTER ; rival2
+ db MUSIC_HIKER_ENCOUNTER ; guitarist
+ db MUSIC_HIKER_ENCOUNTER ; hiker
+ db MUSIC_HIKER_ENCOUNTER ; biker
+ db MUSIC_OFFICER_ENCOUNTER ; blaine
+ db MUSIC_POKEMANIAC_ENCOUNTER ; burglar
+ db MUSIC_HIKER_ENCOUNTER ; firebreather
+ db MUSIC_POKEMANIAC_ENCOUNTER ; juggler
+ db MUSIC_HIKER_ENCOUNTER ; blackbelt_t
+ db MUSIC_ROCKET_ENCOUNTER ; executivem
+ db MUSIC_YOUNGSTER_ENCOUNTER ; psychic_t
+ db MUSIC_LASS_ENCOUNTER ; picnicker
+ db MUSIC_YOUNGSTER_ENCOUNTER ; camper
+ db MUSIC_ROCKET_ENCOUNTER ; executivef
+ db MUSIC_SAGE_ENCOUNTER ; sage
+ db MUSIC_SAGE_ENCOUNTER ; medium
+ db MUSIC_HIKER_ENCOUNTER ; boarder
+ db MUSIC_HIKER_ENCOUNTER ; pokefanm
+ db MUSIC_KIMONO_ENCOUNTER ; kimono_girl
+ db MUSIC_LASS_ENCOUNTER ; twins
+ db MUSIC_BEAUTY_ENCOUNTER ; pokefanf
+ db MUSIC_HIKER_ENCOUNTER ; red
+ db MUSIC_RIVAL_ENCOUNTER ; blue
+ db MUSIC_HIKER_ENCOUNTER ; officer
+ db MUSIC_ROCKET_ENCOUNTER ; gruntf
+ db MUSIC_HIKER_ENCOUNTER ; mysticalman
+ db MUSIC_HIKER_ENCOUNTER
+ db MUSIC_HIKER_ENCOUNTER
+ db MUSIC_HIKER_ENCOUNTER
diff --git a/data/trainers/gendered_trainers.asm b/data/trainers/gendered_trainers.asm
new file mode 100644
index 000000000..98cfec2ac
--- /dev/null
+++ b/data/trainers/gendered_trainers.asm
@@ -0,0 +1,40 @@
+MaleTrainers: ; 4e95d
+ db BURGLAR
+ db YOUNGSTER
+ db SCHOOLBOY
+ db BIRD_KEEPER
+ db POKEMANIAC
+ db GENTLEMAN
+ db BUG_CATCHER
+ db FISHER
+ db SWIMMERM
+ db SAILOR
+ db SUPER_NERD
+ db GUITARIST
+ db HIKER
+ db FIREBREATHER
+ db BLACKBELT_T
+ db PSYCHIC_T
+ db CAMPER
+ db COOLTRAINERM
+ db BOARDER
+ db JUGGLER
+ db POKEFANM
+ db OFFICER
+ db SAGE
+ db BIKER
+ db SCIENTIST
+MaleTrainersEnd
+
+FemaleTrainers: ; 4e976
+ db MEDIUM
+ db LASS
+ db BEAUTY
+ db SKIER
+ db TEACHER
+ db SWIMMERF
+ db PICNICKER
+ db KIMONO_GIRL
+ db POKEFANF
+ db COOLTRAINERF
+FemaleTrainersEnd
diff --git a/data/trainers/parties.asm b/data/trainers/parties.asm
new file mode 100644
index 000000000..e96cfd895
--- /dev/null
+++ b/data/trainers/parties.asm
@@ -0,0 +1,8829 @@
+Trainers:
+
+; All trainers follow a basic structure:
+ ; Name
+ ; String in format "TEXT@"
+ ; Type
+ ; TRAINERTYPE_NORMAL: level, species
+ ; TRAINERTYPE_MOVES: level, species, moves
+ ; TRAINERTYPE_ITEM: level, species, item
+ ; TRAINERTYPE_ITEM_MOVES: level, species, item, moves
+ ; Party
+ ; Up to six monsters following the data type
+ ; $ff
+
+
+FalknerGroup:
+; ================================
+; ================
+
+ ; FALKNER (1)
+ db "FALKNER@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 7, PIDGEY
+ db TACKLE
+ db MUD_SLAP
+ db 0
+ db 0
+
+ db 9, PIDGEOTTO
+ db TACKLE
+ db MUD_SLAP
+ db GUST
+ db 0
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+WhitneyGroup:
+; ================================
+; ================
+
+ ; WHITNEY (1)
+ db "WHITNEY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 18, CLEFAIRY
+ db DOUBLESLAP
+ db MIMIC
+ db ENCORE
+ db METRONOME
+
+ db 20, MILTANK
+ db ROLLOUT
+ db ATTRACT
+ db STOMP
+ db MILK_DRINK
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+BugsyGroup:
+; ================================
+; ================
+
+ ; BUGSY (1)
+ db "BUGSY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 14, METAPOD
+ db TACKLE
+ db STRING_SHOT
+ db HARDEN
+ db 0
+
+ db 14, KAKUNA
+ db POISON_STING
+ db STRING_SHOT
+ db HARDEN
+ db 0
+
+ db 16, SCYTHER
+ db QUICK_ATTACK
+ db LEER
+ db FURY_CUTTER
+ db 0
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+MortyGroup:
+; ================================
+; ================
+
+ ; MORTY (1)
+ db "MORTY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 21, GASTLY
+ db LICK
+ db SPITE
+ db MEAN_LOOK
+ db CURSE
+
+ db 21, HAUNTER
+ db HYPNOSIS
+ db MIMIC
+ db CURSE
+ db NIGHT_SHADE
+
+ db 25, GENGAR
+ db HYPNOSIS
+ db SHADOW_BALL
+ db MEAN_LOOK
+ db DREAM_EATER
+
+ db 23, HAUNTER
+ db SPITE
+ db MEAN_LOOK
+ db MIMIC
+ db NIGHT_SHADE
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+PryceGroup:
+; ================================
+; ================
+
+ ; PRYCE (1)
+ db "PRYCE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 27, SEEL
+ db HEADBUTT
+ db ICY_WIND
+ db AURORA_BEAM
+ db REST
+
+ db 29, DEWGONG
+ db HEADBUTT
+ db ICY_WIND
+ db AURORA_BEAM
+ db REST
+
+ db 31, PILOSWINE
+ db ICY_WIND
+ db FURY_ATTACK
+ db MIST
+ db BLIZZARD
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+JasmineGroup:
+; ================================
+; ================
+
+ ; JASMINE (1)
+ db "JASMINE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 30, MAGNEMITE
+ db THUNDERBOLT
+ db SUPERSONIC
+ db SONICBOOM
+ db THUNDER_WAVE
+
+ db 30, MAGNEMITE
+ db THUNDERBOLT
+ db SUPERSONIC
+ db SONICBOOM
+ db THUNDER_WAVE
+
+ db 35, STEELIX
+ db SCREECH
+ db SUNNY_DAY
+ db ROCK_THROW
+ db IRON_TAIL
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+ChuckGroup:
+; ================================
+; ================
+
+ ; CHUCK (1)
+ db "CHUCK@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 27, PRIMEAPE
+ db LEER
+ db RAGE
+ db KARATE_CHOP
+ db FURY_SWIPES
+
+ db 30, POLIWRATH
+ db HYPNOSIS
+ db MIND_READER
+ db SURF
+ db DYNAMICPUNCH
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+ClairGroup:
+; ================================
+; ================
+
+ ; CLAIR (1)
+ db "CLAIR@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 37, DRAGONAIR
+ db THUNDER_WAVE
+ db SURF
+ db SLAM
+ db DRAGONBREATH
+
+ db 37, DRAGONAIR
+ db THUNDER_WAVE
+ db THUNDERBOLT
+ db SLAM
+ db DRAGONBREATH
+
+ db 37, DRAGONAIR
+ db THUNDER_WAVE
+ db ICE_BEAM
+ db SLAM
+ db DRAGONBREATH
+
+ db 40, KINGDRA
+ db SMOKESCREEN
+ db SURF
+ db HYPER_BEAM
+ db DRAGONBREATH
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+Rival1Group:
+; ================================
+; ================
+
+ ; RIVAL1 (1)
+ db "?@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 5, CHIKORITA
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (2)
+ db "?@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 5, CYNDAQUIL
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (3)
+ db "?@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 5, TOTODILE
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (4)
+ db "?@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 12, GASTLY
+ db 14, ZUBAT
+ db 16, BAYLEEF
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (5)
+ db "?@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 12, GASTLY
+ db 14, ZUBAT
+ db 16, QUILAVA
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (6)
+ db "?@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 12, GASTLY
+ db 14, ZUBAT
+ db 16, CROCONAW
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (7)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 20, HAUNTER
+ db LICK
+ db SPITE
+ db MEAN_LOOK
+ db CURSE
+
+ db 18, MAGNEMITE
+ db TACKLE
+ db THUNDERSHOCK
+ db SUPERSONIC
+ db SONICBOOM
+
+ db 20, ZUBAT
+ db LEECH_LIFE
+ db SUPERSONIC
+ db BITE
+ db CONFUSE_RAY
+
+ db 22, BAYLEEF
+ db GROWL
+ db REFLECT
+ db RAZOR_LEAF
+ db POISONPOWDER
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (8)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 20, HAUNTER
+ db LICK
+ db SPITE
+ db MEAN_LOOK
+ db CURSE
+
+ db 18, MAGNEMITE
+ db TACKLE
+ db THUNDERSHOCK
+ db SUPERSONIC
+ db SONICBOOM
+
+ db 20, ZUBAT
+ db LEECH_LIFE
+ db SUPERSONIC
+ db BITE
+ db CONFUSE_RAY
+
+ db 22, QUILAVA
+ db LEER
+ db SMOKESCREEN
+ db EMBER
+ db QUICK_ATTACK
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (9)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 20, HAUNTER
+ db LICK
+ db SPITE
+ db MEAN_LOOK
+ db CURSE
+
+ db 18, MAGNEMITE
+ db TACKLE
+ db THUNDERSHOCK
+ db SUPERSONIC
+ db SONICBOOM
+
+ db 20, ZUBAT
+ db LEECH_LIFE
+ db SUPERSONIC
+ db BITE
+ db CONFUSE_RAY
+
+ db 22, CROCONAW
+ db LEER
+ db RAGE
+ db WATER_GUN
+ db BITE
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (10)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 30, GOLBAT
+ db LEECH_LIFE
+ db BITE
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db 28, MAGNEMITE
+ db TACKLE
+ db THUNDERSHOCK
+ db SONICBOOM
+ db THUNDER_WAVE
+
+ db 30, HAUNTER
+ db LICK
+ db MEAN_LOOK
+ db CURSE
+ db SHADOW_BALL
+
+ db 32, SNEASEL
+ db LEER
+ db QUICK_ATTACK
+ db SCREECH
+ db FAINT_ATTACK
+
+ db 32, MEGANIUM
+ db REFLECT
+ db RAZOR_LEAF
+ db POISONPOWDER
+ db BODY_SLAM
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (11)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 30, GOLBAT
+ db LEECH_LIFE
+ db BITE
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db 28, MAGNEMITE
+ db TACKLE
+ db THUNDERSHOCK
+ db SONICBOOM
+ db THUNDER_WAVE
+
+ db 30, HAUNTER
+ db LICK
+ db MEAN_LOOK
+ db CURSE
+ db SHADOW_BALL
+
+ db 32, SNEASEL
+ db LEER
+ db QUICK_ATTACK
+ db SCREECH
+ db FAINT_ATTACK
+
+ db 32, QUILAVA
+ db SMOKESCREEN
+ db EMBER
+ db QUICK_ATTACK
+ db FLAME_WHEEL
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (12)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 30, GOLBAT
+ db LEECH_LIFE
+ db BITE
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db 28, MAGNEMITE
+ db TACKLE
+ db THUNDERSHOCK
+ db SONICBOOM
+ db THUNDER_WAVE
+
+ db 30, HAUNTER
+ db LICK
+ db MEAN_LOOK
+ db CURSE
+ db SHADOW_BALL
+
+ db 32, SNEASEL
+ db LEER
+ db QUICK_ATTACK
+ db SCREECH
+ db FAINT_ATTACK
+
+ db 32, FERALIGATR
+ db RAGE
+ db WATER_GUN
+ db BITE
+ db SCARY_FACE
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (13)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 34, SNEASEL
+ db QUICK_ATTACK
+ db SCREECH
+ db FAINT_ATTACK
+ db FURY_CUTTER
+
+ db 36, GOLBAT
+ db LEECH_LIFE
+ db BITE
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db 35, MAGNETON
+ db THUNDERSHOCK
+ db SONICBOOM
+ db THUNDER_WAVE
+ db SWIFT
+
+ db 35, HAUNTER
+ db MEAN_LOOK
+ db CURSE
+ db SHADOW_BALL
+ db CONFUSE_RAY
+
+ db 35, KADABRA
+ db DISABLE
+ db PSYBEAM
+ db RECOVER
+ db FUTURE_SIGHT
+
+ db 38, MEGANIUM
+ db REFLECT
+ db RAZOR_LEAF
+ db POISONPOWDER
+ db BODY_SLAM
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (14)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 34, SNEASEL
+ db QUICK_ATTACK
+ db SCREECH
+ db FAINT_ATTACK
+ db FURY_CUTTER
+
+ db 36, GOLBAT
+ db LEECH_LIFE
+ db BITE
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db 35, MAGNETON
+ db THUNDERSHOCK
+ db SONICBOOM
+ db THUNDER_WAVE
+ db SWIFT
+
+ db 35, HAUNTER
+ db MEAN_LOOK
+ db CURSE
+ db SHADOW_BALL
+ db CONFUSE_RAY
+
+ db 35, KADABRA
+ db DISABLE
+ db PSYBEAM
+ db RECOVER
+ db FUTURE_SIGHT
+
+ db 38, TYPHLOSION
+ db SMOKESCREEN
+ db EMBER
+ db QUICK_ATTACK
+ db FLAME_WHEEL
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL1 (15)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 34, SNEASEL
+ db QUICK_ATTACK
+ db SCREECH
+ db FAINT_ATTACK
+ db FURY_CUTTER
+
+ db 36, GOLBAT
+ db LEECH_LIFE
+ db BITE
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db 34, MAGNETON
+ db THUNDERSHOCK
+ db SONICBOOM
+ db THUNDER_WAVE
+ db SWIFT
+
+ db 35, HAUNTER
+ db MEAN_LOOK
+ db CURSE
+ db SHADOW_BALL
+ db CONFUSE_RAY
+
+ db 35, KADABRA
+ db DISABLE
+ db PSYBEAM
+ db RECOVER
+ db FUTURE_SIGHT
+
+ db 38, FERALIGATR
+ db RAGE
+ db WATER_GUN
+ db SCARY_FACE
+ db SLASH
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+PokemonProfGroup:
+; ================================
+; ================
+; ================================
+
+
+WillGroup:
+; ================================
+; ================
+
+ ; WILL (1)
+ db "WILL@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 40, XATU
+ db QUICK_ATTACK
+ db FUTURE_SIGHT
+ db CONFUSE_RAY
+ db PSYCHIC_M
+
+ db 41, JYNX
+ db DOUBLESLAP
+ db LOVELY_KISS
+ db ICE_PUNCH
+ db PSYCHIC_M
+
+ db 41, EXEGGUTOR
+ db REFLECT
+ db LEECH_SEED
+ db EGG_BOMB
+ db PSYCHIC_M
+
+ db 41, SLOWBRO
+ db CURSE
+ db AMNESIA
+ db BODY_SLAM
+ db PSYCHIC_M
+
+ db 42, XATU
+ db QUICK_ATTACK
+ db FUTURE_SIGHT
+ db CONFUSE_RAY
+ db PSYCHIC_M
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+PKMNTrainerGroup:
+; ================================
+; ================
+
+ ; CAL (1)
+ db "CAL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 10, CHIKORITA
+ db 10, CYNDAQUIL
+ db 10, TOTODILE
+
+ db $ff ; end
+
+; ================
+
+ ; CAL (2)
+ db "CAL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, BAYLEEF
+ db 30, QUILAVA
+ db 30, CROCONAW
+
+ db $ff ; end
+
+; ================
+
+ ; CAL (3)
+ db "CAL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 50, MEGANIUM
+ db 50, TYPHLOSION
+ db 50, FERALIGATR
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+BrunoGroup:
+; ================================
+; ================
+
+ ; BRUNO (1)
+ db "BRUNO@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 42, HITMONTOP
+ db PURSUIT
+ db QUICK_ATTACK
+ db DIG
+ db DETECT
+
+ db 42, HITMONLEE
+ db SWAGGER
+ db DOUBLE_KICK
+ db HI_JUMP_KICK
+ db FORESIGHT
+
+ db 42, HITMONCHAN
+ db THUNDERPUNCH
+ db ICE_PUNCH
+ db FIRE_PUNCH
+ db MACH_PUNCH
+
+ db 43, ONIX
+ db BIND
+ db EARTHQUAKE
+ db SANDSTORM
+ db ROCK_SLIDE
+
+ db 46, MACHAMP
+ db ROCK_SLIDE
+ db FORESIGHT
+ db VITAL_THROW
+ db CROSS_CHOP
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+KarenGroup:
+; ================================
+; ================
+
+ ; KAREN (1)
+ db "KAREN@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 42, UMBREON
+ db SAND_ATTACK
+ db CONFUSE_RAY
+ db FAINT_ATTACK
+ db MEAN_LOOK
+
+ db 42, VILEPLUME
+ db STUN_SPORE
+ db ACID
+ db MOONLIGHT
+ db PETAL_DANCE
+
+ db 45, GENGAR
+ db LICK
+ db SPITE
+ db CURSE
+ db DESTINY_BOND
+
+ db 44, MURKROW
+ db QUICK_ATTACK
+ db WHIRLWIND
+ db PURSUIT
+ db FAINT_ATTACK
+
+ db 47, HOUNDOOM
+ db ROAR
+ db PURSUIT
+ db FLAMETHROWER
+ db CRUNCH
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+KogaGroup:
+; ================================
+; ================
+
+ ; KOGA (1)
+ db "KOGA@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 40, ARIADOS
+ db DOUBLE_TEAM
+ db SPIDER_WEB
+ db BATON_PASS
+ db GIGA_DRAIN
+
+ db 41, VENOMOTH
+ db SUPERSONIC
+ db GUST
+ db PSYCHIC_M
+ db TOXIC
+
+ db 43, FORRETRESS
+ db PROTECT
+ db SWIFT
+ db EXPLOSION
+ db SPIKES
+
+ db 42, MUK
+ db MINIMIZE
+ db ACID_ARMOR
+ db SLUDGE_BOMB
+ db TOXIC
+
+ db 44, CROBAT
+ db DOUBLE_TEAM
+ db QUICK_ATTACK
+ db WING_ATTACK
+ db TOXIC
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+ChampionGroup:
+; ================================
+; ================
+
+ ; CHAMPION (1)
+ db "LANCE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 44, GYARADOS
+ db FLAIL
+ db RAIN_DANCE
+ db SURF
+ db HYPER_BEAM
+
+ db 47, DRAGONITE
+ db THUNDER_WAVE
+ db TWISTER
+ db THUNDER
+ db HYPER_BEAM
+
+ db 47, DRAGONITE
+ db THUNDER_WAVE
+ db TWISTER
+ db BLIZZARD
+ db HYPER_BEAM
+
+ db 46, AERODACTYL
+ db WING_ATTACK
+ db ANCIENTPOWER
+ db ROCK_SLIDE
+ db HYPER_BEAM
+
+ db 46, CHARIZARD
+ db FLAMETHROWER
+ db WING_ATTACK
+ db SLASH
+ db HYPER_BEAM
+
+ db 50, DRAGONITE
+ db FIRE_BLAST
+ db SAFEGUARD
+ db OUTRAGE
+ db HYPER_BEAM
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+BrockGroup:
+; ================================
+; ================
+
+ ; BROCK (1)
+ db "BROCK@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 41, GRAVELER
+ db DEFENSE_CURL
+ db ROCK_SLIDE
+ db ROLLOUT
+ db EARTHQUAKE
+
+ db 41, RHYHORN
+ db FURY_ATTACK
+ db SCARY_FACE
+ db EARTHQUAKE
+ db HORN_DRILL
+
+ db 42, OMASTAR
+ db BITE
+ db SURF
+ db PROTECT
+ db SPIKE_CANNON
+
+ db 44, ONIX
+ db BIND
+ db ROCK_SLIDE
+ db BIDE
+ db SANDSTORM
+
+ db 42, KABUTOPS
+ db SLASH
+ db SURF
+ db ENDURE
+ db GIGA_DRAIN
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+MistyGroup:
+; ================================
+; ================
+
+ ; MISTY (1)
+ db "MISTY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 42, GOLDUCK
+ db SURF
+ db DISABLE
+ db PSYCH_UP
+ db PSYCHIC_M
+
+ db 42, QUAGSIRE
+ db SURF
+ db AMNESIA
+ db EARTHQUAKE
+ db RAIN_DANCE
+
+ db 44, LAPRAS
+ db SURF
+ db PERISH_SONG
+ db BLIZZARD
+ db RAIN_DANCE
+
+ db 47, STARMIE
+ db SURF
+ db CONFUSE_RAY
+ db RECOVER
+ db ICE_BEAM
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+LtSurgeGroup:
+; ================================
+; ================
+
+ ; LT_SURGE (1)
+ db "LT.SURGE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 44, RAICHU
+ db THUNDER_WAVE
+ db QUICK_ATTACK
+ db THUNDERBOLT
+ db THUNDER
+
+ db 40, ELECTRODE
+ db SCREECH
+ db DOUBLE_TEAM
+ db SWIFT
+ db EXPLOSION
+
+ db 40, MAGNETON
+ db LOCK_ON
+ db DOUBLE_TEAM
+ db SWIFT
+ db ZAP_CANNON
+
+ db 40, ELECTRODE
+ db SCREECH
+ db DOUBLE_TEAM
+ db SWIFT
+ db EXPLOSION
+
+ db 46, ELECTABUZZ
+ db QUICK_ATTACK
+ db THUNDERPUNCH
+ db LIGHT_SCREEN
+ db THUNDER
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+ScientistGroup:
+; ================================
+; ================
+
+ ; SCIENTIST (1)
+ db "ROSS@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 22, KOFFING
+ db 22, KOFFING
+
+ db $ff ; end
+
+; ================
+
+ ; SCIENTIST (2)
+ db "MITCH@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, DITTO
+
+ db $ff ; end
+
+; ================
+
+ ; SCIENTIST (3)
+ db "JED@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, MAGNEMITE
+ db 20, MAGNEMITE
+ db 20, MAGNEMITE
+
+ db $ff ; end
+
+; ================
+
+ ; SCIENTIST (4)
+ db "MARC@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, MAGNEMITE
+ db 27, MAGNEMITE
+ db 27, MAGNEMITE
+
+ db $ff ; end
+
+; ================
+
+ ; SCIENTIST (5)
+ db "RICH@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 30, PORYGON
+ db CONVERSION
+ db CONVERSION2
+ db RECOVER
+ db TRI_ATTACK
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+ErikaGroup:
+; ================================
+; ================
+
+ ; ERIKA (1)
+ db "ERIKA@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 42, TANGELA
+ db VINE_WHIP
+ db BIND
+ db GIGA_DRAIN
+ db SLEEP_POWDER
+
+ db 41, JUMPLUFF
+ db MEGA_DRAIN
+ db LEECH_SEED
+ db COTTON_SPORE
+ db GIGA_DRAIN
+
+ db 46, VICTREEBEL
+ db SUNNY_DAY
+ db SYNTHESIS
+ db ACID
+ db RAZOR_LEAF
+
+ db 46, BELLOSSOM
+ db SUNNY_DAY
+ db SYNTHESIS
+ db PETAL_DANCE
+ db SOLARBEAM
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+YoungsterGroup:
+; ================================
+; ================
+
+ ; YOUNGSTER (1)
+ db "JOEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 4, RATTATA
+
+ db $ff ; end
+
+; ================
+
+ ; YOUNGSTER (2)
+ db "MIKEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 2, PIDGEY
+ db 4, RATTATA
+
+ db $ff ; end
+
+; ================
+
+ ; YOUNGSTER (3)
+ db "ALBERT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 6, RATTATA
+ db 8, ZUBAT
+
+ db $ff ; end
+
+; ================
+
+ ; YOUNGSTER (4)
+ db "GORDON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 10, WOOPER
+
+ db $ff ; end
+
+; ================
+
+ ; YOUNGSTER (5)
+ db "SAMUEL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 7, RATTATA
+ db 10, SANDSHREW
+ db 8, SPEAROW
+ db 8, SPEAROW
+
+ db $ff ; end
+
+; ================
+
+ ; YOUNGSTER (6)
+ db "IAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 10, MANKEY
+ db 12, DIGLETT
+
+ db $ff ; end
+
+; ================
+
+ ; YOUNGSTER (7)
+ db "JOEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, RATTATA
+
+ db $ff ; end
+
+; ================
+
+ ; YOUNGSTER (8)
+ db "JOEY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 21, RATICATE
+ db TAIL_WHIP
+ db QUICK_ATTACK
+ db HYPER_FANG
+ db SCARY_FACE
+
+ db $ff ; end
+
+; ================
+
+ ; YOUNGSTER (9)
+ db "WARREN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 35, FEAROW
+
+ db $ff ; end
+
+; ================
+
+ ; YOUNGSTER (10)
+ db "JIMMY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 33, RATICATE
+ db 33, ARBOK
+
+ db $ff ; end
+
+; ================
+
+ ; YOUNGSTER (11)
+ db "OWEN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 35, GROWLITHE
+
+ db $ff ; end
+
+; ================
+
+ ; YOUNGSTER (12)
+ db "JASON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 33, SANDSLASH
+ db 33, CROBAT
+
+ db $ff ; end
+
+; ================
+
+ ; YOUNGSTER (13)
+ db "JOEY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 30, RATICATE
+ db TAIL_WHIP
+ db QUICK_ATTACK
+ db HYPER_FANG
+ db PURSUIT
+
+ db $ff ; end
+
+; ================
+
+ ; YOUNGSTER (14)
+ db "JOEY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 37, RATICATE
+ db HYPER_BEAM
+ db QUICK_ATTACK
+ db HYPER_FANG
+ db PURSUIT
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+SchoolboyGroup:
+; ================================
+; ================
+
+ ; SCHOOLBOY (1)
+ db "JACK@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 12, ODDISH
+ db 15, VOLTORB
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (2)
+ db "KIPP@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, VOLTORB
+ db 27, MAGNEMITE
+ db 31, VOLTORB
+ db 31, MAGNETON
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (3)
+ db "ALAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 16, TANGELA
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (4)
+ db "JOHNNY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 29, BELLSPROUT
+ db 31, WEEPINBELL
+ db 33, VICTREEBEL
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (5)
+ db "DANNY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 31, JYNX
+ db 31, ELECTABUZZ
+ db 31, MAGMAR
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (6)
+ db "TOMMY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, XATU
+ db 34, ALAKAZAM
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (7)
+ db "DUDLEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 35, ODDISH
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (8)
+ db "JOE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 33, TANGELA
+ db 33, VAPOREON
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (9)
+ db "BILLY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, PARAS
+ db 27, PARAS
+ db 27, POLIWHIRL
+ db 35, DITTO
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (10)
+ db "CHAD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 19, MR__MIME
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (11)
+ db "NATE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, LEDIAN
+ db 32, EXEGGUTOR
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (12)
+ db "RICKY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, AIPOM
+ db 32, DITTO
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (13)
+ db "JACK@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 14, ODDISH
+ db 17, VOLTORB
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (14)
+ db "JACK@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, GLOOM
+ db 31, ELECTRODE
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (15)
+ db "ALAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, TANGELA
+ db 17, YANMA
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (16)
+ db "ALAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, NATU
+ db 22, TANGELA
+ db 20, QUAGSIRE
+ db 25, YANMA
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (17)
+ db "CHAD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 19, MR__MIME
+ db 19, MAGNEMITE
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (18)
+ db "CHAD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, MR__MIME
+ db 31, MAGNETON
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (19)
+ db "JACK@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, GLOOM
+ db 33, GROWLITHE
+ db 33, ELECTRODE
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (20)
+ db "JACK@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 35, ELECTRODE
+ db SCREECH
+ db SONICBOOM
+ db ROLLOUT
+ db LIGHT_SCREEN
+
+ db 35, GROWLITHE
+ db SUNNY_DAY
+ db LEER
+ db TAKE_DOWN
+ db FLAME_WHEEL
+
+ db 37, VILEPLUME
+ db SOLARBEAM
+ db SLEEP_POWDER
+ db ACID
+ db MOONLIGHT
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (21)
+ db "ALAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, NATU
+ db 27, TANGELA
+ db 30, QUAGSIRE
+ db 30, YANMA
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (22)
+ db "ALAN@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 35, XATU
+ db PECK
+ db NIGHT_SHADE
+ db SWIFT
+ db FUTURE_SIGHT
+
+ db 32, TANGELA
+ db POISONPOWDER
+ db VINE_WHIP
+ db BIND
+ db MEGA_DRAIN
+
+ db 32, YANMA
+ db QUICK_ATTACK
+ db DOUBLE_TEAM
+ db SONICBOOM
+ db SUPERSONIC
+
+ db 35, QUAGSIRE
+ db TAIL_WHIP
+ db SLAM
+ db AMNESIA
+ db EARTHQUAKE
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (23)
+ db "CHAD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, MR__MIME
+ db 34, MAGNETON
+
+ db $ff ; end
+
+; ================
+
+ ; SCHOOLBOY (24)
+ db "CHAD@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 34, MR__MIME
+ db PSYCHIC_M
+ db LIGHT_SCREEN
+ db REFLECT
+ db ENCORE
+
+ db 38, MAGNETON
+ db ZAP_CANNON
+ db THUNDER_WAVE
+ db LOCK_ON
+ db SWIFT
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+BirdKeeperGroup:
+; ================================
+; ================
+
+ ; BIRD_KEEPER (1)
+ db "ROD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 7, PIDGEY
+ db 7, PIDGEY
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (2)
+ db "ABE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 9, SPEAROW
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (3)
+ db "BRYAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 12, PIDGEY
+ db 14, PIDGEOTTO
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (4)
+ db "THEO@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, PIDGEY
+ db 15, PIDGEY
+ db 19, PIDGEY
+ db 15, PIDGEY
+ db 15, PIDGEY
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (5)
+ db "TOBY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, DODUO
+ db 16, DODUO
+ db 17, DODUO
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (6)
+ db "DENIS@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 18, SPEAROW
+ db 20, FEAROW
+ db 18, SPEAROW
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (7)
+ db "VANCE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 25, PIDGEOTTO
+ db 25, PIDGEOTTO
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (8)
+ db "HANK@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 12, PIDGEY
+ db 34, PIDGEOT
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (9)
+ db "ROY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 29, FEAROW
+ db 35, FEAROW
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (10)
+ db "BORIS@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, DODUO
+ db 28, DODUO
+ db 32, DODRIO
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (11)
+ db "BOB@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, NOCTOWL
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (12)
+ db "JOSE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 36, FARFETCH_D
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (13)
+ db "PETER@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 6, PIDGEY
+ db 6, PIDGEY
+ db 8, SPEAROW
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (14)
+ db "JOSE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, FARFETCH_D
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (15)
+ db "PERRY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, FARFETCH_D
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (16)
+ db "BRET@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, PIDGEOTTO
+ db 32, FEAROW
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (17)
+ db "JOSE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 40, FARFETCH_D
+ db FURY_ATTACK
+ db DETECT
+ db FLY
+ db SLASH
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (18)
+ db "VANCE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, PIDGEOTTO
+ db 32, PIDGEOTTO
+
+ db $ff ; end
+
+; ================
+
+ ; BIRD_KEEPER (19)
+ db "VANCE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 38, PIDGEOT
+ db TOXIC
+ db QUICK_ATTACK
+ db WHIRLWIND
+ db FLY
+
+ db 38, PIDGEOT
+ db SWIFT
+ db DETECT
+ db STEEL_WING
+ db FLY
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+LassGroup:
+; ================================
+; ================
+
+ ; LASS (1)
+ db "CARRIE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 18, SNUBBULL
+ db SCARY_FACE
+ db CHARM
+ db BITE
+ db LICK
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (2)
+ db "BRIDGET@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, JIGGLYPUFF
+ db 15, JIGGLYPUFF
+ db 15, JIGGLYPUFF
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (3)
+ db "ALICE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, GLOOM
+ db 34, ARBOK
+ db 30, GLOOM
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (4)
+ db "KRISE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 12, ODDISH
+ db 15, CUBONE
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (5)
+ db "CONNIE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 21, MARILL
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (6)
+ db "LINDA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, BULBASAUR
+ db 32, IVYSAUR
+ db 34, VENUSAUR
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (7)
+ db "LAURA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, GLOOM
+ db 31, PIDGEOTTO
+ db 31, BELLOSSOM
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (8)
+ db "SHANNON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 29, PARAS
+ db 29, PARAS
+ db 32, PARASECT
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (9)
+ db "MICHELLE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, SKIPLOOM
+ db 33, HOPPIP
+ db 34, JUMPLUFF
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (10)
+ db "DANA@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 18, FLAAFFY
+ db TACKLE
+ db GROWL
+ db THUNDERSHOCK
+ db THUNDER_WAVE
+
+ db 18, PSYDUCK
+ db SCRATCH
+ db TAIL_WHIP
+ db DISABLE
+ db CONFUSION
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (11)
+ db "ELLEN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, WIGGLYTUFF
+ db 34, GRANBULL
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (12)
+ db "CONNIE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 21, MARILL
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (13)
+ db "CONNIE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 21, MARILL
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (14)
+ db "DANA@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 21, FLAAFFY
+ db TACKLE
+ db GROWL
+ db THUNDERSHOCK
+ db THUNDER_WAVE
+
+ db 21, PSYDUCK
+ db SCRATCH
+ db TAIL_WHIP
+ db DISABLE
+ db CONFUSION
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (15)
+ db "DANA@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 29, PSYDUCK
+ db SCRATCH
+ db DISABLE
+ db CONFUSION
+ db SCREECH
+
+ db 29, AMPHAROS
+ db TACKLE
+ db THUNDERSHOCK
+ db THUNDER_WAVE
+ db COTTON_SPORE
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (16)
+ db "DANA@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 32, PSYDUCK
+ db SCRATCH
+ db DISABLE
+ db CONFUSION
+ db SCREECH
+
+ db 32, AMPHAROS
+ db TACKLE
+ db THUNDERPUNCH
+ db THUNDER_WAVE
+ db COTTON_SPORE
+
+ db $ff ; end
+
+; ================
+
+ ; LASS (17)
+ db "DANA@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 36, AMPHAROS
+ db SWIFT
+ db THUNDERPUNCH
+ db THUNDER_WAVE
+ db COTTON_SPORE
+
+ db 36, GOLDUCK
+ db DISABLE
+ db SURF
+ db PSYCHIC_M
+ db SCREECH
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+JanineGroup:
+; ================================
+; ================
+
+ ; JANINE (1)
+ db "JANINE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 36, CROBAT
+ db SCREECH
+ db SUPERSONIC
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db 36, WEEZING
+ db SMOG
+ db SLUDGE_BOMB
+ db TOXIC
+ db EXPLOSION
+
+ db 36, WEEZING
+ db SMOG
+ db SLUDGE_BOMB
+ db TOXIC
+ db EXPLOSION
+
+ db 33, ARIADOS
+ db SCARY_FACE
+ db GIGA_DRAIN
+ db STRING_SHOT
+ db NIGHT_SHADE
+
+ db 39, VENOMOTH
+ db FORESIGHT
+ db DOUBLE_TEAM
+ db GUST
+ db PSYCHIC_M
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+CooltrainerMGroup:
+; ================================
+; ================
+
+ ; COOLTRAINERM (1)
+ db "NICK@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 26, CHARMANDER
+ db EMBER
+ db SMOKESCREEN
+ db RAGE
+ db SCARY_FACE
+
+ db 26, SQUIRTLE
+ db WITHDRAW
+ db WATER_GUN
+ db BITE
+ db CURSE
+
+ db 26, BULBASAUR
+ db LEECH_SEED
+ db POISONPOWDER
+ db SLEEP_POWDER
+ db RAZOR_LEAF
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (2)
+ db "AARON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, IVYSAUR
+ db 24, CHARMELEON
+ db 24, WARTORTLE
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (3)
+ db "PAUL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, DRATINI
+ db 34, DRATINI
+ db 34, DRATINI
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (4)
+ db "CODY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, HORSEA
+ db 36, SEADRA
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (5)
+ db "MIKE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 37, DRAGONAIR
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (6)
+ db "GAVEN@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 35, VICTREEBEL
+ db WRAP
+ db TOXIC
+ db ACID
+ db RAZOR_LEAF
+
+ db 35, KINGLER
+ db BUBBLEBEAM
+ db STOMP
+ db GUILLOTINE
+ db PROTECT
+
+ db 35, FLAREON
+ db SAND_ATTACK
+ db QUICK_ATTACK
+ db BITE
+ db FIRE_SPIN
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (7)
+ db "GAVEN@"
+ db TRAINERTYPE_ITEM_MOVES
+
+ ; party
+
+ db 39, VICTREEBEL, NO_ITEM
+ db GIGA_DRAIN
+ db TOXIC
+ db SLUDGE_BOMB
+ db RAZOR_LEAF
+
+ db 39, KINGLER, KINGS_ROCK
+ db SURF
+ db STOMP
+ db GUILLOTINE
+ db BLIZZARD
+
+ db 39, FLAREON, NO_ITEM
+ db FLAMETHROWER
+ db QUICK_ATTACK
+ db BITE
+ db FIRE_SPIN
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (8)
+ db "RYAN@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 25, PIDGEOT
+ db SAND_ATTACK
+ db QUICK_ATTACK
+ db WHIRLWIND
+ db WING_ATTACK
+
+ db 27, ELECTABUZZ
+ db THUNDERPUNCH
+ db LIGHT_SCREEN
+ db SWIFT
+ db SCREECH
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (9)
+ db "JAKE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 33, PARASECT
+ db LEECH_LIFE
+ db SPORE
+ db SLASH
+ db SWORDS_DANCE
+
+ db 35, GOLDUCK
+ db CONFUSION
+ db SCREECH
+ db PSYCH_UP
+ db FURY_SWIPES
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (10)
+ db "GAVEN@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 32, VICTREEBEL
+ db WRAP
+ db TOXIC
+ db ACID
+ db RAZOR_LEAF
+
+ db 32, KINGLER
+ db BUBBLEBEAM
+ db STOMP
+ db GUILLOTINE
+ db PROTECT
+
+ db 32, FLAREON
+ db SAND_ATTACK
+ db QUICK_ATTACK
+ db BITE
+ db FIRE_SPIN
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (11)
+ db "BLAKE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 33, MAGNETON
+ db THUNDERBOLT
+ db SUPERSONIC
+ db SWIFT
+ db SCREECH
+
+ db 31, QUAGSIRE
+ db WATER_GUN
+ db SLAM
+ db AMNESIA
+ db EARTHQUAKE
+
+ db 31, EXEGGCUTE
+ db LEECH_SEED
+ db CONFUSION
+ db SLEEP_POWDER
+ db SOLARBEAM
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (12)
+ db "BRIAN@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 35, SANDSLASH
+ db SAND_ATTACK
+ db POISON_STING
+ db SLASH
+ db SWIFT
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (13)
+ db "ERICK@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 10, BULBASAUR
+ db 10, CHARMANDER
+ db 10, SQUIRTLE
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (14)
+ db "ANDY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 10, BULBASAUR
+ db 10, CHARMANDER
+ db 10, SQUIRTLE
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (15)
+ db "TYLER@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 10, BULBASAUR
+ db 10, CHARMANDER
+ db 10, SQUIRTLE
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (16)
+ db "SEAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 35, FLAREON
+ db 35, TANGELA
+ db 35, TAUROS
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (17)
+ db "KEVIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 38, RHYHORN
+ db 35, CHARMELEON
+ db 35, WARTORTLE
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (18)
+ db "STEVE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 14, BULBASAUR
+ db 14, CHARMANDER
+ db 14, SQUIRTLE
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (19)
+ db "ALLEN@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 27, CHARMELEON
+ db EMBER
+ db SMOKESCREEN
+ db RAGE
+ db SCARY_FACE
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERM (20)
+ db "DARIN@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 37, DRAGONAIR
+ db WRAP
+ db SURF
+ db DRAGON_RAGE
+ db SLAM
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+CooltrainerFGroup:
+; ================================
+; ================
+
+ ; COOLTRAINERF (1)
+ db "GWEN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 26, EEVEE
+ db 22, FLAREON
+ db 22, VAPOREON
+ db 22, JOLTEON
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (2)
+ db "LOIS@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 25, SKIPLOOM
+ db SYNTHESIS
+ db POISONPOWDER
+ db MEGA_DRAIN
+ db LEECH_SEED
+
+ db 25, NINETALES
+ db EMBER
+ db QUICK_ATTACK
+ db CONFUSE_RAY
+ db SAFEGUARD
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (3)
+ db "FRAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 37, SEADRA
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (4)
+ db "LOLA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, DRATINI
+ db 36, DRAGONAIR
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (5)
+ db "KATE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 26, SHELLDER
+ db 28, CLOYSTER
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (6)
+ db "IRENE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 22, GOLDEEN
+ db 24, SEAKING
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (7)
+ db "KELLY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, MARILL
+ db 24, WARTORTLE
+ db 24, WARTORTLE
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (8)
+ db "JOYCE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 36, PIKACHU
+ db QUICK_ATTACK
+ db DOUBLE_TEAM
+ db THUNDERBOLT
+ db THUNDER
+
+ db 32, BLASTOISE
+ db BITE
+ db CURSE
+ db SURF
+ db RAIN_DANCE
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (9)
+ db "BETH@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 36, RAPIDASH
+ db STOMP
+ db FIRE_SPIN
+ db FURY_ATTACK
+ db AGILITY
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (10)
+ db "REENA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 31, STARMIE
+ db 33, NIDOQUEEN
+ db 31, STARMIE
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (11)
+ db "MEGAN@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 32, BULBASAUR
+ db GROWL
+ db LEECH_SEED
+ db POISONPOWDER
+ db RAZOR_LEAF
+
+ db 32, IVYSAUR
+ db GROWL
+ db LEECH_SEED
+ db POISONPOWDER
+ db RAZOR_LEAF
+
+ db 32, VENUSAUR
+ db BODY_SLAM
+ db SLEEP_POWDER
+ db RAZOR_LEAF
+ db SWEET_SCENT
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (12)
+ db "BETH@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 39, RAPIDASH
+ db STOMP
+ db FIRE_SPIN
+ db FURY_ATTACK
+ db AGILITY
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (13)
+ db "CAROL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 35, ELECTRODE
+ db 35, STARMIE
+ db 35, NINETALES
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (14)
+ db "QUINN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 38, IVYSAUR
+ db 38, STARMIE
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (15)
+ db "EMMA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, POLIWHIRL
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (16)
+ db "CYBIL@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 25, BUTTERFREE
+ db CONFUSION
+ db SLEEP_POWDER
+ db WHIRLWIND
+ db GUST
+
+ db 25, BELLOSSOM
+ db ABSORB
+ db STUN_SPORE
+ db ACID
+ db SOLARBEAM
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (17)
+ db "JENN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, STARYU
+ db 26, STARMIE
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (18)
+ db "BETH@"
+ db TRAINERTYPE_ITEM_MOVES
+
+ ; party
+
+ db 43, RAPIDASH, FOCUS_BAND
+ db STOMP
+ db FIRE_SPIN
+ db FURY_ATTACK
+ db FIRE_BLAST
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (19)
+ db "REENA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, STARMIE
+ db 36, NIDOQUEEN
+ db 34, STARMIE
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (20)
+ db "REENA@"
+ db TRAINERTYPE_ITEM_MOVES
+
+ ; party
+
+ db 38, STARMIE, NO_ITEM
+ db DOUBLE_TEAM
+ db PSYCHIC_M
+ db WATERFALL
+ db CONFUSE_RAY
+
+ db 40, NIDOQUEEN, PINK_BOW
+ db EARTHQUAKE
+ db DOUBLE_KICK
+ db TOXIC
+ db BODY_SLAM
+
+ db 38, STARMIE, NO_ITEM
+ db BLIZZARD
+ db PSYCHIC_M
+ db WATERFALL
+ db RECOVER
+
+ db $ff ; end
+
+; ================
+
+ ; COOLTRAINERF (21)
+ db "CARA@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 33, HORSEA
+ db SMOKESCREEN
+ db LEER
+ db WHIRLPOOL
+ db TWISTER
+
+ db 33, HORSEA
+ db SMOKESCREEN
+ db LEER
+ db WHIRLPOOL
+ db TWISTER
+
+ db 35, SEADRA
+ db SWIFT
+ db LEER
+ db WATERFALL
+ db TWISTER
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+BeautyGroup:
+; ================================
+; ================
+
+ ; BEAUTY (1)
+ db "VICTORIA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 9, SENTRET
+ db 13, SENTRET
+ db 17, SENTRET
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (2)
+ db "SAMANTHA@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 16, MEOWTH
+ db SCRATCH
+ db GROWL
+ db BITE
+ db PAY_DAY
+
+ db 16, MEOWTH
+ db SCRATCH
+ db GROWL
+ db BITE
+ db SLASH
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (3)
+ db "JULIE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, SENTRET
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (4)
+ db "JACLYN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, SENTRET
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (5)
+ db "BRENDA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 16, FURRET
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (6)
+ db "CASSIE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, VILEPLUME
+ db 34, BUTTERFREE
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (7)
+ db "CAROLINE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, MARILL
+ db 32, SEEL
+ db 30, MARILL
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (8)
+ db "CARLENE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, SENTRET
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (9)
+ db "JESSICA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, SENTRET
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (10)
+ db "RACHAEL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, SENTRET
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (11)
+ db "ANGELICA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, SENTRET
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (12)
+ db "KENDRA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, SENTRET
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (13)
+ db "VERONICA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, SENTRET
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (14)
+ db "JULIA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, PARAS
+ db 32, EXEGGCUTE
+ db 35, PARASECT
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (15)
+ db "THERESA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, SENTRET
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (16)
+ db "VALERIE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 17, HOPPIP
+ db SYNTHESIS
+ db TAIL_WHIP
+ db TACKLE
+ db POISONPOWDER
+
+ db 17, SKIPLOOM
+ db SYNTHESIS
+ db TAIL_WHIP
+ db TACKLE
+ db STUN_SPORE
+
+ db $ff ; end
+
+; ================
+
+ ; BEAUTY (17)
+ db "OLIVIA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 19, CORSOLA
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+PokemaniacGroup:
+; ================================
+; ================
+
+ ; POKEMANIAC (1)
+ db "LARRY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 10, SLOWPOKE
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (2)
+ db "ANDREW@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, MAROWAK
+ db 24, MAROWAK
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (3)
+ db "CALVIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 26, KANGASKHAN
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (4)
+ db "SHANE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 16, NIDORINA
+ db 16, NIDORINO
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (5)
+ db "BEN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 19, SLOWBRO
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (6)
+ db "BRENT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 19, LICKITUNG
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (7)
+ db "RON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 19, NIDOKING
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (8)
+ db "ETHAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 31, RHYHORN
+ db 31, RHYDON
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (9)
+ db "BRENT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 25, KANGASKHAN
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (10)
+ db "BRENT@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 36, PORYGON
+ db RECOVER
+ db PSYCHIC_M
+ db CONVERSION2
+ db TRI_ATTACK
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (11)
+ db "ISSAC@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 12, LICKITUNG
+ db LICK
+ db SUPERSONIC
+ db CUT
+ db 0
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (12)
+ db "DONALD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 10, SLOWPOKE
+ db 10, SLOWPOKE
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (13)
+ db "ZACH@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, RHYHORN
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (14)
+ db "BRENT@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 41, CHANSEY
+ db ROLLOUT
+ db ATTRACT
+ db EGG_BOMB
+ db SOFTBOILED
+
+ db $ff ; end
+
+; ================
+
+ ; POKEMANIAC (15)
+ db "MILLER@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, NIDOKING
+ db 17, NIDOQUEEN
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+GruntMGroup:
+; ================================
+; ================
+
+ ; GRUNTM (1)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 14, KOFFING
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (2)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 7, RATTATA
+ db 9, ZUBAT
+ db 9, ZUBAT
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (3)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, RATICATE
+ db 24, RATICATE
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (4)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 23, GRIMER
+ db 23, GRIMER
+ db 25, MUK
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (5)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 21, RATTATA
+ db 21, RATTATA
+ db 23, RATTATA
+ db 23, RATTATA
+ db 23, RATTATA
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (6)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 26, ZUBAT
+ db 26, ZUBAT
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (7)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 23, KOFFING
+ db 23, GRIMER
+ db 23, ZUBAT
+ db 23, RATTATA
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (8)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 26, WEEZING
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (9)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, RATICATE
+ db 26, KOFFING
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (10)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 22, ZUBAT
+ db 24, GOLBAT
+ db 22, GRIMER
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (11)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 23, MUK
+ db 23, KOFFING
+ db 25, RATTATA
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (12)
+ db "EXECUTIVE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 33, HOUNDOUR
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (13)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, RATTATA
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (14)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, RATICATE
+ db 24, GOLBAT
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (15)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 26, GRIMER
+ db 23, WEEZING
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (16)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 16, RATTATA
+ db 16, RATTATA
+ db 16, RATTATA
+ db 16, RATTATA
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (17)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 18, GOLBAT
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (18)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, RATTATA
+ db 17, ZUBAT
+ db 17, RATTATA
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (19)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 18, VENONAT
+ db 18, VENONAT
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (20)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, DROWZEE
+ db 19, ZUBAT
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (21)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 16, ZUBAT
+ db 17, GRIMER
+ db 18, RATTATA
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (22)
+ db "EXECUTIVE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 36, GOLBAT
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (23)
+ db "EXECUTIVE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, KOFFING
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (24)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 25, KOFFING
+ db 25, KOFFING
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (25)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, KOFFING
+ db 24, MUK
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (26)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, RATTATA
+ db 15, RATTATA
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (27)
+ db "EXECUTIVE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 22, ZUBAT
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (28)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 19, RATICATE
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (29)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 9, RATTATA
+ db 9, RATTATA
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (30)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 25, GOLBAT
+ db 25, GOLBAT
+ db 30, ARBOK
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTM (31)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, GOLBAT
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+GentlemanGroup:
+; ================================
+; ================
+
+ ; GENTLEMAN (1)
+ db "PRESTON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 18, GROWLITHE
+ db 18, GROWLITHE
+
+ db $ff ; end
+
+; ================
+
+ ; GENTLEMAN (2)
+ db "EDWARD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 33, PERSIAN
+
+ db $ff ; end
+
+; ================
+
+ ; GENTLEMAN (3)
+ db "GREGORY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 37, PIKACHU
+ db 33, FLAAFFY
+
+ db $ff ; end
+
+; ================
+
+ ; GENTLEMAN (4)
+ db "VIRGIL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, PONYTA
+
+ db $ff ; end
+
+; ================
+
+ ; GENTLEMAN (5)
+ db "ALFRED@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, NOCTOWL
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+SkierGroup:
+; ================================
+; ================
+
+ ; SKIER (1)
+ db "ROXANNE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, JYNX
+
+ db $ff ; end
+
+; ================
+
+ ; SKIER (2)
+ db "CLARISSA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, DEWGONG
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+TeacherGroup:
+; ================================
+; ================
+
+ ; TEACHER (1)
+ db "COLETTE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 36, CLEFAIRY
+
+ db $ff ; end
+
+; ================
+
+ ; TEACHER (2)
+ db "HILLARY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, AIPOM
+ db 36, CUBONE
+
+ db $ff ; end
+
+; ================
+
+ ; TEACHER (3)
+ db "SHIRLEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 35, JIGGLYPUFF
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+SabrinaGroup:
+; ================================
+; ================
+
+ ; SABRINA (1)
+ db "SABRINA@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 46, ESPEON
+ db SAND_ATTACK
+ db QUICK_ATTACK
+ db SWIFT
+ db PSYCHIC_M
+
+ db 46, MR__MIME
+ db BARRIER
+ db REFLECT
+ db BATON_PASS
+ db PSYCHIC_M
+
+ db 48, ALAKAZAM
+ db RECOVER
+ db FUTURE_SIGHT
+ db PSYCHIC_M
+ db REFLECT
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+BugCatcherGroup:
+; ================================
+; ================
+
+ ; BUG_CATCHER (1)
+ db "DON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 3, CATERPIE
+ db 3, CATERPIE
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (2)
+ db "ROB@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, BEEDRILL
+ db 32, BUTTERFREE
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (3)
+ db "ED@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, BEEDRILL
+ db 30, BEEDRILL
+ db 30, BEEDRILL
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (4)
+ db "WADE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 2, CATERPIE
+ db 2, CATERPIE
+ db 3, WEEDLE
+ db 2, CATERPIE
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (5)
+ db "BENNY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 7, WEEDLE
+ db 9, KAKUNA
+ db 12, BEEDRILL
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (6)
+ db "AL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 12, CATERPIE
+ db 12, WEEDLE
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (7)
+ db "JOSH@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 13, PARAS
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (8)
+ db "ARNIE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, VENONAT
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (9)
+ db "KEN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, ARIADOS
+ db 32, PINSIR
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (10)
+ db "WADE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 9, METAPOD
+ db 9, METAPOD
+ db 10, KAKUNA
+ db 9, METAPOD
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (11)
+ db "WADE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 14, BUTTERFREE
+ db 14, BUTTERFREE
+ db 15, BEEDRILL
+ db 14, BUTTERFREE
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (12)
+ db "DOUG@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, ARIADOS
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (13)
+ db "ARNIE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 19, VENONAT
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (14)
+ db "ARNIE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 28, VENOMOTH
+ db DISABLE
+ db SUPERSONIC
+ db CONFUSION
+ db LEECH_LIFE
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (15)
+ db "WADE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 24, BUTTERFREE
+ db CONFUSION
+ db POISONPOWDER
+ db SUPERSONIC
+ db WHIRLWIND
+
+ db 24, BUTTERFREE
+ db CONFUSION
+ db STUN_SPORE
+ db SUPERSONIC
+ db WHIRLWIND
+
+ db 25, BEEDRILL
+ db FURY_ATTACK
+ db FOCUS_ENERGY
+ db TWINEEDLE
+ db RAGE
+
+ db 24, BUTTERFREE
+ db CONFUSION
+ db SLEEP_POWDER
+ db SUPERSONIC
+ db WHIRLWIND
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (16)
+ db "WADE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 30, BUTTERFREE
+ db CONFUSION
+ db POISONPOWDER
+ db SUPERSONIC
+ db GUST
+
+ db 30, BUTTERFREE
+ db CONFUSION
+ db STUN_SPORE
+ db SUPERSONIC
+ db GUST
+
+ db 32, BEEDRILL
+ db FURY_ATTACK
+ db PURSUIT
+ db TWINEEDLE
+ db DOUBLE_TEAM
+
+ db 34, BUTTERFREE
+ db PSYBEAM
+ db SLEEP_POWDER
+ db GUST
+ db WHIRLWIND
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (17)
+ db "ARNIE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 36, VENOMOTH
+ db GUST
+ db SUPERSONIC
+ db PSYBEAM
+ db LEECH_LIFE
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (18)
+ db "ARNIE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 40, VENOMOTH
+ db GUST
+ db SUPERSONIC
+ db PSYCHIC_M
+ db TOXIC
+
+ db $ff ; end
+
+; ================
+
+ ; BUG_CATCHER (19)
+ db "WAYNE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 8, LEDYBA
+ db 10, PARAS
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+FisherGroup:
+; ================================
+; ================
+
+ ; FISHER (1)
+ db "JUSTIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 5, MAGIKARP
+ db 5, MAGIKARP
+ db 15, MAGIKARP
+ db 5, MAGIKARP
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (2)
+ db "RALPH@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 10, GOLDEEN
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (3)
+ db "ARNOLD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, TENTACRUEL
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (4)
+ db "KYLE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, SEAKING
+ db 31, POLIWHIRL
+ db 31, SEAKING
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (5)
+ db "HENRY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 8, POLIWAG
+ db 8, POLIWAG
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (6)
+ db "MARVIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 10, MAGIKARP
+ db 10, GYARADOS
+ db 15, MAGIKARP
+ db 15, GYARADOS
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (7)
+ db "TULLY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 18, QWILFISH
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (8)
+ db "ANDRE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, GYARADOS
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (9)
+ db "RAYMOND@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 22, MAGIKARP
+ db 22, MAGIKARP
+ db 22, MAGIKARP
+ db 22, MAGIKARP
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (10)
+ db "WILTON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 23, GOLDEEN
+ db 23, GOLDEEN
+ db 25, SEAKING
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (11)
+ db "EDGAR@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 25, REMORAID
+ db LOCK_ON
+ db PSYBEAM
+ db AURORA_BEAM
+ db BUBBLEBEAM
+
+ db 25, REMORAID
+ db LOCK_ON
+ db PSYBEAM
+ db AURORA_BEAM
+ db BUBBLEBEAM
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (12)
+ db "JONAH@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 25, SHELLDER
+ db 29, OCTILLERY
+ db 25, REMORAID
+ db 29, CLOYSTER
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (13)
+ db "MARTIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, REMORAID
+ db 32, REMORAID
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (14)
+ db "STEPHEN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 25, MAGIKARP
+ db 25, MAGIKARP
+ db 31, QWILFISH
+ db 31, TENTACRUEL
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (15)
+ db "BARNEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, GYARADOS
+ db 30, GYARADOS
+ db 30, GYARADOS
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (16)
+ db "RALPH@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, GOLDEEN
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (17)
+ db "RALPH@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, QWILFISH
+ db 19, GOLDEEN
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (18)
+ db "TULLY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 23, QWILFISH
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (19)
+ db "TULLY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, GOLDEEN
+ db 32, GOLDEEN
+ db 32, QWILFISH
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (20)
+ db "WILTON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 29, GOLDEEN
+ db 29, GOLDEEN
+ db 32, SEAKING
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (21)
+ db "SCOTT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, QWILFISH
+ db 30, QWILFISH
+ db 34, SEAKING
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (22)
+ db "WILTON@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 34, SEAKING
+ db SUPERSONIC
+ db WATERFALL
+ db FLAIL
+ db FURY_ATTACK
+
+ db 34, SEAKING
+ db SUPERSONIC
+ db WATERFALL
+ db FLAIL
+ db FURY_ATTACK
+
+ db 38, REMORAID
+ db PSYBEAM
+ db AURORA_BEAM
+ db BUBBLEBEAM
+ db HYPER_BEAM
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (23)
+ db "RALPH@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, QWILFISH
+ db 32, GOLDEEN
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (24)
+ db "RALPH@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 35, QWILFISH
+ db TOXIC
+ db MINIMIZE
+ db SURF
+ db PIN_MISSILE
+
+ db 39, SEAKING
+ db ENDURE
+ db FLAIL
+ db FURY_ATTACK
+ db WATERFALL
+
+ db $ff ; end
+
+; ================
+
+ ; FISHER (25)
+ db "TULLY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 34, SEAKING
+ db SUPERSONIC
+ db RAIN_DANCE
+ db WATERFALL
+ db FURY_ATTACK
+
+ db 34, SEAKING
+ db SUPERSONIC
+ db RAIN_DANCE
+ db WATERFALL
+ db FURY_ATTACK
+
+ db 37, QWILFISH
+ db ROLLOUT
+ db SURF
+ db PIN_MISSILE
+ db TAKE_DOWN
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+SwimmerMGroup:
+; ================================
+; ================
+
+ ; SWIMMERM (1)
+ db "HAROLD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, REMORAID
+ db 30, SEADRA
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (2)
+ db "SIMON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, TENTACOOL
+ db 20, TENTACOOL
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (3)
+ db "RANDALL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 18, SHELLDER
+ db 20, WARTORTLE
+ db 18, SHELLDER
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (4)
+ db "CHARLIE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 21, SHELLDER
+ db 19, TENTACOOL
+ db 19, TENTACRUEL
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (5)
+ db "GEORGE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 16, TENTACOOL
+ db 17, TENTACOOL
+ db 16, TENTACOOL
+ db 19, STARYU
+ db 17, TENTACOOL
+ db 19, REMORAID
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (6)
+ db "BERKE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 23, QWILFISH
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (7)
+ db "KIRK@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, GYARADOS
+ db 20, GYARADOS
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (8)
+ db "MATHEW@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 23, KRABBY
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (9)
+ db "HAL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, SEEL
+ db 25, DEWGONG
+ db 24, SEEL
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (10)
+ db "PATON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 26, PILOSWINE
+ db 26, PILOSWINE
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (11)
+ db "DARYL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, SHELLDER
+ db 25, CLOYSTER
+ db 24, SHELLDER
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (12)
+ db "WALTER@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, HORSEA
+ db 15, HORSEA
+ db 20, SEADRA
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (13)
+ db "TONY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 13, STARYU
+ db 18, STARMIE
+ db 16, HORSEA
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (14)
+ db "JEROME@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 26, SEADRA
+ db 28, TENTACOOL
+ db 30, TENTACRUEL
+ db 28, GOLDEEN
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (15)
+ db "TUCKER@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, SHELLDER
+ db 34, CLOYSTER
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (16)
+ db "RICK@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 13, STARYU
+ db 18, STARMIE
+ db 16, HORSEA
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (17)
+ db "CAMERON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, MARILL
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (18)
+ db "SETH@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 29, QUAGSIRE
+ db 29, OCTILLERY
+ db 32, QUAGSIRE
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (19)
+ db "JAMES@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 13, STARYU
+ db 18, STARMIE
+ db 16, HORSEA
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (20)
+ db "LEWIS@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 13, STARYU
+ db 18, STARMIE
+ db 16, HORSEA
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERM (21)
+ db "PARKER@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, HORSEA
+ db 32, HORSEA
+ db 35, SEADRA
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+SwimmerFGroup:
+; ================================
+; ================
+
+ ; SWIMMERF (1)
+ db "ELAINE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 21, STARYU
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (2)
+ db "PAULA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 19, STARYU
+ db 19, SHELLDER
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (3)
+ db "KAYLEE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 18, GOLDEEN
+ db 20, GOLDEEN
+ db 20, SEAKING
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (4)
+ db "SUSIE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 20, PSYDUCK
+ db SCRATCH
+ db TAIL_WHIP
+ db DISABLE
+ db CONFUSION
+
+ db 22, GOLDEEN
+ db PECK
+ db TAIL_WHIP
+ db SUPERSONIC
+ db HORN_ATTACK
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (5)
+ db "DENISE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 22, SEEL
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (6)
+ db "KARA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, STARYU
+ db 20, STARMIE
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (7)
+ db "WENDY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 21, HORSEA
+ db BUBBLE
+ db SMOKESCREEN
+ db LEER
+ db WATER_GUN
+
+ db 21, HORSEA
+ db DRAGON_RAGE
+ db SMOKESCREEN
+ db LEER
+ db WATER_GUN
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (8)
+ db "LISA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, JYNX
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (9)
+ db "JILL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, DEWGONG
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (10)
+ db "MARY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, SEAKING
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (11)
+ db "KATIE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 33, DEWGONG
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (12)
+ db "DAWN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, SEAKING
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (13)
+ db "TARA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, SEAKING
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (14)
+ db "NICOLE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 29, MARILL
+ db 29, MARILL
+ db 32, LAPRAS
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (15)
+ db "LORI@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, STARMIE
+ db 32, STARMIE
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (16)
+ db "JODY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, SEAKING
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (17)
+ db "NIKKI@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, SEEL
+ db 28, SEEL
+ db 28, SEEL
+ db 28, DEWGONG
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (18)
+ db "DIANA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 37, GOLDUCK
+
+ db $ff ; end
+
+; ================
+
+ ; SWIMMERF (19)
+ db "BRIANA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 35, SEAKING
+ db 35, SEAKING
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+SailorGroup:
+; ================================
+; ================
+
+ ; SAILOR (1)
+ db "EUGENE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, POLIWHIRL
+ db 17, RATICATE
+ db 19, KRABBY
+
+ db $ff ; end
+
+; ================
+
+ ; SAILOR (2)
+ db "HUEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 18, POLIWAG
+ db 18, POLIWHIRL
+
+ db $ff ; end
+
+; ================
+
+ ; SAILOR (3)
+ db "TERRELL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, POLIWHIRL
+
+ db $ff ; end
+
+; ================
+
+ ; SAILOR (4)
+ db "KENT@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 18, KRABBY
+ db BUBBLE
+ db LEER
+ db VICEGRIP
+ db HARDEN
+
+ db 20, KRABBY
+ db BUBBLEBEAM
+ db LEER
+ db VICEGRIP
+ db HARDEN
+
+ db $ff ; end
+
+; ================
+
+ ; SAILOR (5)
+ db "ERNEST@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 18, MACHOP
+ db 18, MACHOP
+ db 18, POLIWHIRL
+
+ db $ff ; end
+
+; ================
+
+ ; SAILOR (6)
+ db "JEFF@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, RATICATE
+ db 32, RATICATE
+
+ db $ff ; end
+
+; ================
+
+ ; SAILOR (7)
+ db "GARRETT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, KINGLER
+
+ db $ff ; end
+
+; ================
+
+ ; SAILOR (8)
+ db "KENNETH@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, MACHOP
+ db 28, MACHOP
+ db 28, POLIWRATH
+ db 28, MACHOP
+
+ db $ff ; end
+
+; ================
+
+ ; SAILOR (9)
+ db "STANLY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 31, MACHOP
+ db 33, MACHOKE
+ db 26, PSYDUCK
+
+ db $ff ; end
+
+; ================
+
+ ; SAILOR (10)
+ db "HARRY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 19, WOOPER
+
+ db $ff ; end
+
+; ================
+
+ ; SAILOR (11)
+ db "HUEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, POLIWHIRL
+ db 28, POLIWHIRL
+
+ db $ff ; end
+
+; ================
+
+ ; SAILOR (12)
+ db "HUEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, POLIWHIRL
+ db 34, POLIWRATH
+
+ db $ff ; end
+
+; ================
+
+ ; SAILOR (13)
+ db "HUEY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 38, POLITOED
+ db WHIRLPOOL
+ db RAIN_DANCE
+ db BODY_SLAM
+ db PERISH_SONG
+
+ db 38, POLIWRATH
+ db SURF
+ db STRENGTH
+ db ICE_PUNCH
+ db SUBMISSION
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+SuperNerdGroup:
+; ================================
+; ================
+
+ ; SUPER_NERD (1)
+ db "STAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, GRIMER
+
+ db $ff ; end
+
+; ================
+
+ ; SUPER_NERD (2)
+ db "ERIC@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 11, GRIMER
+ db 11, GRIMER
+
+ db $ff ; end
+
+; ================
+
+ ; SUPER_NERD (3)
+ db "GREGG@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, MAGNEMITE
+ db 20, MAGNEMITE
+ db 20, MAGNEMITE
+
+ db $ff ; end
+
+; ================
+
+ ; SUPER_NERD (4)
+ db "JAY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 22, KOFFING
+ db 22, KOFFING
+
+ db $ff ; end
+
+; ================
+
+ ; SUPER_NERD (5)
+ db "DAVE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, DITTO
+
+ db $ff ; end
+
+; ================
+
+ ; SUPER_NERD (6)
+ db "SAM@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, GRIMER
+ db 34, MUK
+
+ db $ff ; end
+
+; ================
+
+ ; SUPER_NERD (7)
+ db "TOM@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, MAGNEMITE
+ db 32, MAGNEMITE
+ db 32, MAGNEMITE
+
+ db $ff ; end
+
+; ================
+
+ ; SUPER_NERD (8)
+ db "PAT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 36, PORYGON
+
+ db $ff ; end
+
+; ================
+
+ ; SUPER_NERD (9)
+ db "SHAWN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 31, MAGNEMITE
+ db 33, MUK
+ db 31, MAGNEMITE
+
+ db $ff ; end
+
+; ================
+
+ ; SUPER_NERD (10)
+ db "TERU@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 7, MAGNEMITE
+ db 11, VOLTORB
+ db 7, MAGNEMITE
+ db 9, MAGNEMITE
+
+ db $ff ; end
+
+; ================
+
+ ; SUPER_NERD (11)
+ db "RUSS@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, MAGNEMITE
+ db 27, MAGNEMITE
+ db 27, MAGNEMITE
+
+ db $ff ; end
+
+; ================
+
+ ; SUPER_NERD (12)
+ db "NORTON@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 30, PORYGON
+ db CONVERSION
+ db CONVERSION2
+ db RECOVER
+ db TRI_ATTACK
+
+ db $ff ; end
+
+; ================
+
+ ; SUPER_NERD (13)
+ db "HUGH@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 39, SEADRA
+ db SMOKESCREEN
+ db TWISTER
+ db SURF
+ db WATERFALL
+
+ db $ff ; end
+
+; ================
+
+ ; SUPER_NERD (14)
+ db "MARKUS@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 19, SLOWPOKE
+ db CURSE
+ db WATER_GUN
+ db GROWL
+ db STRENGTH
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+Rival2Group:
+; ================================
+; ================
+
+ ; RIVAL2 (1)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 41, SNEASEL
+ db QUICK_ATTACK
+ db SCREECH
+ db FAINT_ATTACK
+ db FURY_CUTTER
+
+ db 42, GOLBAT
+ db LEECH_LIFE
+ db BITE
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db 41, MAGNETON
+ db THUNDERSHOCK
+ db SONICBOOM
+ db THUNDER_WAVE
+ db SWIFT
+
+ db 43, GENGAR
+ db MEAN_LOOK
+ db CURSE
+ db SHADOW_BALL
+ db CONFUSE_RAY
+
+ db 43, ALAKAZAM
+ db DISABLE
+ db RECOVER
+ db FUTURE_SIGHT
+ db PSYCHIC_M
+
+ db 45, MEGANIUM
+ db RAZOR_LEAF
+ db POISONPOWDER
+ db BODY_SLAM
+ db LIGHT_SCREEN
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL2 (2)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 41, SNEASEL
+ db QUICK_ATTACK
+ db SCREECH
+ db FAINT_ATTACK
+ db FURY_CUTTER
+
+ db 42, GOLBAT
+ db LEECH_LIFE
+ db BITE
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db 41, MAGNETON
+ db THUNDERSHOCK
+ db SONICBOOM
+ db THUNDER_WAVE
+ db SWIFT
+
+ db 43, GENGAR
+ db MEAN_LOOK
+ db CURSE
+ db SHADOW_BALL
+ db CONFUSE_RAY
+
+ db 43, ALAKAZAM
+ db DISABLE
+ db RECOVER
+ db FUTURE_SIGHT
+ db PSYCHIC_M
+
+ db 45, TYPHLOSION
+ db SMOKESCREEN
+ db QUICK_ATTACK
+ db FLAME_WHEEL
+ db SWIFT
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL2 (3)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 41, SNEASEL
+ db QUICK_ATTACK
+ db SCREECH
+ db FAINT_ATTACK
+ db FURY_CUTTER
+
+ db 42, GOLBAT
+ db LEECH_LIFE
+ db BITE
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db 41, MAGNETON
+ db THUNDERSHOCK
+ db SONICBOOM
+ db THUNDER_WAVE
+ db SWIFT
+
+ db 43, GENGAR
+ db MEAN_LOOK
+ db CURSE
+ db SHADOW_BALL
+ db CONFUSE_RAY
+
+ db 43, ALAKAZAM
+ db DISABLE
+ db RECOVER
+ db FUTURE_SIGHT
+ db PSYCHIC_M
+
+ db 45, FERALIGATR
+ db RAGE
+ db WATER_GUN
+ db SCARY_FACE
+ db SLASH
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL2 (4)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 45, SNEASEL
+ db QUICK_ATTACK
+ db SCREECH
+ db FAINT_ATTACK
+ db FURY_CUTTER
+
+ db 48, CROBAT
+ db TOXIC
+ db BITE
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db 45, MAGNETON
+ db THUNDER
+ db SONICBOOM
+ db THUNDER_WAVE
+ db SWIFT
+
+ db 46, GENGAR
+ db MEAN_LOOK
+ db CURSE
+ db SHADOW_BALL
+ db CONFUSE_RAY
+
+ db 46, ALAKAZAM
+ db RECOVER
+ db FUTURE_SIGHT
+ db PSYCHIC_M
+ db REFLECT
+
+ db 50, MEGANIUM
+ db GIGA_DRAIN
+ db BODY_SLAM
+ db LIGHT_SCREEN
+ db SAFEGUARD
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL2 (5)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 45, SNEASEL
+ db QUICK_ATTACK
+ db SCREECH
+ db FAINT_ATTACK
+ db FURY_CUTTER
+
+ db 48, CROBAT
+ db TOXIC
+ db BITE
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db 45, MAGNETON
+ db THUNDER
+ db SONICBOOM
+ db THUNDER_WAVE
+ db SWIFT
+
+ db 46, GENGAR
+ db MEAN_LOOK
+ db CURSE
+ db SHADOW_BALL
+ db CONFUSE_RAY
+
+ db 46, ALAKAZAM
+ db RECOVER
+ db FUTURE_SIGHT
+ db PSYCHIC_M
+ db REFLECT
+
+ db 50, TYPHLOSION
+ db SMOKESCREEN
+ db QUICK_ATTACK
+ db FIRE_BLAST
+ db SWIFT
+
+ db $ff ; end
+
+; ================
+
+ ; RIVAL2 (6)
+ db "?@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 45, SNEASEL
+ db QUICK_ATTACK
+ db SCREECH
+ db FAINT_ATTACK
+ db FURY_CUTTER
+
+ db 48, CROBAT
+ db TOXIC
+ db BITE
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db 45, MAGNETON
+ db THUNDER
+ db SONICBOOM
+ db THUNDER_WAVE
+ db SWIFT
+
+ db 46, GENGAR
+ db MEAN_LOOK
+ db CURSE
+ db SHADOW_BALL
+ db CONFUSE_RAY
+
+ db 46, ALAKAZAM
+ db RECOVER
+ db FUTURE_SIGHT
+ db PSYCHIC_M
+ db REFLECT
+
+ db 50, FERALIGATR
+ db SURF
+ db RAIN_DANCE
+ db SLASH
+ db SCREECH
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+GuitaristGroup:
+; ================================
+; ================
+
+ ; GUITARIST (1)
+ db "CLYDE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, ELECTABUZZ
+
+ db $ff ; end
+
+; ================
+
+ ; GUITARIST (2)
+ db "VINCENT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, MAGNEMITE
+ db 33, VOLTORB
+ db 32, MAGNEMITE
+ db 32, MAGNEMITE
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+HikerGroup:
+; ================================
+; ================
+
+ ; HIKER (1)
+ db "ANTHONY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 16, GEODUDE
+ db 18, MACHAMP
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (2)
+ db "RUSSELL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 4, GEODUDE
+ db 6, GEODUDE
+ db 8, GEODUDE
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (3)
+ db "PHILLIP@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 23, GEODUDE
+ db 23, GEODUDE
+ db 23, GRAVELER
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (4)
+ db "LEONARD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 23, GEODUDE
+ db 25, MACHOP
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (5)
+ db "ANTHONY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 11, GEODUDE
+ db 11, MACHOP
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (6)
+ db "BENJAMIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 14, DIGLETT
+ db 14, GEODUDE
+ db 16, DUGTRIO
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (7)
+ db "ERIK@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, MACHOP
+ db 27, GRAVELER
+ db 27, MACHOP
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (8)
+ db "MICHAEL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 25, GEODUDE
+ db 25, GRAVELER
+ db 25, GOLEM
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (9)
+ db "PARRY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 35, ONIX
+ db 33, SWINUB
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (10)
+ db "TIMOTHY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 27, DIGLETT
+ db MAGNITUDE
+ db DIG
+ db SAND_ATTACK
+ db SLASH
+
+ db 27, DUGTRIO
+ db MAGNITUDE
+ db DIG
+ db SAND_ATTACK
+ db SLASH
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (11)
+ db "BAILEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 13, GEODUDE
+ db 13, GEODUDE
+ db 13, GEODUDE
+ db 13, GEODUDE
+ db 13, GEODUDE
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (12)
+ db "ANTHONY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 25, GRAVELER
+ db 27, GRAVELER
+ db 29, MACHOKE
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (13)
+ db "TIM@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 31, GRAVELER
+ db 31, GRAVELER
+ db 31, GRAVELER
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (14)
+ db "NOLAND@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 31, SANDSLASH
+ db 33, GOLEM
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (15)
+ db "SIDNEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, DUGTRIO
+ db 32, ONIX
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (16)
+ db "KENNY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, SANDSLASH
+ db 29, GRAVELER
+ db 31, GOLEM
+ db 29, GRAVELER
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (17)
+ db "JIM@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 35, MACHAMP
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (18)
+ db "DANIEL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 11, ONIX
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (19)
+ db "PARRY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 35, PILOSWINE
+ db EARTHQUAKE
+ db BLIZZARD
+ db REST
+ db TAKE_DOWN
+
+ db 35, DUGTRIO
+ db MAGNITUDE
+ db DIG
+ db MUD_SLAP
+ db SLASH
+
+ db 38, STEELIX
+ db DIG
+ db IRON_TAIL
+ db SANDSTORM
+ db SLAM
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (20)
+ db "PARRY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 29, ONIX
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (21)
+ db "ANTHONY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, GRAVELER
+ db 30, GRAVELER
+ db 32, MACHOKE
+
+ db $ff ; end
+
+; ================
+
+ ; HIKER (22)
+ db "ANTHONY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 34, GRAVELER
+ db MAGNITUDE
+ db SELFDESTRUCT
+ db DEFENSE_CURL
+ db ROLLOUT
+
+ db 36, GOLEM
+ db MAGNITUDE
+ db SELFDESTRUCT
+ db DEFENSE_CURL
+ db ROLLOUT
+
+ db 34, MACHOKE
+ db KARATE_CHOP
+ db VITAL_THROW
+ db HEADBUTT
+ db DIG
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+BikerGroup:
+; ================================
+; ================
+
+ ; BIKER (1)
+ db "BENNY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, KOFFING
+ db 20, KOFFING
+ db 20, KOFFING
+
+ db $ff ; end
+
+; ================
+
+ ; BIKER (2)
+ db "KAZU@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, KOFFING
+ db 20, KOFFING
+ db 20, KOFFING
+
+ db $ff ; end
+
+; ================
+
+ ; BIKER (3)
+ db "DWAYNE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, KOFFING
+ db 28, KOFFING
+ db 29, KOFFING
+ db 30, KOFFING
+
+ db $ff ; end
+
+; ================
+
+ ; BIKER (4)
+ db "HARRIS@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, FLAREON
+
+ db $ff ; end
+
+; ================
+
+ ; BIKER (5)
+ db "ZEKE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, KOFFING
+ db 32, KOFFING
+
+ db $ff ; end
+
+; ================
+
+ ; BIKER (6)
+ db "CHARLES@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, KOFFING
+ db 30, CHARMELEON
+ db 30, WEEZING
+
+ db $ff ; end
+
+; ================
+
+ ; BIKER (7)
+ db "RILEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, WEEZING
+
+ db $ff ; end
+
+; ================
+
+ ; BIKER (8)
+ db "JOEL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, MAGMAR
+ db 32, MAGMAR
+
+ db $ff ; end
+
+; ================
+
+ ; BIKER (9)
+ db "GLENN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, KOFFING
+ db 30, MAGMAR
+ db 32, WEEZING
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+BlaineGroup:
+; ================================
+; ================
+
+ ; BLAINE (1)
+ db "BLAINE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 45, MAGCARGO
+ db CURSE
+ db SMOG
+ db FLAMETHROWER
+ db ROCK_SLIDE
+
+ db 45, MAGMAR
+ db THUNDERPUNCH
+ db FIRE_PUNCH
+ db SUNNY_DAY
+ db CONFUSE_RAY
+
+ db 50, RAPIDASH
+ db QUICK_ATTACK
+ db FIRE_SPIN
+ db FURY_ATTACK
+ db FIRE_BLAST
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+BurglarGroup:
+; ================================
+; ================
+
+ ; BURGLAR (1)
+ db "DUNCAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 23, KOFFING
+ db 25, MAGMAR
+ db 23, KOFFING
+
+ db $ff ; end
+
+; ================
+
+ ; BURGLAR (2)
+ db "EDDIE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 26, GROWLITHE
+ db ROAR
+ db EMBER
+ db LEER
+ db TAKE_DOWN
+
+ db 24, KOFFING
+ db TACKLE
+ db SMOG
+ db SLUDGE
+ db SMOKESCREEN
+
+ db $ff ; end
+
+; ================
+
+ ; BURGLAR (3)
+ db "COREY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 25, KOFFING
+ db 28, MAGMAR
+ db 25, KOFFING
+ db 30, KOFFING
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+FirebreatherGroup:
+; ================================
+; ================
+
+ ; FIREBREATHER (1)
+ db "OTIS@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 29, MAGMAR
+ db 32, WEEZING
+ db 29, MAGMAR
+
+ db $ff ; end
+
+; ================
+
+ ; FIREBREATHER (2)
+ db "DICK@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, CHARMELEON
+
+ db $ff ; end
+
+; ================
+
+ ; FIREBREATHER (3)
+ db "NED@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, KOFFING
+ db 16, GROWLITHE
+ db 15, KOFFING
+
+ db $ff ; end
+
+; ================
+
+ ; FIREBREATHER (4)
+ db "BURT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, KOFFING
+ db 32, SLUGMA
+
+ db $ff ; end
+
+; ================
+
+ ; FIREBREATHER (5)
+ db "BILL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 6, KOFFING
+ db 6, KOFFING
+
+ db $ff ; end
+
+; ================
+
+ ; FIREBREATHER (6)
+ db "WALT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 11, MAGMAR
+ db 13, MAGMAR
+
+ db $ff ; end
+
+; ================
+
+ ; FIREBREATHER (7)
+ db "RAY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 9, VULPIX
+
+ db $ff ; end
+
+; ================
+
+ ; FIREBREATHER (8)
+ db "LYLE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, KOFFING
+ db 31, FLAREON
+ db 28, KOFFING
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+JugglerGroup:
+; ================================
+; ================
+
+ ; JUGGLER (1)
+ db "IRWIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 2, VOLTORB
+ db 6, VOLTORB
+ db 10, VOLTORB
+ db 14, VOLTORB
+
+ db $ff ; end
+
+; ================
+
+ ; JUGGLER (2)
+ db "FRITZ@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 29, MR__MIME
+ db 29, MAGMAR
+ db 29, MACHOKE
+
+ db $ff ; end
+
+; ================
+
+ ; JUGGLER (3)
+ db "HORTON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 33, ELECTRODE
+ db 33, ELECTRODE
+ db 33, ELECTRODE
+ db 33, ELECTRODE
+
+ db $ff ; end
+
+; ================
+
+ ; JUGGLER (4)
+ db "IRWIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 6, VOLTORB
+ db 10, VOLTORB
+ db 14, VOLTORB
+ db 18, VOLTORB
+
+ db $ff ; end
+
+; ================
+
+ ; JUGGLER (5)
+ db "IRWIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 18, VOLTORB
+ db 22, VOLTORB
+ db 26, VOLTORB
+ db 30, ELECTRODE
+
+ db $ff ; end
+
+; ================
+
+ ; JUGGLER (6)
+ db "IRWIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 18, VOLTORB
+ db 22, VOLTORB
+ db 26, VOLTORB
+ db 30, ELECTRODE
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+BlackbeltGroup:
+; ================================
+; ================
+
+ ; BLACKBELT_T (1)
+ db "KENJI@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 27, ONIX
+ db 30, HITMONLEE
+ db 27, ONIX
+ db 32, MACHOKE
+
+ db $ff ; end
+
+; ================
+
+ ; BLACKBELT_T (2)
+ db "YOSHI@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 27, HITMONLEE
+ db DOUBLE_KICK
+ db MEDITATE
+ db JUMP_KICK
+ db FOCUS_ENERGY
+
+ db $ff ; end
+
+; ================
+
+ ; BLACKBELT_T (3)
+ db "KENJI@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 33, ONIX
+ db BIND
+ db ROCK_THROW
+ db TOXIC
+ db DIG
+
+ db 38, MACHAMP
+ db HEADBUTT
+ db SWAGGER
+ db THUNDERPUNCH
+ db VITAL_THROW
+
+ db 33, STEELIX
+ db EARTHQUAKE
+ db ROCK_THROW
+ db IRON_TAIL
+ db SANDSTORM
+
+ db 36, HITMONLEE
+ db DOUBLE_TEAM
+ db HI_JUMP_KICK
+ db MUD_SLAP
+ db SWIFT
+
+ db $ff ; end
+
+; ================
+
+ ; BLACKBELT_T (4)
+ db "LAO@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 27, HITMONCHAN
+ db COMET_PUNCH
+ db THUNDERPUNCH
+ db ICE_PUNCH
+ db FIRE_PUNCH
+
+ db $ff ; end
+
+; ================
+
+ ; BLACKBELT_T (5)
+ db "NOB@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 25, MACHOP
+ db LEER
+ db FOCUS_ENERGY
+ db KARATE_CHOP
+ db SEISMIC_TOSS
+
+ db 25, MACHOKE
+ db LEER
+ db KARATE_CHOP
+ db SEISMIC_TOSS
+ db ROCK_SLIDE
+
+ db $ff ; end
+
+; ================
+
+ ; BLACKBELT_T (6)
+ db "KIYO@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, HITMONLEE
+ db 34, HITMONCHAN
+
+ db $ff ; end
+
+; ================
+
+ ; BLACKBELT_T (7)
+ db "LUNG@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 23, MANKEY
+ db 23, MANKEY
+ db 25, PRIMEAPE
+
+ db $ff ; end
+
+; ================
+
+ ; BLACKBELT_T (8)
+ db "KENJI@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 28, MACHOKE
+
+ db $ff ; end
+
+; ================
+
+ ; BLACKBELT_T (9)
+ db "WAI@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, MACHOKE
+ db 32, MACHOKE
+ db 34, MACHOKE
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+ExecutiveMGroup:
+; ================================
+; ================
+
+ ; EXECUTIVEM (1)
+ db "EXECUTIVE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 33, HOUNDOUR
+ db EMBER
+ db ROAR
+ db BITE
+ db FAINT_ATTACK
+
+ db 33, KOFFING
+ db TACKLE
+ db SLUDGE
+ db SMOKESCREEN
+ db HAZE
+
+ db 35, HOUNDOOM
+ db EMBER
+ db SMOG
+ db BITE
+ db FAINT_ATTACK
+
+ db $ff ; end
+
+; ================
+
+ ; EXECUTIVEM (2)
+ db "EXECUTIVE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 36, GOLBAT
+ db LEECH_LIFE
+ db BITE
+ db CONFUSE_RAY
+ db WING_ATTACK
+
+ db $ff ; end
+
+; ================
+
+ ; EXECUTIVEM (3)
+ db "EXECUTIVE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 30, KOFFING
+ db TACKLE
+ db SELFDESTRUCT
+ db SLUDGE
+ db SMOKESCREEN
+
+ db 30, KOFFING
+ db TACKLE
+ db SELFDESTRUCT
+ db SLUDGE
+ db SMOKESCREEN
+
+ db 30, KOFFING
+ db TACKLE
+ db SELFDESTRUCT
+ db SLUDGE
+ db SMOKESCREEN
+
+ db 32, WEEZING
+ db TACKLE
+ db EXPLOSION
+ db SLUDGE
+ db SMOKESCREEN
+
+ db 30, KOFFING
+ db TACKLE
+ db SELFDESTRUCT
+ db SLUDGE
+ db SMOKESCREEN
+
+ db 30, KOFFING
+ db TACKLE
+ db SMOG
+ db SLUDGE
+ db SMOKESCREEN
+
+ db $ff ; end
+
+; ================
+
+ ; EXECUTIVEM (4)
+ db "EXECUTIVE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 22, ZUBAT
+ db 24, RATICATE
+ db 22, KOFFING
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+PsychicGroup:
+; ================================
+; ================
+
+ ; PSYCHIC_T (1)
+ db "NATHAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 26, GIRAFARIG
+
+ db $ff ; end
+
+; ================
+
+ ; PSYCHIC_T (2)
+ db "FRANKLIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 37, KADABRA
+
+ db $ff ; end
+
+; ================
+
+ ; PSYCHIC_T (3)
+ db "HERMAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, EXEGGCUTE
+ db 30, EXEGGCUTE
+ db 30, EXEGGUTOR
+
+ db $ff ; end
+
+; ================
+
+ ; PSYCHIC_T (4)
+ db "FIDEL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, XATU
+
+ db $ff ; end
+
+; ================
+
+ ; PSYCHIC_T (5)
+ db "GREG@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 17, DROWZEE
+ db HYPNOSIS
+ db DISABLE
+ db DREAM_EATER
+ db 0
+
+ db $ff ; end
+
+; ================
+
+ ; PSYCHIC_T (6)
+ db "NORMAN@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 17, SLOWPOKE
+ db TACKLE
+ db GROWL
+ db WATER_GUN
+ db 0
+
+ db 20, SLOWPOKE
+ db CURSE
+ db BODY_SLAM
+ db WATER_GUN
+ db CONFUSION
+
+ db $ff ; end
+
+; ================
+
+ ; PSYCHIC_T (7)
+ db "MARK@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 13, ABRA
+ db TELEPORT
+ db FLASH
+ db 0
+ db 0
+
+ db 13, ABRA
+ db TELEPORT
+ db FLASH
+ db 0
+ db 0
+
+ db 15, KADABRA
+ db TELEPORT
+ db KINESIS
+ db CONFUSION
+ db 0
+
+ db $ff ; end
+
+; ================
+
+ ; PSYCHIC_T (8)
+ db "PHIL@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 24, NATU
+ db LEER
+ db NIGHT_SHADE
+ db FUTURE_SIGHT
+ db CONFUSE_RAY
+
+ db 26, KADABRA
+ db DISABLE
+ db PSYBEAM
+ db RECOVER
+ db FUTURE_SIGHT
+
+ db $ff ; end
+
+; ================
+
+ ; PSYCHIC_T (9)
+ db "RICHARD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 36, ESPEON
+
+ db $ff ; end
+
+; ================
+
+ ; PSYCHIC_T (10)
+ db "GILBERT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, STARMIE
+ db 30, EXEGGCUTE
+ db 34, GIRAFARIG
+
+ db $ff ; end
+
+; ================
+
+ ; PSYCHIC_T (11)
+ db "JARED@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, MR__MIME
+ db 32, EXEGGCUTE
+ db 35, EXEGGCUTE
+
+ db $ff ; end
+
+; ================
+
+ ; PSYCHIC_T (12)
+ db "RODNEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 29, DROWZEE
+ db 33, HYPNO
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+PicnickerGroup:
+; ================================
+; ================
+
+ ; PICNICKER (1)
+ db "LIZ@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 9, NIDORAN_F
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (2)
+ db "GINA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 9, HOPPIP
+ db 9, HOPPIP
+ db 12, BULBASAUR
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (3)
+ db "BROOKE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 16, PIKACHU
+ db THUNDERSHOCK
+ db GROWL
+ db QUICK_ATTACK
+ db DOUBLE_TEAM
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (4)
+ db "KIM@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, VULPIX
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (5)
+ db "CINDY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 36, NIDOQUEEN
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (6)
+ db "HOPE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, FLAAFFY
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (7)
+ db "SHARON@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 31, FURRET
+ db 33, RAPIDASH
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (8)
+ db "DEBRA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 33, SEAKING
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (9)
+ db "GINA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 14, HOPPIP
+ db 14, HOPPIP
+ db 17, IVYSAUR
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (10)
+ db "ERIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 16, PONYTA
+ db 16, PONYTA
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (11)
+ db "LIZ@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, WEEPINBELL
+ db 15, NIDORINA
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (12)
+ db "LIZ@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 19, WEEPINBELL
+ db 19, NIDORINO
+ db 21, NIDOQUEEN
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (13)
+ db "HEIDI@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, SKIPLOOM
+ db 32, SKIPLOOM
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (14)
+ db "EDNA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, NIDORINA
+ db 34, RAICHU
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (15)
+ db "GINA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 26, SKIPLOOM
+ db 26, SKIPLOOM
+ db 29, IVYSAUR
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (16)
+ db "TIFFANY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 31, CLEFAIRY
+ db ENCORE
+ db SING
+ db DOUBLESLAP
+ db MINIMIZE
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (17)
+ db "TIFFANY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 37, CLEFAIRY
+ db ENCORE
+ db DOUBLESLAP
+ db MINIMIZE
+ db METRONOME
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (18)
+ db "ERIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, PONYTA
+ db 32, PONYTA
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (19)
+ db "TANYA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 37, EXEGGUTOR
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (20)
+ db "TIFFANY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 20, CLEFAIRY
+ db ENCORE
+ db SING
+ db DOUBLESLAP
+ db MINIMIZE
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (21)
+ db "ERIN@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 36, PONYTA
+ db DOUBLE_TEAM
+ db STOMP
+ db FIRE_SPIN
+ db SUNNY_DAY
+
+ db 34, RAICHU
+ db SWIFT
+ db MUD_SLAP
+ db QUICK_ATTACK
+ db THUNDERBOLT
+
+ db 36, PONYTA
+ db DOUBLE_TEAM
+ db STOMP
+ db FIRE_SPIN
+ db SUNNY_DAY
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (22)
+ db "LIZ@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, WEEPINBELL
+ db 26, NIDORINO
+ db 26, NIDOQUEEN
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (23)
+ db "LIZ@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 30, WEEPINBELL
+ db SLEEP_POWDER
+ db POISONPOWDER
+ db STUN_SPORE
+ db SLUDGE_BOMB
+
+ db 32, NIDOKING
+ db EARTHQUAKE
+ db DOUBLE_KICK
+ db POISON_STING
+ db IRON_TAIL
+
+ db 32, NIDOQUEEN
+ db EARTHQUAKE
+ db DOUBLE_KICK
+ db TAIL_WHIP
+ db BODY_SLAM
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (24)
+ db "GINA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, SKIPLOOM
+ db 30, SKIPLOOM
+ db 32, IVYSAUR
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (25)
+ db "GINA@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 33, JUMPLUFF
+ db STUN_SPORE
+ db SUNNY_DAY
+ db LEECH_SEED
+ db COTTON_SPORE
+
+ db 33, JUMPLUFF
+ db SUNNY_DAY
+ db SLEEP_POWDER
+ db LEECH_SEED
+ db COTTON_SPORE
+
+ db 38, VENUSAUR
+ db SOLARBEAM
+ db RAZOR_LEAF
+ db HEADBUTT
+ db MUD_SLAP
+
+ db $ff ; end
+
+; ================
+
+ ; PICNICKER (26)
+ db "TIFFANY@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 43, CLEFAIRY
+ db METRONOME
+ db ENCORE
+ db MOONLIGHT
+ db MINIMIZE
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+CamperGroup:
+; ================================
+; ================
+
+ ; CAMPER (1)
+ db "ROLAND@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 9, NIDORAN_M
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (2)
+ db "TODD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 14, PSYDUCK
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (3)
+ db "IVAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 10, DIGLETT
+ db 10, ZUBAT
+ db 14, DIGLETT
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (4)
+ db "ELLIOT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 13, SANDSHREW
+ db 15, MARILL
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (5)
+ db "BARRY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 36, NIDOKING
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (6)
+ db "LLOYD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, NIDOKING
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (7)
+ db "DEAN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 33, GOLDUCK
+ db 31, SANDSLASH
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (8)
+ db "SID@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, DUGTRIO
+ db 29, PRIMEAPE
+ db 29, POLIWRATH
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (9)
+ db "HARVEY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, NIDORINO
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (10)
+ db "DALE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 15, NIDORINO
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (11)
+ db "TED@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, MANKEY
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (12)
+ db "TODD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, GEODUDE
+ db 17, GEODUDE
+ db 23, PSYDUCK
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (13)
+ db "TODD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 23, GEODUDE
+ db 23, GEODUDE
+ db 26, PSYDUCK
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (14)
+ db "THOMAS@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 33, GRAVELER
+ db 36, GRAVELER
+ db 40, GOLBAT
+ db 42, GOLDUCK
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (15)
+ db "LEROY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 33, GRAVELER
+ db 36, GRAVELER
+ db 40, GOLBAT
+ db 42, GOLDUCK
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (16)
+ db "DAVID@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 33, GRAVELER
+ db 36, GRAVELER
+ db 40, GOLBAT
+ db 42, GOLDUCK
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (17)
+ db "JOHN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 33, GRAVELER
+ db 36, GRAVELER
+ db 40, GOLBAT
+ db 42, GOLDUCK
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (18)
+ db "JERRY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 37, SANDSLASH
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (19)
+ db "SPENCER@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, SANDSHREW
+ db 17, SANDSLASH
+ db 19, ZUBAT
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (20)
+ db "TODD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, GRAVELER
+ db 30, GRAVELER
+ db 30, SLUGMA
+ db 32, PSYDUCK
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (21)
+ db "TODD@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 33, GRAVELER
+ db SELFDESTRUCT
+ db ROCK_THROW
+ db HARDEN
+ db MAGNITUDE
+
+ db 33, GRAVELER
+ db SELFDESTRUCT
+ db ROCK_THROW
+ db HARDEN
+ db MAGNITUDE
+
+ db 36, MAGCARGO
+ db ROCK_THROW
+ db HARDEN
+ db AMNESIA
+ db FLAMETHROWER
+
+ db 34, GOLDUCK
+ db DISABLE
+ db PSYCHIC_M
+ db SURF
+ db PSYCH_UP
+
+ db $ff ; end
+
+; ================
+
+ ; CAMPER (22)
+ db "QUENTIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 30, FEAROW
+ db 30, PRIMEAPE
+ db 30, TAUROS
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+ExecutiveFGroup:
+; ================================
+; ================
+
+ ; EXECUTIVEF (1)
+ db "EXECUTIVE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 32, ARBOK
+ db WRAP
+ db POISON_STING
+ db BITE
+ db GLARE
+
+ db 32, VILEPLUME
+ db ABSORB
+ db SWEET_SCENT
+ db SLEEP_POWDER
+ db ACID
+
+ db 32, MURKROW
+ db PECK
+ db PURSUIT
+ db HAZE
+ db NIGHT_SHADE
+
+ db $ff ; end
+
+; ================
+
+ ; EXECUTIVEF (2)
+ db "EXECUTIVE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 23, ARBOK
+ db WRAP
+ db LEER
+ db POISON_STING
+ db BITE
+
+ db 23, GLOOM
+ db ABSORB
+ db SWEET_SCENT
+ db SLEEP_POWDER
+ db ACID
+
+ db 25, MURKROW
+ db PECK
+ db PURSUIT
+ db HAZE
+ db 0
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+SageGroup:
+; ================================
+; ================
+
+ ; SAGE (1)
+ db "CHOW@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 3, BELLSPROUT
+ db 3, BELLSPROUT
+ db 3, BELLSPROUT
+
+ db $ff ; end
+
+; ================
+
+ ; SAGE (2)
+ db "NICO@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 3, BELLSPROUT
+ db 3, BELLSPROUT
+ db 3, BELLSPROUT
+
+ db $ff ; end
+
+; ================
+
+ ; SAGE (3)
+ db "JIN@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 6, BELLSPROUT
+
+ db $ff ; end
+
+; ================
+
+ ; SAGE (4)
+ db "TROY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 7, BELLSPROUT
+ db 7, HOOTHOOT
+
+ db $ff ; end
+
+; ================
+
+ ; SAGE (5)
+ db "JEFFREY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 22, HAUNTER
+
+ db $ff ; end
+
+; ================
+
+ ; SAGE (6)
+ db "PING@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 16, GASTLY
+ db 16, GASTLY
+ db 16, GASTLY
+ db 16, GASTLY
+ db 16, GASTLY
+
+ db $ff ; end
+
+; ================
+
+ ; SAGE (7)
+ db "EDMOND@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 3, BELLSPROUT
+ db 3, BELLSPROUT
+ db 3, BELLSPROUT
+
+ db $ff ; end
+
+; ================
+
+ ; SAGE (8)
+ db "NEAL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 6, BELLSPROUT
+
+ db $ff ; end
+
+; ================
+
+ ; SAGE (9)
+ db "LI@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 7, BELLSPROUT
+ db 7, BELLSPROUT
+ db 10, HOOTHOOT
+
+ db $ff ; end
+
+; ================
+
+ ; SAGE (10)
+ db "GAKU@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, NOCTOWL
+ db 32, FLAREON
+
+ db $ff ; end
+
+; ================
+
+ ; SAGE (11)
+ db "MASA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, NOCTOWL
+ db 32, JOLTEON
+
+ db $ff ; end
+
+; ================
+
+ ; SAGE (12)
+ db "KOJI@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 32, NOCTOWL
+ db 32, VAPOREON
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+MediumGroup:
+; ================================
+; ================
+
+ ; MEDIUM (1)
+ db "MARTHA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 18, GASTLY
+ db 20, HAUNTER
+ db 20, GASTLY
+
+ db $ff ; end
+
+; ================
+
+ ; MEDIUM (2)
+ db "GRACE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, HAUNTER
+ db 20, HAUNTER
+
+ db $ff ; end
+
+; ================
+
+ ; MEDIUM (3)
+ db "BETHANY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 25, HAUNTER
+
+ db $ff ; end
+
+; ================
+
+ ; MEDIUM (4)
+ db "MARGRET@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 25, HAUNTER
+
+ db $ff ; end
+
+; ================
+
+ ; MEDIUM (5)
+ db "ETHEL@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 25, HAUNTER
+
+ db $ff ; end
+
+; ================
+
+ ; MEDIUM (6)
+ db "REBECCA@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 35, DROWZEE
+ db 35, HYPNO
+
+ db $ff ; end
+
+; ================
+
+ ; MEDIUM (7)
+ db "DORIS@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 34, SLOWPOKE
+ db 36, SLOWBRO
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+BoarderGroup:
+; ================================
+; ================
+
+ ; BOARDER (1)
+ db "RONALD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, SEEL
+ db 25, DEWGONG
+ db 24, SEEL
+
+ db $ff ; end
+
+; ================
+
+ ; BOARDER (2)
+ db "BRAD@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 26, SWINUB
+ db 26, SWINUB
+
+ db $ff ; end
+
+; ================
+
+ ; BOARDER (3)
+ db "DOUGLAS@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 24, SHELLDER
+ db 25, CLOYSTER
+ db 24, SHELLDER
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+PokefanMGroup:
+; ================================
+; ================
+
+ ; POKEFANM (1)
+ db "WILLIAM@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 14, RAICHU, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANM (2)
+ db "DEREK@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 17, PIKACHU, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANM (3)
+ db "ROBERT@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 33, QUAGSIRE, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANM (4)
+ db "JOSHUA@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 23, PIKACHU, BERRY
+ db 23, PIKACHU, BERRY
+ db 23, PIKACHU, BERRY
+ db 23, PIKACHU, BERRY
+ db 23, PIKACHU, BERRY
+ db 23, PIKACHU, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANM (5)
+ db "CARTER@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 29, BULBASAUR, BERRY
+ db 29, CHARMANDER, BERRY
+ db 29, SQUIRTLE, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANM (6)
+ db "TREVOR@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 33, PSYDUCK, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANM (7)
+ db "BRANDON@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 13, SNUBBULL, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANM (8)
+ db "JEREMY@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 28, MEOWTH, BERRY
+ db 28, MEOWTH, BERRY
+ db 28, MEOWTH, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANM (9)
+ db "COLIN@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 32, DELIBIRD, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANM (10)
+ db "DEREK@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 19, PIKACHU, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANM (11)
+ db "DEREK@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 36, PIKACHU, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANM (12)
+ db "ALEX@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 29, NIDOKING, BERRY
+ db 29, SLOWKING, BERRY
+ db 29, SEAKING, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANM (13)
+ db "REX@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 35, PHANPY, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANM (14)
+ db "ALLAN@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 35, TEDDIURSA, BERRY
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+KimonoGirlGroup:
+; ================================
+; ================
+
+ ; KIMONO_GIRL (1)
+ db "NAOKO@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 20, SKIPLOOM
+ db 20, VULPIX
+ db 18, SKIPLOOM
+
+ db $ff ; end
+
+; ================
+
+ ; KIMONO_GIRL (2)
+ db "NAOKO@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, FLAREON
+
+ db $ff ; end
+
+; ================
+
+ ; KIMONO_GIRL (3)
+ db "SAYO@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, ESPEON
+
+ db $ff ; end
+
+; ================
+
+ ; KIMONO_GIRL (4)
+ db "ZUKI@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, UMBREON
+
+ db $ff ; end
+
+; ================
+
+ ; KIMONO_GIRL (5)
+ db "KUNI@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, VAPOREON
+
+ db $ff ; end
+
+; ================
+
+ ; KIMONO_GIRL (6)
+ db "MIKI@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, JOLTEON
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+TwinsGroup:
+; ================================
+; ================
+
+ ; TWINS (1)
+ db "AMY & MAY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 10, SPINARAK
+ db 10, LEDYBA
+
+ db $ff ; end
+
+; ================
+
+ ; TWINS (2)
+ db "ANN & ANNE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 16, CLEFAIRY
+ db GROWL
+ db ENCORE
+ db DOUBLESLAP
+ db METRONOME
+
+ db 16, JIGGLYPUFF
+ db SING
+ db DEFENSE_CURL
+ db POUND
+ db DISABLE
+
+ db $ff ; end
+
+; ================
+
+ ; TWINS (3)
+ db "ANN & ANNE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 16, JIGGLYPUFF
+ db SING
+ db DEFENSE_CURL
+ db POUND
+ db DISABLE
+
+ db 16, CLEFAIRY
+ db GROWL
+ db ENCORE
+ db DOUBLESLAP
+ db METRONOME
+
+ db $ff ; end
+
+; ================
+
+ ; TWINS (4)
+ db "AMY & MAY@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 10, LEDYBA
+ db 10, SPINARAK
+
+ db $ff ; end
+
+; ================
+
+ ; TWINS (5)
+ db "JO & ZOE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 35, VICTREEBEL
+ db 35, VILEPLUME
+
+ db $ff ; end
+
+; ================
+
+ ; TWINS (6)
+ db "JO & ZOE@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 35, VILEPLUME
+ db 35, VICTREEBEL
+
+ db $ff ; end
+
+; ================
+
+ ; TWINS (7)
+ db "MEG & PEG@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 31, TEDDIURSA
+ db 31, PHANPY
+
+ db $ff ; end
+
+; ================
+
+ ; TWINS (8)
+ db "MEG & PEG@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 31, PHANPY
+ db 31, TEDDIURSA
+
+ db $ff ; end
+
+; ================
+
+ ; TWINS (9)
+ db "LEA & PIA@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 35, DRATINI
+ db THUNDER_WAVE
+ db TWISTER
+ db FLAMETHROWER
+ db HEADBUTT
+
+ db 35, DRATINI
+ db THUNDER_WAVE
+ db TWISTER
+ db ICE_BEAM
+ db HEADBUTT
+
+ db $ff ; end
+
+; ================
+
+ ; TWINS (10)
+ db "LEA & PIA@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 38, DRATINI
+ db THUNDER_WAVE
+ db TWISTER
+ db ICE_BEAM
+ db HEADBUTT
+
+ db 38, DRATINI
+ db THUNDER_WAVE
+ db TWISTER
+ db FLAMETHROWER
+ db HEADBUTT
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+PokefanFGroup:
+; ================================
+; ================
+
+ ; POKEFANF (1)
+ db "BEVERLY@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 14, SNUBBULL, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANF (2)
+ db "RUTH@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 17, PIKACHU, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANF (3)
+ db "BEVERLY@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 18, SNUBBULL, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANF (4)
+ db "BEVERLY@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 30, GRANBULL, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANF (5)
+ db "GEORGIA@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 23, SENTRET, BERRY
+ db 23, SENTRET, BERRY
+ db 23, SENTRET, BERRY
+ db 28, FURRET, BERRY
+ db 23, SENTRET, BERRY
+
+ db $ff ; end
+
+; ================
+
+ ; POKEFANF (6)
+ db "JAIME@"
+ db TRAINERTYPE_ITEM
+
+ ; party
+ db 16, MEOWTH, BERRY
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+RedGroup:
+; ================================
+; ================
+
+ ; RED (1)
+ db "RED@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 81, PIKACHU
+ db CHARM
+ db QUICK_ATTACK
+ db THUNDERBOLT
+ db THUNDER
+
+ db 73, ESPEON
+ db MUD_SLAP
+ db REFLECT
+ db SWIFT
+ db PSYCHIC_M
+
+ db 75, SNORLAX
+ db AMNESIA
+ db SNORE
+ db REST
+ db BODY_SLAM
+
+ db 77, VENUSAUR
+ db SUNNY_DAY
+ db GIGA_DRAIN
+ db SYNTHESIS
+ db SOLARBEAM
+
+ db 77, CHARIZARD
+ db FLAMETHROWER
+ db WING_ATTACK
+ db SLASH
+ db FIRE_SPIN
+
+ db 77, BLASTOISE
+ db RAIN_DANCE
+ db SURF
+ db BLIZZARD
+ db WHIRLPOOL
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+BlueGroup:
+; ================================
+; ================
+
+ ; BLUE (1)
+ db "BLUE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 56, PIDGEOT
+ db QUICK_ATTACK
+ db WHIRLWIND
+ db WING_ATTACK
+ db MIRROR_MOVE
+
+ db 54, ALAKAZAM
+ db DISABLE
+ db RECOVER
+ db PSYCHIC_M
+ db REFLECT
+
+ db 56, RHYDON
+ db FURY_ATTACK
+ db SANDSTORM
+ db ROCK_SLIDE
+ db EARTHQUAKE
+
+ db 58, GYARADOS
+ db TWISTER
+ db HYDRO_PUMP
+ db RAIN_DANCE
+ db HYPER_BEAM
+
+ db 58, EXEGGUTOR
+ db SUNNY_DAY
+ db LEECH_SEED
+ db EGG_BOMB
+ db SOLARBEAM
+
+ db 58, ARCANINE
+ db ROAR
+ db SWIFT
+ db FLAMETHROWER
+ db EXTREMESPEED
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+OfficerGroup:
+; ================================
+; ================
+
+ ; OFFICER (1)
+ db "KEITH@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 17, GROWLITHE
+
+ db $ff ; end
+
+; ================
+
+ ; OFFICER (2)
+ db "DIRK@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 14, GROWLITHE
+ db 14, GROWLITHE
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+GruntFGroup:
+; ================================
+; ================
+
+ ; GRUNTF (1)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 9, ZUBAT
+ db 11, EKANS
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTF (2)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 26, ARBOK
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTF (3)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 25, GLOOM
+ db 25, GLOOM
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTF (4)
+ db "GRUNT@"
+ db TRAINERTYPE_NORMAL
+
+ ; party
+ db 21, EKANS
+ db 23, ODDISH
+ db 21, EKANS
+ db 24, GLOOM
+
+ db $ff ; end
+
+; ================
+
+ ; GRUNTF (5)
+ db "GRUNT@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 18, EKANS
+ db WRAP
+ db LEER
+ db POISON_STING
+ db BITE
+
+ db 18, GLOOM
+ db ABSORB
+ db SWEET_SCENT
+ db STUN_SPORE
+ db SLEEP_POWDER
+
+ db $ff ; end
+
+; ================
+; ================================
+
+
+MysticalmanGroup:
+; ================================
+; ================
+
+ ; MYSTICALMAN (1)
+ db "EUSINE@"
+ db TRAINERTYPE_MOVES
+
+ ; party
+
+ db 23, DROWZEE
+ db DREAM_EATER
+ db HYPNOSIS
+ db DISABLE
+ db CONFUSION
+
+ db 23, HAUNTER
+ db LICK
+ db HYPNOSIS
+ db MEAN_LOOK
+ db CURSE
+
+ db 25, ELECTRODE
+ db SCREECH
+ db SONICBOOM
+ db THUNDER
+ db ROLLOUT
+
+ db $ff ; end
+
+; ================
+; ================================
diff --git a/trainers/trainer_pointers.asm b/data/trainers/party_pointers.asm
index c0b3d4538..c0b3d4538 100644
--- a/trainers/trainer_pointers.asm
+++ b/data/trainers/party_pointers.asm
diff --git a/data/trainers/trainer_attributes.asm b/data/trainers/trainer_attributes.asm
new file mode 100644
index 000000000..224e460c9
--- /dev/null
+++ b/data/trainers/trainer_attributes.asm
@@ -0,0 +1,406 @@
+TrainerClassAttributes: ; 3959c
+; entries correspond to trainer classes (see constants/trainer_constants.asm)
+
+; Falkner
+ db 0, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Whitney
+ db 0, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Bugsy
+ db 0, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Morty
+ db 0, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Pryce
+ db HYPER_POTION, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Jasmine
+ db HYPER_POTION, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Chuck
+ db FULL_HEAL, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Clair
+ db FULL_HEAL, HYPER_POTION ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Rival1
+ db 0, 0 ; items
+ db 15 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Pokemon Prof
+ db 0, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_AGGRESSIVE + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Will
+ db MAX_POTION, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Cal
+ db 0, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Bruno
+ db MAX_POTION, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Karen
+ db FULL_HEAL, MAX_POTION ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Koga
+ db FULL_HEAL, FULL_RESTORE ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Champion
+ db FULL_HEAL, FULL_RESTORE ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Brock
+ db HYPER_POTION, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Misty
+ db FULL_HEAL, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Lt Surge
+ db HYPER_POTION, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Scientist
+ db 0, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_TYPES + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Erika
+ db HYPER_POTION, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Youngster
+ db 0, 0 ; items
+ db 4 ; base reward
+ dw AI_BASIC + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Schoolboy
+ db 0, 0 ; items
+ db 8 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS
+ dw CONTEXT_USE + SWITCH_OFTEN
+
+; Bird Keeper
+ db 0, 0 ; items
+ db 6 ; base reward
+ dw AI_BASIC + AI_TYPES + AI_OFFENSIVE + AI_OPPORTUNIST + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Lass
+ db 0, 0 ; items
+ db 6 ; base reward
+ dw AI_BASIC + AI_CAUTIOUS + AI_STATUS
+ dw CONTEXT_USE + SWITCH_OFTEN
+
+; Janine
+ db DIRE_HIT, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Cooltrainerm
+ db 0, 0 ; items
+ db 12 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Cooltrainerf
+ db 0, 0 ; items
+ db 12 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Beauty
+ db 0, 0 ; items
+ db 22 ; base reward
+ dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Pokemaniac
+ db 0, 0 ; items
+ db 15 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_OFFENSIVE + AI_AGGRESSIVE + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Gruntm
+ db 0, 0 ; items
+ db 10 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Gentleman
+ db 0, 0 ; items
+ db 18 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_AGGRESSIVE + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Skier
+ db 0, 0 ; items
+ db 18 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_TYPES + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Teacher
+ db 0, 0 ; items
+ db 18 ; base reward
+ dw AI_BASIC + AI_OPPORTUNIST + AI_AGGRESSIVE + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Sabrina
+ db HYPER_POTION, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Bug Catcher
+ db 0, 0 ; items
+ db 4 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Fisher
+ db 0, 0 ; items
+ db 10 ; base reward
+ dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS
+ dw CONTEXT_USE + SWITCH_OFTEN
+
+; Swimmerm
+ db 0, 0 ; items
+ db 2 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_TYPES + AI_OFFENSIVE + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Swimmerf
+ db 0, 0 ; items
+ db 5 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_TYPES + AI_CAUTIOUS + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Sailor
+ db 0, 0 ; items
+ db 10 ; base reward
+ dw AI_BASIC + AI_OFFENSIVE + AI_OPPORTUNIST + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Super Nerd
+ db 0, 0 ; items
+ db 8 ; base reward
+ dw AI_BASIC + AI_TYPES + AI_SMART + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Rival2
+ db 0, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Guitarist
+ db 0, 0 ; items
+ db 8 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_TYPES + AI_CAUTIOUS + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Hiker
+ db 0, 0 ; items
+ db 8 ; base reward
+ dw AI_BASIC + AI_OFFENSIVE + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Biker
+ db 0, 0 ; items
+ db 8 ; base reward
+ dw AI_BASIC + AI_TYPES + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Blaine
+ db MAX_POTION, FULL_HEAL ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Burglar
+ db 0, 0 ; items
+ db 22 ; base reward
+ dw AI_BASIC + AI_OFFENSIVE + AI_CAUTIOUS + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Firebreather
+ db 0, 0 ; items
+ db 12 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_OFFENSIVE + AI_OPPORTUNIST + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Juggler
+ db 0, 0 ; items
+ db 10 ; base reward
+ dw AI_BASIC + AI_TYPES + AI_SMART + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Blackbelt T
+ db 0, 0 ; items
+ db 6 ; base reward
+ dw AI_BASIC + AI_OFFENSIVE + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Executivem
+ db 0, 0 ; items
+ db 18 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_TYPES + AI_SMART + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Psychic T
+ db 0, 0 ; items
+ db 8 ; base reward
+ dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Picnicker
+ db 0, 0 ; items
+ db 5 ; base reward
+ dw AI_BASIC + AI_CAUTIOUS + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Camper
+ db 0, 0 ; items
+ db 5 ; base reward
+ dw AI_BASIC + AI_CAUTIOUS + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Executivef
+ db 0, 0 ; items
+ db 18 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_TYPES + AI_SMART + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Sage
+ db 0, 0 ; items
+ db 8 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_TYPES + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Medium
+ db 0, 0 ; items
+ db 10 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_TYPES + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Boarder
+ db 0, 0 ; items
+ db 18 ; base reward
+ dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Pokefanm
+ db 0, 0 ; items
+ db 20 ; base reward
+ dw AI_BASIC + AI_TYPES + AI_SMART + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Kimono Girl
+ db 0, 0 ; items
+ db 18 ; base reward
+ dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Twins
+ db 0, 0 ; items
+ db 5 ; base reward
+ dw NO_AI
+ dw CONTEXT_USE + SWITCH_OFTEN
+
+; Pokefanf
+ db 0, 0 ; items
+ db 20 ; base reward
+ dw AI_BASIC + AI_TYPES + AI_SMART + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Red
+ db FULL_RESTORE, FULL_RESTORE ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Blue
+ db FULL_RESTORE, FULL_RESTORE ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Officer
+ db 0, 0 ; items
+ db 10 ; base reward
+ dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_STATUS
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Gruntf
+ db 0, 0 ; items
+ db 10 ; base reward
+ dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; Mysticalman
+ db 0, 0 ; items
+ db 25 ; base reward
+ dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
+ dw CONTEXT_USE + SWITCH_SOMETIMES
+
+; 39771
diff --git a/data/trainers/trainer_class_names.asm b/data/trainers/trainer_class_names.asm
new file mode 100755
index 000000000..48d81f910
--- /dev/null
+++ b/data/trainers/trainer_class_names.asm
@@ -0,0 +1,69 @@
+TrainerClassNames:: ; 2c1ef
+; entries correspond to trainer classes (see constants/trainer_constants.asm)
+ db "LEADER@"
+ db "LEADER@"
+ db "LEADER@"
+ db "LEADER@"
+ db "LEADER@"
+ db "LEADER@"
+ db "LEADER@"
+ db "LEADER@"
+ db "RIVAL@"
+ db "#MON PROF.@"
+ db "ELITE FOUR@"
+ db "<PKMN> TRAINER@"
+ db "ELITE FOUR@"
+ db "ELITE FOUR@"
+ db "ELITE FOUR@"
+ db "CHAMPION@"
+ db "LEADER@"
+ db "LEADER@"
+ db "LEADER@"
+ db "SCIENTIST@"
+ db "LEADER@"
+ db "YOUNGSTER@"
+ db "SCHOOLBOY@"
+ db "BIRD KEEPER@"
+ db "LASS@"
+ db "LEADER@"
+ db "COOLTRAINER@"
+ db "COOLTRAINER@"
+ db "BEAUTY@"
+ db "#MANIAC@"
+ db "ROCKET@"
+ db "GENTLEMAN@"
+ db "SKIER@"
+ db "TEACHER@"
+ db "LEADER@"
+ db "BUG CATCHER@"
+ db "FISHER@"
+ db "SWIMMER♂@"
+ db "SWIMMER♀@"
+ db "SAILOR@"
+ db "SUPER NERD@"
+ db "RIVAL@"
+ db "GUITARIST@"
+ db "HIKER@"
+ db "BIKER@"
+ db "LEADER@"
+ db "BURGLAR@"
+ db "FIREBREATHER@"
+ db "JUGGLER@"
+ db "BLACKBELT@"
+ db "ROCKET@"
+ db "PSYCHIC@"
+ db "PICNICKER@"
+ db "CAMPER@"
+ db "ROCKET@"
+ db "SAGE@"
+ db "MEDIUM@"
+ db "BOARDER@"
+ db "#FAN@"
+ db "KIMONO GIRL@"
+ db "TWINS@"
+ db "#FAN@"
+ db "<PKMN> TRAINER@"
+ db "LEADER@"
+ db "OFFICER@"
+ db "ROCKET@"
+ db "MYSTICALMAN@"
diff --git a/data/trainers/trainer_dvs.asm b/data/trainers/trainer_dvs.asm
new file mode 100644
index 000000000..503c468d3
--- /dev/null
+++ b/data/trainers/trainer_dvs.asm
@@ -0,0 +1,93 @@
+GetTrainerDVs: ; 270c4
+; Return the DVs of OtherTrainerClass in bc
+
+ push hl
+ ld a, [OtherTrainerClass]
+ dec a
+ ld c, a
+ ld b, 0
+
+ ld hl, TrainerClassDVs
+ add hl, bc
+ add hl, bc
+
+ ld a, [hli]
+ ld b, a
+ ld c, [hl]
+
+ pop hl
+ ret
+; 270d6
+
+TrainerClassDVs: ; 270d6
+; entries correspond to trainer classes (see constants/trainer_constants.asm)
+ ; Atk Spd
+ ; Def Spc
+ db $9A, $77 ; falkner
+ db $88, $88 ; bugsy
+ db $98, $88 ; whitney
+ db $98, $88 ; morty
+ db $98, $88 ; pryce
+ db $98, $88 ; jasmine
+ db $98, $88 ; chuck
+ db $7C, $DD ; clair
+ db $DD, $DD ; rival1
+ db $98, $88 ; pokemon prof
+ db $DC, $DD ; will
+ db $DC, $DD ; cal
+ db $DC, $DD ; bruno
+ db $7F, $DF ; karen
+ db $DC, $DD ; koga
+ db $DC, $DD ; champion
+ db $98, $88 ; brock
+ db $78, $88 ; misty
+ db $98, $88 ; lt surge
+ db $98, $88 ; scientist
+ db $78, $88 ; erika
+ db $98, $88 ; youngster
+ db $98, $88 ; schoolboy
+ db $98, $88 ; bird keeper
+ db $58, $88 ; lass
+ db $98, $88 ; janine
+ db $D8, $C8 ; cooltrainerm
+ db $7C, $C8 ; cooltrainerf
+ db $69, $C8 ; beauty
+ db $98, $88 ; pokemaniac
+ db $D8, $A8 ; gruntm
+ db $98, $88 ; gentleman
+ db $98, $88 ; skier
+ db $68, $88 ; teacher
+ db $7D, $87 ; sabrina
+ db $98, $88 ; bug catcher
+ db $98, $88 ; fisher
+ db $98, $88 ; swimmerm
+ db $78, $88 ; swimmerf
+ db $98, $88 ; sailor
+ db $98, $88 ; super nerd
+ db $98, $88 ; rival2
+ db $98, $88 ; guitarist
+ db $A8, $88 ; hiker
+ db $98, $88 ; biker
+ db $98, $88 ; blaine
+ db $98, $88 ; burglar
+ db $98, $88 ; firebreather
+ db $98, $88 ; juggler
+ db $98, $88 ; blackbelt
+ db $D8, $A8 ; executivem
+ db $98, $88 ; psychic
+ db $6A, $A8 ; picnicker
+ db $98, $88 ; camper
+ db $7E, $A8 ; executivef
+ db $98, $88 ; sage
+ db $78, $88 ; medium
+ db $98, $88 ; boarder
+ db $98, $88 ; pokefanm
+ db $68, $8A ; kimono girl
+ db $68, $A8 ; twins
+ db $6D, $88 ; pokefanf
+ db $FD, $DE ; red
+ db $9D, $DD ; blue
+ db $98, $88 ; officer
+ db $7E, $A8 ; gruntf
+ db $98, $88 ; mysticalman
+; 2715c
diff --git a/data/unown_words.asm b/data/unown_words.asm
new file mode 100644
index 000000000..a36dea6d1
--- /dev/null
+++ b/data/unown_words.asm
@@ -0,0 +1,67 @@
+unownword: macro
+x = 1
+ rept STRLEN(\1)
+ db STRSUB(\1, x, 1) - $40
+x = x + 1
+ endr
+ db -1
+endm
+
+UnownWords: ; fba5a
+; entries correspond to Unown forms
+ dw UnownWord1
+ dw UnownWord1
+ dw UnownWord2
+ dw UnownWord3
+ dw UnownWord4
+ dw UnownWord5
+ dw UnownWord6
+ dw UnownWord7
+ dw UnownWord8
+ dw UnownWord9
+ dw UnownWord10
+ dw UnownWord11
+ dw UnownWord12
+ dw UnownWord13
+ dw UnownWord14
+ dw UnownWord15
+ dw UnownWord16
+ dw UnownWord17
+ dw UnownWord18
+ dw UnownWord19
+ dw UnownWord20
+ dw UnownWord21
+ dw UnownWord22
+ dw UnownWord23
+ dw UnownWord24
+ dw UnownWord25
+ dw UnownWord26
+; fba90
+
+UnownWord1: unownword "ANGRY"
+UnownWord2: unownword "BEAR"
+UnownWord3: unownword "CHASE"
+UnownWord4: unownword "DIRECT"
+UnownWord5: unownword "ENGAGE"
+UnownWord6: unownword "FIND"
+UnownWord7: unownword "GIVE"
+UnownWord8: unownword "HELP"
+UnownWord9: unownword "INCREASE"
+UnownWord10: unownword "JOIN"
+UnownWord11: unownword "KEEP"
+UnownWord12: unownword "LAUGH"
+UnownWord13: unownword "MAKE"
+UnownWord14: unownword "NUZZLE"
+UnownWord15: unownword "OBSERVE"
+UnownWord16: unownword "PERFORM"
+UnownWord17: unownword "QUICKEN"
+UnownWord18: unownword "REASSURE"
+UnownWord19: unownword "SEARCH"
+UnownWord20: unownword "TELL"
+UnownWord21: unownword "UNDO"
+UnownWord22: unownword "VANISH"
+UnownWord23: unownword "WANT"
+UnownWord24: unownword "XXXXX"
+UnownWord25: unownword "YIELD"
+UnownWord26: unownword "ZOOM"
+; fbb32
diff --git a/data/wild/bug_contest_mons.asm b/data/wild/bug_contest_mons.asm
new file mode 100644
index 000000000..c3cdeaa8a
--- /dev/null
+++ b/data/wild/bug_contest_mons.asm
@@ -0,0 +1,14 @@
+ContestMons: ; 97d87
+ ; %, species, min, max
+ db 20, CATERPIE, 7, 18
+ db 20, WEEDLE, 7, 18
+ db 10, METAPOD, 9, 18
+ db 10, KAKUNA, 9, 18
+ db 5, BUTTERFREE, 12, 15
+ db 5, BEEDRILL, 12, 15
+ db 10, VENONAT, 10, 16
+ db 10, PARAS, 10, 17
+ db 5, SCYTHER, 13, 14
+ db 5, PINSIR, 13, 14
+ db -1, VENOMOTH, 30, 40
+; 97db3
diff --git a/data/wild/johto_grass.asm b/data/wild/johto_grass.asm
index f241dd5d8..be435b048 100644
--- a/data/wild/johto_grass.asm
+++ b/data/wild/johto_grass.asm
@@ -1,5 +1,7 @@
; Johto Pokémon in grass
+JohtoGrassWildMons: ; 0x2a5e9
+
map SPROUT_TOWER_2F
db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite
; morn
diff --git a/data/wild/johto_water.asm b/data/wild/johto_water.asm
index a4d957ef0..d6e11c3a0 100644
--- a/data/wild/johto_water.asm
+++ b/data/wild/johto_water.asm
@@ -1,5 +1,7 @@
; Johto Pokémon in water
+JohtoWaterWildMons: ; 0x2b11d
+
map RUINS_OF_ALPH_OUTSIDE
db 2 percent ; encounter rate
db 15, WOOPER
diff --git a/data/wild/kanto_grass.asm b/data/wild/kanto_grass.asm
index e06627d19..415514748 100644
--- a/data/wild/kanto_grass.asm
+++ b/data/wild/kanto_grass.asm
@@ -1,5 +1,7 @@
; Kanto Pokémon in grass
+KantoGrassWildMons: ; 0x2b274
+
map DIGLETTS_CAVE
db 4 percent, 2 percent, 8 percent ; encounter rates: morn/day/nite
; morn
diff --git a/data/wild/kanto_water.asm b/data/wild/kanto_water.asm
index 558d56a26..71fab48fb 100644
--- a/data/wild/kanto_water.asm
+++ b/data/wild/kanto_water.asm
@@ -1,5 +1,7 @@
; Kanto Pokémon in water
+KantoWaterWildMons: ; 0x2b7f7
+
map TOHJO_FALLS
db 4 percent ; encounter rate
db 20, GOLDEEN
diff --git a/data/wild/probabilities.asm b/data/wild/probabilities.asm
new file mode 100644
index 000000000..a18e9d336
--- /dev/null
+++ b/data/wild/probabilities.asm
@@ -0,0 +1,15 @@
+GrassMonProbTable: ; 2a1cb
+ db 30, $0 ; 30% chance
+ db 60, $2 ; 30% chance
+ db 80, $4 ; 20% chance
+ db 90, $6 ; 10% chance
+ db 95, $8 ; 5% chance
+ db 99, $a ; 4% chance
+ db 100, $c ; 1% chance
+; 2a1d9
+
+WaterMonProbTable: ; 2a1d9
+ db 60, $0 ; 60% chance
+ db 90, $2 ; 30% chance
+ db 100, $4 ; 10% chance
+; 2a1df
diff --git a/data/wild/roammon_maps.asm b/data/wild/roammon_maps.asm
new file mode 100644
index 000000000..ee213bff5
--- /dev/null
+++ b/data/wild/roammon_maps.asm
@@ -0,0 +1,33 @@
+; Maps that roaming monsters can be on, and possible maps they can jump to.
+; Notably missing are Route 40 and Route 41, which are water routes.
+
+roam_map: macro
+; map, # of other maps, other maps
+ map \1
+ db \2
+rept \2
+ map \3
+ shift
+endr
+ db 0
+endm
+
+RoamMaps: ; 2a40f
+ roam_map ROUTE_29, 2, ROUTE_30, ROUTE_46
+ roam_map ROUTE_30, 2, ROUTE_29, ROUTE_31
+ roam_map ROUTE_31, 3, ROUTE_30, ROUTE_32, ROUTE_36
+ roam_map ROUTE_32, 3, ROUTE_36, ROUTE_31, ROUTE_33
+ roam_map ROUTE_33, 2, ROUTE_32, ROUTE_34
+ roam_map ROUTE_34, 2, ROUTE_33, ROUTE_35
+ roam_map ROUTE_35, 2, ROUTE_34, ROUTE_36
+ roam_map ROUTE_36, 4, ROUTE_35, ROUTE_31, ROUTE_32, ROUTE_37
+ roam_map ROUTE_37, 3, ROUTE_36, ROUTE_38, ROUTE_42
+ roam_map ROUTE_38, 3, ROUTE_37, ROUTE_39, ROUTE_42
+ roam_map ROUTE_39, 1, ROUTE_38
+ roam_map ROUTE_42, 4, ROUTE_43, ROUTE_44, ROUTE_37, ROUTE_38
+ roam_map ROUTE_43, 2, ROUTE_42, ROUTE_44
+ roam_map ROUTE_44, 3, ROUTE_42, ROUTE_43, ROUTE_45
+ roam_map ROUTE_45, 2, ROUTE_44, ROUTE_46
+ roam_map ROUTE_46, 2, ROUTE_45, ROUTE_29
+ db -1 ; end
+; 2a4a0
diff --git a/data/wild/swarm_grass.asm b/data/wild/swarm_grass.asm
index 61d0d8532..a26417f64 100644
--- a/data/wild/swarm_grass.asm
+++ b/data/wild/swarm_grass.asm
@@ -1,4 +1,6 @@
-; swarms in grass
+; Pokémon swarms in grass
+
+SwarmGrassWildMons: ; 0x2b8d0
; Dunsparce swarm
map DARK_CAVE_VIOLET_ENTRANCE
diff --git a/data/wild/swarm_water.asm b/data/wild/swarm_water.asm
index 67751b2bd..3f69af512 100644
--- a/data/wild/swarm_water.asm
+++ b/data/wild/swarm_water.asm
@@ -1,4 +1,6 @@
-; swarms in water
+; Pokémon swarms in water
+
+SwarmWaterWildMons: ; 0x2b92f
; No swarms encountered while surfing in Crystal
diff --git a/data/wild/treemon_maps.asm b/data/wild/treemon_maps.asm
new file mode 100644
index 000000000..47491c2c9
--- /dev/null
+++ b/data/wild/treemon_maps.asm
@@ -0,0 +1,50 @@
+treemon_map: macro
+ map \1
+ db \2 ; treemon set
+endm
+
+TreeMonMaps: ; b825e
+ treemon_map ROUTE_26, 4
+ treemon_map ROUTE_27, 4
+ treemon_map ROUTE_28, 0
+ treemon_map ROUTE_29, 3
+ treemon_map ROUTE_30, 3
+ treemon_map ROUTE_31, 3
+ treemon_map ROUTE_32, 4
+ treemon_map ROUTE_33, 2
+ treemon_map ROUTE_34, 3
+ treemon_map ROUTE_35, 3
+ treemon_map ROUTE_36, 3
+ treemon_map ROUTE_37, 3
+ treemon_map ROUTE_38, 3
+ treemon_map ROUTE_39, 3
+ treemon_map ROUTE_40, 0
+ treemon_map ROUTE_41, 0
+ treemon_map ROUTE_42, 2
+ treemon_map ROUTE_43, 5
+ treemon_map ROUTE_44, 1
+ treemon_map ROUTE_45, 1
+ treemon_map ROUTE_46, 1
+ treemon_map NEW_BARK_TOWN, 0
+ treemon_map CHERRYGROVE_CITY, 0
+ treemon_map VIOLET_CITY, 0
+ treemon_map AZALEA_TOWN, 2
+ treemon_map CIANWOOD_CITY, 0
+ treemon_map GOLDENROD_CITY, 0
+ treemon_map OLIVINE_CITY, 0
+ treemon_map ECRUTEAK_CITY, 0
+ treemon_map MAHOGANY_TOWN, 0
+ treemon_map LAKE_OF_RAGE, 5
+ treemon_map BLACKTHORN_CITY, 0
+ treemon_map SILVER_CAVE_OUTSIDE, 0
+ treemon_map ILEX_FOREST, 6
+ db -1
+; b82c5
+
+RockMonMaps: ; b82c5
+ treemon_map CIANWOOD_CITY, 7
+ treemon_map ROUTE_40, 7
+ treemon_map DARK_CAVE_VIOLET_ENTRANCE, 7
+ treemon_map SLOWPOKE_WELL_B1F, 7
+ db -1
+; b82d2
diff --git a/data/wild/treemons.asm b/data/wild/treemons.asm
new file mode 100644
index 000000000..0cb8fa83d
--- /dev/null
+++ b/data/wild/treemons.asm
@@ -0,0 +1,128 @@
+TreeMons: ; b82e8
+ dw TreeMons1
+ dw TreeMons1
+ dw TreeMons2
+ dw TreeMons3
+ dw TreeMons4
+ dw TreeMons5
+ dw TreeMons6
+ dw RockMons
+ dw TreeMons1
+
+; Two tables each (common, rare).
+; Structure:
+; db %, species, level
+
+TreeMons1: ; b82fa
+; common
+ db 50, SPEAROW, 10
+ db 15, SPEAROW, 10
+ db 15, SPEAROW, 10
+ db 10, AIPOM, 10
+ db 5, AIPOM, 10
+ db 5, AIPOM, 10
+ db -1
+; rare
+ db 50, SPEAROW, 10
+ db 15, HERACROSS, 10
+ db 15, HERACROSS, 10
+ db 10, AIPOM, 10
+ db 5, AIPOM, 10
+ db 5, AIPOM, 10
+ db -1
+
+TreeMons2: ; b8320
+; common
+ db 50, SPEAROW, 10
+ db 15, EKANS, 10
+ db 15, SPEAROW, 10
+ db 10, AIPOM, 10
+ db 5, AIPOM, 10
+ db 5, AIPOM, 10
+ db -1
+; rare
+ db 50, SPEAROW, 10
+ db 15, HERACROSS, 10
+ db 15, HERACROSS, 10
+ db 10, AIPOM, 10
+ db 5, AIPOM, 10
+ db 5, AIPOM, 10
+ db -1
+
+TreeMons3: ; b8346
+; common
+ db 50, HOOTHOOT, 10
+ db 15, SPINARAK, 10
+ db 15, LEDYBA, 10
+ db 10, EXEGGCUTE, 10
+ db 5, EXEGGCUTE, 10
+ db 5, EXEGGCUTE, 10
+ db -1
+; rare
+ db 50, HOOTHOOT, 10
+ db 15, PINECO, 10
+ db 15, PINECO, 10
+ db 10, EXEGGCUTE, 10
+ db 5, EXEGGCUTE, 10
+ db 5, EXEGGCUTE, 10
+ db -1
+
+TreeMons4: ; b836c
+; common
+ db 50, HOOTHOOT, 10
+ db 15, EKANS, 10
+ db 15, HOOTHOOT, 10
+ db 10, EXEGGCUTE, 10
+ db 5, EXEGGCUTE, 10
+ db 5, EXEGGCUTE, 10
+ db -1
+; rare
+ db 50, HOOTHOOT, 10
+ db 15, PINECO, 10
+ db 15, PINECO, 10
+ db 10, EXEGGCUTE, 10
+ db 5, EXEGGCUTE, 10
+ db 5, EXEGGCUTE, 10
+ db -1
+
+TreeMons5: ; b8392
+; common
+ db 50, HOOTHOOT, 10
+ db 15, VENONAT, 10
+ db 15, HOOTHOOT, 10
+ db 10, EXEGGCUTE, 10
+ db 5, EXEGGCUTE, 10
+ db 5, EXEGGCUTE, 10
+ db -1
+; rare
+ db 50, HOOTHOOT, 10
+ db 15, PINECO, 10
+ db 15, PINECO, 10
+ db 10, EXEGGCUTE, 10
+ db 5, EXEGGCUTE, 10
+ db 5, EXEGGCUTE, 10
+ db -1
+
+TreeMons6: ; b83b8
+; common
+ db 50, HOOTHOOT, 10
+ db 15, PINECO, 10
+ db 15, PINECO, 10
+ db 10, NOCTOWL, 10
+ db 5, BUTTERFREE, 10
+ db 5, BEEDRILL, 10
+ db -1
+; rare
+ db 50, HOOTHOOT, 10
+ db 15, CATERPIE, 10
+ db 15, WEEDLE, 10
+ db 10, HOOTHOOT, 10
+ db 5, METAPOD, 10
+ db 5, KAKUNA, 10
+ db -1
+
+RockMons: ; b83de
+ db 90, KRABBY, 15
+ db 10, SHUCKLE, 15
+ db -1
+; b83e5
diff --git a/docs/assembly_programming.md b/docs/assembly_programming.md
new file mode 100644
index 000000000..c04710b05
--- /dev/null
+++ b/docs/assembly_programming.md
@@ -0,0 +1,15 @@
+# Assembly Programming
+
+- [**RGBDS documentation**](rgbds-doc): Includes information on the RGBDS tools and the assembly language syntax.
+- [**Pan Docs**](pan-docs): Everything You Always Wanted To Know About GAMEBOY (but were afraid to ask).
+- [**GameBoy Programming Manual](gb-manual): The official GameBoy programming and hardware manual by Nintendo.
+- [**GameBoy Opcode Summary**](gb-opcodes): Describes the opcodes of GameBoy assembly language.
+- [**GameBoy Memory Map**](gb-memory-map): Describes the GameBoy Color address space.
+- [**awesome-gbdev**](awesome-gbdev): A curated list of Game Boy development resources such as tools, docs, emulators, related projects and open-source ROMs.
+
+[rgbds-doc]: https://rednex.github.io/
+[pan-docs]: http://bgb.bircd.org/pandocs.htm
+[gb-manual]: https://ia801906.us.archive.org/19/items/GameBoyProgManVer1.1/GameBoyProgManVer1.1.pdf
+[gb-opcodes]: http://www.devrs.com/gb/files/opcodes.html
+[gb-memory-map]: http://gameboy.mongenel.com/dmg/asmmemmap.html
+[awesome-gbdev]: https://github.com/avivace/awesome-gbdev
diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md
new file mode 100644
index 000000000..b38ec12ee
--- /dev/null
+++ b/docs/bugs_and_glitches.md
@@ -0,0 +1,1455 @@
+# Bugs and Glitches
+
+
+## Contents
+
+- [Thick Club and Light Ball can decrease damage done with boosted (Special) Attack](#thick-club-and-light-ball-can-decrease-damage-done-with-boosted-special-attack)
+- [Metal Powder can increase damage taken with boosted (Special) Defense](#metal-powder-can-increase-damage-taken-with-boosted-special-defense)
+- [Belly Drum sharply boosts Attack even with under 50% HP](#belly-drum-sharply-boosts-attack-even-with-under-50-hp)
+- [Moves that lower Defense can do so after breaking a Substitute](#moves-that-lower-defense-can-do-so-after-breaking-a-substitute)
+- [Counter and Mirror Coat still work if the opponent uses an item](#counter-and-mirror-coat-still-work-if-the-opponent-uses-an-item)
+- [A Disabled but PP Up–enhanced move may not trigger Struggle](#a-disabled-but-pp-upenhanced-move-may-not-trigger-struggle)
+- [A Pokémon that fainted from Pursuit will have its old status condition when revived](#a-pokémon-that-fainted-from-pursuit-will-have-its-old-status-condition-when-revived)
+- [Lock-On and Mind Reader don't always bypass Fly and Dig](#lock-on-and-mind-reader-dont-always-bypass-fly-and-dig)
+- [Beat Up can desynchronize link battles](#beat-up-can-desynchronize-link-battles)
+- [Present damage is incorrect in link battles](#present-damage-is-incorrect-in-link-battles)
+- ["Smart" AI encourages Mean Look if its own Pokémon is badly poisoned](#smart-ai-encourages-mean-look-if-its-own-pokémon-is-badly-poisoned)
+- [AI makes a false assumption about `CheckTypeMatchup`](#ai-makes-a-false-assumption-about-checktypematchup)
+- [NPC use of Full Heal or Full Restore does not cure Nightmare status](#npc-use-of-full-heal-or-full-restore-does-not-cure-nightmare-status)
+- [HP bar animation is slow for high HP](#hp-bar-animation-is-slow-for-high-hp)
+- [HP bar animation off-by-one error for low HP](#hp-bar-animation-off-by-one-error-for-low-hp)
+- [Experience underflow for level 1 Pokémon with Medium-Slow growth rate](#experience-underflow-for-level-1-pokémon-with-medium-slow-growth-rate)
+- [Five-digit experience gain is printed incorrectly](#five-digit-experience-gain-is-printed-incorrectly)
+- [BRN/PSN/PAR do not affect catch rate](#brnpsnpar-do-not-affect-catch-rate)
+- [Moon Ball does not boost catch rate](#moon-ball-does-not-boost-catch-rate)
+- [Love Ball boosts catch rate for the wrong gender](#love-ball-boosts-catch-rate-for-the-wrong-gender)
+- [Fast Ball only boosts catch rate for three Pokémon](#fast-ball-only-boosts-catch-rate-for-three-pokémon)
+- [Dragon Scale, not Dragon Fang, boosts Dragon-type moves](#dragon-scale-not-dragon-fang-boosts-dragon-type-moves)
+- [Daisy's grooming doesn't always increase happiness](#daisys-grooming-doesnt-always-increase-happiness)
+- [Magikarp in Lake of Rage are shorter, not longer](#magikarp-in-lake-of-rage-are-shorter-not-longer)
+- [Magikarp lengths can be miscalculated](#magikarp-lengths-can-be-miscalculated)
+- [Battle transitions fail to account for the enemy's level](#battle-transitions-fail-to-account-for-the-enemys-level)
+- [Slot machine payout sound effects cut each other off](#slot-machine-payout-sound-effects-cut-each-other-off)
+- [Team Rocket battle music is not used for Executives or Scientists](#team-rocket-battle-music-is-not-used-for-executives-or-scientists)
+- [No bump noise if standing on tile `$3E`](#no-bump-noise-if-standing-on-tile-3e)
+- [Playing Entei's Pokédex cry can distort Raikou's and Suicune's](#playing-enteis-pokédex-cry-can-distort-raikous-and-suicunes)
+- [In-battle “`…`” ellipsis is too high](#in-battle--ellipsis-is-too-high)
+- [Two tiles in the `port` tileset are drawn incorrectly](#two-tiles-in-the-port-tileset-are-drawn-incorrectly)
+- [`LoadMetatiles` wraps around past 128 blocks](#loadmetatiles-wraps-around-past-128-blocks)
+- [Surfing directly across a map connection does not load the new map](#surfing-directly-across-a-map-connection-does-not-load-the-new-map)
+- [`Function6ec1` does not correctly limit object movement](#function6ec1-does-not-correctly-limit-object-movement)
+- [`CheckOwnMon` only checks the first five letters of OT names](#checkownmon-only-checks-the-first-five-letters-of-ot-names)
+- [Catching a Transformed Pokémon always catches a Ditto](#catching-a-transformed-pokémon-always-catches-a-ditto)
+- [Using a Park Ball in normal battles has a corrupt animation](#using-a-park-ball-in-normal-battles-has-a-corrupt-animation)
+- [`HELD_CATCH_CHANCE` has no effect](#held_catch_chance-has-no-effect)
+- [Only the first three `EvosAttacks` evolution entries can have Stone compatibility reported correctly](#only-the-first-three-evosattacks-evolution-entries-can-have-stone-compatibility-reported-correctly)
+- [`ScriptCall` can overflow `wScriptStack` and crash](#scriptcall-can-overflow-wscriptstack-and-crash)
+- [`LoadSpriteGFX` does not limit the capacity of `UsedSprites`](#loadspritegfx-does-not-limit-the-capacity-of-usedsprites)
+- [`ChooseWildEncounter` doesn't really validate the wild Pokémon species](#choosewildencounter-doesnt-really-validate-the-wild-pokémon-species)
+- [`TryObjectEvent` arbitrary code execution](#tryobjectevent-arbitrary-code-execution)
+- [`Special_CheckBugContestContestantFlag` can read beyond its data table](#special_checkbugcontestcontestantflag-can-read-beyond-its-data-table)
+- [`ClearWRAM` only clears WRAM bank 1](#clearwram-only-clears-wram-bank-1)
+- [`GetForestTreeFrame` works, but it's still bad](#getforesttreeframe-works-but-its-still-bad)
+
+
+## Thick Club and Light Ball can decrease damage done with boosted (Special) Attack
+
+([Video](https://www.youtube.com/watch?v=rGqu3d3pdok&t=450))
+
+This is a bug with `SpeciesItemBoost` in [battle/effect_commands.asm](/battle/effect_commands.asm):
+
+```asm
+; Double the stat
+ sla l
+ rl h
+ ret
+```
+
+**Fix:**
+
+```asm
+; Double the stat
+ sla l
+ rl h
+
+ ld a, 999 / $100
+ cp h
+ jr c, .cap
+ ld a, 999 % $100
+ cp l
+ ret nc
+
+.cap
+ ld h, 999 / $100
+ ld l, 999 % $100
+ ret
+```
+
+
+## Metal Powder can increase damage taken with boosted (Special) Defense
+
+([Video](https://www.youtube.com/watch?v=rGqu3d3pdok&t=450))
+
+This is a bug with `DittoMetalPowder` in [battle/effect_commands.asm](/battle/effect_commands.asm):
+
+```asm
+ ld a, c
+ srl a
+ add c
+ ld c, a
+ ret nc
+
+ srl b
+ ld a, b
+ and a
+ jr nz, .done
+ inc b
+.done
+ scf
+ rr c
+ ret
+```
+
+**Fix:**
+
+```asm
+ ld a, c
+ srl a
+ add c
+ ld c, a
+ ret nc
+
+ srl b
+ ld a, b
+ and a
+ jr nz, .done
+ inc b
+.done
+ scf
+ rr c
+
+ ld a, 999 / $100
+ cp b
+ jr c, .cap
+ ld a, 999 % $100
+ cp c
+ ret nc
+
+.cap
+ ld b, 999 / $100
+ ld c, 999 % $100
+ ret
+```
+
+
+## Belly Drum sharply boosts Attack even with under 50% HP
+
+([Video](https://www.youtube.com/watch?v=zuCLMikWo4Y))
+
+This is a bug with `BattleCommand_BellyDrum` in [battle/effect_commands.asm](/battle/effect_commands.asm):
+
+```asm
+BattleCommand_BellyDrum: ; 37c1a
+; bellydrum
+; This command is buggy because it raises the user's attack
+; before checking that it has enough HP to use the move.
+; Swap the order of these two blocks to fix.
+ call BattleCommand_AttackUp2
+ ld a, [AttackMissed]
+ and a
+ jr nz, .failed
+
+ callab GetHalfMaxHP
+ callab CheckUserHasEnoughHP
+ jr nc, .failed
+```
+
+**Fix:**
+
+```asm
+BattleCommand_BellyDrum: ; 37c1a
+; bellydrum
+ callab GetHalfMaxHP
+ callab CheckUserHasEnoughHP
+ jr nc, .failed
+
+ call BattleCommand_AttackUp2
+ ld a, [AttackMissed]
+ and a
+ jr nz, .failed
+```
+
+
+## Moves that lower Defense can do so after breaking a Substitute
+
+([Video](https://www.youtube.com/watch?v=OGwKPRJLaaI))
+
+This bug affects Acid, Iron Tail, and Rock Smash.
+
+This is a bug with `DefenseDownHit` in [battle/moves/move_effects.asm](/battle/moves/move_effects.asm):
+
+```asm
+DefenseDownHit:
+ checkobedience
+ usedmovetext
+ doturn
+ critical
+ damagestats
+ damagecalc
+ stab
+ damagevariation
+ checkhit
+ effectchance
+ hittarget
+ failuretext
+ checkfaint
+ criticaltext
+ supereffectivetext
+ checkdestinybond
+ buildopponentrage
+ effectchance ; bug: duplicate effectchance shouldn't be here
+ defensedown
+ statdownmessage
+ endmove
+```
+
+**Fix:** Delete the second `effectchance`.
+
+
+## Counter and Mirror Coat still work if the opponent uses an item
+
+([Video](https://www.youtube.com/watch?v=uRYyzKRatFk))
+
+*To do:* Identify specific code causing this bug and fix it.
+
+
+## A Disabled but PP Up–enhanced move may not trigger Struggle
+
+([Video](https://www.youtube.com/watch?v=1v9x4SgMggs))
+
+This is a bug with `CheckPlayerHasUsableMoves` in [battle/core.asm](/battle/core.asm):
+
+```asm
+.done
+ ; Bug: this will result in a move with PP Up confusing the game.
+ ; Replace with "and $3f" to fix.
+ and a
+ ret nz
+
+.force_struggle
+ ld hl, BattleText_PkmnHasNoMovesLeft
+ call StdBattleTextBox
+ ld c, 60
+ call DelayFrames
+ xor a
+ ret
+```
+
+**Fix:** Change `and a` to `and $3f`.
+
+
+## A Pokémon that fainted from Pursuit will have its old status condition when revived
+
+([Video](https://www.youtube.com/watch?v=tiRvw-Nb2ME))
+
+*To do:* Identify specific code causing this bug and fix it.
+
+
+## Lock-On and Mind Reader don't always bypass Fly and Dig
+
+This bug affects Attract, Curse, Foresight, Mean Look, Mimic, Nightmare, Spider Web, Transform, and stat-lowering effects of moves like String Shot or Bubble during the semi-invulnerable turn of Fly or Dig.
+
+This is a bug with `CheckHiddenOpponent` in [battle/effect_commands.asm](/battle/effect_commands.asm):
+
+```asm
+CheckHiddenOpponent: ; 37daa
+; BUG: This routine should account for Lock-On and Mind Reader.
+ ld a, BATTLE_VARS_SUBSTATUS3_OPP
+ call GetBattleVar
+ and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
+ ret
+```
+
+*To do:* Fix this bug.
+
+
+## Beat Up can desynchronize link battles
+
+([Video](https://www.youtube.com/watch?v=202-iAsrIa8))
+
+This is a bug with `BattleCommand_BeatUp` in [battle/effect_commands.asm](/battle/effect_commands.asm):
+
+```asm
+.got_mon
+ ld a, [wd002]
+ ld hl, PartyMonNicknames
+ call GetNick
+ ld a, MON_HP
+ call GetBeatupMonLocation
+ ld a, [hli]
+ or [hl]
+ jp z, .beatup_fail ; fainted
+ ld a, [wd002]
+ ld c, a
+ ld a, [CurBattleMon]
+ ; BUG: this can desynchronize link battles
+ ; Change "cp [hl]" to "cp c" to fix
+ cp [hl]
+ ld hl, BattleMonStatus
+ jr z, .active_mon
+ ld a, MON_STATUS
+ call GetBeatupMonLocation
+.active_mon
+ ld a, [hl]
+ and a
+ jp nz, .beatup_fail
+```
+
+**Fix:** Change `cp [hl]` to `cp c`.
+
+
+## Present damage is incorrect in link battles
+
+([Video](https://www.youtube.com/watch?v=XJaQoKtrEuw))
+
+This bug existed for all battles in Gold and Silver, and was only fixed for single-player battles in Crystal to preserve link compatibility.
+
+This is a bug with `BattleCommand_Present` in [battle/effects/present.asm](/battle/effects/present.asm):
+
+```asm
+BattleCommand_Present: ; 37874
+; present
+
+ ld a, [wLinkMode]
+ cp LINK_COLOSSEUM
+ jr z, .colosseum_skippush
+ push bc
+ push de
+.colosseum_skippush
+
+ call BattleCommand_Stab
+
+ ld a, [wLinkMode]
+ cp LINK_COLOSSEUM
+ jr z, .colosseum_skippop
+ pop de
+ pop bc
+.colosseum_skippop
+```
+
+**Fix:**
+
+```asm
+BattleCommand_Present: ; 37874
+; present
+
+ push bc
+ push de
+ call BattleCommand_Stab
+ pop de
+ pop bc
+```
+
+
+## "Smart" AI encourages Mean Look if its own Pokémon is badly poisoned
+
+([Video](https://www.youtube.com/watch?v=cygMO-zHTls))
+
+This is a bug with `AI_Smart_MeanLook` in [battle/ai/scoring.asm](/battle/ai/scoring.asm):
+
+```asm
+; 80% chance to greatly encourage this move if the enemy is badly poisoned (buggy).
+; Should check PlayerSubStatus5 instead.
+ ld a, [EnemySubStatus5]
+ bit SUBSTATUS_TOXIC, a
+ jr nz, .asm_38e26
+```
+
+**Fix:** Change `EnemySubStatus5` to `PlayerSubStatus5`.
+
+
+## AI makes a false assumption about `CheckTypeMatchup`
+
+In [battle/effect_commands.asm](/battle/effect_commands.asm):
+
+```asm
+BattleCheckTypeMatchup: ; 347c8
+ ld hl, EnemyMonType1
+ ld a, [hBattleTurn]
+ and a
+ jr z, CheckTypeMatchup
+ ld hl, BattleMonType1
+CheckTypeMatchup: ; 347d3
+; There is an incorrect assumption about this function made in the AI related code: when
+; the AI calls CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing the
+; offensive type in a will make this function do the right thing. Since a is overwritten,
+; this assumption is incorrect. A simple fix would be to load the move type for the
+; current move into a in BattleCheckTypeMatchup, before falling through, which is
+; consistent with how the rest of the code assumes this code works like.
+ push hl
+ push de
+ push bc
+ ld a, BATTLE_VARS_MOVE_TYPE
+ call GetBattleVar
+ ld d, a
+```
+
+*To do:* Fix this bug.
+
+
+## NPC use of Full Heal or Full Restore does not cure Nightmare status
+
+([Video](https://www.youtube.com/watch?v=rGqu3d3pdok&t=322))
+
+This is a bug with `AI_HealStatus` in [battle/ai/items.asm](/battle/ai/items.asm):
+
+```asm
+AI_HealStatus: ; 384e0
+ ld a, [CurOTMon]
+ ld hl, OTPartyMon1Status
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+ xor a
+ ld [hl], a
+ ld [EnemyMonStatus], a
+ ; Bug: this should reset SUBSTATUS_NIGHTMARE too
+ ; Uncomment the lines below to fix
+ ; ld hl, EnemySubStatus1
+ ; res SUBSTATUS_NIGHTMARE, [hl]
+ ld hl, EnemySubStatus5
+ res SUBSTATUS_TOXIC, [hl]
+ ret
+; 384f7
+```
+
+**Fix:** Uncomment `ld hl, EnemySubStatus1` and `res SUBSTATUS_NIGHTMARE, [hl]`.
+
+
+## HP bar animation is slow for high HP
+
+([Video](https://www.youtube.com/watch?v=SE-BfsFgZVM))
+
+This is a bug with `LongAnim_UpdateVariables` in [engine/anim_hp_bar.asm](/engine/anim_hp_bar.asm):
+
+```asm
+ ; This routine is buggy. The result from ComputeHPBarPixels is stored
+ ; in e. However, the pop de opcode deletes this result before it is even
+ ; used. The game then proceeds as though it never deleted that output.
+ ; To fix, uncomment the line below.
+ call ComputeHPBarPixels
+ ; ld a, e
+ pop bc
+ pop de
+ pop hl
+ ld a, e ; Comment or delete this line to fix the above bug.
+ ld hl, wCurHPBarPixels
+ cp [hl]
+ jr z, .loop
+ ld [hl], a
+ and a
+ ret
+```
+
+**Fix:** Move `ld a, e` to right after `call ComputeHPBarPixels`.
+
+
+## HP bar animation off-by-one error for low HP
+
+([Video](https://www.youtube.com/watch?v=9KyNVIZxJvI))
+
+This is a bug with `ShortHPBar_CalcPixelFrame` in [engine/anim_hp_bar.asm](/engine/anim_hp_bar.asm):
+
+```asm
+ ld b, 0
+; This routine is buggy. If [wCurHPAnimMaxHP] * [wCurHPBarPixels] is divisible
+; by 48, the loop runs one extra time. To fix, uncomment the line below.
+.loop
+ ld a, l
+ sub 6 * 8
+ ld l, a
+ ld a, h
+ sbc $0
+ ld h, a
+ ; jr z, .done
+ jr c, .done
+ inc b
+ jr .loop
+```
+
+**Fix:** Uncomment `jr z, .done`.
+
+
+## Experience underflow for level 1 Pokémon with Medium-Slow growth rate
+
+([Video](https://www.youtube.com/watch?v=SXH8u0plHrE))
+
+This can bring Pokémon straight from level 1 to 100 by gaining just a few experience points.
+
+This is a bug with `CalcExpAtLevel` in [main.asm](/main.asm):
+
+```asm
+CalcExpAtLevel: ; 50e47
+; (a/b)*n**3 + c*n**2 + d*n - e
+ ld a, [BaseGrowthRate]
+ add a
+ add a
+ ld c, a
+ ld b, 0
+ ld hl, GrowthRates
+ add hl, bc
+```
+
+**Fix:**
+
+```asm
+CalcExpAtLevel: ; 50e47
+; (a/b)*n**3 + c*n**2 + d*n - e
+ ld a, d
+ cp 1
+ jr nz, .UseExpFormula
+; Pokémon have 0 experience at level 1
+ xor a
+ ld hl, hProduct
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+ ret
+
+.UseExpFormula
+ ld a, [BaseGrowthRate]
+ add a
+ add a
+ ld c, a
+ ld b, 0
+ ld hl, GrowthRates
+ add hl, bc
+```
+
+
+## Five-digit experience gain is printed incorrectly
+
+([Video](https://www.youtube.com/watch?v=o54VjpAEoO8))
+
+This is a bug with `Text_ABoostedStringBuffer2ExpPoints` and `Text_StringBuffer2ExpPoints` in [text/common_2.asm](/text/common_2.asm):
+
+```asm
+Text_ABoostedStringBuffer2ExpPoints::
+ text ""
+ line "a boosted"
+ cont "@"
+ deciram StringBuffer2, 2, 4
+ text " EXP. Points!"
+ prompt
+
+Text_StringBuffer2ExpPoints::
+ text ""
+ line "@"
+ deciram StringBuffer2, 2, 4
+ text " EXP. Points!"
+ prompt
+```
+
+**Fix:** Change both `deciram StringBuffer2, 2, 4` to `deciram StringBuffer2, 2, 5`.
+
+
+## BRN/PSN/PAR do not affect catch rate
+
+This is a bug with `PokeBall` in [items/item_effects.asm](/items/item_effects.asm):
+
+```asm
+.statuscheck
+; This routine is buggy. It was intended that SLP and FRZ provide a higher
+; catch rate than BRN/PSN/PAR, which in turn provide a higher catch rate than
+; no status effect at all. But instead, it makes BRN/PSN/PAR provide no
+; benefit.
+; Uncomment the line below to fix this.
+ ld b, a
+ ld a, [EnemyMonStatus]
+ and 1 << FRZ | SLP
+ ld c, 10
+ jr nz, .addstatus
+ ; ld a, [EnemyMonStatus]
+ and a
+ ld c, 5
+ jr nz, .addstatus
+ ld c, 0
+.addstatus
+ ld a, b
+ add c
+ jr nc, .max_1
+ ld a, $ff
+.max_1
+```
+
+**Fix:** Uncomment `ld a, [EnemyMonStatus]`.
+
+
+## Moon Ball does not boost catch rate
+
+This is a bug with `MoonBallMultiplier` in [items/item_effects.asm](/items/item_effects.asm):
+
+```asm
+MoonBallMultiplier:
+; This function is buggy.
+; Intent: multiply catch rate by 4 if mon evolves with moon stone
+; Reality: no boost
+
+...
+
+; Moon Stone's constant from Pokémon Red is used.
+; No Pokémon evolve with Burn Heal,
+; so Moon Balls always have a catch rate of 1×.
+ push bc
+ ld a, BANK(EvosAttacks)
+ call GetFarByte
+ cp MOON_STONE_RED ; BURN_HEAL
+ pop bc
+ ret nz
+```
+
+**Fix:** Change `MOON_STONE_RED` to `MOON_STONE`.
+
+
+## Love Ball boosts catch rate for the wrong gender
+
+This is a bug with `LoveBallMultiplier` in [items/item_effects.asm](/items/item_effects.asm):
+
+```asm
+LoveBallMultiplier:
+; This function is buggy.
+; Intent: multiply catch rate by 8 if mons are of same species, different sex
+; Reality: multiply catch rate by 8 if mons are of same species, same sex
+
+...
+
+ ld a, d
+ pop de
+ cp d
+ pop bc
+ ret nz ; for the intended effect, this should be "ret z"
+```
+
+**Fix:** Change `ret nz` to `ret z`.
+
+
+## Fast Ball only boosts catch rate for three Pokémon
+
+This is a bug with `FastBallMultiplier` in [items/item_effects.asm](/items/item_effects.asm):
+
+```asm
+FastBallMultiplier:
+; This function is buggy.
+; Intent: multiply catch rate by 4 if enemy mon is in one of the three
+; FleeMons tables.
+; Reality: multiply catch rate by 4 if enemy mon is one of the first three in
+; the first FleeMons table.
+
+...
+
+ inc hl
+ cp -1
+ jr z, .next
+ cp c
+ jr nz, .next ; for the intended effect, this should be "jr nz, .loop"
+ sla b
+ jr c, .max
+```
+
+**Fix:** Change `jr nz, .next` to `jr nz, .loop`.
+
+
+## Dragon Scale, not Dragon Fang, boosts Dragon-type moves
+
+This is a bug with `ItemAttributes` in [items/item_attributes.asm](/items/item_attributes.asm):
+
+```asm
+; DRAGON FANG
+ item_attribute 100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+
+...
+
+; DRAGON SCALE
+ item_attribute 2100, HELD_DRAGON_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
+```
+
+**Fix:** Move `HELD_DRAGON_BOOST` to the `DRAGON FANG` attributes and `0` to `DRAGON SCALE`.
+
+
+## Daisy's grooming doesn't always increase happiness
+
+This is a bug with `MassageOrHaircut` in [event/special.asm](/event/special.asm):
+
+```asm
+; Bug: Subtracting $ff from $ff fails to set c.
+; This can result in overflow into the next data array.
+; In the case of getting a massage from Daisy, we bleed
+; into CopyPokemonName_Buffer1_Buffer3, which passes
+; $d0 to ChangeHappiness and returns $73 to the script.
+; The end result is that there is a 0.4% chance your
+; Pokemon's happiness will not change at all.
+.loop
+ sub [hl]
+ jr c, .ok
+ inc hl
+ inc hl
+ inc hl
+ jr .loop
+
+.ok
+ inc hl
+ ld a, [hli]
+ ld [ScriptVar], a
+ ld c, [hl]
+ call ChangeHappiness
+ ret
+
+...
+
+Data_DaisyMassage: ; 746b
+ db $ff, 2, HAPPINESS_MASSAGE ; 99.6% chance
+
+CopyPokemonName_Buffer1_Buffer3: ; 746e
+ ld hl, StringBuffer1
+ ld de, StringBuffer3
+ ld bc, PKMN_NAME_LENGTH
+ jp CopyBytes
+```
+
+**Fix:**
+
+```asm
+Data_DaisyMassage: ; 746b
+ db $80, 2, HAPPINESS_MASSAGE ; 50% chance
+ db $ff, 2, HAPPINESS_MASSAGE ; 50% chance
+```
+
+
+## Magikarp in Lake of Rage are shorter, not longer
+
+This is a bug with `LoadEnemyMon.CheckMagikarpArea` in [battle/core.asm](/battle/core.asm):
+
+```asm
+.CheckMagikarpArea:
+; The z checks are supposed to be nz
+; Instead, all maps in GROUP_LAKE_OF_RAGE (mahogany area)
+; and routes 20 and 44 are treated as Lake of Rage
+
+; This also means Lake of Rage Magikarp can be smaller than ones
+; caught elsewhere rather than the other way around
+
+; Intended behavior enforces a minimum size at Lake of Rage
+; The real behavior prevents size flooring in the Lake of Rage area
+ ld a, [MapGroup]
+ cp GROUP_LAKE_OF_RAGE
+ jr z, .Happiness
+ ld a, [MapNumber]
+ cp MAP_LAKE_OF_RAGE
+ jr z, .Happiness
+```
+
+**Fix:** Change both `jr z, .Happiness` to `jr nz, .Happiness`.
+
+
+## Magikarp lengths can be miscalculated
+
+This is a bug with `CalcMagikarpLength.BCLessThanDE` in [event/magikarp.asm](/event/magikarp.asm):
+
+```asm
+.BCLessThanDE: ; fbc9a
+; Intention: Return bc < de.
+; Reality: Return b < d.
+ ld a, b
+ cp d
+ ret c
+ ret nc ; whoops
+ ld a, c
+ cp e
+ ret
+; fbca1
+```
+
+**Fix:** Delete `ret nc`.
+
+
+## Battle transitions fail to account for the enemy's level
+
+([Video](https://www.youtube.com/watch?v=eij_1060SMc))
+
+This is a bug with `StartTrainerBattle_DetermineWhichAnimation` in [engine/battle_start.asm](/engine/battle_start.asm):
+
+```asm
+StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365)
+; The screen flashes a different number of times depending on the level of
+; your lead Pokemon relative to the opponent's.
+; BUG: BattleMonLevel and EnemyMonLevel are not set at this point, so whatever
+; values happen to be there will determine the animation.
+ ld de, 0
+ ld a, [BattleMonLevel]
+ add 3
+ ld hl, EnemyMonLevel
+ cp [hl]
+ jr nc, .okay
+ set 0, e
+.okay
+ ld a, [wPermission]
+ cp CAVE
+ jr z, .okay2
+ cp PERM_5
+ jr z, .okay2
+ cp DUNGEON
+ jr z, .okay2
+ set 1, e
+.okay2
+ ld hl, .StartingPoints
+ add hl, de
+ ld a, [hl]
+ ld [wJumptableIndex], a
+ ret
+; 8c38f (23:438f)
+
+.StartingPoints: ; 8c38f
+ db 1, 9
+ db 16, 24
+; 8c393
+```
+
+*To do:* Fix this bug.
+
+
+## Slot machine payout sound effects cut each other off
+
+([Video](https://www.youtube.com/watch?v=ojq3xqfRF6I))
+
+This is a bug with `Slots_PayoutAnim` in [engine/slot_machine.asm](/engine/slot_machine.asm):
+
+```asm
+.okay
+ ld [hl], e
+ dec hl
+ ld [hl], d
+ ld a, [wcf64]
+ and $7
+ ret z ; ret nz would be more appropriate
+ ld de, SFX_GET_COIN_FROM_SLOTS
+ call PlaySFX
+ ret
+```
+
+**Fix:** Change `ret z` to `ret nz`.
+
+
+## Team Rocket battle music is not used for Executives or Scientists
+
+This is a bug with `PlayBattleMusic` in [main.asm](/main.asm):
+
+```asm
+ ; really, they should have included admins and scientists here too...
+ ld de, MUSIC_ROCKET_BATTLE
+ cp GRUNTM
+ jr z, .done
+ cp GRUNTF
+ jr z, .done
+```
+
+**Fix:**
+
+```asm
+ ld de, MUSIC_ROCKET_BATTLE
+ cp GRUNTM
+ jr z, .done
+ cp GRUNTF
+ jr z, .done
+ cp EXECUTIVEM
+ jr z, .done
+ cp EXECUTIVEF
+ jr z, .done
+ cp SCIENTIST
+ jr z, .done
+```
+
+
+## No bump noise if standing on tile `$3E`
+
+This is a bug with `DoPlayerMovement.CheckWarp` in [engine/player_movement.asm](/engine/player_movement.asm):
+
+```asm
+; Bug: Since no case is made for STANDING here, it will check
+; [.edgewarps + $ff]. This resolves to $3e at $8035a.
+; This causes wd041 to be nonzero when standing on tile $3e,
+; making bumps silent.
+
+ ld a, [WalkingDirection]
+ ; cp STANDING
+ ; jr z, .not_warp
+ ld e, a
+ ld d, 0
+ ld hl, .EdgeWarps
+ add hl, de
+ ld a, [PlayerStandingTile]
+ cp [hl]
+ jr nz, .not_warp
+
+ ld a, 1
+ ld [wd041], a
+ ld a, [WalkingDirection]
+ ; This is in the wrong place.
+ cp STANDING
+ jr z, .not_warp
+```
+
+**Fix:**
+
+```asm
+ ld a, [WalkingDirection]
+ cp STANDING
+ jr z, .not_warp
+ ld e, a
+ ld d, 0
+ ld hl, .EdgeWarps
+ add hl, de
+ ld a, [PlayerStandingTile]
+ cp [hl]
+ jr nz, .not_warp
+
+ ld a, 1
+ ld [wd041], a
+ ld a, [WalkingDirection]
+```
+
+
+## Playing Entei's Pokédex cry can distort Raikou's and Suicune's
+
+([Video](https://www.youtube.com/watch?v=z305e4sIO24))
+
+The exact cause is unknown, but a workaround exists for `DexEntryScreen_MenuActionJumptable.Cry` in [engine/pokedex.asm](/engine/pokedex.asm):
+
+```asm
+.Cry: ; 40340
+ call Pokedex_GetSelectedMon
+ ld a, [wd265]
+ call GetCryIndex
+ ld e, c
+ ld d, b
+ call PlayCryHeader
+ ret
+```
+
+**Workaround:**
+
+```asm
+.Cry: ; 40340
+ ld a, [CurPartySpecies]
+ call PlayCry
+ ret
+```
+
+
+## In-battle “`…`” ellipsis is too high
+
+This is a mistake with the “`…`” tile in [gfx/battle/hp_exp_bar_border.png](/gfx/battle/hp_exp_bar_border.png):
+
+![image](/docs/images/hp_exp_bar_border.png)
+
+**Fix:** Lower the ellipsis by two pixels:
+
+![image](/docs/images/hp_exp_bar_border_fix.png)
+
+
+## Two tiles in the `port` tileset are drawn incorrectly
+
+This is a mistake with the left-hand warp carpet corner tiles in [gfx/tilesets/port.png](/gfx/tilesets/port.png):
+
+![image](/docs/images/port.png)
+
+**Fix:** Adjust them to match the right-hand corner tiles:
+
+![image](/docs/images/port_fix.png)
+
+
+## `LoadMetatiles` wraps around past 128 blocks
+
+This bug prevents you from using blocksets with more than 128 blocks.
+
+In [home/map.asm](/home/map.asm):
+
+```asm
+ ; Set hl to the address of the current metatile data ([TilesetBlocksAddress] + (a) tiles).
+ ; This is buggy; it wraps around past 128 blocks.
+ ; To fix, uncomment the line below.
+ add a ; Comment or delete this line to fix the above bug.
+ ld l, a
+ ld h, 0
+ ; add hl, hl
+ add hl, hl
+ add hl, hl
+ add hl, hl
+ ld a, [TilesetBlocksAddress]
+ add l
+ ld l, a
+ ld a, [TilesetBlocksAddress + 1]
+ adc h
+ ld h, a
+```
+
+**Fix:** Delete `add a` and uncomment `add hl, hl`.
+
+
+## Surfing directly across a map connection does not load the new map
+
+([Video](https://www.youtube.com/watch?v=XFOWvMNG-zw))
+
+*To do:* Identify specific code causing this bug and fix it.
+
+
+## `Function6ec1` does not correctly limit object movement
+
+This bug is why the Lapras in Union Cave, which uses `SPRITEMOVEDATA_LAPRAS`, is not restricted by its `1, 1` movement radius.
+
+In [engine/npc_movement.asm](/engine/npc_movement.asm):
+
+```asm
+ ld hl, OBJECT_FLAGS1
+ add hl, bc
+ bit 4, [hl] ; lost, uncomment next line to fix
+; jr nz, .resume
+```
+
+**Fix:** Uncomment `jr nz, .resume`.
+
+
+## `CheckOwnMon` only checks the first five letters of OT names
+
+([Video](https://www.youtube.com/watch?v=GVTTmReM4nQ))
+
+This bug can allow you to talk to Eusine in Celadon City and encounter Ho-Oh with only traded legendary beasts.
+
+In [engine/search.asm](/engine/search.asm):
+
+```asm
+; check OT
+; This only checks five characters, which is fine for the Japanese version,
+; but in the English version the player name is 7 characters, so this is wrong.
+
+ ld hl, PlayerName
+
+rept NAME_LENGTH_JAPANESE +- 2 ; should be PLAYER_NAME_LENGTH +- 2
+ ld a, [de]
+ cp [hl]
+ jr nz, .notfound
+ cp "@"
+ jr z, .found ; reached end of string
+ inc hl
+ inc de
+endr
+
+ ld a, [de]
+ cp [hl]
+ jr z, .found
+
+.notfound
+ pop de
+ pop hl
+ pop bc
+ and a
+ ret
+```
+
+**Fix:** Change `rept NAME_LENGTH_JAPANESE +- 2` to `rept PLAYER_NAME_LENGTH +- 2`.
+
+
+## Catching a Transformed Pokémon always catches a Ditto
+
+This bug can affect Mew or Pokémon other than Ditto that used Transform via Mirror Move or Sketch.
+
+This is a bug with `PokeBall` in [items/item_effects.asm](/items/item_effects.asm):
+
+```asm
+ ld hl, EnemySubStatus5
+ ld a, [hl]
+ push af
+ set SUBSTATUS_TRANSFORMED, [hl]
+
+; This code is buggy. Any wild Pokémon that has Transformed will be
+; caught as a Ditto, even if it was something else like Mew.
+; To fix, do not set [TempEnemyMonSpecies] to DITTO.
+ bit SUBSTATUS_TRANSFORMED, a
+ jr nz, .ditto
+ jr .not_ditto
+
+.ditto
+ ld a, DITTO
+ ld [TempEnemyMonSpecies], a
+ jr .load_data
+
+.not_ditto
+ set SUBSTATUS_TRANSFORMED, [hl]
+ ld hl, wEnemyBackupDVs
+ ld a, [EnemyMonDVs]
+ ld [hli], a
+ ld a, [EnemyMonDVs + 1]
+ ld [hl], a
+
+.load_data
+ ld a, [TempEnemyMonSpecies]
+ ld [CurPartySpecies], a
+ ld a, [EnemyMonLevel]
+ ld [CurPartyLevel], a
+ callba LoadEnemyMon
+
+ pop af
+ ld [EnemySubStatus5], a
+```
+
+**Fix:**
+
+```asm
+ ld hl, EnemySubStatus5
+ ld a, [hl]
+ push af
+ set SUBSTATUS_TRANSFORMED, [hl]
+
+ bit SUBSTATUS_TRANSFORMED, a
+ jr nz, .load_data
+
+ ld hl, wEnemyBackupDVs
+ ld a, [EnemyMonDVs]
+ ld [hli], a
+ ld a, [EnemyMonDVs + 1]
+ ld [hl], a
+
+.load_data
+ ld a, [TempEnemyMonSpecies]
+ ld [CurPartySpecies], a
+ ld a, [EnemyMonLevel]
+ ld [CurPartyLevel], a
+ callba LoadEnemyMon
+
+ pop af
+ ld [EnemySubStatus5], a
+```
+
+
+## Using a Park Ball in normal battles has a corrupt animation
+
+([Video](https://www.youtube.com/watch?v=v1ErZdLCIyU))
+
+This is a bug with `ParkBall` in [items/item_effects.asm](/items/item_effects.asm):
+
+```asm
+.room_in_party
+ xor a
+ ld [wWildMon], a
+ ld a, [CurItem]
+ cp PARK_BALL
+ call nz, ReturnToBattle_UseBall
+```
+
+**Fix:**
+
+```asm
+.room_in_party
+ xor a
+ ld [wWildMon], a
+ ld a, [BattleType]
+ cp BATTLETYPE_CONTEST
+ call nz, ReturnToBattle_UseBall
+```
+
+
+## `HELD_CATCH_CHANCE` has no effect
+
+This is a bug with `PokeBall` in [items/item_effects.asm](/items/item_effects.asm):
+
+```asm
+ ; BUG: callba overwrites a,
+ ; and GetItemHeldEffect takes b anyway.
+
+ ; This is probably the reason
+ ; the HELD_CATCH_CHANCE effect
+ ; is never used.
+
+ ; Uncomment the line below to fix.
+
+ ld a, [BattleMonItem]
+; ld b, a
+ callba GetItemHeldEffect
+ ld a, b
+ cp HELD_CATCH_CHANCE
+```
+
+**Fix:** Uncomment `ld b, a`.
+
+
+## Only the first three `EvosAttacks` evolution entries can have Stone compatibility reported correctly
+
+This is a bug with `PlacePartyMonEvoStoneCompatibility.DetermineCompatibility` in [engine/party_menu.asm](/engine/party_menu.asm):
+
+```asm
+.DetermineCompatibility: ; 50268
+ ld de, StringBuffer1
+ ld a, BANK(EvosAttacksPointers)
+ ld bc, 2
+ call FarCopyBytes
+ ld hl, StringBuffer1
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, StringBuffer1
+ ld a, BANK(EvosAttacks)
+ ld bc, $a
+ call FarCopyBytes
+```
+
+**Fix:** Change `ld bc, $a` to `ld bc, $10` to support up to five Stone entries.
+
+
+## `ScriptCall` can overflow `wScriptStack` and crash
+
+In [engine/scripting.asm](/engine/scripting.asm):
+
+```asm
+ScriptCall:
+; Bug: The script stack has a capacity of 5 scripts, yet there is
+; nothing to stop you from pushing a sixth script. The high part
+; of the script address can then be overwritten by modifications
+; to ScriptDelay, causing the script to return to the rst/interrupt
+; space.
+
+ push de
+ ld hl, wScriptStackSize
+ ld e, [hl]
+ inc [hl]
+ ld d, $0
+ ld hl, wScriptStack
+ add hl, de
+ add hl, de
+ add hl, de
+ pop de
+ ld a, [ScriptBank]
+ ld [hli], a
+ ld a, [ScriptPos]
+ ld [hli], a
+ ld a, [ScriptPos + 1]
+ ld [hl], a
+ ld a, b
+ ld [ScriptBank], a
+ ld a, e
+ ld [ScriptPos], a
+ ld a, d
+ ld [ScriptPos + 1], a
+ ret
+```
+
+
+## `LoadSpriteGFX` does not limit the capacity of `UsedSprites`
+
+In [engine/overworld.asm](/engine/overworld.asm):
+
+```asm
+LoadSpriteGFX: ; 14306
+; Bug: b is not preserved, so it's useless as a next count.
+; Uncomment the lines below to fix.
+
+ ld hl, UsedSprites
+ ld b, SPRITE_GFX_LIST_CAPACITY
+.loop
+ ld a, [hli]
+ and a
+ jr z, .done
+ push hl
+ call .LoadSprite
+ pop hl
+ ld [hli], a
+ dec b
+ jr nz, .loop
+
+.done
+ ret
+
+.LoadSprite:
+ ; push bc
+ call GetSprite
+ ; pop bc
+ ld a, l
+ ret
+; 1431e
+```
+
+**Fix:** Uncomment `push bc` and `pop bc`.
+
+
+## `ChooseWildEncounter` doesn't really validate the wild Pokémon species
+
+In [engine/wildmons.asm](/engine/wildmons.asm):
+
+```asm
+ChooseWildEncounter: ; 2a14f
+...
+
+ ld a, b
+ ld [CurPartyLevel], a
+ ld b, [hl]
+ ; ld a, b
+ call ValidateTempWildMonSpecies
+ jr c, .nowildbattle
+
+ ld a, b ; This is in the wrong place.
+ cp UNOWN
+ jr nz, .done
+
+...
+
+ValidateTempWildMonSpecies: ; 2a4a0
+; Due to a development oversight, this function is called with the wild Pokemon's level, not its species, in a.
+```
+
+**Fix:**
+
+```asm
+ ld a, b
+ ld [CurPartyLevel], a
+ ld b, [hl]
+ ld a, b
+ call ValidateTempWildMonSpecies
+ jr c, .nowildbattle
+
+ cp UNOWN
+ jr nz, .done
+```
+
+## `TryObjectEvent` arbitrary code execution
+
+In [engine/events.asm](/engine/events.asm):
+
+```asm
+; Bug: If IsInArray returns nc, data at bc will be executed as code.
+ push bc
+ ld de, 3
+ ld hl, .pointers
+ call IsInArray
+ jr nc, .nope_bugged
+ pop bc
+
+ inc hl
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+.nope_bugged
+ ; pop bc
+ xor a
+ ret
+```
+
+**Fix:** Uncomment `pop bc`.
+
+
+## `Special_CheckBugContestContestantFlag` can read beyond its data table
+
+In [event/bug_contest_2.asm](/event/bug_contest_2.asm):
+
+```asm
+Special_CheckBugContestContestantFlag: ; 139ed
+; Checks the flag of the Bug Catching Contestant whose index is loaded in a.
+
+; Bug: If a >= 10 when this is called, it will read beyond the table.
+
+ ld hl, BugCatchingContestantEventFlagTable
+ ld e, a
+ ld d, 0
+ add hl, de
+ add hl, de
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld b, CHECK_FLAG
+ call EventFlagAction
+ ret
+; 139fe
+
+BugCatchingContestantEventFlagTable: ; 139fe
+ dw EVENT_BUG_CATCHING_CONTESTANT_1A
+ dw EVENT_BUG_CATCHING_CONTESTANT_2A
+ dw EVENT_BUG_CATCHING_CONTESTANT_3A
+ dw EVENT_BUG_CATCHING_CONTESTANT_4A
+ dw EVENT_BUG_CATCHING_CONTESTANT_5A
+ dw EVENT_BUG_CATCHING_CONTESTANT_6A
+ dw EVENT_BUG_CATCHING_CONTESTANT_7A
+ dw EVENT_BUG_CATCHING_CONTESTANT_8A
+ dw EVENT_BUG_CATCHING_CONTESTANT_9A
+ dw EVENT_BUG_CATCHING_CONTESTANT_10A
+; 13a12
+```
+
+
+## `ClearWRAM` only clears WRAM bank 1
+
+In [home/init.asm](/home/init.asm):
+
+```asm
+ClearWRAM:: ; 25a
+; Wipe swappable WRAM banks (1-7)
+; Assumes CGB or AGB
+
+ ld a, 1
+.bank_loop
+ push af
+ ld [rSVBK], a
+ xor a
+ ld hl, $d000
+ ld bc, $1000
+ call ByteFill
+ pop af
+ inc a
+ cp 8
+ jr nc, .bank_loop ; Should be jr c
+ ret
+; 270
+```
+
+**Fix:** Change `jr nc, .bank_loop` to `jr c, .bank_loop`.
+
+
+## `GetForestTreeFrame` works, but it's still bad
+
+In [tilesets/animations.asm](/tilesets/animations.asm):
+
+```asm
+GetForestTreeFrame: ; fc54c
+; Return 0 if a is even, or 2 if odd.
+ and a
+ jr z, .even
+ cp 1
+ jr z, .odd
+ cp 2
+ jr z, .even
+ cp 3
+ jr z, .odd
+ cp 4
+ jr z, .even
+ cp 5
+ jr z, .odd
+ cp 6
+ jr z, .even
+.odd
+ ld a, 2
+ scf
+ ret
+.even
+ xor a
+ ret
+; fc56d
+```
+
+**Fix:**
+
+```asm
+GetForestTreeFrame: ; fc54c
+; Return 0 if a is even, or 2 if odd.
+ and 1
+ add a
+ ret
+; fc56d
+```
diff --git a/docs/effect_commands.md b/docs/effect_commands.md
new file mode 100644
index 000000000..3112950a9
--- /dev/null
+++ b/docs/effect_commands.md
@@ -0,0 +1,358 @@
+# Effect Commands
+
+Defined in [macros/scripts/effect_commands.asm](/macros/scripts/effect_commands.asm) and [battle/effect_command_pointers.asm:BattleCommandPointers](/battle/effect_command_pointers.asm).
+
+
+## `$01`: `checkturn`
+
+## `$02`: `checkobedience`
+
+## `$03`: `usedmovetext`
+
+## `$04`: `doturn`
+
+## `$05`: `critical`
+
+## `$06`: `damagestats`
+
+## `$07`: `stab`
+
+## `$08`: `damagevariation`
+
+## `$09`: `checkhit`
+
+## `$0A`: `lowersub`
+
+## `$0B`: `hittargetnosub`
+
+## `$0C`: `raisesub`
+
+## `$0D`: `failuretext`
+
+## `$0E`: `checkfaint`
+
+## `$0F`: `criticaltext`
+
+## `$10`: `supereffectivetext`
+
+## `$11`: `checkdestinybond`
+
+## `$12`: `buildopponentrage`
+
+## `$13`: `poisontarget`
+
+## `$14`: `sleeptarget`
+
+## `$15`: `draintarget`
+
+## `$16`: `eatdream`
+
+## `$17`: `burntarget`
+
+## `$18`: `freezetarget`
+
+## `$19`: `paralyzetarget`
+
+## `$1A`: `selfdestruct`
+
+## `$1B`: `mirrormove`
+
+## `$1C`: `statup`
+
+## `$1D`: `statdown`
+
+## `$1E`: `payday`
+
+## `$1F`: `conversion`
+
+## `$20`: `resetstats`
+
+## `$21`: `storeenergy`
+
+## `$22`: `unleashenergy`
+
+## `$23`: `forceswitch`
+
+## `$24`: `endloop`
+
+## `$25`: `flinchtarget`
+
+## `$26`: `ohko`
+
+## `$27`: `recoil`
+
+## `$28`: `mist`
+
+## `$29`: `focusenergy`
+
+## `$2A`: `confuse`
+
+## `$2B`: `confusetarget`
+
+## `$2C`: `heal`
+
+## `$2D`: `transform`
+
+## `$2E`: `screen`
+
+## `$2F`: `poison`
+
+## `$30`: `paralyze`
+
+## `$31`: `substitute`
+
+## `$32`: `rechargenextturn`
+
+## `$33`: `mimic`
+
+## `$34`: `metronome`
+
+## `$35`: `leechseed`
+
+## `$36`: `splash`
+
+## `$37`: `disable`
+
+## `$38`: `cleartext`
+
+## `$39`: `charge`
+
+## `$3A`: `checkcharge`
+
+## `$3B`: `traptarget`
+
+## `$3C`: `effect0x3c`
+
+## `$3D`: `rampage`
+
+## `$3E`: `checkrampage`
+
+## `$3F`: `constantdamage`
+
+## `$40`: `counter`
+
+## `$41`: `encore`
+
+## `$42`: `painsplit`
+
+## `$43`: `snore`
+
+## `$44`: `conversion2`
+
+## `$45`: `lockon`
+
+## `$46`: `sketch`
+
+## `$47`: `defrostopponent`
+
+## `$48`: `sleeptalk`
+
+## `$49`: `destinybond`
+
+## `$4A`: `spite`
+
+## `$4B`: `falseswipe`
+
+## `$4C`: `healbell`
+
+## `$4D`: `kingsrock`
+
+## `$4E`: `triplekick`
+
+## `$4F`: `kickcounter`
+
+## `$50`: `thief`
+
+## `$51`: `arenatrap`
+
+## `$52`: `nightmare`
+
+## `$53`: `defrost`
+
+## `$54`: `curse`
+
+## `$55`: `protect`
+
+## `$56`: `spikes`
+
+## `$57`: `foresight`
+
+## `$58`: `perishsong`
+
+## `$59`: `startsandstorm`
+
+## `$5A`: `endure`
+
+## `$5B`: `checkcurl`
+
+## `$5C`: `rolloutpower`
+
+## `$5D`: `effect0x5d`
+
+## `$5E`: `furycutter`
+
+## `$5F`: `attract`
+
+## `$60`: `happinesspower`
+
+## `$61`: `present`
+
+## `$62`: `damagecalc`
+
+## `$63`: `frustrationpower`
+
+## `$64`: `safeguard`
+
+## `$65`: `checksafeguard`
+
+## `$66`: `getmagnitude`
+
+## `$67`: `batonpass`
+
+## `$68`: `pursuit`
+
+## `$69`: `clearhazards`
+
+## `$6A`: `healmorn`
+
+## `$6B`: `healday`
+
+## `$6C`: `healnite`
+
+## `$6D`: `hiddenpower`
+
+## `$6E`: `startrain`
+
+## `$6F`: `startsun`
+
+## `$70`: `attackup`
+
+## `$71`: `defenseup`
+
+## `$72`: `speedup`
+
+## `$73`: `specialattackup`
+
+## `$74`: `specialdefenseup`
+
+## `$75`: `accuracyup`
+
+## `$76`: `evasionup`
+
+## `$77`: `attackup2`
+
+## `$78`: `defenseup2`
+
+## `$79`: `speedup2`
+
+## `$7A`: `specialattackup2`
+
+## `$7B`: `specialdefenseup2`
+
+## `$7C`: `accuracyup2`
+
+## `$7D`: `evasionup2`
+
+## `$7E`: `attackdown`
+
+## `$7F`: `defensedown`
+
+## `$80`: `speeddown`
+
+## `$81`: `specialattackdown`
+
+## `$82`: `specialdefensedown`
+
+## `$83`: `accuracydown`
+
+## `$84`: `evasiondown`
+
+## `$85`: `attackdown2`
+
+## `$86`: `defensedown2`
+
+## `$87`: `speeddown2`
+
+## `$88`: `specialattackdown2`
+
+## `$89`: `specialdefensedown2`
+
+## `$8A`: `accuracydown2`
+
+## `$8B`: `evasiondown2`
+
+## `$8C`: `statupmessage`
+
+## `$8D`: `statdownmessage`
+
+## `$8E`: `statupfailtext`
+
+## `$8F`: `statdownfailtext`
+
+## `$90`: `effectchance`
+
+## `$91`: `statdownanim`
+
+## `$92`: `statupanim`
+
+## `$93`: `switchturn`
+
+## `$94`: `fakeout`
+
+## `$95`: `bellydrum`
+
+## `$96`: `psychup`
+
+## `$97`: `rage`
+
+## `$98`: `doubleflyingdamage`
+
+## `$99`: `doubleundergrounddamage`
+
+## `$9A`: `mirrorcoat`
+
+## `$9B`: `checkfuturesight`
+
+## `$9C`: `futuresight`
+
+## `$9D`: `doubleminimizedamage`
+
+## `$9E`: `skipsuncharge`
+
+## `$9F`: `thunderaccuracy`
+
+## `$A0`: `teleport`
+
+## `$A1`: `beatup`
+
+## `$A2`: `ragedamage`
+
+## `$A3`: `resettypematchup`
+
+## `$A4`: `allstatsup`
+
+## `$A5`: `effect0xa5`
+
+## `$A6`: `raisesubnoanim`
+
+## `$A7`: `lowersubnoanim`
+
+## `$A8`: `effect0xa8`
+
+## `$A9`: `clearmissdamage`
+
+## `$AA`: `movedelay`
+
+## `$AB`: `hittarget`
+
+## `$AC`: `tristatuschance`
+
+## `$AD`: `supereffectivelooptext`
+
+## `$AE`: `startloop`
+
+## `$AF`: `curl`
+
+## `$FE`: `endturn`
+
+## `$FF`: `endmove`
diff --git a/docs/event_commands.md b/docs/event_commands.md
new file mode 100644
index 000000000..151d74b54
--- /dev/null
+++ b/docs/event_commands.md
@@ -0,0 +1,348 @@
+# Event Commands
+
+Defined in [macros/scripts/event.asm](/macros/scripts/event.asm) and [engine/scripting.asm:ScriptCommandTable](/engine/scripting.asm).
+
+
+## `$00`: `scall` *script*
+
+## `$01`: `farscall` *script*
+
+## `$02`: `ptcall` *script*
+
+## `$03`: `jump` *script*
+
+## `$04`: `farjump` *script*
+
+## `$05`: `ptjump` *script*
+
+## `$06`: `if_equal` *byte*, *script*
+
+## `$07`: `if_not_equal` *byte*, *script*
+
+## `$08`: `iffalse` *script*
+
+## `$09`: `iftrue` *script*
+
+## `$0A`: `if_greater_than` *byte*, *script*
+
+## `$0B`: `if_less_than` *byte*, *script*
+
+## `$0C`: `jumpstd` *std_script*
+
+## `$0D`: `callstd` *std_script*
+
+## `$0E`: `callasm` *asm*
+
+## `$0F`: `special` *special_pointer*
+
+## `$10`: `ptcallasm` *asm*
+
+## `$11`: `checkmapscene` *map*
+
+## `$12`: `setmapscene` *map*, *scene_id*
+
+## `$13`: `checkscene`
+
+## `$14`: `setscene` *scene_id*
+
+## `$15`: `writebyte` *value*
+
+## `$16`: `addvar` *value*
+
+## `$17`: `random` *value*
+
+## `$18`: `checkver`
+
+## `$19`: `copybytetovar` *address*
+
+## `$1A`: `copyvartobyte` *address*
+
+## `$1B`: `loadvar` *address*, *value*
+
+## `$1C`: `checkcode` *variable*
+
+## `$1D`: `writevarcode` *variable*
+
+## `$1E`: `writecode` *variable*, *value*
+
+## `$1F`: `giveitem` *item_id*[, *quantity*=1]
+
+## `$20`: `takeitem` *item_id*[, *quantity*=1]
+
+## `$21`: `checkitem` *item_id*
+
+## `$22`: `givemoney` *account*, *value*
+
+## `$23`: `takemoney` *account*, *value*
+
+## `$24`: `checkmoney` *account*, *value*
+
+## `$25`: `givecoins` *value*
+
+## `$26`: `takecoins` *value*
+
+## `$27`: `checkcoins` *value*
+
+## `$28`: `addcellnum` *contact_id*
+
+## `$29`: `delcellnum` *contact_id*
+
+## `$2A`: `checkcellnum` *contact_id*
+
+## `$2B`: `checktime` *time*
+
+- **`checkmorn`:** `checktime MORN`
+- **`checkday`:** `checktime DAY`
+- **`checknite`:** `checktime NITE`
+
+## `$2C`: `checkpoke` *mon_id*
+
+## `$2D`: `givepoke` *mon_id*, *level*[, *item*=0[, *trainer*=0, *ot_name*, *nickname*]]
+
+## `$2E`: `giveegg` *mon_id*, *level*
+
+## `$2F`: `givepokeitem` *pointer*
+
+## `$30`: `checkpokeitem` *pointer*
+
+## `$31`: `checkevent` *event_flag*
+
+## `$32`: `clearevent` *event_flag*
+
+## `$33`: `setevent` *event_flag*
+
+## `$34`: `checkflag` *engine_flag*
+
+## `$35`: `clearflag` *engine_flag*
+
+## `$36`: `setflag` *engine_flag*
+
+## `$37`: `wildon`
+
+## `$38`: `wildoff`
+
+## `$39`: `xycompare` *pointer*
+
+## `$3A`: `warpmod` *warp_id*, *map*
+
+## `$3B`: `blackoutmod` *map*
+
+## `$3C`: `warp` *map*, *x*, *y*
+
+## `$3D`: `readmoney` *account*, *memory*
+
+## `$3E`: `readcoins` *memory*
+
+## `$3F`: `RAM2MEM` *memory*
+
+## `$40`: `pokenamemem` *mon_id*, *memory*
+
+## `$41`: `itemtotext` *item_id*, *memory*
+
+## `$42`: `mapnametotext` *memory*
+
+## `$43`: `trainertotext` *trainer_id*, *trainer_group*, *memory*
+
+## `$44`: `stringtotext` *text_pointer*, *memory*
+
+## `$45`: `itemnotify`
+
+## `$46`: `pocketisfull`
+
+## `$47`: `opentext`
+
+## `$48`: `refreshscreen` *dummy*
+
+## `$49`: `closetext`
+
+## `$4A`: `loadbytec2cf` *byte*
+
+## `$4B`: `farwritetext` *text_pointer*
+
+## `$4C`: `writetext` *text_pointer*
+
+## `$4D`: `repeattext` *byte1*, *byte2*
+
+## `$4E`: `yesorno`
+
+## `$4F`: `loadmenudata` *data_pointer*
+
+## `$50`: `closewindow`
+
+## `$51`: `jumptextfaceplayer` *text_pointer*
+
+## `$52`: `farjumptext` *text_pointer*
+
+## `$53`: `jumptext` *text_pointer*
+
+## `$54`: `waitbutton`
+
+## `$55`: `buttonsound`
+
+## `$56`: `pokepic` *mon_id*
+
+## `$57`: `closepokepic`
+
+## `$58`: `_2dmenu`
+
+## `$59`: `verticalmenu`
+
+## `$5A`: `loadpikachudata`
+
+## `$5B`: `randomwildmon`
+
+## `$5C`: `loadmemtrainer`
+
+## `$5D`: `loadwildmon` *mon_id*, *level*
+
+## `$5E`: `loadtrainer` *trainer_group*, *trainer_id*
+
+## `$5F`: `startbattle`
+
+## `$60`: `reloadmapafterbattle`
+
+## `$61`: `catchtutorial` *byte*
+
+## `$62`: `trainertext` *which_text*
+
+## `$63`: `trainerflagaction` *action*
+
+## `$64`: `winlosstext` *win_text_pointer*, *loss_text_pointer*
+
+## `$65`: `scripttalkafter`
+
+## `$66`: `end_if_just_battled`
+
+## `$67`: `check_just_battled`
+
+## `$68`: `setlasttalked` *object_id*
+
+## `$69`: `applymovement` *object_id*, *data_pointer*
+
+## `$6A`: `applymovement2` *data_pointer*
+
+## `$6B`: `faceplayer`
+
+## `$6C`: `faceobject` *object1*, *object2*
+
+## `$6D`: `variablesprite` *variable_sprite_id*, *sprite_id*
+
+## `$6E`: `disappear` *object_id*
+
+## `$6F`: `appear` *object_id*
+
+## `$70`: `follow` *object2*, *object1*
+
+## `$71`: `stopfollow`
+
+## `$72`: `moveobject` *object_id*, *x*, *y*
+
+## `$73`: `writeobjectxy` *object_id*
+
+## `$74`: `loademote` *emote_id*
+
+## `$75`: `showemote` *emote_id*, *object_id*, *length*
+
+## `$76`: `spriteface` *object_id*, *facing*
+
+## `$77`: `follownotexact` *object2*, *object1*
+
+## `$78`: `earthquake` *param*
+
+## `$79`: `changemap` *bank*, *blockdata_pointer*
+
+## `$7A`: `changeblock` *x*, *y*, *block*
+
+## `$7B`: `reloadmap`
+
+## `$7C`: `reloadmappart`
+
+## `$7D`: `writecmdqueue` *queue_pointer*
+
+## `$7E`: `delcmdqueue` *byte*
+
+## `$7F`: `playmusic` *music_id*
+
+## `$80`: `encountermusic`
+
+## `$81`: `musicfadeout` *music_id*, *length*
+
+## `$82`: `playmapmusic`
+
+## `$83`: `dontrestartmapmusic`
+
+## `$84`: `cry` *mon_id*
+
+## `$85`: `playsound` *sfx_id*
+
+## `$86`: `waitsfx`
+
+## `$87`: `warpsound`
+
+## `$88`: `specialsound`
+
+## `$89`: `passtoengine` *data_pointer*
+
+## `$8A`: `newloadmap` *which_method*
+
+## `$8B`: `pause` *length*
+
+## `$8C`: `deactivatefacing` *length*
+
+## `$8D`: `priorityjump` *script*
+
+## `$8E`: `warpcheck`
+
+## `$8F`: `ptpriorityjump` *script*
+
+## `$90`: `return`
+
+## `$91`: `end`
+
+## `$92`: `reloadandreturn` *which_method*
+
+## `$93`: `end_all`
+
+## `$94`: `pokemart` *dialog_id*, *mart_id*
+
+## `$95`: `elevator` *floor_list*
+
+## `$96`: `trade` *trade_id*
+
+## `$97`: `askforphonenumber` *contact_id*
+
+## `$98`: `phonecall` *call_id*
+
+## `$99`: `hangup`
+
+## `$9A`: `describedecoration` *byte*
+
+## `$9B`: `fruittree` *tree_id*
+
+## `$9C`: `specialphonecall` *call_id*
+
+## `$9D`: `checkphonecall`
+
+## `$9E`: `verbosegiveitem` *item_id*[, *quantity*=1]
+
+## `$9F`: `verbosegiveitem2` *item_id*, *variable*
+
+## `$A0`: `swarm` *swarm_id*, *map*
+
+## `$A1`: `halloffame`
+
+## `$A2`: `credits`
+
+## `$A3`: `warpfacing` *facing*, *map*, *x*, *y*
+
+## `$A4`: `battletowertext` *memory*
+
+## `$A5`: `landmarktotext` *landmark_id*, *memory*
+
+## `$A6`: `trainerclassname` *trainer_group*, *memory*
+
+## `$A7`: `name` *type*, *id*, *memory*
+
+## `$A8`: `wait` *duration*
+
+## `$A9`: `check_save`
diff --git a/docs/images/hp_exp_bar_border.png b/docs/images/hp_exp_bar_border.png
new file mode 100644
index 000000000..9d16a042b
--- /dev/null
+++ b/docs/images/hp_exp_bar_border.png
Binary files differ
diff --git a/docs/images/hp_exp_bar_border_fix.png b/docs/images/hp_exp_bar_border_fix.png
new file mode 100644
index 000000000..02d36f8a0
--- /dev/null
+++ b/docs/images/hp_exp_bar_border_fix.png
Binary files differ
diff --git a/docs/images/port.png b/docs/images/port.png
new file mode 100644
index 000000000..8a18aad7d
--- /dev/null
+++ b/docs/images/port.png
Binary files differ
diff --git a/docs/images/port_fix.png b/docs/images/port_fix.png
new file mode 100644
index 000000000..055a377a5
--- /dev/null
+++ b/docs/images/port_fix.png
Binary files differ
diff --git a/docs/map_scripts.md b/docs/map_scripts.md
new file mode 100644
index 000000000..fa8fa308b
--- /dev/null
+++ b/docs/map_scripts.md
@@ -0,0 +1,139 @@
+# Map Scripts
+
+
+## `const_value set 2`
+
+- **`const` *`MAPNAME_OBJECTNAME`***
+
+
+## `MapName_MapScriptHeader:`
+
+
+## `.SceneScripts: db` *N*
+
+- **`scene_script` *script***
+
+
+## `.MapCallbacks: db` *N*
+
+- **`dbw` *type*, *script***
+
+Callback types:
+
+- **`MAPCALLBACK_NEWMAP`**
+
+- **`MAPCALLBACK_TILES`**
+
+- **`MAPCALLBACK_OBJECTS`**
+
+- **`MAPCALLBACK_SPRITES`**
+
+- **`MAPCALLBACK_CMDQUEUE`**
+
+ **`dbw CMDQUEUE_STONETABLE,` *table_pointer***
+
+ **`stonetable` *warp_id*, *person*, *script***
+
+ **`db -1 ; end`**
+
+
+## Event scripts
+
+[Event commands](event_commands.md)
+
+
+## Text
+
+[Text commands](text_commands.md)
+
+
+## Movement data
+
+[Movement commands](movement_commands.md)
+
+
+## `MapName_MapEventHeader:`
+
+ ; filler
+ db 0, 0
+
+
+## `.Warps: db` *N*
+
+- **`warp_def` *y*, *x*, *warp_id*, *map***
+
+
+## `.CoordEvents: db` *N*
+
+- **`coord_event` *scene id*, *y*, *x*, *script***
+
+
+## `.BGEvents: db` *N*
+
+- **`bg_event` *y*, *x*, *type*, *script***
+
+BG event types:
+
+- **`BGEVENT_READ`**
+
+- **`BGEVENT_UP/DOWN/LEFT/RIGHT`**
+
+- **`BGEVENT_IFSET/IFNOTSET`**
+
+ **`dw` *event_flag*, *script***
+
+- **`BGEVENT_ITEM`**
+
+ **`dwb` *event_flag*, *item_id***
+
+- **`BGEVENT_COPY`**
+
+## `.ObjectEvents: db` *N*
+
+- **`object_event` *sprite*, *y*, *x*, *movement*, *ry*, *rx*, *h1*, *h2*, *palette*, *type*, *range*, *script*, *event_flag***
+
+Movement types:
+
+- **`SPRITEMOVEDATA_ITEM_TREE`**
+
+- **`SPRITEMOVEDATA_WANDER`**
+
+- **`SPRITEMOVEDATA_SPINRANDOM_SLOW`**
+
+- **`SPRITEMOVEDATA_WALK_UP_DOWN`**
+
+- **`SPRITEMOVEDATA_WALK_LEFT_RIGHT`**
+
+- **`SPRITEMOVEDATA_STANDING_UP/DOWN/LEFT/RIGHT`**
+
+- **`SPRITEMOVEDATA_SPINRANDOM_FAST`**
+
+- **`SPRITEMOVEDATA_SNORLAX`**
+
+- **`SPRITEMOVEDATA_POKEMON`**
+
+- **`SPRITEMOVEDATA_SUDOWOODO`**
+
+- **`SPRITEMOVEDATA_SMASHABLE_ROCK`**
+
+- **`SPRITEMOVEDATA_STRENGTH_BOULDER`**
+
+- **`SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE`**
+
+- **`SPRITEMOVEDATA_SPINCLOCKWISE`**
+
+- **`SPRITEMOVEDATA_BIGDOLL`**
+
+- **`SPRITEMOVEDATA_LAPRAS`**
+
+Object types:
+
+- **`OBJECTTYPE_SCRIPT`**
+
+- **`OBJECTTYPE_ITEMBALL`**
+
+ **`itemball` *item_id***
+
+- **`OBJECTTYPE_TRAINER`**
+
+ **`trainer` *event_flag*, *group_id*, *trainer_id*, *seen_text*, *beaten_text*, *loss_text*, *script***
diff --git a/docs/move_anim_commands.md b/docs/move_anim_commands.md
new file mode 100644
index 000000000..9772550c3
--- /dev/null
+++ b/docs/move_anim_commands.md
@@ -0,0 +1,102 @@
+# Move Animation Commands
+
+Defined in [macros/scripts/move_anim.asm](/macros/scripts/move_anim.asm) and [battle/anims.asm:BattleAnimations](/battle/anims.asm).
+
+
+## `$00`−`$EF`: `anim_wait` *length*
+
+## `$D0`: `anim_obj` *object*, *x*, *y*, *param*
+
+## `$D1`: `anim_1gfx` *gfx*
+
+## `$D2`: `anim_2gfx` *gfx1*, *gfx2*
+
+## `$D3`: `anim_3gfx` *gfx1*, *gfx2*, *gfx3*
+
+## `$D4`: `anim_4gfx` *gfx1*, *gfx2*, *gfx3*, *gfx4*
+
+## `$D5`: `anim_5gfx` *gfx1*, *gfx2*, *gfx3*, *gfx4*, *gfx5*
+
+## `$D6`: `anim_incobj` *id*
+
+## `$D7`: `anim_setobj` *id*, *object*
+
+## `$D8`: `anim_incbgeffect` *effect*
+
+## `$D9`: `anim_enemyfeetobj`
+
+## `$DA`: `anim_playerheadobj`
+
+## `$DB`: `anim_checkpokeball`
+
+## `$DC`: `anim_transform`
+
+## `$DD`: `anim_raisesub`
+
+## `$DE`: `anim_dropsub`
+
+## `$DF`: `anim_resetobp0`
+
+## `$E0`: `anim_sound` *duration*, *tracks*, *id*
+
+## `$E1`: `anim_cry` *pitch*
+
+## `$E2`: `anim_minimizeopp`
+
+## `$E3`: `anim_oamon`
+
+## `$E4`: `anim_oamoff`
+
+## `$E5`: `anim_clearobjs`
+
+## `$E6`: `anim_beatup`
+
+## `$E7`: `anim_0xe7`
+
+## `$E8`: `anim_updateactorpic`
+
+## `$E9`: `anim_minimize`
+
+## `$EA`: `anim_0xea`
+
+## `$EB`: `anim_0xeb`
+
+## `$EC`: `anim_0xec`
+
+## `$ED`: `anim_0xed`
+
+## `$EE`: `anim_if_param_and` *value*, *address*
+
+## `$EF`: `anim_jumpuntil` *address*
+
+## `$F0`: `anim_bgeffect` *effect*, *unknown1*, *unknown2*, *unknown3*
+
+## `$F1`: `anim_bgp` *colors*
+
+## `$F2`: `anim_obp0` *colors*
+
+## `$F3`: `anim_obp1` *colors*
+
+## `$F4`: `anim_clearsprites`
+
+## `$F5`: `anim_0xf5`
+
+## `$F6`: `anim_0xf6`
+
+## `$F7`: `anim_0xf7`
+
+## `$F8`: `anim_if_param_equal` *value*, *address*
+
+## `$F9`: `anim_setvar` *value*
+
+## `$FA`: `anim_incvar`
+
+## `$FB`: `anim_if_var_equal` *value*, *address*
+
+## `$FC`: `anim_jump` *address*
+
+## `$FD`: `anim_loop` *count*, *address*
+
+## `$FE`: `anim_call` *address*
+
+## `$FF`: `anim_ret`
diff --git a/docs/movement_commands.md b/docs/movement_commands.md
new file mode 100644
index 000000000..56b55f53e
--- /dev/null
+++ b/docs/movement_commands.md
@@ -0,0 +1,84 @@
+# Movement Commands
+
+Defined in [macros/scripts/movement.asm](/macros/scripts/movement.asm) and [engine/movement.asm:MovementPointers](/engine/movement.asm).
+
+
+## `$00`−`$03`: `turn_head` *direction*
+
+## `$04`−`$07`: `turn_step` *direction*
+
+## `$08`−`$0B`: `slow_step` *direction*
+
+## `$0C`−`$0F`: `step` *direction*
+
+## `$10`−`$13`: `big_step` *direction*
+
+## `$14`−`$17`: `slow_slide_step` *direction*
+
+## `$18`−`$1B`: `slide_step` *direction*
+
+## `$1C`−`$1F`: `fast_slide_step` *direction*
+
+## `$20`−`$23`: `turn_away` *direction*
+
+## `$24`−`$27`: `turn_in` *direction*
+
+## `$28`−`$2B`: `turn_waterfall` *direction*
+
+## `$2C`−`$2F`: `slow_jump_step` *direction*
+
+## `$30`−`$33`: `jump_step` *direction*
+
+## `$34`−`$37`: `fast_jump_step` *direction*
+
+## `$38`: `remove_sliding`
+
+## `$39`: `set_sliding`
+
+## `$3A`: `remove_fixed_facing`
+
+## `$3B`: `fix_facing`
+
+## `$3C`: `show_object`
+
+## `$3D`: `hide_object`
+
+## `$3E`−`$46`: `step_sleep` *length*
+
+## `$47`: `step_end`
+
+## `$48`: `step_48` *param*
+
+## `$49`: `remove_object`
+
+## `$4A`: `step_loop`
+
+## `$4B`: `step_4b`
+
+## `$4C`: `teleport_from`
+
+## `$4D`: `teleport_to`
+
+## `$4E`: `skyfall`
+
+## `$4F`: `step_dig` *length*
+
+## `$50`: `step_bump`
+
+## `$51`: `fish_got_bite`
+
+## `$52`: `fish_cast_rod`
+
+## `$53`: `hide_emote`
+
+## `$54`: `show_emote`
+
+## `$55`: `step_shake` *displacement*
+
+## `$56`: `tree_shake`
+
+## `$57`: `rock_smash` *length*
+
+## `$58`: `return_dig` *length*
+
+## `$59`: `skyfall_top`
diff --git a/docs/music_commands.md b/docs/music_commands.md
new file mode 100644
index 000000000..bf6359068
--- /dev/null
+++ b/docs/music_commands.md
@@ -0,0 +1,96 @@
+# Music Commands
+
+Defined in [macros/scripts/audio.asm](/macros/scripts/audio.asm) and [audio/engine.asm:MusicCommands](/audio/engine.asm).
+
+
+## `musicheader` *n*, *index*, *address*
+
+## `cry_header` *n*, *index*, *address*
+
+## `note` *pitch*, *octave*
+
+## `sound` *pitch*, *octave*, *intensity*, *frequency*
+
+## `noise` *pitch*, *duration*, *intensity*, *frequency*
+
+## `$D0`−`$D7`: `octave` *n*
+
+## `$D8`: `notetype` *length*[, *intensity*]
+
+## `$D9`: `pitchoffset` *octave*, *key*
+
+## `$DA`: `tempo` *tempo*
+
+## `$DB`: `dutycycle` *duty_cycle*
+
+## `$DC`: `intensity` *intensity*
+
+## `$DD`: `soundinput` *input*
+
+## `$DE`: `sound_duty` *a*, *b*, *c*, *d*
+
+## `$DF`: `togglesfx`
+
+## `$E0`: `slidepitchto` *duration*, *octave*, *pitch*
+
+## `$E1`: `vibrato` *delay*, *extent*
+
+## `$E2`: `unknownmusic0xe2` *unknown*
+
+## `$E3`: `togglenoise` *id*
+
+## `$E4`: `panning` *tracks*
+
+## `$E5`: `volume` *volume*
+
+## `$E6`: `tone` *tone*
+
+## `$E7`: `unknownmusic0xe7` *unknown*
+
+## `$E8`: `unknownmusic0xe8` *unknown*
+
+## `$E9`: `tempo_relative` *value*
+
+## `$EA`: `restartchannel` *address*
+
+## `$EB`: `newsong` *id*
+
+## `$EC`: `sfxpriorityon`
+
+## `$ED`: `sfxpriorityoff`
+
+## `$EE`: `unknownmusic0xee` *address*
+
+## `$EF`: `stereopanning` *tracks*
+
+## `$F0`: `sfxtogglenoise` *id*
+
+## `$F1`: `music0xf1`
+
+## `$F2`: `music0xf2`
+
+## `$F3`: `music0xf3`
+
+## `$F4`: `music0xf4`
+
+## `$F5`: `music0xf5`
+
+## `$F6`: `music0xf6`
+
+## `$F7`: `music0xf7`
+
+## `$F8`: `music0xf8`
+
+## `$F9`: `unknownmusic0xf9`
+
+## `$FA`: `setcondition` *condition*
+
+## `$FB`: `jumpif` *condition*, *address*
+
+## `$FC`: `jumpchannel` *address*
+
+## `$FD`: `loopchannel` *count*, *address*
+
+## `$FE`: `callchannel` *address*
+
+## `$FF`: `endchannel`
diff --git a/docs/pic_animations.md b/docs/pic_animations.md
new file mode 100644
index 000000000..57c7f151a
--- /dev/null
+++ b/docs/pic_animations.md
@@ -0,0 +1,31 @@
+# Pic Animations
+
+Defined in [macros/scripts/gfx_anim.asm](/macros/scripts/gfx_anim.asm) and [battle/anim_commands.asm:BattleAnimCommands](/battle/anim_commands.asm).
+
+
+Pic animations are assembled in 3 parts:
+
+- Top-level animations:
+ - `frame` *#*, *duration*: Frame 0 is the original pic (no change)
+ - `setrepeat` *#*: Sets the number of times to repeat
+ - `dorepeat` *#*: Repeats from command *#* (starting from 0)
+ - `end`
+
+- Bitmasks:
+ Layered over the pic to designate affected tiles
+
+- Frame definitions:
+ first byte is the bitmask used for this frame
+ following bytes are tile ids mapped to each bit in the mask
+
+Animation data is in these files:
+
+- gfx/pics/anims.asm:
+ Main animations (played everywhere)
+
+- gfx/pics/extras.asm:
+ Extra animations, appended to the main animation.
+ Used in the status screen (blinking, tail wags etc.)
+
+- gfx/pics/unown_anims.asm and gfx/pics/unown_extras.asm:
+ Unown has its own animation data despite having an entry in the main tables.
diff --git a/docs/text_commands.md b/docs/text_commands.md
new file mode 100644
index 000000000..cf3a53327
--- /dev/null
+++ b/docs/text_commands.md
@@ -0,0 +1,164 @@
+# Text Commands
+
+Defined in [macros/scripts/text.asm](/macros/scripts/text.asm) and [home/text.asm:TextCommands](/home/text.asm).
+
+
+## `$00`: `text` *text*
+
+Start writing text until `"@"`.
+
+
+## `$4E`: `next` *text*
+
+Move a line down.
+
+
+## `$4F`: `line` *text*
+
+Start writing at the bottom line.
+
+
+## `$50`: `page` *text*
+
+Start a new Pokédex page.
+
+
+## `$51`: `para` *text*
+
+Start a new paragraph.
+
+
+## `$55`: `cont` *text*
+
+Scroll to the next line.
+
+
+## `$57`: `done`
+
+End a text box.
+
+
+## `$58`: `prompt`
+
+Prompt the player to end a text box (initiating some other event).
+
+
+## `$01`: `text_from_ram` *address*
+
+Write text from a RAM address.
+
+
+## `$02`: `text_bcd` *address*, *flags*
+
+Write [BCD](bcd) from an address, typically RAM.
+
+[bcd]: https://en.wikipedia.org/wiki/Binary-coded_decimal
+
+
+## `$03`: `text_move` *address*
+
+Move to a new tile.
+
+
+## `$04`: `text_box` *address*, *height*, *width*
+
+Draw a box.
+
+
+## `$05`: `text_low`
+
+Write text at (1, 16).
+
+
+## `$06`: `text_waitbutton`
+
+Wait for button press; show arrow.
+
+
+## `$07`: `text_scroll`
+
+Pushes text up two lines and sets the `bc` cursor to the border tile below the
+first character column of the text box.
+
+
+## `$08`: `start_asm`
+
+Start interpreting assembly code.
+
+
+## `$09`: `deciram` *address*, *bytes*, *digits*
+
+Read *bytes* bytes from *address* and print them as a *digits*-digit number.
+
+
+## `$0A`: `interpret_data`
+
+Exit.
+
+
+## `$0B`: `sound_dex_fanfare_50_79`
+
+Play `SFX_DEX_FANFARE_50_79`.
+
+
+## `$0C`: `limited_interpret_data` *number*
+
+Print *number* `"…"`s.
+
+
+## `$0D`: `link_wait_button`
+
+Wait for button press; show arrow.
+
+
+## `$0E`: `sound_dex_fanfare_20_49`
+
+Play `SFX_DEX_FANFARE_20_49`.
+
+
+## `$0F`: `sound_item`
+
+Play `SFX_ITEM`.
+
+
+## `$10`: `sound_caught_mon`
+
+Play `SFX_CAUGHT_MON`.
+
+
+## `$11`: `sound_dex_fanfare_80_109`
+
+Play `SFX_DEX_FANFARE_80_109`.
+
+
+## `$12`: `sound_fanfare`
+
+Play `SFX_FANFARE`.
+
+
+## `$13`: `sound_slot_machine_start`
+
+Play `SFX_SLOT_MACHINE_START`.
+
+
+## `$14`: `text_buffer` *id*
+
+Write text from one of the following addresses (listed in `StringBufferPointers`):
+
+0. `StringBuffer3`
+1. `StringBuffer4`
+2. `StringBuffer5`
+3. `StringBuffer2`
+4. `StringBuffer1`
+5. `EnemyMonNick`
+6. `BattleMonNick`
+
+
+## `$15`: `current_day`
+
+Print the weekday.
+
+
+## `$16`: `text_jump` *address*
+
+Write text from a different bank.
diff --git a/engine/anim_hp_bar.asm b/engine/anim_hp_bar.asm
index 6272ff7ea..78062b547 100755
--- a/engine/anim_hp_bar.asm
+++ b/engine/anim_hp_bar.asm
@@ -293,7 +293,7 @@ HPBarAnim_PaletteUpdate: ; d7b4
call SetHPPal
ld a, [wCurHPAnimPal]
ld c, a
- callba ApplyHPBarPals
+ farcall ApplyHPBarPals
ret
; d7c9
@@ -382,7 +382,10 @@ ShortHPBar_CalcPixelFrame: ; d839
and a
jr z, .return_zero
call AddNTimes
+
ld b, 0
+; This routine is buggy. If [wCurHPAnimMaxHP] * [wCurHPBarPixels] is divisible
+; by 48, the loop runs one extra time. To fix, uncomment the line below.
.loop
ld a, l
sub 6 * 8
@@ -390,6 +393,7 @@ ShortHPBar_CalcPixelFrame: ; d839
ld a, h
sbc $0
ld h, a
+ ; jr z, .done
jr c, .done
inc b
jr .loop
diff --git a/engine/battle_start.asm b/engine/battle_start.asm
deleted file mode 100644
index 627519daa..000000000
--- a/engine/battle_start.asm
+++ /dev/null
@@ -1,865 +0,0 @@
-Predef_StartBattle: ; 8c20f
- call .InitGFX
- ld a, [rBGP]
- ld [wBGP], a
- ld a, [rOBP0]
- ld [wOBP0], a
- ld a, [rOBP1]
- ld [wOBP1], a
- call DelayFrame
- ld hl, hVBlank
- ld a, [hl]
- push af
- ld [hl], $1
-
-.loop
- ld a, [wJumptableIndex]
- bit 7, a
- jr nz, .done
- call FlashyTransitionToBattle
- call DelayFrame
- jr .loop
-
-.done
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
-
- ld hl, UnknBGPals
- ld bc, 8 palettes
- xor a
- call ByteFill
-
- pop af
- ld [rSVBK], a
-
- ld a, %11111111
- ld [wBGP], a
- call DmgToCgbBGPals
- call DelayFrame
- xor a
- ld [hLCDCPointer], a
- ld [hLYOverrideStart], a
- ld [hLYOverrideEnd], a
- ld [hSCY], a
-
- ld a, $1
- ld [rSVBK], a
- pop af
- ld [hVBlank], a
- call DelayFrame
- ret
-; 8c26d
-
-.InitGFX: ; 8c26d
- ld a, [wLinkMode]
- cp LINK_MOBILE
- jr z, .mobile
- callba ReanchorBGMap_NoOAMUpdate
- call UpdateSprites
- call DelayFrame
- call .NonMobile_LoadPokeballTiles
- call BattleStart_LoadEDTile
- jr .resume
-
-.mobile
- call LoadTrainerBattlePokeballTiles
-
-.resume
- ld a, SCREEN_HEIGHT_PX
- ld [hWY], a
- call DelayFrame
- xor a
- ld [hBGMapMode], a
- ld hl, wJumptableIndex
- xor a
- ld [hli], a
- ld [hli], a
- ld [hl], a
- call WipeLYOverrides
- ret
-; 8c2a0
-
-.NonMobile_LoadPokeballTiles: ; 8c2a0
- call LoadTrainerBattlePokeballTiles
- hlbgcoord 0, 0
- call ConvertTrainerBattlePokeballTilesTo2bpp
- ret
-; 8c2aa
-
-LoadTrainerBattlePokeballTiles:
-; Load the tiles used in the Pokeball Graphic that fills the screen
-; at the start of every Trainer battle.
- ld de, TrainerBattlePokeballTiles
- ld hl, VTiles1 tile $7e
- ld b, BANK(TrainerBattlePokeballTiles)
- ld c, 2
- call Request2bpp
-
- ld a, [rVBK]
- push af
- ld a, $1
- ld [rVBK], a
-
- ld de, TrainerBattlePokeballTiles
- ld hl, VTiles4 tile $7e
- ld b, BANK(TrainerBattlePokeballTiles)
- ld c, 2
- call Request2bpp
-
- pop af
- ld [rVBK], a
- ret
-; 8c2cf
-
-ConvertTrainerBattlePokeballTilesTo2bpp: ; 8c2cf
- ld a, [rSVBK]
- push af
- ld a, $6
- ld [rSVBK], a
- push hl
- ld hl, wDecompressScratch
- ld bc, $28 tiles
-
-.loop
- ld [hl], -1
- inc hl
- dec bc
- ld a, c
- or b
- jr nz, .loop
-
- pop hl
- ld de, wDecompressScratch
- ld b, BANK(ConvertTrainerBattlePokeballTilesTo2bpp) ; BANK(@)
- ld c, $28
- call Request2bpp
- pop af
- ld [rSVBK], a
- ret
-; 8c2f4
-
-TrainerBattlePokeballTiles: ; 8c2f4
-INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp"
-
-
-FlashyTransitionToBattle: ; 8c314
- jumptable .dw, wJumptableIndex
-; 8c323
-
-.dw ; 8c323 (23:4323)
- dw StartTrainerBattle_DetermineWhichAnimation ; 00
-
- ; Animation 1: cave
- dw StartTrainerBattle_LoadPokeBallGraphics ; 01
- dw StartTrainerBattle_SetUpBGMap ; 02
- dw StartTrainerBattle_Flash ; 03
- dw StartTrainerBattle_Flash ; 04
- dw StartTrainerBattle_Flash ; 05
- dw StartTrainerBattle_NextScene ; 06
- dw StartTrainerBattle_SetUpForWavyOutro ; 07
- dw StartTrainerBattle_SineWave ; 08
-
- ; Animation 2: cave, stronger
- dw StartTrainerBattle_LoadPokeBallGraphics ; 09
- dw StartTrainerBattle_SetUpBGMap ; 0a
- dw StartTrainerBattle_Flash ; 0b
- dw StartTrainerBattle_Flash ; 0c
- dw StartTrainerBattle_Flash ; 0d
- dw StartTrainerBattle_NextScene ; 0e
- ; There is no setup for this one
- dw StartTrainerBattle_ZoomToBlack ; 0f
-
- ; Animation 3: no cave
- dw StartTrainerBattle_LoadPokeBallGraphics ; 10
- dw StartTrainerBattle_SetUpBGMap ; 11
- dw StartTrainerBattle_Flash ; 12
- dw StartTrainerBattle_Flash ; 13
- dw StartTrainerBattle_Flash ; 14
- dw StartTrainerBattle_NextScene ; 15
- dw StartTrainerBattle_SetUpForSpinOutro ; 16
- dw StartTrainerBattle_SpinToBlack ; 17
-
- ; Animation 4: no cave, stronger
- dw StartTrainerBattle_LoadPokeBallGraphics ; 18
- dw StartTrainerBattle_SetUpBGMap ; 19
- dw StartTrainerBattle_Flash ; 1a
- dw StartTrainerBattle_Flash ; 1b
- dw StartTrainerBattle_Flash ; 1c
- dw StartTrainerBattle_NextScene ; 1d
- dw StartTrainerBattle_SetUpForRandomScatterOutro ; 1e
- dw StartTrainerBattle_SpeckleToBlack ; 1f
-
- ; All animations jump to here.
- dw StartTrainerBattle_Finish ; 20
-
-
-StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365)
-; The screen flashes a different number of
-; times depending on the level of your lead
-; Pokemon relative to the opponent's.
- ld de, 0
- ld a, [BattleMonLevel]
- add 3
- ld hl, EnemyMonLevel
- cp [hl]
- jr nc, .okay
- set 0, e
-.okay
- ld a, [wPermission]
- cp CAVE
- jr z, .okay2
- cp PERM_5
- jr z, .okay2
- cp DUNGEON
- jr z, .okay2
- set 1, e
-.okay2
- ld hl, .StartingPoints
- add hl, de
- ld a, [hl]
- ld [wJumptableIndex], a
- ret
-; 8c38f (23:438f)
-
-.StartingPoints: ; 8c38f
- db 1, 9
- db 16, 24
-; 8c393
-
-StartTrainerBattle_Finish: ; 8c393 (23:4393)
- call ClearSprites
- ld a, $80
- ld [wJumptableIndex], a
- ret
-
-StartTrainerBattle_NextScene: ; 8c39c (23:439c)
- ld hl, wJumptableIndex
- inc [hl]
- ret
-
-StartTrainerBattle_SetUpBGMap: ; 8c3a1 (23:43a1)
- call StartTrainerBattle_NextScene
- xor a
- ld [wcf64], a
- ld [hBGMapMode], a
- ret
-
-StartTrainerBattle_Flash: ; 8c3ab (23:43ab)
- call .DoFlashAnimation
- ret nc
- call StartTrainerBattle_NextScene
- ret
-
-.DoFlashAnimation: ; 8c3b3 (23:43b3)
- ld a, [wTimeOfDayPalset]
- cp %11111111 ; dark cave
- jr z, .done
- ld hl, wcf64
- ld a, [hl]
- inc [hl]
- srl a
- ld e, a
- ld d, 0
- ld hl, .pals
- add hl, de
- ld a, [hl]
- cp %00000001
- jr z, .done
- ld [wBGP], a
- call DmgToCgbBGPals
- and a
- ret
-
-.done
- xor a
- ld [wcf64], a
- scf
- ret
-; 8c3db (23:43db)
-
-.pals ; 8c3db
- db %11111001 ; 3321
- db %11111110 ; 3332
- db %11111111 ; 3333
- db %11111110 ; 3332
- db %11111001 ; 3321
- db %11100100 ; 3210
- db %10010000 ; 2100
- db %01000000 ; 1000
- db %00000000 ; 0000
- db %01000000 ; 1000
- db %10010000 ; 2100
- db %11100100 ; 3210
- db %00000001 ; 0001
-; 8c3e8
-
-StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8)
- callba Function5602
- ld a, $5 ; BANK(LYOverrides)
- ld [rSVBK], a
-
- call StartTrainerBattle_NextScene
-
- ld a, rSCX - $ff00
- ld [hLCDCPointer], a
- xor a
- ld [hLYOverrideStart], a
- ld a, $90
- ld [hLYOverrideEnd], a
- xor a
- ld [wcf64], a
- ld [wcf65], a
- ret
-
-StartTrainerBattle_SineWave: ; 8c408 (23:4408)
- ld a, [wcf64]
- cp $60
- jr nc, .end
- call .DoSineWave
- ret
-
-.end
- ld a, $20
- ld [wJumptableIndex], a
- ret
-
-.DoSineWave: ; 8c419 (23:4419)
- ld hl, wcf65
- ld a, [hl]
- inc [hl]
- ld hl, wcf64
- ld d, [hl]
- add [hl]
- ld [hl], a
- ld a, LYOverridesEnd - LYOverrides
- ld bc, LYOverrides
- ld e, $0
-
-.loop
- push af
- push de
- ld a, e
- call StartTrainerBattle_DrawSineWave
- ld [bc], a
- inc bc
- pop de
- ld a, e
- add $2
- ld e, a
- pop af
- dec a
- jr nz, .loop
- ret
-
-StartTrainerBattle_SetUpForSpinOutro: ; 8c43d (23:443d)
- callba Function5602
- ld a, $5 ; BANK(LYOverrides)
- ld [rSVBK], a
- call StartTrainerBattle_NextScene
- xor a
- ld [wcf64], a
- ret
-
-spintable_entry: MACRO
- db \1
- dw .wedge\2
- dwcoord \3, \4
-ENDM
-
-; quadrants
- const_def
- const UPPER_LEFT
- const UPPER_RIGHT
- const LOWER_LEFT
- const LOWER_RIGHT
-
-StartTrainerBattle_SpinToBlack: ; 8c44f (23:444f)
- xor a
- ld [hBGMapMode], a
- ld a, [wcf64]
- ld e, a
- ld d, 0
- ld hl, .spintable
-rept 5
- add hl, de
-endr
- ld a, [hli]
- cp -1
- jr z, .end
- ld [wcf65], a
- call .load
- ld a, $1
- ld [hBGMapMode], a
- call DelayFrame
- call DelayFrame
- ld hl, wcf64
- inc [hl]
- ret
-
-.end
- ld a, $1
- ld [hBGMapMode], a
- call DelayFrame
- call DelayFrame
- call DelayFrame
- xor a
- ld [hBGMapMode], a
- ld a, $20
- ld [wJumptableIndex], a
- ret
-; 8c490 (23:4490)
-
-.spintable ; 8c490
- spintable_entry UPPER_LEFT, 1, 1, 6
- spintable_entry UPPER_LEFT, 2, 0, 3
- spintable_entry UPPER_LEFT, 3, 1, 0
- spintable_entry UPPER_LEFT, 4, 5, 0
- spintable_entry UPPER_LEFT, 5, 9, 0
- spintable_entry UPPER_RIGHT, 5, 10, 0
- spintable_entry UPPER_RIGHT, 4, 14, 0
- spintable_entry UPPER_RIGHT, 3, 18, 0
- spintable_entry UPPER_RIGHT, 2, 19, 3
- spintable_entry UPPER_RIGHT, 1, 18, 6
- spintable_entry LOWER_RIGHT, 1, 18, 11
- spintable_entry LOWER_RIGHT, 2, 19, 14
- spintable_entry LOWER_RIGHT, 3, 18, 17
- spintable_entry LOWER_RIGHT, 4, 14, 17
- spintable_entry LOWER_RIGHT, 5, 10, 17
- spintable_entry LOWER_LEFT, 5, 9, 17
- spintable_entry LOWER_LEFT, 4, 5, 17
- spintable_entry LOWER_LEFT, 3, 1, 17
- spintable_entry LOWER_LEFT, 2, 0, 14
- spintable_entry LOWER_LEFT, 1, 1, 11
- db -1
-; 8c4f5
-
-.load ; 8c4f5 (23:44f5)
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld h, [hl]
- ld l, a
-.loop
- push hl
- ld a, [de]
- ld c, a
- inc de
-.loop1
- ld [hl], $ff
- ld a, [wcf65]
- bit 0, a
- jr z, .leftside
- inc hl
- jr .okay1
-.leftside
- dec hl
-.okay1
- dec c
- jr nz, .loop1
- pop hl
- ld a, [wcf65]
- bit 1, a
- ld bc, SCREEN_WIDTH
- jr z, .upper
- ld bc, -SCREEN_WIDTH
-.upper
- add hl, bc
- ld a, [de]
- inc de
- cp -1
- ret z
- and a
- jr z, .loop
- ld c, a
-.loop2
- ld a, [wcf65]
- bit 0, a
- jr z, .leftside2
- dec hl
- jr .okay2
-.leftside2
- inc hl
-.okay2
- dec c
- jr nz, .loop2
- jr .loop
-; 8c538 (23:4538)
-
-.wedge1 db 2, 3, 5, 4, 9, -1
-.wedge2 db 1, 1, 2, 2, 4, 2, 4, 2, 3, -1
-.wedge3 db 2, 1, 3, 1, 4, 1, 4, 1, 4, 1, 3, 1, 2, 1, 1, 1, 1, -1
-.wedge4 db 4, 1, 4, 0, 3, 1, 3, 0, 2, 1, 2, 0, 1, -1
-.wedge5 db 4, 0, 3, 0, 3, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, -1
-; 8c578
-
-StartTrainerBattle_SetUpForRandomScatterOutro: ; 8c578 (23:4578)
- callba Function5602
- ld a, $5 ; BANK(LYOverrides)
- ld [rSVBK], a
- call StartTrainerBattle_NextScene
- ld a, $10
- ld [wcf64], a
- ld a, $1
- ld [hBGMapMode], a
- ret
-
-StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f)
- ld hl, wcf64
- ld a, [hl]
- and a
- jr z, .done
- dec [hl]
- ld c, $c
-.loop
- push bc
- call .BlackOutRandomTile
- pop bc
- dec c
- jr nz, .loop
- ret
-
-.done
- ld a, $1
- ld [hBGMapMode], a
- call DelayFrame
- call DelayFrame
- call DelayFrame
- xor a
- ld [hBGMapMode], a
- ld a, $20
- ld [wJumptableIndex], a
- ret
-
-.BlackOutRandomTile: ; 8c5b8 (23:45b8)
-.y_loop
- call Random
- cp SCREEN_HEIGHT
- jr nc, .y_loop
- ld b, a
-
-.x_loop
- call Random
- cp SCREEN_WIDTH
- jr nc, .x_loop
- ld c, a
-
- hlcoord 0, -1
- ld de, SCREEN_WIDTH
- inc b
-
-.row_loop
- add hl, de
- dec b
- jr nz, .row_loop
- add hl, bc
-
-; If the tile has already been blacked out,
-; sample a new tile
- ld a, [hl]
- cp $ff
- jr z, .y_loop
- ld [hl], $ff
- ret
-
-StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
- ld a, [OtherTrainerClass]
- and a
- jp z, .nextscene ; don't need to be here if wild
-
- xor a
- ld [hBGMapMode], a
- hlcoord 0, 0, AttrMap
- ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
- inc b
- inc c
- jr .enter_loop_midway
-
-.loop
-; set all pals to 7
- ld a, [hl]
- or %00000111
- ld [hli], a
-.enter_loop_midway
- dec c
- jr nz, .loop
- dec b
- jr nz, .loop
-
- call .loadpokeballgfx ; ld a, [OtherTrainerClass] \ ld de, PokeBallTransition \ ret
- hlcoord 2, 1
-
- ld b, SCREEN_WIDTH - 4
-.loop2
- push hl
- ld c, 2
-.loop3
- push hl
- ld a, [de]
- inc de
-.loop4
-; Loading is done bit by bit
- and a
- jr z, .done
- sla a
- jr nc, .no_load
- ld [hl], $fe
-.no_load
- inc hl
- jr .loop4
-
-.done
- pop hl
- push bc
- ld bc, (SCREEN_WIDTH - 4) / 2
- add hl, bc
- pop bc
- dec c
- jr nz, .loop3
-
- pop hl
- push bc
- ld bc, SCREEN_WIDTH
- add hl, bc
- pop bc
- dec b
- jr nz, .loop2
-
- ld a, [hCGB]
- and a
- jr nz, .cgb
- ld a, $1
- ld [hBGMapMode], a
- call DelayFrame
- call DelayFrame
- jr .nextscene
-
-.cgb
- ld hl, .daypals
- ld a, [TimeOfDayPal]
- and (1 << 2) - 1
- cp 3
- jr nz, .daytime
- ld hl, .nightpals
-.daytime
- ld a, [rSVBK]
- push af
- ld a, $5 ; WRAM5 = palettes
- ld [rSVBK], a
- call .copypals
- push hl
- ld de, UnknBGPals + 7 palettes
- ld bc, 1 palettes
- call CopyBytes
- pop hl
- ld de, BGPals + 7 palettes
- ld bc, 1 palettes
- call CopyBytes
- pop af
- ld [rSVBK], a
- ld a, $1
- ld [hCGBPalUpdate], a
- call DelayFrame
- call BattleStart_LoadEDTile
-
-.nextscene ; 8c673 (23:4673)
- call StartTrainerBattle_NextScene
- ret
-
-.copypals ; 8c677 (23:4677)
- ld de, UnknBGPals + 7 palettes
- call .copy
- ld de, BGPals + 7 palettes
- call .copy
- ld de, UnknOBPals + 6 palettes
- call .copy
- ld de, OBPals + 6 palettes
- call .copy
- ld de, UnknOBPals + 7 palettes
- call .copy
- ld de, OBPals + 7 palettes
-
-.copy ; 8c698 (23:4698)
- push hl
- ld bc, 1 palettes
- call CopyBytes
- pop hl
- ret
-; 8c6a1 (23:46a1)
-
-.daypals ; 8c6a1
- RGB 31, 18, 29
- RGB 31, 11, 15
- RGB 31, 05, 05
- RGB 07, 07, 07
-; 8c6a9
-
-.nightpals ; 8c6a9
- RGB 31, 18, 29
- RGB 31, 05, 05
- RGB 31, 05, 05
- RGB 31, 05, 05
-
-.loadpokeballgfx
- ld a, [OtherTrainerClass]
- ld de, PokeBallTransition
- ret
-
-PokeBallTransition:
- db %00000011, %11000000
- db %00001111, %11110000
- db %00111100, %00111100
- db %00110000, %00001100
- db %01100000, %00000110
- db %01100011, %11000110
- db %11000110, %01100011
- db %11111100, %00111111
- db %11111100, %00111111
- db %11000110, %01100011
- db %01100011, %11000110
- db %01100000, %00000110
- db %00110000, %00001100
- db %00111100, %00111100
- db %00001111, %11110000
- db %00000011, %11000000
-
-WipeLYOverrides: ; 8c6d8
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
-
- ld hl, LYOverrides
- call .wipe
- ld hl, LYOverridesBackup
- call .wipe
-
- pop af
- ld [rSVBK], a
- ret
-; 8c6ef
-
-.wipe ; 8c6ef
- xor a
- ld c, SCREEN_HEIGHT_PX
-.loop
- ld [hli], a
- dec c
- jr nz, .loop
- ret
-; 8c6f7
-
-
-StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7)
- and (1 << 6) - 1
- cp 1 << 5
- jr nc, .okay
- call .DoSineWave
- ld a, h
- ret
-
-.okay
- and (1 << 5) - 1
- call .DoSineWave
- ld a, h
- xor -1 ; cpl
- inc a
- ret
-
-.DoSineWave: ; 8c70c (23:470c)
- ld e, a
- ld a, d
- ld d, 0
- ld hl, .sinewave
- add hl, de
- add hl, de
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld hl, 0
-.loop
- srl a
- jr nc, .skip
- add hl, de
-.skip
- sla e
- rl d
- and a
- jr nz, .loop
- ret
-; 8c728 (23:4728)
-
-.sinewave ; 8c728
- sine_wave $100
-; 8c768
-
-zoombox: macro
-; width, height, start y, start x
- db \1, \2
- dwcoord \3, \4
-endm
-
-StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768)
- callba Function5602
- ld de, .boxes
-
-.loop
- ld a, [de]
- cp -1
- jr z, .done
- inc de
- ld c, a
- ld a, [de]
- inc de
- ld b, a
- ld a, [de]
- inc de
- ld l, a
- ld a, [de]
- inc de
- ld h, a
- xor a
- ld [hBGMapMode], a
- call .Copy
- call WaitBGMap
- jr .loop
-
-.done
- ld a, $20
- ld [wJumptableIndex], a
- ret
-; 8c792 (23:4792)
-
-.boxes ; 8c792
- zoombox 4, 2, 8, 8
- zoombox 6, 4, 7, 7
- zoombox 8, 6, 6, 6
- zoombox 10, 8, 5, 5
- zoombox 12, 10, 4, 4
- zoombox 14, 12, 3, 3
- zoombox 16, 14, 2, 2
- zoombox 18, 16, 1, 1
- zoombox 20, 18, 0, 0
- db -1
-; 8c7b7
-
-.Copy: ; 8c7b7 (23:47b7)
- ld a, $ff
-.row
- push bc
- push hl
-.col
- ld [hli], a
- dec c
- jr nz, .col
- pop hl
- ld bc, SCREEN_WIDTH
- add hl, bc
- pop bc
- dec b
- jr nz, .row
- ret
-; 8c7c9 (23:47c9)
diff --git a/engine/battle_tower.asm b/engine/battle_tower.asm
new file mode 100644
index 000000000..b880a099b
--- /dev/null
+++ b/engine/battle_tower.asm
@@ -0,0 +1,210 @@
+Function_LoadOpponentTrainerAndPokemons: ; 1f8000
+ ld a, [rSVBK]
+ push af
+ ld a, BANK(BT_OTTrainer)
+ ld [rSVBK], a
+
+ ; Fill BT_OTTrainer with zeros
+ xor a
+ ld hl, BT_OTTrainer
+ ld bc, BT_OTTrainerEnd - BT_OTTrainer
+ call ByteFill
+
+ ; Write $ff into the Item-Slots
+ ld a, $ff
+ ld [BT_OTPkmn1Item], a
+ ld [BT_OTPkmn2Item], a
+ ld [BT_OTPkmn3Item], a
+
+ ; Set BT_OTTrainer as start address to write the following data to
+ ld de, BT_OTTrainer
+
+ ld a, [hRandomAdd]
+ ld b, a
+.resample ; loop to find a random trainer
+ call Random
+ ld a, [hRandomAdd]
+ add b
+ ld b, a ; b contains the nr of the trainer
+IF DEF(CRYSTAL11)
+ and (1 << 7) - 1
+ cp 70
+ELSE
+ and (1 << 5) - 1
+ cp 21
+ENDC
+ jr nc, .resample
+ ld b, a
+
+ ld a, BANK(sBTTrainers)
+ call GetSRAMBank
+
+ ld c, BATTLETOWER_NROFTRAINERS
+ ld hl, sBTTrainers
+.next_trainer
+ ld a, [hli]
+ cp b
+ jr z, .resample
+ dec c
+ jr nz, .next_trainer ; c <= 7 initialise all 7 trainers?
+
+ ld hl, sBTTrainers
+ ld a, [sNrOfBeatenBattleTowerTrainers]
+ ld c, a
+ ld a, b
+ ld b, 0
+ add hl, bc
+ ld [hl], a
+
+ call CloseSRAM
+
+ push af
+; Copy name (10 bytes) and class (1 byte) of trainer
+ ld hl, BattleTowerTrainers
+ ld bc, NAME_LENGTH
+ call AddNTimes
+ ld bc, NAME_LENGTH
+ call CopyBytes
+
+ call Function_LoadRandomBattleTowerPkmn
+ pop af
+
+ ld hl, BattleTowerTrainerData
+ ld bc, BATTLETOWER_TRAINERDATALENGTH
+ call AddNTimes
+ ld bc, BATTLETOWER_TRAINERDATALENGTH
+.copy_bt_trainer_data_loop
+ ld a, BANK(BattleTowerTrainerData)
+ call GetFarByte
+ ld [de], a
+ inc hl
+ inc de
+ dec bc
+ ld a, b
+ or c
+ jr nz, .copy_bt_trainer_data_loop
+
+ pop af
+ ld [rSVBK], a
+
+ ret
+
+
+Function_LoadRandomBattleTowerPkmn: ; 1f8081
+ ld c, BATTLETOWER_NROFPKMNS
+.loop
+ push bc
+ ld a, BANK(sBTPkmnPrevTrainer1)
+ call GetSRAMBank
+
+.FindARandomBattleTowerPkmn:
+ ; From Which LevelGroup are the Pkmn loaded
+ ; a = 1..10
+ ld a, [wBTChoiceOfLvlGroup] ; [$d800]
+ dec a
+ ld hl, BattleTowerMons
+ ld bc, BattleTowerMons2 - BattleTowerMons1
+ call AddNTimes
+
+ ld a, [hRandomAdd]
+ ld b, a
+.resample
+ call Random
+ ld a, [hRandomAdd]
+ add b
+ ld b, a
+ and $1f
+ cp BATTLETOWER_NRMONSPERLEVELBRACKET
+ jr nc, .resample
+ ; in register 'a' is the chosen Pkmn of the LevelGroup
+
+ ; Check if Pkmn was already loaded before
+ ; Check current and the 2 previous teams
+ ; includes check if item is double at the current team
+ ld bc, PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH
+ call AddNTimes
+ ld a, [hli]
+ ld b, a
+ ld a, [hld]
+ ld c, a
+ ld a, [BT_OTPkmn1]
+ cp b
+ jr z, .FindARandomBattleTowerPkmn
+ ld a, [BT_OTPkmn1Item]
+ cp c
+ jr z, .FindARandomBattleTowerPkmn
+ ld a, [BT_OTPkmn2]
+ cp b
+ jr z, .FindARandomBattleTowerPkmn
+ ld a, [BT_OTPkmn2Item]
+ cp c
+ jr z, .FindARandomBattleTowerPkmn
+ ld a, [BT_OTPkmn3]
+ cp b
+ jr z, .FindARandomBattleTowerPkmn
+ ld a, [BT_OTPkmn3Item]
+ cp c
+ jr z, .FindARandomBattleTowerPkmn
+ ld a, [sBTPkmnPrevTrainer1]
+ cp b
+ jr z, .FindARandomBattleTowerPkmn
+ ld a, [sBTPkmnPrevTrainer2]
+ cp b
+ jr z, .FindARandomBattleTowerPkmn
+ ld a, [sBTPkmnPrevTrainer3]
+ cp b
+ jr z, .FindARandomBattleTowerPkmn
+ ld a, [sBTPkmnPrevPrevTrainer1]
+ cp b
+ jr z, .FindARandomBattleTowerPkmn
+ ld a, [sBTPkmnPrevPrevTrainer2]
+ cp b
+ jr z, .FindARandomBattleTowerPkmn
+ ld a, [sBTPkmnPrevPrevTrainer3]
+ cp b
+ jr z, .FindARandomBattleTowerPkmn
+
+ ld bc, PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH
+ call CopyBytes
+
+ ld a, [wNamedObjectIndexBuffer]
+ push af
+ push de
+ ld hl, - (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH)
+ add hl, de
+ ld a, [hl]
+ ld [wNamedObjectIndexBuffer], a
+ ld bc, PARTYMON_STRUCT_LENGTH
+ add hl, bc
+ push hl
+ call GetPokemonName
+ ld h, d
+ ld l, e
+ pop de
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+
+ pop de
+ pop af
+ ld [wNamedObjectIndexBuffer], a
+ pop bc
+ dec c
+ jp nz, .loop
+
+ ld a, [sBTPkmnPrevTrainer1]
+ ld [sBTPkmnPrevPrevTrainer1], a
+ ld a, [sBTPkmnPrevTrainer2]
+ ld [sBTPkmnPrevPrevTrainer2], a
+ ld a, [sBTPkmnPrevTrainer3]
+ ld [sBTPkmnPrevPrevTrainer3], a
+ ld a, [BT_OTPkmn1]
+ ld [sBTPkmnPrevTrainer1], a
+ ld a, [BT_OTPkmn2]
+ ld [sBTPkmnPrevTrainer2], a
+ ld a, [BT_OTPkmn3]
+ ld [sBTPkmnPrevTrainer3], a
+ call CloseSRAM
+ ret
+; 1f814e
+
+INCLUDE "data/battle_tower.asm"
diff --git a/engine/battle_transition.asm b/engine/battle_transition.asm
new file mode 100644
index 000000000..bef74ad29
--- /dev/null
+++ b/engine/battle_transition.asm
@@ -0,0 +1,873 @@
+Predef_StartBattle: ; 8c20f
+ call .InitGFX
+ ld a, [rBGP]
+ ld [wBGP], a
+ ld a, [rOBP0]
+ ld [wOBP0], a
+ ld a, [rOBP1]
+ ld [wOBP1], a
+ call DelayFrame
+ ld hl, hVBlank
+ ld a, [hl]
+ push af
+ ld [hl], $1
+
+.loop
+ ld a, [wJumptableIndex]
+ bit 7, a
+ jr nz, .done
+ call FlashyTransitionToBattle
+ call DelayFrame
+ jr .loop
+
+.done
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+
+ ld hl, UnknBGPals
+ ld bc, 8 palettes
+ xor a
+ call ByteFill
+
+ pop af
+ ld [rSVBK], a
+
+ ld a, %11111111
+ ld [wBGP], a
+ call DmgToCgbBGPals
+ call DelayFrame
+ xor a
+ ld [hLCDCPointer], a
+ ld [hLYOverrideStart], a
+ ld [hLYOverrideEnd], a
+ ld [hSCY], a
+
+ ld a, $1
+ ld [rSVBK], a
+ pop af
+ ld [hVBlank], a
+ call DelayFrame
+ ret
+; 8c26d
+
+.InitGFX: ; 8c26d
+ ld a, [wLinkMode]
+ cp LINK_MOBILE
+ jr z, .mobile
+ farcall ReanchorBGMap_NoOAMUpdate
+ call UpdateSprites
+ call DelayFrame
+ call .NonMobile_LoadPokeballTiles
+ call BattleStart_CopyTilemapAtOnce
+ jr .resume
+
+.mobile
+ call LoadTrainerBattlePokeballTiles
+
+.resume
+ ld a, SCREEN_HEIGHT_PX
+ ld [hWY], a
+ call DelayFrame
+ xor a
+ ld [hBGMapMode], a
+ ld hl, wJumptableIndex
+ xor a
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+ call WipeLYOverrides
+ ret
+; 8c2a0
+
+.NonMobile_LoadPokeballTiles: ; 8c2a0
+ call LoadTrainerBattlePokeballTiles
+ hlbgcoord 0, 0
+ call ConvertTrainerBattlePokeballTilesTo2bpp
+ ret
+; 8c2aa
+
+LoadTrainerBattlePokeballTiles:
+; Load the tiles used in the Pokeball Graphic that fills the screen
+; at the start of every Trainer battle.
+ ld de, TrainerBattlePokeballTiles
+ ld hl, VTiles1 tile $7e
+ ld b, BANK(TrainerBattlePokeballTiles)
+ ld c, 2
+ call Request2bpp
+
+ ld a, [rVBK]
+ push af
+ ld a, $1
+ ld [rVBK], a
+
+ ld de, TrainerBattlePokeballTiles
+ ld hl, VTiles4 tile $7e
+ ld b, BANK(TrainerBattlePokeballTiles)
+ ld c, 2
+ call Request2bpp
+
+ pop af
+ ld [rVBK], a
+ ret
+; 8c2cf
+
+ConvertTrainerBattlePokeballTilesTo2bpp: ; 8c2cf
+ ld a, [rSVBK]
+ push af
+ ld a, $6
+ ld [rSVBK], a
+ push hl
+ ld hl, wDecompressScratch
+ ld bc, $28 tiles
+
+.loop
+ ld [hl], -1
+ inc hl
+ dec bc
+ ld a, c
+ or b
+ jr nz, .loop
+
+ pop hl
+ ld de, wDecompressScratch
+ ld b, BANK(ConvertTrainerBattlePokeballTilesTo2bpp) ; BANK(@)
+ ld c, $28
+ call Request2bpp
+ pop af
+ ld [rSVBK], a
+ ret
+; 8c2f4
+
+TrainerBattlePokeballTiles: ; 8c2f4
+INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp"
+
+
+FlashyTransitionToBattle: ; 8c314
+ jumptable .dw, wJumptableIndex
+; 8c323
+
+.dw ; 8c323 (23:4323)
+ dw StartTrainerBattle_DetermineWhichAnimation ; 00
+
+ ; Animation 1: cave
+ dw StartTrainerBattle_LoadPokeBallGraphics ; 01
+ dw StartTrainerBattle_SetUpBGMap ; 02
+ dw StartTrainerBattle_Flash ; 03
+ dw StartTrainerBattle_Flash ; 04
+ dw StartTrainerBattle_Flash ; 05
+ dw StartTrainerBattle_NextScene ; 06
+ dw StartTrainerBattle_SetUpForWavyOutro ; 07
+ dw StartTrainerBattle_SineWave ; 08
+
+ ; Animation 2: cave, stronger
+ dw StartTrainerBattle_LoadPokeBallGraphics ; 09
+ dw StartTrainerBattle_SetUpBGMap ; 0a
+ dw StartTrainerBattle_Flash ; 0b
+ dw StartTrainerBattle_Flash ; 0c
+ dw StartTrainerBattle_Flash ; 0d
+ dw StartTrainerBattle_NextScene ; 0e
+ ; There is no setup for this one
+ dw StartTrainerBattle_ZoomToBlack ; 0f
+
+ ; Animation 3: no cave
+ dw StartTrainerBattle_LoadPokeBallGraphics ; 10
+ dw StartTrainerBattle_SetUpBGMap ; 11
+ dw StartTrainerBattle_Flash ; 12
+ dw StartTrainerBattle_Flash ; 13
+ dw StartTrainerBattle_Flash ; 14
+ dw StartTrainerBattle_NextScene ; 15
+ dw StartTrainerBattle_SetUpForSpinOutro ; 16
+ dw StartTrainerBattle_SpinToBlack ; 17
+
+ ; Animation 4: no cave, stronger
+ dw StartTrainerBattle_LoadPokeBallGraphics ; 18
+ dw StartTrainerBattle_SetUpBGMap ; 19
+ dw StartTrainerBattle_Flash ; 1a
+ dw StartTrainerBattle_Flash ; 1b
+ dw StartTrainerBattle_Flash ; 1c
+ dw StartTrainerBattle_NextScene ; 1d
+ dw StartTrainerBattle_SetUpForRandomScatterOutro ; 1e
+ dw StartTrainerBattle_SpeckleToBlack ; 1f
+
+ ; All animations jump to here.
+ dw StartTrainerBattle_Finish ; 20
+
+
+StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365)
+; The screen flashes a different number of times depending on the level of
+; your lead Pokemon relative to the opponent's.
+; BUG: BattleMonLevel and EnemyMonLevel are not set at this point, so whatever
+; values happen to be there will determine the animation.
+ ld de, 0
+ ld a, [BattleMonLevel]
+ add 3
+ ld hl, EnemyMonLevel
+ cp [hl]
+ jr nc, .okay
+ set 0, e
+.okay
+ ld a, [wEnvironment]
+ cp CAVE
+ jr z, .okay2
+ cp ENVIRONMENT_5
+ jr z, .okay2
+ cp DUNGEON
+ jr z, .okay2
+ set 1, e
+.okay2
+ ld hl, .StartingPoints
+ add hl, de
+ ld a, [hl]
+ ld [wJumptableIndex], a
+ ret
+; 8c38f (23:438f)
+
+.StartingPoints: ; 8c38f
+ db 1, 9
+ db 16, 24
+; 8c393
+
+StartTrainerBattle_Finish: ; 8c393 (23:4393)
+ call ClearSprites
+ ld a, $80
+ ld [wJumptableIndex], a
+ ret
+
+StartTrainerBattle_NextScene: ; 8c39c (23:439c)
+ ld hl, wJumptableIndex
+ inc [hl]
+ ret
+
+StartTrainerBattle_SetUpBGMap: ; 8c3a1 (23:43a1)
+ call StartTrainerBattle_NextScene
+ xor a
+ ld [wcf64], a
+ ld [hBGMapMode], a
+ ret
+
+StartTrainerBattle_Flash: ; 8c3ab (23:43ab)
+ call .DoFlashAnimation
+ ret nc
+ call StartTrainerBattle_NextScene
+ ret
+
+.DoFlashAnimation: ; 8c3b3 (23:43b3)
+ ld a, [wTimeOfDayPalset]
+ cp %11111111 ; dark cave
+ jr z, .done
+ ld hl, wcf64
+ ld a, [hl]
+ inc [hl]
+ srl a
+ ld e, a
+ ld d, 0
+ ld hl, .pals
+ add hl, de
+ ld a, [hl]
+ cp %00000001
+ jr z, .done
+ ld [wBGP], a
+ call DmgToCgbBGPals
+ and a
+ ret
+
+.done
+ xor a
+ ld [wcf64], a
+ scf
+ ret
+; 8c3db (23:43db)
+
+.pals ; 8c3db
+ db %11111001 ; 3321
+ db %11111110 ; 3332
+ db %11111111 ; 3333
+ db %11111110 ; 3332
+ db %11111001 ; 3321
+ db %11100100 ; 3210
+ db %10010000 ; 2100
+ db %01000000 ; 1000
+ db %00000000 ; 0000
+ db %01000000 ; 1000
+ db %10010000 ; 2100
+ db %11100100 ; 3210
+ db %00000001 ; 0001
+; 8c3e8
+
+StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8)
+ farcall Function5602
+ ld a, $5 ; BANK(LYOverrides)
+ ld [rSVBK], a
+
+ call StartTrainerBattle_NextScene
+
+ ld a, rSCX - $ff00
+ ld [hLCDCPointer], a
+ xor a
+ ld [hLYOverrideStart], a
+ ld a, $90
+ ld [hLYOverrideEnd], a
+ xor a
+ ld [wcf64], a
+ ld [wcf65], a
+ ret
+
+StartTrainerBattle_SineWave: ; 8c408 (23:4408)
+ ld a, [wcf64]
+ cp $60
+ jr nc, .end
+ call .DoSineWave
+ ret
+
+.end
+ ld a, $20
+ ld [wJumptableIndex], a
+ ret
+
+.DoSineWave: ; 8c419 (23:4419)
+ ld hl, wcf65
+ ld a, [hl]
+ inc [hl]
+ ld hl, wcf64
+ ld d, [hl]
+ add [hl]
+ ld [hl], a
+ ld a, LYOverridesEnd - LYOverrides
+ ld bc, LYOverrides
+ ld e, $0
+
+.loop
+ push af
+ push de
+ ld a, e
+ call StartTrainerBattle_DrawSineWave
+ ld [bc], a
+ inc bc
+ pop de
+ ld a, e
+ add $2
+ ld e, a
+ pop af
+ dec a
+ jr nz, .loop
+ ret
+
+StartTrainerBattle_SetUpForSpinOutro: ; 8c43d (23:443d)
+ farcall Function5602
+ ld a, $5 ; BANK(LYOverrides)
+ ld [rSVBK], a
+ call StartTrainerBattle_NextScene
+ xor a
+ ld [wcf64], a
+ ret
+
+StartTrainerBattle_SpinToBlack: ; 8c44f (23:444f)
+ xor a
+ ld [hBGMapMode], a
+ ld a, [wcf64]
+ ld e, a
+ ld d, 0
+ ld hl, .spintable
+rept 5
+ add hl, de
+endr
+ ld a, [hli]
+ cp -1
+ jr z, .end
+ ld [wcf65], a
+ call .load
+ ld a, $1
+ ld [hBGMapMode], a
+ call DelayFrame
+ call DelayFrame
+ ld hl, wcf64
+ inc [hl]
+ ret
+
+.end
+ ld a, $1
+ ld [hBGMapMode], a
+ call DelayFrame
+ call DelayFrame
+ call DelayFrame
+ xor a
+ ld [hBGMapMode], a
+ ld a, $20
+ ld [wJumptableIndex], a
+ ret
+; 8c490 (23:4490)
+
+; quadrants
+ const_def
+ const UPPER_LEFT
+ const UPPER_RIGHT
+ const LOWER_LEFT
+ const LOWER_RIGHT
+
+.spintable ; 8c490
+spintable_entry: MACRO
+ db \1
+ dw .wedge\2
+ dwcoord \3, \4
+ENDM
+ spintable_entry UPPER_LEFT, 1, 1, 6
+ spintable_entry UPPER_LEFT, 2, 0, 3
+ spintable_entry UPPER_LEFT, 3, 1, 0
+ spintable_entry UPPER_LEFT, 4, 5, 0
+ spintable_entry UPPER_LEFT, 5, 9, 0
+ spintable_entry UPPER_RIGHT, 5, 10, 0
+ spintable_entry UPPER_RIGHT, 4, 14, 0
+ spintable_entry UPPER_RIGHT, 3, 18, 0
+ spintable_entry UPPER_RIGHT, 2, 19, 3
+ spintable_entry UPPER_RIGHT, 1, 18, 6
+ spintable_entry LOWER_RIGHT, 1, 18, 11
+ spintable_entry LOWER_RIGHT, 2, 19, 14
+ spintable_entry LOWER_RIGHT, 3, 18, 17
+ spintable_entry LOWER_RIGHT, 4, 14, 17
+ spintable_entry LOWER_RIGHT, 5, 10, 17
+ spintable_entry LOWER_LEFT, 5, 9, 17
+ spintable_entry LOWER_LEFT, 4, 5, 17
+ spintable_entry LOWER_LEFT, 3, 1, 17
+ spintable_entry LOWER_LEFT, 2, 0, 14
+ spintable_entry LOWER_LEFT, 1, 1, 11
+ db -1
+; 8c4f5
+
+.load ; 8c4f5 (23:44f5)
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+.loop
+ push hl
+ ld a, [de]
+ ld c, a
+ inc de
+.loop1
+ ld [hl], $ff
+ ld a, [wcf65]
+ bit 0, a
+ jr z, .leftside
+ inc hl
+ jr .okay1
+.leftside
+ dec hl
+.okay1
+ dec c
+ jr nz, .loop1
+ pop hl
+ ld a, [wcf65]
+ bit 1, a
+ ld bc, SCREEN_WIDTH
+ jr z, .upper
+ ld bc, -SCREEN_WIDTH
+.upper
+ add hl, bc
+ ld a, [de]
+ inc de
+ cp -1
+ ret z
+ and a
+ jr z, .loop
+ ld c, a
+.loop2
+ ld a, [wcf65]
+ bit 0, a
+ jr z, .leftside2
+ dec hl
+ jr .okay2
+.leftside2
+ inc hl
+.okay2
+ dec c
+ jr nz, .loop2
+ jr .loop
+; 8c538 (23:4538)
+
+.wedge1 db 2, 3, 5, 4, 9, -1
+.wedge2 db 1, 1, 2, 2, 4, 2, 4, 2, 3, -1
+.wedge3 db 2, 1, 3, 1, 4, 1, 4, 1, 4, 1, 3, 1, 2, 1, 1, 1, 1, -1
+.wedge4 db 4, 1, 4, 0, 3, 1, 3, 0, 2, 1, 2, 0, 1, -1
+.wedge5 db 4, 0, 3, 0, 3, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, -1
+; 8c578
+
+StartTrainerBattle_SetUpForRandomScatterOutro: ; 8c578 (23:4578)
+ farcall Function5602
+ ld a, $5 ; BANK(LYOverrides)
+ ld [rSVBK], a
+ call StartTrainerBattle_NextScene
+ ld a, $10
+ ld [wcf64], a
+ ld a, $1
+ ld [hBGMapMode], a
+ ret
+
+StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f)
+ ld hl, wcf64
+ ld a, [hl]
+ and a
+ jr z, .done
+ dec [hl]
+ ld c, $c
+.loop
+ push bc
+ call .BlackOutRandomTile
+ pop bc
+ dec c
+ jr nz, .loop
+ ret
+
+.done
+ ld a, $1
+ ld [hBGMapMode], a
+ call DelayFrame
+ call DelayFrame
+ call DelayFrame
+ xor a
+ ld [hBGMapMode], a
+ ld a, $20
+ ld [wJumptableIndex], a
+ ret
+
+.BlackOutRandomTile: ; 8c5b8 (23:45b8)
+.y_loop
+ call Random
+ cp SCREEN_HEIGHT
+ jr nc, .y_loop
+ ld b, a
+
+.x_loop
+ call Random
+ cp SCREEN_WIDTH
+ jr nc, .x_loop
+ ld c, a
+
+ hlcoord 0, -1
+ ld de, SCREEN_WIDTH
+ inc b
+
+.row_loop
+ add hl, de
+ dec b
+ jr nz, .row_loop
+ add hl, bc
+
+; If the tile has already been blacked out,
+; sample a new tile
+ ld a, [hl]
+ cp $ff
+ jr z, .y_loop
+ ld [hl], $ff
+ ret
+
+StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
+ ld a, [OtherTrainerClass]
+ and a
+ jp z, .nextscene ; don't need to be here if wild
+
+ xor a
+ ld [hBGMapMode], a
+ hlcoord 0, 0, AttrMap
+ ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
+ inc b
+ inc c
+ jr .enter_loop_midway
+
+.loop
+; set all pals to 7
+ ld a, [hl]
+ or %00000111
+ ld [hli], a
+.enter_loop_midway
+ dec c
+ jr nz, .loop
+ dec b
+ jr nz, .loop
+
+ call .loadpokeballgfx ; ld a, [OtherTrainerClass] \ ld de, PokeBallTransition \ ret
+ hlcoord 2, 1
+
+ ld b, SCREEN_WIDTH - 4
+.loop2
+ push hl
+ ld c, 2
+.loop3
+ push hl
+ ld a, [de]
+ inc de
+.loop4
+; Loading is done bit by bit
+ and a
+ jr z, .done
+ sla a
+ jr nc, .no_load
+ ld [hl], $fe
+.no_load
+ inc hl
+ jr .loop4
+
+.done
+ pop hl
+ push bc
+ ld bc, (SCREEN_WIDTH - 4) / 2
+ add hl, bc
+ pop bc
+ dec c
+ jr nz, .loop3
+
+ pop hl
+ push bc
+ ld bc, SCREEN_WIDTH
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .loop2
+
+ ld a, [hCGB]
+ and a
+ jr nz, .cgb
+ ld a, $1
+ ld [hBGMapMode], a
+ call DelayFrame
+ call DelayFrame
+ jr .nextscene
+
+.cgb
+ ld hl, .daypals
+ ld a, [TimeOfDayPal]
+ and (1 << 2) - 1
+ cp 3
+ jr nz, .daytime
+ ld hl, .nightpals
+.daytime
+ ld a, [rSVBK]
+ push af
+ ld a, $5 ; WRAM5 = palettes
+ ld [rSVBK], a
+ call .copypals
+ push hl
+ ld de, UnknBGPals palette PAL_BG_TEXT
+ ld bc, 1 palettes
+ call CopyBytes
+ pop hl
+ ld de, BGPals palette PAL_BG_TEXT
+ ld bc, 1 palettes
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ call DelayFrame
+ call BattleStart_CopyTilemapAtOnce
+
+.nextscene ; 8c673 (23:4673)
+ call StartTrainerBattle_NextScene
+ ret
+
+.copypals ; 8c677 (23:4677)
+ ld de, UnknBGPals palette PAL_BG_TEXT
+ call .copy
+ ld de, BGPals palette PAL_BG_TEXT
+ call .copy
+ ld de, UnknOBPals palette PAL_OW_TREE
+ call .copy
+ ld de, OBPals palette PAL_OW_TREE
+ call .copy
+ ld de, UnknOBPals palette PAL_OW_ROCK
+ call .copy
+ ld de, OBPals palette PAL_OW_ROCK
+
+.copy ; 8c698 (23:4698)
+ push hl
+ ld bc, 1 palettes
+ call CopyBytes
+ pop hl
+ ret
+; 8c6a1 (23:46a1)
+
+.daypals ; 8c6a1
+ RGB 31, 18, 29
+ RGB 31, 11, 15
+ RGB 31, 05, 05
+ RGB 07, 07, 07
+; 8c6a9
+
+.nightpals ; 8c6a9
+ RGB 31, 18, 29
+ RGB 31, 05, 05
+ RGB 31, 05, 05
+ RGB 31, 05, 05
+
+.loadpokeballgfx
+ ld a, [OtherTrainerClass]
+ ld de, PokeBallTransition
+ ret
+
+PokeBallTransition:
+ db %00000011, %11000000
+ db %00001111, %11110000
+ db %00111100, %00111100
+ db %00110000, %00001100
+ db %01100000, %00000110
+ db %01100011, %11000110
+ db %11000110, %01100011
+ db %11111100, %00111111
+ db %11111100, %00111111
+ db %11000110, %01100011
+ db %01100011, %11000110
+ db %01100000, %00000110
+ db %00110000, %00001100
+ db %00111100, %00111100
+ db %00001111, %11110000
+ db %00000011, %11000000
+
+WipeLYOverrides: ; 8c6d8
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+
+ ld hl, LYOverrides
+ call .wipe
+ ld hl, LYOverridesBackup
+ call .wipe
+
+ pop af
+ ld [rSVBK], a
+ ret
+; 8c6ef
+
+.wipe ; 8c6ef
+ xor a
+ ld c, SCREEN_HEIGHT_PX
+.loop
+ ld [hli], a
+ dec c
+ jr nz, .loop
+ ret
+; 8c6f7
+
+
+StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7)
+ and (1 << 6) - 1
+ cp 1 << 5
+ jr nc, .okay
+ call .DoSineWave
+ ld a, h
+ ret
+
+.okay
+ and (1 << 5) - 1
+ call .DoSineWave
+ ld a, h
+ xor -1 ; cpl
+ inc a
+ ret
+
+.DoSineWave: ; 8c70c (23:470c)
+ ld e, a
+ ld a, d
+ ld d, 0
+ ld hl, .sinewave
+ add hl, de
+ add hl, de
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, 0
+.loop
+ srl a
+ jr nc, .skip
+ add hl, de
+.skip
+ sla e
+ rl d
+ and a
+ jr nz, .loop
+ ret
+; 8c728 (23:4728)
+
+.sinewave ; 8c728
+ sine_wave $100
+; 8c768
+
+StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768)
+ farcall Function5602
+ ld de, .boxes
+
+.loop
+ ld a, [de]
+ cp -1
+ jr z, .done
+ inc de
+ ld c, a
+ ld a, [de]
+ inc de
+ ld b, a
+ ld a, [de]
+ inc de
+ ld l, a
+ ld a, [de]
+ inc de
+ ld h, a
+ xor a
+ ld [hBGMapMode], a
+ call .Copy
+ call WaitBGMap
+ jr .loop
+
+.done
+ ld a, $20
+ ld [wJumptableIndex], a
+ ret
+; 8c792 (23:4792)
+
+.boxes ; 8c792
+zoombox: macro
+; width, height, start y, start x
+ db \1, \2
+ dwcoord \3, \4
+endm
+ zoombox 4, 2, 8, 8
+ zoombox 6, 4, 7, 7
+ zoombox 8, 6, 6, 6
+ zoombox 10, 8, 5, 5
+ zoombox 12, 10, 4, 4
+ zoombox 14, 12, 3, 3
+ zoombox 16, 14, 2, 2
+ zoombox 18, 16, 1, 1
+ zoombox 20, 18, 0, 0
+ db -1
+; 8c7b7
+
+.Copy: ; 8c7b7 (23:47b7)
+ ld a, $ff
+.row
+ push bc
+ push hl
+.col
+ ld [hli], a
+ dec c
+ jr nz, .col
+ pop hl
+ ld bc, SCREEN_WIDTH
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .row
+ ret
+; 8c7c9 (23:47c9)
+
+Function8c7c9:
+; XXX
+ ld a, $1
+ ld [hBGMapMode], a
+ call WaitBGMap
+ xor a
+ ld [hBGMapMode], a
+ ret
diff --git a/engine/billspc.asm b/engine/billspc.asm
index 4d8bf1c48..2dd9a512f 100755
--- a/engine/billspc.asm
+++ b/engine/billspc.asm
@@ -208,7 +208,7 @@ BillsPCDepositFuncRelease: ; e24e0 (38:64e0)
ld [CurPartyMon], a
xor a
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
call ReleasePKMN_ByePKMN
ld a, $0
ld [wJumptableIndex], a
@@ -472,7 +472,7 @@ BillsPC_Withdraw: ; e2675 (38:6675)
ld [CurPartyMon], a
ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
call ReleasePKMN_ByePKMN
ld a, $0
ld [wJumptableIndex], a
@@ -1108,7 +1108,7 @@ PCMonInfo: ; e2ac6 (38:6ac6)
predef GetUnownLetter
call GetBaseData
ld de, VTiles2 tile $00
- predef GetFrontpic
+ predef GetMonFrontpic
xor a
ld [wBillsPC_MonHasMail], a
ld a, [CurPartySpecies]
@@ -1125,7 +1125,7 @@ PCMonInfo: ; e2ac6 (38:6ac6)
ld a, $3
ld [MonType], a
- callba GetGender
+ farcall GetGender
jr c, .skip_gender
ld a, "♂"
jr nz, .printgender
@@ -1140,7 +1140,7 @@ PCMonInfo: ; e2ac6 (38:6ac6)
ret z
ld d, a
- callab ItemIsMail
+ callfar ItemIsMail
jr c, .mail
ld a, $5d ; item icon
jr .printitem
@@ -1656,7 +1656,7 @@ BillsPC_CheckMail_PreventBlackout: ; e2f18 (38:6f18)
ld hl, wBillsPC_ScrollPosition
add [hl]
ld [CurPartyMon], a
- callba CheckCurPartyMonFainted
+ farcall CheckCurPartyMonFainted
jr c, .AllOthersFainted
ld a, [wBillsPC_MonHasMail]
and a
@@ -1773,7 +1773,7 @@ BillsPC_CopyMon: ; e2fd6 (38:6fd6)
ld bc, PARTYMON_STRUCT_LENGTH
call CopyBytes
call CloseSRAM
- callba CalcwBufferMonStats
+ farcall CalcwBufferMonStats
ret
.party
@@ -1783,7 +1783,7 @@ BillsPC_CopyMon: ; e2fd6 (38:6fd6)
call CopyNicknameToTemp
ld hl, PartyMonOT
call CopyOTNameToTemp
- ld hl, PartyMons ; wdcdf (aliases: PartyMon1, PartyMon1Species)
+ ld hl, PartyMon1
ld bc, PARTYMON_STRUCT_LENGTH
ld a, [CurPartyMon]
call AddNTimes
@@ -1816,7 +1816,7 @@ BillsPC_CopyMon: ; e2fd6 (38:6fd6)
ld bc, BOXMON_STRUCT_LENGTH
call CopyMonToTemp
call CloseSRAM
- callba CalcwBufferMonStats
+ farcall CalcwBufferMonStats
ret
DepositPokemon: ; e307c (38:707c)
@@ -1833,7 +1833,7 @@ DepositPokemon: ; e307c (38:707c)
jr c, .asm_boxisfull
xor a
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
ld a, [CurPartySpecies]
call PlayCry
hlcoord 0, 0
@@ -1888,7 +1888,7 @@ TryWithdrawPokemon: ; e30fa (38:70fa)
jr c, .PartyFull
ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
ld a, [CurPartySpecies]
call PlayCry
hlcoord 0, 0
@@ -2020,7 +2020,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
.dw_return ; e322a
pop af
ld e, a
- callba MovePkmnWOMail_InsertMon_SaveGame
+ farcall MovePkmnWOMail_InsertMon_SaveGame
ret
; e3233
@@ -2056,7 +2056,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
call .CopyFromParty
ld a, $1
ld [wGameLogicPaused], a
- callba SaveGameData
+ farcall SaveGameData
xor a
ld [wGameLogicPaused], a
call .CopyToBox
@@ -2106,7 +2106,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
ld a, [wBillsPC_BackupLoadedBox]
dec a
ld e, a
- callba MovePkmnWOMail_SaveGame
+ farcall MovePkmnWOMail_SaveGame
ld a, [wBillsPC_BackupCursorPosition]
ld hl, wBillsPC_BackupScrollPosition
add [hl]
@@ -2123,10 +2123,10 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
ld bc, BOXMON_STRUCT_LENGTH
call CopyMonToTemp
call CloseSRAM
- callba CalcwBufferMonStats
+ farcall CalcwBufferMonStats
ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
ret
; e32fa
@@ -2134,12 +2134,12 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
ld a, [wBillsPC_LoadedBox]
dec a
ld e, a
- callba MovePkmnWOMail_SaveGame
+ farcall MovePkmnWOMail_SaveGame
ld a, [wBillsPC_CursorPosition]
ld hl, wBillsPC_ScrollPosition
add [hl]
ld [CurPartyMon], a
- callba InsertPokemonIntoBox
+ farcall InsertPokemonIntoBox
ret
; e3316
@@ -2159,7 +2159,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
call CopyMonToTemp
xor a
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
ret
; e3346
@@ -2168,7 +2168,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7
ld hl, wBillsPC_ScrollPosition
add [hl]
ld [CurPartyMon], a
- callba InsertPokemonIntoParty
+ farcall InsertPokemonIntoParty
ret
; e3357
@@ -2280,8 +2280,8 @@ BillsPC_InitGFX: ; e33e8 (38:73e8)
ret
; e3419 (38:7419)
-PCSelectLZ: INCBIN "gfx/pc.2bpp.lz"
-PCMailGFX: INCBIN "gfx/pc_mail.2bpp"
+PCSelectLZ: INCBIN "gfx/pc/pc.2bpp.lz"
+PCMailGFX: INCBIN "gfx/pc/pc_mail.2bpp"
; e34dd
PCString_ChooseaPKMN: db "Choose a <PK><MN>.@"
@@ -2523,7 +2523,7 @@ BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9)
ld a, [MenuSelection]
dec a
ld c, a
- callba PrintPCBox
+ farcall PrintPCBox
call BillsPC_ClearTilemap
and a
ret
@@ -2540,13 +2540,13 @@ BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9)
ld a, [wCurBox]
cp e
ret z
- callba ChangeBoxSaveGame
+ farcall ChangeBoxSaveGame
ret
.Name:
ld b, $4 ; box
ld de, wd002
- callba NamingScreen
+ farcall NamingScreen
call ClearTileMap
call LoadStandardFont
call LoadFontsBattleExtra
diff --git a/engine/billspctop.asm b/engine/billspctop.asm
index 115c90385..c36cbe45d 100755
--- a/engine/billspctop.asm
+++ b/engine/billspctop.asm
@@ -111,16 +111,16 @@ BillsPC_SeeYa: ; e4cb
BillsPC_MovePKMNMenu: ; e4cd
call LoadStandardMenuDataHeader
- callba IsAnyMonHoldingMail
+ farcall IsAnyMonHoldingMail
jr nc, .no_mail
ld hl, .Text_MonHoldingMail
call PrintText
jr .quit
.no_mail
- callba StartMovePkmnWOMail_SaveGame
+ farcall StartMovePkmnWOMail_SaveGame
jr c, .quit
- callba _MovePKMNWithoutMail
+ farcall _MovePKMNWithoutMail
call ReturnToMapFromSubmenu
call ClearPCItemScreen
@@ -136,7 +136,7 @@ BillsPC_MovePKMNMenu: ; e4cd
BillsPC_DepositMenu: ; e4fe (3:64fe)
call LoadStandardMenuDataHeader
- callba _DepositPKMN
+ farcall _DepositPKMN
call ReturnToMapFromSubmenu
call ClearPCItemScreen
call CloseWindow
@@ -205,7 +205,7 @@ CheckCurPartyMonFainted: ; e538
BillsPC_WithdrawMenu: ; e559 (3:6559)
call LoadStandardMenuDataHeader
- callba _WithdrawPKMN
+ farcall _WithdrawPKMN
call ReturnToMapFromSubmenu
call ClearPCItemScreen
call CloseWindow
@@ -231,7 +231,7 @@ UnknownText_0xe57e: ; 0xe57e
db "@"
BillsPC_ChangeBoxMenu: ; e583 (3:6583)
- callba _ChangeBox
+ farcall _ChangeBox
and a
ret
@@ -245,10 +245,10 @@ ClearPCItemScreen: ; e58b
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
ld a, " "
call ByteFill
- hlcoord 0,0
+ hlcoord 0, 0
lb bc, 10, 18
call TextBox
- hlcoord 0,12
+ hlcoord 0, 12
lb bc, 4, 18
call TextBox
call WaitBGMap2
diff --git a/engine/breeding.asm b/engine/breeding.asm
new file mode 100755
index 000000000..967694612
--- /dev/null
+++ b/engine/breeding.asm
@@ -0,0 +1,993 @@
+CheckBreedmonCompatibility: ; 16e1d
+ call .CheckBreedingGroupCompatibility
+ ld c, $0
+ jp nc, .done
+ ld a, [wBreedMon1Species]
+ ld [CurPartySpecies], a
+ ld a, [wBreedMon1DVs]
+ ld [TempMonDVs], a
+ ld a, [wBreedMon1DVs + 1]
+ ld [TempMonDVs + 1], a
+ ld a, TEMPMON
+ ld [MonType], a
+ predef GetGender
+ jr c, .genderless
+ ld b, $1
+ jr nz, .breedmon2
+ inc b
+
+.breedmon2
+ push bc
+ ld a, [wBreedMon2Species]
+ ld [CurPartySpecies], a
+ ld a, [wBreedMon2DVs]
+ ld [TempMonDVs], a
+ ld a, [wBreedMon2DVs + 1]
+ ld [TempMonDVs + 1], a
+ ld a, $3
+ ld [MonType], a
+ predef GetGender
+ pop bc
+ jr c, .genderless
+ ld a, $1
+ jr nz, .compare_gender
+ inc a
+
+.compare_gender
+ cp b
+ jr nz, .compute
+
+.genderless
+ ld c, $0
+ ld a, [wBreedMon1Species]
+ cp DITTO
+ jr z, .ditto1
+ ld a, [wBreedMon2Species]
+ cp DITTO
+ jr nz, .done
+ jr .compute
+
+.ditto1
+ ld a, [wBreedMon2Species]
+ cp DITTO
+ jr z, .done
+
+.compute
+ call .CheckDVs
+ ld c, 255
+ jp z, .done
+ ld a, [wBreedMon2Species]
+ ld b, a
+ ld a, [wBreedMon1Species]
+ cp b
+ ld c, 254
+ jr z, .compare_ids
+ ld c, 128
+.compare_ids
+ ; Speed up
+ ld a, [wBreedMon1ID]
+ ld b, a
+ ld a, [wBreedMon2ID]
+ cp b
+ jr nz, .done
+ ld a, [wBreedMon1ID + 1]
+ ld b, a
+ ld a, [wBreedMon2ID + 1]
+ cp b
+ jr nz, .done
+ ld a, c
+ sub 77
+ ld c, a
+
+.done
+ ld a, c
+ ld [wd265], a
+ ret
+; 16ebc
+
+
+.CheckDVs: ; 16ebc (5:6ebc)
+; If Defense DVs match and the lower 3 bits of the Special DVs match,
+; avoid breeding
+ ld a, [wBreedMon1DVs]
+ and %1111
+ ld b, a
+ ld a, [wBreedMon2DVs]
+ and %1111
+ cp b
+ ret nz
+ ld a, [wBreedMon1DVs + 1]
+ and %111
+ ld b, a
+ ld a, [wBreedMon2DVs + 1]
+ and %111
+ cp b
+ ret
+; 16ed6
+
+.CheckBreedingGroupCompatibility: ; 16ed6
+; If either mon is in the No Eggs group,
+; they are not compatible.
+ ld a, [wBreedMon2Species]
+ ld [CurSpecies], a
+ call GetBaseData
+ ld a, [BaseEggGroups]
+ cp NO_EGGS * $11
+ jr z, .Incompatible
+
+ ld a, [wBreedMon1Species]
+ ld [CurSpecies], a
+ call GetBaseData
+ ld a, [BaseEggGroups]
+ cp NO_EGGS * $11
+ jr z, .Incompatible
+
+; Ditto is automatically compatible with everything.
+; If not Ditto, load the breeding groups into b/c and d/e.
+ ld a, [wBreedMon2Species]
+ cp DITTO
+ jr z, .Compatible
+ ld [CurSpecies], a
+ call GetBaseData
+ ld a, [BaseEggGroups]
+ push af
+ and $f
+ ld b, a
+ pop af
+ and $f0
+ swap a
+ ld c, a
+
+ ld a, [wBreedMon1Species]
+ cp DITTO
+ jr z, .Compatible
+ ld [CurSpecies], a
+ push bc
+ call GetBaseData
+ pop bc
+ ld a, [BaseEggGroups]
+ push af
+ and $f
+ ld d, a
+ pop af
+ and $f0
+ swap a
+ ld e, a
+
+ ld a, d
+ cp b
+ jr z, .Compatible
+ cp c
+ jr z, .Compatible
+
+ ld a, e
+ cp b
+ jr z, .Compatible
+ cp c
+ jr z, .Compatible
+
+.Incompatible:
+ and a
+ ret
+
+.Compatible:
+ scf
+ ret
+; 16f3e
+
+DoEggStep:: ; 16f3e
+ ld de, PartySpecies
+ ld hl, PartyMon1Happiness
+ ld c, 0
+.loop
+ ld a, [de]
+ inc de
+ cp -1
+ ret z
+ cp EGG
+ jr nz, .next
+ dec [hl]
+ jr nz, .next
+ ld a, 1
+ and a
+ ret
+
+.next
+ push de
+ ld de, PARTYMON_STRUCT_LENGTH
+ add hl, de
+ pop de
+ jr .loop
+; 16f5e
+
+OverworldHatchEgg:: ; 16f5e
+ call RefreshScreen
+ call LoadStandardMenuDataHeader
+ call HatchEggs
+ call ExitAllMenus
+ call RestartMapMusic
+ jp CloseText
+; 16f70
+
+HatchEggs: ; 16f70 (5:6f70)
+ ld de, PartySpecies
+ ld hl, PartyMon1Happiness
+ xor a
+ ld [CurPartyMon], a
+
+.loop ; 16f7a (5:6f7a)
+ ld a, [de]
+ inc de
+ cp -1
+ jp z, .done
+ push de
+ push hl
+ cp EGG
+ jp nz, .next
+ ld a, [hl]
+ and a
+ jp nz, .next
+ ld [hl], $78
+
+ push de
+
+ farcall SetEggMonCaughtData
+ farcall TrainerRankings_EggsHatched
+ ld a, [CurPartyMon]
+ ld hl, PartyMon1Species
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+ ld a, [hl]
+ ld [CurPartySpecies], a
+ dec a
+ call SetSeenAndCaughtMon
+
+ ld a, [CurPartySpecies]
+ cp TOGEPI
+ jr nz, .nottogepi
+ ; set the event flag for hatching togepi
+ ld de, EVENT_TOGEPI_HATCHED
+ ld b, SET_FLAG
+ call EventFlagAction
+.nottogepi
+
+ pop de
+
+ ld a, [CurPartySpecies]
+ dec de
+ ld [de], a
+ ld [wd265], a
+ ld [CurSpecies], a
+ call GetPokemonName
+ xor a
+ ld [wd26b], a
+ call GetBaseData
+ ld a, [CurPartyMon]
+ ld hl, PartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+ push hl
+ ld bc, MON_MAXHP
+ add hl, bc
+ ld d, h
+ ld e, l
+ pop hl
+ push hl
+ ld bc, MON_LEVEL
+ add hl, bc
+ ld a, [hl]
+ ld [CurPartyLevel], a
+ pop hl
+ push hl
+ ld bc, MON_STATUS
+ add hl, bc
+ xor a
+ ld [hli], a
+ ld [hl], a
+ pop hl
+ push hl
+ ld bc, MON_STAT_EXP - 1
+ add hl, bc
+ ld b, $0
+ predef CalcPkmnStats
+ pop bc
+ ld hl, MON_MAXHP
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld hl, MON_HP
+ add hl, bc
+ ld a, [de]
+ inc de
+ ld [hli], a
+ ld a, [de]
+ ld [hl], a
+ ld hl, MON_ID
+ add hl, bc
+ ld a, [PlayerID]
+ ld [hli], a
+ ld a, [PlayerID + 1]
+ ld [hl], a
+ ld a, [CurPartyMon]
+ ld hl, PartyMonOT
+ ld bc, NAME_LENGTH
+ call AddNTimes
+ ld d, h
+ ld e, l
+ ld hl, PlayerName
+ call CopyBytes
+ ld hl, .Text_HatchEgg
+ call PrintText
+ ld a, [CurPartyMon]
+ ld hl, PartyMonNicknames
+ ld bc, PKMN_NAME_LENGTH
+ call AddNTimes
+ ld d, h
+ ld e, l
+ push de
+ ld hl, .Text_NicknameHatchling
+ call PrintText
+ call YesNoBox
+ pop de
+ jr c, .nonickname
+
+ ld a, $1
+ ld [wd26b], a
+ xor a
+ ld [MonType], a
+ push de
+ ld b, $0
+ farcall NamingScreen
+ pop hl
+ ld de, StringBuffer1
+ call InitName
+ jr .next
+
+.nonickname
+ ld hl, StringBuffer1
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+
+.next ; 1707d (5:707d)
+ ld hl, CurPartyMon
+ inc [hl]
+ pop hl
+ ld de, PARTYMON_STRUCT_LENGTH
+ add hl, de
+ pop de
+ jp .loop
+
+.done ; 1708a (5:708a)
+ ret
+; 1708b (5:708b)
+
+.Text_HatchEgg: ; 0x1708b
+ ; Huh? @ @
+ text_jump UnknownText_0x1c0db0
+ start_asm
+ ld hl, VramState
+ res 0, [hl]
+ push hl
+ push de
+ push bc
+ ld a, [CurPartySpecies]
+ push af
+ call EggHatch_AnimationSequence
+ ld hl, .ClearTextbox
+ call PrintText
+ pop af
+ ld [CurPartySpecies], a
+ pop bc
+ pop de
+ pop hl
+ ld hl, .CameOutOfItsEgg
+ ret
+; 170b0 (5:70b0)
+
+.ClearTextbox: ; 0x170b0
+ ;
+ text_jump UnknownText_0x1c0db8
+ db "@"
+; 0x170b5
+
+.CameOutOfItsEgg: ; 0x170b5
+ ; came out of its EGG!@ @
+ text_jump UnknownText_0x1c0dba
+ db "@"
+; 0x170ba
+
+.Text_NicknameHatchling: ; 0x170ba
+ ; Give a nickname to @ ?
+ text_jump UnknownText_0x1c0dd8
+ db "@"
+; 0x170bf
+
+InitEggMoves: ; 170bf
+ call GetHeritableMoves
+ ld d, h
+ ld e, l
+ ld b, NUM_MOVES
+.loop
+ ld a, [de]
+ and a
+ jr z, .done
+ ld hl, wEggMonMoves
+ ld c, NUM_MOVES
+.next
+ ld a, [de]
+ cp [hl]
+ jr z, .skip
+ inc hl
+ dec c
+ jr nz, .next
+ call GetEggMove
+ jr nc, .skip
+ call LoadEggMove
+
+.skip
+ inc de
+ dec b
+ jr nz, .loop
+
+.done
+ ret
+; 170e4
+
+GetEggMove: ; 170e4
+GLOBAL EggMoves
+
+ push bc
+ ld a, [wEggMonSpecies]
+ dec a
+ ld c, a
+ ld b, 0
+ ld hl, EggMovePointers
+ add hl, bc
+ add hl, bc
+ ld a, BANK(EggMovePointers)
+ call GetFarHalfword
+.loop
+ ld a, BANK(EggMoves)
+ call GetFarByte
+ cp -1
+ jr z, .reached_end
+ ld b, a
+ ld a, [de]
+ cp b
+ jr z, .done_carry
+ inc hl
+ jr .loop
+
+.reached_end
+ call GetBreedmonMovePointer
+ ld b, NUM_MOVES
+.loop2
+ ld a, [de]
+ cp [hl]
+ jr z, .found_eggmove
+ inc hl
+ dec b
+ jr z, .inherit_tmhm
+ jr .loop2
+
+.found_eggmove
+ ld a, [wEggMonSpecies]
+ dec a
+ ld c, a
+ ld b, 0
+ ld hl, EvosAttacksPointers
+ add hl, bc
+ add hl, bc
+ ld a, BANK(EvosAttacksPointers)
+ call GetFarHalfword
+.loop3
+ ld a, BANK(EvosAttacks)
+ call GetFarByte
+ inc hl
+ and a
+ jr nz, .loop3
+.loop4
+ ld a, BANK(EvosAttacks)
+ call GetFarByte
+ and a
+ jr z, .inherit_tmhm
+ inc hl
+ ld a, BANK(EvosAttacks)
+ call GetFarByte
+ ld b, a
+ ld a, [de]
+ cp b
+ jr z, .done_carry
+ inc hl
+ jr .loop4
+
+.inherit_tmhm
+ ld hl, TMHMMoves
+.loop5
+ ld a, BANK(TMHMMoves)
+ call GetFarByte
+ inc hl
+ and a
+ jr z, .done
+ ld b, a
+ ld a, [de]
+ cp b
+ jr nz, .loop5
+ ld [wPutativeTMHMMove], a
+ predef CanLearnTMHMMove
+ ld a, c
+ and a
+ jr z, .done
+
+.done_carry
+ pop bc
+ scf
+ ret
+
+.done
+ pop bc
+ and a
+ ret
+; 17169
+
+LoadEggMove: ; 17169
+ push de
+ push bc
+ ld a, [de]
+ ld b, a
+ ld hl, wEggMonMoves
+ ld c, NUM_MOVES
+.loop
+ ld a, [hli]
+ and a
+ jr z, .done
+ dec c
+ jr nz, .loop
+ ld de, wEggMonMoves
+ ld hl, wEggMonMoves + 1
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+
+.done
+ dec hl
+ ld [hl], b
+ ld hl, wEggMonMoves
+ ld de, wEggMonPP
+ predef FillPP
+ pop bc
+ pop de
+ ret
+; 17197
+
+GetHeritableMoves: ; 17197
+ ld hl, wBreedMon2Moves
+ ld a, [wBreedMon1Species]
+ cp DITTO
+ jr z, .ditto1
+ ld a, [wBreedMon2Species]
+ cp DITTO
+ jr z, .ditto2
+ ld a, [wBreedMotherOrNonDitto]
+ and a
+ ret z
+ ld hl, wBreedMon1Moves
+ ret
+
+.ditto1
+ ld a, [CurPartySpecies]
+ push af
+ ld a, [wBreedMon2Species]
+ ld [CurPartySpecies], a
+ ld a, [wBreedMon2DVs]
+ ld [TempMonDVs], a
+ ld a, [wBreedMon2DVs + 1]
+ ld [TempMonDVs + 1], a
+ ld a, TEMPMON
+ ld [MonType], a
+ predef GetGender
+ jr c, .inherit_mon2_moves
+ jr nz, .inherit_mon2_moves
+ jr .inherit_mon1_moves
+
+.ditto2
+ ld a, [CurPartySpecies]
+ push af
+ ld a, [wBreedMon1Species]
+ ld [CurPartySpecies], a
+ ld a, [wBreedMon1DVs]
+ ld [TempMonDVs], a
+ ld a, [wBreedMon1DVs + 1]
+ ld [TempMonDVs + 1], a
+ ld a, TEMPMON
+ ld [MonType], a
+ predef GetGender
+ jr c, .inherit_mon1_moves
+ jr nz, .inherit_mon1_moves
+
+.inherit_mon2_moves
+ ld hl, wBreedMon2Moves
+ pop af
+ ld [CurPartySpecies], a
+ ret
+
+.inherit_mon1_moves
+ ld hl, wBreedMon1Moves
+ pop af
+ ld [CurPartySpecies], a
+ ret
+; 1720b
+
+GetBreedmonMovePointer: ; 1720b
+ ld hl, wBreedMon1Moves
+ ld a, [wBreedMon1Species]
+ cp DITTO
+ ret z
+ ld a, [wBreedMon2Species]
+ cp DITTO
+ jr z, .ditto
+ ld a, [wBreedMotherOrNonDitto]
+ and a
+ ret z
+
+.ditto
+ ld hl, wBreedMon2Moves
+ ret
+; 17224
+
+
+GetEggFrontpic: ; 17224 (5:7224)
+ push de
+ ld [CurPartySpecies], a
+ ld [CurSpecies], a
+ call GetBaseData
+ ld hl, BattleMonDVs
+ predef GetUnownLetter
+ pop de
+ predef_jump GetMonFrontpic
+
+GetHatchlingFrontpic: ; 1723c (5:723c)
+ push de
+ ld [CurPartySpecies], a
+ ld [CurSpecies], a
+ call GetBaseData
+ ld hl, BattleMonDVs
+ predef GetUnownLetter
+ pop de
+ predef_jump GetAnimatedFrontpicPredef
+
+Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254)
+ push af
+ call WaitTop
+ push hl
+ push bc
+ hlcoord 0, 0
+ ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
+ ld a, " "
+ call ByteFill
+ pop bc
+ pop hl
+ ld a, b
+ ld [hBGMapAddress + 1], a
+ ld a, c
+ ld [hGraphicStartTile], a
+ lb bc, 7, 7
+ predef PlaceGraphic
+ pop af
+ call Hatch_LoadFrontpicPal
+ call SetPalettes
+ jp WaitBGMap
+
+EggHatch_DoAnimFrame: ; 1727f (5:727f)
+ push hl
+ push de
+ push bc
+ callfar PlaySpriteAnimations
+ call DelayFrame
+ pop bc
+ pop de
+ pop hl
+ ret
+
+EggHatch_AnimationSequence: ; 1728f (5:728f)
+ ld a, [wd265]
+ ld [wJumptableIndex], a
+ ld a, [CurSpecies]
+ push af
+ ld de, MUSIC_NONE
+ call PlayMusic
+ farcall BlankScreen
+ call DisableLCD
+ ld hl, EggHatchGFX
+ ld de, VTiles0 tile $00
+ ld bc, $20
+ ld a, BANK(EggHatchGFX)
+ call FarCopyBytes
+ farcall ClearSpriteAnims
+ ld de, VTiles2 tile $00
+ ld a, [wJumptableIndex]
+ call GetHatchlingFrontpic
+ ld de, VTiles2 tile $31
+ ld a, EGG
+ call GetEggFrontpic
+ ld de, MUSIC_EVOLUTION
+ call PlayMusic
+ call EnableLCD
+ hlcoord 7, 4
+ ld b, VBGMap0 / $100
+ ld c, $31 ; Egg tiles start here
+ ld a, EGG
+ call Hatch_UpdateFrontpicBGMapCenter
+ ld c, 80
+ call DelayFrames
+ xor a
+ ld [wcf64], a
+ ld a, [hSCX]
+ ld b, a
+.outerloop
+ ld hl, wcf64
+ ld a, [hl]
+ inc [hl]
+ cp 8
+ jr nc, .done
+ ld e, [hl]
+.loop
+; wobble e times
+ ld a, 2
+ ld [hSCX], a
+ ld a, -2
+ ld [wGlobalAnimXOffset], a
+ call EggHatch_DoAnimFrame
+ ld c, 2
+ call DelayFrames
+ ld a, -2
+ ld [hSCX], a
+ ld a, 2
+ ld [wGlobalAnimXOffset], a
+ call EggHatch_DoAnimFrame
+ ld c, 2
+ call DelayFrames
+ dec e
+ jr nz, .loop
+ ld c, 16
+ call DelayFrames
+ call EggHatch_CrackShell
+ jr .outerloop
+
+.done
+ ld de, SFX_EGG_HATCH
+ call PlaySFX
+ xor a
+ ld [hSCX], a
+ ld [wGlobalAnimXOffset], a
+ call ClearSprites
+ call Hatch_InitShellFragments
+ hlcoord 6, 3
+ ld b, VBGMap0 / $100
+ ld c, $00 ; Hatchling tiles start here
+ ld a, [wJumptableIndex]
+ call Hatch_UpdateFrontpicBGMapCenter
+ call Hatch_ShellFragmentLoop
+ call WaitSFX
+ ld a, [wJumptableIndex]
+ ld [CurPartySpecies], a
+ hlcoord 6, 3
+ ld d, $0
+ ld e, ANIM_MON_HATCH
+ predef AnimateFrontpic
+ pop af
+ ld [CurSpecies], a
+ ret
+
+Hatch_LoadFrontpicPal: ; 17363 (5:7363)
+ ld [PlayerHPPal], a
+ ld b, SCGB_EVOLUTION
+ ld c, $0
+ jp GetSGBLayout
+
+EggHatch_CrackShell: ; 1736d (5:736d)
+ ld a, [wcf64]
+ dec a
+ and $7
+ cp $7
+ ret z
+ srl a
+ ret nc
+ swap a
+ srl a
+ add 9 * 8 + 4
+ ld d, a
+ ld e, 11 * 8
+ ld a, SPRITE_ANIM_INDEX_EGG_CRACK
+ call _InitSpriteAnimStruct
+ ld hl, SPRITEANIMSTRUCT_TILE_ID
+ add hl, bc
+ ld [hl], $0
+ ld de, SFX_EGG_CRACK
+ jp PlaySFX
+; 17393 (5:7393)
+
+EggHatchGFX: ; 17393
+INCBIN "gfx/evo/egg_hatch.2bpp"
+; 173b3
+
+Hatch_InitShellFragments: ; 173b3 (5:73b3)
+ farcall ClearSpriteAnims
+ ld hl, .SpriteData
+.loop
+ ld a, [hli]
+ cp -1
+ jr z, .done
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ push hl
+ push bc
+
+ ld a, SPRITE_ANIM_INDEX_EGG_HATCH
+ call _InitSpriteAnimStruct
+
+ ld hl, SPRITEANIMSTRUCT_TILE_ID
+ add hl, bc
+ ld [hl], $0
+
+ pop de
+ ld a, e
+ ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
+ add hl, bc
+ add [hl]
+ ld [hl], a
+
+ ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
+ add hl, bc
+ ld [hl], d
+
+ pop hl
+ jr .loop
+.done
+ ld de, SFX_EGG_HATCH
+ call PlaySFX
+ call EggHatch_DoAnimFrame
+ ret
+; 173ef (5:73ef)
+
+.SpriteData: ; 173ef
+; Probably OAM.
+ dsprite 10, 4, 9, 0, $00, $3c
+ dsprite 11, 4, 9, 0, $01, $04
+ dsprite 10, 4, 10, 0, $00, $30
+ dsprite 11, 4, 10, 0, $01, $10
+ dsprite 10, 4, 11, 0, $02, $24
+ dsprite 11, 4, 11, 0, $03, $1c
+ dsprite 10, 0, 9, 4, $00, $36
+ dsprite 12, 0, 9, 4, $01, $0a
+ dsprite 10, 0, 10, 4, $02, $2a
+ dsprite 12, 0, 10, 4, $03, $16
+ db -1
+; 17418
+
+Hatch_ShellFragmentLoop: ; 17418 (5:7418)
+ ld c, 129
+.loop
+ call EggHatch_DoAnimFrame
+ dec c
+ jr nz, .loop
+ ret
+
+Special_DayCareMon1: ; 17421
+ ld hl, DayCareMon1Text
+ call PrintText
+ ld a, [wBreedMon1Species]
+ call PlayCry
+ ld a, [wDayCareLady]
+ bit 0, a
+ jr z, DayCareMonCursor
+ call ButtonSound
+ ld hl, wBreedMon2Nick
+ call DayCareMonCompatibilityText
+ jp PrintText
+
+Special_DayCareMon2: ; 17440
+ ld hl, DayCareMon2Text
+ call PrintText
+ ld a, [wBreedMon2Species]
+ call PlayCry
+ ld a, [wDayCareMan]
+ bit 0, a
+ jr z, DayCareMonCursor
+ call ButtonSound
+ ld hl, wBreedMon1Nick
+ call DayCareMonCompatibilityText
+ jp PrintText
+
+DayCareMonCursor: ; 1745f
+ jp WaitPressAorB_BlinkCursor
+; 17462
+
+DayCareMon2Text: ; 0x17462
+ ; It's @ that was left with the DAY-CARE LADY.
+ text_jump UnknownText_0x1c0df3
+ db "@"
+; 0x17467
+
+DayCareMon1Text: ; 0x17467
+ ; It's @ that was left with the DAY-CARE MAN.
+ text_jump UnknownText_0x1c0e24
+ db "@"
+; 0x1746c
+
+DayCareMonCompatibilityText: ; 1746c
+ push bc
+ ld de, StringBuffer1
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ call CheckBreedmonCompatibility
+ pop bc
+ ld a, [wd265]
+ ld hl, .AllAlone
+ cp -1
+ jr z, .done
+ ld hl, .Incompatible
+ and a
+ jr z, .done
+ ld hl, .HighCompatibility
+ cp 230
+ jr nc, .done
+ cp 70
+ ld hl, .ModerateCompatibility
+ jr nc, .done
+ ld hl, .SlightCompatibility
+
+.done
+ ret
+; 1749c
+
+.AllAlone: ; 0x1749c
+ ; It's brimming with energy.
+ text_jump UnknownText_0x1c0e54
+ db "@"
+; 0x174a1
+
+.Incompatible: ; 0x174a1
+ ; It has no interest in @ .
+ text_jump UnknownText_0x1c0e6f
+ db "@"
+; 0x174a6
+
+.HighCompatibility: ; 0x174a6
+ ; It appears to care for @ .
+ text_jump UnknownText_0x1c0e8d
+ db "@"
+; 0x174ab
+
+.ModerateCompatibility: ; 0x174ab
+ ; It's friendly with @ .
+ text_jump UnknownText_0x1c0eac
+ db "@"
+; 0x174b0
+
+.SlightCompatibility: ; 0x174b0
+ ; It shows interest in @ .
+ text_jump UnknownText_0x1c0ec6
+ db "@"
+; 0x174b5
+
+DayCareMonPrintEmptyString: ; 174b5
+; unreferenced
+ ld hl, .string
+ ret
+; 174b9
+
+.string ; 174b9
+ db "@"
+; 174ba
+
diff --git a/engine/breeding/egg.asm b/engine/breeding/egg.asm
deleted file mode 100755
index 326faaa6c..000000000
--- a/engine/breeding/egg.asm
+++ /dev/null
@@ -1,993 +0,0 @@
-CheckBreedmonCompatibility: ; 16e1d
- call .CheckBreedingGroupCompatibility
- ld c, $0
- jp nc, .done
- ld a, [wBreedMon1Species]
- ld [CurPartySpecies], a
- ld a, [wBreedMon1DVs]
- ld [TempMonDVs], a
- ld a, [wBreedMon1DVs + 1]
- ld [TempMonDVs + 1], a
- ld a, TEMPMON
- ld [MonType], a
- predef GetGender
- jr c, .genderless
- ld b, $1
- jr nz, .breedmon2
- inc b
-
-.breedmon2
- push bc
- ld a, [wBreedMon2Species]
- ld [CurPartySpecies], a
- ld a, [wBreedMon2DVs]
- ld [TempMonDVs], a
- ld a, [wBreedMon2DVs + 1]
- ld [TempMonDVs + 1], a
- ld a, $3
- ld [MonType], a
- predef GetGender
- pop bc
- jr c, .genderless
- ld a, $1
- jr nz, .compare_gender
- inc a
-
-.compare_gender
- cp b
- jr nz, .compute
-
-.genderless
- ld c, $0
- ld a, [wBreedMon1Species]
- cp DITTO
- jr z, .ditto1
- ld a, [wBreedMon2Species]
- cp DITTO
- jr nz, .done
- jr .compute
-
-.ditto1
- ld a, [wBreedMon2Species]
- cp DITTO
- jr z, .done
-
-.compute
- call .CheckDVs
- ld c, 255
- jp z, .done
- ld a, [wBreedMon2Species]
- ld b, a
- ld a, [wBreedMon1Species]
- cp b
- ld c, 254
- jr z, .compare_ids
- ld c, 128
-.compare_ids
- ; Speed up
- ld a, [wBreedMon1ID]
- ld b, a
- ld a, [wBreedMon2ID]
- cp b
- jr nz, .done
- ld a, [wBreedMon1ID + 1]
- ld b, a
- ld a, [wBreedMon2ID + 1]
- cp b
- jr nz, .done
- ld a, c
- sub 77
- ld c, a
-
-.done
- ld a, c
- ld [wd265], a
- ret
-; 16ebc
-
-
-.CheckDVs: ; 16ebc (5:6ebc)
-; If Defense DVs match and the lower 3 bits of the Special DVs match,
-; avoid breeding
- ld a, [wBreedMon1DVs]
- and %1111
- ld b, a
- ld a, [wBreedMon2DVs]
- and %1111
- cp b
- ret nz
- ld a, [wBreedMon1DVs + 1]
- and %111
- ld b, a
- ld a, [wBreedMon2DVs + 1]
- and %111
- cp b
- ret
-; 16ed6
-
-.CheckBreedingGroupCompatibility: ; 16ed6
-; If either mon is in the No Eggs group,
-; they are not compatible.
- ld a, [wBreedMon2Species]
- ld [CurSpecies], a
- call GetBaseData
- ld a, [BaseEggGroups]
- cp NO_EGGS * $11
- jr z, .Incompatible
-
- ld a, [wBreedMon1Species]
- ld [CurSpecies], a
- call GetBaseData
- ld a, [BaseEggGroups]
- cp NO_EGGS * $11
- jr z, .Incompatible
-
-; Ditto is automatically compatible with everything.
-; If not Ditto, load the breeding groups into b/c and d/e.
- ld a, [wBreedMon2Species]
- cp DITTO
- jr z, .Compatible
- ld [CurSpecies], a
- call GetBaseData
- ld a, [BaseEggGroups]
- push af
- and $f
- ld b, a
- pop af
- and $f0
- swap a
- ld c, a
-
- ld a, [wBreedMon1Species]
- cp DITTO
- jr z, .Compatible
- ld [CurSpecies], a
- push bc
- call GetBaseData
- pop bc
- ld a, [BaseEggGroups]
- push af
- and $f
- ld d, a
- pop af
- and $f0
- swap a
- ld e, a
-
- ld a, d
- cp b
- jr z, .Compatible
- cp c
- jr z, .Compatible
-
- ld a, e
- cp b
- jr z, .Compatible
- cp c
- jr z, .Compatible
-
-.Incompatible:
- and a
- ret
-
-.Compatible:
- scf
- ret
-; 16f3e
-
-DoEggStep:: ; 16f3e
- ld de, PartySpecies
- ld hl, PartyMon1Happiness
- ld c, 0
-.loop
- ld a, [de]
- inc de
- cp -1
- ret z
- cp EGG
- jr nz, .next
- dec [hl]
- jr nz, .next
- ld a, 1
- and a
- ret
-
-.next
- push de
- ld de, PARTYMON_STRUCT_LENGTH
- add hl, de
- pop de
- jr .loop
-; 16f5e
-
-OverworldHatchEgg:: ; 16f5e
- call RefreshScreen
- call LoadStandardMenuDataHeader
- call HatchEggs
- call ExitAllMenus
- call RestartMapMusic
- jp CloseText
-; 16f70
-
-HatchEggs: ; 16f70 (5:6f70)
- ld de, PartySpecies
- ld hl, PartyMon1Happiness
- xor a
- ld [CurPartyMon], a
-
-.loop ; 16f7a (5:6f7a)
- ld a, [de]
- inc de
- cp -1
- jp z, .done
- push de
- push hl
- cp EGG
- jp nz, .next
- ld a, [hl]
- and a
- jp nz, .next
- ld [hl], $78
-
- push de
-
- callba SetEggMonCaughtData
- callba TrainerRankings_EggsHatched
- ld a, [CurPartyMon]
- ld hl, PartyMons ; wdcdf (aliases: PartyMon1, PartyMon1Species)
- ld bc, PARTYMON_STRUCT_LENGTH
- call AddNTimes
- ld a, [hl]
- ld [CurPartySpecies], a
- dec a
- call SetSeenAndCaughtMon
-
- ld a, [CurPartySpecies]
- cp TOGEPI
- jr nz, .nottogepi
- ; set the event flag for hatching togepi
- ld de, EVENT_TOGEPI_HATCHED
- ld b, SET_FLAG
- call EventFlagAction
-.nottogepi
-
- pop de
-
- ld a, [CurPartySpecies]
- dec de
- ld [de], a
- ld [wd265], a
- ld [CurSpecies], a
- call GetPokemonName
- xor a
- ld [wd26b], a
- call GetBaseData
- ld a, [CurPartyMon]
- ld hl, PartyMons ; wdcdf (aliases: PartyMon1, PartyMon1Species)
- ld bc, PARTYMON_STRUCT_LENGTH
- call AddNTimes
- push hl
- ld bc, MON_MAXHP
- add hl, bc
- ld d, h
- ld e, l
- pop hl
- push hl
- ld bc, MON_LEVEL
- add hl, bc
- ld a, [hl]
- ld [CurPartyLevel], a
- pop hl
- push hl
- ld bc, MON_STATUS
- add hl, bc
- xor a
- ld [hli], a
- ld [hl], a
- pop hl
- push hl
- ld bc, MON_STAT_EXP - 1
- add hl, bc
- ld b, $0
- predef CalcPkmnStats
- pop bc
- ld hl, MON_MAXHP
- add hl, bc
- ld d, h
- ld e, l
- ld hl, MON_HP
- add hl, bc
- ld a, [de]
- inc de
- ld [hli], a
- ld a, [de]
- ld [hl], a
- ld hl, MON_ID
- add hl, bc
- ld a, [PlayerID]
- ld [hli], a
- ld a, [PlayerID + 1]
- ld [hl], a
- ld a, [CurPartyMon]
- ld hl, PartyMonOT ; wddff (aliases: PartyMonOT)
- ld bc, NAME_LENGTH
- call AddNTimes
- ld d, h
- ld e, l
- ld hl, PlayerName
- call CopyBytes
- ld hl, .Text_HatchEgg
- call PrintText
- ld a, [CurPartyMon]
- ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
- call AddNTimes
- ld d, h
- ld e, l
- push de
- ld hl, .Text_NicknameHatchling
- call PrintText
- call YesNoBox
- pop de
- jr c, .nonickname
-
- ld a, $1
- ld [wd26b], a
- xor a
- ld [MonType], a
- push de
- ld b, $0
- callba NamingScreen
- pop hl
- ld de, StringBuffer1
- call InitName
- jr .next
-
-.nonickname
- ld hl, StringBuffer1
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
-
-.next ; 1707d (5:707d)
- ld hl, CurPartyMon
- inc [hl]
- pop hl
- ld de, PARTYMON_STRUCT_LENGTH
- add hl, de
- pop de
- jp .loop
-
-.done ; 1708a (5:708a)
- ret
-; 1708b (5:708b)
-
-.Text_HatchEgg: ; 0x1708b
- ; Huh? @ @
- text_jump UnknownText_0x1c0db0
- start_asm
- ld hl, VramState
- res 0, [hl]
- push hl
- push de
- push bc
- ld a, [CurPartySpecies]
- push af
- call EggHatch_AnimationSequence
- ld hl, .ClearTextbox
- call PrintText
- pop af
- ld [CurPartySpecies], a
- pop bc
- pop de
- pop hl
- ld hl, .CameOutOfItsEgg
- ret
-; 170b0 (5:70b0)
-
-.ClearTextbox: ; 0x170b0
- ;
- text_jump UnknownText_0x1c0db8
- db "@"
-; 0x170b5
-
-.CameOutOfItsEgg: ; 0x170b5
- ; came out of its EGG!@ @
- text_jump UnknownText_0x1c0dba
- db "@"
-; 0x170ba
-
-.Text_NicknameHatchling: ; 0x170ba
- ; Give a nickname to @ ?
- text_jump UnknownText_0x1c0dd8
- db "@"
-; 0x170bf
-
-InitEggMoves: ; 170bf
- call GetHeritableMoves
- ld d, h
- ld e, l
- ld b, NUM_MOVES
-.loop
- ld a, [de]
- and a
- jr z, .done
- ld hl, wEggMonMoves
- ld c, NUM_MOVES
-.next
- ld a, [de]
- cp [hl]
- jr z, .skip
- inc hl
- dec c
- jr nz, .next
- call GetEggMove
- jr nc, .skip
- call LoadEggMove
-
-.skip
- inc de
- dec b
- jr nz, .loop
-
-.done
- ret
-; 170e4
-
-GetEggMove: ; 170e4
-GLOBAL EggMoves
-
- push bc
- ld a, [wEggMonSpecies]
- dec a
- ld c, a
- ld b, 0
- ld hl, EggMovePointers
- add hl, bc
- add hl, bc
- ld a, BANK(EggMovePointers)
- call GetFarHalfword
-.loop
- ld a, BANK(EggMoves)
- call GetFarByte
- cp -1
- jr z, .reached_end
- ld b, a
- ld a, [de]
- cp b
- jr z, .done_carry
- inc hl
- jr .loop
-
-.reached_end
- call GetBreedmonMovePointer
- ld b, NUM_MOVES
-.loop2
- ld a, [de]
- cp [hl]
- jr z, .found_eggmove
- inc hl
- dec b
- jr z, .inherit_tmhm
- jr .loop2
-
-.found_eggmove
- ld a, [wEggMonSpecies]
- dec a
- ld c, a
- ld b, 0
- ld hl, EvosAttacksPointers
- add hl, bc
- add hl, bc
- ld a, BANK(EvosAttacksPointers)
- call GetFarHalfword
-.loop3
- ld a, BANK(EvosAttacks)
- call GetFarByte
- inc hl
- and a
- jr nz, .loop3
-.loop4
- ld a, BANK(EvosAttacks)
- call GetFarByte
- and a
- jr z, .inherit_tmhm
- inc hl
- ld a, BANK(EvosAttacks)
- call GetFarByte
- ld b, a
- ld a, [de]
- cp b
- jr z, .done_carry
- inc hl
- jr .loop4
-
-.inherit_tmhm
- ld hl, TMHMMoves
-.loop5
- ld a, BANK(TMHMMoves)
- call GetFarByte
- inc hl
- and a
- jr z, .done
- ld b, a
- ld a, [de]
- cp b
- jr nz, .loop5
- ld [wPutativeTMHMMove], a
- predef CanLearnTMHMMove
- ld a, c
- and a
- jr z, .done
-
-.done_carry
- pop bc
- scf
- ret
-
-.done
- pop bc
- and a
- ret
-; 17169
-
-LoadEggMove: ; 17169
- push de
- push bc
- ld a, [de]
- ld b, a
- ld hl, wEggMonMoves
- ld c, NUM_MOVES
-.loop
- ld a, [hli]
- and a
- jr z, .done
- dec c
- jr nz, .loop
- ld de, wEggMonMoves
- ld hl, wEggMonMoves + 1
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
-
-.done
- dec hl
- ld [hl], b
- ld hl, wEggMonMoves
- ld de, wEggMonPP
- predef FillPP
- pop bc
- pop de
- ret
-; 17197
-
-GetHeritableMoves: ; 17197
- ld hl, wBreedMon2Moves
- ld a, [wBreedMon1Species]
- cp DITTO
- jr z, .ditto1
- ld a, [wBreedMon2Species]
- cp DITTO
- jr z, .ditto2
- ld a, [wBreedMotherOrNonDitto]
- and a
- ret z
- ld hl, wBreedMon1Moves
- ret
-
-.ditto1
- ld a, [CurPartySpecies]
- push af
- ld a, [wBreedMon2Species]
- ld [CurPartySpecies], a
- ld a, [wBreedMon2DVs]
- ld [TempMonDVs], a
- ld a, [wBreedMon2DVs + 1]
- ld [TempMonDVs + 1], a
- ld a, TEMPMON
- ld [MonType], a
- predef GetGender
- jr c, .inherit_mon2_moves
- jr nz, .inherit_mon2_moves
- jr .inherit_mon1_moves
-
-.ditto2
- ld a, [CurPartySpecies]
- push af
- ld a, [wBreedMon1Species]
- ld [CurPartySpecies], a
- ld a, [wBreedMon1DVs]
- ld [TempMonDVs], a
- ld a, [wBreedMon1DVs + 1]
- ld [TempMonDVs + 1], a
- ld a, TEMPMON
- ld [MonType], a
- predef GetGender
- jr c, .inherit_mon1_moves
- jr nz, .inherit_mon1_moves
-
-.inherit_mon2_moves
- ld hl, wBreedMon2Moves
- pop af
- ld [CurPartySpecies], a
- ret
-
-.inherit_mon1_moves
- ld hl, wBreedMon1Moves
- pop af
- ld [CurPartySpecies], a
- ret
-; 1720b
-
-GetBreedmonMovePointer: ; 1720b
- ld hl, wBreedMon1Moves
- ld a, [wBreedMon1Species]
- cp DITTO
- ret z
- ld a, [wBreedMon2Species]
- cp DITTO
- jr z, .ditto
- ld a, [wBreedMotherOrNonDitto]
- and a
- ret z
-
-.ditto
- ld hl, wBreedMon2Moves
- ret
-; 17224
-
-
-GetEggFrontpic: ; 17224 (5:7224)
- push de
- ld [CurPartySpecies], a
- ld [CurSpecies], a
- call GetBaseData
- ld hl, BattleMonDVs
- predef GetUnownLetter
- pop de
- predef_jump GetFrontpic
-
-GetHatchlingFrontpic: ; 1723c (5:723c)
- push de
- ld [CurPartySpecies], a
- ld [CurSpecies], a
- call GetBaseData
- ld hl, BattleMonDVs
- predef GetUnownLetter
- pop de
- predef_jump FrontpicPredef
-
-Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254)
- push af
- call WaitTop
- push hl
- push bc
- hlcoord 0, 0
- ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
- ld a, " "
- call ByteFill
- pop bc
- pop hl
- ld a, b
- ld [hBGMapAddress + 1], a
- ld a, c
- ld [hGraphicStartTile], a
- lb bc, 7, 7
- predef PlaceGraphic
- pop af
- call Hatch_LoadFrontpicPal
- call SetPalettes
- jp WaitBGMap
-
-EggHatch_DoAnimFrame: ; 1727f (5:727f)
- push hl
- push de
- push bc
- callab PlaySpriteAnimations
- call DelayFrame
- pop bc
- pop de
- pop hl
- ret
-
-EggHatch_AnimationSequence: ; 1728f (5:728f)
- ld a, [wd265]
- ld [wJumptableIndex], a
- ld a, [CurSpecies]
- push af
- ld de, MUSIC_NONE
- call PlayMusic
- callba BlankScreen
- call DisableLCD
- ld hl, EggHatchGFX
- ld de, VTiles0 tile $00
- ld bc, $20
- ld a, BANK(EggHatchGFX)
- call FarCopyBytes
- callba ClearSpriteAnims
- ld de, VTiles2 tile $00
- ld a, [wJumptableIndex]
- call GetHatchlingFrontpic
- ld de, VTiles2 tile $31
- ld a, EGG
- call GetEggFrontpic
- ld de, MUSIC_EVOLUTION
- call PlayMusic
- call EnableLCD
- hlcoord 7, 4
- ld b, VBGMap0 / $100
- ld c, $31 ; Egg tiles start here
- ld a, EGG
- call Hatch_UpdateFrontpicBGMapCenter
- ld c, 80
- call DelayFrames
- xor a
- ld [wcf64], a
- ld a, [hSCX]
- ld b, a
-.outerloop
- ld hl, wcf64
- ld a, [hl]
- inc [hl]
- cp 8
- jr nc, .done
- ld e, [hl]
-.loop
-; wobble e times
- ld a, 2
- ld [hSCX], a
- ld a, -2
- ld [wGlobalAnimXOffset], a
- call EggHatch_DoAnimFrame
- ld c, 2
- call DelayFrames
- ld a, -2
- ld [hSCX], a
- ld a, 2
- ld [wGlobalAnimXOffset], a
- call EggHatch_DoAnimFrame
- ld c, 2
- call DelayFrames
- dec e
- jr nz, .loop
- ld c, 16
- call DelayFrames
- call EggHatch_CrackShell
- jr .outerloop
-
-.done
- ld de, SFX_EGG_HATCH
- call PlaySFX
- xor a
- ld [hSCX], a
- ld [wGlobalAnimXOffset], a
- call ClearSprites
- call Hatch_InitShellFragments
- hlcoord 6, 3
- ld b, VBGMap0 / $100
- ld c, $00 ; Hatchling tiles start here
- ld a, [wJumptableIndex]
- call Hatch_UpdateFrontpicBGMapCenter
- call Hatch_ShellFragmentLoop
- call WaitSFX
- ld a, [wJumptableIndex]
- ld [CurPartySpecies], a
- hlcoord 6, 3
- ld d, $0
- ld e, ANIM_MON_HATCH
- predef AnimateFrontpic
- pop af
- ld [CurSpecies], a
- ret
-
-Hatch_LoadFrontpicPal: ; 17363 (5:7363)
- ld [PlayerHPPal], a
- ld b, SCGB_EVOLUTION
- ld c, $0
- jp GetSGBLayout
-
-EggHatch_CrackShell: ; 1736d (5:736d)
- ld a, [wcf64]
- dec a
- and $7
- cp $7
- ret z
- srl a
- ret nc
- swap a
- srl a
- add 9 * 8 + 4
- ld d, a
- ld e, 11 * 8
- ld a, SPRITE_ANIM_INDEX_19
- call _InitSpriteAnimStruct
- ld hl, SPRITEANIMSTRUCT_TILE_ID
- add hl, bc
- ld [hl], $0
- ld de, SFX_EGG_CRACK
- jp PlaySFX
-; 17393 (5:7393)
-
-EggHatchGFX: ; 17393
-INCBIN "gfx/unknown/017393.2bpp"
-; 173b3
-
-Hatch_InitShellFragments: ; 173b3 (5:73b3)
- callba ClearSpriteAnims
- ld hl, .SpriteData
-.loop
- ld a, [hli]
- cp -1
- jr z, .done
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- push hl
- push bc
-
- ld a, SPRITE_ANIM_INDEX_1C
- call _InitSpriteAnimStruct
-
- ld hl, SPRITEANIMSTRUCT_TILE_ID
- add hl, bc
- ld [hl], $0
-
- pop de
- ld a, e
- ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
- add hl, bc
- add [hl]
- ld [hl], a
-
- ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
- add hl, bc
- ld [hl], d
-
- pop hl
- jr .loop
-.done
- ld de, SFX_EGG_HATCH
- call PlaySFX
- call EggHatch_DoAnimFrame
- ret
-; 173ef (5:73ef)
-
-.SpriteData: ; 173ef
-; Probably OAM.
- dsprite 10, 4, 9, 0, $00, $3c
- dsprite 11, 4, 9, 0, $01, $04
- dsprite 10, 4, 10, 0, $00, $30
- dsprite 11, 4, 10, 0, $01, $10
- dsprite 10, 4, 11, 0, $02, $24
- dsprite 11, 4, 11, 0, $03, $1c
- dsprite 10, 0, 9, 4, $00, $36
- dsprite 12, 0, 9, 4, $01, $0a
- dsprite 10, 0, 10, 4, $02, $2a
- dsprite 12, 0, 10, 4, $03, $16
- db -1
-; 17418
-
-Hatch_ShellFragmentLoop: ; 17418 (5:7418)
- ld c, 129
-.loop
- call EggHatch_DoAnimFrame
- dec c
- jr nz, .loop
- ret
-
-Special_DayCareMon1: ; 17421
- ld hl, DayCareMon1Text
- call PrintText
- ld a, [wBreedMon1Species]
- call PlayCry
- ld a, [wDaycareLady]
- bit 0, a
- jr z, DayCareMonCursor
- call ButtonSound
- ld hl, wBreedMon2Nick
- call DayCareMonCompatibilityText
- jp PrintText
-
-Special_DayCareMon2: ; 17440
- ld hl, DayCareMon2Text
- call PrintText
- ld a, [wBreedMon2Species]
- call PlayCry
- ld a, [wDaycareMan]
- bit 0, a
- jr z, DayCareMonCursor
- call ButtonSound
- ld hl, wBreedMon1Nick
- call DayCareMonCompatibilityText
- jp PrintText
-
-DayCareMonCursor: ; 1745f
- jp WaitPressAorB_BlinkCursor
-; 17462
-
-DayCareMon2Text: ; 0x17462
- ; It's @ that was left with the DAY-CARE LADY.
- text_jump UnknownText_0x1c0df3
- db "@"
-; 0x17467
-
-DayCareMon1Text: ; 0x17467
- ; It's @ that was left with the DAY-CARE MAN.
- text_jump UnknownText_0x1c0e24
- db "@"
-; 0x1746c
-
-DayCareMonCompatibilityText: ; 1746c
- push bc
- ld de, StringBuffer1
- ld bc, NAME_LENGTH
- call CopyBytes
- call CheckBreedmonCompatibility
- pop bc
- ld a, [wd265]
- ld hl, .AllAlone
- cp -1
- jr z, .done
- ld hl, .Incompatible
- and a
- jr z, .done
- ld hl, .HighCompatibility
- cp 230
- jr nc, .done
- cp 70
- ld hl, .ModerateCompatibility
- jr nc, .done
- ld hl, .SlightCompatibility
-
-.done
- ret
-; 1749c
-
-.AllAlone: ; 0x1749c
- ; It's brimming with energy.
- text_jump UnknownText_0x1c0e54
- db "@"
-; 0x174a1
-
-.Incompatible: ; 0x174a1
- ; It has no interest in @ .
- text_jump UnknownText_0x1c0e6f
- db "@"
-; 0x174a6
-
-.HighCompatibility: ; 0x174a6
- ; It appears to care for @ .
- text_jump UnknownText_0x1c0e8d
- db "@"
-; 0x174ab
-
-.ModerateCompatibility: ; 0x174ab
- ; It's friendly with @ .
- text_jump UnknownText_0x1c0eac
- db "@"
-; 0x174b0
-
-.SlightCompatibility: ; 0x174b0
- ; It shows interest in @ .
- text_jump UnknownText_0x1c0ec6
- db "@"
-; 0x174b5
-
-DayCareMonPrintEmptyString: ; 174b5
-; unreferenced
- ld hl, .string
- ret
-; 174b9
-
-.string ; 174b9
- db "@"
-; 174ba
-
diff --git a/engine/buy_sell_toss.asm b/engine/buy_sell_toss.asm
index bd18cc83a..37bee86b1 100755
--- a/engine/buy_sell_toss.asm
+++ b/engine/buy_sell_toss.asm
@@ -6,7 +6,7 @@ SelectQuantityToToss: ; 24fbf
; 24fc9
SelectQuantityToBuy: ; 24fc9
- callba GetItemPrice
+ farcall GetItemPrice
RooftopSale_SelectQuantityToBuy: ; 24fcf
ld a, d
ld [Buffer1], a
@@ -19,7 +19,7 @@ RooftopSale_SelectQuantityToBuy: ; 24fcf
; 24fe1
SelectQuantityToSell: ; 24fe1
- callba GetItemPrice
+ farcall GetItemPrice
ld a, d
ld [Buffer1], a
ld a, e
diff --git a/engine/card_flip.asm b/engine/card_flip.asm
index cdf2be010..c0c4639ad 100755
--- a/engine/card_flip.asm
+++ b/engine/card_flip.asm
@@ -499,12 +499,12 @@ CardFlip_DisplayCardFaceUp: ; e03ec
.Deck: ; e0459
; level, pic anchor (3x3)
- db "1",$4e, "1",$57, "1",$69, "1",$60
- db "2",$4e, "2",$57, "2",$69, "2",$60
- db "3",$4e, "3",$57, "3",$69, "3",$60
- db "4",$4e, "4",$57, "4",$69, "4",$60
- db "5",$4e, "5",$57, "5",$69, "5",$60
- db "6",$4e, "6",$57, "6",$69, "6",$60
+ db "1", $4e, "1", $57, "1", $69, "1", $60
+ db "2", $4e, "2", $57, "2", $69, "2", $60
+ db "3", $4e, "3", $57, "3", $69, "3", $60
+ db "4", $4e, "4", $57, "4", $69, "4", $60
+ db "5", $4e, "5", $57, "5", $69, "5", $60
+ db "6", $4e, "6", $57, "6", $69, "6", $60
; e0489
CardFlip_UpdateCoinBalanceDisplay: ; e0489
@@ -1185,14 +1185,14 @@ CardFlip_CheckWinCondition: ; e0637
.IsCoinCaseFull: ; e0833
ld a, [Coins]
- cp 9999 / $100
+ cp MAX_COINS / $100
jr c, .less
jr z, .check_low
jr .more
.check_low
ld a, [Coins + 1]
- cp 9999 % $100
+ cp MAX_COINS % $100
jr c, .less
.more
@@ -1415,7 +1415,6 @@ else
endc
endm
-
cardflip_cursor 11, 2, .Impossible
cardflip_cursor 12, 2, .Impossible
cardflip_cursor 13, 2, .PokeGroupPair
@@ -1665,78 +1664,24 @@ CardFlip_InitAttrPals: ; e0c37 (38:4c37)
; e0c93 (38:4c93)
.palettes ; e0c93
- RGB 31, 31, 31
- RGB 17, 07, 31
- RGB 06, 19, 08
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 29, 25, 00
- RGB 06, 19, 08
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 13, 30
- RGB 06, 19, 08
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 08, 17, 30
- RGB 06, 19, 08
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 08, 31, 08
- RGB 06, 19, 08
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 17, 07, 31
- RGB 06, 19, 08
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 17, 07, 31
- RGB 06, 19, 08
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 17, 07, 31
- RGB 06, 19, 08
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 00, 00
- RGB 31, 00, 00
+INCLUDE "data/palettes/card_flip.pal"
; e0cdb
CardFlipLZ03: ; e0cdb
-INCBIN "gfx/unknown/0e0cdb.2bpp.lz"
+INCBIN "gfx/card_flip/card_flip_3.2bpp.lz"
CardFlipOffButtonGFX: ; e0cf6
-INCBIN "gfx/unknown/0e0cf6.2bpp"
+INCBIN "gfx/card_flip/off.2bpp"
CardFlipOnButtonGFX: ; e0d06
-INCBIN "gfx/unknown/0e0d06.2bpp"
+INCBIN "gfx/card_flip/on.2bpp"
CardFlipLZ01: ; e0d16
-INCBIN "gfx/unknown/0e0d16.2bpp.lz"
+INCBIN "gfx/card_flip/card_flip_1.2bpp.lz"
CardFlipLZ02: ; e0ea8
-INCBIN "gfx/unknown/0e0ea8.2bpp.lz"
+INCBIN "gfx/card_flip/card_flip_2.2bpp.lz"
CardFlipTilemap: ; e110c
- db $ef, $15, $27, $2a, $2a, $06, $27, $2a, $2a, $06, $27
- db $ef, $07, $27, $3e, $3f, $42, $43, $46, $47, $4a, $4b
- db $ef, $17, $26, $40, $41, $44, $45, $48, $49, $4c, $4d
- db $ef, $25, $04, $00, $01, $00, $01, $00, $01, $00, $01
- db $ef, $05, $14, $10, $11, $10, $11, $10, $11, $10, $11
- db $ef, $16, $24, $20, $21, $20, $21, $20, $21, $20, $21
- db $ef, $25, $04, $00, $02, $00, $02, $00, $02, $00, $02
- db $ef, $05, $14, $10, $12, $10, $12, $10, $12, $10, $12
- db $ef, $16, $24, $20, $22, $20, $22, $20, $22, $20, $22
- db $ef, $25, $04, $00, $03, $00, $03, $00, $03, $00, $03
- db $ef, $05, $14, $10, $13, $10, $13, $10, $13, $10, $13
- db $ef, $16, $24, $20, $23, $20, $23, $20, $23, $20, $23
+INCBIN "gfx/card_flip/card_flip.tilemap"
; e1190
diff --git a/engine/caught_data.asm b/engine/caught_data.asm
new file mode 100644
index 000000000..961782908
--- /dev/null
+++ b/engine/caught_data.asm
@@ -0,0 +1,247 @@
+CheckPartyFullAfterContest: ; 4d9e5
+ ld a, [wContestMon]
+ and a
+ jp z, .DidntCatchAnything
+ ld [CurPartySpecies], a
+ ld [CurSpecies], a
+ call GetBaseData
+ ld hl, PartyCount
+ ld a, [hl]
+ cp 6
+ jp nc, .TryAddToBox
+ inc a
+ ld [hl], a
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [wContestMon]
+ ld [hli], a
+ ld [CurSpecies], a
+ ld a, $ff
+ ld [hl], a
+ ld hl, PartyMon1Species
+ ld a, [PartyCount]
+ dec a
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+ ld d, h
+ ld e, l
+ ld hl, wContestMon
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call CopyBytes
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMonOT
+ call SkipNames
+ ld d, h
+ ld e, l
+ ld hl, PlayerName
+ call CopyBytes
+ ld a, [CurPartySpecies]
+ ld [wd265], a
+ call GetPokemonName
+ ld hl, StringBuffer1
+ ld de, wMonOrItemNameBuffer
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+ call GiveANickname_YesNo
+ jr c, .Party_SkipNickname
+ ld a, [PartyCount]
+ dec a
+ ld [CurPartyMon], a
+ xor a
+ ld [MonType], a
+ ld de, wMonOrItemNameBuffer
+ callfar InitNickname
+
+.Party_SkipNickname:
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMonNicknames
+ call SkipNames
+ ld d, h
+ ld e, l
+ ld hl, wMonOrItemNameBuffer
+ call CopyBytes
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMon1Level
+ call GetPartyLocation
+ ld a, [hl]
+ ld [CurPartyLevel], a
+ call SetCaughtData
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMon1CaughtLocation
+ call GetPartyLocation
+ ld a, [hl]
+ and $80
+ ld b, $13
+ or b
+ ld [hl], a
+ xor a
+ ld [wContestMon], a
+ and a
+ ld [ScriptVar], a
+ ret
+
+.TryAddToBox: ; 4daa3
+ ld a, BANK(sBoxCount)
+ call GetSRAMBank
+ ld hl, sBoxCount
+ ld a, [hl]
+ cp MONS_PER_BOX
+ call CloseSRAM
+ jr nc, .BoxFull
+ xor a
+ ld [CurPartyMon], a
+ ld hl, wContestMon
+ ld de, wBufferMon
+ ld bc, BOXMON_STRUCT_LENGTH
+ call CopyBytes
+ ld hl, PlayerName
+ ld de, wBufferMonOT
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ callfar InsertPokemonIntoBox
+ ld a, [CurPartySpecies]
+ ld [wd265], a
+ call GetPokemonName
+ call GiveANickname_YesNo
+ ld hl, StringBuffer1
+ jr c, .Box_SkipNickname
+ ld a, BOXMON
+ ld [MonType], a
+ ld de, wMonOrItemNameBuffer
+ callfar InitNickname
+ ld hl, wMonOrItemNameBuffer
+
+.Box_SkipNickname:
+ ld a, BANK(sBoxMonNicknames)
+ call GetSRAMBank
+ ld de, sBoxMonNicknames
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+ call CloseSRAM
+
+.BoxFull:
+ ld a, BANK(sBoxMon1Level)
+ call GetSRAMBank
+ ld a, [sBoxMon1Level]
+ ld [CurPartyLevel], a
+ call CloseSRAM
+ call SetBoxMonCaughtData
+ ld a, BANK(sBoxMon1CaughtLocation)
+ call GetSRAMBank
+ ld hl, sBoxMon1CaughtLocation
+ ld a, [hl]
+ and $80
+ ld b, $13
+ or b
+ ld [hl], a
+ call CloseSRAM
+ xor a
+ ld [wContestMon], a
+ ld a, $1
+ ld [ScriptVar], a
+ ret
+
+.DidntCatchAnything: ; 4db35
+ ld a, $2
+ ld [ScriptVar], a
+ ret
+
+GiveANickname_YesNo: ; 4db3b
+ ld hl, TextJump_GiveANickname
+ call PrintText
+ jp YesNoBox
+
+TextJump_GiveANickname: ; 0x4db44
+ ; Give a nickname to the @ you received?
+ text_jump UnknownText_0x1c12fc
+ db "@"
+
+SetCaughtData: ; 4db49
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMon1CaughtLevel
+ call GetPartyLocation
+SetBoxmonOrEggmonCaughtData: ; 4db53
+ ld a, [TimeOfDay]
+ inc a
+ rrca
+ rrca
+ ld b, a
+ ld a, [CurPartyLevel]
+ or b
+ ld [hli], a
+ ld a, [MapGroup]
+ ld b, a
+ ld a, [MapNumber]
+ ld c, a
+ cp MAP_POKECENTER_2F
+ jr nz, .NotPokecenter2F
+ ld a, b
+ cp GROUP_POKECENTER_2F
+ jr nz, .NotPokecenter2F
+
+ ld a, [BackupMapGroup]
+ ld b, a
+ ld a, [BackupMapNumber]
+ ld c, a
+
+.NotPokecenter2F:
+ call GetWorldMapLocation
+ ld b, a
+ ld a, [PlayerGender]
+ rrca
+ or b
+ ld [hl], a
+ ret
+
+SetBoxMonCaughtData: ; 4db83
+ ld a, BANK(sBoxMon1CaughtLevel)
+ call GetSRAMBank
+ ld hl, sBoxMon1CaughtLevel
+ call SetBoxmonOrEggmonCaughtData
+ call CloseSRAM
+ ret
+
+SetGiftBoxMonCaughtData: ; 4db92
+ push bc
+ ld a, BANK(sBoxMon1CaughtLevel)
+ call GetSRAMBank
+ ld hl, sBoxMon1CaughtLevel
+ pop bc
+ call SetGiftMonCaughtData
+ call CloseSRAM
+ ret
+
+SetGiftPartyMonCaughtData: ; 4dba3
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMon1CaughtLevel
+ push bc
+ call GetPartyLocation
+ pop bc
+SetGiftMonCaughtData: ; 4dbaf
+ xor a
+ ld [hli], a
+ ld a, $7e
+ rrc b
+ or b
+ ld [hl], a
+ ret
+
+SetEggMonCaughtData: ; 4dbb8 (13:5bb8)
+ ld a, [CurPartyMon]
+ ld hl, PartyMon1CaughtLevel
+ call GetPartyLocation
+ ld a, [CurPartyLevel]
+ push af
+ ld a, $1
+ ld [CurPartyLevel], a
+ call SetBoxmonOrEggmonCaughtData
+ pop af
+ ld [CurPartyLevel], a
+ ret
diff --git a/engine/cgb_layouts.asm b/engine/cgb_layouts.asm
new file mode 100644
index 000000000..05834d35f
--- /dev/null
+++ b/engine/cgb_layouts.asm
@@ -0,0 +1,1071 @@
+; Replaces the functionality of sgb.asm to work with CGB hardware.
+
+CheckCGB: ; 8d55
+ ld a, [hCGB]
+ and a
+ ret
+; 8d59
+
+Predef_LoadSGBLayoutCGB: ; 8d59
+ ld a, b
+ cp SCGB_RAM
+ jr nz, .not_ram
+ ld a, [SGBPredef]
+.not_ram
+ cp SCGB_PARTY_MENU_HP_PALS
+ jp z, CGB_ApplyPartyMenuHPPals
+ call ResetBGPals
+ ld l, a
+ ld h, 0
+ add hl, hl
+ ld de, .dw
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, .ReturnFromJumpTable
+ push de
+ jp hl
+; 8d79
+
+.ReturnFromJumpTable: ; 8d79
+ ret
+; 8d7a
+
+.dw ; 8d7a
+ dw _CGB_BattleGrayscale
+ dw _CGB_BattleColors
+ dw _CGB_PokegearPals
+ dw _CGB_StatsScreenHPPals
+ dw _CGB_Pokedex
+ dw _CGB_SlotMachine
+ dw _CGB06
+ dw _CGB07
+ dw _CGB_Diploma
+ dw _CGB_MapPals
+ dw _CGB_PartyMenu
+ dw _CGB_Evolution
+ dw _CGB0c
+ dw _CGB0d
+ dw _CGB_MoveList
+ dw _CGB0f
+ dw _CGB_PokedexSearchOption
+ dw _CGB11
+ dw _CGB_Pokepic
+ dw _CGB13
+ dw _CGB_PackPals
+ dw _CGB_TrainerCard
+ dw _CGB_PokedexUnownMode
+ dw _CGB_BillsPC
+ dw _CGB_UnownPuzzle
+ dw _CGB_GamefreakLogo ; called before copyright
+ dw _CGB_PlayerOrMonFrontpicPals
+ dw _CGB_TradeTube
+ dw _CGB_TrainerOrMonFrontpicPals
+ dw _CGB_MysteryGift
+ dw _CGB1e
+; 8db8
+
+_CGB_BattleGrayscale: ; 8db8
+ ld hl, PalPacket_9c66 + 1
+ ld de, UnknBGPals
+ ld c, 4
+ call CopyPalettes
+ ld hl, PalPacket_9c66 + 1
+ ld de, UnknBGPals palette PAL_BATTLE_BG_EXP
+ ld c, 4
+ call CopyPalettes
+ ld hl, PalPacket_9c66 + 1
+ ld de, UnknOBPals
+ ld c, 2
+ call CopyPalettes
+ jr _CGB_FinishBattleScreenLayout
+
+_CGB_BattleColors: ; 8ddb
+ ld de, UnknBGPals
+ call GetBattlemonBackpicPalettePointer
+ push hl
+ call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_PLAYER
+ call GetEnemyFrontpicPalettePointer
+ push hl
+ call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_ENEMY
+ ld a, [EnemyHPPal]
+ ld l, a
+ ld h, $0
+ add hl, hl
+ add hl, hl
+ ld bc, HPBarPals
+ add hl, bc
+ call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_ENEMY_HP
+ ld a, [PlayerHPPal]
+ ld l, a
+ ld h, $0
+ add hl, hl
+ add hl, hl
+ ld bc, HPBarPals
+ add hl, bc
+ call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_PLAYER_HP
+ ld hl, ExpBarPalette
+ call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_EXP
+ ld de, UnknOBPals
+ pop hl
+ call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_OB_ENEMY
+ pop hl
+ call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_OB_PLAYER
+ ld a, SCGB_BATTLE_COLORS
+ ld [SGBPredef], a
+ call ApplyPals
+_CGB_FinishBattleScreenLayout: ; 8e23
+ call InitPartyMenuBGPal7
+ hlcoord 0, 0, AttrMap
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ ld a, PAL_BATTLE_BG_ENEMY_HP
+ call ByteFill
+ hlcoord 0, 4, AttrMap
+ lb bc, 8, 10
+ ld a, PAL_BATTLE_BG_PLAYER
+ call FillBoxCGB
+ hlcoord 10, 0, AttrMap
+ lb bc, 7, 10
+ ld a, PAL_BATTLE_BG_ENEMY
+ call FillBoxCGB
+ hlcoord 0, 0, AttrMap
+ lb bc, 4, 10
+ ld a, PAL_BATTLE_BG_ENEMY_HP
+ call FillBoxCGB
+ hlcoord 10, 7, AttrMap
+ lb bc, 5, 10
+ ld a, PAL_BATTLE_BG_PLAYER_HP
+ call FillBoxCGB
+ hlcoord 10, 11, AttrMap
+ lb bc, 1, 9
+ ld a, PAL_BATTLE_BG_EXP
+ call FillBoxCGB
+ hlcoord 0, 12, AttrMap
+ ld bc, 6 * SCREEN_WIDTH
+ ld a, PAL_BATTLE_BG_TEXT
+ call ByteFill
+ ld hl, Palettes_979c
+ ld de, UnknOBPals palette PAL_BATTLE_OB_GRAY
+ ld bc, 6 palettes
+ ld a, BANK(UnknOBPals)
+ call FarCopyWRAM
+ call ApplyAttrMap
+ ret
+; 8e85
+
+
+InitPartyMenuBGPal7: ; 8e85
+ farcall Function100dc0
+Mobile_InitPartyMenuBGPal7: ; 8e8b
+ ld hl, Palette_b311
+ jr nc, .not_mobile
+ ld hl, Palette_b309
+.not_mobile
+ ld de, UnknBGPals palette 7
+ ld bc, 1 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ ret
+; 8e9f
+
+InitPartyMenuBGPal0: ; 8e9f
+ farcall Function100dc0
+ ld hl, Palette_b311
+ jr nc, .not_mobile
+ ld hl, Palette_b309
+.not_mobile
+ ld de, UnknBGPals palette 0
+ ld bc, 1 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ ret
+; 8eb9
+
+_CGB_PokegearPals: ; 8eb9
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, .male
+ ld hl, FemalePokegearPals
+ jr .got_pals
+
+.male
+ ld hl, MalePokegearPals
+.got_pals
+ ld de, UnknBGPals
+ ld bc, 6 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 8edb
+
+_CGB_StatsScreenHPPals: ; 8edb
+ ld de, UnknBGPals
+ ld a, [wCurHPPal]
+ ld l, a
+ ld h, $0
+ add hl, hl
+ add hl, hl
+ ld bc, HPBarPals
+ add hl, bc
+ call LoadPalette_White_Col1_Col2_Black ; hp palette
+ ld a, [CurPartySpecies]
+ ld bc, TempMonDVs
+ call GetPlayerOrMonPalettePointer
+ call LoadPalette_White_Col1_Col2_Black ; mon palette
+ ld hl, ExpBarPalette
+ call LoadPalette_White_Col1_Col2_Black ; exp palette
+ ld hl, StatsScreenPagePals
+ ld de, UnknBGPals palette 3
+ ld bc, 3 palettes ; pink, green, and blue page palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ call WipeAttrMap
+
+ hlcoord 0, 0, AttrMap
+ lb bc, 8, SCREEN_WIDTH
+ ld a, $1 ; mon palette
+ call FillBoxCGB
+
+ hlcoord 10, 16, AttrMap
+ ld bc, 10
+ ld a, $2 ; exp palette
+ call ByteFill
+
+ hlcoord 13, 5, AttrMap
+ lb bc, 2, 2
+ ld a, $3 ; pink page palette
+ call FillBoxCGB
+
+ hlcoord 15, 5, AttrMap
+ lb bc, 2, 2
+ ld a, $4 ; green page palette
+ call FillBoxCGB
+
+ hlcoord 17, 5, AttrMap
+ lb bc, 2, 2
+ ld a, $5 ; blue page palette
+ call FillBoxCGB
+
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 8f52
+
+StatsScreenPagePals: ; 8f52
+; pink
+ RGB 31, 31, 31
+ RGB 31, 19, 31
+ RGB 31, 15, 31
+ RGB 00, 00, 00
+; green
+ RGB 31, 31, 31
+ RGB 21, 31, 14
+ RGB 17, 31, 00
+ RGB 00, 00, 00
+; blue
+ RGB 31, 31, 31
+ RGB 17, 31, 31
+ RGB 17, 31, 31
+ RGB 00, 00, 00
+; 8f6a
+
+StatsScreenPals: ; 8f6a
+; pink
+ RGB 31, 19, 31
+; green
+ RGB 21, 31, 14
+; blue
+ RGB 17, 31, 31
+; 8f70
+
+_CGB_Pokedex: ; 8f70
+ ld de, UnknBGPals
+ ld a, $1d
+ call GetPredefPal
+ call LoadHLPaletteIntoDE ; dex interface palette
+ ld a, [CurPartySpecies]
+ cp $ff
+ jr nz, .is_pokemon
+ ld hl, .PokedexQuestionMarkPalette
+ call LoadHLPaletteIntoDE ; green question mark palette
+ jr .got_palette
+
+.is_pokemon
+ call GetMonPalettePointer_
+ call LoadPalette_White_Col1_Col2_Black ; mon palette
+.got_palette
+ call WipeAttrMap
+ hlcoord 1, 1, AttrMap
+ lb bc, 7, 7
+ ld a, $1 ; green question mark palette
+ call FillBoxCGB
+ call InitPartyMenuOBPals
+ ld hl, .PokedexCursorPalette
+ ld de, UnknOBPals palette 7 ; green cursor palette
+ ld bc, 1 palettes
+ ld a, BANK(UnknOBPals)
+ call FarCopyWRAM
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 8fba
+
+.PokedexQuestionMarkPalette: ; 8fba
+ RGB 11, 23, 00
+ RGB 07, 17, 00
+ RGB 06, 16, 03
+ RGB 05, 12, 01
+
+.PokedexCursorPalette: ; 8fc2
+ RGB 00, 00, 00
+ RGB 11, 23, 00
+ RGB 07, 17, 00
+ RGB 00, 00, 00
+; 8fca
+
+_CGB_BillsPC: ; 8fca
+ ld de, UnknBGPals
+ ld a, $1d
+ call GetPredefPal
+ call LoadHLPaletteIntoDE
+ ld a, [CurPartySpecies]
+ cp $ff
+ jr nz, .GetMonPalette
+ ld hl, .BillsPCOrangePalette
+ call LoadHLPaletteIntoDE
+ jr .Resume
+
+.GetMonPalette:
+ ld bc, TempMonDVs
+ call GetPlayerOrMonPalettePointer
+ call LoadPalette_White_Col1_Col2_Black
+.Resume:
+ call WipeAttrMap
+ hlcoord 1, 4, AttrMap
+ lb bc, 7, 7
+ ld a, $1
+ call FillBoxCGB
+ call InitPartyMenuOBPals
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 9009
+
+.Function9009: ; 9009
+ ld hl, .BillsPCOrangePalette
+ call LoadHLPaletteIntoDE
+ jr .asm_901a
+
+.unused
+ ld bc, TempMonDVs
+ call GetPlayerOrMonPalettePointer
+ call LoadPalette_White_Col1_Col2_Black
+.asm_901a
+ call WipeAttrMap
+ hlcoord 1, 1, AttrMap
+ lb bc, 7, 7
+ ld a, $1
+ call FillBoxCGB
+ call InitPartyMenuOBPals
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 9036
+
+.BillsPCOrangePalette: ; 9036
+ RGB 31, 15, 00
+ RGB 23, 12, 00
+ RGB 15, 07, 00
+ RGB 00, 00, 00
+; 903e
+
+_CGB_PokedexUnownMode: ; 903e
+ ld de, UnknBGPals
+ ld a, $1d
+ call GetPredefPal
+ call LoadHLPaletteIntoDE
+ ld a, [CurPartySpecies]
+ call GetMonPalettePointer_
+ call LoadPalette_White_Col1_Col2_Black
+ call WipeAttrMap
+ hlcoord 7, 5, AttrMap
+ lb bc, 7, 7
+ ld a, $1
+ call FillBoxCGB
+ call InitPartyMenuOBPals
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 906e
+
+_CGB_SlotMachine: ; 906e
+ ld hl, SlotMachinePals
+ ld de, UnknBGPals
+ ld bc, 16 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ call WipeAttrMap
+ hlcoord 0, 2, AttrMap
+ lb bc, 10, 3
+ ld a, $2
+ call FillBoxCGB
+ hlcoord 17, 2, AttrMap
+ lb bc, 10, 3
+ ld a, $2
+ call FillBoxCGB
+ hlcoord 0, 4, AttrMap
+ lb bc, 6, 3
+ ld a, $3
+ call FillBoxCGB
+ hlcoord 17, 4, AttrMap
+ lb bc, 6, 3
+ ld a, $3
+ call FillBoxCGB
+ hlcoord 0, 6, AttrMap
+ lb bc, 2, 3
+ ld a, $4
+ call FillBoxCGB
+ hlcoord 17, 6, AttrMap
+ lb bc, 2, 3
+ ld a, $4
+ call FillBoxCGB
+ hlcoord 4, 2, AttrMap
+ lb bc, 2, 12
+ ld a, $1
+ call FillBoxCGB
+ hlcoord 3, 2, AttrMap
+ lb bc, 10, 1
+ ld a, $1
+ call FillBoxCGB
+ hlcoord 16, 2, AttrMap
+ lb bc, 10, 1
+ ld a, $1
+ call FillBoxCGB
+ hlcoord 0, 12, AttrMap
+ ld bc, $78
+ ld a, $7
+ call ByteFill
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 90f8
+
+_CGB06: ; 90f8
+ ld hl, PalPacket_9ca6 + 1
+ call CopyFourPalettes
+ call WipeAttrMap
+ ld de, UnknOBPals
+ ld a, $3c
+ call GetPredefPal
+ call LoadHLPaletteIntoDE
+ hlcoord 0, 6, AttrMap
+ lb bc, 12, SCREEN_WIDTH
+ ld a, $1
+ call FillBoxCGB
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 9122
+
+_CGB07: ; 9122
+ ld b, 0
+ ld hl, .Jumptable
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+; 912d
+
+.Jumptable: ; 912d
+ dw .Function9133
+ dw .Function9166
+ dw .Function9180
+; 9133
+
+.Function9133: ; 9133
+ ld hl, .Palette_914e
+ ld de, UnknBGPals
+ call LoadHLPaletteIntoDE
+ ld hl, .Palette_9156
+ ld de, UnknOBPals
+ ld bc, 2 palettes
+ ld a, BANK(UnknOBPals)
+ call FarCopyWRAM
+ call WipeAttrMap
+ ret
+; 914e
+
+.Palette_914e: ; 914e
+ RGB 19, 31, 19
+ RGB 18, 23, 31
+ RGB 11, 21, 28
+ RGB 04, 16, 24
+
+.Palette_9156: ; 9156
+ RGB 29, 29, 29
+ RGB 20, 19, 20
+ RGB 19, 06, 04
+ RGB 03, 04, 06
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 00, 00
+ RGB 03, 04, 06
+; 9166
+
+.Function9166: ; 9166
+ ld de, UnknBGPals
+ ld a, $38
+ call GetPredefPal
+ call LoadHLPaletteIntoDE
+
+ ld de, UnknOBPals
+ ld a, $39
+ call GetPredefPal
+ call LoadHLPaletteIntoDE
+ call WipeAttrMap
+ ret
+; 9180
+
+.Function9180: ; 9180
+ ld hl, PalPacket_9c36 + 1
+ call CopyFourPalettes
+ ld de, UnknOBPals
+ ld a, $3a
+ call GetPredefPal
+ call LoadHLPaletteIntoDE
+ call WipeAttrMap
+ ret
+; 9195
+
+_CGB11: ; 9195
+ ld hl, Palettes_b789
+ ld de, UnknBGPals
+ ld bc, 5 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ call ApplyPals
+ call WipeAttrMap
+ call ApplyAttrMap
+ ret
+; 91ad
+
+_CGB_Diploma: ; 91ad
+ ld hl, DiplomaPalettes
+ ld de, UnknBGPals
+ ld bc, 16 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+
+ ld hl, PalPacket_9cb6 + 1
+ call CopyFourPalettes
+ call WipeAttrMap
+ call ApplyAttrMap
+ ret
+; 91c8
+
+_CGB_MapPals: ; 91c8
+ call LoadMapPals
+ ld a, SCGB_MAPPALS
+ ld [SGBPredef], a
+ ret
+; 91d1
+
+_CGB_PartyMenu: ; 91d1
+ ld hl, PalPacket_9c56 + 1
+ call CopyFourPalettes
+ call InitPartyMenuBGPal0
+ call InitPartyMenuBGPal7
+ call InitPartyMenuOBPals
+ call ApplyAttrMap
+ ret
+; 91e4
+
+_CGB_Evolution: ; 91e4
+ ld de, UnknBGPals
+ ld a, c
+ and a
+ jr z, .pokemon
+ ld a, $1a
+ call GetPredefPal
+ call LoadHLPaletteIntoDE
+ jr .got_palette
+
+.pokemon
+ ld hl, PartyMon1DVs
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld a, [CurPartyMon]
+ call AddNTimes
+ ld c, l
+ ld b, h
+ ld a, [PlayerHPPal]
+ call GetPlayerOrMonPalettePointer
+ call LoadPalette_White_Col1_Col2_Black
+ ld hl, Palettes_979c
+ ld de, UnknOBPals palette 2
+ ld bc, 6 palettes
+ ld a, BANK(UnknOBPals)
+ call FarCopyWRAM
+
+.got_palette
+ call WipeAttrMap
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 9228
+
+_CGB0c: ; 9228
+ ld hl, Palettes_b6f1
+ ld de, UnknBGPals
+ ld bc, 5 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ ld hl, Palettes_b719
+ ld de, UnknOBPals
+ ld bc, 2 palettes
+ ld a, BANK(UnknOBPals)
+ call FarCopyWRAM
+ ld a, SCGB_DIPLOMA
+ ld [SGBPredef], a
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 9251
+
+_CGB0d: ; 9251
+ ld hl, PalPacket_9cb6 + 1
+ call CopyFourPalettes
+ call WipeAttrMap
+ call ApplyAttrMap
+ ret
+; 925e
+
+_CGB_UnownPuzzle: ; 925e
+ ld hl, PalPacket_9bc6 + 1
+ call CopyFourPalettes
+ ld de, UnknOBPals
+ ld a, $4c
+ call GetPredefPal
+ call LoadHLPaletteIntoDE
+ ld a, [rSVBK]
+ push af
+ ld a, BANK(UnknOBPals)
+ ld [rSVBK], a
+ ld hl, UnknOBPals
+ ld a, $1f
+ ld [hli], a
+ ld a, $0
+ ld [hl], a
+ pop af
+ ld [rSVBK], a
+ call WipeAttrMap
+ call ApplyAttrMap
+ ret
+; 9289
+
+_CGB_TrainerCard: ; 9289
+ ld de, UnknBGPals
+ xor a ; CHRIS
+ call GetTrainerPalettePointer
+ call LoadPalette_White_Col1_Col2_Black
+ ld a, FALKNER ; KRIS
+ call GetTrainerPalettePointer
+ call LoadPalette_White_Col1_Col2_Black
+ ld a, BUGSY
+ call GetTrainerPalettePointer
+ call LoadPalette_White_Col1_Col2_Black
+ ld a, WHITNEY
+ call GetTrainerPalettePointer
+ call LoadPalette_White_Col1_Col2_Black
+ ld a, MORTY
+ call GetTrainerPalettePointer
+ call LoadPalette_White_Col1_Col2_Black
+ ld a, CHUCK
+ call GetTrainerPalettePointer
+ call LoadPalette_White_Col1_Col2_Black
+ ld a, JASMINE
+ call GetTrainerPalettePointer
+ call LoadPalette_White_Col1_Col2_Black
+ ld a, PRYCE
+ call GetTrainerPalettePointer
+ call LoadPalette_White_Col1_Col2_Black
+ ld a, $24
+ call GetPredefPal
+ call LoadHLPaletteIntoDE
+
+ ; fill screen with opposite-gender palette for the card border
+ hlcoord 0, 0, AttrMap
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ ld a, [PlayerGender]
+ and a
+ ld a, $1 ; kris
+ jr z, .got_gender
+ ld a, $0 ; chris
+.got_gender
+ call ByteFill
+ ; fill trainer sprite area with same-gender palette
+ hlcoord 14, 1, AttrMap
+ lb bc, 7, 5
+ ld a, [PlayerGender]
+ and a
+ ld a, $0 ; chris
+ jr z, .got_gender2
+ ld a, $1 ; kris
+.got_gender2
+ call FillBoxCGB
+ ; top-right corner still uses the border's palette
+ hlcoord 18, 1, AttrMap
+ ld [hl], $1
+ hlcoord 2, 11, AttrMap
+ lb bc, 2, 4
+ ld a, $1 ; falkner
+ call FillBoxCGB
+ hlcoord 6, 11, AttrMap
+ lb bc, 2, 4
+ ld a, $2 ; bugsy
+ call FillBoxCGB
+ hlcoord 10, 11, AttrMap
+ lb bc, 2, 4
+ ld a, $3 ; whitney
+ call FillBoxCGB
+ hlcoord 14, 11, AttrMap
+ lb bc, 2, 4
+ ld a, $4 ; morty
+ call FillBoxCGB
+ hlcoord 2, 14, AttrMap
+ lb bc, 2, 4
+ ld a, $5 ; chuck
+ call FillBoxCGB
+ hlcoord 6, 14, AttrMap
+ lb bc, 2, 4
+ ld a, $6 ; jasmine
+ call FillBoxCGB
+ hlcoord 10, 14, AttrMap
+ lb bc, 2, 4
+ ld a, $7 ; pryce
+ call FillBoxCGB
+ ; clair uses kris's palette
+ ld a, [PlayerGender]
+ and a
+ push af
+ jr z, .got_gender3
+ hlcoord 14, 14, AttrMap
+ lb bc, 2, 4
+ ld a, $1
+ call FillBoxCGB
+.got_gender3
+ pop af
+ ld c, $0
+ jr nz, .got_gender4
+ inc c
+.got_gender4
+ ld a, c
+ hlcoord 18, 1, AttrMap
+ ld [hl], a
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 9373
+
+_CGB_MoveList: ; 9373
+ ld de, UnknBGPals
+ ld a, $10
+ call GetPredefPal
+ call LoadHLPaletteIntoDE
+ ld a, [PlayerHPPal]
+ ld l, a
+ ld h, 0
+ add hl, hl
+ add hl, hl
+ ld bc, HPBarPals
+ add hl, bc
+ call LoadPalette_White_Col1_Col2_Black
+ call WipeAttrMap
+ hlcoord 11, 1, AttrMap
+ lb bc, 2, 9
+ ld a, $1
+ call FillBoxCGB
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 93a6
+
+_CGB0f: ; 93a6
+ ld hl, PalPacket_9c46 + 1
+ call CopyFourPalettes
+ call WipeAttrMap
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 93ba
+
+_CGB_PokedexSearchOption: ; 93ba
+ ld de, UnknBGPals
+ ld a, $1d
+ call GetPredefPal
+ call LoadHLPaletteIntoDE
+ call WipeAttrMap
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 93d3
+
+_CGB_PackPals: ; 93d3
+; pack pals
+ ld a, [BattleType]
+ cp BATTLETYPE_TUTORIAL
+ jr z, .tutorial_male
+
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, .tutorial_male
+
+ ld hl, .KrisPackPals
+ jr .got_gender
+
+.tutorial_male
+ ld hl, .ChrisPackPals
+
+.got_gender
+ ld de, UnknBGPals
+ ld bc, 8 palettes ; 6 palettes?
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ call WipeAttrMap
+ hlcoord 0, 0, AttrMap
+ lb bc, 1, 10
+ ld a, $1
+ call FillBoxCGB
+ hlcoord 10, 0, AttrMap
+ lb bc, 1, 10
+ ld a, $2
+ call FillBoxCGB
+ hlcoord 7, 2, AttrMap
+ lb bc, 9, 1
+ ld a, $3
+ call FillBoxCGB
+ hlcoord 0, 7, AttrMap
+ lb bc, 3, 5
+ ld a, $4
+ call FillBoxCGB
+ hlcoord 0, 3, AttrMap
+ lb bc, 3, 5
+ ld a, $5
+ call FillBoxCGB
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 9439
+
+.ChrisPackPals: ; 9439
+INCLUDE "data/palettes/pack.pal"
+; 9469
+
+.KrisPackPals: ; 9469
+INCLUDE "data/palettes/pack_f.pal"
+; 9499
+
+_CGB_Pokepic: ; 9499
+ call _CGB_MapPals
+ ld de, SCREEN_WIDTH
+ hlcoord 0, 0, AttrMap
+ ld a, [wMenuBorderTopCoord]
+.loop
+ and a
+ jr z, .found_top
+ dec a
+ add hl, de
+ jr .loop
+
+.found_top
+ ld a, [wMenuBorderLeftCoord]
+ ld e, a
+ ld d, $0
+ add hl, de
+ ld a, [wMenuBorderTopCoord]
+ ld b, a
+ ld a, [wMenuBorderBottomCoord]
+ inc a
+ sub b
+ ld b, a
+ ld a, [wMenuBorderLeftCoord]
+ ld c, a
+ ld a, [wMenuBorderRightCoord]
+ sub c
+ inc a
+ ld c, a
+ ld a, $0
+ call FillBoxCGB
+ call ApplyAttrMap
+ ret
+; 94d0
+
+_CGB13: ; 94d0
+ ld hl, PalPacket_9ba6 + 1
+ call CopyFourPalettes
+ call WipeAttrMap
+ hlcoord 0, 4, AttrMap
+ lb bc, 10, SCREEN_WIDTH
+ ld a, $2
+ call FillBoxCGB
+ hlcoord 0, 6, AttrMap
+ lb bc, 6, SCREEN_WIDTH
+ ld a, $1
+ call FillBoxCGB
+ call ApplyAttrMap
+ call ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 94fa
+
+_CGB_GamefreakLogo: ; 94fa
+ ld de, UnknBGPals
+ ld a, $4e
+ call GetPredefPal
+ call LoadHLPaletteIntoDE
+ ld hl, .Palette
+ ld de, UnknOBPals
+ call LoadHLPaletteIntoDE
+ ld hl, .Palette
+ ld de, UnknOBPals palette 1
+ call LoadHLPaletteIntoDE
+ call WipeAttrMap
+ call ApplyAttrMap
+ call ApplyPals
+ ret
+; 9521
+
+.Palette: ; 9521
+ RGB 31, 31, 31
+ RGB 13, 11, 00
+ RGB 23, 12, 28
+ RGB 00, 00, 00
+; 9529
+
+_CGB_PlayerOrMonFrontpicPals: ; 9529
+ ld de, UnknBGPals
+ ld a, [CurPartySpecies]
+ ld bc, TempMonDVs
+ call GetPlayerOrMonPalettePointer
+ call LoadPalette_White_Col1_Col2_Black
+ call WipeAttrMap
+ call ApplyAttrMap
+ call ApplyPals
+ ret
+; 9542
+
+_CGB1e: ; 9542
+ ld de, UnknBGPals
+ ld a, [CurPartySpecies]
+ call GetMonPalettePointer_
+ call LoadPalette_White_Col1_Col2_Black
+ call WipeAttrMap
+ call ApplyAttrMap
+ ret
+; 9555
+
+_CGB_TradeTube: ; 9555
+ ld hl, PalPacket_9cc6 + 1
+ call CopyFourPalettes
+ ld hl, PartyMenuOBPals
+ ld de, UnknOBPals
+ ld bc, 1 palettes
+ ld a, BANK(UnknOBPals)
+ call FarCopyWRAM
+ ld de, UnknOBPals palette 7
+ ld a, $1c
+ call GetPredefPal
+ call LoadHLPaletteIntoDE
+ call WipeAttrMap
+ ret
+; 9578
+
+_CGB_TrainerOrMonFrontpicPals: ; 9578
+ ld de, UnknBGPals
+ ld a, [CurPartySpecies]
+ ld bc, TempMonDVs
+ call GetFrontpicPalettePointer
+ call LoadPalette_White_Col1_Col2_Black
+ call WipeAttrMap
+ call ApplyAttrMap
+ call ApplyPals
+ ret
+; 9591
+
+_CGB_MysteryGift: ; 9591
+ ld hl, .Palettes
+ ld de, UnknBGPals
+ ld bc, 2 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ call ApplyPals
+ call WipeAttrMap
+ hlcoord 3, 7, AttrMap
+ lb bc, 8, 14
+ ld a, $1
+ call FillBoxCGB
+ hlcoord 1, 5, AttrMap
+ lb bc, 1, 18
+ ld a, $1
+ call FillBoxCGB
+ hlcoord 1, 16, AttrMap
+ lb bc, 1, 18
+ ld a, $1
+ call FillBoxCGB
+ hlcoord 0, 0, AttrMap
+ lb bc, 17, 2
+ ld a, $1
+ call FillBoxCGB
+ hlcoord 18, 5, AttrMap
+ lb bc, 12, 1
+ ld a, $1
+ call FillBoxCGB
+ call ApplyAttrMap
+ ret
+; 95e0
+
+.Palettes: ; 95e0
+ RGB 31, 31, 31
+ RGB 16, 31, 14
+ RGB 05, 14, 21
+ RGB 05, 13, 10
+
+ RGB 31, 31, 31
+ RGB 11, 21, 25
+ RGB 05, 14, 21
+ RGB 00, 03, 19
+; 95f0
diff --git a/engine/clock_reset.asm b/engine/clock_reset.asm
index 4e6f588e9..c81271442 100755
--- a/engine/clock_reset.asm
+++ b/engine/clock_reset.asm
@@ -66,7 +66,7 @@ RestartClock: ; 20021 (8:4021)
.SetClock: ; 20051 (8:4051)
ld a, 1
ld [Buffer1], a ; which digit
- ld [Buffer2], a ; wd1eb (aliases: MovementType)
+ ld [Buffer2], a
ld a, 8
ld [Buffer3], a
call UpdateTime
@@ -151,7 +151,7 @@ RestartClock: ; 20021 (8:4021)
ret
.pressed_up
- ld a, [Buffer1] ; wd1ea (aliases: MagikarpLength)
+ ld a, [Buffer1]
call ResetClock_GetWraparoundTime
ld a, [de]
inc a
@@ -163,7 +163,7 @@ RestartClock: ; 20021 (8:4021)
jr .done_scroll
.pressed_down
- ld a, [Buffer1] ; wd1ea (aliases: MagikarpLength)
+ ld a, [Buffer1]
call ResetClock_GetWraparoundTime
ld a, [de]
dec a
@@ -176,14 +176,14 @@ RestartClock: ; 20021 (8:4021)
jr .done_scroll
.pressed_left
- ld hl, Buffer1 ; wd1ea (aliases: MagikarpLength)
+ ld hl, Buffer1
dec [hl]
jr nz, .done_scroll
ld [hl], $3
jr .done_scroll
.pressed_right
- ld hl, Buffer1 ; wd1ea (aliases: MagikarpLength)
+ ld hl, Buffer1
inc [hl]
ld a, [hl]
cp $4
@@ -202,21 +202,21 @@ RestartClock: ; 20021 (8:4021)
decoord 1, 8
ld a, [Buffer4]
ld b, a
- callba PrintDayOfWeek
+ farcall PrintDayOfWeek
ld a, [Buffer5]
ld b, a
ld a, [Buffer6]
ld c, a
decoord 11, 8
- callba PrintHoursMins
- ld a, [Buffer2] ; wd1eb (aliases: MovementType)
+ farcall PrintHoursMins
+ ld a, [Buffer2]
lb de, " ", " "
call .PlaceChars
- ld a, [Buffer1] ; wd1ea (aliases: MagikarpLength)
+ ld a, [Buffer1]
lb de, "▲", "▼"
call .PlaceChars
- ld a, [Buffer1] ; wd1ea (aliases: MagikarpLength)
- ld [Buffer2], a ; wd1eb (aliases: MovementType)
+ ld a, [Buffer1]
+ ld [Buffer2], a
ret
; 20160 (8:4160)
diff --git a/engine/color.asm b/engine/color.asm
index 3bc431d22..afa8fe2e7 100644
--- a/engine/color.asm
+++ b/engine/color.asm
@@ -1,5 +1,4 @@
-PALPACKET_LENGTH EQU $10
-INCLUDE "predef/sgb.asm"
+INCLUDE "engine/sgb_layouts.asm"
SHINY_ATK_BIT EQU 5
SHINY_DEF_VAL EQU 10
@@ -308,7 +307,7 @@ Function8bec:
ld a, [EnemySafeguardCount] ; value
and $3
call FillBoxCGB
- call LoadEDTile
+ call CopyTilemapAtOnce
ret
ApplyMonOrTrainerPals:
@@ -355,7 +354,7 @@ ApplyHPBarPals:
ld h, $0
add hl, hl
add hl, hl
- ld bc, Palettes_a8be
+ ld bc, HPBarPals
add hl, bc
ld bc, 4
ld a, $5
@@ -450,57 +449,9 @@ LoadMailPalettes:
ret
.MailPals:
- RGB 20, 31, 11
- RGB 31, 19, 00
- RGB 31, 10, 09
- RGB 00, 00, 00
-
- RGB 15, 20, 31
- RGB 30, 26, 00
- RGB 31, 12, 00
- RGB 00, 00, 00
+INCLUDE "data/palettes/mail.pal"
- RGB 24, 17, 31
- RGB 30, 26, 00
- RGB 08, 11, 31
- RGB 00, 00, 00
-
- RGB 31, 25, 17
- RGB 31, 18, 04
- RGB 28, 12, 05
- RGB 00, 00, 00
-
- RGB 19, 26, 31
- RGB 31, 05, 08
- RGB 31, 09, 31
- RGB 00, 00, 00
-
- RGB 31, 19, 28
- RGB 31, 21, 00
- RGB 12, 22, 00
- RGB 00, 00, 00
-
- RGB 19, 17, 23
- RGB 30, 26, 00
- RGB 31, 12, 00
- RGB 00, 00, 00
-
- RGB 07, 26, 31
- RGB 26, 26, 27
- RGB 31, 11, 11
- RGB 00, 00, 00
-
- RGB 21, 31, 21
- RGB 30, 26, 00
- RGB 31, 12, 00
- RGB 00, 00, 00
-
- RGB 07, 26, 31
- RGB 31, 31, 00
- RGB 00, 21, 00
- RGB 00, 00, 00
-
-INCLUDE "predef/cgb.asm"
+INCLUDE "engine/cgb_layouts.asm"
Function95f0:
; XXX
@@ -544,7 +495,7 @@ GetPredefPal:
add hl, hl
add hl, hl
add hl, hl
- ld bc, Palettes_9df6
+ ld bc, PredefPals
add hl, bc
ret
@@ -731,7 +682,7 @@ CGB_ApplyPartyMenuHPPals: ; 96f3 CGB layout $fc
ret
InitPartyMenuOBPals:
- ld hl, Palettes_b681
+ ld hl, PartyMenuOBPals
ld de, UnknOBPals
ld bc, 2 palettes
ld a, $5
@@ -740,7 +691,7 @@ InitPartyMenuOBPals:
GetBattlemonBackpicPalettePointer:
push de
- callba GetPartyMonDVs
+ farcall GetPartyMonDVs
ld c, l
ld b, h
ld a, [TempBattleMonSpecies]
@@ -750,7 +701,7 @@ GetBattlemonBackpicPalettePointer:
GetEnemyFrontpicPalettePointer:
push de
- callba GetEnemyMonDVs
+ farcall GetEnemyMonDVs
ld c, l
ld b, h
ld a, [TempEnemyMonSpecies]
@@ -805,42 +756,14 @@ Function9779: mobile
dec c
jr nz, .loop
ld hl, Palettes_979c
- ld de, UnknOBPals + 8 * 2
+ ld de, UnknOBPals palette 2
ld bc, 2 palettes
ld a, $5
call FarCopyWRAM
ret
Palettes_979c:
- RGB 31, 31, 31
- RGB 25, 25, 25
- RGB 13, 13, 13
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 07
- RGB 31, 16, 01
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 19, 24
- RGB 30, 10, 06
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 12, 25, 01
- RGB 05, 14, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 08, 12, 31
- RGB 01, 04, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 24, 18, 07
- RGB 20, 15, 03
- RGB 00, 00, 00
+INCLUDE "data/palettes/979c.pal"
Function97cc:
; XXX
@@ -1142,7 +1065,7 @@ SGBBorder_PushBGPals:
call DisableLCD
ld a, %11100100
ld [rBGP], a
- ld hl, Palettes_9df6
+ ld hl, PredefPals
ld de, VTiles1
ld bc, $1000
call CopyData
@@ -1351,540 +1274,43 @@ PalPacket_9dc6: db $79, $26, $08, $00, $0b, $39, $cd, $48, $0c, $d0, $34, $a5, $
PalPacket_9dd6: db $79, $1b, $08, $00, $0b, $ea, $ea, $ea, $ea, $ea, $a9, $01, $cd, $4f, $0c, $d0
PalPacket_9de6: db $79, $10, $08, $00, $0b, $4c, $20, $08, $ea, $ea, $ea, $ea, $ea, $60, $ea, $ea
-Palettes_9df6:
- RGB 31, 31, 31
- RGB 22, 25, 19
- RGB 16, 21, 30
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 27, 28, 31
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 24, 28, 19
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 24, 24, 24
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 21, 23, 31
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 24, 21, 27
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 24, 16
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 25, 30, 26
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 25, 31
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 20, 19
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 26, 19
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 27, 28, 27
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 24, 30, 23
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 29, 24, 29
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 26, 23, 29
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 25, 23, 20
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 29, 26, 18
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 21, 18
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 26, 25, 31
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 22, 21, 31
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 22, 25, 21
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 21, 21, 22
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 20, 20
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 26, 26, 26
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 21, 14, 09
- RGB 15, 20, 20
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 12, 28, 22
- RGB 15, 20, 20
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 07, 07, 07
- RGB 02, 03, 03
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 30, 22, 17
- RGB 16, 14, 19
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 18, 20, 27
- RGB 11, 15, 23
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 20, 10
- RGB 26, 10, 06
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 21, 25, 29
- RGB 14, 19, 25
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 27, 22, 24
- RGB 21, 15, 23
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 28, 20, 15
- RGB 21, 14, 09
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 20, 26, 16
- RGB 09, 20, 11
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 30, 22, 24
- RGB 28, 15, 21
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 28, 14
- RGB 26, 20, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 26, 21, 22
- RGB 15, 15, 18
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 23, 19, 13
- RGB 14, 12, 17
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 16, 18, 21
- RGB 10, 12, 18
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 22, 15, 16
- RGB 17, 02, 05
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 15, 20, 20
- RGB 05, 16, 16
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 23, 15, 19
- RGB 14, 04, 12
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 20, 17, 18
- RGB 18, 13, 11
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 23, 21, 16
- RGB 12, 12, 10
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 21, 25, 29
- RGB 30, 22, 24
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 26, 23, 16
- RGB 29, 14, 09
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 18, 18, 18
- RGB 10, 10, 10
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 30, 26, 15
- RGB 00, 23, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 30, 26, 15
- RGB 31, 23, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 30, 26, 15
- RGB 31, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 29, 26, 19
- RGB 27, 20, 14
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 24, 20, 10
- RGB 21, 00, 04
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 20, 10
- RGB 21, 00, 04
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 30, 26, 16
- RGB 16, 12, 09
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 15, 28, 26
- RGB 12, 22, 26
- RGB 03, 16, 14
-
- RGB 31, 31, 31
- RGB 15, 28, 26
- RGB 23, 24, 24
- RGB 00, 00, 00
-
- RGB 31, 31, 24
- RGB 07, 27, 19
- RGB 26, 20, 10
- RGB 19, 12, 08
-
- RGB 31, 31, 31
- RGB 31, 28, 14
- RGB 31, 13, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 16, 18, 21
- RGB 10, 12, 18
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 23, 21, 16
- RGB 12, 12, 10
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 14, 00
- RGB 07, 11, 15
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 26, 21, 22
- RGB 26, 10, 06
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 30, 27, 04
- RGB 24, 20, 11
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 13, 25
- RGB 24, 20, 11
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 16, 19, 29
- RGB 24, 20, 11
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 30, 22, 24
- RGB 18, 18, 18
- RGB 16, 10, 07
-
- RGB 31, 31, 31
- RGB 21, 25, 29
- RGB 18, 18, 18
- RGB 16, 10, 07
-
- RGB 31, 31, 31
- RGB 20, 26, 16
- RGB 18, 18, 18
- RGB 16, 10, 07
-
- RGB 31, 31, 31
- RGB 31, 28, 14
- RGB 18, 18, 18
- RGB 16, 10, 07
-
- RGB 31, 31, 31
- RGB 18, 18, 18
- RGB 26, 10, 06
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 30, 22, 24
- RGB 28, 15, 21
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 26, 20, 00
- RGB 16, 19, 29
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 16, 02, 30
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 16, 13, 04
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 28, 04, 02
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 18, 23, 31
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 24, 20, 11
- RGB 18, 13, 11
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 25, 30, 00
- RGB 25, 30, 00
-
- RGB 00, 00, 00
- RGB 08, 11, 11
- RGB 21, 21, 21
- RGB 31, 31, 31
+PredefPals:
+INCLUDE "data/palettes/predef.pal"
SGBBorderMap:
- db $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $14, $14, $15, $14, $16, $14, $17, $14, $17, $54, $16, $54, $15, $54, $14, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14
- db $01, $14, $02, $14, $03, $14, $03, $54, $02, $54, $01, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $24, $14, $25, $14, $26, $14, $07, $14, $07, $54, $26, $54, $25, $54, $24, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $54, $01, $14, $02, $14, $03, $14, $03, $54, $02, $54, $01, $54
- db $11, $14, $12, $14, $13, $14, $13, $54, $12, $54, $11, $54, $10, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $24, $14, $34, $14, $35, $14, $35, $54, $34, $54, $33, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $10, $14, $11, $14, $12, $14, $13, $14, $13, $54, $12, $54, $11, $54
- db $21, $14, $22, $14, $23, $14, $23, $54, $22, $54, $21, $54, $20, $54, $07, $14, $08, $14, $09, $14, $0a, $14, $0b, $14, $0c, $14, $0d, $14, $07, $14, $07, $14, $18, $14, $09, $14, $1a, $14, $1b, $14, $0d, $14, $0c, $14, $1c, $14, $29, $14, $07, $14, $20, $14, $21, $14, $22, $14, $23, $14, $23, $54, $22, $54, $21, $54
- db $31, $14, $32, $14, $07, $14, $07, $14, $32, $54, $36, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $38, $10, $27, $10, $32, $14, $07, $54, $07, $54, $32, $54, $31, $54
- db $05, $14, $06, $14, $07, $14, $07, $54, $06, $54, $1f, $10, $37, $10, $06, $14, $07, $14, $07, $54, $06, $54, $05, $54
- db $15, $14, $16, $14, $17, $14, $17, $54, $16, $54, $1f, $10, $37, $10, $16, $14, $17, $14, $17, $54, $16, $54, $15, $54
- db $25, $14, $26, $14, $07, $14, $07, $54, $26, $54, $1f, $10, $37, $10, $26, $14, $07, $14, $07, $54, $26, $54, $25, $54
- db $33, $14, $34, $14, $35, $14, $35, $54, $34, $54, $1f, $10, $37, $10, $34, $14, $35, $14, $35, $54, $34, $54, $33, $54
- db $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14
- db $02, $54, $01, $54, $07, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $07, $14, $01, $14, $02, $14
- db $12, $54, $11, $54, $10, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $10, $14, $11, $14, $12, $14
- db $22, $54, $21, $54, $20, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $20, $14, $21, $14, $22, $14
- db $32, $54, $31, $54, $30, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $30, $14, $31, $14, $32, $14
- db $06, $54, $05, $54, $04, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $04, $14, $05, $14, $06, $14
- db $16, $54, $15, $54, $14, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $14, $14, $15, $14, $16, $14
- db $26, $54, $25, $54, $24, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $24, $14, $25, $14, $26, $14
- db $34, $54, $33, $54, $07, $54, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $07, $14, $33, $14, $34, $14
- db $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $1f, $10, $37, $10, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14
- db $01, $14, $02, $14, $03, $14, $03, $54, $02, $54, $1f, $10, $37, $10, $02, $14, $03, $14, $03, $54, $02, $54, $01, $54
- db $11, $14, $12, $14, $13, $14, $13, $54, $12, $54, $1f, $10, $37, $10, $12, $14, $13, $14, $13, $54, $12, $54, $11, $54
- db $21, $14, $22, $14, $23, $14, $23, $54, $22, $54, $1f, $10, $37, $10, $22, $14, $23, $14, $23, $54, $22, $54, $21, $54
- db $31, $14, $32, $14, $07, $14, $07, $14, $32, $54, $1f, $10, $37, $10, $32, $14, $07, $54, $07, $54, $32, $54, $31, $54
- db $05, $14, $06, $14, $07, $14, $07, $54, $06, $54, $2e, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2f, $10, $2d, $10, $06, $14, $07, $14, $07, $54, $06, $54, $05, $54
- db $15, $14, $16, $14, $17, $14, $17, $54, $16, $54, $15, $54, $14, $54, $07, $14, $07, $14, $39, $14, $0e, $14, $09, $14, $0f, $14, $28, $14, $07, $14, $19, $14, $0c, $14, $1c, $14, $29, $14, $2a, $14, $2b, $14, $2c, $14, $39, $14, $07, $14, $07, $14, $14, $14, $15, $14, $16, $14, $17, $14, $17, $54, $16, $54, $15, $54
- db $25, $14, $26, $14, $07, $14, $07, $54, $26, $54, $25, $54, $24, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $01, $14, $02, $14, $03, $14, $03, $54, $02, $54, $01, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $24, $14, $25, $14, $26, $14, $07, $14, $07, $54, $26, $54, $25, $54
- db $33, $14, $34, $14, $35, $14, $35, $54, $34, $54, $24, $54, $07, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $10, $14, $11, $14, $12, $14, $13, $14, $13, $54, $12, $54, $11, $54, $10, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $24, $14, $34, $14, $35, $14, $35, $54, $34, $54, $33, $54
- db $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $20, $14, $21, $14, $22, $14, $23, $14, $23, $54, $22, $54, $21, $54, $20, $54, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14, $07, $14
+INCLUDE "data/sgb_border_map.asm"
SGBBorderPalettes:
- RGB 24, 06, 06
- RGB 24, 24, 26
- RGB 14, 15, 20
- RGB 04, 07, 10
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 18, 24, 18
- RGB 31, 26, 15
- RGB 26, 19, 10
- RGB 12, 07, 05
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 18, 06, 31
- RGB 31, 31, 29
- RGB 31, 12, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 12, 31, 06
- RGB 22, 26, 30
- RGB 16, 17, 21
- RGB 00, 03, 00
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
-
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
- RGB 31, 31, 25
+INCLUDE "data/palettes/sgb_border.pal"
SGBBorder:
-INCBIN "gfx/misc/sgb_border.2bpp"
+INCBIN "gfx/sgb/sgb_border.2bpp"
-Palettes_a8be:
+HPBarPals:
+; green
RGB 30, 26, 15
RGB 00, 23, 00
-
+; yellow
RGB 30, 26, 15
RGB 31, 21, 00
-
+; red
RGB 30, 26, 15
RGB 31, 00, 00
-Palettes_a8ca:
+ExpBarPalette:
+; blue
RGB 30, 26, 15
RGB 04, 17, 31
INCLUDE "gfx/pics/palette_pointers.asm"
-
-INCLUDE "gfx/trainers/palette_pointers.asm"
+INCLUDE "gfx/trainer_palettes.asm"
LoadMapPals:
- callba LoadSpecialMapPalette
+ farcall LoadSpecialMapPalette
jr c, .got_pals
; Which palette group is based on whether we're outside or inside
- ld a, [wPermission]
+ ld a, [wEnvironment]
and 7
ld e, a
ld d, 0
@@ -1948,10 +1374,10 @@ LoadMapPals:
call AddNTimes
ld de, UnknOBPals
ld bc, 8 palettes
- ld a, $5 ; BANK(UnknOBPals)
+ ld a, BANK(UnknOBPals)
call FarCopyWRAM
- ld a, [wPermission]
+ ld a, [wEnvironment]
cp TOWN
jr z, .outside
cp ROUTE
@@ -1967,13 +1393,13 @@ LoadMapPals:
add hl, de
ld a, [TimeOfDayPal]
and 3
- cp NITE
+ cp NITE_F
jr c, .morn_day
rept 4
inc hl
endr
.morn_day
- ld de, UnknBGPals + 6 palettes + 2
+ ld de, UnknBGPals palette PAL_BG_ROOF + 2
ld bc, 4
ld a, $5
call FarCopyWRAM
@@ -1983,10 +1409,10 @@ endr
dw .OutdoorColors ; unused
dw .OutdoorColors ; TOWN
dw .OutdoorColors ; ROUTE
- dw .IndoorColors ; INDOOR
+ dw .IndoorColors ; INDOOR
dw .DungeonColors ; CAVE
- dw .Perm5Colors ; PERM_5
- dw .IndoorColors ; GATE
+ dw .Perm5Colors ; ENVIRONMENT_5
+ dw .IndoorColors ; GATE
dw .DungeonColors ; DUNGEON
; Valid indices: $00 - $29
@@ -2027,324 +1453,34 @@ Palette_b311: ; b311 not mobile
RGB 00, 00, 00
TilesetBGPalette:
-INCLUDE "tilesets/bg.pal"
+INCLUDE "data/palettes/tileset_bg.pal"
MapObjectPals::
-INCLUDE "tilesets/ob.pal"
+INCLUDE "data/palettes/map_objects.pal"
RoofPals:
-INCLUDE "tilesets/roof.pal"
+INCLUDE "data/palettes/roofs.pal"
DiplomaPalettes:
- RGB 27, 31, 27
- RGB 21, 21, 21
- RGB 13, 13, 13
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 31, 07, 06
- RGB 20, 02, 03
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 10, 31, 09
- RGB 04, 14, 01
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 08, 12, 31
- RGB 01, 04, 31
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 31, 31, 07
- RGB 31, 16, 01
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 22, 16, 08
- RGB 13, 07, 01
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 15, 31, 31
- RGB 05, 17, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 11, 11, 19
- RGB 07, 07, 12
- RGB 00, 00, 00
-
-Palettes_b681:
- RGB 27, 31, 27
- RGB 31, 19, 10
- RGB 31, 07, 04
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 31, 19, 10
- RGB 10, 14, 20
- RGB 00, 00, 00
+INCLUDE "data/palettes/diploma.pal"
- RGB 27, 31, 27
- RGB 31, 19, 10
- RGB 31, 07, 04
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 31, 19, 10
- RGB 31, 07, 04
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 31, 19, 10
- RGB 31, 07, 04
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 31, 19, 10
- RGB 31, 07, 04
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 31, 19, 10
- RGB 31, 07, 04
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 31, 19, 10
- RGB 31, 07, 04
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 21, 21, 21
- RGB 13, 13, 13
- RGB 07, 07, 07
-
- RGB 31, 31, 31
- RGB 31, 31, 07
- RGB 31, 16, 01
- RGB 07, 07, 07
-
- RGB 31, 31, 31
- RGB 31, 19, 24
- RGB 30, 10, 06
- RGB 07, 07, 07
-
- RGB 31, 31, 31
- RGB 12, 25, 01
- RGB 05, 14, 00
- RGB 07, 07, 07
-
- RGB 31, 31, 31
- RGB 08, 12, 31
- RGB 01, 04, 31
- RGB 07, 07, 07
-
- RGB 31, 31, 31
- RGB 24, 18, 07
- RGB 20, 15, 03
- RGB 07, 07, 07
+PartyMenuOBPals:
+INCLUDE "data/palettes/party_menu.pal"
Palettes_b6f1:
- RGB 31, 31, 31
- RGB 18, 23, 31
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 22, 00, 31
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 00, 00
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 25, 22, 00
- RGB 15, 20, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 23, 26, 31
- RGB 18, 23, 31
- RGB 00, 00, 00
+INCLUDE "data/palettes/b6f1.pal"
Palettes_b719:
- RGB 31, 31, 31
- RGB 07, 06, 03
- RGB 07, 06, 03
- RGB 07, 06, 03
-
- RGB 31, 31, 31
- RGB 31, 31, 00
- RGB 26, 22, 00
- RGB 00, 00, 00
+INCLUDE "data/palettes/b719.pal"
MalePokegearPals:
- RGB 28, 31, 20
- RGB 21, 21, 21
- RGB 13, 13, 13
- RGB 00, 00, 00
-
- RGB 28, 31, 20
- RGB 00, 31, 00
- RGB 00, 00, 31
- RGB 00, 00, 00
-
- RGB 28, 31, 20
- RGB 00, 31, 00
- RGB 15, 07, 00
- RGB 00, 00, 00
-
- RGB 28, 31, 20
- RGB 31, 15, 00
- RGB 15, 07, 00
- RGB 00, 00, 00
-
- RGB 28, 31, 20
- RGB 00, 31, 00
- RGB 00, 00, 31
- RGB 31, 00, 00
-
- RGB 28, 31, 20
- RGB 00, 31, 00
- RGB 15, 07, 00
- RGB 31, 00, 00
+INCLUDE "data/palettes/pokegear.pal"
FemalePokegearPals:
- RGB 28, 31, 20
- RGB 21, 21, 21
- RGB 13, 13, 13
- RGB 00, 00, 00
-
- RGB 28, 31, 20
- RGB 00, 31, 00
- RGB 00, 00, 31
- RGB 00, 00, 00
-
- RGB 28, 31, 20
- RGB 00, 31, 00
- RGB 15, 07, 00
- RGB 00, 00, 00
-
- RGB 28, 31, 20
- RGB 10, 18, 31
- RGB 13, 06, 31
- RGB 00, 00, 00
-
- RGB 28, 31, 20
- RGB 00, 31, 00
- RGB 00, 00, 31
- RGB 31, 00, 00
-
- RGB 28, 31, 20
- RGB 00, 31, 00
- RGB 15, 07, 00
- RGB 31, 00, 00
+INCLUDE "data/palettes/pokegear_f.pal"
Palettes_b789:
- RGB 31, 31, 31
- RGB 30, 22, 24
- RGB 18, 18, 18
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 10, 11, 31
- RGB 18, 18, 18
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 12, 31, 11
- RGB 18, 18, 18
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 29, 26, 05
- RGB 18, 18, 18
- RGB 00, 00, 00
-
-Palettes_b7a9:
- RGB 31, 31, 31
- RGB 24, 25, 28
- RGB 24, 24, 09
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 30, 10, 06
- RGB 24, 24, 09
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 15, 31, 00
- RGB 24, 24, 09
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 15, 31
- RGB 24, 24, 09
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 15, 21, 31
- RGB 24, 24, 09
- RGB 00, 00, 00
-
- RGB 31, 31, 11
- RGB 31, 31, 06
- RGB 24, 24, 09
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 16, 19, 29
- RGB 25, 22, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 21, 21, 21
- RGB 13, 13, 13
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 30, 10, 06
- RGB 31, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 12, 25, 01
- RGB 05, 14, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 12, 25, 01
- RGB 30, 10, 06
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 06
- RGB 20, 15, 03
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 06
- RGB 15, 21, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 06
- RGB 20, 15, 03
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 24, 21
- RGB 31, 13, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
+INCLUDE "data/palettes/b789.pal"
+SlotMachinePals:
+INCLUDE "data/palettes/slot_machine.pal"
diff --git a/engine/credits.asm b/engine/credits.asm
index 1888ef27d..0fe7685a6 100644
--- a/engine/credits.asm
+++ b/engine/credits.asm
@@ -1,121 +1,7 @@
INCLUDE "includes.asm"
-SECTION "Credits", ROMX
-
- const_def
- const SATOSHI_TAJIRI
- const JUNICHI_MASUDA
- const TETSUYA_WATANABE
- const SHIGEKI_MORIMOTO
- const SOUSUKE_TAMADA
- const TAKENORI_OOTA
- const KEN_SUGIMORI
- const MOTOFUMI_FUJIWARA
- const ATSUKO_NISHIDA
- const MUNEO_SAITO
- const SATOSHI_OOTA
- const RENA_YOSHIKAWA
- const JUN_OKUTANI
- const HIRONOBU_YOSHIDA
- const ASUKA_IWASHITA
- const GO_ICHINOSE
- const MORIKAZU_AOKI
- const KOHJI_NISHINO
- const KENJI_MATSUSHIMA
- const TOSHINOBU_MATSUMIYA
- const SATORU_IWATA
- const NOBUHIRO_SEYA
- const KAZUHITO_SEKINE
- const TETSUJI_OOTA
- const NCL_SUPER_MARIO_CLUB
- const SARUGAKUCHO
- const AKITO_MORI
- const TAKAHIRO_HARADA
- const TOHRU_HASHIMOTO
- const NOBORU_MATSUMOTO
- const TAKEHIRO_IZUSHI
- const TAKASHI_KAWAGUCHI
- const TSUNEKAZU_ISHIHARA
- const HIROSHI_YAMAUCHI
- const KENJI_SAIKI
- const ATSUSHI_TADA
- const NAOKO_KAWAKAMI
- const HIROYUKI_ZINNAI
- const KUNIMI_KAWAMURA
- const HISASHI_SOGABE
- const KEITA_KAGAYA
- const YOSHINORI_MATSUDA
- const HITOMI_SATO
- const TORU_OSAWA
- const TAKAO_OHARA
- const YUICHIRO_ITO
- const TAKAO_SHIMIZU
- const PLANNING
- const KEITA_NAKAMURA
- const HIROTAKA_UEMURA
- const HIROAKI_TAMURA
- const NORIAKI_SAKAGUCHI
- const MIYUKI_SATO
- const GAKUZI_NOMOTO
- const AI_MASHIMA
- const MIKIHIRO_ISHIKAWA
- const HIDEYUKI_HASHIMOTO
- const SATOSHI_YAMATO
- const SHIGERU_MIYAMOTO
- const GAIL_TILDEN
- const NOB_OGASAWARA
- const SETH_MCMAHILL
- const HIROTO_ALEXANDER
- const TERESA_LILLYGREN
- const THOMAS_HERTZOG
- const ERIK_JOHNSON
- const HIRO_NAKAMURA
- const TERUKI_MURAKAWA
- const KAZUYOSHI_OSAWA
- const KIMIKO_NAKAMICHI
- const CREDIT_END
- const CREDIT_UNKNOWN
- const STAFF
- const DIRECTOR
- const CODIRECTOR
- const PROGRAMMERS
- const GRAPHICS_DIRECTOR
- const MONSTER_DESIGN
- const GRAPHICS_DESIGN
- const CREDIT_MUSIC
- const CREDIT_SOUND_EFFECTS
- const GAME_DESIGN
- const GAME_SCENARIO
- const TOOL_PROGRAMMING
- const PARAMETRIC_DESIGN
- const SCRIPT_DESIGN
- const MAP_DATA_DESIGN
- const MAP_DESIGN
- const PRODUCT_TESTING
- const SPECIAL_THANKS
- const PRODUCERS
- const EXECUTIVE_PRODUCER
- const POKEMON_ANIMATION
- const POKEDEX_TEXT
- const MOBILE_PRJ_LEADER
- const MOBILE_SYSTEM_AD
- const MOBILE_STADIUM_DIR
- const COORDINATION
- const COPYRIGHT
- const US_VERSION_STAFF
- const US_COORDINATION
- const TEXT_TRANSLATION
- const PAAD_TESTING
-
-const_value SET -7
- const CREDITS_THEEND
- const CREDITS_WAIT2
- const CREDITS_MUSIC
- const CREDITS_CLEAR
- const CREDITS_SCENE
- const CREDITS_WAIT
- const CREDITS_END
+SECTION "Credits", ROMX
Credits:: ; 109847
bit 6, b ; Hall Of Fame
@@ -196,7 +82,7 @@ Credits:: ; 109847
xor a
ld [hBGMapMode], a
ld [CreditsPos], a
- ld [wcd21], a
+ ld [CreditsUnusedCD21], a
ld [CreditsTimer], a
.execution_loop
@@ -491,7 +377,7 @@ ParseCredits: ; 1099aa
ld a, MUSIC_POST_CREDITS % $100
ld [MusicFadeID], a
ld a, MUSIC_POST_CREDITS / $100
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ret
.get
@@ -635,7 +521,6 @@ GetCreditsPalette: ; 109b2c
.UpdatePals:
; Update the first three colors in both palette buffers.
-
push af
push hl
add UnknBGPals % $100
@@ -657,72 +542,8 @@ GetCreditsPalette: ; 109b2c
call CopyBytes
ret
-
CreditsPalettes:
-
-; Pichu
- RGB 31, 00, 31
- RGB 31, 25, 00
- RGB 11, 14, 31
- RGB 07, 07, 07
-
- RGB 31, 05, 05
- RGB 11, 14, 31
- RGB 11, 14, 31
- RGB 31, 31, 31
-
- RGB 31, 05, 05
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 31, 31, 31
-
-; Smoochum
- RGB 31, 31, 31
- RGB 31, 27, 00
- RGB 26, 06, 31
- RGB 07, 07, 07
-
- RGB 03, 13, 31
- RGB 20, 00, 24
- RGB 26, 06, 31
- RGB 31, 31, 31
-
- RGB 03, 13, 31
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 31, 31, 31
-
-; Ditto
- RGB 31, 31, 31
- RGB 23, 12, 28
- RGB 31, 22, 00
- RGB 07, 07, 07
-
- RGB 03, 20, 00
- RGB 31, 22, 00
- RGB 31, 22, 00
- RGB 31, 31, 31
-
- RGB 03, 20, 00
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 31, 31, 31
-
-; Igglybuff
- RGB 31, 31, 31
- RGB 31, 10, 31
- RGB 31, 00, 09
- RGB 07, 07, 07
-
- RGB 31, 14, 00
- RGB 31, 00, 09
- RGB 31, 00, 09
- RGB 31, 31, 31
-
- RGB 31, 14, 00
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
+INCLUDE "data/palettes/credits.pal"
; 109bca
Credits_LoadBorderGFX: ; 109bca (42:5bca)
@@ -791,521 +612,6 @@ Credits_TheEnd: ; 109c11 (42:5c11)
; 109c24 (42:5c24)
-CreditsBorderGFX: INCBIN "gfx/credits/border.2bpp"
-
-CreditsMonsGFX:
-CreditsPichuGFX: INCBIN "gfx/credits/pichu.2bpp"
-CreditsSmoochumGFX: INCBIN "gfx/credits/smoochum.2bpp"
-CreditsDittoGFX: INCBIN "gfx/credits/ditto.2bpp"
-CreditsIgglybuffGFX: INCBIN "gfx/credits/igglybuff.2bpp"
-
-
-CreditsScript: ; 10acb4
-
-; Clear the banner.
- db CREDITS_CLEAR
-
-; Pokemon Crystal Version Staff
- db STAFF, 1
-
- db CREDITS_WAIT, 8
-
-; Play the credits music.
- db CREDITS_MUSIC
-
- db CREDITS_WAIT2, 10
-
- db CREDITS_WAIT, 1
-
-; Update the banner.
- db CREDITS_SCENE, 0 ; Pichu
-
- db DIRECTOR, 1
- db SATOSHI_TAJIRI, 2
-
- db CREDITS_WAIT, 12
-
- db CODIRECTOR, 1
- db JUNICHI_MASUDA, 2
-
- db CREDITS_WAIT, 12
-
- db PROGRAMMERS, 0
- db SOUSUKE_TAMADA, 1
- db HISASHI_SOGABE, 2
- db KEITA_KAGAYA, 3
- db YOSHINORI_MATSUDA, 4
-
- db CREDITS_WAIT, 12
-
- db PROGRAMMERS, 0
- db SHIGEKI_MORIMOTO, 1
- db TETSUYA_WATANABE, 2
- db TAKENORI_OOTA, 3
-
- db CREDITS_WAIT, 12
-
- db GRAPHICS_DIRECTOR, 1
- db KEN_SUGIMORI, 2
-
- db CREDITS_WAIT, 12
-
- db MONSTER_DESIGN, 0
- db KEN_SUGIMORI, 1
- db MOTOFUMI_FUJIWARA, 2
- db SHIGEKI_MORIMOTO, 3
- db HIRONOBU_YOSHIDA, 4
- db SATOSHI_OOTA, 5
-
- db CREDITS_WAIT, 12
-
- db MONSTER_DESIGN, 0
- db ATSUKO_NISHIDA, 1
- db MUNEO_SAITO, 2
- db RENA_YOSHIKAWA, 3
-
- db CREDITS_WAIT, 12
-
- db POKEMON_ANIMATION, 1
- db HIRONOBU_YOSHIDA, 2
- db JUN_OKUTANI, 3
-
- db CREDITS_WAIT, 12
-
-; Clear the banner.
- db CREDITS_CLEAR
-
- db CREDITS_WAIT, 1
-
-; Update the banner.
- db CREDITS_SCENE, 1 ; Smoochum
-
- db GRAPHICS_DESIGN, 0
- db HIRONOBU_YOSHIDA, 1
- db JUN_OKUTANI, 2
- db ASUKA_IWASHITA, 3
- db TETSUYA_WATANABE, 4
-
- db CREDITS_WAIT, 12
-
- db CREDIT_MUSIC, 0
- db JUNICHI_MASUDA, 1
- db MORIKAZU_AOKI, 2
- db GO_ICHINOSE, 3
-
- db CREDITS_WAIT, 12
-
- db CREDIT_SOUND_EFFECTS, 0
- db MORIKAZU_AOKI, 1
- db JUNICHI_MASUDA, 2
- db TETSUYA_WATANABE, 3
-
- db CREDITS_WAIT, 12
-
- db GAME_DESIGN, 0
- db JUNICHI_MASUDA, 1
- db SHIGEKI_MORIMOTO, 2
- db KOHJI_NISHINO, 3
-
- db CREDITS_WAIT, 12
-
- db GAME_DESIGN, 0
- db TETSUJI_OOTA, 1
- db HITOMI_SATO, 2
- db KENJI_MATSUSHIMA, 3
-
- db CREDITS_WAIT, 12
-
- db GAME_SCENARIO, 0
- db JUNICHI_MASUDA, 1
- db KOHJI_NISHINO, 2
- db TOSHINOBU_MATSUMIYA, 3
- db KENJI_MATSUSHIMA, 4
-
- db CREDITS_WAIT, 12
-
- db POKEDEX_TEXT, 1
- db TOSHINOBU_MATSUMIYA, 2
-
- db CREDITS_WAIT, 12
-
- db TOOL_PROGRAMMING, 1
- db SOUSUKE_TAMADA, 2
- db TAKENORI_OOTA, 3
-
- db CREDITS_WAIT, 12
-
- db PARAMETRIC_DESIGN, 1
- db KOHJI_NISHINO, 2
-
- db CREDITS_WAIT, 12
-
-; Clear the banner.
- db CREDITS_CLEAR
-
- db CREDITS_WAIT, 1
-
-; Update the banner.
- db CREDITS_SCENE, 2 ; Ditto
-
- db SCRIPT_DESIGN, 1
- db TETSUJI_OOTA, 2
- db NOBUHIRO_SEYA, 3
-
- db CREDITS_WAIT, 12
-
- db MAP_DATA_DESIGN, 1
- db TETSUJI_OOTA, 2
- db KAZUHITO_SEKINE, 3
-
- db CREDITS_WAIT, 12
-
- db MAP_DESIGN, 0
- db TETSUJI_OOTA, 1
- db KOHJI_NISHINO, 2
- db NOBUHIRO_SEYA, 3
-
- db CREDITS_WAIT, 12
-
- db COORDINATION, 1
- db HIROYUKI_ZINNAI, 2
-
- db CREDITS_WAIT, 12
-
- db PRODUCERS, 0
- db SATORU_IWATA, 1
- db SATOSHI_YAMATO, 2
- db SHIGERU_MIYAMOTO, 3
-
- db CREDITS_WAIT, 12
-
- db PRODUCERS, 1
- db TSUNEKAZU_ISHIHARA, 2
-
- db CREDITS_WAIT, 12
-
-; Clear the banner.
- db CREDITS_CLEAR
-
- db CREDITS_WAIT, 1
-
-; Update the banner.
- db CREDITS_SCENE, 3 ; Igglybuff
-
- db US_VERSION_STAFF, 2
-
- db CREDITS_WAIT, 9
-
- db US_COORDINATION, 1
- db GAIL_TILDEN, 2
- db HIRO_NAKAMURA, 3
-
- db CREDITS_WAIT, 12
-
- db US_COORDINATION, 1
- db JUNICHI_MASUDA, 2
- db SETH_MCMAHILL, 3
-
- db CREDITS_WAIT, 12
-
- db US_COORDINATION, 1
- db HIROTO_ALEXANDER, 2
- db TERESA_LILLYGREN, 3
-
- db CREDITS_WAIT, 12
-
- db TEXT_TRANSLATION, 1
- db NOB_OGASAWARA, 2
-
- db CREDITS_WAIT, 12
-
- db PROGRAMMERS, 1
- db TERUKI_MURAKAWA, 2
- db KAZUYOSHI_OSAWA, 3
-
- db CREDITS_WAIT, 12
-
- db PAAD_TESTING, 1
- db THOMAS_HERTZOG, 2
- db ERIK_JOHNSON, 3
-
- db CREDITS_WAIT, 12
-
- db PRODUCT_TESTING, 0
- db PLANNING, 1
-
- db CREDITS_WAIT, 12
-
- db PRODUCT_TESTING, 0
- db KEITA_NAKAMURA, 1
- db HIROTAKA_UEMURA, 2
- db HIROAKI_TAMURA, 3
- db NORIAKI_SAKAGUCHI, 4
-
- db CREDITS_WAIT, 12
-
- db PRODUCT_TESTING, 0
- db NCL_SUPER_MARIO_CLUB, 1
- db KENJI_SAIKI, 2
- db ATSUSHI_TADA, 3
- db MIYUKI_SATO, 4
-
- db CREDITS_WAIT, 12
-
- db SPECIAL_THANKS, 0
- db KIMIKO_NAKAMICHI, 1
- db AKITO_MORI, 2
-
- db CREDITS_WAIT, 12
-
- db SPECIAL_THANKS, 0
- db GAKUZI_NOMOTO, 1
- db AI_MASHIMA, 2
- db KUNIMI_KAWAMURA, 3
-
- db CREDITS_WAIT, 12
-
- db SPECIAL_THANKS, 0
- db MIKIHIRO_ISHIKAWA, 1
- db HIDEYUKI_HASHIMOTO, 2
-
- db CREDITS_WAIT, 12
-
- db EXECUTIVE_PRODUCER, 1
- db HIROSHI_YAMAUCHI, 2
-
- db CREDITS_WAIT, 12
-
- db COPYRIGHT, 1
-
- db CREDITS_WAIT, 9
-
-; Display "The End" graphic.
- db CREDITS_THEEND
-
- db CREDITS_WAIT, 20
-
- db CREDITS_END
-; 10ae13
-
-
-CreditsStrings:
- dw .SatoshiTajiri
- dw .JunichiMasuda
- dw .TetsuyaWatanabe
- dw .ShigekiMorimoto
- dw .SousukeTamada
- dw .TakenoriOota
- dw .KenSugimori
- dw .MotofumiFujiwara
- dw .AtsukoNishida
- dw .MuneoSaito
- dw .SatoshiOota
- dw .RenaYoshikawa
- dw .JunOkutani
- dw .HironobuYoshida
- dw .AsukaIwashita
- dw .GoIchinose
- dw .MorikazuAoki
- dw .KohjiNishino
- dw .KenjiMatsushima
- dw .ToshinobuMatsumiya
- dw .SatoruIwata
- dw .NobuhiroSeya
- dw .KazuhitoSekine
- dw .TetsujiOota
- dw .NclSuperMarioClub
- dw .Sarugakucho
- dw .AkitoMori
- dw .TakahiroHarada
- dw .TohruHashimoto
- dw .NoboruMatsumoto
- dw .TakehiroIzushi
- dw .TakashiKawaguchi
- dw .TsunekazuIshihara
- dw .HiroshiYamauchi
- dw .KenjiSaiki
- dw .AtsushiTada
- dw .NaokoKawakami
- dw .HiroyukiZinnai
- dw .KunimiKawamura
- dw .HisashiSogabe
- dw .KeitaKagaya
- dw .YoshinoriMatsuda
- dw .HitomiSato
- dw .ToruOsawa
- dw .TakaoOhara
- dw .YuichiroIto
- dw .TakaoShimizu
- dw .Planning
- dw .KeitaNakamura
- dw .HirotakaUemura
- dw .HiroakiTamura
- dw .NoriakiSakaguchi
- dw .MiyukiSato
- dw .GakuziNomoto
- dw .AiMashima
- dw .MikihiroIshikawa
- dw .HideyukiHashimoto
- dw .SatoshiYamato
- dw .ShigeruMiyamoto
- dw .GailTilden
- dw .NobOgasawara
- dw .SethMcMahill
- dw .HirotoAlexander
- dw .TeresaLillygren
- dw .ThomasHertzog
- dw .ErikJohnson
- dw .HiroNakamura
- dw .TerukiMurakawa
- dw .KazuyoshiOsawa
- dw .KimikoNakamichi
- dw .End
- dw .Unknown
- dw .Staff
- dw .Director
- dw .CoDirector
- dw .Programmers
- dw .GraphicsDirector
- dw .MonsterDesign
- dw .GraphicsDesign
- dw .Music
- dw .SoundEffects
- dw .GameDesign
- dw .GameScenario
- dw .ToolProgramming
- dw .ParametricDesign
- dw .ScriptDesign
- dw .MapDataDesign
- dw .MapDesign
- dw .ProductTesting
- dw .SpecialThanks
- dw .Producers
- dw .ExecutiveProducer
- dw .PokemonAnimation
- dw .PokedexText
- dw .MobilePrjLeader
- dw .MobileSystemAd
- dw .MobileStadiumDir
- dw .Coordination
- dw .Copyright
- dw .UsVersionStaff
- dw .UsCoordination
- dw .TextTranslation
- dw .PaadTesting
-
-.SatoshiTajiri: db " SATOSHI TAJIRI@" ; "たじり さとし@"
-.JunichiMasuda: db " JUNICHI MASUDA@" ; "ますだ じゅんいち@"
-.TetsuyaWatanabe: db " TETSUYA WATANABE@" ; "わたなべ てつや@"
-.ShigekiMorimoto: db " SHIGEKI MORIMOTO@" ; "もりもと しげき@"
-.SousukeTamada: db " SOUSUKE TAMADA@" ; "たまだ そうすけ@"
-.TakenoriOota: db " TAKENORI OOTA@" ; "おおた たけのり@"
-.KenSugimori: db " KEN SUGIMORI@" ; "すぎもり けん@"
-.MotofumiFujiwara: db " MOTOFUMI FUJIWARA@" ; "ふじわら もとふみ@"
-.AtsukoNishida: db " ATSUKO NISHIDA@" ; "にしだ あつこ@"
-.MuneoSaito: db " MUNEO SAITO@" ; "さいとう むねお@"
-.SatoshiOota: db " SATOSHI OOTA@" ; "おおた さとし@"
-.RenaYoshikawa: db " RENA YOSHIKAWA@" ; "よしかわ れな@"
-.JunOkutani: db " JUN OKUTANI@" ; "おくたに じゅん@"
-.HironobuYoshida: db " HIRONOBU YOSHIDA@" ; "よしだ ひろのぶ@"
-.AsukaIwashita: db " ASUKA IWASHITA@" ; "いわした あすか@"
-.GoIchinose: db " GO ICHINOSE@" ; "いちのせ ごう@"
-.MorikazuAoki: db " MORIKAZU AOKI@" ; "あおき もりかず@"
-.KohjiNishino: db " KOHJI NISHINO@" ; "にしの こうじ@"
-.KenjiMatsushima: db " KENJI MATSUSHIMA@" ; "まつしま けんじ@"
-.ToshinobuMatsumiya: db "TOSHINOBU MATSUMIYA@" ; "まつみや としのぶ@"
-.SatoruIwata: db " SATORU IWATA@" ; "いわた さとる@"
-.NobuhiroSeya: db " NOBUHIRO SEYA@" ; "せや のぶひろ@"
-.KazuhitoSekine: db " KAZUHITO SEKINE@" ; "せきね かずひと@"
-.TetsujiOota: db " TETSUJI OOTA@" ; "おおた てつじ@"
-.NclSuperMarioClub: db "NCL SUPER MARIO CLUB@" ; "スーパーマりォクラブ@"
-.Sarugakucho: db " SARUGAKUCHO@" ; "さるがくちょう@"
-.AkitoMori: db " AKITO MORI@" ; "もり あきと@"
-.TakahiroHarada: db " TAKAHIRO HARADA@" ; "はらだ たかひろ@"
-.TohruHashimoto: db " TOHRU HASHIMOTO@" ; "はしもと とおる@"
-.NoboruMatsumoto: db " NOBORU MATSUMOTO@" ; "まつもと のぼる@"
-.TakehiroIzushi: db " TAKEHIRO IZUSHI@" ; "いずし たけひろ@"
-.TakashiKawaguchi: db " TAKASHI KAWAGUCHI@" ; "かわぐち たかし@"
-.TsunekazuIshihara: db " TSUNEKAZU ISHIHARA@" ; "いしはら つねかず@"
-.HiroshiYamauchi: db " HIROSHI YAMAUCHI@" ; "やまうち ひろし@"
-.KenjiSaiki: db " KENJI SAIKI@" ; "さいき けんじ@"
-.AtsushiTada: db " ATSUSHI TADA@" ; "ただ あつし@"
-.NaokoKawakami: db " NAOKO KAWAKAMI@" ; "かわかみ なおこ@"
-.HiroyukiZinnai: db " HIROYUKI ZINNAI@" ; "じんない ひろゆき@"
-.KunimiKawamura: db " KUNIMI KAWAMURA@" ; "かわむら くにみ@"
-.HisashiSogabe: db " HISASHI SOGABE@" ; "そがべ ひさし@"
-.KeitaKagaya: db " KEITA KAGAYA@" ; "かがや けいた@"
-.YoshinoriMatsuda: db " YOSHINORI MATSUDA@" ; "まつだ よしのり@"
-.HitomiSato: db " HITOMI SATO@" ; "さとう ひとみ@"
-.ToruOsawa: db " TORU OSAWA@" ; "おおさわ とおる@"
-.TakaoOhara: db " TAKAO OHARA@" ; "おおはら たかお@"
-.YuichiroIto: db " YUICHIRO ITO@" ; "いとう ゆういちろう@"
-.TakaoShimizu: db " TAKAO SHIMIZU@" ; "しみず たかお@"
-.Planning: db " SPECIAL PRODUCTION"
- next " PLANNING" ; "きかくかいはつぶ@"
- next " & DEVELOPMENT DEPT.@"
-.KeitaNakamura: db " KEITA NAKAMURA@" ; "なかむら けいた@"
-.HirotakaUemura: db " HIROTAKA UEMURA@" ; "うえむら ひろたか@"
-.HiroakiTamura: db " HIROAKI TAMURA@" ; "たむら ひろあき@"
-.NoriakiSakaguchi: db " NORIAKI SAKAGUCHI@" ; "さかぐち のりあき@"
-.MiyukiSato: db " MIYUKI SATO@" ; "さとう みゆき@"
-.GakuziNomoto: db " GAKUZI NOMOTO@" ; "のもと がくじ@"
-.AiMashima: db " AI MASHIMA@" ; "ましま あい@"
-.MikihiroIshikawa: db " MIKIHIRO ISHIKAWA@" ; "いしかわ みきひろ@"
-.HideyukiHashimoto: db " HIDEYUKI HASHIMOTO@" ; "はしもと ひでゆき@"
-.SatoshiYamato: db " SATOSHI YAMATO@" ; "やまと さとし@"
-.ShigeruMiyamoto: db " SHIGERU MIYAMOTO@" ; "みやもと しげる@"
-.End: db " END@" ; "おしまい@"
-.Unknown: db " ????????@" ; "????????@"
-.GailTilden: db " GAIL TILDEN@"
-.NobOgasawara: db " NOB OGASAWARA@"
-.SethMcMahill: db " SETH McMAHILL@"
-.HirotoAlexander: db " HIROTO ALEXANDER@"
-.TeresaLillygren: db " TERESA LILLYGREN@"
-.ThomasHertzog: db " THOMAS HERTZOG@"
-.ErikJohnson: db " ERIK JOHNSON@"
-.HiroNakamura: db " HIRO NAKAMURA@"
-.TerukiMurakawa: db " TERUKI MURAKAWA@"
-.KazuyoshiOsawa: db " KAZUYOSHI OSAWA@"
-.KimikoNakamichi: db " KIMIKO NAKAMICHI@"
-.Staff: db " #MON" ; "ポケットモンスター"
- next " CRYSTAL VERSION" ; " クりスタル バージョン"
- next " STAFF@" ; " スタッフ@"
-.Director: db " DIRECTOR@" ; "エグゼクティブ ディレクター@"
-.CoDirector: db " CO-DIRECTOR@" ; "ディレクター@"
-.Programmers: db " PROGRAMMERS@" ; "プログラム@"
-.GraphicsDirector: db " GRAPHICS DIRECTOR@" ; "グラフィック ディレクター@"
-.MonsterDesign: db " MONSTER DESIGN@" ; "# デザイン@"
-.GraphicsDesign: db " GRAPHICS DESIGN@" ; "グラフィック デザイン@"
-.Music: db " MUSIC@" ; "おんがく@"
-.SoundEffects: db " SOUND EFFECTS@" ; "サウンド エフ→クト@"
-.GameDesign: db " GAME DESIGN@" ; "ゲームデザイン@"
-.GameScenario: db " GAME SCENARIO@" ; "シナりォ@"
-.ToolProgramming: db " TOOL PROGRAMMING@" ; "ツール プログラム@"
-.ParametricDesign: db " PARAMETRIC DESIGN@" ; "パラメーター せってい@"
-.ScriptDesign: db " SCRIPT DESIGN@" ; "スクりプト せってい@"
-.MapDataDesign: db " MAP DATA DESIGN@" ; "マップデータ せってい@"
-.MapDesign: db " MAP DESIGN@" ; "マップ デザイン@"
-.ProductTesting: db " PRODUCT TESTING@" ; "デバッグプレイ@"
-.SpecialThanks: db " SPECIAL THANKS@" ; "スぺシャルサンクス@"
-.Producers: db " PRODUCERS@" ; "プロデューサー@"
-.ExecutiveProducer: db " EXECUTIVE PRODUCER@" ; "エグゼクティブ プロデューサー@"
-.PokemonAnimation: db " #MON ANIMATION@" ; "# アニメーション@"
-.PokedexText: db " #DEX TEXT@" ; "ずかん テキスト@"
-.MobilePrjLeader: db " MOBILE PRJ. LEADER@" ; "モバイルプロジ→クト りーダー@"
-.MobileSystemAd: db " MOBILE SYSTEM AD.@" ; "モバイル システムアドバイザー@"
-.MobileStadiumDir: db "MOBILE STADIUM DIR.@" ; "モバイルスタジアム ディレクター@"
-.Coordination: db " COORDINATION@" ; "コーディネーター@"
-.UsVersionStaff: db " US VERSION STAFF@"
-.UsCoordination: db " US COORDINATION@"
-.TextTranslation: db " TEXT TRANSLATION@"
-.PaadTesting: db " PAAD TESTING@"
-
-.Copyright:
- ; (C) 1 9 9 5 - 2 0 0 1 N i n t e n d o
- db $60,$61,$62,$63,$64,$65,$66, $67, $68, $69, $6a, $6b, $6c
- ; (C) 1 9 9 5 - 2 0 0 1 C r e a t u r e s i n c .
- next $60,$61,$62,$63,$64,$65,$66, $6d, $6e, $6f, $70, $71, $72, $7a, $7b, $7c
- ; (C) 1 9 9 5 - 2 0 0 1 G A M E F R E A K i n c .
- next $60,$61,$62,$63,$64,$65,$66, $73, $74, $75, $76, $77, $78, $79, $7a, $7b, $7c
- db "@"
+INCLUDE "gfx/credits.asm"
+INCLUDE "data/credits_script.asm"
+INCLUDE "data/credits_strings.asm"
diff --git a/engine/crystal_colors.asm b/engine/crystal_colors.asm
new file mode 100755
index 000000000..43841a201
--- /dev/null
+++ b/engine/crystal_colors.asm
@@ -0,0 +1,336 @@
+GetMysteryGift_MobileAdapterLayout: ; 4930f (mobile)
+ ld a, b
+ cp SCGB_RAM
+ jr nz, .not_ram
+ ld a, [SGBPredef]
+.not_ram
+ push af
+ farcall ResetBGPals
+ pop af
+ ld l, a
+ ld h, 0
+ add hl, hl
+ ld de, .dw
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, .done
+ push de
+ jp hl
+.done
+ ret
+; 49330 (12:5330)
+
+.dw ; 49330
+
+ dw MG_Mobile_Layout00
+ dw MG_Mobile_Layout01
+ dw MG_Mobile_Layout02
+; 49336
+
+MG_Mobile_Layout_FillBox: ; 49336
+.row
+ push bc
+ push hl
+.col
+ ld [hli], a
+ dec c
+ jr nz, .col
+ pop hl
+ ld bc, SCREEN_WIDTH
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .row
+ ret
+; 49346
+
+MG_Mobile_Layout_WipeAttrMap: ; 49346 (12:5346)
+ hlcoord 0, 0, AttrMap
+ ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
+ xor a
+ call ByteFill
+ ret
+
+MG_Mobile_Layout_LoadPals: ; 49351 (12:5351)
+ ld de, UnknBGPals
+ ld hl, Palette_493e1
+ ld bc, 5 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ ld de, UnknBGPals palette PAL_BG_TEXT
+ ld hl, Palette_TextBG7
+ ld bc, 1 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ ret
+
+MG_Mobile_Layout00: ; 4936e (12:536e)
+ call MG_Mobile_Layout_LoadPals
+ call MG_Mobile_Layout_WipeAttrMap
+ call MG_Mobile_Layout_CreatePalBoxes
+ farcall ApplyAttrMap
+ farcall ApplyPals
+ ret
+
+MG_Mobile_Layout_CreatePalBoxes: ; 49384 (12:5384)
+ hlcoord 0, 0, AttrMap
+ lb bc, 4, 1
+ ld a, $1
+ call MG_Mobile_Layout_FillBox
+ lb bc, 2, 1
+ ld a, $2
+ call MG_Mobile_Layout_FillBox
+ lb bc, 6, 1
+ ld a, $3
+ call MG_Mobile_Layout_FillBox
+ hlcoord 1, 0, AttrMap
+ ld a, $1
+ lb bc, 3, 18
+ call MG_Mobile_Layout_FillBox
+ lb bc, 2, 18
+ ld a, $2
+ call MG_Mobile_Layout_FillBox
+ lb bc, 12, 18
+ ld a, $3
+ call MG_Mobile_Layout_FillBox
+ hlcoord 19, 0, AttrMap
+ lb bc, 4, 1
+ ld a, $1
+ call MG_Mobile_Layout_FillBox
+ lb bc, 2, 1
+ ld a, $2
+ call MG_Mobile_Layout_FillBox
+ lb bc, 6, 1
+ ld a, $3
+ call MG_Mobile_Layout_FillBox
+ hlcoord 0, 12, AttrMap
+ ld bc, 6 * SCREEN_WIDTH
+ ld a, $7
+ call ByteFill
+ ret
+; 493e1 (12:53e1)
+
+Palette_493e1: ; 493e1
+INCLUDE "data/palettes/mg_mobile.pal"
+; 49409
+
+LoadOW_BGPal7:: ; 49409
+ ld hl, Palette_TextBG7
+ ld de, UnknBGPals palette PAL_BG_TEXT
+ ld bc, 1 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ ret
+; 49418
+
+Palette_TextBG7: ; 49418
+ RGB 31, 31, 31
+ RGB 08, 19, 28
+ RGB 05, 05, 16
+ RGB 00, 00, 00
+; 49420
+
+Function49420:: ; 49420 (12:5420)
+ ld hl, MansionPalette4
+ ld de, UnknBGPals palette PAL_BG_ROOF
+ ld bc, 1 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ ret
+; 4942f (12:542f)
+
+MG_Mobile_Layout01: ; 4942f
+ call MG_Mobile_Layout_LoadPals
+ ld de, UnknBGPals palette PAL_BG_TEXT
+ ld hl, Palette_49478
+ ld bc, 1 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ call MG_Mobile_Layout_WipeAttrMap
+ hlcoord 0, 0, AttrMap
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ xor a
+ call ByteFill
+ hlcoord 0, 14, AttrMap
+ ld bc, 4 * SCREEN_WIDTH
+ ld a, $7
+ call ByteFill
+ ld a, [wd002]
+ bit 6, a
+ jr z, .asm_49464
+ call Function49480
+ jr .asm_49467
+
+.asm_49464
+ call Function49496
+
+.asm_49467
+ farcall ApplyAttrMap
+ farcall ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 49478
+
+Palette_49478: ; 49478
+ RGB 31, 31, 31
+ RGB 26, 31, 00
+ RGB 20, 16, 03
+ RGB 00, 00, 00
+; 49480
+
+Function49480: ; 49480
+ hlcoord 0, 0, AttrMap
+ lb bc, 4, SCREEN_WIDTH
+ ld a, $7
+ call MG_Mobile_Layout_FillBox
+ hlcoord 0, 2, AttrMap
+ ld a, $4
+ ld [hl], a
+ hlcoord 19, 2, AttrMap
+ ld [hl], a
+ ret
+; 49496
+
+Function49496: ; 49496
+ hlcoord 0, 0, AttrMap
+ lb bc, 2, SCREEN_WIDTH
+ ld a, $7
+ call MG_Mobile_Layout_FillBox
+ hlcoord 0, 1, AttrMap
+ ld a, $4
+ ld [hl], a
+ hlcoord 19, 1, AttrMap
+ ld [hl], a
+ ret
+; 494ac
+
+INCLUDE "tilesets/special_palettes.asm"
+
+MG_Mobile_Layout02: ; 49706
+ ld hl, Palette_49732
+ ld de, UnknBGPals
+ ld bc, 1 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ farcall ApplyPals
+ call MG_Mobile_Layout_WipeAttrMap
+ farcall ApplyAttrMap
+ ld hl, Palette_4973a
+ ld de, UnknOBPals
+ ld bc, 1 palettes
+ ld a, BANK(UnknOBPals)
+ call FarCopyWRAM
+ ret
+; 49732
+
+Palette_49732: ; 49732
+ RGB 31, 31, 31
+ RGB 23, 16, 07
+ RGB 23, 07, 07
+ RGB 03, 07, 20
+; 4973a
+
+Palette_4973a: ; 4973a
+ RGB 00, 00, 00
+ RGB 07, 05, 31
+ RGB 14, 18, 31
+ RGB 31, 31, 31
+; 49742
+
+Function49742: ; 49742
+ ld hl, Palette_49757
+ ld de, UnknBGPals
+ ld bc, $40
+ ld a, $5
+ call FarCopyWRAM
+ farcall ApplyPals
+ ret
+; 49757
+
+Palette_49757: ; 49757
+INCLUDE "data/palettes/49757.pal"
+; 49797
+
+_InitMG_Mobile_LinkTradePalMap: ; 49797
+ hlcoord 0, 0, AttrMap
+ lb bc, 16, 2
+ ld a, $4
+ call MG_Mobile_Layout_FillBox
+ ld a, $3
+ ldcoord_a 0, 1, AttrMap
+ ldcoord_a 0, 14, AttrMap
+ hlcoord 2, 0, AttrMap
+ lb bc, 8, 18
+ ld a, $5
+ call MG_Mobile_Layout_FillBox
+ hlcoord 2, 8, AttrMap
+ lb bc, 8, 18
+ ld a, $6
+ call MG_Mobile_Layout_FillBox
+ hlcoord 0, 16, AttrMap
+ lb bc, 2, SCREEN_WIDTH
+ ld a, $4
+ call MG_Mobile_Layout_FillBox
+ ld a, $3
+ lb bc, 6, 1
+ hlcoord 6, 1, AttrMap
+ call MG_Mobile_Layout_FillBox
+ ld a, $3
+ lb bc, 6, 1
+ hlcoord 17, 1, AttrMap
+ call MG_Mobile_Layout_FillBox
+ ld a, $3
+ lb bc, 6, 1
+ hlcoord 6, 9, AttrMap
+ call MG_Mobile_Layout_FillBox
+ ld a, $3
+ lb bc, 6, 1
+ hlcoord 17, 9, AttrMap
+ call MG_Mobile_Layout_FillBox
+ ld a, $2
+ hlcoord 2, 16, AttrMap
+ ld [hli], a
+ ld a, $7
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ ld a, $2
+ ld [hl], a
+ hlcoord 2, 17, AttrMap
+ ld a, $3
+ ld bc, 6
+ call ByteFill
+ ret
+; 49811
+
+LoadTradeRoomBGPals: ; 49811
+ ld hl, TradeRoomPalette
+ ld de, UnknBGPals palette PAL_BG_GREEN
+ ld bc, 6 palettes
+ ld a, BANK(UnknBGPals)
+ call FarCopyWRAM
+ farcall ApplyPals
+ ret
+; 49826
+
+TradeRoomPalette: ; 49826
+INCLUDE "data/palettes/trade_room.pal"
+; 49856
+
+InitMG_Mobile_LinkTradePalMap: ; 49856
+ call _InitMG_Mobile_LinkTradePalMap
+ ret
+; 4985a
+
+Unknown_4985a: ; unreferenced
+ db $ab, $03, $57, $24, $ac, $0e, $13, $32
+ db $be, $30, $5b, $4c, $47, $60, $ed, $f2
+ db $ab, $03, $55, $26, $aa, $0a, $13, $3a
+ db $be, $28, $33, $24, $6e, $71, $df, $b0
+ db $a8, $00, $e5, $e0, $9a, $fc, $f4, $2c
+ db $fe, $4c, $a3, $5e, $c6, $3a, $ab, $4d
+ db $a8, $00, $b5, $b0, $de, $e8, $fc, $1c
+ db $ba, $66, $f7, $0e, $ba, $5e, $43, $bd
diff --git a/engine/crystal_intro.asm b/engine/crystal_intro.asm
index fbb2dbc97..52b07331e 100755
--- a/engine/crystal_intro.asm
+++ b/engine/crystal_intro.asm
@@ -18,12 +18,12 @@ Copyright_GFPresents: ; e4579
call SetPalettes
ld c, 10
call DelayFrames
- callab Copyright
+ callfar Copyright
call WaitBGMap
ld c, 100
call DelayFrames
call ClearTileMap
- callba GBCOnlyScreen
+ farcall GBCOnlyScreen
call .GetGFLogoGFX
.joy_loop
call JoyTextDelay
@@ -34,7 +34,7 @@ Copyright_GFPresents: ; e4579
bit 7, a
jr nz, .finish
call PlaceGameFreakPresents
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
call DelayFrame
jr .joy_loop
@@ -78,7 +78,7 @@ Copyright_GFPresents: ; e4579
pop af
ld [rSVBK], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
depixel 10, 11, 4, 0
ld a, SPRITE_ANIM_INDEX_GAMEFREAK_LOGO
call _InitSpriteAnimStruct
@@ -107,7 +107,7 @@ Copyright_GFPresents: ; e4579
; e465e
.StopGamefreakAnim: ; e465e
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call ClearTileMap
call ClearSprites
ld c, 16
@@ -183,7 +183,7 @@ PlaceGameFreakPresents_2: ; e46ba
.place_presents
ld [hl], 0
ld hl, .presents
- decoord 7,11
+ decoord 7, 11
ld bc, .end - .presents
call CopyBytes
call PlaceGameFreakPresents_AdvanceIndex
@@ -253,7 +253,7 @@ GameFreakLogoScene2: ; e470d (39:470d)
add $20
.asm_e4723
ld e, a
- callba BattleAnim_Sine_e
+ farcall BattleAnim_Sine_e
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], e
@@ -341,29 +341,7 @@ GameFreakLogoScene5: ; e47ab (39:47ab)
; e47ac (39:47ac)
GameFreakLogoPalettes: ; e47ac
-; Ditto's color as it turns into the Game Freak logo.
-; Fade from pink to orange.
-; One color per step.
- RGB 23, 12, 28
- RGB 23, 12, 27
- RGB 23, 13, 26
- RGB 23, 13, 24
-
- RGB 24, 14, 22
- RGB 24, 14, 20
- RGB 24, 15, 18
- RGB 24, 15, 16
-
- RGB 25, 16, 14
- RGB 25, 16, 12
- RGB 25, 17, 10
- RGB 25, 17, 08
-
- RGB 26, 18, 06
- RGB 26, 18, 04
- RGB 26, 19, 02
- RGB 26, 19, 00
-
+INCLUDE "data/palettes/crystal_intro/gamefreak_logo.pal"
; e47cc
GameFreakLogo: ; e47cc
@@ -390,7 +368,7 @@ CrystalIntro: ; e48ac
bit 7, a
jr nz, .done
call IntroSceneJumper
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
call DelayFrame
jp .loop
@@ -506,11 +484,11 @@ IntroScene1: ; e495b (39:495b)
ld [rSVBK], a
ld hl, Palette_365ad
ld de, UnknBGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
ld hl, Palette_365ad
ld de, BGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
pop af
ld [rSVBK], a
@@ -521,7 +499,7 @@ IntroScene1: ; e495b (39:495b)
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
@@ -579,11 +557,11 @@ IntroScene3: ; e49fd (39:49fd)
ld [rSVBK], a
ld hl, Palette_e5edd
ld de, UnknBGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
ld hl, Palette_e5edd
ld de, BGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
pop af
ld [rSVBK], a
@@ -645,11 +623,11 @@ IntroScene5: ; e4a7a (39:4a7a)
ld [rSVBK], a
ld hl, Palette_365ad
ld de, UnknBGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
ld hl, Palette_365ad
ld de, BGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
pop af
ld [rSVBK], a
@@ -660,7 +638,7 @@ IntroScene5: ; e4a7a (39:4a7a)
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
@@ -752,12 +730,12 @@ IntroScene7: ; e4b3f (39:4b3f)
ld hl, Palette_e5edd
ld de, UnknBGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
ld hl, Palette_e5edd
ld de, BGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
pop af
@@ -771,9 +749,9 @@ IntroScene7: ; e4b3f (39:4b3f)
ld a, $90
ld [hWY], a
call Intro_ResetLYOverrides
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
depixel 13, 27, 4, 0
- ld a, SPRITE_ANIM_INDEX_26
+ ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE
call _InitSpriteAnimStruct
ld a, $f0
ld [wGlobalAnimXOffset], a
@@ -809,7 +787,7 @@ IntroScene8: ; e4bd3 (39:4bd3)
.finish
ld de, SFX_INTRO_SUICUNE_2
call PlaySFX
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
call NextIntroScene
ret
@@ -866,7 +844,7 @@ IntroScene10: ; e4c4f (39:4c4f)
.pichu
depixel 21, 16, 1, 0
- ld a, SPRITE_ANIM_INDEX_27
+ ld a, SPRITE_ANIM_INDEX_INTRO_PICHU
call _InitSpriteAnimStruct
ld de, SFX_INTRO_PICHU
call PlaySFX
@@ -874,7 +852,7 @@ IntroScene10: ; e4c4f (39:4c4f)
.wooper
depixel 22, 6
- ld a, SPRITE_ANIM_INDEX_28
+ ld a, SPRITE_ANIM_INDEX_INTRO_WOOPER
call _InitSpriteAnimStruct
ld de, SFX_INTRO_PICHU
call PlaySFX
@@ -910,11 +888,11 @@ IntroScene11: ; e4c86 (39:4c86)
ld [rSVBK], a
ld hl, Palette_365ad
ld de, UnknBGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
ld hl, Palette_365ad
ld de, BGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
pop af
ld [rSVBK], a
@@ -925,7 +903,7 @@ IntroScene11: ; e4c86 (39:4c86)
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
@@ -1037,11 +1015,11 @@ IntroScene13: ; e4d6d (39:4d6d)
ld [rSVBK], a
ld hl, Palette_e5edd
ld de, UnknBGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
ld hl, Palette_e5edd
ld de, BGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
pop af
ld [rSVBK], a
@@ -1052,9 +1030,9 @@ IntroScene13: ; e4d6d (39:4d6d)
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
depixel 13, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_26
+ ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE
call _InitSpriteAnimStruct
ld de, MUSIC_CRYSTAL_OPENING
call PlayMusic
@@ -1099,7 +1077,7 @@ IntroScene14: ; e4dfa (39:4dfa)
ret
.asm_e4e2c
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
ret
.asm_e4e33
@@ -1146,11 +1124,11 @@ IntroScene15: ; e4e40 (39:4e40)
ld [rSVBK], a
ld hl, Palette_e77dd
ld de, UnknBGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
ld hl, Palette_e77dd
ld de, BGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
pop af
ld [rSVBK], a
@@ -1162,13 +1140,13 @@ IntroScene15: ; e4e40 (39:4e40)
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call Intro_SetCGBPalUpdate
depixel 8, 5
- ld a, SPRITE_ANIM_INDEX_2A
+ ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN_F
call _InitSpriteAnimStruct
depixel 12, 0
- ld a, SPRITE_ANIM_INDEX_2B
+ ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY
call _InitSpriteAnimStruct
xor a
ld [wIntroSceneFrameCounter], a
@@ -1220,11 +1198,11 @@ IntroScene17: ; e4ef5 (39:4ef5)
ld [rSVBK], a
ld hl, Palette_e6d6d
ld de, UnknBGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
ld hl, Palette_e6d6d
ld de, BGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
pop af
ld [rSVBK], a
@@ -1235,7 +1213,7 @@ IntroScene17: ; e4ef5 (39:4ef5)
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
@@ -1294,11 +1272,11 @@ IntroScene19: ; e4f7e (39:4f7e)
ld [rSVBK], a
ld hl, Palette_e77dd
ld de, UnknBGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
ld hl, Palette_e77dd
ld de, BGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
pop af
ld [rSVBK], a
@@ -1310,14 +1288,14 @@ IntroScene19: ; e4f7e (39:4f7e)
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld hl, wSpriteAnimDict
xor a
ld [hli], a
ld [hl], $7f
call Intro_SetCGBPalUpdate
depixel 12, 0
- ld a, SPRITE_ANIM_INDEX_2B
+ ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY
call _InitSpriteAnimStruct
xor a
ld [wIntroSceneFrameCounter], a
@@ -1392,7 +1370,7 @@ IntroScene22: ; e5072 (39:5072)
jr nc, .done
ret
.done
- callba DeinitializeAllSprites
+ farcall DeinitializeAllSprites
call NextIntroScene
ret
@@ -1464,11 +1442,11 @@ IntroScene26: ; e50bb (39:50bb)
ld [rSVBK], a
ld hl, Palette_e679d
ld de, UnknBGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
ld hl, Palette_e679d
ld de, BGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
pop af
ld [rSVBK], a
@@ -1479,7 +1457,7 @@ IntroScene26: ; e50bb (39:50bb)
ld [hWX], a
ld a, $90
ld [hWY], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call Intro_SetCGBPalUpdate
xor a
ld [wIntroSceneFrameCounter], a
@@ -1572,52 +1550,12 @@ Intro_Scene24_ApplyPaletteFade: ; e5172 (39:5172)
; e519c (39:519c)
.FadePals: ; e519c
-; Fade to white.
- RGB 24, 12, 09
- RGB 31, 31, 31
- RGB 12, 00, 31
- RGB 00, 00, 00
-
- RGB 31, 19, 05
- RGB 31, 31, 31
- RGB 15, 05, 31
- RGB 07, 07, 07
-
- RGB 31, 21, 09
- RGB 31, 31, 31
- RGB 18, 09, 31
- RGB 11, 11, 11
-
- RGB 31, 23, 13
- RGB 31, 31, 31
- RGB 21, 13, 31
- RGB 15, 15, 15
-
- RGB 31, 25, 17
- RGB 31, 31, 31
- RGB 25, 17, 31
- RGB 19, 19, 19
-
- RGB 31, 27, 21
- RGB 31, 31, 31
- RGB 27, 21, 31
- RGB 23, 23, 23
-
- RGB 31, 29, 25
- RGB 31, 31, 31
- RGB 29, 26, 31
- RGB 27, 27, 27
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
-
+INCLUDE "data/palettes/crystal_intro/fade.pal"
; e51dc
CrystalIntro_InitUnownAnim: ; e51dc (39:51dc)
push de
- ld a, SPRITE_ANIM_INDEX_29
+ ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
@@ -1627,7 +1565,7 @@ CrystalIntro_InitUnownAnim: ; e51dc (39:51dc)
pop de
push de
- ld a, SPRITE_ANIM_INDEX_29
+ ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
@@ -1637,7 +1575,7 @@ CrystalIntro_InitUnownAnim: ; e51dc (39:51dc)
pop de
push de
- ld a, SPRITE_ANIM_INDEX_29
+ ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
@@ -1646,7 +1584,7 @@ CrystalIntro_InitUnownAnim: ; e51dc (39:51dc)
call ReinitSpriteAnimFrame
pop de
- ld a, SPRITE_ANIM_INDEX_29
+ ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
@@ -1685,7 +1623,7 @@ CrystalIntro_UnownFade: ; e5223 (39:5223)
push hl
push bc
ld hl, BGPals
- ld bc, 4 * 16
+ ld bc, 8 palettes
xor a
call ByteFill
pop bc
@@ -2150,85 +2088,8 @@ INCBIN "gfx/intro/003.tilemap.lz"
; e5edd
Palette_e5edd: ; e5edd
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 0, 4, 5
- RGB 1, 8, 5
- RGB 4, 12, 9
- RGB 24, 12, 9
-
- RGB 0, 4, 5
- RGB 9, 6, 8
- RGB 8, 16, 5
- RGB 5, 10, 4
-
- RGB 31, 31, 31
- RGB 9, 6, 8
- RGB 18, 9, 9
- RGB 13, 8, 9
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 2, 5, 22
- RGB 1, 5, 12
-
- RGB 31, 31, 31
- RGB 31, 10, 25
- RGB 31, 21, 0
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 21, 31
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
+INCLUDE "data/palettes/crystal_intro/intro_1.pal"
+; e5f5d
IntroUnownsGFX: ; e5f5d
INCBIN "gfx/intro/unowns.2bpp.lz"
@@ -2263,85 +2124,8 @@ INCBIN "gfx/intro/007.tilemap.lz"
; e65ad
Palette_365ad: ; e65ad
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 10, 0, 10
- RGB 19, 0, 19
- RGB 31, 0, 31
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
+INCLUDE "data/palettes/crystal_intro/intro_2.pal"
+; e662d
IntroCrystalUnownsGFX: ; e662d
INCBIN "gfx/intro/crystal_unowns.2bpp.lz"
@@ -2356,85 +2140,8 @@ INCBIN "gfx/intro/015.tilemap.lz"
; e679d
Palette_e679d: ; e679d
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
+INCLUDE "data/palettes/crystal_intro/intro_3.pal"
+; e681d
IntroSuicuneCloseGFX: ; e681d
INCBIN "gfx/intro/suicune_close.2bpp.lz"
@@ -2449,85 +2156,8 @@ INCBIN "gfx/intro/011.tilemap.lz"
; e6d6d
Palette_e6d6d: ; e6d6d
- RGB 24, 12, 9
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 24, 12, 9
- RGB 31, 31, 31
- RGB 8, 9, 31
- RGB 0, 0, 0
-
- RGB 24, 12, 9
- RGB 12, 20, 31
- RGB 19, 8, 31
- RGB 0, 0, 0
-
- RGB 12, 20, 31
- RGB 8, 9, 31
- RGB 19, 8, 31
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 12, 20, 31
- RGB 8, 9, 31
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
+INCLUDE "data/palettes/crystal_intro/intro_4.pal"
+; e6ded
IntroSuicuneJumpGFX: ; e6ded
INCBIN "gfx/intro/suicune_jump.2bpp.lz"
@@ -2554,85 +2184,7 @@ INCBIN "gfx/intro/013.tilemap.lz"
; e77dd
Palette_e77dd: ; e77dd
- RGB 24, 12, 9
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 24, 12, 9
- RGB 31, 31, 31
- RGB 8, 9, 31
- RGB 0, 0, 0
-
- RGB 24, 12, 9
- RGB 24, 12, 9
- RGB 24, 12, 9
- RGB 24, 12, 9
-
- RGB 24, 12, 9
- RGB 24, 12, 9
- RGB 24, 12, 9
- RGB 24, 12, 9
-
- RGB 24, 12, 9
- RGB 24, 12, 9
- RGB 24, 12, 9
- RGB 24, 12, 9
-
- RGB 24, 12, 9
- RGB 24, 12, 9
- RGB 24, 12, 9
- RGB 24, 12, 9
-
- RGB 24, 12, 9
- RGB 24, 12, 9
- RGB 24, 12, 9
- RGB 24, 12, 9
-
- RGB 24, 12, 9
- RGB 24, 12, 9
- RGB 24, 12, 9
- RGB 24, 12, 9
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 12, 0, 31
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 21, 9, 0
- RGB 21, 9, 0
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
+INCLUDE "data/palettes/crystal_intro/intro_5.pal"
IntroUnownBackGFX: ; e785d
INCBIN "gfx/intro/unown_back.2bpp.lz"
@@ -2646,4 +2198,3 @@ IntroGrass3GFX: ; e7a1d
INCBIN "gfx/intro/grass3.2bpp"
IntroGrass4GFX: ; e7a5d
INCBIN "gfx/intro/grass4.2bpp"
-
diff --git a/engine/debug.asm b/engine/debug.asm
index 9c2bb35c2..588de7a64 100755
--- a/engine/debug.asm
+++ b/engine/debug.asm
@@ -159,7 +159,7 @@ Function819a7: ; 819a7
ld [rSVBK], a
ld hl, Palette_819f4
ld de, BGPals
- ld bc, $80
+ ld bc, 16 palettes
call CopyBytes
ld a, $80
ld [rBGPI], a
@@ -193,93 +193,10 @@ Function819a7: ; 819a7
; 819f4
Palette_819f4: ; 819f4
- ; white
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 00, 00, 00
-
- ; red
- RGB 31, 00, 00
- RGB 31, 00, 00
- RGB 31, 00, 00
- RGB 00, 00, 00
-
- ; green
- RGB 00, 31, 00
- RGB 00, 31, 00
- RGB 00, 31, 00
- RGB 00, 00, 00
-
- ; blue
- RGB 00, 00, 31
- RGB 00, 00, 31
- RGB 00, 00, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 00, 00, 00
+INCLUDE "data/palettes/debug/bg.pal"
Palette_81a34: ; 81a34
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 00, 00, 00
-
- ; red
- RGB 31, 31, 31
- RGB 31, 00, 00
- RGB 31, 00, 00
- RGB 00, 00, 00
-
- ; green
- RGB 31, 31, 31
- RGB 00, 31, 00
- RGB 00, 31, 00
- RGB 00, 00, 00
-
- ; blue
- RGB 31, 31, 31
- RGB 00, 00, 31
- RGB 00, 00, 31
- RGB 00, 00, 00
+INCLUDE "data/palettes/debug/ob.pal"
; 81a74
Function81a74: ; 81a74
@@ -398,7 +315,7 @@ Function81adb: ; 81adb
hlcoord 12, 3
call _PrepMonFrontpic
ld de, VTiles2 tile $31
- predef GetBackpic
+ predef GetMonBackpic
ld a, $31
ld [hGraphicStartTile], a
hlcoord 2, 4
@@ -424,12 +341,12 @@ Function81adb: ; 81adb
.asm_81b7a
ld a, [wd265]
ld [TrainerClass], a
- callab GetTrainerAttributes
+ callfar GetTrainerAttributes
ld de, StringBuffer1
hlcoord 4, 1
call PlaceString
ld de, VTiles2
- callab GetTrainerPic
+ callfar GetTrainerPic
xor a
ld [TempEnemyMonSpecies], a
ld [hGraphicStartTile], a
diff --git a/engine/decorations.asm b/engine/decorations.asm
index 4bd99c0a5..1e9effe97 100755
--- a/engine/decorations.asm
+++ b/engine/decorations.asm
@@ -541,69 +541,7 @@ GetDecorationSprite: ; 26a44
ret
; 26a4f
-decoration: MACRO
- ; type, name, command, event flag, tile/sprite
- db \1, \2, \3
- dw \4
- db \5
-ENDM
-
-DecorationAttributes: ; 26a4f
- decoration DECO_PLANT, $00, $0, EVENT_GAVE_KURT_APRICORNS, $00
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_BED, EVENT_GAVE_KURT_APRICORNS, $00
- decoration DECO_BED, FEATHERY_BED, SET_UP_BED, EVENT_DECO_BED_1, $1b
- decoration DECO_BED, PINK_BED, SET_UP_BED, EVENT_DECO_BED_2, $1c
- decoration DECO_BED, POLKADOT_BED, SET_UP_BED, EVENT_DECO_BED_3, $1d
- decoration DECO_BED, PIKACHU_BED, SET_UP_BED, EVENT_DECO_BED_4, $1e
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_CARPET, EVENT_GAVE_KURT_APRICORNS, $00
- decoration DECO_CARPET, RED_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_1, $08
- decoration DECO_CARPET, BLUE_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_2, $0b
- decoration DECO_CARPET, YELLOW_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_3, $0e
- decoration DECO_CARPET, GREEN_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_4, $11
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_PLANT, EVENT_GAVE_KURT_APRICORNS, $00
- decoration DECO_PLANT, MAGNAPLANT, SET_UP_PLANT, EVENT_DECO_PLANT_1, $20
- decoration DECO_PLANT, TROPICPLANT, SET_UP_PLANT, EVENT_DECO_PLANT_2, $21
- decoration DECO_PLANT, JUMBOPLANT, SET_UP_PLANT, EVENT_DECO_PLANT_3, $22
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_POSTER, EVENT_GAVE_KURT_APRICORNS, $00
- decoration DECO_PLANT, TOWN_MAP_D, SET_UP_POSTER, EVENT_DECO_PLANT_4, $1f
- decoration DECO_POSTER, PIKACHU, SET_UP_POSTER, EVENT_DECO_POSTER_1, $23
- decoration DECO_POSTER, CLEFAIRY, SET_UP_POSTER, EVENT_DECO_POSTER_2, $24
- decoration DECO_POSTER, JIGGLYPUFF, SET_UP_POSTER, EVENT_DECO_POSTER_3, $25
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_CONSOLE, EVENT_GAVE_KURT_APRICORNS, $00
- decoration DECO_PLANT, FAMICOM, SET_UP_CONSOLE, EVENT_DECO_FAMICOM, SPRITE_FAMICOM
- decoration DECO_PLANT, SUPER_NES, SET_UP_CONSOLE, EVENT_DECO_SNES, SPRITE_SNES
- decoration DECO_PLANT, NINTENDO_64, SET_UP_CONSOLE, EVENT_DECO_N64, SPRITE_N64
- decoration DECO_PLANT, VIRTUAL_BOY, SET_UP_CONSOLE, EVENT_DECO_VIRTUAL_BOY, SPRITE_VIRTUAL_BOY
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_BIG_DOLL, EVENT_GAVE_KURT_APRICORNS, $00
- decoration DECO_BIGDOLL, SNORLAX, SET_UP_BIG_DOLL, EVENT_DECO_BIG_SNORLAX_DOLL, SPRITE_BIG_SNORLAX
- decoration DECO_BIGDOLL, ONIX, SET_UP_BIG_DOLL, EVENT_DECO_BIG_ONIX_DOLL, SPRITE_BIG_ONIX
- decoration DECO_BIGDOLL, LAPRAS, SET_UP_BIG_DOLL, EVENT_DECO_BIG_LAPRAS_DOLL, SPRITE_BIG_LAPRAS
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_DOLL, EVENT_GAVE_KURT_APRICORNS, $00
- decoration DECO_DOLL, PIKACHU, SET_UP_DOLL, EVENT_DECO_PIKACHU_DOLL, SPRITE_PIKACHU
- decoration DECO_PLANT, SURF_PIKA_DOLL, SET_UP_DOLL, EVENT_DECO_SURFING_PIKACHU_DOLL, SPRITE_SURFING_PIKACHU
- decoration DECO_DOLL, CLEFAIRY, SET_UP_DOLL, EVENT_DECO_CLEFAIRY_DOLL, SPRITE_CLEFAIRY
- decoration DECO_DOLL, JIGGLYPUFF, SET_UP_DOLL, EVENT_DECO_JIGGLYPUFF_DOLL, SPRITE_JIGGLYPUFF
- decoration DECO_DOLL, BULBASAUR, SET_UP_DOLL, EVENT_DECO_BULBASAUR_DOLL, SPRITE_BULBASAUR
- decoration DECO_DOLL, CHARMANDER, SET_UP_DOLL, EVENT_DECO_CHARMANDER_DOLL, SPRITE_CHARMANDER
- decoration DECO_DOLL, SQUIRTLE, SET_UP_DOLL, EVENT_DECO_SQUIRTLE_DOLL, SPRITE_SQUIRTLE
- decoration DECO_DOLL, POLIWAG, SET_UP_DOLL, EVENT_DECO_POLIWAG_DOLL, SPRITE_POLIWAG
- decoration DECO_DOLL, DIGLETT, SET_UP_DOLL, EVENT_DECO_DIGLETT_DOLL, SPRITE_DIGLETT
- decoration DECO_DOLL, STARYU, SET_UP_DOLL, EVENT_DECO_STARMIE_DOLL, SPRITE_STARMIE
- decoration DECO_DOLL, MAGIKARP, SET_UP_DOLL, EVENT_DECO_MAGIKARP_DOLL, SPRITE_MAGIKARP
- decoration DECO_DOLL, ODDISH, SET_UP_DOLL, EVENT_DECO_ODDISH_DOLL, SPRITE_ODDISH
- decoration DECO_DOLL, GENGAR, SET_UP_DOLL, EVENT_DECO_GENGAR_DOLL, SPRITE_GENGAR
- decoration DECO_DOLL, SHELLDER, SET_UP_DOLL, EVENT_DECO_SHELLDER_DOLL, SPRITE_SHELLDER
- decoration DECO_DOLL, GRIMER, SET_UP_DOLL, EVENT_DECO_GRIMER_DOLL, SPRITE_GRIMER
- decoration DECO_DOLL, VOLTORB, SET_UP_DOLL, EVENT_DECO_VOLTORB_DOLL, SPRITE_VOLTORB
- decoration DECO_DOLL, WEEDLE, SET_UP_DOLL, EVENT_DECO_WEEDLE_DOLL, SPRITE_WEEDLE
- decoration DECO_DOLL, UNOWN, SET_UP_DOLL, EVENT_DECO_UNOWN_DOLL, SPRITE_UNOWN
- decoration DECO_DOLL, GEODUDE, SET_UP_DOLL, EVENT_DECO_GEODUDE_DOLL, SPRITE_GEODUDE
- decoration DECO_DOLL, MACHOP, SET_UP_DOLL, EVENT_DECO_MACHOP_DOLL, SPRITE_MACHOP
- decoration DECO_DOLL, TENTACOOL, SET_UP_DOLL, EVENT_DECO_TENTACOOL_DOLL, SPRITE_TENTACOOL
- decoration DECO_PLANT, GOLD_TROPHY, SET_UP_DOLL, EVENT_DECO_GOLD_TROPHY, SPRITE_GOLD_TROPHY
- decoration DECO_PLANT, SILVER_TROPHY, SET_UP_DOLL, EVENT_DECO_SILVER_TROPHY, SPRITE_SILVER_TROPHY
-; 26b8d
-
+INCLUDE "data/decoration_attributes.asm"
DecorationNames: ; 26b8d
db "CANCEL@"
@@ -908,16 +846,16 @@ DecoAction_putawayornament: ; 26dc9
DecoAction_FinishUp_Ornament: ; 26dd6
call QueryWhichSide
- ld a, [wd1ec]
+ ld a, [wSelectedDecoration]
ld [hl], a
- ld a, [wd1ed]
+ ld a, [wOtherDecoration]
ld [de], a
xor a
ret
; 26de3
DecoAction_SetItUp_Ornament: ; 26de3
- ld a, [wd1ec]
+ ld a, [wSelectedDecoration]
and a
jr z, .nothingthere
ld b, a
@@ -931,7 +869,7 @@ DecoAction_SetItUp_Ornament: ; 26de3
ld hl, StringBuffer4
call GetDecorationName
ld a, [MenuSelection]
- ld [wd1ec], a
+ ld [wSelectedDecoration], a
call .getwhichside
ld hl, DecoText_PutAwayAndSetUp
call MenuTextBoxBackup
@@ -940,7 +878,7 @@ DecoAction_SetItUp_Ornament: ; 26de3
.nothingthere
ld a, [MenuSelection]
- ld [wd1ec], a
+ ld [wSelectedDecoration], a
call .getwhichside
ld a, [MenuSelection]
ld hl, StringBuffer3
@@ -960,11 +898,11 @@ DecoAction_SetItUp_Ornament: ; 26de3
.getwhichside ; 26e33
ld a, [MenuSelection]
ld b, a
- ld a, [wd1ed]
+ ld a, [wOtherDecoration]
cp b
ret nz
xor a
- ld [wd1ed], a
+ ld [wOtherDecoration], a
ret
; 26e41
@@ -975,7 +913,7 @@ UnknownText_0x26e41: ; 0x26e41
; 0x26e46
DecoAction_PutItAway_Ornament: ; 26e46
- ld a, [wd1ec]
+ ld a, [wSelectedDecoration]
and a
jr z, .nothingthere
ld hl, StringBuffer3
@@ -983,7 +921,7 @@ DecoAction_PutItAway_Ornament: ; 26e46
ld a, $1
ld [Buffer5], a
xor a
- ld [wd1ec], a
+ ld [wSelectedDecoration], a
ld hl, DecoText_PutAwayTheDeco
call MenuTextBoxBackup
xor a
@@ -1015,9 +953,9 @@ DecoAction_AskWhichSide: ; 26e70
ld [Buffer2], a
call QueryWhichSide
ld a, [hl]
- ld [wd1ec], a
+ ld [wSelectedDecoration], a
ld a, [de]
- ld [wd1ed], a
+ ld [wOtherDecoration], a
xor a
ret
@@ -1430,9 +1368,19 @@ _GetDecorationSprite: ; 27085
ld c, a
push de
push hl
- callba GetDecorationSprite
+ farcall GetDecorationSprite
pop hl
pop de
ld a, c
ret
; 27092
+
+PadCoords_de: ; 27092
+ ld a, d
+ add 4
+ ld d, a
+ ld a, e
+ add 4
+ ld e, a
+ call GetBlockLocation
+ ret
diff --git a/engine/delete_save_change_clock.asm b/engine/delete_save_change_clock.asm
index 7a806ad01..e77874e1c 100755
--- a/engine/delete_save_change_clock.asm
+++ b/engine/delete_save_change_clock.asm
@@ -1,5 +1,5 @@
_ResetClock: ; 4d3b1
- callba BlankScreen
+ farcall BlankScreen
ld b, SCGB_DIPLOMA
call GetSGBLayout
call LoadStandardFont
@@ -127,7 +127,7 @@ ClockResetPassword: ; 4d41e
ld e, a
ld d, $0
add hl, de
- ld [hl], $61
+ ld [hl], "▲"
ret
.dpadinput ; 4d490
@@ -227,7 +227,7 @@ ClockResetPassword: ; 4d41e
ld c, $2
call .ComponentFromNumber
ld hl, sPlayerData + (PlayerName - wPlayerData)
- ld c, $5 ; PLAYER_NAME_LENGTH_J
+ ld c, NAME_LENGTH_JAPANESE - 1
call .ComponentFromString
ld hl, sPlayerData + (Money - wPlayerData)
ld c, $3
@@ -260,7 +260,7 @@ ClockResetPassword: ; 4d41e
ret
_DeleteSaveData: ; 4d54c
- callba BlankScreen
+ farcall BlankScreen
ld b, SCGB_DIPLOMA
call GetSGBLayout
call LoadStandardFont
@@ -276,7 +276,7 @@ _DeleteSaveData: ; 4d54c
ld a, [wMenuCursorY]
cp $1
ret z
- callba EmptyAllSRAMBanks
+ farcall EmptyAllSRAMBanks
ret
.Text_ClearAllSaveData: ; 0x4d580
diff --git a/engine/diploma.asm b/engine/diploma.asm
index c446ff86b..f1c67ea37 100644
--- a/engine/diploma.asm
+++ b/engine/diploma.asm
@@ -1,4 +1,3 @@
-
_Diploma: ; 1dd702
call PlaceDiplomaOnScreen
call WaitPressAorB_BlinkCursor
@@ -85,10 +84,10 @@ PrintDiplomaPage2: ; 1dd7ae
; 1dd805
DiplomaGFX: ; 1dd805
-INCBIN "gfx/unknown/1dd805.2bpp.lz"
+INCBIN "gfx/diploma/diploma.2bpp.lz"
DiplomaPage1Tilemap: ; 1ddc4b
-INCBIN "gfx/unknown/1ddc4b.tilemap"
+INCBIN "gfx/diploma/page1.tilemap"
DiplomaPage2Tilemap: ; 1dddb3
-INCBIN "gfx/unknown/1dddb3.tilemap"
+INCBIN "gfx/diploma/page2.tilemap"
diff --git a/engine/dma_transfer.asm b/engine/dma_transfer.asm
new file mode 100755
index 000000000..9d95c87b1
--- /dev/null
+++ b/engine/dma_transfer.asm
@@ -0,0 +1,626 @@
+HDMATransferAttrMapAndTileMapToWRAMBank3:: ; 104000
+ ld hl, .Function
+ jp CallInSafeGFXMode
+
+.Function:
+ decoord 0, 0, AttrMap
+ ld hl, wScratchAttrMap
+ call PadAttrMapForHDMATransfer
+ decoord 0, 0
+ ld hl, wScratchTileMap
+ call PadTilemapForHDMATransfer
+ ld a, $0
+ ld [rVBK], a
+ ld hl, wScratchTileMap
+ call HDMATransferToWRAMBank3
+ ld a, $1
+ ld [rVBK], a
+ ld hl, wScratchAttrMap
+ call HDMATransferToWRAMBank3
+ ret
+; 10402d
+
+HDMATransferTileMapToWRAMBank3:: ; 10402d
+ ld hl, .Function
+ jp CallInSafeGFXMode
+
+.Function:
+ decoord 0, 0
+ ld hl, wScratchTileMap
+ call PadTilemapForHDMATransfer
+ ld a, $0
+ ld [rVBK], a
+ ld hl, wScratchTileMap
+ call HDMATransferToWRAMBank3
+ ret
+; 104047
+
+HDMATransferAttrMapToWRAMBank3: ; 104047
+ ld hl, .Function
+ jp CallInSafeGFXMode
+
+.Function:
+ decoord 0, 0, AttrMap
+ ld hl, wScratchAttrMap
+ call PadAttrMapForHDMATransfer
+ ld a, $1
+ ld [rVBK], a
+ ld hl, wScratchAttrMap
+ call HDMATransferToWRAMBank3
+ ret
+; 104061
+
+ReloadMapPart:: ; 104061
+ ld hl, .Function
+ jp CallInSafeGFXMode
+
+.Function:
+ decoord 0, 0, AttrMap
+ ld hl, wScratchAttrMap
+ call PadAttrMapForHDMATransfer
+ decoord 0, 0
+ ld hl, wScratchTileMap
+ call PadTilemapForHDMATransfer
+ call DelayFrame
+
+ di
+ ld a, [rVBK]
+ push af
+ ld a, $1
+ ld [rVBK], a
+ ld hl, wScratchAttrMap
+ call HDMATransfer_Wait127Scanlines_toBGMap
+ ld a, $0
+ ld [rVBK], a
+ ld hl, wScratchTileMap
+ call HDMATransfer_Wait127Scanlines_toBGMap
+ pop af
+ ld [rVBK], a
+ ei
+
+ ret
+
+Mobile_ReloadMapPart: ; 104099
+ ld hl, ReloadMapPart ; useless
+ ld hl, .Function
+ jp CallInSafeGFXMode
+
+.Function:
+ decoord 0, 0, AttrMap
+ ld hl, wScratchAttrMap
+ call PadAttrMapForHDMATransfer
+ decoord 0, 0
+ ld hl, wScratchTileMap
+ call PadTilemapForHDMATransfer
+ call DelayFrame
+
+ di
+ ld a, [rVBK]
+ push af
+ ld a, $1
+ ld [rVBK], a
+ ld hl, wScratchAttrMap
+ call HDMATransfer_NoDI
+ ld a, $0
+ ld [rVBK], a
+ ld hl, wScratchTileMap
+ call HDMATransfer_NoDI
+ pop af
+ ld [rVBK], a
+ ei
+
+ ret
+; 1040d4
+
+; XXX
+ ld hl, .unreferenced_1040da
+ jp CallInSafeGFXMode
+
+.unreferenced_1040da
+ ld a, $1
+ ld [rVBK], a
+ ld a, $3
+ ld [rSVBK], a
+ ld de, w3_d800
+ ld a, [hBGMapAddress + 1]
+ ld [rHDMA1], a
+ ld a, [hBGMapAddress]
+ ld [rHDMA2], a
+ ld a, d
+ ld [rHDMA3], a
+ ld a, e
+ ld [rHDMA4], a
+ ld a, $23
+ ld [hDMATransfer], a
+ call WaitDMATransfer
+ ret
+; 1040fb
+
+; XXX
+ ld hl, .unreferenced_104101
+ jp CallInSafeGFXMode
+
+.unreferenced_104101
+ ld a, $1
+ ld [rVBK], a
+ ld a, $3
+ ld [rSVBK], a
+ ld hl, w3_d800
+ call HDMATransferToWRAMBank3
+ ret
+; 104110
+
+OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 104110
+; OpenText
+ ld hl, .Function
+ jp CallInSafeGFXMode
+
+.Function:
+ ; Transfer AttrMap and Tilemap to BGMap
+ ; Fill vBGAttrs with $00
+ ; Fill vBGTiles with " "
+ decoord 0, 0, AttrMap
+ ld hl, wScratchAttrMap
+ call PadAttrMapForHDMATransfer
+ decoord 0, 0
+ ld hl, wScratchTileMap
+ call PadTilemapForHDMATransfer
+ call DelayFrame
+
+ di
+ ld a, [rVBK]
+ push af
+ ld a, $1
+ ld [rVBK], a
+ ld hl, wScratchAttrMap
+ call HDMATransfer_Wait123Scanlines_toBGMap
+ ld a, $0
+ ld [rVBK], a
+ ld hl, wScratchTileMap
+ call HDMATransfer_Wait123Scanlines_toBGMap
+ pop af
+ ld [rVBK], a
+ ei
+ ret
+; 104148
+
+Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap: ; 104148 (41:4148)
+ ld hl, .Function
+ jp CallInSafeGFXMode
+
+.Function:
+ ; Transfer AttrMap and Tilemap to BGMap
+ ; Fill vBGAttrs with $00
+ ; Fill vBGTiles with $ff
+ decoord 0, 0, AttrMap
+ ld hl, wScratchAttrMap
+ call PadAttrMapForHDMATransfer
+ ld c, $ff
+ decoord 0, 0
+ ld hl, wScratchTileMap
+ call PadMapForHDMATransfer
+
+ ld a, $1
+ ld [rVBK], a
+ ld hl, wScratchAttrMap
+ call HDMATransfer_Wait127Scanlines_toBGMap
+ ld a, $0
+ ld [rVBK], a
+ ld hl, wScratchTileMap
+ call HDMATransfer_Wait127Scanlines_toBGMap
+ ret
+; 104177
+
+CallInSafeGFXMode: ; 104177
+ ld a, [hBGMapMode]
+ push af
+ ld a, [hMapAnims]
+ push af
+ xor a
+ ld [hBGMapMode], a
+ ld [hMapAnims], a
+ ld a, [rSVBK]
+ push af
+ ld a, $6
+ ld [rSVBK], a
+ ld a, [rVBK]
+ push af
+
+ call ._hl_
+
+ pop af
+ ld [rVBK], a
+ pop af
+ ld [rSVBK], a
+ pop af
+ ld [hMapAnims], a
+ pop af
+ ld [hBGMapMode], a
+ ret
+; 10419c
+
+._hl_ ; 10419c
+ jp hl
+; 10419d
+
+
+HDMATransferToWRAMBank3: ; 10419d (41:419d)
+ call _LoadHDMAParameters
+ ld a, $23
+ ld [hDMATransfer], a
+
+WaitDMATransfer: ; 104a14
+.loop
+ call DelayFrame
+ ld a, [hDMATransfer]
+ and a
+ jr nz, .loop
+ ret
+
+HDMATransfer_Wait127Scanlines_toBGMap: ; 1041ad (41:41ad)
+; HDMA transfer from hl to [hBGMapAddress]
+; hBGMapAddress -> de
+; 2 * SCREEN_HEIGHT -> c
+ ld a, [hBGMapAddress + 1]
+ ld d, a
+ ld a, [hBGMapAddress]
+ ld e, a
+ ld c, 2 * SCREEN_HEIGHT
+ jr HDMATransfer_Wait127Scanlines
+
+HDMATransfer_Wait123Scanlines_toBGMap: ; 1041b7 (41:41b7)
+; HDMA transfer from hl to [hBGMapAddress]
+; hBGMapAddress -> de
+; 2 * SCREEN_HEIGHT -> c
+; $7b --> b
+ ld a, [hBGMapAddress + 1]
+ ld d, a
+ ld a, [hBGMapAddress]
+ ld e, a
+ ld c, 2 * SCREEN_HEIGHT
+ jr HDMATransfer_Wait123Scanlines
+; 1041c1 (41:41c1)
+
+HDMATransfer_NoDI: ; 1041c1
+; HDMA transfer from hl to [hBGMapAddress]
+; [hBGMapAddress] --> de
+; 2 * SCREEN_HEIGHT --> c
+ ld a, [hBGMapAddress + 1]
+ ld d, a
+ ld a, [hBGMapAddress]
+ ld e, a
+ ld c, 2 * SCREEN_HEIGHT
+
+ ; [rHDMA1, rHDMA2] = hl & $fff0
+ ld a, h
+ ld [rHDMA1], a
+ ld a, l
+ and $f0
+ ld [rHDMA2], a
+ ; [rHDMA3, rHDMA4] = de & $1ff0
+ ld a, d
+ and $1f
+ ld [rHDMA3], a
+ ld a, e
+ and $f0
+ ld [rHDMA4], a
+ ; b = c | %10000000
+ ld a, c
+ dec c
+ or $80
+ ld b, a
+ ; d = $7f - c + 1
+ ld a, $7f
+ sub c
+ ld d, a
+ ; while [rLY] >= d: pass
+.loop1
+ ld a, [rLY]
+ cp d
+ jr nc, .loop1
+ ; while not [rSTAT] & 3: pass
+.loop2
+ ld a, [rSTAT]
+ and $3
+ jr z, .loop2
+ ; load the 5th byte of HDMA
+ ld a, b
+ ld [rHDMA5], a
+ ; wait until rLY advances (c + 1) times
+ ld a, [rLY]
+ inc c
+ ld hl, rLY
+.loop3
+ cp [hl]
+ jr z, .loop3
+ ld a, [hl]
+ dec c
+ jr nz, .loop3
+ ld hl, rHDMA5
+ res 7, [hl]
+ ret
+; 104205
+
+HDMATransfer_Wait123Scanlines:
+ ld b, $7b
+ jr _continue_HDMATransfer
+
+
+HDMATransfer_Wait127Scanlines:
+ ld b, $7f
+_continue_HDMATransfer:
+; a lot of waiting around for hardware registers
+ ; [rHDMA1, rHDMA2] = hl & $fff0
+ ld a, h
+ ld [rHDMA1], a
+ ld a, l
+ and $f0 ; high nybble
+ ld [rHDMA2], a
+ ; [rHDMA3, rHDMA4] = de & $1ff0
+ ld a, d
+ and $1f ; lower 5 bits
+ ld [rHDMA3], a
+ ld a, e
+ and $f0 ; high nybble
+ ld [rHDMA4], a
+ ; e = c | %10000000
+ ld a, c
+ dec c
+ or $80
+ ld e, a
+ ; d = b - c + 1
+ ld a, b
+ sub c
+ ld d, a
+ ; while [rLY] >= d: pass
+.ly_loop
+ ld a, [rLY]
+ cp d
+ jr nc, .ly_loop
+
+ di
+ ; while [rSTAT] & 3: pass
+.rstat_loop_1
+ ld a, [rSTAT]
+ and $3
+ jr nz, .rstat_loop_1
+ ; while not [rSTAT] & 3: pass
+.rstat_loop_2
+ ld a, [rSTAT]
+ and $3
+ jr z, .rstat_loop_2
+ ; load the 5th byte of HDMA
+ ld a, e
+ ld [rHDMA5], a
+ ; wait until rLY advances (c + 1) times
+ ld a, [rLY]
+ inc c
+ ld hl, rLY
+.final_ly_loop
+ cp [hl]
+ jr z, .final_ly_loop
+ ld a, [hl]
+ dec c
+ jr nz, .final_ly_loop
+ ld hl, rHDMA5
+ res 7, [hl]
+ ei
+
+ ret
+; 10424e
+
+
+_LoadHDMAParameters: ; 10424e (41:424e)
+ ld a, h
+ ld [rHDMA1], a
+ ld a, l
+ ld [rHDMA2], a
+ ld a, [hBGMapAddress + 1]
+ and $1f
+ ld [rHDMA3], a
+ ld a, [hBGMapAddress]
+ ld [rHDMA4], a
+ ret
+
+PadTilemapForHDMATransfer: ; 10425f (41:425f)
+ ld c, " "
+ jr PadMapForHDMATransfer
+
+PadAttrMapForHDMATransfer: ; 104263 (41:4263)
+ ld c, $0
+
+PadMapForHDMATransfer: ; 104265 (41:4265)
+; pad a 20x18 map to 32x18 for HDMA transfer
+; back up the padding value in c to hMapObjectIndexBuffer
+ ld a, [hMapObjectIndexBuffer]
+ push af
+ ld a, c
+ ld [hMapObjectIndexBuffer], a
+
+; for each row on the screen
+ ld c, SCREEN_HEIGHT
+.loop1
+; for each tile in the row
+ ld b, SCREEN_WIDTH
+.loop2
+; copy from de to hl
+ ld a, [de]
+ inc de
+ ld [hli], a
+ dec b
+ jr nz, .loop2
+
+; load the original padding value of c into hl for 32 - 20 = 12 rows
+ ld a, [hMapObjectIndexBuffer]
+ ld b, BG_MAP_WIDTH - SCREEN_WIDTH
+.loop3
+ ld [hli], a
+ dec b
+ jr nz, .loop3
+
+ dec c
+ jr nz, .loop1
+
+; restore the original value of hMapObjectIndexBuffer
+ pop af
+ ld [hMapObjectIndexBuffer], a
+ ret
+
+
+_Get2bpp:: ; 104284
+ ; 2bpp when [rLCDC] & $80
+ ; switch to WRAM bank 6
+ ld a, [rSVBK]
+ push af
+ ld a, $6
+ ld [rSVBK], a
+
+ push bc
+ push hl
+
+ ; Copy c tiles of the 2bpp from b:de to wScratchTileMap
+ ld a, b ; bank
+ ld l, c ; number of tiles
+ ld h, $0
+ ; multiply by 16 (16 bytes of a 2bpp = 8 x 8 tile)
+ add hl, hl
+ add hl, hl
+ add hl, hl
+ add hl, hl
+ ld b, h
+ ld c, l
+ ld h, d ; address
+ ld l, e
+ ld de, wScratchTileMap
+ call FarCopyBytes
+
+ pop hl
+ pop bc
+
+ push bc
+ call DelayFrame
+ pop bc
+
+ ld d, h
+ ld e, l
+ ld hl, wScratchTileMap
+ call HDMATransfer_Wait127Scanlines
+
+ ; restore the previous bank
+ pop af
+ ld [rSVBK], a
+ ret
+; 1042b2
+
+_Get1bpp:: ; 1042b2
+ ; 1bpp when [rLCDC] & $80
+.loop
+ ld a, c
+ cp $10
+ jp c, .bankswitch
+ jp z, .bankswitch
+ push bc
+ push hl
+ push de
+ ld c, $10
+ call .bankswitch
+ pop de
+ ld hl, $80
+ add hl, de
+ ld d, h
+ ld e, l
+ pop hl
+ lb bc, 1, 0
+ add hl, bc
+ pop bc
+ ld a, c
+ sub $10
+ ld c, a
+ jr .loop
+; 1042d6
+
+.bankswitch ; 1042d6
+ ld a, [rSVBK]
+ push af
+ ld a, $6
+ ld [rSVBK], a
+
+ push bc
+ push hl
+
+ ld a, b
+ ld l, c
+ ld h, $0
+ add hl, hl ; multiply by 8
+ add hl, hl ; multiply by 8
+ add hl, hl ; multiply by 8
+ ld c, l
+ ld b, h
+ ld h, d
+ ld l, e
+ ld de, wScratchTileMap
+ call FarCopyBytesDouble_DoubleBankSwitch
+
+ pop hl
+ pop bc
+
+ push bc
+ call DelayFrame
+ pop bc
+
+ ld d, h
+ ld e, l
+ ld hl, wScratchTileMap
+ call HDMATransfer_Wait127Scanlines
+
+ pop af
+ ld [rSVBK], a
+ ret
+; 104303
+
+HDMATransfer_OnlyTopFourRows: ; 104303
+ ld hl, .Function
+ jp CallInSafeGFXMode
+; 104309
+
+.Function:
+ ld hl, wScratchTileMap
+ decoord 0, 0
+ call .Copy
+ ld hl, wScratchTileMap + $80
+ decoord 0, 0, AttrMap
+ call .Copy
+ ld a, $1
+ ld [rVBK], a
+ ld c, $8
+ ld hl, wScratchTileMap + $80
+ debgcoord 0, 0, VBGMap1
+ call HDMATransfer_Wait127Scanlines
+ ld a, $0
+ ld [rVBK], a
+ ld c, $8
+ ld hl, wScratchTileMap
+ debgcoord 0, 0, VBGMap1
+ call HDMATransfer_Wait127Scanlines
+ ret
+
+.Copy: ; 10433a (41:433a)
+ ld b, 4
+.outer_loop
+ ld c, SCREEN_WIDTH
+.inner_loop
+ ld a, [de]
+ ld [hli], a
+ inc de
+ dec c
+ jr nz, .inner_loop
+ ld a, l
+ add BG_MAP_WIDTH - SCREEN_WIDTH
+ ld l, a
+ ld a, h
+ adc $0
+ ld h, a
+ dec b
+ jr nz, .outer_loop
+ ret
+; 104350
diff --git a/engine/dummy_game.asm b/engine/dummy_game.asm
index e5ef9b4cf..c315b8f38 100755
--- a/engine/dummy_game.asm
+++ b/engine/dummy_game.asm
@@ -10,7 +10,7 @@ _DummyGame: ; e1e5b (38:5e5b)
call DisableLCD
ld b, SCGB_DIPLOMA
call GetSGBLayout
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
ld hl, LZ_e2221
ld de, VTiles2 tile $00
call Decompress
@@ -47,7 +47,7 @@ _DummyGame: ; e1e5b (38:5e5b)
bit 7, a
jr nz, .quit
call .ExecuteJumptable
- callab PlaySpriteAnimations
+ callfar PlaySpriteAnimations
call DelayFrame
and a
ret
@@ -109,7 +109,7 @@ endr
.spawn_object
depixel 6, 3, 4, 4
- ld a, SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR
+ ld a, SPRITE_ANIM_INDEX_DUMMY_GAME
call _InitSpriteAnimStruct
ld a, 5
ld [wDummyGameNumberTriesRemaining], a
@@ -609,4 +609,4 @@ DummyGame_InterpretJoypad_AnimateCursor: ; e21a1 (38:61a1)
; e2221 (38:6221)
LZ_e2221: ; e2221
-INCBIN "gfx/unknown/0e2221.2bpp.lz"
+INCBIN "gfx/dummy_game/dummy_game.2bpp.lz"
diff --git a/engine/engine_flags.asm b/engine/engine_flags.asm
index 2b441bab4..acda9ede7 100644
--- a/engine/engine_flags.asm
+++ b/engine/engine_flags.asm
@@ -83,206 +83,4 @@ EngineFlagAction:: ; 80430
; 80462
-EngineFlags: ; 80462
-; All locations are in WRAM bank 1.
-engine_flag: MACRO
- dwb \1, 1 << \2
-ENDM
- ; location, bit
-
- ; pokegear
- engine_flag wPokegearFlags, 1 ; radio card ; $0
- engine_flag wPokegearFlags, 0 ; map card
- engine_flag wPokegearFlags, 2 ; phone card
- engine_flag wPokegearFlags, 3 ; expn card
- engine_flag wPokegearFlags, 7 ; on/off
-
- ; wDaycareMan, 7 ; daycare 1 on
- engine_flag wDaycareMan, 6 ; egg is ready
- ; wDaycareMan, 5 ; monster 1 and 2 are compatible
- engine_flag wDaycareMan, 0 ; monster 1 in daycare
-
- ; wDaycareLady, 7 = daycare 2 on
- engine_flag wDaycareLady, 0 ; monster 2 in daycare
-
- engine_flag wMomSavingMoney, 0 ; mom saving money ; $8
- engine_flag wMomSavingMoney, 7 ; dst
-
- engine_flag wUnusedTwoDayTimerOn, 0 ; unused, possibly related to a 2-day timer
-
- engine_flag StatusFlags, 0 ; pokedex
- engine_flag StatusFlags, 1 ; unown dex
- engine_flag StatusFlags, 3 ; pokerus
- engine_flag StatusFlags, 4 ; rocket signal on ch20
- engine_flag StatusFlags, 6 ; credits skip
- engine_flag StatusFlags, 7 ; bug contest on ; $10
- engine_flag StatusFlags2, 2 ; bug contest timer
- engine_flag StatusFlags2, 1 ; safari zone?
- engine_flag StatusFlags2, 0 ; rockets in radio tower
- engine_flag StatusFlags2, 4 ; bike shop call enabled (1024 bike steps reqd)
- engine_flag StatusFlags2, 5 ; give pokerus
- engine_flag StatusFlags2, 6 ; berry -> berry juice when trading?
- engine_flag StatusFlags2, 7 ; rockets in mahogany
-
- engine_flag BikeFlags, 0 ; strength active ; $18
- engine_flag BikeFlags, 1 ; always on bike (cant surf)
- engine_flag BikeFlags, 2 ; downhill (cycling road)
-
- engine_flag JohtoBadges, 0 ; zephyrbadge
- engine_flag JohtoBadges, 1 ; hivebadge
- engine_flag JohtoBadges, 2 ; plainbadge
- engine_flag JohtoBadges, 3 ; fogbadge
- engine_flag JohtoBadges, 4 ; mineralbadge
- engine_flag JohtoBadges, 5 ; stormbadge ; $20
- engine_flag JohtoBadges, 6 ; glacierbadge
- engine_flag JohtoBadges, 7 ; risingbadge
-
- engine_flag KantoBadges, 0 ; boulderbadge
- engine_flag KantoBadges, 1 ; cascadebadge
- engine_flag KantoBadges, 2 ; thunderbadge
- engine_flag KantoBadges, 3 ; rainbowbadge
- engine_flag KantoBadges, 4 ; soulbadge
- engine_flag KantoBadges, 5 ; marshbadge ; $28
- engine_flag KantoBadges, 6 ; volcanobadge
- engine_flag KantoBadges, 7 ; earthbadge
-
- ; unown sets
- engine_flag UnlockedUnowns, 0 ; 1
- engine_flag UnlockedUnowns, 1 ; 2
- engine_flag UnlockedUnowns, 2 ; 3
- engine_flag UnlockedUnowns, 3 ; 4
- engine_flag UnlockedUnowns, 4 ; 5
- engine_flag UnlockedUnowns, 5 ; 6 ; $30
- engine_flag UnlockedUnowns, 6 ; 7
- engine_flag UnlockedUnowns, 7 ; 8
-
- ; fly
- engine_flag VisitedSpawns, 0 ; your house
- engine_flag VisitedSpawns, 1 ; viridian pokecenter
- engine_flag VisitedSpawns, 2 ; pallet
- engine_flag VisitedSpawns, 3 ; viridian
- engine_flag VisitedSpawns, 4 ; pewter
- engine_flag VisitedSpawns, 5 ; cerulean ; $38
- engine_flag VisitedSpawns, 6 ; rock tunnel
- engine_flag VisitedSpawns, 7 ; vermilion
- engine_flag VisitedSpawns + 1, 0 ; lavender
- engine_flag VisitedSpawns + 1, 1 ; saffron
- engine_flag VisitedSpawns + 1, 2 ; celadon
- engine_flag VisitedSpawns + 1, 3 ; fuchsia
- engine_flag VisitedSpawns + 1, 4 ; cinnabar
- engine_flag VisitedSpawns + 1, 5 ; indigo plateau ; $40
- engine_flag VisitedSpawns + 1, 6 ; new bark
- engine_flag VisitedSpawns + 1, 7 ; cherrygrove
- engine_flag VisitedSpawns + 2, 0 ; violet
- ; union cave
- engine_flag VisitedSpawns + 2, 2 ; azalea
- engine_flag VisitedSpawns + 2, 3 ; cianwood
- engine_flag VisitedSpawns + 2, 4 ; goldenrod
- engine_flag VisitedSpawns + 2, 5 ; olivine
- engine_flag VisitedSpawns + 2, 6 ; ecruteak ; $48
- engine_flag VisitedSpawns + 2, 7 ; mahogany
- engine_flag VisitedSpawns + 3, 0 ; lake of rage
- engine_flag VisitedSpawns + 3, 1 ; blackthorn
- engine_flag VisitedSpawns + 3, 2 ; silver cave
- ; fast ship
- engine_flag VisitedSpawns + 3, 4 ; unused
-
- engine_flag wLuckyNumberShowFlag, 0 ; lucky number show
- engine_flag StatusFlags2, 3 ; ????
-
- engine_flag DailyFlags, 0 ; kurt making balls ; $50
- engine_flag DailyFlags, 1 ; ????
- engine_flag DailyFlags, 2 ; special wilddata?
- engine_flag DailyFlags, 3 ; time capsule (24h wait)
- engine_flag DailyFlags, 4 ; all fruit trees
- engine_flag DailyFlags, 5 ; shuckle given
- engine_flag DailyFlags, 6 ; goldenrod underground merchant closed
- engine_flag DailyFlags, 7 ; fought in trainer hall today
-
- engine_flag WeeklyFlags, 0 ; mt moon square clefairy ; $58
- engine_flag WeeklyFlags, 1 ; union cave lapras
- engine_flag WeeklyFlags, 2 ; goldenrod underground haircut used
- engine_flag WeeklyFlags, 3 ; goldenrod mall happiness event floor05 person07
- engine_flag WeeklyFlags, 4 ; tea in blues house
- engine_flag WeeklyFlags, 5 ; indigo plateau rival fight
- engine_flag WeeklyFlags, 6 ; move tutor
- engine_flag WeeklyFlags, 7 ; buenas password
-
- engine_flag SwarmFlags, 0 ; $60
- engine_flag SwarmFlags, 1 ; goldenrod dept store sale is on
-
- engine_flag GameTimerPause, 7 ; $62
-
- engine_flag PlayerGender, 0 ; player is female
-
- engine_flag wCelebiEvent, 2 ; have gs ball after kurt examined it
-
- ; rematches
- engine_flag wDailyRematchFlags, 0 ; jack
- engine_flag wDailyRematchFlags, 1 ; huey
- engine_flag wDailyRematchFlags, 2 ; gaven
- engine_flag wDailyRematchFlags, 3 ; beth ; $68
- engine_flag wDailyRematchFlags, 4 ; jose
- engine_flag wDailyRematchFlags, 5 ; reena
- engine_flag wDailyRematchFlags, 6 ; joey
- engine_flag wDailyRematchFlags, 7 ; wade
- engine_flag wDailyRematchFlags + 1, 0 ; ralph
- engine_flag wDailyRematchFlags + 1, 1 ; liz
- engine_flag wDailyRematchFlags + 1, 2 ; anthony
- engine_flag wDailyRematchFlags + 1, 3 ; todd ; $70
- engine_flag wDailyRematchFlags + 1, 4 ; gina
- engine_flag wDailyRematchFlags + 1, 5 ; arnie
- engine_flag wDailyRematchFlags + 1, 6 ; alan
- engine_flag wDailyRematchFlags + 1, 7 ; dana
- engine_flag wDailyRematchFlags + 2, 0 ; chad
- engine_flag wDailyRematchFlags + 2, 1 ; tully
- engine_flag wDailyRematchFlags + 2, 2 ; brent
- engine_flag wDailyRematchFlags + 2, 3 ; tiffany ; $78
- engine_flag wDailyRematchFlags + 2, 4 ; vance
- engine_flag wDailyRematchFlags + 2, 5 ; wilton
- engine_flag wDailyRematchFlags + 2, 6 ; parry
- engine_flag wDailyRematchFlags + 2, 7 ; erin
-
- engine_flag wDailyPhoneItemFlags, 0 ; beverly has nugget
- engine_flag wDailyPhoneItemFlags, 1 ; jose has star piece
- engine_flag wDailyPhoneItemFlags, 2 ; wade has item (see EVENT_WADE_HAS_*** in constants/event_flags.asm)
- engine_flag wDailyPhoneItemFlags, 3 ; gina has leaf stone ; $80
- engine_flag wDailyPhoneItemFlags, 4 ; alan has fire stone
- engine_flag wDailyPhoneItemFlags, 5 ; liz has thunderstone
- engine_flag wDailyPhoneItemFlags, 6 ; derek has nugget
- engine_flag wDailyPhoneItemFlags, 7 ; tully has water stone
-
- engine_flag wDailyPhoneItemFlags + 1, 0 ; tiffany has pink bow
- engine_flag wDailyPhoneItemFlags + 1, 1 ; wilton has item (see EVENT_WILTON_HAS_*** in constants/event_flags.asm)
-
- engine_flag wDailyPhoneTimeOfDayFlags, 0
- engine_flag wDailyPhoneTimeOfDayFlags, 1 ; $88
- engine_flag wDailyPhoneTimeOfDayFlags, 2
- engine_flag wDailyPhoneTimeOfDayFlags, 3
- engine_flag wDailyPhoneTimeOfDayFlags, 4
- engine_flag wDailyPhoneTimeOfDayFlags, 5
- engine_flag wDailyPhoneTimeOfDayFlags, 6
- engine_flag wDailyPhoneTimeOfDayFlags, 7
-
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 0
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 1 ; $90
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 2
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 3
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 4
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 5
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 6
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 7
-
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 0
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 1 ; $98
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 2
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 3
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 4
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 5
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 6
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 7
-
- engine_flag wPlayerSpriteSetupFlags, 2 ; female player has been transformed into male
-
- engine_flag SwarmFlags, 2 ; dunsparce swarm ; $a0
- engine_flag SwarmFlags, 3 ; yanma swarm
+INCLUDE "data/engine_flags.asm"
diff --git a/engine/european_mail.asm b/engine/european_mail.asm
new file mode 100644
index 000000000..8f037cc43
--- /dev/null
+++ b/engine/european_mail.asm
@@ -0,0 +1,129 @@
+IsMailEuropean: ; 1de5c8
+; return 1 if French
+; return 2 if German
+; return 3 if Italian
+; return 4 if Spanish
+; return 0 if none of the above
+ ld c, $0
+ ld hl, sPartyMon1MailAuthorNationality - sPartyMon1Mail
+ add hl, de
+ ld a, [hli]
+ cp "E"
+ ret nz
+ ld a, [hli]
+ inc c
+ cp "F"
+ ret z
+ inc c
+ cp "G"
+ ret z
+ inc c
+ cp "I"
+ ret z
+ inc c
+ cp "S"
+ ret z
+ ld c, $0
+ ret
+
+; The regular font.
+StandardEnglishFont: ; 1de5e6
+INCBIN "gfx/font/english.1bpp"
+
+; An extended font.
+FrenchGermanFont: ; 1de9e6
+INCBIN "gfx/font/french_german.1bpp"
+
+; An even more extended font.
+SpanishItalianFont: ; 1dede6
+INCBIN "gfx/font/spanish_italian.1bpp"
+
+HandleFrenchGermanMail: ; 1df1e6
+; called if mail is french or german
+; fix 's 't 'v
+ ld b, sPartyMon1MailAuthor - sPartyMon1Mail
+ ld h, d
+ ld l, e
+.loop
+ ld a, [hl]
+ cp $dc ; 's in french/german font
+ jr nz, .check_intermediate_chars
+ ld a, "'s"
+ jr .replace
+
+.check_intermediate_chars
+ sub "'s"
+ jr c, .dont_replace
+ cp "'v" - "'s" + 1
+ jr nc, .dont_replace
+ add $cd
+
+.replace
+ ld [hl], a
+
+.dont_replace
+ inc hl
+ dec b
+ jr nz, .loop
+ ret
+
+LireLeCourrierAnglais:
+DeutenEnglischenPost: ; 1df203
+; Cette fonction convertit certains des caractères anglais pour
+; leur équivalent dans le jeu de caractères français.
+; Diese Funktion wandelt bestimmte englische Zeichen, um ihre
+; Entsprechung in der Deutschen-Zeichensatz.
+ ld b, sPartyMon1MailAuthor - sPartyMon1Mail
+ ld h, d
+ ld l, e
+.loop
+ ld a, [hl]
+ cp "'s"
+ jr nz, .check_intermediate_chars
+ ld a, $dc
+ jr .replace
+
+.check_intermediate_chars
+ sub $cd
+ jr c, .dont_replace
+ cp "'v" - "'s" + 1
+ jr nc, .dont_replace
+ add "'s"
+
+.replace
+ ld [hl], a
+
+.dont_replace
+ inc hl
+ dec b
+ jr nz, .loop
+ ret
+
+HandleSpanishItalianMail: ; 1df220
+LeerCorreosIngleses:
+LeggiPostaInglese:
+; This function converts certain characters between
+; the English and Spanish/Italian character sets.
+; Esta función convierte ciertos caracteres entre
+; el juego de caracteres Inglés y Español.
+; Questa funzione converte alcuni caratteri tra
+; l'inglese e il set di caratteri italiani.
+ ld b, sPartyMon1MailAuthor - sPartyMon1Mail
+ ld h, d
+ ld l, e
+.loop
+ ld a, [hl]
+ and $f0
+ cp $d0
+ jr nz, .dont_replace
+ ld a, [hl]
+ add $8
+ and $f
+ or $d0
+ ld [hl], a
+
+.dont_replace
+ inc hl
+ dec b
+ jr nz, .loop
+ ret
diff --git a/engine/events.asm b/engine/events.asm
index b8d57118e..9b26893e7 100644
--- a/engine/events.asm
+++ b/engine/events.asm
@@ -120,14 +120,14 @@ StartMap: ; 96724
ld hl, MapStatus
ld bc, wMapStatusEnd - MapStatus
call ByteFill
- callba InitCallReceiveDelay
+ farcall InitCallReceiveDelay
call ClearJoypad
EnterMap: ; 9673e
xor a
ld [wXYComparePointer], a
ld [wXYComparePointer + 1], a
call SetUpFiveStepWildEncounterCooldown
- callba RunMapSetupScript
+ farcall RunMapSetupScript
call DisableEvents
ld a, [hMapEntryMethod]
@@ -159,7 +159,7 @@ UnusedWait30Frames: ; 9676d
HandleMap: ; 96773
call ResetOverworldDelay
call HandleMapTimeAndJoypad
- callba HandleCmdQueue ; no need to farcall
+ farcall HandleCmdQueue ; no need to farcall
call MapEvents
; Not immediately entering a connected map will cause problems.
@@ -188,7 +188,7 @@ MapEvents: ; 96795
.events ; 967a1
call PlayerEvents
call DisableEvents
- callba ScriptEvents
+ farcall ScriptEvents
ret
; 967ae
@@ -227,16 +227,16 @@ HandleMapTimeAndJoypad: ; 967c1
; 967d1
HandleMapObjects: ; 967d1
- callba HandleNPCStep ; engine/map_objects.asm
- callba _HandlePlayerStep
+ farcall HandleNPCStep ; engine/map_objects.asm
+ farcall _HandlePlayerStep
call _CheckObjectEnteringVisibleRange
ret
; 967e1
HandleMapBackground: ; 967e1
- callba _UpdateSprites
- callba ScrollScreen
- callba PlaceMapNameSign
+ farcall _UpdateSprites
+ farcall ScrollScreen
+ farcall PlaceMapNameSign
ret
; 967f4
@@ -264,7 +264,7 @@ _CheckObjectEnteringVisibleRange: ; 96812
ld hl, wPlayerStepFlags
bit 6, [hl]
ret z
- callba CheckObjectEnteringVisibleRange
+ farcall CheckObjectEnteringVisibleRange
ret
; 9681f
@@ -286,7 +286,7 @@ PlayerEvents: ; 9681f
call RunMemScript
jr c, .ok
- call DoMapTrigger
+ call RunSceneScript
jr c, .ok
call CheckTimeEvents
@@ -300,7 +300,7 @@ PlayerEvents: ; 9681f
.ok
push af
- callba EnableScriptMode
+ farcall EnableScriptMode
pop af
ld [ScriptRunning], a
@@ -335,12 +335,12 @@ CheckTrainerBattle3: ; 96867
; 96874
CheckTileEvent: ; 96874
-; Check for warps, tile triggers or wild battles.
+; Check for warps, coord events, or wild battles.
call CheckWarpConnxnScriptFlag
jr z, .connections_disabled
- callba CheckMovingOffEdgeOfMap
+ farcall CheckMovingOffEdgeOfMap
jr c, .map_connection
call CheckWarpTile
@@ -350,7 +350,7 @@ CheckTileEvent: ; 96874
call CheckCoordEventScriptFlag
jr z, .coord_events_disabled
- call CheckCurrentMapXYTriggers
+ call CheckCurrentMapCoordEvents
jr c, .coord_event
.coord_events_disabled
@@ -437,19 +437,19 @@ Dummy_CheckScriptFlags3Bit5: ; 968e4
ret
; 968ec
-DoMapTrigger: ; 968ec
- ld a, [wCurrMapTriggerCount]
+RunSceneScript: ; 968ec
+ ld a, [wCurrMapSceneScriptCount]
and a
jr z, .nope
ld c, a
- call CheckTriggers
+ call CheckScenes
cp c
jr nc, .nope
ld e, a
ld d, 0
- ld hl, wCurrMapTriggerHeaderPointer
+ ld hl, wCurrMapSceneScriptHeaderPointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -465,8 +465,8 @@ endr
ld hl, ScriptFlags
res 3, [hl]
- callba EnableScriptMode
- callba ScriptEvents
+ farcall EnableScriptMode
+ farcall ScriptEvents
ld hl, ScriptFlags
bit 3, [hl]
@@ -495,15 +495,15 @@ CheckTimeEvents: ; 9693a
bit 2, [hl] ; bug contest
jr z, .do_daily
- callba CheckBugContestTimer
+ farcall CheckBugContestTimer
jr c, .end_bug_contest
xor a
ret
.do_daily
- callba CheckDailyResetTimer
- callba CheckPokerusTick
- callba CheckPhoneCall
+ farcall CheckDailyResetTimer
+ farcall CheckPokerusTick
+ farcall CheckPhoneCall
ret c
.nothing
@@ -532,7 +532,7 @@ OWPlayerInput: ; 96974
jr nz, .NoAction
; Can't perform button actions while sliding on ice.
- callba CheckStandingOnIce
+ farcall CheckStandingOnIce
jr c, .NoAction
call CheckAPressOW
@@ -547,7 +547,7 @@ OWPlayerInput: ; 96974
.Action:
push af
- callba StopPlayerForEvent
+ farcall StopPlayerForEvent
pop af
scf
ret
@@ -559,9 +559,9 @@ CheckAPressOW: ; 96999
ret z
call TryObjectEvent
ret c
- call TryReadSign
+ call TryBGEvent
ret c
- call CheckFacingTileEvent
+ call TryTileCollisionEvent
ret c
xor a
ret
@@ -576,7 +576,7 @@ PlayTalkObject: ; 969ac
; 969b5
TryObjectEvent: ; 969b5
- callba CheckFacingObject
+ farcall CheckFacingObject
jr c, .IsObject
xor a
ret
@@ -617,14 +617,14 @@ TryObjectEvent: ; 969b5
ret
.pointers
- dbw PERSONTYPE_SCRIPT, .script
- dbw PERSONTYPE_ITEMBALL, .itemball
- dbw PERSONTYPE_TRAINER, .trainer
+ dbw OBJECTTYPE_SCRIPT, .script
+ dbw OBJECTTYPE_ITEMBALL, .itemball
+ dbw OBJECTTYPE_TRAINER, .trainer
; the remaining four are dummy events
- dbw PERSONTYPE_3, .three
- dbw PERSONTYPE_4, .four
- dbw PERSONTYPE_5, .five
- dbw PERSONTYPE_6, .six
+ dbw OBJECTTYPE_3, .three
+ dbw OBJECTTYPE_4, .four
+ dbw OBJECTTYPE_5, .five
+ dbw OBJECTTYPE_6, .six
db -1
; 96a04
@@ -681,19 +681,19 @@ TryObjectEvent: ; 969b5
ret
; 96a38
-TryReadSign: ; 96a38
- call CheckFacingSign
- jr c, .IsSign
+TryBGEvent: ; 96a38
+ call CheckFacingBGEvent
+ jr c, .is_bg_event
xor a
ret
-.IsSign:
+.is_bg_event:
ld a, [EngineBuffer3]
- ld hl, .signs
+ ld hl, .bg_events
rst JumpTable
ret
-.signs
+.bg_events
dw .read
dw .up
dw .down
@@ -736,7 +736,7 @@ TryReadSign: ; 96a38
ret
.itemifset
- call CheckSignFlag
+ call CheckBGEventFlag
jp nz, .dontread
call PlayTalkObject
call GetMapScriptHeaderBank
@@ -750,7 +750,7 @@ TryReadSign: ; 96a38
ret
.copy
- call CheckSignFlag
+ call CheckBGEventFlag
jr nz, .dontread
call GetMapScriptHeaderBank
ld de, EngineBuffer1
@@ -759,12 +759,12 @@ TryReadSign: ; 96a38
jr .dontread
.ifset
- call CheckSignFlag
+ call CheckBGEventFlag
jr z, .dontread
jr .thenread
.ifnotset
- call CheckSignFlag
+ call CheckBGEventFlag
jr nz, .dontread
.thenread
@@ -785,7 +785,7 @@ TryReadSign: ; 96a38
ret
; 96ad8
-CheckSignFlag: ; 96ad8
+CheckBGEventFlag: ; 96ad8
ld hl, EngineBuffer4
ld a, [hli]
ld h, [hl]
@@ -804,7 +804,7 @@ CheckSignFlag: ; 96ad8
; 96af0
PlayerMovement: ; 96af0
- callba DoPlayerMovement
+ farcall DoPlayerMovement
ld a, c
ld hl, .pointers
rst JumpTable
@@ -934,7 +934,7 @@ CountStep: ; 96b79
jr nz, .done
; If there is a special phone call, don't count the step.
- callba CheckSpecialPhoneCall
+ farcall CheckSpecialPhoneCall
jr c, .doscript
; If Repel wore off, don't count the step.
@@ -949,7 +949,7 @@ CountStep: ; 96b79
; Every 256 steps, increase the happiness of all your Pokemon.
jr nz, .skip_happiness
- callba StepHappiness
+ farcall StepHappiness
.skip_happiness
; Every 256 steps, offset from the happiness incrementor by 128 steps,
@@ -959,12 +959,12 @@ CountStep: ; 96b79
cp $80
jr nz, .skip_egg
- callba DoEggStep
+ farcall DoEggStep
jr nz, .hatch
.skip_egg
; Increase the EXP of (both) DayCare Pokemon by 1.
- callba DaycareStep
+ farcall DayCareStep
; Every four steps, deal damage to all Poisoned Pokemon
ld hl, PoisonStepCount
@@ -973,11 +973,11 @@ CountStep: ; 96b79
jr c, .skip_poison
ld [hl], 0
- callba DoPoisonStep
+ farcall DoPoisonStep
jr c, .doscript
.skip_poison
- callba DoBikeStep
+ farcall DoBikeStep
.done
xor a
diff --git a/engine/events_2.asm b/engine/events_2.asm
index 42e3ed8e4..12476bd31 100644
--- a/engine/events_2.asm
+++ b/engine/events_2.asm
@@ -50,42 +50,42 @@ LoadScriptBDE:: ; 97c4f
ret
; 97c5f
-CheckFacingTileEvent:: ; 97c5f
+TryTileCollisionEvent:: ; 97c5f
call GetFacingTileCoord
ld [EngineBuffer1], a
ld c, a
- callba CheckFacingTileForStd
+ farcall CheckFacingTileForStdScript
jr c, .done
call CheckCutTreeTile
jr nz, .whirlpool
- callba TryCutOW
+ farcall TryCutOW
jr .done
.whirlpool
ld a, [EngineBuffer1]
call CheckWhirlpoolTile
jr nz, .waterfall
- callba TryWhirlpoolOW
+ farcall TryWhirlpoolOW
jr .done
.waterfall
ld a, [EngineBuffer1]
call CheckWaterfallTile
jr nz, .headbutt
- callba TryWaterfallOW
+ farcall TryWaterfallOW
jr .done
.headbutt
ld a, [EngineBuffer1]
call CheckHeadbuttTreeTile
jr nz, .surf
- callba TryHeadbuttOW
+ farcall TryHeadbuttOW
jr c, .done
jr .noevent
.surf
- callba TrySurfOW
+ farcall TrySurfOW
jr nc, .noevent
jr .done
@@ -111,7 +111,7 @@ RandomEncounter:: ; 97cc0
ld hl, StatusFlags2
bit 2, [hl] ; bug contest
jr nz, .bug_contest
- callba TryWildEncounter
+ farcall TryWildEncounter
jr nz, .nope
jr .ok
@@ -152,12 +152,12 @@ CanUseSweetScent:: ; 97cfd
ld hl, StatusFlags
bit 5, [hl]
jr nz, .no
- ld a, [wPermission]
+ ld a, [wEnvironment]
cp CAVE
jr z, .ice_check
cp DUNGEON
jr z, .ice_check
- callba CheckGrassCollision
+ farcall CheckGrassCollision
jr nc, .no
.ice_check
@@ -176,7 +176,7 @@ _TryWildEncounter_BugContest: ; 97d23
call TryWildEncounter_BugContest
ret nc
call ChooseWildEncounter_BugContest
- callba CheckRepelEffect
+ farcall CheckRepelEffect
ret
; 97d31
@@ -242,8 +242,8 @@ TryWildEncounter_BugContest: ; 97d64
ld b, 20 percent
.ok
- callba ApplyMusicEffectOnEncounterRate
- callba ApplyCleanseTagEffectOnEncounterRate
+ farcall ApplyMusicEffectOnEncounterRate
+ farcall ApplyCleanseTagEffectOnEncounterRate
call Random
ld a, [hRandomAdd]
cp b
@@ -253,20 +253,9 @@ TryWildEncounter_BugContest: ; 97d64
ret
; 97d87
-ContestMons: ; 97d87
- ; %, species, min, max
- db 20, CATERPIE, 7, 18
- db 20, WEEDLE, 7, 18
- db 10, METAPOD, 9, 18
- db 10, KAKUNA, 9, 18
- db 5, BUTTERFREE, 12, 15
- db 5, BEEDRILL, 12, 15
- db 10, VENONAT, 10, 16
- db 10, PARAS, 10, 17
- db 5, SCYTHER, 13, 14
- db 5, PINSIR, 13, 14
- db -1, VENOMOTH, 30, 40
-; 97db3
+
+INCLUDE "data/wild/bug_contest_mons.asm"
+
DoBikeStep:: ; 97db3
nop
@@ -627,7 +616,7 @@ CmdQueue_StoneTable: ; 97f42
ld hl, OBJECT_MOVEMENTTYPE
add hl, de
ld a, [hl]
- cp STEP_TYPE_SKYFALL_TOP
+ cp SPRITEMOVEDATA_STRENGTH_BOULDER
jr nz, .next
ld hl, OBJECT_NEXT_TILE
diff --git a/engine/events_3.asm b/engine/events_3.asm
index b6aaea3b7..3d662c332 100755
--- a/engine/events_3.asm
+++ b/engine/events_3.asm
@@ -1,14 +1,14 @@
ReturnFromMapSetupScript:: ; b8000
xor a
ld [hBGMapMode], a
- ; For some reson, GameFreak chose to use a callba here instead of just falling through.
+ ; For some reson, GameFreak chose to use a farcall here instead of just falling through.
; No other function in the game references the function at 2E:400A, here labeled
- ; ReturnFromMapSetupScript.inefficientcallba.
- callba .inefficientcallba ; this is a waste of 6 ROM bytes and 6 stack bytes
+ ; ReturnFromMapSetupScript.inefficient_farcall.
+ farcall .inefficient_farcall ; this is a waste of 6 ROM bytes and 6 stack bytes
ret
; b800a
-.inefficientcallba ; b800a
+.inefficient_farcall ; b800a
ld a, [MapGroup]
ld b, a
ld a, [MapNumber]
@@ -18,7 +18,7 @@ ReturnFromMapSetupScript:: ; b8000
call .CheckNationalParkGate
jr z, .nationalparkgate
- call GetMapPermission
+ call GetMapEnvironment
cp GATE
jr nz, .not_gate
@@ -45,7 +45,7 @@ ReturnFromMapSetupScript:: ; b8000
ld [wLandmarkSignTimer], a
call LoadMapNameSignGFX
call InitMapNameFrame
- callba HDMATransfer_OnlyTopFourRows
+ farcall HDMATransfer_OnlyTopFourRows
ret
.dont_do_map_sign
@@ -78,7 +78,7 @@ ReturnFromMapSetupScript:: ; b8000
ret z
cp LAV_RADIO_TOWER
ret z
- cp UNDERGROUND
+ cp UNDERGROUND_PATH
ret z
cp INDIGO_PLATEAU
ret z
@@ -113,7 +113,7 @@ PlaceMapNameSign:: ; b8098 (2e:4098)
jr nz, .skip2
call InitMapNameFrame
call PlaceMapNameCenterAlign
- callba HDMATransfer_OnlyTopFourRows
+ farcall HDMATransfer_OnlyTopFourRows
.skip2
ld a, $80
ld a, $70
@@ -151,7 +151,7 @@ InitMapNameFrame: ; b80d3
PlaceMapNameCenterAlign: ; b80e1 (2e:40e1)
ld a, [wCurrentLandmark]
ld e, a
- callba GetLandmarkName
+ farcall GetLandmarkName
call .GetNameLength
ld a, SCREEN_WIDTH
sub c
@@ -283,30 +283,30 @@ CheckForHiddenItems: ; b8172
ld a, [YCoord]
add SCREEN_HEIGHT / 4
ld [Buffer3], a
-; Get the pointer for the first signpost header in the map...
- ld hl, wCurrentMapSignpostHeaderPointer
+; Get the pointer for the first BG event header in the map...
+ ld hl, wCurrMapBGEventHeaderPointer
ld a, [hli]
ld h, [hl]
ld l, a
-; ... before even checking to see if there are any signposts on this map.
- ld a, [wCurrentMapSignpostCount]
+; ... before even checking to see if there are any BG events on this map.
+ ld a, [wCurrMapBGEventCount]
and a
- jr z, .nosignpostitems
-; For i = 1:wCurrentMapSignpostCount...
+ jr z, .nobgeventitems
+; For i = 1:wCurrMapBGEventCount...
.loop
-; Store the counter in Buffer2, and store the signpost header pointer in the stack.
+; Store the counter in Buffer2, and store the BG event header pointer in the stack.
ld [Buffer2], a
push hl
-; Get the Y coordinate of the signpost.
+; Get the Y coordinate of the BG event.
call .GetFarByte
ld e, a
-; Is the Y coordinate of the signpost on the screen? If not, go to the next signpost.
+; Is the Y coordinate of the BG event on the screen? If not, go to the next BG event.
ld a, [Buffer3]
sub e
jr c, .next
cp SCREEN_HEIGHT / 2
jr nc, .next
-; Is the X coordinate of the signpost on the screen? If not, go to the next signpost.
+; Is the X coordinate of the BG event on the screen? If not, go to the next BG event.
call .GetFarByte
ld d, a
ld a, [Buffer4]
@@ -314,9 +314,9 @@ CheckForHiddenItems: ; b8172
jr c, .next
cp SCREEN_WIDTH / 2
jr nc, .next
-; Is this signpost a hidden item? If not, go to the next signpost.
+; Is this BG event a hidden item? If not, go to the next BG event.
call .GetFarByte
- cp SIGNPOST_ITEM
+ cp BGEVENT_ITEM
jr nz, .next
; Has this item already been found? If not, set off the Itemfinder.
ld a, [Buffer1]
@@ -332,16 +332,16 @@ CheckForHiddenItems: ; b8172
jr z, .itemnearby
.next
-; Restore the signpost header pointer and increment it by the length of a signpost header.
+; Restore the BG event header pointer and increment it by the length of a BG event header.
pop hl
ld bc, 5
add hl, bc
-; Restore the signpost counter and decrement it. If it hits zero, there are no hidden items in range.
+; Restore the BG event counter and decrement it. If it hits zero, there are no hidden items in range.
ld a, [Buffer2]
dec a
jr nz, .loop
-.nosignpostitems
+.nobgeventitems
xor a
ret
@@ -360,7 +360,7 @@ CheckForHiddenItems: ; b8172
TreeMonEncounter: ; b81ea
- callba TrainerRankings_TreeEncounters
+ farcall TrainerRankings_TreeEncounters
xor a
ld [TempWildMonSpecies], a
@@ -455,55 +455,7 @@ GetTreeMonSet: ; b823f
ret
; b825e
-TreeMonMaps: ; b825e
-treemon_map: macro
- map \1
- db \2 ; treemon set
-endm
- treemon_map ROUTE_26, 4
- treemon_map ROUTE_27, 4
- treemon_map ROUTE_28, 0
- treemon_map ROUTE_29, 3
- treemon_map ROUTE_30, 3
- treemon_map ROUTE_31, 3
- treemon_map ROUTE_32, 4
- treemon_map ROUTE_33, 2
- treemon_map ROUTE_34, 3
- treemon_map ROUTE_35, 3
- treemon_map ROUTE_36, 3
- treemon_map ROUTE_37, 3
- treemon_map ROUTE_38, 3
- treemon_map ROUTE_39, 3
- treemon_map ROUTE_40, 0
- treemon_map ROUTE_41, 0
- treemon_map ROUTE_42, 2
- treemon_map ROUTE_43, 5
- treemon_map ROUTE_44, 1
- treemon_map ROUTE_45, 1
- treemon_map ROUTE_46, 1
- treemon_map NEW_BARK_TOWN, 0
- treemon_map CHERRYGROVE_CITY, 0
- treemon_map VIOLET_CITY, 0
- treemon_map AZALEA_TOWN, 2
- treemon_map CIANWOOD_CITY, 0
- treemon_map GOLDENROD_CITY, 0
- treemon_map OLIVINE_CITY, 0
- treemon_map ECRUTEAK_CITY, 0
- treemon_map MAHOGANY_TOWN, 0
- treemon_map LAKE_OF_RAGE, 5
- treemon_map BLACKTHORN_CITY, 0
- treemon_map SILVER_CAVE_OUTSIDE, 0
- treemon_map ILEX_FOREST, 6
- db -1
-; b82c5
-
-RockMonMaps: ; b82c5
- treemon_map CIANWOOD_CITY, 7
- treemon_map ROUTE_40, 7
- treemon_map DARK_CAVE_VIOLET_ENTRANCE, 7
- treemon_map SLOWPOKE_WELL_B1F, 7
- db -1
-; b82d2
+INCLUDE "data/wild/treemon_maps.asm"
GetTreeMons: ; b82d2
; Return the address of TreeMon table a in hl.
@@ -533,128 +485,7 @@ GetTreeMons: ; b82d2
ret
; b82e8
-TreeMons: ; b82e8
- dw TreeMons1
- dw TreeMons1
- dw TreeMons2
- dw TreeMons3
- dw TreeMons4
- dw TreeMons5
- dw TreeMons6
- dw RockMons
- dw TreeMons1
-
-; Two tables each (normal, rare).
-; Structure:
-; db %, species, level
-
-TreeMons1: ; b82fa
- db 50, SPEAROW, 10
- db 15, SPEAROW, 10
- db 15, SPEAROW, 10
- db 10, AIPOM, 10
- db 5, AIPOM, 10
- db 5, AIPOM, 10
- db -1
-
- db 50, SPEAROW, 10
- db 15, HERACROSS, 10
- db 15, HERACROSS, 10
- db 10, AIPOM, 10
- db 5, AIPOM, 10
- db 5, AIPOM, 10
- db -1
-
-TreeMons2: ; b8320
- db 50, SPEAROW, 10
- db 15, EKANS, 10
- db 15, SPEAROW, 10
- db 10, AIPOM, 10
- db 5, AIPOM, 10
- db 5, AIPOM, 10
- db -1
-
- db 50, SPEAROW, 10
- db 15, HERACROSS, 10
- db 15, HERACROSS, 10
- db 10, AIPOM, 10
- db 5, AIPOM, 10
- db 5, AIPOM, 10
- db -1
-
-TreeMons3: ; b8346
- db 50, HOOTHOOT, 10
- db 15, SPINARAK, 10
- db 15, LEDYBA, 10
- db 10, EXEGGCUTE, 10
- db 5, EXEGGCUTE, 10
- db 5, EXEGGCUTE, 10
- db -1
-
- db 50, HOOTHOOT, 10
- db 15, PINECO, 10
- db 15, PINECO, 10
- db 10, EXEGGCUTE, 10
- db 5, EXEGGCUTE, 10
- db 5, EXEGGCUTE, 10
- db -1
-
-TreeMons4: ; b836c
- db 50, HOOTHOOT, 10
- db 15, EKANS, 10
- db 15, HOOTHOOT, 10
- db 10, EXEGGCUTE, 10
- db 5, EXEGGCUTE, 10
- db 5, EXEGGCUTE, 10
- db -1
-
- db 50, HOOTHOOT, 10
- db 15, PINECO, 10
- db 15, PINECO, 10
- db 10, EXEGGCUTE, 10
- db 5, EXEGGCUTE, 10
- db 5, EXEGGCUTE, 10
- db -1
-
-TreeMons5: ; b8392
- db 50, HOOTHOOT, 10
- db 15, VENONAT, 10
- db 15, HOOTHOOT, 10
- db 10, EXEGGCUTE, 10
- db 5, EXEGGCUTE, 10
- db 5, EXEGGCUTE, 10
- db -1
-
- db 50, HOOTHOOT, 10
- db 15, PINECO, 10
- db 15, PINECO, 10
- db 10, EXEGGCUTE, 10
- db 5, EXEGGCUTE, 10
- db 5, EXEGGCUTE, 10
- db -1
-
-TreeMons6: ; b83b8
- db 50, HOOTHOOT, 10
- db 15, PINECO, 10
- db 15, PINECO, 10
- db 10, NOCTOWL, 10
- db 5, BUTTERFREE, 10
- db 5, BEEDRILL, 10
- db -1
-
- db 50, HOOTHOOT, 10
- db 15, CATERPIE, 10
- db 15, WEEDLE, 10
- db 10, HOOTHOOT, 10
- db 5, METAPOD, 10
- db 5, KAKUNA, 10
- db -1
-
-RockMons: ; b83de
- db 90, KRABBY, 15
- db 10, SHUCKLE, 15
- db -1
-; b83e5
+INCLUDE "data/wild/treemons.asm"
GetTreeMon: ; b83e5
push hl
diff --git a/engine/evolution_animation.asm b/engine/evolution_animation.asm
index 2f1c4c522..dd09f9eda 100755
--- a/engine/evolution_animation.asm
+++ b/engine/evolution_animation.asm
@@ -36,7 +36,7 @@ EvolutionAnimation: ; 4e5e1
ld de, MUSIC_NONE
call PlayMusic
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld de, .GFX
ld hl, VTiles0
@@ -106,7 +106,7 @@ EvolutionAnimation: ; 4e5e1
ld c, $0
call .GetSGBLayout
call .PlayEvolvedSFX
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call .check_statused
jr c, .no_anim
@@ -143,7 +143,7 @@ EvolutionAnimation: ; 4e5e1
ld c, $0
call .GetSGBLayout
call .PlayEvolvedSFX
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call .check_statused
ret c
@@ -168,7 +168,7 @@ EvolutionAnimation: ; 4e5e1
ld a, $1
ld [wBoxAlignment], a
ld de, VTiles2
- predef FrontpicPredef
+ predef GetAnimatedFrontpicPredef
xor a
ld [wBoxAlignment], a
ret
@@ -263,7 +263,7 @@ EvolutionAnimation: ; 4e5e1
call GetPartyLocation
ld b, h
ld c, l
- callba CheckFaintedFrzSlp
+ farcall CheckFaintedFrzSlp
ret
; 4e7a6
@@ -316,7 +316,7 @@ EvolutionAnimation: ; 4e5e1
.GenerateBallOfLight: ; 4e7e8
push de
depixel 9, 11
- ld a, SPRITE_ANIM_INDEX_13
+ ld a, SPRITE_ANIM_INDEX_EVOLUTION_BALL_OF_LIGHT
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
@@ -337,7 +337,7 @@ EvolutionAnimation: ; 4e5e1
.AnimateBallsOfLight: ; 4e80c
push bc
- callab PlaySpriteAnimations
+ callfar PlaySpriteAnimations
; a = (([hVBlankCounter] + 4) / 2) % NUM_PALETTES
ld a, [hVBlankCounter]
and %1110
diff --git a/engine/evolve.asm b/engine/evolve.asm
index 3dc5d20b7..c335229d6 100755
--- a/engine/evolve.asm
+++ b/engine/evolve.asm
@@ -133,13 +133,13 @@ EvolveAfterBattle_MasterLoop
; TR_NITE
ld a, [TimeOfDay]
- cp NITE
+ cp NITE_F
jp nz, .dont_evolve_3
jr .proceed
.happiness_daylight
ld a, [TimeOfDay]
- cp NITE
+ cp NITE_F
jp z, .dont_evolve_3
jr .proceed
@@ -225,7 +225,7 @@ EvolveAfterBattle_MasterLoop
ld [hBGMapMode], a
call ClearSprites
- callba EvolutionAnimation
+ farcall EvolutionAnimation
push af
call ClearSprites
@@ -247,7 +247,7 @@ EvolveAfterBattle_MasterLoop
push hl
ld hl, Text_EvolvedIntoPKMN
call PrintTextBoxText
- callba TrainerRankings_MonsEvolved
+ farcall TrainerRankings_MonsEvolved
ld de, MUSIC_NONE
call PlayMusic
@@ -312,7 +312,7 @@ EvolveAfterBattle_MasterLoop
ld hl, TempMonDVs
predef GetUnownLetter
- callab UpdateUnownDex
+ callfar UpdateUnownDex
.skip_unown
pop de
diff --git a/engine/experience.asm b/engine/experience.asm
new file mode 100644
index 000000000..c33aaf02a
--- /dev/null
+++ b/engine/experience.asm
@@ -0,0 +1,162 @@
+CalcLevel: ; 50e1b
+ ld a, [TempMonSpecies]
+ ld [CurSpecies], a
+ call GetBaseData
+ ld d, 1
+.next_level
+ inc d
+ ld a, d
+ cp (MAX_LEVEL + 1) % $100
+ jr z, .got_level
+ call CalcExpAtLevel
+ push hl
+ ld hl, TempMonExp + 2
+ ld a, [hProduct + 3]
+ ld c, a
+ ld a, [hld]
+ sub c
+ ld a, [hProduct + 2]
+ ld c, a
+ ld a, [hld]
+ sbc c
+ ld a, [hProduct + 1]
+ ld c, a
+ ld a, [hl]
+ sbc c
+ pop hl
+ jr nc, .next_level
+
+.got_level
+ dec d
+ ret
+
+CalcExpAtLevel: ; 50e47
+; (a/b)*n**3 + c*n**2 + d*n - e
+ ld a, [BaseGrowthRate]
+ add a
+ add a
+ ld c, a
+ ld b, 0
+ ld hl, GrowthRates
+ add hl, bc
+; Cube the level
+ call .LevelSquared
+ ld a, d
+ ld [hMultiplier], a
+ call Multiply
+
+; Multiply by a
+ ld a, [hl]
+ and $f0
+ swap a
+ ld [hMultiplier], a
+ call Multiply
+; Divide by b
+ ld a, [hli]
+ and $f
+ ld [hDivisor], a
+ ld b, 4
+ call Divide
+; Push the cubic term to the stack
+ ld a, [hQuotient + 0]
+ push af
+ ld a, [hQuotient + 1]
+ push af
+ ld a, [hQuotient + 2]
+ push af
+; Square the level and multiply by the lower 7 bits of c
+ call .LevelSquared
+ ld a, [hl]
+ and $7f
+ ld [hMultiplier], a
+ call Multiply
+; Push the absolute value of the quadratic term to the stack
+ ld a, [hProduct + 1]
+ push af
+ ld a, [hProduct + 2]
+ push af
+ ld a, [hProduct + 3]
+ push af
+ ld a, [hli]
+ push af
+; Multiply the level by d
+ xor a
+ ld [hMultiplicand + 0], a
+ ld [hMultiplicand + 1], a
+ ld a, d
+ ld [hMultiplicand + 2], a
+ ld a, [hli]
+ ld [hMultiplier], a
+ call Multiply
+; Subtract e
+ ld b, [hl]
+ ld a, [hProduct + 3]
+ sub b
+ ld [hMultiplicand + 2], a
+ ld b, $0
+ ld a, [hProduct + 2]
+ sbc b
+ ld [hMultiplicand + 1], a
+ ld a, [hProduct + 1]
+ sbc b
+ ld [hMultiplicand], a
+; If bit 7 of c is set, c is negative; otherwise, it's positive
+ pop af
+ and $80
+ jr nz, .subtract
+; Add c*n**2 to (d*n - e)
+ pop bc
+ ld a, [hProduct + 3]
+ add b
+ ld [hMultiplicand + 2], a
+ pop bc
+ ld a, [hProduct + 2]
+ adc b
+ ld [hMultiplicand + 1], a
+ pop bc
+ ld a, [hProduct + 1]
+ adc b
+ ld [hMultiplicand], a
+ jr .done_quadratic
+
+.subtract
+; Subtract c*n**2 from (d*n - e)
+ pop bc
+ ld a, [hProduct + 3]
+ sub b
+ ld [hMultiplicand + 2], a
+ pop bc
+ ld a, [hProduct + 2]
+ sbc b
+ ld [hMultiplicand + 1], a
+ pop bc
+ ld a, [hProduct + 1]
+ sbc b
+ ld [hMultiplicand], a
+
+.done_quadratic
+; Add (a/b)*n**3 to (d*n - e +/- c*n**2)
+ pop bc
+ ld a, [hProduct + 3]
+ add b
+ ld [hMultiplicand + 2], a
+ pop bc
+ ld a, [hProduct + 2]
+ adc b
+ ld [hMultiplicand + 1], a
+ pop bc
+ ld a, [hProduct + 1]
+ adc b
+ ld [hMultiplicand], a
+ ret
+
+.LevelSquared: ; 50eed
+ xor a
+ ld [hMultiplicand + 0], a
+ ld [hMultiplicand + 1], a
+ ld a, d
+ ld [hMultiplicand + 2], a
+ ld [hMultiplier], a
+ jp Multiply
+
+INCLUDE "data/growth_rates.asm"
diff --git a/engine/facings.asm b/engine/facings.asm
deleted file mode 100644
index ee9efec3f..000000000
--- a/engine/facings.asm
+++ /dev/null
@@ -1,268 +0,0 @@
-Facings: ; 4049
- dw FacingStepDown0
- dw FacingStepDown1
- dw FacingStepDown2
- dw FacingStepDown3
- dw FacingStepUp0
- dw FacingStepUp1
- dw FacingStepUp2
- dw FacingStepUp3
- dw FacingStepLeft0
- dw FacingStepLeft1
- dw FacingStepLeft2
- dw FacingStepLeft3
- dw FacingStepRight0
- dw FacingStepRight1
- dw FacingStepRight2
- dw FacingStepRight3
- dw FacingFishDown
- dw FacingFishUp
- dw FacingFishLeft
- dw FacingFishRight
- dw FacingEmote
- dw FacingShadow
- dw FacingBigDollAsymmetric
- dw FacingBigDollSymmetric
- dw FacingWeirdTree0
- dw FacingWeirdTree1
- dw FacingWeirdTree2
- dw FacingWeirdTree3
- dw FacingBoulderDust1
- dw FacingBoulderDust2
- dw FacingGrass1
- dw FacingGrass2
-FacingsEnd: dw 0
-
-NUM_FACINGS EQU (FacingsEnd - Facings) / 2
-
-
-; Tables used as a reference to transform OAM data.
-
-; Format:
-; db y, x, attributes, tile index
-
-; Attributes:
-X_FLIP EQU 1 << OAM_X_FLIP
-Y_FLIP EQU 1 << OAM_Y_FLIP
-BEHIND_BG EQU 1 << OAM_PRIORITY
-
-
-FacingStepDown0:
-FacingStepDown2:
-FacingWeirdTree0:
-FacingWeirdTree2: ; standing down
- db 4 ; #
- db 0, 0, 0, $00
- db 0, 8, 0, $01
- db 8, 0, 2, $02
- db 8, 8, 2, $03
-; 409c
-
-FacingStepDown1: ; walking down 1
- db 4 ; #
- db 0, 0, 0, $80
- db 0, 8, 0, $81
- db 8, 0, 2, $82
- db 8, 8, 2, $83
-; 40ad
-
-FacingStepDown3: ; walking down 2
- db 4 ; #
- db 0, 8, X_FLIP, $80
- db 0, 0, X_FLIP, $81
- db 8, 8, 2 | X_FLIP, $82
- db 8, 0, 2 | X_FLIP, $83
-; 40be
-
-FacingStepUp0:
-FacingStepUp2: ; standing up
- db 4 ; #
- db 0, 0, 0, $04
- db 0, 8, 0, $05
- db 8, 0, 2, $06
- db 8, 8, 2, $07
-; 40cf
-
-FacingStepUp1: ; walking up 1
- db 4 ; #
- db 0, 0, 0, $84
- db 0, 8, 0, $85
- db 8, 0, 2, $86
- db 8, 8, 2, $87
-; 40e0
-
-FacingStepUp3: ; walking up 2
- db 4 ; #
- db 0, 8, X_FLIP, $84
- db 0, 0, X_FLIP, $85
- db 8, 8, 2 | X_FLIP, $86
- db 8, 0, 2 | X_FLIP, $87
-; 40f1
-
-FacingStepLeft0:
-FacingStepLeft2: ; standing left
- db 4 ; #
- db 0, 0, 0, $08
- db 0, 8, 0, $09
- db 8, 0, 2, $0a
- db 8, 8, 2, $0b
-; 4102
-
-FacingStepRight0:
-FacingStepRight2: ; standing right
- db 4 ; #
- db 0, 8, X_FLIP, $08
- db 0, 0, X_FLIP, $09
- db 8, 8, 2 | X_FLIP, $0a
- db 8, 0, 2 | X_FLIP, $0b
-; 4113
-
-FacingStepLeft1:
-FacingStepLeft3: ; walking left
- db 4 ; #
- db 0, 0, 0, $88
- db 0, 8, 0, $89
- db 8, 0, 2, $8a
- db 8, 8, 2, $8b
-; 4124
-
-FacingStepRight1:
-FacingStepRight3: ; walking right
- db 4 ; #
- db 0, 8, X_FLIP, $88
- db 0, 0, X_FLIP, $89
- db 8, 8, 2 | X_FLIP, $8a
- db 8, 0, 2 | X_FLIP, $8b
-; 4135
-
-FacingFishDown: ; fishing down
- db 5 ; #
- db 0, 0, 0, $00
- db 0, 8, 0, $01
- db 8, 0, 2, $02
- db 8, 8, 2, $03
- db 16, 0, 4, $fc
-; 414a
-
-FacingFishUp: ; fishing up
- db 5 ; #
- db 0, 0, 0, $04
- db 0, 8, 0, $05
- db 8, 0, 2, $06
- db 8, 8, 2, $07
- db -8, 0, 4, $fc
-; 415f
-
-FacingFishLeft: ; fishing left
- db 5 ; #
- db 0, 0, 0, $08
- db 0, 8, 0, $09
- db 8, 0, 2, $0a
- db 8, 8, 2, $0b
- db 5, -8, 4 | X_FLIP, $fd
-; 4174
-
-FacingFishRight: ; fishing right
- db 5 ; #
- db 0, 8, X_FLIP, $08
- db 0, 0, X_FLIP, $09
- db 8, 8, 2 | X_FLIP, $0a
- db 8, 0, 2 | X_FLIP, $0b
- db 5, 16, 4, $fd
-; 4189
-
-FacingEmote: ; emote
- db 4 ; #
- db 0, 0, 4, $f8
- db 0, 8, 4, $f9
- db 8, 0, 4, $fa
- db 8, 8, 4, $fb
-; 419a
-
-FacingShadow: ; shadow
- db 2 ; #
- db 0, 0, 4, $fc
- db 0, 8, 4 | X_FLIP, $fc
-; 41a3
-
-FacingBigDollSymmetric: ; big snorlax or lapras doll
- db 16 ; #
- db 0, 0, 0, $00
- db 0, 8, 0, $01
- db 8, 0, 0, $02
- db 8, 8, 0, $03
- db 16, 0, 0, $04
- db 16, 8, 0, $05
- db 24, 0, 0, $06
- db 24, 8, 0, $07
- db 0, 24, X_FLIP, $00
- db 0, 16, X_FLIP, $01
- db 8, 24, X_FLIP, $02
- db 8, 16, X_FLIP, $03
- db 16, 24, X_FLIP, $04
- db 16, 16, X_FLIP, $05
- db 24, 24, X_FLIP, $06
- db 24, 16, X_FLIP, $07
-; 41e4
-
-FacingWeirdTree1: ; 41e4
- db 4 ; #
- db 0, 0, 0, $04
- db 0, 8, 0, $05
- db 8, 0, 0, $06
- db 8, 8, 0, $07
-; 41f5
-
-FacingWeirdTree3: ; 41f5
- db 4 ; #
- db 0, 8, X_FLIP, $04
- db 0, 0, X_FLIP, $05
- db 8, 8, X_FLIP, $06
- db 8, 0, X_FLIP, $07
-; 4206
-
-FacingBigDollAsymmetric: ; big doll other than snorlax or lapras
- db 14 ; #
- db 0, 0, 0, $00
- db 0, 8, 0, $01
- db 8, 0, 0, $04
- db 8, 8, 0, $05
- db 16, 8, 0, $07
- db 24, 8, 0, $0a
- db 0, 24, 0, $03
- db 0, 16, 0, $02
- db 8, 24, X_FLIP, $02
- db 8, 16, 0, $06
- db 16, 24, 0, $09
- db 16, 16, 0, $08
- db 24, 24, X_FLIP, $04
- db 24, 16, 0, $0b
-; 423f
-
-FacingBoulderDust1: ; boulder dust 1
- db 4 ; #
- db 0, 0, 4, $fe
- db 0, 8, 4, $fe
- db 8, 0, 4, $fe
- db 8, 8, 4, $fe
-; 4250
-
-FacingBoulderDust2: ; boulder dust 2
- db 4 ; #
- db 0, 0, 4, $ff
- db 0, 8, 4, $ff
- db 8, 0, 4, $ff
- db 8, 8, 4, $ff
-; 4261
-
-FacingGrass1: ; 4261
- db 2 ; #
- db 8, 0, 4, $fe
- db 8, 8, 4 | X_FLIP, $fe
-; 426a
-
-FacingGrass2: ; 426a
- db 2 ; #
- db 9, -1, 4, $fe
- db 9, 9, 4 | X_FLIP, $fe
-; 4273
diff --git a/engine/fish.asm b/engine/fish.asm
index 44fe57b25..c571bba56 100644
--- a/engine/fish.asm
+++ b/engine/fish.asm
@@ -81,7 +81,7 @@ endr
ld a, [TimeOfDay]
and 3
- cp NITE
+ cp NITE_F
jr c, .time_species
inc hl
inc hl
diff --git a/engine/fruit_trees.asm b/engine/fruit_trees.asm
index 6a40fb05c..595e41824 100644
--- a/engine/fruit_trees.asm
+++ b/engine/fruit_trees.asm
@@ -58,7 +58,7 @@ CheckFruitTree: ; 44055
; 4405f
PickedFruitTree: ; 4405f
- callba TrainerRankings_FruitPicked
+ farcall TrainerRankings_FruitPicked
ld b, 1
jp GetFruitTreeFlag
; 4406a
@@ -102,38 +102,9 @@ GetFruitTreeItem: ; 4408a
ret
; 44097
-FruitTreeItems: ; 44097
- db BERRY
- db BERRY
- db BERRY
- db BERRY
- db PSNCUREBERRY
- db PSNCUREBERRY
- db BITTER_BERRY
- db BITTER_BERRY
- db PRZCUREBERRY
- db PRZCUREBERRY
- db MYSTERYBERRY
- db MYSTERYBERRY
- db ICE_BERRY
- db ICE_BERRY
- db MINT_BERRY
- db BURNT_BERRY
- db RED_APRICORN
- db BLU_APRICORN
- db BLK_APRICORN
- db WHT_APRICORN
- db PNK_APRICORN
- db GRN_APRICORN
- db YLW_APRICORN
- db BERRY
- db PSNCUREBERRY
- db BITTER_BERRY
- db PRZCUREBERRY
- db ICE_BERRY
- db MINT_BERRY
- db BURNT_BERRY
-; 440b5
+
+INCLUDE "data/items/fruit_trees.asm"
+
FruitBearingTreeText: ; 440b5
text_jump _FruitBearingTreeText
diff --git a/engine/gbc_only.asm b/engine/gbc_only.asm
new file mode 100644
index 000000000..a77a44d72
--- /dev/null
+++ b/engine/gbc_only.asm
@@ -0,0 +1,149 @@
+GBCOnlyScreen: ; 4ea82
+
+ ld a, [hCGB]
+ and a
+ ret nz
+
+ ld de, MUSIC_NONE
+ call PlayMusic
+
+ call ClearTileMap
+
+ ld hl, GBCOnlyGFX
+ ld de, $d000
+ ld a, [rSVBK]
+ push af
+ ld a, 0
+ ld [rSVBK], a
+ call Decompress
+ pop af
+ ld [rSVBK], a
+
+ ld de, $d000
+ ld hl, VTiles2
+ lb bc, BANK(GBCOnlyGFX), $54
+ call Get2bpp
+
+ ld de, Font
+ ld hl, VTiles1
+ lb bc, BANK(Font), $80
+ call Get1bpp
+
+ call DrawGBCOnlyScreen
+
+ call WaitBGMap
+
+; better luck next time
+.loop
+ call DelayFrame
+ jr .loop
+; 4eac5
+
+
+DrawGBCOnlyScreen: ; 4eac5
+
+ call DrawGBCOnlyBorder
+
+ ; Pokemon
+ hlcoord 3, 2
+ ld b, 14
+ ld c, 4
+ ld a, $8
+ call DrawGBCOnlyGraphic
+
+ ; Crystal
+ hlcoord 5, 6
+ ld b, 10
+ ld c, 2
+ ld a, $40
+ call DrawGBCOnlyGraphic
+
+ ld de, GBCOnlyString
+ hlcoord 1, 10
+ call PlaceString
+
+ ret
+; 4eaea
+
+
+DrawGBCOnlyBorder: ; 4eaea
+
+ hlcoord 0, 0
+ ld [hl], 0 ; top-left
+
+ inc hl
+ ld a, 1 ; top
+ call .FillRow
+
+ ld [hl], 2 ; top-right
+
+ hlcoord 0, 1
+ ld a, 3 ; left
+ call .FillColumn
+
+ hlcoord 19, 1
+ ld a, 4 ; right
+ call .FillColumn
+
+ hlcoord 0, 17
+ ld [hl], 5 ; bottom-left
+
+ inc hl
+ ld a, 6 ; bottom
+ call .FillRow
+
+ ld [hl], 7 ; bottom-right
+ ret
+; 4eb15
+
+.FillRow: ; 4eb15
+ ld c, SCREEN_WIDTH - 2
+.next_column
+ ld [hli], a
+ dec c
+ jr nz, .next_column
+ ret
+; 4eb1c
+
+.FillColumn: ; 4eb1c
+ ld de, SCREEN_WIDTH
+ ld c, SCREEN_HEIGHT - 2
+.next_row
+ ld [hl], a
+ add hl, de
+ dec c
+ jr nz, .next_row
+ ret
+; 4eb27
+
+
+DrawGBCOnlyGraphic: ; 4eb27
+ ld de, SCREEN_WIDTH
+.y
+ push bc
+ push hl
+.x
+ ld [hli], a
+ inc a
+ dec b
+ jr nz, .x
+ pop hl
+ add hl, de
+ pop bc
+ dec c
+ jr nz, .y
+ ret
+; 4eb38
+
+
+GBCOnlyString: ; 4eb38
+ db "This Game Pak is"
+ next "designed only for"
+ next "use on the"
+ next "Game Boy Color.@"
+; 4eb76
+
+
+GBCOnlyGFX: ; 4eb76
+INCBIN "gfx/sgb/gbc_only.2bpp.lz"
+; 4f0bc
diff --git a/engine/healmachineanim.asm b/engine/healmachineanim.asm
deleted file mode 100755
index 5162b3830..000000000
--- a/engine/healmachineanim.asm
+++ /dev/null
@@ -1,265 +0,0 @@
-HealMachineAnim: ; 12324
- ; If you have no Pokemon, don't change the buffer. This can lead to some glitchy effects if you have no Pokemon.
- ld a, [PartyCount]
- and a
- ret z
- ; The location of the healing machine relative to the player is stored in ScriptVar.
- ; 0: Up and left (Pokemon Center)
- ; 1: Left (Elm's Lab)
- ; 2: Up (Hall of Fame)
- ld a, [ScriptVar]
- ld [Buffer1], a
- ld a, [rOBP1]
- ld [Buffer2], a
- call .DoJumptableFunctions
- ld a, [Buffer2]
- call DmgToCgbObjPal1
- ret
-; 1233e
-
-.DoJumptableFunctions: ; 1233e
- xor a
- ld [Buffer3], a
-.jumpable_loop
- ld a, [Buffer1]
- ld e, a
- ld d, 0
- ld hl, .Pointers
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [Buffer3]
- ld e, a
- inc a
- ld [Buffer3], a
- add hl, de
- ld a, [hl]
- cp 5
- jr z, .finish
- ld hl, .Jumptable
- rst JumpTable
- jr .jumpable_loop
-
-.finish
- ret
-; 12365
-
-.Pointers: ; 12365
- dw .Pokecenter
- dw .ElmLab
- dw .HallOfFame
-; 1236b
-
-.Pokecenter: ; 1236b
- db 0, 1, 3, 5
-.ElmLab: ; 1236f
- db 0, 1, 3, 5
-.HallOfFame: ; 12373
- db 0, 2, 4, 5
-; 12377
-
-.Jumptable: ; 12377
- dw .LoadGFX
- dw .PC_LoadBallsOntoMachine
- dw .HOF_LoadBallsOntoMachine
- dw .PlayHealMusic
- dw .HOF_PlaySFX
- dw .dummy_5 ; never encountered
-; 12383
-
-.LoadGFX: ; 12383
- call .LoadPalettes
- ld de, .HealMachineGFX
- ld hl, VTiles0 tile $7c
- lb bc, BANK(.HealMachineGFX), $2
- call Request2bpp
- ret
-; 12393
-
-.PC_LoadBallsOntoMachine: ; 12393
- ld hl, Sprites + $80
- ld de, .PC_ElmsLab_OAM
- call .PlaceHealingMachineTile
- call .PlaceHealingMachineTile
- jr .LoadBallsOntoMachine
-
-.HOF_LoadBallsOntoMachine: ; 123a1
- ld hl, Sprites + $80
- ld de, .HOF_OAM
-
-.LoadBallsOntoMachine: ; 123a7
- ld a, [PartyCount]
- ld b, a
-.party_loop
- call .PlaceHealingMachineTile
- push de
- ld de, SFX_SECOND_PART_OF_ITEMFINDER
- call PlaySFX
- pop de
- ld c, 30
- call DelayFrames
- dec b
- jr nz, .party_loop
- ret
-; 123bf
-
-.PlayHealMusic: ; 123bf
- ld de, MUSIC_HEAL
- call PlayMusic
- jp .FlashPalettes8Times
-; 123c8
-
-.HOF_PlaySFX: ; 123c8
- ld de, SFX_GAME_FREAK_LOGO_GS
- call PlaySFX
- call .FlashPalettes8Times
- call WaitSFX
- ld de, SFX_BOOT_PC
- call PlaySFX
- ret
-; 123db
-
-.dummy_5 ; 123db
- ret
-; 123dc
-
-.PC_ElmsLab_OAM: ; 123dc
- dsprite 4, 0, 4, 2, $7c, $16
- dsprite 4, 0, 4, 6, $7c, $16
- dsprite 4, 6, 4, 0, $7d, $16
- dsprite 4, 6, 5, 0, $7d, $36 ; xflip
- dsprite 5, 3, 4, 0, $7d, $16
- dsprite 5, 3, 5, 0, $7d, $36 ; xflip
- dsprite 6, 0, 4, 0, $7d, $16
- dsprite 6, 0, 5, 0, $7d, $36 ; xflip
-; 123fc
-
-.HealMachineGFX: ; 123fc
-INCBIN "gfx/unknown/0123fc.2bpp"
-; 1241c
-
-.HOF_OAM: ; 1241c
- dsprite 7, 4, 10, 1, $7d, $16
- dsprite 7, 4, 10, 6, $7d, $16
- dsprite 7, 3, 9, 5, $7d, $16
- dsprite 7, 3, 11, 2, $7d, $16
- dsprite 7, 1, 9, 1, $7d, $16
- dsprite 7, 1, 11, 5, $7d, $16
-; 12434
-
-.LoadPalettes: ; 12434
- call IsCGB
- jr nz, .cgb
- ld a, %11100000
- ld [rOBP1], a
- ret
-
-.cgb
- ld hl, .palettes
- ld de, OBPals + 8 * 6
- ld bc, 8
- ld a, $5
- call FarCopyWRAM
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 12451
-
-.palettes ; 12451
- RGB 31, 31, 31
- RGB 31, 19, 10
- RGB 31, 07, 01
- RGB 00, 00, 00
-; 12459
-
-.FlashPalettes8Times: ; 12459
- ld c, $8
-.palette_loop
- push bc
- call .FlashPalettes
- ld c, 10
- call DelayFrames
- pop bc
- dec c
- jr nz, .palette_loop
- ret
-; 12469
-
-.FlashPalettes: ; 12469
- call IsCGB
- jr nz, .go
- ld a, [rOBP1]
- xor %00101000
- ld [rOBP1], a
- ret
-
-.go
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
-
- ld hl, OBPals + 8 * 6
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- push de
- ld c, $3
-.palette_loop_2
- ld a, [hli]
- ld e, a
- ld a, [hld]
- ld d, a
- dec hl
- ld a, d
- ld [hld], a
- ld a, e
- ld [hli], a
- inc hl
- inc hl
- inc hl
- dec c
- jr nz, .palette_loop_2
- pop de
- dec hl
- ld a, d
- ld [hld], a
- ld a, e
- ld [hl], a
-
- pop af
- ld [rSVBK], a
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 124a3
-
-.PlaceHealingMachineTile: ; 124a3
- push bc
- ld a, [Buffer1]
- bcpixel 2, 4
- cp $1 ; ElmsLab
- jr z, .okay
- bcpixel 0, 0
-
-.okay
- ld a, [de]
- add c
- inc de
- ld [hli], a
- ld a, [de]
- add b
- inc de
- ld [hli], a
- ld a, [de]
- inc de
- ld [hli], a
- ld a, [de]
- inc de
- ld [hli], a
- pop bc
- ret
-; 124c1
diff --git a/engine/health.asm b/engine/health.asm
index 1c926f677..0f7ba156d 100755
--- a/engine/health.asm
+++ b/engine/health.asm
@@ -49,7 +49,7 @@ HealPartyMon: ; c677
ld a, [hl]
ld [bc], a
- callba RestoreAllPP
+ farcall RestoreAllPP
ret
ComputeHPBarPixels: ; c699
diff --git a/engine/init_gender.asm b/engine/init_gender.asm
index ff5babdf9..092a1c9ea 100755
--- a/engine/init_gender.asm
+++ b/engine/init_gender.asm
@@ -20,7 +20,7 @@ InitCrystalData: ; 48000
ret
; 4802f
-INCLUDE "misc/mobile_12.asm"
+INCLUDE "mobile/mobile_12.asm"
InitGender: ; 48dcb (12:4dcb)
call InitGenderScreen
@@ -68,9 +68,9 @@ InitGenderScreen: ; 48e14 (12:4e14)
ld a, $10
ld [MusicFade], a
ld a, MUSIC_NONE
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, $0
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ld c, 8
call DelayFrames
call ClearBGPalettes
@@ -92,7 +92,7 @@ LoadGenderScreenPal: ; 48e47 (12:4e47)
ld bc, 1 palettes
ld a, $5
call FarCopyWRAM
- callba ApplyPals
+ farcall ApplyPals
ret
; 48e5c (12:4e5c)
diff --git a/engine/init_hof_credits.asm b/engine/init_hof_credits.asm
new file mode 100644
index 000000000..0f55a10ab
--- /dev/null
+++ b/engine/init_hof_credits.asm
@@ -0,0 +1,79 @@
+InitDisplayForHallOfFame: ; 4e881
+ call ClearBGPalettes
+ call ClearTileMap
+ call ClearSprites
+ call DisableLCD
+ call LoadStandardFont
+ call LoadFontsBattleExtra
+ hlbgcoord 0, 0
+ ld bc, VBGMap1 - VBGMap0
+ ld a, " "
+ call ByteFill
+ hlcoord 0, 0, AttrMap
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ xor a
+ call ByteFill
+ xor a
+ ld [hSCY], a
+ ld [hSCX], a
+ call EnableLCD
+ ld hl, .SavingRecordDontTurnOff
+ call PrintText
+ call WaitBGMap2
+ call SetPalettes
+ ret
+
+.SavingRecordDontTurnOff: ; 0x4e8bd
+ ; SAVING RECORD… DON'T TURN OFF!
+ text_jump UnknownText_0x1bd39e
+ db "@"
+
+InitDisplayForRedCredits: ; 4e8c2
+ call ClearBGPalettes
+ call ClearTileMap
+ call ClearSprites
+ call DisableLCD
+ call LoadStandardFont
+ call LoadFontsBattleExtra
+ hlbgcoord 0, 0
+ ld bc, VBGMap1 - VBGMap0
+ ld a, " "
+ call ByteFill
+ hlcoord 0, 0, AttrMap
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ xor a
+ call ByteFill
+ ld hl, UnknBGPals
+ ld c, 4 tiles
+.load_white_palettes
+ ld a, (palred 31 + palgreen 31 + palblue 31) % $100
+ ld [hli], a
+ ld a, (palred 31 + palgreen 31 + palblue 31) / $100
+ ld [hli], a
+ dec c
+ jr nz, .load_white_palettes
+ xor a
+ ld [hSCY], a
+ ld [hSCX], a
+ call EnableLCD
+ call WaitBGMap2
+ call SetPalettes
+ ret
+
+ResetDisplayBetweenHallOfFameMons: ; 4e906
+ ld a, [rSVBK]
+ push af
+ ld a, $6
+ ld [rSVBK], a
+ ld hl, wDecompressScratch
+ ld bc, wScratchAttrMap - wDecompressScratch
+ ld a, " "
+ call ByteFill
+ hlbgcoord 0, 0
+ ld de, wDecompressScratch
+ ld b, 0
+ ld c, 4 tiles
+ call Request2bpp
+ pop af
+ ld [rSVBK], a
+ ret
diff --git a/engine/init_map.asm b/engine/init_map.asm
new file mode 100644
index 000000000..d73a5acf5
--- /dev/null
+++ b/engine/init_map.asm
@@ -0,0 +1,103 @@
+ReanchorBGMap_NoOAMUpdate:: ; 6454
+ call DelayFrame
+ ld a, [hOAMUpdate]
+ push af
+
+ ld a, $1
+ ld [hOAMUpdate], a
+ ld a, [hBGMapMode]
+ push af
+ xor a
+ ld [hBGMapMode], a
+
+ call .ReanchorBGMap
+
+ pop af
+ ld [hBGMapMode], a
+ pop af
+ ld [hOAMUpdate], a
+ ld hl, VramState
+ set 6, [hl]
+ ret
+
+.ReanchorBGMap:
+ xor a
+ ld [hLCDCPointer], a
+ ld [hBGMapMode], a
+ ld a, $90
+ ld [hWY], a
+ call OverworldTextModeSwitch
+ ld a, VBGMap1 / $100
+ call .LoadBGMapAddrIntoHRAM
+ call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ farcall LoadOW_BGPal7
+ farcall ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ xor a
+ ld [hBGMapMode], a
+ ld [hWY], a
+ farcall HDMATransfer_FillBGMap0WithBlack ; no need to farcall
+ ld a, VBGMap0 / $100
+ call .LoadBGMapAddrIntoHRAM
+ xor a
+ ld [wBGMapAnchor], a
+ ld a, VBGMap0 / $100
+ ld [wBGMapAnchor + 1], a
+ xor a
+ ld [hSCX], a
+ ld [hSCY], a
+ call ApplyBGMapAnchorToObjects
+ ret
+
+.LoadBGMapAddrIntoHRAM: ; 64b9
+ ld [hBGMapAddress + 1], a
+ xor a
+ ld [hBGMapAddress], a
+ ret
+
+LoadFonts_NoOAMUpdate:: ; 64bf
+ ld a, [hOAMUpdate]
+ push af
+ ld a, $1
+ ld [hOAMUpdate], a
+
+ call .LoadGFX
+
+ pop af
+ ld [hOAMUpdate], a
+ ret
+
+.LoadGFX:
+ call LoadFontsExtra
+ ld a, $90
+ ld [hWY], a
+ call SafeUpdateSprites
+ call LoadStandardFont
+ ret
+
+HDMATransfer_FillBGMap0WithBlack: ; 64db
+ ld a, [rSVBK]
+ push af
+ ld a, $6
+ ld [rSVBK], a
+
+ ld a, "<BLACK>" ; $60
+ ld hl, wDecompressScratch
+ ld bc, wScratchAttrMap - wDecompressScratch
+ call ByteFill
+ ld a, wDecompressScratch / $100
+ ld [rHDMA1], a
+ ld a, wDecompressScratch % $100
+ ld [rHDMA2], a
+ ld a, (VBGMap0 % $8000) / $100
+ ld [rHDMA3], a
+ ld a, (VBGMap0 % $8000) % $100
+ ld [rHDMA4], a
+ ld a, $3f
+ ld [hDMATransfer], a
+ call DelayFrame
+
+ pop af
+ ld [rSVBK], a
+ ret
diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm
index 8e3c90204..c73535459 100755
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -6,7 +6,7 @@ _MainMenu: ; 5ae8
ld a, e
ld [wMapMusic], a
call PlayMusic
- callba MainMenu
+ farcall MainMenu
jp StartTitleScreen
; 5b04
@@ -56,13 +56,13 @@ NewGame_ClearTileMapEtc: ; 5b44
MysteryGift: ; 5b54
call UpdateTime
- callba DoMysteryGiftIfDayHasPassed
- callba DoMysteryGift
+ farcall DoMysteryGiftIfDayHasPassed
+ farcall DoMysteryGift
ret
; 5b64
OptionsMenu: ; 5b64
- callba _OptionsMenu
+ farcall _OptionsMenu
ret
; 5b6b
@@ -86,14 +86,14 @@ NewGame: ; 5b6b
; 5b8f
AreYouABoyOrAreYouAGirl: ; 5b8f
- callba Mobile_AlwaysReturnNotCarry ; some mobile stuff
+ farcall Mobile_AlwaysReturnNotCarry ; some mobile stuff
jr c, .ok
- callba InitGender
+ farcall InitGender
ret
.ok
ld c, 0
- callba InitMobileProfile ; mobile
+ farcall InitMobileProfile ; mobile
ret
; 5ba7
@@ -111,8 +111,8 @@ _ResetWRAM: ; 5bae
xor a
call ByteFill
- ld hl, wd000
- ld bc, wGameData - wd000
+ ld hl, wRAM1Start
+ ld bc, wGameData - wRAM1Start
xor a
call ByteFill
@@ -199,8 +199,6 @@ _ResetWRAM: ; 5bae
ld [Coins], a
ld [Coins + 1], a
-START_MONEY EQU 3000
-
IF START_MONEY / $10000
ld a, START_MONEY / $10000
ENDC
@@ -214,19 +212,19 @@ ENDC
ld [wWhichMomItem], a
ld hl, MomItemTriggerBalance
- ld [hl], 2300 / $10000
+ ld [hl], MOM_MONEY / $10000
inc hl
- ld [hl], 2300 / $100 % $100
+ ld [hl], MOM_MONEY / $100 % $100
inc hl
- ld [hl], 2300 % $100
+ ld [hl], MOM_MONEY % $100
call InitializeNPCNames
- callba InitDecorations
+ farcall InitDecorations
- callba DeletePartyMonMail
+ farcall DeletePartyMonMail
- callba DeleteMobileEventIndex
+ farcall DeleteMobileEventIndex
call ResetGameTime
ret
@@ -318,8 +316,8 @@ InitializeNPCNames: ; 5ce9
InitializeWorld: ; 5d23
call ShrinkPlayer
- callba SpawnPlayer
- callba _InitializeStartDay
+ farcall SpawnPlayer
+ farcall _InitializeStartDay
ret
; 5d33
@@ -351,9 +349,9 @@ LoadOrRegenerateLuckyIDNumber: ; 5d33
; 5d65
Continue: ; 5d65
- callba TryLoadSaveFile
+ farcall TryLoadSaveFile
jr c, .FailToLoad
- callba _LoadData
+ farcall _LoadData
call LoadStandardMenuDataHeader
call DisplaySaveInfoOnContinue
ld a, $1
@@ -375,18 +373,18 @@ Continue: ; 5d65
ld a, $8
ld [MusicFade], a
ld a, MUSIC_NONE % $100
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, MUSIC_NONE / $100
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
call ClearBGPalettes
call Continue_MobileAdapterMenu
call CloseWindow
call ClearTileMap
ld c, 20
call DelayFrames
- callba JumpRoamMons
- callba MysteryGift_CopyReceivedDecosToPC ; Mystery Gift
- callba Function140ae ; time-related
+ farcall JumpRoamMons
+ farcall MysteryGift_CopyReceivedDecosToPC ; Mystery Gift
+ farcall Function140ae ; time-related
ld a, [wSpawnAfterChampion]
cp SPAWN_LANCE
jr z, .SpawnAfterE4
@@ -418,7 +416,7 @@ PostCreditsSpawn: ; 5de7
; 5df0
Continue_MobileAdapterMenu: ; 5df0
- callba Mobile_AlwaysReturnNotCarry ; mobile check
+ farcall Mobile_AlwaysReturnNotCarry ; mobile check
ret nc
; the rest of this stuff is never reached because
@@ -429,20 +427,20 @@ Continue_MobileAdapterMenu: ; 5df0
ld a, 5
ld [MusicFade], a
ld a, MUSIC_MOBILE_ADAPTER_MENU % $100
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, MUSIC_MOBILE_ADAPTER_MENU / $100
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ld c, 20
call DelayFrames
ld c, $1
- callba InitMobileProfile ; mobile
- callba _SaveData
+ farcall InitMobileProfile ; mobile
+ farcall _SaveData
ld a, 8
ld [MusicFade], a
ld a, MUSIC_NONE % $100
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, MUSIC_NONE / $100
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ld c, 35
call DelayFrames
ret
@@ -468,7 +466,7 @@ Continue_CheckRTC_RestartClock: ; 5e48
call CheckRTCStatus
and %10000000 ; Day count exceeded 16383
jr z, .pass
- callba RestartClock
+ farcall RestartClock
ld a, c
and a
jr z, .pass
@@ -490,7 +488,7 @@ FinishContinueFunction: ; 5e5d
res 7, [hl]
ld hl, wEnteredMapFromContinue
set 1, [hl]
- callba OverworldLoop
+ farcall OverworldLoop
ld a, [wSpawnAfterChampion]
cp SPAWN_RED
jr z, .AfterRed
@@ -673,7 +671,7 @@ Continue_DisplayGameTime: ; 5f84
OakSpeech: ; 0x5f99
- callba InitClock
+ farcall InitClock
call RotateFourPalettesLeft
call ClearTileMap
@@ -737,7 +735,7 @@ OakSpeech: ; 0x5f99
xor a
ld [CurPartySpecies], a
- callba DrawIntroPlayerPic
+ farcall DrawIntroPlayerPic
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
@@ -784,20 +782,20 @@ OakText7: ; 0x606f
db "@"
NamePlayer: ; 0x6074
- callba MovePlayerPicRight
- callba ShowPlayerNamingChoices
+ farcall MovePlayerPicRight
+ farcall ShowPlayerNamingChoices
ld a, [wMenuCursorY]
dec a
jr z, .NewName
call StorePlayerName
- callba ApplyMonOrTrainerPals
- callba MovePlayerPicLeft
+ farcall ApplyMonOrTrainerPals
+ farcall MovePlayerPicLeft
ret
.NewName:
ld b, 1
ld de, PlayerName
- callba NamingScreen
+ farcall NamingScreen
call RotateThreePalettesRight
call ClearTileMap
@@ -807,7 +805,7 @@ NamePlayer: ; 0x6074
xor a
ld [CurPartySpecies], a
- callba DrawIntroPlayerPic
+ farcall DrawIntroPlayerPic
ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
call GetSGBLayout
@@ -859,9 +857,9 @@ ShrinkPlayer: ; 610f
ld [MusicFade], a
ld de, MUSIC_NONE
ld a, e
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, d
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ld de, SFX_ESCAPE_ROPE
call PlaySFX
@@ -945,7 +943,7 @@ Intro_WipeInFrontpic: ; 6182
Intro_PrepTrainerPic: ; 619c
ld de, VTiles2
- callba GetTrainerPic
+ farcall GetTrainerPic
xor a
ld [hGraphicStartTile], a
hlcoord 6, 4
@@ -968,7 +966,7 @@ ShrinkFrame: ; 61b4
Intro_PlacePlayerSprite: ; 61cd
- callba GetPlayerIcon
+ farcall GetPlayerIcon
ld c, $c
ld hl, VTiles0
call Request2bpp
@@ -1014,9 +1012,9 @@ Intro_PlacePlayerSprite: ; 61cd
CrystalIntroSequence: ; 620b
- callab Copyright_GFPresents
+ callfar Copyright_GFPresents
jr c, StartTitleScreen
- callba CrystalIntro
+ farcall CrystalIntro
StartTitleScreen: ; 6219
ld a, [rSVBK]
@@ -1051,7 +1049,7 @@ StartTitleScreen: ; 6219
ld b, SCGB_DIPLOMA
call GetSGBLayout
call UpdateTimePals
- ld a, [wcf64]
+ ld a, [wIntroSceneFrameCounter]
cp $5
jr c, .ok
xor a
@@ -1077,7 +1075,7 @@ StartTitleScreen: ; 6219
.TitleScreen: ; 6274
- callba _TitleScreen
+ farcall _TitleScreen
ret
; 627b
@@ -1086,7 +1084,7 @@ RunTitleScreen: ; 627b
bit 7, a
jr nz, .done_title
call TitleScreenScene
- callba SuicuneFrameIterator
+ farcall SuicuneFrameIterator
call DelayFrame
and a
ret
@@ -1164,7 +1162,7 @@ TitleScreenEntrance: ; 62bc
dec b
jr nz, .loop
- callba AnimateTitleCrystal
+ farcall AnimateTitleCrystal
ret
.done
@@ -1191,7 +1189,7 @@ TitleScreenTimer: ; 62f6
inc [hl]
; Start a timer
- ld hl, wcf65
+ ld hl, wTitleScreenTimer
ld de, 73 * 60 + 36
ld [hl], e
inc hl
@@ -1202,7 +1200,7 @@ TitleScreenTimer: ; 62f6
TitleScreenMain: ; 6304
; Run the timer down.
- ld hl, wcf65
+ ld hl, wTitleScreenTimer
ld e, [hl]
inc hl
ld d, [hl]
@@ -1268,7 +1266,7 @@ TitleScreenMain: ; 6304
ld a, 1
.done
- ld [wcf64], a
+ ld [wIntroSceneFrameCounter], a
; Return to the intro sequence.
ld hl, wJumptableIndex
@@ -1282,18 +1280,18 @@ TitleScreenMain: ; 6304
; Fade out the title screen music
xor a
- ld [MusicFadeIDLo], a
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID], a
+ ld [MusicFadeID + 1], a
ld hl, MusicFade
ld [hl], 8 ; 1 second
- ld hl, wcf65
+ ld hl, wTitleScreenTimer
inc [hl]
ret
.clock_reset
ld a, 4
- ld [wcf64], a
+ ld [wIntroSceneFrameCounter], a
; Return to the intro sequence.
ld hl, wJumptableIndex
@@ -1305,7 +1303,7 @@ TitleScreenEnd: ; 6375
; Wait until the music is done fading.
- ld hl, wcf65
+ ld hl, wTitleScreenTimer
inc [hl]
ld a, [MusicFade]
@@ -1313,7 +1311,7 @@ TitleScreenEnd: ; 6375
ret nz
ld a, 2
- ld [wcf64], a
+ ld [wIntroSceneFrameCounter], a
; Back to the intro.
ld hl, wJumptableIndex
@@ -1322,18 +1320,18 @@ TitleScreenEnd: ; 6375
; 6389
DeleteSaveData: ; 6389
- callba _DeleteSaveData
+ farcall _DeleteSaveData
jp Init
; 6392
ResetClock: ; 6392
- callba _ResetClock
+ farcall _ResetClock
jp Init
; 639b
Function639b: ; unreferenced
- ; If bit 0 or 1 of [wcf65] is set, we don't need to be here.
- ld a, [wcf65]
+ ; If bit 0 or 1 of [wTitleScreenTimer] is set, we don't need to be here.
+ ld a, [wTitleScreenTimer]
and $3
ret nz
ld bc, SpriteAnim10
@@ -1343,10 +1341,10 @@ Function639b: ; unreferenced
ld h, 0
add hl, hl
add hl, hl
- ld de, Data63ca
+ ld de, .Data63ca
add hl, de
- ; If bit 2 of [wcf65] is set, get the second dw; else, get the first dw
- ld a, [wcf65]
+ ; If bit 2 of [wTitleScreenTimer] is set, get the second dw; else, get the first dw
+ ld a, [wTitleScreenTimer]
and %00000100
srl a
srl a
@@ -1359,12 +1357,12 @@ Function639b: ; unreferenced
ret z
ld e, a
ld d, [hl]
- ld a, SPRITE_ANIM_INDEX_01
+ ld a, SPRITE_ANIM_INDEX_GS_TITLE_TRAIL
call _InitSpriteAnimStruct
ret
; 63ca
-Data63ca: ; 63ca
+.Data63ca: ; 63ca
; frame 0 y, x; frame 1 y, x
db 11 * 8 + 4, 10 * 8, 0 * 8, 0 * 8
db 11 * 8 + 4, 13 * 8, 11 * 8 + 4, 11 * 8
@@ -1403,7 +1401,7 @@ CopyrightString: ; 63fd
; 642e
GameInit:: ; 642e
- callba TryLoadSaveData
+ farcall TryLoadSaveData
call ClearWindowData
call ClearBGPalettes
call ClearTileMap
diff --git a/engine/item_effects.asm b/engine/item_effects.asm
new file mode 100644
index 000000000..4db1f3b7d
--- /dev/null
+++ b/engine/item_effects.asm
@@ -0,0 +1,3316 @@
+_DoItemEffect:: ; e722
+ ld a, [CurItem]
+ ld [wd265], a
+ call GetItemName
+ call CopyName1
+ ld a, 1
+ ld [wItemEffectSucceeded], a
+ ld a, [CurItem]
+ dec a
+ ld hl, ItemEffects
+ rst JumpTable
+ ret
+; e73c
+
+
+ItemEffects: ; e73c
+; entries correspond to item ids (see constants/item_constants.asm)
+ dw MasterBall
+ dw UltraBall
+ dw Brightpowder
+ dw GreatBall
+ dw PokeBall
+ dw TownMap
+ dw Bicycle
+ dw MoonStone
+ dw Antidote
+ dw BurnHeal
+ dw IceHeal
+ dw Awakening
+ dw ParlyzHeal
+ dw FullRestore
+ dw MaxPotion
+ dw HyperPotion
+ dw SuperPotion
+ dw Potion
+ dw EscapeRope
+ dw Repel
+ dw MaxElixer
+ dw FireStone
+ dw Thunderstone
+ dw WaterStone
+ dw Item19
+ dw HPUp
+ dw Protein
+ dw Iron
+ dw Carbos
+ dw LuckyPunch
+ dw Calcium
+ dw RareCandy
+ dw XAccuracy
+ dw LeafStone
+ dw MetalPowder
+ dw Nugget
+ dw PokeDoll
+ dw FullHeal
+ dw Revive
+ dw MaxRevive
+ dw GuardSpec
+ dw SuperRepel
+ dw MaxRepel
+ dw DireHit
+ dw Item2D
+ dw FreshWater
+ dw SodaPop
+ dw Lemonade
+ dw XAttack
+ dw Item32
+ dw XDefend
+ dw XSpeed
+ dw XSpecial
+ dw CoinCase
+ dw Itemfinder
+ dw PokeFlute
+ dw ExpShare
+ dw OldRod
+ dw GoodRod
+ dw SilverLeaf
+ dw SuperRod
+ dw PPUp
+ dw Ether
+ dw MaxEther
+ dw Elixer
+ dw RedScale
+ dw Secretpotion
+ dw SSTicket
+ dw MysteryEgg
+ dw ClearBell
+ dw SilverWing
+ dw MoomooMilk
+ dw QuickClaw
+ dw Psncureberry
+ dw GoldLeaf
+ dw SoftSand
+ dw SharpBeak
+ dw Przcureberry
+ dw BurntBerry
+ dw IceBerry
+ dw PoisonBarb
+ dw KingsRock
+ dw BitterBerry
+ dw MintBerry
+ dw RedApricorn
+ dw Tinymushroom
+ dw BigMushroom
+ dw Silverpowder
+ dw BluApricorn
+ dw Item5A
+ dw AmuletCoin
+ dw YlwApricorn
+ dw GrnApricorn
+ dw CleanseTag
+ dw MysticWater
+ dw Twistedspoon
+ dw WhtApricorn
+ dw Blackbelt
+ dw BlkApricorn
+ dw Item64
+ dw PnkApricorn
+ dw Blackglasses
+ dw Slowpoketail
+ dw PinkBow
+ dw Stick
+ dw SmokeBall
+ dw Nevermeltice
+ dw Magnet
+ dw Miracleberry
+ dw Pearl
+ dw BigPearl
+ dw Everstone
+ dw SpellTag
+ dw Ragecandybar
+ dw GsBall
+ dw BlueCard
+ dw MiracleSeed
+ dw ThickClub
+ dw FocusBand
+ dw Item78
+ dw Energypowder
+ dw EnergyRoot
+ dw HealPowder
+ dw RevivalHerb
+ dw HardStone
+ dw LuckyEgg
+ dw CardKey
+ dw MachinePart
+ dw EggTicket
+ dw LostItem
+ dw Stardust
+ dw StarPiece
+ dw BasementKey
+ dw Pass
+ dw Item87
+ dw Item88
+ dw Item89
+ dw Charcoal
+ dw BerryJuice
+ dw ScopeLens
+ dw Item8D
+ dw Item8E
+ dw MetalCoat
+ dw DragonFang
+ dw Item91
+ dw Leftovers
+ dw Item93
+ dw Item94
+ dw Item95
+ dw Mysteryberry
+ dw DragonScale
+ dw BerserkGene
+ dw Item99
+ dw Item9A
+ dw Item9B
+ dw SacredAsh
+ dw HeavyBall
+ dw FlowerMail
+ dw LevelBall
+ dw LureBall
+ dw FastBall
+ dw ItemA2
+ dw LightBall
+ dw FriendBall
+ dw MoonBall
+ dw LoveBall
+ dw NormalBox
+ dw GorgeousBox
+ dw SunStone
+ dw PolkadotBow
+ dw ItemAB
+ dw UpGrade
+ dw Berry
+ dw GoldBerry
+ dw Squirtbottle
+ dw ItemB0
+ dw ParkBall
+ dw RainbowWing
+ dw ItemB3
+; e8a2
+
+
+MasterBall:
+UltraBall:
+GreatBall:
+PokeBall:
+HeavyBall:
+LevelBall:
+LureBall:
+FastBall:
+FriendBall:
+MoonBall:
+LoveBall:
+ParkBall: ; e8a2
+ ld a, [wBattleMode]
+ dec a
+ jp nz, UseBallInTrainerBattle
+
+ ld a, [PartyCount]
+ cp PARTY_LENGTH
+ jr nz, .room_in_party
+
+ ld a, BANK(sBoxCount)
+ call GetSRAMBank
+ ld a, [sBoxCount]
+ cp MONS_PER_BOX
+ call CloseSRAM
+ jp z, Ball_BoxIsFullMessage
+
+.room_in_party
+ xor a
+ ld [wWildMon], a
+ ld a, [CurItem]
+ cp PARK_BALL
+ call nz, ReturnToBattle_UseBall
+
+ ld hl, Options
+ res NO_TEXT_SCROLL, [hl]
+ ld hl, UsedItemText
+ call PrintText
+
+ ld a, [EnemyMonCatchRate]
+ ld b, a
+ ld a, [BattleType]
+ cp BATTLETYPE_TUTORIAL
+ jp z, .catch_without_fail
+ ld a, [CurItem]
+ cp MASTER_BALL
+ jp z, .catch_without_fail
+ ld a, [CurItem]
+ ld c, a
+ ld hl, BallMultiplierFunctionTable
+
+.get_multiplier_loop
+ ld a, [hli]
+ cp $ff
+ jr z, .skip_or_return_from_ball_fn
+ cp c
+ jr z, .call_ball_function
+ inc hl
+ inc hl
+ jr .get_multiplier_loop
+
+.call_ball_function
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, .skip_or_return_from_ball_fn
+ push de
+ jp hl
+
+.skip_or_return_from_ball_fn
+ ld a, [CurItem]
+ cp LEVEL_BALL
+ ld a, b
+ jp z, .skip_hp_calc
+
+ ld a, b
+ ld [hMultiplicand + 2], a
+
+ ld hl, EnemyMonHP
+ ld b, [hl]
+ inc hl
+ ld c, [hl]
+ inc hl
+ ld d, [hl]
+ inc hl
+ ld e, [hl]
+ sla c
+ rl b
+
+ ld h, d
+ ld l, e
+ add hl, de
+ add hl, de
+ ld d, h
+ ld e, l
+ ld a, d
+ and a
+ jr z, .okay_1
+
+ srl d
+ rr e
+ srl d
+ rr e
+ srl b
+ rr c
+ srl b
+ rr c
+
+ ld a, c
+ and a
+ jr nz, .okay_1
+ ld c, $1
+.okay_1
+ ld b, e
+
+ push bc
+ ld a, b
+ sub c
+ ld [hMultiplier], a
+ xor a
+ ld [hDividend + 0], a
+ ld [hMultiplicand + 0], a
+ ld [hMultiplicand + 1], a
+ call Multiply
+ pop bc
+
+ ld a, b
+ ld [hDivisor], a
+ ld b, $4
+ call Divide
+
+ ld a, [hQuotient + 2]
+ and a
+ jr nz, .statuscheck
+ ld a, 1
+.statuscheck
+; This routine is buggy. It was intended that SLP and FRZ provide a higher
+; catch rate than BRN/PSN/PAR, which in turn provide a higher catch rate than
+; no status effect at all. But instead, it makes BRN/PSN/PAR provide no
+; benefit.
+; Uncomment the line below to fix this.
+ ld b, a
+ ld a, [EnemyMonStatus]
+ and 1 << FRZ | SLP
+ ld c, 10
+ jr nz, .addstatus
+ ; ld a, [EnemyMonStatus]
+ and a
+ ld c, 5
+ jr nz, .addstatus
+ ld c, 0
+.addstatus
+ ld a, b
+ add c
+ jr nc, .max_1
+ ld a, $ff
+.max_1
+
+ ld d, a
+ push de
+
+ ; BUG: farcall overwrites a,
+ ; and GetItemHeldEffect takes b anyway.
+
+ ; This is probably the reason
+ ; the HELD_CATCH_CHANCE effect
+ ; is never used.
+
+ ; Uncomment the line below to fix.
+
+ ld a, [BattleMonItem]
+; ld b, a
+ farcall GetItemHeldEffect
+ ld a, b
+ cp HELD_CATCH_CHANCE
+
+ pop de
+ ld a, d
+
+ jr nz, .skip_hp_calc
+ add c
+ jr nc, .skip_hp_calc
+ ld a, $ff
+.skip_hp_calc
+
+ ld b, a
+ ld [Buffer1], a
+ call Random
+
+ cp b
+ ld a, 0
+ jr z, .catch_without_fail
+ jr nc, .fail_to_catch
+
+.catch_without_fail
+ ld a, [EnemyMonSpecies]
+
+.fail_to_catch
+ ld [wWildMon], a
+ ld c, 20
+ call DelayFrames
+
+ ld a, [CurItem]
+ cp POKE_BALL + 1 ; Assumes Master/Ultra/Great come before
+ jr c, .not_kurt_ball
+ ld a, POKE_BALL
+.not_kurt_ball
+ ld [wBattleAnimParam], a
+
+ ld de, ANIM_THROW_POKE_BALL
+ ld a, e
+ ld [FXAnimID], a
+ ld a, d
+ ld [FXAnimID + 1], a
+ xor a
+ ld [hBattleTurn], a
+ ld [Buffer2], a
+ ld [wNumHits], a
+ predef PlayBattleAnim
+
+ ld a, [wWildMon]
+ and a
+ jr nz, .caught
+ ld a, [Buffer2]
+ cp $1
+ ld hl, Text_NoShake
+ jp z, .shake_and_break_free
+ cp $2
+ ld hl, Text_OneShake
+ jp z, .shake_and_break_free
+ cp $3
+ ld hl, Text_TwoShakes
+ jp z, .shake_and_break_free
+ cp $4
+ ld hl, Text_ThreeShakes
+ jp z, .shake_and_break_free
+.caught
+
+ ld hl, EnemyMonStatus
+ ld a, [hli]
+ push af
+ inc hl
+ ld a, [hli]
+ push af
+ ld a, [hl]
+ push af
+ push hl
+ ld hl, EnemyMonItem
+ ld a, [hl]
+ push af
+ push hl
+ ld hl, EnemySubStatus5
+ ld a, [hl]
+ push af
+ set SUBSTATUS_TRANSFORMED, [hl]
+
+; This code is buggy. Any wild Pokémon that has Transformed will be
+; caught as a Ditto, even if it was something else like Mew.
+; To fix, do not set [TempEnemyMonSpecies] to DITTO.
+ bit SUBSTATUS_TRANSFORMED, a
+ jr nz, .ditto
+ jr .not_ditto
+
+.ditto
+ ld a, DITTO
+ ld [TempEnemyMonSpecies], a
+ jr .load_data
+
+.not_ditto
+ set SUBSTATUS_TRANSFORMED, [hl]
+ ld hl, wEnemyBackupDVs
+ ld a, [EnemyMonDVs]
+ ld [hli], a
+ ld a, [EnemyMonDVs + 1]
+ ld [hl], a
+
+.load_data
+ ld a, [TempEnemyMonSpecies]
+ ld [CurPartySpecies], a
+ ld a, [EnemyMonLevel]
+ ld [CurPartyLevel], a
+ farcall LoadEnemyMon
+
+ pop af
+ ld [EnemySubStatus5], a
+
+ pop hl
+ pop af
+ ld [hl], a
+ pop hl
+ pop af
+ ld [hld], a
+ pop af
+ ld [hld], a
+ dec hl
+ pop af
+ ld [hl], a
+
+ ld hl, EnemySubStatus5
+ bit SUBSTATUS_TRANSFORMED, [hl]
+ jr nz, .Transformed
+ ld hl, wWildMonMoves
+ ld de, EnemyMonMoves
+ ld bc, NUM_MOVES
+ call CopyBytes
+
+ ld hl, wWildMonPP
+ ld de, EnemyMonPP
+ ld bc, NUM_MOVES
+ call CopyBytes
+.Transformed:
+
+ ld a, [EnemyMonSpecies]
+ ld [wWildMon], a
+ ld [CurPartySpecies], a
+ ld [wd265], a
+ ld a, [BattleType]
+ cp BATTLETYPE_TUTORIAL
+ jp z, .FinishTutorial
+
+ farcall TrainerRankings_WildMonsCaught
+
+ ld hl, Text_GotchaMonWasCaught
+ call PrintText
+
+ call ClearSprites
+
+ ld a, [wd265]
+ dec a
+ call CheckCaughtMon
+
+ ld a, c
+ push af
+ ld a, [wd265]
+ dec a
+ call SetSeenAndCaughtMon
+ pop af
+ and a
+ jr nz, .skip_pokedex
+
+ call CheckReceivedDex
+ jr z, .skip_pokedex
+
+ ld hl, Text_AddedToPokedex
+ call PrintText
+
+ call ClearSprites
+
+ ld a, [EnemyMonSpecies]
+ ld [wd265], a
+ predef NewPokedexEntry
+
+.skip_pokedex
+ ld a, [BattleType]
+ cp BATTLETYPE_CONTEST
+ jp z, .catch_bug_contest_mon
+ cp BATTLETYPE_CELEBI
+ jr nz, .not_celebi
+ ld hl, wBattleResult
+ set 6, [hl]
+.not_celebi
+
+ ld a, [PartyCount]
+ cp PARTY_LENGTH
+ jr z, .SendToPC
+
+ xor a ; PARTYMON
+ ld [MonType], a
+ call ClearSprites
+
+ predef TryAddMonToParty
+
+ farcall SetCaughtData
+
+ ld a, [CurItem]
+ cp FRIEND_BALL
+ jr nz, .SkipPartyMonFriendBall
+
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMon1Happiness
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+
+ ld a, FRIEND_BALL_HAPPINESS
+ ld [hl], a
+.SkipPartyMonFriendBall:
+
+ ld hl, Text_AskNicknameNewlyCaughtMon
+ call PrintText
+
+ ld a, [CurPartySpecies]
+ ld [wd265], a
+ call GetPokemonName
+
+ call YesNoBox
+ jp c, .return_from_capture
+
+ ld a, [PartyCount]
+ dec a
+ ld [CurPartyMon], a
+ ld hl, PartyMonNicknames
+ ld bc, PKMN_NAME_LENGTH
+ call AddNTimes
+
+ ld d, h
+ ld e, l
+ push de
+ xor a ; PARTYMON
+ ld [MonType], a
+ ld b, 0
+ farcall NamingScreen
+
+ call RotateThreePalettesRight
+
+ call LoadStandardFont
+
+ pop hl
+ ld de, StringBuffer1
+ call InitName
+
+ jp .return_from_capture
+
+.SendToPC:
+ call ClearSprites
+
+ predef SentPkmnIntoBox
+
+ farcall SetBoxMonCaughtData
+
+ ld a, BANK(sBoxCount)
+ call GetSRAMBank
+
+ ld a, [sBoxCount]
+ cp MONS_PER_BOX
+ jr nz, .BoxNotFullYet
+ ld hl, wBattleResult
+ set 7, [hl]
+.BoxNotFullYet:
+ ld a, [CurItem]
+ cp FRIEND_BALL
+ jr nz, .SkipBoxMonFriendBall
+ ; The captured mon is now first in the box
+ ld a, FRIEND_BALL_HAPPINESS
+ ld [sBoxMon1Happiness], a
+.SkipBoxMonFriendBall:
+ call CloseSRAM
+
+ ld hl, Text_AskNicknameNewlyCaughtMon
+ call PrintText
+
+ ld a, [CurPartySpecies]
+ ld [wd265], a
+ call GetPokemonName
+
+ call YesNoBox
+ jr c, .SkipBoxMonNickname
+
+ xor a
+ ld [CurPartyMon], a
+ ld a, BOXMON
+ ld [MonType], a
+ ld de, wMonOrItemNameBuffer
+ ld b, $0
+ farcall NamingScreen
+
+ ld a, BANK(sBoxMonNicknames)
+ call GetSRAMBank
+
+ ld hl, wMonOrItemNameBuffer
+ ld de, sBoxMonNicknames
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+
+ ld hl, sBoxMonNicknames
+ ld de, StringBuffer1
+ call InitName
+
+ call CloseSRAM
+
+.SkipBoxMonNickname:
+ ld a, BANK(sBoxMonNicknames)
+ call GetSRAMBank
+
+ ld hl, sBoxMonNicknames
+ ld de, wMonOrItemNameBuffer
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+
+ call CloseSRAM
+
+ ld hl, Text_SentToBillsPC
+ call PrintText
+
+ call RotateThreePalettesRight
+ call LoadStandardFont
+ jr .return_from_capture
+
+.catch_bug_contest_mon
+ farcall BugContest_SetCaughtContestMon
+ jr .return_from_capture
+
+.FinishTutorial:
+ ld hl, Text_GotchaMonWasCaught
+
+.shake_and_break_free
+ call PrintText
+ call ClearSprites
+
+.return_from_capture
+ ld a, [BattleType]
+ cp BATTLETYPE_TUTORIAL
+ ret z
+ cp BATTLETYPE_DEBUG
+ ret z
+ cp BATTLETYPE_CONTEST
+ jr z, .used_park_ball
+
+ ld a, [wWildMon]
+ and a
+ jr z, .toss
+
+ call ClearBGPalettes
+ call ClearTileMap
+
+.toss
+ ld hl, NumItems
+ inc a
+ ld [wItemQuantityChangeBuffer], a
+ jp TossItem
+
+.used_park_ball
+ ld hl, wParkBallsRemaining
+ dec [hl]
+ ret
+; ec0a
+
+
+BallMultiplierFunctionTable:
+; table of routines that increase or decrease the catch rate based on
+; which ball is used in a certain situation.
+ dbw ULTRA_BALL, UltraBallMultiplier
+ dbw GREAT_BALL, GreatBallMultiplier
+ dbw SAFARI_BALL, SafariBallMultiplier ; Safari Ball, leftover from RBY
+ dbw HEAVY_BALL, HeavyBallMultiplier
+ dbw LEVEL_BALL, LevelBallMultiplier
+ dbw LURE_BALL, LureBallMultiplier
+ dbw FAST_BALL, FastBallMultiplier
+ dbw MOON_BALL, MoonBallMultiplier
+ dbw LOVE_BALL, LoveBallMultiplier
+ dbw PARK_BALL, ParkBallMultiplier
+ db $ff
+
+UltraBallMultiplier:
+; multiply catch rate by 2
+ sla b
+ ret nc
+ ld b, $ff
+ ret
+
+SafariBallMultiplier:
+GreatBallMultiplier:
+ParkBallMultiplier:
+; multiply catch rate by 1.5
+ ld a, b
+ srl a
+ add b
+ ld b, a
+ ret nc
+ ld b, $ff
+ ret
+
+GetPokedexEntryBank:
+ push hl
+ push de
+ ld a, [EnemyMonSpecies]
+ rlca
+ rlca
+ and 3
+ ld hl, .PokedexEntryBanks
+ ld d, 0
+ ld e, a
+ add hl, de
+ ld a, [hl]
+ pop de
+ pop hl
+ ret
+
+.PokedexEntryBanks:
+
+GLOBAL PokedexEntries1
+GLOBAL PokedexEntries2
+GLOBAL PokedexEntries3
+GLOBAL PokedexEntries4
+
+ db BANK(PokedexEntries1)
+ db BANK(PokedexEntries2)
+ db BANK(PokedexEntries3)
+ db BANK(PokedexEntries4)
+
+HeavyBallMultiplier:
+; subtract 20 from catch rate if weight < 102.4 kg
+; else add 0 to catch rate if weight < 204.8 kg
+; else add 20 to catch rate if weight < 307.2 kg
+; else add 30 to catch rate if weight < 409.6 kg
+; else add 40 to catch rate (never happens)
+ ld a, [EnemyMonSpecies]
+ ld hl, PokedexDataPointerTable
+ dec a
+ ld e, a
+ ld d, 0
+ add hl, de
+ add hl, de
+ ld a, BANK(PokedexDataPointerTable)
+ call GetFarHalfword
+
+.SkipText:
+ call GetPokedexEntryBank
+ call GetFarByte
+ inc hl
+ cp "@"
+ jr nz, .SkipText
+
+ call GetPokedexEntryBank
+ push bc
+ inc hl
+ inc hl
+ call GetFarHalfword
+
+ srl h
+ rr l
+ ld b, h
+ ld c, l
+
+ rept 4
+ srl b
+ rr c
+ endr
+ call .subbc
+
+ srl b
+ rr c
+ call .subbc
+
+ ld a, h
+ pop bc
+ jr .compare
+
+.subbc
+ ; subtract bc from hl
+ push bc
+ ld a, b
+ cpl
+ ld b, a
+ ld a, c
+ cpl
+ ld c, a
+ inc bc
+ add hl, bc
+ pop bc
+ ret
+
+.compare
+ ld c, a
+ cp 1024 >> 8 ; 102.4 kg
+ jr c, .lightmon
+
+ ld hl, .WeightsTable
+.lookup
+ ld a, c
+ cp [hl]
+ jr c, .heavymon
+ inc hl
+ inc hl
+ jr .lookup
+
+.heavymon
+ inc hl
+ ld a, b
+ add [hl]
+ ld b, a
+ ret nc
+ ld b, $ff
+ ret
+
+.lightmon
+ ld a, b
+ sub 20
+ ld b, a
+ ret nc
+ ld b, $1
+ ret
+
+.WeightsTable:
+; weight factor, boost
+ db 2048 >> 8, 0
+ db 3072 >> 8, 20
+ db 4096 >> 8, 30
+ db 65280 >> 8, 40
+
+LureBallMultiplier:
+; multiply catch rate by 3 if this is a fishing rod battle
+ ld a, [BattleType]
+ cp BATTLETYPE_FISH
+ ret nz
+
+ ld a, b
+ add a
+ jr c, .max
+
+ add b
+ jr nc, .done
+.max
+ ld a, $ff
+.done
+ ld b, a
+ ret
+
+MoonBallMultiplier:
+; This function is buggy.
+; Intent: multiply catch rate by 4 if mon evolves with moon stone
+; Reality: no boost
+
+GLOBAL EvosAttacks
+GLOBAL EvosAttacksPointers
+
+ push bc
+ ld a, [TempEnemyMonSpecies]
+ dec a
+ ld c, a
+ ld b, 0
+ ld hl, EvosAttacksPointers
+ add hl, bc
+ add hl, bc
+ ld a, BANK(EvosAttacksPointers)
+ call GetFarHalfword
+ pop bc
+
+ push bc
+ ld a, BANK(EvosAttacks)
+ call GetFarByte
+ cp EVOLVE_ITEM
+ pop bc
+ ret nz
+
+ inc hl
+ inc hl
+ inc hl
+
+; Moon Stone's constant from Pokémon Red is used.
+; No Pokémon evolve with Burn Heal,
+; so Moon Balls always have a catch rate of 1×.
+ push bc
+ ld a, BANK(EvosAttacks)
+ call GetFarByte
+ cp MOON_STONE_RED ; BURN_HEAL
+ pop bc
+ ret nz
+
+ sla b
+ jr c, .max
+ sla b
+ jr nc, .done
+.max
+ ld b, $ff
+.done
+ ret
+
+LoveBallMultiplier:
+; This function is buggy.
+; Intent: multiply catch rate by 8 if mons are of same species, different sex
+; Reality: multiply catch rate by 8 if mons are of same species, same sex
+
+ ; does species match?
+ ld a, [TempEnemyMonSpecies]
+ ld c, a
+ ld a, [TempBattleMonSpecies]
+ cp c
+ ret nz
+
+ ; check player mon species
+ push bc
+ ld a, [TempBattleMonSpecies]
+ ld [CurPartySpecies], a
+ xor a ; PARTYMON
+ ld [MonType], a
+ ld a, [CurBattleMon]
+ ld [CurPartyMon], a
+ farcall GetGender
+ jr c, .done1 ; no effect on genderless
+
+ ld d, 0 ; male
+ jr nz, .playermale
+ inc d ; female
+.playermale
+
+ ; check wild mon species
+ push de
+ ld a, [TempEnemyMonSpecies]
+ ld [CurPartySpecies], a
+ ld a, WILDMON
+ ld [MonType], a
+ farcall GetGender
+ jr c, .done2 ; no effect on genderless
+
+ ld d, 0 ; male
+ jr nz, .wildmale
+ inc d ; female
+.wildmale
+
+ ld a, d
+ pop de
+ cp d
+ pop bc
+ ret nz ; for the intended effect, this should be "ret z"
+
+ sla b
+ jr c, .max
+ sla b
+ jr c, .max
+ sla b
+ ret nc
+.max
+ ld b, $ff
+ ret
+
+.done2
+ pop de
+
+.done1
+ pop bc
+ ret
+
+FastBallMultiplier:
+; This function is buggy.
+; Intent: multiply catch rate by 4 if enemy mon is in one of the three
+; FleeMons tables.
+; Reality: multiply catch rate by 4 if enemy mon is one of the first three in
+; the first FleeMons table.
+ ld a, [TempEnemyMonSpecies]
+ ld c, a
+ ld hl, FleeMons
+ ld d, 3
+
+.loop
+ ld a, BANK(FleeMons)
+ call GetFarByte
+
+ inc hl
+ cp -1
+ jr z, .next
+ cp c
+ jr nz, .next ; for the intended effect, this should be "jr nz, .loop"
+ sla b
+ jr c, .max
+
+ sla b
+ ret nc
+
+.max
+ ld b, $ff
+ ret
+
+.next
+ dec d
+ jr nz, .loop
+ ret
+
+LevelBallMultiplier:
+; multiply catch rate by 8 if player mon level / 4 > enemy mon level
+; multiply catch rate by 4 if player mon level / 2 > enemy mon level
+; multiply catch rate by 2 if player mon level > enemy mon level
+ ld a, [BattleMonLevel]
+ ld c, a
+ ld a, [EnemyMonLevel]
+ cp c
+ ret nc ; if player is lower level, we're done here
+ sla b
+ jr c, .max
+
+ srl c
+ cp c
+ ret nc ; if player/2 is lower level, we're done here
+ sla b
+ jr c, .max
+
+ srl c
+ cp c
+ ret nc ; if player/4 is lower level, we're done here
+ sla b
+ ret nc
+
+.max
+ ld b, $ff
+ ret
+
+; These two texts were carried over from gen 1.
+; They are not used in gen 2, and are dummied out.
+
+Text_RBY_CatchMarowak: ; 0xedab
+ ; It dodged the thrown BALL! This #MON can't be caught!
+ text_jump UnknownText_0x1c5a5a
+ db "@"
+; 0xedb0
+
+Text_RBY_NoShake: ; 0xedb0
+ ; You missed the #MON!
+ text_jump UnknownText_0x1c5a90
+ db "@"
+; 0xedb5
+
+Text_NoShake: ; 0xedb5
+ ; Oh no! The #MON broke free!
+ text_jump UnknownText_0x1c5aa6
+ db "@"
+; 0xedba
+
+Text_OneShake: ; 0xedba
+ ; Aww! It appeared to be caught!
+ text_jump UnknownText_0x1c5ac3
+ db "@"
+; 0xedbf
+
+Text_TwoShakes: ; 0xedbf
+ ; Aargh! Almost had it!
+ text_jump UnknownText_0x1c5ae3
+ db "@"
+; 0xedc4
+
+Text_ThreeShakes: ; 0xedc4
+ ; Shoot! It was so close too!
+ text_jump UnknownText_0x1c5afa
+ db "@"
+; 0xedc9
+
+Text_GotchaMonWasCaught: ; 0xedc9
+ ; Gotcha! @ was caught!@ @
+ text_jump UnknownText_0x1c5b17
+ start_asm
+ call WaitSFX
+ push bc
+ ld de, MUSIC_NONE
+ call PlayMusic
+ call DelayFrame
+ ld de, MUSIC_CAPTURE
+ call PlayMusic
+ pop bc
+ ld hl, TextJump_Waitbutton
+ ret
+; ede6
+
+TextJump_Waitbutton: ; 0xede6
+ ; @
+ text_jump Text_Waitbutton_2
+ db "@"
+; 0xedeb
+
+Text_SentToBillsPC: ; 0xedeb
+ ; was sent to BILL's PC.
+ text_jump UnknownText_0x1c5b38
+ db "@"
+; 0xedf0
+
+Text_AddedToPokedex: ; 0xedf0
+ ; 's data was newly added to the #DEX.@ @
+ text_jump UnknownText_0x1c5b53
+ db "@"
+; 0xedf5
+
+Text_AskNicknameNewlyCaughtMon: ; 0xedf5
+ ; Give a nickname to @ ?
+ text_jump UnknownText_0x1c5b7f
+ db "@"
+; 0xedfa
+
+ReturnToBattle_UseBall: ; edfa (3:6dfa)
+ farcall _ReturnToBattle_UseBall
+ ret
+
+TownMap: ; ee01
+ farcall PokegearMap
+ ret
+; ee08
+
+
+Bicycle: ; ee08
+ farcall BikeFunction
+ ret
+; ee0f
+
+
+MoonStone:
+FireStone:
+Thunderstone:
+WaterStone:
+LeafStone:
+SunStone: ; ee0f
+ ld b, PARTYMENUACTION_EVO_STONE
+ call UseItem_SelectMon
+
+ jp c, .DecidedNotToUse
+
+ ld a, MON_ITEM
+ call GetPartyParamLocation
+
+ ld a, [hl]
+ cp EVERSTONE
+ jr z, .NoEffect
+
+ ld a, $1
+ ld [wForceEvolution], a
+ farcall EvolvePokemon
+
+ ld a, [wMonTriedToEvolve]
+ and a
+ jr z, .NoEffect
+
+ jp UseDisposableItem
+
+.NoEffect:
+ call WontHaveAnyEffectMessage
+
+.DecidedNotToUse:
+ xor a
+ ld [wItemEffectSucceeded], a
+ ret
+; ee3d
+
+
+HPUp:
+Protein:
+Iron:
+Carbos:
+Calcium: ; ee3d
+ ld b, PARTYMENUACTION_HEALING_ITEM
+ call UseItem_SelectMon
+
+ jp c, RareCandy_StatBooster_ExitMenu
+
+ call RareCandy_StatBooster_GetParameters
+
+ call GetStatExpRelativePointer
+
+ ld a, MON_STAT_EXP
+ call GetPartyParamLocation
+
+ add hl, bc
+ ld a, [hl]
+ cp 100
+ jr nc, NoEffectMessage
+
+ add 10
+ ld [hl], a
+ call UpdateStatsAfterItem
+
+ call GetStatExpRelativePointer
+
+ ld hl, StatStrings
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, StringBuffer2
+ ld bc, ITEM_NAME_LENGTH
+ call CopyBytes
+
+ call Play_SFX_FULL_HEAL
+
+ ld hl, Text_StatRose
+ call PrintText
+
+ ld c, HAPPINESS_USEDITEM
+ farcall ChangeHappiness
+
+ jp UseDisposableItem
+
+
+NoEffectMessage: ; ee83
+ ld hl, WontHaveAnyEffectText
+ call PrintText
+ jp ClearPalettes
+; ee8c
+
+
+UpdateStatsAfterItem: ; ee8c
+ ld a, MON_MAXHP
+ call GetPartyParamLocation
+ ld d, h
+ ld e, l
+ ld a, MON_STAT_EXP - 1
+ call GetPartyParamLocation
+ ld b, $1
+ predef_jump CalcPkmnStats
+; ee9f
+
+RareCandy_StatBooster_ExitMenu: ; ee9f
+ xor a
+ ld [wItemEffectSucceeded], a
+ jp ClearPalettes
+; eea6
+
+
+Text_StatRose: ; 0xeea6
+ ; 's @ rose.
+ text_jump UnknownText_0x1c5b9a
+ db "@"
+; 0xeeab
+
+
+StatStrings: ; eeab
+ dw .health
+ dw .attack
+ dw .defense
+ dw .speed
+ dw .special
+
+.health db "HEALTH@"
+.attack db "ATTACK@"
+.defense db "DEFENSE@"
+.speed db "SPEED@"
+.special db "SPECIAL@"
+; eed9
+
+
+GetStatExpRelativePointer: ; eed9
+ ld a, [CurItem]
+ ld hl, Table_eeeb
+.next
+ cp [hl]
+ inc hl
+ jr z, .got_it
+ inc hl
+ jr .next
+
+.got_it
+ ld a, [hl]
+ ld c, a
+ ld b, 0
+ ret
+; eeeb
+
+Table_eeeb: ; eeeb
+ db HP_UP, MON_HP_EXP - MON_STAT_EXP
+ db PROTEIN, MON_ATK_EXP - MON_STAT_EXP
+ db IRON, MON_DEF_EXP - MON_STAT_EXP
+ db CARBOS, MON_SPD_EXP - MON_STAT_EXP
+ db CALCIUM, MON_SPC_EXP - MON_STAT_EXP
+; eef5
+
+
+RareCandy_StatBooster_GetParameters: ; eef5
+ ld a, [CurPartySpecies]
+ ld [CurSpecies], a
+ ld [wd265], a
+ ld a, MON_LEVEL
+ call GetPartyParamLocation
+ ld a, [hl]
+ ld [CurPartyLevel], a
+ call GetBaseData
+ ld a, [CurPartyMon]
+ ld hl, PartyMonNicknames
+ call GetNick
+ ret
+; 0xef14
+
+
+RareCandy: ; ef14
+ ld b, PARTYMENUACTION_HEALING_ITEM
+ call UseItem_SelectMon
+
+ jp c, RareCandy_StatBooster_ExitMenu
+
+ call RareCandy_StatBooster_GetParameters
+
+ ld a, MON_LEVEL
+ call GetPartyParamLocation
+
+ ld a, [hl]
+ cp MAX_LEVEL
+ jp nc, NoEffectMessage
+
+ inc a
+ ld [hl], a
+ ld [CurPartyLevel], a
+ push de
+ ld d, a
+ farcall CalcExpAtLevel
+
+ pop de
+ ld a, MON_EXP
+ call GetPartyParamLocation
+
+ ld a, [hMultiplicand]
+ ld [hli], a
+ ld a, [hMultiplicand + 1]
+ ld [hli], a
+ ld a, [hMultiplicand + 2]
+ ld [hl], a
+
+ ld a, MON_MAXHP
+ call GetPartyParamLocation
+ ld a, [hli]
+ ld b, a
+ ld c, [hl]
+ push bc
+ call UpdateStatsAfterItem
+
+ ld a, MON_MAXHP + 1
+ call GetPartyParamLocation
+
+ pop bc
+ ld a, [hld]
+ sub c
+ ld c, a
+ ld a, [hl]
+ sbc b
+ ld b, a
+ dec hl
+ ld a, [hl]
+ add c
+ ld [hld], a
+ ld a, [hl]
+ adc b
+ ld [hl], a
+ farcall LevelUpHappinessMod
+
+ ld a, PARTYMENUTEXT_LEVEL_UP
+ call ItemActionText
+
+ xor a ; PARTYMON
+ ld [MonType], a
+ predef CopyPkmnToTempMon
+
+ hlcoord 9, 0
+ ld b, 10
+ ld c, 9
+ call TextBox
+
+ hlcoord 11, 1
+ ld bc, $0004
+ predef PrintTempMonStats
+
+ call WaitPressAorB_BlinkCursor
+
+ xor a ; PARTYMON
+ ld [MonType], a
+ ld a, [CurPartySpecies]
+ ld [wd265], a
+ predef LearnLevelMoves
+
+ xor a
+ ld [wForceEvolution], a
+ farcall EvolvePokemon
+
+ jp UseDisposableItem
+; efad
+
+
+HealPowder: ; efad
+ ld b, PARTYMENUACTION_HEALING_ITEM
+ call UseItem_SelectMon
+
+ jp c, StatusHealer_ExitMenu
+
+ call UseStatusHealer
+
+ cp $0
+ jr nz, .asm_efc9
+ ld c, HAPPINESS_BITTERPOWDER
+ farcall ChangeHappiness
+
+ call LooksBitterMessage
+
+ ld a, $0
+
+.asm_efc9
+ jp StatusHealer_Jumptable
+; efcc
+
+
+Antidote:
+BurnHeal:
+IceHeal:
+Awakening:
+ParlyzHeal:
+FullHeal:
+Psncureberry:
+Przcureberry:
+BurntBerry:
+IceBerry:
+MintBerry:
+Miracleberry: ; efcc
+ ld b, PARTYMENUACTION_HEALING_ITEM
+ call UseItem_SelectMon
+ jp c, StatusHealer_ExitMenu
+
+FullyHealStatus: ; efd4
+ call UseStatusHealer
+ jp StatusHealer_Jumptable
+; efda
+
+
+UseStatusHealer: ; efda (3:6fda)
+ call IsMonFainted
+ ld a, $1
+ ret z
+ call GetItemHealingAction
+ ld a, MON_STATUS
+ call GetPartyParamLocation
+ ld a, [hl]
+ and c
+ jr nz, .good
+ call IsItemUsedOnConfusedMon
+ ld a, $1
+ ret nc
+ ld b, PARTYMENUTEXT_HEAL_CONFUSION
+.good
+ xor a
+ ld [hl], a
+ ld a, b
+ ld [PartyMenuActionText], a
+ call HealStatus
+ call Play_SFX_FULL_HEAL
+ call ItemActionTextWaitButton
+ call UseDisposableItem
+ ld a, $0
+ ret
+
+IsItemUsedOnConfusedMon: ; f009 (3:7009)
+ call IsItemUsedOnBattleMon
+ jr nc, .nope
+ ld a, [PlayerSubStatus3]
+ bit SUBSTATUS_CONFUSED, a
+ jr z, .nope
+ ld a, c
+ cp $ff
+ jr nz, .nope
+ scf
+ ret
+
+.nope
+ and a
+ ret
+
+BattlemonRestoreHealth: ; f01e (3:701e)
+ call IsItemUsedOnBattleMon
+ ret nc
+ ld a, MON_HP
+ call GetPartyParamLocation
+ ld a, [hli]
+ ld [BattleMonHP], a
+ ld a, [hld]
+ ld [BattleMonHP + 1], a
+ ret
+
+HealStatus: ; f030 (3:7030)
+ call IsItemUsedOnBattleMon
+ ret nc
+ xor a
+ ld [BattleMonStatus], a
+ ld hl, PlayerSubStatus5
+ res SUBSTATUS_TOXIC, [hl]
+ ld hl, PlayerSubStatus1
+ res SUBSTATUS_NIGHTMARE, [hl]
+ call GetItemHealingAction
+ ld a, c
+ cp %11111111
+ jr nz, .not_full_heal
+ ld hl, PlayerSubStatus3
+ res SUBSTATUS_CONFUSED, [hl]
+.not_full_heal
+ push bc
+ farcall CalcPlayerStats
+ pop bc
+ ret
+
+GetItemHealingAction: ; f058 (3:7058)
+ push hl
+ ld a, [CurItem]
+ ld hl, .healingactions
+ ld bc, 3
+.next
+ cp [hl]
+ jr z, .found_it
+ add hl, bc
+ jr .next
+
+.found_it
+ inc hl
+ ld b, [hl]
+ inc hl
+ ld a, [hl]
+ ld c, a
+ cp %11111111
+ pop hl
+ ret
+; f071 (3:7071)
+
+.healingactions ; f071
+; item, party menu action text, status
+ db ANTIDOTE, PARTYMENUTEXT_HEAL_PSN, 1 << PSN
+ db BURN_HEAL, PARTYMENUTEXT_HEAL_BRN, 1 << BRN
+ db ICE_HEAL, PARTYMENUTEXT_HEAL_FRZ, 1 << FRZ
+ db AWAKENING, PARTYMENUTEXT_HEAL_SLP, SLP
+ db PARLYZ_HEAL, PARTYMENUTEXT_HEAL_PAR, 1 << PAR
+ db FULL_HEAL, PARTYMENUTEXT_HEAL_ALL, %11111111
+ db FULL_RESTORE, PARTYMENUTEXT_HEAL_ALL, %11111111
+ db HEAL_POWDER, PARTYMENUTEXT_HEAL_ALL, %11111111
+ db PSNCUREBERRY, PARTYMENUTEXT_HEAL_PSN, 1 << PSN
+ db PRZCUREBERRY, PARTYMENUTEXT_HEAL_PAR, 1 << PAR
+ db BURNT_BERRY, PARTYMENUTEXT_HEAL_FRZ, 1 << FRZ
+ db ICE_BERRY, PARTYMENUTEXT_HEAL_BRN, 1 << BRN
+ db MINT_BERRY, PARTYMENUTEXT_HEAL_SLP, SLP
+ db MIRACLEBERRY, PARTYMENUTEXT_HEAL_ALL, %11111111
+ db -1, 0, 0
+; f09e
+
+StatusHealer_Jumptable: ; f09e (3:709e)
+ ld hl, .dw
+ rst JumpTable
+ ret
+
+.dw ; f0a3 (3:70a3)
+ dw StatusHealer_ClearPalettes
+ dw StatusHealer_NoEffect
+ dw StatusHealer_ExitMenu
+
+
+RevivalHerb: ; f0a9
+ ld b, PARTYMENUACTION_HEALING_ITEM
+ call UseItem_SelectMon
+ jp c, StatusHealer_ExitMenu
+
+ call RevivePokemon
+ cp 0
+ jr nz, .asm_f0c5
+
+ ld c, HAPPINESS_REVIVALHERB
+ farcall ChangeHappiness
+ call LooksBitterMessage
+ ld a, 0
+
+.asm_f0c5
+ jp StatusHealer_Jumptable
+; f0c8
+
+
+Revive:
+MaxRevive: ; f0c8
+ ld b, PARTYMENUACTION_HEALING_ITEM
+ call UseItem_SelectMon
+ jp c, StatusHealer_ExitMenu
+
+ call RevivePokemon
+ jp StatusHealer_Jumptable
+; f0d6
+
+
+RevivePokemon: ; f0d6
+ call IsMonFainted
+ ld a, 1
+ ret nz
+ ld a, [wBattleMode]
+ and a
+ jr z, .skip_to_revive
+
+ ld a, [CurPartyMon]
+ ld c, a
+ ld d, 0
+ ld hl, wBattleParticipantsIncludingFainted
+ ld b, CHECK_FLAG
+ predef FlagPredef
+ ld a, c
+ and a
+ jr z, .skip_to_revive
+
+ ld a, [CurPartyMon]
+ ld c, a
+ ld hl, wBattleParticipantsNotFainted
+ ld b, SET_FLAG
+ predef FlagPredef
+
+.skip_to_revive
+ xor a
+ ld [Danger], a
+ ld a, [CurItem]
+ cp REVIVE
+ jr z, .revive_half_hp
+
+ call ReviveFullHP
+ jr .finish_revive
+
+.revive_half_hp
+ call ReviveHalfHP
+
+.finish_revive
+ call HealHP_SFX_GFX
+ ld a, PARTYMENUTEXT_REVIVE
+ ld [PartyMenuActionText], a
+ call ItemActionTextWaitButton
+ call UseDisposableItem
+ ld a, 0
+ ret
+; f128
+
+
+FullRestore: ; f128
+ ld b, PARTYMENUACTION_HEALING_ITEM
+ call UseItem_SelectMon
+ jp c, StatusHealer_ExitMenu
+
+ call IsMonFainted
+ jp z, StatusHealer_NoEffect
+
+ call IsMonAtFullHealth
+ jr c, .NotAtFullHealth
+
+ jp FullyHealStatus
+
+.NotAtFullHealth:
+ call .FullRestore
+ jp StatusHealer_Jumptable
+; f144
+
+
+.FullRestore: ; f144
+ xor a
+ ld [Danger], a
+ call ReviveFullHP
+ ld a, MON_STATUS
+ call GetPartyParamLocation
+ xor a
+ ld [hli], a
+ ld [hl], a
+ call HealStatus
+ call BattlemonRestoreHealth
+ call HealHP_SFX_GFX
+ ld a, PARTYMENUTEXT_HEAL_HP
+ ld [PartyMenuActionText], a
+ call ItemActionTextWaitButton
+ call UseDisposableItem
+ ld a, 0
+ ret
+; f16a
+
+
+BitterBerry: ; f16a
+ ld hl, PlayerSubStatus3
+ bit SUBSTATUS_CONFUSED, [hl]
+ ld a, 1
+ jr z, .done
+
+ res SUBSTATUS_CONFUSED, [hl]
+ xor a
+ ld [hBattleTurn], a
+ call UseItemText
+
+ ld hl, ConfusedNoMoreText
+ call StdBattleTextBox
+
+ ld a, 0
+
+.done
+ jp StatusHealer_Jumptable
+; f186
+
+
+MaxPotion:
+HyperPotion:
+SuperPotion:
+Potion:
+FreshWater:
+SodaPop:
+Lemonade:
+MoomooMilk:
+Ragecandybar:
+BerryJuice:
+Berry:
+GoldBerry: ; f186
+ call ItemRestoreHP
+ jp StatusHealer_Jumptable
+; f18c
+
+
+Energypowder: ; f18c
+ ld c, HAPPINESS_BITTERPOWDER
+ jr EnergypowderEnergyRootCommon
+; f190
+
+EnergyRoot: ; f190
+ ld c, HAPPINESS_ENERGYROOT
+; f192
+
+EnergypowderEnergyRootCommon: ; f192
+ push bc
+ call ItemRestoreHP
+ pop bc
+ cp 0
+ jr nz, .skip_happiness
+
+ farcall ChangeHappiness
+ call LooksBitterMessage
+ ld a, 0
+
+.skip_happiness
+ jp StatusHealer_Jumptable
+; f1a9
+
+
+ItemRestoreHP: ; f1a9 (3:71a9)
+ ld b, PARTYMENUACTION_HEALING_ITEM
+ call UseItem_SelectMon
+ ld a, 2
+ ret c
+
+ call IsMonFainted
+ ld a, 1
+ ret z
+
+ call IsMonAtFullHealth
+ ld a, 1
+ ret nc
+
+ xor a
+ ld [Danger], a
+ call GetHealingItemAmount
+ call RestoreHealth
+ call BattlemonRestoreHealth
+ call HealHP_SFX_GFX
+ ld a, PARTYMENUTEXT_HEAL_HP
+ ld [PartyMenuActionText], a
+ call ItemActionTextWaitButton
+ call UseDisposableItem
+ ld a, 0
+ ret
+
+HealHP_SFX_GFX: ; f1db (3:71db)
+ push de
+ ld de, SFX_POTION
+ call WaitPlaySFX
+ pop de
+ ld a, [CurPartyMon]
+ hlcoord 11, 0
+ ld bc, SCREEN_WIDTH * 2
+ call AddNTimes
+ ld a, $2
+ ld [wWhichHPBar], a
+ predef_jump AnimateHPBar
+
+UseItem_SelectMon: ; f1f9 (3:71f9)
+ call .SelectMon
+ ret c
+
+ ld a, [CurPartySpecies]
+ cp EGG
+ jr nz, .not_egg
+
+ call CantUseOnEggMessage
+ scf
+ ret
+
+.not_egg
+ and a
+ ret
+
+.SelectMon: ; f20b (3:720b)
+ ld a, b
+ ld [PartyMenuActionText], a
+ push hl
+ push de
+ push bc
+ call ClearBGPalettes
+ call ChoosePkmnToUseItemOn
+ pop bc
+ pop de
+ pop hl
+ ret
+
+ChoosePkmnToUseItemOn: ; f21c (3:721c)
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuGFX
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
+ call WaitBGMap
+ call SetPalettes
+ call DelayFrame
+ farcall PartyMenuSelect
+ ret
+
+ItemActionText: ; f24a (3:724a)
+ ld [PartyMenuActionText], a
+ ld a, [CurPartySpecies]
+ push af
+ ld a, [CurPartyMon]
+ push af
+ push hl
+ push de
+ push bc
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuActionText
+ call WaitBGMap
+ call SetPalettes
+ call DelayFrame
+ pop bc
+ pop de
+ pop hl
+ pop af
+ ld [CurPartyMon], a
+ pop af
+ ld [CurPartySpecies], a
+ ret
+
+ItemActionTextWaitButton: ; f279 (3:7279)
+ xor a
+ ld [hBGMapMode], a
+ hlcoord 0, 0
+ ld bc, TileMapEnd - TileMap
+ ld a, " "
+ call ByteFill
+ ld a, [PartyMenuActionText]
+ call ItemActionText
+ ld a, $1
+ ld [hBGMapMode], a
+ ld c, 50
+ call DelayFrames
+ jp WaitPressAorB_BlinkCursor
+
+StatusHealer_NoEffect: ; f299 (3:7299)
+ call WontHaveAnyEffectMessage
+ jr StatusHealer_ClearPalettes
+
+StatusHealer_ExitMenu: ; f29e (3:729e)
+ xor a
+ ld [wItemEffectSucceeded], a
+StatusHealer_ClearPalettes: ; f2a2 (3:72a2)
+ call ClearPalettes
+ ret
+
+IsItemUsedOnBattleMon: ; f2a6 (3:72a6)
+ ld a, [wBattleMode]
+ and a
+ ret z
+ ld a, [CurPartyMon]
+ push hl
+ ld hl, CurBattleMon
+ cp [hl]
+ pop hl
+ jr nz, .nope
+ scf
+ ret
+
+.nope
+ xor a
+ ret
+
+ReviveHalfHP: ; f2ba (3:72ba)
+ call LoadHPFromBuffer1
+ srl d
+ rr e
+ jr ContinueRevive
+
+ReviveFullHP: ; f2c3 (3:72c3)
+ call LoadHPFromBuffer1
+ContinueRevive: ; f2c6 (3:72c6)
+ ld a, MON_HP
+ call GetPartyParamLocation
+ ld [hl], d
+ inc hl
+ ld [hl], e
+ jp LoadCurHPIntoBuffer5
+
+RestoreHealth: ; f2d1 (3:72d1)
+ ld a, MON_HP + 1
+ call GetPartyParamLocation
+ ld a, [hl]
+ add e
+ ld [hld], a
+ ld a, [hl]
+ adc d
+ ld [hl], a
+ jr c, .full_hp
+ call LoadCurHPIntoBuffer5
+ ld a, MON_HP + 1
+ call GetPartyParamLocation
+ ld d, h
+ ld e, l
+ ld a, MON_MAXHP + 1
+ call GetPartyParamLocation
+ ld a, [de]
+ sub [hl]
+ dec de
+ dec hl
+ ld a, [de]
+ sbc [hl]
+ jr c, .finish
+.full_hp
+ call ReviveFullHP
+.finish
+ ret
+
+RemoveHP: ; f2f9 (3:72f9)
+ ld a, MON_HP + 1
+ call GetPartyParamLocation
+ ld a, [hl]
+ sub e
+ ld [hld], a
+ ld a, [hl]
+ sbc d
+ ld [hl], a
+ jr nc, .okay
+ xor a
+ ld [hld], a
+ ld [hl], a
+.okay
+ call LoadCurHPIntoBuffer5
+ ret
+
+IsMonFainted: ; f30d (3:730d)
+ push de
+ call LoadMaxHPToBuffer1
+ call LoadCurHPToBuffer3
+ call LoadHPFromBuffer3
+ ld a, d
+ or e
+ pop de
+ ret
+
+IsMonAtFullHealth: ; f31b (3:731b)
+ call LoadHPFromBuffer3
+ ld h, d
+ ld l, e
+ call LoadHPFromBuffer1
+ ld a, l
+ sub e
+ ld a, h
+ sbc d
+ ret
+
+LoadCurHPIntoBuffer5: ; f328 (3:7328)
+ ld a, MON_HP
+ call GetPartyParamLocation
+ ld a, [hli]
+ ld [Buffer6], a
+ ld a, [hl]
+ ld [Buffer5], a
+ ret
+; f336 (3:7336)
+
+LoadHPIntoBuffer5: ; f336
+ ld a, d
+ ld [Buffer6], a
+ ld a, e
+ ld [Buffer5], a
+ ret
+; f33f
+
+LoadHPFromBuffer5: ; f33f
+ ld a, [Buffer6]
+ ld d, a
+ ld a, [Buffer5]
+ ld e, a
+ ret
+; f348
+
+LoadCurHPToBuffer3: ; f348 (3:7348)
+ ld a, MON_HP
+ call GetPartyParamLocation
+ ld a, [hli]
+ ld [Buffer4], a
+ ld a, [hl]
+ ld [Buffer3], a
+ ret
+
+LoadHPFromBuffer3: ; f356 (3:7356)
+ ld a, [Buffer4]
+ ld d, a
+ ld a, [Buffer3]
+ ld e, a
+ ret
+
+LoadMaxHPToBuffer1: ; f35f (3:735f)
+ push hl
+ ld a, MON_MAXHP
+ call GetPartyParamLocation
+ ld a, [hli]
+ ld [Buffer2], a
+ ld a, [hl]
+ ld [Buffer1], a
+ pop hl
+ ret
+
+LoadHPFromBuffer1: ; f36f (3:736f)
+ ld a, [Buffer2]
+ ld d, a
+ ld a, [Buffer1]
+ ld e, a
+ ret
+
+GetOneFifthMaxHP: ; f378 (3:7378)
+ push bc
+ ld a, MON_MAXHP
+ call GetPartyParamLocation
+ ld a, [hli]
+ ld [hDividend + 0], a
+ ld a, [hl]
+ ld [hDividend + 1], a
+ ld a, 5
+ ld [hDivisor], a
+ ld b, 2
+ call Divide
+ ld a, [hQuotient + 1]
+ ld d, a
+ ld a, [hQuotient + 2]
+ ld e, a
+ pop bc
+ ret
+
+GetHealingItemAmount: ; f395 (3:7395)
+ push hl
+ ld a, [CurItem]
+ ld hl, .Healing
+ ld d, a
+.next
+ ld a, [hli]
+ cp -1
+ jr z, .NotFound
+ cp d
+ jr z, .done
+ inc hl
+ inc hl
+ jr .next
+
+.NotFound:
+ scf
+.done
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ pop hl
+ ret
+; f3af (3:73af)
+
+.Healing: ; f3af
+ dbw FRESH_WATER, 50
+ dbw SODA_POP, 60
+ dbw LEMONADE, 80
+ dbw HYPER_POTION, 200
+ dbw SUPER_POTION, 50
+ dbw POTION, 20
+ dbw MAX_POTION, MAX_STAT_VALUE
+ dbw FULL_RESTORE, MAX_STAT_VALUE
+ dbw MOOMOO_MILK, 100
+ dbw BERRY, 10
+ dbw GOLD_BERRY, 30
+ dbw ENERGYPOWDER, 50
+ dbw ENERGY_ROOT, 200
+ dbw RAGECANDYBAR, 20
+ dbw BERRY_JUICE, 20
+ dbw -1, 0
+; f3df
+
+Softboiled_MilkDrinkFunction: ; f3df (3:73df)
+; Softboiled/Milk Drink in the field
+ ld a, [wPartyMenuCursor]
+ dec a
+ ld b, a
+ call .SelectMilkDrinkRecipient ; select pokemon
+ jr c, .skip
+ ld a, b
+ ld [CurPartyMon], a
+ call IsMonFainted
+ call GetOneFifthMaxHP
+ call RemoveHP
+ push bc
+ call HealHP_SFX_GFX
+ pop bc
+ call GetOneFifthMaxHP
+ ld a, c
+ ld [CurPartyMon], a
+ call IsMonFainted
+ call RestoreHealth
+ call HealHP_SFX_GFX
+ ld a, PARTYMENUTEXT_HEAL_HP
+ call ItemActionText
+ call JoyWaitAorB
+.skip
+ ld a, b
+ inc a
+ ld [wPartyMenuCursor], a
+ ret
+
+.SelectMilkDrinkRecipient: ; f419 (3:7419)
+.loop
+ push bc
+ ld a, PARTYMENUACTION_HEALING_ITEM
+ ld [PartyMenuActionText], a
+ call ChoosePkmnToUseItemOn
+ pop bc
+ jr c, .set_carry
+ ld a, [wPartyMenuCursor]
+ dec a
+ ld c, a
+ ld a, b
+ cp c
+ jr z, .cant_use ; chose the same mon as user
+ ld a, c
+ ld [CurPartyMon], a
+ call IsMonFainted
+ jr z, .cant_use
+ call IsMonAtFullHealth
+ jr nc, .cant_use
+ xor a
+ ret
+
+.set_carry
+ scf
+ ret
+
+.cant_use
+ push bc
+ ld hl, .Text_CantBeUsed
+ call MenuTextBoxBackup
+ pop bc
+ jr .loop
+; f44a (3:744a)
+
+.Text_CantBeUsed: ; 0xf44a
+ ; That can't be used on this #MON.
+ text_jump UnknownText_0x1c5bac
+ db "@"
+; 0xf44f
+
+
+EscapeRope: ; f44f
+ xor a
+ ld [wItemEffectSucceeded], a
+ farcall EscapeRopeFunction
+
+ ld a, [wItemEffectSucceeded]
+ cp 1
+ call z, UseDisposableItem
+ ret
+; f462
+
+
+SuperRepel: ; f462
+ ld b, 200
+ jr UseRepel
+; f466
+
+MaxRepel: ; f466
+ ld b, 250
+ jr UseRepel
+; f466
+
+Repel: ; f46a
+ ld b, 100
+; f46c
+
+UseRepel: ; f46c
+ ld a, [wRepelEffect]
+ and a
+ ld hl, TextJump_RepelUsedEarlierIsStillInEffect
+ jp nz, PrintText
+
+ ld a, b
+ ld [wRepelEffect], a
+ jp UseItemText
+
+
+TextJump_RepelUsedEarlierIsStillInEffect: ; 0xf47d
+ ; The REPEL used earlier is still in effect.
+ text_jump Text_RepelUsedEarlierIsStillInEffect
+ db "@"
+; 0xf482
+
+
+XAccuracy: ; f482
+ ld hl, PlayerSubStatus4
+ bit SUBSTATUS_X_ACCURACY, [hl]
+ jp nz, WontHaveAnyEffect_NotUsedMessage
+ set SUBSTATUS_X_ACCURACY, [hl]
+ jp UseItemText
+; f48f
+
+
+PokeDoll: ; f48f
+ ld a, [wBattleMode]
+ dec a
+ jr nz, .asm_f4a6
+ inc a
+ ld [wForcedSwitch], a
+ ld a, [wBattleResult]
+ and 3 << 6
+ or $2
+ ld [wBattleResult], a
+ jp UseItemText
+
+.asm_f4a6
+ xor a
+ ld [wItemEffectSucceeded], a
+ ret
+; f4ab
+
+
+GuardSpec: ; f4ab
+ ld hl, PlayerSubStatus4
+ bit SUBSTATUS_MIST, [hl]
+ jp nz, WontHaveAnyEffect_NotUsedMessage
+ set SUBSTATUS_MIST, [hl]
+ jp UseItemText
+; f4b8
+
+
+DireHit: ; f4b8
+ ld hl, PlayerSubStatus4
+ bit SUBSTATUS_FOCUS_ENERGY, [hl]
+ jp nz, WontHaveAnyEffect_NotUsedMessage
+ set SUBSTATUS_FOCUS_ENERGY, [hl]
+ jp UseItemText
+; f4c5
+
+
+XAttack:
+XDefend:
+XSpeed:
+XSpecial: ; f4c5
+ call UseItemText
+
+ ld a, [CurItem]
+ ld hl, .x_item_table
+
+.loop
+ cp [hl]
+ jr z, .got_it
+ inc hl
+ inc hl
+ jr .loop
+
+.got_it
+ inc hl
+ ld b, [hl]
+ xor a
+ ld [hBattleTurn], a
+ ld [AttackMissed], a
+ ld [EffectFailed], a
+ farcall CheckIfStatCanBeRaised
+ call WaitSFX
+
+ farcall BattleCommand_StatUpMessage
+ farcall BattleCommand_StatUpFailText
+
+ ld a, [CurBattleMon]
+ ld [CurPartyMon], a
+ ld c, HAPPINESS_USEDXITEM
+ farcall ChangeHappiness
+ ret
+; f504
+
+.x_item_table ; f504
+ db X_ATTACK, ATTACK
+ db X_DEFEND, DEFENSE
+ db X_SPEED, SPEED
+ db X_SPECIAL, SP_ATTACK
+; f50c
+
+
+PokeFlute: ; f50c
+ ld a, [wBattleMode]
+ and a
+ jr nz, .dummy
+.dummy
+
+ xor a
+ ld [wd002], a
+
+ ld b, $ff ^ SLP
+
+ ld hl, PartyMon1Status
+ call .CureSleep
+
+ ld a, [wBattleMode]
+ cp WILD_BATTLE
+ jr z, .skip_otrainer
+ ld hl, OTPartyMon1Status
+ call .CureSleep
+.skip_otrainer
+
+ ld hl, BattleMonStatus
+ ld a, [hl]
+ and b
+ ld [hl], a
+ ld hl, EnemyMonStatus
+ ld a, [hl]
+ and b
+ ld [hl], a
+
+ ld a, [wd002]
+ and a
+ ld hl, .CatchyTune
+ jp z, PrintText
+ ld hl, .PlayedTheFlute
+ call PrintText
+
+ ld a, [Danger]
+ and 1 << DANGER_ON_F
+ jr nz, .dummy2
+.dummy2
+ ld hl, .AllSleepingMonWokeUp
+ jp PrintText
+
+
+.CureSleep:
+ ld de, PARTYMON_STRUCT_LENGTH
+ ld c, PARTY_LENGTH
+
+.loop
+ ld a, [hl]
+ push af
+ and SLP
+ jr z, .not_asleep
+ ld a, 1
+ ld [wd002], a
+.not_asleep
+ pop af
+ and b
+ ld [hl], a
+ add hl, de
+ dec c
+ jr nz, .loop
+ ret
+; f56c
+
+
+.CatchyTune: ; 0xf56c
+ ; Played the # FLUTE. Now, that's a catchy tune!
+ text_jump UnknownText_0x1c5bf9
+ db "@"
+; 0xf571
+
+.AllSleepingMonWokeUp: ; 0xf571
+ ; All sleeping #MON woke up.
+ text_jump UnknownText_0x1c5c28
+ db "@"
+; 0xf576
+
+.PlayedTheFlute: ; 0xf576
+ ; played the # FLUTE.@ @
+ text_jump UnknownText_0x1c5c44
+ start_asm
+ ld a, [wBattleMode]
+ and a
+ jr nz, .battle
+
+ push de
+ ld de, SFX_POKEFLUTE
+ call WaitPlaySFX
+ call WaitSFX
+ pop de
+
+.battle
+ jp PokeFluteTerminatorCharacter
+; f58f
+
+
+BlueCard: ; f58f
+ ld hl, .bluecardtext
+ jp MenuTextBoxWaitButton
+
+.bluecardtext
+ text_jump UnknownText_0x1c5c5e
+ db "@"
+; f59a
+
+
+CoinCase: ; f59a
+ ld hl, .coincasetext
+ jp MenuTextBoxWaitButton
+
+.coincasetext
+ text_jump UnknownText_0x1c5c7b
+ db "@"
+; f5a5
+
+
+OldRod: ; f5a5
+ ld e, $0
+ jr UseRod
+; f5a9
+
+GoodRod: ; f5a9
+ ld e, $1
+ jr UseRod
+; f5ad
+
+SuperRod: ; f5ad
+ ld e, $2
+ jr UseRod
+; f5b1
+
+UseRod: ; f5b1
+ farcall FishFunction
+ ret
+; f5b8
+
+
+Itemfinder: ; f5b8
+ farcall ItemFinder
+ ret
+; f5bf
+
+
+MaxElixer:
+PPUp:
+Ether:
+MaxEther:
+Elixer:
+Mysteryberry: ; f5bf
+ ld a, [CurItem]
+ ld [wd002], a
+
+.loop
+ ; Party Screen opens to choose on which Pkmn to use the Item
+ ld b, PARTYMENUACTION_HEALING_ITEM
+ call UseItem_SelectMon
+ jp c, PPRestoreItem_Cancel
+
+.loop2
+ ld a, [wd002]
+ cp MAX_ELIXER
+ jp z, Elixer_RestorePPofAllMoves
+ cp ELIXER
+ jp z, Elixer_RestorePPofAllMoves
+
+ ld hl, TextJump_RaiseThePPOfWhichMove
+ ld a, [wd002]
+ cp PP_UP
+ jr z, .ppup
+ ld hl, TextJump_RestoreThePPOfWhichMove
+
+.ppup
+ call PrintText
+
+ ld a, [CurMoveNum]
+ push af
+ xor a
+ ld [CurMoveNum], a
+ ld a, $2
+ ld [wMoveSelectionMenuType], a
+ farcall MoveSelectionScreen
+ pop bc
+
+ ld a, b
+ ld [CurMoveNum], a
+ jr nz, .loop
+ ld hl, PartyMon1Moves
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call GetMthMoveOfNthPartymon
+
+ push hl
+ ld a, [hl]
+ ld [wd265], a
+ call GetMoveName
+ call CopyName1
+ pop hl
+
+ ld a, [wd002]
+ cp PP_UP
+ jp nz, Not_PP_Up
+
+ ld a, [hl]
+ cp SKETCH
+ jr z, .CantUsePPUpOnSketch
+
+ ld bc, $0015
+ add hl, bc
+ ld a, [hl]
+ cp 3 << 6 ; have 3 PP Ups already been used?
+ jr c, .do_ppup
+
+.CantUsePPUpOnSketch:
+.pp_is_maxed_out
+ ld hl, TextJump_PPIsMaxedOut
+ call PrintText
+ jr .loop2
+
+.do_ppup
+ ld a, [hl]
+ add 1 << 6 ; increase PP Up count by 1
+ ld [hl], a
+ ld a, $1
+ ld [wd265], a
+ call ApplyPPUp
+ call Play_SFX_FULL_HEAL
+
+ ld hl, TextJump_PPsIncreased
+ call PrintText
+
+FinishPPRestore: ; f64c
+ call ClearPalettes
+ jp UseDisposableItem
+; f652
+
+BattleRestorePP: ; f652
+ ld a, [wBattleMode]
+ and a
+ jr z, .not_in_battle
+ ld a, [CurPartyMon]
+ ld b, a
+ ld a, [CurBattleMon]
+ cp b
+ jr nz, .not_in_battle
+ ld a, [PlayerSubStatus5]
+ bit SUBSTATUS_TRANSFORMED, a
+ jr nz, .not_in_battle
+ call .UpdateBattleMonPP
+
+.not_in_battle
+ call Play_SFX_FULL_HEAL
+ ld hl, UnknownText_0xf739
+ call PrintText
+ jr FinishPPRestore
+
+.UpdateBattleMonPP:
+ ld a, [CurPartyMon]
+ ld hl, PartyMon1Moves
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+ ld de, BattleMonMoves
+ ld b, NUM_MOVES
+.loop
+ ld a, [de]
+ and a
+ jr z, .done
+ cp [hl]
+ jr nz, .next
+ push hl
+ push de
+ push bc
+ rept NUM_MOVES + 2 ; BattleMonPP - BattleMonMoves
+ inc de
+ endr
+ ld bc, MON_PP - MON_MOVES
+ add hl, bc
+ ld a, [hl]
+ ld [de], a
+ pop bc
+ pop de
+ pop hl
+
+.next
+ inc hl
+ inc de
+ dec b
+ jr nz, .loop
+
+.done
+ ret
+; f6a7
+
+Not_PP_Up: ; f6a7
+ call RestorePP
+ jr nz, BattleRestorePP
+ jp PPRestoreItem_NoEffect
+; f6af
+
+Elixer_RestorePPofAllMoves: ; f6af
+ xor a
+ ld hl, wMenuCursorY
+ ld [hli], a
+ ld [hl], a
+ ld b, NUM_MOVES
+.moveLoop
+ push bc
+ ld hl, PartyMon1Moves
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call GetMthMoveOfNthPartymon
+ ld a, [hl]
+ and a
+ jr z, .next
+
+ call RestorePP
+ jr z, .next
+ ld hl, wMenuCursorX
+ inc [hl]
+
+.next
+ ld hl, wMenuCursorY
+ inc [hl]
+ pop bc
+ dec b
+ jr nz, .moveLoop
+ ld a, [wMenuCursorX]
+ and a
+ jp nz, BattleRestorePP
+
+PPRestoreItem_NoEffect: ; f6dd
+ call WontHaveAnyEffectMessage
+
+PPRestoreItem_Cancel: ; f6e0
+ call ClearPalettes
+ xor a
+ ld [wItemEffectSucceeded], a
+ ret
+; f6e8
+
+RestorePP: ; f6e8
+ xor a ; PARTYMON
+ ld [MonType], a
+ call GetMaxPPOfMove
+ ld hl, PartyMon1PP
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call GetMthMoveOfNthPartymon
+ ld a, [wd265]
+ ld b, a
+ ld a, [hl]
+ and (1 << 6) - 1
+ cp b
+ jr nc, .dont_restore
+
+ ld a, [wd002]
+ cp MAX_ELIXER
+ jr z, .restore_all
+ cp MAX_ETHER
+ jr z, .restore_all
+
+ ld c, 5
+ cp MYSTERYBERRY
+ jr z, .restore_some
+
+ ld c, 10
+
+.restore_some
+ ld a, [hl]
+ and (1 << 6) - 1
+ add c
+ cp b
+ jr nc, .restore_all
+ ld b, a
+
+.restore_all
+ ld a, [hl]
+ and 3 << 6
+ or b
+ ld [hl], a
+ ret
+
+.dont_restore
+ xor a
+ ret
+; f725
+
+TextJump_RaiseThePPOfWhichMove: ; 0xf725
+ ; Raise the PP of which move?
+ text_jump Text_RaiseThePPOfWhichMove
+ db "@"
+; 0xf72a
+
+TextJump_RestoreThePPOfWhichMove: ; 0xf72a
+ ; Restore the PP of which move?
+ text_jump Text_RestoreThePPOfWhichMove
+ db "@"
+; 0xf72f
+
+TextJump_PPIsMaxedOut: ; 0xf72f
+ ; 's PP is maxed out.
+ text_jump Text_PPIsMaxedOut
+ db "@"
+; 0xf734
+
+TextJump_PPsIncreased: ; 0xf734
+ ; 's PP increased.
+ text_jump Text_PPsIncreased
+ db "@"
+; 0xf739
+
+UnknownText_0xf739: ; 0xf739
+ ; PP was restored.
+ text_jump UnknownText_0x1c5cf1
+ db "@"
+; 0xf73e
+
+
+Squirtbottle: ; f73e
+ farcall _Squirtbottle
+ ret
+; f745
+
+
+CardKey: ; f745
+ farcall _CardKey
+ ret
+; f74c
+
+
+BasementKey: ; f74c
+ farcall _BasementKey
+ ret
+; f753
+
+
+SacredAsh: ; f753
+ farcall _SacredAsh
+ ld a, [wItemEffectSucceeded]
+ cp $1
+ ret nz
+ call UseDisposableItem
+ ret
+; f763
+
+
+NormalBox: ; f763
+ ld c, DECOFLAG_SILVER_TROPHY_DOLL
+ jr OpenBox
+; f767
+
+GorgeousBox: ; f767
+ ld c, DECOFLAG_GOLD_TROPHY_DOLL
+OpenBox: ; f769
+ farcall SetSpecificDecorationFlag
+
+ ld hl, .text
+ call PrintText
+
+ jp UseDisposableItem
+; f778
+
+.text ; 0xf778
+ ; There was a trophy inside!
+ text_jump UnknownText_0x1c5d03
+ db "@"
+; 0xf77d
+
+Brightpowder:
+Item19:
+LuckyPunch:
+MetalPowder:
+Nugget:
+Item2D:
+Item32:
+ExpShare:
+SilverLeaf:
+RedScale:
+Secretpotion:
+SSTicket:
+MysteryEgg:
+ClearBell:
+SilverWing:
+QuickClaw:
+GoldLeaf:
+SoftSand:
+SharpBeak:
+PoisonBarb:
+KingsRock:
+RedApricorn:
+Tinymushroom:
+BigMushroom:
+Silverpowder:
+BluApricorn:
+Item5A:
+AmuletCoin:
+YlwApricorn:
+GrnApricorn:
+CleanseTag:
+MysticWater:
+Twistedspoon:
+WhtApricorn:
+Blackbelt:
+BlkApricorn:
+Item64:
+PnkApricorn:
+Blackglasses:
+Slowpoketail:
+PinkBow:
+Stick:
+SmokeBall:
+Nevermeltice:
+Magnet:
+Pearl:
+BigPearl:
+Everstone:
+SpellTag:
+GsBall:
+MiracleSeed:
+ThickClub:
+FocusBand:
+Item78:
+HardStone:
+LuckyEgg:
+MachinePart:
+EggTicket:
+LostItem:
+Stardust:
+StarPiece:
+Pass:
+Item87:
+Item88:
+Item89:
+Charcoal:
+ScopeLens:
+Item8D:
+Item8E:
+MetalCoat:
+DragonFang:
+Item91:
+Leftovers:
+Item93:
+Item94:
+Item95:
+DragonScale:
+BerserkGene:
+Item99:
+Item9A:
+Item9B:
+FlowerMail:
+ItemA2:
+LightBall:
+PolkadotBow:
+ItemAB:
+UpGrade:
+ItemB0:
+RainbowWing:
+ItemB3:
+TeruSama: ; f77d
+ jp IsntTheTimeMessage
+; f780
+
+
+Play_SFX_FULL_HEAL: ; f780
+ push de
+ ld de, SFX_FULL_HEAL
+ call WaitPlaySFX
+ pop de
+ ret
+; f789
+
+UseItemText: ; f789
+ ld hl, UsedItemText
+ call PrintText
+ call Play_SFX_FULL_HEAL
+ call WaitPressAorB_BlinkCursor
+UseDisposableItem: ; f795
+ ld hl, NumItems
+ ld a, 1
+ ld [wItemQuantityChangeBuffer], a
+ jp TossItem
+; f7a0
+
+UseBallInTrainerBattle: ; f7a0
+ call ReturnToBattle_UseBall
+ ld de, ANIM_THROW_POKE_BALL
+ ld a, e
+ ld [FXAnimID], a
+ ld a, d
+ ld [FXAnimID + 1], a
+ xor a
+ ld [wBattleAnimParam], a
+ ld [hBattleTurn], a
+ ld [wNumHits], a
+ predef PlayBattleAnim
+ ld hl, BlockedTheBallText
+ call PrintText
+ ld hl, DontBeAThiefText
+ call PrintText
+ jr UseDisposableItem
+; f7ca
+
+WontHaveAnyEffect_NotUsedMessage: ; f7ca
+ ld hl, WontHaveAnyEffectText
+ call PrintText
+
+ ; Item wasn't used.
+ ld a, $2
+ ld [wItemEffectSucceeded], a
+ ret
+; f7d6
+
+LooksBitterMessage: ; f7d6
+ ld hl, LooksBitterText
+ jp PrintText
+; f7dc
+
+Ball_BoxIsFullMessage: ; f7dc
+ ld hl, Ball_BoxIsFullText
+ call PrintText
+
+ ; Item wasn't used.
+ ld a, $2
+ ld [wItemEffectSucceeded], a
+ ret
+; f7e8
+
+CantUseOnEggMessage: ; f7e8
+ ld hl, CantUseOnEggText
+ jr CantUseItemMessage
+
+IsntTheTimeMessage: ; f7ed
+ ld hl, IsntTheTimeText
+ jr CantUseItemMessage
+
+WontHaveAnyEffectMessage: ; f7f2
+ ld hl, WontHaveAnyEffectText
+ jr CantUseItemMessage
+
+BelongsToSomeoneElseMessage: ; f7f7
+ ld hl, BelongsToSomeoneElseText
+ jr CantUseItemMessage
+
+CyclingIsntAllowedMessage: ; f7fc
+ ld hl, CyclingIsntAllowedText
+ jr CantUseItemMessage
+
+CantGetOnYourBikeMessage: ; f801
+ ld hl, CantGetOnYourBikeText
+
+CantUseItemMessage: ; f804
+; Item couldn't be used.
+ xor a
+ ld [wItemEffectSucceeded], a
+ jp PrintText
+; f80b
+
+LooksBitterText: ; 0xf80b
+ ; It looks bitter…
+ text_jump UnknownText_0x1c5d3e
+ db "@"
+; 0xf810
+
+CantUseOnEggText: ; 0xf810
+ ; That can't be used on an EGG.
+ text_jump UnknownText_0x1c5d50
+ db "@"
+; 0xf815
+
+IsntTheTimeText: ; 0xf815
+ ; OAK: ! This isn't the time to use that!
+ text_jump UnknownText_0x1c5d6e
+ db "@"
+; 0xf81a
+
+BelongsToSomeoneElseText: ; 0xf81a
+ ; That belongs to someone else!
+ text_jump UnknownText_0x1c5d97
+ db "@"
+; 0xf81f
+
+WontHaveAnyEffectText: ; 0xf81f
+ ; It won't have any effect.
+ text_jump UnknownText_0x1c5db6
+ db "@"
+; 0xf824
+
+BlockedTheBallText: ; 0xf824
+ ; The trainer blocked the BALL!
+ text_jump UnknownText_0x1c5dd0
+ db "@"
+; 0xf829
+
+DontBeAThiefText: ; 0xf829
+ ; Don't be a thief!
+ text_jump UnknownText_0x1c5def
+ db "@"
+; 0xf82e
+
+CyclingIsntAllowedText: ; 0xf82e
+ ; Cycling isn't allowed here.
+ text_jump UnknownText_0x1c5e01
+ db "@"
+; 0xf833
+
+CantGetOnYourBikeText: ; 0xf833
+ ; Can't get on your @ now.
+ text_jump UnknownText_0x1c5e1d
+ db "@"
+; 0xf838
+
+Ball_BoxIsFullText: ; 0xf838
+ ; The #MON BOX is full. That can't be used now.
+ text_jump UnknownText_0x1c5e3a
+ db "@"
+; 0xf83d
+
+UsedItemText: ; 0xf83d
+ ; used the@ .
+ text_jump UnknownText_0x1c5e68
+ db "@"
+; 0xf842
+
+GotOnTheItemText: ; 0xf842
+ ; got on the@ .
+ text_jump UnknownText_0x1c5e7b
+ db "@"
+; 0xf847
+
+GotOffTheItemText: ; 0xf847
+ ; got off@ the @ .
+ text_jump UnknownText_0x1c5e90
+ db "@"
+; 0xf84c
+
+
+ApplyPPUp: ; f84c
+ ld a, MON_MOVES
+ call GetPartyParamLocation
+ push hl
+ ld de, Buffer1
+ predef FillPP
+ pop hl
+ ld bc, MON_PP - MON_MOVES
+ add hl, bc
+ ld de, Buffer1
+ ld b, 0
+.loop
+ inc b
+ ld a, b
+ cp NUM_MOVES + 1
+ ret z
+ ld a, [wd265]
+ dec a
+ jr nz, .use
+ ld a, [wMenuCursorY]
+ inc a
+ cp b
+ jr nz, .skip
+
+.use
+ ld a, [hl]
+ and 3 << 6
+ ld a, [de] ; wasted cycle
+ call nz, ComputeMaxPP
+
+.skip
+ inc hl
+ inc de
+ jr .loop
+; f881
+
+
+
+ComputeMaxPP: ; f881
+ push bc
+ ; Divide the base PP by 5.
+ ld a, [de]
+ ld [hDividend + 3], a
+ xor a
+ ld [hDividend], a
+ ld [hDividend + 1], a
+ ld [hDividend + 2], a
+ ld a, 5
+ ld [hDivisor], a
+ ld b, 4
+ call Divide
+ ; Get the number of PP, which are bits 6 and 7 of the PP value stored in RAM.
+ ld a, [hl]
+ ld b, a
+ swap a
+ and $f
+ srl a
+ srl a
+ ld c, a
+ ; If this value is 0, we are done
+ and a
+ jr z, .NoPPUp
+
+.loop
+ ; Normally, a move with 40 PP would have 64 PP with three PP Ups.
+ ; Since this would overflow into bit 6, we prevent that from happening
+ ; by decreasing the extra amount of PP each PP Up provides, resulting
+ ; in a maximum of 61.
+ ld a, [hQuotient + 2]
+ cp $8
+ jr c, .okay
+ ld a, $7
+
+.okay
+ add b
+ ld b, a
+ ld a, [wd265]
+ dec a
+ jr z, .NoPPUp
+ dec c
+ jr nz, .loop
+
+.NoPPUp:
+ ld [hl], b
+ pop bc
+ ret
+; f8b9
+
+RestoreAllPP: ; f8b9
+ ld a, MON_PP
+ call GetPartyParamLocation
+ push hl
+ ld a, MON_MOVES
+ call GetPartyParamLocation
+ pop de
+ xor a ; PARTYMON
+ ld [wMenuCursorY], a
+ ld [MonType], a
+ ld c, NUM_MOVES
+.loop
+ ld a, [hli]
+ and a
+ ret z
+ push hl
+ push de
+ push bc
+ call GetMaxPPOfMove
+ pop bc
+ pop de
+ ld a, [de]
+ and 3 << 6
+ ld b, a
+ ld a, [wd265]
+ add b
+ ld [de], a
+ inc de
+ ld hl, wMenuCursorY
+ inc [hl]
+ pop hl
+ dec c
+ jr nz, .loop
+ ret
+; f8ec
+
+
+GetMaxPPOfMove: ; f8ec
+ ld a, [StringBuffer1 + 0]
+ push af
+ ld a, [StringBuffer1 + 1]
+ push af
+
+ ld a, [MonType]
+ and a
+
+ ld hl, PartyMon1Moves
+ ld bc, PARTYMON_STRUCT_LENGTH
+ jr z, .got_partymon ; PARTYMON
+
+ ld hl, OTPartyMon1Moves
+ dec a
+ jr z, .got_partymon ; OTPARTYMON
+
+ ld hl, TempMonMoves
+ dec a
+ jr z, .got_nonpartymon ; BOXMON
+
+ ld hl, TempMonMoves ; Wasted cycles
+ dec a
+ jr z, .got_nonpartymon ; TEMPMON
+
+ ld hl, BattleMonMoves ; WILDMON
+
+.got_nonpartymon ; BOXMON, TEMPMON, WILDMON
+ call GetMthMoveOfCurrentMon
+ jr .gotdatmove
+
+.got_partymon ; PARTYMON, OTPARTYMON
+ call GetMthMoveOfNthPartymon
+
+.gotdatmove
+ ld a, [hl]
+ dec a
+
+ push hl
+ ld hl, Moves + MOVE_PP
+ ld bc, MOVE_LENGTH
+ call AddNTimes
+ ld a, BANK(Moves)
+ call GetFarByte
+ ld b, a
+ ld de, StringBuffer1
+ ld [de], a
+ pop hl
+
+ push bc
+ ld bc, MON_PP - MON_MOVES
+ ld a, [MonType]
+ cp WILDMON
+ jr nz, .notwild
+ ld bc, EnemyMonPP - EnemyMonMoves
+.notwild
+ add hl, bc
+ ld a, [hl]
+ and 3 << 6
+ pop bc
+
+ or b
+ ld hl, StringBuffer1 + 1
+ ld [hl], a
+ xor a
+ ld [wd265], a
+ ld a, b ; this gets lost anyway
+ call ComputeMaxPP
+ ld a, [hl]
+ and (1 << 6) - 1
+ ld [wd265], a
+
+ pop af
+ ld [StringBuffer1 + 1], a
+ pop af
+ ld [StringBuffer1 + 0], a
+ ret
+; f963
+
+GetMthMoveOfNthPartymon: ; f963
+ ld a, [CurPartyMon]
+ call AddNTimes
+
+GetMthMoveOfCurrentMon: ; f969
+ ld a, [wMenuCursorY]
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ret
+; f971
diff --git a/engine/items.asm b/engine/items.asm
index 81c080dda..b0bffb6d6 100755
--- a/engine/items.asm
+++ b/engine/items.asm
@@ -331,7 +331,7 @@ ReceiveKeyItem: ; d35a
ret
TossKeyItem: ; d374
- ld a, [wd107]
+ ld a, [CurItemQuantity]
ld e, a
ld d, 0
ld hl, NumKeyItems
@@ -554,7 +554,7 @@ GetItemAttr: ; d460
ld a, [CurItem]
dec a
ld c, a
- ld a, NUM_ITEMATTRS
+ ld a, ITEMATTR_STRUCT_LENGTH
call AddNTimes
ld a, BANK(ItemAttributes)
call GetFarByte
diff --git a/engine/landmarks.asm b/engine/landmarks.asm
index 465a70f3c..75605bbd9 100644
--- a/engine/landmarks.asm
+++ b/engine/landmarks.asm
@@ -47,213 +47,7 @@ GetLandmarkName:: ; 0x1ca8a5
; 0x1ca8c3
-Landmarks: ; 0x1ca8c3
-
-landmark: MACRO
- db \1, \2
- dw \3
-ENDM
-
- landmark 0, 0, SpecialMapName
- landmark 148, 116, NewBarkTownName
- landmark 136, 116, Route29Name
- landmark 108, 116, CherrygroveCityName
- landmark 108, 96, Route30Name
- landmark 104, 76, Route31Name
- landmark 92, 76, VioletCityName
- landmark 93, 74, SproutTowerName
- landmark 92, 108, Route32Name
- landmark 84, 92, RuinsOfAlphName
- landmark 92, 140, UnionCaveName
- landmark 90, 140, Route33Name
- landmark 76, 140, AzaleaTownName
- landmark 78, 138, SlowpokeWellName
- landmark 60, 136, IlexForestName
- landmark 60, 128, Route34Name
- landmark 60, 108, GoldenrodCityName
- landmark 58, 108, RadioTowerName
- landmark 60, 92, Route35Name
- landmark 60, 76, NationalParkName
- landmark 72, 76, Route36Name
- landmark 76, 68, Route37Name
- landmark 76, 60, EcruteakCityName
- landmark 78, 58, TinTowerName
- landmark 74, 58, BurnedTowerName
- landmark 60, 60, Route38Name
- landmark 44, 64, Route39Name
- landmark 44, 76, OlivineCityName
- landmark 46, 78, LighthouseName
- landmark 36, 72, BattleTowerName
- landmark 36, 80, Route40Name
- landmark 36, 108, WhirlIslandsName
- landmark 36, 116, Route41Name
- landmark 28, 116, CianwoodCityName
- landmark 100, 60, Route42Name
- landmark 92, 60, MtMortarName
- landmark 116, 60, MahoganyTownName
- landmark 116, 52, Route43Name
- landmark 116, 44, LakeOfRageName
- landmark 128, 60, Route44Name
- landmark 138, 54, IcePathName
- landmark 140, 60, BlackthornCityName
- landmark 140, 52, DragonsDenName
- landmark 140, 80, Route45Name
- landmark 120, 88, DarkCaveName
- landmark 132, 104, Route46Name
- landmark 156, 84, SilverCaveName
- landmark 60, 124, PalletTownName
- landmark 60, 108, Route1Name
- landmark 60, 92, ViridianCityName
- landmark 60, 80, Route2Name
- landmark 60, 68, PewterCityName
- landmark 72, 68, Route3Name
- landmark 84, 68, MtMoonName
- landmark 96, 68, Route4Name
- landmark 108, 68, CeruleanCityName
- landmark 108, 60, Route24Name
- landmark 116, 52, Route25Name
- landmark 108, 76, Route5Name
- landmark 116, 92, UndergroundName
- landmark 108, 92, Route6Name
- landmark 108, 100, VermilionCityName
- landmark 96, 76, DiglettsCaveName
- landmark 96, 84, Route7Name
- landmark 124, 84, Route8Name
- landmark 124, 68, Route9Name
- landmark 140, 68, RockTunnelName
- landmark 140, 72, Route10Name
- landmark 140, 76, PowerPlantName
- landmark 140, 84, LavenderTownName
- landmark 148, 84, LavRadioTowerName
- landmark 84, 84, CeladonCityName
- landmark 108, 84, SaffronCityName
- landmark 124, 100, Route11Name
- landmark 140, 96, Route12Name
- landmark 132, 116, Route13Name
- landmark 124, 128, Route14Name
- landmark 112, 132, Route15Name
- landmark 76, 84, Route16Name
- landmark 76, 108, Route17Name
- landmark 88, 132, Route18Name
- landmark 100, 132, FuchsiaCityName
- landmark 100, 144, Route19Name
- landmark 84, 148, Route20Name
- landmark 76, 148, SeafoamIslandsName
- landmark 60, 148, CinnabarIslandName
- landmark 60, 136, Route21Name
- landmark 44, 84, Route22Name
- landmark 36, 68, VictoryRoadName
- landmark 36, 60, Route23Name
- landmark 36, 52, IndigoPlateauName
- landmark 36, 108, Route26Name
- landmark 28, 116, Route27Name
- landmark 20, 116, TohjoFallsName
- landmark 28, 84, Route28Name
- landmark 148, 132, FastShipName
-
-
-NewBarkTownName: db "NEW BARK¯TOWN@"
-CherrygroveCityName: db "CHERRYGROVE¯CITY@"
-VioletCityName: db "VIOLET CITY@"
-AzaleaTownName: db "AZALEA TOWN@"
-GoldenrodCityName: db "GOLDENROD¯CITY@"
-EcruteakCityName: db "ECRUTEAK¯CITY@"
-OlivineCityName: db "OLIVINE¯CITY@"
-CianwoodCityName: db "CIANWOOD¯CITY@"
-MahoganyTownName: db "MAHOGANY¯TOWN@"
-BlackthornCityName: db "BLACKTHORN¯CITY@"
-LakeOfRageName: db "LAKE OF¯RAGE@"
-SilverCaveName: db "SILVER CAVE@"
-SproutTowerName: db "SPROUT¯TOWER@"
-RuinsOfAlphName: db "RUINS¯OF ALPH@"
-UnionCaveName: db "UNION CAVE@"
-SlowpokeWellName: db "SLOWPOKE¯WELL@"
-RadioTowerName: db "RADIO TOWER@"
-PowerPlantName: db "POWER PLANT@"
-NationalParkName: db "NATIONAL¯PARK@"
-TinTowerName: db "TIN TOWER@"
-LighthouseName: db "LIGHTHOUSE@"
-WhirlIslandsName: db "WHIRL¯ISLANDS@"
-MtMortarName: db "MT.MORTAR@"
-DragonsDenName: db "DRAGON'S¯DEN@"
-IcePathName: db "ICE PATH@"
-NotApplicableName: db "N/A@"
-PalletTownName: db "PALLET TOWN@"
-ViridianCityName: db "VIRIDIAN¯CITY@"
-PewterCityName: db "PEWTER CITY@"
-CeruleanCityName: db "CERULEAN¯CITY@"
-LavenderTownName: db "LAVENDER¯TOWN@"
-VermilionCityName: db "VERMILION¯CITY@"
-CeladonCityName: db "CELADON¯CITY@"
-SaffronCityName: db "SAFFRON¯CITY@"
-FuchsiaCityName: db "FUCHSIA¯CITY@"
-CinnabarIslandName: db "CINNABAR¯ISLAND@"
-IndigoPlateauName: db "INDIGO¯PLATEAU@"
-VictoryRoadName: db "VICTORY¯ROAD@"
-MtMoonName: db "MT.MOON@"
-RockTunnelName: db "ROCK TUNNEL@"
-LavRadioTowerName: db "LAV¯RADIO TOWER@"
-SilphCoName: db "SILPH CO.@"
-SafariZoneName: db "SAFARI ZONE@"
-SeafoamIslandsName: db "SEAFOAM¯ISLANDS@"
-PokemonMansionName: db "#MON¯MANSION@"
-CeruleanCaveName: db "CERULEAN¯CAVE@"
-Route1Name: db "ROUTE 1@"
-Route2Name: db "ROUTE 2@"
-Route3Name: db "ROUTE 3@"
-Route4Name: db "ROUTE 4@"
-Route5Name: db "ROUTE 5@"
-Route6Name: db "ROUTE 6@"
-Route7Name: db "ROUTE 7@"
-Route8Name: db "ROUTE 8@"
-Route9Name: db "ROUTE 9@"
-Route10Name: db "ROUTE 10@"
-Route11Name: db "ROUTE 11@"
-Route12Name: db "ROUTE 12@"
-Route13Name: db "ROUTE 13@"
-Route14Name: db "ROUTE 14@"
-Route15Name: db "ROUTE 15@"
-Route16Name: db "ROUTE 16@"
-Route17Name: db "ROUTE 17@"
-Route18Name: db "ROUTE 18@"
-Route19Name: db "ROUTE 19@"
-Route20Name: db "ROUTE 20@"
-Route21Name: db "ROUTE 21@"
-Route22Name: db "ROUTE 22@"
-Route23Name: db "ROUTE 23@"
-Route24Name: db "ROUTE 24@"
-Route25Name: db "ROUTE 25@"
-Route26Name: db "ROUTE 26@"
-Route27Name: db "ROUTE 27@"
-Route28Name: db "ROUTE 28@"
-Route29Name: db "ROUTE 29@"
-Route30Name: db "ROUTE 30@"
-Route31Name: db "ROUTE 31@"
-Route32Name: db "ROUTE 32@"
-Route33Name: db "ROUTE 33@"
-Route34Name: db "ROUTE 34@"
-Route35Name: db "ROUTE 35@"
-Route36Name: db "ROUTE 36@"
-Route37Name: db "ROUTE 37@"
-Route38Name: db "ROUTE 38@"
-Route39Name: db "ROUTE 39@"
-Route40Name: db "ROUTE 40@"
-Route41Name: db "ROUTE 41@"
-Route42Name: db "ROUTE 42@"
-Route43Name: db "ROUTE 43@"
-Route44Name: db "ROUTE 44@"
-Route45Name: db "ROUTE 45@"
-Route46Name: db "ROUTE 46@"
-DarkCaveName: db "DARK CAVE@"
-IlexForestName: db "ILEX¯FOREST@"
-BurnedTowerName: db "BURNED¯TOWER@"
-FastShipName: db "FAST SHIP@"
-ViridianForestName: db "VIRIDIAN¯FOREST@"
-DiglettsCaveName: db "DIGLETT'S¯CAVE@"
-TohjoFallsName: db "TOHJO FALLS@"
-UndergroundName: db "UNDERGROUND@"
-BattleTowerName: db "BATTLE¯TOWER@"
-SpecialMapName: db "SPECIAL@"
+INCLUDE "data/maps/landmarks.asm"
RegionCheck: ; 0x1caea1
diff --git a/engine/link.asm b/engine/link.asm
index f5bc24da9..a2aec3a10 100755
--- a/engine/link.asm
+++ b/engine/link.asm
@@ -14,14 +14,14 @@ LinkCommunications: ; 28000
call UpdateSprites
call LoadStandardFont
call LoadFontsBattleExtra
- callba LinkComms_LoadPleaseWaitTextboxBorderGFX
+ farcall LinkComms_LoadPleaseWaitTextboxBorderGFX
call WaitBGMap2
hlcoord 3, 8
ld b, 2
ld c, 12
ld d, h
ld e, l
- callba LinkTextbox2
+ farcall LinkTextbox2
hlcoord 4, 10
ld de, String_PleaseWait
call PlaceString
@@ -150,7 +150,7 @@ TimeCapsule: ; 2805d
ld [wd265], a
push hl
push de
- callab ConvertMon_1to2
+ callfar ConvertMon_1to2
pop de
pop hl
ld a, [wd265]
@@ -362,19 +362,19 @@ Gen2ToGen2LinkComms: ; 28177
.fix_mail_loop
push bc
push de
- callba IsMailEuropean
+ farcall IsMailEuropean
ld a, c
or a
jr z, .next
sub $3
jr nc, .skip
- callba DeutenEnglischenPost
+ farcall DeutenEnglischenPost
jr .next
.skip
cp $2
jr nc, .next
- callba HandleSpanishItalianMail
+ farcall HandleSpanishItalianMail
.next
pop de
@@ -390,7 +390,7 @@ Gen2ToGen2LinkComms: ; 28177
ld [de], a
.skip_mail
- ld hl, wLinkData
+ ld hl, wLinkPlayerName
ld de, OTPlayerName
ld bc, NAME_LENGTH
call CopyBytes
@@ -419,7 +419,7 @@ Gen2ToGen2LinkComms: ; 28177
ld a, CAL
ld [OtherTrainerClass], a
call ClearScreen
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
ld hl, Options
ld a, [hl]
push af
@@ -463,7 +463,7 @@ Gen2ToGen2LinkComms: ; 28177
ld [wDisableTextAcceleration], a
pop af
ld [Options], a
- callba LoadPokemonData
+ farcall LoadPokemonData
jp Function28b22
.ready_to_trade
@@ -491,7 +491,7 @@ LinkTimeout: ; 283b2
push de
ld d, h
ld e, l
- callba LinkTextbox2
+ farcall LinkTextbox2
pop de
pop hl
bccoord 1, 14
@@ -658,7 +658,7 @@ Link_PrepPartyData_Gen1: ; 28499
ld [wd265], a
push hl
push de
- callab ConvertMon_2to1
+ callfar ConvertMon_2to1
pop de
pop hl
ld a, [wd265]
@@ -698,7 +698,7 @@ Link_PrepPartyData_Gen1: ; 28499
push bc
ld a, [hl]
ld [wd265], a
- callab ConvertMon_2to1
+ callfar ConvertMon_2to1
pop bc
pop de
ld a, [wd265]
@@ -737,10 +737,10 @@ Link_PrepPartyData_Gen1: ; 28499
.skip_steel
push bc
dec a
- ld hl, BaseData + 7 ; type
- ld bc, BaseData1 - BaseData0
+ ld hl, BaseData + BASE_TYPES
+ ld bc, BASE_DATA_SIZE
call AddNTimes
- ld bc, 2
+ ld bc, BASE_CATCH_RATE - BASE_TYPES
ld a, BANK(BaseData)
call FarCopyBytes
pop bc
@@ -882,20 +882,20 @@ Link_PrepPartyData_Gen2: ; 28595
push hl
push de
push hl
- callba IsMailEuropean
+ farcall IsMailEuropean
pop de
ld a, c
or a
jr z, .next
sub $3
jr nc, .italian_spanish
- callba HandleFrenchGermanMail
+ farcall HandleFrenchGermanMail
jr .next
.italian_spanish
cp $2
jr nc, .next
- callba HandleSpanishItalianMail
+ farcall HandleSpanishItalianMail
.next
pop de
@@ -993,7 +993,7 @@ Function2868a: ; 2868a
push bc
push de
ld [wd265], a
- callab ConvertMon_1to2
+ callfar ConvertMon_1to2
pop de
pop bc
ld a, [wd265]
@@ -1112,7 +1112,7 @@ TimeCapsule_ReplaceTeruSama: ; 28771
and a
ret z
push hl
- ld hl, .TimeCapsuleAlt
+ ld hl, TimeCapsule_CatchRateItems
.loop
ld a, [hli]
and a
@@ -1129,24 +1129,9 @@ TimeCapsule_ReplaceTeruSama: ; 28771
pop hl
ret
-.TimeCapsuleAlt: ; 28785
-; Pokémon traded from RBY do not have held items, so GSC usually interprets the
-; catch rate as an item. However, if the catch rate appears in this table, the
-; item associated with the table entry is used instead.
- db ITEM_19, LEFTOVERS
- db ITEM_2D, BITTER_BERRY
- db ITEM_32, GOLD_BERRY
- db ITEM_5A, BERRY
- db ITEM_64, BERRY
- db ITEM_78, BERRY
- db ITEM_87, BERRY
- db ITEM_BE, BERRY
- db ITEM_C3, BERRY
- db ITEM_DC, BERRY
- db HM_08, BERRY
- db -1, BERRY
- db 0
-; 2879e
+
+INCLUDE "data/time_capsule/catch_rate_items.asm"
+
Link_CopyOTData: ; 2879e
.loop
@@ -1210,7 +1195,7 @@ Link_FindFirstNonControlCharacter_AllowZero: ; 287d8
InitTradeMenuDisplay: ; 287e3
call ClearScreen
call LoadTradeScreenBorder
- callba InitTradeSpeciesList
+ farcall InitTradeSpeciesList
xor a
ld hl, wOtherPlayerLinkMode
ld [hli], a
@@ -1247,7 +1232,7 @@ LinkTrade_OTPartyMenu: ; 28803
ld [w2DMenuFlags2], a
LinkTradeOTPartymonMenuLoop: ; 28835
- callba LinkTradeMenu
+ farcall LinkTradeMenu
ld a, d
and a
jp z, LinkTradePartiesMenuMasterLoop
@@ -1255,9 +1240,9 @@ LinkTradeOTPartymonMenuLoop: ; 28835
jr z, .not_a_button
ld a, $1
ld [wInitListType], a
- callab InitList
+ callfar InitList
ld hl, OTPartyMon1Species
- callba LinkMonStatsScreen
+ farcall LinkMonStatsScreen
jp LinkTradePartiesMenuMasterLoop
.not_a_button
@@ -1289,7 +1274,7 @@ LinkTradeOTPartymonMenuLoop: ; 28835
; 2888b
LinkTrade_PlayerPartyMenu: ; 2888b
- callba InitMG_Mobile_LinkTradePalMap
+ farcall InitMG_Mobile_LinkTradePalMap
xor a
ld [MonType], a
ld a, A_BUTTON | D_UP | D_DOWN
@@ -1313,7 +1298,7 @@ LinkTrade_PlayerPartyMenu: ; 2888b
call WaitBGMap2
LinkTradePartymonMenuLoop: ; 288c5
- callba LinkTradeMenu
+ farcall LinkTradeMenu
ld a, d
and a
jr nz, .check_joypad
@@ -1381,7 +1366,7 @@ Function28926: ; 28926
hlcoord 2, 16
ld de, .String_Stats_Trade
call PlaceString
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
.joy_loop
ld a, " "
@@ -1448,8 +1433,8 @@ Function28926: ; 28926
ld [wMenuCursorY], a
ld a, $4
ld [wInitListType], a
- callab InitList
- callba LinkMonStatsScreen
+ callfar InitList
+ farcall LinkMonStatsScreen
call Call_LoadTempTileMapToTileMap
hlcoord 6, 1
lb bc, 6, 1
@@ -1468,7 +1453,7 @@ Function28926: ; 28926
dec a
ld [wd002], a
ld [wPlayerLinkAction], a
- callba Function16d6ce
+ farcall Function16d6ce
ld a, [wOtherPlayerLinkMode]
cp $f
jp z, InitTradeMenuDisplay
@@ -1476,9 +1461,9 @@ Function28926: ; 28926
call Function28b68
ld c, 100
call DelayFrames
- callba ValidateOTTrademon
+ farcall ValidateOTTrademon
jr c, .abnormal
- callba Functionfb5dd
+ farcall Functionfb5dd
jp nc, LinkTrade
xor a
ld [wcf57], a
@@ -1487,7 +1472,7 @@ Function28926: ; 28926
ld b, 4
ld c, 18
call Predef_LinkTextbox
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
ld hl, .Text_CantTradeLastMon
bccoord 1, 14
call PlaceHLTextAtBC
@@ -1509,7 +1494,7 @@ Function28926: ; 28926
ld b, 4
ld c, 18
call Predef_LinkTextbox
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
ld hl, .Text_Abnormal
bccoord 1, 14
call PlaceHLTextAtBC
@@ -1524,7 +1509,7 @@ Function28926: ; 28926
call PlaceString
ld a, $1
ld [wPlayerLinkAction], a
- callba Function16d6ce
+ farcall Function16d6ce
ld c, 100
call DelayFrames
jp InitTradeMenuDisplay
@@ -1590,7 +1575,7 @@ Function28ade: ; 28ade
ldcoord_a 9, 17
ld a, $f
ld [wPlayerLinkAction], a
- callba Function16d6ce
+ farcall Function16d6ce
ld a, [wOtherPlayerLinkMode]
cp $f
jr nz, .loop1
@@ -1665,7 +1650,7 @@ LinkTrade: ; 28b87
ld b, $4
ld c, $12
call Predef_LinkTextbox
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
ld a, [wd002]
ld hl, PartySpecies
ld c, a
@@ -1715,7 +1700,7 @@ LinkTrade: ; 28b87
ld a, 1
ld [wMenuCursorY], a
ld [wMenuCursorX], a
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
call ScrollingMenuJoypad
push af
call Call_ExitMenu
@@ -1737,13 +1722,13 @@ LinkTrade: ; 28b87
hlcoord 1, 14
ld de, String_TooBadTheTradeWasCanceled
call PlaceString
- callba Function16d6ce
+ farcall Function16d6ce
jp Function28ea3
.asm_28c54
ld a, $2
ld [wPlayerLinkAction], a
- callba Function16d6ce
+ farcall Function16d6ce
ld a, [wOtherPlayerLinkMode]
dec a
jr nz, .asm_28c7b
@@ -1832,7 +1817,7 @@ LinkTrade: ; 28b87
call GetPartyLocation
ld b, h
ld c, l
- callba GetCaughtGender
+ farcall GetCaughtGender
ld a, c
ld [wPlayerTrademonCaughtData], a
ld hl, OTPlayerName
@@ -1871,7 +1856,7 @@ LinkTrade: ; 28b87
call GetPartyLocation
ld b, h
ld c, l
- callba GetCaughtGender
+ farcall GetCaughtGender
ld a, c
ld [wOTTrademonCaughtData], a
ld a, [wd002]
@@ -1884,7 +1869,7 @@ LinkTrade: ; 28b87
ld [wd002], a
xor a
ld [wPokemonWithdrawDepositParameter], a
- callab RemoveMonFromPartyOrBox
+ callfar RemoveMonFromPartyOrBox
ld a, [PartyCount]
dec a
ld [CurPartyMon], a
@@ -1933,11 +1918,11 @@ LinkTrade: ; 28b87
ld a, [PartyCount]
dec a
ld [CurPartyMon], a
- callab EvolvePokemon
+ callfar EvolvePokemon
call ClearScreen
call LoadTradeScreenBorder
call SetTradeRoomBGPals
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
ld b, $1
pop af
ld c, a
@@ -1972,9 +1957,9 @@ LinkTrade: ; 28b87
jr nz, .loop
.save
- callba SaveAfterLinkTrade
- callba TrainerRankings_Trades
- callba BackupMobileEventIndex
+ farcall SaveAfterLinkTrade
+ farcall TrainerRankings_Trades
+ farcall BackupMobileEventIndex
ld c, 40
call DelayFrames
hlcoord 0, 12
@@ -1984,7 +1969,7 @@ LinkTrade: ; 28b87
hlcoord 1, 14
ld de, String28ebd
call PlaceString
- callba Link_WaitBGMap
+ farcall Link_WaitBGMap
ld c, 50
call DelayFrames
ld a, [wLinkMode]
@@ -2020,17 +2005,17 @@ String_TooBadTheTradeWasCanceled: ; 28ece
Predef_LinkTextbox: ; 28eef
ld d, h
ld e, l
- callba LinkTextbox
+ farcall LinkTextbox
ret
; 28ef8
LoadTradeScreenBorder: ; 28ef8
- callba _LoadTradeScreenBorder
+ farcall _LoadTradeScreenBorder
ret
; 28eff
SetTradeRoomBGPals: ; 28eff
- callba LoadTradeRoomBGPals_ ; just a nested farcall; so wasteful
+ farcall LoadTradeRoomBGPals_ ; just a nested farcall; so wasteful
call SetPalettes
ret
; 28f09
@@ -2045,11 +2030,11 @@ Function28f09: ; 28f09
ld b, 6
ld c, 18
call Predef_LinkTextbox
- callba PlaceTradePartnerNamesAndParty
+ farcall PlaceTradePartnerNamesAndParty
ret
; 28f24
-INCLUDE "engine/trade/animation.asm"
+INCLUDE "engine/trade_animation.asm"
Special_CheckTimeCapsuleCompatibility: ; 29bfb
; Checks to see if your Party is compatible with the generation 1 games. Returns the following in ScriptVar:
@@ -2079,7 +2064,7 @@ Special_CheckTimeCapsuleCompatibility: ; 29bfb
push hl
push bc
ld d, [hl]
- callba ItemIsMail
+ farcall ItemIsMail
pop bc
pop hl
jr c, .mon_has_mail
@@ -2450,7 +2435,7 @@ Link_CheckCommunicationError: ; 29e0c
Special_TryQuickSave: ; 29e66
ld a, [wd265]
push af
- callba Link_SaveGame
+ farcall Link_SaveGame
ld a, $1
jr nc, .return_result
xor a
@@ -2494,7 +2479,7 @@ Special_TimeCapsule: ; 29eaf
ld a, LINK_TIMECAPSULE
ld [wLinkMode], a
call DisableSpriteUpdates
- callab LinkCommunications
+ callfar LinkCommunications
call EnableSpriteUpdates
xor a
ld [hVBlank], a
@@ -2505,7 +2490,7 @@ Special_TradeCenter: ; 29ec4
ld a, LINK_TRADECENTER
ld [wLinkMode], a
call DisableSpriteUpdates
- callab LinkCommunications
+ callfar LinkCommunications
call EnableSpriteUpdates
xor a
ld [hVBlank], a
@@ -2516,7 +2501,7 @@ Special_Colosseum: ; 29ed9
ld a, LINK_COLOSSEUM
ld [wLinkMode], a
call DisableSpriteUpdates
- callab LinkCommunications
+ callfar LinkCommunications
call EnableSpriteUpdates
xor a
ld [hVBlank], a
@@ -2592,7 +2577,18 @@ Special_CableClubCheckWhichChris: ; 29f47
ret
; 29f54
-GFX_29f54: ; 29f54
+UnusedGen1LinkCommsBorderGFX: ; 29f54
; unreferenced
-INCBIN "gfx/unknown/029f54.2bpp"
+INCBIN "gfx/trade/unused_gen_1_border_tiles.2bpp"
; 29fe4
+
+Function29fe4: ; unreferenced
+ ld a, BANK(sPartyMail)
+ call GetSRAMBank
+ ld d, $0
+ ld b, CHECK_FLAG
+ predef FlagPredef
+ call CloseSRAM
+ ld a, c
+ and a
+ ret
diff --git a/engine/link_2.asm b/engine/link_2.asm
new file mode 100644
index 000000000..72e5262b3
--- /dev/null
+++ b/engine/link_2.asm
@@ -0,0 +1,91 @@
+LinkMonStatsScreen: ; 4d319
+ ld a, [wMenuCursorY]
+ dec a
+ ld [CurPartyMon], a
+ call LowVolume
+ predef StatsScreenInit
+ ld a, [CurPartyMon]
+ inc a
+ ld [wMenuCursorY], a
+ call ClearScreen
+ call ClearBGPalettes
+ call MaxVolume
+ farcall LoadTradeScreenBorder
+ farcall Link_WaitBGMap
+ farcall InitTradeSpeciesList
+ farcall SetTradeRoomBGPals
+ call WaitBGMap2
+ ret
+
+Link_WaitBGMap: ; 4d354
+ call WaitBGMap
+ call WaitBGMap2
+ ret
+
+LinkTextbox2: ; 4d35b
+ ld h, d
+ ld l, e
+ push bc
+ push hl
+ call .PlaceBorder
+ pop hl
+ pop bc
+ ld de, AttrMap - TileMap
+ add hl, de
+ inc b
+ inc b
+ inc c
+ inc c
+ ld a, $7
+.row
+ push bc
+ push hl
+.col
+ ld [hli], a
+ dec c
+ jr nz, .col
+ pop hl
+ ld de, SCREEN_WIDTH
+ add hl, de
+ pop bc
+ dec b
+ jr nz, .row
+ ret
+
+.PlaceBorder: ; 4d37e
+ push hl
+ ld a, $76
+ ld [hli], a
+ inc a
+ call .PlaceRow
+ inc a
+ ld [hl], a
+ pop hl
+ ld de, SCREEN_WIDTH
+ add hl, de
+.loop
+ push hl
+ ld a, "┌"
+ ld [hli], a
+ ld a, " "
+ call .PlaceRow
+ ld [hl], "─"
+ pop hl
+ ld de, SCREEN_WIDTH
+ add hl, de
+ dec b
+ jr nz, .loop
+ ld a, "┐"
+ ld [hli], a
+ ld a, "│"
+ call .PlaceRow
+ ld [hl], "└"
+ ret
+
+.PlaceRow: ; 4d3ab
+ ld d, c
+.row_loop
+ ld [hli], a
+ dec d
+ jr nz, .row_loop
+ ret
diff --git a/engine/link_trade.asm b/engine/link_trade.asm
index 96401f188..bb2765b50 100755
--- a/engine/link_trade.asm
+++ b/engine/link_trade.asm
@@ -1,5 +1,5 @@
LinkCommsBorderGFX:
-INCBIN "gfx/unknown/16cfc1.2bpp"
+INCBIN "gfx/trade/border_tiles.2bpp"
; 16d421
__LoadTradeScreenBorder: ; 16d421
@@ -23,8 +23,8 @@ Function16d43b: ; 16d43b
call ClearBGPalettes
call ClearTileMap
call ClearSprites
- callba __LoadTradeScreenBorder ; useless to farcall
- callba Function16d42e ; useless to farcall
+ farcall __LoadTradeScreenBorder ; useless to farcall
+ farcall Function16d42e ; useless to farcall
ld b, SCGB_DIPLOMA
call GetSGBLayout
call SetPalettes
@@ -35,13 +35,13 @@ Function16d43b: ; 16d43b
; 16d465
Tilemap_16d465:
-INCBIN "gfx/unknown/16d465.tilemap"
+INCBIN "gfx/trade/border_mobile_fullscreen.tilemap"
Tilemap_16d5cd:
-INCBIN "gfx/unknown/16d5cd.tilemap"
+INCBIN "gfx/trade/border_cable_top.tilemap"
Tilemap_16d5f5:
-INCBIN "gfx/unknown/16d5f5.tilemap"
+INCBIN "gfx/trade/border_cable_bottom.tilemap"
_LinkTextbox: ; 16d61d
ld h, d
@@ -119,8 +119,8 @@ _LinkTextbox: ; 16d61d
InitTradeSpeciesList: ; 16d673
call _LoadTradeScreenBorder
call Function16d6ae
- callba InitMG_Mobile_LinkTradePalMap
- callba PlaceTradePartnerNamesAndParty
+ farcall InitMG_Mobile_LinkTradePalMap
+ farcall PlaceTradePartnerNamesAndParty
hlcoord 10, 17
ld de, .CANCEL
call PlaceString
@@ -146,7 +146,7 @@ LinkComms_LoadPleaseWaitTextboxBorderGFX: ; 16d69a
; 16d6a7
LoadTradeRoomBGPals_: ; 16d6a7
- callba LoadTradeRoomBGPals
+ farcall LoadTradeRoomBGPals
ret
; 16d6ae
@@ -171,7 +171,7 @@ LinkTextbox: ; 16d6ca
Function16d6ce: ; 16d6ce
call LoadStandardMenuDataHeader
call Function16d6e1
- callba WaitLinkTransfer
+ farcall WaitLinkTransfer
call Call_ExitMenu
call WaitBGMap2
ret
@@ -233,7 +233,7 @@ LinkTradeMenu: ; 16d70c
call .UpdateBGMapAndOAM
call .loop2
jr nc, .done
- callba _2DMenuInterpretJoypad
+ farcall _2DMenuInterpretJoypad
jr c, .done
ld a, [w2DMenuFlags1]
bit 7, a
@@ -352,7 +352,7 @@ LinkTradeMenu: ; 16d70c
ld a, [w2DMenuFlags1]
bit 6, a
jr z, .skip_anims
- callba PlaySpriteAnimationsAndDelayFrame
+ farcall PlaySpriteAnimationsAndDelayFrame
.skip_anims
call JoyTextDelay
call .GetJoypad
diff --git a/engine/mail.asm b/engine/mail.asm
index 840e0a925..392405b20 100755
--- a/engine/mail.asm
+++ b/engine/mail.asm
@@ -2,7 +2,7 @@ SendMailToPC: ; 4456e
ld a, MON_ITEM
call GetPartyParamLocation
ld d, [hl]
- callba ItemIsMail
+ farcall ItemIsMail
jr nc, .full
call GetMailboxCount
cp MAILBOX_CAPACITY
@@ -80,7 +80,7 @@ ReadMailMessage: ; 445f4
call AddNTimes
ld d, h
ld e, l
- callba ReadAnyMail
+ farcall ReadAnyMail
ret
MoveMailFromPCToParty: ; 44607
@@ -127,7 +127,7 @@ GetMailboxCount: ; 44648
CheckPokeItem:: ; 44654
push bc
push de
- callba SelectMonFromParty
+ farcall SelectMonFromParty
ld a, $2
jr c, .pop_return
@@ -136,7 +136,7 @@ CheckPokeItem:: ; 44654
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
ld d, [hl]
- callba ItemIsMail
+ farcall ItemIsMail
ld a, $3
jr nc, .pop_return
@@ -172,12 +172,12 @@ CheckPokeItem:: ; 44654
jr nz, .loop
.done
- callba CheckCurPartyMonFainted
+ farcall CheckCurPartyMonFainted
ld a, $4
jr c, .close_sram_return
xor a
ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
+ farcall RemoveMonFromPartyOrBox
ld a, $1
.close_sram_return
@@ -296,7 +296,7 @@ IsAnyMonHoldingMail: ; 44781
ld d, [hl]
push hl
push de
- callba ItemIsMail
+ farcall ItemIsMail
pop de
pop hl
ret c
@@ -503,15 +503,15 @@ MailboxPC: ; 0x44806
ld [PartyMenuActionText], a
call ClearBGPalettes
.try_again
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuGFX
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuGFX
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
- callba PartyMenuSelect
+ farcall PartyMenuSelect
jr c, .exit2
ld a, [CurPartySpecies]
cp EGG
diff --git a/engine/main_menu.asm b/engine/main_menu.asm
index c3b30d2d0..92a16f5b6 100755
--- a/engine/main_menu.asm
+++ b/engine/main_menu.asm
@@ -271,7 +271,7 @@ MainMenu_PrintCurrentTimeAndDay: ; 49e09
decoord 4, 16
ld a, [hHours]
ld c, a
- callba PrintHour
+ farcall PrintHour
ld [hl], ":"
inc hl
ld de, hMinutes
@@ -341,21 +341,21 @@ Function49ed0: ; 49ed0
MainMenu_NewGame: ; 49ee0
- callba NewGame
+ farcall NewGame
ret
; 49ee7
MainMenu_Options: ; 49ee7
- callba OptionsMenu
+ farcall OptionsMenu
ret
; 49eee
MainMenu_Continue: ; 49eee
- callba Continue
+ farcall Continue
ret
; 49ef5
MainMenu_MysteryGift: ; 49ef5
- callba MysteryGift
+ farcall MysteryGift
ret
; 49efc
diff --git a/engine/map_object_action.asm b/engine/map_object_action.asm
index a7ab87200..ec5ad887e 100755
--- a/engine/map_object_action.asm
+++ b/engine/map_object_action.asm
@@ -1,36 +1,22 @@
- ld hl, OBJECT_ACTION
- add hl, bc
- ld a, [hl]
- ld l, a
- ld h, 0
- add hl, hl
- add hl, hl
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call _hl_
- ret
-; 445f
-
-Pointers445f: ; 445f
- dw SetFacingStanding, SetFacingStanding ; 00
- dw SetFacingStandAction, SetFacingCurrent ; 01 standing?
- dw SetFacingStepAction, SetFacingCurrent ; 02 walking?
- dw SetFacingBumpAction, SetFacingCurrent ; 03 bumping?
- dw SetFacingCounterclockwiseSpin, SetFacingCurrent ; 04
- dw SetFacingCounterclockwiseSpin2, SetFacingStanding ; 05
- dw SetFacingFish, SetFacingFish ; 06
- dw SetFacingShadow, SetFacingStanding ; 07
- dw SetFacingEmote, SetFacingEmote ; 08
- dw SetFacingBigDollSym, SetFacingBigDollSym ; 09
- dw SetFacingBounce, SetFacingFreezeBounce ; 0a
- dw SetFacingWeirdTree, SetFacingCurrent ; 0b
- dw SetFacingBigDollAsym, SetFacingBigDollAsym ; 0c
- dw SetFacingBigDoll, SetFacingBigDoll ; 0d
- dw SetFacingBoulderDust, SetFacingStanding ; 0e
- dw SetFacingGrassShake, SetFacingStanding ; 0f
- dw SetFacingSkyfall, SetFacingCurrent ; 10
+ObjectActionPairPointers: ; 445f
+; entries correspond to OBJECT_ACTION_* constants
+ dw SetFacingStanding, SetFacingStanding
+ dw SetFacingStandAction, SetFacingCurrent
+ dw SetFacingStepAction, SetFacingCurrent
+ dw SetFacingBumpAction, SetFacingCurrent
+ dw SetFacingCounterclockwiseSpin, SetFacingCurrent
+ dw SetFacingCounterclockwiseSpin2, SetFacingStanding
+ dw SetFacingFish, SetFacingFish
+ dw SetFacingShadow, SetFacingStanding
+ dw SetFacingEmote, SetFacingEmote
+ dw SetFacingBigDollSym, SetFacingBigDollSym
+ dw SetFacingBounce, SetFacingFreezeBounce
+ dw SetFacingWeirdTree, SetFacingCurrent
+ dw SetFacingBigDollAsym, SetFacingBigDollAsym
+ dw SetFacingBigDoll, SetFacingBigDoll
+ dw SetFacingBoulderDust, SetFacingStanding
+ dw SetFacingGrassShake, SetFacingStanding
+ dw SetFacingSkyfall, SetFacingCurrent
; 44a3
SetFacingStanding: ; 44a3
diff --git a/engine/map_objects.asm b/engine/map_objects.asm
index d5fa84642..c37e6d2cf 100644
--- a/engine/map_objects.asm
+++ b/engine/map_objects.asm
@@ -1,9 +1,8 @@
+INCLUDE "data/facings.asm"
-INCLUDE "engine/facings.asm"
-
-SpriteMovementData:: ; 4273
INCLUDE "data/map_objects.asm"
+
; 4357
DeleteMapObject:: ; 4357
push bc
@@ -155,8 +154,8 @@ Function437b: ; 437b
jr nz, SetFacingStanding
bit 5, [hl]
jr nz, asm_4448
- ld de, Pointers445f ; use first column
- jr asm_444d
+ ld de, ObjectActionPairPointers ; use first column
+ jr _HandleObjectAction
; 4440
Function4440: ; 4440
@@ -164,13 +163,28 @@ Function4440: ; 4440
add hl, bc
bit INVISIBLE, [hl]
jr nz, SetFacingStanding
-asm_4448 ; use second column
- ld de, Pointers445f + 2
- jr asm_444d
+asm_4448
+ ld de, ObjectActionPairPointers + 2 ; use second column
+ jr _HandleObjectAction
; 444d
-asm_444d
+_HandleObjectAction
; call [4 * ObjectStructs[ObjInd, OBJECT_ACTION] + de]
+ ld hl, OBJECT_ACTION
+ add hl, bc
+ ld a, [hl]
+ ld l, a
+ ld h, 0
+ add hl, hl
+ add hl, hl
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ call _hl_
+ ret
+; 445f
+
INCLUDE "engine/map_object_action.asm"
CopyNextCoordsTileToStandingCoordsTile: ; 4600
@@ -535,6 +549,7 @@ MapObjectMovementPattern: ; 47dd
ret
.Pointers: ; 47e9
+; entries correspond to SPRITEMOVEFN_* constants
dw .Null_00 ; 00
dw .RandomWalkY ; 01
dw .RandomWalkX ; 02
@@ -616,7 +631,7 @@ MapObjectMovementPattern: ; 47dd
call EndSpriteMovement
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STAND
+ ld [hl], OBJECT_ACTION_STAND
ld hl, OBJECT_STEP_TYPE
add hl, bc
ld [hl], STEP_TYPE_05
@@ -635,20 +650,20 @@ MapObjectMovementPattern: ; 47dd
jp HandleMovementData
.Movement0a:
- jp _GetMovementPerson
+ jp _GetMovementObject
.Movement0b:
- jp _GetMovementPerson
+ jp _GetMovementObject
.Movement0c:
- jp _GetMovementPerson
+ jp _GetMovementObject
.Movement0d:
ld hl, Function5000
jp HandleMovementData
.Movement0e:
- jp _GetMovementPerson
+ jp _GetMovementObject
.Follow:
ld hl, GetFollowerNextMovementByte
@@ -766,7 +781,7 @@ MapObjectMovementPattern: ; 47dd
ld [hl], STANDING
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STAND
+ ld [hl], OBJECT_ACTION_STAND
ret
.MovementBigStanding:
@@ -776,7 +791,7 @@ MapObjectMovementPattern: ; 47dd
ld [hl], STANDING
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_BIG_SNORLAX
+ ld [hl], OBJECT_ACTION_BIG_SNORLAX
ld hl, OBJECT_STEP_TYPE
add hl, bc
ld [hl], STEP_TYPE_04
@@ -789,7 +804,7 @@ MapObjectMovementPattern: ; 47dd
ld [hl], STANDING
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_BOUNCE
+ ld [hl], OBJECT_ACTION_BOUNCE
ld hl, OBJECT_STEP_TYPE
add hl, bc
ld [hl], STEP_TYPE_04
@@ -813,7 +828,7 @@ MapObjectMovementPattern: ; 47dd
.MovementSpinRepeat:
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STAND
+ ld [hl], OBJECT_ACTION_STAND
ld hl, OBJECT_RANGE
add hl, bc
ld a, [hl]
@@ -864,7 +879,7 @@ MapObjectMovementPattern: ; 47dd
call ._MovementShadow_Grass_Emote_BoulderDust
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_SHADOW
+ ld [hl], OBJECT_ACTION_SHADOW
ld hl, OBJECT_STEP_DURATION
add hl, de
ld a, [hl]
@@ -901,7 +916,7 @@ MapObjectMovementPattern: ; 47dd
call ._MovementShadow_Grass_Emote_BoulderDust
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_EMOTE
+ ld [hl], OBJECT_ACTION_EMOTE
ld hl, OBJECT_STEP_DURATION
add hl, bc
ld [hl], 0
@@ -921,7 +936,7 @@ MapObjectMovementPattern: ; 47dd
call ._MovementShadow_Grass_Emote_BoulderDust
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_BOULDER_DUST
+ ld [hl], OBJECT_ACTION_BOULDER_DUST
ld hl, OBJECT_STEP_DURATION
add hl, de
ld a, [hl]
@@ -965,7 +980,7 @@ MapObjectMovementPattern: ; 47dd
call ._MovementShadow_Grass_Emote_BoulderDust
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_GRASS_SHAKE
+ ld [hl], OBJECT_ACTION_GRASS_SHAKE
ld hl, OBJECT_STEP_DURATION
add hl, de
ld a, [hl]
@@ -998,7 +1013,7 @@ MapObjectMovementPattern: ; 47dd
call EndSpriteMovement
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_00
+ ld [hl], OBJECT_ACTION_00
ld hl, OBJECT_RANGE
add hl, bc
ld a, [hl]
@@ -1038,7 +1053,7 @@ MapObjectMovementPattern: ; 47dd
call UpdateTallGrassFlags
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STEP
+ ld [hl], OBJECT_ACTION_STEP
ld hl, wCenteredObject
ld a, [hMapObjectIndexBuffer]
cp [hl]
@@ -1077,7 +1092,7 @@ SetRandomStepDuration: ; 4b2d
ld [hl], STANDING
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STAND
+ ld [hl], OBJECT_ACTION_STAND
ld hl, OBJECT_STEP_TYPE
add hl, bc
ld [hl], STEP_TYPE_03
@@ -1085,7 +1100,7 @@ SetRandomStepDuration: ; 4b2d
; 4b45
StepTypesJumptable: ; 4b45
-; These pointers use OBJECT_STEP_TYPE. See constants/sprite_constants.asm
+; entries correspond to STEP_TYPE_* constants
dw ObjectMovementReset ; 00
dw MapObjectMovementPattern ; unused
dw NPCStep ; 02 npc walk
@@ -1230,7 +1245,7 @@ TeleportFrom: ; 4c18
.DoSpin:
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_SPIN
+ ld [hl], OBJECT_ACTION_SPIN
ld hl, OBJECT_STEP_DURATION
add hl, bc
dec [hl]
@@ -1255,7 +1270,7 @@ TeleportFrom: ; 4c18
.DoSpinRise:
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_SPIN
+ ld [hl], OBJECT_ACTION_SPIN
ld hl, OBJECT_31
add hl, bc
inc [hl]
@@ -1295,7 +1310,7 @@ TeleportTo: ; 4c89
.InitWait:
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_00
+ ld [hl], OBJECT_ACTION_00
ld hl, OBJECT_STEP_DURATION
add hl, bc
ld [hl], 16
@@ -1326,7 +1341,7 @@ TeleportTo: ; 4c89
.DoDescent:
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_SPIN
+ ld [hl], OBJECT_ACTION_SPIN
ld hl, OBJECT_31
add hl, bc
inc [hl]
@@ -1354,7 +1369,7 @@ TeleportTo: ; 4c89
.DoFinalSpin:
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_SPIN
+ ld [hl], OBJECT_ACTION_SPIN
ld hl, OBJECT_STEP_DURATION
add hl, bc
dec [hl]
@@ -1384,7 +1399,7 @@ Skyfall: ; 4d14
.Init:
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_00
+ ld [hl], OBJECT_ACTION_00
ld hl, OBJECT_STEP_DURATION
add hl, bc
ld [hl], 16
@@ -1396,7 +1411,7 @@ Skyfall: ; 4d14
ret nz
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STEP
+ ld [hl], OBJECT_ACTION_STEP
ld hl, OBJECT_STEP_FRAME
add hl, bc
ld [hl], 0
@@ -1481,9 +1496,9 @@ RockSmashStep: ; 4daf
add hl, bc
ld a, [hl]
and %00000001
- ld a, PERSON_ACTION_STAND
+ ld a, OBJECT_ACTION_STAND
jr z, .yes
- ld a, PERSON_ACTION_00
+ ld a, OBJECT_ACTION_00
.yes
ld hl, OBJECT_ACTION
add hl, bc
@@ -1496,9 +1511,9 @@ ReturnDigStep: ; 4dc8
add hl, bc
ld a, [hl]
and %00000001
- ld a, PERSON_ACTION_SPIN
+ ld a, OBJECT_ACTION_SPIN
jr z, .yes
- ld a, PERSON_ACTION_SPIN_FLICKER
+ ld a, OBJECT_ACTION_SPIN_FLICKER
.yes
ld hl, OBJECT_ACTION
add hl, bc
@@ -1684,7 +1699,7 @@ StepType0f: ; 4ecd
add hl, bc
ld a, [hl]
ld b, a
- callba CopyDECoordsToMapObject
+ farcall CopyDECoordsToMapObject
pop bc
ld hl, OBJECT_FLAGS2
add hl, bc
@@ -1804,7 +1819,7 @@ SkyfallTop: ; 4f83
.Init:
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_SKYFALL
+ ld [hl], OBJECT_ACTION_SKYFALL
ld hl, OBJECT_STEP_DURATION
add hl, bc
ld [hl], 16
@@ -1920,13 +1935,13 @@ Function5026: ; 5026
ret
; 5037
-_GetMovementPerson: ; 5037
- ld hl, GetMovementPerson
+_GetMovementObject: ; 5037
+ ld hl, GetMovementObject
jp HandleMovementData
; 503d
-GetMovementPerson: ; 503d
- ld a, [wMovementPerson]
+GetMovementObject: ; 503d
+ ld a, [wMovementObject]
ret
; 5041
@@ -2162,7 +2177,7 @@ InitTempObject: ; 55ac
ret nc
ld d, h
ld e, l
- callba CopyTempObjectToObjectStruct
+ farcall CopyTempObjectToObjectStruct
ret
; 55b9
@@ -2291,7 +2306,7 @@ Function565c: ; 565c
call Function56a3
jr c, SetFacing_Standing
call Function5688
- callba Function4440
+ farcall Function4440
xor a
ret
; 5673
@@ -2299,7 +2314,7 @@ Function565c: ; 565c
Function5673: ; 5673
call Function56a3
jr c, SetFacing_Standing
- callba Function4440 ; no need to farcall
+ farcall Function4440 ; no need to farcall
xor a
ret
; 5680
@@ -2325,7 +2340,7 @@ Function5688: ; 5688
ld hl, OBJECT_NEXT_TILE
add hl, bc
ld [hl], a
- callba UpdateTallGrassFlags ; no need to farcall
+ farcall UpdateTallGrassFlags ; no need to farcall
ret
; 56a3
@@ -2512,7 +2527,7 @@ RefreshPlayerSprite: ; 579d
ld [wPlayerTurningDirection], a
ld [PlayerObjectStepFrame], a
call .TryResetPlayerAction
- callba CheckWarpFacingDown
+ farcall CheckWarpFacingDown
call c, SpawnInFacingDown
call .SpawnInCustomFacing
ret
@@ -2525,7 +2540,7 @@ RefreshPlayerSprite: ; 579d
ret
.ok
- ld a, PERSON_ACTION_00
+ ld a, OBJECT_ACTION_00
ld [PlayerAction], a
ret
; 57ca
@@ -2581,7 +2596,7 @@ StartFollow:: ; 5803
ret c
ld a, c
call SetFollowerIfVisible
- callba QueueFollowerFirstStep
+ farcall QueueFollowerFirstStep
ret
; 5815
@@ -2627,7 +2642,7 @@ ResetFollower: ; 5847
cp -1
ret z
call GetObjectStruct
- callba Function58e3 ; no need to bankswitch
+ farcall Function58e3 ; no need to bankswitch
ld a, -1
ld [wObjectFollow_Follower], a
ret
diff --git a/engine/map_objects_2.asm b/engine/map_objects_2.asm
new file mode 100644
index 000000000..3c9a9773c
--- /dev/null
+++ b/engine/map_objects_2.asm
@@ -0,0 +1,70 @@
+LoadObjectMasks: ; 2454f
+ ld hl, wObjectMasks
+ xor a
+ ld bc, NUM_OBJECTS
+ call ByteFill
+ nop
+ ld bc, MapObjects
+ ld de, wObjectMasks
+ xor a
+.loop
+ push af
+ push bc
+ push de
+ call GetObjectTimeMask
+ jr c, .next
+ call CheckObjectFlag
+.next
+ pop de
+ ld [de], a
+ inc de
+ pop bc
+ ld hl, OBJECT_LENGTH
+ add hl, bc
+ ld b, h
+ ld c, l
+ pop af
+ inc a
+ cp NUM_OBJECTS
+ jr nz, .loop
+ ret
+
+CheckObjectFlag: ; 2457d (9:457d)
+ ld hl, MAPOBJECT_SPRITE
+ add hl, bc
+ ld a, [hl]
+ and a
+ jr z, .masked
+ ld hl, MAPOBJECT_EVENT_FLAG
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+ cp -1
+ jr nz, .check
+ ld a, e
+ cp -1
+ jr z, .unmasked
+ jr .masked
+.check
+ ld b, CHECK_FLAG
+ call EventFlagAction
+ ld a, c
+ and a
+ jr nz, .masked
+.unmasked
+ xor a
+ ret
+
+.masked
+ ld a, -1
+ scf
+ ret
+
+GetObjectTimeMask: ; 245a7 (9:45a7)
+ call CheckObjectTime
+ ld a, -1
+ ret c
+ xor a
+ ret
diff --git a/engine/map_palettes.asm b/engine/map_palettes.asm
new file mode 100644
index 000000000..ffeef7bf6
--- /dev/null
+++ b/engine/map_palettes.asm
@@ -0,0 +1,86 @@
+SwapTextboxPalettes:: ; 4c000
+ hlcoord 0, 0
+ decoord 0, 0, AttrMap
+ ld b, SCREEN_HEIGHT
+.loop
+ push bc
+ ld c, SCREEN_WIDTH
+.innerloop
+ ld a, [hl]
+ push hl
+ srl a
+ jr c, .UpperNybble
+ ld hl, TilesetPalettes
+ add [hl]
+ ld l, a
+ ld a, [TilesetPalettes + 1]
+ adc $0
+ ld h, a
+ ld a, [hl]
+ and $f
+ jr .next
+
+.UpperNybble:
+ ld hl, TilesetPalettes
+ add [hl]
+ ld l, a
+ ld a, [TilesetPalettes + 1]
+ adc $0
+ ld h, a
+ ld a, [hl]
+ swap a
+ and $f
+
+.next
+ pop hl
+ ld [de], a
+ res 7, [hl]
+ inc hl
+ inc de
+ dec c
+ jr nz, .innerloop
+ pop bc
+ dec b
+ jr nz, .loop
+ ret
+
+ScrollBGMapPalettes:: ; 4c03f
+ ld hl, BGMapBuffer
+ ld de, BGMapPalBuffer
+.loop
+ ld a, [hl]
+ push hl
+ srl a
+ jr c, .UpperNybble
+
+; .LowerNybble
+ ld hl, TilesetPalettes
+ add [hl]
+ ld l, a
+ ld a, [TilesetPalettes + 1]
+ adc $0
+ ld h, a
+ ld a, [hl]
+ and $f
+ jr .next
+
+.UpperNybble:
+ ld hl, TilesetPalettes
+ add [hl]
+ ld l, a
+ ld a, [TilesetPalettes + 1]
+ adc $0
+ ld h, a
+ ld a, [hl]
+ swap a
+ and $f
+
+.next
+ pop hl
+ ld [de], a
+ res 7, [hl]
+ inc hl
+ inc de
+ dec c
+ jr nz, .loop
+ ret
diff --git a/engine/map_setup.asm b/engine/map_setup.asm
index dc013ffdd..01f3d05d7 100644
--- a/engine/map_setup.asm
+++ b/engine/map_setup.asm
@@ -308,8 +308,8 @@ SuspendMapAnims: ; 154d3
LoadObjectsRunCallback_02: ; 154d7
ld a, MAPCALLBACK_OBJECTS
call RunMapCallback
- callba LoadObjectMasks
- callba InitializeVisibleSprites
+ farcall LoadObjectMasks
+ farcall InitializeVisibleSprites
ret
; 154ea (5:54ea)
@@ -356,16 +356,16 @@ CheckReplaceKrisSprite: ; 154f7
ld a, [PlayerState]
cp PLAYER_NORMAL
jr z, .nope
- cp PLAYER_SLIP
+ cp PLAYER_SKATE
jr z, .nope
cp PLAYER_SURF
jr z, .surfing
cp PLAYER_SURF_PIKA
jr z, .surfing
- call GetMapPermission
+ call GetMapEnvironment
cp INDOOR
jr z, .checkbiking
- cp PERM_5
+ cp ENVIRONMENT_5
jr z, .checkbiking
cp DUNGEON
jr z, .checkbiking
@@ -409,14 +409,14 @@ FadeOldMapMusic: ; 15567
; 1556d
RetainOldPalettes: ; 1556d
- callba _UpdateTimePals
+ farcall _UpdateTimePals
ret
RotatePalettesRightMapAndMusic: ; 15574
ld e, 0
- ld a, [MusicFadeIDLo]
+ ld a, [MusicFadeID]
ld d, 0
- ld a, [MusicFadeIDHi]
+ ld a, [MusicFadeID + 1]
ld a, $4
ld [MusicFade], a
call RotateThreePalettesRight
diff --git a/engine/map_triggers.asm b/engine/map_triggers.asm
deleted file mode 100644
index 2b190fa3e..000000000
--- a/engine/map_triggers.asm
+++ /dev/null
@@ -1,91 +0,0 @@
-MapTriggers:: ; 4d01e
-; Map triggers
-
-trigger_def: MACRO
-; db group, map
-; dw address
- map \1
- dw \2
-ENDM
-
- trigger_def POKECENTER_2F, wPokecenter2FTrigger
- trigger_def TRADE_CENTER, wTradeCenterTrigger
- trigger_def COLOSSEUM, wColosseumTrigger
- trigger_def TIME_CAPSULE, wTimeCapsuleTrigger
- trigger_def POWER_PLANT, wPowerPlantTrigger
- trigger_def CERULEAN_GYM, wCeruleanGymTrigger
- trigger_def ROUTE_25, wRoute25Trigger
- trigger_def TRAINER_HOUSE_B1F, wTrainerHouseB1FTrigger
- trigger_def VICTORY_ROAD_GATE, wVictoryRoadGateTrigger
- trigger_def SAFFRON_TRAIN_STATION, wSaffronTrainStationTrigger
- trigger_def ROUTE_16_GATE, wRoute16GateTrigger
- trigger_def ROUTE_17_18_GATE, wRoute1718GateTrigger
- trigger_def INDIGO_PLATEAU_POKECENTER_1F, wIndigoPlateauPokecenter1FTrigger
- trigger_def WILLS_ROOM, wWillsRoomTrigger
- trigger_def KOGAS_ROOM, wKogasRoomTrigger
- trigger_def BRUNOS_ROOM, wBrunosRoomTrigger
- trigger_def KARENS_ROOM, wKarensRoomTrigger
- trigger_def LANCES_ROOM, wLancesRoomTrigger
- trigger_def HALL_OF_FAME, wHallOfFameTrigger
- trigger_def ROUTE_27, wRoute27Trigger
- trigger_def NEW_BARK_TOWN, wNewBarkTownTrigger
- trigger_def ELMS_LAB, wElmsLabTrigger
- trigger_def KRISS_HOUSE_1F, wKrissHouse1FTrigger
- trigger_def ROUTE_29, wRoute29Trigger
- trigger_def CHERRYGROVE_CITY, wCherrygroveCityTrigger
- trigger_def MR_POKEMONS_HOUSE, wMrPokemonsHouseTrigger
- trigger_def ROUTE_32, wRoute32Trigger
- trigger_def ROUTE_35_NATIONAL_PARK_GATE, wRoute35NationalParkGateTrigger
- trigger_def ROUTE_36, wRoute36Trigger
- trigger_def ROUTE_36_NATIONAL_PARK_GATE, wRoute36NationalParkGateTrigger
- trigger_def AZALEA_TOWN, wAzaleaTownTrigger
- trigger_def GOLDENROD_GYM, wGoldenrodGymTrigger
- trigger_def GOLDENROD_MAGNET_TRAIN_STATION, wGoldenrodMagnetTrainStationTrigger
- trigger_def GOLDENROD_POKECENTER_1F, wGoldenrodPokecenter1FTrigger
- trigger_def OLIVINE_CITY, wOlivineCityTrigger
- trigger_def ROUTE_34, wRoute34Trigger
- trigger_def ROUTE_34_ILEX_FOREST_GATE, wRoute34IlexForestGateTrigger
- trigger_def ECRUTEAK_HOUSE, wEcruteakHouseTrigger
- trigger_def WISE_TRIOS_ROOM, wWiseTriosRoomTrigger
- trigger_def ECRUTEAK_POKECENTER_1F, wEcruteakPokecenter1FTrigger
- trigger_def ECRUTEAK_GYM, wEcruteakGymTrigger
- trigger_def MAHOGANY_TOWN, wMahoganyTownTrigger
- trigger_def ROUTE_42, wRoute42Trigger
- trigger_def CIANWOOD_CITY, wCianwoodCityTrigger
- trigger_def BATTLE_TOWER_1F, wBattleTower1FTrigger
- trigger_def BATTLE_TOWER_BATTLE_ROOM, wBattleTowerBattleRoomTrigger
- trigger_def BATTLE_TOWER_ELEVATOR, wBattleTowerElevatorTrigger
- trigger_def BATTLE_TOWER_HALLWAY, wBattleTowerHallwayTrigger
- trigger_def BATTLE_TOWER_OUTSIDE, wBattleTowerOutsideTrigger
- trigger_def ROUTE_43_GATE, wRoute43GateTrigger
- trigger_def MOUNT_MOON, wMountMoonTrigger
- trigger_def SPROUT_TOWER_3F, wSproutTower3FTrigger
- trigger_def TIN_TOWER_1F, wTinTower1FTrigger
- trigger_def BURNED_TOWER_1F, wBurnedTower1FTrigger
- trigger_def BURNED_TOWER_B1F, wBurnedTowerB1FTrigger
- trigger_def RADIO_TOWER_5F, wRadioTower5FTrigger
- trigger_def RUINS_OF_ALPH_OUTSIDE, wRuinsOfAlphOutsideTrigger
- trigger_def RUINS_OF_ALPH_RESEARCH_CENTER, wRuinsOfAlphResearchCenterTrigger
- trigger_def RUINS_OF_ALPH_HO_OH_CHAMBER, wRuinsOfAlphHoOhChamberTrigger
- trigger_def RUINS_OF_ALPH_KABUTO_CHAMBER, wRuinsOfAlphKabutoChamberTrigger
- trigger_def RUINS_OF_ALPH_OMANYTE_CHAMBER, wRuinsOfAlphOmanyteChamberTrigger
- trigger_def RUINS_OF_ALPH_AERODACTYL_CHAMBER, wRuinsOfAlphAerodactylChamberTrigger
- trigger_def RUINS_OF_ALPH_INNER_CHAMBER, wRuinsOfAlphInnerChamberTrigger
- trigger_def MAHOGANY_MART_1F, wMahoganyMart1FTrigger
- trigger_def TEAM_ROCKET_BASE_B1F, wTeamRocketBaseB1FTrigger
- trigger_def TEAM_ROCKET_BASE_B2F, wTeamRocketBaseB2FTrigger
- trigger_def TEAM_ROCKET_BASE_B3F, wTeamRocketBaseB3FTrigger
- trigger_def UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES, wUndergroundPathSwitchRoomEntrancesTrigger
- trigger_def SILVER_CAVE_ROOM_3, wSilverCaveRoom3Trigger
- trigger_def VICTORY_ROAD, wVictoryRoadTrigger
- trigger_def DRAGONS_DEN_B1F, wDragonsDenB1FTrigger
- trigger_def DRAGON_SHRINE, wDragonShrineTrigger
- trigger_def OLIVINE_PORT, wOlivinePortTrigger
- trigger_def VERMILION_PORT, wVermilionPortTrigger
- trigger_def FAST_SHIP_1F, wFastShip1FTrigger
- trigger_def FAST_SHIP_B1F, wFastShipB1FTrigger
- trigger_def MOUNT_MOON_SQUARE, wMountMoonSquareTrigger
- trigger_def MOBILE_TRADE_ROOM_MOBILE, wMobileTradeRoomMobileTrigger
- trigger_def MOBILE_BATTLE_ROOM, wMobileBattleRoomTrigger
- db -1
-; 4d15b
diff --git a/engine/mart.asm b/engine/mart.asm
index 7002902cc..55c184737 100755
--- a/engine/mart.asm
+++ b/engine/mart.asm
@@ -99,23 +99,7 @@ RooftopSale: ; 15ac4
ret
; 15aee
-RooftopSaleData1: ; 15aee
- db 5
- dbw POKE_BALL, 150
- dbw GREAT_BALL, 500
- dbw SUPER_POTION, 500
- dbw FULL_HEAL, 500
- dbw REVIVE, 1200
- db -1
-RooftopSaleData2: ; 15aff
- db 5
- dbw HYPER_POTION, 1000
- dbw FULL_RESTORE, 2000
- dbw FULL_HEAL, 500
- dbw ULTRA_BALL, 1000
- dbw PROTEIN, 7800
- db -1
-; 15b10
+INCLUDE "data/items/rooftop_sale.asm"
LoadMartPointer: ; 15b10
ld a, b
@@ -268,7 +252,7 @@ GetMartItemPrice: ; 15be5
; Return the price of item a in BCD at hl and in tiles at StringBuffer1.
push hl
ld [CurItem], a
- callba GetItemPrice
+ farcall GetItemPrice
pop hl
GetMartPrice: ; 15bf0
@@ -355,24 +339,16 @@ ReadMart: ; 15c25
ret
; 15c51
-BargainShopData: ; 15c51
- db 5
- dbw NUGGET, 4500
- dbw PEARL, 650
- dbw BIG_PEARL, 3500
- dbw STARDUST, 900
- dbw STAR_PIECE, 4600
- db -1
-; 15c62
+INCLUDE "data/items/bargain_shop.asm"
BuyMenu: ; 15c62
call FadeToMenu
- callba BlankScreen
+ farcall BlankScreen
xor a
- ld [wd045 + 1], a
+ ld [wMenuScrollPositionBackup], a
ld a, 1
- ld [wd045], a
+ ld [wMenuCursorBufferBackup], a
.loop
call BuyMenuLoop ; menu loop
jr nc, .loop
@@ -467,19 +443,19 @@ GetMartDialogGroup: ; 15ca3
BuyMenuLoop: ; 15cef
- callba PlaceMoneyTopRight
+ farcall PlaceMoneyTopRight
call UpdateSprites
ld hl, MenuDataHeader_Buy
call CopyMenuDataHeader
- ld a, [wd045]
+ ld a, [wMenuCursorBufferBackup]
ld [wMenuCursorBuffer], a
- ld a, [wd045 + 1]
+ ld a, [wMenuScrollPositionBackup]
ld [wMenuScrollPosition], a
call ScrollingMenu
ld a, [wMenuScrollPosition]
- ld [wd045 + 1], a
+ ld [wMenuScrollPositionBackup], a
ld a, [wMenuCursorY]
- ld [wd045], a
+ ld [wMenuCursorBufferBackup], a
call SpeechTextBox
ld a, [wMenuJoypad]
cp B_BUTTON
@@ -543,7 +519,7 @@ StandardMartAskPurchaseQuantity:
ld [wItemQuantityBuffer], a
ld a, MARTTEXT_HOW_MANY
call LoadBuyMenuText
- callba SelectQuantityToBuy
+ farcall SelectQuantityToBuy
call ExitMenu
ret
; 15d97
@@ -603,7 +579,7 @@ RooftopSaleAskPurchaseQuantity:
call .GetSalePrice
ld a, 99
ld [wItemQuantityBuffer], a
- callba RooftopSale_SelectQuantityToBuy
+ farcall RooftopSale_SelectQuantityToBuy
call ExitMenu
ret
; 15df9
@@ -806,9 +782,9 @@ Text_Pharmacist_ComeAgain: ; 0x15eae
SellMenu: ; 15eb3
call DisableSpriteUpdates
- callba DepositSellInitPackBuffers
+ farcall DepositSellInitPackBuffers
.loop
- callba DepositSellPack
+ farcall DepositSellPack
ld a, [wcf66]
and a
jp z, .quit
@@ -836,7 +812,7 @@ SellMenu: ; 15eb3
.TryToSellItem: ; 15ee0
- callba CheckItemMenu
+ farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .dw
rst JumpTable
@@ -859,7 +835,7 @@ SellMenu: ; 15eb3
.try_sell ; 15efd
- callba _CheckTossableItem
+ farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
jr z, .okay_to_sell
@@ -871,8 +847,8 @@ SellMenu: ; 15eb3
.okay_to_sell
ld hl, Text_Mart_SellHowMany
call PrintText
- callba PlaceMoneyAtTopLeftOfTextbox
- callba SelectQuantityToSell
+ farcall PlaceMoneyAtTopLeftOfTextbox
+ farcall SelectQuantityToSell
call ExitMenu
jr c, .declined
hlcoord 1, 14
@@ -895,7 +871,7 @@ SellMenu: ; 15eb3
ld hl, Text_Mart_SoldForAmount
call PrintTextBoxText
call PlayTransactionSound
- callba PlaceMoneyBottomLeft
+ farcall PlaceMoneyBottomLeft
call JoyWaitAorB
.declined
diff --git a/engine/menu.asm b/engine/menu.asm
index e84d8d597..6fbed2848 100755
--- a/engine/menu.asm
+++ b/engine/menu.asm
@@ -16,7 +16,7 @@ _InterpretBattleMenu:: ; 24022
rst FarCall
call Draw2DMenu
- callba MobileTextBorder
+ farcall MobileTextBorder
call UpdateSprites
call ApplyTilemap
call Get2DMenuSelection
@@ -29,7 +29,7 @@ _InterpretMobileMenu:: ; 2403c
rst FarCall
call Draw2DMenu
- callba MobileTextBorder
+ farcall MobileTextBorder
call UpdateSprites
call ApplyTilemap
call Init2DMenuCursorPosition
@@ -37,7 +37,7 @@ _InterpretMobileMenu:: ; 2403c
set 7, [hl]
.loop
call DelayFrame
- callba Function10032e
+ farcall Function10032e
ld a, [wcd2b]
and a
jr nz, .quit
@@ -322,7 +322,7 @@ Function241d5: ; 241d5
call AdvanceMobileInactivityTimerAndCheckExpired ; BUG: This function is in another bank.
; Pointer in current bank (9) is bogus.
ret c
- callba Function100337
+ farcall Function100337
ret c
ld a, [w2DMenuFlags1]
bit 7, a
@@ -382,7 +382,7 @@ Menu_WasButtonPressed: ; 24259
ld a, [w2DMenuFlags1]
bit 6, a
jr z, .skip_to_joypad
- callab PlaySpriteAnimationsAndDelayFrame
+ callfar PlaySpriteAnimationsAndDelayFrame
.skip_to_joypad
call JoyTextDelay
diff --git a/engine/menu_2.asm b/engine/menu_2.asm
new file mode 100644
index 000000000..d88b75152
--- /dev/null
+++ b/engine/menu_2.asm
@@ -0,0 +1,263 @@
+PlaceMenuItemName: ; 0x24ab4
+ push de
+ ld a, [MenuSelection]
+ ld [wNamedObjectIndexBuffer], a
+ call GetItemName
+ pop hl
+ call PlaceString
+ ret
+
+PlaceMenuItemQuantity: ; 0x24ac3
+ push de
+ ld a, [MenuSelection]
+ ld [CurItem], a
+ farcall _CheckTossableItem
+ ld a, [wItemAttributeParamBuffer]
+ pop hl
+ and a
+ jr nz, .done
+ ld de, $15
+ add hl, de
+ ld [hl], "×"
+ inc hl
+ ld de, MenuSelectionQuantity
+ lb bc, 1, 2
+ call PrintNum
+
+.done
+ ret
+
+PlaceMoneyTopRight: ; 24ae8
+ ld hl, MenuDataHeader_0x24b15
+ call CopyMenuDataHeader
+ jr PlaceMoneyDataHeader
+
+PlaceMoneyBottomLeft: ; 24af0
+ ld hl, MenuDataHeader_0x24b1d
+ call CopyMenuDataHeader
+ jr PlaceMoneyDataHeader
+
+PlaceMoneyAtTopLeftOfTextbox: ; 24af8
+ ld hl, MenuDataHeader_0x24b15
+ lb de, 0, 11
+ call OffsetMenuDataHeader
+
+PlaceMoneyDataHeader: ; 24b01
+ call MenuBox
+ call MenuBoxCoord2Tile
+ ld de, SCREEN_WIDTH + 1
+ add hl, de
+ ld de, Money
+ lb bc, PRINTNUM_MONEY | 3, 6
+ call PrintNum
+ ret
+
+MenuDataHeader_0x24b15: ; 0x24b15
+ db $40 ; flags
+ db 00, 11 ; start coords
+ db 02, 19 ; end coords
+ dw NULL
+ db 1 ; default option
+
+MenuDataHeader_0x24b1d: ; 0x24b1d
+ db $40 ; flags
+ db 11, 00 ; start coords
+ db 13, 08 ; end coords
+ dw NULL
+ db 1 ; default option
+
+Special_DisplayCoinCaseBalance: ; 24b25
+ ; Place a text box of size 1x7 at 11, 0.
+ hlcoord 11, 0
+ ld b, 1
+ ld c, 7
+ call TextBox
+ hlcoord 12, 0
+ ld de, CoinString
+ call PlaceString
+ hlcoord 17, 1
+ ld de, ShowMoney_TerminatorString
+ call PlaceString
+ ld de, Coins
+ lb bc, 2, 4
+ hlcoord 13, 1
+ call PrintNum
+ ret
+
+Special_DisplayMoneyAndCoinBalance: ; 24b4e
+ hlcoord 5, 0
+ ld b, 3
+ ld c, 13
+ call TextBox
+ hlcoord 6, 1
+ ld de, MoneyString
+ call PlaceString
+ hlcoord 12, 1
+ ld de, Money
+ lb bc, PRINTNUM_MONEY | 3, 6
+ call PrintNum
+ hlcoord 6, 3
+ ld de, CoinString
+ call PlaceString
+ hlcoord 15, 3
+ ld de, Coins
+ lb bc, 2, 4
+ call PrintNum
+ ret
+
+MoneyString: ; 24b83
+ db "MONEY@"
+CoinString: ; 24b89
+ db "COIN@"
+ShowMoney_TerminatorString: ; 24b8e
+ db "@"
+
+Function24b8f: ; 24b8f
+; unreferenced, related to safari?
+ ld hl, Options
+ ld a, [hl]
+ push af
+ set NO_TEXT_SCROLL, [hl]
+ hlcoord 0, 0
+ ld b, 3
+ ld c, 7
+ call TextBox
+ hlcoord 1, 1
+ ld de, wSafariTimeRemaining
+ lb bc, 2, 3
+ call PrintNum
+ hlcoord 4, 1
+ ld de, .slash_500
+ call PlaceString
+ hlcoord 1, 3
+ ld de, .booru_ko
+ call PlaceString
+ hlcoord 5, 3
+ ld de, wSafariBallsRemaining
+ lb bc, 1, 2
+ call PrintNum
+ pop af
+ ld [Options], a
+ ret
+
+.slash_500 ; 24bcf
+ db "/500@"
+.booru_ko ; 24bd4
+ db "ボール こ@"
+
+StartMenu_DrawBugContestStatusBox: ; 24bdc
+ hlcoord 0, 0
+ ld b, 5
+ ld c, 17
+ call TextBox
+ ret
+
+StartMenu_PrintBugContestStatus: ; 24be7
+ ld hl, Options
+ ld a, [hl]
+ push af
+ set NO_TEXT_SCROLL, [hl]
+ call StartMenu_DrawBugContestStatusBox
+ hlcoord 1, 5
+ ld de, .Balls_EN
+ call PlaceString
+ hlcoord 8, 5
+ ld de, wParkBallsRemaining
+ lb bc, PRINTNUM_RIGHTALIGN | 1, 2
+ call PrintNum
+ hlcoord 1, 1
+ ld de, .CAUGHT
+ call PlaceString
+ ld a, [wContestMon]
+ and a
+ ld de, .None
+ jr z, .no_contest_mon
+ ld [wd265], a
+ call GetPokemonName
+
+.no_contest_mon
+ hlcoord 8, 1
+ call PlaceString
+ ld a, [wContestMon]
+ and a
+ jr z, .skip_level
+ hlcoord 1, 3
+ ld de, .LEVEL
+ call PlaceString
+ ld a, [wContestMonLevel]
+ ld h, b
+ ld l, c
+ inc hl
+ ld c, 3
+ call Print8BitNumRightAlign
+
+.skip_level
+ pop af
+ ld [Options], a
+ ret
+
+.Balls_JP: ; 24c43
+ db "ボール こ@"
+.CAUGHT: ; 24c4b
+ db "CAUGHT@"
+.Balls_EN: ; 24c52
+ db "BALLS:@"
+.None: ; 24c59
+ db "None@"
+.LEVEL: ; 24c5e
+ db "LEVEL@"
+
+FindApricornsInBag: ; 24c64
+; Checks the bag for Apricorns.
+ ld hl, Buffer1
+ xor a
+ ld [hli], a
+ dec a
+ ld bc, 10
+ call ByteFill
+
+ ld hl, .ApricornBalls
+.loop
+ ld a, [hl]
+ cp -1
+ jr z, .done
+ push hl
+ ld [CurItem], a
+ ld hl, NumItems
+ call CheckItem
+ pop hl
+ jr nc, .nope
+ ld a, [hl]
+ call .addtobuffer
+.nope
+ inc hl
+ inc hl
+ jr .loop
+
+.done
+ ld a, [Buffer1]
+ and a
+ ret nz
+ scf
+ ret
+
+.addtobuffer ; 24c94
+ push hl
+ ld hl, Buffer1
+ inc [hl]
+ ld e, [hl]
+ ld d, 0
+ add hl, de
+ ld [hl], a
+ pop hl
+ ret
+
+.ApricornBalls: ; 24ca0
+ db RED_APRICORN, LEVEL_BALL
+ db BLU_APRICORN, LURE_BALL
+ db YLW_APRICORN, MOON_BALL
+ db GRN_APRICORN, FRIEND_BALL
+ db WHT_APRICORN, FAST_BALL
+ db BLK_APRICORN, HEAVY_BALL
+ db PNK_APRICORN, LOVE_BALL
+ db -1
diff --git a/engine/mon_icons.asm b/engine/mon_icons.asm
index d66ea6fac..965d9f0ef 100755
--- a/engine/mon_icons.asm
+++ b/engine/mon_icons.asm
@@ -66,7 +66,7 @@ LoadMenuMonIcon: ; 8e83f
push hl
push bc
ld d, a
- callab ItemIsMail
+ callfar ItemIsMail
pop bc
pop hl
jr c, .not_mail
@@ -140,15 +140,15 @@ PartyMenu_InitAnimatedMonIcon: ; 8e8d5 (23:68d5)
push hl
push bc
ld d, a
- callab ItemIsMail
+ callfar ItemIsMail
pop bc
pop hl
jr c, .mail
- ld a, SPRITE_ANIM_FRAMESET_03
+ ld a, SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_ITEM
jr .okay
.mail
- ld a, SPRITE_ANIM_FRAMESET_02
+ ld a, SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_MAIL
.okay
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
add hl, bc
@@ -178,7 +178,7 @@ InitPartyMenuIcon: ; 8e908 (23:6908)
; x coord
ld e, $10
; type is partymon icon
- ld a, SPRITE_ANIM_INDEX_00
+ ld a, SPRITE_ANIM_INDEX_PARTY_MON
call InitSpriteAnimStruct
pop af
ld hl, SPRITEANIMSTRUCT_TILE_ID
@@ -204,7 +204,7 @@ SetPartyMonIconAnimSpeed: ; 8e936 (23:6936)
ret
.getspeed ; 8e94c (23:694c)
- callba PlacePartymonHPBar
+ farcall PlacePartymonHPBar
call GetHPPal
ld e, d
ld d, 0
@@ -215,7 +215,9 @@ SetPartyMonIconAnimSpeed: ; 8e936 (23:6936)
; 8e95e (23:695e)
.speeds ; 8e95e
- db $00, $40, $80
+ db $00 ; HP_GREEN
+ db $40 ; HP_YELLOW
+ db $80 ; HP_RED
; 8e961
NamingScreen_InitAnimatedMonIcon: ; 8e961 (23:6961)
@@ -225,7 +227,7 @@ NamingScreen_InitAnimatedMonIcon: ; 8e961 (23:6961)
xor a
call GetIconGFX
depixel 4, 4, 4, 0
- ld a, SPRITE_ANIM_INDEX_00
+ ld a, SPRITE_ANIM_INDEX_PARTY_MON
call InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
@@ -238,9 +240,9 @@ MoveList_InitAnimatedMonIcon: ; 8e97d (23:697d)
ld [CurIcon], a
xor a
call GetIconGFX
- ld d, 3 * 8 + 2
+ ld d, 3 * 8 + 2 ; depixel 3, 4, 2, 4
ld e, 4 * 8 + 4
- ld a, SPRITE_ANIM_INDEX_00
+ ld a, SPRITE_ANIM_INDEX_PARTY_MON
call InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
@@ -295,7 +297,7 @@ GetMemIconGFX: ; 8e9db (23:69db)
ld a, [wCurIconTile]
GetIconGFX: ; 8e9de
call GetIcon_a
- ld de, $80 ; 8 tiles
+ ld de, 8 tiles
add hl, de
ld de, HeldItemIcons
lb bc, BANK(HeldItemIcons), 2
@@ -376,7 +378,7 @@ FreezeMonIcons: ; 8ea4a
jr .ok
.loadwithtwo
- ld a, SPRITE_ANIM_SEQ_02
+ ld a, SPRITE_ANIM_SEQ_PARTY_MON_SWITCH
.ok
push hl
@@ -407,7 +409,7 @@ UnfreezeMonIcons: ; 8ea71
ld b, h
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
- ld [hl], SPRITE_ANIM_SEQ_01
+ ld [hl], SPRITE_ANIM_SEQ_PARTY_MON
pop hl
.next
ld bc, $10
@@ -428,11 +430,11 @@ HoldSwitchmonIcon: ; 8ea8c
jr z, .next
cp d
jr z, .is_switchmon
- ld a, SPRITE_ANIM_SEQ_03
+ ld a, SPRITE_ANIM_SEQ_PARTY_MON_SELECTED
jr .join_back
.is_switchmon
- ld a, SPRITE_ANIM_SEQ_02
+ ld a, SPRITE_ANIM_SEQ_PARTY_MON_SWITCH
.join_back
push hl
ld c, l
@@ -448,4 +450,24 @@ HoldSwitchmonIcon: ; 8ea8c
jr nz, .loop
ret
-INCLUDE "menu/mon_icons.asm"
+ReadMonMenuIcon: ; 8eab3
+ cp EGG
+ jr z, .egg
+ dec a
+ ld hl, MonMenuIcons
+ ld e, a
+ ld d, 0
+ add hl, de
+ ld a, [hl]
+ ret
+.egg
+ ld a, ICON_EGG
+ ret
+; 8eac4
+
+
+INCLUDE "data/pokemon/menu_icons.asm"
+
+INCLUDE "gfx/icon_pointers.asm"
+
+INCLUDE "gfx/icons.asm"
diff --git a/engine/mon_menu.asm b/engine/mon_menu.asm
index a6dcf0eb7..dc6cd5cc8 100755
--- a/engine/mon_menu.asm
+++ b/engine/mon_menu.asm
@@ -9,8 +9,7 @@ MonMenuOptionStrings: ; 24caf
; 24cd9
MonMenuOptions: ; 24cd9
-
-; Moves
+; moves
db MONMENU_FIELD_MOVE, MONMENU_CUT, CUT
db MONMENU_FIELD_MOVE, MONMENU_FLY, FLY
db MONMENU_FIELD_MOVE, MONMENU_SURF, SURF
@@ -25,8 +24,7 @@ MonMenuOptions: ; 24cd9
db MONMENU_FIELD_MOVE, MONMENU_ROCKSMASH, ROCK_SMASH
db MONMENU_FIELD_MOVE, MONMENU_MILKDRINK, MILK_DRINK
db MONMENU_FIELD_MOVE, MONMENU_SWEETSCENT, SWEET_SCENT
-
-; Options
+; options
db MONMENU_MENUOPTION, MONMENU_STATS, 1 ; STATS
db MONMENU_MENUOPTION, MONMENU_SWITCH, 2 ; SWITCH
db MONMENU_MENUOPTION, MONMENU_ITEM, 3 ; ITEM
@@ -34,7 +32,6 @@ MonMenuOptions: ; 24cd9
db MONMENU_MENUOPTION, MONMENU_MOVE, 5 ; MOVE
db MONMENU_MENUOPTION, MONMENU_MAIL, 6 ; MAIL
db MONMENU_MENUOPTION, MONMENU_ERROR, 7 ; ERROR!
-
db -1
; 24d19
@@ -42,7 +39,7 @@ MonSubmenu: ; 24d19
xor a
ld [hBGMapMode], a
call GetMonSubmenuItems
- callba FreezeMonIcons
+ farcall FreezeMonIcons
ld hl, .MenuDataHeader
call LoadMenuDataHeader
call .GetTopCoord
@@ -205,7 +202,7 @@ GetMonSubmenuItems: ; 24dd4
ld a, MON_ITEM
call GetPartyParamLocation
ld d, [hl]
- callba ItemIsMail
+ farcall ItemIsMail
pop hl
ld a, MONMENU_MAIL
jr c, .ok
@@ -216,7 +213,7 @@ GetMonSubmenuItems: ; 24dd4
.skip2
ld a, [Buffer1]
- cp NUM_MON_SUBMENU_ITEMS
+ cp NUM_MONMENU_ITEMS
jr z, .ok2
ld a, MONMENU_CANCEL
call AddMonMenuItem
@@ -261,7 +258,7 @@ ResetMonSubmenu: ; 24e68
xor a
ld [Buffer1], a
ld hl, Buffer2
- ld bc, NUM_MON_SUBMENU_ITEMS + 1
+ ld bc, NUM_MONMENU_ITEMS + 1
call ByteFill
ret
; 24e76
diff --git a/engine/mon_stats.asm b/engine/mon_stats.asm
new file mode 100644
index 000000000..a3039eefd
--- /dev/null
+++ b/engine/mon_stats.asm
@@ -0,0 +1,486 @@
+DrawPlayerHP: ; 50b0a
+ ld a, $1
+ jr DrawHP
+
+DrawEnemyHP: ; 50b0e
+ ld a, $2
+
+DrawHP: ; 50b10
+ ld [wWhichHPBar], a
+ push hl
+ push bc
+ ; box mons have full HP
+ ld a, [MonType]
+ cp BOXMON
+ jr z, .at_least_1_hp
+
+ ld a, [TempMonHP]
+ ld b, a
+ ld a, [TempMonHP + 1]
+ ld c, a
+
+; Any HP?
+ or b
+ jr nz, .at_least_1_hp
+
+ xor a
+ ld c, a
+ ld e, a
+ ld a, 6
+ ld d, a
+ jp .fainted
+
+.at_least_1_hp
+ ld a, [TempMonMaxHP]
+ ld d, a
+ ld a, [TempMonMaxHP + 1]
+ ld e, a
+ ld a, [MonType]
+ cp BOXMON
+ jr nz, .not_boxmon
+
+ ld b, d
+ ld c, e
+
+.not_boxmon
+ predef ComputeHPBarPixels
+ ld a, 6
+ ld d, a
+ ld c, a
+
+.fainted
+ ld a, c
+ pop bc
+ ld c, a
+ pop hl
+ push de
+ push hl
+ push hl
+ call DrawBattleHPBar
+ pop hl
+
+; Print HP
+ bccoord 1, 1, 0
+ add hl, bc
+ ld de, TempMonHP
+ ld a, [MonType]
+ cp BOXMON
+ jr nz, .not_boxmon_2
+ ld de, TempMonMaxHP
+.not_boxmon_2
+ lb bc, 2, 3
+ call PrintNum
+
+ ld a, "/"
+ ld [hli], a
+
+; Print max HP
+ ld de, TempMonMaxHP
+ lb bc, 2, 3
+ call PrintNum
+ pop hl
+ pop de
+ ret
+
+PrintTempMonStats: ; 50b7b
+; Print TempMon's stats at hl, with spacing bc.
+ push bc
+ push hl
+ ld de, .StatNames
+ call PlaceString
+ pop hl
+ pop bc
+ add hl, bc
+ ld bc, SCREEN_WIDTH
+ add hl, bc
+ ld de, TempMonAttack
+ lb bc, 2, 3
+ call .PrintStat
+ ld de, TempMonDefense
+ call .PrintStat
+ ld de, TempMonSpclAtk
+ call .PrintStat
+ ld de, TempMonSpclDef
+ call .PrintStat
+ ld de, TempMonSpeed
+ jp PrintNum
+
+.PrintStat: ; 50bab
+ push hl
+ call PrintNum
+ pop hl
+ ld de, SCREEN_WIDTH * 2
+ add hl, de
+ ret
+
+.StatNames: ; 50bb5
+ db "ATTACK"
+ next "DEFENSE"
+ next "SPCL.ATK"
+ next "SPCL.DEF"
+ next "SPEED"
+ next "@"
+
+GetGender: ; 50bdd
+; Return the gender of a given monster (CurPartyMon/CurOTMon/CurWildMon).
+; When calling this function, a should be set to an appropriate MonType value.
+
+; return values:
+; a = 1: f = nc|nz; male
+; a = 0: f = nc|z; female
+; f = c: genderless
+
+; This is determined by comparing the Attack and Speed DVs
+; with the species' gender ratio.
+
+; Figure out what type of monster struct we're looking at.
+
+; 0: PartyMon
+ ld hl, PartyMon1DVs
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld a, [MonType]
+ and a
+ jr z, .PartyMon
+
+; 1: OTPartyMon
+ ld hl, OTPartyMon1DVs
+ dec a
+ jr z, .PartyMon
+
+; 2: sBoxMon
+ ld hl, sBoxMon1DVs
+ ld bc, BOXMON_STRUCT_LENGTH
+ dec a
+ jr z, .sBoxMon
+
+; 3: Unknown
+ ld hl, TempMonDVs
+ dec a
+ jr z, .DVs
+
+; else: WildMon
+ ld hl, EnemyMonDVs
+ jr .DVs
+
+; Get our place in the party/box.
+
+.PartyMon:
+.sBoxMon
+ ld a, [CurPartyMon]
+ call AddNTimes
+
+.DVs:
+
+; sBoxMon data is read directly from SRAM.
+ ld a, [MonType]
+ cp BOXMON
+ ld a, 1
+ call z, GetSRAMBank
+
+; Attack DV
+ ld a, [hli]
+ and $f0
+ ld b, a
+; Speed DV
+ ld a, [hl]
+ and $f0
+ swap a
+
+; Put our DVs together.
+ or b
+ ld b, a
+
+; Close SRAM if we were dealing with a sBoxMon.
+ ld a, [MonType]
+ cp BOXMON
+ call z, CloseSRAM
+
+; We need the gender ratio to do anything with this.
+ push bc
+ ld a, [CurPartySpecies]
+ dec a
+ ld hl, BaseData + BASE_GENDER
+ ld bc, BASE_DATA_SIZE
+ call AddNTimes
+ pop bc
+
+ ld a, BANK(BaseData)
+ call GetFarByte
+
+; The higher the ratio, the more likely the monster is to be female.
+
+ cp GENDERLESS
+ jr z, .Genderless
+
+ and a ; GENDER_F0?
+ jr z, .Male
+
+ cp GENDER_F100
+ jr z, .Female
+
+; Values below the ratio are male, and vice versa.
+ cp b
+ jr c, .Male
+
+.Female:
+ xor a
+ ret
+
+.Male:
+ ld a, 1
+ and a
+ ret
+
+.Genderless:
+ scf
+ ret
+
+ListMovePP: ; 50c50
+ ld a, [wNumMoves]
+ inc a
+ ld c, a
+ ld a, NUM_MOVES
+ sub c
+ ld b, a
+ push hl
+ ld a, [Buffer1]
+ ld e, a
+ ld d, $0
+ ld a, $3e ; P
+ call .load_loop
+ ld a, b
+ and a
+ jr z, .skip
+ ld c, a
+ ld a, "-"
+ call .load_loop
+
+.skip
+ pop hl
+ inc hl
+ inc hl
+ inc hl
+ ld d, h
+ ld e, l
+ ld hl, TempMonMoves
+ ld b, 0
+.loop
+ ld a, [hli]
+ and a
+ jr z, .done
+ push bc
+ push hl
+ push de
+ ld hl, wMenuCursorY
+ ld a, [hl]
+ push af
+ ld [hl], b
+ push hl
+ callfar GetMaxPPOfMove
+ pop hl
+ pop af
+ ld [hl], a
+ pop de
+ pop hl
+ push hl
+ ld bc, TempMonPP - (TempMonMoves + 1)
+ add hl, bc
+ ld a, [hl]
+ and $3f
+ ld [StringBuffer1 + 4], a
+ ld h, d
+ ld l, e
+ push hl
+ ld de, StringBuffer1 + 4
+ lb bc, 1, 2
+ call PrintNum
+ ld a, "/"
+ ld [hli], a
+ ld de, wd265
+ lb bc, 1, 2
+ call PrintNum
+ pop hl
+ ld a, [Buffer1]
+ ld e, a
+ ld d, 0
+ add hl, de
+ ld d, h
+ ld e, l
+ pop hl
+ pop bc
+ inc b
+ ld a, b
+ cp NUM_MOVES
+ jr nz, .loop
+
+.done
+ ret
+
+.load_loop ; 50cc9
+ ld [hli], a
+ ld [hld], a
+ add hl, de
+ dec c
+ jr nz, .load_loop
+ ret
+
+Function50cd0: ; 50cd0
+; XXX
+.loop
+ ld [hl], $32
+ inc hl
+ ld [hl], $3e
+ dec hl
+ add hl, de
+ dec c
+ jr nz, .loop
+ ret
+
+Predef22: ; unreferenced predef
+ push hl
+ push hl
+ ld hl, PartyMonNicknames
+ ld a, [CurPartyMon]
+ call GetNick
+ pop hl
+ call PlaceString
+ call CopyPkmnToTempMon
+ pop hl
+ ld a, [CurPartySpecies]
+ cp EGG
+ jr z, .egg
+ push hl
+ ld bc, -12
+ add hl, bc
+ ld b, $0
+ call DrawEnemyHP
+ pop hl
+ ld bc, 5
+ add hl, bc
+ push de
+ call PrintLevel
+ pop de
+
+.egg
+ ret
+
+PlaceStatusString: ; 50d0a
+ push de
+ inc de
+ inc de
+ ld a, [de]
+ ld b, a
+ inc de
+ ld a, [de]
+ or b
+ pop de
+ jr nz, PlaceNonFaintStatus
+ push de
+ ld de, FntString
+ call CopyStatusString
+ pop de
+ ld a, $1
+ and a
+ ret
+
+FntString: ; 50d22
+ db "FNT@"
+
+CopyStatusString: ; 50d25
+ ld a, [de]
+ inc de
+ ld [hli], a
+ ld a, [de]
+ inc de
+ ld [hli], a
+ ld a, [de]
+ ld [hl], a
+ ret
+
+PlaceNonFaintStatus: ; 50d2e
+ push de
+ ld a, [de]
+ ld de, PsnString
+ bit PSN, a
+ jr nz, .place
+ ld de, BrnString
+ bit BRN, a
+ jr nz, .place
+ ld de, FrzString
+ bit FRZ, a
+ jr nz, .place
+ ld de, ParString
+ bit PAR, a
+ jr nz, .place
+ ld de, SlpString
+ and SLP
+ jr z, .no_status
+
+.place
+ call CopyStatusString
+ ld a, $1
+ and a
+
+.no_status
+ pop de
+ ret
+
+SlpString: db "SLP@"
+PsnString: db "PSN@"
+BrnString: db "BRN@"
+FrzString: db "FRZ@"
+ParString: db "PAR@"
+
+ListMoves: ; 50d6f
+; List moves at hl, spaced every [Buffer1] tiles.
+ ld de, wListMoves_MoveIndicesBuffer
+ ld b, $0
+.moves_loop
+ ld a, [de]
+ inc de
+ and a
+ jr z, .no_more_moves
+ push de
+ push hl
+ push hl
+ ld [CurSpecies], a
+ ld a, MOVE_NAME
+ ld [wNamedObjectTypeBuffer], a
+ call GetName
+ ld de, StringBuffer1
+ pop hl
+ push bc
+ call PlaceString
+ pop bc
+ ld a, b
+ ld [wNumMoves], a
+ inc b
+ pop hl
+ push bc
+ ld a, [Buffer1]
+ ld c, a
+ ld b, 0
+ add hl, bc
+ pop bc
+ pop de
+ ld a, b
+ cp NUM_MOVES
+ jr z, .done
+ jr .moves_loop
+
+.no_more_moves
+ ld a, b
+.nonmove_loop
+ push af
+ ld [hl], "-"
+ ld a, [Buffer1]
+ ld c, a
+ ld b, 0
+ add hl, bc
+ pop af
+ inc a
+ cp NUM_MOVES
+ jr nz, .nonmove_loop
+
+.done
+ ret
diff --git a/engine/money.asm b/engine/money.asm
index 874821814..60de97568 100755
--- a/engine/money.asm
+++ b/engine/money.asm
@@ -24,7 +24,7 @@ GiveMoney:: ; 15fd7
; 15ff7
MaxMoney: ; 15ff7
- dt 999999
+ dt MAX_MONEY
; 15ffa
@@ -192,7 +192,7 @@ GiveCoins:: ; 1606f
; 1608d
.maxcoins ; 1608d
- bigdw 9999
+ bigdw MAX_COINS
; 1608f
diff --git a/engine/more_phone_scripts.asm b/engine/more_phone_scripts.asm
deleted file mode 100644
index d44f5b475..000000000
--- a/engine/more_phone_scripts.asm
+++ /dev/null
@@ -1,1660 +0,0 @@
-UnknownScript_0xa0000:
- special RandomPhoneMon
- farscall PhoneScript_Random2
- if_equal 0, UnknownScript_0xa0013
- farscall PhoneScript_Generic_Male
- farjump UnknownScript_0xa003e
-
-UnknownScript_0xa0013:
- farjump UnknownScript_0xa002e
-
-UnknownScript_0xa0017:
- special RandomPhoneMon
- farscall PhoneScript_Random2
- if_equal 0, UnknownScript_0xa002a
- farscall PhoneScript_Generic_Female
- farjump UnknownScript_0xa0055
-
-UnknownScript_0xa002a:
- farjump UnknownScript_0xa0036
-
-UnknownScript_0xa002e:
- farscall UnknownScript_0xa007c
- farjump UnknownScript_0xa003e
-
-UnknownScript_0xa0036:
- farscall UnknownScript_0xa0128
- farjump UnknownScript_0xa0055
-
-UnknownScript_0xa003e:
- special RandomPhoneWildMon
- farscall PhoneScript_Random2
- if_equal 0, UnknownScript_0xa0051
- farscall UnknownScript_0xa017a
- farjump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0051:
- farjump UnknownScript_0xa006c
-
-UnknownScript_0xa0055:
- special RandomPhoneWildMon
- farscall PhoneScript_Random2
- if_equal 0, UnknownScript_0xa0068
- farscall UnknownScript_0xa0226
- farjump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0068:
- farjump UnknownScript_0xa0074
-
-UnknownScript_0xa006c:
- farscall UnknownScript_0xa0278
- farjump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0074:
- farscall UnknownScript_0xa0324
- farjump PhoneScript_HangupText_Female
-
-UnknownScript_0xa007c:
- checkcode VAR_CALLERID
- if_equal PHONE_SCHOOLBOY_JACK, .Jack
- if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
- if_equal PHONE_BIRDKEEPER_JOSE, .Jose
- if_equal PHONE_YOUNGSTER_JOEY, .Joey
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_FISHER_RALPH, .Ralph
- if_equal PHONE_HIKER_ANTHONY, .Anthony
- if_equal PHONE_CAMPER_TODD, .Todd
- if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
- if_equal PHONE_SCHOOLBOY_ALAN, .Alan
- if_equal PHONE_SCHOOLBOY_CHAD, .Chad
- if_equal PHONE_POKEFANM_DEREK, .Derek
- if_equal PHONE_FISHER_TULLY, .Tully
- if_equal PHONE_POKEMANIAC_BRENT, .Brent
- if_equal PHONE_BIRDKEEPER_VANCE, .Vance
- if_equal PHONE_FISHER_WILTON, .Wilton
- if_equal PHONE_HIKER_PARRY, .Parry
-
-.Jack:
- farwritetext UnknownText_0x1740c0
- buttonsound
- end
-
-.Gaven:
- farwritetext UnknownText_0x174a24
- buttonsound
- end
-
-.Jose:
- farwritetext UnknownText_0x174f2f
- buttonsound
- end
-
-.Joey:
- farwritetext UnknownText_0x175530
- buttonsound
- end
-
-.Wade:
- farwritetext UnknownText_0x1757d4
- buttonsound
- end
-
-.Ralph:
- farwritetext UnknownText_0x175bc4
- buttonsound
- end
-
-.Anthony:
- farwritetext UnknownText_0x176a2f
- buttonsound
- end
-
-.Todd:
- farwritetext UnknownText_0x176e5d
- buttonsound
- end
-
-.Arnie:
- farwritetext UnknownText_0x649dc
- buttonsound
- end
-
-.Alan:
- farwritetext UnknownText_0x64cbd
- buttonsound
- end
-
-.Chad:
- farwritetext UnknownText_0x65271
- buttonsound
- end
-
-.Derek:
- farwritetext UnknownText_0x65ab2
- buttonsound
- end
-
-.Tully:
- farwritetext UnknownText_0x65de4
- buttonsound
- end
-
-.Brent:
- farwritetext UnknownText_0x660be
- buttonsound
- end
-
-.Vance:
- farwritetext UnknownText_0x66980
- buttonsound
- end
-
-.Wilton:
- farwritetext UnknownText_0x66afc
- buttonsound
- end
-
-.Parry:
- farwritetext UnknownText_0x66f9f
- buttonsound
- end
-
-UnknownScript_0xa0128:
- checkcode VAR_CALLERID
- if_equal PHONE_POKEFAN_BEVERLY, .Beverly
- if_equal PHONE_COOLTRAINERF_BETH, .Beth
- if_equal PHONE_COOLTRAINERF_REENA, .Reena
- if_equal PHONE_PICNICKER_LIZ, .Liz
- if_equal PHONE_PICNICKER_GINA, .Gina
- if_equal PHONE_LASS_DANA, .Dana
- if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
- if_equal PHONE_PICNICKER_ERIN, .Erin
-
-.Beverly:
- farwritetext UnknownText_0x174688
- buttonsound
- end
-
-.Beth:
- farwritetext UnknownText_0x174c7f
- buttonsound
- end
-
-.Reena:
- farwritetext UnknownText_0x1752f5
- buttonsound
- end
-
-.Liz:
- farwritetext UnknownText_0x175fda
- buttonsound
- end
-
-.Gina:
- farwritetext UnknownText_0x1771fd
- buttonsound
- end
-
-.Dana:
- farwritetext UnknownText_0x64f74
- buttonsound
- end
-
-.Tiffany:
- farwritetext UnknownText_0x665ad
- buttonsound
- end
-
-.Erin:
- farwritetext UnknownText_0x6717a
- buttonsound
- end
-
-UnknownScript_0xa017a:
- checkcode VAR_CALLERID
- if_equal PHONE_SCHOOLBOY_JACK, .Jack
- if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
- if_equal PHONE_BIRDKEEPER_JOSE, .Jose
- if_equal PHONE_YOUNGSTER_JOEY, .Joey
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_FISHER_RALPH, .Ralph
- if_equal PHONE_HIKER_ANTHONY, .Anthony
- if_equal PHONE_CAMPER_TODD, .Todd
- if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
- if_equal PHONE_SCHOOLBOY_ALAN, .Alan
- if_equal PHONE_SCHOOLBOY_CHAD, .Chad
- if_equal PHONE_POKEFANM_DEREK, .Derek
- if_equal PHONE_FISHER_TULLY, .Tully
- if_equal PHONE_POKEMANIAC_BRENT, .Brent
- if_equal PHONE_BIRDKEEPER_VANCE, .Vance
- if_equal PHONE_FISHER_WILTON, .Wilton
- if_equal PHONE_HIKER_PARRY, .Parry
-
-.Jack:
- farwritetext UnknownText_0x174106
- buttonsound
- end
-
-.Gaven:
- farwritetext UnknownText_0x174a80
- buttonsound
- end
-
-.Jose:
- farwritetext UnknownText_0x174f90
- buttonsound
- end
-
-.Joey:
- farwritetext UnknownText_0x175591
- buttonsound
- end
-
-.Wade:
- farwritetext UnknownText_0x175869
- buttonsound
- end
-
-.Ralph:
- farwritetext UnknownText_0x175c24
- buttonsound
- end
-
-.Anthony:
- farwritetext UnknownText_0x176aef
- buttonsound
- end
-
-.Todd:
- farwritetext UnknownText_0x176e9c
- buttonsound
- end
-
-.Arnie:
- farwritetext UnknownText_0x64a13
- buttonsound
- end
-
-.Alan:
- farwritetext UnknownText_0x64cf3
- buttonsound
- end
-
-.Chad:
- farwritetext UnknownText_0x65318
- buttonsound
- end
-
-.Derek:
- farwritetext UnknownText_0x65b29
- buttonsound
- end
-
-.Tully:
- farwritetext UnknownText_0x65e42
- buttonsound
- end
-
-.Brent:
- farwritetext UnknownText_0x6613c
- buttonsound
- end
-
-.Vance:
- farwritetext UnknownText_0x669b2
- buttonsound
- end
-
-.Wilton:
- farwritetext UnknownText_0x66b3e
- buttonsound
- end
-
-.Parry:
- farwritetext UnknownText_0x66fc0
- buttonsound
- end
-
-UnknownScript_0xa0226:
- checkcode VAR_CALLERID
- if_equal PHONE_POKEFAN_BEVERLY, .Beverly
- if_equal PHONE_COOLTRAINERF_BETH, .Beth
- if_equal PHONE_COOLTRAINERF_REENA, .Reena
- if_equal PHONE_PICNICKER_LIZ, .Liz
- if_equal PHONE_PICNICKER_GINA, .Gina
- if_equal PHONE_LASS_DANA, .Dana
- if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
- if_equal PHONE_PICNICKER_ERIN, .Erin
-
-.Beverly:
- farwritetext UnknownText_0x1746c3
- buttonsound
- end
-
-.Beth:
- farwritetext UnknownText_0x174cf6
- buttonsound
- end
-
-.Reena:
- farwritetext UnknownText_0x17536b
- buttonsound
- end
-
-.Liz:
- farwritetext UnknownText_0x17602d
- buttonsound
- end
-
-.Gina:
- farwritetext UnknownText_0x177237
- buttonsound
- end
-
-.Dana:
- farwritetext UnknownText_0x64fb2
- buttonsound
- end
-
-.Tiffany:
- farwritetext UnknownText_0x66605
- buttonsound
- end
-
-.Erin:
- farwritetext UnknownText_0x671a4
- buttonsound
- end
-
-UnknownScript_0xa0278:
- checkcode VAR_CALLERID
- if_equal PHONE_SCHOOLBOY_JACK, .Jack
- if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
- if_equal PHONE_BIRDKEEPER_JOSE, .Jose
- if_equal PHONE_YOUNGSTER_JOEY, .Joey
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_FISHER_RALPH, .Ralph
- if_equal PHONE_HIKER_ANTHONY, .Anthony
- if_equal PHONE_CAMPER_TODD, .Todd
- if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
- if_equal PHONE_SCHOOLBOY_ALAN, .Alan
- if_equal PHONE_SCHOOLBOY_CHAD, .Chad
- if_equal PHONE_POKEFANM_DEREK, .Derek
- if_equal PHONE_FISHER_TULLY, .Tully
- if_equal PHONE_POKEMANIAC_BRENT, .Brent
- if_equal PHONE_BIRDKEEPER_VANCE, .Vance
- if_equal PHONE_FISHER_WILTON, .Wilton
- if_equal PHONE_HIKER_PARRY, .Parry
-
-.Jack:
- farwritetext UnknownText_0x174165
- buttonsound
- end
-
-.Gaven:
- farwritetext UnknownText_0x174b2d
- buttonsound
- end
-
-.Jose:
- farwritetext UnknownText_0x174ffd
- buttonsound
- end
-
-.Joey:
- farwritetext UnknownText_0x175611
- buttonsound
- end
-
-.Wade:
- farwritetext UnknownText_0x1758e4
- buttonsound
- end
-
-.Ralph:
- farwritetext UnknownText_0x175c9f
- buttonsound
- end
-
-.Anthony:
- farwritetext UnknownText_0x176b45
- buttonsound
- end
-
-.Todd:
- farwritetext UnknownText_0x176eee
- buttonsound
- end
-
-.Arnie:
- farwritetext UnknownText_0x64a71
- buttonsound
- end
-
-.Alan:
- farwritetext UnknownText_0x64d4f
- buttonsound
- end
-
-.Chad:
- farwritetext UnknownText_0x65399
- buttonsound
- end
-
-.Derek:
- farwritetext UnknownText_0x65bc8
- buttonsound
- end
-
-.Tully:
- farwritetext UnknownText_0x65eac
- buttonsound
- end
-
-.Brent:
- farwritetext UnknownText_0x6618c
- buttonsound
- end
-
-.Vance:
- farwritetext UnknownText_0x669ed
- buttonsound
- end
-
-.Wilton:
- farwritetext UnknownText_0x66b8f
- buttonsound
- end
-
-.Parry:
- farwritetext UnknownText_0x67001
- buttonsound
- end
-
-UnknownScript_0xa0324:
- checkcode VAR_CALLERID
- if_equal PHONE_POKEFAN_BEVERLY, .Beverly
- if_equal PHONE_COOLTRAINERF_BETH, .Beth
- if_equal PHONE_COOLTRAINERF_REENA, .Reena
- if_equal PHONE_PICNICKER_LIZ, .Liz
- if_equal PHONE_PICNICKER_GINA, .Gina
- if_equal PHONE_LASS_DANA, .Dana
- if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
- if_equal PHONE_PICNICKER_ERIN, .Erin
-
-.Beverly:
- farwritetext UnknownText_0x174734
- buttonsound
- end
-
-.Beth:
- farwritetext UnknownText_0x174d86
- buttonsound
- end
-
-.Reena:
- farwritetext UnknownText_0x1753c5
- buttonsound
- end
-
-.Liz:
- farwritetext UnknownText_0x176095
- buttonsound
- end
-
-.Gina:
- farwritetext UnknownText_0x177297
- buttonsound
- end
-
-.Dana:
- farwritetext UnknownText_0x6501c
- buttonsound
- end
-
-.Tiffany:
- farwritetext UnknownText_0x66688
- buttonsound
- end
-
-.Erin:
- farwritetext UnknownText_0x671eb
- buttonsound
- end
-
-UnknownScript_0xa0376:
- farscall PhoneScript_RematchText_Male
- farjump PhoneScript_HangupText_Male
-
-UnknownScript_0xa037e:
- farscall PhoneScript_RematchText_Female
- farjump PhoneScript_HangupText_Female
-
-PhoneScript_RematchText_Male:
- checkcode VAR_CALLERID
- if_equal PHONE_SCHOOLBOY_JACK, .Jack
- if_equal PHONE_SAILOR_HUEY, .Huey
- if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
- if_equal PHONE_BIRDKEEPER_JOSE, .Jose
- if_equal PHONE_YOUNGSTER_JOEY, .Joey
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_FISHER_RALPH, .Ralph
- if_equal PHONE_HIKER_ANTHONY, .Anthony
- if_equal PHONE_CAMPER_TODD, .Todd
- if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
- if_equal PHONE_SCHOOLBOY_ALAN, .Alan
- if_equal PHONE_SCHOOLBOY_CHAD, .Chad
- if_equal PHONE_FISHER_TULLY, .Tully
- if_equal PHONE_POKEMANIAC_BRENT, .Brent
- if_equal PHONE_BIRDKEEPER_VANCE, .Vance
- if_equal PHONE_FISHER_WILTON, .Wilton
- if_equal PHONE_HIKER_PARRY, .Parry
-
-.Jack:
- farwritetext UnknownText_0x1741e1
- buttonsound
- end
-
-.Huey:
- farwritetext UnknownText_0x1748ea
- buttonsound
- end
-
-.Gaven:
- farwritetext UnknownText_0x174bc5
- buttonsound
- end
-
-.Jose:
- farwritetext UnknownText_0x17507d
- buttonsound
- end
-
-.Joey:
- farwritetext UnknownText_0x175693
- buttonsound
- end
-
-.Wade:
- farwritetext UnknownText_0x175976
- buttonsound
- end
-
-.Ralph:
- farwritetext UnknownText_0x175d40
- buttonsound
- end
-
-.Anthony:
- farwritetext UnknownText_0x176bee
- buttonsound
- end
-
-.Todd:
- farwritetext UnknownText_0x176f60
- buttonsound
- end
-
-.Arnie:
- farwritetext UnknownText_0x64ada
- buttonsound
- end
-
-.Alan:
- farwritetext UnknownText_0x64da4
- buttonsound
- end
-
-.Chad:
- farwritetext UnknownText_0x65419
- buttonsound
- end
-
-.Tully:
- farwritetext UnknownText_0x65f17
- buttonsound
- end
-
-.Brent:
- farwritetext UnknownText_0x66214
- buttonsound
- end
-
-.Vance:
- farwritetext UnknownText_0x66a3a
- buttonsound
- end
-
-.Wilton:
- farwritetext UnknownText_0x66bf3
- buttonsound
- end
-
-.Parry:
- farwritetext UnknownText_0x67096
- buttonsound
- end
-
-PhoneScript_RematchText_Female:
- checkcode VAR_CALLERID
- if_equal PHONE_COOLTRAINERF_BETH, .Beth
- if_equal PHONE_COOLTRAINERF_REENA, .Reena
- if_equal PHONE_PICNICKER_LIZ, .Liz
- if_equal PHONE_PICNICKER_GINA, .Gina
- if_equal PHONE_LASS_DANA, .Dana
- if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
- if_equal PHONE_PICNICKER_ERIN, .Erin
-
-.Beth:
- farwritetext UnknownText_0x174e4e
- buttonsound
- end
-
-.Reena:
- farwritetext UnknownText_0x17543a
- buttonsound
- end
-
-.Liz:
- farwritetext UnknownText_0x17610a
- buttonsound
- end
-
-.Gina:
- farwritetext UnknownText_0x1772e2
- buttonsound
- end
-
-.Dana:
- farwritetext UnknownText_0x65091
- buttonsound
- end
-
-.Tiffany:
- farwritetext UnknownText_0x66730
- buttonsound
- end
-
-.Erin:
- farwritetext UnknownText_0x6722e
- buttonsound
- end
-
-UnknownScript_0xa047a:
- farwritetext UnknownText_0x1761a7
- end
-
-UnknownScript_0xa047f:
- farwritetext UnknownText_0x66796
- end
-
-PhoneScript_HangupText_Male:
- checkcode VAR_CALLERID
- if_equal PHONE_SCHOOLBOY_JACK, .Jack
- if_equal PHONE_SAILOR_HUEY, .Huey
- if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
- if_equal PHONE_BIRDKEEPER_JOSE, .Jose
- if_equal PHONE_YOUNGSTER_JOEY, .Joey
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_FISHER_RALPH, .Ralph
- if_equal PHONE_HIKER_ANTHONY, .Anthony
- if_equal PHONE_CAMPER_TODD, .Todd
- if_equal PHONE_JUGGLER_IRWIN, .Irwin
- if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
- if_equal PHONE_SCHOOLBOY_ALAN, .Alan
- if_equal PHONE_SCHOOLBOY_CHAD, .Chad
- if_equal PHONE_POKEFANM_DEREK, .Derek
- if_equal PHONE_FISHER_TULLY, .Tully
- if_equal PHONE_POKEMANIAC_BRENT, .Brent
- if_equal PHONE_BIRDKEEPER_VANCE, .Vance
- if_equal PHONE_FISHER_WILTON, .Wilton
- if_equal PHONE_BLACKBELT_KENJI, .Kenji
- if_equal PHONE_HIKER_PARRY, .Parry
-
-.Jack:
- farwritetext UnknownText_0x174251
- end
-
-.Huey:
- farwritetext UnknownText_0x174962
- end
-
-.Gaven:
- farwritetext UnknownText_0x174c0e
- end
-
-.Jose:
- farwritetext UnknownText_0x175106
- end
-
-.Joey:
- farwritetext UnknownText_0x17570a
- end
-
-.Wade:
- farwritetext UnknownText_0x1759e7
- end
-
-.Ralph:
- farwritetext UnknownText_0x175db7
- end
-
-.Anthony:
- farwritetext UnknownText_0x176c47
- end
-
-.Todd:
- farwritetext UnknownText_0x176fdb
- end
-
-.Irwin:
- farwritetext UnknownText_0x64000
- end
-
-.Arnie:
- farwritetext UnknownText_0x64b48
- end
-
-.Alan:
- farwritetext UnknownText_0x64e1f
- end
-
-.Chad:
- farwritetext UnknownText_0x65471
- end
-
-.Derek:
- farwritetext UnknownText_0x65c4e
- end
-
-.Tully:
- farwritetext UnknownText_0x65f6e
- end
-
-.Brent:
- farwritetext UnknownText_0x662a9
- end
-
-.Vance:
- farwritetext UnknownText_0x66a93
- end
-
-.Wilton:
- farwritetext UnknownText_0x66c58
- end
-
-.Kenji:
- farwritetext UnknownText_0x66dab
- end
-
-.Parry:
- farwritetext UnknownText_0x670eb
- end
-
-PhoneScript_HangupText_Female:
- checkcode VAR_CALLERID
- if_equal PHONE_POKEFAN_BEVERLY, .Beverly
- if_equal PHONE_COOLTRAINERF_BETH, .Beth
- if_equal PHONE_COOLTRAINERF_REENA, .Reena
- if_equal PHONE_PICNICKER_LIZ, .Liz
- if_equal PHONE_PICNICKER_GINA, .Gina
- if_equal PHONE_LASS_DANA, .Dana
- if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
- if_equal PHONE_PICNICKER_ERIN, .Erin
-
-.Beverly:
- farwritetext UnknownText_0x1747ac
- end
-
-.Beth:
- farwritetext UnknownText_0x174eb7
- end
-
-.Reena:
- farwritetext UnknownText_0x175488
- end
-
-.Liz:
- farwritetext UnknownText_0x17620a
- end
-
-.Gina:
- farwritetext UnknownText_0x177361
- end
-
-.Dana:
- farwritetext UnknownText_0x650e2
- end
-
-.Tiffany:
- farwritetext UnknownText_0x667f7
- end
-
-.Erin:
- farwritetext UnknownText_0x67281
- end
-
-UnknownScript_0xa0584:
- scall UnknownScript_0xa05a0
- iffalse UnknownScript_0xa058e
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xa058e:
- farjump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0592:
- scall UnknownScript_0xa05a0
- iffalse UnknownScript_0xa059c
- farjump UnknownScript_0xa0017
-
-UnknownScript_0xa059c:
- farjump PhoneScript_HangupText_Female
-
-UnknownScript_0xa05a0:
- special RandomPhoneRareWildMon
- end
-
-UnknownScript_0xa05a4:
- checkcode VAR_CALLERID
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_POKEFANM_DEREK, .Derek
-
-.Wade:
- farwritetext UnknownText_0x1759f7
- buttonsound
- jump PhoneScript_HangupText_Male
-
-.Derek:
- farwritetext UnknownText_0x65c66
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa05be:
- farwritetext UnknownText_0x64032
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa05c6:
- farwritetext UnknownText_0x177378
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa05ce:
- farwritetext UnknownText_0x64b5f
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa05d6:
- farwritetext UnknownText_0x175dd9
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa05de:
- farwritetext UnknownText_0x176c61
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa05e6:
- checkcode VAR_CALLERID
- if_equal PHONE_BIRDKEEPER_JOSE, .Jose
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_SCHOOLBOY_ALAN, .Alan
- if_equal PHONE_POKEFANM_DEREK, .Derek
- if_equal PHONE_FISHER_TULLY, .Tully
- if_equal PHONE_FISHER_WILTON, .Wilton
-
-.Jose:
- farwritetext UnknownText_0x175116
- end
-
-.Wade:
- farwritetext UnknownText_0x175a60
- end
-
-.Alan:
- farwritetext UnknownText_0x64e2f
- end
-
-.Derek:
- farwritetext UnknownText_0x65cf9
- end
-
-.Tully:
- farwritetext UnknownText_0x65f88
- end
-
-.Wilton:
- farwritetext UnknownText_0x66c6b
- end
-
-UnknownScript_0xa061e:
- checkcode VAR_CALLERID
- if_equal PHONE_POKEFAN_BEVERLY, .Beverly
- if_equal PHONE_PICNICKER_GINA, .Gina
- if_equal PHONE_LASS_DANA, .Dana
- if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
-
-.Beverly:
- farwritetext UnknownText_0x1747cc
- end
-
-.Gina:
- farwritetext UnknownText_0x1773e7
- end
-
-.Dana:
- farwritetext UnknownText_0x650ec
- end
-
-.Tiffany:
- farwritetext UnknownText_0x66801
- end
-
-UnknownScript_0xa0644:
- farwritetext UnknownText_0x176feb
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa064c:
- farwritetext UnknownText_0x66dc5
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0654:
- random 11
- if_equal 0, UnknownScript_0xa0682
- if_equal 1, UnknownScript_0xa068a
- if_equal 2, UnknownScript_0xa0692
- if_equal 3, UnknownScript_0xa069a
- if_equal 4, UnknownScript_0xa06a2
- if_equal 5, UnknownScript_0xa06aa
- if_equal 6, UnknownScript_0xa06b2
- if_equal 7, UnknownScript_0xa06ba
- if_equal 8, UnknownScript_0xa06c2
- if_equal 9, UnknownScript_0xa06ca
- if_equal 10, UnknownScript_0xa06d2
-
-UnknownScript_0xa0682:
- farwritetext UnknownText_0x174261
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa068a:
- farwritetext UnknownText_0x17429d
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0692:
- farwritetext UnknownText_0x1742ee
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa069a:
- farwritetext UnknownText_0x174340
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa06a2:
- farwritetext UnknownText_0x174391
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa06aa:
- farwritetext UnknownText_0x1743e3
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa06b2:
- farwritetext UnknownText_0x174433
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa06ba:
- farwritetext UnknownText_0x174485
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa06c2:
- farwritetext UnknownText_0x1744d6
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa06ca:
- farwritetext UnknownText_0x174522
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa06d2:
- farwritetext UnknownText_0x174571
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa06da:
- random 10
- if_equal 0, UnknownScript_0xa0704
- if_equal 1, UnknownScript_0xa070c
- if_equal 2, UnknownScript_0xa0714
- if_equal 3, UnknownScript_0xa071c
- if_equal 4, UnknownScript_0xa0724
- if_equal 5, UnknownScript_0xa072c
- if_equal 6, UnknownScript_0xa0734
- if_equal 7, UnknownScript_0xa073c
- if_equal 8, UnknownScript_0xa0744
- if_equal 9, UnknownScript_0xa074c
-
-UnknownScript_0xa0704:
- farwritetext UnknownText_0x176223
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa070c:
- farwritetext UnknownText_0x1762c3
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0714:
- farwritetext UnknownText_0x17638a
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa071c:
- farwritetext UnknownText_0x176424
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0724:
- farwritetext UnknownText_0x1764eb
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa072c:
- farwritetext UnknownText_0x176599
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0734:
- farwritetext UnknownText_0x1766ac
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa073c:
- farwritetext UnknownText_0x17674f
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0744:
- farwritetext UnknownText_0x176816
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa074c:
- farwritetext UnknownText_0x17686d
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0754:
- random 10
- if_equal 0, UnknownScript_0xa077e
- if_equal 1, UnknownScript_0xa0786
- if_equal 2, UnknownScript_0xa078e
- if_equal 3, UnknownScript_0xa0796
- if_equal 4, UnknownScript_0xa079e
- if_equal 5, UnknownScript_0xa07a6
- if_equal 6, UnknownScript_0xa07ae
- if_equal 7, UnknownScript_0xa07b6
- if_equal 8, UnknownScript_0xa07be
- if_equal 9, UnknownScript_0xa07c6
-
-UnknownScript_0xa077e:
- farwritetext UnknownText_0x65481
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0786:
- farwritetext UnknownText_0x654ea
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa078e:
- farwritetext UnknownText_0x65555
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0796:
- farwritetext UnknownText_0x655c7
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa079e:
- farwritetext UnknownText_0x65628
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa07a6:
- farwritetext UnknownText_0x6569b
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa07ae:
- farwritetext UnknownText_0x6574a
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa07b6:
- farwritetext UnknownText_0x65810
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa07be:
- farwritetext UnknownText_0x658c6
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa07c6:
- farwritetext UnknownText_0x65969
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa07ce:
- random 10
- if_equal 0, UnknownScript_0xa07f8
- if_equal 1, UnknownScript_0xa0800
- if_equal 2, UnknownScript_0xa0808
- if_equal 3, UnknownScript_0xa0810
- if_equal 4, UnknownScript_0xa0818
- if_equal 5, UnknownScript_0xa0820
- if_equal 6, UnknownScript_0xa0828
- if_equal 7, UnknownScript_0xa0830
- if_equal 8, UnknownScript_0xa0838
- if_equal 9, UnknownScript_0xa0840
-
-UnknownScript_0xa07f8:
- farwritetext UnknownText_0x662bc
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0800:
- farwritetext UnknownText_0x662fc
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0808:
- farwritetext UnknownText_0x66335
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0810:
- farwritetext UnknownText_0x66366
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0818:
- farwritetext UnknownText_0x663a1
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0820:
- farwritetext UnknownText_0x663e6
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0828:
- farwritetext UnknownText_0x66421
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0830:
- farwritetext UnknownText_0x6645f
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0838:
- farwritetext UnknownText_0x6649b
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0840:
- farwritetext UnknownText_0x664dd
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0848:
- checkevent EVENT_OPENED_MT_SILVER
- iftrue UnknownScript_0xa08e0
- checkevent EVENT_FOUGHT_SNORLAX
- iftrue UnknownScript_0xa08d8
- checkevent EVENT_GOT_PASS_FROM_COPYCAT
- iftrue UnknownScript_0xa08d0
- checkflag ENGINE_MARSHBADGE
- iftrue UnknownScript_0xa08f0
- checkflag ENGINE_FLYPOINT_VERMILION
- iftrue UnknownScript_0xa08c8
- checkevent EVENT_BEAT_ELITE_FOUR
- iftrue UnknownScript_0xa08c0
- checkflag ENGINE_RISINGBADGE
- iftrue UnknownScript_0xa08b8
- checkevent EVENT_CLEARED_RADIO_TOWER
- iftrue UnknownScript_0xa08b0
- checkevent EVENT_CLEARED_ROCKET_HIDEOUT
- iftrue UnknownScript_0xa08a8
- checkevent EVENT_JASMINE_RETURNED_TO_GYM
- iftrue UnknownScript_0xa08a0
- checkflag ENGINE_FOGBADGE
- iftrue UnknownScript_0xa08e8
- checkflag ENGINE_PLAINBADGE
- iftrue UnknownScript_0xa0898
- farwritetext UnknownText_0x646a3
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0898:
- farwritetext UnknownText_0x64099
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa08a0:
- farwritetext UnknownText_0x640e6
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa08a8:
- farwritetext UnknownText_0x6416d
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa08b0:
- farwritetext UnknownText_0x641e8
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa08b8:
- farwritetext UnknownText_0x64247
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa08c0:
- farwritetext UnknownText_0x642bb
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa08c8:
- farwritetext UnknownText_0x643d4
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa08d0:
- farwritetext UnknownText_0x64448
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa08d8:
- farwritetext UnknownText_0x6455b
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa08e0:
- farwritetext UnknownText_0x645ff
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa08e8:
- farwritetext UnknownText_0x646df
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa08f0:
- farwritetext UnknownText_0x647d8
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa08f8:
- farwritetext UnknownText_0x1745c2
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0900:
- farwritetext UnknownText_0x17485b
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0908:
- farwritetext UnknownText_0x17496b
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0910:
- farwritetext UnknownText_0x174c29
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0918:
- farwritetext UnknownText_0x174ec5
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0920:
- farwritetext UnknownText_0x17519b
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0928:
- farwritetext UnknownText_0x17549b
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0930:
- farwritetext UnknownText_0x17571d
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0938:
- farwritetext UnknownText_0x175abe
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0940:
- farwritetext UnknownText_0x175eaf
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0948:
- farwritetext UnknownText_0x1768b0
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0950:
- farwritetext UnknownText_0x176d32
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0958:
- farwritetext UnknownText_0x1770fb
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0960:
- farwritetext UnknownText_0x177465
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0968:
- farwritetext UnknownText_0x64bc6
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0970:
- farwritetext UnknownText_0x64e90
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0978:
- farwritetext UnknownText_0x65161
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0980:
- farwritetext UnknownText_0x65a23
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0988:
- farwritetext UnknownText_0x65d5c
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0990:
- farwritetext UnknownText_0x65ff2
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0998:
- farwritetext UnknownText_0x6651e
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa09a0:
- farwritetext UnknownText_0x66882
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa09a8:
- farwritetext UnknownText_0x66aa5
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa09b0:
- farwritetext UnknownText_0x66ca7
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa09b8:
- farwritetext UnknownText_0x67106
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa09c0:
- farwritetext UnknownText_0x67294
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa09c8:
- random 3
- if_equal 0, UnknownScript_0xa09d6
- if_equal 1, UnknownScript_0xa09de
- if_equal 2, UnknownScript_0xa09e6
-
-UnknownScript_0xa09d6:
- farwritetext UnknownText_0x64846
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa09de:
- farwritetext UnknownText_0x64881
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa09e6:
- farwritetext UnknownText_0x648dc
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa09ee:
- checkcode VAR_KENJI_BREAK
- if_equal 2, UnknownScript_0xa0a00
- if_equal 1, UnknownScript_0xa0a08
- farwritetext UnknownText_0x66e17
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0a00:
- farwritetext UnknownText_0x66e67
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0a08:
- checkmorn
- iftrue UnknownScript_0xa0a1d
- checknite
- iftrue UnknownScript_0xa0a25
- setevent EVENT_KENJI_ON_BREAK
- farwritetext UnknownText_0x66f11
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0a1d:
- farwritetext UnknownText_0x66ed3
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0a25:
- farwritetext UnknownText_0x66f52
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0a2d:
- farwritetext UnknownText_0x174638
- end
-
-UnknownScript_0xa0a32:
- farwritetext UnknownText_0x1749c7
- end
-
-UnknownScript_0xa0a37:
- farwritetext UnknownText_0x174c49
- end
-
-UnknownScript_0xa0a3c:
- farwritetext UnknownText_0x174ee2
- end
-
-UnknownScript_0xa0a41:
- farwritetext UnknownText_0x17520a
- end
-
-UnknownScript_0xa0a46:
- farwritetext UnknownText_0x1754e5
- end
-
-UnknownScript_0xa0a4b:
- farwritetext UnknownText_0x175786
- end
-
-UnknownScript_0xa0a50:
- farwritetext UnknownText_0x175b1e
- end
-
-UnknownScript_0xa0a55:
- farwritetext UnknownText_0x175f11
- end
-
-UnknownScript_0xa0a5a:
- farwritetext UnknownText_0x1769da
- end
-
-UnknownScript_0xa0a5f:
- farwritetext UnknownText_0x176d85
- end
-
-UnknownScript_0xa0a64:
- farwritetext UnknownText_0x177138
- end
-
-UnknownScript_0xa0a69:
- farwritetext UnknownText_0x1774c1
- end
-
-UnknownScript_0xa0a6e:
- farwritetext UnknownText_0x64c13
- end
-
-UnknownScript_0xa0a73:
- farwritetext UnknownText_0x64ed4
- end
-
-UnknownScript_0xa0a78:
- farwritetext UnknownText_0x651bf
- end
-
-UnknownScript_0xa0a7d:
- farwritetext UnknownText_0x65a63
- end
-
-UnknownScript_0xa0a82:
- farwritetext UnknownText_0x66043
- end
-
-UnknownScript_0xa0a87:
- farwritetext UnknownText_0x66579
- end
-
-UnknownScript_0xa0a8c:
- farwritetext UnknownText_0x668a3
- end
-
-UnknownScript_0xa0a91:
- farwritetext UnknownText_0x66ad1
- end
-
-UnknownScript_0xa0a96:
- farwritetext UnknownText_0x66cf7
- end
-
-UnknownScript_0xa0a9b:
- farwritetext UnknownText_0x6712a
- end
-
-UnknownScript_0xa0aa0:
- farwritetext UnknownText_0x672d5
- end
-
-UnknownScript_0xa0aa5:
- farwritetext UnknownText_0x174895
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0aad:
- farwritetext UnknownText_0x17529c
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0ab5:
- farwritetext UnknownText_0x175b6d
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0abd:
- farwritetext UnknownText_0x17750e
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0ac5:
- farwritetext UnknownText_0x64f1a
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0acd:
- farwritetext UnknownText_0x6520f
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0ad5:
- farwritetext UnknownText_0x65da6
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0add:
- farwritetext UnknownText_0x66087
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0ae5:
- farwritetext UnknownText_0x6691d
- buttonsound
- jump PhoneScript_HangupText_Female
-
-UnknownScript_0xa0aed:
- farwritetext UnknownText_0x66d45
- buttonsound
- jump PhoneScript_HangupText_Male
-
-UnknownScript_0xa0af5:
- farwritetext UnknownText_0x175f70
- end
-
-UnknownScript_0xa0afa:
- farwritetext UnknownText_0x176dd1
- end
-
-UnknownScript_0xa0aff:
- farwritetext UnknownText_0x64c5a
- end
-
-UnknownScript_0xa0b04:
- farwritetext UnknownText_0x17717c
- end
-
-BikeShopPhoneScript:
- farwritetext UnknownText_0x174000
- clearflag ENGINE_BIKE_SHOP_CALL_ENABLED
- specialphonecall SPECIALCALL_NONE
- end
diff --git a/engine/move_mon.asm b/engine/move_mon.asm
index e07237d68..4ee283e3e 100755
--- a/engine/move_mon.asm
+++ b/engine/move_mon.asm
@@ -136,7 +136,7 @@ endr
push de
ld a, [CurPartyLevel]
ld d, a
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
pop de
ld a, [hProduct + 1]
ld [de], a
@@ -160,7 +160,7 @@ endr
and $f
jr z, .generateDVs
push hl
- callba GetTrainerDVs
+ farcall GetTrainerDVs
pop hl
jr .initializetrainermonstats
@@ -312,7 +312,7 @@ endr
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
predef GetUnownLetter
- callab UpdateUnownDex
+ callfar UpdateUnownDex
.done
scf ; When this function returns, the carry flag indicates success vs failure.
@@ -423,7 +423,7 @@ AddTempmonToParty: ; da96
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
predef GetUnownLetter
- callab UpdateUnownDex
+ callfar UpdateUnownDex
ld a, [wFirstUnownSeen]
and a
jr nz, .done
@@ -446,9 +446,9 @@ SentGetPkmnIntoFromBox: ; db3f
ld a, [wPokemonWithdrawDepositParameter]
and a
jr z, .check_IfPartyIsFull
- cp DAYCARE_WITHDRAW
+ cp DAY_CARE_WITHDRAW
jr z, .check_IfPartyIsFull
- cp DAYCARE_DEPOSIT
+ cp DAY_CARE_DEPOSIT
ld hl, wBreedMon1Species
jr z, .breedmon
@@ -473,7 +473,7 @@ SentGetPkmnIntoFromBox: ; db3f
ld b, 0
add hl, bc
ld a, [wPokemonWithdrawDepositParameter]
- cp DAYCARE_WITHDRAW
+ cp DAY_CARE_WITHDRAW
ld a, [wBreedMon1Species]
jr z, .okay1
ld a, [CurPartySpecies]
@@ -504,7 +504,7 @@ SentGetPkmnIntoFromBox: ; db3f
ld hl, sBoxMon1Species
ld bc, BOXMON_STRUCT_LENGTH
jr z, .okay3
- cp DAYCARE_WITHDRAW
+ cp DAY_CARE_WITHDRAW
ld hl, wBreedMon1Species
jr z, .okay4
ld hl, PartyMon1Species
@@ -518,7 +518,7 @@ SentGetPkmnIntoFromBox: ; db3f
ld bc, BOXMON_STRUCT_LENGTH
call CopyBytes
ld a, [wPokemonWithdrawDepositParameter]
- cp DAYCARE_DEPOSIT
+ cp DAY_CARE_DEPOSIT
ld de, wBreedMon1OT
jr z, .okay5
dec a
@@ -540,7 +540,7 @@ SentGetPkmnIntoFromBox: ; db3f
and a
jr z, .okay7
ld hl, wBreedMon1OT
- cp DAYCARE_WITHDRAW
+ cp DAY_CARE_WITHDRAW
jr z, .okay8
ld hl, PartyMonOT
@@ -552,7 +552,7 @@ SentGetPkmnIntoFromBox: ; db3f
ld bc, NAME_LENGTH
call CopyBytes
ld a, [wPokemonWithdrawDepositParameter]
- cp DAYCARE_DEPOSIT
+ cp DAY_CARE_DEPOSIT
ld de, wBreedMon1Nick
jr z, .okay9
dec a
@@ -574,7 +574,7 @@ SentGetPkmnIntoFromBox: ; db3f
and a
jr z, .okay11
ld hl, wBreedMon1Nick
- cp DAYCARE_WITHDRAW
+ cp DAY_CARE_WITHDRAW
jr z, .okay12
ld hl, PartyMonNicknames
@@ -590,7 +590,7 @@ SentGetPkmnIntoFromBox: ; db3f
ld a, [wPokemonWithdrawDepositParameter]
cp PC_DEPOSIT
jr z, .took_out_of_box
- cp DAYCARE_DEPOSIT
+ cp DAY_CARE_DEPOSIT
jp z, .CloseSRAM_And_ClearCarryFlag
push hl
@@ -598,7 +598,7 @@ SentGetPkmnIntoFromBox: ; db3f
add $2
ld [MonType], a
predef CopyPkmnToTempMon
- callab CalcLevel
+ callfar CalcLevel
ld a, d
ld [CurPartyLevel], a
pop hl
@@ -708,7 +708,7 @@ RestorePPofDepositedPokemon: ; dcb6
push bc
push hl
push de
- callba GetMaxPPOfMove
+ farcall GetMaxPPOfMove
pop de
pop hl
ld a, [wd265]
@@ -732,7 +732,7 @@ RestorePPofDepositedPokemon: ; dcb6
ret
; dd21
-RetrievePokemonFromDaycareMan: ; dd21
+RetrievePokemonFromDayCareMan: ; dd21
ld a, [wBreedMon1Species]
ld [CurPartySpecies], a
ld de, SFX_TRANSACTION
@@ -748,7 +748,7 @@ RetrievePokemonFromDaycareMan: ; dd21
jp Functiondd64
; dd42
-RetrievePokemonFromDaycareLady: ; dd42
+RetrievePokemonFromDayCareLady: ; dd42
ld a, [wBreedMon2Species]
ld [CurPartySpecies], a
ld de, SFX_TRANSACTION
@@ -844,10 +844,10 @@ Functiondd64: ; dd64
ld a, [PartyCount]
dec a
ld [CurPartyMon], a
- callba HealPartyMon
+ farcall HealPartyMon
ld a, [CurPartyLevel]
ld d, a
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
pop bc
ld hl, $8
add hl, bc
@@ -872,7 +872,7 @@ Functionde1a: ; de1a
ret
; de2a
-DepositMonWithDaycareMan: ; de2a
+DepositMonWithDayCareMan: ; de2a
ld de, wBreedMon1Nick
call DepositBreedmon
xor a
@@ -880,7 +880,7 @@ DepositMonWithDaycareMan: ; de2a
jp RemoveMonFromPartyOrBox
; de37
-DepositMonWithDaycareLady: ; de37
+DepositMonWithDayCareLady: ; de37
ld de, wBreedMon2Nick
call DepositBreedmon
xor a
@@ -961,7 +961,7 @@ SentPkmnIntoBox: ; de6e
push de
ld a, [CurPartyLevel]
ld d, a
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
pop de
ld a, [hProduct + 1]
ld [de], a
@@ -1011,7 +1011,7 @@ SentPkmnIntoBox: ; de6e
jr nz, .not_unown
ld hl, sBoxMon1DVs
predef GetUnownLetter
- callab UpdateUnownDex
+ callfar UpdateUnownDex
.not_unown
ld hl, sBoxMon1Moves
@@ -1089,8 +1089,8 @@ ShiftBoxMon: ; df47
GiveEgg:: ; df8c
ld a, [CurPartySpecies]
push af
- callab GetPreEvolution
- callab GetPreEvolution
+ callfar GetPreEvolution
+ callfar GetPreEvolution
ld a, [CurPartySpecies]
dec a
@@ -1433,7 +1433,7 @@ CalcPkmnStatC: ; e17b
ld a, [hld]
ld e, a
ld d, [hl]
- callba GetSquareRoot
+ farcall GetSquareRoot
pop de
.no_stat_exp
@@ -1543,7 +1543,7 @@ CalcPkmnStatC: ; e17b
call Divide
ld a, c
cp STAT_HP
- ld a, 5
+ ld a, STAT_MIN_NORMAL
jr nz, .not_hp
ld a, [CurPartyLevel]
ld b, a
@@ -1556,7 +1556,7 @@ CalcPkmnStatC: ; e17b
ld [hMultiplicand + 1], a
.no_overflow_3
- ld a, 10
+ ld a, STAT_MIN_HP
.not_hp
ld b, a
@@ -1579,9 +1579,9 @@ CalcPkmnStatC: ; e17b
jr c, .stat_value_okay
.max_stat
- ld a, 999 / $100
+ ld a, MAX_STAT_VALUE / $100
ld [hMultiplicand + 1], a
- ld a, 999 % $100
+ ld a, MAX_STAT_VALUE % $100
ld [hMultiplicand + 2], a
.stat_value_okay
@@ -1625,7 +1625,7 @@ GivePoke:: ; e277
.failed
ld a, [CurPartySpecies]
ld [TempEnemyMonSpecies], a
- callab LoadEnemyMon
+ callfar LoadEnemyMon
call SentPkmnIntoBox
jp nc, .FailedToGiveMon
ld a, BOXMON
@@ -1706,7 +1706,7 @@ GivePoke:: ; e277
ld [hli], a
ld [hl], 01001 % $100
pop bc
- callba SetGiftPartyMonCaughtData
+ farcall SetGiftPartyMonCaughtData
jr .skip_nickname
.send_to_box
@@ -1730,7 +1730,7 @@ GivePoke:: ; e277
call Random
ld [hl], a
call CloseSRAM
- callba SetGiftBoxMonCaughtData
+ farcall SetGiftBoxMonCaughtData
jr .skip_nickname
.wildmon
@@ -1741,13 +1741,13 @@ GivePoke:: ; e277
ld a, b
and a
jr z, .party
- callba SetBoxMonCaughtData
+ farcall SetBoxMonCaughtData
jr .set_caught_data
.party
- callba SetCaughtData
+ farcall SetCaughtData
.set_caught_data
- callba GiveANickname_YesNo
+ farcall GiveANickname_YesNo
pop de
jr c, .skip_nickname
call InitNickname
@@ -1791,7 +1791,7 @@ InitNickname: ; e3de
pop de
push de
ld b, $0
- callba NamingScreen
+ farcall NamingScreen
pop hl
ld de, StringBuffer1
call InitName
diff --git a/engine/move_mon_wo_mail.asm b/engine/move_mon_wo_mail.asm
index d3b4e78a5..c96823d28 100755
--- a/engine/move_mon_wo_mail.asm
+++ b/engine/move_mon_wo_mail.asm
@@ -34,7 +34,7 @@ InsertPokemonIntoBox: ; 51322
call CopyBytes
ld a, [CurPartyMon]
ld b, a
- callba RestorePPofDepositedPokemon
+ farcall RestorePPofDepositedPokemon
jp CloseSRAM
InsertPokemonIntoParty: ; 5138b
diff --git a/engine/movement.asm b/engine/movement.asm
index 7b58e4023..66c501909 100644
--- a/engine/movement.asm
+++ b/engine/movement.asm
@@ -1,4 +1,5 @@
MovementPointers: ; 5075
+; entries correspond to macros/movement.asm enumeration
dw Movement_turn_head_down ; 00
dw Movement_turn_head_up ; 01
dw Movement_turn_head_left ; 02
@@ -59,8 +60,8 @@ MovementPointers: ; 5075
dw Movement_set_sliding ; 39
dw Movement_remove_fixed_facing ; 3a
dw Movement_fix_facing ; 3b
- dw Movement_show_person ; 3c
- dw Movement_hide_person ; 3d
+ dw Movement_show_object ; 3c
+ dw Movement_hide_object ; 3d
dw Movement_step_sleep_1 ; 3e
dw Movement_step_sleep_2 ; 3f
dw Movement_step_sleep_3 ; 40
@@ -72,7 +73,7 @@ MovementPointers: ; 5075
dw Movement_step_sleep ; 46
dw Movement_step_end ; 47
dw Movement_48 ; 48
- dw Movement_remove_person ; 49
+ dw Movement_remove_object ; 49
dw Movement_step_loop ; 4a
dw Movement_4b ; 4b
dw Movement_teleport_from ; 4c
@@ -129,7 +130,7 @@ Movement_step_dig: ; 5145
ld [hl], a
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_SPIN
+ ld [hl], OBJECT_ACTION_SPIN
call JumpMovementPointer
ld hl, OBJECT_STEP_DURATION
add hl, bc
@@ -166,7 +167,7 @@ Movement_return_dig: ; 516a
Movement_fish_got_bite: ; 5189
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_FISHING
+ ld [hl], OBJECT_ACTION_FISHING
ld hl, OBJECT_STEP_TYPE
add hl, bc
ld [hl], STEP_TYPE_GOT_BITE
@@ -180,7 +181,7 @@ Movement_rock_smash: ; 5196
ld [hl], a
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STAND
+ ld [hl], OBJECT_ACTION_STAND
ld hl, OBJECT_STEP_TYPE
add hl, bc
ld [hl], STEP_TYPE_ROCK_SMASH
@@ -190,7 +191,7 @@ Movement_rock_smash: ; 5196
Movement_fish_cast_rod: ; 51ab
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_FISHING
+ ld [hl], OBJECT_ACTION_FISHING
ld hl, OBJECT_STEP_TYPE
add hl, bc
ld [hl], STEP_TYPE_SLEEP
@@ -247,7 +248,7 @@ Movement_48: ; 51db
ret
; 51fd
-Movement_remove_person: ; 51fd
+Movement_remove_object: ; 51fd
call DeleteMapObject
ld hl, wObjectFollow_Leader
ld a, [hMapObjectIndexBuffer]
@@ -264,7 +265,7 @@ Movement_remove_person: ; 51fd
Movement_4b: ; 5210
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STAND
+ ld [hl], OBJECT_ACTION_STAND
ld hl, OBJECT_STEP_TYPE
add hl, bc
@@ -325,7 +326,7 @@ Movement_step_sleep_common: ; 5247
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STAND
+ ld [hl], OBJECT_ACTION_STAND
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
@@ -345,7 +346,7 @@ Movement_step_bump: ; 525f
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_BUMP
+ ld [hl], OBJECT_ACTION_BUMP
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
@@ -365,7 +366,7 @@ Movement_tree_shake: ; 5279
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_WEIRD_TREE
+ ld [hl], OBJECT_ACTION_WEIRD_TREE
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
@@ -401,14 +402,14 @@ Movement_fix_facing: ; 52ae
jp ContinueReadingMovement
; 52b7
-Movement_show_person: ; 52b7
+Movement_show_object: ; 52b7
ld hl, OBJECT_FLAGS1
add hl, bc
res INVISIBLE, [hl]
jp ContinueReadingMovement
; 52c0
-Movement_hide_person: ; 52c0
+Movement_hide_object: ; 52c0
ld hl, OBJECT_FLAGS1
add hl, bc
set INVISIBLE, [hl]
@@ -457,7 +458,7 @@ TurnHead: ; 52ee
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STAND
+ ld [hl], OBJECT_ACTION_STAND
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
@@ -732,7 +733,7 @@ TurnStep: ; 5400
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STEP
+ ld [hl], OBJECT_ACTION_STEP
ld hl, OBJECT_STEP_TYPE
add hl, bc
@@ -745,7 +746,7 @@ NormalStep: ; 5412
call UpdateTallGrassFlags
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STEP
+ ld [hl], OBJECT_ACTION_STEP
ld hl, OBJECT_NEXT_TILE
add hl, bc
@@ -783,7 +784,7 @@ TurningStep: ; 5446
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_SPIN
+ ld [hl], OBJECT_ACTION_SPIN
ld hl, wCenteredObject
ld a, [hMapObjectIndexBuffer]
@@ -809,7 +810,7 @@ SlideStep: ; 5468
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STAND
+ ld [hl], OBJECT_ACTION_STAND
ld hl, wCenteredObject
ld a, [hMapObjectIndexBuffer]
@@ -841,7 +842,7 @@ JumpStep: ; 548a
ld hl, OBJECT_ACTION
add hl, bc
- ld [hl], PERSON_ACTION_STEP
+ ld [hl], OBJECT_ACTION_STEP
call SpawnShadow
diff --git a/engine/mystery_gift.asm b/engine/mystery_gift.asm
new file mode 100755
index 000000000..a8bad8935
--- /dev/null
+++ b/engine/mystery_gift.asm
@@ -0,0 +1,1735 @@
+DoMysteryGift: ; 1048ba (41:48ba)
+ call ClearTileMap
+ call ClearSprites
+ call WaitBGMap
+ call InitMysteryGiftLayout
+ hlcoord 3, 8
+ ld de, .String_PressAToLink_BToCancel
+ call PlaceString
+ call WaitBGMap
+ farcall PrepMysteryGiftDataToSend
+ call MysteryGift_ClearTrainerData
+ ld a, $2
+ ld [wca01], a
+ ld a, $14
+ ld [wca02], a
+ ld a, [rIE]
+ push af
+
+ call Function104a95
+
+ ld d, a
+ xor a
+ ld [rIF], a
+ pop af
+ ld [rIE], a
+ push de
+ call ClearTileMap
+ call EnableLCD
+ call WaitBGMap
+ ld b, SCGB_DIPLOMA
+ call GetSGBLayout
+ call SetPalettes
+ pop de
+ hlcoord 2, 8
+ ld a, d
+ ld de, .Text_LinkCanceled ; Link has been canceled
+ cp $10
+ jp z, .LinkCanceled
+ cp $6c
+ jp nz, .CommunicationError
+ ld a, [wc900]
+ cp 3
+ jr z, .skip_checks
+ call .CheckAlreadyGotFiveGiftsToday
+ ld hl, .Text_MaxFiveGifts ; Only 5 gifts a day
+ jp nc, .PrintTextAndExit
+ call .CheckAlreadyGotAGiftFromThatPerson
+ ld hl, .Text_MaxOneGiftPerPerson ; Only one gift a day per person
+ jp c, .PrintTextAndExit
+.skip_checks
+ ld a, [wMysteryGiftPlayerBackupItem]
+ and a
+ jp nz, .GiftWaiting
+ ld a, [wMysteryGiftPartnerBackupItem]
+ and a
+ jp nz, .FriendNotReady
+ ld a, [wc900]
+ cp 3
+ jr z, .skip_append_save
+ call .AddMysteryGiftPartnerID
+ ld a, [wc900]
+ cp 4
+ jr z, .skip_append_save
+ call .SaveMysteryGiftTrainerName
+ farcall RestoreMobileEventIndex
+ farcall TrainerRankings_MysteryGift
+ farcall BackupMobileEventIndex
+.skip_append_save
+ ld a, [wMysteryGiftPartnerSentDeco]
+ and a
+ jr z, .item
+ ld a, [wMysteryGiftPartnerWhichDeco]
+ ld c, a
+ farcall MysteryGiftGetDecoration
+ push bc
+ call MysteryGift_CheckAndSetDecorationAlreadyReceived
+ pop bc
+ jr nz, .item
+ callfar GetDecorationName_c
+ ld h, d
+ ld l, e
+ ld de, StringBuffer1
+ ld bc, ITEM_NAME_LENGTH
+ call CopyBytes
+ ld hl, .Text_SentToHome ; sent decoration to home
+ jr .PrintTextAndExit
+
+.item
+ call GetMysteryGiftBank
+ ld a, [wMysteryGiftPartnerWhichItem]
+ ld c, a
+ farcall MysteryGiftGetItemHeldEffect
+ ld a, c
+ ld [sBackupMysteryGiftItem], a
+ ld [wNamedObjectIndexBuffer], a
+ call CloseSRAM
+ call GetItemName
+ ld hl, .Text_Sent ; sent item
+ jr .PrintTextAndExit
+
+.LinkCanceled: ; 1049af (41:49af)
+ ld hl, .Text_LinkCanceled ; Link has been canceled
+ jr .PrintTextAndExit
+
+.CommunicationError: ; 1049b4 (41:49b4)
+ ld hl, .Text_CommunicationError ; Communication error
+ call PrintText
+ jp DoMysteryGift
+
+.GiftWaiting: ; 1049bd (41:49bd)
+ ld hl, .Text_ReceiveGiftAtCounter ; receive gift at counter
+ jr .PrintTextAndExit
+
+.FriendNotReady: ; 1049c2 (41:49c2)
+ ld hl, .Text_FriendNotReady ; friend not ready
+
+.PrintTextAndExit: ; 1049c5 (41:49c5)
+ call PrintText
+ ld a, $e3
+ ld [rLCDC], a
+ ret
+; 1049cd (41:49cd)
+
+.String_PressAToLink_BToCancel: ; 1049cd
+ db "Press A to"
+ next "link IR-Device"
+ next "Press B to"
+ next "cancel it."
+ db "@"
+; 1049fd
+
+.Text_LinkCanceled: ; 1049fd
+ text_jump UnknownText_0x1c0436
+ db "@"
+; 104a02
+
+.Text_CommunicationError: ; 104a02
+ text_jump UnknownText_0x1c0454
+ db "@"
+; 104a07
+
+.Text_ReceiveGiftAtCounter: ; 104a07
+ text_jump UnknownText_0x1c046a
+ db "@"
+; 104a0c
+
+.Text_FriendNotReady: ; 104a0c
+ text_jump UnknownText_0x1c048e
+ db "@"
+; 104a11
+
+.Text_MaxFiveGifts: ; 104a11
+ text_jump UnknownText_0x1c04a7
+ db "@"
+; 104a16
+
+.Text_MaxOneGiftPerPerson: ; 104a16
+ text_jump UnknownText_0x1c04c6
+ db "@"
+; 104a1b
+
+.Text_Sent: ; 104a1b
+ text_jump UnknownText_0x1c04e9
+ db "@"
+; 104a20
+
+.Text_SentToHome: ; 104a20
+ text_jump UnknownText_0x1c04fa
+ db "@"
+; 104a25
+
+.CheckAlreadyGotFiveGiftsToday: ; 104a25 (41:4a25)
+ call GetMysteryGiftBank
+ ld a, [sNumDailyMysteryGiftPartnerIDs]
+ cp $5
+ jp CloseSRAM
+
+.CheckAlreadyGotAGiftFromThatPerson: ; 104a30 (41:4a30)
+ call GetMysteryGiftBank
+ ld a, [wMysteryGiftPartnerID]
+ ld b, a
+ ld a, [wMysteryGiftPartnerID + 1]
+ ld c, a
+ ld a, [sNumDailyMysteryGiftPartnerIDs]
+ ld d, a
+ ld hl, sDailyMysteryGiftPartnerIDs
+.loop
+ ld a, d
+ and a
+ jr z, .No
+ ld a, [hli]
+ cp b
+ jr nz, .skip
+ ld a, [hl]
+ cp c
+ jr z, .Yes
+.skip
+ inc hl
+ dec d
+ jr .loop
+.Yes:
+ scf
+.No:
+ jp CloseSRAM
+
+.AddMysteryGiftPartnerID: ; 104a56 (41:4a56)
+ call GetMysteryGiftBank
+ ld hl, sNumDailyMysteryGiftPartnerIDs
+ ld a, [hl]
+ inc [hl]
+ ld hl, sDailyMysteryGiftPartnerIDs ; inc hl
+ ld e, a
+ ld d, $0
+ add hl, de
+ add hl, de
+ ld a, [wMysteryGiftPartnerID]
+ ld [hli], a
+ ld a, [wMysteryGiftPartnerID + 1]
+ ld [hl], a
+ jp CloseSRAM
+
+.SaveMysteryGiftTrainerName: ; 104a71 (41:4a71)
+ call GetMysteryGiftBank
+ ld a, $1
+ ld [sMysteryGiftTrainerHouseFlag], a
+ ld hl, wMysteryGiftPartnerName
+ ld de, sMysteryGiftPartnerName
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ ld a, $1
+ ld [de], a
+ inc de
+ ld hl, wMysteryGiftTrainerData
+ ld bc, (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 2
+ call CopyBytes
+ jp CloseSRAM
+
+Function104a95: ; 104a95 (41:4a95)
+ di
+ farcall ClearChannels
+ call Function104d5e
+
+.loop2
+ call Function104d96
+ call Function104ddd
+ ld a, [hMGStatusFlags]
+ cp $10
+ jp z, Function104bd0
+ cp $6c
+ jr nz, .loop2
+
+ ld a, [hPrintNum9]
+ cp $2
+ jr z, Function104b22
+ ld hl, hPrintNum1
+ ld b, $1
+ call Function104d56
+ jr nz, .ly_loop
+ call Function104b49
+ jp nz, Function104bd0
+ jr Function104b0a
+ ; Delay frame
+.ly_loop
+ ld a, [rLY]
+ cp $90
+ jr c, .ly_loop
+ ld c, rRP % $100
+ ld a, $c0
+ ld [$ff00+c], a
+ ld b, 240 ; This might have been intended as a 4-second timeout buffer.
+ ; However, it is reset with each frame.
+.loop3
+ push bc
+ call MysteryGift_ReadJoypad
+
+ ld b, $2
+ ld c, rRP % $100
+ ; Delay frame
+.ly_loop2
+ ld a, [$ff00+c]
+ and b
+ ld b, a
+ ld a, [rLY]
+ cp $90
+ jr nc, .ly_loop2
+.ly_loop3
+ ld a, [$ff00+c]
+ and b
+ ld b, a
+ ld a, [rLY]
+ cp $90
+ jr c, .ly_loop3
+
+ ld a, b
+ pop bc
+ dec b
+ jr z, .loop2 ; we never jump here
+ or a
+ jr nz, .loop2
+ ; Check if we've pressed the B button
+ ld a, [hMGJoypadReleased]
+ bit B_BUTTON_F, a
+ jr z, .loop3
+ ld a, $10
+ ld [hMGStatusFlags], a
+ jp Function104bd0
+
+Function104b04: ; 104b04 (41:4b04)
+ call Function104b40
+ jp nz, Function104bd0
+Function104b0a: ; 104b0a (41:4b0a)
+ call Function104d38
+ jp nz, Function104bd0
+ call Function104b88
+ jp nz, Function104bd0
+ call Function104d43
+ jp nz, Function104bd0
+ call Function105033
+ jp Function104bd0
+
+Function104b22: ; 104b22 (41:4b22)
+ call Function104b88
+ jp nz, Function104bd0
+ call Function104d43
+ jp nz, Function104bd0
+ call Function104b40
+ jp nz, Function104bd0
+ call Function104d38
+ jp nz, Function104bd0
+ call Function10502e
+ jp Function104bd0
+
+Function104b40: ; 104b40 (41:4b40)
+ ld hl, hPrintNum1
+ ld b, $1
+ call Function104d56
+ ret nz
+
+Function104b49: ; 104b49 (41:4b49)
+ call Function105033
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret nz
+ ld a, [hPrintNum1]
+ cp $96
+ jp nz, Function104d32
+ ld a, $90
+ ld [hPrintNum1], a
+ call Function104d38
+ ret nz
+ ld hl, hPrintNum1
+ ld b, $1
+ call Function104d4e
+ ret nz
+ call Function10502e
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret nz
+ call Function104d43
+ ret nz
+ ld hl, wMysteryGiftTrainerData
+ ld a, [wca02]
+ ld b, a
+ call Function104d56
+ ret nz
+ call Function105033
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret
+
+Function104b88: ; 104b88 (41:4b88)
+ ld a, $96
+ ld [hPrintNum1], a
+ ld hl, hPrintNum1
+ ld b, $1
+ call Function104d4e
+ ret nz
+ call Function10502e
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret nz
+ call Function104d43
+ ret nz
+ ld hl, hPrintNum1
+ ld b, $1
+ call Function104d56
+ ret nz
+ call Function105033
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret nz
+ ld a, [hPrintNum1]
+ cp $90
+ jp nz, Function104d32
+ call Function104d38
+ ret nz
+ ld hl, OverworldMap
+ ld a, [wca02]
+ ld b, a
+ call Function104d4e
+ ret nz
+ call Function10502e
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret
+
+Function104bd0: ; 104bd0 (41:4bd0)
+ nop
+ ld a, [hMGStatusFlags]
+ cp $10
+ jr z, .quit
+ cp $6c
+ jr nz, .quit
+ ld hl, wca01
+ dec [hl]
+ jr z, .quit
+ ld hl, wMysteryGiftTrainerData
+ ld de, wMysteryGiftPartnerData
+ ld bc, wMysteryGiftPartnerDataEnd - wMysteryGiftPartnerData
+ call CopyBytes
+ ld a, [wMysteryGiftTrainerData]
+ cp $3
+ jr nc, .quit
+ farcall StagePartyDataForMysteryGift
+ call MysteryGift_ClearTrainerData
+ ld a, $26
+ ld [wca02], a
+ ld a, [hPrintNum9]
+ cp $2
+ jr z, .asm_104c10
+ call Function104d43
+ jr nz, Function104bd0
+ jp Function104b04
+
+.asm_104c10
+ call Function104d38
+ jr nz, Function104bd0
+ jp Function104b22
+
+.quit
+ ld a, [hMGStatusFlags]
+ push af
+ call Function104da0
+ xor a
+ ld [rIF], a
+ ld a, [rIE]
+ or $1
+ ld [rIE], a
+ ei
+ call DelayFrame
+ pop af
+ ret
+
+Function104c2d: ; 104c2d (41:4c2d)
+ di
+ farcall ClearChannels
+ call Function104d5e
+.asm_104c37
+ call Function104d96
+ call Function104ddd
+ ld a, [hMGStatusFlags]
+ cp $10
+ jp z, Function104d1c
+ cp $6c
+ jr nz, .asm_104c37
+ ld a, [hPrintNum9]
+ cp $2
+ jr z, .asm_104c6c
+ call Function104c8a
+ jp nz, Function104d1c
+ call Function104d38
+ jp nz, Function104d1c
+ call Function104cd2
+ jp nz, Function104d1c
+ call Function104d43
+ jp nz, Function104d1c
+ call Function105033
+ jp Function104d1c
+.asm_104c6c
+ call Function104cd2
+ jp nz, Function104d1c
+ call Function104d43
+ jp nz, Function104d1c
+ call Function104c8a
+ jp nz, Function104d1c
+ call Function104d38
+ jp nz, Function104d1c
+ call Function10502e
+ jp Function104d1c
+
+Function104c8a: ; 104c8a (41:4c8a)
+ ld hl, hPrintNum1
+ ld b, $1
+ call Function104d56
+ ret nz
+ call Function105033
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret nz
+ ld a, [hPrintNum1]
+ cp $3c
+ jp nz, Function104d32
+ swap a
+ ld [hPrintNum1], a
+ call Function104d38
+ ret nz
+ ld hl, hPrintNum1
+ ld b, $1
+ call Function104d4e
+ ret nz
+ call Function10502e
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret nz
+ call Function104d43
+ ret nz
+ ld hl, wMysteryGiftTrainerData
+ ld a, [wca02]
+ ld b, a
+ call Function104d56
+ ret nz
+ call Function105033
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret
+
+Function104cd2: ; 104cd2 (41:4cd2)
+ ld a, $3c
+ ld [hPrintNum1], a
+ ld hl, hPrintNum1
+ ld b, $1
+ call Function104d4e
+ ret nz
+ call Function10502e
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret nz
+ call Function104d43
+ ret nz
+ ld hl, hPrintNum1
+ ld b, $1
+ call Function104d56
+ ret nz
+ call Function105033
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret nz
+ ld a, [hPrintNum1]
+ swap a
+ cp $3c
+ jp nz, Function104d32
+ call Function104d38
+ ret nz
+ ld hl, OverworldMap
+ ld a, [wca02]
+ ld b, a
+ call Function104d4e
+ ret nz
+ call Function10502e
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret
+
+Function104d1c: ; 104d1c (41:4d1c)
+ nop
+ ld a, [hMGStatusFlags]
+ push af
+ call Function104da0
+ xor a
+ ld [rIF], a
+ ld a, [rIE]
+ or $1
+ ld [rIE], a
+ ei
+ call DelayFrame
+ pop af
+ ret
+
+Function104d32: ; 104d32 (41:4d32)
+ ld a, $80
+ ld [hMGStatusFlags], a
+ and a
+ ret
+
+Function104d38: ; 104d38 (41:4d38)
+ call Function104d96
+ call Function104e46
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret
+
+Function104d43: ; 104d43 (41:4d43)
+ call Function104d96
+ call Function104dfe
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret
+
+Function104d4e: ; 104d4e (41:4d4e)
+ call Function104e93
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret
+
+Function104d56: ; 104d56 (41:4d56)
+ call Function104f57
+ ld a, [hMGStatusFlags]
+ cp $6c
+ ret
+
+Function104d5e: ; 104d5e (41:4d5e)
+ call Function104d74
+ ld a, $4
+ ld [rIE], a
+ xor a
+ ld [rIF], a
+ call Function104d96
+ xor a
+ ld b, a
+.asm_104d6d
+ inc a
+ jr nz, .asm_104d6d
+ inc b
+ jr nz, .asm_104d6d
+ ret
+
+Function104d74: ; 104d74 (41:4d74)
+ xor a
+ ld [rTAC], a
+ ld a, $fe
+ ld [rTMA], a
+ ld [rTIMA], a
+ ld a, $2
+ ld [rTAC], a
+ or $4
+ ld [rTAC], a
+ ret
+
+Function104d86: ; 104d86 (41:4d86)
+ xor a
+ ld [rTAC], a
+ ld [rTMA], a
+ ld [rTIMA], a
+ ld a, $2
+ ld [rTAC], a
+ or $4
+ ld [rTAC], a
+ ret
+
+Function104d96: ; 104d96 (41:4d96)
+ ld a, $c0
+ call Function104e8c
+ ld a, $1
+ ld [hPrintNum9], a
+ ret
+
+Function104da0: ; 104da0 (41:4da0)
+ xor a
+ call Function104e8c
+ ld a, $2
+ ld [rTAC], a
+ ret
+
+Function104da9: ; 104da9 (41:4da9)
+ inc d
+ ret z
+ xor a
+ ld [rIF], a
+ halt
+ ld a, [$ff00+c]
+ bit 1, a
+ jr z, Function104da9
+ or a
+ ret
+
+Function104db7: ; 104db7 (41:4db7)
+ inc d
+ ret z
+ xor a
+ ld [rIF], a
+ halt
+ ld a, [$ff00+c]
+ bit 1, a
+ jr nz, Function104db7
+ or a
+ ret
+
+Function104dc5: ; 104dc5 (41:4dc5)
+ ld a, $c1
+ ld [$ff00+c], a
+.wait
+ dec d
+ ret z
+ xor a
+ ld [rIF], a
+ halt
+ jr .wait
+
+Function104dd1: ; 104dd1 (41:4dd1)
+ ld a, $c0
+ ld [$ff00+c], a
+.wait
+ dec d
+ ret z
+ xor a
+ ld [rIF], a
+ halt
+ jr .wait
+
+Function104ddd: ; 104ddd (41:4ddd)
+ ld d, $0
+ ld e, d
+ ld a, $1
+ ld [hPrintNum9], a
+.loop
+ call MysteryGift_ReadJoypad
+ ld b, $2
+ ld c, rRP % $100
+ ld a, [hMGJoypadReleased]
+ bit B_BUTTON_F, a
+ jr z, .next
+ ld a, $10
+ ld [hMGStatusFlags], a
+ ret
+
+.next
+ bit 0, a
+ jr nz, Function104e3a
+ ld a, [$ff00+c]
+ and b
+ jr nz, .loop
+
+Function104dfe: ; 104dfe (41:4dfe)
+ ld c, rRP % $100
+ ld d, $0
+ ld e, d
+ call Function104db7
+ jp z, Function104f42
+ ld d, e
+ call Function104da9
+ jp z, Function104f42
+ call Function104db7
+ jp z, Function104f42
+ call Function104da9
+ jp z, Function104f42
+ ld a, $6c
+ ld [hMGStatusFlags], a
+ ld d, $3d
+ call Function104dd1
+ ld d, $5
+ call Function104dc5
+ ld d, $15
+ call Function104dd1
+ ld d, $5
+ call Function104dc5
+ ld d, $5
+ call Function104dd1
+ ret
+
+Function104e3a: ; 104e3a (41:4e3a)
+ ; Wait a random amount of time
+ call Random
+ ld e, a
+ and $f
+ ld d, a
+.loop
+ dec de
+ ld a, d
+ or e
+ jr nz, .loop
+Function104e46: ; 104e46 (41:4e46)
+ ld a, $2
+ ld [hPrintNum9], a
+ ld c, rRP % $100
+ ld d, $0
+ ld e, d
+ ld d, $3d
+ call Function104dd1
+ ld d, $5
+ call Function104dc5
+ ld d, $15
+ call Function104dd1
+ ld d, $5
+ call Function104dc5
+ ld d, $5
+ call Function104dd1
+ ld d, e
+ call Function104db7
+ jp z, Function104f42
+ ld d, e
+ call Function104da9
+ jp z, Function104f42
+ call Function104db7
+ jp z, Function104f42
+ call Function104da9
+ jp z, Function104f42
+ ld d, $3d
+ call Function104dd1
+ ld a, $6c
+ ld [hMGStatusFlags], a
+ ret
+
+Function104e8c: ; 104e8c (41:4e8c)
+ ld [rRP], a
+ ld a, $ff
+ ld [hMGStatusFlags], a
+ ret
+
+Function104e93: ; 104e93 (41:4e93)
+ xor a
+ ld [hPrintNum5], a
+ ld [hPrintNum6], a
+ push hl
+ push bc
+ ld c, rRP % $100
+ ld d, $3d
+ call Function104dd1
+ ld hl, hPrintNum2
+ ld a, $5a
+ ld [hli], a
+ ld [hl], b
+ dec hl
+ ld b, $2
+ call Function104ed6
+ pop bc
+ pop hl
+ call Function104ed6
+ ld a, [hPrintNum5]
+ ld [hPrintNum2], a
+ ld a, [hPrintNum6]
+ ld [hPrintNum3], a
+ push hl
+ ld hl, hPrintNum2
+ ld b, $2
+ call Function104ed6
+ ld hl, hMGStatusFlags
+ ld b, $1
+ call Function104faf
+ ld a, [hPrintNum2]
+ ld [hPrintNum5], a
+ ld a, [hPrintNum3]
+ ld [hPrintNum6], a
+ pop hl
+ ret
+
+Function104ed6: ; 104ed6 (41:4ed6)
+ ld c, rRP % $100
+ ld d, $5
+ call Function104dd1
+ ld d, $5
+ call Function104dc5
+ ld d, $15
+ call Function104dd1
+ ld a, b
+ cpl
+ ld b, a
+ ld a, $f4
+ ld [rTMA], a
+.asm_104eee
+ inc b
+ jr z, .asm_104f2e
+ ld a, $8
+ ld [hPrintNum4], a
+ ld a, [hli]
+ ld e, a
+ ld a, [hPrintNum5]
+ add e
+ ld [hPrintNum5], a
+ ld a, [hPrintNum6]
+ adc $0
+ ld [hPrintNum6], a
+.asm_104f02
+ xor a
+ ld [rIF], a
+ halt
+ ld a, $c1
+ ld [rRP], a
+ ld d, $1
+ ld a, e
+ rlca
+ ld e, a
+ jr nc, .asm_104f13
+ inc d
+.asm_104f13
+ ld a, [rTIMA]
+ cp $f8
+ jr c, .asm_104f13
+ ld a, $c0
+ ld [rRP], a
+ dec d
+ jr z, .asm_104f25
+ xor a
+ ld [rIF], a
+ halt
+.asm_104f25
+ ld a, [hPrintNum4]
+ dec a
+ jr z, .asm_104eee
+ ld [hPrintNum4], a
+ jr .asm_104f02
+.asm_104f2e
+ ld a, $fe
+ ld [rTMA], a
+ xor a
+ ld [rIF], a
+ halt
+ ld d, $5
+ call Function104dc5
+ ld d, $11
+ call Function104dd1
+ ret
+
+Function104f42: ; 104f42 (41:4f42)
+ ld a, [hMGStatusFlags]
+ or $2
+ ld [hMGStatusFlags], a
+ ret
+
+Function104f49: ; 104f49 (41:4f49)
+ ld a, [hMGStatusFlags]
+ or $1
+ ld [hMGStatusFlags], a
+ ret
+
+Function104f50: ; 104f50 (41:4f50)
+ ld a, [hMGStatusFlags]
+ or $80
+ ld [hMGStatusFlags], a
+ ret
+
+Function104f57: ; 104f57 (41:4f57)
+ xor a
+ ld [hPrintNum5], a
+ ld [hPrintNum6], a
+ push bc
+ push hl
+ ld hl, hPrintNum2
+ ld b, $2
+ call Function104faf
+ ld a, [hPrintNum3]
+ ld [hPrintNum8], a
+ ld b, a
+ pop hl
+ pop af
+ cp b
+ jp c, Function104f50
+ ld a, [hPrintNum2]
+ cp $5a
+ jp nz, Function104f50
+ call Function104faf
+ ld a, [hPrintNum5]
+ ld d, a
+ ld a, [hPrintNum6]
+ ld e, a
+ push hl
+ push de
+ ld hl, hPrintNum2
+ ld b, $2
+ call Function104faf
+ pop de
+ ld hl, hPrintNum2
+ ld a, [hli]
+ xor d
+ ld b, a
+ ld a, [hl]
+ xor e
+ or b
+ call nz, Function104f49
+ push de
+ ld d, $3d
+ call Function104dd1
+ ld hl, hMGStatusFlags
+ ld b, $1
+ call Function104ed6
+ pop de
+ pop hl
+ ld a, d
+ ld [hPrintNum5], a
+ ld a, e
+ ld [hPrintNum6], a
+ ret
+
+Function104faf: ; 104faf (41:4faf)
+ ld c, rRP % $100
+ ld d, $0
+ call Function104db7
+ jp z, Function104f42
+ ld d, $0
+ call Function104da9
+ jp z, Function104f42
+ ld d, $0
+ call Function104db7
+ jp z, Function104f42
+ ld a, b
+ cpl
+ ld b, a
+ xor a
+ ld [hMGJoypadPressed + 2], a
+ call Function104d86
+.asm_104fd2
+ inc b
+ jr z, .asm_10501a
+ ld a, $8
+ ld [hPrintNum4], a
+.asm_104fd9
+ ld d, $0
+.asm_104fdb
+ inc d
+ jr z, .asm_104fe5
+ ld a, [$ff00+c]
+ bit 1, a
+ jr z, .asm_104fdb
+ ld d, $0
+.asm_104fe5
+ inc d
+ jr z, .asm_104fed
+ ld a, [$ff00+c]
+ bit 1, a
+ jr nz, .asm_104fe5
+.asm_104fed
+ ld a, [hMGJoypadPressed + 2]
+ ld d, a
+ ld a, [rTIMA]
+ ld [hMGJoypadPressed + 2], a
+ sub d
+ cp $12
+ jr c, .asm_104ffd
+ set 0, e
+ jr .asm_104fff
+.asm_104ffd
+ res 0, e
+.asm_104fff
+ ld a, [hPrintNum4]
+ dec a
+ ld [hPrintNum4], a
+ jr z, .asm_10500b
+ ld a, e
+ rlca
+ ld e, a
+ jr .asm_104fd9
+.asm_10500b
+ ld a, e
+ ld [hli], a
+ ld a, [hPrintNum5]
+ add e
+ ld [hPrintNum5], a
+ ld a, [hPrintNum6]
+ adc $0
+ ld [hPrintNum6], a
+ jr .asm_104fd2
+.asm_10501a
+ call Function104d74
+ xor a
+ ld [rIF], a
+ ld d, $0
+ call Function104da9
+ jp z, Function104f42
+ ld d, $10
+ call Function104dd1
+ ret
+
+Function10502e: ; 10502e (41:502e)
+ ld b, $0
+ jp Function104e93
+
+Function105033: ; 105033 (41:5033)
+ ld b, $0
+ jp Function104f57
+
+MysteryGift_ReadJoypad: ; 105038 (41:5038)
+; We can only get four inputs at a time.
+; We take d-pad first for no particular reason.
+ ld a, R_DPAD
+ ld [rJOYP], a
+; Read twice to give the request time to take.
+ ld a, [rJOYP]
+ ld a, [rJOYP]
+
+; The Joypad register output is in the lo nybble (inversed).
+; We make the hi nybble of our new container d-pad input.
+ cpl
+ and $f
+ swap a
+
+; We'll keep this in b for now.
+ ld b, a
+
+; Buttons make 8 total inputs (A, B, Select, Start).
+; We can fit this into one byte.
+ ld a, R_BUTTONS
+ ld [rJOYP], a
+; Wait for input to stabilize.
+rept 6
+ ld a, [rJOYP]
+endr
+; Buttons take the lo nybble.
+ cpl
+ and $f
+ or b
+ ld c, a
+; To get the delta we xor the last frame's input with the new one.
+ ld a, [hMGJoypadPressed]
+ xor c
+; Released this frame:
+ and c
+ ld [hMGJoypadReleased], a
+; Pressed this frame:
+ ld a, c
+ ld [hMGJoypadPressed], a
+ ld a, $30
+; Reset the joypad register since we're done with it.
+ ld [rJOYP], a
+ ret
+
+MysteryGift_CheckAndSetDecorationAlreadyReceived: ; 105069 (41:5069)
+ call GetMysteryGiftBank
+ ld d, $0
+ ld b, CHECK_FLAG
+ ld hl, sMysteryGiftDecorationsReceived
+ predef_id FlagPredef
+ push hl
+ push bc
+ call Predef
+ call CloseSRAM
+ ld a, c
+ and a
+ pop bc
+ pop hl
+ ret nz
+ call GetMysteryGiftBank
+ ld b, SET_FLAG
+ predef FlagPredef
+ call CloseSRAM
+ xor a
+ ret
+
+MysteryGift_CopyReceivedDecosToPC: ; 105091 (41:5091)
+ call GetMysteryGiftBank
+ ld c, $0
+.loop
+ push bc
+ ld d, $0
+ ld b, CHECK_FLAG
+ ld hl, sMysteryGiftDecorationsReceived
+ predef FlagPredef
+ ld a, c
+ and a
+ pop bc
+ jr z, .skip
+ push bc
+ callfar SetSpecificDecorationFlag
+ pop bc
+.skip
+ inc c
+ ld a, c
+ cp Trophys - DecorationIDs
+ jr c, .loop
+ jp CloseSRAM
+
+Special_UnlockMysteryGift: ; 1050b9
+ call GetMysteryGiftBank
+ ld hl, sMysteryGiftUnlocked
+ ld a, [hl]
+ inc a
+ jr nz, .ok
+ ld [hld], a
+ ld [hl], a
+.ok
+ jp CloseSRAM
+; 1050c8
+
+Function1050c8: ; 1050c8
+ call GetMysteryGiftBank
+ ld a, [sNumDailyMysteryGiftPartnerIDs]
+ cp $ff
+ jr z, .okay
+ xor a
+ ld [sNumDailyMysteryGiftPartnerIDs], a
+.okay
+ jp CloseSRAM
+; 1050d9
+
+
+BackupMysteryGift: ; 1050d9
+ call GetMysteryGiftBank
+ ld hl, sMysteryGiftItem
+ ld de, sBackupMysteryGiftItem
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hl]
+ ld [de], a
+ jp CloseSRAM
+; 1050ea
+
+
+RestoreMysteryGift: ; 1050ea (41:50ea)
+ call GetMysteryGiftBank
+ ld hl, sBackupMysteryGiftItem
+ ld de, sMysteryGiftItem
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hl]
+ ld [de], a
+ jp CloseSRAM
+
+MysteryGift_ClearTrainerData: ; 1050fb (41:50fb)
+ ld hl, wMysteryGiftTrainerData
+ xor a
+ ld b, wMysteryGiftTrainerDataEnd - wMysteryGiftTrainerData
+.loop
+ ld [hli], a
+ dec b
+ jr nz, .loop
+ ret
+
+
+GetMysteryGiftBank: ; 105106
+ ld a, BANK(sBackupMysteryGiftItem)
+ jp GetSRAMBank
+; 10510b
+
+
+StagePartyDataForMysteryGift: ; 10510b (41:510b)
+; You will be sending this data to your mystery gift partner.
+; Structure is the same as a trainer with species and moves
+; defined.
+ ld a, BANK(sPokemonData)
+ call GetSRAMBank
+ ld de, wMysteryGiftStaging
+ ld bc, sPokemonData + PartyMons - wPokemonData
+ ld hl, sPokemonData + PartySpecies - wPokemonData
+.loop
+ ld a, [hli]
+ cp -1
+ jr z, .party_end
+ cp EGG
+ jr z, .next
+ push hl
+ ; copy level
+ ld hl, MON_LEVEL
+ add hl, bc
+ ld a, [hl]
+ ld [de], a
+ inc de
+ ; copy species
+ ld hl, MON_SPECIES
+ add hl, bc
+ ld a, [hl]
+ ld [de], a
+ inc de
+ ; copy moves
+ ld hl, MON_MOVES
+ add hl, bc
+ push bc
+ ld bc, NUM_MOVES
+ call CopyBytes
+ pop bc
+ pop hl
+.next
+ push hl
+ ld hl, PARTYMON_STRUCT_LENGTH
+ add hl, bc
+ ld b, h
+ ld c, l
+ pop hl
+ jr .loop
+.party_end
+ ld a, -1
+ ld [de], a
+ ld a, $26
+ ld [wca00], a
+ jp CloseSRAM
+
+InitMysteryGiftLayout: ; 105153 (41:5153)
+ call ClearBGPalettes
+ call DisableLCD
+ ld hl, MysteryGiftGFX
+ ld de, VTiles2 tile $00
+ ld a, BANK(MysteryGiftGFX)
+ ld bc, MysteryGiftGFXEnd - MysteryGiftGFX
+ call FarCopyBytes
+ hlcoord 0, 0
+ ld a, $42
+ ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
+ call ByteFill
+ hlcoord 3, 7
+ lb bc, 9, 15
+ call ClearBox
+ hlcoord 0, 0
+ ld a, $0
+ ld [hli], a
+ inc a
+ ld [hl], a
+ hlcoord 0, 1
+ inc a
+ ld [hli], a
+ inc a
+ ld [hl], a
+ hlcoord 7, 1
+ ld a, $12
+ call .Load5GFX
+ hlcoord 2, 2
+ ld a, $17
+ call .Load16GFX
+ hlcoord 2, 3
+ ld a, $27
+ call .Load16GFX
+ hlcoord 9, 4
+ ld a, $37
+ ld [hli], a
+ inc a
+ ld [hl], a
+ hlcoord 1, 2
+ ld [hl], $4
+ hlcoord 1, 3
+ ld a, $5
+ call .Load14Column
+ ld a, $9
+ hlcoord 18, 5
+ call .Load11Column
+ hlcoord 2, 5
+ ld a, $b
+ call .Load16Row
+ hlcoord 2, 16
+ ld a, $7
+ call .Load16Row
+ hlcoord 2, 5
+ ld a, $d
+ call .Load5GFX
+ hlcoord 7, 5
+ ld [hl], $c
+ hlcoord 18, 5
+ ld [hl], $a
+ hlcoord 18, 16
+ ld [hl], $8
+ hlcoord 1, 16
+ ld [hl], $6
+ hlcoord 2, 6
+ ld a, $3a
+ call .Load16Row
+ hlcoord 2, 15
+ ld a, $40
+ call .Load16Row
+ hlcoord 2, 6
+ ld a, $3c
+ call .Load9Column
+ hlcoord 17, 6
+ ld a, $3e
+ call .Load9Column
+ hlcoord 2, 6
+ ld [hl], $39
+ hlcoord 17, 6
+ ld [hl], $3b
+ hlcoord 2, 15
+ ld [hl], $3f
+ hlcoord 17, 15
+ ld [hl], $41
+ call EnableLCD
+ call WaitBGMap
+ ld b, SCGB_MYSTERY_GIFT
+ call GetSGBLayout
+ call SetPalettes
+ ret
+
+.Load5GFX: ; 10522e (41:522e)
+ ld b, 5
+ jr .gfx_loop
+; 105232 (41:5232)
+
+.Load6GFX: ; unreferenced
+ ld b, 6
+ jr .gfx_loop
+
+.Load16GFX: ; 105236 (41:5236)
+ ld b, 16
+
+.gfx_loop ; 105238 (41:5238)
+ ld [hli], a
+ inc a
+ dec b
+ jr nz, .gfx_loop
+ ret
+
+.Load9Column: ; 10523e (41:523e)
+ ld b, 9
+ jr .col_loop
+
+.Load11Column: ; 105242 (41:5242)
+ ld b, 11
+ jr .col_loop
+
+.Load14Column: ; 105246 (41:5246)
+ ld b, 14
+
+.col_loop ; 105248 (41:5248)
+ ld [hl], a
+ ld de, SCREEN_WIDTH
+ add hl, de
+ dec b
+ jr nz, .col_loop
+ ret
+
+.Load16Row: ; 105251 (41:5251)
+ ld b, 16
+.row_loop
+ ld [hli], a
+ dec b
+ jr nz, .row_loop
+ ret
+
+MysteryGiftGFX: ; 105258
+INCBIN "gfx/mystery_gift/mystery_gift.2bpp"
+MysteryGiftGFXEnd:
+
+Function105688: ; 105688 (41:5688)
+ call ClearTileMap
+ call ClearSprites
+ call WaitBGMap
+ call Function1057d7
+ hlcoord 3, 8
+ ld de, String_10572e
+ call PlaceString
+ call WaitBGMap
+ call Function10578c
+ call MysteryGift_ClearTrainerData
+ ld a, $24
+ ld [wca02], a
+ ld a, [rIE]
+ push af
+ call Function104c2d
+ ld d, a
+ xor a
+ ld [rIF], a
+ pop af
+ ld [rIE], a
+ ld a, d
+ cp $10
+ jp z, Function105712
+ cp $6c
+ jp nz, Function10571a
+ call Function1056eb
+ ld c, 60
+ call DelayFrames
+ call Function105777
+ ld hl, Text_ReceivedCard
+ call PrintText
+ ld de, wMysteryGiftTrainerData
+ farcall Function8ac70
+ ld a, c
+ ld [wd265], a
+ ld hl, Text_CardNotRegistered
+ jr c, asm_105726
+ ld hl, Text_ListedCardAsNumber
+ jr asm_105726
+
+Function1056eb: ; 1056eb (41:56eb)
+ ld c, $10
+.asm_1056ed
+ ld hl, Sprites
+ ld b, $8
+.asm_1056f2
+ dec [hl]
+rept 4
+ inc hl
+endr
+ dec b
+ jr nz, .asm_1056f2
+ ld hl, Sprites + $20
+ ld b, $8
+.asm_1056ff
+ inc [hl]
+rept 4
+ inc hl
+endr
+ dec b
+ jr nz, .asm_1056ff
+ dec c
+ ret z
+ push bc
+ ld c, 4
+ call DelayFrames
+ pop bc
+ jr .asm_1056ed
+
+Function105712: ; 105712 (41:5712)
+ call Function105777
+ ld hl, Text_MGLinkCanceled
+ jr asm_105726
+
+Function10571a: ; 10571a (41:571a)
+ call Function105777
+ ld hl, Text_MGCommError
+ call PrintText
+ jp Function105688
+
+asm_105726: ; 105726 (41:5726)
+ call PrintText
+ ld a, $e3
+ ld [rLCDC], a
+ ret
+; 10572e (41:572e)
+
+String_10572e: ; 10572e
+ db "エーボタン¯おすと"
+ next "つうしん<PKMN>おこなわれるよ!"
+ next "ビーボタン¯おすと"
+ next "つうしん¯ちゅうし します"
+ db "@"
+
+; 10575e
+
+Text_ReceivedCard: ; 10575e
+ text_jump UnknownText_0x1c051a
+ db "@"
+
+Text_ListedCardAsNumber: ; 105763
+ text_jump UnknownText_0x1c0531
+ db "@"
+
+Text_CardNotRegistered: ; 105768
+ text_jump UnknownText_0x1c0555
+ db "@"
+
+Text_MGLinkCanceled: ; 10576d
+ text_jump UnknownText_0x1c0573
+ db "@"
+
+Text_MGCommError: ; 105772
+ text_jump UnknownText_0x1c0591
+ db "@"
+; 105777
+
+Function105777: ; 105777 (41:5777)
+ call ClearSprites
+ call ClearTileMap
+ call EnableLCD
+ call WaitBGMap
+ ld b, SCGB_DIPLOMA
+ call GetSGBLayout
+ call SetPalettes
+ ret
+
+Function10578c: ; 10578c (41:578c)
+ ld de, OverworldMap
+ ld a, BANK(sPlayerData)
+ call GetSRAMBank
+ ld hl, sPlayerData + PlayerName - wPlayerData
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ ld hl, sPlayerData + PlayerID - wPlayerData
+ ld bc, 2
+ call CopyBytes
+ ld hl, sPlayerData + wSecretID - wPlayerData
+ ld bc, 2
+ call CopyBytes
+ call CloseSRAM
+ ld a, BANK(sCrystalData)
+ call GetSRAMBank
+ ld a, [sCrystalData + 0]
+ ld [de], a
+ inc de
+ ld a, $4
+ call GetSRAMBank
+ ld hl, $a603
+ ld bc, $8
+ call CopyBytes
+ ld hl, $a007
+ ld bc, $c
+ call CopyBytes
+ call CloseSRAM
+ ret
+
+Function1057d7: ; 1057d7 (41:57d7)
+ call ClearBGPalettes
+ call DisableLCD
+ ld hl, MysteryGiftJP_GFX
+ ld de, VTiles2 tile $00
+ ld a, BANK(MysteryGiftJP_GFX)
+ lb bc, 4, 0
+ call FarCopyBytes
+ ld hl, MysteryGiftJP_GFX + $400
+ ld de, VTiles0 tile $00
+ ld a, BANK(MysteryGiftJP_GFX)
+ ld bc, $80
+ call FarCopyBytes
+ hlcoord 0, 0
+ ld a, $3f
+ ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
+ call ByteFill
+ hlcoord 3, 7
+ lb bc, 9, 15
+ call ClearBox
+ hlcoord 0, 0
+ ld a, $0
+ ld [hli], a
+ inc a
+ ld [hl], a
+ hlcoord 0, 1
+ inc a
+ ld [hli], a
+ inc a
+ ld [hl], a
+ hlcoord 4, 2
+ ld a, $13
+ call .Load11Row
+ hlcoord 4, 3
+ ld a, $1e
+ call .Load12Row
+ hlcoord 4, 4
+ ld a, $2a
+ call .Load12Row
+ hlcoord 1, 2
+ ld [hl], $4
+ hlcoord 1, 3
+ ld a, $5
+ call .Load14Column
+ ld a, $9
+ hlcoord 18, 5
+ call .Load11Column
+ hlcoord 2, 5
+ ld a, $b
+ call .Load16Row
+ hlcoord 2, 16
+ ld a, $7
+ call .Load16Row
+ hlcoord 2, 5
+ ld a, $d
+ call .Load6Row
+ hlcoord 8, 5
+ ld [hl], $c
+ hlcoord 18, 5
+ ld [hl], $a
+ hlcoord 18, 16
+ ld [hl], $8
+ hlcoord 1, 16
+ ld [hl], $6
+ hlcoord 2, 6
+ ld a, $37
+ call .Load16Row
+ hlcoord 2, 15
+ ld a, $3d
+ call .Load16Row
+ hlcoord 2, 6
+ ld a, $39
+ call .Load9Column
+ hlcoord 17, 6
+ ld a, $3b
+ call .Load9Column
+ hlcoord 2, 6
+ ld [hl], $36
+ hlcoord 17, 6
+ ld [hl], $38
+ hlcoord 2, 15
+ ld [hl], $3c
+ hlcoord 17, 15
+ ld [hl], $3e
+ ld de, Sprites
+ ld hl, .OAM_data
+ ld bc, $40
+ call CopyBytes
+ call EnableLCD
+ call WaitBGMap
+ ld b, $2
+ farcall GetMysteryGift_MobileAdapterLayout
+ jp SetPalettes
+
+.Load6Row: ; 1058c6 (41:58c6)
+ ld b, 6
+ jr .row_loop
+
+.Load11Row: ; 1058ca (41:58ca)
+ ld b, 11
+ jr .row_loop
+
+.Load12Row: ; 1058ce (41:58ce)
+ ld b, 12
+
+.row_loop ; 1058d0 (41:58d0)
+ ld [hli], a
+ inc a
+ dec b
+ jr nz, .row_loop
+ ret
+
+.Load9Column: ; 1058d6 (41:58d6)
+ ld b, 9
+ jr .column_loop
+
+.Load11Column: ; 1058da (41:58da)
+ ld b, 11
+ jr .column_loop
+
+.Load14Column: ; 1058de (41:58de)
+ ld b, 14
+
+.column_loop ; 1058e0 (41:58e0)
+ ld [hl], a
+ ld de, SCREEN_WIDTH
+ add hl, de
+ dec b
+ jr nz, .column_loop
+ ret
+
+.Load16Row: ; 1058e9 (41:58e9)
+ ld b, 16
+.row_loop_no_inc
+ ld [hli], a
+ dec b
+ jr nz, .row_loop_no_inc
+ ret
+; 1058f0 (41:58f0)
+
+.OAM_data: ; 1058f0
+ dsprite 2, 1, 6, 4, $00, $00
+ dsprite 2, 1, 7, 4, $01, $00
+ dsprite 2, 1, 8, 4, $02, $00
+ dsprite 2, 1, 9, 4, $03, $00
+ dsprite 3, 1, 6, 4, $04, $00
+ dsprite 3, 1, 7, 4, $05, $00
+ dsprite 3, 1, 8, 4, $06, $00
+ dsprite 3, 1, 9, 4, $07, $00
+ dsprite 0, 1, 11, 4, $00, $00
+ dsprite 0, 1, 12, 4, $01, $00
+ dsprite 0, 1, 13, 4, $02, $00
+ dsprite 0, 1, 14, 4, $03, $00
+ dsprite 1, 1, 11, 4, $04, $00
+ dsprite 1, 1, 12, 4, $05, $00
+ dsprite 1, 1, 13, 4, $06, $00
+ dsprite 1, 1, 14, 4, $07, $00
+
+; japanese mystery gift gfx
+MysteryGiftJP_GFX: ; 105930
+INCBIN "gfx/mystery_gift/mystery_gift_jp.2bpp"
diff --git a/engine/mystery_gift_2.asm b/engine/mystery_gift_2.asm
new file mode 100755
index 000000000..dc0baf39c
--- /dev/null
+++ b/engine/mystery_gift_2.asm
@@ -0,0 +1,152 @@
+PrepMysteryGiftDataToSend: ; 2c642 (b:4642)
+ ld de, wMysteryGiftStaging
+ ld a, $1
+ ld [de], a
+ inc de ; wc801
+ ld a, BANK(sGameData)
+ call GetSRAMBank
+ ld hl, sPlayerData + PlayerID - wPlayerData
+ ld a, [hli]
+ ld [de], a
+ ld b, a
+ inc de ; wc802
+ ld a, [hl]
+ ld [de], a
+ ld c, a
+ inc de ; wc803
+ push bc
+ ld hl, sPlayerData + PlayerName - wPlayerData
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ push de ; wc80e
+ ld hl, sPokemonData + PokedexCaught - wPokemonData
+ ld b, EndPokedexCaught - PokedexCaught
+ call CountSetBits
+ pop de
+ pop bc
+ ld a, [wd265]
+ ld [de], a
+ inc de ; wc80f
+ call CloseSRAM
+ call Random
+ and $1
+ ld [de], a
+ inc de ; wc810
+ call .RandomSample
+ ld [de], a
+ inc de ; wc811
+ ld a, c
+ ld c, b
+ ld b, a
+ call .RandomSample
+ ld [de], a
+ inc de ; wc812
+ ld a, BANK(sBackupMysteryGiftItem)
+ call GetSRAMBank
+ ld a, [sBackupMysteryGiftItem]
+ ld [de], a
+ inc de
+ ld a, [sBackupMysteryGiftItem + 1]
+ ld [de], a
+ ld a, $14
+ ld [wca00], a
+ call CloseSRAM
+ ld hl, wMysteryGiftStaging
+ ld de, wMysteryGiftPlayerData
+ ld bc, wMysteryGiftPlayerDataEnd - wMysteryGiftPlayerData
+ jp CopyBytes
+
+.RandomSample: ; 2c6ac (b:46ac)
+ push de
+ call Random
+ cp $19 ; 10 percent
+ jr c, .tenpercent
+ call Random
+ and $7
+ ld d, a
+ rl d
+ ld e, $80
+.loop
+ rlc e
+ dec a
+ jr nz, .loop
+ ld a, e
+ and c
+ jr z, .skip
+ ld a, $1
+.skip
+ add d
+ jr .done
+
+.tenpercent
+ call Random
+ cp $32 ; 20 percent
+ jr c, .twopercent
+ call Random
+ and $3
+ ld d, a
+ rl d
+ ld e, $80
+.loop2
+ rlc e
+ dec a
+ jr nz, .loop2
+ ld a, e
+ and b
+ jr z, .skip2
+ ld a, $1
+.skip2
+ add d
+ add $10
+ jr .done
+
+.twopercent
+ call Random
+ cp $32 ; 50 ; 20 percent
+ jr c, .pointfourpercent
+ ld a, b
+ swap a
+ and $7
+ add $18
+ jr .done
+
+.pointfourpercent
+ ld a, b
+ and $80
+ ld a, $20
+ jr z, .done
+ ld a, $21
+
+.done
+ pop de
+ ret
+
+MysteryGiftGetItemHeldEffect: ; 2c708 (b:4708)
+ ld a, c
+ cp MysteryGiftItemsEnd - MysteryGiftItems
+ jr nc, MysteryGiftFallbackItem
+ ld hl, MysteryGiftItems
+ ld b, 0
+ add hl, bc
+ ld c, [hl]
+ ret
+
+MysteryGiftGetDecoration: ; 2c715 (b:4715)
+ ld a, c
+ cp MysteryGiftDecosEnd - MysteryGiftDecos
+ jr nc, MysteryGiftFallbackItem
+ ld hl, MysteryGiftDecos
+ ld b, 0
+ add hl, bc
+ ld c, [hl]
+ ret
+
+MysteryGiftFallbackItem: ; 2c722 (b:4722)
+ ld c, DECO_POLKADOT_BED ; GREAT_BALL
+ ret
+; 2c725 (b:4725)
+
+
+INCLUDE "data/mystery_gift/items.asm"
+
+INCLUDE "data/mystery_gift/decos.asm"
diff --git a/engine/mysterygift.asm b/engine/mysterygift.asm
deleted file mode 100755
index f2d29b08a..000000000
--- a/engine/mysterygift.asm
+++ /dev/null
@@ -1,1735 +0,0 @@
-DoMysteryGift: ; 1048ba (41:48ba)
- call ClearTileMap
- call ClearSprites
- call WaitBGMap
- call InitMysteryGiftLayout
- hlcoord 3, 8
- ld de, .String_PressAToLink_BToCancel
- call PlaceString
- call WaitBGMap
- callba PrepMysteryGiftDataToSend
- call MysteryGift_ClearTrainerData
- ld a, $2
- ld [wca01], a
- ld a, $14
- ld [wca02], a
- ld a, [rIE]
- push af
-
- call Function104a95
-
- ld d, a
- xor a
- ld [rIF], a
- pop af
- ld [rIE], a
- push de
- call ClearTileMap
- call EnableLCD
- call WaitBGMap
- ld b, SCGB_DIPLOMA
- call GetSGBLayout
- call SetPalettes
- pop de
- hlcoord 2, 8
- ld a, d
- ld de, .Text_LinkCanceled ; Link has been canceled
- cp $10
- jp z, .LinkCanceled
- cp $6c
- jp nz, .CommunicationError
- ld a, [wc900]
- cp 3
- jr z, .skip_checks
- call .CheckAlreadyGotFiveGiftsToday
- ld hl, .Text_MaxFiveGifts ; Only 5 gifts a day
- jp nc, .PrintTextAndExit
- call .CheckAlreadyGotAGiftFromThatPerson
- ld hl, .Text_MaxOneGiftPerPerson ; Only one gift a day per person
- jp c, .PrintTextAndExit
-.skip_checks
- ld a, [wMysteryGiftPlayerBackupItem]
- and a
- jp nz, .GiftWaiting
- ld a, [wMysteryGiftPartnerBackupItem]
- and a
- jp nz, .FriendNotReady
- ld a, [wc900]
- cp 3
- jr z, .skip_append_save
- call .AddMysteryGiftPartnerID
- ld a, [wc900]
- cp 4
- jr z, .skip_append_save
- call .SaveMysteryGiftTrainerName
- callba RestoreMobileEventIndex
- callba TrainerRankings_MysteryGift
- callba BackupMobileEventIndex
-.skip_append_save
- ld a, [wMysteryGiftPartnerSentDeco]
- and a
- jr z, .item
- ld a, [wMysteryGiftPartnerWhichDeco]
- ld c, a
- callba MysteryGiftGetDecoration
- push bc
- call MysteryGift_CheckAndSetDecorationAlreadyReceived
- pop bc
- jr nz, .item
- callab GetDecorationName_c
- ld h, d
- ld l, e
- ld de, StringBuffer1
- ld bc, ITEM_NAME_LENGTH
- call CopyBytes
- ld hl, .Text_SentToHome ; sent decoration to home
- jr .PrintTextAndExit
-
-.item
- call GetMysteryGiftBank
- ld a, [wMysteryGiftPartnerWhichItem]
- ld c, a
- callba MysteryGiftGetItemHeldEffect
- ld a, c
- ld [sBackupMysteryGiftItem], a
- ld [wNamedObjectIndexBuffer], a
- call CloseSRAM
- call GetItemName
- ld hl, .Text_Sent ; sent item
- jr .PrintTextAndExit
-
-.LinkCanceled: ; 1049af (41:49af)
- ld hl, .Text_LinkCanceled ; Link has been canceled
- jr .PrintTextAndExit
-
-.CommunicationError: ; 1049b4 (41:49b4)
- ld hl, .Text_CommunicationError ; Communication error
- call PrintText
- jp DoMysteryGift
-
-.GiftWaiting: ; 1049bd (41:49bd)
- ld hl, .Text_ReceiveGiftAtCounter ; receive gift at counter
- jr .PrintTextAndExit
-
-.FriendNotReady: ; 1049c2 (41:49c2)
- ld hl, .Text_FriendNotReady ; friend not ready
-
-.PrintTextAndExit: ; 1049c5 (41:49c5)
- call PrintText
- ld a, $e3
- ld [rLCDC], a
- ret
-; 1049cd (41:49cd)
-
-.String_PressAToLink_BToCancel: ; 1049cd
- db "Press A to"
- next "link IR-Device"
- next "Press B to"
- next "cancel it."
- db "@"
-; 1049fd
-
-.Text_LinkCanceled: ; 1049fd
- text_jump UnknownText_0x1c0436
- db "@"
-; 104a02
-
-.Text_CommunicationError: ; 104a02
- text_jump UnknownText_0x1c0454
- db "@"
-; 104a07
-
-.Text_ReceiveGiftAtCounter: ; 104a07
- text_jump UnknownText_0x1c046a
- db "@"
-; 104a0c
-
-.Text_FriendNotReady: ; 104a0c
- text_jump UnknownText_0x1c048e
- db "@"
-; 104a11
-
-.Text_MaxFiveGifts: ; 104a11
- text_jump UnknownText_0x1c04a7
- db "@"
-; 104a16
-
-.Text_MaxOneGiftPerPerson: ; 104a16
- text_jump UnknownText_0x1c04c6
- db "@"
-; 104a1b
-
-.Text_Sent: ; 104a1b
- text_jump UnknownText_0x1c04e9
- db "@"
-; 104a20
-
-.Text_SentToHome: ; 104a20
- text_jump UnknownText_0x1c04fa
- db "@"
-; 104a25
-
-.CheckAlreadyGotFiveGiftsToday: ; 104a25 (41:4a25)
- call GetMysteryGiftBank
- ld a, [sNumDailyMysteryGiftPartnerIDs]
- cp $5
- jp CloseSRAM
-
-.CheckAlreadyGotAGiftFromThatPerson: ; 104a30 (41:4a30)
- call GetMysteryGiftBank
- ld a, [wMysteryGiftPartnerID]
- ld b, a
- ld a, [wMysteryGiftPartnerID + 1]
- ld c, a
- ld a, [sNumDailyMysteryGiftPartnerIDs]
- ld d, a
- ld hl, sDailyMysteryGiftPartnerIDs
-.loop
- ld a, d
- and a
- jr z, .No
- ld a, [hli]
- cp b
- jr nz, .skip
- ld a, [hl]
- cp c
- jr z, .Yes
-.skip
- inc hl
- dec d
- jr .loop
-.Yes:
- scf
-.No:
- jp CloseSRAM
-
-.AddMysteryGiftPartnerID: ; 104a56 (41:4a56)
- call GetMysteryGiftBank
- ld hl, sNumDailyMysteryGiftPartnerIDs
- ld a, [hl]
- inc [hl]
- ld hl, sDailyMysteryGiftPartnerIDs ; inc hl
- ld e, a
- ld d, $0
- add hl, de
- add hl, de
- ld a, [wMysteryGiftPartnerID]
- ld [hli], a
- ld a, [wMysteryGiftPartnerID + 1]
- ld [hl], a
- jp CloseSRAM
-
-.SaveMysteryGiftTrainerName: ; 104a71 (41:4a71)
- call GetMysteryGiftBank
- ld a, $1
- ld [sMysteryGiftTrainerHouseFlag], a
- ld hl, wMysteryGiftPartnerName
- ld de, sMysteryGiftPartnerName
- ld bc, NAME_LENGTH
- call CopyBytes
- ld a, $1
- ld [de], a
- inc de
- ld hl, wMysteryGiftTrainerData
- ld bc, (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 2
- call CopyBytes
- jp CloseSRAM
-
-Function104a95: ; 104a95 (41:4a95)
- di
- callba ClearChannels
- call Function104d5e
-
-.loop2
- call Function104d96
- call Function104ddd
- ld a, [hMGStatusFlags]
- cp $10
- jp z, Function104bd0
- cp $6c
- jr nz, .loop2
-
- ld a, [hPrintNum9]
- cp $2
- jr z, Function104b22
- ld hl, hPrintNum1
- ld b, $1
- call Function104d56
- jr nz, .ly_loop
- call Function104b49
- jp nz, Function104bd0
- jr Function104b0a
- ; Delay frame
-.ly_loop
- ld a, [rLY]
- cp $90
- jr c, .ly_loop
- ld c, rRP % $100
- ld a, $c0
- ld [$ff00+c], a
- ld b, 240 ; This might have been intended as a 4-second timeout buffer.
- ; However, it is reset with each frame.
-.loop3
- push bc
- call MysteryGift_ReadJoypad
-
- ld b, $2
- ld c, rRP % $100
- ; Delay frame
-.ly_loop2
- ld a, [$ff00+c]
- and b
- ld b, a
- ld a, [rLY]
- cp $90
- jr nc, .ly_loop2
-.ly_loop3
- ld a, [$ff00+c]
- and b
- ld b, a
- ld a, [rLY]
- cp $90
- jr c, .ly_loop3
-
- ld a, b
- pop bc
- dec b
- jr z, .loop2 ; we never jump here
- or a
- jr nz, .loop2
- ; Check if we've pressed the B button
- ld a, [hMGJoypadReleased]
- bit B_BUTTON_F, a
- jr z, .loop3
- ld a, $10
- ld [hMGStatusFlags], a
- jp Function104bd0
-
-Function104b04: ; 104b04 (41:4b04)
- call Function104b40
- jp nz, Function104bd0
-Function104b0a: ; 104b0a (41:4b0a)
- call Function104d38
- jp nz, Function104bd0
- call Function104b88
- jp nz, Function104bd0
- call Function104d43
- jp nz, Function104bd0
- call Function105033
- jp Function104bd0
-
-Function104b22: ; 104b22 (41:4b22)
- call Function104b88
- jp nz, Function104bd0
- call Function104d43
- jp nz, Function104bd0
- call Function104b40
- jp nz, Function104bd0
- call Function104d38
- jp nz, Function104bd0
- call Function10502e
- jp Function104bd0
-
-Function104b40: ; 104b40 (41:4b40)
- ld hl, hPrintNum1
- ld b, $1
- call Function104d56
- ret nz
-
-Function104b49: ; 104b49 (41:4b49)
- call Function105033
- ld a, [hMGStatusFlags]
- cp $6c
- ret nz
- ld a, [hPrintNum1]
- cp $96
- jp nz, Function104d32
- ld a, $90
- ld [hPrintNum1], a
- call Function104d38
- ret nz
- ld hl, hPrintNum1
- ld b, $1
- call Function104d4e
- ret nz
- call Function10502e
- ld a, [hMGStatusFlags]
- cp $6c
- ret nz
- call Function104d43
- ret nz
- ld hl, wMysteryGiftTrainerData
- ld a, [wca02]
- ld b, a
- call Function104d56
- ret nz
- call Function105033
- ld a, [hMGStatusFlags]
- cp $6c
- ret
-
-Function104b88: ; 104b88 (41:4b88)
- ld a, $96
- ld [hPrintNum1], a
- ld hl, hPrintNum1
- ld b, $1
- call Function104d4e
- ret nz
- call Function10502e
- ld a, [hMGStatusFlags]
- cp $6c
- ret nz
- call Function104d43
- ret nz
- ld hl, hPrintNum1
- ld b, $1
- call Function104d56
- ret nz
- call Function105033
- ld a, [hMGStatusFlags]
- cp $6c
- ret nz
- ld a, [hPrintNum1]
- cp $90
- jp nz, Function104d32
- call Function104d38
- ret nz
- ld hl, OverworldMap
- ld a, [wca02]
- ld b, a
- call Function104d4e
- ret nz
- call Function10502e
- ld a, [hMGStatusFlags]
- cp $6c
- ret
-
-Function104bd0: ; 104bd0 (41:4bd0)
- nop
- ld a, [hMGStatusFlags]
- cp $10
- jr z, .quit
- cp $6c
- jr nz, .quit
- ld hl, wca01
- dec [hl]
- jr z, .quit
- ld hl, wMysteryGiftTrainerData
- ld de, wMysteryGiftPartnerData
- ld bc, wMysteryGiftPartnerDataEnd - wMysteryGiftPartnerData
- call CopyBytes
- ld a, [wMysteryGiftTrainerData]
- cp $3
- jr nc, .quit
- callba StagePartyDataForMysteryGift
- call MysteryGift_ClearTrainerData
- ld a, $26
- ld [wca02], a
- ld a, [hPrintNum9]
- cp $2
- jr z, .asm_104c10
- call Function104d43
- jr nz, Function104bd0
- jp Function104b04
-
-.asm_104c10
- call Function104d38
- jr nz, Function104bd0
- jp Function104b22
-
-.quit
- ld a, [hMGStatusFlags]
- push af
- call Function104da0
- xor a
- ld [rIF], a
- ld a, [rIE]
- or $1
- ld [rIE], a
- ei
- call DelayFrame
- pop af
- ret
-
-Function104c2d: ; 104c2d (41:4c2d)
- di
- callba ClearChannels
- call Function104d5e
-.asm_104c37
- call Function104d96
- call Function104ddd
- ld a, [hMGStatusFlags]
- cp $10
- jp z, Function104d1c
- cp $6c
- jr nz, .asm_104c37
- ld a, [hPrintNum9]
- cp $2
- jr z, .asm_104c6c
- call Function104c8a
- jp nz, Function104d1c
- call Function104d38
- jp nz, Function104d1c
- call Function104cd2
- jp nz, Function104d1c
- call Function104d43
- jp nz, Function104d1c
- call Function105033
- jp Function104d1c
-.asm_104c6c
- call Function104cd2
- jp nz, Function104d1c
- call Function104d43
- jp nz, Function104d1c
- call Function104c8a
- jp nz, Function104d1c
- call Function104d38
- jp nz, Function104d1c
- call Function10502e
- jp Function104d1c
-
-Function104c8a: ; 104c8a (41:4c8a)
- ld hl, hPrintNum1
- ld b, $1
- call Function104d56
- ret nz
- call Function105033
- ld a, [hMGStatusFlags]
- cp $6c
- ret nz
- ld a, [hPrintNum1]
- cp $3c
- jp nz, Function104d32
- swap a
- ld [hPrintNum1], a
- call Function104d38
- ret nz
- ld hl, hPrintNum1
- ld b, $1
- call Function104d4e
- ret nz
- call Function10502e
- ld a, [hMGStatusFlags]
- cp $6c
- ret nz
- call Function104d43
- ret nz
- ld hl, wMysteryGiftTrainerData
- ld a, [wca02]
- ld b, a
- call Function104d56
- ret nz
- call Function105033
- ld a, [hMGStatusFlags]
- cp $6c
- ret
-
-Function104cd2: ; 104cd2 (41:4cd2)
- ld a, $3c
- ld [hPrintNum1], a
- ld hl, hPrintNum1
- ld b, $1
- call Function104d4e
- ret nz
- call Function10502e
- ld a, [hMGStatusFlags]
- cp $6c
- ret nz
- call Function104d43
- ret nz
- ld hl, hPrintNum1
- ld b, $1
- call Function104d56
- ret nz
- call Function105033
- ld a, [hMGStatusFlags]
- cp $6c
- ret nz
- ld a, [hPrintNum1]
- swap a
- cp $3c
- jp nz, Function104d32
- call Function104d38
- ret nz
- ld hl, OverworldMap
- ld a, [wca02]
- ld b, a
- call Function104d4e
- ret nz
- call Function10502e
- ld a, [hMGStatusFlags]
- cp $6c
- ret
-
-Function104d1c: ; 104d1c (41:4d1c)
- nop
- ld a, [hMGStatusFlags]
- push af
- call Function104da0
- xor a
- ld [rIF], a
- ld a, [rIE]
- or $1
- ld [rIE], a
- ei
- call DelayFrame
- pop af
- ret
-
-Function104d32: ; 104d32 (41:4d32)
- ld a, $80
- ld [hMGStatusFlags], a
- and a
- ret
-
-Function104d38: ; 104d38 (41:4d38)
- call Function104d96
- call Function104e46
- ld a, [hMGStatusFlags]
- cp $6c
- ret
-
-Function104d43: ; 104d43 (41:4d43)
- call Function104d96
- call Function104dfe
- ld a, [hMGStatusFlags]
- cp $6c
- ret
-
-Function104d4e: ; 104d4e (41:4d4e)
- call Function104e93
- ld a, [hMGStatusFlags]
- cp $6c
- ret
-
-Function104d56: ; 104d56 (41:4d56)
- call Function104f57
- ld a, [hMGStatusFlags]
- cp $6c
- ret
-
-Function104d5e: ; 104d5e (41:4d5e)
- call Function104d74
- ld a, $4
- ld [rIE], a
- xor a
- ld [rIF], a
- call Function104d96
- xor a
- ld b, a
-.asm_104d6d
- inc a
- jr nz, .asm_104d6d
- inc b
- jr nz, .asm_104d6d
- ret
-
-Function104d74: ; 104d74 (41:4d74)
- xor a
- ld [rTAC], a
- ld a, $fe
- ld [rTMA], a
- ld [rTIMA], a
- ld a, $2
- ld [rTAC], a
- or $4
- ld [rTAC], a
- ret
-
-Function104d86: ; 104d86 (41:4d86)
- xor a
- ld [rTAC], a
- ld [rTMA], a
- ld [rTIMA], a
- ld a, $2
- ld [rTAC], a
- or $4
- ld [rTAC], a
- ret
-
-Function104d96: ; 104d96 (41:4d96)
- ld a, $c0
- call Function104e8c
- ld a, $1
- ld [hPrintNum9], a
- ret
-
-Function104da0: ; 104da0 (41:4da0)
- xor a
- call Function104e8c
- ld a, $2
- ld [rTAC], a
- ret
-
-Function104da9: ; 104da9 (41:4da9)
- inc d
- ret z
- xor a
- ld [rIF], a
- halt
- ld a, [$ff00+c]
- bit 1, a
- jr z, Function104da9
- or a
- ret
-
-Function104db7: ; 104db7 (41:4db7)
- inc d
- ret z
- xor a
- ld [rIF], a
- halt
- ld a, [$ff00+c]
- bit 1, a
- jr nz, Function104db7
- or a
- ret
-
-Function104dc5: ; 104dc5 (41:4dc5)
- ld a, $c1
- ld [$ff00+c], a
-.wait
- dec d
- ret z
- xor a
- ld [rIF], a
- halt
- jr .wait
-
-Function104dd1: ; 104dd1 (41:4dd1)
- ld a, $c0
- ld [$ff00+c], a
-.wait
- dec d
- ret z
- xor a
- ld [rIF], a
- halt
- jr .wait
-
-Function104ddd: ; 104ddd (41:4ddd)
- ld d, $0
- ld e, d
- ld a, $1
- ld [hPrintNum9], a
-.loop
- call MysteryGift_ReadJoypad
- ld b, $2
- ld c, rRP % $100
- ld a, [hMGJoypadReleased]
- bit B_BUTTON_F, a
- jr z, .next
- ld a, $10
- ld [hMGStatusFlags], a
- ret
-
-.next
- bit 0, a
- jr nz, Function104e3a
- ld a, [$ff00+c]
- and b
- jr nz, .loop
-
-Function104dfe: ; 104dfe (41:4dfe)
- ld c, rRP % $100
- ld d, $0
- ld e, d
- call Function104db7
- jp z, Function104f42
- ld d, e
- call Function104da9
- jp z, Function104f42
- call Function104db7
- jp z, Function104f42
- call Function104da9
- jp z, Function104f42
- ld a, $6c
- ld [hMGStatusFlags], a
- ld d, $3d
- call Function104dd1
- ld d, $5
- call Function104dc5
- ld d, $15
- call Function104dd1
- ld d, $5
- call Function104dc5
- ld d, $5
- call Function104dd1
- ret
-
-Function104e3a: ; 104e3a (41:4e3a)
- ; Wait a random amount of time
- call Random
- ld e, a
- and $f
- ld d, a
-.loop
- dec de
- ld a, d
- or e
- jr nz, .loop
-Function104e46: ; 104e46 (41:4e46)
- ld a, $2
- ld [hPrintNum9], a
- ld c, rRP % $100
- ld d, $0
- ld e, d
- ld d, $3d
- call Function104dd1
- ld d, $5
- call Function104dc5
- ld d, $15
- call Function104dd1
- ld d, $5
- call Function104dc5
- ld d, $5
- call Function104dd1
- ld d, e
- call Function104db7
- jp z, Function104f42
- ld d, e
- call Function104da9
- jp z, Function104f42
- call Function104db7
- jp z, Function104f42
- call Function104da9
- jp z, Function104f42
- ld d, $3d
- call Function104dd1
- ld a, $6c
- ld [hMGStatusFlags], a
- ret
-
-Function104e8c: ; 104e8c (41:4e8c)
- ld [rRP], a
- ld a, $ff
- ld [hMGStatusFlags], a
- ret
-
-Function104e93: ; 104e93 (41:4e93)
- xor a
- ld [hPrintNum5], a
- ld [hPrintNum6], a
- push hl
- push bc
- ld c, rRP % $100
- ld d, $3d
- call Function104dd1
- ld hl, hPrintNum2 ; $ffb4 (aliases: hMultiplicand)
- ld a, $5a
- ld [hli], a
- ld [hl], b
- dec hl
- ld b, $2
- call Function104ed6
- pop bc
- pop hl
- call Function104ed6
- ld a, [hPrintNum5]
- ld [hPrintNum2], a
- ld a, [hPrintNum6]
- ld [hPrintNum3], a
- push hl
- ld hl, hPrintNum2 ; $ffb4 (aliases: hMultiplicand)
- ld b, $2
- call Function104ed6
- ld hl, hMGStatusFlags
- ld b, $1
- call Function104faf
- ld a, [hPrintNum2]
- ld [hPrintNum5], a
- ld a, [hPrintNum3]
- ld [hPrintNum6], a
- pop hl
- ret
-
-Function104ed6: ; 104ed6 (41:4ed6)
- ld c, rRP % $100
- ld d, $5
- call Function104dd1
- ld d, $5
- call Function104dc5
- ld d, $15
- call Function104dd1
- ld a, b
- cpl
- ld b, a
- ld a, $f4
- ld [rTMA], a
-.asm_104eee
- inc b
- jr z, .asm_104f2e
- ld a, $8
- ld [hPrintNum4], a
- ld a, [hli]
- ld e, a
- ld a, [hPrintNum5]
- add e
- ld [hPrintNum5], a
- ld a, [hPrintNum6]
- adc $0
- ld [hPrintNum6], a
-.asm_104f02
- xor a
- ld [rIF], a
- halt
- ld a, $c1
- ld [rRP], a
- ld d, $1
- ld a, e
- rlca
- ld e, a
- jr nc, .asm_104f13
- inc d
-.asm_104f13
- ld a, [rTIMA]
- cp $f8
- jr c, .asm_104f13
- ld a, $c0
- ld [rRP], a
- dec d
- jr z, .asm_104f25
- xor a
- ld [rIF], a
- halt
-.asm_104f25
- ld a, [hPrintNum4]
- dec a
- jr z, .asm_104eee
- ld [hPrintNum4], a
- jr .asm_104f02
-.asm_104f2e
- ld a, $fe
- ld [rTMA], a
- xor a
- ld [rIF], a
- halt
- ld d, $5
- call Function104dc5
- ld d, $11
- call Function104dd1
- ret
-
-Function104f42: ; 104f42 (41:4f42)
- ld a, [hMGStatusFlags]
- or $2
- ld [hMGStatusFlags], a
- ret
-
-Function104f49: ; 104f49 (41:4f49)
- ld a, [hMGStatusFlags]
- or $1
- ld [hMGStatusFlags], a
- ret
-
-Function104f50: ; 104f50 (41:4f50)
- ld a, [hMGStatusFlags]
- or $80
- ld [hMGStatusFlags], a
- ret
-
-Function104f57: ; 104f57 (41:4f57)
- xor a
- ld [hPrintNum5], a
- ld [hPrintNum6], a
- push bc
- push hl
- ld hl, hPrintNum2 ; $ffb4 (aliases: hMultiplicand)
- ld b, $2
- call Function104faf
- ld a, [hPrintNum3]
- ld [hPrintNum8], a
- ld b, a
- pop hl
- pop af
- cp b
- jp c, Function104f50
- ld a, [hPrintNum2]
- cp $5a
- jp nz, Function104f50
- call Function104faf
- ld a, [hPrintNum5]
- ld d, a
- ld a, [hPrintNum6]
- ld e, a
- push hl
- push de
- ld hl, hPrintNum2 ; $ffb4 (aliases: hMultiplicand)
- ld b, $2
- call Function104faf
- pop de
- ld hl, hPrintNum2 ; $ffb4 (aliases: hMultiplicand)
- ld a, [hli]
- xor d
- ld b, a
- ld a, [hl]
- xor e
- or b
- call nz, Function104f49
- push de
- ld d, $3d
- call Function104dd1
- ld hl, hMGStatusFlags
- ld b, $1
- call Function104ed6
- pop de
- pop hl
- ld a, d
- ld [hPrintNum5], a
- ld a, e
- ld [hPrintNum6], a
- ret
-
-Function104faf: ; 104faf (41:4faf)
- ld c, rRP % $100
- ld d, $0
- call Function104db7
- jp z, Function104f42
- ld d, $0
- call Function104da9
- jp z, Function104f42
- ld d, $0
- call Function104db7
- jp z, Function104f42
- ld a, b
- cpl
- ld b, a
- xor a
- ld [hMGJoypadPressed + 2], a
- call Function104d86
-.asm_104fd2
- inc b
- jr z, .asm_10501a
- ld a, $8
- ld [hPrintNum4], a
-.asm_104fd9
- ld d, $0
-.asm_104fdb
- inc d
- jr z, .asm_104fe5
- ld a, [$ff00+c]
- bit 1, a
- jr z, .asm_104fdb
- ld d, $0
-.asm_104fe5
- inc d
- jr z, .asm_104fed
- ld a, [$ff00+c]
- bit 1, a
- jr nz, .asm_104fe5
-.asm_104fed
- ld a, [hMGJoypadPressed + 2]
- ld d, a
- ld a, [rTIMA]
- ld [hMGJoypadPressed + 2], a
- sub d
- cp $12
- jr c, .asm_104ffd
- set 0, e
- jr .asm_104fff
-.asm_104ffd
- res 0, e
-.asm_104fff
- ld a, [hPrintNum4]
- dec a
- ld [hPrintNum4], a
- jr z, .asm_10500b
- ld a, e
- rlca
- ld e, a
- jr .asm_104fd9
-.asm_10500b
- ld a, e
- ld [hli], a
- ld a, [hPrintNum5]
- add e
- ld [hPrintNum5], a
- ld a, [hPrintNum6]
- adc $0
- ld [hPrintNum6], a
- jr .asm_104fd2
-.asm_10501a
- call Function104d74
- xor a
- ld [rIF], a
- ld d, $0
- call Function104da9
- jp z, Function104f42
- ld d, $10
- call Function104dd1
- ret
-
-Function10502e: ; 10502e (41:502e)
- ld b, $0
- jp Function104e93
-
-Function105033: ; 105033 (41:5033)
- ld b, $0
- jp Function104f57
-
-MysteryGift_ReadJoypad: ; 105038 (41:5038)
-; We can only get four inputs at a time.
-; We take d-pad first for no particular reason.
- ld a, R_DPAD
- ld [rJOYP], a
-; Read twice to give the request time to take.
- ld a, [rJOYP]
- ld a, [rJOYP]
-
-; The Joypad register output is in the lo nybble (inversed).
-; We make the hi nybble of our new container d-pad input.
- cpl
- and $f
- swap a
-
-; We'll keep this in b for now.
- ld b, a
-
-; Buttons make 8 total inputs (A, B, Select, Start).
-; We can fit this into one byte.
- ld a, R_BUTTONS
- ld [rJOYP], a
-; Wait for input to stabilize.
-rept 6
- ld a, [rJOYP]
-endr
-; Buttons take the lo nybble.
- cpl
- and $f
- or b
- ld c, a
-; To get the delta we xor the last frame's input with the new one.
- ld a, [hMGJoypadPressed]
- xor c
-; Released this frame:
- and c
- ld [hMGJoypadReleased], a
-; Pressed this frame:
- ld a, c
- ld [hMGJoypadPressed], a
- ld a, $30
-; Reset the joypad register since we're done with it.
- ld [rJOYP], a
- ret
-
-MysteryGift_CheckAndSetDecorationAlreadyReceived: ; 105069 (41:5069)
- call GetMysteryGiftBank
- ld d, $0
- ld b, CHECK_FLAG
- ld hl, sMysteryGiftDecorationsReceived
- predef_id FlagPredef
- push hl
- push bc
- call Predef
- call CloseSRAM
- ld a, c
- and a
- pop bc
- pop hl
- ret nz
- call GetMysteryGiftBank
- ld b, SET_FLAG
- predef FlagPredef
- call CloseSRAM
- xor a
- ret
-
-MysteryGift_CopyReceivedDecosToPC: ; 105091 (41:5091)
- call GetMysteryGiftBank
- ld c, $0
-.loop
- push bc
- ld d, $0
- ld b, CHECK_FLAG
- ld hl, sMysteryGiftDecorationsReceived
- predef FlagPredef
- ld a, c
- and a
- pop bc
- jr z, .skip
- push bc
- callab SetSpecificDecorationFlag
- pop bc
-.skip
- inc c
- ld a, c
- cp Trophys - DecorationIDs
- jr c, .loop
- jp CloseSRAM
-
-Special_UnlockMysteryGift: ; 1050b9
- call GetMysteryGiftBank
- ld hl, sMysteryGiftUnlocked
- ld a, [hl]
- inc a
- jr nz, .ok
- ld [hld], a
- ld [hl], a
-.ok
- jp CloseSRAM
-; 1050c8
-
-Function1050c8: ; 1050c8
- call GetMysteryGiftBank
- ld a, [sNumDailyMysteryGiftPartnerIDs]
- cp $ff
- jr z, .okay
- xor a
- ld [sNumDailyMysteryGiftPartnerIDs], a
-.okay
- jp CloseSRAM
-; 1050d9
-
-
-BackupMysteryGift: ; 1050d9
- call GetMysteryGiftBank
- ld hl, sMysteryGiftItem
- ld de, sBackupMysteryGiftItem
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hl]
- ld [de], a
- jp CloseSRAM
-; 1050ea
-
-
-RestoreMysteryGift: ; 1050ea (41:50ea)
- call GetMysteryGiftBank
- ld hl, sBackupMysteryGiftItem
- ld de, sMysteryGiftItem
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hl]
- ld [de], a
- jp CloseSRAM
-
-MysteryGift_ClearTrainerData: ; 1050fb (41:50fb)
- ld hl, wMysteryGiftTrainerData
- xor a
- ld b, wMysteryGiftTrainerDataEnd - wMysteryGiftTrainerData
-.loop
- ld [hli], a
- dec b
- jr nz, .loop
- ret
-
-
-GetMysteryGiftBank: ; 105106
- ld a, BANK(sBackupMysteryGiftItem)
- jp GetSRAMBank
-; 10510b
-
-
-StagePartyDataForMysteryGift: ; 10510b (41:510b)
-; You will be sending this data to your mystery gift partner.
-; Structure is the same as a trainer with species and moves
-; defined.
- ld a, BANK(sPokemonData)
- call GetSRAMBank
- ld de, wMysteryGiftStaging
- ld bc, sPokemonData + PartyMons - wPokemonData
- ld hl, sPokemonData + PartySpecies - wPokemonData
-.loop
- ld a, [hli]
- cp -1
- jr z, .party_end
- cp EGG
- jr z, .next
- push hl
- ; copy level
- ld hl, MON_LEVEL
- add hl, bc
- ld a, [hl]
- ld [de], a
- inc de
- ; copy species
- ld hl, MON_SPECIES
- add hl, bc
- ld a, [hl]
- ld [de], a
- inc de
- ; copy moves
- ld hl, MON_MOVES
- add hl, bc
- push bc
- ld bc, NUM_MOVES
- call CopyBytes
- pop bc
- pop hl
-.next
- push hl
- ld hl, PARTYMON_STRUCT_LENGTH
- add hl, bc
- ld b, h
- ld c, l
- pop hl
- jr .loop
-.party_end
- ld a, -1
- ld [de], a
- ld a, $26
- ld [wca00], a
- jp CloseSRAM
-
-InitMysteryGiftLayout: ; 105153 (41:5153)
- call ClearBGPalettes
- call DisableLCD
- ld hl, MysteryGiftGFX
- ld de, VTiles2 tile $00
- ld a, BANK(MysteryGiftGFX)
- ld bc, MysteryGiftGFXEnd - MysteryGiftGFX
- call FarCopyBytes
- hlcoord 0, 0
- ld a, $42
- ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
- call ByteFill
- hlcoord 3, 7
- lb bc, 9, 15
- call ClearBox
- hlcoord 0, 0
- ld a, $0
- ld [hli], a
- inc a
- ld [hl], a
- hlcoord 0, 1
- inc a
- ld [hli], a
- inc a
- ld [hl], a
- hlcoord 7, 1
- ld a, $12
- call .Load5GFX
- hlcoord 2, 2
- ld a, $17
- call .Load16GFX
- hlcoord 2, 3
- ld a, $27
- call .Load16GFX
- hlcoord 9, 4
- ld a, $37
- ld [hli], a
- inc a
- ld [hl], a
- hlcoord 1, 2
- ld [hl], $4
- hlcoord 1, 3
- ld a, $5
- call .Load14Column
- ld a, $9
- hlcoord 18, 5
- call .Load11Column
- hlcoord 2, 5
- ld a, $b
- call .Load16Row
- hlcoord 2, 16
- ld a, $7
- call .Load16Row
- hlcoord 2, 5
- ld a, $d
- call .Load5GFX
- hlcoord 7, 5
- ld [hl], $c
- hlcoord 18, 5
- ld [hl], $a
- hlcoord 18, 16
- ld [hl], $8
- hlcoord 1, 16
- ld [hl], $6
- hlcoord 2, 6
- ld a, $3a
- call .Load16Row
- hlcoord 2, 15
- ld a, $40
- call .Load16Row
- hlcoord 2, 6
- ld a, $3c
- call .Load9Column
- hlcoord 17, 6
- ld a, $3e
- call .Load9Column
- hlcoord 2, 6
- ld [hl], $39
- hlcoord 17, 6
- ld [hl], $3b
- hlcoord 2, 15
- ld [hl], $3f
- hlcoord 17, 15
- ld [hl], $41
- call EnableLCD
- call WaitBGMap
- ld b, SCGB_MYSTERY_GIFT
- call GetSGBLayout
- call SetPalettes
- ret
-
-.Load5GFX: ; 10522e (41:522e)
- ld b, 5
- jr .gfx_loop
-; 105232 (41:5232)
-
-.Load6GFX: ; unreferenced
- ld b, 6
- jr .gfx_loop
-
-.Load16GFX: ; 105236 (41:5236)
- ld b, 16
-
-.gfx_loop ; 105238 (41:5238)
- ld [hli], a
- inc a
- dec b
- jr nz, .gfx_loop
- ret
-
-.Load9Column: ; 10523e (41:523e)
- ld b, 9
- jr .col_loop
-
-.Load11Column: ; 105242 (41:5242)
- ld b, 11
- jr .col_loop
-
-.Load14Column: ; 105246 (41:5246)
- ld b, 14
-
-.col_loop ; 105248 (41:5248)
- ld [hl], a
- ld de, SCREEN_WIDTH
- add hl, de
- dec b
- jr nz, .col_loop
- ret
-
-.Load16Row: ; 105251 (41:5251)
- ld b, 16
-.row_loop
- ld [hli], a
- dec b
- jr nz, .row_loop
- ret
-
-MysteryGiftGFX: ; 105258
-INCBIN "gfx/misc/mystery_gift.2bpp"
-MysteryGiftGFXEnd:
-
-Function105688: ; 105688 (41:5688)
- call ClearTileMap
- call ClearSprites
- call WaitBGMap
- call Function1057d7
- hlcoord 3, 8
- ld de, String_10572e
- call PlaceString
- call WaitBGMap
- call Function10578c
- call MysteryGift_ClearTrainerData
- ld a, $24
- ld [wca02], a
- ld a, [rIE]
- push af
- call Function104c2d
- ld d, a
- xor a
- ld [rIF], a
- pop af
- ld [rIE], a
- ld a, d
- cp $10
- jp z, Function105712
- cp $6c
- jp nz, Function10571a
- call Function1056eb
- ld c, 60
- call DelayFrames
- call Function105777
- ld hl, Text_ReceivedCard
- call PrintText
- ld de, wMysteryGiftTrainerData
- callba Function8ac70
- ld a, c
- ld [wd265], a
- ld hl, Text_CardNotRegistered
- jr c, asm_105726
- ld hl, Text_ListedCardAsNumber
- jr asm_105726
-
-Function1056eb: ; 1056eb (41:56eb)
- ld c, $10
-.asm_1056ed
- ld hl, Sprites
- ld b, $8
-.asm_1056f2
- dec [hl]
-rept 4
- inc hl
-endr
- dec b
- jr nz, .asm_1056f2
- ld hl, Sprites + $20
- ld b, $8
-.asm_1056ff
- inc [hl]
-rept 4
- inc hl
-endr
- dec b
- jr nz, .asm_1056ff
- dec c
- ret z
- push bc
- ld c, 4
- call DelayFrames
- pop bc
- jr .asm_1056ed
-
-Function105712: ; 105712 (41:5712)
- call Function105777
- ld hl, Text_MGLinkCanceled
- jr asm_105726
-
-Function10571a: ; 10571a (41:571a)
- call Function105777
- ld hl, Text_MGCommError
- call PrintText
- jp Function105688
-
-asm_105726: ; 105726 (41:5726)
- call PrintText
- ld a, $e3
- ld [rLCDC], a
- ret
-; 10572e (41:572e)
-
-String_10572e: ; 10572e
- db "エーボタン¯おすと"
- next "つうしん<PKMN>おこなわれるよ!"
- next "ビーボタン¯おすと"
- next "つうしん¯ちゅうし します"
- db "@"
-
-; 10575e
-
-Text_ReceivedCard: ; 10575e
- text_jump UnknownText_0x1c051a
- db "@"
-
-Text_ListedCardAsNumber: ; 105763
- text_jump UnknownText_0x1c0531
- db "@"
-
-Text_CardNotRegistered: ; 105768
- text_jump UnknownText_0x1c0555
- db "@"
-
-Text_MGLinkCanceled: ; 10576d
- text_jump UnknownText_0x1c0573
- db "@"
-
-Text_MGCommError: ; 105772
- text_jump UnknownText_0x1c0591
- db "@"
-; 105777
-
-Function105777: ; 105777 (41:5777)
- call ClearSprites
- call ClearTileMap
- call EnableLCD
- call WaitBGMap
- ld b, SCGB_DIPLOMA
- call GetSGBLayout
- call SetPalettes
- ret
-
-Function10578c: ; 10578c (41:578c)
- ld de, OverworldMap
- ld a, BANK(sPlayerData)
- call GetSRAMBank
- ld hl, sPlayerData + PlayerName - wPlayerData
- ld bc, NAME_LENGTH
- call CopyBytes
- ld hl, sPlayerData + PlayerID - wPlayerData
- ld bc, 2
- call CopyBytes
- ld hl, sPlayerData + wSecretID - wPlayerData
- ld bc, 2
- call CopyBytes
- call CloseSRAM
- ld a, BANK(sCrystalData)
- call GetSRAMBank
- ld a, [sCrystalData + 0]
- ld [de], a
- inc de
- ld a, $4
- call GetSRAMBank
- ld hl, $a603
- ld bc, $8
- call CopyBytes
- ld hl, $a007
- ld bc, $c
- call CopyBytes
- call CloseSRAM
- ret
-
-Function1057d7: ; 1057d7 (41:57d7)
- call ClearBGPalettes
- call DisableLCD
- ld hl, MysteryGiftJP_GFX
- ld de, VTiles2 tile $00
- ld a, BANK(MysteryGiftJP_GFX)
- lb bc, 4, 0
- call FarCopyBytes
- ld hl, MysteryGiftJP_GFX + $400
- ld de, VTiles0 tile $00
- ld a, BANK(MysteryGiftJP_GFX)
- ld bc, $80
- call FarCopyBytes
- hlcoord 0, 0
- ld a, $3f
- ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
- call ByteFill
- hlcoord 3, 7
- lb bc, 9, 15
- call ClearBox
- hlcoord 0, 0
- ld a, $0
- ld [hli], a
- inc a
- ld [hl], a
- hlcoord 0, 1
- inc a
- ld [hli], a
- inc a
- ld [hl], a
- hlcoord 4, 2
- ld a, $13
- call .Load11Row
- hlcoord 4, 3
- ld a, $1e
- call .Load12Row
- hlcoord 4, 4
- ld a, $2a
- call .Load12Row
- hlcoord 1, 2
- ld [hl], $4
- hlcoord 1, 3
- ld a, $5
- call .Load14Column
- ld a, $9
- hlcoord 18, 5
- call .Load11Column
- hlcoord 2, 5
- ld a, $b
- call .Load16Row
- hlcoord 2, 16
- ld a, $7
- call .Load16Row
- hlcoord 2, 5
- ld a, $d
- call .Load6Row
- hlcoord 8, 5
- ld [hl], $c
- hlcoord 18, 5
- ld [hl], $a
- hlcoord 18, 16
- ld [hl], $8
- hlcoord 1, 16
- ld [hl], $6
- hlcoord 2, 6
- ld a, $37
- call .Load16Row
- hlcoord 2, 15
- ld a, $3d
- call .Load16Row
- hlcoord 2, 6
- ld a, $39
- call .Load9Column
- hlcoord 17, 6
- ld a, $3b
- call .Load9Column
- hlcoord 2, 6
- ld [hl], $36
- hlcoord 17, 6
- ld [hl], $38
- hlcoord 2, 15
- ld [hl], $3c
- hlcoord 17, 15
- ld [hl], $3e
- ld de, Sprites
- ld hl, .OAM_data
- ld bc, $40
- call CopyBytes
- call EnableLCD
- call WaitBGMap
- ld b, $2
- callba GetMysteryGift_MobileAdapterLayout
- jp SetPalettes
-
-.Load6Row: ; 1058c6 (41:58c6)
- ld b, 6
- jr .row_loop
-
-.Load11Row: ; 1058ca (41:58ca)
- ld b, 11
- jr .row_loop
-
-.Load12Row: ; 1058ce (41:58ce)
- ld b, 12
-
-.row_loop ; 1058d0 (41:58d0)
- ld [hli], a
- inc a
- dec b
- jr nz, .row_loop
- ret
-
-.Load9Column: ; 1058d6 (41:58d6)
- ld b, 9
- jr .column_loop
-
-.Load11Column: ; 1058da (41:58da)
- ld b, 11
- jr .column_loop
-
-.Load14Column: ; 1058de (41:58de)
- ld b, 14
-
-.column_loop ; 1058e0 (41:58e0)
- ld [hl], a
- ld de, SCREEN_WIDTH
- add hl, de
- dec b
- jr nz, .column_loop
- ret
-
-.Load16Row: ; 1058e9 (41:58e9)
- ld b, 16
-.row_loop_no_inc
- ld [hli], a
- dec b
- jr nz, .row_loop_no_inc
- ret
-; 1058f0 (41:58f0)
-
-.OAM_data: ; 1058f0
- dsprite 2, 1, 6, 4, $00, $00
- dsprite 2, 1, 7, 4, $01, $00
- dsprite 2, 1, 8, 4, $02, $00
- dsprite 2, 1, 9, 4, $03, $00
- dsprite 3, 1, 6, 4, $04, $00
- dsprite 3, 1, 7, 4, $05, $00
- dsprite 3, 1, 8, 4, $06, $00
- dsprite 3, 1, 9, 4, $07, $00
- dsprite 0, 1, 11, 4, $00, $00
- dsprite 0, 1, 12, 4, $01, $00
- dsprite 0, 1, 13, 4, $02, $00
- dsprite 0, 1, 14, 4, $03, $00
- dsprite 1, 1, 11, 4, $04, $00
- dsprite 1, 1, 12, 4, $05, $00
- dsprite 1, 1, 13, 4, $06, $00
- dsprite 1, 1, 14, 4, $07, $00
-
-; japanese mystery gift gfx
-MysteryGiftJP_GFX: ; 105930
-INCBIN "gfx/misc/mystery_gift_jp.2bpp"
diff --git a/engine/mysterygift2.asm b/engine/mysterygift2.asm
deleted file mode 100755
index 4048ea533..000000000
--- a/engine/mysterygift2.asm
+++ /dev/null
@@ -1,227 +0,0 @@
-PrepMysteryGiftDataToSend: ; 2c642 (b:4642)
- ld de, wMysteryGiftStaging
- ld a, $1
- ld [de], a
- inc de ; wc801
- ld a, BANK(sGameData)
- call GetSRAMBank
- ld hl, sPlayerData + PlayerID - wPlayerData
- ld a, [hli]
- ld [de], a
- ld b, a
- inc de
- ld a, [hl]
- ld [de], a
- ld c, a
- inc de ; wc803
- push bc
- ld hl, sPlayerData + PlayerName - wPlayerData
- ld bc, NAME_LENGTH
- call CopyBytes
- push de ; wc80e
- ld hl, sPokemonData + PokedexCaught - wPokemonData
- ld b, EndPokedexCaught - PokedexCaught
- call CountSetBits
- pop de
- pop bc
- ld a, [wd265]
- ld [de], a
- inc de ; wc80f
- call CloseSRAM
- call Random
- and $1
- ld [de], a
- inc de ; wc810
- call .RandomSample
- ld [de], a
- inc de ; wc811
- ld a, c
- ld c, b
- ld b, a
- call .RandomSample
- ld [de], a
- inc de ; wc812
- ld a, BANK(sBackupMysteryGiftItem)
- call GetSRAMBank
- ld a, [sBackupMysteryGiftItem]
- ld [de], a
- inc de
- ld a, [sBackupMysteryGiftItem + 1]
- ld [de], a
- ld a, $14
- ld [wca00], a
- call CloseSRAM
- ld hl, wMysteryGiftStaging
- ld de, wMysteryGiftPlayerData
- ld bc, wMysteryGiftPlayerDataEnd - wMysteryGiftPlayerData
- jp CopyBytes
-
-.RandomSample: ; 2c6ac (b:46ac)
- push de
- call Random
- cp $19 ; 10 percent
- jr c, .tenpercent
- call Random
- and $7
- ld d, a
- rl d
- ld e, $80
-.loop
- rlc e
- dec a
- jr nz, .loop
- ld a, e
- and c
- jr z, .skip
- ld a, $1
-.skip
- add d
- jr .done
-
-.tenpercent
- call Random
- cp $32 ; 20 percent
- jr c, .twopercent
- call Random
- and $3
- ld d, a
- rl d
- ld e, $80
-.loop2
- rlc e
- dec a
- jr nz, .loop2
- ld a, e
- and b
- jr z, .skip2
- ld a, $1
-.skip2
- add d
- add $10
- jr .done
-
-.twopercent
- call Random
- cp $32 ; 50 ; 20 percent
- jr c, .pointfourpercent
- ld a, b
- swap a
- and $7
- add $18
- jr .done
-
-.pointfourpercent
- ld a, b
- and $80
- ld a, $20
- jr z, .done
- ld a, $21
-
-.done
- pop de
- ret
-
-MysteryGiftGetItemHeldEffect: ; 2c708 (b:4708)
- ld a, c
- cp $25 ; 37
- jr nc, MysteryGiftFallbackItem
- ld hl, MysteryGiftItems
- ld b, 0
- add hl, bc
- ld c, [hl]
- ret
-
-MysteryGiftGetDecoration: ; 2c715 (b:4715)
- ld a, c
- cp $25 ; 37
- jr nc, MysteryGiftFallbackItem
- ld hl, MysteryGiftDecos
- ld b, 0
- add hl, bc
- ld c, [hl]
- ret
-
-MysteryGiftFallbackItem: ; 2c722 (b:4722)
- ld c, DECO_POLKADOT_BED ; GREAT_BALL
- ret
-; 2c725 (b:4725)
-
-MysteryGiftItems: ; 2c725
- db BERRY
- db PRZCUREBERRY
- db MINT_BERRY
- db ICE_BERRY
- db BURNT_BERRY
- db PSNCUREBERRY
- db GUARD_SPEC
- db X_DEFEND
- db X_ATTACK
- db BITTER_BERRY
- db DIRE_HIT
- db X_SPECIAL
- db X_ACCURACY
- db EON_MAIL
- db MORPH_MAIL
- db MUSIC_MAIL
- db MIRACLEBERRY
- db GOLD_BERRY
- db REVIVE
- db GREAT_BALL
- db SUPER_REPEL
- db MAX_REPEL
- db ELIXER
- db ETHER
- db WATER_STONE
- db FIRE_STONE
- db LEAF_STONE
- db THUNDERSTONE
- db MAX_ETHER
- db MAX_ELIXER
- db MAX_REVIVE
- db SCOPE_LENS
- db HP_UP
- db PP_UP
- db RARE_CANDY
- db BLUESKY_MAIL
- db MIRAGE_MAIL
-; 2c74a
-
-MysteryGiftDecos: ; 2c74a
- db DECOFLAG_PIKACHU_DOLL
- db DECOFLAG_BULBASAUR_DOLL
- db DECOFLAG_CHARMANDER_DOLL
- db DECOFLAG_SQUIRTLE_DOLL
- db DECOFLAG_POLIWAG_DOLL
- db DECOFLAG_DIGLETT_DOLL
- db DECOFLAG_STARMIE_DOLL
- db DECOFLAG_MAGIKARP_DOLL
- db DECOFLAG_ODDISH_DOLL
- db DECOFLAG_GENGAR_DOLL
- db DECOFLAG_CLEFAIRY_POSTER
- db DECOFLAG_JIGGLYPUFF_POSTER
- db DECOFLAG_SNES
- db DECOFLAG_SHELLDER_DOLL
- db DECOFLAG_VOLTORB_DOLL
- db DECOFLAG_WEEDLE_DOLL
- db DECOFLAG_MAGNAPLANT
- db DECOFLAG_TROPICPLANT
- db DECOFLAG_FAMICOM
- db DECOFLAG_N64
- db DECOFLAG_SURF_PIKACHU_DOLL
- db DECOFLAG_JIGGLYPUFF_DOLL
- db DECOFLAG_PINK_BED
- db DECOFLAG_POLKADOT_BED
- db DECOFLAG_RED_CARPET
- db DECOFLAG_BLUE_CARPET
- db DECOFLAG_YELLOW_CARPET
- db DECOFLAG_GREEN_CARPET
- db DECOFLAG_JUMBOPLANT
- db DECOFLAG_VIRTUAL_BOY
- db DECOFLAG_MACHOP_DOLL
- db DECOFLAG_PIKACHU_POSTER
- db DECOFLAG_TENTACOOL_DOLL
- db DECOFLAG_BIG_ONIX_DOLL
- db DECOFLAG_PIKACHU_BED
- db DECOFLAG_GRIMER_DOLL
- db DECOFLAG_UNOWN_DOLL
-; 2c76f
diff --git a/engine/namingscreen.asm b/engine/namingscreen.asm
index 4a7ca301a..484bbe753 100755
--- a/engine/namingscreen.asm
+++ b/engine/namingscreen.asm
@@ -103,7 +103,7 @@ NamingScreen: ; 116c1
inc de
hlcoord 5, 4
call PlaceString
- callba GetGender
+ farcall GetGender
jr c, .genderless
ld a, "♂"
jr nz, .place_gender
@@ -124,7 +124,7 @@ NamingScreen: ; 116c1
; 1178d
.Player: ; 1178d (4:578d)
- callba GetPlayerIcon
+ farcall GetPlayerIcon
call .LoadSprite
hlcoord 5, 2
ld de, .PlayerNameString
@@ -352,14 +352,14 @@ NamingScreenJoypadLoop: ; 11915
bit 7, a
jr nz, .quit
call .RunJumptable
- callba PlaySpriteAnimationsAndDelayFrame
+ farcall PlaySpriteAnimationsAndDelayFrame
call .UpdateStringEntry
call DelayFrame
and a
ret
.quit
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
call ClearSprites
xor a
ld [hSCX], a
@@ -419,7 +419,7 @@ NamingScreenJoypadLoop: ; 11915
jr nz, .got_cursor_position
ld d, 8 * 8
.got_cursor_position
- ld a, SPRITE_ANIM_INDEX_02
+ ld a, SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR
call _InitSpriteAnimStruct
ld a, c
ld [wNamingScreenCursorObjectPointer], a
@@ -900,7 +900,7 @@ NamingScreen_GetLastCharacter: ; 11c11 (4:5c11)
LoadNamingScreenGFX: ; 11c51
call ClearSprites
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
call LoadStandardFont
call LoadFontsExtra
@@ -946,55 +946,26 @@ LoadNamingScreenGFX: ; 11c51
; 11cb7
NamingScreenGFX_Border: ; 11cb7
-INCBIN "gfx/unknown/011cb7.2bpp"
+INCBIN "gfx/namingscreen/border.2bpp"
; 11cc7
NamingScreenGFX_Cursor: ; 11cc7
-INCBIN "gfx/unknown/011cc7.2bpp"
+INCBIN "gfx/namingscreen/cursor.2bpp"
; 11ce7
-NameInputLower:
- db "a b c d e f g h i"
- db "j k l m n o p q r"
- db "s t u v w x y z "
- db "× ( ) : ; [ ] <PK> <MN>"
- db "UPPER DEL END "
-
-BoxNameInputLower:
- db "a b c d e f g h i"
- db "j k l m n o p q r"
- db "s t u v w x y z "
- db "é 'd 'l 'm 'r 's 't 'v 0"
- db "1 2 3 4 5 6 7 8 9"
- db "UPPER DEL END "
-
-NameInputUpper:
- db "A B C D E F G H I"
- db "J K L M N O P Q R"
- db "S T U V W X Y Z "
- db "- ? ! / . , "
- db "lower DEL END "
-
-BoxNameInputUpper:
- db "A B C D E F G H I"
- db "J K L M N O P Q R"
- db "S T U V W X Y Z "
- db "× ( ) : ; [ ] <PK> <MN>"
- db "- ? ! ♂ ♀ / . , &"
- db "lower DEL END "
-
+INCLUDE "data/name_input_chars.asm"
; 11e5d
-GFX_11e5d: ; ????
-INCBIN "gfx/unknown/011e5d.1bpp"
+NamingScreenGFX_End: ; unused
+INCBIN "gfx/namingscreen/end.1bpp"
; 11e6d
NamingScreenGFX_MiddleLine:
-INCBIN "gfx/unknown/011e65.1bpp"
+INCBIN "gfx/namingscreen/middle_line.1bpp"
; 11e6d
NamingScreenGFX_UnderLine: ; 11e6d
-INCBIN "gfx/unknown/011e6d.1bpp"
+INCBIN "gfx/namingscreen/underline.1bpp"
; 11e75
_ComposeMailMessage: ; 11e75 (mail?)
@@ -1039,7 +1010,7 @@ _ComposeMailMessage: ; 11e75 (mail?)
; init mail icon
depixel 3, 2
- ld a, SPRITE_ANIM_INDEX_00
+ ld a, SPRITE_ANIM_INDEX_PARTY_MON
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
@@ -1125,14 +1096,14 @@ INCBIN "gfx/icon/mail2.2bpp"
bit 7, a
jr nz, .exit_mail
call .DoJumptable
- callba PlaySpriteAnimationsAndDelayFrame
+ farcall PlaySpriteAnimationsAndDelayFrame
call .Update
call DelayFrame
and a
ret
.exit_mail
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
call ClearSprites
xor a
ld [hSCX], a
@@ -1174,7 +1145,7 @@ INCBIN "gfx/icon/mail2.2bpp"
.init_blinking_cursor ; 1201b (4:601b)
depixel 9, 2
- ld a, SPRITE_ANIM_INDEX_09
+ ld a, SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR
call _InitSpriteAnimStruct
ld a, c
ld [wNamingScreenCursorObjectPointer], a
@@ -1499,22 +1470,6 @@ MailComposition_TryAddLastCharacter: ; 121ac (4:61ac)
; 121dd
-MailEntry_Uppercase: ; 122dd
- db "A B C D E F G H I J"
- db "K L M N O P Q R S T"
- db "U V W X Y Z , ? !"
- db "1 2 3 4 5 6 7 8 9 0"
- db "<PK> <MN> <PO> <KE> é ♂ ♀ ¥ … ×"
- db "lower DEL END "
-
-; 1224f
-
-MailEntry_Lowercase: ; 1224f
- db "a b c d e f g h i j"
- db "k l m n o p q r s t"
- db "u v w x y z . - /"
- db "'d 'l 'm 'r 's 't 'v & ( )"
- db "<``> <''> [ ] ' : ; "
- db "UPPER DEL END "
+INCLUDE "data/mail_input_chars.asm"
; 122c1
diff --git a/engine/npc_movement.asm b/engine/npc_movement.asm
index bc36e3ee9..a2508e0f6 100755
--- a/engine/npc_movement.asm
+++ b/engine/npc_movement.asm
@@ -7,7 +7,8 @@ Function6ec1: ; 6ec1
ld hl, OBJECT_FLAGS1
add hl, bc
- bit 4, [hl] ; lost
+ bit 4, [hl] ; lost, uncomment next line to fix
+; jr nz, .resume
push hl
push bc
call Function6f2c
@@ -34,7 +35,7 @@ Function6ec1: ; 6ec1
push hl
push bc
- call WillPersonBumpIntoSomeoneElse
+ call WillObjectBumpIntoSomeoneElse
pop bc
pop hl
ret c
@@ -43,12 +44,12 @@ Function6ec1: ; 6ec1
bit 5, [hl]
jr nz, .bit_5
push hl
- call HasPersonReachedMovementLimit
+ call HasObjectReachedMovementLimit
pop hl
ret c
push hl
- call IsPersonMovingOffEdgeOfScreen
+ call IsObjectMovingOffEdgeOfScreen
pop hl
ret c
@@ -118,7 +119,7 @@ Function6f3e: ; 6f3e
; 6f5b
.data_6f5b
- db 1 << DOWN, 1 << UP, 1 << RIGHT, 1 << LEFT
+ db DOWN_MASK, UP_MASK, RIGHT_MASK, LEFT_MASK
; 6f5f
Function6f5f: ; 6f5f
@@ -143,7 +144,7 @@ Function6f5f: ; 6f5f
; 6f7b
.data_6f7b
- db 1 << UP, 1 << DOWN, 1 << LEFT, 1 << RIGHT
+ db UP_MASK, DOWN_MASK, LEFT_MASK, RIGHT_MASK
; 6f7f
Function6f7f: ; 6f7f
@@ -268,7 +269,7 @@ CheckFacingObject:: ; 6fd9
; 7009
-WillPersonBumpIntoSomeoneElse: ; 7009
+WillObjectBumpIntoSomeoneElse: ; 7009
ld hl, OBJECT_NEXT_MAP_X
add hl, bc
ld d, [hl]
@@ -390,7 +391,7 @@ IsNPCAtCoord: ; 7041
ret
; 70a4
-HasPersonReachedMovementLimit: ; 70a4
+HasObjectReachedMovementLimit: ; 70a4
ld hl, OBJECT_RADIUS
add hl, bc
ld a, [hl]
@@ -450,7 +451,7 @@ HasPersonReachedMovementLimit: ; 70a4
ret
; 70ed
-IsPersonMovingOffEdgeOfScreen: ; 70ed
+IsObjectMovingOffEdgeOfScreen: ; 70ed
ld hl, OBJECT_NEXT_MAP_X
add hl, bc
ld a, [XCoord]
diff --git a/engine/npctrade.asm b/engine/npctrade.asm
index 01631d051..1455dce62 100755
--- a/engine/npctrade.asm
+++ b/engine/npctrade.asm
@@ -1,26 +1,10 @@
-
-; Trade struct
-TRADE_DIALOG EQU 0
-TRADE_GIVEMON EQU 1
-TRADE_GETMON EQU 2
-TRADE_NICK EQU 3
-TRADE_DVS EQU 14
-TRADE_ITEM EQU 16
-TRADE_OT_ID EQU 17
-TRADE_OT_NAME EQU 19
-TRADE_GENDER EQU 30
-TRADE_PADDING EQU 31
-
; Trade dialogs
-TRADE_INTRO EQU 0
-TRADE_CANCEL EQU 1
-TRADE_WRONG EQU 2
-TRADE_COMPLETE EQU 3
-TRADE_AFTER EQU 4
-
-TRADE_EITHER_GENDER EQU 0
-TRADE_MALE_ONLY EQU 1
-TRADE_FEMALE_ONLY EQU 2
+ const_def
+ const TRADE_INTRO
+ const TRADE_CANCEL
+ const TRADE_WRONG
+ const TRADE_COMPLETE
+ const TRADE_AFTER
NPCTrade:: ; fcba8
ld a, e
@@ -40,7 +24,7 @@ NPCTrade:: ; fcba8
; Select givemon from party
ld b, PARTYMENUACTION_GIVE_MON
- callba SelectTradeOrDaycareMon
+ farcall SelectTradeOrDayCareMon
ld a, TRADE_CANCEL
jr c, .done
@@ -104,12 +88,12 @@ CheckTradeGender: ; fcc23
cp 1
jr z, .check_male
- callba GetGender
+ farcall GetGender
jr nz, .not_matching
jr .matching
.check_male
- callba GetGender
+ farcall GetGender
jr z, .not_matching
.matching
@@ -187,7 +171,7 @@ DoNPCTrade: ; fcc63
call Trade_GetAttributeOfCurrentPartymon
ld b, h
ld c, l
- callba GetCaughtGender
+ farcall GetCaughtGender
ld a, c
ld [wPlayerTrademonCaughtData], a
@@ -211,7 +195,7 @@ DoNPCTrade: ; fcc63
xor a
ld [MonType], a
ld [wPokemonWithdrawDepositParameter], a
- callab RemoveMonFromPartyOrBox
+ callfar RemoveMonFromPartyOrBox
predef TryAddMonToParty
ld e, TRADE_DIALOG
@@ -222,7 +206,7 @@ DoNPCTrade: ; fcc63
jr c, .incomplete
ld b, SET_FLAG
.incomplete
- callba SetGiftPartyMonCaughtData
+ farcall SetGiftPartyMonCaughtData
ld e, TRADE_NICK
call GetTradeAttribute
@@ -291,7 +275,7 @@ DoNPCTrade: ; fcc63
ld a, [PartyCount]
dec a
ld [CurPartyMon], a
- callba ComputeNPCTrademonStats
+ farcall ComputeNPCTrademonStats
pop af
ld [CurPartyMon], a
pop hl
@@ -427,25 +411,7 @@ GetTradeMonNames: ; fce1b
; fce58
-NPCTrades: ; fce58
-npctrade: MACRO
- db \1, \2, \3, \4 ; dialog set, requested mon, offered mon, nickname
- db \5, \6 ; dvs
- shift
- db \6 ; item
- dw \7 ; OT ID
- db \8, \9, 0 ; OT name, gender requested
-ENDM
-
-
- npctrade 0, ABRA, MACHOP, "MUSCLE@@@@@", $37, $66, GOLD_BERRY, 37460, "MIKE@@@@@@@", TRADE_EITHER_GENDER
- npctrade 0, BELLSPROUT, ONIX, "ROCKY@@@@@@", $96, $66, BITTER_BERRY, 48926, "KYLE@@@@@@@", TRADE_EITHER_GENDER
- npctrade 1, KRABBY, VOLTORB, "VOLTY@@@@@@", $98, $88, PRZCUREBERRY, 29189, "TIM@@@@@@@@", TRADE_EITHER_GENDER
- npctrade 3, DRAGONAIR, DODRIO, "DORIS@@@@@@", $77, $66, SMOKE_BALL, 00283, "EMY@@@@@@@@", TRADE_FEMALE_ONLY
- npctrade 2, HAUNTER, XATU, "PAUL@@@@@@@", $96, $86, MYSTERYBERRY, 15616, "CHRIS@@@@@@", TRADE_EITHER_GENDER
- npctrade 3, CHANSEY, AERODACTYL, "AEROY@@@@@@", $96, $66, GOLD_BERRY, 26491, "KIM@@@@@@@@", TRADE_EITHER_GENDER
- npctrade 0, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $96, $66, METAL_COAT, 50082, "FOREST@@@@@", TRADE_EITHER_GENDER
-; fcf38
+INCLUDE "data/npc_trades.asm"
PrintTradeText: ; fcf38
diff --git a/engine/odd_eggs.asm b/engine/odd_eggs.asm
new file mode 100644
index 000000000..5d67358f0
--- /dev/null
+++ b/engine/odd_eggs.asm
@@ -0,0 +1,96 @@
+GiveOddEgg: ; 1fb4b6
+ ; Figure out which egg to give.
+
+ ; Compare a random word to
+ ; probabilities out of 0xffff.
+ call Random
+ ld hl, OddEggProbabilities
+ ld c, 0
+ ld b, c
+.loop
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+
+ ; Break on $ffff.
+ ld a, d
+ cp $ffff / $100
+ jr nz, .not_done
+ ld a, e
+ cp $ffff % $100
+ jr z, .done
+.not_done
+
+ ; Break when [hRandom] <= de.
+ ld a, [hRandom + 1]
+ cp d
+ jr c, .done
+ jr z, .ok
+ jr .next
+.ok
+ ld a, [hRandom + 0]
+ cp e
+ jr c, .done
+ jr z, .done
+.next
+ inc bc
+ jr .loop
+.done
+
+ ld hl, OddEggs
+ ld a, OddEgg2 - OddEgg1
+ call AddNTimes
+
+ ld de, OddEggSpecies
+ ld bc, PARTYMON_STRUCT_LENGTH + 2 * PKMN_NAME_LENGTH
+ call CopyBytes
+
+ ld a, EGG_TICKET
+ ld [CurItem], a
+ ld a, 1
+ ld [wItemQuantityChangeBuffer], a
+ ld a, -1
+ ld [CurItemQuantity], a
+ ld hl, NumItems
+ call TossItem
+
+ ; load species in wcd2a
+ ld a, EGG
+ ld [wMobileMonSpeciesBuffer], a
+
+ ; load pointer to (wMobileMonSpeciesBuffer - 1) in wMobileMonSpeciesPointerBuffer
+ ld a, (wMobileMonSpeciesBuffer - 1) % $100
+ ld [wMobileMonSpeciesPointerBuffer], a
+ ld a, (wMobileMonSpeciesBuffer - 1) / $100
+ ld [wMobileMonSpeciesPointerBuffer + 1], a
+ ; load pointer to OddEggSpecies in wMobileMonStructurePointerBuffer
+ ld a, OddEggSpecies % $100
+ ld [wMobileMonStructurePointerBuffer], a
+ ld a, OddEggSpecies / $100
+ ld [wMobileMonStructurePointerBuffer + 1], a
+
+ ; load Odd Egg Name in wTempOddEggNickname
+ ld hl, .Odd
+ ld de, wTempOddEggNickname
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+
+ ; load pointer to wTempOddEggNickname in wMobileMonOTNamePointerBuffer
+ ld a, wTempOddEggNickname % $100
+ ld [wMobileMonOTNamePointerBuffer], a
+ ld a, wTempOddEggNickname / $100
+ ld [wMobileMonOTNamePointerBuffer + 1], a
+ ; load pointer to wOddEggName in wMobileMonNicknamePointerBuffer
+ ld a, wOddEggName % $100
+ ld [wMobileMonNicknamePointerBuffer], a
+ ld a, wOddEggName / $100
+ ld [wMobileMonNicknamePointerBuffer + 1], a
+ farcall AddMobileMonToParty
+ ret
+; 1fb546
+
+.Odd:
+ db "ODD@@@@@@@@@"
+
+INCLUDE "data/odd_eggs.asm"
diff --git a/engine/options_menu.asm b/engine/options_menu.asm
index ec41288ff..4ab215282 100755
--- a/engine/options_menu.asm
+++ b/engine/options_menu.asm
@@ -105,6 +105,11 @@ GetOptionPointer: ; e42d6
; e42f5
+ const_def
+ const OPT_TEXT_SPEED_FAST ; 0
+ const OPT_TEXT_SPEED_MED ; 1
+ const OPT_TEXT_SPEED_SLOW ; 2
+
Options_TextSpeed: ; e42f5
call GetTextSpeed
ld a, [hJoyPressed]
@@ -113,9 +118,9 @@ Options_TextSpeed: ; e42f5
bit D_RIGHT_F, a
jr z, .NonePressed
ld a, c ; right pressed
- cp SLOW_TEXT
+ cp OPT_TEXT_SPEED_SLOW
jr c, .Increase
- ld c, FAST_TEXT +- 1
+ ld c, OPT_TEXT_SPEED_FAST +- 1
.Increase:
inc c
@@ -126,7 +131,7 @@ Options_TextSpeed: ; e42f5
ld a, c
and a
jr nz, .Decrease
- ld c, SLOW_TEXT + 1
+ ld c, OPT_TEXT_SPEED_SLOW + 1
.Decrease:
dec c
@@ -154,38 +159,39 @@ Options_TextSpeed: ; e42f5
; e4331
.Strings:
+; entries correspond to OPT_TEXT_SPEED_* constants
dw .Fast
dw .Mid
dw .Slow
-.Fast:
- db "FAST@"
-.Mid:
- db "MID @"
-.Slow:
- db "SLOW@"
+.Fast: db "FAST@"
+.Mid: db "MID @"
+.Slow: db "SLOW@"
; e4346
GetTextSpeed: ; e4346
- ld a, [Options] ; This converts the number of frames, to 0, 1, 2 representing speed
- and 7
- cp 5 ; 5 frames of delay is slow
+; converts TEXT_DELAY_* value in a to OPT_TEXT_SPEED_* value in c,
+; with previous/next TEXT_DELAY_* values in d/e
+ ld a, [Options]
+ and $7
+ cp TEXT_DELAY_SLOW
jr z, .slow
- cp 1 ; 1 frame of delay is fast
+ cp TEXT_DELAY_FAST
jr z, .fast
- ld c, MED_TEXT ; set it to mid if not one of the above
- lb de, 1, 5
+ ; none of the above
+ ld c, OPT_TEXT_SPEED_MED
+ lb de, TEXT_DELAY_FAST, TEXT_DELAY_SLOW
ret
.slow
- ld c, SLOW_TEXT
- lb de, 3, 1
+ ld c, OPT_TEXT_SPEED_SLOW
+ lb de, TEXT_DELAY_MED, TEXT_DELAY_FAST
ret
.fast
- ld c, FAST_TEXT
- lb de, 5, 3
+ ld c, OPT_TEXT_SPEED_FAST
+ lb de, TEXT_DELAY_SLOW, TEXT_DELAY_MED
ret
; e4365
@@ -227,10 +233,8 @@ Options_BattleScene: ; e4365
ret
; e4398
-.On:
- db "ON @"
-.Off:
- db "OFF@"
+.On: db "ON @"
+.Off: db "OFF@"
; e43a0
@@ -270,10 +274,8 @@ Options_BattleStyle: ; e43a0
ret
; e43d1
-.Shift:
- db "SHIFT@"
-.Set:
- db "SET @"
+.Shift: db "SHIFT@"
+.Set: db "SET @"
; e43dd
@@ -320,13 +322,18 @@ Options_Sound: ; e43dd
ret
; e4416
-.Mono:
- db "MONO @"
-.Stereo:
- db "STEREO@"
+.Mono: db "MONO @"
+.Stereo: db "STEREO@"
; e4424
+ const_def
+ const OPT_PRINT_LIGHTEST ; 0
+ const OPT_PRINT_LIGHTER ; 1
+ const OPT_PRINT_NORMAL ; 2
+ const OPT_PRINT_DARKER ; 3
+ const OPT_PRINT_DARKEST ; 4
+
Options_Print: ; e4424
call GetPrinterSetting
ld a, [hJoyPressed]
@@ -335,9 +342,9 @@ Options_Print: ; e4424
bit D_RIGHT_F, a
jr z, .NonePressed
ld a, c
- cp 4
+ cp OPT_PRINT_DARKEST
jr c, .Increase
- ld c, -1
+ ld c, OPT_PRINT_LIGHTEST - 1
.Increase:
inc c
@@ -348,7 +355,7 @@ Options_Print: ; e4424
ld a, c
and a
jr nz, .Decrease
- ld c, 5
+ ld c, OPT_PRINT_DARKEST + 1
.Decrease:
dec c
@@ -373,57 +380,56 @@ Options_Print: ; e4424
; e445a
.Strings:
+; entries correspond to OPT_PRINT_* constants
dw .Lightest
dw .Lighter
dw .Normal
dw .Darker
dw .Darkest
-.Lightest:
- db "LIGHTEST@"
-.Lighter:
- db "LIGHTER @"
-.Normal:
- db "NORMAL @"
-.Darker:
- db "DARKER @"
-.Darkest:
- db "DARKEST @"
+.Lightest: db "LIGHTEST@"
+.Lighter: db "LIGHTER @"
+.Normal: db "NORMAL @"
+.Darker: db "DARKER @"
+.Darkest: db "DARKEST @"
; e4491
GetPrinterSetting: ; e4491
- ld a, [GBPrinter] ; converts from the stored printer setting to 0,1,2,3,4
+; converts GBPRINTER_* value in a to OPT_PRINT_* value in c,
+; with previous/next GBPRINTER_* values in d/e
+ ld a, [GBPrinter]
and a
jr z, .IsLightest
- cp PRINT_LIGHTER
+ cp GBPRINTER_LIGHTER
jr z, .IsLight
- cp PRINT_DARKER
+ cp GBPRINTER_DARKER
jr z, .IsDark
- cp PRINT_DARKEST
+ cp GBPRINTER_DARKEST
jr z, .IsDarkest
- ld c, 2 ; normal if none of the above
- lb de, PRINT_LIGHTER, PRINT_DARKER ; the 2 values next to this setting
+ ; none of the above
+ ld c, OPT_PRINT_NORMAL
+ lb de, GBPRINTER_LIGHTER, GBPRINTER_DARKER
ret
.IsLightest:
- ld c, 0
- lb de, PRINT_DARKEST, PRINT_LIGHTER ; the 2 values next to this setting
+ ld c, OPT_PRINT_LIGHTEST
+ lb de, GBPRINTER_DARKEST, GBPRINTER_LIGHTER
ret
.IsLight:
- ld c, 1
- lb de, PRINT_LIGHTEST, PRINT_NORMAL ; the 2 values next to this setting
+ ld c, OPT_PRINT_LIGHTER
+ lb de, GBPRINTER_LIGHTEST, GBPRINTER_NORMAL
ret
.IsDark:
- ld c, 3
- lb de, PRINT_NORMAL, PRINT_DARKEST ; the 2 values next to this setting
+ ld c, OPT_PRINT_DARKER
+ lb de, GBPRINTER_NORMAL, GBPRINTER_DARKEST
ret
.IsDarkest:
- ld c, 4
- lb de, PRINT_DARKER, PRINT_LIGHTEST ; the 2 values next to this setting
+ ld c, OPT_PRINT_DARKEST
+ lb de, GBPRINTER_DARKER, GBPRINTER_LIGHTEST
ret
; e44c1
@@ -463,10 +469,8 @@ Options_MenuAccount: ; e44c1
ret
; e44f2
-.Off:
- db "OFF@"
-.On:
- db "ON @"
+.Off: db "OFF@"
+.On: db "ON @"
; e44fa
diff --git a/engine/overworld.asm b/engine/overworld.asm
index 4d22e55b6..a505ecd66 100755
--- a/engine/overworld.asm
+++ b/engine/overworld.asm
@@ -112,7 +112,7 @@ GetPlayerSprite: ; 14183
AddMapSprites: ; 141c9
- call GetMapPermission
+ call GetMapEnvironment
call CheckOutdoorMap
jr z, .outdoor
call AddIndoorSprites
@@ -178,14 +178,14 @@ MapCallbackSprites_LoadUsedSpritesGFX: ; 14209
ret nz
ld c, EMOTE_SHADOW
- callba LoadEmote
- call GetMapPermission
+ farcall LoadEmote
+ call GetMapEnvironment
call CheckOutdoorMap
- ld c, EMOTE_0B
+ ld c, EMOTE_GRASS_RUSTLE
jr z, .outdoor
ld c, EMOTE_BOULDER_DUST
.outdoor
- callba LoadEmote
+ farcall LoadEmote
ret
; 14236
@@ -232,9 +232,9 @@ GetMonSprite: ; 14259
cp SPRITE_POKEMON
jr c, .Normal
- cp SPRITE_DAYCARE_MON_1
+ cp SPRITE_DAY_CARE_MON_1
jr z, .wBreedMon1
- cp SPRITE_DAYCARE_MON_2
+ cp SPRITE_DAY_CARE_MON_2
jr z, .wBreedMon2
cp SPRITE_VARS
jr nc, .Variable
@@ -265,7 +265,7 @@ GetMonSprite: ; 14259
and a
jr z, .NoBreedmon
- callba LoadOverworldMonIcon
+ farcall LoadOverworldMonIcon
ld l, 1
ld h, 0
@@ -389,8 +389,8 @@ AddSpriteGFX: ; 142e5
LoadSpriteGFX: ; 14306
-; Bug: b is not preserved, so
-; it's useless as a next count.
+; Bug: b is not preserved, so it's useless as a next count.
+; Uncomment the lines below to fix.
ld hl, UsedSprites
ld b, SPRITE_GFX_LIST_CAPACITY
@@ -409,7 +409,9 @@ LoadSpriteGFX: ; 14306
ret
.LoadSprite:
+ ; push bc
call GetSprite
+ ; pop bc
ld a, l
ret
; 1431e
@@ -716,768 +718,11 @@ LoadEmote:: ; 1442f
ret
; 1444d
-emote_header: MACRO
- dw \1
- db \2 tiles, BANK(\1)
- dw VTiles1 tile \3
-ENDM
-
-EmotesPointers: ; 144d
-; dw source address
-; db length, bank
-; dw dest address
-
- emote_header ShockEmote, 4, $78
- emote_header QuestionEmote, 4, $78
- emote_header HappyEmote, 4, $78
- emote_header SadEmote, 4, $78
- emote_header HeartEmote, 4, $78
- emote_header BoltEmote, 4, $78
- emote_header SleepEmote, 4, $78
- emote_header FishEmote, 4, $78
- emote_header JumpShadowGFX, 1, $7c
- emote_header FishingRodGFX2, 2, $7c
- emote_header BoulderDustGFX, 2, $7e
- emote_header FishingRodGFX4, 1, $7e
-; 14495
-
-
-SpriteMons: ; 14495
- db UNOWN
- db GEODUDE
- db GROWLITHE
- db WEEDLE
- db SHELLDER
- db ODDISH
- db GENGAR
- db ZUBAT
- db MAGIKARP
- db SQUIRTLE
- db TOGEPI
- db BUTTERFREE
- db DIGLETT
- db POLIWAG
- db PIKACHU
- db CLEFAIRY
- db CHARMANDER
- db JYNX
- db STARMIE
- db BULBASAUR
- db JIGGLYPUFF
- db GRIMER
- db EKANS
- db PARAS
- db TENTACOOL
- db TAUROS
- db MACHOP
- db VOLTORB
- db LAPRAS
- db RHYDON
- db MOLTRES
- db SNORLAX
- db GYARADOS
- db LUGIA
- db HO_OH
-; 144b8
-
-
-OutdoorSprites: ; 144b8
-; Valid sprite IDs for each map group.
-
- dw Group1Sprites
- dw Group2Sprites
- dw Group3Sprites
- dw Group4Sprites
- dw Group5Sprites
- dw Group6Sprites
- dw Group7Sprites
- dw Group8Sprites
- dw Group9Sprites
- dw Group10Sprites
- dw Group11Sprites
- dw Group12Sprites
- dw Group13Sprites
- dw Group14Sprites
- dw Group15Sprites
- dw Group16Sprites
- dw Group17Sprites
- dw Group18Sprites
- dw Group19Sprites
- dw Group20Sprites
- dw Group21Sprites
- dw Group22Sprites
- dw Group23Sprites
- dw Group24Sprites
- dw Group25Sprites
- dw Group26Sprites
-; 144ec
-
-
-Group13Sprites: ; 144ec
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_TEACHER
- db SPRITE_FISHER
- db SPRITE_YOUNGSTER
- db SPRITE_BLUE
- db SPRITE_GRAMPS
- db SPRITE_BUG_CATCHER
- db SPRITE_COOLTRAINER_F
- db SPRITE_SWIMMER_GIRL
- db SPRITE_SWIMMER_GUY
- db SPRITE_POKE_BALL
- db SPRITE_FRUIT_TREE
-; 14503
-
-Group23Sprites: ; 14503
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_TEACHER
- db SPRITE_FISHER
- db SPRITE_YOUNGSTER
- db SPRITE_BLUE
- db SPRITE_GRAMPS
- db SPRITE_BUG_CATCHER
- db SPRITE_COOLTRAINER_F
- db SPRITE_SWIMMER_GIRL
- db SPRITE_SWIMMER_GUY
- db SPRITE_POKE_BALL
- db SPRITE_FRUIT_TREE
-; 1451a
-
-Group14Sprites: ; 1451a
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_TEACHER
- db SPRITE_FISHER
- db SPRITE_YOUNGSTER
- db SPRITE_BLUE
- db SPRITE_GRAMPS
- db SPRITE_BUG_CATCHER
- db SPRITE_COOLTRAINER_F
- db SPRITE_SWIMMER_GIRL
- db SPRITE_SWIMMER_GUY
- db SPRITE_POKE_BALL
- db SPRITE_FRUIT_TREE
-; 14531
-
-Group6Sprites: ; 14531
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_TEACHER
- db SPRITE_FISHER
- db SPRITE_YOUNGSTER
- db SPRITE_BLUE
- db SPRITE_GRAMPS
- db SPRITE_BUG_CATCHER
- db SPRITE_COOLTRAINER_F
- db SPRITE_SWIMMER_GIRL
- db SPRITE_SWIMMER_GUY
- db SPRITE_POKE_BALL
- db SPRITE_FRUIT_TREE
-; 14548
-
-Group7Sprites: ; 14548
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_COOLTRAINER_M
- db SPRITE_SUPER_NERD
- db SPRITE_COOLTRAINER_F
- db SPRITE_FISHER
- db SPRITE_YOUNGSTER
- db SPRITE_LASS
- db SPRITE_POKEFAN_M
- db SPRITE_ROCKET
- db SPRITE_MISTY
- db SPRITE_POKE_BALL
- db SPRITE_SLOWPOKE
-; 1455f
-
-Group25Sprites: ; 1455f
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_COOLTRAINER_M
- db SPRITE_SUPER_NERD
- db SPRITE_COOLTRAINER_F
- db SPRITE_FISHER
- db SPRITE_YOUNGSTER
- db SPRITE_LASS
- db SPRITE_POKEFAN_M
- db SPRITE_ROCKET
- db SPRITE_MISTY
- db SPRITE_POKE_BALL
- db SPRITE_SLOWPOKE
-; 14576
-
-Group21Sprites: ; 14576
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_FISHER
- db SPRITE_POLIWAG
- db SPRITE_TEACHER
- db SPRITE_GRAMPS
- db SPRITE_YOUNGSTER
- db SPRITE_LASS
- db SPRITE_BIKER
- db SPRITE_SILVER
- db SPRITE_BLUE
- db SPRITE_POKE_BALL
- db SPRITE_FRUIT_TREE
-; 1458d
-
-Group18Sprites: ; 1458d
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_POKEFAN_M
- db SPRITE_MACHOP
- db SPRITE_GRAMPS
- db SPRITE_YOUNGSTER
- db SPRITE_FISHER
- db SPRITE_TEACHER
- db SPRITE_SUPER_NERD
- db SPRITE_BIG_SNORLAX
- db SPRITE_BIKER
- db SPRITE_POKE_BALL
- db SPRITE_FRUIT_TREE
-; 145a4
-
-Group12Sprites: ; 145a4
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_POKEFAN_M
- db SPRITE_MACHOP
- db SPRITE_GRAMPS
- db SPRITE_YOUNGSTER
- db SPRITE_FISHER
- db SPRITE_TEACHER
- db SPRITE_SUPER_NERD
- db SPRITE_BIG_SNORLAX
- db SPRITE_BIKER
- db SPRITE_POKE_BALL
- db SPRITE_FRUIT_TREE
-; 145bb
-
-Group17Sprites: ; 145bb
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_POKEFAN_M
- db SPRITE_MACHOP
- db SPRITE_GRAMPS
- db SPRITE_YOUNGSTER
- db SPRITE_FISHER
- db SPRITE_TEACHER
- db SPRITE_SUPER_NERD
- db SPRITE_BIG_SNORLAX
- db SPRITE_BIKER
- db SPRITE_POKE_BALL
- db SPRITE_FRUIT_TREE
-; 145d2
-
-Group16Sprites: ; 145d2
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_POKEFAN_M
- db SPRITE_BUENA
- db SPRITE_GRAMPS
- db SPRITE_YOUNGSTER
- db SPRITE_FISHER
- db SPRITE_TEACHER
- db SPRITE_SUPER_NERD
- db SPRITE_MACHOP
- db SPRITE_BIKER
- db SPRITE_POKE_BALL
- db SPRITE_BOULDER
-; 145e9
-
-Group24Sprites: ; 145e9
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_SILVER
- db SPRITE_TEACHER
- db SPRITE_FISHER
- db SPRITE_COOLTRAINER_M
- db SPRITE_YOUNGSTER
- db SPRITE_MONSTER
- db SPRITE_GRAMPS
- db SPRITE_BUG_CATCHER
- db SPRITE_COOLTRAINER_F
- db SPRITE_POKE_BALL
- db SPRITE_FRUIT_TREE
-; 14600
-
-Group26Sprites: ; 14600
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_SILVER
- db SPRITE_TEACHER
- db SPRITE_FISHER
- db SPRITE_COOLTRAINER_M
- db SPRITE_YOUNGSTER
- db SPRITE_MONSTER
- db SPRITE_GRAMPS
- db SPRITE_BUG_CATCHER
- db SPRITE_COOLTRAINER_F
- db SPRITE_POKE_BALL
- db SPRITE_FRUIT_TREE
-; 14617
-
-Group19Sprites: ; 14617
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_SILVER
- db SPRITE_TEACHER
- db SPRITE_FISHER
- db SPRITE_COOLTRAINER_M
- db SPRITE_YOUNGSTER
- db SPRITE_MONSTER
- db SPRITE_GRAMPS
- db SPRITE_BUG_CATCHER
- db SPRITE_COOLTRAINER_F
- db SPRITE_POKE_BALL
- db SPRITE_FRUIT_TREE
-; 1462e
-
-Group10Sprites: ; 1462e
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_FISHER
- db SPRITE_LASS
- db SPRITE_OFFICER
- db SPRITE_GRAMPS
- db SPRITE_YOUNGSTER
- db SPRITE_COOLTRAINER_M
- db SPRITE_BUG_CATCHER
- db SPRITE_SUPER_NERD
- db SPRITE_WEIRD_TREE
- db SPRITE_POKE_BALL
- db SPRITE_FRUIT_TREE
-; 14645
-
-Group4Sprites: ; 14645
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_FISHER
- db SPRITE_LASS
- db SPRITE_OFFICER
- db SPRITE_GRAMPS
- db SPRITE_YOUNGSTER
- db SPRITE_COOLTRAINER_M
- db SPRITE_BUG_CATCHER
- db SPRITE_SUPER_NERD
- db SPRITE_WEIRD_TREE
- db SPRITE_POKE_BALL
- db SPRITE_FRUIT_TREE
-; 1465c
-
-Group8Sprites: ; 1465c
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_KURT_OUTSIDE
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_GRAMPS
- db SPRITE_YOUNGSTER
- db SPRITE_OFFICER
- db SPRITE_POKEFAN_M
- db SPRITE_BLACK_BELT
- db SPRITE_TEACHER
- db SPRITE_AZALEA_ROCKET
- db SPRITE_LASS
- db SPRITE_SILVER
- db SPRITE_FRUIT_TREE
- db SPRITE_SLOWPOKE
-; 14673
-
-Group11Sprites: ; 14673
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_POKE_BALL
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_GRAMPS
- db SPRITE_YOUNGSTER
- db SPRITE_OFFICER
- db SPRITE_POKEFAN_M
- db SPRITE_DAYCARE_MON_1
- db SPRITE_COOLTRAINER_F
- db SPRITE_ROCKET
- db SPRITE_LASS
- db SPRITE_DAYCARE_MON_2
- db SPRITE_FRUIT_TREE
- db SPRITE_SLOWPOKE
-; 1468a
-
-Group22Sprites: ; 1468a
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_STANDING_YOUNGSTER
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_OLIVINE_RIVAL
- db SPRITE_POKEFAN_M
- db SPRITE_LASS
- db SPRITE_BUENA
- db SPRITE_SWIMMER_GIRL
- db SPRITE_SAILOR
- db SPRITE_POKEFAN_F
- db SPRITE_SUPER_NERD
- db SPRITE_TAUROS
- db SPRITE_FRUIT_TREE
- db SPRITE_ROCK
-; 146a1
-
-Group1Sprites: ; 146a1
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_STANDING_YOUNGSTER
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_OLIVINE_RIVAL
- db SPRITE_POKEFAN_M
- db SPRITE_LASS
- db SPRITE_BUENA
- db SPRITE_SWIMMER_GIRL
- db SPRITE_SAILOR
- db SPRITE_POKEFAN_F
- db SPRITE_SUPER_NERD
- db SPRITE_TAUROS
- db SPRITE_FRUIT_TREE
- db SPRITE_ROCK
-; 146b8
-
-Group9Sprites: ; 146b8
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_LANCE
- db SPRITE_GRAMPS
- db SPRITE_SUPER_NERD
- db SPRITE_COOLTRAINER_F
- db SPRITE_FISHER
- db SPRITE_COOLTRAINER_M
- db SPRITE_LASS
- db SPRITE_YOUNGSTER
- db SPRITE_GYARADOS
- db SPRITE_FRUIT_TREE
- db SPRITE_POKE_BALL
-; 146cf
-
-Group2Sprites: ; 146cf
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_GRAMPS
- db SPRITE_YOUNGSTER
- db SPRITE_LASS
- db SPRITE_SUPER_NERD
- db SPRITE_COOLTRAINER_M
- db SPRITE_POKEFAN_M
- db SPRITE_BLACK_BELT
- db SPRITE_COOLTRAINER_F
- db SPRITE_FISHER
- db SPRITE_FRUIT_TREE
- db SPRITE_POKE_BALL
-; 146e6
-
-Group5Sprites: ; 146e6
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_GRAMPS
- db SPRITE_YOUNGSTER
- db SPRITE_LASS
- db SPRITE_SUPER_NERD
- db SPRITE_COOLTRAINER_M
- db SPRITE_POKEFAN_M
- db SPRITE_BLACK_BELT
- db SPRITE_COOLTRAINER_F
- db SPRITE_FISHER
- db SPRITE_FRUIT_TREE
- db SPRITE_POKE_BALL
-; 146fd
-
-Group3Sprites: ; 146fd
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_GAMEBOY_KID
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_LASS
- db SPRITE_POKEFAN_F
- db SPRITE_TEACHER
- db SPRITE_YOUNGSTER
- db SPRITE_GROWLITHE
- db SPRITE_POKEFAN_M
- db SPRITE_ROCKER
- db SPRITE_FISHER
- db SPRITE_SCIENTIST
- db SPRITE_POKE_BALL
- db SPRITE_BOULDER
-; 14714
-
-Group15Sprites: ; 14714
- db SPRITE_SUICUNE
- db SPRITE_SILVER_TROPHY
- db SPRITE_FAMICOM
- db SPRITE_POKEDEX
- db SPRITE_WILL
- db SPRITE_KAREN
- db SPRITE_NURSE
- db SPRITE_OLD_LINK_RECEPTIONIST
- db SPRITE_BIG_LAPRAS
- db SPRITE_BIG_ONIX
- db SPRITE_SUDOWOODO
- db SPRITE_BIG_SNORLAX
- db SPRITE_SAILOR
- db SPRITE_FISHING_GURU
- db SPRITE_GENTLEMAN
- db SPRITE_SUPER_NERD
- db SPRITE_HO_OH
- db SPRITE_TEACHER
- db SPRITE_COOLTRAINER_F
- db SPRITE_YOUNGSTER
- db SPRITE_FAIRY
- db SPRITE_POKE_BALL
- db SPRITE_ROCK
-; 1472b
-
-Group20Sprites: ; 1472b
- db SPRITE_OAK
- db SPRITE_FISHER
- db SPRITE_TEACHER
- db SPRITE_TWIN
- db SPRITE_POKEFAN_M
- db SPRITE_GRAMPS
- db SPRITE_FAIRY
- db SPRITE_SILVER
- db SPRITE_FISHING_GURU
- db SPRITE_POKE_BALL
- db SPRITE_POKEDEX
-; 14736
-
-
-SpriteHeaders: ; 14736
-INCLUDE "gfx/overworld/sprite_headers.asm"
-; 1499a
+
+INCLUDE "data/emote_headers.asm"
+
+INCLUDE "data/sprite_mons.asm"
+
+INCLUDE "data/maps/outdoor_sprites.asm"
+
+INCLUDE "gfx/sprite_headers.asm"
diff --git a/engine/pack.asm b/engine/pack.asm
index dad9a799d..2b0d04aba 100644
--- a/engine/pack.asm
+++ b/engine/pack.asm
@@ -118,12 +118,12 @@ Pack: ; 10000
ret
.TMHMPocketMenu: ; 100e8 (4:40e8)
- callba TMHMPocket
+ farcall TMHMPocket
ld b, $5
ld c, $1
call Pack_InterpretJoypad
ret c
- callba _CheckTossableItem
+ farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .use_quit
@@ -192,15 +192,15 @@ Pack: ; 10000
; 10159
.UseItem: ; 10159
- callba AskTeachTMHM
+ farcall AskTeachTMHM
ret c
- callba ChooseMonToLearnTMHM
+ farcall ChooseMonToLearnTMHM
jr c, .declined
ld hl, Options
ld a, [hl]
push af
res NO_TEXT_SCROLL, [hl]
- callba TeachTMHM
+ farcall TeachTMHM
pop af
ld [Options], a
.declined
@@ -240,29 +240,29 @@ Pack: ; 10000
ret
.ItemBallsKey_LoadSubmenu: ; 101c5 (4:41c5)
- callba _CheckTossableItem
+ farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .tossable
- callba CheckSelectableItem
+ farcall CheckSelectableItem
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .selectable
- callba CheckItemMenu
+ farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .usable
jr .unusable
.selectable
- callba CheckItemMenu
+ farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .selectable_usable
jr .selectable_unusable
.tossable
- callba CheckSelectableItem
+ farcall CheckSelectableItem
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .tossable_selectable
@@ -455,7 +455,7 @@ Jumptable_GiveTossQuit: ; 1030b
; 10311
UseItem: ; 10311
- callba CheckItemMenu
+ farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .dw
rst JumpTable
@@ -512,7 +512,7 @@ UseItem: ; 10311
TossMenu: ; 10364
ld hl, Text_ThrowAwayHowMany
call Pack_PrintTextNoScroll
- callba SelectQuantityToToss
+ farcall SelectQuantityToToss
push af
call ExitMenu
pop af
@@ -566,7 +566,7 @@ ResetPocketCursorPositions: ; 1039d
; 103c2
RegisterItem: ; 103c2
- callba CheckSelectableItem
+ farcall CheckSelectableItem
ld a, [wItemAttributeParamBuffer]
and a
jr nz, .cant_register
@@ -606,16 +606,16 @@ GiveItem: ; 103fd
ld a, PARTYMENUACTION_GIVE_ITEM
ld [PartyMenuActionText], a
call ClearBGPalettes
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuGFX
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuGFX
.loop
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
- callba PartyMenuSelect
+ farcall PartyMenuSelect
jr c, .finish
ld a, [CurPartySpecies]
cp EGG
@@ -786,7 +786,7 @@ BattlePack: ; 10493
ret
.TMHMPocketMenu: ; 10581 (4:4581)
- callba TMHMPocket
+ farcall TMHMPocket
ld b, $5
ld c, $1
call Pack_InterpretJoypad
@@ -824,7 +824,7 @@ BattlePack: ; 10493
ret
ItemSubmenu: ; 105d3 (4:45d3)
- callba CheckItemContext
+ farcall CheckItemContext
ld a, [wItemAttributeParamBuffer]
TMHMSubmenu: ; 105dc (4:45dc)
and a
@@ -890,7 +890,7 @@ TMHMSubmenu: ; 105dc (4:45dc)
; 10629
.Use: ; 10629
- callba CheckItemContext
+ farcall CheckItemContext
ld a, [wItemAttributeParamBuffer]
ld hl, .ItemFunctionJumptable
rst JumpTable
@@ -1043,7 +1043,7 @@ DepositSellPack: ; 106be
ld a, 3
call InitPocket
call WaitBGMap_DrawPackGFX
- callba TMHMPocket
+ farcall TMHMPocket
ld a, [CurItem]
ld [CurItem], a
ret
@@ -1130,7 +1130,7 @@ TutorialPack: ; 107bb
ld a, [InputType]
or a
jr z, .loop
- callba _DudeAutoInput_RightA
+ farcall _DudeAutoInput_RightA
.loop
call .RunJumptable
call DepositSellTutorial_InterpretJoypad
@@ -1207,7 +1207,7 @@ TutorialPack: ; 107bb
ld a, 3
call InitPocket
call WaitBGMap_DrawPackGFX
- callba TMHMPocket
+ farcall TMHMPocket
ld a, [CurItem]
ld [CurItem], a
ret
@@ -1310,15 +1310,15 @@ DrawPackGFX: ; 1089d
ret
.female
- callba DrawKrisPackGFX
+ farcall DrawKrisPackGFX
ret
; 108cc
PackGFXPointers: ; 108cc
- dw PackGFX + $f0 * 1
- dw PackGFX + $f0 * 3
- dw PackGFX + $f0 * 0
- dw PackGFX + $f0 * 2
+ dw PackGFX + (15 tiles) * 1
+ dw PackGFX + (15 tiles) * 3
+ dw PackGFX + (15 tiles) * 0
+ dw PackGFX + (15 tiles) * 2
; 108d4
Pack_InterpretJoypad: ; 108d4 (4:48d4)
@@ -1377,7 +1377,7 @@ Pack_InterpretJoypad: ; 108d4 (4:48d4)
ret
.select
- callba SwitchItemsInBag
+ farcall SwitchItemsInBag
ld hl, Text_MoveItemWhere
call Pack_PrintTextNoScroll
scf
@@ -1394,7 +1394,7 @@ Pack_InterpretJoypad: ; 108d4 (4:48d4)
ret
.place_insert
- callba SwitchItemsInBag
+ farcall SwitchItemsInBag
ld de, SFX_SWITCH_POKEMON
call WaitPlaySFX
ld de, SFX_SWITCH_POKEMON
@@ -1716,6 +1716,6 @@ TextJump_YouCantUseItInABattle: ; 0x10b11
; 0x10b16
PackMenuGFX:
-INCBIN "gfx/misc/pack_menu.2bpp"
+INCBIN "gfx/pack/pack_menu.2bpp"
PackGFX:
-INCBIN "gfx/misc/pack.2bpp"
+INCBIN "gfx/pack/pack.2bpp"
diff --git a/engine/party_menu.asm b/engine/party_menu.asm
index 266451c37..e89fdab19 100644
--- a/engine/party_menu.asm
+++ b/engine/party_menu.asm
@@ -13,7 +13,7 @@ SelectMonFromParty: ; 50000
; 5001d
-SelectTradeOrDaycareMon: ; 5001d
+SelectTradeOrDayCareMon: ; 5001d
ld a, b
ld [PartyMenuActionText], a
call DisableSpriteUpdates
@@ -40,8 +40,8 @@ InitPartyMenuLayout: ; 5003f
LoadPartyMenuGFX: ; 5004f
call LoadFontsBattleExtra
- callab InitPartyMenuPalettes ; engine/color.asm
- callab ClearSpriteAnims2
+ callfar InitPartyMenuPalettes ; engine/color.asm
+ callfar ClearSpriteAnims2
ret
; 5005f
@@ -662,7 +662,7 @@ InitPartyMenuGFX: ; 503e0
pop bc
dec c
jr nz, .loop
- callab PlaySpriteAnimations
+ callfar PlaySpriteAnimations
ret
; 50405
diff --git a/engine/phone.asm b/engine/phone.asm
deleted file mode 100644
index f5f39218d..000000000
--- a/engine/phone.asm
+++ /dev/null
@@ -1,878 +0,0 @@
-AddPhoneNumber:: ; 90000
- call _CheckCellNum
- jr c, .cant_add
- call Phone_FindOpenSlot
- jr nc, .cant_add
- ld [hl], c
- xor a
- ret
-
-.cant_add
- scf
- ret
-; 9000f
-
-
-DelCellNum:: ; 9000f
- call _CheckCellNum
- jr nc, .not_in_list
- xor a
- ld [hl], a
- ret
-
-.not_in_list
- scf
- ret
-; 90019
-
-CheckCellNum:: ; 90019
- jp _CheckCellNum ; wtf
-; 9001c
-
-_CheckCellNum: ; 9001c
- ld hl, wPhoneList
- ld b, CONTACT_LIST_SIZE
-.loop
- ld a, [hli]
- cp c
- jr z, .got_it
- dec b
- jr nz, .loop
- xor a
- ret
-
-.got_it
- dec hl
- scf
- ret
-; 9002d
-
-Phone_FindOpenSlot: ; 9002d
- call GetRemainingSpaceInPhoneList
- ld b, a
- ld hl, wPhoneList
-.loop
- ld a, [hli]
- and a
- jr z, .FoundOpenSpace
- dec b
- jr nz, .loop
- xor a
- ret
-
-.FoundOpenSpace:
- dec hl
- scf
- ret
-; 90040
-
-GetRemainingSpaceInPhoneList: ; 90040
- xor a
- ld [Buffer1], a
- ld hl, PermanentNumbers
-.loop
- ld a, [hli]
- cp -1
- jr z, .done
- cp c
- jr z, .elm_or_mom
- push bc
- push hl
- ld c, a
- call _CheckCellNum
- jr c, .elm_or_mom_in_list
- ld hl, Buffer1
- inc [hl]
-
-.elm_or_mom_in_list
- pop hl
- pop bc
-
-.elm_or_mom
- jr .loop
-
-.done
- ld a, CONTACT_LIST_SIZE
- ld hl, Buffer1
- sub [hl]
- ret
-; 90066
-
-PermanentNumbers: ; 90066
- db PHONECONTACT_MOM, PHONECONTACT_ELM, -1
-; 90069
-
-
-FarPlaceString: ; 90069
- ld a, [hROMBank]
- push af
- ld a, b
- rst Bankswitch
-
- call PlaceString
-
- pop af
- rst Bankswitch
- ret
-; 90074
-
-
-CheckPhoneCall:: ; 90074 (24:4074)
-; Check if the phone is ringing in the overworld.
-
- call CheckStandingOnEntrance
- jr z, .no_call
-
- call .timecheck
- nop
- jr nc, .no_call
-
- call Random
- ld b, a
- and 50 percent
- cp b
- jr nz, .no_call
-
- call GetMapHeaderPhoneServiceNybble
- and a
- jr nz, .no_call
-
- call GetAvailableCallers
- call ChooseRandomCaller
- jr nc, .no_call
-
- ld e, a
- call LoadCallerScript
- ld a, BANK(Script_ReceivePhoneCall)
- ld hl, Script_ReceivePhoneCall
- call CallScript
- scf
- ret
-
-.no_call
- xor a
- ret
-
-.timecheck ; 900a6 (24:40a6)
- callba CheckReceiveCallTimer
- ret
-
-CheckPhoneContactTimeOfDay: ; 900ad (24:40ad)
- push hl
- push bc
- push de
- push af
-
- callba CheckTime
- pop af
- and (1 << MORN) + (1 << DAY) + (1 << NITE)
- and c
-
- pop de
- pop bc
- pop hl
- ret
-
-ChooseRandomCaller: ; 900bf (24:40bf)
-; If no one is available to call, don't return anything.
- ld a, [EngineBuffer3]
- and a
- jr z, .NothingToSample
-
-; Sample a random number between 0 and 31.
- ld c, a
- call Random
- ld a, [hRandomAdd]
- swap a
- and $1f
-; Compute that number modulo the number of available callers.
- call SimpleDivide
-; Return the caller ID you just sampled.
- ld c, a
- ld b, 0
- ld hl, EngineBuffer4
- add hl, bc
- ld a, [hl]
- scf
- ret
-
-.NothingToSample:
- xor a
- ret
-
-GetAvailableCallers: ; 900de (24:40de)
- callba CheckTime
- ld a, c
- ld [EngineBuffer1], a ; wd03e (aliases: MenuItemsList, CurFruitTree, CurInput)
- ld hl, EngineBuffer3
- ld bc, 11
- xor a
- call ByteFill
- ld de, wPhoneList
- ld a, CONTACT_LIST_SIZE
-
-.loop
- ld [EngineBuffer2], a
- ld a, [de]
- and a
- jr z, .not_good_for_call
- ld hl, PhoneContacts + PHONE_CONTACT_SCRIPT2_TIME
- ld bc, PHONE_TABLE_WIDTH
- call AddNTimes
- ld a, [EngineBuffer1] ; wd03e (aliases: MenuItemsList, CurFruitTree, CurInput)
- and [hl]
- jr z, .not_good_for_call
- ld bc, PHONE_CONTACT_MAP_GROUP - PHONE_CONTACT_SCRIPT2_TIME
- add hl, bc
- ld a, [MapGroup]
- cp [hl]
- jr nz, .different_map
- inc hl
- ld a, [MapNumber]
- cp [hl]
- jr z, .not_good_for_call
-.different_map
- ld a, [EngineBuffer3]
- ld c, a
- ld b, $0
- inc a
- ld [EngineBuffer3], a
- ld hl, EngineBuffer4
- add hl, bc
- ld a, [de]
- ld [hl], a
-.not_good_for_call
- inc de
- ld a, [EngineBuffer2]
- dec a
- jr nz, .loop
- ret
-
-CheckSpecialPhoneCall:: ; 90136 (24:4136)
- ld a, [wSpecialPhoneCallID]
- and a
- jr z, .NoPhoneCall
-
- dec a
- ld c, a
- ld b, 0
- ld hl, SpecialPhoneCallList
- ld a, 6
- call AddNTimes
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call _hl_
- jr nc, .NoPhoneCall
-
- call .DoSpecialPhoneCall
- inc hl
- inc hl
- ld a, [hli]
- ld e, a
- push hl
- call LoadCallerScript
- pop hl
- ld de, wPhoneScriptPointer
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- ld a, BANK(.script)
- ld hl, .script
- call CallScript
- scf
- ret
-.NoPhoneCall:
- xor a
- ret
-; 90173 (24:4173)
-
-.script ; 0x90173
- pause 30
- jump Script_ReceivePhoneCall
-; 0x90178
-
-.DoSpecialPhoneCall: ; 90178 (24:4178)
- ld a, [wSpecialPhoneCallID]
- dec a
- ld c, a
- ld b, 0
- ld hl, SpecialPhoneCallList
- ld a, 6
- call AddNTimes
- ret
-
-SpecialCallOnlyWhenOutside: ; 90188
- ld a, [wPermission]
- cp TOWN
- jr z, .outside
- cp ROUTE
- jr z, .outside
- xor a
- ret
-
-.outside
- scf
- ret
-
-SpecialCallWhereverYouAre: ; 90197
- scf
- ret
-
-Function90199: ; 90199 (24:4199)
- ; Don't do the call if you're in a link communication
- ld a, [wLinkMode]
- and a
- jr nz, .OutOfArea
- ; If you're in an area without phone service, don't do the call
- call GetMapHeaderPhoneServiceNybble
- and a
- jr nz, .OutOfArea
- ; If the person can't take a call at that time, don't do the call
- ld a, b
- ld [wCurrentCaller], a
- ld hl, PhoneContacts
- ld bc, PHONE_TABLE_WIDTH
- call AddNTimes
- ld d, h
- ld e, l
- ld hl, PHONE_CONTACT_SCRIPT1_TIME
- add hl, de
- ld a, [hl]
- call CheckPhoneContactTimeOfDay
- jr z, .OutOfArea
- ; If we're in the same map as the person we're calling,
- ; use the "Just talk to that person" script.
- ld hl, PHONE_CONTACT_MAP_GROUP
- add hl, de
- ld a, [MapGroup]
- cp [hl]
- jr nz, .GetPhoneScript
- ld hl, PHONE_CONTACT_MAP_NUMBER
- add hl, de
- ld a, [MapNumber]
- cp [hl]
- jr nz, .GetPhoneScript
- ld b, BANK(PhoneScript_JustTalkToThem)
- ld hl, PhoneScript_JustTalkToThem
- jr .DoPhoneCall
-
-.GetPhoneScript:
- ld hl, PHONE_CONTACT_SCRIPT1_BANK
- add hl, de
- ld b, [hl]
- ld hl, PHONE_CONTACT_SCRIPT1_ADDR_LO
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jr .DoPhoneCall
-
-.OutOfArea:
- ld b, BANK(UnknownScript_0x90209)
- ld de, UnknownScript_0x90209
- call ExecuteCallbackScript
- ret
-
-.DoPhoneCall:
- ld a, b
- ld [wd002], a
- ld a, l
- ld [wd003], a
- ld a, h
- ld [wd004], a
- ld b, BANK(UnknownScript_0x90205)
- ld de, UnknownScript_0x90205
- call ExecuteCallbackScript
- ret
-; 90205 (24:4205)
-
-UnknownScript_0x90205: ; 0x90205
- ptcall wd002
- return
-; 0x90209
-
-UnknownScript_0x90209: ; 0x90209
- scall UnknownScript_0x90657
- return
-; 0x9020d
-
-LoadCallerScript: ; 9020d (24:420d)
- nop
- nop
- ld a, e
- ld [wCurrentCaller], a
- and a
- jr nz, .actualcaller
- ld a, BANK(WrongNumber)
- ld hl, WrongNumber
- jr .proceed
-
-.actualcaller
- ld hl, PhoneContacts
- ld bc, 12
- ld a, e
- call AddNTimes
- ld a, BANK(PhoneContacts)
-.proceed
- ld de, EngineBuffer2
- ld bc, 12
- call FarCopyBytes
- ret
-; 90233 (24:4233)
-
-WrongNumber: ; 90233
- db TRAINER_NONE, PHONE_00
- dba .script
-.script
- writetext .text
- end
-.text
- ; Huh? Sorry, wrong number!
- text_jump UnknownText_0x1c5565
- db "@"
-; 90241
-
-Script_ReceivePhoneCall: ; 0x90241
- refreshscreen $0
- callasm RingTwice_StartCall
- ptcall wPhoneScriptPointer
- waitbutton
- callasm HangUp
- closetext
- callasm InitCallReceiveDelay
- end
-; 0x90255
-
-Script_SpecialBillCall:: ; 0x90255
- callasm .LoadBillScript
- jump Script_ReceivePhoneCall
-
-.LoadBillScript:
- ld e, PHONE_BILL
- jp LoadCallerScript
-; 90261
-
-UnknownScript_0x90261: ; 0x90261
- callasm .LoadElmScript
- pause 30
- jump Script_ReceivePhoneCall
-
-.LoadElmScript:
- ld e, PHONE_ELM
- jp LoadCallerScript
-; 9026f
-
-RingTwice_StartCall: ; 9026f
- call .Ring
- call .Ring
- callba TrainerRankings_PhoneCalls
- ret
-; 9027c
-
-.Ring: ; 9027c (24:427c)
- call Phone_StartRinging
- call Phone_Wait20Frames
- call Phone_CallerTextboxWithName
- call Phone_Wait20Frames
- call Phone_CallerTextbox
- call Phone_Wait20Frames
- call Phone_CallerTextboxWithName
- ret
-
-Phone_CallerTextboxWithName: ; 90292 (24:4292)
- ld a, [wCurrentCaller]
- ld b, a
- call Function90363
- ret
-
-PhoneCall:: ; 9029a
- ld a, b
- ld [PhoneScriptBank], a
- ld a, e
- ld [PhoneCallerLo], a
- ld a, d
- ld [PhoneCallerHi], a
- call Phone_FirstOfTwoRings
- call Phone_FirstOfTwoRings
- callba TrainerRankings_PhoneCalls
- ret
-; 902b3
-
-Phone_FirstOfTwoRings: ; 902b3
- call Phone_StartRinging
- call Phone_Wait20Frames
- call Phone_CallerTextboxWithName2
- call Phone_Wait20Frames
- call Phone_CallerTextbox
- call Phone_Wait20Frames
- call Phone_CallerTextboxWithName2
- ret
-; 902c9
-
-Phone_CallerTextboxWithName2: ; 902c9
- call Phone_CallerTextbox
- hlcoord 1, 2
- ld [hl], $62
- inc hl
- inc hl
- ld a, [PhoneScriptBank]
- ld b, a
- ld a, [PhoneCallerLo]
- ld e, a
- ld a, [PhoneCallerHi]
- ld d, a
- call FarPlaceString
- ret
-; 902e3
-
-
-Phone_NoSignal: ; 902e3 (24:42e3)
- ld de, SFX_NO_SIGNAL
- call PlaySFX
- jr Phone_CallEnd
-
-HangUp:: ; 902eb
- call HangUp_Beep
- call HangUp_Wait20Frames
-Phone_CallEnd:
- call HangUp_BoopOn
- call HangUp_Wait20Frames
- call HangUp_BoopOff
- call HangUp_Wait20Frames
- call HangUp_BoopOn
- call HangUp_Wait20Frames
- call HangUp_BoopOff
- call HangUp_Wait20Frames
- call HangUp_BoopOn
- call HangUp_Wait20Frames
- call HangUp_BoopOff
- call HangUp_Wait20Frames
- ret
-; 90316
-
-Function90316: ; 90316
- ld de, SFX_SHUT_DOWN_PC
- call PlaySFX
- ret
-; 9031d
-
-HangUp_Beep: ; 9031d
- ld hl, UnknownText_0x9032a
- call PrintText
- ld de, SFX_HANG_UP
- call PlaySFX
- ret
-; 9032a
-
-UnknownText_0x9032a: ; 9032a
- text_jump UnknownText_0x1c5580
- db "@"
-; 9032f
-
-
-HangUp_BoopOn: ; 9032f
- ld hl, UnknownText_0x90336
- call PrintText
- ret
-; 90336
-
-UnknownText_0x90336: ; 0x90336
- text_jump UnknownText_0x1c5588
- db "@"
-; 0x9033b
-
-
-HangUp_BoopOff: ; 9033b
- call SpeechTextBox
- ret
-; 9033f
-
-Phone_StartRinging: ; 9033f
- call WaitSFX
- ld de, SFX_CALL
- call PlaySFX
- call Phone_CallerTextbox
- call UpdateSprites
- callba PhoneRing_LoadEDTile
- ret
-; 90355
-
-HangUp_Wait20Frames: ; 90355
- jr Phone_Wait20Frames
-
-Phone_Wait20Frames
- ld c, 20
- call DelayFrames
- callba PhoneRing_LoadEDTile
- ret
-; 90363
-
-
-Function90363: ; 90363 (24:4363)
- push bc
- call Phone_CallerTextbox
- hlcoord 1, 1
- ld [hl], $62
- inc hl
- inc hl
- ld d, h
- ld e, l
- pop bc
- call Function90380
- ret
-
-
-Phone_CallerTextbox: ; 90375
- hlcoord 0, 0
- ld b, 2
- ld c, SCREEN_WIDTH - 2
- call TextBox
- ret
-; 90380
-
-
-Function90380: ; 90380 (24:4380)
- ld h, d
- ld l, e
- ld a, b
- call GetCallerTrainerClass
- call GetCallerName
- ret
-
-CheckCanDeletePhoneNumber: ; 9038a (24:438a)
- ld a, c
- call GetCallerTrainerClass
- ld a, c
- ; and a
- ret nz
- ld a, b
- cp PHONECONTACT_MOM
- ret z
- cp PHONECONTACT_ELM
- ret z
- ld c, $1
- ret
-
-GetCallerTrainerClass: ; 9039a
- push hl
- ld hl, PhoneContacts + PHONE_CONTACT_TRAINER_CLASS
- ld bc, PHONE_TABLE_WIDTH
- call AddNTimes
- ld a, [hli]
- ld b, [hl]
- ld c, a
- pop hl
- ret
-; 903a9
-
-
-GetCallerName: ; 903a9 (24:43a9)
- ld a, c
- and a
- jr z, .NotTrainer
-
- call Phone_GetTrainerName
- push hl
- push bc
- call PlaceString
- ld a, ":"
- ld [bc], a
- pop bc
- pop hl
- ld de, SCREEN_WIDTH + 3
- add hl, de
- call Phone_GetTrainerClassName
- call PlaceString
- ret
-
-.NotTrainer:
- push hl
- ld c, b
- ld b, 0
- ld hl, NonTrainerCallerNames
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld e, a
- ld d, [hl]
- pop hl
- call PlaceString
- ret
-; 903d6 (24:43d6)
-
-NonTrainerCallerNames: ; 903d6
- dw .none
- dw .mom
- dw .bikeshop
- dw .bill
- dw .elm
- dw .buena
-
-.none db "----------@"
-.mom db "MOM:@"
-.bill db "BILL:@"
-.elm db "PROF.ELM:@"
-.bikeshop db "BIKE SHOP:@"
-.buena db "BUENA:", $22, " DISC JOCKEY@"
-; 90423
-
-Phone_GetTrainerName: ; 90423 (24:4423)
- push hl
- push bc
- callba GetTrainerName
- pop bc
- pop hl
- ret
-
-Phone_GetTrainerClassName: ; 9042e (24:442e)
- push hl
- push bc
- callba GetTrainerClassName
- pop bc
- pop hl
- ret
-
-GetCallerLocation: ; 90439
- ld a, [wCurrentCaller]
- call GetCallerTrainerClass
- ld d, c
- ld e, b
- push de
- ld a, [wCurrentCaller]
- ld hl, PhoneContacts + PHONE_CONTACT_MAP_GROUP
- ld bc, PHONE_TABLE_WIDTH
- call AddNTimes
- ld b, [hl]
- inc hl
- ld c, [hl]
- push bc
- call GetWorldMapLocation
- ld e, a
- callba GetLandmarkName
- pop bc
- pop de
- ret
-; 9045f
-
-PhoneContacts: ; 9045f
-phone: MACRO
- db \1, \2 ; trainer
- map \3 ; map
- db \4
- dba \5 ; script 1
- db \6
- dba \7 ; script 2
-ENDM
-
- phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
- phone TRAINER_NONE, PHONECONTACT_MOM, KRISS_HOUSE_1F, 7, MomPhoneScript, 0, UnusedPhoneScript
- phone TRAINER_NONE, PHONECONTACT_BIKESHOP, OAKS_LAB, 0, UnusedPhoneScript, 0, UnusedPhoneScript
- phone TRAINER_NONE, PHONECONTACT_BILL, N_A, 7, BillPhoneScript1, 0, BillPhoneScript2
- phone TRAINER_NONE, PHONECONTACT_ELM, ELMS_LAB, 7, ElmPhoneScript1, 0, ElmPhoneScript2
- phone SCHOOLBOY, JACK1, NATIONAL_PARK, 7, JackPhoneScript1, 7, JackPhoneScript2
- phone POKEFANF, BEVERLY1, NATIONAL_PARK, 7, BeverlyPhoneScript1, 7, BeverlyPhoneScript2
- phone SAILOR, HUEY1, OLIVINE_LIGHTHOUSE_2F, 7, HueyPhoneScript1, 7, HueyPhoneScript2
- phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
- phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
- phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
- phone COOLTRAINERM, GAVEN3, ROUTE_26, 7, GavenPhoneScript1, 7, GavenPhoneScript2
- phone COOLTRAINERF, BETH1, ROUTE_26, 7, BethPhoneScript1, 7, BethPhoneScript2
- phone BIRD_KEEPER, JOSE2, ROUTE_27, 7, JosePhoneScript1, 7, JosePhoneScript2
- phone COOLTRAINERF, REENA1, ROUTE_27, 7, ReenaPhoneScript1, 7, ReenaPhoneScript2
- phone YOUNGSTER, JOEY1, ROUTE_30, 7, JoeyPhoneScript1, 7, JoeyPhoneScript2
- phone BUG_CATCHER, WADE1, ROUTE_31, 7, WadePhoneScript1, 7, WadePhoneScript2
- phone FISHER, RALPH1, ROUTE_32, 7, RalphPhoneScript1, 7, RalphPhoneScript2
- phone PICNICKER, LIZ1, ROUTE_32, 7, LizPhoneScript1, 7, LizPhoneScript2
- phone HIKER, ANTHONY2, ROUTE_33, 7, AnthonyPhoneScript1, 7, AnthonyPhoneScript2
- phone CAMPER, TODD1, ROUTE_34, 7, ToddPhoneScript1, 7, ToddPhoneScript2
- phone PICNICKER, GINA1, ROUTE_34, 7, GinaPhoneScript1, 7, GinaPhoneScript2
- phone JUGGLER, IRWIN1, ROUTE_35, 7, IrwinPhoneScript1, 7, IrwinPhoneScript2
- phone BUG_CATCHER, ARNIE1, ROUTE_35, 7, ArniePhoneScript1, 7, ArniePhoneScript2
- phone SCHOOLBOY, ALAN1, ROUTE_36, 7, AlanPhoneScript1, 7, AlanPhoneScript2
- phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
- phone LASS, DANA1, ROUTE_38, 7, DanaPhoneScript1, 7, DanaPhoneScript2
- phone SCHOOLBOY, CHAD1, ROUTE_38, 7, ChadPhoneScript1, 7, ChadPhoneScript2
- phone POKEFANM, DEREK1, ROUTE_39, 7, DerekPhoneScript1, 7, DerekPhoneScript2
- phone FISHER, TULLY1, ROUTE_42, 7, TullyPhoneScript1, 7, TullyPhoneScript2
- phone POKEMANIAC, BRENT1, ROUTE_43, 7, BrentPhoneScript1, 7, BrentPhoneScript2
- phone PICNICKER, TIFFANY3, ROUTE_43, 7, TiffanyPhoneScript1, 7, TiffanyPhoneScript2
- phone BIRD_KEEPER, VANCE1, ROUTE_44, 7, VancePhoneScript1, 7, VancePhoneScript2
- phone FISHER, WILTON1, ROUTE_44, 7, WiltonPhoneScript1, 7, WiltonPhoneScript2
- phone BLACKBELT_T, KENJI3, ROUTE_45, 7, KenjiPhoneScript1, 7, KenjiPhoneScript2
- phone HIKER, PARRY1, ROUTE_45, 7, ParryPhoneScript1, 7, ParryPhoneScript2
- phone PICNICKER, ERIN1, ROUTE_46, 7, ErinPhoneScript1, 7, ErinPhoneScript2
- phone TRAINER_NONE, PHONECONTACT_BUENA, GOLDENROD_DEPT_STORE_ROOF, 7, BuenaPhoneScript1, 7, BuenaPhoneScript2
-; 90627
-
-SpecialPhoneCallList: ; 90627
- dw SpecialCallOnlyWhenOutside
- db PHONE_ELM
- dba ElmPhoneScript2
-
- dw SpecialCallOnlyWhenOutside
- db PHONE_ELM
- dba ElmPhoneScript2
-
- dw SpecialCallOnlyWhenOutside
- db PHONE_ELM
- dba ElmPhoneScript2
-
- dw SpecialCallOnlyWhenOutside
- db PHONE_ELM
- dba ElmPhoneScript2
-
- dw SpecialCallWhereverYouAre
- db PHONE_ELM
- dba ElmPhoneScript2
-
- dw SpecialCallWhereverYouAre
- db PHONE_OAK ; ????????
- dba BikeShopPhoneScript ; bike shop
-
- dw SpecialCallWhereverYouAre
- db PHONE_MOM
- dba MomPhoneLectureScript
-
- dw SpecialCallOnlyWhenOutside
- db PHONE_ELM
- dba ElmPhoneScript2
-; 90657
-
-UnknownScript_0x90657: ; 0x90657
- writetext UnknownText_0x9065b
- end
-; 0x9065b
-
-UnknownText_0x9065b: ; 0x9065b
- ; That number is out of the area.
- text_jump UnknownText_0x1c558b
- db "@"
-; 0x90660
-
-PhoneScript_JustTalkToThem: ; 0x90660
- writetext UnknownText_0x90664
- end
-; 0x90664
-
-UnknownText_0x90664: ; 0x90664
- ; Just go talk to that person!
- text_jump UnknownText_0x1c55ac
- db "@"
-; 0x90669
-
-UnknownScript_0x90669: ; 0x90669
- writetext UnknownText_0x9066d
- end
-; 0x9066d
-
-UnknownText_0x9066d: ; 0x9066d
- ; Thank you!
- text_jump UnknownText_0x1c55ca
- db "@"
-; 0x90672
diff --git a/engine/buena_phone_scripts.asm b/engine/phone/buenas_password.asm
index 858ce5540..858ce5540 100644
--- a/engine/buena_phone_scripts.asm
+++ b/engine/phone/buenas_password.asm
diff --git a/engine/phone/generic_calls.asm b/engine/phone/generic_calls.asm
new file mode 100644
index 000000000..e1b53a950
--- /dev/null
+++ b/engine/phone/generic_calls.asm
@@ -0,0 +1,1266 @@
+PhoneScript_Random2:
+ random 2
+ end
+
+PhoneScript_Random3:
+ random 3
+ end
+
+PhoneScript_Random4:
+ random 4
+ end
+
+PhoneScript_Random5:
+ random 5
+ end
+
+PhoneScript_Random11:
+ random 11
+ end
+
+PhoneScript_AnswerPhone_Male:
+ checkday
+ iftrue PhoneScript_AnswerPhone_Male_Day
+ checknite
+ iftrue PhoneScript_AnswerPhone_Male_Nite
+ checkcode VAR_CALLERID
+ if_equal PHONE_SCHOOLBOY_JACK, .Jack
+ if_equal PHONE_SAILOR_HUEY, .Huey
+ if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
+ if_equal PHONE_BIRDKEEPER_JOSE, .Jose
+ if_equal PHONE_YOUNGSTER_JOEY, .Joey
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_FISHER_RALPH, .Ralph
+ if_equal PHONE_HIKER_ANTHONY, .Anthony
+ if_equal PHONE_CAMPER_TODD, .Todd
+ if_equal PHONE_JUGGLER_IRWIN, .Irwin
+ if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
+ if_equal PHONE_SCHOOLBOY_ALAN, .Alan
+ if_equal PHONE_SCHOOLBOY_CHAD, .Chad
+ if_equal PHONE_POKEFANM_DEREK, .Derek
+ if_equal PHONE_FISHER_TULLY, .Tully
+ if_equal PHONE_POKEMANIAC_BRENT, .Brent
+ if_equal PHONE_BIRDKEEPER_VANCE, .Vance
+ if_equal PHONE_FISHER_WILTON, .Wilton
+ if_equal PHONE_BLACKBELT_KENJI, .Kenji
+ if_equal PHONE_HIKER_PARRY, .Parry
+
+.Jack:
+ farwritetext UnknownText_0x1b4dc5
+ buttonsound
+ end
+
+.Huey:
+ farwritetext UnknownText_0x1b5073
+ buttonsound
+ end
+
+.Gaven:
+ farwritetext UnknownText_0x1b5270
+ buttonsound
+ end
+
+.Jose:
+ farwritetext UnknownText_0x1b55ae
+ buttonsound
+ end
+
+.Joey:
+ farwritetext UnknownText_0x1b589a
+ buttonsound
+ end
+
+.Wade:
+ farwritetext UnknownText_0x1b5a3b
+ buttonsound
+ end
+
+.Ralph:
+ farwritetext UnknownText_0x1b5c10
+ buttonsound
+ end
+
+.Anthony:
+ farwritetext UnknownText_0x1b5f7a
+ buttonsound
+ end
+
+.Todd:
+ farwritetext UnknownText_0x1b60f5
+ buttonsound
+ end
+
+.Irwin:
+ farwritetext UnknownText_0x1b638c
+ buttonsound
+ end
+
+.Arnie:
+ farwritetext UnknownText_0x1b6454
+ buttonsound
+ end
+
+.Alan:
+ farwritetext UnknownText_0x1b659d
+ buttonsound
+ end
+
+.Chad:
+ farwritetext UnknownText_0x1b67e2
+ buttonsound
+ end
+
+.Derek:
+ farwritetext UnknownText_0x1b69a8
+ buttonsound
+ end
+
+.Tully:
+ farwritetext UnknownText_0x1b6b39
+ buttonsound
+ end
+
+.Brent:
+ farwritetext UnknownText_0x1b6c96
+ buttonsound
+ end
+
+.Vance:
+ farwritetext UnknownText_0x1b7019
+ buttonsound
+ end
+
+.Wilton:
+ farwritetext UnknownText_0x1b71d5
+ buttonsound
+ end
+
+.Kenji:
+ farwritetext UnknownText_0x1b730b
+ buttonsound
+ end
+
+.Parry:
+ farwritetext UnknownText_0x1b73c7
+ buttonsound
+ end
+
+PhoneScript_AnswerPhone_Male_Day:
+ checkcode VAR_CALLERID
+ if_equal PHONE_SCHOOLBOY_JACK, .Jack
+ if_equal PHONE_SAILOR_HUEY, .Huey
+ if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
+ if_equal PHONE_BIRDKEEPER_JOSE, .Jose
+ if_equal PHONE_YOUNGSTER_JOEY, .Joey
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_FISHER_RALPH, .Ralph
+ if_equal PHONE_HIKER_ANTHONY, .Anthony
+ if_equal PHONE_CAMPER_TODD, .Todd
+ if_equal PHONE_JUGGLER_IRWIN, .Irwin
+ if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
+ if_equal PHONE_SCHOOLBOY_ALAN, .Alan
+ if_equal PHONE_SCHOOLBOY_CHAD, .Chad
+ if_equal PHONE_POKEFANM_DEREK, .Derek
+ if_equal PHONE_FISHER_TULLY, .Tully
+ if_equal PHONE_POKEMANIAC_BRENT, .Brent
+ if_equal PHONE_BIRDKEEPER_VANCE, .Vance
+ if_equal PHONE_FISHER_WILTON, .Wilton
+ if_equal PHONE_BLACKBELT_KENJI, .Kenji
+ if_equal PHONE_HIKER_PARRY, .Parry
+
+.Jack:
+ farwritetext UnknownText_0x1b4ded
+ buttonsound
+ end
+
+.Huey:
+ farwritetext UnknownText_0x1b509b
+ buttonsound
+ end
+
+.Gaven:
+ farwritetext UnknownText_0x1b52a5
+ buttonsound
+ end
+
+.Jose:
+ farwritetext UnknownText_0x1b55da
+ buttonsound
+ end
+
+.Joey:
+ farwritetext UnknownText_0x1b58c2
+ buttonsound
+ end
+
+.Wade:
+ farwritetext UnknownText_0x1b5a74
+ buttonsound
+ end
+
+.Ralph:
+ farwritetext UnknownText_0x1b5c63
+ buttonsound
+ end
+
+.Anthony:
+ farwritetext UnknownText_0x1b5f9e
+ buttonsound
+ end
+
+.Todd:
+ farwritetext UnknownText_0x1b611b
+ buttonsound
+ end
+
+.Irwin:
+ farwritetext UnknownText_0x1b63a8
+ buttonsound
+ end
+
+.Arnie:
+ farwritetext UnknownText_0x1b647e
+ buttonsound
+ end
+
+.Alan:
+ farwritetext UnknownText_0x1b65c7
+ buttonsound
+ end
+
+.Chad:
+ farwritetext UnknownText_0x1b680e
+ buttonsound
+ end
+
+.Derek:
+ farwritetext UnknownText_0x1b69d2
+ buttonsound
+ end
+
+.Tully:
+ farwritetext UnknownText_0x1b6b65
+ buttonsound
+ end
+
+.Brent:
+ farwritetext UnknownText_0x1b6cc6
+ buttonsound
+ end
+
+.Vance:
+ farwritetext UnknownText_0x1b7057
+ buttonsound
+ end
+
+.Wilton:
+ farwritetext UnknownText_0x1b71fc
+ buttonsound
+ end
+
+.Kenji:
+ farwritetext UnknownText_0x1b7331
+ buttonsound
+ end
+
+.Parry:
+ farwritetext UnknownText_0x1b73ef
+ buttonsound
+ end
+
+PhoneScript_AnswerPhone_Male_Nite:
+ checkcode VAR_CALLERID
+ if_equal PHONE_SCHOOLBOY_JACK, .Jack
+ if_equal PHONE_SAILOR_HUEY, .Huey
+ if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
+ if_equal PHONE_BIRDKEEPER_JOSE, .Jose
+ if_equal PHONE_YOUNGSTER_JOEY, .Joey
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_FISHER_RALPH, .Ralph
+ if_equal PHONE_HIKER_ANTHONY, .Anthony
+ if_equal PHONE_CAMPER_TODD, .Todd
+ if_equal PHONE_JUGGLER_IRWIN, .Irwin
+ if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
+ if_equal PHONE_SCHOOLBOY_ALAN, .Alan
+ if_equal PHONE_SCHOOLBOY_CHAD, .Chad
+ if_equal PHONE_POKEFANM_DEREK, .Derek
+ if_equal PHONE_FISHER_TULLY, .Tully
+ if_equal PHONE_POKEMANIAC_BRENT, .Brent
+ if_equal PHONE_BIRDKEEPER_VANCE, .Vance
+ if_equal PHONE_FISHER_WILTON, .Wilton
+ if_equal PHONE_BLACKBELT_KENJI, .Kenji
+ if_equal PHONE_HIKER_PARRY, .Parry
+
+.Jack:
+ farwritetext UnknownText_0x1b4e16
+ buttonsound
+ end
+
+.Huey:
+ farwritetext UnknownText_0x1b50c2
+ buttonsound
+ end
+
+.Gaven:
+ farwritetext UnknownText_0x1b52cc
+ buttonsound
+ end
+
+.Jose:
+ farwritetext UnknownText_0x1b55fc
+ buttonsound
+ end
+
+.Joey:
+ farwritetext UnknownText_0x1b58ea
+ buttonsound
+ end
+
+.Wade:
+ farwritetext UnknownText_0x1b5a9f
+ buttonsound
+ end
+
+.Ralph:
+ farwritetext UnknownText_0x1b5cb6
+ buttonsound
+ end
+
+.Anthony:
+ farwritetext UnknownText_0x1b5fc9
+ buttonsound
+ end
+
+.Todd:
+ farwritetext UnknownText_0x1b6149
+ buttonsound
+ end
+
+.Irwin:
+ farwritetext UnknownText_0x1b63c4
+ buttonsound
+ end
+
+.Arnie:
+ farwritetext UnknownText_0x1b64a8
+ buttonsound
+ end
+
+.Alan:
+ farwritetext UnknownText_0x1b65e3
+ buttonsound
+ end
+
+.Chad:
+ farwritetext UnknownText_0x1b6836
+ buttonsound
+ end
+
+.Derek:
+ farwritetext UnknownText_0x1b69f8
+ buttonsound
+ end
+
+.Tully:
+ farwritetext UnknownText_0x1b6b92
+ buttonsound
+ end
+
+.Brent:
+ farwritetext UnknownText_0x1b6cf6
+ buttonsound
+ end
+
+.Vance:
+ farwritetext UnknownText_0x1b7092
+ buttonsound
+ end
+
+.Wilton:
+ farwritetext UnknownText_0x1b722a
+ buttonsound
+ end
+
+.Kenji:
+ farwritetext UnknownText_0x1b7357
+ buttonsound
+ end
+
+.Parry:
+ farwritetext UnknownText_0x1b7417
+ buttonsound
+ end
+
+PhoneScript_AnswerPhone_Female:
+ checkday
+ iftrue PhoneScript_AnswerPhone_Female_Day
+ checknite
+ iftrue PhoneScript_AnswerPhone_Female_Nite
+ checkcode VAR_CALLERID
+ if_equal PHONE_POKEFAN_BEVERLY, .Beverly
+ if_equal PHONE_COOLTRAINERF_BETH, .Beth
+ if_equal PHONE_COOLTRAINERF_REENA, .Reena
+ if_equal PHONE_PICNICKER_LIZ, .Liz
+ if_equal PHONE_PICNICKER_GINA, .Gina
+ if_equal PHONE_LASS_DANA, .Dana
+ if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
+ if_equal PHONE_PICNICKER_ERIN, .Erin
+
+.Beverly:
+ farwritetext UnknownText_0x1b4f21
+ buttonsound
+ end
+
+.Beth:
+ farwritetext UnknownText_0x1b53f7
+ buttonsound
+ end
+
+.Reena:
+ farwritetext UnknownText_0x1b5702
+ buttonsound
+ end
+
+.Liz:
+ farwritetext UnknownText_0x1b5d9f
+ buttonsound
+ end
+
+.Gina:
+ farwritetext UnknownText_0x1b626a
+ buttonsound
+ end
+
+.Dana:
+ farwritetext UnknownText_0x1b66c8
+ buttonsound
+ end
+
+.Tiffany:
+ farwritetext UnknownText_0x1b6e7c
+ buttonsound
+ end
+
+.Erin:
+ farwritetext UnknownText_0x1b751a
+ buttonsound
+ end
+
+PhoneScript_AnswerPhone_Female_Day:
+ checkcode VAR_CALLERID
+ if_equal PHONE_POKEFAN_BEVERLY, .Beverly
+ if_equal PHONE_COOLTRAINERF_BETH, .Beth
+ if_equal PHONE_COOLTRAINERF_REENA, .Reena
+ if_equal PHONE_PICNICKER_LIZ, .Liz
+ if_equal PHONE_PICNICKER_GINA, .Gina
+ if_equal PHONE_LASS_DANA, .Dana
+ if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
+ if_equal PHONE_PICNICKER_ERIN, .Erin
+
+.Beverly:
+ farwritetext UnknownText_0x1b4f4d
+ buttonsound
+ end
+
+.Beth:
+ farwritetext UnknownText_0x1b5424
+ buttonsound
+ end
+
+.Reena:
+ farwritetext UnknownText_0x1b572e
+ buttonsound
+ end
+
+.Liz:
+ farwritetext UnknownText_0x1b5dcc
+ buttonsound
+ end
+
+.Gina:
+ farwritetext UnknownText_0x1b6296
+ buttonsound
+ end
+
+.Dana:
+ farwritetext UnknownText_0x1b66ec
+ buttonsound
+ end
+
+.Tiffany:
+ farwritetext UnknownText_0x1b6ea6
+ buttonsound
+ end
+
+.Erin:
+ farwritetext UnknownText_0x1b7548
+ buttonsound
+ end
+
+PhoneScript_AnswerPhone_Female_Nite:
+ checkcode VAR_CALLERID
+ if_equal PHONE_POKEFAN_BEVERLY, .Beverly
+ if_equal PHONE_COOLTRAINERF_BETH, .Beth
+ if_equal PHONE_COOLTRAINERF_REENA, .Reena
+ if_equal PHONE_PICNICKER_LIZ, .Liz
+ if_equal PHONE_PICNICKER_GINA, .Gina
+ if_equal PHONE_LASS_DANA, .Dana
+ if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
+ if_equal PHONE_PICNICKER_ERIN, .Erin
+
+.Beverly:
+ farwritetext UnknownText_0x1b4f75
+ buttonsound
+ end
+
+.Beth:
+ farwritetext UnknownText_0x1b5446
+ buttonsound
+ end
+
+.Reena:
+ farwritetext UnknownText_0x1b575a
+ buttonsound
+ end
+
+.Liz:
+ farwritetext UnknownText_0x1b5df8
+ buttonsound
+ end
+
+.Gina:
+ farwritetext UnknownText_0x1b62c5
+ buttonsound
+ end
+
+.Dana:
+ farwritetext UnknownText_0x1b6713
+ buttonsound
+ end
+
+.Tiffany:
+ farwritetext UnknownText_0x1b6ec9
+ buttonsound
+ end
+
+.Erin:
+ farwritetext UnknownText_0x1b756f
+ buttonsound
+ end
+
+PhoneScript_GreetPhone_Male:
+ checkday
+ iftrue PhoneScript_GreetPhone_Male_Day
+ checknite
+ iftrue PhoneScript_GreetPhone_Male_Nite
+ checkcode VAR_CALLERID
+ if_equal PHONE_SCHOOLBOY_JACK, .Jack
+ if_equal PHONE_SAILOR_HUEY, .Huey
+ if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
+ if_equal PHONE_BIRDKEEPER_JOSE, .Jose
+ if_equal PHONE_YOUNGSTER_JOEY, .Joey
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_FISHER_RALPH, .Ralph
+ if_equal PHONE_HIKER_ANTHONY, .Anthony
+ if_equal PHONE_CAMPER_TODD, .Todd
+ if_equal PHONE_JUGGLER_IRWIN, .Irwin
+ if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
+ if_equal PHONE_SCHOOLBOY_ALAN, .Alan
+ if_equal PHONE_SCHOOLBOY_CHAD, .Chad
+ if_equal PHONE_POKEFANM_DEREK, .Derek
+ if_equal PHONE_FISHER_TULLY, .Tully
+ if_equal PHONE_POKEMANIAC_BRENT, .Brent
+ if_equal PHONE_BIRDKEEPER_VANCE, .Vance
+ if_equal PHONE_FISHER_WILTON, .Wilton
+ if_equal PHONE_BLACKBELT_KENJI, .Kenji
+ if_equal PHONE_HIKER_PARRY, .Parry
+
+.Jack:
+ farwritetext UnknownText_0x1b4e3e
+ buttonsound
+ end
+
+.Huey:
+ farwritetext UnknownText_0x1b50e9
+ buttonsound
+ end
+
+.Gaven:
+ farwritetext UnknownText_0x1b5301
+ buttonsound
+ end
+
+.Jose:
+ farwritetext UnknownText_0x1b5628
+ buttonsound
+ end
+
+.Joey:
+ farwritetext UnknownText_0x1b5912
+ buttonsound
+ end
+
+.Wade:
+ farwritetext UnknownText_0x1b5ad8
+ buttonsound
+ end
+
+.Ralph:
+ farwritetext UnknownText_0x1b5d09
+ buttonsound
+ end
+
+.Anthony:
+ farwritetext UnknownText_0x1b5ff6
+ buttonsound
+ end
+
+.Todd:
+ farwritetext UnknownText_0x1b616e
+ buttonsound
+ end
+
+.Irwin:
+ farwritetext UnknownText_0x1b63e3
+ buttonsound
+ end
+
+.Arnie:
+ farwritetext UnknownText_0x1b64d2
+ buttonsound
+ end
+
+.Alan:
+ farwritetext UnknownText_0x1b660d
+ buttonsound
+ end
+
+.Chad:
+ farwritetext UnknownText_0x1b6862
+ buttonsound
+ end
+
+.Derek:
+ farwritetext UnknownText_0x1b6a22
+ buttonsound
+ end
+
+.Tully:
+ farwritetext UnknownText_0x1b6bb9
+ buttonsound
+ end
+
+.Brent:
+ farwritetext UnknownText_0x1b6d26
+ buttonsound
+ end
+
+.Vance:
+ farwritetext UnknownText_0x1b70e7
+ buttonsound
+ end
+
+.Wilton:
+ farwritetext UnknownText_0x1b725c
+ buttonsound
+ end
+
+.Kenji:
+ farwritetext UnknownText_0x1b737f
+ buttonsound
+ end
+
+.Parry:
+ farwritetext UnknownText_0x1b743f
+ buttonsound
+ end
+
+PhoneScript_GreetPhone_Male_Day:
+ checkcode VAR_CALLERID
+ if_equal PHONE_SCHOOLBOY_JACK, .Jack
+ if_equal PHONE_SAILOR_HUEY, .Huey
+ if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
+ if_equal PHONE_BIRDKEEPER_JOSE, .Jose
+ if_equal PHONE_YOUNGSTER_JOEY, .Joey
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_FISHER_RALPH, .Ralph
+ if_equal PHONE_HIKER_ANTHONY, .Anthony
+ if_equal PHONE_CAMPER_TODD, .Todd
+ if_equal PHONE_JUGGLER_IRWIN, .Irwin
+ if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
+ if_equal PHONE_SCHOOLBOY_ALAN, .Alan
+ if_equal PHONE_SCHOOLBOY_CHAD, .Chad
+ if_equal PHONE_POKEFANM_DEREK, .Derek
+ if_equal PHONE_FISHER_TULLY, .Tully
+ if_equal PHONE_POKEMANIAC_BRENT, .Brent
+ if_equal PHONE_BIRDKEEPER_VANCE, .Vance
+ if_equal PHONE_FISHER_WILTON, .Wilton
+ if_equal PHONE_BLACKBELT_KENJI, .Kenji
+ if_equal PHONE_HIKER_PARRY, .Parry
+
+.Jack:
+ farwritetext UnknownText_0x1b4e72
+ buttonsound
+ end
+
+.Huey:
+ farwritetext UnknownText_0x1b511a
+ buttonsound
+ end
+
+.Gaven:
+ farwritetext UnknownText_0x1b5335
+ buttonsound
+ end
+
+.Jose:
+ farwritetext UnknownText_0x1b564c
+ buttonsound
+ end
+
+.Joey:
+ farwritetext UnknownText_0x1b5948
+ buttonsound
+ end
+
+.Wade:
+ farwritetext UnknownText_0x1b5b0b
+ buttonsound
+ end
+
+.Ralph:
+ farwritetext UnknownText_0x1b5d21
+ buttonsound
+ end
+
+.Anthony:
+ farwritetext UnknownText_0x1b6017
+ buttonsound
+ end
+
+.Todd:
+ farwritetext UnknownText_0x1b618f
+ buttonsound
+ end
+
+.Irwin:
+ farwritetext UnknownText_0x1b6407
+ buttonsound
+ end
+
+.Arnie:
+ farwritetext UnknownText_0x1b6506
+ buttonsound
+ end
+
+.Alan:
+ farwritetext UnknownText_0x1b6624
+ buttonsound
+ end
+
+.Chad:
+ farwritetext UnknownText_0x1b6890
+ buttonsound
+ end
+
+.Derek:
+ farwritetext UnknownText_0x1b6a56
+ buttonsound
+ end
+
+.Tully:
+ farwritetext UnknownText_0x1b6bef
+ buttonsound
+ end
+
+.Brent:
+ farwritetext UnknownText_0x1b6d57
+ buttonsound
+ end
+
+.Vance:
+ farwritetext UnknownText_0x1b7112
+ buttonsound
+ end
+
+.Wilton:
+ farwritetext UnknownText_0x1b7283
+ buttonsound
+ end
+
+.Kenji:
+ farwritetext UnknownText_0x1b7397
+ buttonsound
+ end
+
+.Parry:
+ farwritetext UnknownText_0x1b746f
+ buttonsound
+ end
+
+PhoneScript_GreetPhone_Male_Nite:
+ checkcode VAR_CALLERID
+ if_equal PHONE_SCHOOLBOY_JACK, .Jack
+ if_equal PHONE_SAILOR_HUEY, .Huey
+ if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
+ if_equal PHONE_BIRDKEEPER_JOSE, .Jose
+ if_equal PHONE_YOUNGSTER_JOEY, .Joey
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_FISHER_RALPH, .Ralph
+ if_equal PHONE_HIKER_ANTHONY, .Anthony
+ if_equal PHONE_CAMPER_TODD, .Todd
+ if_equal PHONE_JUGGLER_IRWIN, .Irwin
+ if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
+ if_equal PHONE_SCHOOLBOY_ALAN, .Alan
+ if_equal PHONE_SCHOOLBOY_CHAD, .Chad
+ if_equal PHONE_POKEFANM_DEREK, .Derek
+ if_equal PHONE_FISHER_TULLY, .Tully
+ if_equal PHONE_POKEMANIAC_BRENT, .Brent
+ if_equal PHONE_BIRDKEEPER_VANCE, .Vance
+ if_equal PHONE_FISHER_WILTON, .Wilton
+ if_equal PHONE_BLACKBELT_KENJI, .Kenji
+ if_equal PHONE_HIKER_PARRY, .Parry
+
+.Jack:
+ farwritetext UnknownText_0x1b4e9e
+ buttonsound
+ end
+
+.Huey:
+ farwritetext UnknownText_0x1b5154
+ buttonsound
+ end
+
+.Gaven:
+ farwritetext UnknownText_0x1b535f
+ buttonsound
+ end
+
+.Jose:
+ farwritetext UnknownText_0x1b5670
+ buttonsound
+ end
+
+.Joey:
+ farwritetext UnknownText_0x1b597c
+ buttonsound
+ end
+
+.Wade:
+ farwritetext UnknownText_0x1b5b37
+ buttonsound
+ end
+
+.Ralph:
+ farwritetext UnknownText_0x1b5d39
+ buttonsound
+ end
+
+.Anthony:
+ farwritetext UnknownText_0x1b6041
+ buttonsound
+ end
+
+.Todd:
+ farwritetext UnknownText_0x1b61bd
+ buttonsound
+ end
+
+.Irwin:
+ farwritetext UnknownText_0x1b642c
+ buttonsound
+ end
+
+.Arnie:
+ farwritetext UnknownText_0x1b6539
+ buttonsound
+ end
+
+.Alan:
+ farwritetext UnknownText_0x1b663b
+ buttonsound
+ end
+
+.Chad:
+ farwritetext UnknownText_0x1b68ba
+ buttonsound
+ end
+
+.Derek:
+ farwritetext UnknownText_0x1b6a8b
+ buttonsound
+ end
+
+.Tully:
+ farwritetext UnknownText_0x1b6c23
+ buttonsound
+ end
+
+.Brent:
+ farwritetext UnknownText_0x1b6d88
+ buttonsound
+ end
+
+.Vance:
+ farwritetext UnknownText_0x1b7132
+ buttonsound
+ end
+
+.Wilton:
+ farwritetext UnknownText_0x1b72a5
+ buttonsound
+ end
+
+.Kenji:
+ farwritetext UnknownText_0x1b73af
+ buttonsound
+ end
+
+.Parry:
+ farwritetext UnknownText_0x1b749b
+ buttonsound
+ end
+
+PhoneScript_GreetPhone_Female:
+ checkday
+ iftrue PhoneScript_GreetPhone_Female_Day
+ checknite
+ iftrue PhoneScript_GreetPhone_Female_Nite
+ checkcode VAR_CALLERID
+ if_equal PHONE_POKEFAN_BEVERLY, .Beverly
+ if_equal PHONE_COOLTRAINERF_BETH, .Beth
+ if_equal PHONE_COOLTRAINERF_REENA, .Reena
+ if_equal PHONE_PICNICKER_LIZ, .Liz
+ if_equal PHONE_PICNICKER_GINA, .Gina
+ if_equal PHONE_LASS_DANA, .Dana
+ if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
+ if_equal PHONE_PICNICKER_ERIN, .Erin
+
+.Beverly:
+ farwritetext UnknownText_0x1b4fa1
+ buttonsound
+ end
+
+.Beth:
+ farwritetext UnknownText_0x1b5472
+ buttonsound
+ end
+
+.Reena:
+ farwritetext UnknownText_0x1b5786
+ buttonsound
+ end
+
+.Liz:
+ farwritetext UnknownText_0x1b5e25
+ buttonsound
+ end
+
+.Gina:
+ farwritetext UnknownText_0x1b62f1
+ buttonsound
+ end
+
+.Dana:
+ farwritetext UnknownText_0x1b6738
+ buttonsound
+ end
+
+.Tiffany:
+ farwritetext UnknownText_0x1b6ef3
+ buttonsound
+ end
+
+.Erin:
+ farwritetext UnknownText_0x1b758f
+ buttonsound
+ end
+
+PhoneScript_GreetPhone_Female_Day:
+ checkcode VAR_CALLERID
+ if_equal PHONE_POKEFAN_BEVERLY, .Beverly
+ if_equal PHONE_COOLTRAINERF_BETH, .Beth
+ if_equal PHONE_COOLTRAINERF_REENA, .Reena
+ if_equal PHONE_PICNICKER_LIZ, .Liz
+ if_equal PHONE_PICNICKER_GINA, .Gina
+ if_equal PHONE_LASS_DANA, .Dana
+ if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
+ if_equal PHONE_PICNICKER_ERIN, .Erin
+
+.Beverly:
+ farwritetext UnknownText_0x1b4fda
+ buttonsound
+ end
+
+.Beth:
+ farwritetext UnknownText_0x1b54a6
+ buttonsound
+ end
+
+.Reena:
+ farwritetext UnknownText_0x1b57b7
+ buttonsound
+ end
+
+.Liz:
+ farwritetext UnknownText_0x1b5e59
+ buttonsound
+ end
+
+.Gina:
+ farwritetext UnknownText_0x1b630e
+ buttonsound
+ end
+
+.Dana:
+ farwritetext UnknownText_0x1b6757
+ buttonsound
+ end
+
+.Tiffany:
+ farwritetext UnknownText_0x1b6f1c
+ buttonsound
+ end
+
+.Erin:
+ farwritetext UnknownText_0x1b75ac
+ buttonsound
+ end
+
+PhoneScript_GreetPhone_Female_Nite:
+ checkcode VAR_CALLERID
+ if_equal PHONE_POKEFAN_BEVERLY, .Beverly
+ if_equal PHONE_COOLTRAINERF_BETH, .Beth
+ if_equal PHONE_COOLTRAINERF_REENA, .Reena
+ if_equal PHONE_PICNICKER_LIZ, .Liz
+ if_equal PHONE_PICNICKER_GINA, .Gina
+ if_equal PHONE_LASS_DANA, .Dana
+ if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
+ if_equal PHONE_PICNICKER_ERIN, .Erin
+
+.Beverly:
+ farwritetext UnknownText_0x1b5004
+ buttonsound
+ end
+
+.Beth:
+ farwritetext UnknownText_0x1b54d4
+ buttonsound
+ end
+
+.Reena:
+ farwritetext UnknownText_0x1b57e8
+ buttonsound
+ end
+
+.Liz:
+ farwritetext UnknownText_0x1b5e8e
+ buttonsound
+ end
+
+.Gina:
+ farwritetext UnknownText_0x1b6331
+ buttonsound
+ end
+
+.Dana:
+ farwritetext UnknownText_0x1b6776
+ buttonsound
+ end
+
+.Tiffany:
+ farwritetext UnknownText_0x1b6f37
+ buttonsound
+ end
+
+.Erin:
+ farwritetext UnknownText_0x1b75c9
+ buttonsound
+ end
+
+PhoneScript_Generic_Male:
+ checkcode VAR_CALLERID
+ if_equal PHONE_SCHOOLBOY_JACK, .Jack
+ if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
+ if_equal PHONE_BIRDKEEPER_JOSE, .Jose
+ if_equal PHONE_YOUNGSTER_JOEY, .Joey
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_FISHER_RALPH, .Ralph
+ if_equal PHONE_HIKER_ANTHONY, .Anthony
+ if_equal PHONE_CAMPER_TODD, .Todd
+ if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
+ if_equal PHONE_SCHOOLBOY_ALAN, .Alan
+ if_equal PHONE_SCHOOLBOY_CHAD, .Chad
+ if_equal PHONE_POKEFANM_DEREK, .Derek
+ if_equal PHONE_FISHER_TULLY, .Tully
+ if_equal PHONE_POKEMANIAC_BRENT, .Brent
+ if_equal PHONE_BIRDKEEPER_VANCE, .Vance
+ if_equal PHONE_FISHER_WILTON, .Wilton
+ if_equal PHONE_HIKER_PARRY, .Parry
+
+.Jack:
+ farwritetext UnknownText_0x1b4ecd
+ buttonsound
+ end
+
+.Unknown:
+ farwritetext UnknownText_0x1b518b
+ buttonsound
+ end
+
+.Gaven:
+ farwritetext UnknownText_0x1b5393
+ buttonsound
+ end
+
+.Jose:
+ farwritetext UnknownText_0x1b5694
+ buttonsound
+ end
+
+.Joey:
+ farwritetext UnknownText_0x1b59b2
+ buttonsound
+ end
+
+.Wade:
+ farwritetext UnknownText_0x1b5b68
+ buttonsound
+ end
+
+.Ralph:
+ farwritetext UnknownText_0x1b5d51
+ buttonsound
+ end
+
+.Anthony:
+ farwritetext UnknownText_0x1b606f
+ buttonsound
+ end
+
+.Todd:
+ farwritetext UnknownText_0x1b61f2
+ buttonsound
+ end
+
+.Arnie:
+ farwritetext UnknownText_0x1b656c
+ buttonsound
+ end
+
+.Alan:
+ farwritetext UnknownText_0x1b6652
+ buttonsound
+ end
+
+.Chad:
+ farwritetext UnknownText_0x1b68e8
+ buttonsound
+ end
+
+.Derek:
+ farwritetext UnknownText_0x1b6ac2
+ buttonsound
+ end
+
+.Tully:
+ farwritetext UnknownText_0x1b6c56
+ buttonsound
+ end
+
+.Brent:
+ farwritetext UnknownText_0x1b6db9
+ buttonsound
+ end
+
+.Vance:
+ farwritetext UnknownText_0x1b7161
+ buttonsound
+ end
+
+.Wilton:
+ farwritetext UnknownText_0x1b72d0
+ buttonsound
+ end
+
+.Parry:
+ farwritetext UnknownText_0x1b74c8
+ buttonsound
+ end
+
+PhoneScript_Generic_Female:
+ checkcode VAR_CALLERID
+ if_equal PHONE_POKEFAN_BEVERLY, .Beverly
+ if_equal PHONE_COOLTRAINERF_BETH, .Beth
+ if_equal PHONE_COOLTRAINERF_REENA, .Reena
+ if_equal PHONE_PICNICKER_LIZ, .Liz
+ if_equal PHONE_PICNICKER_GINA, .Gina
+ if_equal PHONE_LASS_DANA, .Dana
+ if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
+ if_equal PHONE_PICNICKER_ERIN, .Erin
+
+.Beverly:
+ farwritetext UnknownText_0x1b502b
+ buttonsound
+ end
+
+.Beth:
+ farwritetext UnknownText_0x1b5510
+ buttonsound
+ end
+
+.Reena:
+ farwritetext UnknownText_0x1b5819
+ buttonsound
+ end
+
+.Liz:
+ farwritetext UnknownText_0x1b5ebe
+ buttonsound
+ end
+
+.Gina:
+ farwritetext UnknownText_0x1b6352
+ buttonsound
+ end
+
+.Dana:
+ farwritetext UnknownText_0x1b6795
+ buttonsound
+ end
+
+.Tiffany:
+ farwritetext UnknownText_0x1b6f60
+ buttonsound
+ end
+
+.Erin:
+ farwritetext UnknownText_0x1b75e5
+ buttonsound
+ end
+
+PhoneScript_MonFlavorText:
+ special RandomPhoneMon
+ farscall PhoneScript_Random2
+ if_equal $0, .TooEnergetic
+ farwritetext UnknownText_0x1b518b
+ buttonsound
+ farjump PhoneScript_HangupText_Male
+
+.TooEnergetic:
+ farjump .unnecessary
+
+.unnecessary
+ farwritetext UnknownText_0x1b522b
+ buttonsound
+ farjump PhoneScript_HangupText_Male
+; be643
+
+
+GrandmaString: db "Grandma@"
+GrandpaString: db "Grandpa@"
+MomString: db "Mom@"
+DadString: db "Dad@"
+SisterString: db "Sister@"
+BrotherString: db "Brother@"
+
diff --git a/engine/phone/phone.asm b/engine/phone/phone.asm
new file mode 100644
index 000000000..53bb519b3
--- /dev/null
+++ b/engine/phone/phone.asm
@@ -0,0 +1,800 @@
+AddPhoneNumber:: ; 90000
+ call _CheckCellNum
+ jr c, .cant_add
+ call Phone_FindOpenSlot
+ jr nc, .cant_add
+ ld [hl], c
+ xor a
+ ret
+
+.cant_add
+ scf
+ ret
+; 9000f
+
+
+DelCellNum:: ; 9000f
+ call _CheckCellNum
+ jr nc, .not_in_list
+ xor a
+ ld [hl], a
+ ret
+
+.not_in_list
+ scf
+ ret
+; 90019
+
+CheckCellNum:: ; 90019
+ jp _CheckCellNum ; wtf
+; 9001c
+
+_CheckCellNum: ; 9001c
+ ld hl, wPhoneList
+ ld b, CONTACT_LIST_SIZE
+.loop
+ ld a, [hli]
+ cp c
+ jr z, .got_it
+ dec b
+ jr nz, .loop
+ xor a
+ ret
+
+.got_it
+ dec hl
+ scf
+ ret
+; 9002d
+
+Phone_FindOpenSlot: ; 9002d
+ call GetRemainingSpaceInPhoneList
+ ld b, a
+ ld hl, wPhoneList
+.loop
+ ld a, [hli]
+ and a
+ jr z, .FoundOpenSpace
+ dec b
+ jr nz, .loop
+ xor a
+ ret
+
+.FoundOpenSpace:
+ dec hl
+ scf
+ ret
+; 90040
+
+GetRemainingSpaceInPhoneList: ; 90040
+ xor a
+ ld [Buffer1], a
+ ld hl, PermanentNumbers
+.loop
+ ld a, [hli]
+ cp -1
+ jr z, .done
+ cp c
+ jr z, .elm_or_mom
+ push bc
+ push hl
+ ld c, a
+ call _CheckCellNum
+ jr c, .elm_or_mom_in_list
+ ld hl, Buffer1
+ inc [hl]
+
+.elm_or_mom_in_list
+ pop hl
+ pop bc
+
+.elm_or_mom
+ jr .loop
+
+.done
+ ld a, CONTACT_LIST_SIZE
+ ld hl, Buffer1
+ sub [hl]
+ ret
+; 90066
+
+PermanentNumbers: ; 90066
+ db PHONECONTACT_MOM, PHONECONTACT_ELM, -1
+; 90069
+
+
+FarPlaceString: ; 90069
+ ld a, [hROMBank]
+ push af
+ ld a, b
+ rst Bankswitch
+
+ call PlaceString
+
+ pop af
+ rst Bankswitch
+ ret
+; 90074
+
+
+CheckPhoneCall:: ; 90074 (24:4074)
+; Check if the phone is ringing in the overworld.
+
+ call CheckStandingOnEntrance
+ jr z, .no_call
+
+ call .timecheck
+ nop
+ jr nc, .no_call
+
+ call Random
+ ld b, a
+ and 50 percent
+ cp b
+ jr nz, .no_call
+
+ call GetMapHeaderPhoneServiceNybble
+ and a
+ jr nz, .no_call
+
+ call GetAvailableCallers
+ call ChooseRandomCaller
+ jr nc, .no_call
+
+ ld e, a
+ call LoadCallerScript
+ ld a, BANK(Script_ReceivePhoneCall)
+ ld hl, Script_ReceivePhoneCall
+ call CallScript
+ scf
+ ret
+
+.no_call
+ xor a
+ ret
+
+.timecheck ; 900a6 (24:40a6)
+ farcall CheckReceiveCallTimer
+ ret
+
+CheckPhoneContactTimeOfDay: ; 900ad (24:40ad)
+ push hl
+ push bc
+ push de
+ push af
+
+ farcall CheckTime
+ pop af
+ and MORN | DAY | NITE
+ and c
+
+ pop de
+ pop bc
+ pop hl
+ ret
+
+ChooseRandomCaller: ; 900bf (24:40bf)
+; If no one is available to call, don't return anything.
+ ld a, [EngineBuffer3]
+ and a
+ jr z, .NothingToSample
+
+; Sample a random number between 0 and 31.
+ ld c, a
+ call Random
+ ld a, [hRandomAdd]
+ swap a
+ and $1f
+; Compute that number modulo the number of available callers.
+ call SimpleDivide
+; Return the caller ID you just sampled.
+ ld c, a
+ ld b, 0
+ ld hl, EngineBuffer4
+ add hl, bc
+ ld a, [hl]
+ scf
+ ret
+
+.NothingToSample:
+ xor a
+ ret
+
+GetAvailableCallers: ; 900de (24:40de)
+ farcall CheckTime
+ ld a, c
+ ld [EngineBuffer1], a
+ ld hl, EngineBuffer3
+ ld bc, 11
+ xor a
+ call ByteFill
+ ld de, wPhoneList
+ ld a, CONTACT_LIST_SIZE
+
+.loop
+ ld [EngineBuffer2], a
+ ld a, [de]
+ and a
+ jr z, .not_good_for_call
+ ld hl, PhoneContacts + PHONE_CONTACT_SCRIPT2_TIME
+ ld bc, PHONE_TABLE_WIDTH
+ call AddNTimes
+ ld a, [EngineBuffer1]
+ and [hl]
+ jr z, .not_good_for_call
+ ld bc, PHONE_CONTACT_MAP_GROUP - PHONE_CONTACT_SCRIPT2_TIME
+ add hl, bc
+ ld a, [MapGroup]
+ cp [hl]
+ jr nz, .different_map
+ inc hl
+ ld a, [MapNumber]
+ cp [hl]
+ jr z, .not_good_for_call
+.different_map
+ ld a, [EngineBuffer3]
+ ld c, a
+ ld b, $0
+ inc a
+ ld [EngineBuffer3], a
+ ld hl, EngineBuffer4
+ add hl, bc
+ ld a, [de]
+ ld [hl], a
+.not_good_for_call
+ inc de
+ ld a, [EngineBuffer2]
+ dec a
+ jr nz, .loop
+ ret
+
+CheckSpecialPhoneCall:: ; 90136 (24:4136)
+ ld a, [wSpecialPhoneCallID]
+ and a
+ jr z, .NoPhoneCall
+
+ dec a
+ ld c, a
+ ld b, 0
+ ld hl, SpecialPhoneCallList
+ ld a, 6
+ call AddNTimes
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ call _hl_
+ jr nc, .NoPhoneCall
+
+ call .DoSpecialPhoneCall
+ inc hl
+ inc hl
+ ld a, [hli]
+ ld e, a
+ push hl
+ call LoadCallerScript
+ pop hl
+ ld de, wPhoneScriptPointer
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ ld a, BANK(.script)
+ ld hl, .script
+ call CallScript
+ scf
+ ret
+.NoPhoneCall:
+ xor a
+ ret
+; 90173 (24:4173)
+
+.script ; 0x90173
+ pause 30
+ jump Script_ReceivePhoneCall
+; 0x90178
+
+.DoSpecialPhoneCall: ; 90178 (24:4178)
+ ld a, [wSpecialPhoneCallID]
+ dec a
+ ld c, a
+ ld b, 0
+ ld hl, SpecialPhoneCallList
+ ld a, 6
+ call AddNTimes
+ ret
+
+SpecialCallOnlyWhenOutside: ; 90188
+ ld a, [wEnvironment]
+ cp TOWN
+ jr z, .outside
+ cp ROUTE
+ jr z, .outside
+ xor a
+ ret
+
+.outside
+ scf
+ ret
+
+SpecialCallWhereverYouAre: ; 90197
+ scf
+ ret
+
+Function90199: ; 90199 (24:4199)
+ ; Don't do the call if you're in a link communication
+ ld a, [wLinkMode]
+ and a
+ jr nz, .OutOfArea
+ ; If you're in an area without phone service, don't do the call
+ call GetMapHeaderPhoneServiceNybble
+ and a
+ jr nz, .OutOfArea
+ ; If the person can't take a call at that time, don't do the call
+ ld a, b
+ ld [wCurrentCaller], a
+ ld hl, PhoneContacts
+ ld bc, PHONE_TABLE_WIDTH
+ call AddNTimes
+ ld d, h
+ ld e, l
+ ld hl, PHONE_CONTACT_SCRIPT1_TIME
+ add hl, de
+ ld a, [hl]
+ call CheckPhoneContactTimeOfDay
+ jr z, .OutOfArea
+ ; If we're in the same map as the person we're calling,
+ ; use the "Just talk to that person" script.
+ ld hl, PHONE_CONTACT_MAP_GROUP
+ add hl, de
+ ld a, [MapGroup]
+ cp [hl]
+ jr nz, .GetPhoneScript
+ ld hl, PHONE_CONTACT_MAP_NUMBER
+ add hl, de
+ ld a, [MapNumber]
+ cp [hl]
+ jr nz, .GetPhoneScript
+ ld b, BANK(PhoneScript_JustTalkToThem)
+ ld hl, PhoneScript_JustTalkToThem
+ jr .DoPhoneCall
+
+.GetPhoneScript:
+ ld hl, PHONE_CONTACT_SCRIPT1_BANK
+ add hl, de
+ ld b, [hl]
+ ld hl, PHONE_CONTACT_SCRIPT1_ADDR_LO
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jr .DoPhoneCall
+
+.OutOfArea:
+ ld b, BANK(UnknownScript_0x90209)
+ ld de, UnknownScript_0x90209
+ call ExecuteCallbackScript
+ ret
+
+.DoPhoneCall:
+ ld a, b
+ ld [PhoneScriptBank], a
+ ld a, l
+ ld [PhoneCaller], a
+ ld a, h
+ ld [PhoneCaller + 1], a
+ ld b, BANK(UnknownScript_0x90205)
+ ld de, UnknownScript_0x90205
+ call ExecuteCallbackScript
+ ret
+; 90205 (24:4205)
+
+UnknownScript_0x90205: ; 0x90205
+ ptcall wd002
+ return
+; 0x90209
+
+UnknownScript_0x90209: ; 0x90209
+ scall UnknownScript_0x90657
+ return
+; 0x9020d
+
+LoadCallerScript: ; 9020d (24:420d)
+ nop
+ nop
+ ld a, e
+ ld [wCurrentCaller], a
+ and a
+ jr nz, .actualcaller
+ ld a, BANK(WrongNumber)
+ ld hl, WrongNumber
+ jr .proceed
+
+.actualcaller
+ ld hl, PhoneContacts
+ ld bc, 12
+ ld a, e
+ call AddNTimes
+ ld a, BANK(PhoneContacts)
+.proceed
+ ld de, EngineBuffer2
+ ld bc, 12
+ call FarCopyBytes
+ ret
+; 90233 (24:4233)
+
+WrongNumber: ; 90233
+ db TRAINER_NONE, PHONE_00
+ dba .script
+.script
+ writetext .text
+ end
+.text
+ ; Huh? Sorry, wrong number!
+ text_jump UnknownText_0x1c5565
+ db "@"
+; 90241
+
+Script_ReceivePhoneCall: ; 0x90241
+ refreshscreen $0
+ callasm RingTwice_StartCall
+ ptcall wPhoneScriptPointer
+ waitbutton
+ callasm HangUp
+ closetext
+ callasm InitCallReceiveDelay
+ end
+; 0x90255
+
+Script_SpecialBillCall:: ; 0x90255
+ callasm .LoadBillScript
+ jump Script_ReceivePhoneCall
+
+.LoadBillScript:
+ ld e, PHONE_BILL
+ jp LoadCallerScript
+; 90261
+
+UnknownScript_0x90261: ; 0x90261
+ callasm .LoadElmScript
+ pause 30
+ jump Script_ReceivePhoneCall
+
+.LoadElmScript:
+ ld e, PHONE_ELM
+ jp LoadCallerScript
+; 9026f
+
+RingTwice_StartCall: ; 9026f
+ call .Ring
+ call .Ring
+ farcall TrainerRankings_PhoneCalls
+ ret
+; 9027c
+
+.Ring: ; 9027c (24:427c)
+ call Phone_StartRinging
+ call Phone_Wait20Frames
+ call Phone_CallerTextboxWithName
+ call Phone_Wait20Frames
+ call Phone_CallerTextbox
+ call Phone_Wait20Frames
+ call Phone_CallerTextboxWithName
+ ret
+
+Phone_CallerTextboxWithName: ; 90292 (24:4292)
+ ld a, [wCurrentCaller]
+ ld b, a
+ call Function90363
+ ret
+
+PhoneCall:: ; 9029a
+ ld a, b
+ ld [PhoneScriptBank], a
+ ld a, e
+ ld [PhoneCaller], a
+ ld a, d
+ ld [PhoneCaller + 1], a
+ call Phone_FirstOfTwoRings
+ call Phone_FirstOfTwoRings
+ farcall TrainerRankings_PhoneCalls
+ ret
+; 902b3
+
+Phone_FirstOfTwoRings: ; 902b3
+ call Phone_StartRinging
+ call Phone_Wait20Frames
+ call Phone_CallerTextboxWithName2
+ call Phone_Wait20Frames
+ call Phone_CallerTextbox
+ call Phone_Wait20Frames
+ call Phone_CallerTextboxWithName2
+ ret
+; 902c9
+
+Phone_CallerTextboxWithName2: ; 902c9
+ call Phone_CallerTextbox
+ hlcoord 1, 2
+ ld [hl], "<PHONE>"
+ inc hl
+ inc hl
+ ld a, [PhoneScriptBank]
+ ld b, a
+ ld a, [PhoneCaller]
+ ld e, a
+ ld a, [PhoneCaller + 1]
+ ld d, a
+ call FarPlaceString
+ ret
+; 902e3
+
+
+Phone_NoSignal: ; 902e3 (24:42e3)
+ ld de, SFX_NO_SIGNAL
+ call PlaySFX
+ jr Phone_CallEnd
+
+HangUp:: ; 902eb
+ call HangUp_Beep
+ call HangUp_Wait20Frames
+Phone_CallEnd:
+ call HangUp_BoopOn
+ call HangUp_Wait20Frames
+ call HangUp_BoopOff
+ call HangUp_Wait20Frames
+ call HangUp_BoopOn
+ call HangUp_Wait20Frames
+ call HangUp_BoopOff
+ call HangUp_Wait20Frames
+ call HangUp_BoopOn
+ call HangUp_Wait20Frames
+ call HangUp_BoopOff
+ call HangUp_Wait20Frames
+ ret
+; 90316
+
+Function90316: ; 90316
+ ld de, SFX_SHUT_DOWN_PC
+ call PlaySFX
+ ret
+; 9031d
+
+HangUp_Beep: ; 9031d
+ ld hl, UnknownText_0x9032a
+ call PrintText
+ ld de, SFX_HANG_UP
+ call PlaySFX
+ ret
+; 9032a
+
+UnknownText_0x9032a: ; 9032a
+ text_jump UnknownText_0x1c5580
+ db "@"
+; 9032f
+
+
+HangUp_BoopOn: ; 9032f
+ ld hl, UnknownText_0x90336
+ call PrintText
+ ret
+; 90336
+
+UnknownText_0x90336: ; 0x90336
+ text_jump UnknownText_0x1c5588
+ db "@"
+; 0x9033b
+
+
+HangUp_BoopOff: ; 9033b
+ call SpeechTextBox
+ ret
+; 9033f
+
+Phone_StartRinging: ; 9033f
+ call WaitSFX
+ ld de, SFX_CALL
+ call PlaySFX
+ call Phone_CallerTextbox
+ call UpdateSprites
+ farcall PhoneRing_CopyTilemapAtOnce
+ ret
+; 90355
+
+HangUp_Wait20Frames: ; 90355
+ jr Phone_Wait20Frames
+
+Phone_Wait20Frames
+ ld c, 20
+ call DelayFrames
+ farcall PhoneRing_CopyTilemapAtOnce
+ ret
+; 90363
+
+
+Function90363: ; 90363 (24:4363)
+ push bc
+ call Phone_CallerTextbox
+ hlcoord 1, 1
+ ld [hl], "<PHONE>"
+ inc hl
+ inc hl
+ ld d, h
+ ld e, l
+ pop bc
+ call Function90380
+ ret
+
+
+Phone_CallerTextbox: ; 90375
+ hlcoord 0, 0
+ ld b, 2
+ ld c, SCREEN_WIDTH - 2
+ call TextBox
+ ret
+; 90380
+
+
+Function90380: ; 90380 (24:4380)
+ ld h, d
+ ld l, e
+ ld a, b
+ call GetCallerTrainerClass
+ call GetCallerName
+ ret
+
+CheckCanDeletePhoneNumber: ; 9038a (24:438a)
+ ld a, c
+ call GetCallerTrainerClass
+ ld a, c
+ ; and a
+ ret nz
+ ld a, b
+ cp PHONECONTACT_MOM
+ ret z
+ cp PHONECONTACT_ELM
+ ret z
+ ld c, $1
+ ret
+
+GetCallerTrainerClass: ; 9039a
+ push hl
+ ld hl, PhoneContacts + PHONE_CONTACT_TRAINER_CLASS
+ ld bc, PHONE_TABLE_WIDTH
+ call AddNTimes
+ ld a, [hli]
+ ld b, [hl]
+ ld c, a
+ pop hl
+ ret
+; 903a9
+
+
+GetCallerName: ; 903a9 (24:43a9)
+ ld a, c
+ and a
+ jr z, .NotTrainer
+
+ call Phone_GetTrainerName
+ push hl
+ push bc
+ call PlaceString
+ ld a, ":"
+ ld [bc], a
+ pop bc
+ pop hl
+ ld de, SCREEN_WIDTH + 3
+ add hl, de
+ call Phone_GetTrainerClassName
+ call PlaceString
+ ret
+
+.NotTrainer:
+ push hl
+ ld c, b
+ ld b, 0
+ ld hl, NonTrainerCallerNames
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld d, [hl]
+ pop hl
+ call PlaceString
+ ret
+; 903d6 (24:43d6)
+
+NonTrainerCallerNames: ; 903d6
+ dw .none
+ dw .mom
+ dw .bikeshop
+ dw .bill
+ dw .elm
+ dw .buena
+
+.none db "----------@"
+.mom db "MOM:@"
+.bill db "BILL:@"
+.elm db "PROF.ELM:@"
+.bikeshop db "BIKE SHOP:@"
+.buena db "BUENA:", $22, " DISC JOCKEY@"
+; 90423
+
+Phone_GetTrainerName: ; 90423 (24:4423)
+ push hl
+ push bc
+ farcall GetTrainerName
+ pop bc
+ pop hl
+ ret
+
+Phone_GetTrainerClassName: ; 9042e (24:442e)
+ push hl
+ push bc
+ farcall GetTrainerClassName
+ pop bc
+ pop hl
+ ret
+
+GetCallerLocation: ; 90439
+ ld a, [wCurrentCaller]
+ call GetCallerTrainerClass
+ ld d, c
+ ld e, b
+ push de
+ ld a, [wCurrentCaller]
+ ld hl, PhoneContacts + PHONE_CONTACT_MAP_GROUP
+ ld bc, PHONE_TABLE_WIDTH
+ call AddNTimes
+ ld b, [hl]
+ inc hl
+ ld c, [hl]
+ push bc
+ call GetWorldMapLocation
+ ld e, a
+ farcall GetLandmarkName
+ pop bc
+ pop de
+ ret
+; 9045f
+
+
+INCLUDE "data/phone_contacts.asm"
+
+INCLUDE "data/phone_special.asm"
+
+
+UnknownScript_0x90657: ; 0x90657
+ writetext UnknownText_0x9065b
+ end
+; 0x9065b
+
+UnknownText_0x9065b: ; 0x9065b
+ ; That number is out of the area.
+ text_jump UnknownText_0x1c558b
+ db "@"
+; 0x90660
+
+PhoneScript_JustTalkToThem: ; 0x90660
+ writetext UnknownText_0x90664
+ end
+; 0x90664
+
+UnknownText_0x90664: ; 0x90664
+ ; Just go talk to that person!
+ text_jump UnknownText_0x1c55ac
+ db "@"
+; 0x90669
+
+UnknownScript_0x90669: ; 0x90669
+ writetext UnknownText_0x9066d
+ end
+; 0x9066d
+
+UnknownText_0x9066d: ; 0x9066d
+ ; Thank you!
+ text_jump UnknownText_0x1c55ca
+ db "@"
+; 0x90672
diff --git a/engine/phone/phone_callers.asm b/engine/phone/phone_callers.asm
new file mode 100644
index 000000000..c90448d33
--- /dev/null
+++ b/engine/phone/phone_callers.asm
@@ -0,0 +1,961 @@
+Phone_GenericCall_Male:
+ special RandomPhoneMon
+ farscall PhoneScript_Random2
+ if_equal 0, .Bragging
+ farscall PhoneScript_Generic_Male
+ farjump Phone_FoundAMon_Male
+
+.Bragging:
+ farjump Phone_BraggingCall_Male
+
+Phone_GenericCall_Female:
+ special RandomPhoneMon
+ farscall PhoneScript_Random2
+ if_equal 0, .Bragging
+ farscall PhoneScript_Generic_Female
+ farjump Phone_FoundAMon_Female
+
+.Bragging:
+ farjump Phone_BraggingCall_Female
+
+Phone_BraggingCall_Male:
+ farscall Phone_WhosBragging_Male
+ farjump Phone_FoundAMon_Male
+
+Phone_BraggingCall_Female:
+ farscall Phone_WhosBragging_Female
+ farjump Phone_FoundAMon_Female
+
+Phone_FoundAMon_Male:
+ special RandomPhoneWildMon
+ farscall PhoneScript_Random2
+ if_equal 0, .GotAway
+ farscall Phone_WhoDefeatedMon_Male
+ farjump PhoneScript_HangupText_Male
+
+.GotAway:
+ farjump Phone_GotAwayCall_Male
+
+Phone_FoundAMon_Female:
+ special RandomPhoneWildMon
+ farscall PhoneScript_Random2
+ if_equal 0, .GotAway
+ farscall Phone_WhoDefeatedMon_Female
+ farjump PhoneScript_HangupText_Female
+
+.GotAway:
+ farjump Phone_GotAwayCall_Female
+
+Phone_GotAwayCall_Male:
+ farscall Phone_WhoLostAMon_Male
+ farjump PhoneScript_HangupText_Male
+
+Phone_GotAwayCall_Female:
+ farscall Phone_WhoLostAMon_Female
+ farjump PhoneScript_HangupText_Female
+
+Phone_WhosBragging_Male:
+ checkcode VAR_CALLERID
+ if_equal PHONE_SCHOOLBOY_JACK, .Jack
+ if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
+ if_equal PHONE_BIRDKEEPER_JOSE, .Jose
+ if_equal PHONE_YOUNGSTER_JOEY, .Joey
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_FISHER_RALPH, .Ralph
+ if_equal PHONE_HIKER_ANTHONY, .Anthony
+ if_equal PHONE_CAMPER_TODD, .Todd
+ if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
+ if_equal PHONE_SCHOOLBOY_ALAN, .Alan
+ if_equal PHONE_SCHOOLBOY_CHAD, .Chad
+ if_equal PHONE_POKEFANM_DEREK, .Derek
+ if_equal PHONE_FISHER_TULLY, .Tully
+ if_equal PHONE_POKEMANIAC_BRENT, .Brent
+ if_equal PHONE_BIRDKEEPER_VANCE, .Vance
+ if_equal PHONE_FISHER_WILTON, .Wilton
+ if_equal PHONE_HIKER_PARRY, .Parry
+
+.Jack:
+ farwritetext JackIntelligenceText
+ buttonsound
+ end
+
+.Gaven:
+ farwritetext GavenGreaterText
+ buttonsound
+ end
+
+.Jose:
+ farwritetext JoseAromaText
+ buttonsound
+ end
+
+.Joey:
+ farwritetext JoeySharperText
+ buttonsound
+ end
+
+.Wade:
+ farwritetext WadeAreYouGrowingText
+ buttonsound
+ end
+
+.Ralph:
+ farwritetext RalphNeglectingKidsText
+ buttonsound
+ end
+
+.Anthony:
+ farwritetext AnthonyAteBerriesText
+ buttonsound
+ end
+
+.Todd:
+ farwritetext ToddLooksCuteLikeMeText
+ buttonsound
+ end
+
+.Arnie:
+ farwritetext ArnieLovesTheCuteText
+ buttonsound
+ end
+
+.Alan:
+ farwritetext AlanGettingStrongerText
+ buttonsound
+ end
+
+.Chad:
+ farwritetext ChadObservingWildText
+ buttonsound
+ end
+
+.Derek:
+ farwritetext DerekCheekPincherText
+ buttonsound
+ end
+
+.Tully:
+ farwritetext TullyGrownText
+ buttonsound
+ end
+
+.Brent:
+ farwritetext BrentRareTradeText
+ buttonsound
+ end
+
+.Vance:
+ farwritetext VanceLiftoffText
+ buttonsound
+ end
+
+.Wilton:
+ farwritetext WiltonGrownText
+ buttonsound
+ end
+
+.Parry:
+ farwritetext ParryNoMatchText
+ buttonsound
+ end
+
+Phone_WhosBragging_Female:
+ checkcode VAR_CALLERID
+ if_equal PHONE_POKEFAN_BEVERLY, .Beverly
+ if_equal PHONE_COOLTRAINERF_BETH, .Beth
+ if_equal PHONE_COOLTRAINERF_REENA, .Reena
+ if_equal PHONE_PICNICKER_LIZ, .Liz
+ if_equal PHONE_PICNICKER_GINA, .Gina
+ if_equal PHONE_LASS_DANA, .Dana
+ if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
+ if_equal PHONE_PICNICKER_ERIN, .Erin
+
+.Beverly:
+ farwritetext UnknownText_0x174688
+ buttonsound
+ end
+
+.Beth:
+ farwritetext UnknownText_0x174c7f
+ buttonsound
+ end
+
+.Reena:
+ farwritetext UnknownText_0x1752f5
+ buttonsound
+ end
+
+.Liz:
+ farwritetext UnknownText_0x175fda
+ buttonsound
+ end
+
+.Gina:
+ farwritetext UnknownText_0x1771fd
+ buttonsound
+ end
+
+.Dana:
+ farwritetext UnknownText_0x64f74
+ buttonsound
+ end
+
+.Tiffany:
+ farwritetext UnknownText_0x665ad
+ buttonsound
+ end
+
+.Erin:
+ farwritetext UnknownText_0x6717a
+ buttonsound
+ end
+
+Phone_WhoDefeatedMon_Male:
+ checkcode VAR_CALLERID
+ if_equal PHONE_SCHOOLBOY_JACK, .Jack
+ if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
+ if_equal PHONE_BIRDKEEPER_JOSE, .Jose
+ if_equal PHONE_YOUNGSTER_JOEY, .Joey
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_FISHER_RALPH, .Ralph
+ if_equal PHONE_HIKER_ANTHONY, .Anthony
+ if_equal PHONE_CAMPER_TODD, .Todd
+ if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
+ if_equal PHONE_SCHOOLBOY_ALAN, .Alan
+ if_equal PHONE_SCHOOLBOY_CHAD, .Chad
+ if_equal PHONE_POKEFANM_DEREK, .Derek
+ if_equal PHONE_FISHER_TULLY, .Tully
+ if_equal PHONE_POKEMANIAC_BRENT, .Brent
+ if_equal PHONE_BIRDKEEPER_VANCE, .Vance
+ if_equal PHONE_FISHER_WILTON, .Wilton
+ if_equal PHONE_HIKER_PARRY, .Parry
+
+.Jack:
+ farwritetext JackDefeatedMonText
+ buttonsound
+ end
+
+.Gaven:
+ farwritetext UnknownText_0x174a80
+ buttonsound
+ end
+
+.Jose:
+ farwritetext UnknownText_0x174f90
+ buttonsound
+ end
+
+.Joey:
+ farwritetext UnknownText_0x175591
+ buttonsound
+ end
+
+.Wade:
+ farwritetext UnknownText_0x175869
+ buttonsound
+ end
+
+.Ralph:
+ farwritetext UnknownText_0x175c24
+ buttonsound
+ end
+
+.Anthony:
+ farwritetext UnknownText_0x176aef
+ buttonsound
+ end
+
+.Todd:
+ farwritetext UnknownText_0x176e9c
+ buttonsound
+ end
+
+.Arnie:
+ farwritetext UnknownText_0x64a13
+ buttonsound
+ end
+
+.Alan:
+ farwritetext UnknownText_0x64cf3
+ buttonsound
+ end
+
+.Chad:
+ farwritetext UnknownText_0x65318
+ buttonsound
+ end
+
+.Derek:
+ farwritetext UnknownText_0x65b29
+ buttonsound
+ end
+
+.Tully:
+ farwritetext UnknownText_0x65e42
+ buttonsound
+ end
+
+.Brent:
+ farwritetext UnknownText_0x6613c
+ buttonsound
+ end
+
+.Vance:
+ farwritetext UnknownText_0x669b2
+ buttonsound
+ end
+
+.Wilton:
+ farwritetext UnknownText_0x66b3e
+ buttonsound
+ end
+
+.Parry:
+ farwritetext UnknownText_0x66fc0
+ buttonsound
+ end
+
+Phone_WhoDefeatedMon_Female:
+ checkcode VAR_CALLERID
+ if_equal PHONE_POKEFAN_BEVERLY, .Beverly
+ if_equal PHONE_COOLTRAINERF_BETH, .Beth
+ if_equal PHONE_COOLTRAINERF_REENA, .Reena
+ if_equal PHONE_PICNICKER_LIZ, .Liz
+ if_equal PHONE_PICNICKER_GINA, .Gina
+ if_equal PHONE_LASS_DANA, .Dana
+ if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
+ if_equal PHONE_PICNICKER_ERIN, .Erin
+
+.Beverly:
+ farwritetext UnknownText_0x1746c3
+ buttonsound
+ end
+
+.Beth:
+ farwritetext UnknownText_0x174cf6
+ buttonsound
+ end
+
+.Reena:
+ farwritetext UnknownText_0x17536b
+ buttonsound
+ end
+
+.Liz:
+ farwritetext UnknownText_0x17602d
+ buttonsound
+ end
+
+.Gina:
+ farwritetext UnknownText_0x177237
+ buttonsound
+ end
+
+.Dana:
+ farwritetext UnknownText_0x64fb2
+ buttonsound
+ end
+
+.Tiffany:
+ farwritetext UnknownText_0x66605
+ buttonsound
+ end
+
+.Erin:
+ farwritetext UnknownText_0x671a4
+ buttonsound
+ end
+
+Phone_WhoLostAMon_Male:
+ checkcode VAR_CALLERID
+ if_equal PHONE_SCHOOLBOY_JACK, .Jack
+ if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
+ if_equal PHONE_BIRDKEEPER_JOSE, .Jose
+ if_equal PHONE_YOUNGSTER_JOEY, .Joey
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_FISHER_RALPH, .Ralph
+ if_equal PHONE_HIKER_ANTHONY, .Anthony
+ if_equal PHONE_CAMPER_TODD, .Todd
+ if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
+ if_equal PHONE_SCHOOLBOY_ALAN, .Alan
+ if_equal PHONE_SCHOOLBOY_CHAD, .Chad
+ if_equal PHONE_POKEFANM_DEREK, .Derek
+ if_equal PHONE_FISHER_TULLY, .Tully
+ if_equal PHONE_POKEMANIAC_BRENT, .Brent
+ if_equal PHONE_BIRDKEEPER_VANCE, .Vance
+ if_equal PHONE_FISHER_WILTON, .Wilton
+ if_equal PHONE_HIKER_PARRY, .Parry
+
+.Jack:
+ farwritetext UnknownText_0x174165
+ buttonsound
+ end
+
+.Gaven:
+ farwritetext UnknownText_0x174b2d
+ buttonsound
+ end
+
+.Jose:
+ farwritetext UnknownText_0x174ffd
+ buttonsound
+ end
+
+.Joey:
+ farwritetext UnknownText_0x175611
+ buttonsound
+ end
+
+.Wade:
+ farwritetext UnknownText_0x1758e4
+ buttonsound
+ end
+
+.Ralph:
+ farwritetext UnknownText_0x175c9f
+ buttonsound
+ end
+
+.Anthony:
+ farwritetext UnknownText_0x176b45
+ buttonsound
+ end
+
+.Todd:
+ farwritetext UnknownText_0x176eee
+ buttonsound
+ end
+
+.Arnie:
+ farwritetext UnknownText_0x64a71
+ buttonsound
+ end
+
+.Alan:
+ farwritetext UnknownText_0x64d4f
+ buttonsound
+ end
+
+.Chad:
+ farwritetext UnknownText_0x65399
+ buttonsound
+ end
+
+.Derek:
+ farwritetext UnknownText_0x65bc8
+ buttonsound
+ end
+
+.Tully:
+ farwritetext UnknownText_0x65eac
+ buttonsound
+ end
+
+.Brent:
+ farwritetext UnknownText_0x6618c
+ buttonsound
+ end
+
+.Vance:
+ farwritetext UnknownText_0x669ed
+ buttonsound
+ end
+
+.Wilton:
+ farwritetext UnknownText_0x66b8f
+ buttonsound
+ end
+
+.Parry:
+ farwritetext UnknownText_0x67001
+ buttonsound
+ end
+
+Phone_WhoLostAMon_Female:
+ checkcode VAR_CALLERID
+ if_equal PHONE_POKEFAN_BEVERLY, .Beverly
+ if_equal PHONE_COOLTRAINERF_BETH, .Beth
+ if_equal PHONE_COOLTRAINERF_REENA, .Reena
+ if_equal PHONE_PICNICKER_LIZ, .Liz
+ if_equal PHONE_PICNICKER_GINA, .Gina
+ if_equal PHONE_LASS_DANA, .Dana
+ if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
+ if_equal PHONE_PICNICKER_ERIN, .Erin
+
+.Beverly:
+ farwritetext UnknownText_0x174734
+ buttonsound
+ end
+
+.Beth:
+ farwritetext UnknownText_0x174d86
+ buttonsound
+ end
+
+.Reena:
+ farwritetext UnknownText_0x1753c5
+ buttonsound
+ end
+
+.Liz:
+ farwritetext UnknownText_0x176095
+ buttonsound
+ end
+
+.Gina:
+ farwritetext UnknownText_0x177297
+ buttonsound
+ end
+
+.Dana:
+ farwritetext UnknownText_0x6501c
+ buttonsound
+ end
+
+.Tiffany:
+ farwritetext UnknownText_0x66688
+ buttonsound
+ end
+
+.Erin:
+ farwritetext UnknownText_0x671eb
+ buttonsound
+ end
+
+PhoneScript_WantsToBattle_Male:
+ farscall PhoneScript_RematchText_Male
+ farjump PhoneScript_HangupText_Male
+
+PhoneScript_WantsToBattle_Female:
+ farscall PhoneScript_RematchText_Female
+ farjump PhoneScript_HangupText_Female
+
+PhoneScript_RematchText_Male:
+ checkcode VAR_CALLERID
+ if_equal PHONE_SCHOOLBOY_JACK, .Jack
+ if_equal PHONE_SAILOR_HUEY, .Huey
+ if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
+ if_equal PHONE_BIRDKEEPER_JOSE, .Jose
+ if_equal PHONE_YOUNGSTER_JOEY, .Joey
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_FISHER_RALPH, .Ralph
+ if_equal PHONE_HIKER_ANTHONY, .Anthony
+ if_equal PHONE_CAMPER_TODD, .Todd
+ if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
+ if_equal PHONE_SCHOOLBOY_ALAN, .Alan
+ if_equal PHONE_SCHOOLBOY_CHAD, .Chad
+ if_equal PHONE_FISHER_TULLY, .Tully
+ if_equal PHONE_POKEMANIAC_BRENT, .Brent
+ if_equal PHONE_BIRDKEEPER_VANCE, .Vance
+ if_equal PHONE_FISHER_WILTON, .Wilton
+ if_equal PHONE_HIKER_PARRY, .Parry
+
+.Jack:
+ farwritetext UnknownText_0x1741e1
+ buttonsound
+ end
+
+.Huey:
+ farwritetext UnknownText_0x1748ea
+ buttonsound
+ end
+
+.Gaven:
+ farwritetext UnknownText_0x174bc5
+ buttonsound
+ end
+
+.Jose:
+ farwritetext UnknownText_0x17507d
+ buttonsound
+ end
+
+.Joey:
+ farwritetext UnknownText_0x175693
+ buttonsound
+ end
+
+.Wade:
+ farwritetext UnknownText_0x175976
+ buttonsound
+ end
+
+.Ralph:
+ farwritetext UnknownText_0x175d40
+ buttonsound
+ end
+
+.Anthony:
+ farwritetext UnknownText_0x176bee
+ buttonsound
+ end
+
+.Todd:
+ farwritetext UnknownText_0x176f60
+ buttonsound
+ end
+
+.Arnie:
+ farwritetext UnknownText_0x64ada
+ buttonsound
+ end
+
+.Alan:
+ farwritetext UnknownText_0x64da4
+ buttonsound
+ end
+
+.Chad:
+ farwritetext UnknownText_0x65419
+ buttonsound
+ end
+
+.Tully:
+ farwritetext UnknownText_0x65f17
+ buttonsound
+ end
+
+.Brent:
+ farwritetext UnknownText_0x66214
+ buttonsound
+ end
+
+.Vance:
+ farwritetext UnknownText_0x66a3a
+ buttonsound
+ end
+
+.Wilton:
+ farwritetext UnknownText_0x66bf3
+ buttonsound
+ end
+
+.Parry:
+ farwritetext UnknownText_0x67096
+ buttonsound
+ end
+
+PhoneScript_RematchText_Female:
+ checkcode VAR_CALLERID
+ if_equal PHONE_COOLTRAINERF_BETH, .Beth
+ if_equal PHONE_COOLTRAINERF_REENA, .Reena
+ if_equal PHONE_PICNICKER_LIZ, .Liz
+ if_equal PHONE_PICNICKER_GINA, .Gina
+ if_equal PHONE_LASS_DANA, .Dana
+ if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
+ if_equal PHONE_PICNICKER_ERIN, .Erin
+
+.Beth:
+ farwritetext UnknownText_0x174e4e
+ buttonsound
+ end
+
+.Reena:
+ farwritetext UnknownText_0x17543a
+ buttonsound
+ end
+
+.Liz:
+ farwritetext UnknownText_0x17610a
+ buttonsound
+ end
+
+.Gina:
+ farwritetext UnknownText_0x1772e2
+ buttonsound
+ end
+
+.Dana:
+ farwritetext UnknownText_0x65091
+ buttonsound
+ end
+
+.Tiffany:
+ farwritetext UnknownText_0x66730
+ buttonsound
+ end
+
+.Erin:
+ farwritetext UnknownText_0x6722e
+ buttonsound
+ end
+
+LizWrongNumberScript:
+ farwritetext LizHiTaniaText
+ end
+
+TiffanyItsAwful:
+ farwritetext TiffanyItsAwfulText
+ end
+
+PhoneScript_HangupText_Male:
+ checkcode VAR_CALLERID
+ if_equal PHONE_SCHOOLBOY_JACK, .Jack
+ if_equal PHONE_SAILOR_HUEY, .Huey
+ if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
+ if_equal PHONE_BIRDKEEPER_JOSE, .Jose
+ if_equal PHONE_YOUNGSTER_JOEY, .Joey
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_FISHER_RALPH, .Ralph
+ if_equal PHONE_HIKER_ANTHONY, .Anthony
+ if_equal PHONE_CAMPER_TODD, .Todd
+ if_equal PHONE_JUGGLER_IRWIN, .Irwin
+ if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
+ if_equal PHONE_SCHOOLBOY_ALAN, .Alan
+ if_equal PHONE_SCHOOLBOY_CHAD, .Chad
+ if_equal PHONE_POKEFANM_DEREK, .Derek
+ if_equal PHONE_FISHER_TULLY, .Tully
+ if_equal PHONE_POKEMANIAC_BRENT, .Brent
+ if_equal PHONE_BIRDKEEPER_VANCE, .Vance
+ if_equal PHONE_FISHER_WILTON, .Wilton
+ if_equal PHONE_BLACKBELT_KENJI, .Kenji
+ if_equal PHONE_HIKER_PARRY, .Parry
+
+.Jack:
+ farwritetext UnknownText_0x174251
+ end
+
+.Huey:
+ farwritetext UnknownText_0x174962
+ end
+
+.Gaven:
+ farwritetext UnknownText_0x174c0e
+ end
+
+.Jose:
+ farwritetext UnknownText_0x175106
+ end
+
+.Joey:
+ farwritetext UnknownText_0x17570a
+ end
+
+.Wade:
+ farwritetext UnknownText_0x1759e7
+ end
+
+.Ralph:
+ farwritetext UnknownText_0x175db7
+ end
+
+.Anthony:
+ farwritetext UnknownText_0x176c47
+ end
+
+.Todd:
+ farwritetext UnknownText_0x176fdb
+ end
+
+.Irwin:
+ farwritetext UnknownText_0x64000
+ end
+
+.Arnie:
+ farwritetext UnknownText_0x64b48
+ end
+
+.Alan:
+ farwritetext UnknownText_0x64e1f
+ end
+
+.Chad:
+ farwritetext UnknownText_0x65471
+ end
+
+.Derek:
+ farwritetext UnknownText_0x65c4e
+ end
+
+.Tully:
+ farwritetext UnknownText_0x65f6e
+ end
+
+.Brent:
+ farwritetext UnknownText_0x662a9
+ end
+
+.Vance:
+ farwritetext UnknownText_0x66a93
+ end
+
+.Wilton:
+ farwritetext UnknownText_0x66c58
+ end
+
+.Kenji:
+ farwritetext UnknownText_0x66dab
+ end
+
+.Parry:
+ farwritetext UnknownText_0x670eb
+ end
+
+PhoneScript_HangupText_Female:
+ checkcode VAR_CALLERID
+ if_equal PHONE_POKEFAN_BEVERLY, .Beverly
+ if_equal PHONE_COOLTRAINERF_BETH, .Beth
+ if_equal PHONE_COOLTRAINERF_REENA, .Reena
+ if_equal PHONE_PICNICKER_LIZ, .Liz
+ if_equal PHONE_PICNICKER_GINA, .Gina
+ if_equal PHONE_LASS_DANA, .Dana
+ if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
+ if_equal PHONE_PICNICKER_ERIN, .Erin
+
+.Beverly:
+ farwritetext UnknownText_0x1747ac
+ end
+
+.Beth:
+ farwritetext UnknownText_0x174eb7
+ end
+
+.Reena:
+ farwritetext UnknownText_0x175488
+ end
+
+.Liz:
+ farwritetext UnknownText_0x17620a
+ end
+
+.Gina:
+ farwritetext UnknownText_0x177361
+ end
+
+.Dana:
+ farwritetext UnknownText_0x650e2
+ end
+
+.Tiffany:
+ farwritetext UnknownText_0x667f7
+ end
+
+.Erin:
+ farwritetext UnknownText_0x67281
+ end
+
+Phone_CheckIfUnseenRare_Male:
+ scall PhoneScriptRareWildMon
+ iffalse .HangUp
+ farjump Phone_GenericCall_Male
+
+.HangUp:
+ farjump PhoneScript_HangupText_Male
+
+Phone_CheckIfUnseenRare_Female:
+ scall PhoneScriptRareWildMon
+ iffalse .HangUp
+ farjump Phone_GenericCall_Female
+
+.HangUp:
+ farjump PhoneScript_HangupText_Female
+
+PhoneScriptRareWildMon:
+ special RandomUnseenWildMon
+ end
+
+PhoneScript_BugCatchingContest:
+ checkcode VAR_CALLERID
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_POKEFANM_DEREK, .Derek
+
+.Wade:
+ farwritetext WadeBugCatchingContestText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Derek:
+ farwritetext DerekBugCatchingContestText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinRocketRumor:
+ farwritetext UnknownText_0x64032
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa05c6:
+ farwritetext UnknownText_0x177378
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+UnknownScript_0xa05ce:
+ farwritetext UnknownText_0x64b5f
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa05d6:
+ farwritetext UnknownText_0x175dd9
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa05de:
+ farwritetext UnknownText_0x176c61
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+PhoneScript_FoundItem_Male:
+ checkcode VAR_CALLERID
+ if_equal PHONE_BIRDKEEPER_JOSE, .Jose
+ if_equal PHONE_BUG_CATCHER_WADE, .Wade
+ if_equal PHONE_SCHOOLBOY_ALAN, .Alan
+ if_equal PHONE_POKEFANM_DEREK, .Derek
+ if_equal PHONE_FISHER_TULLY, .Tully
+ if_equal PHONE_FISHER_WILTON, .Wilton
+
+.Jose:
+ farwritetext JoseFoundSomethingText
+ end
+
+.Wade:
+ farwritetext WadeFoundBerryText
+ end
+
+.Alan:
+ farwritetext UnknownText_0x64e2f
+ end
+
+.Derek:
+ farwritetext UnknownText_0x65cf9
+ end
+
+.Tully:
+ farwritetext UnknownText_0x65f88
+ end
+
+.Wilton:
+ farwritetext UnknownText_0x66c6b
+ end
+
+PhoneScript_FoundItem_Female:
+ checkcode VAR_CALLERID
+ if_equal PHONE_POKEFAN_BEVERLY, .Beverly
+ if_equal PHONE_PICNICKER_GINA, .Gina
+ if_equal PHONE_LASS_DANA, .Dana
+ if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
+
+.Beverly:
+ farwritetext BeverlyFoundNuggetText
+ end
+
+.Gina:
+ farwritetext UnknownText_0x1773e7
+ end
+
+.Dana:
+ farwritetext UnknownText_0x650ec
+ end
+
+.Tiffany:
+ farwritetext UnknownText_0x66801
+ end
+
+UnknownScript_0xa0644:
+ farwritetext UnknownText_0x176feb
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+KenjiCallingPhoneScript:
+ farwritetext UnknownText_0x66dc5
+ buttonsound
+ jump PhoneScript_HangupText_Male
diff --git a/engine/phone/phone_gossip.asm b/engine/phone/phone_gossip.asm
new file mode 100644
index 000000000..8f45c8807
--- /dev/null
+++ b/engine/phone/phone_gossip.asm
@@ -0,0 +1,698 @@
+JackTriviaScript:
+ random 11
+ if_equal 0, .Thunder
+ if_equal 1, .Rollout
+ if_equal 2, .Solarbeam
+ if_equal 3, .Stomp
+ if_equal 4, .Gust
+ if_equal 5, .Twister
+ if_equal 6, .Earthquake
+ if_equal 7, .Magnitude
+ if_equal 8, .Sandstorm
+ if_equal 9, .SunnyDay
+ if_equal 10, .RainDance
+
+.Thunder:
+ farwritetext JackThunderTriviaText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Rollout:
+ farwritetext JackRolloutTriviaText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Solarbeam:
+ farwritetext JackSolarbeamTriviaText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Stomp:
+ farwritetext JackStompTriviaText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Gust:
+ farwritetext JackGustTriviaText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Twister:
+ farwritetext JackTwisterTriviaText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Earthquake:
+ farwritetext JackEarthquakeTriviaText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Magnitude:
+ farwritetext JackMagnitudeTriviaText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Sandstorm:
+ farwritetext JackSandstormTriviaText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.SunnyDay:
+ farwritetext JackSunnyDayTriviaText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.RainDance:
+ farwritetext JackRainDanceTriviaText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa06da:
+ random 10
+ if_equal 0, .RuinsOfAlph
+ if_equal 1, .Falkner
+ if_equal 2, .Earl
+ if_equal 3, .SurfPikachu
+ if_equal 4, .MooMooMilk
+ if_equal 5, .Salon
+ if_equal 6, .Whitney
+ if_equal 7, .BugCatchingContest
+ if_equal 8, .BeautifulMon
+ if_equal 9, .Forgot
+
+.RuinsOfAlph:
+ farwritetext UnknownText_0x176223
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+.Falkner:
+ farwritetext UnknownText_0x1762c3
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+.Earl:
+ farwritetext UnknownText_0x17638a
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+.SurfPikachu:
+ farwritetext UnknownText_0x176424
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+.MooMooMilk:
+ farwritetext UnknownText_0x1764eb
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+.Salon:
+ farwritetext UnknownText_0x176599
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+.Whitney:
+ farwritetext UnknownText_0x1766ac
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+.BugCatchingContest:
+ farwritetext UnknownText_0x17674f
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+.BeautifulMon:
+ farwritetext UnknownText_0x176816
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+.Forgot:
+ farwritetext UnknownText_0x17686d
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+ChadOakGossipScript:
+ random 10
+ if_equal 0, .Blue
+ if_equal 1, .Daisy
+ if_equal 2, .ProfElm
+ if_equal 3, .Dream
+ if_equal 4, .Kurt
+ if_equal 5, .League
+ if_equal 6, .RadioShow
+ if_equal 7, .Battling
+ if_equal 8, .DaisyTea
+ if_equal 9, .Traveled
+
+.Blue:
+ farwritetext ChadBlueGossipText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Daisy:
+ farwritetext ChadDaisyGossipText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.ProfElm:
+ farwritetext ChadProfElmGossipText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Dream:
+ farwritetext ChadDreamGossipText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Kurt:
+ farwritetext ChadKurtGossipText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.League:
+ farwritetext ChadLeagueGossipText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.RadioShow:
+ farwritetext ChadRadioShowGossipText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Battling:
+ farwritetext ChadBattlingGossipText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.DaisyTea:
+ farwritetext ChadDaisyTeaGossipText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Traveled:
+ farwritetext ChadTravelGossipText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+BrentBillTriviaScript:
+ random 10
+ if_equal 0, .Father
+ if_equal 1, .Grandpa
+ if_equal 2, .Goldenrod
+ if_equal 3, .Route25
+ if_equal 4, .Abra
+ if_equal 5, .Sister
+ if_equal 6, .Milk
+ if_equal 7, .Battling
+ if_equal 8, .FlowerShop
+ if_equal 9, .KimonoGirl
+
+.Father:
+ farwritetext UnknownText_0x662bc
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Grandpa:
+ farwritetext UnknownText_0x662fc
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Goldenrod:
+ farwritetext UnknownText_0x66335
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Route25:
+ farwritetext UnknownText_0x66366
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Abra:
+ farwritetext UnknownText_0x663a1
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Sister:
+ farwritetext UnknownText_0x663e6
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Milk:
+ farwritetext UnknownText_0x66421
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Battling:
+ farwritetext UnknownText_0x6645f
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.FlowerShop:
+ farwritetext UnknownText_0x6649b
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.KimonoGirl:
+ farwritetext UnknownText_0x664dd
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinRumorScript:
+ checkevent EVENT_OPENED_MT_SILVER
+ iftrue IrwinMtSilver
+ checkevent EVENT_FOUGHT_SNORLAX
+ iftrue IrwinSnorlax
+ checkevent EVENT_GOT_PASS_FROM_COPYCAT
+ iftrue IrwinTrainPass
+ checkflag ENGINE_MARSHBADGE
+ iftrue IrwinMarshBadge
+ checkflag ENGINE_FLYPOINT_VERMILION
+ iftrue IrwinVermilionCity
+ checkevent EVENT_BEAT_ELITE_FOUR
+ iftrue IrwinEliteFour
+ checkflag ENGINE_RISINGBADGE
+ iftrue IrwinRisingBadge
+ checkevent EVENT_CLEARED_RADIO_TOWER
+ iftrue IrwinRadioTower
+ checkevent EVENT_CLEARED_ROCKET_HIDEOUT
+ iftrue IrwinRocketHideout
+ checkevent EVENT_JASMINE_RETURNED_TO_GYM
+ iftrue IrwinJasmineReturned
+ checkflag ENGINE_FOGBADGE
+ iftrue IrwinFogBadge
+ checkflag ENGINE_PLAINBADGE
+ iftrue IrwinPlainBadge
+ farwritetext IrwinCalledRightAwayText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinPlainBadge:
+ farwritetext UnknownText_0x64099
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinJasmineReturned:
+ farwritetext UnknownText_0x640e6
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinRocketHideout:
+ farwritetext UnknownText_0x6416d
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinRadioTower:
+ farwritetext UnknownText_0x641e8
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinRisingBadge:
+ farwritetext UnknownText_0x64247
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinEliteFour:
+ farwritetext UnknownText_0x642bb
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinVermilionCity:
+ farwritetext UnknownText_0x643d4
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinTrainPass:
+ farwritetext UnknownText_0x64448
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinSnorlax:
+ farwritetext UnknownText_0x6455b
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinMtSilver:
+ farwritetext UnknownText_0x645ff
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinFogBadge:
+ farwritetext UnknownText_0x646df
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+IrwinMarshBadge:
+ farwritetext UnknownText_0x647d8
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+JackPhoneTips:
+ farwritetext UnknownText_0x1745c2
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0900:
+ farwritetext UnknownText_0x17485b
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+UnknownScript_0xa0908:
+ farwritetext UnknownText_0x17496b
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0910:
+ farwritetext UnknownText_0x174c29
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0918:
+ farwritetext UnknownText_0x174ec5
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+UnknownScript_0xa0920:
+ farwritetext UnknownText_0x17519b
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0928:
+ farwritetext UnknownText_0x17549b
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+UnknownScript_0xa0930:
+ farwritetext UnknownText_0x17571d
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0938:
+ farwritetext UnknownText_0x175abe
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0940:
+ farwritetext UnknownText_0x175eaf
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0948:
+ farwritetext UnknownText_0x1768b0
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+UnknownScript_0xa0950:
+ farwritetext UnknownText_0x176d32
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0958:
+ farwritetext UnknownText_0x1770fb
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0960:
+ farwritetext UnknownText_0x177465
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+UnknownScript_0xa0968:
+ farwritetext UnknownText_0x64bc6
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0970:
+ farwritetext UnknownText_0x64e90
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0978:
+ farwritetext UnknownText_0x65161
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+UnknownScript_0xa0980:
+ farwritetext UnknownText_0x65a23
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0988:
+ farwritetext UnknownText_0x65d5c
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0990:
+ farwritetext UnknownText_0x65ff2
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0998:
+ farwritetext UnknownText_0x6651e
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa09a0:
+ farwritetext UnknownText_0x66882
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+VanceLookingForward:
+ farwritetext VanceLookingForwardText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+WiltonHaventFoundAnything:
+ farwritetext WiltonHaventFoundAnythingText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+ParryBattleWithMe:
+ farwritetext ParryBattleWithMeText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+ErinWorkingHardScript:
+ farwritetext ErinWorkingHardText
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+UnknownScript_0xa09c8:
+ random 3
+ if_equal 0, UnknownScript_0xa09d6
+ if_equal 1, UnknownScript_0xa09de
+ if_equal 2, UnknownScript_0xa09e6
+
+UnknownScript_0xa09d6:
+ farwritetext UnknownText_0x64846
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa09de:
+ farwritetext UnknownText_0x64881
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa09e6:
+ farwritetext UnknownText_0x648dc
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+KenjiAnswerPhoneScript:
+ checkcode VAR_KENJI_BREAK
+ if_equal 2, .Training
+ if_equal 1, .OnBreak
+ farwritetext UnknownText_0x66e17
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Training:
+ farwritetext UnknownText_0x66e67
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.OnBreak:
+ checkmorn
+ iftrue .Morning
+ checknite
+ iftrue .Night
+ setevent EVENT_KENJI_ON_BREAK
+ farwritetext KenjiBreakText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Morning:
+ farwritetext UnknownText_0x66ed3
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+.Night:
+ farwritetext UnknownText_0x66f52
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+JackWantsBattleScript:
+ farwritetext UnknownText_0x174638
+ end
+
+HueyWantsBattleScript:
+ farwritetext UnknownText_0x1749c7
+ end
+
+UnknownScript_0xa0a37:
+ farwritetext UnknownText_0x174c49
+ end
+
+BethBattleReminderScript:
+ farwritetext BethForgetDealText
+ end
+
+UnknownScript_0xa0a41:
+ farwritetext UnknownText_0x17520a
+ end
+
+UnknownScript_0xa0a46:
+ farwritetext UnknownText_0x1754e5
+ end
+
+UnknownScript_0xa0a4b:
+ farwritetext UnknownText_0x175786
+ end
+
+UnknownScript_0xa0a50:
+ farwritetext UnknownText_0x175b1e
+ end
+
+UnknownScript_0xa0a55:
+ farwritetext UnknownText_0x175f11
+ end
+
+UnknownScript_0xa0a5a:
+ farwritetext UnknownText_0x1769da
+ end
+
+UnknownScript_0xa0a5f:
+ farwritetext UnknownText_0x176d85
+ end
+
+UnknownScript_0xa0a64:
+ farwritetext UnknownText_0x177138
+ end
+
+UnknownScript_0xa0a69:
+ farwritetext UnknownText_0x1774c1
+ end
+
+UnknownScript_0xa0a6e:
+ farwritetext UnknownText_0x64c13
+ end
+
+UnknownScript_0xa0a73:
+ farwritetext UnknownText_0x64ed4
+ end
+
+UnknownScript_0xa0a78:
+ farwritetext UnknownText_0x651bf
+ end
+
+UnknownScript_0xa0a7d:
+ farwritetext UnknownText_0x65a63
+ end
+
+UnknownScript_0xa0a82:
+ farwritetext UnknownText_0x66043
+ end
+
+UnknownScript_0xa0a87:
+ farwritetext UnknownText_0x66579
+ end
+
+UnknownScript_0xa0a8c:
+ farwritetext UnknownText_0x668a3
+ end
+
+VanceHurryHurry:
+ farwritetext VanceHurryHurryText
+ end
+
+WiltonNotBiting:
+ farwritetext WiltonNotBitingText
+ end
+
+ParryHaventYouGottenTo:
+ farwritetext ParryHaventYouGottenToText
+ end
+
+ErinComeBattleScript:
+ farwritetext ErinComeBattleText
+ end
+
+UnknownScript_0xa0aa5:
+ farwritetext UnknownText_0x174895
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+UnknownScript_0xa0aad:
+ farwritetext UnknownText_0x17529c
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0ab5:
+ farwritetext UnknownText_0x175b6d
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0abd:
+ farwritetext UnknownText_0x17750e
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+UnknownScript_0xa0ac5:
+ farwritetext UnknownText_0x64f1a
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0acd:
+ farwritetext UnknownText_0x6520f
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+UnknownScript_0xa0ad5:
+ farwritetext UnknownText_0x65da6
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0add:
+ farwritetext UnknownText_0x66087
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0ae5:
+ farwritetext UnknownText_0x6691d
+ buttonsound
+ jump PhoneScript_HangupText_Female
+
+WiltonWantThis:
+ farwritetext WiltonWantThisText
+ buttonsound
+ jump PhoneScript_HangupText_Male
+
+UnknownScript_0xa0af5:
+ farwritetext UnknownText_0x175f70
+ end
+
+UnknownScript_0xa0afa:
+ farwritetext UnknownText_0x176dd1
+ end
+
+UnknownScript_0xa0aff:
+ farwritetext UnknownText_0x64c5a
+ end
+
+UnknownScript_0xa0b04:
+ farwritetext UnknownText_0x17717c
+ end
+
+BikeShopPhoneScript:
+ farwritetext UnknownText_0x174000
+ clearflag ENGINE_BIKE_SHOP_CALL_ENABLED
+ specialphonecall SPECIALCALL_NONE
+ end
diff --git a/engine/phone/phone_scripts.asm b/engine/phone/phone_scripts.asm
new file mode 100644
index 000000000..62eb4ac87
--- /dev/null
+++ b/engine/phone/phone_scripts.asm
@@ -0,0 +1,1886 @@
+UnusedPhoneScript: ; 0xbcea5
+ farwritetext UnusedPhoneText
+ end
+
+; Mom
+
+MomPhoneScript: ; 0xbceaa
+ checkevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
+ iftrue .bcec5
+ checkevent EVENT_DUDE_TALKED_TO_YOU
+ iftrue MomPhoneLectureScript
+ checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
+ iftrue MomPhoneNoGymQuestScript
+ checkevent EVENT_GOT_A_POKEMON_FROM_ELM
+ iftrue MomPhoneNoPokedexScript
+ jump MomPhoneNoPokemonScript
+
+.bcec5 ; 0xbcec5
+ checkevent EVENT_IN_YOUR_ROOM
+ iftrue MomPhoneHangUpScript
+ farwritetext MomPhoneGreetingText
+ buttonsound
+ mapnametotext $0
+ checkcode VAR_ROOFPALETTE
+ if_equal $1, MomPhonePalette1
+ if_equal $2, MomPhonePalette2
+ jump MomPhoneOther
+
+MomPhoneLandmark: ; 0xbcedf
+ farwritetext MomPhoneLandmarkText
+ buttonsound
+ jump MomSavingMoney
+
+MomPhonePalette1: ; 0xbcee7
+ checkcode VAR_MAPGROUP
+ if_equal GROUP_NEW_BARK_TOWN, .newbark
+ if_equal GROUP_CHERRYGROVE_CITY, .cherrygrove
+ if_equal GROUP_VIOLET_CITY, .violet
+ if_equal GROUP_AZALEA_TOWN, .azalea
+ if_equal GROUP_GOLDENROD_CITY, .goldenrod
+ farwritetext MomPhoneGenericAreaText
+ buttonsound
+ jump MomSavingMoney
+
+.newbark ; 0xbcf05
+ farwritetext MomPhoneNewBarkText
+ buttonsound
+ jump MomSavingMoney
+
+.cherrygrove ; 0xbcf0d
+ farwritetext MomPhoneCherrygroveText
+ buttonsound
+ jump MomSavingMoney
+
+.violet ; 0xbcf15
+ landmarktotext SPROUT_TOWER, 1
+ jump MomPhoneLandmark
+.azalea ; 0xbcf1b
+ landmarktotext SLOWPOKE_WELL, 1
+ jump MomPhoneLandmark
+.goldenrod ; 0xbcf21
+ landmarktotext RADIO_TOWER, 1
+ jump MomPhoneLandmark
+
+MomPhonePalette2: ; 0xbcf27
+ farwritetext MomOtherAreaText
+ buttonsound
+ jump MomSavingMoney
+
+MomPhoneOther: ; 0xbcf2f
+ farwritetext MomDeterminedText
+ buttonsound
+ jump MomSavingMoney
+
+MomSavingMoney: ; 0xbcf37
+ checkflag ENGINE_MOM_SAVING_MONEY
+ iffalse MomIsNotSaving
+ checkmoney $1, 0
+ if_equal $0, MomSavingHasMoney
+ jump MomSavingButBroke
+
+MomIsNotSaving: ; 0xbcf49
+ checkmoney $1, 0
+ if_equal $0, MomHasMoney
+ jump MomHasNoMoney
+
+MomSavingHasMoney: ; 0xbcf55
+ readmoney $1, $0
+ farwritetext MomCheckBalanceText
+ yesorno
+ iftrue MomPhoneSaveMoneyScript
+ jump MomPhoneWontSaveMoneyScript
+
+MomSavingButBroke: ; 0xbcf63
+ farwritetext MomImportantToSaveText
+ yesorno
+ iftrue MomPhoneSaveMoneyScript
+ jump MomPhoneWontSaveMoneyScript
+
+MomHasNoMoney: ; 0xbcf6e
+ farwritetext MomYoureNotSavingText
+ yesorno
+ iftrue MomPhoneSaveMoneyScript
+ jump MomPhoneWontSaveMoneyScript
+
+MomHasMoney: ; 0xbcf79
+ readmoney $1, $0
+ farwritetext MomYouveSavedText
+ yesorno
+ iftrue MomPhoneSaveMoneyScript
+ jump MomPhoneWontSaveMoneyScript
+
+MomPhoneSaveMoneyScript: ; 0xbcf87
+ setflag ENGINE_MOM_SAVING_MONEY
+ farwritetext MomOKIllSaveText
+ buttonsound
+ jump MomPhoneHangUpScript
+
+MomPhoneWontSaveMoneyScript: ; 0xbcf92
+ clearflag ENGINE_MOM_SAVING_MONEY
+ farwritetext MomPhoneWontSaveMoneyText
+ buttonsound
+ jump MomPhoneHangUpScript
+
+MomPhoneHangUpScript: ; 0xbcf9d
+ farwritetext MomPhoneHangUpText
+ end
+
+MomPhoneNoPokemonScript: ; 0xbcfa2
+ farwritetext MomPhoneNoPokemonText
+ end
+
+MomPhoneNoPokedexScript: ; 0xbcfa7
+ farwritetext MomPhoneNoPokedexText
+ end
+
+MomPhoneNoGymQuestScript: ; 0xbcfac
+ farwritetext MomPhoneNoGymQuestText
+ end
+
+MomPhoneLectureScript: ; 0xbcfb1
+ setevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
+ setflag ENGINE_DST
+ specialphonecall SPECIALCALL_NONE
+ farwritetext MomPhoneLectureText
+ yesorno
+ iftrue MomPhoneSaveMoneyScript
+ jump MomPhoneWontSaveMoneyScript
+
+; Bill
+
+BillPhoneScript1: ; 0xbcfc5
+ checkday
+ iftrue .daygreet
+ checknite
+ iftrue .nitegreet
+ farwritetext BillPhoneMornGreetingText
+ buttonsound
+ jump .main
+
+.daygreet ; 0xbcfd7
+ farwritetext BillPhoneDayGreetingText
+ buttonsound
+ jump .main
+
+.nitegreet ; 0xbcfdf
+ farwritetext BillPhoneNiteGreetingText
+ buttonsound
+ jump .main
+
+.main ; 0xbcfe7
+ farwritetext BillPhoneGeneriText
+ buttonsound
+ checkcode VAR_BOXSPACE
+ RAM2MEM $0
+ if_equal $0, .full
+ if_less_than $6, .nearlyfull
+ farwritetext BillPhoneNotFullText
+ end
+
+.nearlyfull ; 0xbcffd
+ farwritetext BillPhoneNearlyFullText
+ end
+
+.full ; 0xbd002
+ farwritetext BillPhoneFullText
+ end
+
+BillPhoneScript2: ; 0xbd007
+ farwritetext BillPhoneNewlyFullText
+ waitbutton
+ end
+
+; Elm
+
+ElmPhoneScript1: ; 0xbd00d
+ checkcode VAR_SPECIALPHONECALL
+ if_equal $1, .pokerus
+ checkevent EVENT_SHOWED_TOGEPI_TO_ELM
+ iftrue .discovery
+ checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE
+ iffalse .next
+ checkevent EVENT_TOGEPI_HATCHED
+ iftrue .egghatched
+.next
+ checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE
+ iftrue .eggunhatched
+ checkevent EVENT_ELMS_AIDE_IN_LAB
+ iftrue .assistant
+ checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
+ iftrue .checkingegg
+ checkevent EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON
+ iftrue .stolen
+ checkevent EVENT_GOT_MYSTERY_EGG_FROM_MR_POKEMON
+ iftrue .sawmrpokemon
+ farwritetext ElmPhoneStartText
+ end
+
+.sawmrpokemon ; 0xbd048
+ farwritetext ElmPhoneSawMrPokemonText
+ end
+
+.stolen ; 0xbd04d
+ farwritetext ElmPhonePokemonStolenText
+ end
+
+.checkingegg ; 0xbd052
+ farwritetext ElmPhoneCheckingEggText
+ end
+
+.assistant ; 0xbd057
+ farwritetext ElmPhoneAssistantText
+ end
+
+.eggunhatched ; 0xbd05c
+ farwritetext ElmPhoneEggUnhatchedText
+ end
+
+.egghatched ; 0xbd061
+ farwritetext ElmPhoneEggHatchedText
+ setevent EVENT_TOLD_ELM_ABOUT_TOGEPI_OVER_THE_PHONE
+ end
+
+.discovery ; 0xbd069
+ random $2
+ if_equal $0, .nextdiscovery
+ farwritetext ElmPhoneDiscovery1Text
+ end
+
+.nextdiscovery ; 0xbd074
+ farwritetext ElmPhoneDiscovery2Text
+ end
+
+.pokerus ; 0xbd079
+ farwritetext ElmPhonePokerusText
+ specialphonecall SPECIALCALL_NONE
+ end
+
+ElmPhoneScript2: ; 0xbd081
+ checkcode VAR_SPECIALPHONECALL
+ if_equal $2, .disaster
+ if_equal $3, .assistant
+ if_equal $4, .rocket
+ if_equal $5, .gift
+ if_equal $8, .gift
+ farwritetext ElmPhonePokerusText
+ specialphonecall SPECIALCALL_NONE
+ end
+
+.disaster ; 0xbd09f
+ farwritetext ElmPhoneDisasterText
+ specialphonecall SPECIALCALL_NONE
+ setevent EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON
+ end
+
+.assistant ; 0xbd0aa
+ farwritetext ElmPhoneEggAssistantText
+ specialphonecall SPECIALCALL_NONE
+ clearevent EVENT_ELMS_AIDE_IN_VIOLET_POKEMON_CENTER
+ setevent EVENT_ELMS_AIDE_IN_LAB
+ end
+
+.rocket ; 0xbd0b8
+ farwritetext ElmPhoneRocketText
+ specialphonecall SPECIALCALL_NONE
+ end
+
+.gift ; 0xbd0c0
+ farwritetext ElmPhoneGiftText
+ specialphonecall SPECIALCALL_NONE
+ end
+
+.unused ; 0xbd0c8
+ farwritetext ElmPhoneUnusedText
+ specialphonecall SPECIALCALL_NONE
+ end
+; bd0d0
+
+; Jack
+
+JackPhoneScript1:
+ trainertotext SCHOOLBOY, JACK1, $0
+ checkflag ENGINE_JACK
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_JACK_MONDAY_MORNING
+ iftrue .NotMonday
+ checkcode VAR_WEEKDAY
+ if_not_equal MONDAY, .NotMonday
+ checkmorn
+ iftrue JackMondayMorning
+
+.NotMonday:
+ farjump JackPhoneTips
+
+.WantsBattle:
+ landmarktotext NATIONAL_PARK, $2
+ farjump JackWantsBattleScript
+
+JackPhoneScript2:
+ trainertotext SCHOOLBOY, JACK1, $0
+ farscall PhoneScript_GreetPhone_Male
+ farscall PhoneScript_Random2
+ if_equal $0, JackBattleTrivia
+ checkflag ENGINE_JACK
+ iftrue .WaitingForBattle
+ checkflag ENGINE_JACK_MONDAY_MORNING
+ iftrue .WaitingForBattle
+ farscall PhoneScript_Random2
+ if_equal $0, JackWantsToBattle
+
+.WaitingForBattle:
+ farscall PhoneScript_Random3
+ if_equal $0, JackFindsRare
+ farjump Phone_GenericCall_Male
+
+JackMondayMorning:
+ setflag ENGINE_JACK_MONDAY_MORNING
+
+JackWantsToBattle:
+ landmarktotext NATIONAL_PARK, $2
+ setflag ENGINE_JACK
+ farjump PhoneScript_WantsToBattle_Male
+
+JackFindsRare:
+ farjump Phone_CheckIfUnseenRare_Male
+
+JackBattleTrivia:
+ farjump JackTriviaScript
+
+; Beverly
+
+BeverlyPhoneScript1:
+ trainertotext POKEFANF, BEVERLY1, $0
+ farscall PhoneScript_AnswerPhone_Female
+ checkflag ENGINE_BEVERLY_HAS_NUGGET
+ iftrue .HasNugget
+ farjump UnknownScript_0xa0900
+
+.HasNugget:
+ landmarktotext NATIONAL_PARK, $2
+ farjump UnknownScript_0xa0aa5
+
+BeverlyPhoneScript2:
+ trainertotext POKEFANF, BEVERLY1, $0
+ farscall PhoneScript_GreetPhone_Female
+ checkflag ENGINE_BEVERLY_HAS_NUGGET
+ iftrue .HasNugget
+ farscall PhoneScript_Random4
+ if_equal $0, .FoundNugget
+
+.HasNugget:
+ farjump Phone_GenericCall_Female
+
+.FoundNugget:
+ setflag ENGINE_BEVERLY_HAS_NUGGET
+ landmarktotext NATIONAL_PARK, $2
+ farjump PhoneScript_FoundItem_Female
+
+; Huey
+
+HueyPhoneScript1:
+ trainertotext SAILOR, HUEY1, $0
+ checkflag ENGINE_HUEY
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_HUEY_WEDNESDAY_NIGHT
+ iftrue .NotWednesday
+ checkcode VAR_WEEKDAY
+ if_not_equal WEDNESDAY, .NotWednesday
+ checknite
+ iftrue HueyWednesdayNight
+
+.NotWednesday:
+ special RandomPhoneMon
+ farjump UnknownScript_0xa0908
+
+.WantsBattle:
+ landmarktotext LIGHTHOUSE, $2
+ farjump HueyWantsBattleScript
+
+HueyPhoneScript2:
+ trainertotext SAILOR, HUEY1, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_HUEY
+ iftrue .Flavor
+ checkflag ENGINE_HUEY_WEDNESDAY_NIGHT
+ iftrue .Flavor
+ farscall PhoneScript_Random3
+ if_equal $0, HueyWantsBattle
+ if_equal $1, HueyWantsBattle
+
+.Flavor:
+ farjump PhoneScript_MonFlavorText
+
+HueyWednesdayNight:
+ setflag ENGINE_HUEY_WEDNESDAY_NIGHT
+
+HueyWantsBattle:
+ landmarktotext LIGHTHOUSE, $2
+ setflag ENGINE_HUEY
+ farjump PhoneScript_WantsToBattle_Male
+
+; Gaven
+
+GavenPhoneScript1:
+ trainertotext COOLTRAINERM, GAVEN3, $0
+ checkflag ENGINE_GAVEN
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_GAVEN_THURSDAY_MORNING
+ iftrue .NotThursday
+ checkcode VAR_WEEKDAY
+ if_not_equal THURSDAY, .NotThursday
+ checkmorn
+ iftrue GavenThursdayMorning
+
+.NotThursday:
+ farjump UnknownScript_0xa0910
+
+.WantsBattle:
+ landmarktotext ROUTE_26, $2
+ farjump UnknownScript_0xa0a37
+
+GavenPhoneScript2:
+ trainertotext COOLTRAINERM, GAVEN3, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_GAVEN
+ iftrue .WaitingForBattle
+ checkflag ENGINE_GAVEN_THURSDAY_MORNING
+ iftrue .WaitingForBattle
+ farscall PhoneScript_Random2
+ if_equal $0, GavenWantsRematch
+
+.WaitingForBattle:
+ farscall PhoneScript_Random3
+ if_equal $0, GavenFoundRare
+ farjump Phone_GenericCall_Male
+
+GavenThursdayMorning:
+ setflag ENGINE_GAVEN_THURSDAY_MORNING
+
+GavenWantsRematch:
+ landmarktotext ROUTE_26, $2
+ setflag ENGINE_GAVEN
+ farjump PhoneScript_WantsToBattle_Male
+
+GavenFoundRare:
+ farjump Phone_CheckIfUnseenRare_Male
+
+; Beth
+
+BethPhoneScript1:
+ trainertotext COOLTRAINERF, BETH1, $0
+ checkflag ENGINE_BETH
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Female
+ checkflag ENGINE_BETH_FRIDAY_AFTERNOON
+ iftrue .NotFriday
+ checkcode VAR_WEEKDAY
+ if_not_equal FRIDAY, .NotFriday
+ checkday
+ iftrue BethFridayAfternoon
+
+.NotFriday:
+ farjump UnknownScript_0xa0918
+
+.WantsBattle:
+ landmarktotext ROUTE_26, $2
+ farjump BethBattleReminderScript
+
+BethPhoneScript2:
+ trainertotext COOLTRAINERF, BETH1, $0
+ farscall PhoneScript_GreetPhone_Female
+ checkflag ENGINE_BETH
+ iftrue .Generic
+ checkflag ENGINE_BETH_FRIDAY_AFTERNOON
+ iftrue .Generic
+ farscall PhoneScript_Random2
+ if_equal $0, BethWantsBattle
+
+.Generic:
+ farjump Phone_GenericCall_Female
+
+BethFridayAfternoon:
+ setflag ENGINE_BETH_FRIDAY_AFTERNOON
+
+BethWantsBattle:
+ landmarktotext ROUTE_26, $2
+ setflag ENGINE_BETH
+ farjump PhoneScript_WantsToBattle_Female
+
+; Jose
+
+JosePhoneScript1:
+ trainertotext BIRD_KEEPER, JOSE2, $0
+ checkflag ENGINE_JOSE
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_JOSE_SATURDAY_NIGHT
+ iftrue .NotSaturday
+ checkflag ENGINE_JOSE_HAS_STAR_PIECE
+ iftrue .HasItem
+ checkcode VAR_WEEKDAY
+ if_not_equal SATURDAY, .NotSaturday
+ checknite
+ iftrue JoseSaturdayNight
+
+.NotSaturday:
+ farjump UnknownScript_0xa0920
+
+.WantsBattle:
+ landmarktotext ROUTE_27, $2
+ farjump UnknownScript_0xa0a41
+
+.HasItem:
+ landmarktotext ROUTE_27, $2
+ farjump UnknownScript_0xa0a41
+
+JosePhoneScript2:
+ trainertotext BIRD_KEEPER, JOSE2, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_JOSE
+ iftrue .Generic
+ checkflag ENGINE_JOSE_SATURDAY_NIGHT
+ iftrue .Generic
+ checkflag ENGINE_JOSE_HAS_STAR_PIECE
+ iftrue .Generic
+ farscall PhoneScript_Random3
+ if_equal $0, JoseWantsBattle
+ farscall PhoneScript_Random3
+ if_equal $0, JoseHasStarPiece
+
+.Generic:
+ farscall PhoneScript_Random3
+ if_equal $0, JoseFoundRare
+ farjump Phone_GenericCall_Male
+
+JoseSaturdayNight:
+ setflag ENGINE_JOSE_SATURDAY_NIGHT
+
+JoseWantsBattle:
+ landmarktotext ROUTE_27, $2
+ setflag ENGINE_JOSE
+ farjump PhoneScript_WantsToBattle_Male
+
+JoseFoundRare:
+ farjump Phone_CheckIfUnseenRare_Male
+
+JoseHasStarPiece:
+ setflag ENGINE_JOSE_HAS_STAR_PIECE
+ landmarktotext ROUTE_27, $2
+ farjump PhoneScript_FoundItem_Male
+
+; Reena
+
+ReenaPhoneScript1:
+ trainertotext COOLTRAINERF, REENA1, $0
+ checkflag ENGINE_REENA
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Female
+ checkflag ENGINE_REENA_SUNDAY_MORNING
+ iftrue .NotSunday
+ checkcode VAR_WEEKDAY
+ if_not_equal SUNDAY, .NotSunday
+ checkmorn
+ iftrue ReenaSundayMorning
+
+.NotSunday:
+ farjump UnknownScript_0xa0928
+
+.WantsBattle:
+ landmarktotext ROUTE_27, $2
+ farjump UnknownScript_0xa0a46
+
+ReenaPhoneScript2:
+ trainertotext COOLTRAINERF, REENA1, $0
+ farscall PhoneScript_GreetPhone_Female
+ checkflag ENGINE_REENA
+ iftrue .Generic
+ checkflag ENGINE_REENA_SUNDAY_MORNING
+ iftrue .Generic
+ farscall PhoneScript_Random2
+ if_equal $0, ReenaWantsBattle
+
+.Generic:
+ farjump Phone_GenericCall_Female
+
+ReenaSundayMorning:
+ setflag ENGINE_REENA_SUNDAY_MORNING
+
+ReenaWantsBattle:
+ landmarktotext ROUTE_27, $2
+ setflag ENGINE_REENA
+ farjump PhoneScript_WantsToBattle_Female
+
+; Joey
+
+JoeyPhoneScript1:
+ trainertotext YOUNGSTER, JOEY1, $0
+ checkflag ENGINE_JOEY
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_JOEY_MONDAY_AFTERNOON
+ iftrue .NotMonday
+ checkcode VAR_WEEKDAY
+ if_not_equal MONDAY, .NotMonday
+ checkday
+ iftrue JoeyMondayAfternoon
+
+.NotMonday:
+ special RandomPhoneMon
+ farjump UnknownScript_0xa0930
+
+.WantsBattle:
+ landmarktotext ROUTE_30, $2
+ farjump UnknownScript_0xa0a4b
+
+JoeyPhoneScript2:
+ trainertotext YOUNGSTER, JOEY1, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_JOEY
+ iftrue .Generic
+ checkflag ENGINE_JOEY_MONDAY_AFTERNOON
+ iftrue .Generic
+ farscall PhoneScript_Random3
+ if_equal $0, JoeyWantsBattle
+ if_equal $1, JoeyWantsBattle
+
+.Generic:
+ farjump Phone_GenericCall_Male
+
+JoeyMondayAfternoon:
+ setflag ENGINE_JOEY_MONDAY_AFTERNOON
+
+JoeyWantsBattle:
+ landmarktotext ROUTE_30, $2
+ setflag ENGINE_JOEY
+ farjump PhoneScript_WantsToBattle_Male
+
+; Wade
+
+WadePhoneScript1:
+ trainertotext BUG_CATCHER, WADE1, $0
+ checkflag ENGINE_WADE
+ iftrue WadeWantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_WADE_TUESDAY_NIGHT
+ iftrue .NotTuesday
+ checkflag ENGINE_WADE_HAS_ITEM
+ iftrue WadeHasItem
+ checkcode VAR_WEEKDAY
+ if_not_equal TUESDAY, .NotTuesday
+ checknite
+ iftrue WadeTuesdayNight
+
+.NotTuesday:
+ farscall PhoneScript_Random2
+ if_equal $0, .NoContest
+ checkflag ENGINE_DAILY_BUG_CONTEST
+ iftrue .NoContest
+ checkcode VAR_WEEKDAY
+ if_equal TUESDAY, WadeContestToday
+ if_equal THURSDAY, WadeContestToday
+ if_equal SATURDAY, WadeContestToday
+
+.NoContest:
+ farjump UnknownScript_0xa0938
+
+WadeContestToday:
+ farjump PhoneScript_BugCatchingContest
+
+WadeWantsBattle:
+ landmarktotext ROUTE_31, $2
+ farjump UnknownScript_0xa0a50
+
+WadeHasItem:
+ landmarktotext ROUTE_31, $2
+ farjump UnknownScript_0xa0ab5
+
+WadePhoneScript2:
+ trainertotext BUG_CATCHER, WADE1, $0
+ farscall PhoneScript_GreetPhone_Male
+ farscall PhoneScript_Random2
+ if_equal $0, .NoContest
+ checkflag ENGINE_DAILY_BUG_CONTEST
+ iftrue .NoContest
+ checkcode VAR_WEEKDAY
+ if_equal TUESDAY, Wade_ContestToday
+ if_equal THURSDAY, Wade_ContestToday
+ if_equal SATURDAY, Wade_ContestToday
+
+.NoContest:
+ checkflag ENGINE_WADE
+ iftrue .next
+ checkflag ENGINE_WADE_TUESDAY_NIGHT
+ iftrue .next
+ checkflag ENGINE_WADE_HAS_ITEM
+ iftrue .next
+ farscall PhoneScript_Random2
+ if_equal $0, WadeHasItem2
+ checkflag ENGINE_FLYPOINT_GOLDENROD
+ iffalse .next
+ farscall PhoneScript_Random2
+ if_equal $0, WadeWantsBattle2
+
+.next:
+ farscall PhoneScript_Random3
+ if_equal $0, WadeFoundRare
+ farjump Phone_GenericCall_Male
+
+Wade_ContestToday:
+ farjump PhoneScript_BugCatchingContest
+
+WadeTuesdayNight:
+ setflag ENGINE_WADE_TUESDAY_NIGHT
+
+WadeWantsBattle2:
+ landmarktotext ROUTE_31, $2
+ setflag ENGINE_WADE
+ farjump PhoneScript_WantsToBattle_Male
+
+WadeFoundRare:
+ farjump Phone_CheckIfUnseenRare_Male
+
+WadeHasItem2:
+ setflag ENGINE_WADE_HAS_ITEM
+ landmarktotext ROUTE_31, $2
+ clearevent EVENT_WADE_HAS_BERRY
+ clearevent EVENT_WADE_HAS_PSNCUREBERRY
+ clearevent EVENT_WADE_HAS_PRZCUREBERRY
+ clearevent EVENT_WADE_HAS_BITTER_BERRY
+ random $4
+ if_equal $0, .Berry
+ if_equal $1, .PsnCureBerry
+ if_equal $2, .PrzCureBerry
+ if_equal $3, .Bitterberry
+
+.Berry:
+ setevent EVENT_WADE_HAS_BERRY
+ jump .FoundBerry
+
+.PsnCureBerry:
+ setevent EVENT_WADE_HAS_PSNCUREBERRY
+ jump .FoundBerry
+
+.PrzCureBerry:
+ setevent EVENT_WADE_HAS_PRZCUREBERRY
+ jump .FoundBerry
+
+.Bitterberry:
+ setevent EVENT_WADE_HAS_BITTER_BERRY
+
+.FoundBerry:
+ farjump PhoneScript_FoundItem_Male
+
+; Ralph
+
+RalphPhoneScript1:
+ trainertotext FISHER, RALPH1, $0
+ checkflag ENGINE_RALPH
+ iftrue Ralph_Rematch
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_RALPH_WEDNESDAY_MORNING
+ iftrue Ralph_CheckSwarm
+ checkcode VAR_WEEKDAY
+ if_not_equal WEDNESDAY, Ralph_CheckSwarm
+ checkmorn
+ iftrue Ralph_WednesdayMorning
+Ralph_CheckSwarm:
+ checkflag ENGINE_SPECIAL_WILDDATA
+ iftrue Ralph_ReportSwarm
+ farjump UnknownScript_0xa0940
+
+Ralph_Rematch:
+ landmarktotext ROUTE_32, $2
+ farjump UnknownScript_0xa0a55
+
+Ralph_ReportSwarm:
+ landmarktotext ROUTE_32, $2
+ farjump UnknownScript_0xa0af5
+
+RalphPhoneScript2:
+ trainertotext FISHER, RALPH1, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_FLYPOINT_GOLDENROD
+ iffalse Ralph_CheckSwarm2
+ checkflag ENGINE_RALPH
+ iftrue Ralph_CheckSwarm2
+ checkflag ENGINE_RALPH_WEDNESDAY_MORNING
+ iftrue Ralph_CheckSwarm2
+ farscall PhoneScript_Random2
+ if_equal $0, Ralph_FightMe
+Ralph_CheckSwarm2:
+ farscall PhoneScript_Random5
+ if_equal $0, Ralph_SetUpSwarm
+ farjump Phone_GenericCall_Male
+
+Ralph_WednesdayMorning:
+ setflag ENGINE_RALPH_WEDNESDAY_MORNING
+Ralph_FightMe:
+ landmarktotext ROUTE_32, $2
+ setflag ENGINE_RALPH
+ farjump PhoneScript_WantsToBattle_Male
+
+Ralph_SetUpSwarm:
+ checkflag ENGINE_SPECIAL_WILDDATA
+ iftrue .Generic
+ setflag ENGINE_SPECIAL_WILDDATA
+ pokenamemem QWILFISH, $1
+ landmarktotext ROUTE_32, $2
+ writebyte FISHSWARM_QWILFISH
+ special Special_ActivateFishingSwarm
+ farjump UnknownScript_0xa05d6
+
+.Generic:
+ farjump Phone_GenericCall_Male
+
+; Liz
+
+LizPhoneScript1:
+ trainertotext PICNICKER, LIZ1, $0
+ checkflag ENGINE_LIZ
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Female
+ checkflag ENGINE_LIZ_THURSDAY_AFTERNOON
+ iftrue .NotThursday
+ checkcode VAR_WEEKDAY
+ if_not_equal THURSDAY, .NotThursday
+ checkday
+ iftrue LizThursdayAfternoon
+
+.NotThursday:
+ special RandomPhoneMon
+ farjump UnknownScript_0xa0948
+
+.WantsBattle:
+ landmarktotext ROUTE_32, $2
+ farjump UnknownScript_0xa0a5a
+
+LizPhoneScript2:
+ trainertotext PICNICKER, LIZ1, $0
+ farscall PhoneScript_Random4
+ if_equal $0, LizWrongNumber
+ farscall PhoneScript_GreetPhone_Female
+ checkflag ENGINE_LIZ
+ iftrue .next
+ checkflag ENGINE_LIZ_THURSDAY_AFTERNOON
+ iftrue .next
+
+.next:
+ farscall PhoneScript_Random2
+ if_equal $0, LizGossip
+ checkflag ENGINE_FLYPOINT_GOLDENROD
+ iffalse .Generic
+ farscall PhoneScript_Random2
+ if_equal $0, LizWantsBattle
+
+.Generic:
+ farjump Phone_GenericCall_Female
+
+LizThursdayAfternoon:
+ setflag ENGINE_LIZ_THURSDAY_AFTERNOON
+
+LizWantsBattle:
+ landmarktotext ROUTE_32, $2
+ setflag ENGINE_LIZ
+ farjump PhoneScript_WantsToBattle_Female
+
+LizWrongNumber:
+ farjump LizWrongNumberScript
+
+LizGossip:
+ random $9
+ if_equal $0, .CoolTrainerM
+ if_equal $1, .Beauty
+ if_equal $2, .Grunt
+ if_equal $3, .Teacher
+ if_equal $4, .SwimmerF
+ if_equal $5, .KimonoGirl
+ if_equal $6, .Skier
+ if_equal $7, .Medium
+ if_equal $8, .PokefanM
+
+.CoolTrainerM:
+ trainerclassname COOLTRAINERM, $1
+ jump LizGossipScript
+
+.Beauty:
+ trainerclassname BEAUTY, $1
+ jump LizGossipScript
+
+.Grunt:
+ trainerclassname GRUNTM, $1
+ jump LizGossipScript
+
+.Teacher:
+ trainerclassname TEACHER, $1
+ jump LizGossipScript
+
+.SwimmerF:
+ trainerclassname SWIMMERF, $1
+ jump LizGossipScript
+
+.KimonoGirl:
+ trainerclassname KIMONO_GIRL, $1
+ jump LizGossipScript
+
+.Skier:
+ trainerclassname SKIER, $1
+ jump LizGossipScript
+
+.Medium:
+ trainerclassname MEDIUM, $1
+ jump LizGossipScript
+
+.PokefanM:
+ trainerclassname POKEFANM, $1
+ jump LizGossipScript
+
+LizGossipScript:
+ farjump UnknownScript_0xa06da
+
+; Anthony
+
+AnthonyPhoneScript1:
+ trainertotext HIKER, ANTHONY2, $0
+ checkflag ENGINE_ANTHONY
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_ANTHONY_FRIDAY_NIGHT
+ iftrue .NotFriday
+ checkcode VAR_WEEKDAY
+ if_not_equal FRIDAY, .NotFriday
+ checknite
+ iftrue AnthonyFridayNight
+
+.NotFriday:
+ checkflag ENGINE_DUNSPARCE_SWARM
+ iftrue .AlreadySwarming
+ farjump UnknownScript_0xa0950
+
+.WantsBattle:
+ landmarktotext ROUTE_33, $2
+ farjump UnknownScript_0xa0a5f
+
+.AlreadySwarming:
+ landmarktotext ROUTE_33, $2
+ farjump UnknownScript_0xa0afa
+
+AnthonyPhoneScript2:
+ trainertotext HIKER, ANTHONY2, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_FLYPOINT_GOLDENROD
+ iffalse .TriesSwarm
+ checkflag ENGINE_ANTHONY
+ iftrue .TriesSwarm
+ checkflag ENGINE_ANTHONY_FRIDAY_NIGHT
+ iftrue .TriesSwarm
+ farscall PhoneScript_Random2
+ if_equal $0, AnthonyWantsBattle
+
+.TriesSwarm:
+ farscall PhoneScript_Random5
+ if_equal $0, AnthonyTriesDunsparceSwarm
+ farjump Phone_GenericCall_Male
+
+AnthonyFridayNight:
+ setflag ENGINE_ANTHONY_FRIDAY_NIGHT
+
+AnthonyWantsBattle:
+ landmarktotext ROUTE_33, $2
+ setflag ENGINE_ANTHONY
+ farjump PhoneScript_WantsToBattle_Male
+
+AnthonyTriesDunsparceSwarm:
+ checkflag ENGINE_DUNSPARCE_SWARM
+ iftrue .Generic
+ setflag ENGINE_DUNSPARCE_SWARM
+ pokenamemem DUNSPARCE, $1
+ swarm SWARM_DUNSPARCE, DARK_CAVE_VIOLET_ENTRANCE
+ landmarktotext DARK_CAVE, $2
+ farjump UnknownScript_0xa05de
+
+.Generic:
+ farjump Phone_GenericCall_Male
+
+; Todd
+
+ToddPhoneScript1:
+ trainertotext CAMPER, TODD1, $0
+ checkflag ENGINE_TODD
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_TODD_SATURDAY_MORNING
+ iftrue .NotSaturday
+ checkcode VAR_WEEKDAY
+ if_not_equal SATURDAY, .NotSaturday
+ checkmorn
+ iftrue ToddSaturdayMorning
+
+.NotSaturday:
+ checkflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
+ iftrue .SaleOn
+ farjump UnknownScript_0xa0958
+
+.WantsBattle:
+ landmarktotext ROUTE_34, $2
+ farjump UnknownScript_0xa0a64
+
+.SaleOn:
+ farjump UnknownScript_0xa0b04
+
+ToddPhoneScript2:
+ trainertotext CAMPER, TODD1, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_TODD
+ iftrue .TryForSale
+ checkflag ENGINE_TODD_SATURDAY_MORNING
+ iftrue .TryForSale
+ checkflag ENGINE_FLYPOINT_GOLDENROD
+ iffalse ToddNoGoldenrod
+ farscall PhoneScript_Random2
+ if_equal $0, ToddWantsBattle
+
+.TryForSale:
+ farscall PhoneScript_Random2
+ if_equal $0, ToddDeptStoreSale
+
+ToddNoGoldenrod:
+ farscall PhoneScript_Random3
+ if_equal $0, ToddFoundRare
+ farjump Phone_GenericCall_Male
+
+ToddSaturdayMorning:
+ setflag ENGINE_TODD_SATURDAY_MORNING
+
+ToddWantsBattle:
+ landmarktotext ROUTE_34, $2
+ setflag ENGINE_TODD
+ farjump PhoneScript_WantsToBattle_Male
+
+ToddFoundRare:
+ farjump Phone_CheckIfUnseenRare_Male
+
+ToddDeptStoreSale:
+ setflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
+ farjump UnknownScript_0xa0644
+
+; Gina
+
+GinaPhoneScript1:
+ trainertotext PICNICKER, GINA1, $0
+ checkflag ENGINE_GINA
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Female
+ checkflag ENGINE_GINA_SUNDAY_AFTERNOON
+ iftrue .NotSunday
+ checkflag ENGINE_GINA_HAS_LEAF_STONE
+ iftrue .HasLeafStone
+ checkcode VAR_WEEKDAY
+ if_not_equal SUNDAY, .NotSunday
+ checkday
+ iftrue GinaSundayDay
+
+.NotSunday:
+ checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
+ iftrue .Rockets
+ farjump UnknownScript_0xa0960
+
+.Rockets:
+ farjump UnknownScript_0xa05c6
+
+.WantsBattle:
+ landmarktotext ROUTE_34, $2
+ farjump UnknownScript_0xa0a69
+
+.HasLeafStone:
+ landmarktotext ROUTE_34, $2
+ farjump UnknownScript_0xa0abd
+
+GinaPhoneScript2:
+ trainertotext PICNICKER, GINA1, $0
+ farscall PhoneScript_GreetPhone_Female
+ checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
+ iftrue GinaRockets
+ checkflag ENGINE_GINA
+ iftrue .Generic
+ checkflag ENGINE_GINA_SUNDAY_AFTERNOON
+ iftrue .Generic
+ checkflag ENGINE_GINA_HAS_LEAF_STONE
+ iftrue .Generic
+ checkevent EVENT_GINA_GAVE_LEAF_STONE
+ iftrue .GaveLeafStone
+ farscall PhoneScript_Random2
+ if_equal $0, GinaHasLeafStone
+
+.GaveLeafStone:
+ farscall PhoneScript_Random11
+ if_equal $0, GinaHasLeafStone
+ checkflag ENGINE_FLYPOINT_GOLDENROD
+ iffalse .Generic
+ farscall PhoneScript_Random3
+ if_equal $0, GinaWantsBattle
+
+.Generic:
+ farjump Phone_GenericCall_Female
+
+GinaSundayDay:
+ setflag ENGINE_GINA_SUNDAY_AFTERNOON
+
+GinaWantsBattle:
+ landmarktotext ROUTE_34, $2
+ setflag ENGINE_GINA
+ farjump PhoneScript_WantsToBattle_Female
+
+GinaRockets:
+ farjump UnknownScript_0xa05c6
+
+GinaHasLeafStone:
+ setflag ENGINE_GINA_HAS_LEAF_STONE
+ landmarktotext ROUTE_34, $2
+ farjump PhoneScript_FoundItem_Female
+
+; Irwin
+
+IrwinPhoneScript1:
+ trainertotext JUGGLER, IRWIN1, $0
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
+ iftrue .Rockets
+ farjump UnknownScript_0xa09c8
+
+.Rockets:
+ farjump IrwinRocketRumor
+
+IrwinPhoneScript2:
+ trainertotext JUGGLER, IRWIN1, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
+ iftrue .Rockets
+ farjump IrwinRumorScript
+
+.Rockets:
+ farjump IrwinRocketRumor
+
+; Arnie
+
+ArniePhoneScript1:
+ trainertotext BUG_CATCHER, ARNIE1, $0
+ checkflag ENGINE_ARNIE
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_ARNIE_TUESDAY_MORNING
+ iftrue .NotTuesday
+ checkcode VAR_WEEKDAY
+ if_not_equal TUESDAY, .NotTuesday
+ checkmorn
+ iftrue ArnieTuesdayMorning
+
+.NotTuesday:
+ checkflag ENGINE_YANMA_SWARM
+ iftrue .AlreadySwarming
+ farjump UnknownScript_0xa0968
+
+.WantsBattle:
+ landmarktotext ROUTE_35, $2
+ farjump UnknownScript_0xa0a6e
+
+.AlreadySwarming:
+ landmarktotext ROUTE_35, $2
+ farjump UnknownScript_0xa0aff
+
+ArniePhoneScript2:
+ trainertotext BUG_CATCHER, ARNIE1, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_ARNIE
+ iftrue .Swarm
+ checkflag ENGINE_ARNIE_TUESDAY_MORNING
+ iftrue .Swarm
+ farscall PhoneScript_Random2
+ if_equal $0, ArnieWantsBattle
+
+.Swarm:
+ farscall PhoneScript_Random5
+ if_equal $0, ArnieYanmaSwarm
+ farscall PhoneScript_Random3
+ if_equal $0, ArnieFoundRare
+ farjump Phone_GenericCall_Male
+
+ArnieTuesdayMorning:
+ setflag ENGINE_ARNIE_TUESDAY_MORNING
+
+ArnieWantsBattle:
+ landmarktotext ROUTE_35, $2
+ setflag ENGINE_ARNIE
+ farjump PhoneScript_WantsToBattle_Male
+
+ArnieYanmaSwarm: ; start swarm
+ checkflag ENGINE_YANMA_SWARM
+ iftrue ArnieYanmaAlreadySwarming
+ setflag ENGINE_YANMA_SWARM
+ pokenamemem YANMA, $1
+ swarm SWARM_YANMA, ROUTE_35
+ landmarktotext ROUTE_35, $2
+ farjump UnknownScript_0xa05ce
+
+ArnieFoundRare:
+ farjump Phone_CheckIfUnseenRare_Male
+
+ArnieYanmaAlreadySwarming:
+ farjump Phone_GenericCall_Male
+
+; Alan
+
+AlanPhoneScript1:
+ trainertotext SCHOOLBOY, ALAN1, $0
+ checkflag ENGINE_ALAN
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_ALAN_WEDNESDAY_AFTERNOON
+ iftrue .NotWednesday
+ checkflag ENGINE_ALAN_HAS_FIRE_STONE
+ iftrue .FireStone
+ checkcode VAR_WEEKDAY
+ if_not_equal WEDNESDAY, .NotWednesday
+ checkday
+ iftrue AlanWednesdayDay
+
+.NotWednesday:
+ farjump UnknownScript_0xa0970
+
+.WantsBattle:
+ landmarktotext ROUTE_36, $2
+ farjump UnknownScript_0xa0a73
+
+.FireStone:
+ landmarktotext ROUTE_36, $2
+ farjump UnknownScript_0xa0ac5
+
+AlanPhoneScript2:
+ trainertotext SCHOOLBOY, ALAN1, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_ALAN
+ iftrue AlanGenericCall
+ checkflag ENGINE_ALAN_WEDNESDAY_AFTERNOON
+ iftrue AlanGenericCall
+ checkflag ENGINE_ALAN_HAS_FIRE_STONE
+ iftrue AlanGenericCall
+ farscall PhoneScript_Random3
+ if_equal $0, AlanWantsBattle
+ checkevent EVENT_ALAN_GAVE_FIRE_STONE
+ iftrue .FireStone
+ farscall PhoneScript_Random2
+ if_equal $0, AlanHasFireStone
+
+.FireStone:
+ farscall PhoneScript_Random11
+ if_equal $0, AlanHasFireStone
+
+AlanGenericCall:
+ farjump Phone_GenericCall_Male
+
+AlanWednesdayDay:
+ setflag ENGINE_ALAN_WEDNESDAY_AFTERNOON
+
+AlanWantsBattle:
+ landmarktotext ROUTE_36, $2
+ setflag ENGINE_ALAN
+ farjump PhoneScript_WantsToBattle_Male
+
+AlanHasFireStone:
+ setflag ENGINE_ALAN_HAS_FIRE_STONE
+ landmarktotext ROUTE_36, $2
+ farjump PhoneScript_FoundItem_Male
+
+; Dana
+
+DanaPhoneScript1:
+ trainertotext LASS, DANA1, $0
+ checkflag ENGINE_DANA
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Female
+ checkflag ENGINE_DANA_THURSDAY_NIGHT
+ iftrue .NotThursday
+ checkflag ENGINE_DANA_HAS_THUNDERSTONE
+ iftrue .HasThunderstone
+ checkcode VAR_WEEKDAY
+ if_not_equal THURSDAY, .NotThursday
+ checknite
+ iftrue DanaThursdayNight
+
+.NotThursday:
+ farjump UnknownScript_0xa0978
+
+.WantsBattle:
+ landmarktotext ROUTE_38, $2
+ farjump UnknownScript_0xa0a78
+
+.HasThunderstone:
+ landmarktotext ROUTE_38, $2
+ farjump UnknownScript_0xa0acd
+
+DanaPhoneScript2:
+ trainertotext LASS, DANA1, $0
+ farscall PhoneScript_GreetPhone_Female
+ checkflag ENGINE_DANA
+ iftrue .Generic
+ checkflag ENGINE_DANA_THURSDAY_NIGHT
+ iftrue .Generic
+ checkflag ENGINE_DANA_HAS_THUNDERSTONE
+ iftrue .Generic
+ farscall PhoneScript_Random3
+ if_equal $0, DanaWantsBattle
+ checkevent EVENT_DANA_GAVE_THUNDERSTONE
+ iftrue .Thunderstone
+ farscall PhoneScript_Random2
+ if_equal $0, DanaHasThunderstone
+
+.Thunderstone:
+ farscall PhoneScript_Random11
+ if_equal $0, DanaHasThunderstone
+
+.Generic:
+ farscall PhoneScript_Random3
+ if_equal $0, DanaFoundRare
+ farjump Phone_GenericCall_Female
+
+DanaThursdayNight:
+ setflag ENGINE_DANA_THURSDAY_NIGHT
+
+DanaWantsBattle:
+ landmarktotext ROUTE_38, $2
+ setflag ENGINE_DANA
+ farjump PhoneScript_WantsToBattle_Female
+
+DanaFoundRare:
+ farjump Phone_CheckIfUnseenRare_Female
+
+DanaHasThunderstone:
+ setflag ENGINE_DANA_HAS_THUNDERSTONE
+ landmarktotext ROUTE_38, $2
+ farjump PhoneScript_FoundItem_Female
+
+; Chad
+
+ChadPhoneScript1:
+ trainertotext SCHOOLBOY, CHAD1, $0
+ checkflag ENGINE_CHAD
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_CHAD_FRIDAY_MORNING
+ iftrue .NotFriday
+ checkcode VAR_WEEKDAY
+ if_not_equal FRIDAY, .NotFriday
+ checkmorn
+ iftrue ChadFridayMorning
+
+.NotFriday:
+ farjump UnknownScript_0xa0980
+
+.WantsBattle:
+ landmarktotext ROUTE_38, $2
+ farjump UnknownScript_0xa0a7d
+
+ChadPhoneScript2:
+ trainertotext SCHOOLBOY, CHAD1, $0
+ farscall PhoneScript_GreetPhone_Male
+ farscall PhoneScript_Random2
+ if_equal $0, ChadOakGossip
+ checkflag ENGINE_CHAD
+ iftrue .Generic
+ checkflag ENGINE_CHAD_FRIDAY_MORNING
+ iftrue .Generic
+ farscall PhoneScript_Random2
+ if_equal $0, ChadWantsBattle
+
+.Generic:
+ farscall PhoneScript_Random3
+ if_equal $0, ChadFoundRare
+ farjump Phone_GenericCall_Male
+
+ChadFridayMorning:
+ setflag ENGINE_CHAD_FRIDAY_MORNING
+
+ChadWantsBattle:
+ landmarktotext ROUTE_38, $2
+ setflag ENGINE_CHAD
+ farjump PhoneScript_WantsToBattle_Male
+
+ChadFoundRare:
+ farjump Phone_CheckIfUnseenRare_Male
+
+ChadOakGossip:
+ farjump ChadOakGossipScript
+
+DerekPhoneScript1:
+ trainertotext POKEFANM, DEREK1, $0
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_DEREK_HAS_NUGGET
+ iftrue .Nugget
+ farscall PhoneScript_Random2
+ if_equal $0, .NoContest
+ checkflag ENGINE_DAILY_BUG_CONTEST
+ iftrue .NoContest
+ checkcode VAR_WEEKDAY
+ if_equal TUESDAY, .ContestToday
+ if_equal THURSDAY, .ContestToday
+ if_equal SATURDAY, .ContestToday
+
+.NoContest:
+ farjump UnknownScript_0xa0988
+
+.ContestToday:
+ farjump PhoneScript_BugCatchingContest
+
+.Nugget:
+ landmarktotext ROUTE_39, $2
+ farjump UnknownScript_0xa0ad5
+
+DerekPhoneScript2:
+ trainertotext POKEFANM, DEREK1, $0
+ farscall PhoneScript_GreetPhone_Male
+ farscall PhoneScript_Random2
+ if_equal $0, .NoContest
+ checkflag ENGINE_DAILY_BUG_CONTEST
+ iftrue .NoContest
+ checkcode VAR_WEEKDAY
+ if_equal TUESDAY, .ContestToday
+ if_equal THURSDAY, .ContestToday
+ if_equal SATURDAY, .ContestToday
+
+.NoContest:
+ farscall PhoneScript_Random4
+ if_equal $0, .Nugget
+ farjump Phone_GenericCall_Male
+
+.ContestToday:
+ farjump PhoneScript_BugCatchingContest
+
+.Nugget:
+ setflag ENGINE_DEREK_HAS_NUGGET
+ landmarktotext ROUTE_39, $2
+ farjump PhoneScript_FoundItem_Male
+
+TullyPhoneScript1:
+ trainertotext FISHER, TULLY1, $0
+ checkflag ENGINE_TULLY
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_TULLY_SUNDAY_NIGHT
+ iftrue .NotSunday
+ checkflag ENGINE_TULLY_HAS_WATER_STONE
+ iftrue TullyHasWaterStone
+ checkcode VAR_WEEKDAY
+ if_not_equal SUNDAY, .NotSunday
+ checknite
+ iftrue TullySundayNight
+
+.NotSunday:
+ farjump UnknownScript_0xa0990
+
+.WantsBattle:
+ landmarktotext ROUTE_42, $2
+ farjump UnknownScript_0xa0a82
+
+TullyHasWaterStone:
+ landmarktotext ROUTE_42, $2
+ farjump UnknownScript_0xa0add
+
+TullyPhoneScript2:
+ trainertotext FISHER, TULLY1, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_TULLY
+ iftrue .Generic
+ checkflag ENGINE_TULLY_SUNDAY_NIGHT
+ iftrue .Generic
+ checkflag ENGINE_TULLY_HAS_WATER_STONE
+ iftrue .Generic
+ farscall PhoneScript_Random3
+ if_equal $0, TullyWantsBattle
+ checkevent EVENT_TULLY_GAVE_WATER_STONE
+ iftrue .WaterStone
+ farscall PhoneScript_Random2
+ if_equal $0, TullyFoundWaterStone
+
+.WaterStone:
+ farscall PhoneScript_Random11
+ if_equal $0, TullyFoundWaterStone
+
+.Generic:
+ farjump Phone_GenericCall_Male
+
+TullySundayNight:
+ setflag ENGINE_TULLY_SUNDAY_NIGHT
+
+TullyWantsBattle:
+ landmarktotext ROUTE_42, $2
+ setflag ENGINE_TULLY
+ farjump PhoneScript_WantsToBattle_Male
+
+TullyFoundWaterStone:
+ setflag ENGINE_TULLY_HAS_WATER_STONE
+ landmarktotext ROUTE_42, $2
+ farjump PhoneScript_FoundItem_Male
+
+BrentPhoneScript1:
+ trainertotext POKEMANIAC, BRENT1, $0
+ checkflag ENGINE_BRENT
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_BRENT_MONDAY_MORNING
+ iftrue .NotMonday
+ checkcode VAR_WEEKDAY
+ if_not_equal MONDAY, .NotMonday
+ checkmorn
+ iftrue BrentMondayMorning
+
+.NotMonday:
+ farjump UnknownScript_0xa0998
+
+.WantsBattle:
+ landmarktotext ROUTE_43, $2
+ farjump UnknownScript_0xa0a87
+
+BrentPhoneScript2:
+ trainertotext POKEMANIAC, BRENT1, $0
+ farscall PhoneScript_GreetPhone_Male
+ farscall PhoneScript_Random2
+ if_equal $0, BrentBillTrivia
+ checkflag ENGINE_BRENT
+ iftrue .Generic
+ checkflag ENGINE_BRENT_MONDAY_MORNING
+ iftrue .Generic
+ farscall PhoneScript_Random2
+ if_equal $0, BrentWantsBattle
+
+.Generic:
+ farjump Phone_GenericCall_Male
+
+BrentMondayMorning:
+ setflag ENGINE_BRENT_MONDAY_MORNING
+
+BrentWantsBattle:
+ landmarktotext ROUTE_43, $2
+ setflag ENGINE_BRENT
+ farjump PhoneScript_WantsToBattle_Male
+
+BrentBillTrivia:
+ farjump BrentBillTriviaScript
+
+TiffanyPhoneScript1:
+ trainertotext PICNICKER, TIFFANY3, $0
+ checkflag ENGINE_TIFFANY
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Female
+ checkflag ENGINE_TIFFANY_TUESDAY_AFTERNOON
+ iftrue .NotTuesday
+ checkflag ENGINE_TIFFANY_HAS_PINK_BOW
+ iftrue .HasItem
+ checkcode VAR_WEEKDAY
+ if_not_equal TUESDAY, .NotTuesday
+ checkday
+ iftrue TiffanyTuesdayAfternoon
+
+.NotTuesday:
+ farjump UnknownScript_0xa09a0
+
+.WantsBattle:
+ landmarktotext ROUTE_43, $2
+ farjump UnknownScript_0xa0a8c
+
+.HasItem:
+ landmarktotext ROUTE_43, $2
+ farjump UnknownScript_0xa0ae5
+
+TiffanyPhoneScript2:
+ trainertotext PICNICKER, TIFFANY3, $0
+ farscall PhoneScript_Random4
+ if_equal $0, TiffanysFamilyMembers
+ farscall PhoneScript_GreetPhone_Female
+ checkflag ENGINE_TIFFANY
+ iftrue TiffanyGenericCall
+ checkflag ENGINE_TIFFANY_TUESDAY_AFTERNOON
+ iftrue TiffanyGenericCall
+ checkflag ENGINE_TIFFANY_HAS_PINK_BOW
+ iftrue TiffanyGenericCall
+ farscall PhoneScript_Random3
+ if_equal $0, TiffanyWantsBattle
+ checkevent EVENT_TIFFANY_GAVE_PINK_BOW
+ iftrue .PinkBow
+ farscall PhoneScript_Random2
+ if_equal $0, TiffanyHasPinkBow
+
+.PinkBow:
+ farscall PhoneScript_Random11
+ if_equal $0, TiffanyHasPinkBow
+
+TiffanyGenericCall:
+ farjump Phone_GenericCall_Female
+
+TiffanyTuesdayAfternoon:
+ setflag ENGINE_TIFFANY_TUESDAY_AFTERNOON
+
+TiffanyWantsBattle:
+ landmarktotext ROUTE_43, $2
+ setflag ENGINE_TIFFANY
+ farjump PhoneScript_WantsToBattle_Female
+
+TiffanysFamilyMembers:
+ random $6
+ if_equal $0, .Grandma
+ if_equal $1, .Grandpa
+ if_equal $2, .Mom
+ if_equal $3, .Dad
+ if_equal $4, .Sister
+ if_equal $5, .Brother
+
+.Grandma:
+ stringtotext GrandmaString, $1
+ jump TiffanysPoorClefairy
+
+.Grandpa:
+ stringtotext GrandpaString, $1
+ jump TiffanysPoorClefairy
+
+.Mom:
+ stringtotext MomString, $1
+ jump TiffanysPoorClefairy
+
+.Dad:
+ stringtotext DadString, $1
+ jump TiffanysPoorClefairy
+
+.Sister:
+ stringtotext SisterString, $1
+ jump TiffanysPoorClefairy
+
+.Brother:
+ stringtotext BrotherString, $1
+ jump TiffanysPoorClefairy
+
+TiffanysPoorClefairy:
+ farjump TiffanyItsAwful
+
+TiffanyHasPinkBow:
+ setflag ENGINE_TIFFANY_HAS_PINK_BOW
+ landmarktotext ROUTE_43, $2
+ farjump PhoneScript_FoundItem_Female
+
+; Vance
+
+VancePhoneScript1:
+ trainertotext BIRD_KEEPER, VANCE1, $0
+ checkflag ENGINE_VANCE
+ iftrue VanceWantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_VANCE_WEDNESDAY_NIGHT
+ iftrue .NotWednesday
+ checkcode VAR_WEEKDAY
+ if_not_equal WEDNESDAY, .NotWednesday
+ checknite
+ iftrue VanceWednesdayNight
+
+.NotWednesday:
+ farjump VanceLookingForward
+
+VanceWantsBattle:
+ landmarktotext ROUTE_44, $2
+ farjump VanceHurryHurry
+
+VancePhoneScript2:
+ trainertotext BIRD_KEEPER, VANCE1, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_VANCE
+ iftrue .WantsBattle
+ checkflag ENGINE_VANCE_WEDNESDAY_NIGHT
+ iftrue .WantsBattle
+ farscall PhoneScript_Random3
+ if_equal $0, VanceWantsRematch
+ if_equal $1, VanceWantsRematch
+
+.WantsBattle:
+ farjump Phone_GenericCall_Male
+
+VanceWednesdayNight:
+ setflag ENGINE_VANCE_WEDNESDAY_NIGHT
+
+VanceWantsRematch:
+ landmarktotext ROUTE_44, $2
+ setflag ENGINE_VANCE
+ farjump PhoneScript_WantsToBattle_Male
+
+WiltonPhoneScript1:
+ trainertotext FISHER, WILTON1, $0
+ checkflag ENGINE_WILTON
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_WILTON_THURSDAY_MORNING
+ iftrue .NotThursday
+ checkflag ENGINE_WILTON_HAS_ITEM
+ iftrue .HasItem
+ checkcode VAR_WEEKDAY
+ if_not_equal THURSDAY, .NotThursday
+ checkmorn
+ iftrue WiltonThursdayMorning
+
+.NotThursday:
+ farjump WiltonHaventFoundAnything
+
+.WantsBattle:
+ landmarktotext ROUTE_44, $2
+ farjump WiltonNotBiting
+
+.HasItem:
+ landmarktotext ROUTE_44, $2
+ farjump WiltonWantThis
+
+WiltonPhoneScript2:
+ trainertotext FISHER, WILTON1, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_WILTON
+ iftrue .GenericCall
+ checkflag ENGINE_WILTON_THURSDAY_MORNING
+ iftrue .GenericCall
+ checkflag ENGINE_WILTON_HAS_ITEM
+ iftrue .GenericCall
+ farscall PhoneScript_Random2
+ if_equal $0, WiltonWantsBattle
+ farscall PhoneScript_Random2
+ if_equal $0, WiltonHasItem
+
+.GenericCall:
+ farjump Phone_GenericCall_Male
+
+WiltonThursdayMorning:
+ setflag ENGINE_WILTON_THURSDAY_MORNING
+
+WiltonWantsBattle:
+ landmarktotext ROUTE_44, $2
+ setflag ENGINE_WILTON
+ farjump PhoneScript_WantsToBattle_Male
+
+WiltonHasItem:
+ setflag ENGINE_WILTON_HAS_ITEM
+ landmarktotext ROUTE_44, $2
+ clearevent EVENT_WILTON_HAS_ULTRA_BALL
+ clearevent EVENT_WILTON_HAS_GREAT_BALL
+ clearevent EVENT_WILTON_HAS_POKE_BALL
+ random $5
+ if_equal $0, .UltraBall
+ random $3
+ if_equal $0, .GreatBall
+ jump .PokeBall
+
+.UltraBall:
+ setevent EVENT_WILTON_HAS_ULTRA_BALL
+ jump .FoundItem
+
+.GreatBall:
+ setevent EVENT_WILTON_HAS_GREAT_BALL
+ jump .FoundItem
+
+.PokeBall:
+ setevent EVENT_WILTON_HAS_POKE_BALL
+
+.FoundItem:
+ farjump PhoneScript_FoundItem_Male
+
+; Kenji
+
+KenjiPhoneScript1:
+ trainertotext BLACKBELT_T, KENJI3, $0
+ farscall PhoneScript_AnswerPhone_Male
+ farjump KenjiAnswerPhoneScript
+
+KenjiPhoneScript2:
+ trainertotext BLACKBELT_T, KENJI3, $0
+ farscall PhoneScript_GreetPhone_Male
+ farjump KenjiCallingPhoneScript
+
+; Parry
+
+ParryPhoneScript1:
+ trainertotext HIKER, PARRY1, $0
+ checkflag ENGINE_PARRY
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Male
+ checkflag ENGINE_PARRY_FRIDAY_AFTERNOON
+ iftrue .WantsRematch
+ checkcode VAR_WEEKDAY
+ if_not_equal FRIDAY, .WantsRematch
+ checkday
+ iftrue ParryFridayDay
+
+.WantsRematch:
+ farjump ParryBattleWithMe
+
+.WantsBattle:
+ landmarktotext ROUTE_45, $2
+ farjump ParryHaventYouGottenTo
+
+ParryPhoneScript2:
+ trainertotext HIKER, PARRY1, $0
+ farscall PhoneScript_GreetPhone_Male
+ checkflag ENGINE_PARRY
+ iftrue .GenericCall
+ checkflag ENGINE_PARRY_FRIDAY_AFTERNOON
+ iftrue .GenericCall
+ farscall PhoneScript_Random2
+ if_equal $0, ParryWantsBattle
+ if_equal $1, ParryWantsBattle
+
+.GenericCall:
+ farjump Phone_GenericCall_Male
+
+ParryFridayDay:
+ setflag ENGINE_PARRY_FRIDAY_AFTERNOON
+
+ParryWantsBattle:
+ landmarktotext ROUTE_45, $2
+ setflag ENGINE_PARRY
+ farjump PhoneScript_WantsToBattle_Male
+
+; Erin
+
+ErinPhoneScript1:
+ trainertotext PICNICKER, ERIN1, $0
+ checkflag ENGINE_ERIN
+ iftrue .WantsBattle
+ farscall PhoneScript_AnswerPhone_Female
+ checkflag ENGINE_ERIN_SATURDAY_NIGHT
+ iftrue .NotSaturday
+ checkcode VAR_WEEKDAY
+ if_not_equal SATURDAY, .NotSaturday
+ checknite
+ iftrue ErinSaturdayNight
+
+.NotSaturday:
+ farjump ErinWorkingHardScript
+
+.WantsBattle:
+ landmarktotext ROUTE_46, $2
+ farjump ErinComeBattleScript
+
+ErinPhoneScript2:
+ trainertotext PICNICKER, ERIN1, $0
+ farscall PhoneScript_GreetPhone_Female
+ checkflag ENGINE_ERIN
+ iftrue .GenericCall
+ checkflag ENGINE_ERIN_SATURDAY_NIGHT
+ iftrue .GenericCall
+ farscall PhoneScript_Random3
+ if_equal $0, ErinWantsBattle
+ if_equal $1, ErinWantsBattle
+
+.GenericCall:
+ farjump Phone_GenericCall_Female
+
+ErinSaturdayNight:
+ setflag ENGINE_ERIN_SATURDAY_NIGHT
+
+ErinWantsBattle:
+ landmarktotext ROUTE_46, $2
+ setflag ENGINE_ERIN
+ farjump PhoneScript_WantsToBattle_Female
diff --git a/engine/phone_scripts.asm b/engine/phone_scripts.asm
deleted file mode 100644
index 8beee58c6..000000000
--- a/engine/phone_scripts.asm
+++ /dev/null
@@ -1,3153 +0,0 @@
-UnusedPhoneScript: ; 0xbcea5
- farwritetext UnusedPhoneText
- end
-
-; Mom
-
-MomPhoneScript: ; 0xbceaa
- checkevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
- iftrue .bcec5
- checkevent EVENT_DUDE_TALKED_TO_YOU
- iftrue MomPhoneLectureScript
- checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
- iftrue MomPhoneNoGymQuestScript
- checkevent EVENT_GOT_A_POKEMON_FROM_ELM
- iftrue MomPhoneNoPokedexScript
- jump MomPhoneNoPokemonScript
-
-.bcec5 ; 0xbcec5
- checkevent EVENT_IN_YOUR_ROOM
- iftrue MomPhoneHangUpScript
- farwritetext MomPhoneGreetingText
- buttonsound
- mapnametotext $0
- checkcode VAR_ROOFPALETTE
- if_equal $1, MomPhonePalette1
- if_equal $2, MomPhonePalette2
- jump UnknownScript_0xbcf2f
-
-MomPhoneLandmark: ; 0xbcedf
- farwritetext MomPhoneLandmarkText
- buttonsound
- jump UnknownScript_0xbcf37
-
-MomPhonePalette1: ; 0xbcee7
- checkcode VAR_MAPGROUP
- if_equal GROUP_NEW_BARK_TOWN, .newbark
- if_equal GROUP_CHERRYGROVE_CITY, .cherrygrove
- if_equal GROUP_VIOLET_CITY, .violet
- if_equal GROUP_AZALEA_TOWN, .azalea
- if_equal GROUP_GOLDENROD_CITY, .goldenrod
- farwritetext MomPhoneGenericAreaText
- buttonsound
- jump UnknownScript_0xbcf37
-
-.newbark ; 0xbcf05
- farwritetext MomPhoneNewBarkText
- buttonsound
- jump UnknownScript_0xbcf37
-
-.cherrygrove ; 0xbcf0d
- farwritetext MomPhoneCherrygroveText
- buttonsound
- jump UnknownScript_0xbcf37
-
-.violet ; 0xbcf15
- landmarktotext SPROUT_TOWER, 1
- jump MomPhoneLandmark
-.azalea ; 0xbcf1b
- landmarktotext SLOWPOKE_WELL, 1
- jump MomPhoneLandmark
-.goldenrod ; 0xbcf21
- landmarktotext RADIO_TOWER, 1
- jump MomPhoneLandmark
-
-MomPhonePalette2: ; 0xbcf27
- farwritetext MomOtherAreaText
- buttonsound
- jump UnknownScript_0xbcf37
-
-UnknownScript_0xbcf2f: ; 0xbcf2f
- farwritetext MomDeterminedText
- buttonsound
- jump UnknownScript_0xbcf37
-
-UnknownScript_0xbcf37: ; 0xbcf37
- checkflag ENGINE_MOM_SAVING_MONEY
- iffalse CheckIfMomHasMoney
- checkmoney $1, 0
- if_equal $0, UnknownScript_0xbcf55
- jump UnknownScript_0xbcf63
-
-CheckIfMomHasMoney: ; 0xbcf49
- checkmoney $1, 0
- if_equal $0, MomHasMoney
- jump MomHasNoMoney
-
-UnknownScript_0xbcf55: ; 0xbcf55
- readmoney $1, $0
- farwritetext MomCheckBalanceText
- yesorno
- iftrue MomPhoneSaveMoneyScript
- jump MomPhoneWontSaveMoneyScript
-
-UnknownScript_0xbcf63: ; 0xbcf63
- farwritetext UnknownText_0x1b41ea
- yesorno
- iftrue MomPhoneSaveMoneyScript
- jump MomPhoneWontSaveMoneyScript
-
-MomHasNoMoney: ; 0xbcf6e
- farwritetext UnknownText_0x1b420d
- yesorno
- iftrue MomPhoneSaveMoneyScript
- jump MomPhoneWontSaveMoneyScript
-
-MomHasMoney: ; 0xbcf79
- readmoney $1, $0
- farwritetext UnknownText_0x1b4249
- yesorno
- iftrue MomPhoneSaveMoneyScript
- jump MomPhoneWontSaveMoneyScript
-
-MomPhoneSaveMoneyScript: ; 0xbcf87
- setflag ENGINE_MOM_SAVING_MONEY
- farwritetext UnknownText_0x1b4289
- buttonsound
- jump MomPhoneHangUpScript
-
-MomPhoneWontSaveMoneyScript: ; 0xbcf92
- clearflag ENGINE_MOM_SAVING_MONEY
- farwritetext MomPhoneWontSaveMoneyText
- buttonsound
- jump MomPhoneHangUpScript
-
-MomPhoneHangUpScript: ; 0xbcf9d
- farwritetext MomPhoneHangUpText
- end
-
-MomPhoneNoPokemonScript: ; 0xbcfa2
- farwritetext MomPhoneNoPokemonText
- end
-
-MomPhoneNoPokedexScript: ; 0xbcfa7
- farwritetext MomPhoneNoPokedexText
- end
-
-MomPhoneNoGymQuestScript: ; 0xbcfac
- farwritetext MomPhoneNoGymQuestText
- end
-
-MomPhoneLectureScript: ; 0xbcfb1
- setevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
- setflag ENGINE_DST
- specialphonecall SPECIALCALL_NONE
- farwritetext MomPhoneLectureText
- yesorno
- iftrue MomPhoneSaveMoneyScript
- jump MomPhoneWontSaveMoneyScript
-
-; Bill
-
-BillPhoneScript1: ; 0xbcfc5
- checkday
- iftrue .daygreet
- checknite
- iftrue .nitegreet
- farwritetext BillPhoneMornGreetingText
- buttonsound
- jump .main
-
-.daygreet ; 0xbcfd7
- farwritetext BillPhoneDayGreetingText
- buttonsound
- jump .main
-
-.nitegreet ; 0xbcfdf
- farwritetext BillPhoneNiteGreetingText
- buttonsound
- jump .main
-
-.main ; 0xbcfe7
- farwritetext BillPhoneGeneriText
- buttonsound
- checkcode VAR_BOXSPACE
- RAM2MEM $0
- if_equal $0, .full
- if_less_than $6, .nearlyfull
- farwritetext BillPhoneNotFullText
- end
-
-.nearlyfull ; 0xbcffd
- farwritetext BillPhoneNearlyFullText
- end
-
-.full ; 0xbd002
- farwritetext BillPhoneFullText
- end
-
-BillPhoneScript2: ; 0xbd007
- farwritetext BillPhoneNewlyFullText
- waitbutton
- end
-
-; Elm
-
-ElmPhoneScript1: ; 0xbd00d
- checkcode VAR_SPECIALPHONECALL
- if_equal $1, .pokerus
- checkevent EVENT_SHOWED_TOGEPI_TO_ELM
- iftrue .discovery
- checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE
- iffalse .next
- checkevent EVENT_TOGEPI_HATCHED
- iftrue .egghatched
-.next
- checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE
- iftrue .eggunhatched
- checkevent EVENT_ELMS_AIDE_IN_LAB
- iftrue .assistant
- checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
- iftrue .checkingegg
- checkevent EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON
- iftrue .stolen
- checkevent EVENT_GOT_MYSTERY_EGG_FROM_MR_POKEMON
- iftrue .sawmrpokemon
- farwritetext ElmPhoneStartText
- end
-
-.sawmrpokemon ; 0xbd048
- farwritetext ElmPhoneSawMrPokemonText
- end
-
-.stolen ; 0xbd04d
- farwritetext ElmPhonePokemonStolenText
- end
-
-.checkingegg ; 0xbd052
- farwritetext ElmPhoneCheckingEggText
- end
-
-.assistant ; 0xbd057
- farwritetext ElmPhoneAssistantText
- end
-
-.eggunhatched ; 0xbd05c
- farwritetext ElmPhoneEggUnhatchedText
- end
-
-.egghatched ; 0xbd061
- farwritetext ElmPhoneEggHatchedText
- setevent EVENT_TOLD_ELM_ABOUT_TOGEPI_OVER_THE_PHONE
- end
-
-.discovery ; 0xbd069
- random $2
- if_equal $0, .nextdiscovery
- farwritetext ElmPhoneDiscovery1Text
- end
-
-.nextdiscovery ; 0xbd074
- farwritetext ElmPhoneDiscovery2Text
- end
-
-.pokerus ; 0xbd079
- farwritetext ElmPhonePokerusText
- specialphonecall SPECIALCALL_NONE
- end
-
-ElmPhoneScript2: ; 0xbd081
- checkcode VAR_SPECIALPHONECALL
- if_equal $2, .disaster
- if_equal $3, .assistant
- if_equal $4, .rocket
- if_equal $5, .gift
- if_equal $8, .gift
- farwritetext ElmPhonePokerusText
- specialphonecall SPECIALCALL_NONE
- end
-
-.disaster ; 0xbd09f
- farwritetext ElmPhoneDisasterText
- specialphonecall SPECIALCALL_NONE
- setevent EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON
- end
-
-.assistant ; 0xbd0aa
- farwritetext ElmPhoneEggAssistantText
- specialphonecall SPECIALCALL_NONE
- clearevent EVENT_ELMS_AIDE_IN_VIOLET_POKEMON_CENTER
- setevent EVENT_ELMS_AIDE_IN_LAB
- end
-
-.rocket ; 0xbd0b8
- farwritetext ElmPhoneRocketText
- specialphonecall SPECIALCALL_NONE
- end
-
-.gift ; 0xbd0c0
- farwritetext ElmPhoneGiftText
- specialphonecall SPECIALCALL_NONE
- end
-
-.unused ; 0xbd0c8
- farwritetext ElmPhoneUnusedText
- specialphonecall SPECIALCALL_NONE
- end
-; bd0d0
-
-; Jack
-
-JackPhoneScript1:
- trainertotext SCHOOLBOY, JACK1, $0
- checkflag ENGINE_JACK
- iftrue UnknownScript_0xbd0f3
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_JACK_MONDAY_MORNING
- iftrue UnknownScript_0xbd0ef
- checkcode VAR_WEEKDAY
- if_not_equal MONDAY, UnknownScript_0xbd0ef
- checkmorn
- iftrue UnknownScript_0xbd12a
-
-UnknownScript_0xbd0ef:
- farjump UnknownScript_0xa08f8
-
-UnknownScript_0xbd0f3:
- landmarktotext NATIONAL_PARK, $2
- farjump UnknownScript_0xa0a2d
-
-JackPhoneScript2:
- trainertotext SCHOOLBOY, JACK1, $0
- farscall PhoneScript_GreetPhone_Male
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd13b
- checkflag ENGINE_JACK
- iftrue UnknownScript_0xbd11e
- checkflag ENGINE_JACK_MONDAY_MORNING
- iftrue UnknownScript_0xbd11e
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd12d
-
-UnknownScript_0xbd11e:
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd137
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbd12a:
- setflag ENGINE_JACK_MONDAY_MORNING
-
-UnknownScript_0xbd12d:
- landmarktotext NATIONAL_PARK, $2
- setflag ENGINE_JACK
- farjump UnknownScript_0xa0376
-
-UnknownScript_0xbd137:
- farjump UnknownScript_0xa0584
-
-UnknownScript_0xbd13b:
- farjump UnknownScript_0xa0654
-
-; Beverly
-
-BeverlyPhoneScript1:
- trainertotext POKEFANF, BEVERLY1, $0
- farscall PhoneScript_AnswerPhone_Female
- checkflag ENGINE_BEVERLY_HAS_NUGGET
- iftrue UnknownScript_0xbd151
- farjump UnknownScript_0xa0900
-
-UnknownScript_0xbd151:
- landmarktotext NATIONAL_PARK, $2
- farjump UnknownScript_0xa0aa5
-
-BeverlyPhoneScript2:
- trainertotext POKEFANF, BEVERLY1, $0
- farscall PhoneScript_GreetPhone_Female
- checkflag ENGINE_BEVERLY_HAS_NUGGET
- iftrue UnknownScript_0xbd16e
- farscall PhoneScript_Random4
- if_equal $0, UnknownScript_0xbd172
-
-UnknownScript_0xbd16e:
- farjump UnknownScript_0xa0017
-
-UnknownScript_0xbd172:
- setflag ENGINE_BEVERLY_HAS_NUGGET
- landmarktotext NATIONAL_PARK, $2
- farjump UnknownScript_0xa061e
-
-; Huey
-
-HueyPhoneScript1:
- trainertotext SAILOR, HUEY1, $0
- checkflag ENGINE_HUEY
- iftrue UnknownScript_0xbd1a2
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_HUEY_WEDNESDAY_NIGHT
- iftrue UnknownScript_0xbd19b
- checkcode VAR_WEEKDAY
- if_not_equal WEDNESDAY, UnknownScript_0xbd19b
- checknite
- iftrue UnknownScript_0xbd1cd
-
-UnknownScript_0xbd19b:
- special RandomPhoneMon
- farjump UnknownScript_0xa0908
-
-UnknownScript_0xbd1a2:
- landmarktotext LIGHTHOUSE, $2
- farjump UnknownScript_0xa0a32
-
-HueyPhoneScript2:
- trainertotext SAILOR, HUEY1, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_HUEY
- iftrue UnknownScript_0xbd1c9
- checkflag ENGINE_HUEY_WEDNESDAY_NIGHT
- iftrue UnknownScript_0xbd1c9
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd1d0
- if_equal $1, UnknownScript_0xbd1d0
-
-UnknownScript_0xbd1c9:
- farjump PhoneScript_MonFlavorText
-
-UnknownScript_0xbd1cd:
- setflag ENGINE_HUEY_WEDNESDAY_NIGHT
-
-UnknownScript_0xbd1d0:
- landmarktotext LIGHTHOUSE, $2
- setflag ENGINE_HUEY
- farjump UnknownScript_0xa0376
-
-; Gaven
-
-GavenPhoneScript1:
- trainertotext COOLTRAINERM, GAVEN3, $0
- checkflag ENGINE_GAVEN
- iftrue UnknownScript_0xbd1fd
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_GAVEN_THURSDAY_MORNING
- iftrue UnknownScript_0xbd1f9
- checkcode VAR_WEEKDAY
- if_not_equal THURSDAY, UnknownScript_0xbd1f9
- checkmorn
- iftrue UnknownScript_0xbd22c
-
-UnknownScript_0xbd1f9:
- farjump UnknownScript_0xa0910
-
-UnknownScript_0xbd1fd:
- landmarktotext ROUTE_26, $2
- farjump UnknownScript_0xa0a37
-
-GavenPhoneScript2:
- trainertotext COOLTRAINERM, GAVEN3, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_GAVEN
- iftrue UnknownScript_0xbd220
- checkflag ENGINE_GAVEN_THURSDAY_MORNING
- iftrue UnknownScript_0xbd220
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd22f
-
-UnknownScript_0xbd220:
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd239
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbd22c:
- setflag ENGINE_GAVEN_THURSDAY_MORNING
-
-UnknownScript_0xbd22f:
- landmarktotext ROUTE_26, $2
- setflag ENGINE_GAVEN
- farjump UnknownScript_0xa0376
-
-UnknownScript_0xbd239:
- farjump UnknownScript_0xa0584
-
-; Beth
-
-BethPhoneScript1:
- trainertotext COOLTRAINERF, BETH1, $0
- checkflag ENGINE_BETH
- iftrue UnknownScript_0xbd260
- farscall PhoneScript_AnswerPhone_Female
- checkflag ENGINE_BETH_FRIDAY_AFTERNOON
- iftrue UnknownScript_0xbd25c
- checkcode VAR_WEEKDAY
- if_not_equal FRIDAY, UnknownScript_0xbd25c
- checkday
- iftrue UnknownScript_0xbd287
-
-UnknownScript_0xbd25c:
- farjump UnknownScript_0xa0918
-
-UnknownScript_0xbd260:
- landmarktotext ROUTE_26, $2
- farjump UnknownScript_0xa0a3c
-
-BethPhoneScript2:
- trainertotext COOLTRAINERF, BETH1, $0
- farscall PhoneScript_GreetPhone_Female
- checkflag ENGINE_BETH
- iftrue UnknownScript_0xbd283
- checkflag ENGINE_BETH_FRIDAY_AFTERNOON
- iftrue UnknownScript_0xbd283
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd28a
-
-UnknownScript_0xbd283:
- farjump UnknownScript_0xa0017
-
-UnknownScript_0xbd287:
- setflag ENGINE_BETH_FRIDAY_AFTERNOON
-
-UnknownScript_0xbd28a:
- landmarktotext ROUTE_26, $2
- setflag ENGINE_BETH
- farjump UnknownScript_0xa037e
-
-; Jose
-
-JosePhoneScript1:
- trainertotext BIRD_KEEPER, JOSE2, $0
- checkflag ENGINE_JOSE
- iftrue UnknownScript_0xbd2bd
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_JOSE_SATURDAY_NIGHT
- iftrue UnknownScript_0xbd2b9
- checkflag ENGINE_JOSE_HAS_STAR_PIECE
- iftrue UnknownScript_0xbd2c4
- checkcode VAR_WEEKDAY
- if_not_equal SATURDAY, UnknownScript_0xbd2b9
- checknite
- iftrue UnknownScript_0xbd301
-
-UnknownScript_0xbd2b9:
- farjump UnknownScript_0xa0920
-
-UnknownScript_0xbd2bd:
- landmarktotext ROUTE_27, $2
- farjump UnknownScript_0xa0a41
-
-UnknownScript_0xbd2c4:
- landmarktotext ROUTE_27, $2
- farjump UnknownScript_0xa0a41
-
-JosePhoneScript2:
- trainertotext BIRD_KEEPER, JOSE2, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_JOSE
- iftrue UnknownScript_0xbd2f5
- checkflag ENGINE_JOSE_SATURDAY_NIGHT
- iftrue UnknownScript_0xbd2f5
- checkflag ENGINE_JOSE_HAS_STAR_PIECE
- iftrue UnknownScript_0xbd2f5
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd304
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd312
-
-UnknownScript_0xbd2f5:
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd30e
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbd301:
- setflag ENGINE_JOSE_SATURDAY_NIGHT
-
-UnknownScript_0xbd304:
- landmarktotext ROUTE_27, $2
- setflag ENGINE_JOSE
- farjump UnknownScript_0xa0376
-
-UnknownScript_0xbd30e:
- farjump UnknownScript_0xa0584
-
-UnknownScript_0xbd312:
- setflag ENGINE_JOSE_HAS_STAR_PIECE
- landmarktotext ROUTE_27, $2
- farjump UnknownScript_0xa05e6
-
-; Reena
-
-ReenaPhoneScript1:
- trainertotext COOLTRAINERF, REENA1, $0
- checkflag ENGINE_REENA
- iftrue UnknownScript_0xbd33f
- farscall PhoneScript_AnswerPhone_Female
- checkflag ENGINE_REENA_SUNDAY_MORNING
- iftrue UnknownScript_0xbd33b
- checkcode VAR_WEEKDAY
- if_not_equal SUNDAY, UnknownScript_0xbd33b
- checkmorn
- iftrue UnknownScript_0xbd366
-
-UnknownScript_0xbd33b:
- farjump UnknownScript_0xa0928
-
-UnknownScript_0xbd33f:
- landmarktotext ROUTE_27, $2
- farjump UnknownScript_0xa0a46
-
-ReenaPhoneScript2:
- trainertotext COOLTRAINERF, REENA1, $0
- farscall PhoneScript_GreetPhone_Female
- checkflag ENGINE_REENA
- iftrue UnknownScript_0xbd362
- checkflag ENGINE_REENA_SUNDAY_MORNING
- iftrue UnknownScript_0xbd362
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd369
-
-UnknownScript_0xbd362:
- farjump UnknownScript_0xa0017
-
-UnknownScript_0xbd366:
- setflag ENGINE_REENA_SUNDAY_MORNING
-
-UnknownScript_0xbd369:
- landmarktotext ROUTE_27, $2
- setflag ENGINE_REENA
- farjump UnknownScript_0xa037e
-
-; Joey
-
-JoeyPhoneScript1:
- trainertotext YOUNGSTER, JOEY1, $0
- checkflag ENGINE_JOEY
- iftrue UnknownScript_0xbd399
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_JOEY_MONDAY_AFTERNOON
- iftrue UnknownScript_0xbd392
- checkcode VAR_WEEKDAY
- if_not_equal MONDAY, UnknownScript_0xbd392
- checkday
- iftrue UnknownScript_0xbd3c4
-
-UnknownScript_0xbd392:
- special RandomPhoneMon
- farjump UnknownScript_0xa0930
-
-UnknownScript_0xbd399:
- landmarktotext ROUTE_30, $2
- farjump UnknownScript_0xa0a4b
-
-JoeyPhoneScript2:
- trainertotext YOUNGSTER, JOEY1, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_JOEY
- iftrue UnknownScript_0xbd3c0
- checkflag ENGINE_JOEY_MONDAY_AFTERNOON
- iftrue UnknownScript_0xbd3c0
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd3c7
- if_equal $1, UnknownScript_0xbd3c7
-
-UnknownScript_0xbd3c0:
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbd3c4:
- setflag ENGINE_JOEY_MONDAY_AFTERNOON
-
-UnknownScript_0xbd3c7:
- landmarktotext ROUTE_30, $2
- setflag ENGINE_JOEY
- farjump UnknownScript_0xa0376
-
-; Wade
-
-WadePhoneScript1:
- trainertotext BUG_CATCHER, WADE1, $0
- checkflag ENGINE_WADE
- iftrue UnknownScript_0xbd41a
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_WADE_TUESDAY_NIGHT
- iftrue UnknownScript_0xbd3f6
- checkflag ENGINE_WADE_HAS_ITEM
- iftrue UnknownScript_0xbd421
- checkcode VAR_WEEKDAY
- if_not_equal TUESDAY, UnknownScript_0xbd3f6
- checknite
- iftrue UnknownScript_0xbd484
-
-UnknownScript_0xbd3f6:
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd412
- checkflag ENGINE_DAILY_BUG_CONTEST
- iftrue UnknownScript_0xbd412
- checkcode VAR_WEEKDAY
- if_equal TUESDAY, UnknownScript_0xbd416
- if_equal THURSDAY, UnknownScript_0xbd416
- if_equal SATURDAY, UnknownScript_0xbd416
-
-UnknownScript_0xbd412:
- farjump UnknownScript_0xa0938
-
-UnknownScript_0xbd416:
- farjump UnknownScript_0xa05a4
-
-UnknownScript_0xbd41a:
- landmarktotext ROUTE_31, $2
- farjump UnknownScript_0xa0a50
-
-UnknownScript_0xbd421:
- landmarktotext ROUTE_31, $2
- farjump UnknownScript_0xa0ab5
-
-WadePhoneScript2:
- trainertotext BUG_CATCHER, WADE1, $0
- farscall PhoneScript_GreetPhone_Male
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd44c
- checkflag ENGINE_DAILY_BUG_CONTEST
- iftrue UnknownScript_0xbd44c
- checkcode VAR_WEEKDAY
- if_equal TUESDAY, UnknownScript_0xbd480
- if_equal THURSDAY, UnknownScript_0xbd480
- if_equal SATURDAY, UnknownScript_0xbd480
-
-UnknownScript_0xbd44c:
- checkflag ENGINE_WADE
- iftrue UnknownScript_0xbd474
- checkflag ENGINE_WADE_TUESDAY_NIGHT
- iftrue UnknownScript_0xbd474
- checkflag ENGINE_WADE_HAS_ITEM
- iftrue UnknownScript_0xbd474
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd495
- checkflag ENGINE_FLYPOINT_GOLDENROD
- iffalse UnknownScript_0xbd474
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd487
-
-UnknownScript_0xbd474:
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd491
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbd480:
- farjump UnknownScript_0xa05a4
-
-UnknownScript_0xbd484:
- setflag ENGINE_WADE_TUESDAY_NIGHT
-
-UnknownScript_0xbd487:
- landmarktotext ROUTE_31, $2
- setflag ENGINE_WADE
- farjump UnknownScript_0xa0376
-
-UnknownScript_0xbd491:
- farjump UnknownScript_0xa0584
-
-UnknownScript_0xbd495:
- setflag ENGINE_WADE_HAS_ITEM
- landmarktotext ROUTE_31, $2
- clearevent EVENT_WADE_HAS_BERRY
- clearevent EVENT_WADE_HAS_PSNCUREBERRY
- clearevent EVENT_WADE_HAS_PRZCUREBERRY
- clearevent EVENT_WADE_HAS_BITTER_BERRY
- random $4
- if_equal $0, UnknownScript_0xbd4b9
- if_equal $1, UnknownScript_0xbd4bf
- if_equal $2, UnknownScript_0xbd4c5
- if_equal $3, UnknownScript_0xbd4cb
-
-UnknownScript_0xbd4b9:
- setevent EVENT_WADE_HAS_BERRY
- jump UnknownScript_0xbd4ce
-
-UnknownScript_0xbd4bf:
- setevent EVENT_WADE_HAS_PSNCUREBERRY
- jump UnknownScript_0xbd4ce
-
-UnknownScript_0xbd4c5:
- setevent EVENT_WADE_HAS_PRZCUREBERRY
- jump UnknownScript_0xbd4ce
-
-UnknownScript_0xbd4cb:
- setevent EVENT_WADE_HAS_BITTER_BERRY
-
-UnknownScript_0xbd4ce:
- farjump UnknownScript_0xa05e6
-
-; Ralph
-
-RalphPhoneScript1:
- trainertotext FISHER, RALPH1, $0
- checkflag ENGINE_RALPH
- iftrue Ralph_Rematch
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_RALPH_WEDNESDAY_MORNING
- iftrue Ralph_CheckSwarm
- checkcode VAR_WEEKDAY
- if_not_equal WEDNESDAY, Ralph_CheckSwarm
- checkmorn
- iftrue Ralph_WednesdayMorning
-Ralph_CheckSwarm:
- checkflag ENGINE_SPECIAL_WILDDATA
- iftrue Ralph_ReportSwarm
- farjump UnknownScript_0xa0940
-
-Ralph_Rematch:
- landmarktotext ROUTE_32, $2
- farjump UnknownScript_0xa0a55
-
-Ralph_ReportSwarm:
- landmarktotext ROUTE_32, $2
- farjump UnknownScript_0xa0af5
-
-RalphPhoneScript2:
- trainertotext FISHER, RALPH1, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_FLYPOINT_GOLDENROD
- iffalse Ralph_CheckSwarm2
- checkflag ENGINE_RALPH
- iftrue Ralph_CheckSwarm2
- checkflag ENGINE_RALPH_WEDNESDAY_MORNING
- iftrue Ralph_CheckSwarm2
- farscall PhoneScript_Random2
- if_equal $0, Ralph_FightMe
-Ralph_CheckSwarm2:
- farscall PhoneScript_Random5
- if_equal $0, Ralph_SetUpSwarm
- farjump UnknownScript_0xa0000
-
-Ralph_WednesdayMorning:
- setflag ENGINE_RALPH_WEDNESDAY_MORNING
-Ralph_FightMe:
- landmarktotext ROUTE_32, $2
- setflag ENGINE_RALPH
- farjump UnknownScript_0xa0376
-
-Ralph_SetUpSwarm:
- checkflag ENGINE_SPECIAL_WILDDATA
- iftrue UnknownScript_0xbd55c
- setflag ENGINE_SPECIAL_WILDDATA
- pokenamemem QWILFISH, $1
- landmarktotext ROUTE_32, $2
- writebyte FISHSWARM_QWILFISH
- special Special_ActivateFishingSwarm
- farjump UnknownScript_0xa05d6
-
-UnknownScript_0xbd55c:
- farjump UnknownScript_0xa0000
-
-; Liz
-
-LizPhoneScript1:
- trainertotext PICNICKER, LIZ1, $0
- checkflag ENGINE_LIZ
- iftrue UnknownScript_0xbd586
- farscall PhoneScript_AnswerPhone_Female
- checkflag ENGINE_LIZ_THURSDAY_AFTERNOON
- iftrue UnknownScript_0xbd57f
- checkcode VAR_WEEKDAY
- if_not_equal THURSDAY, UnknownScript_0xbd57f
- checkday
- iftrue UnknownScript_0xbd5c3
-
-UnknownScript_0xbd57f:
- special RandomPhoneMon
- farjump UnknownScript_0xa0948
-
-UnknownScript_0xbd586:
- landmarktotext ROUTE_32, $2
- farjump UnknownScript_0xa0a5a
-
-LizPhoneScript2:
- trainertotext PICNICKER, LIZ1, $0
- farscall PhoneScript_Random4
- if_equal $0, UnknownScript_0xbd5d0
- farscall PhoneScript_GreetPhone_Female
- checkflag ENGINE_LIZ
- iftrue UnknownScript_0xbd5a9
- checkflag ENGINE_LIZ_THURSDAY_AFTERNOON
- iftrue UnknownScript_0xbd5a9
-
-UnknownScript_0xbd5a9:
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd5d4
- checkflag ENGINE_FLYPOINT_GOLDENROD
- iffalse UnknownScript_0xbd5bf
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd5c6
-
-UnknownScript_0xbd5bf:
- farjump UnknownScript_0xa0017
-
-UnknownScript_0xbd5c3:
- setflag ENGINE_LIZ_THURSDAY_AFTERNOON
-
-UnknownScript_0xbd5c6:
- landmarktotext ROUTE_32, $2
- setflag ENGINE_LIZ
- farjump UnknownScript_0xa037e
-
-UnknownScript_0xbd5d0:
- farjump UnknownScript_0xa047a
-
-UnknownScript_0xbd5d4:
- random $9
- if_equal $0, UnknownScript_0xbd5fa
- if_equal $1, UnknownScript_0xbd600
- if_equal $2, UnknownScript_0xbd606
- if_equal $3, UnknownScript_0xbd60c
- if_equal $4, UnknownScript_0xbd612
- if_equal $5, UnknownScript_0xbd618
- if_equal $6, UnknownScript_0xbd61e
- if_equal $7, UnknownScript_0xbd624
- if_equal $8, UnknownScript_0xbd62a
-
-UnknownScript_0xbd5fa:
- trainerclassname COOLTRAINERM, $1
- jump UnknownScript_0xbd630
-
-UnknownScript_0xbd600:
- trainerclassname BEAUTY, $1
- jump UnknownScript_0xbd630
-
-UnknownScript_0xbd606:
- trainerclassname GRUNTM, $1
- jump UnknownScript_0xbd630
-
-UnknownScript_0xbd60c:
- trainerclassname TEACHER, $1
- jump UnknownScript_0xbd630
-
-UnknownScript_0xbd612:
- trainerclassname SWIMMERF, $1
- jump UnknownScript_0xbd630
-
-UnknownScript_0xbd618:
- trainerclassname KIMONO_GIRL, $1
- jump UnknownScript_0xbd630
-
-UnknownScript_0xbd61e:
- trainerclassname SKIER, $1
- jump UnknownScript_0xbd630
-
-UnknownScript_0xbd624:
- trainerclassname MEDIUM, $1
- jump UnknownScript_0xbd630
-
-UnknownScript_0xbd62a:
- trainerclassname POKEFANM, $1
- jump UnknownScript_0xbd630
-
-UnknownScript_0xbd630:
- farjump UnknownScript_0xa06da
-
-; Anthony
-
-AnthonyPhoneScript1:
- trainertotext HIKER, ANTHONY2, $0
- checkflag ENGINE_ANTHONY
- iftrue UnknownScript_0xbd65d
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_ANTHONY_FRIDAY_NIGHT
- iftrue UnknownScript_0xbd653
- checkcode VAR_WEEKDAY
- if_not_equal FRIDAY, UnknownScript_0xbd653
- checknite
- iftrue UnknownScript_0xbd699
-
-UnknownScript_0xbd653:
- checkflag ENGINE_DUNSPARCE_SWARM
- iftrue UnknownScript_0xbd664
- farjump UnknownScript_0xa0950
-
-UnknownScript_0xbd65d:
- landmarktotext ROUTE_33, $2
- farjump UnknownScript_0xa0a5f
-
-UnknownScript_0xbd664:
- landmarktotext ROUTE_33, $2
- farjump UnknownScript_0xa0afa
-
-AnthonyPhoneScript2:
- trainertotext HIKER, ANTHONY2, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_FLYPOINT_GOLDENROD
- iffalse UnknownScript_0xbd68d
- checkflag ENGINE_ANTHONY
- iftrue UnknownScript_0xbd68d
- checkflag ENGINE_ANTHONY_FRIDAY_NIGHT
- iftrue UnknownScript_0xbd68d
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd69c
-
-UnknownScript_0xbd68d:
- farscall PhoneScript_Random5
- if_equal $0, UnknownScript_0xbd6a6
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbd699:
- setflag ENGINE_ANTHONY_FRIDAY_NIGHT
-
-UnknownScript_0xbd69c:
- landmarktotext ROUTE_33, $2
- setflag ENGINE_ANTHONY
- farjump UnknownScript_0xa0376
-
-UnknownScript_0xbd6a6:
- checkflag ENGINE_DUNSPARCE_SWARM
- iftrue UnknownScript_0xbd6bd
- setflag ENGINE_DUNSPARCE_SWARM
- pokenamemem DUNSPARCE, $1
- swarm SWARM_DUNSPARCE, DARK_CAVE_VIOLET_ENTRANCE
- landmarktotext DARK_CAVE, $2
- farjump UnknownScript_0xa05de
-
-UnknownScript_0xbd6bd:
- farjump UnknownScript_0xa0000
-
-; Todd
-
-ToddPhoneScript1:
- trainertotext CAMPER, TODD1, $0
- checkflag ENGINE_TODD
- iftrue UnknownScript_0xbd6ea
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_TODD_SATURDAY_MORNING
- iftrue UnknownScript_0xbd6e0
- checkcode VAR_WEEKDAY
- if_not_equal SATURDAY, UnknownScript_0xbd6e0
- checkmorn
- iftrue UnknownScript_0xbd72b
-
-UnknownScript_0xbd6e0:
- checkflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
- iftrue UnknownScript_0xbd6f1
- farjump UnknownScript_0xa0958
-
-UnknownScript_0xbd6ea:
- landmarktotext ROUTE_34, $2
- farjump UnknownScript_0xa0a64
-
-UnknownScript_0xbd6f1:
- farjump UnknownScript_0xa0b04
-
-ToddPhoneScript2:
- trainertotext CAMPER, TODD1, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_TODD
- iftrue UnknownScript_0xbd717
- checkflag ENGINE_TODD_SATURDAY_MORNING
- iftrue UnknownScript_0xbd717
- checkflag ENGINE_FLYPOINT_GOLDENROD
- iffalse UnknownScript_0xbd71f
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd72e
-
-UnknownScript_0xbd717:
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd73c
-
-UnknownScript_0xbd71f:
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd738
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbd72b:
- setflag ENGINE_TODD_SATURDAY_MORNING
-
-UnknownScript_0xbd72e:
- landmarktotext ROUTE_34, $2
- setflag ENGINE_TODD
- farjump UnknownScript_0xa0376
-
-UnknownScript_0xbd738:
- farjump UnknownScript_0xa0584
-
-UnknownScript_0xbd73c:
- setflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
- farjump UnknownScript_0xa0644
-
-; Gina
-
-GinaPhoneScript1:
- trainertotext PICNICKER, GINA1, $0
- checkflag ENGINE_GINA
- iftrue UnknownScript_0xbd776
- farscall PhoneScript_AnswerPhone_Female
- checkflag ENGINE_GINA_SUNDAY_AFTERNOON
- iftrue UnknownScript_0xbd768
- checkflag ENGINE_GINA_HAS_LEAF_STONE
- iftrue UnknownScript_0xbd77d
- checkcode VAR_WEEKDAY
- if_not_equal SUNDAY, UnknownScript_0xbd768
- checkday
- iftrue UnknownScript_0xbd7cc
-
-UnknownScript_0xbd768:
- checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
- iftrue UnknownScript_0xbd772
- farjump UnknownScript_0xa0960
-
-UnknownScript_0xbd772:
- farjump UnknownScript_0xa05c6
-
-UnknownScript_0xbd776:
- landmarktotext ROUTE_34, $2
- farjump UnknownScript_0xa0a69
-
-UnknownScript_0xbd77d:
- landmarktotext ROUTE_34, $2
- farjump UnknownScript_0xa0abd
-
-GinaPhoneScript2:
- trainertotext PICNICKER, GINA1, $0
- farscall PhoneScript_GreetPhone_Female
- checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
- iftrue UnknownScript_0xbd7d9
- checkflag ENGINE_GINA
- iftrue UnknownScript_0xbd7c8
- checkflag ENGINE_GINA_SUNDAY_AFTERNOON
- iftrue UnknownScript_0xbd7c8
- checkflag ENGINE_GINA_HAS_LEAF_STONE
- iftrue UnknownScript_0xbd7c8
- checkevent EVENT_GINA_GAVE_LEAF_STONE
- iftrue UnknownScript_0xbd7b2
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd7dd
-
-UnknownScript_0xbd7b2:
- farscall PhoneScript_Random11
- if_equal $0, UnknownScript_0xbd7dd
- checkflag ENGINE_FLYPOINT_GOLDENROD
- iffalse UnknownScript_0xbd7c8
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd7cf
-
-UnknownScript_0xbd7c8:
- farjump UnknownScript_0xa0017
-
-UnknownScript_0xbd7cc:
- setflag ENGINE_GINA_SUNDAY_AFTERNOON
-
-UnknownScript_0xbd7cf:
- landmarktotext ROUTE_34, $2
- setflag ENGINE_GINA
- farjump UnknownScript_0xa037e
-
-UnknownScript_0xbd7d9:
- farjump UnknownScript_0xa05c6
-
-UnknownScript_0xbd7dd:
- setflag ENGINE_GINA_HAS_LEAF_STONE
- landmarktotext ROUTE_34, $2
- farjump UnknownScript_0xa061e
-
-; Irwin
-
-IrwinPhoneScript1:
- trainertotext JUGGLER, IRWIN1, $0
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
- iftrue UnknownScript_0xbd7f9
- farjump UnknownScript_0xa09c8
-
-UnknownScript_0xbd7f9:
- farjump UnknownScript_0xa05be
-
-IrwinPhoneScript2:
- trainertotext JUGGLER, IRWIN1, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
- iftrue UnknownScript_0xbd80f
- farjump UnknownScript_0xa0848
-
-UnknownScript_0xbd80f:
- farjump UnknownScript_0xa05be
-
-; Arnie
-
-ArniePhoneScript1:
- trainertotext BUG_CATCHER, ARNIE1, $0
- checkflag ENGINE_ARNIE
- iftrue UnknownScript_0xbd83c
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_ARNIE_TUESDAY_MORNING
- iftrue UnknownScript_0xbd832
- checkcode VAR_WEEKDAY
- if_not_equal TUESDAY, UnknownScript_0xbd832
- checkmorn
- iftrue UnknownScript_0xbd87a
-
-UnknownScript_0xbd832:
- checkflag ENGINE_YANMA_SWARM
- iftrue UnknownScript_0xbd843
- farjump UnknownScript_0xa0968
-
-UnknownScript_0xbd83c:
- landmarktotext ROUTE_35, $2
- farjump UnknownScript_0xa0a6e
-
-UnknownScript_0xbd843:
- landmarktotext ROUTE_35, $2
- farjump UnknownScript_0xa0aff
-
-ArniePhoneScript2:
- trainertotext BUG_CATCHER, ARNIE1, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_ARNIE
- iftrue UnknownScript_0xbd866
- checkflag ENGINE_ARNIE_TUESDAY_MORNING
- iftrue UnknownScript_0xbd866
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd87d
-
-UnknownScript_0xbd866:
- farscall PhoneScript_Random5
- if_equal $0, UnknownScript_0xbd887
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd89e
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbd87a:
- setflag ENGINE_ARNIE_TUESDAY_MORNING
-
-UnknownScript_0xbd87d:
- landmarktotext ROUTE_35, $2
- setflag ENGINE_ARNIE
- farjump UnknownScript_0xa0376
-
-UnknownScript_0xbd887: ; start swarm
- checkflag ENGINE_YANMA_SWARM
- iftrue UnknownScript_0xbd8a2
- setflag ENGINE_YANMA_SWARM
- pokenamemem YANMA, $1
- swarm SWARM_YANMA, ROUTE_35
- landmarktotext ROUTE_35, $2
- farjump UnknownScript_0xa05ce
-
-UnknownScript_0xbd89e:
- farjump UnknownScript_0xa0584
-
-UnknownScript_0xbd8a2:
- farjump UnknownScript_0xa0000
-
-; Alan
-
-AlanPhoneScript1:
- trainertotext SCHOOLBOY, ALAN1, $0
- checkflag ENGINE_ALAN
- iftrue UnknownScript_0xbd8cf
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_ALAN_WEDNESDAY_AFTERNOON
- iftrue UnknownScript_0xbd8cb
- checkflag ENGINE_ALAN_HAS_FIRE_STONE
- iftrue UnknownScript_0xbd8d6
- checkcode VAR_WEEKDAY
- if_not_equal WEDNESDAY, UnknownScript_0xbd8cb
- checkday
- iftrue UnknownScript_0xbd919
-
-UnknownScript_0xbd8cb:
- farjump UnknownScript_0xa0970
-
-UnknownScript_0xbd8cf:
- landmarktotext ROUTE_36, $2
- farjump UnknownScript_0xa0a73
-
-UnknownScript_0xbd8d6:
- landmarktotext ROUTE_36, $2
- farjump UnknownScript_0xa0ac5
-
-AlanPhoneScript2:
- trainertotext SCHOOLBOY, ALAN1, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_ALAN
- iftrue UnknownScript_0xbd915
- checkflag ENGINE_ALAN_WEDNESDAY_AFTERNOON
- iftrue UnknownScript_0xbd915
- checkflag ENGINE_ALAN_HAS_FIRE_STONE
- iftrue UnknownScript_0xbd915
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd91c
- checkevent EVENT_ALAN_GAVE_FIRE_STONE
- iftrue UnknownScript_0xbd90d
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd926
-
-UnknownScript_0xbd90d:
- farscall PhoneScript_Random11
- if_equal $0, UnknownScript_0xbd926
-
-UnknownScript_0xbd915:
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbd919:
- setflag ENGINE_ALAN_WEDNESDAY_AFTERNOON
-
-UnknownScript_0xbd91c:
- landmarktotext ROUTE_36, $2
- setflag ENGINE_ALAN
- farjump UnknownScript_0xa0376
-
-UnknownScript_0xbd926:
- setflag ENGINE_ALAN_HAS_FIRE_STONE
- landmarktotext ROUTE_36, $2
- farjump UnknownScript_0xa05e6
-
-; Dana
-
-DanaPhoneScript1:
- trainertotext LASS, DANA1, $0
- checkflag ENGINE_DANA
- iftrue UnknownScript_0xbd959
- farscall PhoneScript_AnswerPhone_Female
- checkflag ENGINE_DANA_THURSDAY_NIGHT
- iftrue UnknownScript_0xbd955
- checkflag ENGINE_DANA_HAS_THUNDERSTONE
- iftrue UnknownScript_0xbd960
- checkcode VAR_WEEKDAY
- if_not_equal THURSDAY, UnknownScript_0xbd955
- checknite
- iftrue UnknownScript_0xbd9ab
-
-UnknownScript_0xbd955:
- farjump UnknownScript_0xa0978
-
-UnknownScript_0xbd959:
- landmarktotext ROUTE_38, $2
- farjump UnknownScript_0xa0a78
-
-UnknownScript_0xbd960:
- landmarktotext ROUTE_38, $2
- farjump UnknownScript_0xa0acd
-
-DanaPhoneScript2:
- trainertotext LASS, DANA1, $0
- farscall PhoneScript_GreetPhone_Female
- checkflag ENGINE_DANA
- iftrue UnknownScript_0xbd99f
- checkflag ENGINE_DANA_THURSDAY_NIGHT
- iftrue UnknownScript_0xbd99f
- checkflag ENGINE_DANA_HAS_THUNDERSTONE
- iftrue UnknownScript_0xbd99f
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd9ae
- checkevent EVENT_DANA_GAVE_THUNDERSTONE
- iftrue UnknownScript_0xbd997
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbd9bc
-
-UnknownScript_0xbd997:
- farscall PhoneScript_Random11
- if_equal $0, UnknownScript_0xbd9bc
-
-UnknownScript_0xbd99f:
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbd9b8
- farjump UnknownScript_0xa0017
-
-UnknownScript_0xbd9ab:
- setflag ENGINE_DANA_THURSDAY_NIGHT
-
-UnknownScript_0xbd9ae:
- landmarktotext ROUTE_38, $2
- setflag ENGINE_DANA
- farjump UnknownScript_0xa037e
-
-UnknownScript_0xbd9b8:
- farjump UnknownScript_0xa0592
-
-UnknownScript_0xbd9bc:
- setflag ENGINE_DANA_HAS_THUNDERSTONE
- landmarktotext ROUTE_38, $2
- farjump UnknownScript_0xa061e
-
-; Chad
-
-ChadPhoneScript1:
- trainertotext SCHOOLBOY, CHAD1, $0
- checkflag ENGINE_CHAD
- iftrue UnknownScript_0xbd9e9
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_CHAD_FRIDAY_MORNING
- iftrue UnknownScript_0xbd9e5
- checkcode VAR_WEEKDAY
- if_not_equal FRIDAY, UnknownScript_0xbd9e5
- checkmorn
- iftrue UnknownScript_0xbda20
-
-UnknownScript_0xbd9e5:
- farjump UnknownScript_0xa0980
-
-UnknownScript_0xbd9e9:
- landmarktotext ROUTE_38, $2
- farjump UnknownScript_0xa0a7d
-
-ChadPhoneScript2:
- trainertotext SCHOOLBOY, CHAD1, $0
- farscall PhoneScript_GreetPhone_Male
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbda31
- checkflag ENGINE_CHAD
- iftrue UnknownScript_0xbda14
- checkflag ENGINE_CHAD_FRIDAY_MORNING
- iftrue UnknownScript_0xbda14
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbda23
-
-UnknownScript_0xbda14:
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbda2d
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbda20:
- setflag ENGINE_CHAD_FRIDAY_MORNING
-
-UnknownScript_0xbda23:
- landmarktotext ROUTE_38, $2
- setflag ENGINE_CHAD
- farjump UnknownScript_0xa0376
-
-UnknownScript_0xbda2d:
- farjump UnknownScript_0xa0584
-
-UnknownScript_0xbda31:
- farjump UnknownScript_0xa0754
-
-DerekPhoneScript1:
- trainertotext POKEFANM, DEREK1, $0
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_DEREK_HAS_NUGGET
- iftrue UnknownScript_0xbda67
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbda5f
- checkflag ENGINE_DAILY_BUG_CONTEST
- iftrue UnknownScript_0xbda5f
- checkcode VAR_WEEKDAY
- if_equal TUESDAY, UnknownScript_0xbda63
- if_equal THURSDAY, UnknownScript_0xbda63
- if_equal SATURDAY, UnknownScript_0xbda63
-
-UnknownScript_0xbda5f:
- farjump UnknownScript_0xa0988
-
-UnknownScript_0xbda63:
- farjump UnknownScript_0xa05a4
-
-UnknownScript_0xbda67:
- landmarktotext ROUTE_39, $2
- farjump UnknownScript_0xa0ad5
-
-DerekPhoneScript2:
- trainertotext POKEFANM, DEREK1, $0
- farscall PhoneScript_GreetPhone_Male
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbda92
- checkflag ENGINE_DAILY_BUG_CONTEST
- iftrue UnknownScript_0xbda92
- checkcode VAR_WEEKDAY
- if_equal TUESDAY, UnknownScript_0xbda9e
- if_equal THURSDAY, UnknownScript_0xbda9e
- if_equal SATURDAY, UnknownScript_0xbda9e
-
-UnknownScript_0xbda92:
- farscall PhoneScript_Random4
- if_equal $0, UnknownScript_0xbdaa2
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbda9e:
- farjump UnknownScript_0xa05a4
-
-UnknownScript_0xbdaa2:
- setflag ENGINE_DEREK_HAS_NUGGET
- landmarktotext ROUTE_39, $2
- farjump UnknownScript_0xa05e6
-
-TullyPhoneScript1:
- trainertotext FISHER, TULLY1, $0
- checkflag ENGINE_TULLY
- iftrue UnknownScript_0xbdad5
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_TULLY_SUNDAY_NIGHT
- iftrue UnknownScript_0xbdad1
- checkflag ENGINE_TULLY_HAS_WATER_STONE
- iftrue UnknownScript_0xbdadc
- checkcode VAR_WEEKDAY
- if_not_equal SUNDAY, UnknownScript_0xbdad1
- checknite
- iftrue UnknownScript_0xbdb1f
-
-UnknownScript_0xbdad1:
- farjump UnknownScript_0xa0990
-
-UnknownScript_0xbdad5:
- landmarktotext ROUTE_42, $2
- farjump UnknownScript_0xa0a82
-
-UnknownScript_0xbdadc:
- landmarktotext ROUTE_42, $2
- farjump UnknownScript_0xa0add
-
-TullyPhoneScript2:
- trainertotext FISHER, TULLY1, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_TULLY
- iftrue UnknownScript_0xbdb1b
- checkflag ENGINE_TULLY_SUNDAY_NIGHT
- iftrue UnknownScript_0xbdb1b
- checkflag ENGINE_TULLY_HAS_WATER_STONE
- iftrue UnknownScript_0xbdb1b
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbdb22
- checkevent EVENT_TULLY_GAVE_WATER_STONE
- iftrue UnknownScript_0xbdb13
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbdb2c
-
-UnknownScript_0xbdb13:
- farscall PhoneScript_Random11
- if_equal $0, UnknownScript_0xbdb2c
-
-UnknownScript_0xbdb1b:
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbdb1f:
- setflag ENGINE_TULLY_SUNDAY_NIGHT
-
-UnknownScript_0xbdb22:
- landmarktotext ROUTE_42, $2
- setflag ENGINE_TULLY
- farjump UnknownScript_0xa0376
-
-UnknownScript_0xbdb2c:
- setflag ENGINE_TULLY_HAS_WATER_STONE
- landmarktotext ROUTE_42, $2
- farjump UnknownScript_0xa05e6
-
-BrentPhoneScript1:
- trainertotext POKEMANIAC, BRENT1, $0
- checkflag ENGINE_BRENT
- iftrue UnknownScript_0xbdb59
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_BRENT_MONDAY_MORNING
- iftrue UnknownScript_0xbdb55
- checkcode VAR_WEEKDAY
- if_not_equal MONDAY, UnknownScript_0xbdb55
- checkmorn
- iftrue UnknownScript_0xbdb88
-
-UnknownScript_0xbdb55:
- farjump UnknownScript_0xa0998
-
-UnknownScript_0xbdb59:
- landmarktotext ROUTE_43, $2
- farjump UnknownScript_0xa0a87
-
-BrentPhoneScript2:
- trainertotext POKEMANIAC, BRENT1, $0
- farscall PhoneScript_GreetPhone_Male
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbdb95
- checkflag ENGINE_BRENT
- iftrue UnknownScript_0xbdb84
- checkflag ENGINE_BRENT_MONDAY_MORNING
- iftrue UnknownScript_0xbdb84
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbdb8b
-
-UnknownScript_0xbdb84:
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbdb88:
- setflag ENGINE_BRENT_MONDAY_MORNING
-
-UnknownScript_0xbdb8b:
- landmarktotext ROUTE_43, $2
- setflag ENGINE_BRENT
- farjump UnknownScript_0xa0376
-
-UnknownScript_0xbdb95:
- farjump UnknownScript_0xa07ce
-
-TiffanyPhoneScript1:
- trainertotext PICNICKER, TIFFANY3, $0
- checkflag ENGINE_TIFFANY
- iftrue UnknownScript_0xbdbc2
- farscall PhoneScript_AnswerPhone_Female
- checkflag ENGINE_TIFFANY_TUESDAY_AFTERNOON
- iftrue UnknownScript_0xbdbbe
- checkflag ENGINE_TIFFANY_HAS_PINK_BOW
- iftrue UnknownScript_0xbdbc9
- checkcode VAR_WEEKDAY
- if_not_equal TUESDAY, UnknownScript_0xbdbbe
- checkday
- iftrue UnknownScript_0xbdc14
-
-UnknownScript_0xbdbbe:
- farjump UnknownScript_0xa09a0
-
-UnknownScript_0xbdbc2:
- landmarktotext ROUTE_43, $2
- farjump UnknownScript_0xa0a8c
-
-UnknownScript_0xbdbc9:
- landmarktotext ROUTE_43, $2
- farjump UnknownScript_0xa0ae5
-
-TiffanyPhoneScript2:
- trainertotext PICNICKER, TIFFANY3, $0
- farscall PhoneScript_Random4
- if_equal $0, UnknownScript_0xbdc21
- farscall PhoneScript_GreetPhone_Female
- checkflag ENGINE_TIFFANY
- iftrue UnknownScript_0xbdc10
- checkflag ENGINE_TIFFANY_TUESDAY_AFTERNOON
- iftrue UnknownScript_0xbdc10
- checkflag ENGINE_TIFFANY_HAS_PINK_BOW
- iftrue UnknownScript_0xbdc10
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbdc17
- checkevent EVENT_TIFFANY_GAVE_PINK_BOW
- iftrue UnknownScript_0xbdc08
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbdc69
-
-UnknownScript_0xbdc08:
- farscall PhoneScript_Random11
- if_equal $0, UnknownScript_0xbdc69
-
-UnknownScript_0xbdc10:
- farjump UnknownScript_0xa0017
-
-UnknownScript_0xbdc14:
- setflag ENGINE_TIFFANY_TUESDAY_AFTERNOON
-
-UnknownScript_0xbdc17:
- landmarktotext ROUTE_43, $2
- setflag ENGINE_TIFFANY
- farjump UnknownScript_0xa037e
-
-UnknownScript_0xbdc21:
- random $6
- if_equal $0, UnknownScript_0xbdc3b
- if_equal $1, UnknownScript_0xbdc42
- if_equal $2, UnknownScript_0xbdc49
- if_equal $3, UnknownScript_0xbdc50
- if_equal $4, UnknownScript_0xbdc57
- if_equal $5, UnknownScript_0xbdc5e
-
-UnknownScript_0xbdc3b:
- stringtotext String_be643, $1
- jump UnknownScript_0xbdc65
-
-UnknownScript_0xbdc42:
- stringtotext String_be64b, $1
- jump UnknownScript_0xbdc65
-
-UnknownScript_0xbdc49:
- stringtotext String_be653, $1
- jump UnknownScript_0xbdc65
-
-UnknownScript_0xbdc50:
- stringtotext String_be657, $1
- jump UnknownScript_0xbdc65
-
-UnknownScript_0xbdc57:
- stringtotext String_be65b, $1
- jump UnknownScript_0xbdc65
-
-UnknownScript_0xbdc5e:
- stringtotext String_be662, $1
- jump UnknownScript_0xbdc65
-
-UnknownScript_0xbdc65:
- farjump UnknownScript_0xa047f
-
-UnknownScript_0xbdc69:
- setflag ENGINE_TIFFANY_HAS_PINK_BOW
- landmarktotext ROUTE_43, $2
- farjump UnknownScript_0xa061e
-
-; Vance
-
-VancePhoneScript1:
- trainertotext BIRD_KEEPER, VANCE1, $0
- checkflag ENGINE_VANCE
- iftrue UnknownScript_0xbdc96
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_VANCE_WEDNESDAY_NIGHT
- iftrue UnknownScript_0xbdc92
- checkcode VAR_WEEKDAY
- if_not_equal WEDNESDAY, UnknownScript_0xbdc92
- checknite
- iftrue UnknownScript_0xbdcc1
-
-UnknownScript_0xbdc92:
- farjump UnknownScript_0xa09a8
-
-UnknownScript_0xbdc96:
- landmarktotext ROUTE_44, $2
- farjump UnknownScript_0xa0a91
-
-VancePhoneScript2:
- trainertotext BIRD_KEEPER, VANCE1, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_VANCE
- iftrue UnknownScript_0xbdcbd
- checkflag ENGINE_VANCE_WEDNESDAY_NIGHT
- iftrue UnknownScript_0xbdcbd
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbdcc4
- if_equal $1, UnknownScript_0xbdcc4
-
-UnknownScript_0xbdcbd:
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbdcc1:
- setflag ENGINE_VANCE_WEDNESDAY_NIGHT
-
-UnknownScript_0xbdcc4:
- landmarktotext ROUTE_44, $2
- setflag ENGINE_VANCE
- farjump UnknownScript_0xa0376
-
-WiltonPhoneScript1:
- trainertotext FISHER, WILTON1, $0
- checkflag ENGINE_WILTON
- iftrue UnknownScript_0xbdcf7
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_WILTON_THRUSDAY_MORNING
- iftrue UnknownScript_0xbdcf3
- checkflag ENGINE_WILTON_HAS_ITEM
- iftrue UnknownScript_0xbdcfe
- checkcode VAR_WEEKDAY
- if_not_equal THURSDAY, UnknownScript_0xbdcf3
- checkmorn
- iftrue UnknownScript_0xbdd33
-
-UnknownScript_0xbdcf3:
- farjump UnknownScript_0xa09b0
-
-UnknownScript_0xbdcf7:
- landmarktotext ROUTE_44, $2
- farjump UnknownScript_0xa0a96
-
-UnknownScript_0xbdcfe:
- landmarktotext ROUTE_44, $2
- farjump UnknownScript_0xa0aed
-
-WiltonPhoneScript2:
- trainertotext FISHER, WILTON1, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_WILTON
- iftrue UnknownScript_0xbdd2f
- checkflag ENGINE_WILTON_THRUSDAY_MORNING
- iftrue UnknownScript_0xbdd2f
- checkflag ENGINE_WILTON_HAS_ITEM
- iftrue UnknownScript_0xbdd2f
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbdd36
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbdd40
-
-UnknownScript_0xbdd2f:
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbdd33:
- setflag ENGINE_WILTON_THRUSDAY_MORNING
-
-UnknownScript_0xbdd36:
- landmarktotext ROUTE_44, $2
- setflag ENGINE_WILTON
- farjump UnknownScript_0xa0376
-
-UnknownScript_0xbdd40:
- setflag ENGINE_WILTON_HAS_ITEM
- landmarktotext ROUTE_44, $2
- clearevent EVENT_WILTON_HAS_ULTRA_BALL
- clearevent EVENT_WILTON_HAS_GREAT_BALL
- clearevent EVENT_WILTON_HAS_POKE_BALL
- random $5
- if_equal $0, UnknownScript_0xbdd5e
- random $3
- if_equal $0, UnknownScript_0xbdd64
- jump UnknownScript_0xbdd6a
-
-UnknownScript_0xbdd5e:
- setevent EVENT_WILTON_HAS_ULTRA_BALL
- jump UnknownScript_0xbdd6d
-
-UnknownScript_0xbdd64:
- setevent EVENT_WILTON_HAS_GREAT_BALL
- jump UnknownScript_0xbdd6d
-
-UnknownScript_0xbdd6a:
- setevent EVENT_WILTON_HAS_POKE_BALL
-
-UnknownScript_0xbdd6d:
- farjump UnknownScript_0xa05e6
-
-; Kenji
-
-KenjiPhoneScript1:
- trainertotext BLACKBELT_T, KENJI3, $0
- farscall PhoneScript_AnswerPhone_Male
- farjump UnknownScript_0xa09ee
-
-KenjiPhoneScript2:
- trainertotext BLACKBELT_T, KENJI3, $0
- farscall PhoneScript_GreetPhone_Male
- farjump UnknownScript_0xa064c
-
-; Parry
-
-ParryPhoneScript1:
- trainertotext HIKER, PARRY1, $0
- checkflag ENGINE_PARRY
- iftrue UnknownScript_0xbddac
- farscall PhoneScript_AnswerPhone_Male
- checkflag ENGINE_PARRY_FRIDAY_AFTERNOON
- iftrue UnknownScript_0xbdda8
- checkcode VAR_WEEKDAY
- if_not_equal FRIDAY, UnknownScript_0xbdda8
- checkday
- iftrue UnknownScript_0xbddd7
-
-UnknownScript_0xbdda8:
- farjump UnknownScript_0xa09b8
-
-UnknownScript_0xbddac:
- landmarktotext ROUTE_45, $2
- farjump UnknownScript_0xa0a9b
-
-ParryPhoneScript2:
- trainertotext HIKER, PARRY1, $0
- farscall PhoneScript_GreetPhone_Male
- checkflag ENGINE_PARRY
- iftrue UnknownScript_0xbddd3
- checkflag ENGINE_PARRY_FRIDAY_AFTERNOON
- iftrue UnknownScript_0xbddd3
- farscall PhoneScript_Random2
- if_equal $0, UnknownScript_0xbddda
- if_equal $1, UnknownScript_0xbddda
-
-UnknownScript_0xbddd3:
- farjump UnknownScript_0xa0000
-
-UnknownScript_0xbddd7:
- setflag ENGINE_PARRY_FRIDAY_AFTERNOON
-
-UnknownScript_0xbddda:
- landmarktotext ROUTE_45, $2
- setflag ENGINE_PARRY
- farjump UnknownScript_0xa0376
-
-; Erin
-
-ErinPhoneScript1:
- trainertotext PICNICKER, ERIN1, $0
- checkflag ENGINE_ERIN
- iftrue UnknownScript_0xbde07
- farscall PhoneScript_AnswerPhone_Female
- checkflag ENGINE_ERIN_SATURDAY_NIGHT
- iftrue UnknownScript_0xbde03
- checkcode VAR_WEEKDAY
- if_not_equal SATURDAY, UnknownScript_0xbde03
- checknite
- iftrue UnknownScript_0xbde32
-
-UnknownScript_0xbde03:
- farjump UnknownScript_0xa09c0
-
-UnknownScript_0xbde07:
- landmarktotext ROUTE_46, $2
- farjump UnknownScript_0xa0aa0
-
-ErinPhoneScript2:
- trainertotext PICNICKER, ERIN1, $0
- farscall PhoneScript_GreetPhone_Female
- checkflag ENGINE_ERIN
- iftrue UnknownScript_0xbde2e
- checkflag ENGINE_ERIN_SATURDAY_NIGHT
- iftrue UnknownScript_0xbde2e
- farscall PhoneScript_Random3
- if_equal $0, UnknownScript_0xbde35
- if_equal $1, UnknownScript_0xbde35
-
-UnknownScript_0xbde2e:
- farjump UnknownScript_0xa0017
-
-UnknownScript_0xbde32:
- setflag ENGINE_ERIN_SATURDAY_NIGHT
-
-UnknownScript_0xbde35:
- landmarktotext ROUTE_46, $2
- setflag ENGINE_ERIN
- farjump UnknownScript_0xa037e
-
-PhoneScript_Random2:
- random 2
- end
-
-PhoneScript_Random3:
- random 3
- end
-
-PhoneScript_Random4:
- random 4
- end
-
-PhoneScript_Random5:
- random 5
- end
-
-PhoneScript_Random11:
- random 11
- end
-
-PhoneScript_AnswerPhone_Male:
- checkday
- iftrue PhoneScript_AnswerPhone_Male_Day
- checknite
- iftrue PhoneScript_AnswerPhone_Male_Nite
- checkcode VAR_CALLERID
- if_equal PHONE_SCHOOLBOY_JACK, .Jack
- if_equal PHONE_SAILOR_HUEY, .Huey
- if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
- if_equal PHONE_BIRDKEEPER_JOSE, .Jose
- if_equal PHONE_YOUNGSTER_JOEY, .Joey
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_FISHER_RALPH, .Ralph
- if_equal PHONE_HIKER_ANTHONY, .Anthony
- if_equal PHONE_CAMPER_TODD, .Todd
- if_equal PHONE_JUGGLER_IRWIN, .Irwin
- if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
- if_equal PHONE_SCHOOLBOY_ALAN, .Alan
- if_equal PHONE_SCHOOLBOY_CHAD, .Chad
- if_equal PHONE_POKEFANM_DEREK, .Derek
- if_equal PHONE_FISHER_TULLY, .Tully
- if_equal PHONE_POKEMANIAC_BRENT, .Brent
- if_equal PHONE_BIRDKEEPER_VANCE, .Vance
- if_equal PHONE_FISHER_WILTON, .Wilton
- if_equal PHONE_BLACKBELT_KENJI, .Kenji
- if_equal PHONE_HIKER_PARRY, .Parry
-
-.Jack:
- farwritetext UnknownText_0x1b4dc5
- buttonsound
- end
-
-.Huey:
- farwritetext UnknownText_0x1b5073
- buttonsound
- end
-
-.Gaven:
- farwritetext UnknownText_0x1b5270
- buttonsound
- end
-
-.Jose:
- farwritetext UnknownText_0x1b55ae
- buttonsound
- end
-
-.Joey:
- farwritetext UnknownText_0x1b589a
- buttonsound
- end
-
-.Wade:
- farwritetext UnknownText_0x1b5a3b
- buttonsound
- end
-
-.Ralph:
- farwritetext UnknownText_0x1b5c10
- buttonsound
- end
-
-.Anthony:
- farwritetext UnknownText_0x1b5f7a
- buttonsound
- end
-
-.Todd:
- farwritetext UnknownText_0x1b60f5
- buttonsound
- end
-
-.Irwin:
- farwritetext UnknownText_0x1b638c
- buttonsound
- end
-
-.Arnie:
- farwritetext UnknownText_0x1b6454
- buttonsound
- end
-
-.Alan:
- farwritetext UnknownText_0x1b659d
- buttonsound
- end
-
-.Chad:
- farwritetext UnknownText_0x1b67e2
- buttonsound
- end
-
-.Derek:
- farwritetext UnknownText_0x1b69a8
- buttonsound
- end
-
-.Tully:
- farwritetext UnknownText_0x1b6b39
- buttonsound
- end
-
-.Brent:
- farwritetext UnknownText_0x1b6c96
- buttonsound
- end
-
-.Vance:
- farwritetext UnknownText_0x1b7019
- buttonsound
- end
-
-.Wilton:
- farwritetext UnknownText_0x1b71d5
- buttonsound
- end
-
-.Kenji:
- farwritetext UnknownText_0x1b730b
- buttonsound
- end
-
-.Parry:
- farwritetext UnknownText_0x1b73c7
- buttonsound
- end
-
-PhoneScript_AnswerPhone_Male_Day:
- checkcode VAR_CALLERID
- if_equal PHONE_SCHOOLBOY_JACK, .Jack
- if_equal PHONE_SAILOR_HUEY, .Huey
- if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
- if_equal PHONE_BIRDKEEPER_JOSE, .Jose
- if_equal PHONE_YOUNGSTER_JOEY, .Joey
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_FISHER_RALPH, .Ralph
- if_equal PHONE_HIKER_ANTHONY, .Anthony
- if_equal PHONE_CAMPER_TODD, .Todd
- if_equal PHONE_JUGGLER_IRWIN, .Irwin
- if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
- if_equal PHONE_SCHOOLBOY_ALAN, .Alan
- if_equal PHONE_SCHOOLBOY_CHAD, .Chad
- if_equal PHONE_POKEFANM_DEREK, .Derek
- if_equal PHONE_FISHER_TULLY, .Tully
- if_equal PHONE_POKEMANIAC_BRENT, .Brent
- if_equal PHONE_BIRDKEEPER_VANCE, .Vance
- if_equal PHONE_FISHER_WILTON, .Wilton
- if_equal PHONE_BLACKBELT_KENJI, .Kenji
- if_equal PHONE_HIKER_PARRY, .Parry
-
-.Jack:
- farwritetext UnknownText_0x1b4ded
- buttonsound
- end
-
-.Huey:
- farwritetext UnknownText_0x1b509b
- buttonsound
- end
-
-.Gaven:
- farwritetext UnknownText_0x1b52a5
- buttonsound
- end
-
-.Jose:
- farwritetext UnknownText_0x1b55da
- buttonsound
- end
-
-.Joey:
- farwritetext UnknownText_0x1b58c2
- buttonsound
- end
-
-.Wade:
- farwritetext UnknownText_0x1b5a74
- buttonsound
- end
-
-.Ralph:
- farwritetext UnknownText_0x1b5c63
- buttonsound
- end
-
-.Anthony:
- farwritetext UnknownText_0x1b5f9e
- buttonsound
- end
-
-.Todd:
- farwritetext UnknownText_0x1b611b
- buttonsound
- end
-
-.Irwin:
- farwritetext UnknownText_0x1b63a8
- buttonsound
- end
-
-.Arnie:
- farwritetext UnknownText_0x1b647e
- buttonsound
- end
-
-.Alan:
- farwritetext UnknownText_0x1b65c7
- buttonsound
- end
-
-.Chad:
- farwritetext UnknownText_0x1b680e
- buttonsound
- end
-
-.Derek:
- farwritetext UnknownText_0x1b69d2
- buttonsound
- end
-
-.Tully:
- farwritetext UnknownText_0x1b6b65
- buttonsound
- end
-
-.Brent:
- farwritetext UnknownText_0x1b6cc6
- buttonsound
- end
-
-.Vance:
- farwritetext UnknownText_0x1b7057
- buttonsound
- end
-
-.Wilton:
- farwritetext UnknownText_0x1b71fc
- buttonsound
- end
-
-.Kenji:
- farwritetext UnknownText_0x1b7331
- buttonsound
- end
-
-.Parry:
- farwritetext UnknownText_0x1b73ef
- buttonsound
- end
-
-PhoneScript_AnswerPhone_Male_Nite:
- checkcode VAR_CALLERID
- if_equal PHONE_SCHOOLBOY_JACK, .Jack
- if_equal PHONE_SAILOR_HUEY, .Huey
- if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
- if_equal PHONE_BIRDKEEPER_JOSE, .Jose
- if_equal PHONE_YOUNGSTER_JOEY, .Joey
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_FISHER_RALPH, .Ralph
- if_equal PHONE_HIKER_ANTHONY, .Anthony
- if_equal PHONE_CAMPER_TODD, .Todd
- if_equal PHONE_JUGGLER_IRWIN, .Irwin
- if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
- if_equal PHONE_SCHOOLBOY_ALAN, .Alan
- if_equal PHONE_SCHOOLBOY_CHAD, .Chad
- if_equal PHONE_POKEFANM_DEREK, .Derek
- if_equal PHONE_FISHER_TULLY, .Tully
- if_equal PHONE_POKEMANIAC_BRENT, .Brent
- if_equal PHONE_BIRDKEEPER_VANCE, .Vance
- if_equal PHONE_FISHER_WILTON, .Wilton
- if_equal PHONE_BLACKBELT_KENJI, .Kenji
- if_equal PHONE_HIKER_PARRY, .Parry
-
-.Jack:
- farwritetext UnknownText_0x1b4e16
- buttonsound
- end
-
-.Huey:
- farwritetext UnknownText_0x1b50c2
- buttonsound
- end
-
-.Gaven:
- farwritetext UnknownText_0x1b52cc
- buttonsound
- end
-
-.Jose:
- farwritetext UnknownText_0x1b55fc
- buttonsound
- end
-
-.Joey:
- farwritetext UnknownText_0x1b58ea
- buttonsound
- end
-
-.Wade:
- farwritetext UnknownText_0x1b5a9f
- buttonsound
- end
-
-.Ralph:
- farwritetext UnknownText_0x1b5cb6
- buttonsound
- end
-
-.Anthony:
- farwritetext UnknownText_0x1b5fc9
- buttonsound
- end
-
-.Todd:
- farwritetext UnknownText_0x1b6149
- buttonsound
- end
-
-.Irwin:
- farwritetext UnknownText_0x1b63c4
- buttonsound
- end
-
-.Arnie:
- farwritetext UnknownText_0x1b64a8
- buttonsound
- end
-
-.Alan:
- farwritetext UnknownText_0x1b65e3
- buttonsound
- end
-
-.Chad:
- farwritetext UnknownText_0x1b6836
- buttonsound
- end
-
-.Derek:
- farwritetext UnknownText_0x1b69f8
- buttonsound
- end
-
-.Tully:
- farwritetext UnknownText_0x1b6b92
- buttonsound
- end
-
-.Brent:
- farwritetext UnknownText_0x1b6cf6
- buttonsound
- end
-
-.Vance:
- farwritetext UnknownText_0x1b7092
- buttonsound
- end
-
-.Wilton:
- farwritetext UnknownText_0x1b722a
- buttonsound
- end
-
-.Kenji:
- farwritetext UnknownText_0x1b7357
- buttonsound
- end
-
-.Parry:
- farwritetext UnknownText_0x1b7417
- buttonsound
- end
-
-PhoneScript_AnswerPhone_Female:
- checkday
- iftrue PhoneScript_AnswerPhone_Female_Day
- checknite
- iftrue PhoneScript_AnswerPhone_Female_Nite
- checkcode VAR_CALLERID
- if_equal PHONE_POKEFAN_BEVERLY, .Beverly
- if_equal PHONE_COOLTRAINERF_BETH, .Beth
- if_equal PHONE_COOLTRAINERF_REENA, .Reena
- if_equal PHONE_PICNICKER_LIZ, .Liz
- if_equal PHONE_PICNICKER_GINA, .Gina
- if_equal PHONE_LASS_DANA, .Dana
- if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
- if_equal PHONE_PICNICKER_ERIN, .Erin
-
-.Beverly:
- farwritetext UnknownText_0x1b4f21
- buttonsound
- end
-
-.Beth:
- farwritetext UnknownText_0x1b53f7
- buttonsound
- end
-
-.Reena:
- farwritetext UnknownText_0x1b5702
- buttonsound
- end
-
-.Liz:
- farwritetext UnknownText_0x1b5d9f
- buttonsound
- end
-
-.Gina:
- farwritetext UnknownText_0x1b626a
- buttonsound
- end
-
-.Dana:
- farwritetext UnknownText_0x1b66c8
- buttonsound
- end
-
-.Tiffany:
- farwritetext UnknownText_0x1b6e7c
- buttonsound
- end
-
-.Erin:
- farwritetext UnknownText_0x1b751a
- buttonsound
- end
-
-PhoneScript_AnswerPhone_Female_Day:
- checkcode VAR_CALLERID
- if_equal PHONE_POKEFAN_BEVERLY, .Beverly
- if_equal PHONE_COOLTRAINERF_BETH, .Beth
- if_equal PHONE_COOLTRAINERF_REENA, .Reena
- if_equal PHONE_PICNICKER_LIZ, .Liz
- if_equal PHONE_PICNICKER_GINA, .Gina
- if_equal PHONE_LASS_DANA, .Dana
- if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
- if_equal PHONE_PICNICKER_ERIN, .Erin
-
-.Beverly:
- farwritetext UnknownText_0x1b4f4d
- buttonsound
- end
-
-.Beth:
- farwritetext UnknownText_0x1b5424
- buttonsound
- end
-
-.Reena:
- farwritetext UnknownText_0x1b572e
- buttonsound
- end
-
-.Liz:
- farwritetext UnknownText_0x1b5dcc
- buttonsound
- end
-
-.Gina:
- farwritetext UnknownText_0x1b6296
- buttonsound
- end
-
-.Dana:
- farwritetext UnknownText_0x1b66ec
- buttonsound
- end
-
-.Tiffany:
- farwritetext UnknownText_0x1b6ea6
- buttonsound
- end
-
-.Erin:
- farwritetext UnknownText_0x1b7548
- buttonsound
- end
-
-PhoneScript_AnswerPhone_Female_Nite:
- checkcode VAR_CALLERID
- if_equal PHONE_POKEFAN_BEVERLY, .Beverly
- if_equal PHONE_COOLTRAINERF_BETH, .Beth
- if_equal PHONE_COOLTRAINERF_REENA, .Reena
- if_equal PHONE_PICNICKER_LIZ, .Liz
- if_equal PHONE_PICNICKER_GINA, .Gina
- if_equal PHONE_LASS_DANA, .Dana
- if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
- if_equal PHONE_PICNICKER_ERIN, .Erin
-
-.Beverly:
- farwritetext UnknownText_0x1b4f75
- buttonsound
- end
-
-.Beth:
- farwritetext UnknownText_0x1b5446
- buttonsound
- end
-
-.Reena:
- farwritetext UnknownText_0x1b575a
- buttonsound
- end
-
-.Liz:
- farwritetext UnknownText_0x1b5df8
- buttonsound
- end
-
-.Gina:
- farwritetext UnknownText_0x1b62c5
- buttonsound
- end
-
-.Dana:
- farwritetext UnknownText_0x1b6713
- buttonsound
- end
-
-.Tiffany:
- farwritetext UnknownText_0x1b6ec9
- buttonsound
- end
-
-.Erin:
- farwritetext UnknownText_0x1b756f
- buttonsound
- end
-
-PhoneScript_GreetPhone_Male:
- checkday
- iftrue PhoneScript_GreetPhone_Male_Day
- checknite
- iftrue PhoneScript_GreetPhone_Male_Nite
- checkcode VAR_CALLERID
- if_equal PHONE_SCHOOLBOY_JACK, .Jack
- if_equal PHONE_SAILOR_HUEY, .Huey
- if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
- if_equal PHONE_BIRDKEEPER_JOSE, .Jose
- if_equal PHONE_YOUNGSTER_JOEY, .Joey
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_FISHER_RALPH, .Ralph
- if_equal PHONE_HIKER_ANTHONY, .Anthony
- if_equal PHONE_CAMPER_TODD, .Todd
- if_equal PHONE_JUGGLER_IRWIN, .Irwin
- if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
- if_equal PHONE_SCHOOLBOY_ALAN, .Alan
- if_equal PHONE_SCHOOLBOY_CHAD, .Chad
- if_equal PHONE_POKEFANM_DEREK, .Derek
- if_equal PHONE_FISHER_TULLY, .Tully
- if_equal PHONE_POKEMANIAC_BRENT, .Brent
- if_equal PHONE_BIRDKEEPER_VANCE, .Vance
- if_equal PHONE_FISHER_WILTON, .Wilton
- if_equal PHONE_BLACKBELT_KENJI, .Kenji
- if_equal PHONE_HIKER_PARRY, .Parry
-
-.Jack:
- farwritetext UnknownText_0x1b4e3e
- buttonsound
- end
-
-.Huey:
- farwritetext UnknownText_0x1b50e9
- buttonsound
- end
-
-.Gaven:
- farwritetext UnknownText_0x1b5301
- buttonsound
- end
-
-.Jose:
- farwritetext UnknownText_0x1b5628
- buttonsound
- end
-
-.Joey:
- farwritetext UnknownText_0x1b5912
- buttonsound
- end
-
-.Wade:
- farwritetext UnknownText_0x1b5ad8
- buttonsound
- end
-
-.Ralph:
- farwritetext UnknownText_0x1b5d09
- buttonsound
- end
-
-.Anthony:
- farwritetext UnknownText_0x1b5ff6
- buttonsound
- end
-
-.Todd:
- farwritetext UnknownText_0x1b616e
- buttonsound
- end
-
-.Irwin:
- farwritetext UnknownText_0x1b63e3
- buttonsound
- end
-
-.Arnie:
- farwritetext UnknownText_0x1b64d2
- buttonsound
- end
-
-.Alan:
- farwritetext UnknownText_0x1b660d
- buttonsound
- end
-
-.Chad:
- farwritetext UnknownText_0x1b6862
- buttonsound
- end
-
-.Derek:
- farwritetext UnknownText_0x1b6a22
- buttonsound
- end
-
-.Tully:
- farwritetext UnknownText_0x1b6bb9
- buttonsound
- end
-
-.Brent:
- farwritetext UnknownText_0x1b6d26
- buttonsound
- end
-
-.Vance:
- farwritetext UnknownText_0x1b70e7
- buttonsound
- end
-
-.Wilton:
- farwritetext UnknownText_0x1b725c
- buttonsound
- end
-
-.Kenji:
- farwritetext UnknownText_0x1b737f
- buttonsound
- end
-
-.Parry:
- farwritetext UnknownText_0x1b743f
- buttonsound
- end
-
-PhoneScript_GreetPhone_Male_Day:
- checkcode VAR_CALLERID
- if_equal PHONE_SCHOOLBOY_JACK, .Jack
- if_equal PHONE_SAILOR_HUEY, .Huey
- if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
- if_equal PHONE_BIRDKEEPER_JOSE, .Jose
- if_equal PHONE_YOUNGSTER_JOEY, .Joey
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_FISHER_RALPH, .Ralph
- if_equal PHONE_HIKER_ANTHONY, .Anthony
- if_equal PHONE_CAMPER_TODD, .Todd
- if_equal PHONE_JUGGLER_IRWIN, .Irwin
- if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
- if_equal PHONE_SCHOOLBOY_ALAN, .Alan
- if_equal PHONE_SCHOOLBOY_CHAD, .Chad
- if_equal PHONE_POKEFANM_DEREK, .Derek
- if_equal PHONE_FISHER_TULLY, .Tully
- if_equal PHONE_POKEMANIAC_BRENT, .Brent
- if_equal PHONE_BIRDKEEPER_VANCE, .Vance
- if_equal PHONE_FISHER_WILTON, .Wilton
- if_equal PHONE_BLACKBELT_KENJI, .Kenji
- if_equal PHONE_HIKER_PARRY, .Parry
-
-.Jack:
- farwritetext UnknownText_0x1b4e72
- buttonsound
- end
-
-.Huey:
- farwritetext UnknownText_0x1b511a
- buttonsound
- end
-
-.Gaven:
- farwritetext UnknownText_0x1b5335
- buttonsound
- end
-
-.Jose:
- farwritetext UnknownText_0x1b564c
- buttonsound
- end
-
-.Joey:
- farwritetext UnknownText_0x1b5948
- buttonsound
- end
-
-.Wade:
- farwritetext UnknownText_0x1b5b0b
- buttonsound
- end
-
-.Ralph:
- farwritetext UnknownText_0x1b5d21
- buttonsound
- end
-
-.Anthony:
- farwritetext UnknownText_0x1b6017
- buttonsound
- end
-
-.Todd:
- farwritetext UnknownText_0x1b618f
- buttonsound
- end
-
-.Irwin:
- farwritetext UnknownText_0x1b6407
- buttonsound
- end
-
-.Arnie:
- farwritetext UnknownText_0x1b6506
- buttonsound
- end
-
-.Alan:
- farwritetext UnknownText_0x1b6624
- buttonsound
- end
-
-.Chad:
- farwritetext UnknownText_0x1b6890
- buttonsound
- end
-
-.Derek:
- farwritetext UnknownText_0x1b6a56
- buttonsound
- end
-
-.Tully:
- farwritetext UnknownText_0x1b6bef
- buttonsound
- end
-
-.Brent:
- farwritetext UnknownText_0x1b6d57
- buttonsound
- end
-
-.Vance:
- farwritetext UnknownText_0x1b7112
- buttonsound
- end
-
-.Wilton:
- farwritetext UnknownText_0x1b7283
- buttonsound
- end
-
-.Kenji:
- farwritetext UnknownText_0x1b7397
- buttonsound
- end
-
-.Parry:
- farwritetext UnknownText_0x1b746f
- buttonsound
- end
-
-PhoneScript_GreetPhone_Male_Nite:
- checkcode VAR_CALLERID
- if_equal PHONE_SCHOOLBOY_JACK, .Jack
- if_equal PHONE_SAILOR_HUEY, .Huey
- if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
- if_equal PHONE_BIRDKEEPER_JOSE, .Jose
- if_equal PHONE_YOUNGSTER_JOEY, .Joey
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_FISHER_RALPH, .Ralph
- if_equal PHONE_HIKER_ANTHONY, .Anthony
- if_equal PHONE_CAMPER_TODD, .Todd
- if_equal PHONE_JUGGLER_IRWIN, .Irwin
- if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
- if_equal PHONE_SCHOOLBOY_ALAN, .Alan
- if_equal PHONE_SCHOOLBOY_CHAD, .Chad
- if_equal PHONE_POKEFANM_DEREK, .Derek
- if_equal PHONE_FISHER_TULLY, .Tully
- if_equal PHONE_POKEMANIAC_BRENT, .Brent
- if_equal PHONE_BIRDKEEPER_VANCE, .Vance
- if_equal PHONE_FISHER_WILTON, .Wilton
- if_equal PHONE_BLACKBELT_KENJI, .Kenji
- if_equal PHONE_HIKER_PARRY, .Parry
-
-.Jack:
- farwritetext UnknownText_0x1b4e9e
- buttonsound
- end
-
-.Huey:
- farwritetext UnknownText_0x1b5154
- buttonsound
- end
-
-.Gaven:
- farwritetext UnknownText_0x1b535f
- buttonsound
- end
-
-.Jose:
- farwritetext UnknownText_0x1b5670
- buttonsound
- end
-
-.Joey:
- farwritetext UnknownText_0x1b597c
- buttonsound
- end
-
-.Wade:
- farwritetext UnknownText_0x1b5b37
- buttonsound
- end
-
-.Ralph:
- farwritetext UnknownText_0x1b5d39
- buttonsound
- end
-
-.Anthony:
- farwritetext UnknownText_0x1b6041
- buttonsound
- end
-
-.Todd:
- farwritetext UnknownText_0x1b61bd
- buttonsound
- end
-
-.Irwin:
- farwritetext UnknownText_0x1b642c
- buttonsound
- end
-
-.Arnie:
- farwritetext UnknownText_0x1b6539
- buttonsound
- end
-
-.Alan:
- farwritetext UnknownText_0x1b663b
- buttonsound
- end
-
-.Chad:
- farwritetext UnknownText_0x1b68ba
- buttonsound
- end
-
-.Derek:
- farwritetext UnknownText_0x1b6a8b
- buttonsound
- end
-
-.Tully:
- farwritetext UnknownText_0x1b6c23
- buttonsound
- end
-
-.Brent:
- farwritetext UnknownText_0x1b6d88
- buttonsound
- end
-
-.Vance:
- farwritetext UnknownText_0x1b7132
- buttonsound
- end
-
-.Wilton:
- farwritetext UnknownText_0x1b72a5
- buttonsound
- end
-
-.Kenji:
- farwritetext UnknownText_0x1b73af
- buttonsound
- end
-
-.Parry:
- farwritetext UnknownText_0x1b749b
- buttonsound
- end
-
-PhoneScript_GreetPhone_Female:
- checkday
- iftrue PhoneScript_GreetPhone_Female_Day
- checknite
- iftrue PhoneScript_GreetPhone_Female_Nite
- checkcode VAR_CALLERID
- if_equal PHONE_POKEFAN_BEVERLY, .Beverly
- if_equal PHONE_COOLTRAINERF_BETH, .Beth
- if_equal PHONE_COOLTRAINERF_REENA, .Reena
- if_equal PHONE_PICNICKER_LIZ, .Liz
- if_equal PHONE_PICNICKER_GINA, .Gina
- if_equal PHONE_LASS_DANA, .Dana
- if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
- if_equal PHONE_PICNICKER_ERIN, .Erin
-
-.Beverly:
- farwritetext UnknownText_0x1b4fa1
- buttonsound
- end
-
-.Beth:
- farwritetext UnknownText_0x1b5472
- buttonsound
- end
-
-.Reena:
- farwritetext UnknownText_0x1b5786
- buttonsound
- end
-
-.Liz:
- farwritetext UnknownText_0x1b5e25
- buttonsound
- end
-
-.Gina:
- farwritetext UnknownText_0x1b62f1
- buttonsound
- end
-
-.Dana:
- farwritetext UnknownText_0x1b6738
- buttonsound
- end
-
-.Tiffany:
- farwritetext UnknownText_0x1b6ef3
- buttonsound
- end
-
-.Erin:
- farwritetext UnknownText_0x1b758f
- buttonsound
- end
-
-PhoneScript_GreetPhone_Female_Day:
- checkcode VAR_CALLERID
- if_equal PHONE_POKEFAN_BEVERLY, .Beverly
- if_equal PHONE_COOLTRAINERF_BETH, .Beth
- if_equal PHONE_COOLTRAINERF_REENA, .Reena
- if_equal PHONE_PICNICKER_LIZ, .Liz
- if_equal PHONE_PICNICKER_GINA, .Gina
- if_equal PHONE_LASS_DANA, .Dana
- if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
- if_equal PHONE_PICNICKER_ERIN, .Erin
-
-.Beverly:
- farwritetext UnknownText_0x1b4fda
- buttonsound
- end
-
-.Beth:
- farwritetext UnknownText_0x1b54a6
- buttonsound
- end
-
-.Reena:
- farwritetext UnknownText_0x1b57b7
- buttonsound
- end
-
-.Liz:
- farwritetext UnknownText_0x1b5e59
- buttonsound
- end
-
-.Gina:
- farwritetext UnknownText_0x1b630e
- buttonsound
- end
-
-.Dana:
- farwritetext UnknownText_0x1b6757
- buttonsound
- end
-
-.Tiffany:
- farwritetext UnknownText_0x1b6f1c
- buttonsound
- end
-
-.Erin:
- farwritetext UnknownText_0x1b75ac
- buttonsound
- end
-
-PhoneScript_GreetPhone_Female_Nite:
- checkcode VAR_CALLERID
- if_equal PHONE_POKEFAN_BEVERLY, .Beverly
- if_equal PHONE_COOLTRAINERF_BETH, .Beth
- if_equal PHONE_COOLTRAINERF_REENA, .Reena
- if_equal PHONE_PICNICKER_LIZ, .Liz
- if_equal PHONE_PICNICKER_GINA, .Gina
- if_equal PHONE_LASS_DANA, .Dana
- if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
- if_equal PHONE_PICNICKER_ERIN, .Erin
-
-.Beverly:
- farwritetext UnknownText_0x1b5004
- buttonsound
- end
-
-.Beth:
- farwritetext UnknownText_0x1b54d4
- buttonsound
- end
-
-.Reena:
- farwritetext UnknownText_0x1b57e8
- buttonsound
- end
-
-.Liz:
- farwritetext UnknownText_0x1b5e8e
- buttonsound
- end
-
-.Gina:
- farwritetext UnknownText_0x1b6331
- buttonsound
- end
-
-.Dana:
- farwritetext UnknownText_0x1b6776
- buttonsound
- end
-
-.Tiffany:
- farwritetext UnknownText_0x1b6f37
- buttonsound
- end
-
-.Erin:
- farwritetext UnknownText_0x1b75c9
- buttonsound
- end
-
-PhoneScript_Generic_Male:
- checkcode VAR_CALLERID
- if_equal PHONE_SCHOOLBOY_JACK, .Jack
- if_equal PHONE_COOLTRAINERM_GAVEN, .Gaven
- if_equal PHONE_BIRDKEEPER_JOSE, .Jose
- if_equal PHONE_YOUNGSTER_JOEY, .Joey
- if_equal PHONE_BUG_CATCHER_WADE, .Wade
- if_equal PHONE_FISHER_RALPH, .Ralph
- if_equal PHONE_HIKER_ANTHONY, .Anthony
- if_equal PHONE_CAMPER_TODD, .Todd
- if_equal PHONE_BUG_CATCHER_ARNIE, .Arnie
- if_equal PHONE_SCHOOLBOY_ALAN, .Alan
- if_equal PHONE_SCHOOLBOY_CHAD, .Chad
- if_equal PHONE_POKEFANM_DEREK, .Derek
- if_equal PHONE_FISHER_TULLY, .Tully
- if_equal PHONE_POKEMANIAC_BRENT, .Brent
- if_equal PHONE_BIRDKEEPER_VANCE, .Vance
- if_equal PHONE_FISHER_WILTON, .Wilton
- if_equal PHONE_HIKER_PARRY, .Parry
-
-.Jack:
- farwritetext UnknownText_0x1b4ecd
- buttonsound
- end
-
-.Unknown:
- farwritetext UnknownText_0x1b518b
- buttonsound
- end
-
-.Gaven:
- farwritetext UnknownText_0x1b5393
- buttonsound
- end
-
-.Jose:
- farwritetext UnknownText_0x1b5694
- buttonsound
- end
-
-.Joey:
- farwritetext UnknownText_0x1b59b2
- buttonsound
- end
-
-.Wade:
- farwritetext UnknownText_0x1b5b68
- buttonsound
- end
-
-.Ralph:
- farwritetext UnknownText_0x1b5d51
- buttonsound
- end
-
-.Anthony:
- farwritetext UnknownText_0x1b606f
- buttonsound
- end
-
-.Todd:
- farwritetext UnknownText_0x1b61f2
- buttonsound
- end
-
-.Arnie:
- farwritetext UnknownText_0x1b656c
- buttonsound
- end
-
-.Alan:
- farwritetext UnknownText_0x1b6652
- buttonsound
- end
-
-.Chad:
- farwritetext UnknownText_0x1b68e8
- buttonsound
- end
-
-.Derek:
- farwritetext UnknownText_0x1b6ac2
- buttonsound
- end
-
-.Tully:
- farwritetext UnknownText_0x1b6c56
- buttonsound
- end
-
-.Brent:
- farwritetext UnknownText_0x1b6db9
- buttonsound
- end
-
-.Vance:
- farwritetext UnknownText_0x1b7161
- buttonsound
- end
-
-.Wilton:
- farwritetext UnknownText_0x1b72d0
- buttonsound
- end
-
-.Parry:
- farwritetext UnknownText_0x1b74c8
- buttonsound
- end
-
-PhoneScript_Generic_Female:
- checkcode VAR_CALLERID
- if_equal PHONE_POKEFAN_BEVERLY, .Beverly
- if_equal PHONE_COOLTRAINERF_BETH, .Beth
- if_equal PHONE_COOLTRAINERF_REENA, .Reena
- if_equal PHONE_PICNICKER_LIZ, .Liz
- if_equal PHONE_PICNICKER_GINA, .Gina
- if_equal PHONE_LASS_DANA, .Dana
- if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
- if_equal PHONE_PICNICKER_ERIN, .Erin
-
-.Beverly:
- farwritetext UnknownText_0x1b502b
- buttonsound
- end
-
-.Beth:
- farwritetext UnknownText_0x1b5510
- buttonsound
- end
-
-.Reena:
- farwritetext UnknownText_0x1b5819
- buttonsound
- end
-
-.Liz:
- farwritetext UnknownText_0x1b5ebe
- buttonsound
- end
-
-.Gina:
- farwritetext UnknownText_0x1b6352
- buttonsound
- end
-
-.Dana:
- farwritetext UnknownText_0x1b6795
- buttonsound
- end
-
-.Tiffany:
- farwritetext UnknownText_0x1b6f60
- buttonsound
- end
-
-.Erin:
- farwritetext UnknownText_0x1b75e5
- buttonsound
- end
-
-PhoneScript_MonFlavorText:
- special RandomPhoneMon
- farscall PhoneScript_Random2
- if_equal $0, .TooEnergetic
- farwritetext UnknownText_0x1b518b
- buttonsound
- farjump PhoneScript_HangupText_Male
-
-.TooEnergetic:
- farjump .unnecessary
-
-.unnecessary
- farwritetext UnknownText_0x1b522b
- buttonsound
- farjump PhoneScript_HangupText_Male
-; be643
-
-
-String_be643: db "Grandma@"
-String_be64b: db "Grandpa@"
-String_be653: db "Mom@"
-String_be657: db "Dad@"
-String_be65b: db "Sister@"
-String_be662: db "Brother@"
-
diff --git a/engine/player_gfx.asm b/engine/player_gfx.asm
new file mode 100644
index 000000000..1af444d73
--- /dev/null
+++ b/engine/player_gfx.asm
@@ -0,0 +1,263 @@
+Function88248: ; 88248
+; XXX
+ ld c, CAL
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, .okay
+ ld c, KAREN
+
+.okay
+ ld a, c
+ ld [TrainerClass], a
+ ret
+
+MovePlayerPicRight: ; 88258
+ hlcoord 6, 4
+ ld de, 1
+ jr MovePlayerPic
+
+MovePlayerPicLeft: ; 88260
+ hlcoord 13, 4
+ ld de, -1
+ ; fallthrough
+
+MovePlayerPic: ; 88266
+; Move player pic at hl by de * 7 tiles.
+ ld c, $8
+.loop
+ push bc
+ push hl
+ push de
+ xor a
+ ld [hBGMapMode], a
+ lb bc, 7, 7
+ predef PlaceGraphic
+ xor a
+ ld [hBGMapThird], a
+ call WaitBGMap
+ call DelayFrame
+ pop de
+ pop hl
+ add hl, de
+ pop bc
+ dec c
+ ret z
+ push hl
+ push bc
+ ld a, l
+ sub e
+ ld l, a
+ ld a, h
+ sbc d
+ ld h, a
+ lb bc, 7, 7
+ call ClearBox
+ pop bc
+ pop hl
+ jr .loop
+
+ShowPlayerNamingChoices: ; 88297
+ ld hl, ChrisNameMenuHeader
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, .GotGender
+ ld hl, KrisNameMenuHeader
+.GotGender:
+ call LoadMenuDataHeader
+ call VerticalMenu
+ ld a, [wMenuCursorY]
+ dec a
+ call CopyNameFromMenu
+ call CloseWindow
+ ret
+
+ChrisNameMenuHeader: ; 882b5
+ db $40 ; flags
+ db 00, 00 ; start coords
+ db 11, 10 ; end coords
+ dw .MaleNames
+ db 1 ; ????
+ db 0 ; default option
+
+.MaleNames: ; 882be
+ db $91 ; flags
+ db 5 ; items
+ db "NEW NAME@"
+MalePlayerNameArray: ; 882c9
+ db "CHRIS@"
+ db "MAT@"
+ db "ALLAN@"
+ db "JON@"
+ db 2 ; displacement
+ db " NAME @" ; title
+
+KrisNameMenuHeader: ; 882e5
+ db $40 ; flags
+ db 00, 00 ; start coords
+ db 11, 10 ; end coords
+ dw .FemaleNames
+ db 1 ; ????
+ db 0 ; default option
+
+.FemaleNames: ; 882ee
+ db $91 ; flags
+ db 5 ; items
+ db "NEW NAME@"
+FemalePlayerNameArray: ; 882f9
+ db "KRIS@"
+ db "AMANDA@"
+ db "JUANA@"
+ db "JODI@"
+ db 2 ; displacement
+ db " NAME @" ; title
+
+GetPlayerNameArray: ; 88318 This Function is never called
+ ld hl, PlayerName
+ ld de, MalePlayerNameArray
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, .done
+ ld de, FemalePlayerNameArray
+
+.done
+ call InitName
+ ret
+
+GetPlayerIcon: ; 8832c
+; Get the player icon corresponding to gender
+
+; Male
+ ld de, ChrisSpriteGFX
+ ld b, BANK(ChrisSpriteGFX)
+
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, .done
+
+; Female
+ ld de, KrisSpriteGFX
+ ld b, BANK(KrisSpriteGFX)
+
+.done
+ ret
+
+GetCardPic: ; 8833e
+ ld hl, ChrisCardPic
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, .GotClass
+ ld hl, KrisCardPic
+.GotClass:
+ ld de, VTiles2 tile $00
+ ld bc, $23 tiles
+ ld a, BANK(ChrisCardPic) ; BANK(KrisCardPic)
+ call FarCopyBytes
+ ld hl, CardGFX
+ ld de, VTiles2 tile $23
+ ld bc, 6 tiles
+ ld a, BANK(CardGFX)
+ call FarCopyBytes
+ ret
+
+ChrisCardPic: ; 88365
+INCBIN "gfx/trainer_card/chris_card.2bpp"
+
+KrisCardPic: ; 88595
+INCBIN "gfx/trainer_card/kris_card.2bpp"
+
+CardGFX: ; 887c5
+INCBIN "gfx/trainer_card/trainer_card.2bpp"
+
+GetPlayerBackpic: ; 88825
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, GetChrisBackpic
+ call GetKrisBackpic
+ ret
+
+GetChrisBackpic: ; 88830
+ ld hl, ChrisBackpic
+ ld b, BANK(ChrisBackpic)
+ ld de, VTiles2 tile $31
+ ld c, 7 * 7
+ predef DecompressPredef
+ ret
+
+HOF_LoadTrainerFrontpic: ; 88840
+ call WaitBGMap
+ xor a
+ ld [hBGMapMode], a
+ ld e, 0
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, .GotClass
+ ld e, 1
+
+.GotClass:
+ ld a, e
+ ld [TrainerClass], a
+ ld de, ChrisPic
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, .GotPic
+ ld de, KrisPic
+
+.GotPic:
+ ld hl, VTiles2
+ ld b, BANK(ChrisPic) ; BANK(KrisPic)
+ ld c, 7 * 7
+ call Get2bpp
+ call WaitBGMap
+ ld a, $1
+ ld [hBGMapMode], a
+ ret
+
+DrawIntroPlayerPic: ; 88874
+; Draw the player pic at (6,4).
+
+; Get class
+ ld e, CHRIS
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, .GotClass
+ ld e, KRIS
+.GotClass:
+ ld a, e
+ ld [TrainerClass], a
+
+; Load pic
+ ld de, ChrisPic
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, .GotPic
+ ld de, KrisPic
+.GotPic:
+ ld hl, VTiles2
+ ld b, BANK(ChrisPic) ; BANK(KrisPic)
+ ld c, 7 * 7 ; dimensions
+ call Get2bpp
+
+; Draw
+ xor a
+ ld [hGraphicStartTile], a
+ hlcoord 6, 4
+ lb bc, 7, 7
+ predef PlaceGraphic
+ ret
+
+ChrisPic: ; 888a9
+INCBIN "gfx/player/chris.2bpp"
+
+KrisPic: ; 88bb9
+INCBIN "gfx/player/kris.2bpp"
+
+GetKrisBackpic: ; 88ec9
+; Kris's backpic is uncompressed.
+ ld de, KrisBackpic
+ ld hl, VTiles2 tile $31
+ lb bc, BANK(KrisBackpic), 7 * 7 ; dimensions
+ call Get2bpp
+ ret
+
+KrisBackpic: ; 88ed6
+INCBIN "gfx/player/kris_back.2bpp"
diff --git a/engine/player_movement.asm b/engine/player_movement.asm
index 89593da5d..db0c07801 100755
--- a/engine/player_movement.asm
+++ b/engine/player_movement.asm
@@ -42,7 +42,7 @@ DoPlayerMovement:: ; 80000
jr z, .Surf
cp PLAYER_BIKE
jr z, .Normal
- cp PLAYER_SLIP
+ cp PLAYER_SKATE
jr z, .Ice
.Normal:
@@ -128,13 +128,13 @@ DoPlayerMovement:: ; 80000
.not_whirlpool
and $f0
- cp $30 ; moving water
+ cp HI_NYBBLE_CURRENT
jr z, .water
- cp $40 ; moving land 1
+ cp HI_NYBBLE_WALK
jr z, .land1
- cp $50 ; moving land 2
+ cp HI_NYBBLE_WALK_ALT
jr z, .land2
- cp $70 ; warps
+ cp HI_NYBBLE_WARPS
jr z, .warps
jr .no_walk
@@ -150,10 +150,10 @@ DoPlayerMovement:: ; 80000
jr .continue_walk
.water_table
- db RIGHT
- db LEFT
- db UP
- db DOWN
+ db RIGHT ; COLL_WATERFALL_RIGHT
+ db LEFT ; COLL_WATERFALL_LEFT
+ db UP ; COLL_WATERFALL_UP
+ db DOWN ; COLL_WATERFALL
.land1
ld a, c
@@ -169,14 +169,14 @@ DoPlayerMovement:: ; 80000
jr .continue_walk
.land1_table
- db STANDING
- db RIGHT
- db LEFT
- db UP
- db DOWN
- db STANDING
- db STANDING
- db STANDING
+ db STANDING ; COLL_BRAKE
+ db RIGHT ; COLL_WALK_RIGHT
+ db LEFT ; COLL_WALK_LEFT
+ db UP ; COLL_WALK_UP
+ db DOWN ; COLL_WALK_DOWN
+ db STANDING ; COLL_BRAKE_45
+ db STANDING ; COLL_BRAKE_46
+ db STANDING ; COLL_BRAKE_47
.land2
ld a, c
@@ -192,24 +192,24 @@ DoPlayerMovement:: ; 80000
jr .continue_walk
.land2_table
- db RIGHT
- db LEFT
- db UP
- db DOWN
- db STANDING
- db STANDING
- db STANDING
- db STANDING
+ db RIGHT ; COLL_WALK_RIGHT_ALT
+ db LEFT ; COLL_WALK_LEFT_ALT
+ db UP ; COLL_WALK_UP_ALT
+ db DOWN ; COLL_WALK_DOWN_ALT
+ db STANDING ; COLL_BRAKE_ALT
+ db STANDING ; COLL_BRAKE_55
+ db STANDING ; COLL_BRAKE_56
+ db STANDING ; COLL_BRAKE_57
.warps
ld a, c
- cp $71 ; door
+ cp COLL_DOOR
jr z, .down
- cp $79
+ cp COLL_DOOR_79
jr z, .down
- cp $7a ; stairs
+ cp COLL_STAIRCASE
jr z, .down
- cp $7b ; cave
+ cp COLL_CAVE
jr nz, .no_walk
.down
@@ -365,7 +365,7 @@ DoPlayerMovement:: ; 80000
ld a, [PlayerStandingTile]
ld e, a
and $f0
- cp $a0 ; ledge
+ cp HI_NYBBLE_LEDGES
jr nz, .DontJump
ld a, e
@@ -391,14 +391,14 @@ DoPlayerMovement:: ; 80000
ret
.data_8021e
- db FACE_RIGHT
- db FACE_LEFT
- db FACE_UP
- db FACE_DOWN
- db FACE_RIGHT | FACE_DOWN
- db FACE_DOWN | FACE_LEFT
- db FACE_UP | FACE_RIGHT
- db FACE_UP | FACE_LEFT
+ db FACE_RIGHT ; COLL_HOP_RIGHT
+ db FACE_LEFT ; COLL_HOP_LEFT
+ db FACE_UP ; COLL_HOP_UP
+ db FACE_DOWN ; COLL_HOP_DOWN
+ db FACE_RIGHT | FACE_DOWN ; COLL_HOP_DOWN_RIGHT
+ db FACE_DOWN | FACE_LEFT ; COLL_HOP_DOWN_LEFT
+ db FACE_UP | FACE_RIGHT ; COLL_HOP_UP_RIGHT
+ db FACE_UP | FACE_LEFT ; COLL_HOP_UP_LEFT
; 80226
.CheckWarp: ; 80226
@@ -409,6 +409,8 @@ DoPlayerMovement:: ; 80000
; making bumps silent.
ld a, [WalkingDirection]
+ ; cp STANDING
+ ; jr z, .not_warp
ld e, a
ld d, 0
ld hl, .EdgeWarps
@@ -420,6 +422,7 @@ DoPlayerMovement:: ; 80000
ld a, 1
ld [wd041], a
ld a, [WalkingDirection]
+ ; This is in the wrong place.
cp STANDING
jr z, .not_warp
@@ -443,7 +446,10 @@ DoPlayerMovement:: ; 80000
ret
.EdgeWarps:
- db $70, $78, $76, $7e
+ db COLL_WARP_CARPET_DOWN
+ db COLL_WARP_CARPET_UP
+ db COLL_WARP_CARPET_LEFT
+ db COLL_WARP_CARPET_RIGHT
; 8025f
.DoStep:
@@ -647,7 +653,7 @@ DoPlayerMovement:: ; 80000
ld e, a
; Find an object struct with coordinates equal to d,e
ld bc, ObjectStructs ; redundant
- callba IsNPCAtCoord
+ farcall IsNPCAtCoord
jr nc, .is_npc
call .CheckStrengthBoulder
jr c, .no_bump
@@ -747,11 +753,10 @@ DoPlayerMovement:: ; 80000
; 803ca
.BikeCheck: ; 803ca
-
ld a, [PlayerState]
cp PLAYER_BIKE
ret z
- cp PLAYER_SLIP
+ cp PLAYER_SKATE
ret
; 803d3
@@ -759,7 +764,7 @@ DoPlayerMovement:: ; 80000
; Return 0 if tile a is land. Otherwise, return carry.
call GetTileCollision
- and a ; land
+ and a ; LANDTILE?
ret z
scf
ret
@@ -774,7 +779,7 @@ DoPlayerMovement:: ; 80000
jr z, .Water
; Can walk back onto land from water.
- and a
+ and a ; LANDTILE?
jr z, .Land
jr .Neither
@@ -821,7 +826,7 @@ CheckStandingOnIce:: ; 80404
call CheckIceTile
jr nc, .yep
ld a, [PlayerState]
- cp PLAYER_SLIP
+ cp PLAYER_SKATE
jr nz, .not_ice
.yep
diff --git a/engine/player_object.asm b/engine/player_object.asm
index 6b38a6328..fe19d15b5 100755
--- a/engine/player_object.asm
+++ b/engine/player_object.asm
@@ -29,14 +29,14 @@ SpawnPlayer: ; 8029
call GetMapObject
ld hl, MAPOBJECT_COLOR
add hl, bc
- ln e, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT
+ ln e, PAL_NPC_RED, OBJECTTYPE_SCRIPT
ld a, [wPlayerSpriteSetupFlags]
bit 2, a
jr nz, .ok
ld a, [PlayerGender]
bit 0, a
jr z, .ok
- ln e, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT
+ ln e, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT
.ok
ld [hl], e
@@ -55,7 +55,7 @@ PlayerObjectTemplate: ; 8071
; A dummy map object used to initialize the player object.
; Shorter than the actual amount copied by two bytes.
; Said bytes seem to be unused.
- person_event SPRITE_CHRIS, -4, -4, SPRITEMOVEDATA_PLAYER, 15, 15, -1, -1, 0, PERSONTYPE_SCRIPT, 0, 0, -1
+ object_event SPRITE_CHRIS, -4, -4, SPRITEMOVEDATA_PLAYER, 15, 15, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, 0, -1
CopyDECoordsToMapObject:: ; 807e
push de
@@ -82,7 +82,7 @@ PlayerSpawn_ConvertCoords: ; 808f
call CopyDECoordsToMapObject
ret
-WritePersonXY:: ; 80a1
+WriteObjectXY:: ; 80a1
ld a, b
call CheckObjectVisibility
ret c
@@ -193,7 +193,7 @@ CopyMapObjectToObjectStruct: ; 8116
and $f0
jr z, .skip_color_override
swap a
- and $7 ; OAM_PALETTE
+ and PALETTE_MASK
ld [wTempObjectCopyPalette], a
.skip_color_override
@@ -616,7 +616,7 @@ FollowNotExact:: ; 839e
call CheckObjectVisibility
ret c
-; Person 2 is now in bc, person 1 is now in de
+; object 2 is now in bc, object 1 is now in de
ld hl, OBJECT_NEXT_MAP_X
add hl, bc
ld a, [hl]
diff --git a/engine/player_step.asm b/engine/player_step.asm
index 83158c1b7..bdd6d9907 100755
--- a/engine/player_step.asm
+++ b/engine/player_step.asm
@@ -77,7 +77,7 @@ HandlePlayerStep: ; d4e5 (3:54e5)
ret
.mobile ; d509 (3:5509)
- callba TrainerRankings_StepCount
+ farcall TrainerRankings_StepCount
ret
.fail2 ; d510 (3:5510)
diff --git a/engine/pokecenter_pc.asm b/engine/pokecenter_pc.asm
index f6b970ede..7045dc1c8 100755
--- a/engine/pokecenter_pc.asm
+++ b/engine/pokecenter_pc.asm
@@ -2,9 +2,9 @@ PokemonCenterPC: ; 1559a
call PC_CheckPartyForPokemon
ret c
call PC_PlayBootSound
- ld hl, PokeCenterPCText_BootedUpPC
+ ld hl, PokecenterPCText_BootedUpPC
call PC_DisplayText
- ld hl, PokeCenterPCText_AccessWhosePC
+ ld hl, PokecenterPCText_AccessWhosePC
call PC_DisplayTextWaitMenu
ld hl, .TopMenu
call LoadMenuDataHeader
@@ -103,16 +103,16 @@ PC_CheckPartyForPokemon: ; 15650
BillsPC: ; 15668
call PC_PlayChoosePCSound
- ld hl, PokeCenterPCText_AccessedBillsPC
+ ld hl, PokecenterPCText_AccessedBillsPC
call PC_DisplayText
- callba _BillsPC
+ farcall _BillsPC
and a
ret
; 15679 (5:5679)
PlayersPC: ; 15679
call PC_PlayChoosePCSound
- ld hl, PokeCenterPCText_AccessedOwnPC
+ ld hl, PokecenterPCText_AccessedOwnPC
call PC_DisplayText
ld b, $0
call _PlayersPC
@@ -122,9 +122,9 @@ PlayersPC: ; 15679
OaksPC: ; 15689
call PC_PlayChoosePCSound
- ld hl, PokeCenterPCText_AccessedOaksPC
+ ld hl, PokecenterPCText_AccessedOaksPC
call PC_DisplayText
- callba ProfOaksPC
+ farcall ProfOaksPC
and a
ret
; 1569a
@@ -132,14 +132,14 @@ OaksPC: ; 15689
HallOfFamePC: ; 1569a
call PC_PlayChoosePCSound
call FadeToMenu
- callba _HallOfFamePC
+ farcall _HallOfFamePC
call CloseSubmenu
and a
ret
; 156ab
TurnOffPC: ; 156ab
- ld hl, PokeCenterPCText_LinkClosed
+ ld hl, PokecenterPCText_LinkClosed
call PrintText
scf
ret
@@ -308,7 +308,7 @@ UnknownText_0x157cc: ; 0x157cc
KrisWithdrawItemMenu: ; 0x157d1
call LoadStandardMenuDataHeader
- callba ClearPCItemScreen
+ farcall ClearPCItemScreen
.loop
call PCItemsJoypad
jr c, .quit
@@ -322,7 +322,7 @@ KrisWithdrawItemMenu: ; 0x157d1
.Submenu:
; check if the item has a quantity
- callba _CheckTossableItem
+ farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
jr z, .askquantity
@@ -335,7 +335,7 @@ KrisWithdrawItemMenu: ; 0x157d1
.askquantity
ld hl, .HowManyText
call MenuTextBox
- callba SelectQuantityToToss
+ farcall SelectQuantityToToss
call ExitMenu
call ExitMenu
jr c, .done
@@ -384,12 +384,12 @@ KrisWithdrawItemMenu: ; 0x157d1
KrisTossItemMenu: ; 0x1585f
call LoadStandardMenuDataHeader
- callba ClearPCItemScreen
+ farcall ClearPCItemScreen
.loop
call PCItemsJoypad
jr c, .quit
ld de, PCItems
- callba TossItemFromPC
+ farcall TossItemFromPC
jr .loop
.quit
@@ -399,7 +399,7 @@ KrisTossItemMenu: ; 0x1585f
; 0x1587d
KrisDecorationMenu: ; 0x1587d
- callba _KrisDecorationMenu
+ farcall _KrisDecorationMenu
ld a, c
and a
ret z
@@ -418,14 +418,14 @@ KrisDepositItemMenu: ; 0x1588b
jr c, .nope
call DisableSpriteUpdates
call LoadStandardMenuDataHeader
- callba DepositSellInitPackBuffers
+ farcall DepositSellInitPackBuffers
.loop
- callba DepositSellPack
+ farcall DepositSellPack
ld a, [wcf66]
and a
jr z, .close
call .TryDepositItem
- callba CheckRegisteredItem
+ farcall CheckRegisteredItem
jr .loop
.close
@@ -436,7 +436,7 @@ KrisDepositItemMenu: ; 0x1588b
ret
.CheckItemsInBag:
- callba HasNoItems
+ farcall HasNoItems
ret nc
ld hl, .NoItemsInBag
call MenuTextBoxBackup
@@ -453,7 +453,7 @@ KrisDepositItemMenu: ; 0x1588b
push af
ld a, $0
ld [wSpriteUpdatesEnabled], a
- callba CheckItemMenu
+ farcall CheckItemMenu
ld a, [wItemAttributeParamBuffer]
ld hl, .dw
rst JumpTable
@@ -486,7 +486,7 @@ KrisDepositItemMenu: ; 0x1588b
ret
.DepositItem_:
- callba _CheckTossableItem
+ farcall _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
jr z, .AskQuantity
@@ -497,7 +497,7 @@ KrisDepositItemMenu: ; 0x1588b
.AskQuantity:
ld hl, .HowManyText
call MenuTextBox
- callba SelectQuantityToToss
+ farcall SelectQuantityToToss
push af
call ExitMenu
call ExitMenu
@@ -545,7 +545,7 @@ KrisDepositItemMenu: ; 0x1588b
db "@"
KrisMailBoxMenu: ; 0x1597d
- callba _KrisMailBoxMenu
+ farcall _KrisMailBoxMenu
xor a
ret
; 0x15985
@@ -605,12 +605,12 @@ PCItemsJoypad: ; 0x15985
.a_select_2
call PC_PlaySwapItemsSound
.select_1
- callba SwitchItemsInBag
+ farcall SwitchItemsInBag
.next
jp .loop
.a_1
- callba ScrollingMenu_ClearLeftColumn
+ farcall ScrollingMenu_ClearLeftColumn
call PlaceHollowCursor
and a
ret
@@ -641,37 +641,37 @@ PC_DisplayText: ; 15a20
ret
; 15a27
-PokeCenterPCText_BootedUpPC: ; 0x15a27
+PokecenterPCText_BootedUpPC: ; 0x15a27
; turned on the PC.
text_jump UnknownText_0x1c144d
db "@"
; 0x15a2c
-PokeCenterPCText_AccessWhosePC: ; 0x15a2c
+PokecenterPCText_AccessWhosePC: ; 0x15a2c
; Access whose PC?
text_jump UnknownText_0x1c1462
db "@"
; 0x15a31
-PokeCenterPCText_AccessedBillsPC: ; 0x15a31
+PokecenterPCText_AccessedBillsPC: ; 0x15a31
; BILL's PC accessed. #MON Storage System opened.
text_jump UnknownText_0x1c1474
db "@"
; 0x15a36
-PokeCenterPCText_AccessedOwnPC: ; 0x15a36
+PokecenterPCText_AccessedOwnPC: ; 0x15a36
; Accessed own PC. Item Storage System opened.
text_jump UnknownText_0x1c14a4
db "@"
; 0x15a3b
-PokeCenterPCText_AccessedOaksPC: ; 0x15a3b
+PokecenterPCText_AccessedOaksPC: ; 0x15a3b
; PROF.OAK's PC accessed. #DEX Rating System opened.
text_jump UnknownText_0x1c14d2
db "@"
; 0x15a40
-PokeCenterPCText_LinkClosed: ; 0x15a40
+PokecenterPCText_LinkClosed: ; 0x15a40
; … Link closed…
text_jump UnknownText_0x1c1505
db "@"
diff --git a/engine/pokedex.asm b/engine/pokedex.asm
index 569bdbb0b..12b5b2cd6 100644
--- a/engine/pokedex.asm
+++ b/engine/pokedex.asm
@@ -98,7 +98,7 @@ InitPokedex: ; 40063
call Pokedex_OrderMonsByMode
call Pokedex_InitCursorPosition
call Pokedex_GetLandmark
- callba DrawDexEntryScreenRightEdge
+ farcall DrawDexEntryScreenRightEdge
call Pokedex_ResetBGMapMode
ret
@@ -117,7 +117,7 @@ Pokedex_CheckUnlockedUnownMode: ; 400a2
ret
Pokedex_InitCursorPosition: ; 400b4
- ld hl, wPokedexDataStart
+ ld hl, wPokedexOrder
ld a, [wLastDexEntry]
and a
jr z, .done
@@ -220,7 +220,7 @@ Pokedex_InitMainScreen: ; 4013c (10:413c)
hlcoord 0, 0, AttrMap
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
call ByteFill
- callba DrawPokedexListWindow
+ farcall DrawPokedexListWindow
hlcoord 0, 17
ld de, String_START_SEARCH
call Pokedex_PlaceString
@@ -250,7 +250,7 @@ Pokedex_InitMainScreen: ; 4013c (10:413c)
ld a, SCGB_POKEDEX
call Pokedex_GetSGBLayout
call Pokedex_UpdateCursorOAM
- callba DrawPokedexListWindow
+ farcall DrawPokedexListWindow
hlcoord 0, 17
ld de, String_START_SEARCH
call Pokedex_PlaceString
@@ -333,7 +333,7 @@ Pokedex_InitDexEntryScreen: ; 40217 (10:4217)
call Pokedex_InitArrowCursor
call Pokedex_GetSelectedMon
ld [wLastDexEntry], a
- callba DisplayDexEntry
+ farcall DisplayDexEntry
call Pokedex_DrawFootprint
call WaitBGMap
ld a, $a7
@@ -387,7 +387,7 @@ Pokedex_Page: ; 40292
ld [wPokedexStatus], a
call Pokedex_GetSelectedMon
ld [wLastDexEntry], a
- callba DisplayDexEntry
+ farcall DisplayDexEntry
call WaitBGMap
ret
@@ -403,7 +403,7 @@ Pokedex_ReinitDexEntryScreen: ; 402aa (10:42aa)
call Pokedex_LoadCurrentFootprint
call Pokedex_GetSelectedMon
ld [wLastDexEntry], a
- callba DisplayDexEntry
+ farcall DisplayDexEntry
call Pokedex_DrawFootprint
call Pokedex_LoadSelectedMonTiles
call WaitBGMap
@@ -481,7 +481,7 @@ DexEntryScreen_MenuActionJumptable: ; 402f2
push af
ld a, [wJumptableIndex]
push af
- callba PrintDexEntry
+ farcall PrintDexEntry
pop af
ld [wJumptableIndex], a
pop af
@@ -502,7 +502,7 @@ DexEntryScreen_MenuActionJumptable: ; 402f2
Pokedex_RedisplayDexEntry: ; 4038d
call Pokedex_DrawDexEntryScreenBG
call Pokedex_GetSelectedMon
- callba DisplayDexEntry
+ farcall DisplayDexEntry
call Pokedex_DrawFootprint
ret
@@ -512,7 +512,7 @@ Pokedex_InitOptionScreen: ; 4039d (10:439d)
call ClearSprites
call Pokedex_DrawOptionScreenBG
call Pokedex_InitArrowCursor
- ld a, [wCurrentDexMode]
+ ld a, [wCurrentDexMode] ; Index of the topmost visible item in a scrolling menu ???
ld [wDexArrowCursorPosIndex], a
call Pokedex_DisplayModeDescription
call WaitBGMap
@@ -622,7 +622,7 @@ Pokedex_InitSearchScreen: ; 40443 (10:4443)
call Pokedex_PlaceSearchScreenTypeStrings
xor a
ld [wDexSearchSlowpokeFrame], a
- callba DoDexSearchSlowpokeFrame
+ farcall DoDexSearchSlowpokeFrame
call WaitBGMap
ld a, SCGB_POKEDEX_SEARCH_OPTION
call Pokedex_GetSGBLayout
@@ -675,7 +675,7 @@ Pokedex_UpdateSearchScreen: ; 40471 (10:4471)
.MenuAction_BeginSearch: ; 404b7
call Pokedex_SearchForMons
- callba AnimateDexSearchSlowpoke
+ farcall AnimateDexSearchSlowpoke
ld a, [wDexSearchResultCount]
and a
jr nz, .show_search_results
@@ -722,7 +722,7 @@ Pokedex_InitSearchResultsScreen: ; 4050a (10:450a)
call ByteFill
call Pokedex_SetBGMapMode4
call Pokedex_ResetBGMapMode
- callba DrawPokedexSearchResultsWindow
+ farcall DrawPokedexSearchResultsWindow
call Pokedex_PlaceSearchResultsTypeStrings
ld a, 4
ld [wDexListingHeight], a
@@ -738,7 +738,7 @@ Pokedex_InitSearchResultsScreen: ; 4050a (10:450a)
ld [hWY], a
call WaitBGMap
call Pokedex_ResetBGMapMode
- callba DrawPokedexSearchResultsWindow
+ farcall DrawPokedexSearchResultsWindow
call Pokedex_PlaceSearchResultsTypeStrings
call Pokedex_UpdateSearchResultsCursorOAM
ld a, $ff
@@ -801,7 +801,7 @@ Pokedex_InitUnownMode: ; 405bd (10:45bd)
ld [wDexCurrentUnownIndex], a
call Pokedex_LoadUnownFrontpicTiles
call Pokedex_UnownModePlaceCursor
- callba PrintUnownWord
+ farcall PrintUnownWord
call WaitBGMap
ld a, SCGB_POKEDEX_UNOWN_MODE
call Pokedex_GetSGBLayout
@@ -823,7 +823,7 @@ Pokedex_UpdateUnownMode: ; 405df (10:45df)
call DelayFrame
call Pokedex_CheckSGB
jr nz, .decompress
- callba LoadSGBPokedexGFX2
+ farcall LoadSGBPokedexGFX2
jr .done
.decompress
@@ -873,7 +873,7 @@ Pokedex_UnownModeHandleDPadInput: ; 40610 (10:4610)
call Pokedex_UnownModeEraseCursor
call Pokedex_LoadUnownFrontpicTiles
call Pokedex_UnownModePlaceCursor
- callba PrintUnownWord
+ farcall PrintUnownWord
ld a, $1
ld [hBGMapMode], a
call DelayFrame
@@ -1479,11 +1479,11 @@ Pokedex_PrintListing: ; 40b0f (10:4b0f)
ld a, " "
call Pokedex_FillBox
-; Load de with wPokedexDataStart + [wDexListingScrollOffset]
+; Load de with wPokedexOrder + [wDexListingScrollOffset]
ld a, [wDexListingScrollOffset]
ld e, a
ld d, $0
- ld hl, wPokedexDataStart
+ ld hl, wPokedexOrder
add hl, de
ld e, l
ld d, h
@@ -1583,7 +1583,7 @@ Pokedex_GetSelectedMon: ; 40bb1
add [hl]
ld e, a
ld d, $0
- ld hl, wPokedexDataStart
+ ld hl, wPokedexOrder
add hl, de
ld a, [hl]
ld [wd265], a
@@ -1614,8 +1614,8 @@ Pokedex_CheckSeen: ; 40bd0
Pokedex_OrderMonsByMode: ; 40bdc
- ld hl, wPokedexDataStart
- ld bc, wPokedexMetadata - wPokedexDataStart
+ ld hl, wPokedexOrder
+ ld bc, wPokedexOrderEnd - wPokedexOrder
xor a
call ByteFill
ld a, [wCurrentDexMode]
@@ -1632,7 +1632,7 @@ Pokedex_OrderMonsByMode: ; 40bdc
.NewMode: ; 40bf6 (10:4bf6)
ld de, NewPokedexOrder
- ld hl, wPokedexDataStart
+ ld hl, wPokedexOrder
ld c, NUM_POKEMON
.loopnew
ld a, [de]
@@ -1644,7 +1644,7 @@ Pokedex_OrderMonsByMode: ; 40bdc
ret
.OldMode: ; 40c08 (10:4c08)
- ld hl, wPokedexDataStart
+ ld hl, wPokedexOrder
ld a, $1
ld c, NUM_POKEMON
.loopold
@@ -1656,7 +1656,7 @@ Pokedex_OrderMonsByMode: ; 40bdc
ret
.FindLastSeen: ; 40c18 (10:4c18)
- ld hl, wPokedexDataStart + NUM_POKEMON - 1
+ ld hl, wPokedexOrder + NUM_POKEMON - 1
ld d, NUM_POKEMON
ld e, d
.loopfindend
@@ -1675,7 +1675,7 @@ Pokedex_OrderMonsByMode: ; 40bdc
Pokedex_ABCMode: ; 40c30
xor a
ld [wDexListingEnd], a
- ld hl, wPokedexDataStart
+ ld hl, wPokedexOrder
ld de, AlphabeticalPokedexOrder
ld c, NUM_POKEMON
.loop1abc
@@ -1708,11 +1708,11 @@ Pokedex_ABCMode: ; 40c30
.doneabc
ret
-AlphabeticalPokedexOrder: ; 0x40c65
-INCLUDE "data/pokedex/order_alpha.asm"
-NewPokedexOrder: ; 0x40d60
-INCLUDE "data/pokedex/order_new.asm"
+INCLUDE "data/pokemon/dex_order_alpha.asm"
+
+INCLUDE "data/pokemon/dex_order_new.asm"
+
Pokedex_DisplayModeDescription: ; 40e5b
xor a
@@ -1915,8 +1915,8 @@ Pokedex_SearchForMons: ; 41086
add hl, de
ld a, [hl]
ld [wDexConvertedMonType], a
- ld hl, wPokedexDataStart
- ld de, wPokedexDataStart
+ ld hl, wPokedexOrder
+ ld de, wPokedexOrder
ld c, NUM_POKEMON
xor a
ld [wDexSearchResultCount], a
@@ -2403,13 +2403,13 @@ Pokedex_LoadSelectedMonTiles: ; 4143b
ld [CurPartySpecies], a
call GetBaseData
ld de, VTiles2
- predef GetFrontpic
+ predef GetMonFrontpic
ret
.QuestionMark:
ld a, BANK(sScratch)
call GetSRAMBank
- callba LoadQuestionMarkPic
+ farcall LoadQuestionMarkPic
ld hl, VTiles2
ld de, sScratch
ld c, 7 * 7
@@ -2477,7 +2477,7 @@ Pokedex_LoadGFX: ; 414b7
call Pokedex_InvertTiles
call Pokedex_CheckSGB
jr nz, .LoadPokedexLZ
- callba LoadSGBPokedexGFX
+ farcall LoadSGBPokedexGFX
jr .LoadPokedexSlowpokeLZ
.LoadPokedexLZ:
@@ -2556,7 +2556,7 @@ Pokedex_LoadUnownFrontpicTiles: ; 41a58 (10:5a58)
ld [CurPartySpecies], a
call GetBaseData
ld de, VTiles2 tile $00
- predef GetFrontpic
+ predef GetMonFrontpic
pop af
ld [UnownLetter], a
ret
@@ -2564,7 +2564,7 @@ Pokedex_LoadUnownFrontpicTiles: ; 41a58 (10:5a58)
_NewPokedexEntry: ; 41a7f
xor a
ld [hBGMapMode], a
- callba DrawDexEntryScreenRightEdge
+ farcall DrawDexEntryScreenRightEdge
call Pokedex_ResetBGMapMode
call DisableLCD
call LoadStandardFont
@@ -2581,12 +2581,12 @@ _NewPokedexEntry: ; 41a7f
ld bc, 19
ld a, " "
call ByteFill
- callba DisplayDexEntry
+ farcall DisplayDexEntry
call EnableLCD
call WaitBGMap
call GetBaseData
ld de, VTiles2
- predef GetFrontpic
+ predef GetMonFrontpic
ld a, SCGB_POKEDEX
call Pokedex_GetSGBLayout
ld a, [CurPartySpecies]
diff --git a/engine/pokedex_2.asm b/engine/pokedex_2.asm
new file mode 100644
index 000000000..83b366017
--- /dev/null
+++ b/engine/pokedex_2.asm
@@ -0,0 +1,286 @@
+AnimateDexSearchSlowpoke: ; 441cf
+ ld hl, .FrameIDs
+ ld b, 25
+.loop
+ ld a, [hli]
+
+ ; Wrap around
+ cp $fe
+ jr nz, .ok
+ ld hl, .FrameIDs
+ ld a, [hli]
+.ok
+
+ ld [wDexSearchSlowpokeFrame], a
+ ld a, [hli]
+ ld c, a
+ push bc
+ push hl
+ call DoDexSearchSlowpokeFrame
+ pop hl
+ pop bc
+ call DelayFrames
+ dec b
+ jr nz, .loop
+ xor a
+ ld [wDexSearchSlowpokeFrame], a
+ call DoDexSearchSlowpokeFrame
+ ld c, 32
+ call DelayFrames
+ ret
+
+.FrameIDs: ; 441fc
+ ; frame ID, duration
+ db 0, 7
+ db 1, 7
+ db 2, 7
+ db 3, 7
+ db 4, 7
+ db -2
+
+DoDexSearchSlowpokeFrame: ; 44207
+ ld a, [wDexSearchSlowpokeFrame]
+ ld hl, .SpriteData
+ ld de, Sprites
+.loop
+ ld a, [hli]
+ cp -1
+ ret z
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [wDexSearchSlowpokeFrame]
+ ld b, a
+ add a
+ add b
+ add [hl]
+ inc hl
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ jr .loop
+
+.SpriteData: ; 44228
+ dsprite 11, 0, 9, 0, $00, $00
+ dsprite 11, 0, 10, 0, $01, $00
+ dsprite 11, 0, 11, 0, $02, $00
+ dsprite 12, 0, 9, 0, $10, $00
+ dsprite 12, 0, 10, 0, $11, $00
+ dsprite 12, 0, 11, 0, $12, $00
+ dsprite 13, 0, 9, 0, $20, $00
+ dsprite 13, 0, 10, 0, $21, $00
+ dsprite 13, 0, 11, 0, $22, $00
+ db -1
+
+DisplayDexEntry: ; 4424d
+ call GetPokemonName
+ hlcoord 9, 3
+ call PlaceString ; mon species
+ ld a, [wd265]
+ ld b, a
+ call GetDexEntryPointer
+ ld a, b
+ push af
+ hlcoord 9, 5
+ call FarString ; dex species
+ ld h, b
+ ld l, c
+ push de
+; Print dex number
+ hlcoord 2, 8
+ ld a, $5c ; No
+ ld [hli], a
+ ld a, $5d ; .
+ ld [hli], a
+ ld de, wd265
+ lb bc, PRINTNUM_LEADINGZEROS | 1, 3
+ call PrintNum
+; Check to see if we caught it. Get out of here if we haven't.
+ ld a, [wd265]
+ dec a
+ call CheckCaughtMon
+ pop hl
+ pop bc
+ ret z
+; Get the height of the Pokemon.
+ ld a, [CurPartySpecies]
+ ld [CurSpecies], a
+ inc hl
+ ld a, b
+ push af
+ push hl
+ call GetFarHalfword
+ ld d, l
+ ld e, h
+ pop hl
+ inc hl
+ inc hl
+ ld a, d
+ or e
+ jr z, .skip_height
+ push hl
+ push de
+ ld hl, sp+$0
+ ld d, h
+ ld e, l
+ hlcoord 12, 7
+ lb bc, 2, PRINTNUM_MONEY | 4
+ call PrintNum
+ hlcoord 14, 7
+ ld [hl], $5e ; ft symbol
+ pop af
+ pop hl
+
+.skip_height
+ pop af
+ push af
+ inc hl
+ push hl
+ dec hl
+ call GetFarHalfword
+ ld d, l
+ ld e, h
+ ld a, e
+ or d
+ jr z, .skip_weight
+ push de
+ ld hl, sp+$0
+ ld d, h
+ ld e, l
+ hlcoord 11, 9
+ lb bc, 2, PRINTNUM_RIGHTALIGN | 5
+ call PrintNum
+ pop de
+
+.skip_weight
+; Page 1
+ lb bc, 5, SCREEN_WIDTH - 2
+ hlcoord 2, 11
+ call ClearBox
+ hlcoord 1, 10
+ ld bc, SCREEN_WIDTH - 1
+ ld a, $61 ; horizontal divider
+ call ByteFill
+ ; page number
+ hlcoord 1, 9
+ ld [hl], $55
+ inc hl
+ ld [hl], $55
+ hlcoord 1, 10
+ ld [hl], $56 ; P.
+ inc hl
+ ld [hl], $57 ; 1
+ pop de
+ inc de
+ pop af
+ hlcoord 2, 11
+ push af
+ call FarString
+ pop bc
+ ld a, [wPokedexStatus]
+ or a
+ ret z
+
+; Page 2
+ push bc
+ push de
+ lb bc, 5, SCREEN_WIDTH - 2
+ hlcoord 2, 11
+ call ClearBox
+ hlcoord 1, 10
+ ld bc, SCREEN_WIDTH - 1
+ ld a, $61
+ call ByteFill
+ ; page number
+ hlcoord 1, 9
+ ld [hl], $55
+ inc hl
+ ld [hl], $55
+ hlcoord 1, 10
+ ld [hl], $56 ; P.
+ inc hl
+ ld [hl], $58 ; 2
+ pop de
+ inc de
+ pop af
+ hlcoord 2, 11
+ call FarString
+ ret
+
+String_44331: ; 44331
+ db "#@"
+
+GetDexEntryPointer: ; 44333
+; return dex entry pointer b:de
+ push hl
+ ld hl, PokedexDataPointerTable
+ ld a, b
+ dec a
+ ld d, 0
+ ld e, a
+ add hl, de
+ add hl, de
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ push de
+ rlca
+ rlca
+ and $3
+ ld hl, .PokedexEntryBanks
+ ld d, 0
+ ld e, a
+ add hl, de
+ ld b, [hl]
+ pop de
+ pop hl
+ ret
+
+.PokedexEntryBanks: ; 44351
+
+GLOBAL PokedexEntries1
+GLOBAL PokedexEntries2
+GLOBAL PokedexEntries3
+GLOBAL PokedexEntries4
+
+ db BANK(PokedexEntries1)
+ db BANK(PokedexEntries2)
+ db BANK(PokedexEntries3)
+ db BANK(PokedexEntries4)
+
+GetDexEntryPagePointer: ; 44355
+ call GetDexEntryPointer ; b:de
+ push hl
+ ld h, d
+ ld l, e
+; skip species name
+.loop1
+ ld a, b
+ call GetFarByte
+ inc hl
+ cp "@"
+ jr nz, .loop1
+; skip height and weight
+rept 4
+ inc hl
+endr
+; if c != 1: skip entry
+ dec c
+ jr z, .done
+; skip entry
+.loop2
+ ld a, b
+ call GetFarByte
+ inc hl
+ cp "@"
+ jr nz, .loop2
+
+.done
+ ld d, h
+ ld e, l
+ pop hl
+ ret
diff --git a/engine/pokedex_3.asm b/engine/pokedex_3.asm
new file mode 100644
index 000000000..3414252c1
--- /dev/null
+++ b/engine/pokedex_3.asm
@@ -0,0 +1,162 @@
+LoadSGBPokedexGFX: ; 1ddf1c
+ ld hl, SGBPokedexGFX_LZ
+ ld de, VTiles2 tile $31
+ call Decompress
+ ret
+
+LoadSGBPokedexGFX2: ; 1ddf26 (77:5f26)
+ ld hl, SGBPokedexGFX_LZ
+ ld de, VTiles2 tile $31
+ lb bc, BANK(SGBPokedexGFX_LZ), $3a
+ call DecompressRequest2bpp
+ ret
+
+SGBPokedexGFX_LZ: ; 1ddf33
+INCBIN "gfx/pokedex/sgb.2bpp.lz"
+
+LoadQuestionMarkPic: ; 1de0d7
+ ld hl, .QuestionMarkLZ
+ ld de, sScratch
+ call Decompress
+ ret
+
+.QuestionMarkLZ: ; 1de0e1
+INCBIN "gfx/pics/questionmark/front.2bpp.lz"
+
+DrawPokedexListWindow: ; 1de171 (77:6171)
+ ld a, $32
+ hlcoord 0, 17
+ ld bc, 12
+ call ByteFill
+ hlcoord 0, 1
+ lb bc, 15, 11
+ call ClearBox
+ ld a, $34
+ hlcoord 0, 0
+ ld bc, 11
+ call ByteFill
+ ld a, $39
+ hlcoord 0, 16
+ ld bc, 11
+ call ByteFill
+ hlcoord 5, 0
+ ld [hl], $3f
+ hlcoord 5, 16
+ ld [hl], $40
+ ld a, [wCurrentDexMode]
+ cp DEXMODE_OLD
+ jr z, .OldMode
+; scroll bar
+ hlcoord 11, 0
+ ld [hl], $50
+ ld a, $51
+ hlcoord 11, 1
+ ld b, SCREEN_HEIGHT - 3
+ call Bank77_FillColumn
+ ld [hl], $52
+ jr .Done
+
+.OldMode:
+; no scroll bar
+ hlcoord 11, 0
+ ld [hl], $66
+ ld a, $67
+ hlcoord 11, 1
+ ld b, SCREEN_HEIGHT - 3
+ call Bank77_FillColumn
+ ld [hl], $68
+.Done:
+ ret
+
+DrawPokedexSearchResultsWindow: ; 1de1d1 (77:61d1)
+ ld a, $34
+ hlcoord 0, 0
+ ld bc, 11
+ call ByteFill
+ ld a, $39
+ hlcoord 0, 10
+ ld bc, 11
+ call ByteFill
+ hlcoord 5, 0
+ ld [hl], $3f
+ hlcoord 5, 10
+ ld [hl], $40
+ hlcoord 11, 0
+ ld [hl], $66
+ ld a, $67
+ hlcoord 11, 1
+ ld b, SCREEN_HEIGHT / 2
+ call Bank77_FillColumn
+ ld [hl], $68
+ ld a, $34
+ hlcoord 0, 11
+ ld bc, 11
+ call ByteFill
+ ld a, $39
+ hlcoord 0, 17
+ ld bc, 11
+ call ByteFill
+ hlcoord 11, 11
+ ld [hl], $66
+ ld a, $67
+ hlcoord 11, 12
+ ld b, 5
+ call Bank77_FillColumn
+ ld [hl], $68
+ hlcoord 0, 12
+ lb bc, 5, 11
+ call ClearBox
+ ld de, .esults_D
+ hlcoord 0, 12
+ call PlaceString
+ ret
+
+.esults_D ; 1de23c
+; (SEARCH R)
+ db "ESULTS"
+ next ""
+; (### FOUN)
+ next "D!@"
+
+DrawDexEntryScreenRightEdge: ; 1de247
+ ld a, [hBGMapAddress]
+ ld l, a
+ ld a, [hBGMapAddress + 1]
+ ld h, a
+ push hl
+ inc hl
+ ld a, l
+ ld [hBGMapAddress], a
+ ld a, h
+ ld [hBGMapAddress + 1], a
+ hlcoord 19, 0
+ ld [hl], $66
+ hlcoord 19, 1
+ ld a, $67
+ ld b, 15
+ call Bank77_FillColumn
+ ld [hl], $68
+ hlcoord 19, 17
+ ld [hl], $3c
+ xor a
+ ld b, SCREEN_HEIGHT
+ hlcoord 19, 0, AttrMap
+ call Bank77_FillColumn
+ call WaitBGMap2
+ pop hl
+ ld a, l
+ ld [hBGMapAddress], a
+ ld a, h
+ ld [hBGMapAddress + 1], a
+ ret
+
+Bank77_FillColumn: ; 1de27f
+ push de
+ ld de, SCREEN_WIDTH
+.loop
+ ld [hl], a
+ add hl, de
+ dec b
+ jr nz, .loop
+ pop de
+ ret
diff --git a/engine/pokegear.asm b/engine/pokegear.asm
index 8e5697f75..2529e3b0e 100755
--- a/engine/pokegear.asm
+++ b/engine/pokegear.asm
@@ -20,7 +20,7 @@ PokeGear: ; 90b8d (24:4b8d)
bit 7, a
jr nz, .done
call PokegearJumptable
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
call DelayFrame
jr .loop
@@ -55,7 +55,7 @@ PokeGear: ; 90b8d (24:4b8d)
ld a, $7
ld [hWX], a
call Pokegear_LoadGFX
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call InitPokegearModeIndicatorArrow
ld a, 8
call SkipMusic
@@ -106,7 +106,7 @@ Pokegear_LoadGFX: ; 90c4e
call GetWorldMapLocation
cp FAST_SHIP
jr z, .ssaqua
- callba GetPlayerIcon
+ farcall GetPlayerIcon
push de
ld h, d
ld l, e
@@ -136,12 +136,12 @@ Pokegear_LoadGFX: ; 90c4e
; 90cb2
FastShipGFX: ; 90cb2
-INCBIN "gfx/misc/fast_ship.2bpp"
+INCBIN "gfx/pokegear/fast_ship.2bpp"
; 90d32
InitPokegearModeIndicatorArrow: ; 90d32 (24:4d32)
depixel 4, 2, 4, 0
- ld a, SPRITE_ANIM_INDEX_0D
+ ld a, SPRITE_ANIM_INDEX_POKEGEAR_ARROW
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
@@ -239,7 +239,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8)
.return_from_jumptable
call Pokegear_FinishTilemap
- callba TownMapPals
+ farcall TownMapPals
ld a, [wcf65]
and a
jr nz, .kanto_0
@@ -319,7 +319,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8)
.kanto
ld e, 1
.ok
- callba PokegearMap
+ farcall PokegearMap
ld a, $7
ld bc, $12
hlcoord 1, 2
@@ -513,7 +513,7 @@ Pokegear_UpdateClock: ; 90f86 (24:4f86)
ld a, [hMinutes]
ld c, a
decoord 6, 8
- callba PrintHoursMins
+ farcall PrintHoursMins
ld hl, .DayText
bccoord 6, 6
call PlaceHLTextAtBC
@@ -670,7 +670,7 @@ PokegearMap_InitPlayerIcon: ; 9106a
pop af
ld e, a
push bc
- callba GetLandmarkCoords
+ farcall GetLandmarkCoords
pop bc
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
@@ -685,7 +685,7 @@ PokegearMap_InitPlayerIcon: ; 9106a
PokegearMap_InitCursor: ; 91098
push af
depixel 0, 0
- ld a, SPRITE_ANIM_INDEX_0D
+ ld a, SPRITE_ANIM_INDEX_POKEGEAR_ARROW
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
@@ -709,9 +709,9 @@ PokegearMap_UpdateLandmarkName: ; 910b4
pop af
ld e, a
push de
- callba GetLandmarkName
+ farcall GetLandmarkName
pop de
- callba TownMap_ConvertLineBreakCharacters
+ farcall TownMap_ConvertLineBreakCharacters
hlcoord 8, 0
ld [hl], $34
ret
@@ -721,7 +721,7 @@ PokegearMap_UpdateLandmarkName: ; 910b4
PokegearMap_UpdateCursorPosition: ; 910d4
push bc
ld e, a
- callba GetLandmarkCoords
+ farcall GetLandmarkCoords
pop bc
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
@@ -751,7 +751,7 @@ TownMap_GetKantoLandmarkLimits: ; 910e8
PokegearRadio_Init: ; 910f9 (24:50f9)
call InitPokegearTilemap
depixel 4, 10, 4, 4
- ld a, SPRITE_ANIM_INDEX_14
+ ld a, SPRITE_ANIM_INDEX_RADIO_TUNING_KNOB
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
@@ -929,7 +929,7 @@ PokegearPhone_MakePhoneCall: ; 911eb (24:51eb)
ret
.no_service
- callba Phone_NoSignal
+ farcall Phone_NoSignal
ld hl, .OutOfServiceArea
call PrintText
ld a, $8
@@ -958,7 +958,7 @@ PokegearPhone_FinishPhoneCall: ; 91256 (24:5256)
ld a, [hJoyPressed]
and A_BUTTON | B_BUTTON
ret z
- callba HangUp
+ farcall HangUp
ld a, $8
ld [wJumptableIndex], a
ld hl, PokegearText_WhomToCall
@@ -1121,7 +1121,7 @@ PokegearPhoneContactSubmenu: ; 91342 (24:5342)
ld d, 0
add hl, de
ld c, [hl]
- callba CheckCanDeletePhoneNumber
+ farcall CheckCanDeletePhoneNumber
ld a, c
and a
jr z, .cant_delete
@@ -1407,7 +1407,7 @@ PokegearText_DeleteStoredNumber: ; 0x914d8
; 0x914dd
PokegearSpritesGFX: ; 914dd
-INCBIN "gfx/misc/pokegear_sprites.2bpp.lz"
+INCBIN "gfx/pokegear/pokegear_sprites.2bpp.lz"
; 9150d
RadioTilemapRLE: ; 9150d
@@ -1619,8 +1619,8 @@ RadioChannels:
LoadStation_OaksPokemonTalk: ; 91753 (24:5753)
xor a ; OAKS_POKEMON_TALK
- ld [wd002], a
- ld [wd005], a
+ ld [wCurrentRadioLine], a
+ ld [wNumRadioLinesPrinted], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
@@ -1629,9 +1629,9 @@ LoadStation_OaksPokemonTalk: ; 91753 (24:5753)
LoadStation_PokedexShow: ; 91766 (24:5766)
ld a, POKEDEX_SHOW
- ld [wd002], a
+ ld [wCurrentRadioLine], a
xor a
- ld [wd005], a
+ ld [wNumRadioLinesPrinted], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
@@ -1640,9 +1640,9 @@ LoadStation_PokedexShow: ; 91766 (24:5766)
LoadStation_PokemonMusic: ; 9177b (24:577b)
ld a, POKEMON_MUSIC
- ld [wd002], a
+ ld [wCurrentRadioLine], a
xor a
- ld [wd005], a
+ ld [wNumRadioLinesPrinted], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
@@ -1651,9 +1651,9 @@ LoadStation_PokemonMusic: ; 9177b (24:577b)
LoadStation_LuckyChannel: ; 91790 (24:5790)
ld a, LUCKY_CHANNEL
- ld [wd002], a
+ ld [wCurrentRadioLine], a
xor a
- ld [wd005], a
+ ld [wNumRadioLinesPrinted], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
@@ -1662,9 +1662,9 @@ LoadStation_LuckyChannel: ; 91790 (24:5790)
LoadStation_BuenasPassword: ; 917a5 (24:57a5)
ld a, BUENAS_PASSWORD
- ld [wd002], a
+ ld [wCurrentRadioLine], a
xor a
- ld [wd005], a
+ ld [wNumRadioLinesPrinted], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
@@ -1682,20 +1682,20 @@ NotBuenasPasswordName: db "@"
LoadStation_UnownRadio: ; 917d5 (24:57d5)
ld a, UNOWN_RADIO
- ld [wd002], a
+ ld [wCurrentRadioLine], a
xor a
- ld [wd005], a
+ ld [wNumRadioLinesPrinted], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
- ld de, UnknownStationName
+ ld de, UnownStationName
ret
LoadStation_PlacesAndPeople: ; 917ea (24:57ea)
ld a, PLACES_AND_PEOPLE
- ld [wd002], a
+ ld [wCurrentRadioLine], a
xor a
- ld [wd005], a
+ ld [wNumRadioLinesPrinted], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
@@ -1704,9 +1704,9 @@ LoadStation_PlacesAndPeople: ; 917ea (24:57ea)
LoadStation_LetsAllSing: ; 917ff (24:57ff)
ld a, LETS_ALL_SING
- ld [wd002], a
+ ld [wCurrentRadioLine], a
xor a
- ld [wd005], a
+ ld [wNumRadioLinesPrinted], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
@@ -1717,9 +1717,9 @@ LoadStation_LetsAllSing: ; 917ff (24:57ff)
LoadStation_RocketRadio: ; 91814
ld a, ROCKET_RADIO
- ld [wd002], a
+ ld [wCurrentRadioLine], a
xor a
- ld [wd005], a
+ ld [wNumRadioLinesPrinted], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
@@ -1730,9 +1730,9 @@ LoadStation_RocketRadio: ; 91814
LoadStation_PokeFluteRadio: ; 91829 (24:5829)
ld a, POKE_FLUTE_RADIO
- ld [wd002], a
+ ld [wCurrentRadioLine], a
xor a
- ld [wd005], a
+ ld [wNumRadioLinesPrinted], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
@@ -1741,13 +1741,13 @@ LoadStation_PokeFluteRadio: ; 91829 (24:5829)
LoadStation_EvolutionRadio: ; 9183e (24:583e)
ld a, EVOLUTION_RADIO
- ld [wd002], a
+ ld [wCurrentRadioLine], a
xor a
- ld [wd005], a
+ ld [wNumRadioLinesPrinted], a
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
- ld de, UnknownStationName
+ ld de, UnownStationName
ret
; 91853 (24:5853)
@@ -1821,7 +1821,7 @@ OaksPkmnTalkName: db "OAK's <PK><MN> Talk@"
PokedexShowName: db "#DEX Show@"
PokemonMusicName: db "#MON Music@"
LuckyChannelName: db "Lucky Channel@"
-UnknownStationName: db "?????@"
+UnownStationName: db "?????@"
PlacesAndPeopleName: db "Places & People@"
LetsAllSingName: db "Let's All Sing!@"
@@ -1849,26 +1849,26 @@ _TownMap: ; 9191c
call ClearSprites
call DisableLCD
call Pokegear_LoadGFX
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld a, 8
call SkipMusic
ld a, $e3
ld [rLCDC], a
call TownMap_GetCurrentLandmark
- ld [wd002], a
- ld [wd003], a
+ ld [wTownMapPlayerIconLandmark], a
+ ld [wTownMapCursorLandmark], a
xor a
ld [hBGMapMode], a
call .InitTilemap
call WaitBGMap2
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
call PokegearMap_InitPlayerIcon
- ld a, [wd003]
+ ld a, [wTownMapCursorLandmark]
call PokegearMap_InitCursor
ld a, c
- ld [wd004], a
+ ld [wTownMapCursorObjectPointer], a
ld a, b
- ld [wd005], a
+ ld [wTownMapCursorObjectPointer + 1], a
ld b, SCGB_POKEGEAR_PALS
call GetSGBLayout
call SetPalettes
@@ -1880,7 +1880,7 @@ _TownMap: ; 9191c
call DelayFrame
.dmg
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
cp KANTO_LANDMARK
jr nc, .kanto
ld d, KANTO_LANDMARK - 1
@@ -1919,13 +1919,13 @@ _TownMap: ; 9191c
jr nz, .pressed_down
.loop2
push de
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
pop de
call DelayFrame
jr .loop
.pressed_up
- ld hl, wd003
+ ld hl, wTownMapCursorLandmark
ld a, [hl]
cp d
jr c, .okay
@@ -1938,7 +1938,7 @@ _TownMap: ; 9191c
jr .next
.pressed_down
- ld hl, wd003
+ ld hl, wTownMapCursorLandmark
ld a, [hl]
cp e
jr nz, .okay2
@@ -1951,20 +1951,20 @@ _TownMap: ; 9191c
.next
push de
- ld a, [wd003]
+ ld a, [wTownMapCursorLandmark]
call PokegearMap_UpdateLandmarkName
- ld a, [wd004]
+ ld a, [wTownMapCursorObjectPointer]
ld c, a
- ld a, [wd005]
+ ld a, [wTownMapCursorObjectPointer + 1]
ld b, a
- ld a, [wd003]
+ ld a, [wTownMapCursorLandmark]
call PokegearMap_UpdateCursorPosition
pop de
jr .loop2
; 91a04
.InitTilemap: ; 91a04
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
cp KANTO_LANDMARK
jr nc, .kanto2
ld e, $0
@@ -1973,7 +1973,7 @@ _TownMap: ; 9191c
.kanto2
ld e, $1
.okay_tilemap
- callba PokegearMap
+ farcall PokegearMap
ld a, $7
ld bc, 6
hlcoord 1, 0
@@ -1992,9 +1992,9 @@ _TownMap: ; 9191c
call ByteFill
hlcoord 19, 2
ld [hl], $17
- ld a, [wd003]
+ ld a, [wTownMapCursorLandmark]
call PokegearMap_UpdateLandmarkName
- callba TownMapPals
+ farcall TownMapPals
ret
; 91a53
@@ -2116,7 +2116,7 @@ _FlyMap: ; 91af3
ld [hl], $1
xor a
ld [hBGMapMode], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call LoadTownMapGFX
ld de, FlyMapLabelBorderGFX
ld hl, VTiles2 tile $30
@@ -2138,7 +2138,7 @@ _FlyMap: ; 91af3
jr nz, .pressedA
call FlyMapScroll
call GetMapCursorCoordinates
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
call DelayFrame
jr .loop
@@ -2147,7 +2147,7 @@ _FlyMap: ; 91af3
jr .exit
.pressedA
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
ld l, a
ld h, 0
add hl, hl
@@ -2155,7 +2155,7 @@ _FlyMap: ; 91af3
add hl, de
ld a, [hl]
.exit
- ld [wd002], a
+ ld [wTownMapPlayerIconLandmark], a
pop af
ld [hInMenu], a
call ClearBGPalettes
@@ -2165,7 +2165,7 @@ _FlyMap: ; 91af3
ld [hBGMapAddress], a
ld a, VBGMap0 / $100
ld [hBGMapAddress + 1], a
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
ld e, a
ret
@@ -2186,7 +2186,7 @@ FlyMapScroll: ; 91b73
ret
.ScrollNext:
- ld hl, wd002
+ ld hl, wTownMapPlayerIconLandmark
ld a, [hl]
cp d
jr nz, .NotAtEndYet
@@ -2200,7 +2200,7 @@ FlyMapScroll: ; 91b73
jr .Finally
.ScrollPrev:
- ld hl, wd002
+ ld hl, wTownMapPlayerIconLandmark
ld a, [hl]
cp e
jr nz, .NotAtStartYet
@@ -2269,14 +2269,14 @@ TownMapBubble: ; 91bb5
.Name:
; We need the map location of the default flypoint
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
ld l, a
ld h, 0
add hl, hl ; two bytes per flypoint
ld de, Flypoints
add hl, de
ld e, [hl]
- callba GetLandmarkName
+ farcall GetLandmarkName
hlcoord 2, 1
ld de, StringBuffer1
call PlaceString
@@ -2285,17 +2285,17 @@ TownMapBubble: ; 91bb5
; 91c17
GetMapCursorCoordinates: ; 91c17
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
ld l, a
ld h, $0
add hl, hl
ld de, Flypoints
add hl, de
ld e, [hl]
- callba GetLandmarkCoords
- ld a, [wd003]
+ farcall GetLandmarkCoords
+ ld a, [wTownMapCursorCoordinates]
ld c, a
- ld a, [wd004]
+ ld a, [wTownMapCursorCoordinates + 1]
ld b, a
ld hl, $4
add hl, bc
@@ -2338,44 +2338,7 @@ HasVisitedSpawn: ; 91c50
; 91c5e
-Flypoints: ; 91c5e
-; landmark, spawn point
- const_def
-flypoint: MACRO
- const FLY_\1
- db \2, SPAWN_\1
-ENDM
-; Johto
- flypoint NEW_BARK, NEW_BARK_TOWN
- flypoint CHERRYGROVE, CHERRYGROVE_CITY
- flypoint VIOLET, VIOLET_CITY
- flypoint AZALEA, AZALEA_TOWN
- flypoint GOLDENROD, GOLDENROD_CITY
- flypoint ECRUTEAK, ECRUTEAK_CITY
- flypoint OLIVINE, OLIVINE_CITY
- flypoint CIANWOOD, CIANWOOD_CITY
- flypoint MAHOGANY, MAHOGANY_TOWN
- flypoint LAKE, LAKE_OF_RAGE
- flypoint BLACKTHORN, BLACKTHORN_CITY
- flypoint MT_SILVER, SILVER_CAVE
-; Kanto
-
-KANTO_FLYPOINT EQU const_value
- flypoint PALLET, PALLET_TOWN
- flypoint VIRIDIAN, VIRIDIAN_CITY
- flypoint PEWTER, PEWTER_CITY
- flypoint CERULEAN, CERULEAN_CITY
- flypoint VERMILION, VERMILION_CITY
- flypoint ROCK_TUNNEL, ROCK_TUNNEL
- flypoint LAVENDER, LAVENDER_TOWN
- flypoint CELADON, CELADON_CITY
- flypoint SAFFRON, SAFFRON_CITY
- flypoint FUCHSIA, FUCHSIA_CITY
- flypoint CINNABAR, CINNABAR_ISLAND
- flypoint INDIGO, INDIGO_PLATEAU
- db -1
-
-; 91c8f
+INCLUDE "data/flypoints.asm"
ret_91c8f: ; 91c8f
ret
@@ -2389,8 +2352,7 @@ FlyMap: ; 91c90
ld c, a
call GetWorldMapLocation
; If we're not in a valid location, i.e. Pokecenter floor 2F,
-
-; the backup map information is used
+; the backup map information is used.
cp SPECIAL_MAP
jr nz, .CheckRegion
ld a, [BackupMapGroup]
@@ -2399,7 +2361,7 @@ FlyMap: ; 91c90
ld c, a
call GetWorldMapLocation
.CheckRegion:
-; The first 46 locations are part of Johto. The rest are in Kanto
+; The first 46 locations are part of Johto. The rest are in Kanto.
cp KANTO_LANDMARK
jr nc, .KantoFlyMap
.JohtoFlyMap:
@@ -2407,10 +2369,10 @@ FlyMap: ; 91c90
push af
; Start from New Bark Town
ld a, FLY_NEW_BARK
- ld [wd002], a
+ ld [wTownMapPlayerIconLandmark], a
; Flypoints begin at New Bark Town...
ld [StartFlypoint], a
-; ..and end at Silver Cave
+; ..and end at Silver Cave.
ld a, FLY_MT_SILVER
ld [EndFlypoint], a
; Fill out the map
@@ -2422,17 +2384,13 @@ FlyMap: ; 91c90
.KantoFlyMap:
; The event that there are no flypoints enabled in a map is not
-
; accounted for. As a result, if you attempt to select a flypoint
; when there are none enabled, the game will crash. Additionally,
-
; the flypoint selection has a default starting point that
-; can be flown to even if none are enabled
-
+; can be flown to even if none are enabled.
; To prevent both of these things from happening when the player
; enters Kanto, fly access is restricted until Indigo Plateau is
-
-; visited and its flypoint enabled
+; visited and its flypoint enabled.
push af
ld c, SPAWN_INDIGO
call HasVisitedSpawn
@@ -2447,9 +2405,8 @@ FlyMap: ; 91c90
ld a, FLY_INDIGO
ld [EndFlypoint], a
; Because Indigo Plateau is the first flypoint the player
-
-; visits, it's made the default flypoint
- ld [wd002], a
+; visits, it's made the default flypoint.
+ ld [wTownMapPlayerIconLandmark], a
; Fill out the map
call FillKantoMap
call .MapHud
@@ -2462,7 +2419,7 @@ FlyMap: ; 91c90
; Start from New Bark Town
ld a, FLY_NEW_BARK
- ld [wd002], a
+ ld [wTownMapPlayerIconLandmark], a
; Flypoints begin at New Bark Town...
ld [StartFlypoint], a
; ..and end at Silver Cave
@@ -2477,21 +2434,21 @@ FlyMap: ; 91c90
call TownMapBGUpdate
call TownMapMon
ld a, c
- ld [wd003], a
+ ld [wTownMapCursorCoordinates], a
ld a, b
- ld [wd004], a
+ ld [wTownMapCursorCoordinates + 1], a
ret
; 91d11
_Area: ; 91d11
; e: Current landmark
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
push af
- ld a, [wd003]
+ ld a, [wTownMapCursorLandmark]
push af
ld a, e
- ld [wd002], a
+ ld [wTownMapPlayerIconLandmark], a
call ClearSprites
xor a
ld [hBGMapMode], a
@@ -2545,9 +2502,9 @@ _Area: ; 91d11
.a_b
call ClearSprites
pop af
- ld [wd003], a
+ ld [wTownMapCursorLandmark], a
pop af
- ld [wd002], a
+ ld [wTownMapPlayerIconLandmark], a
ret
; 91d9b
@@ -2636,9 +2593,9 @@ _Area: ; 91d11
; 91e1e
.GetAndPlaceNest: ; 91e1e
- ld [wd003], a
+ ld [wTownMapCursorLandmark], a
ld e, a
- callba FindNest ; load nest landmarks into TileMap[0,0]
+ farcall FindNest ; load nest landmarks into TileMap[0,0]
decoord 0, 0
ld hl, Sprites
.nestloop
@@ -2648,7 +2605,7 @@ _Area: ; 91d11
push de
ld e, a
push hl
- callba GetLandmarkCoords
+ farcall GetLandmarkCoords
pop hl
; load into OAM
ld a, d
@@ -2678,9 +2635,9 @@ _Area: ; 91d11
.HideNestsShowPlayer: ; 91e5a
call .CheckPlayerLocation
ret c
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
ld e, a
- callba GetLandmarkCoords
+ farcall GetLandmarkCoords
ld c, e
ld b, d
ld de, .PlayerOAM
@@ -2731,22 +2688,21 @@ _Area: ; 91d11
.CheckPlayerLocation: ; 91ea9
; Don't show the player's sprite if you're
-
; not in the same region as what's currently
; on the screen.
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
cp FAST_SHIP
jr z, .johto
cp KANTO_LANDMARK
jr c, .johto
.kanto
- ld a, [wd003]
+ ld a, [wTownMapCursorLandmark]
and a
jr z, .clear
jr .ok
.johto
- ld a, [wd003]
+ ld a, [wTownMapCursorLandmark]
and a
jr nz, .clear
.ok
@@ -2764,10 +2720,10 @@ _Area: ; 91d11
; 91ed0
.GetPlayerOrFastShipIcon: ; 91ed0
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
cp FAST_SHIP
jr z, .FastShip
- callba GetPlayerIcon
+ farcall GetPlayerIcon
ret
.FastShip:
@@ -2879,19 +2835,7 @@ TownMapPals: ; 91f13
ret
.PalMap:
-townmappals: MACRO
-rept _NARG / 2
- dn \2, \1
- shift
- shift
-endr
-endm
- townmappals 1, 1, 1, 2, 2, 2, 0, 0, 1, 1, 3, 1, 4, 5, 4, 5
- townmappals 1, 1, 1, 2, 2, 2, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0
- townmappals 1, 1, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- townmappals 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0
- townmappals 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0
- townmappals 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0
+INCLUDE "data/palettes/town_map.asm"
; 91f7b
TownMapMon: ; 91f7b
@@ -2907,10 +2851,10 @@ TownMapMon: ; 91f7b
ld [wd265], a
; Get FlyMon icon
ld e, 8 ; starting tile in VRAM
- callba GetSpeciesIcon
+ farcall GetSpeciesIcon
; Animation/palette
depixel 0, 0
- ld a, SPRITE_ANIM_INDEX_00
+ ld a, SPRITE_ANIM_INDEX_PARTY_MON
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
@@ -2925,7 +2869,7 @@ TownMapMon: ; 91f7b
TownMapPlayerIcon: ; 91fa6
; Draw the player icon at town map location in a
push af
- callba GetPlayerIcon
+ farcall GetPlayerIcon
; Standing icon
ld hl, VTiles0 tile $10
ld c, 4 ; # tiles
@@ -2955,7 +2899,7 @@ TownMapPlayerIcon: ; 91fa6
pop af
ld e, a
push bc
- callba GetLandmarkCoords
+ farcall GetLandmarkCoords
pop bc
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
@@ -2977,11 +2921,11 @@ LoadTownMapGFX: ; 91ff2
; 91fff
JohtoMap: ; 91fff
-INCBIN "gfx/misc/johto.bin"
+INCBIN "gfx/pokegear/johto.bin"
; 92168
KantoMap: ; 92168
-INCBIN "gfx/misc/kanto.bin"
+INCBIN "gfx/pokegear/kanto.bin"
; 922d1
PokedexNestIconGFX: ; 922d1
@@ -2991,7 +2935,7 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp"
; XXX
xor a
- ld [wd002], a
+ ld [wTownMapPlayerIconLandmark], a
call ClearBGPalettes
call ClearTileMap
call ClearSprites
@@ -3001,7 +2945,7 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp"
ld [hl], $1
xor a
ld [hBGMapMode], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
call LoadTownMapGFX
ld de, FlyMapLabelBorderGFX
ld hl, VTiles2 tile $30
@@ -3019,9 +2963,9 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp"
call TownMapBGUpdate
call TownMapMon
ld a, c
- ld [wd003], a
+ ld [wTownMapCursorCoordinates], a
ld a, b
- ld [wd004], a
+ ld [wTownMapCursorCoordinates + 1], a
ld b, SCGB_POKEGEAR_PALS
call GetSGBLayout
call SetPalettes
@@ -3036,7 +2980,7 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp"
jr nz, .pressedA
call .HandleDPad
call GetMapCursorCoordinates
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
call DelayFrame
jr .loop
@@ -3045,7 +2989,7 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp"
jr .finished_a_b
.pressedA
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
ld l, a
ld h, 0
add hl, hl
@@ -3053,7 +2997,7 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp"
add hl, de
ld a, [hl]
.finished_a_b
- ld [wd002], a
+ ld [wTownMapPlayerIconLandmark], a
pop af
ld [hInMenu], a
call ClearBGPalettes
@@ -3063,7 +3007,7 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp"
ld [hBGMapAddress], a
ld a, VBGMap0 / $100
ld [hBGMapAddress + 1], a
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
ld e, a
ret
@@ -3080,7 +3024,7 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp"
ret
.down_right
- ld hl, wd002
+ ld hl, wTownMapPlayerIconLandmark
ld a, [hl]
cp FLY_INDIGO
jr c, .okay_dr
@@ -3090,7 +3034,7 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp"
jr .continue
.up_left
- ld hl, wd002
+ ld hl, wTownMapPlayerIconLandmark
ld a, [hl]
and a
jr nz, .okay_ul
@@ -3098,7 +3042,7 @@ INCBIN "gfx/pokegear/flymap_label_border.1bpp"
.okay_ul
dec [hl]
.continue
- ld a, [wd002]
+ ld a, [wTownMapPlayerIconLandmark]
cp KANTO_FLYPOINT
jr c, .johto
call FillKantoMap
diff --git a/engine/pokepic.asm b/engine/pokepic.asm
index 2530ae4c9..ea5b3c300 100755
--- a/engine/pokepic.asm
+++ b/engine/pokepic.asm
@@ -12,7 +12,7 @@ Pokepic:: ; 244e3
ld [CurSpecies], a
call GetBaseData
ld de, VTiles1
- predef GetFrontpic
+ predef GetMonFrontpic
ld a, [wMenuBorderTopCoord]
inc a
ld b, a
diff --git a/engine/pokerus/apply_pokerus_tick.asm b/engine/pokerus/apply_pokerus_tick.asm
new file mode 100644
index 000000000..3c97fdc5e
--- /dev/null
+++ b/engine/pokerus/apply_pokerus_tick.asm
@@ -0,0 +1,26 @@
+ApplyPokerusTick: ; 13988
+; decreases all pokemon's pokerus counter by b. if the lower nybble reaches zero, the pokerus is cured.
+ ld hl, PartyMon1PokerusStatus ; PartyMon1 + MON_PKRS
+ ld a, [PartyCount]
+ and a
+ ret z ; make sure it's not wasting time on an empty party
+ ld c, a
+.loop
+ ld a, [hl]
+ and $f ; lower nybble is the number of days remaining
+ jr z, .next ; if already 0, skip
+ sub b ; subtract the number of days
+ jr nc, .ok ; max(result, 0)
+ xor a
+.ok
+ ld d, a ; back up this value because we need to preserve the strain (upper nybble)
+ ld a, [hl]
+ and $f0
+ add d
+ ld [hl], a ; this prevents a cured pokemon from recontracting pokerus
+.next
+ ld de, PARTYMON_STRUCT_LENGTH
+ add hl, de
+ dec c
+ jr nz, .loop
+ ret
diff --git a/engine/pokerus/check_pokerus.asm b/engine/pokerus/check_pokerus.asm
new file mode 100644
index 000000000..285024754
--- /dev/null
+++ b/engine/pokerus/check_pokerus.asm
@@ -0,0 +1,25 @@
+CheckPokerus: ; 4d860
+; Return carry if a monster in your party has Pokerus
+
+; Get number of monsters to iterate over
+ ld a, [PartyCount]
+ and a
+ jr z, .NoPokerus
+ ld b, a
+; Check each monster in the party for Pokerus
+ ld hl, PartyMon1PokerusStatus
+ ld de, PARTYMON_STRUCT_LENGTH
+.Check:
+ ld a, [hl]
+ and $0f ; only the bottom nybble is used
+ jr nz, .HasPokerus
+; Next PartyMon
+ add hl, de
+ dec b
+ jr nz, .Check
+.NoPokerus:
+ and a
+ ret
+.HasPokerus:
+ scf
+ ret
diff --git a/engine/pokerus/pokerus.asm b/engine/pokerus/pokerus.asm
new file mode 100644
index 000000000..3e5e094e4
--- /dev/null
+++ b/engine/pokerus/pokerus.asm
@@ -0,0 +1,160 @@
+GivePokerusAndConvertBerries: ; 2ed44
+ call ConvertBerriesToBerryJuice
+ ld hl, PartyMon1PokerusStatus
+ ld a, [PartyCount]
+ ld b, a
+ ld de, PARTYMON_STRUCT_LENGTH
+; Check to see if any of your Pokemon already has Pokerus.
+; If so, sample its spread through your party.
+; This means that you cannot get Pokerus de novo while
+; a party member has an active infection.
+.loopMons
+ ld a, [hl]
+ and $f
+ jr nz, .TrySpreadPokerus
+ add hl, de
+ dec b
+ jr nz, .loopMons
+
+; If we haven't been to Goldenrod City at least once,
+; prevent the contraction of Pokerus.
+ ld hl, StatusFlags2
+ bit 6, [hl]
+ ret z
+ call Random
+ ld a, [hRandomAdd]
+ and a
+ ret nz
+ ld a, [hRandomSub]
+ cp $3
+ ret nc ; 3/65536 chance (00 00, 00 01 or 00 02)
+ ld a, [PartyCount]
+ ld b, a
+.randomMonSelectLoop
+ call Random
+ and $7
+ cp b
+ jr nc, .randomMonSelectLoop
+ ld hl, PartyMon1PokerusStatus
+ call GetPartyLocation ; get pokerus byte of random mon
+ ld a, [hl]
+ and $f0
+ ret nz ; if it already has pokerus, do nothing
+.randomPokerusLoop ; Simultaneously sample the strain and duration
+ call Random
+ and a
+ jr z, .randomPokerusLoop
+ ld b, a
+ and $f0
+ jr z, .load_pkrs
+ ld a, b
+ and $7
+ inc a
+.load_pkrs
+ ld b, a ; this should come before the label
+ swap b
+ and $3
+ inc a
+ add b
+ ld [hl], a
+ ret
+
+.TrySpreadPokerus:
+ call Random
+ cp 1 + 33 percent
+ ret nc ; 1/3 chance
+
+ ld a, [PartyCount]
+ cp 1
+ ret z ; only one mon, nothing to do
+
+ ld c, [hl]
+ ld a, b
+ cp 2
+ jr c, .checkPreviousMonsLoop ; no more mons after this one, go backwards
+
+ call Random
+ cp 1 + 50 percent
+ jr c, .checkPreviousMonsLoop ; 1/2 chance, go backwards
+.checkFollowingMonsLoop
+ add hl, de
+ ld a, [hl]
+ and a
+ jr z, .infectMon
+ ld c, a
+ and $3
+ ret z ; if mon has cured pokerus, stop searching
+ dec b ; go on to next mon
+ ld a, b
+ cp 1
+ jr nz, .checkFollowingMonsLoop ; no more mons left
+ ret
+
+.checkPreviousMonsLoop
+ ld a, [PartyCount]
+ cp b
+ ret z ; no more mons
+ ld a, l
+ sub e
+ ld l, a
+ ld a, h
+ sbc d
+ ld h, a
+ ld a, [hl]
+ and a
+ jr z, .infectMon
+ ld c, a
+ and $3
+ ret z ; if mon has cured pokerus, stop searching
+ inc b ; go on to next mon
+ jr .checkPreviousMonsLoop
+
+.infectMon
+ ld a, c
+ and $f0
+ ld b, a
+ ld a, c
+ swap a
+ and $3
+ inc a
+ add b
+ ld [hl], a
+ ret
+
+; any berry held by a Shuckle may be converted to berry juice
+ConvertBerriesToBerryJuice: ; 2ede6
+ ld hl, StatusFlags2
+ bit 6, [hl]
+ ret z
+ call Random
+ cp $10
+ ret nc ; 1/16 chance
+ ld hl, PartyMons
+ ld a, [PartyCount]
+.partyMonLoop
+ push af
+ push hl
+ ld a, [hl]
+ cp SHUCKLE
+ jr nz, .loopMon
+ ld bc, MON_ITEM
+ add hl, bc
+ ld a, [hl]
+ cp BERRY
+ jr z, .convertToJuice
+
+.loopMon
+ pop hl
+ ld bc, PARTYMON_STRUCT_LENGTH
+ add hl, bc
+ pop af
+ dec a
+ jr nz, .partyMonLoop
+ ret
+
+.convertToJuice
+ ld a, BERRY_JUICE
+ ld [hl], a
+ pop hl
+ pop af
+ ret
diff --git a/engine/predef.asm b/engine/predef.asm
index 73bc937a3..837f7b96b 100644
--- a/engine/predef.asm
+++ b/engine/predef.asm
@@ -54,8 +54,8 @@ PredefPointers:: ; 856b
add_predef UpdateEnemyHUD
add_predef StartBattle
add_predef FillInExpBar
- add_predef GetMonBackpic ; $18
- add_predef GetMonFrontpic
+ add_predef GetBattleMonBackpic ; $18
+ add_predef GetEnemyMonFrontpic
add_predef LearnLevelMoves
add_predef FillMoves
add_predef EvolveAfterBattle
@@ -90,9 +90,9 @@ PredefPointers:: ; 856b
add_predef Predef39
add_predef Predef3A
add_predef PartyMonItemName
- add_predef GetFrontpic
- add_predef GetBackpic
- add_predef FrontpicPredef
+ add_predef GetMonFrontpic
+ add_predef GetMonBackpic
+ add_predef GetAnimatedFrontpicPredef
add_predef GetTrainerPic
add_predef DecompressPredef ; $40
add_predef CheckTypeMatchup
diff --git a/engine/print_party.asm b/engine/print_party.asm
new file mode 100755
index 000000000..69bda8d52
--- /dev/null
+++ b/engine/print_party.asm
@@ -0,0 +1,362 @@
+PrintPage1: ; 1dc1b0
+ hlcoord 0, 0
+ decoord 0, 0, wPrinterTileMapBuffer
+ ld bc, 17 * SCREEN_WIDTH
+ call CopyBytes
+ hlcoord 17, 1, wPrinterTileMapBuffer
+ ld a, $62
+ ld [hli], a
+ inc a
+ ld [hl], a
+ hlcoord 17, 2, wPrinterTileMapBuffer
+ ld a, $64
+ ld [hli], a
+ inc a
+ ld [hl], a
+ hlcoord 1, 9, wPrinterTileMapBuffer
+ ld a, " "
+ ld [hli], a
+ ld [hl], a
+ hlcoord 1, 10, wPrinterTileMapBuffer
+ ld a, $61
+ ld [hli], a
+ ld [hl], a
+ hlcoord 2, 11, wPrinterTileMapBuffer
+ lb bc, 5, 18
+ call ClearBox
+ ld a, [wd265]
+ dec a
+ call CheckCaughtMon
+ push af
+ ld a, [wd265]
+ ld b, a
+ ld c, 1 ; get page 1
+ farcall GetDexEntryPagePointer
+ pop af
+ ld a, b
+ hlcoord 1, 11, wPrinterTileMapBuffer
+ call nz, FarString
+ hlcoord 19, 0, wPrinterTileMapBuffer
+ ld [hl], $35
+ ld de, SCREEN_WIDTH
+ add hl, de
+ ld b, $f
+.column_loop
+ ld [hl], $37
+ add hl, de
+ dec b
+ jr nz, .column_loop
+ ld [hl], $3a
+ ret
+; 1dc213
+
+PrintPage2: ; 1dc213
+ hlcoord 0, 0, wPrinterTileMapBuffer
+ ld bc, 8 * SCREEN_WIDTH
+ ld a, " "
+ call ByteFill
+ hlcoord 0, 0, wPrinterTileMapBuffer
+ ld a, $36
+ ld b, 6
+ call .FillColumn
+ hlcoord 19, 0, wPrinterTileMapBuffer
+ ld a, $37
+ ld b, 6
+ call .FillColumn
+ hlcoord 0, 6, wPrinterTileMapBuffer
+ ld [hl], $38
+ inc hl
+ ld a, $39
+ ld bc, SCREEN_HEIGHT
+ call ByteFill
+ ld [hl], $3a
+ hlcoord 0, 7, wPrinterTileMapBuffer
+ ld bc, SCREEN_WIDTH
+ ld a, $32
+ call ByteFill
+ ld a, [wd265]
+ dec a
+ call CheckCaughtMon
+ push af
+ ld a, [wd265]
+ ld b, a
+ ld c, 2 ; get page 2
+ farcall GetDexEntryPagePointer
+ pop af
+ hlcoord 1, 1, wPrinterTileMapBuffer
+ ld a, b
+ call nz, FarString
+ ret
+; 1dc26a
+
+.FillColumn: ; 1dc26a
+ push de
+ ld de, SCREEN_WIDTH
+.column_loop
+ ld [hl], a
+ add hl, de
+ dec b
+ jr nz, .column_loop
+ pop de
+ ret
+; 1dc275
+
+GBPrinterStrings:
+GBPrinterString_Null: db "@"
+GBPrinterString_CheckingLink: next " CHECKING LINK...@"
+GBPrinterString_Transmitting: next " TRANSMITTING...@"
+GBPrinterString_Printing: next " PRINTING...@"
+GBPrinterString_PrinterError1:
+ db " Printer Error 1"
+ next ""
+ next "Check the Game Boy"
+ next "Printer Manual."
+ db "@"
+GBPrinterString_PrinterError2:
+ db " Printer Error 2"
+ next ""
+ next "Check the Game Boy"
+ next "Printer Manual."
+ db "@"
+GBPrinterString_PrinterError3:
+ db " Printer Error 3"
+ next ""
+ next "Check the Game Boy"
+ next "Printer Manual."
+ db "@"
+GBPrinterString_PrinterError4:
+ db " Printer Error 4"
+ next ""
+ next "Check the Game Boy"
+ next "Printer Manual."
+ db "@"
+; 1dc381
+
+PrintPartyMonPage1: ; 1dc381
+ call ClearBGPalettes
+ call ClearTileMap
+ call ClearSprites
+ xor a
+ ld [hBGMapMode], a
+ call LoadFontsBattleExtra
+
+ ld de, GBPrinterHPIcon
+ ld hl, VTiles2 tile $71
+ lb bc, BANK(GBPrinterHPIcon), 1
+ call Request1bpp
+
+ ld de, GBPrinterLvIcon
+ ld hl, VTiles2 tile $6e
+ lb bc, BANK(GBPrinterLvIcon), 1
+ call Request1bpp
+
+ ld de, ShinyIconGFX
+ ld hl, VTiles2 tile $3f
+ lb bc, BANK(ShinyIconGFX), 1
+ call Get2bpp
+
+ xor a
+ ld [MonType], a
+ farcall CopyPkmnToTempMon
+ hlcoord 0, 7
+ ld b, 9
+ ld c, 18
+ call TextBox
+ hlcoord 8, 2
+ ld a, [TempMonLevel]
+ call PrintLevel_Force3Digits
+ hlcoord 12, 2
+ ld [hl], "◀" ; Filled left triangle
+ inc hl
+ ld de, TempMonMaxHP
+ lb bc, 2, 3
+ call PrintNum
+ ld a, [CurPartySpecies]
+ ld [wd265], a
+ ld [CurSpecies], a
+ ld hl, PartyMonNicknames
+ call Function1dc50e
+ hlcoord 8, 4
+ call PlaceString
+ hlcoord 9, 6
+ ld [hl], "/"
+ call GetPokemonName
+ hlcoord 10, 6
+ call PlaceString
+ hlcoord 8, 0
+ ld [hl], "№"
+ inc hl
+ ld [hl], "."
+ inc hl
+ ld de, wd265
+ lb bc, PRINTNUM_LEADINGZEROS | 1, 3
+ call PrintNum
+ hlcoord 1, 9
+ ld de, String1dc550
+ call PlaceString
+ ld hl, PartyMonOT
+ call Function1dc50e
+ hlcoord 4, 9
+ call PlaceString
+ hlcoord 1, 11
+ ld de, String1dc559
+ call PlaceString
+ hlcoord 4, 11
+ ld de, TempMonID
+ lb bc, PRINTNUM_LEADINGZEROS | 2, 5
+ call PrintNum
+ hlcoord 1, 14
+ ld de, String1dc554
+ call PlaceString
+ hlcoord 7, 14
+ ld a, [TempMonMoves + 0]
+ call Function1dc51a
+ call Function1dc52c
+ ld hl, TempMonDVs
+ predef GetUnownLetter
+ ld hl, wBoxAlignment
+ xor a
+ ld [hl], a
+ ld a, [CurPartySpecies]
+ cp UNOWN
+ jr z, .asm_1dc469
+ inc [hl]
+
+.asm_1dc469
+ hlcoord 0, 0
+ call _PrepMonFrontpic
+ call WaitBGMap
+ ld b, SCGB_STATS_SCREEN_HP_PALS
+ call GetSGBLayout
+ call SetPalettes
+ ret
+; 1dc47b
+
+PrintPartyMonPage2: ; 1dc47b
+ call ClearBGPalettes
+ call ClearTileMap
+ call ClearSprites
+ xor a
+ ld [hBGMapMode], a
+ call LoadFontsBattleExtra
+ xor a
+ ld [MonType], a
+ farcall CopyPkmnToTempMon
+ hlcoord 0, 0
+ ld b, 15
+ ld c, 18
+ call TextBox
+ ld bc, SCREEN_WIDTH
+ decoord 0, 0
+ hlcoord 0, 1
+ call CopyBytes
+ hlcoord 7, 0
+ ld a, [TempMonMoves + 1]
+ call Function1dc51a
+ hlcoord 7, 2
+ ld a, [TempMonMoves + 2]
+ call Function1dc51a
+ hlcoord 7, 4
+ ld a, [TempMonMoves + 3]
+ call Function1dc51a
+ hlcoord 7, 7
+ ld de, String1dc55d
+ call PlaceString
+ hlcoord 16, 7
+ ld de, TempMonAttack
+ call .PrintTempMonStats
+ hlcoord 16, 9
+ ld de, TempMonDefense
+ call .PrintTempMonStats
+ hlcoord 16, 11
+ ld de, TempMonSpclAtk
+ call .PrintTempMonStats
+ hlcoord 16, 13
+ ld de, TempMonSpclDef
+ call .PrintTempMonStats
+ hlcoord 16, 15
+ ld de, TempMonSpeed
+ call .PrintTempMonStats
+ call WaitBGMap
+ ld b, SCGB_STATS_SCREEN_HP_PALS
+ call GetSGBLayout
+ call SetPalettes
+ ret
+; 1dc507
+
+.PrintTempMonStats: ; 1dc507
+ lb bc, 2, 3
+ call PrintNum
+ ret
+; 1dc50e
+
+Function1dc50e: ; 1dc50e
+ ld bc, NAME_LENGTH
+ ld a, [CurPartyMon]
+ call AddNTimes
+ ld e, l
+ ld d, h
+ ret
+; 1dc51a
+
+Function1dc51a: ; 1dc51a
+ and a
+ jr z, .no_move
+
+ ld [wd265], a
+ call GetMoveName
+ jr .got_string
+
+.no_move
+ ld de, String1dc584
+
+.got_string
+ call PlaceString
+ ret
+; 1dc52c
+
+Function1dc52c: ; 1dc52c
+ farcall GetGender
+ ld a, " "
+ jr c, .got_gender
+ ld a, "♂"
+ jr nz, .got_gender
+ ld a, "♀"
+
+.got_gender
+ hlcoord 17, 2
+ ld [hl], a
+ ld bc, TempMonDVs
+ farcall CheckShininess
+ ret nc
+ hlcoord 18, 2
+ ld [hl], "<SHINY>"
+ ret
+; 1dc550
+
+String1dc550: ; 1dc550
+ db "OT/@"
+
+String1dc554: ; 1dc554
+ db "MOVE@"
+
+String1dc559: ; 1dc559
+ db "<ID>№.@"
+
+String1dc55d: ; 1dc55d
+ db "ATTACK"
+ next "DEFENSE"
+ next "SPCL.ATK"
+ next "SPCL.DEF"
+ next "SPEED"
+ db "@"
+
+String1dc584: ; 1dc584
+ db "------------@"
+; 1dc591
+
+GBPrinterHPIcon: ; 1dc591
+INCBIN "gfx/printer/hp.1bpp"
+
+GBPrinterLvIcon: ; 1dc599
+INCBIN "gfx/printer/lv.1bpp"
diff --git a/engine/printer.asm b/engine/printer.asm
index 7dd2d4f4a..b72f99375 100755
--- a/engine/printer.asm
+++ b/engine/printer.asm
@@ -1,4 +1,4 @@
-INCLUDE "engine/printer/serial.asm"
+INCLUDE "engine/printer_serial.asm"
SendScreenToPrinter: ; 843f0
.loop
@@ -68,7 +68,7 @@ PrintDexEntry: ; 8442c
call Printer_StartTransmission
ld a, $10
ld [wcbfa], a
- callba PrintPage1
+ farcall PrintPage1
call ClearTileMap
ld a, %11100100
call DmgToCgbBGPals
@@ -94,7 +94,7 @@ PrintDexEntry: ; 8442c
call Printer_StartTransmission
ld a, $3
ld [wcbfa], a
- callba PrintPage2
+ farcall PrintPage2
call Printer_ResetJoypadRegisters
ld a, 4
ld [wPrinterQueueLength], a
@@ -235,7 +235,7 @@ PrintUnownStamp: ; 84560
xor a
ld [hBGMapMode], a
call LoadTileMapToTempTileMap
- callba PlaceUnownPrinterFrontpic
+ farcall PlaceUnownPrinterFrontpic
ld a, $0 ; to be loaded to wcbfa
call Printer_PrepareTileMapForPrint
call Call_LoadTempTileMapToTileMap
@@ -341,7 +341,7 @@ PrintPartymon: ; 8461a
xor a
ld [hBGMapMode], a
- callba PrintPartyMonPage1
+ farcall PrintPartyMonPage1
ld a, $10 ; to be loaded to wcbfa
call Printer_PrepareTileMapForPrint
@@ -362,7 +362,7 @@ PrintPartymon: ; 8461a
xor a
ld [hBGMapMode], a
- callba PrintPartyMonPage2
+ farcall PrintPartyMonPage2
ld a, $3 ; to be loaded to wcbfa
call Printer_PrepareTileMapForPrint
@@ -391,7 +391,7 @@ _PrintDiploma: ; 84688
ld a, [wPrinterQueueLength]
push af
- callba PlaceDiplomaOnScreen
+ farcall PlaceDiplomaOnScreen
xor a
ld [hPrinter], a
@@ -425,7 +425,7 @@ _PrintDiploma: ; 84688
xor a
ld [hBGMapMode], a
- callba PrintDiplomaPage2
+ farcall PrintDiplomaPage2
ld a, $3 ; to be loaded to wcbfa
call Printer_PrepareTileMapForPrint
@@ -861,7 +861,7 @@ Printer_GetMonGender: ; 8498a (21:498a)
ld [CurPartyMon], a
ld a, TEMPMON
ld [MonType], a
- callba GetGender
+ farcall GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
diff --git a/engine/printer/serial.asm b/engine/printer/serial.asm
deleted file mode 100755
index 37ed2990b..000000000
--- a/engine/printer/serial.asm
+++ /dev/null
@@ -1,645 +0,0 @@
-Printer_StartTransmission: ; 84000
- ld hl, wGameboyPrinterRAM
- ld bc, wGameboyPrinterRAMEnd - wGameboyPrinterRAM
- xor a
- call Printer_ByteFill
- xor a
- ld [rSB], a
- ld [rSC], a
- ld [wPrinterOpcode], a
- ld hl, wPrinterConnectionOpen
- set 0, [hl]
- ld a, [GBPrinter]
- ld [wGBPrinterSettings], a
- xor a
- ld [wJumptableIndex], a
- ret
-; 84022
-
-PrinterJumptableIteration: ; 84022
- ld a, [wJumptableIndex]
- ld e, a
- ld d, 0
- ld hl, .Jumptable
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-; 84031
-
-
-.Jumptable: ; 84031 (21:4031)
-
- dw Print_InitPrinterHandshake ; 00
- dw Printer_CheckConnectionStatus ; 01
- dw Printer_WaitSerial ; 02
- dw Printer_StartTransmittingTilemap ; 03
- dw Printer_TransmissionLoop ; 04
- dw Printer_WaitSerialAndLoopBack2 ; 05
-
- dw Printer_EndTilemapTransmission ; 06
- dw Printer_TransmissionLoop ; 07
- dw Printer_WaitSerial ; 08
- dw Printer_SignalSendHeader ; 09
- dw Printer_TransmissionLoop ; 0a
- dw Printer_WaitSerial ; 0b
- dw Printer_WaitUntilFinished ; 0c
- dw Printer_Quit ; 0d
-
- dw Printer_NextSection_ ; 0e
- dw Printer_WaitSerial ; 0f
- dw Printer_SignalLoopBack ; 10
- dw Printer_SectionOne ; 11
- dw Printer_WaitLoopBack ; 12
- dw Printer_WaitLoopBack_ ; 13
-
-
-Printer_NextSection: ; 84059 (21:4059)
- ld hl, wJumptableIndex
- inc [hl]
- ret
-
-Printer_PrevSection: ; 8405e (21:405e)
- ld hl, wJumptableIndex
- dec [hl]
- ret
-
-Printer_Quit: ; 84063 (21:4063)
- xor a
- ld [wPrinterStatusFlags], a
- ld hl, wJumptableIndex
- set 7, [hl]
- ret
-
-Printer_NextSection_: ; 8406d (21:406d)
- call Printer_NextSection
- ret
-
-Printer_SectionOne: ; 84071 (21:4071)
- ld a, $1
- ld [wJumptableIndex], a
- ret
-
-Print_InitPrinterHandshake: ; 84077 (21:4077)
- call Printer_ResetData
- ld hl, PrinterDataPacket1
- call Printer_CopyPacket
- xor a
- ld [wPrinterSendByteCounter], a
- ld [wPrinterSendByteCounter + 1], a
- ld a, [wPrinterQueueLength]
- ld [wPrinterRowIndex], a
- call Printer_NextSection
- call Printer_WaitHandshake
- ld a, PRINTER_STATUS_CHECKING
- ld [wPrinterStatus], a
- ret
-
-Printer_StartTransmittingTilemap: ; 84099 (21:4099)
- call Printer_ResetData
- ; check ???
- ld hl, wPrinterRowIndex
- ld a, [hl]
- and a
- jr z, Printer_EndTilemapTransmission
- ; send packet 3
- ld hl, PrinterDataPacket3 ; signal start of transmission
- call Printer_CopyPacket
- ; prepare to send 40 tiles
- call Printer_Convert2RowsTo2bpp
- ld a, (40 tiles) % $100
- ld [wPrinterSendByteCounter], a
- ld a, (40 tiles) / $100
- ld [wPrinterSendByteCounter + 1], a
- ; compute the checksum
- call Printer_ComputeChecksum
- call Printer_NextSection
- call Printer_WaitHandshake
- ld a, PRINTER_STATUS_TRANSMITTING
- ld [wPrinterStatus], a
- ret
-
-Printer_EndTilemapTransmission: ; 840c5 (21:40c5)
- ; ensure that we go from here to routine 7
- ld a, $6
- ld [wJumptableIndex], a
- ; send packet 4
- ld hl, PrinterDataPacket4 ; signal no transmission
- call Printer_CopyPacket
- ; send no tile data
- xor a
- ld [wPrinterSendByteCounter], a
- ld [wPrinterSendByteCounter + 1], a
- call Printer_NextSection
- call Printer_WaitHandshake
- ret
-
-Printer_SignalSendHeader: ; 840de (21:40de)
- call Printer_ResetData
- ld hl, PrinterDataPacket2 ; signal request print
- call Printer_CopyPacket
- ; prepare to send 1 tile
- call Printer_StageHeaderForSend
- ld a, 4 % $100
- ld [wPrinterSendByteCounter], a
- ld a, 4 / $100
- ld [wPrinterSendByteCounter + 1], a
- ; compute the checksum
- call Printer_ComputeChecksum
- call Printer_NextSection
- call Printer_WaitHandshake
- ld a, PRINTER_STATUS_PRINTING
- ld [wPrinterStatus], a
- ret
-
-Printer_SignalLoopBack: ; 84103 (21:4103)
- call Printer_ResetData
- ; send packet 1
- ld hl, PrinterDataPacket1 ; signal no transmission
- call Printer_CopyPacket
- ; send no tile data
- xor a
- ld [wPrinterSendByteCounter], a
- ld [wPrinterSendByteCounter + 1], a
- ld a, [wPrinterQueueLength]
- ld [wPrinterRowIndex], a
- call Printer_NextSection
- call Printer_WaitHandshake
- ret
-
-Printer_WaitSerial: ; 84120 (21:4120)
- ld hl, wPrinterSerialFrameDelay
- inc [hl]
- ld a, [hl]
- cp $6
- ret c
- xor a
- ld [hl], a
- call Printer_NextSection
- ret
-
-Printer_WaitSerialAndLoopBack2: ; 8412e (21:412e)
- ld hl, wPrinterSerialFrameDelay
- inc [hl]
- ld a, [hl]
- cp $6
- ret c
- xor a
- ld [hl], a
- ld hl, wPrinterRowIndex
- dec [hl]
- call Printer_PrevSection
- call Printer_PrevSection
- ret
-
-Printer_CheckConnectionStatus: ; 84143 (21:4143)
- ld a, [wPrinterOpcode]
- and a
- ret nz
- ld a, [wPrinterHandshake]
- cp $ff
- jr nz, .printer_connected
- ld a, [wPrinterStatusFlags]
- cp $ff
- jr z, .printer_error
-
-.printer_connected
- ld a, [wPrinterHandshake]
- cp $81
- jr nz, .printer_error
- ld a, [wPrinterStatusFlags]
- cp $0
- jr nz, .printer_error
- ld hl, wPrinterConnectionOpen
- set 1, [hl]
- ld a, $5
- ld [wHandshakeFrameDelay], a
- call Printer_NextSection
- ret
-
-.printer_error
- ld a, $ff
- ld [wPrinterHandshake], a
- ld [wPrinterStatusFlags], a
- ld a, $e
- ld [wJumptableIndex], a
- ret
-
-Printer_TransmissionLoop: ; 84180 (21:4180)
- ld a, [wPrinterOpcode]
- and a
- ret nz
- ld a, [wPrinterStatusFlags]
- and $f0
- jr nz, .enter_wait_loop
- ld a, [wPrinterStatusFlags]
- and $1
- jr nz, .cycle_back
- call Printer_NextSection
- ret
-
-.cycle_back
- call Printer_PrevSection
- ret
-
-.enter_wait_loop
- ld a, $12 ; Printer_WaitLoopBack
- ld [wJumptableIndex], a
- ret
-
-Printer_WaitUntilFinished: ; 841a1 (21:41a1)
- ld a, [wPrinterOpcode]
- and a
- ret nz
- ld a, [wPrinterStatusFlags]
- and $f3
- ret nz
- call Printer_NextSection
- ret
-
-Printer_WaitLoopBack: ; 841b0 (21:41b0)
- call Printer_NextSection
-Printer_WaitLoopBack_: ; 841b3 (21:41b3)
- ld a, [wPrinterOpcode]
- and a
- ret nz
- ld a, [wPrinterStatusFlags]
- and $f0
- ret nz
- xor a
- ld [wJumptableIndex], a
- ret
-
-Printer_WaitHandshake: ; 841c3 (21:41c3)
-.loop
- ld a, [wPrinterOpcode]
- and a
- jr nz, .loop
- xor a
- ld [wPrinterSendByteOffset], a
- ld [wPrinterSendByteOffset + 1], a
- ld a, $1
- ld [wPrinterOpcode], a
- ld a, $88
- ld [rSB], a
- ld a, $1
- ld [rSC], a
- ld a, $81
- ld [rSC], a
- ret
-
-Printer_CopyPacket: ; 841e2 (21:41e2)
- ld a, [hli]
- ld [wca82], a
- ld a, [hli]
- ld [wca83], a
- ld a, [hli]
- ld [wca84], a
- ld a, [hli]
- ld [wca85], a
- ld a, [hli]
- ld [wPrinterChecksum], a
- ld a, [hl]
- ld [wPrinterChecksum + 1], a
- ret
-
-Printer_ResetData: ; 841fb (21:41fb)
- xor a
- ld hl, wca82
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ld [hl], a
- ld hl, wPrinterChecksum
- ld [hli], a
- ld [hl], a
- xor a
- ld [wPrinterSendByteCounter], a
- ld [wPrinterSendByteCounter + 1], a
- ld hl, wGameboyPrinterRAM
- ld bc, wGameboyPrinter2bppSourceEnd - wGameboyPrinter2bppSource
- call Printer_ByteFill
- ret
-
-Printer_ComputeChecksum: ; 84219 (21:4219)
- ld hl, 0
- ld bc, 4
- ld de, wca82
- call .ComputeChecksum
- ld a, [wPrinterSendByteCounter]
- ld c, a
- ld a, [wPrinterSendByteCounter + 1]
- ld b, a
- ld de, wGameboyPrinterRAM
- call .ComputeChecksum
- ld a, l
- ld [wPrinterChecksum], a
- ld a, h
- ld [wPrinterChecksum + 1], a
- ret
-
-.ComputeChecksum: ; 8423c (21:423c)
-.loop
- ld a, [de]
- inc de
- add l
- jr nc, .no_overflow
- inc h
-.no_overflow
- ld l, a
- dec bc
- ld a, c
- or b
- jr nz, .loop
- ret
-
-Printer_StageHeaderForSend: ; 84249 (21:4249)
- ld a, $1
- ld [wGameboyPrinter2bppSource + 0], a
- ld a, [wcbfa]
- ld [wGameboyPrinter2bppSource + 1], a
- ld a, %11100100
- ld [wGameboyPrinter2bppSource + 2], a
- ld a, [wGBPrinterSettings]
- ld [wGameboyPrinter2bppSource + 3], a
- ret
-
-Printer_Convert2RowsTo2bpp: ; 84260 (21:4260)
- ; de = wPrinterTileMapBuffer + 2 * SCREEN_WIDTH * ([wPrinterQueueLength] - [wPrinterRowIndex])
- ld a, [wPrinterRowIndex]
- xor $ff
- ld d, a
- ld a, [wPrinterQueueLength]
- inc a
- add d
- ld hl, wPrinterTileMapBuffer
- ld de, 2 * SCREEN_WIDTH
-.loop1
- and a
- jr z, .okay1
- add hl, de
- dec a
- jr .loop1
-.okay1
- ld e, l
- ld d, h
- ld hl, wGameboyPrinter2bppSource
- ld c, 2 * SCREEN_WIDTH
-.loop2
- ld a, [de]
- inc de
- push bc
- push de
- push hl
- ; convert tile index to vram address
- swap a
- ld d, a
- and $f0
- ld e, a
- ld a, d
- and $f
- ld d, a
- and $8
- ld a, d
- jr nz, .vtiles_8xxx
- or $90
- jr .got_vtile_addr
-
-.vtiles_8xxx
- or $80
-.got_vtile_addr
- ld d, a
- ; copy 1 vtile to hl
- lb bc, BANK(Printer_Convert2RowsTo2bpp), 1
- call Request2bpp
- pop hl
- ld de, 1 tiles
- add hl, de
- pop de
- pop bc
- dec c
- jr nz, .loop2
- ret
-
-Printer_ByteFill: ; 842ab
- push de
- ld e, a
-.loop
- ld [hl], e
- inc hl
- dec bc
- ld a, c
- or b
- jr nz, .loop
- ld a, e
- pop de
- ret
-; 842b7
-
-PrinterDataPacket1:
- db 1, 0, $00, 0
- dw 1
-PrinterDataPacket2:
- db 2, 0, $04, 0
- dw 0
-PrinterDataPacket3:
- db 4, 0, $80, 2
- dw 0
-PrinterDataPacket4:
- db 4, 0, $00, 0
- dw 4
-PrinterDataPacket5: ; unused
- db 8, 0, $00, 0
- dw 8
-PrinterDataPacket6: ; unused
- db 15, 0, $00, 0
- dw 15
-; 842db
-
-_PrinterReceive:: ; 842db
- ld a, [wPrinterOpcode]
- add a
- ld e, a
- ld d, 0
- ld hl, .Jumptable
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-; 842ea
-
-
-.Jumptable: ; 842ea (21:42ea)
- dw Printer_DoNothing ; 00
-
- dw Printer_Send0x33 ; 01
- dw Printer_Sendwca82 ; 02
- dw Printer_Sendwca83 ; 03
- dw Printer_Sendwca84 ; 04
- dw Printer_Sendwca85 ; 05
- dw Printer_SendNextByte ; 06
- dw Printer_SendwPrinterChecksumLo ; 07
- dw Printer_SendwPrinterChecksumHi ; 08
- dw Printer_Send0x00 ; 09
- dw Printer_ReceiveTowPrinterHandshakeAndSend0x00 ; 0a
- dw Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop ; 0b
-
- dw Printer_Send0x33 ; 0c triggered by AskSerial
- dw Printer_Send0x0f ; 0d
- dw Printer_Send0x00_ ; 0e
- dw Printer_Send0x00_ ; 0f
- dw Printer_Send0x00_ ; 10
- dw Printer_Send0x0f ; 11
- dw Printer_Send0x00_ ; 12
- dw Printer_Send0x00 ; 13
- dw Printer_ReceiveTowPrinterHandshakeAndSend0x00 ; 14
- dw Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop_ ; 15
-
- dw Printer_Send0x33 ; 16 triggered by pressing B
- dw Printer_Send0x08 ; 17
- dw Printer_Send0x00_ ; 18
- dw Printer_Send0x00_ ; 19
- dw Printer_Send0x00_ ; 1a
- dw Printer_Send0x08 ; 1b
- dw Printer_Send0x00_ ; 1c
- dw Printer_Send0x00 ; 1d
- dw Printer_ReceiveTowPrinterHandshakeAndSend0x00 ; 1e
- dw Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop ; 1f
-
-
-Printer_NextInstruction: ; 8432a (21:432a)
- ld hl, wPrinterOpcode
- inc [hl]
- ret
-
-Printer_DoNothing: ; 8432f (21:432f)
- ret
-
-Printer_Send0x33: ; 84330 (21:4330)
- ld a, $33
- call Printer_SerialSend
- call Printer_NextInstruction
- ret
-
-Printer_Sendwca82: ; 84339 (21:4339)
- ld a, [wca82]
- call Printer_SerialSend
- call Printer_NextInstruction
- ret
-
-Printer_Sendwca83: ; 84343 (21:4343)
- ld a, [wca83]
- call Printer_SerialSend
- call Printer_NextInstruction
- ret
-
-Printer_Sendwca84: ; 8434d (21:434d)
- ld a, [wca84]
- call Printer_SerialSend
- call Printer_NextInstruction
- ret
-
-Printer_Sendwca85: ; 84357 (21:4357)
- ld a, [wca85]
- call Printer_SerialSend
- call Printer_NextInstruction
- ret
-
-Printer_SendNextByte: ; 84361 (21:4361)
- ; decrement 16-bit counter
- ld hl, wPrinterSendByteCounter
- ld a, [hli]
- ld d, [hl]
- ld e, a
- or d
- jr z, .done
- dec de
- ld [hl], d
- dec hl
- ld [hl], e
-
- ld a, [wPrinterSendByteOffset]
- ld e, a
- ld a, [wPrinterSendByteOffset + 1]
- ld d, a
- ld hl, wGameboyPrinterRAM
- add hl, de
- inc de
- ld a, e
- ld [wPrinterSendByteOffset], a
- ld a, d
- ld [wPrinterSendByteOffset + 1], a
- ld a, [hl]
- call Printer_SerialSend
- ret
-
-.done
- call Printer_NextInstruction
-Printer_SendwPrinterChecksumLo: ; 8438b (21:438b)
- ld a, [wPrinterChecksum]
- call Printer_SerialSend
- call Printer_NextInstruction
- ret
-
-Printer_SendwPrinterChecksumHi: ; 84395 (21:4395)
- ld a, [wPrinterChecksum + 1]
- call Printer_SerialSend
- call Printer_NextInstruction
- ret
-
-Printer_Send0x00: ; 8439f (21:439f)
- ld a, $0
- call Printer_SerialSend
- call Printer_NextInstruction
- ret
-
-Printer_ReceiveTowPrinterHandshakeAndSend0x00: ; 843a8 (21:43a8)
- ld a, [rSB]
- ld [wPrinterHandshake], a
- ld a, $0
- call Printer_SerialSend
- call Printer_NextInstruction
- ret
-
-Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop: ; 843b6 (21:43b6)
- ld a, [rSB]
- ld [wPrinterStatusFlags], a
- xor a
- ld [wPrinterOpcode], a
- ret
-
-Printer_Send0x0f: ; 843c0 (21:43c0)
- ld a, $f
- call Printer_SerialSend
- call Printer_NextInstruction
- ret
-
-Printer_Send0x00_: ; 843c9 (21:43c9)
- ld a, $0
- call Printer_SerialSend
- call Printer_NextInstruction
- ret
-
-Printer_Send0x08: ; 843d2 (21:43d2)
- ld a, $8
- call Printer_SerialSend
- call Printer_NextInstruction
- ret
-
-Printer_SerialSend: ; 843db (21:43db)
- ld [rSB], a
- ld a, $1 ; switch to internal clock
- ld [rSC], a
- ld a, $81 ; start transfer
- ld [rSC], a
- ret
-
-Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop_: ; 843e6 (21:43e6)
- ld a, [rSB]
- ld [wPrinterStatusFlags], a
- xor a
- ld [wPrinterOpcode], a
- ret
diff --git a/engine/printer_serial.asm b/engine/printer_serial.asm
new file mode 100755
index 000000000..6909a38b2
--- /dev/null
+++ b/engine/printer_serial.asm
@@ -0,0 +1,645 @@
+Printer_StartTransmission: ; 84000
+ ld hl, wGameboyPrinterRAM
+ ld bc, wGameboyPrinterRAMEnd - wGameboyPrinterRAM
+ xor a
+ call Printer_ByteFill
+ xor a
+ ld [rSB], a
+ ld [rSC], a
+ ld [wPrinterOpcode], a
+ ld hl, wPrinterConnectionOpen
+ set 0, [hl]
+ ld a, [GBPrinter]
+ ld [wGBPrinterSettings], a
+ xor a
+ ld [wJumptableIndex], a
+ ret
+; 84022
+
+PrinterJumptableIteration: ; 84022
+ ld a, [wJumptableIndex]
+ ld e, a
+ ld d, 0
+ ld hl, .Jumptable
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+; 84031
+
+
+.Jumptable: ; 84031 (21:4031)
+
+ dw Print_InitPrinterHandshake ; 00
+ dw Printer_CheckConnectionStatus ; 01
+ dw Printer_WaitSerial ; 02
+ dw Printer_StartTransmittingTilemap ; 03
+ dw Printer_TransmissionLoop ; 04
+ dw Printer_WaitSerialAndLoopBack2 ; 05
+
+ dw Printer_EndTilemapTransmission ; 06
+ dw Printer_TransmissionLoop ; 07
+ dw Printer_WaitSerial ; 08
+ dw Printer_SignalSendHeader ; 09
+ dw Printer_TransmissionLoop ; 0a
+ dw Printer_WaitSerial ; 0b
+ dw Printer_WaitUntilFinished ; 0c
+ dw Printer_Quit ; 0d
+
+ dw Printer_NextSection_ ; 0e
+ dw Printer_WaitSerial ; 0f
+ dw Printer_SignalLoopBack ; 10
+ dw Printer_SectionOne ; 11
+ dw Printer_WaitLoopBack ; 12
+ dw Printer_WaitLoopBack_ ; 13
+
+
+Printer_NextSection: ; 84059 (21:4059)
+ ld hl, wJumptableIndex
+ inc [hl]
+ ret
+
+Printer_PrevSection: ; 8405e (21:405e)
+ ld hl, wJumptableIndex
+ dec [hl]
+ ret
+
+Printer_Quit: ; 84063 (21:4063)
+ xor a
+ ld [wPrinterStatusFlags], a
+ ld hl, wJumptableIndex
+ set 7, [hl]
+ ret
+
+Printer_NextSection_: ; 8406d (21:406d)
+ call Printer_NextSection
+ ret
+
+Printer_SectionOne: ; 84071 (21:4071)
+ ld a, $1
+ ld [wJumptableIndex], a
+ ret
+
+Print_InitPrinterHandshake: ; 84077 (21:4077)
+ call Printer_ResetData
+ ld hl, PrinterDataPacket1
+ call Printer_CopyPacket
+ xor a
+ ld [wPrinterSendByteCounter], a
+ ld [wPrinterSendByteCounter + 1], a
+ ld a, [wPrinterQueueLength]
+ ld [wPrinterRowIndex], a
+ call Printer_NextSection
+ call Printer_WaitHandshake
+ ld a, PRINTER_STATUS_CHECKING
+ ld [wPrinterStatus], a
+ ret
+
+Printer_StartTransmittingTilemap: ; 84099 (21:4099)
+ call Printer_ResetData
+ ; check ???
+ ld hl, wPrinterRowIndex
+ ld a, [hl]
+ and a
+ jr z, Printer_EndTilemapTransmission
+ ; send packet 3
+ ld hl, PrinterDataPacket3 ; signal start of transmission
+ call Printer_CopyPacket
+ ; prepare to send 40 tiles
+ call Printer_Convert2RowsTo2bpp
+ ld a, (40 tiles) % $100
+ ld [wPrinterSendByteCounter], a
+ ld a, (40 tiles) / $100
+ ld [wPrinterSendByteCounter + 1], a
+ ; compute the checksum
+ call Printer_ComputeChecksum
+ call Printer_NextSection
+ call Printer_WaitHandshake
+ ld a, PRINTER_STATUS_TRANSMITTING
+ ld [wPrinterStatus], a
+ ret
+
+Printer_EndTilemapTransmission: ; 840c5 (21:40c5)
+ ; ensure that we go from here to routine 7
+ ld a, $6
+ ld [wJumptableIndex], a
+ ; send packet 4
+ ld hl, PrinterDataPacket4 ; signal no transmission
+ call Printer_CopyPacket
+ ; send no tile data
+ xor a
+ ld [wPrinterSendByteCounter], a
+ ld [wPrinterSendByteCounter + 1], a
+ call Printer_NextSection
+ call Printer_WaitHandshake
+ ret
+
+Printer_SignalSendHeader: ; 840de (21:40de)
+ call Printer_ResetData
+ ld hl, PrinterDataPacket2 ; signal request print
+ call Printer_CopyPacket
+ ; prepare to send 1 tile
+ call Printer_StageHeaderForSend
+ ld a, 4 % $100
+ ld [wPrinterSendByteCounter], a
+ ld a, 4 / $100
+ ld [wPrinterSendByteCounter + 1], a
+ ; compute the checksum
+ call Printer_ComputeChecksum
+ call Printer_NextSection
+ call Printer_WaitHandshake
+ ld a, PRINTER_STATUS_PRINTING
+ ld [wPrinterStatus], a
+ ret
+
+Printer_SignalLoopBack: ; 84103 (21:4103)
+ call Printer_ResetData
+ ; send packet 1
+ ld hl, PrinterDataPacket1 ; signal no transmission
+ call Printer_CopyPacket
+ ; send no tile data
+ xor a
+ ld [wPrinterSendByteCounter], a
+ ld [wPrinterSendByteCounter + 1], a
+ ld a, [wPrinterQueueLength]
+ ld [wPrinterRowIndex], a
+ call Printer_NextSection
+ call Printer_WaitHandshake
+ ret
+
+Printer_WaitSerial: ; 84120 (21:4120)
+ ld hl, wPrinterSerialFrameDelay
+ inc [hl]
+ ld a, [hl]
+ cp $6
+ ret c
+ xor a
+ ld [hl], a
+ call Printer_NextSection
+ ret
+
+Printer_WaitSerialAndLoopBack2: ; 8412e (21:412e)
+ ld hl, wPrinterSerialFrameDelay
+ inc [hl]
+ ld a, [hl]
+ cp $6
+ ret c
+ xor a
+ ld [hl], a
+ ld hl, wPrinterRowIndex
+ dec [hl]
+ call Printer_PrevSection
+ call Printer_PrevSection
+ ret
+
+Printer_CheckConnectionStatus: ; 84143 (21:4143)
+ ld a, [wPrinterOpcode]
+ and a
+ ret nz
+ ld a, [wPrinterHandshake]
+ cp $ff
+ jr nz, .printer_connected
+ ld a, [wPrinterStatusFlags]
+ cp $ff
+ jr z, .printer_error
+
+.printer_connected
+ ld a, [wPrinterHandshake]
+ cp $81
+ jr nz, .printer_error
+ ld a, [wPrinterStatusFlags]
+ cp $0
+ jr nz, .printer_error
+ ld hl, wPrinterConnectionOpen
+ set 1, [hl]
+ ld a, $5
+ ld [wHandshakeFrameDelay], a
+ call Printer_NextSection
+ ret
+
+.printer_error
+ ld a, $ff
+ ld [wPrinterHandshake], a
+ ld [wPrinterStatusFlags], a
+ ld a, $e
+ ld [wJumptableIndex], a
+ ret
+
+Printer_TransmissionLoop: ; 84180 (21:4180)
+ ld a, [wPrinterOpcode]
+ and a
+ ret nz
+ ld a, [wPrinterStatusFlags]
+ and $f0
+ jr nz, .enter_wait_loop
+ ld a, [wPrinterStatusFlags]
+ and $1
+ jr nz, .cycle_back
+ call Printer_NextSection
+ ret
+
+.cycle_back
+ call Printer_PrevSection
+ ret
+
+.enter_wait_loop
+ ld a, $12 ; Printer_WaitLoopBack
+ ld [wJumptableIndex], a
+ ret
+
+Printer_WaitUntilFinished: ; 841a1 (21:41a1)
+ ld a, [wPrinterOpcode]
+ and a
+ ret nz
+ ld a, [wPrinterStatusFlags]
+ and $f3
+ ret nz
+ call Printer_NextSection
+ ret
+
+Printer_WaitLoopBack: ; 841b0 (21:41b0)
+ call Printer_NextSection
+Printer_WaitLoopBack_: ; 841b3 (21:41b3)
+ ld a, [wPrinterOpcode]
+ and a
+ ret nz
+ ld a, [wPrinterStatusFlags]
+ and $f0
+ ret nz
+ xor a
+ ld [wJumptableIndex], a
+ ret
+
+Printer_WaitHandshake: ; 841c3 (21:41c3)
+.loop
+ ld a, [wPrinterOpcode]
+ and a
+ jr nz, .loop
+ xor a
+ ld [wPrinterSendByteOffset], a
+ ld [wPrinterSendByteOffset + 1], a
+ ld a, $1
+ ld [wPrinterOpcode], a
+ ld a, $88
+ ld [rSB], a
+ ld a, $1
+ ld [rSC], a
+ ld a, $81
+ ld [rSC], a
+ ret
+
+Printer_CopyPacket: ; 841e2 (21:41e2)
+ ld a, [hli]
+ ld [wPrinterData], a
+ ld a, [hli]
+ ld [wPrinterData + 1], a
+ ld a, [hli]
+ ld [wPrinterData + 2], a
+ ld a, [hli]
+ ld [wPrinterData + 3], a
+ ld a, [hli]
+ ld [wPrinterChecksum], a
+ ld a, [hl]
+ ld [wPrinterChecksum + 1], a
+ ret
+
+Printer_ResetData: ; 841fb (21:41fb)
+ xor a
+ ld hl, wPrinterData
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+ ld hl, wPrinterChecksum
+ ld [hli], a
+ ld [hl], a
+ xor a
+ ld [wPrinterSendByteCounter], a
+ ld [wPrinterSendByteCounter + 1], a
+ ld hl, wGameboyPrinterRAM
+ ld bc, wGameboyPrinter2bppSourceEnd - wGameboyPrinter2bppSource
+ call Printer_ByteFill
+ ret
+
+Printer_ComputeChecksum: ; 84219 (21:4219)
+ ld hl, 0
+ ld bc, 4
+ ld de, wPrinterData
+ call .ComputeChecksum
+ ld a, [wPrinterSendByteCounter]
+ ld c, a
+ ld a, [wPrinterSendByteCounter + 1]
+ ld b, a
+ ld de, wGameboyPrinterRAM
+ call .ComputeChecksum
+ ld a, l
+ ld [wPrinterChecksum], a
+ ld a, h
+ ld [wPrinterChecksum + 1], a
+ ret
+
+.ComputeChecksum: ; 8423c (21:423c)
+.loop
+ ld a, [de]
+ inc de
+ add l
+ jr nc, .no_overflow
+ inc h
+.no_overflow
+ ld l, a
+ dec bc
+ ld a, c
+ or b
+ jr nz, .loop
+ ret
+
+Printer_StageHeaderForSend: ; 84249 (21:4249)
+ ld a, $1
+ ld [wGameboyPrinter2bppSource + 0], a
+ ld a, [wcbfa]
+ ld [wGameboyPrinter2bppSource + 1], a
+ ld a, %11100100
+ ld [wGameboyPrinter2bppSource + 2], a
+ ld a, [wGBPrinterSettings]
+ ld [wGameboyPrinter2bppSource + 3], a
+ ret
+
+Printer_Convert2RowsTo2bpp: ; 84260 (21:4260)
+ ; de = wPrinterTileMapBuffer + 2 * SCREEN_WIDTH * ([wPrinterQueueLength] - [wPrinterRowIndex])
+ ld a, [wPrinterRowIndex]
+ xor $ff
+ ld d, a
+ ld a, [wPrinterQueueLength]
+ inc a
+ add d
+ ld hl, wPrinterTileMapBuffer
+ ld de, 2 * SCREEN_WIDTH
+.loop1
+ and a
+ jr z, .okay1
+ add hl, de
+ dec a
+ jr .loop1
+.okay1
+ ld e, l
+ ld d, h
+ ld hl, wGameboyPrinter2bppSource
+ ld c, 2 * SCREEN_WIDTH
+.loop2
+ ld a, [de]
+ inc de
+ push bc
+ push de
+ push hl
+ ; convert tile index to vram address
+ swap a
+ ld d, a
+ and $f0
+ ld e, a
+ ld a, d
+ and $f
+ ld d, a
+ and $8
+ ld a, d
+ jr nz, .vtiles_8xxx
+ or $90
+ jr .got_vtile_addr
+
+.vtiles_8xxx
+ or $80
+.got_vtile_addr
+ ld d, a
+ ; copy 1 vtile to hl
+ lb bc, BANK(Printer_Convert2RowsTo2bpp), 1
+ call Request2bpp
+ pop hl
+ ld de, 1 tiles
+ add hl, de
+ pop de
+ pop bc
+ dec c
+ jr nz, .loop2
+ ret
+
+Printer_ByteFill: ; 842ab
+ push de
+ ld e, a
+.loop
+ ld [hl], e
+ inc hl
+ dec bc
+ ld a, c
+ or b
+ jr nz, .loop
+ ld a, e
+ pop de
+ ret
+; 842b7
+
+PrinterDataPacket1:
+ db 1, 0, $00, 0
+ dw 1
+PrinterDataPacket2:
+ db 2, 0, $04, 0
+ dw 0
+PrinterDataPacket3:
+ db 4, 0, $80, 2
+ dw 0
+PrinterDataPacket4:
+ db 4, 0, $00, 0
+ dw 4
+PrinterDataPacket5: ; unused
+ db 8, 0, $00, 0
+ dw 8
+PrinterDataPacket6: ; unused
+ db 15, 0, $00, 0
+ dw 15
+; 842db
+
+_PrinterReceive:: ; 842db
+ ld a, [wPrinterOpcode]
+ add a
+ ld e, a
+ ld d, 0
+ ld hl, .Jumptable
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+; 842ea
+
+
+.Jumptable: ; 842ea (21:42ea)
+ dw Printer_DoNothing ; 00
+
+ dw Printer_Send0x33 ; 01
+ dw Printer_SendPrinterData1 ; 02
+ dw Printer_SendPrinterData2 ; 03
+ dw Printer_SendPrinterData3 ; 04
+ dw Printer_SendPrinterData4 ; 05
+ dw Printer_SendNextByte ; 06
+ dw Printer_SendwPrinterChecksumLo ; 07
+ dw Printer_SendwPrinterChecksumHi ; 08
+ dw Printer_Send0x00 ; 09
+ dw Printer_ReceiveTowPrinterHandshakeAndSend0x00 ; 0a
+ dw Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop ; 0b
+
+ dw Printer_Send0x33 ; 0c triggered by AskSerial
+ dw Printer_Send0x0f ; 0d
+ dw Printer_Send0x00_ ; 0e
+ dw Printer_Send0x00_ ; 0f
+ dw Printer_Send0x00_ ; 10
+ dw Printer_Send0x0f ; 11
+ dw Printer_Send0x00_ ; 12
+ dw Printer_Send0x00 ; 13
+ dw Printer_ReceiveTowPrinterHandshakeAndSend0x00 ; 14
+ dw Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop_ ; 15
+
+ dw Printer_Send0x33 ; 16 triggered by pressing B
+ dw Printer_Send0x08 ; 17
+ dw Printer_Send0x00_ ; 18
+ dw Printer_Send0x00_ ; 19
+ dw Printer_Send0x00_ ; 1a
+ dw Printer_Send0x08 ; 1b
+ dw Printer_Send0x00_ ; 1c
+ dw Printer_Send0x00 ; 1d
+ dw Printer_ReceiveTowPrinterHandshakeAndSend0x00 ; 1e
+ dw Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop ; 1f
+
+
+Printer_NextInstruction: ; 8432a (21:432a)
+ ld hl, wPrinterOpcode
+ inc [hl]
+ ret
+
+Printer_DoNothing: ; 8432f (21:432f)
+ ret
+
+Printer_Send0x33: ; 84330 (21:4330)
+ ld a, $33
+ call Printer_SerialSend
+ call Printer_NextInstruction
+ ret
+
+Printer_SendPrinterData1: ; 84339 (21:4339)
+ ld a, [wPrinterData]
+ call Printer_SerialSend
+ call Printer_NextInstruction
+ ret
+
+Printer_SendPrinterData2: ; 84343 (21:4343)
+ ld a, [wPrinterData + 1]
+ call Printer_SerialSend
+ call Printer_NextInstruction
+ ret
+
+Printer_SendPrinterData3: ; 8434d (21:434d)
+ ld a, [wPrinterData + 2]
+ call Printer_SerialSend
+ call Printer_NextInstruction
+ ret
+
+Printer_SendPrinterData4: ; 84357 (21:4357)
+ ld a, [wPrinterData + 3]
+ call Printer_SerialSend
+ call Printer_NextInstruction
+ ret
+
+Printer_SendNextByte: ; 84361 (21:4361)
+ ; decrement 16-bit counter
+ ld hl, wPrinterSendByteCounter
+ ld a, [hli]
+ ld d, [hl]
+ ld e, a
+ or d
+ jr z, .done
+ dec de
+ ld [hl], d
+ dec hl
+ ld [hl], e
+
+ ld a, [wPrinterSendByteOffset]
+ ld e, a
+ ld a, [wPrinterSendByteOffset + 1]
+ ld d, a
+ ld hl, wGameboyPrinterRAM
+ add hl, de
+ inc de
+ ld a, e
+ ld [wPrinterSendByteOffset], a
+ ld a, d
+ ld [wPrinterSendByteOffset + 1], a
+ ld a, [hl]
+ call Printer_SerialSend
+ ret
+
+.done
+ call Printer_NextInstruction
+Printer_SendwPrinterChecksumLo: ; 8438b (21:438b)
+ ld a, [wPrinterChecksum]
+ call Printer_SerialSend
+ call Printer_NextInstruction
+ ret
+
+Printer_SendwPrinterChecksumHi: ; 84395 (21:4395)
+ ld a, [wPrinterChecksum + 1]
+ call Printer_SerialSend
+ call Printer_NextInstruction
+ ret
+
+Printer_Send0x00: ; 8439f (21:439f)
+ ld a, $0
+ call Printer_SerialSend
+ call Printer_NextInstruction
+ ret
+
+Printer_ReceiveTowPrinterHandshakeAndSend0x00: ; 843a8 (21:43a8)
+ ld a, [rSB]
+ ld [wPrinterHandshake], a
+ ld a, $0
+ call Printer_SerialSend
+ call Printer_NextInstruction
+ ret
+
+Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop: ; 843b6 (21:43b6)
+ ld a, [rSB]
+ ld [wPrinterStatusFlags], a
+ xor a
+ ld [wPrinterOpcode], a
+ ret
+
+Printer_Send0x0f: ; 843c0 (21:43c0)
+ ld a, $f
+ call Printer_SerialSend
+ call Printer_NextInstruction
+ ret
+
+Printer_Send0x00_: ; 843c9 (21:43c9)
+ ld a, $0
+ call Printer_SerialSend
+ call Printer_NextInstruction
+ ret
+
+Printer_Send0x08: ; 843d2 (21:43d2)
+ ld a, $8
+ call Printer_SerialSend
+ call Printer_NextInstruction
+ ret
+
+Printer_SerialSend: ; 843db (21:43db)
+ ld [rSB], a
+ ld a, $1 ; switch to internal clock
+ ld [rSC], a
+ ld a, $81 ; start transfer
+ ld [rSC], a
+ ret
+
+Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop_: ; 843e6 (21:43e6)
+ ld a, [rSB]
+ ld [wPrinterStatusFlags], a
+ xor a
+ ld [wPrinterOpcode], a
+ ret
diff --git a/engine/printnum.asm b/engine/printnum.asm
index 4ef7721c8..7b814a042 100755
--- a/engine/printnum.asm
+++ b/engine/printnum.asm
@@ -275,7 +275,7 @@ _PrintNum:: ; c4c7
dec e
ret nz
inc hl
- ld [hl], "·"
+ ld [hl], "<DOT>"
ret
.PrintLeadingZero: ; c644
diff --git a/engine/prof_oaks_pc.asm b/engine/prof_oaks_pc.asm
index 05ff2b691..69949940b 100755
--- a/engine/prof_oaks_pc.asm
+++ b/engine/prof_oaks_pc.asm
@@ -1,4 +1,3 @@
-
ProfOaksPC: ; 0x265d3
ld hl, OakPCText1
call MenuTextBox
@@ -100,31 +99,26 @@ endr
ret
OakRatings: ; 0x2667f
-oakrating: MACRO
- db \1
- dw \2, \3
-endm
-
; if you caught at most this many, play this sound, load this text
- oakrating 9, SFX_DEX_FANFARE_LESS_THAN_20, OakRating01
- oakrating 19, SFX_DEX_FANFARE_LESS_THAN_20, OakRating02
- oakrating 34, SFX_DEX_FANFARE_20_49, OakRating03
- oakrating 49, SFX_DEX_FANFARE_20_49, OakRating04
- oakrating 64, SFX_DEX_FANFARE_50_79, OakRating05
- oakrating 79, SFX_DEX_FANFARE_50_79, OakRating06
- oakrating 94, SFX_DEX_FANFARE_80_109, OakRating07
- oakrating 109, SFX_DEX_FANFARE_80_109, OakRating08
- oakrating 124, SFX_CAUGHT_MON, OakRating09
- oakrating 139, SFX_CAUGHT_MON, OakRating10
- oakrating 154, SFX_DEX_FANFARE_140_169, OakRating11
- oakrating 169, SFX_DEX_FANFARE_140_169, OakRating12
- oakrating 184, SFX_DEX_FANFARE_170_199, OakRating13
- oakrating 199, SFX_DEX_FANFARE_170_199, OakRating14
- oakrating 214, SFX_DEX_FANFARE_200_229, OakRating15
- oakrating 229, SFX_DEX_FANFARE_200_229, OakRating16
- oakrating 239, SFX_DEX_FANFARE_230_PLUS, OakRating17
- oakrating 248, SFX_DEX_FANFARE_230_PLUS, OakRating18
- oakrating 255, SFX_DEX_FANFARE_230_PLUS, OakRating19
+ dbww 9, SFX_DEX_FANFARE_LESS_THAN_20, OakRating01
+ dbww 19, SFX_DEX_FANFARE_LESS_THAN_20, OakRating02
+ dbww 34, SFX_DEX_FANFARE_20_49, OakRating03
+ dbww 49, SFX_DEX_FANFARE_20_49, OakRating04
+ dbww 64, SFX_DEX_FANFARE_50_79, OakRating05
+ dbww 79, SFX_DEX_FANFARE_50_79, OakRating06
+ dbww 94, SFX_DEX_FANFARE_80_109, OakRating07
+ dbww 109, SFX_DEX_FANFARE_80_109, OakRating08
+ dbww 124, SFX_CAUGHT_MON, OakRating09
+ dbww 139, SFX_CAUGHT_MON, OakRating10
+ dbww 154, SFX_DEX_FANFARE_140_169, OakRating11
+ dbww 169, SFX_DEX_FANFARE_140_169, OakRating12
+ dbww 184, SFX_DEX_FANFARE_170_199, OakRating13
+ dbww 199, SFX_DEX_FANFARE_170_199, OakRating14
+ dbww 214, SFX_DEX_FANFARE_200_229, OakRating15
+ dbww 229, SFX_DEX_FANFARE_200_229, OakRating16
+ dbww 239, SFX_DEX_FANFARE_230_PLUS, OakRating17
+ dbww 248, SFX_DEX_FANFARE_230_PLUS, OakRating18
+ dbww 255, SFX_DEX_FANFARE_230_PLUS, OakRating19
OakPCText1: ; 0x266de
text_jump _OakPCText1
diff --git a/engine/radio.asm b/engine/radio.asm
index 99408af48..b5c1e075f 100644
--- a/engine/radio.asm
+++ b/engine/radio.asm
@@ -234,7 +234,7 @@ OaksPkmnTalk4:
jr z, .done
.next
dec hl
- ld de, WILDMON_GRASS_STRUCTURE_LENGTH
+ ld de, GRASS_WILDDATA_LENGTH
add hl, de
jr .loop
@@ -249,12 +249,12 @@ endr
cp 3
jr z, .loop2
- ld bc, 2 * NUM_WILDMONS_PER_AREA_TIME_OF_DAY
+ ld bc, 2 * NUM_GRASSMON
call AddNTimes
.loop3
; Choose one of the middle three Pokemon.
call Random
- and NUM_WILDMONS_PER_AREA_TIME_OF_DAY
+ and NUM_GRASSMON
cp 2
jr c, .loop3
cp 5
@@ -278,7 +278,7 @@ endr
pop bc
call GetWorldMapLocation
ld e, a
- callba GetLandmarkName
+ farcall GetLandmarkName
ld hl, OPT_OakText1
call CopyRadioTextToRAM
ld a, OAKS_POKEMON_TALK_5
@@ -592,7 +592,7 @@ OaksPkmnTalk9:
db "@"
OaksPkmnTalk10:
- callba RadioMusicRestartPokemonChannel
+ farcall RadioMusicRestartPokemonChannel
ld hl, OPT_RestartText
call PrintText
call WaitBGMap
@@ -653,7 +653,7 @@ OaksPkmnTalk14:
dec [hl]
ret nz
ld de, $1d
- callab RadioMusicRestartDE
+ callfar RadioMusicRestartDE
ld hl, .terminator
call PrintText
ld a, OAKS_POKEMON_TALK_4
@@ -923,7 +923,7 @@ StartPokemonMusicChannel:
jr z, .SunTueThurSun
ld de, MUSIC_POKEMON_LULLABY
.SunTueThurSun:
- callab RadioMusicRestartDE
+ callfar RadioMusicRestartDE
ret
BenIntroText1:
@@ -978,9 +978,9 @@ BenFernText3B:
LuckyNumberShow1:
call StartRadioStation
- callab Special_CheckLuckyNumberShowFlag
+ callfar Special_CheckLuckyNumberShowFlag
jr nc, .dontreset
- callab Special_ResetLuckyNumberShowFlag
+ callfar Special_ResetLuckyNumberShowFlag
.dontreset
ld hl, LC_Text1
ld a, LUCKY_NUMBER_SHOW_2
@@ -1193,12 +1193,12 @@ PeoplePlaces4: ; People
pop bc
jr c, PeoplePlaces4
push bc
- callab GetTrainerClassName
+ callfar GetTrainerClassName
ld de, StringBuffer1
call CopyName1
pop bc
ld b, 1
- callab GetTrainerName
+ callfar GetTrainerName
ld hl, PnP_Text4
ld a, PLACES_AND_PEOPLE_5
jp NextRadioLine
@@ -1348,7 +1348,7 @@ PeoplePlaces6: ; Places
ld c, [hl]
call GetWorldMapLocation
ld e, a
- callba GetLandmarkName
+ farcall GetLandmarkName
ld hl, PnP_Text5
ld a, PLACES_AND_PEOPLE_7
jp NextRadioLine
@@ -1578,7 +1578,6 @@ BuenasPassword4:
.greater_than_11
call Random
maskbits NUM_PASSWORD_CATEGORIES
- and x
cp NUM_PASSWORD_CATEGORIES
jr nc, .greater_than_11
; Store it in the high nybble of e.
@@ -1809,8 +1808,8 @@ BuenasPassword19:
BuenasPassword20:
ld a, [hBGMapMode]
push af
- callba NoRadioMusic
- callba NoRadioName
+ farcall NoRadioMusic
+ farcall NoRadioName
pop af
ld [hBGMapMode], a
ld hl, WeeklyFlags
@@ -1837,7 +1836,7 @@ BuenasPassword21:
BuenasPasswordCheckTime:
call UpdateTime
ld a, [hHours]
- cp 18 ; 6 PM
+ cp NITE_HOUR
ret
BuenasPasswordChannelName:
@@ -1956,7 +1955,7 @@ StartRadioStation:
ld e, [hl]
inc hl
ld d, [hl]
- callab RadioMusicRestartDE
+ callfar RadioMusicRestartDE
ret
RadioChannelSongs:
diff --git a/engine/read_trainer_attributes.asm b/engine/read_trainer_attributes.asm
new file mode 100644
index 000000000..dfb8d3682
--- /dev/null
+++ b/engine/read_trainer_attributes.asm
@@ -0,0 +1,64 @@
+GetTrainerClassName: ; 3952d
+ ld hl, RivalName
+ ld a, c
+ cp RIVAL1
+ jr z, .rival
+
+ ld [CurSpecies], a
+ ld a, TRAINER_NAME
+ ld [wNamedObjectTypeBuffer], a
+ call GetName
+ ld de, StringBuffer1
+ ret
+
+.rival
+ ld de, StringBuffer1
+ push de
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ pop de
+ ret
+
+GetOTName: ; 39550
+ ld hl, OTPlayerName
+ ld a, [wLinkMode]
+ and a
+ jr nz, .ok
+
+ ld hl, RivalName
+ ld a, c
+ cp RIVAL1
+ jr z, .ok
+
+ ld [CurSpecies], a
+ ld a, TRAINER_NAME
+ ld [wNamedObjectTypeBuffer], a
+ call GetName
+ ld hl, StringBuffer1
+
+.ok
+ ld bc, TRAINER_CLASS_NAME_LENGTH
+ ld de, OTClassName
+ push de
+ call CopyBytes
+ pop de
+ ret
+
+GetTrainerAttributes: ; 3957b
+ ld a, [TrainerClass]
+ ld c, a
+ call GetOTName
+ ld a, [TrainerClass]
+ dec a
+ ld hl, TrainerClassAttributes + TRNATTR_ITEM1
+ ld bc, NUM_TRAINER_ATTRIBUTES
+ call AddNTimes
+ ld de, wEnemyTrainerItem1
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ ld a, [hl]
+ ld [wEnemyTrainerBaseReward], a
+ ret
diff --git a/trainers/read_party.asm b/engine/read_trainer_party.asm
index 9b7727a84..9b7727a84 100755
--- a/trainers/read_party.asm
+++ b/engine/read_trainer_party.asm
diff --git a/engine/routines/battlestart_copytilemapatonce.asm b/engine/routines/battlestart_copytilemapatonce.asm
new file mode 100644
index 000000000..2952e833b
--- /dev/null
+++ b/engine/routines/battlestart_copytilemapatonce.asm
@@ -0,0 +1,3 @@
+BattleStart_CopyTilemapAtOnce: ; 8cf4f
+ call CGBOnly_CopyTilemapAtOnce
+ ret
diff --git a/engine/routines/checkbattlescene.asm b/engine/routines/checkbattlescene.asm
new file mode 100644
index 000000000..b63f00907
--- /dev/null
+++ b/engine/routines/checkbattlescene.asm
@@ -0,0 +1,47 @@
+CheckBattleScene: ; 4ea44
+; Return carry if battle scene is turned off.
+
+ ld a, 0
+ ld hl, wLinkMode
+ call GetFarWRAMByte
+ cp LINK_MOBILE
+ jr z, .mobile
+
+ ld a, [Options]
+ bit BATTLE_SCENE, a
+ jr nz, .off
+
+ and a
+ ret
+
+.mobile
+ ld a, [wcd2f]
+ and a
+ jr nz, .from_wram
+
+ ld a, $4
+ call GetSRAMBank
+ ld a, [$a60c]
+ ld c, a
+ call CloseSRAM
+
+ ld a, c
+ bit 0, c
+ jr z, .off
+
+ and a
+ ret
+
+.from_wram
+ ld a, $5
+ ld hl, w5_dc00
+ call GetFarWRAMByte
+ bit 0, a
+ jr z, .off
+
+ and a
+ ret
+
+.off
+ scf
+ ret
diff --git a/engine/routines/checknickerrors.asm b/engine/routines/checknickerrors.asm
new file mode 100644
index 000000000..1cedca420
--- /dev/null
+++ b/engine/routines/checknickerrors.asm
@@ -0,0 +1,74 @@
+CheckNickErrors:: ; 669f
+; error-check monster nick before use
+; must be a peace offering to gamesharkers
+
+; input: de = nick location
+
+ push bc
+ push de
+ ld b, PKMN_NAME_LENGTH
+
+.checkchar
+; end of nick?
+ ld a, [de]
+ cp "@" ; terminator
+ jr z, .end
+
+; check if this char is a text command
+ ld hl, .textcommands
+ dec hl
+.loop
+; next entry
+ inc hl
+; reached end of commands table?
+ ld a, [hl]
+ cp -1
+ jr z, .done
+
+; is the current char between this value (inclusive)...
+ ld a, [de]
+ cp [hl]
+ inc hl
+ jr c, .loop
+; ...and this one?
+ cp [hl]
+ jr nc, .loop
+
+; replace it with a "?"
+ ld a, "?"
+ ld [de], a
+ jr .loop
+
+.done
+; next char
+ inc de
+; reached end of nick without finding a terminator?
+ dec b
+ jr nz, .checkchar
+
+; change nick to "?@"
+ pop de
+ push de
+ ld a, "?"
+ ld [de], a
+ inc de
+ ld a, "@"
+ ld [de], a
+.end
+; if the nick has any errors at this point it's out of our hands
+ pop de
+ pop bc
+ ret
+
+.textcommands ; 66cf
+; table defining which characters are actually text commands
+; format:
+ ; ≥ <
+ db "<START>", TX_BOX + 1
+ db "<PLAY_G>", $18 + 1
+ db $1d, "%" + 1
+ db $35, "<GREEN>" + 1
+ db "<ENEMY>", "<ENEMY>" + 1
+ db "<MOM>", "<TM>" + 1
+ db "<ROCKET>", "┘" + 1
+ db -1 ; end
diff --git a/engine/routines/checksave.asm b/engine/routines/checksave.asm
new file mode 100644
index 000000000..2280f0e53
--- /dev/null
+++ b/engine/routines/checksave.asm
@@ -0,0 +1,20 @@
+CheckSave:: ; 4cffe
+ ld a, BANK(sCheckValue1) ; BANK(sCheckValue2)
+ call GetSRAMBank
+ ld a, [sCheckValue1]
+ ld b, a
+ ld a, [sCheckValue2]
+ ld c, a
+ call CloseSRAM
+ ld a, b
+ cp SAVE_CHECK_VALUE_1
+ jr nz, .ok
+ ld a, c
+ cp SAVE_CHECK_VALUE_2
+ jr nz, .ok
+ ld c, $1
+ ret
+
+.ok
+ ld c, $0
+ ret
diff --git a/engine/routines/checktime.asm b/engine/routines/checktime.asm
new file mode 100644
index 000000000..ada151dbf
--- /dev/null
+++ b/engine/routines/checktime.asm
@@ -0,0 +1,19 @@
+CheckTime:: ; c000
+ ld a, [TimeOfDay]
+ ld hl, .TimeOfDayTable
+ ld de, 2
+ call IsInArray
+ inc hl
+ ld c, [hl]
+ ret c
+
+ xor a
+ ld c, a
+ ret
+
+.TimeOfDayTable: ; c012
+ db MORN_F, MORN
+ db DAY_F, DAY
+ db NITE_F, NITE
+ db NITE_F, NITE
+ db -1
diff --git a/engine/routines/consumehelditem.asm b/engine/routines/consumehelditem.asm
new file mode 100644
index 000000000..a6f7766fb
--- /dev/null
+++ b/engine/routines/consumehelditem.asm
@@ -0,0 +1,80 @@
+ConsumeHeldItem: ; 27192
+ push hl
+ push de
+ push bc
+ ld a, [hBattleTurn]
+ and a
+ ld hl, OTPartyMon1Item
+ ld de, EnemyMonItem
+ ld a, [CurOTMon]
+ jr z, .theirturn
+ ld hl, PartyMon1Item
+ ld de, BattleMonItem
+ ld a, [CurBattleMon]
+
+.theirturn
+ push hl
+ push af
+ ld a, [de]
+ ld b, a
+ farcall GetItemHeldEffect
+ ld hl, .ConsumableEffects
+.loop
+ ld a, [hli]
+ cp b
+ jr z, .ok
+ inc a
+ jr nz, .loop
+ pop af
+ pop hl
+ pop bc
+ pop de
+ pop hl
+ ret
+
+.ok
+ xor a
+ ld [de], a
+ pop af
+ pop hl
+ call GetPartyLocation
+ ld a, [hBattleTurn]
+ and a
+ jr nz, .ourturn
+ ld a, [wBattleMode]
+ dec a
+ jr z, .done
+
+.ourturn
+ ld [hl], $0
+
+.done
+ pop bc
+ pop de
+ pop hl
+ ret
+
+.ConsumableEffects: ; 271de
+; Consumable items?
+ db HELD_BERRY
+ db HELD_2
+ db HELD_5
+ db HELD_HEAL_POISON
+ db HELD_HEAL_FREEZE
+ db HELD_HEAL_BURN
+ db HELD_HEAL_SLEEP
+ db HELD_HEAL_PARALYZE
+ db HELD_HEAL_STATUS
+ db HELD_30
+ db HELD_ATTACK_UP
+ db HELD_DEFENSE_UP
+ db HELD_SPEED_UP
+ db HELD_SP_ATTACK_UP
+ db HELD_SP_DEFENSE_UP
+ db HELD_ACCURACY_UP
+ db HELD_EVASION_UP
+ db HELD_38
+ db HELD_71
+ db HELD_ESCAPE
+ db HELD_CRITICAL_UP
+ db -1
diff --git a/engine/routines/correcterrorsinplayerparty.asm b/engine/routines/correcterrorsinplayerparty.asm
new file mode 100644
index 000000000..2fa98a545
--- /dev/null
+++ b/engine/routines/correcterrorsinplayerparty.asm
@@ -0,0 +1,229 @@
+CorrectErrorsInPlayerParty: ; unreferenced
+ ld hl, PartyCount
+ ld a, [hl]
+ and a
+ ret z
+
+ cp PARTY_LENGTH + 1
+ jr c, .party_length_okay
+ ld a, PARTY_LENGTH
+ ld [hl], a
+.party_length_okay
+ inc hl
+
+ ld b, a
+ ld c, 0
+.loop1
+ ld a, [hl]
+ and a
+ jr z, .invalid_species
+ cp NUM_POKEMON + 1
+ jr z, .invalid_species
+ cp EGG + 1
+ jr c, .next_species
+
+.invalid_species
+ ld [hl], SMEARGLE
+ push hl
+ push bc
+ ld a, c
+ ld hl, PartyMon1Species
+ call GetPartyLocation
+ ld [hl], SMEARGLE
+ pop bc
+ pop hl
+
+.next_species
+ inc hl
+ inc c
+ dec b
+ jr nz, .loop1
+ ld [hl], $ff
+
+ ld hl, PartyMon1
+ ld a, [PartyCount]
+ ld d, a
+ ld e, 0
+.loop2
+ push de
+ push hl
+ ld b, h
+ ld c, l
+ ld a, [hl]
+ and a
+ jr z, .invalid_species_2
+ cp NUM_POKEMON + 1
+ jr c, .check_level
+
+.invalid_species_2
+ ld [hl], SMEARGLE
+ push de
+ ld d, 0
+ ld hl, PartySpecies
+ add hl, de
+ pop de
+ ld a, SMEARGLE
+ ld [hl], a
+
+.check_level
+ ld [CurSpecies], a
+ call GetBaseData
+ ld hl, MON_LEVEL
+ add hl, bc
+ ld a, [hl]
+ cp MIN_LEVEL
+ ld a, MIN_LEVEL
+ jr c, .invalid_level
+ ld a, [hl]
+ cp MAX_LEVEL
+ jr c, .load_level
+ ld a, MAX_LEVEL
+.invalid_level
+ ld [hl], a
+.load_level
+ ld [CurPartyLevel], a
+
+ ld hl, MON_MAXHP
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld hl, MON_STAT_EXP - 1
+ add hl, bc
+ ld b, $1
+ predef CalcPkmnStats
+ pop hl
+ ld bc, PARTYMON_STRUCT_LENGTH
+ add hl, bc
+ pop de
+ inc e
+ dec d
+ jr nz, .loop2
+
+ ld de, PartyMonNicknames
+ ld a, [PartyCount]
+ ld b, a
+ ld c, 0
+.loop3
+ push bc
+ call .GetLengthOfStringWith6CharCap
+ push de
+ farcall CheckStringForErrors
+ pop hl
+ pop bc
+ jr nc, .valid_nickname
+
+ push bc
+ push hl
+ ld hl, PartySpecies
+ push bc
+ ld b, 0
+ add hl, bc
+ pop bc
+ ld a, [hl]
+ cp EGG
+ ld hl, .TAMAGO
+ jr z, .got_nickname
+ ld [wd265], a
+ call GetPokemonName
+ ld hl, StringBuffer1
+.got_nickname
+ pop de
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+ pop bc
+
+.valid_nickname
+ inc c
+ dec b
+ jr nz, .loop3
+
+ ld de, PartyMonOT
+ ld a, [PartyCount]
+ ld b, a
+ ld c, 0
+.loop4
+ push bc
+ call .GetLengthOfStringWith6CharCap
+ push de
+ farcall CheckStringForErrors
+ pop hl
+ jr nc, .valid_ot_name
+ ld d, h
+ ld e, l
+ ld hl, PlayerName
+ ld bc, NAME_LENGTH
+ call CopyBytes
+.valid_ot_name
+ pop bc
+ inc c
+ dec b
+ jr nz, .loop4
+
+ ld hl, PartyMon1Moves
+ ld a, [PartyCount]
+ ld b, a
+.loop5
+ push hl
+ ld c, NUM_MOVES
+ ld a, [hl]
+ and a
+ jr z, .invalid_move
+ cp NUM_ATTACKS + 1
+ jr c, .moves_loop
+.invalid_move
+ ld [hl], POUND
+
+.moves_loop
+ ld a, [hl]
+ and a
+ jr z, .fill_invalid_moves
+ cp NUM_ATTACKS + 1
+ jr c, .next_move
+
+.fill_invalid_moves
+ xor a
+ ld [hli], a
+ dec c
+ jr nz, .fill_invalid_moves
+ jr .next_pokemon
+
+.next_move
+ inc hl
+ dec c
+ jr nz, .moves_loop
+
+.next_pokemon
+ pop hl
+ push bc
+ ld bc, PARTYMON_STRUCT_LENGTH
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .loop5
+ ret
+; 13b6b
+
+.TAMAGO: ; 13b6b
+ db "タマゴ@@@"
+; 13b71
+
+.GetLengthOfStringWith6CharCap: ; 13b71
+ push de
+ ld c, 1
+ ld b, NAME_LENGTH_JAPANESE
+.search_loop
+ ld a, [de]
+ cp "@"
+ jr z, .done
+ inc de
+ inc c
+ dec b
+ jr nz, .search_loop
+ dec c
+ dec de
+ ld a, "@"
+ ld [de], a
+.done
+ pop de
+ ret
+; 13b87
diff --git a/engine/routines/drawkrispackgfx.asm b/engine/routines/drawkrispackgfx.asm
new file mode 100644
index 000000000..f71e43db8
--- /dev/null
+++ b/engine/routines/drawkrispackgfx.asm
@@ -0,0 +1,20 @@
+DrawKrisPackGFX: ; 48e81
+ ld hl, PackFGFXPointers
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld e, a
+ ld d, [hl]
+ ld hl, VTiles2 tile $50
+ lb bc, BANK(PackFGFX), 15
+ call Request2bpp
+ ret
+
+PackFGFXPointers: ; 48e93
+ dw PackFGFX + (15 tiles) * 1
+ dw PackFGFX + (15 tiles) * 3
+ dw PackFGFX + (15 tiles) * 0
+ dw PackFGFX + (15 tiles) * 2
+
+PackFGFX: ; 48e9b
+INCBIN "gfx/pack/pack_f.2bpp"
diff --git a/engine/routines/emptyallsrambanks.asm b/engine/routines/emptyallsrambanks.asm
new file mode 100644
index 000000000..aa4b28e0d
--- /dev/null
+++ b/engine/routines/emptyallsrambanks.asm
@@ -0,0 +1,19 @@
+EmptyAllSRAMBanks: ; 4cf1f
+ ld a, $0
+ call .EmptyBank
+ ld a, $1
+ call .EmptyBank
+ ld a, $2
+ call .EmptyBank
+ ld a, $3
+ call .EmptyBank
+ ret
+
+.EmptyBank: ; 4cf34
+ call GetSRAMBank
+ ld hl, SRAM_Begin
+ ld bc, SRAM_End - SRAM_Begin
+ xor a
+ call ByteFill
+ call CloseSRAM
+ ret
diff --git a/engine/routines/flagpredef.asm b/engine/routines/flagpredef.asm
new file mode 100644
index 000000000..bd4f37882
--- /dev/null
+++ b/engine/routines/flagpredef.asm
@@ -0,0 +1,70 @@
+FlagPredef: ; 4d7c1
+; Perform action b on flag c in flag array hl.
+; If checking a flag, check flag array d:hl unless d is 0.
+
+; For longer flag arrays, see FlagAction.
+
+ push hl
+ push bc
+
+; Divide by 8 to get the byte we want.
+ push bc
+ srl c
+ srl c
+ srl c
+ ld b, 0
+ add hl, bc
+ pop bc
+
+; Which bit we want from the byte
+ ld a, c
+ and 7
+ ld c, a
+
+; Shift left until we can mask the bit
+ ld a, 1
+ jr z, .shifted
+.shift
+ add a
+ dec c
+ jr nz, .shift
+.shifted
+ ld c, a
+
+; What are we doing to this flag?
+ dec b
+ jr z, .set ; 1
+ dec b
+ jr z, .check ; 2
+
+.reset
+ ld a, c
+ cpl
+ and [hl]
+ ld [hl], a
+ jr .done
+
+.set
+ ld a, [hl]
+ or c
+ ld [hl], a
+ jr .done
+
+.check
+ ld a, d
+ cp 0
+ jr nz, .farcheck
+
+ ld a, [hl]
+ and c
+ jr .done
+
+.farcheck
+ call GetFarByte
+ and c
+
+.done
+ pop bc
+ pop hl
+ ld c, a
+ ret
diff --git a/engine/routines/getbreedmonlevelgrowth.asm b/engine/routines/getbreedmonlevelgrowth.asm
new file mode 100644
index 000000000..b029043d6
--- /dev/null
+++ b/engine/routines/getbreedmonlevelgrowth.asm
@@ -0,0 +1,27 @@
+GetBreedMon1LevelGrowth: ; e698
+ ld hl, wBreedMon1Stats
+ ld de, TempMon
+ ld bc, BOXMON_STRUCT_LENGTH
+ call CopyBytes
+ callfar CalcLevel
+ ld a, [wBreedMon1Level]
+ ld b, a
+ ld a, d
+ ld e, a
+ sub b
+ ld d, a
+ ret
+
+GetBreedMon2LevelGrowth: ; e6b3
+ ld hl, wBreedMon2Stats
+ ld de, TempMon
+ ld bc, BOXMON_STRUCT_LENGTH
+ call CopyBytes
+ callfar CalcLevel
+ ld a, [wBreedMon2Level]
+ ld b, a
+ ld a, d
+ ld e, a
+ sub b
+ ld d, a
+ ret
diff --git a/items/pokeball_wobble.asm b/engine/routines/getpokeballwobble.asm
index 7fb4d3e38..7fb4d3e38 100755
--- a/items/pokeball_wobble.asm
+++ b/engine/routines/getpokeballwobble.asm
diff --git a/engine/routines/getsquareroot.asm b/engine/routines/getsquareroot.asm
new file mode 100644
index 000000000..009d9f4fe
--- /dev/null
+++ b/engine/routines/getsquareroot.asm
@@ -0,0 +1,30 @@
+GetSquareRoot: ; 13b87
+; Return the square root of de in b.
+
+; Rather than calculating the result, we take the index of the
+; first value in a table of squares that isn't lower than de.
+
+ ld hl, .Squares
+ ld b, 0
+.loop
+; Make sure we don't go past the end of the table.
+ inc b
+ ld a, b
+ cp $ff
+ ret z
+
+; Iterate over the table until b**2 >= de.
+ ld a, [hli]
+ sub e
+ ld a, [hli]
+ sbc d
+
+ jr c, .loop
+ ret
+
+.Squares: ; 13b98
+root set 1
+ rept $ff
+ dw root*root
+root set root+1
+ endr
diff --git a/engine/routines/initlist.asm b/engine/routines/initlist.asm
new file mode 100644
index 000000000..e2b7235ab
--- /dev/null
+++ b/engine/routines/initlist.asm
@@ -0,0 +1,54 @@
+InitList: ; 50db9
+ ld a, [wInitListType]
+
+ cp INIT_ENEMYOT_LIST
+ jr nz, .check_party_ot_name
+ ld hl, OTPartyCount
+ ld de, OTPartyMonOT
+ ld a, ENEMY_OT_NAME
+ jr .done
+
+.check_party_ot_name
+ cp INIT_PLAYEROT_LIST
+ jr nz, .check_mon_name
+ ld hl, PartyCount
+ ld de, PartyMonOT
+ ld a, PARTY_OT_NAME
+ jr .done
+
+.check_mon_name
+ cp INIT_MON_LIST
+ jr nz, .check_item_name
+ ld hl, CurMart
+ ld de, PokemonNames
+ ld a, PKMN_NAME
+ jr .done
+
+.check_item_name
+ cp INIT_BAG_ITEM_LIST
+ jr nz, .check_ob_item_name
+ ld hl, NumItems
+ ld de, ItemNames
+ ld a, ITEM_NAME
+ jr .done
+
+.check_ob_item_name
+ ld hl, CurMart
+ ld de, ItemNames
+ ld a, ITEM_NAME
+.done
+ ld [wNamedObjectTypeBuffer], a
+ ld a, l
+ ld [wListPointer], a
+ ld a, h
+ ld [wListPointer + 1], a
+ ld a, e
+ ld [wUnusedD102], a
+ ld a, d
+ ld [wUnusedD102 + 1], a
+ ld bc, ItemAttributes
+ ld a, c
+ ld [wItemAttributesPtr], a
+ ld a, b
+ ld [wItemAttributesPtr + 1], a
+ ret
diff --git a/engine/routines/knowsmove.asm b/engine/routines/knowsmove.asm
new file mode 100644
index 000000000..4ec3da347
--- /dev/null
+++ b/engine/routines/knowsmove.asm
@@ -0,0 +1,25 @@
+KnowsMove: ; f9ea
+ ld a, MON_MOVES
+ call GetPartyParamLocation
+ ld a, [wPutativeTMHMMove]
+ ld b, a
+ ld c, NUM_MOVES
+.loop
+ ld a, [hli]
+ cp b
+ jr z, .knows_move
+ dec c
+ jr nz, .loop
+ and a
+ ret
+
+.knows_move
+ ld hl, .Text_knows
+ call PrintText
+ scf
+ ret
+
+.Text_knows: ; 0xfa06
+ ; knows @ .
+ text_jump UnknownText_0x1c5ea8
+ db "@"
diff --git a/engine/routines/kurt_selectquantity_interpretjoypad.asm b/engine/routines/kurt_selectquantity_interpretjoypad.asm
new file mode 100644
index 000000000..12a43e325
--- /dev/null
+++ b/engine/routines/kurt_selectquantity_interpretjoypad.asm
@@ -0,0 +1,4 @@
+Kurt_SelectQuantity_InterpretJoypad: ; 27a28
+ call BuySellToss_InterpretJoypad
+ ld b, a
+ ret
diff --git a/engine/routines/leveluphappinessmod.asm b/engine/routines/leveluphappinessmod.asm
new file mode 100644
index 000000000..c253e8872
--- /dev/null
+++ b/engine/routines/leveluphappinessmod.asm
@@ -0,0 +1,20 @@
+LevelUpHappinessMod: ; 2709e
+ ld a, [CurPartyMon]
+ ld hl, PartyMon1CaughtLocation
+ call GetPartyLocation
+ ld a, [hl]
+ and $7f
+ ld d, a
+ ld a, [MapGroup]
+ ld b, a
+ ld a, [MapNumber]
+ ld c, a
+ call GetWorldMapLocation
+ cp d
+ ld c, HAPPINESS_GAINLEVEL
+ jr nz, .ok
+ ld c, HAPPINESS_GAINLEVELATHOME
+
+.ok
+ callfar ChangeHappiness
+ ret
diff --git a/engine/routines/loadmappart.asm b/engine/routines/loadmappart.asm
new file mode 100644
index 000000000..2184ebf7e
--- /dev/null
+++ b/engine/routines/loadmappart.asm
@@ -0,0 +1,36 @@
+_LoadMapPart:: ; 4d15b
+ ld hl, wMisc
+ ld a, [wMetatileStandingY]
+ and a
+ jr z, .top_row
+ ld bc, WMISC_WIDTH * 2
+ add hl, bc
+
+.top_row
+ ld a, [wMetatileStandingX]
+ and a
+ jr z, .left_column
+ inc hl
+ inc hl
+
+.left_column
+ decoord 0, 0
+ ld b, SCREEN_HEIGHT
+.loop
+ ld c, SCREEN_WIDTH
+.loop2
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .loop2
+ ld a, l
+ add 4
+ ld l, a
+ jr nc, .carry
+ inc h
+
+.carry
+ dec b
+ jr nz, .loop
+ ret
diff --git a/engine/routines/loadpushoam.asm b/engine/routines/loadpushoam.asm
new file mode 100644
index 000000000..6fcccbcae
--- /dev/null
+++ b/engine/routines/loadpushoam.asm
@@ -0,0 +1,21 @@
+LoadPushOAM:: ; 4031
+ ld c, hPushOAM - $ff00
+ ld b, .PushOAMEnd - .PushOAM
+ ld hl, .PushOAM
+.loop
+ ld a, [hli]
+ ld [$ff00+c], a
+ inc c
+ dec b
+ jr nz, .loop
+ ret
+
+.PushOAM: ; 403f
+ ld a, Sprites / $100
+ ld [rDMA], a
+ ld a, (SpritesEnd - Sprites) / 4 ; 40
+.pushoam_loop
+ dec a
+ jr nz, .pushoam_loop
+ ret
+.PushOAMEnd
diff --git a/engine/routines/newpokedexentry.asm b/engine/routines/newpokedexentry.asm
new file mode 100644
index 000000000..acf9fca7b
--- /dev/null
+++ b/engine/routines/newpokedexentry.asm
@@ -0,0 +1,52 @@
+NewPokedexEntry: ; fb877
+ ld a, [hMapAnims]
+ push af
+ xor a
+ ld [hMapAnims], a
+ call LowVolume
+ call ClearBGPalettes
+ call ClearTileMap
+ call UpdateSprites
+ call ClearSprites
+ ld a, [wPokedexStatus]
+ push af
+ ld a, [hSCX]
+ add $5
+ ld [hSCX], a
+ xor a
+ ld [wPokedexStatus], a
+ farcall _NewPokedexEntry
+ call WaitPressAorB_BlinkCursor
+ ld a, $1
+ ld [wPokedexStatus], a
+ farcall DisplayDexEntry
+ call WaitPressAorB_BlinkCursor
+ pop af
+ ld [wPokedexStatus], a
+ call MaxVolume
+ call RotateThreePalettesRight
+ ld a, [hSCX]
+ add -5 ; 251 ; NUM_POKEMON
+ ld [hSCX], a
+ call .ReturnFromDexRegistration
+ pop af
+ ld [hMapAnims], a
+ ret
+; fb8c8
+
+.ReturnFromDexRegistration: ; fb8c8
+ call ClearTileMap
+ call LoadFontsExtra
+ call LoadStandardFont
+ farcall Pokedex_PlaceFrontpicTopLeftCorner
+ call WaitBGMap2
+ farcall GetEnemyMonDVs
+ ld a, [hli]
+ ld [TempMonDVs], a
+ ld a, [hl]
+ ld [TempMonDVs + 1], a
+ ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
+ call GetSGBLayout
+ call SetPalettes
+ ret
+; fb8f1
diff --git a/engine/routines/phonering_copytilemapatonce.asm b/engine/routines/phonering_copytilemapatonce.asm
new file mode 100644
index 000000000..2ffa688a9
--- /dev/null
+++ b/engine/routines/phonering_copytilemapatonce.asm
@@ -0,0 +1,80 @@
+PhoneRing_CopyTilemapAtOnce: ; 4d188
+ ld a, [hCGB]
+ and a
+ jp z, WaitBGMap
+ ld a, [wSpriteUpdatesEnabled]
+ cp $0
+ jp z, WaitBGMap
+
+; What follows is a modified version of CopyTilemapAtOnce.
+ ld a, [hBGMapMode]
+ push af
+ xor a
+ ld [hBGMapMode], a
+ ld a, [hMapAnims]
+ push af
+ xor a
+ ld [hMapAnims], a
+.wait
+ ld a, [rLY]
+ cp $8f
+ jr c, .wait
+
+ di
+ ld a, BANK(VBGMap2)
+ ld [rVBK], a
+ hlcoord 0, 0, AttrMap
+ call .CopyTilemapAtOnce
+ ld a, BANK(VBGMap0)
+ ld [rVBK], a
+ hlcoord 0, 0
+ call .CopyTilemapAtOnce
+.wait2
+ ld a, [rLY]
+ cp $8f
+ jr c, .wait2
+ ei
+
+ pop af
+ ld [hMapAnims], a
+ pop af
+ ld [hBGMapMode], a
+ ret
+
+.CopyTilemapAtOnce: ; 4d1cb
+ ld [hSPBuffer], sp
+ ld sp, hl
+ ld a, [hBGMapAddress + 1]
+ ld h, a
+ ld l, 0
+ ld a, SCREEN_HEIGHT
+ ld [hTilesPerCycle], a
+ ld b, 1 << 1 ; not in v/hblank
+ ld c, rSTAT % $100
+
+.loop
+rept SCREEN_WIDTH / 2
+ pop de
+.loop\@
+ ld a, [$ff00+c]
+ and b
+ jr nz, .loop\@
+ ld [hl], e
+ inc l
+ ld [hl], d
+ inc l
+endr
+
+ ld de, BG_MAP_WIDTH - SCREEN_WIDTH
+ add hl, de
+ ld a, [hTilesPerCycle]
+ dec a
+ ld [hTilesPerCycle], a
+ jr nz, .loop
+
+ ld a, [hSPBuffer]
+ ld l, a
+ ld a, [hSPBuffer + 1]
+ ld h, a
+ ld sp, hl
+ ret
diff --git a/engine/routines/placegraphic.asm b/engine/routines/placegraphic.asm
new file mode 100644
index 000000000..d72364776
--- /dev/null
+++ b/engine/routines/placegraphic.asm
@@ -0,0 +1,56 @@
+PlaceGraphic: ; 2ef6e
+; Fill wBoxAlignment-aligned box width b height c
+; with iterating tile starting from hGraphicStartTile at hl.
+; Predef $13
+
+ ld de, SCREEN_WIDTH
+
+ ld a, [wBoxAlignment]
+ and a
+ jr nz, .right
+
+ ld a, [hGraphicStartTile]
+.x1
+ push bc
+ push hl
+
+.y1
+ ld [hl], a
+ add hl, de
+ inc a
+ dec c
+ jr nz, .y1
+
+ pop hl
+ inc hl
+ pop bc
+ dec b
+ jr nz, .x1
+ ret
+
+.right
+; Right-aligned.
+ push bc
+ ld b, 0
+ dec c
+ add hl, bc
+ pop bc
+
+ ld a, [hGraphicStartTile]
+.x2
+ push bc
+ push hl
+
+.y2
+ ld [hl], a
+ add hl, de
+ inc a
+ dec c
+ jr nz, .y2
+
+ pop hl
+ dec hl
+ pop bc
+ dec b
+ jr nz, .x2
+ ret
diff --git a/engine/routines/placewaitingtext.asm b/engine/routines/placewaitingtext.asm
new file mode 100644
index 000000000..37fc2a056
--- /dev/null
+++ b/engine/routines/placewaitingtext.asm
@@ -0,0 +1,24 @@
+PlaceWaitingText:: ; 4000
+ hlcoord 3, 10
+ ld b, 1
+ ld c, 11
+
+ ld a, [wBattleMode]
+ and a
+ jr z, .notinbattle
+
+ call TextBox
+ jr .proceed
+
+.notinbattle
+ predef Predef_LinkTextbox
+
+.proceed
+ hlcoord 4, 11
+ ld de, .Waiting
+ call PlaceString
+ ld c, 50
+ jp DelayFrames
+
+.Waiting: ; 4025
+ db "Waiting...!@"
diff --git a/engine/routines/playslowcry.asm b/engine/routines/playslowcry.asm
new file mode 100644
index 000000000..3cc347a55
--- /dev/null
+++ b/engine/routines/playslowcry.asm
@@ -0,0 +1,31 @@
+PlaySlowCry: ; fb841
+ ld a, [ScriptVar]
+ call LoadCryHeader
+ jr c, .done
+
+ ld hl, CryPitch
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld bc, -$140
+ add hl, bc
+ ld a, l
+ ld [CryPitch], a
+ ld a, h
+ ld [CryPitch + 1], a
+ ld hl, CryLength
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld bc, $60
+ add hl, bc
+ ld a, l
+ ld [CryLength], a
+ ld a, h
+ ld [CryLength + 1], a
+ farcall _PlayCryHeader
+ call WaitSFX
+
+.done
+ ret
+; fb877
diff --git a/engine/routines/printhoursmins.asm b/engine/routines/printhoursmins.asm
new file mode 100644
index 000000000..50117188c
--- /dev/null
+++ b/engine/routines/printhoursmins.asm
@@ -0,0 +1,64 @@
+Function1dd6a9: ; 1dd6a9
+; XXX
+ ld a, b
+ ld b, c
+ ld c, a
+ push bc
+ push de
+ ld hl, sp+$2
+ ld d, h
+ ld e, l
+ pop hl
+ lb bc, PRINTNUM_LEADINGZEROS | 2, 5
+ call PrintNum
+ pop bc
+ ret
+
+PrintHoursMins: ; 1dd6bb (77:56bb)
+; Hours in b, minutes in c
+ ld a, b
+ cp 12
+ push af
+ jr c, .AM
+ jr z, .PM
+ sub 12
+ jr .PM
+.AM:
+ or a
+ jr nz, .PM
+ ld a, 12
+.PM:
+ ld b, a
+; Crazy stuff happening with the stack
+ push bc
+ ld hl, sp+$1
+ push de
+ push hl
+ pop de
+ pop hl
+ ld [hl], " "
+ lb bc, 1, 2
+ call PrintNum
+ ld [hl], ":"
+ inc hl
+ ld d, h
+ ld e, l
+ ld hl, sp+$0
+ push de
+ push hl
+ pop de
+ pop hl
+ lb bc, PRINTNUM_LEADINGZEROS | 1, 2
+ call PrintNum
+ pop bc
+ ld de, String_AM
+ pop af
+ jr c, .place_am_pm
+ ld de, String_PM
+.place_am_pm
+ inc hl
+ call PlaceString
+ ret
+
+String_AM: db "AM@" ; 1dd6fc
+String_PM: db "PM@" ; 1dd6ff
diff --git a/engine/routines/returntobattle_useball.asm b/engine/routines/returntobattle_useball.asm
new file mode 100644
index 000000000..e6e33f900
--- /dev/null
+++ b/engine/routines/returntobattle_useball.asm
@@ -0,0 +1,19 @@
+_ReturnToBattle_UseBall: ; 2715c
+ call ClearBGPalettes
+ call ClearTileMap
+ ld a, [BattleType]
+ cp BATTLETYPE_TUTORIAL
+ jr z, .gettutorialbackpic
+ farcall GetBattleMonBackpic
+ jr .continue
+
+.gettutorialbackpic
+ farcall GetTrainerBackpic
+.continue
+ farcall GetEnemyMonFrontpic
+ farcall _LoadBattleFontsHPBar
+ call GetMemSGBLayout
+ call CloseWindow
+ call LoadStandardMenuDataHeader
+ call WaitBGMap
+ jp SetPalettes
diff --git a/engine/routines/savemenu_copytilemapatonce.asm b/engine/routines/savemenu_copytilemapatonce.asm
new file mode 100644
index 000000000..de7cbaa8f
--- /dev/null
+++ b/engine/routines/savemenu_copytilemapatonce.asm
@@ -0,0 +1,77 @@
+SaveMenu_CopyTilemapAtOnce: ; 4cf45 (13:4f45)
+ ld a, [hCGB]
+ and a
+ jp z, WaitBGMap
+
+; The following is a modified version of CopyTilemapAtOnce.
+ ld a, [hBGMapMode]
+ push af
+ xor a
+ ld [hBGMapMode], a
+ ld a, [hMapAnims]
+ push af
+ xor a
+ ld [hMapAnims], a
+.WaitLY:
+ ld a, [rLY]
+ cp $60
+ jr c, .WaitLY
+
+ di
+ ld a, BANK(VBGMap2)
+ ld [rVBK], a
+ hlcoord 0, 0, AttrMap
+ call .CopyTilemapAtOnce
+ ld a, BANK(VBGMap0)
+ ld [rVBK], a
+ hlcoord 0, 0
+ call .CopyTilemapAtOnce
+.WaitLY2:
+ ld a, [rLY]
+ cp $60
+ jr c, .WaitLY2
+ ei
+
+ pop af
+ ld [hMapAnims], a
+ pop af
+ ld [hBGMapMode], a
+ ret
+
+.CopyTilemapAtOnce: ; 4cf80 (13:4f80)
+ ld [hSPBuffer], sp ; $ffd9
+ ld sp, hl
+ ld a, [hBGMapAddress + 1]
+ ld h, a
+ ld l, 0
+ ld a, SCREEN_HEIGHT
+ ld [hTilesPerCycle], a
+ ld b, 1 << 1
+ ld c, rSTAT % $100
+
+.loop
+rept SCREEN_WIDTH / 2
+ pop de
+.loop\@
+ ld a, [$ff00+c]
+ and b
+ jr nz, .loop\@
+ ld [hl], e
+ inc l
+ ld [hl], d
+ inc l
+endr
+
+ ld de, BG_MAP_WIDTH - SCREEN_WIDTH
+ add hl, de
+ ld a, [hTilesPerCycle]
+ dec a
+ ld [hTilesPerCycle], a
+ jr nz, .loop
+
+ ld a, [hSPBuffer]
+ ld l, a
+ ld a, [hSPBuffer + 1]
+ ld h, a
+ ld sp, hl
+ ret
diff --git a/engine/sine.asm b/engine/routines/sine.asm
index 89a905d2e..89a905d2e 100755
--- a/engine/sine.asm
+++ b/engine/routines/sine.asm
diff --git a/engine/routines/switchpartymons.asm b/engine/routines/switchpartymons.asm
new file mode 100644
index 000000000..cde9c82b2
--- /dev/null
+++ b/engine/routines/switchpartymons.asm
@@ -0,0 +1,145 @@
+_SwitchPartyMons:
+ ld a, [wd0e3]
+ dec a
+ ld [Buffer3], a
+ ld b, a
+ ld a, [wMenuCursorY]
+ dec a
+ ld [Buffer2], a
+ cp b
+ jr z, .skip
+ call .SwapMonAndMail
+ ld a, [Buffer3]
+ call .ClearSprite
+ ld a, [Buffer2]
+ call .ClearSprite
+.skip
+ ret
+
+.ClearSprite: ; 50f34 (14:4f34)
+ push af
+ hlcoord 0, 1
+ ld bc, 2 * SCREEN_WIDTH
+ call AddNTimes
+ ld bc, 2 * SCREEN_WIDTH
+ ld a, " "
+ call ByteFill
+ pop af
+ ld hl, Sprites
+ ld bc, $10
+ call AddNTimes
+ ld de, $4
+ ld c, $4
+.gfx_loop
+ ld [hl], $a0
+ add hl, de
+ dec c
+ jr nz, .gfx_loop
+ ld de, SFX_SWITCH_POKEMON
+ call WaitPlaySFX
+ ret
+
+.SwapMonAndMail: ; 50f62 (14:4f62)
+ push hl
+ push de
+ push bc
+ ld bc, PartySpecies
+ ld a, [Buffer2]
+ ld l, a
+ ld h, $0
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld a, [Buffer3]
+ ld l, a
+ ld h, $0
+ add hl, bc
+ ld a, [hl]
+ push af
+ ld a, [de]
+ ld [hl], a
+ pop af
+ ld [de], a
+ ld a, [Buffer2]
+ ld hl, PartyMon1Species
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+ push hl
+ ld de, wd002
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call CopyBytes
+ ld a, [Buffer3]
+ ld hl, PartyMon1
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+ pop de
+ push hl
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call CopyBytes
+ pop de
+ ld hl, wd002
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call CopyBytes
+ ld a, [Buffer2]
+ ld hl, PartyMonOT
+ call SkipNames
+ push hl
+ call .CopyNameTowd002
+ ld a, [Buffer3]
+ ld hl, PartyMonOT
+ call SkipNames
+ pop de
+ push hl
+ call .CopyName
+ pop de
+ ld hl, wd002
+ call .CopyName
+ ld hl, PartyMonNicknames
+ ld a, [Buffer2]
+ call SkipNames
+ push hl
+ call .CopyNameTowd002
+ ld hl, PartyMonNicknames
+ ld a, [Buffer3]
+ call SkipNames
+ pop de
+ push hl
+ call .CopyName
+ pop de
+ ld hl, wd002
+ call .CopyName
+ ld hl, sPartyMail
+ ld a, [Buffer2]
+ ld bc, MAIL_STRUCT_LENGTH
+ call AddNTimes
+ push hl
+ ld de, wd002
+ ld bc, MAIL_STRUCT_LENGTH
+ ld a, BANK(sPartyMail)
+ call GetSRAMBank
+ call CopyBytes
+ ld hl, sPartyMail
+ ld a, [Buffer3]
+ ld bc, MAIL_STRUCT_LENGTH
+ call AddNTimes
+ pop de
+ push hl
+ ld bc, MAIL_STRUCT_LENGTH
+ call CopyBytes
+ pop de
+ ld hl, wd002
+ ld bc, MAIL_STRUCT_LENGTH
+ call CopyBytes
+ call CloseSRAM
+ pop bc
+ pop de
+ pop hl
+ ret
+
+.CopyNameTowd002: ; 51036 (14:5036)
+ ld de, wd002
+
+.CopyName: ; 51039 (14:5039)
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ ret
diff --git a/engine/routines/townmap_convertlinebreakcharacters.asm b/engine/routines/townmap_convertlinebreakcharacters.asm
new file mode 100644
index 000000000..f08b436c9
--- /dev/null
+++ b/engine/routines/townmap_convertlinebreakcharacters.asm
@@ -0,0 +1,21 @@
+TownMap_ConvertLineBreakCharacters: ; 1de2c5
+ ld hl, StringBuffer1
+.loop
+ ld a, [hl]
+ cp "@"
+ jr z, .end
+ cp "%"
+ jr z, .line_break
+ cp "¯"
+ jr z, .line_break
+ inc hl
+ jr .loop
+
+.line_break
+ ld [hl], "<LNBRK>"
+
+.end
+ ld de, StringBuffer1
+ hlcoord 9, 0
+ call PlaceString
+ ret
diff --git a/engine/routines/trademonfrontpic.asm b/engine/routines/trademonfrontpic.asm
new file mode 100644
index 000000000..3a38688d7
--- /dev/null
+++ b/engine/routines/trademonfrontpic.asm
@@ -0,0 +1,38 @@
+GetTrademonFrontpic: ; 4d7fd
+ ld a, [wOTTrademonSpecies]
+ ld hl, wOTTrademonDVs
+ ld de, VTiles2
+ push de
+ push af
+ predef GetUnownLetter
+ pop af
+ ld [CurPartySpecies], a
+ ld [CurSpecies], a
+ call GetBaseData
+ pop de
+ predef GetAnimatedFrontpicPredef
+ ret
+
+AnimateTrademonFrontpic: ; 4d81e
+ ld a, [wOTTrademonSpecies]
+ call IsAPokemon
+ ret c
+ farcall ShowOTTrademonStats
+ ld a, [wOTTrademonSpecies]
+ ld [CurPartySpecies], a
+ ld a, [wOTTrademonDVs]
+ ld [TempMonDVs], a
+ ld a, [wOTTrademonDVs + 1]
+ ld [TempMonDVs + 1], a
+ ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
+ call GetSGBLayout
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbBGPals
+ farcall TradeAnim_ShowGetmonFrontpic
+ ld a, [wOTTrademonSpecies]
+ ld [CurPartySpecies], a
+ hlcoord 7, 2
+ ld d, $0
+ ld e, ANIM_MON_TRADE
+ predef AnimateFrontpic
+ ret
diff --git a/engine/routines/updatebattlehuds.asm b/engine/routines/updatebattlehuds.asm
new file mode 100644
index 000000000..ec7f662e8
--- /dev/null
+++ b/engine/routines/updatebattlehuds.asm
@@ -0,0 +1,9 @@
+_UpdateBattleHUDs:
+ farcall DrawPlayerHUD
+ ld hl, PlayerHPPal
+ call SetHPPal
+ farcall DrawEnemyHUD
+ ld hl, EnemyHPPal
+ call SetHPPal
+ farcall FinishBattleAnim
+ ret
diff --git a/engine/routines/updateitemdescription.asm b/engine/routines/updateitemdescription.asm
new file mode 100644
index 000000000..b684dd4d8
--- /dev/null
+++ b/engine/routines/updateitemdescription.asm
@@ -0,0 +1,13 @@
+UpdateItemDescription: ; 0x244c3
+ ld a, [MenuSelection]
+ ld [CurSpecies], a
+ hlcoord 0, 12
+ ld b, 4
+ ld c, SCREEN_WIDTH - 2
+ call TextBox
+ ld a, [MenuSelection]
+ cp -1
+ ret z
+ decoord 1, 14
+ farcall PrintItemDescription
+ ret
diff --git a/engine/rtc.asm b/engine/rtc.asm
index 3018b5301..dc49a9630 100755
--- a/engine/rtc.asm
+++ b/engine/rtc.asm
@@ -50,19 +50,19 @@ GetTimeOfDay:: ; 14032
TimesOfDay: ; 14044
; hours for the time of day
-; 04-09 morn | 10-17 day | 18-03 nite
- db 04, NITE
- db 10, MORN
- db 18, DAY
- db 24, NITE
- db -1, MORN
+; 0400-0959 morn | 1000-1759 day | 1800-0359 nite
+ db MORN_HOUR, NITE_F
+ db DAY_HOUR, MORN_F
+ db NITE_HOUR, DAY_F
+ db MAX_HOUR, NITE_F
+ db -1, MORN_F
; 1404e
-Unknown_1404e: ; Unreferenced
- db 20, 2
- db 40, 0
- db 60, 1
- db -1, 0
+Unknown_1404e: ; unreferenced
+ db 20, NITE_F
+ db 40, MORN_F
+ db 60, DAY_F
+ db -1, MORN_F
; 14056
StageRTCTimeForSave: ; 14056
@@ -143,8 +143,8 @@ Function140ae: ; 140ae
jr c, .dont_update
.time_overflow
- callba ClearDailyTimers
- callba Function170923
+ farcall ClearDailyTimers
+ farcall Function170923
; mobile
ld a, $5
call GetSRAMBank
diff --git a/engine/save.asm b/engine/save.asm
index de2d3bc65..69bbaee82 100644
--- a/engine/save.asm
+++ b/engine/save.asm
@@ -1,9 +1,9 @@
SaveMenu: ; 14a1a
call LoadStandardMenuDataHeader
- callba DisplaySaveInfoOnSave
+ farcall DisplaySaveInfoOnSave
call SpeechTextBox
call UpdateSprites
- callba SaveMenu_LoadEDTile
+ farcall SaveMenu_CopyTilemapAtOnce
ld hl, Text_WouldYouLikeToSaveTheGame
call SaveTheGame_yesorno
jr nz, .refused
@@ -19,20 +19,20 @@ SaveMenu: ; 14a1a
.refused
call ExitMenu
call ret_d90
- callba SaveMenu_LoadEDTile
+ farcall SaveMenu_CopyTilemapAtOnce
scf
ret
SaveAfterLinkTrade: ; 14a58
call PauseGameLogic
- callba StageRTCTimeForSave
- callba BackupMysteryGift
+ farcall StageRTCTimeForSave
+ farcall BackupMysteryGift
call SavePokemonData
call SaveChecksum
call SaveBackupPokemonData
call SaveBackupChecksum
- callba BackupPartyMonMail
- callba SaveRTC
+ farcall BackupPartyMonMail
+ farcall SaveRTC
call ResumeGameLogic
ret
; 14a83
@@ -95,8 +95,8 @@ MovePkmnWOMail_InsertMon_SaveGame: ; 14ad5
ld [wCurBox], a
ld a, $1
ld [wSaveFileExists], a
- callba StageRTCTimeForSave
- callba BackupMysteryGift
+ farcall StageRTCTimeForSave
+ farcall BackupMysteryGift
call ValidateSave
call SaveOptions
call SavePlayerData
@@ -107,9 +107,9 @@ MovePkmnWOMail_InsertMon_SaveGame: ; 14ad5
call SaveBackupPlayerData
call SaveBackupPokemonData
call SaveBackupChecksum
- callba BackupPartyMonMail
- callba BackupMobileEventIndex
- callba SaveRTC
+ farcall BackupPartyMonMail
+ farcall BackupMobileEventIndex
+ farcall SaveRTC
call LoadBox
call ResumeGameLogic
ld de, SFX_SAVE
@@ -271,8 +271,8 @@ SavedTheGame: ; 14be6
SaveGameData_: ; 14c10
ld a, 1
ld [wSaveFileExists], a
- callba StageRTCTimeForSave
- callba BackupMysteryGift
+ farcall StageRTCTimeForSave
+ farcall BackupMysteryGift
call ValidateSave
call SaveOptions
call SavePlayerData
@@ -285,9 +285,9 @@ SaveGameData_: ; 14c10
call SaveBackupPokemonData
call SaveBackupChecksum
call UpdateStackTop
- callba BackupPartyMonMail
- callba BackupMobileEventIndex
- callba SaveRTC
+ farcall BackupPartyMonMail
+ farcall BackupMobileEventIndex
+ farcall SaveRTC
ld a, BANK(sBattleTowerChallengeState)
call GetSRAMBank
ld a, [sBattleTowerChallengeState]
@@ -500,12 +500,12 @@ HallOfFame_InitSaveIfNeeded: ; 14da0
; 14da9
ValidateSave: ; 14da9
- ld a, BANK(s1_a008)
+ ld a, BANK(sCheckValue1) ; BANK(sCheckValue2)
call GetSRAMBank
- ld a, 99
- ld [s1_a008], a
- ld a, " "
- ld [s1_ad0f], a
+ ld a, SAVE_CHECK_VALUE_1
+ ld [sCheckValue1], a
+ ld a, SAVE_CHECK_VALUE_2
+ ld [sCheckValue2], a
jp CloseSRAM
; 14dbb
@@ -568,12 +568,12 @@ SaveChecksum: ; 14e13
; 14e2d
ValidateBackupSave: ; 14e2d
- ld a, BANK(s0_b208)
+ ld a, BANK(sBackupCheckValue1) ; BANK(sBackupCheckValue2)
call GetSRAMBank
- ld a, 99
- ld [s0_b208], a
- ld a, " "
- ld [s0_bf0f], a
+ ld a, SAVE_CHECK_VALUE_1
+ ld [sBackupCheckValue1], a
+ ld a, SAVE_CHECK_VALUE_2
+ ld [sBackupCheckValue2], a
call CloseSRAM
ret
; 14e40
@@ -636,9 +636,9 @@ TryLoadSaveFile: ; 14ea5 (5:4ea5)
call LoadPlayerData
call LoadPokemonData
call LoadBox
- callba RestorePartyMonMail
- callba RestoreMobileEventIndex
- callba RestoreMysteryGift
+ farcall RestorePartyMonMail
+ farcall RestoreMobileEventIndex
+ farcall RestoreMysteryGift
call ValidateBackupSave
call SaveBackupOptions
call SaveBackupPlayerData
@@ -653,9 +653,9 @@ TryLoadSaveFile: ; 14ea5 (5:4ea5)
call LoadBackupPlayerData
call LoadBackupPokemonData
call LoadBox
- callba RestorePartyMonMail
- callba RestoreMobileEventIndex
- callba RestoreMysteryGift
+ farcall RestorePartyMonMail
+ farcall RestoreMobileEventIndex
+ farcall RestoreMysteryGift
call ValidateSave
call SaveOptions
call SavePlayerData
@@ -726,25 +726,18 @@ TryLoadSaveData: ; 14f1c
ret
; 14f7c
-DefaultOptions: ; 14f7c
- db $03 ; mid text speed
- db $00 ; wSaveFileExists
- db $00 ; frame 0
- db $01 ; TextBoxFlags
- db $40 ; gb printer: normal brightness
- db $01 ; menu account on
- db $00 ; ??
- db $00 ; ??
-; 14f84
+
+INCLUDE "data/default_options.asm"
+
CheckPrimarySaveFile: ; 14f84
- ld a, BANK(s1_a008)
+ ld a, BANK(sCheckValue1) ; BANK(sCheckValue2)
call GetSRAMBank
- ld a, [s1_a008]
- cp 99
+ ld a, [sCheckValue1]
+ cp SAVE_CHECK_VALUE_1
jr nz, .nope
- ld a, [s1_ad0f]
- cp " "
+ ld a, [sCheckValue2]
+ cp SAVE_CHECK_VALUE_2
jr nz, .nope
ld hl, sOptions
ld de, Options
@@ -760,13 +753,13 @@ CheckPrimarySaveFile: ; 14f84
; 14faf
CheckBackupSaveFile: ; 14faf
- ld a, BANK(s0_b208)
+ ld a, BANK(sBackupCheckValue1) ; BANK(sBackupCheckValue2)
call GetSRAMBank
- ld a, [s0_b208]
- cp 99
+ ld a, [sBackupCheckValue1]
+ cp SAVE_CHECK_VALUE_1
jr nz, .nope
- ld a, [s0_bf0f]
- cp " "
+ ld a, [sBackupCheckValue2]
+ cp SAVE_CHECK_VALUE_2
jr nz, .nope
ld hl, sBackupOptions
ld de, Options
diff --git a/engine/scripting.asm b/engine/scripting.asm
index 42976ad65..9818bbac3 100644
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -35,7 +35,7 @@ WaitScript:
dec [hl]
ret nz
- callba Function58b9
+ farcall Function58b9
ld a, SCRIPT_READ
ld [ScriptMode], a
@@ -49,7 +49,7 @@ WaitScriptMovement:
bit 7, [hl]
ret nz
- callba Function58b9
+ farcall Function58b9
ld a, SCRIPT_READ
ld [ScriptMode], a
@@ -64,6 +64,7 @@ RunScriptCommand:
ScriptCommandTable:
+; entries correspond to macros/event.asm enumeration
dw Script_scall ; 00
dw Script_farscall ; 01
dw Script_ptcall ; 02
@@ -81,10 +82,10 @@ ScriptCommandTable:
dw Script_callasm ; 0e
dw Script_special ; 0f
dw Script_ptcallasm ; 10
- dw Script_checkmaptriggers ; 11
- dw Script_domaptrigger ; 12
- dw Script_checktriggers ; 13
- dw Script_dotrigger ; 14
+ dw Script_checkmapscene ; 11
+ dw Script_setmapscene ; 12
+ dw Script_checkscene ; 13
+ dw Script_setscene ; 14
dw Script_writebyte ; 15
dw Script_addvar ; 16
dw Script_random ; 17
@@ -174,14 +175,14 @@ ENDC
dw Script_applymovement ; 69
dw Script_applymovement2 ; 6a
dw Script_faceplayer ; 6b
- dw Script_faceperson ; 6c
+ dw Script_faceobject ; 6c
dw Script_variablesprite ; 6d
dw Script_disappear ; 6e
dw Script_appear ; 6f
dw Script_follow ; 70
dw Script_stopfollow ; 71
- dw Script_moveperson ; 72
- dw Script_writepersonxy ; 73
+ dw Script_moveobject ; 72
+ dw Script_writeobjectxy ; 73
dw Script_loademote ; 74
dw Script_showemote ; 75
dw Script_spriteface ; 76
@@ -276,7 +277,7 @@ Script_special:
ld e, a
call GetScriptByte
ld d, a
- callba Special
+ farcall Special
ret
Script_ptcallasm:
@@ -474,13 +475,13 @@ Script_pokepic:
ld a, [ScriptVar]
.ok
ld [CurPartySpecies], a
- callba Pokepic
+ farcall Pokepic
ret
Script_closepokepic:
; script command 0x57
- callba ClosePokepic
+ farcall ClosePokepic
ret
Script_verticalmenu:
@@ -518,7 +519,7 @@ Script_battletowertext:
call SetUpTextBox
call GetScriptByte
ld c, a
- callba BattleTowerText
+ farcall BattleTowerText
ret
Script_verbosegiveitem:
@@ -614,7 +615,7 @@ Script_pocketisfull:
Script_specialsound:
; script command 0x88
- callba CheckItemPocket
+ farcall CheckItemPocket
ld a, [wItemAttributeParamBuffer]
cp TM_HM
ld de, SFX_GET_TM
@@ -627,7 +628,7 @@ Script_specialsound:
GetPocketName:
- callba CheckItemPocket
+ farcall CheckItemPocket
ld a, [wItemAttributeParamBuffer]
dec a
ld hl, .Pockets
@@ -688,7 +689,7 @@ Script_pokemart:
ld d, a
ld a, [ScriptBank]
ld b, a
- callba OpenMartDialog
+ farcall OpenMartDialog
ret
Script_elevator:
@@ -704,7 +705,7 @@ Script_elevator:
ld d, a
ld a, [ScriptBank]
ld b, a
- callba Elevator
+ farcall Elevator
ret c
ld a, TRUE
ld [ScriptVar], a
@@ -717,7 +718,7 @@ Script_trade:
call GetScriptByte
ld e, a
- callba NPCTrade
+ farcall NPCTrade
ret
Script_phonecall:
@@ -731,13 +732,13 @@ Script_phonecall:
ld d, a
ld a, [ScriptBank]
ld b, a
- callba PhoneCall
+ farcall PhoneCall
ret
Script_hangup:
; script command 0x99
- callba HangUp
+ farcall HangUp
ret
Script_askforphonenumber:
@@ -749,7 +750,7 @@ Script_askforphonenumber:
jr c, .refused
call GetScriptByte
ld c, a
- callba AddPhoneNumber
+ farcall AddPhoneNumber
jr c, .phonefull
xor a
jr .done
@@ -770,7 +771,7 @@ Script_describedecoration:
call GetScriptByte
ld b, a
- callba DescribeDecoration
+ farcall DescribeDecoration
ld h, d
ld l, e
jp ScriptJump
@@ -799,7 +800,7 @@ Script_swarm:
ld d, a
call GetScriptByte
ld e, a
- callba StoreSwarmMapIndices
+ farcall StoreSwarmMapIndices
ret
Script_trainertext:
@@ -896,7 +897,7 @@ Script_encountermusic:
ld a, [OtherTrainerClass]
ld e, a
- callba PlayTrainerEncounterMusic
+ farcall PlayTrainerEncounterMusic
ret
Script_playmapmusic:
@@ -958,7 +959,7 @@ Script_waitsfx:
Script_warpsound:
; script command 0x87
- callba GetWarpSFX
+ farcall GetWarpSFX
call PlaySFX
ret
@@ -978,8 +979,8 @@ Script_cry:
call PlayCry
ret
-GetScriptPerson:
- and a
+GetScriptObject:
+ and a ; PLAYER?
ret z
cp LAST_TALKED
ret z
@@ -989,27 +990,27 @@ GetScriptPerson:
Script_setlasttalked:
; script command 0x68
; parameters:
-; person (SingleByteParam)
+; object id (SingleByteParam)
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
ld [hLastTalked], a
ret
Script_applymovement:
; script command 0x69
; parameters:
-; person (SingleByteParam)
+; object id (SingleByteParam)
; data (MovementPointerLabelParam)
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
ld c, a
ApplyMovement:
push bc
ld a, c
- callba SetFlagsForMovement_1
+ farcall SetFlagsForMovement_1
pop bc
push bc
@@ -1031,7 +1032,7 @@ ApplyMovement:
ret
SetFlagsForMovement_2:
- callba _SetFlagsForMovement_2
+ farcall _SetFlagsForMovement_2
ret
Script_applymovement2:
@@ -1053,38 +1054,38 @@ Script_faceplayer:
ld d, $0
ld a, [hLastTalked]
ld e, a
- callba GetRelativeFacing
+ farcall GetRelativeFacing
ld a, d
add a
add a
ld e, a
ld a, [hLastTalked]
ld d, a
- call ApplyPersonFacing
+ call ApplyObjectFacing
ret
-Script_faceperson:
+Script_faceobject:
; script command 0x6c
; parameters:
-; person1 (SingleByteParam)
-; person2 (SingleByteParam)
+; object1 (SingleByteParam)
+; object2 (SingleByteParam)
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
cp LAST_TALKED
jr c, .ok
ld a, [hLastTalked]
.ok
ld e, a
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
cp LAST_TALKED
jr nz, .ok2
ld a, [hLastTalked]
.ok2
ld d, a
push de
- callba GetRelativeFacing
+ farcall GetRelativeFacing
pop bc
ret c
ld a, d
@@ -1092,17 +1093,17 @@ Script_faceperson:
add a
ld e, a
ld d, c
- call ApplyPersonFacing
+ call ApplyObjectFacing
ret
Script_spriteface:
; script command 0x76
; parameters:
-; person (SingleByteParam)
+; object id (SingleByteParam)
; facing (SingleByteParam)
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
cp LAST_TALKED
jr nz, .ok
ld a, [hLastTalked]
@@ -1112,10 +1113,10 @@ Script_spriteface:
add a
add a
ld e, a
- call ApplyPersonFacing
+ call ApplyObjectFacing
ret
-ApplyPersonFacing:
+ApplyObjectFacing:
ld a, d
push de
call CheckObjectVisibility
@@ -1178,10 +1179,10 @@ Script_variablesprite:
Script_appear:
; script command 0x6f
; parameters:
-; person (SingleByteParam)
+; object id (SingleByteParam)
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
call _CopyObjectStruct
ld a, [hMapObjectIndexBuffer]
ld b, 0 ; clear
@@ -1191,10 +1192,10 @@ Script_appear:
Script_disappear:
; script command 0x6e
; parameters:
-; person (SingleByteParam)
+; object id (SingleByteParam)
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
cp LAST_TALKED
jr nz, .ok
ld a, [hLastTalked]
@@ -1203,7 +1204,7 @@ Script_disappear:
ld a, [hMapObjectIndexBuffer]
ld b, 1 ; set
call ApplyEventActionAppearDisappear
- callba _UpdateSprites
+ farcall _UpdateSprites
ret
ApplyEventActionAppearDisappear:
@@ -1229,33 +1230,33 @@ ApplyEventActionAppearDisappear:
Script_follow:
; script command 0x70
; parameters:
-; person2 (SingleByteParam)
-; person1 (SingleByteParam)
+; object2 (SingleByteParam)
+; object1 (SingleByteParam)
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
ld b, a
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
ld c, a
- callba StartFollow
+ farcall StartFollow
ret
Script_stopfollow:
; script command 0x71
- callba StopFollow
+ farcall StopFollow
ret
-Script_moveperson:
+Script_moveobject:
; script command 0x72
; parameters:
-; person (SingleByteParam)
+; object id (SingleByteParam)
; x (SingleByteParam)
; y (SingleByteParam)
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
ld b, a
call GetScriptByte
add 4
@@ -1263,37 +1264,37 @@ Script_moveperson:
call GetScriptByte
add 4
ld e, a
- callba CopyDECoordsToMapObject
+ farcall CopyDECoordsToMapObject
ret
-Script_writepersonxy:
+Script_writeobjectxy:
; script command 0x73
; parameters:
-; person (SingleByteParam)
+; object id (SingleByteParam)
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
cp LAST_TALKED
jr nz, .ok
ld a, [hLastTalked]
.ok
ld b, a
- callba WritePersonXY
+ farcall WriteObjectXY
ret
Script_follownotexact:
; script command 0x77
; parameters:
-; person2 (SingleByteParam)
-; person1 (SingleByteParam)
+; object2 (SingleByteParam)
+; object1 (SingleByteParam)
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
ld b, a
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
ld c, a
- callba FollowNotExact
+ farcall FollowNotExact
ret
Script_loademote:
@@ -1307,20 +1308,20 @@ Script_loademote:
ld a, [ScriptVar]
.not_var_emote
ld c, a
- callba LoadEmote
+ farcall LoadEmote
ret
Script_showemote:
; script command 0x75
; parameters:
; bubble (SingleByteParam)
-; person (SingleByteParam)
+; object id (SingleByteParam)
; time (DecimalParam)
call GetScriptByte
ld [ScriptVar], a
call GetScriptByte
- call GetScriptPerson
+ call GetScriptObject
cp LAST_TALKED
jr z, .ok
ld [hLastTalked], a
@@ -1355,19 +1356,19 @@ Script_earthquake:
; param (DecimalParam)
ld hl, EarthquakeMovement
- ld de, wd002
+ ld de, wEarthquakeMovementDataBuffer
ld bc, EarthquakeMovementEnd - EarthquakeMovement
call CopyBytes
call GetScriptByte
- ld [wd003], a
- and (1 << 6) - 1
- ld [wd005], a
+ ld [wEarthquakeMovementDataBuffer + 1], a
+ and %00111111
+ ld [wEarthquakeMovementDataBuffer + 3], a
ld b, BANK(.script)
ld de, .script
jp ScriptCall
.script
- applymovement PLAYER, wd002
+ applymovement PLAYER, wEarthquakeMovementDataBuffer
end
EarthquakeMovement:
@@ -1450,7 +1451,7 @@ Script_catchtutorial:
call GetScriptByte
ld [BattleType], a
call BufferScreen
- callba CatchTutorial
+ farcall CatchTutorial
jp Script_reloadmap
Script_reloadmapafterbattle:
@@ -1470,7 +1471,7 @@ Script_reloadmapafterbattle:
.notblackedout
bit 0, d
jr z, .was_wild
- callba MomTriesToBuySomething
+ farcall MomTriesToBuySomething
jr .done
.was_wild
@@ -1479,7 +1480,7 @@ Script_reloadmapafterbattle:
jr z, .done
ld b, BANK(Script_SpecialBillCall)
ld de, Script_SpecialBillCall
- callba LoadScriptBDE
+ farcall LoadScriptBDE
.done
jp Script_reloadmap
@@ -1750,20 +1751,20 @@ Script_priorityjump:
set 3, [hl]
ret
-Script_checktriggers:
+Script_checkscene:
; script command 0x13
- call CheckTriggers
- jr z, .no_triggers
+ call CheckScenes
+ jr z, .no_scene
ld [ScriptVar], a
ret
-.no_triggers
+.no_scene
ld a, $ff
ld [ScriptVar], a
ret
-Script_checkmaptriggers:
+Script_checkmapscene:
; script command 0x11
; parameters:
; map_group (SingleByteParam)
@@ -1773,49 +1774,49 @@ Script_checkmaptriggers:
ld b, a
call GetScriptByte
ld c, a
- call GetMapTrigger
+ call GetMapSceneID
ld a, d
or e
- jr z, .no_triggers
+ jr z, .no_scene
ld a, [de]
ld [ScriptVar], a
ret
-.no_triggers
+.no_scene
ld a, $ff
ld [ScriptVar], a
ret
-Script_dotrigger:
+Script_setscene:
; script command 0x14
; parameters:
-; trigger_id (SingleByteParam)
+; scene_id (SingleByteParam)
ld a, [MapGroup]
ld b, a
ld a, [MapNumber]
ld c, a
- jr DoTrigger
+ jr DoScene
-Script_domaptrigger:
+Script_setmapscene:
; script command 0x12
; parameters:
; map_group (MapGroupParam)
; map_id (MapIdParam)
-; trigger_id (SingleByteParam)
+; scene_id (SingleByteParam)
call GetScriptByte
ld b, a
call GetScriptByte
ld c, a
-DoTrigger:
- call GetMapTrigger
+DoScene:
+ call GetMapSceneID
ld a, d
or e
- jr z, .no_trigger
+ jr z, .no_scene
call GetScriptByte
ld [de], a
-.no_trigger
+.no_scene
ret
Script_copybytetovar:
@@ -1968,7 +1969,7 @@ Script_writecode:
GetVarAction:
ld c, a
- callba _GetVarAction
+ farcall _GetVarAction
ret
Script_checkver:
@@ -2039,7 +2040,7 @@ Script_mapnametotext:
ConvertLandmarkToText:
ld e, a
- callba GetLandmarkName
+ farcall GetLandmarkName
ld de, StringBuffer1
jp ConvertMemToText
@@ -2063,7 +2064,7 @@ Script_trainertotext:
ld c, a
call GetScriptByte
ld b, a
- callba GetTrainerName
+ farcall GetTrainerName
jr ConvertMemToText
Script_name:
@@ -2170,12 +2171,12 @@ Script_givepokeitem:
ld b, a
push bc
inc hl
- ld bc, MAIL_MAX_LENGTH
+ ld bc, MAIL_MSG_LENGTH
ld de, wd002
ld a, [ScriptBank]
call FarCopyBytes
pop bc
- callba GivePokeItem
+ farcall GivePokeItem
ret
Script_checkpokeitem:
@@ -2189,7 +2190,7 @@ Script_checkpokeitem:
ld d, a
ld a, [ScriptBank]
ld b, a
- callba CheckPokeItem
+ farcall CheckPokeItem
ret
Script_giveitem:
@@ -2262,7 +2263,7 @@ Script_givemoney:
call GetMoneyAccount
call LoadMoneyAmountToMem
- callba GiveMoney
+ farcall GiveMoney
ret
Script_takemoney:
@@ -2273,7 +2274,7 @@ Script_takemoney:
call GetMoneyAccount
call LoadMoneyAmountToMem
- callba TakeMoney
+ farcall TakeMoney
ret
Script_checkmoney:
@@ -2284,7 +2285,7 @@ Script_checkmoney:
call GetMoneyAccount
call LoadMoneyAmountToMem
- callba CompareMoney
+ farcall CompareMoney
CompareMoneyAction:
jr c, .two
@@ -2328,7 +2329,7 @@ Script_givecoins:
; coins (CoinByteParam)
call LoadCoinAmountToMem
- callba GiveCoins
+ farcall GiveCoins
ret
Script_takecoins:
@@ -2337,7 +2338,7 @@ Script_takecoins:
; coins (CoinByteParam)
call LoadCoinAmountToMem
- callba TakeCoins
+ farcall TakeCoins
ret
Script_checkcoins:
@@ -2346,7 +2347,7 @@ Script_checkcoins:
; coins (CoinByteParam)
call LoadCoinAmountToMem
- callba CheckCoins
+ farcall CheckCoins
jr CompareMoneyAction
LoadCoinAmountToMem:
@@ -2364,7 +2365,7 @@ Script_checktime:
xor a
ld [ScriptVar], a
- callba CheckTime
+ farcall CheckTime
call GetScriptByte
and c
ret z
@@ -2397,7 +2398,7 @@ Script_addcellnum:
ld [ScriptVar], a
call GetScriptByte
ld c, a
- callba AddPhoneNumber
+ farcall AddPhoneNumber
ret nc
ld a, TRUE
ld [ScriptVar], a
@@ -2412,7 +2413,7 @@ Script_delcellnum:
ld [ScriptVar], a
call GetScriptByte
ld c, a
- callba DelCellNum
+ farcall DelCellNum
ret nc
ld a, TRUE
ld [ScriptVar], a
@@ -2428,7 +2429,7 @@ Script_checkcellnum:
ld [ScriptVar], a
call GetScriptByte
ld c, a
- callba CheckCellNum
+ farcall CheckCellNum
ret nc
ld a, TRUE
ld [ScriptVar], a
@@ -2486,7 +2487,7 @@ Script_givepoke:
call GetScriptByte
call GetScriptByte
.ok
- callba GivePoke
+ farcall GivePoke
ld a, b
ld [ScriptVar], a
ret
@@ -2505,7 +2506,7 @@ Script_giveegg:
ld [CurPartySpecies], a
call GetScriptByte
ld [CurPartyLevel], a
- callba GiveEgg
+ farcall GiveEgg
ret nc
ld a, 2
ld [ScriptVar], a
@@ -2602,7 +2603,7 @@ Script_checkflag:
ret
_EngineFlagAction:
- callba EngineFlagAction
+ farcall EngineFlagAction
ret
Script_wildoff:
@@ -2668,7 +2669,7 @@ Script_warp:
call GetScriptByte
ld [YCoord], a
ld a, -1
- ld [wd001], a
+ ld [DefaultSpawnpoint], a
ld a, MAPSETUP_WARP
ld [hMapEntryMethod], a
ld a, 1
@@ -2681,7 +2682,7 @@ Script_warp:
call GetScriptByte
call GetScriptByte
ld a, -1
- ld [wd001], a
+ ld [DefaultSpawnpoint], a
ld a, MAPSETUP_BADWARP
ld [hMapEntryMethod], a
ld a, 1
@@ -2734,7 +2735,7 @@ Script_writecmdqueue:
ld d, a
ld a, [ScriptBank]
ld b, a
- callba WriteCmdQueue ; no need to farcall
+ farcall WriteCmdQueue ; no need to farcall
ret
Script_delcmdqueue:
@@ -2746,7 +2747,7 @@ Script_delcmdqueue:
ld [ScriptVar], a
call GetScriptByte
ld b, a
- callba DelCmdQueue ; no need to farcall
+ farcall DelCmdQueue ; no need to farcall
ret c
ld a, 1
ld [ScriptVar], a
@@ -2793,7 +2794,7 @@ Script_reloadmappart::
ld [hBGMapMode], a
call OverworldTextModeSwitch
call GetMovementPermissions
- callba ReloadMapPart
+ farcall ReloadMapPart
call UpdateSprites
ret
@@ -2802,11 +2803,11 @@ Script_warpcheck:
call WarpCheck
ret nc
- callba EnableEvents
+ farcall EnableEvents
ret
Script_enableevents: ; unreferenced
- callba EnableEvents
+ farcall EnableEvents
ret
Script_newloadmap:
@@ -2955,9 +2956,9 @@ ExitScriptSubroutine:
ld e, [hl]
ld d, $0
ld hl, wScriptStack
- add hl,de
- add hl,de
- add hl,de
+ add hl, de
+ add hl, de
+ add hl, de
ld a, [hli]
ld b, a
and " "
@@ -2992,9 +2993,9 @@ Script_halloffame:
ld hl, GameTimerPause
res 0, [hl]
- callba TrainerRankings_HallOfFame
- callba TrainerRankings_HallOfFame2
- callba HallOfFame
+ farcall TrainerRankings_HallOfFame
+ farcall TrainerRankings_HallOfFame2
+ farcall HallOfFame
ld hl, GameTimerPause
set 0, [hl]
jr ReturnFromCredits
@@ -3002,7 +3003,7 @@ Script_halloffame:
Script_credits:
; script command 0xa2
- callba RedCredits
+ farcall RedCredits
ReturnFromCredits:
call Script_end_all
ld a, $3
@@ -3030,7 +3031,7 @@ Script_wait:
Script_check_save:
; script command 0xa9
- callba CheckSave
+ farcall CheckSave
ld a, c
ld [ScriptVar], a
ret
diff --git a/engine/search.asm b/engine/search.asm
index 9543ecfbb..76be0e159 100755
--- a/engine/search.asm
+++ b/engine/search.asm
@@ -219,7 +219,7 @@ CheckOwnMon: ; 0x4a7ba
ld hl, PlayerName
- rept 4
+rept NAME_LENGTH_JAPANESE +- 2 ; should be PLAYER_NAME_LENGTH +- 2
ld a, [de]
cp [hl]
jr nz, .notfound
@@ -227,7 +227,7 @@ CheckOwnMon: ; 0x4a7ba
jr z, .found ; reached end of string
inc hl
inc de
- endr
+endr
ld a, [de]
cp [hl]
diff --git a/engine/select_menu.asm b/engine/select_menu.asm
new file mode 100755
index 000000000..e92c3ee50
--- /dev/null
+++ b/engine/select_menu.asm
@@ -0,0 +1,189 @@
+SelectMenu:: ; 13327
+
+ call CheckRegisteredItem
+ jr c, .NotRegistered
+ jp UseRegisteredItem
+
+.NotRegistered:
+ call OpenText
+ ld b, BANK(ItemMayBeRegisteredText)
+ ld hl, ItemMayBeRegisteredText
+ call MapTextbox
+ call WaitButton
+ jp CloseText
+; 13340
+
+
+ItemMayBeRegisteredText: ; 13340
+ text_jump UnknownText_0x1c1cf3
+ db "@"
+; 13345
+
+
+CheckRegisteredItem: ; 13345
+
+ ld a, [WhichRegisteredItem]
+ and a
+ jr z, .NoRegisteredItem
+ and REGISTERED_POCKET
+ rlca
+ rlca
+ ld hl, .Pockets
+ rst JumpTable
+ ret
+
+.Pockets:
+ dw .CheckItem
+ dw .CheckBall
+ dw .CheckKeyItem
+ dw .CheckTMHM
+
+.CheckItem:
+ ld hl, NumItems
+ call .CheckRegisteredNo
+ jr c, .NoRegisteredItem
+ inc hl
+ ld e, a
+ ld d, 0
+ add hl, de
+ add hl, de
+ call .IsSameItem
+ jr c, .NoRegisteredItem
+ and a
+ ret
+
+.CheckKeyItem:
+ ld a, [RegisteredItem]
+ ld hl, KeyItems
+ ld de, 1
+ call IsInArray
+ jr nc, .NoRegisteredItem
+ ld a, [RegisteredItem]
+ ld [CurItem], a
+ and a
+ ret
+
+.CheckBall:
+ ld hl, NumBalls
+ call .CheckRegisteredNo
+ jr nc, .NoRegisteredItem
+ inc hl
+ ld e, a
+ ld d, 0
+ add hl, de
+ add hl, de
+ call .IsSameItem
+ jr c, .NoRegisteredItem
+ ret
+
+.CheckTMHM:
+ jr .NoRegisteredItem
+
+.NoRegisteredItem:
+ xor a
+ ld [WhichRegisteredItem], a
+ ld [RegisteredItem], a
+ scf
+ ret
+; 133a6
+
+
+.CheckRegisteredNo: ; 133a6
+ ld a, [WhichRegisteredItem]
+ and REGISTERED_NUMBER
+ dec a
+ cp [hl]
+ jr nc, .NotEnoughItems
+ ld [CurItemQuantity], a
+ and a
+ ret
+
+.NotEnoughItems:
+ scf
+ ret
+; 133b6
+
+
+.IsSameItem: ; 133b6
+ ld a, [RegisteredItem]
+ cp [hl]
+ jr nz, .NotSameItem
+ ld [CurItem], a
+ and a
+ ret
+
+.NotSameItem:
+ scf
+ ret
+; 133c3
+
+
+UseRegisteredItem: ; 133c3
+
+ farcall CheckItemMenu
+ ld a, [wItemAttributeParamBuffer]
+ ld hl, .SwitchTo
+ rst JumpTable
+ ret
+
+.SwitchTo:
+ dw .CantUse
+ dw .NoFunction
+ dw .NoFunction
+ dw .NoFunction
+ dw .Current
+ dw .Party
+ dw .Overworld
+; 133df
+
+.NoFunction: ; 133df
+ call OpenText
+ call CantUseItem
+ call CloseText
+ and a
+ ret
+; 133ea
+
+.Current: ; 133ea
+ call OpenText
+ call DoItemEffect
+ call CloseText
+ and a
+ ret
+; 133f5
+
+.Party: ; 133f5
+ call RefreshScreen
+ call FadeToMenu
+ call DoItemEffect
+ call CloseSubmenu
+ call CloseText
+ and a
+ ret
+; 13406
+
+.Overworld: ; 13406
+ call RefreshScreen
+ ld a, 1
+ ld [wUsingItemWithSelect], a
+ call DoItemEffect
+ xor a
+ ld [wUsingItemWithSelect], a
+ ld a, [wItemEffectSucceeded]
+ cp 1
+ jr nz, ._cantuse
+ scf
+ ld a, HMENURETURN_SCRIPT
+ ld [hMenuReturn], a
+ ret
+; 13422
+
+.CantUse: ; 13422
+ call RefreshScreen
+
+._cantuse
+ call CantUseItem
+ call CloseText
+ and a
+ ret
+; 1342d
diff --git a/engine/selectmenu.asm b/engine/selectmenu.asm
deleted file mode 100755
index 838438a4c..000000000
--- a/engine/selectmenu.asm
+++ /dev/null
@@ -1,189 +0,0 @@
-SelectMenu:: ; 13327
-
- call CheckRegisteredItem
- jr c, .NotRegistered
- jp UseRegisteredItem
-
-.NotRegistered:
- call OpenText
- ld b, BANK(ItemMayBeRegisteredText)
- ld hl, ItemMayBeRegisteredText
- call MapTextbox
- call WaitButton
- jp CloseText
-; 13340
-
-
-ItemMayBeRegisteredText: ; 13340
- text_jump UnknownText_0x1c1cf3
- db "@"
-; 13345
-
-
-CheckRegisteredItem: ; 13345
-
- ld a, [WhichRegisteredItem]
- and a
- jr z, .NoRegisteredItem
- and REGISTERED_POCKET
- rlca
- rlca
- ld hl, .Pockets
- rst JumpTable
- ret
-
-.Pockets:
- dw .CheckItem
- dw .CheckBall
- dw .CheckKeyItem
- dw .CheckTMHM
-
-.CheckItem:
- ld hl, NumItems
- call .CheckRegisteredNo
- jr c, .NoRegisteredItem
- inc hl
- ld e, a
- ld d, 0
- add hl, de
- add hl, de
- call .IsSameItem
- jr c, .NoRegisteredItem
- and a
- ret
-
-.CheckKeyItem:
- ld a, [RegisteredItem]
- ld hl, KeyItems
- ld de, 1
- call IsInArray
- jr nc, .NoRegisteredItem
- ld a, [RegisteredItem]
- ld [CurItem], a
- and a
- ret
-
-.CheckBall:
- ld hl, NumBalls
- call .CheckRegisteredNo
- jr nc, .NoRegisteredItem
- inc hl
- ld e, a
- ld d, 0
- add hl, de
- add hl, de
- call .IsSameItem
- jr c, .NoRegisteredItem
- ret
-
-.CheckTMHM:
- jr .NoRegisteredItem
-
-.NoRegisteredItem:
- xor a
- ld [WhichRegisteredItem], a
- ld [RegisteredItem], a
- scf
- ret
-; 133a6
-
-
-.CheckRegisteredNo: ; 133a6
- ld a, [WhichRegisteredItem]
- and REGISTERED_NUMBER
- dec a
- cp [hl]
- jr nc, .NotEnoughItems
- ld [wd107], a
- and a
- ret
-
-.NotEnoughItems:
- scf
- ret
-; 133b6
-
-
-.IsSameItem: ; 133b6
- ld a, [RegisteredItem]
- cp [hl]
- jr nz, .NotSameItem
- ld [CurItem], a
- and a
- ret
-
-.NotSameItem:
- scf
- ret
-; 133c3
-
-
-UseRegisteredItem: ; 133c3
-
- callba CheckItemMenu
- ld a, [wItemAttributeParamBuffer]
- ld hl, .SwitchTo
- rst JumpTable
- ret
-
-.SwitchTo:
- dw .CantUse
- dw .NoFunction
- dw .NoFunction
- dw .NoFunction
- dw .Current
- dw .Party
- dw .Overworld
-; 133df
-
-.NoFunction: ; 133df
- call OpenText
- call CantUseItem
- call CloseText
- and a
- ret
-; 133ea
-
-.Current: ; 133ea
- call OpenText
- call DoItemEffect
- call CloseText
- and a
- ret
-; 133f5
-
-.Party: ; 133f5
- call RefreshScreen
- call FadeToMenu
- call DoItemEffect
- call CloseSubmenu
- call CloseText
- and a
- ret
-; 13406
-
-.Overworld: ; 13406
- call RefreshScreen
- ld a, 1
- ld [wUsingItemWithSelect], a
- call DoItemEffect
- xor a
- ld [wUsingItemWithSelect], a
- ld a, [wItemEffectSucceeded]
- cp 1
- jr nz, ._cantuse
- scf
- ld a, HMENURETURN_SCRIPT
- ld [hMenuReturn], a
- ret
-; 13422
-
-.CantUse: ; 13422
- call RefreshScreen
-
-._cantuse
- call CantUseItem
- call CloseText
- and a
- ret
-; 1342d
diff --git a/engine/sgb_layouts.asm b/engine/sgb_layouts.asm
new file mode 100644
index 000000000..36dbde84c
--- /dev/null
+++ b/engine/sgb_layouts.asm
@@ -0,0 +1,636 @@
+Predef_LoadSGBLayout: ; 864c
+; LoadSGBLayout
+ call CheckCGB
+ jp nz, Predef_LoadSGBLayoutCGB
+
+ ld a, b
+ cp SCGB_RAM
+ jr nz, .not_ram
+ ld a, [SGBPredef]
+.not_ram
+ cp SCGB_PARTY_MENU_HP_PALS
+ jp z, SGB_ApplyPartyMenuHPPals
+ ld l, a
+ ld h, 0
+ add hl, hl
+ ld de, .Jumptable
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, .Finish
+ push de
+ jp hl
+; 866f
+
+.Jumptable: ; 866f
+ dw .SGB_BattleGrayscale
+ dw .SGB_BattleColors
+ dw .SGB_PokegearPals
+ dw .SGB_StatsScreenHPPals
+ dw .SGB_Pokedex
+ dw .SGB_SlotMachine
+ dw .SGB06
+ dw .SGB07
+ dw .SGB_Diploma
+ dw .SGB_MapPals
+ dw .SGB_PartyMenu
+ dw .SGB_Evolution
+ dw .SGB0c
+ dw .SGB0d
+ dw .SGB_MoveList
+ dw .SGB0f
+ dw .SGB_PokedexSearchOption
+ dw .SGB11
+ dw .SGB12
+ dw .SGB13
+ dw .SGB_PackPals
+ dw .SGB_TrainerCard
+ dw .SGB_PokedexUnownMode
+ dw .SGB_BillsPC
+ dw .SGB_UnownPuzzle
+ dw .SGB19
+ dw .SGB_PlayerOrMonFrontpicPals
+ dw .SGB_TradeTube
+ dw .SGB_TrainerOrMonFrontpicPals
+ dw .SGB_MysteryGift
+ dw .SGB1e
+; 86ad
+
+.SGB_BattleGrayscale: ; 86ad
+ ld hl, PalPacket_9c66
+ ld de, BlkPacket_9aa6
+ ret
+; 86b4
+
+.SGB_BattleColors: ; 86b4
+ ld hl, BlkPacket_9aa6
+ call PushSGBPals_
+
+ ld hl, PalPacket_9ce6
+ ld de, wSGBPals
+ ld bc, $10
+ call CopyBytes
+
+ ld a, [PlayerHPPal]
+ ld l, a
+ ld h, 0
+ add hl, hl
+ add hl, hl
+ ld de, HPBarPals
+ add hl, de
+
+ ld a, [hli]
+ ld [wSGBPals + 3], a
+ ld a, [hli]
+ ld [wSGBPals + 4], a
+ ld a, [hli]
+ ld [wSGBPals + 5], a
+ ld a, [hl]
+ ld [wSGBPals + 6], a
+
+ ld a, [EnemyHPPal]
+ ld l, a
+ ld h, 0
+ add hl, hl
+ add hl, hl
+
+ ld de, HPBarPals
+ add hl, de
+ ld a, [hli]
+ ld [wSGBPals + 9], a
+ ld a, [hli]
+ ld [wSGBPals + 10], a
+ ld a, [hli]
+ ld [wSGBPals + 11], a
+ ld a, [hl]
+ ld [wSGBPals + 12], a
+
+ ld hl, PalPacket_9cf6
+ ld de, wSGBPals + $10
+ ld bc, $10
+ call CopyBytes
+
+ call GetBattlemonBackpicPalettePointer
+
+ ld a, [hli]
+ ld [wSGBPals + $13], a
+ ld a, [hli]
+ ld [wSGBPals + $14], a
+ ld a, [hli]
+ ld [wSGBPals + $15], a
+ ld a, [hl]
+ ld [wSGBPals + $16], a
+ call GetEnemyFrontpicPalettePointer
+ ld a, [hli]
+ ld [wSGBPals + $19], a
+ ld a, [hli]
+ ld [wSGBPals + $1a], a
+ ld a, [hli]
+ ld [wSGBPals + $1b], a
+ ld a, [hl]
+ ld [wSGBPals + $1c], a
+
+ ld hl, wSGBPals
+ ld de, wSGBPals + $10
+ ld a, SCGB_BATTLE_COLORS
+ ld [SGBPredef], a
+ ret
+; 873c
+
+.SGB_MoveList: ; 873c
+ ld hl, PalPacket_9bd6
+ ld de, wSGBPals
+ ld bc, $10
+ call CopyBytes
+
+ ld hl, wSGBPals + 1
+ ld [hl], $10
+ inc hl
+ inc hl
+
+ ld a, [PlayerHPPal]
+ add $2f
+ ld [hl], a
+ ld hl, wSGBPals
+ ld de, BlkPacket_9ad6
+ ret
+; 875c
+
+.SGB_PokegearPals: ; 875c
+ ld hl, PalPacket_9c76
+ ld de, BlkPacket_9a86
+ ret
+; 8763
+
+.SGB_StatsScreenHPPals: ; 8763
+ ld hl, PalPacket_9ce6
+ ld de, wSGBPals
+ ld bc, $10
+ call CopyBytes
+ ld a, [wCurHPPal]
+ ld l, a
+ ld h, 0
+ add hl, hl
+ add hl, hl
+ ld de, HPBarPals
+ add hl, de
+ ld a, [hli]
+ ld [wSGBPals + 3], a
+ ld a, [hli]
+ ld [wSGBPals + 4], a
+ ld a, [hli]
+ ld [wSGBPals + 5], a
+ ld a, [hl]
+ ld [wSGBPals + 6], a
+ ld a, [CurPartySpecies]
+ ld bc, TempMonDVs
+ call GetPlayerOrMonPalettePointer
+ ld a, [hli]
+ ld [wSGBPals + 9], a
+ ld a, [hli]
+ ld [wSGBPals + 10], a
+ ld a, [hli]
+ ld [wSGBPals + 11], a
+ ld a, [hl]
+ ld [wSGBPals + 12], a
+ ld hl, wSGBPals
+ ld de, BlkPacket_9ac6
+ ret
+; 87ab
+
+.SGB_PartyMenu: ; 87ab
+ ld hl, PalPacket_9c56
+ ld de, wSGBPals + 1
+ ret
+; 87b2
+
+.SGB_Pokedex: ; 87b2
+ ld hl, PalPacket_9ce6
+ ld de, wSGBPals
+ ld bc, $10
+ call CopyBytes
+ ld hl, wSGBPals + 3
+ ld [hl], $9f
+ inc hl
+ ld [hl], $2a
+ inc hl
+ ld [hl], $5a
+ inc hl
+ ld [hl], $19
+ ld a, [CurPartySpecies]
+ call GetMonPalettePointer_
+ ld a, [hli]
+ ld [wSGBPals + 9], a
+ ld a, [hli]
+ ld [wSGBPals + 10], a
+ ld a, [hli]
+ ld [wSGBPals + 11], a
+ ld a, [hl]
+ ld [wSGBPals + 12], a
+ ld hl, wSGBPals
+ ld de, BlkPacket_9ae6
+ ret
+; 87e9
+
+.SGB_BillsPC: ; 87e9
+ ld hl, PalPacket_9ce6
+ ld de, wSGBPals
+ ld bc, $10
+ call CopyBytes
+ ld hl, wSGBPals + 3
+ ld [hl], $9f
+ inc hl
+ ld [hl], $2a
+ inc hl
+ ld [hl], $5a
+ inc hl
+ ld [hl], $19
+ ld a, [CurPartySpecies]
+ ld bc, TempMonDVs
+ call GetPlayerOrMonPalettePointer
+ ld a, [hli]
+ ld [wSGBPals + 9], a
+ ld a, [hli]
+ ld [wSGBPals + 10], a
+ ld a, [hli]
+ ld [wSGBPals + 11], a
+ ld a, [hl]
+ ld [wSGBPals + 12], a
+ ld hl, wSGBPals
+ ld de, BlkPacket_9ae6
+ ret
+; 8823
+
+.SGB_PokedexUnownMode: ; 8823
+ call .SGB_Pokedex
+ ld de, BlkPacket_9af6
+ ret
+; 882a
+
+.SGB_PokedexSearchOption: ; 882a
+ ld hl, PalPacket_9ce6
+ ld de, wSGBPals
+ ld bc, $10
+ call CopyBytes
+ ld hl, wSGBPals + 3
+ ld [hl], $9f
+ inc hl
+ ld [hl], $2a
+ inc hl
+ ld [hl], $5a
+ inc hl
+ ld [hl], $19
+ ld hl, wSGBPals
+ ld de, BlkPacket_9a86
+ ret
+; 884b
+
+.SGB_PackPals: ; 884b
+ ld hl, PalPacket_9c36
+ ld de, BlkPacket_9a86
+ ret
+; 8852
+
+.SGB_SlotMachine: ; 8852
+ ld hl, PalPacket_9c96
+ ld de, BlkPacket_9b06
+ ret
+; 8859
+
+.SGB06: ; 8859
+ ld hl, PalPacket_9ca6
+ ld de, BlkPacket_9b76
+ ret
+; 8860
+
+.SGB_Diploma:
+.SGB_MysteryGift: ; 8860
+ ld hl, PalPacket_9cb6
+ ld de, BlkPacket_9a86
+ ret
+; 8867
+
+.SGB07: ; 8867
+ ld b, 0
+ ld hl, .BlkPacketTable_SGB07
+rept 4
+ add hl, bc
+endr
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ inc hl
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ret
+; 8878
+
+.BlkPacketTable_SGB07: ; 8878
+ dw BlkPacket_9a86, PalPacket_9be6
+ dw BlkPacket_9a96, PalPacket_9c06
+ dw BlkPacket_9a86, PalPacket_9c16
+; 8884
+
+.SGB0c: ; 8884
+ ld hl, PalPacket_9b96
+ ld de, BlkPacket_9b56
+ ld a, SCGB_DIPLOMA
+ ld [SGBPredef], a
+ ret
+; 8890
+
+.SGB13: ; 8890
+ ld hl, PalPacket_9ba6
+ ld de, BlkPacket_9b86
+ ret
+; 8897
+
+.SGB0f: ; 8897
+ ld hl, PalPacket_9c46
+ ld de, BlkPacket_9a86
+ ret
+; 889e
+
+.SGB11: ; 889e
+ ld hl, BlkPacket_9a86
+ ld de, PlayerLightScreenCount
+ ld bc, $10
+ call CopyBytes
+ ld hl, PalPacket_9bb6
+ ld de, BlkPacket_9a86
+ ret
+; 88b1
+
+.SGB_MapPals: ; 88b1
+ ld hl, PalPacket_9bd6
+ ld de, wSGBPals
+ ld bc, $10
+ call CopyBytes
+ call .GetMapPalsIndex
+ ld hl, wSGBPals + 1
+ ld [hld], a
+ ld de, BlkPacket_9a86
+ ld a, SCGB_MAPPALS
+ ld [SGBPredef], a
+ ret
+; 88cd
+
+.SGB_Evolution: ; 88cd
+ push bc
+ ld hl, PalPacket_9ce6
+ ld de, wSGBPals
+ ld bc, $10
+ call CopyBytes
+ pop bc
+ ld a, c
+ and a
+ jr z, .partymon
+ ; Egg
+ ld hl, wSGBPals + 3
+ ; RGB 7, 7, 7
+ ld [hl], $e7
+ inc hl
+ ld [hl], $1c
+ inc hl
+ ; RGB 2, 3, 3
+ ld [hl], $62
+ inc hl
+ ld [hl], $c
+ jr .done
+
+.partymon
+ ld hl, PartyMon1DVs
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld a, [CurPartyMon]
+ call AddNTimes
+ ld c, l
+ ld b, h
+ ld a, [PlayerHPPal]
+ call GetPlayerOrMonPalettePointer
+ ld a, [hli]
+ ld [wSGBPals + 3], a
+ ld a, [hli]
+ ld [wSGBPals + 4], a
+ ld a, [hli]
+ ld [wSGBPals + 5], a
+ ld a, [hl]
+ ld [wSGBPals + 6], a
+
+.done
+ ld hl, wSGBPals
+ ld de, BlkPacket_9a86
+ ret
+; 891a
+
+.SGB0d:
+.SGB_TrainerCard: ; 891a
+ ld hl, PalPacket_9cb6
+ ld de, BlkPacket_9a86
+ ret
+; 8921
+
+.SGB_UnownPuzzle: ; 8921
+ ld hl, PalPacket_9bc6
+ ld de, BlkPacket_9a86
+ ret
+; 8928
+
+.SGB12: ; 8928
+ ld hl, PalPacket_9bd6
+ ld de, wSGBPals
+ ld bc, $10
+ call CopyBytes
+ ld hl, BlkPacket_9a86
+ ld de, wSGBPals + $10
+ ld bc, $10
+ call CopyBytes
+ call .GetMapPalsIndex
+ ld hl, wSGBPals + 1
+ ld [hl], a
+ ld hl, wSGBPals + 3
+ ld [hl], $2e
+ ld hl, wSGBPals + $13
+ ld a, 5
+ ld [hli], a
+ ld a, [wMenuBorderLeftCoord]
+ ld [hli], a
+ ld a, [wMenuBorderTopCoord]
+ ld [hli], a
+ ld a, [wMenuBorderRightCoord]
+ ld [hli], a
+ ld a, [wMenuBorderBottomCoord]
+ ld [hl], a
+ ld hl, wSGBPals
+ ld de, wSGBPals + $10
+ ret
+; 8969
+
+.SGB1e: ; 8969
+ ld hl, PalPacket_9ce6
+ ld de, wSGBPals
+ ld bc, $10
+ call CopyBytes
+ ld a, [CurPartySpecies]
+ ld l, a
+ ld h, 0
+ add hl, hl
+ add hl, hl
+ add hl, hl
+ ld de, PokemonPalettes
+ add hl, de
+ ld a, [wcf65]
+ and 3
+ sla a
+ sla a
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hli]
+ ld [wSGBPals + 3], a
+ ld a, [hli]
+ ld [wSGBPals + 4], a
+ ld a, [hli]
+ ld [wSGBPals + 5], a
+ ld a, [hl]
+ ld [wSGBPals + 6], a
+ ld hl, wSGBPals
+ ld de, BlkPacket_9a86
+ ret
+; 89a6
+
+.SGB19: ; 89a6
+ ld hl, PalPacket_9cd6
+ ld de, BlkPacket_9a86
+ ret
+; 89ad
+
+.SGB_PlayerOrMonFrontpicPals: ; 89ad
+ ld hl, PalPacket_9ce6
+ ld de, wSGBPals
+ ld bc, $10
+ call CopyBytes
+ ld a, [CurPartySpecies]
+ ld bc, TempMonDVs
+ call GetPlayerOrMonPalettePointer
+ ld a, [hli]
+ ld [wSGBPals + 3], a
+ ld a, [hli]
+ ld [wSGBPals + 4], a
+ ld a, [hli]
+ ld [wSGBPals + 5], a
+ ld a, [hl]
+ ld [wSGBPals + 6], a
+ ld hl, wSGBPals
+ ld de, BlkPacket_9a86
+ ret
+; 89d9
+
+.SGB_TradeTube: ; 89d9
+ ld hl, PalPacket_9cc6
+ ld de, BlkPacket_9a86
+ ret
+; 89e0
+
+.SGB_TrainerOrMonFrontpicPals: ; 89e0
+ ld hl, PalPacket_9ce6
+ ld de, wSGBPals
+ ld bc, $10
+ call CopyBytes
+ ld a, [CurPartySpecies]
+ ld bc, TempMonDVs
+ call GetFrontpicPalettePointer
+ ld a, [hli]
+ ld [wSGBPals + 3], a
+ ld a, [hli]
+ ld [wSGBPals + 4], a
+ ld a, [hli]
+ ld [wSGBPals + 5], a
+ ld a, [hl]
+ ld [wSGBPals + 6], a
+ ld hl, wSGBPals
+ ld de, BlkPacket_9a86
+ ret
+; 8a0c
+
+.GetMapPalsIndex: ; 8a0c
+ ld a, [TimeOfDayPal]
+ cp NITE_F
+ jr c, .morn_day
+ ld a, $19
+ ret
+
+.morn_day
+ ld a, [wEnvironment]
+ cp ROUTE
+ jr z, .route
+ cp CAVE
+ jr z, .cave
+ cp DUNGEON
+ jr z, .cave
+ cp ENVIRONMENT_5
+ jr z, .perm5
+ cp GATE
+ jr z, .gate
+ ld a, [MapGroup]
+ ld e, a
+ ld d, 0
+ ld hl, .SGBRoofPalInds
+ add hl, de
+ ld a, [hl]
+ ret
+
+.route
+ ld a, $00
+ ret
+
+.cave
+ ld a, $18
+ ret
+
+.perm5
+ ld a, $06
+ ret
+
+.gate
+ ld a, $03
+ ret
+; 8a45
+
+.SGBRoofPalInds: ; 8a45
+ db $00 ; Unused
+ db $12 ; Olivine
+ db $14 ; Mahogany
+ db $18 ; Various Dungeons
+ db $11 ; Ecruteak
+ db $15 ; Blackthorn
+ db $09 ; Cinnabar
+ db $04 ; Cerulean
+ db $0f ; Azalea
+ db $16 ; Lake Of Rage
+ db $0e ; Violet
+ db $10 ; Goldenrod
+ db $06 ; Vermilion
+ db $01 ; Palette
+ db $03 ; Pewter
+ db $06 ; Fast Ship
+ db $0b ; Indigo Plateau
+ db $08 ; Fuchsia
+ db $05 ; Lavender
+ db $17 ; Silver Cave Outside
+ db $08 ; Pokemon Center 2F
+ db $07 ; Celadon
+ db $13 ; Cianwood
+ db $02 ; Viridian
+ db $0c ; New Bark
+ db $0a ; Saffron
+ db $0d ; Cherrygrove
+; 8a60
+
+.Finish: ; 8a60
+ push de
+ call PushSGBPals_
+ pop hl
+ jp PushSGBPals_
+; 8a68
diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm
index 93be28d9a..db5a2735f 100755
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -20,7 +20,7 @@ _SlotMachine:
call PlaySFX
call WaitSFX
call ClearBGPalettes
- callba TrainerRankings_EndSlotsWinStreak
+ farcall TrainerRankings_EndSlotsWinStreak
ld hl, Options
res NO_TEXT_SCROLL, [hl]
ld hl, rLCDC ; $ff40
@@ -41,7 +41,7 @@ _SlotMachine:
call ByteFill
ld b, SCGB_SLOT_MACHINE
call GetSGBLayout
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
ld hl, wSlots
ld bc, wSlotsDataEnd - wSlots
xor a
@@ -116,7 +116,7 @@ SlotsLoop: ; 927af (24:67af)
call Slots_SpinReels
xor a
ld [wCurrSpriteOAMAddr], a
- callab DoNextFrameForFirst16Sprites
+ callfar DoNextFrameForFirst16Sprites
call .PrintCoinsAndPayout
call .DummyFunc
call DelayFrame
@@ -471,10 +471,10 @@ Slots_LoadReelState: ; 929f6 (24:69f6)
Slot_CheckCoinCaseFull: ; 92a04 (24:6a04)
ld a, d
- cp 9999 / $100
+ cp MAX_COINS / $100
jr c, .not_full
ld a, e
- cp 9999 % $100
+ cp MAX_COINS % $100
jr c, .not_full
scf
ret
@@ -766,14 +766,15 @@ UpdateReelPositionAndOAM: ; 92b53 (24:6b53)
; 92bbe (24:6bbe)
+; unreferenced
Function92bbe: ; 92bbe
push hl
srl a
srl a
- add Unknown_92bce % $100
+ add .Unknown_92bce % $100
ld l, a
ld a, 0
- adc Unknown_92bce / $100
+ adc .Unknown_92bce / $100
ld h, a
ld a, [hl]
pop hl
@@ -781,7 +782,7 @@ Function92bbe: ; 92bbe
; 92bce
-Unknown_92bce: ; 92bce
+.Unknown_92bce: ; 92bce
db 0, 1, 2, 3, 4, 5
; 92bd4
@@ -1067,7 +1068,7 @@ ReelAction_InitGolem: ; 92d20
push bc
push af
depixel 12, 13
- ld a, SPRITE_ANIM_INDEX_SLOT_GOLEM
+ ld a, SPRITE_ANIM_INDEX_SLOTS_GOLEM
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_0E
add hl, bc
@@ -1812,7 +1813,7 @@ SlotGetPayout: ; 93124 (24:7124)
ld a, [hl]
ld [wPayout], a
ld d, a
- callba TrainerRankings_AddToSlotsPayouts
+ farcall TrainerRankings_AddToSlotsPayouts
ret
.PayoutTable:
@@ -1836,7 +1837,7 @@ SlotPayoutText: ; 93158 (24:7158)
jr nz, .MatchedSomething
ld hl, .Text_Darn
call PrintText
- callba TrainerRankings_EndSlotsWinStreak
+ farcall TrainerRankings_EndSlotsWinStreak
ret
.MatchedSomething:
@@ -1860,7 +1861,7 @@ SlotPayoutText: ; 93158 (24:7158)
.return
ld hl, .Text_PrintPayout
call PrintText
- callba TrainerRankings_AddToSlotsWinStreak
+ farcall TrainerRankings_AddToSlotsWinStreak
ret
; 93195 (24:7195)
@@ -2001,7 +2002,7 @@ SlotMachine_AnimateGolem: ; 9321d (24:721d)
dec [hl]
ld e, a
ld d, 14 * 8
- callba BattleAnim_Sine_e
+ farcall BattleAnim_Sine_e
ld a, e
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
@@ -2211,17 +2212,17 @@ Reel3Tilemap: ; 9334b
; 9335d
SlotsTilemap: ; 9335d
-INCBIN "gfx/slots.tilemap"
+INCBIN "gfx/slots/slots.tilemap"
; 9344d
Slots1LZ: ; 9344d
-INCBIN "gfx/slots_1.2bpp.lz"
+INCBIN "gfx/slots/slots_1.2bpp.lz"
; 935cd
Slots2LZ: ; 935cd
-INCBIN "gfx/slots_2.2bpp.lz"
+INCBIN "gfx/slots/slots_2.2bpp.lz"
; 9382d
Slots3LZ: ; 9382d
-INCBIN "gfx/slots_3.2bpp.lz"
+INCBIN "gfx/slots/slots_3.2bpp.lz"
; 93a3d
diff --git a/engine/spawn_points.asm b/engine/spawn_points.asm
index e8f1177f2..daebb6159 100644
--- a/engine/spawn_points.asm
+++ b/engine/spawn_points.asm
@@ -1,58 +1,17 @@
-
-SpawnPoints: ; 0x152ab
-
-spawn: MACRO
-; map, y, x
- map \1
- db \2, \3
-ENDM
-
- spawn KRISS_HOUSE_2F, 3, 3
- spawn VIRIDIAN_POKECENTER_1F, 5, 3
-
- spawn PALLET_TOWN, 5, 6
- spawn VIRIDIAN_CITY, 23, 26
- spawn PEWTER_CITY, 13, 26
- spawn CERULEAN_CITY, 19, 22
- spawn ROUTE_10_NORTH, 11, 2
- spawn VERMILION_CITY, 9, 6
- spawn LAVENDER_TOWN, 5, 6
- spawn SAFFRON_CITY, 9, 30
- spawn CELADON_CITY, 29, 10
- spawn FUCHSIA_CITY, 19, 28
- spawn CINNABAR_ISLAND, 11, 12
- spawn ROUTE_23, 9, 6
-
- spawn NEW_BARK_TOWN, 13, 6
- spawn CHERRYGROVE_CITY, 29, 4
- spawn VIOLET_CITY, 31, 26
- spawn ROUTE_32, 11, 74
- spawn AZALEA_TOWN, 15, 10
- spawn CIANWOOD_CITY, 23, 44
- spawn GOLDENROD_CITY, 15, 28
- spawn OLIVINE_CITY, 13, 22
- spawn ECRUTEAK_CITY, 23, 28
- spawn MAHOGANY_TOWN, 15, 14
- spawn LAKE_OF_RAGE, 21, 29
- spawn BLACKTHORN_CITY, 21, 30
- spawn SILVER_CAVE_OUTSIDE, 23, 20
- spawn FAST_SHIP_CABINS_SW_SSW_NW, 6, 2
- spawn N_A, -1, -1
-
+INCLUDE "data/maps/spawn_points.asm"
LoadSpawnPoint: ; 1531f
- ; loads the spawn point in wd001
+ ; loads the spawn point in DefaultSpawnpoint
push hl
push de
- ld a, [wd001]
+ ld a, [DefaultSpawnpoint]
cp SPAWN_N_A
jr z, .spawn_n_a
ld l, a
ld h, 0
-rept 2 ; multiply hl by 4
- add hl,hl
-endr
+ add hl, hl
+ add hl, hl
ld de, SpawnPoints
add hl, de
ld a, [hli]
diff --git a/engine/specials.asm b/engine/specials.asm
index 2548cf076..95f7cdf03 100644
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -2,9 +2,9 @@
Special:: ; c01b
; Run script special de.
ld hl, SpecialsPointers
- add hl,de
- add hl,de
- add hl,de
+ add hl, de
+ add hl, de
+ add hl, de
ld b, [hl]
inc hl
ld a, [hli]
@@ -111,7 +111,7 @@ SpecialsPointers:: ; c029
add_special Special_DisplayLinkRecord
add_special GetFirstPokemonHappiness
add_special CheckFirstMonIsEgg
- add_special RandomPhoneRareWildMon
+ add_special RandomUnseenWildMon
add_special RandomPhoneWildMon
add_special RandomPhoneMon
add_special MapCallbackSprites_LoadUsedSpritesGFX
@@ -200,7 +200,7 @@ SpecialNone: ; c224
Special_SetPlayerPalette: ; c225
ld a, [ScriptVar]
ld d, a
- callba SetPlayerPalette
+ farcall SetPlayerPalette
ret
; c230
@@ -215,7 +215,7 @@ Special_GameCornerPrizeMonCheckDex: ; c230
call FadeToMenu
ld a, [ScriptVar]
ld [wd265], a
- callba NewPokedexEntry
+ farcall NewPokedexEntry
call ExitAllMenus
ret
; c252
@@ -230,28 +230,28 @@ SpecialSeenMon: ; c252
Special_FindGreaterThanThatLevel: ; c25a
ld a, [ScriptVar]
ld b, a
- callba _FindGreaterThanThatLevel
+ farcall _FindGreaterThanThatLevel
jr z, FoundNone
jr FoundOne
Special_FindAtLeastThatHappy: ; c268
ld a, [ScriptVar]
ld b, a
- callba _FindAtLeastThatHappy
+ farcall _FindAtLeastThatHappy
jr z, FoundNone
jr FoundOne
Special_FindThatSpecies: ; c276
ld a, [ScriptVar]
ld b, a
- callba _FindThatSpecies
+ farcall _FindThatSpecies
jr z, FoundNone
jr FoundOne
Special_FindThatSpeciesYourTrainerID: ; c284
ld a, [ScriptVar]
ld b, a
- callba _FindThatSpeciesYourTrainerID
+ farcall _FindThatSpeciesYourTrainerID
jr z, FoundNone
jr FoundOne
@@ -269,7 +269,7 @@ FoundNone: ; c298
SpecialNameRival: ; 0xc29d
ld b, $2 ; rival
ld de, RivalName
- callba _NamingScreen
+ farcall _NamingScreen
; default to "SILVER"
ld hl, RivalName
ld de, DefaultRivalName
@@ -281,27 +281,27 @@ DefaultRivalName: ; 0xc2b2
db "SILVER@"
SpecialNameRater: ; c2b9
- callba NameRater
+ farcall NameRater
ret
; c2c0
Special_TownMap: ; c2c0
call FadeToMenu
- callba _TownMap
+ farcall _TownMap
call ExitAllMenus
ret
; c2cd
Special_UnownPrinter: ; c2cd
call FadeToMenu
- callba UnownPrinter
+ farcall UnownPrinter
call ExitAllMenus
ret
; c2da
Special_DisplayLinkRecord: ; c2da
call FadeToMenu
- callba DisplayLinkRecord
+ farcall DisplayLinkRecord
call ExitAllMenus
ret
; c2e7
@@ -309,7 +309,7 @@ Special_DisplayLinkRecord: ; c2da
Special_KrissHousePC: ; c2e7
xor a
ld [ScriptVar], a
- callba _KrissHousePC
+ farcall _KrissHousePC
ld a, c
ld [ScriptVar], a
ret
@@ -365,7 +365,7 @@ Special_GetMysteryGiftItem: ; c309
; 0xc34a
BugContestJudging: ; c34a
- callba _BugContestJudging
+ farcall _BugContestJudging
ld a, b
ld [ScriptVar], a
ret
@@ -374,13 +374,13 @@ BugContestJudging: ; c34a
MapRadio: ; c355
ld a, [ScriptVar]
ld e, a
- callba PlayRadio
+ farcall PlayRadio
ret
; c360
Special_UnownPuzzle: ; c360
call FadeToMenu
- callba UnownPuzzle
+ farcall UnownPuzzle
ld a, [wSolvedUnownPuzzle]
ld [ScriptVar], a
call ExitAllMenus
@@ -485,7 +485,7 @@ ScriptReturnCarry: ; c3e2
; c3ef
Special_CheckUnusedTwoDayTimer: ; c3ef
- callba CheckUnusedTwoDayTimer
+ farcall CheckUnusedTwoDayTimer
ld a, [wUnusedTwoDayTimer]
ld [ScriptVar], a
ret
@@ -520,20 +520,20 @@ StoreSwarmMapIndices:: ; c403
SpecialCheckPokerus: ; c419
; Check if a monster in your party has Pokerus
- callba CheckPokerus
+ farcall CheckPokerus
jp ScriptReturnCarry
; c422
Special_ResetLuckyNumberShowFlag: ; c422
- callba RestartLuckyNumberCountdown
+ farcall RestartLuckyNumberCountdown
ld hl, wLuckyNumberShowFlag
res 0, [hl]
- callba LoadOrRegenerateLuckyIDNumber
+ farcall LoadOrRegenerateLuckyIDNumber
ret
; c434
Special_CheckLuckyNumberShowFlag: ; c434
- callba CheckLuckyNumberShowFlag
+ farcall CheckLuckyNumberShowFlag
jp ScriptReturnCarry
; c43d
@@ -618,9 +618,9 @@ SpecialGameboyCheck: ; c478
Special_FadeOutMusic: ; c48f
ld a, MUSIC_NONE % $100
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, MUSIC_NONE / $100
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ld a, $2
ld [MusicFade], a
ret
@@ -628,14 +628,14 @@ Special_FadeOutMusic: ; c48f
Diploma: ; c49f
call FadeToMenu
- callba _Diploma
+ farcall _Diploma
call ExitAllMenus
ret
; c4ac
PrintDiploma: ; c4ac
call FadeToMenu
- callba _PrintDiploma
+ farcall _PrintDiploma
call ExitAllMenus
ret
; c4b9
diff --git a/engine/sprite_anims.asm b/engine/sprite_anims.asm
index ed7fe20ad..1b3fb9a0d 100755
--- a/engine/sprite_anims.asm
+++ b/engine/sprite_anims.asm
@@ -13,54 +13,54 @@ DoAnimFrame: ; 8d24b
; 8d25b
.Jumptable: ; 8d25b (23:525b)
-
- dw .Null ; null
- dw .one ; bouncing mon icon
- dw .two ; bouncing mon icon, selected
- dw .three ; bouncing mon icon, menu open
- dw .four
- dw .namingscreencursor
- dw .GameFreakLogo ; Game Freak logo
- dw .seven
- dw .eight
- dw .SlotsGolem ; Something to do with slots
- dw .SlotsChansey ; Something to do with slots
- dw .SlotsChanseyEgg ; Something to do with slots
- dw .mailcompositioncursor ; blinking cursor
- dw .thirteen
- dw .fourteen
- dw .fifteen
- dw .sixteen
- dw .seventeen
- dw .eighteen
- dw .EggShell ; finish egg hatching animation
- dw .RadioTuningKnob ; radio tuning knob
- dw .twentyone ; cut grass leaves
- dw .FlyFrom ; flying sprite
- dw .FlyLeaf ; flying leaves
- dw .FlyTo ; fly to
- dw .twentyfive
- dw .twentysix
- dw .twentyseven
- dw .twentyeight
- dw .twentynine ; intro suicune
- dw .thirty ; intro pichu wooper
- dw .thirtyone ; celebi
- dw .thirtytwo ; intro unown
- dw .thirtythree ; intro unown F with suicune leaping up
- dw .thirtyfour ; intro suicune facing away from us
+; entries correspond to SPRITE_ANIM_SEQ_* constants
+ dw .Null
+ dw .PartyMon
+ dw .PartyMonSwitch
+ dw .PartyMonSelected
+ dw .GSTitleTrail
+ dw .NamingScreenCursor
+ dw .GameFreakLogo
+ dw .GSIntroStar
+ dw .GSIntroSparkle
+ dw .SlotsGolem
+ dw .SlotsChansey
+ dw .SlotsChanseyEgg
+ dw .MailCursor
+ dw .ForUnusedCursor
+ dw .DummyGameCursor
+ dw .PokegearArrow
+ dw .TradePokeBall
+ dw .TradeTubeBulge
+ dw .TrademonInTube
+ dw .RevealNewMon
+ dw .RadioTuningKnob
+ dw .CutLeaves
+ dw .FlyFrom
+ dw .FlyLeaf
+ dw .FlyTo
+ dw .sprite_anim_seq_19
+ dw .sprite_anim_seq_1A
+ dw .sprite_anim_seq_1B
+ dw .sprite_anim_seq_1C
+ dw .IntroSuicune
+ dw .IntroPichuWooper
+ dw .Celebi
+ dw .IntroUnown
+ dw .IntroUnownF
+ dw .IntroSuicuneAway
.Null: ; 8d2a1 (23:52a1)
ret
-.one ; 8d2a2 (23:52a2)
+.PartyMon ; 8d2a2 (23:52a2)
ld a, [wMenuCursorY]
ld hl, SPRITEANIMSTRUCT_INDEX
add hl, bc
cp [hl]
- jr z, .two
+ jr z, .PartyMonSwitch
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
@@ -71,7 +71,7 @@ DoAnimFrame: ; 8d24b
ld [hl], $0
ret
-.two ; 8d2b9 (23:52b9)
+.PartyMonSwitch ; 8d2b9 (23:52b9)
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld [hl], 8 * 3
@@ -113,7 +113,7 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
-.three ; 8d2ea (23:52ea)
+.PartyMonSelected ; 8d2ea (23:52ea)
ld a, [wMenuCursorY]
ld hl, SPRITEANIMSTRUCT_INDEX
@@ -132,7 +132,7 @@ DoAnimFrame: ; 8d24b
ld [hl], 8 * 3
ret
-.four ; 8d302 (23:5302)
+.GSTitleTrail ; 8d302 (23:5302)
call .AnonymousJumptable
jp hl
; 8d306 (23:5306)
@@ -203,7 +203,7 @@ DoAnimFrame: ; 8d24b
ret
; 8d35a
-.twentyfive ; 8d35a (23:535a)
+.sprite_anim_seq_19 ; 8d35a (23:535a)
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -217,19 +217,19 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
-.namingscreencursor ; 8d36c (23:536c)
- callab NamingScreen_AnimateCursor
+.NamingScreenCursor ; 8d36c (23:536c)
+ callfar NamingScreen_AnimateCursor
ret
-.mailcompositioncursor ; 8d373 (23:5373)
- callab ComposeMail_AnimateCursor
+.MailCursor ; 8d373 (23:5373)
+ callfar ComposeMail_AnimateCursor
ret
.GameFreakLogo: ; 8d37a (23:537a)
- callab GameFreakLogoJumper
+ callfar GameFreakLogoJumper
ret
-.seven ; 8d381 (23:5381)
+.GSIntroStar ; 8d381 (23:5381)
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -279,7 +279,7 @@ DoAnimFrame: ; 8d24b
call DeinitializeSprite
ret
-.eight ; 8d3c3 (23:53c3)
+.GSIntroSparkle ; 8d3c3 (23:53c3)
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hli]
@@ -357,11 +357,11 @@ DoAnimFrame: ; 8d24b
ret
.SlotsGolem: ; 8d422 (23:5422)
- callab SlotMachine_AnimateGolem
+ callfar SlotMachine_AnimateGolem
ret
.SlotsChansey: ; 8d429 (23:5429)
- callab Slots_AnimateChansey
+ callfar Slots_AnimateChansey
ld hl, wcf64
ld a, [hl]
cp $2
@@ -404,33 +404,33 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
-.thirteen ; 8d46e (23:546e)
- callab ret_e00ed
+.ForUnusedCursor ; 8d46e (23:546e)
+ callfar ret_e00ed
ret
-.fifteen ; 8d475 (23:5475)
- callab AnimatePokegearModeIndicatorArrow
+.PokegearArrow ; 8d475 (23:5475)
+ callfar AnimatePokegearModeIndicatorArrow
ret
-.fourteen ; 8d47c (23:547c)
- callab DummyGame_InterpretJoypad_AnimateCursor
+.DummyGameCursor ; 8d47c (23:547c)
+ callfar DummyGame_InterpretJoypad_AnimateCursor
ret
-.sixteen ; 8d483 (23:5483)
+.TradePokeBall ; 8d483 (23:5483)
call .AnonymousJumptable
jp hl
; 8d487 (23:5487)
; Anonymous dw (see .AnonymousJumptable)
- dw .sixteen_zero
- dw .sixteen_one
- dw .sixteen_two
- dw .sixteen_three
- dw .sixteen_four
- dw .sixteen_five
+ dw .TradePokeBall_zero
+ dw .TradePokeBall_one
+ dw .TradePokeBall_two
+ dw .TradePokeBall_three
+ dw .TradePokeBall_four
+ dw .TradePokeBall_five
; 8d493
-.sixteen_zero ; 8d493
+.TradePokeBall_zero ; 8d493
ld a, SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL_0
call _ReinitSpriteAnimFrame
@@ -444,7 +444,7 @@ DoAnimFrame: ; 8d24b
ret
; 8d4a5
-.sixteen_two ; 8d4a5
+.TradePokeBall_two ; 8d4a5
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -460,7 +460,7 @@ DoAnimFrame: ; 8d24b
add hl, bc
ld [hl], $40
-.sixteen_three ; 8d4b8
+.TradePokeBall_three ; 8d4b8
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -478,10 +478,10 @@ DoAnimFrame: ; 8d24b
.asm_8d4cd
ld de, SFX_GOT_SAFARI_BALLS
call PlaySFX
- jr .sixteen_five
+ jr .TradePokeBall_five
; 8d4d5
-.sixteen_one ; 8d4d5
+.TradePokeBall_one ; 8d4d5
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld [hl], $4
@@ -496,7 +496,7 @@ DoAnimFrame: ; 8d24b
ret
; 8d4e8
-.sixteen_four ; 8d4e8
+.TradePokeBall_four ; 8d4e8
ld hl, SPRITEANIMSTRUCT_0D
add hl, bc
ld a, [hl]
@@ -542,12 +542,12 @@ DoAnimFrame: ; 8d24b
call .IncrementJumptableIndex
ret
-.sixteen_five ; 8d526
+.TradePokeBall_five ; 8d526
call DeinitializeSprite
ret
; 8d52a
-.seventeen ; 8d52a (23:552a)
+.TradeTubeBulge ; 8d52a (23:552a)
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, [hl]
@@ -565,11 +565,11 @@ DoAnimFrame: ; 8d24b
call DeinitializeSprite
ret
-.eighteen ; 8d543 (23:5543)
- callab TradeAnim_AnimateTrademonInTube
+.TrademonInTube ; 8d543 (23:5543)
+ callfar TradeAnim_AnimateTrademonInTube
ret
-.EggShell: ; 8d54a (23:554a)
+.RevealNewMon: ; 8d54a (23:554a)
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -607,10 +607,10 @@ DoAnimFrame: ; 8d24b
ret
.RadioTuningKnob: ; 8d578 (23:5578)
- callab AnimateTuningKnob
+ callfar AnimateTuningKnob
ret
-.twentyone ; 8d57f (23:557f)
+.CutLeaves ; 8d57f (23:557f)
ld hl, SPRITEANIMSTRUCT_0D
add hl, bc
ld e, [hl]
@@ -749,15 +749,15 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
-.twentyseven ; 8d630 (23:5630)
- callba Function108bc7
+.sprite_anim_seq_1B ; 8d630 (23:5630)
+ farcall Function108bc7
ret
-.twentyeight ; 8d637 (23:5637)
- callba Function108be0
+.sprite_anim_seq_1C ; 8d637 (23:5637)
+ farcall Function108be0
ret
-.twentynine ; 8d63e (23:563e)
+.IntroSuicune ; 8d63e (23:563e)
ld a, [wcf65]
and a
jr nz, .asm_8d645
@@ -784,7 +784,7 @@ DoAnimFrame: ; 8d24b
call _ReinitSpriteAnimFrame
ret
-.thirty ; 8d666 (23:5666)
+.IntroPichuWooper ; 8d666 (23:5666)
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -803,7 +803,7 @@ DoAnimFrame: ; 8d24b
.asm_8d67f
ret
-.thirtytwo ; 8d680 (23:5680)
+.IntroUnown ; 8d680 (23:5680)
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld d, [hl]
@@ -830,7 +830,7 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
-.thirtythree ; 8d6a2 (23:56a2)
+.IntroUnownF ; 8d6a2 (23:56a2)
ld a, [wcf64]
cp $40
ret nz
@@ -838,7 +838,7 @@ DoAnimFrame: ; 8d24b
call _ReinitSpriteAnimFrame
ret
-.thirtyfour ; 8d6ae (23:56ae)
+.IntroSuicuneAway ; 8d6ae (23:56ae)
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
ld a, [hl]
@@ -846,12 +846,12 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
-.twentysix ; 8d6b7 (23:56b7)
- callba AnimateEZChatCursor
+.sprite_anim_seq_1A ; 8d6b7 (23:56b7)
+ farcall AnimateEZChatCursor
ret
-.thirtyone ; 8d6be (23:56be)
- callba UpdateCelebiPosition
+.Celebi ; 8d6be (23:56be)
+ farcall UpdateCelebiPosition
ret
.AnonymousJumptable: ; 8d6c5 (23:56c5)
diff --git a/engine/sprites.asm b/engine/sprites.asm
index b358275eb..afccc114a 100755
--- a/engine/sprites.asm
+++ b/engine/sprites.asm
@@ -550,60 +550,30 @@ BrokenGetStdGraphics: ; 8d1ac
ret
; 8d1c4
-SpriteAnimSeqData: ; 8d1c4
- ; frameset sequence, tile
- db SPRITE_ANIM_FRAMESET_PARTY_MON, SPRITE_ANIM_SEQ_01, $00 ; 00
- db SPRITE_ANIM_FRAMESET_07, SPRITE_ANIM_SEQ_04, $00 ; 01
- db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_05, $05 ; 02
- db SPRITE_ANIM_FRAMESET_GAMEFREAK_LOGO, SPRITE_ANIM_SEQ_GAMEFREAK_LOGO, $00 ; 03
- db SPRITE_ANIM_FRAMESET_0B, SPRITE_ANIM_SEQ_07, $06 ; 04 gs intro star
- db SPRITE_ANIM_FRAMESET_0C, SPRITE_ANIM_SEQ_08, $06 ; 05 gs intro sparkle
- db SPRITE_ANIM_FRAMESET_SLOTS_GOLEM, SPRITE_ANIM_SEQ_SLOT_GOLEM, $07 ; 06 slots golem
- db SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY, SPRITE_ANIM_SEQ_SLOTS_CHANSEY, $07 ; 07 slots chansey
- db SPRITE_ANIM_FRAMESET_SLOTS_EGG, SPRITE_ANIM_SEQ_SLOTS_EGG, $07 ; 08 slots egg
- db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_0C, $05 ; 09
- db SPRITE_ANIM_FRAMESET_WALK_CYCLE, SPRITE_ANIM_SEQ_NULL, $00 ; 0a walk cycle
- db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_0D, $08 ; 0b
- db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_0E, $08 ; 0c
- db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_0F, $08 ; 0d
- db SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL, SPRITE_ANIM_SEQ_10, $00 ; 0e
- db SPRITE_ANIM_FRAMESET_TRADE_POOF, SPRITE_ANIM_SEQ_NULL, $00 ; 0f
- db SPRITE_ANIM_FRAMESET_TRADE_TUBE_BULGE, SPRITE_ANIM_SEQ_11, $00 ; 10
- db SPRITE_ANIM_FRAMESET_TRADEMON_ICON, SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE, $00 ; 11
- db SPRITE_ANIM_FRAMESET_TRADEMON_BUBBLE, SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE, $00 ; 12
- db SPRITE_ANIM_FRAMESET_EVOLUTION_BALL_OF_LIGHT, SPRITE_ANIM_SEQ_13, $00 ; 13
- db SPRITE_ANIM_FRAMESET_RADIO_TUNING_KNOB, SPRITE_ANIM_SEQ_14, $00 ; 14 radio tuning knob
- db SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_RED, SPRITE_ANIM_SEQ_NULL, $00 ; 15 chris on magnet train
- db SPRITE_ANIM_FRAMESET_LEAF, SPRITE_ANIM_SEQ_15, $00 ; 16 leaves when cutting down a tree
- db SPRITE_ANIM_FRAMESET_CUT_TREE, SPRITE_ANIM_SEQ_NULL, $00 ; 17
- db SPRITE_ANIM_FRAMESET_LEAF, SPRITE_ANIM_SEQ_FLY_LEAF, $00 ; 18 flying leaves
- db SPRITE_ANIM_FRAMESET_EGG_CRACK, SPRITE_ANIM_SEQ_NULL, $00 ; 19
- db SPRITE_ANIM_FRAMESET_24, SPRITE_ANIM_SEQ_19, $00 ; 1a
- db SPRITE_ANIM_FRAMESET_HEADBUTT, SPRITE_ANIM_SEQ_NULL, $00 ; 1b headbutt
- db SPRITE_ANIM_FRAMESET_EGG_HATCH, SPRITE_ANIM_SEQ_13, $00 ; 1c
- db SPRITE_ANIM_FRAMESET_26, SPRITE_ANIM_SEQ_1A, $00 ; 1d
- db SPRITE_ANIM_FRAMESET_BLUE_WALK, SPRITE_ANIM_SEQ_NULL, $00 ; 1e kris on map
- db SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_BLUE, SPRITE_ANIM_SEQ_NULL, $00 ; 1f kris on magnet train
- db SPRITE_ANIM_FRAMESET_2F, SPRITE_ANIM_SEQ_NULL, $00 ; 20
- db SPRITE_ANIM_FRAMESET_30, SPRITE_ANIM_SEQ_NULL, $00 ; 21
- db SPRITE_ANIM_FRAMESET_31, SPRITE_ANIM_SEQ_NULL, $00 ; 22
- db SPRITE_ANIM_FRAMESET_32, SPRITE_ANIM_SEQ_1B, $00 ; 23
- db SPRITE_ANIM_FRAMESET_33, SPRITE_ANIM_SEQ_1C, $00 ; 24
- db SPRITE_ANIM_FRAMESET_34, SPRITE_ANIM_SEQ_NULL, $00 ; 25
- db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE, SPRITE_ANIM_SEQ_1D, $00 ; 26
- db SPRITE_ANIM_FRAMESET_INTRO_PICHU, SPRITE_ANIM_SEQ_1E, $00 ; 27
- db SPRITE_ANIM_FRAMESET_INTRO_WOOPER, SPRITE_ANIM_SEQ_1E, $00 ; 28
- db SPRITE_ANIM_FRAMESET_INTRO_UNOWN_1, SPRITE_ANIM_SEQ_20, $00 ; 29 intro unown
- db SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F, SPRITE_ANIM_SEQ_21, $00 ; 2a
- db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_AWAY, SPRITE_ANIM_SEQ_22, $00 ; 2b
- db SPRITE_ANIM_FRAMESET_CELEBI_LEFT, SPRITE_ANIM_SEQ_NULL, $00 ; 2c
-; 8d24b
-
-INCLUDE "engine/sprite_anims.asm" ; DoAnimFrame
-
-INCLUDE "data/sprite_engine.asm"
-; SpriteAnimFrameData
-; SpriteAnimOAMData
+
+INCLUDE "data/sprite_anim_seqs.asm"
+
+INCLUDE "engine/sprite_anims.asm"
+
+INCLUDE "data/sprite_anim_frames.asm"
+
+INCLUDE "data/sprite_anim_oam.asm"
+
+
+BrokenStdGFXPointers: ; Broken 2bpp pointers
+ dbbw $80, $01, .deleted ; 128-tile 2bpp at 1:672a (inside Multiply)
+ dbbw $80, $01, .deleted
+ dbbw $80, $01, .deleted
+ dbbw $80, $01, .deleted
+ dbbw $10, $37, .deleted ; 16-tile 2bpp at 37:672a (within TilesetTrainStationGFX)
+ dbbw $10, $11, .deleted ; 16-tile 2bpp at 11:672a (empty data)
+ dbbw $10, $39, .deleted ; 16-tile 2bpp at 39:672a (empty data)
+ dbbw $10, $24, .deleted ; 16-tile 2bpp at 24:672a (inside Function926f7)
+ dbbw $10, $21, .deleted ; 16-tile 2bpp at 21:672a (inside Function8671c)
+
+.deleted
+; 8e72a (23:672a)
+
Sprites_Cosine: ; 8e72a
add $10
diff --git a/engine/start_battle.asm b/engine/start_battle.asm
new file mode 100644
index 000000000..d23fe1f15
--- /dev/null
+++ b/engine/start_battle.asm
@@ -0,0 +1,197 @@
+ShowLinkBattleParticipants: ; 2ee18
+; If we're not in a communications room,
+; we don't need to be here.
+ ld a, [wLinkMode]
+ and a
+ ret z
+
+ farcall _ShowLinkBattleParticipants
+ ld c, 150
+ call DelayFrames
+ call ClearTileMap
+ call ClearSprites
+ ret
+
+FindFirstAliveMonAndStartBattle: ; 2ee2f
+ xor a
+ ld [hMapAnims], a
+ call DelayFrame
+ ld b, 6
+ ld hl, PartyMon1HP
+ ld de, PARTYMON_STRUCT_LENGTH - 1
+
+.loop
+ ld a, [hli]
+ or [hl]
+ jr nz, .okay
+ add hl, de
+ dec b
+ jr nz, .loop
+
+.okay
+ ld de, MON_LEVEL - MON_HP
+ add hl, de
+ ld a, [hl]
+ ld [BattleMonLevel], a
+ predef Predef_StartBattle
+ farcall _LoadBattleFontsHPBar
+ ld a, 1
+ ld [hBGMapMode], a
+ call ClearSprites
+ call ClearTileMap
+ xor a
+ ld [hBGMapMode], a
+ ld [hWY], a
+ ld [rWY], a
+ ld [hMapAnims], a
+ ret
+
+PlayBattleMusic: ; 2ee6c
+ push hl
+ push de
+ push bc
+
+ xor a
+ ld [MusicFade], a
+ ld de, MUSIC_NONE
+ call PlayMusic
+ call DelayFrame
+ call MaxVolume
+
+ ld a, [BattleType]
+ cp BATTLETYPE_SUICUNE
+ ld de, MUSIC_SUICUNE_BATTLE
+ jp z, .done
+ cp BATTLETYPE_ROAMING
+ jp z, .done
+
+ ; Are we fighting a trainer?
+ ld a, [OtherTrainerClass]
+ and a
+ jr nz, .trainermusic
+
+ farcall RegionCheck
+ ld a, e
+ and a
+ jr nz, .kantowild
+
+ ld de, MUSIC_JOHTO_WILD_BATTLE
+ ld a, [TimeOfDay]
+ cp NITE_F
+ jr nz, .done
+ ld de, MUSIC_JOHTO_WILD_BATTLE_NIGHT
+ jr .done
+
+.kantowild
+ ld de, MUSIC_KANTO_WILD_BATTLE
+ jr .done
+
+.trainermusic
+ ld de, MUSIC_CHAMPION_BATTLE
+ cp CHAMPION
+ jr z, .done
+ cp RED
+ jr z, .done
+
+ ; really, they should have included admins and scientists here too...
+ ld de, MUSIC_ROCKET_BATTLE
+ cp GRUNTM
+ jr z, .done
+ cp GRUNTF
+ jr z, .done
+
+ ld de, MUSIC_KANTO_GYM_LEADER_BATTLE
+ farcall IsKantoGymLeader
+ jr c, .done
+
+ ld de, MUSIC_JOHTO_GYM_LEADER_BATTLE
+ farcall IsJohtoGymLeader
+ jr c, .done
+
+ ld de, MUSIC_RIVAL_BATTLE
+ ld a, [OtherTrainerClass]
+ cp RIVAL1
+ jr z, .done
+ cp RIVAL2
+ jr nz, .othertrainer
+
+ ld a, [OtherTrainerID]
+ cp RIVAL2_2_CHIKORITA ; Rival in Indigo Plateau
+ jr c, .done
+ ld de, MUSIC_CHAMPION_BATTLE
+ jr .done
+
+.othertrainer
+ ld a, [wLinkMode]
+ and a
+ jr nz, .johtotrainer
+
+ farcall RegionCheck
+ ld a, e
+ and a
+ jr nz, .kantotrainer
+
+.johtotrainer
+ ld de, MUSIC_JOHTO_TRAINER_BATTLE
+ jr .done
+
+.kantotrainer
+ ld de, MUSIC_KANTO_TRAINER_BATTLE
+
+.done
+ call PlayMusic
+
+ pop bc
+ pop de
+ pop hl
+ ret
+
+ClearBattleRAM: ; 2ef18
+ xor a
+ ld [wPlayerAction], a
+ ld [wBattleResult], a
+
+ ld hl, wPartyMenuCursor
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+
+ ld [wMenuScrollPosition], a
+ ld [CriticalHit], a
+ ld [BattleMonSpecies], a
+ ld [wBattleParticipantsNotFainted], a
+ ld [CurBattleMon], a
+ ld [wForcedSwitch], a
+ ld [TimeOfDayPal], a
+ ld [PlayerTurnsTaken], a
+ ld [EnemyTurnsTaken], a
+ ld [EvolvableFlags], a
+
+ ld hl, PlayerHPPal
+ ld [hli], a
+ ld [hl], a
+
+ ld hl, BattleMonDVs
+ ld [hli], a
+ ld [hl], a
+
+ ld hl, EnemyMonDVs
+ ld [hli], a
+ ld [hl], a
+
+; Clear the entire BattleMons area
+ ld hl, wBattle
+ ld bc, wBattleEnd - wBattle
+ xor a
+ call ByteFill
+
+ callfar ResetEnemyStatLevels
+
+ call ClearWindowData
+
+ ld hl, hBGMapAddress
+ xor a
+ ld [hli], a
+ ld [hl], VBGMap0 / $100
+ ret
diff --git a/engine/start_menu.asm b/engine/start_menu.asm
new file mode 100755
index 000000000..d8fbad82d
--- /dev/null
+++ b/engine/start_menu.asm
@@ -0,0 +1,1974 @@
+StartMenu:: ; 125cd
+
+ call ClearWindowData
+
+ ld de, SFX_MENU
+ call PlaySFX
+
+ farcall ReanchorBGMap_NoOAMUpdate
+
+ ld hl, StatusFlags2
+ bit 2, [hl] ; bug catching contest
+ ld hl, .MenuDataHeader
+ jr z, .GotMenuData
+ ld hl, .ContestMenuDataHeader
+.GotMenuData:
+
+ call LoadMenuDataHeader
+ call .SetUpMenuItems
+ ld a, [wBattleMenuCursorBuffer]
+ ld [wMenuCursorBuffer], a
+ call .DrawMenuAccount_
+ call DrawVariableLengthMenuBox
+ call .DrawBugContestStatusBox
+ call SafeUpdateSprites
+ call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ farcall LoadFonts_NoOAMUpdate
+ call .DrawBugContestStatus
+ call UpdateTimePals
+ jr .Select
+
+.Reopen:
+ call UpdateSprites
+ call UpdateTimePals
+ call .SetUpMenuItems
+ ld a, [wBattleMenuCursorBuffer]
+ ld [wMenuCursorBuffer], a
+
+.Select:
+ call .GetInput
+ jr c, .Exit
+ call .DrawMenuAccount
+ ld a, [wMenuCursorBuffer]
+ ld [wBattleMenuCursorBuffer], a
+ call PlayClickSFX
+ call PlaceHollowCursor
+ call .OpenMenu
+
+; Menu items have different return functions.
+; For example, saving exits the menu.
+ ld hl, .MenuReturns
+ ld e, a
+ ld d, 0
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+.MenuReturns:
+ dw .Reopen
+ dw .Exit
+ dw .ExitMenuCallFuncCloseText
+ dw .ExitMenuRunScriptCloseText
+ dw .ExitMenuRunScript
+ dw .ReturnEnd
+ dw .ReturnRedraw
+
+.Exit:
+ ld a, [hOAMUpdate]
+ push af
+ ld a, 1
+ ld [hOAMUpdate], a
+ call LoadFontsExtra
+ pop af
+ ld [hOAMUpdate], a
+.ReturnEnd:
+ call ExitMenu
+.ReturnEnd2:
+ call CloseText
+ call UpdateTimePals
+ ret
+
+.GetInput:
+; Return carry on exit, and no-carry on selection.
+ xor a
+ ld [hBGMapMode], a
+ call .DrawMenuAccount
+ call SetUpMenu
+ ld a, $ff
+ ld [MenuSelection], a
+.loop
+ call .PrintMenuAccount
+ call GetScrollingMenuJoypad
+ ld a, [wMenuJoypad]
+ cp B_BUTTON
+ jr z, .b
+ cp A_BUTTON
+ jr z, .a
+ jr .loop
+.a
+ call PlayClickSFX
+ and a
+ ret
+.b
+ scf
+ ret
+; 12691
+
+.ExitMenuRunScript: ; 12691
+ call ExitMenu
+ ld a, HMENURETURN_SCRIPT
+ ld [hMenuReturn], a
+ ret
+; 12699
+
+.ExitMenuRunScriptCloseText: ; 12699
+ call ExitMenu
+ ld a, HMENURETURN_SCRIPT
+ ld [hMenuReturn], a
+ jr .ReturnEnd2
+; 126a2
+
+.ExitMenuCallFuncCloseText: ; 126a2
+ call ExitMenu
+ ld hl, wQueuedScriptAddr
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [wQueuedScriptBank]
+ rst FarCall
+ jr .ReturnEnd2
+; 126b1
+
+.ReturnRedraw: ; 126b1
+ call .Clear
+ jp .Reopen
+; 126b7
+
+.Clear: ; 126b7
+ call ClearBGPalettes
+ call Call_ExitMenu
+ call ReloadTilesetAndPalettes
+ call .DrawMenuAccount_
+ call DrawVariableLengthMenuBox
+ call .DrawBugContestStatus
+ call UpdateSprites
+ call ret_d90
+ call FinishExitMenu
+ ret
+; 126d3
+
+
+.MenuDataHeader:
+ db $40 ; tile backup
+ db 0, 10 ; start coords
+ db 17, 19 ; end coords
+ dw .MenuData
+ db 1 ; default selection
+
+.ContestMenuDataHeader:
+ db $40 ; tile backup
+ db 2, 10 ; start coords
+ db 17, 19 ; end coords
+ dw .MenuData
+ db 1 ; default selection
+
+.MenuData:
+ db %10101000 ; x padding, wrap around, start can close
+ dn 0, 0 ; rows, columns
+ dw MenuItemsList
+ dw .MenuString
+ dw .Items
+
+.Items:
+ dw StartMenu_Pokedex, .PokedexString, .PokedexDesc
+ dw StartMenu_Pokemon, .PartyString, .PartyDesc
+ dw StartMenu_Pack, .PackString, .PackDesc
+ dw StartMenu_Status, .StatusString, .StatusDesc
+ dw StartMenu_Save, .SaveString, .SaveDesc
+ dw StartMenu_Option, .OptionString, .OptionDesc
+ dw StartMenu_Exit, .ExitString, .ExitDesc
+ dw StartMenu_Pokegear, .PokegearString, .PokegearDesc
+ dw StartMenu_Quit, .QuitString, .QuitDesc
+
+.PokedexString: db "#DEX@"
+.PartyString: db "#MON@"
+.PackString: db "PACK@"
+.StatusString: db "<PLAYER>@"
+.SaveString: db "SAVE@"
+.OptionString: db "OPTION@"
+.ExitString: db "EXIT@"
+.PokegearString: db $24, "GEAR@"
+.QuitString: db "QUIT@"
+
+.PokedexDesc: db "#MON"
+ next "database@"
+
+.PartyDesc: db "Party ", $4a
+ next "status@"
+
+.PackDesc: db "Contains"
+ next "items@"
+
+.PokegearDesc: db "Trainer's"
+ next "key device@"
+
+.StatusDesc: db "Your own"
+ next "status@"
+
+.SaveDesc: db "Save your"
+ next "progress@"
+
+.OptionDesc: db "Change"
+ next "settings@"
+
+.ExitDesc: db "Close this"
+ next "menu@"
+
+.QuitDesc: db "Quit and"
+ next "be judged.@"
+
+
+.OpenMenu: ; 127e5
+ ld a, [MenuSelection]
+ call .GetMenuAccountTextPointer
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+; 127ef
+
+.MenuString: ; 127ef
+ push de
+ ld a, [MenuSelection]
+ call .GetMenuAccountTextPointer
+ inc hl
+ inc hl
+ ld a, [hli]
+ ld d, [hl]
+ ld e, a
+ pop hl
+ call PlaceString
+ ret
+; 12800
+
+.MenuDesc: ; 12800
+ push de
+ ld a, [MenuSelection]
+ cp $ff
+ jr z, .none
+ call .GetMenuAccountTextPointer
+rept 4
+ inc hl
+endr
+ ld a, [hli]
+ ld d, [hl]
+ ld e, a
+ pop hl
+ call PlaceString
+ ret
+.none
+ pop de
+ ret
+; 12819
+
+
+.GetMenuAccountTextPointer: ; 12819
+ ld e, a
+ ld d, 0
+ ld hl, wMenuData2PointerTableAddr
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+rept 6
+ add hl, de
+endr
+ ret
+; 12829
+
+
+.SetUpMenuItems: ; 12829
+ xor a
+ ld [wWhichIndexSet], a
+ call .FillMenuList
+
+ ld hl, StatusFlags
+ bit 0, [hl]
+ jr z, .no_pokedex
+ ld a, 0 ; pokedex
+ call .AppendMenuList
+.no_pokedex
+
+ ld a, [PartyCount]
+ and a
+ jr z, .no_pokemon
+ ld a, 1 ; pokemon
+ call .AppendMenuList
+.no_pokemon
+
+ ld a, [wLinkMode]
+ and a
+ jr nz, .no_pack
+ ld hl, StatusFlags2
+ bit 2, [hl] ; bug catching contest
+ jr nz, .no_pack
+ ld a, 2 ; pack
+ call .AppendMenuList
+.no_pack
+
+ ld hl, wPokegearFlags
+ bit 7, [hl]
+ jr z, .no_pokegear
+ ld a, 7 ; pokegear
+ call .AppendMenuList
+.no_pokegear
+
+ ld a, 3 ; status
+ call .AppendMenuList
+
+ ld a, [wLinkMode]
+ and a
+ jr nz, .no_save
+ ld hl, StatusFlags2
+ bit 2, [hl] ; bug catching contest
+ ld a, 8 ; quit
+ jr nz, .write
+ ld a, 4 ; save
+.write
+ call .AppendMenuList
+.no_save
+
+ ld a, 5 ; option
+ call .AppendMenuList
+ ld a, 6 ; exit
+ call .AppendMenuList
+ ld a, c
+ ld [MenuItemsList], a
+ ret
+; 1288d
+
+
+.FillMenuList: ; 1288d
+ xor a
+ ld hl, MenuItemsList
+ ld [hli], a
+ ld a, -1
+ ld bc, MenuItemsListEnd - (MenuItemsList + 1)
+ call ByteFill
+ ld de, MenuItemsList + 1
+ ld c, 0
+ ret
+; 128a0
+
+.AppendMenuList: ; 128a0
+ ld [de], a
+ inc de
+ inc c
+ ret
+; 128a4
+
+.DrawMenuAccount_: ; 128a4
+ jp .DrawMenuAccount
+; 128a7
+
+.PrintMenuAccount: ; 128a7
+ call .IsMenuAccountOn
+ ret z
+ call .DrawMenuAccount
+ decoord 0, 14
+ jp .MenuDesc
+; 128b4
+
+.DrawMenuAccount: ; 128b4
+ call .IsMenuAccountOn
+ ret z
+ hlcoord 0, 13
+ lb bc, 5, 10
+ call ClearBox
+ hlcoord 0, 13
+ ld b, 3
+ ld c, 8
+ jp TextBoxPalette
+; 128cb
+
+.IsMenuAccountOn: ; 128cb
+ ld a, [Options2]
+ and 1
+ ret
+; 128d1
+
+.DrawBugContestStatusBox: ; 128d1
+ ld hl, StatusFlags2
+ bit 2, [hl] ; bug catching contest
+ ret z
+ farcall StartMenu_DrawBugContestStatusBox
+ ret
+; 128de
+
+.DrawBugContestStatus: ; 128de
+ ld hl, StatusFlags2
+ bit 2, [hl] ; bug catching contest
+ jr nz, .contest
+ ret
+.contest
+ farcall StartMenu_PrintBugContestStatus
+ ret
+; 128ed
+
+
+StartMenu_Exit: ; 128ed
+; Exit the menu.
+
+ ld a, 1
+ ret
+; 128f0
+
+
+StartMenu_Quit: ; 128f0
+; Retire from the bug catching contest.
+
+ ld hl, .EndTheContestText
+ call StartMenuYesNo
+ jr c, .DontEndContest
+ ld a, BANK(BugCatchingContestReturnToGateScript)
+ ld hl, BugCatchingContestReturnToGateScript
+ call FarQueueScript
+ ld a, 4
+ ret
+
+.DontEndContest:
+ ld a, 0
+ ret
+
+.EndTheContestText:
+ text_jump UnknownText_0x1c1a6c
+ db "@"
+; 1290b
+
+
+StartMenu_Save: ; 1290b
+; Save the game.
+
+ call BufferScreen
+ farcall SaveMenu
+ jr nc, .asm_12919
+ ld a, 0
+ ret
+.asm_12919
+ ld a, 1
+ ret
+; 1291c
+
+
+StartMenu_Option: ; 1291c
+; Game options.
+
+ call FadeToMenu
+ farcall OptionsMenu
+ ld a, 6
+ ret
+; 12928
+
+
+StartMenu_Status: ; 12928
+; Player status.
+
+ call FadeToMenu
+ farcall TrainerCard
+ call CloseSubmenu
+ ld a, 0
+ ret
+; 12937
+
+
+StartMenu_Pokedex: ; 12937
+
+ ld a, [PartyCount]
+ and a
+ jr z, .asm_12949
+
+ call FadeToMenu
+ farcall Pokedex
+ call CloseSubmenu
+
+.asm_12949
+ ld a, 0
+ ret
+; 1294c
+
+
+StartMenu_Pokegear: ; 1294c
+
+ call FadeToMenu
+ farcall PokeGear
+ call CloseSubmenu
+ ld a, 0
+ ret
+; 1295b
+
+
+StartMenu_Pack: ; 1295b
+
+ call FadeToMenu
+ farcall Pack
+ ld a, [wcf66]
+ and a
+ jr nz, .used_item
+ call CloseSubmenu
+ ld a, 0
+ ret
+
+.used_item
+ call ExitAllMenus
+ ld a, 4
+ ret
+; 12976
+
+
+StartMenu_Pokemon: ; 12976
+
+ ld a, [PartyCount]
+ and a
+ jr z, .return
+
+ call FadeToMenu
+
+.choosemenu
+ xor a
+ ld [PartyMenuActionText], a ; Choose a POKéMON.
+ call ClearBGPalettes
+
+.menu
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuGFX
+
+.menunoreload
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
+ call WaitBGMap
+ call SetPalettes ; load regular palettes?
+ call DelayFrame
+ farcall PartyMenuSelect
+ jr c, .return ; if cancelled or pressed B
+
+ call PokemonActionSubmenu
+ cp 3
+ jr z, .menu
+ cp 0
+ jr z, .choosemenu
+ cp 1
+ jr z, .menunoreload
+ cp 2
+ jr z, .quit
+
+.return
+ call CloseSubmenu
+ ld a, 0
+ ret
+
+.quit
+ ld a, b
+ push af
+ call ExitAllMenus
+ pop af
+ ret
+; 129d5
+
+HasNoItems: ; 129d5
+ ld a, [NumItems]
+ and a
+ ret nz
+ ld a, [NumKeyItems]
+ and a
+ ret nz
+ ld a, [NumBalls]
+ and a
+ ret nz
+ ld hl, TMsHMs
+ ld b, NUM_TMS + NUM_HMS
+.loop
+ ld a, [hli]
+ and a
+ jr nz, .done
+ dec b
+ jr nz, .loop
+ scf
+ ret
+.done
+ and a
+ ret
+
+TossItemFromPC: ; 129f4
+ push de
+ call PartyMonItemName
+ farcall _CheckTossableItem
+ ld a, [wItemAttributeParamBuffer]
+ and a
+ jr nz, .key_item
+ ld hl, .TossHowMany
+ call MenuTextBox
+ farcall SelectQuantityToToss
+ push af
+ call CloseWindow
+ call ExitMenu
+ pop af
+ jr c, .quit
+ ld hl, .ConfirmToss
+ call MenuTextBox
+ call YesNoBox
+ push af
+ call ExitMenu
+ pop af
+ jr c, .quit
+ pop hl
+ ld a, [CurItemQuantity]
+ call TossItem
+ call PartyMonItemName
+ ld hl, .TossedThisMany
+ call MenuTextBox
+ call ExitMenu
+ and a
+ ret
+
+.key_item
+ call .CantToss
+.quit
+ pop hl
+ scf
+ ret
+
+.TossHowMany:
+ ; Toss out how many @ (S)?
+ text_jump UnknownText_0x1c1a90
+ db "@"
+
+.ConfirmToss:
+ ; Throw away @ @ (S)?
+ text_jump UnknownText_0x1c1aad
+ db "@"
+
+.TossedThisMany:
+ ; Discarded @ (S).
+ text_jump UnknownText_0x1c1aca
+ db "@"
+
+.CantToss:
+ ld hl, .TooImportantToToss
+ call MenuTextBoxBackup
+ ret
+
+.TooImportantToToss:
+ ; That's too impor- tant to toss out!
+ text_jump UnknownText_0x1c1adf
+ db "@"
+; 0x12a60
+
+CantUseItem: ; 12a60
+ ld hl, CantUseItemText
+ call MenuTextBoxWaitButton
+ ret
+; 12a67
+
+CantUseItemText: ; 12a67
+ text_jump UnknownText_0x1c1b03
+ db "@"
+; 12a6c
+
+
+PartyMonItemName: ; 12a6c
+ ld a, [CurItem]
+ ld [wd265], a
+ call GetItemName
+ call CopyName1
+ ret
+; 12a79
+
+
+CancelPokemonAction: ; 12a79
+ farcall InitPartyMenuWithCancel
+ farcall UnfreezeMonIcons
+ ld a, 1
+ ret
+; 12a88
+
+
+PokemonActionSubmenu: ; 12a88
+ hlcoord 1, 15
+ lb bc, 2, 18
+ call ClearBox
+ farcall MonSubmenu
+ call GetCurNick
+ ld a, [MenuSelection]
+ ld hl, .Actions
+ ld de, 3
+ call IsInArray
+ jr nc, .nothing
+
+ inc hl
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+.nothing
+ ld a, 0
+ ret
+
+.Actions:
+ dbw MONMENU_CUT, MonMenu_Cut ; Cut
+ dbw MONMENU_FLY, MonMenu_Fly ; Fly
+ dbw MONMENU_SURF, MonMenu_Surf ; Surf
+ dbw MONMENU_STRENGTH, MonMenu_Strength ; Strength
+ dbw MONMENU_FLASH, MonMenu_Flash ; Flash
+ dbw MONMENU_WHIRLPOOL, MonMenu_Whirlpool ; Whirlpool
+ dbw MONMENU_DIG, MonMenu_Dig ; Dig
+ dbw MONMENU_TELEPORT, MonMenu_Teleport ; Teleport
+ dbw MONMENU_SOFTBOILED, MonMenu_Softboiled_MilkDrink ; Softboiled
+ dbw MONMENU_MILKDRINK, MonMenu_Softboiled_MilkDrink ; MilkDrink
+ dbw MONMENU_HEADBUTT, MonMenu_Headbutt ; Headbutt
+ dbw MONMENU_WATERFALL, MonMenu_Waterfall ; Waterfall
+ dbw MONMENU_ROCKSMASH, MonMenu_RockSmash ; RockSmash
+ dbw MONMENU_SWEETSCENT, MonMenu_SweetScent ; SweetScent
+ dbw MONMENU_STATS, OpenPartyStats
+ dbw MONMENU_SWITCH, SwitchPartyMons
+ dbw MONMENU_ITEM, GiveTakePartyMonItem
+ dbw MONMENU_CANCEL, CancelPokemonAction
+ dbw MONMENU_MOVE, ManagePokemonMoves ; move
+ dbw MONMENU_MAIL, MonMailAction ; mail
+; 12aec
+
+
+SwitchPartyMons: ; 12aec
+
+; Don't try if there's nothing to switch!
+ ld a, [PartyCount]
+ cp 2
+ jr c, .DontSwitch
+
+ ld a, [CurPartyMon]
+ inc a
+ ld [wSwitchMon], a
+
+ farcall HoldSwitchmonIcon
+ farcall InitPartyMenuNoCancel
+
+ ld a, PARTYMENUACTION_MOVE
+ ld [PartyMenuActionText], a
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
+
+ hlcoord 0, 1
+ ld bc, 20 * 2
+ ld a, [wSwitchMon]
+ dec a
+ call AddNTimes
+ ld [hl], "▷"
+ call WaitBGMap
+ call SetPalettes
+ call DelayFrame
+
+ farcall PartyMenuSelect
+ bit 1, b
+ jr c, .DontSwitch
+
+ farcall _SwitchPartyMons
+
+ xor a
+ ld [PartyMenuActionText], a
+
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuGFX
+
+ ld a, 1
+ ret
+
+.DontSwitch:
+ xor a
+ ld [PartyMenuActionText], a
+ call CancelPokemonAction
+ ret
+; 12b60
+
+
+GiveTakePartyMonItem: ; 12b60
+
+; Eggs can't hold items!
+ ld a, [CurPartySpecies]
+ cp EGG
+ jr z, .cancel
+
+ ld hl, GiveTakeItemMenuData
+ call LoadMenuDataHeader
+ call VerticalMenu
+ call ExitMenu
+ jr c, .cancel
+
+ call GetCurNick
+ ld hl, StringBuffer1
+ ld de, wMonOrItemNameBuffer
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+ ld a, [wMenuCursorY]
+ cp 1
+ jr nz, .take
+
+ call LoadStandardMenuDataHeader
+ call ClearPalettes
+ call .GiveItem
+ call ClearPalettes
+ call LoadFontsBattleExtra
+ call ExitMenu
+ ld a, 0
+ ret
+
+.take
+ call TakePartyItem
+ ld a, 3
+ ret
+
+.cancel
+ ld a, 3
+ ret
+; 12ba9
+
+
+.GiveItem:
+
+ farcall DepositSellInitPackBuffers
+
+.loop
+ farcall DepositSellPack
+
+ ld a, [wcf66]
+ and a
+ jr z, .quit
+
+ ld a, [wcf65]
+ cp 2
+ jr z, .next
+
+ call CheckTossableItem
+ ld a, [wItemAttributeParamBuffer]
+ and a
+ jr nz, .next
+
+ call TryGiveItemToPartymon
+ jr .quit
+
+.next
+ ld hl, CantBeHeldText
+ call MenuTextBoxBackup
+ jr .loop
+
+.quit
+ ret
+; 12bd9
+
+
+TryGiveItemToPartymon: ; 12bd9
+
+ call SpeechTextBox
+ call PartyMonItemName
+ call GetPartyItemLocation
+ ld a, [hl]
+ and a
+ jr z, .give_item_to_mon
+
+ push hl
+ ld d, a
+ farcall ItemIsMail
+ pop hl
+ jr c, .please_remove_mail
+ ld a, [hl]
+ jr .already_holding_item
+
+.give_item_to_mon
+ call GiveItemToPokemon
+ ld hl, MadeHoldText
+ call MenuTextBoxBackup
+ call GivePartyItem
+ ret
+
+.please_remove_mail
+ ld hl, PleaseRemoveMailText
+ call MenuTextBoxBackup
+ ret
+
+.already_holding_item
+ ld [wd265], a
+ call GetItemName
+ ld hl, SwitchAlreadyHoldingText
+ call StartMenuYesNo
+ jr c, .abort
+
+ call GiveItemToPokemon
+ ld a, [wd265]
+ push af
+ ld a, [CurItem]
+ ld [wd265], a
+ pop af
+ ld [CurItem], a
+ call ReceiveItemFromPokemon
+ jr nc, .bag_full
+
+ ld hl, TookAndMadeHoldText
+ call MenuTextBoxBackup
+ ld a, [wd265]
+ ld [CurItem], a
+ call GivePartyItem
+ ret
+
+.bag_full
+ ld a, [wd265]
+ ld [CurItem], a
+ call ReceiveItemFromPokemon
+ ld hl, ItemStorageIsFullText
+ call MenuTextBoxBackup
+
+.abort
+ ret
+; 12c4c
+
+
+GivePartyItem: ; 12c4c
+
+ call GetPartyItemLocation
+ ld a, [CurItem]
+ ld [hl], a
+ ld d, a
+ farcall ItemIsMail
+ jr nc, .done
+ call ComposeMailMessage
+
+.done
+ ret
+; 12c60
+
+
+TakePartyItem: ; 12c60
+
+ call SpeechTextBox
+ call GetPartyItemLocation
+ ld a, [hl]
+ and a
+ jr z, .asm_12c8c
+
+ ld [CurItem], a
+ call ReceiveItemFromPokemon
+ jr nc, .asm_12c94
+
+ farcall ItemIsMail
+ call GetPartyItemLocation
+ ld a, [hl]
+ ld [wd265], a
+ ld [hl], NO_ITEM
+ call GetItemName
+ ld hl, TookFromText
+ call MenuTextBoxBackup
+ jr .asm_12c9a
+
+.asm_12c8c
+ ld hl, IsntHoldingAnythingText
+ call MenuTextBoxBackup
+ jr .asm_12c9a
+
+.asm_12c94
+ ld hl, ItemStorageIsFullText
+ call MenuTextBoxBackup
+
+.asm_12c9a
+ ret
+; 12c9b
+
+
+GiveTakeItemMenuData: ; 12c9b
+ db %01010000
+ db 12, 12 ; start coords
+ db 17, 19 ; end coords
+ dw .Items
+ db 1 ; default option
+
+.Items:
+ db %10000000 ; x padding
+ db 2 ; # items
+ db "GIVE@"
+ db "TAKE@"
+; 12caf
+
+
+TookAndMadeHoldText: ; 12caf
+ text_jump UnknownText_0x1c1b2c
+ db "@"
+; 12cb4
+
+MadeHoldText: ; 12cb4
+ text_jump UnknownText_0x1c1b57
+ db "@"
+; 12cb9
+
+PleaseRemoveMailText: ; 12cb9
+ text_jump UnknownText_0x1c1b6f
+ db "@"
+; 12cbe
+
+IsntHoldingAnythingText: ; 12cbe
+ text_jump UnknownText_0x1c1b8e
+ db "@"
+; 12cc3
+
+ItemStorageIsFullText: ; 12cc3
+ text_jump UnknownText_0x1c1baa
+ db "@"
+; 12cc8
+
+TookFromText: ; 12cc8
+ text_jump UnknownText_0x1c1bc4
+ db "@"
+; 12ccd
+
+SwitchAlreadyHoldingText: ; 12ccd
+ text_jump UnknownText_0x1c1bdc
+ db "@"
+; 12cd2
+
+CantBeHeldText: ; 12cd2
+ text_jump UnknownText_0x1c1c09
+ db "@"
+; 12cd7
+
+
+GetPartyItemLocation: ; 12cd7
+ push af
+ ld a, MON_ITEM
+ call GetPartyParamLocation
+ pop af
+ ret
+; 12cdf
+
+
+ReceiveItemFromPokemon: ; 12cdf
+ ld a, $1
+ ld [wItemQuantityChangeBuffer], a
+ ld hl, NumItems
+ jp ReceiveItem
+; 12cea
+
+
+GiveItemToPokemon: ; 12cea (4:6cea)
+ ld a, $1
+ ld [wItemQuantityChangeBuffer], a
+ ld hl, NumItems
+ jp TossItem
+
+StartMenuYesNo: ; 12cf5
+ call MenuTextBox
+ call YesNoBox
+ jp ExitMenu
+; 12cfe
+
+
+ComposeMailMessage: ; 12cfe (4:6cfe)
+ ld de, wTempMailMessage
+ farcall _ComposeMailMessage
+ ld hl, PlayerName
+ ld de, wTempMailAuthor
+ ld bc, NAME_LENGTH - 1
+ call CopyBytes
+ ld hl, PlayerID
+ ld bc, 2
+ call CopyBytes
+ ld a, [CurPartySpecies]
+ ld [de], a
+ inc de
+ ld a, [CurItem]
+ ld [de], a
+ ld a, [CurPartyMon]
+ ld hl, sPartyMail
+ ld bc, MAIL_STRUCT_LENGTH
+ call AddNTimes
+ ld d, h
+ ld e, l
+ ld hl, wTempMail
+ ld bc, MAIL_STRUCT_LENGTH
+ ld a, BANK(sPartyMail)
+ call GetSRAMBank
+ call CopyBytes
+ call CloseSRAM
+ ret
+
+MonMailAction: ; 12d45
+; If in the time capsule or trade center,
+; selecting the mail only allows you to
+; read the mail.
+ ld a, [wLinkMode]
+ cp LINK_TIMECAPSULE
+ jr z, .read
+ cp LINK_TRADECENTER
+ jr z, .read
+
+; Show the READ/TAKE/QUIT menu.
+ ld hl, .MenuDataHeader
+ call LoadMenuDataHeader
+ call VerticalMenu
+ call ExitMenu
+
+; Interpret the menu.
+ jp c, .done
+ ld a, [wMenuCursorY]
+ cp $1
+ jr z, .read
+ cp $2
+ jr z, .take
+ jp .done
+
+.read
+ farcall ReadPartyMonMail
+ ld a, $0
+ ret
+
+.take
+ ld hl, .sendmailtopctext
+ call StartMenuYesNo
+ jr c, .RemoveMailToBag
+ ld a, [CurPartyMon]
+ ld b, a
+ farcall SendMailToPC
+ jr c, .MailboxFull
+ ld hl, .sentmailtopctext
+ call MenuTextBoxBackup
+ jr .done
+
+.MailboxFull:
+ ld hl, .mailboxfulltext
+ call MenuTextBoxBackup
+ jr .done
+
+.RemoveMailToBag:
+ ld hl, .mailwilllosemessagetext
+ call StartMenuYesNo
+ jr c, .done
+ call GetPartyItemLocation
+ ld a, [hl]
+ ld [CurItem], a
+ call ReceiveItemFromPokemon
+ jr nc, .BagIsFull
+ call GetPartyItemLocation
+ ld [hl], $0
+ call GetCurNick
+ ld hl, .tookmailfrommontext
+ call MenuTextBoxBackup
+ jr .done
+
+.BagIsFull:
+ ld hl, .bagfulltext
+ call MenuTextBoxBackup
+ jr .done
+
+.done
+ ld a, $3
+ ret
+; 12dc9
+
+
+.MenuDataHeader:
+ db $40 ; flags
+ db 10, 12 ; start coords
+ db 17, 19 ; end coords
+ dw .MenuData2
+ db 1 ; default option
+; 0x12dd1
+
+.MenuData2:
+ db $80 ; flags
+ db 3 ; items
+ db "READ@"
+ db "TAKE@"
+ db "QUIT@"
+; 0x12de2
+
+
+.mailwilllosemessagetext
+; The MAIL will lose its message. OK?
+ text_jump UnknownText_0x1c1c22
+ db "@"
+; 0x12de7
+
+.tookmailfrommontext
+; MAIL detached from <POKEMON>.
+ text_jump UnknownText_0x1c1c47
+ db "@"
+; 0x12dec
+
+.bagfulltext
+; There's no space for removing MAIL.
+ text_jump UnknownText_0x1c1c62
+ db "@"
+; 0x12df1
+
+.sendmailtopctext
+; Send the removed MAIL to your PC?
+ text_jump UnknownText_0x1c1c86
+ db "@"
+; 0x12df6
+
+.mailboxfulltext
+; Your PC's MAILBOX is full.
+ text_jump UnknownText_0x1c1ca9
+ db "@"
+; 0x12dfb
+
+.sentmailtopctext
+; The MAIL was sent to your PC.
+ text_jump UnknownText_0x1c1cc4
+ db "@"
+; 0x12e00
+
+
+OpenPartyStats: ; 12e00
+ call LoadStandardMenuDataHeader
+ call ClearSprites
+; PartyMon
+ xor a
+ ld [MonType], a
+ call LowVolume
+ predef StatsScreenInit
+ call MaxVolume
+ call Call_ExitMenu
+ ld a, 0
+ ret
+; 12e1b
+
+
+MonMenu_Cut: ; 12e1b
+ farcall CutFunction
+ ld a, [wFieldMoveSucceeded]
+ cp $1
+ jr nz, .Fail
+ ld b, $4
+ ld a, $2
+ ret
+
+.Fail:
+ ld a, $3
+ ret
+; 12e30
+
+
+MonMenu_Fly: ; 12e30
+ farcall FlyFunction
+ ld a, [wFieldMoveSucceeded]
+ cp $2
+ jr z, .Fail
+ cp $0
+ jr z, .Error
+ farcall TrainerRankings_Fly
+ ld b, $4
+ ld a, $2
+ ret
+
+.Fail:
+ ld a, $3
+ ret
+
+.Error:
+ ld a, $0
+ ret
+
+.Unused:
+ ld a, $1
+ ret
+; 12e55
+
+MonMenu_Flash: ; 12e55
+ farcall OWFlash
+ ld a, [wFieldMoveSucceeded]
+ cp $1
+ jr nz, .Fail
+ ld b, $4
+ ld a, $2
+ ret
+
+.Fail:
+ ld a, $3
+ ret
+; 12e6a
+
+MonMenu_Strength: ; 12e6a
+ farcall StrengthFunction
+ ld a, [wFieldMoveSucceeded]
+ cp $1
+ jr nz, .Fail
+ ld b, $4
+ ld a, $2
+ ret
+
+.Fail:
+ ld a, $3
+ ret
+; 12e7f
+
+MonMenu_Whirlpool: ; 12e7f
+ farcall WhirlpoolFunction
+ ld a, [wFieldMoveSucceeded]
+ cp $1
+ jr nz, .Fail
+ ld b, $4
+ ld a, $2
+ ret
+
+.Fail:
+ ld a, $3
+ ret
+; 12e94
+
+MonMenu_Waterfall: ; 12e94
+ farcall WaterfallFunction
+ ld a, [wFieldMoveSucceeded]
+ cp $1
+ jr nz, .Fail
+ ld b, $4
+ ld a, $2
+ ret
+
+.Fail:
+ ld a, $3
+ ret
+; 12ea9
+
+MonMenu_Teleport: ; 12ea9
+ farcall TeleportFunction
+ ld a, [wFieldMoveSucceeded]
+ and a
+ jr z, .Fail
+ ld b, $4
+ ld a, $2
+ ret
+
+.Fail:
+ ld a, $3
+ ret
+; 12ebd
+
+MonMenu_Surf: ; 12ebd
+ farcall SurfFunction
+ ld a, [wFieldMoveSucceeded]
+ and a
+ jr z, .Fail
+ ld b, $4
+ ld a, $2
+ ret
+
+.Fail:
+ ld a, $3
+ ret
+; 12ed1
+
+MonMenu_Dig: ; 12ed1
+ farcall DigFunction
+ ld a, [wFieldMoveSucceeded]
+ cp $1
+ jr nz, .Fail
+ ld b, $4
+ ld a, $2
+ ret
+
+.Fail:
+ ld a, $3
+ ret
+; 12ee6
+
+MonMenu_Softboiled_MilkDrink: ; 12ee6
+ call .CheckMonHasEnoughHP
+ jr nc, .NotEnoughHP
+ farcall Softboiled_MilkDrinkFunction
+ jr .finish
+
+.NotEnoughHP:
+ ld hl, .Text_NotEnoughHP
+ call PrintText
+
+.finish
+ xor a
+ ld [PartyMenuActionText], a
+ ld a, $3
+ ret
+; 12f00
+
+.Text_NotEnoughHP:
+ ; Not enough HP!
+ text_jump UnknownText_0x1c1ce3
+ db "@"
+; 0x12f05
+
+.CheckMonHasEnoughHP:
+; Need to have at least (MaxHP / 5) HP left.
+ ld a, MON_MAXHP
+ call GetPartyParamLocation
+ ld a, [hli]
+ ld [hDividend + 0], a
+ ld a, [hl]
+ ld [hDividend + 1], a
+ ld a, 5
+ ld [hDivisor], a
+ ld b, 2
+ call Divide
+ ld a, MON_HP + 1
+ call GetPartyParamLocation
+ ld a, [hQuotient + 2]
+ sub [hl]
+ dec hl
+ ld a, [hQuotient + 1]
+ sbc [hl]
+ ret
+; 12f26
+
+MonMenu_Headbutt: ; 12f26
+ farcall HeadbuttFunction
+ ld a, [wFieldMoveSucceeded]
+ cp $1
+ jr nz, .Fail
+ ld b, $4
+ ld a, $2
+ ret
+
+.Fail:
+ ld a, $3
+ ret
+; 12f3b
+
+MonMenu_RockSmash: ; 12f3b
+ farcall RockSmashFunction
+ ld a, [wFieldMoveSucceeded]
+ cp $1
+ jr nz, .Fail
+ ld b, $4
+ ld a, $2
+ ret
+
+.Fail:
+ ld a, $3
+ ret
+; 12f50
+
+MonMenu_SweetScent: ; 12f50
+ farcall SweetScentFromMenu
+ ld b, $4
+ ld a, $2
+ ret
+; 12f5b
+
+ChooseMoveToDelete: ; 12f5b
+ ld hl, Options
+ ld a, [hl]
+ push af
+ set NO_TEXT_SCROLL, [hl]
+ call LoadFontsBattleExtra
+ call .ChooseMoveToDelete
+ pop bc
+ ld a, b
+ ld [Options], a
+ push af
+ call ClearBGPalettes
+ pop af
+ ret
+; 12f73
+
+.ChooseMoveToDelete
+ call SetUpMoveScreenBG
+ ld de, DeleteMoveScreenAttrs
+ call SetMenuAttributes
+ call SetUpMoveList
+ ld hl, w2DMenuFlags1
+ set 6, [hl]
+ jr .enter_loop
+
+.loop
+ call ScrollingMenuJoypad
+ bit B_BUTTON_F, a
+ jp nz, .b_button
+ bit A_BUTTON_F, a
+ jp nz, .a_button
+
+.enter_loop
+ call PrepareToPlaceMoveData
+ call PlaceMoveData
+ jp .loop
+; 12f9c
+
+.a_button
+ and a
+ jr .finish
+
+.b_button
+ scf
+
+.finish
+ push af
+ xor a
+ ld [wSwitchMon], a
+ ld hl, w2DMenuFlags1
+ res 6, [hl]
+ call ClearSprites
+ call ClearTileMap
+ pop af
+ ret
+; 12fb2
+
+DeleteMoveScreenAttrs: ; 12fb2
+ db 3, 1
+ db 3, 1
+ db $40, $00
+ dn 2, 0
+ db D_UP | D_DOWN | A_BUTTON | B_BUTTON
+; 12fba
+
+ManagePokemonMoves: ; 12fba
+ ld a, [CurPartySpecies]
+ cp EGG
+ jr z, .egg
+ ld hl, Options
+ ld a, [hl]
+ push af
+ set NO_TEXT_SCROLL, [hl]
+ call MoveScreenLoop
+ pop af
+ ld [Options], a
+ call ClearBGPalettes
+
+.egg
+ ld a, $0
+ ret
+; 12fd5
+
+MoveScreenLoop: ; 12fd5
+ ld a, [CurPartyMon]
+ inc a
+ ld [wPartyMenuCursor], a
+ call SetUpMoveScreenBG
+ call Function132d3
+ ld de, MoveScreenAttributes
+ call SetMenuAttributes
+.loop
+ call SetUpMoveList
+ ld hl, w2DMenuFlags1
+ set 6, [hl]
+ jr .skip_joy
+
+.joy_loop
+ call ScrollingMenuJoypad
+ bit 1, a
+ jp nz, .b_button
+ bit 0, a
+ jp nz, .a_button
+ bit 4, a
+ jp nz, .d_right
+ bit 5, a
+ jp nz, .d_left
+
+.skip_joy
+ call PrepareToPlaceMoveData
+ ld a, [wMoveSwapBuffer]
+ and a
+ jr nz, .moving_move
+ call PlaceMoveData
+ jp .joy_loop
+
+.moving_move
+ ld a, " "
+ hlcoord 1, 11
+ ld bc, 5
+ call ByteFill
+ hlcoord 1, 12
+ lb bc, 5, SCREEN_WIDTH - 2
+ call ClearBox
+ hlcoord 1, 12
+ ld de, String_1316b
+ call PlaceString
+ jp .joy_loop
+.b_button
+ call PlayClickSFX
+ call WaitSFX
+ ld a, [wMoveSwapBuffer]
+ and a
+ jp z, .exit
+
+ ld a, [wMoveSwapBuffer]
+ ld [wMenuCursorY], a
+ xor a
+ ld [wMoveSwapBuffer], a
+ hlcoord 1, 2
+ lb bc, 8, SCREEN_WIDTH - 2
+ call ClearBox
+ jp .loop
+; 1305b
+
+.d_right
+ ld a, [wMoveSwapBuffer]
+ and a
+ jp nz, .joy_loop
+
+ ld a, [CurPartyMon]
+ ld b, a
+ push bc
+ call .cycle_right
+ pop bc
+ ld a, [CurPartyMon]
+ cp b
+ jp z, .joy_loop
+ jp MoveScreenLoop
+
+.d_left
+ ld a, [wMoveSwapBuffer]
+ and a
+ jp nz, .joy_loop
+ ld a, [CurPartyMon]
+ ld b, a
+ push bc
+ call .cycle_left
+ pop bc
+ ld a, [CurPartyMon]
+ cp b
+ jp z, .joy_loop
+ jp MoveScreenLoop
+
+.cycle_right
+ ld a, [CurPartyMon]
+ inc a
+ ld [CurPartyMon], a
+ ld c, a
+ ld b, 0
+ ld hl, PartySpecies
+ add hl, bc
+ ld a, [hl]
+ cp -1
+ jr z, .cycle_left
+ cp EGG
+ ret nz
+ jr .cycle_right
+
+.cycle_left
+ ld a, [CurPartyMon]
+ and a
+ ret z
+.cycle_left_loop
+ ld a, [CurPartyMon]
+ dec a
+ ld [CurPartyMon], a
+ ld c, a
+ ld b, 0
+ ld hl, PartySpecies
+ add hl, bc
+ ld a, [hl]
+ cp EGG
+ ret nz
+ ld a, [CurPartyMon]
+ and a
+ jr z, .cycle_right
+ jr .cycle_left_loop
+; 130c6
+
+.a_button
+ call PlayClickSFX
+ call WaitSFX
+ ld a, [wMoveSwapBuffer]
+ and a
+ jr nz, .place_move
+ ld a, [wMenuCursorY]
+ ld [wMoveSwapBuffer], a
+ call PlaceHollowCursor
+ jp .moving_move
+
+.place_move
+ ld hl, PartyMon1Moves
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld a, [CurPartyMon]
+ call AddNTimes
+ push hl
+ call .copy_move
+ pop hl
+ ld bc, $15
+ add hl, bc
+ call .copy_move
+ ld a, [wBattleMode]
+ jr z, .swap_moves
+ ld hl, BattleMonMoves
+ ld bc, $20
+ ld a, [CurPartyMon]
+ call AddNTimes
+ push hl
+ call .copy_move
+ pop hl
+ ld bc, 6
+ add hl, bc
+ call .copy_move
+
+.swap_moves
+ ld de, SFX_SWITCH_POKEMON
+ call PlaySFX
+ call WaitSFX
+ ld de, SFX_SWITCH_POKEMON
+ call PlaySFX
+ call WaitSFX
+ hlcoord 1, 2
+ lb bc, 8, 18
+ call ClearBox
+ hlcoord 10, 10
+ lb bc, 1, 9
+ call ClearBox
+ jp .loop
+; 1313a
+
+.copy_move
+ push hl
+ ld a, [wMenuCursorY]
+ dec a
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld d, h
+ ld e, l
+ pop hl
+ ld a, [wMoveSwapBuffer]
+ dec a
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [de]
+ ld b, [hl]
+ ld [hl], a
+ ld a, b
+ ld [de], a
+ ret
+; 13154
+
+.exit
+ xor a
+ ld [wMoveSwapBuffer], a
+ ld hl, w2DMenuFlags1
+ res 6, [hl]
+ call ClearSprites
+ jp ClearTileMap
+; 13163
+
+MoveScreenAttributes: ; 13163
+ db 3, 1
+ db 3, 1
+ db $40, $00
+ dn 2, 0
+ db D_UP | D_DOWN | D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON
+; 1316b
+
+String_1316b: ; 1316b
+ db "Where?@"
+; 13172
+
+SetUpMoveScreenBG: ; 13172
+ call ClearBGPalettes
+ call ClearTileMap
+ call ClearSprites
+ xor a
+ ld [hBGMapMode], a
+ farcall LoadStatsScreenPageTilesGFX
+ farcall ClearSpriteAnims2
+ ld a, [CurPartyMon]
+ ld e, a
+ ld d, $0
+ ld hl, PartySpecies
+ add hl, de
+ ld a, [hl]
+ ld [wd265], a
+ ld e, $2
+ farcall LoadMenuMonIcon
+ hlcoord 0, 1
+ ld b, 9
+ ld c, 18
+ call TextBox
+ hlcoord 0, 11
+ ld b, 5
+ ld c, 18
+ call TextBox
+ hlcoord 2, 0
+ lb bc, 2, 3
+ call ClearBox
+ xor a
+ ld [MonType], a
+ ld hl, PartyMonNicknames
+ ld a, [CurPartyMon]
+ call GetNick
+ hlcoord 5, 1
+ call PlaceString
+ push bc
+ farcall CopyPkmnToTempMon
+ pop hl
+ call PrintLevel
+ ld hl, PlayerHPPal
+ call SetHPPal
+ ld b, SCGB_MOVE_LIST
+ call GetSGBLayout
+ hlcoord 16, 0
+ lb bc, 1, 3
+ jp ClearBox
+; 131ef
+
+SetUpMoveList: ; 131ef
+ xor a
+ ld [hBGMapMode], a
+ ld [wMoveSwapBuffer], a
+ ld [MonType], a
+ predef CopyPkmnToTempMon
+ ld hl, TempMonMoves
+ ld de, wListMoves_MoveIndicesBuffer
+ ld bc, NUM_MOVES
+ call CopyBytes
+ ld a, SCREEN_WIDTH * 2
+ ld [Buffer1], a
+ hlcoord 2, 3
+ predef ListMoves
+ hlcoord 10, 4
+ predef ListMovePP
+ call WaitBGMap
+ call SetPalettes
+ ld a, [wNumMoves]
+ inc a
+ ld [w2DMenuNumRows], a
+ hlcoord 0, 11
+ ld b, 5
+ ld c, 18
+ jp TextBox
+; 13235
+
+PrepareToPlaceMoveData: ; 13235
+ ld hl, PartyMon1Moves
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld a, [CurPartyMon]
+ call AddNTimes
+ ld a, [wMenuCursorY]
+ dec a
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hl]
+ ld [CurMove], a
+ hlcoord 1, 12
+ lb bc, 5, 18
+ jp ClearBox
+; 13256
+
+PlaceMoveData: ; 13256
+ xor a
+ ld [hBGMapMode], a
+ hlcoord 0, 10
+ ld de, String_132ba
+ call PlaceString
+ hlcoord 0, 11
+ ld de, String_132c2
+ call PlaceString
+ hlcoord 12, 12
+ ld de, String_132ca
+ call PlaceString
+ ld a, [CurMove]
+ ld b, a
+ hlcoord 2, 12
+ predef PrintMoveType
+ ld a, [CurMove]
+ dec a
+ ld hl, Moves + MOVE_POWER
+ ld bc, MOVE_LENGTH
+ call AddNTimes
+ ld a, BANK(Moves)
+ call GetFarByte
+ hlcoord 16, 12
+ cp 2
+ jr c, .no_power
+ ld [wd265], a
+ ld de, wd265
+ lb bc, 1, 3
+ call PrintNum
+ jr .description
+
+.no_power
+ ld de, String_132cf
+ call PlaceString
+
+.description
+ hlcoord 1, 14
+ predef PrintMoveDesc
+ ld a, $1
+ ld [hBGMapMode], a
+ ret
+; 132ba
+
+String_132ba: ; 132ba
+ db "┌─────┐@"
+; 132c2
+String_132c2: ; 132c2
+ db "│TYPE/└@"
+; 132ca
+String_132ca: ; 132ca
+ db "ATK/@"
+; 132cf
+String_132cf: ; 132cf
+ db "---@"
+; 132d3
+
+Function132d3: ; 132d3
+ call Function132da
+ call Function132fe
+ ret
+; 132da
+
+Function132da: ; 132da
+ ld a, [CurPartyMon]
+ and a
+ ret z
+ ld c, a
+ ld e, a
+ ld d, 0
+ ld hl, PartyCount
+ add hl, de
+.loop
+ ld a, [hl]
+ and a
+ jr z, .prev
+ cp EGG
+ jr z, .prev
+ cp NUM_POKEMON + 1
+ jr c, .legal
+
+.prev
+ dec hl
+ dec c
+ jr nz, .loop
+ ret
+
+.legal
+ hlcoord 16, 0
+ ld [hl], "◀"
+ ret
+; 132fe
+
+Function132fe: ; 132fe
+ ld a, [CurPartyMon]
+ inc a
+ ld c, a
+ ld a, [PartyCount]
+ cp c
+ ret z
+ ld e, c
+ ld d, 0
+ ld hl, PartySpecies
+ add hl, de
+.loop
+ ld a, [hl]
+ cp -1
+ ret z
+ and a
+ jr z, .next
+ cp EGG
+ jr z, .next
+ cp NUM_POKEMON + 1
+ jr c, .legal
+
+.next
+ inc hl
+ jr .loop
+
+.legal
+ hlcoord 18, 0
+ ld [hl], "▶"
+ ret
+; 13327
diff --git a/engine/startmenu.asm b/engine/startmenu.asm
deleted file mode 100755
index 32999cacb..000000000
--- a/engine/startmenu.asm
+++ /dev/null
@@ -1,1974 +0,0 @@
-StartMenu:: ; 125cd
-
- call ClearWindowData
-
- ld de, SFX_MENU
- call PlaySFX
-
- callba ReanchorBGMap_NoOAMUpdate
-
- ld hl, StatusFlags2
- bit 2, [hl] ; bug catching contest
- ld hl, .MenuDataHeader
- jr z, .GotMenuData
- ld hl, .ContestMenuDataHeader
-.GotMenuData:
-
- call LoadMenuDataHeader
- call .SetUpMenuItems
- ld a, [wd0d2]
- ld [wMenuCursorBuffer], a
- call .DrawMenuAccount_
- call DrawVariableLengthMenuBox
- call .DrawBugContestStatusBox
- call SafeUpdateSprites
- call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
- callba LoadFonts_NoOAMUpdate
- call .DrawBugContestStatus
- call UpdateTimePals
- jr .Select
-
-.Reopen:
- call UpdateSprites
- call UpdateTimePals
- call .SetUpMenuItems
- ld a, [wd0d2]
- ld [wMenuCursorBuffer], a
-
-.Select:
- call .GetInput
- jr c, .Exit
- call .DrawMenuAccount
- ld a, [wMenuCursorBuffer]
- ld [wd0d2], a
- call PlayClickSFX
- call PlaceHollowCursor
- call .OpenMenu
-
-; Menu items have different return functions.
-; For example, saving exits the menu.
- ld hl, .MenuReturns
- ld e, a
- ld d, 0
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-.MenuReturns:
- dw .Reopen
- dw .Exit
- dw .ExitMenuCallFuncCloseText
- dw .ExitMenuRunScriptCloseText
- dw .ExitMenuRunScript
- dw .ReturnEnd
- dw .ReturnRedraw
-
-.Exit:
- ld a, [hOAMUpdate]
- push af
- ld a, 1
- ld [hOAMUpdate], a
- call LoadFontsExtra
- pop af
- ld [hOAMUpdate], a
-.ReturnEnd:
- call ExitMenu
-.ReturnEnd2:
- call CloseText
- call UpdateTimePals
- ret
-
-.GetInput:
-; Return carry on exit, and no-carry on selection.
- xor a
- ld [hBGMapMode], a
- call .DrawMenuAccount
- call SetUpMenu
- ld a, $ff
- ld [MenuSelection], a
-.loop
- call .PrintMenuAccount
- call GetScrollingMenuJoypad
- ld a, [wMenuJoypad]
- cp B_BUTTON
- jr z, .b
- cp A_BUTTON
- jr z, .a
- jr .loop
-.a
- call PlayClickSFX
- and a
- ret
-.b
- scf
- ret
-; 12691
-
-.ExitMenuRunScript: ; 12691
- call ExitMenu
- ld a, HMENURETURN_SCRIPT
- ld [hMenuReturn], a
- ret
-; 12699
-
-.ExitMenuRunScriptCloseText: ; 12699
- call ExitMenu
- ld a, HMENURETURN_SCRIPT
- ld [hMenuReturn], a
- jr .ReturnEnd2
-; 126a2
-
-.ExitMenuCallFuncCloseText: ; 126a2
- call ExitMenu
- ld hl, wQueuedScriptAddr
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [wQueuedScriptBank]
- rst FarCall
- jr .ReturnEnd2
-; 126b1
-
-.ReturnRedraw: ; 126b1
- call .Clear
- jp .Reopen
-; 126b7
-
-.Clear: ; 126b7
- call ClearBGPalettes
- call Call_ExitMenu
- call ReloadTilesetAndPalettes
- call .DrawMenuAccount_
- call DrawVariableLengthMenuBox
- call .DrawBugContestStatus
- call UpdateSprites
- call ret_d90
- call FinishExitMenu
- ret
-; 126d3
-
-
-.MenuDataHeader:
- db $40 ; tile backup
- db 0, 10 ; start coords
- db 17, 19 ; end coords
- dw .MenuData
- db 1 ; default selection
-
-.ContestMenuDataHeader:
- db $40 ; tile backup
- db 2, 10 ; start coords
- db 17, 19 ; end coords
- dw .MenuData
- db 1 ; default selection
-
-.MenuData:
- db %10101000 ; x padding, wrap around, start can close
- dn 0, 0 ; rows, columns
- dw MenuItemsList
- dw .MenuString
- dw .Items
-
-.Items:
- dw StartMenu_Pokedex, .PokedexString, .PokedexDesc
- dw StartMenu_Pokemon, .PartyString, .PartyDesc
- dw StartMenu_Pack, .PackString, .PackDesc
- dw StartMenu_Status, .StatusString, .StatusDesc
- dw StartMenu_Save, .SaveString, .SaveDesc
- dw StartMenu_Option, .OptionString, .OptionDesc
- dw StartMenu_Exit, .ExitString, .ExitDesc
- dw StartMenu_Pokegear, .PokegearString, .PokegearDesc
- dw StartMenu_Quit, .QuitString, .QuitDesc
-
-.PokedexString: db "#DEX@"
-.PartyString: db "#MON@"
-.PackString: db "PACK@"
-.StatusString: db "<PLAYER>@"
-.SaveString: db "SAVE@"
-.OptionString: db "OPTION@"
-.ExitString: db "EXIT@"
-.PokegearString: db $24, "GEAR@"
-.QuitString: db "QUIT@"
-
-.PokedexDesc: db "#MON"
- next "database@"
-
-.PartyDesc: db "Party ", $4a
- next "status@"
-
-.PackDesc: db "Contains"
- next "items@"
-
-.PokegearDesc: db "Trainer's"
- next "key device@"
-
-.StatusDesc: db "Your own"
- next "status@"
-
-.SaveDesc: db "Save your"
- next "progress@"
-
-.OptionDesc: db "Change"
- next "settings@"
-
-.ExitDesc: db "Close this"
- next "menu@"
-
-.QuitDesc: db "Quit and"
- next "be judged.@"
-
-
-.OpenMenu: ; 127e5
- ld a, [MenuSelection]
- call .GetMenuAccountTextPointer
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-; 127ef
-
-.MenuString: ; 127ef
- push de
- ld a, [MenuSelection]
- call .GetMenuAccountTextPointer
- inc hl
- inc hl
- ld a, [hli]
- ld d, [hl]
- ld e, a
- pop hl
- call PlaceString
- ret
-; 12800
-
-.MenuDesc: ; 12800
- push de
- ld a, [MenuSelection]
- cp $ff
- jr z, .none
- call .GetMenuAccountTextPointer
-rept 4
- inc hl
-endr
- ld a, [hli]
- ld d, [hl]
- ld e, a
- pop hl
- call PlaceString
- ret
-.none
- pop de
- ret
-; 12819
-
-
-.GetMenuAccountTextPointer: ; 12819
- ld e, a
- ld d, 0
- ld hl, wMenuData2PointerTableAddr
- ld a, [hli]
- ld h, [hl]
- ld l, a
-rept 6
- add hl, de
-endr
- ret
-; 12829
-
-
-.SetUpMenuItems: ; 12829
- xor a
- ld [wWhichIndexSet], a
- call .FillMenuList
-
- ld hl, StatusFlags
- bit 0, [hl]
- jr z, .no_pokedex
- ld a, 0 ; pokedex
- call .AppendMenuList
-.no_pokedex
-
- ld a, [PartyCount]
- and a
- jr z, .no_pokemon
- ld a, 1 ; pokemon
- call .AppendMenuList
-.no_pokemon
-
- ld a, [wLinkMode]
- and a
- jr nz, .no_pack
- ld hl, StatusFlags2
- bit 2, [hl] ; bug catching contest
- jr nz, .no_pack
- ld a, 2 ; pack
- call .AppendMenuList
-.no_pack
-
- ld hl, wPokegearFlags
- bit 7, [hl]
- jr z, .no_pokegear
- ld a, 7 ; pokegear
- call .AppendMenuList
-.no_pokegear
-
- ld a, 3 ; status
- call .AppendMenuList
-
- ld a, [wLinkMode]
- and a
- jr nz, .no_save
- ld hl, StatusFlags2
- bit 2, [hl] ; bug catching contest
- ld a, 8 ; quit
- jr nz, .write
- ld a, 4 ; save
-.write
- call .AppendMenuList
-.no_save
-
- ld a, 5 ; option
- call .AppendMenuList
- ld a, 6 ; exit
- call .AppendMenuList
- ld a, c
- ld [MenuItemsList], a
- ret
-; 1288d
-
-
-.FillMenuList: ; 1288d
- xor a
- ld hl, MenuItemsList
- ld [hli], a
- ld a, -1
- ld bc, MenuItemsListEnd - (MenuItemsList + 1)
- call ByteFill
- ld de, MenuItemsList + 1
- ld c, 0
- ret
-; 128a0
-
-.AppendMenuList: ; 128a0
- ld [de], a
- inc de
- inc c
- ret
-; 128a4
-
-.DrawMenuAccount_: ; 128a4
- jp .DrawMenuAccount
-; 128a7
-
-.PrintMenuAccount: ; 128a7
- call .IsMenuAccountOn
- ret z
- call .DrawMenuAccount
- decoord 0, 14
- jp .MenuDesc
-; 128b4
-
-.DrawMenuAccount: ; 128b4
- call .IsMenuAccountOn
- ret z
- hlcoord 0, 13
- lb bc, 5, 10
- call ClearBox
- hlcoord 0, 13
- ld b, 3
- ld c, 8
- jp TextBoxPalette
-; 128cb
-
-.IsMenuAccountOn: ; 128cb
- ld a, [Options2]
- and 1
- ret
-; 128d1
-
-.DrawBugContestStatusBox: ; 128d1
- ld hl, StatusFlags2
- bit 2, [hl] ; bug catching contest
- ret z
- callba StartMenu_DrawBugContestStatusBox
- ret
-; 128de
-
-.DrawBugContestStatus: ; 128de
- ld hl, StatusFlags2
- bit 2, [hl] ; bug catching contest
- jr nz, .contest
- ret
-.contest
- callba StartMenu_PrintBugContestStatus
- ret
-; 128ed
-
-
-StartMenu_Exit: ; 128ed
-; Exit the menu.
-
- ld a, 1
- ret
-; 128f0
-
-
-StartMenu_Quit: ; 128f0
-; Retire from the bug catching contest.
-
- ld hl, .EndTheContestText
- call StartMenuYesNo
- jr c, .DontEndContest
- ld a, BANK(BugCatchingContestReturnToGateScript)
- ld hl, BugCatchingContestReturnToGateScript
- call FarQueueScript
- ld a, 4
- ret
-
-.DontEndContest:
- ld a, 0
- ret
-
-.EndTheContestText:
- text_jump UnknownText_0x1c1a6c
- db "@"
-; 1290b
-
-
-StartMenu_Save: ; 1290b
-; Save the game.
-
- call BufferScreen
- callba SaveMenu
- jr nc, .asm_12919
- ld a, 0
- ret
-.asm_12919
- ld a, 1
- ret
-; 1291c
-
-
-StartMenu_Option: ; 1291c
-; Game options.
-
- call FadeToMenu
- callba OptionsMenu
- ld a, 6
- ret
-; 12928
-
-
-StartMenu_Status: ; 12928
-; Player status.
-
- call FadeToMenu
- callba TrainerCard
- call CloseSubmenu
- ld a, 0
- ret
-; 12937
-
-
-StartMenu_Pokedex: ; 12937
-
- ld a, [PartyCount]
- and a
- jr z, .asm_12949
-
- call FadeToMenu
- callba Pokedex
- call CloseSubmenu
-
-.asm_12949
- ld a, 0
- ret
-; 1294c
-
-
-StartMenu_Pokegear: ; 1294c
-
- call FadeToMenu
- callba PokeGear
- call CloseSubmenu
- ld a, 0
- ret
-; 1295b
-
-
-StartMenu_Pack: ; 1295b
-
- call FadeToMenu
- callba Pack
- ld a, [wcf66]
- and a
- jr nz, .used_item
- call CloseSubmenu
- ld a, 0
- ret
-
-.used_item
- call ExitAllMenus
- ld a, 4
- ret
-; 12976
-
-
-StartMenu_Pokemon: ; 12976
-
- ld a, [PartyCount]
- and a
- jr z, .return
-
- call FadeToMenu
-
-.choosemenu
- xor a
- ld [PartyMenuActionText], a ; Choose a POKéMON.
- call ClearBGPalettes
-
-.menu
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuGFX
-
-.menunoreload
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
- call WaitBGMap
- call SetPalettes ; load regular palettes?
- call DelayFrame
- callba PartyMenuSelect
- jr c, .return ; if cancelled or pressed B
-
- call PokemonActionSubmenu
- cp 3
- jr z, .menu
- cp 0
- jr z, .choosemenu
- cp 1
- jr z, .menunoreload
- cp 2
- jr z, .quit
-
-.return
- call CloseSubmenu
- ld a, 0
- ret
-
-.quit
- ld a, b
- push af
- call ExitAllMenus
- pop af
- ret
-; 129d5
-
-HasNoItems: ; 129d5
- ld a, [NumItems]
- and a
- ret nz
- ld a, [NumKeyItems]
- and a
- ret nz
- ld a, [NumBalls]
- and a
- ret nz
- ld hl, TMsHMs
- ld b, NUM_TMS + NUM_HMS
-.loop
- ld a, [hli]
- and a
- jr nz, .done
- dec b
- jr nz, .loop
- scf
- ret
-.done
- and a
- ret
-
-TossItemFromPC: ; 129f4
- push de
- call PartyMonItemName
- callba _CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
- and a
- jr nz, .key_item
- ld hl, .TossHowMany
- call MenuTextBox
- callba SelectQuantityToToss
- push af
- call CloseWindow
- call ExitMenu
- pop af
- jr c, .quit
- ld hl, .ConfirmToss
- call MenuTextBox
- call YesNoBox
- push af
- call ExitMenu
- pop af
- jr c, .quit
- pop hl
- ld a, [wd107]
- call TossItem
- call PartyMonItemName
- ld hl, .TossedThisMany
- call MenuTextBox
- call ExitMenu
- and a
- ret
-
-.key_item
- call .CantToss
-.quit
- pop hl
- scf
- ret
-
-.TossHowMany:
- ; Toss out how many @ (S)?
- text_jump UnknownText_0x1c1a90
- db "@"
-
-.ConfirmToss:
- ; Throw away @ @ (S)?
- text_jump UnknownText_0x1c1aad
- db "@"
-
-.TossedThisMany:
- ; Discarded @ (S).
- text_jump UnknownText_0x1c1aca
- db "@"
-
-.CantToss:
- ld hl, .TooImportantToToss
- call MenuTextBoxBackup
- ret
-
-.TooImportantToToss:
- ; That's too impor- tant to toss out!
- text_jump UnknownText_0x1c1adf
- db "@"
-; 0x12a60
-
-CantUseItem: ; 12a60
- ld hl, CantUseItemText
- call MenuTextBoxWaitButton
- ret
-; 12a67
-
-CantUseItemText: ; 12a67
- text_jump UnknownText_0x1c1b03
- db "@"
-; 12a6c
-
-
-PartyMonItemName: ; 12a6c
- ld a, [CurItem]
- ld [wd265], a
- call GetItemName
- call CopyName1
- ret
-; 12a79
-
-
-CancelPokemonAction: ; 12a79
- callba InitPartyMenuWithCancel
- callba UnfreezeMonIcons
- ld a, 1
- ret
-; 12a88
-
-
-PokemonActionSubmenu: ; 12a88
- hlcoord 1, 15
- lb bc, 2, 18
- call ClearBox
- callba MonSubmenu
- call GetCurNick
- ld a, [MenuSelection]
- ld hl, .Actions
- ld de, 3
- call IsInArray
- jr nc, .nothing
-
- inc hl
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-.nothing
- ld a, 0
- ret
-
-.Actions:
- dbw MONMENU_CUT, MonMenu_Cut ; Cut
- dbw MONMENU_FLY, MonMenu_Fly ; Fly
- dbw MONMENU_SURF, MonMenu_Surf ; Surf
- dbw MONMENU_STRENGTH, MonMenu_Strength ; Strength
- dbw MONMENU_FLASH, MonMenu_Flash ; Flash
- dbw MONMENU_WHIRLPOOL, MonMenu_Whirlpool ; Whirlpool
- dbw MONMENU_DIG, MonMenu_Dig ; Dig
- dbw MONMENU_TELEPORT, MonMenu_Teleport ; Teleport
- dbw MONMENU_SOFTBOILED, MonMenu_Softboiled_MilkDrink ; Softboiled
- dbw MONMENU_MILKDRINK, MonMenu_Softboiled_MilkDrink ; MilkDrink
- dbw MONMENU_HEADBUTT, MonMenu_Headbutt ; Headbutt
- dbw MONMENU_WATERFALL, MonMenu_Waterfall ; Waterfall
- dbw MONMENU_ROCKSMASH, MonMenu_RockSmash ; RockSmash
- dbw MONMENU_SWEETSCENT, MonMenu_SweetScent ; SweetScent
- dbw MONMENU_STATS, OpenPartyStats
- dbw MONMENU_SWITCH, SwitchPartyMons
- dbw MONMENU_ITEM, GiveTakePartyMonItem
- dbw MONMENU_CANCEL, CancelPokemonAction
- dbw MONMENU_MOVE, ManagePokemonMoves ; move
- dbw MONMENU_MAIL, MonMailAction ; mail
-; 12aec
-
-
-SwitchPartyMons: ; 12aec
-
-; Don't try if there's nothing to switch!
- ld a, [PartyCount]
- cp 2
- jr c, .DontSwitch
-
- ld a, [CurPartyMon]
- inc a
- ld [wSwitchMon], a
-
- callba HoldSwitchmonIcon
- callba InitPartyMenuNoCancel
-
- ld a, PARTYMENUACTION_MOVE
- ld [PartyMenuActionText], a
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
-
- hlcoord 0, 1
- ld bc, 20 * 2
- ld a, [wSwitchMon]
- dec a
- call AddNTimes
- ld [hl], "▷"
- call WaitBGMap
- call SetPalettes
- call DelayFrame
-
- callba PartyMenuSelect
- bit 1, b
- jr c, .DontSwitch
-
- callba _SwitchPartyMons
-
- xor a
- ld [PartyMenuActionText], a
-
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuGFX
-
- ld a, 1
- ret
-
-.DontSwitch:
- xor a
- ld [PartyMenuActionText], a
- call CancelPokemonAction
- ret
-; 12b60
-
-
-GiveTakePartyMonItem: ; 12b60
-
-; Eggs can't hold items!
- ld a, [CurPartySpecies]
- cp EGG
- jr z, .cancel
-
- ld hl, GiveTakeItemMenuData
- call LoadMenuDataHeader
- call VerticalMenu
- call ExitMenu
- jr c, .cancel
-
- call GetCurNick
- ld hl, StringBuffer1
- ld de, wMonOrItemNameBuffer
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
- ld a, [wMenuCursorY]
- cp 1
- jr nz, .take
-
- call LoadStandardMenuDataHeader
- call ClearPalettes
- call .GiveItem
- call ClearPalettes
- call LoadFontsBattleExtra
- call ExitMenu
- ld a, 0
- ret
-
-.take
- call TakePartyItem
- ld a, 3
- ret
-
-.cancel
- ld a, 3
- ret
-; 12ba9
-
-
-.GiveItem:
-
- callba DepositSellInitPackBuffers
-
-.loop
- callba DepositSellPack
-
- ld a, [wcf66]
- and a
- jr z, .quit
-
- ld a, [wcf65]
- cp 2
- jr z, .next
-
- call CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
- and a
- jr nz, .next
-
- call TryGiveItemToPartymon
- jr .quit
-
-.next
- ld hl, CantBeHeldText
- call MenuTextBoxBackup
- jr .loop
-
-.quit
- ret
-; 12bd9
-
-
-TryGiveItemToPartymon: ; 12bd9
-
- call SpeechTextBox
- call PartyMonItemName
- call GetPartyItemLocation
- ld a, [hl]
- and a
- jr z, .give_item_to_mon
-
- push hl
- ld d, a
- callba ItemIsMail
- pop hl
- jr c, .please_remove_mail
- ld a, [hl]
- jr .already_holding_item
-
-.give_item_to_mon
- call GiveItemToPokemon
- ld hl, MadeHoldText
- call MenuTextBoxBackup
- call GivePartyItem
- ret
-
-.please_remove_mail
- ld hl, PleaseRemoveMailText
- call MenuTextBoxBackup
- ret
-
-.already_holding_item
- ld [wd265], a
- call GetItemName
- ld hl, SwitchAlreadyHoldingText
- call StartMenuYesNo
- jr c, .abort
-
- call GiveItemToPokemon
- ld a, [wd265]
- push af
- ld a, [CurItem]
- ld [wd265], a
- pop af
- ld [CurItem], a
- call ReceiveItemFromPokemon
- jr nc, .bag_full
-
- ld hl, TookAndMadeHoldText
- call MenuTextBoxBackup
- ld a, [wd265]
- ld [CurItem], a
- call GivePartyItem
- ret
-
-.bag_full
- ld a, [wd265]
- ld [CurItem], a
- call ReceiveItemFromPokemon
- ld hl, ItemStorageIsFullText
- call MenuTextBoxBackup
-
-.abort
- ret
-; 12c4c
-
-
-GivePartyItem: ; 12c4c
-
- call GetPartyItemLocation
- ld a, [CurItem]
- ld [hl], a
- ld d, a
- callba ItemIsMail
- jr nc, .done
- call ComposeMailMessage
-
-.done
- ret
-; 12c60
-
-
-TakePartyItem: ; 12c60
-
- call SpeechTextBox
- call GetPartyItemLocation
- ld a, [hl]
- and a
- jr z, .asm_12c8c
-
- ld [CurItem], a
- call ReceiveItemFromPokemon
- jr nc, .asm_12c94
-
- callba ItemIsMail
- call GetPartyItemLocation
- ld a, [hl]
- ld [wd265], a
- ld [hl], NO_ITEM
- call GetItemName
- ld hl, TookFromText
- call MenuTextBoxBackup
- jr .asm_12c9a
-
-.asm_12c8c
- ld hl, IsntHoldingAnythingText
- call MenuTextBoxBackup
- jr .asm_12c9a
-
-.asm_12c94
- ld hl, ItemStorageIsFullText
- call MenuTextBoxBackup
-
-.asm_12c9a
- ret
-; 12c9b
-
-
-GiveTakeItemMenuData: ; 12c9b
- db %01010000
- db 12, 12 ; start coords
- db 17, 19 ; end coords
- dw .Items
- db 1 ; default option
-
-.Items:
- db %10000000 ; x padding
- db 2 ; # items
- db "GIVE@"
- db "TAKE@"
-; 12caf
-
-
-TookAndMadeHoldText: ; 12caf
- text_jump UnknownText_0x1c1b2c
- db "@"
-; 12cb4
-
-MadeHoldText: ; 12cb4
- text_jump UnknownText_0x1c1b57
- db "@"
-; 12cb9
-
-PleaseRemoveMailText: ; 12cb9
- text_jump UnknownText_0x1c1b6f
- db "@"
-; 12cbe
-
-IsntHoldingAnythingText: ; 12cbe
- text_jump UnknownText_0x1c1b8e
- db "@"
-; 12cc3
-
-ItemStorageIsFullText: ; 12cc3
- text_jump UnknownText_0x1c1baa
- db "@"
-; 12cc8
-
-TookFromText: ; 12cc8
- text_jump UnknownText_0x1c1bc4
- db "@"
-; 12ccd
-
-SwitchAlreadyHoldingText: ; 12ccd
- text_jump UnknownText_0x1c1bdc
- db "@"
-; 12cd2
-
-CantBeHeldText: ; 12cd2
- text_jump UnknownText_0x1c1c09
- db "@"
-; 12cd7
-
-
-GetPartyItemLocation: ; 12cd7
- push af
- ld a, MON_ITEM
- call GetPartyParamLocation
- pop af
- ret
-; 12cdf
-
-
-ReceiveItemFromPokemon: ; 12cdf
- ld a, $1
- ld [wItemQuantityChangeBuffer], a
- ld hl, NumItems
- jp ReceiveItem
-; 12cea
-
-
-GiveItemToPokemon: ; 12cea (4:6cea)
- ld a, $1
- ld [wItemQuantityChangeBuffer], a
- ld hl, NumItems
- jp TossItem
-
-StartMenuYesNo: ; 12cf5
- call MenuTextBox
- call YesNoBox
- jp ExitMenu
-; 12cfe
-
-
-ComposeMailMessage: ; 12cfe (4:6cfe)
- ld de, wTempMailMessage
- callba _ComposeMailMessage
- ld hl, PlayerName
- ld de, wTempMailAuthor
- ld bc, NAME_LENGTH - 1
- call CopyBytes
- ld hl, PlayerID
- ld bc, 2
- call CopyBytes
- ld a, [CurPartySpecies]
- ld [de], a
- inc de
- ld a, [CurItem]
- ld [de], a
- ld a, [CurPartyMon]
- ld hl, sPartyMail
- ld bc, MAIL_STRUCT_LENGTH
- call AddNTimes
- ld d, h
- ld e, l
- ld hl, wTempMail
- ld bc, MAIL_STRUCT_LENGTH
- ld a, BANK(sPartyMail)
- call GetSRAMBank
- call CopyBytes
- call CloseSRAM
- ret
-
-MonMailAction: ; 12d45
-; If in the time capsule or trade center,
-; selecting the mail only allows you to
-; read the mail.
- ld a, [wLinkMode]
- cp LINK_TIMECAPSULE
- jr z, .read
- cp LINK_TRADECENTER
- jr z, .read
-
-; Show the READ/TAKE/QUIT menu.
- ld hl, .MenuDataHeader
- call LoadMenuDataHeader
- call VerticalMenu
- call ExitMenu
-
-; Interpret the menu.
- jp c, .done
- ld a, [wMenuCursorY]
- cp $1
- jr z, .read
- cp $2
- jr z, .take
- jp .done
-
-.read
- callba ReadPartyMonMail
- ld a, $0
- ret
-
-.take
- ld hl, .sendmailtopctext
- call StartMenuYesNo
- jr c, .RemoveMailToBag
- ld a, [CurPartyMon]
- ld b, a
- callba SendMailToPC
- jr c, .MailboxFull
- ld hl, .sentmailtopctext
- call MenuTextBoxBackup
- jr .done
-
-.MailboxFull:
- ld hl, .mailboxfulltext
- call MenuTextBoxBackup
- jr .done
-
-.RemoveMailToBag:
- ld hl, .mailwilllosemessagetext
- call StartMenuYesNo
- jr c, .done
- call GetPartyItemLocation
- ld a, [hl]
- ld [CurItem], a
- call ReceiveItemFromPokemon
- jr nc, .BagIsFull
- call GetPartyItemLocation
- ld [hl], $0
- call GetCurNick
- ld hl, .tookmailfrommontext
- call MenuTextBoxBackup
- jr .done
-
-.BagIsFull:
- ld hl, .bagfulltext
- call MenuTextBoxBackup
- jr .done
-
-.done
- ld a, $3
- ret
-; 12dc9
-
-
-.MenuDataHeader:
- db $40 ; flags
- db 10, 12 ; start coords
- db 17, 19 ; end coords
- dw .MenuData2
- db 1 ; default option
-; 0x12dd1
-
-.MenuData2:
- db $80 ; flags
- db 3 ; items
- db "READ@"
- db "TAKE@"
- db "QUIT@"
-; 0x12de2
-
-
-.mailwilllosemessagetext
-; The MAIL will lose its message. OK?
- text_jump UnknownText_0x1c1c22
- db "@"
-; 0x12de7
-
-.tookmailfrommontext
-; MAIL detached from <POKEMON>.
- text_jump UnknownText_0x1c1c47
- db "@"
-; 0x12dec
-
-.bagfulltext
-; There's no space for removing MAIL.
- text_jump UnknownText_0x1c1c62
- db "@"
-; 0x12df1
-
-.sendmailtopctext
-; Send the removed MAIL to your PC?
- text_jump UnknownText_0x1c1c86
- db "@"
-; 0x12df6
-
-.mailboxfulltext
-; Your PC's MAILBOX is full.
- text_jump UnknownText_0x1c1ca9
- db "@"
-; 0x12dfb
-
-.sentmailtopctext
-; The MAIL was sent to your PC.
- text_jump UnknownText_0x1c1cc4
- db "@"
-; 0x12e00
-
-
-OpenPartyStats: ; 12e00
- call LoadStandardMenuDataHeader
- call ClearSprites
-; PartyMon
- xor a
- ld [MonType], a
- call LowVolume
- predef StatsScreenInit
- call MaxVolume
- call Call_ExitMenu
- ld a, 0
- ret
-; 12e1b
-
-
-MonMenu_Cut: ; 12e1b
- callba CutFunction
- ld a, [wFieldMoveSucceeded]
- cp $1
- jr nz, .Fail
- ld b, $4
- ld a, $2
- ret
-
-.Fail:
- ld a, $3
- ret
-; 12e30
-
-
-MonMenu_Fly: ; 12e30
- callba FlyFunction
- ld a, [wFieldMoveSucceeded]
- cp $2
- jr z, .Fail
- cp $0
- jr z, .Error
- callba TrainerRankings_Fly
- ld b, $4
- ld a, $2
- ret
-
-.Fail:
- ld a, $3
- ret
-
-.Error:
- ld a, $0
- ret
-
-.Unused:
- ld a, $1
- ret
-; 12e55
-
-MonMenu_Flash: ; 12e55
- callba OWFlash
- ld a, [wFieldMoveSucceeded]
- cp $1
- jr nz, .Fail
- ld b, $4
- ld a, $2
- ret
-
-.Fail:
- ld a, $3
- ret
-; 12e6a
-
-MonMenu_Strength: ; 12e6a
- callba StrengthFunction
- ld a, [wFieldMoveSucceeded]
- cp $1
- jr nz, .Fail
- ld b, $4
- ld a, $2
- ret
-
-.Fail:
- ld a, $3
- ret
-; 12e7f
-
-MonMenu_Whirlpool: ; 12e7f
- callba WhirlpoolFunction
- ld a, [wFieldMoveSucceeded]
- cp $1
- jr nz, .Fail
- ld b, $4
- ld a, $2
- ret
-
-.Fail:
- ld a, $3
- ret
-; 12e94
-
-MonMenu_Waterfall: ; 12e94
- callba WaterfallFunction
- ld a, [wFieldMoveSucceeded]
- cp $1
- jr nz, .Fail
- ld b, $4
- ld a, $2
- ret
-
-.Fail:
- ld a, $3
- ret
-; 12ea9
-
-MonMenu_Teleport: ; 12ea9
- callba TeleportFunction
- ld a, [wFieldMoveSucceeded]
- and a
- jr z, .Fail
- ld b, $4
- ld a, $2
- ret
-
-.Fail:
- ld a, $3
- ret
-; 12ebd
-
-MonMenu_Surf: ; 12ebd
- callba SurfFunction
- ld a, [wFieldMoveSucceeded]
- and a
- jr z, .Fail
- ld b, $4
- ld a, $2
- ret
-
-.Fail:
- ld a, $3
- ret
-; 12ed1
-
-MonMenu_Dig: ; 12ed1
- callba DigFunction
- ld a, [wFieldMoveSucceeded]
- cp $1
- jr nz, .Fail
- ld b, $4
- ld a, $2
- ret
-
-.Fail:
- ld a, $3
- ret
-; 12ee6
-
-MonMenu_Softboiled_MilkDrink: ; 12ee6
- call .CheckMonHasEnoughHP
- jr nc, .NotEnoughHP
- callba Softboiled_MilkDrinkFunction
- jr .finish
-
-.NotEnoughHP:
- ld hl, .Text_NotEnoughHP
- call PrintText
-
-.finish
- xor a
- ld [PartyMenuActionText], a
- ld a, $3
- ret
-; 12f00
-
-.Text_NotEnoughHP:
- ; Not enough HP!
- text_jump UnknownText_0x1c1ce3
- db "@"
-; 0x12f05
-
-.CheckMonHasEnoughHP:
-; Need to have at least (MaxHP / 5) HP left.
- ld a, MON_MAXHP
- call GetPartyParamLocation
- ld a, [hli]
- ld [hDividend + 0], a
- ld a, [hl]
- ld [hDividend + 1], a
- ld a, 5
- ld [hDivisor], a
- ld b, 2
- call Divide
- ld a, MON_HP + 1
- call GetPartyParamLocation
- ld a, [hQuotient + 2]
- sub [hl]
- dec hl
- ld a, [hQuotient + 1]
- sbc [hl]
- ret
-; 12f26
-
-MonMenu_Headbutt: ; 12f26
- callba HeadbuttFunction
- ld a, [wFieldMoveSucceeded]
- cp $1
- jr nz, .Fail
- ld b, $4
- ld a, $2
- ret
-
-.Fail:
- ld a, $3
- ret
-; 12f3b
-
-MonMenu_RockSmash: ; 12f3b
- callba RockSmashFunction
- ld a, [wFieldMoveSucceeded]
- cp $1
- jr nz, .Fail
- ld b, $4
- ld a, $2
- ret
-
-.Fail:
- ld a, $3
- ret
-; 12f50
-
-MonMenu_SweetScent: ; 12f50
- callba SweetScentFromMenu
- ld b, $4
- ld a, $2
- ret
-; 12f5b
-
-ChooseMoveToDelete: ; 12f5b
- ld hl, Options
- ld a, [hl]
- push af
- set NO_TEXT_SCROLL, [hl]
- call LoadFontsBattleExtra
- call .ChooseMoveToDelete
- pop bc
- ld a, b
- ld [Options], a
- push af
- call ClearBGPalettes
- pop af
- ret
-; 12f73
-
-.ChooseMoveToDelete
- call SetUpMoveScreenBG
- ld de, DeleteMoveScreenAttrs
- call SetMenuAttributes
- call SetUpMoveList
- ld hl, w2DMenuFlags1
- set 6, [hl]
- jr .enter_loop
-
-.loop
- call ScrollingMenuJoypad
- bit B_BUTTON_F, a
- jp nz, .b_button
- bit A_BUTTON_F, a
- jp nz, .a_button
-
-.enter_loop
- call PrepareToPlaceMoveData
- call PlaceMoveData
- jp .loop
-; 12f9c
-
-.a_button
- and a
- jr .finish
-
-.b_button
- scf
-
-.finish
- push af
- xor a
- ld [wSwitchMon], a
- ld hl, w2DMenuFlags1
- res 6, [hl]
- call ClearSprites
- call ClearTileMap
- pop af
- ret
-; 12fb2
-
-DeleteMoveScreenAttrs: ; 12fb2
- db 3, 1
- db 3, 1
- db $40, $00
- dn 2, 0
- db D_UP | D_DOWN | A_BUTTON | B_BUTTON
-; 12fba
-
-ManagePokemonMoves: ; 12fba
- ld a, [CurPartySpecies]
- cp EGG
- jr z, .egg
- ld hl, Options
- ld a, [hl]
- push af
- set NO_TEXT_SCROLL, [hl]
- call MoveScreenLoop
- pop af
- ld [Options], a
- call ClearBGPalettes
-
-.egg
- ld a, $0
- ret
-; 12fd5
-
-MoveScreenLoop: ; 12fd5
- ld a, [CurPartyMon]
- inc a
- ld [wPartyMenuCursor], a
- call SetUpMoveScreenBG
- call Function132d3
- ld de, MoveScreenAttributes
- call SetMenuAttributes
-.loop
- call SetUpMoveList
- ld hl, w2DMenuFlags1
- set 6, [hl]
- jr .skip_joy
-
-.joy_loop
- call ScrollingMenuJoypad
- bit 1, a
- jp nz, .b_button
- bit 0, a
- jp nz, .a_button
- bit 4, a
- jp nz, .d_right
- bit 5, a
- jp nz, .d_left
-
-.skip_joy
- call PrepareToPlaceMoveData
- ld a, [wMoveSwapBuffer]
- and a
- jr nz, .moving_move
- call PlaceMoveData
- jp .joy_loop
-
-.moving_move
- ld a, " "
- hlcoord 1, 11
- ld bc, 5
- call ByteFill
- hlcoord 1, 12
- lb bc, 5, SCREEN_WIDTH - 2
- call ClearBox
- hlcoord 1, 12
- ld de, String_1316b
- call PlaceString
- jp .joy_loop
-.b_button
- call PlayClickSFX
- call WaitSFX
- ld a, [wMoveSwapBuffer]
- and a
- jp z, .exit
-
- ld a, [wMoveSwapBuffer]
- ld [wMenuCursorY], a
- xor a
- ld [wMoveSwapBuffer], a
- hlcoord 1, 2
- lb bc, 8, SCREEN_WIDTH - 2
- call ClearBox
- jp .loop
-; 1305b
-
-.d_right
- ld a, [wMoveSwapBuffer]
- and a
- jp nz, .joy_loop
-
- ld a, [CurPartyMon]
- ld b, a
- push bc
- call .cycle_right
- pop bc
- ld a, [CurPartyMon]
- cp b
- jp z, .joy_loop
- jp MoveScreenLoop
-
-.d_left
- ld a, [wMoveSwapBuffer]
- and a
- jp nz, .joy_loop
- ld a, [CurPartyMon]
- ld b, a
- push bc
- call .cycle_left
- pop bc
- ld a, [CurPartyMon]
- cp b
- jp z, .joy_loop
- jp MoveScreenLoop
-
-.cycle_right
- ld a, [CurPartyMon]
- inc a
- ld [CurPartyMon], a
- ld c, a
- ld b, 0
- ld hl, PartySpecies
- add hl, bc
- ld a, [hl]
- cp -1
- jr z, .cycle_left
- cp EGG
- ret nz
- jr .cycle_right
-
-.cycle_left
- ld a, [CurPartyMon]
- and a
- ret z
-.cycle_left_loop
- ld a, [CurPartyMon]
- dec a
- ld [CurPartyMon], a
- ld c, a
- ld b, 0
- ld hl, PartySpecies
- add hl, bc
- ld a, [hl]
- cp EGG
- ret nz
- ld a, [CurPartyMon]
- and a
- jr z, .cycle_right
- jr .cycle_left_loop
-; 130c6
-
-.a_button
- call PlayClickSFX
- call WaitSFX
- ld a, [wMoveSwapBuffer]
- and a
- jr nz, .place_move
- ld a, [wMenuCursorY]
- ld [wMoveSwapBuffer], a
- call PlaceHollowCursor
- jp .moving_move
-
-.place_move
- ld hl, PartyMon1Moves
- ld bc, PARTYMON_STRUCT_LENGTH
- ld a, [CurPartyMon]
- call AddNTimes
- push hl
- call .copy_move
- pop hl
- ld bc, $15
- add hl, bc
- call .copy_move
- ld a, [wBattleMode]
- jr z, .swap_moves
- ld hl, BattleMonMoves
- ld bc, $20
- ld a, [CurPartyMon]
- call AddNTimes
- push hl
- call .copy_move
- pop hl
- ld bc, 6
- add hl, bc
- call .copy_move
-
-.swap_moves
- ld de, SFX_SWITCH_POKEMON
- call PlaySFX
- call WaitSFX
- ld de, SFX_SWITCH_POKEMON
- call PlaySFX
- call WaitSFX
- hlcoord 1, 2
- lb bc, 8, 18
- call ClearBox
- hlcoord 10, 10
- lb bc, 1, 9
- call ClearBox
- jp .loop
-; 1313a
-
-.copy_move
- push hl
- ld a, [wMenuCursorY]
- dec a
- ld c, a
- ld b, $0
- add hl, bc
- ld d, h
- ld e, l
- pop hl
- ld a, [wMoveSwapBuffer]
- dec a
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [de]
- ld b, [hl]
- ld [hl], a
- ld a, b
- ld [de], a
- ret
-; 13154
-
-.exit
- xor a
- ld [wMoveSwapBuffer], a
- ld hl, w2DMenuFlags1
- res 6, [hl]
- call ClearSprites
- jp ClearTileMap
-; 13163
-
-MoveScreenAttributes: ; 13163
- db 3, 1
- db 3, 1
- db $40, $00
- dn 2, 0
- db D_UP | D_DOWN | D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON
-; 1316b
-
-String_1316b: ; 1316b
- db "Where?@"
-; 13172
-
-SetUpMoveScreenBG: ; 13172
- call ClearBGPalettes
- call ClearTileMap
- call ClearSprites
- xor a
- ld [hBGMapMode], a
- callba LoadStatsScreenPageTilesGFX
- callba ClearSpriteAnims2
- ld a, [CurPartyMon]
- ld e, a
- ld d, $0
- ld hl, PartySpecies
- add hl, de
- ld a, [hl]
- ld [wd265], a
- ld e, $2
- callba LoadMenuMonIcon
- hlcoord 0, 1
- ld b, 9
- ld c, 18
- call TextBox
- hlcoord 0, 11
- ld b, 5
- ld c, 18
- call TextBox
- hlcoord 2, 0
- lb bc, 2, 3
- call ClearBox
- xor a
- ld [MonType], a
- ld hl, PartyMonNicknames
- ld a, [CurPartyMon]
- call GetNick
- hlcoord 5, 1
- call PlaceString
- push bc
- callba CopyPkmnToTempMon
- pop hl
- call PrintLevel
- ld hl, PlayerHPPal
- call SetHPPal
- ld b, SCGB_MOVE_LIST
- call GetSGBLayout
- hlcoord 16, 0
- lb bc, 1, 3
- jp ClearBox
-; 131ef
-
-SetUpMoveList: ; 131ef
- xor a
- ld [hBGMapMode], a
- ld [wMoveSwapBuffer], a
- ld [MonType], a
- predef CopyPkmnToTempMon
- ld hl, TempMonMoves
- ld de, wListMoves_MoveIndicesBuffer
- ld bc, NUM_MOVES
- call CopyBytes
- ld a, SCREEN_WIDTH * 2
- ld [Buffer1], a
- hlcoord 2, 3
- predef ListMoves
- hlcoord 10, 4
- predef ListMovePP
- call WaitBGMap
- call SetPalettes
- ld a, [wNumMoves]
- inc a
- ld [w2DMenuNumRows], a
- hlcoord 0, 11
- ld b, 5
- ld c, 18
- jp TextBox
-; 13235
-
-PrepareToPlaceMoveData: ; 13235
- ld hl, PartyMon1Moves
- ld bc, PARTYMON_STRUCT_LENGTH
- ld a, [CurPartyMon]
- call AddNTimes
- ld a, [wMenuCursorY]
- dec a
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [hl]
- ld [CurMove], a
- hlcoord 1, 12
- lb bc, 5, 18
- jp ClearBox
-; 13256
-
-PlaceMoveData: ; 13256
- xor a
- ld [hBGMapMode], a
- hlcoord 0, 10
- ld de, String_132ba
- call PlaceString
- hlcoord 0, 11
- ld de, String_132c2
- call PlaceString
- hlcoord 12, 12
- ld de, String_132ca
- call PlaceString
- ld a, [CurMove]
- ld b, a
- hlcoord 2, 12
- predef PrintMoveType
- ld a, [CurMove]
- dec a
- ld hl, Moves + MOVE_POWER
- ld bc, MOVE_LENGTH
- call AddNTimes
- ld a, BANK(Moves)
- call GetFarByte
- hlcoord 16, 12
- cp 2
- jr c, .no_power
- ld [wd265], a
- ld de, wd265
- lb bc, 1, 3
- call PrintNum
- jr .description
-
-.no_power
- ld de, String_132cf
- call PlaceString
-
-.description
- hlcoord 1, 14
- predef PrintMoveDesc
- ld a, $1
- ld [hBGMapMode], a
- ret
-; 132ba
-
-String_132ba: ; 132ba
- db "┌─────┐@"
-; 132c2
-String_132c2: ; 132c2
- db "│TYPE/└@"
-; 132ca
-String_132ca: ; 132ca
- db "ATK/@"
-; 132cf
-String_132cf: ; 132cf
- db "---@"
-; 132d3
-
-Function132d3: ; 132d3
- call Function132da
- call Function132fe
- ret
-; 132da
-
-Function132da: ; 132da
- ld a, [CurPartyMon]
- and a
- ret z
- ld c, a
- ld e, a
- ld d, 0
- ld hl, PartyCount
- add hl, de
-.loop
- ld a, [hl]
- and a
- jr z, .prev
- cp EGG
- jr z, .prev
- cp NUM_POKEMON + 1
- jr c, .legal
-
-.prev
- dec hl
- dec c
- jr nz, .loop
- ret
-
-.legal
- hlcoord 16, 0
- ld [hl], "◀"
- ret
-; 132fe
-
-Function132fe: ; 132fe
- ld a, [CurPartyMon]
- inc a
- ld c, a
- ld a, [PartyCount]
- cp c
- ret z
- ld e, c
- ld d, 0
- ld hl, PartySpecies
- add hl, de
-.loop
- ld a, [hl]
- cp -1
- ret z
- and a
- jr z, .next
- cp EGG
- jr z, .next
- cp NUM_POKEMON + 1
- jr c, .legal
-
-.next
- inc hl
- jr .loop
-
-.legal
- hlcoord 18, 0
- ld [hl], "▶"
- ret
-; 13327
diff --git a/engine/stats_screen.asm b/engine/stats_screen.asm
index 6a59019f0..da02808b1 100755
--- a/engine/stats_screen.asm
+++ b/engine/stats_screen.asm
@@ -3,7 +3,7 @@ BattleStatsScreenInit: ; 4dc7b (13:5c7b)
cp LINK_MOBILE
jr nz, StatsScreenInit
- ld a, [wBattleMode] ; wd22d (aliases: EnemyMonEnd)
+ ld a, [wBattleMode]
and a
jr z, StatsScreenInit
jr _MobileStatsScreenInit
@@ -33,7 +33,7 @@ StatsScreenInit_gotaddress: ; 4dc94
call ClearBGPalettes
call ClearTileMap
call UpdateSprites
- callba StatsScreen_LoadFont
+ farcall StatsScreen_LoadFont
pop hl
call _hl_
call ClearBGPalettes
@@ -83,13 +83,13 @@ StatsScreenMobile: ; 4dcf7
or $1
ld [wcf64], a
.loop
- callba Mobile_SetOverworldDelay
+ farcall Mobile_SetOverworldDelay
ld a, [wJumptableIndex]
and $7f
ld hl, StatsScreenPointerTable
rst JumpTable
call StatsScreen_WaitAnim
- callba MobileComms_CheckInactivityTimer
+ farcall MobileComms_CheckInactivityTimer
jr c, .exit
ld a, [wJumptableIndex]
bit 7, a
@@ -121,14 +121,14 @@ StatsScreen_WaitAnim: ; 4dd3a (13:5d3a)
ret
.try_anim
- callba SetUpPokeAnim
+ farcall SetUpPokeAnim
jr nc, .finish
ld hl, wcf64
res 6, [hl]
.finish
ld hl, wcf64
res 5, [hl]
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
ret
StatsScreen_SetJumptableIndex: ; 4dd62 (13:5d62)
@@ -148,7 +148,7 @@ MonStatsInit: ; 4dd72 (13:5d72)
res 6, [hl]
call ClearBGPalettes
call ClearTileMap
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
call StatsScreen_CopyToTempMon
ld a, [CurPartySpecies]
cp EGG
@@ -234,14 +234,14 @@ StatsScreen_CopyToTempMon: ; 4ddf2 (13:5df2)
jr .done
.breedmon
- callba CopyPkmnToTempMon
+ farcall CopyPkmnToTempMon
ld a, [CurPartySpecies]
cp EGG
jr z, .done
ld a, [MonType]
cp BOXMON
jr c, .done
- callba CalcTempmonStats
+ farcall CalcTempmonStats
.done
and a
ret
@@ -254,7 +254,7 @@ StatsScreen_GetJoypad: ; 4de2c (13:5e2c)
push hl
push de
push bc
- callba StatsScreenDPad
+ farcall StatsScreenDPad
pop bc
pop de
pop hl
@@ -377,7 +377,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
call .PlaceHPBar
xor a
ld [hBGMapMode], a
- ld a, [CurBaseData] ; wd236 (aliases: BaseDexNo)
+ ld a, [BaseDexNo]
ld [wd265], a
ld [CurSpecies], a
hlcoord 8, 0
@@ -401,7 +401,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
hlcoord 9, 4
ld a, "/"
ld [hli], a
- ld a, [CurBaseData] ; wd236 (aliases: BaseDexNo)
+ ld a, [BaseDexNo]
ld [wd265], a
call GetPokemonName
call PlaceString
@@ -419,8 +419,8 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
ld a, [hli]
ld d, a
ld e, [hl]
- callba ComputeHPBarPixels
- ld hl, wcda1
+ farcall ComputeHPBarPixels
+ ld hl, wCurHPPal
call SetHPPal
ld b, SCGB_STATS_SCREEN_HP_PALS
call GetSGBLayout
@@ -429,7 +429,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea)
.PlaceGenderChar: ; 4df66 (13:5f66)
push hl
- callba GetGender
+ farcall GetGender
pop hl
ret c
ld a, "♂"
@@ -453,7 +453,7 @@ Function4df7f: ; 4df7f
ld bc, SCREEN_WIDTH
ld d, SCREEN_HEIGHT
.loop
- ld a, $31
+ ld a, "|"
ld [hl], a
add hl, bc
dec d
@@ -480,14 +480,14 @@ StatsScreen_PlacePageSwitchArrows: ; 4df9b (13:5f9b)
StatsScreen_PlaceShinyIcon: ; 4dfa6 (13:5fa6)
ld bc, TempMonDVs
- callba CheckShininess
+ farcall CheckShininess
ret nc
hlcoord 19, 0
ld [hl], "<SHINY>"
ret
StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
- ld a, [BaseDexNo] ; wd236 (aliases: BaseDexNo)
+ ld a, [BaseDexNo]
ld [wd265], a
ld [CurSpecies], a
xor a
@@ -519,7 +519,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
ld a, [wcf64]
and $3
ld c, a
- callba LoadStatsScreenPals
+ farcall LoadStatsScreenPals
call DelayFrame
ld hl, wcf64
set 5, [hl]
@@ -583,7 +583,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
hlcoord 9, 8
ld de, SCREEN_WIDTH
ld b, 10
- ld a, $31
+ ld a, "|"
.vertical_divider
ld [hl], a
add hl, de
@@ -601,7 +601,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
call .CalcExpToNextLevel
hlcoord 13, 13
lb bc, 3, 7
- ld de, Buffer1 ; wd1ea (aliases: MagikarpLength)
+ ld de, Buffer1
call PrintNum
ld de, .LevelUpStr
hlcoord 10, 12
@@ -639,7 +639,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
jr z, .AlreadyAtMaxLevel
inc a
ld d, a
- callba CalcExpAtLevel
+ farcall CalcExpAtLevel
ld hl, TempMonExp + 2
ld hl, TempMonExp + 2
ld a, [hQuotient + 2]
@@ -649,14 +649,14 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
ld a, [hQuotient + 1]
sbc [hl]
dec hl
- ld [Buffer2], a ; wd1eb (aliases: MovementType)
+ ld [Buffer2], a
ld a, [hQuotient]
sbc [hl]
- ld [Buffer1], a ; wd1ea (aliases: MagikarpLength)
+ ld [Buffer1], a
ret
.AlreadyAtMaxLevel:
- ld hl, Buffer1 ; wd1ea (aliases: MagikarpLength)
+ ld hl, Buffer1
xor a
ld [hli], a
ld [hli], a
@@ -719,7 +719,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
and a
ret z
ld b, a
- callba TimeCapsule_ReplaceTeruSama
+ farcall TimeCapsule_ReplaceTeruSama
ld a, b
ld [wd265], a
call GetItemName
@@ -743,7 +743,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
hlcoord 10, 8
ld de, SCREEN_WIDTH
ld b, 10
- ld a, $31
+ ld a, "|"
.BluePageVerticalDivider:
ld [hl], a
add hl, de
@@ -768,7 +768,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6)
ld hl, .OTNamePointers
call GetNicknamePointer
call CopyNickname
- callba CheckNickErrors
+ farcall CheckNickErrors
hlcoord 2, 13
call PlaceString
ld a, [TempMonCaughtGender]
@@ -866,7 +866,7 @@ StatsScreen_PlaceFrontpic: ; 4e226 (13:6226)
ret c
call StatsScreen_LoadTextBoxSpaceGFX
ld de, VTiles2 tile $00
- predef FrontpicPredef
+ predef GetAnimatedFrontpicPredef
hlcoord 0, 0
ld d, $0
ld e, ANIM_MON_MENU
@@ -891,7 +891,7 @@ StatsScreen_GetAnimationParam: ; 4e2ad (13:62ad)
.PartyMon: ; 4e2bf (13:62bf)
ld a, [CurPartyMon]
- ld hl, PartyMons ; wdcdf (aliases: PartyMon1, PartyMon1Species)
+ ld hl, PartyMon1
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
ld b, h
@@ -918,7 +918,7 @@ StatsScreen_GetAnimationParam: ; 4e2ad (13:62ad)
ret
.Tempmon: ; 4e2ed (13:62ed)
- ld bc, TempMonSpecies ; wd10e (aliases: TempMon)
+ ld bc, TempMonSpecies
jr .CheckEggFaintedFrzSlp ; utterly pointless
.CheckEggFaintedFrzSlp: ; 4e2f2 (13:62f2)
@@ -965,6 +965,7 @@ StatsScreen_LoadTextBoxSpaceGFX: ; 4e307 (13:6307)
ret
; 4e32a (13:632a)
+; unreferenced
Unknown_4e32a: ; 4e32a
; A blank tile?
ds 16
@@ -973,7 +974,7 @@ Unknown_4e32a: ; 4e32a
EggStatsScreen: ; 4e33a
xor a
ld [hBGMapMode], a
- ld hl, wcda1
+ ld hl, wCurHPPal
call SetHPPal
ld b, SCGB_STATS_SCREEN_HP_PALS
call GetSGBLayout
@@ -1013,7 +1014,7 @@ EggStatsScreen: ; 4e33a
call DelayFrame
hlcoord 0, 0
call PrepMonFrontpic
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
call StatsScreen_AnimateEgg
ld a, [TempMonHappiness]
@@ -1071,7 +1072,7 @@ StatsScreen_AnimateEgg: ; 4e497 (13:6497)
ld [wBoxAlignment], a
call StatsScreen_LoadTextBoxSpaceGFX
ld de, VTiles2 tile $00
- predef FrontpicPredef
+ predef GetAnimatedFrontpicPredef
pop de
hlcoord 0, 0
ld d, $0
diff --git a/engine/std_scripts.asm b/engine/std_scripts.asm
index 4b69a4de1..297725c60 100644
--- a/engine/std_scripts.asm
+++ b/engine/std_scripts.asm
@@ -1,5 +1,5 @@
StdScripts::
- dba PokeCenterNurseScript
+ dba PokecenterNurseScript
dba DifficultBookshelfScript
dba PictureBookshelfScript
dba MagazineBookshelfScript
@@ -15,7 +15,7 @@ StdScripts::
dba TrashCanScript
dba StrengthBoulderScript
dba SmashRockScript
- dba PokeCenterSignScript
+ dba PokecenterSignScript
dba MartSignScript
dba GoldenrodRocketsScript
dba RadioTowerRocketsScript
@@ -52,7 +52,7 @@ StdScripts::
dba GameCornerCoinVendorScript
dba HappinessCheckScript
-PokeCenterNurseScript:
+PokecenterNurseScript:
; EVENT_WELCOMED_TO_POKECOM_CENTER is never set
opentext
@@ -236,8 +236,8 @@ StrengthBoulderScript:
SmashRockScript:
farjump AskRockSmashScript
-PokeCenterSignScript:
- farjumptext PokeCenterSignText
+PokecenterSignScript:
+ farjumptext PokecenterSignText
MartSignScript
farjumptext MartSignText
@@ -297,7 +297,7 @@ RadioTowerRocketsScript:
clearevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
setevent EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST
specialphonecall SPECIALCALL_WEIRDBROADCAST
- domaptrigger MAHOGANY_TOWN, $1
+ setmapscene MAHOGANY_TOWN, $1
end
BugContestResultsWarpScript:
@@ -354,8 +354,8 @@ BugContestResults_DidNotLeaveMons
waitbutton
BugContestResults_CleanUp
closetext
- dotrigger $0
- domaptrigger ROUTE_35_NATIONAL_PARK_GATE, $0
+ setscene $0
+ setmapscene ROUTE_35_NATIONAL_PARK_GATE, $0
setevent EVENT_BUG_CATCHING_CONTESTANT_1A
setevent EVENT_BUG_CATCHING_CONTESTANT_2A
setevent EVENT_BUG_CATCHING_CONTESTANT_3A
@@ -497,7 +497,7 @@ InitializeEventsScript:
setevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
setevent EVENT_RIVAL_CHERRYGROVE_CITY
setevent EVENT_RIVAL_AZALEA_TOWN
- setevent EVENT_RIVAL_UNDERGROUND_PATH
+ setevent EVENT_RIVAL_GOLDENROD_UNDERGROUND
setevent EVENT_AZALEA_TOWN_SLOWPOKES
setevent EVENT_KURTS_HOUSE_SLOWPOKE
setevent EVENT_GUIDE_GENT_VISIBLE_IN_CHERRYGROVE
@@ -550,8 +550,8 @@ InitializeEventsScript:
setevent EVENT_ECRUTEAK_POKE_CENTER_BILL
setevent EVENT_MYSTERY_GIFT_DELIVERY_GUY
setevent EVENT_LAKE_OF_RAGE_LANCE
- setevent EVENT_WAREHOUSE_LAYOUT_1
- setevent EVENT_WAREHOUSE_BLOCKED_OFF
+ setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
+ setevent EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF
setevent EVENT_DRAGONS_DEN_CLAIR
setevent EVENT_RIVAL_OLIVINE_CITY
setevent EVENT_RIVAL_VICTORY_ROAD
@@ -1786,7 +1786,7 @@ ReceiveItemScript: ; 0xbcdb9
ReceiveTogepiEggScript: ; 0xbcdc3
waitsfx
farwritetext ReceivedItemText
- playsound SFX_GET_EGG_FROM_DAYCARE_LADY
+ playsound SFX_GET_EGG_FROM_DAY_CARE_LADY
waitsfx
end
; 0xbcdcd
diff --git a/engine/tempmon.asm b/engine/tempmon.asm
new file mode 100644
index 000000000..be989d14b
--- /dev/null
+++ b/engine/tempmon.asm
@@ -0,0 +1,127 @@
+CopyPkmnToTempMon: ; 5084a
+; gets the BaseData of a Pkmn
+; and copys the PkmnStructure to TempMon
+
+ ld a, [CurPartyMon]
+ ld e, a
+ call GetPkmnSpecies
+ ld a, [CurPartySpecies]
+ ld [CurSpecies], a
+ call GetBaseData
+
+ ld a, [MonType]
+ ld hl, PartyMon1Species
+ ld bc, PARTYMON_STRUCT_LENGTH
+ and a
+ jr z, .copywholestruct
+ ld hl, OTPartyMon1Species
+ ld bc, PARTYMON_STRUCT_LENGTH
+ cp OTPARTYMON
+ jr z, .copywholestruct
+ ld bc, BOXMON_STRUCT_LENGTH
+ callfar CopyBoxmonToTempMon
+ jr .done
+
+.copywholestruct
+ ld a, [CurPartyMon]
+ call AddNTimes
+ ld de, TempMon
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call CopyBytes
+
+.done
+ ret
+
+CalcwBufferMonStats: ; 5088b
+ ld bc, wBufferMon
+ jr _TempMonStatsCalculation
+
+CalcTempmonStats: ; 50890
+ ld bc, TempMon
+_TempMonStatsCalculation: ; 50893
+ ld hl, MON_LEVEL
+ add hl, bc
+ ld a, [hl]
+ ld [CurPartyLevel], a
+ ld hl, MON_MAXHP
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld hl, MON_STAT_EXP - 1
+ add hl, bc
+ push bc
+ ld b, $1
+ predef CalcPkmnStats
+ pop bc
+ ld hl, MON_HP
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld a, [CurPartySpecies]
+ cp EGG
+ jr nz, .not_egg
+ xor a
+ ld [de], a
+ inc de
+ ld [de], a
+ jr .zero_status
+
+.not_egg
+ push bc
+ ld hl, MON_MAXHP
+ add hl, bc
+ ld bc, 2
+ call CopyBytes
+ pop bc
+
+.zero_status
+ ld hl, MON_STATUS
+ add hl, bc
+ xor a
+ ld [hli], a
+ ld [hl], a
+ ret
+
+GetPkmnSpecies: ; 508d5
+; [MonType] has the type of the Pkmn
+; e = Nr. of Pkmn (i.e. [CurPartyMon])
+
+ ld a, [MonType]
+ and a ; PARTYMON
+ jr z, .partymon
+ cp OTPARTYMON
+ jr z, .otpartymon
+ cp BOXMON
+ jr z, .boxmon
+ cp TEMPMON
+ jr z, .breedmon
+ ; WILDMON
+
+.partymon
+ ld hl, PartySpecies
+ jr .done
+
+.otpartymon
+ ld hl, OTPartySpecies
+ jr .done
+
+.boxmon
+ ld a, BANK(sBoxSpecies)
+ call GetSRAMBank
+ ld hl, sBoxSpecies
+ call .done
+ call CloseSRAM
+ ret
+
+.breedmon
+ ld a, [wBreedMon1Species]
+ jr .done2
+
+.done
+ ld d, 0
+ add hl, de
+ ld a, [hl]
+
+.done2
+ ld [CurPartySpecies], a
+ ret
diff --git a/engine/tile_events.asm b/engine/tile_events.asm
index 1595d436f..23a7a3c85 100755
--- a/engine/tile_events.asm
+++ b/engine/tile_events.asm
@@ -1,12 +1,12 @@
CheckWarpCollision:: ; 1499a
; Is this tile a warp?
ld a, [PlayerStandingTile]
- cp $60
+ cp COLL_PIT
jr z, .warp
- cp $68
+ cp COLL_PIT_68
jr z, .warp
and $f0
- cp $70
+ cp HI_NYBBLE_WARPS
jr z, .warp
and a
ret
@@ -20,13 +20,13 @@ CheckDirectionalWarp:: ; 149af
; If this is a directional warp, clear carry (press the designated button to warp).
; Else, set carry (immediate warp).
ld a, [PlayerStandingTile]
- cp $70 ; Warp on down
+ cp COLL_WARP_CARPET_DOWN
jr z, .directional
- cp $76 ; Warp on left
+ cp COLL_WARP_CARPET_LEFT
jr z, .directional
- cp $78 ; Warp on up
+ cp COLL_WARP_CARPET_UP
jr z, .directional
- cp $7e ; Warp on right
+ cp COLL_WARP_CARPET_RIGHT
jr z, .directional
scf
ret
@@ -45,15 +45,15 @@ CheckWarpFacingDown: ; 149c6
; 149d3
.blocks ; 149d3
- db $71 ; door
- db $79
- db $7a ; stairs
- db $73
- db $7b ; cave entrance
- db $74
- db $7c ; warp pad
- db $75
- db $7d
+ db COLL_DOOR
+ db COLL_DOOR_79
+ db COLL_STAIRCASE
+ db COLL_STAIRCASE_73
+ db COLL_CAVE
+ db COLL_CAVE_74
+ db COLL_WARP_PANEL
+ db COLL_DOOR_75
+ db COLL_DOOR_7D
db -1
; 149dd
@@ -66,16 +66,16 @@ CheckGrassCollision:: ; 149dd
; 149ea
.blocks ; 149ea
- db $08
- db $18 ; tall grass
- db $14 ; tall grass
- db $28
- db $29
- db $48
- db $49
- db $4a
- db $4b
- db $4c
+ db COLL_CUT_08
+ db COLL_TALL_GRASS
+ db COLL_LONG_GRASS
+ db COLL_CUT_28
+ db COLL_WATER
+ db COLL_GRASS_48
+ db COLL_GRASS_49
+ db COLL_GRASS_4A
+ db COLL_GRASS_4B
+ db COLL_GRASS_4C
db -1
; 149f5
@@ -88,22 +88,22 @@ CheckCutCollision: ; 149f5
; 14a00
.blocks ; 14a00
- db $12 ; cut tree
- db $1a ; cut tree
- db $10 ; tall grass
- db $18 ; tall grass
- db $14 ; tall grass
- db $1c ; tall grass
+ db COLL_CUT_TREE
+ db COLL_CUT_TREE_1A
+ db COLL_TALL_GRASS_10
+ db COLL_TALL_GRASS
+ db COLL_LONG_GRASS
+ db COLL_LONG_GRASS_1C
db -1
; 14a07
GetWarpSFX:: ; 14a07
ld a, [PlayerStandingTile]
ld de, SFX_ENTER_DOOR
- cp $71 ; door
+ cp COLL_DOOR
ret z
ld de, SFX_WARP_TO
- cp $7c ; warp pad
+ cp COLL_WARP_PANEL
ret z
ld de, SFX_EXIT_BUILDING
ret
diff --git a/engine/time.asm b/engine/time.asm
index 296cc335d..61ef614c3 100755
--- a/engine/time.asm
+++ b/engine/time.asm
@@ -200,7 +200,7 @@ CheckPokerusTick:: ; 114e7
and a
jr z, .done ; not even a day has passed since game start
ld b, a
- callba ApplyPokerusTick
+ farcall ApplyPokerusTick
.done
xor a
ret
@@ -282,7 +282,7 @@ DoMysteryGiftIfDayHasPassed: ; 11548
ld hl, Buffer1
call InitOneDayCountdown
call CloseSRAM
- callba Function1050c8
+ farcall Function1050c8
.not_timed_out
ld a, BANK(sMysteryGiftTimer)
diff --git a/engine/time_capsule.asm b/engine/time_capsule.asm
new file mode 100755
index 000000000..577b2dce8
--- /dev/null
+++ b/engine/time_capsule.asm
@@ -0,0 +1,147 @@
+; These functions seem to be related to backwards compatibility
+
+ValidateOTTrademon: ; fb57e
+ ld a, [wd003]
+ ld hl, OTPartyMon1Species
+ call GetPartyLocation
+ push hl
+ ld a, [wd003]
+ inc a
+ ld c, a
+ ld b, 0
+ ld hl, OTPartyCount
+ add hl, bc
+ ld a, [hl]
+ pop hl
+ cp EGG
+ jr z, .matching_or_egg
+ cp [hl]
+ jr nz, .abnormal
+
+.matching_or_egg
+ ld b, h
+ ld c, l
+ ld hl, MON_LEVEL
+ add hl, bc
+ ld a, [hl]
+ cp MAX_LEVEL + 1
+ jr nc, .abnormal
+ ld a, [wLinkMode]
+ cp LINK_TIMECAPSULE
+ jr nz, .normal
+ ld hl, OTPartySpecies
+ ld a, [wd003]
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hl]
+
+ ; Magnemite and Magneton's types changed
+ ; from Electric to Electric/Steel.
+ cp MAGNEMITE
+ jr z, .normal
+ cp MAGNETON
+ jr z, .normal
+
+ ld [CurSpecies], a
+ call GetBaseData
+ ld hl, wLinkOTPartyMonTypes
+ add hl, bc
+ add hl, bc
+ ld a, [BaseType1]
+ cp [hl]
+ jr nz, .abnormal
+ inc hl
+ ld a, [BaseType2]
+ cp [hl]
+ jr nz, .abnormal
+
+.normal
+ and a
+ ret
+
+.abnormal
+ scf
+ ret
+; fb5dd
+
+Functionfb5dd: ; fb5dd
+ ld a, [wd002]
+ ld d, a
+ ld a, [PartyCount]
+ ld b, a
+ ld c, $0
+.loop
+ ld a, c
+ cp d
+ jr z, .next
+ push bc
+ ld a, c
+ ld hl, PartyMon1HP
+ call GetPartyLocation
+ pop bc
+ ld a, [hli]
+ or [hl]
+ jr nz, .done
+
+.next
+ inc c
+ dec b
+ jr nz, .loop
+ ld a, [wd003]
+ ld hl, OTPartyMon1HP
+ call GetPartyLocation
+ ld a, [hli]
+ or [hl]
+ jr nz, .done
+ scf
+ ret
+
+.done
+ and a
+ ret
+; fb60d
+
+PlaceTradePartnerNamesAndParty: ; fb60d
+ hlcoord 4, 0
+ ld de, PlayerName
+ call PlaceString
+ ld a, $14
+ ld [bc], a
+ hlcoord 4, 8
+ ld de, OTPlayerName
+ call PlaceString
+ ld a, $14
+ ld [bc], a
+ hlcoord 7, 1
+ ld de, PartySpecies
+ call .PlaceSpeciesNames
+ hlcoord 7, 9
+ ld de, OTPartySpecies
+.PlaceSpeciesNames: ; fb634
+ ld c, $0
+.loop
+ ld a, [de]
+ cp -1
+ ret z
+ ld [wd265], a
+ push bc
+ push hl
+ push de
+ push hl
+ ld a, c
+ ld [hProduct], a
+ call GetPokemonName
+ pop hl
+ call PlaceString
+ pop de
+ inc de
+ pop hl
+ ld bc, SCREEN_WIDTH
+ add hl, bc
+ pop bc
+ inc c
+ jr .loop
+; fb656
+
+INCLUDE "data/time_capsule/special_stats.asm"
diff --git a/engine/time_capsule/conversion.asm b/engine/time_capsule/conversion.asm
deleted file mode 100755
index 561721074..000000000
--- a/engine/time_capsule/conversion.asm
+++ /dev/null
@@ -1,682 +0,0 @@
-; These functions seem to be related to backwards compatibility
-
-ValidateOTTrademon: ; fb57e
- ld a, [wd003]
- ld hl, OTPartyMon1Species
- call GetPartyLocation
- push hl
- ld a, [wd003]
- inc a
- ld c, a
- ld b, 0
- ld hl, OTPartyCount
- add hl, bc
- ld a, [hl]
- pop hl
- cp EGG
- jr z, .matching_or_egg
- cp [hl]
- jr nz, .abnormal
-
-.matching_or_egg
- ld b, h
- ld c, l
- ld hl, MON_LEVEL
- add hl, bc
- ld a, [hl]
- cp MAX_LEVEL + 1
- jr nc, .abnormal
- ld a, [wLinkMode]
- cp LINK_TIMECAPSULE
- jr nz, .normal
- ld hl, OTPartySpecies
- ld a, [wd003]
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [hl]
-
- ; Magnemite and Magneton's types changed
- ; from Electric to Electric/Steel.
- cp MAGNEMITE
- jr z, .normal
- cp MAGNETON
- jr z, .normal
-
- ld [CurSpecies], a
- call GetBaseData
- ld hl, wLinkOTPartyMonTypes
- add hl, bc
- add hl, bc
- ld a, [BaseType1]
- cp [hl]
- jr nz, .abnormal
- inc hl
- ld a, [BaseType2]
- cp [hl]
- jr nz, .abnormal
-
-.normal
- and a
- ret
-
-.abnormal
- scf
- ret
-; fb5dd
-
-Functionfb5dd: ; fb5dd
- ld a, [wd002]
- ld d, a
- ld a, [PartyCount]
- ld b, a
- ld c, $0
-.loop
- ld a, c
- cp d
- jr z, .next
- push bc
- ld a, c
- ld hl, PartyMon1HP
- call GetPartyLocation
- pop bc
- ld a, [hli]
- or [hl]
- jr nz, .done
-
-.next
- inc c
- dec b
- jr nz, .loop
- ld a, [wd003]
- ld hl, OTPartyMon1HP
- call GetPartyLocation
- ld a, [hli]
- or [hl]
- jr nz, .done
- scf
- ret
-
-.done
- and a
- ret
-; fb60d
-
-PlaceTradePartnerNamesAndParty: ; fb60d
- hlcoord 4, 0
- ld de, PlayerName
- call PlaceString
- ld a, $14
- ld [bc], a
- hlcoord 4, 8
- ld de, OTPlayerName
- call PlaceString
- ld a, $14
- ld [bc], a
- hlcoord 7, 1
- ld de, PartySpecies
- call .PlaceSpeciesNames
- hlcoord 7, 9
- ld de, OTPartySpecies
-.PlaceSpeciesNames: ; fb634
- ld c, $0
-.loop
- ld a, [de]
- cp -1
- ret z
- ld [wd265], a
- push bc
- push hl
- push de
- push hl
- ld a, c
- ld [hProduct], a
- call GetPokemonName
- pop hl
- call PlaceString
- pop de
- inc de
- pop hl
- ld bc, SCREEN_WIDTH
- add hl, bc
- pop bc
- inc c
- jr .loop
-; fb656
-
-KantoMonSpecials: ; fb656
-; The original special base stat for
-; each Kanto monster from Red/Blue.
- db 65 ; BULBASAUR
- db 80 ; IVYSAUR
- db 100 ; VENUSAUR
- db 50 ; CHARMANDER
- db 65 ; CHARMELEON
- db 85 ; CHARIZARD
- db 50 ; SQUIRTLE
- db 65 ; WARTORTLE
- db 85 ; BLASTOISE
- db 20 ; CATERPIE
- db 25 ; METAPOD
- db 80 ; BUTTERFREE
- db 20 ; WEEDLE
- db 25 ; KAKUNA
- db 45 ; BEEDRILL
- db 35 ; PIDGEY
- db 50 ; PIDGEOTTO
- db 70 ; PIDGEOT
- db 25 ; RATTATA
- db 50 ; RATICATE
- db 31 ; SPEAROW
- db 61 ; FEAROW
- db 40 ; EKANS
- db 65 ; ARBOK
- db 50 ; PIKACHU
- db 90 ; RAICHU
- db 30 ; SANDSHREW
- db 55 ; SANDSLASH
- db 40 ; NIDORAN_F
- db 55 ; NIDORINA
- db 75 ; NIDOQUEEN
- db 40 ; NIDORAN_M
- db 55 ; NIDORINO
- db 75 ; NIDOKING
- db 60 ; CLEFAIRY
- db 85 ; CLEFABLE
- db 65 ; VULPIX
- db 100 ; NINETALES
- db 25 ; JIGGLYPUFF
- db 50 ; WIGGLYTUFF
- db 40 ; ZUBAT
- db 75 ; GOLBAT
- db 75 ; ODDISH
- db 85 ; GLOOM
- db 100 ; VILEPLUME
- db 55 ; PARAS
- db 80 ; PARASECT
- db 40 ; VENONAT
- db 90 ; VENOMOTH
- db 45 ; DIGLETT
- db 70 ; DUGTRIO
- db 40 ; MEOWTH
- db 65 ; PERSIAN
- db 50 ; PSYDUCK
- db 80 ; GOLDUCK
- db 35 ; MANKEY
- db 60 ; PRIMEAPE
- db 50 ; GROWLITHE
- db 80 ; ARCANINE
- db 40 ; POLIWAG
- db 50 ; POLIWHIRL
- db 70 ; POLIWRATH
- db 105 ; ABRA
- db 120 ; KADABRA
- db 135 ; ALAKAZAM
- db 35 ; MACHOP
- db 50 ; MACHOKE
- db 65 ; MACHAMP
- db 70 ; BELLSPROUT
- db 85 ; WEEPINBELL
- db 100 ; VICTREEBEL
- db 100 ; TENTACOOL
- db 120 ; TENTACRUEL
- db 30 ; GEODUDE
- db 45 ; GRAVELER
- db 55 ; GOLEM
- db 65 ; PONYTA
- db 80 ; RAPIDASH
- db 40 ; SLOWPOKE
- db 80 ; SLOWBRO
- db 95 ; MAGNEMITE
- db 120 ; MAGNETON
- db 58 ; FARFETCH_D
- db 35 ; DODUO
- db 60 ; DODRIO
- db 70 ; SEEL
- db 95 ; DEWGONG
- db 40 ; GRIMER
- db 65 ; MUK
- db 45 ; SHELLDER
- db 85 ; CLOYSTER
- db 100 ; GASTLY
- db 115 ; HAUNTER
- db 130 ; GENGAR
- db 30 ; ONIX
- db 90 ; DROWZEE
- db 115 ; HYPNO
- db 25 ; KRABBY
- db 50 ; KINGLER
- db 55 ; VOLTORB
- db 80 ; ELECTRODE
- db 60 ; EXEGGCUTE
- db 125 ; EXEGGUTOR
- db 40 ; CUBONE
- db 50 ; MAROWAK
- db 35 ; HITMONLEE
- db 35 ; HITMONCHAN
- db 60 ; LICKITUNG
- db 60 ; KOFFING
- db 85 ; WEEZING
- db 30 ; RHYHORN
- db 45 ; RHYDON
- db 105 ; CHANSEY
- db 100 ; TANGELA
- db 40 ; KANGASKHAN
- db 70 ; HORSEA
- db 95 ; SEADRA
- db 50 ; GOLDEEN
- db 80 ; SEAKING
- db 70 ; STARYU
- db 100 ; STARMIE
- db 100 ; MR__MIME
- db 55 ; SCYTHER
- db 95 ; JYNX
- db 85 ; ELECTABUZZ
- db 85 ; MAGMAR
- db 55 ; PINSIR
- db 70 ; TAUROS
- db 20 ; MAGIKARP
- db 100 ; GYARADOS
- db 95 ; LAPRAS
- db 48 ; DITTO
- db 65 ; EEVEE
- db 110 ; VAPOREON
- db 110 ; JOLTEON
- db 110 ; FLAREON
- db 75 ; PORYGON
- db 90 ; OMANYTE
- db 115 ; OMASTAR
- db 45 ; KABUTO
- db 70 ; KABUTOPS
- db 60 ; AERODACTYL
- db 65 ; SNORLAX
- db 125 ; ARTICUNO
- db 125 ; ZAPDOS
- db 125 ; MOLTRES
- db 50 ; DRATINI
- db 70 ; DRAGONAIR
- db 100 ; DRAGONITE
- db 154 ; MEWTWO
- db 100 ; MEW
-; fb6ed
-
-
-INCLUDE "event/name_rater.asm"
-
-
-PlaySlowCry: ; fb841
- ld a, [ScriptVar]
- call LoadCryHeader
- jr c, .done
-
- ld hl, CryPitch
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld bc, -$140
- add hl, bc
- ld a, l
- ld [CryPitch], a
- ld a, h
- ld [CryPitch + 1], a
- ld hl, CryLength
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld bc, $60
- add hl, bc
- ld a, l
- ld [CryLength], a
- ld a, h
- ld [CryLength + 1], a
- callba _PlayCryHeader
- call WaitSFX
-
-.done
- ret
-; fb877
-
-NewPokedexEntry: ; fb877
- ld a, [hMapAnims]
- push af
- xor a
- ld [hMapAnims], a
- call LowVolume
- call ClearBGPalettes
- call ClearTileMap
- call UpdateSprites
- call ClearSprites
- ld a, [wPokedexStatus]
- push af
- ld a, [hSCX]
- add $5
- ld [hSCX], a
- xor a
- ld [wPokedexStatus], a
- callba _NewPokedexEntry
- call WaitPressAorB_BlinkCursor
- ld a, $1
- ld [wPokedexStatus], a
- callba DisplayDexEntry
- call WaitPressAorB_BlinkCursor
- pop af
- ld [wPokedexStatus], a
- call MaxVolume
- call RotateThreePalettesRight
- ld a, [hSCX]
- add -5 ; 251 ; NUM_POKEMON
- ld [hSCX], a
- call .ReturnFromDexRegistration
- pop af
- ld [hMapAnims], a
- ret
-; fb8c8
-
-.ReturnFromDexRegistration: ; fb8c8
- call ClearTileMap
- call LoadFontsExtra
- call LoadStandardFont
- callba Pokedex_PlaceFrontpicTopLeftCorner
- call WaitBGMap2
- callba GetEnemyMonDVs
- ld a, [hli]
- ld [TempMonDVs], a
- ld a, [hl]
- ld [TempMonDVs + 1], a
- ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
- call GetSGBLayout
- call SetPalettes
- ret
-; fb8f1
-
-ConvertMon_2to1: ; fb8f1
-; Takes the Gen-2 Pokemon number stored in wd265, finds it in the Pokered_MonIndices table, and returns its index in wd265.
- push bc
- push hl
- ld a, [wd265]
- ld b, a
- ld c, 0
- ld hl, Pokered_MonIndices
-.loop
- inc c
- ld a, [hli]
- cp b
- jr nz, .loop
- ld a, c
- ld [wd265], a
- pop hl
- pop bc
- ret
-; fb908
-
-ConvertMon_1to2: ; fb908
-; Takes the Gen-1 Pokemon number stored in wd265 and returns the corresponding value from Pokered_MonIndices in wd265.
- push bc
- push hl
- ld a, [wd265]
- dec a
- ld hl, Pokered_MonIndices
- ld b, 0
- ld c, a
- add hl, bc
- ld a, [hl]
- ld [wd265], a
- pop hl
- pop bc
- ret
-; fb91c
-
-Pokered_MonIndices: ; fb91c
- db RHYDON
- db KANGASKHAN
- db NIDORAN_M
- db CLEFAIRY
- db SPEAROW
- db VOLTORB
- db NIDOKING
- db SLOWBRO
- db IVYSAUR
- db EXEGGUTOR
- db LICKITUNG
- db EXEGGCUTE
- db GRIMER
- db GENGAR
- db NIDORAN_F
- db NIDOQUEEN
- db CUBONE
- db RHYHORN
- db LAPRAS
- db ARCANINE
- db MEW
- db GYARADOS
- db SHELLDER
- db TENTACOOL
- db GASTLY
- db SCYTHER
- db STARYU
- db BLASTOISE
- db PINSIR
- db TANGELA
- db SCIZOR
- db SHUCKLE
- db GROWLITHE
- db ONIX
- db FEAROW
- db PIDGEY
- db SLOWPOKE
- db KADABRA
- db GRAVELER
- db CHANSEY
- db MACHOKE
- db MR__MIME
- db HITMONLEE
- db HITMONCHAN
- db ARBOK
- db PARASECT
- db PSYDUCK
- db DROWZEE
- db GOLEM
- db HERACROSS
- db MAGMAR
- db HO_OH
- db ELECTABUZZ
- db MAGNETON
- db KOFFING
- db SNEASEL
- db MANKEY
- db SEEL
- db DIGLETT
- db TAUROS
- db TEDDIURSA
- db URSARING
- db SLUGMA
- db FARFETCH_D
- db VENONAT
- db DRAGONITE
- db MAGCARGO
- db SWINUB
- db PILOSWINE
- db DODUO
- db POLIWAG
- db JYNX
- db MOLTRES
- db ARTICUNO
- db ZAPDOS
- db DITTO
- db MEOWTH
- db KRABBY
- db CORSOLA
- db REMORAID
- db OCTILLERY
- db VULPIX
- db NINETALES
- db PIKACHU
- db RAICHU
- db DELIBIRD
- db MANTINE
- db DRATINI
- db DRAGONAIR
- db KABUTO
- db KABUTOPS
- db HORSEA
- db SEADRA
- db SKARMORY
- db HOUNDOUR
- db SANDSHREW
- db SANDSLASH
- db OMANYTE
- db OMASTAR
- db JIGGLYPUFF
- db WIGGLYTUFF
- db EEVEE
- db FLAREON
- db JOLTEON
- db VAPOREON
- db MACHOP
- db ZUBAT
- db EKANS
- db PARAS
- db POLIWHIRL
- db POLIWRATH
- db WEEDLE
- db KAKUNA
- db BEEDRILL
- db HOUNDOOM
- db DODRIO
- db PRIMEAPE
- db DUGTRIO
- db VENOMOTH
- db DEWGONG
- db KINGDRA
- db PHANPY
- db CATERPIE
- db METAPOD
- db BUTTERFREE
- db MACHAMP
- db DONPHAN
- db GOLDUCK
- db HYPNO
- db GOLBAT
- db MEWTWO
- db SNORLAX
- db MAGIKARP
- db PORYGON2
- db STANTLER
- db MUK
- db SMEARGLE
- db KINGLER
- db CLOYSTER
- db TYROGUE
- db ELECTRODE
- db CLEFABLE
- db WEEZING
- db PERSIAN
- db MAROWAK
- db HITMONTOP
- db HAUNTER
- db ABRA
- db ALAKAZAM
- db PIDGEOTTO
- db PIDGEOT
- db STARMIE
- db BULBASAUR
- db VENUSAUR
- db TENTACRUEL
- db SMOOCHUM
- db GOLDEEN
- db SEAKING
- db ELEKID
- db MAGBY
- db MILTANK
- db BLISSEY
- db PONYTA
- db RAPIDASH
- db RATTATA
- db RATICATE
- db NIDORINO
- db NIDORINA
- db GEODUDE
- db PORYGON
- db AERODACTYL
- db RAIKOU
- db MAGNEMITE
- db ENTEI
- db SUICUNE
- db CHARMANDER
- db SQUIRTLE
- db CHARMELEON
- db WARTORTLE
- db CHARIZARD
- db LARVITAR
- db PUPITAR
- db TYRANITAR
- db LUGIA
- db ODDISH
- db GLOOM
- db VILEPLUME
- db BELLSPROUT
- db WEEPINBELL
- db VICTREEBEL
- db CHIKORITA
- db BAYLEEF
- db MEGANIUM
- db CYNDAQUIL
- db QUILAVA
- db TYPHLOSION
- db TOTODILE
- db CROCONAW
- db FERALIGATR
- db SENTRET
- db FURRET
- db HOOTHOOT
- db NOCTOWL
- db LEDYBA
- db LEDIAN
- db SPINARAK
- db ARIADOS
- db CROBAT
- db CHINCHOU
- db LANTURN
- db PICHU
- db CLEFFA
- db IGGLYBUFF
- db TOGEPI
- db TOGETIC
- db NATU
- db XATU
- db MAREEP
- db FLAAFFY
- db AMPHAROS
- db BELLOSSOM
- db MARILL
- db AZUMARILL
- db SUDOWOODO
- db POLITOED
- db HOPPIP
- db SKIPLOOM
- db JUMPLUFF
- db AIPOM
- db SUNKERN
- db SUNFLORA
- db YANMA
- db WOOPER
- db QUAGSIRE
- db ESPEON
- db UMBREON
- db MURKROW
- db SLOWKING
- db MISDREAVUS
- db UNOWN
- db WOBBUFFET
- db GIRAFARIG
- db PINECO
- db FORRETRESS
- db DUNSPARCE
- db GLIGAR
- db STEELIX
- db SNUBBULL
- db GRANBULL
- db QWILFISH
- db WOBBUFFET
- db WOBBUFFET
-; fba18
diff --git a/engine/time_capsule_2.asm b/engine/time_capsule_2.asm
new file mode 100644
index 000000000..5da72e7c8
--- /dev/null
+++ b/engine/time_capsule_2.asm
@@ -0,0 +1,39 @@
+ConvertMon_2to1: ; fb8f1
+; Takes the Gen-2 Pokemon number stored in wd265, finds it in the Pokered_MonIndices table, and returns its index in wd265.
+ push bc
+ push hl
+ ld a, [wd265]
+ ld b, a
+ ld c, 0
+ ld hl, Pokered_MonIndices
+.loop
+ inc c
+ ld a, [hli]
+ cp b
+ jr nz, .loop
+ ld a, c
+ ld [wd265], a
+ pop hl
+ pop bc
+ ret
+; fb908
+
+ConvertMon_1to2: ; fb908
+; Takes the Gen-1 Pokemon number stored in wd265 and returns the corresponding value from Pokered_MonIndices in wd265.
+ push bc
+ push hl
+ ld a, [wd265]
+ dec a
+ ld hl, Pokered_MonIndices
+ ld b, 0
+ ld c, a
+ add hl, bc
+ ld a, [hl]
+ ld [wd265], a
+ pop hl
+ pop bc
+ ret
+; fb91c
+
+
+INCLUDE "data/time_capsule/mon_order.asm"
diff --git a/engine/timeofdaypals.asm b/engine/timeofdaypals.asm
index 263a83fc1..a4a07bc4d 100644
--- a/engine/timeofdaypals.asm
+++ b/engine/timeofdaypals.asm
@@ -1,3 +1,7 @@
+Predef35: ; 8c000
+Predef36:
+ ret
+
UpdateTimeOfDayPal:: ; 8c001
call UpdateTime
ld a, [TimeOfDay]
@@ -196,10 +200,6 @@ endr
ret
; 8c0e5
-brightlevel: MACRO
- db (\1 << 6) | (\2 << 4) | (\3 << 2) | \4
-ENDM
-
ReplaceTimeOfDayPals: ; 8c0e5
ld hl, .BrightnessLevels
ld a, [wMapTimeOfDay]
@@ -230,14 +230,14 @@ ReplaceTimeOfDayPals: ; 8c0e5
; 8c10f (23:410f)
.BrightnessLevels: ; 8c10f
- brightlevel 3, 2, 1, 0
- brightlevel 1, 1, 1, 1
- brightlevel 2, 2, 2, 2
- brightlevel 0, 0, 0, 0
- brightlevel 3, 3, 3, 3
- brightlevel 3, 2, 1, 0
- brightlevel 3, 2, 1, 0
- brightlevel 3, 2, 1, 0
+ dc 3, 2, 1, 0
+ dc 1, 1, 1, 1
+ dc 2, 2, 2, 2
+ dc 0, 0, 0, 0
+ dc 3, 3, 3, 3
+ dc 3, 2, 1, 0
+ dc 3, 2, 1, 0
+ dc 3, 2, 1, 0
; 8c117
GetTimePalette: ; 8c117
diff --git a/engine/timeset.asm b/engine/timeset.asm
index d560ae817..417517005 100755
--- a/engine/timeset.asm
+++ b/engine/timeset.asm
@@ -10,9 +10,9 @@ InitClock: ; 90672 (24:4672)
ld a, $10
ld [MusicFade], a
ld a, MUSIC_NONE % $100
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, MUSIC_NONE / $100
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ld c, 8
call DelayFrames
call RotateFourPalettesLeft
@@ -23,28 +23,28 @@ InitClock: ; 90672 (24:4672)
xor a
ld [hBGMapMode], a
call LoadStandardFont
- ld de, GFX_908fb
+ ld de, TimeSetBackgroundGFX
ld hl, VTiles2 tile $00
- lb bc, BANK(GFX_908fb), 1
+ lb bc, BANK(TimeSetBackgroundGFX), 1
call Request1bpp
- ld de, GFX_90903
+ ld de, TimeSetUpArrowGFX
ld hl, VTiles2 tile $01
- lb bc, BANK(GFX_90903), 1
+ lb bc, BANK(TimeSetUpArrowGFX), 1
call Request1bpp
- ld de, GFX_9090b
+ ld de, TimeSetDownArrowGFX
ld hl, VTiles2 tile $02
- lb bc, BANK(GFX_9090b), 1
+ lb bc, BANK(TimeSetDownArrowGFX), 1
call Request1bpp
call .ClearScreen
call WaitBGMap
call RotateFourPalettesRight
ld hl, Text_WokeUpOak
call PrintText
- ld hl, wc608
+ ld hl, wTimeSetBuffer
ld bc, 50
xor a
call ByteFill
- ld a, $a
+ ld a, 10 ; default hour = 10 AM
ld [wInitHourBuffer], a
.loop
@@ -98,7 +98,7 @@ InitClock: ; 90672 (24:4672)
call SetMinutes
jr nc, .SetMinutesLoop
- ld a, [BattleMonNick + 5]
+ ld a, [wInitMinuteBuffer]
ld [StringBuffer2 + 2], a
call .ClearScreen
ld hl, Text_WhoaMins
@@ -237,7 +237,7 @@ SetMinutes: ; 90810 (24:4810)
ret
.d_down
- ld hl, BattleMonNick + 5
+ ld hl, wInitMinuteBuffer
ld a, [hl]
and a
jr nz, .decrease
@@ -248,7 +248,7 @@ SetMinutes: ; 90810 (24:4810)
jr .finish_dpad
.d_up
- ld hl, BattleMonNick + 5
+ ld hl, wInitMinuteBuffer
ld a, [hl]
cp 59
jr c, .increase
@@ -271,7 +271,7 @@ SetMinutes: ; 90810 (24:4810)
ret
DisplayMinutesWithMinString: ; 90859 (24:4859)
- ld de, BattleMonNick + 5
+ ld de, wInitMinuteBuffer
call PrintTwoDigitNumberRightAlign
inc hl
ld de, String_min
@@ -355,25 +355,25 @@ OakText_ResponseToSetTime: ; 0x908b8
call PrintHour
ld [hl], ":"
inc hl
- ld de, BattleMonNick + 5
+ ld de, wInitMinuteBuffer
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
call PrintNum
ld b, h
ld c, l
ld a, [wInitHourBuffer]
- cp 4
- jr c, .NITE
- cp 11
- jr c, .MORN
- cp 18
- jr c, .DAY
-.NITE:
+ cp MORN_HOUR
+ jr c, .nite
+ cp DAY_HOUR + 1
+ jr c, .morn
+ cp NITE_HOUR
+ jr c, .day
+.nite:
ld hl, .sodark
ret
-.MORN:
+.morn:
ld hl, .overslept
ret
-.DAY:
+.day:
ld hl, .yikes
ret
; 908ec (24:48ec)
@@ -396,12 +396,12 @@ OakText_ResponseToSetTime: ; 0x908b8
db "@"
; 0x908fb
-GFX_908fb: ; 908fb
-INCBIN "gfx/unknown/0908fb.1bpp"
-GFX_90903: ; 90903
-INCBIN "gfx/unknown/090903.1bpp"
-GFX_9090b: ; 9090b
-INCBIN "gfx/unknown/09090b.1bpp"
+TimeSetBackgroundGFX: ; 908fb
+INCBIN "gfx/timeset/background.1bpp"
+TimeSetUpArrowGFX: ; 90903
+INCBIN "gfx/timeset/up_arrow.1bpp"
+TimeSetDownArrowGFX: ; 9090b
+INCBIN "gfx/timeset/down_arrow.1bpp"
; 90913
Special_SetDayOfWeek: ; 90913
@@ -409,13 +409,13 @@ Special_SetDayOfWeek: ; 90913
push af
ld a, $1
ld [hInMenu], a
- ld de, GFX_90903
+ ld de, TimeSetUpArrowGFX
ld hl, VTiles1 tile $6f
- lb bc, BANK(GFX_90903), 1
+ lb bc, BANK(TimeSetUpArrowGFX), 1
call Request1bpp
- ld de, GFX_9090b
+ ld de, TimeSetDownArrowGFX
ld hl, VTiles1 tile $75
- lb bc, BANK(GFX_9090b), 1
+ lb bc, BANK(TimeSetDownArrowGFX), 1
call Request1bpp
xor a
ld [wTempDayOfWeek], a
@@ -482,7 +482,7 @@ Special_SetDayOfWeek: ; 90913
ld a, [hl]
and a
jr nz, .decrease
- ld a, 6 + 1
+ ld a, SATURDAY + 1
.decrease
dec a
@@ -494,7 +494,7 @@ Special_SetDayOfWeek: ; 90913
ld a, [hl]
cp 6
jr c, .increase
- ld a, 0 - 1
+ ld a, SUNDAY - 1
.increase
inc a
@@ -531,6 +531,7 @@ Special_SetDayOfWeek: ; 90913
; 909f2
.WeekdayStrings: ; 909f2
+; entries correspond to CurDay constants (see constants/wram_constants.asm)
dw .Sunday
dw .Monday
dw .Tuesday
@@ -589,7 +590,7 @@ Special_InitialSetDSTFlag: ; 90a54
ld a, [hMinutes]
ld c, a
decoord 1, 14
- callba PrintHoursMins
+ farcall PrintHoursMins
ld hl, .DSTIsThatOK
ret
; 90a83 (24:4a83)
@@ -620,7 +621,7 @@ Special_InitialClearDSTFlag: ; 90a88
ld a, [hMinutes]
ld c, a
decoord 1, 14
- callba PrintHoursMins
+ farcall PrintHoursMins
ld hl, .IsThatOK
ret
; 90ab7
@@ -731,26 +732,26 @@ PrintHour: ; 90b3e (24:4b3e)
GetTimeOfDayString: ; 90b58 (24:4b58)
ld a, c
- cp 4
+ cp MORN_HOUR
jr c, .nite
- cp 10
+ cp DAY_HOUR
jr c, .morn
- cp 18
+ cp NITE_HOUR
jr c, .day
.nite
- ld de, .NITE
+ ld de, .nite_string
ret
.morn
- ld de, .MORN
+ ld de, .morn_string
ret
.day
- ld de, .DAY
+ ld de, .day_string
ret
; 90b71 (24:4b71)
-.NITE: db "NITE@"
-.MORN: db "MORN@"
-.DAY: db "DAY@"
+.nite_string: db "NITE@"
+.morn_string: db "MORN@"
+.day_string: db "DAY@"
; 90b7f
AdjustHourForAMorPM:
@@ -758,12 +759,12 @@ AdjustHourForAMorPM:
ld a, c
or a
jr z, .midnight
- cp 12
+ cp NOON_HOUR
ret c
ret z
- sub 12
+ sub NOON_HOUR
ret
.midnight
- ld a, 12
+ ld a, NOON_HOUR
ret
diff --git a/engine/title.asm b/engine/title.asm
index 36e2851d3..ba7f34764 100644
--- a/engine/title.asm
+++ b/engine/title.asm
@@ -10,10 +10,10 @@ _TitleScreen: ; 10ed67
; Reset timing variables
ld hl, wJumptableIndex
- ld [hli], a ; cf63 ; Scene?
- ld [hli], a ; cf64
- ld [hli], a ; cf65 ; Timer lo
- ld [hl], a ; cf66 ; Timer hi
+ ld [hli], a ; wJumptableIndex
+ ld [hli], a ; wIntroSceneFrameCounter
+ ld [hli], a ; wTitleScreenTimer
+ ld [hl], a ; wTitleScreenTimer + 1
; Turn LCD off
call DisableLCD
@@ -145,12 +145,12 @@ _TitleScreen: ; 10ed67
; Update palette colors
ld hl, TitleScreenPalettes
ld de, UnknBGPals
- ld bc, 4 * 32
+ ld bc, 16 palettes
call CopyBytes
ld hl, TitleScreenPalettes
ld de, BGPals
- ld bc, 4 * 32
+ ld bc, 16 palettes
call CopyBytes
; Restore WRAM bank
@@ -399,84 +399,4 @@ INCBIN "gfx/title/crystal.2bpp.lz"
; 10fede
TitleScreenPalettes:
-; BG
- RGB 00, 00, 00
- RGB 19, 00, 00
- RGB 15, 08, 31
- RGB 15, 08, 31
-
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 15, 16, 31
- RGB 31, 01, 13
-
- RGB 00, 00, 00
- RGB 07, 07, 07
- RGB 31, 31, 31
- RGB 02, 03, 30
-
- RGB 00, 00, 00
- RGB 13, 13, 13
- RGB 31, 31, 18
- RGB 02, 03, 30
-
- RGB 00, 00, 00
- RGB 19, 19, 19
- RGB 29, 28, 12
- RGB 02, 03, 30
-
- RGB 00, 00, 00
- RGB 25, 25, 25
- RGB 28, 25, 06
- RGB 02, 03, 30
-
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 26, 21, 00
- RGB 02, 03, 30
-
- RGB 00, 00, 00
- RGB 11, 11, 19
- RGB 31, 31, 31
- RGB 00, 00, 00
-
-; OBJ
- RGB 00, 00, 00
- RGB 10, 00, 15
- RGB 17, 05, 22
- RGB 19, 09, 31
-
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
+INCLUDE "data/palettes/title.pal"
diff --git a/engine/tmhm.asm b/engine/tmhm.asm
index dc5d698e1..78d3b1707 100755
--- a/engine/tmhm.asm
+++ b/engine/tmhm.asm
@@ -45,69 +45,5 @@ GetTMHMMove: ; 1166a
ret
; 1167a
-TMHMMoves: ; 1167a
- db DYNAMICPUNCH
- db HEADBUTT
- db CURSE
- db ROLLOUT
- db ROAR
- db TOXIC
- db ZAP_CANNON
- db ROCK_SMASH
- db PSYCH_UP
- db HIDDEN_POWER
- db SUNNY_DAY
- db SWEET_SCENT
- db SNORE
- db BLIZZARD
- db HYPER_BEAM
- db ICY_WIND
- db PROTECT
- db RAIN_DANCE
- db GIGA_DRAIN
- db ENDURE
- db FRUSTRATION
- db SOLARBEAM
- db IRON_TAIL
- db DRAGONBREATH
- db THUNDER
- db EARTHQUAKE
- db RETURN
- db DIG
- db PSYCHIC_M
- db SHADOW_BALL
- db MUD_SLAP
- db DOUBLE_TEAM
- db ICE_PUNCH
- db SWAGGER
- db SLEEP_TALK
- db SLUDGE_BOMB
- db SANDSTORM
- db FIRE_BLAST
- db SWIFT
- db DEFENSE_CURL
- db THUNDERPUNCH
- db DREAM_EATER
- db DETECT
- db REST
- db ATTRACT
- db THIEF
- db STEEL_WING
- db FIRE_PUNCH
- db FURY_CUTTER
- db NIGHTMARE
- db CUT
- db FLY
- db SURF
- db STRENGTH
- db FLASH
- db WHIRLPOOL
- db WATERFALL
-; Move tutor
- db FLAMETHROWER
- db THUNDERBOLT
- db ICE_BEAM
-
- db 0 ; end
-; 116b7
+INCLUDE "data/tmhm_moves.asm"
diff --git a/engine/tmhm2.asm b/engine/tmhm2.asm
index 8d19aaf81..c111fa7f9 100755
--- a/engine/tmhm2.asm
+++ b/engine/tmhm2.asm
@@ -23,7 +23,7 @@ TMHMPocket: ; 2c76f (b:476f)
.ConvertItemToTMHMNumber: ; 2c798 (b:4798)
ld a, [CurItem]
ld c, a
- callab GetNumberedTMHM
+ callfar GetNumberedTMHM
ld a, c
ld [CurItem], a
ret
@@ -31,7 +31,7 @@ TMHMPocket: ; 2c76f (b:476f)
ConvertCurItemIntoCurTMHM: ; 2c7a7 (b:47a7)
ld a, [CurItem]
ld c, a
- callab GetTMHMNumber
+ callfar GetTMHMNumber
ld a, c
ld [wCurTMHM], a
ret
@@ -77,18 +77,18 @@ ChooseMonToLearnTMHM: ; 2c7fb
call CopyBytes
call ClearBGPalettes
ChooseMonToLearnTMHM_NoRefresh: ; 2c80a
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuGFX
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ farcall InitPartyMenuGFX
ld a, PARTYMENUACTION_TEACH_TMHM
ld [PartyMenuActionText], a
.loopback
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
+ farcall WritePartyMenuTilemap
+ farcall PrintPartyMenuText
call WaitBGMap
call SetPalettes
call DelayFrame
- callba PartyMenuSelect
+ farcall PartyMenuSelect
push af
ld a, [CurPartySpecies]
cp EGG
@@ -138,7 +138,7 @@ TeachTMHM: ; 2c867
jr .nope
.compatible
- callab KnowsMove
+ callfar KnowsMove
jr c, .nope
predef LearnMove
@@ -146,13 +146,13 @@ TeachTMHM: ; 2c867
and a
jr z, .nope
- callba TrainerRankings_TMsHMsTaught
+ farcall TrainerRankings_TMsHMsTaught
ld a, [CurItem]
call IsHM
ret c
ld c, HAPPINESS_LEARNMOVE
- callab ChangeHappiness
+ callfar ChangeHappiness
call ConsumeTM
jr .learned_move
diff --git a/engine/trade/animation.asm b/engine/trade/animation.asm
deleted file mode 100755
index fa351ba3d..000000000
--- a/engine/trade/animation.asm
+++ /dev/null
@@ -1,1627 +0,0 @@
-TradeAnimation: ; 28f24
- xor a
- ld [wcf66], a
- ld hl, wPlayerTrademonSenderName
- ld de, wOTTrademonSenderName
- call LinkTradeAnim_LoadTradePlayerNames
- ld hl, wPlayerTrademonSpecies
- ld de, wOTTrademonSpecies
- call LinkTradeAnim_LoadTradeMonSpecies
- ld de, .script
- jr RunTradeAnimScript
-
-.script
- tradeanim_setup_givemon_scroll
- tradeanim_show_givemon_data
- tradeanim_do_givemon_scroll
- tradeanim_wait_80
- tradeanim_wait_96
- tradeanim_poof
- tradeanim_rocking_ball
- tradeanim_enter_link_tube
- tradeanim_wait_anim
- tradeanim_bulge_through_tube
- tradeanim_wait_anim
- tradeanim_textbox_scroll
- tradeanim_give_trademon_sfx
- tradeanim_tube_to_ot
- tradeanim_sent_to_ot_text
- tradeanim_scroll_out_right
-
- tradeanim_ot_sends_text_1
- tradeanim_ot_bids_farewell
- tradeanim_wait_40
- tradeanim_scroll_out_right
- tradeanim_get_trademon_sfx
- tradeanim_tube_to_player
- tradeanim_enter_link_tube
- tradeanim_drop_ball
- tradeanim_exit_link_tube
- tradeanim_wait_anim
- tradeanim_show_getmon_data
- tradeanim_poof
- tradeanim_wait_anim
- tradeanim_frontpic_scroll
- tradeanim_animate_frontpic
- tradeanim_wait_80_if_ot_egg
- tradeanim_textbox_scroll
- tradeanim_take_care_of_text
- tradeanim_scroll_out_right
- tradeanim_end
-
-TradeAnimationPlayer2: ; 28f63
- xor a
- ld [wcf66], a
- ld hl, wOTTrademonSenderName
- ld de, wPlayerTrademonSenderName
- call LinkTradeAnim_LoadTradePlayerNames
- ld hl, wOTTrademonSpecies
- ld de, wPlayerTrademonSpecies
- call LinkTradeAnim_LoadTradeMonSpecies
- ld de, .script
- jr RunTradeAnimScript
-
-.script
- tradeanim_ot_sends_text_2
- tradeanim_ot_bids_farewell
- tradeanim_wait_40
- tradeanim_scroll_out_right
- tradeanim_get_trademon_sfx
- tradeanim_tube_to_ot
- tradeanim_enter_link_tube
- tradeanim_drop_ball
- tradeanim_exit_link_tube
- tradeanim_wait_anim
- tradeanim_show_getmon_data
- tradeanim_poof
- tradeanim_wait_anim
- tradeanim_frontpic_scroll
- tradeanim_animate_frontpic
- tradeanim_wait_180_if_ot_egg
- tradeanim_textbox_scroll
- tradeanim_take_care_of_text
- tradeanim_scroll_out_right
-
- tradeanim_setup_givemon_scroll
- tradeanim_show_givemon_data
- tradeanim_do_givemon_scroll
- tradeanim_wait_40
- tradeanim_poof
- tradeanim_rocking_ball
- tradeanim_enter_link_tube
- tradeanim_wait_anim
- tradeanim_bulge_through_tube
- tradeanim_wait_anim
- tradeanim_textbox_scroll
- tradeanim_give_trademon_sfx
- tradeanim_tube_to_player
- tradeanim_sent_to_ot_text
- tradeanim_scroll_out_right
- tradeanim_end
-
-RunTradeAnimScript: ; 28fa1
- ld hl, wTradeAnimPointer
- ld [hl], e
- inc hl
- ld [hl], d
- ld a, [hMapAnims]
- push af
- xor a
- ld [hMapAnims], a
- ld hl, VramState
- ld a, [hl]
- push af
- res 0, [hl]
- ld hl, Options
- ld a, [hl]
- push af
- set 4, [hl]
- call .TradeAnimLayout
- ld a, [wcf66]
- and a
- jr nz, .anim_loop
- ld de, MUSIC_EVOLUTION
- call PlayMusic2
-.anim_loop
- call DoTradeAnimation
- jr nc, .anim_loop
- pop af
- ld [Options], a
- pop af
- ld [VramState], a
- pop af
- ld [hMapAnims], a
- ret
-
-; 28fdb
-
-.TradeAnimLayout: ; 28fdb
- xor a
- ld [wJumptableIndex], a
- call ClearBGPalettes
- call ClearSprites
- call ClearTileMap
- call DisableLCD
- call LoadFontsBattleExtra
- callab ClearSpriteAnims
- ld a, [hCGB]
- and a
- jr z, .NotCGB
- ld a, $1
- ld [rVBK], a
- ld hl, VTiles0
- ld bc, sScratch - VTiles0
- xor a
- call ByteFill
- ld a, $0
- ld [rVBK], a
-
-.NotCGB:
- hlbgcoord 0, 0
- ld bc, sScratch - VBGMap0
- ld a, " "
- call ByteFill
- ld hl, TradeGameBoyLZ
- ld de, VTiles2 tile $31
- call Decompress
- ld hl, TradeArrowGFX
- ld de, VTiles1 tile $6d
- ld bc, $10
- ld a, BANK(TradeArrowGFX)
- call FarCopyBytes
- ld hl, TradeArrowGFX + $10
- ld de, VTiles1 tile $6e
- ld bc, $10
- ld a, BANK(TradeArrowGFX)
- call FarCopyBytes
- xor a
- ld [hSCX], a
- ld [hSCY], a
- ld a, $7
- ld [hWX], a
- ld a, $90
- ld [hWY], a
- callba GetTrademonFrontpic
- call EnableLCD
- call LoadTradeBallAndCableGFX
- ld a, [wPlayerTrademonSpecies]
- ld hl, wPlayerTrademonDVs
- ld de, VTiles0
- call TradeAnim_GetFrontpic
- ld a, [wOTTrademonSpecies]
- ld hl, wOTTrademonDVs
- ld de, VTiles0 tile $31
- call TradeAnim_GetFrontpic
- ld a, [wPlayerTrademonSpecies]
- ld de, wPlayerTrademonSpeciesName
- call TradeAnim_GetNickname
- ld a, [wOTTrademonSpecies]
- ld de, wOTTrademonSpeciesName
- call TradeAnim_GetNickname
- call TradeAnim_NormalPals
- ret
-
-; 29082
-
-DoTradeAnimation: ; 29082
- ld a, [wJumptableIndex]
- bit 7, a
- jr nz, .finished
- call .DoTradeAnimCommand
- callab PlaySpriteAnimations
- ld hl, wcf65
- inc [hl]
- call DelayFrame
- and a
- ret
-
-.finished
- call LoadStandardFont
- scf
- ret
-
-; 290a0
-
-.DoTradeAnimCommand: ; 290a0
- ld a, [wJumptableIndex]
- ld e, a
- ld d, 0
- ld hl, .JumpTable
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-; 290af
-
-.JumpTable: ; 290af
- dw TradeAnim_AdvanceScriptPointer ; 00
- dw TradeAnim_ShowGivemonData ; 01
- dw TradeAnim_ShowGetmonData ; 02
- dw TradeAnim_EnterLinkTube1 ; 03
- dw TradeAnim_EnterLinkTube2 ; 04
- dw TradeAnim_ExitLinkTube ; 05
- dw TradeAnim_TubeToOT1 ; 06
- dw TradeAnim_TubeToOT2 ; 07
- dw TradeAnim_TubeToOT3 ; 08
- dw TradeAnim_TubeToOT4 ; 09
- dw TradeAnim_TubeToOT5 ; 0a
- dw TradeAnim_TubeToOT6 ; 0b
- dw TradeAnim_TubeToOT7 ; 0c
- dw TradeAnim_TubeToOT8 ; 0d
- dw TradeAnim_TubeToPlayer1 ; 0e
- dw TradeAnim_TubeToPlayer2 ; 0f
- dw TradeAnim_TubeToPlayer3 ; 10
- dw TradeAnim_TubeToPlayer4 ; 11
- dw TradeAnim_TubeToPlayer5 ; 12
- dw TradeAnim_TubeToPlayer6 ; 13
- dw TradeAnim_TubeToPlayer7 ; 14
- dw TradeAnim_TubeToPlayer8 ; 15
- dw TradeAnim_SentToOTText ; 16
- dw TradeAnim_OTBidsFarewell ; 17
- dw TradeAnim_TakeCareOfText ; 18
- dw TradeAnim_OTSendsText1 ; 19
- dw TradeAnim_OTSendsText2 ; 1a
- dw TradeAnim_SetupGivemonScroll ; 1b
- dw TradeAnim_DoGivemonScroll ; 1c
- dw TradeAnim_FrontpicScrollStart ; 1d
- dw TradeAnim_TextboxScrollStart ; 1e
- dw TradeAnim_ScrollOutRight ; 1f
- dw TradeAnim_ScrollOutRight2 ; 20
- dw TraideAnim_Wait80 ; 21
- dw TraideAnim_Wait40 ; 22
- dw TradeAnim_RockingBall ; 23
- dw TradeAnim_DropBall ; 24
- dw TradeAnim_WaitAnim ; 25
- dw TradeAnim_WaitAnim2 ; 26
- dw TradeAnim_Poof ; 27
- dw TradeAnim_BulgeThroughTube ; 28
- dw TradeAnim_GiveTrademonSFX ; 29
- dw TradeAnim_GetTrademonSFX ; 2a
- dw TradeAnim_End ; 2b
- dw TradeAnim_AnimateFrontpic ; 2c
- dw TraideAnim_Wait96 ; 2d
- dw TraideAnim_Wait80IfOTEgg ; 2e
- dw TraideAnim_Wait180IfOTEgg ; 2f
-; 2910f
-
-TradeAnim_IncrementJumptableIndex: ; 2910f
- ld hl, wJumptableIndex
- inc [hl]
- ret
-
-; 29114
-
-TradeAnim_AdvanceScriptPointer: ; 29114
- ld hl, wTradeAnimPointer
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld a, [de]
- ld [wJumptableIndex], a
- inc de
- ld [hl], d
- dec hl
- ld [hl], e
- ret
-
-; 29123
-
-TradeAnim_End: ; 29123
- ld hl, wJumptableIndex
- set 7, [hl]
- ret
-
-; 29129
-
-TradeAnim_TubeToOT1: ; 29129
- ld a, $ed ; >>>>>>>>
- call TradeAnim_PlaceTrademonStatsOnTubeAnim
- ld a, [wLinkTradeSendmonSpecies]
- ld [wd265], a
- xor a
- depixel 5, 11, 4, 0
- ld b, $0
- jr TradeAnim_InitTubeAnim
-
-TradeAnim_TubeToPlayer1: ; 2913c
- ld a, $ee ; <<<<<<<<
- call TradeAnim_PlaceTrademonStatsOnTubeAnim
- ld a, [wLinkTradeGetmonSpecies]
- ld [wd265], a
- ld a, $2
- depixel 9, 18, 4, 4
- ld b, $4
-TradeAnim_InitTubeAnim: ; 2914e
- push bc
- push de
- push bc
- push de
-
- push af
- call DisableLCD
- callab ClearSpriteAnims
- hlbgcoord 20, 3
- ld bc, 12
- ld a, $60
- call ByteFill
- pop af
-
- call TradeAnim_TubeAnimJumptable
-
- xor a
- ld [hSCX], a
- ld a, $7
- ld [hWX], a
- ld a, $70
- ld [hWY], a
- call EnableLCD
- call LoadTradeBubbleGFX
-
- pop de
- ld a, SPRITE_ANIM_INDEX_TRADEMON_ICON
- call _InitSpriteAnimStruct
-
- ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
- add hl, bc
- pop bc
- ld [hl], b
-
- pop de
- ld a, SPRITE_ANIM_INDEX_TRADEMON_BUBBLE
- call _InitSpriteAnimStruct
-
- ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
- add hl, bc
- pop bc
- ld [hl], b
-
- call WaitBGMap
- ld b, SCGB_TRADE_TUBE
- call GetSGBLayout
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbBGPals
- ld a, %11010000
- call DmgToCgbObjPal0
-
- call TradeAnim_IncrementJumptableIndex
- ld a, $5c
- ld [wcf64], a
- ret
-
-; 291af
-
-TradeAnim_TubeToOT2: ; 291af
- call TradeAnim_FlashBGPals
- ld a, [hSCX]
- add $2
- ld [hSCX], a
- cp $50
- ret nz
- ld a, $1
- call TradeAnim_TubeAnimJumptable
- call TradeAnim_IncrementJumptableIndex
- ret
-
-; 291c4
-
-TradeAnim_TubeToOT3: ; 291c4
- call TradeAnim_FlashBGPals
- ld a, [hSCX]
- add $2
- ld [hSCX], a
- cp $a0
- ret nz
- ld a, $2
- call TradeAnim_TubeAnimJumptable
- call TradeAnim_IncrementJumptableIndex
- ret
-
-; 291d9
-
-TradeAnim_TubeToOT4: ; 291d9
- call TradeAnim_FlashBGPals
- ld a, [hSCX]
- add $2
- ld [hSCX], a
- and a
- ret nz
- call TradeAnim_IncrementJumptableIndex
- ret
-
-; 291e8
-
-TradeAnim_TubeToPlayer3: ; 291e8
- call TradeAnim_FlashBGPals
- ld a, [hSCX]
- sub $2
- ld [hSCX], a
- cp $b0
- ret nz
- ld a, $1
- call TradeAnim_TubeAnimJumptable
- call TradeAnim_IncrementJumptableIndex
- ret
-
-; 291fd
-
-TradeAnim_TubeToPlayer4: ; 291fd
- call TradeAnim_FlashBGPals
- ld a, [hSCX]
- sub $2
- ld [hSCX], a
- cp $60
- ret nz
- xor a
- call TradeAnim_TubeAnimJumptable
- call TradeAnim_IncrementJumptableIndex
- ret
-
-; 29211
-
-TradeAnim_TubeToPlayer5: ; 29211
- call TradeAnim_FlashBGPals
- ld a, [hSCX]
- sub $2
- ld [hSCX], a
- and a
- ret nz
- call TradeAnim_IncrementJumptableIndex
- ret
-
-; 29220
-
-TradeAnim_TubeToOT6:
-TradeAnim_TubeToPlayer6: ; 29220
- ld a, $80
- ld [wcf64], a
- call TradeAnim_IncrementJumptableIndex
- ret
-
-; 29229
-
-TradeAnim_TubeToOT8:
-TradeAnim_TubeToPlayer8: ; 29229
- call ClearBGPalettes
- call ClearTileMap
- call ClearSprites
- call DisableLCD
- callab ClearSpriteAnims
- hlbgcoord 0, 0
- ld bc, sScratch - VBGMap0
- ld a, " "
- call ByteFill
- xor a
- ld [hSCX], a
- ld a, $90
- ld [hWY], a
- call EnableLCD
- call LoadTradeBallAndCableGFX
- call WaitBGMap
- call TradeAnim_NormalPals
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 2925d
-
-TradeAnim_TubeToOT5:
-TradeAnim_TubeToOT7:
-TradeAnim_TubeToPlayer2:
-TradeAnim_TubeToPlayer7: ; 2925d
- call TradeAnim_FlashBGPals
- ld hl, wcf64
- ld a, [hl]
- and a
- jr z, .done
- dec [hl]
- ret
-
-.done
- call TradeAnim_IncrementJumptableIndex
- ret
-
-; 2926d
-
-TradeAnim_GiveTrademonSFX: ; 2926d
- call TradeAnim_AdvanceScriptPointer
- ld de, SFX_GIVE_TRADEMON
- call PlaySFX
- ret
-
-; 29277
-
-TradeAnim_GetTrademonSFX: ; 29277
- call TradeAnim_AdvanceScriptPointer
- ld de, SFX_GET_TRADEMON
- call PlaySFX
- ret
-
-; 29281
-
-TradeAnim_TubeAnimJumptable: ; 29281
- and 3
- ld e, a
- ld d, 0
- ld hl, .Jumptable
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-; 2928f
-
-.Jumptable: ; 2928f
- dw .Zero
- dw .One
- dw .Two
- dw .Three
-; 29297
-
-.Zero: ; 29297
-.Three: ; 29297
- call TradeAnim_BlankTileMap
- hlcoord 9, 3
- ld [hl], $5b
- inc hl
- ld bc, 10
- ld a, $60
- call ByteFill
- hlcoord 3, 2
- call TradeAnim_CopyTradeGameBoyTilemap
- ret
-
-; 292af
-
-.One: ; 292af
- call TradeAnim_BlankTileMap
- hlcoord 0, 3
- ld bc, SCREEN_WIDTH
- ld a, $60
- call ByteFill
- ret
-
-; 292be
-
-.Two: ; 292be
- call TradeAnim_BlankTileMap
- hlcoord 0, 3
- ld bc, $11
- ld a, $60
- call ByteFill
- hlcoord 17, 3
- ld a, $5d
- ld [hl], a
-
- ld a, $61
- ld de, SCREEN_WIDTH
- ld c, $3
-.loop
- add hl, de
- ld [hl], a
- dec c
- jr nz, .loop
-
- add hl, de
- ld a, $5f
- ld [hld], a
- ld a, $5b
- ld [hl], a
- hlcoord 10, 6
- call TradeAnim_CopyTradeGameBoyTilemap
- ret
-
-; 292ec
-
-TradeAnim_CopyTradeGameBoyTilemap: ; 292ec
- ld de, TradeGameBoyTilemap
- lb bc, 8, 6
- call TradeAnim_CopyBoxFromDEtoHL
- ret
-
-; 292f6
-
-TradeAnim_PlaceTrademonStatsOnTubeAnim: ; 292f6
- push af
- call ClearBGPalettes
- call WaitTop
- ld a, VBGMap1 / $100
- ld [hBGMapAddress + 1], a
- call ClearTileMap
- hlcoord 0, 0
- ld bc, SCREEN_WIDTH
- ld a, "─"
- call ByteFill
- hlcoord 0, 1
- ld de, wLinkPlayer1Name
- call PlaceString
- ld hl, wLinkPlayer2Name
- ld de, 0
-.find_name_end_loop
- ld a, [hli]
- cp "@"
- jr z, .done
- dec de
- jr .find_name_end_loop
-
-.done
- hlcoord 0, 4
- add hl, de
- ld de, wLinkPlayer2Name
- call PlaceString
- hlcoord 7, 2
- ld bc, 6
- pop af
- call ByteFill
- call WaitBGMap
- call WaitTop
- ld a, VBGMap0 / $100
- ld [hBGMapAddress + 1], a
- call ClearTileMap
- ret
-
-; 29348
-
-TradeAnim_EnterLinkTube1: ; 29348
- call ClearTileMap
- call WaitTop
- ld a, $a0
- ld [hSCX], a
- call DelayFrame
- hlcoord 8, 2
- ld de, TradeLinkTubeTilemap
- lb bc, 3, 12
- call TradeAnim_CopyBoxFromDEtoHL
- call WaitBGMap
- ld b, SCGB_TRADE_TUBE
- call GetSGBLayout
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbBGPals
- lb de, %11100100, %11100100 ; 3,2,1,0, 3,2,1,0
- call DmgToCgbObjPals
- ld de, SFX_POTION
- call PlaySFX
- call TradeAnim_IncrementJumptableIndex
- ret
-
-; 2937e
-
-TradeAnim_EnterLinkTube2: ; 2937e
- ld a, [hSCX]
- and a
- jr z, .done
- add $4
- ld [hSCX], a
- ret
-
-.done
- ld c, 80
- call DelayFrames
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 29391
-
-TradeAnim_ExitLinkTube: ; 29391
- ld a, [hSCX]
- cp $a0
- jr z, .done
- sub $4
- ld [hSCX], a
- ret
-
-.done
- call ClearTileMap
- xor a
- ld [hSCX], a
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 293a6
-
-TradeAnim_SetupGivemonScroll: ; 293a6
- ld a, $8f
- ld [hWX], a
- ld a, $88
- ld [hSCX], a
- ld a, $50
- ld [hWY], a
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 293b6
-
-TradeAnim_DoGivemonScroll: ; 293b6
- ld a, [hWX]
- cp $7
- jr z, .done
- sub $4
- ld [hWX], a
- ld a, [hSCX]
- sub $4
- ld [hSCX], a
- ret
-
-.done
- ld a, $7
- ld [hWX], a
- xor a
- ld [hSCX], a
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 293d2
-
-TradeAnim_FrontpicScrollStart: ; 293d2
- ld a, $7
- ld [hWX], a
- ld a, $50
- ld [hWY], a
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 293de
-
-TradeAnim_TextboxScrollStart: ; 293de
- ld a, $7
- ld [hWX], a
- ld a, $90
- ld [hWY], a
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 293ea
-
-TradeAnim_ScrollOutRight: ; 293ea
- call WaitTop
- ld a, VBGMap1 / $100
- ld [hBGMapAddress + 1], a
- call WaitBGMap
- ld a, $7
- ld [hWX], a
- xor a
- ld [hWY], a
- call DelayFrame
- call WaitTop
- ld a, VBGMap0 / $100
- ld [hBGMapAddress + 1], a
- call ClearTileMap
- call TradeAnim_IncrementJumptableIndex
- ret
-
-; 2940c
-
-TradeAnim_ScrollOutRight2: ; 2940c
- ld a, [hWX]
- cp $a1
- jr nc, .done
- add $4
- ld [hWX], a
- ret
-
-.done
- ld a, VBGMap1 / $100
- ld [hBGMapAddress + 1], a
- call WaitBGMap
- ld a, $7
- ld [hWX], a
- ld a, $90
- ld [hWY], a
- ld a, VBGMap0 / $100
- ld [hBGMapAddress + 1], a
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 2942e
-
-TradeAnim_ShowGivemonData: ; 2942e
- call ShowPlayerTrademonStats
- ld a, [wPlayerTrademonSpecies]
- ld [CurPartySpecies], a
- ld a, [wPlayerTrademonDVs]
- ld [TempMonDVs], a
- ld a, [wPlayerTrademonDVs + 1]
- ld [TempMonDVs + 1], a
- ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
- call GetSGBLayout
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbBGPals
- call TradeAnim_ShowGivemonFrontpic
-
- ld a, [wPlayerTrademonSpecies]
- call GetCryIndex
- jr c, .skip_cry
- ld e, c
- ld d, b
- call PlayCryHeader
-.skip_cry
-
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 29461
-
-TradeAnim_ShowGetmonData: ; 29461
- call ShowOTTrademonStats
- ld a, [wOTTrademonSpecies]
- ld [CurPartySpecies], a
- ld a, [wOTTrademonDVs]
- ld [TempMonDVs], a
- ld a, [wOTTrademonDVs + 1]
- ld [TempMonDVs + 1], a
- ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
- call GetSGBLayout
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbBGPals
- call TradeAnim_ShowGetmonFrontpic
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 29487
-
-TradeAnim_AnimateFrontpic: ; 29487
- callba AnimateTrademonFrontpic
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 29491
-
-TradeAnim_GetFrontpic: ; 29491
- push de
- push af
- predef GetUnownLetter
- pop af
- ld [CurPartySpecies], a
- ld [CurSpecies], a
- call GetBaseData
- pop de
- predef GetFrontpic
- ret
-
-; 294a9
-
-TradeAnim_GetNickname: ; 294a9
- push de
- ld [wd265], a
- call GetPokemonName
- ld hl, StringBuffer1
- pop de
- ld bc, NAME_LENGTH
- call CopyBytes
- ret
-
-; 294bb
-
-TradeAnim_ShowGivemonFrontpic: ; 294bb
- ld de, VTiles0
- jr TradeAnim_ShowFrontpic
-
-TradeAnim_ShowGetmonFrontpic: ; 294c0
- ld de, VTiles0 tile $31
-TradeAnim_ShowFrontpic: ; 294c3
- call DelayFrame
- ld hl, VTiles2
- lb bc, 10, $31
- call Request2bpp
- call WaitTop
- call TradeAnim_BlankTileMap
- hlcoord 7, 2
- xor a
- ld [hGraphicStartTile], a
- lb bc, 7, 7
- predef PlaceGraphic
- call WaitBGMap
- ret
-
-; 294e7
-
-TraideAnim_Wait80: ; 294e7
- ld c, 80
- call DelayFrames
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 294f0
-
-TraideAnim_Wait40: ; 294f0
- ld c, 40
- call DelayFrames
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 294f9
-
-TraideAnim_Wait96: ; 294f9
- ld c, 96
- call DelayFrames
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 29502
-
-TraideAnim_Wait80IfOTEgg: ; 29502
- call IsOTTrademonEgg
- ret nz
- ld c, 80
- call DelayFrames
- ret
-
-; 2950c
-
-TraideAnim_Wait180IfOTEgg: ; 2950c
- call IsOTTrademonEgg
- ret nz
- ld c, 180
- call DelayFrames
- ret
-
-; 29516
-
-IsOTTrademonEgg: ; 29516
- call TradeAnim_AdvanceScriptPointer
- ld a, [wOTTrademonSpecies]
- cp EGG
- ret
-
-; 2951f
-ShowPlayerTrademonStats: ; 2951f
- ld de, wPlayerTrademonSpecies
- ld a, [de]
- cp EGG
- jr z, TrademonStats_Egg
- call TrademonStats_MonTemplate
- ld de, wPlayerTrademonSpecies
- call TrademonStats_PrintSpeciesNumber
- ld de, wPlayerTrademonSpeciesName
- call TrademonStats_PrintSpeciesName
- ld a, [wPlayerTrademonCaughtData]
- ld de, wPlayerTrademonOTName
- call TrademonStats_PrintOTName
- ld de, wPlayerTrademonID
- call TrademonStats_PrintTrademonID
- call TrademonStats_WaitBGMap
- ret
-
-; 29549
-
-ShowOTTrademonStats: ; 29549
- ld de, wOTTrademonSpecies
- ld a, [de]
- cp EGG
- jr z, TrademonStats_Egg
- call TrademonStats_MonTemplate
- ld de, wOTTrademonSpecies
- call TrademonStats_PrintSpeciesNumber
- ld de, wOTTrademonSpeciesName
- call TrademonStats_PrintSpeciesName
- ld a, [wOTTrademonCaughtData]
- ld de, wOTTrademonOTName
- call TrademonStats_PrintOTName
- ld de, wOTTrademonID
- call TrademonStats_PrintTrademonID
- call TrademonStats_WaitBGMap
- ret
-
-; 29573
-
-TrademonStats_MonTemplate: ; 29573
- call WaitTop
- call TradeAnim_BlankTileMap
- ld a, VBGMap1 / $100
- ld [hBGMapAddress + 1], a
- hlcoord 3, 0
- ld b, $6
- ld c, $d
- call TextBox
- hlcoord 4, 0
- ld de, .OTMonData
- call PlaceString
- ret
-
-; 29591
-
-.OTMonData: ; 29591
- db "─── №."
- next ""
- next "OT/"
- next "<ID>№.@"
-; 295a1
-
-TrademonStats_Egg: ; 295a1
- call WaitTop
- call TradeAnim_BlankTileMap
- ld a, VBGMap1 / $100
- ld [hBGMapAddress + 1], a
- hlcoord 3, 0
- ld b, 6
- ld c, 13
- call TextBox
- hlcoord 4, 2
- ld de, .EggData
- call PlaceString
- call TrademonStats_WaitBGMap
- ret
-
-; 295c2
-
-.EggData: ; 295c2
- db "EGG"
- next "OT/?????"
- next "<ID>№.?????@"
-; 295d8
-
-TrademonStats_WaitBGMap: ; 295d8
- call WaitBGMap
- call WaitTop
- ld a, VBGMap0 / $100
- ld [hBGMapAddress + 1], a
- ret
-
-; 295e3
-
-TrademonStats_PrintSpeciesNumber: ; 295e3
- hlcoord 10, 0
- lb bc, PRINTNUM_LEADINGZEROS | 1, 3
- call PrintNum
- ld [hl], " "
- ret
-
-; 295ef
-
-TrademonStats_PrintSpeciesName: ; 295ef
- hlcoord 4, 2
- call PlaceString
- ret
-
-; 295f6
-
-TrademonStats_PrintOTName: ; 295f6
- cp 3
- jr c, .caught_gender_okay
- xor a
-.caught_gender_okay
- push af
- hlcoord 7, 4
- call PlaceString
- inc bc
- pop af
- ld hl, .Gender
- ld d, 0
- ld e, a
- add hl, de
- ld a, [hl]
- ld [bc], a
- ret
-
-; 2960e
-
-.Gender: ; 2960e
- db " ", "♂", "♀"
-; 29611
-
-TrademonStats_PrintTrademonID: ; 29611
- hlcoord 7, 6
- lb bc, PRINTNUM_LEADINGZEROS | 2, 5
- call PrintNum
- ret
-
-; 2961b
-
-TradeAnim_RockingBall: ; 2961b
- depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_0E
- call _InitSpriteAnimStruct
- call TradeAnim_AdvanceScriptPointer
- ld a, $20
- ld [wcf64], a
- ret
-
-; 2962c
-
-TradeAnim_DropBall: ; 2962c
- depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_0E
- call _InitSpriteAnimStruct
- ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
- add hl, bc
- ld [hl], $1
- ld hl, SPRITEANIMSTRUCT_YOFFSET
- add hl, bc
- ld [hl], $dc
- call TradeAnim_AdvanceScriptPointer
- ld a, $38
- ld [wcf64], a
- ret
-
-; 29649
-
-TradeAnim_Poof: ; 29649
- depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_0F
- call _InitSpriteAnimStruct
- call TradeAnim_AdvanceScriptPointer
- ld a, $10
- ld [wcf64], a
- ld de, SFX_BALL_POOF
- call PlaySFX
- ret
-
-; 29660
-
-TradeAnim_BulgeThroughTube: ; 29660
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbObjPal0
- depixel 5, 11
- ld a, SPRITE_ANIM_INDEX_10
- call _InitSpriteAnimStruct
- call TradeAnim_AdvanceScriptPointer
- ld a, $40
- ld [wcf64], a
- ret
-
-; 29676
-
-TradeAnim_AnimateTrademonInTube: ; 29676 (a:5676)
- ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
- add hl, bc
- ld e, [hl]
- ld d, 0
- ld hl, .Jumptable
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-; 29686
-
-.Jumptable: ; 29686 (a:5686)
- dw .InitTimer
- dw .WaitTimer1
- dw .MoveRight
- dw .MoveDown
- dw .MoveUp
- dw .MoveLeft
- dw .WaitTimer2
-; 2969a
-
-.JumptableNext: ; 29694 (a:5694)
- ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
- add hl, bc
- inc [hl]
- ret
-
-.InitTimer: ; 2969a (a:569a)
- call .JumptableNext
- ld hl, SPRITEANIMSTRUCT_0C
- add hl, bc
- ld [hl], $80
- ret
-
-.WaitTimer1: ; 296a4 (a:56a4)
- ld hl, SPRITEANIMSTRUCT_0C
- add hl, bc
- ld a, [hl]
- dec [hl]
- and a
- ret nz
- call .JumptableNext
-
-.MoveRight: ; 296af (a:56af)
- ld hl, SPRITEANIMSTRUCT_XCOORD
- add hl, bc
- ld a, [hl]
- cp $94
- jr nc, .done_move_right
- inc [hl]
- ret
-
-.done_move_right
- call .JumptableNext
-
-.MoveDown: ; 296bd (a:56bd)
- ld hl, SPRITEANIMSTRUCT_YCOORD
- add hl, bc
- ld a, [hl]
- cp $4c
- jr nc, .done_move_down
- inc [hl]
- ret
-
-.done_move_down
- ld hl, SPRITEANIMSTRUCT_INDEX
- add hl, bc
- ld [hl], $0
- ret
-
-.MoveUp: ; 296cf (a:56cf)
- ld hl, SPRITEANIMSTRUCT_YCOORD
- add hl, bc
- ld a, [hl]
- cp $2c
- jr z, .done_move_up
- dec [hl]
- ret
-
-.done_move_up
- call .JumptableNext
-
-.MoveLeft: ; 296dd (a:56dd)
- ld hl, SPRITEANIMSTRUCT_XCOORD
- add hl, bc
- ld a, [hl]
- cp $58
- jr z, .done_move_left
- dec [hl]
- ret
-
-.done_move_left
- call .JumptableNext
- ld hl, SPRITEANIMSTRUCT_0C
- add hl, bc
- ld [hl], $80
- ret
-
-.WaitTimer2: ; 296f2 (a:56f2)
- ld hl, SPRITEANIMSTRUCT_0C
- add hl, bc
- ld a, [hl]
- dec [hl]
- and a
- ret nz
- ld hl, SPRITEANIMSTRUCT_INDEX
- add hl, bc
- ld [hl], $0
- ret
-
-; 29701 (a:5701)
-
-TradeAnim_SentToOTText: ; 29701
- ld a, [wLinkMode]
- cp LINK_TIMECAPSULE
- jr z, .time_capsule
- ld hl, .Text_MonName
- call PrintText
- ld c, 189
- call DelayFrames
- ld hl, .Text_WasSentTo
- call PrintText
- call TradeAnim_Wait80Frames
- ld c, 128
- call DelayFrames
- call TradeAnim_AdvanceScriptPointer
- ret
-
-.time_capsule
- ld hl, .Text_WasSentTo
- call PrintText
- call TradeAnim_Wait80Frames
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 29732
-
-.Text_WasSentTo: ; 0x29732
- ; was sent to @ .
- text_jump UnknownText_0x1bc6e9
- db "@"
-; 0x29737
-
-.Text_MonName: ; 0x29737
- ;
- text_jump UnknownText_0x1bc701
- db "@"
-; 0x2973c
-
-TradeAnim_OTBidsFarewell: ; 2973c
- ld hl, .Text_BidsFarewellToMon
- call PrintText
- call TradeAnim_Wait80Frames
- ld hl, .Text_MonName
- call PrintText
- call TradeAnim_Wait80Frames
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 29752
-
-.Text_BidsFarewellToMon: ; 0x29752
- ; bids farewell to
- text_jump UnknownText_0x1bc703
- db "@"
-; 0x29757
-
-.Text_MonName: ; 0x29757
- ; .
- text_jump UnknownText_0x1bc719
- db "@"
-; 0x2975c
-
-TradeAnim_TakeCareOfText: ; 2975c
- call WaitTop
- hlcoord 0, 10
- ld bc, 8 * SCREEN_WIDTH
- ld a, " "
- call ByteFill
- call WaitBGMap
- ld hl, .Text_TakeGoodCareOfMon
- call PrintText
- call TradeAnim_Wait80Frames
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 2977a
-
-.Text_TakeGoodCareOfMon: ; 0x2977a
- ; Take good care of @ .
- text_jump UnknownText_0x1bc71f
- db "@"
-; 0x2977f
-
-TradeAnim_OTSendsText1: ; 2977f
- ld hl, .Text_ForYourMon
- call PrintText
- call TradeAnim_Wait80Frames
- ld hl, .Text_OTSends
- call PrintText
- call TradeAnim_Wait80Frames
- ld c, 14
- call DelayFrames
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 2979a
-
-.Text_ForYourMon: ; 0x2979a
- ; For @ 's @ ,
- text_jump UnknownText_0x1bc739
- db "@"
-; 0x2979f
-
-.Text_OTSends: ; 0x2979f
- ; sends @ .
- text_jump UnknownText_0x1bc74c
- db "@"
-; 0x297a4
-
-TradeAnim_OTSendsText2: ; 297a4
- ld hl, .Text_WillTrade
- call PrintText
- call TradeAnim_Wait80Frames
- ld hl, .Text_ForYourMon
- call PrintText
- call TradeAnim_Wait80Frames
- ld c, 14
- call DelayFrames
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 297bf
-
-.Text_WillTrade: ; 0x297bf
- ; will trade @ @
- text_jump UnknownText_0x1bc75e
- db "@"
-; 0x297c4
-
-.Text_ForYourMon: ; 0x297c4
- ; for @ 's @ .
- text_jump UnknownText_0x1bc774
- db "@"
-; 0x297c9
-
-TradeAnim_Wait80Frames: ; 297c9
- ld c, 80
- call DelayFrames
- ret
-
-; 297cf
-
-TradeAnim_BlankTileMap: ; 297cf
- hlcoord 0, 0
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- ld a, " "
- call ByteFill
- ret
-
-; 297db
-
-TradeAnim_CopyBoxFromDEtoHL: ; 297db
-.row
- push bc
- push hl
-.col
- ld a, [de]
- inc de
- ld [hli], a
- dec c
- jr nz, .col
- pop hl
- ld bc, SCREEN_WIDTH
- add hl, bc
- pop bc
- dec b
- jr nz, .row
- ret
-
-; 297ed
-
-TradeAnim_NormalPals: ; 297ed
- ld a, [hSGB]
- and a
- ld a, %11100100 ; 3,2,1,0
- jr z, .not_sgb
- ld a, $f0
-
-.not_sgb
- call DmgToCgbObjPal0
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbBGPals
- ret
-
-; 297ff
-
-LinkTradeAnim_LoadTradePlayerNames: ; 297ff
- push de
- ld de, wLinkPlayer1Name
- ld bc, NAME_LENGTH
- call CopyBytes
- pop hl
- ld de, wLinkPlayer2Name
- ld bc, NAME_LENGTH
- call CopyBytes
- ret
-
-; 29814
-
-LinkTradeAnim_LoadTradeMonSpecies: ; 29814
- ld a, [hl]
- ld [wLinkTradeSendmonSpecies], a
- ld a, [de]
- ld [wLinkTradeGetmonSpecies], a
- ret
-
-; 2981d
-
-TradeAnim_FlashBGPals: ; 2981d
- ld a, [wcf65]
- and $7
- ret nz
- ld a, [rBGP]
- xor %00111100
- call DmgToCgbBGPals
- ret
-
-; 2982b
-
-LoadTradeBallAndCableGFX: ; 2982b
- call DelayFrame
- ld de, TradeBallGFX
- ld hl, VTiles0 tile $62
- lb bc, BANK(TradeBallGFX), $6
- call Request2bpp
- ld de, TradePoofGFX
- ld hl, VTiles0 tile $68
- lb bc, BANK(TradePoofGFX), $c
- call Request2bpp
- ld de, TradeCableGFX
- ld hl, VTiles0 tile $74
- lb bc, BANK(TradeCableGFX), $4
- call Request2bpp
- xor a
- ld hl, wSpriteAnimDict
- ld [hli], a
- ld [hl], $62
- ret
-
-; 2985a
-
-LoadTradeBubbleGFX: ; 2985a
- call DelayFrame
- ld e, $3
- callab LoadMenuMonIcon
- ld de, TradeBubbleGFX
- ld hl, VTiles0 tile $72
- lb bc, BANK(TradeBubbleGFX), $4
- call Request2bpp
- xor a
- ld hl, wSpriteAnimDict
- ld [hli], a
- ld [hl], $62
- ret
-
-; 29879
-
-TradeAnim_WaitAnim: ; 29879
- ld hl, wcf64
- ld a, [hl]
- and a
- jr z, .done
- dec [hl]
- ret
-
-.done
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 29886
-
-TradeAnim_WaitAnim2: ; 29886
- ld hl, wcf64
- ld a, [hl]
- and a
- jr z, .done
- dec [hl]
- ret
-
-.done
- call TradeAnim_AdvanceScriptPointer
- ret
-
-; 29893
-
-
-DebugTrade: ; 29893
-; This function is unreferenced.
-; It was meant for use in Japanese versions, so the
-; constant used for copy length was changed by accident.
-
- ld hl, .DebugTradeData
-
- ld a, [hli]
- ld [wPlayerTrademonSpecies], a
- ld de, wPlayerTrademonSenderName
- ld c, 11 + 2 ; jp: 6 + 2
-.loop1
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .loop1
-
- ld a, [hli]
- ld [wOTTrademonSpecies], a
- ld de, wOTTrademonSenderName
- ld c, 11 + 2 ; jp: 6 + 2
-.loop2
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .loop2
- ret
-
-; 298b5
-
-.DebugTradeData: ; 298b5
- db VENUSAUR, "ゲーフり@@", $23, $01 ; GAME FREAK
- db CHARIZARD, "クりーチャ@", $56, $04 ; Creatures Inc.
-; 298c7
-
-
-TradeGameBoyTilemap: ; 298c7
-; 6x8
- db $31, $32, $32, $32, $32, $33
- db $34, $35, $36, $36, $37, $38
- db $34, $39, $3a, $3a, $3b, $38
- db $3c, $3d, $3e, $3e, $3f, $40
- db $41, $42, $43, $43, $44, $45
- db $46, $47, $43, $48, $49, $4a
- db $41, $43, $4b, $4c, $4d, $4e
- db $4f, $50, $50, $50, $51, $52
-; 297f7
-
-TradeLinkTubeTilemap: ; 297f7
-; 12x3
- db $43, $55, $56, $53, $53, $53, $53, $53, $53, $53, $53, $53
- db $43, $57, $58, $54, $54, $54, $54, $54, $54, $54, $54, $54
- db $43, $59, $5a, $43, $43, $43, $43, $43, $43, $43, $43, $43
-; 2991b
-
-TradeArrowGFX: INCBIN "gfx/trade/arrow.2bpp"
-TradeCableGFX: INCBIN "gfx/trade/cable.2bpp"
-TradeBubbleGFX: INCBIN "gfx/trade/bubble.2bpp"
-TradeGameBoyLZ: INCBIN "gfx/trade/game_boy.2bpp.lz"
-TradeBallGFX: INCBIN "gfx/trade/ball.2bpp"
-TradePoofGFX: INCBIN "gfx/trade/poof.2bpp"
diff --git a/engine/trade_animation.asm b/engine/trade_animation.asm
new file mode 100755
index 000000000..711ba4d19
--- /dev/null
+++ b/engine/trade_animation.asm
@@ -0,0 +1,1628 @@
+TradeAnimation: ; 28f24
+ xor a
+ ld [wcf66], a
+ ld hl, wPlayerTrademonSenderName
+ ld de, wOTTrademonSenderName
+ call LinkTradeAnim_LoadTradePlayerNames
+ ld hl, wPlayerTrademonSpecies
+ ld de, wOTTrademonSpecies
+ call LinkTradeAnim_LoadTradeMonSpecies
+ ld de, .script
+ jr RunTradeAnimScript
+
+.script
+ tradeanim_setup_givemon_scroll
+ tradeanim_show_givemon_data
+ tradeanim_do_givemon_scroll
+ tradeanim_wait_80
+ tradeanim_wait_96
+ tradeanim_poof
+ tradeanim_rocking_ball
+ tradeanim_enter_link_tube
+ tradeanim_wait_anim
+ tradeanim_bulge_through_tube
+ tradeanim_wait_anim
+ tradeanim_textbox_scroll
+ tradeanim_give_trademon_sfx
+ tradeanim_tube_to_ot
+ tradeanim_sent_to_ot_text
+ tradeanim_scroll_out_right
+
+ tradeanim_ot_sends_text_1
+ tradeanim_ot_bids_farewell
+ tradeanim_wait_40
+ tradeanim_scroll_out_right
+ tradeanim_get_trademon_sfx
+ tradeanim_tube_to_player
+ tradeanim_enter_link_tube
+ tradeanim_drop_ball
+ tradeanim_exit_link_tube
+ tradeanim_wait_anim
+ tradeanim_show_getmon_data
+ tradeanim_poof
+ tradeanim_wait_anim
+ tradeanim_frontpic_scroll
+ tradeanim_animate_frontpic
+ tradeanim_wait_80_if_ot_egg
+ tradeanim_textbox_scroll
+ tradeanim_take_care_of_text
+ tradeanim_scroll_out_right
+ tradeanim_end
+
+TradeAnimationPlayer2: ; 28f63
+ xor a
+ ld [wcf66], a
+ ld hl, wOTTrademonSenderName
+ ld de, wPlayerTrademonSenderName
+ call LinkTradeAnim_LoadTradePlayerNames
+ ld hl, wOTTrademonSpecies
+ ld de, wPlayerTrademonSpecies
+ call LinkTradeAnim_LoadTradeMonSpecies
+ ld de, .script
+ jr RunTradeAnimScript
+
+.script
+ tradeanim_ot_sends_text_2
+ tradeanim_ot_bids_farewell
+ tradeanim_wait_40
+ tradeanim_scroll_out_right
+ tradeanim_get_trademon_sfx
+ tradeanim_tube_to_ot
+ tradeanim_enter_link_tube
+ tradeanim_drop_ball
+ tradeanim_exit_link_tube
+ tradeanim_wait_anim
+ tradeanim_show_getmon_data
+ tradeanim_poof
+ tradeanim_wait_anim
+ tradeanim_frontpic_scroll
+ tradeanim_animate_frontpic
+ tradeanim_wait_180_if_ot_egg
+ tradeanim_textbox_scroll
+ tradeanim_take_care_of_text
+ tradeanim_scroll_out_right
+
+ tradeanim_setup_givemon_scroll
+ tradeanim_show_givemon_data
+ tradeanim_do_givemon_scroll
+ tradeanim_wait_40
+ tradeanim_poof
+ tradeanim_rocking_ball
+ tradeanim_enter_link_tube
+ tradeanim_wait_anim
+ tradeanim_bulge_through_tube
+ tradeanim_wait_anim
+ tradeanim_textbox_scroll
+ tradeanim_give_trademon_sfx
+ tradeanim_tube_to_player
+ tradeanim_sent_to_ot_text
+ tradeanim_scroll_out_right
+ tradeanim_end
+
+RunTradeAnimScript: ; 28fa1
+ ld hl, wTradeAnimAddress
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ ld a, [hMapAnims]
+ push af
+ xor a
+ ld [hMapAnims], a
+ ld hl, VramState
+ ld a, [hl]
+ push af
+ res 0, [hl]
+ ld hl, Options
+ ld a, [hl]
+ push af
+ set 4, [hl]
+ call .TradeAnimLayout
+ ld a, [wcf66]
+ and a
+ jr nz, .anim_loop
+ ld de, MUSIC_EVOLUTION
+ call PlayMusic2
+.anim_loop
+ call DoTradeAnimation
+ jr nc, .anim_loop
+ pop af
+ ld [Options], a
+ pop af
+ ld [VramState], a
+ pop af
+ ld [hMapAnims], a
+ ret
+
+; 28fdb
+
+.TradeAnimLayout: ; 28fdb
+ xor a
+ ld [wJumptableIndex], a
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearTileMap
+ call DisableLCD
+ call LoadFontsBattleExtra
+ callfar ClearSpriteAnims
+ ld a, [hCGB]
+ and a
+ jr z, .NotCGB
+ ld a, $1
+ ld [rVBK], a
+ ld hl, VTiles0
+ ld bc, sScratch - VTiles0
+ xor a
+ call ByteFill
+ ld a, $0
+ ld [rVBK], a
+
+.NotCGB:
+ hlbgcoord 0, 0
+ ld bc, sScratch - VBGMap0
+ ld a, " "
+ call ByteFill
+ ld hl, TradeGameBoyLZ
+ ld de, VTiles2 tile $31
+ call Decompress
+ ld hl, TradeArrowGFX
+ ld de, VTiles1 tile $6d
+ ld bc, $10
+ ld a, BANK(TradeArrowGFX)
+ call FarCopyBytes
+ ld hl, TradeArrowGFX + $10
+ ld de, VTiles1 tile $6e
+ ld bc, $10
+ ld a, BANK(TradeArrowGFX)
+ call FarCopyBytes
+ xor a
+ ld [hSCX], a
+ ld [hSCY], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $90
+ ld [hWY], a
+ farcall GetTrademonFrontpic
+ call EnableLCD
+ call LoadTradeBallAndCableGFX
+ ld a, [wPlayerTrademonSpecies]
+ ld hl, wPlayerTrademonDVs
+ ld de, VTiles0
+ call TradeAnim_GetFrontpic
+ ld a, [wOTTrademonSpecies]
+ ld hl, wOTTrademonDVs
+ ld de, VTiles0 tile $31
+ call TradeAnim_GetFrontpic
+ ld a, [wPlayerTrademonSpecies]
+ ld de, wPlayerTrademonSpeciesName
+ call TradeAnim_GetNickname
+ ld a, [wOTTrademonSpecies]
+ ld de, wOTTrademonSpeciesName
+ call TradeAnim_GetNickname
+ call TradeAnim_NormalPals
+ ret
+
+; 29082
+
+DoTradeAnimation: ; 29082
+ ld a, [wJumptableIndex]
+ bit 7, a
+ jr nz, .finished
+ call .DoTradeAnimCommand
+ callfar PlaySpriteAnimations
+ ld hl, wcf65
+ inc [hl]
+ call DelayFrame
+ and a
+ ret
+
+.finished
+ call LoadStandardFont
+ scf
+ ret
+
+; 290a0
+
+.DoTradeAnimCommand: ; 290a0
+ ld a, [wJumptableIndex]
+ ld e, a
+ ld d, 0
+ ld hl, .JumpTable
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+; 290af
+
+.JumpTable: ; 290af
+; entries correspond to macros/trade_anim.asm enumeration
+ dw TradeAnim_AdvanceScriptPointer ; 00
+ dw TradeAnim_ShowGivemonData ; 01
+ dw TradeAnim_ShowGetmonData ; 02
+ dw TradeAnim_EnterLinkTube1 ; 03
+ dw TradeAnim_EnterLinkTube2 ; 04
+ dw TradeAnim_ExitLinkTube ; 05
+ dw TradeAnim_TubeToOT1 ; 06
+ dw TradeAnim_TubeToOT2 ; 07
+ dw TradeAnim_TubeToOT3 ; 08
+ dw TradeAnim_TubeToOT4 ; 09
+ dw TradeAnim_TubeToOT5 ; 0a
+ dw TradeAnim_TubeToOT6 ; 0b
+ dw TradeAnim_TubeToOT7 ; 0c
+ dw TradeAnim_TubeToOT8 ; 0d
+ dw TradeAnim_TubeToPlayer1 ; 0e
+ dw TradeAnim_TubeToPlayer2 ; 0f
+ dw TradeAnim_TubeToPlayer3 ; 10
+ dw TradeAnim_TubeToPlayer4 ; 11
+ dw TradeAnim_TubeToPlayer5 ; 12
+ dw TradeAnim_TubeToPlayer6 ; 13
+ dw TradeAnim_TubeToPlayer7 ; 14
+ dw TradeAnim_TubeToPlayer8 ; 15
+ dw TradeAnim_SentToOTText ; 16
+ dw TradeAnim_OTBidsFarewell ; 17
+ dw TradeAnim_TakeCareOfText ; 18
+ dw TradeAnim_OTSendsText1 ; 19
+ dw TradeAnim_OTSendsText2 ; 1a
+ dw TradeAnim_SetupGivemonScroll ; 1b
+ dw TradeAnim_DoGivemonScroll ; 1c
+ dw TradeAnim_FrontpicScrollStart ; 1d
+ dw TradeAnim_TextboxScrollStart ; 1e
+ dw TradeAnim_ScrollOutRight ; 1f
+ dw TradeAnim_ScrollOutRight2 ; 20
+ dw TraideAnim_Wait80 ; 21
+ dw TraideAnim_Wait40 ; 22
+ dw TradeAnim_RockingBall ; 23
+ dw TradeAnim_DropBall ; 24
+ dw TradeAnim_WaitAnim ; 25
+ dw TradeAnim_WaitAnim2 ; 26
+ dw TradeAnim_Poof ; 27
+ dw TradeAnim_BulgeThroughTube ; 28
+ dw TradeAnim_GiveTrademonSFX ; 29
+ dw TradeAnim_GetTrademonSFX ; 2a
+ dw TradeAnim_End ; 2b
+ dw TradeAnim_AnimateFrontpic ; 2c
+ dw TraideAnim_Wait96 ; 2d
+ dw TraideAnim_Wait80IfOTEgg ; 2e
+ dw TraideAnim_Wait180IfOTEgg ; 2f
+; 2910f
+
+TradeAnim_IncrementJumptableIndex: ; 2910f
+ ld hl, wJumptableIndex
+ inc [hl]
+ ret
+
+; 29114
+
+TradeAnim_AdvanceScriptPointer: ; 29114
+ ld hl, wTradeAnimAddress
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld a, [de]
+ ld [wJumptableIndex], a
+ inc de
+ ld [hl], d
+ dec hl
+ ld [hl], e
+ ret
+
+; 29123
+
+TradeAnim_End: ; 29123
+ ld hl, wJumptableIndex
+ set 7, [hl]
+ ret
+
+; 29129
+
+TradeAnim_TubeToOT1: ; 29129
+ ld a, $ed ; >>>>>>>>
+ call TradeAnim_PlaceTrademonStatsOnTubeAnim
+ ld a, [wLinkTradeSendmonSpecies]
+ ld [wd265], a
+ xor a
+ depixel 5, 11, 4, 0
+ ld b, $0
+ jr TradeAnim_InitTubeAnim
+
+TradeAnim_TubeToPlayer1: ; 2913c
+ ld a, $ee ; <<<<<<<<
+ call TradeAnim_PlaceTrademonStatsOnTubeAnim
+ ld a, [wLinkTradeGetmonSpecies]
+ ld [wd265], a
+ ld a, $2
+ depixel 9, 18, 4, 4
+ ld b, $4
+TradeAnim_InitTubeAnim: ; 2914e
+ push bc
+ push de
+ push bc
+ push de
+
+ push af
+ call DisableLCD
+ callfar ClearSpriteAnims
+ hlbgcoord 20, 3
+ ld bc, 12
+ ld a, $60
+ call ByteFill
+ pop af
+
+ call TradeAnim_TubeAnimJumptable
+
+ xor a
+ ld [hSCX], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $70
+ ld [hWY], a
+ call EnableLCD
+ call LoadTradeBubbleGFX
+
+ pop de
+ ld a, SPRITE_ANIM_INDEX_TRADEMON_ICON
+ call _InitSpriteAnimStruct
+
+ ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
+ add hl, bc
+ pop bc
+ ld [hl], b
+
+ pop de
+ ld a, SPRITE_ANIM_INDEX_TRADEMON_BUBBLE
+ call _InitSpriteAnimStruct
+
+ ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
+ add hl, bc
+ pop bc
+ ld [hl], b
+
+ call WaitBGMap
+ ld b, SCGB_TRADE_TUBE
+ call GetSGBLayout
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbBGPals
+ ld a, %11010000
+ call DmgToCgbObjPal0
+
+ call TradeAnim_IncrementJumptableIndex
+ ld a, $5c
+ ld [wcf64], a
+ ret
+
+; 291af
+
+TradeAnim_TubeToOT2: ; 291af
+ call TradeAnim_FlashBGPals
+ ld a, [hSCX]
+ add $2
+ ld [hSCX], a
+ cp $50
+ ret nz
+ ld a, $1
+ call TradeAnim_TubeAnimJumptable
+ call TradeAnim_IncrementJumptableIndex
+ ret
+
+; 291c4
+
+TradeAnim_TubeToOT3: ; 291c4
+ call TradeAnim_FlashBGPals
+ ld a, [hSCX]
+ add $2
+ ld [hSCX], a
+ cp $a0
+ ret nz
+ ld a, $2
+ call TradeAnim_TubeAnimJumptable
+ call TradeAnim_IncrementJumptableIndex
+ ret
+
+; 291d9
+
+TradeAnim_TubeToOT4: ; 291d9
+ call TradeAnim_FlashBGPals
+ ld a, [hSCX]
+ add $2
+ ld [hSCX], a
+ and a
+ ret nz
+ call TradeAnim_IncrementJumptableIndex
+ ret
+
+; 291e8
+
+TradeAnim_TubeToPlayer3: ; 291e8
+ call TradeAnim_FlashBGPals
+ ld a, [hSCX]
+ sub $2
+ ld [hSCX], a
+ cp $b0
+ ret nz
+ ld a, $1
+ call TradeAnim_TubeAnimJumptable
+ call TradeAnim_IncrementJumptableIndex
+ ret
+
+; 291fd
+
+TradeAnim_TubeToPlayer4: ; 291fd
+ call TradeAnim_FlashBGPals
+ ld a, [hSCX]
+ sub $2
+ ld [hSCX], a
+ cp $60
+ ret nz
+ xor a
+ call TradeAnim_TubeAnimJumptable
+ call TradeAnim_IncrementJumptableIndex
+ ret
+
+; 29211
+
+TradeAnim_TubeToPlayer5: ; 29211
+ call TradeAnim_FlashBGPals
+ ld a, [hSCX]
+ sub $2
+ ld [hSCX], a
+ and a
+ ret nz
+ call TradeAnim_IncrementJumptableIndex
+ ret
+
+; 29220
+
+TradeAnim_TubeToOT6:
+TradeAnim_TubeToPlayer6: ; 29220
+ ld a, $80
+ ld [wcf64], a
+ call TradeAnim_IncrementJumptableIndex
+ ret
+
+; 29229
+
+TradeAnim_TubeToOT8:
+TradeAnim_TubeToPlayer8: ; 29229
+ call ClearBGPalettes
+ call ClearTileMap
+ call ClearSprites
+ call DisableLCD
+ callfar ClearSpriteAnims
+ hlbgcoord 0, 0
+ ld bc, sScratch - VBGMap0
+ ld a, " "
+ call ByteFill
+ xor a
+ ld [hSCX], a
+ ld a, $90
+ ld [hWY], a
+ call EnableLCD
+ call LoadTradeBallAndCableGFX
+ call WaitBGMap
+ call TradeAnim_NormalPals
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 2925d
+
+TradeAnim_TubeToOT5:
+TradeAnim_TubeToOT7:
+TradeAnim_TubeToPlayer2:
+TradeAnim_TubeToPlayer7: ; 2925d
+ call TradeAnim_FlashBGPals
+ ld hl, wcf64
+ ld a, [hl]
+ and a
+ jr z, .done
+ dec [hl]
+ ret
+
+.done
+ call TradeAnim_IncrementJumptableIndex
+ ret
+
+; 2926d
+
+TradeAnim_GiveTrademonSFX: ; 2926d
+ call TradeAnim_AdvanceScriptPointer
+ ld de, SFX_GIVE_TRADEMON
+ call PlaySFX
+ ret
+
+; 29277
+
+TradeAnim_GetTrademonSFX: ; 29277
+ call TradeAnim_AdvanceScriptPointer
+ ld de, SFX_GET_TRADEMON
+ call PlaySFX
+ ret
+
+; 29281
+
+TradeAnim_TubeAnimJumptable: ; 29281
+ and 3
+ ld e, a
+ ld d, 0
+ ld hl, .Jumptable
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+; 2928f
+
+.Jumptable: ; 2928f
+ dw .Zero
+ dw .One
+ dw .Two
+ dw .Three
+; 29297
+
+.Zero: ; 29297
+.Three: ; 29297
+ call TradeAnim_BlankTileMap
+ hlcoord 9, 3
+ ld [hl], $5b
+ inc hl
+ ld bc, 10
+ ld a, $60
+ call ByteFill
+ hlcoord 3, 2
+ call TradeAnim_CopyTradeGameBoyTilemap
+ ret
+
+; 292af
+
+.One: ; 292af
+ call TradeAnim_BlankTileMap
+ hlcoord 0, 3
+ ld bc, SCREEN_WIDTH
+ ld a, $60
+ call ByteFill
+ ret
+
+; 292be
+
+.Two: ; 292be
+ call TradeAnim_BlankTileMap
+ hlcoord 0, 3
+ ld bc, $11
+ ld a, $60
+ call ByteFill
+ hlcoord 17, 3
+ ld a, $5d
+ ld [hl], a
+
+ ld a, $61
+ ld de, SCREEN_WIDTH
+ ld c, $3
+.loop
+ add hl, de
+ ld [hl], a
+ dec c
+ jr nz, .loop
+
+ add hl, de
+ ld a, $5f
+ ld [hld], a
+ ld a, $5b
+ ld [hl], a
+ hlcoord 10, 6
+ call TradeAnim_CopyTradeGameBoyTilemap
+ ret
+
+; 292ec
+
+TradeAnim_CopyTradeGameBoyTilemap: ; 292ec
+ ld de, TradeGameBoyTilemap
+ lb bc, 8, 6
+ call TradeAnim_CopyBoxFromDEtoHL
+ ret
+
+; 292f6
+
+TradeAnim_PlaceTrademonStatsOnTubeAnim: ; 292f6
+ push af
+ call ClearBGPalettes
+ call WaitTop
+ ld a, VBGMap1 / $100
+ ld [hBGMapAddress + 1], a
+ call ClearTileMap
+ hlcoord 0, 0
+ ld bc, SCREEN_WIDTH
+ ld a, "─"
+ call ByteFill
+ hlcoord 0, 1
+ ld de, wLinkPlayer1Name
+ call PlaceString
+ ld hl, wLinkPlayer2Name
+ ld de, 0
+.find_name_end_loop
+ ld a, [hli]
+ cp "@"
+ jr z, .done
+ dec de
+ jr .find_name_end_loop
+
+.done
+ hlcoord 0, 4
+ add hl, de
+ ld de, wLinkPlayer2Name
+ call PlaceString
+ hlcoord 7, 2
+ ld bc, 6
+ pop af
+ call ByteFill
+ call WaitBGMap
+ call WaitTop
+ ld a, VBGMap0 / $100
+ ld [hBGMapAddress + 1], a
+ call ClearTileMap
+ ret
+
+; 29348
+
+TradeAnim_EnterLinkTube1: ; 29348
+ call ClearTileMap
+ call WaitTop
+ ld a, $a0
+ ld [hSCX], a
+ call DelayFrame
+ hlcoord 8, 2
+ ld de, TradeLinkTubeTilemap
+ lb bc, 3, 12
+ call TradeAnim_CopyBoxFromDEtoHL
+ call WaitBGMap
+ ld b, SCGB_TRADE_TUBE
+ call GetSGBLayout
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbBGPals
+ lb de, %11100100, %11100100 ; 3,2,1,0, 3,2,1,0
+ call DmgToCgbObjPals
+ ld de, SFX_POTION
+ call PlaySFX
+ call TradeAnim_IncrementJumptableIndex
+ ret
+
+; 2937e
+
+TradeAnim_EnterLinkTube2: ; 2937e
+ ld a, [hSCX]
+ and a
+ jr z, .done
+ add $4
+ ld [hSCX], a
+ ret
+
+.done
+ ld c, 80
+ call DelayFrames
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 29391
+
+TradeAnim_ExitLinkTube: ; 29391
+ ld a, [hSCX]
+ cp $a0
+ jr z, .done
+ sub $4
+ ld [hSCX], a
+ ret
+
+.done
+ call ClearTileMap
+ xor a
+ ld [hSCX], a
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 293a6
+
+TradeAnim_SetupGivemonScroll: ; 293a6
+ ld a, $8f
+ ld [hWX], a
+ ld a, $88
+ ld [hSCX], a
+ ld a, $50
+ ld [hWY], a
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 293b6
+
+TradeAnim_DoGivemonScroll: ; 293b6
+ ld a, [hWX]
+ cp $7
+ jr z, .done
+ sub $4
+ ld [hWX], a
+ ld a, [hSCX]
+ sub $4
+ ld [hSCX], a
+ ret
+
+.done
+ ld a, $7
+ ld [hWX], a
+ xor a
+ ld [hSCX], a
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 293d2
+
+TradeAnim_FrontpicScrollStart: ; 293d2
+ ld a, $7
+ ld [hWX], a
+ ld a, $50
+ ld [hWY], a
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 293de
+
+TradeAnim_TextboxScrollStart: ; 293de
+ ld a, $7
+ ld [hWX], a
+ ld a, $90
+ ld [hWY], a
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 293ea
+
+TradeAnim_ScrollOutRight: ; 293ea
+ call WaitTop
+ ld a, VBGMap1 / $100
+ ld [hBGMapAddress + 1], a
+ call WaitBGMap
+ ld a, $7
+ ld [hWX], a
+ xor a
+ ld [hWY], a
+ call DelayFrame
+ call WaitTop
+ ld a, VBGMap0 / $100
+ ld [hBGMapAddress + 1], a
+ call ClearTileMap
+ call TradeAnim_IncrementJumptableIndex
+ ret
+
+; 2940c
+
+TradeAnim_ScrollOutRight2: ; 2940c
+ ld a, [hWX]
+ cp $a1
+ jr nc, .done
+ add $4
+ ld [hWX], a
+ ret
+
+.done
+ ld a, VBGMap1 / $100
+ ld [hBGMapAddress + 1], a
+ call WaitBGMap
+ ld a, $7
+ ld [hWX], a
+ ld a, $90
+ ld [hWY], a
+ ld a, VBGMap0 / $100
+ ld [hBGMapAddress + 1], a
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 2942e
+
+TradeAnim_ShowGivemonData: ; 2942e
+ call ShowPlayerTrademonStats
+ ld a, [wPlayerTrademonSpecies]
+ ld [CurPartySpecies], a
+ ld a, [wPlayerTrademonDVs]
+ ld [TempMonDVs], a
+ ld a, [wPlayerTrademonDVs + 1]
+ ld [TempMonDVs + 1], a
+ ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
+ call GetSGBLayout
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbBGPals
+ call TradeAnim_ShowGivemonFrontpic
+
+ ld a, [wPlayerTrademonSpecies]
+ call GetCryIndex
+ jr c, .skip_cry
+ ld e, c
+ ld d, b
+ call PlayCryHeader
+.skip_cry
+
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 29461
+
+TradeAnim_ShowGetmonData: ; 29461
+ call ShowOTTrademonStats
+ ld a, [wOTTrademonSpecies]
+ ld [CurPartySpecies], a
+ ld a, [wOTTrademonDVs]
+ ld [TempMonDVs], a
+ ld a, [wOTTrademonDVs + 1]
+ ld [TempMonDVs + 1], a
+ ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
+ call GetSGBLayout
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbBGPals
+ call TradeAnim_ShowGetmonFrontpic
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 29487
+
+TradeAnim_AnimateFrontpic: ; 29487
+ farcall AnimateTrademonFrontpic
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 29491
+
+TradeAnim_GetFrontpic: ; 29491
+ push de
+ push af
+ predef GetUnownLetter
+ pop af
+ ld [CurPartySpecies], a
+ ld [CurSpecies], a
+ call GetBaseData
+ pop de
+ predef GetMonFrontpic
+ ret
+
+; 294a9
+
+TradeAnim_GetNickname: ; 294a9
+ push de
+ ld [wd265], a
+ call GetPokemonName
+ ld hl, StringBuffer1
+ pop de
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ ret
+
+; 294bb
+
+TradeAnim_ShowGivemonFrontpic: ; 294bb
+ ld de, VTiles0
+ jr TradeAnim_ShowFrontpic
+
+TradeAnim_ShowGetmonFrontpic: ; 294c0
+ ld de, VTiles0 tile $31
+TradeAnim_ShowFrontpic: ; 294c3
+ call DelayFrame
+ ld hl, VTiles2
+ lb bc, 10, $31
+ call Request2bpp
+ call WaitTop
+ call TradeAnim_BlankTileMap
+ hlcoord 7, 2
+ xor a
+ ld [hGraphicStartTile], a
+ lb bc, 7, 7
+ predef PlaceGraphic
+ call WaitBGMap
+ ret
+
+; 294e7
+
+TraideAnim_Wait80: ; 294e7
+ ld c, 80
+ call DelayFrames
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 294f0
+
+TraideAnim_Wait40: ; 294f0
+ ld c, 40
+ call DelayFrames
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 294f9
+
+TraideAnim_Wait96: ; 294f9
+ ld c, 96
+ call DelayFrames
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 29502
+
+TraideAnim_Wait80IfOTEgg: ; 29502
+ call IsOTTrademonEgg
+ ret nz
+ ld c, 80
+ call DelayFrames
+ ret
+
+; 2950c
+
+TraideAnim_Wait180IfOTEgg: ; 2950c
+ call IsOTTrademonEgg
+ ret nz
+ ld c, 180
+ call DelayFrames
+ ret
+
+; 29516
+
+IsOTTrademonEgg: ; 29516
+ call TradeAnim_AdvanceScriptPointer
+ ld a, [wOTTrademonSpecies]
+ cp EGG
+ ret
+
+; 2951f
+ShowPlayerTrademonStats: ; 2951f
+ ld de, wPlayerTrademonSpecies
+ ld a, [de]
+ cp EGG
+ jr z, TrademonStats_Egg
+ call TrademonStats_MonTemplate
+ ld de, wPlayerTrademonSpecies
+ call TrademonStats_PrintSpeciesNumber
+ ld de, wPlayerTrademonSpeciesName
+ call TrademonStats_PrintSpeciesName
+ ld a, [wPlayerTrademonCaughtData]
+ ld de, wPlayerTrademonOTName
+ call TrademonStats_PrintOTName
+ ld de, wPlayerTrademonID
+ call TrademonStats_PrintTrademonID
+ call TrademonStats_WaitBGMap
+ ret
+
+; 29549
+
+ShowOTTrademonStats: ; 29549
+ ld de, wOTTrademonSpecies
+ ld a, [de]
+ cp EGG
+ jr z, TrademonStats_Egg
+ call TrademonStats_MonTemplate
+ ld de, wOTTrademonSpecies
+ call TrademonStats_PrintSpeciesNumber
+ ld de, wOTTrademonSpeciesName
+ call TrademonStats_PrintSpeciesName
+ ld a, [wOTTrademonCaughtData]
+ ld de, wOTTrademonOTName
+ call TrademonStats_PrintOTName
+ ld de, wOTTrademonID
+ call TrademonStats_PrintTrademonID
+ call TrademonStats_WaitBGMap
+ ret
+
+; 29573
+
+TrademonStats_MonTemplate: ; 29573
+ call WaitTop
+ call TradeAnim_BlankTileMap
+ ld a, VBGMap1 / $100
+ ld [hBGMapAddress + 1], a
+ hlcoord 3, 0
+ ld b, $6
+ ld c, $d
+ call TextBox
+ hlcoord 4, 0
+ ld de, .OTMonData
+ call PlaceString
+ ret
+
+; 29591
+
+.OTMonData: ; 29591
+ db "─── №."
+ next ""
+ next "OT/"
+ next "<ID>№.@"
+; 295a1
+
+TrademonStats_Egg: ; 295a1
+ call WaitTop
+ call TradeAnim_BlankTileMap
+ ld a, VBGMap1 / $100
+ ld [hBGMapAddress + 1], a
+ hlcoord 3, 0
+ ld b, 6
+ ld c, 13
+ call TextBox
+ hlcoord 4, 2
+ ld de, .EggData
+ call PlaceString
+ call TrademonStats_WaitBGMap
+ ret
+
+; 295c2
+
+.EggData: ; 295c2
+ db "EGG"
+ next "OT/?????"
+ next "<ID>№.?????@"
+; 295d8
+
+TrademonStats_WaitBGMap: ; 295d8
+ call WaitBGMap
+ call WaitTop
+ ld a, VBGMap0 / $100
+ ld [hBGMapAddress + 1], a
+ ret
+
+; 295e3
+
+TrademonStats_PrintSpeciesNumber: ; 295e3
+ hlcoord 10, 0
+ lb bc, PRINTNUM_LEADINGZEROS | 1, 3
+ call PrintNum
+ ld [hl], " "
+ ret
+
+; 295ef
+
+TrademonStats_PrintSpeciesName: ; 295ef
+ hlcoord 4, 2
+ call PlaceString
+ ret
+
+; 295f6
+
+TrademonStats_PrintOTName: ; 295f6
+ cp 3
+ jr c, .caught_gender_okay
+ xor a
+.caught_gender_okay
+ push af
+ hlcoord 7, 4
+ call PlaceString
+ inc bc
+ pop af
+ ld hl, .Gender
+ ld d, 0
+ ld e, a
+ add hl, de
+ ld a, [hl]
+ ld [bc], a
+ ret
+
+; 2960e
+
+.Gender: ; 2960e
+ db " ", "♂", "♀"
+; 29611
+
+TrademonStats_PrintTrademonID: ; 29611
+ hlcoord 7, 6
+ lb bc, PRINTNUM_LEADINGZEROS | 2, 5
+ call PrintNum
+ ret
+
+; 2961b
+
+TradeAnim_RockingBall: ; 2961b
+ depixel 10, 11, 4, 0
+ ld a, SPRITE_ANIM_INDEX_TRADE_POKE_BALL
+ call _InitSpriteAnimStruct
+ call TradeAnim_AdvanceScriptPointer
+ ld a, $20
+ ld [wcf64], a
+ ret
+
+; 2962c
+
+TradeAnim_DropBall: ; 2962c
+ depixel 10, 11, 4, 0
+ ld a, SPRITE_ANIM_INDEX_TRADE_POKE_BALL
+ call _InitSpriteAnimStruct
+ ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
+ add hl, bc
+ ld [hl], $1
+ ld hl, SPRITEANIMSTRUCT_YOFFSET
+ add hl, bc
+ ld [hl], $dc
+ call TradeAnim_AdvanceScriptPointer
+ ld a, $38
+ ld [wcf64], a
+ ret
+
+; 29649
+
+TradeAnim_Poof: ; 29649
+ depixel 10, 11, 4, 0
+ ld a, SPRITE_ANIM_INDEX_TRADE_POOF
+ call _InitSpriteAnimStruct
+ call TradeAnim_AdvanceScriptPointer
+ ld a, $10
+ ld [wcf64], a
+ ld de, SFX_BALL_POOF
+ call PlaySFX
+ ret
+
+; 29660
+
+TradeAnim_BulgeThroughTube: ; 29660
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbObjPal0
+ depixel 5, 11
+ ld a, SPRITE_ANIM_INDEX_TRADE_TUBE_BULGE
+ call _InitSpriteAnimStruct
+ call TradeAnim_AdvanceScriptPointer
+ ld a, $40
+ ld [wcf64], a
+ ret
+
+; 29676
+
+TradeAnim_AnimateTrademonInTube: ; 29676 (a:5676)
+ ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
+ add hl, bc
+ ld e, [hl]
+ ld d, 0
+ ld hl, .Jumptable
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+; 29686
+
+.Jumptable: ; 29686 (a:5686)
+ dw .InitTimer
+ dw .WaitTimer1
+ dw .MoveRight
+ dw .MoveDown
+ dw .MoveUp
+ dw .MoveLeft
+ dw .WaitTimer2
+; 2969a
+
+.JumptableNext: ; 29694 (a:5694)
+ ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
+ add hl, bc
+ inc [hl]
+ ret
+
+.InitTimer: ; 2969a (a:569a)
+ call .JumptableNext
+ ld hl, SPRITEANIMSTRUCT_0C
+ add hl, bc
+ ld [hl], $80
+ ret
+
+.WaitTimer1: ; 296a4 (a:56a4)
+ ld hl, SPRITEANIMSTRUCT_0C
+ add hl, bc
+ ld a, [hl]
+ dec [hl]
+ and a
+ ret nz
+ call .JumptableNext
+
+.MoveRight: ; 296af (a:56af)
+ ld hl, SPRITEANIMSTRUCT_XCOORD
+ add hl, bc
+ ld a, [hl]
+ cp $94
+ jr nc, .done_move_right
+ inc [hl]
+ ret
+
+.done_move_right
+ call .JumptableNext
+
+.MoveDown: ; 296bd (a:56bd)
+ ld hl, SPRITEANIMSTRUCT_YCOORD
+ add hl, bc
+ ld a, [hl]
+ cp $4c
+ jr nc, .done_move_down
+ inc [hl]
+ ret
+
+.done_move_down
+ ld hl, SPRITEANIMSTRUCT_INDEX
+ add hl, bc
+ ld [hl], $0
+ ret
+
+.MoveUp: ; 296cf (a:56cf)
+ ld hl, SPRITEANIMSTRUCT_YCOORD
+ add hl, bc
+ ld a, [hl]
+ cp $2c
+ jr z, .done_move_up
+ dec [hl]
+ ret
+
+.done_move_up
+ call .JumptableNext
+
+.MoveLeft: ; 296dd (a:56dd)
+ ld hl, SPRITEANIMSTRUCT_XCOORD
+ add hl, bc
+ ld a, [hl]
+ cp $58
+ jr z, .done_move_left
+ dec [hl]
+ ret
+
+.done_move_left
+ call .JumptableNext
+ ld hl, SPRITEANIMSTRUCT_0C
+ add hl, bc
+ ld [hl], $80
+ ret
+
+.WaitTimer2: ; 296f2 (a:56f2)
+ ld hl, SPRITEANIMSTRUCT_0C
+ add hl, bc
+ ld a, [hl]
+ dec [hl]
+ and a
+ ret nz
+ ld hl, SPRITEANIMSTRUCT_INDEX
+ add hl, bc
+ ld [hl], $0
+ ret
+
+; 29701 (a:5701)
+
+TradeAnim_SentToOTText: ; 29701
+ ld a, [wLinkMode]
+ cp LINK_TIMECAPSULE
+ jr z, .time_capsule
+ ld hl, .Text_MonName
+ call PrintText
+ ld c, 189
+ call DelayFrames
+ ld hl, .Text_WasSentTo
+ call PrintText
+ call TradeAnim_Wait80Frames
+ ld c, 128
+ call DelayFrames
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+.time_capsule
+ ld hl, .Text_WasSentTo
+ call PrintText
+ call TradeAnim_Wait80Frames
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 29732
+
+.Text_WasSentTo: ; 0x29732
+ ; was sent to @ .
+ text_jump UnknownText_0x1bc6e9
+ db "@"
+; 0x29737
+
+.Text_MonName: ; 0x29737
+ ;
+ text_jump UnknownText_0x1bc701
+ db "@"
+; 0x2973c
+
+TradeAnim_OTBidsFarewell: ; 2973c
+ ld hl, .Text_BidsFarewellToMon
+ call PrintText
+ call TradeAnim_Wait80Frames
+ ld hl, .Text_MonName
+ call PrintText
+ call TradeAnim_Wait80Frames
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 29752
+
+.Text_BidsFarewellToMon: ; 0x29752
+ ; bids farewell to
+ text_jump UnknownText_0x1bc703
+ db "@"
+; 0x29757
+
+.Text_MonName: ; 0x29757
+ ; .
+ text_jump UnknownText_0x1bc719
+ db "@"
+; 0x2975c
+
+TradeAnim_TakeCareOfText: ; 2975c
+ call WaitTop
+ hlcoord 0, 10
+ ld bc, 8 * SCREEN_WIDTH
+ ld a, " "
+ call ByteFill
+ call WaitBGMap
+ ld hl, .Text_TakeGoodCareOfMon
+ call PrintText
+ call TradeAnim_Wait80Frames
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 2977a
+
+.Text_TakeGoodCareOfMon: ; 0x2977a
+ ; Take good care of @ .
+ text_jump UnknownText_0x1bc71f
+ db "@"
+; 0x2977f
+
+TradeAnim_OTSendsText1: ; 2977f
+ ld hl, .Text_ForYourMon
+ call PrintText
+ call TradeAnim_Wait80Frames
+ ld hl, .Text_OTSends
+ call PrintText
+ call TradeAnim_Wait80Frames
+ ld c, 14
+ call DelayFrames
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 2979a
+
+.Text_ForYourMon: ; 0x2979a
+ ; For @ 's @ ,
+ text_jump UnknownText_0x1bc739
+ db "@"
+; 0x2979f
+
+.Text_OTSends: ; 0x2979f
+ ; sends @ .
+ text_jump UnknownText_0x1bc74c
+ db "@"
+; 0x297a4
+
+TradeAnim_OTSendsText2: ; 297a4
+ ld hl, .Text_WillTrade
+ call PrintText
+ call TradeAnim_Wait80Frames
+ ld hl, .Text_ForYourMon
+ call PrintText
+ call TradeAnim_Wait80Frames
+ ld c, 14
+ call DelayFrames
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 297bf
+
+.Text_WillTrade: ; 0x297bf
+ ; will trade @ @
+ text_jump UnknownText_0x1bc75e
+ db "@"
+; 0x297c4
+
+.Text_ForYourMon: ; 0x297c4
+ ; for @ 's @ .
+ text_jump UnknownText_0x1bc774
+ db "@"
+; 0x297c9
+
+TradeAnim_Wait80Frames: ; 297c9
+ ld c, 80
+ call DelayFrames
+ ret
+
+; 297cf
+
+TradeAnim_BlankTileMap: ; 297cf
+ hlcoord 0, 0
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ ld a, " "
+ call ByteFill
+ ret
+
+; 297db
+
+TradeAnim_CopyBoxFromDEtoHL: ; 297db
+.row
+ push bc
+ push hl
+.col
+ ld a, [de]
+ inc de
+ ld [hli], a
+ dec c
+ jr nz, .col
+ pop hl
+ ld bc, SCREEN_WIDTH
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .row
+ ret
+
+; 297ed
+
+TradeAnim_NormalPals: ; 297ed
+ ld a, [hSGB]
+ and a
+ ld a, %11100100 ; 3,2,1,0
+ jr z, .not_sgb
+ ld a, $f0
+
+.not_sgb
+ call DmgToCgbObjPal0
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbBGPals
+ ret
+
+; 297ff
+
+LinkTradeAnim_LoadTradePlayerNames: ; 297ff
+ push de
+ ld de, wLinkPlayer1Name
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ pop hl
+ ld de, wLinkPlayer2Name
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ ret
+
+; 29814
+
+LinkTradeAnim_LoadTradeMonSpecies: ; 29814
+ ld a, [hl]
+ ld [wLinkTradeSendmonSpecies], a
+ ld a, [de]
+ ld [wLinkTradeGetmonSpecies], a
+ ret
+
+; 2981d
+
+TradeAnim_FlashBGPals: ; 2981d
+ ld a, [wcf65]
+ and $7
+ ret nz
+ ld a, [rBGP]
+ xor %00111100
+ call DmgToCgbBGPals
+ ret
+
+; 2982b
+
+LoadTradeBallAndCableGFX: ; 2982b
+ call DelayFrame
+ ld de, TradeBallGFX
+ ld hl, VTiles0 tile $62
+ lb bc, BANK(TradeBallGFX), $6
+ call Request2bpp
+ ld de, TradePoofGFX
+ ld hl, VTiles0 tile $68
+ lb bc, BANK(TradePoofGFX), $c
+ call Request2bpp
+ ld de, TradeCableGFX
+ ld hl, VTiles0 tile $74
+ lb bc, BANK(TradeCableGFX), $4
+ call Request2bpp
+ xor a
+ ld hl, wSpriteAnimDict
+ ld [hli], a
+ ld [hl], $62
+ ret
+
+; 2985a
+
+LoadTradeBubbleGFX: ; 2985a
+ call DelayFrame
+ ld e, $3
+ callfar LoadMenuMonIcon
+ ld de, TradeBubbleGFX
+ ld hl, VTiles0 tile $72
+ lb bc, BANK(TradeBubbleGFX), $4
+ call Request2bpp
+ xor a
+ ld hl, wSpriteAnimDict
+ ld [hli], a
+ ld [hl], $62
+ ret
+
+; 29879
+
+TradeAnim_WaitAnim: ; 29879
+ ld hl, wcf64
+ ld a, [hl]
+ and a
+ jr z, .done
+ dec [hl]
+ ret
+
+.done
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 29886
+
+TradeAnim_WaitAnim2: ; 29886
+ ld hl, wcf64
+ ld a, [hl]
+ and a
+ jr z, .done
+ dec [hl]
+ ret
+
+.done
+ call TradeAnim_AdvanceScriptPointer
+ ret
+
+; 29893
+
+
+DebugTrade: ; 29893
+; This function is unreferenced.
+; It was meant for use in Japanese versions, so the
+; constant used for copy length was changed by accident.
+
+ ld hl, .DebugTradeData
+
+ ld a, [hli]
+ ld [wPlayerTrademonSpecies], a
+ ld de, wPlayerTrademonSenderName
+ ld c, 11 + 2 ; jp: 6 + 2
+.loop1
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .loop1
+
+ ld a, [hli]
+ ld [wOTTrademonSpecies], a
+ ld de, wOTTrademonSenderName
+ ld c, 11 + 2 ; jp: 6 + 2
+.loop2
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .loop2
+ ret
+
+; 298b5
+
+.DebugTradeData: ; 298b5
+ db VENUSAUR, "ゲーフり@@", $23, $01 ; GAME FREAK
+ db CHARIZARD, "クりーチャ@", $56, $04 ; Creatures Inc.
+; 298c7
+
+
+TradeGameBoyTilemap: ; 298c7
+; 6x8
+ db $31, $32, $32, $32, $32, $33
+ db $34, $35, $36, $36, $37, $38
+ db $34, $39, $3a, $3a, $3b, $38
+ db $3c, $3d, $3e, $3e, $3f, $40
+ db $41, $42, $43, $43, $44, $45
+ db $46, $47, $43, $48, $49, $4a
+ db $41, $43, $4b, $4c, $4d, $4e
+ db $4f, $50, $50, $50, $51, $52
+; 297f7
+
+TradeLinkTubeTilemap: ; 297f7
+; 12x3
+ db $43, $55, $56, $53, $53, $53, $53, $53, $53, $53, $53, $53
+ db $43, $57, $58, $54, $54, $54, $54, $54, $54, $54, $54, $54
+ db $43, $59, $5a, $43, $43, $43, $43, $43, $43, $43, $43, $43
+; 2991b
+
+TradeArrowGFX: INCBIN "gfx/trade/arrow.2bpp"
+TradeCableGFX: INCBIN "gfx/trade/cable.2bpp"
+TradeBubbleGFX: INCBIN "gfx/trade/bubble.2bpp"
+TradeGameBoyLZ: INCBIN "gfx/trade/game_boy.2bpp.lz"
+TradeBallGFX: INCBIN "gfx/trade/ball.2bpp"
+TradePoofGFX: INCBIN "gfx/trade/poof.2bpp"
diff --git a/engine/trainer_card.asm b/engine/trainer_card.asm
index 23defe919..01a033650 100755
--- a/engine/trainer_card.asm
+++ b/engine/trainer_card.asm
@@ -34,7 +34,7 @@ TrainerCard: ; 25105
call ClearTileMap
call DisableLCD
- callba GetCardPic
+ farcall GetCardPic
ld hl, CardRightCornerGFX
ld de, VTiles2 tile $1c
@@ -448,7 +448,7 @@ TrainerCard_Page1_PrintGameTime: ; 25415 (9:5415)
ret nz
hlcoord 15, 12
ld a, [hl]
- xor %01010001 ; $7F <--> $2E
+ xor " " ^ $2e ; alternate between space and small colon ($2e) tiles
ld [hl], a
ret
@@ -606,11 +606,11 @@ TrainerCard_JohtoBadgesOAM: ; 254c9
db $1c | $80, $20, $24, $20 | $80
; 25523
-CardStatusGFX: INCBIN "gfx/misc/card_status.2bpp"
+CardStatusGFX: INCBIN "gfx/trainer_card/card_status.2bpp"
-LeaderGFX: INCBIN "gfx/misc/leaders.2bpp"
-LeaderGFX2: INCBIN "gfx/misc/leaders.2bpp"
-BadgeGFX: INCBIN "gfx/misc/badges.2bpp"
-BadgeGFX2: INCBIN "gfx/misc/badges.2bpp"
+LeaderGFX: INCBIN "gfx/trainer_card/leaders.2bpp"
+LeaderGFX2: INCBIN "gfx/trainer_card/leaders.2bpp"
+BadgeGFX: INCBIN "gfx/trainer_card/badges.2bpp"
+BadgeGFX2: INCBIN "gfx/trainer_card/badges.2bpp"
-CardRightCornerGFX: INCBIN "gfx/misc/card_right_corner.2bpp"
+CardRightCornerGFX: INCBIN "gfx/trainer_card/card_right_corner.2bpp"
diff --git a/engine/trainer_scripts.asm b/engine/trainer_scripts.asm
new file mode 100644
index 000000000..212cd7f28
--- /dev/null
+++ b/engine/trainer_scripts.asm
@@ -0,0 +1,31 @@
+TalkToTrainerScript:: ; 0xbe66a
+ faceplayer
+ trainerflagaction CHECK_FLAG
+ iftrue AlreadyBeatenTrainerScript
+ loadmemtrainer
+ encountermusic
+ jump StartBattleWithMapTrainerScript
+
+SeenByTrainerScript:: ; 0xbe675
+ loadmemtrainer
+ encountermusic
+ showemote EMOTE_SHOCK, LAST_TALKED, 30
+ callasm TrainerWalkToPlayer
+ applymovement2 MovementBuffer
+ writeobjectxy LAST_TALKED
+ faceobject PLAYER, LAST_TALKED
+ jump StartBattleWithMapTrainerScript
+
+StartBattleWithMapTrainerScript: ; 0xbe68a
+ opentext
+ trainertext $0
+ waitbutton
+ closetext
+ loadmemtrainer
+ startbattle
+ reloadmapafterbattle
+ trainerflagaction SET_FLAG
+ loadvar wRunningTrainerBattleScript, -1
+
+AlreadyBeatenTrainerScript:
+ scripttalkafter
diff --git a/engine/unown_dex.asm b/engine/unown_dex.asm
new file mode 100755
index 000000000..dc6db9dc6
--- /dev/null
+++ b/engine/unown_dex.asm
@@ -0,0 +1,52 @@
+UpdateUnownDex: ; fba18
+ ld a, [UnownLetter]
+ ld c, a
+ ld b, NUM_UNOWN
+ ld hl, UnownDex
+.loop
+ ld a, [hli]
+ and a
+ jr z, .done
+ cp c
+ ret z
+ dec b
+ jr nz, .loop
+ ret
+
+.done
+ dec hl
+ ld [hl], c
+ ret
+; fba2e
+
+PrintUnownWord: ; fba2e (3e:7a2e)
+ hlcoord 4, 15
+ ld bc, 12
+ ld a, " "
+ call ByteFill
+ ld a, [wDexCurrentUnownIndex]
+ ld e, a
+ ld d, 0
+ ld hl, UnownDex
+ add hl, de
+ ld a, [hl]
+ ld e, a
+ ld d, 0
+ ld hl, UnownWords
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld e, a
+ ld d, [hl]
+ hlcoord 4, 15
+.loop
+ ld a, [de]
+ cp -1
+ ret z
+ inc de
+ ld [hli], a
+ jr .loop
+; fba5a (3e:7a5a)
+
+
+INCLUDE "data/unown_words.asm"
diff --git a/engine/unown_puzzle.asm b/engine/unown_puzzle.asm
index a1fed2520..3afe8a17d 100755
--- a/engine/unown_puzzle.asm
+++ b/engine/unown_puzzle.asm
@@ -1,7 +1,8 @@
-puzcoord EQUS "* 6 +"
PUZZLE_BORDER EQU $ee
PUZZLE_VOID EQU $ef
+puzcoord EQUS "* 6 +"
+
UnownPuzzle: ; e1190
ld a, [hInMenu]
push af
@@ -13,7 +14,7 @@ UnownPuzzle: ; e1190
xor a
ld [hBGMapMode], a
call DisableLCD
- ld hl, wMisc
+ ld hl, wMisc ; includes wPuzzlePieces
ld bc, wMiscEnd - wMisc
xor a
call ByteFill
diff --git a/engine/unowndex.asm b/engine/unowndex.asm
deleted file mode 100755
index d7fe63dc3..000000000
--- a/engine/unowndex.asm
+++ /dev/null
@@ -1,118 +0,0 @@
-UpdateUnownDex: ; fba18
- ld a, [UnownLetter]
- ld c, a
- ld b, 26
- ld hl, UnownDex
-.loop
- ld a, [hli]
- and a
- jr z, .done
- cp c
- ret z
- dec b
- jr nz, .loop
- ret
-
-.done
- dec hl
- ld [hl], c
- ret
-; fba2e
-
-
-PrintUnownWord: ; fba2e (3e:7a2e)
- hlcoord 4, 15
- ld bc, 12
- ld a, " "
- call ByteFill
- ld a, [wDexCurrentUnownIndex]
- ld e, a
- ld d, 0
- ld hl, UnownDex
- add hl, de
- ld a, [hl]
- ld e, a
- ld d, 0
- ld hl, UnownWords
- add hl, de
- add hl, de
- ld a, [hli]
- ld e, a
- ld d, [hl]
- hlcoord 4, 15
-.loop
- ld a, [de]
- cp -1
- ret z
- inc de
- ld [hli], a
- jr .loop
-; fba5a (3e:7a5a)
-
-UnownWords: ; fba5a
- dw UnownWord1
- dw UnownWord1
- dw UnownWord2
- dw UnownWord3
- dw UnownWord4
- dw UnownWord5
- dw UnownWord6
- dw UnownWord7
- dw UnownWord8
- dw UnownWord9
- dw UnownWord10
- dw UnownWord11
- dw UnownWord12
- dw UnownWord13
- dw UnownWord14
- dw UnownWord15
- dw UnownWord16
- dw UnownWord17
- dw UnownWord18
- dw UnownWord19
- dw UnownWord20
- dw UnownWord21
- dw UnownWord22
- dw UnownWord23
- dw UnownWord24
- dw UnownWord25
- dw UnownWord26
-; fba90
-
-unownword: macro
-x = 1
- rept STRLEN(\1)
- db STRSUB(\1, x, 1) - $40
-x = x + 1
- endr
- db -1
-endm
-
-
-UnownWord1: unownword "ANGRY"
-UnownWord2: unownword "BEAR"
-UnownWord3: unownword "CHASE"
-UnownWord4: unownword "DIRECT"
-UnownWord5: unownword "ENGAGE"
-UnownWord6: unownword "FIND"
-UnownWord7: unownword "GIVE"
-UnownWord8: unownword "HELP"
-UnownWord9: unownword "INCREASE"
-UnownWord10: unownword "JOIN"
-UnownWord11: unownword "KEEP"
-UnownWord12: unownword "LAUGH"
-UnownWord13: unownword "MAKE"
-UnownWord14: unownword "NUZZLE"
-UnownWord15: unownword "OBSERVE"
-UnownWord16: unownword "PERFORM"
-UnownWord17: unownword "QUICKEN"
-UnownWord18: unownword "REASSURE"
-UnownWord19: unownword "SEARCH"
-UnownWord20: unownword "TELL"
-UnownWord21: unownword "UNDO"
-UnownWord22: unownword "VANISH"
-UnownWord23: unownword "WANT"
-UnownWord24: unownword "XXXXX"
-UnownWord25: unownword "YIELD"
-UnownWord26: unownword "ZOOM"
-; fbb32
diff --git a/engine/unused_title.asm b/engine/unused_title.asm
new file mode 100644
index 000000000..2075d86d9
--- /dev/null
+++ b/engine/unused_title.asm
@@ -0,0 +1,201 @@
+UnusedTitleScreen: ; 10c000
+
+ call ClearBGPalettes
+ call ClearTileMap
+ call DisableLCD
+
+; Turn BG Map update off
+ xor a
+ ld [hBGMapMode], a
+
+; Reset timing variables
+ ld hl, wJumptableIndex
+ ld [hli], a ; wJumptableIndex
+ ld [hli], a ; wIntroSceneFrameCounter
+ ld [hli], a ; wTitleScreenTimer
+ ld [hl], a ; wTitleScreenTimer + 1
+
+ ld hl, UnusedTitleBG_GFX
+ ld de, VTiles2
+ ld bc, VBGMap0 - VTiles2
+ call CopyBytes
+
+ ld hl, UnusedTitleBG_GFX + $80 tiles
+ ld de, VTiles1
+ ld bc, VTiles2 - VTiles1
+ call CopyBytes
+
+ ld hl, UnusedTitleFG_GFX
+ ld de, VTiles0
+ ld bc, VTiles1 - VTiles0
+ call CopyBytes
+
+ ld hl, UnusedTitleBG_Tilemap
+ debgcoord 0, 0
+ ld bc, 32 * 32
+.copy
+ ld a, 0
+ ld [rVBK], a
+ ld a, [hli]
+ ld [de], a
+ ld a, 1
+ ld [rVBK], a
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec bc
+ ld a, b
+ or c
+ jr nz, .copy
+
+ ld hl, UnusedTitleFG_OAM
+ ld de, Sprites
+ ld bc, $a0
+ call CopyBytes
+
+ call EnableLCD
+ ld a, [rLCDC]
+ set 1, a
+ set 2, a
+ ld [rLCDC], a
+
+ call DelayFrame
+
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+
+ ld hl, UnusedTitleBG_Palettes
+ ld de, UnknBGPals
+ ld bc, 8 palettes
+ call CopyBytes
+
+ ld hl, UnusedTitleFG_Palettes
+ ld de, UnknOBPals
+ ld bc, 8 palettes
+ call CopyBytes
+
+ ld hl, UnusedTitleBG_Palettes
+ ld de, BGPals
+ ld bc, 8 palettes
+ call CopyBytes
+
+ ld hl, UnusedTitleFG_Palettes
+ ld de, OBPals
+ ld bc, 8 palettes
+ call CopyBytes
+
+ pop af
+ ld [rSVBK], a
+
+ ld a, $1
+ ld [hCGBPalUpdate], a
+
+ ld de, MUSIC_TITLE
+ call PlayMusic
+
+ ret
+; 10c0b1
+
+UnusedTitleBG_GFX: ; 10c0b1
+INCBIN "gfx/title/old_bg.2bpp"
+; 10d0b1
+
+UnusedTitleBG_Tilemap: ; 10d0b1
+; 32x32 (tile, attributes)
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $01,$00, $02,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $03,$00, $04,$00, $05,$01, $06,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $07,$05, $08,$05, $09,$05, $0a,$05, $0b,$00, $0c,$00, $0d,$00, $0e,$00, $0f,$01, $10,$01, $11,$01, $12,$01, $13,$05, $14,$05, $15,$05, $16,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $17,$04, $18,$04, $19,$04, $1a,$04, $1b,$00, $1c,$00, $1d,$02, $1e,$02, $1f,$07, $20,$07, $21,$01, $22,$01, $23,$04, $24,$04, $25,$04, $26,$04, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $27,$04, $28,$04, $29,$04, $2a,$04, $2b,$00, $2c,$00, $2d,$03, $2e,$01, $2f,$01, $30,$01, $31,$01, $32,$01, $33,$04, $34,$04, $35,$04, $36,$04, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $37,$04, $38,$04, $39,$04, $3a,$04, $3b,$00, $3c,$00, $3d,$01, $00,$00, $00,$00, $3e,$07, $3f,$01, $40,$01, $41,$04, $42,$04, $43,$04, $44,$04, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $45,$04, $46,$04, $47,$04, $48,$04, $49,$00, $3c,$00, $4a,$01, $00,$00, $00,$00, $4b,$07, $3f,$01, $4c,$01, $4d,$06, $4e,$06, $4f,$06, $50,$06, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $51,$04, $52,$06, $53,$06, $54,$06, $55,$00, $3c,$00, $56,$01, $00,$00, $00,$00, $57,$07, $58,$01, $59,$01, $5a,$06, $5b,$06, $5c,$06, $5d,$06, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $5e,$06, $5f,$06, $60,$06, $61,$06, $62,$00, $63,$00, $64,$03, $65,$01, $66,$01, $67,$07, $68,$01, $69,$01, $26,$04, $6a,$06, $26,$04, $26,$04, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $6b,$00, $6c,$05, $6d,$05, $6e,$05, $6f,$00, $70,$02, $71,$02, $72,$01, $73,$00, $74,$02, $75,$01, $76,$01, $77,$05, $78,$05, $79,$05, $6b,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $7a,$00, $7b,$00, $7c,$00, $7d,$00, $0f,$01, $7e,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $a2,$00, $80,$00, $81,$00, $82,$00, $83,$00, $84,$07, $85,$01, $86,$01, $87,$01, $88,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $89,$00, $8a,$00, $8b,$00, $8c,$07, $8d,$01, $8e,$01, $8f,$01, $90,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $91,$01, $92,$01, $93,$01, $94,$01, $95,$01, $00,$00, $00,$00, $00,$00, $96,$05, $97,$05, $98,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $99,$05, $9a,$05, $9b,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $9c,$05, $9d,$05, $9e,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $9f,$05, $a0,$05, $a1,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $6b,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+ db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
+; 10d8b1
+
+UnusedTitleBG_Palettes: ; 10d8b1
+INCLUDE "data/palettes/unused_title/bg.pal"
+
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+
+ RGB 31, 31, 31
+ RGB 20, 04, 20
+ RGB 16, 08, 16
+ RGB 24, 00, 24
+
+rept 54
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+endr
+; 10dab1
+
+UnusedTitleFG_GFX: ; 10dab1
+INCBIN "gfx/title/old_fg.2bpp"
+; 10eab1
+
+UnusedTitleFG_Palettes: ; 10eab1
+INCLUDE "data/palettes/unused_title/ob.pal"
+; 10ecb1
+
+UnusedTitleFG_OAM: ; 10ecb1
+ db $18, $38, $00, $01, $18, $40, $02, $01, $18, $48, $04, $01, $18, $50, $06, $01
+ db $18, $58, $08, $01, $18, $60, $0a, $01, $18, $68, $0c, $01, $18, $70, $0e, $01
+
+ db $28, $38, $10, $00, $28, $40, $12, $00, $28, $48, $14, $00, $28, $50, $16, $00
+ db $28, $58, $18, $00, $28, $60, $1a, $00, $28, $68, $1c, $00, $28, $70, $1e, $00
+
+ db $38, $38, $20, $00, $38, $40, $22, $00, $38, $48, $24, $00, $38, $50, $26, $00
+ db $38, $58, $28, $00, $38, $60, $2a, $00, $38, $68, $2c, $00, $38, $70, $2e, $00
+
+ db $48, $38, $30, $02, $48, $40, $32, $02, $48, $48, $34, $02, $48, $50, $36, $02
+ db $48, $58, $38, $02, $48, $60, $3a, $02, $48, $68, $3c, $02, $48, $70, $3e, $02
+
+ db $58, $38, $40, $01, $58, $40, $42, $01, $58, $48, $44, $01, $58, $50, $46, $01
+ db $58, $58, $48, $01, $58, $60, $4a, $01, $58, $68, $4c, $01, $58, $70, $4e, $01
+; 10ed51
+
+
+Function10ed51: ; 10ed51
+ call _TitleScreen
+.loop
+ call JoyTextDelay
+ ld a, [hJoyLast]
+ ld b, a
+ and 1
+ jr nz, .done
+ call SuicuneFrameIterator
+ call DelayFrame
+ jr .loop
+.done
+ ret
+; 10ed67
diff --git a/engine/variables.asm b/engine/variables.asm
index fde2583b7..1b418ea3c 100755
--- a/engine/variables.asm
+++ b/engine/variables.asm
@@ -35,9 +35,9 @@ _GetVarAction:: ; 80648 (20:4648)
; 80671 (20:4671)
.VarActionTable: ; 80671
-; $00: copy [de] to StringBuffer2
-; $40: return address in de
-; $80: call function
+; RETVAR_STRBUF2: copy [de] to StringBuffer2
+; RETVAR_ADDR_DE: return address in de
+; RETVAR_EXECUTE: call function
dwb StringBuffer2, RETVAR_STRBUF2
dwb PartyCount, RETVAR_STRBUF2
dwb .BattleResult, RETVAR_EXECUTE
@@ -53,7 +53,7 @@ _GetVarAction:: ; 80648 (20:4648)
dwb MapGroup, RETVAR_STRBUF2
dwb MapNumber, RETVAR_STRBUF2
dwb .UnownCaught, RETVAR_EXECUTE
- dwb wPermission, RETVAR_STRBUF2
+ dwb wEnvironment, RETVAR_STRBUF2
dwb .BoxFreeSpace, RETVAR_EXECUTE
dwb wBugContestMinsRemaining, RETVAR_STRBUF2
dwb XCoord, RETVAR_STRBUF2
diff --git a/engine/warp_connection.asm b/engine/warp_connection.asm
index 180aada87..fadf7d4a6 100755
--- a/engine/warp_connection.asm
+++ b/engine/warp_connection.asm
@@ -3,12 +3,12 @@ HandleNewMap: ; 1045b0
call Clearwc7e8
call ResetMapBufferEventFlags
call ResetFlashIfOutOfCave
- call GetCurrentMapTrigger
+ call GetCurrentMapSceneID
call ResetBikeFlags
ld a, MAPCALLBACK_NEWMAP
call RunMapCallback
InitCommandQueue: ; 1045c4
- callba ClearCmdQueue
+ farcall ClearCmdQueue
ld a, MAPCALLBACK_CMDQUEUE
call RunMapCallback
call GetMapHeaderTimeOfDayNybble
@@ -164,14 +164,14 @@ LoadWarpData: ; 1046c6
ret
.SaveDigWarp: ; 1046df (41:46df)
- call GetMapPermission
+ call GetMapEnvironment
call CheckOutdoorMap
ret nz
ld a, [wNextMapGroup]
ld b, a
ld a, [wNextMapNumber]
ld c, a
- call GetAnyMapPermission
+ call GetAnyMapEnvironment
call CheckIndoorMap
ret nz
ld a, [wPrevMapGroup]
@@ -184,7 +184,7 @@ LoadWarpData: ; 1046c6
ret z
.not_mt_moon_or_tin_tower
ld a, [wPrevWarp]
- ld [wDigWarp], a
+ ld [wDigWarpNumber], a
ld a, [wPrevMapGroup]
ld [wDigMapGroup], a
ld a, [wPrevMapNumber]
@@ -192,14 +192,14 @@ LoadWarpData: ; 1046c6
ret
.SetSpawn: ; 104718 (41:4718)
- call GetMapPermission
+ call GetMapEnvironment
call CheckOutdoorMap
ret nz
ld a, [wNextMapGroup]
ld b, a
ld a, [wNextMapNumber]
ld c, a
- call GetAnyMapPermission
+ call GetAnyMapEnvironment
call CheckIndoorMap
ret nz
ld a, [wNextMapGroup]
@@ -225,8 +225,8 @@ LoadMapTimeOfDay: ; 104750
res 6, [hl]
ld a, $1
ld [wSpriteUpdatesEnabled], a
- callba ReplaceTimeOfDayPals
- callba UpdateTimeOfDayPal
+ farcall ReplaceTimeOfDayPals
+ farcall UpdateTimeOfDayPal
call OverworldTextModeSwitch
call .ClearBGMap
call .PushAttrMap
@@ -239,7 +239,7 @@ LoadMapTimeOfDay: ; 104750
ld [wBGMapAnchor], a
ld [hSCY], a
ld [hSCX], a
- callba ApplyBGMapAnchorToObjects
+ farcall ApplyBGMapAnchorToObjects
ld a, [rVBK]
push af
@@ -254,7 +254,7 @@ LoadMapTimeOfDay: ; 104750
pop af
ld [rVBK], a
- ld a, $60
+ ld a, "<BLACK>"
ld bc, VBGMap1 - VBGMap0
hlbgcoord 0, 0
call ByteFill
@@ -298,9 +298,9 @@ LoadGraphics: ; 1047cf
ld [hMapAnims], a
xor a
ld [hTileAnimFrame], a
- callba RefreshSprites
+ farcall RefreshSprites
call LoadFontsExtra
- callba LoadOverworldFont
+ farcall LoadOverworldFont
ret
LoadMapPalettes: ; 1047eb
@@ -310,10 +310,10 @@ LoadMapPalettes: ; 1047eb
RefreshMapSprites: ; 1047f0
call ClearSprites
- callba ReturnFromMapSetupScript
+ farcall ReturnFromMapSetupScript
call GetMovementPermissions
- callba RefreshPlayerSprite
- callba CheckReplaceKrisSprite
+ farcall RefreshPlayerSprite
+ farcall CheckReplaceKrisSprite
ld hl, wPlayerSpriteSetupFlags
bit 6, [hl]
jr nz, .skip
diff --git a/engine/wildmons.asm b/engine/wildmons.asm
index 6208cfbce..9aed7017a 100755
--- a/engine/wildmons.asm
+++ b/engine/wildmons.asm
@@ -65,7 +65,7 @@ FindNest: ; 2a01f
inc hl
inc hl
inc hl
- ld a, NUM_WILDMONS_PER_AREA_TIME_OF_DAY * 3
+ ld a, NUM_GRASSMON * 3
call .SearchMapForMon
jr nc, .next_grass
ld [de], a
@@ -73,7 +73,7 @@ FindNest: ; 2a01f
.next_grass
pop hl
- ld bc, WILDMON_GRASS_STRUCTURE_LENGTH
+ ld bc, GRASS_WILDDATA_LENGTH
add hl, bc
jr .FindGrass
; 2a06e
@@ -271,14 +271,14 @@ ChooseWildEncounter: ; 2a14f
inc hl
inc hl
call CheckOnWater
- ld de, .WaterMonTable
+ ld de, WaterMonProbTable
jr z, .watermon
inc hl
inc hl
ld a, [TimeOfDay]
ld bc, $e
call AddNTimes
- ld de, .GrassMonTable
+ ld de, GrassMonProbTable
.watermon
; hl contains the pointer to the wild mon data, let's save that to the stack
@@ -357,21 +357,7 @@ ChooseWildEncounter: ; 2a14f
ret
; 2a1cb
-.GrassMonTable: ; 2a1cb
- db 30, $0 ; 30% chance
- db 60, $2 ; 30% chance
- db 80, $4 ; 20% chance
- db 90, $6 ; 10% chance
- db 95, $8 ; 5% chance
- db 99, $a ; 4% chance
- db 100, $c ; 1% chance
-; 2a1d9
-
-.WaterMonTable: ; 2a1d9
- db 60, $0 ; 60% chance
- db 90, $2 ; 30% chance
- db 100, $4 ; 10% chance
-; 2a1df
+INCLUDE "data/wild/probabilities.asm"
CheckRepelEffect:: ; 2a1df
; If there is no active Repel, there's no need to be here.
@@ -798,29 +784,9 @@ _BackUpMapIndices: ; 2a3f6
ret
; 2a40f
-RoamMaps: ; 2a40f
-; Maps that roaming monsters can be on,
-; and possible maps they can jump to.
-; Notably missing are Route 40 and
-; Route 41, which are water routes.
- roam_map ROUTE_29, 2, ROUTE_30, ROUTE_46
- roam_map ROUTE_30, 2, ROUTE_29, ROUTE_31
- roam_map ROUTE_31, 3, ROUTE_30, ROUTE_32, ROUTE_36
- roam_map ROUTE_32, 3, ROUTE_36, ROUTE_31, ROUTE_33
- roam_map ROUTE_33, 2, ROUTE_32, ROUTE_34
- roam_map ROUTE_34, 2, ROUTE_33, ROUTE_35
- roam_map ROUTE_35, 2, ROUTE_34, ROUTE_36
- roam_map ROUTE_36, 4, ROUTE_35, ROUTE_31, ROUTE_32, ROUTE_37
- roam_map ROUTE_37, 3, ROUTE_36, ROUTE_38, ROUTE_42
- roam_map ROUTE_38, 3, ROUTE_37, ROUTE_39, ROUTE_42
- roam_map ROUTE_39, 1, ROUTE_38
- roam_map ROUTE_42, 4, ROUTE_43, ROUTE_44, ROUTE_37, ROUTE_38
- roam_map ROUTE_43, 2, ROUTE_42, ROUTE_44
- roam_map ROUTE_44, 3, ROUTE_42, ROUTE_43, ROUTE_45
- roam_map ROUTE_45, 2, ROUTE_44, ROUTE_46
- roam_map ROUTE_46, 2, ROUTE_45, ROUTE_29
- db -1
-; 2a4a0
+
+INCLUDE "data/wild/roammon_maps.asm"
+
ValidateTempWildMonSpecies: ; 2a4a0
; Due to a development oversight, this function is called with the wild Pokemon's level, not its species, in a.
@@ -836,9 +802,10 @@ ValidateTempWildMonSpecies: ; 2a4a0
ret
; 2a4ab
-RandomPhoneRareWildMon: ; 2a4ab
-; Related to the phone?
- callba GetCallerLocation
+; Finds a rare wild Pokemon in the route of the trainer calling, then checks if it's been Seen already.
+; The trainer will then tell you about the Pokemon if you haven't seen it.
+RandomUnseenWildMon: ; 2a4ab
+ farcall GetCallerLocation
ld d, b
ld e, c
ld hl, JohtoGrassWildMons
@@ -911,7 +878,7 @@ RandomPhoneRareWildMon: ; 2a4ab
; 0x2a51f
RandomPhoneWildMon: ; 2a51f
- callba GetCallerLocation
+ farcall GetCallerLocation
ld d, b
ld e, c
ld hl, JohtoGrassWildMons
@@ -952,7 +919,7 @@ RandomPhoneWildMon: ; 2a51f
RandomPhoneMon: ; 2a567
; Get a random monster owned by the trainer who's calling.
- callba GetCallerLocation
+ farcall GetCallerLocation
ld hl, TrainerGroups
ld a, d
dec a
@@ -1034,20 +1001,9 @@ RandomPhoneMon: ; 2a567
; 2a5e9
-JohtoGrassWildMons: ; 0x2a5e9
INCLUDE "data/wild/johto_grass.asm"
-
-JohtoWaterWildMons: ; 0x2b11d
INCLUDE "data/wild/johto_water.asm"
-
-KantoGrassWildMons: ; 0x2b274
INCLUDE "data/wild/kanto_grass.asm"
-
-KantoWaterWildMons: ; 0x2b7f7
INCLUDE "data/wild/kanto_water.asm"
-
-SwarmGrassWildMons: ; 0x2b8d0
INCLUDE "data/wild/swarm_grass.asm"
-
-SwarmWaterWildMons: ; 0x2b92f
INCLUDE "data/wild/swarm_water.asm"
diff --git a/event/basement_key.asm b/event/basement_key.asm
index 8fa47df5f..b15288d09 100755
--- a/event/basement_key.asm
+++ b/event/basement_key.asm
@@ -1,11 +1,11 @@
_BasementKey: ; 507b4
; Are we even in the right map to use this?
ld a, [MapGroup]
- cp GROUP_WAREHOUSE_ENTRANCE
+ cp GROUP_GOLDENROD_UNDERGROUND
jr nz, .nope
ld a, [MapNumber]
- cp MAP_WAREHOUSE_ENTRANCE
+ cp MAP_GOLDENROD_UNDERGROUND
jr nz, .nope
; Are we on the tile in front of the door?
call GetFacingTileCoord
diff --git a/event/buena.asm b/event/buena.asm
index 4802943f9..1227593eb 100644
--- a/event/buena.asm
+++ b/event/buena.asm
@@ -5,14 +5,14 @@ SpecialBuenasPassword: ; 8af6b
call CopyMenuDataHeader
ld a, [wBuenasPassword]
ld c, a
- callba GetBuenasPassword
+ farcall GetBuenasPassword
ld a, [wMenuBorderLeftCoord]
add c
add $2
ld [wMenuBorderRightCoord], a
call PushWindow
call DoNthMenu ; menu
- callba Buena_ExitMenu
+ farcall Buena_ExitMenu
ld b, $0
ld a, [MenuSelection]
ld c, a
@@ -58,7 +58,7 @@ SpecialBuenasPassword: ; 8af6b
ld a, [MenuSelection]
add c
ld c, a
- callba GetBuenasPassword
+ farcall GetBuenasPassword
pop hl
call PlaceString
ret
@@ -288,9 +288,15 @@ Buena_PrizeMenu: ; 8b0e2
dba .prizepoints
; 8b129
+NUM_BUENA_PRIZES EQU 9 ; ((BuenaPrizeItemsEnd - BuenaPrizeItems) / 2)
+
.indices ; 8b129
- db 9
- db 1, 2, 3, 4, 5, 6, 7, 8, 9
+ db NUM_BUENA_PRIZES
+x = 1
+rept NUM_BUENA_PRIZES
+ db x
+x = x + 1
+endr
db -1
; 8b134
@@ -319,7 +325,7 @@ Buena_PrizeMenu: ; 8b0e2
Buena_getprize: ; 8b154
dec a
- ld hl, .prizes
+ ld hl, BuenaPrizeItems
ld b, 0
ld c, a
add hl, bc
@@ -327,14 +333,4 @@ Buena_getprize: ; 8b154
ret
; 8b15e
-.prizes ; 8b15e
- db ULTRA_BALL, 2
- db FULL_RESTORE, 2
- db NUGGET, 3
- db RARE_CANDY, 3
- db PROTEIN, 5
- db IRON, 5
- db CARBOS, 5
- db CALCIUM, 5
- db HP_UP, 5
-; 8b170
+INCLUDE "data/items/buena_prizes.asm"
diff --git a/event/buena_menu.asm b/event/buena_menu.asm
new file mode 100644
index 000000000..b453da783
--- /dev/null
+++ b/event/buena_menu.asm
@@ -0,0 +1,58 @@
+AskRememberPassword: ; 4ae12
+ call .DoMenu
+ ld a, $0
+ jr c, .okay
+ ld a, $1
+
+.okay
+ ld [ScriptVar], a
+ ret
+
+.DoMenu: ; 4ae1f
+ lb bc, 14, 7
+ push bc
+ ld hl, YesNoMenuDataHeader
+ call CopyMenuDataHeader
+ pop bc
+ ld a, b
+ ld [wMenuBorderLeftCoord], a
+ add $5
+ ld [wMenuBorderRightCoord], a
+ ld a, c
+ ld [wMenuBorderTopCoord], a
+ add $4
+ ld [wMenuBorderBottomCoord], a
+ call PushWindow
+ call VerticalMenu
+ push af
+ ld c, 15
+ call DelayFrames
+ call Buena_ExitMenu
+ pop af
+ jr c, .refused
+ ld a, [wMenuCursorY]
+ cp $2
+ jr z, .refused
+ and a
+ ret
+
+.refused
+ ld a, $2
+ ld [wMenuCursorY], a
+ scf
+ ret
+
+Buena_ExitMenu: ; 4ae5e
+ ld a, [hOAMUpdate]
+ push af
+ call ExitMenu
+ call UpdateSprites
+ xor a
+ ld [hOAMUpdate], a
+ call DelayFrame
+ ld a, $1
+ ld [hOAMUpdate], a
+ call ApplyTilemap
+ pop af
+ ld [hOAMUpdate], a
+ ret
diff --git a/event/bug_contest/caught_mon.asm b/event/bug_contest/caught_mon.asm
new file mode 100644
index 000000000..5d423f466
--- /dev/null
+++ b/event/bug_contest/caught_mon.asm
@@ -0,0 +1,38 @@
+BugContest_SetCaughtContestMon: ; e6ce
+ ld a, [wContestMon]
+ and a
+ jr z, .firstcatch
+ ld [wd265], a
+ farcall DisplayAlreadyCaughtText
+ farcall DisplayCaughtContestMonStats
+ lb bc, 14, 7
+ call PlaceYesNoBox
+ ret c
+
+.firstcatch
+ call .generatestats
+ ld a, [TempEnemyMonSpecies]
+ ld [wd265], a
+ call GetPokemonName
+ ld hl, .caughttext
+ call PrintText
+ ret
+
+.generatestats ; e6fd
+ ld a, [TempEnemyMonSpecies]
+ ld [CurSpecies], a
+ ld [CurPartySpecies], a
+ call GetBaseData
+ xor a
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld hl, wContestMon
+ call ByteFill
+ xor a
+ ld [MonType], a
+ ld hl, wContestMon
+ jp GeneratePartyMonStats
+
+.caughttext ; 0xe71d
+ ; Caught @ !
+ text_jump UnknownText_0x1c10c0
+ db "@"
diff --git a/event/bug_contest/contest.asm b/event/bug_contest/contest.asm
new file mode 100644
index 000000000..ba561abf2
--- /dev/null
+++ b/event/bug_contest/contest.asm
@@ -0,0 +1,43 @@
+Special_GiveParkBalls: ; 135db
+ xor a
+ ld [wContestMon], a
+ ld a, 20
+ ld [wParkBallsRemaining], a
+ farcall StartBugContestTimer
+ ret
+
+BugCatchingContestBattleScript:: ; 0x135eb
+ writecode VAR_BATTLETYPE, BATTLETYPE_CONTEST
+ randomwildmon
+ startbattle
+ reloadmapafterbattle
+ copybytetovar wParkBallsRemaining
+ iffalse BugCatchingContestOutOfBallsScript
+ end
+
+BugCatchingContestOverScript:: ; 0x135f8
+ playsound SFX_ELEVATOR_END
+ opentext
+ writetext BugCatchingContestText_BeeepTimesUp
+ waitbutton
+ jump BugCatchingContestReturnToGateScript
+
+BugCatchingContestOutOfBallsScript: ; 0x13603
+ playsound SFX_ELEVATOR_END
+ opentext
+ writetext BugCatchingContestText_ContestIsOver
+ waitbutton
+
+BugCatchingContestReturnToGateScript: ; 0x1360b
+ closetext
+ jumpstd bugcontestresultswarp
+
+BugCatchingContestText_BeeepTimesUp: ; 0x1360f
+ ; ANNOUNCER: BEEEP! Time's up!
+ text_jump UnknownText_0x1bd2ca
+ db "@"
+
+BugCatchingContestText_ContestIsOver: ; 0x13614
+ ; ANNOUNCER: The Contest is over!
+ text_jump UnknownText_0x1bd2e7
+ db "@"
diff --git a/event/bug_contest_2.asm b/event/bug_contest/contest_2.asm
index 493c69d0c..493c69d0c 100755
--- a/event/bug_contest_2.asm
+++ b/event/bug_contest/contest_2.asm
diff --git a/event/bug_contest/display_stats.asm b/event/bug_contest/display_stats.asm
new file mode 100644
index 000000000..d6ad3997e
--- /dev/null
+++ b/event/bug_contest/display_stats.asm
@@ -0,0 +1,107 @@
+DisplayCaughtContestMonStats: ; cc000
+ call ClearBGPalettes
+ call ClearTileMap
+ call ClearSprites
+ call LoadFontsBattleExtra
+
+ ld hl, Options
+ ld a, [hl]
+ push af
+ set 4, [hl]
+
+ hlcoord 0, 0
+ ld b, 4
+ ld c, 13
+ call TextBox
+
+ hlcoord 0, 6
+ ld b, 4
+ ld c, 13
+ call TextBox
+
+ hlcoord 2, 0
+ ld de, .Stock
+ call PlaceString
+
+ hlcoord 2, 6
+ ld de, .This
+ call PlaceString
+
+ hlcoord 5, 4
+ ld de, .Health
+ call PlaceString
+
+ hlcoord 5, 10
+ ld de, .Health
+ call PlaceString
+
+ ld a, [wContestMon]
+ ld [wd265], a
+ call GetPokemonName
+ ld de, StringBuffer1
+ hlcoord 1, 2
+ call PlaceString
+
+ ld h, b
+ ld l, c
+ ld a, [wContestMonLevel]
+ ld [TempMonLevel], a
+ call PrintLevel
+
+ ld de, EnemyMonNick
+ hlcoord 1, 8
+ call PlaceString
+
+ ld h, b
+ ld l, c
+ ld a, [EnemyMonLevel]
+ ld [TempMonLevel], a
+ call PrintLevel
+
+ hlcoord 11, 4
+ ld de, wContestMonMaxHP
+ lb bc, 2, 3
+ call PrintNum
+
+ hlcoord 11, 10
+ ld de, EnemyMonMaxHP
+ call PrintNum
+
+ ld hl, SwitchMonText
+ call PrintText
+
+ pop af
+ ld [Options], a
+
+ call WaitBGMap
+ ld b, SCGB_DIPLOMA
+ call GetSGBLayout
+ call SetPalettes
+ ret
+
+.Health:
+ db "HEALTH@"
+.Stock:
+ db " STOCK ", $4a, " @"
+.This:
+ db " THIS ", $4a, " @"
+
+SwitchMonText: ; cc0c2
+ ; Switch #MON?
+ text_jump UnknownText_0x1c10cf
+ db "@"
+
+DisplayAlreadyCaughtText: ; cc0c7
+ call GetPokemonName
+ ld hl, .AlreadyCaughtText
+ jp PrintText
+
+.AlreadyCaughtText: ; 0xcc0d0
+ ; You already caught a @ .
+ text_jump UnknownText_0x1c10dd
+ db "@"
+
+Predef2F:
+Predef38:
+Predef39: ; cc0d5
+ ret
diff --git a/event/bug_contest/judging.asm b/event/bug_contest/judging.asm
new file mode 100755
index 000000000..901ae88fa
--- /dev/null
+++ b/event/bug_contest/judging.asm
@@ -0,0 +1,395 @@
+_BugContestJudging: ; 1369d
+ call ContestScore
+ farcall TrainerRankings_BugContestScore
+ call BugContest_JudgeContestants
+ ld a, [wBugContestThirdPlaceWinnerID]
+ call LoadContestantName
+ ld a, [wBugContestThirdPlaceMon]
+ ld [wNamedObjectIndexBuffer], a
+ call GetPokemonName
+ ld hl, BugContest_ThirdPlaceText
+ call PrintText
+ ld a, [wBugContestSecondPlaceWinnerID]
+ call LoadContestantName
+ ld a, [wBugContestSecondPlaceMon]
+ ld [wNamedObjectIndexBuffer], a
+ call GetPokemonName
+ ld hl, BugContest_SecondPlaceText
+ call PrintText
+ ld a, [wBugContestFirstPlaceWinnerID]
+ call LoadContestantName
+ ld a, [wBugContestFirstPlaceMon]
+ ld [wNamedObjectIndexBuffer], a
+ call GetPokemonName
+ ld hl, BugContest_FirstPlaceText
+ call PrintText
+ jp BugContest_GetPlayersResult
+; 136eb
+
+BugContest_FirstPlaceText: ; 0x136eb
+ text_jump ContestJudging_FirstPlaceText
+ start_asm
+ ld de, SFX_1ST_PLACE
+ call PlaySFX
+ call WaitSFX
+ ld hl, BugContest_FirstPlaceScoreText
+ ret
+; 136fd
+
+BugContest_FirstPlaceScoreText: ; 0x136fd
+ ; The winning score was @ points!
+ text_jump ContestJudging_FirstPlaceScoreText
+ db "@"
+; 0x13702
+
+BugContest_SecondPlaceText: ; 0x13702
+ ; Placing second was @ , who caught a @ !@ @
+ text_jump ContestJudging_SecondPlaceText
+ start_asm
+ ld de, SFX_2ND_PLACE
+ call PlaySFX
+ call WaitSFX
+ ld hl, BugContest_SecondPlaceScoreText
+ ret
+; 13714
+
+BugContest_SecondPlaceScoreText: ; 0x13714
+ ; The score was @ points!
+ text_jump ContestJudging_SecondPlaceScoreText
+ db "@"
+; 0x13719
+
+BugContest_ThirdPlaceText: ; 0x13719
+ ; Placing third was @ , who caught a @ !@ @
+ text_jump ContestJudging_ThirdPlaceText
+ start_asm
+ ld de, SFX_3RD_PLACE
+ call PlaySFX
+ call WaitSFX
+ ld hl, BugContest_ThirdPlaceScoreText
+ ret
+; 1372b
+
+BugContest_ThirdPlaceScoreText: ; 0x1372b
+ ; The score was @ points!
+ text_jump ContestJudging_ThirdPlaceScoreText
+ db "@"
+; 0x13730
+
+LoadContestantName: ; 13730
+
+; If a = 0, get your name.
+ dec a
+ jr z, .player
+; Find the pointer for the trainer class of the Bug Catching Contestant whose ID is in a.
+ ld c, a
+ ld b, 0
+ ld hl, BugContestantPointers
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+; Copy the Trainer Class to c.
+ ld a, [hli]
+ ld c, a
+; Save hl and bc for later.
+ push hl
+ push bc
+; Get the Trainer Class name and copy it into wBugContestWinnerName.
+ callfar GetTrainerClassName
+ ld hl, StringBuffer1
+ ld de, wBugContestWinnerName
+ ld bc, TRAINER_CLASS_NAME_LENGTH
+ call CopyBytes
+ ld hl, wBugContestWinnerName
+; Delete the trailing terminator and replace it with a space.
+.next
+ ld a, [hli]
+ cp "@"
+ jr nz, .next
+ dec hl
+ ld [hl], " "
+ inc hl
+ ld d, h
+ ld e, l
+; Restore the Trainer Class ID and Trainer ID pointer. Save de for later.
+ pop bc
+ pop hl
+ push de
+; Get the name of the trainer with class c and ID b.
+ ld a, [hl]
+ ld b, a
+ callfar GetTrainerName
+; Append the name to wBugContestWinnerName.
+ ld hl, StringBuffer1
+ pop de
+ ld bc, NAME_LENGTH - 1
+ jp CopyBytes
+
+.player
+ ld hl, PlayerName
+ ld de, wBugContestWinnerName
+ ld bc, NAME_LENGTH
+ jp CopyBytes
+; 13783
+
+
+INCLUDE "data/bug_contest_winners.asm"
+; 13807
+
+
+BugContest_GetPlayersResult: ; 13807
+ ld hl, wBugContestThirdPlaceWinnerID
+ ld de, -4
+ ld b, 3
+.loop
+ ld a, [hl]
+ cp 1 ; Player
+ jr z, .done
+ add hl, de
+ dec b
+ jr nz, .loop
+
+.done
+ ret
+; 13819
+
+BugContest_JudgeContestants: ; 13819
+ call ClearContestResults
+ call ComputeAIContestantScores
+ ld hl, wBugContestTempWinnerID
+ ld a, 1 ; Player
+ ld [hli], a
+ ld a, [wContestMon]
+ ld [hli], a
+ ld a, [hProduct]
+ ld [hli], a
+ ld a, [hProduct + 1]
+ ld [hl], a
+ call DetermineContestWinners
+ ret
+; 13833
+
+ClearContestResults: ; 13833
+ ld hl, wBugContestResults
+ ld b, wBugContestWinnersEnd - wBugContestResults
+ xor a
+.loop
+ ld [hli], a
+ dec b
+ jr nz, .loop
+ ret
+; 1383e
+
+DetermineContestWinners: ; 1383e
+ ld de, wBugContestTempScore
+ ld hl, wBugContestFirstPlaceScore
+ ld c, 2
+ call StringCmp
+ jr c, .not_first_place
+ ld hl, wBugContestSecondPlaceWinnerID
+ ld de, wBugContestThirdPlaceWinnerID
+ ld bc, 4
+ call CopyBytes
+ ld hl, wBugContestFirstPlaceWinnerID
+ ld de, wBugContestSecondPlaceWinnerID
+ ld bc, 4
+ call CopyBytes
+ ld hl, wBugContestFirstPlaceWinnerID
+ call CopyTempContestant
+ jr .done
+
+.not_first_place
+ ld de, wBugContestTempScore
+ ld hl, wBugContestSecondPlaceScore
+ ld c, 2
+ call StringCmp
+ jr c, .not_second_place
+ ld hl, wBugContestSecondPlaceWinnerID
+ ld de, wBugContestThirdPlaceWinnerID
+ ld bc, 4
+ call CopyBytes
+ ld hl, wBugContestSecondPlaceWinnerID
+ call CopyTempContestant
+ jr .done
+
+.not_second_place
+ ld de, wBugContestTempScore
+ ld hl, wBugContestThirdPlaceScore
+ ld c, 2
+ call StringCmp
+ jr c, .done
+ ld hl, wBugContestThirdPlaceWinnerID
+ call CopyTempContestant
+
+.done
+ ret
+; 138a0
+
+CopyTempContestant: ; 138a0
+; Could've just called CopyBytes.
+ ld de, wBugContestTempWinnerID
+rept 3
+ ld a, [de]
+ inc de
+ ld [hli], a
+endr
+ ld a, [de]
+ inc de
+ ld [hl], a
+ ret
+; 138b0
+
+ComputeAIContestantScores: ; 138b0
+ ld e, 0
+.loop
+ push de
+ call Special_CheckBugContestContestantFlag
+ pop de
+ jr nz, .done
+ ld a, e
+ inc a
+ inc a
+ ld [wBugContestTempWinnerID], a
+ dec a
+ ld c, a
+ ld b, 0
+ ld hl, BugContestantPointers
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ inc hl
+ inc hl
+.loop2
+ call Random
+ and 3
+ cp 3
+ jr z, .loop2
+ ld c, a
+ ld b, 0
+ add hl, bc
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld [wBugContestTempMon], a
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ call Random
+ and 7
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, h
+ ld [wBugContestTempScore], a
+ ld a, l
+ ld [wBugContestTempScore + 1], a
+ push de
+ call DetermineContestWinners
+ pop de
+
+.done
+ inc e
+ ld a, e
+ cp 10
+ jr nz, .loop
+ ret
+; 13900
+
+ContestScore: ; 13900
+; Determine the player's score in the Bug Catching Contest.
+
+ xor a
+ ld [hProduct], a
+ ld [hMultiplicand], a
+
+ ld a, [wContestMonSpecies] ; Species
+ and a
+ jr z, .done
+
+ ; Tally the following:
+
+ ; Max HP * 4
+ ld a, [wContestMonMaxHP + 1]
+ call .AddContestStat
+ ld a, [wContestMonMaxHP + 1]
+ call .AddContestStat
+ ld a, [wContestMonMaxHP + 1]
+ call .AddContestStat
+ ld a, [wContestMonMaxHP + 1]
+ call .AddContestStat
+
+ ; Stats
+ ld a, [wContestMonAttack + 1]
+ call .AddContestStat
+ ld a, [wContestMonDefense + 1]
+ call .AddContestStat
+ ld a, [wContestMonSpeed + 1]
+ call .AddContestStat
+ ld a, [wContestMonSpclAtk + 1]
+ call .AddContestStat
+ ld a, [wContestMonSpclDef + 1]
+ call .AddContestStat
+
+ ; DVs
+ ld a, [wContestMonDVs + 0]
+ ld b, a
+ and 2
+ add a
+ add a
+ ld c, a
+
+ swap b
+ ld a, b
+ and 2
+ add a
+ add c
+ ld d, a
+
+ ld a, [wContestMonDVs + 1]
+ ld b, a
+ and 2
+ ld c, a
+
+ swap b
+ ld a, b
+ and 2
+ srl a
+ add c
+ add c
+ add d
+ add d
+
+ call .AddContestStat
+
+ ; Remaining HP / 8
+ ld a, [wContestMonHP + 1]
+ srl a
+ srl a
+ srl a
+ call .AddContestStat
+
+ ; Whether it's holding an item
+ ld a, [wContestMonItem]
+ and a
+ jr z, .done
+
+ ld a, 1
+ call .AddContestStat
+
+.done
+ ret
+; 1397f
+
+.AddContestStat: ; 1397f
+ ld hl, hMultiplicand
+ add [hl]
+ ld [hl], a
+ ret nc
+ dec hl
+ inc [hl]
+ ret
+; 13988
diff --git a/event/bug_contest_judging.asm b/event/bug_contest_judging.asm
deleted file mode 100755
index 0d400bb39..000000000
--- a/event/bug_contest_judging.asm
+++ /dev/null
@@ -1,465 +0,0 @@
-_BugContestJudging: ; 1369d
- call ContestScore
- callba TrainerRankings_BugContestScore
- call BugContest_JudgeContestants
- ld a, [wBugContestThirdPlacePersonID]
- call LoadContestantName
- ld a, [wBugContestThirdPlaceMon]
- ld [wNamedObjectIndexBuffer], a
- call GetPokemonName
- ld hl, BugContest_ThirdPlaceText
- call PrintText
- ld a, [wBugContestSecondPlacePersonID]
- call LoadContestantName
- ld a, [wBugContestSecondPlaceMon]
- ld [wNamedObjectIndexBuffer], a
- call GetPokemonName
- ld hl, BugContest_SecondPlaceText
- call PrintText
- ld a, [wBugContestFirstPlacePersonID]
- call LoadContestantName
- ld a, [wBugContestFirstPlaceMon]
- ld [wNamedObjectIndexBuffer], a
- call GetPokemonName
- ld hl, BugContest_FirstPlaceText
- call PrintText
- jp BugContest_GetPlayersResult
-; 136eb
-
-BugContest_FirstPlaceText: ; 0x136eb
- text_jump ContestJudging_FirstPlaceText
- start_asm
- ld de, SFX_1ST_PLACE
- call PlaySFX
- call WaitSFX
- ld hl, BugContest_FirstPlaceScoreText
- ret
-; 136fd
-
-BugContest_FirstPlaceScoreText: ; 0x136fd
- ; The winning score was @ points!
- text_jump ContestJudging_FirstPlaceScoreText
- db "@"
-; 0x13702
-
-BugContest_SecondPlaceText: ; 0x13702
- ; Placing second was @ , who caught a @ !@ @
- text_jump ContestJudging_SecondPlaceText
- start_asm
- ld de, SFX_2ND_PLACE
- call PlaySFX
- call WaitSFX
- ld hl, BugContest_SecondPlaceScoreText
- ret
-; 13714
-
-BugContest_SecondPlaceScoreText: ; 0x13714
- ; The score was @ points!
- text_jump ContestJudging_SecondPlaceScoreText
- db "@"
-; 0x13719
-
-BugContest_ThirdPlaceText: ; 0x13719
- ; Placing third was @ , who caught a @ !@ @
- text_jump ContestJudging_ThirdPlaceText
- start_asm
- ld de, SFX_3RD_PLACE
- call PlaySFX
- call WaitSFX
- ld hl, BugContest_ThirdPlaceScoreText
- ret
-; 1372b
-
-BugContest_ThirdPlaceScoreText: ; 0x1372b
- ; The score was @ points!
- text_jump ContestJudging_ThirdPlaceScoreText
- db "@"
-; 0x13730
-
-LoadContestantName: ; 13730
-
-; If a = 0, get your name.
- dec a
- jr z, .player
-; Find the pointer for the trainer class of the Bug Catching Contestant whose ID is in a.
- ld c, a
- ld b, 0
- ld hl, BugContestantPointers
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
-; Copy the Trainer Class to c.
- ld a, [hli]
- ld c, a
-; Save hl and bc for later.
- push hl
- push bc
-; Get the Trainer Class name and copy it into wBugContestWinnerName.
- callab GetTrainerClassName
- ld hl, StringBuffer1
- ld de, wBugContestWinnerName
- ld bc, TRAINER_CLASS_NAME_LENGTH
- call CopyBytes
- ld hl, wBugContestWinnerName
-; Delete the trailing terminator and replace it with a space.
-.next
- ld a, [hli]
- cp "@"
- jr nz, .next
- dec hl
- ld [hl], " "
- inc hl
- ld d, h
- ld e, l
-; Restore the Trainer Class ID and Trainer ID pointer. Save de for later.
- pop bc
- pop hl
- push de
-; Get the name of the trainer with class c and ID b.
- ld a, [hl]
- ld b, a
- callab GetTrainerName
-; Append the name to wBugContestWinnerName.
- ld hl, StringBuffer1
- pop de
- ld bc, NAME_LENGTH - 1
- jp CopyBytes
-
-.player
- ld hl, PlayerName
- ld de, wBugContestWinnerName
- ld bc, NAME_LENGTH
- jp CopyBytes
-; 13783
-
-BugContestantPointers: ; 13783
- dw BugContestant_BugCatcherDon ; This reverts back to the player
- dw BugContestant_BugCatcherDon
- dw BugContestant_BugCatcherEd
- dw BugContestant_CooltrainerMNick
- dw BugContestant_PokefanMWilliam
- dw BugContestant_BugCatcherBenny
- dw BugContestant_CamperBarry
- dw BugContestant_PicnickerCindy
- dw BugContestant_BugCatcherJosh
- dw BugContestant_YoungsterSamuel
- dw BugContestant_SchoolboyKipp
-; 13799
-
-BugContestant_BugCatcherDon:
- db BUG_CATCHER, DON
- dbw KAKUNA, 300
- dbw METAPOD, 285
- dbw CATERPIE, 226
-
-BugContestant_BugCatcherEd:
- db BUG_CATCHER, ED
- dbw BUTTERFREE, 286
- dbw BUTTERFREE, 251
- dbw CATERPIE, 237
-
-BugContestant_CooltrainerMNick:
- db COOLTRAINERM, NICK
- dbw SCYTHER, 357
- dbw BUTTERFREE, 349
- dbw PINSIR, 368
-
-BugContestant_PokefanMWilliam:
- db POKEFANM, WILLIAM
- dbw PINSIR, 332
- dbw BUTTERFREE, 324
- dbw VENONAT, 321
-
-BugContestant_BugCatcherBenny:
- db BUG_CATCHER, BUG_CATCHER_BENNY
- dbw BUTTERFREE, 318
- dbw WEEDLE, 295
- dbw CATERPIE, 285
-
-BugContestant_CamperBarry:
- db CAMPER, BARRY
- dbw PINSIR, 366
- dbw VENONAT, 329
- dbw KAKUNA, 314
-
-BugContestant_PicnickerCindy:
- db PICNICKER, CINDY
- dbw BUTTERFREE, 341
- dbw METAPOD, 301
- dbw CATERPIE, 264
-
-BugContestant_BugCatcherJosh:
- db BUG_CATCHER, JOSH
- dbw SCYTHER, 326
- dbw BUTTERFREE, 292
- dbw METAPOD, 282
-
-BugContestant_YoungsterSamuel:
- db YOUNGSTER, SAMUEL
- dbw WEEDLE, 270
- dbw PINSIR, 282
- dbw CATERPIE, 251
-
-BugContestant_SchoolboyKipp:
- db SCHOOLBOY, KIPP
- dbw VENONAT, 267
- dbw PARAS, 254
- dbw KAKUNA, 259
-; 13807
-
-BugContest_GetPlayersResult: ; 13807
- ld hl, wBugContestThirdPlacePersonID
- ld de, -4
- ld b, 3
-.loop
- ld a, [hl]
- cp 1 ; Player
- jr z, .done
- add hl, de
- dec b
- jr nz, .loop
-
-.done
- ret
-; 13819
-
-BugContest_JudgeContestants: ; 13819
- call ClearContestResults
- call ComputeAIContestantScores
- ld hl, wBugContestTempPersonID
- ld a, 1 ; Player
- ld [hli], a
- ld a, [wContestMon]
- ld [hli], a
- ld a, [hProduct]
- ld [hli], a
- ld a, [hProduct + 1]
- ld [hl], a
- call DetermineContestWinners
- ret
-; 13833
-
-ClearContestResults: ; 13833
- ld hl, wBugContestResults
- ld b, wBugContestWinnersEnd - wBugContestResults
- xor a
-.loop
- ld [hli], a
- dec b
- jr nz, .loop
- ret
-; 1383e
-
-DetermineContestWinners: ; 1383e
- ld de, wBugContestTempScore
- ld hl, wBugContestFirstPlaceScore
- ld c, 2
- call StringCmp
- jr c, .not_first_place
- ld hl, wBugContestSecondPlacePersonID
- ld de, wBugContestThirdPlacePersonID
- ld bc, 4
- call CopyBytes
- ld hl, wBugContestFirstPlacePersonID
- ld de, wBugContestSecondPlacePersonID
- ld bc, 4
- call CopyBytes
- ld hl, wBugContestFirstPlacePersonID
- call CopyTempContestant
- jr .done
-
-.not_first_place
- ld de, wBugContestTempScore
- ld hl, wBugContestSecondPlaceScore
- ld c, 2
- call StringCmp
- jr c, .not_second_place
- ld hl, wBugContestSecondPlacePersonID
- ld de, wBugContestThirdPlacePersonID
- ld bc, 4
- call CopyBytes
- ld hl, wBugContestSecondPlacePersonID
- call CopyTempContestant
- jr .done
-
-.not_second_place
- ld de, wBugContestTempScore
- ld hl, wBugContestThirdPlaceScore
- ld c, 2
- call StringCmp
- jr c, .done
- ld hl, wBugContestThirdPlacePersonID
- call CopyTempContestant
-
-.done
- ret
-; 138a0
-
-CopyTempContestant: ; 138a0
-; Could've just called CopyBytes.
- ld de, wBugContestTempPersonID
-rept 3
- ld a, [de]
- inc de
- ld [hli], a
-endr
- ld a, [de]
- inc de
- ld [hl], a
- ret
-; 138b0
-
-ComputeAIContestantScores: ; 138b0
- ld e, 0
-.loop
- push de
- call Special_CheckBugContestContestantFlag
- pop de
- jr nz, .done
- ld a, e
- inc a
- inc a
- ld [wBugContestTempPersonID], a
- dec a
- ld c, a
- ld b, 0
- ld hl, BugContestantPointers
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- inc hl
- inc hl
-.loop2
- call Random
- and 3
- cp 3
- jr z, .loop2
- ld c, a
- ld b, 0
- add hl, bc
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld [wBugContestTempMon], a
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call Random
- and 7
- ld c, a
- ld b, 0
- add hl, bc
- ld a, h
- ld [wBugContestTempScore], a
- ld a, l
- ld [wBugContestTempScore + 1], a
- push de
- call DetermineContestWinners
- pop de
-
-.done
- inc e
- ld a, e
- cp 10
- jr nz, .loop
- ret
-; 13900
-
-ContestScore: ; 13900
-; Determine the player's score in the Bug Catching Contest.
-
- xor a
- ld [hProduct], a
- ld [hMultiplicand], a
-
- ld a, [wContestMonSpecies] ; Species
- and a
- jr z, .done
-
- ; Tally the following:
-
- ; Max HP * 4
- ld a, [wContestMonMaxHP + 1]
- call .AddContestStat
- ld a, [wContestMonMaxHP + 1]
- call .AddContestStat
- ld a, [wContestMonMaxHP + 1]
- call .AddContestStat
- ld a, [wContestMonMaxHP + 1]
- call .AddContestStat
-
- ; Stats
- ld a, [wContestMonAttack + 1]
- call .AddContestStat
- ld a, [wContestMonDefense + 1]
- call .AddContestStat
- ld a, [wContestMonSpeed + 1]
- call .AddContestStat
- ld a, [wContestMonSpclAtk + 1]
- call .AddContestStat
- ld a, [wContestMonSpclDef + 1]
- call .AddContestStat
-
- ; DVs
- ld a, [wContestMonDVs + 0]
- ld b, a
- and 2
- add a
- add a
- ld c, a
-
- swap b
- ld a, b
- and 2
- add a
- add c
- ld d, a
-
- ld a, [wContestMonDVs + 1]
- ld b, a
- and 2
- ld c, a
-
- swap b
- ld a, b
- and 2
- srl a
- add c
- add c
- add d
- add d
-
- call .AddContestStat
-
- ; Remaining HP / 8
- ld a, [wContestMonHP + 1]
- srl a
- srl a
- srl a
- call .AddContestStat
-
- ; Whether it's holding an item
- ld a, [wContestMonItem]
- and a
- jr z, .done
-
- ld a, 1
- call .AddContestStat
-
-.done
- ret
-; 1397f
-
-.AddContestStat: ; 1397f
- ld hl, hMultiplicand
- add [hl]
- ld [hl], a
- ret nc
- dec hl
- inc [hl]
- ret
-; 13988
diff --git a/event/catch_tutorial.asm b/event/catch_tutorial.asm
new file mode 100644
index 000000000..b9352ccd6
--- /dev/null
+++ b/event/catch_tutorial.asm
@@ -0,0 +1,81 @@
+CatchTutorial:: ; 4e554
+ ld a, [BattleType]
+ dec a
+ ld c, a
+ ld hl, .dw
+ ld b, 0
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+.dw ; 4e564 (13:6564)
+ dw .DudeTutorial
+ dw .DudeTutorial
+ dw .DudeTutorial
+
+.DudeTutorial: ; 4e56a (13:656a)
+; Back up your name to your Mom's name.
+ ld hl, PlayerName
+ ld de, MomsName
+ ld bc, NAME_LENGTH
+ call CopyBytes
+; Copy Dude's name to your name
+ ld hl, .Dude
+ ld de, PlayerName
+ ld bc, NAME_LENGTH
+ call CopyBytes
+
+ call .LoadDudeData
+
+ xor a
+ ld [hJoyDown], a
+ ld [hJoyPressed], a
+ ld a, [Options]
+ push af
+ and $f8
+ add $3
+ ld [Options], a
+ ld hl, .AutoInput
+ ld a, BANK(.AutoInput)
+ call StartAutoInput
+ callfar StartBattle
+ call StopAutoInput
+ pop af
+
+ ld [Options], a
+ ld hl, MomsName
+ ld de, PlayerName
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ ret
+
+.LoadDudeData: ; 4e5b7 (13:65b7)
+ ld hl, wDudeNumItems
+ ld [hl], 1
+ inc hl
+ ld [hl], POTION
+ inc hl
+ ld [hl], 1
+ inc hl
+ ld [hl], -1
+ ld hl, wDudeNumKeyItems
+ ld [hl], 0
+ inc hl
+ ld [hl], -1
+ ld hl, wDudeNumBalls
+ ld a, 1
+ ld [hli], a
+ ld a, POKE_BALL ; 5
+ ld [hli], a
+ ld [hli], a
+ ld [hl], -1
+ ret
+
+.Dude: ; 4e5da
+ db "DUDE@"
+
+.AutoInput: ; 4e5df
+ db NO_INPUT, $ff ; end
diff --git a/event/catch_tutorial_input.asm b/event/catch_tutorial_input.asm
new file mode 100644
index 000000000..9d2a03db2
--- /dev/null
+++ b/event/catch_tutorial_input.asm
@@ -0,0 +1,43 @@
+_DudeAutoInput_A:: ; 1de28a
+ ld hl, DudeAutoInput_A
+ jr _DudeAutoInput
+
+_DudeAutoInput_RightA: ; 1de28f
+ ld hl, DudeAutoInput_RightA
+ jr _DudeAutoInput
+
+_DudeAutoInput_DownA: ; 1de294
+ ld hl, DudeAutoInput_DownA
+ jr _DudeAutoInput
+
+_DudeAutoInput: ; 1de299
+ ld a, BANK(DudeAutoInputs)
+ call StartAutoInput
+ ret
+
+DudeAutoInputs:
+
+DudeAutoInput_A: ; 1de29f
+ db NO_INPUT, $50
+ db A_BUTTON, $00
+ db NO_INPUT, $ff ; end
+
+DudeAutoInput_RightA: ; 1de2a5
+ db NO_INPUT, $08
+ db D_RIGHT, $00
+ db NO_INPUT, $08
+ db A_BUTTON, $00
+ db NO_INPUT, $ff ; end
+
+DudeAutoInput_DownA: ; 1de2af
+ db NO_INPUT, $fe
+ db NO_INPUT, $fe
+ db NO_INPUT, $fe
+ db NO_INPUT, $fe
+ db D_DOWN, $00
+ db NO_INPUT, $fe
+ db NO_INPUT, $fe
+ db NO_INPUT, $fe
+ db NO_INPUT, $fe
+ db A_BUTTON, $00
+ db NO_INPUT, $ff ; end
diff --git a/event/celebi.asm b/event/celebi.asm
index 7c8646ec7..b7bf95145 100755
--- a/event/celebi.asm
+++ b/event/celebi.asm
@@ -6,14 +6,14 @@ Special_CelebiShrineEvent: ; 4989a
ld [VramState], a
call LoadCelebiGFX
depixel 0, 10, 7, 0
- ld a, SPRITE_ANIM_INDEX_2C
+ ld a, SPRITE_ANIM_INDEX_CELEBI
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
ld [hl], $84
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
- ld [hl], SPRITE_ANIM_SEQ_1F
+ ld [hl], SPRITE_ANIM_SEQ_CELEBI
ld hl, SPRITEANIMSTRUCT_0F
add hl, bc
ld a, $80
@@ -31,7 +31,7 @@ Special_CelebiShrineEvent: ; 4989a
push de
ld a, $90
ld [wCurrSpriteOAMAddr], a
- callba DoNextFrameForAllSprites
+ farcall DoNextFrameForAllSprites
call CelebiEvent_CountDown
ld c, 2
call DelayFrames
@@ -70,7 +70,7 @@ Special_CelebiShrineEvent: ; 4989a
; 49912
LoadCelebiGFX: ; 49912
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld de, SpecialCelebiLeafGFX
ld hl, VTiles1
lb bc, BANK(SpecialCelebiLeafGFX), 4
@@ -124,12 +124,13 @@ CelebiEvent_SpawnLeaf: ; 49944
; 49962
SpecialCelebiLeafGFX: ; 49962
-INCBIN "gfx/special/celebi/leaf.2bpp"
+INCBIN "gfx/overworld/cut_grass.2bpp"
+
SpecialCelebiGFX: ; 499a2
-INCBIN "gfx/special/celebi/1.2bpp"
-INCBIN "gfx/special/celebi/2.2bpp"
-INCBIN "gfx/special/celebi/3.2bpp"
-INCBIN "gfx/special/celebi/4.2bpp"
+INCBIN "gfx/overworld/celebi/1.2bpp"
+INCBIN "gfx/overworld/celebi/2.2bpp"
+INCBIN "gfx/overworld/celebi/3.2bpp"
+INCBIN "gfx/overworld/celebi/4.2bpp"
UpdateCelebiPosition: ; 49aa2 (12:5aa2)
diff --git a/event/daycare.asm b/event/daycare.asm
index b521deeff..6395a40fb 100755
--- a/event/daycare.asm
+++ b/event/daycare.asm
@@ -21,31 +21,31 @@
const DAYCARETEXT_13
Special_DayCareMan: ; 166d6
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
bit 0, [hl]
jr nz, .AskWithdrawMon
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
ld a, DAYCARETEXT_MAN_INTRO
call DayCareManIntroText
jr c, .cancel
call DayCareAskDepositPokemon
jr c, .print_text
- callba DepositMonWithDaycareMan
- ld hl, wDaycareMan
+ farcall DepositMonWithDayCareMan
+ ld hl, wDayCareMan
set 0, [hl]
call DayCare_DepositPokemonText
call DayCare_InitBreeding
ret
.AskWithdrawMon:
- callba GetBreedMon1LevelGrowth
+ farcall GetBreedMon1LevelGrowth
ld hl, wBreedMon1Nick
call GetPriceToRetrieveBreedmon
call DayCare_AskWithdrawBreedMon
jr c, .print_text
- callba RetrievePokemonFromDaycareMan
+ farcall RetrievePokemonFromDayCareMan
call DayCare_TakeMoney_PlayCry
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
res 0, [hl]
res 5, [hl]
jr .cancel
@@ -60,33 +60,33 @@ Special_DayCareMan: ; 166d6
; 1672a
Special_DayCareLady: ; 1672a
- ld hl, wDaycareLady
+ ld hl, wDayCareLady
bit 0, [hl]
jr nz, .AskWithdrawMon
- ld hl, wDaycareLady
+ ld hl, wDayCareLady
ld a, DAYCARETEXT_LADY_INTRO
call DayCareLadyIntroText
jr c, .cancel
call DayCareAskDepositPokemon
jr c, .print_text
- callba DepositMonWithDaycareLady
- ld hl, wDaycareLady
+ farcall DepositMonWithDayCareLady
+ ld hl, wDayCareLady
set 0, [hl]
call DayCare_DepositPokemonText
call DayCare_InitBreeding
ret
.AskWithdrawMon:
- callba GetBreedMon2LevelGrowth
+ farcall GetBreedMon2LevelGrowth
ld hl, wBreedMon2Nick
call GetPriceToRetrieveBreedmon
call DayCare_AskWithdrawBreedMon
jr c, .print_text
- callba RetrievePokemonFromDaycareLady
+ farcall RetrievePokemonFromDayCareLady
call DayCare_TakeMoney_PlayCry
- ld hl, wDaycareLady
+ ld hl, wDayCareLady
res 0, [hl]
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
res 5, [hl]
jr .cancel
@@ -124,19 +124,19 @@ DayCareAskDepositPokemon: ; 16798
ld a, DAYCARETEXT_WHICH_ONE
call PrintDayCareText
ld b, PARTYMENUACTION_GIVE_MON
- callba SelectTradeOrDaycareMon
+ farcall SelectTradeOrDayCareMon
jr c, .Declined
ld a, [CurPartySpecies]
cp EGG
jr z, .Egg
- callba CheckCurPartyMonFainted
+ farcall CheckCurPartyMonFainted
jr c, .OutOfUsableMons
ld hl, PartyMon1Item
ld bc, PARTYMON_STRUCT_LENGTH
ld a, [CurPartyMon]
call AddNTimes
ld d, [hl]
- callba ItemIsMail
+ farcall ItemIsMail
jr c, .HoldingMail
ld hl, PartyMonNicknames
ld a, [CurPartyMon]
@@ -209,7 +209,7 @@ DayCare_AskWithdrawBreedMon: ; 16807
.check_money
ld de, Money
ld bc, StringBuffer2 + 2
- callba CompareMoney
+ farcall CompareMoney
jr c, .not_enough_money
ld a, [PartyCount]
cp PARTY_LENGTH
@@ -236,7 +236,7 @@ DayCare_AskWithdrawBreedMon: ; 16807
DayCare_TakeMoney_PlayCry: ; 16850
ld bc, StringBuffer2 + 2
ld de, Money
- callba TakeMoney
+ farcall TakeMoney
ld a, DAYCARETEXT_WITHDRAW
call PrintDayCareText
ld a, [CurPartySpecies]
@@ -426,7 +426,7 @@ PrintDayCareText: ; 1689b
; 0x16936
Special_DayCareManOutside: ; 16936
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
bit 6, [hl]
jr nz, .AskGiveEgg
ld hl, .NotYet
@@ -448,12 +448,12 @@ Special_DayCareManOutside: ; 16936
cp PARTY_LENGTH
jr nc, .PartyFull
call DayCare_GiveEgg
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
res 6, [hl]
call DayCare_InitBreeding
ld hl, .GotEggText
call PrintText
- ld de, SFX_GET_EGG_FROM_DAYCARE_LADY
+ ld de, SFX_GET_EGG_FROM_DAY_CARE_LADY
call PlaySFX
ld c, 120
call DelayFrames
@@ -590,19 +590,19 @@ DayCare_GetCurrentPartyMember: ; 16a31
; 16a3b
DayCare_InitBreeding: ; 16a3b
- ld a, [wDaycareLady]
+ ld a, [wDayCareLady]
bit 0, a
ret z
- ld a, [wDaycareMan]
+ ld a, [wDayCareMan]
bit 0, a
ret z
- callab CheckBreedmonCompatibility
+ callfar CheckBreedmonCompatibility
ld a, [wd265]
and a
ret z
inc a
ret z
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
set 5, [hl]
.loop
call Random
@@ -639,7 +639,7 @@ DayCare_InitBreeding: ; 16a3b
cp DITTO
ld a, $0
jr z, .LoadWhichBreedmonIsTheMother
- callba GetGender
+ farcall GetGender
ld a, $0
jr z, .LoadWhichBreedmonIsTheMother
inc a
@@ -653,8 +653,8 @@ DayCare_InitBreeding: ; 16a3b
.GotMother:
ld [CurPartySpecies], a
- callab GetPreEvolution
- callab GetPreEvolution
+ callfar GetPreEvolution
+ callfar GetPreEvolution
ld a, EGG_LEVEL
ld [CurPartyLevel], a
@@ -685,7 +685,7 @@ DayCare_InitBreeding: ; 16a3b
xor a
ld [Buffer1], a
predef FillMoves
- callba InitEggMoves
+ farcall InitEggMoves
ld hl, wEggMonID
ld a, [PlayerID]
ld [hli], a
@@ -693,7 +693,7 @@ DayCare_InitBreeding: ; 16a3b
ld [hl], a
ld a, [CurPartyLevel]
ld d, a
- callab CalcExpAtLevel
+ callfar CalcExpAtLevel
ld hl, wEggMonExp
ld a, [hMultiplicand]
ld [hli], a
@@ -726,7 +726,7 @@ DayCare_InitBreeding: ; 16a3b
ld a, TEMPMON
ld [MonType], a
push hl
- callba GetGender
+ farcall GetGender
pop hl
ld de, wBreedMon1DVs
ld bc, wBreedMon2DVs
diff --git a/event/elevator.asm b/event/elevator.asm
index 7626989b3..9170b642d 100755
--- a/event/elevator.asm
+++ b/event/elevator.asm
@@ -21,9 +21,9 @@ Elevator:: ; 1342d
ld a, b
ld [wElevatorPointerBank], a
ld a, e
- ld [wElevatorPointerLo], a
+ ld [wElevatorPointer], a
ld a, d
- ld [wElevatorPointerHi], a
+ ld [wElevatorPointer + 1], a
call .LoadFloors
ret
; 1345a
@@ -31,7 +31,7 @@ Elevator:: ; 1342d
.LoadFloors: ; 1345a
ld de, CurElevator
ld bc, 4
- ld hl, wElevatorPointerLo
+ ld hl, wElevatorPointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -52,7 +52,7 @@ Elevator:: ; 1342d
; 1347d
.FindCurrentFloor: ; 1347d
- ld hl, wElevatorPointerLo
+ ld hl, wElevatorPointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -102,7 +102,7 @@ Elevator:: ; 1342d
Elevator_GoToFloor: ; 134c0
push af
- ld hl, wElevatorPointerLo
+ ld hl, wElevatorPointer
ld a, [hli]
ld h, [hl]
ld l, a
diff --git a/event/field_moves.asm b/event/field_moves.asm
index 82bc6d3f8..1c21f4995 100755
--- a/event/field_moves.asm
+++ b/event/field_moves.asm
@@ -7,20 +7,20 @@ PlayWhirlpoolSound: ; 8c7d4
; 8c7e1
BlindingFlash: ; 8c7e1
- callba FadeOutPalettes
+ farcall FadeOutPalettes
ld hl, StatusFlags
set 2, [hl] ; Flash
- callba ReplaceTimeOfDayPals
- callba UpdateTimeOfDayPal
+ farcall ReplaceTimeOfDayPals
+ farcall UpdateTimeOfDayPal
ld b, SCGB_MAPPALS
call GetSGBLayout
- callba LoadOW_BGPal7
- callba FadeInPalettes
+ farcall LoadOW_BGPal7
+ farcall FadeInPalettes
ret
; 8c80a
ShakeHeadbuttTree: ; 8c80a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld de, CutGrassGFX
ld hl, VTiles1
lb bc, BANK(CutGrassGFX), 4
@@ -30,14 +30,14 @@ ShakeHeadbuttTree: ; 8c80a
lb bc, BANK(HeadbuttTreeGFX), 8
call Request2bpp
call Cut_Headbutt_GetPixelFacing
- ld a, SPRITE_ANIM_INDEX_1B
+ ld a, SPRITE_ANIM_INDEX_HEADBUTT
call _InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_TILE_ID
add hl, bc
ld [hl], $84
ld a, 36 * 4
ld [wCurrSpriteOAMAddr], a
- callba DoNextFrameForAllSprites
+ farcall DoNextFrameForAllSprites
call HideHeadbuttTree
ld a, $20
ld [wcf64], a
@@ -52,7 +52,7 @@ ShakeHeadbuttTree: ; 8c80a
dec [hl]
ld a, 36 * 4
ld [wCurrSpriteOAMAddr], a
- callba DoNextFrameForAllSprites
+ farcall DoNextFrameForAllSprites
call DelayFrame
jr .loop
@@ -61,7 +61,7 @@ ShakeHeadbuttTree: ; 8c80a
call WaitBGMap
xor a
ld [hBGMapMode], a
- callba ClearSpriteAnims
+ farcall ClearSpriteAnims
ld hl, Sprites + 36 * 4
ld bc, SpritesEnd - (Sprites + 36 * 4)
xor a
@@ -129,7 +129,7 @@ OWCutAnimation: ; 8c940
jr nz, .finish
ld a, 36 * 4
ld [wCurrSpriteOAMAddr], a
- callab DoNextFrameForAllSprites
+ callfar DoNextFrameForAllSprites
call OWCutJumptable
call DelayFrame
jr .loop
@@ -139,7 +139,7 @@ OWCutAnimation: ; 8c940
; 8c96d
.LoadCutGFX: ; 8c96d
- callab ClearSpriteAnims ; pointless to farcall
+ callfar ClearSpriteAnims ; pointless to farcall
ld de, CutGrassGFX
ld hl, VTiles1
lb bc, BANK(CutGrassGFX), 4
@@ -152,11 +152,11 @@ OWCutAnimation: ; 8c940
; 8c98c
CutTreeGFX: ; c898c
-INCBIN "gfx/misc/cut_tree.2bpp"
+INCBIN "gfx/overworld/cut_tree.2bpp"
; c89cc
CutGrassGFX: ; 8c9cc
-INCBIN "gfx/misc/cut_grass.2bpp"
+INCBIN "gfx/overworld/cut_grass.2bpp"
; 8ca0c
OWCutJumptable: ; 8ca0c
@@ -343,7 +343,7 @@ FlyFromAnim: ; 8caed
jr nz, .exit
ld a, 0 * 4
ld [wCurrSpriteOAMAddr], a
- callab DoNextFrameForAllSprites
+ callfar DoNextFrameForAllSprites
call FlyFunction_FrameTimer
call DelayFrame
jr .loop
@@ -381,7 +381,7 @@ FlyToAnim: ; 8cb33
jr nz, .exit
ld a, 0 * 4
ld [wCurrSpriteOAMAddr], a
- callab DoNextFrameForAllSprites
+ callfar DoNextFrameForAllSprites
call FlyFunction_FrameTimer
call DelayFrame
jr .loop
@@ -411,7 +411,7 @@ FlyToAnim: ; 8cb33
ret
FlyFunction_InitGFX: ; 8cb9b (23:4b9b)
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
ld de, CutGrassGFX
ld hl, VTiles1 tile $00
lb bc, BANK(CutGrassGFX), 4
@@ -424,7 +424,7 @@ FlyFunction_InitGFX: ; 8cb9b (23:4b9b)
ld a, [hl]
ld [wd265], a
ld e, $84
- callba FlyFunction_GetMonIcon
+ farcall FlyFunction_GetMonIcon
xor a
ld [wJumptableIndex], a
ret
diff --git a/event/halloffame.asm b/event/halloffame.asm
index 8d542addb..3fadb233a 100755
--- a/event/halloffame.asm
+++ b/event/halloffame.asm
@@ -1,3 +1,5 @@
+HALLOFFAME_COLON EQU $63
+
HallOfFame:: ; 0x8640e
call HallOfFame_FadeOutMusic
ld a, [StatusFlags]
@@ -12,7 +14,7 @@ HallOfFame:: ; 0x8640e
ld hl, StatusFlags
set 6, [hl] ; hall of fame
- callba HallOfFame_InitSaveIfNeeded
+ farcall HallOfFame_InitSaveIfNeeded
ld hl, wHallOfFameCount
ld a, [hl]
@@ -20,31 +22,31 @@ HallOfFame:: ; 0x8640e
jr nc, .ok
inc [hl]
.ok
- callba SaveGameData
+ farcall SaveGameData
call GetHallOfFameParty
- callba AddHallOfFameEntry
+ farcall AddHallOfFameEntry
xor a
ld [wGameLogicPaused], a
call AnimateHallOfFame
pop af
ld b, a
- callba Credits
+ farcall Credits
ret
; 0x86455
RedCredits:: ; 86455
ld a, MUSIC_NONE % $100
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, MUSIC_NONE / $100
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ld a, 10
ld [MusicFade], a
- callba FadeOutPalettes
+ farcall FadeOutPalettes
xor a
ld [VramState], a
ld [hMapAnims], a
- callba InitDisplayForRedCredits
+ farcall InitDisplayForRedCredits
ld c, 8
call DelayFrames
call DisableSpriteUpdates
@@ -52,22 +54,22 @@ RedCredits:: ; 86455
ld [wSpawnAfterChampion], a
ld a, [StatusFlags]
ld b, a
- callba Credits
+ farcall Credits
ret
; 8648e
HallOfFame_FadeOutMusic: ; 8648e
ld a, MUSIC_NONE % $100
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, MUSIC_NONE / $100
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ld a, 10
ld [MusicFade], a
- callba FadeOutPalettes
+ farcall FadeOutPalettes
xor a
ld [VramState], a
ld [hMapAnims], a
- callba InitDisplayForHallOfFame
+ farcall InitDisplayForHallOfFame
ld c, 100
jp DelayFrames
; 864b4
@@ -230,7 +232,7 @@ GetHallOfFameParty: ; 8653f
AnimateHOFMonEntrance: ; 865b5
push hl
call ClearBGPalettes
- callba ResetDisplayBetweenHallOfFameMons
+ farcall ResetDisplayBetweenHallOfFameMons
pop hl
ld a, [hli]
ld [TempMonSpecies], a
@@ -248,7 +250,7 @@ AnimateHOFMonEntrance: ; 865b5
ld a, " "
call ByteFill
ld de, VTiles2 tile $31
- predef GetBackpic
+ predef GetMonBackpic
ld a, $31
ld [hGraphicStartTile], a
hlcoord 6, 6
@@ -487,7 +489,7 @@ DisplayHOFMon: ; 86748
hlcoord 1, 13
ld a, "№"
ld [hli], a
- ld [hl], "·"
+ ld [hl], "<DOT>"
hlcoord 3, 13
ld de, wd265
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
@@ -497,7 +499,7 @@ DisplayHOFMon: ; 86748
call PlaceString
ld a, TEMPMON
ld [MonType], a
- callba GetGender
+ farcall GetGender
ld a, " "
jr c, .got_gender
ld a, "♂"
@@ -531,15 +533,15 @@ DisplayHOFMon: ; 86748
HOF_AnimatePlayerPic: ; 86810
call ClearBGPalettes
- ld hl, VTiles2 tile $63
- ld de, FontExtra + 13 tiles
+ ld hl, VTiles2 tile HALLOFFAME_COLON
+ ld de, FontExtra + 13 tiles ; "<COLON>"
lb bc, BANK(FontExtra), 1
call Request2bpp
hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
call ByteFill
- callba GetPlayerBackpic
+ farcall GetPlayerBackpic
ld a, $31
ld [hGraphicStartTile], a
hlcoord 6, 6
@@ -563,7 +565,7 @@ HOF_AnimatePlayerPic: ; 86810
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
call ByteFill
- callba HOF_LoadTrainerFrontpic
+ farcall HOF_LoadTrainerFrontpic
xor a
ld [hGraphicStartTile], a
hlcoord 12, 5
@@ -604,13 +606,13 @@ HOF_AnimatePlayerPic: ; 86810
ld de, GameTimeHours
lb bc, 2, 3
call PrintNum
- ld [hl], 99
+ ld [hl], HALLOFFAME_COLON
inc hl
ld de, GameTimeMinutes
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
call PrintNum
call WaitBGMap
- callba ProfOaksPCRating
+ farcall ProfOaksPCRating
ret
; 868ed
diff --git a/event/happiness_egg.asm b/event/happiness_egg.asm
index e7eece7c8..0c9b5a4df 100755
--- a/event/happiness_egg.asm
+++ b/event/happiness_egg.asm
@@ -55,25 +55,25 @@ ChangeHappiness: ; 71c2
push de
ld a, [de]
- cp 100
+ cp HAPPINESS_THRESHOLD_1
ld e, 0
jr c, .ok
inc e
- cp 200
+ cp HAPPINESS_THRESHOLD_2
jr c, .ok
inc e
.ok
dec c
ld b, 0
- ld hl, .Actions
+ ld hl, HappinessChanges
add hl, bc
add hl, bc
add hl, bc
ld d, 0
add hl, de
ld a, [hl]
- cp 100
+ cp $64 ; $80?
pop de
ld a, [de]
@@ -102,26 +102,9 @@ ChangeHappiness: ; 71c2
ld [BattleMonHappiness], a
ret
-.Actions:
- db +5, +3, +2 ; Gained a level
- db +5, +3, +2 ; Vitamin
- db +1, +1, +0 ; X Item
- db +3, +2, +1 ; Battled a Gym Leader
- db +1, +1, +0 ; Learned a move
- db -1, -1, -1 ; Lost to an enemy
- db -5, -5, -10 ; Fainted due to poison
- db -5, -5, -10 ; Lost to a much stronger enemy
- db +1, +1, +1 ; Haircut (Y1)
- db +3, +3, +1 ; Haircut (Y2)
- db +5, +5, +2 ; Haircut (Y3)
- db +1, +1, +1 ; Haircut (O1)
- db +3, +3, +1 ; Haircut (O2)
- db +10, +10, +4 ; Haircut (O3)
- db -5, -5, -10 ; Used Heal Powder or Energypowder (bitter)
- db -10, -10, -15 ; Used Energy Root (bitter)
- db -15, -15, -20 ; Used Revival Herb (bitter)
- db +3, +3, +1 ; Grooming
- db +10, +6, +4 ; Gained a level in the place where it was caught
+
+INCLUDE "data/happiness_changes.asm"
+
StepHappiness:: ; 725a
; Raise the party's happiness by 1 point every other step cycle.
@@ -158,36 +141,36 @@ StepHappiness:: ; 725a
jr nz, .loop
ret
-DaycareStep:: ; 7282
+DayCareStep:: ; 7282
- ld a, [wDaycareMan]
+ ld a, [wDayCareMan]
bit 0, a
- jr z, .daycare_lady
+ jr z, .day_care_lady
ld a, [wBreedMon1Level] ; level
- cp 100
- jr nc, .daycare_lady
+ cp MAX_LEVEL
+ jr nc, .day_care_lady
ld hl, wBreedMon1Exp + 2 ; exp
inc [hl]
- jr nz, .daycare_lady
+ jr nz, .day_care_lady
dec hl
inc [hl]
- jr nz, .daycare_lady
+ jr nz, .day_care_lady
dec hl
inc [hl]
ld a, [hl]
cp 5242880 / $10000
- jr c, .daycare_lady
+ jr c, .day_care_lady
ld a, 5242880 / $10000
ld [hl], a
-.daycare_lady
- ld a, [wDaycareLady]
+.day_care_lady
+ ld a, [wDayCareLady]
bit 0, a
jr z, .check_egg
ld a, [wBreedMon2Level] ; level
- cp 100
+ cp MAX_LEVEL
jr nc, .check_egg
ld hl, wBreedMon2Exp + 2 ; exp
inc [hl]
@@ -204,7 +187,7 @@ DaycareStep:: ; 7282
ld [hl], a
.check_egg
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
bit 5, [hl] ; egg
ret z
ld hl, wStepsToEgg
@@ -213,7 +196,7 @@ DaycareStep:: ; 7282
call Random
ld [hl], a
- callab CheckBreedmonCompatibility
+ callfar CheckBreedmonCompatibility
ld a, [wd265]
cp 230
ld b, -1 + 32 percent
@@ -232,7 +215,7 @@ DaycareStep:: ; 7282
call Random
cp b
ret nc
- ld hl, wDaycareMan
+ ld hl, wDayCareMan
res 5, [hl]
set 6, [hl]
ret
diff --git a/event/heal_machine_anim.asm b/event/heal_machine_anim.asm
new file mode 100755
index 000000000..4f543c0b3
--- /dev/null
+++ b/event/heal_machine_anim.asm
@@ -0,0 +1,265 @@
+HealMachineAnim: ; 12324
+ ; If you have no Pokemon, don't change the buffer. This can lead to some glitchy effects if you have no Pokemon.
+ ld a, [PartyCount]
+ and a
+ ret z
+ ; The location of the healing machine relative to the player is stored in ScriptVar.
+ ; 0: Up and left (Pokemon Center)
+ ; 1: Left (Elm's Lab)
+ ; 2: Up (Hall of Fame)
+ ld a, [ScriptVar]
+ ld [Buffer1], a
+ ld a, [rOBP1]
+ ld [Buffer2], a
+ call .DoJumptableFunctions
+ ld a, [Buffer2]
+ call DmgToCgbObjPal1
+ ret
+; 1233e
+
+.DoJumptableFunctions: ; 1233e
+ xor a
+ ld [Buffer3], a
+.jumpable_loop
+ ld a, [Buffer1]
+ ld e, a
+ ld d, 0
+ ld hl, .Pointers
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [Buffer3]
+ ld e, a
+ inc a
+ ld [Buffer3], a
+ add hl, de
+ ld a, [hl]
+ cp 5
+ jr z, .finish
+ ld hl, .Jumptable
+ rst JumpTable
+ jr .jumpable_loop
+
+.finish
+ ret
+; 12365
+
+.Pointers: ; 12365
+ dw .Pokecenter
+ dw .ElmLab
+ dw .HallOfFame
+; 1236b
+
+.Pokecenter: ; 1236b
+ db 0, 1, 3, 5
+.ElmLab: ; 1236f
+ db 0, 1, 3, 5
+.HallOfFame: ; 12373
+ db 0, 2, 4, 5
+; 12377
+
+.Jumptable: ; 12377
+ dw .LoadGFX
+ dw .PC_LoadBallsOntoMachine
+ dw .HOF_LoadBallsOntoMachine
+ dw .PlayHealMusic
+ dw .HOF_PlaySFX
+ dw .dummy_5 ; never encountered
+; 12383
+
+.LoadGFX: ; 12383
+ call .LoadPalettes
+ ld de, .HealMachineGFX
+ ld hl, VTiles0 tile $7c
+ lb bc, BANK(.HealMachineGFX), $2
+ call Request2bpp
+ ret
+; 12393
+
+.PC_LoadBallsOntoMachine: ; 12393
+ ld hl, Sprites + $80
+ ld de, .PC_ElmsLab_OAM
+ call .PlaceHealingMachineTile
+ call .PlaceHealingMachineTile
+ jr .LoadBallsOntoMachine
+
+.HOF_LoadBallsOntoMachine: ; 123a1
+ ld hl, Sprites + $80
+ ld de, .HOF_OAM
+
+.LoadBallsOntoMachine: ; 123a7
+ ld a, [PartyCount]
+ ld b, a
+.party_loop
+ call .PlaceHealingMachineTile
+ push de
+ ld de, SFX_SECOND_PART_OF_ITEMFINDER
+ call PlaySFX
+ pop de
+ ld c, 30
+ call DelayFrames
+ dec b
+ jr nz, .party_loop
+ ret
+; 123bf
+
+.PlayHealMusic: ; 123bf
+ ld de, MUSIC_HEAL
+ call PlayMusic
+ jp .FlashPalettes8Times
+; 123c8
+
+.HOF_PlaySFX: ; 123c8
+ ld de, SFX_GAME_FREAK_LOGO_GS
+ call PlaySFX
+ call .FlashPalettes8Times
+ call WaitSFX
+ ld de, SFX_BOOT_PC
+ call PlaySFX
+ ret
+; 123db
+
+.dummy_5 ; 123db
+ ret
+; 123dc
+
+.PC_ElmsLab_OAM: ; 123dc
+ dsprite 4, 0, 4, 2, $7c, $16
+ dsprite 4, 0, 4, 6, $7c, $16
+ dsprite 4, 6, 4, 0, $7d, $16
+ dsprite 4, 6, 5, 0, $7d, $36 ; xflip
+ dsprite 5, 3, 4, 0, $7d, $16
+ dsprite 5, 3, 5, 0, $7d, $36 ; xflip
+ dsprite 6, 0, 4, 0, $7d, $16
+ dsprite 6, 0, 5, 0, $7d, $36 ; xflip
+; 123fc
+
+.HealMachineGFX: ; 123fc
+INCBIN "gfx/overworld/heal_machine.2bpp"
+; 1241c
+
+.HOF_OAM: ; 1241c
+ dsprite 7, 4, 10, 1, $7d, $16
+ dsprite 7, 4, 10, 6, $7d, $16
+ dsprite 7, 3, 9, 5, $7d, $16
+ dsprite 7, 3, 11, 2, $7d, $16
+ dsprite 7, 1, 9, 1, $7d, $16
+ dsprite 7, 1, 11, 5, $7d, $16
+; 12434
+
+.LoadPalettes: ; 12434
+ call IsCGB
+ jr nz, .cgb
+ ld a, %11100000
+ ld [rOBP1], a
+ ret
+
+.cgb
+ ld hl, .palettes
+ ld de, OBPals + 8 * 6
+ ld bc, 8
+ ld a, $5
+ call FarCopyWRAM
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 12451
+
+.palettes ; 12451
+ RGB 31, 31, 31
+ RGB 31, 19, 10
+ RGB 31, 07, 01
+ RGB 00, 00, 00
+; 12459
+
+.FlashPalettes8Times: ; 12459
+ ld c, $8
+.palette_loop
+ push bc
+ call .FlashPalettes
+ ld c, 10
+ call DelayFrames
+ pop bc
+ dec c
+ jr nz, .palette_loop
+ ret
+; 12469
+
+.FlashPalettes: ; 12469
+ call IsCGB
+ jr nz, .go
+ ld a, [rOBP1]
+ xor %00101000
+ ld [rOBP1], a
+ ret
+
+.go
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+
+ ld hl, OBPals + 8 * 6
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ push de
+ ld c, $3
+.palette_loop_2
+ ld a, [hli]
+ ld e, a
+ ld a, [hld]
+ ld d, a
+ dec hl
+ ld a, d
+ ld [hld], a
+ ld a, e
+ ld [hli], a
+ inc hl
+ inc hl
+ inc hl
+ dec c
+ jr nz, .palette_loop_2
+ pop de
+ dec hl
+ ld a, d
+ ld [hld], a
+ ld a, e
+ ld [hl], a
+
+ pop af
+ ld [rSVBK], a
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 124a3
+
+.PlaceHealingMachineTile: ; 124a3
+ push bc
+ ld a, [Buffer1]
+ bcpixel 2, 4
+ cp $1 ; ElmsLab
+ jr z, .okay
+ bcpixel 0, 0
+
+.okay
+ ld a, [de]
+ add c
+ inc de
+ ld [hli], a
+ ld a, [de]
+ add b
+ inc de
+ ld [hli], a
+ ld a, [de]
+ inc de
+ ld [hli], a
+ ld a, [de]
+ inc de
+ ld [hli], a
+ pop bc
+ ret
+; 124c1
diff --git a/event/itemball.asm b/event/itemball.asm
deleted file mode 100755
index ed0c6a9e0..000000000
--- a/event/itemball.asm
+++ /dev/null
@@ -1,54 +0,0 @@
-FindItemInBallScript:: ; 0x122ce
- callasm .TryReceiveItem
- iffalse .no_room
- disappear LAST_TALKED
- opentext
- writetext .text_found
- playsound SFX_ITEM
- pause 60
- itemnotify
- closetext
- end
-; 0x122e3
-
-.no_room ; 0x122e3
- opentext
- writetext .text_found
- waitbutton
- writetext .text_bag_full
- waitbutton
- closetext
- end
-; 0x122ee
-
-.text_found ; 0x122ee
- ; found @ !
- text_jump UnknownText_0x1c0a1c
- db "@"
-; 0x122f3
-
-.text_bag_full ; 0x122f3
- ; But can't carry any more items.
- text_jump UnknownText_0x1c0a2c
- db "@"
-; 0x122f8
-
-.TryReceiveItem: ; 122f8
- xor a
- ld [ScriptVar], a
- ld a, [EngineBuffer1]
- ld [wNamedObjectIndexBuffer], a
- call GetItemName
- ld hl, StringBuffer3
- call CopyName2
- ld a, [EngineBuffer1]
- ld [CurItem], a
- ld a, [CurFruit]
- ld [wItemQuantityChangeBuffer], a
- ld hl, NumItems
- call ReceiveItem
- ret nc
- ld a, $1
- ld [ScriptVar], a
- ret
-; 12324
diff --git a/event/itemfinder.asm b/event/itemfinder.asm
index 5356a1f86..71aaa5b69 100755
--- a/event/itemfinder.asm
+++ b/event/itemfinder.asm
@@ -1,5 +1,5 @@
ItemFinder: ; 12580
- callba CheckForHiddenItems
+ farcall CheckForHiddenItems
jr c, .found_something
ld hl, .Script_FoundNothing
jr .resume
diff --git a/event/kurt.asm b/event/kurt.asm
index e1fff12c0..9bc06a613 100644
--- a/event/kurt.asm
+++ b/event/kurt.asm
@@ -57,7 +57,7 @@ Special_SelectApricornForKurt: ; 88018
; 88055
Kurt_SelectApricorn: ; 88055
- callba FindApricornsInBag
+ farcall FindApricornsInBag
jr c, .nope
ld hl, .MenuDataHeader
call CopyMenuDataHeader
@@ -106,7 +106,7 @@ Kurt_SelectApricorn: ; 88055
ld a, [MenuSelection]
and a
ret z
- callba PlaceMenuItemName
+ farcall PlaceMenuItemName
ret
; 880ab
@@ -117,7 +117,7 @@ Kurt_SelectApricorn: ; 88055
ret z
ld a, [wItemQuantityChangeBuffer]
ld [MenuSelectionQuantity], a
- callba PlaceMenuItemQuantity
+ farcall PlaceMenuItemQuantity
ret
; 880c2
@@ -140,7 +140,7 @@ Kurt_SelectQuantity: ; 880c2
call .PlaceApricornName
call PlaceApricornQuantity
call ApplyTilemap
- callba Kurt_SelectQuantity_InterpretJoypad
+ farcall Kurt_SelectQuantity_InterpretJoypad
jr nc, .loop
push bc
@@ -171,7 +171,7 @@ Kurt_SelectQuantity: ; 880c2
add hl, de
ld d, h
ld e, l
- callba PlaceMenuItemName
+ farcall PlaceMenuItemName
ret
; 88126
diff --git a/event/lucky_number.asm b/event/lucky_number.asm
new file mode 100644
index 000000000..4488cfcc9
--- /dev/null
+++ b/event/lucky_number.asm
@@ -0,0 +1,226 @@
+Special_CheckForLuckyNumberWinners: ; 4d87a
+ xor a
+ ld [ScriptVar], a
+ ld [wFoundMatchingIDInParty], a
+ ld a, [PartyCount]
+ and a
+ ret z
+ ld d, a
+ ld hl, PartyMon1ID
+ ld bc, PartySpecies
+.PartyLoop:
+ ld a, [bc]
+ inc bc
+ cp EGG
+ call nz, .CompareLuckyNumberToMonID
+ push bc
+ ld bc, PARTYMON_STRUCT_LENGTH
+ add hl, bc
+ pop bc
+ dec d
+ jr nz, .PartyLoop
+ ld a, BANK(sBox)
+ call GetSRAMBank
+ ld a, [sBoxCount]
+ and a
+ jr z, .SkipOpenBox
+ ld d, a
+ ld hl, sBoxMon1ID
+ ld bc, sBoxSpecies
+.OpenBoxLoop:
+ ld a, [bc]
+ inc bc
+ cp EGG
+ jr z, .SkipOpenBoxMon
+ call .CompareLuckyNumberToMonID
+ jr nc, .SkipOpenBoxMon
+ ld a, 1
+ ld [wFoundMatchingIDInParty], a
+
+.SkipOpenBoxMon:
+ push bc
+ ld bc, BOXMON_STRUCT_LENGTH
+ add hl, bc
+ pop bc
+ dec d
+ jr nz, .OpenBoxLoop
+
+.SkipOpenBox:
+ call CloseSRAM
+ ld c, $0
+.BoxesLoop:
+ ld a, [wCurBox]
+ and $f
+ cp c
+ jr z, .SkipBox
+ ld hl, .BoxBankAddresses
+ ld b, 0
+ add hl, bc
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ call GetSRAMBank
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a ; hl now contains the address of the loaded box in SRAM
+ ld a, [hl]
+ and a
+ jr z, .SkipBox ; no mons in this box
+ push bc
+ ld b, h
+ ld c, l
+ inc bc
+ ld de, sBoxMon1ID - sBox
+ add hl, de
+ ld d, a
+.BoxNLoop:
+ ld a, [bc]
+ inc bc
+ cp EGG
+ jr z, .SkipBoxMon
+
+ call .CompareLuckyNumberToMonID ; sets ScriptVar and CurPartySpecies appropriately
+ jr nc, .SkipBoxMon
+ ld a, 1
+ ld [wFoundMatchingIDInParty], a
+
+.SkipBoxMon:
+ push bc
+ ld bc, BOXMON_STRUCT_LENGTH
+ add hl, bc
+ pop bc
+ dec d
+ jr nz, .BoxNLoop
+ pop bc
+
+.SkipBox:
+ inc c
+ ld a, c
+ cp NUM_BOXES
+ jr c, .BoxesLoop
+
+ call CloseSRAM
+ ld a, [ScriptVar]
+ and a
+ ret z ; found nothing
+ farcall TrainerRankings_LuckyNumberShow
+ ld a, [wFoundMatchingIDInParty]
+ and a
+ push af
+ ld a, [CurPartySpecies]
+ ld [wNamedObjectIndexBuffer], a
+ call GetPokemonName
+ ld hl, .FoundPartymonText
+ pop af
+ jr z, .print
+ ld hl, .FoundBoxmonText
+
+.print
+ jp PrintText
+
+.CompareLuckyNumberToMonID: ; 4d939
+ push bc
+ push de
+ push hl
+ ld d, h
+ ld e, l
+ ld hl, Buffer1
+ lb bc, PRINTNUM_LEADINGZEROS | 2, 5
+ call PrintNum
+ ld hl, LuckyNumberDigit1Buffer
+ ld de, wLuckyIDNumber
+ lb bc, PRINTNUM_LEADINGZEROS | 2, 5
+ call PrintNum
+ ld b, 5
+ ld c, 0
+ ld hl, LuckyNumberDigit5Buffer
+ ld de, Buffer5
+.loop
+ ld a, [de]
+ cp [hl]
+ jr nz, .done
+ dec de
+ dec hl
+ inc c
+ dec b
+ jr nz, .loop
+
+.done
+ pop hl
+ push hl
+ ld de, -6
+ add hl, de
+ ld a, [hl]
+ pop hl
+ pop de
+ push af
+ ld a, c
+ ld b, 1
+ cp 5
+ jr z, .okay
+ ld b, 2
+ cp 3
+ jr nc, .okay
+ ld b, 3
+ cp 2
+ jr nz, .nomatch
+
+.okay
+ inc b
+ ld a, [ScriptVar]
+ and a
+ jr z, .bettermatch
+ cp b
+ jr c, .nomatch
+
+.bettermatch
+ dec b
+ ld a, b
+ ld [ScriptVar], a
+ pop bc
+ ld a, b
+ ld [CurPartySpecies], a
+ pop bc
+ scf
+ ret
+
+.nomatch
+ pop bc
+ pop bc
+ and a
+ ret
+
+.BoxBankAddresses: ; 4d99f
+ dba sBox1
+ dba sBox2
+ dba sBox3
+ dba sBox4
+ dba sBox5
+ dba sBox6
+ dba sBox7
+ dba sBox8
+ dba sBox9
+ dba sBox10
+ dba sBox11
+ dba sBox12
+ dba sBox13
+ dba sBox14
+
+.FoundPartymonText: ; 0x4d9c9
+ ; Congratulations! We have a match with the ID number of @ in your party.
+ text_jump UnknownText_0x1c1261
+ db "@"
+
+.FoundBoxmonText: ; 0x4d9ce
+ ; Congratulations! We have a match with the ID number of @ in your PC BOX.
+ text_jump UnknownText_0x1c12ae
+ db "@"
+
+Special_PrintTodaysLuckyNumber: ; 4d9d3
+ ld hl, StringBuffer3
+ ld de, wLuckyIDNumber
+ lb bc, PRINTNUM_LEADINGZEROS | 2, 5
+ call PrintNum
+ ld a, "@"
+ ld [StringBuffer3 + 5], a
+ ret
diff --git a/event/magikarp.asm b/event/magikarp.asm
index f926196cd..4dab89816 100644
--- a/event/magikarp.asm
+++ b/event/magikarp.asm
@@ -5,7 +5,7 @@ Special_CheckMagikarpLength: ; fbb32
; Returns 0 if the Pokemon you select is not a Magikarp.
; Let's start by selecting a Magikarp.
- callba SelectMonFromParty
+ farcall SelectMonFromParty
jr c, .declined
ld a, [CurPartySpecies]
cp MAGIKARP
@@ -28,19 +28,19 @@ Special_CheckMagikarpLength: ; fbb32
ld c, l
call CalcMagikarpLength
call PrintMagikarpLength
- callba TrainerRankings_MagikarpLength
+ farcall TrainerRankings_MagikarpLength
ld hl, .MeasureItText
call PrintText
; Did we beat the record?
- ld hl, Buffer1
+ ld hl, wMagikarpLength
ld de, wBestMagikarpLengthFeet
ld c, 2
call StringCmp
jr nc, .not_long_enough
; NEW RECORD!!! Let's save that.
- ld hl, Buffer1
+ ld hl, wMagikarpLength
ld de, wBestMagikarpLengthFeet
ld a, [hli]
ld [de], a
@@ -79,7 +79,7 @@ Special_CheckMagikarpLength: ; fbb32
; 0xfbbae
Magikarp_LoadFeetInchesChars: ; fbbae
- ld hl, VTiles2 tile "′"
+ ld hl, VTiles2 tile "′" ; $6e
ld de, .feetinchchars
lb bc, BANK(.feetinchchars), 2
call Request2bpp
@@ -87,18 +87,18 @@ Magikarp_LoadFeetInchesChars: ; fbbae
; fbbbb
.feetinchchars ; fbbb
-INCBIN "gfx/unknown/0fbbbb.2bpp"
+INCBIN "gfx/font/feet_inches.2bpp"
; fbbdb
PrintMagikarpLength: ; fbbdb
call Magikarp_LoadFeetInchesChars
ld hl, StringBuffer1
- ld de, Buffer1
+ ld de, wMagikarpLength
lb bc, PRINTNUM_RIGHTALIGN | 1, 2
call PrintNum
ld [hl], "′"
inc hl
- ld de, Buffer2
+ ld de, wMagikarpLength + 1
lb bc, PRINTNUM_RIGHTALIGN | 1, 2
call PrintNum
ld [hl], "″"
@@ -108,7 +108,7 @@ PrintMagikarpLength: ; fbbdb
; fbbfc
CalcMagikarpLength: ; fbbfc
-; Return Magikarp's length (in mm) at MagikarpLength (big endian).
+; Return Magikarp's length (in mm) at wMagikarpLength (big endian).
;
; input:
; de: EnemyMonDVs
@@ -125,9 +125,9 @@ CalcMagikarpLength: ; fbbfc
; bc = rrc(dv[0]) ++ rrc(dv[1]) ^ rrc(id)
-; if bc < 10: [MagikarpLength] = c + 190
-; if bc ≥ $ff00: [MagikarpLength] = c + 1370
-; else: [MagikarpLength] = z × 100 + (bc − x) / y
+; if bc < 10: [wMagikarpLength] = c + 190
+; if bc ≥ $ff00: [wMagikarpLength] = c + 1370
+; else: [wMagikarpLength] = z × 100 + (bc − x) / y
; X, Y, and Z depend on the value of b as follows:
@@ -274,7 +274,7 @@ CalcMagikarpLength: ; fbbfc
.ok
ld e, a
- ld hl, MagikarpLength
+ ld hl, wMagikarpLength
ld [hl], d
inc hl
ld [hl], e
@@ -326,9 +326,9 @@ CalcMagikarpLength: ; fbbfc
Special_MagikarpHouseSign: ; fbcd2
ld a, [wBestMagikarpLengthFeet]
- ld [Buffer1], a
+ ld [wMagikarpLength], a
ld a, [wBestMagikarpLengthInches]
- ld [Buffer2], a
+ ld [wMagikarpLength + 1], a
call PrintMagikarpLength
ld hl, .CurrentRecordtext
call PrintText
diff --git a/event/magnet_train.asm b/event/magnet_train.asm
index 75bd12cd7..3a2f902c2 100755
--- a/event/magnet_train.asm
+++ b/event/magnet_train.asm
@@ -45,7 +45,7 @@ Special_MagnetTrain: ; 8cc04
jr z, .initialize
bit 7, a
jr nz, .done
- callab PlaySpriteAnimations
+ callfar PlaySpriteAnimations
call MagnetTrain_Jumptable
call MagnetTrain_UpdateLYOverrides
call PushLYOverrides
@@ -117,7 +117,7 @@ MagntTrain_LoadGFX_PlayMusic: ; 8ccc9
call ClearBGPalettes
call ClearSprites
call DisableLCD
- callab ClearSpriteAnims
+ callfar ClearSpriteAnims
call SetMagnetTrainPals
call DrawMagnetTrain
ld a, $90
@@ -131,7 +131,7 @@ MagntTrain_LoadGFX_PlayMusic: ; 8ccc9
push af
ld a, $1
ld [rSVBK], a
- callba GetPlayerIcon
+ farcall GetPlayerIcon
pop af
ld [rSVBK], a
ld hl, VTiles0
@@ -323,7 +323,7 @@ MagnetTrain_Jumptable: ; 8cdf7
ld d, 10 * 8 + 5
ld a, [wMagnetTrainPlayerSpriteInitX]
ld e, a
- ld b, SPRITE_ANIM_INDEX_15
+ ld b, SPRITE_ANIM_INDEX_MAGNET_TRAIN_RED
ld a, [rSVBK]
push af
ld a, $1
@@ -331,7 +331,7 @@ MagnetTrain_Jumptable: ; 8cdf7
ld a, [PlayerGender]
bit 0, a
jr z, .got_gender
- ld b, SPRITE_ANIM_INDEX_1F
+ ld b, SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE
.got_gender
pop af
@@ -423,7 +423,7 @@ MagnetTrain_Jumptable: ; 8cdf7
; 8ceae
MagnetTrain_Jumptable_FirstRunThrough: ; 8ceae
- callba PlaySpriteAnimations
+ farcall PlaySpriteAnimations
call MagnetTrain_Jumptable
call MagnetTrain_UpdateLYOverrides
call PushLYOverrides
@@ -434,13 +434,13 @@ MagnetTrain_Jumptable_FirstRunThrough: ; 8ceae
ld [rSVBK], a
ld a, [TimeOfDayPal]
push af
- ld a, [wPermission]
+ ld a, [wEnvironment]
push af
ld a, [TimeOfDay]
and $3
ld [TimeOfDayPal], a
ld a, $1
- ld [wPermission], a
+ ld [wEnvironment], a
ld b, SCGB_MAPPALS
call GetSGBLayout
call UpdateTimePals
@@ -451,7 +451,7 @@ MagnetTrain_Jumptable_FirstRunThrough: ; 8ceae
ld a, [rOBP1]
ld [wOBP1], a
pop af
- ld [wPermission], a
+ ld [wEnvironment], a
pop af
ld [TimeOfDayPal], a
pop af
diff --git a/event/misc_scripts.asm b/event/misc_scripts.asm
new file mode 100755
index 000000000..97372a57a
--- /dev/null
+++ b/event/misc_scripts.asm
@@ -0,0 +1,62 @@
+Script_AbortBugContest: ; 0x122c1
+ checkflag ENGINE_BUG_CONTEST_TIMER
+ iffalse .finish
+ setflag ENGINE_DAILY_BUG_CONTEST
+ special ContestReturnMons
+.finish
+ end
+
+FindItemInBallScript:: ; 0x122ce
+ callasm .TryReceiveItem
+ iffalse .no_room
+ disappear LAST_TALKED
+ opentext
+ writetext .text_found
+ playsound SFX_ITEM
+ pause 60
+ itemnotify
+ closetext
+ end
+; 0x122e3
+
+.no_room ; 0x122e3
+ opentext
+ writetext .text_found
+ waitbutton
+ writetext .text_bag_full
+ waitbutton
+ closetext
+ end
+; 0x122ee
+
+.text_found ; 0x122ee
+ ; found @ !
+ text_jump UnknownText_0x1c0a1c
+ db "@"
+; 0x122f3
+
+.text_bag_full ; 0x122f3
+ ; But can't carry any more items.
+ text_jump UnknownText_0x1c0a2c
+ db "@"
+; 0x122f8
+
+.TryReceiveItem: ; 122f8
+ xor a
+ ld [ScriptVar], a
+ ld a, [EngineBuffer1]
+ ld [wNamedObjectIndexBuffer], a
+ call GetItemName
+ ld hl, StringBuffer3
+ call CopyName2
+ ld a, [EngineBuffer1]
+ ld [CurItem], a
+ ld a, [CurFruit]
+ ld [wItemQuantityChangeBuffer], a
+ ld hl, NumItems
+ call ReceiveItem
+ ret nc
+ ld a, $1
+ ld [ScriptVar], a
+ ret
+; 12324
diff --git a/event/misc_scripts_2.asm b/event/misc_scripts_2.asm
new file mode 100644
index 000000000..c4c51d5e6
--- /dev/null
+++ b/event/misc_scripts_2.asm
@@ -0,0 +1,51 @@
+RepelWoreOffScript:: ; 0x13619
+ opentext
+ writetext .text
+ waitbutton
+ closetext
+ end
+
+.text ; 0x13620
+ ; REPEL's effect wore off.
+ text_jump UnknownText_0x1bd308
+ db "@"
+
+HiddenItemScript:: ; 0x13625
+ opentext
+ copybytetovar EngineBuffer3
+ itemtotext 0, 0
+ writetext .found_text
+ giveitem ITEM_FROM_MEM
+ iffalse .bag_full
+ callasm SetMemEvent
+ specialsound
+ itemnotify
+ jump .finish
+
+.bag_full ; 0x1363e
+ buttonsound
+ writetext .no_room_text
+ waitbutton
+
+.finish ; 13643
+ closetext
+ end
+
+.found_text ; 0x13645
+ ; found @ !
+ text_jump UnknownText_0x1bd321
+ db "@"
+
+.no_room_text ; 0x1364a
+ ; But has no space left…
+ text_jump UnknownText_0x1bd331
+ db "@"
+
+SetMemEvent: ; 1364f
+ ld hl, EngineBuffer1
+ ld a, [hli]
+ ld d, [hl]
+ ld e, a
+ ld b, SET_FLAG
+ call EventFlagAction
+ ret
diff --git a/event/mom.asm b/event/mom.asm
index 80513e5fb..6e3c7b320 100644
--- a/event/mom.asm
+++ b/event/mom.asm
@@ -161,7 +161,7 @@ Special_BankOfMom: ; 16218
jr z, .CancelDeposit
ld de, Money
ld bc, StringBuffer2
- callba CompareMoney
+ farcall CompareMoney
jr c, .DontHaveThatMuchToDeposit
ld hl, StringBuffer2
ld de, StringBuffer2 + 3
@@ -169,11 +169,11 @@ Special_BankOfMom: ; 16218
call CopyBytes
ld bc, wMomsMoney
ld de, StringBuffer2
- callba GiveMoney
+ farcall GiveMoney
jr c, .CantDepositThatMuch
ld bc, StringBuffer2 + 3
ld de, Money
- callba TakeMoney
+ farcall TakeMoney
ld hl, StringBuffer2
ld de, wMomsMoney
ld bc, 3
@@ -232,15 +232,15 @@ Special_BankOfMom: ; 16218
call CopyBytes
ld de, wMomsMoney
ld bc, StringBuffer2
- callba CompareMoney
+ farcall CompareMoney
jr c, .InsufficientFundsInBank
ld bc, Money
ld de, StringBuffer2
- callba GiveMoney
+ farcall GiveMoney
jr c, .NotEnoughRoomInWallet
ld bc, StringBuffer2 + 3
ld de, wMomsMoney
- callba TakeMoney
+ farcall TakeMoney
ld hl, StringBuffer2
ld de, Money
ld bc, 3
@@ -476,7 +476,7 @@ Mom_ContinueMenuSetup: ; 1651a
lb bc, PRINTNUM_MONEY | PRINTNUM_LEADINGZEROS | 3, 6
call PrintNum
call UpdateSprites
- call CGBOnly_LoadEDTile
+ call CGBOnly_CopyTilemapAtOnce
ret
; 1656b
@@ -568,7 +568,7 @@ Mom_WithdrawDepositMenuJoypad: ; 16571
ld c, l
ld b, h
ld de, StringBuffer2
- callba GiveMoney
+ farcall GiveMoney
ret
.decrementdigit
@@ -577,7 +577,7 @@ Mom_WithdrawDepositMenuJoypad: ; 16571
ld c, l
ld b, h
ld de, StringBuffer2
- callba TakeMoney
+ farcall TakeMoney
ret
.getdigitquantity
diff --git a/event/mom_phone.asm b/event/mom_phone.asm
index f689745f1..35021dd42 100755
--- a/event/mom_phone.asm
+++ b/event/mom_phone.asm
@@ -1,3 +1,10 @@
+NUM_MOM_ITEMS_1 EQUS "((MomItems_1End - MomItems_1) / 8)"
+NUM_MOM_ITEMS_2 EQUS "((MomItems_2End - MomItems_2) / 8)"
+
+const_value = 1
+ const MOM_ITEM
+ const MOM_DOLL
+
MomTriesToBuySomething:: ; fcfec
ld a, [wMapReentryScriptQueueFlag]
and a
@@ -13,7 +20,7 @@ MomTriesToBuySomething:: ; fcfec
ret nc
ld b, BANK(.Script)
ld de, .Script
- callba LoadScriptBDE
+ farcall LoadScriptBDE
scf
ret
; fd00f
@@ -53,7 +60,7 @@ MomTriesToBuySomething:: ; fcfec
CheckBalance_MomItem2: ; fd044
ld a, [wWhichMomItem]
- cp 10
+ cp NUM_MOM_ITEMS_2
jr nc, .nope
call GetItemFromMom
ld a, [hli]
@@ -64,7 +71,7 @@ CheckBalance_MomItem2: ; fd044
ld [hMoneyTemp + 2], a
ld de, wMomsMoney
ld bc, hMoneyTemp
- callba CompareMoney
+ farcall CompareMoney
jr nc, .have_enough_money
.nope
@@ -76,15 +83,15 @@ CheckBalance_MomItem2: ; fd044
.check_have_2300
ld hl, hMoneyTemp
- ld [hl], (2300 / $10000) ; $00
+ ld [hl], MOM_MONEY / $10000
inc hl
- ld [hl], ((2300 % $10000) / $100) ; $08
+ ld [hl], MOM_MONEY / $100 % $100
inc hl
- ld [hl], (2300 % $100) ; $fc
+ ld [hl], MOM_MONEY % $100
.loop
ld de, MomItemTriggerBalance
ld bc, wMomsMoney
- callba CompareMoney
+ farcall CompareMoney
jr z, .exact
jr nc, .less_than
call .AddMoney
@@ -96,7 +103,7 @@ CheckBalance_MomItem2: ; fd044
.exact
call .AddMoney
- ld a, 5
+ ld a, NUM_MOM_ITEMS_1
call RandomRange
inc a
ld [wWhichMomItemSet], a
@@ -106,7 +113,7 @@ CheckBalance_MomItem2: ; fd044
.AddMoney:
ld de, MomItemTriggerBalance
ld bc, hMoneyTemp
- callba AddMoney
+ farcall AddMoney
ret
; fd0a6
@@ -123,7 +130,7 @@ MomBuysItem_DeductFunds: ; fd0a6 (3f:50a6)
ld [hMoneyTemp + 2], a
ld de, wMomsMoney
ld bc, hMoneyTemp
- callba TakeMoney
+ farcall TakeMoney
ret
@@ -137,7 +144,7 @@ Mom_GiveItemOrDoll: ; fd0c3
ld a, [hl]
ld c, a
ld b, 1
- callba DecorationFlagAction_c
+ farcall DecorationFlagAction_c
scf
ret
@@ -191,7 +198,7 @@ GetItemFromMom: ; fd117
.zero
ld a, [wWhichMomItem]
- cp 10 ; length of MomItems_2
+ cp NUM_MOM_ITEMS_2
jr c, .ok
xor a
@@ -208,32 +215,7 @@ endr
ret
; fd136
-momitem: macro
-; money to trigger, cost, kind, item
- dt \1
- dt \2
- db \3, \4
-ENDM
-
-
-MomItems_1: ; fd136
- momitem 0, 600, MOM_ITEM, SUPER_POTION
- momitem 0, 90, MOM_ITEM, ANTIDOTE
- momitem 0, 180, MOM_ITEM, POKE_BALL
- momitem 0, 450, MOM_ITEM, ESCAPE_ROPE
- momitem 0, 500, MOM_ITEM, GREAT_BALL
-MomItems_2: ; fd15e
- momitem 900, 600, MOM_ITEM, SUPER_POTION
- momitem 4000, 270, MOM_ITEM, REPEL
- momitem 7000, 600, MOM_ITEM, SUPER_POTION
- momitem 10000, 1800, MOM_DOLL, DECO_CHARMANDER_DOLL
- momitem 15000, 3000, MOM_ITEM, MOON_STONE
- momitem 19000, 600, MOM_ITEM, SUPER_POTION
- momitem 30000, 4800, MOM_DOLL, DECO_CLEFAIRY_DOLL
- momitem 40000, 900, MOM_ITEM, HYPER_POTION
- momitem 50000, 8000, MOM_DOLL, DECO_PIKACHU_DOLL
- momitem 100000, 22800, MOM_DOLL, DECO_BIG_SNORLAX_DOLL
-; fd1ae
+INCLUDE "data/items/mom_phone.asm"
db 0, 0, 0 ; XXX
diff --git a/event/move_deleter.asm b/event/move_deleter.asm
index aa8a1e915..95fc0f1d8 100644
--- a/event/move_deleter.asm
+++ b/event/move_deleter.asm
@@ -5,7 +5,7 @@ MoveDeletion:
jr c, .declined
ld hl, .AskWhichMonText
call PrintText
- callba SelectMonFromParty
+ farcall SelectMonFromParty
jr c, .declined
ld a, [CurPartySpecies]
cp EGG
@@ -20,7 +20,7 @@ MoveDeletion:
ld hl, .AskWhichMoveText
call PrintText
call LoadStandardMenuDataHeader
- callba ChooseMoveToDelete
+ farcall ChooseMoveToDelete
push af
call ReturnToMapWithSpeechTextbox
pop af
diff --git a/event/move_tutor.asm b/event/move_tutor.asm
new file mode 100644
index 000000000..a15ecaf93
--- /dev/null
+++ b/event/move_tutor.asm
@@ -0,0 +1,103 @@
+Special_MoveTutor: ; 4925b
+ call FadeToMenu
+ call ClearBGPalettes
+ call ClearScreen
+ call DelayFrame
+ ld b, SCGB_PACKPALS
+ call GetSGBLayout
+ xor a
+ ld [wItemAttributeParamBuffer], a
+ call .GetMoveTutorMove
+ ld [wd265], a
+ ld [wPutativeTMHMMove], a
+ call GetMoveName
+ call CopyName1
+ farcall ChooseMonToLearnTMHM
+ jr c, .cancel
+ jr .enter_loop
+
+.loop
+ farcall ChooseMonToLearnTMHM_NoRefresh
+ jr c, .cancel
+.enter_loop
+ call CheckCanLearnMoveTutorMove
+ jr nc, .loop
+ xor a
+ ld [ScriptVar], a
+ jr .quit
+
+.cancel
+ ld a, -1
+ ld [ScriptVar], a
+.quit
+ call CloseSubmenu
+ ret
+
+.GetMoveTutorMove: ; 492a5
+ ld a, [ScriptVar]
+ cp 1
+ jr z, .flamethrower
+ cp 2
+ jr z, .thunderbolt
+ ld a, ICE_BEAM
+ ret
+
+.flamethrower
+ ld a, FLAMETHROWER
+ ret
+
+.thunderbolt
+ ld a, THUNDERBOLT
+ ret
+
+CheckCanLearnMoveTutorMove: ; 492b9
+ ld hl, .MenuDataHeader
+ call LoadMenuDataHeader
+
+ predef CanLearnTMHMMove
+
+ push bc
+ ld a, [CurPartyMon]
+ ld hl, PartyMonNicknames
+ call GetNick
+ pop bc
+
+ ld a, c
+ and a
+ jr nz, .can_learn
+ push de
+ ld de, SFX_WRONG
+ call PlaySFX
+ pop de
+ ld a, BANK(Text_TMHMNotCompatible)
+ ld hl, Text_TMHMNotCompatible
+ call FarPrintText
+ jr .didnt_learn
+
+.can_learn
+ callfar KnowsMove
+ jr c, .didnt_learn
+
+ predef LearnMove
+ ld a, b
+ and a
+ jr z, .didnt_learn
+
+ ld c, HAPPINESS_LEARNMOVE
+ callfar ChangeHappiness
+ jr .learned
+
+.didnt_learn
+ call ExitMenu
+ and a
+ ret
+
+.learned
+ call ExitMenu
+ scf
+ ret
+
+.MenuDataHeader: ; 0x4930a
+ db $40 ; flags
+ db 12, 00 ; start coords
+ db 17, 19 ; end coords
diff --git a/event/name_rater.asm b/event/name_rater.asm
index 96d0ee363..771c5090a 100644
--- a/event/name_rater.asm
+++ b/event/name_rater.asm
@@ -7,7 +7,7 @@ NameRater: ; fb6ed
; Select a Pokemon from your party
ld hl, NameRaterWhichMonText
call PrintText
- callba SelectMonFromParty
+ farcall SelectMonFromParty
jr c, .cancel
; He can't rename an egg...
ld a, [CurPartySpecies]
@@ -34,7 +34,7 @@ NameRater: ; fb6ed
call GetBaseData
ld b, 0
ld de, StringBuffer2
- callba _NamingScreen
+ farcall _NamingScreen
; If the new name is empty, treat it as unchanged.
call IsNewNameEmpty
ld hl, NameRaterSameAsBeforeText
diff --git a/event/overworld.asm b/event/overworld.asm
index 156ef389f..370162fa9 100755
--- a/event/overworld.asm
+++ b/event/overworld.asm
@@ -37,7 +37,7 @@ CheckEngineFlag: ; c721
; Check engine flag de
; Return carry if flag is not set
ld b, CHECK_FLAG
- callba EngineFlagAction
+ farcall EngineFlagAction
ld a, c
and a
jr nz, .isset
@@ -77,9 +77,9 @@ CheckPartyMove: ; c742
ld a, [hl]
and a
jr z, .no
- cp a, -1
+ cp -1
jr z, .no
- cp a, EGG
+ cp EGG
jr z, .next
ld bc, PARTYMON_STRUCT_LENGTH
@@ -177,7 +177,7 @@ CheckMapForSomethingToCut: ; c7ce
call GetFacingTileCoord
ld c, a
push de
- callba CheckCutCollision
+ farcall CheckCutCollision
pop de
jr nc, .fail
; Get the location of the current block in OverworldMap.
@@ -233,7 +233,7 @@ CutDownTreeOrGrass: ; c810
call DelayFrame
ld a, [Buffer6] ; Animation type
ld e, a
- callba OWCutAnimation
+ farcall OWCutAnimation
call BufferScreen
call GetMovementPermissions
call UpdateSprites
@@ -277,53 +277,9 @@ CheckOverworldTileArrays: ; c840
xor a
ret
-CutTreeBlockPointers: ; c862
-; Which tileset are we in?
- dbw TILESET_JOHTO_1, .johto1
- dbw TILESET_JOHTO_2, .johto2
- dbw TILESET_KANTO, .kanto
- dbw TILESET_PARK, .park
- dbw TILESET_ILEX_FOREST, .ilex
- db -1
-
-.johto1 ; Johto OW
-; Which meta tile are we facing, which should we replace it with, and which animation?
- db $03, $02, $01 ; grass
- db $5b, $3c, $00 ; tree
- db $5f, $3d, $00 ; tree
- db $63, $3f, $00 ; tree
- db $67, $3e, $00 ; tree
- db -1
-
-.johto2 ; Goldenrod area
- db $03, $02, $01 ; grass
- db -1
-
-.kanto ; Kanto OW
- db $0b, $0a, $01 ; grass
- db $32, $6d, $00 ; tree
- db $33, $6c, $00 ; tree
- db $34, $6f, $00 ; tree
- db $35, $4c, $00 ; tree
- db $60, $6e, $00 ; tree
- db -1
-
-.park ; National Park
- db $13, $03, $01 ; grass
- db $03, $04, $01 ; grass
- db -1
-
-.ilex ; Ilex Forest
- db $0f, $17, $00
- db -1
-
-WhirlpoolBlockPointers: ; c8a4
- dbw TILESET_JOHTO_1, .johto
- db -1
-
-.johto ; c8a8
- db $07, $36, $00
- db -1
+
+INCLUDE "data/field_move_blocks.asm"
+
OWFlash: ; c8ac
call .CheckUseFlash
@@ -334,10 +290,10 @@ OWFlash: ; c8ac
.CheckUseFlash: ; c8b5
; Flash
ld de, ENGINE_ZEPHYRBADGE
- callba CheckBadge
+ farcall CheckBadge
jr c, .nozephyrbadge
push hl
- callba SpecialAerodactylChamber
+ farcall SpecialAerodactylChamber
pop hl
jr c, .useflash
ld a, [wTimeOfDayPalset]
@@ -416,7 +372,7 @@ SurfFunction: ; c909
jr nz, .cannotsurf
call CheckDirection
jr c, .cannotsurf
- callba CheckFacingObject
+ farcall CheckFacingObject
jr c, .cannotsurf
ld a, $1
ret
@@ -432,7 +388,7 @@ SurfFunction: ; c909
.DoSurf: ; c95f (3:495f)
call GetSurfType
- ld [Buffer2], a ; wd1eb (aliases: MovementType)
+ ld [Buffer2], a
call GetPartyNick
ld hl, SurfFromMenuScript
call QueueScript
@@ -472,7 +428,7 @@ UsedSurfScript: ; c986
end
.empty_fn ; c9a2
- callba TrainerRankings_Surf
+ farcall TrainerRankings_Surf
ret
UsedSurfText: ; c9a9
@@ -510,7 +466,7 @@ CheckDirection: ; c9cb
; Get player direction
ld a, [PlayerDirection]
- and a, %00001100 ; bits 2 and 3 contain direction
+ and %00001100 ; bits 2 and 3 contain direction
rrca
rrca
ld e, a
@@ -569,7 +525,7 @@ TrySurfOW:: ; c9e7
jr nz, .quit
call GetSurfType
- ld [MovementType], a
+ ld [Buffer2], a
call GetPartyNick
ld a, BANK(AskSurfScript)
@@ -615,7 +571,7 @@ FlyFunction: ; ca3b
ld de, ENGINE_STORMBADGE
call CheckBadge
jr c, .nostormbadge
- call GetMapPermission
+ call GetMapEnvironment
call CheckOutdoorMap
jr z, .outdoors
jr .indoors
@@ -625,14 +581,14 @@ FlyFunction: ; ca3b
ld [hMapAnims], a
call LoadStandardMenuDataHeader
call ClearSprites
- callba _FlyMap
+ farcall _FlyMap
ld a, e
cp -1
jr z, .illegal
cp NUM_SPAWNS
jr nc, .illegal
- ld [wd001], a
+ ld [DefaultSpawnpoint], a
call CloseWindow
ld a, $1
ret
@@ -678,10 +634,10 @@ FlyFunction: ; ca3b
end
.ReturnFromFly: ; cacb
- callba Function561d
+ farcall Function561d
call DelayFrame
call ReplaceKrisSprite
- callba LoadOverworldFont
+ farcall LoadOverworldFont
ret
WaterfallFunction: ; cade
@@ -693,7 +649,7 @@ WaterfallFunction: ; cade
.TryWaterfall: ; cae7
; Waterfall
ld de, ENGINE_RISINGBADGE
- callba CheckBadge
+ farcall CheckBadge
ld a, $80
ret c
call CheckMapCanWaterfall
@@ -745,7 +701,7 @@ Script_UsedWaterfall: ; 0xcb20
ld a, [PlayerStandingTile]
call CheckWaterfallTile
ret z
- callba TrainerRankings_Waterfall
+ farcall TrainerRankings_Waterfall
ld a, $1
ld [ScriptVar], a
ret
@@ -827,7 +783,7 @@ dig_incave
dw .FailDig
.CheckCanDig: ; cbb8
- call GetMapPermission
+ call GetMapEnvironment
cp CAVE
jr z, .incave
cp DUNGEON
@@ -837,7 +793,7 @@ dig_incave
ret
.incave
- ld hl, wDigWarp
+ ld hl, wDigWarpNumber
ld a, [hli]
and a
jr z, .fail
@@ -851,7 +807,7 @@ dig_incave
ret
.DoDig: ; cbd8
- ld hl, wDigWarp
+ ld hl, wDigWarpNumber
ld de, wNextWarp
ld bc, 3
call CopyBytes
@@ -865,7 +821,7 @@ dig_incave
ret
.escaperope
- callba SpecialKabutoChamber
+ farcall SpecialKabutoChamber
ld hl, .UsedEscapeRopeScript
call QueueScript
ld a, $81
@@ -925,11 +881,11 @@ dig_incave
.DigOut: ; 0xcc59
step_dig 32
- hide_person
+ hide_object
step_end
.DigReturn: ; 0xcc5d
- show_person
+ show_object
return_dig 32
step_end
@@ -949,7 +905,7 @@ TeleportFunction: ; cc61
dw .FailTeleport
.TryTeleport: ; cc78
- call GetMapPermission
+ call GetMapEnvironment
call CheckOutdoorMap
jr z, .CheckIfSpawnPoint
jr .nope
@@ -959,10 +915,10 @@ TeleportFunction: ; cc61
ld d, a
ld a, [wLastSpawnMapNumber]
ld e, a
- callba IsSpawnPoint
+ farcall IsSpawnPoint
jr nc, .nope
ld a, c
- ld [wd001], a
+ ld [DefaultSpawnpoint], a
ld a, $1
ret
@@ -1250,7 +1206,7 @@ DisappearWhirlpool: ; ce1d
call OverworldTextModeSwitch
ld a, [Buffer6]
ld e, a
- callba PlayWhirlpoolSound
+ farcall PlayWhirlpoolSound
call BufferScreen
call GetMovementPermissions
ret
@@ -1404,7 +1360,7 @@ TryRockSmashFromMenu: ; cef4
ret
GetFacingObject: ; cf0d
- callba CheckFacingObject
+ farcall CheckFacingObject
jr nc, .fail
ld a, [hObjectStructIndexBuffer]
@@ -1539,7 +1495,7 @@ FishFunction: ; cf8e
ld d, a
ld a, [Buffer2]
ld e, a
- callba Fish
+ farcall Fish
ld a, d
and a
jr z, .nonibble
@@ -1758,7 +1714,7 @@ BikeFunction: ; d0b3
ret
.CheckEnvironment: ; d121
- call GetMapPermission
+ call GetMapEnvironment
call CheckOutdoorMap
jr z, .ok
cp CAVE
diff --git a/event/photo.asm b/event/photo.asm
deleted file mode 100755
index c47445fc5..000000000
--- a/event/photo.asm
+++ /dev/null
@@ -1,295 +0,0 @@
-UnownPrinter: ; 16be4
- ld a, [UnownDex]
- and a
- ret z
-
- ld a, [hInMenu]
- push af
- ld a, $1
- ld [hInMenu], a
- ld a, [Options]
- push af
- set NO_TEXT_SCROLL, a
- ld [Options], a
- call ClearBGPalettes
- call ClearTileMap
-
- ld de, UnownDexATile
- ld hl, VTiles1 tile $6f
- lb bc, BANK(UnownDexBTile), 1
- call Request1bpp
-
- ld de, UnownDexBTile
- ld hl, VTiles1 tile $75
- lb bc, BANK(UnownDexBTile), 1
- call Request1bpp
-
- hlcoord 0, 0
- lb bc, 3, 18
- call TextBox
-
- hlcoord 0, 5
- lb bc, 7, 7
- call TextBox
-
- hlcoord 0, 14
- lb bc, 2, 18
- call TextBox
-
- hlcoord 1, 2
- ld de, AlphRuinsStampString
- call PlaceString
-
- hlcoord 1, 16
- ld de, UnownDexDoWhatString
- call PlaceString
-
- hlcoord 10, 6
- ld de, UnownDexMenuString
- call PlaceString
-
- xor a
- ld [wJumptableIndex], a
- call .UpdateUnownFrontpic
- call WaitBGMap
-
- ld a, UNOWN
- ld [CurPartySpecies], a
- xor a
- ld [TempMonDVs], a
- ld [TempMonDVs + 1], a
-
- ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
- call GetSGBLayout
- call SetPalettes
-
-.joy_loop
- call JoyTextDelay
-
- ld a, [hJoyPressed]
- and B_BUTTON
- jr nz, .pressed_b
-
- ld a, [hJoyPressed]
- and A_BUTTON
- jr nz, .pressed_a
-
- call .LeftRight
- call DelayFrame
- jr .joy_loop
-
-.pressed_a
- ld a, [wJumptableIndex]
- push af
- callba PrintUnownStamp
- call RestartMapMusic
- pop af
- ld [wJumptableIndex], a
- jr .joy_loop
-
-.pressed_b
- pop af
- ld [Options], a
- pop af
- ld [hInMenu], a
- call ReturnToMapFromSubmenu
- ret
-; 16ca0
-
-.LeftRight: ; 16ca0
- ld a, [hJoyLast]
- and D_RIGHT
- jr nz, .press_right
- ld a, [hJoyLast]
- and D_LEFT
- jr nz, .press_left
- ret
-
-.press_left
- ld hl, wJumptableIndex
- ld a, [hl]
- and a
- jr nz, .wrap_around_left
- ld [hl], 26 + 1
-.wrap_around_left
- dec [hl]
- jr .return
-
-.press_right
- ld hl, wJumptableIndex
- ld a, [hl]
- cp 26
- jr c, .wrap_around_right
- ld [hl], -1
-.wrap_around_right
- inc [hl]
-
-.return
- call .UpdateUnownFrontpic
- ret
-; 16cc8
-
-.UpdateUnownFrontpic: ; 16cc8
- ld a, [wJumptableIndex]
- cp 26
- jr z, .vacant
- inc a
- ld [UnownLetter], a
- ld a, UNOWN
- ld [CurPartySpecies], a
- xor a
- ld [wBoxAlignment], a
- ld de, VTiles2
- predef GetFrontpic
- call .Load2bppToSRAM
- hlcoord 1, 6
- xor a
- ld [hGraphicStartTile], a
- lb bc, 7, 7
- predef PlaceGraphic
- ld de, VTiles2 tile $31
- callba RotateUnownFrontpic
- ret
-
-.Load2bppToSRAM: ; 16cff
- ld a, [rSVBK]
- push af
- ld a, $6
- ld [rSVBK], a
-
- ld a, BANK(sScratch)
- call GetSRAMBank
- ld de, wDecompressScratch
- ld hl, sScratch
- ld a, [hROMBank]
- ld b, a
- ld c, $31
- call Get2bpp
- call CloseSRAM
-
- pop af
- ld [rSVBK], a
- ret
-
-.vacant
- hlcoord 1, 6
- lb bc, 7, 7
- call ClearBox
- hlcoord 1, 9
- ld de, UnownDexVacantString
- call PlaceString
- xor a
- call GetSRAMBank
- ld hl, sScratch
- ld bc, $31 tiles
- xor a
- call ByteFill
- ld hl, VTiles2 tile $31
- ld de, sScratch
- ld c, $31
- ld a, [hROMBank]
- ld b, a
- call Get2bpp
- call CloseSRAM
- ld c, 20
- call DelayFrames
- ret
-; 16d57
-
-AlphRuinsStampString:
- db " ALPH RUINS STAMP@"
-
-UnownDexDoWhatString:
- db "Do what?@"
-
-UnownDexMenuString:
- db "♂ PRINT"
- next "♀ CANCEL"
- next "← PREVIOUS"
- next "→ NEXT"
- db "@"
-
-UnownDexVacantString:
- db "VACANT@"
-; 16d9c
-
-UnownDexATile: ; 16d9c
-INCBIN "gfx/unknown/016d9c.1bpp"
-UnownDexBTile: ; 16da4
-INCBIN "gfx/unknown/016da4.1bpp"
-; 16dac
-
-PlaceUnownPrinterFrontpic: ; 16dac
- hlcoord 0, 0
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- ld a, " "
- call ByteFill
- hlcoord 7, 11
- ld a, $31
- ld [hGraphicStartTile], a
- lb bc, 7, 7
- predef PlaceGraphic
- ret
-; 16dc7
-
-PhotoStudio: ; 16dc7
- ld hl, .Text_AskWhichMon
- call PrintText
- callba SelectMonFromParty
- jr c, .cancel
- ld a, [CurPartySpecies]
- cp EGG
- jr z, .egg
-
- ld hl, .Text_HoldStill
- call PrintText
- call DisableSpriteUpdates
- callba PrintPartymon
- call ReturnToMapWithSpeechTextbox
- ld a, [hPrinter]
- and a
- jr nz, .cancel
- ld hl, .Text_Presto
- jr .print_text
-
-.cancel
- ld hl, .Text_NoPicture
- jr .print_text
-
-.egg
- ld hl, .Text_Egg
-
-.print_text
- call PrintText
- ret
-; 16e04
-
-.Text_AskWhichMon: ; 0x16e04
- ; Which #MON should I photo- graph?
- text_jump UnknownText_0x1be024
- db "@"
-; 0x16e09
-
-.Text_HoldStill: ; 0x16e09
- ; All righty. Hold still for a bit.
- text_jump UnknownText_0x1be047
- db "@"
-; 0x16e0e
-
-.Text_Presto: ; 0x16e0e
- ; Presto! All done. Come again, OK?
- text_jump UnknownText_0x1be06a
- db "@"
-; 0x16e13
-
-.Text_NoPicture: ; 0x16e13
- ; Oh, no picture? Come again, OK?
- text_jump UnknownText_0x1c0000
- db "@"
-; 0x16e18
-
-.Text_Egg: ; 0x16e18
- ; An EGG? My talent is worth more…
- text_jump UnknownText_0x1c0021
- db "@"
-; 0x16e1d
diff --git a/event/poisonstep.asm b/event/poisonstep.asm
index 1e81e188f..00c7477bc 100755
--- a/event/poisonstep.asm
+++ b/event/poisonstep.asm
@@ -132,8 +132,8 @@ DoPoisonStep:: ; 505da
and %10
jr z, .mon_not_fainted
ld c, HAPPINESS_POISONFAINT
- callba ChangeHappiness
- callba GetPartyNick
+ farcall ChangeHappiness
+ farcall GetPartyNick
ld hl, .PoisonFaintText
call PrintText
diff --git a/event/poisonstep_pals.asm b/event/poisonstep_pals.asm
new file mode 100644
index 000000000..8930d4c5d
--- /dev/null
+++ b/event/poisonstep_pals.asm
@@ -0,0 +1,48 @@
+LoadPoisonBGPals: ; cbcdd
+ call .LoadPals
+ ld a, [hCGB]
+ and a
+ ret nz
+ ret ; ????
+
+.LoadPals: ; cbce5
+ ld a, [hCGB]
+ and a
+ jr nz, .cgb
+ ld a, [TimeOfDayPal]
+ and $3
+ cp $3
+ ld a, %00000000
+ jr z, .convert_pals
+ ld a, %10101010
+
+.convert_pals
+ call DmgToCgbBGPals
+ ld c, 4
+ call DelayFrames
+ farcall _UpdateTimePals
+ ret
+
+.cgb
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, BGPals
+ ld c, $20
+.loop
+; RGB 28, 21, 31
+ ld a, (palred 28 + palgreen 21 + palblue 31) % $100
+ ld [hli], a
+ ld a, (palred 28 + palgreen 21 + palblue 31) / $100
+ ld [hli], a
+ dec c
+ jr nz, .loop
+ pop af
+ ld [rSVBK], a
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ld c, 4
+ call DelayFrames
+ farcall _UpdateTimePals
+ ret
diff --git a/event/poke_seer.asm b/event/poke_seer.asm
index 5e93acc5d..d6e335298 100644
--- a/event/poke_seer.asm
+++ b/event/poke_seer.asm
@@ -21,7 +21,7 @@ SpecialPokeSeer: ; 4f0bc
call JoyWaitAorB
ld b, $6
- callba SelectMonFromParty
+ farcall SelectMonFromParty
jr c, .cancel
ld a, [CurPartySpecies]
@@ -240,7 +240,7 @@ GetCaughtLocation: ; 4f20a
cp $7e
jr z, .fail
ld e, a
- callba GetLandmarkName
+ farcall GetLandmarkName
ld hl, StringBuffer1
ld de, wSeerCaughtLocation
ld bc, 17
diff --git a/event/print_photo.asm b/event/print_photo.asm
new file mode 100755
index 000000000..06b01bbcf
--- /dev/null
+++ b/event/print_photo.asm
@@ -0,0 +1,61 @@
+PhotoStudio: ; 16dc7
+ ld hl, .Text_AskWhichMon
+ call PrintText
+ farcall SelectMonFromParty
+ jr c, .cancel
+ ld a, [CurPartySpecies]
+ cp EGG
+ jr z, .egg
+
+ ld hl, .Text_HoldStill
+ call PrintText
+ call DisableSpriteUpdates
+ farcall PrintPartymon
+ call ReturnToMapWithSpeechTextbox
+ ld a, [hPrinter]
+ and a
+ jr nz, .cancel
+ ld hl, .Text_Presto
+ jr .print_text
+
+.cancel
+ ld hl, .Text_NoPicture
+ jr .print_text
+
+.egg
+ ld hl, .Text_Egg
+
+.print_text
+ call PrintText
+ ret
+; 16e04
+
+.Text_AskWhichMon: ; 0x16e04
+ ; Which #MON should I photo- graph?
+ text_jump UnknownText_0x1be024
+ db "@"
+; 0x16e09
+
+.Text_HoldStill: ; 0x16e09
+ ; All righty. Hold still for a bit.
+ text_jump UnknownText_0x1be047
+ db "@"
+; 0x16e0e
+
+.Text_Presto: ; 0x16e0e
+ ; Presto! All done. Come again, OK?
+ text_jump UnknownText_0x1be06a
+ db "@"
+; 0x16e13
+
+.Text_NoPicture: ; 0x16e13
+ ; Oh, no picture? Come again, OK?
+ text_jump UnknownText_0x1c0000
+ db "@"
+; 0x16e18
+
+.Text_Egg: ; 0x16e18
+ ; An EGG? My talent is worth more…
+ text_jump UnknownText_0x1c0021
+ db "@"
+; 0x16e1d
diff --git a/event/print_unown.asm b/event/print_unown.asm
new file mode 100644
index 000000000..7841a688b
--- /dev/null
+++ b/event/print_unown.asm
@@ -0,0 +1,233 @@
+UnownPrinter: ; 16be4
+ ld a, [UnownDex]
+ and a
+ ret z
+
+ ld a, [hInMenu]
+ push af
+ ld a, $1
+ ld [hInMenu], a
+ ld a, [Options]
+ push af
+ set NO_TEXT_SCROLL, a
+ ld [Options], a
+ call ClearBGPalettes
+ call ClearTileMap
+
+ ld de, UnownDexATile
+ ld hl, VTiles1 tile $6f
+ lb bc, BANK(UnownDexBTile), 1
+ call Request1bpp
+
+ ld de, UnownDexBTile
+ ld hl, VTiles1 tile $75
+ lb bc, BANK(UnownDexBTile), 1
+ call Request1bpp
+
+ hlcoord 0, 0
+ lb bc, 3, 18
+ call TextBox
+
+ hlcoord 0, 5
+ lb bc, 7, 7
+ call TextBox
+
+ hlcoord 0, 14
+ lb bc, 2, 18
+ call TextBox
+
+ hlcoord 1, 2
+ ld de, AlphRuinsStampString
+ call PlaceString
+
+ hlcoord 1, 16
+ ld de, UnownDexDoWhatString
+ call PlaceString
+
+ hlcoord 10, 6
+ ld de, UnownDexMenuString
+ call PlaceString
+
+ xor a
+ ld [wJumptableIndex], a
+ call .UpdateUnownFrontpic
+ call WaitBGMap
+
+ ld a, UNOWN
+ ld [CurPartySpecies], a
+ xor a
+ ld [TempMonDVs], a
+ ld [TempMonDVs + 1], a
+
+ ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS
+ call GetSGBLayout
+ call SetPalettes
+
+.joy_loop
+ call JoyTextDelay
+
+ ld a, [hJoyPressed]
+ and B_BUTTON
+ jr nz, .pressed_b
+
+ ld a, [hJoyPressed]
+ and A_BUTTON
+ jr nz, .pressed_a
+
+ call .LeftRight
+ call DelayFrame
+ jr .joy_loop
+
+.pressed_a
+ ld a, [wJumptableIndex]
+ push af
+ farcall PrintUnownStamp
+ call RestartMapMusic
+ pop af
+ ld [wJumptableIndex], a
+ jr .joy_loop
+
+.pressed_b
+ pop af
+ ld [Options], a
+ pop af
+ ld [hInMenu], a
+ call ReturnToMapFromSubmenu
+ ret
+; 16ca0
+
+.LeftRight: ; 16ca0
+ ld a, [hJoyLast]
+ and D_RIGHT
+ jr nz, .press_right
+ ld a, [hJoyLast]
+ and D_LEFT
+ jr nz, .press_left
+ ret
+
+.press_left
+ ld hl, wJumptableIndex
+ ld a, [hl]
+ and a
+ jr nz, .wrap_around_left
+ ld [hl], 26 + 1
+.wrap_around_left
+ dec [hl]
+ jr .return
+
+.press_right
+ ld hl, wJumptableIndex
+ ld a, [hl]
+ cp 26
+ jr c, .wrap_around_right
+ ld [hl], -1
+.wrap_around_right
+ inc [hl]
+
+.return
+ call .UpdateUnownFrontpic
+ ret
+; 16cc8
+
+.UpdateUnownFrontpic: ; 16cc8
+ ld a, [wJumptableIndex]
+ cp 26
+ jr z, .vacant
+ inc a
+ ld [UnownLetter], a
+ ld a, UNOWN
+ ld [CurPartySpecies], a
+ xor a
+ ld [wBoxAlignment], a
+ ld de, VTiles2
+ predef GetMonFrontpic
+ call .Load2bppToSRAM
+ hlcoord 1, 6
+ xor a
+ ld [hGraphicStartTile], a
+ lb bc, 7, 7
+ predef PlaceGraphic
+ ld de, VTiles2 tile $31
+ farcall RotateUnownFrontpic
+ ret
+
+.Load2bppToSRAM: ; 16cff
+ ld a, [rSVBK]
+ push af
+ ld a, $6
+ ld [rSVBK], a
+
+ ld a, BANK(sScratch)
+ call GetSRAMBank
+ ld de, wDecompressScratch
+ ld hl, sScratch
+ ld a, [hROMBank]
+ ld b, a
+ ld c, $31
+ call Get2bpp
+ call CloseSRAM
+
+ pop af
+ ld [rSVBK], a
+ ret
+
+.vacant
+ hlcoord 1, 6
+ lb bc, 7, 7
+ call ClearBox
+ hlcoord 1, 9
+ ld de, UnownDexVacantString
+ call PlaceString
+ xor a
+ call GetSRAMBank
+ ld hl, sScratch
+ ld bc, $31 tiles
+ xor a
+ call ByteFill
+ ld hl, VTiles2 tile $31
+ ld de, sScratch
+ ld c, $31
+ ld a, [hROMBank]
+ ld b, a
+ call Get2bpp
+ call CloseSRAM
+ ld c, 20
+ call DelayFrames
+ ret
+; 16d57
+
+AlphRuinsStampString:
+ db " ALPH RUINS STAMP@"
+
+UnownDexDoWhatString:
+ db "Do what?@"
+
+UnownDexMenuString:
+ db "♂ PRINT"
+ next "♀ CANCEL"
+ next "← PREVIOUS"
+ next "→ NEXT"
+ db "@"
+
+UnownDexVacantString:
+ db "VACANT@"
+; 16d9c
+
+UnownDexATile: ; 16d9c
+INCBIN "gfx/printer/bold_a.1bpp"
+UnownDexBTile: ; 16da4
+INCBIN "gfx/printer/bold_b.1bpp"
+; 16dac
+
+PlaceUnownPrinterFrontpic: ; 16dac
+ hlcoord 0, 0
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ ld a, " "
+ call ByteFill
+ hlcoord 7, 11
+ ld a, $31
+ ld [hGraphicStartTile], a
+ lb bc, 7, 7
+ predef PlaceGraphic
+ ret
+; 16dc7
diff --git a/event/print_unown_2.asm b/event/print_unown_2.asm
new file mode 100644
index 000000000..057db5176
--- /dev/null
+++ b/event/print_unown_2.asm
@@ -0,0 +1,111 @@
+RotateUnownFrontpic: ; e0000
+; something to do with Unown printer
+ push de
+ xor a
+ call GetSRAMBank
+ ld hl, sScratch
+ ld bc, 0
+.loop
+ push bc
+ push hl
+ push bc
+ ld de, wd002
+ call .Copy
+ call .Rotate
+ ld hl, UnownPrinter_OverworldMapRectangle
+ pop bc
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld d, [hl]
+ ld hl, wd012
+ call .Copy
+ pop hl
+ ld bc, $10
+ add hl, bc
+ pop bc
+ inc c
+ ld a, c
+ cp 7 * 7
+ jr c, .loop
+
+ ld hl, OverworldMap
+ ld de, sScratch
+ ld bc, 7 * 7 tiles
+ call CopyBytes
+ pop hl
+ ld de, sScratch
+ ld c, 7 * 7
+ ld a, [hROMBank]
+ ld b, a
+ call Get2bpp
+ call CloseSRAM
+ ret
+
+.Copy: ; e004e
+ ld c, $10
+.loop_copy
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .loop_copy
+ ret
+
+.Rotate: ; e0057
+ ld hl, wd012
+ ld e, %10000000
+ ld d, 8
+.loop_decompress
+ push hl
+ ld hl, wd002
+ call .CountSetBit
+ pop hl
+ ld a, b
+ ld [hli], a
+ push hl
+ ld hl, wd003
+ call .CountSetBit
+ pop hl
+ ld a, b
+ ld [hli], a
+ srl e
+ dec d
+ jr nz, .loop_decompress
+ ret
+
+.CountSetBit: ; e0078
+ ld b, 0
+ ld c, 8
+.loop_count
+ ld a, [hli]
+ and e
+ jr z, .clear
+ scf
+ jr .apply
+
+.clear
+ and a
+
+.apply
+ rr b
+ inc hl
+ dec c
+ jr nz, .loop_count
+ ret
+
+overworldmaprect: MACRO
+y = 0
+rept \1
+x = \1 * (\2 +- 1) + y
+rept \2
+ dw OverworldMap tile x
+x = x +- \2
+endr
+y = y + 1
+endr
+endm
+
+UnownPrinter_OverworldMapRectangle: ; e008b
+ overworldmaprect 7, 7
diff --git a/event/special.asm b/event/special.asm
index f1228abc6..8937698f5 100755
--- a/event/special.asm
+++ b/event/special.asm
@@ -15,7 +15,7 @@ SpecialGiveShuckle: ; 7305
; Caught data.
ld b, 0
- callba SetGiftPartyMonCaughtData
+ farcall SetGiftPartyMonCaughtData
; Holding a Berry.
ld bc, PARTYMON_STRUCT_LENGTH
@@ -71,7 +71,7 @@ SpecialShuckleNick:
db "SHUCKIE@"
SpecialReturnShuckle: ; 737e
- callba SelectMonFromParty
+ farcall SelectMonFromParty
jr c, .refused
ld a, [CurPartySpecies]
@@ -107,7 +107,7 @@ SpecialReturnShuckle: ; 737e
jr .CheckOT
.done
- callba CheckCurPartyMonFainted
+ farcall CheckCurPartyMonFainted
jr c, .fainted
ld a, [CurPartyMon]
ld hl, PartyMon1Happiness
@@ -119,7 +119,7 @@ SpecialReturnShuckle: ; 737e
jr nc, .HappyToStayWithYou
xor a ; take from pc
ld [wPokemonWithdrawDepositParameter], a
- callab RemoveMonFromPartyOrBox
+ callfar RemoveMonFromPartyOrBox
ld a, $2
.HappyToStayWithYou:
ld [ScriptVar], a
@@ -141,7 +141,7 @@ SpecialReturnShuckle: ; 737e
ret
Special_BillsGrandfather: ; 73f7
- callba SelectMonFromParty
+ farcall SelectMonFromParty
jr c, .cancel
ld a, [CurPartySpecies]
ld [ScriptVar], a
@@ -167,7 +167,7 @@ Special_DaisyMassage: ; 741d
MassageOrHaircut: ; 7420
push hl
- callba SelectMonFromParty
+ farcall SelectMonFromParty
pop hl
jr c, .nope
ld a, [CurPartySpecies]
@@ -229,3 +229,7 @@ CopyPokemonName_Buffer1_Buffer3: ; 746e
ld de, StringBuffer3
ld bc, PKMN_NAME_LENGTH
jp CopyBytes
+
+Predef1: ; 747a
+; not used
+ ret
diff --git a/event/squirtbottle.asm b/event/squirtbottle.asm
index 7b47a96f6..1134f1bb0 100755
--- a/event/squirtbottle.asm
+++ b/event/squirtbottle.asm
@@ -29,7 +29,7 @@ _Squirtbottle: ; 50730
cp MAP_ROUTE_36
jr nz, .nope
- callba GetFacingObject
+ farcall GetFacingObject
jr c, .nope
ld a, d
diff --git a/event/std_collision.asm b/event/std_collision.asm
new file mode 100644
index 000000000..79dbc71f1
--- /dev/null
+++ b/event/std_collision.asm
@@ -0,0 +1,29 @@
+CheckFacingTileForStdScript:: ; 1365b
+; Checks to see if the tile you're facing has a std script associated with it. If so, executes the script and returns carry.
+ ld a, c
+ ld de, 3
+ ld hl, TileCollisionStdScripts
+ call IsInArray
+ jr nc, .notintable
+
+ ld a, jumpstd_command
+ ld [wJumpStdScriptBuffer], a
+ inc hl
+ ld a, [hli]
+ ld [wJumpStdScriptBuffer + 1], a
+ ld a, [hli]
+ ld [wJumpStdScriptBuffer + 2], a
+ ld a, BANK(Script_JumpStdFromRAM)
+ ld hl, Script_JumpStdFromRAM
+ call CallScript
+ scf
+ ret
+
+.notintable
+ xor a
+ ret
+
+INCLUDE "data/collision_stdscripts.asm"
+
+Script_JumpStdFromRAM: ; 0x1369a
+ jump wJumpStdScriptBuffer
diff --git a/event/sweet_scent.asm b/event/sweet_scent.asm
index 63eec9922..77567488c 100755
--- a/event/sweet_scent.asm
+++ b/event/sweet_scent.asm
@@ -34,21 +34,21 @@ SweetScentNothing: ; 0x506e9
; 0x506ef
SweetScentEncounter: ; 506ef
- callba CanUseSweetScent
+ farcall CanUseSweetScent
jr nc, .no_battle
ld hl, StatusFlags2
bit 2, [hl]
jr nz, .not_in_bug_contest
- callba GetMapEncounterRate
+ farcall GetMapEncounterRate
ld a, b
and a
jr z, .no_battle
- callba ChooseWildEncounter
+ farcall ChooseWildEncounter
jr nz, .no_battle
jr .start_battle
.not_in_bug_contest
- callba ChooseWildEncounter_BugContest
+ farcall ChooseWildEncounter_BugContest
.start_battle
ld a, $1
diff --git a/event/unown.asm b/event/unown.asm
index 6b65877f9..1be858bd6 100644
--- a/event/unown.asm
+++ b/event/unown.asm
@@ -1,5 +1,3 @@
-
-
SpecialHoOhChamber: ; 0x8addb
ld hl, PartySpecies
ld a, [hl]
@@ -61,10 +59,10 @@ SpecialAerodactylChamber: ; 8ae30
call GetSecondaryMapHeaderPointer
ld a, h
- cp RuinsofAlphAerodactylChamber_SecondMapHeader / $100
+ cp RuinsOfAlphAerodactylChamber_SecondMapHeader / $100
jr nz, .nope
ld a, l
- cp RuinsofAlphAerodactylChamber_SecondMapHeader % $100
+ cp RuinsOfAlphAerodactylChamber_SecondMapHeader % $100
jr nz, .nope
ld de, EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER
@@ -89,10 +87,10 @@ SpecialKabutoChamber: ; 8ae4e
call GetSecondaryMapHeaderPointer
ld a, h
- cp RuinsofAlphKabutoChamber_SecondMapHeader / $100
+ cp RuinsOfAlphKabutoChamber_SecondMapHeader / $100
jr nz, .done
ld a, l
- cp RuinsofAlphKabutoChamber_SecondMapHeader % $100
+ cp RuinsOfAlphKabutoChamber_SecondMapHeader % $100
jr nz, .done
ld de, EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
@@ -222,7 +220,7 @@ endm
cp $ff
ret z
cp $60
- ld a, (1 << 3) | PAL_BG_BROWN
+ ld a, VRAM_BANK_1 | PAL_BG_BROWN
jr c, .got_pal
ld a, PAL_BG_BROWN
diff --git a/event/whiteout.asm b/event/whiteout.asm
index 38049b3b5..a9d6f900e 100755
--- a/event/whiteout.asm
+++ b/event/whiteout.asm
@@ -49,7 +49,7 @@ BattleBGMap: ; 1250a
; 12513
HalveMoney: ; 12513
- callba TrainerRankings_WhiteOuts
+ farcall TrainerRankings_WhiteOuts
; Halve the player's money.
ld hl, Money
@@ -71,12 +71,12 @@ GetWhiteoutSpawn: ; 12527
ld d, a
ld a, [wLastSpawnMapNumber]
ld e, a
- callba IsSpawnPoint
+ farcall IsSpawnPoint
ld a, c
jr c, .yes
xor a ; SPAWN_HOME
.yes
- ld [wd001], a
+ ld [DefaultSpawnpoint], a
ret
; 1253d
diff --git a/gbhw.asm b/gbhw.asm
deleted file mode 100644
index c55f1a9ec..000000000
--- a/gbhw.asm
+++ /dev/null
@@ -1,130 +0,0 @@
-; Graciously aped from http://nocash.emubase.de/pandocs.htm .
-
-; MBC3
-MBC3SRamEnable EQU $0000
-MBC3RomBank EQU $2000
-MBC3SRamBank EQU $4000
-MBC3LatchClock EQU $6000
-MBC3RTC EQU $a000
-
-SRAM_DISABLE EQU $00
-SRAM_ENABLE EQU $0a
-
-NUM_SRAM_BANKS EQU 4
-
-RTC_S EQU $08 ; Seconds 0-59 (0-3Bh)
-RTC_M EQU $09 ; Minutes 0-59 (0-3Bh)
-RTC_H EQU $0a ; Hours 0-23 (0-17h)
-RTC_DL EQU $0b ; Lower 8 bits of Day Counter (0-FFh)
-RTC_DH EQU $0c ; Upper 1 bit of Day Counter, Carry Bit, Halt Flag
- ; Bit 0 Most significant bit of Day Counter (Bit 8)
- ; Bit 6 Halt (0=Active, 1=Stop Timer)
- ; Bit 7 Day Counter Carry Bit (1=Counter Overflow)
-
-; interrupt flags
-VBLANK EQU 0
-LCD_STAT EQU 1
-TIMER EQU 2
-SERIAL EQU 3
-JOYPAD EQU 4
-
-; OAM attribute flags
-OAM_PALETTE EQU %111
-OAM_TILE_BANK EQU 3
-OAM_OBP_NUM EQU 4 ; Non CGB Mode Only
-OAM_X_FLIP EQU 5
-OAM_Y_FLIP EQU 6
-OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3)
-
-
-; Hardware registers
-rJOYP EQU $ff00 ; Joypad (R/W)
-rSB EQU $ff01 ; Serial transfer data (R/W)
-rSC EQU $ff02 ; Serial Transfer Control (R/W)
-rSC_ON EQU 7
-rSC_CGB EQU 1
-rSC_CLOCK EQU 0
-rDIV EQU $ff04 ; Divider Register (R/W)
-rTIMA EQU $ff05 ; Timer counter (R/W)
-rTMA EQU $ff06 ; Timer Modulo (R/W)
-rTAC EQU $ff07 ; Timer Control (R/W)
-rTAC_ON EQU 2
-rTAC_4096_HZ EQU 0
-rTAC_262144_HZ EQU 1
-rTAC_65536_HZ EQU 2
-rTAC_16384_HZ EQU 3
-rIF EQU $ff0f ; Interrupt Flag (R/W)
-rNR10 EQU $ff10 ; Channel 1 Sweep register (R/W)
-rNR11 EQU $ff11 ; Channel 1 Sound length/Wave pattern duty (R/W)
-rNR12 EQU $ff12 ; Channel 1 Volume Envelope (R/W)
-rNR13 EQU $ff13 ; Channel 1 Frequency lo (Write Only)
-rNR14 EQU $ff14 ; Channel 1 Frequency hi (R/W)
-rNR20 EQU $ff15 ; Channel 2 Sweep register (R/W)
-rNR21 EQU $ff16 ; Channel 2 Sound Length/Wave Pattern Duty (R/W)
-rNR22 EQU $ff17 ; Channel 2 Volume Envelope (R/W)
-rNR23 EQU $ff18 ; Channel 2 Frequency lo data (W)
-rNR24 EQU $ff19 ; Channel 2 Frequency hi data (R/W)
-rNR30 EQU $ff1a ; Channel 3 Sound on/off (R/W)
-rNR31 EQU $ff1b ; Channel 3 Sound Length
-rNR32 EQU $ff1c ; Channel 3 Select output level (R/W)
-rNR33 EQU $ff1d ; Channel 3 Frequency's lower data (W)
-rNR34 EQU $ff1e ; Channel 3 Frequency's higher data (R/W)
-rNR40 EQU $ff1f ; Channel 4 Sweep register (R/W)
-rNR41 EQU $ff20 ; Channel 4 Sound Length (R/W)
-rNR42 EQU $ff21 ; Channel 4 Volume Envelope (R/W)
-rNR43 EQU $ff22 ; Channel 4 Polynomial Counter (R/W)
-rNR44 EQU $ff23 ; Channel 4 Counter/consecutive; Inital (R/W)
-rNR50 EQU $ff24 ; Channel control / ON-OFF / Volume (R/W)
-rNR51 EQU $ff25 ; Selection of Sound output terminal (R/W)
-rNR52 EQU $ff26 ; Sound on/off
-rWave_0 EQU $ff30
-rWave_1 EQU $ff31
-rWave_2 EQU $ff32
-rWave_3 EQU $ff33
-rWave_4 EQU $ff34
-rWave_5 EQU $ff35
-rWave_6 EQU $ff36
-rWave_7 EQU $ff37
-rWave_8 EQU $ff38
-rWave_9 EQU $ff39
-rWave_a EQU $ff3a
-rWave_b EQU $ff3b
-rWave_c EQU $ff3c
-rWave_d EQU $ff3d
-rWave_e EQU $ff3e
-rWave_f EQU $ff3f
-rLCDC EQU $ff40 ; LCD Control (R/W)
-rSTAT EQU $ff41 ; LCDC Status (R/W)
-rSCY EQU $ff42 ; Scroll Y (R/W)
-rSCX EQU $ff43 ; Scroll X (R/W)
-rLY EQU $ff44 ; LCDC Y-Coordinate (R)
-rLYC EQU $ff45 ; LY Compare (R/W)
-rDMA EQU $ff46 ; DMA Transfer and Start Address (W)
-rBGP EQU $ff47 ; BG Palette Data (R/W) - Non CGB Mode Only
-rOBP0 EQU $ff48 ; Object Palette 0 Data (R/W) - Non CGB Mode Only
-rOBP1 EQU $ff49 ; Object Palette 1 Data (R/W) - Non CGB Mode Only
-rWY EQU $ff4a ; Window Y Position (R/W)
-rWX EQU $ff4b ; Window X Position minus 7 (R/W)
-rLCDMODE EQU $ff4c
-rKEY1 EQU $ff4d ; CGB Mode Only - Prepare Speed Switch
-rVBK EQU $ff4f ; CGB Mode Only - VRAM Bank
-rBLCK EQU $ff50
-rHDMA1 EQU $ff51 ; CGB Mode Only - New DMA Source, High
-rHDMA2 EQU $ff52 ; CGB Mode Only - New DMA Source, Low
-rHDMA3 EQU $ff53 ; CGB Mode Only - New DMA Destination, High
-rHDMA4 EQU $ff54 ; CGB Mode Only - New DMA Destination, Low
-rHDMA5 EQU $ff55 ; CGB Mode Only - New DMA Length/Mode/Start
-rRP EQU $ff56 ; CGB Mode Only - Infrared Communications Port
-rBGPI EQU $ff68 ; CGB Mode Only - Background Palette Index
-rBGPD EQU $ff69 ; CGB Mode Only - Background Palette Data
-rOBPI EQU $ff6a ; CGB Mode Only - Sprite Palette Index
-rOBPD EQU $ff6b ; CGB Mode Only - Sprite Palette Data
-rUNKNOWN1 EQU $ff6c ; (FEh) Bit 0 (Read/Write) - CGB Mode Only
-rSVBK EQU $ff70 ; CGB Mode Only - WRAM Bank
-rUNKNOWN2 EQU $ff72 ; (00h) - Bit 0-7 (Read/Write)
-rUNKNOWN3 EQU $ff73 ; (00h) - Bit 0-7 (Read/Write)
-rUNKNOWN4 EQU $ff74 ; (00h) - Bit 0-7 (Read/Write) - CGB Mode Only
-rUNKNOWN5 EQU $ff75 ; (8Fh) - Bit 4-6 (Read/Write)
-rUNKNOWN6 EQU $ff76 ; (00h) - Always 00h (Read Only)
-rUNKNOWN7 EQU $ff77 ; (00h) - Always 00h (Read Only)
-rIE EQU $ffff ; Interrupt Enable (R/W)
diff --git a/gfx/misc/dude.2bpp.lz.d13fb490 b/gfx/battle/dude.2bpp.lz.d13fb490
index b8e96a09f..b8e96a09f 100644
--- a/gfx/misc/dude.2bpp.lz.d13fb490
+++ b/gfx/battle/dude.2bpp.lz.d13fb490
Binary files differ
diff --git a/gfx/misc/dude.png b/gfx/battle/dude.png
index 9a74a90d6..9a74a90d6 100644
--- a/gfx/misc/dude.png
+++ b/gfx/battle/dude.png
Binary files differ
diff --git a/gfx/card_flip/card_flip.tilemap b/gfx/card_flip/card_flip.tilemap
new file mode 100644
index 000000000..f6cdbefb1
--- /dev/null
+++ b/gfx/card_flip/card_flip.tilemap
Binary files differ
diff --git a/gfx/unknown/0e0d16.2bpp.lz.86f267e8 b/gfx/card_flip/card_flip_1.2bpp.lz.86f267e8
index 8a60b966b..8a60b966b 100644
--- a/gfx/unknown/0e0d16.2bpp.lz.86f267e8
+++ b/gfx/card_flip/card_flip_1.2bpp.lz.86f267e8
Binary files differ
diff --git a/gfx/unknown/0e0d16.png b/gfx/card_flip/card_flip_1.png
index ab3c6594f..ab3c6594f 100644
--- a/gfx/unknown/0e0d16.png
+++ b/gfx/card_flip/card_flip_1.png
Binary files differ
diff --git a/gfx/unknown/0e0ea8.2bpp.lz.6a6c671d b/gfx/card_flip/card_flip_2.2bpp.lz.6a6c671d
index f238c797c..f238c797c 100644
--- a/gfx/unknown/0e0ea8.2bpp.lz.6a6c671d
+++ b/gfx/card_flip/card_flip_2.2bpp.lz.6a6c671d
Binary files differ
diff --git a/gfx/unknown/0e0ea8.png b/gfx/card_flip/card_flip_2.png
index 531417385..531417385 100755..100644
--- a/gfx/unknown/0e0ea8.png
+++ b/gfx/card_flip/card_flip_2.png
Binary files differ
diff --git a/gfx/unknown/0e0cdb.2bpp.lz.53679db7 b/gfx/card_flip/card_flip_3.2bpp.lz.53679db7
index 12baf9a8f..12baf9a8f 100644
--- a/gfx/unknown/0e0cdb.2bpp.lz.53679db7
+++ b/gfx/card_flip/card_flip_3.2bpp.lz.53679db7
Binary files differ
diff --git a/gfx/unknown/0e0cdb.png b/gfx/card_flip/card_flip_3.png
index 227450963..227450963 100644
--- a/gfx/unknown/0e0cdb.png
+++ b/gfx/card_flip/card_flip_3.png
Binary files differ
diff --git a/gfx/unknown/0e0cf6.png b/gfx/card_flip/off.png
index ac5885644..ac5885644 100644
--- a/gfx/unknown/0e0cf6.png
+++ b/gfx/card_flip/off.png
Binary files differ
diff --git a/gfx/unknown/0e0d06.png b/gfx/card_flip/on.png
index cea1577ef..cea1577ef 100644
--- a/gfx/unknown/0e0d06.png
+++ b/gfx/card_flip/on.png
Binary files differ
diff --git a/gfx/credits.asm b/gfx/credits.asm
new file mode 100644
index 000000000..2477bd562
--- /dev/null
+++ b/gfx/credits.asm
@@ -0,0 +1,7 @@
+CreditsBorderGFX: INCBIN "gfx/credits/border.2bpp"
+
+CreditsMonsGFX:
+CreditsPichuGFX: INCBIN "gfx/credits/pichu.2bpp"
+CreditsSmoochumGFX: INCBIN "gfx/credits/smoochum.2bpp"
+CreditsDittoGFX: INCBIN "gfx/credits/ditto.2bpp"
+CreditsIgglybuffGFX: INCBIN "gfx/credits/igglybuff.2bpp"
diff --git a/gfx/unknown/1dd805.2bpp.lz.7b56f7e5 b/gfx/diploma/diploma.2bpp.lz.7b56f7e5
index 5c35bb6e1..5c35bb6e1 100644
--- a/gfx/unknown/1dd805.2bpp.lz.7b56f7e5
+++ b/gfx/diploma/diploma.2bpp.lz.7b56f7e5
Binary files differ
diff --git a/gfx/unknown/1dd805.png b/gfx/diploma/diploma.png
index 768bbf913..768bbf913 100644
--- a/gfx/unknown/1dd805.png
+++ b/gfx/diploma/diploma.png
Binary files differ
diff --git a/gfx/unknown/1ddc4b.tilemap b/gfx/diploma/page1.tilemap
index fb5d79891..fb5d79891 100644
--- a/gfx/unknown/1ddc4b.tilemap
+++ b/gfx/diploma/page1.tilemap
Binary files differ
diff --git a/gfx/unknown/1dddb3.tilemap b/gfx/diploma/page2.tilemap
index e37c6b27d..e37c6b27d 100644
--- a/gfx/unknown/1dddb3.tilemap
+++ b/gfx/diploma/page2.tilemap
Binary files differ
diff --git a/gfx/unknown/0e2221.2bpp.lz.821ba441 b/gfx/dummy_game/dummy_game.2bpp.lz.821ba441
index b01fe34df..b01fe34df 100644
--- a/gfx/unknown/0e2221.2bpp.lz.821ba441
+++ b/gfx/dummy_game/dummy_game.2bpp.lz.821ba441
Binary files differ
diff --git a/gfx/unknown/0e2221.png b/gfx/dummy_game/dummy_game.png
index e0f1d3256..e0f1d3256 100644
--- a/gfx/unknown/0e2221.png
+++ b/gfx/dummy_game/dummy_game.png
Binary files differ
diff --git a/gfx/emotes.asm b/gfx/emotes.asm
new file mode 100644
index 000000000..1de06de2c
--- /dev/null
+++ b/gfx/emotes.asm
@@ -0,0 +1,12 @@
+ShockEmote: INCBIN "gfx/emotes/shock.2bpp"
+QuestionEmote: INCBIN "gfx/emotes/question.2bpp"
+HappyEmote: INCBIN "gfx/emotes/happy.2bpp"
+SadEmote: INCBIN "gfx/emotes/sad.2bpp"
+HeartEmote: INCBIN "gfx/emotes/heart.2bpp"
+BoltEmote: INCBIN "gfx/emotes/bolt.2bpp"
+SleepEmote: INCBIN "gfx/emotes/sleep.2bpp"
+FishEmote: INCBIN "gfx/emotes/fish.2bpp"
+JumpShadowGFX: INCBIN "gfx/overworld/shadow.2bpp"
+FishingRodGFX: INCBIN "gfx/overworld/fishing_rod.2bpp"
+BoulderDustGFX: INCBIN "gfx/overworld/boulder_dust.2bpp"
+GrassRustleGFX: INCBIN "gfx/overworld/grass_rustle.2bpp"
diff --git a/gfx/unknown/017393.png b/gfx/evo/egg_hatch.png
index e45921e1f..e45921e1f 100644
--- a/gfx/unknown/017393.png
+++ b/gfx/evo/egg_hatch.png
Binary files differ
diff --git a/gfx/font.asm b/gfx/font.asm
index 76c87545b..2688618ca 100755
--- a/gfx/font.asm
+++ b/gfx/font.asm
@@ -1,11 +1,11 @@
FontExtra:
-INCBIN "gfx/misc/font_extra.2bpp"
+INCBIN "gfx/font/font_extra.2bpp"
Font:
-INCBIN "gfx/misc/font.1bpp"
+INCBIN "gfx/font/font.1bpp"
FontBattleExtra:
-INCBIN "gfx/misc/font_battle_extra.2bpp"
+INCBIN "gfx/font/font_battle_extra.2bpp"
Frames: ; f8800
INCBIN "gfx/frames/1.1bpp"
@@ -19,19 +19,19 @@ INCBIN "gfx/frames/8.1bpp"
INCBIN "gfx/frames/9.1bpp"
; f89b0
-; TODO: Various misc graphics here.
+; Various misc graphics here.
StatsScreenPageTilesGFX: ; f89b0
-INCBIN "gfx/unknown/0f89b0.2bpp"
+INCBIN "gfx/stats/stats_tiles.2bpp"
; f8a90
-ShinyIcon: ; f8a90
+ShinyIconGFX: ; f8a90
; also part of StatsScreenPageTilesGFX
INCBIN "gfx/stats/shiny.2bpp"
-StatsScreenPageTilesGFX_Part2: ; f8aa0
+ExpBarEndsGFX: ; f8aa0
; not referenced on its own, but part of StatsScreenPageTilesGFX
-INCBIN "gfx/unknown/0f8aa0.2bpp"
+INCBIN "gfx/stats/exp_bar_ends.2bpp"
; f8ac0
EnemyHPBarBorderGFX: ; f8ac0
@@ -47,19 +47,19 @@ INCBIN "gfx/battle/expbar.2bpp"
; f8ba0
TownMapGFX: ; f8ba0
-INCBIN "gfx/misc/town_map.2bpp.lz"
+INCBIN "gfx/pokegear/town_map.2bpp.lz"
; f8ea4
-WeekdayKanjiGFX: ; unused kanji
-INCBIN "gfx/font/weekday_kanji.2bpp"
+UnusedWeekdayKanjiGFX: ; unused kanji
+INCBIN "gfx/font/unused_weekday_kanji.2bpp"
; f8f24
OverworldPhoneIconGFX: ; f8f24
-INCBIN "gfx/mobile/overworld_phone_icon.2bpp"
+INCBIN "gfx/font/overworld_phone_icon.2bpp"
; f8f34
-GFX_f8f34: ; unused bold letters + unown chars
-INCBIN "gfx/unknown/0f8f34.1bpp"
+UnusedBoldFontGFX: ; unused bold letters + unown chars
+INCBIN "gfx/font/unused_bold_font.1bpp"
; f9204
TextBoxSpaceGFX: ; f9204
@@ -75,11 +75,11 @@ INCBIN "gfx/frames/map_entry_sign.2bpp"
; f9424
FontsExtra2_UpArrowGFX: ; f9424
-INCBIN "gfx/unknown/0f9424.2bpp"
+INCBIN "gfx/font/up_arrow.2bpp"
; f9434
Footprints: ; f9434
-INCBIN "gfx/misc/footprints.1bpp"
+INCLUDE "gfx/footprints.asm"
; fb434
; This and the following two functions are unreferenced.
@@ -131,11 +131,11 @@ _LoadStandardFont:: ; fb449
_LoadFontsExtra1:: ; fb48a
ld de, MobilePhoneTilesGFX
- ld hl, VTiles2 tile $60
+ ld hl, VTiles2 tile "<BLACK>" ; $60
lb bc, BANK(MobilePhoneTilesGFX), 1
call Get1bpp_2
ld de, OverworldPhoneIconGFX
- ld hl, VTiles2 tile $62
+ ld hl, VTiles2 tile "<PHONE>" ; $62
lb bc, BANK(OverworldPhoneIconGFX), 1
call Get2bpp_2
ld de, FontExtra + 3 * LEN_2BPP_TILE
@@ -147,7 +147,7 @@ _LoadFontsExtra1:: ; fb48a
_LoadFontsExtra2:: ; fb4b0
ld de, FontsExtra2_UpArrowGFX
- ld hl, VTiles2 tile $61
+ ld hl, VTiles2 tile "▲" ; $61
ld b, BANK(FontsExtra2_UpArrowGFX)
ld c, 1
call Get2bpp_2
@@ -165,15 +165,15 @@ _LoadFontsBattleExtra:: ; fb4be
LoadFrame: ; fb4cc
ld a, [TextBoxFrame]
and 7
- ld bc, TILES_PER_FRAME * LEN_1BPP_TILE
+ ld bc, LEN_1BPP_TILE * 6
ld hl, Frames
call AddNTimes
ld d, h
ld e, l
- ld hl, VTiles2 tile $79
- lb bc, BANK(Frames), TILES_PER_FRAME
+ ld hl, VTiles2 tile "┌" ; $79
+ lb bc, BANK(Frames), 6
call Get1bpp_2
- ld hl, VTiles2 tile $7f
+ ld hl, VTiles2 tile " " ; $7f
ld de, TextBoxSpaceGFX
lb bc, BANK(TextBoxSpaceGFX), 1
call Get1bpp_2
@@ -186,7 +186,7 @@ LoadBattleFontsHPBar: ; fb4f2
lb bc, BANK(FontBattleExtra), $c
call Get2bpp_2
ld hl, VTiles2 tile $70
- ld de, FontBattleExtra + $10 * LEN_2BPP_TILE
+ ld de, FontBattleExtra tile $10
lb bc, BANK(FontBattleExtra), 3
call Get2bpp_2
call LoadFrame
diff --git a/gfx/unknown/0fbbbb.png b/gfx/font/feet_inches.png
index 60f319eb3..60f319eb3 100644
--- a/gfx/unknown/0fbbbb.png
+++ b/gfx/font/feet_inches.png
Binary files differ
diff --git a/gfx/misc/font.png b/gfx/font/font.png
index 7119c0691..7119c0691 100644
--- a/gfx/misc/font.png
+++ b/gfx/font/font.png
Binary files differ
diff --git a/gfx/misc/font_battle_extra.png b/gfx/font/font_battle_extra.png
index 15e25a40c..15e25a40c 100644
--- a/gfx/misc/font_battle_extra.png
+++ b/gfx/font/font_battle_extra.png
Binary files differ
diff --git a/gfx/misc/font_extra.png b/gfx/font/font_extra.png
index 7ca840c3a..7ca840c3a 100644
--- a/gfx/misc/font_extra.png
+++ b/gfx/font/font_extra.png
Binary files differ
diff --git a/gfx/misc/font_inversed.png b/gfx/font/font_inversed.png
index 519339f39..519339f39 100644
--- a/gfx/misc/font_inversed.png
+++ b/gfx/font/font_inversed.png
Binary files differ
diff --git a/gfx/mobile/overworld_phone_icon.png b/gfx/font/overworld_phone_icon.png
index 9e13a121b..9e13a121b 100644
--- a/gfx/mobile/overworld_phone_icon.png
+++ b/gfx/font/overworld_phone_icon.png
Binary files differ
diff --git a/gfx/misc/unown_font.png b/gfx/font/unown_font.png
index 5ac70b807..5ac70b807 100644
--- a/gfx/misc/unown_font.png
+++ b/gfx/font/unown_font.png
Binary files differ
diff --git a/gfx/unknown/0f8f34.png b/gfx/font/unused_bold_font.png
index e02b91ce2..e02b91ce2 100644
--- a/gfx/unknown/0f8f34.png
+++ b/gfx/font/unused_bold_font.png
Binary files differ
diff --git a/gfx/font/weekday_kanji.png b/gfx/font/unused_weekday_kanji.png
index 6eeb69b11..6eeb69b11 100644
--- a/gfx/font/weekday_kanji.png
+++ b/gfx/font/unused_weekday_kanji.png
Binary files differ
diff --git a/gfx/unknown/0f9424.png b/gfx/font/up_arrow.png
index 6f2b957f0..6f2b957f0 100644
--- a/gfx/unknown/0f9424.png
+++ b/gfx/font/up_arrow.png
Binary files differ
diff --git a/gfx/footprints.asm b/gfx/footprints.asm
new file mode 100644
index 000000000..44ca9bef2
--- /dev/null
+++ b/gfx/footprints.asm
@@ -0,0 +1,587 @@
+; In this game, footprints are stored in a non-continuous manner.
+; Instead, they're stored in a 32x8 grid.
+; Each of the footprints is 16x16, so, since tiles on the GB are 8x8,
+; you get the two top tiles first, while the two bottom tiles are stored
+; on the next row of the image.
+
+; These macros help extract the first two tiles, and the last two tiles,
+; respectively.
+footprint_top EQUS " 0, 2 * LEN_1BPP_TILE"
+footprint_bottom EQUS "2 * LEN_1BPP_TILE, 2 * LEN_1BPP_TILE"
+
+; 001-008 top halves
+INCBIN "gfx/footprints/bulbasaur.1bpp", footprint_top
+INCBIN "gfx/footprints/ivysaur.1bpp", footprint_top
+INCBIN "gfx/footprints/venusaur.1bpp", footprint_top
+INCBIN "gfx/footprints/charmander.1bpp", footprint_top
+INCBIN "gfx/footprints/charmeleon.1bpp", footprint_top
+INCBIN "gfx/footprints/charizard.1bpp", footprint_top
+INCBIN "gfx/footprints/squirtle.1bpp", footprint_top
+INCBIN "gfx/footprints/wartortle.1bpp", footprint_top
+; 001-008 bottom halves
+INCBIN "gfx/footprints/bulbasaur.1bpp", footprint_bottom
+INCBIN "gfx/footprints/ivysaur.1bpp", footprint_bottom
+INCBIN "gfx/footprints/venusaur.1bpp", footprint_bottom
+INCBIN "gfx/footprints/charmander.1bpp", footprint_bottom
+INCBIN "gfx/footprints/charmeleon.1bpp", footprint_bottom
+INCBIN "gfx/footprints/charizard.1bpp", footprint_bottom
+INCBIN "gfx/footprints/squirtle.1bpp", footprint_bottom
+INCBIN "gfx/footprints/wartortle.1bpp", footprint_bottom
+; 009-016 top halves
+INCBIN "gfx/footprints/blastoise.1bpp", footprint_top
+INCBIN "gfx/footprints/caterpie.1bpp", footprint_top
+INCBIN "gfx/footprints/metapod.1bpp", footprint_top
+INCBIN "gfx/footprints/butterfree.1bpp", footprint_top
+INCBIN "gfx/footprints/weedle.1bpp", footprint_top
+INCBIN "gfx/footprints/kakuna.1bpp", footprint_top
+INCBIN "gfx/footprints/beedrill.1bpp", footprint_top
+INCBIN "gfx/footprints/pidgey.1bpp", footprint_top
+; 009-016 bottom halves
+INCBIN "gfx/footprints/blastoise.1bpp", footprint_bottom
+INCBIN "gfx/footprints/caterpie.1bpp", footprint_bottom
+INCBIN "gfx/footprints/metapod.1bpp", footprint_bottom
+INCBIN "gfx/footprints/butterfree.1bpp", footprint_bottom
+INCBIN "gfx/footprints/weedle.1bpp", footprint_bottom
+INCBIN "gfx/footprints/kakuna.1bpp", footprint_bottom
+INCBIN "gfx/footprints/beedrill.1bpp", footprint_bottom
+INCBIN "gfx/footprints/pidgey.1bpp", footprint_bottom
+; 017-024 top halves
+INCBIN "gfx/footprints/pidgeotto.1bpp", footprint_top
+INCBIN "gfx/footprints/pidgeot.1bpp", footprint_top
+INCBIN "gfx/footprints/rattata.1bpp", footprint_top
+INCBIN "gfx/footprints/raticate.1bpp", footprint_top
+INCBIN "gfx/footprints/spearow.1bpp", footprint_top
+INCBIN "gfx/footprints/fearow.1bpp", footprint_top
+INCBIN "gfx/footprints/ekans.1bpp", footprint_top
+INCBIN "gfx/footprints/arbok.1bpp", footprint_top
+; 017-024 bottom halves
+INCBIN "gfx/footprints/pidgeotto.1bpp", footprint_bottom
+INCBIN "gfx/footprints/pidgeot.1bpp", footprint_bottom
+INCBIN "gfx/footprints/rattata.1bpp", footprint_bottom
+INCBIN "gfx/footprints/raticate.1bpp", footprint_bottom
+INCBIN "gfx/footprints/spearow.1bpp", footprint_bottom
+INCBIN "gfx/footprints/fearow.1bpp", footprint_bottom
+INCBIN "gfx/footprints/ekans.1bpp", footprint_bottom
+INCBIN "gfx/footprints/arbok.1bpp", footprint_bottom
+; 025-032 top halves
+INCBIN "gfx/footprints/pikachu.1bpp", footprint_top
+INCBIN "gfx/footprints/raichu.1bpp", footprint_top
+INCBIN "gfx/footprints/sandshrew.1bpp", footprint_top
+INCBIN "gfx/footprints/sandslash.1bpp", footprint_top
+INCBIN "gfx/footprints/nidoran_f.1bpp", footprint_top
+INCBIN "gfx/footprints/nidorina.1bpp", footprint_top
+INCBIN "gfx/footprints/nidoqueen.1bpp", footprint_top
+INCBIN "gfx/footprints/nidoran_m.1bpp", footprint_top
+; 025-032 bottom halves
+INCBIN "gfx/footprints/pikachu.1bpp", footprint_bottom
+INCBIN "gfx/footprints/raichu.1bpp", footprint_bottom
+INCBIN "gfx/footprints/sandshrew.1bpp", footprint_bottom
+INCBIN "gfx/footprints/sandslash.1bpp", footprint_bottom
+INCBIN "gfx/footprints/nidoran_f.1bpp", footprint_bottom
+INCBIN "gfx/footprints/nidorina.1bpp", footprint_bottom
+INCBIN "gfx/footprints/nidoqueen.1bpp", footprint_bottom
+INCBIN "gfx/footprints/nidoran_m.1bpp", footprint_bottom
+; 033-040 top halves
+INCBIN "gfx/footprints/nidorino.1bpp", footprint_top
+INCBIN "gfx/footprints/nidoking.1bpp", footprint_top
+INCBIN "gfx/footprints/clefairy.1bpp", footprint_top
+INCBIN "gfx/footprints/clefable.1bpp", footprint_top
+INCBIN "gfx/footprints/vulpix.1bpp", footprint_top
+INCBIN "gfx/footprints/ninetales.1bpp", footprint_top
+INCBIN "gfx/footprints/jigglypuff.1bpp", footprint_top
+INCBIN "gfx/footprints/wigglytuff.1bpp", footprint_top
+; 033-040 bottom halves
+INCBIN "gfx/footprints/nidorino.1bpp", footprint_bottom
+INCBIN "gfx/footprints/nidoking.1bpp", footprint_bottom
+INCBIN "gfx/footprints/clefairy.1bpp", footprint_bottom
+INCBIN "gfx/footprints/clefable.1bpp", footprint_bottom
+INCBIN "gfx/footprints/vulpix.1bpp", footprint_bottom
+INCBIN "gfx/footprints/ninetales.1bpp", footprint_bottom
+INCBIN "gfx/footprints/jigglypuff.1bpp", footprint_bottom
+INCBIN "gfx/footprints/wigglytuff.1bpp", footprint_bottom
+; 041-048 top halves
+INCBIN "gfx/footprints/zubat.1bpp", footprint_top
+INCBIN "gfx/footprints/golbat.1bpp", footprint_top
+INCBIN "gfx/footprints/oddish.1bpp", footprint_top
+INCBIN "gfx/footprints/gloom.1bpp", footprint_top
+INCBIN "gfx/footprints/vileplume.1bpp", footprint_top
+INCBIN "gfx/footprints/paras.1bpp", footprint_top
+INCBIN "gfx/footprints/parasect.1bpp", footprint_top
+INCBIN "gfx/footprints/venonat.1bpp", footprint_top
+; 041-048 bottom halves
+INCBIN "gfx/footprints/zubat.1bpp", footprint_bottom
+INCBIN "gfx/footprints/golbat.1bpp", footprint_bottom
+INCBIN "gfx/footprints/oddish.1bpp", footprint_bottom
+INCBIN "gfx/footprints/gloom.1bpp", footprint_bottom
+INCBIN "gfx/footprints/vileplume.1bpp", footprint_bottom
+INCBIN "gfx/footprints/paras.1bpp", footprint_bottom
+INCBIN "gfx/footprints/parasect.1bpp", footprint_bottom
+INCBIN "gfx/footprints/venonat.1bpp", footprint_bottom
+; 049-056 top halves
+INCBIN "gfx/footprints/venomoth.1bpp", footprint_top
+INCBIN "gfx/footprints/diglett.1bpp", footprint_top
+INCBIN "gfx/footprints/dugtrio.1bpp", footprint_top
+INCBIN "gfx/footprints/meowth.1bpp", footprint_top
+INCBIN "gfx/footprints/persian.1bpp", footprint_top
+INCBIN "gfx/footprints/psyduck.1bpp", footprint_top
+INCBIN "gfx/footprints/golduck.1bpp", footprint_top
+INCBIN "gfx/footprints/mankey.1bpp", footprint_top
+; 049-056 bottom halves
+INCBIN "gfx/footprints/venomoth.1bpp", footprint_bottom
+INCBIN "gfx/footprints/diglett.1bpp", footprint_bottom
+INCBIN "gfx/footprints/dugtrio.1bpp", footprint_bottom
+INCBIN "gfx/footprints/meowth.1bpp", footprint_bottom
+INCBIN "gfx/footprints/persian.1bpp", footprint_bottom
+INCBIN "gfx/footprints/psyduck.1bpp", footprint_bottom
+INCBIN "gfx/footprints/golduck.1bpp", footprint_bottom
+INCBIN "gfx/footprints/mankey.1bpp", footprint_bottom
+; 057-064 top halves
+INCBIN "gfx/footprints/primeape.1bpp", footprint_top
+INCBIN "gfx/footprints/growlithe.1bpp", footprint_top
+INCBIN "gfx/footprints/arcanine.1bpp", footprint_top
+INCBIN "gfx/footprints/poliwag.1bpp", footprint_top
+INCBIN "gfx/footprints/poliwhirl.1bpp", footprint_top
+INCBIN "gfx/footprints/poliwrath.1bpp", footprint_top
+INCBIN "gfx/footprints/abra.1bpp", footprint_top
+INCBIN "gfx/footprints/kadabra.1bpp", footprint_top
+; 057-064 bottom halves
+INCBIN "gfx/footprints/primeape.1bpp", footprint_bottom
+INCBIN "gfx/footprints/growlithe.1bpp", footprint_bottom
+INCBIN "gfx/footprints/arcanine.1bpp", footprint_bottom
+INCBIN "gfx/footprints/poliwag.1bpp", footprint_bottom
+INCBIN "gfx/footprints/poliwhirl.1bpp", footprint_bottom
+INCBIN "gfx/footprints/poliwrath.1bpp", footprint_bottom
+INCBIN "gfx/footprints/abra.1bpp", footprint_bottom
+INCBIN "gfx/footprints/kadabra.1bpp", footprint_bottom
+; 065-072 top halves
+INCBIN "gfx/footprints/alakazam.1bpp", footprint_top
+INCBIN "gfx/footprints/machop.1bpp", footprint_top
+INCBIN "gfx/footprints/machoke.1bpp", footprint_top
+INCBIN "gfx/footprints/machamp.1bpp", footprint_top
+INCBIN "gfx/footprints/bellsprout.1bpp", footprint_top
+INCBIN "gfx/footprints/weepinbell.1bpp", footprint_top
+INCBIN "gfx/footprints/victreebel.1bpp", footprint_top
+INCBIN "gfx/footprints/tentacool.1bpp", footprint_top
+; 065-072 bottom halves
+INCBIN "gfx/footprints/alakazam.1bpp", footprint_bottom
+INCBIN "gfx/footprints/machop.1bpp", footprint_bottom
+INCBIN "gfx/footprints/machoke.1bpp", footprint_bottom
+INCBIN "gfx/footprints/machamp.1bpp", footprint_bottom
+INCBIN "gfx/footprints/bellsprout.1bpp", footprint_bottom
+INCBIN "gfx/footprints/weepinbell.1bpp", footprint_bottom
+INCBIN "gfx/footprints/victreebel.1bpp", footprint_bottom
+INCBIN "gfx/footprints/tentacool.1bpp", footprint_bottom
+; 073-080 top halves
+INCBIN "gfx/footprints/tentacruel.1bpp", footprint_top
+INCBIN "gfx/footprints/geodude.1bpp", footprint_top
+INCBIN "gfx/footprints/graveler.1bpp", footprint_top
+INCBIN "gfx/footprints/golem.1bpp", footprint_top
+INCBIN "gfx/footprints/ponyta.1bpp", footprint_top
+INCBIN "gfx/footprints/rapidash.1bpp", footprint_top
+INCBIN "gfx/footprints/slowpoke.1bpp", footprint_top
+INCBIN "gfx/footprints/slowbro.1bpp", footprint_top
+; 073-080 bottom halves
+INCBIN "gfx/footprints/tentacruel.1bpp", footprint_bottom
+INCBIN "gfx/footprints/geodude.1bpp", footprint_bottom
+INCBIN "gfx/footprints/graveler.1bpp", footprint_bottom
+INCBIN "gfx/footprints/golem.1bpp", footprint_bottom
+INCBIN "gfx/footprints/ponyta.1bpp", footprint_bottom
+INCBIN "gfx/footprints/rapidash.1bpp", footprint_bottom
+INCBIN "gfx/footprints/slowpoke.1bpp", footprint_bottom
+INCBIN "gfx/footprints/slowbro.1bpp", footprint_bottom
+; 081-088 top halves
+INCBIN "gfx/footprints/magnemite.1bpp", footprint_top
+INCBIN "gfx/footprints/magneton.1bpp", footprint_top
+INCBIN "gfx/footprints/farfetch_d.1bpp", footprint_top
+INCBIN "gfx/footprints/doduo.1bpp", footprint_top
+INCBIN "gfx/footprints/dodrio.1bpp", footprint_top
+INCBIN "gfx/footprints/seel.1bpp", footprint_top
+INCBIN "gfx/footprints/dewgong.1bpp", footprint_top
+INCBIN "gfx/footprints/grimer.1bpp", footprint_top
+; 081-088 bottom halves
+INCBIN "gfx/footprints/magnemite.1bpp", footprint_bottom
+INCBIN "gfx/footprints/magneton.1bpp", footprint_bottom
+INCBIN "gfx/footprints/farfetch_d.1bpp", footprint_bottom
+INCBIN "gfx/footprints/doduo.1bpp", footprint_bottom
+INCBIN "gfx/footprints/dodrio.1bpp", footprint_bottom
+INCBIN "gfx/footprints/seel.1bpp", footprint_bottom
+INCBIN "gfx/footprints/dewgong.1bpp", footprint_bottom
+INCBIN "gfx/footprints/grimer.1bpp", footprint_bottom
+; 089-096 top halves
+INCBIN "gfx/footprints/muk.1bpp", footprint_top
+INCBIN "gfx/footprints/shellder.1bpp", footprint_top
+INCBIN "gfx/footprints/cloyster.1bpp", footprint_top
+INCBIN "gfx/footprints/gastly.1bpp", footprint_top
+INCBIN "gfx/footprints/haunter.1bpp", footprint_top
+INCBIN "gfx/footprints/gengar.1bpp", footprint_top
+INCBIN "gfx/footprints/onix.1bpp", footprint_top
+INCBIN "gfx/footprints/drowzee.1bpp", footprint_top
+; 089-096 bottom halves
+INCBIN "gfx/footprints/muk.1bpp", footprint_bottom
+INCBIN "gfx/footprints/shellder.1bpp", footprint_bottom
+INCBIN "gfx/footprints/cloyster.1bpp", footprint_bottom
+INCBIN "gfx/footprints/gastly.1bpp", footprint_bottom
+INCBIN "gfx/footprints/haunter.1bpp", footprint_bottom
+INCBIN "gfx/footprints/gengar.1bpp", footprint_bottom
+INCBIN "gfx/footprints/onix.1bpp", footprint_bottom
+INCBIN "gfx/footprints/drowzee.1bpp", footprint_bottom
+; 097-104 top halves
+INCBIN "gfx/footprints/hypno.1bpp", footprint_top
+INCBIN "gfx/footprints/krabby.1bpp", footprint_top
+INCBIN "gfx/footprints/kingler.1bpp", footprint_top
+INCBIN "gfx/footprints/voltorb.1bpp", footprint_top
+INCBIN "gfx/footprints/electrode.1bpp", footprint_top
+INCBIN "gfx/footprints/exeggcute.1bpp", footprint_top
+INCBIN "gfx/footprints/exeggutor.1bpp", footprint_top
+INCBIN "gfx/footprints/cubone.1bpp", footprint_top
+; 097-104 bottom halves
+INCBIN "gfx/footprints/hypno.1bpp", footprint_bottom
+INCBIN "gfx/footprints/krabby.1bpp", footprint_bottom
+INCBIN "gfx/footprints/kingler.1bpp", footprint_bottom
+INCBIN "gfx/footprints/voltorb.1bpp", footprint_bottom
+INCBIN "gfx/footprints/electrode.1bpp", footprint_bottom
+INCBIN "gfx/footprints/exeggcute.1bpp", footprint_bottom
+INCBIN "gfx/footprints/exeggutor.1bpp", footprint_bottom
+INCBIN "gfx/footprints/cubone.1bpp", footprint_bottom
+; 105-112 top halves
+INCBIN "gfx/footprints/marowak.1bpp", footprint_top
+INCBIN "gfx/footprints/hitmonlee.1bpp", footprint_top
+INCBIN "gfx/footprints/hitmonchan.1bpp", footprint_top
+INCBIN "gfx/footprints/lickitung.1bpp", footprint_top
+INCBIN "gfx/footprints/koffing.1bpp", footprint_top
+INCBIN "gfx/footprints/weezing.1bpp", footprint_top
+INCBIN "gfx/footprints/rhyhorn.1bpp", footprint_top
+INCBIN "gfx/footprints/rhydon.1bpp", footprint_top
+; 105-112 bottom halves
+INCBIN "gfx/footprints/marowak.1bpp", footprint_bottom
+INCBIN "gfx/footprints/hitmonlee.1bpp", footprint_bottom
+INCBIN "gfx/footprints/hitmonchan.1bpp", footprint_bottom
+INCBIN "gfx/footprints/lickitung.1bpp", footprint_bottom
+INCBIN "gfx/footprints/koffing.1bpp", footprint_bottom
+INCBIN "gfx/footprints/weezing.1bpp", footprint_bottom
+INCBIN "gfx/footprints/rhyhorn.1bpp", footprint_bottom
+INCBIN "gfx/footprints/rhydon.1bpp", footprint_bottom
+; 113-120 top halves
+INCBIN "gfx/footprints/chansey.1bpp", footprint_top
+INCBIN "gfx/footprints/tangela.1bpp", footprint_top
+INCBIN "gfx/footprints/kangaskhan.1bpp", footprint_top
+INCBIN "gfx/footprints/horsea.1bpp", footprint_top
+INCBIN "gfx/footprints/seadra.1bpp", footprint_top
+INCBIN "gfx/footprints/goldeen.1bpp", footprint_top
+INCBIN "gfx/footprints/seaking.1bpp", footprint_top
+INCBIN "gfx/footprints/staryu.1bpp", footprint_top
+; 113-120 bottom halves
+INCBIN "gfx/footprints/chansey.1bpp", footprint_bottom
+INCBIN "gfx/footprints/tangela.1bpp", footprint_bottom
+INCBIN "gfx/footprints/kangaskhan.1bpp", footprint_bottom
+INCBIN "gfx/footprints/horsea.1bpp", footprint_bottom
+INCBIN "gfx/footprints/seadra.1bpp", footprint_bottom
+INCBIN "gfx/footprints/goldeen.1bpp", footprint_bottom
+INCBIN "gfx/footprints/seaking.1bpp", footprint_bottom
+INCBIN "gfx/footprints/staryu.1bpp", footprint_bottom
+; 121-128 top halves
+INCBIN "gfx/footprints/starmie.1bpp", footprint_top
+INCBIN "gfx/footprints/mr__mime.1bpp", footprint_top
+INCBIN "gfx/footprints/scyther.1bpp", footprint_top
+INCBIN "gfx/footprints/jynx.1bpp", footprint_top
+INCBIN "gfx/footprints/electabuzz.1bpp", footprint_top
+INCBIN "gfx/footprints/magmar.1bpp", footprint_top
+INCBIN "gfx/footprints/pinsir.1bpp", footprint_top
+INCBIN "gfx/footprints/tauros.1bpp", footprint_top
+; 121-128 bottom halves
+INCBIN "gfx/footprints/starmie.1bpp", footprint_bottom
+INCBIN "gfx/footprints/mr__mime.1bpp", footprint_bottom
+INCBIN "gfx/footprints/scyther.1bpp", footprint_bottom
+INCBIN "gfx/footprints/jynx.1bpp", footprint_bottom
+INCBIN "gfx/footprints/electabuzz.1bpp", footprint_bottom
+INCBIN "gfx/footprints/magmar.1bpp", footprint_bottom
+INCBIN "gfx/footprints/pinsir.1bpp", footprint_bottom
+INCBIN "gfx/footprints/tauros.1bpp", footprint_bottom
+; 129-136 top halves
+INCBIN "gfx/footprints/magikarp.1bpp", footprint_top
+INCBIN "gfx/footprints/gyarados.1bpp", footprint_top
+INCBIN "gfx/footprints/lapras.1bpp", footprint_top
+INCBIN "gfx/footprints/ditto.1bpp", footprint_top
+INCBIN "gfx/footprints/eevee.1bpp", footprint_top
+INCBIN "gfx/footprints/vaporeon.1bpp", footprint_top
+INCBIN "gfx/footprints/jolteon.1bpp", footprint_top
+INCBIN "gfx/footprints/flareon.1bpp", footprint_top
+; 129-136 bottom halves
+INCBIN "gfx/footprints/magikarp.1bpp", footprint_bottom
+INCBIN "gfx/footprints/gyarados.1bpp", footprint_bottom
+INCBIN "gfx/footprints/lapras.1bpp", footprint_bottom
+INCBIN "gfx/footprints/ditto.1bpp", footprint_bottom
+INCBIN "gfx/footprints/eevee.1bpp", footprint_bottom
+INCBIN "gfx/footprints/vaporeon.1bpp", footprint_bottom
+INCBIN "gfx/footprints/jolteon.1bpp", footprint_bottom
+INCBIN "gfx/footprints/flareon.1bpp", footprint_bottom
+; 137-144 top halves
+INCBIN "gfx/footprints/porygon.1bpp", footprint_top
+INCBIN "gfx/footprints/omanyte.1bpp", footprint_top
+INCBIN "gfx/footprints/omastar.1bpp", footprint_top
+INCBIN "gfx/footprints/kabuto.1bpp", footprint_top
+INCBIN "gfx/footprints/kabutops.1bpp", footprint_top
+INCBIN "gfx/footprints/aerodactyl.1bpp", footprint_top
+INCBIN "gfx/footprints/snorlax.1bpp", footprint_top
+INCBIN "gfx/footprints/articuno.1bpp", footprint_top
+; 137-144 bottom halves
+INCBIN "gfx/footprints/porygon.1bpp", footprint_bottom
+INCBIN "gfx/footprints/omanyte.1bpp", footprint_bottom
+INCBIN "gfx/footprints/omastar.1bpp", footprint_bottom
+INCBIN "gfx/footprints/kabuto.1bpp", footprint_bottom
+INCBIN "gfx/footprints/kabutops.1bpp", footprint_bottom
+INCBIN "gfx/footprints/aerodactyl.1bpp", footprint_bottom
+INCBIN "gfx/footprints/snorlax.1bpp", footprint_bottom
+INCBIN "gfx/footprints/articuno.1bpp", footprint_bottom
+; 145-152 top halves
+INCBIN "gfx/footprints/zapdos.1bpp", footprint_top
+INCBIN "gfx/footprints/moltres.1bpp", footprint_top
+INCBIN "gfx/footprints/dratini.1bpp", footprint_top
+INCBIN "gfx/footprints/dragonair.1bpp", footprint_top
+INCBIN "gfx/footprints/dragonite.1bpp", footprint_top
+INCBIN "gfx/footprints/mewtwo.1bpp", footprint_top
+INCBIN "gfx/footprints/mew.1bpp", footprint_top
+INCBIN "gfx/footprints/chikorita.1bpp", footprint_top
+; 145-152 bottom halves
+INCBIN "gfx/footprints/zapdos.1bpp", footprint_bottom
+INCBIN "gfx/footprints/moltres.1bpp", footprint_bottom
+INCBIN "gfx/footprints/dratini.1bpp", footprint_bottom
+INCBIN "gfx/footprints/dragonair.1bpp", footprint_bottom
+INCBIN "gfx/footprints/dragonite.1bpp", footprint_bottom
+INCBIN "gfx/footprints/mewtwo.1bpp", footprint_bottom
+INCBIN "gfx/footprints/mew.1bpp", footprint_bottom
+INCBIN "gfx/footprints/chikorita.1bpp", footprint_bottom
+; 153-160 top halves
+INCBIN "gfx/footprints/bayleef.1bpp", footprint_top
+INCBIN "gfx/footprints/meganium.1bpp", footprint_top
+INCBIN "gfx/footprints/cyndaquil.1bpp", footprint_top
+INCBIN "gfx/footprints/quilava.1bpp", footprint_top
+INCBIN "gfx/footprints/typhlosion.1bpp", footprint_top
+INCBIN "gfx/footprints/totodile.1bpp", footprint_top
+INCBIN "gfx/footprints/croconaw.1bpp", footprint_top
+INCBIN "gfx/footprints/feraligatr.1bpp", footprint_top
+; 153-160 bottom halves
+INCBIN "gfx/footprints/bayleef.1bpp", footprint_bottom
+INCBIN "gfx/footprints/meganium.1bpp", footprint_bottom
+INCBIN "gfx/footprints/cyndaquil.1bpp", footprint_bottom
+INCBIN "gfx/footprints/quilava.1bpp", footprint_bottom
+INCBIN "gfx/footprints/typhlosion.1bpp", footprint_bottom
+INCBIN "gfx/footprints/totodile.1bpp", footprint_bottom
+INCBIN "gfx/footprints/croconaw.1bpp", footprint_bottom
+INCBIN "gfx/footprints/feraligatr.1bpp", footprint_bottom
+; 161-168 top halves
+INCBIN "gfx/footprints/sentret.1bpp", footprint_top
+INCBIN "gfx/footprints/furret.1bpp", footprint_top
+INCBIN "gfx/footprints/hoothoot.1bpp", footprint_top
+INCBIN "gfx/footprints/noctowl.1bpp", footprint_top
+INCBIN "gfx/footprints/ledyba.1bpp", footprint_top
+INCBIN "gfx/footprints/ledian.1bpp", footprint_top
+INCBIN "gfx/footprints/spinarak.1bpp", footprint_top
+INCBIN "gfx/footprints/ariados.1bpp", footprint_top
+; 161-168 bottom halves
+INCBIN "gfx/footprints/sentret.1bpp", footprint_bottom
+INCBIN "gfx/footprints/furret.1bpp", footprint_bottom
+INCBIN "gfx/footprints/hoothoot.1bpp", footprint_bottom
+INCBIN "gfx/footprints/noctowl.1bpp", footprint_bottom
+INCBIN "gfx/footprints/ledyba.1bpp", footprint_bottom
+INCBIN "gfx/footprints/ledian.1bpp", footprint_bottom
+INCBIN "gfx/footprints/spinarak.1bpp", footprint_bottom
+INCBIN "gfx/footprints/ariados.1bpp", footprint_bottom
+; 169-176 top halves
+INCBIN "gfx/footprints/crobat.1bpp", footprint_top
+INCBIN "gfx/footprints/chinchou.1bpp", footprint_top
+INCBIN "gfx/footprints/lanturn.1bpp", footprint_top
+INCBIN "gfx/footprints/pichu.1bpp", footprint_top
+INCBIN "gfx/footprints/cleffa.1bpp", footprint_top
+INCBIN "gfx/footprints/igglybuff.1bpp", footprint_top
+INCBIN "gfx/footprints/togepi.1bpp", footprint_top
+INCBIN "gfx/footprints/togetic.1bpp", footprint_top
+; 169-176 bottom halves
+INCBIN "gfx/footprints/crobat.1bpp", footprint_bottom
+INCBIN "gfx/footprints/chinchou.1bpp", footprint_bottom
+INCBIN "gfx/footprints/lanturn.1bpp", footprint_bottom
+INCBIN "gfx/footprints/pichu.1bpp", footprint_bottom
+INCBIN "gfx/footprints/cleffa.1bpp", footprint_bottom
+INCBIN "gfx/footprints/igglybuff.1bpp", footprint_bottom
+INCBIN "gfx/footprints/togepi.1bpp", footprint_bottom
+INCBIN "gfx/footprints/togetic.1bpp", footprint_bottom
+; 177-184 top halves
+INCBIN "gfx/footprints/natu.1bpp", footprint_top
+INCBIN "gfx/footprints/xatu.1bpp", footprint_top
+INCBIN "gfx/footprints/mareep.1bpp", footprint_top
+INCBIN "gfx/footprints/flaaffy.1bpp", footprint_top
+INCBIN "gfx/footprints/ampharos.1bpp", footprint_top
+INCBIN "gfx/footprints/bellossom.1bpp", footprint_top
+INCBIN "gfx/footprints/marill.1bpp", footprint_top
+INCBIN "gfx/footprints/azumarill.1bpp", footprint_top
+; 177-184 bottom halves
+INCBIN "gfx/footprints/natu.1bpp", footprint_bottom
+INCBIN "gfx/footprints/xatu.1bpp", footprint_bottom
+INCBIN "gfx/footprints/mareep.1bpp", footprint_bottom
+INCBIN "gfx/footprints/flaaffy.1bpp", footprint_bottom
+INCBIN "gfx/footprints/ampharos.1bpp", footprint_bottom
+INCBIN "gfx/footprints/bellossom.1bpp", footprint_bottom
+INCBIN "gfx/footprints/marill.1bpp", footprint_bottom
+INCBIN "gfx/footprints/azumarill.1bpp", footprint_bottom
+; 185-192 top halves
+INCBIN "gfx/footprints/sudowoodo.1bpp", footprint_top
+INCBIN "gfx/footprints/politoed.1bpp", footprint_top
+INCBIN "gfx/footprints/hoppip.1bpp", footprint_top
+INCBIN "gfx/footprints/skiploom.1bpp", footprint_top
+INCBIN "gfx/footprints/jumpluff.1bpp", footprint_top
+INCBIN "gfx/footprints/aipom.1bpp", footprint_top
+INCBIN "gfx/footprints/sunkern.1bpp", footprint_top
+INCBIN "gfx/footprints/sunflora.1bpp", footprint_top
+; 185-192 bottom halves
+INCBIN "gfx/footprints/sudowoodo.1bpp", footprint_bottom
+INCBIN "gfx/footprints/politoed.1bpp", footprint_bottom
+INCBIN "gfx/footprints/hoppip.1bpp", footprint_bottom
+INCBIN "gfx/footprints/skiploom.1bpp", footprint_bottom
+INCBIN "gfx/footprints/jumpluff.1bpp", footprint_bottom
+INCBIN "gfx/footprints/aipom.1bpp", footprint_bottom
+INCBIN "gfx/footprints/sunkern.1bpp", footprint_bottom
+INCBIN "gfx/footprints/sunflora.1bpp", footprint_bottom
+; 193-200 top halves
+INCBIN "gfx/footprints/yanma.1bpp", footprint_top
+INCBIN "gfx/footprints/wooper.1bpp", footprint_top
+INCBIN "gfx/footprints/quagsire.1bpp", footprint_top
+INCBIN "gfx/footprints/espeon.1bpp", footprint_top
+INCBIN "gfx/footprints/umbreon.1bpp", footprint_top
+INCBIN "gfx/footprints/murkrow.1bpp", footprint_top
+INCBIN "gfx/footprints/slowking.1bpp", footprint_top
+INCBIN "gfx/footprints/misdreavus.1bpp", footprint_top
+; 193-200 bottom halves
+INCBIN "gfx/footprints/yanma.1bpp", footprint_bottom
+INCBIN "gfx/footprints/wooper.1bpp", footprint_bottom
+INCBIN "gfx/footprints/quagsire.1bpp", footprint_bottom
+INCBIN "gfx/footprints/espeon.1bpp", footprint_bottom
+INCBIN "gfx/footprints/umbreon.1bpp", footprint_bottom
+INCBIN "gfx/footprints/murkrow.1bpp", footprint_bottom
+INCBIN "gfx/footprints/slowking.1bpp", footprint_bottom
+INCBIN "gfx/footprints/misdreavus.1bpp", footprint_bottom
+; 201-208 top halves
+INCBIN "gfx/footprints/unown.1bpp", footprint_top
+INCBIN "gfx/footprints/wobbuffet.1bpp", footprint_top
+INCBIN "gfx/footprints/girafarig.1bpp", footprint_top
+INCBIN "gfx/footprints/pineco.1bpp", footprint_top
+INCBIN "gfx/footprints/forretress.1bpp", footprint_top
+INCBIN "gfx/footprints/dunsparce.1bpp", footprint_top
+INCBIN "gfx/footprints/gligar.1bpp", footprint_top
+INCBIN "gfx/footprints/steelix.1bpp", footprint_top
+; 201-208 bottom halves
+INCBIN "gfx/footprints/unown.1bpp", footprint_bottom
+INCBIN "gfx/footprints/wobbuffet.1bpp", footprint_bottom
+INCBIN "gfx/footprints/girafarig.1bpp", footprint_bottom
+INCBIN "gfx/footprints/pineco.1bpp", footprint_bottom
+INCBIN "gfx/footprints/forretress.1bpp", footprint_bottom
+INCBIN "gfx/footprints/dunsparce.1bpp", footprint_bottom
+INCBIN "gfx/footprints/gligar.1bpp", footprint_bottom
+INCBIN "gfx/footprints/steelix.1bpp", footprint_bottom
+; 209-216 top halves
+INCBIN "gfx/footprints/snubbull.1bpp", footprint_top
+INCBIN "gfx/footprints/granbull.1bpp", footprint_top
+INCBIN "gfx/footprints/qwilfish.1bpp", footprint_top
+INCBIN "gfx/footprints/scizor.1bpp", footprint_top
+INCBIN "gfx/footprints/shuckle.1bpp", footprint_top
+INCBIN "gfx/footprints/heracross.1bpp", footprint_top
+INCBIN "gfx/footprints/sneasel.1bpp", footprint_top
+INCBIN "gfx/footprints/teddiursa.1bpp", footprint_top
+; 209-216 bottom halves
+INCBIN "gfx/footprints/snubbull.1bpp", footprint_bottom
+INCBIN "gfx/footprints/granbull.1bpp", footprint_bottom
+INCBIN "gfx/footprints/qwilfish.1bpp", footprint_bottom
+INCBIN "gfx/footprints/scizor.1bpp", footprint_bottom
+INCBIN "gfx/footprints/shuckle.1bpp", footprint_bottom
+INCBIN "gfx/footprints/heracross.1bpp", footprint_bottom
+INCBIN "gfx/footprints/sneasel.1bpp", footprint_bottom
+INCBIN "gfx/footprints/teddiursa.1bpp", footprint_bottom
+; 217-224 top halves
+INCBIN "gfx/footprints/ursaring.1bpp", footprint_top
+INCBIN "gfx/footprints/slugma.1bpp", footprint_top
+INCBIN "gfx/footprints/magcargo.1bpp", footprint_top
+INCBIN "gfx/footprints/swinub.1bpp", footprint_top
+INCBIN "gfx/footprints/piloswine.1bpp", footprint_top
+INCBIN "gfx/footprints/corsola.1bpp", footprint_top
+INCBIN "gfx/footprints/remoraid.1bpp", footprint_top
+INCBIN "gfx/footprints/octillery.1bpp", footprint_top
+; 217-224 bottom halves
+INCBIN "gfx/footprints/ursaring.1bpp", footprint_bottom
+INCBIN "gfx/footprints/slugma.1bpp", footprint_bottom
+INCBIN "gfx/footprints/magcargo.1bpp", footprint_bottom
+INCBIN "gfx/footprints/swinub.1bpp", footprint_bottom
+INCBIN "gfx/footprints/piloswine.1bpp", footprint_bottom
+INCBIN "gfx/footprints/corsola.1bpp", footprint_bottom
+INCBIN "gfx/footprints/remoraid.1bpp", footprint_bottom
+INCBIN "gfx/footprints/octillery.1bpp", footprint_bottom
+; 225-232 top halves
+INCBIN "gfx/footprints/delibird.1bpp", footprint_top
+INCBIN "gfx/footprints/mantine.1bpp", footprint_top
+INCBIN "gfx/footprints/skarmory.1bpp", footprint_top
+INCBIN "gfx/footprints/houndour.1bpp", footprint_top
+INCBIN "gfx/footprints/houndoom.1bpp", footprint_top
+INCBIN "gfx/footprints/kingdra.1bpp", footprint_top
+INCBIN "gfx/footprints/phanpy.1bpp", footprint_top
+INCBIN "gfx/footprints/donphan.1bpp", footprint_top
+; 225-232 bottom halves
+INCBIN "gfx/footprints/delibird.1bpp", footprint_bottom
+INCBIN "gfx/footprints/mantine.1bpp", footprint_bottom
+INCBIN "gfx/footprints/skarmory.1bpp", footprint_bottom
+INCBIN "gfx/footprints/houndour.1bpp", footprint_bottom
+INCBIN "gfx/footprints/houndoom.1bpp", footprint_bottom
+INCBIN "gfx/footprints/kingdra.1bpp", footprint_bottom
+INCBIN "gfx/footprints/phanpy.1bpp", footprint_bottom
+INCBIN "gfx/footprints/donphan.1bpp", footprint_bottom
+; 233-240 top halves
+INCBIN "gfx/footprints/porygon2.1bpp", footprint_top
+INCBIN "gfx/footprints/stantler.1bpp", footprint_top
+INCBIN "gfx/footprints/smeargle.1bpp", footprint_top
+INCBIN "gfx/footprints/tyrogue.1bpp", footprint_top
+INCBIN "gfx/footprints/hitmontop.1bpp", footprint_top
+INCBIN "gfx/footprints/smoochum.1bpp", footprint_top
+INCBIN "gfx/footprints/elekid.1bpp", footprint_top
+INCBIN "gfx/footprints/magby.1bpp", footprint_top
+; 233-240 bottom halves
+INCBIN "gfx/footprints/porygon2.1bpp", footprint_bottom
+INCBIN "gfx/footprints/stantler.1bpp", footprint_bottom
+INCBIN "gfx/footprints/smeargle.1bpp", footprint_bottom
+INCBIN "gfx/footprints/tyrogue.1bpp", footprint_bottom
+INCBIN "gfx/footprints/hitmontop.1bpp", footprint_bottom
+INCBIN "gfx/footprints/smoochum.1bpp", footprint_bottom
+INCBIN "gfx/footprints/elekid.1bpp", footprint_bottom
+INCBIN "gfx/footprints/magby.1bpp", footprint_bottom
+; 241-248 top halves
+INCBIN "gfx/footprints/miltank.1bpp", footprint_top
+INCBIN "gfx/footprints/blissey.1bpp", footprint_top
+INCBIN "gfx/footprints/raikou.1bpp", footprint_top
+INCBIN "gfx/footprints/entei.1bpp", footprint_top
+INCBIN "gfx/footprints/suicune.1bpp", footprint_top
+INCBIN "gfx/footprints/larvitar.1bpp", footprint_top
+INCBIN "gfx/footprints/pupitar.1bpp", footprint_top
+INCBIN "gfx/footprints/tyranitar.1bpp", footprint_top
+; 241-248 bottom halves
+INCBIN "gfx/footprints/miltank.1bpp", footprint_bottom
+INCBIN "gfx/footprints/blissey.1bpp", footprint_bottom
+INCBIN "gfx/footprints/raikou.1bpp", footprint_bottom
+INCBIN "gfx/footprints/entei.1bpp", footprint_bottom
+INCBIN "gfx/footprints/suicune.1bpp", footprint_bottom
+INCBIN "gfx/footprints/larvitar.1bpp", footprint_bottom
+INCBIN "gfx/footprints/pupitar.1bpp", footprint_bottom
+INCBIN "gfx/footprints/tyranitar.1bpp", footprint_bottom
+; 249-256 top halves
+INCBIN "gfx/footprints/lugia.1bpp", footprint_top
+INCBIN "gfx/footprints/ho_oh.1bpp", footprint_top
+INCBIN "gfx/footprints/celebi.1bpp", footprint_top
+INCBIN "gfx/footprints/252.1bpp", footprint_top
+INCBIN "gfx/footprints/253.1bpp", footprint_top
+INCBIN "gfx/footprints/254.1bpp", footprint_top
+INCBIN "gfx/footprints/255.1bpp", footprint_top
+INCBIN "gfx/footprints/256.1bpp", footprint_top
+; 249-256 bottom halves
+INCBIN "gfx/footprints/lugia.1bpp", footprint_bottom
+INCBIN "gfx/footprints/ho_oh.1bpp", footprint_bottom
+INCBIN "gfx/footprints/celebi.1bpp", footprint_bottom
+INCBIN "gfx/footprints/252.1bpp", footprint_bottom
+INCBIN "gfx/footprints/253.1bpp", footprint_bottom
+INCBIN "gfx/footprints/254.1bpp", footprint_bottom
+INCBIN "gfx/footprints/255.1bpp", footprint_bottom
+INCBIN "gfx/footprints/256.1bpp", footprint_bottom
diff --git a/gfx/footprints/252.png b/gfx/footprints/252.png
new file mode 100644
index 000000000..5faf07ce7
--- /dev/null
+++ b/gfx/footprints/252.png
Binary files differ
diff --git a/gfx/footprints/253.png b/gfx/footprints/253.png
new file mode 100644
index 000000000..c4405653c
--- /dev/null
+++ b/gfx/footprints/253.png
Binary files differ
diff --git a/gfx/footprints/254.png b/gfx/footprints/254.png
new file mode 100644
index 000000000..ec49be88c
--- /dev/null
+++ b/gfx/footprints/254.png
Binary files differ
diff --git a/gfx/footprints/255.png b/gfx/footprints/255.png
new file mode 100644
index 000000000..5864d2401
--- /dev/null
+++ b/gfx/footprints/255.png
Binary files differ
diff --git a/gfx/footprints/256.png b/gfx/footprints/256.png
new file mode 100644
index 000000000..36d71d314
--- /dev/null
+++ b/gfx/footprints/256.png
Binary files differ
diff --git a/gfx/footprints/abra.png b/gfx/footprints/abra.png
new file mode 100644
index 000000000..49d302232
--- /dev/null
+++ b/gfx/footprints/abra.png
Binary files differ
diff --git a/gfx/footprints/aerodactyl.png b/gfx/footprints/aerodactyl.png
new file mode 100644
index 000000000..013daf643
--- /dev/null
+++ b/gfx/footprints/aerodactyl.png
Binary files differ
diff --git a/gfx/footprints/aipom.png b/gfx/footprints/aipom.png
new file mode 100644
index 000000000..9b094262f
--- /dev/null
+++ b/gfx/footprints/aipom.png
Binary files differ
diff --git a/gfx/footprints/alakazam.png b/gfx/footprints/alakazam.png
new file mode 100644
index 000000000..cc92be809
--- /dev/null
+++ b/gfx/footprints/alakazam.png
Binary files differ
diff --git a/gfx/footprints/ampharos.png b/gfx/footprints/ampharos.png
new file mode 100644
index 000000000..0a691253d
--- /dev/null
+++ b/gfx/footprints/ampharos.png
Binary files differ
diff --git a/gfx/footprints/arbok.png b/gfx/footprints/arbok.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/arbok.png
Binary files differ
diff --git a/gfx/footprints/arcanine.png b/gfx/footprints/arcanine.png
new file mode 100644
index 000000000..2d4baf797
--- /dev/null
+++ b/gfx/footprints/arcanine.png
Binary files differ
diff --git a/gfx/footprints/ariados.png b/gfx/footprints/ariados.png
new file mode 100644
index 000000000..8d5488a22
--- /dev/null
+++ b/gfx/footprints/ariados.png
Binary files differ
diff --git a/gfx/footprints/articuno.png b/gfx/footprints/articuno.png
new file mode 100644
index 000000000..8c75d2caa
--- /dev/null
+++ b/gfx/footprints/articuno.png
Binary files differ
diff --git a/gfx/footprints/azumarill.png b/gfx/footprints/azumarill.png
new file mode 100644
index 000000000..c93b8faaf
--- /dev/null
+++ b/gfx/footprints/azumarill.png
Binary files differ
diff --git a/gfx/footprints/bayleef.png b/gfx/footprints/bayleef.png
new file mode 100644
index 000000000..1459e5d9d
--- /dev/null
+++ b/gfx/footprints/bayleef.png
Binary files differ
diff --git a/gfx/footprints/beedrill.png b/gfx/footprints/beedrill.png
new file mode 100644
index 000000000..7359cd6db
--- /dev/null
+++ b/gfx/footprints/beedrill.png
Binary files differ
diff --git a/gfx/footprints/bellossom.png b/gfx/footprints/bellossom.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/bellossom.png
Binary files differ
diff --git a/gfx/footprints/bellsprout.png b/gfx/footprints/bellsprout.png
new file mode 100644
index 000000000..9a8acdd76
--- /dev/null
+++ b/gfx/footprints/bellsprout.png
Binary files differ
diff --git a/gfx/footprints/blastoise.png b/gfx/footprints/blastoise.png
new file mode 100644
index 000000000..1cc1a18d1
--- /dev/null
+++ b/gfx/footprints/blastoise.png
Binary files differ
diff --git a/gfx/footprints/blissey.png b/gfx/footprints/blissey.png
new file mode 100644
index 000000000..8e7aa987b
--- /dev/null
+++ b/gfx/footprints/blissey.png
Binary files differ
diff --git a/gfx/footprints/bulbasaur.png b/gfx/footprints/bulbasaur.png
new file mode 100644
index 000000000..f32114159
--- /dev/null
+++ b/gfx/footprints/bulbasaur.png
Binary files differ
diff --git a/gfx/footprints/butterfree.png b/gfx/footprints/butterfree.png
new file mode 100644
index 000000000..0d4b00773
--- /dev/null
+++ b/gfx/footprints/butterfree.png
Binary files differ
diff --git a/gfx/footprints/caterpie.png b/gfx/footprints/caterpie.png
new file mode 100644
index 000000000..5b8307bd1
--- /dev/null
+++ b/gfx/footprints/caterpie.png
Binary files differ
diff --git a/gfx/footprints/celebi.png b/gfx/footprints/celebi.png
new file mode 100644
index 000000000..9c4ae0aff
--- /dev/null
+++ b/gfx/footprints/celebi.png
Binary files differ
diff --git a/gfx/footprints/chansey.png b/gfx/footprints/chansey.png
new file mode 100644
index 000000000..bae13d96b
--- /dev/null
+++ b/gfx/footprints/chansey.png
Binary files differ
diff --git a/gfx/footprints/charizard.png b/gfx/footprints/charizard.png
new file mode 100644
index 000000000..7a508c64e
--- /dev/null
+++ b/gfx/footprints/charizard.png
Binary files differ
diff --git a/gfx/footprints/charmander.png b/gfx/footprints/charmander.png
new file mode 100644
index 000000000..218b391c2
--- /dev/null
+++ b/gfx/footprints/charmander.png
Binary files differ
diff --git a/gfx/footprints/charmeleon.png b/gfx/footprints/charmeleon.png
new file mode 100644
index 000000000..3a728a77d
--- /dev/null
+++ b/gfx/footprints/charmeleon.png
Binary files differ
diff --git a/gfx/footprints/chikorita.png b/gfx/footprints/chikorita.png
new file mode 100644
index 000000000..646ca6bb3
--- /dev/null
+++ b/gfx/footprints/chikorita.png
Binary files differ
diff --git a/gfx/footprints/chinchou.png b/gfx/footprints/chinchou.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/chinchou.png
Binary files differ
diff --git a/gfx/footprints/clefable.png b/gfx/footprints/clefable.png
new file mode 100644
index 000000000..ac6721b25
--- /dev/null
+++ b/gfx/footprints/clefable.png
Binary files differ
diff --git a/gfx/footprints/clefairy.png b/gfx/footprints/clefairy.png
new file mode 100644
index 000000000..be3c34240
--- /dev/null
+++ b/gfx/footprints/clefairy.png
Binary files differ
diff --git a/gfx/footprints/cleffa.png b/gfx/footprints/cleffa.png
new file mode 100644
index 000000000..82a415482
--- /dev/null
+++ b/gfx/footprints/cleffa.png
Binary files differ
diff --git a/gfx/footprints/cloyster.png b/gfx/footprints/cloyster.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/cloyster.png
Binary files differ
diff --git a/gfx/footprints/corsola.png b/gfx/footprints/corsola.png
new file mode 100644
index 000000000..1a59a6868
--- /dev/null
+++ b/gfx/footprints/corsola.png
Binary files differ
diff --git a/gfx/footprints/crobat.png b/gfx/footprints/crobat.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/crobat.png
Binary files differ
diff --git a/gfx/footprints/croconaw.png b/gfx/footprints/croconaw.png
new file mode 100644
index 000000000..0f305811a
--- /dev/null
+++ b/gfx/footprints/croconaw.png
Binary files differ
diff --git a/gfx/footprints/cubone.png b/gfx/footprints/cubone.png
new file mode 100644
index 000000000..a2928ddde
--- /dev/null
+++ b/gfx/footprints/cubone.png
Binary files differ
diff --git a/gfx/footprints/cyndaquil.png b/gfx/footprints/cyndaquil.png
new file mode 100644
index 000000000..1f7f46b81
--- /dev/null
+++ b/gfx/footprints/cyndaquil.png
Binary files differ
diff --git a/gfx/footprints/delibird.png b/gfx/footprints/delibird.png
new file mode 100644
index 000000000..c354bdf89
--- /dev/null
+++ b/gfx/footprints/delibird.png
Binary files differ
diff --git a/gfx/footprints/dewgong.png b/gfx/footprints/dewgong.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/dewgong.png
Binary files differ
diff --git a/gfx/footprints/diglett.png b/gfx/footprints/diglett.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/diglett.png
Binary files differ
diff --git a/gfx/footprints/ditto.png b/gfx/footprints/ditto.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/ditto.png
Binary files differ
diff --git a/gfx/footprints/dodrio.png b/gfx/footprints/dodrio.png
new file mode 100644
index 000000000..2a0710232
--- /dev/null
+++ b/gfx/footprints/dodrio.png
Binary files differ
diff --git a/gfx/footprints/doduo.png b/gfx/footprints/doduo.png
new file mode 100644
index 000000000..53c5d5fe6
--- /dev/null
+++ b/gfx/footprints/doduo.png
Binary files differ
diff --git a/gfx/footprints/donphan.png b/gfx/footprints/donphan.png
new file mode 100644
index 000000000..5120bd870
--- /dev/null
+++ b/gfx/footprints/donphan.png
Binary files differ
diff --git a/gfx/footprints/dragonair.png b/gfx/footprints/dragonair.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/dragonair.png
Binary files differ
diff --git a/gfx/footprints/dragonite.png b/gfx/footprints/dragonite.png
new file mode 100644
index 000000000..1db96f25c
--- /dev/null
+++ b/gfx/footprints/dragonite.png
Binary files differ
diff --git a/gfx/footprints/dratini.png b/gfx/footprints/dratini.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/dratini.png
Binary files differ
diff --git a/gfx/footprints/drowzee.png b/gfx/footprints/drowzee.png
new file mode 100644
index 000000000..520c5c097
--- /dev/null
+++ b/gfx/footprints/drowzee.png
Binary files differ
diff --git a/gfx/footprints/dugtrio.png b/gfx/footprints/dugtrio.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/dugtrio.png
Binary files differ
diff --git a/gfx/footprints/dunsparce.png b/gfx/footprints/dunsparce.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/dunsparce.png
Binary files differ
diff --git a/gfx/footprints/eevee.png b/gfx/footprints/eevee.png
new file mode 100644
index 000000000..bbadfec86
--- /dev/null
+++ b/gfx/footprints/eevee.png
Binary files differ
diff --git a/gfx/footprints/ekans.png b/gfx/footprints/ekans.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/ekans.png
Binary files differ
diff --git a/gfx/footprints/electabuzz.png b/gfx/footprints/electabuzz.png
new file mode 100644
index 000000000..d3c3d898e
--- /dev/null
+++ b/gfx/footprints/electabuzz.png
Binary files differ
diff --git a/gfx/footprints/electrode.png b/gfx/footprints/electrode.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/electrode.png
Binary files differ
diff --git a/gfx/footprints/elekid.png b/gfx/footprints/elekid.png
new file mode 100644
index 000000000..93fa55c34
--- /dev/null
+++ b/gfx/footprints/elekid.png
Binary files differ
diff --git a/gfx/footprints/entei.png b/gfx/footprints/entei.png
new file mode 100644
index 000000000..71e7c03b0
--- /dev/null
+++ b/gfx/footprints/entei.png
Binary files differ
diff --git a/gfx/footprints/espeon.png b/gfx/footprints/espeon.png
new file mode 100644
index 000000000..b7e3635a8
--- /dev/null
+++ b/gfx/footprints/espeon.png
Binary files differ
diff --git a/gfx/footprints/exeggcute.png b/gfx/footprints/exeggcute.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/exeggcute.png
Binary files differ
diff --git a/gfx/footprints/exeggutor.png b/gfx/footprints/exeggutor.png
new file mode 100644
index 000000000..a4a5b1814
--- /dev/null
+++ b/gfx/footprints/exeggutor.png
Binary files differ
diff --git a/gfx/footprints/farfetch_d.png b/gfx/footprints/farfetch_d.png
new file mode 100644
index 000000000..8f2496321
--- /dev/null
+++ b/gfx/footprints/farfetch_d.png
Binary files differ
diff --git a/gfx/footprints/fearow.png b/gfx/footprints/fearow.png
new file mode 100644
index 000000000..3455e4e74
--- /dev/null
+++ b/gfx/footprints/fearow.png
Binary files differ
diff --git a/gfx/footprints/feraligatr.png b/gfx/footprints/feraligatr.png
new file mode 100644
index 000000000..fc5bdb531
--- /dev/null
+++ b/gfx/footprints/feraligatr.png
Binary files differ
diff --git a/gfx/footprints/flaaffy.png b/gfx/footprints/flaaffy.png
new file mode 100644
index 000000000..9bd890d42
--- /dev/null
+++ b/gfx/footprints/flaaffy.png
Binary files differ
diff --git a/gfx/footprints/flareon.png b/gfx/footprints/flareon.png
new file mode 100644
index 000000000..d9034b3aa
--- /dev/null
+++ b/gfx/footprints/flareon.png
Binary files differ
diff --git a/gfx/footprints/forretress.png b/gfx/footprints/forretress.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/forretress.png
Binary files differ
diff --git a/gfx/footprints/furret.png b/gfx/footprints/furret.png
new file mode 100644
index 000000000..f85575c3a
--- /dev/null
+++ b/gfx/footprints/furret.png
Binary files differ
diff --git a/gfx/footprints/gastly.png b/gfx/footprints/gastly.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/gastly.png
Binary files differ
diff --git a/gfx/footprints/gengar.png b/gfx/footprints/gengar.png
new file mode 100644
index 000000000..0d5ce04b5
--- /dev/null
+++ b/gfx/footprints/gengar.png
Binary files differ
diff --git a/gfx/footprints/geodude.png b/gfx/footprints/geodude.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/geodude.png
Binary files differ
diff --git a/gfx/footprints/girafarig.png b/gfx/footprints/girafarig.png
new file mode 100644
index 000000000..7eef77f6a
--- /dev/null
+++ b/gfx/footprints/girafarig.png
Binary files differ
diff --git a/gfx/footprints/gligar.png b/gfx/footprints/gligar.png
new file mode 100644
index 000000000..aa98dc8a2
--- /dev/null
+++ b/gfx/footprints/gligar.png
Binary files differ
diff --git a/gfx/footprints/gloom.png b/gfx/footprints/gloom.png
new file mode 100644
index 000000000..92c46ebbe
--- /dev/null
+++ b/gfx/footprints/gloom.png
Binary files differ
diff --git a/gfx/footprints/golbat.png b/gfx/footprints/golbat.png
new file mode 100644
index 000000000..0508ebb3a
--- /dev/null
+++ b/gfx/footprints/golbat.png
Binary files differ
diff --git a/gfx/footprints/goldeen.png b/gfx/footprints/goldeen.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/goldeen.png
Binary files differ
diff --git a/gfx/footprints/golduck.png b/gfx/footprints/golduck.png
new file mode 100644
index 000000000..b77789285
--- /dev/null
+++ b/gfx/footprints/golduck.png
Binary files differ
diff --git a/gfx/footprints/golem.png b/gfx/footprints/golem.png
new file mode 100644
index 000000000..59b933579
--- /dev/null
+++ b/gfx/footprints/golem.png
Binary files differ
diff --git a/gfx/footprints/granbull.png b/gfx/footprints/granbull.png
new file mode 100644
index 000000000..5d8898cc0
--- /dev/null
+++ b/gfx/footprints/granbull.png
Binary files differ
diff --git a/gfx/footprints/graveler.png b/gfx/footprints/graveler.png
new file mode 100644
index 000000000..727530a27
--- /dev/null
+++ b/gfx/footprints/graveler.png
Binary files differ
diff --git a/gfx/footprints/grimer.png b/gfx/footprints/grimer.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/grimer.png
Binary files differ
diff --git a/gfx/footprints/growlithe.png b/gfx/footprints/growlithe.png
new file mode 100644
index 000000000..4ba0fcf31
--- /dev/null
+++ b/gfx/footprints/growlithe.png
Binary files differ
diff --git a/gfx/footprints/gyarados.png b/gfx/footprints/gyarados.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/gyarados.png
Binary files differ
diff --git a/gfx/footprints/haunter.png b/gfx/footprints/haunter.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/haunter.png
Binary files differ
diff --git a/gfx/footprints/heracross.png b/gfx/footprints/heracross.png
new file mode 100644
index 000000000..da5ab54cc
--- /dev/null
+++ b/gfx/footprints/heracross.png
Binary files differ
diff --git a/gfx/footprints/hitmonchan.png b/gfx/footprints/hitmonchan.png
new file mode 100644
index 000000000..dc0b22596
--- /dev/null
+++ b/gfx/footprints/hitmonchan.png
Binary files differ
diff --git a/gfx/footprints/hitmonlee.png b/gfx/footprints/hitmonlee.png
new file mode 100644
index 000000000..7755da90c
--- /dev/null
+++ b/gfx/footprints/hitmonlee.png
Binary files differ
diff --git a/gfx/footprints/hitmontop.png b/gfx/footprints/hitmontop.png
new file mode 100644
index 000000000..829b09825
--- /dev/null
+++ b/gfx/footprints/hitmontop.png
Binary files differ
diff --git a/gfx/footprints/ho_oh.png b/gfx/footprints/ho_oh.png
new file mode 100644
index 000000000..2fb93ff53
--- /dev/null
+++ b/gfx/footprints/ho_oh.png
Binary files differ
diff --git a/gfx/footprints/hoothoot.png b/gfx/footprints/hoothoot.png
new file mode 100644
index 000000000..87db1850d
--- /dev/null
+++ b/gfx/footprints/hoothoot.png
Binary files differ
diff --git a/gfx/footprints/hoppip.png b/gfx/footprints/hoppip.png
new file mode 100644
index 000000000..78f6b1972
--- /dev/null
+++ b/gfx/footprints/hoppip.png
Binary files differ
diff --git a/gfx/footprints/horsea.png b/gfx/footprints/horsea.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/horsea.png
Binary files differ
diff --git a/gfx/footprints/houndoom.png b/gfx/footprints/houndoom.png
new file mode 100644
index 000000000..753704267
--- /dev/null
+++ b/gfx/footprints/houndoom.png
Binary files differ
diff --git a/gfx/footprints/houndour.png b/gfx/footprints/houndour.png
new file mode 100644
index 000000000..87e83fc95
--- /dev/null
+++ b/gfx/footprints/houndour.png
Binary files differ
diff --git a/gfx/footprints/hypno.png b/gfx/footprints/hypno.png
new file mode 100644
index 000000000..83d91925b
--- /dev/null
+++ b/gfx/footprints/hypno.png
Binary files differ
diff --git a/gfx/footprints/igglybuff.png b/gfx/footprints/igglybuff.png
new file mode 100644
index 000000000..2ed592eb9
--- /dev/null
+++ b/gfx/footprints/igglybuff.png
Binary files differ
diff --git a/gfx/footprints/ivysaur.png b/gfx/footprints/ivysaur.png
new file mode 100644
index 000000000..b129e2b86
--- /dev/null
+++ b/gfx/footprints/ivysaur.png
Binary files differ
diff --git a/gfx/footprints/jigglypuff.png b/gfx/footprints/jigglypuff.png
new file mode 100644
index 000000000..1243b9e89
--- /dev/null
+++ b/gfx/footprints/jigglypuff.png
Binary files differ
diff --git a/gfx/footprints/jolteon.png b/gfx/footprints/jolteon.png
new file mode 100644
index 000000000..0e5f5d25f
--- /dev/null
+++ b/gfx/footprints/jolteon.png
Binary files differ
diff --git a/gfx/footprints/jumpluff.png b/gfx/footprints/jumpluff.png
new file mode 100644
index 000000000..99cd35bb6
--- /dev/null
+++ b/gfx/footprints/jumpluff.png
Binary files differ
diff --git a/gfx/footprints/jynx.png b/gfx/footprints/jynx.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/jynx.png
Binary files differ
diff --git a/gfx/footprints/kabuto.png b/gfx/footprints/kabuto.png
new file mode 100644
index 000000000..5c1ce6088
--- /dev/null
+++ b/gfx/footprints/kabuto.png
Binary files differ
diff --git a/gfx/footprints/kabutops.png b/gfx/footprints/kabutops.png
new file mode 100644
index 000000000..1b0e4bb49
--- /dev/null
+++ b/gfx/footprints/kabutops.png
Binary files differ
diff --git a/gfx/footprints/kadabra.png b/gfx/footprints/kadabra.png
new file mode 100644
index 000000000..df06c2af5
--- /dev/null
+++ b/gfx/footprints/kadabra.png
Binary files differ
diff --git a/gfx/footprints/kakuna.png b/gfx/footprints/kakuna.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/kakuna.png
Binary files differ
diff --git a/gfx/footprints/kangaskhan.png b/gfx/footprints/kangaskhan.png
new file mode 100644
index 000000000..e028ffc4a
--- /dev/null
+++ b/gfx/footprints/kangaskhan.png
Binary files differ
diff --git a/gfx/footprints/kingdra.png b/gfx/footprints/kingdra.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/kingdra.png
Binary files differ
diff --git a/gfx/footprints/kingler.png b/gfx/footprints/kingler.png
new file mode 100644
index 000000000..f1ea38733
--- /dev/null
+++ b/gfx/footprints/kingler.png
Binary files differ
diff --git a/gfx/footprints/koffing.png b/gfx/footprints/koffing.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/koffing.png
Binary files differ
diff --git a/gfx/footprints/krabby.png b/gfx/footprints/krabby.png
new file mode 100644
index 000000000..909a4aebd
--- /dev/null
+++ b/gfx/footprints/krabby.png
Binary files differ
diff --git a/gfx/footprints/lanturn.png b/gfx/footprints/lanturn.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/lanturn.png
Binary files differ
diff --git a/gfx/footprints/lapras.png b/gfx/footprints/lapras.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/lapras.png
Binary files differ
diff --git a/gfx/footprints/larvitar.png b/gfx/footprints/larvitar.png
new file mode 100644
index 000000000..e7aac1a36
--- /dev/null
+++ b/gfx/footprints/larvitar.png
Binary files differ
diff --git a/gfx/footprints/ledian.png b/gfx/footprints/ledian.png
new file mode 100644
index 000000000..e83227cad
--- /dev/null
+++ b/gfx/footprints/ledian.png
Binary files differ
diff --git a/gfx/footprints/ledyba.png b/gfx/footprints/ledyba.png
new file mode 100644
index 000000000..ef0b1e190
--- /dev/null
+++ b/gfx/footprints/ledyba.png
Binary files differ
diff --git a/gfx/footprints/lickitung.png b/gfx/footprints/lickitung.png
new file mode 100644
index 000000000..b10b714e9
--- /dev/null
+++ b/gfx/footprints/lickitung.png
Binary files differ
diff --git a/gfx/footprints/lugia.png b/gfx/footprints/lugia.png
new file mode 100644
index 000000000..57f46c610
--- /dev/null
+++ b/gfx/footprints/lugia.png
Binary files differ
diff --git a/gfx/footprints/machamp.png b/gfx/footprints/machamp.png
new file mode 100644
index 000000000..c35c25521
--- /dev/null
+++ b/gfx/footprints/machamp.png
Binary files differ
diff --git a/gfx/footprints/machoke.png b/gfx/footprints/machoke.png
new file mode 100644
index 000000000..5d4160381
--- /dev/null
+++ b/gfx/footprints/machoke.png
Binary files differ
diff --git a/gfx/footprints/machop.png b/gfx/footprints/machop.png
new file mode 100644
index 000000000..dfb8ab2cc
--- /dev/null
+++ b/gfx/footprints/machop.png
Binary files differ
diff --git a/gfx/footprints/magby.png b/gfx/footprints/magby.png
new file mode 100644
index 000000000..4dbfc84dc
--- /dev/null
+++ b/gfx/footprints/magby.png
Binary files differ
diff --git a/gfx/footprints/magcargo.png b/gfx/footprints/magcargo.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/magcargo.png
Binary files differ
diff --git a/gfx/footprints/magikarp.png b/gfx/footprints/magikarp.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/magikarp.png
Binary files differ
diff --git a/gfx/footprints/magmar.png b/gfx/footprints/magmar.png
new file mode 100644
index 000000000..38ecbfe91
--- /dev/null
+++ b/gfx/footprints/magmar.png
Binary files differ
diff --git a/gfx/footprints/magnemite.png b/gfx/footprints/magnemite.png
new file mode 100644
index 000000000..9ad57f7bc
--- /dev/null
+++ b/gfx/footprints/magnemite.png
Binary files differ
diff --git a/gfx/footprints/magneton.png b/gfx/footprints/magneton.png
new file mode 100644
index 000000000..35a07ae26
--- /dev/null
+++ b/gfx/footprints/magneton.png
Binary files differ
diff --git a/gfx/footprints/mankey.png b/gfx/footprints/mankey.png
new file mode 100644
index 000000000..2a17ddb62
--- /dev/null
+++ b/gfx/footprints/mankey.png
Binary files differ
diff --git a/gfx/footprints/mantine.png b/gfx/footprints/mantine.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/mantine.png
Binary files differ
diff --git a/gfx/footprints/mareep.png b/gfx/footprints/mareep.png
new file mode 100644
index 000000000..54a71364e
--- /dev/null
+++ b/gfx/footprints/mareep.png
Binary files differ
diff --git a/gfx/footprints/marill.png b/gfx/footprints/marill.png
new file mode 100644
index 000000000..3cc7143c8
--- /dev/null
+++ b/gfx/footprints/marill.png
Binary files differ
diff --git a/gfx/footprints/marowak.png b/gfx/footprints/marowak.png
new file mode 100644
index 000000000..777ea5bc4
--- /dev/null
+++ b/gfx/footprints/marowak.png
Binary files differ
diff --git a/gfx/footprints/meganium.png b/gfx/footprints/meganium.png
new file mode 100644
index 000000000..b986bade0
--- /dev/null
+++ b/gfx/footprints/meganium.png
Binary files differ
diff --git a/gfx/footprints/meowth.png b/gfx/footprints/meowth.png
new file mode 100644
index 000000000..b7d2a6d13
--- /dev/null
+++ b/gfx/footprints/meowth.png
Binary files differ
diff --git a/gfx/footprints/metapod.png b/gfx/footprints/metapod.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/metapod.png
Binary files differ
diff --git a/gfx/footprints/mew.png b/gfx/footprints/mew.png
new file mode 100644
index 000000000..61cdd1792
--- /dev/null
+++ b/gfx/footprints/mew.png
Binary files differ
diff --git a/gfx/footprints/mewtwo.png b/gfx/footprints/mewtwo.png
new file mode 100644
index 000000000..7fb3a226b
--- /dev/null
+++ b/gfx/footprints/mewtwo.png
Binary files differ
diff --git a/gfx/footprints/miltank.png b/gfx/footprints/miltank.png
new file mode 100644
index 000000000..d53ccbb40
--- /dev/null
+++ b/gfx/footprints/miltank.png
Binary files differ
diff --git a/gfx/footprints/misdreavus.png b/gfx/footprints/misdreavus.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/misdreavus.png
Binary files differ
diff --git a/gfx/footprints/moltres.png b/gfx/footprints/moltres.png
new file mode 100644
index 000000000..39ed64cf1
--- /dev/null
+++ b/gfx/footprints/moltres.png
Binary files differ
diff --git a/gfx/footprints/mr__mime.png b/gfx/footprints/mr__mime.png
new file mode 100644
index 000000000..bf44c9289
--- /dev/null
+++ b/gfx/footprints/mr__mime.png
Binary files differ
diff --git a/gfx/footprints/muk.png b/gfx/footprints/muk.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/muk.png
Binary files differ
diff --git a/gfx/footprints/murkrow.png b/gfx/footprints/murkrow.png
new file mode 100644
index 000000000..5a7fe5349
--- /dev/null
+++ b/gfx/footprints/murkrow.png
Binary files differ
diff --git a/gfx/footprints/natu.png b/gfx/footprints/natu.png
new file mode 100644
index 000000000..6c13c4900
--- /dev/null
+++ b/gfx/footprints/natu.png
Binary files differ
diff --git a/gfx/footprints/nidoking.png b/gfx/footprints/nidoking.png
new file mode 100644
index 000000000..97df9e973
--- /dev/null
+++ b/gfx/footprints/nidoking.png
Binary files differ
diff --git a/gfx/footprints/nidoqueen.png b/gfx/footprints/nidoqueen.png
new file mode 100644
index 000000000..74a5b58e7
--- /dev/null
+++ b/gfx/footprints/nidoqueen.png
Binary files differ
diff --git a/gfx/footprints/nidoran_f.png b/gfx/footprints/nidoran_f.png
new file mode 100644
index 000000000..fa71c3a62
--- /dev/null
+++ b/gfx/footprints/nidoran_f.png
Binary files differ
diff --git a/gfx/footprints/nidoran_m.png b/gfx/footprints/nidoran_m.png
new file mode 100644
index 000000000..b450ca278
--- /dev/null
+++ b/gfx/footprints/nidoran_m.png
Binary files differ
diff --git a/gfx/footprints/nidorina.png b/gfx/footprints/nidorina.png
new file mode 100644
index 000000000..9462913c9
--- /dev/null
+++ b/gfx/footprints/nidorina.png
Binary files differ
diff --git a/gfx/footprints/nidorino.png b/gfx/footprints/nidorino.png
new file mode 100644
index 000000000..098975112
--- /dev/null
+++ b/gfx/footprints/nidorino.png
Binary files differ
diff --git a/gfx/footprints/ninetales.png b/gfx/footprints/ninetales.png
new file mode 100644
index 000000000..490abf1bc
--- /dev/null
+++ b/gfx/footprints/ninetales.png
Binary files differ
diff --git a/gfx/footprints/noctowl.png b/gfx/footprints/noctowl.png
new file mode 100644
index 000000000..1b1c73663
--- /dev/null
+++ b/gfx/footprints/noctowl.png
Binary files differ
diff --git a/gfx/footprints/octillery.png b/gfx/footprints/octillery.png
new file mode 100644
index 000000000..60b295143
--- /dev/null
+++ b/gfx/footprints/octillery.png
Binary files differ
diff --git a/gfx/footprints/oddish.png b/gfx/footprints/oddish.png
new file mode 100644
index 000000000..3fe77ff11
--- /dev/null
+++ b/gfx/footprints/oddish.png
Binary files differ
diff --git a/gfx/footprints/omanyte.png b/gfx/footprints/omanyte.png
new file mode 100644
index 000000000..507566533
--- /dev/null
+++ b/gfx/footprints/omanyte.png
Binary files differ
diff --git a/gfx/footprints/omastar.png b/gfx/footprints/omastar.png
new file mode 100644
index 000000000..9ed237899
--- /dev/null
+++ b/gfx/footprints/omastar.png
Binary files differ
diff --git a/gfx/footprints/onix.png b/gfx/footprints/onix.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/onix.png
Binary files differ
diff --git a/gfx/footprints/paras.png b/gfx/footprints/paras.png
new file mode 100644
index 000000000..fe62a2247
--- /dev/null
+++ b/gfx/footprints/paras.png
Binary files differ
diff --git a/gfx/footprints/parasect.png b/gfx/footprints/parasect.png
new file mode 100644
index 000000000..ab4d41817
--- /dev/null
+++ b/gfx/footprints/parasect.png
Binary files differ
diff --git a/gfx/footprints/persian.png b/gfx/footprints/persian.png
new file mode 100644
index 000000000..3c784095d
--- /dev/null
+++ b/gfx/footprints/persian.png
Binary files differ
diff --git a/gfx/footprints/phanpy.png b/gfx/footprints/phanpy.png
new file mode 100644
index 000000000..d02f9bea8
--- /dev/null
+++ b/gfx/footprints/phanpy.png
Binary files differ
diff --git a/gfx/footprints/pichu.png b/gfx/footprints/pichu.png
new file mode 100644
index 000000000..6bd8949a1
--- /dev/null
+++ b/gfx/footprints/pichu.png
Binary files differ
diff --git a/gfx/footprints/pidgeot.png b/gfx/footprints/pidgeot.png
new file mode 100644
index 000000000..048fb2351
--- /dev/null
+++ b/gfx/footprints/pidgeot.png
Binary files differ
diff --git a/gfx/footprints/pidgeotto.png b/gfx/footprints/pidgeotto.png
new file mode 100644
index 000000000..e19ede73b
--- /dev/null
+++ b/gfx/footprints/pidgeotto.png
Binary files differ
diff --git a/gfx/footprints/pidgey.png b/gfx/footprints/pidgey.png
new file mode 100644
index 000000000..d537175cc
--- /dev/null
+++ b/gfx/footprints/pidgey.png
Binary files differ
diff --git a/gfx/footprints/pikachu.png b/gfx/footprints/pikachu.png
new file mode 100644
index 000000000..ccdc99d56
--- /dev/null
+++ b/gfx/footprints/pikachu.png
Binary files differ
diff --git a/gfx/footprints/piloswine.png b/gfx/footprints/piloswine.png
new file mode 100644
index 000000000..1c18ee26d
--- /dev/null
+++ b/gfx/footprints/piloswine.png
Binary files differ
diff --git a/gfx/footprints/pineco.png b/gfx/footprints/pineco.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/pineco.png
Binary files differ
diff --git a/gfx/footprints/pinsir.png b/gfx/footprints/pinsir.png
new file mode 100644
index 000000000..510560a43
--- /dev/null
+++ b/gfx/footprints/pinsir.png
Binary files differ
diff --git a/gfx/footprints/politoed.png b/gfx/footprints/politoed.png
new file mode 100644
index 000000000..5bfe32d29
--- /dev/null
+++ b/gfx/footprints/politoed.png
Binary files differ
diff --git a/gfx/footprints/poliwag.png b/gfx/footprints/poliwag.png
new file mode 100644
index 000000000..3fd799d39
--- /dev/null
+++ b/gfx/footprints/poliwag.png
Binary files differ
diff --git a/gfx/footprints/poliwhirl.png b/gfx/footprints/poliwhirl.png
new file mode 100644
index 000000000..ef695b185
--- /dev/null
+++ b/gfx/footprints/poliwhirl.png
Binary files differ
diff --git a/gfx/footprints/poliwrath.png b/gfx/footprints/poliwrath.png
new file mode 100644
index 000000000..ae8376edb
--- /dev/null
+++ b/gfx/footprints/poliwrath.png
Binary files differ
diff --git a/gfx/footprints/ponyta.png b/gfx/footprints/ponyta.png
new file mode 100644
index 000000000..62100917d
--- /dev/null
+++ b/gfx/footprints/ponyta.png
Binary files differ
diff --git a/gfx/footprints/porygon.png b/gfx/footprints/porygon.png
new file mode 100644
index 000000000..c459ab366
--- /dev/null
+++ b/gfx/footprints/porygon.png
Binary files differ
diff --git a/gfx/footprints/porygon2.png b/gfx/footprints/porygon2.png
new file mode 100644
index 000000000..c8697f643
--- /dev/null
+++ b/gfx/footprints/porygon2.png
Binary files differ
diff --git a/gfx/footprints/primeape.png b/gfx/footprints/primeape.png
new file mode 100644
index 000000000..203696a8b
--- /dev/null
+++ b/gfx/footprints/primeape.png
Binary files differ
diff --git a/gfx/footprints/psyduck.png b/gfx/footprints/psyduck.png
new file mode 100644
index 000000000..ad9fd266a
--- /dev/null
+++ b/gfx/footprints/psyduck.png
Binary files differ
diff --git a/gfx/footprints/pupitar.png b/gfx/footprints/pupitar.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/pupitar.png
Binary files differ
diff --git a/gfx/footprints/quagsire.png b/gfx/footprints/quagsire.png
new file mode 100644
index 000000000..c51db3ae1
--- /dev/null
+++ b/gfx/footprints/quagsire.png
Binary files differ
diff --git a/gfx/footprints/quilava.png b/gfx/footprints/quilava.png
new file mode 100644
index 000000000..f0542351c
--- /dev/null
+++ b/gfx/footprints/quilava.png
Binary files differ
diff --git a/gfx/footprints/qwilfish.png b/gfx/footprints/qwilfish.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/qwilfish.png
Binary files differ
diff --git a/gfx/footprints/raichu.png b/gfx/footprints/raichu.png
new file mode 100644
index 000000000..e1c30dc13
--- /dev/null
+++ b/gfx/footprints/raichu.png
Binary files differ
diff --git a/gfx/footprints/raikou.png b/gfx/footprints/raikou.png
new file mode 100644
index 000000000..1ae18e3a8
--- /dev/null
+++ b/gfx/footprints/raikou.png
Binary files differ
diff --git a/gfx/footprints/rapidash.png b/gfx/footprints/rapidash.png
new file mode 100644
index 000000000..af16ca8d7
--- /dev/null
+++ b/gfx/footprints/rapidash.png
Binary files differ
diff --git a/gfx/footprints/raticate.png b/gfx/footprints/raticate.png
new file mode 100644
index 000000000..5001433f0
--- /dev/null
+++ b/gfx/footprints/raticate.png
Binary files differ
diff --git a/gfx/footprints/rattata.png b/gfx/footprints/rattata.png
new file mode 100644
index 000000000..3d93e01ec
--- /dev/null
+++ b/gfx/footprints/rattata.png
Binary files differ
diff --git a/gfx/footprints/remoraid.png b/gfx/footprints/remoraid.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/remoraid.png
Binary files differ
diff --git a/gfx/footprints/rhydon.png b/gfx/footprints/rhydon.png
new file mode 100644
index 000000000..3fa9aeadd
--- /dev/null
+++ b/gfx/footprints/rhydon.png
Binary files differ
diff --git a/gfx/footprints/rhyhorn.png b/gfx/footprints/rhyhorn.png
new file mode 100644
index 000000000..28e8ab2f5
--- /dev/null
+++ b/gfx/footprints/rhyhorn.png
Binary files differ
diff --git a/gfx/footprints/sandshrew.png b/gfx/footprints/sandshrew.png
new file mode 100644
index 000000000..ab500e049
--- /dev/null
+++ b/gfx/footprints/sandshrew.png
Binary files differ
diff --git a/gfx/footprints/sandslash.png b/gfx/footprints/sandslash.png
new file mode 100644
index 000000000..d14212990
--- /dev/null
+++ b/gfx/footprints/sandslash.png
Binary files differ
diff --git a/gfx/footprints/scizor.png b/gfx/footprints/scizor.png
new file mode 100644
index 000000000..bcfbeb496
--- /dev/null
+++ b/gfx/footprints/scizor.png
Binary files differ
diff --git a/gfx/footprints/scyther.png b/gfx/footprints/scyther.png
new file mode 100644
index 000000000..3ad9cccaa
--- /dev/null
+++ b/gfx/footprints/scyther.png
Binary files differ
diff --git a/gfx/footprints/seadra.png b/gfx/footprints/seadra.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/seadra.png
Binary files differ
diff --git a/gfx/footprints/seaking.png b/gfx/footprints/seaking.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/seaking.png
Binary files differ
diff --git a/gfx/footprints/seel.png b/gfx/footprints/seel.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/seel.png
Binary files differ
diff --git a/gfx/footprints/sentret.png b/gfx/footprints/sentret.png
new file mode 100644
index 000000000..78f6b1972
--- /dev/null
+++ b/gfx/footprints/sentret.png
Binary files differ
diff --git a/gfx/footprints/shellder.png b/gfx/footprints/shellder.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/shellder.png
Binary files differ
diff --git a/gfx/footprints/shuckle.png b/gfx/footprints/shuckle.png
new file mode 100644
index 000000000..3ca5c6e14
--- /dev/null
+++ b/gfx/footprints/shuckle.png
Binary files differ
diff --git a/gfx/footprints/skarmory.png b/gfx/footprints/skarmory.png
new file mode 100644
index 000000000..2361dac97
--- /dev/null
+++ b/gfx/footprints/skarmory.png
Binary files differ
diff --git a/gfx/footprints/skiploom.png b/gfx/footprints/skiploom.png
new file mode 100644
index 000000000..8847d8bab
--- /dev/null
+++ b/gfx/footprints/skiploom.png
Binary files differ
diff --git a/gfx/footprints/slowbro.png b/gfx/footprints/slowbro.png
new file mode 100644
index 000000000..4dd81bd5e
--- /dev/null
+++ b/gfx/footprints/slowbro.png
Binary files differ
diff --git a/gfx/footprints/slowking.png b/gfx/footprints/slowking.png
new file mode 100644
index 000000000..b47847340
--- /dev/null
+++ b/gfx/footprints/slowking.png
Binary files differ
diff --git a/gfx/footprints/slowpoke.png b/gfx/footprints/slowpoke.png
new file mode 100644
index 000000000..063ba156f
--- /dev/null
+++ b/gfx/footprints/slowpoke.png
Binary files differ
diff --git a/gfx/footprints/slugma.png b/gfx/footprints/slugma.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/slugma.png
Binary files differ
diff --git a/gfx/footprints/smeargle.png b/gfx/footprints/smeargle.png
new file mode 100644
index 000000000..8217223cb
--- /dev/null
+++ b/gfx/footprints/smeargle.png
Binary files differ
diff --git a/gfx/footprints/smoochum.png b/gfx/footprints/smoochum.png
new file mode 100644
index 000000000..89bdab460
--- /dev/null
+++ b/gfx/footprints/smoochum.png
Binary files differ
diff --git a/gfx/footprints/sneasel.png b/gfx/footprints/sneasel.png
new file mode 100644
index 000000000..ebbeda3d8
--- /dev/null
+++ b/gfx/footprints/sneasel.png
Binary files differ
diff --git a/gfx/footprints/snorlax.png b/gfx/footprints/snorlax.png
new file mode 100644
index 000000000..d362449c0
--- /dev/null
+++ b/gfx/footprints/snorlax.png
Binary files differ
diff --git a/gfx/footprints/snubbull.png b/gfx/footprints/snubbull.png
new file mode 100644
index 000000000..eb55d1239
--- /dev/null
+++ b/gfx/footprints/snubbull.png
Binary files differ
diff --git a/gfx/footprints/spearow.png b/gfx/footprints/spearow.png
new file mode 100644
index 000000000..d537175cc
--- /dev/null
+++ b/gfx/footprints/spearow.png
Binary files differ
diff --git a/gfx/footprints/spinarak.png b/gfx/footprints/spinarak.png
new file mode 100644
index 000000000..5c1ce6088
--- /dev/null
+++ b/gfx/footprints/spinarak.png
Binary files differ
diff --git a/gfx/footprints/squirtle.png b/gfx/footprints/squirtle.png
new file mode 100644
index 000000000..654e971d3
--- /dev/null
+++ b/gfx/footprints/squirtle.png
Binary files differ
diff --git a/gfx/footprints/stantler.png b/gfx/footprints/stantler.png
new file mode 100644
index 000000000..20b544a2e
--- /dev/null
+++ b/gfx/footprints/stantler.png
Binary files differ
diff --git a/gfx/footprints/starmie.png b/gfx/footprints/starmie.png
new file mode 100644
index 000000000..5b8307bd1
--- /dev/null
+++ b/gfx/footprints/starmie.png
Binary files differ
diff --git a/gfx/footprints/staryu.png b/gfx/footprints/staryu.png
new file mode 100644
index 000000000..5b8307bd1
--- /dev/null
+++ b/gfx/footprints/staryu.png
Binary files differ
diff --git a/gfx/footprints/steelix.png b/gfx/footprints/steelix.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/steelix.png
Binary files differ
diff --git a/gfx/footprints/sudowoodo.png b/gfx/footprints/sudowoodo.png
new file mode 100644
index 000000000..6f2d8f553
--- /dev/null
+++ b/gfx/footprints/sudowoodo.png
Binary files differ
diff --git a/gfx/footprints/suicune.png b/gfx/footprints/suicune.png
new file mode 100644
index 000000000..f029e5787
--- /dev/null
+++ b/gfx/footprints/suicune.png
Binary files differ
diff --git a/gfx/footprints/sunflora.png b/gfx/footprints/sunflora.png
new file mode 100644
index 000000000..cc0ab570d
--- /dev/null
+++ b/gfx/footprints/sunflora.png
Binary files differ
diff --git a/gfx/footprints/sunkern.png b/gfx/footprints/sunkern.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/sunkern.png
Binary files differ
diff --git a/gfx/footprints/swinub.png b/gfx/footprints/swinub.png
new file mode 100644
index 000000000..4bd88087d
--- /dev/null
+++ b/gfx/footprints/swinub.png
Binary files differ
diff --git a/gfx/footprints/tangela.png b/gfx/footprints/tangela.png
new file mode 100644
index 000000000..8f6a1341b
--- /dev/null
+++ b/gfx/footprints/tangela.png
Binary files differ
diff --git a/gfx/footprints/tauros.png b/gfx/footprints/tauros.png
new file mode 100644
index 000000000..dccae7ddf
--- /dev/null
+++ b/gfx/footprints/tauros.png
Binary files differ
diff --git a/gfx/footprints/teddiursa.png b/gfx/footprints/teddiursa.png
new file mode 100644
index 000000000..de44b50f4
--- /dev/null
+++ b/gfx/footprints/teddiursa.png
Binary files differ
diff --git a/gfx/footprints/tentacool.png b/gfx/footprints/tentacool.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/tentacool.png
Binary files differ
diff --git a/gfx/footprints/tentacruel.png b/gfx/footprints/tentacruel.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/tentacruel.png
Binary files differ
diff --git a/gfx/footprints/togepi.png b/gfx/footprints/togepi.png
new file mode 100644
index 000000000..ee53a8b81
--- /dev/null
+++ b/gfx/footprints/togepi.png
Binary files differ
diff --git a/gfx/footprints/togetic.png b/gfx/footprints/togetic.png
new file mode 100644
index 000000000..b881e515c
--- /dev/null
+++ b/gfx/footprints/togetic.png
Binary files differ
diff --git a/gfx/footprints/totodile.png b/gfx/footprints/totodile.png
new file mode 100644
index 000000000..a876107f8
--- /dev/null
+++ b/gfx/footprints/totodile.png
Binary files differ
diff --git a/gfx/footprints/typhlosion.png b/gfx/footprints/typhlosion.png
new file mode 100644
index 000000000..423efb601
--- /dev/null
+++ b/gfx/footprints/typhlosion.png
Binary files differ
diff --git a/gfx/footprints/tyranitar.png b/gfx/footprints/tyranitar.png
new file mode 100644
index 000000000..350b098ac
--- /dev/null
+++ b/gfx/footprints/tyranitar.png
Binary files differ
diff --git a/gfx/footprints/tyrogue.png b/gfx/footprints/tyrogue.png
new file mode 100644
index 000000000..6ba1cb782
--- /dev/null
+++ b/gfx/footprints/tyrogue.png
Binary files differ
diff --git a/gfx/footprints/umbreon.png b/gfx/footprints/umbreon.png
new file mode 100644
index 000000000..126adb620
--- /dev/null
+++ b/gfx/footprints/umbreon.png
Binary files differ
diff --git a/gfx/footprints/unown.png b/gfx/footprints/unown.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/unown.png
Binary files differ
diff --git a/gfx/footprints/ursaring.png b/gfx/footprints/ursaring.png
new file mode 100644
index 000000000..d6aa57b8b
--- /dev/null
+++ b/gfx/footprints/ursaring.png
Binary files differ
diff --git a/gfx/footprints/vaporeon.png b/gfx/footprints/vaporeon.png
new file mode 100644
index 000000000..2825cb920
--- /dev/null
+++ b/gfx/footprints/vaporeon.png
Binary files differ
diff --git a/gfx/footprints/venomoth.png b/gfx/footprints/venomoth.png
new file mode 100644
index 000000000..5c1ce6088
--- /dev/null
+++ b/gfx/footprints/venomoth.png
Binary files differ
diff --git a/gfx/footprints/venonat.png b/gfx/footprints/venonat.png
new file mode 100644
index 000000000..02b49a9c7
--- /dev/null
+++ b/gfx/footprints/venonat.png
Binary files differ
diff --git a/gfx/footprints/venusaur.png b/gfx/footprints/venusaur.png
new file mode 100644
index 000000000..5f4ff9620
--- /dev/null
+++ b/gfx/footprints/venusaur.png
Binary files differ
diff --git a/gfx/footprints/victreebel.png b/gfx/footprints/victreebel.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/victreebel.png
Binary files differ
diff --git a/gfx/footprints/vileplume.png b/gfx/footprints/vileplume.png
new file mode 100644
index 000000000..d1f324b06
--- /dev/null
+++ b/gfx/footprints/vileplume.png
Binary files differ
diff --git a/gfx/footprints/voltorb.png b/gfx/footprints/voltorb.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/voltorb.png
Binary files differ
diff --git a/gfx/footprints/vulpix.png b/gfx/footprints/vulpix.png
new file mode 100644
index 000000000..cba244b14
--- /dev/null
+++ b/gfx/footprints/vulpix.png
Binary files differ
diff --git a/gfx/footprints/wartortle.png b/gfx/footprints/wartortle.png
new file mode 100644
index 000000000..e6e9c2b8d
--- /dev/null
+++ b/gfx/footprints/wartortle.png
Binary files differ
diff --git a/gfx/footprints/weedle.png b/gfx/footprints/weedle.png
new file mode 100644
index 000000000..5b8307bd1
--- /dev/null
+++ b/gfx/footprints/weedle.png
Binary files differ
diff --git a/gfx/footprints/weepinbell.png b/gfx/footprints/weepinbell.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/weepinbell.png
Binary files differ
diff --git a/gfx/footprints/weezing.png b/gfx/footprints/weezing.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/weezing.png
Binary files differ
diff --git a/gfx/footprints/wigglytuff.png b/gfx/footprints/wigglytuff.png
new file mode 100644
index 000000000..fc40cd4fa
--- /dev/null
+++ b/gfx/footprints/wigglytuff.png
Binary files differ
diff --git a/gfx/footprints/wobbuffet.png b/gfx/footprints/wobbuffet.png
new file mode 100644
index 000000000..74dc52199
--- /dev/null
+++ b/gfx/footprints/wobbuffet.png
Binary files differ
diff --git a/gfx/footprints/wooper.png b/gfx/footprints/wooper.png
new file mode 100644
index 000000000..61e9d1874
--- /dev/null
+++ b/gfx/footprints/wooper.png
Binary files differ
diff --git a/gfx/footprints/xatu.png b/gfx/footprints/xatu.png
new file mode 100644
index 000000000..bfc6c4e79
--- /dev/null
+++ b/gfx/footprints/xatu.png
Binary files differ
diff --git a/gfx/footprints/yanma.png b/gfx/footprints/yanma.png
new file mode 100644
index 000000000..9cfce89c6
--- /dev/null
+++ b/gfx/footprints/yanma.png
Binary files differ
diff --git a/gfx/footprints/zapdos.png b/gfx/footprints/zapdos.png
new file mode 100644
index 000000000..58af64346
--- /dev/null
+++ b/gfx/footprints/zapdos.png
Binary files differ
diff --git a/gfx/footprints/zubat.png b/gfx/footprints/zubat.png
new file mode 100644
index 000000000..2402b2c1b
--- /dev/null
+++ b/gfx/footprints/zubat.png
Binary files differ
diff --git a/gfx/icon_pointers.asm b/gfx/icon_pointers.asm
new file mode 100644
index 000000000..bfe07abb6
--- /dev/null
+++ b/gfx/icon_pointers.asm
@@ -0,0 +1,41 @@
+IconPointers:
+; entries correspond to ICON_* constants
+ dw NullIcon
+ dw PoliwagIcon
+ dw JigglypuffIcon
+ dw DiglettIcon
+ dw PikachuIcon
+ dw StaryuIcon
+ dw FishIcon
+ dw BirdIcon
+ dw MonsterIcon
+ dw ClefairyIcon
+ dw OddishIcon
+ dw BugIcon
+ dw GhostIcon
+ dw LaprasIcon
+ dw HumanshapeIcon
+ dw FoxIcon
+ dw EquineIcon
+ dw ShellIcon
+ dw BlobIcon
+ dw SerpentIcon
+ dw VoltorbIcon
+ dw SquirtleIcon
+ dw BulbasaurIcon
+ dw CharmanderIcon
+ dw CaterpillarIcon
+ dw UnownIcon
+ dw GeodudeIcon
+ dw FighterIcon
+ dw EggIcon
+ dw JellyfishIcon
+ dw MothIcon
+ dw BatIcon
+ dw SnorlaxIcon
+ dw HoOhIcon
+ dw LugiaIcon
+ dw GyaradosIcon
+ dw SlowpokeIcon
+ dw SudowoodoIcon
+ dw BigmonIcon
diff --git a/gfx/icons.asm b/gfx/icons.asm
new file mode 100644
index 000000000..5b28a99cd
--- /dev/null
+++ b/gfx/icons.asm
@@ -0,0 +1,40 @@
+Icons:
+NullIcon:
+PoliwagIcon: INCBIN "gfx/icon/poliwag.2bpp" ; 0x8ec0d
+JigglypuffIcon: INCBIN "gfx/icon/jigglypuff.2bpp" ; 0x8ec8d
+DiglettIcon: INCBIN "gfx/icon/diglett.2bpp" ; 0x8ed0d
+PikachuIcon: INCBIN "gfx/icon/pikachu.2bpp" ; 0x8ed8d
+StaryuIcon: INCBIN "gfx/icon/staryu.2bpp" ; 0x8ee0d
+FishIcon: INCBIN "gfx/icon/fish.2bpp" ; 0x8ee8d
+BirdIcon: INCBIN "gfx/icon/bird.2bpp" ; 0x8ef0d
+MonsterIcon: INCBIN "gfx/icon/monster.2bpp" ; 0x8ef8d
+ClefairyIcon: INCBIN "gfx/icon/clefairy.2bpp" ; 0x8f00d
+OddishIcon: INCBIN "gfx/icon/oddish.2bpp" ; 0x8f08d
+BugIcon: INCBIN "gfx/icon/bug.2bpp" ; 0x8f10d
+GhostIcon: INCBIN "gfx/icon/ghost.2bpp" ; 0x8f18d
+LaprasIcon: INCBIN "gfx/icon/lapras.2bpp" ; 0x8f20d
+HumanshapeIcon: INCBIN "gfx/icon/humanshape.2bpp" ; 0x8f28d
+FoxIcon: INCBIN "gfx/icon/fox.2bpp" ; 0x8f30d
+EquineIcon: INCBIN "gfx/icon/equine.2bpp" ; 0x8f38d
+ShellIcon: INCBIN "gfx/icon/shell.2bpp" ; 0x8f40d
+BlobIcon: INCBIN "gfx/icon/blob.2bpp" ; 0x8f48d
+SerpentIcon: INCBIN "gfx/icon/serpent.2bpp" ; 0x8f50d
+VoltorbIcon: INCBIN "gfx/icon/voltorb.2bpp" ; 0x8f58d
+SquirtleIcon: INCBIN "gfx/icon/squirtle.2bpp" ; 0x8f60d
+BulbasaurIcon: INCBIN "gfx/icon/bulbasaur.2bpp" ; 0x8f68d
+CharmanderIcon: INCBIN "gfx/icon/charmander.2bpp" ; 0x8f70d
+CaterpillarIcon: INCBIN "gfx/icon/caterpillar.2bpp" ; 0x8f78d
+UnownIcon: INCBIN "gfx/icon/unown.2bpp" ; 0x8f80d
+GeodudeIcon: INCBIN "gfx/icon/geodude.2bpp" ; 0x8f88d
+FighterIcon: INCBIN "gfx/icon/fighter.2bpp" ; 0x8f90d
+EggIcon: INCBIN "gfx/icon/egg.2bpp" ; 0x8f98d
+JellyfishIcon: INCBIN "gfx/icon/jellyfish.2bpp" ; 0x8fa0d
+MothIcon: INCBIN "gfx/icon/moth.2bpp" ; 0x8fa8d
+BatIcon: INCBIN "gfx/icon/bat.2bpp" ; 0x8fb0d
+SnorlaxIcon: INCBIN "gfx/icon/snorlax.2bpp" ; 0x8fb8d
+HoOhIcon: INCBIN "gfx/icon/ho_oh.2bpp" ; 0x8fc0d
+LugiaIcon: INCBIN "gfx/icon/lugia.2bpp" ; 0x8fc8d
+GyaradosIcon: INCBIN "gfx/icon/gyarados.2bpp" ; 0x8fd0d
+SlowpokeIcon: INCBIN "gfx/icon/slowpoke.2bpp" ; 0x8fd8d
+SudowoodoIcon: INCBIN "gfx/icon/sudowoodo.2bpp" ; 0x8fe0d
+BigmonIcon: INCBIN "gfx/icon/bigmon.2bpp" ; 0x8fe8d
diff --git a/gfx/load_pics.asm b/gfx/load_pics.asm
index 78e65dc81..838fc5656 100755
--- a/gfx/load_pics.asm
+++ b/gfx/load_pics.asm
@@ -48,7 +48,7 @@ GetUnownLetter: ; 51040
ld [UnownLetter], a
ret
-GetFrontpic: ; 51077
+GetMonFrontpic: ; 51077
ld a, [CurPartySpecies]
ld [CurSpecies], a
call IsAPokemon
@@ -60,7 +60,7 @@ GetFrontpic: ; 51077
ld [rSVBK], a
ret
-FrontpicPredef: ; 5108b
+GetAnimatedFrontpicPredef: ; 5108b
ld a, [CurPartySpecies]
ld [CurSpecies], a
call IsAPokemon
@@ -83,14 +83,14 @@ _GetFrontpic: ; 510a5
ld b, a
push bc
call GetFrontpicPointer
- ld a, BANK(wDecompressScratch)
+ ld a, BANK(wDecompressEnemyFrontpic)
ld [rSVBK], a
ld a, b
- ld de, wDecompressScratch + $800
+ ld de, wDecompressEnemyFrontpic
call FarDecompress
pop bc
ld hl, wDecompressScratch
- ld de, wDecompressScratch + $800
+ ld de, wDecompressEnemyFrontpic
call PadFrontpic
pop hl
push hl
@@ -149,15 +149,15 @@ GetAnimatedFrontpic: ; 51103
call GetFarWRAMByte
pop hl
and $f
- ld de, w6_d800 + 5 * 5 tiles
+ ld de, wDecompressEnemyFrontpic + 5 * 5 tiles
ld c, 5 * 5
cp 5
jr z, .got_dims
- ld de, w6_d800 + 6 * 6 tiles
+ ld de, wDecompressEnemyFrontpic + 6 * 6 tiles
ld c, 6 * 6
cp 6
jr z, .got_dims
- ld de, w6_d800 + 7 * 7 tiles
+ ld de, wDecompressEnemyFrontpic + 7 * 7 tiles
ld c, 7 * 7
.got_dims
@@ -195,7 +195,7 @@ LoadFrontpicTiles: ; 5114f
jr nz, .loop
ret
-GetBackpic: ; 5116c
+GetMonBackpic: ; 5116c
ld a, [CurPartySpecies]
call IsAPokemon
ret c
diff --git a/gfx/mail.asm b/gfx/mail.asm
index d4fde366e..c8770468d 100755
--- a/gfx/mail.asm
+++ b/gfx/mail.asm
@@ -16,7 +16,7 @@ ReadAnyMail: ; b9237
push de
ld a, BANK(sPartyMail)
call GetSRAMBank
- callba IsMailEuropean
+ farcall IsMailEuropean
call CloseSRAM
ld a, c
ld de, StandardEnglishFont
@@ -37,7 +37,7 @@ ReadAnyMail: ; b9237
call WaitBGMap
ld a, [Buffer3]
ld e, a
- callba LoadMailPalettes
+ farcall LoadMailPalettes
call SetPalettes
xor a
ld [hJoyPressed], a
@@ -59,7 +59,7 @@ ReadAnyMail: ; b9237
.pressed_start
ld a, [wJumptableIndex]
push af
- callab PrintMail ; printer
+ callfar PrintMail ; printer
pop af
ld [wJumptableIndex], a
jr .loop
diff --git a/gfx/misc/footprints.png b/gfx/misc/footprints.png
deleted file mode 100644
index b1e350436..000000000
--- a/gfx/misc/footprints.png
+++ /dev/null
Binary files differ
diff --git a/gfx/unknown/171db1.png b/gfx/mobile/ascii_font.png
index 1c32d2bda..1c32d2bda 100644
--- a/gfx/unknown/171db1.png
+++ b/gfx/mobile/ascii_font.png
Binary files differ
diff --git a/gfx/unknown/0488cb.png b/gfx/mobile/down_arrow.png
index 9eaaadd2d..9eaaadd2d 100644
--- a/gfx/unknown/0488cb.png
+++ b/gfx/mobile/down_arrow.png
Binary files differ
diff --git a/gfx/unknown/1715a4.2bpp.lz.3eaf004f b/gfx/mobile/electro_ball.2bpp.lz.3eaf004f
index b4fabff15..b4fabff15 100644
--- a/gfx/unknown/1715a4.2bpp.lz.3eaf004f
+++ b/gfx/mobile/electro_ball.2bpp.lz.3eaf004f
Binary files differ
diff --git a/gfx/unknown/1715a4.png b/gfx/mobile/electro_ball.png
index 3e1c0bb46..3e1c0bb46 100644
--- a/gfx/unknown/1715a4.png
+++ b/gfx/mobile/electro_ball.png
Binary files differ
diff --git a/gfx/unknown/1715a4_nonmatching.png b/gfx/mobile/electro_ball_nonmatching.png
index 44ea166ef..44ea166ef 100755
--- a/gfx/unknown/1715a4_nonmatching.png
+++ b/gfx/mobile/electro_ball_nonmatching.png
Binary files differ
diff --git a/gfx/misc/mobile_adapter.png b/gfx/mobile/mobile_adapter.png
index fa5965e92..fa5965e92 100644
--- a/gfx/misc/mobile_adapter.png
+++ b/gfx/mobile/mobile_adapter.png
Binary files differ
diff --git a/gfx/unknown/16c79b.tilemap b/gfx/mobile/mobile_splash.attrmap
index 86666b3fd..86666b3fd 100644
--- a/gfx/unknown/16c79b.tilemap
+++ b/gfx/mobile/mobile_splash.attrmap
Binary files differ
diff --git a/gfx/unknown/16c173.png b/gfx/mobile/mobile_splash.png
index d54b68cdf..d54b68cdf 100755
--- a/gfx/unknown/16c173.png
+++ b/gfx/mobile/mobile_splash.png
Binary files differ
diff --git a/gfx/unknown/16c633.tilemap b/gfx/mobile/mobile_splash.tilemap
index 81818e531..81818e531 100644
--- a/gfx/unknown/16c633.tilemap
+++ b/gfx/mobile/mobile_splash.tilemap
Binary files differ
diff --git a/gfx/unknown/170d16.2bpp.lz.5d6d2ad4 b/gfx/mobile/pichu_animated.2bpp.lz.5d6d2ad4
index 4d50c6bcf..4d50c6bcf 100644
--- a/gfx/unknown/170d16.2bpp.lz.5d6d2ad4
+++ b/gfx/mobile/pichu_animated.2bpp.lz.5d6d2ad4
Binary files differ
diff --git a/gfx/unknown/170d16.png b/gfx/mobile/pichu_animated.png
index 2832fdb6a..2832fdb6a 100644
--- a/gfx/unknown/170d16.png
+++ b/gfx/mobile/pichu_animated.png
Binary files differ
diff --git a/gfx/unknown/0488c3.png b/gfx/mobile/up_arrow.png
index e8b43de99..e8b43de99 100644
--- a/gfx/unknown/0488c3.png
+++ b/gfx/mobile/up_arrow.png
Binary files differ
diff --git a/gfx/misc/mystery_gift.png b/gfx/mystery_gift/mystery_gift.png
index 0fd458dec..0fd458dec 100644
--- a/gfx/misc/mystery_gift.png
+++ b/gfx/mystery_gift/mystery_gift.png
Binary files differ
diff --git a/gfx/misc/mystery_gift_jp.png b/gfx/mystery_gift/mystery_gift_jp.png
index 692cf8732..692cf8732 100644
--- a/gfx/misc/mystery_gift_jp.png
+++ b/gfx/mystery_gift/mystery_gift_jp.png
Binary files differ
diff --git a/gfx/unknown/011cb7.png b/gfx/namingscreen/border.png
index 36935ab82..36935ab82 100644
--- a/gfx/unknown/011cb7.png
+++ b/gfx/namingscreen/border.png
Binary files differ
diff --git a/gfx/unknown/011cc7.png b/gfx/namingscreen/cursor.png
index a0429a3ad..a0429a3ad 100644
--- a/gfx/unknown/011cc7.png
+++ b/gfx/namingscreen/cursor.png
Binary files differ
diff --git a/gfx/unknown/011e5d.png b/gfx/namingscreen/end.png
index c8e132b92..c8e132b92 100644
--- a/gfx/unknown/011e5d.png
+++ b/gfx/namingscreen/end.png
Binary files differ
diff --git a/gfx/unknown/011e65.png b/gfx/namingscreen/middle_line.png
index a34e82bf1..a34e82bf1 100644
--- a/gfx/unknown/011e65.png
+++ b/gfx/namingscreen/middle_line.png
Binary files differ
diff --git a/gfx/unknown/011e6d.png b/gfx/namingscreen/underline.png
index e92cd4d6a..e92cd4d6a 100644
--- a/gfx/unknown/011e6d.png
+++ b/gfx/namingscreen/underline.png
Binary files differ
diff --git a/gfx/misc/boulderdust.png b/gfx/overworld/boulder_dust.png
index 9acb11c1b..9acb11c1b 100644
--- a/gfx/misc/boulderdust.png
+++ b/gfx/overworld/boulder_dust.png
Binary files differ
diff --git a/gfx/special/celebi/1.png b/gfx/overworld/celebi/1.png
index bd07ec8c4..bd07ec8c4 100644
--- a/gfx/special/celebi/1.png
+++ b/gfx/overworld/celebi/1.png
Binary files differ
diff --git a/gfx/special/celebi/2.png b/gfx/overworld/celebi/2.png
index c83a8788a..c83a8788a 100644
--- a/gfx/special/celebi/2.png
+++ b/gfx/overworld/celebi/2.png
Binary files differ
diff --git a/gfx/special/celebi/3.png b/gfx/overworld/celebi/3.png
index 6233fc56d..6233fc56d 100644
--- a/gfx/special/celebi/3.png
+++ b/gfx/overworld/celebi/3.png
Binary files differ
diff --git a/gfx/special/celebi/4.png b/gfx/overworld/celebi/4.png
index 6233fc56d..6233fc56d 100644
--- a/gfx/special/celebi/4.png
+++ b/gfx/overworld/celebi/4.png
Binary files differ
diff --git a/gfx/misc/cut_grass.png b/gfx/overworld/cut_grass.png
index b10e0cf8c..b10e0cf8c 100644
--- a/gfx/misc/cut_grass.png
+++ b/gfx/overworld/cut_grass.png
Binary files differ
diff --git a/gfx/misc/cut_tree.png b/gfx/overworld/cut_tree.png
index c1f1bc97d..c1f1bc97d 100644
--- a/gfx/misc/cut_tree.png
+++ b/gfx/overworld/cut_tree.png
Binary files differ
diff --git a/gfx/misc/fishing2.png b/gfx/overworld/fishing_rod.png
index 32d277269..32d277269 100644
--- a/gfx/misc/fishing2.png
+++ b/gfx/overworld/fishing_rod.png
Binary files differ
diff --git a/gfx/misc/fishing4.png b/gfx/overworld/grass_rustle.png
index 0b2d73e2c..0b2d73e2c 100644
--- a/gfx/misc/fishing4.png
+++ b/gfx/overworld/grass_rustle.png
Binary files differ
diff --git a/gfx/unknown/0123fc.png b/gfx/overworld/heal_machine.png
index dbf513487..dbf513487 100644
--- a/gfx/unknown/0123fc.png
+++ b/gfx/overworld/heal_machine.png
Binary files differ
diff --git a/gfx/misc/shadow.png b/gfx/overworld/shadow.png
index ba3dab5be..ba3dab5be 100644
--- a/gfx/misc/shadow.png
+++ b/gfx/overworld/shadow.png
Binary files differ
diff --git a/gfx/overworld/sprite_headers.asm b/gfx/overworld/sprite_headers.asm
deleted file mode 100644
index 095d7594b..000000000
--- a/gfx/overworld/sprite_headers.asm
+++ /dev/null
@@ -1,419 +0,0 @@
-; Format:
-; Address
-; Length, Bank
-; Type, Palette
-
-sprite_header: MACRO
-; pointer, length, type, palette
- dw \1
- db \2 * 4 tiles, BANK(\1)
- db \3, \4
-ENDM
-
-ChrisSprite: ; 14736
- sprite_header ChrisSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 1473c
-
-ChrisBikeSprite: ; 1473c
- sprite_header ChrisBikeSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 14742
-
-GameboyKidSprite: ; 14742
- sprite_header GameboyKidSpriteGFX, 3, STANDING_SPRITE, PAL_OW_GREEN
-; 14748
-
-SilverSprite: ; 14748
- sprite_header SilverSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 1474e
-
-OakSprite: ; 1474e
- sprite_header OakSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 14754
-
-RedSprite: ; 14754
- sprite_header RedSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 1475a
-
-BlueSprite: ; 1475a
- sprite_header BlueSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 14760
-
-BillSprite: ; 14760
- sprite_header BillSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 14766
-
-ElderSprite: ; 14766
- sprite_header ElderSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 1476c
-
-JanineSprite: ; 1476c
- sprite_header JanineSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 14772
-
-KurtSprite: ; 14772
- sprite_header KurtSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 14778
-
-MomSprite: ; 14778
- sprite_header MomSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 1477e
-
-BlaineSprite: ; 1477e
- sprite_header BlaineSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 14784
-
-RedsMomSprite: ; 14784
- sprite_header RedsMomSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 1478a
-
-DaisySprite: ; 1478a
- sprite_header DaisySpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 14790
-
-ElmSprite: ; 14790
- sprite_header ElmSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 14796
-
-WillSprite: ; 14796
- sprite_header WillSpriteGFX, 3, STANDING_SPRITE, PAL_OW_RED
-; 1479c
-
-FalknerSprite: ; 1479c
- sprite_header FalknerSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 147a2
-
-WhitneySprite: ; 147a2
- sprite_header WhitneySpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 147a8
-
-BugsySprite: ; 147a8
- sprite_header BugsySpriteGFX, 3, WALKING_SPRITE, PAL_OW_GREEN
-; 147ae
-
-MortySprite: ; 147ae
- sprite_header MortySpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 147b4
-
-ChuckSprite: ; 147b4
- sprite_header ChuckSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 147ba
-
-JasmineSprite: ; 147ba
- sprite_header JasmineSpriteGFX, 3, WALKING_SPRITE, PAL_OW_GREEN
-; 147c0
-
-PryceSprite: ; 147c0
- sprite_header PryceSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 147c6
-
-ClairSprite: ; 147c6
- sprite_header ClairSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 147cc
-
-BrockSprite: ; 147cc
- sprite_header BrockSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 147d2
-
-KarenSprite: ; 147d2
- sprite_header KarenSpriteGFX, 3, STANDING_SPRITE, PAL_OW_BLUE
-; 147d8
-
-BrunoSprite: ; 147d8
- sprite_header BrunoSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 147de
-
-MistySprite: ; 147de
- sprite_header MistySpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 147e4
-
-LanceSprite: ; 147e4
- sprite_header LanceSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 147ea
-
-SurgeSprite: ; 147ea
- sprite_header SurgeSpriteGFX, 3, WALKING_SPRITE, PAL_OW_GREEN
-; 147f0
-
-ErikaSprite: ; 147f0
- sprite_header ErikaSpriteGFX, 3, WALKING_SPRITE, PAL_OW_GREEN
-; 147f6
-
-KogaSprite: ; 147f6
- sprite_header KogaSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 147fc
-
-SabrinaSprite: ; 147fc
- sprite_header SabrinaSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 14802
-
-CooltrainerMSprite: ; 14802
- sprite_header CooltrainerMSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 14808
-
-CooltrainerFSprite: ; 14808
- sprite_header CooltrainerFSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 1480e
-
-BugCatcherSprite: ; 1480e
- sprite_header BugCatcherSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 14814
-
-TwinSprite: ; 14814
- sprite_header TwinSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 1481a
-
-YoungsterSprite: ; 1481a
- sprite_header YoungsterSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 14820
-
-LassSprite: ; 14820
- sprite_header LassSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 14826
-
-TeacherSprite: ; 14826
- sprite_header TeacherSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 1482c
-
-BuenaSprite: ; 1482c
- sprite_header BuenaSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 14832
-
-SuperNerdSprite: ; 14832
- sprite_header SuperNerdSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 14838
-
-RockerSprite: ; 14838
- sprite_header RockerSpriteGFX, 3, WALKING_SPRITE, PAL_OW_GREEN
-; 1483e
-
-PokefanMSprite: ; 1483e
- sprite_header PokefanMSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 14844
-
-PokefanFSprite: ; 14844
- sprite_header PokefanFSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 1484a
-
-GrampsSprite: ; 1484a
- sprite_header GrampsSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 14850
-
-GrannySprite: ; 14850
- sprite_header GrannySpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 14856
-
-SwimmerGuySprite: ; 14856
- sprite_header SwimmerGuySpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 1485c
-
-SwimmerGirlSprite: ; 1485c
- sprite_header SwimmerGirlSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 14862
-
-BigSnorlaxSprite: ; 14862
- sprite_header BigSnorlaxSpriteGFX, 3, STANDING_SPRITE, PAL_OW_BLUE
-; 14868
-
-SurfingPikachuSprite: ; 14868
- sprite_header SurfingPikachuSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 1486e
-
-RocketSprite: ; 1486e
- sprite_header RocketSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 14874
-
-RocketGirlSprite: ; 14874
- sprite_header RocketGirlSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 1487a
-
-NurseSprite: ; 1487a
- sprite_header NurseSpriteGFX, 3, STANDING_SPRITE, PAL_OW_RED
-; 14880
-
-LinkReceptionistSprite: ; 14880
- sprite_header LinkReceptionistSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 14886
-
-ClerkSprite: ; 14886
- sprite_header ClerkSpriteGFX, 3, WALKING_SPRITE, PAL_OW_GREEN
-; 1488c
-
-FisherSprite: ; 1488c
- sprite_header FisherSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 14892
-
-FishingGuruSprite: ; 14892
- sprite_header FishingGuruSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 14898
-
-ScientistSprite: ; 14898
- sprite_header ScientistSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 1489e
-
-KimonoGirlSprite: ; 1489e
- sprite_header KimonoGirlSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 148a4
-
-SageSprite: ; 148a4
- sprite_header SageSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 148aa
-
-UnusedGuySprite: ; 148aa
- sprite_header UnusedGuySpriteGFX, 3, STANDING_SPRITE, PAL_OW_RED
-; 148b0
-
-GentlemanSprite: ; 148b0
- sprite_header GentlemanSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 148b6
-
-BlackBeltSprite: ; 148b6
- sprite_header BlackBeltSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 148bc
-
-ReceptionistSprite: ; 148bc
- sprite_header ReceptionistSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 148c2
-
-OfficerSprite: ; 148c2
- sprite_header OfficerSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 148c8
-
-CalSprite: ; 148c8
- sprite_header CalSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 148ce
-
-SlowpokeSprite: ; 148ce
- sprite_header SlowpokeSpriteGFX, 1, STILL_SPRITE, PAL_OW_RED
-; 148d4
-
-CaptainSprite: ; 148d4
- sprite_header CaptainSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 148da
-
-BigLaprasSprite: ; 148da
- sprite_header BigLaprasSpriteGFX, 3, STANDING_SPRITE, PAL_OW_BLUE
-; 148e0
-
-GymGuySprite: ; 148e0
- sprite_header GymGuySpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 148e6
-
-SailorSprite: ; 148e6
- sprite_header SailorSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 148ec
-
-BikerSprite: ; 148ec
- sprite_header BikerSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN
-; 148f2
-
-PharmacistSprite: ; 148f2
- sprite_header PharmacistSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 148f8
-
-MonsterSprite: ; 148f8
- sprite_header MonsterSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 148fe
-
-FairySprite: ; 148fe
- sprite_header FairySpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 14904
-
-BirdSprite: ; 14904
- sprite_header BirdSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 1490a
-
-DragonSprite: ; 1490a
- sprite_header DragonSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED
-; 14910
-
-BigOnixSprite: ; 14910
- sprite_header BigOnixSpriteGFX, 3, STANDING_SPRITE, PAL_OW_BROWN
-; 14916
-
-N64Sprite: ; 14916
- sprite_header N64SpriteGFX, 1, STILL_SPRITE, PAL_OW_BROWN
-; 1491c
-
-SudowoodoSprite: ; 1491c
- sprite_header SudowoodoSpriteGFX, 3, STANDING_SPRITE, PAL_OW_GREEN
-; 14922
-
-SurfSprite: ; 14922
- sprite_header SurfSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 14928
-
-PokeBallSprite: ; 14928
- sprite_header PokeBallSpriteGFX, 1, STILL_SPRITE, PAL_OW_RED
-; 1492e
-
-PokedexSprite: ; 1492e
- sprite_header PokedexSpriteGFX, 1, STILL_SPRITE, PAL_OW_BROWN
-; 14934
-
-PaperSprite: ; 14934
- sprite_header PaperSpriteGFX, 1, STILL_SPRITE, PAL_OW_BLUE
-; 1493a
-
-VirtualBoySprite: ; 1493a
- sprite_header VirtualBoySpriteGFX, 1, STILL_SPRITE, PAL_OW_RED
-; 14940
-
-OldLinkReceptionistSprite: ; 14940
- sprite_header OldLinkReceptionistSpriteGFX, 3, STANDING_SPRITE, PAL_OW_RED
-; 14946
-
-RockSprite: ; 14946
- sprite_header RockSpriteGFX, 1, STILL_SPRITE, PAL_OW_ROCK
-; 1494c
-
-BoulderSprite: ; 1494c
- sprite_header BoulderSpriteGFX, 1, STILL_SPRITE, PAL_OW_ROCK
-; 14952
-
-SnesSprite: ; 14952
- sprite_header SnesSpriteGFX, 1, STILL_SPRITE, PAL_OW_BLUE
-; 14958
-
-FamicomSprite: ; 14958
- sprite_header FamicomSpriteGFX, 1, STILL_SPRITE, PAL_OW_RED
-; 1495e
-
-FruitTreeSprite: ; 1495e
- sprite_header FruitTreeSpriteGFX, 1, STILL_SPRITE, PAL_OW_TREE
-; 14964
-
-GoldTrophySprite: ; 14964
- sprite_header GoldTrophySpriteGFX, 1, STILL_SPRITE, PAL_OW_BROWN
-; 1496a
-
-SilverTrophySprite: ; 1496a
- sprite_header SilverTrophySpriteGFX, 1, STILL_SPRITE, PAL_OW_SILVER
-; 14970
-
-KrisSprite: ; 14970
- sprite_header KrisSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 14976
-
-KrisBikeSprite: ; 14976
- sprite_header KrisBikeSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE
-; 1497c
-
-KurtOutsideSprite: ; 1497c
- sprite_header KurtOutsideSpriteGFX, 3, STANDING_SPRITE, PAL_OW_BROWN
-; 14982
-
-SuicuneSprite: ; 14982
- sprite_header SuicuneSpriteGFX, 1, STILL_SPRITE, PAL_OW_BLUE
-; 14988
-
-EnteiSprite: ; 14988
- sprite_header EnteiSpriteGFX, 1, STILL_SPRITE, PAL_OW_RED
-; 1498e
-
-RaikouSprite: ; 1498e
- sprite_header RaikouSpriteGFX, 1, STILL_SPRITE, PAL_OW_RED
-; 14994
-
-StandingYoungsterSprite: ; 14994
- sprite_header StandingYoungsterSpriteGFX, 3, STANDING_SPRITE, PAL_OW_BLUE
-; 1499a
diff --git a/gfx/overworld/sprites_1.asm b/gfx/overworld/sprites_1.asm
deleted file mode 100644
index 640ac6ccc..000000000
--- a/gfx/overworld/sprites_1.asm
+++ /dev/null
@@ -1,44 +0,0 @@
-ChrisSpriteGFX: INCBIN "gfx/overworld/000.2bpp" ; c0000
-ChrisBikeSpriteGFX: INCBIN "gfx/overworld/001.2bpp" ; c0180
-GameboyKidSpriteGFX: INCBIN "gfx/overworld/002.2bpp" ; c0300
-SilverSpriteGFX: INCBIN "gfx/overworld/003.2bpp" ; c03c0
-OakSpriteGFX: INCBIN "gfx/overworld/004.2bpp" ; c0540
-RedSpriteGFX: INCBIN "gfx/overworld/005.2bpp" ; c06c0
-BlueSpriteGFX: INCBIN "gfx/overworld/006.2bpp" ; c0840
-BillSpriteGFX: INCBIN "gfx/overworld/007.2bpp" ; c09c0
-ElderSpriteGFX: INCBIN "gfx/overworld/008.2bpp" ; c0b40
-JanineSpriteGFX: INCBIN "gfx/overworld/009.2bpp" ; c0cc0
-KurtSpriteGFX: INCBIN "gfx/overworld/010.2bpp" ; c0e40
-MomSpriteGFX: INCBIN "gfx/overworld/011.2bpp" ; c0fc0
-BlaineSpriteGFX: INCBIN "gfx/overworld/012.2bpp" ; c1140
-RedsMomSpriteGFX: INCBIN "gfx/overworld/013.2bpp" ; c12c0
-DaisySpriteGFX: INCBIN "gfx/overworld/014.2bpp" ; c1440
-ElmSpriteGFX: INCBIN "gfx/overworld/015.2bpp" ; c15c0
-WillSpriteGFX: INCBIN "gfx/overworld/016.2bpp" ; c1740
-FalknerSpriteGFX: INCBIN "gfx/overworld/017.2bpp" ; c1800
-WhitneySpriteGFX: INCBIN "gfx/overworld/018.2bpp" ; c1980
-BugsySpriteGFX: INCBIN "gfx/overworld/019.2bpp" ; c1b00
-MortySpriteGFX: INCBIN "gfx/overworld/020.2bpp" ; c1c80
-ChuckSpriteGFX: INCBIN "gfx/overworld/021.2bpp" ; c1e00
-JasmineSpriteGFX: INCBIN "gfx/overworld/022.2bpp" ; c1f80
-PryceSpriteGFX: INCBIN "gfx/overworld/023.2bpp" ; c2100
-ClairSpriteGFX: INCBIN "gfx/overworld/024.2bpp" ; c2280
-BrockSpriteGFX: INCBIN "gfx/overworld/025.2bpp" ; c2400
-KarenSpriteGFX: INCBIN "gfx/overworld/026.2bpp" ; c2580
-BrunoSpriteGFX: INCBIN "gfx/overworld/027.2bpp" ; c2640
-MistySpriteGFX: INCBIN "gfx/overworld/028.2bpp" ; c27c0
-LanceSpriteGFX: INCBIN "gfx/overworld/029.2bpp" ; c2940
-SurgeSpriteGFX: INCBIN "gfx/overworld/030.2bpp" ; c2ac0
-ErikaSpriteGFX: INCBIN "gfx/overworld/031.2bpp" ; c2c40
-KogaSpriteGFX: INCBIN "gfx/overworld/032.2bpp" ; c2dc0
-SabrinaSpriteGFX: INCBIN "gfx/overworld/033.2bpp" ; c2f40
-CooltrainerMSpriteGFX: INCBIN "gfx/overworld/034.2bpp" ; c30c0
-CooltrainerFSpriteGFX: INCBIN "gfx/overworld/035.2bpp" ; c3240
-BugCatcherSpriteGFX: INCBIN "gfx/overworld/036.2bpp" ; c33c0
-TwinSpriteGFX: INCBIN "gfx/overworld/037.2bpp" ; c3540
-YoungsterSpriteGFX: INCBIN "gfx/overworld/038.2bpp" ; c36c0
-LassSpriteGFX: INCBIN "gfx/overworld/039.2bpp" ; c3840
-TeacherSpriteGFX: INCBIN "gfx/overworld/040.2bpp" ; c39c0
-BuenaSpriteGFX: INCBIN "gfx/overworld/041.2bpp" ; c3b40
-SuperNerdSpriteGFX: INCBIN "gfx/overworld/042.2bpp" ; c3cc0
-RockerSpriteGFX: INCBIN "gfx/overworld/043.2bpp" ; c3e40
diff --git a/gfx/overworld/sprites_2.asm b/gfx/overworld/sprites_2.asm
deleted file mode 100644
index 20060d0c1..000000000
--- a/gfx/overworld/sprites_2.asm
+++ /dev/null
@@ -1,58 +0,0 @@
-PokefanMSpriteGFX: INCBIN "gfx/overworld/044.2bpp" ; c4000
-PokefanFSpriteGFX: INCBIN "gfx/overworld/045.2bpp" ; c4180
-GrampsSpriteGFX: INCBIN "gfx/overworld/046.2bpp" ; c4300
-GrannySpriteGFX: INCBIN "gfx/overworld/047.2bpp" ; c4480
-SwimmerGuySpriteGFX: INCBIN "gfx/overworld/048.2bpp" ; c4600
-SwimmerGirlSpriteGFX: INCBIN "gfx/overworld/049.2bpp" ; c4780
-BigSnorlaxSpriteGFX: INCBIN "gfx/overworld/050.2bpp" ; c4900
-SurfingPikachuSpriteGFX: INCBIN "gfx/overworld/051.2bpp" ; c4980
-RocketSpriteGFX: INCBIN "gfx/overworld/052.2bpp" ; c4b00
-RocketGirlSpriteGFX: INCBIN "gfx/overworld/053.2bpp" ; c4c80
-NurseSpriteGFX: INCBIN "gfx/overworld/054.2bpp" ; c4e00
-LinkReceptionistSpriteGFX: INCBIN "gfx/overworld/055.2bpp" ; c4ec0
-ClerkSpriteGFX: INCBIN "gfx/overworld/056.2bpp" ; c5040
-FisherSpriteGFX: INCBIN "gfx/overworld/057.2bpp" ; c51c0
-FishingGuruSpriteGFX: INCBIN "gfx/overworld/058.2bpp" ; c5340
-ScientistSpriteGFX: INCBIN "gfx/overworld/059.2bpp" ; c54c0
-KimonoGirlSpriteGFX: INCBIN "gfx/overworld/060.2bpp" ; c5640
-SageSpriteGFX: INCBIN "gfx/overworld/061.2bpp" ; c57c0
-UnusedGuySpriteGFX: INCBIN "gfx/overworld/062.2bpp" ; c5940
-GentlemanSpriteGFX: INCBIN "gfx/overworld/063.2bpp" ; c5ac0
-BlackBeltSpriteGFX: INCBIN "gfx/overworld/064.2bpp" ; c5c40
-ReceptionistSpriteGFX: INCBIN "gfx/overworld/065.2bpp" ; c5dc0
-OfficerSpriteGFX: INCBIN "gfx/overworld/066.2bpp" ; c5f40
-CalSpriteGFX: INCBIN "gfx/overworld/067.2bpp" ; c60c0
-SlowpokeSpriteGFX: INCBIN "gfx/overworld/068.2bpp" ; c6240
-CaptainSpriteGFX: INCBIN "gfx/overworld/069.2bpp" ; c6280
-BigLaprasSpriteGFX: INCBIN "gfx/overworld/070.2bpp" ; c6400
-GymGuySpriteGFX: INCBIN "gfx/overworld/071.2bpp" ; c6480
-SailorSpriteGFX: INCBIN "gfx/overworld/072.2bpp" ; c6600
-BikerSpriteGFX: INCBIN "gfx/overworld/073.2bpp" ; c6780
-PharmacistSpriteGFX: INCBIN "gfx/overworld/074.2bpp" ; c6900
-MonsterSpriteGFX: INCBIN "gfx/overworld/075.2bpp" ; c6a80
-FairySpriteGFX: INCBIN "gfx/overworld/076.2bpp" ; c6c00
-BirdSpriteGFX: INCBIN "gfx/overworld/077.2bpp" ; c6d80
-DragonSpriteGFX: INCBIN "gfx/overworld/078.2bpp" ; c6f00
-BigOnixSpriteGFX: INCBIN "gfx/overworld/079.2bpp" ; c7080
-N64SpriteGFX: INCBIN "gfx/overworld/080.2bpp" ; c7140
-SudowoodoSpriteGFX: INCBIN "gfx/overworld/081.2bpp" ; c7180
-SurfSpriteGFX: INCBIN "gfx/overworld/082.2bpp" ; c7200
-PokeBallSpriteGFX: INCBIN "gfx/overworld/083.2bpp" ; c7380
-PokedexSpriteGFX: INCBIN "gfx/overworld/084.2bpp" ; c7500
-PaperSpriteGFX: INCBIN "gfx/overworld/085.2bpp" ; c7680
-VirtualBoySpriteGFX: INCBIN "gfx/overworld/086.2bpp" ; c7800
-OldLinkReceptionistSpriteGFX: INCBIN "gfx/overworld/087.2bpp" ; c7840
-RockSpriteGFX: INCBIN "gfx/overworld/088.2bpp" ; c7880
-BoulderSpriteGFX: INCBIN "gfx/overworld/089.2bpp" ; c78c0
-SnesSpriteGFX: INCBIN "gfx/overworld/090.2bpp" ; c7900
-FamicomSpriteGFX: INCBIN "gfx/overworld/091.2bpp" ; c7940
-FruitTreeSpriteGFX: INCBIN "gfx/overworld/092.2bpp" ; c7980
-GoldTrophySpriteGFX: INCBIN "gfx/overworld/093.2bpp" ; c79c0
-SilverTrophySpriteGFX: INCBIN "gfx/overworld/094.2bpp" ; c7a00
-KrisSpriteGFX: INCBIN "gfx/overworld/095.2bpp" ; c7a40
-KrisBikeSpriteGFX: INCBIN "gfx/overworld/096.2bpp" ; c7bc0
-KurtOutsideSpriteGFX: INCBIN "gfx/overworld/097.2bpp" ; c7d40
-SuicuneSpriteGFX: INCBIN "gfx/overworld/098.2bpp" ; c7e00
-EnteiSpriteGFX: INCBIN "gfx/overworld/099.2bpp" ; c7e40
-RaikouSpriteGFX: INCBIN "gfx/overworld/100.2bpp" ; c7e80
-StandingYoungsterSpriteGFX: INCBIN "gfx/overworld/101.2bpp" ; c7ec0
diff --git a/gfx/overworld_font.asm b/gfx/overworld_font.asm
new file mode 100644
index 000000000..203b18fa0
--- /dev/null
+++ b/gfx/overworld_font.asm
@@ -0,0 +1,17 @@
+LoadOverworldFont:: ; 106594
+ ld de, .font
+ ld hl, VTiles1
+ lb bc, BANK(.font), $80
+ call Get2bpp
+ ld de, .space
+ ld hl, VTiles2 tile $7f
+ lb bc, BANK(.space), 1
+ call Get2bpp
+ ret
+; 1065ad
+
+.font
+INCBIN "gfx/font/overworld.2bpp"
+
+.space
+INCBIN "gfx/font/space.2bpp"
diff --git a/gfx/misc/pack.png b/gfx/pack/pack.png
index b85fc0990..b85fc0990 100644
--- a/gfx/misc/pack.png
+++ b/gfx/pack/pack.png
Binary files differ
diff --git a/gfx/misc/pack_f.png b/gfx/pack/pack_f.png
index fbe120bd1..fbe120bd1 100644
--- a/gfx/misc/pack_f.png
+++ b/gfx/pack/pack_f.png
Binary files differ
diff --git a/gfx/misc/pack_menu.png b/gfx/pack/pack_menu.png
index 52e2bcdd5..52e2bcdd5 100644
--- a/gfx/misc/pack_menu.png
+++ b/gfx/pack/pack_menu.png
Binary files differ
diff --git a/gfx/pc.2bpp.lz.2201c1aa b/gfx/pc/pc.2bpp.lz.2201c1aa
index 996cfadc9..996cfadc9 100644
--- a/gfx/pc.2bpp.lz.2201c1aa
+++ b/gfx/pc/pc.2bpp.lz.2201c1aa
Binary files differ
diff --git a/gfx/pc.png b/gfx/pc/pc.png
index ce8fed73b..ce8fed73b 100644
--- a/gfx/pc.png
+++ b/gfx/pc/pc.png
Binary files differ
diff --git a/gfx/pc_mail.png b/gfx/pc/pc_mail.png
index fd4b2892f..fd4b2892f 100644
--- a/gfx/pc_mail.png
+++ b/gfx/pc/pc_mail.png
Binary files differ
diff --git a/gfx/pics.asm b/gfx/pics.asm
index c48106e3c..026be8142 100644
--- a/gfx/pics.asm
+++ b/gfx/pics.asm
@@ -1,18 +1,22 @@
INCLUDE "includes.asm"
-; Unown pic pointers are assumed to start at the same address in a different bank.
+; PicPointers and UnownPicPointers are assumed to start at the same address,
+; but in different banks. This is enforced in pokecrystal.link.
SECTION "Pic Pointers", ROMX
-PicPointers:: INCLUDE "gfx/pics/pic_pointers.asm"
+
+INCLUDE "gfx/pics/pic_pointers.asm"
+
SECTION "Unown Pic Pointers", ROMX
-UnownPicPointers:: INCLUDE "gfx/pics/unown_pic_pointers.asm"
+
+INCLUDE "gfx/pics/unown_pic_pointers.asm"
SECTION "Trainer Pic Pointers", ROMX
-TrainerPicPointers:: INCLUDE "gfx/pics/trainer_pic_pointers.asm"
+INCLUDE "gfx/trainer_pic_pointers.asm"
SECTION "Pics 1", ROMX
diff --git a/gfx/pics/animation.asm b/gfx/pics/animation.asm
index aa32fbe94..2b93ef749 100644
--- a/gfx/pics/animation.asm
+++ b/gfx/pics/animation.asm
@@ -1,6 +1,5 @@
; Pic animation arrangement.
-
AnimateMon_Slow_Normal: ; d0000
hlcoord 12, 0
ld a, [wBattleMode]
@@ -53,23 +52,18 @@ AnimateMon_Unused: ; d003a
ret
; d0042
-
-POKEANIM: MACRO
+pokeanim: MACRO
rept _NARG
-
; Workaround for a bug where macro args can't come after the start of a symbol
if !def(\1_POKEANIM)
\1_POKEANIM equs "PokeAnim_\1_"
endc
-
db (\1_POKEANIM - PokeAnim_SetupCommands) / 2
shift
endr
-
db (PokeAnim_Finish_ - PokeAnim_SetupCommands) / 2
ENDM
-
PokeAnims: ; d0042
dw .Slow
dw .Normal
@@ -81,15 +75,15 @@ PokeAnims: ; d0042
dw .Egg1
dw .Egg2
-.Slow: POKEANIM StereoCry, Setup2, Play
-.Normal: POKEANIM StereoCry, Setup, Play
-.Menu: POKEANIM CryNoWait, Setup, Play, SetWait, Wait, Extra, Play
-.Trade: POKEANIM Extra, Play2, Extra, Play, SetWait, Wait, Cry, Setup, Play
-.Evolve: POKEANIM Extra, Play, SetWait, Wait, CryNoWait, Setup, Play
-.Hatch: POKEANIM Extra, Play, CryNoWait, Setup, Play, SetWait, Wait, Extra, Play
-.Unused: POKEANIM CryNoWait, Setup, Play, SetWait, Wait, Extra, Play
-.Egg1: POKEANIM Setup, Play
-.Egg2: POKEANIM Extra, Play
+.Slow: pokeanim StereoCry, Setup2, Play
+.Normal: pokeanim StereoCry, Setup, Play
+.Menu: pokeanim CryNoWait, Setup, Play, SetWait, Wait, Extra, Play
+.Trade: pokeanim Extra, Play2, Extra, Play, SetWait, Wait, Cry, Setup, Play
+.Evolve: pokeanim Extra, Play, SetWait, Wait, CryNoWait, Setup, Play
+.Hatch: pokeanim Extra, Play, CryNoWait, Setup, Play, SetWait, Wait, Extra, Play
+.Unused: pokeanim CryNoWait, Setup, Play, SetWait, Wait, Extra, Play
+.Egg1: pokeanim Setup, Play
+.Egg2: pokeanim Extra, Play
AnimateFrontpic: ; d008e
@@ -99,7 +93,7 @@ AnimateFrontpic: ; d008e
.loop
call SetUpPokeAnim
push af
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
pop af
jr nc, .loop
ret
@@ -288,9 +282,9 @@ PokeAnim_DeinitFrames: ; d01a9
ld a, $2
ld [rSVBK], a
call PokeAnim_PlaceGraphic
- callba HDMATransferTileMapToWRAMBank3
+ farcall HDMATransferTileMapToWRAMBank3
call PokeAnim_SetVBank0
- callba HDMATransferAttrMapToWRAMBank3
+ farcall HDMATransferAttrMapToWRAMBank3
pop af
ld [rSVBK], a
ret
@@ -887,7 +881,7 @@ PokeAnim_SetVBank1: ; d0504
xor a
ld [hBGMapMode], a
call .SetFlag
- callba HDMATransferAttrMapToWRAMBank3
+ farcall HDMATransferAttrMapToWRAMBank3
pop af
ld [rSVBK], a
ret
@@ -1127,7 +1121,7 @@ HOF_AnimateFrontpic: ; d066e Predef 49
push bc
push hl
ld de, VTiles2
- predef FrontpicPredef
+ predef GetAnimatedFrontpicPredef
pop hl
pop bc
ld d, 0
diff --git a/gfx/pics/pic_pointers.asm b/gfx/pics/pic_pointers.asm
index d8f6a157f..58631e09a 100644
--- a/gfx/pics/pic_pointers.asm
+++ b/gfx/pics/pic_pointers.asm
@@ -1,510 +1,511 @@
-
- add_pic BulbasaurFrontpic
- add_pic BulbasaurBackpic
- add_pic IvysaurFrontpic
- add_pic IvysaurBackpic
- add_pic VenusaurFrontpic
- add_pic VenusaurBackpic
- add_pic CharmanderFrontpic
- add_pic CharmanderBackpic
- add_pic CharmeleonFrontpic
- add_pic CharmeleonBackpic
- add_pic CharizardFrontpic
- add_pic CharizardBackpic
- add_pic SquirtleFrontpic
- add_pic SquirtleBackpic
- add_pic WartortleFrontpic
- add_pic WartortleBackpic
- add_pic BlastoiseFrontpic
- add_pic BlastoiseBackpic
- add_pic CaterpieFrontpic
- add_pic CaterpieBackpic
- add_pic MetapodFrontpic
- add_pic MetapodBackpic
- add_pic ButterfreeFrontpic
- add_pic ButterfreeBackpic
- add_pic WeedleFrontpic
- add_pic WeedleBackpic
- add_pic KakunaFrontpic
- add_pic KakunaBackpic
- add_pic BeedrillFrontpic
- add_pic BeedrillBackpic
- add_pic PidgeyFrontpic
- add_pic PidgeyBackpic
- add_pic PidgeottoFrontpic
- add_pic PidgeottoBackpic
- add_pic PidgeotFrontpic
- add_pic PidgeotBackpic
- add_pic RattataFrontpic
- add_pic RattataBackpic
- add_pic RaticateFrontpic
- add_pic RaticateBackpic
- add_pic SpearowFrontpic
- add_pic SpearowBackpic
- add_pic FearowFrontpic
- add_pic FearowBackpic
- add_pic EkansFrontpic
- add_pic EkansBackpic
- add_pic ArbokFrontpic
- add_pic ArbokBackpic
- add_pic PikachuFrontpic
- add_pic PikachuBackpic
- add_pic RaichuFrontpic
- add_pic RaichuBackpic
- add_pic SandshrewFrontpic
- add_pic SandshrewBackpic
- add_pic SandslashFrontpic
- add_pic SandslashBackpic
- add_pic NidoranFFrontpic
- add_pic NidoranFBackpic
- add_pic NidorinaFrontpic
- add_pic NidorinaBackpic
- add_pic NidoqueenFrontpic
- add_pic NidoqueenBackpic
- add_pic NidoranMFrontpic
- add_pic NidoranMBackpic
- add_pic NidorinoFrontpic
- add_pic NidorinoBackpic
- add_pic NidokingFrontpic
- add_pic NidokingBackpic
- add_pic ClefairyFrontpic
- add_pic ClefairyBackpic
- add_pic ClefableFrontpic
- add_pic ClefableBackpic
- add_pic VulpixFrontpic
- add_pic VulpixBackpic
- add_pic NinetalesFrontpic
- add_pic NinetalesBackpic
- add_pic JigglypuffFrontpic
- add_pic JigglypuffBackpic
- add_pic WigglytuffFrontpic
- add_pic WigglytuffBackpic
- add_pic ZubatFrontpic
- add_pic ZubatBackpic
- add_pic GolbatFrontpic
- add_pic GolbatBackpic
- add_pic OddishFrontpic
- add_pic OddishBackpic
- add_pic GloomFrontpic
- add_pic GloomBackpic
- add_pic VileplumeFrontpic
- add_pic VileplumeBackpic
- add_pic ParasFrontpic
- add_pic ParasBackpic
- add_pic ParasectFrontpic
- add_pic ParasectBackpic
- add_pic VenonatFrontpic
- add_pic VenonatBackpic
- add_pic VenomothFrontpic
- add_pic VenomothBackpic
- add_pic DiglettFrontpic
- add_pic DiglettBackpic
- add_pic DugtrioFrontpic
- add_pic DugtrioBackpic
- add_pic MeowthFrontpic
- add_pic MeowthBackpic
- add_pic PersianFrontpic
- add_pic PersianBackpic
- add_pic PsyduckFrontpic
- add_pic PsyduckBackpic
- add_pic GolduckFrontpic
- add_pic GolduckBackpic
- add_pic MankeyFrontpic
- add_pic MankeyBackpic
- add_pic PrimeapeFrontpic
- add_pic PrimeapeBackpic
- add_pic GrowlitheFrontpic
- add_pic GrowlitheBackpic
- add_pic ArcanineFrontpic
- add_pic ArcanineBackpic
- add_pic PoliwagFrontpic
- add_pic PoliwagBackpic
- add_pic PoliwhirlFrontpic
- add_pic PoliwhirlBackpic
- add_pic PoliwrathFrontpic
- add_pic PoliwrathBackpic
- add_pic AbraFrontpic
- add_pic AbraBackpic
- add_pic KadabraFrontpic
- add_pic KadabraBackpic
- add_pic AlakazamFrontpic
- add_pic AlakazamBackpic
- add_pic MachopFrontpic
- add_pic MachopBackpic
- add_pic MachokeFrontpic
- add_pic MachokeBackpic
- add_pic MachampFrontpic
- add_pic MachampBackpic
- add_pic BellsproutFrontpic
- add_pic BellsproutBackpic
- add_pic WeepinbellFrontpic
- add_pic WeepinbellBackpic
- add_pic VictreebelFrontpic
- add_pic VictreebelBackpic
- add_pic TentacoolFrontpic
- add_pic TentacoolBackpic
- add_pic TentacruelFrontpic
- add_pic TentacruelBackpic
- add_pic GeodudeFrontpic
- add_pic GeodudeBackpic
- add_pic GravelerFrontpic
- add_pic GravelerBackpic
- add_pic GolemFrontpic
- add_pic GolemBackpic
- add_pic PonytaFrontpic
- add_pic PonytaBackpic
- add_pic RapidashFrontpic
- add_pic RapidashBackpic
- add_pic SlowpokeFrontpic
- add_pic SlowpokeBackpic
- add_pic SlowbroFrontpic
- add_pic SlowbroBackpic
- add_pic MagnemiteFrontpic
- add_pic MagnemiteBackpic
- add_pic MagnetonFrontpic
- add_pic MagnetonBackpic
- add_pic FarfetchDFrontpic
- add_pic FarfetchDBackpic
- add_pic DoduoFrontpic
- add_pic DoduoBackpic
- add_pic DodrioFrontpic
- add_pic DodrioBackpic
- add_pic SeelFrontpic
- add_pic SeelBackpic
- add_pic DewgongFrontpic
- add_pic DewgongBackpic
- add_pic GrimerFrontpic
- add_pic GrimerBackpic
- add_pic MukFrontpic
- add_pic MukBackpic
- add_pic ShellderFrontpic
- add_pic ShellderBackpic
- add_pic CloysterFrontpic
- add_pic CloysterBackpic
- add_pic GastlyFrontpic
- add_pic GastlyBackpic
- add_pic HaunterFrontpic
- add_pic HaunterBackpic
- add_pic GengarFrontpic
- add_pic GengarBackpic
- add_pic OnixFrontpic
- add_pic OnixBackpic
- add_pic DrowzeeFrontpic
- add_pic DrowzeeBackpic
- add_pic HypnoFrontpic
- add_pic HypnoBackpic
- add_pic KrabbyFrontpic
- add_pic KrabbyBackpic
- add_pic KinglerFrontpic
- add_pic KinglerBackpic
- add_pic VoltorbFrontpic
- add_pic VoltorbBackpic
- add_pic ElectrodeFrontpic
- add_pic ElectrodeBackpic
- add_pic ExeggcuteFrontpic
- add_pic ExeggcuteBackpic
- add_pic ExeggutorFrontpic
- add_pic ExeggutorBackpic
- add_pic CuboneFrontpic
- add_pic CuboneBackpic
- add_pic MarowakFrontpic
- add_pic MarowakBackpic
- add_pic HitmonleeFrontpic
- add_pic HitmonleeBackpic
- add_pic HitmonchanFrontpic
- add_pic HitmonchanBackpic
- add_pic LickitungFrontpic
- add_pic LickitungBackpic
- add_pic KoffingFrontpic
- add_pic KoffingBackpic
- add_pic WeezingFrontpic
- add_pic WeezingBackpic
- add_pic RhyhornFrontpic
- add_pic RhyhornBackpic
- add_pic RhydonFrontpic
- add_pic RhydonBackpic
- add_pic ChanseyFrontpic
- add_pic ChanseyBackpic
- add_pic TangelaFrontpic
- add_pic TangelaBackpic
- add_pic KangaskhanFrontpic
- add_pic KangaskhanBackpic
- add_pic HorseaFrontpic
- add_pic HorseaBackpic
- add_pic SeadraFrontpic
- add_pic SeadraBackpic
- add_pic GoldeenFrontpic
- add_pic GoldeenBackpic
- add_pic SeakingFrontpic
- add_pic SeakingBackpic
- add_pic StaryuFrontpic
- add_pic StaryuBackpic
- add_pic StarmieFrontpic
- add_pic StarmieBackpic
- add_pic MrMimeFrontpic
- add_pic MrMimeBackpic
- add_pic ScytherFrontpic
- add_pic ScytherBackpic
- add_pic JynxFrontpic
- add_pic JynxBackpic
- add_pic ElectabuzzFrontpic
- add_pic ElectabuzzBackpic
- add_pic MagmarFrontpic
- add_pic MagmarBackpic
- add_pic PinsirFrontpic
- add_pic PinsirBackpic
- add_pic TaurosFrontpic
- add_pic TaurosBackpic
- add_pic MagikarpFrontpic
- add_pic MagikarpBackpic
- add_pic GyaradosFrontpic
- add_pic GyaradosBackpic
- add_pic LaprasFrontpic
- add_pic LaprasBackpic
- add_pic DittoFrontpic
- add_pic DittoBackpic
- add_pic EeveeFrontpic
- add_pic EeveeBackpic
- add_pic VaporeonFrontpic
- add_pic VaporeonBackpic
- add_pic JolteonFrontpic
- add_pic JolteonBackpic
- add_pic FlareonFrontpic
- add_pic FlareonBackpic
- add_pic PorygonFrontpic
- add_pic PorygonBackpic
- add_pic OmanyteFrontpic
- add_pic OmanyteBackpic
- add_pic OmastarFrontpic
- add_pic OmastarBackpic
- add_pic KabutoFrontpic
- add_pic KabutoBackpic
- add_pic KabutopsFrontpic
- add_pic KabutopsBackpic
- add_pic AerodactylFrontpic
- add_pic AerodactylBackpic
- add_pic SnorlaxFrontpic
- add_pic SnorlaxBackpic
- add_pic ArticunoFrontpic
- add_pic ArticunoBackpic
- add_pic ZapdosFrontpic
- add_pic ZapdosBackpic
- add_pic MoltresFrontpic
- add_pic MoltresBackpic
- add_pic DratiniFrontpic
- add_pic DratiniBackpic
- add_pic DragonairFrontpic
- add_pic DragonairBackpic
- add_pic DragoniteFrontpic
- add_pic DragoniteBackpic
- add_pic MewtwoFrontpic
- add_pic MewtwoBackpic
- add_pic MewFrontpic
- add_pic MewBackpic
- add_pic ChikoritaFrontpic
- add_pic ChikoritaBackpic
- add_pic BayleefFrontpic
- add_pic BayleefBackpic
- add_pic MeganiumFrontpic
- add_pic MeganiumBackpic
- add_pic CyndaquilFrontpic
- add_pic CyndaquilBackpic
- add_pic QuilavaFrontpic
- add_pic QuilavaBackpic
- add_pic TyphlosionFrontpic
- add_pic TyphlosionBackpic
- add_pic TotodileFrontpic
- add_pic TotodileBackpic
- add_pic CroconawFrontpic
- add_pic CroconawBackpic
- add_pic FeraligatrFrontpic
- add_pic FeraligatrBackpic
- add_pic SentretFrontpic
- add_pic SentretBackpic
- add_pic FurretFrontpic
- add_pic FurretBackpic
- add_pic HoothootFrontpic
- add_pic HoothootBackpic
- add_pic NoctowlFrontpic
- add_pic NoctowlBackpic
- add_pic LedybaFrontpic
- add_pic LedybaBackpic
- add_pic LedianFrontpic
- add_pic LedianBackpic
- add_pic SpinarakFrontpic
- add_pic SpinarakBackpic
- add_pic AriadosFrontpic
- add_pic AriadosBackpic
- add_pic CrobatFrontpic
- add_pic CrobatBackpic
- add_pic ChinchouFrontpic
- add_pic ChinchouBackpic
- add_pic LanturnFrontpic
- add_pic LanturnBackpic
- add_pic PichuFrontpic
- add_pic PichuBackpic
- add_pic CleffaFrontpic
- add_pic CleffaBackpic
- add_pic IgglybuffFrontpic
- add_pic IgglybuffBackpic
- add_pic TogepiFrontpic
- add_pic TogepiBackpic
- add_pic TogeticFrontpic
- add_pic TogeticBackpic
- add_pic NatuFrontpic
- add_pic NatuBackpic
- add_pic XatuFrontpic
- add_pic XatuBackpic
- add_pic MareepFrontpic
- add_pic MareepBackpic
- add_pic FlaaffyFrontpic
- add_pic FlaaffyBackpic
- add_pic AmpharosFrontpic
- add_pic AmpharosBackpic
- add_pic BellossomFrontpic
- add_pic BellossomBackpic
- add_pic MarillFrontpic
- add_pic MarillBackpic
- add_pic AzumarillFrontpic
- add_pic AzumarillBackpic
- add_pic SudowoodoFrontpic
- add_pic SudowoodoBackpic
- add_pic PolitoedFrontpic
- add_pic PolitoedBackpic
- add_pic HoppipFrontpic
- add_pic HoppipBackpic
- add_pic SkiploomFrontpic
- add_pic SkiploomBackpic
- add_pic JumpluffFrontpic
- add_pic JumpluffBackpic
- add_pic AipomFrontpic
- add_pic AipomBackpic
- add_pic SunkernFrontpic
- add_pic SunkernBackpic
- add_pic SunfloraFrontpic
- add_pic SunfloraBackpic
- add_pic YanmaFrontpic
- add_pic YanmaBackpic
- add_pic WooperFrontpic
- add_pic WooperBackpic
- add_pic QuagsireFrontpic
- add_pic QuagsireBackpic
- add_pic EspeonFrontpic
- add_pic EspeonBackpic
- add_pic UmbreonFrontpic
- add_pic UmbreonBackpic
- add_pic MurkrowFrontpic
- add_pic MurkrowBackpic
- add_pic SlowkingFrontpic
- add_pic SlowkingBackpic
- add_pic MisdreavusFrontpic
- add_pic MisdreavusBackpic
+PicPointers::
+; entries correspond to constants/pokemon_constants.asm, two apiece
+ dba_pic BulbasaurFrontpic
+ dba_pic BulbasaurBackpic
+ dba_pic IvysaurFrontpic
+ dba_pic IvysaurBackpic
+ dba_pic VenusaurFrontpic
+ dba_pic VenusaurBackpic
+ dba_pic CharmanderFrontpic
+ dba_pic CharmanderBackpic
+ dba_pic CharmeleonFrontpic
+ dba_pic CharmeleonBackpic
+ dba_pic CharizardFrontpic
+ dba_pic CharizardBackpic
+ dba_pic SquirtleFrontpic
+ dba_pic SquirtleBackpic
+ dba_pic WartortleFrontpic
+ dba_pic WartortleBackpic
+ dba_pic BlastoiseFrontpic
+ dba_pic BlastoiseBackpic
+ dba_pic CaterpieFrontpic
+ dba_pic CaterpieBackpic
+ dba_pic MetapodFrontpic
+ dba_pic MetapodBackpic
+ dba_pic ButterfreeFrontpic
+ dba_pic ButterfreeBackpic
+ dba_pic WeedleFrontpic
+ dba_pic WeedleBackpic
+ dba_pic KakunaFrontpic
+ dba_pic KakunaBackpic
+ dba_pic BeedrillFrontpic
+ dba_pic BeedrillBackpic
+ dba_pic PidgeyFrontpic
+ dba_pic PidgeyBackpic
+ dba_pic PidgeottoFrontpic
+ dba_pic PidgeottoBackpic
+ dba_pic PidgeotFrontpic
+ dba_pic PidgeotBackpic
+ dba_pic RattataFrontpic
+ dba_pic RattataBackpic
+ dba_pic RaticateFrontpic
+ dba_pic RaticateBackpic
+ dba_pic SpearowFrontpic
+ dba_pic SpearowBackpic
+ dba_pic FearowFrontpic
+ dba_pic FearowBackpic
+ dba_pic EkansFrontpic
+ dba_pic EkansBackpic
+ dba_pic ArbokFrontpic
+ dba_pic ArbokBackpic
+ dba_pic PikachuFrontpic
+ dba_pic PikachuBackpic
+ dba_pic RaichuFrontpic
+ dba_pic RaichuBackpic
+ dba_pic SandshrewFrontpic
+ dba_pic SandshrewBackpic
+ dba_pic SandslashFrontpic
+ dba_pic SandslashBackpic
+ dba_pic NidoranFFrontpic
+ dba_pic NidoranFBackpic
+ dba_pic NidorinaFrontpic
+ dba_pic NidorinaBackpic
+ dba_pic NidoqueenFrontpic
+ dba_pic NidoqueenBackpic
+ dba_pic NidoranMFrontpic
+ dba_pic NidoranMBackpic
+ dba_pic NidorinoFrontpic
+ dba_pic NidorinoBackpic
+ dba_pic NidokingFrontpic
+ dba_pic NidokingBackpic
+ dba_pic ClefairyFrontpic
+ dba_pic ClefairyBackpic
+ dba_pic ClefableFrontpic
+ dba_pic ClefableBackpic
+ dba_pic VulpixFrontpic
+ dba_pic VulpixBackpic
+ dba_pic NinetalesFrontpic
+ dba_pic NinetalesBackpic
+ dba_pic JigglypuffFrontpic
+ dba_pic JigglypuffBackpic
+ dba_pic WigglytuffFrontpic
+ dba_pic WigglytuffBackpic
+ dba_pic ZubatFrontpic
+ dba_pic ZubatBackpic
+ dba_pic GolbatFrontpic
+ dba_pic GolbatBackpic
+ dba_pic OddishFrontpic
+ dba_pic OddishBackpic
+ dba_pic GloomFrontpic
+ dba_pic GloomBackpic
+ dba_pic VileplumeFrontpic
+ dba_pic VileplumeBackpic
+ dba_pic ParasFrontpic
+ dba_pic ParasBackpic
+ dba_pic ParasectFrontpic
+ dba_pic ParasectBackpic
+ dba_pic VenonatFrontpic
+ dba_pic VenonatBackpic
+ dba_pic VenomothFrontpic
+ dba_pic VenomothBackpic
+ dba_pic DiglettFrontpic
+ dba_pic DiglettBackpic
+ dba_pic DugtrioFrontpic
+ dba_pic DugtrioBackpic
+ dba_pic MeowthFrontpic
+ dba_pic MeowthBackpic
+ dba_pic PersianFrontpic
+ dba_pic PersianBackpic
+ dba_pic PsyduckFrontpic
+ dba_pic PsyduckBackpic
+ dba_pic GolduckFrontpic
+ dba_pic GolduckBackpic
+ dba_pic MankeyFrontpic
+ dba_pic MankeyBackpic
+ dba_pic PrimeapeFrontpic
+ dba_pic PrimeapeBackpic
+ dba_pic GrowlitheFrontpic
+ dba_pic GrowlitheBackpic
+ dba_pic ArcanineFrontpic
+ dba_pic ArcanineBackpic
+ dba_pic PoliwagFrontpic
+ dba_pic PoliwagBackpic
+ dba_pic PoliwhirlFrontpic
+ dba_pic PoliwhirlBackpic
+ dba_pic PoliwrathFrontpic
+ dba_pic PoliwrathBackpic
+ dba_pic AbraFrontpic
+ dba_pic AbraBackpic
+ dba_pic KadabraFrontpic
+ dba_pic KadabraBackpic
+ dba_pic AlakazamFrontpic
+ dba_pic AlakazamBackpic
+ dba_pic MachopFrontpic
+ dba_pic MachopBackpic
+ dba_pic MachokeFrontpic
+ dba_pic MachokeBackpic
+ dba_pic MachampFrontpic
+ dba_pic MachampBackpic
+ dba_pic BellsproutFrontpic
+ dba_pic BellsproutBackpic
+ dba_pic WeepinbellFrontpic
+ dba_pic WeepinbellBackpic
+ dba_pic VictreebelFrontpic
+ dba_pic VictreebelBackpic
+ dba_pic TentacoolFrontpic
+ dba_pic TentacoolBackpic
+ dba_pic TentacruelFrontpic
+ dba_pic TentacruelBackpic
+ dba_pic GeodudeFrontpic
+ dba_pic GeodudeBackpic
+ dba_pic GravelerFrontpic
+ dba_pic GravelerBackpic
+ dba_pic GolemFrontpic
+ dba_pic GolemBackpic
+ dba_pic PonytaFrontpic
+ dba_pic PonytaBackpic
+ dba_pic RapidashFrontpic
+ dba_pic RapidashBackpic
+ dba_pic SlowpokeFrontpic
+ dba_pic SlowpokeBackpic
+ dba_pic SlowbroFrontpic
+ dba_pic SlowbroBackpic
+ dba_pic MagnemiteFrontpic
+ dba_pic MagnemiteBackpic
+ dba_pic MagnetonFrontpic
+ dba_pic MagnetonBackpic
+ dba_pic FarfetchDFrontpic
+ dba_pic FarfetchDBackpic
+ dba_pic DoduoFrontpic
+ dba_pic DoduoBackpic
+ dba_pic DodrioFrontpic
+ dba_pic DodrioBackpic
+ dba_pic SeelFrontpic
+ dba_pic SeelBackpic
+ dba_pic DewgongFrontpic
+ dba_pic DewgongBackpic
+ dba_pic GrimerFrontpic
+ dba_pic GrimerBackpic
+ dba_pic MukFrontpic
+ dba_pic MukBackpic
+ dba_pic ShellderFrontpic
+ dba_pic ShellderBackpic
+ dba_pic CloysterFrontpic
+ dba_pic CloysterBackpic
+ dba_pic GastlyFrontpic
+ dba_pic GastlyBackpic
+ dba_pic HaunterFrontpic
+ dba_pic HaunterBackpic
+ dba_pic GengarFrontpic
+ dba_pic GengarBackpic
+ dba_pic OnixFrontpic
+ dba_pic OnixBackpic
+ dba_pic DrowzeeFrontpic
+ dba_pic DrowzeeBackpic
+ dba_pic HypnoFrontpic
+ dba_pic HypnoBackpic
+ dba_pic KrabbyFrontpic
+ dba_pic KrabbyBackpic
+ dba_pic KinglerFrontpic
+ dba_pic KinglerBackpic
+ dba_pic VoltorbFrontpic
+ dba_pic VoltorbBackpic
+ dba_pic ElectrodeFrontpic
+ dba_pic ElectrodeBackpic
+ dba_pic ExeggcuteFrontpic
+ dba_pic ExeggcuteBackpic
+ dba_pic ExeggutorFrontpic
+ dba_pic ExeggutorBackpic
+ dba_pic CuboneFrontpic
+ dba_pic CuboneBackpic
+ dba_pic MarowakFrontpic
+ dba_pic MarowakBackpic
+ dba_pic HitmonleeFrontpic
+ dba_pic HitmonleeBackpic
+ dba_pic HitmonchanFrontpic
+ dba_pic HitmonchanBackpic
+ dba_pic LickitungFrontpic
+ dba_pic LickitungBackpic
+ dba_pic KoffingFrontpic
+ dba_pic KoffingBackpic
+ dba_pic WeezingFrontpic
+ dba_pic WeezingBackpic
+ dba_pic RhyhornFrontpic
+ dba_pic RhyhornBackpic
+ dba_pic RhydonFrontpic
+ dba_pic RhydonBackpic
+ dba_pic ChanseyFrontpic
+ dba_pic ChanseyBackpic
+ dba_pic TangelaFrontpic
+ dba_pic TangelaBackpic
+ dba_pic KangaskhanFrontpic
+ dba_pic KangaskhanBackpic
+ dba_pic HorseaFrontpic
+ dba_pic HorseaBackpic
+ dba_pic SeadraFrontpic
+ dba_pic SeadraBackpic
+ dba_pic GoldeenFrontpic
+ dba_pic GoldeenBackpic
+ dba_pic SeakingFrontpic
+ dba_pic SeakingBackpic
+ dba_pic StaryuFrontpic
+ dba_pic StaryuBackpic
+ dba_pic StarmieFrontpic
+ dba_pic StarmieBackpic
+ dba_pic MrMimeFrontpic
+ dba_pic MrMimeBackpic
+ dba_pic ScytherFrontpic
+ dba_pic ScytherBackpic
+ dba_pic JynxFrontpic
+ dba_pic JynxBackpic
+ dba_pic ElectabuzzFrontpic
+ dba_pic ElectabuzzBackpic
+ dba_pic MagmarFrontpic
+ dba_pic MagmarBackpic
+ dba_pic PinsirFrontpic
+ dba_pic PinsirBackpic
+ dba_pic TaurosFrontpic
+ dba_pic TaurosBackpic
+ dba_pic MagikarpFrontpic
+ dba_pic MagikarpBackpic
+ dba_pic GyaradosFrontpic
+ dba_pic GyaradosBackpic
+ dba_pic LaprasFrontpic
+ dba_pic LaprasBackpic
+ dba_pic DittoFrontpic
+ dba_pic DittoBackpic
+ dba_pic EeveeFrontpic
+ dba_pic EeveeBackpic
+ dba_pic VaporeonFrontpic
+ dba_pic VaporeonBackpic
+ dba_pic JolteonFrontpic
+ dba_pic JolteonBackpic
+ dba_pic FlareonFrontpic
+ dba_pic FlareonBackpic
+ dba_pic PorygonFrontpic
+ dba_pic PorygonBackpic
+ dba_pic OmanyteFrontpic
+ dba_pic OmanyteBackpic
+ dba_pic OmastarFrontpic
+ dba_pic OmastarBackpic
+ dba_pic KabutoFrontpic
+ dba_pic KabutoBackpic
+ dba_pic KabutopsFrontpic
+ dba_pic KabutopsBackpic
+ dba_pic AerodactylFrontpic
+ dba_pic AerodactylBackpic
+ dba_pic SnorlaxFrontpic
+ dba_pic SnorlaxBackpic
+ dba_pic ArticunoFrontpic
+ dba_pic ArticunoBackpic
+ dba_pic ZapdosFrontpic
+ dba_pic ZapdosBackpic
+ dba_pic MoltresFrontpic
+ dba_pic MoltresBackpic
+ dba_pic DratiniFrontpic
+ dba_pic DratiniBackpic
+ dba_pic DragonairFrontpic
+ dba_pic DragonairBackpic
+ dba_pic DragoniteFrontpic
+ dba_pic DragoniteBackpic
+ dba_pic MewtwoFrontpic
+ dba_pic MewtwoBackpic
+ dba_pic MewFrontpic
+ dba_pic MewBackpic
+ dba_pic ChikoritaFrontpic
+ dba_pic ChikoritaBackpic
+ dba_pic BayleefFrontpic
+ dba_pic BayleefBackpic
+ dba_pic MeganiumFrontpic
+ dba_pic MeganiumBackpic
+ dba_pic CyndaquilFrontpic
+ dba_pic CyndaquilBackpic
+ dba_pic QuilavaFrontpic
+ dba_pic QuilavaBackpic
+ dba_pic TyphlosionFrontpic
+ dba_pic TyphlosionBackpic
+ dba_pic TotodileFrontpic
+ dba_pic TotodileBackpic
+ dba_pic CroconawFrontpic
+ dba_pic CroconawBackpic
+ dba_pic FeraligatrFrontpic
+ dba_pic FeraligatrBackpic
+ dba_pic SentretFrontpic
+ dba_pic SentretBackpic
+ dba_pic FurretFrontpic
+ dba_pic FurretBackpic
+ dba_pic HoothootFrontpic
+ dba_pic HoothootBackpic
+ dba_pic NoctowlFrontpic
+ dba_pic NoctowlBackpic
+ dba_pic LedybaFrontpic
+ dba_pic LedybaBackpic
+ dba_pic LedianFrontpic
+ dba_pic LedianBackpic
+ dba_pic SpinarakFrontpic
+ dba_pic SpinarakBackpic
+ dba_pic AriadosFrontpic
+ dba_pic AriadosBackpic
+ dba_pic CrobatFrontpic
+ dba_pic CrobatBackpic
+ dba_pic ChinchouFrontpic
+ dba_pic ChinchouBackpic
+ dba_pic LanturnFrontpic
+ dba_pic LanturnBackpic
+ dba_pic PichuFrontpic
+ dba_pic PichuBackpic
+ dba_pic CleffaFrontpic
+ dba_pic CleffaBackpic
+ dba_pic IgglybuffFrontpic
+ dba_pic IgglybuffBackpic
+ dba_pic TogepiFrontpic
+ dba_pic TogepiBackpic
+ dba_pic TogeticFrontpic
+ dba_pic TogeticBackpic
+ dba_pic NatuFrontpic
+ dba_pic NatuBackpic
+ dba_pic XatuFrontpic
+ dba_pic XatuBackpic
+ dba_pic MareepFrontpic
+ dba_pic MareepBackpic
+ dba_pic FlaaffyFrontpic
+ dba_pic FlaaffyBackpic
+ dba_pic AmpharosFrontpic
+ dba_pic AmpharosBackpic
+ dba_pic BellossomFrontpic
+ dba_pic BellossomBackpic
+ dba_pic MarillFrontpic
+ dba_pic MarillBackpic
+ dba_pic AzumarillFrontpic
+ dba_pic AzumarillBackpic
+ dba_pic SudowoodoFrontpic
+ dba_pic SudowoodoBackpic
+ dba_pic PolitoedFrontpic
+ dba_pic PolitoedBackpic
+ dba_pic HoppipFrontpic
+ dba_pic HoppipBackpic
+ dba_pic SkiploomFrontpic
+ dba_pic SkiploomBackpic
+ dba_pic JumpluffFrontpic
+ dba_pic JumpluffBackpic
+ dba_pic AipomFrontpic
+ dba_pic AipomBackpic
+ dba_pic SunkernFrontpic
+ dba_pic SunkernBackpic
+ dba_pic SunfloraFrontpic
+ dba_pic SunfloraBackpic
+ dba_pic YanmaFrontpic
+ dba_pic YanmaBackpic
+ dba_pic WooperFrontpic
+ dba_pic WooperBackpic
+ dba_pic QuagsireFrontpic
+ dba_pic QuagsireBackpic
+ dba_pic EspeonFrontpic
+ dba_pic EspeonBackpic
+ dba_pic UmbreonFrontpic
+ dba_pic UmbreonBackpic
+ dba_pic MurkrowFrontpic
+ dba_pic MurkrowBackpic
+ dba_pic SlowkingFrontpic
+ dba_pic SlowkingBackpic
+ dba_pic MisdreavusFrontpic
+ dba_pic MisdreavusBackpic
; Unown pics have their own table. See UnownPicPointers
dbw -1, -1
dbw -1, -1
- add_pic WobbuffetFrontpic
- add_pic WobbuffetBackpic
- add_pic GirafarigFrontpic
- add_pic GirafarigBackpic
- add_pic PinecoFrontpic
- add_pic PinecoBackpic
- add_pic ForretressFrontpic
- add_pic ForretressBackpic
- add_pic DunsparceFrontpic
- add_pic DunsparceBackpic
- add_pic GligarFrontpic
- add_pic GligarBackpic
- add_pic SteelixFrontpic
- add_pic SteelixBackpic
- add_pic SnubbullFrontpic
- add_pic SnubbullBackpic
- add_pic GranbullFrontpic
- add_pic GranbullBackpic
- add_pic QwilfishFrontpic
- add_pic QwilfishBackpic
- add_pic ScizorFrontpic
- add_pic ScizorBackpic
- add_pic ShuckleFrontpic
- add_pic ShuckleBackpic
- add_pic HeracrossFrontpic
- add_pic HeracrossBackpic
- add_pic SneaselFrontpic
- add_pic SneaselBackpic
- add_pic TeddiursaFrontpic
- add_pic TeddiursaBackpic
- add_pic UrsaringFrontpic
- add_pic UrsaringBackpic
- add_pic SlugmaFrontpic
- add_pic SlugmaBackpic
- add_pic MagcargoFrontpic
- add_pic MagcargoBackpic
- add_pic SwinubFrontpic
- add_pic SwinubBackpic
- add_pic PiloswineFrontpic
- add_pic PiloswineBackpic
- add_pic CorsolaFrontpic
- add_pic CorsolaBackpic
- add_pic RemoraidFrontpic
- add_pic RemoraidBackpic
- add_pic OctilleryFrontpic
- add_pic OctilleryBackpic
- add_pic DelibirdFrontpic
- add_pic DelibirdBackpic
- add_pic MantineFrontpic
- add_pic MantineBackpic
- add_pic SkarmoryFrontpic
- add_pic SkarmoryBackpic
- add_pic HoundourFrontpic
- add_pic HoundourBackpic
- add_pic HoundoomFrontpic
- add_pic HoundoomBackpic
- add_pic KingdraFrontpic
- add_pic KingdraBackpic
- add_pic PhanpyFrontpic
- add_pic PhanpyBackpic
- add_pic DonphanFrontpic
- add_pic DonphanBackpic
- add_pic Porygon2Frontpic
- add_pic Porygon2Backpic
- add_pic StantlerFrontpic
- add_pic StantlerBackpic
- add_pic SmeargleFrontpic
- add_pic SmeargleBackpic
- add_pic TyrogueFrontpic
- add_pic TyrogueBackpic
- add_pic HitmontopFrontpic
- add_pic HitmontopBackpic
- add_pic SmoochumFrontpic
- add_pic SmoochumBackpic
- add_pic ElekidFrontpic
- add_pic ElekidBackpic
- add_pic MagbyFrontpic
- add_pic MagbyBackpic
- add_pic MiltankFrontpic
- add_pic MiltankBackpic
- add_pic BlisseyFrontpic
- add_pic BlisseyBackpic
- add_pic RaikouFrontpic
- add_pic RaikouBackpic
- add_pic EnteiFrontpic
- add_pic EnteiBackpic
- add_pic SuicuneFrontpic
- add_pic SuicuneBackpic
- add_pic LarvitarFrontpic
- add_pic LarvitarBackpic
- add_pic PupitarFrontpic
- add_pic PupitarBackpic
- add_pic TyranitarFrontpic
- add_pic TyranitarBackpic
- add_pic LugiaFrontpic
- add_pic LugiaBackpic
- add_pic HoOhFrontpic
- add_pic HoOhBackpic
- add_pic CelebiFrontpic
- add_pic CelebiBackpic
+ dba_pic WobbuffetFrontpic
+ dba_pic WobbuffetBackpic
+ dba_pic GirafarigFrontpic
+ dba_pic GirafarigBackpic
+ dba_pic PinecoFrontpic
+ dba_pic PinecoBackpic
+ dba_pic ForretressFrontpic
+ dba_pic ForretressBackpic
+ dba_pic DunsparceFrontpic
+ dba_pic DunsparceBackpic
+ dba_pic GligarFrontpic
+ dba_pic GligarBackpic
+ dba_pic SteelixFrontpic
+ dba_pic SteelixBackpic
+ dba_pic SnubbullFrontpic
+ dba_pic SnubbullBackpic
+ dba_pic GranbullFrontpic
+ dba_pic GranbullBackpic
+ dba_pic QwilfishFrontpic
+ dba_pic QwilfishBackpic
+ dba_pic ScizorFrontpic
+ dba_pic ScizorBackpic
+ dba_pic ShuckleFrontpic
+ dba_pic ShuckleBackpic
+ dba_pic HeracrossFrontpic
+ dba_pic HeracrossBackpic
+ dba_pic SneaselFrontpic
+ dba_pic SneaselBackpic
+ dba_pic TeddiursaFrontpic
+ dba_pic TeddiursaBackpic
+ dba_pic UrsaringFrontpic
+ dba_pic UrsaringBackpic
+ dba_pic SlugmaFrontpic
+ dba_pic SlugmaBackpic
+ dba_pic MagcargoFrontpic
+ dba_pic MagcargoBackpic
+ dba_pic SwinubFrontpic
+ dba_pic SwinubBackpic
+ dba_pic PiloswineFrontpic
+ dba_pic PiloswineBackpic
+ dba_pic CorsolaFrontpic
+ dba_pic CorsolaBackpic
+ dba_pic RemoraidFrontpic
+ dba_pic RemoraidBackpic
+ dba_pic OctilleryFrontpic
+ dba_pic OctilleryBackpic
+ dba_pic DelibirdFrontpic
+ dba_pic DelibirdBackpic
+ dba_pic MantineFrontpic
+ dba_pic MantineBackpic
+ dba_pic SkarmoryFrontpic
+ dba_pic SkarmoryBackpic
+ dba_pic HoundourFrontpic
+ dba_pic HoundourBackpic
+ dba_pic HoundoomFrontpic
+ dba_pic HoundoomBackpic
+ dba_pic KingdraFrontpic
+ dba_pic KingdraBackpic
+ dba_pic PhanpyFrontpic
+ dba_pic PhanpyBackpic
+ dba_pic DonphanFrontpic
+ dba_pic DonphanBackpic
+ dba_pic Porygon2Frontpic
+ dba_pic Porygon2Backpic
+ dba_pic StantlerFrontpic
+ dba_pic StantlerBackpic
+ dba_pic SmeargleFrontpic
+ dba_pic SmeargleBackpic
+ dba_pic TyrogueFrontpic
+ dba_pic TyrogueBackpic
+ dba_pic HitmontopFrontpic
+ dba_pic HitmontopBackpic
+ dba_pic SmoochumFrontpic
+ dba_pic SmoochumBackpic
+ dba_pic ElekidFrontpic
+ dba_pic ElekidBackpic
+ dba_pic MagbyFrontpic
+ dba_pic MagbyBackpic
+ dba_pic MiltankFrontpic
+ dba_pic MiltankBackpic
+ dba_pic BlisseyFrontpic
+ dba_pic BlisseyBackpic
+ dba_pic RaikouFrontpic
+ dba_pic RaikouBackpic
+ dba_pic EnteiFrontpic
+ dba_pic EnteiBackpic
+ dba_pic SuicuneFrontpic
+ dba_pic SuicuneBackpic
+ dba_pic LarvitarFrontpic
+ dba_pic LarvitarBackpic
+ dba_pic PupitarFrontpic
+ dba_pic PupitarBackpic
+ dba_pic TyranitarFrontpic
+ dba_pic TyranitarBackpic
+ dba_pic LugiaFrontpic
+ dba_pic LugiaBackpic
+ dba_pic HoOhFrontpic
+ dba_pic HoOhBackpic
+ dba_pic CelebiFrontpic
+ dba_pic CelebiBackpic
dbw -1, -1 ; unused
dbw -1, -1 ; unused
- add_pic EggPic
+ dba_pic EggPic
dbw -1, -1 ; unused
diff --git a/gfx/pics/trainer_pic_pointers.asm b/gfx/pics/trainer_pic_pointers.asm
deleted file mode 100644
index 4c1db41d5..000000000
--- a/gfx/pics/trainer_pic_pointers.asm
+++ /dev/null
@@ -1,68 +0,0 @@
-
- add_pic FalknerPic
- add_pic WhitneyPic
- add_pic BugsyPic
- add_pic MortyPic
- add_pic PrycePic
- add_pic JasminePic
- add_pic ChuckPic
- add_pic ClairPic
- add_pic Rival1Pic
- add_pic PokemonProfPic
- add_pic WillPic
- add_pic CalPic
- add_pic BrunoPic
- add_pic KarenPic
- add_pic KogaPic
- add_pic ChampionPic
- add_pic BrockPic
- add_pic MistyPic
- add_pic LtSurgePic
- add_pic ScientistPic
- add_pic ErikaPic
- add_pic YoungsterPic
- add_pic SchoolboyPic
- add_pic BirdKeeperPic
- add_pic LassPic
- add_pic JaninePic
- add_pic CooltrainermPic
- add_pic CooltrainerfPic
- add_pic BeautyPic
- add_pic PokemaniacPic
- add_pic GruntmPic
- add_pic GentlemanPic
- add_pic SkierPic
- add_pic TeacherPic
- add_pic SabrinaPic
- add_pic BugCatcherPic
- add_pic FisherPic
- add_pic SwimmermPic
- add_pic SwimmerfPic
- add_pic SailorPic
- add_pic SuperNerdPic
- add_pic Rival2Pic
- add_pic GuitaristPic
- add_pic HikerPic
- add_pic BikerPic
- add_pic BlainePic
- add_pic BurglarPic
- add_pic FirebreatherPic
- add_pic JugglerPic
- add_pic BlackbeltTPic
- add_pic ExecutivemPic
- add_pic PsychicTPic
- add_pic PicnickerPic
- add_pic CamperPic
- add_pic ExecutivefPic
- add_pic SagePic
- add_pic MediumPic
- add_pic BoarderPic
- add_pic PokefanmPic
- add_pic KimonoGirlPic
- add_pic TwinsPic
- add_pic PokefanfPic
- add_pic RedPic
- add_pic BluePic
- add_pic OfficerPic
- add_pic GruntfPic
- add_pic MysticalmanPic
diff --git a/gfx/pics/unown_pic_pointers.asm b/gfx/pics/unown_pic_pointers.asm
index a74b818ef..1ae0da6b6 100644
--- a/gfx/pics/unown_pic_pointers.asm
+++ b/gfx/pics/unown_pic_pointers.asm
@@ -1,53 +1,54 @@
-
- add_pic UnownAFrontpic
- add_pic UnownABackpic
- add_pic UnownBFrontpic
- add_pic UnownBBackpic
- add_pic UnownCFrontpic
- add_pic UnownCBackpic
- add_pic UnownDFrontpic
- add_pic UnownDBackpic
- add_pic UnownEFrontpic
- add_pic UnownEBackpic
- add_pic UnownFFrontpic
- add_pic UnownFBackpic
- add_pic UnownGFrontpic
- add_pic UnownGBackpic
- add_pic UnownHFrontpic
- add_pic UnownHBackpic
- add_pic UnownIFrontpic
- add_pic UnownIBackpic
- add_pic UnownJFrontpic
- add_pic UnownJBackpic
- add_pic UnownKFrontpic
- add_pic UnownKBackpic
- add_pic UnownLFrontpic
- add_pic UnownLBackpic
- add_pic UnownMFrontpic
- add_pic UnownMBackpic
- add_pic UnownNFrontpic
- add_pic UnownNBackpic
- add_pic UnownOFrontpic
- add_pic UnownOBackpic
- add_pic UnownPFrontpic
- add_pic UnownPBackpic
- add_pic UnownQFrontpic
- add_pic UnownQBackpic
- add_pic UnownRFrontpic
- add_pic UnownRBackpic
- add_pic UnownSFrontpic
- add_pic UnownSBackpic
- add_pic UnownTFrontpic
- add_pic UnownTBackpic
- add_pic UnownUFrontpic
- add_pic UnownUBackpic
- add_pic UnownVFrontpic
- add_pic UnownVBackpic
- add_pic UnownWFrontpic
- add_pic UnownWBackpic
- add_pic UnownXFrontpic
- add_pic UnownXBackpic
- add_pic UnownYFrontpic
- add_pic UnownYBackpic
- add_pic UnownZFrontpic
- add_pic UnownZBackpic
+UnownPicPointers::
+; entries correspond to Unown letters, two apiece
+ dba_pic UnownAFrontpic
+ dba_pic UnownABackpic
+ dba_pic UnownBFrontpic
+ dba_pic UnownBBackpic
+ dba_pic UnownCFrontpic
+ dba_pic UnownCBackpic
+ dba_pic UnownDFrontpic
+ dba_pic UnownDBackpic
+ dba_pic UnownEFrontpic
+ dba_pic UnownEBackpic
+ dba_pic UnownFFrontpic
+ dba_pic UnownFBackpic
+ dba_pic UnownGFrontpic
+ dba_pic UnownGBackpic
+ dba_pic UnownHFrontpic
+ dba_pic UnownHBackpic
+ dba_pic UnownIFrontpic
+ dba_pic UnownIBackpic
+ dba_pic UnownJFrontpic
+ dba_pic UnownJBackpic
+ dba_pic UnownKFrontpic
+ dba_pic UnownKBackpic
+ dba_pic UnownLFrontpic
+ dba_pic UnownLBackpic
+ dba_pic UnownMFrontpic
+ dba_pic UnownMBackpic
+ dba_pic UnownNFrontpic
+ dba_pic UnownNBackpic
+ dba_pic UnownOFrontpic
+ dba_pic UnownOBackpic
+ dba_pic UnownPFrontpic
+ dba_pic UnownPBackpic
+ dba_pic UnownQFrontpic
+ dba_pic UnownQBackpic
+ dba_pic UnownRFrontpic
+ dba_pic UnownRBackpic
+ dba_pic UnownSFrontpic
+ dba_pic UnownSBackpic
+ dba_pic UnownTFrontpic
+ dba_pic UnownTBackpic
+ dba_pic UnownUFrontpic
+ dba_pic UnownUBackpic
+ dba_pic UnownVFrontpic
+ dba_pic UnownVBackpic
+ dba_pic UnownWFrontpic
+ dba_pic UnownWBackpic
+ dba_pic UnownXFrontpic
+ dba_pic UnownXBackpic
+ dba_pic UnownYFrontpic
+ dba_pic UnownYBackpic
+ dba_pic UnownZFrontpic
+ dba_pic UnownZBackpic
diff --git a/gfx/misc/chris.png b/gfx/player/chris.png
index 19869944e..19869944e 100644
--- a/gfx/misc/chris.png
+++ b/gfx/player/chris.png
Binary files differ
diff --git a/gfx/misc/player.2bpp.lz.0312ddce b/gfx/player/chris_back.2bpp.lz.0312ddce
index aec84bbab..aec84bbab 100644
--- a/gfx/misc/player.2bpp.lz.0312ddce
+++ b/gfx/player/chris_back.2bpp.lz.0312ddce
Binary files differ
diff --git a/gfx/misc/player.png b/gfx/player/chris_back.png
index 7bf3c50db..7bf3c50db 100644
--- a/gfx/misc/player.png
+++ b/gfx/player/chris_back.png
Binary files differ
diff --git a/gfx/misc/kris.png b/gfx/player/kris.png
index 7a855e676..7a855e676 100644
--- a/gfx/misc/kris.png
+++ b/gfx/player/kris.png
Binary files differ
diff --git a/gfx/misc/kris_back.png b/gfx/player/kris_back.png
index eb0c1e941..eb0c1e941 100644
--- a/gfx/misc/kris_back.png
+++ b/gfx/player/kris_back.png
Binary files differ
diff --git a/gfx/misc/fast_ship.png b/gfx/pokegear/fast_ship.png
index e92f00f55..e92f00f55 100644
--- a/gfx/misc/fast_ship.png
+++ b/gfx/pokegear/fast_ship.png
Binary files differ
diff --git a/gfx/misc/johto.bin b/gfx/pokegear/johto.bin
index faa5efe70..faa5efe70 100644
--- a/gfx/misc/johto.bin
+++ b/gfx/pokegear/johto.bin
Binary files differ
diff --git a/gfx/misc/kanto.bin b/gfx/pokegear/kanto.bin
index 8a08cd826..8a08cd826 100644
--- a/gfx/misc/kanto.bin
+++ b/gfx/pokegear/kanto.bin
Binary files differ
diff --git a/gfx/misc/pokegear.2bpp.lz.42315ab4 b/gfx/pokegear/pokegear.2bpp.lz.42315ab4
index df312a51b..df312a51b 100644
--- a/gfx/misc/pokegear.2bpp.lz.42315ab4
+++ b/gfx/pokegear/pokegear.2bpp.lz.42315ab4
Binary files differ
diff --git a/gfx/misc/pokegear.png b/gfx/pokegear/pokegear.png
index 78774a260..78774a260 100644
--- a/gfx/misc/pokegear.png
+++ b/gfx/pokegear/pokegear.png
Binary files differ
diff --git a/gfx/misc/pokegear_sprites.2bpp.lz.7a3cc91f b/gfx/pokegear/pokegear_sprites.2bpp.lz.7a3cc91f
index b5af62d28..b5af62d28 100644
--- a/gfx/misc/pokegear_sprites.2bpp.lz.7a3cc91f
+++ b/gfx/pokegear/pokegear_sprites.2bpp.lz.7a3cc91f
Binary files differ
diff --git a/gfx/misc/pokegear_sprites.png b/gfx/pokegear/pokegear_sprites.png
index 746d4b486..746d4b486 100644
--- a/gfx/misc/pokegear_sprites.png
+++ b/gfx/pokegear/pokegear_sprites.png
Binary files differ
diff --git a/gfx/misc/town_map.2bpp.lz.c0587c86 b/gfx/pokegear/town_map.2bpp.lz.c0587c86
index c807a372f..c807a372f 100644
--- a/gfx/misc/town_map.2bpp.lz.c0587c86
+++ b/gfx/pokegear/town_map.2bpp.lz.c0587c86
Binary files differ
diff --git a/gfx/misc/town_map.png b/gfx/pokegear/town_map.png
index 6e7af59d0..6e7af59d0 100644
--- a/gfx/misc/town_map.png
+++ b/gfx/pokegear/town_map.png
Binary files differ
diff --git a/gfx/unknown/016d9c.png b/gfx/printer/bold_a.png
index 56252c423..56252c423 100644
--- a/gfx/unknown/016d9c.png
+++ b/gfx/printer/bold_a.png
Binary files differ
diff --git a/gfx/unknown/016da4.png b/gfx/printer/bold_b.png
index 8ce07a03c..8ce07a03c 100644
--- a/gfx/unknown/016da4.png
+++ b/gfx/printer/bold_b.png
Binary files differ
diff --git a/gfx/mobile/hp.png b/gfx/printer/hp.png
index 908141634..908141634 100644
--- a/gfx/mobile/hp.png
+++ b/gfx/printer/hp.png
Binary files differ
diff --git a/gfx/mobile/lv.png b/gfx/printer/lv.png
index 5176fc585..5176fc585 100644
--- a/gfx/mobile/lv.png
+++ b/gfx/printer/lv.png
Binary files differ
diff --git a/gfx/misc/gbc_only.2bpp.lz.4a5bba0e b/gfx/sgb/gbc_only.2bpp.lz.4a5bba0e
index 9533fbe6d..9533fbe6d 100644
--- a/gfx/misc/gbc_only.2bpp.lz.4a5bba0e
+++ b/gfx/sgb/gbc_only.2bpp.lz.4a5bba0e
Binary files differ
diff --git a/gfx/misc/gbc_only.png b/gfx/sgb/gbc_only.png
index 72bcf0131..72bcf0131 100644
--- a/gfx/misc/gbc_only.png
+++ b/gfx/sgb/gbc_only.png
Binary files differ
diff --git a/gfx/misc/sgb_border.png b/gfx/sgb/sgb_border.png
index 867c36b10..867c36b10 100644
--- a/gfx/misc/sgb_border.png
+++ b/gfx/sgb/sgb_border.png
Binary files differ
diff --git a/gfx/shrink1.2bpp.lz.d4443930 b/gfx/shrink/shrink1.2bpp.lz.d4443930
index 284bee8c2..284bee8c2 100644
--- a/gfx/shrink1.2bpp.lz.d4443930
+++ b/gfx/shrink/shrink1.2bpp.lz.d4443930
Binary files differ
diff --git a/gfx/shrink1.png b/gfx/shrink/shrink1.png
index 6cf5b8077..6cf5b8077 100644
--- a/gfx/shrink1.png
+++ b/gfx/shrink/shrink1.png
Binary files differ
diff --git a/gfx/shrink2.2bpp.lz.3f58480a b/gfx/shrink/shrink2.2bpp.lz.3f58480a
index df14d5ed4..df14d5ed4 100644
--- a/gfx/shrink2.2bpp.lz.3f58480a
+++ b/gfx/shrink/shrink2.2bpp.lz.3f58480a
Binary files differ
diff --git a/gfx/shrink2.png b/gfx/shrink/shrink2.png
index 276b4e7c7..276b4e7c7 100644
--- a/gfx/shrink2.png
+++ b/gfx/shrink/shrink2.png
Binary files differ
diff --git a/gfx/slots.tilemap b/gfx/slots/slots.tilemap
index 5e920ed54..5e920ed54 100644
--- a/gfx/slots.tilemap
+++ b/gfx/slots/slots.tilemap
Binary files differ
diff --git a/gfx/slots_1.2bpp.lz.b22ddc13 b/gfx/slots/slots_1.2bpp.lz.b22ddc13
index 90d3ce139..90d3ce139 100644
--- a/gfx/slots_1.2bpp.lz.b22ddc13
+++ b/gfx/slots/slots_1.2bpp.lz.b22ddc13
Binary files differ
diff --git a/gfx/slots_1.png b/gfx/slots/slots_1.png
index a10340844..a10340844 100644
--- a/gfx/slots_1.png
+++ b/gfx/slots/slots_1.png
Binary files differ
diff --git a/gfx/slots_2.2bpp.lz.b28f76e3 b/gfx/slots/slots_2.2bpp.lz.b28f76e3
index 638c68055..638c68055 100644
--- a/gfx/slots_2.2bpp.lz.b28f76e3
+++ b/gfx/slots/slots_2.2bpp.lz.b28f76e3
Binary files differ
diff --git a/gfx/slots_2.png b/gfx/slots/slots_2.png
index aa1292ccb..aa1292ccb 100644
--- a/gfx/slots_2.png
+++ b/gfx/slots/slots_2.png
Binary files differ
diff --git a/gfx/slots_3.2bpp.lz.70c2984c b/gfx/slots/slots_3.2bpp.lz.70c2984c
index 858b6e464..858b6e464 100644
--- a/gfx/slots_3.2bpp.lz.70c2984c
+++ b/gfx/slots/slots_3.2bpp.lz.70c2984c
Binary files differ
diff --git a/gfx/slots_3.png b/gfx/slots/slots_3.png
index 456e9b6bf..456e9b6bf 100755..100644
--- a/gfx/slots_3.png
+++ b/gfx/slots/slots_3.png
Binary files differ
diff --git a/gfx/special/celebi/leaf.png b/gfx/special/celebi/leaf.png
deleted file mode 100644
index b10e0cf8c..000000000
--- a/gfx/special/celebi/leaf.png
+++ /dev/null
Binary files differ
diff --git a/gfx/misc/copyright.png b/gfx/splash/copyright.png
index 023bb93dd..023bb93dd 100644
--- a/gfx/misc/copyright.png
+++ b/gfx/splash/copyright.png
Binary files differ
diff --git a/gfx/sprite_headers.asm b/gfx/sprite_headers.asm
new file mode 100644
index 000000000..d41d62075
--- /dev/null
+++ b/gfx/sprite_headers.asm
@@ -0,0 +1,111 @@
+sprite_header: MACRO
+; pointer, length, type, palette
+ dw \1
+ db \2 * 4 tiles, BANK(\1)
+ db \3, \4
+ENDM
+
+SpriteHeaders: ; 14736
+; entries correspond to SPRITE_* constants
+ sprite_header ChrisSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 1473c
+ sprite_header ChrisBikeSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 14742
+ sprite_header GameboyKidSpriteGFX, 3, STANDING_SPRITE, PAL_OW_GREEN ; 14748
+ sprite_header SilverSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 1474e
+ sprite_header OakSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 14754
+ sprite_header RedSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 1475a
+ sprite_header BlueSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 14760
+ sprite_header BillSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 14766
+ sprite_header ElderSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 1476c
+ sprite_header JanineSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 14772
+ sprite_header KurtSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 14778
+ sprite_header MomSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 1477e
+ sprite_header BlaineSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 14784
+ sprite_header RedsMomSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 1478a
+ sprite_header DaisySpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 14790
+ sprite_header ElmSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 14796
+ sprite_header WillSpriteGFX, 3, STANDING_SPRITE, PAL_OW_RED ; 1479c
+ sprite_header FalknerSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 147a2
+ sprite_header WhitneySpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 147a8
+ sprite_header BugsySpriteGFX, 3, WALKING_SPRITE, PAL_OW_GREEN ; 147ae
+ sprite_header MortySpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 147b4
+ sprite_header ChuckSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 147ba
+ sprite_header JasmineSpriteGFX, 3, WALKING_SPRITE, PAL_OW_GREEN ; 147c0
+ sprite_header PryceSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 147c6
+ sprite_header ClairSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 147cc
+ sprite_header BrockSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 147d2
+ sprite_header KarenSpriteGFX, 3, STANDING_SPRITE, PAL_OW_BLUE ; 147d8
+ sprite_header BrunoSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 147de
+ sprite_header MistySpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 147e4
+ sprite_header LanceSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 147ea
+ sprite_header SurgeSpriteGFX, 3, WALKING_SPRITE, PAL_OW_GREEN ; 147f0
+ sprite_header ErikaSpriteGFX, 3, WALKING_SPRITE, PAL_OW_GREEN ; 147f6
+ sprite_header KogaSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 147fc
+ sprite_header SabrinaSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 14802
+ sprite_header CooltrainerMSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 14808
+ sprite_header CooltrainerFSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 1480e
+ sprite_header BugCatcherSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 14814
+ sprite_header TwinSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 1481a
+ sprite_header YoungsterSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 14820
+ sprite_header LassSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 14826
+ sprite_header TeacherSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 1482c
+ sprite_header BuenaSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 14832
+ sprite_header SuperNerdSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 14838
+ sprite_header RockerSpriteGFX, 3, WALKING_SPRITE, PAL_OW_GREEN ; 1483e
+ sprite_header PokefanMSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 14844
+ sprite_header PokefanFSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 1484a
+ sprite_header GrampsSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 14850
+ sprite_header GrannySpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 14856
+ sprite_header SwimmerGuySpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 1485c
+ sprite_header SwimmerGirlSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 14862
+ sprite_header BigSnorlaxSpriteGFX, 3, STANDING_SPRITE, PAL_OW_BLUE ; 14868
+ sprite_header SurfingPikachuSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 1486e
+ sprite_header RocketSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 14874
+ sprite_header RocketGirlSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 1487a
+ sprite_header NurseSpriteGFX, 3, STANDING_SPRITE, PAL_OW_RED ; 14880
+ sprite_header LinkReceptionistSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 14886
+ sprite_header ClerkSpriteGFX, 3, WALKING_SPRITE, PAL_OW_GREEN ; 1488c
+ sprite_header FisherSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 14892
+ sprite_header FishingGuruSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 14898
+ sprite_header ScientistSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 1489e
+ sprite_header KimonoGirlSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 148a4
+ sprite_header SageSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 148aa
+ sprite_header UnusedGuySpriteGFX, 3, STANDING_SPRITE, PAL_OW_RED ; 148b0
+ sprite_header GentlemanSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 148b6
+ sprite_header BlackBeltSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 148bc
+ sprite_header ReceptionistSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 148c2
+ sprite_header OfficerSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 148c8
+ sprite_header CalSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 148ce
+ sprite_header SlowpokeSpriteGFX, 1, STILL_SPRITE, PAL_OW_RED ; 148d4
+ sprite_header CaptainSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 148da
+ sprite_header BigLaprasSpriteGFX, 3, STANDING_SPRITE, PAL_OW_BLUE ; 148e0
+ sprite_header GymGuySpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 148e6
+ sprite_header SailorSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 148ec
+ sprite_header BikerSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BROWN ; 148f2
+ sprite_header PharmacistSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 148f8
+ sprite_header MonsterSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 148fe
+ sprite_header FairySpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 14904
+ sprite_header BirdSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 1490a
+ sprite_header DragonSpriteGFX, 3, WALKING_SPRITE, PAL_OW_RED ; 14910
+ sprite_header BigOnixSpriteGFX, 3, STANDING_SPRITE, PAL_OW_BROWN ; 14916
+ sprite_header N64SpriteGFX, 1, STILL_SPRITE, PAL_OW_BROWN ; 1491c
+ sprite_header SudowoodoSpriteGFX, 3, STANDING_SPRITE, PAL_OW_GREEN ; 14922
+ sprite_header SurfSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 14928
+ sprite_header PokeBallSpriteGFX, 1, STILL_SPRITE, PAL_OW_RED ; 1492e
+ sprite_header PokedexSpriteGFX, 1, STILL_SPRITE, PAL_OW_BROWN ; 14934
+ sprite_header PaperSpriteGFX, 1, STILL_SPRITE, PAL_OW_BLUE ; 1493a
+ sprite_header VirtualBoySpriteGFX, 1, STILL_SPRITE, PAL_OW_RED ; 14940
+ sprite_header OldLinkReceptionistSpriteGFX, 3, STANDING_SPRITE, PAL_OW_RED ; 14946
+ sprite_header RockSpriteGFX, 1, STILL_SPRITE, PAL_OW_ROCK ; 1494c
+ sprite_header BoulderSpriteGFX, 1, STILL_SPRITE, PAL_OW_ROCK ; 14952
+ sprite_header SnesSpriteGFX, 1, STILL_SPRITE, PAL_OW_BLUE ; 14958
+ sprite_header FamicomSpriteGFX, 1, STILL_SPRITE, PAL_OW_RED ; 1495e
+ sprite_header FruitTreeSpriteGFX, 1, STILL_SPRITE, PAL_OW_TREE ; 14964
+ sprite_header GoldTrophySpriteGFX, 1, STILL_SPRITE, PAL_OW_BROWN ; 1496a
+ sprite_header SilverTrophySpriteGFX, 1, STILL_SPRITE, PAL_OW_SILVER ; 14970
+ sprite_header KrisSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 14976
+ sprite_header KrisBikeSpriteGFX, 3, WALKING_SPRITE, PAL_OW_BLUE ; 1497c
+ sprite_header KurtOutsideSpriteGFX, 3, STANDING_SPRITE, PAL_OW_BROWN ; 14982
+ sprite_header SuicuneSpriteGFX, 1, STILL_SPRITE, PAL_OW_BLUE ; 14988
+ sprite_header EnteiSpriteGFX, 1, STILL_SPRITE, PAL_OW_RED ; 1498e
+ sprite_header RaikouSpriteGFX, 1, STILL_SPRITE, PAL_OW_RED ; 14994
+ sprite_header StandingYoungsterSpriteGFX, 3, STANDING_SPRITE, PAL_OW_BLUE ; 1499a
diff --git a/gfx/sprites.asm b/gfx/sprites.asm
new file mode 100644
index 000000000..318f7506e
--- /dev/null
+++ b/gfx/sprites.asm
@@ -0,0 +1,108 @@
+SECTION "Sprites 1", ROMX
+
+ChrisSpriteGFX:: INCBIN "gfx/sprites/chris.2bpp" ; c0000
+ChrisBikeSpriteGFX:: INCBIN "gfx/sprites/chris_bike.2bpp" ; c0180
+GameboyKidSpriteGFX:: INCBIN "gfx/sprites/gameboy_kid.2bpp" ; c0300
+SilverSpriteGFX:: INCBIN "gfx/sprites/silver.2bpp" ; c03c0
+OakSpriteGFX:: INCBIN "gfx/sprites/oak.2bpp" ; c0540
+RedSpriteGFX:: INCBIN "gfx/sprites/red.2bpp" ; c06c0
+BlueSpriteGFX:: INCBIN "gfx/sprites/blue.2bpp" ; c0840
+BillSpriteGFX:: INCBIN "gfx/sprites/bill.2bpp" ; c09c0
+ElderSpriteGFX:: INCBIN "gfx/sprites/elder.2bpp" ; c0b40
+JanineSpriteGFX:: INCBIN "gfx/sprites/janine.2bpp" ; c0cc0
+KurtSpriteGFX:: INCBIN "gfx/sprites/kurt.2bpp" ; c0e40
+MomSpriteGFX:: INCBIN "gfx/sprites/mom.2bpp" ; c0fc0
+BlaineSpriteGFX:: INCBIN "gfx/sprites/blaine.2bpp" ; c1140
+RedsMomSpriteGFX:: INCBIN "gfx/sprites/reds_mom.2bpp" ; c12c0
+DaisySpriteGFX:: INCBIN "gfx/sprites/daisy.2bpp" ; c1440
+ElmSpriteGFX:: INCBIN "gfx/sprites/elm.2bpp" ; c15c0
+WillSpriteGFX:: INCBIN "gfx/sprites/will.2bpp" ; c1740
+FalknerSpriteGFX:: INCBIN "gfx/sprites/falkner.2bpp" ; c1800
+WhitneySpriteGFX:: INCBIN "gfx/sprites/whitney.2bpp" ; c1980
+BugsySpriteGFX:: INCBIN "gfx/sprites/bugsy.2bpp" ; c1b00
+MortySpriteGFX:: INCBIN "gfx/sprites/morty.2bpp" ; c1c80
+ChuckSpriteGFX:: INCBIN "gfx/sprites/chuck.2bpp" ; c1e00
+JasmineSpriteGFX:: INCBIN "gfx/sprites/jasmine.2bpp" ; c1f80
+PryceSpriteGFX:: INCBIN "gfx/sprites/pryce.2bpp" ; c2100
+ClairSpriteGFX:: INCBIN "gfx/sprites/clair.2bpp" ; c2280
+BrockSpriteGFX:: INCBIN "gfx/sprites/brock.2bpp" ; c2400
+KarenSpriteGFX:: INCBIN "gfx/sprites/karen.2bpp" ; c2580
+BrunoSpriteGFX:: INCBIN "gfx/sprites/bruno.2bpp" ; c2640
+MistySpriteGFX:: INCBIN "gfx/sprites/misty.2bpp" ; c27c0
+LanceSpriteGFX:: INCBIN "gfx/sprites/lance.2bpp" ; c2940
+SurgeSpriteGFX:: INCBIN "gfx/sprites/surge.2bpp" ; c2ac0
+ErikaSpriteGFX:: INCBIN "gfx/sprites/erika.2bpp" ; c2c40
+KogaSpriteGFX:: INCBIN "gfx/sprites/koga.2bpp" ; c2dc0
+SabrinaSpriteGFX:: INCBIN "gfx/sprites/sabrina.2bpp" ; c2f40
+CooltrainerMSpriteGFX:: INCBIN "gfx/sprites/cooltrainer_m.2bpp" ; c30c0
+CooltrainerFSpriteGFX:: INCBIN "gfx/sprites/cooltrainer_f.2bpp" ; c3240
+BugCatcherSpriteGFX:: INCBIN "gfx/sprites/bug_catcher.2bpp" ; c33c0
+TwinSpriteGFX:: INCBIN "gfx/sprites/twin.2bpp" ; c3540
+YoungsterSpriteGFX:: INCBIN "gfx/sprites/youngster.2bpp" ; c36c0
+LassSpriteGFX:: INCBIN "gfx/sprites/lass.2bpp" ; c3840
+TeacherSpriteGFX:: INCBIN "gfx/sprites/teacher.2bpp" ; c39c0
+BuenaSpriteGFX:: INCBIN "gfx/sprites/buena.2bpp" ; c3b40
+SuperNerdSpriteGFX:: INCBIN "gfx/sprites/super_nerd.2bpp" ; c3cc0
+RockerSpriteGFX:: INCBIN "gfx/sprites/rocker.2bpp" ; c3e40
+
+
+SECTION "Sprites 2", ROMX
+
+PokefanMSpriteGFX:: INCBIN "gfx/sprites/pokefan_m.2bpp" ; c4000
+PokefanFSpriteGFX:: INCBIN "gfx/sprites/pokefan_f.2bpp" ; c4180
+GrampsSpriteGFX:: INCBIN "gfx/sprites/gramps.2bpp" ; c4300
+GrannySpriteGFX:: INCBIN "gfx/sprites/granny.2bpp" ; c4480
+SwimmerGuySpriteGFX:: INCBIN "gfx/sprites/swimmer_guy.2bpp" ; c4600
+SwimmerGirlSpriteGFX:: INCBIN "gfx/sprites/swimmer_girl.2bpp" ; c4780
+BigSnorlaxSpriteGFX:: INCBIN "gfx/sprites/big_snorlax.2bpp" ; c4900
+SurfingPikachuSpriteGFX:: INCBIN "gfx/sprites/surfing_pikachu.2bpp" ; c4980
+RocketSpriteGFX:: INCBIN "gfx/sprites/rocket.2bpp" ; c4b00
+RocketGirlSpriteGFX:: INCBIN "gfx/sprites/rocket_girl.2bpp" ; c4c80
+NurseSpriteGFX:: INCBIN "gfx/sprites/nurse.2bpp" ; c4e00
+LinkReceptionistSpriteGFX:: INCBIN "gfx/sprites/link_receptionist.2bpp" ; c4ec0
+ClerkSpriteGFX:: INCBIN "gfx/sprites/clerk.2bpp" ; c5040
+FisherSpriteGFX:: INCBIN "gfx/sprites/fisher.2bpp" ; c51c0
+FishingGuruSpriteGFX:: INCBIN "gfx/sprites/fishing_guru.2bpp" ; c5340
+ScientistSpriteGFX:: INCBIN "gfx/sprites/scientist.2bpp" ; c54c0
+KimonoGirlSpriteGFX:: INCBIN "gfx/sprites/kimono_girl.2bpp" ; c5640
+SageSpriteGFX:: INCBIN "gfx/sprites/sage.2bpp" ; c57c0
+UnusedGuySpriteGFX:: INCBIN "gfx/sprites/unused_guy.2bpp" ; c5940
+GentlemanSpriteGFX:: INCBIN "gfx/sprites/gentleman.2bpp" ; c5ac0
+BlackBeltSpriteGFX:: INCBIN "gfx/sprites/black_belt.2bpp" ; c5c40
+ReceptionistSpriteGFX:: INCBIN "gfx/sprites/receptionist.2bpp" ; c5dc0
+OfficerSpriteGFX:: INCBIN "gfx/sprites/officer.2bpp" ; c5f40
+CalSpriteGFX:: INCBIN "gfx/sprites/cal.2bpp" ; c60c0
+SlowpokeSpriteGFX:: INCBIN "gfx/sprites/slowpoke.2bpp" ; c6240
+CaptainSpriteGFX:: INCBIN "gfx/sprites/captain.2bpp" ; c6280
+BigLaprasSpriteGFX:: INCBIN "gfx/sprites/big_lapras.2bpp" ; c6400
+GymGuySpriteGFX:: INCBIN "gfx/sprites/gym_guy.2bpp" ; c6480
+SailorSpriteGFX:: INCBIN "gfx/sprites/sailor.2bpp" ; c6600
+BikerSpriteGFX:: INCBIN "gfx/sprites/biker.2bpp" ; c6780
+PharmacistSpriteGFX:: INCBIN "gfx/sprites/pharmacist.2bpp" ; c6900
+MonsterSpriteGFX:: INCBIN "gfx/sprites/monster.2bpp" ; c6a80
+FairySpriteGFX:: INCBIN "gfx/sprites/fairy.2bpp" ; c6c00
+BirdSpriteGFX:: INCBIN "gfx/sprites/bird.2bpp" ; c6d80
+DragonSpriteGFX:: INCBIN "gfx/sprites/dragon.2bpp" ; c6f00
+BigOnixSpriteGFX:: INCBIN "gfx/sprites/big_onix.2bpp" ; c7080
+N64SpriteGFX:: INCBIN "gfx/sprites/n64.2bpp" ; c7140
+SudowoodoSpriteGFX:: INCBIN "gfx/sprites/sudowoodo.2bpp" ; c7180
+SurfSpriteGFX:: INCBIN "gfx/sprites/surf.2bpp" ; c7200
+PokeBallSpriteGFX:: INCBIN "gfx/sprites/poke_ball.2bpp" ; c7380
+PokedexSpriteGFX:: INCBIN "gfx/sprites/pokedex.2bpp" ; c7500
+PaperSpriteGFX:: INCBIN "gfx/sprites/paper.2bpp" ; c7680
+VirtualBoySpriteGFX:: INCBIN "gfx/sprites/virtual_boy.2bpp" ; c7800
+OldLinkReceptionistSpriteGFX:: INCBIN "gfx/sprites/old_link_receptionist.2bpp" ; c7840
+RockSpriteGFX:: INCBIN "gfx/sprites/rock.2bpp" ; c7880
+BoulderSpriteGFX:: INCBIN "gfx/sprites/boulder.2bpp" ; c78c0
+SnesSpriteGFX:: INCBIN "gfx/sprites/snes.2bpp" ; c7900
+FamicomSpriteGFX:: INCBIN "gfx/sprites/famicom.2bpp" ; c7940
+FruitTreeSpriteGFX:: INCBIN "gfx/sprites/fruit_tree.2bpp" ; c7980
+GoldTrophySpriteGFX:: INCBIN "gfx/sprites/gold_trophy.2bpp" ; c79c0
+SilverTrophySpriteGFX:: INCBIN "gfx/sprites/silver_trophy.2bpp" ; c7a00
+KrisSpriteGFX:: INCBIN "gfx/sprites/kris.2bpp" ; c7a40
+KrisBikeSpriteGFX:: INCBIN "gfx/sprites/kris_bike.2bpp" ; c7bc0
+KurtOutsideSpriteGFX:: INCBIN "gfx/sprites/kurt_outside.2bpp" ; c7d40
+SuicuneSpriteGFX:: INCBIN "gfx/sprites/suicune.2bpp" ; c7e00
+EnteiSpriteGFX:: INCBIN "gfx/sprites/entei.2bpp" ; c7e40
+RaikouSpriteGFX:: INCBIN "gfx/sprites/raikou.2bpp" ; c7e80
+StandingYoungsterSpriteGFX:: INCBIN "gfx/sprites/standing_youngster.2bpp" ; c7ec0
diff --git a/gfx/overworld/070.png b/gfx/sprites/big_lapras.png
index 45f27649e..45f27649e 100644
--- a/gfx/overworld/070.png
+++ b/gfx/sprites/big_lapras.png
Binary files differ
diff --git a/gfx/overworld/079.png b/gfx/sprites/big_onix.png
index 7996be17e..7996be17e 100644
--- a/gfx/overworld/079.png
+++ b/gfx/sprites/big_onix.png
Binary files differ
diff --git a/gfx/overworld/050.png b/gfx/sprites/big_snorlax.png
index f53f71105..f53f71105 100644
--- a/gfx/overworld/050.png
+++ b/gfx/sprites/big_snorlax.png
Binary files differ
diff --git a/gfx/overworld/073.png b/gfx/sprites/biker.png
index 5d056cf42..5d056cf42 100644
--- a/gfx/overworld/073.png
+++ b/gfx/sprites/biker.png
Binary files differ
diff --git a/gfx/overworld/007.png b/gfx/sprites/bill.png
index d72bb7ba1..d72bb7ba1 100644
--- a/gfx/overworld/007.png
+++ b/gfx/sprites/bill.png
Binary files differ
diff --git a/gfx/overworld/077.png b/gfx/sprites/bird.png
index 9e2009940..9e2009940 100644
--- a/gfx/overworld/077.png
+++ b/gfx/sprites/bird.png
Binary files differ
diff --git a/gfx/overworld/064.png b/gfx/sprites/black_belt.png
index 9aec228c5..9aec228c5 100644
--- a/gfx/overworld/064.png
+++ b/gfx/sprites/black_belt.png
Binary files differ
diff --git a/gfx/overworld/012.png b/gfx/sprites/blaine.png
index 6ce1f3092..6ce1f3092 100644
--- a/gfx/overworld/012.png
+++ b/gfx/sprites/blaine.png
Binary files differ
diff --git a/gfx/overworld/006.png b/gfx/sprites/blue.png
index 17fc2fdc6..17fc2fdc6 100644
--- a/gfx/overworld/006.png
+++ b/gfx/sprites/blue.png
Binary files differ
diff --git a/gfx/overworld/089.png b/gfx/sprites/boulder.png
index 9b408e021..9b408e021 100644
--- a/gfx/overworld/089.png
+++ b/gfx/sprites/boulder.png
Binary files differ
diff --git a/gfx/overworld/025.png b/gfx/sprites/brock.png
index f9f8ec431..f9f8ec431 100644
--- a/gfx/overworld/025.png
+++ b/gfx/sprites/brock.png
Binary files differ
diff --git a/gfx/overworld/027.png b/gfx/sprites/bruno.png
index 5f77217ef..5f77217ef 100644
--- a/gfx/overworld/027.png
+++ b/gfx/sprites/bruno.png
Binary files differ
diff --git a/gfx/overworld/041.png b/gfx/sprites/buena.png
index af5a7e7e7..af5a7e7e7 100644
--- a/gfx/overworld/041.png
+++ b/gfx/sprites/buena.png
Binary files differ
diff --git a/gfx/overworld/036.png b/gfx/sprites/bug_catcher.png
index e1306b6a0..e1306b6a0 100644
--- a/gfx/overworld/036.png
+++ b/gfx/sprites/bug_catcher.png
Binary files differ
diff --git a/gfx/overworld/019.png b/gfx/sprites/bugsy.png
index b528045b5..b528045b5 100644
--- a/gfx/overworld/019.png
+++ b/gfx/sprites/bugsy.png
Binary files differ
diff --git a/gfx/overworld/067.png b/gfx/sprites/cal.png
index 9dfe77ff4..9dfe77ff4 100644
--- a/gfx/overworld/067.png
+++ b/gfx/sprites/cal.png
Binary files differ
diff --git a/gfx/overworld/069.png b/gfx/sprites/captain.png
index 7408cbbbc..7408cbbbc 100644
--- a/gfx/overworld/069.png
+++ b/gfx/sprites/captain.png
Binary files differ
diff --git a/gfx/overworld/000.png b/gfx/sprites/chris.png
index 1050bb02c..1050bb02c 100644
--- a/gfx/overworld/000.png
+++ b/gfx/sprites/chris.png
Binary files differ
diff --git a/gfx/overworld/001.png b/gfx/sprites/chris_bike.png
index 0d18d11a6..0d18d11a6 100644
--- a/gfx/overworld/001.png
+++ b/gfx/sprites/chris_bike.png
Binary files differ
diff --git a/gfx/overworld/021.png b/gfx/sprites/chuck.png
index 54300be2d..54300be2d 100644
--- a/gfx/overworld/021.png
+++ b/gfx/sprites/chuck.png
Binary files differ
diff --git a/gfx/overworld/024.png b/gfx/sprites/clair.png
index c4e721b75..c4e721b75 100644
--- a/gfx/overworld/024.png
+++ b/gfx/sprites/clair.png
Binary files differ
diff --git a/gfx/overworld/056.png b/gfx/sprites/clerk.png
index 77a5fb914..77a5fb914 100644
--- a/gfx/overworld/056.png
+++ b/gfx/sprites/clerk.png
Binary files differ
diff --git a/gfx/overworld/035.png b/gfx/sprites/cooltrainer_f.png
index 53bf81b13..53bf81b13 100644
--- a/gfx/overworld/035.png
+++ b/gfx/sprites/cooltrainer_f.png
Binary files differ
diff --git a/gfx/overworld/034.png b/gfx/sprites/cooltrainer_m.png
index ffd94f410..ffd94f410 100644
--- a/gfx/overworld/034.png
+++ b/gfx/sprites/cooltrainer_m.png
Binary files differ
diff --git a/gfx/overworld/014.png b/gfx/sprites/daisy.png
index 84f330f1d..84f330f1d 100644
--- a/gfx/overworld/014.png
+++ b/gfx/sprites/daisy.png
Binary files differ
diff --git a/gfx/overworld/078.png b/gfx/sprites/dragon.png
index 3b6c621b8..3b6c621b8 100644
--- a/gfx/overworld/078.png
+++ b/gfx/sprites/dragon.png
Binary files differ
diff --git a/gfx/overworld/008.png b/gfx/sprites/elder.png
index 90b499f16..90b499f16 100644
--- a/gfx/overworld/008.png
+++ b/gfx/sprites/elder.png
Binary files differ
diff --git a/gfx/overworld/015.png b/gfx/sprites/elm.png
index ed1439b69..ed1439b69 100644
--- a/gfx/overworld/015.png
+++ b/gfx/sprites/elm.png
Binary files differ
diff --git a/gfx/overworld/099.png b/gfx/sprites/entei.png
index 1ff4fd63c..1ff4fd63c 100644
--- a/gfx/overworld/099.png
+++ b/gfx/sprites/entei.png
Binary files differ
diff --git a/gfx/overworld/031.png b/gfx/sprites/erika.png
index 22c157d82..22c157d82 100644
--- a/gfx/overworld/031.png
+++ b/gfx/sprites/erika.png
Binary files differ
diff --git a/gfx/overworld/076.png b/gfx/sprites/fairy.png
index 06fe00768..06fe00768 100644
--- a/gfx/overworld/076.png
+++ b/gfx/sprites/fairy.png
Binary files differ
diff --git a/gfx/overworld/017.png b/gfx/sprites/falkner.png
index a9bc75dbd..a9bc75dbd 100644
--- a/gfx/overworld/017.png
+++ b/gfx/sprites/falkner.png
Binary files differ
diff --git a/gfx/overworld/091.png b/gfx/sprites/famicom.png
index 15ff22d0a..15ff22d0a 100644
--- a/gfx/overworld/091.png
+++ b/gfx/sprites/famicom.png
Binary files differ
diff --git a/gfx/overworld/057.png b/gfx/sprites/fisher.png
index a84a2e371..a84a2e371 100644
--- a/gfx/overworld/057.png
+++ b/gfx/sprites/fisher.png
Binary files differ
diff --git a/gfx/overworld/058.png b/gfx/sprites/fishing_guru.png
index 748444f8e..748444f8e 100644
--- a/gfx/overworld/058.png
+++ b/gfx/sprites/fishing_guru.png
Binary files differ
diff --git a/gfx/overworld/092.png b/gfx/sprites/fruit_tree.png
index b27633907..b27633907 100644
--- a/gfx/overworld/092.png
+++ b/gfx/sprites/fruit_tree.png
Binary files differ
diff --git a/gfx/overworld/002.png b/gfx/sprites/gameboy_kid.png
index 0ca4acef9..0ca4acef9 100644
--- a/gfx/overworld/002.png
+++ b/gfx/sprites/gameboy_kid.png
Binary files differ
diff --git a/gfx/overworld/063.png b/gfx/sprites/gentleman.png
index 38a6125d2..38a6125d2 100644
--- a/gfx/overworld/063.png
+++ b/gfx/sprites/gentleman.png
Binary files differ
diff --git a/gfx/overworld/093.png b/gfx/sprites/gold_trophy.png
index cc12f9f34..cc12f9f34 100644
--- a/gfx/overworld/093.png
+++ b/gfx/sprites/gold_trophy.png
Binary files differ
diff --git a/gfx/overworld/046.png b/gfx/sprites/gramps.png
index abe61a31d..abe61a31d 100644
--- a/gfx/overworld/046.png
+++ b/gfx/sprites/gramps.png
Binary files differ
diff --git a/gfx/overworld/047.png b/gfx/sprites/granny.png
index 763b2a2b1..763b2a2b1 100644
--- a/gfx/overworld/047.png
+++ b/gfx/sprites/granny.png
Binary files differ
diff --git a/gfx/overworld/071.png b/gfx/sprites/gym_guy.png
index a1f74da03..a1f74da03 100644
--- a/gfx/overworld/071.png
+++ b/gfx/sprites/gym_guy.png
Binary files differ
diff --git a/gfx/overworld/009.png b/gfx/sprites/janine.png
index b49f8e573..b49f8e573 100644
--- a/gfx/overworld/009.png
+++ b/gfx/sprites/janine.png
Binary files differ
diff --git a/gfx/overworld/022.png b/gfx/sprites/jasmine.png
index 0d8be19ec..0d8be19ec 100644
--- a/gfx/overworld/022.png
+++ b/gfx/sprites/jasmine.png
Binary files differ
diff --git a/gfx/overworld/026.png b/gfx/sprites/karen.png
index 8b95fb3fc..8b95fb3fc 100644
--- a/gfx/overworld/026.png
+++ b/gfx/sprites/karen.png
Binary files differ
diff --git a/gfx/overworld/060.png b/gfx/sprites/kimono_girl.png
index 0ea041f5b..0ea041f5b 100644
--- a/gfx/overworld/060.png
+++ b/gfx/sprites/kimono_girl.png
Binary files differ
diff --git a/gfx/overworld/032.png b/gfx/sprites/koga.png
index 8afd066bd..8afd066bd 100644
--- a/gfx/overworld/032.png
+++ b/gfx/sprites/koga.png
Binary files differ
diff --git a/gfx/overworld/095.png b/gfx/sprites/kris.png
index d4339470e..d4339470e 100644
--- a/gfx/overworld/095.png
+++ b/gfx/sprites/kris.png
Binary files differ
diff --git a/gfx/overworld/096.png b/gfx/sprites/kris_bike.png
index 161ce5722..161ce5722 100644
--- a/gfx/overworld/096.png
+++ b/gfx/sprites/kris_bike.png
Binary files differ
diff --git a/gfx/overworld/010.png b/gfx/sprites/kurt.png
index bd7fc20ea..bd7fc20ea 100644
--- a/gfx/overworld/010.png
+++ b/gfx/sprites/kurt.png
Binary files differ
diff --git a/gfx/overworld/097.png b/gfx/sprites/kurt_outside.png
index 69e46b84c..69e46b84c 100644
--- a/gfx/overworld/097.png
+++ b/gfx/sprites/kurt_outside.png
Binary files differ
diff --git a/gfx/overworld/029.png b/gfx/sprites/lance.png
index 5a2372dfa..5a2372dfa 100644
--- a/gfx/overworld/029.png
+++ b/gfx/sprites/lance.png
Binary files differ
diff --git a/gfx/overworld/039.png b/gfx/sprites/lass.png
index 762108ad5..762108ad5 100644
--- a/gfx/overworld/039.png
+++ b/gfx/sprites/lass.png
Binary files differ
diff --git a/gfx/overworld/055.png b/gfx/sprites/link_receptionist.png
index b6c98bbef..b6c98bbef 100644
--- a/gfx/overworld/055.png
+++ b/gfx/sprites/link_receptionist.png
Binary files differ
diff --git a/gfx/overworld/028.png b/gfx/sprites/misty.png
index 8b9857a85..8b9857a85 100644
--- a/gfx/overworld/028.png
+++ b/gfx/sprites/misty.png
Binary files differ
diff --git a/gfx/overworld/011.png b/gfx/sprites/mom.png
index 36010c92d..36010c92d 100644
--- a/gfx/overworld/011.png
+++ b/gfx/sprites/mom.png
Binary files differ
diff --git a/gfx/overworld/075.png b/gfx/sprites/monster.png
index 80d615b2e..80d615b2e 100644
--- a/gfx/overworld/075.png
+++ b/gfx/sprites/monster.png
Binary files differ
diff --git a/gfx/overworld/020.png b/gfx/sprites/morty.png
index dcee550e0..dcee550e0 100644
--- a/gfx/overworld/020.png
+++ b/gfx/sprites/morty.png
Binary files differ
diff --git a/gfx/overworld/080.png b/gfx/sprites/n64.png
index 6d2bdc8d7..6d2bdc8d7 100644
--- a/gfx/overworld/080.png
+++ b/gfx/sprites/n64.png
Binary files differ
diff --git a/gfx/overworld/054.png b/gfx/sprites/nurse.png
index 4cd71fcfc..4cd71fcfc 100644
--- a/gfx/overworld/054.png
+++ b/gfx/sprites/nurse.png
Binary files differ
diff --git a/gfx/overworld/004.png b/gfx/sprites/oak.png
index 7a76574d0..7a76574d0 100644
--- a/gfx/overworld/004.png
+++ b/gfx/sprites/oak.png
Binary files differ
diff --git a/gfx/overworld/066.png b/gfx/sprites/officer.png
index f62252038..f62252038 100644
--- a/gfx/overworld/066.png
+++ b/gfx/sprites/officer.png
Binary files differ
diff --git a/gfx/overworld/087.png b/gfx/sprites/old_link_receptionist.png
index fad0eedd8..fad0eedd8 100644
--- a/gfx/overworld/087.png
+++ b/gfx/sprites/old_link_receptionist.png
Binary files differ
diff --git a/gfx/overworld/085.png b/gfx/sprites/paper.png
index da171b3b2..da171b3b2 100644
--- a/gfx/overworld/085.png
+++ b/gfx/sprites/paper.png
Binary files differ
diff --git a/gfx/overworld/074.png b/gfx/sprites/pharmacist.png
index ed0fa1d28..ed0fa1d28 100644
--- a/gfx/overworld/074.png
+++ b/gfx/sprites/pharmacist.png
Binary files differ
diff --git a/gfx/overworld/083.png b/gfx/sprites/poke_ball.png
index b12bf897c..b12bf897c 100644
--- a/gfx/overworld/083.png
+++ b/gfx/sprites/poke_ball.png
Binary files differ
diff --git a/gfx/overworld/084.png b/gfx/sprites/pokedex.png
index 63846bfad..63846bfad 100644
--- a/gfx/overworld/084.png
+++ b/gfx/sprites/pokedex.png
Binary files differ
diff --git a/gfx/overworld/045.png b/gfx/sprites/pokefan_f.png
index aa1fbc06f..aa1fbc06f 100644
--- a/gfx/overworld/045.png
+++ b/gfx/sprites/pokefan_f.png
Binary files differ
diff --git a/gfx/overworld/044.png b/gfx/sprites/pokefan_m.png
index fea7979d3..fea7979d3 100644
--- a/gfx/overworld/044.png
+++ b/gfx/sprites/pokefan_m.png
Binary files differ
diff --git a/gfx/overworld/023.png b/gfx/sprites/pryce.png
index 69f152a3c..69f152a3c 100644
--- a/gfx/overworld/023.png
+++ b/gfx/sprites/pryce.png
Binary files differ
diff --git a/gfx/overworld/100.png b/gfx/sprites/raikou.png
index 4a5f1f186..4a5f1f186 100644
--- a/gfx/overworld/100.png
+++ b/gfx/sprites/raikou.png
Binary files differ
diff --git a/gfx/overworld/065.png b/gfx/sprites/receptionist.png
index 0d102b04a..0d102b04a 100644
--- a/gfx/overworld/065.png
+++ b/gfx/sprites/receptionist.png
Binary files differ
diff --git a/gfx/overworld/005.png b/gfx/sprites/red.png
index 018b676f5..018b676f5 100644
--- a/gfx/overworld/005.png
+++ b/gfx/sprites/red.png
Binary files differ
diff --git a/gfx/overworld/013.png b/gfx/sprites/reds_mom.png
index 5644764c0..5644764c0 100644
--- a/gfx/overworld/013.png
+++ b/gfx/sprites/reds_mom.png
Binary files differ
diff --git a/gfx/overworld/088.png b/gfx/sprites/rock.png
index 5a614d7bb..5a614d7bb 100644
--- a/gfx/overworld/088.png
+++ b/gfx/sprites/rock.png
Binary files differ
diff --git a/gfx/overworld/043.png b/gfx/sprites/rocker.png
index 50ac2089e..50ac2089e 100644
--- a/gfx/overworld/043.png
+++ b/gfx/sprites/rocker.png
Binary files differ
diff --git a/gfx/overworld/052.png b/gfx/sprites/rocket.png
index 43a71bd6e..43a71bd6e 100644
--- a/gfx/overworld/052.png
+++ b/gfx/sprites/rocket.png
Binary files differ
diff --git a/gfx/overworld/053.png b/gfx/sprites/rocket_girl.png
index b8714ba6f..b8714ba6f 100644
--- a/gfx/overworld/053.png
+++ b/gfx/sprites/rocket_girl.png
Binary files differ
diff --git a/gfx/overworld/033.png b/gfx/sprites/sabrina.png
index ef29e27d5..ef29e27d5 100644
--- a/gfx/overworld/033.png
+++ b/gfx/sprites/sabrina.png
Binary files differ
diff --git a/gfx/overworld/061.png b/gfx/sprites/sage.png
index 802230467..802230467 100644
--- a/gfx/overworld/061.png
+++ b/gfx/sprites/sage.png
Binary files differ
diff --git a/gfx/overworld/072.png b/gfx/sprites/sailor.png
index b4d3b5f2a..b4d3b5f2a 100644
--- a/gfx/overworld/072.png
+++ b/gfx/sprites/sailor.png
Binary files differ
diff --git a/gfx/overworld/059.png b/gfx/sprites/scientist.png
index 39c44291e..39c44291e 100644
--- a/gfx/overworld/059.png
+++ b/gfx/sprites/scientist.png
Binary files differ
diff --git a/gfx/overworld/003.png b/gfx/sprites/silver.png
index 7d82d400c..7d82d400c 100644
--- a/gfx/overworld/003.png
+++ b/gfx/sprites/silver.png
Binary files differ
diff --git a/gfx/overworld/094.png b/gfx/sprites/silver_trophy.png
index 458cda431..458cda431 100644
--- a/gfx/overworld/094.png
+++ b/gfx/sprites/silver_trophy.png
Binary files differ
diff --git a/gfx/overworld/068.png b/gfx/sprites/slowpoke.png
index d651ad3e6..d651ad3e6 100644
--- a/gfx/overworld/068.png
+++ b/gfx/sprites/slowpoke.png
Binary files differ
diff --git a/gfx/overworld/090.png b/gfx/sprites/snes.png
index 4eaae4591..4eaae4591 100644
--- a/gfx/overworld/090.png
+++ b/gfx/sprites/snes.png
Binary files differ
diff --git a/gfx/overworld/101.png b/gfx/sprites/standing_youngster.png
index 61a8b79c6..61a8b79c6 100644
--- a/gfx/overworld/101.png
+++ b/gfx/sprites/standing_youngster.png
Binary files differ
diff --git a/gfx/overworld/081.png b/gfx/sprites/sudowoodo.png
index 9354f928b..9354f928b 100644
--- a/gfx/overworld/081.png
+++ b/gfx/sprites/sudowoodo.png
Binary files differ
diff --git a/gfx/overworld/098.png b/gfx/sprites/suicune.png
index c3aef5c6c..c3aef5c6c 100644
--- a/gfx/overworld/098.png
+++ b/gfx/sprites/suicune.png
Binary files differ
diff --git a/gfx/overworld/042.png b/gfx/sprites/super_nerd.png
index 6866c7b30..6866c7b30 100644
--- a/gfx/overworld/042.png
+++ b/gfx/sprites/super_nerd.png
Binary files differ
diff --git a/gfx/overworld/082.png b/gfx/sprites/surf.png
index d124616b0..d124616b0 100644
--- a/gfx/overworld/082.png
+++ b/gfx/sprites/surf.png
Binary files differ
diff --git a/gfx/overworld/051.png b/gfx/sprites/surfing_pikachu.png
index e6a3d7d03..e6a3d7d03 100644
--- a/gfx/overworld/051.png
+++ b/gfx/sprites/surfing_pikachu.png
Binary files differ
diff --git a/gfx/overworld/030.png b/gfx/sprites/surge.png
index ae165c7ab..ae165c7ab 100644
--- a/gfx/overworld/030.png
+++ b/gfx/sprites/surge.png
Binary files differ
diff --git a/gfx/overworld/049.png b/gfx/sprites/swimmer_girl.png
index eed753ab2..eed753ab2 100644
--- a/gfx/overworld/049.png
+++ b/gfx/sprites/swimmer_girl.png
Binary files differ
diff --git a/gfx/overworld/048.png b/gfx/sprites/swimmer_guy.png
index 4c1818b2b..4c1818b2b 100644
--- a/gfx/overworld/048.png
+++ b/gfx/sprites/swimmer_guy.png
Binary files differ
diff --git a/gfx/overworld/040.png b/gfx/sprites/teacher.png
index 2107159e9..2107159e9 100644
--- a/gfx/overworld/040.png
+++ b/gfx/sprites/teacher.png
Binary files differ
diff --git a/gfx/overworld/037.png b/gfx/sprites/twin.png
index caa9f43af..caa9f43af 100644
--- a/gfx/overworld/037.png
+++ b/gfx/sprites/twin.png
Binary files differ
diff --git a/gfx/overworld/062.png b/gfx/sprites/unused_guy.png
index d979b9a6e..d979b9a6e 100644
--- a/gfx/overworld/062.png
+++ b/gfx/sprites/unused_guy.png
Binary files differ
diff --git a/gfx/overworld/086.png b/gfx/sprites/virtual_boy.png
index dba7dc130..dba7dc130 100644
--- a/gfx/overworld/086.png
+++ b/gfx/sprites/virtual_boy.png
Binary files differ
diff --git a/gfx/overworld/018.png b/gfx/sprites/whitney.png
index ff8b28b98..ff8b28b98 100644
--- a/gfx/overworld/018.png
+++ b/gfx/sprites/whitney.png
Binary files differ
diff --git a/gfx/overworld/016.png b/gfx/sprites/will.png
index 5229bb404..5229bb404 100644
--- a/gfx/overworld/016.png
+++ b/gfx/sprites/will.png
Binary files differ
diff --git a/gfx/overworld/038.png b/gfx/sprites/youngster.png
index 5c0d33939..5c0d33939 100644
--- a/gfx/overworld/038.png
+++ b/gfx/sprites/youngster.png
Binary files differ
diff --git a/gfx/unknown/0f8aa0.png b/gfx/stats/exp_bar_ends.png
index 252bdd990..252bdd990 100644
--- a/gfx/unknown/0f8aa0.png
+++ b/gfx/stats/exp_bar_ends.png
Binary files differ
diff --git a/gfx/unknown/0f89b0.png b/gfx/stats/stats_tiles.png
index 151704af5..151704af5 100644
--- a/gfx/unknown/0f89b0.png
+++ b/gfx/stats/stats_tiles.png
Binary files differ
diff --git a/gfx/tilesets/01.2bpp.lz.0c7e555a b/gfx/tilesets/01.2bpp.lz.0c7e555a
deleted file mode 100644
index 9821e1433..000000000
--- a/gfx/tilesets/01.2bpp.lz.0c7e555a
+++ /dev/null
Binary files differ
diff --git a/gfx/tilesets/01.png b/gfx/tilesets/01.png
deleted file mode 100644
index 0fc2db12f..000000000
--- a/gfx/tilesets/01.png
+++ /dev/null
Binary files differ
diff --git a/gfx/tilesets/26.2bpp.lz.8b42470b b/gfx/tilesets/aerodactyl_word_room.2bpp.lz.8b42470b
index 68a4fdad0..68a4fdad0 100644
--- a/gfx/tilesets/26.2bpp.lz.8b42470b
+++ b/gfx/tilesets/aerodactyl_word_room.2bpp.lz.8b42470b
Binary files differ
diff --git a/gfx/tilesets/26.png b/gfx/tilesets/aerodactyl_word_room.png
index f41866c58..f41866c58 100644
--- a/gfx/tilesets/26.png
+++ b/gfx/tilesets/aerodactyl_word_room.png
Binary files differ
diff --git a/gfx/tilesets/22.2bpp.lz.467b6a2d b/gfx/tilesets/battle_tower.2bpp.lz.467b6a2d
index fa5d0a9f0..fa5d0a9f0 100644
--- a/gfx/tilesets/22.2bpp.lz.467b6a2d
+++ b/gfx/tilesets/battle_tower.2bpp.lz.467b6a2d
Binary files differ
diff --git a/gfx/tilesets/22.png b/gfx/tilesets/battle_tower.png
index 1cd57402d..1cd57402d 100644
--- a/gfx/tilesets/22.png
+++ b/gfx/tilesets/battle_tower.png
Binary files differ
diff --git a/gfx/tilesets/02.2bpp.lz.391603fb b/gfx/tilesets/battle_tower_outside.2bpp.lz.391603fb
index 64f23e23b..64f23e23b 100644
--- a/gfx/tilesets/02.2bpp.lz.391603fb
+++ b/gfx/tilesets/battle_tower_outside.2bpp.lz.391603fb
Binary files differ
diff --git a/gfx/tilesets/02.png b/gfx/tilesets/battle_tower_outside.png
index 126573b7b..126573b7b 100644
--- a/gfx/tilesets/02.png
+++ b/gfx/tilesets/battle_tower_outside.png
Binary files differ
diff --git a/gfx/tilesets/32.2bpp.lz.8b42470b b/gfx/tilesets/beta_word_room.2bpp.lz.8b42470b
index 68a4fdad0..68a4fdad0 100644
--- a/gfx/tilesets/32.2bpp.lz.8b42470b
+++ b/gfx/tilesets/beta_word_room.2bpp.lz.8b42470b
Binary files differ
diff --git a/gfx/tilesets/32.png b/gfx/tilesets/beta_word_room.png
index f41866c58..f41866c58 100644
--- a/gfx/tilesets/32.png
+++ b/gfx/tilesets/beta_word_room.png
Binary files differ
diff --git a/gfx/tilesets/24.2bpp.lz.3437812a b/gfx/tilesets/cave.2bpp.lz.3437812a
index 69069fb75..69069fb75 100644
--- a/gfx/tilesets/24.2bpp.lz.3437812a
+++ b/gfx/tilesets/cave.2bpp.lz.3437812a
Binary files differ
diff --git a/gfx/tilesets/24.png b/gfx/tilesets/cave.png
index 0e5bdee7e..0e5bdee7e 100644
--- a/gfx/tilesets/24.png
+++ b/gfx/tilesets/cave.png
Binary files differ
diff --git a/gfx/tilesets/13.2bpp.lz.63b414d4 b/gfx/tilesets/celadon_mansion.2bpp.lz.63b414d4
index b68f147d0..b68f147d0 100644
--- a/gfx/tilesets/13.2bpp.lz.63b414d4
+++ b/gfx/tilesets/celadon_mansion.2bpp.lz.63b414d4
Binary files differ
diff --git a/gfx/tilesets/13.png b/gfx/tilesets/celadon_mansion.png
index 7dde8574e..7dde8574e 100644
--- a/gfx/tilesets/13.png
+++ b/gfx/tilesets/celadon_mansion.png
Binary files differ
diff --git a/gfx/tilesets/14.2bpp.lz.71d29a2f b/gfx/tilesets/game_corner.2bpp.lz.71d29a2f
index f7e185b4e..f7e185b4e 100644
--- a/gfx/tilesets/14.2bpp.lz.71d29a2f
+++ b/gfx/tilesets/game_corner.2bpp.lz.71d29a2f
Binary files differ
diff --git a/gfx/tilesets/14.png b/gfx/tilesets/game_corner.png
index 776900638..776900638 100644
--- a/gfx/tilesets/14.png
+++ b/gfx/tilesets/game_corner.png
Binary files differ
diff --git a/gfx/tilesets/08.2bpp.lz.f5a55006 b/gfx/tilesets/gate.2bpp.lz.f5a55006
index 724b6b8b7..724b6b8b7 100644
--- a/gfx/tilesets/08.2bpp.lz.f5a55006
+++ b/gfx/tilesets/gate.2bpp.lz.f5a55006
Binary files differ
diff --git a/gfx/tilesets/08.png b/gfx/tilesets/gate.png
index b8f2db2d2..b8f2db2d2 100644
--- a/gfx/tilesets/08.png
+++ b/gfx/tilesets/gate.png
Binary files differ
diff --git a/gfx/tilesets/15.2bpp.lz.c1f2ed8f b/gfx/tilesets/gym_1.2bpp.lz.c1f2ed8f
index 6b45c769d..6b45c769d 100644
--- a/gfx/tilesets/15.2bpp.lz.c1f2ed8f
+++ b/gfx/tilesets/gym_1.2bpp.lz.c1f2ed8f
Binary files differ
diff --git a/gfx/tilesets/15.png b/gfx/tilesets/gym_1.png
index 582b9365d..582b9365d 100644
--- a/gfx/tilesets/15.png
+++ b/gfx/tilesets/gym_1.png
Binary files differ
diff --git a/gfx/tilesets/33.2bpp.lz.8b42470b b/gfx/tilesets/ho_oh_word_room.2bpp.lz.8b42470b
index 68a4fdad0..68a4fdad0 100644
--- a/gfx/tilesets/33.2bpp.lz.8b42470b
+++ b/gfx/tilesets/ho_oh_word_room.2bpp.lz.8b42470b
Binary files differ
diff --git a/gfx/tilesets/33.png b/gfx/tilesets/ho_oh_word_room.png
index f41866c58..f41866c58 100644
--- a/gfx/tilesets/33.png
+++ b/gfx/tilesets/ho_oh_word_room.png
Binary files differ
diff --git a/gfx/tilesets/05.2bpp.lz.c848ef13 b/gfx/tilesets/house_1.2bpp.lz.c848ef13
index f9afaf70d..f9afaf70d 100644
--- a/gfx/tilesets/05.2bpp.lz.c848ef13
+++ b/gfx/tilesets/house_1.2bpp.lz.c848ef13
Binary files differ
diff --git a/gfx/tilesets/05.png b/gfx/tilesets/house_1.png
index 3ab7b5ce8..3ab7b5ce8 100644
--- a/gfx/tilesets/05.png
+++ b/gfx/tilesets/house_1.png
Binary files differ
diff --git a/gfx/tilesets/29.2bpp.lz.e23bc89f b/gfx/tilesets/ice_path.2bpp.lz.e23bc89f
index 25cc45c85..25cc45c85 100644
--- a/gfx/tilesets/29.2bpp.lz.e23bc89f
+++ b/gfx/tilesets/ice_path.2bpp.lz.e23bc89f
Binary files differ
diff --git a/gfx/tilesets/29.png b/gfx/tilesets/ice_path.png
index d70eb53be..d70eb53be 100644
--- a/gfx/tilesets/29.png
+++ b/gfx/tilesets/ice_path.png
Binary files differ
diff --git a/gfx/tilesets/31.2bpp.lz.6b0ac896 b/gfx/tilesets/ilex_forest.2bpp.lz.6b0ac896
index 7b5355705..7b5355705 100644
--- a/gfx/tilesets/31.2bpp.lz.6b0ac896
+++ b/gfx/tilesets/ilex_forest.2bpp.lz.6b0ac896
Binary files differ
diff --git a/gfx/tilesets/31.png b/gfx/tilesets/ilex_forest.png
index a85cc0394..a85cc0394 100644
--- a/gfx/tilesets/31.png
+++ b/gfx/tilesets/ilex_forest.png
Binary files differ
diff --git a/gfx/tilesets/00.2bpp.lz.0c7e555a b/gfx/tilesets/johto_1.2bpp.lz.0c7e555a
index 9821e1433..9821e1433 100644
--- a/gfx/tilesets/00.2bpp.lz.0c7e555a
+++ b/gfx/tilesets/johto_1.2bpp.lz.0c7e555a
Binary files differ
diff --git a/gfx/tilesets/00.png b/gfx/tilesets/johto_1.png
index 0fc2db12f..0fc2db12f 100644
--- a/gfx/tilesets/00.png
+++ b/gfx/tilesets/johto_1.png
Binary files differ
diff --git a/gfx/tilesets/04.2bpp.lz.391603fb b/gfx/tilesets/johto_2.2bpp.lz.391603fb
index 64f23e23b..64f23e23b 100644
--- a/gfx/tilesets/04.2bpp.lz.391603fb
+++ b/gfx/tilesets/johto_2.2bpp.lz.391603fb
Binary files differ
diff --git a/gfx/tilesets/04.png b/gfx/tilesets/johto_2.png
index 126573b7b..126573b7b 100644
--- a/gfx/tilesets/04.png
+++ b/gfx/tilesets/johto_2.png
Binary files differ
diff --git a/gfx/tilesets/34.2bpp.lz.8b42470b b/gfx/tilesets/kabuto_word_room.2bpp.lz.8b42470b
index 68a4fdad0..68a4fdad0 100644
--- a/gfx/tilesets/34.2bpp.lz.8b42470b
+++ b/gfx/tilesets/kabuto_word_room.2bpp.lz.8b42470b
Binary files differ
diff --git a/gfx/tilesets/34.png b/gfx/tilesets/kabuto_word_room.png
index f41866c58..f41866c58 100644
--- a/gfx/tilesets/34.png
+++ b/gfx/tilesets/kabuto_word_room.png
Binary files differ
diff --git a/gfx/tilesets/03.2bpp.lz.a29f5d51 b/gfx/tilesets/kanto.2bpp.lz.a29f5d51
index d925ee111..d925ee111 100644
--- a/gfx/tilesets/03.2bpp.lz.a29f5d51
+++ b/gfx/tilesets/kanto.2bpp.lz.a29f5d51
Binary files differ
diff --git a/gfx/tilesets/03.png b/gfx/tilesets/kanto.png
index 08b2cbeea..08b2cbeea 100644
--- a/gfx/tilesets/03.png
+++ b/gfx/tilesets/kanto.png
Binary files differ
diff --git a/gfx/tilesets/16.2bpp.lz.dd51d079 b/gfx/tilesets/kurts_house.2bpp.lz.dd51d079
index 28f025413..28f025413 100644
--- a/gfx/tilesets/16.2bpp.lz.dd51d079
+++ b/gfx/tilesets/kurts_house.2bpp.lz.dd51d079
Binary files differ
diff --git a/gfx/tilesets/16.png b/gfx/tilesets/kurts_house.png
index 3d6f1b511..3d6f1b511 100644
--- a/gfx/tilesets/16.png
+++ b/gfx/tilesets/kurts_house.png
Binary files differ
diff --git a/gfx/tilesets/10.2bpp.lz.b8d0f547 b/gfx/tilesets/lab.2bpp.lz.b8d0f547
index cd0f43861..cd0f43861 100644
--- a/gfx/tilesets/10.2bpp.lz.b8d0f547
+++ b/gfx/tilesets/lab.2bpp.lz.b8d0f547
Binary files differ
diff --git a/gfx/tilesets/10.png b/gfx/tilesets/lab.png
index 418a068fa..418a068fa 100644
--- a/gfx/tilesets/10.png
+++ b/gfx/tilesets/lab.png
Binary files differ
diff --git a/gfx/tilesets/19.2bpp.lz.0c1544c1 b/gfx/tilesets/lighthouse.2bpp.lz.0c1544c1
index d208e65c3..d208e65c3 100644
--- a/gfx/tilesets/19.2bpp.lz.0c1544c1
+++ b/gfx/tilesets/lighthouse.2bpp.lz.0c1544c1
Binary files differ
diff --git a/gfx/tilesets/19.png b/gfx/tilesets/lighthouse.png
index 920ee30ec..920ee30ec 100644
--- a/gfx/tilesets/19.png
+++ b/gfx/tilesets/lighthouse.png
Binary files differ
diff --git a/gfx/tilesets/12.2bpp.lz.e2e94f92 b/gfx/tilesets/mart.2bpp.lz.e2e94f92
index e8091a899..e8091a899 100644
--- a/gfx/tilesets/12.2bpp.lz.e2e94f92
+++ b/gfx/tilesets/mart.2bpp.lz.e2e94f92
Binary files differ
diff --git a/gfx/tilesets/12.png b/gfx/tilesets/mart.png
index 4053283bc..4053283bc 100644
--- a/gfx/tilesets/12.png
+++ b/gfx/tilesets/mart.png
Binary files differ
diff --git a/gfx/tilesets/18.2bpp.lz.93800351 b/gfx/tilesets/olivine_gym.2bpp.lz.93800351
index e19994f37..e19994f37 100644
--- a/gfx/tilesets/18.2bpp.lz.93800351
+++ b/gfx/tilesets/olivine_gym.2bpp.lz.93800351
Binary files differ
diff --git a/gfx/tilesets/18.png b/gfx/tilesets/olivine_gym.png
index 350c04932..350c04932 100644
--- a/gfx/tilesets/18.png
+++ b/gfx/tilesets/olivine_gym.png
Binary files differ
diff --git a/gfx/tilesets/35.2bpp.lz.8b42470b b/gfx/tilesets/omanyte_word_room.2bpp.lz.8b42470b
index 68a4fdad0..68a4fdad0 100644
--- a/gfx/tilesets/35.2bpp.lz.8b42470b
+++ b/gfx/tilesets/omanyte_word_room.2bpp.lz.8b42470b
Binary files differ
diff --git a/gfx/tilesets/35.png b/gfx/tilesets/omanyte_word_room.png
index f41866c58..f41866c58 100644
--- a/gfx/tilesets/35.png
+++ b/gfx/tilesets/omanyte_word_room.png
Binary files differ
diff --git a/gfx/tilesets/25.2bpp.lz.7fcb81d6 b/gfx/tilesets/park.2bpp.lz.7fcb81d6
index 01a0e56bd..01a0e56bd 100644
--- a/gfx/tilesets/25.2bpp.lz.7fcb81d6
+++ b/gfx/tilesets/park.2bpp.lz.7fcb81d6
Binary files differ
diff --git a/gfx/tilesets/25.png b/gfx/tilesets/park.png
index 7a4a5f8eb..7a4a5f8eb 100644
--- a/gfx/tilesets/25.png
+++ b/gfx/tilesets/park.png
Binary files differ
diff --git a/gfx/tilesets/06.2bpp.lz.252cbd8f b/gfx/tilesets/players_house.2bpp.lz.252cbd8f
index 17c64de65..17c64de65 100644
--- a/gfx/tilesets/06.2bpp.lz.252cbd8f
+++ b/gfx/tilesets/players_house.2bpp.lz.252cbd8f
Binary files differ
diff --git a/gfx/tilesets/06.png b/gfx/tilesets/players_house.png
index b49f799d8..b49f799d8 100644
--- a/gfx/tilesets/06.png
+++ b/gfx/tilesets/players_house.png
Binary files differ
diff --git a/gfx/tilesets/20.2bpp.lz.35e51007 b/gfx/tilesets/players_house_2f.2bpp.lz.35e51007
index b458a501d..b458a501d 100644
--- a/gfx/tilesets/20.2bpp.lz.35e51007
+++ b/gfx/tilesets/players_house_2f.2bpp.lz.35e51007
Binary files differ
diff --git a/gfx/tilesets/20.png b/gfx/tilesets/players_house_2f.png
index e46a847b9..e46a847b9 100644
--- a/gfx/tilesets/20.png
+++ b/gfx/tilesets/players_house_2f.png
Binary files differ
diff --git a/gfx/tilesets/07.2bpp.lz.e1c4014c b/gfx/tilesets/pokecenter.2bpp.lz.e1c4014c
index 71783d9f2..71783d9f2 100644
--- a/gfx/tilesets/07.2bpp.lz.e1c4014c
+++ b/gfx/tilesets/pokecenter.2bpp.lz.e1c4014c
Binary files differ
diff --git a/gfx/tilesets/07.png b/gfx/tilesets/pokecenter.png
index d4084ebd4..d4084ebd4 100644
--- a/gfx/tilesets/07.png
+++ b/gfx/tilesets/pokecenter.png
Binary files differ
diff --git a/gfx/tilesets/21.2bpp.lz.febbc4ec b/gfx/tilesets/pokecom_center.2bpp.lz.febbc4ec
index 5b787c854..5b787c854 100644
--- a/gfx/tilesets/21.2bpp.lz.febbc4ec
+++ b/gfx/tilesets/pokecom_center.2bpp.lz.febbc4ec
Binary files differ
diff --git a/gfx/tilesets/21.png b/gfx/tilesets/pokecom_center.png
index 889b02727..889b02727 100644
--- a/gfx/tilesets/21.png
+++ b/gfx/tilesets/pokecom_center.png
Binary files differ
diff --git a/gfx/tilesets/09.2bpp.lz.56b1a405 b/gfx/tilesets/port.2bpp.lz.56b1a405
index 96dd2e594..96dd2e594 100644
--- a/gfx/tilesets/09.2bpp.lz.56b1a405
+++ b/gfx/tilesets/port.2bpp.lz.56b1a405
Binary files differ
diff --git a/gfx/tilesets/09.png b/gfx/tilesets/port.png
index 6990a7d7b..6990a7d7b 100644
--- a/gfx/tilesets/09.png
+++ b/gfx/tilesets/port.png
Binary files differ
diff --git a/gfx/tilesets/11.2bpp.lz.454cfd8b b/gfx/tilesets/power_plant.2bpp.lz.454cfd8b
index 584e54dd2..584e54dd2 100644
--- a/gfx/tilesets/11.2bpp.lz.454cfd8b
+++ b/gfx/tilesets/power_plant.2bpp.lz.454cfd8b
Binary files differ
diff --git a/gfx/tilesets/11.png b/gfx/tilesets/power_plant.png
index b72e3f401..b72e3f401 100644
--- a/gfx/tilesets/11.png
+++ b/gfx/tilesets/power_plant.png
Binary files differ
diff --git a/gfx/tilesets/27.2bpp.lz.27cdd9ad b/gfx/tilesets/radio_tower.2bpp.lz.27cdd9ad
index 34be33856..34be33856 100644
--- a/gfx/tilesets/27.2bpp.lz.27cdd9ad
+++ b/gfx/tilesets/radio_tower.2bpp.lz.27cdd9ad
Binary files differ
diff --git a/gfx/tilesets/27.png b/gfx/tilesets/radio_tower.png
index 8d2d32e1f..8d2d32e1f 100644
--- a/gfx/tilesets/27.png
+++ b/gfx/tilesets/radio_tower.png
Binary files differ
diff --git a/gfx/tilesets/36.2bpp.lz.8b42470b b/gfx/tilesets/ruins_of_alph.2bpp.lz.8b42470b
index 68a4fdad0..68a4fdad0 100644
--- a/gfx/tilesets/36.2bpp.lz.8b42470b
+++ b/gfx/tilesets/ruins_of_alph.2bpp.lz.8b42470b
Binary files differ
diff --git a/gfx/tilesets/36.png b/gfx/tilesets/ruins_of_alph.png
index f41866c58..f41866c58 100644
--- a/gfx/tilesets/36.png
+++ b/gfx/tilesets/ruins_of_alph.png
Binary files differ
diff --git a/gfx/tilesets/23.2bpp.lz.bc56789c b/gfx/tilesets/sprout_tower.2bpp.lz.bc56789c
index 2033306e3..2033306e3 100644
--- a/gfx/tilesets/23.2bpp.lz.bc56789c
+++ b/gfx/tilesets/sprout_tower.2bpp.lz.bc56789c
Binary files differ
diff --git a/gfx/tilesets/23.png b/gfx/tilesets/sprout_tower.png
index 268fc998f..268fc998f 100644
--- a/gfx/tilesets/23.png
+++ b/gfx/tilesets/sprout_tower.png
Binary files differ
diff --git a/gfx/tilesets/17.2bpp.lz.1600ca86 b/gfx/tilesets/train_station.2bpp.lz.1600ca86
index 56e509f5e..56e509f5e 100644
--- a/gfx/tilesets/17.2bpp.lz.1600ca86
+++ b/gfx/tilesets/train_station.2bpp.lz.1600ca86
Binary files differ
diff --git a/gfx/tilesets/17.png b/gfx/tilesets/train_station.png
index 0c148f95d..0c148f95d 100644
--- a/gfx/tilesets/17.png
+++ b/gfx/tilesets/train_station.png
Binary files differ
diff --git a/gfx/tilesets/28.2bpp.lz.cace291c b/gfx/tilesets/underground.2bpp.lz.cace291c
index c204dca26..c204dca26 100644
--- a/gfx/tilesets/28.2bpp.lz.cace291c
+++ b/gfx/tilesets/underground.2bpp.lz.cace291c
Binary files differ
diff --git a/gfx/tilesets/28.png b/gfx/tilesets/underground.png
index 0a83d2043..0a83d2043 100644
--- a/gfx/tilesets/28.png
+++ b/gfx/tilesets/underground.png
Binary files differ
diff --git a/gfx/tilesets/water.png b/gfx/tilesets/water/water.png
index 0aa2640c9..0aa2640c9 100644
--- a/gfx/tilesets/water.png
+++ b/gfx/tilesets/water/water.png
Binary files differ
diff --git a/gfx/tilesets/30.2bpp.lz.25b9c4b6 b/gfx/tilesets/whirl_islands.2bpp.lz.25b9c4b6
index 50a5ab9ac..50a5ab9ac 100644
--- a/gfx/tilesets/30.2bpp.lz.25b9c4b6
+++ b/gfx/tilesets/whirl_islands.2bpp.lz.25b9c4b6
Binary files differ
diff --git a/gfx/tilesets/30.png b/gfx/tilesets/whirl_islands.png
index 9dc74c45b..9dc74c45b 100644
--- a/gfx/tilesets/30.png
+++ b/gfx/tilesets/whirl_islands.png
Binary files differ
diff --git a/gfx/unknown/0908fb.png b/gfx/timeset/background.png
index e2bd6299c..e2bd6299c 100644
--- a/gfx/unknown/0908fb.png
+++ b/gfx/timeset/background.png
Binary files differ
diff --git a/gfx/unknown/09090b.png b/gfx/timeset/down_arrow.png
index 33803e197..33803e197 100644
--- a/gfx/unknown/09090b.png
+++ b/gfx/timeset/down_arrow.png
Binary files differ
diff --git a/gfx/unknown/090903.png b/gfx/timeset/up_arrow.png
index d8cfc7f3f..d8cfc7f3f 100644
--- a/gfx/unknown/090903.png
+++ b/gfx/timeset/up_arrow.png
Binary files differ
diff --git a/gfx/unknown/16d5f5.tilemap b/gfx/trade/border_cable_bottom.tilemap
index 9d5bda9f3..9d5bda9f3 100644
--- a/gfx/unknown/16d5f5.tilemap
+++ b/gfx/trade/border_cable_bottom.tilemap
diff --git a/gfx/unknown/16d5cd.tilemap b/gfx/trade/border_cable_top.tilemap
index eab0f6c88..eab0f6c88 100644
--- a/gfx/unknown/16d5cd.tilemap
+++ b/gfx/trade/border_cable_top.tilemap
diff --git a/gfx/unknown/16d465.tilemap b/gfx/trade/border_mobile_fullscreen.tilemap
index 495e01e4d..495e01e4d 100644
--- a/gfx/unknown/16d465.tilemap
+++ b/gfx/trade/border_mobile_fullscreen.tilemap
diff --git a/gfx/unknown/16cfc1.png b/gfx/trade/border_tiles.png
index 390b107fd..390b107fd 100644
--- a/gfx/unknown/16cfc1.png
+++ b/gfx/trade/border_tiles.png
Binary files differ
diff --git a/gfx/unknown/029f54.png b/gfx/trade/unused_gen_1_border_tiles.png
index d3ac169fc..d3ac169fc 100644
--- a/gfx/unknown/029f54.png
+++ b/gfx/trade/unused_gen_1_border_tiles.png
Binary files differ
diff --git a/gfx/misc/badges.png b/gfx/trainer_card/badges.png
index 4e5820da8..4e5820da8 100644
--- a/gfx/misc/badges.png
+++ b/gfx/trainer_card/badges.png
Binary files differ
diff --git a/gfx/misc/card_right_corner.png b/gfx/trainer_card/card_right_corner.png
index fa9aea024..fa9aea024 100644
--- a/gfx/misc/card_right_corner.png
+++ b/gfx/trainer_card/card_right_corner.png
Binary files differ
diff --git a/gfx/misc/card_status.png b/gfx/trainer_card/card_status.png
index b33bb2029..b33bb2029 100644
--- a/gfx/misc/card_status.png
+++ b/gfx/trainer_card/card_status.png
Binary files differ
diff --git a/gfx/misc/chris_card.png b/gfx/trainer_card/chris_card.png
index 977981d41..977981d41 100644
--- a/gfx/misc/chris_card.png
+++ b/gfx/trainer_card/chris_card.png
Binary files differ
diff --git a/gfx/misc/kris_card.png b/gfx/trainer_card/kris_card.png
index 2ffa11159..2ffa11159 100644
--- a/gfx/misc/kris_card.png
+++ b/gfx/trainer_card/kris_card.png
Binary files differ
diff --git a/gfx/misc/leaders.png b/gfx/trainer_card/leaders.png
index 6e7eb0f8d..6e7eb0f8d 100644
--- a/gfx/misc/leaders.png
+++ b/gfx/trainer_card/leaders.png
Binary files differ
diff --git a/gfx/misc/trainer_card.png b/gfx/trainer_card/trainer_card.png
index 88ce35bca..88ce35bca 100644
--- a/gfx/misc/trainer_card.png
+++ b/gfx/trainer_card/trainer_card.png
Binary files differ
diff --git a/gfx/trainer_palettes.asm b/gfx/trainer_palettes.asm
new file mode 100644
index 000000000..c943e49d7
--- /dev/null
+++ b/gfx/trainer_palettes.asm
@@ -0,0 +1,76 @@
+TrainerPalettes: ; b0ce
+; entries correspond to trainer classes
+
+PlayerPalette: ; b0ce
+; Chris uses the same colors as Cal
+INCLUDE "gfx/trainers/cal.pal"
+KrisPalette: ; b0d0
+; Kris shares Falkner's palette
+INCLUDE "gfx/trainers/falkner.pal"
+INCLUDE "gfx/trainers/whitney.pal"
+INCLUDE "gfx/trainers/bugsy.pal"
+INCLUDE "gfx/trainers/morty.pal"
+INCLUDE "gfx/trainers/pryce.pal"
+INCLUDE "gfx/trainers/jasmine.pal"
+INCLUDE "gfx/trainers/chuck.pal"
+INCLUDE "gfx/trainers/clair.pal"
+INCLUDE "gfx/trainers/rival1.pal"
+INCLUDE "gfx/trainers/oak.pal"
+INCLUDE "gfx/trainers/will.pal"
+INCLUDE "gfx/trainers/cal.pal"
+INCLUDE "gfx/trainers/bruno.pal"
+INCLUDE "gfx/trainers/karen.pal"
+INCLUDE "gfx/trainers/koga.pal"
+INCLUDE "gfx/trainers/champion.pal"
+INCLUDE "gfx/trainers/brock.pal"
+INCLUDE "gfx/trainers/misty.pal"
+INCLUDE "gfx/trainers/lt_surge.pal"
+INCLUDE "gfx/trainers/scientist.pal"
+INCLUDE "gfx/trainers/erika.pal"
+INCLUDE "gfx/trainers/youngster.pal"
+INCLUDE "gfx/trainers/schoolboy.pal"
+INCLUDE "gfx/trainers/bird_keeper.pal"
+INCLUDE "gfx/trainers/lass.pal"
+INCLUDE "gfx/trainers/janine.pal"
+INCLUDE "gfx/trainers/cooltrainer_m.pal"
+INCLUDE "gfx/trainers/cooltrainer_f.pal"
+INCLUDE "gfx/trainers/beauty.pal"
+INCLUDE "gfx/trainers/pokemaniac.pal"
+INCLUDE "gfx/trainers/grunt_m.pal"
+INCLUDE "gfx/trainers/gentleman.pal"
+INCLUDE "gfx/trainers/skier.pal"
+INCLUDE "gfx/trainers/teacher.pal"
+INCLUDE "gfx/trainers/sabrina.pal"
+INCLUDE "gfx/trainers/bug_catcher.pal"
+INCLUDE "gfx/trainers/fisher.pal"
+INCLUDE "gfx/trainers/swimmer_m.pal"
+INCLUDE "gfx/trainers/swimmer_f.pal"
+INCLUDE "gfx/trainers/sailor.pal"
+INCLUDE "gfx/trainers/super_nerd.pal"
+INCLUDE "gfx/trainers/rival2.pal"
+INCLUDE "gfx/trainers/guitarist.pal"
+INCLUDE "gfx/trainers/hiker.pal"
+INCLUDE "gfx/trainers/biker.pal"
+INCLUDE "gfx/trainers/blaine.pal"
+INCLUDE "gfx/trainers/burglar.pal"
+INCLUDE "gfx/trainers/firebreather.pal"
+INCLUDE "gfx/trainers/juggler.pal"
+INCLUDE "gfx/trainers/blackbelt_t.pal"
+INCLUDE "gfx/trainers/executive_m.pal"
+INCLUDE "gfx/trainers/psychic_t.pal"
+INCLUDE "gfx/trainers/picnicker.pal"
+INCLUDE "gfx/trainers/camper.pal"
+INCLUDE "gfx/trainers/executive_f.pal"
+INCLUDE "gfx/trainers/sage.pal"
+INCLUDE "gfx/trainers/medium.pal"
+INCLUDE "gfx/trainers/boarder.pal"
+INCLUDE "gfx/trainers/pokefan_m.pal"
+INCLUDE "gfx/trainers/kimono_girl.pal"
+INCLUDE "gfx/trainers/twins.pal"
+INCLUDE "gfx/trainers/pokefan_f.pal"
+INCLUDE "gfx/trainers/red.pal"
+INCLUDE "gfx/trainers/blue.pal"
+INCLUDE "gfx/trainers/officer.pal"
+INCLUDE "gfx/trainers/grunt_f.pal"
+INCLUDE "gfx/trainers/mysticalman.pal"
+; b1de
diff --git a/gfx/trainer_pic_pointers.asm b/gfx/trainer_pic_pointers.asm
new file mode 100644
index 000000000..201b44200
--- /dev/null
+++ b/gfx/trainer_pic_pointers.asm
@@ -0,0 +1,69 @@
+TrainerPicPointers::
+; entries correspond to trainer classes (see constants/trainer_constants.asm)
+ dba_pic FalknerPic
+ dba_pic WhitneyPic
+ dba_pic BugsyPic
+ dba_pic MortyPic
+ dba_pic PrycePic
+ dba_pic JasminePic
+ dba_pic ChuckPic
+ dba_pic ClairPic
+ dba_pic Rival1Pic
+ dba_pic PokemonProfPic
+ dba_pic WillPic
+ dba_pic CalPic
+ dba_pic BrunoPic
+ dba_pic KarenPic
+ dba_pic KogaPic
+ dba_pic ChampionPic
+ dba_pic BrockPic
+ dba_pic MistyPic
+ dba_pic LtSurgePic
+ dba_pic ScientistPic
+ dba_pic ErikaPic
+ dba_pic YoungsterPic
+ dba_pic SchoolboyPic
+ dba_pic BirdKeeperPic
+ dba_pic LassPic
+ dba_pic JaninePic
+ dba_pic CooltrainermPic
+ dba_pic CooltrainerfPic
+ dba_pic BeautyPic
+ dba_pic PokemaniacPic
+ dba_pic GruntmPic
+ dba_pic GentlemanPic
+ dba_pic SkierPic
+ dba_pic TeacherPic
+ dba_pic SabrinaPic
+ dba_pic BugCatcherPic
+ dba_pic FisherPic
+ dba_pic SwimmermPic
+ dba_pic SwimmerfPic
+ dba_pic SailorPic
+ dba_pic SuperNerdPic
+ dba_pic Rival2Pic
+ dba_pic GuitaristPic
+ dba_pic HikerPic
+ dba_pic BikerPic
+ dba_pic BlainePic
+ dba_pic BurglarPic
+ dba_pic FirebreatherPic
+ dba_pic JugglerPic
+ dba_pic BlackbeltTPic
+ dba_pic ExecutivemPic
+ dba_pic PsychicTPic
+ dba_pic PicnickerPic
+ dba_pic CamperPic
+ dba_pic ExecutivefPic
+ dba_pic SagePic
+ dba_pic MediumPic
+ dba_pic BoarderPic
+ dba_pic PokefanmPic
+ dba_pic KimonoGirlPic
+ dba_pic TwinsPic
+ dba_pic PokefanfPic
+ dba_pic RedPic
+ dba_pic BluePic
+ dba_pic OfficerPic
+ dba_pic GruntfPic
+ dba_pic MysticalmanPic
diff --git a/gfx/trainers/palette_pointers.asm b/gfx/trainers/palette_pointers.asm
deleted file mode 100644
index 6dbf13983..000000000
--- a/gfx/trainers/palette_pointers.asm
+++ /dev/null
@@ -1,82 +0,0 @@
-
-TrainerPalettes: ; b0ce
-
-PlayerPalette: ; b0ce
-; The player's palette
-; RGB 25, 18, 12
-; RGB 22, 09, 05
- INCLUDE "gfx/trainers/cal.pal"
-
-KrisPalette: ; b0d0
-; Kris uses Falkner's palette
-; RGB 27, 17, 14
-; RGB 07, 05, 31
-
-FalknerPalette: INCLUDE "gfx/trainers/falkner.pal"
-WhitneyPalette: INCLUDE "gfx/trainers/whitney.pal"
-BugsyPalette: INCLUDE "gfx/trainers/bugsy.pal"
-MortyPalette: INCLUDE "gfx/trainers/morty.pal"
-PrycePalette: INCLUDE "gfx/trainers/pryce.pal"
-JasminePalette: INCLUDE "gfx/trainers/jasmine.pal"
-ChuckPalette: INCLUDE "gfx/trainers/chuck.pal"
-ClairPalette: INCLUDE "gfx/trainers/clair.pal"
-Rival1Palette: INCLUDE "gfx/trainers/rival1.pal"
-PokemonProfPalette: INCLUDE "gfx/trainers/oak.pal"
-WillPalette: INCLUDE "gfx/trainers/will.pal"
-CalPalette: INCLUDE "gfx/trainers/cal.pal"
-BrunoPalette: INCLUDE "gfx/trainers/bruno.pal"
-KarenPalette: INCLUDE "gfx/trainers/karen.pal"
-KogaPalette: INCLUDE "gfx/trainers/koga.pal"
-ChampionPalette: INCLUDE "gfx/trainers/champion.pal"
-BrockPalette: INCLUDE "gfx/trainers/brock.pal"
-MistyPalette: INCLUDE "gfx/trainers/misty.pal"
-LtSurgePalette: INCLUDE "gfx/trainers/lt_surge.pal"
-ScientistPalette: INCLUDE "gfx/trainers/scientist.pal"
-ErikaPalette: INCLUDE "gfx/trainers/erika.pal"
-YoungsterPalette: INCLUDE "gfx/trainers/youngster.pal"
-SchoolboyPalette: INCLUDE "gfx/trainers/schoolboy.pal"
-BirdKeeperPalette: INCLUDE "gfx/trainers/bird_keeper.pal"
-LassPalette: INCLUDE "gfx/trainers/lass.pal"
-JaninePalette: INCLUDE "gfx/trainers/janine.pal"
-CooltrainermPalette: INCLUDE "gfx/trainers/cooltrainer_m.pal"
-CooltrainerfPalette: INCLUDE "gfx/trainers/cooltrainer_f.pal"
-BeautyPalette: INCLUDE "gfx/trainers/beauty.pal"
-PokemaniacPalette: INCLUDE "gfx/trainers/pokemaniac.pal"
-GruntmPalette: INCLUDE "gfx/trainers/grunt_m.pal"
-GentlemanPalette: INCLUDE "gfx/trainers/gentleman.pal"
-SkierPalette: INCLUDE "gfx/trainers/skier.pal"
-TeacherPalette: INCLUDE "gfx/trainers/teacher.pal"
-SabrinaPalette: INCLUDE "gfx/trainers/sabrina.pal"
-BugCatcherPalette: INCLUDE "gfx/trainers/bug_catcher.pal"
-FisherPalette: INCLUDE "gfx/trainers/fisher.pal"
-SwimmermPalette: INCLUDE "gfx/trainers/swimmer_m.pal"
-SwimmerfPalette: INCLUDE "gfx/trainers/swimmer_f.pal"
-SailorPalette: INCLUDE "gfx/trainers/sailor.pal"
-SuperNerdPalette: INCLUDE "gfx/trainers/super_nerd.pal"
-Rival2Palette: INCLUDE "gfx/trainers/rival2.pal"
-GuitaristPalette: INCLUDE "gfx/trainers/guitarist.pal"
-HikerPalette: INCLUDE "gfx/trainers/hiker.pal"
-BikerPalette: INCLUDE "gfx/trainers/biker.pal"
-BlainePalette: INCLUDE "gfx/trainers/blaine.pal"
-BurglarPalette: INCLUDE "gfx/trainers/burglar.pal"
-FirebreatherPalette: INCLUDE "gfx/trainers/firebreather.pal"
-JugglerPalette: INCLUDE "gfx/trainers/juggler.pal"
-BlackbeltTPalette: INCLUDE "gfx/trainers/blackbelt_t.pal"
-ExecutivemPalette: INCLUDE "gfx/trainers/executive_m.pal"
-PsychicTPalette: INCLUDE "gfx/trainers/psychic_t.pal"
-PicnickerPalette: INCLUDE "gfx/trainers/picnicker.pal"
-CamperPalette: INCLUDE "gfx/trainers/camper.pal"
-ExecutivefPalette: INCLUDE "gfx/trainers/executive_f.pal"
-SagePalette: INCLUDE "gfx/trainers/sage.pal"
-MediumPalette: INCLUDE "gfx/trainers/medium.pal"
-BoarderPalette: INCLUDE "gfx/trainers/boarder.pal"
-PokefanmPalette: INCLUDE "gfx/trainers/pokefan_m.pal"
-KimonoGirlPalette: INCLUDE "gfx/trainers/kimono_girl.pal"
-TwinsPalette: INCLUDE "gfx/trainers/twins.pal"
-PokefanfPalette: INCLUDE "gfx/trainers/pokefan_f.pal"
-RedPalette: INCLUDE "gfx/trainers/red.pal"
-BluePalette: INCLUDE "gfx/trainers/blue.pal"
-OfficerPalette: INCLUDE "gfx/trainers/officer.pal"
-GruntfPalette: INCLUDE "gfx/trainers/grunt_f.pal"
-MysticalmanPalette: INCLUDE "gfx/trainers/mysticalman.pal"
-; b1de
diff --git a/gfx/misc/unknown_egg.2bpp.lz.a5b6cbfa b/gfx/unknown/unknown_egg.2bpp.lz.a5b6cbfa
index d8de54c79..d8de54c79 100644
--- a/gfx/misc/unknown_egg.2bpp.lz.a5b6cbfa
+++ b/gfx/unknown/unknown_egg.2bpp.lz.a5b6cbfa
Binary files differ
diff --git a/gfx/misc/unknown_egg.png b/gfx/unknown/unknown_egg.png
index 0642c28cf..0642c28cf 100644
--- a/gfx/misc/unknown_egg.png
+++ b/gfx/unknown/unknown_egg.png
Binary files differ
diff --git a/home.asm b/home.asm
index 4d9600c54..9601a8c1a 100644
--- a/home.asm
+++ b/home.asm
@@ -1,17 +1,23 @@
INCLUDE "includes.asm"
+
SECTION "NULL", ROM0
NULL::
+
INCLUDE "rst.asm"
+
+
INCLUDE "interrupts.asm"
+
SECTION "Header", ROM0
Start::
nop
jp _Start
+
SECTION "Home", ROM0
INCLUDE "home/init.asm"
@@ -40,9 +46,9 @@ INCLUDE "home/map.asm"
InexplicablyEmptyFunction:: ; 2d43
; Inexplicably empty.
; Seen in PredefPointers.
- rept 16
+rept 16
nop
- endr
+endr
ret
; 2d54
@@ -526,7 +532,7 @@ ApplyTilemap:: ; 321c
ld a, 1
ld [hBGMapMode], a
- jr LoadEDTile
+ jr CopyTilemapAtOnce
.dmg
; WaitBGMap
@@ -537,21 +543,21 @@ ApplyTilemap:: ; 321c
ret
; 3238
-CGBOnly_LoadEDTile:: ; 3238
+CGBOnly_CopyTilemapAtOnce:: ; 3238
ld a, [hCGB]
and a
jr z, WaitBGMap
-LoadEDTile:: ; 323d
- jr .LoadEDTile
+CopyTilemapAtOnce:: ; 323d
+ jr .CopyTilemapAtOnce
; 323f
; XXX
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
ret
; 3246
-.LoadEDTile: ; 3246
+.CopyTilemapAtOnce: ; 3246
ld a, [hBGMapMode]
push af
xor a
@@ -568,11 +574,11 @@ LoadEDTile:: ; 323d
jr c, .wait
di
- ld a, 1 ; BANK(VTiles3)
+ ld a, BANK(VTiles3)
ld [rVBK], a
hlcoord 0, 0, AttrMap
call .StackPointerMagic
- ld a, 0 ; BANK(VTiles0)
+ ld a, BANK(VTiles0)
ld [rVBK], a
hlcoord 0, 0
call .StackPointerMagic
@@ -617,7 +623,7 @@ rept SCREEN_WIDTH / 2
inc l
endr
- ld de, $20 - SCREEN_WIDTH
+ ld de, BG_MAP_WIDTH - SCREEN_WIDTH
add hl, de
ld a, [hTilesPerCycle]
dec a
@@ -718,22 +724,20 @@ SetHPPal:: ; 334e
GetHPPal:: ; 3353
; Get palette for hp bar pixel length e in d.
-
ld d, HP_GREEN
ld a, e
cp (50 * 48 / 100)
ret nc
- inc d ; yellow
+ inc d ; HP_YELLOW
cp (21 * 48 / 100)
ret nc
- inc d ; red
+ inc d ; HP_RED
ret
; 335f
CountSetBits:: ; 0x335f
; Count the number of set bits in b bytes starting from hl.
; Return in a, c and [wd265].
-
ld c, 0
.next
ld a, [hli]
@@ -767,307 +771,7 @@ GetWeekday:: ; 3376
INCLUDE "home/pokedex_flags.asm"
-NamesPointers:: ; 33ab
- dba PokemonNames
- dba MoveNames
- dbw 0, 0
- dba ItemNames
- dbw 0, PartyMonOT
- dbw 0, OTPartyMonOT
- dba TrainerClassNames
- dbw $4, $4b52 ; within PackMenuGFX
-; 33c3
-
-GetName:: ; 33c3
-; Return name CurSpecies from name list wNamedObjectTypeBuffer in StringBuffer1.
-
- ld a, [hROMBank]
- push af
- push hl
- push bc
- push de
-
- ld a, [wNamedObjectTypeBuffer]
- cp PKMN_NAME
- jr nz, .NotPokeName
-
- ld a, [CurSpecies]
- ld [wd265], a
- call GetPokemonName
- ld hl, PKMN_NAME_LENGTH
- add hl, de
- ld e, l
- ld d, h
- jr .done
-
-.NotPokeName:
- ld a, [wNamedObjectTypeBuffer]
- dec a
- ld e, a
- ld d, 0
- ld hl, NamesPointers
- add hl, de
- add hl, de
- add hl, de
- ld a, [hli]
- rst Bankswitch
- ld a, [hli]
- ld h, [hl]
- ld l, a
-
- ld a, [CurSpecies]
- dec a
- call GetNthString
-
- ld de, StringBuffer1
- ld bc, ITEM_NAME_LENGTH
- call CopyBytes
-
-.done
- ld a, e
- ld [wUnusedD102], a
- ld a, d
- ld [wUnusedD102 + 1], a
-
- pop de
- pop bc
- pop hl
- pop af
- rst Bankswitch
- ret
-; 3411
-
-GetNthString:: ; 3411
-; Return the address of the
-; ath string starting from hl.
-
- and a
- ret z
-
- push bc
- ld b, a
- ld c, "@"
-.readChar
- ld a, [hli]
- cp c
- jr nz, .readChar
- dec b
- jr nz, .readChar
- pop bc
- ret
-; 3420
-
-GetBasePokemonName:: ; 3420
-; Discards gender (Nidoran).
-
- push hl
- call GetPokemonName
-
- ld hl, StringBuffer1
-.loop
- ld a, [hl]
- cp "@"
- jr z, .quit
- cp "♂"
- jr z, .end
- cp "♀"
- jr z, .end
- inc hl
- jr .loop
-.end
- ld [hl], "@"
-.quit
- pop hl
- ret
-
-; 343b
-
-GetPokemonName:: ; 343b
-; Get Pokemon name wd265.
-
- ld a, [hROMBank]
- push af
- push hl
- ld a, BANK(PokemonNames)
- rst Bankswitch
-
-; Each name is ten characters
- ld a, [wd265]
- dec a
- ld d, 0
- ld e, a
- ld h, 0
- ld l, a
- add hl, hl ; hl = hl * 4
- add hl, hl ; hl = hl * 4
- add hl, de ; hl = (hl*4) + de
- add hl, hl ; hl = (5*hl) + (5*hl)
- ld de, PokemonNames
- add hl, de
-
-; Terminator
- ld de, StringBuffer1
- push de
- ld bc, PKMN_NAME_LENGTH - 1
- call CopyBytes
- ld hl, StringBuffer1 + PKMN_NAME_LENGTH - 1
- ld [hl], "@"
- pop de
-
- pop hl
- pop af
- rst Bankswitch
- ret
-; 3468
-
-GetItemName:: ; 3468
-; Get item name wd265.
-
- push hl
- push bc
- ld a, [wd265]
-
- cp TM01
- jr nc, .TM
-
- ld [CurSpecies], a
- ld a, ITEM_NAME
- ld [wNamedObjectTypeBuffer], a
- call GetName
- jr .Copied
-.TM:
- call GetTMHMName
-.Copied:
- ld de, StringBuffer1
- pop bc
- pop hl
- ret
-; 3487
-
-GetTMHMName:: ; 3487
-; Get TM/HM name by item id wd265.
-
- push hl
- push de
- push bc
- ld a, [wd265]
- push af
-
-; TM/HM prefix
- cp HM01
- push af
- jr c, .TM
-
- ld hl, .HMText
- ld bc, .HMTextEnd - .HMText
- jr .asm_34a1
-
-.TM:
- ld hl, .TMText
- ld bc, .TMTextEnd - .TMText
-
-.asm_34a1
- ld de, StringBuffer1
- call CopyBytes
-
-; TM/HM number
- push de
- ld a, [wd265]
- ld c, a
- callab GetTMHMNumber
- pop de
-
-; HM numbers start from 51, not 1
- pop af
- ld a, c
- jr c, .asm_34b9
- sub NUM_TMS
-.asm_34b9
-
-; Divide and mod by 10 to get the top and bottom digits respectively
- ld b, "0"
-.mod10
- sub 10
- jr c, .asm_34c2
- inc b
- jr .mod10
-.asm_34c2
- add 10
-
- push af
- ld a, b
- ld [de], a
- inc de
- pop af
-
- ld b, "0"
- add b
- ld [de], a
-
-; End the string
- inc de
- ld a, "@"
- ld [de], a
-
- pop af
- ld [wd265], a
- pop bc
- pop de
- pop hl
- ret
-
-.TMText:
- db "TM"
-.TMTextEnd:
- db "@"
-
-.HMText:
- db "HM"
-.HMTextEnd:
- db "@"
-; 34df
-
-IsHM:: ; 34df
- cp HM01
- jr c, .NotHM
- scf
- ret
-.NotHM:
- and a
- ret
-; 34e7
-
-IsHMMove:: ; 34e7
- ld hl, .HMMoves
- ld de, 1
- jp IsInArray
-
-.HMMoves:
- db CUT
- db FLY
- db SURF
- db STRENGTH
- db FLASH
- db WATERFALL
- db WHIRLPOOL
- db -1
-; 34f8
-
-GetMoveName:: ; 34f8
- push hl
-
- ld a, MOVE_NAME
- ld [wNamedObjectTypeBuffer], a
-
- ld a, [wNamedObjectIndexBuffer] ; move id
- ld [CurSpecies], a
-
- call GetName
- ld de, StringBuffer1
-
- pop hl
- ret
-; 350c
+INCLUDE "home/names.asm"
ScrollingMenu:: ; 350c
call CopyMenuData2
@@ -1157,7 +861,7 @@ HandleStoneQueue:: ; 3567
ld l, a
push hl
- call .IsPersonOnWarp
+ call .IsObjectOnWarp
pop hl
jr nc, .nope
ld d, a
@@ -1165,7 +869,7 @@ HandleStoneQueue:: ; 3567
call .IsObjectInStoneTable
jr nc, .nope
call CallMapScript
- callba EnableScriptMode
+ farcall EnableScriptMode
scf
ret
@@ -1174,7 +878,7 @@ HandleStoneQueue:: ; 3567
ret
; 3599
-.IsPersonOnWarp: ; 3599
+.IsObjectOnWarp: ; 3599
push de
ld hl, OBJECT_NEXT_MAP_X
@@ -1279,270 +983,7 @@ HandleStoneQueue:: ; 3567
ret
; 3600
-CheckTrainerBattle2:: ; 3600
-
- ld a, [hROMBank]
- push af
-
- call SwitchToMapScriptHeaderBank
- call CheckTrainerBattle
-
- pop bc
- ld a, b
- rst Bankswitch
- ret
-; 360d
-
-CheckTrainerBattle:: ; 360d
-; Check if any trainer on the map sees the player and wants to battle.
-
-; Skip the player object.
- ld a, 1
- ld de, MapObjects + OBJECT_LENGTH
-
-.loop
-
-; Start a battle if the object:
-
- push af
- push de
-
-; Has a sprite
- ld hl, MAPOBJECT_SPRITE
- add hl, de
- ld a, [hl]
- and a
- jr z, .next
-
-; Is a trainer
- ld hl, MAPOBJECT_COLOR
- add hl, de
- ld a, [hl]
- and $f
- cp $2
- jr nz, .next
-
-; Is visible on the map
- ld hl, MAPOBJECT_OBJECT_STRUCT_ID
- add hl, de
- ld a, [hl]
- cp -1
- jr z, .next
-
-; Is facing the player...
- call GetObjectStruct
- call FacingPlayerDistance_bc
- jr nc, .next
-
-; ...within their sight range
- ld hl, MAPOBJECT_RANGE
- add hl, de
- ld a, [hl]
- cp b
- jr c, .next
-
-; And hasn't already been beaten
- push bc
- push de
- ld hl, MAPOBJECT_SCRIPT_POINTER
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld b, CHECK_FLAG
- call EventFlagAction
- ld a, c
- pop de
- pop bc
- and a
- jr z, .startbattle
-
-.next
- pop de
- ld hl, OBJECT_LENGTH
- add hl, de
- ld d, h
- ld e, l
-
- pop af
- inc a
- cp NUM_OBJECTS
- jr nz, .loop
- xor a
- ret
-
-.startbattle
- pop de
- pop af
- ld [hLastTalked], a
- ld a, b
- ld [EngineBuffer2], a
- ld a, c
- ld [EngineBuffer3], a
- jr LoadTrainer_continue
-; 3674
-
-TalkToTrainer:: ; 3674
- ld a, 1
- ld [EngineBuffer2], a
- ld a, -1
- ld [EngineBuffer3], a
-
-LoadTrainer_continue:: ; 367e
- call GetMapScriptHeaderBank
- ld [EngineBuffer1], a
-
- ld a, [hLastTalked]
- call GetMapObject
-
- ld hl, MAPOBJECT_SCRIPT_POINTER
- add hl, bc
- ld a, [EngineBuffer1]
- call GetFarHalfword
- ld de, wTempTrainerHeader
- ld bc, wTempTrainerHeaderEnd - wTempTrainerHeader
- ld a, [EngineBuffer1]
- call FarCopyBytes
- xor a
- ld [wRunningTrainerBattleScript], a
- scf
- ret
-; 36a5
-
-FacingPlayerDistance_bc:: ; 36a5
-
- push de
- call FacingPlayerDistance
- ld b, d
- ld c, e
- pop de
- ret
-; 36ad
-
-FacingPlayerDistance:: ; 36ad
-; Return carry if the sprite at bc is facing the player,
-; and its distance in d.
-
- ld hl, OBJECT_NEXT_MAP_X ; x
- add hl, bc
- ld d, [hl]
-
- ld hl, OBJECT_NEXT_MAP_Y ; y
- add hl, bc
- ld e, [hl]
-
- ld a, [PlayerStandingMapX]
- cp d
- jr z, .CheckY
-
- ld a, [PlayerStandingMapY]
- cp e
- jr z, .CheckX
-
- and a
- ret
-
-.CheckY:
- ld a, [PlayerStandingMapY]
- sub e
- jr z, .NotFacing
- jr nc, .Above
-
-; Below
- cpl
- inc a
- ld d, a
- ld e, OW_UP
- jr .CheckFacing
-
-.Above:
- ld d, a
- ld e, OW_DOWN
- jr .CheckFacing
-
-.CheckX:
- ld a, [PlayerStandingMapX]
- sub d
- jr z, .NotFacing
- jr nc, .Left
-
-; Right
- cpl
- inc a
- ld d, a
- ld e, OW_LEFT
- jr .CheckFacing
-
-.Left:
- ld d, a
- ld e, OW_RIGHT
-
-.CheckFacing:
- call GetSpriteDirection
- cp e
- jr nz, .NotFacing
- scf
- ret
-
-.NotFacing:
- and a
- ret
-; 36f5
-
-CheckTrainerFlag:: ; 36f5
- push bc
- ld hl, OBJECT_MAP_OBJECT_INDEX
- add hl, bc
- ld a, [hl]
- call GetMapObject
- ld hl, MAPOBJECT_SCRIPT_POINTER
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call GetMapScriptHeaderBank
- call GetFarHalfword
- ld d, h
- ld e, l
- push de
- ld b, CHECK_FLAG
- call EventFlagAction
- pop de
- ld a, c
- and a
- pop bc
- ret
-; 3718
-
-PrintWinLossText:: ; 3718
- ld a, [BattleType]
- cp BATTLETYPE_CANLOSE
- jr .canlose ; ??????????
-
-; unreferenced
- ld hl, wWinTextPointer
- jr .ok
-
-.canlose
- ld a, [wBattleResult]
- ld hl, wWinTextPointer
- and $f
- jr z, .ok
- ld hl, wLossTextPointer
-
-.ok
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call GetMapScriptHeaderBank
- call FarPrintText
- call WaitBGMap
- call WaitPressAorB_BlinkCursor
- ret
-; 3741
+INCLUDE "home/trainers.asm"
IsAPokemon:: ; 3741
; Return carry if species a is not a Pokemon.
@@ -1634,7 +1075,7 @@ _PrepMonFrontpic:: ; 378b
push hl
ld de, VTiles2
- predef GetFrontpic
+ predef GetMonFrontpic
pop hl
xor a
ld [hGraphicStartTile], a
@@ -1713,11 +1154,11 @@ GetBaseData:: ; 3856
; Get BaseData
dec a
- ld bc, BaseData1 - BaseData0
+ ld bc, BASE_DATA_SIZE
ld hl, BaseData
call AddNTimes
ld de, CurBaseData
- ld bc, BaseData1 - BaseData0
+ ld bc, BASE_DATA_SIZE
call CopyBytes
jr .end
@@ -1772,7 +1213,7 @@ GetNick:: ; 38a2
call CopyBytes
pop de
- callab CheckNickErrors
+ callfar CheckNickErrors
pop bc
pop hl
@@ -1832,7 +1273,7 @@ PrintBCDNumber:: ; 38bb
; 0x38f2
PrintBCDDigit:: ; 38f2
- and a, %00001111
+ and %00001111
and a
jr z, .zeroDigit
.nonzeroDigit
@@ -1847,7 +1288,7 @@ PrintBCDDigit:: ; 38f2
.skipCurrencySymbol
res 7, b ; unset 7 to indicate that a nonzero digit has been reached
.outputDigit
- add a, "0"
+ add "0"
ld [hli], a
jp PrintLetterDelay
@@ -1890,8 +1331,8 @@ Function392d:: ; 392d
dec a
ld b, 0
add hl, bc
- ld hl, BaseData + 0
- ld bc, BaseData1 - BaseData0
+ ld hl, BaseData + BASE_DEX_NO
+ ld bc, BASE_DATA_SIZE
call AddNTimes
ld a, BANK(BaseData)
call GetFarHalfword
diff --git a/home/audio.asm b/home/audio.asm
index 5e6eafe9a..98e1fc40c 100644
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -295,7 +295,7 @@ IsSFXPlaying:: ; 3c74
; 3c97
MaxVolume:: ; 3c97
- ld a, $77 ; max
+ ld a, MAX_VOLUME
ld [Volume], a
ret
; 3c9d
@@ -348,9 +348,9 @@ FadeToMapMusic:: ; 3cbc
ld a, 8
ld [MusicFade], a
ld a, e
- ld [MusicFadeIDLo], a
+ ld [MusicFadeID], a
ld a, d
- ld [MusicFadeIDHi], a
+ ld [MusicFadeID + 1], a
ld a, e
ld [wMapMusic], a
diff --git a/home/battle.asm b/home/battle.asm
index 3c2e4de43..30096fd4a 100644
--- a/home/battle.asm
+++ b/home/battle.asm
@@ -130,8 +130,8 @@ RefreshBattleHuds:: ; 39c9
; 39d4
UpdateBattleHuds:: ; 39d4
- callba UpdatePlayerHUD
- callba UpdateEnemyHUD
+ farcall UpdatePlayerHUD
+ farcall UpdateEnemyHUD
ret
; 39e1
diff --git a/home/copy.asm b/home/copy.asm
index 8a307b3df..8ee1c90f9 100644
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -101,32 +101,32 @@ OldDMATransfer:: ; dfd
ReplaceKrisSprite:: ; e4a
- callba _ReplaceKrisSprite
+ farcall _ReplaceKrisSprite
ret
; e51
LoadStandardFont:: ; e51
- callba _LoadStandardFont
+ farcall _LoadStandardFont
ret
; e58
LoadFontsBattleExtra:: ; e58
- callba _LoadFontsBattleExtra
+ farcall _LoadFontsBattleExtra
ret
; e5f
LoadFontsExtra:: ; e5f
- callba _LoadFontsExtra1
- callba _LoadFontsExtra2
+ farcall _LoadFontsExtra1
+ farcall _LoadFontsExtra2
ret
; e6c
LoadFontsExtra2:: ; e6c
- callba _LoadFontsExtra2
+ farcall _LoadFontsExtra2
ret
; e73
diff --git a/home/flag.asm b/home/flag.asm
index 099f4bf00..442c811c2 100644
--- a/home/flag.asm
+++ b/home/flag.asm
@@ -14,7 +14,7 @@ ResetBikeFlags:: ; 2e56
; 2e5d
ResetFlashIfOutOfCave:: ; 2e5d
- ld a, [wPermission]
+ ld a, [wEnvironment]
cp $2
jr z, .asm_2e69
cp $1
@@ -38,9 +38,9 @@ FlagAction:: ; 0x2e76
; inputs:
; b: function
-; 0 clear bit
-; 1 set bit
-; 2 check bit
+; 0 RESET_FLAG clear bit
+; 1 SET_FLAG set bit
+; 2 CHECK_FLAG check bit
; de: bit number
; hl: index within bit table
@@ -75,9 +75,9 @@ FlagAction:: ; 0x2e76
; check b's value: 0, 1, 2
ld a, b
- cp 1
- jr c, .clearbit ; 0
- jr z, .setbit ; 1
+ cp SET_FLAG
+ jr c, .clearbit ; RESET_FLAG
+ jr z, .setbit ; SET_FLAG
; check bit
ld a, [hl]
@@ -105,7 +105,7 @@ FlagAction:: ; 0x2e76
CheckReceivedDex:: ; 2ead
ld de, ENGINE_POKEDEX
ld b, CHECK_FLAG
- callba EngineFlagAction
+ farcall EngineFlagAction
ld a, c
and a
ret
diff --git a/home/hm_moves.asm b/home/hm_moves.asm
new file mode 100644
index 000000000..c4233d094
--- /dev/null
+++ b/home/hm_moves.asm
@@ -0,0 +1,27 @@
+; HM moves can't be forgotten
+
+IsHM:: ; 34df
+ cp HM01
+ jr c, .NotHM
+ scf
+ ret
+.NotHM:
+ and a
+ ret
+; 34e7
+
+IsHMMove:: ; 34e7
+ ld hl, .HMMoves
+ ld de, 1
+ jp IsInArray
+
+.HMMoves: ; 34f0
+ db CUT
+ db FLY
+ db SURF
+ db STRENGTH
+ db FLASH
+ db WATERFALL
+ db WHIRLPOOL
+ db -1 ; end
+; 34f8
diff --git a/home/init.asm b/home/init.asm
index b983ce826..630cfe622 100644
--- a/home/init.asm
+++ b/home/init.asm
@@ -69,8 +69,8 @@ Init:: ; 17d
ld [rLCDC], a
; Clear WRAM bank 0
- ld hl, wc000
- ld bc, wd000 - wc000
+ ld hl, wRAM0Start
+ ld bc, wRAM1Start - wRAM0Start
.ByteFill:
ld [hl], 0
inc hl
@@ -139,14 +139,14 @@ Init:: ; 17d
ld a, -1
ld [hLinkPlayerNumber], a
- callba InitCGBPals
+ farcall InitCGBPals
ld a, VBGMap1 / $100
ld [hBGMapAddress + 1], a
xor a ; VBGMap1 % $100
ld [hBGMapAddress], a
- callba StartClock
+ farcall StartClock
xor a
ld [MBC3LatchClock], a
diff --git a/home/item.asm b/home/item.asm
index 92d74c350..2f550a200 100644
--- a/home/item.asm
+++ b/home/item.asm
@@ -1,5 +1,5 @@
DoItemEffect:: ; 2f3f
- callba _DoItemEffect
+ farcall _DoItemEffect
ret
; 2f46
@@ -7,7 +7,7 @@ CheckTossableItem:: ; 2f46
push hl
push de
push bc
- callba _CheckTossableItem
+ farcall _CheckTossableItem
pop bc
pop de
pop hl
diff --git a/home/joypad.asm b/home/joypad.asm
index 0cb2f6206..3d5f0aed5 100644
--- a/home/joypad.asm
+++ b/home/joypad.asm
@@ -130,7 +130,7 @@ GetJoypad:: ; 984
; The player input can be automated using an input stream.
; See more below.
ld a, [InputType]
- cp a, AUTO_INPUT
+ cp AUTO_INPUT
jr z, .auto
; To get deltas, take this and last frame's input.
@@ -197,14 +197,14 @@ GetJoypad:: ; 984
.updateauto
; An input of $ff will end the stream.
ld a, [hli]
- cp a, -1
+ cp -1
jr z, .stopauto
ld b, a
; A duration of $ff will end the stream indefinitely.
ld a, [hli]
ld [AutoInputLength], a
- cp a, -1
+ cp -1
jr nz, .next
; The current input is overwritten.
@@ -414,7 +414,7 @@ ButtonSound:: ; aaf
ld a, [InputType]
or a
jr z, .input_wait_loop
- callba _DudeAutoInput_A
+ farcall _DudeAutoInput_A
.input_wait_loop
call .blink_cursor
diff --git a/home/map.asm b/home/map.asm
index 967d13af5..37022e234 100644
--- a/home/map.asm
+++ b/home/map.asm
@@ -8,61 +8,61 @@ Clearwc7e8:: ; 210f
ret
; 211b
-CheckTriggers:: ; 211b
-; Checks wCurrentMapTriggerPointer. If it's empty, returns -1 in a. Otherwise, returns the active trigger ID in a.
+CheckScenes:: ; 211b
+; Checks wCurrMapSceneScriptPointer. If it's empty, returns -1 in a. Otherwise, returns the active scene ID in a.
push hl
- ld hl, wCurrentMapTriggerPointer
+ ld hl, wCurrMapSceneScriptPointer
ld a, [hli]
ld h, [hl]
ld l, a
or h
ld a, [hl]
- jr nz, .triggerexists
+ jr nz, .scene_exists
ld a, -1
-.triggerexists
+.scene_exists
pop hl
ret
; 212a
-GetCurrentMapTrigger:: ; 212a
-; Grabs the wram map trigger pointer for the current map and loads it into wCurrentMapTriggerPointer.
-; If there are no triggers, both bytes of wCurrentMapTriggerPointer are wiped clean.
-; Copy the current map group and number into bc. This is needed for GetMapTrigger.
+GetCurrentMapSceneID:: ; 212a
+; Grabs the wram map scene script pointer for the current map and loads it into wCurrMapSceneScriptPointer.
+; If there is no scene, both bytes of wCurrMapSceneScriptPointer are wiped clean.
+; Copy the current map group and number into bc. This is needed for GetMapSceneID.
ld a, [MapGroup]
ld b, a
ld a, [MapNumber]
ld c, a
-; Blank out wCurrentMapTriggerPointer; this is the default scenario.
+; Blank out wCurrMapSceneScriptPointer; this is the default scenario.
xor a
- ld [wCurrentMapTriggerPointer], a
- ld [wCurrentMapTriggerPointer + 1], a
- call GetMapTrigger
- ret c ; The map is not in the trigger table
-; Load the trigger table pointer from de into wCurrentMapTriggerPointer
+ ld [wCurrMapSceneScriptPointer], a
+ ld [wCurrMapSceneScriptPointer + 1], a
+ call GetMapSceneID
+ ret c ; The map is not in the scene script table
+; Load the scene script pointer from de into wCurrMapSceneScriptPointer
ld a, e
- ld [wCurrentMapTriggerPointer], a
+ ld [wCurrMapSceneScriptPointer], a
ld a, d
- ld [wCurrentMapTriggerPointer + 1], a
+ ld [wCurrMapSceneScriptPointer + 1], a
xor a
ret
; 2147
-GetMapTrigger:: ; 2147
-; Searches the trigger table for the map group and number loaded in bc, and returns the wram pointer in de.
-; If the map is not in the trigger table, returns carry.
+GetMapSceneID:: ; 2147
+; Searches the scene script table for the map group and number loaded in bc, and returns the wram pointer in de.
+; If the map is not in the scene script table, returns carry.
push bc
ld a, [hROMBank]
push af
- ld a, BANK(MapTriggers)
+ ld a, BANK(MapScenes)
rst Bankswitch
- ld hl, MapTriggers
+ ld hl, MapScenes
.loop
push hl
ld a, [hli] ; map group, or terminator
cp -1
- jr z, .end ; the current map is not in the trigger table
+ jr z, .end ; the current map is not in the scene script table
cp b
jr nz, .next ; map group did not match
ld a, [hli] ; map number
@@ -72,7 +72,7 @@ GetMapTrigger:: ; 2147
.next
pop hl
- ld de, 4 ; size of an entry in the trigger table
+ ld de, 4 ; size of an entry in the scene script table
add hl, de
jr .loop
@@ -152,9 +152,12 @@ LoadMetatiles:: ; 2198
ld e, l
ld d, h
; Set hl to the address of the current metatile data ([TilesetBlocksAddress] + (a) tiles).
- add a
+ ; This is buggy; it wraps around past 128 blocks.
+ ; To fix, uncomment the line below.
+ add a ; Comment or delete this line to fix the above bug.
ld l, a
ld h, 0
+ ; add hl, hl
add hl, hl
add hl, hl
add hl, hl
@@ -212,7 +215,7 @@ endr
ReturnToMapFromSubmenu:: ; 222a
ld a, MAPSETUP_SUBMENU
ld [hMapEntryMethod], a
- callba RunMapSetupScript
+ farcall RunMapSetupScript
xor a
ld [hMapEntryMethod], a
ret
@@ -223,7 +226,7 @@ CheckWarpTile:: ; 2238
ret nc
push bc
- callba CheckDirectionalWarp
+ farcall CheckDirectionalWarp
pop bc
ret nc
@@ -240,7 +243,7 @@ WarpCheck:: ; 224a
; 2252
GetDestinationWarpNumber:: ; 2252
- callba CheckWarpCollision
+ farcall CheckWarpCollision
ret nc
ld a, [hROMBank]
@@ -386,7 +389,7 @@ CheckIndoorMap:: ; 22f4
ret z
cp GATE
ret z
- cp PERM_5
+ cp ENVIRONMENT_5
ret
; 2309
@@ -427,7 +430,7 @@ ReadMapEventHeader:: ; 2336
inc hl
call ReadWarps
call ReadCoordEvents
- call ReadSignposts
+ call ReadBGEvents
pop af
and a
@@ -442,7 +445,7 @@ ReadMapScripts:: ; 234f
ld a, [hli]
ld h, [hl]
ld l, a
- call ReadMapTriggers
+ call ReadMapSceneScripts
call ReadMapCallbacks
ret
; 235c
@@ -508,19 +511,19 @@ GetMapConnection:: ; 23a3
ret
; 23ac
-ReadMapTriggers:: ; 23ac
- ld a, [hli] ; trigger count
+ReadMapSceneScripts:: ; 23ac
+ ld a, [hli] ; scene script count
ld c, a
- ld [wCurrMapTriggerCount], a ; current map trigger count
+ ld [wCurrMapSceneScriptCount], a ; current map scene script count
ld a, l
- ld [wCurrMapTriggerHeaderPointer], a ; map trigger pointer
+ ld [wCurrMapSceneScriptHeaderPointer], a ; map scene script pointer
ld a, h
- ld [wCurrMapTriggerHeaderPointer + 1], a
+ ld [wCurrMapSceneScriptHeaderPointer + 1], a
ld a, c
and a
ret z
- ld bc, 4 ; size of a map trigger header entry
+ ld bc, 4 ; size of a map scene script header entry
call AddNTimes
ret
; 23c3
@@ -561,11 +564,11 @@ ReadWarps:: ; 23da
ReadCoordEvents:: ; 23f1
ld a, [hli]
ld c, a
- ld [wCurrentMapXYTriggerCount], a
+ ld [wCurrMapCoordEventCount], a
ld a, l
- ld [wCurrentMapXYTriggerHeaderPointer], a
+ ld [wCurrMapCoordEventHeaderPointer], a
ld a, h
- ld [wCurrentMapXYTriggerHeaderPointer + 1], a
+ ld [wCurrMapCoordEventHeaderPointer + 1], a
ld a, c
and a
@@ -576,14 +579,14 @@ ReadCoordEvents:: ; 23f1
ret
; 2408
-ReadSignposts:: ; 2408
+ReadBGEvents:: ; 2408
ld a, [hli]
ld c, a
- ld [wCurrentMapSignpostCount], a
+ ld [wCurrMapBGEventCount], a
ld a, l
- ld [wCurrentMapSignpostHeaderPointer], a
+ ld [wCurrMapBGEventHeaderPointer], a
ld a, h
- ld [wCurrentMapSignpostHeaderPointer + 1], a
+ ld [wCurrMapBGEventHeaderPointer + 1], a
ld a, c
and a
@@ -601,17 +604,17 @@ ReadObjectEvents:: ; 241f
ld hl, Map1Object
ld a, [de]
inc de
- ld [wCurrentMapPersonEventCount], a
+ ld [wCurrMapObjectEventCount], a
ld a, e
- ld [wCurrentMapPersonEventHeaderPointer], a
+ ld [wCurrMapObjectEventHeaderPointer], a
ld a, d
- ld [wCurrentMapPersonEventHeaderPointer + 1], a
+ ld [wCurrMapObjectEventHeaderPointer + 1], a
- ld a, [wCurrentMapPersonEventCount]
+ ld a, [wCurrMapObjectEventCount]
call CopyMapObjectHeaders
-; get NUM_OBJECTS - [wCurrentMapPersonEventCount]
- ld a, [wCurrentMapPersonEventCount]
+; get NUM_OBJECTS - [wCurrMapObjectEventCount]
+ ld a, [wCurrMapObjectEventCount]
ld c, a
ld a, NUM_OBJECTS ; - 1
sub c
@@ -714,7 +717,7 @@ RestoreFacingAfterWarp:: ; 248a
call .backup
.skip
- callba GetCoordOfUpperLeftCorner
+ farcall GetCoordOfUpperLeftCorner
ret
; 24ba
@@ -1047,15 +1050,15 @@ RunMapCallback:: ; 263b
ExecuteCallbackScript:: ; 2674
; Do map callback de and return to script bank b.
- callba CallCallback
+ farcall CallCallback
ld a, [ScriptMode]
push af
ld hl, ScriptFlags
ld a, [hl]
push af
set 1, [hl]
- callba EnableScriptMode
- callba ScriptEvents
+ farcall EnableScriptMode
+ farcall ScriptEvents
pop af
ld [ScriptFlags], a
pop af
@@ -1107,7 +1110,7 @@ Call_a_de:: ; 26b7
; 26c7
GetMovementData:: ; 26c7
-; Initialize the movement data for person c at b:hl
+; Initialize the movement data for object c at b:hl
ld a, [hROMBank]
push af
ld a, b
@@ -1415,7 +1418,7 @@ LoadTileset:: ; 2821
ld a, $1
ld [rVBK], a
- ld hl, w6_d600
+ ld hl, wDecompressScratch + $60 tiles
ld de, VTiles2
ld bc, $60 tiles
call CopyBytes
@@ -1436,7 +1439,7 @@ LoadTileset:: ; 2821
jr .skip_roof
.load_roof
- callba LoadMapGroupRoof
+ farcall LoadMapGroupRoof
.skip_roof
xor a
@@ -1593,14 +1596,14 @@ GetMovementPermissions:: ; 2914
; 2945
.MovementPermissionsData: ; 2945
- db 1 << DOWN
- db 1 << UP
- db 1 << LEFT
- db 1 << RIGHT
- db (1 << DOWN) | (1 << RIGHT)
- db (1 << UP) | (1 << RIGHT)
- db (1 << DOWN) | (1 << LEFT)
- db (1 << UP) | (1 << LEFT)
+ db DOWN_MASK
+ db UP_MASK
+ db LEFT_MASK
+ db RIGHT_MASK
+ db DOWN_MASK | RIGHT_MASK
+ db UP_MASK | RIGHT_MASK
+ db DOWN_MASK | LEFT_MASK
+ db UP_MASK | LEFT_MASK
; 294d
.UpDown:
@@ -1837,7 +1840,7 @@ GetBlockLocation:: ; 2a66
ret
; 2a8b
-CheckFacingSign:: ; 2a8b
+CheckFacingBGEvent:: ; 2a8b
call GetFacingTileCoord
; Load facing into b.
ld b, a
@@ -1848,8 +1851,8 @@ CheckFacingSign:: ; 2a8b
ld a, e
sub 4
ld e, a
-; If there are no signposts, we don't need to be here.
- ld a, [wCurrentMapSignpostCount]
+; If there are no BG events, we don't need to be here.
+ ld a, [wCurrMapBGEventCount]
and a
ret z
@@ -1857,16 +1860,16 @@ CheckFacingSign:: ; 2a8b
ld a, [hROMBank]
push af
call SwitchToMapScriptHeaderBank
- call CheckIfFacingTileCoordIsSign
+ call CheckIfFacingTileCoordIsBGEvent
pop hl
ld a, h
rst Bankswitch
ret
; 2aaa
-CheckIfFacingTileCoordIsSign:: ; 2aaa
-; Checks to see if you are facing a signpost. If so, copies it into EngineBuffer1 and sets carry.
- ld hl, wCurrentMapSignpostHeaderPointer
+CheckIfFacingTileCoordIsBGEvent:: ; 2aaa
+; Checks to see if you are facing a BG event. If so, copies it into EngineBuffer1 and sets carry.
+ ld hl, wCurrMapBGEventHeaderPointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -1882,7 +1885,7 @@ CheckIfFacingTileCoordIsSign:: ; 2aaa
.next
pop hl
- ld a, 5 ; signpost event length
+ ld a, 5 ; BG event event length
add l
ld l, a
jr nc, .nocarry
@@ -1896,39 +1899,39 @@ CheckIfFacingTileCoordIsSign:: ; 2aaa
.copysign
pop hl
- ld de, wCurSignpostYCoord
- ld bc, 5 ; signpost event length
+ ld de, wCurBGEventYCoord
+ ld bc, 5 ; BG event event length
call CopyBytes
scf
ret
; 2ad4
-CheckCurrentMapXYTriggers:: ; 2ad4
-; If there are no xy triggers, we don't need to be here.
- ld a, [wCurrentMapXYTriggerCount]
+CheckCurrentMapCoordEvents:: ; 2ad4
+; If there are no coord events, we don't need to be here.
+ ld a, [wCurrMapCoordEventCount]
and a
ret z
-; Copy the trigger count into c.
+; Copy the coord event count into c.
ld c, a
ld a, [hROMBank]
push af
call SwitchToMapScriptHeaderBank
- call .TriggerCheck
+ call .CoordEventCheck
pop hl
ld a, h
rst Bankswitch
ret
-.TriggerCheck:
-; Checks to see if you are standing on an xy-trigger. If yes, copies the trigger to EngineBuffer1 and sets carry.
- ld hl, wCurrentMapXYTriggerHeaderPointer
+.CoordEventCheck:
+; Checks to see if you are standing on a coord event. If yes, copies the event to EngineBuffer1 and sets carry.
+ ld hl, wCurrMapCoordEventHeaderPointer
ld a, [hli]
ld h, [hl]
ld l, a
-; Load the active trigger ID into b
- call CheckTriggers
+; Load the active scene ID into b
+ call CheckScenes
ld b, a
-; Load your current coordinates into de. This will be used to check if your position is in the xy-trigger table for the current map.
+; Load your current coordinates into de. This will be used to check if your position is in the coord event table for the current map.
ld a, [PlayerStandingMapX]
sub 4
ld d, a
@@ -1951,11 +1954,11 @@ CheckCurrentMapXYTriggers:: ; 2ad4
ld a, [hli]
cp d
jr nz, .next
- jr .copytrigger
+ jr .copy_coord_event
.next
pop hl
- ld a, $8 ; xy-trigger size
+ ld a, $8 ; coord event size
add l
ld l, a
jr nc, .nocarry
@@ -1967,10 +1970,10 @@ CheckCurrentMapXYTriggers:: ; 2ad4
xor a
ret
-.copytrigger
+.copy_coord_event
pop hl
- ld de, wCurCoordEventTriggerID
- ld bc, 8 ; xy-trigger size
+ ld de, wCurCoordEventSceneID
+ ld bc, 8 ; coord event size
call CopyBytes
scf
ret
@@ -1980,7 +1983,7 @@ FadeToMenu:: ; 2b29
xor a
ld [hBGMapMode], a
call LoadStandardMenuDataHeader
- callba FadeOutPalettes
+ farcall FadeOutPalettes
call ClearSprites
call DisableSpriteUpdates
ret
@@ -2004,9 +2007,9 @@ ExitAllMenus:: ; 2b4d
FinishExitMenu:: ; 2b5c
ld b, SCGB_MAPPALS
call GetSGBLayout
- callba LoadOW_BGPal7
+ farcall LoadOW_BGPal7
call WaitBGMap2
- callba FadeInPalettes
+ farcall FadeInPalettes
call EnableSpriteUpdates
ret
; 2b74
@@ -2027,7 +2030,7 @@ ReturnToMapWithSpeechTextbox:: ; 0x2b74
call WaitBGMap2
ld b, SCGB_MAPPALS
call GetSGBLayout
- callba LoadOW_BGPal7
+ farcall LoadOW_BGPal7
call UpdateTimePals
call DelayFrame
ld a, $1
@@ -2039,7 +2042,7 @@ ReturnToMapWithSpeechTextbox:: ; 0x2b74
ReloadTilesetAndPalettes:: ; 2bae
call DisableLCD
call ClearSprites
- callba RefreshSprites
+ farcall RefreshSprites
call LoadStandardFont
call LoadFontsExtra
ld a, [hROMBank]
@@ -2049,7 +2052,7 @@ ReloadTilesetAndPalettes:: ; 2bae
ld a, [MapNumber]
ld c, a
call SwitchToAnyMapBank
- callba UpdateTimeOfDayPal
+ farcall UpdateTimeOfDayPal
call OverworldTextModeSwitch
call LoadTileset
ld a, 9
@@ -2151,7 +2154,7 @@ GetMapBank:: ; 2c29
GetAnyMapBank:: ; 2c31
push hl
push de
- ld de, 0
+ ld de, MAPHEADER_MAPHEADER2_BANK
call GetAnyMapHeaderMember
ld a, c
pop de
@@ -2160,7 +2163,7 @@ GetAnyMapBank:: ; 2c31
; 2c3d
PartiallyCopyMapHeader:: ; 2c3d
-; Copy second map header bank, tileset, permission, and second map header address
+; Copy second map header bank, tileset, environment, and second map header address
; from the current map's map header.
ld a, [hROMBank]
push af
@@ -2195,18 +2198,18 @@ GetAnyMapBlockdataBank:: ; 2c5b
push bc
push bc
- ld de, 3 ; second map header pointer
+ ld de, MAPHEADER_MAPHEADER2
call GetAnyMapHeaderMember
ld l, c
ld h, b
pop bc
push hl
- ld de, 0 ; second map header bank
+ ld de, MAPHEADER_MAPHEADER2_BANK
call GetAnyMapHeaderMember
pop hl
- ld de, 3 ; blockdata bank
+ ld de, MAPHEADER_MAPHEADER2 ; blockdata bank
add hl, de
ld a, c
call GetFarByte
@@ -2222,7 +2225,7 @@ GetSecondaryMapHeaderPointer:: ; 0x2c7d
; returns the current map's secondary map header pointer in hl.
push bc
push de
- ld de, 3 ; secondary map header pointer (offset within header)
+ ld de, MAPHEADER_MAPHEADER2
call GetMapHeaderMember
ld l, c
ld h, b
@@ -2231,11 +2234,11 @@ GetSecondaryMapHeaderPointer:: ; 0x2c7d
ret
; 2c8a
-GetMapPermission:: ; 2c8a
+GetMapEnvironment:: ; 2c8a
push hl
push de
push bc
- ld de, 2 ; permission
+ ld de, MAPHEADER_ENVIRONMENT
call GetMapHeaderMember
ld a, c
pop bc
@@ -2247,11 +2250,11 @@ GetMapPermission:: ; 2c8a
ret ; XXX
; 2c99
-GetAnyMapPermission:: ; 2c99
+GetAnyMapEnvironment:: ; 2c99
push hl
push de
push bc
- ld de, 2 ; permission
+ ld de, MAPHEADER_ENVIRONMENT
call GetAnyMapHeaderMember
ld a, c
pop bc
@@ -2261,7 +2264,7 @@ GetAnyMapPermission:: ; 2c99
; 2ca7
GetAnyMapTileset:: ; 2ca7
- ld de, 1 ; tileset
+ ld de, MAPHEADER_TILESET
call GetAnyMapHeaderMember
ld a, c
ret
@@ -2273,7 +2276,7 @@ GetWorldMapLocation:: ; 0x2caf
push de
push bc
- ld de, 5 ; landmark
+ ld de, MAPHEADER_LOCATION
call GetAnyMapHeaderMember
ld a, c
@@ -2284,18 +2287,16 @@ GetWorldMapLocation:: ; 0x2caf
; 0x2cbd
GetMapHeaderMusic:: ; 2cbd
-RADIO_TOWER_MUSIC EQU 7
-
push hl
push bc
- ld de, 6 ; music
+ ld de, MAPHEADER_MUSIC
call GetMapHeaderMember
ld a, c
cp MUSIC_MAHOGANY_MART
jr z, .mahoganymart
- bit RADIO_TOWER_MUSIC, c
+ bit RADIO_TOWER_MUSIC_F, c
jr nz, .radiotower
- callba Function8b342
+ farcall Function8b342
ld e, c
ld d, 0
.done
@@ -2313,7 +2314,7 @@ RADIO_TOWER_MUSIC EQU 7
.clearedradiotower
; the rest of the byte
ld a, c
- and 1 << RADIO_TOWER_MUSIC - 1
+ and RADIO_TOWER_MUSIC - 1
ld e, a
ld d, 0
jr .done
@@ -2347,7 +2348,7 @@ GetPhoneServiceTimeOfDayByte:: ; 2d0d
push hl
push bc
- ld de, 7 ; phone service and time of day
+ ld de, MAPHEADER_PALETTE
call GetMapHeaderMember
ld a, c
@@ -2361,7 +2362,7 @@ GetFishingGroup:: ; 2d19
push hl
push bc
- ld de, 8 ; fishing group
+ ld de, MAPHEADER_FISHGROUP
call GetMapHeaderMember
ld a, c
@@ -2376,12 +2377,12 @@ LoadTilesetHeader:: ; 2d27
push bc
ld hl, Tilesets
- ld bc, Tileset01 - Tileset00
+ ld bc, TilesetHeaderEnd - TilesetHeader
ld a, [wTileset]
call AddNTimes
ld de, TilesetBank
- ld bc, Tileset01 - Tileset00
+ ld bc, TilesetHeaderEnd - TilesetHeader
ld a, BANK(Tilesets)
call FarCopyBytes
diff --git a/home/map_objects.asm b/home/map_objects.asm
index 4c896c7d7..3857bef0c 100644
--- a/home/map_objects.asm
+++ b/home/map_objects.asm
@@ -6,7 +6,7 @@ GetSpritePalette:: ; 17ff
push bc
ld c, a
- callba _GetSpritePalette
+ farcall _GetSpritePalette
ld a, c
pop bc
@@ -120,67 +120,67 @@ GetTileCollision:: ; 185d
CheckGrassTile:: ; 1875
ld d, a
and $f0
- cp $10
- jr z, .ok_10
- cp $20
- jr z, .ok_20
+ cp HI_NYBBLE_TALL_GRASS
+ jr z, .grass
+ cp HI_NYBBLE_WATER
+ jr z, .water
scf
ret
-.ok_10
+.grass
ld a, d
- and 7
+ and LO_NYBBLE_GRASS
ret z
scf
ret
; For some reason, the above code is duplicated down here.
-.ok_20
+.water
ld a, d
- and 7
+ and LO_NYBBLE_GRASS
ret z
scf
ret
; 188e
CheckSuperTallGrassTile:: ; 188e
- cp $14
+ cp COLL_LONG_GRASS
ret z
- cp $1c
+ cp COLL_LONG_GRASS_1C
ret
; 1894
CheckCutTreeTile:: ; 1894
- cp $12
+ cp COLL_CUT_TREE
ret z
- cp $1a
+ cp COLL_CUT_TREE_1A
ret
; 189a
CheckHeadbuttTreeTile:: ; 189a
- cp $15
+ cp COLL_HEADBUTT_TREE
ret z
- cp $1d
+ cp COLL_HEADBUTT_TREE_1D
ret
; 18a0
CheckCounterTile:: ; 18a0
- cp $90
+ cp COLL_COUNTER
ret z
- cp $98
+ cp COLL_COUNTER_98
ret
; 18a6
CheckPitTile:: ; 18a6
- cp $60
+ cp COLL_PIT
ret z
- cp $68
+ cp COLL_PIT_68
ret
; 18ac
CheckIceTile:: ; 18ac
- cp $23
+ cp COLL_ICE
ret z
- cp $2b
+ cp COLL_ICE_2B
ret z
scf
ret
@@ -188,30 +188,30 @@ CheckIceTile:: ; 18ac
CheckWhirlpoolTile:: ; 18b4
nop
- cp $24
+ cp COLL_WHIRLPOOL
ret z
- cp $2c
+ cp COLL_WHIRLPOOL_2C
ret z
scf
ret
; 18bd
CheckWaterfallTile:: ; 18bd
- cp $33
+ cp COLL_WATERFALL
ret z
- cp $3b
+ cp COLL_CURRENT_DOWN
ret
; 18c3
CheckStandingOnEntrance:: ; 18c3
ld a, [PlayerStandingTile]
- cp $71 ; door
+ cp COLL_DOOR
ret z
- cp $79
+ cp COLL_DOOR_79
ret z
- cp $7a ; stairs
+ cp COLL_STAIRCASE
ret z
- cp $7b ; cave
+ cp COLL_CAVE
ret
; 18d2
@@ -276,9 +276,7 @@ CheckObjectTime:: ; 18f5
ret
.TimeOfDayValues_191e:
- db 1 << MORN ; 1
- db 1 << DAY ; 2
- db 1 << NITE ; 4
+ db MORN, DAY, NITE
.check_hour
ld hl, MAPOBJECT_HOUR
@@ -330,7 +328,7 @@ _CopyObjectStruct:: ; 1956
call UnmaskObject
ld a, [hMapObjectIndexBuffer]
call GetMapObject
- callba CopyObjectStruct
+ farcall CopyObjectStruct
ret
; 1967
@@ -347,7 +345,7 @@ ApplyDeletionToMapObject:: ; 1967
call .CheckStopFollow
pop af
call GetObjectStruct
- callba DeleteMapObject
+ farcall DeleteMapObject
ret
.CheckStopFollow:
@@ -358,7 +356,7 @@ ApplyDeletionToMapObject:: ; 1967
cp [hl]
ret nz
.ok
- callba StopFollow
+ farcall StopFollow
ld a, -1
ld [wObjectFollow_Leader], a
ld [wObjectFollow_Follower], a
@@ -411,20 +409,20 @@ CopyPlayerObjectTemplate:: ; 19a6
.ok
ld a, b
call GetObjectStruct
- callba DeleteMapObject
+ farcall DeleteMapObject
ret
; 19e9
LoadMovementDataPointer:: ; 19e9
-; Load the movement data pointer for person a.
- ld [wMovementPerson], a
+; Load the movement data pointer for object a.
+ ld [wMovementObject], a
ld a, [hROMBank]
ld [wMovementDataPointer], a
ld a, l
ld [wMovementDataPointer + 1], a
ld a, h
ld [wMovementDataPointer + 2], a
- ld a, [wMovementPerson]
+ ld a, [wMovementObject]
call CheckObjectVisibility
ret c
@@ -485,7 +483,7 @@ GetSpriteMovementFunction:: ; 1a2f
ld e, a
ld d, 0
rept SPRITEMOVEDATA_FIELDS
- add hl,de
+ add hl, de
endr
ld a, [hl]
ret
@@ -498,7 +496,7 @@ GetInitialFacing:: ; 1a47
ld d, 0
ld hl, SpriteMovementData + 1 ; init facing
rept SPRITEMOVEDATA_FIELDS
- add hl,de
+ add hl, de
endr
ld a, BANK(SpriteMovementData)
call GetFarByte
@@ -622,8 +620,8 @@ UpdateSprites:: ; 1ad2
bit 0, a
ret z
- callba Function55e0
- callba _UpdateSprites
+ farcall Function55e0
+ farcall _UpdateSprites
ret
; 1ae5
diff --git a/home/math.asm b/home/math.asm
index 01aea6b72..6a779e378 100644
--- a/home/math.asm
+++ b/home/math.asm
@@ -45,7 +45,7 @@ Multiply:: ; 3119
push hl
push bc
- callab _Multiply
+ callfar _Multiply
pop bc
pop hl
diff --git a/home/menu.asm b/home/menu.asm
index 53e4457e3..ba1b568c1 100644
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -569,7 +569,7 @@ Place2DMenuItemName:: ; 201c
_2DMenu:: ; 202a
ld a, [hROMBank]
ld [wMenuData2_2DMenuItemStringsBank], a
- callba _2DMenu_
+ farcall _2DMenu_
ld a, [wMenuCursorBuffer]
ret
; 2039
@@ -577,7 +577,7 @@ _2DMenu:: ; 202a
InterpretBattleMenu:: ; 2039
ld a, [hROMBank]
ld [wMenuData2_2DMenuItemStringsBank], a
- callba _InterpretBattleMenu
+ farcall _InterpretBattleMenu
ld a, [wMenuCursorBuffer]
ret
; 2048
@@ -585,7 +585,7 @@ InterpretBattleMenu:: ; 2039
InterpretMobileMenu:: ; 2048
ld a, [hROMBank]
ld [wMenuData2_2DMenuItemStringsBank], a
- callba _InterpretMobileMenu
+ farcall _InterpretMobileMenu
ld a, [wMenuCursorBuffer]
ret
; 2057
diff --git a/home/movement.asm b/home/movement.asm
index c4b5b578d..0a2623a09 100644
--- a/home/movement.asm
+++ b/home/movement.asm
@@ -1,13 +1,13 @@
InitMovementBuffer:: ; 1b1e
- ld [wMovementBufferPerson], a
+ ld [wMovementBufferObject], a
xor a
ld [wMovementBufferCount], a
ld a, $0 ; useless
- ld [wd004], a
+ ld [wUnusedMovementBufferBank], a
ld a, MovementBuffer % $100
- ld [wd005], a
+ ld [wUnusedMovementBufferPointer], a
ld a, MovementBuffer / $100
- ld [wd006], a
+ ld [wUnusedMovementBufferPointer + 1], a
ret
; 1b35
@@ -159,13 +159,13 @@ SetMenuAttributes:: ; 1bb1
; 1bc9
StaticMenuJoypad:: ; 1bc9
- callab _StaticMenuJoypad
+ callfar _StaticMenuJoypad
call GetMenuJoypad
ret
; 1bd3
ScrollingMenuJoypad:: ; 1bd3
- callab _ScrollingMenuJoypad
+ callfar _ScrollingMenuJoypad
call GetMenuJoypad
ret
; 1bdd
diff --git a/home/names.asm b/home/names.asm
new file mode 100644
index 000000000..c8f873c3f
--- /dev/null
+++ b/home/names.asm
@@ -0,0 +1,278 @@
+NamesPointers:: ; 33ab
+; entries correspond to GetName constants (see constants/misc_constants.asm)
+ dba PokemonNames
+ dba MoveNames
+ dbw 0, 0
+ dba ItemNames
+ dbw 0, PartyMonOT
+ dbw 0, OTPartyMonOT
+ dba TrainerClassNames
+ dbw $4, $4b52 ; within PackMenuGFX
+; 33c3
+
+GetName:: ; 33c3
+; Return name CurSpecies from name list wNamedObjectTypeBuffer in StringBuffer1.
+
+ ld a, [hROMBank]
+ push af
+ push hl
+ push bc
+ push de
+
+ ld a, [wNamedObjectTypeBuffer]
+ cp PKMN_NAME
+ jr nz, .NotPokeName
+
+ ld a, [CurSpecies]
+ ld [wd265], a
+ call GetPokemonName
+ ld hl, PKMN_NAME_LENGTH
+ add hl, de
+ ld e, l
+ ld d, h
+ jr .done
+
+.NotPokeName:
+ ld a, [wNamedObjectTypeBuffer]
+ dec a
+ ld e, a
+ ld d, 0
+ ld hl, NamesPointers
+ add hl, de
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ rst Bankswitch
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+
+ ld a, [CurSpecies]
+ dec a
+ call GetNthString
+
+ ld de, StringBuffer1
+ ld bc, ITEM_NAME_LENGTH
+ call CopyBytes
+
+.done
+ ld a, e
+ ld [wUnusedD102], a
+ ld a, d
+ ld [wUnusedD102 + 1], a
+
+ pop de
+ pop bc
+ pop hl
+ pop af
+ rst Bankswitch
+ ret
+; 3411
+
+GetNthString:: ; 3411
+; Return the address of the
+; ath string starting from hl.
+
+ and a
+ ret z
+
+ push bc
+ ld b, a
+ ld c, "@"
+.readChar
+ ld a, [hli]
+ cp c
+ jr nz, .readChar
+ dec b
+ jr nz, .readChar
+ pop bc
+ ret
+; 3420
+
+GetBasePokemonName:: ; 3420
+; Discards gender (Nidoran).
+
+ push hl
+ call GetPokemonName
+
+ ld hl, StringBuffer1
+.loop
+ ld a, [hl]
+ cp "@"
+ jr z, .quit
+ cp "♂"
+ jr z, .end
+ cp "♀"
+ jr z, .end
+ inc hl
+ jr .loop
+.end
+ ld [hl], "@"
+.quit
+ pop hl
+ ret
+
+; 343b
+
+GetPokemonName:: ; 343b
+; Get Pokemon name wd265.
+
+ ld a, [hROMBank]
+ push af
+ push hl
+ ld a, BANK(PokemonNames)
+ rst Bankswitch
+
+; Each name is ten characters
+ ld a, [wd265]
+ dec a
+ ld d, 0
+ ld e, a
+ ld h, 0
+ ld l, a
+ add hl, hl ; hl = hl * 4
+ add hl, hl ; hl = hl * 4
+ add hl, de ; hl = (hl*4) + de
+ add hl, hl ; hl = (5*hl) + (5*hl)
+ ld de, PokemonNames
+ add hl, de
+
+; Terminator
+ ld de, StringBuffer1
+ push de
+ ld bc, PKMN_NAME_LENGTH - 1
+ call CopyBytes
+ ld hl, StringBuffer1 + PKMN_NAME_LENGTH - 1
+ ld [hl], "@"
+ pop de
+
+ pop hl
+ pop af
+ rst Bankswitch
+ ret
+; 3468
+
+GetItemName:: ; 3468
+; Get item name wd265.
+
+ push hl
+ push bc
+ ld a, [wd265]
+
+ cp TM01
+ jr nc, .TM
+
+ ld [CurSpecies], a
+ ld a, ITEM_NAME
+ ld [wNamedObjectTypeBuffer], a
+ call GetName
+ jr .Copied
+.TM:
+ call GetTMHMName
+.Copied:
+ ld de, StringBuffer1
+ pop bc
+ pop hl
+ ret
+; 3487
+
+GetTMHMName:: ; 3487
+; Get TM/HM name by item id wd265.
+
+ push hl
+ push de
+ push bc
+ ld a, [wd265]
+ push af
+
+; TM/HM prefix
+ cp HM01
+ push af
+ jr c, .TM
+
+ ld hl, .HMText
+ ld bc, .HMTextEnd - .HMText
+ jr .asm_34a1
+
+.TM:
+ ld hl, .TMText
+ ld bc, .TMTextEnd - .TMText
+
+.asm_34a1
+ ld de, StringBuffer1
+ call CopyBytes
+
+; TM/HM number
+ push de
+ ld a, [wd265]
+ ld c, a
+ callfar GetTMHMNumber
+ pop de
+
+; HM numbers start from 51, not 1
+ pop af
+ ld a, c
+ jr c, .asm_34b9
+ sub NUM_TMS
+.asm_34b9
+
+; Divide and mod by 10 to get the top and bottom digits respectively
+ ld b, "0"
+.mod10
+ sub 10
+ jr c, .asm_34c2
+ inc b
+ jr .mod10
+.asm_34c2
+ add 10
+
+ push af
+ ld a, b
+ ld [de], a
+ inc de
+ pop af
+
+ ld b, "0"
+ add b
+ ld [de], a
+
+; End the string
+ inc de
+ ld a, "@"
+ ld [de], a
+
+ pop af
+ ld [wd265], a
+ pop bc
+ pop de
+ pop hl
+ ret
+
+.TMText:
+ db "TM"
+.TMTextEnd:
+ db "@"
+
+.HMText:
+ db "HM"
+.HMTextEnd:
+ db "@"
+; 34df
+
+INCLUDE "home/hm_moves.asm"
+
+GetMoveName:: ; 34f8
+ push hl
+
+ ld a, MOVE_NAME
+ ld [wNamedObjectTypeBuffer], a
+
+ ld a, [wNamedObjectIndexBuffer] ; move id
+ ld [CurSpecies], a
+
+ call GetName
+ ld de, StringBuffer1
+
+ pop hl
+ ret
+; 350c
diff --git a/home/rtc.asm b/home/rtc.asm
index d343d118d..5b83f1079 100644
--- a/home/rtc.asm
+++ b/home/rtc.asm
@@ -14,11 +14,11 @@ RTC:: ; 46f
ret z
TimeOfDayPals:: ; 47e
- callab _TimeOfDayPals
+ callfar _TimeOfDayPals
ret
; 485
UpdateTimePals:: ; 485
- callab _UpdateTimePals
+ callfar _UpdateTimePals
ret
; 48c
diff --git a/home/serial.asm b/home/serial.asm
index e60704f3d..b0151eae2 100644
--- a/home/serial.asm
+++ b/home/serial.asm
@@ -277,7 +277,7 @@ Function83b:: ; 83b
Function862:: ; 862
call LoadTileMapToTempTileMap
- callab PlaceWaitingText
+ callfar PlaceWaitingText
call WaitLinkTransfer
jp Call_LoadTempTileMapToTileMap
; 871
@@ -285,7 +285,7 @@ Function862:: ; 862
Function871:: ; 871
call LoadTileMapToTempTileMap
- callab PlaceWaitingText
+ callfar PlaceWaitingText
jp WaitLinkTransfer
; 87d
diff --git a/home/text.asm b/home/text.asm
index f7730319a..4b0d0d5df 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -8,9 +8,6 @@ TEXTBOX_INNERX EQU TEXTBOX_X + 1
TEXTBOX_Y EQU SCREEN_HEIGHT - TEXTBOX_HEIGHT
TEXTBOX_INNERY EQU TEXTBOX_Y + 2
-TEXTBOX_PAL EQU 7
-
-
ClearBox:: ; fb6
; Fill a c*b box at hl with blank tiles.
@@ -51,7 +48,7 @@ ClearTileMap:: ; fc8
ClearScreen:: ; fdb
- ld a, TEXTBOX_PAL
+ ld a, PAL_BG_TEXT
hlcoord 0, 0, AttrMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
call ByteFill
@@ -133,7 +130,7 @@ TextBoxPalette:: ; 1024
inc b
inc c
inc c
- ld a, TEXTBOX_PAL
+ ld a, PAL_BG_TEXT
.col
push bc
push hl
@@ -230,42 +227,42 @@ dict2: macro
._\@:
endm
- dict "<DAY>", Char15
- dict "<LINE>", LineChar
- dict "<NEXT>", NextLineChar
- dict TX_FAR, TextFar
- dict $00, NullChar
- dict $4c, Char4C
- dict $4b, Char4B
- dict "<PARA>", Paragraph
- dict "<MOM>", PrintMomsName
- dict "<PLAYER>", PrintPlayerName
- dict "<RIVAL>", PrintRivalName
- dict $35, Char35
- dict $36, Char36
- dict $37, Char37
- dict "<RED>", PrintRedsName
- dict "<GREEN>", PrintGreensName
- dict "#", PlacePOKe
- dict "<PC>", PCChar
- dict "<ROCKET>", RocketChar
- dict "<TM>", TMChar
- dict "<TRNER>", TrainerChar
- dict $23, PlaceKougeki
- dict "<LNBRK>", Char22
- dict "<CONT>", ContText
- dict "<......>", SixDotsChar
- dict "<DONE>", DoneText
- dict "<PROMPT>", PromptText
- dict "<PKMN>", PlacePKMN
- dict "<POKE>", PlacePOKE
- dict $25, NextChar
- dict2 $1f, " "
- dict "<DEXEND>", PlaceDexEnd
- dict "<TARGET>", PlaceMoveTargetsName
- dict "<USER>", PlaceMoveUsersName
- dict "<ENEMY>", PlaceEnemysName
- dict "<PLAY_G>", PlaceGenderedPlayerName
+ dict "<DAY>", Char15
+ dict "<LINE>", LineChar
+ dict "<NEXT>", NextLineChar
+ dict TX_FAR, TextFar
+ dict $00, NullChar
+ dict $4c, Char4C
+ dict $4b, Char4B
+ dict "<PARA>", Paragraph
+ dict "<MOM>", PrintMomsName
+ dict "<PLAYER>", PrintPlayerName
+ dict "<RIVAL>", PrintRivalName
+ dict $35, Char35
+ dict $36, Char36
+ dict $37, Char37
+ dict "<RED>", PrintRedsName
+ dict "<GREEN>", PrintGreensName
+ dict "#", PlacePOKe
+ dict "<PC>", PCChar
+ dict "<ROCKET>", RocketChar
+ dict "<TM>", TMChar
+ dict "<TRNER>", TrainerChar
+ dict "<KOUGEKI>", PlaceKougeki
+ dict "<LNBRK>", Char22
+ dict "<CONT>", ContText
+ dict "<......>", SixDotsChar
+ dict "<DONE>", DoneText
+ dict "<PROMPT>", PromptText
+ dict "<PKMN>", PlacePKMN
+ dict "<POKE>", PlacePOKE
+ dict "%", NextChar
+ dict2 "¯", " "
+ dict "<DEXEND>", PlaceDexEnd
+ dict "<TARGET>", PlaceMoveTargetsName
+ dict "<USER>", PlaceMoveUsersName
+ dict "<ENEMY>", PlaceEnemysName
+ dict "<PLAY_G>", PlaceGenderedPlayerName
cp "゚"
jr z, .place ; should be .diacritic
@@ -318,7 +315,7 @@ endm
Char15:: ; 117b
ld c, l
ld b, h
- callba Function17f036
+ farcall Function17f036
jp PlaceNextChar
; 1186
@@ -394,7 +391,7 @@ PlaceEnemysName:: ; 121b
ld de, String12a2
call PlaceString
push bc
- callab Battle_GetTrainerName
+ callfar Battle_GetTrainerName
pop hl
ld de, StringBuffer1
jr PlaceCommandCharacter
@@ -748,6 +745,7 @@ DoTextUntilTerminator:: ; 13f6
; 1410
TextCommands:: ; 1410
+; entries correspond to macros/text.asm enumeration
dw Text_TX
dw Text_TX_RAM
dw Text_TX_BCD
diff --git a/home/tilemap.asm b/home/tilemap.asm
index 1d7998130..9e15ed85b 100644
--- a/home/tilemap.asm
+++ b/home/tilemap.asm
@@ -1,16 +1,16 @@
PushWindow:: ; 1c00
- callab _PushWindow
+ callfar _PushWindow
ret
; 1c07
ExitMenu:: ; 0x1c07
push af
- callab _ExitMenu
+ callfar _ExitMenu
pop af
ret
InitVerticalMenuCursor:: ; 0x1c10
- callab _InitVerticalMenuCursor
+ callfar _InitVerticalMenuCursor
ret
CloseWindow:: ; 0x1c17
diff --git a/home/time.asm b/home/time.asm
index 338168752..9ed703686 100644
--- a/home/time.asm
+++ b/home/time.asm
@@ -28,7 +28,7 @@ UpdateTime:: ; 5a7
call GetClock
call FixDays
call FixTime
- callba GetTimeOfDay
+ farcall GetTimeOfDay
ret
; 5b7
@@ -49,19 +49,16 @@ GetClock:: ; 5b7
ld [hl], RTC_S
ld a, [de]
maskbits 60
- and x
ld [hRTCSeconds], a
ld [hl], RTC_M
ld a, [de]
maskbits 60
- and x
ld [hRTCMinutes], a
ld [hl], RTC_H
ld a, [de]
maskbits 24
- and x
ld [hRTCHours], a
ld [hl], RTC_DL
@@ -208,7 +205,7 @@ SetDayOfWeek:: ; 663
jr InitTime ; useless
InitTime:: ; 677
- callba _InitTime
+ farcall _InitTime
ret
; 67e
diff --git a/home/trainers.asm b/home/trainers.asm
new file mode 100644
index 000000000..857a95629
--- /dev/null
+++ b/home/trainers.asm
@@ -0,0 +1,263 @@
+CheckTrainerBattle2:: ; 3600
+ ld a, [hROMBank]
+ push af
+
+ call SwitchToMapScriptHeaderBank
+ call CheckTrainerBattle
+
+ pop bc
+ ld a, b
+ rst Bankswitch
+ ret
+; 360d
+
+CheckTrainerBattle:: ; 360d
+; Check if any trainer on the map sees the player and wants to battle.
+
+; Skip the player object.
+ ld a, 1
+ ld de, MapObjects + OBJECT_LENGTH
+
+.loop
+
+; Start a battle if the object:
+
+ push af
+ push de
+
+; Has a sprite
+ ld hl, MAPOBJECT_SPRITE
+ add hl, de
+ ld a, [hl]
+ and a
+ jr z, .next
+
+; Is a trainer
+ ld hl, MAPOBJECT_COLOR
+ add hl, de
+ ld a, [hl]
+ and $f
+ cp $2
+ jr nz, .next
+
+; Is visible on the map
+ ld hl, MAPOBJECT_OBJECT_STRUCT_ID
+ add hl, de
+ ld a, [hl]
+ cp -1
+ jr z, .next
+
+; Is facing the player...
+ call GetObjectStruct
+ call FacingPlayerDistance_bc
+ jr nc, .next
+
+; ...within their sight range
+ ld hl, MAPOBJECT_RANGE
+ add hl, de
+ ld a, [hl]
+ cp b
+ jr c, .next
+
+; And hasn't already been beaten
+ push bc
+ push de
+ ld hl, MAPOBJECT_SCRIPT_POINTER
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld b, CHECK_FLAG
+ call EventFlagAction
+ ld a, c
+ pop de
+ pop bc
+ and a
+ jr z, .startbattle
+
+.next
+ pop de
+ ld hl, OBJECT_LENGTH
+ add hl, de
+ ld d, h
+ ld e, l
+
+ pop af
+ inc a
+ cp NUM_OBJECTS
+ jr nz, .loop
+ xor a
+ ret
+
+.startbattle
+ pop de
+ pop af
+ ld [hLastTalked], a
+ ld a, b
+ ld [EngineBuffer2], a
+ ld a, c
+ ld [EngineBuffer3], a
+ jr LoadTrainer_continue
+; 3674
+
+TalkToTrainer:: ; 3674
+ ld a, 1
+ ld [EngineBuffer2], a
+ ld a, -1
+ ld [EngineBuffer3], a
+
+LoadTrainer_continue:: ; 367e
+ call GetMapScriptHeaderBank
+ ld [EngineBuffer1], a
+
+ ld a, [hLastTalked]
+ call GetMapObject
+
+ ld hl, MAPOBJECT_SCRIPT_POINTER
+ add hl, bc
+ ld a, [EngineBuffer1]
+ call GetFarHalfword
+ ld de, wTempTrainerHeader
+ ld bc, wTempTrainerHeaderEnd - wTempTrainerHeader
+ ld a, [EngineBuffer1]
+ call FarCopyBytes
+ xor a
+ ld [wRunningTrainerBattleScript], a
+ scf
+ ret
+; 36a5
+
+FacingPlayerDistance_bc:: ; 36a5
+
+ push de
+ call FacingPlayerDistance
+ ld b, d
+ ld c, e
+ pop de
+ ret
+; 36ad
+
+FacingPlayerDistance:: ; 36ad
+; Return carry if the sprite at bc is facing the player,
+; and its distance in d.
+
+ ld hl, OBJECT_NEXT_MAP_X ; x
+ add hl, bc
+ ld d, [hl]
+
+ ld hl, OBJECT_NEXT_MAP_Y ; y
+ add hl, bc
+ ld e, [hl]
+
+ ld a, [PlayerStandingMapX]
+ cp d
+ jr z, .CheckY
+
+ ld a, [PlayerStandingMapY]
+ cp e
+ jr z, .CheckX
+
+ and a
+ ret
+
+.CheckY:
+ ld a, [PlayerStandingMapY]
+ sub e
+ jr z, .NotFacing
+ jr nc, .Above
+
+; Below
+ cpl
+ inc a
+ ld d, a
+ ld e, OW_UP
+ jr .CheckFacing
+
+.Above:
+ ld d, a
+ ld e, OW_DOWN
+ jr .CheckFacing
+
+.CheckX:
+ ld a, [PlayerStandingMapX]
+ sub d
+ jr z, .NotFacing
+ jr nc, .Left
+
+; Right
+ cpl
+ inc a
+ ld d, a
+ ld e, OW_LEFT
+ jr .CheckFacing
+
+.Left:
+ ld d, a
+ ld e, OW_RIGHT
+
+.CheckFacing:
+ call GetSpriteDirection
+ cp e
+ jr nz, .NotFacing
+ scf
+ ret
+
+.NotFacing:
+ and a
+ ret
+; 36f5
+
+CheckTrainerFlag:: ; 36f5
+ push bc
+ ld hl, OBJECT_MAP_OBJECT_INDEX
+ add hl, bc
+ ld a, [hl]
+ call GetMapObject
+ ld hl, MAPOBJECT_SCRIPT_POINTER
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ call GetMapScriptHeaderBank
+ call GetFarHalfword
+ ld d, h
+ ld e, l
+ push de
+ ld b, CHECK_FLAG
+ call EventFlagAction
+ pop de
+ ld a, c
+ and a
+ pop bc
+ ret
+; 3718
+
+PrintWinLossText:: ; 3718
+ ld a, [BattleType]
+ cp BATTLETYPE_CANLOSE
+ jr .canlose ; ??????????
+
+; unreferenced
+ ld hl, wWinTextPointer
+ jr .ok
+
+.canlose
+ ld a, [wBattleResult]
+ ld hl, wWinTextPointer
+ and $f
+ jr z, .ok
+ ld hl, wLossTextPointer
+
+.ok
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ call GetMapScriptHeaderBank
+ call FarPrintText
+ call WaitBGMap
+ call WaitPressAorB_BlinkCursor
+ ret
+; 3741
diff --git a/home/window.asm b/home/window.asm
index ff7d766e2..0570bbb01 100644
--- a/home/window.asm
+++ b/home/window.asm
@@ -43,8 +43,8 @@ CloseText:: ; 2dcf
ld a, $90
ld [hWY], a
call ReplaceKrisSprite
- callba ReturnFromMapSetupScript
- callba LoadOverworldFont
+ farcall ReturnFromMapSetupScript
+ farcall LoadOverworldFont
ret
; 2e08
@@ -71,7 +71,7 @@ _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 2e20
ld a, $1
ld [hOAMUpdate], a
- callba OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ farcall OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
pop af
ld [hOAMUpdate], a
diff --git a/interrupts.asm b/interrupts.asm
index ba09578ea..0cae6441c 100644
--- a/interrupts.asm
+++ b/interrupts.asm
@@ -1,16 +1,16 @@
; Game Boy hardware interrupts
-SECTION "vblank",ROM0
+SECTION "vblank", ROM0
jp VBlank
-SECTION "lcd",ROM0
+SECTION "lcd", ROM0
jp LCD
-SECTION "timer",ROM0
+SECTION "timer", ROM0
jp Timer
-SECTION "serial",ROM0
+SECTION "serial", ROM0
jp Serial
-SECTION "joypad",ROM0
+SECTION "joypad", ROM0
jp JoypadInt
diff --git a/items/item_attributes.asm b/items/item_attributes.asm
deleted file mode 100644
index b0ba5febf..000000000
--- a/items/item_attributes.asm
+++ /dev/null
@@ -1,778 +0,0 @@
-item_attribute: MACRO
-; price, held effect, parameter, property, pocket, field menu, battle menu
- dw \1
- db \2, \3, \4, \5
- dn \6, \7
-ENDM
-
-Item1Attributes:
-
-; MASTER BALL
- item_attribute 0, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-Item2Attributes:
-
-; ULTRA BALL
- item_attribute 1200, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; BRIGHTPOWDER
- item_attribute 10, HELD_BRIGHTPOWDER, 20, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; GREAT BALL
- item_attribute 600, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; # BALL
- item_attribute 200, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BICYCLE
- item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-
-; MOON STONE
- item_attribute 0, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; ANTIDOTE
- item_attribute 100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; BURN HEAL
- item_attribute 250, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; ICE HEAL
- item_attribute 250, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; AWAKENING
- item_attribute 250, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; PARLYZ HEAL
- item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; FULL RESTORE
- item_attribute 3000, 0, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; MAX POTION
- item_attribute 2500, 0, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; HYPER POTION
- item_attribute 1200, 0, 200, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; SUPER POTION
- item_attribute 700, 0, 50, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; POTION
- item_attribute 300, 0, 20, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; ESCAPE ROPE
- item_attribute 550, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-
-; REPEL
- item_attribute 350, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
-
-; MAX ELIXER
- item_attribute 4500, 0, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; FIRE STONE
- item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; THUNDERSTONE
- item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; WATER STONE
- item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; HP UP
- item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; PROTEIN
- item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; IRON
- item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; CARBOS
- item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; LUCKY PUNCH
- item_attribute 10, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; CALCIUM
- item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; RARE CANDY
- item_attribute 4800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; X ACCURACY
- item_attribute 950, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; LEAF STONE
- item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; METAL POWDER
- item_attribute 10, HELD_METAL_POWDER, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; NUGGET
- item_attribute 10000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; # DOLL
- item_attribute 1000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; FULL HEAL
- item_attribute 600, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; REVIVE
- item_attribute 1500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; MAX REVIVE
- item_attribute 4000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; GUARD SPEC.
- item_attribute 700, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; SUPER REPEL
- item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
-
-; MAX REPEL
- item_attribute 700, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
-
-; DIRE HIT
- item_attribute 650, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; FRESH WATER
- item_attribute 200, 0, 50, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; SODA POP
- item_attribute 300, 0, 60, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; LEMONADE
- item_attribute 350, 0, 80, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; X ATTACK
- item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; X DEFEND
- item_attribute 550, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; X SPEED
- item_attribute 350, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; X SPECIAL
- item_attribute 350, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; COIN CASE
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
-
-; ITEMFINDER
- item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; EXP.SHARE
- item_attribute 3000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; OLD ROD
- item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-
-; GOOD ROD
- item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-
-; SILVER LEAF
- item_attribute 1000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; SUPER ROD
- item_attribute 0, 0, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-
-; PP UP
- item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; ETHER
- item_attribute 1200, 0, 10, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; MAX ETHER
- item_attribute 2000, 0, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; ELIXER
- item_attribute 3000, 0, 10, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; RED SCALE
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; SECRETPOTION
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; S.S.TICKET
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; MYSTERY EGG
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; CLEAR BELL
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; SILVER WING
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; MOOMOO MILK
- item_attribute 500, 0, 100, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; QUICK CLAW
- item_attribute 100, HELD_QUICK_CLAW, 60, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; PSNCUREBERRY
- item_attribute 10, HELD_HEAL_POISON, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; GOLD LEAF
- item_attribute 1000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; SOFT SAND
- item_attribute 100, HELD_GROUND_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; SHARP BEAK
- item_attribute 100, HELD_FLYING_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; PRZCUREBERRY
- item_attribute 10, HELD_HEAL_PARALYZE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; BURNT BERRY
- item_attribute 10, HELD_HEAL_FREEZE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; ICE BERRY
- item_attribute 10, HELD_HEAL_BURN, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; POISON BARB
- item_attribute 100, HELD_POISON_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; KING'S ROCK
- item_attribute 100, HELD_TRADE_EVOLVE, 30, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BITTER BERRY
- item_attribute 10, HELD_HEAL_CONFUSION, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_PARTY
-
-; MINT BERRY
- item_attribute 10, HELD_HEAL_SLEEP, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; RED APRICORN
- item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TINYMUSHROOM
- item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BIG MUSHROOM
- item_attribute 5000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; SILVERPOWDER
- item_attribute 100, HELD_BUG_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BLU APRICORN
- item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; AMULET COIN
- item_attribute 100, HELD_AMULET_COIN, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; YLW APRICORN
- item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; GRN APRICORN
- item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; CLEANSE TAG
- item_attribute 200, HELD_CLEANSE_TAG, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; MYSTIC WATER
- item_attribute 100, HELD_WATER_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TWISTEDSPOON
- item_attribute 100, HELD_PSYCHIC_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; WHT APRICORN
- item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BLACKBELT
- item_attribute 100, HELD_FIGHTING_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BLK APRICORN
- item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; PNK APRICORN
- item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BLACKGLASSES
- item_attribute 100, HELD_DARK_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; SLOWPOKETAIL
- item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; PINK BOW
- item_attribute 100, HELD_NORMAL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; STICK
- item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; SMOKE BALL
- item_attribute 200, HELD_ESCAPE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; NEVERMELTICE
- item_attribute 100, HELD_ICE_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; MAGNET
- item_attribute 100, HELD_ELECTRIC_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; MIRACLEBERRY
- item_attribute 10, HELD_HEAL_STATUS, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; PEARL
- item_attribute 1400, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BIG PEARL
- item_attribute 7500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; EVERSTONE
- item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; SPELL TAG
- item_attribute 100, HELD_GHOST_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; RAGECANDYBAR
- item_attribute 300, 0, 20, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; GS BALL
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BLUE CARD
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
-
-; MIRACLE SEED
- item_attribute 100, HELD_GRASS_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; THICK CLUB
- item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; FOCUS BAND
- item_attribute 200, HELD_FOCUS_BAND, 30, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; ENERGYPOWDER
- item_attribute 500, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; ENERGY ROOT
- item_attribute 800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; HEAL POWDER
- item_attribute 450, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; REVIVAL HERB
- item_attribute 2800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; HARD STONE
- item_attribute 100, HELD_ROCK_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; LUCKY EGG
- item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; CARD KEY
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-
-; MACHINE PART
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; EGG TICKET
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; LOST ITEM
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; STARDUST
- item_attribute 2000, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; STAR PIECE
- item_attribute 9800, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BASEMENT KEY
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-
-; PASS
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; CHARCOAL
- item_attribute 9800, HELD_FIRE_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BERRY JUICE
- item_attribute 100, HELD_BERRY, 20, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; SCOPE LENS
- item_attribute 200, HELD_CRITICAL_UP, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; METAL COAT
- item_attribute 100, HELD_STEEL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; DRAGON FANG
- item_attribute 100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; LEFTOVERS
- item_attribute 200, HELD_LEFTOVERS, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; MYSTERYBERRY
- item_attribute 10, HELD_RESTORE_PP, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; DRAGON SCALE
- item_attribute 2100, HELD_DRAGON_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BERSERK GENE
- item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; SACRED ASH
- item_attribute 200, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-
-; HEAVY BALL
- item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; FLOWER MAIL
- item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; LEVEL BALL
- item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; LURE BALL
- item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; FAST BALL
- item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; LIGHT BALL
- item_attribute 100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; FRIEND BALL
- item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; MOON BALL
- item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; LOVE BALL
- item_attribute 150, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; NORMAL BOX
- item_attribute 10, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
-
-; GORGEOUS BOX
- item_attribute 10, 0, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE
-
-; SUN STONE
- item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; POLKADOT BOW
- item_attribute 100, HELD_NORMAL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; UP-GRADE
- item_attribute 2100, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BERRY
- item_attribute 10, HELD_BERRY, 10, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; GOLD BERRY
- item_attribute 10, HELD_BERRY, 30, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY
-
-; SQUIRTBOTTLE
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; PARK BALL
- item_attribute 0, 0, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE
-
-; RAINBOW WING
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BRICK PIECE
- item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; SURF MAIL
- item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; LITEBLUEMAIL
- item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; PORTRAITMAIL
- item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; LOVELY MAIL
- item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; EON MAIL
- item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; MORPH MAIL
- item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; BLUESKY MAIL
- item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; MUSIC MAIL
- item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; MIRAGE MAIL
- item_attribute 50, 0, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TM01
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM02
- item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM03
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM04
- item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TM05
- item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM06
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM07
- item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM08
- item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM09
- item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM10
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM11
- item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM12
- item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM13
- item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM14
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM15
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM16
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM17
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM18
- item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM19
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM20
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM21
- item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM22
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM23
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM24
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM25
- item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM26
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM27
- item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM28
- item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TM29
- item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM30
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM31
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM32
- item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM33
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM34
- item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM35
- item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM36
- item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM37
- item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM38
- item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM39
- item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM40
- item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM41
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM42
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM43
- item_attribute 1000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM44
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM45
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM46
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM47
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM48
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM49
- item_attribute 3000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TM50
- item_attribute 2000, 0, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; HM01
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; HM02
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; HM03
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; HM04
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; HM05
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; HM06
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; HM07
- item_attribute 0, 0, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; TERU-SAMA
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
-
-; ?
- item_attribute $9999, 0, 0, 0, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE
diff --git a/items/item_descriptions.asm b/items/item_descriptions.asm
deleted file mode 100644
index 40e91b2c9..000000000
--- a/items/item_descriptions.asm
+++ /dev/null
@@ -1,1042 +0,0 @@
-PrintItemDescription: ; 0x1c8955
-; Print the description for item [CurSpecies] at de.
-
- ld a, [CurSpecies]
- cp TM01
- jr c, .not_a_tm
-
- ld [CurItem], a
- push de
- callba GetTMHMItemMove
- pop hl
- ld a, [wd265]
- ld [CurSpecies], a
- predef PrintMoveDesc
- ret
-
-.not_a_tm
- push de
- ld hl, ItemDescriptions
- ld a, [CurSpecies]
- dec a
- ld c, a
- ld b, 0
- add hl, bc
- add hl, bc
- ld e, [hl]
- inc hl
- ld d, [hl]
- pop hl
- jp PlaceString
-; 0x1c8987
-
-
-ItemDescriptions:
- dw MasterBallDesc
- dw UltraBallDesc
- dw BrightpowderDesc
- dw GreatBallDesc
- dw PokeBallDesc
- dw TeruSama1Desc
- dw BicycleDesc
- dw MoonStoneDesc
- dw AntidoteDesc
- dw BurnHealDesc
- dw IceHealDesc
- dw AwakeningDesc
- dw ParlyzHealDesc
- dw FullRestoreDesc
- dw MaxPotionDesc
- dw HyperPotionDesc
- dw SuperPotionDesc
- dw PotionDesc
- dw EscapeRopeDesc
- dw RepelDesc
- dw MaxElixerDesc
- dw FireStoneDesc
- dw ThunderStoneDesc
- dw WaterStoneDesc
- dw TeruSama2Desc
- dw HPUpDesc
- dw ProteinDesc
- dw IronDesc
- dw CarbosDesc
- dw LuckyPunchDesc
- dw CalciumDesc
- dw RareCandyDesc
- dw XAccuracyDesc
- dw LeafStoneDesc
- dw MetalPowderDesc
- dw NuggetDesc
- dw PokeDollDesc
- dw FullHealDesc
- dw ReviveDesc
- dw MaxReviveDesc
- dw GuardSpecDesc
- dw SuperRepelDesc
- dw MaxRepelDesc
- dw DireHitDesc
- dw TeruSama3Desc
- dw FreshWaterDesc
- dw SodaPopDesc
- dw LemonadeDesc
- dw XAttackDesc
- dw TeruSama4Desc
- dw XDefendDesc
- dw XSpeedDesc
- dw XSpecialDesc
- dw CoinCaseDesc
- dw ItemfinderDesc
- dw TeruSama5Desc
- dw ExpShareDesc
- dw OldRodDesc
- dw GoodRodDesc
- dw SilverLeafDesc
- dw SuperRodDesc
- dw PPUpDesc
- dw EtherDesc
- dw MaxEtherDesc
- dw ElixerDesc
- dw RedScaleDesc
- dw SecretPotionDesc
- dw SSTicketDesc
- dw MysteryEggDesc
- dw ClearBellDesc
- dw SilverWingDesc
- dw MoomooMilkDesc
- dw QuickClawDesc
- dw PsnCureBerryDesc
- dw GoldLeafDesc
- dw SoftSandDesc
- dw SharpBeakDesc
- dw PrzCureBerryDesc
- dw BurntBerryDesc
- dw IceBerryDesc
- dw PoisonBarbDesc
- dw KingsRockDesc
- dw BitterBerryDesc
- dw MintBerryDesc
- dw RedApricornDesc
- dw TinyMushroomDesc
- dw BigMushroomDesc
- dw SilverPowderDesc
- dw BluApricornDesc
- dw TeruSama6Desc
- dw AmuletCoinDesc
- dw YlwApricornDesc
- dw GrnApricornDesc
- dw CleanseTagDesc
- dw MysticWaterDesc
- dw TwistedSpoonDesc
- dw WhtApricornDesc
- dw BlackbeltDesc
- dw BlkApricornDesc
- dw TeruSama7Desc
- dw PnkApricornDesc
- dw BlackGlassesDesc
- dw SlowpokeTailDesc
- dw PinkBowDesc
- dw StickDesc
- dw SmokeBallDesc
- dw NeverMeltIceDesc
- dw MagnetDesc
- dw MiracleBerryDesc
- dw PearlDesc
- dw BigPearlDesc
- dw EverStoneDesc
- dw SpellTagDesc
- dw RageCandyBarDesc
- dw GSBallDesc
- dw BlueCardDesc
- dw MiracleSeedDesc
- dw ThickClubDesc
- dw FocusBandDesc
- dw TeruSama8Desc
- dw EnergyPowderDesc
- dw EnergyRootDesc
- dw HealPowderDesc
- dw RevivalHerbDesc
- dw HardStoneDesc
- dw LuckyEggDesc
- dw CardKeyDesc
- dw MachinePartDesc
- dw EggTicketDesc
- dw LostItemDesc
- dw StardustDesc
- dw StarPieceDesc
- dw BasementKeyDesc
- dw PassDesc
- dw TeruSama9Desc
- dw TeruSama10Desc
- dw TeruSama11Desc
- dw CharcoalDesc
- dw BerryJuiceDesc
- dw ScopeLensDesc
- dw TeruSama12Desc
- dw TeruSama13Desc
- dw MetalCoatDesc
- dw DragonFangDesc
- dw TeruSama14Desc
- dw LeftoversDesc
- dw TeruSama15Desc
- dw TeruSama16Desc
- dw TeruSama17Desc
- dw MysteryBerryDesc
- dw DragonScaleDesc
- dw BerserkGeneDesc
- dw TeruSama18Desc
- dw TeruSama19Desc
- dw TeruSama20Desc
- dw SacredAshDesc
- dw HeavyBallDesc
- dw FlowerMailDesc
- dw LevelBallDesc
- dw LureBallDesc
- dw FastBallDesc
- dw TeruSama21Desc
- dw LightBallDesc
- dw FriendBallDesc
- dw MoonBallDesc
- dw LoveBallDesc
- dw NormalBoxDesc
- dw GorgeousBoxDesc
- dw SunStoneDesc
- dw PolkadotBowDesc
- dw TeruSama22Desc
- dw UpGradeDesc
- dw BerryDesc
- dw GoldBerryDesc
- dw SquirtBottleDesc
- dw TeruSama23Desc
- dw ParkBallDesc
- dw RainbowWingDesc
- dw TeruSama24Desc
- dw BrickPieceDesc
- dw SurfMailDesc
- dw LiteBlueMailDesc
- dw PortraitMailDesc
- dw LovelyMailDesc
- dw EonMailDesc
- dw MorphMailDesc
- dw BlueSkyMailDesc
- dw MusicMailDesc
- dw MewMailDesc
- dw TeruSama25Desc
- dw TeruSama26Desc
- dw TeruSama26Desc
- dw TeruSama26Desc
- dw TeruSama26Desc
- dw TeruSama26Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama27Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama28Desc
- dw TeruSama29Desc
- dw TeruSama30Desc
- dw TeruSama31Desc
- dw TeruSama32Desc
- dw TeruSama33Desc
-
-MasterBallDesc:
- db "The best BALL. It"
- next "never misses.@"
-
-UltraBallDesc:
- db "A BALL with a high"
- next "rate of success.@"
-
-BrightpowderDesc:
- db "Lowers the foe's"
- next "accuracy. (HOLD)@"
-
-GreatBallDesc:
- db "A BALL with a de-"
- next "cent success rate.@"
-
-PokeBallDesc:
- db "An item for catch-"
- next "ing #MON.@"
-
-TeruSama1Desc:
- db "?@"
-
-BicycleDesc:
- db "A collapsible bike"
- next "for fast movement.@"
-
-MoonStoneDesc:
- db "Evolves certain"
- next "kinds of #MON.@"
-
-AntidoteDesc:
- db "Cures poisoned"
- next "#MON.@"
-
-BurnHealDesc:
- db "Heals burned"
- next "#MON.@"
-
-IceHealDesc:
- db "Defrosts frozen"
- next "#MON.@"
-
-AwakeningDesc:
- db "Awakens sleeping"
- next "#MON.@"
-
-ParlyzHealDesc:
- db "Heals paralyzed"
- next "#MON.@"
-
-FullRestoreDesc:
- db "Fully restores HP"
- next "& status.@"
-
-MaxPotionDesc:
- db "Fully restores"
- next "#MON HP.@"
-
-HyperPotionDesc:
- db "Restores #MON"
- next "HP by 200.@"
-
-SuperPotionDesc:
- db "Restores #MON"
- next "HP by 50.@"
-
-PotionDesc:
- db "Restores #MON"
- next "HP by 20.@"
-
-EscapeRopeDesc:
- db "Use for escaping"
- next "from caves, etc.@"
-
-RepelDesc:
- db "Repels weak #-"
- next "MON for 100 steps.@"
-
-MaxElixerDesc:
- db "Fully restores the"
- next "PP of one #MON.@"
-
-FireStoneDesc:
- db "Evolves certain"
- next "kinds of #MON.@"
-
-ThunderStoneDesc:
- db "Evolves certain"
- next "kinds of #MON.@"
-
-WaterStoneDesc:
- db "Evolves certain"
- next "kinds of #MON.@"
-
-TeruSama2Desc:
- db "?@"
-
-HPUpDesc:
- db "Raises the HP of"
- next "one #MON.@"
-
-ProteinDesc:
- db "Raises ATTACK of"
- next "one #MON.@"
-
-IronDesc:
- db "Raises DEFENSE of"
- next "one #MON.@"
-
-CarbosDesc:
- db "Raises SPEED of"
- next "one #MON.@"
-
-LuckyPunchDesc:
- db "Ups critical hit"
- next "ratio of CHANSEY.@"
-
-CalciumDesc:
- db "Ups SPECIAL stats"
- next "of one #MON.@"
-
-RareCandyDesc:
- db "Raises level of a"
- next "#MON by one.@"
-
-XAccuracyDesc:
- db "Raises accuracy."
- next "(1 BTL)@"
-
-LeafStoneDesc:
- db "Evolves certain"
- next "kinds of #MON.@"
-
-MetalPowderDesc:
- db "Raises DEFENSE of"
- next "DITTO. (HOLD)@"
-
-NuggetDesc:
- db "Made of pure gold."
- next "Sell high.@"
-
-PokeDollDesc:
- db "Use to escape from"
- next "a wild #MON.@"
-
-FullHealDesc:
- db "Eliminates all"
- next "status problems.@"
-
-ReviveDesc:
- db "Restores a fainted"
- next "#MON to 1/2 HP.@"
-
-MaxReviveDesc:
- db "Fully restores a"
- next "fainted #MON.@"
-
-GuardSpecDesc:
- db "Prevents stats"
- next "reduction. (1 BTL)@"
-
-SuperRepelDesc:
- db "Repels weak #-"
- next "MON for 200 steps.@"
-
-MaxRepelDesc:
- db "Repels weak #-"
- next "MON for 250 steps.@"
-
-DireHitDesc:
- db "Ups critical hit"
- next "ratio. (1 BTL)@"
-
-TeruSama3Desc:
- db "?@"
-
-FreshWaterDesc:
- db "Restores #MON"
- next "HP by 50.@"
-
-SodaPopDesc:
- db "Restores #MON"
- next "HP by 60.@"
-
-LemonadeDesc:
- db "Restores #MON"
- next "HP by 80.@"
-
-XAttackDesc:
- db "Raises ATTACK."
- next "(1 BTL)@"
-
-TeruSama4Desc:
- db "?@"
-
-XDefendDesc:
- db "Raises DEFENSE."
- next "(1 BTL)@"
-
-XSpeedDesc:
- db "Raises SPEED."
- next "(1 BTL)@"
-
-XSpecialDesc:
- db "Raises SPECIAL"
- next "ATTACK. (1 BTL)@"
-
-CoinCaseDesc:
- db "Holds up to 9,999"
- next "game coins.@"
-
-ItemfinderDesc:
- db "Checks for unseen"
- next "items in the area.@"
-
-TeruSama5Desc:
- db "?@"
-
-ExpShareDesc:
- db "Shares battle EXP."
- next "Points. (HOLD)@"
-
-OldRodDesc:
- db "Use by water to"
- next "fish for #MON.@"
-
-GoodRodDesc:
- db "A good ROD for"
- next "catching #MON.@"
-
-SilverLeafDesc:
- db "A strange, silver-"
- next "colored leaf.@"
-
-SuperRodDesc:
- db "The best ROD for"
- next "catching #MON.@"
-
-PPUpDesc:
- db "Raises max PP of"
- next "a selected move.@"
-
-EtherDesc:
- db "Restores PP of one"
- next "move by 10.@"
-
-MaxEtherDesc:
- db "Fully restores PP"
- next "of one move.@"
-
-ElixerDesc:
- db "Restores PP of all"
- next "moves by 10.@"
-
-RedScaleDesc:
- db "A scale from the"
- next "red GYARADOS.@"
-
-SecretPotionDesc:
- db "Fully heals any"
- next "#MON.@"
-
-SSTicketDesc:
- db "A ticket for the"
- next "S.S.AQUA.@"
-
-MysteryEggDesc:
- db "An EGG obtained"
- next "from MR.#MON.@"
-
-ClearBellDesc:
- db "Makes a gentle"
- next "ringing.@"
-
-SilverWingDesc:
- db "A strange, silver-"
- next "colored feather.@"
-
-MoomooMilkDesc:
- db "Restores #MON"
- next "HP by 100.@"
-
-QuickClawDesc:
- db "Raises 1st strike"
- next "ratio. (HOLD)@"
-
-PsnCureBerryDesc:
- db "A self-cure for"
- next "poison. (HOLD)@"
-
-GoldLeafDesc:
- db "A strange, gold-"
- next "colored leaf.@"
-
-SoftSandDesc:
- db "Powers up ground-"
- next "type moves. (HOLD)@"
-
-SharpBeakDesc:
- db "Powers up flying-"
- next "type moves. (HOLD)@"
-
-PrzCureBerryDesc:
- db "A self-cure for"
- next "paralysis. (HOLD)@"
-
-BurntBerryDesc:
- db "A self-cure for"
- next "freezing. (HOLD)@"
-
-IceBerryDesc:
- db "A self-heal for a"
- next "burn. (HOLD)@"
-
-PoisonBarbDesc:
- db "Powers up poison-"
- next "type moves. (HOLD)@"
-
-KingsRockDesc:
- db "May make the foe"
- next "flinch. (HOLD)@"
-
-BitterBerryDesc:
- db "A self-cure for"
- next "confusion. (HOLD)@"
-
-MintBerryDesc:
- db "A self-awakening"
- next "for sleep. (HOLD)@"
-
-RedApricornDesc:
- db "A red APRICORN.@"
-
-TinyMushroomDesc:
- db "An ordinary mush-"
- next "room. Sell low.@"
-
-BigMushroomDesc:
- db "A rare mushroom."
- next "Sell high.@"
-
-SilverPowderDesc:
- db "Powers up bug-type"
- next "moves. (HOLD)@"
-
-BluApricornDesc:
- db "A blue APRICORN.@"
-
-TeruSama6Desc:
- db "?@"
-
-AmuletCoinDesc:
- db "Doubles monetary"
- next "earnings. (HOLD)@"
-
-YlwApricornDesc:
- db "A yellow APRICORN.@"
-
-GrnApricornDesc:
- db "A green APRICORN.@"
-
-CleanseTagDesc:
- db "Helps repel wild"
- next "#MON. (HOLD)@"
-
-MysticWaterDesc:
- db "Powers up water-"
- next "type moves. (HOLD)@"
-
-TwistedSpoonDesc:
- db "Powers up psychic-"
- next "type moves. (HOLD)@"
-
-WhtApricornDesc:
- db "A white APRICORN.@"
-
-BlackbeltDesc:
- db "Boosts fighting-"
- next "type moves. (HOLD)@"
-
-BlkApricornDesc:
- db "A black APRICORN."
- next "@"
-
-TeruSama7Desc:
- db "?@"
-
-PnkApricornDesc:
- db "A pink APRICORN."
- next "@"
-
-BlackGlassesDesc:
- db "Powers up dark-"
- next "type moves. (HOLD)@"
-
-SlowpokeTailDesc:
- db "Very tasty. Sell"
- next "high.@"
-
-PinkBowDesc:
- db "Powers up normal-"
- next "type moves. (HOLD)@"
-
-StickDesc:
- db "An ordinary stick."
- next "Sell low.@"
-
-SmokeBallDesc:
- db "Escape from wild"
- next "#MON. (HOLD)@"
-
-NeverMeltIceDesc:
- db "Powers up ice-type"
- next "moves. (HOLD)@"
-
-MagnetDesc:
- db "Boosts electric-"
- next "type moves. (HOLD)@"
-
-MiracleBerryDesc:
- db "Cures all status"
- next "problems. (HOLD)@"
-
-PearlDesc:
- db "A beautiful pearl."
- next "Sell low.@"
-
-BigPearlDesc:
- db "A big, beautiful"
- next "pearl. Sell high.@"
-
-EverStoneDesc:
- db "Stops evolution."
- next "(HOLD)@"
-
-SpellTagDesc:
- db "Powers up ghost-"
- next "type moves. (HOLD)@"
-
-RageCandyBarDesc:
- db "Restores #MON"
- next "HP by 20.@"
-
-GSBallDesc:
- db "The mysterious"
- next "BALL.@"
-
-BlueCardDesc:
- db "Card to save"
- next "points.@"
-
-MiracleSeedDesc:
- db "Powers up grass-"
- next "type moves. (HOLD)@"
-
-ThickClubDesc:
- db "A bone of some"
- next "sort. Sell low.@"
-
-FocusBandDesc:
- db "May prevent faint-"
- next "ing. (HOLD)@"
-
-TeruSama8Desc:
- db "?@"
-
-EnergyPowderDesc:
- db "Restores #MON"
- next "HP by 50. Bitter.@"
-
-EnergyRootDesc:
- db "Restores #MON"
- next "HP by 200. Bitter.@"
-
-HealPowderDesc:
- db "Cures all status"
- next "problems. Bitter.@"
-
-RevivalHerbDesc:
- db "Revives fainted"
- next "#MON. Bitter.@"
-
-HardStoneDesc:
- db "Powers up rock-"
- next "type moves. (HOLD)@"
-
-LuckyEggDesc:
- db "Earns extra EXP."
- next "points. (HOLD)@"
-
-CardKeyDesc:
- db "Opens shutters in"
- next "the RADIO TOWER.@"
-
-MachinePartDesc:
- db "A machine part for"
- next "the POWER PLANT.@"
-
-EggTicketDesc:
- db "May use at Golden-"
- next "rod trade corner.@"
-
-LostItemDesc:
- db "The # DOLL lost"
- next "by the COPYCAT.@"
-
-StardustDesc:
- db "Pretty, red sand."
- next "Sell high.@"
-
-StarPieceDesc:
- db "A hunk of red gem."
- next "Sell very high.@"
-
-BasementKeyDesc:
- db "Opens doors.@"
-
-PassDesc:
- db "A ticket for the"
- next "MAGNET TRAIN.@"
-
-TeruSama9Desc:
- db "?@"
-
-TeruSama10Desc:
- db "?@"
-
-TeruSama11Desc:
- db "?@"
-
-CharcoalDesc:
- db "Powers up fire-"
- next "type moves. (HOLD)@"
-
-BerryJuiceDesc:
- db "Restores #MON"
- next "HP by 20.@"
-
-ScopeLensDesc:
- db "Raises critical"
- next "hit ratio. (HOLD)@"
-
-TeruSama12Desc:
- db "?@"
-
-TeruSama13Desc:
- db "?@"
-
-MetalCoatDesc:
- db "Powers up steel-"
- next "type moves. (HOLD)@"
-
-DragonFangDesc:
- db "Powers up dragon-"
- next "type moves. (HOLD)@"
-
-TeruSama14Desc:
- db "?@"
-
-LeftoversDesc:
- db "Restores HP during"
- next "battle. (HOLD)@"
-
-TeruSama15Desc:
- db "?@"
-
-TeruSama16Desc:
- db "?@"
-
-TeruSama17Desc:
- db "?@"
-
-MysteryBerryDesc:
- db "A self-restore"
- next "for PP. (HOLD)@"
-
-DragonScaleDesc:
- db "A rare dragon-type"
- next "item.@"
-
-BerserkGeneDesc:
- db "Boosts ATTACK but"
- next "causes confusion.@"
-
-TeruSama18Desc:
- db "?@"
-
-TeruSama19Desc:
- db "?@"
-
-TeruSama20Desc:
- db "?@"
-
-SacredAshDesc:
- db "Fully revives all"
- next "fainted #MON.@"
-
-HeavyBallDesc:
- db "A BALL for catch-"
- next "ing heavy #MON.@"
-
-FlowerMailDesc:
- db "Flower-print MAIL."
- next "(HOLD)@"
-
-LevelBallDesc:
- db "A BALL for lower-"
- next "level #MON.@"
-
-LureBallDesc:
- db "A BALL for #MON"
- next "hooked by a ROD.@"
-
-FastBallDesc:
- db "A BALL for catch-"
- next "ing fast #MON.@"
-
-TeruSama21Desc:
- db "?@"
-
-LightBallDesc:
- db "An odd, electrical"
- next "orb. (HOLD)@"
-
-FriendBallDesc:
- db "A BALL that makes"
- next "#MON friendly.@"
-
-MoonBallDesc:
- db "A BALL for MOON"
- next "STONE evolvers.@"
-
-LoveBallDesc:
- db "For catching the"
- next "opposite gender.@"
-
-NormalBoxDesc:
- db "Open it and see"
- next "what's inside.@"
-
-GorgeousBoxDesc:
- db "Open it and see"
- next "what's inside.@"
-
-SunStoneDesc:
- db "Evolves certain"
- next "kinds of #MON.@"
-
-PolkadotBowDesc:
- db "Powers up normal-"
- next "type moves. (HOLD)@"
-
-TeruSama22Desc:
- db "?@"
-
-UpGradeDesc:
- db "A mysterious box"
- next "made by SILPH CO.@"
-
-BerryDesc:
- db "A self-restore"
- next "item. (10HP, HOLD)@"
-
-GoldBerryDesc:
- db "A self-restore"
- next "item. (30HP, HOLD)@"
-
-SquirtBottleDesc:
- db "A bottle used for"
- next "watering plants.@"
-
-TeruSama23Desc:
- db "?@"
-
-ParkBallDesc:
- db "The Bug-Catching"
- next "Contest BALL.@"
-
-RainbowWingDesc:
- db "A mystical feather"
- next "of rainbow colors.@"
-
-TeruSama24Desc:
- db "?@"
-
-BrickPieceDesc:
- db "A rare chunk of"
- next "tile.@"
-
-SurfMailDesc:
- db "LAPRAS-print MAIL."
- next "(HOLD)@"
-
-LiteBlueMailDesc:
- db "DRATINI-print"
- next "MAIL. (HOLD)@"
-
-PortraitMailDesc:
- db "MAIL featuring the"
- next "holder's likeness.@"
-
-LovelyMailDesc:
- db "Heart-print MAIL."
- next "(HOLD)@"
-
-EonMailDesc:
- db "EEVEE-print MAIL."
- next "(HOLD)@"
-
-MorphMailDesc:
- db "DITTO-print MAIL."
- next "(HOLD)@"
-
-BlueSkyMailDesc:
- db "Sky-print MAIL."
- next "(HOLD)@"
-
-MusicMailDesc:
- db "NATU-print MAIL."
- next "(HOLD)@"
-
-MewMailDesc:
- db "MEW-print MAIL."
- next "(HOLD)@"
-
-TeruSama25Desc:
- db "?@"
-
-TeruSama26Desc:
- db "?@"
-
-TeruSama27Desc:
- db "?@"
-
-TeruSama28Desc:
- db "?@"
-
-TeruSama29Desc:
- db "?@"
-
-TeruSama30Desc:
- db "?@"
-
-TeruSama31Desc:
- db "?@"
-
-TeruSama32Desc:
- db "?@"
-
-TeruSama33Desc:
- db "?@"
diff --git a/items/item_effects.asm b/items/item_effects.asm
deleted file mode 100644
index c13568a5d..000000000
--- a/items/item_effects.asm
+++ /dev/null
@@ -1,3313 +0,0 @@
-_DoItemEffect:: ; e722
- ld a, [CurItem]
- ld [wd265], a
- call GetItemName
- call CopyName1
- ld a, 1
- ld [wItemEffectSucceeded], a
- ld a, [CurItem]
- dec a
- ld hl, ItemEffects
- rst JumpTable
- ret
-; e73c
-
-
-ItemEffects: ; e73c
- dw MasterBall
- dw UltraBall
- dw Brightpowder
- dw GreatBall
- dw PokeBall
- dw TownMap
- dw Bicycle
- dw MoonStone
- dw Antidote
- dw BurnHeal
- dw IceHeal
- dw Awakening
- dw ParlyzHeal
- dw FullRestore
- dw MaxPotion
- dw HyperPotion
- dw SuperPotion
- dw Potion
- dw EscapeRope
- dw Repel
- dw MaxElixer
- dw FireStone
- dw Thunderstone
- dw WaterStone
- dw Item19
- dw HPUp
- dw Protein
- dw Iron
- dw Carbos
- dw LuckyPunch
- dw Calcium
- dw RareCandy
- dw XAccuracy
- dw LeafStone
- dw MetalPowder
- dw Nugget
- dw PokeDoll
- dw FullHeal
- dw Revive
- dw MaxRevive
- dw GuardSpec
- dw SuperRepel
- dw MaxRepel
- dw DireHit
- dw Item2D
- dw FreshWater
- dw SodaPop
- dw Lemonade
- dw XAttack
- dw Item32
- dw XDefend
- dw XSpeed
- dw XSpecial
- dw CoinCase
- dw Itemfinder
- dw PokeFlute
- dw ExpShare
- dw OldRod
- dw GoodRod
- dw SilverLeaf
- dw SuperRod
- dw PPUp
- dw Ether
- dw MaxEther
- dw Elixer
- dw RedScale
- dw Secretpotion
- dw SSTicket
- dw MysteryEgg
- dw ClearBell
- dw SilverWing
- dw MoomooMilk
- dw QuickClaw
- dw Psncureberry
- dw GoldLeaf
- dw SoftSand
- dw SharpBeak
- dw Przcureberry
- dw BurntBerry
- dw IceBerry
- dw PoisonBarb
- dw KingsRock
- dw BitterBerry
- dw MintBerry
- dw RedApricorn
- dw Tinymushroom
- dw BigMushroom
- dw Silverpowder
- dw BluApricorn
- dw Item5A
- dw AmuletCoin
- dw YlwApricorn
- dw GrnApricorn
- dw CleanseTag
- dw MysticWater
- dw Twistedspoon
- dw WhtApricorn
- dw Blackbelt
- dw BlkApricorn
- dw Item64
- dw PnkApricorn
- dw Blackglasses
- dw Slowpoketail
- dw PinkBow
- dw Stick
- dw SmokeBall
- dw Nevermeltice
- dw Magnet
- dw Miracleberry
- dw Pearl
- dw BigPearl
- dw Everstone
- dw SpellTag
- dw Ragecandybar
- dw GsBall
- dw BlueCard
- dw MiracleSeed
- dw ThickClub
- dw FocusBand
- dw Item78
- dw Energypowder
- dw EnergyRoot
- dw HealPowder
- dw RevivalHerb
- dw HardStone
- dw LuckyEgg
- dw CardKey
- dw MachinePart
- dw EggTicket
- dw LostItem
- dw Stardust
- dw StarPiece
- dw BasementKey
- dw Pass
- dw Item87
- dw Item88
- dw Item89
- dw Charcoal
- dw BerryJuice
- dw ScopeLens
- dw Item8D
- dw Item8E
- dw MetalCoat
- dw DragonFang
- dw Item91
- dw Leftovers
- dw Item93
- dw Item94
- dw Item95
- dw Mysteryberry
- dw DragonScale
- dw BerserkGene
- dw Item99
- dw Item9A
- dw Item9B
- dw SacredAsh
- dw HeavyBall
- dw FlowerMail
- dw LevelBall
- dw LureBall
- dw FastBall
- dw ItemA2
- dw LightBall
- dw FriendBall
- dw MoonBall
- dw LoveBall
- dw NormalBox
- dw GorgeousBox
- dw SunStone
- dw PolkadotBow
- dw ItemAB
- dw UpGrade
- dw Berry
- dw GoldBerry
- dw Squirtbottle
- dw ItemB0
- dw ParkBall
- dw RainbowWing
- dw ItemB3
-; e8a2
-
-
-MasterBall:
-UltraBall:
-GreatBall:
-PokeBall:
-HeavyBall:
-LevelBall:
-LureBall:
-FastBall:
-FriendBall:
-MoonBall:
-LoveBall:
-ParkBall: ; e8a2
- ld a, [wBattleMode]
- dec a
- jp nz, UseBallInTrainerBattle
-
- ld a, [PartyCount]
- cp PARTY_LENGTH
- jr nz, .room_in_party
-
- ld a, BANK(sBoxCount)
- call GetSRAMBank
- ld a, [sBoxCount]
- cp MONS_PER_BOX
- call CloseSRAM
- jp z, Ball_BoxIsFullMessage
-
-.room_in_party
- xor a
- ld [wWildMon], a
- ld a, [CurItem]
- cp PARK_BALL
- call nz, ReturnToBattle_UseBall
-
- ld hl, Options
- res NO_TEXT_SCROLL, [hl]
- ld hl, UsedItemText
- call PrintText
-
- ld a, [EnemyMonCatchRate]
- ld b, a
- ld a, [BattleType]
- cp BATTLETYPE_TUTORIAL
- jp z, .catch_without_fail
- ld a, [CurItem]
- cp MASTER_BALL
- jp z, .catch_without_fail
- ld a, [CurItem]
- ld c, a
- ld hl, BallMultiplierFunctionTable
-
-.get_multiplier_loop
- ld a, [hli]
- cp $ff
- jr z, .skip_or_return_from_ball_fn
- cp c
- jr z, .call_ball_function
- inc hl
- inc hl
- jr .get_multiplier_loop
-
-.call_ball_function
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, .skip_or_return_from_ball_fn
- push de
- jp hl
-
-.skip_or_return_from_ball_fn
- ld a, [CurItem]
- cp LEVEL_BALL
- ld a, b
- jp z, .skip_hp_calc
-
- ld a, b
- ld [hMultiplicand + 2], a
-
- ld hl, EnemyMonHP
- ld b, [hl]
- inc hl
- ld c, [hl]
- inc hl
- ld d, [hl]
- inc hl
- ld e, [hl]
- sla c
- rl b
-
- ld h, d
- ld l, e
- add hl, de
- add hl, de
- ld d, h
- ld e, l
- ld a, d
- and a
- jr z, .okay_1
-
- srl d
- rr e
- srl d
- rr e
- srl b
- rr c
- srl b
- rr c
-
- ld a, c
- and a
- jr nz, .okay_1
- ld c, $1
-.okay_1
- ld b, e
-
- push bc
- ld a, b
- sub c
- ld [hMultiplier], a
- xor a
- ld [hDividend + 0], a
- ld [hMultiplicand + 0], a
- ld [hMultiplicand + 1], a
- call Multiply
- pop bc
-
- ld a, b
- ld [hDivisor], a
- ld b, $4
- call Divide
-
- ld a, [hQuotient + 2]
- and a
- jr nz, .statuscheck
- ld a, 1
-.statuscheck
-; This routine is buggy. It was intended that SLP and FRZ provide a higher
-; catch rate than BRN/PSN/PAR, which in turn provide a higher catch rate than
-; no status effect at all. But instead, it makes BRN/PSN/PAR provide no
-; benefit.
-; Uncomment the line below to fix this.
- ld b, a
- ld a, [EnemyMonStatus]
- and 1 << FRZ | SLP
- ld c, 10
- jr nz, .addstatus
- ; ld a, [EnemyMonStatus]
- and a
- ld c, 5
- jr nz, .addstatus
- ld c, 0
-.addstatus
- ld a, b
- add c
- jr nc, .max_1
- ld a, $ff
-.max_1
-
- ld d, a
- push de
-
- ; BUG: callba overwrites a,
- ; and GetItemHeldEffect takes b anyway.
-
- ; This is probably the reason
- ; the HELD_CATCH_CHANCE effect
- ; is never used.
-
- ; Uncomment the line below to fix.
-
- ld a, [BattleMonItem]
-; ld b, a
- callba GetItemHeldEffect
- ld a, b
- cp HELD_CATCH_CHANCE
-
- pop de
- ld a, d
-
- jr nz, .skip_hp_calc
- add c
- jr nc, .skip_hp_calc
- ld a, $ff
-.skip_hp_calc
-
- ld b, a
- ld [Buffer1], a
- call Random
-
- cp b
- ld a, 0
- jr z, .catch_without_fail
- jr nc, .fail_to_catch
-
-.catch_without_fail
- ld a, [EnemyMonSpecies]
-
-.fail_to_catch
- ld [wWildMon], a
- ld c, 20
- call DelayFrames
-
- ld a, [CurItem]
- cp POKE_BALL + 1 ; Assumes Master/Ultra/Great come before
- jr c, .not_kurt_ball
- ld a, POKE_BALL
-.not_kurt_ball
- ld [wBattleAnimParam], a
-
- ld de, ANIM_THROW_POKE_BALL
- ld a, e
- ld [FXAnimIDLo], a
- ld a, d
- ld [FXAnimIDHi], a
- xor a
- ld [hBattleTurn], a
- ld [Buffer2], a
- ld [wNumHits], a
- predef PlayBattleAnim
-
- ld a, [wWildMon]
- and a
- jr nz, .caught
- ld a, [Buffer2]
- cp $1
- ld hl, Text_NoShake
- jp z, .shake_and_break_free
- cp $2
- ld hl, Text_OneShake
- jp z, .shake_and_break_free
- cp $3
- ld hl, Text_TwoShakes
- jp z, .shake_and_break_free
- cp $4
- ld hl, Text_ThreeShakes
- jp z, .shake_and_break_free
-.caught
-
- ld hl, EnemyMonStatus
- ld a, [hli]
- push af
- inc hl
- ld a, [hli]
- push af
- ld a, [hl]
- push af
- push hl
- ld hl, EnemyMonItem
- ld a, [hl]
- push af
- push hl
- ld hl, EnemySubStatus5
- ld a, [hl]
- push af
- set SUBSTATUS_TRANSFORMED, [hl]
- bit SUBSTATUS_TRANSFORMED, a
- jr nz, .ditto
- jr .not_ditto
-
-.ditto
- ld a, DITTO
- ld [TempEnemyMonSpecies], a
- jr .load_data
-
-.not_ditto
- set SUBSTATUS_TRANSFORMED, [hl]
- ld hl, wEnemyBackupDVs
- ld a, [EnemyMonDVs]
- ld [hli], a
- ld a, [EnemyMonDVs + 1]
- ld [hl], a
-
-.load_data
- ld a, [TempEnemyMonSpecies]
- ld [CurPartySpecies], a
- ld a, [EnemyMonLevel]
- ld [CurPartyLevel], a
- callba LoadEnemyMon
-
- pop af
- ld [EnemySubStatus5], a
-
- pop hl
- pop af
- ld [hl], a
- pop hl
- pop af
- ld [hld], a
- pop af
- ld [hld], a
- dec hl
- pop af
- ld [hl], a
-
- ld hl, EnemySubStatus5
- bit SUBSTATUS_TRANSFORMED, [hl]
- jr nz, .Transformed
- ld hl, wWildMonMoves
- ld de, EnemyMonMoves
- ld bc, NUM_MOVES
- call CopyBytes
-
- ld hl, wWildMonPP
- ld de, EnemyMonPP
- ld bc, NUM_MOVES
- call CopyBytes
-.Transformed:
-
- ld a, [EnemyMonSpecies]
- ld [wWildMon], a
- ld [CurPartySpecies], a
- ld [wd265], a
- ld a, [BattleType]
- cp BATTLETYPE_TUTORIAL
- jp z, .FinishTutorial
-
- callba TrainerRankings_WildMonsCaught
-
- ld hl, Text_GotchaMonWasCaught
- call PrintText
-
- call ClearSprites
-
- ld a, [wd265]
- dec a
- call CheckCaughtMon
-
- ld a, c
- push af
- ld a, [wd265]
- dec a
- call SetSeenAndCaughtMon
- pop af
- and a
- jr nz, .skip_pokedex
-
- call CheckReceivedDex
- jr z, .skip_pokedex
-
- ld hl, Text_AddedToPokedex
- call PrintText
-
- call ClearSprites
-
- ld a, [EnemyMonSpecies]
- ld [wd265], a
- predef NewPokedexEntry
-
-.skip_pokedex
- ld a, [BattleType]
- cp BATTLETYPE_CONTEST
- jp z, .catch_bug_contest_mon
- cp BATTLETYPE_CELEBI
- jr nz, .not_celebi
- ld hl, wBattleResult
- set 6, [hl]
-.not_celebi
-
- ld a, [PartyCount]
- cp PARTY_LENGTH
- jr z, .SendToPC
-
- xor a ; PARTYMON
- ld [MonType], a
- call ClearSprites
-
- predef TryAddMonToParty
-
- callba SetCaughtData
-
- ld a, [CurItem]
- cp FRIEND_BALL
- jr nz, .SkipPartyMonFriendBall
-
- ld a, [PartyCount]
- dec a
- ld hl, PartyMon1Happiness
- ld bc, PARTYMON_STRUCT_LENGTH
- call AddNTimes
-
- ld a, FRIEND_BALL_HAPPINESS
- ld [hl], a
-.SkipPartyMonFriendBall:
-
- ld hl, Text_AskNicknameNewlyCaughtMon
- call PrintText
-
- ld a, [CurPartySpecies]
- ld [wd265], a
- call GetPokemonName
-
- call YesNoBox
- jp c, .return_from_capture
-
- ld a, [PartyCount]
- dec a
- ld [CurPartyMon], a
- ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
- call AddNTimes
-
- ld d, h
- ld e, l
- push de
- xor a ; PARTYMON
- ld [MonType], a
- ld b, 0
- callba NamingScreen
-
- call RotateThreePalettesRight
-
- call LoadStandardFont
-
- pop hl
- ld de, StringBuffer1
- call InitName
-
- jp .return_from_capture
-
-.SendToPC:
- call ClearSprites
-
- predef SentPkmnIntoBox
-
- callba SetBoxMonCaughtData
-
- ld a, BANK(sBoxCount)
- call GetSRAMBank
-
- ld a, [sBoxCount]
- cp MONS_PER_BOX
- jr nz, .BoxNotFullYet
- ld hl, wBattleResult
- set 7, [hl]
-.BoxNotFullYet:
- ld a, [CurItem]
- cp FRIEND_BALL
- jr nz, .SkipBoxMonFriendBall
- ; Bug: overwrites the happiness of the first mon in the box!
- ld a, FRIEND_BALL_HAPPINESS
- ld [sBoxMon1Happiness], a
-.SkipBoxMonFriendBall:
- call CloseSRAM
-
- ld hl, Text_AskNicknameNewlyCaughtMon
- call PrintText
-
- ld a, [CurPartySpecies]
- ld [wd265], a
- call GetPokemonName
-
- call YesNoBox
- jr c, .SkipBoxMonNickname
-
- xor a
- ld [CurPartyMon], a
- ld a, BOXMON
- ld [MonType], a
- ld de, wMonOrItemNameBuffer
- ld b, $0
- callba NamingScreen
-
- ld a, BANK(sBoxMonNicknames)
- call GetSRAMBank
-
- ld hl, wMonOrItemNameBuffer
- ld de, sBoxMonNicknames
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
-
- ld hl, sBoxMonNicknames
- ld de, StringBuffer1
- call InitName
-
- call CloseSRAM
-
-.SkipBoxMonNickname:
- ld a, BANK(sBoxMonNicknames)
- call GetSRAMBank
-
- ld hl, sBoxMonNicknames
- ld de, wMonOrItemNameBuffer
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
-
- call CloseSRAM
-
- ld hl, Text_SentToBillsPC
- call PrintText
-
- call RotateThreePalettesRight
- call LoadStandardFont
- jr .return_from_capture
-
-.catch_bug_contest_mon
- callba BugContest_SetCaughtContestMon
- jr .return_from_capture
-
-.FinishTutorial:
- ld hl, Text_GotchaMonWasCaught
-
-.shake_and_break_free
- call PrintText
- call ClearSprites
-
-.return_from_capture
- ld a, [BattleType]
- cp BATTLETYPE_TUTORIAL
- ret z
- cp BATTLETYPE_DEBUG
- ret z
- cp BATTLETYPE_CONTEST
- jr z, .used_park_ball
-
- ld a, [wWildMon]
- and a
- jr z, .toss
-
- call ClearBGPalettes
- call ClearTileMap
-
-.toss
- ld hl, NumItems
- inc a
- ld [wItemQuantityChangeBuffer], a
- jp TossItem
-
-.used_park_ball
- ld hl, wParkBallsRemaining
- dec [hl]
- ret
-; ec0a
-
-
-BallMultiplierFunctionTable:
-; table of routines that increase or decrease the catch rate based on
-; which ball is used in a certain situation.
- dbw ULTRA_BALL, UltraBallMultiplier
- dbw GREAT_BALL, GreatBallMultiplier
- dbw SAFARI_BALL, SafariBallMultiplier ; Safari Ball, leftover from RBY
- dbw HEAVY_BALL, HeavyBallMultiplier
- dbw LEVEL_BALL, LevelBallMultiplier
- dbw LURE_BALL, LureBallMultiplier
- dbw FAST_BALL, FastBallMultiplier
- dbw MOON_BALL, MoonBallMultiplier
- dbw LOVE_BALL, LoveBallMultiplier
- dbw PARK_BALL, ParkBallMultiplier
- db $ff
-
-UltraBallMultiplier:
-; multiply catch rate by 2
- sla b
- ret nc
- ld b, $ff
- ret
-
-SafariBallMultiplier:
-GreatBallMultiplier:
-ParkBallMultiplier:
-; multiply catch rate by 1.5
- ld a, b
- srl a
- add b
- ld b, a
- ret nc
- ld b, $ff
- ret
-
-GetPokedexEntryBank:
- push hl
- push de
- ld a, [EnemyMonSpecies]
- rlca
- rlca
- and 3
- ld hl, .PokedexEntryBanks
- ld d, 0
- ld e, a
- add hl, de
- ld a, [hl]
- pop de
- pop hl
- ret
-
-.PokedexEntryBanks:
-
-GLOBAL PokedexEntries1
-GLOBAL PokedexEntries2
-GLOBAL PokedexEntries3
-GLOBAL PokedexEntries4
-
- db BANK(PokedexEntries1)
- db BANK(PokedexEntries2)
- db BANK(PokedexEntries3)
- db BANK(PokedexEntries4)
-
-HeavyBallMultiplier:
-; subtract 20 from catch rate if weight < 102.4 kg
-; else add 0 to catch rate if weight < 204.8 kg
-; else add 20 to catch rate if weight < 307.2 kg
-; else add 30 to catch rate if weight < 409.6 kg
-; else add 40 to catch rate (never happens)
- ld a, [EnemyMonSpecies]
- ld hl, PokedexDataPointerTable
- dec a
- ld e, a
- ld d, 0
- add hl, de
- add hl, de
- ld a, BANK(PokedexDataPointerTable)
- call GetFarHalfword
-
-.SkipText:
- call GetPokedexEntryBank
- call GetFarByte
- inc hl
- cp "@"
- jr nz, .SkipText
-
- call GetPokedexEntryBank
- push bc
- inc hl
- inc hl
- call GetFarHalfword
-
- srl h
- rr l
- ld b, h
- ld c, l
-
- rept 4
- srl b
- rr c
- endr
- call .subbc
-
- srl b
- rr c
- call .subbc
-
- ld a, h
- pop bc
- jr .compare
-
-.subbc
- ; subtract bc from hl
- push bc
- ld a, b
- cpl
- ld b, a
- ld a, c
- cpl
- ld c, a
- inc bc
- add hl, bc
- pop bc
- ret
-
-.compare
- ld c, a
- cp 1024 >> 8 ; 102.4 kg
- jr c, .lightmon
-
- ld hl, .WeightsTable
-.lookup
- ld a, c
- cp [hl]
- jr c, .heavymon
- inc hl
- inc hl
- jr .lookup
-
-.heavymon
- inc hl
- ld a, b
- add [hl]
- ld b, a
- ret nc
- ld b, $ff
- ret
-
-.lightmon
- ld a, b
- sub 20
- ld b, a
- ret nc
- ld b, $1
- ret
-
-.WeightsTable:
-; weight factor, boost
- db 2048 >> 8, 0
- db 3072 >> 8, 20
- db 4096 >> 8, 30
- db 65280 >> 8, 40
-
-LureBallMultiplier:
-; multiply catch rate by 3 if this is a fishing rod battle
- ld a, [BattleType]
- cp BATTLETYPE_FISH
- ret nz
-
- ld a, b
- add a
- jr c, .max
-
- add b
- jr nc, .done
-.max
- ld a, $ff
-.done
- ld b, a
- ret
-
-MoonBallMultiplier:
-; This function is buggy.
-; Intent: multiply catch rate by 4 if mon evolves with moon stone
-; Reality: no boost
-
-GLOBAL EvosAttacks
-GLOBAL EvosAttacksPointers
-
- push bc
- ld a, [TempEnemyMonSpecies]
- dec a
- ld c, a
- ld b, 0
- ld hl, EvosAttacksPointers
- add hl, bc
- add hl, bc
- ld a, BANK(EvosAttacksPointers)
- call GetFarHalfword
- pop bc
-
- push bc
- ld a, BANK(EvosAttacks)
- call GetFarByte
- cp EVOLVE_ITEM
- pop bc
- ret nz
-
- inc hl
- inc hl
- inc hl
-
-; Moon Stone's constant from Pokémon Red is used.
-; No Pokémon evolve with Burn Heal,
-; so Moon Balls always have a catch rate of 1×.
- push bc
- ld a, BANK(EvosAttacks)
- call GetFarByte
- cp MOON_STONE_RED ; BURN_HEAL
- pop bc
- ret nz
-
- sla b
- jr c, .max
- sla b
- jr nc, .done
-.max
- ld b, $ff
-.done
- ret
-
-LoveBallMultiplier:
-; This function is buggy.
-; Intent: multiply catch rate by 8 if mons are of same species, different sex
-; Reality: multiply catch rate by 8 if mons are of same species, same sex
-
- ; does species match?
- ld a, [TempEnemyMonSpecies]
- ld c, a
- ld a, [TempBattleMonSpecies]
- cp c
- ret nz
-
- ; check player mon species
- push bc
- ld a, [TempBattleMonSpecies]
- ld [CurPartySpecies], a
- xor a ; PARTYMON
- ld [MonType], a
- ld a, [CurBattleMon]
- ld [CurPartyMon], a
- callba GetGender
- jr c, .done1 ; no effect on genderless
-
- ld d, 0 ; male
- jr nz, .playermale
- inc d ; female
-.playermale
-
- ; check wild mon species
- push de
- ld a, [TempEnemyMonSpecies]
- ld [CurPartySpecies], a
- ld a, WILDMON
- ld [MonType], a
- callba GetGender
- jr c, .done2 ; no effect on genderless
-
- ld d, 0 ; male
- jr nz, .wildmale
- inc d ; female
-.wildmale
-
- ld a, d
- pop de
- cp d
- pop bc
- ret nz ; for the intended effect, this should be “ret z”
-
- sla b
- jr c, .max
- sla b
- jr c, .max
- sla b
- ret nc
-.max
- ld b, $ff
- ret
-
-.done2
- pop de
-
-.done1
- pop bc
- ret
-
-FastBallMultiplier:
-; This function is buggy.
-; Intent: multiply catch rate by 4 if enemy mon is in one of the three
-; FleeMons tables.
-; Reality: multiply catch rate by 4 if enemy mon is one of the first three in
-; the first FleeMons table.
- ld a, [TempEnemyMonSpecies]
- ld c, a
- ld hl, FleeMons
- ld d, 3
-
-.loop
- ld a, BANK(FleeMons)
- call GetFarByte
-
- inc hl
- cp -1
- jr z, .next
- cp c
- jr nz, .next ; for the intended effect, this should be “jr nz, .loop”
- sla b
- jr c, .max
-
- sla b
- ret nc
-
-.max
- ld b, $ff
- ret
-
-.next
- dec d
- jr nz, .loop
- ret
-
-LevelBallMultiplier:
-; multiply catch rate by 8 if player mon level / 4 > enemy mon level
-; multiply catch rate by 4 if player mon level / 2 > enemy mon level
-; multiply catch rate by 2 if player mon level > enemy mon level
- ld a, [BattleMonLevel]
- ld c, a
- ld a, [EnemyMonLevel]
- cp c
- ret nc ; if player is lower level, we're done here
- sla b
- jr c, .max
-
- srl c
- cp c
- ret nc ; if player/2 is lower level, we're done here
- sla b
- jr c, .max
-
- srl c
- cp c
- ret nc ; if player/4 is lower level, we're done here
- sla b
- ret nc
-
-.max
- ld b, $ff
- ret
-
-; These two texts were carried over from gen 1.
-; They are not used in gen 2, and are dummied out.
-
-Text_RBY_CatchMarowak: ; 0xedab
- ; It dodged the thrown BALL! This #MON can't be caught!
- text_jump UnknownText_0x1c5a5a
- db "@"
-; 0xedb0
-
-Text_RBY_NoShake: ; 0xedb0
- ; You missed the #MON!
- text_jump UnknownText_0x1c5a90
- db "@"
-; 0xedb5
-
-Text_NoShake: ; 0xedb5
- ; Oh no! The #MON broke free!
- text_jump UnknownText_0x1c5aa6
- db "@"
-; 0xedba
-
-Text_OneShake: ; 0xedba
- ; Aww! It appeared to be caught!
- text_jump UnknownText_0x1c5ac3
- db "@"
-; 0xedbf
-
-Text_TwoShakes: ; 0xedbf
- ; Aargh! Almost had it!
- text_jump UnknownText_0x1c5ae3
- db "@"
-; 0xedc4
-
-Text_ThreeShakes: ; 0xedc4
- ; Shoot! It was so close too!
- text_jump UnknownText_0x1c5afa
- db "@"
-; 0xedc9
-
-Text_GotchaMonWasCaught: ; 0xedc9
- ; Gotcha! @ was caught!@ @
- text_jump UnknownText_0x1c5b17
- start_asm
- call WaitSFX
- push bc
- ld de, MUSIC_NONE
- call PlayMusic
- call DelayFrame
- ld de, MUSIC_CAPTURE
- call PlayMusic
- pop bc
- ld hl, TextJump_Waitbutton
- ret
-; ede6
-
-TextJump_Waitbutton: ; 0xede6
- ; @
- text_jump Text_Waitbutton_2
- db "@"
-; 0xedeb
-
-Text_SentToBillsPC: ; 0xedeb
- ; was sent to BILL's PC.
- text_jump UnknownText_0x1c5b38
- db "@"
-; 0xedf0
-
-Text_AddedToPokedex: ; 0xedf0
- ; 's data was newly added to the #DEX.@ @
- text_jump UnknownText_0x1c5b53
- db "@"
-; 0xedf5
-
-Text_AskNicknameNewlyCaughtMon: ; 0xedf5
- ; Give a nickname to @ ?
- text_jump UnknownText_0x1c5b7f
- db "@"
-; 0xedfa
-
-ReturnToBattle_UseBall: ; edfa (3:6dfa)
- callba _ReturnToBattle_UseBall
- ret
-
-TownMap: ; ee01
- callba PokegearMap
- ret
-; ee08
-
-
-Bicycle: ; ee08
- callba BikeFunction
- ret
-; ee0f
-
-
-MoonStone:
-FireStone:
-Thunderstone:
-WaterStone:
-LeafStone:
-SunStone: ; ee0f
- ld b, PARTYMENUACTION_EVO_STONE
- call UseItem_SelectMon
-
- jp c, .DecidedNotToUse
-
- ld a, MON_ITEM
- call GetPartyParamLocation
-
- ld a, [hl]
- cp EVERSTONE
- jr z, .NoEffect
-
- ld a, $1
- ld [wForceEvolution], a
- callba EvolvePokemon
-
- ld a, [wMonTriedToEvolve]
- and a
- jr z, .NoEffect
-
- jp UseDisposableItem
-
-.NoEffect:
- call WontHaveAnyEffectMessage
-
-.DecidedNotToUse:
- xor a
- ld [wItemEffectSucceeded], a
- ret
-; ee3d
-
-
-HPUp:
-Protein:
-Iron:
-Carbos:
-Calcium: ; ee3d
- ld b, PARTYMENUACTION_HEALING_ITEM
- call UseItem_SelectMon
-
- jp c, RareCandy_StatBooster_ExitMenu
-
- call RareCandy_StatBooster_GetParameters
-
- call GetStatExpRelativePointer
-
- ld a, MON_STAT_EXP
- call GetPartyParamLocation
-
- add hl, bc
- ld a, [hl]
- cp 100
- jr nc, NoEffectMessage
-
- add 10
- ld [hl], a
- call UpdateStatsAfterItem
-
- call GetStatExpRelativePointer
-
- ld hl, StatStrings
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, StringBuffer2
- ld bc, ITEM_NAME_LENGTH
- call CopyBytes
-
- call Play_SFX_FULL_HEAL
-
- ld hl, Text_StatRose
- call PrintText
-
- ld c, HAPPINESS_USEDITEM
- callba ChangeHappiness
-
- jp UseDisposableItem
-
-
-NoEffectMessage: ; ee83
- ld hl, WontHaveAnyEffectText
- call PrintText
- jp ClearPalettes
-; ee8c
-
-
-UpdateStatsAfterItem: ; ee8c
- ld a, MON_MAXHP
- call GetPartyParamLocation
- ld d, h
- ld e, l
- ld a, MON_STAT_EXP - 1
- call GetPartyParamLocation
- ld b, $1
- predef_jump CalcPkmnStats
-; ee9f
-
-RareCandy_StatBooster_ExitMenu: ; ee9f
- xor a
- ld [wItemEffectSucceeded], a
- jp ClearPalettes
-; eea6
-
-
-Text_StatRose: ; 0xeea6
- ; 's @ rose.
- text_jump UnknownText_0x1c5b9a
- db "@"
-; 0xeeab
-
-
-StatStrings: ; eeab
- dw .health
- dw .attack
- dw .defense
- dw .speed
- dw .special
-
-.health db "HEALTH@"
-.attack db "ATTACK@"
-.defense db "DEFENSE@"
-.speed db "SPEED@"
-.special db "SPECIAL@"
-; eed9
-
-
-GetStatExpRelativePointer: ; eed9
- ld a, [CurItem]
- ld hl, Table_eeeb
-.next
- cp [hl]
- inc hl
- jr z, .got_it
- inc hl
- jr .next
-
-.got_it
- ld a, [hl]
- ld c, a
- ld b, 0
- ret
-; eeeb
-
-Table_eeeb: ; eeeb
- db HP_UP, MON_HP_EXP - MON_STAT_EXP
- db PROTEIN, MON_ATK_EXP - MON_STAT_EXP
- db IRON, MON_DEF_EXP - MON_STAT_EXP
- db CARBOS, MON_SPD_EXP - MON_STAT_EXP
- db CALCIUM, MON_SPC_EXP - MON_STAT_EXP
-; eef5
-
-
-RareCandy_StatBooster_GetParameters: ; eef5
- ld a, [CurPartySpecies]
- ld [CurSpecies], a
- ld [wd265], a
- ld a, MON_LEVEL
- call GetPartyParamLocation
- ld a, [hl]
- ld [CurPartyLevel], a
- call GetBaseData
- ld a, [CurPartyMon]
- ld hl, PartyMonNicknames
- call GetNick
- ret
-; 0xef14
-
-
-RareCandy: ; ef14
- ld b, PARTYMENUACTION_HEALING_ITEM
- call UseItem_SelectMon
-
- jp c, RareCandy_StatBooster_ExitMenu
-
- call RareCandy_StatBooster_GetParameters
-
- ld a, MON_LEVEL
- call GetPartyParamLocation
-
- ld a, [hl]
- cp MAX_LEVEL
- jp nc, NoEffectMessage
-
- inc a
- ld [hl], a
- ld [CurPartyLevel], a
- push de
- ld d, a
- callba CalcExpAtLevel
-
- pop de
- ld a, MON_EXP
- call GetPartyParamLocation
-
- ld a, [hMultiplicand]
- ld [hli], a
- ld a, [hMultiplicand + 1]
- ld [hli], a
- ld a, [hMultiplicand + 2]
- ld [hl], a
-
- ld a, MON_MAXHP
- call GetPartyParamLocation
- ld a, [hli]
- ld b, a
- ld c, [hl]
- push bc
- call UpdateStatsAfterItem
-
- ld a, MON_MAXHP + 1
- call GetPartyParamLocation
-
- pop bc
- ld a, [hld]
- sub c
- ld c, a
- ld a, [hl]
- sbc b
- ld b, a
- dec hl
- ld a, [hl]
- add c
- ld [hld], a
- ld a, [hl]
- adc b
- ld [hl], a
- callba LevelUpHappinessMod
-
- ld a, PARTYMENUTEXT_LEVEL_UP
- call ItemActionText
-
- xor a ; PARTYMON
- ld [MonType], a
- predef CopyPkmnToTempMon
-
- hlcoord 9, 0
- ld b, 10
- ld c, 9
- call TextBox
-
- hlcoord 11, 1
- ld bc, $0004
- predef PrintTempMonStats
-
- call WaitPressAorB_BlinkCursor
-
- xor a ; PARTYMON
- ld [MonType], a
- ld a, [CurPartySpecies]
- ld [wd265], a
- predef LearnLevelMoves
-
- xor a
- ld [wForceEvolution], a
- callba EvolvePokemon
-
- jp UseDisposableItem
-; efad
-
-
-HealPowder: ; efad
- ld b, PARTYMENUACTION_HEALING_ITEM
- call UseItem_SelectMon
-
- jp c, StatusHealer_ExitMenu
-
- call UseStatusHealer
-
- cp $0
- jr nz, .asm_efc9
- ld c, HAPPINESS_BITTERPOWDER
- callba ChangeHappiness
-
- call LooksBitterMessage
-
- ld a, $0
-
-.asm_efc9
- jp StatusHealer_Jumptable
-; efcc
-
-
-Antidote:
-BurnHeal:
-IceHeal:
-Awakening:
-ParlyzHeal:
-FullHeal:
-Psncureberry:
-Przcureberry:
-BurntBerry:
-IceBerry:
-MintBerry:
-Miracleberry: ; efcc
- ld b, PARTYMENUACTION_HEALING_ITEM
- call UseItem_SelectMon
- jp c, StatusHealer_ExitMenu
-
-FullyHealStatus: ; efd4
- call UseStatusHealer
- jp StatusHealer_Jumptable
-; efda
-
-
-UseStatusHealer: ; efda (3:6fda)
- call IsMonFainted
- ld a, $1
- ret z
- call GetItemHealingAction
- ld a, MON_STATUS
- call GetPartyParamLocation
- ld a, [hl]
- and c
- jr nz, .good
- call IsItemUsedOnConfusedMon
- ld a, $1
- ret nc
- ld b, PARTYMENUTEXT_HEAL_CONFUSION
-.good
- xor a
- ld [hl], a
- ld a, b
- ld [PartyMenuActionText], a
- call HealStatus
- call Play_SFX_FULL_HEAL
- call ItemActionTextWaitButton
- call UseDisposableItem
- ld a, $0
- ret
-
-IsItemUsedOnConfusedMon: ; f009 (3:7009)
- call IsItemUsedOnBattleMon
- jr nc, .nope
- ld a, [PlayerSubStatus3]
- bit SUBSTATUS_CONFUSED, a
- jr z, .nope
- ld a, c
- cp $ff
- jr nz, .nope
- scf
- ret
-
-.nope
- and a
- ret
-
-BattlemonRestoreHealth: ; f01e (3:701e)
- call IsItemUsedOnBattleMon
- ret nc
- ld a, MON_HP
- call GetPartyParamLocation
- ld a, [hli]
- ld [BattleMonHP], a
- ld a, [hld]
- ld [BattleMonHP + 1], a
- ret
-
-HealStatus: ; f030 (3:7030)
- call IsItemUsedOnBattleMon
- ret nc
- xor a
- ld [BattleMonStatus], a
- ld hl, PlayerSubStatus5
- res SUBSTATUS_TOXIC, [hl]
- ld hl, PlayerSubStatus1
- res SUBSTATUS_NIGHTMARE, [hl]
- call GetItemHealingAction
- ld a, c
- cp %11111111
- jr nz, .not_full_heal
- ld hl, PlayerSubStatus3
- res SUBSTATUS_CONFUSED, [hl]
-.not_full_heal
- push bc
- callba CalcPlayerStats
- pop bc
- ret
-
-GetItemHealingAction: ; f058 (3:7058)
- push hl
- ld a, [CurItem]
- ld hl, .healingactions
- ld bc, 3
-.next
- cp [hl]
- jr z, .found_it
- add hl, bc
- jr .next
-
-.found_it
- inc hl
- ld b, [hl]
- inc hl
- ld a, [hl]
- ld c, a
- cp %11111111
- pop hl
- ret
-; f071 (3:7071)
-
-.healingactions ; f071
-; item, party menu action text, status
- db ANTIDOTE, PARTYMENUTEXT_HEAL_PSN, 1 << PSN
- db BURN_HEAL, PARTYMENUTEXT_HEAL_BRN, 1 << BRN
- db ICE_HEAL, PARTYMENUTEXT_HEAL_FRZ, 1 << FRZ
- db AWAKENING, PARTYMENUTEXT_HEAL_SLP, SLP
- db PARLYZ_HEAL, PARTYMENUTEXT_HEAL_PAR, 1 << PAR
- db FULL_HEAL, PARTYMENUTEXT_HEAL_ALL, %11111111
- db FULL_RESTORE, PARTYMENUTEXT_HEAL_ALL, %11111111
- db HEAL_POWDER, PARTYMENUTEXT_HEAL_ALL, %11111111
- db PSNCUREBERRY, PARTYMENUTEXT_HEAL_PSN, 1 << PSN
- db PRZCUREBERRY, PARTYMENUTEXT_HEAL_PAR, 1 << PAR
- db BURNT_BERRY, PARTYMENUTEXT_HEAL_FRZ, 1 << FRZ
- db ICE_BERRY, PARTYMENUTEXT_HEAL_BRN, 1 << BRN
- db MINT_BERRY, PARTYMENUTEXT_HEAL_SLP, SLP
- db MIRACLEBERRY, PARTYMENUTEXT_HEAL_ALL, %11111111
- db -1, 0, 0
-; f09e
-
-StatusHealer_Jumptable: ; f09e (3:709e)
- ld hl, .dw
- rst JumpTable
- ret
-
-.dw ; f0a3 (3:70a3)
- dw StatusHealer_ClearPalettes
- dw StatusHealer_NoEffect
- dw StatusHealer_ExitMenu
-
-
-RevivalHerb: ; f0a9
- ld b, PARTYMENUACTION_HEALING_ITEM
- call UseItem_SelectMon
- jp c, StatusHealer_ExitMenu
-
- call RevivePokemon
- cp 0
- jr nz, .asm_f0c5
-
- ld c, HAPPINESS_REVIVALHERB
- callba ChangeHappiness
- call LooksBitterMessage
- ld a, 0
-
-.asm_f0c5
- jp StatusHealer_Jumptable
-; f0c8
-
-
-Revive:
-MaxRevive: ; f0c8
- ld b, PARTYMENUACTION_HEALING_ITEM
- call UseItem_SelectMon
- jp c, StatusHealer_ExitMenu
-
- call RevivePokemon
- jp StatusHealer_Jumptable
-; f0d6
-
-
-RevivePokemon: ; f0d6
- call IsMonFainted
- ld a, 1
- ret nz
- ld a, [wBattleMode]
- and a
- jr z, .skip_to_revive
-
- ld a, [CurPartyMon]
- ld c, a
- ld d, 0
- ld hl, wBattleParticipantsIncludingFainted
- ld b, CHECK_FLAG
- predef FlagPredef
- ld a, c
- and a
- jr z, .skip_to_revive
-
- ld a, [CurPartyMon]
- ld c, a
- ld hl, wBattleParticipantsNotFainted
- ld b, SET_FLAG
- predef FlagPredef
-
-.skip_to_revive
- xor a
- ld [Danger], a
- ld a, [CurItem]
- cp REVIVE
- jr z, .revive_half_hp
-
- call ReviveFullHP
- jr .finish_revive
-
-.revive_half_hp
- call ReviveHalfHP
-
-.finish_revive
- call HealHP_SFX_GFX
- ld a, PARTYMENUTEXT_REVIVE
- ld [PartyMenuActionText], a
- call ItemActionTextWaitButton
- call UseDisposableItem
- ld a, 0
- ret
-; f128
-
-
-FullRestore: ; f128
- ld b, PARTYMENUACTION_HEALING_ITEM
- call UseItem_SelectMon
- jp c, StatusHealer_ExitMenu
-
- call IsMonFainted
- jp z, StatusHealer_NoEffect
-
- call IsMonAtFullHealth
- jr c, .NotAtFullHealth
-
- jp FullyHealStatus
-
-.NotAtFullHealth:
- call .FullRestore
- jp StatusHealer_Jumptable
-; f144
-
-
-.FullRestore: ; f144
- xor a
- ld [Danger], a
- call ReviveFullHP
- ld a, MON_STATUS
- call GetPartyParamLocation
- xor a
- ld [hli], a
- ld [hl], a
- call HealStatus
- call BattlemonRestoreHealth
- call HealHP_SFX_GFX
- ld a, PARTYMENUTEXT_HEAL_HP
- ld [PartyMenuActionText], a
- call ItemActionTextWaitButton
- call UseDisposableItem
- ld a, 0
- ret
-; f16a
-
-
-BitterBerry: ; f16a
- ld hl, PlayerSubStatus3
- bit SUBSTATUS_CONFUSED, [hl]
- ld a, 1
- jr z, .done
-
- res SUBSTATUS_CONFUSED, [hl]
- xor a
- ld [hBattleTurn], a
- call UseItemText
-
- ld hl, ConfusedNoMoreText
- call StdBattleTextBox
-
- ld a, 0
-
-.done
- jp StatusHealer_Jumptable
-; f186
-
-
-MaxPotion:
-HyperPotion:
-SuperPotion:
-Potion:
-FreshWater:
-SodaPop:
-Lemonade:
-MoomooMilk:
-Ragecandybar:
-BerryJuice:
-Berry:
-GoldBerry: ; f186
- call ItemRestoreHP
- jp StatusHealer_Jumptable
-; f18c
-
-
-Energypowder: ; f18c
- ld c, HAPPINESS_BITTERPOWDER
- jr EnergypowderEnergyRootCommon
-; f190
-
-EnergyRoot: ; f190
- ld c, HAPPINESS_ENERGYROOT
-; f192
-
-EnergypowderEnergyRootCommon: ; f192
- push bc
- call ItemRestoreHP
- pop bc
- cp 0
- jr nz, .skip_happiness
-
- callba ChangeHappiness
- call LooksBitterMessage
- ld a, 0
-
-.skip_happiness
- jp StatusHealer_Jumptable
-; f1a9
-
-
-ItemRestoreHP: ; f1a9 (3:71a9)
- ld b, PARTYMENUACTION_HEALING_ITEM
- call UseItem_SelectMon
- ld a, 2
- ret c
-
- call IsMonFainted
- ld a, 1
- ret z
-
- call IsMonAtFullHealth
- ld a, 1
- ret nc
-
- xor a
- ld [Danger], a
- call GetHealingItemAmount
- call RestoreHealth
- call BattlemonRestoreHealth
- call HealHP_SFX_GFX
- ld a, PARTYMENUTEXT_HEAL_HP
- ld [PartyMenuActionText], a
- call ItemActionTextWaitButton
- call UseDisposableItem
- ld a, 0
- ret
-
-HealHP_SFX_GFX: ; f1db (3:71db)
- push de
- ld de, SFX_POTION
- call WaitPlaySFX
- pop de
- ld a, [CurPartyMon]
- hlcoord 11, 0
- ld bc, SCREEN_WIDTH * 2
- call AddNTimes
- ld a, $2
- ld [wWhichHPBar], a
- predef_jump AnimateHPBar
-
-UseItem_SelectMon: ; f1f9 (3:71f9)
- call .SelectMon
- ret c
-
- ld a, [CurPartySpecies]
- cp EGG
- jr nz, .not_egg
-
- call CantUseOnEggMessage
- scf
- ret
-
-.not_egg
- and a
- ret
-
-.SelectMon: ; f20b (3:720b)
- ld a, b
- ld [PartyMenuActionText], a
- push hl
- push de
- push bc
- call ClearBGPalettes
- call ChoosePkmnToUseItemOn
- pop bc
- pop de
- pop hl
- ret
-
-ChoosePkmnToUseItemOn: ; f21c (3:721c)
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- callba InitPartyMenuGFX
- callba WritePartyMenuTilemap
- callba PrintPartyMenuText
- call WaitBGMap
- call SetPalettes
- call DelayFrame
- callba PartyMenuSelect
- ret
-
-ItemActionText: ; f24a (3:724a)
- ld [PartyMenuActionText], a
- ld a, [CurPartySpecies]
- push af
- ld a, [CurPartyMon]
- push af
- push hl
- push de
- push bc
- callba WritePartyMenuTilemap
- callba PrintPartyMenuActionText
- call WaitBGMap
- call SetPalettes
- call DelayFrame
- pop bc
- pop de
- pop hl
- pop af
- ld [CurPartyMon], a
- pop af
- ld [CurPartySpecies], a
- ret
-
-ItemActionTextWaitButton: ; f279 (3:7279)
- xor a
- ld [hBGMapMode], a
- hlcoord 0, 0
- ld bc, TileMapEnd - TileMap
- ld a, " "
- call ByteFill
- ld a, [PartyMenuActionText]
- call ItemActionText
- ld a, $1
- ld [hBGMapMode], a
- ld c, 50
- call DelayFrames
- jp WaitPressAorB_BlinkCursor
-
-StatusHealer_NoEffect: ; f299 (3:7299)
- call WontHaveAnyEffectMessage
- jr StatusHealer_ClearPalettes
-
-StatusHealer_ExitMenu: ; f29e (3:729e)
- xor a
- ld [wItemEffectSucceeded], a
-StatusHealer_ClearPalettes: ; f2a2 (3:72a2)
- call ClearPalettes
- ret
-
-IsItemUsedOnBattleMon: ; f2a6 (3:72a6)
- ld a, [wBattleMode]
- and a
- ret z
- ld a, [CurPartyMon]
- push hl
- ld hl, CurBattleMon
- cp [hl]
- pop hl
- jr nz, .nope
- scf
- ret
-
-.nope
- xor a
- ret
-
-ReviveHalfHP: ; f2ba (3:72ba)
- call LoadHPFromBuffer1
- srl d
- rr e
- jr ContinueRevive
-
-ReviveFullHP: ; f2c3 (3:72c3)
- call LoadHPFromBuffer1
-ContinueRevive: ; f2c6 (3:72c6)
- ld a, MON_HP
- call GetPartyParamLocation
- ld [hl], d
- inc hl
- ld [hl], e
- jp LoadCurHPIntoBuffer5
-
-RestoreHealth: ; f2d1 (3:72d1)
- ld a, MON_HP + 1
- call GetPartyParamLocation
- ld a, [hl]
- add e
- ld [hld], a
- ld a, [hl]
- adc d
- ld [hl], a
- jr c, .full_hp
- call LoadCurHPIntoBuffer5
- ld a, MON_HP + 1
- call GetPartyParamLocation
- ld d, h
- ld e, l
- ld a, MON_MAXHP + 1
- call GetPartyParamLocation
- ld a, [de]
- sub [hl]
- dec de
- dec hl
- ld a, [de]
- sbc [hl]
- jr c, .finish
-.full_hp
- call ReviveFullHP
-.finish
- ret
-
-RemoveHP: ; f2f9 (3:72f9)
- ld a, MON_HP + 1
- call GetPartyParamLocation
- ld a, [hl]
- sub e
- ld [hld], a
- ld a, [hl]
- sbc d
- ld [hl], a
- jr nc, .okay
- xor a
- ld [hld], a
- ld [hl], a
-.okay
- call LoadCurHPIntoBuffer5
- ret
-
-IsMonFainted: ; f30d (3:730d)
- push de
- call LoadMaxHPToBuffer1
- call LoadCurHPToBuffer3
- call LoadHPFromBuffer3
- ld a, d
- or e
- pop de
- ret
-
-IsMonAtFullHealth: ; f31b (3:731b)
- call LoadHPFromBuffer3
- ld h, d
- ld l, e
- call LoadHPFromBuffer1
- ld a, l
- sub e
- ld a, h
- sbc d
- ret
-
-LoadCurHPIntoBuffer5: ; f328 (3:7328)
- ld a, MON_HP
- call GetPartyParamLocation
- ld a, [hli]
- ld [Buffer6], a
- ld a, [hl]
- ld [Buffer5], a
- ret
-; f336 (3:7336)
-
-LoadHPIntoBuffer5: ; f336
- ld a, d
- ld [Buffer6], a
- ld a, e
- ld [Buffer5], a
- ret
-; f33f
-
-LoadHPFromBuffer5: ; f33f
- ld a, [Buffer6]
- ld d, a
- ld a, [Buffer5]
- ld e, a
- ret
-; f348
-
-LoadCurHPToBuffer3: ; f348 (3:7348)
- ld a, MON_HP
- call GetPartyParamLocation
- ld a, [hli]
- ld [Buffer4], a
- ld a, [hl]
- ld [Buffer3], a
- ret
-
-LoadHPFromBuffer3: ; f356 (3:7356)
- ld a, [Buffer4]
- ld d, a
- ld a, [Buffer3]
- ld e, a
- ret
-
-LoadMaxHPToBuffer1: ; f35f (3:735f)
- push hl
- ld a, MON_MAXHP
- call GetPartyParamLocation
- ld a, [hli]
- ld [Buffer2], a
- ld a, [hl]
- ld [Buffer1], a
- pop hl
- ret
-
-LoadHPFromBuffer1: ; f36f (3:736f)
- ld a, [Buffer2]
- ld d, a
- ld a, [Buffer1]
- ld e, a
- ret
-
-GetOneFifthMaxHP: ; f378 (3:7378)
- push bc
- ld a, MON_MAXHP
- call GetPartyParamLocation
- ld a, [hli]
- ld [hDividend + 0], a
- ld a, [hl]
- ld [hDividend + 1], a
- ld a, 5
- ld [hDivisor], a
- ld b, 2
- call Divide
- ld a, [hQuotient + 1]
- ld d, a
- ld a, [hQuotient + 2]
- ld e, a
- pop bc
- ret
-
-GetHealingItemAmount: ; f395 (3:7395)
- push hl
- ld a, [CurItem]
- ld hl, .Healing
- ld d, a
-.next
- ld a, [hli]
- cp -1
- jr z, .NotFound
- cp d
- jr z, .done
- inc hl
- inc hl
- jr .next
-
-.NotFound:
- scf
-.done
- ld e, [hl]
- inc hl
- ld d, [hl]
- pop hl
- ret
-; f3af (3:73af)
-
-.Healing: ; f3af
- dbw FRESH_WATER, 50
- dbw SODA_POP, 60
- dbw LEMONADE, 80
- dbw HYPER_POTION, 200
- dbw SUPER_POTION, 50
- dbw POTION, 20
- dbw MAX_POTION, 999
- dbw FULL_RESTORE, 999
- dbw MOOMOO_MILK, 100
- dbw BERRY, 10
- dbw GOLD_BERRY, 30
- dbw ENERGYPOWDER, 50
- dbw ENERGY_ROOT, 200
- dbw RAGECANDYBAR, 20
- dbw BERRY_JUICE, 20
- dbw -1, 0
-; f3df
-
-Softboiled_MilkDrinkFunction: ; f3df (3:73df)
-; Softboiled/Milk Drink in the field
- ld a, [wPartyMenuCursor]
- dec a
- ld b, a
- call .SelectMilkDrinkRecipient ; select pokemon
- jr c, .skip
- ld a, b
- ld [CurPartyMon], a
- call IsMonFainted
- call GetOneFifthMaxHP
- call RemoveHP
- push bc
- call HealHP_SFX_GFX
- pop bc
- call GetOneFifthMaxHP
- ld a, c
- ld [CurPartyMon], a
- call IsMonFainted
- call RestoreHealth
- call HealHP_SFX_GFX
- ld a, PARTYMENUTEXT_HEAL_HP
- call ItemActionText
- call JoyWaitAorB
-.skip
- ld a, b
- inc a
- ld [wPartyMenuCursor], a
- ret
-
-.SelectMilkDrinkRecipient: ; f419 (3:7419)
-.loop
- push bc
- ld a, PARTYMENUACTION_HEALING_ITEM
- ld [PartyMenuActionText], a
- call ChoosePkmnToUseItemOn
- pop bc
- jr c, .set_carry
- ld a, [wPartyMenuCursor]
- dec a
- ld c, a
- ld a, b
- cp c
- jr z, .cant_use ; chose the same mon as user
- ld a, c
- ld [CurPartyMon], a
- call IsMonFainted
- jr z, .cant_use
- call IsMonAtFullHealth
- jr nc, .cant_use
- xor a
- ret
-
-.set_carry
- scf
- ret
-
-.cant_use
- push bc
- ld hl, .Text_CantBeUsed
- call MenuTextBoxBackup
- pop bc
- jr .loop
-; f44a (3:744a)
-
-.Text_CantBeUsed: ; 0xf44a
- ; That can't be used on this #MON.
- text_jump UnknownText_0x1c5bac
- db "@"
-; 0xf44f
-
-
-EscapeRope: ; f44f
- xor a
- ld [wItemEffectSucceeded], a
- callba EscapeRopeFunction
-
- ld a, [wItemEffectSucceeded]
- cp 1
- call z, UseDisposableItem
- ret
-; f462
-
-
-SuperRepel: ; f462
- ld b, 200
- jr UseRepel
-; f466
-
-MaxRepel: ; f466
- ld b, 250
- jr UseRepel
-; f466
-
-Repel: ; f46a
- ld b, 100
-; f46c
-
-UseRepel: ; f46c
- ld a, [wRepelEffect]
- and a
- ld hl, TextJump_RepelUsedEarlierIsStillInEffect
- jp nz, PrintText
-
- ld a, b
- ld [wRepelEffect], a
- jp UseItemText
-
-
-TextJump_RepelUsedEarlierIsStillInEffect: ; 0xf47d
- ; The REPEL used earlier is still in effect.
- text_jump Text_RepelUsedEarlierIsStillInEffect
- db "@"
-; 0xf482
-
-
-XAccuracy: ; f482
- ld hl, PlayerSubStatus4
- bit SUBSTATUS_X_ACCURACY, [hl]
- jp nz, WontHaveAnyEffect_NotUsedMessage
- set SUBSTATUS_X_ACCURACY, [hl]
- jp UseItemText
-; f48f
-
-
-PokeDoll: ; f48f
- ld a, [wBattleMode]
- dec a
- jr nz, .asm_f4a6
- inc a
- ld [wForcedSwitch], a
- ld a, [wBattleResult]
- and 3 << 6
- or $2
- ld [wBattleResult], a
- jp UseItemText
-
-.asm_f4a6
- xor a
- ld [wItemEffectSucceeded], a
- ret
-; f4ab
-
-
-GuardSpec: ; f4ab
- ld hl, PlayerSubStatus4
- bit SUBSTATUS_MIST, [hl]
- jp nz, WontHaveAnyEffect_NotUsedMessage
- set SUBSTATUS_MIST, [hl]
- jp UseItemText
-; f4b8
-
-
-DireHit: ; f4b8
- ld hl, PlayerSubStatus4
- bit SUBSTATUS_FOCUS_ENERGY, [hl]
- jp nz, WontHaveAnyEffect_NotUsedMessage
- set SUBSTATUS_FOCUS_ENERGY, [hl]
- jp UseItemText
-; f4c5
-
-
-XAttack:
-XDefend:
-XSpeed:
-XSpecial: ; f4c5
- call UseItemText
-
- ld a, [CurItem]
- ld hl, .x_item_table
-
-.loop
- cp [hl]
- jr z, .got_it
- inc hl
- inc hl
- jr .loop
-
-.got_it
- inc hl
- ld b, [hl]
- xor a
- ld [hBattleTurn], a
- ld [AttackMissed], a
- ld [EffectFailed], a
- callba CheckIfStatCanBeRaised
- call WaitSFX
-
- callba BattleCommand_StatUpMessage
- callba BattleCommand_StatUpFailText
-
- ld a, [CurBattleMon]
- ld [CurPartyMon], a
- ld c, HAPPINESS_USEDXITEM
- callba ChangeHappiness
- ret
-; f504
-
-.x_item_table ; f504
- db X_ATTACK, ATTACK
- db X_DEFEND, DEFENSE
- db X_SPEED, SPEED
- db X_SPECIAL, SP_ATTACK
-; f50c
-
-
-PokeFlute: ; f50c
- ld a, [wBattleMode]
- and a
- jr nz, .dummy
-.dummy
-
- xor a
- ld [wd002], a
-
- ld b, $ff ^ SLP
-
- ld hl, PartyMon1Status
- call .CureSleep
-
- ld a, [wBattleMode]
- cp WILD_BATTLE
- jr z, .skip_otrainer
- ld hl, OTPartyMon1Status
- call .CureSleep
-.skip_otrainer
-
- ld hl, BattleMonStatus
- ld a, [hl]
- and b
- ld [hl], a
- ld hl, EnemyMonStatus
- ld a, [hl]
- and b
- ld [hl], a
-
- ld a, [wd002]
- and a
- ld hl, .CatchyTune
- jp z, PrintText
- ld hl, .PlayedTheFlute
- call PrintText
-
- ld a, [Danger]
- and $80
- jr nz, .dummy2
-.dummy2
- ld hl, .AllSleepingMonWokeUp
- jp PrintText
-
-
-.CureSleep:
- ld de, PARTYMON_STRUCT_LENGTH
- ld c, PARTY_LENGTH
-
-.loop
- ld a, [hl]
- push af
- and SLP
- jr z, .not_asleep
- ld a, 1
- ld [wd002], a
-.not_asleep
- pop af
- and b
- ld [hl], a
- add hl, de
- dec c
- jr nz, .loop
- ret
-; f56c
-
-
-.CatchyTune: ; 0xf56c
- ; Played the # FLUTE. Now, that's a catchy tune!
- text_jump UnknownText_0x1c5bf9
- db "@"
-; 0xf571
-
-.AllSleepingMonWokeUp: ; 0xf571
- ; All sleeping #MON woke up.
- text_jump UnknownText_0x1c5c28
- db "@"
-; 0xf576
-
-.PlayedTheFlute: ; 0xf576
- ; played the # FLUTE.@ @
- text_jump UnknownText_0x1c5c44
- start_asm
- ld a, [wBattleMode]
- and a
- jr nz, .battle
-
- push de
- ld de, SFX_POKEFLUTE
- call WaitPlaySFX
- call WaitSFX
- pop de
-
-.battle
- jp PokeFluteTerminatorCharacter
-; f58f
-
-
-BlueCard: ; f58f
- ld hl, .bluecardtext
- jp MenuTextBoxWaitButton
-
-.bluecardtext
- text_jump UnknownText_0x1c5c5e
- db "@"
-; f59a
-
-
-CoinCase: ; f59a
- ld hl, .coincasetext
- jp MenuTextBoxWaitButton
-
-.coincasetext
- text_jump UnknownText_0x1c5c7b
- db "@"
-; f5a5
-
-
-OldRod: ; f5a5
- ld e, $0
- jr UseRod
-; f5a9
-
-GoodRod: ; f5a9
- ld e, $1
- jr UseRod
-; f5ad
-
-SuperRod: ; f5ad
- ld e, $2
- jr UseRod
-; f5b1
-
-UseRod: ; f5b1
- callba FishFunction
- ret
-; f5b8
-
-
-Itemfinder: ; f5b8
- callba ItemFinder
- ret
-; f5bf
-
-
-MaxElixer:
-PPUp:
-Ether:
-MaxEther:
-Elixer:
-Mysteryberry: ; f5bf
- ld a, [CurItem]
- ld [wd002], a
-
-.loop
- ; Party Screen opens to choose on which Pkmn to use the Item
- ld b, PARTYMENUACTION_HEALING_ITEM
- call UseItem_SelectMon
- jp c, PPRestoreItem_Cancel
-
-.loop2
- ld a, [wd002]
- cp MAX_ELIXER
- jp z, Elixer_RestorePPofAllMoves
- cp ELIXER
- jp z, Elixer_RestorePPofAllMoves
-
- ld hl, TextJump_RaiseThePPOfWhichMove
- ld a, [wd002]
- cp PP_UP
- jr z, .ppup
- ld hl, TextJump_RestoreThePPOfWhichMove
-
-.ppup
- call PrintText
-
- ld a, [CurMoveNum]
- push af
- xor a
- ld [CurMoveNum], a
- ld a, $2
- ld [wMoveSelectionMenuType], a
- callba MoveSelectionScreen
- pop bc
-
- ld a, b
- ld [CurMoveNum], a
- jr nz, .loop
- ld hl, PartyMon1Moves
- ld bc, PARTYMON_STRUCT_LENGTH
- call GetMthMoveOfNthPartymon
-
- push hl
- ld a, [hl]
- ld [wd265], a
- call GetMoveName
- call CopyName1
- pop hl
-
- ld a, [wd002]
- cp PP_UP
- jp nz, Not_PP_Up
-
- ld a, [hl]
- cp SKETCH
- jr z, .CantUsePPUpOnSketch
-
- ld bc, $0015
- add hl, bc
- ld a, [hl]
- cp 3 << 6 ; have 3 PP Ups already been used?
- jr c, .do_ppup
-
-.CantUsePPUpOnSketch:
-.pp_is_maxed_out
- ld hl, TextJump_PPIsMaxedOut
- call PrintText
- jr .loop2
-
-.do_ppup
- ld a, [hl]
- add 1 << 6 ; increase PP Up count by 1
- ld [hl], a
- ld a, $1
- ld [wd265], a
- call ApplyPPUp
- call Play_SFX_FULL_HEAL
-
- ld hl, TextJump_PPsIncreased
- call PrintText
-
-FinishPPRestore: ; f64c
- call ClearPalettes
- jp UseDisposableItem
-; f652
-
-BattleRestorePP: ; f652
- ld a, [wBattleMode]
- and a
- jr z, .not_in_battle
- ld a, [CurPartyMon]
- ld b, a
- ld a, [CurBattleMon]
- cp b
- jr nz, .not_in_battle
- ld a, [PlayerSubStatus5]
- bit SUBSTATUS_TRANSFORMED, a
- jr nz, .not_in_battle
- call .UpdateBattleMonPP
-
-.not_in_battle
- call Play_SFX_FULL_HEAL
- ld hl, UnknownText_0xf739
- call PrintText
- jr FinishPPRestore
-
-.UpdateBattleMonPP:
- ld a, [CurPartyMon]
- ld hl, PartyMon1Moves
- ld bc, PARTYMON_STRUCT_LENGTH
- call AddNTimes
- ld de, BattleMonMoves
- ld b, NUM_MOVES
-.loop
- ld a, [de]
- and a
- jr z, .done
- cp [hl]
- jr nz, .next
- push hl
- push de
- push bc
- rept NUM_MOVES + 2 ; BattleMonPP - BattleMonMoves
- inc de
- endr
- ld bc, MON_PP - MON_MOVES
- add hl, bc
- ld a, [hl]
- ld [de], a
- pop bc
- pop de
- pop hl
-
-.next
- inc hl
- inc de
- dec b
- jr nz, .loop
-
-.done
- ret
-; f6a7
-
-Not_PP_Up: ; f6a7
- call RestorePP
- jr nz, BattleRestorePP
- jp PPRestoreItem_NoEffect
-; f6af
-
-Elixer_RestorePPofAllMoves: ; f6af
- xor a
- ld hl, wMenuCursorY
- ld [hli], a
- ld [hl], a
- ld b, NUM_MOVES
-.moveLoop
- push bc
- ld hl, PartyMon1Moves
- ld bc, PARTYMON_STRUCT_LENGTH
- call GetMthMoveOfNthPartymon
- ld a, [hl]
- and a
- jr z, .next
-
- call RestorePP
- jr z, .next
- ld hl, wMenuCursorX
- inc [hl]
-
-.next
- ld hl, wMenuCursorY
- inc [hl]
- pop bc
- dec b
- jr nz, .moveLoop
- ld a, [wMenuCursorX]
- and a
- jp nz, BattleRestorePP
-
-PPRestoreItem_NoEffect: ; f6dd
- call WontHaveAnyEffectMessage
-
-PPRestoreItem_Cancel: ; f6e0
- call ClearPalettes
- xor a
- ld [wItemEffectSucceeded], a
- ret
-; f6e8
-
-RestorePP: ; f6e8
- xor a ; PARTYMON
- ld [MonType], a
- call GetMaxPPOfMove
- ld hl, PartyMon1PP
- ld bc, PARTYMON_STRUCT_LENGTH
- call GetMthMoveOfNthPartymon
- ld a, [wd265]
- ld b, a
- ld a, [hl]
- and (1 << 6) - 1
- cp b
- jr nc, .dont_restore
-
- ld a, [wd002]
- cp MAX_ELIXER
- jr z, .restore_all
- cp MAX_ETHER
- jr z, .restore_all
-
- ld c, 5
- cp MYSTERYBERRY
- jr z, .restore_some
-
- ld c, 10
-
-.restore_some
- ld a, [hl]
- and (1 << 6) - 1
- add c
- cp b
- jr nc, .restore_all
- ld b, a
-
-.restore_all
- ld a, [hl]
- and 3 << 6
- or b
- ld [hl], a
- ret
-
-.dont_restore
- xor a
- ret
-; f725
-
-TextJump_RaiseThePPOfWhichMove: ; 0xf725
- ; Raise the PP of which move?
- text_jump Text_RaiseThePPOfWhichMove
- db "@"
-; 0xf72a
-
-TextJump_RestoreThePPOfWhichMove: ; 0xf72a
- ; Restore the PP of which move?
- text_jump Text_RestoreThePPOfWhichMove
- db "@"
-; 0xf72f
-
-TextJump_PPIsMaxedOut: ; 0xf72f
- ; 's PP is maxed out.
- text_jump Text_PPIsMaxedOut
- db "@"
-; 0xf734
-
-TextJump_PPsIncreased: ; 0xf734
- ; 's PP increased.
- text_jump Text_PPsIncreased
- db "@"
-; 0xf739
-
-UnknownText_0xf739: ; 0xf739
- ; PP was restored.
- text_jump UnknownText_0x1c5cf1
- db "@"
-; 0xf73e
-
-
-Squirtbottle: ; f73e
- callba _Squirtbottle
- ret
-; f745
-
-
-CardKey: ; f745
- callba _CardKey
- ret
-; f74c
-
-
-BasementKey: ; f74c
- callba _BasementKey
- ret
-; f753
-
-
-SacredAsh: ; f753
- callba _SacredAsh
- ld a, [wItemEffectSucceeded]
- cp $1
- ret nz
- call UseDisposableItem
- ret
-; f763
-
-
-NormalBox: ; f763
- ld c, DECOFLAG_SILVER_TROPHY_DOLL
- jr OpenBox
-; f767
-
-GorgeousBox: ; f767
- ld c, DECOFLAG_GOLD_TROPHY_DOLL
-OpenBox: ; f769
- callba SetSpecificDecorationFlag
-
- ld hl, .text
- call PrintText
-
- jp UseDisposableItem
-; f778
-
-.text ; 0xf778
- ; There was a trophy inside!
- text_jump UnknownText_0x1c5d03
- db "@"
-; 0xf77d
-
-Brightpowder:
-Item19:
-LuckyPunch:
-MetalPowder:
-Nugget:
-Item2D:
-Item32:
-ExpShare:
-SilverLeaf:
-RedScale:
-Secretpotion:
-SSTicket:
-MysteryEgg:
-ClearBell:
-SilverWing:
-QuickClaw:
-GoldLeaf:
-SoftSand:
-SharpBeak:
-PoisonBarb:
-KingsRock:
-RedApricorn:
-Tinymushroom:
-BigMushroom:
-Silverpowder:
-BluApricorn:
-Item5A:
-AmuletCoin:
-YlwApricorn:
-GrnApricorn:
-CleanseTag:
-MysticWater:
-Twistedspoon:
-WhtApricorn:
-Blackbelt:
-BlkApricorn:
-Item64:
-PnkApricorn:
-Blackglasses:
-Slowpoketail:
-PinkBow:
-Stick:
-SmokeBall:
-Nevermeltice:
-Magnet:
-Pearl:
-BigPearl:
-Everstone:
-SpellTag:
-GsBall:
-MiracleSeed:
-ThickClub:
-FocusBand:
-Item78:
-HardStone:
-LuckyEgg:
-MachinePart:
-EggTicket:
-LostItem:
-Stardust:
-StarPiece:
-Pass:
-Item87:
-Item88:
-Item89:
-Charcoal:
-ScopeLens:
-Item8D:
-Item8E:
-MetalCoat:
-DragonFang:
-Item91:
-Leftovers:
-Item93:
-Item94:
-Item95:
-DragonScale:
-BerserkGene:
-Item99:
-Item9A:
-Item9B:
-FlowerMail:
-ItemA2:
-LightBall:
-PolkadotBow:
-ItemAB:
-UpGrade:
-ItemB0:
-RainbowWing:
-ItemB3:
-TeruSama: ; f77d
- jp IsntTheTimeMessage
-; f780
-
-
-Play_SFX_FULL_HEAL: ; f780
- push de
- ld de, SFX_FULL_HEAL
- call WaitPlaySFX
- pop de
- ret
-; f789
-
-UseItemText: ; f789
- ld hl, UsedItemText
- call PrintText
- call Play_SFX_FULL_HEAL
- call WaitPressAorB_BlinkCursor
-UseDisposableItem: ; f795
- ld hl, NumItems
- ld a, 1
- ld [wItemQuantityChangeBuffer], a
- jp TossItem
-; f7a0
-
-UseBallInTrainerBattle: ; f7a0
- call ReturnToBattle_UseBall
- ld de, ANIM_THROW_POKE_BALL
- ld a, e
- ld [FXAnimIDLo], a
- ld a, d
- ld [FXAnimIDHi], a
- xor a
- ld [wBattleAnimParam], a
- ld [hBattleTurn], a
- ld [wNumHits], a
- predef PlayBattleAnim
- ld hl, BlockedTheBallText
- call PrintText
- ld hl, DontBeAThiefText
- call PrintText
- jr UseDisposableItem
-; f7ca
-
-WontHaveAnyEffect_NotUsedMessage: ; f7ca
- ld hl, WontHaveAnyEffectText
- call PrintText
-
- ; Item wasn't used.
- ld a, $2
- ld [wItemEffectSucceeded], a
- ret
-; f7d6
-
-LooksBitterMessage: ; f7d6
- ld hl, LooksBitterText
- jp PrintText
-; f7dc
-
-Ball_BoxIsFullMessage: ; f7dc
- ld hl, Ball_BoxIsFullText
- call PrintText
-
- ; Item wasn't used.
- ld a, $2
- ld [wItemEffectSucceeded], a
- ret
-; f7e8
-
-CantUseOnEggMessage: ; f7e8
- ld hl, CantUseOnEggText
- jr CantUseItemMessage
-
-IsntTheTimeMessage: ; f7ed
- ld hl, IsntTheTimeText
- jr CantUseItemMessage
-
-WontHaveAnyEffectMessage: ; f7f2
- ld hl, WontHaveAnyEffectText
- jr CantUseItemMessage
-
-BelongsToSomeoneElseMessage: ; f7f7
- ld hl, BelongsToSomeoneElseText
- jr CantUseItemMessage
-
-CyclingIsntAllowedMessage: ; f7fc
- ld hl, CyclingIsntAllowedText
- jr CantUseItemMessage
-
-CantGetOnYourBikeMessage: ; f801
- ld hl, CantGetOnYourBikeText
-
-CantUseItemMessage: ; f804
-; Item couldn't be used.
- xor a
- ld [wItemEffectSucceeded], a
- jp PrintText
-; f80b
-
-LooksBitterText: ; 0xf80b
- ; It looks bitter…
- text_jump UnknownText_0x1c5d3e
- db "@"
-; 0xf810
-
-CantUseOnEggText: ; 0xf810
- ; That can't be used on an EGG.
- text_jump UnknownText_0x1c5d50
- db "@"
-; 0xf815
-
-IsntTheTimeText: ; 0xf815
- ; OAK: ! This isn't the time to use that!
- text_jump UnknownText_0x1c5d6e
- db "@"
-; 0xf81a
-
-BelongsToSomeoneElseText: ; 0xf81a
- ; That belongs to someone else!
- text_jump UnknownText_0x1c5d97
- db "@"
-; 0xf81f
-
-WontHaveAnyEffectText: ; 0xf81f
- ; It won't have any effect.
- text_jump UnknownText_0x1c5db6
- db "@"
-; 0xf824
-
-BlockedTheBallText: ; 0xf824
- ; The trainer blocked the BALL!
- text_jump UnknownText_0x1c5dd0
- db "@"
-; 0xf829
-
-DontBeAThiefText: ; 0xf829
- ; Don't be a thief!
- text_jump UnknownText_0x1c5def
- db "@"
-; 0xf82e
-
-CyclingIsntAllowedText: ; 0xf82e
- ; Cycling isn't allowed here.
- text_jump UnknownText_0x1c5e01
- db "@"
-; 0xf833
-
-CantGetOnYourBikeText: ; 0xf833
- ; Can't get on your @ now.
- text_jump UnknownText_0x1c5e1d
- db "@"
-; 0xf838
-
-Ball_BoxIsFullText: ; 0xf838
- ; The #MON BOX is full. That can't be used now.
- text_jump UnknownText_0x1c5e3a
- db "@"
-; 0xf83d
-
-UsedItemText: ; 0xf83d
- ; used the@ .
- text_jump UnknownText_0x1c5e68
- db "@"
-; 0xf842
-
-GotOnTheItemText: ; 0xf842
- ; got on the@ .
- text_jump UnknownText_0x1c5e7b
- db "@"
-; 0xf847
-
-GotOffTheItemText: ; 0xf847
- ; got off@ the @ .
- text_jump UnknownText_0x1c5e90
- db "@"
-; 0xf84c
-
-
-ApplyPPUp: ; f84c
- ld a, MON_MOVES
- call GetPartyParamLocation
- push hl
- ld de, Buffer1
- predef FillPP
- pop hl
- ld bc, MON_PP - MON_MOVES
- add hl, bc
- ld de, Buffer1
- ld b, 0
-.loop
- inc b
- ld a, b
- cp NUM_MOVES + 1
- ret z
- ld a, [wd265]
- dec a
- jr nz, .use
- ld a, [wMenuCursorY]
- inc a
- cp b
- jr nz, .skip
-
-.use
- ld a, [hl]
- and 3 << 6
- ld a, [de] ; wasted cycle
- call nz, ComputeMaxPP
-
-.skip
- inc hl
- inc de
- jr .loop
-; f881
-
-
-
-ComputeMaxPP: ; f881
- push bc
- ; Divide the base PP by 5.
- ld a, [de]
- ld [hDividend + 3], a
- xor a
- ld [hDividend], a
- ld [hDividend + 1], a
- ld [hDividend + 2], a
- ld a, 5
- ld [hDivisor], a
- ld b, 4
- call Divide
- ; Get the number of PP, which are bits 6 and 7 of the PP value stored in RAM.
- ld a, [hl]
- ld b, a
- swap a
- and $f
- srl a
- srl a
- ld c, a
- ; If this value is 0, we are done
- and a
- jr z, .NoPPUp
-
-.loop
- ; Normally, a move with 40 PP would have 64 PP with three PP Ups.
- ; Since this would overflow into bit 6, we prevent that from happening
- ; by decreasing the extra amount of PP each PP Up provides, resulting
- ; in a maximum of 61.
- ld a, [hQuotient + 2]
- cp $8
- jr c, .okay
- ld a, $7
-
-.okay
- add b
- ld b, a
- ld a, [wd265]
- dec a
- jr z, .NoPPUp
- dec c
- jr nz, .loop
-
-.NoPPUp:
- ld [hl], b
- pop bc
- ret
-; f8b9
-
-RestoreAllPP: ; f8b9
- ld a, MON_PP
- call GetPartyParamLocation
- push hl
- ld a, MON_MOVES
- call GetPartyParamLocation
- pop de
- xor a ; PARTYMON
- ld [wMenuCursorY], a
- ld [MonType], a
- ld c, NUM_MOVES
-.loop
- ld a, [hli]
- and a
- ret z
- push hl
- push de
- push bc
- call GetMaxPPOfMove
- pop bc
- pop de
- ld a, [de]
- and 3 << 6
- ld b, a
- ld a, [wd265]
- add b
- ld [de], a
- inc de
- ld hl, wMenuCursorY
- inc [hl]
- pop hl
- dec c
- jr nz, .loop
- ret
-; f8ec
-
-
-GetMaxPPOfMove: ; f8ec
- ld a, [StringBuffer1 + 0]
- push af
- ld a, [StringBuffer1 + 1]
- push af
-
- ld a, [MonType]
- and a
-
- ld hl, PartyMon1Moves
- ld bc, PARTYMON_STRUCT_LENGTH
- jr z, .got_partymon ; PARTYMON
-
- ld hl, OTPartyMon1Moves
- dec a
- jr z, .got_partymon ; OTPARTYMON
-
- ld hl, TempMonMoves
- dec a
- jr z, .got_nonpartymon ; BOXMON
-
- ld hl, TempMonMoves ; Wasted cycles
- dec a
- jr z, .got_nonpartymon ; TEMPMON
-
- ld hl, BattleMonMoves ; WILDMON
-
-.got_nonpartymon ; BOXMON, TEMPMON, WILDMON
- call GetMthMoveOfCurrentMon
- jr .gotdatmove
-
-.got_partymon ; PARTYMON, OTPARTYMON
- call GetMthMoveOfNthPartymon
-
-.gotdatmove
- ld a, [hl]
- dec a
-
- push hl
- ld hl, Moves + MOVE_PP
- ld bc, MOVE_LENGTH
- call AddNTimes
- ld a, BANK(Moves)
- call GetFarByte
- ld b, a
- ld de, StringBuffer1
- ld [de], a
- pop hl
-
- push bc
- ld bc, MON_PP - MON_MOVES
- ld a, [MonType]
- cp WILDMON
- jr nz, .notwild
- ld bc, EnemyMonPP - EnemyMonMoves
-.notwild
- add hl, bc
- ld a, [hl]
- and 3 << 6
- pop bc
-
- or b
- ld hl, StringBuffer1 + 1
- ld [hl], a
- xor a
- ld [wd265], a
- ld a, b ; this gets lost anyway
- call ComputeMaxPP
- ld a, [hl]
- and (1 << 6) - 1
- ld [wd265], a
-
- pop af
- ld [StringBuffer1 + 1], a
- pop af
- ld [StringBuffer1 + 0], a
- ret
-; f963
-
-GetMthMoveOfNthPartymon: ; f963
- ld a, [CurPartyMon]
- call AddNTimes
-
-GetMthMoveOfCurrentMon: ; f969
- ld a, [wMenuCursorY]
- ld c, a
- ld b, 0
- add hl, bc
- ret
-; f971
-
-INCLUDE "items/pokeball_wobble.asm"
diff --git a/items/item_names.asm b/items/item_names.asm
deleted file mode 100644
index 7a31888b6..000000000
--- a/items/item_names.asm
+++ /dev/null
@@ -1,256 +0,0 @@
- db "MASTER BALL@"
- db "ULTRA BALL@"
- db "BRIGHTPOWDER@"
- db "GREAT BALL@"
- db "# BALL@"
- db "TERU-SAMA@"
- db "BICYCLE@"
- db "MOON STONE@"
- db "ANTIDOTE@"
- db "BURN HEAL@"
- db "ICE HEAL@"
- db "AWAKENING@"
- db "PARLYZ HEAL@"
- db "FULL RESTORE@"
- db "MAX POTION@"
- db "HYPER POTION@"
- db "SUPER POTION@"
- db "POTION@"
- db "ESCAPE ROPE@"
- db "REPEL@"
- db "MAX ELIXER@"
- db "FIRE STONE@"
- db "THUNDERSTONE@"
- db "WATER STONE@"
- db "TERU-SAMA@"
- db "HP UP@"
- db "PROTEIN@"
- db "IRON@"
- db "CARBOS@"
- db "LUCKY PUNCH@"
- db "CALCIUM@"
- db "RARE CANDY@"
- db "X ACCURACY@"
- db "LEAF STONE@"
- db "METAL POWDER@"
- db "NUGGET@"
- db "# DOLL@"
- db "FULL HEAL@"
- db "REVIVE@"
- db "MAX REVIVE@"
- db "GUARD SPEC.@"
- db "SUPER REPEL@"
- db "MAX REPEL@"
- db "DIRE HIT@"
- db "TERU-SAMA@"
- db "FRESH WATER@"
- db "SODA POP@"
- db "LEMONADE@"
- db "X ATTACK@"
- db "TERU-SAMA@"
- db "X DEFEND@"
- db "X SPEED@"
- db "X SPECIAL@"
- db "COIN CASE@"
- db "ITEMFINDER@"
- db "TERU-SAMA@"
- db "EXP.SHARE@"
- db "OLD ROD@"
- db "GOOD ROD@"
- db "SILVER LEAF@"
- db "SUPER ROD@"
- db "PP UP@"
- db "ETHER@"
- db "MAX ETHER@"
- db "ELIXER@"
- db "RED SCALE@"
- db "SECRETPOTION@"
- db "S.S.TICKET@"
- db "MYSTERY EGG@"
- db "CLEAR BELL@"
- db "SILVER WING@"
- db "MOOMOO MILK@"
- db "QUICK CLAW@"
- db "PSNCUREBERRY@"
- db "GOLD LEAF@"
- db "SOFT SAND@"
- db "SHARP BEAK@"
- db "PRZCUREBERRY@"
- db "BURNT BERRY@"
- db "ICE BERRY@"
- db "POISON BARB@"
- db "KING'S ROCK@"
- db "BITTER BERRY@"
- db "MINT BERRY@"
- db "RED APRICORN@"
- db "TINYMUSHROOM@"
- db "BIG MUSHROOM@"
- db "SILVERPOWDER@"
- db "BLU APRICORN@"
- db "TERU-SAMA@"
- db "AMULET COIN@"
- db "YLW APRICORN@"
- db "GRN APRICORN@"
- db "CLEANSE TAG@"
- db "MYSTIC WATER@"
- db "TWISTEDSPOON@"
- db "WHT APRICORN@"
- db "BLACKBELT@"
- db "BLK APRICORN@"
- db "TERU-SAMA@"
- db "PNK APRICORN@"
- db "BLACKGLASSES@"
- db "SLOWPOKETAIL@"
- db "PINK BOW@"
- db "STICK@"
- db "SMOKE BALL@"
- db "NEVERMELTICE@"
- db "MAGNET@"
- db "MIRACLEBERRY@"
- db "PEARL@"
- db "BIG PEARL@"
- db "EVERSTONE@"
- db "SPELL TAG@"
- db "RAGECANDYBAR@"
- db "GS BALL@"
- db "BLUE CARD@"
- db "MIRACLE SEED@"
- db "THICK CLUB@"
- db "FOCUS BAND@"
- db "TERU-SAMA@"
- db "ENERGYPOWDER@"
- db "ENERGY ROOT@"
- db "HEAL POWDER@"
- db "REVIVAL HERB@"
- db "HARD STONE@"
- db "LUCKY EGG@"
- db "CARD KEY@"
- db "MACHINE PART@"
- db "EGG TICKET@"
- db "LOST ITEM@"
- db "STARDUST@"
- db "STAR PIECE@"
- db "BASEMENT KEY@"
- db "PASS@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "CHARCOAL@"
- db "BERRY JUICE@"
- db "SCOPE LENS@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "METAL COAT@"
- db "DRAGON FANG@"
- db "TERU-SAMA@"
- db "LEFTOVERS@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "MYSTERYBERRY@"
- db "DRAGON SCALE@"
- db "BERSERK GENE@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "SACRED ASH@"
- db "HEAVY BALL@"
- db "FLOWER MAIL@"
- db "LEVEL BALL@"
- db "LURE BALL@"
- db "FAST BALL@"
- db "TERU-SAMA@"
- db "LIGHT BALL@"
- db "FRIEND BALL@"
- db "MOON BALL@"
- db "LOVE BALL@"
- db "NORMAL BOX@"
- db "GORGEOUS BOX@"
- db "SUN STONE@"
- db "POLKADOT BOW@"
- db "TERU-SAMA@"
- db "UP-GRADE@"
- db "BERRY@"
- db "GOLD BERRY@"
- db "SQUIRTBOTTLE@"
- db "TERU-SAMA@"
- db "PARK BALL@"
- db "RAINBOW WING@"
- db "TERU-SAMA@"
- db "BRICK PIECE@"
- db "SURF MAIL@"
- db "LITEBLUEMAIL@"
- db "PORTRAITMAIL@"
- db "LOVELY MAIL@"
- db "EON MAIL@"
- db "MORPH MAIL@"
- db "BLUESKY MAIL@"
- db "MUSIC MAIL@"
- db "MIRAGE MAIL@"
- db "TERU-SAMA@"
- db "TM01@"
- db "TM02@"
- db "TM03@"
- db "TM04@"
- db "TERU-SAMA@"
- db "TM05@"
- db "TM06@"
- db "TM07@"
- db "TM08@"
- db "TM09@"
- db "TM10@"
- db "TM11@"
- db "TM12@"
- db "TM13@"
- db "TM14@"
- db "TM15@"
- db "TM16@"
- db "TM17@"
- db "TM18@"
- db "TM19@"
- db "TM20@"
- db "TM21@"
- db "TM22@"
- db "TM23@"
- db "TM24@"
- db "TM25@"
- db "TM26@"
- db "TM27@"
- db "TM28@"
- db "TERU-SAMA@"
- db "TM29@"
- db "TM30@"
- db "TM31@"
- db "TM32@"
- db "TM33@"
- db "TM34@"
- db "TM35@"
- db "TM36@"
- db "TM37@"
- db "TM38@"
- db "TM39@"
- db "TM40@"
- db "TM41@"
- db "TM42@"
- db "TM43@"
- db "TM44@"
- db "TM45@"
- db "TM46@"
- db "TM47@"
- db "TM48@"
- db "TM49@"
- db "TM50@"
- db "HM01@"
- db "HM02@"
- db "HM03@"
- db "HM04@"
- db "HM05@"
- db "HM06@"
- db "HM07@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "TERU-SAMA@"
- db "?@"
diff --git a/lib/mobile/main.asm b/lib/mobile/main.asm
index 0261bc564..0d2003f2e 100644
--- a/lib/mobile/main.asm
+++ b/lib/mobile/main.asm
@@ -2,7 +2,7 @@
charmap "<CR>", $d
-INCLUDE "gbhw.asm"
+INCLUDE "constants/hardware_constants.asm"
SECTION "Main", ROMX
@@ -9073,8 +9073,8 @@ Unknown_113b70: ; 113b70
dw $cbef
Unknown_113b7e: ; 113b7e
- db $01,$23,$45,$67,$89,$ab,$cd,$ef
- db $fe,$dc,$ba,$98,$76,$54,$32,$10
+ db $01, $23, $45, $67, $89, $ab, $cd, $ef
+ db $fe, $dc, $ba, $98, $76, $54, $32, $10
Unknown_113b8e:
db $78, $a4, $6a, $d7, $56, $b7, $c7, $e8, $db, $70, $20, $24, $ee, $ce, $bd, $c1
diff --git a/macros.asm b/macros.asm
index 13aff261d..48c2ceca4 100644
--- a/macros.asm
+++ b/macros.asm
@@ -1,316 +1,26 @@
INCLUDE "macros/enum.asm"
-INCLUDE "macros/basestats.asm"
-
-INCLUDE "macros/event.asm"
-INCLUDE "macros/sound.asm"
-INCLUDE "macros/text.asm"
INCLUDE "macros/charmap.asm"
-INCLUDE "macros/move_effect.asm"
-INCLUDE "macros/move_anim.asm"
-INCLUDE "macros/movement.asm"
-INCLUDE "macros/map.asm"
-INCLUDE "macros/pic.asm"
INCLUDE "macros/predef.asm"
INCLUDE "macros/rst.asm"
-INCLUDE "macros/mobile.asm"
-INCLUDE "macros/trainer.asm"
-INCLUDE "macros/trade_anim.asm"
-INCLUDE "macros/pals.asm"
-
-RGB: MACRO
- dw ((\3) << 10) + ((\2) << 5) + (\1)
- ENDM
+INCLUDE "macros/data.asm"
+INCLUDE "macros/code.asm"
+INCLUDE "macros/coords.asm"
+INCLUDE "macros/color.asm"
+INCLUDE "macros/base_stats.asm"
+INCLUDE "macros/tilesets.asm"
+
+INCLUDE "macros/scripts/audio.asm"
+INCLUDE "macros/scripts/maps.asm"
+INCLUDE "macros/scripts/event.asm"
+INCLUDE "macros/scripts/text.asm"
+INCLUDE "macros/scripts/movement.asm"
+INCLUDE "macros/scripts/effect_commands.asm"
+INCLUDE "macros/scripts/move_anim.asm"
+INCLUDE "macros/scripts/trade_anim.asm"
+INCLUDE "macros/scripts/gfx_anim.asm"
percent EQUS "* $ff / 100"
-
-dwb: MACRO
- dw \1
- db \2
- ENDM
-
-dbw: MACRO
- db \1
- dw \2
- ENDM
-
-dbbw: MACRO
- db \1, \2
- dw \3
- ENDM
-
-dbww: MACRO
- db \1
- dw \2, \3
- ENDM
-
-dbwww: MACRO
- db \1
- dw \2, \3, \4
- ENDM
-
-dn: MACRO
- rept _NARG / 2
- db (\1) << 4 + (\2)
- shift
- shift
- endr
- ENDM
-
-dx: MACRO
-x = 8 * ((\1) - 1)
- rept \1
- db ((\2) >> x) & $ff
-x = x + -8
- endr
- ENDM
-
-dt: MACRO ; three-byte (big-endian)
- dx 3, \1
- ENDM
-
-dd: MACRO ; four-byte (big-endian)
- dx 4, \1
- ENDM
-
-bigdw: MACRO ; big-endian word
- dx 2, \1
- ENDM
-
-dba: MACRO ; dbw bank, address
- rept _NARG
- dbw BANK(\1), \1
- shift
- endr
- ENDM
-
-dab: MACRO ; dwb address, bank
- rept _NARG
- dwb \1, BANK(\1)
- shift
- endr
- ENDM
-
-lb: MACRO ; r, hi, lo
- ld \1, (\2 & $ff) << 8 + (\3 & $ff)
- ENDM
-
-ln: MACRO ; r, hi, lo
- ld \1, (\2 & $f) << 4 + (\3 & $f)
- ENDM
-
-bccoord equs "coord bc,"
-decoord equs "coord de,"
-hlcoord equs "coord hl,"
-
-coord: MACRO
-; register, x, y[, origin]
- if _NARG < 4
- ld \1, TileMap + SCREEN_WIDTH * (\3) + (\2)
- else
- ld \1, \4 + SCREEN_WIDTH * (\3) + (\2)
- endc
- ENDM
-
-dwcoord: MACRO
- rept _NARG / 2
- dw TileMap + SCREEN_WIDTH * (\2) + (\1)
- shift
- shift
- endr
- ENDM
-
-ldcoord_a: MACRO
- if _NARG < 3
- ld [TileMap + SCREEN_WIDTH * (\2) + (\1)], a
- else
- ld [\3 + SCREEN_WIDTH * (\2) + (\1)], a
- endc
- ENDM
-
-lda_coord: MACRO
- if _NARG < 3
- ld a, [TileMap + SCREEN_WIDTH * (\2) + (\1)]
- else
- ld a, [\3 + SCREEN_WIDTH * (\2) + (\1)]
- endc
- ENDM
-
-; pic animations
-frame: MACRO
- db \1
-x = \2
-IF _NARG > 2
-rept _NARG +- 2
-x = x | (1 << (\3 + 1))
- shift
-endr
-endc
- db x
- ENDM
-setrepeat: MACRO
- db $fe
- db \1
- ENDM
-dorepeat: MACRO
- db $fd
- db \1
- ENDM
-endanim: MACRO
- db $ff
- ENDM
-
-
-delanim: MACRO
- db $fc
- ENDM
-dorestart: MACRO
- db $fe
- ENDM
-
-sine_wave: MACRO
-; \1: amplitude
-
-x = 0
- rept $20
- ; Round up.
- dw (sin(x) + (sin(x) & $ff)) >> 8
-x = x + (\1) * $40000
- endr
-ENDM
-
-
-bcd: MACRO
- rept _NARG
- dn ((\1) % 100) / 10, (\1) % 10
- shift
- endr
-ENDM
-
-tiles EQUS "* $10"
-tile EQUS "+ $10 *"
-
-partymon: MACRO
- db \1
- db \2
- db \3, \4, \5, \6
- dw \7
- dt \8
-rept 8
- shift
-endr
-rept 5
- bigdw \1
- shift
-endr
- db \1, \2
- db \3, \4, \5, \6
-rept 6
- shift
-endr
- db \1
- db \2, \3, \4
- db \5
- db \6, \7
-rept 7
- shift
-endr
-rept 7
- bigdw \1
- shift
-endr
- db \1
-ENDM
-
-palettes EQUS "* 8"
-
-ldpixel: MACRO
-if _NARG >= 5
- lb \1, \2 * 8 + \4, \3 * 8 + \5
-else
- lb \1, \2 * 8, \3 * 8
-endc
-endm
-
-depixel EQUS "ldpixel de,"
-bcpixel EQUS "ldpixel bc,"
-
-dbpixel: MACRO
-if _NARG >= 4
- db \1 * 8 + \3, \2 * 8 + \4
-else
- db \1 * 8, \2 * 8
-endc
-endm
-
-bgcoord: MACRO
-IF _NARG >= 4
- ld \1, \3 * $20 + \2 + \4
-ELSE
- ld \1, \3 * $20 + \2 + VBGMap0
-ENDC
-ENDM
-
-hlbgcoord EQUS "bgcoord hl,"
-debgcoord EQUS "bgcoord de,"
-bcbgcoord EQUS "bgcoord bc,"
-bgrows EQUS "* $20"
-
-palred EQUS "$0001 *"
-palgreen EQUS "$0020 *"
-palblue EQUS "$0400 *"
-
-dsprite: MACRO
-; conditional segment is there because not every instance of
-; this macro is directly OAM
-if _NARG >= 7 ; y tile, y pxl, x tile, x pxl, vtile offset, flags, palette
- db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5, (\6 << 3) + (\7 & 7)
-else
- db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5, \6
-endc
-endm
-
-jumptable: MACRO
- ld a, [\2]
- ld e, a
- ld d, 0
- ld hl, \1
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-endm
-
-maskbits: macro
-; returns to x
-; usage in rejection sampling
-; .loop
-; call Random
-; maskbits 30
-; and x
-; cp 30
-; jr nc, .loop
-
-x = 1
-rept 8
-IF \1 > x
-x = (x + 1) * 2 +- 1
-ENDC
-endr
-endm
-
-homecall: MACRO
- ld a, [hROMBank]
- push af
- ld a, BANK(\1)
- rst Bankswitch
-
- call \1
-
- pop af
- rst Bankswitch
-ENDM
-
+tiles EQUS "* LEN_2BPP_TILE"
+tile EQUS "+ LEN_2BPP_TILE *"
diff --git a/macros/base_stats.asm b/macros/base_stats.asm
new file mode 100644
index 000000000..f7c841634
--- /dev/null
+++ b/macros/base_stats.asm
@@ -0,0 +1,67 @@
+; Used in data/pokemon/base_stats/*.asm
+
+define: macro
+if !def(\1)
+\1 equs \2
+endc
+endm
+
+const_value = 0
+
+add_tm: MACRO
+if !def(TM01)
+TM01 = const_value
+ enum_start 1
+endc
+ define _\@_1, "TM_\1"
+ const _\@_1
+ enum \1_TMNUM
+ENDM
+
+add_hm: MACRO
+if !def(HM01)
+HM01 = const_value
+endc
+ define _\@_1, "HM_\1"
+ const _\@_1
+ enum \1_TMNUM
+ENDM
+
+add_mt: MACRO
+ enum \1_TMNUM
+ENDM
+
+; N TMs/HMs need (N+7)/8 bytes for their bit flags.
+; The rgbasm integers tms1, tms2, tms3 each hold 3 bytes, or 24 bits.
+tmhm: MACRO
+tms1 = 0
+tms2 = 0
+tms3 = 0
+rept _NARG
+ if def(\1_TMNUM)
+ if \1_TMNUM < 24 + 1
+tms1 = tms1 | (1 << ((\1_TMNUM) - 1))
+ elif \1_TMNUM < 48 + 1
+tms2 = tms2 | (1 << ((\1_TMNUM) - 1 - 24))
+ else
+tms3 = tms3 | (1 << ((\1_TMNUM) - 1 - 48))
+ endc
+ else
+ fail "\1 is not a TM, HM, or move tutor move"
+ endc
+ shift
+endr
+
+rept 3
+ db tms1 & $ff
+tms1 = tms1 >> 8
+endr
+rept 3
+ db tms2 & $ff
+tms2 = tms2 >> 8
+endr
+rept 2
+ db tms3 & $ff
+tms3 = tms3 >> 8
+endr
+ENDM
diff --git a/macros/basestats.asm b/macros/basestats.asm
deleted file mode 100644
index 25ffcc02b..000000000
--- a/macros/basestats.asm
+++ /dev/null
@@ -1,66 +0,0 @@
-define: macro
-if !def(\1)
-\1 equs \2
-endc
-endm
-
-const_value = 0
-
-add_tm: MACRO
-if !def(TM01)
-TM01 = const_value
- enum_start 1
-endc
- define _\@_1, "TM_\1"
- const _\@_1
- enum \1_TMNUM
-ENDM
-
-add_hm: MACRO
-if !def(HM01)
-HM01 = const_value
-endc
- define _\@_1, "HM_\1"
- const _\@_1
- enum \1_TMNUM
-ENDM
-
-add_mt: MACRO
- enum \1_TMNUM
-ENDM
-
-tmhm: MACRO
-x = 0
-y = 0
-w = 0
- rept _NARG
- if def(\1_TMNUM)
- if \1_TMNUM < 25
-x = x | (1 << ((\1_TMNUM) - 1))
- else
- if \1_TMNUM < 49
-y = y | (1 << ((\1_TMNUM) - 1 - 24))
- else
-w = w | (1 << ((\1_TMNUM) - 1 - 48))
- endc
- endc
- else
- fail "\1 is not a TM, HM, or move tutor move"
- endc
-
- shift
- endr
-
- rept 3
- db x & $ff
-x = x >> 8
- endr
- rept 3
- db y & $ff
-y = y >> 8
- endr
- rept 2
- db w & $ff
-w = w >> 8
- endr
-ENDM
diff --git a/macros/charmap.asm b/macros/charmap.asm
index 445922932..fd2d371fd 100644
--- a/macros/charmap.asm
+++ b/macros/charmap.asm
@@ -1,175 +1,211 @@
; Control characters
- charmap "<START>", $00
- charmap "<PLAY_G>", $14 ; <PLAYER> + gender
- charmap "<DAY>", $15
- charmap "¯", $1f
- charmap "<LNBRK>", $22
- charmap "<POKE>", $24
- charmap "%", $25
- charmap "<RED>", $38
- charmap "<GREEN>", $39
- charmap "<ENEMY>", $3f
- charmap "<SHINY>", $3f
- charmap "<MOM>", $49
- charmap "<PKMN>", $4a
- charmap "<NEXT>", $4e
- charmap "<LINE>", $4f
-
- charmap "@", $50
- charmap "<PARA>", $51
- charmap "<PLAYER>", $52
- charmap "<RIVAL>", $53
- charmap "#", $54
- charmap "<CONT>", $55
- charmap "<......>", $56
- charmap "<DONE>", $57
- charmap "<PROMPT>", $58
- charmap "<TARGET>", $59
- charmap "<USER>", $5a
- charmap "<PC>", $5b
- charmap "<TM>", $5c
- charmap "<TRNER>", $5d
- charmap "<ROCKET>", $5e
- charmap "<DEXEND>", $5f
-
-; Actual characters
- charmap "▲", $61
- charmap "_", $62
- charmap "<COLON>", $6d ; necessary because ":" is already used
- charmap "′", $6e
- charmap "<LV>", $6e
- charmap "″", $6f
-
- charmap "<PO>", $70
- charmap "<KE>", $71
- charmap "◀", $71
- charmap "<``>", $72
- charmap "<''>", $73
- charmap "<ID>", $73
- charmap "№", $74
- charmap "…", $75
-
- charmap "┌", $79
- charmap "─", $7a
- charmap "┐", $7b
- charmap "│", $7c
- charmap "└", $7d
- charmap "┘", $7e
- charmap " ", $7f
-
- charmap "A", $80
- charmap "B", $81
- charmap "C", $82
- charmap "D", $83
- charmap "E", $84
- charmap "F", $85
- charmap "G", $86
- charmap "H", $87
- charmap "I", $88
- charmap "J", $89
- charmap "K", $8a
- charmap "L", $8b
- charmap "M", $8c
- charmap "N", $8d
- charmap "O", $8e
- charmap "P", $8f
- charmap "Q", $90
- charmap "R", $91
- charmap "S", $92
- charmap "T", $93
- charmap "U", $94
- charmap "V", $95
- charmap "W", $96
- charmap "X", $97
- charmap "Y", $98
- charmap "Z", $99
-
- charmap "(", $9a
- charmap ")", $9b
- charmap ":", $9c
- charmap ";", $9d
- charmap "[", $9e
- charmap "]", $9f
-
- charmap "a", $a0
- charmap "b", $a1
- charmap "c", $a2
- charmap "d", $a3
- charmap "e", $a4
- charmap "f", $a5
- charmap "g", $a6
- charmap "h", $a7
- charmap "i", $a8
- charmap "j", $a9
- charmap "k", $aa
- charmap "l", $ab
- charmap "m", $ac
- charmap "n", $ad
- charmap "o", $ae
- charmap "p", $af
- charmap "q", $b0
- charmap "r", $b1
- charmap "s", $b2
- charmap "t", $b3
- charmap "u", $b4
- charmap "v", $b5
- charmap "w", $b6
- charmap "x", $b7
- charmap "y", $b8
- charmap "z", $b9
-
- charmap "Ä", $c0
- charmap "Ö", $c1
- charmap "Ü", $c2
- charmap "ä", $c3
- charmap "ö", $c4
- charmap "ü", $c5
-
- charmap "'d", $d0
- charmap "'l", $d1
- charmap "'m", $d2
- charmap "'r", $d3
- charmap "'s", $d4
- charmap "'t", $d5
- charmap "'v", $d6
-
- charmap "←", $df
- charmap "'", $e0
- charmap "<PK>", $e1
- charmap "<MN>", $e2
- charmap "-", $e3
-
- charmap "?", $e6
- charmap "!", $e7
- charmap ".", $e8
- charmap "&", $e9
-
- charmap "é", $ea
- charmap "→", $eb
- charmap "▷", $ec
- charmap "▶", $ed
- charmap "▼", $ee
- charmap "♂", $ef
- charmap "¥", $f0
- charmap "×", $f1
- charmap "·", $f2
- charmap "/", $f3
- charmap ",", $f4
- charmap "♀", $f5
-
- charmap "0", $f6
- charmap "1", $f7
- charmap "2", $f8
- charmap "3", $f9
- charmap "4", $fa
- charmap "5", $fb
- charmap "6", $fc
- charmap "7", $fd
- charmap "8", $fe
- charmap "9", $ff
-
-; Japanese, for those bits of text that
-; were not translated to English.
+ charmap "<START>", $00
+ charmap "<PLAY_G>", $14 ; gendered PlayerName; same as "<PLAYER>" in English
+ charmap "<DAY>", $15
+ charmap "¯", $1f ; soft linebreak
+ charmap "<LNBRK>", $22
+ charmap "<KOUGEKI>", $23 ; "こうげき"
+ charmap "<POKE>", $24 ; "<PO><KE>"
+ charmap "%", $25
+ charmap "<RED>", $38 ; RedsName
+ charmap "<GREEN>", $39 ; GreensName
+ charmap "<ENEMY>", $3f
+ charmap "<MOM>", $49 ; MomsName
+ charmap "<PKMN>", $4a ; "<PK><MN>"
+ charmap "<NEXT>", $4e
+ charmap "<LINE>", $4f
+
+ charmap "@", $50 ; string terminator
+ charmap "<PARA>", $51
+ charmap "<PLAYER>", $52 ; PlayerName
+ charmap "<RIVAL>", $53
+ charmap "#", $54 ; "POKé"
+ charmap "<CONT>", $55
+ charmap "<......>", $56 ; "……"
+ charmap "<DONE>", $57
+ charmap "<PROMPT>", $58
+ charmap "<TARGET>", $59
+ charmap "<USER>", $5a
+ charmap "<PC>", $5b ; "PC"
+ charmap "<TM>", $5c ; "TM"
+ charmap "<TRNER>", $5d ; "TRAINER"
+ charmap "<ROCKET>", $5e ; "ROCKET"
+ charmap "<DEXEND>", $5f
+
+; Actual characters (from gfx/font/font_extra.png)
+
+ charmap "<BOLD_A>", $60 ; unused
+ charmap "<BOLD_B>", $61 ; unused
+ charmap "<BOLD_C>", $62 ; unused
+ charmap "<BOLD_D>", $63 ; unused
+ charmap "<BOLD_E>", $64 ; unused
+ charmap "<BOLD_F>", $65 ; unused
+ charmap "<BOLD_G>", $66 ; unused
+ charmap "<BOLD_H>", $67 ; unused
+ charmap "<BOLD_I>", $68 ; unused
+ charmap "<BOLD_V>", $69
+ charmap "<BOLD_S>", $6a
+ charmap "<BOLD_L>", $6b ; unused
+ charmap "<BOLD_M>", $6c ; unused
+ charmap "<COLON>", $6d ; colon with tinier dots than ":"
+ charmap "ぃ", $6e ; hiragana small i, unused
+ charmap "ぅ", $6f ; hiragana small u, unused
+ charmap "<PO>", $70
+ charmap "<KE>", $71
+ charmap "<``>", $72 ; opening quote
+ charmap "<''>", $73 ; closing quote
+ charmap "·", $74 ; middle dot, unused
+ charmap "…", $75 ; ellipsis
+ charmap "ぁ", $76 ; hiragana small a, unused
+ charmap "ぇ", $77 ; hiragana small e, unused
+ charmap "ぉ", $78 ; hiragana small o, unused
+
+ charmap "┌", $79
+ charmap "─", $7a
+ charmap "┐", $7b
+ charmap "│", $7c
+ charmap "└", $7d
+ charmap "┘", $7e
+ charmap " ", $7f
+
+; Actual characters (from gfx/font/font_battle_extra.png)
+
+ charmap "<LV>", $6e
+
+ charmap "<ど>", $70 ; hiragana small do, unused
+ charmap "◀", $71
+ charmap "『", $72 ; Japanese opening quote, unused
+ charmap "<ID>", $73
+ charmap "№", $74
+
+; Actual characters (from other graphics files)
+
+ charmap "|", $31 ; from gfx/stats/stats_tiles
+
+ charmap "<SHINY>", $3f ; gfx/stats/shiny
+
+ charmap "<BLACK>", $60 ; from gfx/mobile/phone_tiles.2bpp
+ charmap "▲", $61 ; gfx/font/up_arrow.png
+ charmap "<PHONE>", $62 ; gfx/font/overworld_phone_icon.2bpp
+ charmap "_", $62 ; from gfx/battle/hp_exp_bar_border.1bpp
+
+ charmap "′", $6e ; gfx/font/feet_inches.png
+ charmap "″", $6f ; gfx/font/feet_inches.png
+
+; Actual characters (from gfx/font/font.png)
+
+ charmap "A", $80
+ charmap "B", $81
+ charmap "C", $82
+ charmap "D", $83
+ charmap "E", $84
+ charmap "F", $85
+ charmap "G", $86
+ charmap "H", $87
+ charmap "I", $88
+ charmap "J", $89
+ charmap "K", $8a
+ charmap "L", $8b
+ charmap "M", $8c
+ charmap "N", $8d
+ charmap "O", $8e
+ charmap "P", $8f
+ charmap "Q", $90
+ charmap "R", $91
+ charmap "S", $92
+ charmap "T", $93
+ charmap "U", $94
+ charmap "V", $95
+ charmap "W", $96
+ charmap "X", $97
+ charmap "Y", $98
+ charmap "Z", $99
+
+ charmap "(", $9a
+ charmap ")", $9b
+ charmap ":", $9c
+ charmap ";", $9d
+ charmap "[", $9e
+ charmap "]", $9f
+
+ charmap "a", $a0
+ charmap "b", $a1
+ charmap "c", $a2
+ charmap "d", $a3
+ charmap "e", $a4
+ charmap "f", $a5
+ charmap "g", $a6
+ charmap "h", $a7
+ charmap "i", $a8
+ charmap "j", $a9
+ charmap "k", $aa
+ charmap "l", $ab
+ charmap "m", $ac
+ charmap "n", $ad
+ charmap "o", $ae
+ charmap "p", $af
+ charmap "q", $b0
+ charmap "r", $b1
+ charmap "s", $b2
+ charmap "t", $b3
+ charmap "u", $b4
+ charmap "v", $b5
+ charmap "w", $b6
+ charmap "x", $b7
+ charmap "y", $b8
+ charmap "z", $b9
+
+ charmap "Ä", $c0
+ charmap "Ö", $c1
+ charmap "Ü", $c2
+ charmap "ä", $c3
+ charmap "ö", $c4
+ charmap "ü", $c5
+
+ charmap "'d", $d0
+ charmap "'l", $d1
+ charmap "'m", $d2
+ charmap "'r", $d3
+ charmap "'s", $d4
+ charmap "'t", $d5
+ charmap "'v", $d6
+
+ charmap "←", $df
+ charmap "'", $e0
+ charmap "<PK>", $e1
+ charmap "<MN>", $e2
+ charmap "-", $e3
+
+ charmap "?", $e6
+ charmap "!", $e7
+ charmap ".", $e8
+ charmap "&", $e9
+
+ charmap "é", $ea
+ charmap "→", $eb
+ charmap "▷", $ec
+ charmap "▶", $ed
+ charmap "▼", $ee
+ charmap "♂", $ef
+ charmap "¥", $f0
+ charmap "×", $f1
+ charmap "<DOT>", $f2 ; same as "." in English
+ charmap "/", $f3
+ charmap ",", $f4
+ charmap "♀", $f5
+
+ charmap "0", $f6
+ charmap "1", $f7
+ charmap "2", $f8
+ charmap "3", $f9
+ charmap "4", $fa
+ charmap "5", $fb
+ charmap "6", $fc
+ charmap "7", $fd
+ charmap "8", $fe
+ charmap "9", $ff
+
+; Japanese kana, for those bits of text that were not translated to English
charmap "ガ", $5
charmap "ギ", $6
diff --git a/macros/code.asm b/macros/code.asm
new file mode 100644
index 000000000..93b35bd94
--- /dev/null
+++ b/macros/code.asm
@@ -0,0 +1,55 @@
+; Syntactic sugar macros
+
+lb: MACRO ; r, hi, lo
+ ld \1, (\2 & $ff) << 8 + (\3 & $ff)
+ ENDM
+
+ln: MACRO ; r, hi, lo
+ ld \1, (\2 & $f) << 4 + (\3 & $f)
+ ENDM
+
+ldpixel: MACRO
+if _NARG >= 5
+ lb \1, \2 * 8 + \4, \3 * 8 + \5
+else
+ lb \1, \2 * 8, \3 * 8
+endc
+ ENDM
+
+depixel EQUS "ldpixel de,"
+bcpixel EQUS "ldpixel bc,"
+
+
+; Design patterns
+
+jumptable: MACRO
+ ld a, [\2]
+ ld e, a
+ ld d, 0
+ ld hl, \1
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+ ENDM
+
+; Many mobile functions were dummied out in localization.
+mobile EQUS "ret"
+
+maskbits: macro
+; example usage in rejection sampling:
+; .loop
+; call Random
+; maskbits 30
+; cp 30
+; jr nc, .loop
+x = 1
+rept 8
+if \1 > x
+x = (x + 1) * 2 +- 1
+endc
+endr
+ and x
+ ENDM
diff --git a/macros/color.asm b/macros/color.asm
new file mode 100644
index 000000000..35d69fe6f
--- /dev/null
+++ b/macros/color.asm
@@ -0,0 +1,15 @@
+RGB: MACRO
+rept _NARG / 3
+ dw ((\3) << 10) + ((\2) << 5) + (\1)
+ shift
+ shift
+ shift
+endr
+ENDM
+
+palettes EQUS "* 8"
+palette EQUS "+ 8 *"
+
+palred EQUS "$0001 *"
+palgreen EQUS "$0020 *"
+palblue EQUS "$0400 *"
diff --git a/macros/coords.asm b/macros/coords.asm
new file mode 100644
index 000000000..2a672c3d0
--- /dev/null
+++ b/macros/coords.asm
@@ -0,0 +1,51 @@
+bccoord equs "coord bc,"
+decoord equs "coord de,"
+hlcoord equs "coord hl,"
+
+coord: MACRO
+; register, x, y[, origin]
+ if _NARG < 4
+ ld \1, TileMap + SCREEN_WIDTH * (\3) + (\2)
+ else
+ ld \1, \4 + SCREEN_WIDTH * (\3) + (\2)
+ endc
+ ENDM
+
+dwcoord: MACRO
+ rept _NARG / 2
+ dw TileMap + SCREEN_WIDTH * (\2) + (\1)
+ shift
+ shift
+ endr
+ ENDM
+
+ldcoord_a: MACRO
+ if _NARG < 3
+ ld [TileMap + SCREEN_WIDTH * (\2) + (\1)], a
+ else
+ ld [\3 + SCREEN_WIDTH * (\2) + (\1)], a
+ endc
+ ENDM
+
+lda_coord: MACRO
+ if _NARG < 3
+ ld a, [TileMap + SCREEN_WIDTH * (\2) + (\1)]
+ else
+ ld a, [\3 + SCREEN_WIDTH * (\2) + (\1)]
+ endc
+ ENDM
+
+
+bgrows EQUS "* $20" ; SCREEN_WIDTH
+
+hlbgcoord EQUS "bgcoord hl,"
+debgcoord EQUS "bgcoord de,"
+bcbgcoord EQUS "bgcoord bc,"
+
+bgcoord: MACRO
+IF _NARG >= 4
+ ld \1, \3 bgrows + \2 + \4
+ELSE
+ ld \1, \3 bgrows + \2 + VBGMap0
+ENDC
+ENDM
diff --git a/macros/data.asm b/macros/data.asm
new file mode 100644
index 000000000..cf4af0338
--- /dev/null
+++ b/macros/data.asm
@@ -0,0 +1,121 @@
+; Constant data (db, dw, dl) macros
+
+dwb: MACRO
+ dw \1
+ db \2
+ ENDM
+
+dbw: MACRO
+ db \1
+ dw \2
+ ENDM
+
+dbbw: MACRO
+ db \1, \2
+ dw \3
+ ENDM
+
+dbww: MACRO
+ db \1
+ dw \2, \3
+ ENDM
+
+dbwww: MACRO
+ db \1
+ dw \2, \3, \4
+ ENDM
+
+dn: MACRO ; nybbles
+ rept _NARG / 2
+ db ((\1) << 4) | (\2)
+ shift
+ shift
+ endr
+ ENDM
+
+dc: MACRO ; "crumbs"
+ rept _NARG / 4
+ db ((\1) << 6) | ((\2) << 4) | ((\3) << 2) | (\4)
+ shift
+ shift
+ shift
+ shift
+ endr
+ ENDM
+
+dx: MACRO
+x = 8 * ((\1) - 1)
+ rept \1
+ db ((\2) >> x) & $ff
+x = x + -8
+ endr
+ ENDM
+
+dt: MACRO ; three-byte (big-endian)
+ dx 3, \1
+ ENDM
+
+dd: MACRO ; four-byte (big-endian)
+ dx 4, \1
+ ENDM
+
+bigdw: MACRO ; big-endian word
+ dx 2, \1
+ ENDM
+
+dba: MACRO ; dbw bank, address
+ rept _NARG
+ dbw BANK(\1), \1
+ shift
+ endr
+ ENDM
+
+dab: MACRO ; dwb address, bank
+ rept _NARG
+ dwb \1, BANK(\1)
+ shift
+ endr
+ ENDM
+
+dba_pic: MACRO ; dbw bank, address
+ db BANK(\1) - PICS_FIX
+ dw \1
+ENDM
+
+
+dbpixel: MACRO
+if _NARG >= 4
+ db \1 * 8 + \3, \2 * 8 + \4
+else
+ db \1 * 8, \2 * 8
+endc
+endm
+
+dsprite: MACRO
+; conditional segment is there because not every instance of
+; this macro is directly OAM
+if _NARG >= 7 ; y tile, y pxl, x tile, x pxl, vtile offset, flags, palette
+ db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5, (\6 << 3) + (\7 & 7)
+else
+ db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5, \6
+endc
+endm
+
+
+sine_wave: MACRO
+; \1: amplitude
+x = 0
+ rept $20
+ ; Round up.
+ dw (sin(x) + (sin(x) & $ff)) >> 8
+x = x + (\1) * $40000
+ endr
+ENDM
+
+
+bcd: MACRO
+ rept _NARG
+ dn ((\1) % 100) / 10, (\1) % 10
+ shift
+ endr
+ENDM
diff --git a/macros/event.asm b/macros/event.asm
deleted file mode 100644
index c575b7caf..000000000
--- a/macros/event.asm
+++ /dev/null
@@ -1,1068 +0,0 @@
- enum_start
-
- enum scall_command
-scall: macro
- db scall_command
- dw \1 ; pointer
- endm
-
- enum farscall_command
-farscall: macro
- db farscall_command
- dba \1
- endm
-
- enum ptcall_command
-ptcall: macro
- db ptcall_command
- dw \1 ; pointer
- endm
-
- enum jump_command
-jump: macro
- db jump_command
- dw \1 ; pointer
- endm
-
- enum farjump_command
-farjump: macro
- db farjump_command
- dba \1
- endm
-
- enum ptjump_command
-ptjump: macro
- db ptjump_command
- dw \1 ; pointer
- endm
-
- enum if_equal_command
-if_equal: macro
- db if_equal_command
- db \1 ; byte
- dw \2 ; pointer
- endm
-
- enum if_not_equal_command
-if_not_equal: macro
- db if_not_equal_command
- db \1 ; byte
- dw \2 ; pointer
- endm
-
- enum iffalse_command
-iffalse: macro
- db iffalse_command
- dw \1 ; pointer
- endm
-
- enum iftrue_command
-iftrue: macro
- db iftrue_command
- dw \1 ; pointer
- endm
-
- enum if_greater_than_command
-if_greater_than: macro
- db if_greater_than_command
- db \1 ; byte
- dw \2 ; pointer
- endm
-
- enum if_less_than_command
-if_less_than: macro
- db if_less_than_command
- db \1 ; byte
- dw \2 ; pointer
- endm
-
- enum jumpstd_command
-jumpstd: macro
- db jumpstd_command
- dw \1 ; predefined_script
- endm
-
- enum callstd_command
-callstd: macro
- db callstd_command
- dw \1 ; predefined_script
- endm
-
- enum callasm_command
-callasm: macro
- db callasm_command
- dba \1
- endm
-
- enum special_command
-special: macro
- db special_command
- dw (\1Special - SpecialsPointers) / 3
- endm
-
-add_special: MACRO
-\1Special::
- dba \1
-ENDM
-
- enum ptcallasm_command
-ptcallasm: macro
- db ptcallasm_command
- dw \1 ; asm
- endm
-
- enum checkmaptriggers_command
-checkmaptriggers: macro
- db checkmaptriggers_command
- map \1 ; map
- endm
-
- enum domaptrigger_command
-domaptrigger: macro
- db domaptrigger_command
- map \1 ; map
- db \2 ; trigger_id
- endm
-
- enum checktriggers_command
-checktriggers: macro
- db checktriggers_command
- endm
-
- enum dotrigger_command
-dotrigger: macro
- db dotrigger_command
- db \1 ; trigger_id
- endm
-
- enum writebyte_command
-writebyte: macro
- db writebyte_command
- db \1 ; value
- endm
-
- enum addvar_command
-addvar: macro
- db addvar_command
- db \1 ; value
- endm
-
- enum random_command
-random: macro
- db random_command
- db \1 ; input
- endm
-
- enum checkver_command
-checkver: macro
- db checkver_command
- endm
-
- enum copybytetovar_command
-copybytetovar: macro
- db copybytetovar_command
- dw \1 ; address
- endm
-
- enum copyvartobyte_command
-copyvartobyte: macro
- db copyvartobyte_command
- dw \1 ; address
- endm
-
- enum loadvar_command
-loadvar: macro
- db loadvar_command
- dw \1 ; address
- db \2 ; value
- endm
-
- enum checkcode_command
-checkcode: macro
- db checkcode_command
- db \1 ; variable_id
- endm
-
- enum writevarcode_command
-writevarcode: macro
- db writevarcode_command
- db \1 ; variable_id
- endm
-
- enum writecode_command
-writecode: macro
- db writecode_command
- db \1 ; variable_id
- db \2 ; value
- endm
-
- enum giveitem_command
-giveitem: macro
- db giveitem_command
- db \1 ; item
-if _NARG == 2
- db \2 ; quantity
-else
- db 1
-endc
- endm
-
- enum takeitem_command
-takeitem: macro
- db takeitem_command
- db \1 ; item
-if _NARG == 2
- db \2 ; quantity
-else
- db 1
-endc
- endm
-
- enum checkitem_command
-checkitem: macro
- db checkitem_command
- db \1 ; item
- endm
-
- enum givemoney_command
-givemoney: macro
- db givemoney_command
- db \1 ; account
- dt \2 ; money
- endm
-
- enum takemoney_command
-takemoney: macro
- db takemoney_command
- db \1 ; account
- dt \2 ; money
- endm
-
- enum checkmoney_command
-checkmoney: macro
- db checkmoney_command
- db \1 ; account
- dt \2 ; money
- endm
-
- enum givecoins_command
-givecoins: macro
- db givecoins_command
- dw \1 ; coins
- endm
-
- enum takecoins_command
-takecoins: macro
- db takecoins_command
- dw \1 ; coins
- endm
-
- enum checkcoins_command
-checkcoins: macro
- db checkcoins_command
- dw \1 ; coins
- endm
-
- enum addcellnum_command
-addcellnum: macro
- db addcellnum_command
- db \1 ; person
- endm
-
- enum delcellnum_command
-delcellnum: macro
- db delcellnum_command
- db \1 ; person
- endm
-
- enum checkcellnum_command
-checkcellnum: macro
- db checkcellnum_command
- db \1 ; person
- endm
-
- enum checktime_command
-checktime: macro
- db checktime_command
- db \1 ; time
- endm
-
-checkmorn EQUS "checktime 1 << MORN"
-checkday EQUS "checktime 1 << DAY"
-checknite EQUS "checktime 1 << NITE"
-
- enum checkpoke_command
-checkpoke: macro
- db checkpoke_command
- db \1 ; pkmn
- endm
-
- enum givepoke_command
-givepoke: macro
- db givepoke_command
- db \1 ; pokemon
- db \2 ; level
- if _NARG >= 3
- db \3 ; item
- if _NARG >= 4
- db \4 ; trainer
- if \4
- dw \5 ; trainer_name_pointer
- dw \6 ; pkmn_nickname
- endc
- else
- db 0
- endc
- else
- db 0, 0
- endc
- endm
-
- enum giveegg_command
-giveegg: macro
- db giveegg_command
- db \1 ; pkmn
- db \2 ; level
- endm
-
- enum givepokeitem_command
-givepokeitem: macro
- db givepokeitem_command
- dw \1 ; pointer
- endm
-
- enum checkpokeitem_command
-checkpokeitem: macro
- db checkpokeitem_command
- dw \1 ; pointer
- endm
-
- enum checkevent_command
-checkevent: macro
- db checkevent_command
- dw \1 ; event_flag
- endm
-
- enum clearevent_command
-clearevent: macro
- db clearevent_command
- dw \1 ; event_flag
- endm
-
- enum setevent_command
-setevent: macro
- db setevent_command
- dw \1 ; event_flag
- endm
-
- enum checkflag_command
-checkflag: macro
- db checkflag_command
- dw \1 ; engine_flag
- endm
-
- enum clearflag_command
-clearflag: macro
- db clearflag_command
- dw \1 ; engine_flag
- endm
-
- enum setflag_command
-setflag: macro
- db setflag_command
- dw \1 ; engine_flag
- endm
-
- enum wildon_command
-wildon: macro
- db wildon_command
- endm
-
- enum wildoff_command
-wildoff: macro
- db wildoff_command
- endm
-
- enum xycompare_command
-xycompare: macro
- db xycompare_command
- dw \1 ; pointer
- endm
-
- enum warpmod_command
-warpmod: macro
- db warpmod_command
- db \1 ; warp_id
- map \2 ; map
- endm
-
- enum blackoutmod_command
-blackoutmod: macro
- db blackoutmod_command
- map \1 ; map
- endm
-
- enum warp_command
-warp: macro
- db warp_command
- map \1 ; map
- db \2 ; x
- db \3 ; y
- endm
-
- enum readmoney_command
-readmoney: macro
- db readmoney_command
- db \1 ; account
- db \2 ; memory
- endm
-
- enum readcoins_command
-readcoins: macro
- db readcoins_command
- db \1 ; memory
- endm
-
- enum RAM2MEM_command
-RAM2MEM: macro
- db RAM2MEM_command
- db \1 ; memory
- endm
-
- enum pokenamemem_command
-pokenamemem: macro
- db pokenamemem_command
- db \1 ; pokemon
- db \2 ; memory
- endm
-
- enum itemtotext_command
-itemtotext: macro
- db itemtotext_command
- db \1 ; item
- db \2 ; memory
- endm
-
- enum mapnametotext_command
-mapnametotext: macro
- db mapnametotext_command
- db \1 ; memory
- endm
-
- enum trainertotext_command
-trainertotext: macro
- db trainertotext_command
- db \1 ; trainer_id
- db \2 ; trainer_group
- db \3 ; memory
- endm
-
- enum stringtotext_command
-stringtotext: macro
- db stringtotext_command
- dw \1 ; text_pointer
- db \2 ; memory
- endm
-
- enum itemnotify_command
-itemnotify: macro
- db itemnotify_command
- endm
-
- enum pocketisfull_command
-pocketisfull: macro
- db pocketisfull_command
- endm
-
- enum opentext_command
-opentext: macro
- db opentext_command
- endm
-
- enum refreshscreen_command
-refreshscreen: macro
- db refreshscreen_command
- db \1 ; dummy
- endm
-
- enum closetext_command
-closetext: macro
- db closetext_command
- endm
-
- enum loadbytec2cf_command
-loadbytec2cf: macro
- db loadbytec2cf_command
- db \1 ; byte
- endm
-
- enum farwritetext_command
-farwritetext: macro
- db farwritetext_command
- dba \1
- endm
-
- enum writetext_command
-writetext: macro
- db writetext_command
- dw \1 ; text_pointer
- endm
-
- enum repeattext_command
-repeattext: macro
- db repeattext_command
- db \1 ; byte
- db \2 ; byte
- endm
-
- enum yesorno_command
-yesorno: macro
- db yesorno_command
- endm
-
- enum loadmenudata_command
-loadmenudata: macro
- db loadmenudata_command
- dw \1 ; data
- endm
-
- enum closewindow_command
-closewindow: macro
- db closewindow_command
- endm
-
- enum jumptextfaceplayer_command
-jumptextfaceplayer: macro
- db jumptextfaceplayer_command
- dw \1 ; text_pointer
- endm
-
-; IF _CRYSTAL
- enum farjumptext_command
-farjumptext: macro
- db farjumptext_command
- dba \1
- endm
-; ENDC
-
- enum jumptext_command
-jumptext: macro
- db jumptext_command
- dw \1 ; text_pointer
- endm
-
- enum waitbutton_command
-waitbutton: macro
- db waitbutton_command
- endm
-
- enum buttonsound_command
-buttonsound: macro
- db buttonsound_command
- endm
-
- enum pokepic_command
-pokepic: macro
- db pokepic_command
- db \1 ; pokemon
- endm
-
- enum closepokepic_command
-closepokepic: macro
- db closepokepic_command
- endm
-
- enum _2dmenu_command
-_2dmenu: macro
- db _2dmenu_command
- endm
-
- enum verticalmenu_command
-verticalmenu: macro
- db verticalmenu_command
- endm
-
- enum loadpikachudata_command
-loadpikachudata: macro
- db loadpikachudata_command
- endm
-
- enum randomwildmon_command
-randomwildmon: macro
- db randomwildmon_command
- endm
-
- enum loadmemtrainer_command
-loadmemtrainer: macro
- db loadmemtrainer_command
- endm
-
- enum loadwildmon_command
-loadwildmon: macro
- db loadwildmon_command
- db \1 ; pokemon
- db \2 ; level
- endm
-
- enum loadtrainer_command
-loadtrainer: macro
- db loadtrainer_command
- db \1 ; trainer_group
- db \2 ; trainer_id
- endm
-
- enum startbattle_command
-startbattle: macro
- db startbattle_command
- endm
-
- enum reloadmapafterbattle_command
-reloadmapafterbattle: macro
- db reloadmapafterbattle_command
- endm
-
- enum catchtutorial_command
-catchtutorial: macro
- db catchtutorial_command
- db \1 ; byte
- endm
-
- enum trainertext_command
-trainertext: macro
- db trainertext_command
- db \1 ; which_text
- endm
-
- enum trainerflagaction_command
-trainerflagaction: macro
- db trainerflagaction_command
- db \1 ; action
- endm
-
- enum winlosstext_command
-winlosstext: macro
- db winlosstext_command
- dw \1 ; win_text_pointer
- dw \2 ; loss_text_pointer
- endm
-
- enum scripttalkafter_command
-scripttalkafter: macro
- db scripttalkafter_command
- endm
-
- enum end_if_just_battled_command
-end_if_just_battled: macro
- db end_if_just_battled_command
- endm
-
- enum check_just_battled_command
-check_just_battled: macro
- db check_just_battled_command
- endm
-
- enum setlasttalked_command
-setlasttalked: macro
- db setlasttalked_command
- db \1 ; person
- endm
-
- enum applymovement_command
-applymovement: macro
- db applymovement_command
- db \1 ; person
- dw \2 ; data
- endm
-
- enum applymovement2_command
-applymovement2: macro
- db applymovement2_command
- dw \1 ; data
- endm
-
- enum faceplayer_command
-faceplayer: macro
- db faceplayer_command
- endm
-
- enum faceperson_command
-faceperson: macro
- db faceperson_command
- db \1 ; person1
- db \2 ; person2
- endm
-
- enum variablesprite_command
-variablesprite: macro
- db variablesprite_command
- db \1 - SPRITE_VARS ; byte
- db \2 ; sprite
- endm
-
- enum disappear_command
-disappear: macro
- db disappear_command
- db \1 ; person
- endm
-
- enum appear_command
-appear: macro
- db appear_command
- db \1 ; person
- endm
-
- enum follow_command
-follow: macro
- db follow_command
- db \1 ; person2
- db \2 ; person1
- endm
-
- enum stopfollow_command
-stopfollow: macro
- db stopfollow_command
- endm
-
- enum moveperson_command
-moveperson: macro
- db moveperson_command
- db \1 ; person
- db \2 ; x
- db \3 ; y
- endm
-
- enum writepersonxy_command
-writepersonxy: macro
- db writepersonxy_command
- db \1 ; person
- endm
-
- enum loademote_command
-loademote: macro
- db loademote_command
- db \1 ; bubble
- endm
-
- enum showemote_command
-showemote: macro
- db showemote_command
- db \1 ; bubble
- db \2 ; person
- db \3 ; time
- endm
-
- enum spriteface_command
-spriteface: macro
- db spriteface_command
- db \1 ; person
- db \2 ; facing
- endm
-
- enum follownotexact_command
-follownotexact: macro
- db follownotexact_command
- db \1 ; person2
- db \2 ; person1
- endm
-
- enum earthquake_command
-earthquake: macro
- db earthquake_command
- db \1 ; param
- endm
-
- enum changemap_command
-changemap: macro
- db changemap_command
- db \1 ; map_bank
- dw \2 ; map_data_pointer
- endm
-
- enum changeblock_command
-changeblock: macro
- db changeblock_command
- db \1 ; x
- db \2 ; y
- db \3 ; block
- endm
-
- enum reloadmap_command
-reloadmap: macro
- db reloadmap_command
- endm
-
- enum reloadmappart_command
-reloadmappart: macro
- db reloadmappart_command
- endm
-
- enum writecmdqueue_command
-writecmdqueue: macro
- db writecmdqueue_command
- dw \1 ; queue_pointer
- endm
-
- enum delcmdqueue_command
-delcmdqueue: macro
- db delcmdqueue_command
- db \1 ; byte
- endm
-
- enum playmusic_command
-playmusic: macro
- db playmusic_command
- dw \1 ; music_pointer
- endm
-
- enum encountermusic_command
-encountermusic: macro
- db encountermusic_command
- endm
-
- enum musicfadeout_command
-musicfadeout: macro
- db musicfadeout_command
- dw \1 ; music
- db \2 ; fadetime
- endm
-
- enum playmapmusic_command
-playmapmusic: macro
- db playmapmusic_command
- endm
-
- enum dontrestartmapmusic_command
-dontrestartmapmusic: macro
- db dontrestartmapmusic_command
- endm
-
- enum cry_command
-cry: macro
- db cry_command
- dw \1 ; cry_id
- endm
-
- enum playsound_command
-playsound: macro
- db playsound_command
- dw \1 ; sound_pointer
- endm
-
- enum waitsfx_command
-waitsfx: macro
- db waitsfx_command
- endm
-
- enum warpsound_command
-warpsound: macro
- db warpsound_command
- endm
-
- enum specialsound_command
-specialsound: macro
- db specialsound_command
- endm
-
- enum passtoengine_command
-passtoengine: macro
- db passtoengine_command
- db \1 ; data_pointer
- endm
-
- enum newloadmap_command
-newloadmap: macro
- db newloadmap_command
- db \1 ; which_method
- endm
-
- enum pause_command
-pause: macro
- db pause_command
- db \1 ; length
- endm
-
- enum deactivatefacing_command
-deactivatefacing: macro
- db deactivatefacing_command
- db \1 ; time
- endm
-
- enum priorityjump_command
-priorityjump: macro
- db priorityjump_command
- dw \1 ; pointer
- endm
-
- enum warpcheck_command
-warpcheck: macro
- db warpcheck_command
- endm
-
- enum ptpriorityjump_command
-ptpriorityjump: macro
- db ptpriorityjump_command
- dw \1 ; pointer
- endm
-
- enum return_command
-return: macro
- db return_command
- endm
-
- enum end_command
-end: macro
- db end_command
- endm
-
- enum reloadandreturn_command
-reloadandreturn: macro
- db reloadandreturn_command
- db \1 ; which_method
- endm
-
- enum end_all_command
-end_all: macro
- db end_all_command
- endm
-
- enum pokemart_command
-pokemart: macro
- db pokemart_command
- db \1 ; dialog_id
- dw \2 ; mart_id
- endm
-
- enum elevator_command
-elevator: macro
- db elevator_command
- dw \1 ; floor_list_pointer
- endm
-
- enum trade_command
-trade: macro
- db trade_command
- db \1 ; trade_id
- endm
-
- enum askforphonenumber_command
-askforphonenumber: macro
- db askforphonenumber_command
- db \1 ; number
- endm
-
- enum phonecall_command
-phonecall: macro
- db phonecall_command
- dw \1 ; caller_name
- endm
-
- enum hangup_command
-hangup: macro
- db hangup_command
- endm
-
- enum describedecoration_command
-describedecoration: macro
- db describedecoration_command
- db \1 ; byte
- endm
-
- enum fruittree_command
-fruittree: macro
- db fruittree_command
- db \1 ; tree_id
- endm
-
- enum specialphonecall_command
-specialphonecall: macro
- db specialphonecall_command
- dw \1 ; call_id
- endm
-
- enum checkphonecall_command
-checkphonecall: macro
- db checkphonecall_command
- endm
-
- enum verbosegiveitem_command
-verbosegiveitem: macro
- db verbosegiveitem_command
- db \1 ; item
-if _NARG == 2
- db \2 ; quantity
-else
- db 1
-endc
- endm
-
- enum verbosegiveitem2_command
-verbosegiveitem2: macro
- db verbosegiveitem2_command
- db \1 ; item
- db \2 ; var
- endm
-
- enum swarm_command
-swarm: macro
- db swarm_command
- db \1 ; flag
- map \2 ; map
- endm
-
- enum halloffame_command
-halloffame: macro
- db halloffame_command
- endm
-
- enum credits_command
-credits: macro
- db credits_command
- endm
-
- enum warpfacing_command
-warpfacing: macro
- db warpfacing_command
- db \1 ; facing
- map \2 ; map
- db \3 ; x
- db \4 ; y
- endm
-
- enum battletowertext_command
-battletowertext: macro
- db battletowertext_command
- db \1 ; memory
- endm
-
- enum landmarktotext_command
-landmarktotext: macro
- db landmarktotext_command
- db \1 ; id
- db \2 ; memory
- endm
-
- enum trainerclassname_command
-trainerclassname: macro
- db trainerclassname_command
- db \1 ; id
- db \2 ; memory
- endm
-
- enum name_command
-name: macro
- db name_command
- db \1 ; type
- db \2 ; id
- db \3 ; memory
- endm
-
- enum wait_command
-wait: macro
- db wait_command
- db \1 ; duration
- endm
-
- enum check_save_command
-check_save: macro
- db check_save_command
- endm
diff --git a/macros/map.asm b/macros/map.asm
deleted file mode 100644
index 2e8765770..000000000
--- a/macros/map.asm
+++ /dev/null
@@ -1,189 +0,0 @@
-map: MACRO
- db GROUP_\1, MAP_\1
-ENDM
-
-roam_map: MACRO
-; A map and an arbitrary number of some more maps.
-
- map \1
- db \2
-
- rept \2
- map \3
- shift
- endr
-
- db 0
-ENDM
-
-person_event: macro
- db \1 ; sprite
- db \2 + 4 ; y
- db \3 + 4 ; x
- db \4 ; movement function
- dn \5, \6 ; radius: y, x
- db \7 ; clock_hour
- db \8 ; clock_daytime
- shift
- dn \8, \9 ; color_function
- shift
- db \9 ; sight_range
- shift
- dw \9 ; pointer
- shift
- dw \9 ; event flag
- endm
-
-signpost: macro
- db \1 ; y
- db \2 ; x
- db \3 ; function
- dw \4 ; pointer
- endm
-
-xy_trigger: macro
- db \1 ; number
- db \2 ; y
- db \3 ; x
- db \4 ; unknown1
- dw \5 ; script
- db \6 ; unknown2
- db \7 ; unknown3
- endm
-
-warp_def: macro
- db \1 ; y
- db \2 ; x
- db \3 ; warp_to
- map \4 ; map
- endm
-
-
-map_header: MACRO
- ; label, tileset, permission, location, music, phone service flag, time of day, fishing group
-\1_MapHeader:
- db BANK(\1_SecondMapHeader), \2, \3
- dw \1_SecondMapHeader
- db \4, \5
- dn \6, \7
- db \8
-ENDM
-
-
-map_header_2: MACRO
-; label, map, border block, connections
-\1_SecondMapHeader::
- db \3
- db \2_HEIGHT, \2_WIDTH
- db BANK(\1_BlockData)
- dw \1_BlockData
- db BANK(\1_MapScriptHeader)
- dw \1_MapScriptHeader
- dw \1_MapEventHeader
- db \4
-ENDM
-
-connection: MACRO
-if "\1" == "north"
-;\2: map id
-;\3: map label (eventually will be rolled into map id)
-;\4: x
-;\5: offset?
-;\6: strip length
-;\7: this map id
- map \2
- dw \3_BlockData + \2_WIDTH * (\2_HEIGHT - 3) + \5
- dw OverworldMap + \4 + 3
- db \6
- db \2_WIDTH
- db \2_HEIGHT * 2 - 1
- db (\4 - \5) * -2
- dw OverworldMap + \2_HEIGHT * (\2_WIDTH + 6) + 1
-endc
-
-if "\1" == "south"
-;\2: map id
-;\3: map label (eventually will be rolled into map id)
-;\4: x
-;\5: offset?
-;\6: strip length
-;\7: this map id
- map \2
- dw \3_BlockData + \5
- dw OverworldMap + (\7_HEIGHT + 3) * (\7_WIDTH + 6) + \4 + 3
- db \6
- db \2_WIDTH
- db 0
- db (\4 - \5) * -2
- dw OverworldMap + \2_WIDTH + 7
-endc
-
-if "\1" == "west"
-;\2: map id
-;\3: map label (eventually will be rolled into map id)
-;\4: y
-;\5: offset?
-;\6: strip length
-;\7: this map id
- map \2
- dw \3_BlockData + (\2_WIDTH * \5) + \2_WIDTH - 3
- dw OverworldMap + (\7_WIDTH + 6) * (\4 + 3)
- db \6
- db \2_WIDTH
- db (\4 - \5) * -2
- db \2_WIDTH * 2 - 1
- dw OverworldMap + \2_WIDTH * 2 + 6
-endc
-
-if "\1" == "east"
-;\2: map id
-;\3: map label (eventually will be rolled into map id)
-;\4: y
-;\5: offset?
-;\6: strip length
-;\7: this map id
- map \2
- dw \3_BlockData + (\2_WIDTH * \5)
- dw OverworldMap + (\7_WIDTH + 6) * (\4 + 3 + 1) - 3
- db \6
- db \2_WIDTH
- db (\4 - \5) * -2
- db 0
- dw OverworldMap + \2_WIDTH + 7
-endc
-
-ENDM
-
-mapgroup: MACRO
-GROUP_\1 EQU const_value
- enum MAP_\1
-\1_HEIGHT EQU \2
-\1_WIDTH EQU \3
-ENDM
-
-newgroup: MACRO
-const_value = const_value + 1
- enum_start 1
-ENDM
-
-elevfloor: MACRO
- db \1, \2
- map \3
-ENDM
-
-itemball: MACRO
-if _NARG == 2
- db \1, \2
-else
- db \1, 1
-endc
-endm
-
-stonetable: MACRO
- db \1, \2
- dw \3
-endm
-
-maptrigger: MACRO
- dw \1, 0
-endm
diff --git a/macros/mobile.asm b/macros/mobile.asm
deleted file mode 100644
index 06b40d694..000000000
--- a/macros/mobile.asm
+++ /dev/null
@@ -1,2 +0,0 @@
-; Many mobile functions were dummied out in localization.
-mobile EQUS "ret"
diff --git a/macros/move_anim.asm b/macros/move_anim.asm
deleted file mode 100644
index c795f561e..000000000
--- a/macros/move_anim.asm
+++ /dev/null
@@ -1,293 +0,0 @@
-anim_wait: macro
-if \1 >= $d0
- flip out
-endc
- db \1
- endm
-
- enum_start $d0
-
- enum anim_obj_command ; d0
-anim_obj: macro
- db anim_obj_command
- db \1 ; obj
- db (\2 << 3) + \3 ; x
- db (\4 << 3) + \5 ; y
- db \6 ; param
- endm
-
- enum anim_1gfx_command ; d1
-anim_1gfx: macro
- db anim_1gfx_command
- db \1 ; gfx1
- endm
-
- enum anim_2gfx_command ; d2
-anim_2gfx: macro
- db anim_2gfx_command
- db \1 ; gfx1
- db \2 ; gfx2
- endm
-
- enum anim_3gfx_command ; d3
-anim_3gfx: macro
- db anim_3gfx_command
- db \1 ; gfx1
- db \2 ; gfx2
- db \3 ; gfx3
- endm
-
- enum anim_4gfx_command ; d4
-anim_4gfx: macro
- db anim_4gfx_command
- db \1 ; gfx1
- db \2 ; gfx2
- db \3 ; gfx3
- db \4 ; gfx4
- endm
-
- enum anim_5gfx_command ; d5
-anim_5gfx: macro
- db anim_5gfx_command
- db \1 ; gfx1
- db \2 ; gfx2
- db \3 ; gfx3
- db \4 ; gfx4
- db \5 ; gfx5
- endm
-
- enum anim_incobj_command ; d6
-anim_incobj: macro
- db anim_incobj_command
- db \1 ; id
- endm
-
- enum anim_setobj_command ; d7
-anim_setobj: macro
- db anim_setobj_command
- db \1 ; id
- db \2 ; obj
- endm
-
- enum anim_incbgeffect_command ; d8
-anim_incbgeffect: macro
- db anim_incbgeffect_command
- db \1 ; effect
- endm
-
- enum anim_enemyfeetobj_command ; d9
-anim_enemyfeetobj: macro
- db anim_enemyfeetobj_command
- endm
-
- enum anim_playerheadobj_command ; da
-anim_playerheadobj: macro
- db anim_playerheadobj_command
- endm
-
- enum anim_checkpokeball_command ; db
-anim_checkpokeball: macro
- db anim_checkpokeball_command
- endm
-
- enum anim_transform_command ; dc
-anim_transform: macro
- db anim_transform_command
- endm
-
- enum anim_raisesub_command ; dd
-anim_raisesub: macro
- db anim_raisesub_command
- endm
-
- enum anim_dropsub_command ; de
-anim_dropsub: macro
- db anim_dropsub_command
- endm
-
- enum anim_resetobp0_command ; df
-anim_resetobp0: macro
- db anim_resetobp0_command
- endm
-
- enum anim_sound_command ; e0
-anim_sound: macro
- db anim_sound_command
- db (\1 << 2) | \2 ; duration, tracks
- db \3 ; id
- endm
-
- enum anim_cry_command ; e1
-anim_cry: macro
- db anim_cry_command
- db \1 ; pitch
- endm
-
- enum anim_minimizeopp_command ; e2
-anim_minimizeopp: macro
- db anim_minimizeopp_command
- endm
-
- enum anim_oamon_command ; e3
-anim_oamon: macro
- db anim_oamon_command
- endm
-
- enum anim_oamoff_command ; e4
-anim_oamoff: macro
- db anim_oamoff_command
- endm
-
- enum anim_clearobjs_command ; e5
-anim_clearobjs: macro
- db anim_clearobjs_command
- endm
-
- enum anim_beatup_command ; e6
-anim_beatup: macro
- db anim_beatup_command
- endm
-
- enum anim_0xe7_command ; e7
-anim_0xe7: macro
- db anim_0xe7_command
- endm
-
- enum anim_updateactorpic_command ; e8
-anim_updateactorpic: macro
- db anim_updateactorpic_command
- endm
-
- enum anim_minimize_command ; e9
-anim_minimize: macro
- db anim_minimize_command
- endm
-
- enum anim_0xea_command ; ea
-anim_0xea: macro
- db anim_0xea_command
- endm
-
- enum anim_0xeb_command ; eb
-anim_0xeb: macro
- db anim_0xeb_command
- endm
-
- enum anim_0xec_command ; ec
-anim_0xec: macro
- db anim_0xec_command
- endm
-
- enum anim_0xed_command ; ed
-anim_0xed: macro
- db anim_0xed_command
- endm
-
- enum anim_if_param_and_command ; ee
-anim_if_param_and: macro
- db anim_if_param_and_command
- db \1 ; value
- dw \2 ; address
- endm
-
- enum anim_jumpuntil_command ; ef
-anim_jumpuntil: macro
- db anim_jumpuntil_command
- dw \1 ; address
- endm
-
- enum anim_bgeffect_command ; f0
-anim_bgeffect: macro
- db anim_bgeffect_command
- db \1 ; effect
- db \2 ; unknown
- db \3 ; unknown
- db \4 ; unknown
- endm
-
- enum anim_bgp_command ; f1
-anim_bgp: macro
- db anim_bgp_command
- db \1 ; colors
- endm
-
- enum anim_obp0_command ; f2
-anim_obp0: macro
- db anim_obp0_command
- db \1 ; colors
- endm
-
- enum anim_obp1_command ; f3
-anim_obp1: macro
- db anim_obp1_command
- db \1 ; colors
- endm
-
- enum anim_clearsprites_command ; f4
-anim_clearsprites: macro
- db anim_clearsprites_command
- endm
-
- enum anim_0xf5_command ; f5
-anim_0xf5: macro
- db anim_0xf5_command
- endm
-
- enum anim_0xf6_command ; f6
-anim_0xf6: macro
- db anim_0xf6_command
- endm
-
- enum anim_0xf7_command ; f7
-anim_0xf7: macro
- db anim_0xf7_command
- endm
-
- enum anim_if_param_equal_command ; f8
-anim_if_param_equal: macro
- db anim_if_param_equal_command
- db \1 ; value
- dw \2 ; address
- endm
-
- enum anim_setvar_command ; f9
-anim_setvar: macro
- db anim_setvar_command
- db \1 ; value
- endm
-
- enum anim_incvar_command ; fa
-anim_incvar: macro
- db anim_incvar_command
- endm
-
- enum anim_if_var_equal_command ; fb
-anim_if_var_equal: macro
- db anim_if_var_equal_command
- db \1 ; value
- dw \2 ; address
- endm
-
- enum anim_jump_command ; fc
-anim_jump: macro
- db anim_jump_command
- dw \1 ; address
- endm
-
- enum anim_loop_command ; fd
-anim_loop: macro
- db anim_loop_command
- db \1 ; count
- dw \2 ; address
- endm
-
- enum anim_call_command ; fe
-anim_call: macro
- db anim_call_command
- dw \1 ; address
- endm
-
- enum anim_ret_command ; ff
-anim_ret: macro
- db anim_ret_command
- endm
diff --git a/macros/move_effect.asm b/macros/move_effect.asm
deleted file mode 100644
index d3761c9a1..000000000
--- a/macros/move_effect.asm
+++ /dev/null
@@ -1,186 +0,0 @@
-command: macro
- enum \1_command
-\1 equs "db \1_command"
-endm
-
- enum_start 1
-
- command checkturn ; 01
- command checkobedience ; 02
- command usedmovetext ; 03
- command doturn ; 04
- command critical ; 05
- command damagestats ; 06
- command stab ; 07
- command damagevariation ; 08
- command checkhit ; 09
- command lowersub ; 0a
- command hittargetnosub ; 0b
- command raisesub ; 0c
- command failuretext ; 0d
- command checkfaint ; 0e
- command criticaltext ; 0f
- command supereffectivetext ; 10
- command checkdestinybond ; 11
- command buildopponentrage ; 12
- command poisontarget ; 13
- command sleeptarget ; 14
- command draintarget ; 15
- command eatdream ; 16
- command burntarget ; 17
- command freezetarget ; 18
- command paralyzetarget ; 19
- command selfdestruct ; 1a
- command mirrormove ; 1b
- command statup ; 1c
- command statdown ; 1d
- command payday ; 1e
- command conversion ; 1f
- command resetstats ; 20
- command storeenergy ; 21
- command unleashenergy ; 22
- command forceswitch ; 23
- command endloop ; 24
- command flinchtarget ; 25
- command ohko ; 26
- command recoil ; 27
- command mist ; 28
- command focusenergy ; 29
- command confuse ; 2a
- command confusetarget ; 2b
- command heal ; 2c
- command transform ; 2d
- command screen ; 2e
- command poison ; 2f
- command paralyze ; 30
- command substitute ; 31
- command rechargenextturn ; 32
- command mimic ; 33
- command metronome ; 34
- command leechseed ; 35
- command splash ; 36
- command disable ; 37
- command cleartext ; 38
- command charge ; 39
- command checkcharge ; 3a
- command traptarget ; 3b
- command effect0x3c ; 3c
- command rampage ; 3d
- command checkrampage ; 3e
- command constantdamage ; 3f
- command counter ; 40
- command encore ; 41
- command painsplit ; 42
- command snore ; 43
- command conversion2 ; 44
- command lockon ; 45
- command sketch ; 46
- command defrostopponent ; 47
- command sleeptalk ; 48
- command destinybond ; 49
- command spite ; 4a
- command falseswipe ; 4b
- command healbell ; 4c
- command kingsrock ; 4d
- command triplekick ; 4e
- command kickcounter ; 4f
- command thief ; 50
- command arenatrap ; 51
- command nightmare ; 52
- command defrost ; 53
- command curse ; 54
- command protect ; 55
- command spikes ; 56
- command foresight ; 57
- command perishsong ; 58
- command startsandstorm ; 59
- command endure ; 5a
- command checkcurl ; 5b
- command rolloutpower ; 5c
- command effect0x5d ; 5d
- command furycutter ; 5e
- command attract ; 5f
- command happinesspower ; 60
- command present ; 61
- command damagecalc ; 62
- command frustrationpower ; 63
- command safeguard ; 64
- command checksafeguard ; 65
- command getmagnitude ; 66
- command batonpass ; 67
- command pursuit ; 68
- command clearhazards ; 69
- command healmorn ; 6a
- command healday ; 6b
- command healnite ; 6c
- command hiddenpower ; 6d
- command startrain ; 6e
- command startsun ; 6f
- command attackup ; 70
- command defenseup ; 71
- command speedup ; 72
- command specialattackup ; 73
- command specialdefenseup ; 74
- command accuracyup ; 75
- command evasionup ; 76
- command attackup2 ; 77
- command defenseup2 ; 78
- command speedup2 ; 79
- command specialattackup2 ; 7a
- command specialdefenseup2 ; 7b
- command accuracyup2 ; 7c
- command evasionup2 ; 7d
- command attackdown ; 7e
- command defensedown ; 7f
- command speeddown ; 80
- command specialattackdown ; 81
- command specialdefensedown ; 82
- command accuracydown ; 83
- command evasiondown ; 84
- command attackdown2 ; 85
- command defensedown2 ; 86
- command speeddown2 ; 87
- command specialattackdown2 ; 88
- command specialdefensedown2 ; 89
- command accuracydown2 ; 8a
- command evasiondown2 ; 8b
- command statupmessage ; 8c
- command statdownmessage ; 8d
- command statupfailtext ; 8e
- command statdownfailtext ; 8f
- command effectchance ; 90
- command statdownanim ; 91
- command statupanim ; 92
- command switchturn ; 93
- command fakeout ; 94
- command bellydrum ; 95
- command psychup ; 96
- command rage ; 97
- command doubleflyingdamage ; 98
- command doubleundergrounddamage ; 99
- command mirrorcoat ; 9a
- command checkfuturesight ; 9b
- command futuresight ; 9c
- command doubleminimizedamage ; 9d
- command skipsuncharge ; 9e
- command thunderaccuracy ; 9f
- command teleport ; a0
- command beatup ; a1
- command ragedamage ; a2
- command resettypematchup ; a3
- command allstatsup ; a4
- command effect0xa5 ; a5
- command raisesubnoanim ; a6
- command lowersubnoanim ; a7
- command effect0xa8 ; a8
- command clearmissdamage ; a9
- command movedelay ; aa
- command hittarget ; ab
- command tristatuschance ; ac
- command supereffectivelooptext ; ad
- command startloop ; ae
- command curl ; af
-
- enum_start -1, -1
- command endmove
- command endturn
diff --git a/macros/movement.asm b/macros/movement.asm
deleted file mode 100644
index 53b8bf107..000000000
--- a/macros/movement.asm
+++ /dev/null
@@ -1,246 +0,0 @@
- enum_start
-
-; Directional movements
-
- enum movement_turn_head
-turn_head: macro
- db movement_turn_head | \1 ; $00
- endm
-
-__enum__ = __enum__ + 3
-
- enum movement_turn_step
-turn_step: macro
- db movement_turn_step | \1 ; $04
- endm
-
-__enum__ = __enum__ + 3
-
- enum movement_slow_step
-slow_step: macro
- db movement_slow_step | \1; $08
- endm
-
-__enum__ = __enum__ + 3
-
- enum movement_step
-step: macro
- db movement_step | \1 ; $0c
- endm
-
-__enum__ = __enum__ + 3
-
- enum movement_big_step
-big_step: macro
- db movement_big_step | \1 ; $10
- endm
-
-__enum__ = __enum__ + 3
-
- enum movement_slow_slide_step
-slow_slide_step: macro
- db movement_slow_slide_step | \1 ; $14
- endm
-
-__enum__ = __enum__ + 3
-
- enum movement_slide_step
-slide_step: macro
- db movement_slide_step | \1 ; $18
- endm
-
-__enum__ = __enum__ + 3
-
- enum movement_fast_slide_step
-fast_slide_step: macro
- db movement_fast_slide_step | \1 ; $1c
- endm
-
-__enum__ = __enum__ + 3
-
- enum movement_turn_away
-turn_away: macro
- db movement_turn_away | \1 ; $20
- endm
-
-__enum__ = __enum__ + 3
-
- enum movement_turn_in
-turn_in: macro
- db movement_turn_in | \1 ; $24
- endm
-
-__enum__ = __enum__ + 3
-
- enum movement_turn_waterfall
-turn_waterfall: macro
- db movement_turn_waterfall | \1 ; $28
- endm
-
-__enum__ = __enum__ + 3
-
- enum movement_slow_jump_step
-slow_jump_step: macro
- db movement_slow_jump_step | \1 ; $2c
- endm
-
-__enum__ = __enum__ + 3
-
- enum movement_jump_step
-jump_step: macro
- db movement_jump_step | \1 ; $30
- endm
-
-__enum__ = __enum__ + 3
-
- enum movement_fast_jump_step
-fast_jump_step: macro
- db movement_fast_jump_step | \1 ; $34
- endm
-
-__enum__ = __enum__ + 3
-
-; Control
- enum movement_remove_sliding
-remove_sliding: macro
- db movement_remove_sliding ; $38
- endm
-
- enum movement_set_sliding
-set_sliding: macro
- db movement_set_sliding ; $39
- endm
-
- enum movement_remove_fixed_facing
-remove_fixed_facing: macro
- db movement_remove_fixed_facing ; $3a
- endm
-
- enum movement_fix_facing
-fix_facing: macro
- db movement_fix_facing ; $3b
- endm
-
- enum movement_show_person
-show_person: macro
- db movement_show_person ; $3c
- endm
-
- enum movement_hide_person
-hide_person: macro
- db movement_hide_person ; $3d
- endm
-
-; Sleep
-
- enum movement_step_sleep
-step_sleep: macro
-if \1 <= 8
- db movement_step_sleep + \1 - 1
-else
- db movement_step_sleep + 8, \1
-endc
-endm
-
-__enum__ = __enum__ + 8
-
- enum movement_step_end
-step_end: macro
- db movement_step_end ; $47
- endm
-
-; Whatever Movement_48 is, it takes a one-byte parameter
- enum movement_step_48
-step_48: macro
- db movement_step_48
- db \1
- endm
-
- enum movement_remove_person
-remove_person: macro
- db movement_remove_person ; $49
- endm
-
- enum movement_step_loop
-step_loop: macro
- db movement_step_loop ; $4a
- endm
-
- enum movement_step_4b
-step_4b: macro
- db movement_step_4b ; $4b
- endm
-
- enum movement_teleport_from
-teleport_from: macro
- db movement_teleport_from ; $4c
- endm
-
- enum movement_teleport_to
-teleport_to: macro
- db movement_teleport_to ; $4d
- endm
-
- enum movement_skyfall
-skyfall: macro
- db movement_skyfall ; $4e
- endm
-
- enum movement_step_dig
-step_dig: macro
- db movement_step_dig ; $4f
- db \1
- endm
-
- enum movement_step_bump
-step_bump: macro
- db movement_step_bump ; $50
- endm
-
- enum movement_fish_got_bite
-fish_got_bite: macro
- db movement_fish_got_bite ; $51
- endm
-
- enum movement_fish_cast_rod
-fish_cast_rod: macro
- db movement_fish_cast_rod ; $52
- endm
-
- enum movement_hide_emote
-hide_emote: macro
- db movement_hide_emote ; $53
- endm
-
- enum movement_show_emote
-show_emote: macro
- db movement_show_emote ; $54
- endm
-
- enum movement_step_shake
-step_shake: macro
- db movement_step_shake ; $55
- db \1 ; displacement
- endm
-
- enum movement_tree_shake
-tree_shake: macro
- db movement_tree_shake
- endm
-
- enum movement_rock_smash
-rock_smash: macro
- db movement_rock_smash ; $57
- db \1
- endm
-
- enum movement_return_dig
-return_dig: macro
- db movement_return_dig ; $58
- db \1
- endm
-
- enum movement_skyfall_top
-skyfall_top: macro
- db movement_skyfall_top ; $59
- endm
diff --git a/macros/pals.asm b/macros/pals.asm
deleted file mode 100755
index 44f1f7944..000000000
--- a/macros/pals.asm
+++ /dev/null
@@ -1,9 +0,0 @@
-tilepal: MACRO
-; vram bank, pals
-x = \1 << 3
-rept (_NARG +- 1) / 2
- dn (x | PAL_BG_\3), (x | PAL_BG_\2)
- shift
- shift
-endr
-endm
diff --git a/macros/pic.asm b/macros/pic.asm
deleted file mode 100644
index f06c6cd4f..000000000
--- a/macros/pic.asm
+++ /dev/null
@@ -1,4 +0,0 @@
-add_pic: MACRO
- db BANK(\1) - PICS_FIX
- dw \1
-ENDM
diff --git a/macros/rst.asm b/macros/rst.asm
index 50259c968..cf4cc5314 100644
--- a/macros/rst.asm
+++ b/macros/rst.asm
@@ -8,10 +8,22 @@ farcall: MACRO ; bank, address
rst FarCall
ENDM
-callba EQUS "farcall"
-
-callab: MACRO ; address, bank
+callfar: MACRO ; address, bank
ld hl, \1
ld a, BANK(\1)
rst FarCall
ENDM
+
+; legacy support for pre-2018 pokecrystal
+callba EQUS "farcall"
+callab EQUS "callfar"
+
+homecall: MACRO
+ ld a, [hROMBank]
+ push af
+ ld a, BANK(\1)
+ rst Bankswitch
+ call \1
+ pop af
+ rst Bankswitch
+ ENDM
diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm
new file mode 100644
index 000000000..83ff44963
--- /dev/null
+++ b/macros/scripts/audio.asm
@@ -0,0 +1,269 @@
+note: MACRO
+ dn (\1), (\2) - 1
+ ENDM
+
+sound: macro
+ note \1, \2
+ db \3 ; intensity
+ dw \4 ; frequency
+ endm
+
+noise: macro
+ note \1, \2 ; duration
+ db \3 ; intensity
+ db \4 ; frequency
+ endm
+
+musicheader: macro
+ ; number of tracks, track idx, address
+ dbw ((\1 - 1) << 6) + (\2 - 1), \3
+ endm
+
+cry_header: macro
+ dw \1, \2, \3
+ endm
+
+; MusicCommands indexes (see audio/engine.asm)
+ enum_start $d8
+
+ enum notetype_cmd ; $d8
+octave: macro
+ db notetype_cmd - (\1)
+ endm
+
+notetype: macro
+ db notetype_cmd
+ db \1 ; note_length
+ if _NARG >= 2
+ db \2 ; intensity
+ endc
+ endm
+
+ enum pitchoffset_cmd ; $d9
+pitchoffset: macro
+ db pitchoffset_cmd
+ dn \1, \2 - 1 ; octave, key
+ endm
+
+ enum tempo_cmd ; $da
+tempo: macro
+ db tempo_cmd
+ bigdw \1 ; tempo
+ endm
+
+ enum dutycycle_cmd ; $db
+dutycycle: macro
+ db dutycycle_cmd
+ db \1 ; duty_cycle
+ endm
+
+ enum intensity_cmd ; $dc
+intensity: macro
+ db intensity_cmd
+ db \1 ; intensity
+ endm
+
+ enum soundinput_cmd ; $dd
+soundinput: macro
+ db soundinput_cmd
+ db \1 ; input
+ endm
+
+ enum sound_duty_cmd ; $de
+sound_duty: macro
+ db sound_duty_cmd
+ if _NARG == 4
+ db \1 | (\2 << 2) | (\3 << 4) | (\4 << 6) ; duty sequence
+ else
+ db \1 ; one-byte duty value for legacy support
+ endc
+ endm
+
+ enum togglesfx_cmd ; $df
+togglesfx: macro
+ db togglesfx_cmd
+ endm
+
+ enum slidepitchto_cmd ; $e0
+slidepitchto: macro
+ db slidepitchto_cmd
+ db \1 - 1 ; duration
+ dn \2, \3 ; octave, pitch
+ endm
+
+ enum vibrato_cmd ; $e1
+vibrato: macro
+ db vibrato_cmd
+ db \1 ; delay
+ db \2 ; extent
+ endm
+
+ enum unknownmusic0xe2_cmd ; $e2
+unknownmusic0xe2: macro
+ db unknownmusic0xe2_cmd
+ db \1 ; unknown
+ endm
+
+ enum togglenoise_cmd ; $e3
+togglenoise: macro
+ db togglenoise_cmd
+ db \1 ; id
+ endm
+
+ enum panning_cmd ; $e4
+panning: macro
+ db panning_cmd
+ db \1 ; tracks
+ endm
+
+ enum volume_cmd ; $e5
+volume: macro
+ db volume_cmd
+ db \1 ; volume
+ endm
+
+ enum tone_cmd ; $e6
+tone: macro
+ db tone_cmd
+ bigdw \1 ; tone
+ endm
+
+ enum unknownmusic0xe7_cmd ; $e7
+unknownmusic0xe7: macro
+ db unknownmusic0xe7_cmd
+ db \1 ; unknown
+ endm
+
+ enum unknownmusic0xe8_cmd ; $e8
+unknownmusic0xe8: macro
+ db unknownmusic0xe8_cmd
+ db \1 ; unknown
+ endm
+
+ enum tempo_relative_cmd ; $e9
+tempo_relative: macro
+ db tempo_relative_cmd
+ bigdw \1 ; value
+ endm
+
+ enum restartchannel_cmd ; $ea
+restartchannel: macro
+ db restartchannel_cmd
+ dw \1 ; address
+ endm
+
+ enum newsong_cmd ; $eb
+newsong: macro
+ db newsong_cmd
+ bigdw \1 ; id
+ endm
+
+ enum sfxpriorityon_cmd ; $ec
+sfxpriorityon: macro
+ db sfxpriorityon_cmd
+ endm
+
+ enum sfxpriorityoff_cmd ; $ed
+sfxpriorityoff: macro
+ db sfxpriorityoff_cmd
+ endm
+
+ enum unknownmusic0xee_cmd ; $ee
+unknownmusic0xee: macro
+ db unknownmusic0xee_cmd
+ dw \1 ; address
+ endm
+
+ enum stereopanning_cmd ; $ef
+stereopanning: macro
+ db stereopanning_cmd
+ db \1 ; tracks
+ endm
+
+ enum sfxtogglenoise_cmd ; $f0
+sfxtogglenoise: macro
+ db sfxtogglenoise_cmd
+ db \1 ; id
+ endm
+
+ enum music0xf1_cmd ; $f1
+music0xf1: macro
+ db music0xf1_cmd
+ endm
+
+ enum music0xf2_cmd ; $f2
+music0xf2: macro
+ db music0xf2_cmd
+ endm
+
+ enum music0xf3_cmd ; $f3
+music0xf3: macro
+ db music0xf3_cmd
+ endm
+
+ enum music0xf4_cmd ; $f4
+music0xf4: macro
+ db music0xf4_cmd
+ endm
+
+ enum music0xf5_cmd ; $f5
+music0xf5: macro
+ db music0xf5_cmd
+ endm
+
+ enum music0xf6_cmd ; $f6
+music0xf6: macro
+ db music0xf6_cmd
+ endm
+
+ enum music0xf7_cmd ; $f7
+music0xf7: macro
+ db music0xf7_cmd
+ endm
+
+ enum music0xf8_cmd ; $f8
+music0xf8: macro
+ db music0xf8_cmd
+ endm
+
+ enum unknownmusic0xf9_cmd ; $f9
+unknownmusic0xf9: macro
+ db unknownmusic0xf9_cmd
+ endm
+
+ enum setcondition_cmd ; $fa
+setcondition: macro
+ db setcondition_cmd
+ db \1 ; condition
+ endm
+
+ enum jumpif_cmd ; $fb
+jumpif: macro
+ db jumpif_cmd
+ db \1 ; condition
+ dw \2 ; address
+ endm
+
+ enum jumpchannel_cmd ; $fc
+jumpchannel: macro
+ db jumpchannel_cmd
+ dw \1 ; address
+ endm
+
+ enum loopchannel_cmd ; $fd
+loopchannel: macro
+ db loopchannel_cmd
+ db \1 ; count
+ dw \2 ; address
+ endm
+
+ enum callchannel_cmd ; $fe
+callchannel: macro
+ db callchannel_cmd
+ dw \1 ; address
+ endm
+
+ enum endchannel_cmd ; $ff
+endchannel: macro
+ db endchannel_cmd
+ endm
diff --git a/macros/scripts/effect_commands.asm b/macros/scripts/effect_commands.asm
new file mode 100644
index 000000000..4fd2475b7
--- /dev/null
+++ b/macros/scripts/effect_commands.asm
@@ -0,0 +1,187 @@
+command: macro
+ enum \1_command
+\1 equs "db \1_command"
+endm
+
+; BattleCommandPointers indexes (see battle/effect_commands.asm)
+ enum_start 1
+ command checkturn ; 01
+ command checkobedience ; 02
+ command usedmovetext ; 03
+ command doturn ; 04
+ command critical ; 05
+ command damagestats ; 06
+ command stab ; 07
+ command damagevariation ; 08
+ command checkhit ; 09
+ command lowersub ; 0a
+ command hittargetnosub ; 0b
+ command raisesub ; 0c
+ command failuretext ; 0d
+ command checkfaint ; 0e
+ command criticaltext ; 0f
+ command supereffectivetext ; 10
+ command checkdestinybond ; 11
+ command buildopponentrage ; 12
+ command poisontarget ; 13
+ command sleeptarget ; 14
+ command draintarget ; 15
+ command eatdream ; 16
+ command burntarget ; 17
+ command freezetarget ; 18
+ command paralyzetarget ; 19
+ command selfdestruct ; 1a
+ command mirrormove ; 1b
+ command statup ; 1c
+ command statdown ; 1d
+ command payday ; 1e
+ command conversion ; 1f
+ command resetstats ; 20
+ command storeenergy ; 21
+ command unleashenergy ; 22
+ command forceswitch ; 23
+ command endloop ; 24
+ command flinchtarget ; 25
+ command ohko ; 26
+ command recoil ; 27
+ command mist ; 28
+ command focusenergy ; 29
+ command confuse ; 2a
+ command confusetarget ; 2b
+ command heal ; 2c
+ command transform ; 2d
+ command screen ; 2e
+ command poison ; 2f
+ command paralyze ; 30
+ command substitute ; 31
+ command rechargenextturn ; 32
+ command mimic ; 33
+ command metronome ; 34
+ command leechseed ; 35
+ command splash ; 36
+ command disable ; 37
+ command cleartext ; 38
+ command charge ; 39
+ command checkcharge ; 3a
+ command traptarget ; 3b
+ command effect0x3c ; 3c
+ command rampage ; 3d
+ command checkrampage ; 3e
+ command constantdamage ; 3f
+ command counter ; 40
+ command encore ; 41
+ command painsplit ; 42
+ command snore ; 43
+ command conversion2 ; 44
+ command lockon ; 45
+ command sketch ; 46
+ command defrostopponent ; 47
+ command sleeptalk ; 48
+ command destinybond ; 49
+ command spite ; 4a
+ command falseswipe ; 4b
+ command healbell ; 4c
+ command kingsrock ; 4d
+ command triplekick ; 4e
+ command kickcounter ; 4f
+ command thief ; 50
+ command arenatrap ; 51
+ command nightmare ; 52
+ command defrost ; 53
+ command curse ; 54
+ command protect ; 55
+ command spikes ; 56
+ command foresight ; 57
+ command perishsong ; 58
+ command startsandstorm ; 59
+ command endure ; 5a
+ command checkcurl ; 5b
+ command rolloutpower ; 5c
+ command effect0x5d ; 5d
+ command furycutter ; 5e
+ command attract ; 5f
+ command happinesspower ; 60
+ command present ; 61
+ command damagecalc ; 62
+ command frustrationpower ; 63
+ command safeguard ; 64
+ command checksafeguard ; 65
+ command getmagnitude ; 66
+ command batonpass ; 67
+ command pursuit ; 68
+ command clearhazards ; 69
+ command healmorn ; 6a
+ command healday ; 6b
+ command healnite ; 6c
+ command hiddenpower ; 6d
+ command startrain ; 6e
+ command startsun ; 6f
+ command attackup ; 70
+ command defenseup ; 71
+ command speedup ; 72
+ command specialattackup ; 73
+ command specialdefenseup ; 74
+ command accuracyup ; 75
+ command evasionup ; 76
+ command attackup2 ; 77
+ command defenseup2 ; 78
+ command speedup2 ; 79
+ command specialattackup2 ; 7a
+ command specialdefenseup2 ; 7b
+ command accuracyup2 ; 7c
+ command evasionup2 ; 7d
+ command attackdown ; 7e
+ command defensedown ; 7f
+ command speeddown ; 80
+ command specialattackdown ; 81
+ command specialdefensedown ; 82
+ command accuracydown ; 83
+ command evasiondown ; 84
+ command attackdown2 ; 85
+ command defensedown2 ; 86
+ command speeddown2 ; 87
+ command specialattackdown2 ; 88
+ command specialdefensedown2 ; 89
+ command accuracydown2 ; 8a
+ command evasiondown2 ; 8b
+ command statupmessage ; 8c
+ command statdownmessage ; 8d
+ command statupfailtext ; 8e
+ command statdownfailtext ; 8f
+ command effectchance ; 90
+ command statdownanim ; 91
+ command statupanim ; 92
+ command switchturn ; 93
+ command fakeout ; 94
+ command bellydrum ; 95
+ command psychup ; 96
+ command rage ; 97
+ command doubleflyingdamage ; 98
+ command doubleundergrounddamage ; 99
+ command mirrorcoat ; 9a
+ command checkfuturesight ; 9b
+ command futuresight ; 9c
+ command doubleminimizedamage ; 9d
+ command skipsuncharge ; 9e
+ command thunderaccuracy ; 9f
+ command teleport ; a0
+ command beatup ; a1
+ command ragedamage ; a2
+ command resettypematchup ; a3
+ command allstatsup ; a4
+ command effect0xa5 ; a5
+ command raisesubnoanim ; a6
+ command lowersubnoanim ; a7
+ command effect0xa8 ; a8
+ command clearmissdamage ; a9
+ command movedelay ; aa
+ command hittarget ; ab
+ command tristatuschance ; ac
+ command supereffectivelooptext ; ad
+ command startloop ; ae
+ command curl ; af
+
+__enum__ set $fe
+
+ command endturn ; fe
+ command endmove ; ff
diff --git a/macros/scripts/event.asm b/macros/scripts/event.asm
new file mode 100644
index 000000000..1bf6b8622
--- /dev/null
+++ b/macros/scripts/event.asm
@@ -0,0 +1,1069 @@
+; ScriptCommandTable indexes (see engine/scripting.asm)
+ enum_start
+
+ enum scall_command ; $00
+scall: macro
+ db scall_command
+ dw \1 ; pointer
+ endm
+
+ enum farscall_command ; $01
+farscall: macro
+ db farscall_command
+ dba \1
+ endm
+
+ enum ptcall_command ; $02
+ptcall: macro
+ db ptcall_command
+ dw \1 ; pointer
+ endm
+
+ enum jump_command ; $03
+jump: macro
+ db jump_command
+ dw \1 ; pointer
+ endm
+
+ enum farjump_command ; $04
+farjump: macro
+ db farjump_command
+ dba \1
+ endm
+
+ enum ptjump_command ; $05
+ptjump: macro
+ db ptjump_command
+ dw \1 ; pointer
+ endm
+
+ enum if_equal_command ; $06
+if_equal: macro
+ db if_equal_command
+ db \1 ; byte
+ dw \2 ; pointer
+ endm
+
+ enum if_not_equal_command ; $07
+if_not_equal: macro
+ db if_not_equal_command
+ db \1 ; byte
+ dw \2 ; pointer
+ endm
+
+ enum iffalse_command ; $08
+iffalse: macro
+ db iffalse_command
+ dw \1 ; pointer
+ endm
+
+ enum iftrue_command ; $09
+iftrue: macro
+ db iftrue_command
+ dw \1 ; pointer
+ endm
+
+ enum if_greater_than_command ; $0a
+if_greater_than: macro
+ db if_greater_than_command
+ db \1 ; byte
+ dw \2 ; pointer
+ endm
+
+ enum if_less_than_command ; $0b
+if_less_than: macro
+ db if_less_than_command
+ db \1 ; byte
+ dw \2 ; pointer
+ endm
+
+ enum jumpstd_command ; $0c
+jumpstd: macro
+ db jumpstd_command
+ dw \1 ; predefined_script
+ endm
+
+ enum callstd_command ; $0d
+callstd: macro
+ db callstd_command
+ dw \1 ; predefined_script
+ endm
+
+ enum callasm_command ; $0e
+callasm: macro
+ db callasm_command
+ dba \1
+ endm
+
+ enum special_command ; $0f
+special: macro
+ db special_command
+ dw (\1Special - SpecialsPointers) / 3
+ endm
+
+add_special: MACRO
+\1Special::
+ dba \1
+ENDM
+
+ enum ptcallasm_command ; $10
+ptcallasm: macro
+ db ptcallasm_command
+ dw \1 ; asm
+ endm
+
+ enum checkmapscene_command ; $11
+checkmapscene: macro
+ db checkmapscene_command
+ map \1 ; map
+ endm
+
+ enum setmapscene_command ; $12
+setmapscene: macro
+ db setmapscene_command
+ map \1 ; map
+ db \2 ; scene_id
+ endm
+
+ enum checkscene_command ; $13
+checkscene: macro
+ db checkscene_command
+ endm
+
+ enum setscene_command ; $14
+setscene: macro
+ db setscene_command
+ db \1 ; scene_id
+ endm
+
+ enum writebyte_command ; $15
+writebyte: macro
+ db writebyte_command
+ db \1 ; value
+ endm
+
+ enum addvar_command ; $16
+addvar: macro
+ db addvar_command
+ db \1 ; value
+ endm
+
+ enum random_command ; $17
+random: macro
+ db random_command
+ db \1 ; input
+ endm
+
+ enum checkver_command ; $18
+checkver: macro
+ db checkver_command
+ endm
+
+ enum copybytetovar_command ; $19
+copybytetovar: macro
+ db copybytetovar_command
+ dw \1 ; address
+ endm
+
+ enum copyvartobyte_command ; $1a
+copyvartobyte: macro
+ db copyvartobyte_command
+ dw \1 ; address
+ endm
+
+ enum loadvar_command ; $1b
+loadvar: macro
+ db loadvar_command
+ dw \1 ; address
+ db \2 ; value
+ endm
+
+ enum checkcode_command ; $1c
+checkcode: macro
+ db checkcode_command
+ db \1 ; variable_id
+ endm
+
+ enum writevarcode_command ; $1d
+writevarcode: macro
+ db writevarcode_command
+ db \1 ; variable_id
+ endm
+
+ enum writecode_command ; $1e
+writecode: macro
+ db writecode_command
+ db \1 ; variable_id
+ db \2 ; value
+ endm
+
+ enum giveitem_command ; $1f
+giveitem: macro
+ db giveitem_command
+ db \1 ; item
+if _NARG == 2
+ db \2 ; quantity
+else
+ db 1
+endc
+ endm
+
+ enum takeitem_command ; $20
+takeitem: macro
+ db takeitem_command
+ db \1 ; item
+if _NARG == 2
+ db \2 ; quantity
+else
+ db 1
+endc
+ endm
+
+ enum checkitem_command ; $21
+checkitem: macro
+ db checkitem_command
+ db \1 ; item
+ endm
+
+ enum givemoney_command ; $22
+givemoney: macro
+ db givemoney_command
+ db \1 ; account
+ dt \2 ; money
+ endm
+
+ enum takemoney_command ; $23
+takemoney: macro
+ db takemoney_command
+ db \1 ; account
+ dt \2 ; money
+ endm
+
+ enum checkmoney_command ; $24
+checkmoney: macro
+ db checkmoney_command
+ db \1 ; account
+ dt \2 ; money
+ endm
+
+ enum givecoins_command ; $25
+givecoins: macro
+ db givecoins_command
+ dw \1 ; coins
+ endm
+
+ enum takecoins_command ; $26
+takecoins: macro
+ db takecoins_command
+ dw \1 ; coins
+ endm
+
+ enum checkcoins_command ; $27
+checkcoins: macro
+ db checkcoins_command
+ dw \1 ; coins
+ endm
+
+ enum addcellnum_command ; $28
+addcellnum: macro
+ db addcellnum_command
+ db \1 ; person
+ endm
+
+ enum delcellnum_command ; $29
+delcellnum: macro
+ db delcellnum_command
+ db \1 ; person
+ endm
+
+ enum checkcellnum_command ; $2a
+checkcellnum: macro
+ db checkcellnum_command
+ db \1 ; person
+ endm
+
+ enum checktime_command ; $2b
+checktime: macro
+ db checktime_command
+ db \1 ; time
+ endm
+
+checkmorn EQUS "checktime MORN"
+checkday EQUS "checktime DAY"
+checknite EQUS "checktime NITE"
+
+ enum checkpoke_command ; $2c
+checkpoke: macro
+ db checkpoke_command
+ db \1 ; pkmn
+ endm
+
+ enum givepoke_command ; $2d
+givepoke: macro
+ db givepoke_command
+ db \1 ; pokemon
+ db \2 ; level
+ if _NARG >= 3
+ db \3 ; item
+ if _NARG >= 4
+ db \4 ; trainer
+ if \4
+ dw \5 ; trainer_name_pointer
+ dw \6 ; pkmn_nickname
+ endc
+ else
+ db 0
+ endc
+ else
+ db 0, 0
+ endc
+ endm
+
+ enum giveegg_command ; $2e
+giveegg: macro
+ db giveegg_command
+ db \1 ; pkmn
+ db \2 ; level
+ endm
+
+ enum givepokeitem_command ; $2f
+givepokeitem: macro
+ db givepokeitem_command
+ dw \1 ; pointer
+ endm
+
+ enum checkpokeitem_command ; $30
+checkpokeitem: macro
+ db checkpokeitem_command
+ dw \1 ; pointer
+ endm
+
+ enum checkevent_command ; $31
+checkevent: macro
+ db checkevent_command
+ dw \1 ; event_flag
+ endm
+
+ enum clearevent_command ; $32
+clearevent: macro
+ db clearevent_command
+ dw \1 ; event_flag
+ endm
+
+ enum setevent_command ; $33
+setevent: macro
+ db setevent_command
+ dw \1 ; event_flag
+ endm
+
+ enum checkflag_command ; $34
+checkflag: macro
+ db checkflag_command
+ dw \1 ; engine_flag
+ endm
+
+ enum clearflag_command ; $35
+clearflag: macro
+ db clearflag_command
+ dw \1 ; engine_flag
+ endm
+
+ enum setflag_command ; $36
+setflag: macro
+ db setflag_command
+ dw \1 ; engine_flag
+ endm
+
+ enum wildon_command ; $37
+wildon: macro
+ db wildon_command
+ endm
+
+ enum wildoff_command ; $38
+wildoff: macro
+ db wildoff_command
+ endm
+
+ enum xycompare_command ; $39
+xycompare: macro
+ db xycompare_command
+ dw \1 ; pointer
+ endm
+
+ enum warpmod_command ; $3a
+warpmod: macro
+ db warpmod_command
+ db \1 ; warp_id
+ map \2 ; map
+ endm
+
+ enum blackoutmod_command ; $3b
+blackoutmod: macro
+ db blackoutmod_command
+ map \1 ; map
+ endm
+
+ enum warp_command ; $3c
+warp: macro
+ db warp_command
+ map \1 ; map
+ db \2 ; x
+ db \3 ; y
+ endm
+
+ enum readmoney_command ; $3d
+readmoney: macro
+ db readmoney_command
+ db \1 ; account
+ db \2 ; memory
+ endm
+
+ enum readcoins_command ; $3e
+readcoins: macro
+ db readcoins_command
+ db \1 ; memory
+ endm
+
+ enum RAM2MEM_command ; $3f
+RAM2MEM: macro
+ db RAM2MEM_command
+ db \1 ; memory
+ endm
+
+ enum pokenamemem_command ; $40
+pokenamemem: macro
+ db pokenamemem_command
+ db \1 ; pokemon
+ db \2 ; memory
+ endm
+
+ enum itemtotext_command ; $41
+itemtotext: macro
+ db itemtotext_command
+ db \1 ; item
+ db \2 ; memory
+ endm
+
+ enum mapnametotext_command ; $42
+mapnametotext: macro
+ db mapnametotext_command
+ db \1 ; memory
+ endm
+
+ enum trainertotext_command ; $43
+trainertotext: macro
+ db trainertotext_command
+ db \1 ; trainer_id
+ db \2 ; trainer_group
+ db \3 ; memory
+ endm
+
+ enum stringtotext_command ; $44
+stringtotext: macro
+ db stringtotext_command
+ dw \1 ; text_pointer
+ db \2 ; memory
+ endm
+
+ enum itemnotify_command ; $45
+itemnotify: macro
+ db itemnotify_command
+ endm
+
+ enum pocketisfull_command ; $46
+pocketisfull: macro
+ db pocketisfull_command
+ endm
+
+ enum opentext_command ; $47
+opentext: macro
+ db opentext_command
+ endm
+
+ enum refreshscreen_command ; $48
+refreshscreen: macro
+ db refreshscreen_command
+ db \1 ; dummy
+ endm
+
+ enum closetext_command ; $49
+closetext: macro
+ db closetext_command
+ endm
+
+ enum loadbytec2cf_command ; $4a
+loadbytec2cf: macro
+ db loadbytec2cf_command
+ db \1 ; byte
+ endm
+
+ enum farwritetext_command ; $4b
+farwritetext: macro
+ db farwritetext_command
+ dba \1
+ endm
+
+ enum writetext_command ; $4c
+writetext: macro
+ db writetext_command
+ dw \1 ; text_pointer
+ endm
+
+ enum repeattext_command ; $4d
+repeattext: macro
+ db repeattext_command
+ db \1 ; byte
+ db \2 ; byte
+ endm
+
+ enum yesorno_command ; $4e
+yesorno: macro
+ db yesorno_command
+ endm
+
+ enum loadmenudata_command ; $4f
+loadmenudata: macro
+ db loadmenudata_command
+ dw \1 ; data
+ endm
+
+ enum closewindow_command ; $50
+closewindow: macro
+ db closewindow_command
+ endm
+
+ enum jumptextfaceplayer_command ; $51
+jumptextfaceplayer: macro
+ db jumptextfaceplayer_command
+ dw \1 ; text_pointer
+ endm
+
+; IF _CRYSTAL
+ enum farjumptext_command ; $52
+farjumptext: macro
+ db farjumptext_command
+ dba \1
+ endm
+; ENDC
+
+ enum jumptext_command ; $53
+jumptext: macro
+ db jumptext_command
+ dw \1 ; text_pointer
+ endm
+
+ enum waitbutton_command ; $54
+waitbutton: macro
+ db waitbutton_command
+ endm
+
+ enum buttonsound_command ; $55
+buttonsound: macro
+ db buttonsound_command
+ endm
+
+ enum pokepic_command ; $56
+pokepic: macro
+ db pokepic_command
+ db \1 ; pokemon
+ endm
+
+ enum closepokepic_command ; $57
+closepokepic: macro
+ db closepokepic_command
+ endm
+
+ enum _2dmenu_command ; $58
+_2dmenu: macro
+ db _2dmenu_command
+ endm
+
+ enum verticalmenu_command ; $59
+verticalmenu: macro
+ db verticalmenu_command
+ endm
+
+ enum loadpikachudata_command ; $5a
+loadpikachudata: macro
+ db loadpikachudata_command
+ endm
+
+ enum randomwildmon_command ; $5b
+randomwildmon: macro
+ db randomwildmon_command
+ endm
+
+ enum loadmemtrainer_command ; $5c
+loadmemtrainer: macro
+ db loadmemtrainer_command
+ endm
+
+ enum loadwildmon_command ; $5d
+loadwildmon: macro
+ db loadwildmon_command
+ db \1 ; pokemon
+ db \2 ; level
+ endm
+
+ enum loadtrainer_command ; $5e
+loadtrainer: macro
+ db loadtrainer_command
+ db \1 ; trainer_group
+ db \2 ; trainer_id
+ endm
+
+ enum startbattle_command ; $5f
+startbattle: macro
+ db startbattle_command
+ endm
+
+ enum reloadmapafterbattle_command ; $60
+reloadmapafterbattle: macro
+ db reloadmapafterbattle_command
+ endm
+
+ enum catchtutorial_command ; $61
+catchtutorial: macro
+ db catchtutorial_command
+ db \1 ; byte
+ endm
+
+ enum trainertext_command ; $62
+trainertext: macro
+ db trainertext_command
+ db \1 ; which_text
+ endm
+
+ enum trainerflagaction_command ; $63
+trainerflagaction: macro
+ db trainerflagaction_command
+ db \1 ; action
+ endm
+
+ enum winlosstext_command ; $64
+winlosstext: macro
+ db winlosstext_command
+ dw \1 ; win_text_pointer
+ dw \2 ; loss_text_pointer
+ endm
+
+ enum scripttalkafter_command ; $65
+scripttalkafter: macro
+ db scripttalkafter_command
+ endm
+
+ enum end_if_just_battled_command ; $66
+end_if_just_battled: macro
+ db end_if_just_battled_command
+ endm
+
+ enum check_just_battled_command ; $67
+check_just_battled: macro
+ db check_just_battled_command
+ endm
+
+ enum setlasttalked_command ; $68
+setlasttalked: macro
+ db setlasttalked_command
+ db \1 ; object id
+ endm
+
+ enum applymovement_command ; $69
+applymovement: macro
+ db applymovement_command
+ db \1 ; object id
+ dw \2 ; data
+ endm
+
+ enum applymovement2_command ; $6a
+applymovement2: macro
+ db applymovement2_command
+ dw \1 ; data
+ endm
+
+ enum faceplayer_command ; $6b
+faceplayer: macro
+ db faceplayer_command
+ endm
+
+ enum faceobject_command ; $6c
+faceobject: macro
+ db faceobject_command
+ db \1 ; object1
+ db \2 ; object2
+ endm
+
+ enum variablesprite_command ; $6d
+variablesprite: macro
+ db variablesprite_command
+ db \1 - SPRITE_VARS ; byte
+ db \2 ; sprite
+ endm
+
+ enum disappear_command ; $6e
+disappear: macro
+ db disappear_command
+ db \1 ; object id
+ endm
+
+ enum appear_command ; $6f
+appear: macro
+ db appear_command
+ db \1 ; object id
+ endm
+
+ enum follow_command ; $70
+follow: macro
+ db follow_command
+ db \1 ; object2
+ db \2 ; object1
+ endm
+
+ enum stopfollow_command ; $71
+stopfollow: macro
+ db stopfollow_command
+ endm
+
+ enum moveobject_command ; $72
+moveobject: macro
+ db moveobject_command
+ db \1 ; object id
+ db \2 ; x
+ db \3 ; y
+ endm
+
+ enum writeobjectxy_command ; $73
+writeobjectxy: macro
+ db writeobjectxy_command
+ db \1 ; object id
+ endm
+
+ enum loademote_command ; $74
+loademote: macro
+ db loademote_command
+ db \1 ; bubble
+ endm
+
+ enum showemote_command ; $75
+showemote: macro
+ db showemote_command
+ db \1 ; bubble
+ db \2 ; object id
+ db \3 ; time
+ endm
+
+ enum spriteface_command ; $76
+spriteface: macro
+ db spriteface_command
+ db \1 ; object id
+ db \2 ; facing
+ endm
+
+ enum follownotexact_command ; $77
+follownotexact: macro
+ db follownotexact_command
+ db \1 ; object2
+ db \2 ; object1
+ endm
+
+ enum earthquake_command ; $78
+earthquake: macro
+ db earthquake_command
+ db \1 ; param
+ endm
+
+ enum changemap_command ; $79
+changemap: macro
+ db changemap_command
+ db \1 ; map_bank
+ dw \2 ; map_data_pointer
+ endm
+
+ enum changeblock_command ; $7a
+changeblock: macro
+ db changeblock_command
+ db \1 ; x
+ db \2 ; y
+ db \3 ; block
+ endm
+
+ enum reloadmap_command ; $7b
+reloadmap: macro
+ db reloadmap_command
+ endm
+
+ enum reloadmappart_command ; $7c
+reloadmappart: macro
+ db reloadmappart_command
+ endm
+
+ enum writecmdqueue_command ; $7d
+writecmdqueue: macro
+ db writecmdqueue_command
+ dw \1 ; queue_pointer
+ endm
+
+ enum delcmdqueue_command ; $7e
+delcmdqueue: macro
+ db delcmdqueue_command
+ db \1 ; byte
+ endm
+
+ enum playmusic_command ; $7f
+playmusic: macro
+ db playmusic_command
+ dw \1 ; music_pointer
+ endm
+
+ enum encountermusic_command ; $80
+encountermusic: macro
+ db encountermusic_command
+ endm
+
+ enum musicfadeout_command ; $81
+musicfadeout: macro
+ db musicfadeout_command
+ dw \1 ; music
+ db \2 ; fadetime
+ endm
+
+ enum playmapmusic_command ; $82
+playmapmusic: macro
+ db playmapmusic_command
+ endm
+
+ enum dontrestartmapmusic_command ; $83
+dontrestartmapmusic: macro
+ db dontrestartmapmusic_command
+ endm
+
+ enum cry_command ; $84
+cry: macro
+ db cry_command
+ dw \1 ; cry_id
+ endm
+
+ enum playsound_command ; $85
+playsound: macro
+ db playsound_command
+ dw \1 ; sound_pointer
+ endm
+
+ enum waitsfx_command ; $86
+waitsfx: macro
+ db waitsfx_command
+ endm
+
+ enum warpsound_command ; $87
+warpsound: macro
+ db warpsound_command
+ endm
+
+ enum specialsound_command ; $88
+specialsound: macro
+ db specialsound_command
+ endm
+
+ enum passtoengine_command ; $89
+passtoengine: macro
+ db passtoengine_command
+ db \1 ; data_pointer
+ endm
+
+ enum newloadmap_command ; $8a
+newloadmap: macro
+ db newloadmap_command
+ db \1 ; which_method
+ endm
+
+ enum pause_command ; $8b
+pause: macro
+ db pause_command
+ db \1 ; length
+ endm
+
+ enum deactivatefacing_command ; $8c
+deactivatefacing: macro
+ db deactivatefacing_command
+ db \1 ; time
+ endm
+
+ enum priorityjump_command ; $8d
+priorityjump: macro
+ db priorityjump_command
+ dw \1 ; pointer
+ endm
+
+ enum warpcheck_command ; $8e
+warpcheck: macro
+ db warpcheck_command
+ endm
+
+ enum ptpriorityjump_command ; $8f
+ptpriorityjump: macro
+ db ptpriorityjump_command
+ dw \1 ; pointer
+ endm
+
+ enum return_command ; $90
+return: macro
+ db return_command
+ endm
+
+ enum end_command ; $91
+end: macro
+ db end_command
+ endm
+
+ enum reloadandreturn_command ; $92
+reloadandreturn: macro
+ db reloadandreturn_command
+ db \1 ; which_method
+ endm
+
+ enum end_all_command ; $93
+end_all: macro
+ db end_all_command
+ endm
+
+ enum pokemart_command ; $94
+pokemart: macro
+ db pokemart_command
+ db \1 ; dialog_id
+ dw \2 ; mart_id
+ endm
+
+ enum elevator_command ; $95
+elevator: macro
+ db elevator_command
+ dw \1 ; floor_list_pointer
+ endm
+
+ enum trade_command ; $96
+trade: macro
+ db trade_command
+ db \1 ; trade_id
+ endm
+
+ enum askforphonenumber_command ; $97
+askforphonenumber: macro
+ db askforphonenumber_command
+ db \1 ; number
+ endm
+
+ enum phonecall_command ; $98
+phonecall: macro
+ db phonecall_command
+ dw \1 ; caller_name
+ endm
+
+ enum hangup_command ; $99
+hangup: macro
+ db hangup_command
+ endm
+
+ enum describedecoration_command ; $9a
+describedecoration: macro
+ db describedecoration_command
+ db \1 ; byte
+ endm
+
+ enum fruittree_command ; $9b
+fruittree: macro
+ db fruittree_command
+ db \1 ; tree_id
+ endm
+
+ enum specialphonecall_command ; $9c
+specialphonecall: macro
+ db specialphonecall_command
+ dw \1 ; call_id
+ endm
+
+ enum checkphonecall_command ; $9d
+checkphonecall: macro
+ db checkphonecall_command
+ endm
+
+ enum verbosegiveitem_command ; $9e
+verbosegiveitem: macro
+ db verbosegiveitem_command
+ db \1 ; item
+if _NARG == 2
+ db \2 ; quantity
+else
+ db 1
+endc
+ endm
+
+ enum verbosegiveitem2_command ; $9f
+verbosegiveitem2: macro
+ db verbosegiveitem2_command
+ db \1 ; item
+ db \2 ; var
+ endm
+
+ enum swarm_command ; $a0
+swarm: macro
+ db swarm_command
+ db \1 ; flag
+ map \2 ; map
+ endm
+
+ enum halloffame_command ; $a1
+halloffame: macro
+ db halloffame_command
+ endm
+
+ enum credits_command ; $a2
+credits: macro
+ db credits_command
+ endm
+
+ enum warpfacing_command ; $a3
+warpfacing: macro
+ db warpfacing_command
+ db \1 ; facing
+ map \2 ; map
+ db \3 ; x
+ db \4 ; y
+ endm
+
+ enum battletowertext_command ; $a4
+battletowertext: macro
+ db battletowertext_command
+ db \1 ; memory
+ endm
+
+ enum landmarktotext_command ; $a5
+landmarktotext: macro
+ db landmarktotext_command
+ db \1 ; id
+ db \2 ; memory
+ endm
+
+ enum trainerclassname_command ; $a6
+trainerclassname: macro
+ db trainerclassname_command
+ db \1 ; id
+ db \2 ; memory
+ endm
+
+ enum name_command ; $a7
+name: macro
+ db name_command
+ db \1 ; type
+ db \2 ; id
+ db \3 ; memory
+ endm
+
+ enum wait_command ; $a8
+wait: macro
+ db wait_command
+ db \1 ; duration
+ endm
+
+ enum check_save_command ; $a9
+check_save: macro
+ db check_save_command
+ endm
diff --git a/macros/scripts/gfx_anim.asm b/macros/scripts/gfx_anim.asm
new file mode 100644
index 000000000..a3fa710a0
--- /dev/null
+++ b/macros/scripts/gfx_anim.asm
@@ -0,0 +1,44 @@
+; pic + oam animations
+
+frame: macro
+ db \1
+x = \2
+if _NARG > 2
+rept _NARG +- 2
+x = x | (1 << (\3 + 1))
+ shift
+endr
+endc
+ db x
+ endm
+
+ enum_start $fc
+
+ enum delanim_command ; $fc
+delanim: macro ; used for oam
+ db delanim_command
+ endm
+
+ enum dorepeat_command ; $fd
+dorepeat: macro
+ db dorepeat_command
+ db \1 ; #
+ endm
+
+ enum setrepeat_command ; $fe
+setrepeat: macro
+ db setrepeat_command
+ db \1 ; #
+ endm
+
+ enum endanim_command ; $ff
+endanim: macro
+ db endanim_command
+ endm
+
+__enum__ = $fe
+
+ enum dorestart_command ; $fe
+dorestart: macro ; used for oam
+ db dorestart_command
+ endm
diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm
new file mode 100644
index 000000000..8ef08ec49
--- /dev/null
+++ b/macros/scripts/maps.asm
@@ -0,0 +1,108 @@
+map: macro
+;\1: map id
+ db GROUP_\1, MAP_\1
+endm
+
+
+scene_script: macro
+;\1: script pointer
+ dw \1, 0
+endm
+
+warp_def: macro
+;\1: y: top to bottom, starts at 0
+;\2: x: left to right, starts at 0
+;\3: warp destination: starts at 1
+;\4: map id: from constants/map_constants.asm
+ db \1, \2, \3
+ map \4
+endm
+
+coord_event: macro
+;\1: scene id: controlled by setscene/setmapscene
+;\2: y: top to bottom, starts at 0
+;\3: x: left to right, starts at 0
+;\4: script pointer
+ db \1, \2, \3, $0
+ dw \4
+ db $0, $0
+endm
+
+bg_event: macro
+;\1: y: top to bottom, starts at 0
+;\2: x: left to right, starts at 0
+;\3: function: a BGEVENT_* constant
+;\4: script pointer
+ db \1, \2, \3
+ dw \4
+endm
+
+object_event: macro
+;\1: sprite: a SPRITE_* constant
+;\2: y: top to bottom, starts at 0
+;\3: x: left to right, starts at 0
+;\4: movement function: a SPRITEMOVEDATA_* constant
+;\5, \6: movement radius: y, x
+;\7, \8: hour limits: h1, h2 (0-23)
+; * if h1 < h2, the object_event will only appear from h1 to h2
+; * if h1 > h2, the object_event will not appear from h2 to h1
+; * if h1 == h2, the object_event will always appear
+; * if h1 == -1, h2 is treated as a time-of-day value:
+; a combo of MORN, DAY, and/or NITE, or -1 to always appear
+;\9: color: a PAL_NPC_* constant, or 0 for sprite default
+;\10: function: a OBJECTTYPE_* constant
+;\11: sight range: applies to OBJECTTYPE_TRAINER
+;\12: script pointer
+;\13: event flag: an EVENT_* constant, or -1 to always appear
+ db \1, \2 + 4, \3 + 4, \4
+ dn \5, \6
+ db \7, \8
+ shift
+ dn \8, \9
+ shift
+ db \9
+ shift
+ dw \9
+ shift
+ dw \9
+endm
+
+
+trainer: macro
+;\1: flag: an EVENT_BEAT_* constant
+;\2: trainer group
+;\3: trainer id
+;\4: seen text
+;\5: win text
+;\6: loss text
+;\7: after-battle text
+ dw \1
+ db \2, \3
+ dw \4, \5, \6, \7
+endm
+
+itemball: macro
+;\1: item: from constants/item_constants.asm
+;\2: quantity: default 1
+if _NARG == 2
+ db \1, \2
+else
+ db \1, 1
+endc
+endm
+
+elevfloor: macro
+;\1: floor: a FLOOR_* constant
+;\2: warp destination: starts at 1
+;\3: map id
+ db \1, \2
+ map \3
+ENDM
+
+stonetable: macro
+;\1: warp id
+;\2: object_event id
+;\3: script pointer
+ db \1, \2
+ dw \3
+endm
diff --git a/macros/scripts/move_anim.asm b/macros/scripts/move_anim.asm
new file mode 100644
index 000000000..7714bb09a
--- /dev/null
+++ b/macros/scripts/move_anim.asm
@@ -0,0 +1,294 @@
+anim_wait: macro
+if \1 >= $d0
+ flip out
+endc
+ db \1
+ endm
+
+; BattleAnimCommands indexes (see battle/anim_commands.asm)
+ enum_start $d0
+
+ enum anim_obj_command ; $d0
+anim_obj: macro
+ db anim_obj_command
+ db \1 ; obj
+ db (\2 << 3) + \3 ; x
+ db (\4 << 3) + \5 ; y
+ db \6 ; param
+ endm
+
+ enum anim_1gfx_command ; $d1
+anim_1gfx: macro
+ db anim_1gfx_command
+ db \1 ; gfx1
+ endm
+
+ enum anim_2gfx_command ; $d2
+anim_2gfx: macro
+ db anim_2gfx_command
+ db \1 ; gfx1
+ db \2 ; gfx2
+ endm
+
+ enum anim_3gfx_command ; $d3
+anim_3gfx: macro
+ db anim_3gfx_command
+ db \1 ; gfx1
+ db \2 ; gfx2
+ db \3 ; gfx3
+ endm
+
+ enum anim_4gfx_command ; $d4
+anim_4gfx: macro
+ db anim_4gfx_command
+ db \1 ; gfx1
+ db \2 ; gfx2
+ db \3 ; gfx3
+ db \4 ; gfx4
+ endm
+
+ enum anim_5gfx_command ; $d5
+anim_5gfx: macro
+ db anim_5gfx_command
+ db \1 ; gfx1
+ db \2 ; gfx2
+ db \3 ; gfx3
+ db \4 ; gfx4
+ db \5 ; gfx5
+ endm
+
+ enum anim_incobj_command ; $d6
+anim_incobj: macro
+ db anim_incobj_command
+ db \1 ; id
+ endm
+
+ enum anim_setobj_command ; $d7
+anim_setobj: macro
+ db anim_setobj_command
+ db \1 ; id
+ db \2 ; obj
+ endm
+
+ enum anim_incbgeffect_command ; $d8
+anim_incbgeffect: macro
+ db anim_incbgeffect_command
+ db \1 ; effect
+ endm
+
+ enum anim_enemyfeetobj_command ; $d9
+anim_enemyfeetobj: macro
+ db anim_enemyfeetobj_command
+ endm
+
+ enum anim_playerheadobj_command ; $da
+anim_playerheadobj: macro
+ db anim_playerheadobj_command
+ endm
+
+ enum anim_checkpokeball_command ; $db
+anim_checkpokeball: macro
+ db anim_checkpokeball_command
+ endm
+
+ enum anim_transform_command ; $dc
+anim_transform: macro
+ db anim_transform_command
+ endm
+
+ enum anim_raisesub_command ; $dd
+anim_raisesub: macro
+ db anim_raisesub_command
+ endm
+
+ enum anim_dropsub_command ; $de
+anim_dropsub: macro
+ db anim_dropsub_command
+ endm
+
+ enum anim_resetobp0_command ; $df
+anim_resetobp0: macro
+ db anim_resetobp0_command
+ endm
+
+ enum anim_sound_command ; $e0
+anim_sound: macro
+ db anim_sound_command
+ db (\1 << 2) | \2 ; duration, tracks
+ db \3 ; id
+ endm
+
+ enum anim_cry_command ; $e1
+anim_cry: macro
+ db anim_cry_command
+ db \1 ; pitch
+ endm
+
+ enum anim_minimizeopp_command ; $e2
+anim_minimizeopp: macro
+ db anim_minimizeopp_command
+ endm
+
+ enum anim_oamon_command ; $e3
+anim_oamon: macro
+ db anim_oamon_command
+ endm
+
+ enum anim_oamoff_command ; $e4
+anim_oamoff: macro
+ db anim_oamoff_command
+ endm
+
+ enum anim_clearobjs_command ; $e5
+anim_clearobjs: macro
+ db anim_clearobjs_command
+ endm
+
+ enum anim_beatup_command ; $e6
+anim_beatup: macro
+ db anim_beatup_command
+ endm
+
+ enum anim_0xe7_command ; $e7
+anim_0xe7: macro
+ db anim_0xe7_command
+ endm
+
+ enum anim_updateactorpic_command ; $e8
+anim_updateactorpic: macro
+ db anim_updateactorpic_command
+ endm
+
+ enum anim_minimize_command ; $e9
+anim_minimize: macro
+ db anim_minimize_command
+ endm
+
+ enum anim_0xea_command ; $ea
+anim_0xea: macro
+ db anim_0xea_command
+ endm
+
+ enum anim_0xeb_command ; $eb
+anim_0xeb: macro
+ db anim_0xeb_command
+ endm
+
+ enum anim_0xec_command ; $ec
+anim_0xec: macro
+ db anim_0xec_command
+ endm
+
+ enum anim_0xed_command ; $ed
+anim_0xed: macro
+ db anim_0xed_command
+ endm
+
+ enum anim_if_param_and_command ; $ee
+anim_if_param_and: macro
+ db anim_if_param_and_command
+ db \1 ; value
+ dw \2 ; address
+ endm
+
+ enum anim_jumpuntil_command ; $ef
+anim_jumpuntil: macro
+ db anim_jumpuntil_command
+ dw \1 ; address
+ endm
+
+ enum anim_bgeffect_command ; $f0
+anim_bgeffect: macro
+ db anim_bgeffect_command
+ db \1 ; effect
+ db \2 ; unknown
+ db \3 ; unknown
+ db \4 ; unknown
+ endm
+
+ enum anim_bgp_command ; $f1
+anim_bgp: macro
+ db anim_bgp_command
+ db \1 ; colors
+ endm
+
+ enum anim_obp0_command ; $f2
+anim_obp0: macro
+ db anim_obp0_command
+ db \1 ; colors
+ endm
+
+ enum anim_obp1_command ; $f3
+anim_obp1: macro
+ db anim_obp1_command
+ db \1 ; colors
+ endm
+
+ enum anim_clearsprites_command ; $f4
+anim_clearsprites: macro
+ db anim_clearsprites_command
+ endm
+
+ enum anim_0xf5_command ; $f5
+anim_0xf5: macro
+ db anim_0xf5_command
+ endm
+
+ enum anim_0xf6_command ; $f6
+anim_0xf6: macro
+ db anim_0xf6_command
+ endm
+
+ enum anim_0xf7_command ; $f7
+anim_0xf7: macro
+ db anim_0xf7_command
+ endm
+
+ enum anim_if_param_equal_command ; $f8
+anim_if_param_equal: macro
+ db anim_if_param_equal_command
+ db \1 ; value
+ dw \2 ; address
+ endm
+
+ enum anim_setvar_command ; $f9
+anim_setvar: macro
+ db anim_setvar_command
+ db \1 ; value
+ endm
+
+ enum anim_incvar_command ; $fa
+anim_incvar: macro
+ db anim_incvar_command
+ endm
+
+ enum anim_if_var_equal_command ; $fb
+anim_if_var_equal: macro
+ db anim_if_var_equal_command
+ db \1 ; value
+ dw \2 ; address
+ endm
+
+ enum anim_jump_command ; $fc
+anim_jump: macro
+ db anim_jump_command
+ dw \1 ; address
+ endm
+
+ enum anim_loop_command ; $fd
+anim_loop: macro
+ db anim_loop_command
+ db \1 ; count
+ dw \2 ; address
+ endm
+
+ enum anim_call_command ; $fe
+anim_call: macro
+ db anim_call_command
+ dw \1 ; address
+ endm
+
+ enum anim_ret_command ; $ff
+anim_ret: macro
+ db anim_ret_command
+ endm
diff --git a/macros/scripts/movement.asm b/macros/scripts/movement.asm
new file mode 100644
index 000000000..2b0cedc69
--- /dev/null
+++ b/macros/scripts/movement.asm
@@ -0,0 +1,246 @@
+; MovementPointers indexes (see engine/movement.asm)
+ enum_start
+
+; Directional movements
+
+ enum movement_turn_head ; $00
+turn_head: macro
+ db movement_turn_head | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+ enum movement_turn_step ; $04
+turn_step: macro
+ db movement_turn_step | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+ enum movement_slow_step ; $08
+slow_step: macro
+ db movement_slow_step | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+ enum movement_step ; $0c
+step: macro
+ db movement_step | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+ enum movement_big_step ; $10
+big_step: macro
+ db movement_big_step | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+ enum movement_slow_slide_step ; $14
+slow_slide_step: macro
+ db movement_slow_slide_step | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+ enum movement_slide_step ; $18
+slide_step: macro
+ db movement_slide_step | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+ enum movement_fast_slide_step ; $1c
+fast_slide_step: macro
+ db movement_fast_slide_step | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+ enum movement_turn_away ; $20
+turn_away: macro
+ db movement_turn_away | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+ enum movement_turn_in ; $24
+turn_in: macro
+ db movement_turn_in | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+ enum movement_turn_waterfall ; $28
+turn_waterfall: macro
+ db movement_turn_waterfall | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+ enum movement_slow_jump_step ; $2c
+slow_jump_step: macro
+ db movement_slow_jump_step | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+ enum movement_jump_step ; $30
+jump_step: macro
+ db movement_jump_step | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+ enum movement_fast_jump_step ; $34
+fast_jump_step: macro
+ db movement_fast_jump_step | \1
+ endm
+
+__enum__ = __enum__ + 3
+
+; Control
+ enum movement_remove_sliding ; $38
+remove_sliding: macro
+ db movement_remove_sliding
+ endm
+
+ enum movement_set_sliding ; $39
+set_sliding: macro
+ db movement_set_sliding
+ endm
+
+ enum movement_remove_fixed_facing ; $3a
+remove_fixed_facing: macro
+ db movement_remove_fixed_facing
+ endm
+
+ enum movement_fix_facing ; $3b
+fix_facing: macro
+ db movement_fix_facing
+ endm
+
+ enum movement_show_object ; $3c
+show_object: macro
+ db movement_show_object
+ endm
+
+ enum movement_hide_object ; $3d
+hide_object: macro
+ db movement_hide_object
+ endm
+
+; Sleep
+
+ enum movement_step_sleep ; $3e
+step_sleep: macro
+if \1 <= 8
+ db movement_step_sleep + \1 - 1
+else
+ db movement_step_sleep + 8, \1
+endc
+endm
+
+__enum__ = __enum__ + 8
+
+ enum movement_step_end ; $47
+step_end: macro
+ db movement_step_end
+ endm
+
+ enum movement_step_48 ; $48
+step_48: macro
+ db movement_step_48
+ db \1 ; ???
+ endm
+
+ enum movement_remove_object ; $49
+remove_object: macro
+ db movement_remove_object
+ endm
+
+ enum movement_step_loop ; $4a
+step_loop: macro
+ db movement_step_loop
+ endm
+
+ enum movement_step_4b ; $4b
+step_4b: macro
+ db movement_step_4b
+ endm
+
+ enum movement_teleport_from ; $4c
+teleport_from: macro
+ db movement_teleport_from
+ endm
+
+ enum movement_teleport_to ; $4d
+teleport_to: macro
+ db movement_teleport_to
+ endm
+
+ enum movement_skyfall ; $4e
+skyfall: macro
+ db movement_skyfall
+ endm
+
+ enum movement_step_dig ; $4f
+step_dig: macro
+ db movement_step_dig
+ db \1 ; length
+ endm
+
+ enum movement_step_bump ; $50
+step_bump: macro
+ db movement_step_bump
+ endm
+
+ enum movement_fish_got_bite ; $51
+fish_got_bite: macro
+ db movement_fish_got_bite
+ endm
+
+ enum movement_fish_cast_rod ; $52
+fish_cast_rod: macro
+ db movement_fish_cast_rod
+ endm
+
+ enum movement_hide_emote ; $53
+hide_emote: macro
+ db movement_hide_emote
+ endm
+
+ enum movement_show_emote ; $54
+show_emote: macro
+ db movement_show_emote
+ endm
+
+ enum movement_step_shake ; $55
+step_shake: macro
+ db movement_step_shake
+ db \1 ; displacement
+ endm
+
+ enum movement_tree_shake ; $56
+tree_shake: macro
+ db movement_tree_shake
+ endm
+
+ enum movement_rock_smash ; $57
+rock_smash: macro
+ db movement_rock_smash
+ db \1 ; length
+ endm
+
+ enum movement_return_dig ; $58
+return_dig: macro
+ db movement_return_dig
+ db \1 ; length
+ endm
+
+ enum movement_skyfall_top ; $59
+skyfall_top: macro
+ db movement_skyfall_top
+ endm
diff --git a/macros/scripts/text.asm b/macros/scripts/text.asm
new file mode 100644
index 000000000..839f78eb7
--- /dev/null
+++ b/macros/scripts/text.asm
@@ -0,0 +1,133 @@
+text EQUS "db \"<START>\"," ; Start writing text.
+next EQUS "db \"<NEXT>\"," ; Move a line down.
+line EQUS "db \"<LINE>\"," ; Start writing at the bottom line.
+page EQUS "db \"@\"," ; Start a new Pokédex page.
+para EQUS "db \"<PARA>\"," ; Start a new paragraph.
+cont EQUS "db \"<CONT>\"," ; Scroll to the next line.
+done EQUS "db \"<DONE>\"" ; End a text box.
+prompt EQUS "db \"<PROMPT>\"" ; Prompt the player to end a text box (initiating some other event).
+
+; TextCommands indexes (see home/text.asm)
+ enum_start $01
+
+ enum TX_RAM ; $01
+text_from_ram: MACRO
+ db TX_RAM
+ dw \1
+ ENDM
+
+ enum TX_BCD ; $02
+text_bcd: macro
+ db TX_BCD
+ dw \1
+ db \2
+ ENDM
+
+ enum TX_MOVE ; $03
+text_move: macro
+ db TX_MOVE
+ dw \1
+ ENDM
+
+ enum TX_BOX ; $04
+text_box: macro
+ db TX_BOX
+ dw \1
+ db \2, \3
+ ENDM
+
+ enum TX_LOW ; $05
+text_low: macro
+ db TX_LOW
+ endm
+
+ enum WAIT_BUTTON ; $06
+text_waitbutton: macro
+ db WAIT_BUTTON
+ endm
+
+ enum TX_SCROLL ; $07
+text_scroll: macro
+ db TX_SCROLL
+ endm
+
+ enum START_ASM ; $08
+start_asm: macro
+ db START_ASM
+ endm
+
+ enum TX_NUM ; $09
+deciram: macro
+ db TX_NUM
+ dw \1 ; address
+ dn \2, \3 ; bytes, digits
+ endm
+
+ enum TX_EXIT ; $0a
+interpret_data: macro
+ db TX_EXIT
+ endm
+
+ enum TX_SOUND_0B ; $0b
+sound_dex_fanfare_50_79: macro
+ db TX_SOUND_0B
+ endm
+
+ enum TX_DOTS ; $0c
+limited_interpret_data: macro
+ db TX_DOTS
+ db \1
+ endm
+
+ enum TX_LINK_WAIT_BUTTON ; $0d
+link_wait_button: macro
+ db TX_LINK_WAIT_BUTTON
+ endm
+
+ enum TX_SOUND_0E ; $0e
+sound_dex_fanfare_20_49: macro
+ db TX_SOUND_0E
+ endm
+
+ enum TX_SOUND_0F ; $0f
+sound_item: macro
+ db TX_SOUND_0F
+ endm
+
+ enum TX_SOUND_10 ; $10
+sound_caught_mon: macro
+ db TX_SOUND_10
+ endm
+
+ enum TX_SOUND_11 ; $11
+sound_dex_fanfare_80_109: macro
+ db TX_SOUND_11
+ endm
+
+ enum TX_SOUND_12 ; $12
+sound_fanfare: macro
+ db TX_SOUND_12
+ endm
+
+ enum TX_SOUND_13 ; $13
+sound_slot_machine_start: macro
+ db TX_SOUND_13
+ endm
+
+ enum TX_STRINGBUFFER ; $14
+text_buffer: macro
+ db TX_STRINGBUFFER
+ db \1
+ endm
+
+ enum TX_DAY ; $15
+current_day: macro
+ db TX_DAY
+ endm
+
+ enum TX_FAR ; $16
+text_jump: MACRO
+ db TX_FAR
+ dw \1
+ db BANK(\1)
+ ENDM
diff --git a/macros/scripts/trade_anim.asm b/macros/scripts/trade_anim.asm
new file mode 100644
index 000000000..4b0291eea
--- /dev/null
+++ b/macros/scripts/trade_anim.asm
@@ -0,0 +1,255 @@
+; DoTradeAnimation.JumpTable indexes (see engine/trade/animation.asm)
+ enum_start
+
+ enum tradeanim_next_command ; $00
+tradeanim_next: macro
+ db tradeanim_next_command
+endm
+
+ enum tradeanim_show_givemon_data_command ; $01
+tradeanim_show_givemon_data: macro
+ db tradeanim_show_givemon_data_command
+endm
+
+ enum tradeanim_show_getmon_data_command ; $02
+tradeanim_show_getmon_data: macro
+ db tradeanim_show_getmon_data_command
+endm
+
+ enum tradeanim_enter_link_tube_command ; $03
+tradeanim_enter_link_tube: macro
+ db tradeanim_enter_link_tube_command
+endm
+
+__enum__ set $5
+
+ enum tradeanim_exit_link_tube_command ; $05
+tradeanim_exit_link_tube: macro
+ db tradeanim_exit_link_tube_command
+endm
+
+ enum tradeanim_tube_to_ot_command ; $06
+tradeanim_tube_to_ot: macro
+ db tradeanim_tube_to_ot_command
+endm
+
+__enum__ set $0e
+
+ enum tradeanim_tube_to_player_command ; $0e
+tradeanim_tube_to_player: macro
+ db tradeanim_tube_to_player_command
+endm
+
+__enum__ set $16
+
+ enum tradeanim_sent_to_ot_text_command ; $16
+tradeanim_sent_to_ot_text: macro
+ db tradeanim_sent_to_ot_text_command
+endm
+
+ enum tradeanim_ot_bids_farewell_command ; $17
+tradeanim_ot_bids_farewell: macro
+ db tradeanim_ot_bids_farewell_command
+endm
+
+ enum tradeanim_take_care_of_text_command ; $18
+tradeanim_take_care_of_text: macro
+ db tradeanim_take_care_of_text_command
+endm
+
+ enum tradeanim_ot_sends_text_1_command ; $19
+tradeanim_ot_sends_text_1: macro
+ db tradeanim_ot_sends_text_1_command
+endm
+
+ enum tradeanim_ot_sends_text_2_command ; $1a
+tradeanim_ot_sends_text_2: macro
+ db tradeanim_ot_sends_text_2_command
+endm
+
+ enum tradeanim_setup_givemon_scroll_command ; $1b
+tradeanim_setup_givemon_scroll: macro
+ db tradeanim_setup_givemon_scroll_command
+endm
+
+ enum tradeanim_do_givemon_scroll_command ; $1c
+tradeanim_do_givemon_scroll: macro
+ db tradeanim_do_givemon_scroll_command
+endm
+
+ enum tradeanim_frontpic_scroll_command ; $1d
+tradeanim_frontpic_scroll: macro
+ db tradeanim_frontpic_scroll_command
+endm
+
+ enum tradeanim_textbox_scroll_command ; $1e
+tradeanim_textbox_scroll: macro
+ db tradeanim_textbox_scroll_command
+endm
+
+ enum tradeanim_scroll_out_right_command ; $1f
+tradeanim_scroll_out_right: macro
+ db tradeanim_scroll_out_right_command
+endm
+
+__enum__ set $21
+
+ enum tradeanim_wait_80_command ; $21
+tradeanim_wait_80: macro
+ db tradeanim_wait_80_command
+endm
+
+ enum tradeanim_wait_40_command ; $22
+tradeanim_wait_40: macro
+ db tradeanim_wait_40_command
+endm
+
+ enum tradeanim_rocking_ball_command ; $23
+tradeanim_rocking_ball: macro
+ db tradeanim_rocking_ball_command
+endm
+
+ enum tradeanim_drop_ball_command ; $24
+tradeanim_drop_ball: macro
+ db tradeanim_drop_ball_command
+endm
+
+ enum tradeanim_wait_anim_command ; $25
+tradeanim_wait_anim: macro
+ db tradeanim_wait_anim_command
+endm
+
+__enum__ set $27
+
+ enum tradeanim_poof_command ; $27
+tradeanim_poof: macro
+ db tradeanim_poof_command
+endm
+
+ enum tradeanim_bulge_through_tube_command ; $28
+tradeanim_bulge_through_tube: macro
+ db tradeanim_bulge_through_tube_command
+endm
+
+ enum tradeanim_give_trademon_sfx_command ; $29
+tradeanim_give_trademon_sfx: macro
+ db tradeanim_give_trademon_sfx_command
+endm
+
+ enum tradeanim_get_trademon_sfx_command ; $2a
+tradeanim_get_trademon_sfx: macro
+ db tradeanim_get_trademon_sfx_command
+endm
+
+ enum tradeanim_end_command ; $2b
+tradeanim_end: macro
+ db tradeanim_end_command
+endm
+
+ enum tradeanim_animate_frontpic_command ; $2c
+tradeanim_animate_frontpic: macro
+ db tradeanim_animate_frontpic_command
+endm
+
+ enum tradeanim_wait_96_command ; $2d
+tradeanim_wait_96: macro
+ db tradeanim_wait_96_command
+endm
+
+ enum tradeanim_wait_80_if_ot_egg_command ; $2e
+tradeanim_wait_80_if_ot_egg: macro
+ db tradeanim_wait_80_if_ot_egg_command
+endm
+
+ enum tradeanim_wait_180_if_ot_egg_command ; $2f
+tradeanim_wait_180_if_ot_egg: macro
+ db tradeanim_wait_180_if_ot_egg_command
+endm
+
+
+; Mobile
+ enum_start $01
+
+ enum mobiletradeanim_showgivemon_command ; $01
+mobiletradeanim_showgivemon: macro
+ db mobiletradeanim_showgivemon_command
+endm
+
+ enum mobiletradeanim_02_command ; $02
+mobiletradeanim_02: macro
+ db mobiletradeanim_02_command
+endm
+
+ enum mobiletradeanim_sendmon_command ; $03
+mobiletradeanim_sendmon: macro
+ db mobiletradeanim_sendmon_command
+endm
+
+__enum__ set $05
+
+ enum mobiletradeanim_05_command ; $05
+mobiletradeanim_05: macro
+ db mobiletradeanim_05_command
+endm
+
+ enum mobiletradeanim_06_command ; $06
+mobiletradeanim_06: macro
+ db mobiletradeanim_06_command
+endm
+
+ enum mobiletradeanim_07_command ; $07
+mobiletradeanim_07: macro
+ db mobiletradeanim_07_command
+endm
+
+ enum mobiletradeanim_receivemon_command ; $08
+mobiletradeanim_receivemon: macro
+ db mobiletradeanim_receivemon_command
+endm
+
+__enum__ set $0b
+
+ enum mobiletradeanim_showgetmon_command ; $0b
+mobiletradeanim_showgetmon: macro
+ db mobiletradeanim_showgetmon_command
+endm
+
+ enum mobiletradeanim_end_command ; $0c
+mobiletradeanim_end: macro
+ db mobiletradeanim_end_command
+endm
+
+ enum mobiletradeanim_showgtsgivemon_command ; $0d
+mobiletradeanim_showgtsgivemon: macro
+ db mobiletradeanim_showgtsgivemon_command
+endm
+
+ enum mobiletradeanim_showgtsgetmon_command ; $0e
+mobiletradeanim_showgtsgetmon: macro
+ db mobiletradeanim_showgtsgetmon_command
+endm
+
+ enum mobiletradeanim_0f_command ; $0f
+mobiletradeanim_0f: macro
+ db mobiletradeanim_0f_command
+endm
+
+ enum mobiletradeanim_10_command ; $10
+mobiletradeanim_10: macro
+ db mobiletradeanim_10_command
+endm
+
+ enum mobiletradeanim_11_command ; $11
+mobiletradeanim_11: macro
+ db mobiletradeanim_11_command
+endm
+
+ enum mobiletradeanim_12_command ; $12
+mobiletradeanim_12: macro
+ db mobiletradeanim_12_command
+endm
+
+ enum mobiletradeanim_showoddegg_command ; $13
+mobiletradeanim_showoddegg: macro
+ db mobiletradeanim_showoddegg_command
+endm
diff --git a/macros/sound.asm b/macros/sound.asm
deleted file mode 100644
index ad6a50749..000000000
--- a/macros/sound.asm
+++ /dev/null
@@ -1,263 +0,0 @@
-note: MACRO
- dn (\1), (\2) - 1
- ENDM
-
-sound: macro
- note \1, \2
- db \3 ; intensity
- dw \4 ; frequency
- endm
-
-noise: macro
- note \1, \2 ; duration
- db \3 ; intensity
- db \4 ; frequency
- endm
-
-musicheader: macro
- ; number of tracks, track idx, address
- dbw ((\1 - 1) << 6) + (\2 - 1), \3
- endm
-
-cry_header: macro
- dw \1, \2, \3
- endm
-
- enum_start $d8
- enum notetype_cmd
-octave: macro
- db notetype_cmd - (\1)
- endm
-
-notetype: macro
- db notetype_cmd
- db \1 ; note_length
- if _NARG >= 2
- db \2 ; intensity
- endc
- endm
-
- enum pitchoffset_cmd
-pitchoffset: macro
- db pitchoffset_cmd
- dn \1, \2 - 1 ; octave, key
- endm
-
- enum tempo_cmd
-tempo: macro
- db tempo_cmd
- bigdw \1 ; tempo
- endm
-
- enum dutycycle_cmd
-dutycycle: macro
- db dutycycle_cmd
- db \1 ; duty_cycle
- endm
-
- enum intensity_cmd
-intensity: macro
- db intensity_cmd
- db \1 ; intensity
- endm
-
- enum soundinput_cmd
-soundinput: macro
- db soundinput_cmd
- db \1 ; input
- endm
-
- enum sound_duty_cmd
-sound_duty: macro
- db sound_duty_cmd
- db \1 | (\2 << 2) | (\3 << 4) | (\4 << 6) ; duty sequence
- endm
-
- enum togglesfx_cmd
-togglesfx: macro
- db togglesfx_cmd
- endm
-
- enum slidepitchto_cmd
-slidepitchto: macro
- db slidepitchto_cmd
- db \1 - 1 ; duration
- dn \2, \3 ; octave, pitch
- endm
-
- enum vibrato_cmd
-vibrato: macro
- db vibrato_cmd
- db \1 ; delay
- db \2 ; extent
- endm
-
- enum unknownmusic0xe2_cmd
-unknownmusic0xe2: macro
- db unknownmusic0xe2_cmd
- db \1 ; unknown
- endm
-
- enum togglenoise_cmd
-togglenoise: macro
- db togglenoise_cmd
- db \1 ; id
- endm
-
- enum panning_cmd
-panning: macro
- db panning_cmd
- db \1 ; tracks
- endm
-
- enum volume_cmd
-volume: macro
- db volume_cmd
- db \1 ; volume
- endm
-
- enum tone_cmd
-tone: macro
- db tone_cmd
- bigdw \1 ; tone
- endm
-
- enum unknownmusic0xe7_cmd
-unknownmusic0xe7: macro
- db unknownmusic0xe7_cmd
- db \1 ; unknown
- endm
-
- enum unknownmusic0xe8_cmd
-unknownmusic0xe8: macro
- db unknownmusic0xe8_cmd
- db \1 ; unknown
- endm
-
- enum tempo_relative_cmd
-tempo_relative: macro
- db tempo_relative_cmd
- bigdw \1 ; value
- endm
-
- enum restartchannel_cmd
-restartchannel: macro
- db restartchannel_cmd
- dw \1 ; address
- endm
-
- enum newsong_cmd
-newsong: macro
- db newsong_cmd
- bigdw \1 ; id
- endm
-
- enum sfxpriorityon_cmd
-sfxpriorityon: macro
- db sfxpriorityon_cmd
- endm
-
- enum sfxpriorityoff_cmd
-sfxpriorityoff: macro
- db sfxpriorityoff_cmd
- endm
-
- enum unknownmusic0xee_cmd
-unknownmusic0xee: macro
- db unknownmusic0xee_cmd
- dw \1 ; address
- endm
-
- enum stereopanning_cmd
-stereopanning: macro
- db stereopanning_cmd
- db \1 ; tracks
- endm
-
- enum sfxtogglenoise_cmd
-sfxtogglenoise: macro
- db sfxtogglenoise_cmd
- db \1 ; id
- endm
-
- enum music0xf1_cmd
-music0xf1: macro
- db music0xf1_cmd
- endm
-
- enum music0xf2_cmd
-music0xf2: macro
- db music0xf2_cmd
- endm
-
- enum music0xf3_cmd
-music0xf3: macro
- db music0xf3_cmd
- endm
-
- enum music0xf4_cmd
-music0xf4: macro
- db music0xf4_cmd
- endm
-
- enum music0xf5_cmd
-music0xf5: macro
- db music0xf5_cmd
- endm
-
- enum music0xf6_cmd
-music0xf6: macro
- db music0xf6_cmd
- endm
-
- enum music0xf7_cmd
-music0xf7: macro
- db music0xf7_cmd
- endm
-
- enum music0xf8_cmd
-music0xf8: macro
- db music0xf8_cmd
- endm
-
- enum unknownmusic0xf9_cmd
-unknownmusic0xf9: macro
- db unknownmusic0xf9_cmd
- endm
-
- enum setcondition_cmd
-setcondition: macro
- db setcondition_cmd
- db \1 ; condition
- endm
-
- enum jumpif_cmd
-jumpif: macro
- db jumpif_cmd
- db \1 ; condition
- dw \2 ; address
- endm
-
- enum jumpchannel_cmd
-jumpchannel: macro
- db jumpchannel_cmd
- dw \1 ; address
- endm
-
- enum loopchannel_cmd
-loopchannel: macro
- db loopchannel_cmd
- db \1 ; count
- dw \2 ; address
- endm
-
- enum callchannel_cmd
-callchannel: macro
- db callchannel_cmd
- dw \1 ; address
- endm
-
- enum endchannel_cmd
-endchannel: macro
- db endchannel_cmd
- endm
diff --git a/macros/text.asm b/macros/text.asm
deleted file mode 100644
index cc7f609b6..000000000
--- a/macros/text.asm
+++ /dev/null
@@ -1,137 +0,0 @@
-text EQUS "db $00," ; Start writing text.
-next EQUS "db $4e," ; Move a line down.
-line EQUS "db $4f," ; Start writing at the bottom line.
-para EQUS "db $51," ; Start a new paragraph.
-cont EQUS "db $55," ; Scroll to the next line.
-done EQUS "db $57" ; End a text box.
-prompt EQUS "db $58" ; Prompt the player to end a text box (initiating some other event).
-
-; Pokedex text commands are only used with pokered.
-; They are included for compatibility.
-page EQUS "db $50," ; Start a new Pokedex page.
-dex EQUS "db $e8, $50" ; End a Pokedex entry.
-
-; TX_RAM EQU $01
-; TX_FAR EQU $16
- enum_start 1
- enum TX_RAM
-text_from_ram: MACRO
- db TX_RAM
- dw \1
- ENDM
-
- enum TX_BCD
-text_bcd: macro
- db TX_BCD
- dw \1
- db \2
- ENDM
-
- enum TX_MOVE
-text_move: macro
- db TX_MOVE
- dw \1
- ENDM
-
- enum TX_BOX
-text_box: macro
- db TX_BOX
- dw \1
- db \2, \3
- ENDM
-
- enum TX_LOW
-text_low: macro
- db TX_LOW
- endm
-
- enum WAIT_BUTTON
-text_waitbutton: macro
- db WAIT_BUTTON
- endm
-
- enum TX_SCROLL
-text_scroll: macro
- db TX_SCROLL
- endm
-
- enum START_ASM
-start_asm: macro
- db START_ASM
- endm
-
- enum TX_NUM
-deciram: macro
- db TX_NUM
- dw \1 ; address
- dn \2, \3 ; bytes, digits
- endm
-
- enum TX_EXIT
-interpret_data: macro
- db TX_EXIT
- endm
-
- enum TX_SOUND_0B
-sound_dex_fanfare_50_79: macro
- db TX_SOUND_0B
- endm
-
- enum TX_DOTS
-limited_interpret_data: macro
- db TX_DOTS
- db \1
- endm
-
- enum TX_LINK_WAIT_BUTTON
-link_wait_button: macro
- db TX_LINK_WAIT_BUTTON
- endm
-
- enum TX_SOUND_0E
-sound_dex_fanfare_20_49: macro
- db TX_SOUND_0E
- endm
-
- enum TX_SOUND_0F
-sound_item: macro
- db TX_SOUND_0F
- endm
-
- enum TX_SOUND_10
-sound_caught_mon: macro
- db TX_SOUND_10
- endm
-
- enum TX_SOUND_11
-sound_dex_fanfare_80_109: macro
- db TX_SOUND_11
- endm
-
- enum TX_SOUND_12
-sound_fanfare: macro
- db TX_SOUND_12
- endm
-
- enum TX_SOUND_13
-sound_slot_machine_start: macro
- db TX_SOUND_13
- endm
-
- enum TX_STRINGBUFFER
-text_buffer: macro
- db TX_STRINGBUFFER
- db \1
- endm
-
- enum TX_DAY
-current_day: macro
- db TX_DAY
- endm
-
- enum TX_FAR
-text_jump: MACRO
- db TX_FAR
- dw \1
- db BANK(\1)
- ENDM
diff --git a/macros/tilesets.asm b/macros/tilesets.asm
new file mode 100755
index 000000000..aeb1d8174
--- /dev/null
+++ b/macros/tilesets.asm
@@ -0,0 +1,15 @@
+; Used in tilesets/*.asm
+
+tilepal: MACRO
+; vram bank, pals
+x = \1 << OAM_TILE_BANK
+rept (_NARG +- 1) / 2
+ dn (x | PAL_BG_\3), (x | PAL_BG_\2)
+ shift
+ shift
+endr
+endm
+
+tilecoll: MACRO
+ db COLL_\1, COLL_\2, COLL_\3, COLL_\4
+endm
diff --git a/macros/trade_anim.asm b/macros/trade_anim.asm
deleted file mode 100755
index c590cb620..000000000
--- a/macros/trade_anim.asm
+++ /dev/null
@@ -1,253 +0,0 @@
- enum_start
- enum tradeanim_next_command
-tradeanim_next: macro
- db tradeanim_next_command ; 00
-endm
-
- enum tradeanim_show_givemon_data_command
-tradeanim_show_givemon_data: macro
- db tradeanim_show_givemon_data_command ; 01
-endm
-
- enum tradeanim_show_getmon_data_command
-tradeanim_show_getmon_data: macro
- db tradeanim_show_getmon_data_command ; 02
-endm
-
- enum tradeanim_enter_link_tube_command
-tradeanim_enter_link_tube: macro
- db tradeanim_enter_link_tube_command ; 03
-endm
-
-__enum__ set $5
-
- enum tradeanim_exit_link_tube_command
-tradeanim_exit_link_tube: macro
- db tradeanim_exit_link_tube_command ; 05
-endm
-
- enum tradeanim_tube_to_ot_command
-tradeanim_tube_to_ot: macro
- db tradeanim_tube_to_ot_command ; 06
-endm
-
-__enum__ set $e
-
- enum tradeanim_tube_to_player_command
-tradeanim_tube_to_player: macro
- db tradeanim_tube_to_player_command ; 0e
-endm
-
-__enum__ set $16
-
- enum tradeanim_sent_to_ot_text_command
-tradeanim_sent_to_ot_text: macro
- db tradeanim_sent_to_ot_text_command ; 16
-endm
-
- enum tradeanim_ot_bids_farewell_command
-tradeanim_ot_bids_farewell: macro
- db tradeanim_ot_bids_farewell_command ; 17
-endm
-
- enum tradeanim_take_care_of_text_command
-tradeanim_take_care_of_text: macro
- db tradeanim_take_care_of_text_command ; 18
-endm
-
- enum tradeanim_ot_sends_text_1_command
-tradeanim_ot_sends_text_1: macro
- db tradeanim_ot_sends_text_1_command ; 19
-endm
-
- enum tradeanim_ot_sends_text_2_command
-tradeanim_ot_sends_text_2: macro
- db tradeanim_ot_sends_text_2_command ; 1a
-endm
-
- enum tradeanim_setup_givemon_scroll_command
-tradeanim_setup_givemon_scroll: macro
- db tradeanim_setup_givemon_scroll_command ; 1b
-endm
-
- enum tradeanim_do_givemon_scroll_command
-tradeanim_do_givemon_scroll: macro
- db tradeanim_do_givemon_scroll_command ; 1c
-endm
-
- enum tradeanim_frontpic_scroll_command
-tradeanim_frontpic_scroll: macro
- db tradeanim_frontpic_scroll_command ; 1d
-endm
-
- enum tradeanim_textbox_scroll_command
-tradeanim_textbox_scroll: macro
- db tradeanim_textbox_scroll_command ; 1e
-endm
-
- enum tradeanim_scroll_out_right_command
-tradeanim_scroll_out_right: macro
- db tradeanim_scroll_out_right_command ; 1f
-endm
-
-__enum__ set $21
-
- enum tradeanim_wait_80_command
-tradeanim_wait_80: macro
- db tradeanim_wait_80_command ; 21
-endm
-
- enum tradeanim_wait_40_command
-tradeanim_wait_40: macro
- db tradeanim_wait_40_command ; 22
-endm
-
- enum tradeanim_rocking_ball_command
-tradeanim_rocking_ball: macro
- db tradeanim_rocking_ball_command ; 23
-endm
-
- enum tradeanim_drop_ball_command
-tradeanim_drop_ball: macro
- db tradeanim_drop_ball_command ; 24
-endm
-
- enum tradeanim_wait_anim_command
-tradeanim_wait_anim: macro
- db tradeanim_wait_anim_command ; 25
-endm
-
-__enum__ set $27
-
- enum tradeanim_poof_command
-tradeanim_poof: macro
- db tradeanim_poof_command ; 27
-endm
-
- enum tradeanim_bulge_through_tube_command
-tradeanim_bulge_through_tube: macro
- db tradeanim_bulge_through_tube_command ; 28
-endm
-
- enum tradeanim_give_trademon_sfx_command
-tradeanim_give_trademon_sfx: macro
- db tradeanim_give_trademon_sfx_command ; 29
-endm
-
- enum tradeanim_get_trademon_sfx_command
-tradeanim_get_trademon_sfx: macro
- db tradeanim_get_trademon_sfx_command ; 2a
-endm
-
- enum tradeanim_end_command
-tradeanim_end: macro
- db tradeanim_end_command ; 2b
-endm
-
- enum tradeanim_animate_frontpic_command
-tradeanim_animate_frontpic: macro
- db tradeanim_animate_frontpic_command ; 2c
-endm
-
- enum tradeanim_wait_96_command
-tradeanim_wait_96: macro
- db tradeanim_wait_96_command ; 2d
-endm
-
- enum tradeanim_wait_80_if_ot_egg_command
-tradeanim_wait_80_if_ot_egg: macro
- db tradeanim_wait_80_if_ot_egg_command ; 2e
-endm
-
- enum tradeanim_wait_180_if_ot_egg_command
-tradeanim_wait_180_if_ot_egg: macro
- db tradeanim_wait_180_if_ot_egg_command ; 2f
-endm
-
-
-; Mobile
- enum_start 1
-
- enum mobiletradeanim_showgivemon_command
-mobiletradeanim_showgivemon: macro
- db mobiletradeanim_showgivemon_command ; 01
-endm
-
- enum mobiletradeanim_02_command
-mobiletradeanim_02: macro
- db mobiletradeanim_02_command ; 02
-endm
-
- enum mobiletradeanim_sendmon_command
-mobiletradeanim_sendmon: macro
- db mobiletradeanim_sendmon_command ; 03
-endm
-
-__enum__ set $05
-
- enum mobiletradeanim_05_command
-mobiletradeanim_05: macro
- db mobiletradeanim_05_command ; 05
-endm
-
- enum mobiletradeanim_06_command
-mobiletradeanim_06: macro
- db mobiletradeanim_06_command ; 06
-endm
-
- enum mobiletradeanim_07_command
-mobiletradeanim_07: macro
- db mobiletradeanim_07_command ; 07
-endm
-
- enum mobiletradeanim_receivemon_command
-mobiletradeanim_receivemon: macro
- db mobiletradeanim_receivemon_command ; 08
-endm
-
-__enum__ set $0b
-
- enum mobiletradeanim_showgetmon_command
-mobiletradeanim_showgetmon: macro
- db mobiletradeanim_showgetmon_command ; 0b
-endm
-
- enum mobiletradeanim_end_command
-mobiletradeanim_end: macro
- db mobiletradeanim_end_command ; 0c
-endm
-
- enum mobiletradeanim_showgtsgivemon_command
-mobiletradeanim_showgtsgivemon: macro
- db mobiletradeanim_showgtsgivemon_command ; 0d
-endm
-
- enum mobiletradeanim_showgtsgetmon_command
-mobiletradeanim_showgtsgetmon: macro
- db mobiletradeanim_showgtsgetmon_command ; 0e
-endm
-
- enum mobiletradeanim_0f_command
-mobiletradeanim_0f: macro
- db mobiletradeanim_0f_command ; 0f
-endm
-
- enum mobiletradeanim_10_command
-mobiletradeanim_10: macro
- db mobiletradeanim_10_command ; 10
-endm
-
- enum mobiletradeanim_11_command
-mobiletradeanim_11: macro
- db mobiletradeanim_11_command ; 11
-endm
-
- enum mobiletradeanim_12_command
-mobiletradeanim_12: macro
- db mobiletradeanim_12_command ; 12
-endm
-
- enum mobiletradeanim_showoddegg_command
-mobiletradeanim_showoddegg: macro
- db mobiletradeanim_showoddegg_command ; 13
-endm
diff --git a/macros/trainer.asm b/macros/trainer.asm
deleted file mode 100644
index 2e6c61884..000000000
--- a/macros/trainer.asm
+++ /dev/null
@@ -1,11 +0,0 @@
-trainerclass: MACRO
- enum \1
-const_value = 1
-ENDM
-
-trainer: MACRO
- ; flag, group, id, seen text, win text, lost text, talk-again text
- dw \1
- db \2, \3
- dw \4, \5, \6, \7
-ENDM
diff --git a/macros/wram.asm b/macros/wram.asm
index ce53dc5c7..e47e0a2f4 100755
--- a/macros/wram.asm
+++ b/macros/wram.asm
@@ -1,3 +1,4 @@
+; Used in wram.asm
flag_array: MACRO
ds ((\1) + 7) / 8
@@ -15,7 +16,7 @@ box_struct: MACRO
\1DefExp:: dw
\1SpdExp:: dw
\1SpcExp:: dw
-\1DVs:: ds 2
+\1DVs:: dw
\1PP:: ds NUM_MOVES
\1Happiness:: db
\1PokerusStatus:: db
@@ -60,7 +61,7 @@ red_box_struct: MACRO
\1DefenseExp:: dw
\1SpeedExp:: dw
\1SpecialExp:: dw
-\1DVs:: ds 2
+\1DVs:: dw
\1PP:: ds NUM_MOVES
ENDM
@@ -81,7 +82,7 @@ battle_struct: MACRO
\1Item:: db
\1Moves:: ds NUM_MOVES
\1MovesEnd::
-\1DVs:: ds 2
+\1DVs:: dw
\1PP:: ds NUM_MOVES
\1Happiness:: db
\1Level:: db
@@ -103,7 +104,7 @@ ENDM
box: MACRO
\1::
-\1Count:: ds 1
+\1Count:: db
\1Species:: ds MONS_PER_BOX + 1
\1Mons::
\1Mon1:: box_struct \1Mon1
@@ -115,6 +116,18 @@ box: MACRO
ENDM
+map_connection_struct: MACRO
+\1ConnectedMapGroup:: db
+\1ConnectedMapNumber:: db
+\1ConnectionStripPointer:: dw
+\1ConnectionStripLocation:: dw
+\1ConnectionStripLength:: db
+\1ConnectedMapWidth:: db
+\1ConnectionStripYOffset:: db
+\1ConnectionStripXOffset:: db
+\1ConnectionWindow:: dw
+ENDM
+
channel_struct: MACRO
; Addreses are Channel1 (c101).
\1MusicID:: dw
@@ -134,14 +147,14 @@ channel_struct: MACRO
\1FrequencyHi:: db
\1Pitch:: db ; 0:rest 1-c:note
\1Octave:: db ; 7-0 (0 is highest)
-\1PitchOffset:: db ; raises existing octaves (to repeat phrases)
+\1PitchOffset:: db ; raises existing octaves (to repeat phrases)
\1NoteDuration:: db ; frames remaining for the current note
\1Field0x16:: ds 1 ; c117
ds 1 ; c118
\1LoopCount:: db
\1Tempo:: dw
\1Tracks:: db ; hi:left lo:right
-\1SFXDutyLoop:: ds 1 ; c11d
+\1SFXDutyLoop:: db ; c11d
\1VibratoDelayCount:: db ; initialized by \1VibratoDelay
\1VibratoDelay:: db ; number of frames a note plays until vibrato starts
\1VibratoExtent:: db
@@ -149,7 +162,7 @@ channel_struct: MACRO
\1PitchWheelTarget:: dw ; frequency endpoint for pitch wheel
\1PitchWheelAmount:: db ; c124
\1PitchWheelAmountFraction:: db ; c125
-\1Field0x25:: ds 1 ; c126
+\1Field0x25:: db ; c126
ds 1 ; c127
\1CryPitch:: dw
\1Field0x29:: ds 1
@@ -179,22 +192,13 @@ battle_tower_struct: MACRO
endm
mailmsg: MACRO
-\1Message:: ds MAIL_MSG_LENGTH
+\1Message:: ds MAIL_MSG_LENGTH
\1MessageEnd:: ds 1
-\1Author:: ds PLAYER_NAME_LENGTH
+\1Author:: ds PLAYER_NAME_LENGTH
\1AuthorNationality:: ds 2
-\1AuthorID:: ds 2
-\1Species:: ds 1
-\1Type:: ds 1
-\1End::
-endm
-
-hof_mon: MACRO
-\1Species:: ds 1
-\1ID:: ds 2
-\1DVs:: ds 2
-\1Level:: ds 1
-\1Nickname:: ds PKMN_NAME_LENGTH +- 1
+\1AuthorID:: dw
+\1Species:: db
+\1Type:: db
\1End::
endm
@@ -203,19 +207,27 @@ roam_struct: MACRO
\1Level:: db
\1MapGroup:: db
\1MapNumber:: db
-\1HP:: ds 1
-\1DVs:: ds 2
+\1HP:: db
+\1DVs:: dw
ENDM
bugcontestwinner: macro
-\1PersonID:: ds 1
-\1Mon:: ds 1
-\1Score:: ds 2
+\1WinnerID:: db
+\1Mon:: db
+\1Score:: dw
+endm
+
+hof_mon: MACRO
+\1Species:: db
+\1ID:: dw
+\1DVs:: dw
+\1Level:: db
+\1Nickname:: ds PKMN_NAME_LENGTH +- 1
+\1End::
endm
hall_of_fame: MACRO
-\1::
-\1WinCount:: ds 1
+\1WinCount:: db
\1Mon1:: hof_mon \1Mon1
\1Mon2:: hof_mon \1Mon2
\1Mon3:: hof_mon \1Mon3
@@ -225,26 +237,34 @@ hall_of_fame: MACRO
\1End:: ds 1
ENDM
+link_battle_record: MACRO
+\1Name:: ds NAME_LENGTH +- 1
+\1ID:: dw
+\1Wins:: dw
+\1Losses:: dw
+\1Draws:: dw
+ENDM
+
trademon: MACRO
-\1Species:: ds 1 ; wc6d0 | wc702
+\1Species:: db ; wc6d0 | wc702
\1SpeciesName:: ds PKMN_NAME_LENGTH ; wc6d1 | wc703
-\1Nickname:: ds PKMN_NAME_LENGTH ; wc6dc | wc70e
-\1SenderName:: ds NAME_LENGTH ; wc6e7 | wc719
-\1OTName:: ds NAME_LENGTH ; wc6f2 | wc724
-\1DVs:: ds 2 ; wc6fd | wc72f
-\1ID:: ds 2 ; wc6ff | wc731
-\1CaughtData:: ds 1 ; wc701 | wc733
+\1Nickname:: ds PKMN_NAME_LENGTH ; wc6dc | wc70e
+\1SenderName:: ds NAME_LENGTH ; wc6e7 | wc719
+\1OTName:: ds NAME_LENGTH ; wc6f2 | wc724
+\1DVs:: dw ; wc6fd | wc72f
+\1ID:: dw ; wc6ff | wc731
+\1CaughtData:: db ; wc701 | wc733
\1End::
ENDM
move_struct: MACRO
-\1Animation:: ds 1
-\1Effect:: ds 1
-\1Power:: ds 1
-\1Type:: ds 1
-\1Accuracy:: ds 1
-\1PP:: ds 1
-\1EffectChance:: ds 1
+\1Animation:: db
+\1Effect:: db
+\1Power:: db
+\1Type:: db
+\1Accuracy:: db
+\1PP:: db
+\1EffectChance:: db
endm
slot_reel: MACRO
@@ -266,109 +286,109 @@ endm
object_struct: MACRO
\1Struct::
-\1Sprite:: ds 1
-\1MapObjectIndex:: ds 1
-\1SpriteTile:: ds 1
-\1MovementType:: ds 1
-\1Flags:: ds 2
-\1Palette:: ds 1
-\1Walking:: ds 1
-\1Direction:: ds 1
-\1StepType:: ds 1
-\1StepDuration:: ds 1
-\1Action:: ds 1
-\1ObjectStepFrame:: ds 1
-\1Facing:: ds 1
-\1StandingTile:: ds 1 ; collision
-\1LastTile:: ds 1 ; collision
-\1StandingMapX:: ds 1
-\1StandingMapY:: ds 1
-\1LastMapX:: ds 1
-\1LastMapY:: ds 1
-\1ObjectInitX:: ds 1
-\1ObjectInitY:: ds 1
-\1Radius:: ds 1
-\1SpriteX:: ds 1
-\1SpriteY:: ds 1
-\1SpriteXOffset:: ds 1
-\1SpriteYOffset:: ds 1
-\1MovementByteIndex:: ds 1
-\1Object28:: ds 1
-\1Object29:: ds 1
-\1Object30:: ds 1
-\1Object31:: ds 1
-\1Range:: ds 1
+\1Sprite:: db
+\1MapObjectIndex:: db
+\1SpriteTile:: db
+\1MovementType:: db
+\1Flags:: dw
+\1Palette:: db
+\1Walking:: db
+\1Direction:: db
+\1StepType:: db
+\1StepDuration:: db
+\1Action:: db
+\1ObjectStepFrame:: db
+\1Facing:: db
+\1StandingTile:: db ; collision
+\1LastTile:: db ; collision
+\1StandingMapX:: db
+\1StandingMapY:: db
+\1LastMapX:: db
+\1LastMapY:: db
+\1ObjectInitX:: db
+\1ObjectInitY:: db
+\1Radius:: db
+\1SpriteX:: db
+\1SpriteY:: db
+\1SpriteXOffset:: db
+\1SpriteYOffset:: db
+\1MovementByteIndex:: db
+\1Object28:: ds 1
+\1Object29:: ds 1
+\1Object30:: ds 1
+\1Object31:: ds 1
+\1Range:: db
ds 7
\1StructEnd::
ENDM
map_object: MACRO
\1Object::
-\1ObjectStructID:: ds 1
-\1ObjectSprite:: ds 1
-\1ObjectYCoord:: ds 1
-\1ObjectXCoord:: ds 1
-\1ObjectMovement:: ds 1
-\1ObjectRadius:: ds 1
-\1ObjectHour:: ds 1
-\1ObjectTimeOfDay:: ds 1
-\1ObjectColor:: ds 1
-\1ObjectRange:: ds 1
-\1ObjectScript:: ds 2
-\1ObjectEventFlag:: ds 2
+\1ObjectStructID:: db
+\1ObjectSprite:: db
+\1ObjectYCoord:: db
+\1ObjectXCoord:: db
+\1ObjectMovement:: db
+\1ObjectRadius:: db
+\1ObjectHour:: db
+\1ObjectTimeOfDay:: db
+\1ObjectColor:: db
+\1ObjectRange:: db
+\1ObjectScript:: dw
+\1ObjectEventFlag:: dw
ds 2
endm
sprite_anim_struct: MACRO
-\1Index:: ds 1 ; 0
-\1FramesetID:: ds 1 ; 1
-\1AnimSeqID:: ds 1 ; 2
-\1TileID:: ds 1 ; 3
-\1XCoord:: ds 1 ; 4
-\1YCoord:: ds 1 ; 5
-\1XOffset:: ds 1 ; 6
-\1YOffset:: ds 1 ; 7
-\1Duration:: ds 1 ; 8
-\1DurationOffset:: ds 1 ; 9
-\1FrameIndex:: ds 1 ; a
-\1Sprite0b:: ds 1
-\1Sprite0c:: ds 1
-\1Sprite0d:: ds 1
-\1Sprite0e:: ds 1
-\1Sprite0f:: ds 1
+\1Index:: db
+\1FramesetID:: db
+\1AnimSeqID:: db
+\1TileID:: db
+\1XCoord:: db
+\1YCoord:: db
+\1XOffset:: db
+\1YOffset:: db
+\1Duration:: db
+\1DurationOffset:: db
+\1FrameIndex:: db
+\1Sprite0b:: ds 1
+\1Sprite0c:: ds 1
+\1Sprite0d:: ds 1
+\1Sprite0e:: ds 1
+\1Sprite0f:: ds 1
ENDM
battle_anim_struct: MACRO
; Placeholder until we can figure out what it all means
-\1_Index:: ds 1
-\1_Anim01:: ds 1
-\1_Anim02:: ds 1
-\1_FramesetIndex:: ds 1
-\1_FunctionIndex:: ds 1
-\1_Anim05:: ds 1
-\1_TileID:: ds 1
-\1_XCoord:: ds 1
-\1_YCoord:: ds 1
-\1_XOffset:: ds 1
-\1_YOffset:: ds 1
-\1_Anim0b:: ds 1
-\1_Anim0c:: ds 1
-\1_Anim0d:: ds 1
-\1_AnonJumptableIndex:: ds 1
-\1_Anim0f:: ds 1
-\1_Anim10:: ds 1
-\1_Anim11:: ds 1
-\1_Anim12:: ds 1
-\1_Anim13:: ds 1
-\1_Anim14:: ds 1
-\1_Anim15:: ds 1
-\1_Anim16:: ds 1
-\1_Anim17:: ds 1
+\1_Index:: db
+\1_Anim01:: ds 1
+\1_Anim02:: ds 1
+\1_FramesetIndex:: db
+\1_FunctionIndex:: db
+\1_Anim05:: ds 1
+\1_TileID:: db
+\1_XCoord:: db
+\1_YCoord:: db
+\1_XOffset:: db
+\1_YOffset:: db
+\1_Anim0b:: ds 1
+\1_Anim0c:: ds 1
+\1_Anim0d:: ds 1
+\1_AnonJumptableIndex:: db
+\1_Anim0f:: ds 1
+\1_Anim10:: ds 1
+\1_Anim11:: ds 1
+\1_Anim12:: ds 1
+\1_Anim13:: ds 1
+\1_Anim14:: ds 1
+\1_Anim15:: ds 1
+\1_Anim16:: ds 1
+\1_Anim17:: ds 1
endm
battle_bg_effect: MACRO
-\1_Function:: ds 1
-\1_01:: ds 1
-\1_02:: ds 1
-\1_03:: ds 1
+\1_Function:: db
+\1_01:: ds 1
+\1_02:: ds 1
+\1_03:: ds 1
endm
diff --git a/main.asm b/main.asm
index 123b4e434..6abdc9242 100644
--- a/main.asm
+++ b/main.asm
@@ -1,280 +1,33 @@
INCLUDE "includes.asm"
-SECTION "bank1", ROMX
-
-PlaceWaitingText:: ; 4000
- hlcoord 3, 10
- ld b, 1
- ld c, 11
-
- ld a, [wBattleMode]
- and a
- jr z, .notinbattle
-
- call TextBox
- jr .proceed
-
-.notinbattle
- predef Predef_LinkTextbox
-
-.proceed
- hlcoord 4, 11
- ld de, .Waiting
- call PlaceString
- ld c, 50
- jp DelayFrames
-
-.Waiting: ; 4025
- db "Waiting...!@"
-
-LoadPushOAM:: ; 4031
- ld c, hPushOAM - $ff00
- ld b, PushOAMEnd - PushOAM
- ld hl, PushOAM
-.loop
- ld a, [hli]
- ld [$ff00+c], a
- inc c
- dec b
- jr nz, .loop
- ret
-PushOAM: ; 403f
- ld a, Sprites / $100
- ld [rDMA], a
- ld a, (SpritesEnd - Sprites) / 4 ; 40
-.loop
- dec a
- jr nz, .loop
- ret
-PushOAMEnd
+SECTION "bank1", ROMX
+INCLUDE "engine/routines/placewaitingtext.asm"
+INCLUDE "engine/routines/loadpushoam.asm"
INCLUDE "engine/map_objects.asm"
-
INCLUDE "engine/intro_menu.asm"
-
-ReanchorBGMap_NoOAMUpdate:: ; 6454
- call DelayFrame
- ld a, [hOAMUpdate]
- push af
-
- ld a, $1
- ld [hOAMUpdate], a
- ld a, [hBGMapMode]
- push af
- xor a
- ld [hBGMapMode], a
-
- call .ReanchorBGMap
-
- pop af
- ld [hBGMapMode], a
- pop af
- ld [hOAMUpdate], a
- ld hl, VramState
- set 6, [hl]
- ret
-
-.ReanchorBGMap:
- xor a
- ld [hLCDCPointer], a
- ld [hBGMapMode], a
- ld a, $90
- ld [hWY], a
- call OverworldTextModeSwitch
- ld a, VBGMap1 / $100
- call .LoadBGMapAddrIntoHRAM
- call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
- callba LoadOW_BGPal7
- callba ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- xor a
- ld [hBGMapMode], a
- ld [hWY], a
- callba HDMATransfer_FillBGMap0WithTile60 ; no need to farcall
- ld a, VBGMap0 / $100
- call .LoadBGMapAddrIntoHRAM
- xor a
- ld [wBGMapAnchor], a
- ld a, VBGMap0 / $100
- ld [wBGMapAnchor + 1], a
- xor a
- ld [hSCX], a
- ld [hSCY], a
- call ApplyBGMapAnchorToObjects
- ret
-
-.LoadBGMapAddrIntoHRAM: ; 64b9
- ld [hBGMapAddress + 1], a
- xor a
- ld [hBGMapAddress], a
- ret
-
-LoadFonts_NoOAMUpdate:: ; 64bf
- ld a, [hOAMUpdate]
- push af
- ld a, $1
- ld [hOAMUpdate], a
-
- call .LoadGFX
-
- pop af
- ld [hOAMUpdate], a
- ret
-
-.LoadGFX:
- call LoadFontsExtra
- ld a, $90
- ld [hWY], a
- call SafeUpdateSprites
- call LoadStandardFont
- ret
-
-HDMATransfer_FillBGMap0WithTile60: ; 64db
- ld a, [rSVBK]
- push af
- ld a, $6
- ld [rSVBK], a
-
- ld a, $60
- ld hl, wDecompressScratch
- ld bc, wScratchAttrMap - wDecompressScratch
- call ByteFill
- ld a, wDecompressScratch / $100
- ld [rHDMA1], a
- ld a, wDecompressScratch % $100
- ld [rHDMA2], a
- ld a, (VBGMap0 % $8000) / $100
- ld [rHDMA3], a
- ld a, (VBGMap0 % $8000) % $100
- ld [rHDMA4], a
- ld a, $3f
- ld [hDMATransfer], a
- call DelayFrame
-
- pop af
- ld [rSVBK], a
- ret
-
+INCLUDE "engine/init_map.asm"
INCLUDE "engine/learn.asm"
-
-CheckNickErrors:: ; 669f
-; error-check monster nick before use
-; must be a peace offering to gamesharkers
-
-; input: de = nick location
-
- push bc
- push de
- ld b, PKMN_NAME_LENGTH
-
-.checkchar
-; end of nick?
- ld a, [de]
- cp "@" ; terminator
- jr z, .end
-
-; check if this char is a text command
- ld hl, .textcommands
- dec hl
-.loop
-; next entry
- inc hl
-; reached end of commands table?
- ld a, [hl]
- cp a, -1
- jr z, .done
-
-; is the current char between this value (inclusive)...
- ld a, [de]
- cp [hl]
- inc hl
- jr c, .loop
-; ...and this one?
- cp [hl]
- jr nc, .loop
-
-; replace it with a "?"
- ld a, "?"
- ld [de], a
- jr .loop
-
-.done
-; next char
- inc de
-; reached end of nick without finding a terminator?
- dec b
- jr nz, .checkchar
-
-; change nick to "?@"
- pop de
- push de
- ld a, "?"
- ld [de], a
- inc de
- ld a, "@"
- ld [de], a
-.end
-; if the nick has any errors at this point it's out of our hands
- pop de
- pop bc
- ret
-
-.textcommands ; 66cf
-; table defining which characters are actually text commands
-; format:
- ; ≥ <
- db "<START>", $04 + 1
- db "<PLAY_G>", $18 + 1
- db $1d, "%" + 1
- db $35, "<GREEN>" + 1
- db "<ENEMY>", "<ENEMY>" + 1
- db $49, "<TM>" + 1
- db "<ROCKET>", "┘" + 1
- db -1 ; end
-
+INCLUDE "engine/routines/checknickerrors.asm"
INCLUDE "engine/math.asm"
-
-ItemAttributes: ; 67c1
-INCLUDE "items/item_attributes.asm"
+INCLUDE "data/items/item_attributes.asm"
INCLUDE "engine/npc_movement.asm"
INCLUDE "event/happiness_egg.asm"
INCLUDE "event/special.asm"
-Predef1: ; 747a
-; not used
- ret
SECTION "bank2", ROMX
INCLUDE "engine/player_object.asm"
-INCLUDE "engine/sine.asm"
+INCLUDE "engine/routines/sine.asm"
INCLUDE "engine/predef.asm"
INCLUDE "engine/color.asm"
-SECTION "bank3", ROMX
-
-CheckTime:: ; c000
- ld a, [TimeOfDay]
- ld hl, TimeOfDayTable
- ld de, 2
- call IsInArray
- inc hl
- ld c, [hl]
- ret c
-
- xor a
- ld c, a
- ret
-TimeOfDayTable: ; c012
- db MORN, 1 << MORN
- db DAY, 1 << DAY
- db NITE, 1 << NITE
- db NITE, 1 << NITE
- db -1
+SECTION "bank3", ROMX
+INCLUDE "engine/routines/checktime.asm"
INCLUDE "engine/specials.asm"
INCLUDE "engine/printnum.asm"
INCLUDE "engine/health.asm"
@@ -284,101 +37,12 @@ INCLUDE "engine/player_step.asm"
INCLUDE "engine/anim_hp_bar.asm"
INCLUDE "engine/move_mon.asm"
INCLUDE "engine/billspctop.asm"
+INCLUDE "engine/routines/getbreedmonlevelgrowth.asm"
+INCLUDE "event/bug_contest/caught_mon.asm"
+INCLUDE "engine/item_effects.asm"
+INCLUDE "engine/routines/getpokeballwobble.asm"
+INCLUDE "engine/routines/knowsmove.asm"
-GetBreedMon1LevelGrowth: ; e698
- ld hl, wBreedMon1Stats
- ld de, TempMon
- ld bc, BOXMON_STRUCT_LENGTH
- call CopyBytes
- callab CalcLevel
- ld a, [wBreedMon1Level]
- ld b, a
- ld a, d
- ld e, a
- sub b
- ld d, a
- ret
-
-GetBreedMon2LevelGrowth: ; e6b3
- ld hl, wBreedMon2Stats
- ld de, TempMon
- ld bc, BOXMON_STRUCT_LENGTH
- call CopyBytes
- callab CalcLevel
- ld a, [wBreedMon2Level]
- ld b, a
- ld a, d
- ld e, a
- sub b
- ld d, a
- ret
-
-BugContest_SetCaughtContestMon: ; e6ce
- ld a, [wContestMon]
- and a
- jr z, .firstcatch
- ld [wd265], a
- callba DisplayAlreadyCaughtText
- callba DisplayCaughtContestMonStats
- lb bc, 14, 7
- call PlaceYesNoBox
- ret c
-
-.firstcatch
- call .generatestats
- ld a, [TempEnemyMonSpecies]
- ld [wd265], a
- call GetPokemonName
- ld hl, .caughttext
- call PrintText
- ret
-
-.generatestats ; e6fd
- ld a, [TempEnemyMonSpecies]
- ld [CurSpecies], a
- ld [CurPartySpecies], a
- call GetBaseData
- xor a
- ld bc, PARTYMON_STRUCT_LENGTH
- ld hl, wContestMon
- call ByteFill
- xor a
- ld [MonType], a
- ld hl, wContestMon
- jp GeneratePartyMonStats
-
-.caughttext ; 0xe71d
- ; Caught @ !
- text_jump UnknownText_0x1c10c0
- db "@"
-
-INCLUDE "items/item_effects.asm"
-
-KnowsMove: ; f9ea
- ld a, MON_MOVES
- call GetPartyParamLocation
- ld a, [wPutativeTMHMMove]
- ld b, a
- ld c, NUM_MOVES
-.loop
- ld a, [hli]
- cp b
- jr z, .knows_move
- dec c
- jr nz, .loop
- and a
- ret
-
-.knows_move
- ld hl, .Text_knows
- call PrintText
- scf
- ret
-
-.Text_knows: ; 0xfa06
- ; knows @ .
- text_jump UnknownText_0x1c5ea8
- db "@"
SECTION "bank4", ROMX
@@ -386,222 +50,23 @@ INCLUDE "engine/pack.asm"
INCLUDE "engine/time.asm"
INCLUDE "engine/tmhm.asm"
INCLUDE "engine/namingscreen.asm"
-
-Script_AbortBugContest: ; 0x122c1
- checkflag ENGINE_BUG_CONTEST_TIMER
- iffalse .finish
- setflag ENGINE_DAILY_BUG_CONTEST
- special ContestReturnMons
-.finish
- end
-
-INCLUDE "event/itemball.asm"
-INCLUDE "engine/healmachineanim.asm"
+INCLUDE "event/misc_scripts.asm"
+INCLUDE "event/heal_machine_anim.asm"
INCLUDE "event/whiteout.asm"
INCLUDE "event/forced_movement.asm"
INCLUDE "event/itemfinder.asm"
-INCLUDE "engine/startmenu.asm"
-INCLUDE "engine/selectmenu.asm"
+INCLUDE "engine/start_menu.asm"
+INCLUDE "engine/select_menu.asm"
INCLUDE "event/elevator.asm"
+INCLUDE "event/bug_contest/contest.asm"
+INCLUDE "event/misc_scripts_2.asm"
+INCLUDE "event/std_collision.asm"
+INCLUDE "event/bug_contest/judging.asm"
+INCLUDE "engine/pokerus/apply_pokerus_tick.asm"
+INCLUDE "event/bug_contest/contest_2.asm"
+INCLUDE "engine/routines/correcterrorsinplayerparty.asm"
+INCLUDE "engine/routines/getsquareroot.asm"
-Special_GiveParkBalls: ; 135db
- xor a
- ld [wContestMon], a
- ld a, 20
- ld [wParkBallsRemaining], a
- callba StartBugContestTimer
- ret
-
-BugCatchingContestBattleScript:: ; 0x135eb
- writecode VAR_BATTLETYPE, BATTLETYPE_CONTEST
- randomwildmon
- startbattle
- reloadmapafterbattle
- copybytetovar wParkBallsRemaining
- iffalse BugCatchingContestOutOfBallsScript
- end
-
-BugCatchingContestOverScript:: ; 0x135f8
- playsound SFX_ELEVATOR_END
- opentext
- writetext BugCatchingContestText_BeeepTimesUp
- waitbutton
- jump BugCatchingContestReturnToGateScript
-
-BugCatchingContestOutOfBallsScript: ; 0x13603
- playsound SFX_ELEVATOR_END
- opentext
- writetext BugCatchingContestText_ContestIsOver
- waitbutton
-
-BugCatchingContestReturnToGateScript: ; 0x1360b
- closetext
- jumpstd bugcontestresultswarp
-
-BugCatchingContestText_BeeepTimesUp: ; 0x1360f
- ; ANNOUNCER: BEEEP! Time's up!
- text_jump UnknownText_0x1bd2ca
- db "@"
-
-BugCatchingContestText_ContestIsOver: ; 0x13614
- ; ANNOUNCER: The Contest is over!
- text_jump UnknownText_0x1bd2e7
- db "@"
-
-RepelWoreOffScript:: ; 0x13619
- opentext
- writetext .text
- waitbutton
- closetext
- end
-
-.text ; 0x13620
- ; REPEL's effect wore off.
- text_jump UnknownText_0x1bd308
- db "@"
-
-HiddenItemScript:: ; 0x13625
- opentext
- copybytetovar EngineBuffer3
- itemtotext 0, 0
- writetext .found_text
- giveitem ITEM_FROM_MEM
- iffalse .bag_full
- callasm SetMemEvent
- specialsound
- itemnotify
- jump .finish
-
-.bag_full ; 0x1363e
- buttonsound
- writetext .no_room_text
- waitbutton
-
-.finish ; 13643
- closetext
- end
-
-.found_text ; 0x13645
- ; found @ !
- text_jump UnknownText_0x1bd321
- db "@"
-
-.no_room_text ; 0x1364a
- ; But has no space left…
- text_jump UnknownText_0x1bd331
- db "@"
-
-SetMemEvent: ; 1364f
- ld hl, EngineBuffer1 ; wd03e (aliases: MenuItemsList, CurFruitTree, CurInput)
- ld a, [hli]
- ld d, [hl]
- ld e, a
- ld b, SET_FLAG
- call EventFlagAction
- ret
-
-CheckFacingTileForStd:: ; 1365b
-; Checks to see if the tile you're facing has a std script associated with it. If so, executes the script and returns carry.
- ld a, c
- ld de, 3
- ld hl, .table1
- call IsInArray
- jr nc, .notintable
-
- ld a, jumpstd_command
- ld [wJumpStdScriptBuffer], a
- inc hl
- ld a, [hli]
- ld [wJumpStdScriptBuffer + 1], a
- ld a, [hli]
- ld [wJumpStdScriptBuffer + 2], a
- ld a, BANK(Script_JumpStdFromRAM)
- ld hl, Script_JumpStdFromRAM
- call CallScript
- scf
- ret
-
-.notintable
- xor a
- ret
-
-.table1
- dbw $91, magazinebookshelf
- dbw $93, pcscript
- dbw $94, radio1
- dbw $95, townmap
- dbw $96, merchandiseshelf
- dbw $97, tv
- dbw $9d, window
- dbw $9f, incenseburner
- db -1 ; end
-
-Script_JumpStdFromRAM: ; 0x1369a
- jump wJumpStdScriptBuffer
-
-INCLUDE "event/bug_contest_judging.asm"
-
-ApplyPokerusTick: ; 13988
-; decreases all pokemon's pokerus counter by b. if the lower nybble reaches zero, the pokerus is cured.
- ld hl, PartyMon1PokerusStatus ; PartyMon1 + MON_PKRS
- ld a, [PartyCount]
- and a
- ret z ; make sure it's not wasting time on an empty party
- ld c, a
-.loop
- ld a, [hl]
- and $f ; lower nybble is the number of days remaining
- jr z, .next ; if already 0, skip
- sub b ; subtract the number of days
- jr nc, .ok ; max(result, 0)
- xor a
-.ok
- ld d, a ; back up this value because we need to preserve the strain (upper nybble)
- ld a, [hl]
- and $f0
- add d
- ld [hl], a ; this prevents a cured pokemon from recontracting pokerus
-.next
- ld de, PARTYMON_STRUCT_LENGTH
- add hl, de
- dec c
- jr nz, .loop
- ret
-
-INCLUDE "event/bug_contest_2.asm"
-
-INCLUDE "unknown/013a47.asm"
-
-GetSquareRoot: ; 13b87
-; Return the square root of de in b.
-
-; Rather than calculating the result, we take the index of the
-; first value in a table of squares that isn't lower than de.
-
- ld hl, Squares
- ld b, 0
-.loop
-; Make sure we don't go past the end of the table.
- inc b
- ld a, b
- cp $ff
- ret z
-
-; Iterate over the table until b**2 >= de.
- ld a, [hli]
- sub e
- ld a, [hli]
- sbc d
-
- jr c, .loop
- ret
-
-Squares: ; 13b98
-root set 1
- rept $ff
- dw root*root
-root set root+1
- endr
SECTION "bank5", ROMX
@@ -614,2930 +79,171 @@ INCLUDE "engine/map_setup.asm"
INCLUDE "engine/pokecenter_pc.asm"
INCLUDE "engine/mart.asm"
INCLUDE "engine/money.asm"
-INCLUDE "items/marts.asm"
+INCLUDE "data/items/marts.asm"
INCLUDE "event/mom.asm"
INCLUDE "event/daycare.asm"
-INCLUDE "event/photo.asm"
-INCLUDE "engine/breeding/egg.asm"
-
-SECTION "Tileset Data 1", ROMX
-
-INCLUDE "tilesets/data_1.asm"
-
-SECTION "Roofs", ROMX
+INCLUDE "event/print_unown.asm"
+INCLUDE "event/print_photo.asm"
+INCLUDE "engine/breeding.asm"
+INCLUDE "tilesets/data.asm"
-INCLUDE "tilesets/roofs.asm"
-SECTION "Tileset Data 2", ROMX
-
-INCLUDE "tilesets/data_2.asm"
-
-SECTION "bank8", ROMX
+SECTION "Clock Reset", ROMX
INCLUDE "engine/clock_reset.asm"
-SECTION "Tileset Data 3", ROMX
-
-INCLUDE "tilesets/data_3.asm"
SECTION "bank9", ROMX
-StringBufferPointers:: ; 24000
- dw StringBuffer3
- dw StringBuffer4
- dw StringBuffer5
- dw StringBuffer2
- dw StringBuffer1
- dw EnemyMonNick
- dw BattleMonNick
-
+INCLUDE "data/text_buffers.asm"
INCLUDE "engine/menu.asm"
-
-UpdateItemDescription: ; 0x244c3
- ld a, [MenuSelection]
- ld [CurSpecies], a
- hlcoord 0, 12
- ld b, 4
- ld c, SCREEN_WIDTH - 2
- call TextBox
- ld a, [MenuSelection]
- cp -1
- ret z
- decoord 1, 14
- callba PrintItemDescription
- ret
-
+INCLUDE "engine/routines/updateitemdescription.asm"
INCLUDE "engine/pokepic.asm"
-
-LoadObjectMasks: ; 2454f
- ld hl, wObjectMasks
- xor a
- ld bc, NUM_OBJECTS
- call ByteFill
- nop
- ld bc, MapObjects
- ld de, wObjectMasks
- xor a
-.loop
- push af
- push bc
- push de
- call GetObjectTimeMask
- jr c, .next
- call CheckObjectFlag
-.next
- pop de
- ld [de], a
- inc de
- pop bc
- ld hl, OBJECT_LENGTH
- add hl, bc
- ld b, h
- ld c, l
- pop af
- inc a
- cp NUM_OBJECTS
- jr nz, .loop
- ret
-
-CheckObjectFlag: ; 2457d (9:457d)
- ld hl, MAPOBJECT_SPRITE
- add hl, bc
- ld a, [hl]
- and a
- jr z, .masked
- ld hl, MAPOBJECT_EVENT_FLAG
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- cp -1
- jr nz, .check
- ld a, e
- cp -1
- jr z, .unmasked
- jr .masked
-.check
- ld b, CHECK_FLAG
- call EventFlagAction
- ld a, c
- and a
- jr nz, .masked
-.unmasked
- xor a
- ret
-
-.masked
- ld a, -1
- scf
- ret
-
-GetObjectTimeMask: ; 245a7 (9:45a7)
- call CheckObjectTime
- ld a, -1
- ret c
- xor a
- ret
-
+INCLUDE "engine/map_objects_2.asm"
INCLUDE "engine/scrolling_menu.asm"
INCLUDE "engine/switch_items.asm"
-
-PlaceMenuItemName: ; 0x24ab4
- push de
- ld a, [MenuSelection]
- ld [wNamedObjectIndexBuffer], a
- call GetItemName
- pop hl
- call PlaceString
- ret
-
-PlaceMenuItemQuantity: ; 0x24ac3
- push de
- ld a, [MenuSelection]
- ld [CurItem], a
- callba _CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
- pop hl
- and a
- jr nz, .done
- ld de, $15
- add hl, de
- ld [hl], "×"
- inc hl
- ld de, MenuSelectionQuantity
- lb bc, 1, 2
- call PrintNum
-
-.done
- ret
-
-PlaceMoneyTopRight: ; 24ae8
- ld hl, MenuDataHeader_0x24b15
- call CopyMenuDataHeader
- jr PlaceMoneyDataHeader
-
-PlaceMoneyBottomLeft: ; 24af0
- ld hl, MenuDataHeader_0x24b1d
- call CopyMenuDataHeader
- jr PlaceMoneyDataHeader
-
-PlaceMoneyAtTopLeftOfTextbox: ; 24af8
- ld hl, MenuDataHeader_0x24b15
- lb de, 0, 11
- call OffsetMenuDataHeader
-
-PlaceMoneyDataHeader: ; 24b01
- call MenuBox
- call MenuBoxCoord2Tile
- ld de, SCREEN_WIDTH + 1
- add hl, de
- ld de, Money
- lb bc, PRINTNUM_MONEY | 3, 6
- call PrintNum
- ret
-
-MenuDataHeader_0x24b15: ; 0x24b15
- db $40 ; flags
- db 00, 11 ; start coords
- db 02, 19 ; end coords
- dw NULL
- db 1 ; default option
-
-MenuDataHeader_0x24b1d: ; 0x24b1d
- db $40 ; flags
- db 11, 00 ; start coords
- db 13, 08 ; end coords
- dw NULL
- db 1 ; default option
-
-Special_DisplayCoinCaseBalance: ; 24b25
- ; Place a text box of size 1x7 at 11, 0.
- hlcoord 11, 0
- ld b, 1
- ld c, 7
- call TextBox
- hlcoord 12, 0
- ld de, CoinString
- call PlaceString
- hlcoord 17, 1
- ld de, ShowMoney_TerminatorString
- call PlaceString
- ld de, Coins
- lb bc, 2, 4
- hlcoord 13, 1
- call PrintNum
- ret
-
-Special_DisplayMoneyAndCoinBalance: ; 24b4e
- hlcoord 5, 0
- ld b, 3
- ld c, 13
- call TextBox
- hlcoord 6, 1
- ld de, MoneyString
- call PlaceString
- hlcoord 12, 1
- ld de, Money
- lb bc, PRINTNUM_MONEY | 3, 6
- call PrintNum
- hlcoord 6, 3
- ld de, CoinString
- call PlaceString
- hlcoord 15, 3
- ld de, Coins
- lb bc, 2, 4
- call PrintNum
- ret
-
-MoneyString: ; 24b83
- db "MONEY@"
-CoinString: ; 24b89
- db "COIN@"
-ShowMoney_TerminatorString: ; 24b8e
- db "@"
-
-Function24b8f: ; 24b8f
-; unreferenced, related to safari?
- ld hl, Options
- ld a, [hl]
- push af
- set NO_TEXT_SCROLL, [hl]
- hlcoord 0, 0
- ld b, 3
- ld c, 7
- call TextBox
- hlcoord 1, 1
- ld de, wSafariTimeRemaining
- lb bc, 2, 3
- call PrintNum
- hlcoord 4, 1
- ld de, .slash_500
- call PlaceString
- hlcoord 1, 3
- ld de, .booru_ko
- call PlaceString
- hlcoord 5, 3
- ld de, wSafariBallsRemaining
- lb bc, 1, 2
- call PrintNum
- pop af
- ld [Options], a
- ret
-
-.slash_500 ; 24bcf
- db "/500@"
-.booru_ko ; 24bd4
- db "ボール こ@"
-
-StartMenu_DrawBugContestStatusBox: ; 24bdc
- hlcoord 0, 0
- ld b, 5
- ld c, 17
- call TextBox
- ret
-
-StartMenu_PrintBugContestStatus: ; 24be7
- ld hl, Options
- ld a, [hl]
- push af
- set NO_TEXT_SCROLL, [hl]
- call StartMenu_DrawBugContestStatusBox
- hlcoord 1, 5
- ld de, .Balls_EN
- call PlaceString
- hlcoord 8, 5
- ld de, wParkBallsRemaining
- lb bc, PRINTNUM_RIGHTALIGN | 1, 2
- call PrintNum
- hlcoord 1, 1
- ld de, .CAUGHT
- call PlaceString
- ld a, [wContestMon]
- and a
- ld de, .None
- jr z, .no_contest_mon
- ld [wd265], a
- call GetPokemonName
-
-.no_contest_mon
- hlcoord 8, 1
- call PlaceString
- ld a, [wContestMon]
- and a
- jr z, .skip_level
- hlcoord 1, 3
- ld de, .LEVEL
- call PlaceString
- ld a, [wContestMonLevel]
- ld h, b
- ld l, c
- inc hl
- ld c, 3
- call Print8BitNumRightAlign
-
-.skip_level
- pop af
- ld [Options], a
- ret
-
-.Balls_JP: ; 24c43
- db "ボール こ@"
-.CAUGHT: ; 24c4b
- db "CAUGHT@"
-.Balls_EN: ; 24c52
- db "BALLS:@"
-.None: ; 24c59
- db "None@"
-.LEVEL: ; 24c5e
- db "LEVEL@"
-
-FindApricornsInBag: ; 24c64
-; Checks the bag for Apricorns.
- ld hl, Buffer1
- xor a
- ld [hli], a
- dec a
- ld bc, 10
- call ByteFill
-
- ld hl, .ApricornBalls
-.loop
- ld a, [hl]
- cp -1
- jr z, .done
- push hl
- ld [CurItem], a
- ld hl, NumItems
- call CheckItem
- pop hl
- jr nc, .nope
- ld a, [hl]
- call .addtobuffer
-.nope
- inc hl
- inc hl
- jr .loop
-
-.done
- ld a, [Buffer1]
- and a
- ret nz
- scf
- ret
-
-.addtobuffer ; 24c94
- push hl
- ld hl, Buffer1
- inc [hl]
- ld e, [hl]
- ld d, 0
- add hl, de
- ld [hl], a
- pop hl
- ret
-
-.ApricornBalls: ; 24ca0
- db RED_APRICORN, LEVEL_BALL
- db BLU_APRICORN, LURE_BALL
- db YLW_APRICORN, MOON_BALL
- db GRN_APRICORN, FRIEND_BALL
- db WHT_APRICORN, FAST_BALL
- db BLK_APRICORN, HEAVY_BALL
- db PNK_APRICORN, LOVE_BALL
- db -1
-
+INCLUDE "engine/menu_2.asm"
INCLUDE "engine/mon_menu.asm"
INCLUDE "battle/menu.asm"
INCLUDE "engine/buy_sell_toss.asm"
INCLUDE "engine/trainer_card.asm"
INCLUDE "engine/prof_oaks_pc.asm"
INCLUDE "engine/decorations.asm"
-
-PadCoords_de: ; 27092
- ld a, d
- add 4
- ld d, a
- ld a, e
- add 4
- ld e, a
- call GetBlockLocation
- ret
-
-LevelUpHappinessMod: ; 2709e
- ld a, [CurPartyMon]
- ld hl, PartyMon1CaughtLocation
- call GetPartyLocation
- ld a, [hl]
- and $7f
- ld d, a
- ld a, [MapGroup]
- ld b, a
- ld a, [MapNumber]
- ld c, a
- call GetWorldMapLocation
- cp d
- ld c, HAPPINESS_GAINLEVEL
- jr nz, .ok
- ld c, HAPPINESS_GAINLEVELATHOME
-
-.ok
- callab ChangeHappiness
- ret
-
-INCLUDE "trainers/dvs.asm"
-
-_ReturnToBattle_UseBall: ; 2715c
- call ClearBGPalettes
- call ClearTileMap
- ld a, [BattleType]
- cp BATTLETYPE_TUTORIAL
- jr z, .gettutorialbackpic
- callba GetMonBackpic
- jr .continue
-
-.gettutorialbackpic
- callba GetTrainerBackpic
-.continue
- callba GetMonFrontpic
- callba _LoadBattleFontsHPBar
- call GetMemSGBLayout
- call CloseWindow
- call LoadStandardMenuDataHeader
- call WaitBGMap
- jp SetPalettes
-
-ConsumeHeldItem: ; 27192
- push hl
- push de
- push bc
- ld a, [hBattleTurn]
- and a
- ld hl, OTPartyMon1Item
- ld de, EnemyMonItem
- ld a, [CurOTMon]
- jr z, .theirturn
- ld hl, PartyMon1Item
- ld de, BattleMonItem
- ld a, [CurBattleMon]
-
-.theirturn
- push hl
- push af
- ld a, [de]
- ld b, a
- callba GetItemHeldEffect
- ld hl, .ConsumableEffects
-.loop
- ld a, [hli]
- cp b
- jr z, .ok
- inc a
- jr nz, .loop
- pop af
- pop hl
- pop bc
- pop de
- pop hl
- ret
-
-.ok
- xor a
- ld [de], a
- pop af
- pop hl
- call GetPartyLocation
- ld a, [hBattleTurn]
- and a
- jr nz, .ourturn
- ld a, [wBattleMode]
- dec a
- jr z, .done
-
-.ourturn
- ld [hl], $0
-
-.done
- pop bc
- pop de
- pop hl
- ret
-
-.ConsumableEffects: ; 271de
-; Consumable items?
- db HELD_BERRY
- db HELD_2
- db HELD_5
- db HELD_HEAL_POISON
- db HELD_HEAL_FREEZE
- db HELD_HEAL_BURN
- db HELD_HEAL_SLEEP
- db HELD_HEAL_PARALYZE
- db HELD_HEAL_STATUS
- db HELD_30
- db HELD_ATTACK_UP
- db HELD_DEFENSE_UP
- db HELD_SPEED_UP
- db HELD_SP_ATTACK_UP
- db HELD_SP_DEFENSE_UP
- db HELD_ACCURACY_UP
- db HELD_EVASION_UP
- db HELD_38
- db HELD_71
- db HELD_ESCAPE
- db HELD_CRITICAL_UP
- db -1
-
-MoveEffectsPointers: ; 271f4
+INCLUDE "engine/routines/leveluphappinessmod.asm"
+INCLUDE "data/trainers/trainer_dvs.asm"
+INCLUDE "engine/routines/returntobattle_useball.asm"
+INCLUDE "engine/routines/consumehelditem.asm"
INCLUDE "battle/moves/move_effects_pointers.asm"
-
-MoveEffects: ; 2732e
INCLUDE "battle/moves/move_effects.asm"
+INCLUDE "engine/routines/kurt_selectquantity_interpretjoypad.asm"
-Kurt_SelectQuantity_InterpretJoypad: ; 27a28
- call BuySellToss_InterpretJoypad
- ld b, a
- ret
SECTION "bankA", ROMX
INCLUDE "engine/link.asm"
-
-Function29fe4: ; unreferenced
- ld a, $0
- call GetSRAMBank
- ld d, $0
- ld b, CHECK_FLAG
- predef FlagPredef
- call CloseSRAM
- ld a, c
- and a
- ret
-
INCLUDE "engine/wildmons.asm"
INCLUDE "battle/link_result.asm"
ChrisBackpic: ; 2ba1a
-INCBIN "gfx/misc/player.2bpp.lz"
+INCBIN "gfx/player/chris_back.2bpp.lz"
DudeBackpic: ; 2bbaa
-INCBIN "gfx/misc/dude.2bpp.lz"
+INCBIN "gfx/battle/dude.2bpp.lz"
+
SECTION "bankB", ROMX
INCLUDE "battle/trainer_huds.asm"
-
-TrainerClassNames:: ; 2c1ef
-INCLUDE "text/trainer_class_names.asm"
-
+INCLUDE "data/trainers/trainer_class_names.asm"
INCLUDE "battle/ai/redundant.asm"
-
INCLUDE "event/move_deleter.asm"
-
-INCLUDE "engine/mysterygift2.asm"
-
+INCLUDE "engine/mystery_gift_2.asm"
INCLUDE "engine/tmhm2.asm"
-
-MoveDescriptions:: ; 2cb52
INCLUDE "battle/moves/move_descriptions.asm"
+INCLUDE "engine/pokerus/pokerus.asm"
+INCLUDE "engine/start_battle.asm"
+INCLUDE "engine/routines/placegraphic.asm"
-GivePokerusAndConvertBerries: ; 2ed44
- call ConvertBerriesToBerryJuice
- ld hl, PartyMon1PokerusStatus
- ld a, [PartyCount]
- ld b, a
- ld de, PARTYMON_STRUCT_LENGTH
-; Check to see if any of your Pokemon already has Pokerus.
-; If so, sample its spread through your party.
-; This means that you cannot get Pokerus de novo while
-; a party member has an active infection.
-.loopMons
- ld a, [hl]
- and $f
- jr nz, .TrySpreadPokerus
- add hl, de
- dec b
- jr nz, .loopMons
-
-; If we haven't been to Goldenrod City at least once,
-; prevent the contraction of Pokerus.
- ld hl, StatusFlags2
- bit 6, [hl]
- ret z
- call Random
- ld a, [hRandomAdd]
- and a
- ret nz
- ld a, [hRandomSub]
- cp $3
- ret nc ; 3/65536 chance (00 00, 00 01 or 00 02)
- ld a, [PartyCount]
- ld b, a
-.randomMonSelectLoop
- call Random
- and $7
- cp b
- jr nc, .randomMonSelectLoop
- ld hl, PartyMon1PokerusStatus
- call GetPartyLocation ; get pokerus byte of random mon
- ld a, [hl]
- and $f0
- ret nz ; if it already has pokerus, do nothing
-.randomPokerusLoop ; Simultaneously sample the strain and duration
- call Random
- and a
- jr z, .randomPokerusLoop
- ld b, a
- and $f0
- jr z, .load_pkrs
- ld a, b
- and $7
- inc a
-.load_pkrs
- ld b, a ; this should come before the label
- swap b
- and $3
- inc a
- add b
- ld [hl], a
- ret
-
-.TrySpreadPokerus:
- call Random
- cp 1 + 33 percent
- ret nc ; 1/3 chance
-
- ld a, [PartyCount]
- cp 1
- ret z ; only one mon, nothing to do
-
- ld c, [hl]
- ld a, b
- cp 2
- jr c, .checkPreviousMonsLoop ; no more mons after this one, go backwards
-
- call Random
- cp 1 + 50 percent
- jr c, .checkPreviousMonsLoop ; 1/2 chance, go backwards
-.checkFollowingMonsLoop
- add hl, de
- ld a, [hl]
- and a
- jr z, .infectMon
- ld c, a
- and $3
- ret z ; if mon has cured pokerus, stop searching
- dec b ; go on to next mon
- ld a, b
- cp 1
- jr nz, .checkFollowingMonsLoop ; no more mons left
- ret
-
-.checkPreviousMonsLoop
- ld a, [PartyCount]
- cp b
- ret z ; no more mons
- ld a, l
- sub e
- ld l, a
- ld a, h
- sbc d
- ld h, a
- ld a, [hl]
- and a
- jr z, .infectMon
- ld c, a
- and $3
- ret z ; if mon has cured pokerus, stop searching
- inc b ; go on to next mon
- jr .checkPreviousMonsLoop
-
-.infectMon
- ld a, c
- and $f0
- ld b, a
- ld a, c
- swap a
- and $3
- inc a
- add b
- ld [hl], a
- ret
-
-; any berry held by a Shuckle may be converted to berry juice
-ConvertBerriesToBerryJuice: ; 2ede6
- ld hl, StatusFlags2
- bit 6, [hl]
- ret z
- call Random
- cp $10
- ret nc ; 1/16 chance
- ld hl, PartyMons
- ld a, [PartyCount]
-.partyMonLoop
- push af
- push hl
- ld a, [hl]
- cp SHUCKLE
- jr nz, .loopMon
- ld bc, MON_ITEM
- add hl, bc
- ld a, [hl]
- cp BERRY
- jr z, .convertToJuice
-
-.loopMon
- pop hl
- ld bc, PARTYMON_STRUCT_LENGTH
- add hl, bc
- pop af
- dec a
- jr nz, .partyMonLoop
- ret
-
-.convertToJuice
- ld a, BERRY_JUICE
- ld [hl], a
- pop hl
- pop af
- ret
-
-ShowLinkBattleParticipants: ; 2ee18
-; If we're not in a communications room,
-; we don't need to be here.
- ld a, [wLinkMode]
- and a
- ret z
-
- callba _ShowLinkBattleParticipants
- ld c, 150
- call DelayFrames
- call ClearTileMap
- call ClearSprites
- ret
-
-FindFirstAliveMonAndStartBattle: ; 2ee2f
- xor a
- ld [hMapAnims], a
- call DelayFrame
- ld b, 6
- ld hl, PartyMon1HP
- ld de, PARTYMON_STRUCT_LENGTH - 1
-
-.loop
- ld a, [hli]
- or [hl]
- jr nz, .okay
- add hl, de
- dec b
- jr nz, .loop
-
-.okay
- ld de, MON_LEVEL - MON_HP
- add hl, de
- ld a, [hl]
- ld [BattleMonLevel], a
- predef Predef_StartBattle
- callba _LoadBattleFontsHPBar
- ld a, 1
- ld [hBGMapMode], a
- call ClearSprites
- call ClearTileMap
- xor a
- ld [hBGMapMode], a
- ld [hWY], a
- ld [rWY], a
- ld [hMapAnims], a
- ret
-
-PlayBattleMusic: ; 2ee6c
-
- push hl
- push de
- push bc
-
- xor a
- ld [MusicFade], a
- ld de, MUSIC_NONE
- call PlayMusic
- call DelayFrame
- call MaxVolume
-
- ld a, [BattleType]
- cp BATTLETYPE_SUICUNE
- ld de, MUSIC_SUICUNE_BATTLE
- jp z, .done
- cp BATTLETYPE_ROAMING
- jp z, .done
-
- ; Are we fighting a trainer?
- ld a, [OtherTrainerClass]
- and a
- jr nz, .trainermusic
-
- callba RegionCheck
- ld a, e
- and a
- jr nz, .kantowild
-
- ld de, MUSIC_JOHTO_WILD_BATTLE
- ld a, [TimeOfDay]
- cp NITE
- jr nz, .done
- ld de, MUSIC_JOHTO_WILD_BATTLE_NIGHT
- jr .done
-
-.kantowild
- ld de, MUSIC_KANTO_WILD_BATTLE
- jr .done
-
-.trainermusic
- ld de, MUSIC_CHAMPION_BATTLE
- cp CHAMPION
- jr z, .done
- cp RED
- jr z, .done
-
- ; really, they should have included admins and scientists here too...
- ld de, MUSIC_ROCKET_BATTLE
- cp GRUNTM
- jr z, .done
- cp GRUNTF
- jr z, .done
-
- ld de, MUSIC_KANTO_GYM_LEADER_BATTLE
- callba IsKantoGymLeader
- jr c, .done
-
- ld de, MUSIC_JOHTO_GYM_LEADER_BATTLE
- callba IsJohtoGymLeader
- jr c, .done
-
- ld de, MUSIC_RIVAL_BATTLE
- ld a, [OtherTrainerClass]
- cp RIVAL1
- jr z, .done
- cp RIVAL2
- jr nz, .othertrainer
-
- ld a, [OtherTrainerID]
- cp 4 ; Rival in Indigo Plateau
- jr c, .done
- ld de, MUSIC_CHAMPION_BATTLE
- jr .done
-
-.othertrainer
- ld a, [wLinkMode]
- and a
- jr nz, .johtotrainer
-
- callba RegionCheck
- ld a, e
- and a
- jr nz, .kantotrainer
-
-.johtotrainer
- ld de, MUSIC_JOHTO_TRAINER_BATTLE
- jr .done
-
-.kantotrainer
- ld de, MUSIC_KANTO_TRAINER_BATTLE
-
-.done
- call PlayMusic
-
- pop bc
- pop de
- pop hl
- ret
-
-ClearBattleRAM: ; 2ef18
- xor a
- ld [wPlayerAction], a
- ld [wBattleResult], a
-
- ld hl, wPartyMenuCursor
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ld [hl], a
-
- ld [wMenuScrollPosition], a
- ld [CriticalHit], a
- ld [BattleMonSpecies], a
- ld [wBattleParticipantsNotFainted], a
- ld [CurBattleMon], a
- ld [wForcedSwitch], a
- ld [TimeOfDayPal], a
- ld [PlayerTurnsTaken], a
- ld [EnemyTurnsTaken], a
- ld [EvolvableFlags], a
-
- ld hl, PlayerHPPal
- ld [hli], a
- ld [hl], a
-
- ld hl, BattleMonDVs
- ld [hli], a
- ld [hl], a
-
- ld hl, EnemyMonDVs
- ld [hli], a
- ld [hl], a
-
-; Clear the entire BattleMons area
- ld hl, wBattle
- ld bc, wBattleEnd - wBattle
- xor a
- call ByteFill
-
- callab ResetEnemyStatLevels
-
- call ClearWindowData
-
- ld hl, hBGMapAddress
- xor a
- ld [hli], a
- ld [hl], VBGMap0 / $100
- ret
-
-PlaceGraphic: ; 2ef6e
-; Fill wBoxAlignment-aligned box width b height c
-; with iterating tile starting from hGraphicStartTile at hl.
-; Predef $13
-
- ld de, SCREEN_WIDTH
-
- ld a, [wBoxAlignment]
- and a
- jr nz, .right
-
- ld a, [hGraphicStartTile]
-.x1
- push bc
- push hl
-
-.y1
- ld [hl], a
- add hl, de
- inc a
- dec c
- jr nz, .y1
-
- pop hl
- inc hl
- pop bc
- dec b
- jr nz, .x1
- ret
-
-.right
-; Right-aligned.
- push bc
- ld b, 0
- dec c
- add hl, bc
- pop bc
-
- ld a, [hGraphicStartTile]
-.x2
- push bc
- push hl
-
-.y2
- ld [hl], a
- add hl, de
- inc a
- dec c
- jr nz, .y2
-
- pop hl
- dec hl
- pop bc
- dec b
- jr nz, .x2
- ret
-
-SECTION "Tileset Data 4", ROMX
-
-INCLUDE "tilesets/data_4.asm"
SECTION "Effect Commands", ROMX
INCLUDE "battle/effect_commands.asm"
+
SECTION "Enemy Trainers", ROMX
INCLUDE "battle/ai/items.asm"
-
-AIScoring: ; 38591
INCLUDE "battle/ai/scoring.asm"
+INCLUDE "engine/read_trainer_attributes.asm"
+INCLUDE "data/trainers/trainer_attributes.asm"
+INCLUDE "engine/read_trainer_party.asm"
+INCLUDE "data/trainers/party_pointers.asm"
+INCLUDE "data/trainers/parties.asm"
-GetTrainerClassName: ; 3952d
- ld hl, RivalName
- ld a, c
- cp RIVAL1
- jr z, .rival
-
- ld [CurSpecies], a
- ld a, TRAINER_NAME
- ld [wNamedObjectTypeBuffer], a
- call GetName
- ld de, StringBuffer1
- ret
-
-.rival
- ld de, StringBuffer1
- push de
- ld bc, NAME_LENGTH
- call CopyBytes
- pop de
- ret
-
-GetOTName: ; 39550
- ld hl, OTPlayerName
- ld a, [wLinkMode]
- and a
- jr nz, .ok
-
- ld hl, RivalName
- ld a, c
- cp RIVAL1
- jr z, .ok
-
- ld [CurSpecies], a
- ld a, TRAINER_NAME
- ld [wNamedObjectTypeBuffer], a
- call GetName
- ld hl, StringBuffer1
-
-.ok
- ld bc, TRAINER_CLASS_NAME_LENGTH
- ld de, OTClassName
- push de
- call CopyBytes
- pop de
- ret
-
-GetTrainerAttributes: ; 3957b
- ld a, [TrainerClass]
- ld c, a
- call GetOTName
- ld a, [TrainerClass]
- dec a
- ld hl, TrainerClassAttributes + TRNATTR_ITEM1
- ld bc, NUM_TRAINER_ATTRIBUTES
- call AddNTimes
- ld de, wEnemyTrainerItem1
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- ld a, [hl]
- ld [wEnemyTrainerBaseReward], a
- ret
-
-INCLUDE "trainers/attributes.asm"
-
-INCLUDE "trainers/read_party.asm"
-
-INCLUDE "trainers/trainer_pointers.asm"
-
-INCLUDE "trainers/trainers.asm"
SECTION "Battle Core", ROMX
INCLUDE "battle/core.asm"
-
INCLUDE "battle/effect_command_pointers.asm"
+
SECTION "bank10", ROMX
INCLUDE "engine/pokedex.asm"
-
INCLUDE "battle/moves/moves.asm"
-
INCLUDE "engine/evolve.asm"
+
SECTION "bank11", ROMX
INCLUDE "engine/fruit_trees.asm"
-
INCLUDE "battle/ai/move.asm"
-
-AnimateDexSearchSlowpoke: ; 441cf
- ld hl, .FrameIDs
- ld b, 25
-.loop
- ld a, [hli]
-
- ; Wrap around
- cp $fe
- jr nz, .ok
- ld hl, .FrameIDs
- ld a, [hli]
-.ok
-
- ld [wDexSearchSlowpokeFrame], a
- ld a, [hli]
- ld c, a
- push bc
- push hl
- call DoDexSearchSlowpokeFrame
- pop hl
- pop bc
- call DelayFrames
- dec b
- jr nz, .loop
- xor a
- ld [wDexSearchSlowpokeFrame], a
- call DoDexSearchSlowpokeFrame
- ld c, 32
- call DelayFrames
- ret
-
-.FrameIDs: ; 441fc
- ; frame ID, duration
- db 0, 7
- db 1, 7
- db 2, 7
- db 3, 7
- db 4, 7
- db -2
-
-DoDexSearchSlowpokeFrame: ; 44207
- ld a, [wDexSearchSlowpokeFrame]
- ld hl, .SpriteData
- ld de, Sprites
-.loop
- ld a, [hli]
- cp -1
- ret z
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [wDexSearchSlowpokeFrame]
- ld b, a
- add a
- add b
- add [hl]
- inc hl
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- jr .loop
-
-.SpriteData: ; 44228
- dsprite 11, 0, 9, 0, $00, $00
- dsprite 11, 0, 10, 0, $01, $00
- dsprite 11, 0, 11, 0, $02, $00
- dsprite 12, 0, 9, 0, $10, $00
- dsprite 12, 0, 10, 0, $11, $00
- dsprite 12, 0, 11, 0, $12, $00
- dsprite 13, 0, 9, 0, $20, $00
- dsprite 13, 0, 10, 0, $21, $00
- dsprite 13, 0, 11, 0, $22, $00
- db -1
-
-DisplayDexEntry: ; 4424d
- call GetPokemonName
- hlcoord 9, 3
- call PlaceString ; mon species
- ld a, [wd265]
- ld b, a
- call GetDexEntryPointer
- ld a, b
- push af
- hlcoord 9, 5
- call FarString ; dex species
- ld h, b
- ld l, c
- push de
-; Print dex number
- hlcoord 2, 8
- ld a, $5c ; No
- ld [hli], a
- ld a, $5d ; .
- ld [hli], a
- ld de, wd265
- lb bc, PRINTNUM_LEADINGZEROS | 1, 3
- call PrintNum
-; Check to see if we caught it. Get out of here if we haven't.
- ld a, [wd265]
- dec a
- call CheckCaughtMon
- pop hl
- pop bc
- ret z
-; Get the height of the Pokemon.
- ld a, [CurPartySpecies]
- ld [CurSpecies], a
- inc hl
- ld a, b
- push af
- push hl
- call GetFarHalfword
- ld d, l
- ld e, h
- pop hl
- inc hl
- inc hl
- ld a, d
- or e
- jr z, .skip_height
- push hl
- push de
- ld hl, sp+$0
- ld d, h
- ld e, l
- hlcoord 12, 7
- lb bc, 2, PRINTNUM_MONEY | 4
- call PrintNum
- hlcoord 14, 7
- ld [hl], $5e ; ft symbol
- pop af
- pop hl
-
-.skip_height
- pop af
- push af
- inc hl
- push hl
- dec hl
- call GetFarHalfword
- ld d, l
- ld e, h
- ld a, e
- or d
- jr z, .skip_weight
- push de
- ld hl, sp+$0
- ld d, h
- ld e, l
- hlcoord 11, 9
- lb bc, 2, PRINTNUM_RIGHTALIGN | 5
- call PrintNum
- pop de
-
-.skip_weight
-; Page 1
- lb bc, 5, SCREEN_WIDTH - 2
- hlcoord 2, 11
- call ClearBox
- hlcoord 1, 10
- ld bc, SCREEN_WIDTH - 1
- ld a, $61 ; horizontal divider
- call ByteFill
- ; page number
- hlcoord 1, 9
- ld [hl], $55
- inc hl
- ld [hl], $55
- hlcoord 1, 10
- ld [hl], $56 ; P.
- inc hl
- ld [hl], $57 ; 1
- pop de
- inc de
- pop af
- hlcoord 2, 11
- push af
- call FarString
- pop bc
- ld a, [wPokedexStatus]
- or a
- ret z
-
-; Page 2
- push bc
- push de
- lb bc, 5, SCREEN_WIDTH - 2
- hlcoord 2, 11
- call ClearBox
- hlcoord 1, 10
- ld bc, SCREEN_WIDTH - 1
- ld a, $61
- call ByteFill
- ; page number
- hlcoord 1, 9
- ld [hl], $55
- inc hl
- ld [hl], $55
- hlcoord 1, 10
- ld [hl], $56 ; P.
- inc hl
- ld [hl], $58 ; 2
- pop de
- inc de
- pop af
- hlcoord 2, 11
- call FarString
- ret
-
-String_44331: ; 44331
- db "#@"
-
-INCLUDE "data/pokedex/entry_pointers.asm"
-
+INCLUDE "engine/pokedex_2.asm"
+INCLUDE "data/pokemon/dex_entry_pointers.asm"
INCLUDE "engine/mail.asm"
+
SECTION "Crystal Unique", ROMX
INCLUDE "engine/init_gender.asm"
-
-DrawKrisPackGFX: ; 48e81
- ld hl, PackFGFXPointers
- add hl, de
- add hl, de
- ld a, [hli]
- ld e, a
- ld d, [hl]
- ld hl, VTiles2 tile $50
- lb bc, BANK(PackFGFX), 15
- call Request2bpp
- ret
-
-PackFGFXPointers: ; 48e93
- dw PackFGFX + (15 tiles) * 1
- dw PackFGFX + (15 tiles) * 3
- dw PackFGFX + (15 tiles) * 0
- dw PackFGFX + (15 tiles) * 2
-
-PackFGFX: ; 48e9b
-INCBIN "gfx/misc/pack_f.2bpp"
-
-Special_MoveTutor: ; 4925b
- call FadeToMenu
- call ClearBGPalettes
- call ClearScreen
- call DelayFrame
- ld b, SCGB_PACKPALS
- call GetSGBLayout
- xor a
- ld [wItemAttributeParamBuffer], a
- call .GetMoveTutorMove
- ld [wd265], a
- ld [wPutativeTMHMMove], a
- call GetMoveName
- call CopyName1
- callba ChooseMonToLearnTMHM
- jr c, .cancel
- jr .enter_loop
-
-.loop
- callba ChooseMonToLearnTMHM_NoRefresh
- jr c, .cancel
-.enter_loop
- call CheckCanLearnMoveTutorMove
- jr nc, .loop
- xor a
- ld [ScriptVar], a
- jr .quit
-
-.cancel
- ld a, -1
- ld [ScriptVar], a
-.quit
- call CloseSubmenu
- ret
-
-.GetMoveTutorMove: ; 492a5
- ld a, [ScriptVar]
- cp 1
- jr z, .flamethrower
- cp 2
- jr z, .thunderbolt
- ld a, ICE_BEAM
- ret
-
-.flamethrower
- ld a, FLAMETHROWER
- ret
-
-.thunderbolt
- ld a, THUNDERBOLT
- ret
-
-CheckCanLearnMoveTutorMove: ; 492b9
- ld hl, .MenuDataHeader
- call LoadMenuDataHeader
-
- predef CanLearnTMHMMove
-
- push bc
- ld a, [CurPartyMon]
- ld hl, PartyMonNicknames
- call GetNick
- pop bc
-
- ld a, c
- and a
- jr nz, .can_learn
- push de
- ld de, SFX_WRONG
- call PlaySFX
- pop de
- ld a, BANK(Text_TMHMNotCompatible)
- ld hl, Text_TMHMNotCompatible
- call FarPrintText
- jr .didnt_learn
-
-.can_learn
- callab KnowsMove
- jr c, .didnt_learn
-
- predef LearnMove
- ld a, b
- and a
- jr z, .didnt_learn
-
- ld c, HAPPINESS_LEARNMOVE
- callab ChangeHappiness
- jr .learned
-
-.didnt_learn
- call ExitMenu
- and a
- ret
-
-.learned
- call ExitMenu
- scf
- ret
-
-.MenuDataHeader: ; 0x4930a
- db $40 ; flags
- db 12, 00 ; start coords
- db 17, 19 ; end coords
-
-INCLUDE "predef/crystal.asm"
-
-Unknown_4985a: ; unreferenced
- db $ab, $03, $57, $24, $ac, $0e, $13, $32
- db $be, $30, $5b, $4c, $47, $60, $ed, $f2
- db $ab, $03, $55, $26, $aa, $0a, $13, $3a
- db $be, $28, $33, $24, $6e, $71, $df, $b0
- db $a8, $00, $e5, $e0, $9a, $fc, $f4, $2c
- db $fe, $4c, $a3, $5e, $c6, $3a, $ab, $4d
- db $a8, $00, $b5, $b0, $de, $e8, $fc, $1c
- db $ba, $66, $f7, $0e, $ba, $5e, $43, $bd
-
+INCLUDE "engine/routines/drawkrispackgfx.asm"
+INCLUDE "event/move_tutor.asm"
+INCLUDE "engine/crystal_colors.asm"
INCLUDE "event/celebi.asm"
INCLUDE "engine/main_menu.asm"
-INCLUDE "misc/mobile_menu.asm"
+INCLUDE "mobile/mobile_menu.asm"
INCLUDE "engine/search.asm"
-INCLUDE "misc/mobile_12_2.asm"
-; mobile battle selection
+INCLUDE "mobile/mobile_12_2.asm"
+INCLUDE "event/buena_menu.asm"
-AskRememberPassword: ; 4ae12
- call .DoMenu
- ld a, $0
- jr c, .okay
- ld a, $1
-
-.okay
- ld [ScriptVar], a
- ret
-
-.DoMenu: ; 4ae1f
- lb bc, 14, 7
- push bc
- ld hl, YesNoMenuDataHeader
- call CopyMenuDataHeader
- pop bc
- ld a, b
- ld [wMenuBorderLeftCoord], a
- add $5
- ld [wMenuBorderRightCoord], a
- ld a, c
- ld [wMenuBorderTopCoord], a
- add $4
- ld [wMenuBorderBottomCoord], a
- call PushWindow
- call VerticalMenu
- push af
- ld c, 15
- call DelayFrames
- call Buena_ExitMenu
- pop af
- jr c, .refused
- ld a, [wMenuCursorY]
- cp $2
- jr z, .refused
- and a
- ret
-
-.refused
- ld a, $2
- ld [wMenuCursorY], a
- scf
- ret
-
-Buena_ExitMenu: ; 4ae5e
- ld a, [hOAMUpdate]
- push af
- call ExitMenu
- call UpdateSprites
- xor a
- ld [hOAMUpdate], a
- call DelayFrame
- ld a, $1
- ld [hOAMUpdate], a
- call ApplyTilemap
- pop af
- ld [hOAMUpdate], a
- ret
SECTION "bank13", ROMX
-SwapTextboxPalettes:: ; 4c000
- hlcoord 0, 0
- decoord 0, 0, AttrMap
- ld b, SCREEN_HEIGHT
-.loop
- push bc
- ld c, SCREEN_WIDTH
-.innerloop
- ld a, [hl]
- push hl
- srl a
- jr c, .UpperNybble
- ld hl, TilesetPalettes
- add [hl]
- ld l, a
- ld a, [TilesetPalettes + 1]
- adc $0
- ld h, a
- ld a, [hl]
- and $f
- jr .next
-
-.UpperNybble:
- ld hl, TilesetPalettes
- add [hl]
- ld l, a
- ld a, [TilesetPalettes + 1]
- adc $0
- ld h, a
- ld a, [hl]
- swap a
- and $f
-
-.next
- pop hl
- ld [de], a
- res 7, [hl]
- inc hl
- inc de
- dec c
- jr nz, .innerloop
- pop bc
- dec b
- jr nz, .loop
- ret
-
-ScrollBGMapPalettes:: ; 4c03f
- ld hl, BGMapBuffer
- ld de, BGMapPalBuffer
-.loop
- ld a, [hl]
- push hl
- srl a
- jr c, .UpperNybble
-
-; .LowerNybble
- ld hl, TilesetPalettes
- add [hl]
- ld l, a
- ld a, [TilesetPalettes + 1]
- adc $0
- ld h, a
- ld a, [hl]
- and $f
- jr .next
-
-.UpperNybble:
- ld hl, TilesetPalettes
- add [hl]
- ld l, a
- ld a, [TilesetPalettes + 1]
- adc $0
- ld h, a
- ld a, [hl]
- swap a
- and $f
-
-.next
- pop hl
- ld [de], a
- res 7, [hl]
- inc hl
- inc de
- dec c
- jr nz, .loop
- ret
-
+INCLUDE "engine/map_palettes.asm"
INCLUDE "tilesets/palette_maps.asm"
-TileCollisionTable:: ; 4ce1f
-INCLUDE "tilesets/collision.asm"
-
-EmptyAllSRAMBanks: ; 4cf1f
- ld a, $0
- call .EmptyBank
- ld a, $1
- call .EmptyBank
- ld a, $2
- call .EmptyBank
- ld a, $3
- call .EmptyBank
- ret
-
-.EmptyBank: ; 4cf34
- call GetSRAMBank
- ld hl, SRAM_Begin
- ld bc, SRAM_End - SRAM_Begin
- xor a
- call ByteFill
- call CloseSRAM
- ret
-
-SaveMenu_LoadEDTile: ; 4cf45 (13:4f45)
- ld a, [hCGB]
- and a
- jp z, WaitBGMap
-
-; The following is a modified version of LoadEDTile.
- ld a, [hBGMapMode]
- push af
- xor a
- ld [hBGMapMode], a
- ld a, [hMapAnims]
- push af
- xor a
- ld [hMapAnims], a
-.WaitLY:
- ld a, [rLY]
- cp $60
- jr c, .WaitLY
-
- di
- ld a, 1 ; BANK(VBGMap2)
- ld [rVBK], a
- hlcoord 0, 0, AttrMap
- call .LoadEDTile
- ld a, 0 ; BANK(VBGMap0)
- ld [rVBK], a
- hlcoord 0, 0
- call .LoadEDTile
-.WaitLY2:
- ld a, [rLY]
- cp $60
- jr c, .WaitLY2
- ei
-
- pop af
- ld [hMapAnims], a
- pop af
- ld [hBGMapMode], a
- ret
-
-.LoadEDTile: ; 4cf80 (13:4f80)
- ld [hSPBuffer], sp ; $ffd9
- ld sp, hl
- ld a, [hBGMapAddress + 1]
- ld h, a
- ld l, 0
- ld a, SCREEN_HEIGHT
- ld [hTilesPerCycle], a
- ld b, 1 << 1
- ld c, rSTAT % $100
-
-.loop
-rept SCREEN_WIDTH / 2
- pop de
-.loop\@
- ld a, [$ff00+c]
- and b
- jr nz, .loop\@
- ld [hl], e
- inc l
- ld [hl], d
- inc l
-endr
-
- ld de, $20 - SCREEN_WIDTH
- add hl, de
- ld a, [hTilesPerCycle]
- dec a
- ld [hTilesPerCycle], a
- jr nz, .loop
-
- ld a, [hSPBuffer]
- ld l, a
- ld a, [hSPBuffer + 1]
- ld h, a
- ld sp, hl
- ret
-
-CheckSave:: ; 4cffe
- ld a, BANK(s1_a008)
- call GetSRAMBank
- ld a, [s1_a008]
- ld b, a
- ld a, [s1_ad0f]
- ld c, a
- call CloseSRAM
- ld a, b
- cp 99
- jr nz, .ok
- ld a, c
- cp " "
- jr nz, .ok
- ld c, $1
- ret
-
-.ok
- ld c, $0
- ret
-
-INCLUDE "engine/map_triggers.asm"
-
-_LoadMapPart:: ; 4d15b
- ld hl, wMisc
- ld a, [wMetatileStandingY]
- and a
- jr z, .top_row
- ld bc, WMISC_WIDTH * 2
- add hl, bc
-
-.top_row
- ld a, [wMetatileStandingX]
- and a
- jr z, .left_column
- inc hl
- inc hl
-
-.left_column
- decoord 0, 0
- ld b, SCREEN_HEIGHT
-.loop
- ld c, SCREEN_WIDTH
-.loop2
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .loop2
- ld a, l
- add 4
- ld l, a
- jr nc, .carry
- inc h
-
-.carry
- dec b
- jr nz, .loop
- ret
-
-PhoneRing_LoadEDTile: ; 4d188
- ld a, [hCGB]
- and a
- jp z, WaitBGMap
- ld a, [wSpriteUpdatesEnabled]
- cp $0
- jp z, WaitBGMap
-
-; What follows is a modified version of LoadEDTile.
- ld a, [hBGMapMode]
- push af
- xor a
- ld [hBGMapMode], a
- ld a, [hMapAnims]
- push af
- xor a
- ld [hMapAnims], a
-.wait
- ld a, [rLY]
- cp $8f
- jr c, .wait
-
- di
- ld a, 1 ; BANK(VBGMap2)
- ld [rVBK], a
- hlcoord 0, 0, AttrMap
- call .LoadEDTile
- ld a, 0 ; BANK(VBGMap0)
- ld [rVBK], a
- hlcoord 0, 0
- call .LoadEDTile
-.wait2
- ld a, [rLY]
- cp $8f
- jr c, .wait2
- ei
-
- pop af
- ld [hMapAnims], a
- pop af
- ld [hBGMapMode], a
- ret
-
-.LoadEDTile: ; 4d1cb
- ld [hSPBuffer], sp
- ld sp, hl
- ld a, [hBGMapAddress + 1]
- ld h, a
- ld l, 0
- ld a, SCREEN_HEIGHT
- ld [hTilesPerCycle], a
- ld b, 1 << 1 ; not in v/hblank
- ld c, rSTAT % $100
-
-.loop
-rept SCREEN_WIDTH / 2
- pop de
-.loop\@
- ld a, [$ff00+c]
- and b
- jr nz, .loop\@
- ld [hl], e
- inc l
- ld [hl], d
- inc l
+; unreferenced
+; 0x4ce05
+rept 26
+ db $06
endr
+; 0x4ce1f
- ld de, $20 - SCREEN_WIDTH
- add hl, de
- ld a, [hTilesPerCycle]
- dec a
- ld [hTilesPerCycle], a
- jr nz, .loop
-
- ld a, [hSPBuffer]
- ld l, a
- ld a, [hSPBuffer + 1]
- ld h, a
- ld sp, hl
- ret
+INCLUDE "data/collision_permissions.asm"
+INCLUDE "engine/routines/emptyallsrambanks.asm"
+INCLUDE "engine/routines/savemenu_copytilemapatonce.asm"
+INCLUDE "engine/routines/checksave.asm"
+INCLUDE "data/maps/map_scenes.asm"
+INCLUDE "engine/routines/loadmappart.asm"
+INCLUDE "engine/routines/phonering_copytilemapatonce.asm"
Shrink1Pic: ; 4d249
-INCBIN "gfx/shrink1.2bpp.lz"
+INCBIN "gfx/shrink/shrink1.2bpp.lz"
Shrink2Pic: ; 4d2d9
-INCBIN "gfx/shrink2.2bpp.lz"
-
-LinkMonStatsScreen: ; 4d319
- ld a, [wMenuCursorY]
- dec a
- ld [CurPartyMon], a
- call LowVolume
- predef StatsScreenInit
- ld a, [CurPartyMon]
- inc a
- ld [wMenuCursorY], a
- call ClearScreen
- call ClearBGPalettes
- call MaxVolume
- callba LoadTradeScreenBorder
- callba Link_WaitBGMap
- callba InitTradeSpeciesList
- callba SetTradeRoomBGPals
- call WaitBGMap2
- ret
-
-Link_WaitBGMap: ; 4d354
- call WaitBGMap
- call WaitBGMap2
- ret
-
-LinkTextbox2: ; 4d35b
- ld h, d
- ld l, e
- push bc
- push hl
- call .PlaceBorder
- pop hl
- pop bc
- ld de, AttrMap - TileMap
- add hl, de
- inc b
- inc b
- inc c
- inc c
- ld a, $7
-.row
- push bc
- push hl
-.col
- ld [hli], a
- dec c
- jr nz, .col
- pop hl
- ld de, SCREEN_WIDTH
- add hl, de
- pop bc
- dec b
- jr nz, .row
- ret
-
-.PlaceBorder: ; 4d37e
- push hl
- ld a, $76
- ld [hli], a
- inc a
- call .PlaceRow
- inc a
- ld [hl], a
- pop hl
- ld de, SCREEN_WIDTH
- add hl, de
-.loop
- push hl
- ld a, "┌"
- ld [hli], a
- ld a, " "
- call .PlaceRow
- ld [hl], "─"
- pop hl
- ld de, SCREEN_WIDTH
- add hl, de
- dec b
- jr nz, .loop
- ld a, "┐"
- ld [hli], a
- ld a, "│"
- call .PlaceRow
- ld [hl], "└"
- ret
-
-.PlaceRow: ; 4d3ab
- ld d, c
-.row_loop
- ld [hli], a
- dec d
- jr nz, .row_loop
- ret
+INCBIN "gfx/shrink/shrink2.2bpp.lz"
+INCLUDE "engine/link_2.asm"
INCLUDE "engine/delete_save_change_clock.asm"
-
-Tilesets::
INCLUDE "tilesets/tileset_headers.asm"
-
-FlagPredef: ; 4d7c1
-; Perform action b on flag c in flag array hl.
-; If checking a flag, check flag array d:hl unless d is 0.
-
-; For longer flag arrays, see FlagAction.
-
- push hl
- push bc
-
-; Divide by 8 to get the byte we want.
- push bc
- srl c
- srl c
- srl c
- ld b, 0
- add hl, bc
- pop bc
-
-; Which bit we want from the byte
- ld a, c
- and 7
- ld c, a
-
-; Shift left until we can mask the bit
- ld a, 1
- jr z, .shifted
-.shift
- add a
- dec c
- jr nz, .shift
-.shifted
- ld c, a
-
-; What are we doing to this flag?
- dec b
- jr z, .set ; 1
- dec b
- jr z, .check ; 2
-
-.reset
- ld a, c
- cpl
- and [hl]
- ld [hl], a
- jr .done
-
-.set
- ld a, [hl]
- or c
- ld [hl], a
- jr .done
-
-.check
- ld a, d
- cp 0
- jr nz, .farcheck
-
- ld a, [hl]
- and c
- jr .done
-
-.farcheck
- call GetFarByte
- and c
-
-.done
- pop bc
- pop hl
- ld c, a
- ret
-
-GetTrademonFrontpic: ; 4d7fd
- ld a, [wOTTrademonSpecies]
- ld hl, wOTTrademonDVs
- ld de, VTiles2
- push de
- push af
- predef GetUnownLetter
- pop af
- ld [CurPartySpecies], a
- ld [CurSpecies], a
- call GetBaseData
- pop de
- predef FrontpicPredef
- ret
-
-AnimateTrademonFrontpic: ; 4d81e
- ld a, [wOTTrademonSpecies]
- call IsAPokemon
- ret c
- callba ShowOTTrademonStats
- ld a, [wOTTrademonSpecies]
- ld [CurPartySpecies], a
- ld a, [wOTTrademonDVs]
- ld [TempMonDVs], a
- ld a, [wOTTrademonDVs + 1]
- ld [TempMonDVs + 1], a
- ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
- call GetSGBLayout
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbBGPals
- callba TradeAnim_ShowGetmonFrontpic
- ld a, [wOTTrademonSpecies]
- ld [CurPartySpecies], a
- hlcoord 7, 2
- ld d, $0
- ld e, ANIM_MON_TRADE
- predef AnimateFrontpic
- ret
-
-CheckPokerus: ; 4d860
-; Return carry if a monster in your party has Pokerus
-
-; Get number of monsters to iterate over
- ld a, [PartyCount]
- and a
- jr z, .NoPokerus
- ld b, a
-; Check each monster in the party for Pokerus
- ld hl, PartyMon1PokerusStatus
- ld de, PARTYMON_STRUCT_LENGTH
-.Check:
- ld a, [hl]
- and $0f ; only the bottom nybble is used
- jr nz, .HasPokerus
-; Next PartyMon
- add hl, de
- dec b
- jr nz, .Check
-.NoPokerus:
- and a
- ret
-.HasPokerus:
- scf
- ret
-
-Special_CheckForLuckyNumberWinners: ; 4d87a
- xor a
- ld [ScriptVar], a
- ld [wFoundMatchingIDInParty], a
- ld a, [PartyCount]
- and a
- ret z
- ld d, a
- ld hl, PartyMon1ID
- ld bc, PartySpecies
-.PartyLoop:
- ld a, [bc]
- inc bc
- cp EGG
- call nz, .CompareLuckyNumberToMonID
- push bc
- ld bc, PARTYMON_STRUCT_LENGTH
- add hl, bc
- pop bc
- dec d
- jr nz, .PartyLoop
- ld a, BANK(sBox)
- call GetSRAMBank
- ld a, [sBoxCount]
- and a
- jr z, .SkipOpenBox
- ld d, a
- ld hl, sBoxMon1ID
- ld bc, sBoxSpecies
-.OpenBoxLoop:
- ld a, [bc]
- inc bc
- cp EGG
- jr z, .SkipOpenBoxMon
- call .CompareLuckyNumberToMonID
- jr nc, .SkipOpenBoxMon
- ld a, 1
- ld [wFoundMatchingIDInParty], a
-
-.SkipOpenBoxMon:
- push bc
- ld bc, BOXMON_STRUCT_LENGTH
- add hl, bc
- pop bc
- dec d
- jr nz, .OpenBoxLoop
-
-.SkipOpenBox:
- call CloseSRAM
- ld c, $0
-.BoxesLoop:
- ld a, [wCurBox]
- and $f
- cp c
- jr z, .SkipBox
- ld hl, .BoxBankAddresses
- ld b, 0
- add hl, bc
- add hl, bc
- add hl, bc
- ld a, [hli]
- call GetSRAMBank
- ld a, [hli]
- ld h, [hl]
- ld l, a ; hl now contains the address of the loaded box in SRAM
- ld a, [hl]
- and a
- jr z, .SkipBox ; no mons in this box
- push bc
- ld b, h
- ld c, l
- inc bc
- ld de, sBoxMon1ID - sBox
- add hl, de
- ld d, a
-.BoxNLoop:
- ld a, [bc]
- inc bc
- cp EGG
- jr z, .SkipBoxMon
-
- call .CompareLuckyNumberToMonID ; sets ScriptVar and CurPartySpecies appropriately
- jr nc, .SkipBoxMon
- ld a, 1
- ld [wFoundMatchingIDInParty], a
-
-.SkipBoxMon:
- push bc
- ld bc, BOXMON_STRUCT_LENGTH
- add hl, bc
- pop bc
- dec d
- jr nz, .BoxNLoop
- pop bc
-
-.SkipBox:
- inc c
- ld a, c
- cp NUM_BOXES
- jr c, .BoxesLoop
-
- call CloseSRAM
- ld a, [ScriptVar]
- and a
- ret z ; found nothing
- callba TrainerRankings_LuckyNumberShow
- ld a, [wFoundMatchingIDInParty]
- and a
- push af
- ld a, [CurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
- call GetPokemonName
- ld hl, .FoundPartymonText
- pop af
- jr z, .print
- ld hl, .FoundBoxmonText
-
-.print
- jp PrintText
-
-.CompareLuckyNumberToMonID: ; 4d939
- push bc
- push de
- push hl
- ld d, h
- ld e, l
- ld hl, Buffer1
- lb bc, PRINTNUM_LEADINGZEROS | 2, 5
- call PrintNum
- ld hl, LuckyNumberDigit1Buffer
- ld de, wLuckyIDNumber
- lb bc, PRINTNUM_LEADINGZEROS | 2, 5
- call PrintNum
- ld b, 5
- ld c, 0
- ld hl, LuckyNumberDigit5Buffer
- ld de, Buffer5
-.loop
- ld a, [de]
- cp [hl]
- jr nz, .done
- dec de
- dec hl
- inc c
- dec b
- jr nz, .loop
-
-.done
- pop hl
- push hl
- ld de, -6
- add hl, de
- ld a, [hl]
- pop hl
- pop de
- push af
- ld a, c
- ld b, 1
- cp 5
- jr z, .okay
- ld b, 2
- cp 3
- jr nc, .okay
- ld b, 3
- cp 2
- jr nz, .nomatch
-
-.okay
- inc b
- ld a, [ScriptVar]
- and a
- jr z, .bettermatch
- cp b
- jr c, .nomatch
-
-.bettermatch
- dec b
- ld a, b
- ld [ScriptVar], a
- pop bc
- ld a, b
- ld [CurPartySpecies], a
- pop bc
- scf
- ret
-
-.nomatch
- pop bc
- pop bc
- and a
- ret
-
-.BoxBankAddresses: ; 4d99f
- dba sBox1
- dba sBox2
- dba sBox3
- dba sBox4
- dba sBox5
- dba sBox6
- dba sBox7
- dba sBox8
- dba sBox9
- dba sBox10
- dba sBox11
- dba sBox12
- dba sBox13
- dba sBox14
-
-.FoundPartymonText: ; 0x4d9c9
- ; Congratulations! We have a match with the ID number of @ in your party.
- text_jump UnknownText_0x1c1261
- db "@"
-
-.FoundBoxmonText: ; 0x4d9ce
- ; Congratulations! We have a match with the ID number of @ in your PC BOX.
- text_jump UnknownText_0x1c12ae
- db "@"
-
-Special_PrintTodaysLuckyNumber: ; 4d9d3
- ld hl, StringBuffer3
- ld de, wLuckyIDNumber
- lb bc, PRINTNUM_LEADINGZEROS | 2, 5
- call PrintNum
- ld a, "@"
- ld [StringBuffer3 + 5], a
- ret
-
-CheckPartyFullAfterContest: ; 4d9e5
- ld a, [wContestMon]
- and a
- jp z, .DidntCatchAnything
- ld [CurPartySpecies], a
- ld [CurSpecies], a
- call GetBaseData
- ld hl, PartyCount
- ld a, [hl]
- cp 6
- jp nc, .TryAddToBox
- inc a
- ld [hl], a
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [wContestMon]
- ld [hli], a
- ld [CurSpecies], a
- ld a, $ff
- ld [hl], a
- ld hl, PartyMon1Species
- ld a, [PartyCount]
- dec a
- ld bc, PARTYMON_STRUCT_LENGTH
- call AddNTimes
- ld d, h
- ld e, l
- ld hl, wContestMon
- ld bc, PARTYMON_STRUCT_LENGTH
- call CopyBytes
- ld a, [PartyCount]
- dec a
- ld hl, PartyMonOT
- call SkipNames
- ld d, h
- ld e, l
- ld hl, PlayerName
- call CopyBytes
- ld a, [CurPartySpecies]
- ld [wd265], a
- call GetPokemonName
- ld hl, StringBuffer1
- ld de, wMonOrItemNameBuffer
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
- call GiveANickname_YesNo
- jr c, .Party_SkipNickname
- ld a, [PartyCount]
- dec a
- ld [CurPartyMon], a
- xor a
- ld [MonType], a
- ld de, wMonOrItemNameBuffer
- callab InitNickname
-
-.Party_SkipNickname:
- ld a, [PartyCount]
- dec a
- ld hl, PartyMonNicknames
- call SkipNames
- ld d, h
- ld e, l
- ld hl, wMonOrItemNameBuffer
- call CopyBytes
- ld a, [PartyCount]
- dec a
- ld hl, PartyMon1Level
- call GetPartyLocation
- ld a, [hl]
- ld [CurPartyLevel], a
- call SetCaughtData
- ld a, [PartyCount]
- dec a
- ld hl, PartyMon1CaughtLocation
- call GetPartyLocation
- ld a, [hl]
- and $80
- ld b, $13
- or b
- ld [hl], a
- xor a
- ld [wContestMon], a
- and a
- ld [ScriptVar], a
- ret
-
-.TryAddToBox: ; 4daa3
- ld a, BANK(sBoxCount)
- call GetSRAMBank
- ld hl, sBoxCount
- ld a, [hl]
- cp MONS_PER_BOX
- call CloseSRAM
- jr nc, .BoxFull
- xor a
- ld [CurPartyMon], a
- ld hl, wContestMon
- ld de, wBufferMon
- ld bc, BOXMON_STRUCT_LENGTH
- call CopyBytes
- ld hl, PlayerName
- ld de, wBufferMonOT
- ld bc, NAME_LENGTH
- call CopyBytes
- callab InsertPokemonIntoBox
- ld a, [CurPartySpecies]
- ld [wd265], a
- call GetPokemonName
- call GiveANickname_YesNo
- ld hl, StringBuffer1
- jr c, .Box_SkipNickname
- ld a, BOXMON
- ld [MonType], a
- ld de, wMonOrItemNameBuffer
- callab InitNickname
- ld hl, wMonOrItemNameBuffer
-
-.Box_SkipNickname:
- ld a, BANK(sBoxMonNicknames)
- call GetSRAMBank
- ld de, sBoxMonNicknames
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
- call CloseSRAM
-
-.BoxFull:
- ld a, BANK(sBoxMon1Level)
- call GetSRAMBank
- ld a, [sBoxMon1Level]
- ld [CurPartyLevel], a
- call CloseSRAM
- call SetBoxMonCaughtData
- ld a, BANK(sBoxMon1CaughtLocation)
- call GetSRAMBank
- ld hl, sBoxMon1CaughtLocation
- ld a, [hl]
- and $80
- ld b, $13
- or b
- ld [hl], a
- call CloseSRAM
- xor a
- ld [wContestMon], a
- ld a, $1
- ld [ScriptVar], a
- ret
-
-.DidntCatchAnything: ; 4db35
- ld a, $2
- ld [ScriptVar], a
- ret
-
-GiveANickname_YesNo: ; 4db3b
- ld hl, TextJump_GiveANickname
- call PrintText
- jp YesNoBox
-
-TextJump_GiveANickname: ; 0x4db44
- ; Give a nickname to the @ you received?
- text_jump UnknownText_0x1c12fc
- db "@"
-
-SetCaughtData: ; 4db49
- ld a, [PartyCount]
- dec a
- ld hl, PartyMon1CaughtLevel
- call GetPartyLocation
-SetBoxmonOrEggmonCaughtData: ; 4db53
- ld a, [TimeOfDay]
- inc a
- rrca
- rrca
- ld b, a
- ld a, [CurPartyLevel]
- or b
- ld [hli], a
- ld a, [MapGroup]
- ld b, a
- ld a, [MapNumber]
- ld c, a
- cp MAP_POKECENTER_2F
- jr nz, .NotPokeCenter2F
- ld a, b
- cp GROUP_POKECENTER_2F
- jr nz, .NotPokeCenter2F
-
- ld a, [BackupMapGroup]
- ld b, a
- ld a, [BackupMapNumber]
- ld c, a
-
-.NotPokeCenter2F:
- call GetWorldMapLocation
- ld b, a
- ld a, [PlayerGender]
- rrca
- or b
- ld [hl], a
- ret
-
-SetBoxMonCaughtData: ; 4db83
- ld a, BANK(sBoxMon1CaughtLevel)
- call GetSRAMBank
- ld hl, sBoxMon1CaughtLevel
- call SetBoxmonOrEggmonCaughtData
- call CloseSRAM
- ret
-
-SetGiftBoxMonCaughtData: ; 4db92
- push bc
- ld a, BANK(sBoxMon1CaughtLevel)
- call GetSRAMBank
- ld hl, sBoxMon1CaughtLevel
- pop bc
- call SetGiftMonCaughtData
- call CloseSRAM
- ret
-
-SetGiftPartyMonCaughtData: ; 4dba3
- ld a, [PartyCount]
- dec a
- ld hl, PartyMon1CaughtLevel
- push bc
- call GetPartyLocation
- pop bc
-SetGiftMonCaughtData: ; 4dbaf
- xor a
- ld [hli], a
- ld a, $7e
- rrc b
- or b
- ld [hl], a
- ret
-
-SetEggMonCaughtData: ; 4dbb8 (13:5bb8)
- ld a, [CurPartyMon]
- ld hl, PartyMon1CaughtLevel
- call GetPartyLocation
- ld a, [CurPartyLevel]
- push af
- ld a, $1
- ld [CurPartyLevel], a
- call SetBoxmonOrEggmonCaughtData
- pop af
- ld [CurPartyLevel], a
- ret
-
+INCLUDE "engine/routines/flagpredef.asm"
+INCLUDE "engine/routines/trademonfrontpic.asm"
+INCLUDE "engine/pokerus/check_pokerus.asm"
+INCLUDE "event/lucky_number.asm"
+INCLUDE "engine/caught_data.asm"
INCLUDE "engine/search2.asm"
INCLUDE "engine/stats_screen.asm"
-
-CatchTutorial:: ; 4e554
- ld a, [BattleType]
- dec a
- ld c, a
- ld hl, .dw
- ld b, 0
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-.dw ; 4e564 (13:6564)
- dw .DudeTutorial
- dw .DudeTutorial
- dw .DudeTutorial
-
-.DudeTutorial: ; 4e56a (13:656a)
-; Back up your name to your Mom's name.
- ld hl, PlayerName
- ld de, MomsName
- ld bc, NAME_LENGTH
- call CopyBytes
-; Copy Dude's name to your name
- ld hl, .Dude
- ld de, PlayerName
- ld bc, NAME_LENGTH
- call CopyBytes
-
- call .LoadDudeData
-
- xor a
- ld [hJoyDown], a
- ld [hJoyPressed], a
- ld a, [Options]
- push af
- and $f8
- add $3
- ld [Options], a
- ld hl, .AutoInput
- ld a, BANK(.AutoInput)
- call StartAutoInput
- callab StartBattle
- call StopAutoInput
- pop af
-
- ld [Options], a
- ld hl, MomsName
- ld de, PlayerName
- ld bc, NAME_LENGTH
- call CopyBytes
- ret
-
-.LoadDudeData: ; 4e5b7 (13:65b7)
- ld hl, wDudeNumItems
- ld [hl], 1
- inc hl
- ld [hl], POTION
- inc hl
- ld [hl], 1
- inc hl
- ld [hl], -1
- ld hl, wDudeNumKeyItems
- ld [hl], 0
- inc hl
- ld [hl], -1
- ld hl, wDudeNumBalls
- ld a, 1
- ld [hli], a
- ld a, POKE_BALL ; 5
- ld [hli], a
- ld [hli], a
- ld [hl], -1
- ret
-
-.Dude: ; 4e5da
- db "DUDE@"
-
-.AutoInput: ; 4e5df
- db NO_INPUT, $ff ; end
-
+INCLUDE "event/catch_tutorial.asm"
INCLUDE "engine/evolution_animation.asm"
-
-InitDisplayForHallOfFame: ; 4e881
- call ClearBGPalettes
- call ClearTileMap
- call ClearSprites
- call DisableLCD
- call LoadStandardFont
- call LoadFontsBattleExtra
- hlbgcoord 0, 0
- ld bc, VBGMap1 - VBGMap0
- ld a, " "
- call ByteFill
- hlcoord 0, 0, AttrMap
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- xor a
- call ByteFill
- xor a
- ld [hSCY], a
- ld [hSCX], a
- call EnableLCD
- ld hl, .SavingRecordDontTurnOff
- call PrintText
- call WaitBGMap2
- call SetPalettes
- ret
-
-.SavingRecordDontTurnOff: ; 0x4e8bd
- ; SAVING RECORD… DON'T TURN OFF!
- text_jump UnknownText_0x1bd39e
- db "@"
-
-InitDisplayForRedCredits: ; 4e8c2
- call ClearBGPalettes
- call ClearTileMap
- call ClearSprites
- call DisableLCD
- call LoadStandardFont
- call LoadFontsBattleExtra
- hlbgcoord 0, 0
- ld bc, VBGMap1 - VBGMap0
- ld a, " "
- call ByteFill
- hlcoord 0, 0, AttrMap
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- xor a
- call ByteFill
- ld hl, wd000 ; UnknBGPals
- ld c, 4 tiles
-.load_white_palettes
- ld a, (palred 31 + palgreen 31 + palblue 31) % $100
- ld [hli], a
- ld a, (palred 31 + palgreen 31 + palblue 31) / $100
- ld [hli], a
- dec c
- jr nz, .load_white_palettes
- xor a
- ld [hSCY], a
- ld [hSCX], a
- call EnableLCD
- call WaitBGMap2
- call SetPalettes
- ret
-
-ResetDisplayBetweenHallOfFameMons: ; 4e906
- ld a, [rSVBK]
- push af
- ld a, $6
- ld [rSVBK], a
- ld hl, wDecompressScratch
- ld bc, wScratchAttrMap - wDecompressScratch
- ld a, " "
- call ByteFill
- hlbgcoord 0, 0
- ld de, wDecompressScratch
- ld b, 0
- ld c, 4 tiles
- call Request2bpp
- pop af
- ld [rSVBK], a
- ret
-
-GetMobileOTTrainerClass: ; mobile function
- ld h, b
- ld l, c
- call .GetMobileOTTrainerClass
- ld c, a
- ret
-
-.GetMobileOTTrainerClass: ; 4e930
- ld a, [hli]
- xor [hl]
- ld c, a
- jr z, .skip_male_trainers
- srl c
- srl c
-.male_trainer_loop
- srl c
- ld a, c
- cp MaleTrainersEnd - MaleTrainers - 1
- jr nc, .male_trainer_loop
- inc c
-
-.skip_male_trainers
- ld a, [de]
- cp $1
- ld hl, MaleTrainers
- jr nz, .finished
-
- ld hl, FemaleTrainers
- ld a, c
- and a
- jr z, .finished
-
-.female_trainer_loop
- srl c
- ld a, c
- cp FemaleTrainersEnd - FemaleTrainers - 1
- jr nc, .female_trainer_loop
- inc c
-
-.finished
- ld b, $0
- add hl, bc
- ld a, [hl]
- ret
-
-MaleTrainers: ; 4e95d
- db BURGLAR
- db YOUNGSTER
- db SCHOOLBOY
- db BIRD_KEEPER
- db POKEMANIAC
- db GENTLEMAN
- db BUG_CATCHER
- db FISHER
- db SWIMMERM
- db SAILOR
- db SUPER_NERD
- db GUITARIST
- db HIKER
- db FIREBREATHER
- db BLACKBELT_T
- db PSYCHIC_T
- db CAMPER
- db COOLTRAINERM
- db BOARDER
- db JUGGLER
- db POKEFANM
- db OFFICER
- db SAGE
- db BIKER
- db SCIENTIST
-MaleTrainersEnd:
-
-FemaleTrainers: ; 4e976
- db MEDIUM
- db LASS
- db BEAUTY
- db SKIER
- db TEACHER
- db SWIMMERF
- db PICNICKER
- db KIMONO_GIRL
- db POKEFANF
- db COOLTRAINERF
-FemaleTrainersEnd:
-
+INCLUDE "engine/init_hof_credits.asm"
+INCLUDE "mobile/get_trainer_class.asm"
INCLUDE "battle/sliding_intro.asm"
-
-Mobile_PrintOpponentBattleMessage: ; 4ea0a
- ld a, c
- push af
- call SpeechTextBox
- call MobileTextBorder
- pop af
- dec a
- ld bc, $c
- ld hl, w5_MobileOpponentBattleMessages
- call AddNTimes
- ld de, wMobileOpponentBattleMessage
- ld bc, $c
- ld a, $5 ; BANK(w5_MobileOpponentBattleMessages)
- call FarCopyWRAM
-
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
-
- ld bc, wMobileOpponentBattleMessage
- decoord 1, 14
- callba PrintEZChatBattleMessage
-
- pop af
- ld [rSVBK], a
-
- ld c, 180
- call DelayFrames
- ret
-
-CheckBattleScene: ; 4ea44
-; Return carry if battle scene is turned off.
-
- ld a, 0
- ld hl, wLinkMode
- call GetFarWRAMByte
- cp LINK_MOBILE
- jr z, .mobile
-
- ld a, [Options]
- bit BATTLE_SCENE, a
- jr nz, .off
-
- and a
- ret
-
-.mobile
- ld a, [wcd2f]
- and a
- jr nz, .from_wram
-
- ld a, $4
- call GetSRAMBank
- ld a, [$a60c]
- ld c, a
- call CloseSRAM
-
- ld a, c
- bit 0, c
- jr z, .off
-
- and a
- ret
-
-.from_wram
- ld a, $5
- ld hl, w5_dc00
- call GetFarWRAMByte
- bit 0, a
- jr z, .off
-
- and a
- ret
-
-.off
- scf
- ret
-
-INCLUDE "misc/gbc_only.asm"
-
+INCLUDE "mobile/print_opp_message.asm"
+INCLUDE "engine/routines/checkbattlescene.asm"
+INCLUDE "engine/gbc_only.asm"
INCLUDE "event/poke_seer.asm"
+
SECTION "bank14", ROMX
INCLUDE "engine/party_menu.asm"
@@ -3547,1106 +253,17 @@ INCLUDE "event/squirtbottle.asm"
INCLUDE "event/card_key.asm"
INCLUDE "event/basement_key.asm"
INCLUDE "event/sacred_ash.asm"
-
-CopyPkmnToTempMon: ; 5084a
-; gets the BaseData of a Pkmn
-; and copys the PkmnStructure to TempMon
-
- ld a, [CurPartyMon]
- ld e, a
- call GetPkmnSpecies
- ld a, [CurPartySpecies]
- ld [CurSpecies], a
- call GetBaseData
-
- ld a, [MonType]
- ld hl, PartyMon1Species
- ld bc, PARTYMON_STRUCT_LENGTH
- and a
- jr z, .copywholestruct
- ld hl, OTPartyMon1Species
- ld bc, PARTYMON_STRUCT_LENGTH
- cp OTPARTYMON
- jr z, .copywholestruct
- ld bc, BOXMON_STRUCT_LENGTH
- callab CopyBoxmonToTempMon
- jr .done
-
-.copywholestruct
- ld a, [CurPartyMon]
- call AddNTimes
- ld de, TempMon
- ld bc, PARTYMON_STRUCT_LENGTH
- call CopyBytes
-
-.done
- ret
-
-CalcwBufferMonStats: ; 5088b
- ld bc, wBufferMon
- jr _TempMonStatsCalculation
-
-CalcTempmonStats: ; 50890
- ld bc, TempMon
-_TempMonStatsCalculation: ; 50893
- ld hl, MON_LEVEL
- add hl, bc
- ld a, [hl]
- ld [CurPartyLevel], a
- ld hl, MON_MAXHP
- add hl, bc
- ld d, h
- ld e, l
- ld hl, MON_STAT_EXP - 1
- add hl, bc
- push bc
- ld b, $1
- predef CalcPkmnStats
- pop bc
- ld hl, MON_HP
- add hl, bc
- ld d, h
- ld e, l
- ld a, [CurPartySpecies]
- cp EGG
- jr nz, .not_egg
- xor a
- ld [de], a
- inc de
- ld [de], a
- jr .zero_status
-
-.not_egg
- push bc
- ld hl, MON_MAXHP
- add hl, bc
- ld bc, 2
- call CopyBytes
- pop bc
-
-.zero_status
- ld hl, MON_STATUS
- add hl, bc
- xor a
- ld [hli], a
- ld [hl], a
- ret
-
-GetPkmnSpecies: ; 508d5
-; [MonType] has the type of the Pkmn
-; e = Nr. of Pkmn (i.e. [CurPartyMon])
-
- ld a, [MonType]
- and a ; PARTYMON
- jr z, .partymon
- cp OTPARTYMON
- jr z, .otpartymon
- cp BOXMON
- jr z, .boxmon
- cp TEMPMON
- jr z, .breedmon
- ; WILDMON
-
-.partymon
- ld hl, PartySpecies
- jr .done
-
-.otpartymon
- ld hl, OTPartySpecies
- jr .done
-
-.boxmon
- ld a, BANK(sBoxSpecies)
- call GetSRAMBank
- ld hl, sBoxSpecies
- call .done
- call CloseSRAM
- ret
-
-.breedmon
- ld a, [wBreedMon1Species]
- jr .done2
-
-.done
- ld d, 0
- add hl, de
- ld a, [hl]
-
-.done2
- ld [CurPartySpecies], a
- ret
-
+INCLUDE "engine/tempmon.asm"
INCLUDE "text/types.asm"
-
-Function50a28: ; 50a28
-; XXX
- ld hl, .Strings
- ld a, [TrainerClass]
- dec a
- ld c, a
- ld b, 0
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, StringBuffer1
-.copy
- ld a, [hli]
- ld [de], a
- inc de
- cp "@"
- jr nz, .copy
- ret
-
-.Strings: ; 50a42
-; Untranslated trainer class names from Red.
- dw .Youngster
- dw .BugCatcher
- dw .Lass
- dw OTClassName
- dw .JrTrainerM
- dw .JrTrainerF
- dw .Pokemaniac
- dw .SuperNerd
- dw OTClassName
- dw OTClassName
- dw .Burglar
- dw .Engineer
- dw .Jack
- dw OTClassName
- dw .Swimmer
- dw OTClassName
- dw OTClassName
- dw .Beauty
- dw OTClassName
- dw .Rocker
- dw .Juggler
- dw OTClassName
- dw OTClassName
- dw .Blackbelt
- dw OTClassName
- dw .ProfOak
- dw .Chief
- dw .Scientist
- dw OTClassName
- dw .Rocket
- dw .CooltrainerM
- dw .CooltrainerF
- dw OTClassName
- dw OTClassName
- dw OTClassName
- dw OTClassName
- dw OTClassName
- dw OTClassName
- dw OTClassName
- dw OTClassName
- dw OTClassName
- dw OTClassName
- dw OTClassName
- dw OTClassName
- dw OTClassName
- dw OTClassName
- dw OTClassName
-
-.Youngster: db "たんパン@"
-.BugCatcher: db "むしとり@"
-.Lass: db "ミニスカ@"
-.JrTrainerM: db "ボーイ@"
-.JrTrainerF: db "ガール@"
-.Pokemaniac: db "マニア@"
-.SuperNerd: db "りかけい@"
-.Burglar: db "どろぼう@"
-.Engineer: db "ォヤジ@"
-.Jack: db "ジャック@"
-.Swimmer: db "かいパン@"
-.Beauty: db "おねえさん@"
-.Rocker: db "グループ@"
-.Juggler: db "ジャグラー@"
-.Blackbelt: db "からて@"
-.ProfOak: db "ォーキド@"
-.Chief: db "チーフ@"
-.Scientist: db "けんきゅういん@"
-.Rocket: db "だんいん@"
-.CooltrainerM: db "エりート♂@"
-.CooltrainerF: db "エりート♀@"
-
-DrawPlayerHP: ; 50b0a
- ld a, $1
- jr DrawHP
-
-DrawEnemyHP: ; 50b0e
- ld a, $2
-
-DrawHP: ; 50b10
- ld [wWhichHPBar], a
- push hl
- push bc
- ; box mons have full HP
- ld a, [MonType]
- cp BOXMON
- jr z, .at_least_1_hp
-
- ld a, [TempMonHP]
- ld b, a
- ld a, [TempMonHP + 1]
- ld c, a
-
-; Any HP?
- or b
- jr nz, .at_least_1_hp
-
- xor a
- ld c, a
- ld e, a
- ld a, 6
- ld d, a
- jp .fainted
-
-.at_least_1_hp
- ld a, [TempMonMaxHP]
- ld d, a
- ld a, [TempMonMaxHP + 1]
- ld e, a
- ld a, [MonType]
- cp BOXMON
- jr nz, .not_boxmon
-
- ld b, d
- ld c, e
-
-.not_boxmon
- predef ComputeHPBarPixels
- ld a, 6
- ld d, a
- ld c, a
-
-.fainted
- ld a, c
- pop bc
- ld c, a
- pop hl
- push de
- push hl
- push hl
- call DrawBattleHPBar
- pop hl
-
-; Print HP
- bccoord 1, 1, 0
- add hl, bc
- ld de, TempMonHP
- ld a, [MonType]
- cp BOXMON
- jr nz, .not_boxmon_2
- ld de, TempMonMaxHP
-.not_boxmon_2
- lb bc, 2, 3
- call PrintNum
-
- ld a, "/"
- ld [hli], a
-
-; Print max HP
- ld de, TempMonMaxHP
- lb bc, 2, 3
- call PrintNum
- pop hl
- pop de
- ret
-
-PrintTempMonStats: ; 50b7b
-; Print TempMon's stats at hl, with spacing bc.
- push bc
- push hl
- ld de, .StatNames
- call PlaceString
- pop hl
- pop bc
- add hl, bc
- ld bc, SCREEN_WIDTH
- add hl, bc
- ld de, TempMonAttack
- lb bc, 2, 3
- call .PrintStat
- ld de, TempMonDefense
- call .PrintStat
- ld de, TempMonSpclAtk
- call .PrintStat
- ld de, TempMonSpclDef
- call .PrintStat
- ld de, TempMonSpeed
- jp PrintNum
-
-.PrintStat: ; 50bab
- push hl
- call PrintNum
- pop hl
- ld de, SCREEN_WIDTH * 2
- add hl, de
- ret
-
-.StatNames: ; 50bb5
- db "ATTACK"
- next "DEFENSE"
- next "SPCL.ATK"
- next "SPCL.DEF"
- next "SPEED"
- next "@"
-
-GetGender: ; 50bdd
-; Return the gender of a given monster (CurPartyMon/CurOTMon/CurWildMon).
-; When calling this function, a should be set to an appropriate MonType value.
-
-; return values:
-; a = 1: f = nc|nz; male
-; a = 0: f = nc|z; female
-; f = c: genderless
-
-; This is determined by comparing the Attack and Speed DVs
-; with the species' gender ratio.
-
-; Figure out what type of monster struct we're looking at.
-
-; 0: PartyMon
- ld hl, PartyMon1DVs
- ld bc, PARTYMON_STRUCT_LENGTH
- ld a, [MonType]
- and a
- jr z, .PartyMon
-
-; 1: OTPartyMon
- ld hl, OTPartyMon1DVs
- dec a
- jr z, .PartyMon
-
-; 2: sBoxMon
- ld hl, sBoxMon1DVs
- ld bc, BOXMON_STRUCT_LENGTH
- dec a
- jr z, .sBoxMon
-
-; 3: Unknown
- ld hl, TempMonDVs
- dec a
- jr z, .DVs
-
-; else: WildMon
- ld hl, EnemyMonDVs
- jr .DVs
-
-; Get our place in the party/box.
-
-.PartyMon:
-.sBoxMon
- ld a, [CurPartyMon]
- call AddNTimes
-
-.DVs:
-
-; sBoxMon data is read directly from SRAM.
- ld a, [MonType]
- cp BOXMON
- ld a, 1
- call z, GetSRAMBank
-
-; Attack DV
- ld a, [hli]
- and $f0
- ld b, a
-; Speed DV
- ld a, [hl]
- and $f0
- swap a
-
-; Put our DVs together.
- or b
- ld b, a
-
-; Close SRAM if we were dealing with a sBoxMon.
- ld a, [MonType]
- cp BOXMON
- call z, CloseSRAM
-
-; We need the gender ratio to do anything with this.
- push bc
- ld a, [CurPartySpecies]
- dec a
- ld hl, BaseData + BaseGender - CurBaseData
- ld bc, BaseData1 - BaseData
- call AddNTimes
- pop bc
-
- ld a, BANK(BaseData)
- call GetFarByte
-
-; The higher the ratio, the more likely the monster is to be female.
-
- cp $ff
- jr z, .Genderless
-
- and a
- jr z, .Male
-
- cp $fe
- jr z, .Female
-
-; Values below the ratio are male, and vice versa.
- cp b
- jr c, .Male
-
-.Female:
- xor a
- ret
-
-.Male:
- ld a, 1
- and a
- ret
-
-.Genderless:
- scf
- ret
-
-ListMovePP: ; 50c50
- ld a, [wNumMoves]
- inc a
- ld c, a
- ld a, NUM_MOVES
- sub c
- ld b, a
- push hl
- ld a, [Buffer1]
- ld e, a
- ld d, $0
- ld a, $3e ; P
- call .load_loop
- ld a, b
- and a
- jr z, .skip
- ld c, a
- ld a, "-"
- call .load_loop
-
-.skip
- pop hl
- inc hl
- inc hl
- inc hl
- ld d, h
- ld e, l
- ld hl, TempMonMoves
- ld b, 0
-.loop
- ld a, [hli]
- and a
- jr z, .done
- push bc
- push hl
- push de
- ld hl, wMenuCursorY
- ld a, [hl]
- push af
- ld [hl], b
- push hl
- callab GetMaxPPOfMove
- pop hl
- pop af
- ld [hl], a
- pop de
- pop hl
- push hl
- ld bc, TempMonPP - (TempMonMoves + 1)
- add hl, bc
- ld a, [hl]
- and $3f
- ld [StringBuffer1 + 4], a
- ld h, d
- ld l, e
- push hl
- ld de, StringBuffer1 + 4
- lb bc, 1, 2
- call PrintNum
- ld a, "/"
- ld [hli], a
- ld de, wd265
- lb bc, 1, 2
- call PrintNum
- pop hl
- ld a, [Buffer1]
- ld e, a
- ld d, 0
- add hl, de
- ld d, h
- ld e, l
- pop hl
- pop bc
- inc b
- ld a, b
- cp NUM_MOVES
- jr nz, .loop
-
-.done
- ret
-
-.load_loop ; 50cc9
- ld [hli], a
- ld [hld], a
- add hl, de
- dec c
- jr nz, .load_loop
- ret
-
-Function50cd0: ; 50cd0
-; XXX
-.loop
- ld [hl], $32
- inc hl
- ld [hl], $3e
- dec hl
- add hl, de
- dec c
- jr nz, .loop
- ret
-
-Predef22: ; unreferenced predef
- push hl
- push hl
- ld hl, PartyMonNicknames
- ld a, [CurPartyMon]
- call GetNick
- pop hl
- call PlaceString
- call CopyPkmnToTempMon
- pop hl
- ld a, [CurPartySpecies]
- cp EGG
- jr z, .egg
- push hl
- ld bc, -12
- add hl, bc
- ld b, $0
- call DrawEnemyHP
- pop hl
- ld bc, 5
- add hl, bc
- push de
- call PrintLevel
- pop de
-
-.egg
- ret
-
-PlaceStatusString: ; 50d0a
- push de
- inc de
- inc de
- ld a, [de]
- ld b, a
- inc de
- ld a, [de]
- or b
- pop de
- jr nz, PlaceNonFaintStatus
- push de
- ld de, FntString
- call CopyStatusString
- pop de
- ld a, $1
- and a
- ret
-
-FntString: ; 50d22
- db "FNT@"
-
-CopyStatusString: ; 50d25
- ld a, [de]
- inc de
- ld [hli], a
- ld a, [de]
- inc de
- ld [hli], a
- ld a, [de]
- ld [hl], a
- ret
-
-PlaceNonFaintStatus: ; 50d2e
- push de
- ld a, [de]
- ld de, PsnString
- bit PSN, a
- jr nz, .place
- ld de, BrnString
- bit BRN, a
- jr nz, .place
- ld de, FrzString
- bit FRZ, a
- jr nz, .place
- ld de, ParString
- bit PAR, a
- jr nz, .place
- ld de, SlpString
- and SLP
- jr z, .no_status
-
-.place
- call CopyStatusString
- ld a, $1
- and a
-
-.no_status
- pop de
- ret
-
-SlpString: db "SLP@"
-PsnString: db "PSN@"
-BrnString: db "BRN@"
-FrzString: db "FRZ@"
-ParString: db "PAR@"
-
-ListMoves: ; 50d6f
-; List moves at hl, spaced every [Buffer1] tiles.
- ld de, wListMoves_MoveIndicesBuffer
- ld b, $0
-.moves_loop
- ld a, [de]
- inc de
- and a
- jr z, .no_more_moves
- push de
- push hl
- push hl
- ld [CurSpecies], a
- ld a, MOVE_NAME
- ld [wNamedObjectTypeBuffer], a
- call GetName
- ld de, StringBuffer1
- pop hl
- push bc
- call PlaceString
- pop bc
- ld a, b
- ld [wNumMoves], a
- inc b
- pop hl
- push bc
- ld a, [Buffer1]
- ld c, a
- ld b, 0
- add hl, bc
- pop bc
- pop de
- ld a, b
- cp NUM_MOVES
- jr z, .done
- jr .moves_loop
-
-.no_more_moves
- ld a, b
-.nonmove_loop
- push af
- ld [hl], "-"
- ld a, [Buffer1]
- ld c, a
- ld b, 0
- add hl, bc
- pop af
- inc a
- cp NUM_MOVES
- jr nz, .nonmove_loop
-
-.done
- ret
-
-InitList: ; 50db9
- ld a, [wInitListType]
-
- cp INIT_ENEMYOT_LIST
- jr nz, .check_party_ot_name
- ld hl, OTPartyCount
- ld de, OTPartyMonOT
- ld a, ENEMY_OT_NAME
- jr .done
-
-.check_party_ot_name
- cp INIT_PLAYEROT_LIST
- jr nz, .check_mon_name
- ld hl, PartyCount
- ld de, PartyMonOT
- ld a, PARTY_OT_NAME
- jr .done
-
-.check_mon_name
- cp INIT_MON_LIST
- jr nz, .check_item_name
- ld hl, CurMart
- ld de, PokemonNames
- ld a, PKMN_NAME
- jr .done
-
-.check_item_name
- cp INIT_BAG_ITEM_LIST
- jr nz, .check_ob_item_name
- ld hl, NumItems
- ld de, ItemNames
- ld a, ITEM_NAME
- jr .done
-
-.check_ob_item_name
- ld hl, CurMart
- ld de, ItemNames
- ld a, ITEM_NAME
-.done
- ld [wNamedObjectTypeBuffer], a ; d265
- ld a, l
- ld [wListPointer], a
- ld a, h
- ld [wListPointer + 1], a
- ld a, e
- ld [wUnusedD102], a
- ld a, d
- ld [wUnusedD102 + 1], a
- ld bc, ItemAttributes ; ParseEnemyAction, HandleMapTimeAndJoypad, Music_LakeOfRage_Ch3, String_11a7c1 $67c1
- ld a, c
- ld [wItemAttributesPtr], a
- ld a, b
- ld [wItemAttributesPtr + 1], a
- ret
-
-CalcLevel: ; 50e1b
- ld a, [TempMonSpecies]
- ld [CurSpecies], a
- call GetBaseData
- ld d, 1
-.next_level
- inc d
- ld a, d
- cp (MAX_LEVEL + 1) % $100
- jr z, .got_level
- call CalcExpAtLevel
- push hl
- ld hl, TempMonExp + 2
- ld a, [hProduct + 3]
- ld c, a
- ld a, [hld]
- sub c
- ld a, [hProduct + 2]
- ld c, a
- ld a, [hld]
- sbc c
- ld a, [hProduct + 1]
- ld c, a
- ld a, [hl]
- sbc c
- pop hl
- jr nc, .next_level
-
-.got_level
- dec d
- ret
-
-CalcExpAtLevel: ; 50e47
-; (a/b)*n**3 + c*n**2 + d*n - e
- ld a, [BaseGrowthRate]
- add a
- add a
- ld c, a
- ld b, 0
- ld hl, GrowthRates
- add hl, bc
-; Cube the level
- call .LevelSquared
- ld a, d
- ld [hMultiplier], a
- call Multiply
-
-; Multiply by a
- ld a, [hl]
- and $f0
- swap a
- ld [hMultiplier], a
- call Multiply
-; Divide by b
- ld a, [hli]
- and $f
- ld [hDivisor], a
- ld b, 4
- call Divide
-; Push the cubic term to the stack
- ld a, [hQuotient + 0]
- push af
- ld a, [hQuotient + 1]
- push af
- ld a, [hQuotient + 2]
- push af
-; Square the level and multiply by the lower 7 bits of c
- call .LevelSquared
- ld a, [hl]
- and $7f
- ld [hMultiplier], a
- call Multiply
-; Push the absolute value of the quadratic term to the stack
- ld a, [hProduct + 1]
- push af
- ld a, [hProduct + 2]
- push af
- ld a, [hProduct + 3]
- push af
- ld a, [hli]
- push af
-; Multiply the level by d
- xor a
- ld [hMultiplicand + 0], a
- ld [hMultiplicand + 1], a
- ld a, d
- ld [hMultiplicand + 2], a
- ld a, [hli]
- ld [hMultiplier], a
- call Multiply
-; Subtract e
- ld b, [hl]
- ld a, [hProduct + 3]
- sub b
- ld [hMultiplicand + 2], a
- ld b, $0
- ld a, [hProduct + 2]
- sbc b
- ld [hMultiplicand + 1], a
- ld a, [hProduct + 1]
- sbc b
- ld [hMultiplicand], a
-; If bit 7 of c is set, c is negative; otherwise, it's positive
- pop af
- and $80
- jr nz, .subtract
-; Add c*n**2 to (d*n - e)
- pop bc
- ld a, [hProduct + 3]
- add b
- ld [hMultiplicand + 2], a
- pop bc
- ld a, [hProduct + 2]
- adc b
- ld [hMultiplicand + 1], a
- pop bc
- ld a, [hProduct + 1]
- adc b
- ld [hMultiplicand], a
- jr .done_quadratic
-
-.subtract
-; Subtract c*n**2 from (d*n - e)
- pop bc
- ld a, [hProduct + 3]
- sub b
- ld [hMultiplicand + 2], a
- pop bc
- ld a, [hProduct + 2]
- sbc b
- ld [hMultiplicand + 1], a
- pop bc
- ld a, [hProduct + 1]
- sbc b
- ld [hMultiplicand], a
-
-.done_quadratic
-; Add (a/b)*n**3 to (d*n - e +/- c*n**2)
- pop bc
- ld a, [hProduct + 3]
- add b
- ld [hMultiplicand + 2], a
- pop bc
- ld a, [hProduct + 2]
- adc b
- ld [hMultiplicand + 1], a
- pop bc
- ld a, [hProduct + 1]
- adc b
- ld [hMultiplicand], a
- ret
-
-.LevelSquared: ; 50eed
- xor a
- ld [hMultiplicand + 0], a
- ld [hMultiplicand + 1], a
- ld a, d
- ld [hMultiplicand + 2], a
- ld [hMultiplier], a
- jp Multiply
-
-GrowthRates: ; 50efa
-
-growth_rate: MACRO
-; [1]/[2]*n**3 + [3]*n**2 + [4]*n - [5]
- dn \1, \2
- if \3 & $80 ; signed
- db -\3 | $80
- else
- db \3
- endc
- db \4, \5
-ENDM
-
- growth_rate 1, 1, 0, 0, 0 ; Medium Fast
- growth_rate 3, 4, 10, 0, 30 ; Slightly Fast
- growth_rate 3, 4, 20, 0, 70 ; Slightly Slow
- growth_rate 6, 5, -15, 100, 140 ; Medium Slow
- growth_rate 4, 5, 0, 0, 0 ; Fast
- growth_rate 5, 4, 0, 0, 0 ; Slow
-
-_SwitchPartyMons:
- ld a, [wd0e3]
- dec a
- ld [Buffer3], a
- ld b, a
- ld a, [wMenuCursorY]
- dec a
- ld [Buffer2], a ; wd1eb (aliases: MovementType)
- cp b
- jr z, .skip
- call .SwapMonAndMail
- ld a, [Buffer3]
- call .ClearSprite
- ld a, [Buffer2] ; wd1eb (aliases: MovementType)
- call .ClearSprite
-.skip
- ret
-
-.ClearSprite: ; 50f34 (14:4f34)
- push af
- hlcoord 0, 1
- ld bc, 2 * SCREEN_WIDTH
- call AddNTimes
- ld bc, 2 * SCREEN_WIDTH
- ld a, " "
- call ByteFill
- pop af
- ld hl, Sprites
- ld bc, $10
- call AddNTimes
- ld de, $4
- ld c, $4
-.gfx_loop
- ld [hl], $a0
- add hl, de
- dec c
- jr nz, .gfx_loop
- ld de, SFX_SWITCH_POKEMON
- call WaitPlaySFX
- ret
-
-.SwapMonAndMail: ; 50f62 (14:4f62)
- push hl
- push de
- push bc
- ld bc, PartySpecies
- ld a, [Buffer2] ; wd1eb (aliases: MovementType)
- ld l, a
- ld h, $0
- add hl, bc
- ld d, h
- ld e, l
- ld a, [Buffer3]
- ld l, a
- ld h, $0
- add hl, bc
- ld a, [hl]
- push af
- ld a, [de]
- ld [hl], a
- pop af
- ld [de], a
- ld a, [Buffer2] ; wd1eb (aliases: MovementType)
- ld hl, PartyMons ; wdcdf (aliases: PartyMon1, PartyMon1Species)
- ld bc, PARTYMON_STRUCT_LENGTH
- call AddNTimes
- push hl
- ld de, wd002
- ld bc, PARTYMON_STRUCT_LENGTH
- call CopyBytes
- ld a, [Buffer3]
- ld hl, PartyMons ; wdcdf (aliases: PartyMon1, PartyMon1Species)
- ld bc, PARTYMON_STRUCT_LENGTH
- call AddNTimes
- pop de
- push hl
- ld bc, PARTYMON_STRUCT_LENGTH
- call CopyBytes
- pop de
- ld hl, wd002
- ld bc, PARTYMON_STRUCT_LENGTH
- call CopyBytes
- ld a, [Buffer2] ; wd1eb (aliases: MovementType)
- ld hl, PartyMonOT
- call SkipNames
- push hl
- call .CopyNameTowd002
- ld a, [Buffer3]
- ld hl, PartyMonOT
- call SkipNames
- pop de
- push hl
- call .CopyName
- pop de
- ld hl, wd002
- call .CopyName
- ld hl, PartyMonNicknames
- ld a, [Buffer2] ; wd1eb (aliases: MovementType)
- call SkipNames
- push hl
- call .CopyNameTowd002
- ld hl, PartyMonNicknames
- ld a, [Buffer3]
- call SkipNames
- pop de
- push hl
- call .CopyName
- pop de
- ld hl, wd002
- call .CopyName
- ld hl, sPartyMail
- ld a, [Buffer2] ; wd1eb (aliases: MovementType)
- ld bc, MAIL_STRUCT_LENGTH
- call AddNTimes
- push hl
- ld de, wd002
- ld bc, MAIL_STRUCT_LENGTH
- ld a, BANK(sPartyMail)
- call GetSRAMBank
- call CopyBytes
- ld hl, sPartyMail
- ld a, [Buffer3]
- ld bc, MAIL_STRUCT_LENGTH
- call AddNTimes
- pop de
- push hl
- ld bc, MAIL_STRUCT_LENGTH
- call CopyBytes
- pop de
- ld hl, wd002
- ld bc, MAIL_STRUCT_LENGTH
- call CopyBytes
- call CloseSRAM
- pop bc
- pop de
- pop hl
- ret
-
-.CopyNameTowd002: ; 51036 (14:5036)
- ld de, wd002
-
-.CopyName: ; 51039 (14:5039)
- ld bc, NAME_LENGTH
- call CopyBytes
- ret
-
+INCLUDE "text/unused_gen_1_trainers.asm"
+INCLUDE "engine/mon_stats.asm"
+INCLUDE "engine/routines/initlist.asm"
+INCLUDE "engine/experience.asm"
+INCLUDE "engine/routines/switchpartymons.asm"
INCLUDE "gfx/load_pics.asm"
INCLUDE "engine/move_mon_wo_mail.asm"
-BaseData::
-INCLUDE "data/base_stats.asm"
-
-PokemonNames::
-INCLUDE "data/pokemon_names.asm"
+INCLUDE "data/pokemon/base_stats.asm"
+INCLUDE "data/pokemon/pokemon_names.asm"
Unknown_53d84: ; unreferenced
db $1a, $15
@@ -4664,353 +281,68 @@ Unknown_53d84: ; unreferenced
UnknownEggPic:: ; 53d9c
; Another egg pic. This is shifted up a few pixels.
-INCBIN "gfx/misc/unknown_egg.2bpp.lz"
+INCBIN "gfx/unknown/unknown_egg.2bpp.lz"
+
-SECTION "bank19", ROMX
+SECTION "Crystal Phone Text", ROMX
INCLUDE "text/phone/extra.asm"
+
SECTION "bank20", ROMX
INCLUDE "engine/player_movement.asm"
-
INCLUDE "engine/engine_flags.asm"
-
INCLUDE "engine/variables.asm"
-
-BattleText::
INCLUDE "text/battle.asm"
-
INCLUDE "engine/debug.asm"
+
SECTION "bank21", ROMX
INCLUDE "engine/printer.asm"
-
INCLUDE "battle/anim_gfx.asm"
-
INCLUDE "event/halloffame.asm"
+
SECTION "bank22", ROMX
INCLUDE "event/kurt.asm"
-
-Function88248: ; 88248
-; XXX
- ld c, CAL
- ld a, [PlayerGender]
- bit 0, a
- jr z, .okay
- ld c, KAREN
-
-.okay
- ld a, c
- ld [TrainerClass], a
- ret
-
-MovePlayerPicRight: ; 88258
- hlcoord 6, 4
- ld de, 1
- jr MovePlayerPic
-
-MovePlayerPicLeft: ; 88260
- hlcoord 13, 4
- ld de, -1
- ; fallthrough
-
-MovePlayerPic: ; 88266
-; Move player pic at hl by de * 7 tiles.
- ld c, $8
-.loop
- push bc
- push hl
- push de
- xor a
- ld [hBGMapMode], a
- lb bc, 7, 7
- predef PlaceGraphic
- xor a
- ld [hBGMapThird], a
- call WaitBGMap
- call DelayFrame
- pop de
- pop hl
- add hl, de
- pop bc
- dec c
- ret z
- push hl
- push bc
- ld a, l
- sub e
- ld l, a
- ld a, h
- sbc d
- ld h, a
- lb bc, 7, 7
- call ClearBox
- pop bc
- pop hl
- jr .loop
-
-ShowPlayerNamingChoices: ; 88297
- ld hl, ChrisNameMenuHeader
- ld a, [PlayerGender]
- bit 0, a
- jr z, .GotGender
- ld hl, KrisNameMenuHeader
-.GotGender:
- call LoadMenuDataHeader
- call VerticalMenu
- ld a, [wMenuCursorY]
- dec a
- call CopyNameFromMenu
- call CloseWindow
- ret
-
-ChrisNameMenuHeader: ; 882b5
- db $40 ; flags
- db 00, 00 ; start coords
- db 11, 10 ; end coords
- dw .MaleNames
- db 1 ; ????
- db 0 ; default option
-
-.MaleNames: ; 882be
- db $91 ; flags
- db 5 ; items
- db "NEW NAME@"
-MalePlayerNameArray: ; 882c9
- db "CHRIS@"
- db "MAT@"
- db "ALLAN@"
- db "JON@"
- db 2 ; displacement
- db " NAME @" ; title
-
-KrisNameMenuHeader: ; 882e5
- db $40 ; flags
- db 00, 00 ; start coords
- db 11, 10 ; end coords
- dw .FemaleNames
- db 1 ; ????
- db 0 ; default option
-
-.FemaleNames: ; 882ee
- db $91 ; flags
- db 5 ; items
- db "NEW NAME@"
-FemalePlayerNameArray: ; 882f9
- db "KRIS@"
- db "AMANDA@"
- db "JUANA@"
- db "JODI@"
- db 2 ; displacement
- db " NAME @" ; title
-
-GetPlayerNameArray: ; 88318 This Function is never called
- ld hl, PlayerName
- ld de, MalePlayerNameArray
- ld a, [PlayerGender]
- bit 0, a
- jr z, .done
- ld de, FemalePlayerNameArray
-
-.done
- call InitName
- ret
-
-GetPlayerIcon: ; 8832c
-; Get the player icon corresponding to gender
-
-; Male
- ld de, ChrisSpriteGFX
- ld b, BANK(ChrisSpriteGFX)
-
- ld a, [PlayerGender]
- bit 0, a
- jr z, .done
-
-; Female
- ld de, KrisSpriteGFX
- ld b, BANK(KrisSpriteGFX)
-
-.done
- ret
-
-GetCardPic: ; 8833e
- ld hl, ChrisCardPic
- ld a, [PlayerGender]
- bit 0, a
- jr z, .GotClass
- ld hl, KrisCardPic
-.GotClass:
- ld de, VTiles2 tile $00
- ld bc, $23 tiles
- ld a, BANK(ChrisCardPic) ; BANK(KrisCardPic)
- call FarCopyBytes
- ld hl, CardGFX
- ld de, VTiles2 tile $23
- ld bc, 6 tiles
- ld a, BANK(CardGFX)
- call FarCopyBytes
- ret
-
-ChrisCardPic: ; 88365
-INCBIN "gfx/misc/chris_card.2bpp"
-
-KrisCardPic: ; 88595
-INCBIN "gfx/misc/kris_card.2bpp"
-
-CardGFX: ; 887c5
-INCBIN "gfx/misc/trainer_card.2bpp"
-
-GetPlayerBackpic: ; 88825
- ld a, [PlayerGender]
- bit 0, a
- jr z, GetChrisBackpic
- call GetKrisBackpic
- ret
-
-GetChrisBackpic: ; 88830
- ld hl, ChrisBackpic
- ld b, BANK(ChrisBackpic)
- ld de, VTiles2 tile $31
- ld c, 7 * 7
- predef DecompressPredef
- ret
-
-HOF_LoadTrainerFrontpic: ; 88840
- call WaitBGMap
- xor a
- ld [hBGMapMode], a
- ld e, 0
- ld a, [PlayerGender]
- bit 0, a
- jr z, .GotClass
- ld e, 1
-
-.GotClass:
- ld a, e
- ld [TrainerClass], a
- ld de, ChrisPic
- ld a, [PlayerGender]
- bit 0, a
- jr z, .GotPic
- ld de, KrisPic
-
-.GotPic:
- ld hl, VTiles2
- ld b, BANK(ChrisPic) ; BANK(KrisPic)
- ld c, 7 * 7
- call Get2bpp
- call WaitBGMap
- ld a, $1
- ld [hBGMapMode], a
- ret
-
-DrawIntroPlayerPic: ; 88874
-; Draw the player pic at (6,4).
-
-; Get class
- ld e, CHRIS
- ld a, [PlayerGender]
- bit 0, a
- jr z, .GotClass
- ld e, KRIS
-.GotClass:
- ld a, e
- ld [TrainerClass], a
-
-; Load pic
- ld de, ChrisPic
- ld a, [PlayerGender]
- bit 0, a
- jr z, .GotPic
- ld de, KrisPic
-.GotPic:
- ld hl, VTiles2
- ld b, BANK(ChrisPic) ; BANK(KrisPic)
- ld c, 7 * 7 ; dimensions
- call Get2bpp
-
-; Draw
- xor a
- ld [hGraphicStartTile], a
- hlcoord 6, 4
- lb bc, 7, 7
- predef PlaceGraphic
- ret
-
-ChrisPic: ; 888a9
-INCBIN "gfx/misc/chris.2bpp"
-
-KrisPic: ; 88bb9
-INCBIN "gfx/misc/kris.2bpp"
-
-GetKrisBackpic: ; 88ec9
-; Kris's backpic is uncompressed.
- ld de, KrisBackpic
- ld hl, VTiles2 tile $31
- lb bc, BANK(KrisBackpic), 7 * 7 ; dimensions
- call Get2bpp
- ret
-
-KrisBackpic: ; 88ed6
-INCBIN "gfx/misc/kris_back.2bpp"
-
-String_89116:
- db "-----@"
-
-INCLUDE "misc/mobile_22.asm"
+INCLUDE "engine/player_gfx.asm"
+INCLUDE "mobile/mobile_22.asm"
INCLUDE "event/unown.asm"
INCLUDE "event/buena.asm"
INCLUDE "event/dratini.asm"
INCLUDE "event/battle_tower.asm"
-INCLUDE "misc/mobile_22_2.asm"
+INCLUDE "mobile/mobile_22_2.asm"
-SECTION "bank23", ROMX
-Predef35: ; 8c000
-Predef36:
- ret
+SECTION "bank23", ROMX
INCLUDE "engine/timeofdaypals.asm"
-INCLUDE "engine/battle_start.asm"
-
-Function8c7c9:
-; XXX
- ld a, $1
- ld [hBGMapMode], a
- call WaitBGMap
- xor a
- ld [hBGMapMode], a
- ret
-
+INCLUDE "engine/battle_transition.asm"
INCLUDE "event/field_moves.asm"
INCLUDE "event/magnet_train.asm"
-
-BattleStart_LoadEDTile: ; 8cf4f
- call CGBOnly_LoadEDTile
- ret
-
+INCLUDE "engine/routines/battlestart_copytilemapatonce.asm"
INCLUDE "engine/sprites.asm"
-
INCLUDE "engine/mon_icons.asm"
+
SECTION "bank24", ROMX
-INCLUDE "engine/phone.asm"
+INCLUDE "engine/phone/phone.asm"
INCLUDE "engine/timeset.asm"
INCLUDE "engine/pokegear.asm"
-
INCLUDE "engine/fish.asm"
INCLUDE "engine/slot_machine.asm"
+
SECTION "Phone Engine", ROMX
-INCLUDE "engine/more_phone_scripts.asm"
-INCLUDE "engine/buena_phone_scripts.asm"
+INCLUDE "engine/phone/phone_callers.asm"
+INCLUDE "engine/phone/phone_gossip.asm"
+INCLUDE "engine/phone/buenas_password.asm"
+
SECTION "Phone Text", ROMX
@@ -5032,285 +364,67 @@ INCLUDE "text/phone/kenji_overworld.asm"
INCLUDE "text/phone/parry_overworld.asm"
INCLUDE "text/phone/erin_overworld.asm"
-SECTION "Tileset Data 5", ROMX
-
-INCLUDE "tilesets/data_5.asm"
SECTION "bank2E", ROMX
INCLUDE "engine/events_3.asm"
-
INCLUDE "engine/radio.asm"
-
INCLUDE "gfx/mail.asm"
+
SECTION "bank2F", ROMX
INCLUDE "engine/std_scripts.asm"
+INCLUDE "engine/phone/phone_scripts.asm"
+INCLUDE "engine/phone/generic_calls.asm"
+INCLUDE "engine/trainer_scripts.asm"
-INCLUDE "engine/phone_scripts.asm"
-
-TalkToTrainerScript:: ; 0xbe66a
- faceplayer
- trainerflagaction CHECK_FLAG
- iftrue AlreadyBeatenTrainerScript
- loadmemtrainer
- encountermusic
- jump StartBattleWithMapTrainerScript
-
-SeenByTrainerScript:: ; 0xbe675
- loadmemtrainer
- encountermusic
- showemote EMOTE_SHOCK, LAST_TALKED, 30
- callasm TrainerWalkToPlayer
- applymovement2 MovementBuffer
- writepersonxy LAST_TALKED
- faceperson PLAYER, LAST_TALKED
- jump StartBattleWithMapTrainerScript
-
-StartBattleWithMapTrainerScript: ; 0xbe68a
- opentext
- trainertext $0
- waitbutton
- closetext
- loadmemtrainer
- startbattle
- reloadmapafterbattle
- trainerflagaction SET_FLAG
- loadvar wRunningTrainerBattleScript, -1
-
-AlreadyBeatenTrainerScript:
- scripttalkafter
-
-SECTION "bank30", ROMX
-
-INCLUDE "gfx/overworld/sprites_1.asm"
-
-SECTION "bank31", ROMX
-
-INCLUDE "gfx/overworld/sprites_2.asm"
SECTION "bank32", ROMX
INCLUDE "battle/bg_effects.asm"
-
INCLUDE "battle/anims.asm"
-
-LoadPoisonBGPals: ; cbcdd
- call .LoadPals
- ld a, [hCGB]
- and a
- ret nz
- ret ; ????
-
-.LoadPals: ; cbce5
- ld a, [hCGB]
- and a
- jr nz, .cgb
- ld a, [TimeOfDayPal]
- and $3
- cp $3
- ld a, %00000000
- jr z, .convert_pals
- ld a, %10101010
-
-.convert_pals
- call DmgToCgbBGPals
- ld c, 4
- call DelayFrames
- callba _UpdateTimePals
- ret
-
-.cgb
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, BGPals
- ld c, $20
-.loop
-; RGB 28, 21, 31
- ld a, (palred 28 + palgreen 21 + palblue 31) % $100
- ld [hli], a
- ld a, (palred 28 + palgreen 21 + palblue 31) / $100
- ld [hli], a
- dec c
- jr nz, .loop
- pop af
- ld [rSVBK], a
- ld a, $1
- ld [hCGBPalUpdate], a
- ld c, 4
- call DelayFrames
- callba _UpdateTimePals
- ret
+INCLUDE "event/poisonstep_pals.asm"
TheEndGFX:: ; cbd2e
INCBIN "gfx/credits/theend.2bpp"
-SECTION "bank33", ROMX
-DisplayCaughtContestMonStats: ; cc000
-
- call ClearBGPalettes
- call ClearTileMap
- call ClearSprites
- call LoadFontsBattleExtra
-
- ld hl, Options
- ld a, [hl]
- push af
- set 4, [hl]
-
- hlcoord 0, 0
- ld b, 4
- ld c, 13
- call TextBox
-
- hlcoord 0, 6
- ld b, 4
- ld c, 13
- call TextBox
-
- hlcoord 2, 0
- ld de, .Stock
- call PlaceString
-
- hlcoord 2, 6
- ld de, .This
- call PlaceString
-
- hlcoord 5, 4
- ld de, .Health
- call PlaceString
-
- hlcoord 5, 10
- ld de, .Health
- call PlaceString
-
- ld a, [wContestMon]
- ld [wd265], a
- call GetPokemonName
- ld de, StringBuffer1
- hlcoord 1, 2
- call PlaceString
-
- ld h, b
- ld l, c
- ld a, [wContestMonLevel]
- ld [TempMonLevel], a
- call PrintLevel
-
- ld de, EnemyMonNick
- hlcoord 1, 8
- call PlaceString
-
- ld h, b
- ld l, c
- ld a, [EnemyMonLevel]
- ld [TempMonLevel], a
- call PrintLevel
-
- hlcoord 11, 4
- ld de, wContestMonMaxHP
- lb bc, 2, 3
- call PrintNum
-
- hlcoord 11, 10
- ld de, EnemyMonMaxHP
- call PrintNum
-
- ld hl, SwitchMonText
- call PrintText
-
- pop af
- ld [Options], a
-
- call WaitBGMap
- ld b, SCGB_DIPLOMA
- call GetSGBLayout
- call SetPalettes
- ret
-
-.Health:
- db "HEALTH@"
-.Stock:
- db " STOCK ", $4a, " @"
-.This:
- db " THIS ", $4a, " @"
-
-SwitchMonText: ; cc0c2
- ; Switch #MON?
- text_jump UnknownText_0x1c10cf
- db "@"
-
-DisplayAlreadyCaughtText: ; cc0c7
- call GetPokemonName
- ld hl, .AlreadyCaughtText
- jp PrintText
-
-.AlreadyCaughtText: ; 0xcc0d0
- ; You already caught a @ .
- text_jump UnknownText_0x1c10dd
- db "@"
-
-Predef2F:
-Predef38:
-Predef39: ; cc0d5
- ret
+SECTION "bank33", ROMX
+INCLUDE "event/bug_contest/display_stats.asm"
INCLUDE "battle/anim_commands.asm"
-
INCLUDE "battle/anim_objects.asm"
+
SECTION "Pic Animations 1", ROMX
INCLUDE "gfx/pics/animation.asm"
-
-; Pic animations are assembled in 3 parts:
-
-; Top-level animations:
-; frame #, duration: Frame 0 is the original pic (no change)
-; setrepeat #: Sets the number of times to repeat
-; dorepeat #: Repeats from command # (starting from 0)
-; end
-
-; Bitmasks:
-; Layered over the pic to designate affected tiles
-
-; Frame definitions:
-; first byte is the bitmask used for this frame
-; following bytes are tile ids mapped to each bit in the mask
-
-; Main animations (played everywhere)
INCLUDE "gfx/pics/anim_pointers.asm"
INCLUDE "gfx/pics/anims.asm"
-
-; Extra animations, appended to the main animation
-; Used in the status screen (blinking, tail wags etc.)
INCLUDE "gfx/pics/extra_pointers.asm"
INCLUDE "gfx/pics/extras.asm"
-
-; Unown has its own animation data despite having an entry in the main tables
INCLUDE "gfx/pics/unown_anim_pointers.asm"
INCLUDE "gfx/pics/unown_anims.asm"
INCLUDE "gfx/pics/unown_extra_pointers.asm"
INCLUDE "gfx/pics/unown_extras.asm"
-
-; Bitmasks
INCLUDE "gfx/pics/bitmask_pointers.asm"
INCLUDE "gfx/pics/bitmasks.asm"
INCLUDE "gfx/pics/unown_bitmask_pointers.asm"
INCLUDE "gfx/pics/unown_bitmasks.asm"
+
SECTION "Pic Animations 2", ROMX
INCLUDE "gfx/pics/frame_pointers.asm"
INCLUDE "gfx/pics/kanto_frames.asm"
-SECTION "bank36", ROMX
-FontInversed: INCBIN "gfx/misc/font_inversed.1bpp"
+SECTION "Font Inversed", ROMX
+
+FontInversed:
+INCBIN "gfx/font/font_inversed.1bpp"
+
SECTION "Pic Animations 3", ROMX
@@ -5318,123 +432,10 @@ INCLUDE "gfx/pics/johto_frames.asm"
INCLUDE "gfx/pics/unown_frame_pointers.asm"
INCLUDE "gfx/pics/unown_frames.asm"
-SECTION "Tileset Data 6", ROMX
-
-INCLUDE "tilesets/data_6.asm"
SECTION "bank38", ROMX
-RotateUnownFrontpic: ; e0000
-; something to do with Unown printer
- push de
- xor a
- call GetSRAMBank
- ld hl, sScratch
- ld bc, 0
-.loop
- push bc
- push hl
- push bc
- ld de, wd002
- call .Copy
- call .Rotate
- ld hl, UnownPrinter_OverworldMapRectangle
- pop bc
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld e, a
- ld d, [hl]
- ld hl, wd012
- call .Copy
- pop hl
- ld bc, $10
- add hl, bc
- pop bc
- inc c
- ld a, c
- cp 7 * 7
- jr c, .loop
-
- ld hl, OverworldMap
- ld de, sScratch
- ld bc, 7 * 7 tiles
- call CopyBytes
- pop hl
- ld de, sScratch
- ld c, 7 * 7
- ld a, [hROMBank]
- ld b, a
- call Get2bpp
- call CloseSRAM
- ret
-
-.Copy: ; e004e
- ld c, $10
-.loop_copy
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .loop_copy
- ret
-
-.Rotate: ; e0057
- ld hl, wd012
- ld e, %10000000
- ld d, 8
-.loop_decompress
- push hl
- ld hl, wd002
- call .CountSetBit
- pop hl
- ld a, b
- ld [hli], a
- push hl
- ld hl, wd003
- call .CountSetBit
- pop hl
- ld a, b
- ld [hli], a
- srl e
- dec d
- jr nz, .loop_decompress
- ret
-
-.CountSetBit: ; e0078
- ld b, 0
- ld c, 8
-.loop_count
- ld a, [hli]
- and e
- jr z, .clear
- scf
- jr .apply
-
-.clear
- and a
-
-.apply
- rr b
- inc hl
- dec c
- jr nz, .loop_count
- ret
-
-overworldmaprect: MACRO
-y = 0
-rept \1
-x = \1 * (\2 +- 1) + y
-rept \2
- dw OverworldMap tile x
-x = x +- \2
-endr
-y = y + 1
-endr
-endm
-
-UnownPrinter_OverworldMapRectangle: ; e008b
- overworldmaprect 7, 7
+INCLUDE "event/print_unown_2.asm"
Unknown_e00ed:
; Graphics for an unused Game Corner
@@ -5449,114 +450,109 @@ INCLUDE "engine/unown_puzzle.asm"
INCLUDE "engine/dummy_game.asm"
INCLUDE "engine/billspc.asm"
+
SECTION "bank39", ROMX
CopyrightGFX:: ; e4000
-INCBIN "gfx/misc/copyright.2bpp"
+INCBIN "gfx/splash/copyright.2bpp"
INCLUDE "engine/options_menu.asm"
INCLUDE "engine/crystal_intro.asm"
+
SECTION "bank3E", ROMX
INCLUDE "gfx/font.asm"
-INCLUDE "engine/time_capsule/conversion.asm"
-INCLUDE "engine/unowndex.asm"
+INCLUDE "engine/time_capsule.asm"
+INCLUDE "event/name_rater.asm"
+INCLUDE "engine/routines/playslowcry.asm"
+INCLUDE "engine/routines/newpokedexentry.asm"
+INCLUDE "engine/time_capsule_2.asm"
+INCLUDE "engine/unown_dex.asm"
INCLUDE "event/magikarp.asm"
-
INCLUDE "battle/hidden_power.asm"
-
INCLUDE "battle/misc.asm"
+
SECTION "bank3F", ROMX
INCLUDE "tilesets/animations.asm"
-
INCLUDE "engine/npctrade.asm"
-
INCLUDE "event/mom_phone.asm"
-SECTION "bank40", ROMX
-INCLUDE "misc/mobile_40.asm"
+INCLUDE "mobile/mobile_40.asm"
-SECTION "bank41", ROMX
-INCLUDE "misc/gfx_41.asm"
+SECTION "bank41", ROMX
+INCLUDE "engine/dma_transfer.asm"
+INCLUDE "gfx/emotes.asm"
INCLUDE "engine/warp_connection.asm"
-
-INCLUDE "engine/mysterygift.asm"
-
+INCLUDE "engine/mystery_gift.asm"
INCLUDE "battle/used_move_text.asm"
+INCLUDE "mobile/mobile_41.asm"
+INCLUDE "gfx/overworld_font.asm"
-INCLUDE "misc/mobile_41.asm"
-
-LoadOverworldFont:: ; 106594
- ld de, .font
- ld hl, VTiles1
- lb bc, BANK(.font), $80
- call Get2bpp
- ld de, .space
- ld hl, VTiles2 tile $7f
- lb bc, BANK(.space), 1
- call Get2bpp
- ret
-; 1065ad
-.font
-INCBIN "gfx/font/overworld.2bpp"
-.space
-INCBIN "gfx/font/space.2bpp"
+SECTION "mobile_42", ROMX
-SECTION "bank42", ROMX
+INCLUDE "mobile/mobile_42.asm"
-INCLUDE "misc/mobile_42.asm"
SECTION "Intro Logo", ROMX
IntroLogoGFX: ; 109407
INCBIN "gfx/intro/logo.2bpp.lz"
-SECTION "bank43", ROMX
-INCLUDE "misc/unused_title.asm"
+SECTION "bank43", ROMX
+INCLUDE "engine/unused_title.asm"
INCLUDE "engine/title.asm"
-INCLUDE "misc/mobile_45.asm"
-INCLUDE "misc/mobile_46.asm"
-SECTION "bank47", ROMX
+INCLUDE "mobile/mobile_45.asm"
+
+
+INCLUDE "mobile/mobile_46.asm"
+
+
+SECTION "battle_tower_47", ROMX
+
+INCLUDE "mobile/battle_tower_47.asm"
-INCLUDE "misc/battle_tower_47.asm"
SECTION "bank5B", ROMX
-INCLUDE "misc/mobile_5b.asm"
+INCLUDE "mobile/mobile_5b.asm"
INCLUDE "engine/link_trade.asm"
-SECTION "bank5C", ROMX
-INCLUDE "misc/mobile_5c.asm"
+SECTION "mobile_5c", ROMX
+
+INCLUDE "mobile/mobile_5c.asm"
+
+
+SECTION "Crystal Phone Text 2", ROMX
-SECTION "bank5D", ROMX
+INCLUDE "text/phone/extra2.asm"
-INCLUDE "text/phone/extra3.asm"
SECTION "bank5E", ROMX
-_UpdateBattleHUDs:
- callba DrawPlayerHUD
- ld hl, PlayerHPPal
- call SetHPPal
- callba DrawEnemyHUD
- ld hl, EnemyHPPal
- call SetHPPal
- callba FinishBattleAnim
- ret
+INCLUDE "engine/routines/updatebattlehuds.asm"
+
+
+SECTION "mobile_5e", ROMX
+
+INCLUDE "mobile/mobile_5e.asm"
+
+
+SECTION "bank5F", ROMX
+
+INCLUDE "mobile/mobile_5f.asm"
-INCLUDE "misc/mobile_5f.asm"
SECTION "Common Text 1", ROMX
@@ -5573,541 +569,73 @@ INCLUDE "text/phone/wade_overworld.asm"
INCLUDE "text/phone/ralph_overworld.asm"
INCLUDE "text/phone/liz_overworld.asm"
-SECTION "bank6D", ROMX
+
+SECTION "Special Phone Text", ROMX
INCLUDE "text/phone/mom.asm"
INCLUDE "text/phone/bill.asm"
INCLUDE "text/phone/elm.asm"
INCLUDE "text/phone/trainers1.asm"
-SECTION "bank72", ROMX
-
-ItemNames::
-INCLUDE "items/item_names.asm"
-INCLUDE "items/item_descriptions.asm"
+SECTION "bank72", ROMX
-MoveNames::
+INCLUDE "data/items/item_names.asm"
+INCLUDE "data/items/item_descriptions.asm"
INCLUDE "battle/move_names.asm"
-
INCLUDE "engine/landmarks.asm"
+
SECTION "bank77", ROMX
UnownFont: ; 1dc000
-INCBIN "gfx/misc/unown_font.2bpp"
+INCBIN "gfx/font/unown_font.2bpp"
-INCLUDE "misc/printer_77.asm"
+INCLUDE "engine/print_party.asm"
-MobileHPIcon: ; 1dc591
-INCBIN "gfx/mobile/hp.1bpp"
-
-MobileLvIcon: ; 1dc599
-INCBIN "gfx/mobile/lv.1bpp"
-
-SECTION "Tileset Data 7", ROMX
-
-INCLUDE "tilesets/data_7.asm"
SECTION "bank77_2", ROMX
-Function1dd6a9: ; 1dd6a9
-; XXX
- ld a, b
- ld b, c
- ld c, a
- push bc
- push de
- ld hl, sp+$2
- ld d, h
- ld e, l
- pop hl
- lb bc, PRINTNUM_LEADINGZEROS | 2, 5
- call PrintNum
- pop bc
- ret
-
-PrintHoursMins ; 1dd6bb (77:56bb)
-; Hours in b, minutes in c
- ld a, b
- cp 12
- push af
- jr c, .AM
- jr z, .PM
- sub 12
- jr .PM
-.AM:
- or a
- jr nz, .PM
- ld a, 12
-.PM:
- ld b, a
-; Crazy stuff happening with the stack
- push bc
- ld hl, sp+$1
- push de
- push hl
- pop de
- pop hl
- ld [hl], " "
- lb bc, 1, 2
- call PrintNum
- ld [hl], ":"
- inc hl
- ld d, h
- ld e, l
- ld hl, sp+$0
- push de
- push hl
- pop de
- pop hl
- lb bc, PRINTNUM_LEADINGZEROS | 1, 2
- call PrintNum
- pop bc
- ld de, String_AM
- pop af
- jr c, .place_am_pm
- ld de, String_PM
-.place_am_pm
- inc hl
- call PlaceString
- ret
-
-String_AM: db "AM@" ; 1dd6fc
-String_PM: db "PM@" ; 1dd6ff
-
+INCLUDE "engine/routines/printhoursmins.asm"
INCLUDE "engine/diploma.asm"
-
-LoadSGBPokedexGFX: ; 1ddf1c
- ld hl, SGBPokedexGFX_LZ
- ld de, VTiles2 tile $31
- call Decompress
- ret
-
-LoadSGBPokedexGFX2: ; 1ddf26 (77:5f26)
- ld hl, SGBPokedexGFX_LZ
- ld de, VTiles2 tile $31
- lb bc, BANK(SGBPokedexGFX_LZ), $3a
- call DecompressRequest2bpp
- ret
-
-SGBPokedexGFX_LZ: ; 1ddf33
-INCBIN "gfx/pokedex/sgb.2bpp.lz"
-
-LoadQuestionMarkPic: ; 1de0d7
- ld hl, .QuestionMarkLZ
- ld de, sScratch
- call Decompress
- ret
-
-.QuestionMarkLZ: ; 1de0e1
-INCBIN "gfx/pics/questionmark/front.2bpp.lz"
-
-DrawPokedexListWindow: ; 1de171 (77:6171)
- ld a, $32
- hlcoord 0, 17
- ld bc, 12
- call ByteFill
- hlcoord 0, 1
- lb bc, 15, 11
- call ClearBox
- ld a, $34
- hlcoord 0, 0
- ld bc, 11
- call ByteFill
- ld a, $39
- hlcoord 0, 16
- ld bc, 11
- call ByteFill
- hlcoord 5, 0
- ld [hl], $3f
- hlcoord 5, 16
- ld [hl], $40
- ld a, [wCurrentDexMode]
- cp DEXMODE_OLD
- jr z, .OldMode
-; scroll bar
- hlcoord 11, 0
- ld [hl], $50
- ld a, $51
- hlcoord 11, 1
- ld b, SCREEN_HEIGHT - 3
- call Bank77_FillColumn
- ld [hl], $52
- jr .Done
-
-.OldMode:
-; no scroll bar
- hlcoord 11, 0
- ld [hl], $66
- ld a, $67
- hlcoord 11, 1
- ld b, SCREEN_HEIGHT - 3
- call Bank77_FillColumn
- ld [hl], $68
-.Done:
- ret
-
-DrawPokedexSearchResultsWindow: ; 1de1d1 (77:61d1)
- ld a, $34
- hlcoord 0, 0
- ld bc, 11
- call ByteFill
- ld a, $39
- hlcoord 0, 10
- ld bc, 11
- call ByteFill
- hlcoord 5, 0
- ld [hl], $3f
- hlcoord 5, 10
- ld [hl], $40
- hlcoord 11, 0
- ld [hl], $66
- ld a, $67
- hlcoord 11, 1
- ld b, SCREEN_HEIGHT / 2
- call Bank77_FillColumn
- ld [hl], $68
- ld a, $34
- hlcoord 0, 11
- ld bc, 11
- call ByteFill
- ld a, $39
- hlcoord 0, 17
- ld bc, 11
- call ByteFill
- hlcoord 11, 11
- ld [hl], $66
- ld a, $67
- hlcoord 11, 12
- ld b, 5
- call Bank77_FillColumn
- ld [hl], $68
- hlcoord 0, 12
- lb bc, 5, 11
- call ClearBox
- ld de, .esults_D
- hlcoord 0, 12
- call PlaceString
- ret
-
-.esults_D ; 1de23c
-; (SEARCH R)
- db "ESULTS"
- next ""
-; (### FOUN)
- next "D!@"
-
-DrawDexEntryScreenRightEdge: ; 1de247
- ld a, [hBGMapAddress]
- ld l, a
- ld a, [hBGMapAddress + 1]
- ld h, a
- push hl
- inc hl
- ld a, l
- ld [hBGMapAddress], a
- ld a, h
- ld [hBGMapAddress + 1], a
- hlcoord 19, 0
- ld [hl], $66
- hlcoord 19, 1
- ld a, $67
- ld b, 15
- call Bank77_FillColumn
- ld [hl], $68
- hlcoord 19, 17
- ld [hl], $3c
- xor a
- ld b, SCREEN_HEIGHT
- hlcoord 19, 0, AttrMap
- call Bank77_FillColumn
- call WaitBGMap2
- pop hl
- ld a, l
- ld [hBGMapAddress], a
- ld a, h
- ld [hBGMapAddress + 1], a
- ret
-
-Bank77_FillColumn: ; 1de27f
- push de
- ld de, SCREEN_WIDTH
-.loop
- ld [hl], a
- add hl, de
- dec b
- jr nz, .loop
- pop de
- ret
-
-_DudeAutoInput_A:: ; 1de28a
- ld hl, DudeAutoInput_A
- jr _DudeAutoInput
-
-_DudeAutoInput_RightA: ; 1de28f
- ld hl, DudeAutoInput_RightA
- jr _DudeAutoInput
-
-_DudeAutoInput_DownA: ; 1de294
- ld hl, DudeAutoInput_DownA
- jr _DudeAutoInput
-
-_DudeAutoInput: ; 1de299
- ld a, BANK(DudeAutoInputs)
- call StartAutoInput
- ret
-
-DudeAutoInputs:
-
-DudeAutoInput_A: ; 1de29f
- db NO_INPUT, $50
- db A_BUTTON, $00
- db NO_INPUT, $ff ; end
-
-DudeAutoInput_RightA: ; 1de2a5
- db NO_INPUT, $08
- db D_RIGHT, $00
- db NO_INPUT, $08
- db A_BUTTON, $00
- db NO_INPUT, $ff ; end
-
-DudeAutoInput_DownA: ; 1de2af
- db NO_INPUT, $fe
- db NO_INPUT, $fe
- db NO_INPUT, $fe
- db NO_INPUT, $fe
- db D_DOWN, $00
- db NO_INPUT, $fe
- db NO_INPUT, $fe
- db NO_INPUT, $fe
- db NO_INPUT, $fe
- db A_BUTTON, $00
- db NO_INPUT, $ff ; end
-
-TownMap_ConvertLineBreakCharacters: ; 1de2c5
- ld hl, StringBuffer1
-.loop
- ld a, [hl]
- cp "@"
- jr z, .end
- cp "%"
- jr z, .line_break
- cp "¯"
- jr z, .line_break
- inc hl
- jr .loop
-
-.line_break
- ld [hl], "<LNBRK>"
-
-.end
- ld de, StringBuffer1
- hlcoord 9, 0
- call PlaceString
- ret
+INCLUDE "engine/pokedex_3.asm"
+INCLUDE "event/catch_tutorial_input.asm"
+INCLUDE "engine/routines/townmap_convertlinebreakcharacters.asm"
PokegearGFX: ; 1de2e4
-INCBIN "gfx/misc/pokegear.2bpp.lz"
-
-IsMailEuropean: ; 1de5c8
-; return 1 if French
-; return 2 if German
-; return 3 if Italian
-; return 4 if Spanish
-; return 0 if none of the above
- ld c, $0
- ld hl, sPartyMon1MailAuthorNationality - sPartyMon1Mail
- add hl, de
- ld a, [hli]
- cp "E"
- ret nz
- ld a, [hli]
- inc c
- cp "F"
- ret z
- inc c
- cp "G"
- ret z
- inc c
- cp "I"
- ret z
- inc c
- cp "S"
- ret z
- ld c, $0
- ret
-
-; The regular font.
-StandardEnglishFont: ; 1de5e6
-INCBIN "gfx/font/english.1bpp"
-
-; An extended font.
-FrenchGermanFont: ; 1de9e6
-INCBIN "gfx/font/french_german.1bpp"
-
-; An even more extended font.
-SpanishItalianFont: ; 1dede6
-INCBIN "gfx/font/spanish_italian.1bpp"
-
-HandleFrenchGermanMail: ; 1df1e6
-; called if mail is french or german
-; fix 's 't 'v
- ld b, sPartyMon1MailAuthor - sPartyMon1Mail
- ld h, d
- ld l, e
-.loop
- ld a, [hl]
- cp $dc ; 's in french/german font
- jr nz, .check_intermediate_chars
- ld a, "'s"
- jr .replace
-
-.check_intermediate_chars
- sub "'s"
- jr c, .dont_replace
- cp "'v" - "'s" + 1
- jr nc, .dont_replace
- add $cd
-
-.replace
- ld [hl], a
-
-.dont_replace
- inc hl
- dec b
- jr nz, .loop
- ret
-
-LireLeCourrierAnglais:
-DeutenEnglischenPost: ; 1df203
-; Cette fonction convertit certains des caractères anglais pour
-; leur équivalent dans le jeu de caractères français.
-; Diese Funktion wandelt bestimmte englische Zeichen, um ihre
-; Entsprechung in der Deutschen-Zeichensatz.
- ld b, sPartyMon1MailAuthor - sPartyMon1Mail
- ld h, d
- ld l, e
-.loop
- ld a, [hl]
- cp "'s"
- jr nz, .check_intermediate_chars
- ld a, $dc
- jr .replace
-
-.check_intermediate_chars
- sub $cd
- jr c, .dont_replace
- cp "'v" - "'s" + 1
- jr nc, .dont_replace
- add "'s"
-
-.replace
- ld [hl], a
-
-.dont_replace
- inc hl
- dec b
- jr nz, .loop
- ret
-
-HandleSpanishItalianMail: ; 1df220
-LeerCorreosIngleses:
-LeggiPostaInglese:
-; This function converts certain characters between
-; the English and Spanish/Italian character sets.
-; Esta función convierte ciertos caracteres entre
-; el juego de caracteres Inglés y Español.
-; Questa funzione converte alcuni caratteri tra
-; l'inglese e il set di caratteri italiani.
- ld b, sPartyMon1MailAuthor - sPartyMon1Mail
- ld h, d
- ld l, e
-.loop
- ld a, [hl]
- and $f0
- cp $d0
- jr nz, .dont_replace
- ld a, [hl]
- add $8
- and $f
- or $d0
- ld [hl], a
-
-.dont_replace
- inc hl
- dec b
- jr nz, .loop
- ret
+INCBIN "gfx/pokegear/pokegear.2bpp.lz"
-SECTION "Tileset Data 8", ROMX
+INCLUDE "engine/european_mail.asm"
-INCLUDE "tilesets/data_8.asm"
-SECTION "bank7B", ROMX
+SECTION "Battle Tower Text", ROMX
INCLUDE "text/battle_tower.asm"
-SECTION "bank7C", ROMX
-INCLUDE "data/battle_tower_2.asm"
-
-SECTION "bank7D", ROMX
+SECTION "Battle Tower Trainer Data", ROMX
- db $cc, $6b, $1e ; XXX
+INCLUDE "data/battle_tower_2.asm"
-Function1f4003: ; 1f4003
-; XXX
- ld a, $6
- call GetSRAMBank
- ld hl, .unknown_data
- ld de, $a000
- ld bc, $1000
- call CopyBytes
- call CloseSRAM
- ret
-.unknown_data
-INCBIN "unknown/1f4018.bin"
-
-Function1f4dbe: ; 1f4dbe
-; XXX
- ld a, $6
- call GetSRAMBank
- ld hl, .unknown_data
- ld de, $a000
- ld bc, $1000
- call CopyBytes
- call CloseSRAM
- ret
+SECTION "Mobile News Data", ROMX
-.unknown_data
-INCBIN "unknown/1f4dd3.bin"
-
-Function1f5d9f: ; 1f5d9f
- ld a, $6
- call GetSRAMBank
- ld hl, .unknown_data
- ld de, $a000
- ld bc, $1000
- call CopyBytes
- call CloseSRAM
- ret
+INCLUDE "mobile/news/news.asm"
-.unknown_data
-INCBIN "unknown/1f5db4.bin"
SECTION "bank7E", ROMX
-INCLUDE "data/battle_tower.asm"
-INCLUDE "data/odd_eggs.asm"
+INCLUDE "engine/battle_tower.asm"
+INCLUDE "engine/odd_eggs.asm"
+
SECTION "bank7F", ROMX
-SECTION "stadium2", ROMX
+
+SECTION "Mobile Stadium 2", ROMX
IF DEF(CRYSTAL11)
-INCBIN "misc/stadium2_2.bin"
+INCBIN "mobile/stadium/stadium2_2.bin"
ELSE
-INCBIN "misc/stadium2_1.bin"
+INCBIN "mobile/stadium/stadium2_1.bin"
ENDC
diff --git a/maps.asm b/maps.asm
index f4957b920..4f08ab0fd 100644
--- a/maps.asm
+++ b/maps.asm
@@ -7,21 +7,7 @@ INCLUDE "maps/map_headers.asm"
INCLUDE "maps/second_map_headers.asm"
-
-SECTION "Map Blockdata 1", ROMX
-
-INCLUDE "maps/blockdata_1.asm"
-
-
-SECTION "Map Blockdata 2", ROMX
-
-INCLUDE "maps/blockdata_2.asm"
-
-
-SECTION "Map Blockdata 3", ROMX
-
-INCLUDE "maps/blockdata_3.asm"
-
+INCLUDE "maps/blockdata.asm"
SECTION "Map Scripts 1", ROMX
@@ -47,21 +33,21 @@ INCLUDE "maps/GoldenrodGameCorner.asm"
SECTION "Map Scripts 2", ROMX
-INCLUDE "maps/RuinsofAlphOutside.asm"
-INCLUDE "maps/RuinsofAlphHoOhChamber.asm"
-INCLUDE "maps/RuinsofAlphKabutoChamber.asm"
-INCLUDE "maps/RuinsofAlphOmanyteChamber.asm"
-INCLUDE "maps/RuinsofAlphAerodactylChamber.asm"
-INCLUDE "maps/RuinsofAlphInnerChamber.asm"
-INCLUDE "maps/RuinsofAlphResearchCenter.asm"
-INCLUDE "maps/RuinsofAlphHoOhItemRoom.asm"
-INCLUDE "maps/RuinsofAlphKabutoItemRoom.asm"
-INCLUDE "maps/RuinsofAlphOmanyteItemRoom.asm"
-INCLUDE "maps/RuinsofAlphAerodactylItemRoom.asm"
-INCLUDE "maps/RuinsofAlphHoOhWordRoom.asm"
-INCLUDE "maps/RuinsofAlphKabutoWordRoom.asm"
-INCLUDE "maps/RuinsofAlphOmanyteWordRoom.asm"
-INCLUDE "maps/RuinsofAlphAerodactylWordRoom.asm"
+INCLUDE "maps/RuinsOfAlphOutside.asm"
+INCLUDE "maps/RuinsOfAlphHoOhChamber.asm"
+INCLUDE "maps/RuinsOfAlphKabutoChamber.asm"
+INCLUDE "maps/RuinsOfAlphOmanyteChamber.asm"
+INCLUDE "maps/RuinsOfAlphAerodactylChamber.asm"
+INCLUDE "maps/RuinsOfAlphInnerChamber.asm"
+INCLUDE "maps/RuinsOfAlphResearchCenter.asm"
+INCLUDE "maps/RuinsOfAlphHoOhItemRoom.asm"
+INCLUDE "maps/RuinsOfAlphKabutoItemRoom.asm"
+INCLUDE "maps/RuinsOfAlphOmanyteItemRoom.asm"
+INCLUDE "maps/RuinsOfAlphAerodactylItemRoom.asm"
+INCLUDE "maps/RuinsOfAlphHoOhWordRoom.asm"
+INCLUDE "maps/RuinsOfAlphKabutoWordRoom.asm"
+INCLUDE "maps/RuinsOfAlphOmanyteWordRoom.asm"
+INCLUDE "maps/RuinsOfAlphAerodactylWordRoom.asm"
INCLUDE "maps/UnionCave1F.asm"
INCLUDE "maps/UnionCaveB1F.asm"
INCLUDE "maps/UnionCaveB2F.asm"
@@ -88,7 +74,7 @@ SECTION "Map Scripts 4", ROMX
INCLUDE "maps/RadioTower5F.asm"
INCLUDE "maps/OlivineLighthouse5F.asm"
INCLUDE "maps/OlivineLighthouse6F.asm"
-INCLUDE "maps/GoldenrodPokeCenter1F.asm"
+INCLUDE "maps/GoldenrodPokecenter1F.asm"
INCLUDE "maps/GoldenrodPokeComCenter2FMobile.asm"
INCLUDE "maps/IlexForestAzaleaGate.asm"
INCLUDE "maps/Route34IlexForestGate.asm"
@@ -102,14 +88,14 @@ INCLUDE "maps/VioletMart.asm"
INCLUDE "maps/VioletGym.asm"
INCLUDE "maps/EarlsPokemonAcademy.asm"
INCLUDE "maps/VioletNicknameSpeechHouse.asm"
-INCLUDE "maps/VioletPokeCenter1F.asm"
-INCLUDE "maps/VioletOnixTradeHouse.asm"
-INCLUDE "maps/Route32RuinsofAlphGate.asm"
-INCLUDE "maps/Route32PokeCenter1F.asm"
-INCLUDE "maps/Route35Goldenrodgate.asm"
-INCLUDE "maps/Route35NationalParkgate.asm"
-INCLUDE "maps/Route36RuinsofAlphgate.asm"
-INCLUDE "maps/Route36NationalParkgate.asm"
+INCLUDE "maps/VioletPokecenter1F.asm"
+INCLUDE "maps/VioletKylesHouse.asm"
+INCLUDE "maps/Route32RuinsOfAlphGate.asm"
+INCLUDE "maps/Route32Pokecenter1F.asm"
+INCLUDE "maps/Route35GoldenrodGate.asm"
+INCLUDE "maps/Route35NationalParkGate.asm"
+INCLUDE "maps/Route36RuinsOfAlphGate.asm"
+INCLUDE "maps/Route36NationalParkGate.asm"
SECTION "Map Scripts 6", ROMX
@@ -124,7 +110,7 @@ INCLUDE "maps/IlexForest.asm"
SECTION "Map Scripts 7", ROMX
-INCLUDE "maps/LakeofRage.asm"
+INCLUDE "maps/LakeOfRage.asm"
INCLUDE "maps/CeladonDeptStore1F.asm"
INCLUDE "maps/CeladonDeptStore2F.asm"
INCLUDE "maps/CeladonDeptStore3F.asm"
@@ -137,8 +123,8 @@ INCLUDE "maps/CeladonMansion2F.asm"
INCLUDE "maps/CeladonMansion3F.asm"
INCLUDE "maps/CeladonMansionRoof.asm"
INCLUDE "maps/CeladonMansionRoofHouse.asm"
-INCLUDE "maps/CeladonPokeCenter1F.asm"
-INCLUDE "maps/CeladonPokeCenter2FBeta.asm"
+INCLUDE "maps/CeladonPokecenter1F.asm"
+INCLUDE "maps/CeladonPokecenter2FBeta.asm"
INCLUDE "maps/CeladonGameCorner.asm"
INCLUDE "maps/CeladonGameCornerPrizeRoom.asm"
INCLUDE "maps/CeladonGym.asm"
@@ -153,7 +139,7 @@ SECTION "Map Scripts 8", ROMX
INCLUDE "maps/DiglettsCave.asm"
INCLUDE "maps/MountMoon.asm"
-INCLUDE "maps/Underground.asm"
+INCLUDE "maps/UndergroundPath.asm"
INCLUDE "maps/RockTunnel1F.asm"
INCLUDE "maps/RockTunnelB1F.asm"
INCLUDE "maps/SafariZoneFuchsiaGateBeta.asm"
@@ -190,10 +176,10 @@ INCLUDE "maps/Route2946Gate.asm"
SECTION "Map Scripts 10", ROMX
INCLUDE "maps/Route22.asm"
-INCLUDE "maps/WarehouseEntrance.asm"
-INCLUDE "maps/UndergroundPathSwitchRoomEntrances.asm"
+INCLUDE "maps/GoldenrodUnderground.asm"
+INCLUDE "maps/GoldenrodUndergroundSwitchRoomEntrances.asm"
INCLUDE "maps/GoldenrodDeptStoreB1F.asm"
-INCLUDE "maps/UndergroundWarehouse.asm"
+INCLUDE "maps/GoldenrodUndergroundWarehouse.asm"
INCLUDE "maps/MountMortar1FOutside.asm"
INCLUDE "maps/MountMortar1FInside.asm"
INCLUDE "maps/MountMortar2FInside.asm"
@@ -203,8 +189,8 @@ INCLUDE "maps/IcePathB1F.asm"
INCLUDE "maps/IcePathB2FMahoganySide.asm"
INCLUDE "maps/IcePathB2FBlackthornSide.asm"
INCLUDE "maps/IcePathB3F.asm"
-INCLUDE "maps/LavenderPokeCenter1F.asm"
-INCLUDE "maps/LavenderPokeCenter2FBeta.asm"
+INCLUDE "maps/LavenderPokecenter1F.asm"
+INCLUDE "maps/LavenderPokecenter2FBeta.asm"
INCLUDE "maps/MrFujisHouse.asm"
INCLUDE "maps/LavenderTownSpeechHouse.asm"
INCLUDE "maps/LavenderNameRater.asm"
@@ -219,7 +205,7 @@ SECTION "Map Scripts 11", ROMX
INCLUDE "maps/EcruteakHouse.asm"
INCLUDE "maps/WiseTriosRoom.asm"
-INCLUDE "maps/EcruteakPokeCenter1F.asm"
+INCLUDE "maps/EcruteakPokecenter1F.asm"
INCLUDE "maps/EcruteakLugiaSpeechHouse.asm"
INCLUDE "maps/DanceTheatre.asm"
INCLUDE "maps/EcruteakMart.asm"
@@ -230,8 +216,8 @@ INCLUDE "maps/ViridianNicknameSpeechHouse.asm"
INCLUDE "maps/TrainerHouse1F.asm"
INCLUDE "maps/TrainerHouseB1F.asm"
INCLUDE "maps/ViridianMart.asm"
-INCLUDE "maps/ViridianPokeCenter1F.asm"
-INCLUDE "maps/ViridianPokeCenter2FBeta.asm"
+INCLUDE "maps/ViridianPokecenter1F.asm"
+INCLUDE "maps/ViridianPokecenter2FBeta.asm"
INCLUDE "maps/Route2NuggetSpeechHouse.asm"
INCLUDE "maps/Route2Gate.asm"
INCLUDE "maps/VictoryRoadGate.asm"
@@ -239,7 +225,7 @@ INCLUDE "maps/VictoryRoadGate.asm"
SECTION "Map Scripts 12", ROMX
-INCLUDE "maps/OlivinePokeCenter1F.asm"
+INCLUDE "maps/OlivinePokecenter1F.asm"
INCLUDE "maps/OlivineGym.asm"
INCLUDE "maps/OlivineTimsHouse.asm"
INCLUDE "maps/OlivineHouseBeta.asm"
@@ -252,7 +238,7 @@ INCLUDE "maps/Route39Barn.asm"
INCLUDE "maps/Route39Farmhouse.asm"
INCLUDE "maps/ManiasHouse.asm"
INCLUDE "maps/CianwoodGym.asm"
-INCLUDE "maps/CianwoodPokeCenter1F.asm"
+INCLUDE "maps/CianwoodPokecenter1F.asm"
INCLUDE "maps/CianwoodPharmacy.asm"
INCLUDE "maps/CianwoodCityPhotoStudio.asm"
INCLUDE "maps/CianwoodLugiaSpeechHouse.asm"
@@ -267,7 +253,7 @@ INCLUDE "maps/BattleTowerOutside.asm"
SECTION "Map Scripts 13", ROMX
-INCLUDE "maps/IndigoPlateauPokeCenter1F.asm"
+INCLUDE "maps/IndigoPlateauPokecenter1F.asm"
INCLUDE "maps/WillsRoom.asm"
INCLUDE "maps/KogasRoom.asm"
INCLUDE "maps/BrunosRoom.asm"
@@ -300,25 +286,25 @@ SECTION "Map Scripts 15", ROMX
INCLUDE "maps/CeruleanGymBadgeSpeechHouse.asm"
INCLUDE "maps/CeruleanPoliceStation.asm"
INCLUDE "maps/CeruleanTradeSpeechHouse.asm"
-INCLUDE "maps/CeruleanPokeCenter1F.asm"
-INCLUDE "maps/CeruleanPokeCenter2FBeta.asm"
+INCLUDE "maps/CeruleanPokecenter1F.asm"
+INCLUDE "maps/CeruleanPokecenter2FBeta.asm"
INCLUDE "maps/CeruleanGym.asm"
INCLUDE "maps/CeruleanMart.asm"
-INCLUDE "maps/Route10PokeCenter1F.asm"
-INCLUDE "maps/Route10PokeCenter2FBeta.asm"
+INCLUDE "maps/Route10Pokecenter1F.asm"
+INCLUDE "maps/Route10Pokecenter2FBeta.asm"
INCLUDE "maps/PowerPlant.asm"
INCLUDE "maps/BillsHouse.asm"
INCLUDE "maps/FightingDojo.asm"
INCLUDE "maps/SaffronGym.asm"
INCLUDE "maps/SaffronMart.asm"
-INCLUDE "maps/SaffronPokeCenter1F.asm"
-INCLUDE "maps/SaffronPokeCenter2FBeta.asm"
+INCLUDE "maps/SaffronPokecenter1F.asm"
+INCLUDE "maps/SaffronPokecenter2FBeta.asm"
INCLUDE "maps/MrPsychicsHouse.asm"
INCLUDE "maps/SaffronTrainStation.asm"
INCLUDE "maps/SilphCo1F.asm"
INCLUDE "maps/CopycatsHouse1F.asm"
INCLUDE "maps/CopycatsHouse2F.asm"
-INCLUDE "maps/Route5UndergroundEntrance.asm"
+INCLUDE "maps/Route5UndergroundPathEntrance.asm"
INCLUDE "maps/Route5SaffronCityGate.asm"
INCLUDE "maps/Route5CleanseTagSpeechHouse.asm"
@@ -344,7 +330,7 @@ INCLUDE "maps/DragonsDen1F.asm"
INCLUDE "maps/DragonsDenB1F.asm"
INCLUDE "maps/DragonShrine.asm"
INCLUDE "maps/TohjoFalls.asm"
-INCLUDE "maps/AzaleaPokeCenter1F.asm"
+INCLUDE "maps/AzaleaPokecenter1F.asm"
INCLUDE "maps/CharcoalKiln.asm"
INCLUDE "maps/AzaleaMart.asm"
INCLUDE "maps/KurtsHouse.asm"
@@ -356,16 +342,16 @@ SECTION "Map Scripts 17", ROMX
INCLUDE "maps/MahoganyTown.asm"
INCLUDE "maps/Route32.asm"
INCLUDE "maps/VermilionHouseFishingSpeechHouse.asm"
-INCLUDE "maps/VermilionPokeCenter1F.asm"
-INCLUDE "maps/VermilionPokeCenter2FBeta.asm"
+INCLUDE "maps/VermilionPokecenter1F.asm"
+INCLUDE "maps/VermilionPokecenter2FBeta.asm"
INCLUDE "maps/PokemonFanClub.asm"
INCLUDE "maps/VermilionMagnetTrainSpeechHouse.asm"
INCLUDE "maps/VermilionMart.asm"
INCLUDE "maps/VermilionHouseDiglettsCaveSpeechHouse.asm"
INCLUDE "maps/VermilionGym.asm"
INCLUDE "maps/Route6SaffronGate.asm"
-INCLUDE "maps/Route6UndergroundEntrance.asm"
-INCLUDE "maps/PokeCenter2F.asm"
+INCLUDE "maps/Route6UndergroundPathEntrance.asm"
+INCLUDE "maps/Pokecenter2F.asm"
INCLUDE "maps/TradeCenter.asm"
INCLUDE "maps/Colosseum.asm"
INCLUDE "maps/TimeCapsule.asm"
@@ -382,18 +368,18 @@ INCLUDE "maps/BlackthornGym2F.asm"
INCLUDE "maps/BlackthornDragonSpeechHouse.asm"
INCLUDE "maps/BlackthornEmysHouse.asm"
INCLUDE "maps/BlackthornMart.asm"
-INCLUDE "maps/BlackthornPokeCenter1F.asm"
+INCLUDE "maps/BlackthornPokecenter1F.asm"
INCLUDE "maps/MoveDeletersHouse.asm"
INCLUDE "maps/FuchsiaMart.asm"
INCLUDE "maps/SafariZoneMainOffice.asm"
INCLUDE "maps/FuchsiaGym.asm"
INCLUDE "maps/FuchsiaBillSpeechHouse.asm"
-INCLUDE "maps/FuchsiaPokeCenter1F.asm"
-INCLUDE "maps/FuchsiaPokeCenter2FBeta.asm"
+INCLUDE "maps/FuchsiaPokecenter1F.asm"
+INCLUDE "maps/FuchsiaPokecenter2FBeta.asm"
INCLUDE "maps/SafariZoneWardensHome.asm"
INCLUDE "maps/Route15FuchsiaGate.asm"
INCLUDE "maps/CherrygroveMart.asm"
-INCLUDE "maps/CherrygrovePokeCenter1F.asm"
+INCLUDE "maps/CherrygrovePokecenter1F.asm"
INCLUDE "maps/CherrygroveGymSpeechHouse.asm"
INCLUDE "maps/GuideGentsHouse.asm"
INCLUDE "maps/CherrygroveEvolutionSpeechHouse.asm"
@@ -409,10 +395,10 @@ INCLUDE "maps/GoldenrodCity.asm"
INCLUDE "maps/SaffronCity.asm"
INCLUDE "maps/MahoganyRedGyaradosSpeechHouse.asm"
INCLUDE "maps/MahoganyGym.asm"
-INCLUDE "maps/MahoganyPokeCenter1F.asm"
+INCLUDE "maps/MahoganyPokecenter1F.asm"
INCLUDE "maps/Route42EcruteakGate.asm"
-INCLUDE "maps/LakeofRageHiddenPowerHouse.asm"
-INCLUDE "maps/LakeofRageMagikarpHouse.asm"
+INCLUDE "maps/LakeOfRageHiddenPowerHouse.asm"
+INCLUDE "maps/LakeOfRageMagikarpHouse.asm"
INCLUDE "maps/Route43MahoganyGate.asm"
INCLUDE "maps/Route43Gate.asm"
INCLUDE "maps/RedsHouse1F.asm"
@@ -443,8 +429,8 @@ INCLUDE "maps/Route13.asm"
INCLUDE "maps/PewterNidoranSpeechHouse.asm"
INCLUDE "maps/PewterGym.asm"
INCLUDE "maps/PewterMart.asm"
-INCLUDE "maps/PewterPokeCenter1F.asm"
-INCLUDE "maps/PewterPokeCenter2FBeta.asm"
+INCLUDE "maps/PewterPokecenter1F.asm"
+INCLUDE "maps/PewterPokecenter2FBeta.asm"
INCLUDE "maps/PewterSnoozeSpeechHouse.asm"
@@ -474,8 +460,8 @@ INCLUDE "maps/CeladonCity.asm"
INCLUDE "maps/Route15.asm"
INCLUDE "maps/VermilionCity.asm"
INCLUDE "maps/Route9.asm"
-INCLUDE "maps/CinnabarPokeCenter1F.asm"
-INCLUDE "maps/CinnabarPokeCenter2FBeta.asm"
+INCLUDE "maps/CinnabarPokecenter1F.asm"
+INCLUDE "maps/CinnabarPokecenter2FBeta.asm"
INCLUDE "maps/Route19FuchsiaGate.asm"
INCLUDE "maps/SeafoamGym.asm"
@@ -502,7 +488,7 @@ INCLUDE "maps/Route3.asm"
INCLUDE "maps/Route4.asm"
INCLUDE "maps/Route10South.asm"
INCLUDE "maps/Route23.asm"
-INCLUDE "maps/SilverCavePokeCenter1F.asm"
+INCLUDE "maps/SilverCavePokecenter1F.asm"
INCLUDE "maps/Route28FamousSpeechHouse.asm"
diff --git a/maps/AzaleaGym.asm b/maps/AzaleaGym.asm
index 982ade9b4..54f9432d1 100644
--- a/maps/AzaleaGym.asm
+++ b/maps/AzaleaGym.asm
@@ -8,13 +8,13 @@ const_value set 2
const AZALEAGYM_GYM_GUY
AzaleaGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-BugsyScript:
+AzaleaGymBugsyScript:
faceplayer
opentext
checkevent EVENT_BEAT_BUGSY
@@ -33,7 +33,7 @@ BugsyScript:
waitsfx
setflag ENGINE_HIVEBADGE
checkcode VAR_BADGES
- scall AzaleaGymTriggerRockets
+ scall AzaleaGymActivateRockets
.FightDone:
checkevent EVENT_GOT_TM49_FURY_CUTTER
iftrue .GotFuryCutter
@@ -58,7 +58,7 @@ BugsyScript:
closetext
end
-AzaleaGymTriggerRockets:
+AzaleaGymActivateRockets:
if_equal 7, .RadioTowerRockets
if_equal 6, .GoldenrodRockets
end
@@ -370,20 +370,20 @@ AzaleaGym_MapEventHeader:
warp_def $f, $4, 5, AZALEA_TOWN
warp_def $f, $5, 5, AZALEA_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 13, 3, SIGNPOST_READ, AzaleaGymStatue
- signpost 13, 6, SIGNPOST_READ, AzaleaGymStatue
+ bg_event 13, 3, BGEVENT_READ, AzaleaGymStatue
+ bg_event 13, 6, BGEVENT_READ, AzaleaGymStatue
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_BUGSY, 7, 5, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, BugsyScript, -1
- person_event SPRITE_BUG_CATCHER, 3, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerBug_catcherbenny, -1
- person_event SPRITE_BUG_CATCHER, 8, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerBug_catcherAl, -1
- person_event SPRITE_BUG_CATCHER, 2, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerBug_catcherJosh, -1
- person_event SPRITE_TWIN, 10, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerTwinsAmyandmay1, -1
- person_event SPRITE_TWIN, 10, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerTwinsAmyandmay2, -1
- person_event SPRITE_GYM_GUY, 13, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, AzaleaGymGuyScript, -1
+ object_event SPRITE_BUGSY, 7, 5, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, AzaleaGymBugsyScript, -1
+ object_event SPRITE_BUG_CATCHER, 3, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerBug_catcherbenny, -1
+ object_event SPRITE_BUG_CATCHER, 8, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBug_catcherAl, -1
+ object_event SPRITE_BUG_CATCHER, 2, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBug_catcherJosh, -1
+ object_event SPRITE_TWIN, 10, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsAmyandmay1, -1
+ object_event SPRITE_TWIN, 10, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsAmyandmay2, -1
+ object_event SPRITE_GYM_GUY, 13, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, AzaleaGymGuyScript, -1
diff --git a/maps/AzaleaMart.asm b/maps/AzaleaMart.asm
index ed88a0fd1..01abee35a 100644
--- a/maps/AzaleaMart.asm
+++ b/maps/AzaleaMart.asm
@@ -4,25 +4,25 @@ const_value set 2
const AZALEAMART_BUG_CATCHER
AzaleaMart_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-ClerkScript_0x18e040:
+AzaleaMartClerkScript:
opentext
pokemart MARTTYPE_STANDARD, MART_AZALEA
closetext
end
-CooltrainerMScript_0x18e047:
- jumptextfaceplayer UnknownText_0x18e04d
+AzaleaMartCooltrainerMScript:
+ jumptextfaceplayer AzaleaMartCooltrainerMText
-BugCatcherScript_0x18e04a:
- jumptextfaceplayer UnknownText_0x18e0b6
+AzaleaMartBugCatcherScript:
+ jumptextfaceplayer AzaleaMartBugCatcherText
-UnknownText_0x18e04d:
+AzaleaMartCooltrainerMText:
text "There's no GREAT"
line "BALL here. #"
@@ -34,7 +34,7 @@ UnknownText_0x18e04d:
cont "his custom BALLS."
done
-UnknownText_0x18e0b6:
+AzaleaMartBugCatcherText:
text "A GREAT BALL is"
line "better for catch-"
cont "ing #MON than a"
@@ -54,14 +54,14 @@ AzaleaMart_MapEventHeader:
warp_def $7, $2, 3, AZALEA_TOWN
warp_def $7, $3, 3, AZALEA_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x18e040, -1
- person_event SPRITE_COOLTRAINER_M, 5, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x18e047, -1
- person_event SPRITE_BUG_CATCHER, 2, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, BugCatcherScript_0x18e04a, -1
+ object_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaMartClerkScript, -1
+ object_event SPRITE_COOLTRAINER_M, 5, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaMartCooltrainerMScript, -1
+ object_event SPRITE_BUG_CATCHER, 2, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, AzaleaMartBugCatcherScript, -1
diff --git a/maps/AzaleaPokeCenter1F.asm b/maps/AzaleaPokeCenter1F.asm
deleted file mode 100644
index 617db23a4..000000000
--- a/maps/AzaleaPokeCenter1F.asm
+++ /dev/null
@@ -1,102 +0,0 @@
-const_value set 2
- const AZALEAPOKECENTER1F_NURSE
- const AZALEAPOKECENTER1F_GENTLEMAN
- const AZALEAPOKECENTER1F_FISHING_GURU
- const AZALEAPOKECENTER1F_POKEFAN_F
-
-AzaleaPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 1
-
- ; triggers
- dw UnknownScript_0x18db27, 0
-
-.MapCallbacks:
- db 0
-
-UnknownScript_0x18db27:
- end
-
-NurseScript_0x18db28:
- jumpstd pokecenternurse
-
-GentlemanScript_0x18db2b:
- jumptextfaceplayer UnknownText_0x18db34
-
-FishingGuruScript_0x18db2e:
- jumptextfaceplayer UnknownText_0x18dbee
-
-PokefanFScript_0x18db31:
- jumptextfaceplayer UnknownText_0x18dc19
-
-UnknownText_0x18db34:
- text "Do your #MON"
- line "know HM moves?"
-
- para "Those moves can"
- line "be used even if"
-
- para "your #MON has"
- line "fainted."
- done
-
-UnknownText_0x18db88:
- text "This BILL guy"
- line "created the system"
-
- para "for storing"
- line "#MON in a PC."
-
- para "BILL's PC can"
- line "store up to 20"
- cont "#MON per BOX."
- done
-
-UnknownText_0x18dbee:
- text "BILL's PC can"
- line "store up to 20"
- cont "#MON per BOX."
- done
-
-UnknownText_0x18dc19:
- text "Do you know about"
- line "APRICORNS?"
-
- para "Crack one open,"
- line "hollow it out and"
-
- para "fit it with a"
- line "special device."
-
- para "Then you can catch"
- line "#MON with it."
-
- para "Before # BALLS"
- line "were invented,"
-
- para "everyone used"
- line "APRICORNS."
- done
-
-AzaleaPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 1, AZALEA_TOWN
- warp_def $7, $4, 1, AZALEA_TOWN
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 4
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x18db28, -1
- person_event SPRITE_GENTLEMAN, 6, 9, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x18db2b, -1
- person_event SPRITE_FISHING_GURU, 1, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FishingGuruScript_0x18db2e, -1
- person_event SPRITE_POKEFAN_F, 4, 1, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x18db31, -1
diff --git a/maps/AzaleaPokecenter1F.asm b/maps/AzaleaPokecenter1F.asm
new file mode 100644
index 000000000..f369c3bff
--- /dev/null
+++ b/maps/AzaleaPokecenter1F.asm
@@ -0,0 +1,100 @@
+const_value set 2
+ const AZALEAPOKECENTER1F_NURSE
+ const AZALEAPOKECENTER1F_GENTLEMAN
+ const AZALEAPOKECENTER1F_FISHING_GURU
+ const AZALEAPOKECENTER1F_POKEFAN_F
+
+AzaleaPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 1
+ scene_script .DummyScene
+
+.MapCallbacks:
+ db 0
+
+.DummyScene:
+ end
+
+AzaleaPokecenter1FNurseScript:
+ jumpstd pokecenternurse
+
+AzaleaPokecenter1FGentlemanScript:
+ jumptextfaceplayer AzaleaPokecenter1FGentlemanText
+
+AzaleaPokecenter1FFishingGuruScript:
+ jumptextfaceplayer AzaleaPokecenter1FFishingGuruText
+
+AzaleaPokecenter1FPokefanFScript:
+ jumptextfaceplayer AzaleaPokecenter1FPokefanFText
+
+AzaleaPokecenter1FGentlemanText:
+ text "Do your #MON"
+ line "know HM moves?"
+
+ para "Those moves can"
+ line "be used even if"
+
+ para "your #MON has"
+ line "fainted."
+ done
+
+AzaleaPokecenter1FUnusedText:
+ text "This BILL guy"
+ line "created the system"
+
+ para "for storing"
+ line "#MON in a PC."
+
+ para "BILL's PC can"
+ line "store up to 20"
+ cont "#MON per BOX."
+ done
+
+AzaleaPokecenter1FFishingGuruText:
+ text "BILL's PC can"
+ line "store up to 20"
+ cont "#MON per BOX."
+ done
+
+AzaleaPokecenter1FPokefanFText:
+ text "Do you know about"
+ line "APRICORNS?"
+
+ para "Crack one open,"
+ line "hollow it out and"
+
+ para "fit it with a"
+ line "special device."
+
+ para "Then you can catch"
+ line "#MON with it."
+
+ para "Before # BALLS"
+ line "were invented,"
+
+ para "everyone used"
+ line "APRICORNS."
+ done
+
+AzaleaPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 1, AZALEA_TOWN
+ warp_def $7, $4, 1, AZALEA_TOWN
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaPokecenter1FNurseScript, -1
+ object_event SPRITE_GENTLEMAN, 6, 9, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaPokecenter1FGentlemanScript, -1
+ object_event SPRITE_FISHING_GURU, 1, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaPokecenter1FFishingGuruScript, -1
+ object_event SPRITE_POKEFAN_F, 4, 1, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaPokecenter1FPokefanFScript, -1
diff --git a/maps/AzaleaTown.asm b/maps/AzaleaTown.asm
index 769067421..cf576d81d 100644
--- a/maps/AzaleaTown.asm
+++ b/maps/AzaleaTown.asm
@@ -13,35 +13,31 @@ const_value set 2
const AZALEATOWN_KURT_OUTSIDE
AzaleaTown_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 3
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
- maptrigger .Trigger2
+ scene_script .DummyScene0
+ scene_script .DummyScene1
+ scene_script .DummyScene2
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .Flypoint
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
+.DummyScene1:
end
-.Trigger2:
+.DummyScene2:
end
.Flypoint:
setflag ENGINE_FLYPOINT_AZALEA
return
-AzaleaTownRivalBattleTrigger1:
- moveperson AZALEATOWN_SILVER, $b, $b
+AzaleaTownRivalBattleScene1:
+ moveobject AZALEATOWN_SILVER, $b, $b
spriteface PLAYER, RIGHT
showemote EMOTE_SHOCK, PLAYER, 15
special Special_FadeOutMusic
@@ -51,7 +47,7 @@ AzaleaTownRivalBattleTrigger1:
spriteface PLAYER, DOWN
jump AzaleaTownRivalBattleScript
-AzaleaTownRivalBattleTrigger2:
+AzaleaTownRivalBattleScene2:
spriteface PLAYER, RIGHT
showemote EMOTE_SHOCK, PLAYER, 15
special Special_FadeOutMusic
@@ -72,7 +68,7 @@ AzaleaTownRivalBattleScript:
iftrue .Chikorita
winlosstext AzaleaTownRivalWinText, AzaleaTownRivalLossText
setlasttalked AZALEATOWN_SILVER
- loadtrainer RIVAL1, RIVAL1_6
+ loadtrainer RIVAL1, RIVAL1_2_TOTODILE
startbattle
dontrestartmapmusic
reloadmapafterbattle
@@ -81,7 +77,7 @@ AzaleaTownRivalBattleScript:
.Totodile:
winlosstext AzaleaTownRivalWinText, AzaleaTownRivalLossText
setlasttalked AZALEATOWN_SILVER
- loadtrainer RIVAL1, RIVAL1_4
+ loadtrainer RIVAL1, RIVAL1_2_CHIKORITA
startbattle
dontrestartmapmusic
reloadmapafterbattle
@@ -90,7 +86,7 @@ AzaleaTownRivalBattleScript:
.Chikorita:
winlosstext AzaleaTownRivalWinText, AzaleaTownRivalLossText
setlasttalked AZALEATOWN_SILVER
- loadtrainer RIVAL1, RIVAL1_5
+ loadtrainer RIVAL1, RIVAL1_2_CYNDAQUIL
startbattle
dontrestartmapmusic
reloadmapafterbattle
@@ -106,16 +102,16 @@ AzaleaTownRivalBattleScript:
applymovement AZALEATOWN_SILVER, AzaleaTownRivalBattleExitMovement
playsound SFX_EXIT_BUILDING
disappear AZALEATOWN_SILVER
- dotrigger $0
+ setscene $0
waitsfx
playmapmusic
end
AzaleaTownRocket1Script:
- jumptextfaceplayer GoodSamaritanRocketText
+ jumptextfaceplayer AzaleaTownRocket1Text
AzaleaTownRocket2Script:
- jumptextfaceplayer TastySlowpokeTailRocketText
+ jumptextfaceplayer AzaleaTownRocket2Text
AzaleaTownGrampsScript:
faceplayer
@@ -159,29 +155,29 @@ WoosterScript:
closetext
end
-AzaleaTown_CelebiEventScript:
- applymovement PLAYER, Movement_PlayerWalksOutOfKurtsHouse
+AzaleaTownCelebiScene:
+ applymovement PLAYER, AzaleaTownPlayerLeavesKurtsHouseMovement
opentext
- writetext IlexForestIsRestlessText
+ writetext AzaleaTownKurtText1
buttonsound
spriteface AZALEATOWN_KURT_OUTSIDE, RIGHT
- writetext HeresTheGSBallBackText
+ writetext AzaleaTownKurtText2
buttonsound
- writetext PleaseInvestigateIlexForestText
+ writetext AzaleaTownKurtText3
waitbutton
verbosegiveitem GS_BALL
spriteface AZALEATOWN_KURT_OUTSIDE, LEFT
setflag ENGINE_HAVE_EXAMINED_GS_BALL
clearevent EVENT_ILEX_FOREST_LASS
setevent EVENT_ROUTE_34_ILEX_FOREST_GATE_LASS
- dotrigger $0
+ setscene $0
closetext
end
AzaleaTownKurtScript:
faceplayer
opentext
- writetext PleaseInvestigateIlexForestText
+ writetext AzaleaTownKurtText3
waitbutton
spriteface AZALEATOWN_KURT_OUTSIDE, LEFT
closetext
@@ -205,7 +201,7 @@ CharcoalKilnSign:
AzaleaTownIlextForestSign:
jumptext AzaleaTownIlexForestSignText
-AzaleaTownPokeCenterSign:
+AzaleaTownPokecenterSign:
jumpstd pokecentersign
AzaleaTownMartSign:
@@ -217,7 +213,6 @@ WhiteApricornTree:
AzaleaTownHiddenFullHeal:
dwb EVENT_AZALEA_TOWN_HIDDEN_FULL_HEAL, FULL_HEAL
-
AzaleaTownRivalBattleApproachMovement1:
step LEFT
step LEFT
@@ -244,7 +239,7 @@ AzaleaTownRivalBattleExitMovement:
step LEFT
step_end
-Movement_PlayerWalksOutOfKurtsHouse:
+AzaleaTownPlayerLeavesKurtsHouseMovement:
step LEFT
step LEFT
step UP
@@ -314,7 +309,7 @@ AzaleaTownRivalLossText:
line "you were lying."
done
-GoodSamaritanRocketText:
+AzaleaTownRocket1Text:
text "It's unsafe to go"
line "in there, so I'm"
cont "standing guard."
@@ -323,7 +318,7 @@ GoodSamaritanRocketText:
line "Samaritan?"
done
-TastySlowpokeTailRocketText:
+AzaleaTownRocket2Text:
text "Do you know about"
line "SLOWPOKETAIL? I"
cont "heard it's tasty!"
@@ -392,19 +387,19 @@ WoosterText:
text "WOOSTER: Gugyoo…"
done
-IlexForestIsRestlessText:
+AzaleaTownKurtText1:
text "ILEX FOREST is"
line "restless!"
para "What is going on?"
done
-HeresTheGSBallBackText:
+AzaleaTownKurtText2:
text "<PLAYER>, here's"
line "your GS BALL back!"
done
-PleaseInvestigateIlexForestText:
+AzaleaTownKurtText3:
text "Could you go see"
line "why ILEX FOREST is"
cont "so restless?"
@@ -475,35 +470,35 @@ AzaleaTown_MapEventHeader:
warp_def $a, $2, 3, ILEX_FOREST_AZALEA_GATE
warp_def $b, $2, 4, ILEX_FOREST_AZALEA_GATE
-.XYTriggers:
+.CoordEvents:
db 3
- xy_trigger 1, $a, $5, $0, AzaleaTownRivalBattleTrigger1, $0, $0
- xy_trigger 1, $b, $5, $0, AzaleaTownRivalBattleTrigger2, $0, $0
- xy_trigger 2, $6, $9, $0, AzaleaTown_CelebiEventScript, $0, $0
+ coord_event 1, $a, $5, AzaleaTownRivalBattleScene1
+ coord_event 1, $b, $5, AzaleaTownRivalBattleScene2
+ coord_event 2, $6, $9, AzaleaTownCelebiScene
-.Signposts:
+.BGEvents:
db 9
- signpost 9, 19, SIGNPOST_READ, AzaleaTownSign
- signpost 9, 10, SIGNPOST_READ, KurtsHouseSign
- signpost 15, 14, SIGNPOST_READ, AzaleaGymSign
- signpost 7, 29, SIGNPOST_READ, SlowpokeWellSign
- signpost 13, 19, SIGNPOST_READ, CharcoalKilnSign
- signpost 9, 16, SIGNPOST_READ, AzaleaTownPokeCenterSign
- signpost 5, 22, SIGNPOST_READ, AzaleaTownMartSign
- signpost 9, 3, SIGNPOST_READ, AzaleaTownIlextForestSign
- signpost 6, 31, SIGNPOST_ITEM, AzaleaTownHiddenFullHeal
-
-.PersonEvents:
+ bg_event 9, 19, BGEVENT_READ, AzaleaTownSign
+ bg_event 9, 10, BGEVENT_READ, KurtsHouseSign
+ bg_event 15, 14, BGEVENT_READ, AzaleaGymSign
+ bg_event 7, 29, BGEVENT_READ, SlowpokeWellSign
+ bg_event 13, 19, BGEVENT_READ, CharcoalKilnSign
+ bg_event 9, 16, BGEVENT_READ, AzaleaTownPokecenterSign
+ bg_event 5, 22, BGEVENT_READ, AzaleaTownMartSign
+ bg_event 9, 3, BGEVENT_READ, AzaleaTownIlextForestSign
+ bg_event 6, 31, BGEVENT_ITEM, AzaleaTownHiddenFullHeal
+
+.ObjectEvents:
db 12
- person_event SPRITE_AZALEA_ROCKET, 9, 31, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, AzaleaTownRocket1Script, EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET
- person_event SPRITE_GRAMPS, 9, 21, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, AzaleaTownGrampsScript, -1
- person_event SPRITE_TEACHER, 13, 15, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, AzaleaTownTeacherScript, -1
- person_event SPRITE_YOUNGSTER, 9, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, AzaleaTownYoungsterScript, -1
- person_event SPRITE_SLOWPOKE, 17, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, AzaleaTownSlowpokeScript, EVENT_AZALEA_TOWN_SLOWPOKES
- person_event SPRITE_SLOWPOKE, 9, 18, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, AzaleaTownSlowpokeScript, EVENT_AZALEA_TOWN_SLOWPOKES
- person_event SPRITE_SLOWPOKE, 9, 29, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, AzaleaTownSlowpokeScript, EVENT_AZALEA_TOWN_SLOWPOKES
- person_event SPRITE_SLOWPOKE, 15, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, AzaleaTownSlowpokeScript, EVENT_AZALEA_TOWN_SLOWPOKES
- person_event SPRITE_FRUIT_TREE, 2, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, WhiteApricornTree, -1
- person_event SPRITE_AZALEA_ROCKET, 10, 11, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_AZALEA_TOWN
- person_event SPRITE_AZALEA_ROCKET, 16, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, AzaleaTownRocket2Script, EVENT_SLOWPOKE_WELL_ROCKETS
- person_event SPRITE_KURT_OUTSIDE, 5, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, AzaleaTownKurtScript, EVENT_AZALEA_TOWN_KURT
+ object_event SPRITE_AZALEA_ROCKET, 9, 31, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownRocket1Script, EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET
+ object_event SPRITE_GRAMPS, 9, 21, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownGrampsScript, -1
+ object_event SPRITE_TEACHER, 13, 15, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, AzaleaTownTeacherScript, -1
+ object_event SPRITE_YOUNGSTER, 9, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, AzaleaTownYoungsterScript, -1
+ object_event SPRITE_SLOWPOKE, 17, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownSlowpokeScript, EVENT_AZALEA_TOWN_SLOWPOKES
+ object_event SPRITE_SLOWPOKE, 9, 18, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownSlowpokeScript, EVENT_AZALEA_TOWN_SLOWPOKES
+ object_event SPRITE_SLOWPOKE, 9, 29, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownSlowpokeScript, EVENT_AZALEA_TOWN_SLOWPOKES
+ object_event SPRITE_SLOWPOKE, 15, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownSlowpokeScript, EVENT_AZALEA_TOWN_SLOWPOKES
+ object_event SPRITE_FRUIT_TREE, 2, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, WhiteApricornTree, -1
+ object_event SPRITE_AZALEA_ROCKET, 10, 11, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_AZALEA_TOWN
+ object_event SPRITE_AZALEA_ROCKET, 16, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownRocket2Script, EVENT_SLOWPOKE_WELL_ROCKETS
+ object_event SPRITE_KURT_OUTSIDE, 5, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownKurtScript, EVENT_AZALEA_TOWN_KURT
diff --git a/maps/BattleTower1F.asm b/maps/BattleTower1F.asm
index 6cf6bdd50..ad7708c96 100644
--- a/maps/BattleTower1F.asm
+++ b/maps/BattleTower1F.asm
@@ -6,17 +6,15 @@ const_value set 2
const BATTLETOWER1F_GRANNY
BattleTower1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .Scene0
+ scene_script .Scene1
.MapCallbacks:
db 0
-.Trigger0:
+.Scene0:
writebyte BATTLETOWERACTION_CHECKSAVEFILEISYOURS
special BattleTowerAction
iffalse .SkipEverything
@@ -40,8 +38,8 @@ BattleTower1F_MapScriptHeader:
writebyte BATTLETOWERACTION_06
special BattleTowerAction
.SkipEverything:
- dotrigger $1
-.Trigger1:
+ setscene $1
+.Scene1:
end
MapBattleTower1FSignpost0Script:
@@ -62,7 +60,7 @@ ReceptionistScript_0x9e3e2:
opentext
writetext Text_BattleTowerWelcomesYou
buttonsound
- writebyte BATTLETOWERACTION_CHECK_EXPLANATION_READ ; if new save file: bit 1, [s1_be4f]
+ writebyte BATTLETOWERACTION_CHECK_EXPLANATION_READ ; if new save file: bit 1, [sBattleTowerSaveFileFlags]
special BattleTowerAction
if_not_equal $0, Script_Menu_ChallengeExplanationCancel
jump Script_BattleTowerIntroductionYesNo
@@ -83,11 +81,11 @@ Script_ChooseChallenge: ; 0x9e40f
writetext Text_SaveBeforeEnteringBattleRoom
yesorno
iffalse Script_Menu_ChallengeExplanationCancel
- dotrigger $0
+ setscene $0
special Special_TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
- dotrigger $1
- writebyte BATTLETOWERACTION_SET_EXPLANATION_READ ; set 1, [s1_be4f]
+ setscene $1
+ writebyte BATTLETOWERACTION_SET_EXPLANATION_READ ; set 1, [sBattleTowerSaveFileFlags]
special BattleTowerAction
special BattleTowerRoomMenu
if_equal $a, Script_Menu_ChallengeExplanationCancel
@@ -107,9 +105,9 @@ Script_ResumeBattleTowerChallenge:
special BattleTowerAction
Script_WalkToBattleTowerElevator:
musicfadeout MUSIC_NONE, 8
- domaptrigger BATTLE_TOWER_BATTLE_ROOM, $0
- domaptrigger BATTLE_TOWER_ELEVATOR, $0
- domaptrigger BATTLE_TOWER_HALLWAY, $0
+ setmapscene BATTLE_TOWER_BATTLE_ROOM, $0
+ setmapscene BATTLE_TOWER_ELEVATOR, $0
+ setmapscene BATTLE_TOWER_HALLWAY, $0
follow BATTLETOWER1F_RECEPTIONIST, PLAYER
applymovement BATTLETOWER1F_RECEPTIONIST, MovementData_BattleTower1FWalkToElevator
writebyte BATTLETOWERACTION_0A
@@ -210,10 +208,10 @@ continue:
writetext Text_SaveBeforeReentry
yesorno
iffalse Script_Menu_ChallengeExplanationCancel
- dotrigger $0
+ setscene $0
special Special_TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
- dotrigger $1
+ setscene $1
writebyte BATTLETOWERACTION_06
special BattleTowerAction
writebyte BATTLETOWERACTION_12
@@ -805,17 +803,17 @@ BattleTower1F_MapEventHeader:
warp_def $9, $8, 4, BATTLE_TOWER_OUTSIDE
warp_def $0, $7, 1, BATTLE_TOWER_ELEVATOR
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 6, 6, SIGNPOST_READ, MapBattleTower1FSignpost0Script
+ bg_event 6, 6, BGEVENT_READ, MapBattleTower1FSignpost0Script
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_RECEPTIONIST, 6, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ReceptionistScript_0x9e3e2, -1
- person_event SPRITE_YOUNGSTER, 9, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x9e55d, -1
- person_event SPRITE_COOLTRAINER_F, 9, 4, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x9e568, -1
- person_event SPRITE_BUG_CATCHER, 3, 1, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, BugCatcherScript_0x9e56b, -1
- person_event SPRITE_GRANNY, 3, 14, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrannyScript_0x9e56e, -1
+ object_event SPRITE_RECEPTIONIST, 6, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ReceptionistScript_0x9e3e2, -1
+ object_event SPRITE_YOUNGSTER, 9, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x9e55d, -1
+ object_event SPRITE_COOLTRAINER_F, 9, 4, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CooltrainerFScript_0x9e568, -1
+ object_event SPRITE_BUG_CATCHER, 3, 1, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BugCatcherScript_0x9e56b, -1
+ object_event SPRITE_GRANNY, 3, 14, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GrannyScript_0x9e56e, -1
diff --git a/maps/BattleTowerBattleRoom.asm b/maps/BattleTowerBattleRoom.asm
index 8626a0021..ffc4237f9 100644
--- a/maps/BattleTowerBattleRoom.asm
+++ b/maps/BattleTowerBattleRoom.asm
@@ -3,12 +3,10 @@ const_value set 2
const BATTLETOWERBATTLEROOM_RECEPTIONIST
BattleTowerBattleRoom_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw .EnterBattleRoom, 0
- dw .DummyTrigger, 0
+ scene_script .EnterBattleRoom
+ scene_script .DummyScene
.MapCallbacks:
db 0
@@ -16,8 +14,8 @@ BattleTowerBattleRoom_MapScriptHeader:
.EnterBattleRoom: ; 0x9f419
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
priorityjump Script_BattleRoom
- dotrigger $1
-.DummyTrigger:
+ setscene $1
+.DummyScene:
end
Script_BattleRoom: ; 0x9f421
@@ -151,13 +149,13 @@ BattleTowerBattleRoom_MapEventHeader:
warp_def $7, $3, 4, BATTLE_TOWER_HALLWAY
warp_def $7, $4, 4, BATTLE_TOWER_HALLWAY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_YOUNGSTER, 0, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_BATTLE_TOWER_BATTLE_ROOM_YOUNGSTER
- person_event SPRITE_RECEPTIONIST, 6, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, -1
+ object_event SPRITE_YOUNGSTER, 0, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BATTLE_TOWER_BATTLE_ROOM_YOUNGSTER
+ object_event SPRITE_RECEPTIONIST, 6, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1
diff --git a/maps/BattleTowerElevator.asm b/maps/BattleTowerElevator.asm
index 2ae68654c..c2d51f5fc 100644
--- a/maps/BattleTowerElevator.asm
+++ b/maps/BattleTowerElevator.asm
@@ -2,21 +2,19 @@ const_value set 2
const BATTLETOWERELEVATOR_RECEPTIONIST
BattleTowerElevator_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .Scene0
+ scene_script .Scene1
.MapCallbacks:
db 0
-.Trigger0:
+.Scene0:
priorityjump .RideElevator
- dotrigger $1
+ setscene $1
-.Trigger1:
+.Scene1:
end
.RideElevator:
@@ -55,12 +53,12 @@ BattleTowerElevator_MapEventHeader:
warp_def $3, $1, 1, BATTLE_TOWER_HALLWAY
warp_def $3, $2, 1, BATTLE_TOWER_HALLWAY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_RECEPTIONIST, 2, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, MovementData_BattleTowerElevatorReceptionistWalksIn, -1
+ object_event SPRITE_RECEPTIONIST, 2, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MovementData_BattleTowerElevatorReceptionistWalksIn, -1
diff --git a/maps/BattleTowerHallway.asm b/maps/BattleTowerHallway.asm
index 03424a977..dc60a0440 100644
--- a/maps/BattleTowerHallway.asm
+++ b/maps/BattleTowerHallway.asm
@@ -2,20 +2,18 @@ const_value set 2
const BATTLETOWERHALLWAY_RECEPTIONIST
BattleTowerHallway_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .Scene0
+ scene_script .Scene1
.MapCallbacks:
db 0
-.Trigger0:
+.Scene0:
priorityjump .ChooseBattleRoom
- dotrigger $1
-.Trigger1:
+ setscene $1
+.Scene1:
end
.ChooseBattleRoom:
@@ -70,7 +68,7 @@ BattleTowerHallway_MapScriptHeader:
jump .EnterBattleRoom
.EnterBattleRoom: ; 0x9f61f
- faceperson PLAYER, BATTLETOWERHALLWAY_RECEPTIONIST
+ faceobject PLAYER, BATTLETOWERHALLWAY_RECEPTIONIST
opentext
writetext Text_PleaseStepThisWay
waitbutton
@@ -93,12 +91,12 @@ BattleTowerHallway_MapEventHeader:
warp_def $0, $d, 1, BATTLE_TOWER_BATTLE_ROOM
warp_def $0, $f, 1, BATTLE_TOWER_BATTLE_ROOM
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_RECEPTIONIST, 2, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BattleTowerHallway_MapEventHeader, -1
+ object_event SPRITE_RECEPTIONIST, 2, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BattleTowerHallway_MapEventHeader, -1
diff --git a/maps/BattleTowerOutside.asm b/maps/BattleTowerOutside.asm
index eeb4bf93b..9cf15d915 100644
--- a/maps/BattleTowerOutside.asm
+++ b/maps/BattleTowerOutside.asm
@@ -5,13 +5,11 @@ const_value set 2
const BATTLETOWEROUTSIDE_LASS
BattleTowerOutside_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 2
-
- ; callbacks
dbw MAPCALLBACK_TILES, .Callback1
dbw MAPCALLBACK_OBJECTS, .Callback2
@@ -139,16 +137,16 @@ BattleTowerOutside_MapEventHeader:
warp_def $9, $8, 1, BATTLE_TOWER_1F
warp_def $9, $9, 2, BATTLE_TOWER_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 10, 10, SIGNPOST_READ, MapBattleTowerOutsideSignpost0Script
+ bg_event 10, 10, BGEVENT_READ, MapBattleTowerOutsideSignpost0Script
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_STANDING_YOUNGSTER, 12, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, BattleTowerOutsideYoungsterScript, -1
- person_event SPRITE_BUENA, 11, 13, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, BattleTowerOutsideBuenaScript, -1
- person_event SPRITE_SAILOR, 18, 12, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BattleTowerOutsideSailorScript, EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
- person_event SPRITE_LASS, 24, 12, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ObjectEvent, -1
+ object_event SPRITE_STANDING_YOUNGSTER, 12, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BattleTowerOutsideYoungsterScript, -1
+ object_event SPRITE_BUENA, 11, 13, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BattleTowerOutsideBuenaScript, -1
+ object_event SPRITE_SAILOR, 18, 12, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BattleTowerOutsideSailorScript, EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
+ object_event SPRITE_LASS, 24, 12, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1
diff --git a/maps/BetaAlphRuinUnsolvedPuzzleRoom.blk b/maps/BetaRuinsOfAlphUnsolvedPuzzleRoom.blk
index a3aa06bd6..a3aa06bd6 100644
--- a/maps/BetaAlphRuinUnsolvedPuzzleRoom.blk
+++ b/maps/BetaRuinsOfAlphUnsolvedPuzzleRoom.blk
diff --git a/maps/BetaSsAquaInsideCutOut.blk b/maps/BetaSSAquaInsideCutOut.blk
index b385b0198..b385b0198 100644
--- a/maps/BetaSsAquaInsideCutOut.blk
+++ b/maps/BetaSSAquaInsideCutOut.blk
diff --git a/maps/BillsHouse.asm b/maps/BillsHouse.asm
index 9a0aae54b..b8afadd08 100644
--- a/maps/BillsHouse.asm
+++ b/maps/BillsHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const BILLSHOUSE_GRAMPS
BillsHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -362,12 +362,12 @@ BillsHouse_MapEventHeader:
warp_def $7, $2, 1, ROUTE_25
warp_def $7, $3, 1, ROUTE_25
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_GRAMPS, 3, 2, SPRITEMOVEDATA_STANDING_UP, 2, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, BillsGrandpa, -1
+ object_event SPRITE_GRAMPS, 3, 2, SPRITEMOVEDATA_STANDING_UP, 2, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BillsGrandpa, -1
diff --git a/maps/BlackthornCity.asm b/maps/BlackthornCity.asm
index cc9abdda9..d0a52c88c 100644
--- a/maps/BlackthornCity.asm
+++ b/maps/BlackthornCity.asm
@@ -10,13 +10,11 @@ const_value set 2
const BLACKTHORNCITY_COOLTRAINER_F2
BlackthornCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 2
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
dbw MAPCALLBACK_OBJECTS, .Santos
@@ -140,7 +138,7 @@ DragonDensSign:
BlackthornCityTrainerTips:
jumptext BlackthornCityTrainerTipsText
-BlackthornCityPokeCenterSign:
+BlackthornCityPokecenterSign:
jumpstd pokecentersign
BlackthornCityMartSign:
@@ -329,27 +327,27 @@ BlackthornCity_MapEventHeader:
warp_def $9, $24, 2, ICE_PATH_1F
warp_def $1, $14, 1, DRAGONS_DEN_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 7
- signpost 24, 34, SIGNPOST_READ, BlackthornCitySign
- signpost 13, 17, SIGNPOST_READ, BlackthornGymSign
- signpost 31, 7, SIGNPOST_READ, MoveDeletersHouseSign
- signpost 3, 21, SIGNPOST_READ, DragonDensSign
- signpost 25, 5, SIGNPOST_READ, BlackthornCityTrainerTips
- signpost 29, 16, SIGNPOST_READ, BlackthornCityMartSign
- signpost 29, 22, SIGNPOST_READ, BlackthornCityPokeCenterSign
-
-.PersonEvents:
+ bg_event 24, 34, BGEVENT_READ, BlackthornCitySign
+ bg_event 13, 17, BGEVENT_READ, BlackthornGymSign
+ bg_event 31, 7, BGEVENT_READ, MoveDeletersHouseSign
+ bg_event 3, 21, BGEVENT_READ, DragonDensSign
+ bg_event 25, 5, BGEVENT_READ, BlackthornCityTrainerTips
+ bg_event 29, 16, BGEVENT_READ, BlackthornCityMartSign
+ bg_event 29, 22, BGEVENT_READ, BlackthornCityPokecenterSign
+
+.ObjectEvents:
db 9
- person_event SPRITE_SUPER_NERD, 12, 18, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, BlackthornSuperNerdScript, EVENT_BLACKTHORN_CITY_SUPER_NERD_BLOCKS_GYM
- person_event SPRITE_SUPER_NERD, 12, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, BlackthornSuperNerdScript, EVENT_BLACKTHORN_CITY_SUPER_NERD_DOES_NOT_BLOCK_GYM
- person_event SPRITE_GRAMPS, 2, 20, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackthornGramps1Script, EVENT_BLACKTHORN_CITY_GRAMPS_BLOCKS_DRAGONS_DEN
- person_event SPRITE_GRAMPS, 2, 21, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackthornGramps2Script, EVENT_BLACKTHORN_CITY_GRAMPS_NOT_BLOCKING_DRAGONS_DEN
- person_event SPRITE_BLACK_BELT, 31, 24, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, BlackthornBlackBeltScript, -1
- person_event SPRITE_COOLTRAINER_F, 25, 9, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, BlackthornCooltrainerF1Script, -1
- person_event SPRITE_YOUNGSTER, 15, 13, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackthornYoungsterScript, -1
- person_event SPRITE_YOUNGSTER, 20, 22, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SantosScript, EVENT_BLACKTHORN_CITY_SANTOS_OF_SATURDAY
- person_event SPRITE_COOLTRAINER_F, 19, 35, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, BlackthornCooltrainerF2Script, -1
+ object_event SPRITE_SUPER_NERD, 12, 18, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BlackthornSuperNerdScript, EVENT_BLACKTHORN_CITY_SUPER_NERD_BLOCKS_GYM
+ object_event SPRITE_SUPER_NERD, 12, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BlackthornSuperNerdScript, EVENT_BLACKTHORN_CITY_SUPER_NERD_DOES_NOT_BLOCK_GYM
+ object_event SPRITE_GRAMPS, 2, 20, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGramps1Script, EVENT_BLACKTHORN_CITY_GRAMPS_BLOCKS_DRAGONS_DEN
+ object_event SPRITE_GRAMPS, 2, 21, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGramps2Script, EVENT_BLACKTHORN_CITY_GRAMPS_NOT_BLOCKING_DRAGONS_DEN
+ object_event SPRITE_BLACK_BELT, 31, 24, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BlackthornBlackBeltScript, -1
+ object_event SPRITE_COOLTRAINER_F, 25, 9, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BlackthornCooltrainerF1Script, -1
+ object_event SPRITE_YOUNGSTER, 15, 13, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornYoungsterScript, -1
+ object_event SPRITE_YOUNGSTER, 20, 22, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SantosScript, EVENT_BLACKTHORN_CITY_SANTOS_OF_SATURDAY
+ object_event SPRITE_COOLTRAINER_F, 19, 35, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BlackthornCooltrainerF2Script, -1
diff --git a/maps/BlackthornDragonSpeechHouse.asm b/maps/BlackthornDragonSpeechHouse.asm
index 333f05129..3c2619988 100644
--- a/maps/BlackthornDragonSpeechHouse.asm
+++ b/maps/BlackthornDragonSpeechHouse.asm
@@ -3,30 +3,32 @@ const_value set 2
const BLACKTHORNDRAGONSPEECHHOUSE_EKANS
BlackthornDragonSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-GrannyScript_0x195949:
- jumptextfaceplayer UnknownText_0x19595c
+BlackthornDragonSpeechHouseGrannyScript:
+ jumptextfaceplayer BlackthornDragonSpeechHouseGrannyText
-Dratini:
+BlackthornDragonSpeechHouseDratiniScript:
opentext
- writetext DratiniText
+ writetext BlackthornDragonSpeechHouseDratiniText
cry DRATINI
waitbutton
closetext
end
; unused
+BlackthornDragonSpeechHousePictureBookshelf:
jumpstd picturebookshelf
; unused
+BlackthornDragonSpeechHouseMagazineBookshelf:
jumpstd magazinebookshelf
-UnknownText_0x19595c:
+BlackthornDragonSpeechHouseGrannyText:
text "A clan of trainers"
line "who can freely"
@@ -41,7 +43,7 @@ UnknownText_0x19595c:
line "this town."
done
-DratiniText:
+BlackthornDragonSpeechHouseDratiniText:
text "DRATINI: Draa!"
done
@@ -54,13 +56,13 @@ BlackthornDragonSpeechHouse_MapEventHeader:
warp_def $7, $2, 2, BLACKTHORN_CITY
warp_def $7, $3, 2, BLACKTHORN_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_GRANNY, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrannyScript_0x195949, -1
- person_event SPRITE_EKANS, 5, 5, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, Dratini, -1
+ object_event SPRITE_GRANNY, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornDragonSpeechHouseGrannyScript, -1
+ object_event SPRITE_EKANS, 5, 5, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BlackthornDragonSpeechHouseDratiniScript, -1
diff --git a/maps/BlackthornEmysHouse.asm b/maps/BlackthornEmysHouse.asm
index 9bd9522d4..98b67537b 100644
--- a/maps/BlackthornEmysHouse.asm
+++ b/maps/BlackthornEmysHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const BLACKTHORNEMYSHOUSE_EMY
BlackthornEmysHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -11,7 +11,7 @@ BlackthornEmysHouse_MapScriptHeader:
Emy:
faceplayer
opentext
- trade $3
+ trade NPCTRADE_EMY
waitbutton
closetext
end
@@ -28,14 +28,14 @@ BlackthornEmysHouse_MapEventHeader:
warp_def $7, $2, 3, BLACKTHORN_CITY
warp_def $7, $3, 3, BLACKTHORN_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, EmysHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, EmysHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, EmysHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, EmysHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_LASS, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, Emy, -1
+ object_event SPRITE_LASS, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Emy, -1
diff --git a/maps/BlackthornGym1F.asm b/maps/BlackthornGym1F.asm
index b36e7ef67..714ea46d3 100644
--- a/maps/BlackthornGym1F.asm
+++ b/maps/BlackthornGym1F.asm
@@ -6,13 +6,11 @@ const_value set 2
const BLACKTHORNGYM1F_GYM_GUY
BlackthornGym1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_TILES, .Boulders
.Boulders:
@@ -95,34 +93,34 @@ BlackthornGymClairScript:
end
TrainerCooltrainermPaul:
- trainer EVENT_BEAT_COOLTRAINERM_PAUL, COOLTRAINERM, PAUL, CooltrainermPaulSeenText, CooltrainermPaulBeatenText, 0, CooltrainermPaulScript
+ trainer EVENT_BEAT_COOLTRAINERM_PAUL, COOLTRAINERM, PAUL, CooltrainermPaulSeenText, CooltrainermPaulBeatenText, 0, .Script
-CooltrainermPaulScript:
+.Script:
end_if_just_battled
opentext
- writetext CooltrainermPaulAfterText
+ writetext CooltrainermPaulAfterBattleText
waitbutton
closetext
end
TrainerCooltrainermMike:
- trainer EVENT_BEAT_COOLTRAINERM_MIKE, COOLTRAINERM, MIKE, CooltrainermMikeSeenText, CooltrainermMikeBeatenText, 0, CooltrainermMikeScript
+ trainer EVENT_BEAT_COOLTRAINERM_MIKE, COOLTRAINERM, MIKE, CooltrainermMikeSeenText, CooltrainermMikeBeatenText, 0, .Script
-CooltrainermMikeScript:
+.Script:
end_if_just_battled
opentext
- writetext CooltrainermMikeAfterText
+ writetext CooltrainermMikeAfterBattleText
waitbutton
closetext
end
TrainerCooltrainerfLola:
- trainer EVENT_BEAT_COOLTRAINERF_LOLA, COOLTRAINERF, LOLA, CooltrainerfLolaSeenText, CooltrainerfLolaBeatenText, 0, CooltrainerfLolaScript
+ trainer EVENT_BEAT_COOLTRAINERF_LOLA, COOLTRAINERF, LOLA, CooltrainerfLolaSeenText, CooltrainerfLolaBeatenText, 0, .Script
-CooltrainerfLolaScript:
+.Script:
end_if_just_battled
opentext
- writetext CooltrainerfLolaAfterText
+ writetext CooltrainerfLolaAfterBattleText
waitbutton
closetext
end
@@ -300,7 +298,7 @@ CooltrainermPaulBeatenText:
line "lost?"
done
-CooltrainermPaulAfterText:
+CooltrainermPaulAfterBattleText:
text "LANCE told you"
line "that he'd like to"
@@ -318,7 +316,7 @@ CooltrainermMikeBeatenText:
text "That's odd."
done
-CooltrainermMikeAfterText:
+CooltrainermMikeAfterBattleText:
text "I know my short-"
line "comings now."
@@ -344,7 +342,7 @@ CooltrainerfLolaBeatenText:
text "Way to go!"
done
-CooltrainerfLolaAfterText:
+CooltrainerfLolaAfterBattleText:
text "Dragons are weak"
line "against dragon-"
cont "type moves."
@@ -402,18 +400,18 @@ BlackthornGym1F_MapEventHeader:
warp_def $7, $7, 4, BLACKTHORN_GYM_2F
warp_def $6, $7, 5, BLACKTHORN_GYM_2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 15, 3, SIGNPOST_READ, BlackthornGymStatue
- signpost 15, 6, SIGNPOST_READ, BlackthornGymStatue
+ bg_event 15, 3, BGEVENT_READ, BlackthornGymStatue
+ bg_event 15, 6, BGEVENT_READ, BlackthornGymStatue
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_CLAIR, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, BlackthornGymClairScript, -1
- person_event SPRITE_COOLTRAINER_M, 6, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerCooltrainermMike, -1
- person_event SPRITE_COOLTRAINER_M, 14, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerCooltrainermPaul, -1
- person_event SPRITE_COOLTRAINER_F, 2, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerCooltrainerfLola, -1
- person_event SPRITE_GYM_GUY, 15, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, BlackthornGymGuyScript, -1
+ object_event SPRITE_CLAIR, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BlackthornGymClairScript, -1
+ object_event SPRITE_COOLTRAINER_M, 6, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainermMike, -1
+ object_event SPRITE_COOLTRAINER_M, 14, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainermPaul, -1
+ object_event SPRITE_COOLTRAINER_F, 2, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerCooltrainerfLola, -1
+ object_event SPRITE_GYM_GUY, 15, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BlackthornGymGuyScript, -1
diff --git a/maps/BlackthornGym2F.asm b/maps/BlackthornGym2F.asm
index eeff34d3e..a9ee60bef 100644
--- a/maps/BlackthornGym2F.asm
+++ b/maps/BlackthornGym2F.asm
@@ -9,13 +9,11 @@ const_value set 2
const BLACKTHORNGYM2F_BOULDER6
BlackthornGym2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_CMDQUEUE, .Boulders
.Boulders:
@@ -63,23 +61,23 @@ BlackthornGymBoulder:
jumpstd strengthboulder
TrainerCooltrainermCody:
- trainer EVENT_BEAT_COOLTRAINERM_CODY, COOLTRAINERM, CODY, CooltrainermCodySeenText, CooltrainermCodyBeatenText, 0, CooltrainermCodyScript
+ trainer EVENT_BEAT_COOLTRAINERM_CODY, COOLTRAINERM, CODY, CooltrainermCodySeenText, CooltrainermCodyBeatenText, 0, .Script
-CooltrainermCodyScript:
+.Script:
end_if_just_battled
opentext
- writetext CooltrainermCodyAfterText
+ writetext CooltrainermCodyAfterBattleText
waitbutton
closetext
end
TrainerCooltrainerfFran:
- trainer EVENT_BEAT_COOLTRAINERF_FRAN, COOLTRAINERF, FRAN, CooltrainerfFranSeenText, CooltrainerfFranBeatenText, 0, CooltrainerfFranScript
+ trainer EVENT_BEAT_COOLTRAINERF_FRAN, COOLTRAINERF, FRAN, CooltrainerfFranSeenText, CooltrainerfFranBeatenText, 0, .Script
-CooltrainerfFranScript:
+.Script:
end_if_just_battled
opentext
- writetext CooltrainerfFranAfterText
+ writetext CooltrainerfFranAfterBattleText
waitbutton
closetext
end
@@ -95,7 +93,7 @@ CooltrainermCodyBeatenText:
line "had a dragon!"
done
-CooltrainermCodyAfterText:
+CooltrainermCodyAfterBattleText:
text "Members of our"
line "dragon-user clan"
@@ -119,7 +117,7 @@ CooltrainerfFranBeatenText:
text "Awww… I lost…"
done
-CooltrainerfFranAfterText:
+CooltrainerfFranAfterBattleText:
text "Uh-oh… CLAIR is"
line "going to be mad…"
done
@@ -141,19 +139,19 @@ BlackthornGym2F_MapEventHeader:
warp_def $7, $8, 6, BLACKTHORN_GYM_1F ; hole
warp_def $3, $8, 7, BLACKTHORN_GYM_1F ; hole
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 8
- person_event SPRITE_COOLTRAINER_M, 1, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerCooltrainermCody, -1
- person_event SPRITE_COOLTRAINER_F, 11, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerCooltrainerfFran, -1
- person_event SPRITE_BOULDER, 2, 8, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_1
- person_event SPRITE_BOULDER, 3, 2, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_2
- person_event SPRITE_BOULDER, 16, 6, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_3
- person_event SPRITE_BOULDER, 3, 3, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackthornGymBoulder, -1
- person_event SPRITE_BOULDER, 1, 6, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackthornGymBoulder, -1
- person_event SPRITE_BOULDER, 14, 8, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackthornGymBoulder, -1
+ object_event SPRITE_COOLTRAINER_M, 1, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerCooltrainermCody, -1
+ object_event SPRITE_COOLTRAINER_F, 11, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerCooltrainerfFran, -1
+ object_event SPRITE_BOULDER, 2, 8, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_1
+ object_event SPRITE_BOULDER, 3, 2, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_2
+ object_event SPRITE_BOULDER, 16, 6, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_3
+ object_event SPRITE_BOULDER, 3, 3, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGymBoulder, -1
+ object_event SPRITE_BOULDER, 1, 6, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGymBoulder, -1
+ object_event SPRITE_BOULDER, 14, 8, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGymBoulder, -1
diff --git a/maps/BlackthornMart.asm b/maps/BlackthornMart.asm
index e78bd8a74..ac350c45d 100644
--- a/maps/BlackthornMart.asm
+++ b/maps/BlackthornMart.asm
@@ -4,25 +4,25 @@ const_value set 2
const BLACKTHORNMART_BLACK_BELT
BlackthornMart_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-ClerkScript_0x195a5d:
+BlackthornMartClerkScript:
opentext
pokemart MARTTYPE_STANDARD, MART_BLACKTHORN
closetext
end
-CooltrainerMScript_0x195a64:
- jumptextfaceplayer UnknownText_0x195a6a
+BlackthornMartCooltrainerMScript:
+ jumptextfaceplayer BlackthornMartCooltrainerMText
-BlackBeltScript_0x195a67:
- jumptextfaceplayer UnknownText_0x195ae9
+BlackthornMartBlackBeltScript:
+ jumptextfaceplayer BlackthornMartBlackBeltText
-UnknownText_0x195a6a:
+BlackthornMartCooltrainerMText:
text "You can't buy MAX"
line "REVIVE, but it"
@@ -36,7 +36,7 @@ UnknownText_0x195a6a:
line "needed for moves."
done
-UnknownText_0x195ae9:
+BlackthornMartBlackBeltText:
text "MAX REPEL keeps"
line "weak #MON away"
cont "from you."
@@ -55,14 +55,14 @@ BlackthornMart_MapEventHeader:
warp_def $7, $2, 4, BLACKTHORN_CITY
warp_def $7, $3, 4, BLACKTHORN_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x195a5d, -1
- person_event SPRITE_COOLTRAINER_M, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x195a64, -1
- person_event SPRITE_BLACK_BELT, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, BlackBeltScript_0x195a67, -1
+ object_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornMartClerkScript, -1
+ object_event SPRITE_COOLTRAINER_M, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornMartCooltrainerMScript, -1
+ object_event SPRITE_BLACK_BELT, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BlackthornMartBlackBeltScript, -1
diff --git a/maps/BlackthornPokeCenter1F.asm b/maps/BlackthornPokeCenter1F.asm
deleted file mode 100644
index 32085c67f..000000000
--- a/maps/BlackthornPokeCenter1F.asm
+++ /dev/null
@@ -1,73 +0,0 @@
-const_value set 2
- const BLACKTHORNPOKECENTER1F_NURSE
- const BLACKTHORNPOKECENTER1F_GENTLEMAN
- const BLACKTHORNPOKECENTER1F_TWIN
- const BLACKTHORNPOKECENTER1F_COOLTRAINER_M
-
-BlackthornPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x195b79:
- jumpstd pokecenternurse
-
-GentlemanScript_0x195b7c:
- jumptextfaceplayer UnknownText_0x195b85
-
-TwinScript_0x195b7f:
- jumptextfaceplayer UnknownText_0x195bfd
-
-CooltrainerMScript_0x195b82:
- jumpstd happinesschecknpc
-
-UnknownText_0x195b85:
- text "Deep inside far-"
- line "off INDIGO PLATEAU"
-
- para "is the #MON"
- line "LEAGUE."
-
- para "I hear the best"
- line "trainers gather"
-
- para "there from around"
- line "the country."
- done
-
-UnknownText_0x195bfd:
- text "There was this"
- line "move I just had"
-
- para "to teach my #-"
- line "MON."
-
- para "So I got the MOVE"
- line "DELETER to make it"
- cont "forget an HM move."
- done
-
-BlackthornPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 5, BLACKTHORN_CITY
- warp_def $7, $4, 5, BLACKTHORN_CITY
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 4
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x195b79, -1
- person_event SPRITE_GENTLEMAN, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x195b7c, -1
- person_event SPRITE_TWIN, 4, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TwinScript_0x195b7f, -1
- person_event SPRITE_COOLTRAINER_M, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x195b82, -1
diff --git a/maps/BlackthornPokecenter1F.asm b/maps/BlackthornPokecenter1F.asm
new file mode 100644
index 000000000..3f6c76ffe
--- /dev/null
+++ b/maps/BlackthornPokecenter1F.asm
@@ -0,0 +1,73 @@
+const_value set 2
+ const BLACKTHORNPOKECENTER1F_NURSE
+ const BLACKTHORNPOKECENTER1F_GENTLEMAN
+ const BLACKTHORNPOKECENTER1F_TWIN
+ const BLACKTHORNPOKECENTER1F_COOLTRAINER_M
+
+BlackthornPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+BlackthornPokecenter1FNurseScript:
+ jumpstd pokecenternurse
+
+BlackthornPokecenter1FGentlemanScript:
+ jumptextfaceplayer BlackthornPokecenter1FGentlemanText
+
+BlackthornPokecenter1FTwinScript:
+ jumptextfaceplayer BlackthornPokecenter1FTwinText
+
+BlackthornPokecenter1FCooltrainerMScript:
+ jumpstd happinesschecknpc
+
+BlackthornPokecenter1FGentlemanText:
+ text "Deep inside far-"
+ line "off INDIGO PLATEAU"
+
+ para "is the #MON"
+ line "LEAGUE."
+
+ para "I hear the best"
+ line "trainers gather"
+
+ para "there from around"
+ line "the country."
+ done
+
+BlackthornPokecenter1FTwinText:
+ text "There was this"
+ line "move I just had"
+
+ para "to teach my #-"
+ line "MON."
+
+ para "So I got the MOVE"
+ line "DELETER to make it"
+ cont "forget an HM move."
+ done
+
+BlackthornPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 5, BLACKTHORN_CITY
+ warp_def $7, $4, 5, BLACKTHORN_CITY
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornPokecenter1FNurseScript, -1
+ object_event SPRITE_GENTLEMAN, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornPokecenter1FGentlemanScript, -1
+ object_event SPRITE_TWIN, 4, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BlackthornPokecenter1FTwinScript, -1
+ object_event SPRITE_COOLTRAINER_M, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BlackthornPokecenter1FCooltrainerMScript, -1
diff --git a/maps/BluesHouse.asm b/maps/BluesHouse.asm
index 72cd935fc..367b255b8 100644
--- a/maps/BluesHouse.asm
+++ b/maps/BluesHouse.asm
@@ -2,35 +2,35 @@ const_value set 2
const BLUESHOUSE_DAISY
BluesHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-DaisyScript_0x19b0d0:
+DaisyScript:
faceplayer
opentext
checkcode VAR_HOUR
- if_equal $f, UnknownScript_0x19b0de
- writetext UnknownText_0x19b130
+ if_equal 15, .ThreePM
+ writetext DaisyHelloText
waitbutton
closetext
end
-UnknownScript_0x19b0de:
+.ThreePM:
checkflag ENGINE_TEA_IN_BLUES_HOUSE
- iftrue UnknownScript_0x19b11e
- writetext UnknownText_0x19b1b6
+ iftrue .AlreadyGroomedMon
+ writetext DaisyOfferGroomingText
yesorno
- iffalse UnknownScript_0x19b124
- writetext UnknownText_0x19b244
+ iffalse .Refused
+ writetext DaisyWhichMonText
waitbutton
special Special_DaisyMassage
- if_equal 0, UnknownScript_0x19b124
- if_equal 1, UnknownScript_0x19b12a
+ if_equal 0, .Refused
+ if_equal 1, .CantGroomEgg
setflag ENGINE_TEA_IN_BLUES_HOUSE
- writetext UnknownText_0x19b266
+ writetext DaisyAlrightText
waitbutton
closetext
special FadeOutPalettes
@@ -39,33 +39,33 @@ UnknownScript_0x19b0de:
special FadeInPalettes
special RestartMapMusic
opentext
- writetext UnknownText_0x19b296
+ writetext GroomedMonLooksContentText
special PlayCurMonCry
buttonsound
- writetext UnknownText_0x19b2aa
+ writetext DaisyAllDoneText
waitbutton
closetext
end
-UnknownScript_0x19b11e:
- writetext UnknownText_0x19b2fa
+.AlreadyGroomedMon:
+ writetext DaisyAlreadyGroomedText
waitbutton
closetext
end
-UnknownScript_0x19b124:
- writetext UnknownText_0x19b334
+.Refused:
+ writetext DaisyRefusedText
waitbutton
closetext
end
-UnknownScript_0x19b12a:
- writetext UnknownText_0x19b377
+.CantGroomEgg:
+ writetext DaisyCantGroomEggText
waitbutton
closetext
end
-UnknownText_0x19b130:
+DaisyHelloText:
text "DAISY: Hi! My kid"
line "brother is the GYM"
@@ -79,7 +79,7 @@ UnknownText_0x19b130:
line "for the trainers."
done
-UnknownText_0x19b1b6:
+DaisyOfferGroomingText:
text "DAISY: Hi! Good"
line "timing. I'm about"
cont "to have some tea."
@@ -94,24 +94,24 @@ UnknownText_0x19b1b6:
line "to groom one?"
done
-UnknownText_0x19b244:
+DaisyWhichMonText:
text "DAISY: Which one"
line "should I groom?"
done
-UnknownText_0x19b266:
+DaisyAlrightText:
text "DAISY: OK, I'll"
line "get it looking"
cont "nice in no time."
done
-UnknownText_0x19b296:
+GroomedMonLooksContentText:
text_from_ram StringBuffer3
text " looks"
line "content."
done
-UnknownText_0x19b2aa:
+DaisyAllDoneText:
text "DAISY: There you"
line "go! All done."
@@ -122,7 +122,7 @@ UnknownText_0x19b2aa:
line "#MON."
done
-UnknownText_0x19b2fa:
+DaisyAlreadyGroomedText:
text "DAISY: I always"
line "have tea around"
@@ -130,7 +130,7 @@ UnknownText_0x19b2fa:
line "join me."
done
-UnknownText_0x19b334:
+DaisyRefusedText:
text "DAISY: You don't"
line "want to have one"
@@ -138,7 +138,7 @@ UnknownText_0x19b334:
line "just have tea."
done
-UnknownText_0x19b377:
+DaisyCantGroomEggText:
text "DAISY: Oh, sorry."
line "I honestly can't"
cont "groom an EGG."
@@ -153,12 +153,12 @@ BluesHouse_MapEventHeader:
warp_def $7, $2, 2, PALLET_TOWN
warp_def $7, $3, 2, PALLET_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_DAISY, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, DaisyScript_0x19b0d0, -1
+ object_event SPRITE_DAISY, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DaisyScript, -1
diff --git a/maps/BrunosRoom.asm b/maps/BrunosRoom.asm
index ba1e8c3c8..8ac5547de 100644
--- a/maps/BrunosRoom.asm
+++ b/maps/BrunosRoom.asm
@@ -2,25 +2,20 @@ const_value set 2
const BRUNOSROOM_BRUNO
BrunosRoom_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw .Trigger0, 0
- dw .Trigger1, 0
+ scene_script .LockDoor
+ scene_script .DummyScene
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_TILES, .BrunosRoomDoors
-.Trigger0:
+.LockDoor:
priorityjump .BrunosDoorLocksBehindYou
end
-.Trigger1:
+.DummyScene:
end
.BrunosRoomDoors:
@@ -42,7 +37,7 @@ BrunosRoom_MapScriptHeader:
changeblock $4, $e, $2a
reloadmappart
closetext
- dotrigger $1
+ setscene $1
setevent EVENT_BRUNOS_ROOM_ENTRANCE_CLOSED
waitsfx
end
@@ -140,12 +135,12 @@ BrunosRoom_MapEventHeader:
warp_def $2, $4, 1, KARENS_ROOM
warp_def $2, $5, 2, KARENS_ROOM
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_BRUNO, 7, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, BrunoScript_Battle, -1
+ object_event SPRITE_BRUNO, 7, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BrunoScript_Battle, -1
diff --git a/maps/BurnedTower1F.asm b/maps/BurnedTower1F.asm
index 369d89b02..25adf9358 100644
--- a/maps/BurnedTower1F.asm
+++ b/maps/BurnedTower1F.asm
@@ -6,29 +6,24 @@ const_value set 2
const BURNEDTOWER1F_POKE_BALL
BurnedTower1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 3
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
- maptrigger .Trigger2
+ scene_script .EusineScene
+ scene_script .DummyScene1
+ scene_script .DummyScene2
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_TILES, .HoleAndLadder
-.Trigger0:
- priorityjump .EusineTrigger
+.EusineScene:
+ priorityjump .MeetEusine
end
-.Trigger1:
+.DummyScene1:
end
-.Trigger2:
+.DummyScene2:
end
.HoleAndLadder:
@@ -42,7 +37,7 @@ BurnedTower1F_MapScriptHeader:
.Done:
return
-.EusineTrigger:
+.MeetEusine:
spriteface BURNEDTOWER1F_EUSINE, DOWN
showemote EMOTE_SHOCK, BURNEDTOWER1F_EUSINE, 15
applymovement BURNEDTOWER1F_EUSINE, BurnedTower1FEusineMovement
@@ -50,8 +45,8 @@ BurnedTower1F_MapScriptHeader:
writetext BurnedTower1FEusineIntroText
waitbutton
closetext
- moveperson BURNEDTOWER1F_EUSINE, $9, $e
- dotrigger $1
+ moveobject BURNEDTOWER1F_EUSINE, $9, $e
+ setscene $1
end
BurnedTowerRivalBattleScript:
@@ -73,7 +68,7 @@ BurnedTowerRivalBattleScript:
iftrue .chikorita
winlosstext BurnedTowerSilver_WinText, BurnedTowerSilver_LossText
setlasttalked BURNEDTOWER1F_SILVER
- loadtrainer RIVAL1, RIVAL1_9
+ loadtrainer RIVAL1, RIVAL1_3_TOTODILE
startbattle
dontrestartmapmusic
reloadmapafterbattle
@@ -82,7 +77,7 @@ BurnedTowerRivalBattleScript:
.totodile
winlosstext BurnedTowerSilver_WinText, BurnedTowerSilver_LossText
setlasttalked BURNEDTOWER1F_SILVER
- loadtrainer RIVAL1, RIVAL1_7
+ loadtrainer RIVAL1, RIVAL1_3_CHIKORITA
startbattle
dontrestartmapmusic
reloadmapafterbattle
@@ -91,7 +86,7 @@ BurnedTowerRivalBattleScript:
.chikorita
winlosstext BurnedTowerSilver_WinText, BurnedTowerSilver_LossText
setlasttalked BURNEDTOWER1F_SILVER
- loadtrainer RIVAL1, RIVAL1_8
+ loadtrainer RIVAL1, RIVAL1_3_CYNDAQUIL
startbattle
dontrestartmapmusic
reloadmapafterbattle
@@ -103,7 +98,7 @@ BurnedTowerRivalBattleScript:
writetext BurnedTowerSilver_AfterText1
waitbutton
closetext
- dotrigger $2
+ setscene $2
setevent EVENT_RIVAL_BURNED_TOWER
special Special_FadeOutMusic
pause 15
@@ -305,19 +300,19 @@ BurnedTower1F_MapEventHeader:
warp_def $e, $f, 5, BURNED_TOWER_B1F
warp_def $f, $7, 6, BURNED_TOWER_B1F
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 1, $9, $b, $0, BurnedTowerRivalBattleScript, $0, $0
+ coord_event 1, $9, $b, BurnedTowerRivalBattleScript
-.Signposts:
+.BGEvents:
db 2
- signpost 7, 8, SIGNPOST_ITEM, BurnedTower1FHiddenEther
- signpost 11, 13, SIGNPOST_ITEM, BurnedTower1FHiddenUltraBall
+ bg_event 7, 8, BGEVENT_ITEM, BurnedTower1FHiddenEther
+ bg_event 11, 13, BGEVENT_ITEM, BurnedTower1FHiddenUltraBall
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_ROCK, 4, 15, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BurnedTower1FRock, -1
- person_event SPRITE_SUPER_NERD, 12, 12, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, BurnedTower1FEusineScript, EVENT_BURNED_TOWER_1F_EUSINE
- person_event SPRITE_SILVER, 9, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, ObjectEvent, EVENT_RIVAL_BURNED_TOWER
- person_event SPRITE_MORTY, 14, 14, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, BurnedTower1FMortyScript, EVENT_BURNED_TOWER_MORTY
- person_event SPRITE_POKE_BALL, 2, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, BurnedTower1FHPUp, EVENT_BURNED_TOWER_1F_HP_UP
+ object_event SPRITE_ROCK, 4, 15, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BurnedTower1FRock, -1
+ object_event SPRITE_SUPER_NERD, 12, 12, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BurnedTower1FEusineScript, EVENT_BURNED_TOWER_1F_EUSINE
+ object_event SPRITE_SILVER, 9, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, ObjectEvent, EVENT_RIVAL_BURNED_TOWER
+ object_event SPRITE_MORTY, 14, 14, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BurnedTower1FMortyScript, EVENT_BURNED_TOWER_MORTY
+ object_event SPRITE_POKE_BALL, 2, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, BurnedTower1FHPUp, EVENT_BURNED_TOWER_1F_HP_UP
diff --git a/maps/BurnedTowerB1F.asm b/maps/BurnedTowerB1F.asm
index ece68f7df..0946a43d8 100644
--- a/maps/BurnedTowerB1F.asm
+++ b/maps/BurnedTowerB1F.asm
@@ -10,27 +10,22 @@ const_value set 2
const BURNEDTOWERB1F_EUSINE
BurnedTowerB1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw .Trigger0, 0
- dw .Trigger1, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_TILES, .LadderCallback
- ; callbacks
-
- dbw MAPCALLBACK_TILES, BurnedTowerB1FLadderCallback
-
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
+.DummyScene1:
end
-BurnedTowerB1FLadderCallback:
+.LadderCallback:
checkevent EVENT_RELEASED_THE_BEASTS
iftrue .NoChange
changeblock $6, $e, $2
@@ -86,11 +81,11 @@ ReleaseTheBeasts:
disappear BURNEDTOWERB1F_SUICUNE1
waitsfx
special RestartMapMusic
- dotrigger $1
+ setscene $1
setevent EVENT_RELEASED_THE_BEASTS
special InitRoamMons
- domaptrigger ECRUTEAK_GYM, $1
- domaptrigger CIANWOOD_CITY, $1
+ setmapscene ECRUTEAK_GYM, $1
+ setmapscene CIANWOOD_CITY, $1
clearevent EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY
setevent EVENT_ECRUTEAK_GYM_GRAMPS
clearevent EVENT_ECRUTEAK_CITY_GRAMPS
@@ -101,7 +96,7 @@ ReleaseTheBeasts:
changeblock $6, $e, $1b
reloadmappart
closetext
- dotrigger $1
+ setscene $1
end
BurnedTowerB1FEusine:
@@ -253,21 +248,21 @@ BurnedTowerB1F_MapEventHeader:
warp_def $e, $11, 12, BURNED_TOWER_1F
warp_def $f, $7, 14, BURNED_TOWER_1F
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 0, $6, $a, $0, ReleaseTheBeasts, $0, $0
+ coord_event 0, $6, $a, ReleaseTheBeasts
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 9
- person_event SPRITE_BOULDER, 8, 17, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BurnedTowerB1FBoulder, -1
- person_event SPRITE_RAIKOU, 3, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
- person_event SPRITE_ENTEI, 3, 12, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
- person_event SPRITE_SUICUNE, 4, 10, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
- person_event SPRITE_RAIKOU, 3, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_SILVER, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
- person_event SPRITE_ENTEI, 3, 12, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_SILVER, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
- person_event SPRITE_SUICUNE, 4, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_SILVER, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
- person_event SPRITE_POKE_BALL, 4, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, BurnedTowerB1FTMEndure, EVENT_BURNED_TOWER_B1F_TM_ENDURE
- person_event SPRITE_SUPER_NERD, 12, 10, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, BurnedTowerB1FEusine, EVENT_EUSINE_IN_BURNED_TOWER
+ object_event SPRITE_BOULDER, 8, 17, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BurnedTowerB1FBoulder, -1
+ object_event SPRITE_RAIKOU, 3, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
+ object_event SPRITE_ENTEI, 3, 12, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
+ object_event SPRITE_SUICUNE, 4, 10, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
+ object_event SPRITE_RAIKOU, 3, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_SILVER, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
+ object_event SPRITE_ENTEI, 3, 12, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_SILVER, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
+ object_event SPRITE_SUICUNE, 4, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_SILVER, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
+ object_event SPRITE_POKE_BALL, 4, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, BurnedTowerB1FTMEndure, EVENT_BURNED_TOWER_B1F_TM_ENDURE
+ object_event SPRITE_SUPER_NERD, 12, 10, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BurnedTowerB1FEusine, EVENT_EUSINE_IN_BURNED_TOWER
diff --git a/maps/CeladonCafe.asm b/maps/CeladonCafe.asm
index 11b768765..7751c69ff 100644
--- a/maps/CeladonCafe.asm
+++ b/maps/CeladonCafe.asm
@@ -6,7 +6,7 @@ const_value set 2
const CELADONCAFE_TEACHER
CeladonCafe_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -216,18 +216,18 @@ CeladonCafe_MapEventHeader:
warp_def $7, $6, 9, CELADON_CITY
warp_def $7, $7, 9, CELADON_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 5, SIGNPOST_READ, EatathonContestPoster
- signpost 1, 7, SIGNPOST_READ, CeladonCafeTrashcan
+ bg_event 0, 5, BGEVENT_READ, EatathonContestPoster
+ bg_event 1, 7, BGEVENT_READ, CeladonCafeTrashcan
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_SUPER_NERD, 3, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, CeladonCafeChef, -1
- person_event SPRITE_FISHER, 6, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CeladonCafeFisher1, -1
- person_event SPRITE_FISHER, 7, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CeladonCafeFisher2, -1
- person_event SPRITE_FISHER, 2, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CeladonCafeFisher3, -1
- person_event SPRITE_TEACHER, 3, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CeladonCafeTeacher, -1
+ object_event SPRITE_SUPER_NERD, 3, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CeladonCafeChef, -1
+ object_event SPRITE_FISHER, 6, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonCafeFisher1, -1
+ object_event SPRITE_FISHER, 7, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonCafeFisher2, -1
+ object_event SPRITE_FISHER, 2, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonCafeFisher3, -1
+ object_event SPRITE_TEACHER, 3, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonCafeTeacher, -1
diff --git a/maps/CeladonCity.asm b/maps/CeladonCity.asm
index 461b558ff..680875e42 100644
--- a/maps/CeladonCity.asm
+++ b/maps/CeladonCity.asm
@@ -10,21 +10,19 @@ const_value set 2
const CELADONCITY_LASS
CeladonCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_CELADON
return
-FisherScript_0x1a9f43:
- jumptextfaceplayer UnknownText_0x1a9f7d
+CeladonCityFisherScript:
+ jumptextfaceplayer CeladonCityFisherText
CeladonCityPoliwrath:
opentext
@@ -34,26 +32,26 @@ CeladonCityPoliwrath:
closetext
end
-TeacherScript_0x1a9f50:
- jumptextfaceplayer UnknownText_0x1a9fde
+CeladonCityTeacher1Script:
+ jumptextfaceplayer CeladonCityTeacher1Text
-GrampsScript_0x1a9f53:
- jumptextfaceplayer UnknownText_0x1aa043
+CeladonCityGramps1Script:
+ jumptextfaceplayer CeladonCityGramps1Text
-GrampsScript_0x1a9f56:
- jumptextfaceplayer UnknownText_0x1aa0dc
+CeladonCityGramps2Script:
+ jumptextfaceplayer CeladonCityGramps2Text
-YoungsterScript_0x1a9f59:
- jumptextfaceplayer UnknownText_0x1aa115
+CeladonCityYoungster1Script:
+ jumptextfaceplayer CeladonCityYoungster1Text
-YoungsterScript_0x1a9f5c:
- jumptextfaceplayer UnknownText_0x1aa155
+CeladonCityYoungster2Script:
+ jumptextfaceplayer CeladonCityYoungster2Text
-TeacherScript_0x1a9f5f:
- jumptextfaceplayer UnknownText_0x1aa1bd
+CeladonCityTeacher2Script:
+ jumptextfaceplayer CeladonCityTeacher2Text
-LassScript_0x1a9f62:
- jumptextfaceplayer UnknownText_0x1aa306
+CeladonCityLassScript:
+ jumptextfaceplayer CeladonCityLassText
CeladonCitySign:
jumptext CeladonCitySignText
@@ -73,13 +71,13 @@ CeladonCityGameCornerSign:
CeladonCityTrainerTips:
jumptext CeladonCityTrainerTipsText
-CeladonCityPokeCenterSign:
+CeladonCityPokecenterSign:
jumpstd pokecentersign
CeladonCityHiddenPpUp:
dwb EVENT_CELADON_CITY_HIDDEN_PP_UP, PP_UP
-UnknownText_0x1a9f7d:
+CeladonCityFisherText:
text "This POLIWRATH is"
line "my partner."
@@ -92,7 +90,7 @@ CeladonCityPoliwrathText:
text "POLIWRATH: Croak!"
done
-UnknownText_0x1a9fde:
+CeladonCityTeacher1Text:
text "I lost at the slot"
line "machines again…"
@@ -103,7 +101,7 @@ UnknownText_0x1a9fde:
line "them out too."
done
-UnknownText_0x1aa043:
+CeladonCityGramps1Text:
text "GRIMER have been"
line "appearing lately."
@@ -118,7 +116,7 @@ UnknownText_0x1aa043:
cont "a serious problem…"
done
-UnknownText_0x1aa0dc:
+CeladonCityGramps2Text:
text "Nihihi! This GYM"
line "is great! Only"
@@ -126,7 +124,7 @@ UnknownText_0x1aa0dc:
line "here!"
done
-UnknownText_0x1aa115:
+CeladonCityYoungster1Text:
text "Want to know a"
line "secret?"
@@ -135,7 +133,7 @@ UnknownText_0x1aa115:
cont "door."
done
-UnknownText_0x1aa155:
+CeladonCityYoungster2Text:
text "They're holding an"
line "eating contest at"
cont "the restaurant."
@@ -145,7 +143,7 @@ UnknownText_0x1aa155:
cont "feel bloated…"
done
-UnknownText_0x1aa1bd:
+CeladonCityTeacher2Text:
text "CELADON DEPT.STORE"
line "has the biggest"
@@ -162,8 +160,8 @@ UnknownText_0x1aa1bd:
line "a sales clerk."
done
-; possibly unused
-UnknownText_0x1aa25b:
+; unused
+CeladonCityUnusedPokeComCenterText:
text "I love being"
line "surrounded by tall"
cont "buildings!"
@@ -181,7 +179,7 @@ UnknownText_0x1aa25b:
line "KANTO…"
done
-UnknownText_0x1aa306:
+CeladonCityLassText:
text "Looking at the"
line "ground while I was"
@@ -252,28 +250,28 @@ CeladonCity_MapEventHeader:
warp_def $1d, $a, 1, CELADON_GYM
warp_def $1d, $19, 1, CELADON_CAFE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 8
- signpost 21, 23, SIGNPOST_READ, CeladonCitySign
- signpost 31, 11, SIGNPOST_READ, CeladonGymSign
- signpost 9, 6, SIGNPOST_READ, CeladonCityDeptStoreSign
- signpost 9, 13, SIGNPOST_READ, CeladonCityMansionSign
- signpost 21, 19, SIGNPOST_READ, CeladonCityGameCornerSign
- signpost 21, 29, SIGNPOST_READ, CeladonCityTrainerTips
- signpost 9, 30, SIGNPOST_READ, CeladonCityPokeCenterSign
- signpost 21, 37, SIGNPOST_ITEM, CeladonCityHiddenPpUp
-
-.PersonEvents:
+ bg_event 21, 23, BGEVENT_READ, CeladonCitySign
+ bg_event 31, 11, BGEVENT_READ, CeladonGymSign
+ bg_event 9, 6, BGEVENT_READ, CeladonCityDeptStoreSign
+ bg_event 9, 13, BGEVENT_READ, CeladonCityMansionSign
+ bg_event 21, 19, BGEVENT_READ, CeladonCityGameCornerSign
+ bg_event 21, 29, BGEVENT_READ, CeladonCityTrainerTips
+ bg_event 9, 30, BGEVENT_READ, CeladonCityPokecenterSign
+ bg_event 21, 37, BGEVENT_ITEM, CeladonCityHiddenPpUp
+
+.ObjectEvents:
db 9
- person_event SPRITE_FISHER, 11, 26, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FisherScript_0x1a9f43, -1
- person_event SPRITE_POLIWAG, 11, 27, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, CeladonCityPoliwrath, -1
- person_event SPRITE_TEACHER, 24, 20, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, TeacherScript_0x1a9f50, -1
- person_event SPRITE_GRAMPS, 16, 14, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, GrampsScript_0x1a9f53, -1
- person_event SPRITE_GRAMPS, 31, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GrampsScript_0x1a9f56, -1
- person_event SPRITE_YOUNGSTER, 13, 18, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x1a9f59, -1
- person_event SPRITE_YOUNGSTER, 33, 24, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x1a9f5c, -1
- person_event SPRITE_TEACHER, 14, 6, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TeacherScript_0x1a9f5f, -1
- person_event SPRITE_LASS, 22, 7, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, LassScript_0x1a9f62, -1
+ object_event SPRITE_FISHER, 11, 26, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonCityFisherScript, -1
+ object_event SPRITE_POLIWAG, 11, 27, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonCityPoliwrath, -1
+ object_event SPRITE_TEACHER, 24, 20, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonCityTeacher1Script, -1
+ object_event SPRITE_GRAMPS, 16, 14, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CeladonCityGramps1Script, -1
+ object_event SPRITE_GRAMPS, 31, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonCityGramps2Script, -1
+ object_event SPRITE_YOUNGSTER, 13, 18, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonCityYoungster1Script, -1
+ object_event SPRITE_YOUNGSTER, 33, 24, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonCityYoungster2Script, -1
+ object_event SPRITE_TEACHER, 14, 6, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonCityTeacher2Script, -1
+ object_event SPRITE_LASS, 22, 7, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonCityLassScript, -1
diff --git a/maps/CeladonDeptStore1F.asm b/maps/CeladonDeptStore1F.asm
index 0abf50524..6a1a7e358 100644
--- a/maps/CeladonDeptStore1F.asm
+++ b/maps/CeladonDeptStore1F.asm
@@ -4,20 +4,20 @@ const_value set 2
const CELADONDEPTSTORE1F_TEACHER
CeladonDeptStore1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-ReceptionistScript_0x709e0:
- jumptextfaceplayer UnknownText_0x709ef
+CeladonDeptStore1FReceptionistScript:
+ jumptextfaceplayer CeladonDeptStore1FReceptionistText
-GentlemanScript_0x709e3:
- jumptextfaceplayer UnknownText_0x70a35
+CeladonDeptStore1FGentlemanScript:
+ jumptextfaceplayer CeladonDeptStore1FGentlemanText
-TeacherScript_0x709e6:
- jumptextfaceplayer UnknownText_0x70aa9
+CeladonDeptStore1FTeacherScript:
+ jumptextfaceplayer CeladonDeptStore1FTeacherText
CeladonDeptStore1FDirectory:
jumptext CeladonDeptStore1FDirectoryText
@@ -25,7 +25,7 @@ CeladonDeptStore1FDirectory:
CeladonDeptStore1FElevatorButton:
jumpstd elevatorbutton
-UnknownText_0x709ef:
+CeladonDeptStore1FReceptionistText:
text "Hello! Welcome to"
line "CELADON DEPT."
cont "STORE!"
@@ -34,7 +34,7 @@ UnknownText_0x709ef:
line "on the wall."
done
-UnknownText_0x70a35:
+CeladonDeptStore1FGentlemanText:
text "This DEPT.STORE is"
line "part of the same"
@@ -46,7 +46,7 @@ UnknownText_0x70a35:
cont "same time."
done
-UnknownText_0x70aa9:
+CeladonDeptStore1FTeacherText:
text "This is my first"
line "time here."
@@ -84,16 +84,16 @@ CeladonDeptStore1F_MapEventHeader:
warp_def $0, $f, 2, CELADON_DEPT_STORE_2F
warp_def $0, $2, 1, CELADON_DEPT_STORE_ELEVATOR
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 14, SIGNPOST_READ, CeladonDeptStore1FDirectory
- signpost 0, 3, SIGNPOST_READ, CeladonDeptStore1FElevatorButton
+ bg_event 0, 14, BGEVENT_READ, CeladonDeptStore1FDirectory
+ bg_event 0, 3, BGEVENT_READ, CeladonDeptStore1FElevatorButton
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_RECEPTIONIST, 1, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ReceptionistScript_0x709e0, -1
- person_event SPRITE_GENTLEMAN, 4, 11, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x709e3, -1
- person_event SPRITE_TEACHER, 3, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TeacherScript_0x709e6, -1
+ object_event SPRITE_RECEPTIONIST, 1, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore1FReceptionistScript, -1
+ object_event SPRITE_GENTLEMAN, 4, 11, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore1FGentlemanScript, -1
+ object_event SPRITE_TEACHER, 3, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore1FTeacherScript, -1
diff --git a/maps/CeladonDeptStore2F.asm b/maps/CeladonDeptStore2F.asm
index cd93776ab..916b89efb 100644
--- a/maps/CeladonDeptStore2F.asm
+++ b/maps/CeladonDeptStore2F.asm
@@ -5,7 +5,7 @@ const_value set 2
const CELADONDEPTSTORE2F_YOUNGSTER
CeladonDeptStore2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -25,11 +25,11 @@ ClerkScript_0x70bb5:
closetext
end
-PokefanMScript_0x70bbd:
- jumptextfaceplayer UnknownText_0x70bc9
+CeladonDeptStore2FPokefanMScript:
+ jumptextfaceplayer CeladonDeptStore2FPokefanMText
-YoungsterScript_0x70bc0:
- jumptextfaceplayer UnknownText_0x70c3e
+CeladonDeptStore2FYoungsterScript:
+ jumptextfaceplayer CeladonDeptStore2FYoungsterText
CeladonDeptStore2FDirectory:
jumptext CeladonDeptStore2FDirectoryText
@@ -37,7 +37,7 @@ CeladonDeptStore2FDirectory:
CeladonDeptStore2FElevatorButton:
jumpstd elevatorbutton
-UnknownText_0x70bc9:
+CeladonDeptStore2FPokefanMText:
text "I just recently"
line "became a trainer."
@@ -49,7 +49,7 @@ UnknownText_0x70bc9:
cont "convenient items."
done
-UnknownText_0x70c3e:
+CeladonDeptStore2FYoungsterText:
text "My dad's having a"
line "hard time learning"
@@ -78,17 +78,17 @@ CeladonDeptStore2F_MapEventHeader:
warp_def $0, $f, 3, CELADON_DEPT_STORE_1F
warp_def $0, $2, 1, CELADON_DEPT_STORE_ELEVATOR
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 14, SIGNPOST_READ, CeladonDeptStore2FDirectory
- signpost 0, 3, SIGNPOST_READ, CeladonDeptStore2FElevatorButton
+ bg_event 0, 14, BGEVENT_READ, CeladonDeptStore2FDirectory
+ bg_event 0, 3, BGEVENT_READ, CeladonDeptStore2FElevatorButton
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_CLERK, 5, 13, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ClerkScript_0x70bad, -1
- person_event SPRITE_CLERK, 5, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ClerkScript_0x70bb5, -1
- person_event SPRITE_POKEFAN_M, 2, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x70bbd, -1
- person_event SPRITE_YOUNGSTER, 2, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x70bc0, -1
+ object_event SPRITE_CLERK, 5, 13, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x70bad, -1
+ object_event SPRITE_CLERK, 5, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x70bb5, -1
+ object_event SPRITE_POKEFAN_M, 2, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore2FPokefanMScript, -1
+ object_event SPRITE_YOUNGSTER, 2, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore2FYoungsterScript, -1
diff --git a/maps/CeladonDeptStore3F.asm b/maps/CeladonDeptStore3F.asm
index b40fddf50..38510ec1a 100644
--- a/maps/CeladonDeptStore3F.asm
+++ b/maps/CeladonDeptStore3F.asm
@@ -6,7 +6,7 @@ const_value set 2
const CELADONDEPTSTORE3F_SUPER_NERD
CeladonDeptStore3F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -19,29 +19,29 @@ ClerkScript_0x70d29:
closetext
end
-YoungsterScript_0x70d31:
- jumptextfaceplayer UnknownText_0x70d53
+CeladonDeptStore3FYoungsterScript:
+ jumptextfaceplayer CeladonDeptStore3FYoungsterText
-GameboyKidScript_0x70d34:
+CeladonDeptStore3FGameboyKid1Script:
faceplayer
opentext
- writetext UnknownText_0x70d86
+ writetext CeladonDeptStore3FGameboyKid1Text
waitbutton
closetext
spriteface CELADONDEPTSTORE3F_GAMEBOY_KID1, DOWN
end
-GameboyKidScript_0x70d3f:
+CeladonDeptStore3FGameboyKid2Script:
faceplayer
opentext
- writetext UnknownText_0x70dc7
+ writetext CeladonDeptStore3FGameboyKid2Text
waitbutton
closetext
spriteface CELADONDEPTSTORE3F_GAMEBOY_KID2, DOWN
end
-SuperNerdScript_0x70d4a:
- jumptextfaceplayer UnknownText_0x70e61
+CeladonDeptStore3FSuperNerdScript:
+ jumptextfaceplayer CeladonDeptStore3FSuperNerdText
CeladonDeptStore3FElevatorButton:
jumpstd elevatorbutton
@@ -49,7 +49,7 @@ CeladonDeptStore3FElevatorButton:
CeladonDeptStore3FDirectory:
jumptext CeladonDeptStore3FDirectoryText
-UnknownText_0x70d53:
+CeladonDeptStore3FYoungsterText:
text "I can't decide"
line "which #MON I"
@@ -57,7 +57,7 @@ UnknownText_0x70d53:
line "on…"
done
-UnknownText_0x70d86:
+CeladonDeptStore3FGameboyKid1Text:
text "Uh-oh! I traded my"
line "#MON without"
@@ -65,7 +65,7 @@ UnknownText_0x70d86:
line "GRADE from it."
done
-UnknownText_0x70dc7:
+CeladonDeptStore3FGameboyKid2Text:
text "Yeah! I'm finally"
line "getting a PORYGON!"
@@ -82,7 +82,7 @@ UnknownText_0x70dc7:
cont "ferent #MON!"
done
-UnknownText_0x70e61:
+CeladonDeptStore3FSuperNerdText:
text "The TM SHOP sells"
line "some rare moves."
done
@@ -104,18 +104,18 @@ CeladonDeptStore3F_MapEventHeader:
warp_def $0, $f, 2, CELADON_DEPT_STORE_4F
warp_def $0, $2, 1, CELADON_DEPT_STORE_ELEVATOR
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 14, SIGNPOST_READ, CeladonDeptStore3FDirectory
- signpost 0, 3, SIGNPOST_READ, CeladonDeptStore3FElevatorButton
+ bg_event 0, 14, BGEVENT_READ, CeladonDeptStore3FDirectory
+ bg_event 0, 3, BGEVENT_READ, CeladonDeptStore3FElevatorButton
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_CLERK, 1, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ClerkScript_0x70d29, -1
- person_event SPRITE_YOUNGSTER, 4, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x70d31, -1
- person_event SPRITE_GAMEBOY_KID, 1, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GameboyKidScript_0x70d34, -1
- person_event SPRITE_GAMEBOY_KID, 1, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GameboyKidScript_0x70d3f, -1
- person_event SPRITE_SUPER_NERD, 4, 13, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x70d4a, -1
+ object_event SPRITE_CLERK, 1, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x70d29, -1
+ object_event SPRITE_YOUNGSTER, 4, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore3FYoungsterScript, -1
+ object_event SPRITE_GAMEBOY_KID, 1, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore3FGameboyKid1Script, -1
+ object_event SPRITE_GAMEBOY_KID, 1, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore3FGameboyKid2Script, -1
+ object_event SPRITE_SUPER_NERD, 4, 13, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore3FSuperNerdScript, -1
diff --git a/maps/CeladonDeptStore4F.asm b/maps/CeladonDeptStore4F.asm
index b3cb00655..fe3942113 100644
--- a/maps/CeladonDeptStore4F.asm
+++ b/maps/CeladonDeptStore4F.asm
@@ -4,7 +4,7 @@ const_value set 2
const CELADONDEPTSTORE4F_YOUNGSTER
CeladonDeptStore4F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -17,11 +17,11 @@ ClerkScript_0x70f0d:
closetext
end
-SuperNerdScript_0x70f15:
- jumptextfaceplayer UnknownText_0x70f21
+CeladonDeptStore4FSuperNerdScript:
+ jumptextfaceplayer CeladonDeptStore4FSuperNerdText
-YoungsterScript_0x70f18:
- jumptextfaceplayer UnknownText_0x70f55
+CeladonDeptStore4FYoungsterScript:
+ jumptextfaceplayer CeladonDeptStore4FYoungsterText
CeladonDeptStore4FDirectory:
jumptext CeladonDeptStore4FDirectoryText
@@ -29,13 +29,13 @@ CeladonDeptStore4FDirectory:
CeladonDeptStore4FElevatorButton:
jumpstd elevatorbutton
-UnknownText_0x70f21:
+CeladonDeptStore4FSuperNerdText:
text "I'm here to buy"
line "SURF MAIL to send"
cont "to my girlfriend."
done
-UnknownText_0x70f55:
+CeladonDeptStore4FYoungsterText:
text "This is the only"
line "place where you"
@@ -60,16 +60,16 @@ CeladonDeptStore4F_MapEventHeader:
warp_def $0, $f, 2, CELADON_DEPT_STORE_3F
warp_def $0, $2, 1, CELADON_DEPT_STORE_ELEVATOR
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 14, SIGNPOST_READ, CeladonDeptStore4FDirectory
- signpost 0, 3, SIGNPOST_READ, CeladonDeptStore4FElevatorButton
+ bg_event 0, 14, BGEVENT_READ, CeladonDeptStore4FDirectory
+ bg_event 0, 3, BGEVENT_READ, CeladonDeptStore4FElevatorButton
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 5, 13, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ClerkScript_0x70f0d, -1
- person_event SPRITE_SUPER_NERD, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x70f15, -1
- person_event SPRITE_YOUNGSTER, 2, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x70f18, -1
+ object_event SPRITE_CLERK, 5, 13, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x70f0d, -1
+ object_event SPRITE_SUPER_NERD, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore4FSuperNerdScript, -1
+ object_event SPRITE_YOUNGSTER, 2, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore4FYoungsterScript, -1
diff --git a/maps/CeladonDeptStore5F.asm b/maps/CeladonDeptStore5F.asm
index a49c573d1..eda2ec693 100644
--- a/maps/CeladonDeptStore5F.asm
+++ b/maps/CeladonDeptStore5F.asm
@@ -6,7 +6,7 @@ const_value set 2
const CELADONDEPTSTORE5F_TEACHER
CeladonDeptStore5F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -26,14 +26,14 @@ ClerkScript_0x7100c:
closetext
end
-GentlemanScript_0x71014:
- jumptextfaceplayer UnknownText_0x71023
+CeladonDeptStore5FGentlemanScript:
+ jumptextfaceplayer CeladonDeptStore5FGentlemanText
-SailorScript_0x71017:
- jumptextfaceplayer UnknownText_0x71072
+CeladonDeptStore5FSailorScript:
+ jumptextfaceplayer CeladonDeptStore5FSailorText
-TeacherScript_0x7101a:
- jumptextfaceplayer UnknownText_0x710b6
+CeladonDeptStore5FTeacherScript:
+ jumptextfaceplayer CeladonDeptStore5FTeacherText
CeladonDeptStore5FDirectory:
jumptext CeladonDeptStore5FDirectoryText
@@ -41,7 +41,7 @@ CeladonDeptStore5FDirectory:
CeladonDeptStore5FElevatorButton:
jumpstd elevatorbutton
-UnknownText_0x71023:
+CeladonDeptStore5FGentlemanText:
text "I want to buy some"
line "items that raise"
@@ -50,7 +50,7 @@ UnknownText_0x71023:
cont "enough money…"
done
-UnknownText_0x71072:
+CeladonDeptStore5FSailorText:
text "I want PP UP, so I"
line "can raise the PP"
@@ -58,7 +58,7 @@ UnknownText_0x71072:
line "can't buy it…"
done
-UnknownText_0x710b6:
+CeladonDeptStore5FTeacherText:
text "Using items on"
line "them makes #-"
cont "MON happy."
@@ -81,18 +81,18 @@ CeladonDeptStore5F_MapEventHeader:
warp_def $0, $f, 1, CELADON_DEPT_STORE_6F
warp_def $0, $2, 1, CELADON_DEPT_STORE_ELEVATOR
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 14, SIGNPOST_READ, CeladonDeptStore5FDirectory
- signpost 0, 3, SIGNPOST_READ, CeladonDeptStore5FElevatorButton
+ bg_event 0, 14, BGEVENT_READ, CeladonDeptStore5FDirectory
+ bg_event 0, 3, BGEVENT_READ, CeladonDeptStore5FElevatorButton
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_CLERK, 5, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ClerkScript_0x71004, -1
- person_event SPRITE_CLERK, 5, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ClerkScript_0x7100c, -1
- person_event SPRITE_GENTLEMAN, 5, 13, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x71014, -1
- person_event SPRITE_SAILOR, 4, 3, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SailorScript_0x71017, -1
- person_event SPRITE_TEACHER, 7, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TeacherScript_0x7101a, -1
+ object_event SPRITE_CLERK, 5, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x71004, -1
+ object_event SPRITE_CLERK, 5, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x7100c, -1
+ object_event SPRITE_GENTLEMAN, 5, 13, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore5FGentlemanScript, -1
+ object_event SPRITE_SAILOR, 4, 3, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore5FSailorScript, -1
+ object_event SPRITE_TEACHER, 7, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore5FTeacherScript, -1
diff --git a/maps/CeladonDeptStore6F.asm b/maps/CeladonDeptStore6F.asm
index a82e45f11..256b8541f 100644
--- a/maps/CeladonDeptStore6F.asm
+++ b/maps/CeladonDeptStore6F.asm
@@ -3,27 +3,24 @@ const_value set 2
const CELADONDEPTSTORE6F_YOUNGSTER
CeladonDeptStore6F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_TILES, .Callback
.Callback:
changeblock $c, $0, $3
return
-SuperNerdScript_0x7117a:
- jumptextfaceplayer UnknownText_0x712c7
+CeladonDeptStore6FSuperNerdScript:
+ jumptextfaceplayer CeladonDeptStore6FSuperNerdText
-YoungsterScript_0x7117d:
- jumptextfaceplayer UnknownText_0x71310
+CeladonDeptStore6FYoungsterScript:
+ jumptextfaceplayer CeladonDeptStore6FYoungsterText
-CeladonVendingMachine:
+CeladonDeptStore6FVendingMachine:
opentext
writetext CeladonVendingText
.Start:
@@ -101,7 +98,8 @@ CeladonVendingMachine:
CeladonDeptStore6FDirectory:
jumptext CeladonDeptStore6FDirectoryText
-UnknownScript_0x7124d:
+; unused
+CeladonDeptStore6FElevatorButton:
jumpstd elevatorbutton
CeladonVendingText:
@@ -128,7 +126,7 @@ CeladonVendingNoSpaceText:
line "room for stuff…"
done
-UnknownText_0x712c7:
+CeladonDeptStore6FSuperNerdText:
text "A vending machine"
line "with a prize rou-"
cont "lette…"
@@ -137,7 +135,7 @@ UnknownText_0x712c7:
line "those anymore."
done
-UnknownText_0x71310:
+CeladonDeptStore6FYoungsterText:
text "Aww! There's no"
line "games here!"
@@ -158,19 +156,19 @@ CeladonDeptStore6F_MapEventHeader:
warp_def $0, $f, 2, CELADON_DEPT_STORE_5F
warp_def $0, $2, 1, CELADON_DEPT_STORE_ELEVATOR
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 6
- signpost 0, 14, SIGNPOST_READ, CeladonDeptStore6FDirectory
- signpost 0, 3, SIGNPOST_READ, CeladonDeptStore1FElevatorButton
- signpost 1, 8, SIGNPOST_UP, CeladonVendingMachine
- signpost 1, 9, SIGNPOST_UP, CeladonVendingMachine
- signpost 1, 10, SIGNPOST_UP, CeladonVendingMachine
- signpost 1, 11, SIGNPOST_UP, CeladonVendingMachine
-
-.PersonEvents:
+ bg_event 0, 14, BGEVENT_READ, CeladonDeptStore6FDirectory
+ bg_event 0, 3, BGEVENT_READ, CeladonDeptStore1FElevatorButton
+ bg_event 1, 8, BGEVENT_UP, CeladonDeptStore6FVendingMachine
+ bg_event 1, 9, BGEVENT_UP, CeladonDeptStore6FVendingMachine
+ bg_event 1, 10, BGEVENT_UP, CeladonDeptStore6FVendingMachine
+ bg_event 1, 11, BGEVENT_UP, CeladonDeptStore6FVendingMachine
+
+.ObjectEvents:
db 2
- person_event SPRITE_SUPER_NERD, 2, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x7117a, -1
- person_event SPRITE_YOUNGSTER, 5, 12, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x7117d, -1
+ object_event SPRITE_SUPER_NERD, 2, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore6FSuperNerdScript, -1
+ object_event SPRITE_YOUNGSTER, 5, 12, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore6FYoungsterScript, -1
diff --git a/maps/CeladonDeptStoreElevator.asm b/maps/CeladonDeptStoreElevator.asm
index 47c20b9b3..44c37ae9f 100644
--- a/maps/CeladonDeptStoreElevator.asm
+++ b/maps/CeladonDeptStoreElevator.asm
@@ -1,49 +1,47 @@
CeladonDeptStoreElevator_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-MapCeladonDeptStoreElevatorSignpost0Script:
+CeladonDeptStoreElevatorScript:
opentext
- elevator Elevator_0x713be
+ elevator CeladonDeptStoreElevatorData
closetext
- iffalse UnknownScript_0x713bd
+ iffalse .Done
pause 5
playsound SFX_ELEVATOR
earthquake 60
waitsfx
-UnknownScript_0x713bd:
+.Done:
end
-
-Elevator_0x713be:
+CeladonDeptStoreElevatorData:
db 6 ; floors
- elevfloor _1F, 4, CELADON_DEPT_STORE_1F
- elevfloor _2F, 3, CELADON_DEPT_STORE_2F
- elevfloor _3F, 3, CELADON_DEPT_STORE_3F
- elevfloor _4F, 3, CELADON_DEPT_STORE_4F
- elevfloor _5F, 3, CELADON_DEPT_STORE_5F
- elevfloor _6F, 2, CELADON_DEPT_STORE_6F
+ elevfloor FLOOR_1F, 4, CELADON_DEPT_STORE_1F
+ elevfloor FLOOR_2F, 3, CELADON_DEPT_STORE_2F
+ elevfloor FLOOR_3F, 3, CELADON_DEPT_STORE_3F
+ elevfloor FLOOR_4F, 3, CELADON_DEPT_STORE_4F
+ elevfloor FLOOR_5F, 3, CELADON_DEPT_STORE_5F
+ elevfloor FLOOR_6F, 2, CELADON_DEPT_STORE_6F
db $ff ; end
-
CeladonDeptStoreElevator_MapEventHeader:
; filler
db 0, 0
.Warps:
db 2
- warp_def $3, $1, 255, CELADON_DEPT_STORE_1F
- warp_def $3, $2, 255, CELADON_DEPT_STORE_1F
+ warp_def $3, $1, -1, CELADON_DEPT_STORE_1F
+ warp_def $3, $2, -1, CELADON_DEPT_STORE_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 0, 3, SIGNPOST_READ, MapCeladonDeptStoreElevatorSignpost0Script
+ bg_event 0, 3, BGEVENT_READ, CeladonDeptStoreElevatorScript
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/CeladonGameCorner.asm b/maps/CeladonGameCorner.asm
index b44c66dcc..d5e17050b 100644
--- a/maps/CeladonGameCorner.asm
+++ b/maps/CeladonGameCorner.asm
@@ -10,83 +10,83 @@ const_value set 2
const CELADONGAMECORNER_GRAMPS
CeladonGameCorner_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-ClerkScript_0x7211d:
+CeladonGameCornerClerkScript:
jumpstd gamecornercoinvendor
-ReceptionistScript_0x72120:
- jumptextfaceplayer UnknownText_0x721d0
+CeladonGameCornerReceptionistScript:
+ jumptextfaceplayer CeladonGameCornerReceptionistText
-PokefanMScript_0x72123:
+CeladonGameCornerPokefanMScript:
faceplayer
opentext
- writetext UnknownText_0x72215
+ writetext CeladonGameCornerPokefanMText
waitbutton
closetext
spriteface CELADONGAMECORNER_POKEFAN_M, LEFT
end
-TeacherScript_0x7212e:
+CeladonGameCornerTeacherScript:
faceplayer
opentext
- writetext UnknownText_0x72242
+ writetext CeladonGameCornerTeacherText
waitbutton
closetext
spriteface CELADONGAMECORNER_TEACHER, RIGHT
end
-FishingGuruScript_0x72139:
+CeladonGameCornerFishingGuruScript:
faceplayer
opentext
- writetext UnknownText_0x72295
+ writetext CeladonGameCornerFishingGuruText
waitbutton
closetext
spriteface CELADONGAMECORNER_FISHING_GURU, RIGHT
end
-FisherScript_0x72144:
+CeladonGameCornerFisherScript:
faceplayer
opentext
checkevent EVENT_GOT_COINS_FROM_GAMBLER_AT_CELADON
- iftrue .UnknownScript_0x72169
- writetext UnknownText_0x722dc
+ iftrue .GotCoins
+ writetext CeladonGameCornerFisherText1
buttonsound
checkitem COIN_CASE
- iffalse UnknownScript_0x7217b
- checkcoins 9998
- if_equal $0, UnknownScript_0x72184
+ iffalse .NoCoinCase
+ checkcoins MAX_COINS - 1
+ if_equal $0, .FullCoinCase
stringtotext .coinname, $1
- scall .UnknownScript_0x72172
+ scall .GiveCoins
givecoins 18
setevent EVENT_GOT_COINS_FROM_GAMBLER_AT_CELADON
-.UnknownScript_0x72169:
- writetext UnknownText_0x72345
+.GotCoins:
+ writetext CeladonGameCornerFisherText2
waitbutton
closetext
spriteface LAST_TALKED, LEFT
end
-.UnknownScript_0x72172:
+.GiveCoins:
jumpstd receiveitem
end
.coinname
db "COIN@"
-UnknownScript_0x7217b:
- writetext UnknownText_0x7238a
+.NoCoinCase:
+ writetext CeladonGameCornerFisherNoCoinCaseText
waitbutton
closetext
spriteface LAST_TALKED, LEFT
end
-UnknownScript_0x72184:
- writetext UnknownText_0x723d9
+.FullCoinCase:
+ writetext CeladonGameCornerFisherFullCoinCaseText
waitbutton
closetext
spriteface LAST_TALKED, LEFT
@@ -95,45 +95,45 @@ UnknownScript_0x72184:
CeladonGymGuyScript:
jumptextfaceplayer CeladonGymGuyText
-GrampsScript_0x72190:
+CeladonGameCornerGrampsScript:
faceplayer
opentext
- writetext UnknownText_0x724ad
+ writetext CeladonGameCornerGrampsText
waitbutton
closetext
spriteface CELADONGAMECORNER_GRAMPS, LEFT
end
-MapCeladonGameCornerSignpost36Script:
- jumptext UnknownText_0x724f3
+CeladonGameCornerPoster1Script:
+ jumptext CeladonGameCornerPoster1Text
-MapCeladonGameCornerSignpost37Script:
- jumptext UnknownText_0x72521
+CeladonGameCornerPoster2Script:
+ jumptext CeladonGameCornerPoster2Text
-MapCeladonGameCornerSignpost35Script:
+CeladonGameCornerLuckySlotMachineScript:
random $6
- if_equal $0, MapCeladonGameCornerSignpost16Script
+ if_equal $0, CeladonGameCornerSlotMachineScript
refreshscreen $0
writebyte $0
special Special_SlotMachine
closetext
end
-MapCeladonGameCornerSignpost16Script:
+CeladonGameCornerSlotMachineScript:
refreshscreen $0
writebyte $1
special Special_SlotMachine
closetext
end
-MapCeladonGameCornerSignpost11Script:
+CeladonGameCornerCardFlipScript:
refreshscreen $0
special Special_CardFlip
closetext
end
-MapCeladonGameCornerSignpost32Script:
- jumptext UnknownText_0x7254f
+CeladonGameCornerLighterScript:
+ jumptext CeladonGameCornerLighterText
MapCeladonGameCornerSignpost9Script:
opentext
@@ -149,7 +149,7 @@ MovementData_0x721cd:
turn_head LEFT
step_end
-UnknownText_0x721d0:
+CeladonGameCornerReceptionistText:
text "Welcome!"
para "You may exchange"
@@ -159,13 +159,13 @@ UnknownText_0x721d0:
line "next door."
done
-UnknownText_0x72215:
+CeladonGameCornerPokefanMText:
text "The slot machines"
line "are all state of"
cont "the art."
done
-UnknownText_0x72242:
+CeladonGameCornerTeacherText:
text "It's this machine"
line "I want."
@@ -176,7 +176,7 @@ UnknownText_0x72242:
line "today."
done
-UnknownText_0x72295:
+CeladonGameCornerFishingGuruText:
text "I think this slot"
line "machine will pay"
cont "out…"
@@ -185,7 +185,7 @@ UnknownText_0x72295:
line "among machines."
done
-UnknownText_0x722dc:
+CeladonGameCornerFisherText1:
text "Gahahaha!"
para "The coins just"
@@ -198,7 +198,7 @@ UnknownText_0x722dc:
line "with you!"
done
-UnknownText_0x72345:
+CeladonGameCornerFisherText2:
text "Gahahaha!"
para "It makes me feel"
@@ -208,7 +208,7 @@ UnknownText_0x72345:
line "people!"
done
-UnknownText_0x7238a:
+CeladonGameCornerFisherNoCoinCaseText:
text "Hey, you don't"
line "have a COIN CASE."
@@ -217,7 +217,7 @@ UnknownText_0x7238a:
cont "coins, kid?"
done
-UnknownText_0x723d9:
+CeladonGameCornerFisherFullCoinCaseText:
text "Hey, your COIN"
line "CASE is full, kid."
@@ -241,7 +241,7 @@ CeladonGymGuyText:
line "enough coins yet…"
done
-UnknownText_0x724ad:
+CeladonGameCornerGrampsText:
text "Hmmm… The odds are"
line "surely better for"
@@ -249,7 +249,7 @@ UnknownText_0x724ad:
line "but… What to do?"
done
-UnknownText_0x724f3:
+CeladonGameCornerPoster1Text:
text "Hey!"
para "Underneath this"
@@ -258,7 +258,7 @@ UnknownText_0x724f3:
para "There's nothing!"
done
-UnknownText_0x72521:
+CeladonGameCornerPoster2Text:
text "Hey!"
para "Underneath this"
@@ -267,7 +267,7 @@ UnknownText_0x72521:
para "There's nothing!"
done
-UnknownText_0x7254f:
+CeladonGameCornerLighterText:
text "There's a lighter"
line "here."
done
@@ -290,58 +290,58 @@ CeladonGameCorner_MapEventHeader:
warp_def $d, $e, 6, CELADON_CITY
warp_def $d, $f, 6, CELADON_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 38
- signpost 6, 1, SIGNPOST_READ, MapCeladonGameCornerSignpost11Script
- signpost 7, 1, SIGNPOST_READ, MapCeladonGameCornerSignpost11Script
- signpost 8, 1, SIGNPOST_READ, MapCeladonGameCornerSignpost11Script
- signpost 9, 1, SIGNPOST_READ, MapCeladonGameCornerSignpost11Script
- signpost 10, 1, SIGNPOST_READ, MapCeladonGameCornerSignpost11Script
- signpost 11, 1, SIGNPOST_LEFT, MapCeladonGameCornerSignpost11Script
- signpost 6, 6, SIGNPOST_READ, MapCeladonGameCornerSignpost11Script
- signpost 7, 6, SIGNPOST_READ, MapCeladonGameCornerSignpost11Script
- signpost 8, 6, SIGNPOST_READ, MapCeladonGameCornerSignpost11Script
- signpost 9, 6, SIGNPOST_READ, MapCeladonGameCornerSignpost9Script
- signpost 10, 6, SIGNPOST_READ, MapCeladonGameCornerSignpost11Script
- signpost 11, 6, SIGNPOST_RIGHT, MapCeladonGameCornerSignpost11Script
- signpost 6, 7, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 7, 7, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 8, 7, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 9, 7, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 10, 7, SIGNPOST_READ, MapCeladonGameCornerSignpost16Script
- signpost 11, 7, SIGNPOST_LEFT, MapCeladonGameCornerSignpost35Script
- signpost 6, 12, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 7, 12, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 8, 12, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 9, 12, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 10, 12, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 11, 12, SIGNPOST_RIGHT, MapCeladonGameCornerSignpost35Script
- signpost 6, 13, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 7, 13, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 8, 13, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 9, 13, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 10, 13, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 11, 13, SIGNPOST_LEFT, MapCeladonGameCornerSignpost35Script
- signpost 6, 18, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 7, 18, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 8, 18, SIGNPOST_READ, MapCeladonGameCornerSignpost32Script
- signpost 9, 18, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 10, 18, SIGNPOST_READ, MapCeladonGameCornerSignpost35Script
- signpost 11, 18, SIGNPOST_RIGHT, MapCeladonGameCornerSignpost35Script
- signpost 0, 15, SIGNPOST_READ, MapCeladonGameCornerSignpost36Script
- signpost 0, 9, SIGNPOST_READ, MapCeladonGameCornerSignpost37Script
-
-.PersonEvents:
+ bg_event 6, 1, BGEVENT_READ, CeladonGameCornerCardFlipScript
+ bg_event 7, 1, BGEVENT_READ, CeladonGameCornerCardFlipScript
+ bg_event 8, 1, BGEVENT_READ, CeladonGameCornerCardFlipScript
+ bg_event 9, 1, BGEVENT_READ, CeladonGameCornerCardFlipScript
+ bg_event 10, 1, BGEVENT_READ, CeladonGameCornerCardFlipScript
+ bg_event 11, 1, BGEVENT_LEFT, CeladonGameCornerCardFlipScript
+ bg_event 6, 6, BGEVENT_READ, CeladonGameCornerCardFlipScript
+ bg_event 7, 6, BGEVENT_READ, CeladonGameCornerCardFlipScript
+ bg_event 8, 6, BGEVENT_READ, CeladonGameCornerCardFlipScript
+ bg_event 9, 6, BGEVENT_READ, MapCeladonGameCornerSignpost9Script
+ bg_event 10, 6, BGEVENT_READ, CeladonGameCornerCardFlipScript
+ bg_event 11, 6, BGEVENT_RIGHT, CeladonGameCornerCardFlipScript
+ bg_event 6, 7, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 7, 7, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 8, 7, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 9, 7, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 10, 7, BGEVENT_READ, CeladonGameCornerSlotMachineScript
+ bg_event 11, 7, BGEVENT_LEFT, CeladonGameCornerLuckySlotMachineScript
+ bg_event 6, 12, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 7, 12, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 8, 12, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 9, 12, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 10, 12, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 11, 12, BGEVENT_RIGHT, CeladonGameCornerLuckySlotMachineScript
+ bg_event 6, 13, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 7, 13, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 8, 13, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 9, 13, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 10, 13, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 11, 13, BGEVENT_LEFT, CeladonGameCornerLuckySlotMachineScript
+ bg_event 6, 18, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 7, 18, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 8, 18, BGEVENT_READ, CeladonGameCornerLighterScript
+ bg_event 9, 18, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 10, 18, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript
+ bg_event 11, 18, BGEVENT_RIGHT, CeladonGameCornerLuckySlotMachineScript
+ bg_event 0, 15, BGEVENT_READ, CeladonGameCornerPoster1Script
+ bg_event 0, 9, BGEVENT_READ, CeladonGameCornerPoster2Script
+
+.ObjectEvents:
db 9
- person_event SPRITE_CLERK, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ClerkScript_0x7211d, -1
- person_event SPRITE_RECEPTIONIST, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ReceptionistScript_0x72120, -1
- person_event SPRITE_POKEFAN_M, 10, 14, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x72123, -1
- person_event SPRITE_TEACHER, 7, 17, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, TeacherScript_0x7212e, -1
- person_event SPRITE_FISHING_GURU, 7, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FishingGuruScript_0x72139, -1
- person_event SPRITE_FISHER, 10, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, 2, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, FisherScript_0x72144, -1
- person_event SPRITE_FISHER, 10, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, 4, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, FisherScript_0x72144, -1
- person_event SPRITE_GYM_GUY, 3, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CeladonGymGuyScript, -1
- person_event SPRITE_GRAMPS, 8, 2, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, GrampsScript_0x72190, -1
+ object_event SPRITE_CLERK, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerClerkScript, -1
+ object_event SPRITE_RECEPTIONIST, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerReceptionistScript, -1
+ object_event SPRITE_POKEFAN_M, 10, 14, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerPokefanMScript, -1
+ object_event SPRITE_TEACHER, 7, 17, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerTeacherScript, -1
+ object_event SPRITE_FISHING_GURU, 7, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerFishingGuruScript, -1
+ object_event SPRITE_FISHER, 10, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, DAY, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerFisherScript, -1
+ object_event SPRITE_FISHER, 10, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, NITE, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerFisherScript, -1
+ object_event SPRITE_GYM_GUY, 3, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonGymGuyScript, -1
+ object_event SPRITE_GRAMPS, 8, 2, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerGrampsScript, -1
diff --git a/maps/CeladonGameCornerPrizeRoom.asm b/maps/CeladonGameCornerPrizeRoom.asm
index 4dd5de28b..d40f3eecc 100644
--- a/maps/CeladonGameCornerPrizeRoom.asm
+++ b/maps/CeladonGameCornerPrizeRoom.asm
@@ -3,7 +3,7 @@ const_value set 2
const CELADONGAMECORNERPRIZEROOM_PHARMACIST
CeladonGameCornerPrizeRoom_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -47,10 +47,10 @@ CeladonPrizeRoom_tmcounterloop:
.psychic
checkcoins 3500
if_equal $2, CeladonPrizeRoom_notenoughcoins
- itemtotext TM_PSYCHIC, $0
+ itemtotext TM_PSYCHIC_M, $0
scall CeladonPrizeRoom_askbuy
iffalse CeladonPrizeRoom_cancel
- giveitem TM_PSYCHIC
+ giveitem TM_PSYCHIC_M
iffalse CeladonPrizeRoom_notenoughroom
takecoins 3500
jump CeladonPrizeRoom_purchased
@@ -278,15 +278,15 @@ CeladonGameCornerPrizeRoom_MapEventHeader:
warp_def $5, $2, 7, CELADON_CITY
warp_def $5, $3, 7, CELADON_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 2, SIGNPOST_READ, GoldenrodGameCornerTMVendor
- signpost 1, 4, SIGNPOST_READ, GoldenrodGameCornerPokemonVendor
+ bg_event 1, 2, BGEVENT_READ, GoldenrodGameCornerTMVendor
+ bg_event 1, 4, BGEVENT_READ, GoldenrodGameCornerPokemonVendor
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_GENTLEMAN, 2, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CeladonGameCornerPrizeRoomGentlemanScript, -1
- person_event SPRITE_PHARMACIST, 4, 4, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CeladonGameCornerPrizeRoomPharmacistScript, -1
+ object_event SPRITE_GENTLEMAN, 2, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerPrizeRoomGentlemanScript, -1
+ object_event SPRITE_PHARMACIST, 4, 4, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerPrizeRoomPharmacistScript, -1
diff --git a/maps/CeladonGym.asm b/maps/CeladonGym.asm
index 411d109f7..4cff86dfc 100644
--- a/maps/CeladonGym.asm
+++ b/maps/CeladonGym.asm
@@ -7,7 +7,7 @@ const_value set 2
const CELADONGYM_TWIN2
CeladonGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -50,56 +50,56 @@ UnknownScript_0x72aae:
end
TrainerLassMichelle:
- trainer EVENT_BEAT_LASS_MICHELLE, LASS, MICHELLE, LassMichelleSeenText, LassMichelleBeatenText, 0, LassMichelleScript
+ trainer EVENT_BEAT_LASS_MICHELLE, LASS, MICHELLE, LassMichelleSeenText, LassMichelleBeatenText, 0, .Script
-LassMichelleScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x72e30
+ writetext LassMichelleAfterBattleText
waitbutton
closetext
end
TrainerPicnickerTanya:
- trainer EVENT_BEAT_PICNICKER_TANYA, PICNICKER, TANYA, PicnickerTanyaSeenText, PicnickerTanyaBeatenText, 0, PicnickerTanyaScript
+ trainer EVENT_BEAT_PICNICKER_TANYA, PICNICKER, TANYA, PicnickerTanyaSeenText, PicnickerTanyaBeatenText, 0, .Script
-PicnickerTanyaScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x72e8e
+ writetext PicnickerTanyaAfterBattleText
waitbutton
closetext
end
TrainerBeautyJulia:
- trainer EVENT_BEAT_BEAUTY_JULIA, BEAUTY, JULIA, BeautyJuliaSeenText, BeautyJuliaBeatenText, 0, BeautyJuliaScript
+ trainer EVENT_BEAT_BEAUTY_JULIA, BEAUTY, JULIA, BeautyJuliaSeenText, BeautyJuliaBeatenText, 0, .Script
-BeautyJuliaScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x72f01
+ writetext BeautyJuliaAfterBattleText
waitbutton
closetext
end
TrainerTwinsJoandzoe1:
- trainer EVENT_BEAT_TWINS_JO_AND_ZOE, TWINS, JOANDZOE1, TwinsJoandzoe1SeenText, TwinsJoandzoe1BeatenText, 0, TwinsJoandzoe1Script
+ trainer EVENT_BEAT_TWINS_JO_AND_ZOE, TWINS, JOANDZOE1, TwinsJoandzoe1SeenText, TwinsJoandzoe1BeatenText, 0, .Script
-TwinsJoandzoe1Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x72f70
+ writetext TwinsJoandzoe1AfterBattleText
waitbutton
closetext
end
TrainerTwinsJoandzoe2:
- trainer EVENT_BEAT_TWINS_JO_AND_ZOE, TWINS, JOANDZOE2, TwinsJoandzoe2SeenText, TwinsJoandzoe2BeatenText, 0, TwinsJoandzoe2Script
+ trainer EVENT_BEAT_TWINS_JO_AND_ZOE, TWINS, JOANDZOE2, TwinsJoandzoe2SeenText, TwinsJoandzoe2BeatenText, 0, .Script
-TwinsJoandzoe2Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x72fc0
+ writetext TwinsJoandzoe2AfterBattleText
waitbutton
closetext
end
@@ -199,7 +199,7 @@ LassMichelleBeatenText:
text "Oh, bleah!"
done
-UnknownText_0x72e30:
+LassMichelleAfterBattleText:
text "I just got care-"
line "less, that's all!"
done
@@ -214,7 +214,7 @@ PicnickerTanyaBeatenText:
text "Oh, that's it?"
done
-UnknownText_0x72e8e:
+PicnickerTanyaAfterBattleText:
text "Oh, look at all"
line "your BADGES. No"
@@ -232,7 +232,7 @@ BeautyJuliaBeatenText:
text "How annoying!"
done
-UnknownText_0x72f01:
+BeautyJuliaAfterBattleText:
text "How do I go about"
line "becoming ladylike"
cont "like ERIKA?"
@@ -248,7 +248,7 @@ TwinsJoandzoe1BeatenText:
text "Oh… We lost…"
done
-UnknownText_0x72f70:
+TwinsJoandzoe1AfterBattleText:
text "ERIKA will get you"
line "back for us!"
done
@@ -262,7 +262,7 @@ TwinsJoandzoe2BeatenText:
text "We couldn't win…"
done
-UnknownText_0x72fc0:
+TwinsJoandzoe2AfterBattleText:
text "ERIKA is much,"
line "much stronger!"
done
@@ -276,19 +276,19 @@ CeladonGym_MapEventHeader:
warp_def $11, $4, 8, CELADON_CITY
warp_def $11, $5, 8, CELADON_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 15, 3, SIGNPOST_READ, CeladonGymStatue
- signpost 15, 6, SIGNPOST_READ, CeladonGymStatue
+ bg_event 15, 3, BGEVENT_READ, CeladonGymStatue
+ bg_event 15, 6, BGEVENT_READ, CeladonGymStatue
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_ERIKA, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ErikaScript_0x72a6a, -1
- person_event SPRITE_LASS, 8, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, TrainerLassMichelle, -1
- person_event SPRITE_LASS, 8, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 2, TrainerPicnickerTanya, -1
- person_event SPRITE_BUENA, 5, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, TrainerBeautyJulia, -1
- person_event SPRITE_TWIN, 10, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerTwinsJoandzoe1, -1
- person_event SPRITE_TWIN, 10, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerTwinsJoandzoe2, -1
+ object_event SPRITE_ERIKA, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ErikaScript_0x72a6a, -1
+ object_event SPRITE_LASS, 8, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerLassMichelle, -1
+ object_event SPRITE_LASS, 8, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerPicnickerTanya, -1
+ object_event SPRITE_BUENA, 5, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerBeautyJulia, -1
+ object_event SPRITE_TWIN, 10, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsJoandzoe1, -1
+ object_event SPRITE_TWIN, 10, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsJoandzoe2, -1
diff --git a/maps/CeladonMansion1F.asm b/maps/CeladonMansion1F.asm
index e06fe71cc..452ba96e8 100644
--- a/maps/CeladonMansion1F.asm
+++ b/maps/CeladonMansion1F.asm
@@ -5,7 +5,7 @@ const_value set 2
const CELADONMANSION1F_GROWLITHE2
CeladonMansion1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -86,18 +86,18 @@ CeladonMansion1F_MapEventHeader:
warp_def $0, $0, 1, CELADON_MANSION_2F
warp_def $0, $7, 4, CELADON_MANSION_2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 8, 5, SIGNPOST_UP, CeladonMansionManagersSuiteSign
- signpost 3, 0, SIGNPOST_READ, CeladonMansion1fBookshelf
- signpost 3, 2, SIGNPOST_READ, CeladonMansion1fBookshelf
+ bg_event 8, 5, BGEVENT_UP, CeladonMansionManagersSuiteSign
+ bg_event 3, 0, BGEVENT_READ, CeladonMansion1fBookshelf
+ bg_event 3, 2, BGEVENT_READ, CeladonMansion1fBookshelf
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_GRANNY, 5, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CeladonMansionManager, -1
- person_event SPRITE_GROWLITHE, 6, 2, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CeladonMansion1FMeowth, -1
- person_event SPRITE_CLEFAIRY, 4, 3, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CeladonMansion1FClefairy, -1
- person_event SPRITE_GROWLITHE, 4, 4, SPRITEMOVEDATA_POKEMON, 0, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, CeladonMansion1FNidoranF, -1
+ object_event SPRITE_GRANNY, 5, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonMansionManager, -1
+ object_event SPRITE_GROWLITHE, 6, 2, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonMansion1FMeowth, -1
+ object_event SPRITE_CLEFAIRY, 4, 3, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonMansion1FClefairy, -1
+ object_event SPRITE_GROWLITHE, 4, 4, SPRITEMOVEDATA_POKEMON, 0, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonMansion1FNidoranF, -1
diff --git a/maps/CeladonMansion2F.asm b/maps/CeladonMansion2F.asm
index fbe54d617..d63ef1be6 100644
--- a/maps/CeladonMansion2F.asm
+++ b/maps/CeladonMansion2F.asm
@@ -1,5 +1,5 @@
CeladonMansion2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -60,14 +60,14 @@ CeladonMansion2F_MapEventHeader:
warp_def $0, $6, 3, CELADON_MANSION_3F
warp_def $0, $7, 5, CELADON_MANSION_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 3, 0, SIGNPOST_READ, CeladonMansion2FComputer
- signpost 8, 5, SIGNPOST_UP, CeladonMansion2FSign
- signpost 3, 2, SIGNPOST_READ, CeladonMansion2FBookshelf
+ bg_event 3, 0, BGEVENT_READ, CeladonMansion2FComputer
+ bg_event 8, 5, BGEVENT_UP, CeladonMansion2FSign
+ bg_event 3, 2, BGEVENT_READ, CeladonMansion2FBookshelf
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/CeladonMansion3F.asm b/maps/CeladonMansion3F.asm
index 10ba88dfe..dfa41c582 100644
--- a/maps/CeladonMansion3F.asm
+++ b/maps/CeladonMansion3F.asm
@@ -5,7 +5,7 @@ const_value set 2
const CELADONMANSION3F_FISHER
CeladonMansion3F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -65,11 +65,11 @@ UnknownScript_0x716b6:
closetext
end
-SuperNerdScript_0x716bc:
- jumptextfaceplayer UnknownText_0x71895
+CeladonMansion3FSuperNerdScript:
+ jumptextfaceplayer CeladonMansion3FSuperNerdText
-FisherScript_0x716bf:
- jumptextfaceplayer UnknownText_0x718ca
+CeladonMansion3FFisherScript:
+ jumptextfaceplayer CeladonMansion3FFisherText
MapCeladonMansion3FSignpost0Script:
jumptext UnknownText_0x7190b
@@ -145,7 +145,7 @@ UnknownText_0x71863:
cont "cel printing."
done
-UnknownText_0x71895:
+CeladonMansion3FSuperNerdText:
text "Who, me? I'm the"
line "PROGRAMMER."
@@ -153,7 +153,7 @@ UnknownText_0x71895:
line "machines!"
done
-UnknownText_0x718ca:
+CeladonMansion3FFisherText:
text "Aren't the TWINS"
line "adorable?"
@@ -200,19 +200,19 @@ CeladonMansion3F_MapEventHeader:
warp_def $0, $6, 3, CELADON_MANSION_2F
warp_def $0, $7, 2, CELADON_MANSION_ROOF
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 4
- signpost 8, 5, SIGNPOST_UP, MapCeladonMansion3FSignpost0Script
- signpost 3, 4, SIGNPOST_UP, MapCeladonMansion3FSignpost1Script
- signpost 6, 1, SIGNPOST_UP, MapCeladonMansion3FSignpost2Script
- signpost 3, 1, SIGNPOST_UP, MapCeladonMansion3FSignpost3Script
+ bg_event 8, 5, BGEVENT_UP, MapCeladonMansion3FSignpost0Script
+ bg_event 3, 4, BGEVENT_UP, MapCeladonMansion3FSignpost1Script
+ bg_event 6, 1, BGEVENT_UP, MapCeladonMansion3FSignpost2Script
+ bg_event 3, 1, BGEVENT_UP, MapCeladonMansion3FSignpost3Script
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_COOLTRAINER_M, 6, 3, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x71670, -1
- person_event SPRITE_GYM_GUY, 4, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GymGuyScript_0x71696, -1
- person_event SPRITE_SUPER_NERD, 7, 0, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x716bc, -1
- person_event SPRITE_FISHER, 4, 0, SPRITEMOVEDATA_STANDING_UP, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, FisherScript_0x716bf, -1
+ object_event SPRITE_COOLTRAINER_M, 6, 3, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CooltrainerMScript_0x71670, -1
+ object_event SPRITE_GYM_GUY, 4, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GymGuyScript_0x71696, -1
+ object_event SPRITE_SUPER_NERD, 7, 0, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonMansion3FSuperNerdScript, -1
+ object_event SPRITE_FISHER, 4, 0, SPRITEMOVEDATA_STANDING_UP, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonMansion3FFisherScript, -1
diff --git a/maps/CeladonMansionRoof.asm b/maps/CeladonMansionRoof.asm
index 3ea8d275b..8458a9d87 100644
--- a/maps/CeladonMansionRoof.asm
+++ b/maps/CeladonMansionRoof.asm
@@ -2,19 +2,19 @@ const_value set 2
const CELADONMANSIONROOF_FISHER
CeladonMansionRoof_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-FisherScript_0x71a39:
- jumptextfaceplayer UnknownText_0x71a3f
+CeladonMansionRoofFisherScript:
+ jumptextfaceplayer CeladonMansionRoofFisherText
MapCeladonMansionRoofSignpost0Script:
jumptext UnknownText_0x71aa1
-UnknownText_0x71a3f:
+CeladonMansionRoofFisherText:
text "High places--I do"
line "love them so!"
@@ -43,13 +43,13 @@ CeladonMansionRoof_MapEventHeader:
warp_def $1, $6, 4, CELADON_MANSION_3F
warp_def $5, $2, 1, CELADON_MANSION_ROOF_HOUSE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 1, 6, SIGNPOST_LEFT, MapCeladonMansionRoofSignpost0Script
+ bg_event 1, 6, BGEVENT_LEFT, MapCeladonMansionRoofSignpost0Script
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_FISHER, 5, 7, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, FisherScript_0x71a39, -1
+ object_event SPRITE_FISHER, 5, 7, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonMansionRoofFisherScript, -1
diff --git a/maps/CeladonMansionRoofHouse.asm b/maps/CeladonMansionRoofHouse.asm
index 84a0cb069..4cb750df7 100644
--- a/maps/CeladonMansionRoofHouse.asm
+++ b/maps/CeladonMansionRoofHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const CELADONMANSIONROOFHOUSE_PHARMACIST
CeladonMansionRoofHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -125,12 +125,12 @@ CeladonMansionRoofHouse_MapEventHeader:
warp_def $7, $2, 3, CELADON_MANSION_ROOF
warp_def $7, $3, 3, CELADON_MANSION_ROOF
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_PHARMACIST, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 2, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, PharmacistScript_0x71afd, -1
+ object_event SPRITE_PHARMACIST, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 2, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PharmacistScript_0x71afd, -1
diff --git a/maps/CeladonPokeCenter1F.asm b/maps/CeladonPokeCenter1F.asm
deleted file mode 100644
index 9bd47c4fc..000000000
--- a/maps/CeladonPokeCenter1F.asm
+++ /dev/null
@@ -1,170 +0,0 @@
-const_value set 2
- const CELADONPOKECENTER1F_NURSE
- const CELADONPOKECENTER1F_GENTLEMAN
- const CELADONPOKECENTER1F_PHARMACIST
- const CELADONPOKECENTER1F_COOLTRAINER_F
- const CELADONPOKECENTER1F_EUSINE
-
-CeladonPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x71e22:
- jumpstd pokecenternurse
-
-GentlemanScript_0x71e25:
- jumpstd happinesschecknpc
-
-CooltrainerFScript_0x71e28:
- jumptextfaceplayer UnknownText_0x71e70
-
-PharmacistScript_0x71e2b:
- jumptextfaceplayer UnknownText_0x71ec1
-
-CeladonEusine:
- faceplayer
- opentext
- writetext CeladonEusineText1
- buttonsound
- writebyte SUICUNE
- special SpecialMonCheck
- iffalse .NoSuicune
- special SpecialBeastsCheck
- iftrue .HoOh
- writetext NoBeastsText
- waitbutton
-.NoSuicune:
- closetext
- end
-
-.HoOh:
- writetext EusineLeavesCeladonText
- waitbutton
- closetext
- checkcode VAR_FACING
- if_equal $1, .Location1
- applymovement CELADONPOKECENTER1F_EUSINE, .Movement1
- jump .Continue
-
-.Location1:
- applymovement CELADONPOKECENTER1F_EUSINE, .Movement2
-.Continue:
- disappear CELADONPOKECENTER1F_EUSINE
- playsound SFX_EXIT_BUILDING
- waitsfx
- end
-
-.Movement2:
- step LEFT
- step DOWN
- step DOWN
- step DOWN
- step DOWN
- step_end
-
-.Movement1:
- step DOWN
- step DOWN
- step DOWN
- step DOWN
- step_end
-
-UnknownText_0x71e70:
- text "ERIKA is a master"
- line "of grass #MON."
-
- para "She'll make you"
- line "pay if you don't"
- cont "watch yourself."
- done
-
-UnknownText_0x71ec1:
- text "TEAM ROCKET's"
- line "hideout is in the"
-
- para "basement of the"
- line "GAME CORNER."
-
- para "Oh, wait. That was"
- line "three years ago."
- done
-
-CeladonEusineText1:
- text "EUSINE: Hi!"
-
- para "I'm back visiting"
- line "my hometown."
-
- para "It's been quite a"
- line "while."
- done
-
-EusineLeavesCeladonText:
- text "<PLAYER>, have you"
- line "heard?"
-
- para "There have been"
- line "fresh rumors of a"
-
- para "rainbow-colored"
- line "#MON appearing"
- cont "at TIN TOWER."
-
- para "I've just had my"
- line "party healed, so"
-
- para "now I'm headed to"
- line "ECRUTEAK."
-
- para "I'll be seeing"
- line "you, <PLAYER>!"
- done
-
-NoBeastsText:
- text "Oh, by the way,"
- line "<PLAYER>."
-
- para "Have you caught"
- line "the legendary"
-
- para "#MON RAIKOU and"
- line "ENTEI?"
-
- para $56, $56, $56
-
- para "Okay…"
-
- para "If you catch even"
- line "one, I hope that"
- cont "you'll inform me."
-
- para "I'm counting on"
- line "you, <PLAYER>!"
- done
-
-CeladonPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 5, CELADON_CITY
- warp_def $7, $4, 5, CELADON_CITY
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 5
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x71e22, -1
- person_event SPRITE_GENTLEMAN, 5, 1, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x71e25, -1
- person_event SPRITE_PHARMACIST, 3, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PharmacistScript_0x71e2b, -1
- person_event SPRITE_COOLTRAINER_F, 6, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x71e28, -1
- person_event SPRITE_SUPER_NERD, 3, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, CeladonEusine, EVENT_SET_WHEN_FOUGHT_HO_OH
diff --git a/maps/CeladonPokeCenter2FBeta.asm b/maps/CeladonPokeCenter2FBeta.asm
deleted file mode 100644
index 9c8d25332..000000000
--- a/maps/CeladonPokeCenter2FBeta.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-CeladonPokeCenter2FBeta_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-CeladonPokeCenter2FBeta_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 1
- warp_def $7, $0, 3, CELADON_POKECENTER_1F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/CeladonPokecenter1F.asm b/maps/CeladonPokecenter1F.asm
new file mode 100644
index 000000000..32fdf2010
--- /dev/null
+++ b/maps/CeladonPokecenter1F.asm
@@ -0,0 +1,170 @@
+const_value set 2
+ const CELADONPOKECENTER1F_NURSE
+ const CELADONPOKECENTER1F_GENTLEMAN
+ const CELADONPOKECENTER1F_PHARMACIST
+ const CELADONPOKECENTER1F_COOLTRAINER_F
+ const CELADONPOKECENTER1F_EUSINE
+
+CeladonPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x71e22:
+ jumpstd pokecenternurse
+
+GentlemanScript_0x71e25:
+ jumpstd happinesschecknpc
+
+CeladonPokecenter1FCooltrainerFScript:
+ jumptextfaceplayer CeladonPokecenter1FCooltrainerFText
+
+CeladonPokecenter1FPharmacistScript:
+ jumptextfaceplayer CeladonPokecenter1FPharmacistText
+
+CeladonEusine:
+ faceplayer
+ opentext
+ writetext CeladonEusineText1
+ buttonsound
+ writebyte SUICUNE
+ special SpecialMonCheck
+ iffalse .NoSuicune
+ special SpecialBeastsCheck
+ iftrue .HoOh
+ writetext NoBeastsText
+ waitbutton
+.NoSuicune:
+ closetext
+ end
+
+.HoOh:
+ writetext EusineLeavesCeladonText
+ waitbutton
+ closetext
+ checkcode VAR_FACING
+ if_equal $1, .Location1
+ applymovement CELADONPOKECENTER1F_EUSINE, .Movement1
+ jump .Continue
+
+.Location1:
+ applymovement CELADONPOKECENTER1F_EUSINE, .Movement2
+.Continue:
+ disappear CELADONPOKECENTER1F_EUSINE
+ playsound SFX_EXIT_BUILDING
+ waitsfx
+ end
+
+.Movement2:
+ step LEFT
+ step DOWN
+ step DOWN
+ step DOWN
+ step DOWN
+ step_end
+
+.Movement1:
+ step DOWN
+ step DOWN
+ step DOWN
+ step DOWN
+ step_end
+
+CeladonPokecenter1FCooltrainerFText:
+ text "ERIKA is a master"
+ line "of grass #MON."
+
+ para "She'll make you"
+ line "pay if you don't"
+ cont "watch yourself."
+ done
+
+CeladonPokecenter1FPharmacistText:
+ text "TEAM ROCKET's"
+ line "hideout is in the"
+
+ para "basement of the"
+ line "GAME CORNER."
+
+ para "Oh, wait. That was"
+ line "three years ago."
+ done
+
+CeladonEusineText1:
+ text "EUSINE: Hi!"
+
+ para "I'm back visiting"
+ line "my hometown."
+
+ para "It's been quite a"
+ line "while."
+ done
+
+EusineLeavesCeladonText:
+ text "<PLAYER>, have you"
+ line "heard?"
+
+ para "There have been"
+ line "fresh rumors of a"
+
+ para "rainbow-colored"
+ line "#MON appearing"
+ cont "at TIN TOWER."
+
+ para "I've just had my"
+ line "party healed, so"
+
+ para "now I'm headed to"
+ line "ECRUTEAK."
+
+ para "I'll be seeing"
+ line "you, <PLAYER>!"
+ done
+
+NoBeastsText:
+ text "Oh, by the way,"
+ line "<PLAYER>."
+
+ para "Have you caught"
+ line "the legendary"
+
+ para "#MON RAIKOU and"
+ line "ENTEI?"
+
+ para $56, $56, $56
+
+ para "Okay…"
+
+ para "If you catch even"
+ line "one, I hope that"
+ cont "you'll inform me."
+
+ para "I'm counting on"
+ line "you, <PLAYER>!"
+ done
+
+CeladonPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 5, CELADON_CITY
+ warp_def $7, $4, 5, CELADON_CITY
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 5
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x71e22, -1
+ object_event SPRITE_GENTLEMAN, 5, 1, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GentlemanScript_0x71e25, -1
+ object_event SPRITE_PHARMACIST, 3, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonPokecenter1FPharmacistScript, -1
+ object_event SPRITE_COOLTRAINER_F, 6, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonPokecenter1FCooltrainerFScript, -1
+ object_event SPRITE_SUPER_NERD, 3, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonEusine, EVENT_SET_WHEN_FOUGHT_HO_OH
diff --git a/maps/CeladonPokecenter2FBeta.asm b/maps/CeladonPokecenter2FBeta.asm
new file mode 100644
index 000000000..10a192b93
--- /dev/null
+++ b/maps/CeladonPokecenter2FBeta.asm
@@ -0,0 +1,23 @@
+CeladonPokecenter2FBeta_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+CeladonPokecenter2FBeta_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 1
+ warp_def $7, $0, 3, CELADON_POKECENTER_1F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/CeruleanCity.asm b/maps/CeruleanCity.asm
index 47afa867a..fc0bd60f6 100644
--- a/maps/CeruleanCity.asm
+++ b/maps/CeruleanCity.asm
@@ -7,37 +7,35 @@ const_value set 2
const CERULEANCITY_YOUNGSTER
CeruleanCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_CERULEAN
return
-CooltrainerMScript_0x184009:
+CeruleanCityCooltrainerMScript:
faceplayer
opentext
checkevent EVENT_RETURNED_MACHINE_PART
- iftrue UnknownScript_0x184017
- writetext UnknownText_0x1840bc
+ iftrue .ReturnedMachinePart
+ writetext CeruleanCityCooltrainerMText1
waitbutton
closetext
end
-UnknownScript_0x184017:
- writetext UnknownText_0x184144
+.ReturnedMachinePart:
+ writetext CeruleanCityCooltrainerMText2
waitbutton
closetext
end
-SuperNerdScript_0x18401d:
- jumptextfaceplayer UnknownText_0x1841a8
+CeruleanCitySuperNerdScript:
+ jumptextfaceplayer CeruleanCitySuperNerdText
CeruleanCitySlowbro:
opentext
@@ -47,15 +45,15 @@ CeruleanCitySlowbro:
closetext
end
-CooltrainerFScript_0x18402a:
+CeruleanCityCooltrainerFScript:
faceplayer
opentext
- writetext UnknownText_0x1841fa
+ writetext CeruleanCityCooltrainerFText1
waitbutton
closetext
spriteface CERULEANCITY_COOLTRAINER_F, LEFT
opentext
- writetext UnknownText_0x184229
+ writetext CeruleanCityCooltrainerFText2
waitbutton
closetext
opentext
@@ -64,41 +62,41 @@ CooltrainerFScript_0x18402a:
waitbutton
closetext
opentext
- writetext UnknownText_0x18424b
+ writetext CeruleanCityCooltrainerFText3
waitbutton
closetext
end
-FisherScript_0x18404a:
+CeruleanCityFisherScript:
faceplayer
opentext
checkevent EVENT_RETURNED_MACHINE_PART
- iftrue UnknownScript_0x184058
+ iftrue .ReturnedMachinePart
checkevent EVENT_MET_ROCKET_GRUNT_AT_CERULEAN_GYM
- iftrue UnknownScript_0x18405e
-UnknownScript_0x184058:
- writetext UnknownText_0x18424e
+ iftrue .MetCeruleanRocket
+.ReturnedMachinePart:
+ writetext CeruleanCityFisherText
waitbutton
closetext
end
-UnknownScript_0x18405e:
- writetext UnknownText_0x184275
+.MetCeruleanRocket:
+ writetext CeruleanCityFisherRocketTipText
waitbutton
closetext
end
-YoungsterScript_0x184064:
+CeruleanCityYoungsterScript:
faceplayer
opentext
- writetext UnknownText_0x1842a9
+ writetext CeruleanCityYoungsterText1
waitbutton
closetext
checkevent EVENT_FOUND_BERSERK_GENE_IN_CERULEAN_CITY
- iffalse UnknownScript_0x184072
+ iffalse .BerserkGenePingsItemfinder
end
-UnknownScript_0x184072:
+.BerserkGenePingsItemfinder:
waitsfx
playsound SFX_SECOND_PART_OF_ITEMFINDER
waitsfx
@@ -119,7 +117,7 @@ UnknownScript_0x184072:
showemote EMOTE_SHOCK, CERULEANCITY_YOUNGSTER, 15
spriteface CERULEANCITY_YOUNGSTER, LEFT
opentext
- writetext UnknownText_0x1842ee
+ writetext CeruleanCityYoungsterText2
waitbutton
closetext
end
@@ -142,7 +140,7 @@ CeruleanCapeSign:
CeruleanLockedDoor:
jumptext CeruleanLockedDoorText
-CeruleanCityPokeCenterSign:
+CeruleanCityPokecenterSign:
jumpstd pokecentersign
CeruleanCityMartSign:
@@ -151,7 +149,7 @@ CeruleanCityMartSign:
CeruleanCityHiddenBerserkGene:
dwb EVENT_FOUND_BERSERK_GENE_IN_CERULEAN_CITY, BERSERK_GENE
-UnknownText_0x1840bc:
+CeruleanCityCooltrainerMText1:
text "KANTO's POWER"
line "PLANT?"
@@ -166,7 +164,7 @@ UnknownText_0x1840bc:
cont "some sort there."
done
-UnknownText_0x184144:
+CeruleanCityCooltrainerMText2:
text "You're collecting"
line "every single kind"
cont "of #MON?"
@@ -176,7 +174,7 @@ UnknownText_0x184144:
cont "it sounds fun too."
done
-UnknownText_0x1841a8:
+CeruleanCitySuperNerdText:
text "The CAPE in the"
line "north is a good"
@@ -188,34 +186,34 @@ CeruleanCitySlowbroText:
text "SLOWBRO: Yarah?"
done
-UnknownText_0x1841fa:
+CeruleanCityCooltrainerFText1:
text "My SLOWBRO and I"
line "make an awesome"
cont "combination!"
done
-UnknownText_0x184229:
+CeruleanCityCooltrainerFText2:
text "SLOWBRO, show me"
line "your CONFUSION!"
done
-UnknownText_0x18424b:
+CeruleanCityCooltrainerFText3:
text "…"
done
-UnknownText_0x18424e:
+CeruleanCityFisherText:
text "I'm a huge fan of"
line "CERULEAN GYM's"
cont "MISTY."
done
-UnknownText_0x184275:
+CeruleanCityFisherRocketTipText:
text "I saw this shady"
line "guy go off toward"
cont "CERULEAN's CAPE."
done
-UnknownText_0x1842a9:
+CeruleanCityYoungsterText1:
text "There used to be a"
line "cave here that had"
@@ -223,7 +221,7 @@ UnknownText_0x1842a9:
line "#MON in it."
done
-UnknownText_0x1842ee:
+CeruleanCityYoungsterText2:
text "Ayuh?"
para "My ITEMFINDER is"
@@ -290,26 +288,26 @@ CeruleanCity_MapEventHeader:
warp_def $17, $1e, 1, CERULEAN_GYM
warp_def $1d, $19, 2, CERULEAN_MART
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 9
- signpost 23, 23, SIGNPOST_READ, CeruleanCitySign
- signpost 25, 27, SIGNPOST_READ, CeruleanGymSign
- signpost 29, 11, SIGNPOST_READ, CeruleanBikeShopSign
- signpost 17, 25, SIGNPOST_READ, CeruleanPoliceSign
- signpost 7, 23, SIGNPOST_READ, CeruleanCapeSign
- signpost 29, 14, SIGNPOST_READ, CeruleanLockedDoor
- signpost 21, 20, SIGNPOST_READ, CeruleanCityPokeCenterSign
- signpost 29, 26, SIGNPOST_READ, CeruleanCityMartSign
- signpost 12, 2, SIGNPOST_ITEM, CeruleanCityHiddenBerserkGene
-
-.PersonEvents:
+ bg_event 23, 23, BGEVENT_READ, CeruleanCitySign
+ bg_event 25, 27, BGEVENT_READ, CeruleanGymSign
+ bg_event 29, 11, BGEVENT_READ, CeruleanBikeShopSign
+ bg_event 17, 25, BGEVENT_READ, CeruleanPoliceSign
+ bg_event 7, 23, BGEVENT_READ, CeruleanCapeSign
+ bg_event 29, 14, BGEVENT_READ, CeruleanLockedDoor
+ bg_event 21, 20, BGEVENT_READ, CeruleanCityPokecenterSign
+ bg_event 29, 26, BGEVENT_READ, CeruleanCityMartSign
+ bg_event 12, 2, BGEVENT_ITEM, CeruleanCityHiddenBerserkGene
+
+.ObjectEvents:
db 6
- person_event SPRITE_COOLTRAINER_M, 23, 15, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x184009, -1
- person_event SPRITE_SUPER_NERD, 15, 23, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x18401d, -1
- person_event SPRITE_SLOWPOKE, 24, 20, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CeruleanCitySlowbro, -1
- person_event SPRITE_COOLTRAINER_F, 24, 21, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x18402a, -1
- person_event SPRITE_FISHER, 26, 30, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, FisherScript_0x18404a, -1
- person_event SPRITE_YOUNGSTER, 12, 6, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x184064, -1
+ object_event SPRITE_COOLTRAINER_M, 23, 15, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeruleanCityCooltrainerMScript, -1
+ object_event SPRITE_SUPER_NERD, 15, 23, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeruleanCitySuperNerdScript, -1
+ object_event SPRITE_SLOWPOKE, 24, 20, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeruleanCitySlowbro, -1
+ object_event SPRITE_COOLTRAINER_F, 24, 21, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeruleanCityCooltrainerFScript, -1
+ object_event SPRITE_FISHER, 26, 30, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeruleanCityFisherScript, -1
+ object_event SPRITE_YOUNGSTER, 12, 6, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeruleanCityYoungsterScript, -1
diff --git a/maps/CeruleanGym.asm b/maps/CeruleanGym.asm
index a91a3cc9d..b014199b7 100644
--- a/maps/CeruleanGym.asm
+++ b/maps/CeruleanGym.asm
@@ -7,24 +7,22 @@ const_value set 2
const CERULEANGYM_GYM_GUY
CeruleanGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x1883d9, 0
- dw UnknownScript_0x1883da, 0
+ scene_script .DummyScene0
+ scene_script .GruntRunsOut
.MapCallbacks:
db 0
-UnknownScript_0x1883d9:
+.DummyScene0:
end
-UnknownScript_0x1883da:
- priorityjump UnknownScript_0x1883de
+.GruntRunsOut:
+ priorityjump .GruntRunsOutScript
end
-UnknownScript_0x1883de:
+.GruntRunsOutScript:
applymovement CERULEANGYM_ROCKET, MovementData_0x1884e3
playsound SFX_TACKLE
applymovement CERULEANGYM_ROCKET, MovementData_0x1884eb
@@ -50,9 +48,9 @@ UnknownScript_0x1883de:
setevent EVENT_MET_ROCKET_GRUNT_AT_CERULEAN_GYM
clearevent EVENT_ROUTE_24_ROCKET
clearevent EVENT_ROUTE_25_MISTY_BOYFRIEND
- dotrigger $0
- domaptrigger ROUTE_25, $1
- domaptrigger POWER_PLANT, $0
+ setscene $0
+ setmapscene ROUTE_25, $1
+ setmapscene POWER_PLANT, $0
waitsfx
special RestartMapMusic
pause 15
@@ -88,34 +86,34 @@ MistyScript_0x188432:
end
TrainerSwimmerfDiana:
- trainer EVENT_BEAT_SWIMMERF_DIANA, SWIMMERF, DIANA, SwimmerfDianaSeenText, SwimmerfDianaBeatenText, 0, SwimmerfDianaScript
+ trainer EVENT_BEAT_SWIMMERF_DIANA, SWIMMERF, DIANA, SwimmerfDianaSeenText, SwimmerfDianaBeatenText, 0, .Script
-SwimmerfDianaScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x188856
+ writetext SwimmerfDianaAfterBattleText
waitbutton
closetext
end
TrainerSwimmerfBriana:
- trainer EVENT_BEAT_SWIMMERF_BRIANA, SWIMMERF, BRIANA, SwimmerfBrianaSeenText, SwimmerfBrianaBeatenText, 0, SwimmerfBrianaScript
+ trainer EVENT_BEAT_SWIMMERF_BRIANA, SWIMMERF, BRIANA, SwimmerfBrianaSeenText, SwimmerfBrianaBeatenText, 0, .Script
-SwimmerfBrianaScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1888c0
+ writetext SwimmerfBrianaAfterBattleText
waitbutton
closetext
end
TrainerSwimmermParker:
- trainer EVENT_BEAT_SWIMMERM_PARKER, SWIMMERM, PARKER, SwimmermParkerSeenText, SwimmermParkerBeatenText, 0, SwimmermParkerScript
+ trainer EVENT_BEAT_SWIMMERM_PARKER, SWIMMERM, PARKER, SwimmermParkerSeenText, SwimmermParkerBeatenText, 0, .Script
-SwimmermParkerScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x188943
+ writetext SwimmermParkerAfterBattleText
waitbutton
closetext
end
@@ -299,7 +297,7 @@ SwimmerfDianaBeatenText:
line "the winner!"
done
-UnknownText_0x188856:
+SwimmerfDianaAfterBattleText:
text "I'll be swimming"
line "quietly."
done
@@ -315,7 +313,7 @@ SwimmerfBrianaBeatenText:
line "disposed of me…"
done
-UnknownText_0x1888c0:
+SwimmerfBrianaAfterBattleText:
text "Don't be too smug"
line "about beating me."
@@ -335,7 +333,7 @@ SwimmermParkerBeatenText:
text "This can't be…"
done
-UnknownText_0x188943:
+SwimmermParkerAfterBattleText:
text "MISTY has gotten"
line "much better in the"
cont "past few years."
@@ -374,20 +372,20 @@ CeruleanGym_MapEventHeader:
warp_def $f, $4, 5, CERULEAN_CITY
warp_def $f, $5, 5, CERULEAN_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 8, 3, SIGNPOST_ITEM, CeruleanGymHiddenMachinePart
- signpost 13, 2, SIGNPOST_READ, CeruleanGymStatue1
- signpost 13, 6, SIGNPOST_READ, CeruleanGymStatue2
+ bg_event 8, 3, BGEVENT_ITEM, CeruleanGymHiddenMachinePart
+ bg_event 13, 2, BGEVENT_READ, CeruleanGymStatue1
+ bg_event 13, 6, BGEVENT_READ, CeruleanGymStatue2
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_ROCKET, 10, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_CERULEAN_GYM_ROCKET
- person_event SPRITE_MISTY, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, MistyScript_0x188432, EVENT_TRAINERS_IN_CERULEAN_GYM
- person_event SPRITE_SWIMMER_GIRL, 6, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerSwimmerfDiana, EVENT_TRAINERS_IN_CERULEAN_GYM
- person_event SPRITE_SWIMMER_GIRL, 9, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 1, TrainerSwimmerfBriana, EVENT_TRAINERS_IN_CERULEAN_GYM
- person_event SPRITE_SWIMMER_GUY, 9, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerSwimmermParker, EVENT_TRAINERS_IN_CERULEAN_GYM
- person_event SPRITE_GYM_GUY, 13, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, CeruleanGymGuyScript, EVENT_TRAINERS_IN_CERULEAN_GYM
+ object_event SPRITE_ROCKET, 10, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_CERULEAN_GYM_ROCKET
+ object_event SPRITE_MISTY, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, MistyScript_0x188432, EVENT_TRAINERS_IN_CERULEAN_GYM
+ object_event SPRITE_SWIMMER_GIRL, 6, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfDiana, EVENT_TRAINERS_IN_CERULEAN_GYM
+ object_event SPRITE_SWIMMER_GIRL, 9, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerSwimmerfBriana, EVENT_TRAINERS_IN_CERULEAN_GYM
+ object_event SPRITE_SWIMMER_GUY, 9, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermParker, EVENT_TRAINERS_IN_CERULEAN_GYM
+ object_event SPRITE_GYM_GUY, 13, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeruleanGymGuyScript, EVENT_TRAINERS_IN_CERULEAN_GYM
diff --git a/maps/CeruleanGymBadgeSpeechHouse.asm b/maps/CeruleanGymBadgeSpeechHouse.asm
index c6cdd60ac..92c40682f 100644
--- a/maps/CeruleanGymBadgeSpeechHouse.asm
+++ b/maps/CeruleanGymBadgeSpeechHouse.asm
@@ -2,16 +2,16 @@ const_value set 2
const CERULEANGYMBADGESPEECHHOUSE_POKEFAN_M
CeruleanGymBadgeSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-PokefanMScript_0x188002:
- jumptextfaceplayer UnknownText_0x188005
+CeruleanGymBadgeSpeechHousePokefanMScript:
+ jumptextfaceplayer CeruleanGymBadgeSpeechHousePokefanMText
-UnknownText_0x188005:
+CeruleanGymBadgeSpeechHousePokefanMText:
text "Are you collecting"
line "KANTO GYM BADGES?"
done
@@ -25,12 +25,12 @@ CeruleanGymBadgeSpeechHouse_MapEventHeader:
warp_def $7, $2, 1, CERULEAN_CITY
warp_def $7, $3, 1, CERULEAN_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKEFAN_M, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x188002, -1
+ object_event SPRITE_POKEFAN_M, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeruleanGymBadgeSpeechHousePokefanMScript, -1
diff --git a/maps/CeruleanMart.asm b/maps/CeruleanMart.asm
index abbab5b5a..b2674dd46 100644
--- a/maps/CeruleanMart.asm
+++ b/maps/CeruleanMart.asm
@@ -4,7 +4,7 @@ const_value set 2
const CERULEANMART_COOLTRAINER_F
CeruleanMart_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -54,14 +54,14 @@ CeruleanMart_MapEventHeader:
warp_def $7, $2, 6, CERULEAN_CITY
warp_def $7, $3, 6, CERULEAN_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CeruleanMart_Clerk, -1
- person_event SPRITE_COOLTRAINER_M, 6, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CeruleanMart_CooltrainerM, -1
- person_event SPRITE_COOLTRAINER_F, 2, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CeruleanMart_CooltrainerF, -1
+ object_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeruleanMart_Clerk, -1
+ object_event SPRITE_COOLTRAINER_M, 6, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeruleanMart_CooltrainerM, -1
+ object_event SPRITE_COOLTRAINER_F, 2, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeruleanMart_CooltrainerF, -1
diff --git a/maps/CeruleanPokeCenter1F.asm b/maps/CeruleanPokeCenter1F.asm
deleted file mode 100644
index 2705fc418..000000000
--- a/maps/CeruleanPokeCenter1F.asm
+++ /dev/null
@@ -1,85 +0,0 @@
-const_value set 2
- const CERULEANPOKECENTER1F_NURSE
- const CERULEANPOKECENTER1F_SUPER_NERD
- const CERULEANPOKECENTER1F_GYM_GUY
-
-CeruleanPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x18820f:
- jumpstd pokecenternurse
-
-SuperNerdScript_0x188212:
- special Mobile_DummyReturnFalse
- iftrue .mobile
- jumptextfaceplayer UnknownText_0x188221
-
-.mobile
- jumptextfaceplayer UnknownText_0x18828c
-
-GymGuyScript_0x18821e:
- jumptextfaceplayer UnknownText_0x1882ff
-
-UnknownText_0x188221:
- text "For battles, I'd"
- line "much rather use"
-
- para "#MON I've been"
- line "raising, even if"
-
- para "they're weaker"
- line "than some newly"
- cont "caught #MON."
- done
-
-UnknownText_0x18828c:
- text "Do you battle by"
- line "mobile phone?"
-
- para "If time runs out"
- line "during a battle,"
-
- para "waiting to see who"
- line "won is really"
- cont "nerve wracking."
- done
-
-UnknownText_0x1882ff:
- text "The MAGNET TRAIN"
- line "travels at over"
-
- para "340 mph. It goes"
- line "between KANTO and"
-
- para "JOHTO in almost no"
- line "time at all."
-
- para "It really makes"
- line "JOHTO accessible."
- done
-
-CeruleanPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 4, CERULEAN_CITY
- warp_def $7, $4, 4, CERULEAN_CITY
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 3
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x18820f, -1
- person_event SPRITE_SUPER_NERD, 4, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x188212, -1
- person_event SPRITE_GYM_GUY, 5, 1, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, GymGuyScript_0x18821e, -1
diff --git a/maps/CeruleanPokeCenter2FBeta.asm b/maps/CeruleanPokeCenter2FBeta.asm
deleted file mode 100644
index 4479a484f..000000000
--- a/maps/CeruleanPokeCenter2FBeta.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-CeruleanPokeCenter2FBeta_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-CeruleanPokeCenter2FBeta_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 1
- warp_def $7, $0, 1, CERULEAN_POKECENTER_1F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/CeruleanPokecenter1F.asm b/maps/CeruleanPokecenter1F.asm
new file mode 100644
index 000000000..83e64fca5
--- /dev/null
+++ b/maps/CeruleanPokecenter1F.asm
@@ -0,0 +1,85 @@
+const_value set 2
+ const CERULEANPOKECENTER1F_NURSE
+ const CERULEANPOKECENTER1F_SUPER_NERD
+ const CERULEANPOKECENTER1F_GYM_GUY
+
+CeruleanPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x18820f:
+ jumpstd pokecenternurse
+
+SuperNerdScript_0x188212:
+ special Mobile_DummyReturnFalse
+ iftrue .mobile
+ jumptextfaceplayer UnknownText_0x188221
+
+.mobile
+ jumptextfaceplayer UnknownText_0x18828c
+
+CeruleanPokecenter1FGymGuyScript:
+ jumptextfaceplayer CeruleanPokecenter1FGymGuyText
+
+UnknownText_0x188221:
+ text "For battles, I'd"
+ line "much rather use"
+
+ para "#MON I've been"
+ line "raising, even if"
+
+ para "they're weaker"
+ line "than some newly"
+ cont "caught #MON."
+ done
+
+UnknownText_0x18828c:
+ text "Do you battle by"
+ line "mobile phone?"
+
+ para "If time runs out"
+ line "during a battle,"
+
+ para "waiting to see who"
+ line "won is really"
+ cont "nerve wracking."
+ done
+
+CeruleanPokecenter1FGymGuyText:
+ text "The MAGNET TRAIN"
+ line "travels at over"
+
+ para "340 mph. It goes"
+ line "between KANTO and"
+
+ para "JOHTO in almost no"
+ line "time at all."
+
+ para "It really makes"
+ line "JOHTO accessible."
+ done
+
+CeruleanPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 4, CERULEAN_CITY
+ warp_def $7, $4, 4, CERULEAN_CITY
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 3
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x18820f, -1
+ object_event SPRITE_SUPER_NERD, 4, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SuperNerdScript_0x188212, -1
+ object_event SPRITE_GYM_GUY, 5, 1, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeruleanPokecenter1FGymGuyScript, -1
diff --git a/maps/CeruleanPokecenter2FBeta.asm b/maps/CeruleanPokecenter2FBeta.asm
new file mode 100644
index 000000000..ba25a36b3
--- /dev/null
+++ b/maps/CeruleanPokecenter2FBeta.asm
@@ -0,0 +1,23 @@
+CeruleanPokecenter2FBeta_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+CeruleanPokecenter2FBeta_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 1
+ warp_def $7, $0, 1, CERULEAN_POKECENTER_1F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/CeruleanPoliceStation.asm b/maps/CeruleanPoliceStation.asm
index 2787899b7..8e3271e4e 100644
--- a/maps/CeruleanPoliceStation.asm
+++ b/maps/CeruleanPoliceStation.asm
@@ -4,17 +4,17 @@ const_value set 2
const CERULEANPOLICESTATION_DIGLETT
CeruleanPoliceStation_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-FishingGuruScript_0x18804a:
- jumptextfaceplayer UnknownText_0x18805a
+CeruleanPoliceStationFishingGuruScript:
+ jumptextfaceplayer CeruleanPoliceStationFishingGuruText
-PokefanFScript_0x18804d:
- jumptextfaceplayer UnknownText_0x1880c3
+CeruleanPoliceStationPokefanFScript:
+ jumptextfaceplayer CeruleanPoliceStationPokefanFText
CeruleanDiglett:
opentext
@@ -24,7 +24,7 @@ CeruleanDiglett:
closetext
end
-UnknownText_0x18805a:
+CeruleanPoliceStationFishingGuruText:
text "I heard that some"
line "shady character is"
cont "skulking about."
@@ -34,7 +34,7 @@ UnknownText_0x18805a:
cont "to be a thief."
done
-UnknownText_0x1880c3:
+CeruleanPoliceStationPokefanFText:
text "We were held up by"
line "robbers before."
done
@@ -52,14 +52,14 @@ CeruleanPoliceStation_MapEventHeader:
warp_def $7, $2, 2, CERULEAN_CITY
warp_def $7, $3, 2, CERULEAN_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_FISHING_GURU, 1, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FishingGuruScript_0x18804a, -1
- person_event SPRITE_POKEFAN_F, 4, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x18804d, -1
- person_event SPRITE_DIGLETT, 5, 3, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, CeruleanDiglett, -1
+ object_event SPRITE_FISHING_GURU, 1, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeruleanPoliceStationFishingGuruScript, -1
+ object_event SPRITE_POKEFAN_F, 4, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeruleanPoliceStationPokefanFScript, -1
+ object_event SPRITE_DIGLETT, 5, 3, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CeruleanDiglett, -1
diff --git a/maps/CeruleanTradeSpeechHouse.asm b/maps/CeruleanTradeSpeechHouse.asm
index f499d8c1f..16c043862 100644
--- a/maps/CeruleanTradeSpeechHouse.asm
+++ b/maps/CeruleanTradeSpeechHouse.asm
@@ -5,17 +5,17 @@ const_value set 2
const CERULEANTRADESPEECHHOUSE_ZUBAT
CeruleanTradeSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-GrannyScript_0x188133:
- jumptextfaceplayer UnknownText_0x18814d
+CeruleanTradeSpeechHouseGrannyScript:
+ jumptextfaceplayer CeruleanTradeSpeechHouseGrannyText
-GrampsScript_0x188136:
- jumptextfaceplayer UnknownText_0x18818a
+CeruleanTradeSpeechHouseGrampsScript:
+ jumptextfaceplayer CeruleanTradeSpeechHouseGrampsText
RhydonScript_0x188139:
opentext
@@ -33,14 +33,14 @@ ZubatScript_0x188143:
closetext
end
-UnknownText_0x18814d:
+CeruleanTradeSpeechHouseGrannyText:
text "My husband lives"
line "happily with #-"
cont "MON he got through"
cont "trades."
done
-UnknownText_0x18818a:
+CeruleanTradeSpeechHouseGrampsText:
text "Ah… I'm so happy…"
done
@@ -62,15 +62,15 @@ CeruleanTradeSpeechHouse_MapEventHeader:
warp_def $7, $2, 3, CERULEAN_CITY
warp_def $7, $3, 3, CERULEAN_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_GRANNY, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GrannyScript_0x188133, -1
- person_event SPRITE_GRAMPS, 2, 1, SPRITEMOVEDATA_WANDER, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, GrampsScript_0x188136, -1
- person_event SPRITE_RHYDON, 2, 5, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, RhydonScript_0x188139, -1
- person_event SPRITE_ZUBAT, 6, 5, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ZubatScript_0x188143, -1
+ object_event SPRITE_GRANNY, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeruleanTradeSpeechHouseGrannyScript, -1
+ object_event SPRITE_GRAMPS, 2, 1, SPRITEMOVEDATA_WANDER, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeruleanTradeSpeechHouseGrampsScript, -1
+ object_event SPRITE_RHYDON, 2, 5, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, RhydonScript_0x188139, -1
+ object_event SPRITE_ZUBAT, 6, 5, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ZubatScript_0x188143, -1
diff --git a/maps/CharcoalKiln.asm b/maps/CharcoalKiln.asm
index 8abeb8c1b..cfad6ab1d 100644
--- a/maps/CharcoalKiln.asm
+++ b/maps/CharcoalKiln.asm
@@ -4,7 +4,7 @@ const_value set 2
const CHARCOALKILN_MOLTRES
CharcoalKiln_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -157,17 +157,17 @@ CharcoalKiln_MapEventHeader:
warp_def $7, $2, 2, AZALEA_TOWN
warp_def $7, $3, 2, AZALEA_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 1, 0, SIGNPOST_READ, CharcoalKilnBookshelf
- signpost 1, 1, SIGNPOST_READ, CharcoalKilnBookshelf
- signpost 1, 7, SIGNPOST_READ, CharcoalKilnRadio
+ bg_event 1, 0, BGEVENT_READ, CharcoalKilnBookshelf
+ bg_event 1, 1, BGEVENT_READ, CharcoalKilnBookshelf
+ bg_event 1, 7, BGEVENT_READ, CharcoalKilnRadio
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_BLACK_BELT, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CharcoalKilnBoss, EVENT_CHARCOAL_KILN_BOSS
- person_event SPRITE_YOUNGSTER, 3, 5, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CharcoalKilnApprentice, EVENT_CHARCOAL_KILN_APPRENTICE
- person_event SPRITE_MOLTRES, 6, 5, SPRITEMOVEDATA_POKEMON, 2, 2, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, CharcoalKilnFarfetchd, EVENT_CHARCOAL_KILN_FARFETCH_D
+ object_event SPRITE_BLACK_BELT, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CharcoalKilnBoss, EVENT_CHARCOAL_KILN_BOSS
+ object_event SPRITE_YOUNGSTER, 3, 5, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CharcoalKilnApprentice, EVENT_CHARCOAL_KILN_APPRENTICE
+ object_event SPRITE_MOLTRES, 6, 5, SPRITEMOVEDATA_POKEMON, 2, 2, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CharcoalKilnFarfetchd, EVENT_CHARCOAL_KILN_FARFETCH_D
diff --git a/maps/CherrygroveCity.asm b/maps/CherrygroveCity.asm
index 5b0db50f2..0b6f01283 100644
--- a/maps/CherrygroveCity.asm
+++ b/maps/CherrygroveCity.asm
@@ -6,23 +6,19 @@ const_value set 2
const CHERRYGROVECITY_FISHER
CherrygroveCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
+.DummyScene1:
end
.FlyPoint:
@@ -44,7 +40,7 @@ CherrygroveCityGuideGent:
follow CHERRYGROVECITY_GRAMPS, PLAYER
applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement1
opentext
- writetext GuideGentPokeCenterText
+ writetext GuideGentPokecenterText
waitbutton
closetext
applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement2
@@ -104,9 +100,9 @@ CherrygroveCityGuideGent:
closetext
end
-CherrygroveSilverTriggerSouth:
- moveperson CHERRYGROVECITY_SILVER, $27, $7
-CherrygroveSilverTriggerNorth:
+CherrygroveSilverSceneSouth:
+ moveobject CHERRYGROVECITY_SILVER, $27, $7
+CherrygroveSilverSceneNorth:
spriteface PLAYER, RIGHT
showemote EMOTE_SHOCK, PLAYER, 15
special Special_FadeOutMusic
@@ -125,7 +121,7 @@ CherrygroveSilverTriggerNorth:
iftrue .Chikorita
winlosstext SilverCherrygroveWinText, SilverCherrygroveLossText
setlasttalked CHERRYGROVECITY_SILVER
- loadtrainer RIVAL1, RIVAL1_3
+ loadtrainer RIVAL1, RIVAL1_1_TOTODILE
writecode VAR_BATTLETYPE, BATTLETYPE_CANLOSE
startbattle
dontrestartmapmusic
@@ -136,7 +132,7 @@ CherrygroveSilverTriggerNorth:
.Totodile:
winlosstext SilverCherrygroveWinText, SilverCherrygroveLossText
setlasttalked CHERRYGROVECITY_SILVER
- loadtrainer RIVAL1, RIVAL1_1
+ loadtrainer RIVAL1, RIVAL1_1_CHIKORITA
writecode VAR_BATTLETYPE, BATTLETYPE_CANLOSE
startbattle
dontrestartmapmusic
@@ -147,7 +143,7 @@ CherrygroveSilverTriggerNorth:
.Chikorita:
winlosstext SilverCherrygroveWinText, SilverCherrygroveLossText
setlasttalked CHERRYGROVECITY_SILVER
- loadtrainer RIVAL1, RIVAL1_2
+ loadtrainer RIVAL1, RIVAL1_1_CYNDAQUIL
writecode VAR_BATTLETYPE, BATTLETYPE_CANLOSE
startbattle
dontrestartmapmusic
@@ -175,7 +171,7 @@ CherrygroveSilverTriggerNorth:
spriteface PLAYER, LEFT
applymovement CHERRYGROVECITY_SILVER, CherrygroveCity_RivalExitsStageLeft
disappear CHERRYGROVECITY_SILVER
- dotrigger $0
+ setscene $0
special HealParty
playmapmusic
end
@@ -235,7 +231,7 @@ CherrygroveCitySign:
GuideGentsHouseSign:
jumptext GuideGentsHouseSignText
-CherrygroveCityPokeCenterSign:
+CherrygroveCityPokecenterSign:
jumpstd pokecentersign
CherrygroveCityMartSign:
@@ -358,7 +354,7 @@ GuideGentTourText1:
line "Follow me!"
done
-GuideGentPokeCenterText:
+GuideGentPokecenterText:
text "This is a #MON"
line "CENTER. They heal"
@@ -562,22 +558,22 @@ CherrygroveCity_MapEventHeader:
warp_def $9, $19, 1, GUIDE_GENTS_HOUSE
warp_def $b, $1f, 1, CHERRYGROVE_EVOLUTION_SPEECH_HOUSE
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 1, $6, $21, $0, CherrygroveSilverTriggerNorth, $0, $0
- xy_trigger 1, $7, $21, $0, CherrygroveSilverTriggerSouth, $0, $0
+ coord_event 1, $6, $21, CherrygroveSilverSceneNorth
+ coord_event 1, $7, $21, CherrygroveSilverSceneSouth
-.Signposts:
+.BGEvents:
db 4
- signpost 8, 30, SIGNPOST_READ, CherrygroveCitySign
- signpost 9, 23, SIGNPOST_READ, GuideGentsHouseSign
- signpost 3, 24, SIGNPOST_READ, CherrygroveCityMartSign
- signpost 3, 30, SIGNPOST_READ, CherrygroveCityPokeCenterSign
+ bg_event 8, 30, BGEVENT_READ, CherrygroveCitySign
+ bg_event 9, 23, BGEVENT_READ, GuideGentsHouseSign
+ bg_event 3, 24, BGEVENT_READ, CherrygroveCityMartSign
+ bg_event 3, 30, BGEVENT_READ, CherrygroveCityPokecenterSign
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_GRAMPS, 6, 32, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CherrygroveCityGuideGent, EVENT_GUIDE_GENT_IN_HIS_HOUSE
- person_event SPRITE_SILVER, 6, 39, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_CHERRYGROVE_CITY
- person_event SPRITE_TEACHER, 12, 27, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, CherrygroveTeacherScript, -1
- person_event SPRITE_YOUNGSTER, 7, 23, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CherrygroveYoungsterScript, -1
- person_event SPRITE_FISHER, 12, 7, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, MysticWaterGuy, -1
+ object_event SPRITE_GRAMPS, 6, 32, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CherrygroveCityGuideGent, EVENT_GUIDE_GENT_IN_HIS_HOUSE
+ object_event SPRITE_SILVER, 6, 39, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_CHERRYGROVE_CITY
+ object_event SPRITE_TEACHER, 12, 27, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CherrygroveTeacherScript, -1
+ object_event SPRITE_YOUNGSTER, 7, 23, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CherrygroveYoungsterScript, -1
+ object_event SPRITE_FISHER, 12, 7, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, MysticWaterGuy, -1
diff --git a/maps/CherrygroveEvolutionSpeechHouse.asm b/maps/CherrygroveEvolutionSpeechHouse.asm
index b737313f9..411e77d09 100644
--- a/maps/CherrygroveEvolutionSpeechHouse.asm
+++ b/maps/CherrygroveEvolutionSpeechHouse.asm
@@ -3,7 +3,7 @@ const_value set 2
const CHERRYGROVEEVOLUTIONSPEECHHOUSE_YOUNGSTER
CherrygroveEvolutionSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -50,15 +50,15 @@ CherrygroveEvolutionSpeechHouse_MapEventHeader:
warp_def $7, $2, 5, CHERRYGROVE_CITY
warp_def $7, $3, 5, CHERRYGROVE_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, CherrygroveEvolutionSpeechHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, CherrygroveEvolutionSpeechHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, CherrygroveEvolutionSpeechHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, CherrygroveEvolutionSpeechHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_LASS, 5, 3, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LassScript_0x196cb9, -1
- person_event SPRITE_YOUNGSTER, 5, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x196cb2, -1
+ object_event SPRITE_LASS, 5, 3, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, LassScript_0x196cb9, -1
+ object_event SPRITE_YOUNGSTER, 5, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x196cb2, -1
diff --git a/maps/CherrygroveGymSpeechHouse.asm b/maps/CherrygroveGymSpeechHouse.asm
index c556d8cb7..409624fe1 100644
--- a/maps/CherrygroveGymSpeechHouse.asm
+++ b/maps/CherrygroveGymSpeechHouse.asm
@@ -3,22 +3,22 @@ const_value set 2
const CHERRYGROVEGYMSPEECHHOUSE_BUG_CATCHER
CherrygroveGymSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-PokefanMScript_0x196ae1:
- jumptextfaceplayer UnknownText_0x196aea
+CherrygroveGymSpeechHousePokefanMScript:
+ jumptextfaceplayer CherrygroveGymSpeechHousePokefanMText
-BugCatcherScript_0x196ae4:
- jumptextfaceplayer UnknownText_0x196b65
+CherrygroveGymSpeechHouseBugCatcherScript:
+ jumptextfaceplayer CherrygroveGymSpeechHouseBugCatcherText
CherrygroveGymSpeechHouseBookshelf:
jumpstd picturebookshelf
-UnknownText_0x196aea:
+CherrygroveGymSpeechHousePokefanMText:
text "You're trying to"
line "see how good you"
@@ -32,7 +32,7 @@ UnknownText_0x196aea:
line "collect BADGES."
done
-UnknownText_0x196b65:
+CherrygroveGymSpeechHouseBugCatcherText:
text "When I get older,"
line "I'm going to be a"
cont "GYM LEADER!"
@@ -53,15 +53,15 @@ CherrygroveGymSpeechHouse_MapEventHeader:
warp_def $7, $2, 3, CHERRYGROVE_CITY
warp_def $7, $3, 3, CHERRYGROVE_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, CherrygroveGymSpeechHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, CherrygroveGymSpeechHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, CherrygroveGymSpeechHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, CherrygroveGymSpeechHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_POKEFAN_M, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x196ae1, -1
- person_event SPRITE_BUG_CATCHER, 5, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, BugCatcherScript_0x196ae4, -1
+ object_event SPRITE_POKEFAN_M, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CherrygroveGymSpeechHousePokefanMScript, -1
+ object_event SPRITE_BUG_CATCHER, 5, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CherrygroveGymSpeechHouseBugCatcherScript, -1
diff --git a/maps/CherrygroveMart.asm b/maps/CherrygroveMart.asm
index fe8a733eb..e835dbee2 100644
--- a/maps/CherrygroveMart.asm
+++ b/maps/CherrygroveMart.asm
@@ -4,7 +4,7 @@ const_value set 2
const CHERRYGROVEMART_YOUNGSTER
CherrygroveMart_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -39,8 +39,8 @@ UnknownScript_0x19682b:
closetext
end
-YoungsterScript_0x196831:
- jumptextfaceplayer UnknownText_0x1968a0
+CherrygroveMartYoungsterScript:
+ jumptextfaceplayer CherrygroveMartYoungsterText
UnknownText_0x196834:
text "They're fresh out"
@@ -56,7 +56,7 @@ UnknownText_0x196873:
cont "catch #MON!"
done
-UnknownText_0x1968a0:
+CherrygroveMartYoungsterText:
text "When I was walking"
line "in the grass, a"
@@ -80,14 +80,14 @@ CherrygroveMart_MapEventHeader:
warp_def $7, $2, 1, CHERRYGROVE_CITY
warp_def $7, $3, 1, CHERRYGROVE_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x19680a, -1
- person_event SPRITE_COOLTRAINER_M, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x19681d, -1
- person_event SPRITE_YOUNGSTER, 5, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x196831, -1
+ object_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x19680a, -1
+ object_event SPRITE_COOLTRAINER_M, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CooltrainerMScript_0x19681d, -1
+ object_event SPRITE_YOUNGSTER, 5, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CherrygroveMartYoungsterScript, -1
diff --git a/maps/CherrygrovePokeCenter1F.asm b/maps/CherrygrovePokeCenter1F.asm
deleted file mode 100644
index d3056b177..000000000
--- a/maps/CherrygrovePokeCenter1F.asm
+++ /dev/null
@@ -1,92 +0,0 @@
-const_value set 2
- const CHERRYGROVEPOKECENTER1F_NURSE
- const CHERRYGROVEPOKECENTER1F_FISHER
- const CHERRYGROVEPOKECENTER1F_GENTLEMAN
- const CHERRYGROVEPOKECENTER1F_TEACHER
-
-CherrygrovePokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x19696d:
- jumpstd pokecenternurse
-
-FisherScript_0x196970:
- jumptextfaceplayer UnknownText_0x19698a
-
-GentlemanScript_0x196973:
- jumptextfaceplayer UnknownText_0x1969c8
-
-TeacherScript_0x196976:
- faceplayer
- opentext
- checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
- iftrue UnknownScript_0x196984
- writetext UnknownText_0x1969f1
- waitbutton
- closetext
- end
-
-UnknownScript_0x196984:
- writetext UnknownText_0x196a46
- waitbutton
- closetext
- end
-
-UnknownText_0x19698a:
- text "It's great. I can"
- line "store any number"
-
- para "of #MON, and"
- line "it's all free."
- done
-
-UnknownText_0x1969c8:
- text "That PC is free"
- line "for any trainer"
- cont "to use."
- done
-
-UnknownText_0x1969f1:
- text "The COMMUNICATION"
- line "CENTER upstairs"
- cont "was just built."
-
- para "But they're still"
- line "finishing it up."
- done
-
-UnknownText_0x196a46:
- text "The COMMUNICATION"
- line "CENTER upstairs"
- cont "was just built."
-
- para "I traded #MON"
- line "there already!"
- done
-
-CherrygrovePokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 2, CHERRYGROVE_CITY
- warp_def $7, $4, 2, CHERRYGROVE_CITY
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 4
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x19696d, -1
- person_event SPRITE_FISHER, 3, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, FisherScript_0x196970, -1
- person_event SPRITE_GENTLEMAN, 6, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x196973, -1
- person_event SPRITE_TEACHER, 6, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TeacherScript_0x196976, -1
diff --git a/maps/CherrygrovePokecenter1F.asm b/maps/CherrygrovePokecenter1F.asm
new file mode 100644
index 000000000..f9b111012
--- /dev/null
+++ b/maps/CherrygrovePokecenter1F.asm
@@ -0,0 +1,92 @@
+const_value set 2
+ const CHERRYGROVEPOKECENTER1F_NURSE
+ const CHERRYGROVEPOKECENTER1F_FISHER
+ const CHERRYGROVEPOKECENTER1F_GENTLEMAN
+ const CHERRYGROVEPOKECENTER1F_TEACHER
+
+CherrygrovePokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x19696d:
+ jumpstd pokecenternurse
+
+CherrygrovePokecenter1FFisherScript:
+ jumptextfaceplayer CherrygrovePokecenter1FFisherText
+
+CherrygrovePokecenter1FGentlemanScript:
+ jumptextfaceplayer CherrygrovePokecenter1FGentlemanText
+
+TeacherScript_0x196976:
+ faceplayer
+ opentext
+ checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
+ iftrue UnknownScript_0x196984
+ writetext UnknownText_0x1969f1
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x196984:
+ writetext UnknownText_0x196a46
+ waitbutton
+ closetext
+ end
+
+CherrygrovePokecenter1FFisherText:
+ text "It's great. I can"
+ line "store any number"
+
+ para "of #MON, and"
+ line "it's all free."
+ done
+
+CherrygrovePokecenter1FGentlemanText:
+ text "That PC is free"
+ line "for any trainer"
+ cont "to use."
+ done
+
+UnknownText_0x1969f1:
+ text "The COMMUNICATION"
+ line "CENTER upstairs"
+ cont "was just built."
+
+ para "But they're still"
+ line "finishing it up."
+ done
+
+UnknownText_0x196a46:
+ text "The COMMUNICATION"
+ line "CENTER upstairs"
+ cont "was just built."
+
+ para "I traded #MON"
+ line "there already!"
+ done
+
+CherrygrovePokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 2, CHERRYGROVE_CITY
+ warp_def $7, $4, 2, CHERRYGROVE_CITY
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x19696d, -1
+ object_event SPRITE_FISHER, 3, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CherrygrovePokecenter1FFisherScript, -1
+ object_event SPRITE_GENTLEMAN, 6, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CherrygrovePokecenter1FGentlemanScript, -1
+ object_event SPRITE_TEACHER, 6, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x196976, -1
diff --git a/maps/CianwoodCity.asm b/maps/CianwoodCity.asm
index c6b2d8d28..23ea94742 100644
--- a/maps/CianwoodCity.asm
+++ b/maps/CianwoodCity.asm
@@ -13,23 +13,19 @@ const_value set 2
const CIANWOODCITY_SUICUNE
CianwoodCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPointAndSuicune
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
+.DummyScene1:
end
.FlyPointAndSuicune:
@@ -53,9 +49,9 @@ CianwoodCitySuicuneAndEusine:
applymovement CIANWOODCITY_SUICUNE, MovementData_0x1a00e0
disappear CIANWOODCITY_SUICUNE
pause 10
- dotrigger $0
+ setscene $0
clearevent EVENT_SAW_SUICUNE_ON_ROUTE_42
- domaptrigger ROUTE_42, $1
+ setmapscene ROUTE_42, $1
checkevent EVENT_FOUGHT_EUSINE
iftrue .Done
setevent EVENT_FOUGHT_EUSINE
@@ -124,8 +120,8 @@ CianwoodCityPokefanM:
CianwoodCityLass:
jumptextfaceplayer CianwoodCityLassText
-UnknownScript_0x1a00bc:
- jumptextfaceplayer UnknownText_0x1a03cc
+CianwoodCityUnknownScript:
+ jumptextfaceplayer CianwoodCityUnknownText
CianwoodCitySign:
jumptext CianwoodCitySignText
@@ -142,7 +138,7 @@ CianwoodPhotoStudioSign:
CianwoodPokeSeerSign:
jumptext CianwoodPokeSeerSignText
-CianwoodPokeCenterSign:
+CianwoodPokecenterSign:
jumpstd pokecentersign
CianwoodCityRock:
@@ -271,7 +267,7 @@ CianwoodCityLassText:
done
; possibly unused
-UnknownText_0x1a03cc:
+CianwoodCityUnknownText:
text "There are several"
line "islands between"
cont "here and OLIVINE."
@@ -398,32 +394,32 @@ CianwoodCity_MapEventHeader:
warp_def $25, $f, 1, CIANWOOD_LUGIA_SPEECH_HOUSE
warp_def $11, $5, 1, POKE_SEERS_HOUSE
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 1, $10, $b, $0, CianwoodCitySuicuneAndEusine, $0, $0
+ coord_event 1, $10, $b, CianwoodCitySuicuneAndEusine
-.Signposts:
+.BGEvents:
db 8
- signpost 34, 20, SIGNPOST_READ, CianwoodCitySign
- signpost 45, 7, SIGNPOST_READ, CianwoodGymSign
- signpost 43, 24, SIGNPOST_READ, CianwoodPokeCenterSign
- signpost 47, 19, SIGNPOST_READ, CianwoodPharmacySign
- signpost 32, 8, SIGNPOST_READ, CianwoodPhotoStudioSign
- signpost 24, 8, SIGNPOST_READ, CianwoodPokeSeerSign
- signpost 19, 4, SIGNPOST_ITEM, CianwoodCityHiddenRevive
- signpost 29, 5, SIGNPOST_ITEM, CianwoodCityHiddenMaxEther
-
-.PersonEvents:
+ bg_event 34, 20, BGEVENT_READ, CianwoodCitySign
+ bg_event 45, 7, BGEVENT_READ, CianwoodGymSign
+ bg_event 43, 24, BGEVENT_READ, CianwoodPokecenterSign
+ bg_event 47, 19, BGEVENT_READ, CianwoodPharmacySign
+ bg_event 32, 8, BGEVENT_READ, CianwoodPhotoStudioSign
+ bg_event 24, 8, BGEVENT_READ, CianwoodPokeSeerSign
+ bg_event 19, 4, BGEVENT_ITEM, CianwoodCityHiddenRevive
+ bg_event 29, 5, BGEVENT_ITEM, CianwoodCityHiddenMaxEther
+
+.ObjectEvents:
db 12
- person_event SPRITE_STANDING_YOUNGSTER, 37, 21, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CianwoodCityYoungster, -1
- person_event SPRITE_POKEFAN_M, 33, 17, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CianwoodCityPokefanM, -1
- person_event SPRITE_LASS, 42, 14, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CianwoodCityLass, -1
- person_event SPRITE_ROCK, 16, 8, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CianwoodCityRock, -1
- person_event SPRITE_ROCK, 17, 9, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CianwoodCityRock, -1
- person_event SPRITE_ROCK, 25, 4, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CianwoodCityRock, -1
- person_event SPRITE_ROCK, 29, 5, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CianwoodCityRock, -1
- person_event SPRITE_ROCK, 27, 10, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CianwoodCityRock, -1
- person_event SPRITE_ROCK, 19, 4, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CianwoodCityRock, -1
- person_event SPRITE_POKEFAN_F, 46, 10, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CianwoodCityChucksWife, -1
- person_event SPRITE_SUPER_NERD, 21, 11, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_CIANWOOD_CITY_EUSINE
- person_event SPRITE_SUICUNE, 14, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY
+ object_event SPRITE_STANDING_YOUNGSTER, 37, 21, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CianwoodCityYoungster, -1
+ object_event SPRITE_POKEFAN_M, 33, 17, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityPokefanM, -1
+ object_event SPRITE_LASS, 42, 14, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityLass, -1
+ object_event SPRITE_ROCK, 16, 8, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityRock, -1
+ object_event SPRITE_ROCK, 17, 9, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityRock, -1
+ object_event SPRITE_ROCK, 25, 4, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityRock, -1
+ object_event SPRITE_ROCK, 29, 5, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityRock, -1
+ object_event SPRITE_ROCK, 27, 10, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityRock, -1
+ object_event SPRITE_ROCK, 19, 4, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityRock, -1
+ object_event SPRITE_POKEFAN_F, 46, 10, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityChucksWife, -1
+ object_event SPRITE_SUPER_NERD, 21, 11, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_CIANWOOD_CITY_EUSINE
+ object_event SPRITE_SUICUNE, 14, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY
diff --git a/maps/CianwoodCityPhotoStudio.asm b/maps/CianwoodCityPhotoStudio.asm
index 026050f6a..0a901ff28 100644
--- a/maps/CianwoodCityPhotoStudio.asm
+++ b/maps/CianwoodCityPhotoStudio.asm
@@ -2,7 +2,7 @@ const_value set 2
const CIANWOODCITYPHOTOSTUDIO_FISHING_GURU
CianwoodCityPhotoStudio_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -57,12 +57,12 @@ CianwoodCityPhotoStudio_MapEventHeader:
warp_def $7, $2, 5, CIANWOOD_CITY
warp_def $7, $3, 5, CIANWOOD_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_FISHING_GURU, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, FishingGuruScript_0x9e0e0, -1
+ object_event SPRITE_FISHING_GURU, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, FishingGuruScript_0x9e0e0, -1
diff --git a/maps/CianwoodGym.asm b/maps/CianwoodGym.asm
index 6e7f508ec..34c6df728 100644
--- a/maps/CianwoodGym.asm
+++ b/maps/CianwoodGym.asm
@@ -10,7 +10,7 @@ const_value set 2
const CIANWOODGYM_BOULDER4
CianwoodGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -50,7 +50,7 @@ ChuckScript_0x9d60f:
waitsfx
setflag ENGINE_STORMBADGE
checkcode VAR_BADGES
- scall CianwoodGymTriggerRockets
+ scall CianwoodGymActivateRockets
.FightDone:
checkevent EVENT_GOT_TM01_DYNAMICPUNCH
iftrue .AlreadyGotTM
@@ -75,7 +75,7 @@ ChuckScript_0x9d60f:
closetext
end
-CianwoodGymTriggerRockets:
+CianwoodGymActivateRockets:
if_equal 7, .RadioTowerRockets
if_equal 6, .GoldenrodRockets
end
@@ -314,22 +314,22 @@ CianwoodGym_MapEventHeader:
warp_def $11, $4, 2, CIANWOOD_CITY
warp_def $11, $5, 2, CIANWOOD_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 15, 3, SIGNPOST_READ, CianwoodGymStatue
- signpost 15, 6, SIGNPOST_READ, CianwoodGymStatue
+ bg_event 15, 3, BGEVENT_READ, CianwoodGymStatue
+ bg_event 15, 6, BGEVENT_READ, CianwoodGymStatue
-.PersonEvents:
+.ObjectEvents:
db 9
- person_event SPRITE_CHUCK, 1, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, ChuckScript_0x9d60f, -1
- person_event SPRITE_BLACK_BELT, 12, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerBlackbeltYoshi, -1
- person_event SPRITE_BLACK_BELT, 12, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerBlackbeltLao, -1
- person_event SPRITE_BLACK_BELT, 9, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerBlackbeltNob, -1
- person_event SPRITE_BLACK_BELT, 5, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 1, TrainerBlackbeltLung, -1
- person_event SPRITE_BOULDER, 1, 5, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CianwoodGymBoulder, -1
- person_event SPRITE_BOULDER, 7, 3, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CianwoodGymBoulder, -1
- person_event SPRITE_BOULDER, 7, 4, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CianwoodGymBoulder, -1
- person_event SPRITE_BOULDER, 7, 5, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CianwoodGymBoulder, -1
+ object_event SPRITE_CHUCK, 1, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, ChuckScript_0x9d60f, -1
+ object_event SPRITE_BLACK_BELT, 12, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBlackbeltYoshi, -1
+ object_event SPRITE_BLACK_BELT, 12, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBlackbeltLao, -1
+ object_event SPRITE_BLACK_BELT, 9, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerBlackbeltNob, -1
+ object_event SPRITE_BLACK_BELT, 5, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerBlackbeltLung, -1
+ object_event SPRITE_BOULDER, 1, 5, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodGymBoulder, -1
+ object_event SPRITE_BOULDER, 7, 3, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodGymBoulder, -1
+ object_event SPRITE_BOULDER, 7, 4, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodGymBoulder, -1
+ object_event SPRITE_BOULDER, 7, 5, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodGymBoulder, -1
diff --git a/maps/CianwoodLugiaSpeechHouse.asm b/maps/CianwoodLugiaSpeechHouse.asm
index 0ab10dd82..2457ef435 100644
--- a/maps/CianwoodLugiaSpeechHouse.asm
+++ b/maps/CianwoodLugiaSpeechHouse.asm
@@ -4,25 +4,25 @@ const_value set 2
const CIANWOODLUGIASPEECHHOUSE_TWIN
CianwoodLugiaSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-TeacherScript_0x9e1b0:
- jumptextfaceplayer UnknownText_0x9e1bc
+CianwoodLugiaSpeechHouseTeacherScript:
+ jumptextfaceplayer CianwoodLugiaSpeechHouseTeacherText
-LassScript_0x9e1b3:
- jumptextfaceplayer UnknownText_0x9e23f
+CianwoodLugiaSpeechHouseLassScript:
+ jumptextfaceplayer CianwoodLugiaSpeechHouseLassText
-TwinScript_0x9e1b6:
- jumptextfaceplayer UnknownText_0x9e2a9
+CianwoodLugiaSpeechHouseTwinScript:
+ jumptextfaceplayer CianwoodLugiaSpeechHouseTwinText
CianwoodLugiaSpeechHouseBookshelf:
jumpstd picturebookshelf
-UnknownText_0x9e1bc:
+CianwoodLugiaSpeechHouseTeacherText:
text "You came from"
line "OLIVINE?"
@@ -36,7 +36,7 @@ UnknownText_0x9e1bc:
cont "them."
done
-UnknownText_0x9e23f:
+CianwoodLugiaSpeechHouseLassText:
text "I heard that you"
line "can only see it if"
@@ -48,7 +48,7 @@ UnknownText_0x9e23f:
cont "creature."
done
-UnknownText_0x9e2a9:
+CianwoodLugiaSpeechHouseTwinText:
text "I've heard that"
line "the whirlpools"
@@ -70,16 +70,16 @@ CianwoodLugiaSpeechHouse_MapEventHeader:
warp_def $7, $2, 6, CIANWOOD_CITY
warp_def $7, $3, 6, CIANWOOD_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, CianwoodLugiaSpeechHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, CianwoodLugiaSpeechHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, CianwoodLugiaSpeechHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, CianwoodLugiaSpeechHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_TEACHER, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TeacherScript_0x9e1b0, -1
- person_event SPRITE_LASS, 5, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LassScript_0x9e1b3, -1
- person_event SPRITE_TWIN, 2, 0, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, TwinScript_0x9e1b6, -1
+ object_event SPRITE_TEACHER, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodLugiaSpeechHouseTeacherScript, -1
+ object_event SPRITE_LASS, 5, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CianwoodLugiaSpeechHouseLassScript, -1
+ object_event SPRITE_TWIN, 2, 0, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CianwoodLugiaSpeechHouseTwinScript, -1
diff --git a/maps/CianwoodPharmacy.asm b/maps/CianwoodPharmacy.asm
index 2a3f49c9d..4a6cf826e 100644
--- a/maps/CianwoodPharmacy.asm
+++ b/maps/CianwoodPharmacy.asm
@@ -2,16 +2,14 @@ const_value set 2
const CIANWOODPHARMACY_PHARMACIST
CianwoodPharmacy_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 1
-
- ; triggers
- dw CianwoodPharmacyTrigger, 0
+ scene_script .DummyScene
.MapCallbacks:
db 0
-CianwoodPharmacyTrigger:
+.DummyScene:
end
CianwoodPharmacist:
@@ -83,14 +81,14 @@ CianwoodPharmacy_MapEventHeader:
warp_def $7, $2, 4, CIANWOOD_CITY
warp_def $7, $3, 4, CIANWOOD_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, CianwoodPharmacyBookshelf
- signpost 1, 1, SIGNPOST_READ, CianwoodPharmacyBookshelf
+ bg_event 1, 0, BGEVENT_READ, CianwoodPharmacyBookshelf
+ bg_event 1, 1, BGEVENT_READ, CianwoodPharmacyBookshelf
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_PHARMACIST, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CianwoodPharmacist, -1
+ object_event SPRITE_PHARMACIST, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CianwoodPharmacist, -1
diff --git a/maps/CianwoodPokeCenter1F.asm b/maps/CianwoodPokeCenter1F.asm
deleted file mode 100644
index 7cd5818d5..000000000
--- a/maps/CianwoodPokeCenter1F.asm
+++ /dev/null
@@ -1,155 +0,0 @@
-const_value set 2
- const CIANWOODPOKECENTER1F_NURSE
- const CIANWOODPOKECENTER1F_LASS
- const CIANWOODPOKECENTER1F_GYM_GUY
- const CIANWOODPOKECENTER1F_SUPER_NERD
-
-CianwoodPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x9dbcf:
- jumpstd pokecenternurse
-
-LassScript_0x9dbd2:
- jumptextfaceplayer UnknownText_0x9dbed
-
-CianwoodGymGuyScript:
- faceplayer
- checkevent EVENT_BEAT_CHUCK
- iftrue .CianwoodGymGuyWinScript
- opentext
- writetext CianwoodGymGuyText
- waitbutton
- closetext
- end
-
-.CianwoodGymGuyWinScript:
- opentext
- writetext CianwoodGymGuyWinText
- waitbutton
- closetext
- end
-
-SuperNerdScript_0x9dbea:
- jumptextfaceplayer UnknownText_0x9ded7
-
-UnknownText_0x9dbed:
- text "Did you meet the"
- line "#MANIAC?"
-
- para "He's always brag-"
- line "ging about his"
- cont "rare #MON."
- done
-
-CianwoodGymGuyText:
- text "The #MON GYM"
- line "trainers here are"
- cont "macho bullies."
-
- para "If I stick around,"
- line "they might come"
- cont "after me."
-
- para "Here's some ad-"
- line "vice: the GYM"
-
- para "LEADER uses the"
- line "fighting-type."
-
- para "So you should"
- line "confound him with"
- cont "psychic #MON."
-
- para "Wipe out his #-"
- line "MON before they"
-
- para "can use their"
- line "physical strength."
-
- para "And those boulders"
- line "in the middle of"
- cont "the GYM?"
-
- para "If you don't move"
- line "them correctly,"
-
- para "you won't reach"
- line "the GYM LEADER."
-
- para "If you get stuck,"
- line "go outside."
- done
-
-CianwoodGymGuyWinText:
- text "<PLAYER>! You won!"
- line "I could tell by"
- cont "looking at you!"
- done
-
-UnknownText_0x9ddf2:
- text "Don't you get the"
- line "urge to show off"
-
- para "your #MON to"
- line "friends?"
-
- para "I wish I could"
- line "show the #MON I"
-
- para "raised to my pal"
- line "in VIOLET."
- done
-
-UnknownText_0x9de66:
- text "I've been battling"
- line "my pal in VIOLET"
-
- para "using a MOBILE"
- line "ADAPTER link."
-
- para "I'm down 5-7"
- line "against him. I've"
- cont "gotta crank it up!"
- done
-
-UnknownText_0x9ded7:
- text "I love showing off"
- line "the #MON that"
-
- para "I've raised."
- line "Don't you?"
-
- para "I'm going to get"
- line "into a bunch of"
-
- para "battles, and show"
- line "off my #MON!"
- done
-
-CianwoodPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 3, CIANWOOD_CITY
- warp_def $7, $4, 3, CIANWOOD_CITY
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 4
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x9dbcf, -1
- person_event SPRITE_LASS, 5, 1, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LassScript_0x9dbd2, -1
- person_event SPRITE_GYM_GUY, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CianwoodGymGuyScript, -1
- person_event SPRITE_SUPER_NERD, 6, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x9dbea, -1
diff --git a/maps/CianwoodPokecenter1F.asm b/maps/CianwoodPokecenter1F.asm
new file mode 100644
index 000000000..ab39de7ca
--- /dev/null
+++ b/maps/CianwoodPokecenter1F.asm
@@ -0,0 +1,155 @@
+const_value set 2
+ const CIANWOODPOKECENTER1F_NURSE
+ const CIANWOODPOKECENTER1F_LASS
+ const CIANWOODPOKECENTER1F_GYM_GUY
+ const CIANWOODPOKECENTER1F_SUPER_NERD
+
+CianwoodPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x9dbcf:
+ jumpstd pokecenternurse
+
+CianwoodPokecenter1FLassScript:
+ jumptextfaceplayer CianwoodPokecenter1FLassText
+
+CianwoodGymGuyScript:
+ faceplayer
+ checkevent EVENT_BEAT_CHUCK
+ iftrue .CianwoodGymGuyWinScript
+ opentext
+ writetext CianwoodGymGuyText
+ waitbutton
+ closetext
+ end
+
+.CianwoodGymGuyWinScript:
+ opentext
+ writetext CianwoodGymGuyWinText
+ waitbutton
+ closetext
+ end
+
+CianwoodPokecenter1FSuperNerdScript:
+ jumptextfaceplayer CianwoodPokecenter1FSuperNerdText
+
+CianwoodPokecenter1FLassText:
+ text "Did you meet the"
+ line "#MANIAC?"
+
+ para "He's always brag-"
+ line "ging about his"
+ cont "rare #MON."
+ done
+
+CianwoodGymGuyText:
+ text "The #MON GYM"
+ line "trainers here are"
+ cont "macho bullies."
+
+ para "If I stick around,"
+ line "they might come"
+ cont "after me."
+
+ para "Here's some ad-"
+ line "vice: the GYM"
+
+ para "LEADER uses the"
+ line "fighting-type."
+
+ para "So you should"
+ line "confound him with"
+ cont "psychic #MON."
+
+ para "Wipe out his #-"
+ line "MON before they"
+
+ para "can use their"
+ line "physical strength."
+
+ para "And those boulders"
+ line "in the middle of"
+ cont "the GYM?"
+
+ para "If you don't move"
+ line "them correctly,"
+
+ para "you won't reach"
+ line "the GYM LEADER."
+
+ para "If you get stuck,"
+ line "go outside."
+ done
+
+CianwoodGymGuyWinText:
+ text "<PLAYER>! You won!"
+ line "I could tell by"
+ cont "looking at you!"
+ done
+
+UnknownText_0x9ddf2:
+ text "Don't you get the"
+ line "urge to show off"
+
+ para "your #MON to"
+ line "friends?"
+
+ para "I wish I could"
+ line "show the #MON I"
+
+ para "raised to my pal"
+ line "in VIOLET."
+ done
+
+UnknownText_0x9de66:
+ text "I've been battling"
+ line "my pal in VIOLET"
+
+ para "using a MOBILE"
+ line "ADAPTER link."
+
+ para "I'm down 5-7"
+ line "against him. I've"
+ cont "gotta crank it up!"
+ done
+
+CianwoodPokecenter1FSuperNerdText:
+ text "I love showing off"
+ line "the #MON that"
+
+ para "I've raised."
+ line "Don't you?"
+
+ para "I'm going to get"
+ line "into a bunch of"
+
+ para "battles, and show"
+ line "off my #MON!"
+ done
+
+CianwoodPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 3, CIANWOOD_CITY
+ warp_def $7, $4, 3, CIANWOOD_CITY
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x9dbcf, -1
+ object_event SPRITE_LASS, 5, 1, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CianwoodPokecenter1FLassScript, -1
+ object_event SPRITE_GYM_GUY, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CianwoodGymGuyScript, -1
+ object_event SPRITE_SUPER_NERD, 6, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CianwoodPokecenter1FSuperNerdScript, -1
diff --git a/maps/CinnabarIsland.asm b/maps/CinnabarIsland.asm
index 62e79ad4f..f5723a4fd 100644
--- a/maps/CinnabarIsland.asm
+++ b/maps/CinnabarIsland.asm
@@ -2,13 +2,11 @@ const_value set 2
const CINNABARISLAND_BLUE
CinnabarIsland_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
@@ -33,7 +31,7 @@ CinnabarIslandGymSign:
CinnabarIslandSign:
jumptext CinnabarIslandSignText
-CinnabarIslandPokeCenterSign:
+CinnabarIslandPokecenterSign:
jumpstd pokecentersign
CinnabarIslandHiddenRareCandy:
@@ -137,16 +135,16 @@ CinnabarIsland_MapEventHeader:
db 1
warp_def $b, $b, 1, CINNABAR_POKECENTER_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 4
- signpost 11, 12, SIGNPOST_READ, CinnabarIslandPokeCenterSign
- signpost 11, 9, SIGNPOST_READ, CinnabarIslandGymSign
- signpost 7, 7, SIGNPOST_READ, CinnabarIslandSign
- signpost 1, 9, SIGNPOST_ITEM, CinnabarIslandHiddenRareCandy
+ bg_event 11, 12, BGEVENT_READ, CinnabarIslandPokecenterSign
+ bg_event 11, 9, BGEVENT_READ, CinnabarIslandGymSign
+ bg_event 7, 7, BGEVENT_READ, CinnabarIslandSign
+ bg_event 1, 9, BGEVENT_ITEM, CinnabarIslandHiddenRareCandy
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_BLUE, 6, 9, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CinnabarIslandBlue, EVENT_BLUE_IN_CINNABAR
+ object_event SPRITE_BLUE, 6, 9, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CinnabarIslandBlue, EVENT_BLUE_IN_CINNABAR
diff --git a/maps/CinnabarPokeCenter1F.asm b/maps/CinnabarPokeCenter1F.asm
deleted file mode 100644
index a97aae5c6..000000000
--- a/maps/CinnabarPokeCenter1F.asm
+++ /dev/null
@@ -1,57 +0,0 @@
-const_value set 2
- const CINNABARPOKECENTER1F_NURSE
- const CINNABARPOKECENTER1F_COOLTRAINER_F
- const CINNABARPOKECENTER1F_FISHER
-
-CinnabarPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x1ab32c:
- jumpstd pokecenternurse
-
-CooltrainerFScript_0x1ab32f:
- jumptextfaceplayer UnknownText_0x1ab335
-
-FisherScript_0x1ab332:
- jumptextfaceplayer UnknownText_0x1ab37f
-
-UnknownText_0x1ab335:
- text "CINNABAR GYM's"
- line "BLAINE apparently"
-
- para "lives alone in the"
- line "SEAFOAM ISLANDS"
- cont "cave…"
- done
-
-UnknownText_0x1ab37f:
- text "It's been a year"
- line "since the volcano"
- cont "erupted."
- done
-
-CinnabarPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 1, CINNABAR_ISLAND
- warp_def $7, $4, 1, CINNABAR_ISLAND
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 3
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x1ab32c, -1
- person_event SPRITE_COOLTRAINER_F, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x1ab32f, -1
- person_event SPRITE_FISHER, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FisherScript_0x1ab332, -1
diff --git a/maps/CinnabarPokeCenter2FBeta.asm b/maps/CinnabarPokeCenter2FBeta.asm
deleted file mode 100644
index fb9d96b7a..000000000
--- a/maps/CinnabarPokeCenter2FBeta.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-CinnabarPokeCenter2FBeta_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-CinnabarPokeCenter2FBeta_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 1
- warp_def $7, $0, 3, CINNABAR_POKECENTER_1F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/CinnabarPokecenter1F.asm b/maps/CinnabarPokecenter1F.asm
new file mode 100644
index 000000000..a079b8df0
--- /dev/null
+++ b/maps/CinnabarPokecenter1F.asm
@@ -0,0 +1,57 @@
+const_value set 2
+ const CINNABARPOKECENTER1F_NURSE
+ const CINNABARPOKECENTER1F_COOLTRAINER_F
+ const CINNABARPOKECENTER1F_FISHER
+
+CinnabarPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x1ab32c:
+ jumpstd pokecenternurse
+
+CinnabarPokecenter1FCooltrainerFScript:
+ jumptextfaceplayer CinnabarPokecenter1FCooltrainerFText
+
+CinnabarPokecenter1FFisherScript:
+ jumptextfaceplayer CinnabarPokecenter1FFisherText
+
+CinnabarPokecenter1FCooltrainerFText:
+ text "CINNABAR GYM's"
+ line "BLAINE apparently"
+
+ para "lives alone in the"
+ line "SEAFOAM ISLANDS"
+ cont "cave…"
+ done
+
+CinnabarPokecenter1FFisherText:
+ text "It's been a year"
+ line "since the volcano"
+ cont "erupted."
+ done
+
+CinnabarPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 1, CINNABAR_ISLAND
+ warp_def $7, $4, 1, CINNABAR_ISLAND
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 3
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x1ab32c, -1
+ object_event SPRITE_COOLTRAINER_F, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CinnabarPokecenter1FCooltrainerFScript, -1
+ object_event SPRITE_FISHER, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CinnabarPokecenter1FFisherScript, -1
diff --git a/maps/CinnabarPokecenter2FBeta.asm b/maps/CinnabarPokecenter2FBeta.asm
new file mode 100644
index 000000000..3ef9d77c7
--- /dev/null
+++ b/maps/CinnabarPokecenter2FBeta.asm
@@ -0,0 +1,23 @@
+CinnabarPokecenter2FBeta_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+CinnabarPokecenter2FBeta_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 1
+ warp_def $7, $0, 3, CINNABAR_POKECENTER_1F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/Colosseum.asm b/maps/Colosseum.asm
index 25794f5c0..b17f10d30 100644
--- a/maps/Colosseum.asm
+++ b/maps/Colosseum.asm
@@ -3,34 +3,28 @@ const_value set 2
const COLOSSEUM_CHRIS2
Colosseum_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 3
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
- maptrigger .Trigger2
+ scene_script .InitializeColosseum
+ scene_script .DummyScene1
+ scene_script .DummyScene2
.MapCallbacks:
db 2
+ dbw MAPCALLBACK_OBJECTS, .SetWhichChris
+ dbw MAPCALLBACK_NEWMAP, .PreparePokecenter2F
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, ColosseumScript_SetWhichChris
-
- dbw MAPCALLBACK_NEWMAP, ColosseumScript_InitializeCB
-
-.Trigger0:
- priorityjump ColosseumScript_Initialize
+.InitializeColosseum:
+ priorityjump .InitializeAndPreparePokecenter2F
end
-.Trigger1:
+.DummyScene1:
end
-.Trigger2:
+.DummyScene2:
end
-ColosseumScript_SetWhichChris:
+.SetWhichChris:
special Special_CableClubCheckWhichChris
iffalse .Chris2
disappear COLOSSEUM_CHRIS2
@@ -42,13 +36,13 @@ ColosseumScript_SetWhichChris:
appear COLOSSEUM_CHRIS2
return
-ColosseumScript_InitializeCB:
- domaptrigger POKECENTER_2F, $2
+.PreparePokecenter2F:
+ setmapscene POKECENTER_2F, $2
return
-ColosseumScript_Initialize:
- dotrigger $1
- domaptrigger POKECENTER_2F, $2
+.InitializeAndPreparePokecenter2F:
+ setscene $1
+ setmapscene POKECENTER_2F, $2
end
MapColosseumSignpost1Script:
@@ -77,15 +71,15 @@ Colosseum_MapEventHeader:
warp_def $7, $4, 3, POKECENTER_2F
warp_def $7, $5, 3, POKECENTER_2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 4, 4, SIGNPOST_RIGHT, MapColosseumSignpost1Script
- signpost 4, 5, SIGNPOST_LEFT, MapColosseumSignpost1Script
+ bg_event 4, 4, BGEVENT_RIGHT, MapColosseumSignpost1Script
+ bg_event 4, 5, BGEVENT_LEFT, MapColosseumSignpost1Script
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_CHRIS, 4, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ChrisScript_0x193499, EVENT_GAVE_KURT_APRICORNS
- person_event SPRITE_CHRIS, 4, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ChrisScript_0x193499, EVENT_RECEIVED_BALLS_FROM_KURT
+ object_event SPRITE_CHRIS, 4, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ChrisScript_0x193499, EVENT_GAVE_KURT_APRICORNS
+ object_event SPRITE_CHRIS, 4, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ChrisScript_0x193499, EVENT_RECEIVED_BALLS_FROM_KURT
diff --git a/maps/CopycatsHouse1F.asm b/maps/CopycatsHouse1F.asm
index cf8bd771c..e1df41b43 100644
--- a/maps/CopycatsHouse1F.asm
+++ b/maps/CopycatsHouse1F.asm
@@ -4,14 +4,14 @@ const_value set 2
const COPYCATSHOUSE1F_CLEFAIRY
CopycatsHouse1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-PokefanMScript_0x18ad13:
- jumptextfaceplayer UnknownText_0x18ad34
+CopycatsHouse1FPokefanMScript:
+ jumptextfaceplayer CopycatsHouse1FPokefanMText
PokefanFScript_0x18ad16:
faceplayer
@@ -37,7 +37,7 @@ ClefairyScript_0x18ad2a:
closetext
end
-UnknownText_0x18ad34:
+CopycatsHouse1FPokefanMText:
text "My daughter likes"
line "to mimic people."
@@ -82,14 +82,14 @@ CopycatsHouse1F_MapEventHeader:
warp_def $7, $3, 8, SAFFRON_CITY
warp_def $0, $2, 1, COPYCATS_HOUSE_2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_POKEFAN_M, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x18ad13, -1
- person_event SPRITE_POKEFAN_F, 4, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x18ad16, -1
- person_event SPRITE_CLEFAIRY, 6, 6, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClefairyScript_0x18ad2a, -1
+ object_event SPRITE_POKEFAN_M, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CopycatsHouse1FPokefanMScript, -1
+ object_event SPRITE_POKEFAN_F, 4, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PokefanFScript_0x18ad16, -1
+ object_event SPRITE_CLEFAIRY, 6, 6, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClefairyScript_0x18ad2a, -1
diff --git a/maps/CopycatsHouse2F.asm b/maps/CopycatsHouse2F.asm
index 41689241d..73fe945e5 100644
--- a/maps/CopycatsHouse2F.asm
+++ b/maps/CopycatsHouse2F.asm
@@ -7,14 +7,11 @@ const_value set 2
const COPYCATSHOUSE2F_COPYCAT2 ; if player is female
CopycatsHouse2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_OBJECTS, .Callback
.Callback:
@@ -371,19 +368,19 @@ CopycatsHouse2F_MapEventHeader:
db 1
warp_def $0, $3, 3, COPYCATS_HOUSE_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, CopycatsHouse2FBookshelf
- signpost 1, 1, SIGNPOST_READ, CopycatsHouse2FBookshelf
+ bg_event 1, 0, BGEVENT_READ, CopycatsHouse2FBookshelf
+ bg_event 1, 1, BGEVENT_READ, CopycatsHouse2FBookshelf
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_COPYCAT, 3, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, Copycat, EVENT_COPYCAT_1
- person_event SPRITE_MOLTRES, 4, 6, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, CopycatsDodrio, -1
- person_event SPRITE_FAIRY, 1, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CopycatsHouse2FDoll, EVENT_COPYCATS_HOUSE_2F_DOLL
- person_event SPRITE_MONSTER, 1, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CopycatsHouse2FDoll, -1
- person_event SPRITE_BIRD, 1, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, CopycatsHouse2FDoll, -1
- person_event SPRITE_COPYCAT, 3, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, Copycat, EVENT_COPYCAT_2
+ object_event SPRITE_COPYCAT, 3, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Copycat, EVENT_COPYCAT_1
+ object_event SPRITE_MOLTRES, 4, 6, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CopycatsDodrio, -1
+ object_event SPRITE_FAIRY, 1, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CopycatsHouse2FDoll, EVENT_COPYCATS_HOUSE_2F_DOLL
+ object_event SPRITE_MONSTER, 1, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CopycatsHouse2FDoll, -1
+ object_event SPRITE_BIRD, 1, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CopycatsHouse2FDoll, -1
+ object_event SPRITE_COPYCAT, 3, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Copycat, EVENT_COPYCAT_2
diff --git a/maps/DanceTheatre.asm b/maps/DanceTheatre.asm
index d4a647207..58184be24 100644
--- a/maps/DanceTheatre.asm
+++ b/maps/DanceTheatre.asm
@@ -10,63 +10,63 @@ const_value set 2
const DANCETHEATRE_GRANNY
DanceTheatre_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerKimono_girlNaoko2:
- trainer EVENT_BEAT_KIMONO_GIRL_NAOKO, KIMONO_GIRL, NAOKO2, Kimono_girlNaoko2SeenText, Kimono_girlNaoko2BeatenText, 0, Kimono_girlNaoko2Script
+ trainer EVENT_BEAT_KIMONO_GIRL_NAOKO, KIMONO_GIRL, NAOKO2, Kimono_girlNaoko2SeenText, Kimono_girlNaoko2BeatenText, 0, .Script
-Kimono_girlNaoko2Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x99579
+ writetext Kimono_girlNaoko2AfterBattleText
waitbutton
closetext
end
TrainerKimono_girlSayo:
- trainer EVENT_BEAT_KIMONO_GIRL_SAYO, KIMONO_GIRL, SAYO, Kimono_girlSayoSeenText, Kimono_girlSayoBeatenText, 0, Kimono_girlSayoScript
+ trainer EVENT_BEAT_KIMONO_GIRL_SAYO, KIMONO_GIRL, SAYO, Kimono_girlSayoSeenText, Kimono_girlSayoBeatenText, 0, .Script
-Kimono_girlSayoScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x9960b
+ writetext Kimono_girlSayoAfterBattleText
waitbutton
closetext
end
TrainerKimono_girlZuki:
- trainer EVENT_BEAT_KIMONO_GIRL_ZUKI, KIMONO_GIRL, ZUKI, Kimono_girlZukiSeenText, Kimono_girlZukiBeatenText, 0, Kimono_girlZukiScript
+ trainer EVENT_BEAT_KIMONO_GIRL_ZUKI, KIMONO_GIRL, ZUKI, Kimono_girlZukiSeenText, Kimono_girlZukiBeatenText, 0, .Script
-Kimono_girlZukiScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x99688
+ writetext Kimono_girlZukiAfterBattleText
waitbutton
closetext
end
TrainerKimono_girlKuni:
- trainer EVENT_BEAT_KIMONO_GIRL_KUNI, KIMONO_GIRL, KUNI, Kimono_girlKuniSeenText, Kimono_girlKuniBeatenText, 0, Kimono_girlKuniScript
+ trainer EVENT_BEAT_KIMONO_GIRL_KUNI, KIMONO_GIRL, KUNI, Kimono_girlKuniSeenText, Kimono_girlKuniBeatenText, 0, .Script
-Kimono_girlKuniScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x99714
+ writetext Kimono_girlKuniAfterBattleText
waitbutton
closetext
end
TrainerKimono_girlMiki:
- trainer EVENT_BEAT_KIMONO_GIRL_MIKI, KIMONO_GIRL, MIKI, Kimono_girlMikiSeenText, Kimono_girlMikiBeatenText, 0, Kimono_girlMikiScript
+ trainer EVENT_BEAT_KIMONO_GIRL_MIKI, KIMONO_GIRL, MIKI, Kimono_girlMikiSeenText, Kimono_girlMikiBeatenText, 0, .Script
-Kimono_girlMikiScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x997a8
+ writetext Kimono_girlMikiAfterBattleText
waitbutton
closetext
end
@@ -128,11 +128,11 @@ RhydonScript_0x9951b:
closetext
end
-CooltrainerMScript_0x99525:
- jumptextfaceplayer UnknownText_0x99a24
+DanceTheatreCooltrainerMScript:
+ jumptextfaceplayer DanceTheatreCooltrainerMText
-GrannyScript_0x99528:
- jumptextfaceplayer UnknownText_0x99aaa
+DanceTheatreGrannyScript:
+ jumptextfaceplayer DanceTheatreGrannyText
MapDanceTheatreSignpost1Script:
jumptext UnknownText_0x99b79
@@ -148,7 +148,7 @@ Kimono_girlNaoko2BeatenText:
line "strong."
done
-UnknownText_0x99579:
+Kimono_girlNaoko2AfterBattleText:
text "I enjoyed that"
line "bout. I would like"
cont "to see you again."
@@ -167,7 +167,7 @@ Kimono_girlSayoBeatenText:
line "I almost had you."
done
-UnknownText_0x9960b:
+Kimono_girlSayoAfterBattleText:
text "Rhythm is impor-"
line "tant for both"
@@ -188,7 +188,7 @@ Kimono_girlZukiBeatenText:
line "#MON left…"
done
-UnknownText_0x99688:
+Kimono_girlZukiAfterBattleText:
text "I put a different"
line "flower in my bar-"
cont "rette every month."
@@ -205,7 +205,7 @@ Kimono_girlKuniBeatenText:
line "than you look."
done
-UnknownText_0x99714:
+Kimono_girlKuniAfterBattleText:
text "I trained a lot,"
line "so I thought I was"
@@ -224,7 +224,7 @@ Kimono_girlMikiBeatenText:
line "at #MON too."
done
-UnknownText_0x997a8:
+Kimono_girlMikiAfterBattleText:
text "I can keep dancing"
line "because there are"
@@ -298,7 +298,7 @@ UnknownText_0x99a0a:
line "gugogooh!"
done
-UnknownText_0x99a24:
+DanceTheatreCooltrainerMText:
text "That man's always"
line "with his RHYDON."
@@ -312,7 +312,7 @@ UnknownText_0x99a24:
cont "#MON?"
done
-UnknownText_0x99aaa:
+DanceTheatreGrannyText:
text "The KIMONO GIRLS"
line "are so beautiful…"
@@ -346,22 +346,22 @@ DanceTheatre_MapEventHeader:
warp_def $d, $5, 8, ECRUTEAK_CITY
warp_def $d, $6, 8, ECRUTEAK_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 6, 5, SIGNPOST_UP, MapDanceTheatreSignpost1Script
- signpost 6, 6, SIGNPOST_UP, MapDanceTheatreSignpost1Script
+ bg_event 6, 5, BGEVENT_UP, MapDanceTheatreSignpost1Script
+ bg_event 6, 6, BGEVENT_UP, MapDanceTheatreSignpost1Script
-.PersonEvents:
+.ObjectEvents:
db 9
- person_event SPRITE_KIMONO_GIRL, 2, 0, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 0, TrainerKimono_girlNaoko2, -1
- person_event SPRITE_KIMONO_GIRL, 1, 2, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 0, TrainerKimono_girlSayo, -1
- person_event SPRITE_KIMONO_GIRL, 2, 6, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 0, TrainerKimono_girlZuki, -1
- person_event SPRITE_KIMONO_GIRL, 1, 9, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 0, TrainerKimono_girlKuni, -1
- person_event SPRITE_KIMONO_GIRL, 2, 11, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 0, TrainerKimono_girlMiki, -1
- person_event SPRITE_GENTLEMAN, 10, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x994c6, -1
- person_event SPRITE_RHYDON, 8, 6, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, RhydonScript_0x9951b, -1
- person_event SPRITE_COOLTRAINER_M, 10, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x99525, -1
- person_event SPRITE_GRANNY, 6, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrannyScript_0x99528, -1
+ object_event SPRITE_KIMONO_GIRL, 2, 0, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 0, TrainerKimono_girlNaoko2, -1
+ object_event SPRITE_KIMONO_GIRL, 1, 2, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 0, TrainerKimono_girlSayo, -1
+ object_event SPRITE_KIMONO_GIRL, 2, 6, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 0, TrainerKimono_girlZuki, -1
+ object_event SPRITE_KIMONO_GIRL, 1, 9, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 0, TrainerKimono_girlKuni, -1
+ object_event SPRITE_KIMONO_GIRL, 2, 11, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 0, TrainerKimono_girlMiki, -1
+ object_event SPRITE_GENTLEMAN, 10, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GentlemanScript_0x994c6, -1
+ object_event SPRITE_RHYDON, 8, 6, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RhydonScript_0x9951b, -1
+ object_event SPRITE_COOLTRAINER_M, 10, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, DanceTheatreCooltrainerMScript, -1
+ object_event SPRITE_GRANNY, 6, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DanceTheatreGrannyScript, -1
diff --git a/maps/DarkCaveBlackthornEntrance.asm b/maps/DarkCaveBlackthornEntrance.asm
index ead75b1d8..e003d2951 100644
--- a/maps/DarkCaveBlackthornEntrance.asm
+++ b/maps/DarkCaveBlackthornEntrance.asm
@@ -4,26 +4,26 @@ const_value set 2
const DARKCAVEBLACKTHORNENTRANCE_POKE_BALL2
DarkCaveBlackthornEntrance_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-PharmacistScript_0x18c720:
+DarkCaveBlackthornEntrancePharmacistScript:
faceplayer
opentext
checkevent EVENT_GOT_BLACKGLASSES_IN_DARK_CAVE
- iftrue UnknownScript_0x18c735
- writetext UnknownText_0x18c73f
+ iftrue .GotBlackglasses
+ writetext DarkCaveBlackthornEntrancePharmacistText1
buttonsound
verbosegiveitem BLACKGLASSES
- iffalse UnknownScript_0x18c739
+ iffalse .PackFull
setevent EVENT_GOT_BLACKGLASSES_IN_DARK_CAVE
-UnknownScript_0x18c735:
- writetext UnknownText_0x18c80c
+.GotBlackglasses:
+ writetext DarkCaveBlackthornEntrancePharmacistText2
waitbutton
-UnknownScript_0x18c739:
+.PackFull:
closetext
end
@@ -33,7 +33,7 @@ DarkCaveBlackthornEntranceRevive:
DarkCaveBlackthornEntranceTMSnore:
itemball TM_SNORE
-UnknownText_0x18c73f:
+DarkCaveBlackthornEntrancePharmacistText1:
text "Whoa! You startled"
line "me there!"
@@ -55,7 +55,7 @@ UnknownText_0x18c73f:
cont "you saw me, OK?"
done
-UnknownText_0x18c80c:
+DarkCaveBlackthornEntrancePharmacistText2:
text "BLACKGLASSES ups"
line "the power of dark-"
cont "type moves."
@@ -70,14 +70,14 @@ DarkCaveBlackthornEntrance_MapEventHeader:
warp_def $3, $17, 1, ROUTE_45
warp_def $19, $3, 2, DARK_CAVE_VIOLET_ENTRANCE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_PHARMACIST, 3, 7, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PharmacistScript_0x18c720, -1
- person_event SPRITE_POKE_BALL, 24, 21, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, DarkCaveBlackthornEntranceRevive, EVENT_DARK_CAVE_BLACKTHORN_ENTRANCE_REVIVE
- person_event SPRITE_POKE_BALL, 22, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, DarkCaveBlackthornEntranceTMSnore, EVENT_DARK_CAVE_BLACKTHORN_ENTRANCE_TM_SNORE
+ object_event SPRITE_PHARMACIST, 3, 7, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DarkCaveBlackthornEntrancePharmacistScript, -1
+ object_event SPRITE_POKE_BALL, 24, 21, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DarkCaveBlackthornEntranceRevive, EVENT_DARK_CAVE_BLACKTHORN_ENTRANCE_REVIVE
+ object_event SPRITE_POKE_BALL, 22, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DarkCaveBlackthornEntranceTMSnore, EVENT_DARK_CAVE_BLACKTHORN_ENTRANCE_TM_SNORE
diff --git a/maps/DarkCaveVioletEntrance.asm b/maps/DarkCaveVioletEntrance.asm
index b9c5c5380..03ab3b072 100644
--- a/maps/DarkCaveVioletEntrance.asm
+++ b/maps/DarkCaveVioletEntrance.asm
@@ -9,7 +9,7 @@ const_value set 2
const DARKCAVEVIOLETENTRANCE_POKE_BALL4
DarkCaveVioletEntrance_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -44,20 +44,20 @@ DarkCaveVioletEntrance_MapEventHeader:
warp_def $1, $11, 2, DARK_CAVE_BLACKTHORN_ENTRANCE
warp_def $21, $23, 3, ROUTE_46
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 3, 26, SIGNPOST_ITEM, DarkCaveVioletEntranceHiddenElixer
+ bg_event 3, 26, BGEVENT_ITEM, DarkCaveVioletEntranceHiddenElixer
-.PersonEvents:
+.ObjectEvents:
db 8
- person_event SPRITE_POKE_BALL, 8, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, DarkCaveVioletEntrancePotion, EVENT_DARK_CAVE_VIOLET_ENTRANCE_POTION
- person_event SPRITE_ROCK, 14, 16, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, DarkCaveVioletEntranceRock, -1
- person_event SPRITE_ROCK, 6, 27, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, DarkCaveVioletEntranceRock, -1
- person_event SPRITE_ROCK, 14, 7, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, DarkCaveVioletEntranceRock, -1
- person_event SPRITE_ROCK, 31, 36, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, DarkCaveVioletEntranceRock, -1
- person_event SPRITE_POKE_BALL, 22, 36, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, DarkCaveVioletEntranceFullHeal, EVENT_DARK_CAVE_VIOLET_ENTRANCE_FULL_HEAL
- person_event SPRITE_POKE_BALL, 9, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, DarkCaveVioletEntranceHyperPotion, EVENT_DARK_CAVE_VIOLET_ENTRANCE_HYPER_POTION
- person_event SPRITE_POKE_BALL, 28, 30, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, DarkCaveVioletEntranceDireHit, EVENT_DARK_CAVE_VIOLET_ENTRANCE_DIRE_HIT
+ object_event SPRITE_POKE_BALL, 8, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DarkCaveVioletEntrancePotion, EVENT_DARK_CAVE_VIOLET_ENTRANCE_POTION
+ object_event SPRITE_ROCK, 14, 16, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DarkCaveVioletEntranceRock, -1
+ object_event SPRITE_ROCK, 6, 27, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DarkCaveVioletEntranceRock, -1
+ object_event SPRITE_ROCK, 14, 7, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DarkCaveVioletEntranceRock, -1
+ object_event SPRITE_ROCK, 31, 36, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DarkCaveVioletEntranceRock, -1
+ object_event SPRITE_POKE_BALL, 22, 36, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DarkCaveVioletEntranceFullHeal, EVENT_DARK_CAVE_VIOLET_ENTRANCE_FULL_HEAL
+ object_event SPRITE_POKE_BALL, 9, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DarkCaveVioletEntranceHyperPotion, EVENT_DARK_CAVE_VIOLET_ENTRANCE_HYPER_POTION
+ object_event SPRITE_POKE_BALL, 28, 30, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DarkCaveVioletEntranceDireHit, EVENT_DARK_CAVE_VIOLET_ENTRANCE_DIRE_HIT
diff --git a/maps/DayCare.asm b/maps/DayCare.asm
index 1eb84e034..fc7865f98 100644
--- a/maps/DayCare.asm
+++ b/maps/DayCare.asm
@@ -3,26 +3,23 @@ const_value set 2
const DAYCARE_GRANNY
DayCare_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_OBJECTS, .EggCheckCallback
.EggCheckCallback:
- checkflag ENGINE_DAYCARE_MAN_HAS_EGG
- iftrue .PutDaycareManOutside
- clearevent EVENT_DAYCARE_MAN_IN_DAYCARE
- setevent EVENT_DAYCARE_MAN_ON_ROUTE_34
+ checkflag ENGINE_DAY_CARE_MAN_HAS_EGG
+ iftrue .PutDayCareManOutside
+ clearevent EVENT_DAY_CARE_MAN_IN_DAY_CARE
+ setevent EVENT_DAY_CARE_MAN_ON_ROUTE_34
return
-.PutDaycareManOutside:
- setevent EVENT_DAYCARE_MAN_IN_DAYCARE
- clearevent EVENT_DAYCARE_MAN_ON_ROUTE_34
+.PutDayCareManOutside:
+ setevent EVENT_DAY_CARE_MAN_IN_DAY_CARE
+ clearevent EVENT_DAY_CARE_MAN_ON_ROUTE_34
return
DayCareManScript_Inside:
@@ -62,7 +59,7 @@ DayCareManScript_Inside:
DayCareLadyScript:
faceplayer
opentext
- checkflag ENGINE_DAYCARE_MAN_HAS_EGG
+ checkflag ENGINE_DAY_CARE_MAN_HAS_EGG
iftrue .HusbandWasLookingForYou
special Special_DayCareLady
waitbutton
@@ -169,15 +166,15 @@ DayCare_MapEventHeader:
warp_def $7, $2, 5, ROUTE_34
warp_def $7, $3, 5, ROUTE_34
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, DayCareBookshelf
- signpost 1, 1, SIGNPOST_READ, DayCareBookshelf
+ bg_event 1, 0, BGEVENT_READ, DayCareBookshelf
+ bg_event 1, 1, BGEVENT_READ, DayCareBookshelf
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_GRAMPS, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, DayCareManScript_Inside, EVENT_DAYCARE_MAN_IN_DAYCARE
- person_event SPRITE_GRANNY, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, DayCareLadyScript, -1
+ object_event SPRITE_GRAMPS, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DayCareManScript_Inside, EVENT_DAY_CARE_MAN_IN_DAY_CARE
+ object_event SPRITE_GRANNY, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, DayCareLadyScript, -1
diff --git a/maps/DiglettsCave.asm b/maps/DiglettsCave.asm
index 88aa1e90b..53c3f73dd 100644
--- a/maps/DiglettsCave.asm
+++ b/maps/DiglettsCave.asm
@@ -2,20 +2,20 @@ const_value set 2
const DIGLETTSCAVE_POKEFAN_M
DiglettsCave_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-PokefanMScript_0x74002:
- jumptextfaceplayer UnknownText_0x74008
+DiglettsCavePokefanMScript:
+ jumptextfaceplayer DiglettsCavePokefanMText
DiglettsCaveHiddenMaxRevive:
dwb EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE, MAX_REVIVE
-UnknownText_0x74008:
+DiglettsCavePokefanMText:
text "A bunch of DIGLETT"
line "popped out of the"
@@ -36,13 +36,13 @@ DiglettsCave_MapEventHeader:
warp_def $21, $11, 2, DIGLETTS_CAVE
warp_def $3, $3, 4, DIGLETTS_CAVE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 11, 6, SIGNPOST_ITEM, DiglettsCaveHiddenMaxRevive
+ bg_event 11, 6, BGEVENT_ITEM, DiglettsCaveHiddenMaxRevive
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKEFAN_M, 31, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x74002, -1
+ object_event SPRITE_POKEFAN_M, 31, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DiglettsCavePokefanMScript, -1
diff --git a/maps/DragonShrine.asm b/maps/DragonShrine.asm
index ebd833ccd..0e805f230 100644
--- a/maps/DragonShrine.asm
+++ b/maps/DragonShrine.asm
@@ -5,24 +5,22 @@ const_value set 2
const DRAGONSHRINE_CLAIR
DragonShrine_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .DragonShrineTest
+ scene_script .DummyScene
.MapCallbacks:
db 0
-.Trigger0:
- priorityjump DragonShrineTestScript
+.DragonShrineTest:
+ priorityjump .DragonShrineTestScript
end
-.Trigger1:
+.DummyScene:
end
-DragonShrineTestScript:
+.DragonShrineTestScript:
applymovement PLAYER, MovementData_0x18d2bf
applymovement DRAGONSHRINE_ELDER1, MovementData_0x18d2c7
opentext
@@ -167,8 +165,8 @@ DragonShrineTestScript:
waitsfx
special RestartMapMusic
specialphonecall SPECIALCALL_MASTERBALL
- dotrigger $1
- domaptrigger DRAGONS_DEN_B1F, $1
+ setscene $1
+ setmapscene DRAGONS_DEN_B1F, $1
writetext UnknownText_0x18d9f2
buttonsound
writetext UnknownText_0x18da0b
@@ -272,10 +270,10 @@ MenuDataHeader_0x18d215:
db $40 ; flags
db 04, 08 ; start coords
db 11, 19 ; end coords
- dw MenuData2_0x18d21d
+ dw .MenuData2
db 1 ; default option
-MenuData2_0x18d21d:
+.MenuData2:
db $81 ; flags
db 3 ; items
db "Pal@"
@@ -287,10 +285,10 @@ MenuDataHeader_0x18d234:
db $40 ; flags
db 04, 09 ; start coords
db 11, 19 ; end coords
- dw MenuData2_0x18d23c
+ dw .MenuData2
db 1 ; default option
-MenuData2_0x18d23c:
+.MenuData2:
db $81 ; flags
db 3 ; items
db "Strategy@"
@@ -302,10 +300,10 @@ MenuDataHeader_0x18d258:
db $40 ; flags
db 04, 05 ; start coords
db 11, 19 ; end coords
- dw MenuData2_0x18d260
+ dw .MenuData2
db 1 ; default option
-MenuData2_0x18d260:
+.MenuData2:
db $81 ; flags
db 3 ; items
db "Weak person@"
@@ -317,10 +315,10 @@ MenuDataHeader_0x18d283:
db $40 ; flags
db 04, 08 ; start coords
db 11, 19 ; end coords
- dw MenuData2_0x18d28b
+ dw .MenuData2
db 1 ; default option
-MenuData2_0x18d28b:
+.MenuData2:
db $81 ; flags
db 3 ; items
db "Love@"
@@ -332,10 +330,10 @@ MenuDataHeader_0x18d2a5:
db $40 ; flags
db 04, 12 ; start coords
db 11, 19 ; end coords
- dw MenuData2_0x18d2ad
+ dw .MenuData2
db 1 ; default option
-MenuData2_0x18d2ad:
+.MenuData2:
db $81 ; flags
db 3 ; items
db "Tough@"
@@ -679,15 +677,15 @@ DragonShrine_MapEventHeader:
warp_def $9, $4, 2, DRAGONS_DEN_B1F
warp_def $9, $5, 2, DRAGONS_DEN_B1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_ELDER, 1, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ElderScript_0x18d1a5, EVENT_GAVE_KURT_APRICORNS
- person_event SPRITE_ELDER, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ElderScript_0x18d205, EVENT_GAVE_KURT_APRICORNS
- person_event SPRITE_ELDER, 4, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ElderScript_0x18d20d, EVENT_GAVE_KURT_APRICORNS
- person_event SPRITE_CLAIR, 8, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_DRAGON_SHRINE_CLAIR
+ object_event SPRITE_ELDER, 1, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ElderScript_0x18d1a5, EVENT_GAVE_KURT_APRICORNS
+ object_event SPRITE_ELDER, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ElderScript_0x18d205, EVENT_GAVE_KURT_APRICORNS
+ object_event SPRITE_ELDER, 4, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ElderScript_0x18d20d, EVENT_GAVE_KURT_APRICORNS
+ object_event SPRITE_CLAIR, 8, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_DRAGON_SHRINE_CLAIR
diff --git a/maps/DragonsDen1F.asm b/maps/DragonsDen1F.asm
index aaadae4d4..46f6a30a5 100644
--- a/maps/DragonsDen1F.asm
+++ b/maps/DragonsDen1F.asm
@@ -1,5 +1,5 @@
DragonsDen1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -16,11 +16,11 @@ DragonsDen1F_MapEventHeader:
warp_def $f, $5, 1, DRAGONS_DEN_B1F
warp_def $d, $5, 2, DRAGONS_DEN_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/DragonsDenB1F.asm b/maps/DragonsDenB1F.asm
index 3a93fc87d..c638132f5 100644
--- a/maps/DragonsDenB1F.asm
+++ b/maps/DragonsDenB1F.asm
@@ -10,24 +10,19 @@ const_value set 2
const DRAGONSDENB1F_POKE_BALL3
DragonsDenB1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_NEWMAP, .CheckSilver
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
+.DummyScene1:
end
.CheckSilver:
@@ -47,7 +42,7 @@ DragonsDenB1F_MapScriptHeader:
appear DRAGONSDENB1F_SILVER
return
-DragonsDenB1F_ClairTrigger:
+DragonsDenB1F_ClairScene:
appear DRAGONSDENB1F_CLAIR
opentext
writetext ClairText_Wait
@@ -85,49 +80,49 @@ DragonsDenB1F_ClairTrigger:
pause 30
special RestartMapMusic
disappear DRAGONSDENB1F_CLAIR
- dotrigger $0
+ setscene $0
end
TrainerCooltrainermDarin:
- trainer EVENT_BEAT_COOLTRAINERM_DARIN, COOLTRAINERM, DARIN, CooltrainermDarinSeenText, CooltrainermDarinBeatenText, 0, CooltrainermDarinScript
+ trainer EVENT_BEAT_COOLTRAINERM_DARIN, COOLTRAINERM, DARIN, CooltrainermDarinSeenText, CooltrainermDarinBeatenText, 0, .Script
-CooltrainermDarinScript:
+.Script:
end_if_just_battled
opentext
- writetext CooltrainermDarinAfterText
+ writetext CooltrainermDarinAfterBattleText
waitbutton
closetext
end
TrainerCooltrainerfCara:
- trainer EVENT_BEAT_COOLTRAINERF_CARA, COOLTRAINERF, CARA, CooltrainerfCaraSeenText, CooltrainerfCaraBeatenText, 0, CooltrainerfCaraScript
+ trainer EVENT_BEAT_COOLTRAINERF_CARA, COOLTRAINERF, CARA, CooltrainerfCaraSeenText, CooltrainerfCaraBeatenText, 0, .Script
-CooltrainerfCaraScript:
+.Script:
end_if_just_battled
opentext
- writetext CooltrainerfCaraAfterText
+ writetext CooltrainerfCaraAfterBattleText
waitbutton
closetext
end
TrainerTwinsLeaandpia1:
- trainer EVENT_BEAT_TWINS_LEA_AND_PIA, TWINS, LEAANDPIA1, TwinsLeaandpia1SeenText, TwinsLeaandpia1BeatenText, 0, TwinsLeaandpia1Script
+ trainer EVENT_BEAT_TWINS_LEA_AND_PIA, TWINS, LEAANDPIA1, TwinsLeaandpia1SeenText, TwinsLeaandpia1BeatenText, 0, .Script
-TwinsLeaandpia1Script:
+.Script:
end_if_just_battled
opentext
- writetext TrinsLeaandpia1AfterText
+ writetext TwinsLeaandpia1AfterBattleText
waitbutton
closetext
end
TrainerTwinsLeaandpia2:
- trainer EVENT_BEAT_TWINS_LEA_AND_PIA, TWINS, LEAANDPIA1, TwinsLeaandpia2SeenText, TwinsLeaandpia2BeatenText, 0, TwinsLeaandpia2Script
+ trainer EVENT_BEAT_TWINS_LEA_AND_PIA, TWINS, LEAANDPIA1, TwinsLeaandpia2SeenText, TwinsLeaandpia2BeatenText, 0, .Script
-TwinsLeaandpia2Script:
+.Script:
end_if_just_battled
opentext
- writetext TrinsLeaandpia2AfterText
+ writetext TwinsLeaandpia2AfterBattleText
waitbutton
closetext
end
@@ -332,7 +327,7 @@ CooltrainermDarinBeatenText:
text "S-strong!"
done
-CooltrainermDarinAfterText:
+CooltrainermDarinAfterBattleText:
text "The SHRINE ahead"
line "is home to the"
@@ -352,7 +347,7 @@ CooltrainerfCaraBeatenText:
text "Oh yikes, I lost!"
done
-CooltrainerfCaraAfterText:
+CooltrainerfCaraAfterBattleText:
text "Soon I'm going to"
line "get permission"
@@ -378,7 +373,7 @@ TwinsLeaandpia1BeatenText:
text "Ouchies."
done
-TrinsLeaandpia1AfterText:
+TwinsLeaandpia1AfterBattleText:
text "It was like having"
line "to battle LANCE."
done
@@ -391,7 +386,7 @@ TwinsLeaandpia2BeatenText:
text "Meanie."
done
-TrinsLeaandpia2AfterText:
+TwinsLeaandpia2AfterBattleText:
text "We'll tell on you."
para "MASTER will be"
@@ -420,25 +415,25 @@ DragonsDenB1F_MapEventHeader:
warp_def $3, $14, 3, DRAGONS_DEN_1F
warp_def $1d, $13, 1, DRAGON_SHRINE
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 1, $1e, $13, $0, DragonsDenB1F_ClairTrigger, $0, $0
+ coord_event 1, $1e, $13, DragonsDenB1F_ClairScene
-.Signposts:
+.BGEvents:
db 4
- signpost 24, 18, SIGNPOST_READ, MapDragonsDenB1FSignpost0Script
- signpost 29, 33, SIGNPOST_ITEM, DragonsDenB1FHiddenRevive
- signpost 17, 21, SIGNPOST_ITEM, DragonsDenB1FHiddenMaxPotion
- signpost 15, 31, SIGNPOST_ITEM, DragonsDenB1FHiddenMaxElixer
+ bg_event 24, 18, BGEVENT_READ, MapDragonsDenB1FSignpost0Script
+ bg_event 29, 33, BGEVENT_ITEM, DragonsDenB1FHiddenRevive
+ bg_event 17, 21, BGEVENT_ITEM, DragonsDenB1FHiddenMaxPotion
+ bg_event 15, 31, BGEVENT_ITEM, DragonsDenB1FHiddenMaxElixer
-.PersonEvents:
+.ObjectEvents:
db 9
- person_event SPRITE_POKE_BALL, 16, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokeBallScript_0x18c95a, EVENT_DRAGONS_DEN_B1F_DRAGON_FANG
- person_event SPRITE_CLAIR, 30, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_DRAGONS_DEN_CLAIR
- person_event SPRITE_SILVER, 23, 20, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SilverScript_0x18c97e, EVENT_RIVAL_DRAGONS_DEN
- person_event SPRITE_COOLTRAINER_M, 8, 20, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerCooltrainermDarin, -1
- person_event SPRITE_COOLTRAINER_F, 8, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerCooltrainerfCara, -1
- person_event SPRITE_TWIN, 17, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerTwinsLeaandpia1, -1
- person_event SPRITE_TWIN, 18, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerTwinsLeaandpia2, -1
- person_event SPRITE_POKE_BALL, 4, 30, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, DragonsDenB1FCalcium, EVENT_DRAGONS_DEN_B1F_CALCIUM
- person_event SPRITE_POKE_BALL, 20, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, DragonsDenB1FMaxElixer, EVENT_DRAGONS_DEN_B1F_MAX_ELIXER
+ object_event SPRITE_POKE_BALL, 16, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PokeBallScript_0x18c95a, EVENT_DRAGONS_DEN_B1F_DRAGON_FANG
+ object_event SPRITE_CLAIR, 30, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_DRAGONS_DEN_CLAIR
+ object_event SPRITE_SILVER, 23, 20, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SilverScript_0x18c97e, EVENT_RIVAL_DRAGONS_DEN
+ object_event SPRITE_COOLTRAINER_M, 8, 20, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerCooltrainermDarin, -1
+ object_event SPRITE_COOLTRAINER_F, 8, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainerfCara, -1
+ object_event SPRITE_TWIN, 17, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsLeaandpia1, -1
+ object_event SPRITE_TWIN, 18, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsLeaandpia2, -1
+ object_event SPRITE_POKE_BALL, 4, 30, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DragonsDenB1FCalcium, EVENT_DRAGONS_DEN_B1F_CALCIUM
+ object_event SPRITE_POKE_BALL, 20, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DragonsDenB1FMaxElixer, EVENT_DRAGONS_DEN_B1F_MAX_ELIXER
diff --git a/maps/EarlsPokemonAcademy.asm b/maps/EarlsPokemonAcademy.asm
index a43e652a8..7da92ec0f 100644
--- a/maps/EarlsPokemonAcademy.asm
+++ b/maps/EarlsPokemonAcademy.asm
@@ -7,7 +7,7 @@ const_value set 2
const EARLSPOKEMONACADEMY_POKEDEX
EarlsPokemonAcademy_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -38,35 +38,35 @@ AcademyEarl:
closetext
end
-YoungsterScript_0x68a83:
- jumptextfaceplayer UnknownText_0x68d80
+EarlsPokemonAcademyYoungster1Script:
+ jumptextfaceplayer EarlsPokemonAcademyYoungster1Text
-GameboyKidScript_0x68a86:
+EarlsPokemonAcademyGameboyKid1Script:
faceplayer
opentext
- writetext UnknownText_0x68dda
+ writetext EarlsPokemonAcademyGameboyKid1Text
waitbutton
closetext
spriteface EARLSPOKEMONACADEMY_GAMEBOY_KID1, DOWN
end
-GameboyKidScript_0x68a91:
+EarlsPokemonAcademyGameboyKid2Script:
faceplayer
opentext
- writetext UnknownText_0x68e07
+ writetext EarlsPokemonAcademyGameboyKid2Text
waitbutton
closetext
spriteface EARLSPOKEMONACADEMY_GAMEBOY_KID2, DOWN
end
-YoungsterScript_0x68a9c:
- jumptextfaceplayer UnknownText_0x68e39
+EarlsPokemonAcademyYoungster2Script:
+ jumptextfaceplayer EarlsPokemonAcademyYoungster2Text
AcademyBlackboard:
opentext
writetext AcademyBlackboardText
.Loop:
- loadmenudata .MenuHeader
+ loadmenudata .BlackboardMenuData
_2dmenu
closewindow
if_equal $1, .Poison
@@ -102,14 +102,14 @@ AcademyBlackboard:
waitbutton
jump .Loop
-.MenuHeader:
+.BlackboardMenuData:
db $40 ; flags
db 00, 00 ; start coords
db 08, 11 ; end coords
- dw .Data
+ dw .MenuData2
db 1 ; default option
-.Data:
+.MenuData2:
db $80 ; flags
dn 3, 2 ; rows, columns
db 5 ; spacing
@@ -231,7 +231,7 @@ UnknownText_0x68d31:
line "you must be!"
done
-UnknownText_0x68d80:
+EarlsPokemonAcademyYoungster1Text:
text "I'm taking notes"
line "of the teacher's"
cont "lecture."
@@ -241,19 +241,19 @@ UnknownText_0x68d80:
cont "blackboard too."
done
-UnknownText_0x68dda:
+EarlsPokemonAcademyGameboyKid1Text:
text "I traded my best"
line "#MON to the"
cont "guy beside me."
done
-UnknownText_0x68e07:
+EarlsPokemonAcademyGameboyKid2Text:
text "Huh? The #MON I"
line "just got is hold-"
cont "ing something!"
done
-UnknownText_0x68e39:
+EarlsPokemonAcademyYoungster2Text:
text "A #MON holding"
line "a BERRY will heal"
cont "itself in battle."
@@ -421,21 +421,21 @@ EarlsPokemonAcademy_MapEventHeader:
warp_def $f, $3, 3, VIOLET_CITY
warp_def $f, $4, 3, VIOLET_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 4
- signpost 1, 0, SIGNPOST_READ, AcademyBookshelf
- signpost 1, 1, SIGNPOST_READ, AcademyBookshelf
- signpost 0, 3, SIGNPOST_READ, AcademyBlackboard
- signpost 0, 4, SIGNPOST_READ, AcademyBlackboard
+ bg_event 1, 0, BGEVENT_READ, AcademyBookshelf
+ bg_event 1, 1, BGEVENT_READ, AcademyBookshelf
+ bg_event 0, 3, BGEVENT_READ, AcademyBlackboard
+ bg_event 0, 4, BGEVENT_READ, AcademyBlackboard
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_FISHER, 2, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, AcademyEarl, EVENT_EARLS_ACADEMY_EARL
- person_event SPRITE_YOUNGSTER, 5, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x68a83, -1
- person_event SPRITE_GAMEBOY_KID, 11, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GameboyKidScript_0x68a86, -1
- person_event SPRITE_GAMEBOY_KID, 11, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GameboyKidScript_0x68a91, -1
- person_event SPRITE_YOUNGSTER, 7, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x68a9c, -1
- person_event SPRITE_POKEDEX, 4, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, AcademyNotebook, -1
+ object_event SPRITE_FISHER, 2, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, AcademyEarl, EVENT_EARLS_ACADEMY_EARL
+ object_event SPRITE_YOUNGSTER, 5, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, EarlsPokemonAcademyYoungster1Script, -1
+ object_event SPRITE_GAMEBOY_KID, 11, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EarlsPokemonAcademyGameboyKid1Script, -1
+ object_event SPRITE_GAMEBOY_KID, 11, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, EarlsPokemonAcademyGameboyKid2Script, -1
+ object_event SPRITE_YOUNGSTER, 7, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EarlsPokemonAcademyYoungster2Script, -1
+ object_event SPRITE_POKEDEX, 4, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AcademyNotebook, -1
diff --git a/maps/EcruteakCity.asm b/maps/EcruteakCity.asm
index b15850d2e..9e359419b 100644
--- a/maps/EcruteakCity.asm
+++ b/maps/EcruteakCity.asm
@@ -8,30 +8,28 @@ const_value set 2
const ECRUTEAKCITY_GRAMPS3
EcruteakCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_ECRUTEAK
return
-GrampsScript_0x1a4009:
- jumptextfaceplayer UnknownText_0x1a4105
+EcruteakCityGramps1Script:
+ jumptextfaceplayer EcruteakCityGramps1Text
-GrampsScript_0x1a400c:
- jumptextfaceplayer UnknownText_0x1a4147
+EcruteakCityGramps2Script:
+ jumptextfaceplayer EcruteakCityGramps2Text
-GrampsScript_0x1a400f:
- jumptextfaceplayer UnknownText_0x1a43cb
+EcruteakCityGramps3Script:
+ jumptextfaceplayer EcruteakCityGramps3Text
-LassScript_0x1a4012:
- jumptextfaceplayer UnknownText_0x1a41db
+EcruteakCityLassScript:
+ jumptextfaceplayer EcruteakCityLassText
LassScript_0x1a4015:
faceplayer
@@ -65,8 +63,8 @@ UnknownScript_0x1a4037:
closetext
end
-YoungsterScript_0x1a403d:
- jumptextfaceplayer UnknownText_0x1a4386
+EcruteakCityYoungsterScript:
+ jumptextfaceplayer EcruteakCityYoungsterText
EcruteakCitySign:
jumptext EcruteakCitySignText
@@ -83,7 +81,7 @@ EcruteakDanceTheaterSign:
BurnedTowerSign:
jumptext BurnedTowerSignText
-EcruteakCityPokeCenterSign:
+EcruteakCityPokecenterSign:
jumpstd pokecentersign
EcruteakCityMartSign:
@@ -113,7 +111,7 @@ UnusedMissingDaughterText:
line "do…?"
done
-UnknownText_0x1a4105:
+EcruteakCityGramps1Text:
text "ECRUTEAK used to"
line "have two towers:"
@@ -121,7 +119,7 @@ UnknownText_0x1a4105:
line "east and west."
done
-UnknownText_0x1a4147:
+EcruteakCityGramps2Text:
text "Ah, child."
line "Have you learned"
@@ -136,7 +134,7 @@ UnknownText_0x1a4147:
cont "nice, I hear."
done
-UnknownText_0x1a41db:
+EcruteakCityLassText:
text "I'm going to prac-"
line "tice at the DANCE"
@@ -183,7 +181,7 @@ UnknownText_0x1a4325:
cont "night again."
done
-UnknownText_0x1a4386:
+EcruteakCityYoungsterText:
text "I hear #MON are"
line "rampaging at the"
@@ -191,7 +189,7 @@ UnknownText_0x1a4386:
line "like to see that."
done
-UnknownText_0x1a43cb:
+EcruteakCityGramps3Text:
text "In the distant"
line "past…"
@@ -283,26 +281,26 @@ EcruteakCity_MapEventHeader:
warp_def $12, $0, 3, ROUTE_38_ECRUTEAK_GATE
warp_def $13, $0, 4, ROUTE_38_ECRUTEAK_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 8
- signpost 21, 15, SIGNPOST_READ, EcruteakCitySign
- signpost 10, 38, SIGNPOST_READ, TinTowerSign
- signpost 28, 8, SIGNPOST_READ, EcruteakGymSign
- signpost 21, 21, SIGNPOST_READ, EcruteakDanceTheaterSign
- signpost 10, 2, SIGNPOST_READ, BurnedTowerSign
- signpost 27, 24, SIGNPOST_READ, EcruteakCityPokeCenterSign
- signpost 21, 30, SIGNPOST_READ, EcruteakCityMartSign
- signpost 14, 23, SIGNPOST_ITEM, EcruteakCityHiddenHyperPotion
-
-.PersonEvents:
+ bg_event 21, 15, BGEVENT_READ, EcruteakCitySign
+ bg_event 10, 38, BGEVENT_READ, TinTowerSign
+ bg_event 28, 8, BGEVENT_READ, EcruteakGymSign
+ bg_event 21, 21, BGEVENT_READ, EcruteakDanceTheaterSign
+ bg_event 10, 2, BGEVENT_READ, BurnedTowerSign
+ bg_event 27, 24, BGEVENT_READ, EcruteakCityPokecenterSign
+ bg_event 21, 30, BGEVENT_READ, EcruteakCityMartSign
+ bg_event 14, 23, BGEVENT_ITEM, EcruteakCityHiddenHyperPotion
+
+.ObjectEvents:
db 7
- person_event SPRITE_GRAMPS, 15, 18, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrampsScript_0x1a4009, -1
- person_event SPRITE_GRAMPS, 21, 20, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrampsScript_0x1a400c, -1
- person_event SPRITE_LASS, 29, 21, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, LassScript_0x1a4012, -1
- person_event SPRITE_LASS, 9, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LassScript_0x1a4015, -1
- person_event SPRITE_FISHER, 22, 9, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FisherScript_0x1a4029, -1
- person_event SPRITE_YOUNGSTER, 14, 10, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x1a403d, -1
- person_event SPRITE_GRAMPS, 7, 3, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, GrampsScript_0x1a400f, EVENT_ECRUTEAK_CITY_GRAMPS
+ object_event SPRITE_GRAMPS, 15, 18, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakCityGramps1Script, -1
+ object_event SPRITE_GRAMPS, 21, 20, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakCityGramps2Script, -1
+ object_event SPRITE_LASS, 29, 21, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, EcruteakCityLassScript, -1
+ object_event SPRITE_LASS, 9, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LassScript_0x1a4015, -1
+ object_event SPRITE_FISHER, 22, 9, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, FisherScript_0x1a4029, -1
+ object_event SPRITE_YOUNGSTER, 14, 10, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, EcruteakCityYoungsterScript, -1
+ object_event SPRITE_GRAMPS, 7, 3, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, EcruteakCityGramps3Script, EVENT_ECRUTEAK_CITY_GRAMPS
diff --git a/maps/EcruteakGym.asm b/maps/EcruteakGym.asm
index b01e9af81..6f54bb4bd 100644
--- a/maps/EcruteakGym.asm
+++ b/maps/EcruteakGym.asm
@@ -8,21 +8,19 @@ const_value set 2
const ECRUTEAKGYM_GRAMPS
EcruteakGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x99d53, 0
- dw UnknownScript_0x99d57, 0
+ scene_script .ForcedToLeave
+ scene_script .DummyScene
.MapCallbacks:
db 0
-UnknownScript_0x99d53:
+.ForcedToLeave:
priorityjump EcruteakGymClosed
end
-UnknownScript_0x99d57:
+.DummyScene:
end
MortyScript_0x99d58:
@@ -44,8 +42,8 @@ MortyScript_0x99d58:
waitsfx
setflag ENGINE_FOGBADGE
checkcode VAR_BADGES
- scall EcruteakGymTriggerRockets
- domaptrigger ECRUTEAK_HOUSE, $1
+ scall EcruteakGymActivateRockets
+ setmapscene ECRUTEAK_HOUSE, $1
setevent EVENT_RANG_CLEAR_BELL_1
setevent EVENT_RANG_CLEAR_BELL_2
.FightDone:
@@ -72,7 +70,7 @@ MortyScript_0x99d58:
closetext
end
-EcruteakGymTriggerRockets:
+EcruteakGymActivateRockets:
if_equal 7, .RadioTowerRockets
if_equal 6, .GoldenrodRockets
end
@@ -100,45 +98,45 @@ EcruteakGymClosed:
end
TrainerSageJeffrey:
- trainer EVENT_BEAT_SAGE_JEFFREY, SAGE, JEFFREY, SageJeffreySeenText, SageJeffreyBeatenText, 0, SageJeffreyScript
+ trainer EVENT_BEAT_SAGE_JEFFREY, SAGE, JEFFREY, SageJeffreySeenText, SageJeffreyBeatenText, 0, .Script
-SageJeffreyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x9a263
+ writetext SageJeffreyAfterBattleText
waitbutton
closetext
end
TrainerSagePing:
- trainer EVENT_BEAT_SAGE_PING, SAGE, PING, SagePingSeenText, SagePingBeatenText, 0, SagePingScript
+ trainer EVENT_BEAT_SAGE_PING, SAGE, PING, SagePingSeenText, SagePingBeatenText, 0, .Script
-SagePingScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x9a2b7
+ writetext SagePingAfterBattleText
waitbutton
closetext
end
TrainerMediumMartha:
- trainer EVENT_BEAT_MEDIUM_MARTHA, MEDIUM, MARTHA, MediumMarthaSeenText, MediumMarthaBeatenText, 0, MediumMarthaScript
+ trainer EVENT_BEAT_MEDIUM_MARTHA, MEDIUM, MARTHA, MediumMarthaSeenText, MediumMarthaBeatenText, 0, .Script
-MediumMarthaScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x9a318
+ writetext MediumMarthaAfterBattleText
waitbutton
closetext
end
TrainerMediumGrace:
- trainer EVENT_BEAT_MEDIUM_GRACE, MEDIUM, GRACE, MediumGraceSeenText, MediumGraceBeatenText, 0, MediumGraceScript
+ trainer EVENT_BEAT_MEDIUM_GRACE, MEDIUM, GRACE, MediumGraceSeenText, MediumGraceBeatenText, 0, .Script
-MediumGraceScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x9a38a
+ writetext MediumGraceAfterBattleText
waitbutton
closetext
end
@@ -297,7 +295,7 @@ SageJeffreyBeatenText:
line "experienced both."
done
-UnknownText_0x9a263:
+SageJeffreyAfterBattleText:
text "Where did #MON"
line "come from?"
done
@@ -312,7 +310,7 @@ SagePingBeatenText:
text "Ah! Well done!"
done
-UnknownText_0x9a2b7:
+SagePingAfterBattleText:
text "We use only ghost-"
line "type #MON."
@@ -329,7 +327,7 @@ MediumMarthaBeatenText:
text "I, I, I lost!"
done
-UnknownText_0x9a318:
+MediumMarthaAfterBattleText:
text "The one who wants"
line "to win most--will!"
done
@@ -346,7 +344,7 @@ MediumGraceBeatenText:
text "Wha-what?"
done
-UnknownText_0x9a38a:
+MediumGraceAfterBattleText:
text "Fine. I shall tell"
line "you the secret of"
@@ -428,20 +426,20 @@ EcruteakGym_MapEventHeader:
warp_def $c, $7, 3, ECRUTEAK_GYM
warp_def $d, $7, 3, ECRUTEAK_GYM
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 15, 3, SIGNPOST_READ, EcruteakGymStatue
- signpost 15, 6, SIGNPOST_READ, EcruteakGymStatue
+ bg_event 15, 3, BGEVENT_READ, EcruteakGymStatue
+ bg_event 15, 6, BGEVENT_READ, EcruteakGymStatue
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_MORTY, 1, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, MortyScript_0x99d58, -1
- person_event SPRITE_SAGE, 7, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerSageJeffrey, -1
- person_event SPRITE_SAGE, 13, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerSagePing, -1
- person_event SPRITE_GRANNY, 5, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 1, TrainerMediumMartha, -1
- person_event SPRITE_GRANNY, 9, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 1, TrainerMediumGrace, -1
- person_event SPRITE_GYM_GUY, 15, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, EcruteakGymGuyScript, -1
- person_event SPRITE_GRAMPS, 14, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_ECRUTEAK_GYM_GRAMPS
+ object_event SPRITE_MORTY, 1, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, MortyScript_0x99d58, -1
+ object_event SPRITE_SAGE, 7, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerSageJeffrey, -1
+ object_event SPRITE_SAGE, 13, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSagePing, -1
+ object_event SPRITE_GRANNY, 5, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerMediumMartha, -1
+ object_event SPRITE_GRANNY, 9, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerMediumGrace, -1
+ object_event SPRITE_GYM_GUY, 15, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, EcruteakGymGuyScript, -1
+ object_event SPRITE_GRAMPS, 14, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ECRUTEAK_GYM_GRAMPS
diff --git a/maps/EcruteakHouse.asm b/maps/EcruteakHouse.asm
index 2b795ebd6..5cf1efc2a 100644
--- a/maps/EcruteakHouse.asm
+++ b/maps/EcruteakHouse.asm
@@ -5,24 +5,19 @@ const_value set 2
const ECRUTEAKHOUSE_GRAMPS
EcruteakHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_OBJECTS, .InitializeSages
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
+.DummyScene1:
end
.InitializeSages:
@@ -40,7 +35,7 @@ EcruteakHouse_MapScriptHeader:
setevent EVENT_ECRUTEAK_HOUSE_WANDERING_SAGE
checkitem CLEAR_BELL
iftrue .NoClearBell
- dotrigger $0
+ setscene $0
.NoClearBell:
return
@@ -48,27 +43,27 @@ EcruteakHouse_MapScriptHeader:
clearevent EVENT_ECRUTEAK_HOUSE_WANDERING_SAGE
return
-EcruteakHouse_XYTrigger1:
+EcruteakHouse_CoordEvent1:
checkevent EVENT_RANG_CLEAR_BELL_2
- iftrue EcruteakHouse_XYTrigger_DontMove
+ iftrue EcruteakHouse_CoordEvent_DontMove
applymovement ECRUTEAKHOUSE_SAGE2, MovementData_0x980c7
- moveperson ECRUTEAKHOUSE_SAGE1, $4, $6
+ moveobject ECRUTEAKHOUSE_SAGE1, $4, $6
appear ECRUTEAKHOUSE_SAGE1
pause 5
disappear ECRUTEAKHOUSE_SAGE2
end
-EcruteakHouse_XYTrigger2:
+EcruteakHouse_CoordEvent2:
checkevent EVENT_RANG_CLEAR_BELL_1
- iftrue EcruteakHouse_XYTrigger_DontMove
+ iftrue EcruteakHouse_CoordEvent_DontMove
applymovement ECRUTEAKHOUSE_SAGE1, MovementData_0x980cc
- moveperson ECRUTEAKHOUSE_SAGE2, $5, $6
+ moveobject ECRUTEAKHOUSE_SAGE2, $5, $6
appear ECRUTEAKHOUSE_SAGE2
pause 5
disappear ECRUTEAKHOUSE_SAGE1
end
-EcruteakHouse_XYTrigger_DontMove:
+EcruteakHouse_CoordEvent_DontMove:
end
SageScript_0x98062:
@@ -105,7 +100,7 @@ SageScript_0x98062:
writetext UnknownText_0x98250
waitbutton
closetext
- dotrigger $1
+ setscene $1
setevent EVENT_RANG_CLEAR_BELL_2
clearevent EVENT_RANG_CLEAR_BELL_1
setevent EVENT_GAVE_KURT_APRICORNS
@@ -139,8 +134,8 @@ SageScript_0x980b0:
closetext
end
-GrampsScript_0x980c4:
- jumptextfaceplayer UnknownText_0x984ab
+EcruteakHouseGrampsScript:
+ jumptextfaceplayer EcruteakHouseGrampsText
MovementData_0x980c7:
fix_facing
@@ -271,7 +266,7 @@ UnknownText_0x9846f:
line "to the top!"
done
-UnknownText_0x984ab:
+EcruteakHouseGrampsText:
text "Two towers…"
line "Two #MON…"
@@ -294,17 +289,17 @@ EcruteakHouse_MapEventHeader:
warp_def $f, $11, 3, ECRUTEAK_HOUSE
warp_def $3, $11, 3, WISE_TRIOS_ROOM
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 0, $7, $4, $0, EcruteakHouse_XYTrigger1, $0, $0
- xy_trigger 0, $7, $5, $0, EcruteakHouse_XYTrigger2, $0, $0
+ coord_event 0, $7, $4, EcruteakHouse_CoordEvent1
+ coord_event 0, $7, $5, EcruteakHouse_CoordEvent2
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_SAGE, 6, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SageScript_0x98062, EVENT_RANG_CLEAR_BELL_1
- person_event SPRITE_SAGE, 6, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SageScript_0x98062, EVENT_RANG_CLEAR_BELL_2
- person_event SPRITE_SAGE, 9, 6, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SageScript_0x980b0, EVENT_ECRUTEAK_HOUSE_WANDERING_SAGE
- person_event SPRITE_GRAMPS, 11, 3, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrampsScript_0x980c4, EVENT_ECRUTEAK_HOUSE_WANDERING_SAGE
+ object_event SPRITE_SAGE, 6, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SageScript_0x98062, EVENT_RANG_CLEAR_BELL_1
+ object_event SPRITE_SAGE, 6, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SageScript_0x98062, EVENT_RANG_CLEAR_BELL_2
+ object_event SPRITE_SAGE, 9, 6, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SageScript_0x980b0, EVENT_ECRUTEAK_HOUSE_WANDERING_SAGE
+ object_event SPRITE_GRAMPS, 11, 3, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakHouseGrampsScript, EVENT_ECRUTEAK_HOUSE_WANDERING_SAGE
diff --git a/maps/EcruteakItemfinderHouse.asm b/maps/EcruteakItemfinderHouse.asm
index f053c9442..0188ce31c 100644
--- a/maps/EcruteakItemfinderHouse.asm
+++ b/maps/EcruteakItemfinderHouse.asm
@@ -3,7 +3,7 @@ const_value set 2
const ECRUTEAKITEMFINDERHOUSE_POKEDEX
EcruteakItemfinderHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -171,14 +171,14 @@ EcruteakItemfinderHouse_MapEventHeader:
warp_def $7, $3, 11, ECRUTEAK_CITY
warp_def $7, $4, 11, ECRUTEAK_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 1, 2, SIGNPOST_READ, ItemFinderHouseRadio
+ bg_event 1, 2, BGEVENT_READ, ItemFinderHouseRadio
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_COOLTRAINER_M, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x9a5fb, -1
- person_event SPRITE_POKEDEX, 3, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokedexScript_0x9a620, -1
+ object_event SPRITE_COOLTRAINER_M, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CooltrainerMScript_0x9a5fb, -1
+ object_event SPRITE_POKEDEX, 3, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PokedexScript_0x9a620, -1
diff --git a/maps/EcruteakLugiaSpeechHouse.asm b/maps/EcruteakLugiaSpeechHouse.asm
index 4307a19c9..57f06d99e 100644
--- a/maps/EcruteakLugiaSpeechHouse.asm
+++ b/maps/EcruteakLugiaSpeechHouse.asm
@@ -3,22 +3,22 @@ const_value set 2
const ECRUTEAKLUGIASPEECHHOUSE_YOUNGSTER
EcruteakLugiaSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-GrampsScript_0x99334:
- jumptextfaceplayer UnknownText_0x9933d
+EcruteakLugiaSpeechHouseGrampsScript:
+ jumptextfaceplayer EcruteakLugiaSpeechHouseGrampsText
-YoungsterScript_0x99337:
- jumptextfaceplayer UnknownText_0x993ec
+EcruteakLugiaSpeechHouseYoungsterScript:
+ jumptextfaceplayer EcruteakLugiaSpeechHouseYoungsterText
LugiaSpeechHouseRadio:
jumpstd radio2
-UnknownText_0x9933d:
+EcruteakLugiaSpeechHouseGrampsText:
text "This happened when"
line "I was young."
@@ -36,7 +36,7 @@ UnknownText_0x9933d:
line "and a dragon."
done
-UnknownText_0x993ec:
+EcruteakLugiaSpeechHouseYoungsterText:
text "Is there really a"
line "#MON that big?"
@@ -53,14 +53,14 @@ EcruteakLugiaSpeechHouse_MapEventHeader:
warp_def $7, $3, 7, ECRUTEAK_CITY
warp_def $7, $4, 7, ECRUTEAK_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 1, 2, SIGNPOST_READ, LugiaSpeechHouseRadio
+ bg_event 1, 2, BGEVENT_READ, LugiaSpeechHouseRadio
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_GRAMPS, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrampsScript_0x99334, -1
- person_event SPRITE_YOUNGSTER, 4, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x99337, -1
+ object_event SPRITE_GRAMPS, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakLugiaSpeechHouseGrampsScript, -1
+ object_event SPRITE_YOUNGSTER, 4, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakLugiaSpeechHouseYoungsterScript, -1
diff --git a/maps/EcruteakMart.asm b/maps/EcruteakMart.asm
index 052b4c40d..b41c4a2d3 100644
--- a/maps/EcruteakMart.asm
+++ b/maps/EcruteakMart.asm
@@ -4,7 +4,7 @@ const_value set 2
const ECRUTEAKMART_GRANNY
EcruteakMart_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -16,13 +16,13 @@ ClerkScript_0x99c3b:
closetext
end
-SuperNerdScript_0x99c42:
- jumptextfaceplayer UnknownText_0x99c48
+EcruteakMartSuperNerdScript:
+ jumptextfaceplayer EcruteakMartSuperNerdText
-GrannyScript_0x99c45:
- jumptextfaceplayer UnknownText_0x99cd5
+EcruteakMartGrannyScript:
+ jumptextfaceplayer EcruteakMartGrannyText
-UnknownText_0x99c48:
+EcruteakMartSuperNerdText:
text "My EEVEE evolved"
line "into an ESPEON."
@@ -37,7 +37,7 @@ UnknownText_0x99c48:
line "same way…"
done
-UnknownText_0x99cd5:
+EcruteakMartGrannyText:
text "If you use REVIVE,"
line "a #MON that's"
@@ -54,14 +54,14 @@ EcruteakMart_MapEventHeader:
warp_def $7, $2, 9, ECRUTEAK_CITY
warp_def $7, $3, 9, ECRUTEAK_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x99c3b, -1
- person_event SPRITE_SUPER_NERD, 2, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x99c42, -1
- person_event SPRITE_GRANNY, 6, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrannyScript_0x99c45, -1
+ object_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x99c3b, -1
+ object_event SPRITE_SUPER_NERD, 2, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, EcruteakMartSuperNerdScript, -1
+ object_event SPRITE_GRANNY, 6, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakMartGrannyScript, -1
diff --git a/maps/EcruteakPokeCenter1F.asm b/maps/EcruteakPokeCenter1F.asm
deleted file mode 100644
index dc578d2e0..000000000
--- a/maps/EcruteakPokeCenter1F.asm
+++ /dev/null
@@ -1,233 +0,0 @@
-const_value set 2
- const ECRUTEAKPOKECENTER1F_NURSE
- const ECRUTEAKPOKECENTER1F_POKEFAN_M
- const ECRUTEAKPOKECENTER1F_COOLTRAINER_F
- const ECRUTEAKPOKECENTER1F_GYM_GUY
- const ECRUTEAKPOKECENTER1F_BILL
-
-EcruteakPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
-
-.MapCallbacks:
- db 0
-
-.Trigger0:
- priorityjump .BillActivatesTimeCapsule
- end
-
-.Trigger1:
- end
-
-.BillActivatesTimeCapsule:
- pause 30
- playsound SFX_EXIT_BUILDING
- appear ECRUTEAKPOKECENTER1F_BILL
- waitsfx
- applymovement ECRUTEAKPOKECENTER1F_BILL, EcruteakPokeCenter1FBillMovement1
- applymovement PLAYER, EcruteakPokeCenter1FPlayerMovement1
- spriteface ECRUTEAKPOKECENTER1F_NURSE, UP
- pause 10
- spriteface ECRUTEAKPOKECENTER1F_NURSE, DOWN
- pause 30
- spriteface ECRUTEAKPOKECENTER1F_NURSE, UP
- pause 10
- spriteface ECRUTEAKPOKECENTER1F_NURSE, DOWN
- pause 20
- spriteface ECRUTEAKPOKECENTER1F_BILL, DOWN
- pause 10
- opentext
- writetext EcruteakPokeCenter1F_BillText1
- buttonsound
- jump .PointlessJump
-
-.PointlessJump:
- writetext EcruteakPokeCenter1F_BillText2
- waitbutton
- closetext
- spriteface PLAYER, DOWN
- applymovement ECRUTEAKPOKECENTER1F_BILL, EcruteakPokeCenter1FBillMovement2
- playsound SFX_EXIT_BUILDING
- disappear ECRUTEAKPOKECENTER1F_BILL
- clearevent EVENT_MET_BILL
- setflag ENGINE_TIME_CAPSULE
- dotrigger $1
- waitsfx
- end
-
-EcruteakPokeCenter1FNurseScript:
- jumpstd pokecenternurse
-
-EcruteakPokeCenter1FPokefanMScript:
- special Mobile_DummyReturnFalse
- iftrue .mobile
- jumptextfaceplayer EcruteakPokeCenter1FPokefanMText
-
-.mobile
- jumptextfaceplayer EcruteakPokeCenter1FPokefanMTextMobile
-
-EcruteakPokeCenter1FCooltrainerFScript:
- jumptextfaceplayer EcruteakPokeCenter1FCooltrainerFText
-
-EcruteakPokeCenter1FGymGuyScript:
- jumptextfaceplayer EcruteakPokeCenter1FGymGuyText
-
-EcruteakPokeCenter1FBillMovement1:
- step UP
- step UP
- step UP
- step UP
- step RIGHT
- step RIGHT
- step RIGHT
- turn_head UP
- step_end
-
-EcruteakPokeCenter1FBillMovement2:
- step RIGHT
- step DOWN
- step DOWN
- step DOWN
- step DOWN
- step_end
-
-EcruteakPokeCenter1FPlayerMovement1:
- step UP
- step UP
- step UP
- step_end
-
-EcruteakPokeCenter1F_BillText1:
- text "Hi, I'm BILL. And"
- line "who are you?"
-
- para "Hmm, <PLAYER>, huh?"
- line "You've come at the"
- cont "right time."
- done
-
-EcruteakPokeCenter1F_BillText2:
- text "I just finished"
- line "adjustments on my"
- cont "TIME CAPSULE."
-
- para "You know that"
- line "#MON can be"
- cont "traded, right?"
-
- para "My TIME CAPSULE"
- line "was developed to"
-
- para "enable trades with"
- line "the past."
-
- para "But you can't send"
- line "anything that"
-
- para "didn't exist in"
- line "the past."
-
- para "If you did, the PC"
- line "in the past would"
- cont "have a breakdown."
-
- para "So you have to"
- line "remove anything"
-
- para "that wasn't around"
- line "in the past."
-
- para "Put simply, no"
- line "sending new moves"
-
- para "or new #MON in"
- line "the TIME CAPSULE."
-
- para "Don't you worry."
- line "I'm done with the"
- cont "adjustments."
-
- para "Tomorrow, TIME"
- line "CAPSULES will be"
-
- para "running at all"
- line "#MON CENTERS."
-
- para "I have to hurry on"
- line "back to GOLDENROD"
- cont "and see my folks."
-
- para "Buh-bye!"
- done
-
-EcruteakPokeCenter1FPokefanMText:
- text "The way the KIMONO"
- line "GIRLS dance is"
-
- para "marvelous. Just"
- line "like the way they"
- cont "use their #MON."
- done
-
-EcruteakPokeCenter1FPokefanMTextMobile:
- text "You must be hoping"
- line "to battle more"
-
- para "people, right?"
- line "There's apparently"
-
- para "some place where"
- line "trainers gather."
-
- para "Where, you ask?"
-
- para "It's a little past"
- line "OLIVINE CITY."
- done
-
-EcruteakPokeCenter1FCooltrainerFText:
- text "MORTY, the GYM"
- line "LEADER, is soooo"
- cont "cool."
-
- para "His #MON are"
- line "really tough too."
- done
-
-EcruteakPokeCenter1FGymGuyText:
- text "LAKE OF RAGE…"
-
- para "The appearance of"
- line "a GYARADOS swarm…"
-
- para "I smell a conspir-"
- line "acy. I know it!"
- done
-
-EcruteakPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 6, ECRUTEAK_CITY
- warp_def $7, $4, 6, ECRUTEAK_CITY
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 5
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, EcruteakPokeCenter1FNurseScript, -1
- person_event SPRITE_POKEFAN_M, 6, 7, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, EcruteakPokeCenter1FPokefanMScript, -1
- person_event SPRITE_COOLTRAINER_F, 4, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, EcruteakPokeCenter1FCooltrainerFScript, -1
- person_event SPRITE_GYM_GUY, 1, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, EcruteakPokeCenter1FGymGuyScript, -1
- person_event SPRITE_BILL, 7, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_ECRUTEAK_POKE_CENTER_BILL
diff --git a/maps/EcruteakPokecenter1F.asm b/maps/EcruteakPokecenter1F.asm
new file mode 100644
index 000000000..c680fece0
--- /dev/null
+++ b/maps/EcruteakPokecenter1F.asm
@@ -0,0 +1,231 @@
+const_value set 2
+ const ECRUTEAKPOKECENTER1F_NURSE
+ const ECRUTEAKPOKECENTER1F_POKEFAN_M
+ const ECRUTEAKPOKECENTER1F_COOLTRAINER_F
+ const ECRUTEAKPOKECENTER1F_GYM_GUY
+ const ECRUTEAKPOKECENTER1F_BILL
+
+EcruteakPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 2
+ scene_script .MeetBill
+ scene_script .DummyScene
+
+.MapCallbacks:
+ db 0
+
+.MeetBill:
+ priorityjump .BillActivatesTimeCapsule
+ end
+
+.DummyScene:
+ end
+
+.BillActivatesTimeCapsule:
+ pause 30
+ playsound SFX_EXIT_BUILDING
+ appear ECRUTEAKPOKECENTER1F_BILL
+ waitsfx
+ applymovement ECRUTEAKPOKECENTER1F_BILL, EcruteakPokecenter1FBillMovement1
+ applymovement PLAYER, EcruteakPokecenter1FPlayerMovement1
+ spriteface ECRUTEAKPOKECENTER1F_NURSE, UP
+ pause 10
+ spriteface ECRUTEAKPOKECENTER1F_NURSE, DOWN
+ pause 30
+ spriteface ECRUTEAKPOKECENTER1F_NURSE, UP
+ pause 10
+ spriteface ECRUTEAKPOKECENTER1F_NURSE, DOWN
+ pause 20
+ spriteface ECRUTEAKPOKECENTER1F_BILL, DOWN
+ pause 10
+ opentext
+ writetext EcruteakPokecenter1F_BillText1
+ buttonsound
+ jump .PointlessJump
+
+.PointlessJump:
+ writetext EcruteakPokecenter1F_BillText2
+ waitbutton
+ closetext
+ spriteface PLAYER, DOWN
+ applymovement ECRUTEAKPOKECENTER1F_BILL, EcruteakPokecenter1FBillMovement2
+ playsound SFX_EXIT_BUILDING
+ disappear ECRUTEAKPOKECENTER1F_BILL
+ clearevent EVENT_MET_BILL
+ setflag ENGINE_TIME_CAPSULE
+ setscene $1
+ waitsfx
+ end
+
+EcruteakPokecenter1FNurseScript:
+ jumpstd pokecenternurse
+
+EcruteakPokecenter1FPokefanMScript:
+ special Mobile_DummyReturnFalse
+ iftrue .mobile
+ jumptextfaceplayer EcruteakPokecenter1FPokefanMText
+
+.mobile
+ jumptextfaceplayer EcruteakPokecenter1FPokefanMTextMobile
+
+EcruteakPokecenter1FCooltrainerFScript:
+ jumptextfaceplayer EcruteakPokecenter1FCooltrainerFText
+
+EcruteakPokecenter1FGymGuyScript:
+ jumptextfaceplayer EcruteakPokecenter1FGymGuyText
+
+EcruteakPokecenter1FBillMovement1:
+ step UP
+ step UP
+ step UP
+ step UP
+ step RIGHT
+ step RIGHT
+ step RIGHT
+ turn_head UP
+ step_end
+
+EcruteakPokecenter1FBillMovement2:
+ step RIGHT
+ step DOWN
+ step DOWN
+ step DOWN
+ step DOWN
+ step_end
+
+EcruteakPokecenter1FPlayerMovement1:
+ step UP
+ step UP
+ step UP
+ step_end
+
+EcruteakPokecenter1F_BillText1:
+ text "Hi, I'm BILL. And"
+ line "who are you?"
+
+ para "Hmm, <PLAYER>, huh?"
+ line "You've come at the"
+ cont "right time."
+ done
+
+EcruteakPokecenter1F_BillText2:
+ text "I just finished"
+ line "adjustments on my"
+ cont "TIME CAPSULE."
+
+ para "You know that"
+ line "#MON can be"
+ cont "traded, right?"
+
+ para "My TIME CAPSULE"
+ line "was developed to"
+
+ para "enable trades with"
+ line "the past."
+
+ para "But you can't send"
+ line "anything that"
+
+ para "didn't exist in"
+ line "the past."
+
+ para "If you did, the PC"
+ line "in the past would"
+ cont "have a breakdown."
+
+ para "So you have to"
+ line "remove anything"
+
+ para "that wasn't around"
+ line "in the past."
+
+ para "Put simply, no"
+ line "sending new moves"
+
+ para "or new #MON in"
+ line "the TIME CAPSULE."
+
+ para "Don't you worry."
+ line "I'm done with the"
+ cont "adjustments."
+
+ para "Tomorrow, TIME"
+ line "CAPSULES will be"
+
+ para "running at all"
+ line "#MON CENTERS."
+
+ para "I have to hurry on"
+ line "back to GOLDENROD"
+ cont "and see my folks."
+
+ para "Buh-bye!"
+ done
+
+EcruteakPokecenter1FPokefanMText:
+ text "The way the KIMONO"
+ line "GIRLS dance is"
+
+ para "marvelous. Just"
+ line "like the way they"
+ cont "use their #MON."
+ done
+
+EcruteakPokecenter1FPokefanMTextMobile:
+ text "You must be hoping"
+ line "to battle more"
+
+ para "people, right?"
+ line "There's apparently"
+
+ para "some place where"
+ line "trainers gather."
+
+ para "Where, you ask?"
+
+ para "It's a little past"
+ line "OLIVINE CITY."
+ done
+
+EcruteakPokecenter1FCooltrainerFText:
+ text "MORTY, the GYM"
+ line "LEADER, is soooo"
+ cont "cool."
+
+ para "His #MON are"
+ line "really tough too."
+ done
+
+EcruteakPokecenter1FGymGuyText:
+ text "LAKE OF RAGE…"
+
+ para "The appearance of"
+ line "a GYARADOS swarm…"
+
+ para "I smell a conspir-"
+ line "acy. I know it!"
+ done
+
+EcruteakPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 6, ECRUTEAK_CITY
+ warp_def $7, $4, 6, ECRUTEAK_CITY
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 5
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakPokecenter1FNurseScript, -1
+ object_event SPRITE_POKEFAN_M, 6, 7, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakPokecenter1FPokefanMScript, -1
+ object_event SPRITE_COOLTRAINER_F, 4, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakPokecenter1FCooltrainerFScript, -1
+ object_event SPRITE_GYM_GUY, 1, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, EcruteakPokecenter1FGymGuyScript, -1
+ object_event SPRITE_BILL, 7, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ECRUTEAK_POKE_CENTER_BILL
diff --git a/maps/ElmsHouse.asm b/maps/ElmsHouse.asm
index 2c5403b42..c8dcb1b29 100644
--- a/maps/ElmsHouse.asm
+++ b/maps/ElmsHouse.asm
@@ -3,7 +3,7 @@ const_value set 2
const ELMSHOUSE_ELMS_SON
ElmsHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -92,16 +92,16 @@ ElmsHouse_MapEventHeader:
warp_def $7, $2, 4, NEW_BARK_TOWN
warp_def $7, $3, 4, NEW_BARK_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 1, 0, SIGNPOST_READ, ElmsHousePC
- signpost 1, 6, SIGNPOST_READ, ElmsHouseBookshelf
- signpost 1, 7, SIGNPOST_READ, ElmsHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, ElmsHousePC
+ bg_event 1, 6, BGEVENT_READ, ElmsHouseBookshelf
+ bg_event 1, 7, BGEVENT_READ, ElmsHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_TEACHER, 5, 1, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ElmsWife, -1
- person_event SPRITE_BUG_CATCHER, 4, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ElmsSon, -1
+ object_event SPRITE_TEACHER, 5, 1, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ElmsWife, -1
+ object_event SPRITE_BUG_CATCHER, 4, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ElmsSon, -1
diff --git a/maps/ElmsLab.asm b/maps/ElmsLab.asm
index c49c522fc..631969785 100644
--- a/maps/ElmsLab.asm
+++ b/maps/ElmsLab.asm
@@ -7,63 +7,58 @@ const_value set 2
const ELMSLAB_OFFICER
ElmsLab_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 6
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
- maptrigger .Trigger2
- maptrigger .Trigger3
- maptrigger .Trigger4
- maptrigger .Trigger5
+ scene_script .MeetElm
+ scene_script .DummyScene1
+ scene_script .DummyScene2
+ scene_script .DummyScene3
+ scene_script .DummyScene4
+ scene_script .DummyScene5
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_OBJECTS, .MoveElmCallback
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, .Callback_MoveElm
-
-.Trigger0:
- priorityjump ElmsLab_AutowalkUpToElm
+.MeetElm:
+ priorityjump .WalkUpToElm
end
-.Trigger1:
+.DummyScene1:
end
-.Trigger2:
+.DummyScene2:
end
-.Trigger3:
+.DummyScene3:
end
-.Trigger4:
+.DummyScene4:
end
-.Trigger5:
+.DummyScene5:
end
-.Callback_MoveElm:
- checktriggers
+.MoveElmCallback:
+ checkscene
iftrue .Skip
- moveperson ELMSLAB_ELM, $3, $4
+ moveobject ELMSLAB_ELM, $3, $4
.Skip:
return
-ElmsLab_AutowalkUpToElm:
+.WalkUpToElm:
applymovement PLAYER, ElmsLab_WalkUpToElmMovement
showemote EMOTE_SHOCK, ELMSLAB_ELM, 15
spriteface ELMSLAB_ELM, RIGHT
opentext
writetext ElmText_Intro
-ElmsLab_RefuseLoop:
+.MustSayYes:
yesorno
- iftrue ElmsLab_ElmGetsEmail
+ iftrue .ElmGetsEmail
writetext ElmText_Refused
- jump ElmsLab_RefuseLoop
+ jump .MustSayYes
-ElmsLab_ElmGetsEmail:
+.ElmGetsEmail:
writetext ElmText_Accepted
buttonsound
writetext ElmText_ResearchAmbitions
@@ -89,7 +84,7 @@ ElmsLab_ElmGetsEmail:
opentext
writetext ElmText_ChooseAPokemon
waitbutton
- dotrigger $1
+ setscene $1
closetext
end
@@ -279,8 +274,8 @@ ElmDirectionsScript:
closetext
setevent EVENT_GOT_A_POKEMON_FROM_ELM
setevent EVENT_RIVAL_CHERRYGROVE_CITY
- dotrigger $5
- domaptrigger NEW_BARK_TOWN, $1
+ setscene $5
+ setmapscene NEW_BARK_TOWN, $1
end
ElmDescribesMrPokemonScript:
@@ -346,13 +341,13 @@ ElmAfterTheftScript:
buttonsound
setevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
setflag ENGINE_BUG_CONTEST_ON
- domaptrigger ROUTE_29, $1
+ setmapscene ROUTE_29, $1
clearevent EVENT_ROUTE_30_YOUNGSTER_JOEY
setevent EVENT_ROUTE_30_BATTLE
writetext ElmAfterTheftText6
waitbutton
closetext
- dotrigger $6
+ setscene $6
end
ElmStudyingEggScript:
@@ -484,7 +479,7 @@ AideScript_GivePotions:
writetext AideText_AlwaysBusy
waitbutton
closetext
- dotrigger $2
+ setscene $2
end
AideScript_WalkBalls1:
@@ -512,7 +507,7 @@ AideScript_GiveYouBalls:
buttonsound
itemnotify
closetext
- dotrigger $2
+ setscene $2
end
AideScript_ReceiveTheBalls:
@@ -567,7 +562,7 @@ CopScript:
closetext
applymovement ELMSLAB_OFFICER, OfficerLeavesMovement
disappear ELMSLAB_OFFICER
- dotrigger $2
+ setscene $2
end
ElmsLabWindow:
@@ -1384,41 +1379,41 @@ ElmsLab_MapEventHeader:
warp_def $b, $4, 1, NEW_BARK_TOWN
warp_def $b, $5, 1, NEW_BARK_TOWN
-.XYTriggers:
+.CoordEvents:
db 8
- xy_trigger 1, $6, $4, $0, LabTryToLeaveScript, $0, $0
- xy_trigger 1, $6, $5, $0, LabTryToLeaveScript, $0, $0
- xy_trigger 3, $5, $4, $0, MeetCopScript, $0, $0
- xy_trigger 3, $5, $5, $0, MeetCopScript2, $0, $0
- xy_trigger 5, $8, $4, $0, AideScript_WalkPotions1, $0, $0
- xy_trigger 5, $8, $5, $0, AideScript_WalkPotions2, $0, $0
- xy_trigger 6, $8, $4, $0, AideScript_WalkBalls1, $0, $0
- xy_trigger 6, $8, $5, $0, AideScript_WalkBalls2, $0, $0
-
-.Signposts:
+ coord_event 1, $6, $4, LabTryToLeaveScript
+ coord_event 1, $6, $5, LabTryToLeaveScript
+ coord_event 3, $5, $4, MeetCopScript
+ coord_event 3, $5, $5, MeetCopScript2
+ coord_event 5, $8, $4, AideScript_WalkPotions1
+ coord_event 5, $8, $5, AideScript_WalkPotions2
+ coord_event 6, $8, $4, AideScript_WalkBalls1
+ coord_event 6, $8, $5, AideScript_WalkBalls2
+
+.BGEvents:
db 16
- signpost 1, 2, SIGNPOST_READ, ElmsLabHealingMachine
- signpost 1, 6, SIGNPOST_READ, ElmsLabBookshelf
- signpost 1, 7, SIGNPOST_READ, ElmsLabBookshelf
- signpost 1, 8, SIGNPOST_READ, ElmsLabBookshelf
- signpost 1, 9, SIGNPOST_READ, ElmsLabBookshelf
- signpost 7, 0, SIGNPOST_READ, ElmsLabTravelTip1
- signpost 7, 1, SIGNPOST_READ, ElmsLabTravelTip2
- signpost 7, 2, SIGNPOST_READ, ElmsLabTravelTip3
- signpost 7, 3, SIGNPOST_READ, ElmsLabTravelTip4
- signpost 7, 6, SIGNPOST_READ, ElmsLabBookshelf
- signpost 7, 7, SIGNPOST_READ, ElmsLabBookshelf
- signpost 7, 8, SIGNPOST_READ, ElmsLabBookshelf
- signpost 7, 9, SIGNPOST_READ, ElmsLabBookshelf
- signpost 3, 9, SIGNPOST_READ, ElmsLabTrashcan
- signpost 0, 5, SIGNPOST_READ, ElmsLabWindow
- signpost 5, 3, SIGNPOST_DOWN, ElmsLabPC
-
-.PersonEvents:
+ bg_event 1, 2, BGEVENT_READ, ElmsLabHealingMachine
+ bg_event 1, 6, BGEVENT_READ, ElmsLabBookshelf
+ bg_event 1, 7, BGEVENT_READ, ElmsLabBookshelf
+ bg_event 1, 8, BGEVENT_READ, ElmsLabBookshelf
+ bg_event 1, 9, BGEVENT_READ, ElmsLabBookshelf
+ bg_event 7, 0, BGEVENT_READ, ElmsLabTravelTip1
+ bg_event 7, 1, BGEVENT_READ, ElmsLabTravelTip2
+ bg_event 7, 2, BGEVENT_READ, ElmsLabTravelTip3
+ bg_event 7, 3, BGEVENT_READ, ElmsLabTravelTip4
+ bg_event 7, 6, BGEVENT_READ, ElmsLabBookshelf
+ bg_event 7, 7, BGEVENT_READ, ElmsLabBookshelf
+ bg_event 7, 8, BGEVENT_READ, ElmsLabBookshelf
+ bg_event 7, 9, BGEVENT_READ, ElmsLabBookshelf
+ bg_event 3, 9, BGEVENT_READ, ElmsLabTrashcan
+ bg_event 0, 5, BGEVENT_READ, ElmsLabWindow
+ bg_event 5, 3, BGEVENT_DOWN, ElmsLabPC
+
+.ObjectEvents:
db 6
- person_event SPRITE_ELM, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ProfElmScript, -1
- person_event SPRITE_SCIENTIST, 9, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ElmsAideScript, EVENT_ELMS_AIDE_IN_LAB
- person_event SPRITE_POKE_BALL, 3, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CyndaquilPokeBallScript, EVENT_CYNDAQUIL_POKEBALL_IN_ELMS_LAB
- person_event SPRITE_POKE_BALL, 3, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TotodilePokeBallScript, EVENT_TOTODILE_POKEBALL_IN_ELMS_LAB
- person_event SPRITE_POKE_BALL, 3, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ChikoritaPokeBallScript, EVENT_CHIKORITA_POKEBALL_IN_ELMS_LAB
- person_event SPRITE_OFFICER, 3, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, CopScript, EVENT_COP_IN_ELMS_LAB
+ object_event SPRITE_ELM, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ProfElmScript, -1
+ object_event SPRITE_SCIENTIST, 9, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ElmsAideScript, EVENT_ELMS_AIDE_IN_LAB
+ object_event SPRITE_POKE_BALL, 3, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CyndaquilPokeBallScript, EVENT_CYNDAQUIL_POKEBALL_IN_ELMS_LAB
+ object_event SPRITE_POKE_BALL, 3, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TotodilePokeBallScript, EVENT_TOTODILE_POKEBALL_IN_ELMS_LAB
+ object_event SPRITE_POKE_BALL, 3, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ChikoritaPokeBallScript, EVENT_CHIKORITA_POKEBALL_IN_ELMS_LAB
+ object_event SPRITE_OFFICER, 3, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CopScript, EVENT_COP_IN_ELMS_LAB
diff --git a/maps/FastShip1F.asm b/maps/FastShip1F.asm
index 3440cd848..f2e4337c3 100644
--- a/maps/FastShip1F.asm
+++ b/maps/FastShip1F.asm
@@ -5,28 +5,26 @@ const_value set 2
const FASTSHIP1F_GENTLEMAN
FastShip1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 3
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
- maptrigger .Trigger2
+ scene_script .DummyScene0
+ scene_script .EnterFastShip
+ scene_script .DummyScene2
.MapCallbacks:
db 0
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
- priorityjump .PriorityJump2
+.EnterFastShip:
+ priorityjump .EnterFastShipScript
end
-.Trigger2:
+.DummyScene2:
end
-.PriorityJump2:
+.EnterFastShipScript:
applymovement FASTSHIP1F_SAILOR1, MovementData_0x7520e
applymovement PLAYER, MovementData_0x75217
applymovement FASTSHIP1F_SAILOR1, MovementData_0x75211
@@ -37,11 +35,11 @@ FastShip1F_MapScriptHeader:
clearevent EVENT_FAST_SHIP_HAS_ARRIVED
checkevent EVENT_FAST_SHIP_FIRST_TIME
iftrue .SkipGrandpa
- dotrigger $2
+ setscene $2
end
.SkipGrandpa:
- dotrigger $0
+ setscene $0
end
SailorScript_0x75160:
@@ -73,7 +71,7 @@ SailorScript_0x75160:
special FadeOutPalettes
waitsfx
setevent EVENT_VERMILION_PORT_SAILOR_AT_GANGWAY
- domaptrigger VERMILION_PORT, $1
+ setmapscene VERMILION_PORT, $1
warp VERMILION_PORT, $7, $11
end
@@ -86,7 +84,7 @@ SailorScript_0x75160:
special FadeOutPalettes
waitsfx
setevent EVENT_OLIVINE_PORT_SAILOR_AT_GANGWAY
- domaptrigger OLIVINE_PORT, $1
+ setmapscene OLIVINE_PORT, $1
warp OLIVINE_PORT, $7, $17
end
@@ -118,13 +116,13 @@ SailorScript_0x751d0:
closetext
end
-SailorScript_0x751e4:
- jumptextfaceplayer UnknownText_0x753c0
+FastShip1FSailorScript:
+ jumptextfaceplayer FastShip1FSailorText
-WorriedGrandpaTriggerRight:
- moveperson FASTSHIP1F_GENTLEMAN, $14, $6
+WorriedGrandpaSceneRight:
+ moveobject FASTSHIP1F_GENTLEMAN, $14, $6
-WorriedGrandpaTriggerLeft:
+WorriedGrandpaSceneLeft:
appear FASTSHIP1F_GENTLEMAN
applymovement FASTSHIP1F_GENTLEMAN, MovementData_0x7521b
playsound SFX_TACKLE
@@ -137,7 +135,7 @@ WorriedGrandpaTriggerLeft:
spriteface PLAYER, RIGHT
applymovement FASTSHIP1F_GENTLEMAN, MovementData_0x75222
disappear FASTSHIP1F_GENTLEMAN
- dotrigger $0
+ setscene $0
end
MovementData_0x7520e:
@@ -252,7 +250,7 @@ UnknownText_0x7534f:
cont "you're sleeping."
done
-UnknownText_0x753c0:
+FastShip1FSailorText:
text "The passengers are"
line "all trainers."
@@ -306,17 +304,17 @@ FastShip1F_MapEventHeader:
warp_def $c, $6, 1, FAST_SHIP_B1F
warp_def $e, $1e, 2, FAST_SHIP_B1F
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 2, $6, $18, $0, WorriedGrandpaTriggerLeft, $0, $0
- xy_trigger 2, $6, $19, $0, WorriedGrandpaTriggerRight, $0, $0
+ coord_event 2, $6, $18, WorriedGrandpaSceneLeft
+ coord_event 2, $6, $19, WorriedGrandpaSceneRight
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_SAILOR, 2, 25, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SailorScript_0x75160, -1
- person_event SPRITE_SAILOR, 7, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SailorScript_0x751d0, -1
- person_event SPRITE_SAILOR, 17, 22, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SailorScript_0x751e4, -1
- person_event SPRITE_GENTLEMAN, 6, 19, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_FAST_SHIP_1F_GENTLEMAN
+ object_event SPRITE_SAILOR, 2, 25, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SailorScript_0x75160, -1
+ object_event SPRITE_SAILOR, 7, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SailorScript_0x751d0, -1
+ object_event SPRITE_SAILOR, 17, 22, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FastShip1FSailorScript, -1
+ object_event SPRITE_GENTLEMAN, 6, 19, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_FAST_SHIP_1F_GENTLEMAN
diff --git a/maps/FastShipB1F.asm b/maps/FastShipB1F.asm
index 4a4d3a87c..73c8838db 100644
--- a/maps/FastShipB1F.asm
+++ b/maps/FastShipB1F.asm
@@ -13,27 +13,25 @@ const_value set 2
const FASTSHIPB1F_YOUNGSTER2
FastShipB1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x7673a, 0
- dw UnknownScript_0x7673b, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 0
-UnknownScript_0x7673a:
+.DummyScene0:
end
-UnknownScript_0x7673b:
+.DummyScene1:
end
UnknownScript_0x7673c:
checkevent EVENT_FAST_SHIP_B1F_SAILOR_RIGHT
iftrue UnknownScript_0x76766
applymovement FASTSHIPB1F_SAILOR2, MovementData_0x76876
- moveperson FASTSHIPB1F_SAILOR1, $1e, $6
+ moveobject FASTSHIPB1F_SAILOR1, $1e, $6
appear FASTSHIPB1F_SAILOR1
pause 5
disappear FASTSHIPB1F_SAILOR2
@@ -43,7 +41,7 @@ UnknownScript_0x76751:
checkevent EVENT_FAST_SHIP_B1F_SAILOR_LEFT
iftrue UnknownScript_0x76766
applymovement FASTSHIPB1F_SAILOR1, MovementData_0x76871
- moveperson FASTSHIPB1F_SAILOR2, $1f, $6
+ moveobject FASTSHIPB1F_SAILOR2, $1f, $6
appear FASTSHIPB1F_SAILOR2
pause 5
disappear FASTSHIPB1F_SAILOR1
@@ -96,111 +94,111 @@ UnknownScript_0x767a0:
end
TrainerSailorJeff:
- trainer EVENT_BEAT_SAILOR_JEFF, SAILOR, JEFF, SailorJeffSeenText, SailorJeffBeatenText, 0, SailorJeffScript
+ trainer EVENT_BEAT_SAILOR_JEFF, SAILOR, JEFF, SailorJeffSeenText, SailorJeffBeatenText, 0, .Script
-SailorJeffScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x76a38
+ writetext SailorJeffAfterBattleText
waitbutton
closetext
end
TrainerPicnickerDebra:
- trainer EVENT_BEAT_PICNICKER_DEBRA, PICNICKER, DEBRA, PicnickerDebraSeenText, PicnickerDebraBeatenText, 0, PicnickerDebraScript
+ trainer EVENT_BEAT_PICNICKER_DEBRA, PICNICKER, DEBRA, PicnickerDebraSeenText, PicnickerDebraBeatenText, 0, .Script
-PicnickerDebraScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x76a99
+ writetext PicnickerDebraAfterBattleText
waitbutton
closetext
end
TrainerJugglerFritz:
- trainer EVENT_BEAT_JUGGLER_FRITZ, JUGGLER, FRITZ, JugglerFritzSeenText, JugglerFritzBeatenText, 0, JugglerFritzScript
+ trainer EVENT_BEAT_JUGGLER_FRITZ, JUGGLER, FRITZ, JugglerFritzSeenText, JugglerFritzBeatenText, 0, .Script
-JugglerFritzScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x76b02
+ writetext JugglerFritzAfterBattleText
waitbutton
closetext
end
TrainerSailorGarrett:
- trainer EVENT_BEAT_SAILOR_GARRETT, SAILOR, GARRETT, SailorGarrettSeenText, SailorGarrettBeatenText, 0, SailorGarrettScript
+ trainer EVENT_BEAT_SAILOR_GARRETT, SAILOR, GARRETT, SailorGarrettSeenText, SailorGarrettBeatenText, 0, .Script
-SailorGarrettScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x76b7a
+ writetext SailorGarrettAfterBattleText
waitbutton
closetext
end
TrainerFisherJonah:
- trainer EVENT_BEAT_FISHER_JONAH, FISHER, JONAH, FisherJonahSeenText, FisherJonahBeatenText, 0, FisherJonahScript
+ trainer EVENT_BEAT_FISHER_JONAH, FISHER, JONAH, FisherJonahSeenText, FisherJonahBeatenText, 0, .Script
-FisherJonahScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x76c22
+ writetext FisherJonahAfterBattleText
waitbutton
closetext
end
TrainerBlackbeltWai:
- trainer EVENT_BEAT_BLACKBELT_WAI, BLACKBELT_T, WAI, BlackbeltWaiSeenText, BlackbeltWaiBeatenText, 0, BlackbeltWaiScript
+ trainer EVENT_BEAT_BLACKBELT_WAI, BLACKBELT_T, WAI, BlackbeltWaiSeenText, BlackbeltWaiBeatenText, 0, .Script
-BlackbeltWaiScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x76c9e
+ writetext BlackbeltWaiAfterBattleText
waitbutton
closetext
end
TrainerSailorKenneth:
- trainer EVENT_BEAT_SAILOR_KENNETH, SAILOR, KENNETH, SailorKennethSeenText, SailorKennethBeatenText, 0, SailorKennethScript
+ trainer EVENT_BEAT_SAILOR_KENNETH, SAILOR, KENNETH, SailorKennethSeenText, SailorKennethBeatenText, 0, .Script
-SailorKennethScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x76d5f
+ writetext SailorKennethAfterBattleText
waitbutton
closetext
end
TrainerTeacherShirley:
- trainer EVENT_BEAT_TEACHER_SHIRLEY, TEACHER, SHIRLEY, TeacherShirleySeenText, TeacherShirleyBeatenText, 0, TeacherShirleyScript
+ trainer EVENT_BEAT_TEACHER_SHIRLEY, TEACHER, SHIRLEY, TeacherShirleySeenText, TeacherShirleyBeatenText, 0, .Script
-TeacherShirleyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x76de1
+ writetext TeacherShirleyAfterBattleText
waitbutton
closetext
end
TrainerSchoolboyNate:
- trainer EVENT_BEAT_SCHOOLBOY_NATE, SCHOOLBOY, NATE, SchoolboyNateSeenText, SchoolboyNateBeatenText, 0, SchoolboyNateScript
+ trainer EVENT_BEAT_SCHOOLBOY_NATE, SCHOOLBOY, NATE, SchoolboyNateSeenText, SchoolboyNateBeatenText, 0, .Script
-SchoolboyNateScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x76e3d
+ writetext SchoolboyNateAfterBattleText
waitbutton
closetext
end
TrainerSchoolboyRicky:
- trainer EVENT_BEAT_SCHOOLBOY_RICKY, SCHOOLBOY, RICKY, SchoolboyRickySeenText, SchoolboyRickyBeatenText, 0, SchoolboyRickyScript
+ trainer EVENT_BEAT_SCHOOLBOY_RICKY, SCHOOLBOY, RICKY, SchoolboyRickySeenText, SchoolboyRickyBeatenText, 0, .Script
-SchoolboyRickyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x76eb6
+ writetext SchoolboyRickyAfterBattleText
waitbutton
closetext
end
@@ -278,7 +276,7 @@ SailorJeffBeatenText:
line "break's over!"
done
-UnknownText_0x76a38:
+SailorJeffAfterBattleText:
text "I guess I can't"
line "win if I don't get"
cont "serious."
@@ -294,7 +292,7 @@ PicnickerDebraBeatenText:
line "strong!"
done
-UnknownText_0x76a99:
+PicnickerDebraAfterBattleText:
text "SAFFRON, CELADON…"
line "I hear there are"
@@ -312,7 +310,7 @@ JugglerFritzBeatenText:
line "more…"
done
-UnknownText_0x76b02:
+JugglerFritzAfterBattleText:
text "No more ships for"
line "me. Next time,"
@@ -330,7 +328,7 @@ SailorGarrettBeatenText:
line "field…"
done
-UnknownText_0x76b7a:
+SailorGarrettAfterBattleText:
text "We get different"
line "passengers from"
@@ -352,7 +350,7 @@ FisherJonahBeatenText:
line "anymore…"
done
-UnknownText_0x76c22:
+FisherJonahAfterBattleText:
text "I plan to fish off"
line "VERMILION's pier."
done
@@ -370,7 +368,7 @@ BlackbeltWaiBeatenText:
line "over!"
done
-UnknownText_0x76c9e:
+BlackbeltWaiAfterBattleText:
text "I couldn't find"
line "the KARATE KING in"
cont "JOHTO."
@@ -393,7 +391,7 @@ SailorKennethBeatenText:
line "ing is obvious…"
done
-UnknownText_0x76d5f:
+SailorKennethAfterBattleText:
text "Eight BADGES!"
line "They must prove"
@@ -413,7 +411,7 @@ TeacherShirleyBeatenText:
text "Aaack!"
done
-UnknownText_0x76de1:
+TeacherShirleyAfterBattleText:
text "We're on a field"
line "trip to the RUINS"
cont "outside VIOLET."
@@ -428,7 +426,7 @@ SchoolboyNateBeatenText:
text "Yaargh!"
done
-UnknownText_0x76e3d:
+SchoolboyNateAfterBattleText:
text "Radios pick up"
line "strange signals"
cont "inside the RUINS."
@@ -444,7 +442,7 @@ SchoolboyRickyBeatenText:
text "I was done in!"
done
-UnknownText_0x76eb6:
+SchoolboyRickyAfterBattleText:
text "I read that there"
line "are four of those"
cont "stone panels."
@@ -459,26 +457,26 @@ FastShipB1F_MapEventHeader:
warp_def $b, $5, 11, FAST_SHIP_1F
warp_def $d, $1f, 12, FAST_SHIP_1F
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 0, $7, $1e, $0, UnknownScript_0x7673c, $0, $0
- xy_trigger 0, $7, $1f, $0, UnknownScript_0x76751, $0, $0
+ coord_event 0, $7, $1e, UnknownScript_0x7673c
+ coord_event 0, $7, $1f, UnknownScript_0x76751
-.Signposts:
+.BGEvents:
db 1
- signpost 9, 27, SIGNPOST_READ, FashShipB1FTrashcan
+ bg_event 9, 27, BGEVENT_READ, FashShipB1FTrashcan
-.PersonEvents:
+.ObjectEvents:
db 12
- person_event SPRITE_SAILOR, 6, 30, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SailorScript_0x76767, EVENT_FAST_SHIP_B1F_SAILOR_LEFT
- person_event SPRITE_SAILOR, 6, 31, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SailorScript_0x76767, EVENT_FAST_SHIP_B1F_SAILOR_RIGHT
- person_event SPRITE_SAILOR, 11, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerSailorJeff, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
- person_event SPRITE_LASS, 4, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 1, TrainerPicnickerDebra, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
- person_event SPRITE_SUPER_NERD, 9, 26, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerJugglerFritz, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
- person_event SPRITE_SAILOR, 4, 17, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 4, TrainerSailorGarrett, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
- person_event SPRITE_FISHER, 8, 25, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerFisherJonah, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
- person_event SPRITE_BLACK_BELT, 11, 15, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerBlackbeltWai, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
- person_event SPRITE_SAILOR, 4, 23, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 4, TrainerSailorKenneth, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
- person_event SPRITE_TEACHER, 11, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerTeacherShirley, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
- person_event SPRITE_YOUNGSTER, 9, 14, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerSchoolboyNate, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
- person_event SPRITE_YOUNGSTER, 11, 14, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerSchoolboyRicky, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
+ object_event SPRITE_SAILOR, 6, 30, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SailorScript_0x76767, EVENT_FAST_SHIP_B1F_SAILOR_LEFT
+ object_event SPRITE_SAILOR, 6, 31, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SailorScript_0x76767, EVENT_FAST_SHIP_B1F_SAILOR_RIGHT
+ object_event SPRITE_SAILOR, 11, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSailorJeff, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
+ object_event SPRITE_LASS, 4, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerPicnickerDebra, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
+ object_event SPRITE_SUPER_NERD, 9, 26, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerJugglerFritz, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
+ object_event SPRITE_SAILOR, 4, 17, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSailorGarrett, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
+ object_event SPRITE_FISHER, 8, 25, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerFisherJonah, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
+ object_event SPRITE_BLACK_BELT, 11, 15, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBlackbeltWai, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
+ object_event SPRITE_SAILOR, 4, 23, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSailorKenneth, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
+ object_event SPRITE_TEACHER, 11, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerTeacherShirley, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
+ object_event SPRITE_YOUNGSTER, 9, 14, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerSchoolboyNate, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
+ object_event SPRITE_YOUNGSTER, 11, 14, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerSchoolboyRicky, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
diff --git a/maps/FastShipCabins_NNW_NNE_NE.asm b/maps/FastShipCabins_NNW_NNE_NE.asm
index 9c7960201..013b2ad17 100644
--- a/maps/FastShipCabins_NNW_NNE_NE.asm
+++ b/maps/FastShipCabins_NNW_NNE_NE.asm
@@ -8,74 +8,74 @@ const_value set 2
const FASTSHIPCABINS_NNW_NNE_NE_PHARMACIST
FastShipCabins_NNW_NNE_NE_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerCooltrainermSean:
- trainer EVENT_BEAT_COOLTRAINERM_SEAN, COOLTRAINERM, SEAN, CooltrainermSeanSeenText, CooltrainermSeanBeatenText, 0, CooltrainermSeanScript
+ trainer EVENT_BEAT_COOLTRAINERM_SEAN, COOLTRAINERM, SEAN, CooltrainermSeanSeenText, CooltrainermSeanBeatenText, 0, .Script
-CooltrainermSeanScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x7567b
+ writetext CooltrainermSeanAfterBattleText
waitbutton
closetext
end
TrainerCooltrainerfCarol:
- trainer EVENT_BEAT_COOLTRAINERF_CAROL, COOLTRAINERF, CAROL, CooltrainerfCarolSeenText, CooltrainerfCarolBeatenText, 0, CooltrainerfCarolScript
+ trainer EVENT_BEAT_COOLTRAINERF_CAROL, COOLTRAINERF, CAROL, CooltrainerfCarolSeenText, CooltrainerfCarolBeatenText, 0, .Script
-CooltrainerfCarolScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x756f7
+ writetext CooltrainerfCarolAfterBattleText
waitbutton
closetext
end
TrainerPokemaniacEthan:
- trainer EVENT_BEAT_POKEMANIAC_ETHAN, POKEMANIAC, ETHAN, PokemaniacEthanSeenText, PokemaniacEthanBeatenText, 0, PokemaniacEthanScript
+ trainer EVENT_BEAT_POKEMANIAC_ETHAN, POKEMANIAC, ETHAN, PokemaniacEthanSeenText, PokemaniacEthanBeatenText, 0, .Script
-PokemaniacEthanScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x7574b
+ writetext PokemaniacEthanAfterBattleText
waitbutton
closetext
end
TrainerHikerNoland:
- trainer EVENT_BEAT_HIKER_NOLAND, HIKER, NOLAND, HikerNolandSeenText, HikerNolandBeatenText, 0, HikerNolandScript
+ trainer EVENT_BEAT_HIKER_NOLAND, HIKER, NOLAND, HikerNolandSeenText, HikerNolandBeatenText, 0, .Script
-HikerNolandScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x757d4
+ writetext HikerNolandAfterBattleText
waitbutton
closetext
end
TrainerGentlemanEdward:
- trainer EVENT_BEAT_GENTLEMAN_EDWARD, GENTLEMAN, EDWARD, GentlemanEdwardSeenText, GentlemanEdwardBeatenText, 0, GentlemanEdwardScript
+ trainer EVENT_BEAT_GENTLEMAN_EDWARD, GENTLEMAN, EDWARD, GentlemanEdwardSeenText, GentlemanEdwardBeatenText, 0, .Script
-GentlemanEdwardScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x75937
+ writetext GentlemanEdwardAfterBattleText
waitbutton
closetext
end
TrainerBurglarCorey:
- trainer EVENT_BEAT_BURGLAR_COREY, BURGLAR, COREY, BurglarCoreySeenText, BurglarCoreyBeatenText, 0, BurglarCoreyScript
+ trainer EVENT_BEAT_BURGLAR_COREY, BURGLAR, COREY, BurglarCoreySeenText, BurglarCoreyBeatenText, 0, .Script
-BurglarCoreyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x75996
+ writetext BurglarCoreyAfterBattleText
waitbutton
closetext
end
@@ -98,7 +98,7 @@ SailorScript_0x755f1:
waitbutton
closetext
setevent EVENT_FAST_SHIP_LAZY_SAILOR
- domaptrigger FAST_SHIP_B1F, $1
+ setmapscene FAST_SHIP_B1F, $1
checkcode VAR_FACING
if_equal $3, UnknownScript_0x75629
applymovement FASTSHIPCABINS_NNW_NNE_NE_SAILOR, MovementData_0x75637
@@ -142,7 +142,7 @@ CooltrainermSeanBeatenText:
text "I wanted to win!"
done
-UnknownText_0x7567b:
+CooltrainermSeanAfterBattleText:
text "Trainers from"
line "JOHTO can battle"
@@ -160,7 +160,7 @@ CooltrainerfCarolBeatenText:
line "ent between us?"
done
-UnknownText_0x756f7:
+CooltrainerfCarolAfterBattleText:
text "I'm going to beat"
line "you someday!"
done
@@ -175,7 +175,7 @@ PokemaniacEthanBeatenText:
text "Gyaaaah!"
done
-UnknownText_0x7574b:
+PokemaniacEthanAfterBattleText:
text "LILY's nice, but"
line "MARY's the best!"
@@ -194,7 +194,7 @@ HikerNolandBeatenText:
line "handle!"
done
-UnknownText_0x757d4:
+HikerNolandAfterBattleText:
text "I wonder if there"
line "are any mountains"
@@ -240,7 +240,7 @@ GentlemanEdwardBeatenText:
line "it…"
done
-UnknownText_0x75937:
+GentlemanEdwardAfterBattleText:
text "I give up."
line "You don't have to"
@@ -258,7 +258,7 @@ BurglarCoreyBeatenText:
line "I lost!"
done
-UnknownText_0x75996:
+BurglarCoreyAfterBattleText:
text "I found a pretty"
line "coin here."
@@ -276,21 +276,21 @@ FastShipCabins_NNW_NNE_NE_MapEventHeader:
warp_def $c, $2, 3, FAST_SHIP_1F
warp_def $18, $2, 4, FAST_SHIP_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 13, 6, SIGNPOST_READ, FastShipCabins_NNW_NNE_NETrashcan
- signpost 19, 7, SIGNPOST_READ, FastShipCabins_NNW_NNE_NETrashcan
- signpost 31, 7, SIGNPOST_READ, FastShipCabins_NNW_NNE_NETrashcan
+ bg_event 13, 6, BGEVENT_READ, FastShipCabins_NNW_NNE_NETrashcan
+ bg_event 19, 7, BGEVENT_READ, FastShipCabins_NNW_NNE_NETrashcan
+ bg_event 31, 7, BGEVENT_READ, FastShipCabins_NNW_NNE_NETrashcan
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_COOLTRAINER_M, 3, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 2, TrainerCooltrainermSean, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
- person_event SPRITE_COOLTRAINER_F, 5, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerCooltrainerfCarol, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
- person_event SPRITE_SUPER_NERD, 5, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerPokemaniacEthan, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
- person_event SPRITE_POKEFAN_M, 17, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerHikerNoland, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
- person_event SPRITE_SAILOR, 26, 4, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SailorScript_0x755f1, EVENT_FAST_SHIP_CABINS_NNW_NNE_NE_SAILOR
- person_event SPRITE_GENTLEMAN, 30, 7, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerGentlemanEdward, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
- person_event SPRITE_PHARMACIST, 30, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 4, TrainerBurglarCorey, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
+ object_event SPRITE_COOLTRAINER_M, 3, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerCooltrainermSean, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
+ object_event SPRITE_COOLTRAINER_F, 5, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainerfCarol, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
+ object_event SPRITE_SUPER_NERD, 5, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacEthan, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
+ object_event SPRITE_POKEFAN_M, 17, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerHikerNoland, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
+ object_event SPRITE_SAILOR, 26, 4, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SailorScript_0x755f1, EVENT_FAST_SHIP_CABINS_NNW_NNE_NE_SAILOR
+ object_event SPRITE_GENTLEMAN, 30, 7, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerGentlemanEdward, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
+ object_event SPRITE_PHARMACIST, 30, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 4, TrainerBurglarCorey, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
diff --git a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm
index 9b8aeac85..f3435833c 100644
--- a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm
+++ b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm
@@ -12,7 +12,7 @@ const_value set 2
const FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_SUPER_NERD2
FastShipCabins_SE_SSE_CaptainsCabin_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -52,7 +52,7 @@ TwinScript_0x75ebb:
special Special_ReloadSpritesNoPalettes
disappear FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN2
applymovement PLAYER, MovementData_0x76004
- moveperson FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1, $3, $13
+ moveobject FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1, $3, $13
appear FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1
spriteface PLAYER, UP
spriteface FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1, UP
@@ -81,7 +81,7 @@ UnknownScript_0x75f09:
writetext UnknownText_0x76143
buttonsound
setevent EVENT_VERMILION_PORT_SAILOR_AT_GANGWAY
- domaptrigger FAST_SHIP_1F, $0
+ setmapscene FAST_SHIP_1F, $0
jump UnknownScript_0x75f37
GentlemanScript_0x75f1f:
@@ -94,7 +94,7 @@ GentlemanScript_0x75f1f:
writetext UnknownText_0x760ae
waitbutton
closetext
- domaptrigger FAST_SHIP_1F, $0
+ setmapscene FAST_SHIP_1F, $0
end
UnknownScript_0x75f37:
@@ -141,78 +141,78 @@ TwinScript_0x75f6d:
end
TrainerPokefanmColin:
- trainer EVENT_BEAT_POKEFANM_COLIN, POKEFANM, COLIN, PokefanmColinSeenText, PokefanmColinBeatenText, 0, PokefanmColinScript
+ trainer EVENT_BEAT_POKEFANM_COLIN, POKEFANM, COLIN, PokefanmColinSeenText, PokefanmColinBeatenText, 0, .Script
-PokefanmColinScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x7635b
+ writetext PokefanmColinAfterBattleText
waitbutton
closetext
end
TrainerTwinsMegandpeg1:
- trainer EVENT_BEAT_TWINS_MEG_AND_PEG, TWINS, MEGANDPEG1, TwinsMegandpeg1SeenText, TwinsMegandpeg1BeatenText, 0, TwinsMegandpeg1Script
+ trainer EVENT_BEAT_TWINS_MEG_AND_PEG, TWINS, MEGANDPEG1, TwinsMegandpeg1SeenText, TwinsMegandpeg1BeatenText, 0, .Script
-TwinsMegandpeg1Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x763c2
+ writetext TwinsMegandpeg1AfterBattleText
waitbutton
closetext
end
TrainerTwinsMegandpeg2:
- trainer EVENT_BEAT_TWINS_MEG_AND_PEG, TWINS, MEGANDPEG2, TwinsMegandpeg2SeenText, TwinsMegandpeg2BeatenText, 0, TwinsMegandpeg2Script
+ trainer EVENT_BEAT_TWINS_MEG_AND_PEG, TWINS, MEGANDPEG2, TwinsMegandpeg2SeenText, TwinsMegandpeg2BeatenText, 0, .Script
-TwinsMegandpeg2Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x76428
+ writetext TwinsMegandpeg2AfterBattleText
waitbutton
closetext
end
TrainerPsychicRodney:
- trainer EVENT_BEAT_PSYCHIC_RODNEY, PSYCHIC_T, RODNEY, PsychicRodneySeenText, PsychicRodneyBeatenText, 0, PsychicRodneyScript
+ trainer EVENT_BEAT_PSYCHIC_RODNEY, PSYCHIC_T, RODNEY, PsychicRodneySeenText, PsychicRodneyBeatenText, 0, .Script
-PsychicRodneyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x76497
+ writetext PsychicRodneyAfterBattleText
waitbutton
closetext
end
TrainerPokefanmJeremy:
- trainer EVENT_BEAT_POKEFANM_JEREMY, POKEFANM, JEREMY, PokefanmJeremySeenText, PokefanmJeremyBeatenText, 0, PokefanmJeremyScript
+ trainer EVENT_BEAT_POKEFANM_JEREMY, POKEFANM, JEREMY, PokefanmJeremySeenText, PokefanmJeremyBeatenText, 0, .Script
-PokefanmJeremyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x7651c
+ writetext PokefanmJeremyAfterBattleText
waitbutton
closetext
end
TrainerPokefanfGeorgia:
- trainer EVENT_BEAT_POKEFANF_GEORGIA, POKEFANF, GEORGIA, PokefanfGeorgiaSeenText, PokefanfGeorgiaBeatenText, 0, PokefanfGeorgiaScript
+ trainer EVENT_BEAT_POKEFANF_GEORGIA, POKEFANF, GEORGIA, PokefanfGeorgiaSeenText, PokefanfGeorgiaBeatenText, 0, .Script
-PokefanfGeorgiaScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x76596
+ writetext PokefanfGeorgiaAfterBattleText
waitbutton
closetext
end
TrainerSupernerdShawn:
- trainer EVENT_BEAT_SUPER_NERD_SHAWN, SUPER_NERD, SHAWN, SupernerdShawnSeenText, SupernerdShawnBeatenText, 0, SupernerdShawnScript
+ trainer EVENT_BEAT_SUPER_NERD_SHAWN, SUPER_NERD, SHAWN, SupernerdShawnSeenText, SupernerdShawnBeatenText, 0, .Script
-SupernerdShawnScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x7660f
+ writetext SupernerdShawnAfterBattleText
waitbutton
closetext
end
@@ -347,7 +347,7 @@ PokefanmColinBeatenText:
text "You're strong!"
done
-UnknownText_0x7635b:
+PokefanmColinAfterBattleText:
text "You're traveling"
line "all alone?"
@@ -365,7 +365,7 @@ TwinsMegandpeg1BeatenText:
text "Oh! We lost!"
done
-UnknownText_0x763c2:
+TwinsMegandpeg1AfterBattleText:
text "Baby is a rude"
line "name to call us"
cont "girls!"
@@ -382,7 +382,7 @@ TwinsMegandpeg2BeatenText:
text "Oh! We lost!"
done
-UnknownText_0x76428:
+TwinsMegandpeg2AfterBattleText:
text "Sometimes, kids"
line "are smarter than"
cont "grown-ups!"
@@ -399,7 +399,7 @@ PsychicRodneyBeatenText:
line "thing!"
done
-UnknownText_0x76497:
+PsychicRodneyAfterBattleText:
text "I get it. You can"
line "hear JOHTO's radio"
cont "on the FAST SHIP."
@@ -416,7 +416,7 @@ PokefanmJeremyBeatenText:
line "ful #MON!"
done
-UnknownText_0x7651c:
+PokefanmJeremyAfterBattleText:
text "I must go to the"
line "#MON SALON and"
cont "fix them up nice!"
@@ -433,7 +433,7 @@ PokefanfGeorgiaBeatenText:
line "to do?"
done
-UnknownText_0x76596:
+PokefanfGeorgiaAfterBattleText:
text "Oh, yes! I have to"
line "get my #MON out"
cont "of DAY-CARE!"
@@ -450,7 +450,7 @@ SupernerdShawnBeatenText:
line "Please!"
done
-UnknownText_0x7660f:
+SupernerdShawnAfterBattleText:
text "You should use the"
line "right BALLS to fit"
cont "the situation."
@@ -475,23 +475,23 @@ FastShipCabins_SE_SSE_CaptainsCabin_MapEventHeader:
warp_def $21, $2, 10, FAST_SHIP_1F
warp_def $21, $3, 10, FAST_SHIP_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 25, 4, SIGNPOST_READ, FastShipCaptainsCabinTrashcan
+ bg_event 25, 4, BGEVENT_READ, FastShipCaptainsCabinTrashcan
-.PersonEvents:
+.ObjectEvents:
db 11
- person_event SPRITE_CAPTAIN, 25, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, CaptainScript_0x75ea7, -1
- person_event SPRITE_GENTLEMAN, 17, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x75f1f, EVENT_FAST_SHIP_CABINS_SE_SSE_GENTLEMAN
- person_event SPRITE_TWIN, 17, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TwinScript_0x75f6d, EVENT_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_TWIN_1
- person_event SPRITE_TWIN, 25, 2, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TwinScript_0x75ebb, EVENT_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_TWIN_2
- person_event SPRITE_POKEFAN_M, 6, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 5, TrainerPokefanmColin, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
- person_event SPRITE_TWIN, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerTwinsMegandpeg1, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
- person_event SPRITE_TWIN, 4, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerTwinsMegandpeg2, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
- person_event SPRITE_SUPER_NERD, 5, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 5, TrainerPsychicRodney, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
- person_event SPRITE_POKEFAN_M, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerPokefanmJeremy, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
- person_event SPRITE_POKEFAN_F, 5, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerPokefanfGeorgia, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
- person_event SPRITE_SUPER_NERD, 15, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerSupernerdShawn, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
+ object_event SPRITE_CAPTAIN, 25, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CaptainScript_0x75ea7, -1
+ object_event SPRITE_GENTLEMAN, 17, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GentlemanScript_0x75f1f, EVENT_FAST_SHIP_CABINS_SE_SSE_GENTLEMAN
+ object_event SPRITE_TWIN, 17, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TwinScript_0x75f6d, EVENT_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_TWIN_1
+ object_event SPRITE_TWIN, 25, 2, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TwinScript_0x75ebb, EVENT_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_TWIN_2
+ object_event SPRITE_POKEFAN_M, 6, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 5, TrainerPokefanmColin, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
+ object_event SPRITE_TWIN, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsMegandpeg1, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
+ object_event SPRITE_TWIN, 4, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsMegandpeg2, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
+ object_event SPRITE_SUPER_NERD, 5, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 5, TrainerPsychicRodney, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
+ object_event SPRITE_POKEFAN_M, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerPokefanmJeremy, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
+ object_event SPRITE_POKEFAN_F, 5, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerPokefanfGeorgia, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
+ object_event SPRITE_SUPER_NERD, 15, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerSupernerdShawn, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
diff --git a/maps/FastShipCabins_SW_SSW_NW.asm b/maps/FastShipCabins_SW_SSW_NW.asm
index 76933c600..f2a7717f6 100644
--- a/maps/FastShipCabins_SW_SSW_NW.asm
+++ b/maps/FastShipCabins_SW_SSW_NW.asm
@@ -5,49 +5,49 @@ const_value set 2
const FASTSHIPCABINS_SW_SSW_NW_ROCKER
FastShipCabins_SW_SSW_NW_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerFirebreatherLyle:
- trainer EVENT_BEAT_FIREBREATHER_LYLE, FIREBREATHER, LYLE, FirebreatherLyleSeenText, FirebreatherLyleBeatenText, 0, FirebreatherLyleScript
+ trainer EVENT_BEAT_FIREBREATHER_LYLE, FIREBREATHER, LYLE, FirebreatherLyleSeenText, FirebreatherLyleBeatenText, 0, .Script
-FirebreatherLyleScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x75b52
+ writetext FirebreatherLyleAfterBattleText
waitbutton
closetext
end
TrainerBug_catcherKen:
- trainer EVENT_BEAT_BUG_CATCHER_KEN, BUG_CATCHER, KEN, Bug_catcherKenSeenText, Bug_catcherKenBeatenText, 0, Bug_catcherKenScript
+ trainer EVENT_BEAT_BUG_CATCHER_KEN, BUG_CATCHER, KEN, Bug_catcherKenSeenText, Bug_catcherKenBeatenText, 0, .Script
-Bug_catcherKenScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x75bd5
+ writetext Bug_catcherKenAfterBattleText
waitbutton
closetext
end
TrainerBeautyCassie:
- trainer EVENT_BEAT_BEAUTY_CASSIE, BEAUTY, CASSIE, BeautyCassieSeenText, BeautyCassieBeatenText, 0, BeautyCassieScript
+ trainer EVENT_BEAT_BEAUTY_CASSIE, BEAUTY, CASSIE, BeautyCassieSeenText, BeautyCassieBeatenText, 0, .Script
-BeautyCassieScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x75c43
+ writetext BeautyCassieAfterBattleText
waitbutton
closetext
end
TrainerGuitaristClyde:
- trainer EVENT_BEAT_GUITARIST_CLYDE, GUITARIST, CLYDE, GuitaristClydeSeenText, GuitaristClydeBeatenText, 0, GuitaristClydeScript
+ trainer EVENT_BEAT_GUITARIST_CLYDE, GUITARIST, CLYDE, GuitaristClydeSeenText, GuitaristClydeBeatenText, 0, .Script
-GuitaristClydeScript:
+.Script:
end_if_just_battled
special Mobile_DummyReturnFalse
iftrue .mobile
@@ -124,7 +124,7 @@ FirebreatherLyleBeatenText:
line "flame's tiny…"
done
-UnknownText_0x75b52:
+FirebreatherLyleAfterBattleText:
text "I guess fire is"
line "weak on the sea."
@@ -143,7 +143,7 @@ Bug_catcherKenBeatenText:
line "You're tough!"
done
-UnknownText_0x75bd5:
+Bug_catcherKenAfterBattleText:
text "You can find lots"
line "of #MON in the"
cont "trees of JOHTO!"
@@ -159,7 +159,7 @@ BeautyCassieBeatenText:
text "My heart weeps…"
done
-UnknownText_0x75c43:
+BeautyCassieAfterBattleText:
text "A voyage is best"
line "for getting over"
cont "a broken heart."
@@ -234,18 +234,18 @@ FastShipCabins_SW_SSW_NW_MapEventHeader:
warp_def $1f, $2, 7, FAST_SHIP_1F
warp_def $1f, $3, 7, FAST_SHIP_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 1, 7, SIGNPOST_READ, FastShipBed
- signpost 2, 7, SIGNPOST_READ, FastShipBed
- signpost 7, 7, SIGNPOST_READ, FastShipCabinsNorthwestCabinTrashcan
+ bg_event 1, 7, BGEVENT_READ, FastShipBed
+ bg_event 2, 7, BGEVENT_READ, FastShipBed
+ bg_event 7, 7, BGEVENT_READ, FastShipCabinsNorthwestCabinTrashcan
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_FISHER, 15, 1, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 2, TrainerFirebreatherLyle, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
- person_event SPRITE_BUG_CATCHER, 15, 6, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerBug_catcherKen, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
- person_event SPRITE_BUENA, 26, 1, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerBeautyCassie, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
- person_event SPRITE_ROCKER, 28, 3, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 2, TrainerGuitaristClyde, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
+ object_event SPRITE_FISHER, 15, 1, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerFirebreatherLyle, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
+ object_event SPRITE_BUG_CATCHER, 15, 6, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerBug_catcherKen, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
+ object_event SPRITE_BUENA, 26, 1, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBeautyCassie, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
+ object_event SPRITE_ROCKER, 28, 3, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerGuitaristClyde, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
diff --git a/maps/FightingDojo.asm b/maps/FightingDojo.asm
index dc6a99a99..9507e9a26 100644
--- a/maps/FightingDojo.asm
+++ b/maps/FightingDojo.asm
@@ -3,7 +3,7 @@ const_value set 2
const FIGHTINGDOJO_POKE_BALL
FightingDojo_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -51,15 +51,15 @@ FightingDojo_MapEventHeader:
warp_def $b, $4, 1, SAFFRON_CITY
warp_def $b, $5, 1, SAFFRON_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 4, SIGNPOST_READ, MapFightingDojoSignpost0Script
- signpost 0, 5, SIGNPOST_READ, MapFightingDojoSignpost1Script
+ bg_event 0, 4, BGEVENT_READ, MapFightingDojoSignpost0Script
+ bg_event 0, 5, BGEVENT_READ, MapFightingDojoSignpost1Script
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_BLACK_BELT, 4, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, FightingDojoBlackBelt, -1
- person_event SPRITE_POKE_BALL, 1, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, FightingDojoFocusBand, EVENT_PICKED_UP_FOCUS_BAND
+ object_event SPRITE_BLACK_BELT, 4, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FightingDojoBlackBelt, -1
+ object_event SPRITE_POKE_BALL, 1, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, FightingDojoFocusBand, EVENT_PICKED_UP_FOCUS_BAND
diff --git a/maps/FuchsiaBillSpeechHouse.asm b/maps/FuchsiaBillSpeechHouse.asm
index 7abec5a1e..3a0758a39 100644
--- a/maps/FuchsiaBillSpeechHouse.asm
+++ b/maps/FuchsiaBillSpeechHouse.asm
@@ -3,25 +3,25 @@ const_value set 2
const FUCHSIABILLSPEECHHOUSE_YOUNGSTER
FuchsiaBillSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-PokefanFScript_0x1963bd:
- jumptextfaceplayer UnknownText_0x1963c3
+FuchsiaBillSpeechHousePokefanFScript:
+ jumptextfaceplayer FuchsiaBillSpeechHousePokefanFText
-YoungsterScript_0x1963c0:
- jumptextfaceplayer UnknownText_0x1963f9
+FuchsiaBillSpeechHouseYoungsterScript:
+ jumptextfaceplayer FuchsiaBillSpeechHouseYoungsterText
-UnknownText_0x1963c3:
+FuchsiaBillSpeechHousePokefanFText:
text "My grandpa is at "
line "my brother BILL's"
cont "on CERULEAN CAPE."
done
-UnknownText_0x1963f9:
+FuchsiaBillSpeechHouseYoungsterText:
text "I saw these weird,"
line "slow #MON on"
cont "CYCLING ROAD."
@@ -36,13 +36,13 @@ FuchsiaBillSpeechHouse_MapEventHeader:
warp_def $7, $2, 4, FUCHSIA_CITY
warp_def $7, $3, 4, FUCHSIA_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_POKEFAN_F, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x1963bd, -1
- person_event SPRITE_YOUNGSTER, 4, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x1963c0, -1
+ object_event SPRITE_POKEFAN_F, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, FuchsiaBillSpeechHousePokefanFScript, -1
+ object_event SPRITE_YOUNGSTER, 4, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FuchsiaBillSpeechHouseYoungsterScript, -1
diff --git a/maps/FuchsiaCity.asm b/maps/FuchsiaCity.asm
index 13af9ee23..97a6f2363 100644
--- a/maps/FuchsiaCity.asm
+++ b/maps/FuchsiaCity.asm
@@ -5,13 +5,11 @@ const_value set 2
const FUCHSIACITY_FRUIT_TREE
FuchsiaCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
@@ -45,7 +43,7 @@ SafariZoneClosedSign:
NoLitteringSign:
jumptext NoLitteringSignText
-FuchsiaCityPokeCenterSign:
+FuchsiaCityPokecenterSign:
jumpstd pokecentersign
FuchsiaCityMartSign:
@@ -144,23 +142,23 @@ FuchsiaCity_MapEventHeader:
warp_def $23, $7, 1, ROUTE_19___FUCHSIA_GATE
warp_def $23, $8, 2, ROUTE_19___FUCHSIA_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 8
- signpost 15, 21, SIGNPOST_READ, FuchsiaCitySign
- signpost 29, 5, SIGNPOST_READ, FuchsiaGymSign
- signpost 15, 25, SIGNPOST_READ, SafariZoneOfficeSign
- signpost 29, 27, SIGNPOST_READ, WardensHomeSign
- signpost 5, 17, SIGNPOST_READ, SafariZoneClosedSign
- signpost 15, 13, SIGNPOST_READ, NoLitteringSign
- signpost 27, 20, SIGNPOST_READ, FuchsiaCityPokeCenterSign
- signpost 13, 6, SIGNPOST_READ, FuchsiaCityMartSign
-
-.PersonEvents:
+ bg_event 15, 21, BGEVENT_READ, FuchsiaCitySign
+ bg_event 29, 5, BGEVENT_READ, FuchsiaGymSign
+ bg_event 15, 25, BGEVENT_READ, SafariZoneOfficeSign
+ bg_event 29, 27, BGEVENT_READ, WardensHomeSign
+ bg_event 5, 17, BGEVENT_READ, SafariZoneClosedSign
+ bg_event 15, 13, BGEVENT_READ, NoLitteringSign
+ bg_event 27, 20, BGEVENT_READ, FuchsiaCityPokecenterSign
+ bg_event 13, 6, BGEVENT_READ, FuchsiaCityMartSign
+
+.ObjectEvents:
db 4
- person_event SPRITE_YOUNGSTER, 18, 23, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FuchsiaCityYoungster, -1
- person_event SPRITE_POKEFAN_M, 8, 13, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, FuchsiaCityPokefanM, -1
- person_event SPRITE_TEACHER, 14, 16, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, FuchsiaCityTeacher, -1
- person_event SPRITE_FRUIT_TREE, 1, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FuchsiaCityFruitTree, -1
+ object_event SPRITE_YOUNGSTER, 18, 23, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, FuchsiaCityYoungster, -1
+ object_event SPRITE_POKEFAN_M, 8, 13, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, FuchsiaCityPokefanM, -1
+ object_event SPRITE_TEACHER, 14, 16, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, FuchsiaCityTeacher, -1
+ object_event SPRITE_FRUIT_TREE, 1, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FuchsiaCityFruitTree, -1
diff --git a/maps/FuchsiaGym.asm b/maps/FuchsiaGym.asm
index b7660e9f1..7d3caac18 100644
--- a/maps/FuchsiaGym.asm
+++ b/maps/FuchsiaGym.asm
@@ -7,7 +7,7 @@ const_value set 2
const FUCHSIAGYM_GYM_GUY
FuchsiaGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -389,19 +389,19 @@ FuchsiaGym_MapEventHeader:
warp_def $11, $4, 3, FUCHSIA_CITY
warp_def $11, $5, 3, FUCHSIA_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 15, 3, SIGNPOST_READ, FuchsiaGymStatue
- signpost 15, 6, SIGNPOST_READ, FuchsiaGymStatue
+ bg_event 15, 3, BGEVENT_READ, FuchsiaGymStatue
+ bg_event 15, 6, BGEVENT_READ, FuchsiaGymStatue
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_JANINE, 10, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, FuchsiaGymJanineScript, -1
- person_event SPRITE_FUCHSIA_GYM_1, 7, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, LassAliceScript, -1
- person_event SPRITE_FUCHSIA_GYM_2, 11, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, LassLindaScript, -1
- person_event SPRITE_FUCHSIA_GYM_3, 4, 9, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, PicnickerCindyScript, -1
- person_event SPRITE_FUCHSIA_GYM_4, 2, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, CamperBarryScript, -1
- person_event SPRITE_GYM_GUY, 15, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, FuchsiaGymGuyScript, -1
+ object_event SPRITE_JANINE, 10, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FuchsiaGymJanineScript, -1
+ object_event SPRITE_FUCHSIA_GYM_1, 7, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, LassAliceScript, -1
+ object_event SPRITE_FUCHSIA_GYM_2, 11, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, LassLindaScript, -1
+ object_event SPRITE_FUCHSIA_GYM_3, 4, 9, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PicnickerCindyScript, -1
+ object_event SPRITE_FUCHSIA_GYM_4, 2, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CamperBarryScript, -1
+ object_event SPRITE_GYM_GUY, 15, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FuchsiaGymGuyScript, -1
diff --git a/maps/FuchsiaMart.asm b/maps/FuchsiaMart.asm
index fdf0bc045..05266ecee 100644
--- a/maps/FuchsiaMart.asm
+++ b/maps/FuchsiaMart.asm
@@ -4,7 +4,7 @@ const_value set 2
const FUCHSIAMART_COOLTRAINER_F
FuchsiaMart_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -16,13 +16,13 @@ ClerkScript_0x195ce8:
closetext
end
-FisherScript_0x195cef:
- jumptextfaceplayer UnknownText_0x195cf5
+FuchsiaMartFisherScript:
+ jumptextfaceplayer FuchsiaMartFisherText
-CooltrainerFScript_0x195cf2:
- jumptextfaceplayer UnknownText_0x195d36
+FuchsiaMartCooltrainerFScript:
+ jumptextfaceplayer FuchsiaMartCooltrainerFText
-UnknownText_0x195cf5:
+FuchsiaMartFisherText:
text "I was hoping to"
line "buy some SAFARI"
@@ -30,7 +30,7 @@ UnknownText_0x195cf5:
line "but it's closed…"
done
-UnknownText_0x195d36:
+FuchsiaMartCooltrainerFText:
text "The SAFARI ZONE"
line "WARDEN's grand-"
cont "daughter lives in"
@@ -46,14 +46,14 @@ FuchsiaMart_MapEventHeader:
warp_def $7, $2, 1, FUCHSIA_CITY
warp_def $7, $3, 1, FUCHSIA_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x195ce8, -1
- person_event SPRITE_FISHER, 2, 3, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, FisherScript_0x195cef, -1
- person_event SPRITE_COOLTRAINER_F, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x195cf2, -1
+ object_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x195ce8, -1
+ object_event SPRITE_FISHER, 2, 3, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, FuchsiaMartFisherScript, -1
+ object_event SPRITE_COOLTRAINER_F, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, FuchsiaMartCooltrainerFScript, -1
diff --git a/maps/FuchsiaPokeCenter1F.asm b/maps/FuchsiaPokeCenter1F.asm
deleted file mode 100644
index 820d854c5..000000000
--- a/maps/FuchsiaPokeCenter1F.asm
+++ /dev/null
@@ -1,114 +0,0 @@
-const_value set 2
- const FUCHSIAPOKECENTER1F_NURSE
- const FUCHSIAPOKECENTER1F_COOLTRAINER_M
- const FUCHSIAPOKECENTER1F_COOLTRAINER_F
- const FUCHSIAPOKECENTER1F_JANINE_IMPERSONATOR
-
-FuchsiaPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 1
-
- ; triggers
- dw UnknownScript_0x196458, 0
-
-.MapCallbacks:
- db 0
-
-UnknownScript_0x196458:
- end
-
-NurseScript_0x196459:
- jumpstd pokecenternurse
-
-CooltrainerMScript_0x19645c:
- jumptextfaceplayer UnknownText_0x196494
-
-CooltrainerFScript_0x19645f:
- jumptextfaceplayer UnknownText_0x1964dc
-
-JanineImpersonatorScript_0x196462:
- faceplayer
- opentext
- writetext UnknownText_0x19652e
- waitbutton
- closetext
- applymovement FUCHSIAPOKECENTER1F_JANINE_IMPERSONATOR, MovementData_0x196486
- faceplayer
- variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_JANINE
- special MapCallbackSprites_LoadUsedSpritesGFX
- opentext
- writetext UnknownText_0x19654e
- waitbutton
- closetext
- applymovement FUCHSIAPOKECENTER1F_JANINE_IMPERSONATOR, MovementData_0x196486
- faceplayer
- variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_LASS
- special MapCallbackSprites_LoadUsedSpritesGFX
- end
-
-MovementData_0x196486:
- turn_head DOWN
- turn_head LEFT
- turn_head UP
- turn_head RIGHT
- turn_head DOWN
- turn_head LEFT
- turn_head UP
- turn_head RIGHT
- turn_head DOWN
- turn_head LEFT
- turn_head UP
- turn_head RIGHT
- turn_head DOWN
- step_end
-
-UnknownText_0x196494:
- text "Hey! You have a"
- line "brand new kind of"
- cont "#DEX."
-
- para "Did PROF.OAK give"
- line "that to you?"
- done
-
-UnknownText_0x1964dc:
- text "I got quite a"
- line "shock at the GYM."
-
- para "There were all"
- line "these girls who"
- cont "looked identical."
- done
-
-UnknownText_0x19652e:
- text "I'm JANINE! Hocus-"
- line "pocus… Poof!"
- done
-
-UnknownText_0x19654e:
- text "See? I look just"
- line "like her now!"
- done
-
-FuchsiaPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 5, FUCHSIA_CITY
- warp_def $7, $4, 5, FUCHSIA_CITY
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 4
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, NurseScript_0x196459, -1
- person_event SPRITE_COOLTRAINER_M, 4, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x19645c, -1
- person_event SPRITE_COOLTRAINER_F, 4, 1, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x19645f, -1
- person_event SPRITE_JANINE_IMPERSONATOR, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, JanineImpersonatorScript_0x196462, -1
diff --git a/maps/FuchsiaPokeCenter2FBeta.asm b/maps/FuchsiaPokeCenter2FBeta.asm
deleted file mode 100644
index 7ba5508a9..000000000
--- a/maps/FuchsiaPokeCenter2FBeta.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-FuchsiaPokeCenter2FBeta_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-FuchsiaPokeCenter2FBeta_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 1
- warp_def $7, $0, 3, FUCHSIA_POKECENTER_1F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/FuchsiaPokecenter1F.asm b/maps/FuchsiaPokecenter1F.asm
new file mode 100644
index 000000000..7afc161e2
--- /dev/null
+++ b/maps/FuchsiaPokecenter1F.asm
@@ -0,0 +1,112 @@
+const_value set 2
+ const FUCHSIAPOKECENTER1F_NURSE
+ const FUCHSIAPOKECENTER1F_COOLTRAINER_M
+ const FUCHSIAPOKECENTER1F_COOLTRAINER_F
+ const FUCHSIAPOKECENTER1F_JANINE_IMPERSONATOR
+
+FuchsiaPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 1
+ scene_script .DummyScene
+
+.MapCallbacks:
+ db 0
+
+.DummyScene:
+ end
+
+NurseScript_0x196459:
+ jumpstd pokecenternurse
+
+FuchsiaPokecenter1FCooltrainerMScript:
+ jumptextfaceplayer FuchsiaPokecenter1FCooltrainerMText
+
+FuchsiaPokecenter1FCooltrainerFScript:
+ jumptextfaceplayer FuchsiaPokecenter1FCooltrainerFText
+
+JanineImpersonatorScript_0x196462:
+ faceplayer
+ opentext
+ writetext UnknownText_0x19652e
+ waitbutton
+ closetext
+ applymovement FUCHSIAPOKECENTER1F_JANINE_IMPERSONATOR, MovementData_0x196486
+ faceplayer
+ variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_JANINE
+ special MapCallbackSprites_LoadUsedSpritesGFX
+ opentext
+ writetext UnknownText_0x19654e
+ waitbutton
+ closetext
+ applymovement FUCHSIAPOKECENTER1F_JANINE_IMPERSONATOR, MovementData_0x196486
+ faceplayer
+ variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_LASS
+ special MapCallbackSprites_LoadUsedSpritesGFX
+ end
+
+MovementData_0x196486:
+ turn_head DOWN
+ turn_head LEFT
+ turn_head UP
+ turn_head RIGHT
+ turn_head DOWN
+ turn_head LEFT
+ turn_head UP
+ turn_head RIGHT
+ turn_head DOWN
+ turn_head LEFT
+ turn_head UP
+ turn_head RIGHT
+ turn_head DOWN
+ step_end
+
+FuchsiaPokecenter1FCooltrainerMText:
+ text "Hey! You have a"
+ line "brand new kind of"
+ cont "#DEX."
+
+ para "Did PROF.OAK give"
+ line "that to you?"
+ done
+
+FuchsiaPokecenter1FCooltrainerFText:
+ text "I got quite a"
+ line "shock at the GYM."
+
+ para "There were all"
+ line "these girls who"
+ cont "looked identical."
+ done
+
+UnknownText_0x19652e:
+ text "I'm JANINE! Hocus-"
+ line "pocus… Poof!"
+ done
+
+UnknownText_0x19654e:
+ text "See? I look just"
+ line "like her now!"
+ done
+
+FuchsiaPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 5, FUCHSIA_CITY
+ warp_def $7, $4, 5, FUCHSIA_CITY
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, NurseScript_0x196459, -1
+ object_event SPRITE_COOLTRAINER_M, 4, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FuchsiaPokecenter1FCooltrainerMScript, -1
+ object_event SPRITE_COOLTRAINER_F, 4, 1, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FuchsiaPokecenter1FCooltrainerFScript, -1
+ object_event SPRITE_JANINE_IMPERSONATOR, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, JanineImpersonatorScript_0x196462, -1
diff --git a/maps/FuchsiaPokecenter2FBeta.asm b/maps/FuchsiaPokecenter2FBeta.asm
new file mode 100644
index 000000000..90cb6de5d
--- /dev/null
+++ b/maps/FuchsiaPokecenter2FBeta.asm
@@ -0,0 +1,23 @@
+FuchsiaPokecenter2FBeta_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+FuchsiaPokecenter2FBeta_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 1
+ warp_def $7, $0, 3, FUCHSIA_POKECENTER_1F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/GoldenrodBikeShop.asm b/maps/GoldenrodBikeShop.asm
index 456f5aaa0..1d83e2dfe 100644
--- a/maps/GoldenrodBikeShop.asm
+++ b/maps/GoldenrodBikeShop.asm
@@ -2,7 +2,7 @@ const_value set 2
const GOLDENRODBIKESHOP_CLERK
GoldenrodBikeShop_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -111,21 +111,21 @@ GoldenrodBikeShop_MapEventHeader:
warp_def $7, $2, 2, GOLDENROD_CITY
warp_def $7, $3, 2, GOLDENROD_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 9
- signpost 2, 1, SIGNPOST_READ, MapGoldenrodBikeShopSignpost8Script
- signpost 3, 0, SIGNPOST_READ, MapGoldenrodBikeShopSignpost8Script
- signpost 3, 1, SIGNPOST_READ, MapGoldenrodBikeShopSignpost8Script
- signpost 5, 0, SIGNPOST_READ, MapGoldenrodBikeShopSignpost8Script
- signpost 5, 1, SIGNPOST_READ, MapGoldenrodBikeShopSignpost8Script
- signpost 6, 0, SIGNPOST_READ, MapGoldenrodBikeShopSignpost8Script
- signpost 6, 1, SIGNPOST_READ, MapGoldenrodBikeShopSignpost8Script
- signpost 6, 6, SIGNPOST_READ, MapGoldenrodBikeShopSignpost8Script
- signpost 6, 7, SIGNPOST_READ, MapGoldenrodBikeShopSignpost8Script
-
-.PersonEvents:
+ bg_event 2, 1, BGEVENT_READ, MapGoldenrodBikeShopSignpost8Script
+ bg_event 3, 0, BGEVENT_READ, MapGoldenrodBikeShopSignpost8Script
+ bg_event 3, 1, BGEVENT_READ, MapGoldenrodBikeShopSignpost8Script
+ bg_event 5, 0, BGEVENT_READ, MapGoldenrodBikeShopSignpost8Script
+ bg_event 5, 1, BGEVENT_READ, MapGoldenrodBikeShopSignpost8Script
+ bg_event 6, 0, BGEVENT_READ, MapGoldenrodBikeShopSignpost8Script
+ bg_event 6, 1, BGEVENT_READ, MapGoldenrodBikeShopSignpost8Script
+ bg_event 6, 6, BGEVENT_READ, MapGoldenrodBikeShopSignpost8Script
+ bg_event 6, 7, BGEVENT_READ, MapGoldenrodBikeShopSignpost8Script
+
+.ObjectEvents:
db 1
- person_event SPRITE_CLERK, 2, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ClerkScript_0x54750, -1
+ object_event SPRITE_CLERK, 2, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x54750, -1
diff --git a/maps/GoldenrodBillsHouse.asm b/maps/GoldenrodBillsHouse.asm
index 6d33b5ce0..71e44841a 100644
--- a/maps/GoldenrodBillsHouse.asm
+++ b/maps/GoldenrodBillsHouse.asm
@@ -4,7 +4,7 @@ const_value set 2
const GOLDENRODBILLSHOUSE_TWIN
GoldenrodBillsHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -251,17 +251,17 @@ GoldenrodBillsHouse_MapEventHeader:
warp_def $7, $2, 4, GOLDENROD_CITY
warp_def $7, $3, 4, GOLDENROD_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 1, 0, SIGNPOST_READ, BillsHouseBookshelf2
- signpost 1, 1, SIGNPOST_READ, BillsHouseBookshelf1
- signpost 1, 7, SIGNPOST_READ, BillsHouseRadio
+ bg_event 1, 0, BGEVENT_READ, BillsHouseBookshelf2
+ bg_event 1, 1, BGEVENT_READ, BillsHouseBookshelf1
+ bg_event 1, 7, BGEVENT_READ, BillsHouseRadio
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_BILL, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BillsHouseBill, EVENT_MET_BILL
- person_event SPRITE_POKEFAN_F, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BillsMom, -1
- person_event SPRITE_TWIN, 4, 5, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, BillsSister, -1
+ object_event SPRITE_BILL, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BillsHouseBill, EVENT_MET_BILL
+ object_event SPRITE_POKEFAN_F, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BillsMom, -1
+ object_event SPRITE_TWIN, 4, 5, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BillsSister, -1
diff --git a/maps/GoldenrodCity.asm b/maps/GoldenrodCity.asm
index 7642bf6b7..d629d86c9 100644
--- a/maps/GoldenrodCity.asm
+++ b/maps/GoldenrodCity.asm
@@ -6,23 +6,21 @@ const_value set 2
const GOLDENRODCITY_YOUNGSTER2
const GOLDENRODCITY_LASS
const GOLDENRODCITY_GRAMPS
+ const GOLDENRODCITY_ROCKETSCOUT
const GOLDENRODCITY_ROCKET1
const GOLDENRODCITY_ROCKET2
const GOLDENRODCITY_ROCKET3
const GOLDENRODCITY_ROCKET4
const GOLDENRODCITY_ROCKET5
const GOLDENRODCITY_ROCKET6
- const GOLDENRODCITY_ROCKET7
const GOLDENRODCITY_POKEFAN_M2
GoldenrodCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 2
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPointAndFloria
dbw MAPCALLBACK_OBJECTS, .MoveTutor
@@ -162,11 +160,11 @@ MoveTutor:
closetext
end
-PokefanMScript_0x1989e3:
- jumptextfaceplayer UnknownText_0x198a69
+GoldenrodCityPokefanMScript:
+ jumptextfaceplayer GoldenrodCityPokefanMText
-YoungsterScript_0x1989e6:
- jumptextfaceplayer UnknownText_0x198aa9
+GoldenrodCityYoungster1Script:
+ jumptextfaceplayer GoldenrodCityYoungster1Text
CooltrainerFScript_0x1989e9:
faceplayer
@@ -200,43 +198,43 @@ CooltrainerFScript_0x1989fd:
closetext
end
-YoungsterScript_0x198a11:
- jumptextfaceplayer UnknownText_0x198c36
+GoldenrodCityYoungster2Script:
+ jumptextfaceplayer GoldenrodCityYoungster2Text
-LassScript_0x198a14:
- jumptextfaceplayer UnknownText_0x198c83
+GoldenrodCityLassScript:
+ jumptextfaceplayer GoldenrodCityLassText
-GrampsScript_0x198a17:
- jumptextfaceplayer UnknownText_0x198ccf
+GoldenrodCityGrampsScript:
+ jumptextfaceplayer GoldenrodCityGrampsText
-RocketScript_0x198a1a:
+GoldenrodCityRocketScoutScript:
opentext
- writetext UnknownText_0x198d0d
+ writetext GoldenrodCityRocketScoutText1
buttonsound
faceplayer
- writetext UnknownText_0x198d2a
+ writetext GoldenrodCityRocketScoutText2
waitbutton
closetext
- spriteface GOLDENRODCITY_ROCKET1, UP
+ spriteface GOLDENRODCITY_ROCKETSCOUT, UP
end
-RocketScript_0x198a29:
- jumptextfaceplayer UnknownText_0x198d4e
+GoldenrodCityRocket1Script:
+ jumptextfaceplayer GoldenrodCityRocket1Text
-RocketScript_0x198a2c:
- jumptextfaceplayer UnknownText_0x198d6d
+GoldenrodCityRocket2Script:
+ jumptextfaceplayer GoldenrodCityRocket2Text
-RocketScript_0x198a2f:
- jumptextfaceplayer UnknownText_0x198daa
+GoldenrodCityRocket3Script:
+ jumptextfaceplayer GoldenrodCityRocket3Text
-RocketScript_0x198a32:
- jumptextfaceplayer UnknownText_0x198de2
+GoldenrodCityRocket4Script:
+ jumptextfaceplayer GoldenrodCityRocket4Text
-RocketScript_0x198a35:
- jumptextfaceplayer UnknownText_0x198e1f
+GoldenrodCityRocket5Script:
+ jumptextfaceplayer GoldenrodCityRocket5Text
-RocketScript_0x198a38:
- jumptextfaceplayer UnknownText_0x198e4b
+GoldenrodCityRocket6Script:
+ jumptextfaceplayer GoldenrodCityRocket6Text
GoldenrodCityStationSign:
jumptext GoldenrodCityStationSignText
@@ -268,7 +266,7 @@ GoldenrodCityUndergroundSignNorth:
GoldenrodCityUndergroundSignSouth:
jumptext GoldenrodCityUndergroundSignSouthText
-GoldenrodCityPokeCenterSign:
+GoldenrodCityPokecenterSign:
jumpstd pokecentersign
GoldenrodCityFlowerShopSign:
@@ -288,7 +286,7 @@ MovementData_0x198a63:
step UP
step_end
-UnknownText_0x198a69:
+GoldenrodCityPokefanMText:
text "They built the new"
line "RADIO TOWER to"
@@ -296,7 +294,7 @@ UnknownText_0x198a69:
line "creaky one."
done
-UnknownText_0x198aa9:
+GoldenrodCityYoungster1Text:
text "I know there's a"
line "new BIKE SHOP, but"
@@ -341,7 +339,7 @@ UnknownText_0x198c14:
line "works as a radio!"
done
-UnknownText_0x198c36:
+GoldenrodCityYoungster2Text:
text "E-he-he-he…"
para "I got in trouble"
@@ -351,7 +349,7 @@ UnknownText_0x198c36:
line "DEPT.STORE."
done
-UnknownText_0x198c83:
+GoldenrodCityLassText:
text "The man at that"
line "house rates your"
cont "#MON names."
@@ -360,7 +358,7 @@ UnknownText_0x198c83:
line "your #MON."
done
-UnknownText_0x198ccf:
+GoldenrodCityGrampsText:
text "Whew! This is one"
line "big town. I don't"
@@ -368,22 +366,22 @@ UnknownText_0x198ccf:
line "thing is."
done
-UnknownText_0x198d0d:
+GoldenrodCityRocketScoutText1:
text "So this is the"
line "RADIO TOWER…"
done
-UnknownText_0x198d2a:
+GoldenrodCityRocketScoutText2:
text "What do you want,"
line "you pest? Scram!"
done
-UnknownText_0x198d4e:
+GoldenrodCityRocket1Text:
text "Stay out of the"
line "way! Beat it!"
done
-UnknownText_0x198d6d:
+GoldenrodCityRocket2Text:
text "Take over the"
line "RADIO TOWER…"
@@ -391,7 +389,7 @@ UnknownText_0x198d6d:
line "your business!"
done
-UnknownText_0x198daa:
+GoldenrodCityRocket3Text:
text "#MON? They're"
line "nothing more than"
@@ -399,7 +397,7 @@ UnknownText_0x198daa:
line "money!"
done
-UnknownText_0x198de2:
+GoldenrodCityRocket4Text:
text "Our dream will"
line "soon come true…"
@@ -407,13 +405,13 @@ UnknownText_0x198de2:
line "struggle…"
done
-UnknownText_0x198e1f:
+GoldenrodCityRocket5Text:
text "Hey, brat! You"
line "don't belong here!"
cont "Get lost!"
done
-UnknownText_0x198e4b:
+GoldenrodCityRocket6Text:
text "Come taste the"
line "true terror of"
cont "TEAM ROCKET!"
@@ -574,42 +572,42 @@ GoldenrodCity_MapEventHeader:
warp_def $15, $e, 1, GOLDENROD_GAME_CORNER
warp_def $f, $5, 1, RADIO_TOWER_1F
warp_def $1, $13, 3, ROUTE_35_GOLDENROD_GATE
- warp_def $5, $9, 8, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
- warp_def $1d, $b, 5, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
+ warp_def $5, $9, 8, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
+ warp_def $1d, $b, 5, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
warp_def $1b, $f, 1, GOLDENROD_POKECENTER_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 12
- signpost 14, 10, SIGNPOST_READ, GoldenrodCityStationSign
- signpost 17, 4, SIGNPOST_READ, GoldenrodCityRadioTowerSign
- signpost 27, 26, SIGNPOST_READ, GoldenrodDeptStoreSign
- signpost 9, 26, SIGNPOST_READ, GoldenrodGymSign
- signpost 18, 22, SIGNPOST_READ, GoldenrodCitySign
- signpost 30, 28, SIGNPOST_READ, GoldenrodCityBikeShopSign
- signpost 22, 16, SIGNPOST_READ, GoldenrodCityGameCornerSign
- signpost 7, 12, SIGNPOST_READ, GoldenrodCityNameRaterSign
- signpost 6, 8, SIGNPOST_READ, GoldenrodCityUndergroundSignNorth
- signpost 30, 12, SIGNPOST_READ, GoldenrodCityUndergroundSignSouth
- signpost 27, 16, SIGNPOST_UP, GoldenrodCityPokeCenterSign
- signpost 6, 30, SIGNPOST_READ, GoldenrodCityFlowerShopSign
-
-.PersonEvents:
+ bg_event 14, 10, BGEVENT_READ, GoldenrodCityStationSign
+ bg_event 17, 4, BGEVENT_READ, GoldenrodCityRadioTowerSign
+ bg_event 27, 26, BGEVENT_READ, GoldenrodDeptStoreSign
+ bg_event 9, 26, BGEVENT_READ, GoldenrodGymSign
+ bg_event 18, 22, BGEVENT_READ, GoldenrodCitySign
+ bg_event 30, 28, BGEVENT_READ, GoldenrodCityBikeShopSign
+ bg_event 22, 16, BGEVENT_READ, GoldenrodCityGameCornerSign
+ bg_event 7, 12, BGEVENT_READ, GoldenrodCityNameRaterSign
+ bg_event 6, 8, BGEVENT_READ, GoldenrodCityUndergroundSignNorth
+ bg_event 30, 12, BGEVENT_READ, GoldenrodCityUndergroundSignSouth
+ bg_event 27, 16, BGEVENT_UP, GoldenrodCityPokecenterSign
+ bg_event 6, 30, BGEVENT_READ, GoldenrodCityFlowerShopSign
+
+.ObjectEvents:
db 15
- person_event SPRITE_POKEFAN_M, 18, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x1989e3, EVENT_GOLDENROD_CITY_CIVILIANS
- person_event SPRITE_YOUNGSTER, 17, 30, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x1989e6, EVENT_GOLDENROD_CITY_CIVILIANS
- person_event SPRITE_COOLTRAINER_F, 16, 12, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x1989e9, EVENT_GOLDENROD_CITY_CIVILIANS
- person_event SPRITE_COOLTRAINER_F, 26, 20, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x1989fd, EVENT_GOLDENROD_CITY_CIVILIANS
- person_event SPRITE_YOUNGSTER, 17, 19, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x198a11, EVENT_GOLDENROD_CITY_CIVILIANS
- person_event SPRITE_LASS, 10, 17, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LassScript_0x198a14, EVENT_GOLDENROD_CITY_CIVILIANS
- person_event SPRITE_GRAMPS, 27, 11, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrampsScript_0x198a17, EVENT_GOLDENROD_CITY_CIVILIANS
- person_event SPRITE_ROCKET, 16, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketScript_0x198a1a, EVENT_GOLDENROD_CITY_ROCKET_SCOUT
- person_event SPRITE_ROCKET, 20, 28, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketScript_0x198a29, EVENT_GOLDENROD_CITY_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 15, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketScript_0x198a2c, EVENT_GOLDENROD_CITY_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 23, 16, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketScript_0x198a2f, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 20, 29, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketScript_0x198a32, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 7, 29, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketScript_0x198a35, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 10, 31, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketScript_0x198a38, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_POKEFAN_M, 22, 12, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, MoveTutor, EVENT_GOLDENROD_CITY_MOVE_TUTOR
+ object_event SPRITE_POKEFAN_M, 18, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityPokefanMScript, EVENT_GOLDENROD_CITY_CIVILIANS
+ object_event SPRITE_YOUNGSTER, 17, 30, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityYoungster1Script, EVENT_GOLDENROD_CITY_CIVILIANS
+ object_event SPRITE_COOLTRAINER_F, 16, 12, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CooltrainerFScript_0x1989e9, EVENT_GOLDENROD_CITY_CIVILIANS
+ object_event SPRITE_COOLTRAINER_F, 26, 20, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CooltrainerFScript_0x1989fd, EVENT_GOLDENROD_CITY_CIVILIANS
+ object_event SPRITE_YOUNGSTER, 17, 19, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodCityYoungster2Script, EVENT_GOLDENROD_CITY_CIVILIANS
+ object_event SPRITE_LASS, 10, 17, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodCityLassScript, EVENT_GOLDENROD_CITY_CIVILIANS
+ object_event SPRITE_GRAMPS, 27, 11, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityGrampsScript, EVENT_GOLDENROD_CITY_CIVILIANS
+ object_event SPRITE_ROCKET, 16, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocketScoutScript, EVENT_GOLDENROD_CITY_ROCKET_SCOUT
+ object_event SPRITE_ROCKET, 20, 28, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocket1Script, EVENT_GOLDENROD_CITY_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 15, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocket2Script, EVENT_GOLDENROD_CITY_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 23, 16, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocket3Script, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 20, 29, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocket4Script, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 7, 29, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocket5Script, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 10, 31, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocket6Script, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_POKEFAN_M, 22, 12, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, MoveTutor, EVENT_GOLDENROD_CITY_MOVE_TUTOR
diff --git a/maps/GoldenrodDeptStore1F.asm b/maps/GoldenrodDeptStore1F.asm
index 455d66b79..9fd609dee 100644
--- a/maps/GoldenrodDeptStore1F.asm
+++ b/maps/GoldenrodDeptStore1F.asm
@@ -5,23 +5,23 @@ const_value set 2
const GOLDENRODDEPTSTORE1F_GENTLEMAN
GoldenrodDeptStore1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-ReceptionistScript_0x55981:
- jumptextfaceplayer UnknownText_0x55993
+GoldenrodDeptStore1FReceptionistScript:
+ jumptextfaceplayer GoldenrodDeptStore1FReceptionistText
-GentlemanScript_0x55984:
- jumptextfaceplayer UnknownText_0x559b7
+GoldenrodDeptStore1FGentlemanScript:
+ jumptextfaceplayer GoldenrodDeptStore1FGentlemanText
-PokefanFScript_0x55987:
- jumptextfaceplayer UnknownText_0x55a1a
+GoldenrodDeptStore1FPokefanFScript:
+ jumptextfaceplayer GoldenrodDeptStore1FPokefanFText
-BugCatcherScript_0x5598a:
- jumptextfaceplayer UnknownText_0x55a3a
+GoldenrodDeptStore1FBugCatcherScript:
+ jumptextfaceplayer GoldenrodDeptStore1FBugCatcherText
GoldenrodDeptStore1FDirectory:
jumptext GoldenrodDeptStore1FDirectoryText
@@ -29,12 +29,12 @@ GoldenrodDeptStore1FDirectory:
GoldenrodDeptStore1FElevatorButton:
jumpstd elevatorbutton
-UnknownText_0x55993:
+GoldenrodDeptStore1FReceptionistText:
text "Welcome to GOLDEN-"
line "ROD DEPT.STORE."
done
-UnknownText_0x559b7:
+GoldenrodDeptStore1FGentlemanText:
text "The DEPT.STORE"
line "has a decent se-"
cont "lection."
@@ -46,12 +46,12 @@ UnknownText_0x559b7:
line "prizes."
done
-UnknownText_0x55a1a:
+GoldenrodDeptStore1FPokefanFText:
text "I'm raring to shop"
line "again today!"
done
-UnknownText_0x55a3a:
+GoldenrodDeptStore1FBugCatcherText:
text "Mom's good at"
line "bargain hunting."
@@ -89,17 +89,17 @@ GoldenrodDeptStore1F_MapEventHeader:
warp_def $0, $f, 2, GOLDENROD_DEPT_STORE_2F
warp_def $0, $2, 1, GOLDENROD_DEPT_STORE_ELEVATOR
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 14, SIGNPOST_READ, GoldenrodDeptStore1FDirectory
- signpost 0, 3, SIGNPOST_READ, GoldenrodDeptStore1FElevatorButton
+ bg_event 0, 14, BGEVENT_READ, GoldenrodDeptStore1FDirectory
+ bg_event 0, 3, BGEVENT_READ, GoldenrodDeptStore1FElevatorButton
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_RECEPTIONIST, 1, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ReceptionistScript_0x55981, -1
- person_event SPRITE_POKEFAN_F, 4, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x55987, -1
- person_event SPRITE_BUG_CATCHER, 5, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, BugCatcherScript_0x5598a, -1
- person_event SPRITE_GENTLEMAN, 5, 11, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x55984, -1
+ object_event SPRITE_RECEPTIONIST, 1, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore1FReceptionistScript, -1
+ object_event SPRITE_POKEFAN_F, 4, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore1FPokefanFScript, -1
+ object_event SPRITE_BUG_CATCHER, 5, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore1FBugCatcherScript, -1
+ object_event SPRITE_GENTLEMAN, 5, 11, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore1FGentlemanScript, -1
diff --git a/maps/GoldenrodDeptStore2F.asm b/maps/GoldenrodDeptStore2F.asm
index ba7c74a18..d1d827c52 100644
--- a/maps/GoldenrodDeptStore2F.asm
+++ b/maps/GoldenrodDeptStore2F.asm
@@ -6,7 +6,7 @@ const_value set 2
const GOLDENRODDEPTSTORE2F_GENTLEMAN
GoldenrodDeptStore2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -26,14 +26,14 @@ ClerkScript_0x55b65:
closetext
end
-YoungsterScript_0x55b6d:
- jumptextfaceplayer UnknownText_0x55c25
+GoldenrodDeptStore2FYoungsterScript:
+ jumptextfaceplayer GoldenrodDeptStore2FYoungsterText
-CooltrainerFScript_0x55b70:
- jumptextfaceplayer UnknownText_0x55c7b
+GoldenrodDeptStore2FCooltrainerFScript:
+ jumptextfaceplayer GoldenrodDeptStore2FCooltrainerFText
-GentlemanScript_0x55b73:
- jumptextfaceplayer UnknownText_0x55cb7
+GoldenrodDeptStore2FGentlemanScript:
+ jumptextfaceplayer GoldenrodDeptStore2FGentlemanText
GoldenrodDeptStore2FDirectory:
jumptext GoldenrodDeptStore2FDirectoryText
@@ -62,7 +62,7 @@ UnknownText_0x55bd3:
cont "techniques."
done
-UnknownText_0x55c25:
+GoldenrodDeptStore2FYoungsterText:
text "#GEAR can store"
line "up to ten phone"
cont "numbers."
@@ -72,7 +72,7 @@ UnknownText_0x55c25:
cont "to keep."
done
-UnknownText_0x55c7b:
+GoldenrodDeptStore2FCooltrainerFText:
text "I got my ABRA at"
line "the GAME CORNER."
@@ -80,7 +80,7 @@ UnknownText_0x55c7b:
line "partner."
done
-UnknownText_0x55cb7:
+GoldenrodDeptStore2FGentlemanText:
text "This DEPT.STORE"
line "makes me realize"
@@ -110,18 +110,18 @@ GoldenrodDeptStore2F_MapEventHeader:
warp_def $0, $f, 3, GOLDENROD_DEPT_STORE_1F
warp_def $0, $2, 1, GOLDENROD_DEPT_STORE_ELEVATOR
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 14, SIGNPOST_READ, GoldenrodDeptStore2FDirectory
- signpost 0, 3, SIGNPOST_READ, GoldenrodDeptStore2FElevatorButton
+ bg_event 0, 14, BGEVENT_READ, GoldenrodDeptStore2FDirectory
+ bg_event 0, 3, BGEVENT_READ, GoldenrodDeptStore2FElevatorButton
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_CLERK, 5, 13, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x55b5d, -1
- person_event SPRITE_CLERK, 6, 13, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x55b65, -1
- person_event SPRITE_YOUNGSTER, 6, 9, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x55b6d, -1
- person_event SPRITE_COOLTRAINER_F, 2, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x55b70, -1
- person_event SPRITE_GENTLEMAN, 6, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x55b73, -1
+ object_event SPRITE_CLERK, 5, 13, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x55b5d, -1
+ object_event SPRITE_CLERK, 6, 13, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x55b65, -1
+ object_event SPRITE_YOUNGSTER, 6, 9, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore2FYoungsterScript, -1
+ object_event SPRITE_COOLTRAINER_F, 2, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore2FCooltrainerFScript, -1
+ object_event SPRITE_GENTLEMAN, 6, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore2FGentlemanScript, -1
diff --git a/maps/GoldenrodDeptStore3F.asm b/maps/GoldenrodDeptStore3F.asm
index e9db446a0..94765e409 100644
--- a/maps/GoldenrodDeptStore3F.asm
+++ b/maps/GoldenrodDeptStore3F.asm
@@ -4,7 +4,7 @@ const_value set 2
const GOLDENRODDEPTSTORE3F_ROCKER
GoldenrodDeptStore3F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -17,11 +17,11 @@ ClerkScript_0x55db8:
closetext
end
-SuperNerdScript_0x55dc0:
- jumptextfaceplayer UnknownText_0x55dcc
+GoldenrodDeptStore3FSuperNerdScript:
+ jumptextfaceplayer GoldenrodDeptStore3FSuperNerdText
-RockerScript_0x55dc3:
- jumptextfaceplayer UnknownText_0x55e15
+GoldenrodDeptStore3FRockerScript:
+ jumptextfaceplayer GoldenrodDeptStore3FRockerText
GoldenrodDeptStore3FDirectory:
jumptext GoldenrodDeptStore3FDirectoryText
@@ -29,7 +29,7 @@ GoldenrodDeptStore3FDirectory:
GoldenrodDeptStore3FElevatorButton:
jumpstd elevatorbutton
-UnknownText_0x55dcc:
+GoldenrodDeptStore3FSuperNerdText:
text "I, I, I'm really"
line "impatient!"
@@ -38,7 +38,7 @@ UnknownText_0x55dcc:
cont "my #MON."
done
-UnknownText_0x55e15:
+GoldenrodDeptStore3FRockerText:
text "Hey! When you bat-"
line "tle, do you use X"
cont "SPECIAL?"
@@ -66,16 +66,16 @@ GoldenrodDeptStore3F_MapEventHeader:
warp_def $0, $f, 2, GOLDENROD_DEPT_STORE_4F
warp_def $0, $2, 1, GOLDENROD_DEPT_STORE_ELEVATOR
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 14, SIGNPOST_READ, GoldenrodDeptStore3FDirectory
- signpost 0, 3, SIGNPOST_READ, GoldenrodDeptStore3FElevatorButton
+ bg_event 0, 14, BGEVENT_READ, GoldenrodDeptStore3FDirectory
+ bg_event 0, 3, BGEVENT_READ, GoldenrodDeptStore3FElevatorButton
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 1, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x55db8, -1
- person_event SPRITE_SUPER_NERD, 5, 12, SPRITEMOVEDATA_SPINRANDOM_FAST, 1, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x55dc0, -1
- person_event SPRITE_ROCKER, 5, 2, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RockerScript_0x55dc3, -1
+ object_event SPRITE_CLERK, 1, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x55db8, -1
+ object_event SPRITE_SUPER_NERD, 5, 12, SPRITEMOVEDATA_SPINRANDOM_FAST, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore3FSuperNerdScript, -1
+ object_event SPRITE_ROCKER, 5, 2, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore3FRockerScript, -1
diff --git a/maps/GoldenrodDeptStore4F.asm b/maps/GoldenrodDeptStore4F.asm
index 61c5ff120..c12de0391 100644
--- a/maps/GoldenrodDeptStore4F.asm
+++ b/maps/GoldenrodDeptStore4F.asm
@@ -5,7 +5,7 @@ const_value set 2
const GOLDENRODDEPTSTORE4F_GAMEBOY_KID
GoldenrodDeptStore4F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -18,11 +18,11 @@ ClerkScript_0x55ee9:
closetext
end
-CooltrainerMScript_0x55ef1:
- jumptextfaceplayer UnknownText_0x55f08
+GoldenrodDeptStore4FCooltrainerMScript:
+ jumptextfaceplayer GoldenrodDeptStore4FCooltrainerMText
-BugCatcherScript_0x55ef4:
- jumptextfaceplayer UnknownText_0x55f52
+GoldenrodDeptStore4FBugCatcherScript:
+ jumptextfaceplayer GoldenrodDeptStore4FBugCatcherText
GameboyKidScript_0x55ef7:
faceplayer
@@ -39,7 +39,7 @@ GoldenrodDeptStore4FDirectory:
GoldenrodDeptStore4FElevatorButton:
jumpstd elevatorbutton
-UnknownText_0x55f08:
+GoldenrodDeptStore4FCooltrainerMText:
text "Hey. I love strong"
line "#MON."
@@ -48,7 +48,7 @@ UnknownText_0x55f08:
cont "their ATTACK."
done
-UnknownText_0x55f52:
+GoldenrodDeptStore4FBugCatcherText:
text "IRON adds to your"
line "#MON's DEFENSE."
done
@@ -87,17 +87,17 @@ GoldenrodDeptStore4F_MapEventHeader:
warp_def $0, $f, 2, GOLDENROD_DEPT_STORE_3F
warp_def $0, $2, 1, GOLDENROD_DEPT_STORE_ELEVATOR
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 14, SIGNPOST_READ, GoldenrodDeptStore4FDirectory
- signpost 0, 3, SIGNPOST_READ, GoldenrodDeptStore4FElevatorButton
+ bg_event 0, 14, BGEVENT_READ, GoldenrodDeptStore4FDirectory
+ bg_event 0, 3, BGEVENT_READ, GoldenrodDeptStore4FElevatorButton
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_CLERK, 5, 13, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x55ee9, -1
- person_event SPRITE_COOLTRAINER_M, 7, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x55ef1, -1
- person_event SPRITE_BUG_CATCHER, 2, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BugCatcherScript_0x55ef4, -1
- person_event SPRITE_GAMEBOY_KID, 1, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GameboyKidScript_0x55ef7, -1
+ object_event SPRITE_CLERK, 5, 13, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x55ee9, -1
+ object_event SPRITE_COOLTRAINER_M, 7, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore4FCooltrainerMScript, -1
+ object_event SPRITE_BUG_CATCHER, 2, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore4FBugCatcherScript, -1
+ object_event SPRITE_GAMEBOY_KID, 1, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GameboyKidScript_0x55ef7, -1
diff --git a/maps/GoldenrodDeptStore5F.asm b/maps/GoldenrodDeptStore5F.asm
index b10f019ac..7c358cd18 100644
--- a/maps/GoldenrodDeptStore5F.asm
+++ b/maps/GoldenrodDeptStore5F.asm
@@ -7,14 +7,11 @@ const_value set 2
const GOLDENRODDEPTSTORE5F_RECEPTIONIST
GoldenrodDeptStore5F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_OBJECTS, .CheckIfSunday
.CheckIfSunday:
@@ -123,19 +120,19 @@ Carrie:
closetext
end
-LassScript_0x56130:
- jumptextfaceplayer UnknownText_0x562ad
+GoldenrodDeptStore5FLassScript:
+ jumptextfaceplayer GoldenrodDeptStore5FLassText
Mike:
faceplayer
opentext
- trade $0
+ trade NPCTRADE_MIKE
waitbutton
closetext
end
-PokefanMScript_0x5613a:
- jumptextfaceplayer UnknownText_0x562f3
+GoldenrodDeptStore5FPokefanMScript:
+ jumptextfaceplayer GoldenrodDeptStore5FPokefanMText
GoldenrodDeptStore5FDirectory:
jumptext GoldenrodDeptStore5FDirectoryText
@@ -192,7 +189,7 @@ UnknownText_0x56279:
cont "Game Boy Color."
done
-UnknownText_0x562ad:
+GoldenrodDeptStore5FLassText:
text "On Sundays, a lady"
line "comes to check out"
cont "#MON."
@@ -201,7 +198,7 @@ UnknownText_0x562ad:
line "away TMs!"
done
-UnknownText_0x562f3:
+GoldenrodDeptStore5FPokefanMText:
text "You can't rename a"
line "#MON you get in"
cont "a trade."
@@ -230,19 +227,19 @@ GoldenrodDeptStore5F_MapEventHeader:
warp_def $0, $f, 1, GOLDENROD_DEPT_STORE_6F
warp_def $0, $2, 1, GOLDENROD_DEPT_STORE_ELEVATOR
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 14, SIGNPOST_READ, GoldenrodDeptStore5FDirectory
- signpost 0, 3, SIGNPOST_READ, GoldenrodDeptStore5FElevatorButton
+ bg_event 0, 14, BGEVENT_READ, GoldenrodDeptStore5FDirectory
+ bg_event 0, 3, BGEVENT_READ, GoldenrodDeptStore5FElevatorButton
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_CLERK, 5, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x5609c, -1
- person_event SPRITE_LASS, 6, 3, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LassScript_0x56130, -1
- person_event SPRITE_COOLTRAINER_M, 3, 6, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Mike, -1
- person_event SPRITE_POKEFAN_M, 5, 13, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x5613a, -1
- person_event SPRITE_TWIN, 1, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, Carrie, -1
- person_event SPRITE_RECEPTIONIST, 5, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ReceptionistScript_0x560ce, EVENT_GOLDENROD_DEPT_STORE_5F_HAPPINESS_EVENT_LADY
+ object_event SPRITE_CLERK, 5, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x5609c, -1
+ object_event SPRITE_LASS, 6, 3, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore5FLassScript, -1
+ object_event SPRITE_COOLTRAINER_M, 3, 6, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Mike, -1
+ object_event SPRITE_POKEFAN_M, 5, 13, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore5FPokefanMScript, -1
+ object_event SPRITE_TWIN, 1, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Carrie, -1
+ object_event SPRITE_RECEPTIONIST, 5, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ReceptionistScript_0x560ce, EVENT_GOLDENROD_DEPT_STORE_5F_HAPPINESS_EVENT_LADY
diff --git a/maps/GoldenrodDeptStore6F.asm b/maps/GoldenrodDeptStore6F.asm
index 10e233381..f3fd44501 100644
--- a/maps/GoldenrodDeptStore6F.asm
+++ b/maps/GoldenrodDeptStore6F.asm
@@ -3,7 +3,7 @@ const_value set 2
const GOLDENRODDEPTSTORE6F_SUPER_NERD
GoldenrodDeptStore6F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -84,11 +84,11 @@ GoldenrodVendingMachine:
db "CANCEL@"
-LassScript_0x564bf:
- jumptextfaceplayer UnknownText_0x5654b
+GoldenrodDeptStore6FLassScript:
+ jumptextfaceplayer GoldenrodDeptStore6FLassText
-SuperNerdScript_0x564c2:
- jumptextfaceplayer UnknownText_0x565ca
+GoldenrodDeptStore6FSuperNerdScript:
+ jumptextfaceplayer GoldenrodDeptStore6FSuperNerdText
GoldenrodDeptStore6FDirectory:
jumptext GoldenrodDeptStore6FDirectoryText
@@ -119,7 +119,7 @@ GoldenrodVendingNoSpaceText:
line "room for stuff."
done
-UnknownText_0x5654b:
+GoldenrodDeptStore6FLassText:
text "Do you listen to"
line "LUCKY CHANNEL?"
@@ -133,7 +133,7 @@ UnknownText_0x5654b:
line "numbers."
done
-UnknownText_0x565ca:
+GoldenrodDeptStore6FSuperNerdText:
text "If you're tired,"
line "try the vending"
cont "machine's drinks."
@@ -159,19 +159,19 @@ GoldenrodDeptStore6F_MapEventHeader:
warp_def $0, $2, 1, GOLDENROD_DEPT_STORE_ELEVATOR
warp_def $0, $d, 1, GOLDENROD_DEPT_STORE_ROOF
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 6
- signpost 0, 14, SIGNPOST_READ, GoldenrodDeptStore6FDirectory
- signpost 0, 3, SIGNPOST_READ, GoldenrodDeptStore6FElevatorButton
- signpost 1, 8, SIGNPOST_UP, GoldenrodVendingMachine
- signpost 1, 9, SIGNPOST_UP, GoldenrodVendingMachine
- signpost 1, 10, SIGNPOST_UP, GoldenrodVendingMachine
- signpost 1, 11, SIGNPOST_UP, GoldenrodVendingMachine
-
-.PersonEvents:
+ bg_event 0, 14, BGEVENT_READ, GoldenrodDeptStore6FDirectory
+ bg_event 0, 3, BGEVENT_READ, GoldenrodDeptStore6FElevatorButton
+ bg_event 1, 8, BGEVENT_UP, GoldenrodVendingMachine
+ bg_event 1, 9, BGEVENT_UP, GoldenrodVendingMachine
+ bg_event 1, 10, BGEVENT_UP, GoldenrodVendingMachine
+ bg_event 1, 11, BGEVENT_UP, GoldenrodVendingMachine
+
+.ObjectEvents:
db 2
- person_event SPRITE_LASS, 2, 10, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LassScript_0x564bf, -1
- person_event SPRITE_SUPER_NERD, 2, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x564c2, -1
+ object_event SPRITE_LASS, 2, 10, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore6FLassScript, -1
+ object_event SPRITE_SUPER_NERD, 2, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore6FSuperNerdScript, -1
diff --git a/maps/GoldenrodDeptStoreB1F.asm b/maps/GoldenrodDeptStoreB1F.asm
index 769c01fb8..a52f68ab5 100644
--- a/maps/GoldenrodDeptStoreB1F.asm
+++ b/maps/GoldenrodDeptStoreB1F.asm
@@ -9,16 +9,12 @@ const_value set 2
const GOLDENRODDEPTSTOREB1F_MACHOP
GoldenrodDeptStoreB1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 2
-
- ; callbacks
-
dbw MAPCALLBACK_TILES, UnknownScript_0x7d781
-
dbw MAPCALLBACK_NEWMAP, UnknownScript_0x7d7ac
UnknownScript_0x7d781:
@@ -31,9 +27,9 @@ UnknownScript_0x7d78a:
jump UnknownScript_0x7d791
UnknownScript_0x7d791:
- checkevent EVENT_WAREHOUSE_LAYOUT_2
+ checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
iftrue .Layout2
- checkevent EVENT_WAREHOUSE_LAYOUT_3
+ checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
iftrue .Layout3
changeblock $a, $8, $d
return
@@ -47,17 +43,17 @@ UnknownScript_0x7d791:
return
UnknownScript_0x7d7ac:
- clearevent EVENT_WAREHOUSE_BLOCKED_OFF
+ clearevent EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF
return
-BlackBeltScript_0x7d7b0:
- jumptextfaceplayer UnknownText_0x7d7cb
+GoldenrodDeptStoreB1FBlackBelt1Script:
+ jumptextfaceplayer GoldenrodDeptStoreB1FBlackBelt1Text
-BlackBeltScript_0x7d7b3:
- jumptextfaceplayer UnknownText_0x7d82c
+GoldenrodDeptStoreB1FBlackBelt2Script:
+ jumptextfaceplayer GoldenrodDeptStoreB1FBlackBelt2Text
-BlackBeltScript_0x7d7b6:
- jumptextfaceplayer UnknownText_0x7d875
+GoldenrodDeptStoreB1FBlackBelt3Script:
+ jumptextfaceplayer GoldenrodDeptStoreB1FBlackBelt3Text
MachopScript_0x7d7b9:
opentext
@@ -79,7 +75,7 @@ GoldenrodDeptStoreB1FBurnHeal:
GoldenrodDeptStoreB1FUltraBall:
itemball ULTRA_BALL
-UnknownText_0x7d7cb:
+GoldenrodDeptStoreB1FBlackBelt1Text:
text "Hey, kid! You're"
line "holding us up!"
@@ -90,7 +86,7 @@ UnknownText_0x7d7cb:
line "one can see us!"
done
-UnknownText_0x7d82c:
+GoldenrodDeptStoreB1FBlackBelt2Text:
text "I lose my passion"
line "for work if some-"
cont "one's watching."
@@ -99,7 +95,7 @@ UnknownText_0x7d82c:
line "scoot!"
done
-UnknownText_0x7d875:
+GoldenrodDeptStoreB1FBlackBelt3Text:
text "Oohah! Oohah!"
para "The stuff on the"
@@ -119,23 +115,23 @@ GoldenrodDeptStoreB1F_MapEventHeader:
.Warps:
db 3
- warp_def $2, $11, 3, UNDERGROUND_WAREHOUSE
+ warp_def $2, $11, 3, GOLDENROD_UNDERGROUND_WAREHOUSE
warp_def $4, $9, 1, GOLDENROD_DEPT_STORE_ELEVATOR
warp_def $4, $a, 2, GOLDENROD_DEPT_STORE_ELEVATOR
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 8
- person_event SPRITE_POKE_BALL, 15, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, GoldenrodDeptStoreB1FEther, EVENT_GOLDENROD_DEPT_STORE_B1F_ETHER
- person_event SPRITE_POKE_BALL, 2, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, GoldenrodDeptStoreB1FAmuletCoin, EVENT_GOLDENROD_DEPT_STORE_B1F_AMULET_COIN
- person_event SPRITE_POKE_BALL, 3, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, GoldenrodDeptStoreB1FBurnHeal, EVENT_GOLDENROD_DEPT_STORE_B1F_BURN_HEAL
- person_event SPRITE_POKE_BALL, 15, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, GoldenrodDeptStoreB1FUltraBall, EVENT_GOLDENROD_DEPT_STORE_B1F_ULTRA_BALL
- person_event SPRITE_BLACK_BELT, 10, 9, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, BlackBeltScript_0x7d7b0, -1
- person_event SPRITE_BLACK_BELT, 8, 4, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, BlackBeltScript_0x7d7b3, -1
- person_event SPRITE_BLACK_BELT, 13, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, BlackBeltScript_0x7d7b6, -1
- person_event SPRITE_MACHOP, 7, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, MachopScript_0x7d7b9, -1
+ object_event SPRITE_POKE_BALL, 15, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodDeptStoreB1FEther, EVENT_GOLDENROD_DEPT_STORE_B1F_ETHER
+ object_event SPRITE_POKE_BALL, 2, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodDeptStoreB1FAmuletCoin, EVENT_GOLDENROD_DEPT_STORE_B1F_AMULET_COIN
+ object_event SPRITE_POKE_BALL, 3, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodDeptStoreB1FBurnHeal, EVENT_GOLDENROD_DEPT_STORE_B1F_BURN_HEAL
+ object_event SPRITE_POKE_BALL, 15, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodDeptStoreB1FUltraBall, EVENT_GOLDENROD_DEPT_STORE_B1F_ULTRA_BALL
+ object_event SPRITE_BLACK_BELT, 10, 9, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreB1FBlackBelt1Script, -1
+ object_event SPRITE_BLACK_BELT, 8, 4, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreB1FBlackBelt2Script, -1
+ object_event SPRITE_BLACK_BELT, 13, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreB1FBlackBelt3Script, -1
+ object_event SPRITE_MACHOP, 7, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, MachopScript_0x7d7b9, -1
diff --git a/maps/GoldenrodDeptStoreElevator.asm b/maps/GoldenrodDeptStoreElevator.asm
index 2a3e2434e..f951e7028 100644
--- a/maps/GoldenrodDeptStoreElevator.asm
+++ b/maps/GoldenrodDeptStoreElevator.asm
@@ -1,5 +1,5 @@
GoldenrodDeptStoreElevator_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -14,30 +14,30 @@ MapGoldenrodDeptStoreElevatorSignpost0Script:
playsound SFX_ELEVATOR
earthquake 60
waitsfx
- checkevent EVENT_WAREHOUSE_BLOCKED_OFF
+ checkevent EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF
iftrue .Done
- checkevent EVENT_WAREHOUSE_LAYOUT_1
+ checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
iftrue .BoxLayout1
- checkevent EVENT_WAREHOUSE_LAYOUT_2
+ checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
iftrue .BoxLayout2
- checkevent EVENT_WAREHOUSE_LAYOUT_3
+ checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
iftrue .BoxLayout3
.BoxLayout3:
- setevent EVENT_WAREHOUSE_LAYOUT_1
- clearevent EVENT_WAREHOUSE_LAYOUT_2
- clearevent EVENT_WAREHOUSE_LAYOUT_3
+ setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
end
.BoxLayout1:
- clearevent EVENT_WAREHOUSE_LAYOUT_1
- setevent EVENT_WAREHOUSE_LAYOUT_2
- clearevent EVENT_WAREHOUSE_LAYOUT_3
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
+ setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
end
.BoxLayout2:
- clearevent EVENT_WAREHOUSE_LAYOUT_1
- clearevent EVENT_WAREHOUSE_LAYOUT_2
- setevent EVENT_WAREHOUSE_LAYOUT_3
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
+ setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
end
.Done:
@@ -46,13 +46,13 @@ MapGoldenrodDeptStoreElevatorSignpost0Script:
Elevator_0x566e0:
db 7 ; floors
- elevfloor _B1F, 2, GOLDENROD_DEPT_STORE_B1F
- elevfloor _1F, 4, GOLDENROD_DEPT_STORE_1F
- elevfloor _2F, 3, GOLDENROD_DEPT_STORE_2F
- elevfloor _3F, 3, GOLDENROD_DEPT_STORE_3F
- elevfloor _4F, 3, GOLDENROD_DEPT_STORE_4F
- elevfloor _5F, 3, GOLDENROD_DEPT_STORE_5F
- elevfloor _6F, 2, GOLDENROD_DEPT_STORE_6F
+ elevfloor FLOOR_B1F, 2, GOLDENROD_DEPT_STORE_B1F
+ elevfloor FLOOR_1F, 4, GOLDENROD_DEPT_STORE_1F
+ elevfloor FLOOR_2F, 3, GOLDENROD_DEPT_STORE_2F
+ elevfloor FLOOR_3F, 3, GOLDENROD_DEPT_STORE_3F
+ elevfloor FLOOR_4F, 3, GOLDENROD_DEPT_STORE_4F
+ elevfloor FLOOR_5F, 3, GOLDENROD_DEPT_STORE_5F
+ elevfloor FLOOR_6F, 2, GOLDENROD_DEPT_STORE_6F
db -1 ; end
@@ -62,15 +62,15 @@ GoldenrodDeptStoreElevator_MapEventHeader:
.Warps:
db 2
- warp_def $3, $1, 255, GOLDENROD_DEPT_STORE_1F
- warp_def $3, $2, 255, GOLDENROD_DEPT_STORE_1F
+ warp_def $3, $1, -1, GOLDENROD_DEPT_STORE_1F
+ warp_def $3, $2, -1, GOLDENROD_DEPT_STORE_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 0, 3, SIGNPOST_READ, MapGoldenrodDeptStoreElevatorSignpost0Script
+ bg_event 0, 3, BGEVENT_READ, MapGoldenrodDeptStoreElevatorSignpost0Script
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/GoldenrodDeptStoreRoof.asm b/maps/GoldenrodDeptStoreRoof.asm
index d3cb7af76..f60970e64 100644
--- a/maps/GoldenrodDeptStoreRoof.asm
+++ b/maps/GoldenrodDeptStoreRoof.asm
@@ -9,16 +9,12 @@ const_value set 2
const GOLDENRODDEPTSTOREROOF_BUG_CATCHER
GoldenrodDeptStoreRoof_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 2
-
- ; callbacks
-
dbw MAPCALLBACK_TILES, .CheckSaleChangeBlock
-
dbw MAPCALLBACK_OBJECTS, .CheckSaleChangeClerk
.CheckSaleChangeBlock:
@@ -49,8 +45,8 @@ ClerkScript_0x5673f:
closetext
end
-PokefanFScript_0x56746:
- jumptextfaceplayer UnknownText_0x5677f
+GoldenrodDeptStoreRoofPokefanFScript:
+ jumptextfaceplayer GoldenrodDeptStoreRoofPokefanFText
FisherScript_0x56749:
faceplayer
@@ -61,8 +57,8 @@ FisherScript_0x56749:
spriteface GOLDENRODDEPTSTOREROOF_FISHER, UP
end
-TwinScript_0x56754:
- jumptextfaceplayer UnknownText_0x56839
+GoldenrodDeptStoreRoofTwinScript:
+ jumptextfaceplayer GoldenrodDeptStoreRoofTwinText
SuperNerdScript_0x56757:
opentext
@@ -77,14 +73,14 @@ SuperNerdScript_0x56757:
spriteface GOLDENRODDEPTSTOREROOF_SUPER_NERD, RIGHT
end
-PokefanMScript_0x5676a:
- jumptextfaceplayer UnknownText_0x5688e
+GoldenrodDeptStoreRoofPokefanMScript:
+ jumptextfaceplayer GoldenrodDeptStoreRoofPokefanMText
-TeacherScript_0x5676d:
- jumptextfaceplayer UnknownText_0x56901
+GoldenrodDeptStoreRoofTeacherScript:
+ jumptextfaceplayer GoldenrodDeptStoreRoofTeacherText
-BugCatcherScript_0x56770:
- jumptextfaceplayer UnknownText_0x56942
+GoldenrodDeptStoreRoofBugCatcherScript:
+ jumptextfaceplayer GoldenrodDeptStoreRoofBugCatcherText
Binoculars1:
jumptext Binoculars1Text
@@ -98,7 +94,7 @@ Binoculars3:
PokeDollVendingMachine:
jumptext PokeDollVendingMachineText
-UnknownText_0x5677f:
+GoldenrodDeptStoreRoofPokefanFText:
text "Whew, I'm tired."
para "I sometimes come"
@@ -120,7 +116,7 @@ UnknownText_0x567d2:
line "dolls!"
done
-UnknownText_0x56839:
+GoldenrodDeptStoreRoofTwinText:
text "They have bargain"
line "sales here every"
cont "so often."
@@ -135,7 +131,7 @@ UnknownText_0x56871:
line "bothering me?"
done
-UnknownText_0x5688e:
+GoldenrodDeptStoreRoofPokefanMText:
text "There's something"
line "I really want, but"
@@ -147,7 +143,7 @@ UnknownText_0x5688e:
cont "I've collected…"
done
-UnknownText_0x56901:
+GoldenrodDeptStoreRoofTeacherText:
text "Oh, everything is"
line "so cheap!"
@@ -155,7 +151,7 @@ UnknownText_0x56901:
line "my PACK's crammed!"
done
-UnknownText_0x56942:
+GoldenrodDeptStoreRoofBugCatcherText:
text "My #MON always"
line "get paralyzed or"
@@ -223,23 +219,23 @@ GoldenrodDeptStoreRoof_MapEventHeader:
db 1
warp_def $1, $d, 3, GOLDENROD_DEPT_STORE_6F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 4
- signpost 3, 15, SIGNPOST_RIGHT, Binoculars1
- signpost 5, 15, SIGNPOST_RIGHT, Binoculars2
- signpost 6, 15, SIGNPOST_RIGHT, Binoculars3
- signpost 0, 3, SIGNPOST_UP, PokeDollVendingMachine
+ bg_event 3, 15, BGEVENT_RIGHT, Binoculars1
+ bg_event 5, 15, BGEVENT_RIGHT, Binoculars2
+ bg_event 6, 15, BGEVENT_RIGHT, Binoculars3
+ bg_event 0, 3, BGEVENT_UP, PokeDollVendingMachine
-.PersonEvents:
+.ObjectEvents:
db 8
- person_event SPRITE_CLERK, 4, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x5673f, EVENT_GOLDENROD_SALE_OFF
- person_event SPRITE_POKEFAN_F, 3, 10, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x56746, -1
- person_event SPRITE_FISHER, 1, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, FisherScript_0x56749, -1
- person_event SPRITE_TWIN, 4, 3, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TwinScript_0x56754, EVENT_GOLDENROD_SALE_ON
- person_event SPRITE_SUPER_NERD, 6, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x56757, EVENT_GOLDENROD_SALE_ON
- person_event SPRITE_POKEFAN_M, 0, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x5676a, EVENT_GOLDENROD_SALE_OFF
- person_event SPRITE_TEACHER, 3, 5, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TeacherScript_0x5676d, EVENT_GOLDENROD_SALE_OFF
- person_event SPRITE_BUG_CATCHER, 6, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, BugCatcherScript_0x56770, EVENT_GOLDENROD_SALE_OFF
+ object_event SPRITE_CLERK, 4, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x5673f, EVENT_GOLDENROD_SALE_OFF
+ object_event SPRITE_POKEFAN_F, 3, 10, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreRoofPokefanFScript, -1
+ object_event SPRITE_FISHER, 1, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FisherScript_0x56749, -1
+ object_event SPRITE_TWIN, 4, 3, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreRoofTwinScript, EVENT_GOLDENROD_SALE_ON
+ object_event SPRITE_SUPER_NERD, 6, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, SuperNerdScript_0x56757, EVENT_GOLDENROD_SALE_ON
+ object_event SPRITE_POKEFAN_M, 0, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreRoofPokefanMScript, EVENT_GOLDENROD_SALE_OFF
+ object_event SPRITE_TEACHER, 3, 5, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreRoofTeacherScript, EVENT_GOLDENROD_SALE_OFF
+ object_event SPRITE_BUG_CATCHER, 6, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreRoofBugCatcherScript, EVENT_GOLDENROD_SALE_OFF
diff --git a/maps/GoldenrodFlowerShop.asm b/maps/GoldenrodFlowerShop.asm
index ae813c34d..974484112 100644
--- a/maps/GoldenrodFlowerShop.asm
+++ b/maps/GoldenrodFlowerShop.asm
@@ -3,7 +3,7 @@ const_value set 2
const GOLDENRODFLOWERSHOP_FLORIA
GoldenrodFlowerShop_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -168,13 +168,13 @@ GoldenrodFlowerShop_MapEventHeader:
warp_def $7, $2, 6, GOLDENROD_CITY
warp_def $7, $3, 6, GOLDENROD_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_TEACHER, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FlowerShopTeacherScript, -1
- person_event SPRITE_LASS, 6, 5, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, FlowerShopFloriaScript, EVENT_FLORIA_AT_FLOWER_SHOP
+ object_event SPRITE_TEACHER, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FlowerShopTeacherScript, -1
+ object_event SPRITE_LASS, 6, 5, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FlowerShopFloriaScript, EVENT_FLORIA_AT_FLOWER_SHOP
diff --git a/maps/GoldenrodGameCorner.asm b/maps/GoldenrodGameCorner.asm
index ee0ccecb0..8a57e3ef0 100644
--- a/maps/GoldenrodGameCorner.asm
+++ b/maps/GoldenrodGameCorner.asm
@@ -13,14 +13,11 @@ const_value set 2
const GOLDENRODGAMECORNER_POKEFAN_M3
GoldenrodGameCorner_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_OBJECTS, .Callback
.Callback:
@@ -454,54 +451,54 @@ GoldenrodGameCorner_MapEventHeader:
warp_def $d, $2, 10, GOLDENROD_CITY
warp_def $d, $3, 10, GOLDENROD_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 31
- signpost 6, 6, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 7, 6, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 8, 6, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 9, 6, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 10, 6, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 11, 6, SIGNPOST_RIGHT, GoldenrodGameCornerSlotsMachineScript
- signpost 6, 7, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 7, 7, SIGNPOST_READ, GoldenrodGameCornerLuckySlotsMachineScript
- signpost 8, 7, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 9, 7, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 10, 7, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 11, 7, SIGNPOST_LEFT, GoldenrodGameCornerSlotsMachineScript
- signpost 6, 12, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 7, 12, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 8, 12, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 9, 12, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 10, 12, SIGNPOST_READ, GoldenrodGameCornerSlotsMachineScript
- signpost 11, 12, SIGNPOST_RIGHT, GoldenrodGameCornerSlotsMachineScript
- signpost 6, 13, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
- signpost 7, 13, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
- signpost 8, 13, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
- signpost 9, 13, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
- signpost 10, 13, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
- signpost 11, 13, SIGNPOST_LEFT, GoldenrodGameCornerCardFlipMachineScript
- signpost 6, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
- signpost 7, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
- signpost 8, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
- signpost 9, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
- signpost 10, 18, SIGNPOST_READ, GoldenrodGameCornerCardFlipMachineScript
- signpost 11, 18, SIGNPOST_RIGHT, GoldenrodGameCornerCardFlipMachineScript
- signpost 1, 12, SIGNPOST_LEFT, GoldenrodGameCornerLeftTheirDrinkScript
-
-.PersonEvents:
+ bg_event 6, 6, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 7, 6, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 8, 6, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 9, 6, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 10, 6, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 11, 6, BGEVENT_RIGHT, GoldenrodGameCornerSlotsMachineScript
+ bg_event 6, 7, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 7, 7, BGEVENT_READ, GoldenrodGameCornerLuckySlotsMachineScript
+ bg_event 8, 7, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 9, 7, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 10, 7, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 11, 7, BGEVENT_LEFT, GoldenrodGameCornerSlotsMachineScript
+ bg_event 6, 12, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 7, 12, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 8, 12, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 9, 12, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 10, 12, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript
+ bg_event 11, 12, BGEVENT_RIGHT, GoldenrodGameCornerSlotsMachineScript
+ bg_event 6, 13, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
+ bg_event 7, 13, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
+ bg_event 8, 13, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
+ bg_event 9, 13, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
+ bg_event 10, 13, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
+ bg_event 11, 13, BGEVENT_LEFT, GoldenrodGameCornerCardFlipMachineScript
+ bg_event 6, 18, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
+ bg_event 7, 18, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
+ bg_event 8, 18, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
+ bg_event 9, 18, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
+ bg_event 10, 18, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript
+ bg_event 11, 18, BGEVENT_RIGHT, GoldenrodGameCornerCardFlipMachineScript
+ bg_event 1, 12, BGEVENT_LEFT, GoldenrodGameCornerLeftTheirDrinkScript
+
+.ObjectEvents:
db 12
- person_event SPRITE_CLERK, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GoldenrodGmeCornerCoinVendorScript, -1
- person_event SPRITE_RECEPTIONIST, 2, 16, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GoldenrodGmeCornerTMVendorScript, -1
- person_event SPRITE_RECEPTIONIST, 2, 18, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPrizeMonVendorScript, -1
- person_event SPRITE_PHARMACIST, 7, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, (1 << DAY), (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPharmacistScript, -1
- person_event SPRITE_PHARMACIST, 7, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, (1 << NITE), (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPharmacistScript, -1
- person_event SPRITE_POKEFAN_M, 10, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM1Script, -1
- person_event SPRITE_COOLTRAINER_M, 8, 14, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerCooltrainerMScript, -1
- person_event SPRITE_POKEFAN_F, 6, 17, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanFScript, -1
- person_event SPRITE_COOLTRAINER_F, 3, 10, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerCooltrainerFScript, -1
- person_event SPRITE_GENTLEMAN, 10, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerGentlemanScript, -1
- person_event SPRITE_POKEFAN_M, 9, 2, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM2Script, -1
- person_event SPRITE_POKEFAN_M, 10, 17, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM3Script, EVENT_GOLDENROD_GAME_CORNER_MOVE_TUTOR
+ object_event SPRITE_CLERK, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGmeCornerCoinVendorScript, -1
+ object_event SPRITE_RECEPTIONIST, 2, 16, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGmeCornerTMVendorScript, -1
+ object_event SPRITE_RECEPTIONIST, 2, 18, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPrizeMonVendorScript, -1
+ object_event SPRITE_PHARMACIST, 7, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, DAY, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPharmacistScript, -1
+ object_event SPRITE_PHARMACIST, 7, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, NITE, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPharmacistScript, -1
+ object_event SPRITE_POKEFAN_M, 10, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM1Script, -1
+ object_event SPRITE_COOLTRAINER_M, 8, 14, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerCooltrainerMScript, -1
+ object_event SPRITE_POKEFAN_F, 6, 17, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanFScript, -1
+ object_event SPRITE_COOLTRAINER_F, 3, 10, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerCooltrainerFScript, -1
+ object_event SPRITE_GENTLEMAN, 10, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerGentlemanScript, -1
+ object_event SPRITE_POKEFAN_M, 9, 2, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM2Script, -1
+ object_event SPRITE_POKEFAN_M, 10, 17, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM3Script, EVENT_GOLDENROD_GAME_CORNER_MOVE_TUTOR
diff --git a/maps/GoldenrodGym.asm b/maps/GoldenrodGym.asm
index 3fb6057dc..19bb2400b 100644
--- a/maps/GoldenrodGym.asm
+++ b/maps/GoldenrodGym.asm
@@ -7,20 +7,18 @@ const_value set 2
const GOLDENRODGYM_GYM_GUY
GoldenrodGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x5400a, 0
- dw UnknownScript_0x5400b, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 0
-UnknownScript_0x5400a:
+.DummyScene0:
end
-UnknownScript_0x5400b:
+.DummyScene1:
end
WhitneyScript_0x5400c:
@@ -37,7 +35,7 @@ WhitneyScript_0x5400c:
reloadmapafterbattle
setevent EVENT_BEAT_WHITNEY
setevent EVENT_MADE_WHITNEY_CRY
- dotrigger $1
+ setscene $1
setevent EVENT_BEAT_BEAUTY_VICTORIA
setevent EVENT_BEAT_BEAUTY_SAMANTHA
setevent EVENT_BEAT_LASS_CARRIE
@@ -64,7 +62,7 @@ WhitneyScript_0x5400c:
waitsfx
setflag ENGINE_PLAINBADGE
checkcode VAR_BADGES
- scall GoldenrodGymTriggerRockets
+ scall GoldenrodGymActivateRockets
UnknownScript_0x54064:
writetext UnknownText_0x5428b
buttonsound
@@ -83,7 +81,7 @@ UnknownScript_0x5407b:
closetext
end
-GoldenrodGymTriggerRockets:
+GoldenrodGymActivateRockets:
if_equal 7, .RadioTowerRockets
if_equal 6, .GoldenrodRockets
end
@@ -95,12 +93,12 @@ GoldenrodGymTriggerRockets:
jumpstd radiotowerrockets
TrainerLassCarrie:
- trainer EVENT_BEAT_LASS_CARRIE, LASS, CARRIE, LassCarrieSeenText, LassCarrieBeatenText, 0, LassCarrieScript
+ trainer EVENT_BEAT_LASS_CARRIE, LASS, CARRIE, LassCarrieSeenText, LassCarrieBeatenText, 0, .Script
-LassCarrieScript:
+.Script:
end_if_just_battled
opentext
- writetext LassCarrieOWText
+ writetext LassCarrieAfterBattleText
waitbutton
closetext
end
@@ -114,39 +112,39 @@ WhitneyCriesScript:
waitbutton
closetext
applymovement GOLDENRODGYM_LASS2, BridgetWalksAwayMovement
- dotrigger $0
+ setscene $0
clearevent EVENT_MADE_WHITNEY_CRY
end
TrainerLassBridget:
- trainer EVENT_BEAT_LASS_BRIDGET, LASS, BRIDGET, LassBridgetSeenText, LassBridgetBeatenText, 0, LassBridgetScript
+ trainer EVENT_BEAT_LASS_BRIDGET, LASS, BRIDGET, LassBridgetSeenText, LassBridgetBeatenText, 0, .Script
-LassBridgetScript:
+.Script:
end_if_just_battled
opentext
- writetext LassBridgetOWText
+ writetext LassBridgetAfterBattleText
waitbutton
closetext
end
TrainerBeautyVictoria:
- trainer EVENT_BEAT_BEAUTY_VICTORIA, BEAUTY, VICTORIA, BeautyVictoriaSeenText, BeautyVictoriaBeatenText, 0, BeautyVictoriaScript
+ trainer EVENT_BEAT_BEAUTY_VICTORIA, BEAUTY, VICTORIA, BeautyVictoriaSeenText, BeautyVictoriaBeatenText, 0, .Script
-BeautyVictoriaScript:
+.Script:
end_if_just_battled
opentext
- writetext BeautyVictoriaOWText
+ writetext BeautyVictoriaAfterBattleText
waitbutton
closetext
end
TrainerBeautySamantha:
- trainer EVENT_BEAT_BEAUTY_SAMANTHA, BEAUTY, SAMANTHA, BeautySamanthaSeenText, BeautySamanthaBeatenText, 0, BeautySamanthaScript
+ trainer EVENT_BEAT_BEAUTY_SAMANTHA, BEAUTY, SAMANTHA, BeautySamanthaSeenText, BeautySamanthaBeatenText, 0, .Script
-BeautySamanthaScript:
+.Script:
end_if_just_battled
opentext
- writetext BeautySamanthaOWText
+ writetext BeautySamanthaAfterBattleText
waitbutton
closetext
end
@@ -285,7 +283,7 @@ LassCarrieBeatenText:
line "you were weak…"
done
-LassCarrieOWText:
+LassCarrieAfterBattleText:
text "Do my #MON"
line "think I'm cute?"
done
@@ -303,7 +301,7 @@ LassBridgetBeatenText:
text "Oh, no, no, no!"
done
-LassBridgetOWText:
+LassBridgetAfterBattleText:
text "I'm trying to beat"
line "WHITNEY, but…"
cont "It's depressing."
@@ -339,7 +337,7 @@ BeautyVictoriaBeatenText:
line "it's over?"
done
-BeautyVictoriaOWText:
+BeautyVictoriaAfterBattleText:
text "Wow, you must be"
line "good to beat me!"
cont "Keep it up!"
@@ -356,7 +354,7 @@ BeautySamanthaBeatenText:
line "I'm so sorry!"
done
-BeautySamanthaOWText:
+BeautySamanthaAfterBattleText:
text "I taught MEOWTH"
line "moves for taking"
cont "on any type…"
@@ -390,20 +388,20 @@ GoldenrodGym_MapEventHeader:
warp_def $11, $2, 1, GOLDENROD_CITY
warp_def $11, $3, 1, GOLDENROD_CITY
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 1, $5, $8, $0, WhitneyCriesScript, $0, $0
+ coord_event 1, $5, $8, WhitneyCriesScript
-.Signposts:
+.BGEvents:
db 2
- signpost 15, 1, SIGNPOST_READ, GoldenrodGymStatue
- signpost 15, 4, SIGNPOST_READ, GoldenrodGymStatue
+ bg_event 15, 1, BGEVENT_READ, GoldenrodGymStatue
+ bg_event 15, 4, BGEVENT_READ, GoldenrodGymStatue
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_WHITNEY, 3, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, WhitneyScript_0x5400c, -1
- person_event SPRITE_LASS, 13, 9, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 4, TrainerLassCarrie, -1
- person_event SPRITE_LASS, 6, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerLassBridget, -1
- person_event SPRITE_BUENA, 2, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerBeautyVictoria, -1
- person_event SPRITE_BUENA, 5, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerBeautySamantha, -1
- person_event SPRITE_GYM_GUY, 15, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GoldenrodGymGuyScript, -1
+ object_event SPRITE_WHITNEY, 3, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, WhitneyScript_0x5400c, -1
+ object_event SPRITE_LASS, 13, 9, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerLassCarrie, -1
+ object_event SPRITE_LASS, 6, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerLassBridget, -1
+ object_event SPRITE_BUENA, 2, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBeautyVictoria, -1
+ object_event SPRITE_BUENA, 5, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBeautySamantha, -1
+ object_event SPRITE_GYM_GUY, 15, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGymGuyScript, -1
diff --git a/maps/GoldenrodHappinessRater.asm b/maps/GoldenrodHappinessRater.asm
index cebfef9f2..bc7229ca2 100644
--- a/maps/GoldenrodHappinessRater.asm
+++ b/maps/GoldenrodHappinessRater.asm
@@ -4,7 +4,7 @@ const_value set 2
const GOLDENRODHAPPINESSRATER_TWIN
GoldenrodHappinessRater_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -59,11 +59,11 @@ UnknownScript_0x54991:
closetext
end
-PokefanMScript_0x54997:
- jumptextfaceplayer UnknownText_0x54b04
+GoldenrodHappinessRaterPokefanMScript:
+ jumptextfaceplayer GoldenrodHappinessRaterPokefanMText
-TwinScript_0x5499a:
- jumptextfaceplayer UnknownText_0x54b67
+GoldenrodHappinessRaterTwinScript:
+ jumptextfaceplayer GoldenrodHappinessRaterTwinText
HappinessRatersHouseBookshelf:
jumpstd difficultbookshelf
@@ -118,7 +118,7 @@ UnknownText_0x54ad1:
cont "It looks mean."
done
-UnknownText_0x54b04:
+GoldenrodHappinessRaterPokefanMText:
text "I keep losing in"
line "battles, and my"
@@ -130,7 +130,7 @@ UnknownText_0x54b04:
cont "like me much…"
done
-UnknownText_0x54b67:
+GoldenrodHappinessRaterTwinText:
text "When I use an item"
line "on my #MON, it"
cont "acts really glad!"
@@ -145,17 +145,17 @@ GoldenrodHappinessRater_MapEventHeader:
warp_def $7, $2, 3, GOLDENROD_CITY
warp_def $7, $3, 3, GOLDENROD_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 1, 0, SIGNPOST_READ, HappinessRatersHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, HappinessRatersHouseBookshelf
- signpost 1, 7, SIGNPOST_READ, HappinessRatersHouseRadio
+ bg_event 1, 0, BGEVENT_READ, HappinessRatersHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, HappinessRatersHouseBookshelf
+ bg_event 1, 7, BGEVENT_READ, HappinessRatersHouseRadio
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_TEACHER, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, TeacherScript_0x54953, -1
- person_event SPRITE_POKEFAN_M, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x54997, -1
- person_event SPRITE_TWIN, 6, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TwinScript_0x5499a, -1
+ object_event SPRITE_TEACHER, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x54953, -1
+ object_event SPRITE_POKEFAN_M, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodHappinessRaterPokefanMScript, -1
+ object_event SPRITE_TWIN, 6, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodHappinessRaterTwinScript, -1
diff --git a/maps/GoldenrodMagnetTrainStation.asm b/maps/GoldenrodMagnetTrainStation.asm
index eea47ac8f..83984a694 100644
--- a/maps/GoldenrodMagnetTrainStation.asm
+++ b/maps/GoldenrodMagnetTrainStation.asm
@@ -3,16 +3,14 @@ const_value set 2
const GOLDENRODMAGNETTRAINSTATION_GENTLEMAN
GoldenrodMagnetTrainStation_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 1
-
- ; triggers
- maptrigger .Trigger0
+ scene_script .DummyScene
.MapCallbacks:
db 0
-.Trigger0:
+.DummyScene:
end
OfficerScript_0x550ec:
@@ -70,8 +68,8 @@ Script_ArriveFromSaffron:
closetext
end
-GentlemanScript_0x55143:
- jumptextfaceplayer UnknownText_0x552a3
+GoldenrodMagnetTrainStationGentlemanScript:
+ jumptextfaceplayer GoldenrodMagnetTrainStationGentlemanText
MovementData_0x55146:
step UP
@@ -152,7 +150,7 @@ UnknownText_0x5526a:
line "again."
done
-UnknownText_0x552a3:
+GoldenrodMagnetTrainStationGentlemanText:
text "I'm the PRESIDENT."
para "My dream was to"
@@ -177,14 +175,14 @@ GoldenrodMagnetTrainStation_MapEventHeader:
warp_def $5, $6, 4, SAFFRON_TRAIN_STATION
warp_def $5, $b, 3, SAFFRON_TRAIN_STATION
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 0, $6, $b, $0, Script_ArriveFromSaffron, $0, $0
+ coord_event 0, $6, $b, Script_ArriveFromSaffron
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_OFFICER, 9, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, OfficerScript_0x550ec, -1
- person_event SPRITE_GENTLEMAN, 14, 11, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x55143, EVENT_GOLDENROD_TRAIN_STATION_GENTLEMAN
+ object_event SPRITE_OFFICER, 9, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x550ec, -1
+ object_event SPRITE_GENTLEMAN, 14, 11, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodMagnetTrainStationGentlemanScript, EVENT_GOLDENROD_TRAIN_STATION_GENTLEMAN
diff --git a/maps/GoldenrodNameRater.asm b/maps/GoldenrodNameRater.asm
index 216fba7c1..3b0ef46a2 100644
--- a/maps/GoldenrodNameRater.asm
+++ b/maps/GoldenrodNameRater.asm
@@ -2,7 +2,7 @@ const_value set 2
const GOLDENRODNAMERATER_NAME_RATER
GoldenrodNameRater_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -22,7 +22,7 @@ GoldenrodNameRaterBookshelf:
GoldenrodNameRaterRadio:
jumpstd radio2
-INCLUDE "text/sweethoney.asm"
+INCLUDE "text/unused_sweet_honey.asm"
GoldenrodNameRater_MapEventHeader:
; filler
@@ -33,15 +33,15 @@ GoldenrodNameRater_MapEventHeader:
warp_def $7, $2, 8, GOLDENROD_CITY
warp_def $7, $3, 8, GOLDENROD_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 1, 0, SIGNPOST_READ, GoldenrodNameRaterBookshelf
- signpost 1, 1, SIGNPOST_READ, GoldenrodNameRaterBookshelf
- signpost 1, 7, SIGNPOST_READ, GoldenrodNameRaterRadio
+ bg_event 1, 0, BGEVENT_READ, GoldenrodNameRaterBookshelf
+ bg_event 1, 1, BGEVENT_READ, GoldenrodNameRaterBookshelf
+ bg_event 1, 7, BGEVENT_READ, GoldenrodNameRaterRadio
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_GENTLEMAN, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GoldenrodNameRater, -1
+ object_event SPRITE_GENTLEMAN, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodNameRater, -1
diff --git a/maps/GoldenrodPPSpeechHouse.asm b/maps/GoldenrodPPSpeechHouse.asm
index 710959645..2d303adbe 100644
--- a/maps/GoldenrodPPSpeechHouse.asm
+++ b/maps/GoldenrodPPSpeechHouse.asm
@@ -3,17 +3,17 @@ const_value set 2
const GOLDENRODPPSPEECHHOUSE_LASS
GoldenrodPPSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-FisherScript_0x5564a:
- jumptextfaceplayer UnknownText_0x55659
+GoldenrodPPSpeechHouseFisherScript:
+ jumptextfaceplayer GoldenrodPPSpeechHouseFisherText
-LassScript_0x5564d:
- jumptextfaceplayer UnknownText_0x556ca
+GoldenrodPPSpeechHouseLassScript:
+ jumptextfaceplayer GoldenrodPPSpeechHouseLassText
GoldenrodPPSpeechHouseBookshelf2:
jumpstd difficultbookshelf
@@ -24,7 +24,7 @@ GoldenrodPPSpeechHouseBookshelf1:
GoldenrodPPSpeechHouseRadio:
jumpstd radio2
-UnknownText_0x55659:
+GoldenrodPPSpeechHouseFisherText:
text "Once while I was"
line "battling, my"
@@ -38,7 +38,7 @@ UnknownText_0x55659:
line "gone."
done
-UnknownText_0x556ca:
+GoldenrodPPSpeechHouseLassText:
text "Sometimes, a"
line "healthy #MON"
@@ -60,16 +60,16 @@ GoldenrodPPSpeechHouse_MapEventHeader:
warp_def $7, $2, 7, GOLDENROD_CITY
warp_def $7, $3, 7, GOLDENROD_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 1, 0, SIGNPOST_READ, GoldenrodPPSpeechHouseBookshelf1
- signpost 1, 1, SIGNPOST_READ, GoldenrodPPSpeechHouseBookshelf2
- signpost 1, 7, SIGNPOST_READ, GoldenrodPPSpeechHouseRadio
+ bg_event 1, 0, BGEVENT_READ, GoldenrodPPSpeechHouseBookshelf1
+ bg_event 1, 1, BGEVENT_READ, GoldenrodPPSpeechHouseBookshelf2
+ bg_event 1, 7, BGEVENT_READ, GoldenrodPPSpeechHouseRadio
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_FISHER, 4, 2, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FisherScript_0x5564a, -1
- person_event SPRITE_LASS, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 1, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LassScript_0x5564d, -1
+ object_event SPRITE_FISHER, 4, 2, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodPPSpeechHouseFisherScript, -1
+ object_event SPRITE_LASS, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodPPSpeechHouseLassScript, -1
diff --git a/maps/GoldenrodPokeCenter1F.asm b/maps/GoldenrodPokeCenter1F.asm
deleted file mode 100644
index ed027321d..000000000
--- a/maps/GoldenrodPokeCenter1F.asm
+++ /dev/null
@@ -1,832 +0,0 @@
-const_value set 2
- const GOLDENRODPOKECENTER1F_NURSE
- const GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
- const GOLDENRODPOKECENTER1F_GAMEBOY_KID
- const GOLDENRODPOKECENTER1F_LASS
- const GOLDENRODPOKECENTER1F_POKEFAN_F
-
-GoldenrodPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x60f91:
- jumpstd pokecenternurse
-
-GoldenrodPokeCenter1F_GSBallTriggerLeft:
- writebyte BATTLETOWERACTION_CHECKMOBILEEVENT
- special BattleTowerAction
- if_equal MOBILE_EVENT_OBJECT_GS_BALL, .gsball
- end
-
-.gsball
- checkevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
- iftrue .cancel
- playsound SFX_EXIT_BUILDING
- moveperson GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, $0, $7
- disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
- appear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
- playmusic MUSIC_SHOW_ME_AROUND
- applymovement GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, MovementData_0x6105a
- spriteface PLAYER, UP
- opentext
- writetext UnknownText_0x622f0
- waitbutton
- verbosegiveitem GS_BALL
- setevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
- setevent EVENT_CAN_GIVE_GS_BALL_TO_KURT
- writetext UnknownText_0x62359
- waitbutton
- closetext
- applymovement GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, MovementData_0x61060
- special RestartMapMusic
- disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
- playsound SFX_EXIT_BUILDING
-.cancel
- end
-
-GoldenrodPokeCenter1F_GSBallTriggerRight:
- writebyte BATTLETOWERACTION_CHECKMOBILEEVENT
- special BattleTowerAction
- if_equal MOBILE_EVENT_OBJECT_GS_BALL, .gsball
- end
-
-.gsball
- checkevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
- iftrue .cancel
- playsound SFX_EXIT_BUILDING
- moveperson GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, $0, $7
- disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
- appear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
- playmusic MUSIC_SHOW_ME_AROUND
- applymovement GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, MovementData_0x61065
- spriteface PLAYER, UP
- opentext
- writetext UnknownText_0x622f0
- waitbutton
- verbosegiveitem GS_BALL
- setevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
- setevent EVENT_CAN_GIVE_GS_BALL_TO_KURT
- writetext UnknownText_0x62359
- waitbutton
- closetext
- applymovement GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, MovementData_0x6106c
- special RestartMapMusic
- disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
- playsound SFX_EXIT_BUILDING
-.cancel
- end
-
-GameboyKidScript_0x6101e:
- jumptextfaceplayer UnknownText_0x62105
-
-LassScript_0x61021:
- jumptextfaceplayer UnknownText_0x62260
-
-PokefanFScript_0x61024:
- faceplayer
- opentext
- writetext UnknownText_0x623fb
- waitbutton
- writetext UnknownText_0x6248c
- yesorno
- iffalse UnknownScript_0x6104b
- takeitem EON_MAIL
- iffalse UnknownScript_0x6104b
- writetext UnknownText_0x62549
- waitbutton
- writetext UnknownText_0x624a4
- waitbutton
- verbosegiveitem REVIVE
- iffalse UnknownScript_0x61051
- writetext UnknownText_0x624e9
- waitbutton
- closetext
- end
-
-UnknownScript_0x6104b:
- writetext UnknownText_0x62509
- waitbutton
- closetext
- end
-
-UnknownScript_0x61051:
- giveitem EON_MAIL
- writetext UnknownText_0x6252a
- waitbutton
- closetext
- end
-
-MovementData_0x6105a:
- step UP
- step RIGHT
- step RIGHT
- step RIGHT
- turn_head DOWN
- step_end
-
-MovementData_0x61060:
- step LEFT
- step LEFT
- step LEFT
- step DOWN
- step_end
-
-MovementData_0x61065:
- step UP
- step RIGHT
- step RIGHT
- step RIGHT
- step RIGHT
- turn_head DOWN
- step_end
-
-MovementData_0x6106c:
- step LEFT
- step LEFT
- step LEFT
- step LEFT
- step DOWN
- step_end
-
-; unused
-UnknownText_0x61072:
- text "Hello! Welcome to"
- line "#COM CENTER"
- cont "TRADE CORNER."
-
- para "You can trade"
- line "#MON with other"
- cont "people far away."
- done
-
-UnknownText_0x610ce:
- text "To make a trade,"
- line "we must hold your"
- cont "#MON."
-
- para "Would you like to"
- line "trade?"
- done
-
-UnknownText_0x61111:
- text "What kind of"
- line "#MON do you"
- cont "want in return?"
- done
-
-UnknownText_0x6113b:
- text "Fine. We will try"
- line "to trade your"
-
- para "@"
- text_from_ram StringBuffer3
- text " for"
- line "@"
- text_from_ram StringBuffer4
- text "."
-
- para "We'll have to hold"
- line "your #MON"
- cont "during the trade."
-
- para "Please wait while"
- line "we prepare the"
- cont "room for it."
- done
-
-UnknownText_0x611c9:
- text "Fine. We will try"
- line "to trade your"
-
- para "@"
- text_from_ram StringBuffer3
- text " for a"
- line "#MON that you"
- cont "have never seen."
-
- para "We'll have to hold"
- line "your #MON"
- cont "during the trade."
-
- para "Please wait while"
- line "we prepare the"
- cont "room for it."
- done
-
-UnknownText_0x61271:
- text "Your trade #MON"
- line "has been received."
-
- para "It will take time"
- line "to find a trade"
-
- para "partner. Please"
- line "come back later."
- done
-
-UnknownText_0x612d8:
- text "Oh? You have only"
- line "one #MON in"
- cont "your party. "
-
- para "Please come back"
- line "once you've in-"
- cont "creased the size"
- cont "of your party."
- done
-
-UnknownText_0x61344:
- text "We hope to see you"
- line "again."
- done
-
-UnknownText_0x6135f:
- text "Communication"
- line "error…"
- done
-
-UnknownText_0x61375:
- text "If we accept that"
- line "#MON, what will"
- cont "you battle with?"
- done
-
-UnknownText_0x613a9:
- text "Sorry. We can't"
- line "accept an EGG."
- done
-
-UnknownText_0x613c8:
- text "Sorry, but your"
- line "#MON appears to"
-
- para "be abnormal. We"
- line "can't accept it."
- done
-
-UnknownText_0x61409:
- text "Oh? Aren't we"
- line "already holding a"
- cont "#MON of yours?"
- done
-
-UnknownText_0x61438:
- text "We'll check the"
- line "rooms."
-
- para "Please wait."
- done
-
-UnknownText_0x6145c:
- text "Thank you for your"
- line "patience."
-
- para "A trade partner"
- line "has been found."
- done
-
-UnknownText_0x6149a:
- text "It's your new"
- line "partner."
-
- para "Please take care"
- line "of it with love."
-
- para "We hope to see you"
- line "again."
- done
-
-UnknownText_0x614ed:
- text "Uh-oh. Your party"
- line "is already full."
-
- para "Please come back"
- line "when you have room"
- cont "in your party."
- done
-
-UnknownText_0x61544:
- text "It's unfortunate,"
- line "but no one has"
-
- para "come forward as a"
- line "trade partner."
-
- para "Would you like"
- line "your #MON back?"
- done
-
-UnknownText_0x615a5:
- text "We have returned"
- line "your #MON."
- done
-
-UnknownText_0x615c2:
- text "It's unfortunate,"
- line "but no one has"
-
- para "come forward as a"
- line "trade partner."
-
- para "We've held your"
- line "#MON for a long"
-
- para "time. As a result,"
- line "it is very lonely."
-
- para "Sorry, but we must"
- line "return it to you."
- done
-
-UnknownText_0x6166e:
- text "We hope to see you"
- line "again."
- done
-
-UnknownText_0x61689:
- text "Fine. We will"
- line "continue to hold"
- cont "your #MON."
- done
-
-UnknownText_0x616b4:
- text "Oh? You left your"
- line "#MON with us"
- cont "only recently."
-
- para "Please come back"
- line "later."
- done
-
-UnknownText_0x616fb:
- text "We'll SAVE before"
- line "connecting to the"
- cont "CENTER."
- done
-
-UnknownText_0x61727:
- text "Which #MON do"
- line "you want to trade?"
- done
-
-UnknownText_0x61749:
- text "Sorry, but we must"
- line "cancel the trade."
- done
-
-UnknownText_0x6176f:
- text "Oh!"
-
- para "I see you have an"
- line "EGG TICKET!"
-
- para "It's a coupon that"
- line "special people can"
-
- para "redeem for a"
- line "special #MON!"
- done
-
-UnknownText_0x617d2:
- text "Let me give you a"
- line "quick briefing."
-
- para "Trades held at the"
- line "TRADE CORNER are"
-
- para "between two"
- line "trainers who don't"
-
- para "know each other's"
- line "identity."
-
- para "As a result, it"
- line "may take time."
-
- para "However, an ODD"
- line "EGG is available"
- cont "just for you."
-
- para "It will be sent to"
- line "you right away."
-
- para "Please choose one"
- line "of the rooms in"
-
- para "the CENTER."
- line "An ODD EGG will be"
-
- para "sent from the"
- line "chosen room."
- done
-
-UnknownText_0x6191f:
- text "Please wait a"
- line "moment."
- done
-
-UnknownText_0x61936:
- text "Thank you for"
- line "waiting."
-
- para "We received your"
- line "ODD EGG."
-
- para "Here it is!"
-
- para "Please raise it"
- line "with loving care."
- done
-
-UnknownText_0x61996:
- text "I'm awfully sorry."
-
- para "The EGG TICKET"
- line "exchange service"
- cont "isn't running now."
- done
-
-UnknownText_0x619db:
- text "It's a #MON"
- line "NEWS MACHINE."
- done
-
-UnknownText_0x619f5:
- text "What would you"
- line "like to do?"
- done
-
-UnknownText_0x61a11:
- text "#MON NEWS is"
- line "news compiled from"
-
- para "the SAVE files of"
- line "#MON trainers."
-
- para "When reading the"
- line "NEWS, your SAVE"
-
- para "file may be sent"
- line "out."
-
- para "The SAVE file data"
- line "will contain your"
-
- para "adventure log and"
- line "mobile profile."
-
- para "Your phone number"
- line "will not be sent."
-
- para "The contents of"
- line "the NEWS will vary"
-
- para "depending on the"
- line "SAVE files sent by"
-
- para "you and the other"
- line "#MON trainers."
-
- para "You might even be"
- line "in the NEWS!"
- done
-
-UnknownText_0x61b7c:
- text "Would you like to"
- line "get the NEWS?"
- done
-
-UnknownText_0x61b9d:
- text "Reading the latest"
- line "NEWS… Please wait."
- done
-
-UnknownText_0x61bc4:
- text "There is no old"
- line "NEWS…"
- done
-
-UnknownText_0x61bdb:
- text "The NEWS data is"
- line "corrupted."
-
- para "Please download"
- line "the NEWS again."
- done
-
-UnknownText_0x61c18:
- text "We're making"
- line "preparations."
-
- para "Please come back"
- line "later."
- done
-
-UnknownText_0x61c4b:
- text "We will SAVE your"
- line "progress before"
-
- para "starting the NEWS"
- line "MACHINE."
- done
-
-UnknownText_0x61c89:
- text "Whoa, this #MON"
- line "CENTER is huge."
-
- para "They just built"
- line "this place. They"
-
- para "installed lots of"
- line "new machines too."
- done
-
-UnknownText_0x61cef:
- text "I thought up a fun"
- line "new thing for the"
- cont "TRADE CORNER!"
-
- para "I make a PIDGEY"
- line "hold MAIL, then"
-
- para "put it up for"
- line "trade for another"
- cont "one!"
-
- para "If everyone did"
- line "that, MAIL could"
-
- para "be traded with all"
- line "sorts of people!"
-
- para "I call it PIDGEY"
- line "MAIL!"
-
- para "If it becomes"
- line "popular, I might"
-
- para "make lots of new"
- line "friends!"
- done
-
-UnknownText_0x61dfd:
- text "They said you can"
- line "trade #MON with"
-
- para "total strangers up"
- line "here."
-
- para "But they're still"
- line "adjusting things."
- done
-
-UnknownText_0x61e5c:
- text "Some girl I don't"
- line "know sent me her"
-
- para "HOPPIP."
- line "You should trade"
-
- para "for a #MON that"
- line "you want."
- done
-
-UnknownText_0x61eb2:
- text "I received a"
- line "female HOPPIP, but"
- cont "its named STANLEY!"
-
- para "That's my dad's"
- line "name!"
- done
-
-UnknownText_0x61efa:
- text "What is the NEWS"
- line "MACHINE?"
-
- para "Does it get news"
- line "from a wider area"
- cont "than the radio?"
- done
-
-UnknownText_0x61f48:
- text "The #COM CENTER"
- line "will link with all"
-
- para "#MON CENTERS in"
- line "a wireless net."
-
- para "That must mean"
- line "I'll be able to"
-
- para "link with all"
- line "sorts of people."
- done
-
-UnknownText_0x61fc9:
- text "The machines here"
- line "can't be used yet."
-
- para "Still, it's nice"
- line "coming to a trendy"
-
- para "place before other"
- line "people."
- done
-
-UnknownText_0x6202c:
- text "My friend was in"
- line "the NEWS a while"
-
- para "back. I was really"
- line "surprised!"
- done
-
-UnknownText_0x6206d:
- text "I get anxious if I"
- line "don't check out"
- cont "the latest NEWS!"
- done
-
-UnknownText_0x620a1:
- text "If I get in the"
- line "NEWS and become"
-
- para "famous, I bet I'll"
- line "be adored."
-
- para "I wonder how I"
- line "could get in the"
- cont "NEWS?"
- done
-
-UnknownText_0x62105:
- text "The COLOSSEUM"
- line "upstairs is for"
- cont "link battles."
-
- para "Battle records are"
- line "posted on the"
-
- para "wall, so I can't"
- line "afford to lose."
- done
-
-UnknownText_0x62173:
- text "I came over here"
- line "when I got word"
-
- para "that GOLDENROD's"
- line "#MON CENTER has"
-
- para "new machines that"
- line "no one's ever seen"
- cont "before."
-
- para "But it looks like"
- line "they're still busy"
-
- para "with all their"
- line "preparations…"
- done
-
-UnknownText_0x62222:
- text "Just seeing all"
- line "these new things"
-
- para "here makes me feel"
- line "younger!"
- done
-
-UnknownText_0x62260:
- text "A higher level"
- line "#MON doesn't"
- cont "always win."
-
- para "After all, it may"
- line "have a type dis-"
- cont "advantage."
-
- para "I don't think"
- line "there is a single"
-
- para "#MON that is"
- line "the toughest."
- done
-
-UnknownText_0x622f0:
- text "<PLAYER>, isn't it?"
-
- para "Congratulations!"
-
- para "As a special deal,"
- line "a GS BALL has been"
- cont "sent just for you!"
-
- para "Please accept it!"
- done
-
-UnknownText_0x62359:
- text "Please do come"
- line "again!"
- done
-
-UnknownText_0x62370:
- text "#COM CENTER"
- line "1F INFORMATION"
-
- para "Left:"
- line "ADMINISTRATION"
-
- para "Center:"
- line "TRADE CORNER"
-
- para "Right:"
- line "#MON NEWS"
- done
-
-UnknownText_0x623c7:
- text "It's a #MON"
- line "NEWS MACHINE!"
-
- para "It's not in"
- line "operation yet…"
- done
-
-UnknownText_0x623fb:
- text "Oh my, your pack"
- line "looks so heavy!"
-
- para "Oh! Do you happen"
- line "to have something"
- cont "named EON MAIL?"
-
- para "My daughter is"
- line "after one."
-
- para "You can part with"
- line "one, can't you?"
- done
-
-UnknownText_0x6248c:
- text "Give away an EON"
- line "MAIL?"
- done
-
-UnknownText_0x624a4:
- text "Oh, that's great!"
- line "Thank you, honey!"
-
- para "Here, this is for"
- line "you in return!"
- done
-
-UnknownText_0x624e9:
- text "My daughter will"
- line "be delighted!"
- done
-
-UnknownText_0x62509:
- text "Oh? You don't have"
- line "one? Too bad."
- done
-
-UnknownText_0x6252a:
- text "Oh… Well, another"
- line "time, then."
- done
-
-UnknownText_0x62549:
- text "<PLAYER> gave away"
- line "the EON MAIL."
- done
-
-GoldenrodPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 4
- warp_def $7, $3, 15, GOLDENROD_CITY
- warp_def $7, $4, 15, GOLDENROD_CITY
- warp_def $6, $0, 1, GOLDENROD_POKECOM_CENTER_2F_MOBILE
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 2
- xy_trigger 0, $7, $3, $0, GoldenrodPokeCenter1F_GSBallTriggerLeft, $0, $0
- xy_trigger 0, $7, $4, $0, GoldenrodPokeCenter1F_GSBallTriggerRight, $0, $0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 5
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x60f91, -1
- person_event SPRITE_LINK_RECEPTIONIST, 8, 16, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ObjectEvent, -1
- person_event SPRITE_GAMEBOY_KID, 1, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, GameboyKidScript_0x6101e, -1
- person_event SPRITE_LASS, 4, 1, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LassScript_0x61021, -1
- person_event SPRITE_POKEFAN_F, 5, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x61024, -1
diff --git a/maps/GoldenrodPokeComCenter2FMobile.asm b/maps/GoldenrodPokeComCenter2FMobile.asm
index 56ae85b30..535ee02f8 100644
--- a/maps/GoldenrodPokeComCenter2FMobile.asm
+++ b/maps/GoldenrodPokeComCenter2FMobile.asm
@@ -4,20 +4,20 @@ const_value set 2
const GOLDENRODPOKECOMCENTER2FMOBILE_SCIENTIST3
GoldenrodPokeComCenter2FMobile_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-ScientistScript_0x625d1:
- jumptextfaceplayer UnknownText_0x62674
+GoldenrodPokeComCenter2FMobileScientist1Script:
+ jumptextfaceplayer GoldenrodPokeComCenter2FMobileScientist1Text
-ScientistScript_0x625d4:
- jumptextfaceplayer UnknownText_0x626f9
+GoldenrodPokeComCenter2FMobileScientist2Script:
+ jumptextfaceplayer GoldenrodPokeComCenter2FMobileScientist2Text
-ScientistScript_0x625d7:
- jumptextfaceplayer UnknownText_0x62795
+GoldenrodPokeComCenter2FMobileScientist3Script:
+ jumptextfaceplayer GoldenrodPokeComCenter2FMobileScientist3Text
MapGoldenrodPokeComCenter2FMobileSignpost0Script:
opentext
@@ -53,10 +53,10 @@ MenuDataHeader_0x62602:
db $40 ; flags
db 00, 00 ; start coords
db 08, 15 ; end coords
- dw MenuData2_0x6260a
+ dw .MenuData2
db 1 ; default option
-MenuData2_0x6260a:
+.MenuData2:
db $80 ; flags
db 3 ; items
db "# つうしん クラブ@" ; # COM CLUB
@@ -98,10 +98,10 @@ MenuDataHeader_0x6264c:
db $40 ; flags
db 00, 00 ; start coords
db 08, 15 ; end coords
- dw MenuData2_0x62654
+ dw .MenuData2
db 1 ; default option
-MenuData2_0x62654:
+.MenuData2:
db $80 ; flags
db 3 ; items
db "でんわ", $1f,"つかうとき@" ; Use phone
@@ -112,7 +112,7 @@ MenuData2_0x62654:
MapGoldenrodPokeComCenter2FMobileSignpost2Script:
jumptext UnknownText_0x62b26
-UnknownText_0x62674:
+GoldenrodPokeComCenter2FMobileScientist1Text:
text "#COM CENTER and"
line "MOBILE CENTER were"
@@ -126,7 +126,7 @@ UnknownText_0x62674:
line "strangers."
done
-UnknownText_0x626f9:
+GoldenrodPokeComCenter2FMobileScientist2Text:
text "When you linked"
line "with someone by"
@@ -143,7 +143,7 @@ UnknownText_0x626f9:
line "got the shakes!"
done
-UnknownText_0x62795:
+GoldenrodPokeComCenter2FMobileScientist3Text:
text "They were able to"
line "build this huge"
@@ -277,17 +277,17 @@ GoldenrodPokeComCenter2FMobile_MapEventHeader:
warp_def $1f, $0, 3, GOLDENROD_POKECENTER_1F
warp_def $1f, $1, 3, GOLDENROD_POKECENTER_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 26, 6, SIGNPOST_UP, MapGoldenrodPokeComCenter2FMobileSignpost0Script
- signpost 28, 6, SIGNPOST_UP, MapGoldenrodPokeComCenter2FMobileSignpost1Script
- signpost 26, 3, SIGNPOST_UP, MapGoldenrodPokeComCenter2FMobileSignpost2Script
+ bg_event 26, 6, BGEVENT_UP, MapGoldenrodPokeComCenter2FMobileSignpost0Script
+ bg_event 28, 6, BGEVENT_UP, MapGoldenrodPokeComCenter2FMobileSignpost1Script
+ bg_event 26, 3, BGEVENT_UP, MapGoldenrodPokeComCenter2FMobileSignpost2Script
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_SCIENTIST, 28, 4, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ScientistScript_0x625d1, -1
- person_event SPRITE_SCIENTIST, 27, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ScientistScript_0x625d4, -1
- person_event SPRITE_SCIENTIST, 29, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ScientistScript_0x625d7, -1
+ object_event SPRITE_SCIENTIST, 28, 4, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodPokeComCenter2FMobileScientist1Script, -1
+ object_event SPRITE_SCIENTIST, 27, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodPokeComCenter2FMobileScientist2Script, -1
+ object_event SPRITE_SCIENTIST, 29, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodPokeComCenter2FMobileScientist3Script, -1
diff --git a/maps/GoldenrodPokecenter1F.asm b/maps/GoldenrodPokecenter1F.asm
new file mode 100644
index 000000000..d44c1b01e
--- /dev/null
+++ b/maps/GoldenrodPokecenter1F.asm
@@ -0,0 +1,832 @@
+const_value set 2
+ const GOLDENRODPOKECENTER1F_NURSE
+ const GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
+ const GOLDENRODPOKECENTER1F_GAMEBOY_KID
+ const GOLDENRODPOKECENTER1F_LASS
+ const GOLDENRODPOKECENTER1F_POKEFAN_F
+
+GoldenrodPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x60f91:
+ jumpstd pokecenternurse
+
+GoldenrodPokecenter1F_GSBallSceneLeft:
+ writebyte BATTLETOWERACTION_CHECKMOBILEEVENT
+ special BattleTowerAction
+ if_equal MOBILE_EVENT_OBJECT_GS_BALL, .gsball
+ end
+
+.gsball
+ checkevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
+ iftrue .cancel
+ playsound SFX_EXIT_BUILDING
+ moveobject GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, $0, $7
+ disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
+ appear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
+ playmusic MUSIC_SHOW_ME_AROUND
+ applymovement GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, MovementData_0x6105a
+ spriteface PLAYER, UP
+ opentext
+ writetext UnknownText_0x622f0
+ waitbutton
+ verbosegiveitem GS_BALL
+ setevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
+ setevent EVENT_CAN_GIVE_GS_BALL_TO_KURT
+ writetext UnknownText_0x62359
+ waitbutton
+ closetext
+ applymovement GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, MovementData_0x61060
+ special RestartMapMusic
+ disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
+ playsound SFX_EXIT_BUILDING
+.cancel
+ end
+
+GoldenrodPokecenter1F_GSBallSceneRight:
+ writebyte BATTLETOWERACTION_CHECKMOBILEEVENT
+ special BattleTowerAction
+ if_equal MOBILE_EVENT_OBJECT_GS_BALL, .gsball
+ end
+
+.gsball
+ checkevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
+ iftrue .cancel
+ playsound SFX_EXIT_BUILDING
+ moveobject GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, $0, $7
+ disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
+ appear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
+ playmusic MUSIC_SHOW_ME_AROUND
+ applymovement GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, MovementData_0x61065
+ spriteface PLAYER, UP
+ opentext
+ writetext UnknownText_0x622f0
+ waitbutton
+ verbosegiveitem GS_BALL
+ setevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
+ setevent EVENT_CAN_GIVE_GS_BALL_TO_KURT
+ writetext UnknownText_0x62359
+ waitbutton
+ closetext
+ applymovement GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, MovementData_0x6106c
+ special RestartMapMusic
+ disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
+ playsound SFX_EXIT_BUILDING
+.cancel
+ end
+
+GoldenrodPokecenter1FGameboyKidScript:
+ jumptextfaceplayer GoldenrodPokecenter1FGameboyKidText
+
+GoldenrodPokecenter1FLassScript:
+ jumptextfaceplayer GoldenrodPokecenter1FLassText
+
+PokefanFScript_0x61024:
+ faceplayer
+ opentext
+ writetext UnknownText_0x623fb
+ waitbutton
+ writetext UnknownText_0x6248c
+ yesorno
+ iffalse UnknownScript_0x6104b
+ takeitem EON_MAIL
+ iffalse UnknownScript_0x6104b
+ writetext UnknownText_0x62549
+ waitbutton
+ writetext UnknownText_0x624a4
+ waitbutton
+ verbosegiveitem REVIVE
+ iffalse UnknownScript_0x61051
+ writetext UnknownText_0x624e9
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x6104b:
+ writetext UnknownText_0x62509
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x61051:
+ giveitem EON_MAIL
+ writetext UnknownText_0x6252a
+ waitbutton
+ closetext
+ end
+
+MovementData_0x6105a:
+ step UP
+ step RIGHT
+ step RIGHT
+ step RIGHT
+ turn_head DOWN
+ step_end
+
+MovementData_0x61060:
+ step LEFT
+ step LEFT
+ step LEFT
+ step DOWN
+ step_end
+
+MovementData_0x61065:
+ step UP
+ step RIGHT
+ step RIGHT
+ step RIGHT
+ step RIGHT
+ turn_head DOWN
+ step_end
+
+MovementData_0x6106c:
+ step LEFT
+ step LEFT
+ step LEFT
+ step LEFT
+ step DOWN
+ step_end
+
+; unused
+UnknownText_0x61072:
+ text "Hello! Welcome to"
+ line "#COM CENTER"
+ cont "TRADE CORNER."
+
+ para "You can trade"
+ line "#MON with other"
+ cont "people far away."
+ done
+
+UnknownText_0x610ce:
+ text "To make a trade,"
+ line "we must hold your"
+ cont "#MON."
+
+ para "Would you like to"
+ line "trade?"
+ done
+
+UnknownText_0x61111:
+ text "What kind of"
+ line "#MON do you"
+ cont "want in return?"
+ done
+
+UnknownText_0x6113b:
+ text "Fine. We will try"
+ line "to trade your"
+
+ para "@"
+ text_from_ram StringBuffer3
+ text " for"
+ line "@"
+ text_from_ram StringBuffer4
+ text "."
+
+ para "We'll have to hold"
+ line "your #MON"
+ cont "during the trade."
+
+ para "Please wait while"
+ line "we prepare the"
+ cont "room for it."
+ done
+
+UnknownText_0x611c9:
+ text "Fine. We will try"
+ line "to trade your"
+
+ para "@"
+ text_from_ram StringBuffer3
+ text " for a"
+ line "#MON that you"
+ cont "have never seen."
+
+ para "We'll have to hold"
+ line "your #MON"
+ cont "during the trade."
+
+ para "Please wait while"
+ line "we prepare the"
+ cont "room for it."
+ done
+
+UnknownText_0x61271:
+ text "Your trade #MON"
+ line "has been received."
+
+ para "It will take time"
+ line "to find a trade"
+
+ para "partner. Please"
+ line "come back later."
+ done
+
+UnknownText_0x612d8:
+ text "Oh? You have only"
+ line "one #MON in"
+ cont "your party. "
+
+ para "Please come back"
+ line "once you've in-"
+ cont "creased the size"
+ cont "of your party."
+ done
+
+UnknownText_0x61344:
+ text "We hope to see you"
+ line "again."
+ done
+
+UnknownText_0x6135f:
+ text "Communication"
+ line "error…"
+ done
+
+UnknownText_0x61375:
+ text "If we accept that"
+ line "#MON, what will"
+ cont "you battle with?"
+ done
+
+UnknownText_0x613a9:
+ text "Sorry. We can't"
+ line "accept an EGG."
+ done
+
+UnknownText_0x613c8:
+ text "Sorry, but your"
+ line "#MON appears to"
+
+ para "be abnormal. We"
+ line "can't accept it."
+ done
+
+UnknownText_0x61409:
+ text "Oh? Aren't we"
+ line "already holding a"
+ cont "#MON of yours?"
+ done
+
+UnknownText_0x61438:
+ text "We'll check the"
+ line "rooms."
+
+ para "Please wait."
+ done
+
+UnknownText_0x6145c:
+ text "Thank you for your"
+ line "patience."
+
+ para "A trade partner"
+ line "has been found."
+ done
+
+UnknownText_0x6149a:
+ text "It's your new"
+ line "partner."
+
+ para "Please take care"
+ line "of it with love."
+
+ para "We hope to see you"
+ line "again."
+ done
+
+UnknownText_0x614ed:
+ text "Uh-oh. Your party"
+ line "is already full."
+
+ para "Please come back"
+ line "when you have room"
+ cont "in your party."
+ done
+
+UnknownText_0x61544:
+ text "It's unfortunate,"
+ line "but no one has"
+
+ para "come forward as a"
+ line "trade partner."
+
+ para "Would you like"
+ line "your #MON back?"
+ done
+
+UnknownText_0x615a5:
+ text "We have returned"
+ line "your #MON."
+ done
+
+UnknownText_0x615c2:
+ text "It's unfortunate,"
+ line "but no one has"
+
+ para "come forward as a"
+ line "trade partner."
+
+ para "We've held your"
+ line "#MON for a long"
+
+ para "time. As a result,"
+ line "it is very lonely."
+
+ para "Sorry, but we must"
+ line "return it to you."
+ done
+
+UnknownText_0x6166e:
+ text "We hope to see you"
+ line "again."
+ done
+
+UnknownText_0x61689:
+ text "Fine. We will"
+ line "continue to hold"
+ cont "your #MON."
+ done
+
+UnknownText_0x616b4:
+ text "Oh? You left your"
+ line "#MON with us"
+ cont "only recently."
+
+ para "Please come back"
+ line "later."
+ done
+
+UnknownText_0x616fb:
+ text "We'll SAVE before"
+ line "connecting to the"
+ cont "CENTER."
+ done
+
+UnknownText_0x61727:
+ text "Which #MON do"
+ line "you want to trade?"
+ done
+
+UnknownText_0x61749:
+ text "Sorry, but we must"
+ line "cancel the trade."
+ done
+
+UnknownText_0x6176f:
+ text "Oh!"
+
+ para "I see you have an"
+ line "EGG TICKET!"
+
+ para "It's a coupon that"
+ line "special people can"
+
+ para "redeem for a"
+ line "special #MON!"
+ done
+
+UnknownText_0x617d2:
+ text "Let me give you a"
+ line "quick briefing."
+
+ para "Trades held at the"
+ line "TRADE CORNER are"
+
+ para "between two"
+ line "trainers who don't"
+
+ para "know each other's"
+ line "identity."
+
+ para "As a result, it"
+ line "may take time."
+
+ para "However, an ODD"
+ line "EGG is available"
+ cont "just for you."
+
+ para "It will be sent to"
+ line "you right away."
+
+ para "Please choose one"
+ line "of the rooms in"
+
+ para "the CENTER."
+ line "An ODD EGG will be"
+
+ para "sent from the"
+ line "chosen room."
+ done
+
+UnknownText_0x6191f:
+ text "Please wait a"
+ line "moment."
+ done
+
+UnknownText_0x61936:
+ text "Thank you for"
+ line "waiting."
+
+ para "We received your"
+ line "ODD EGG."
+
+ para "Here it is!"
+
+ para "Please raise it"
+ line "with loving care."
+ done
+
+UnknownText_0x61996:
+ text "I'm awfully sorry."
+
+ para "The EGG TICKET"
+ line "exchange service"
+ cont "isn't running now."
+ done
+
+UnknownText_0x619db:
+ text "It's a #MON"
+ line "NEWS MACHINE."
+ done
+
+UnknownText_0x619f5:
+ text "What would you"
+ line "like to do?"
+ done
+
+UnknownText_0x61a11:
+ text "#MON NEWS is"
+ line "news compiled from"
+
+ para "the SAVE files of"
+ line "#MON trainers."
+
+ para "When reading the"
+ line "NEWS, your SAVE"
+
+ para "file may be sent"
+ line "out."
+
+ para "The SAVE file data"
+ line "will contain your"
+
+ para "adventure log and"
+ line "mobile profile."
+
+ para "Your phone number"
+ line "will not be sent."
+
+ para "The contents of"
+ line "the NEWS will vary"
+
+ para "depending on the"
+ line "SAVE files sent by"
+
+ para "you and the other"
+ line "#MON trainers."
+
+ para "You might even be"
+ line "in the NEWS!"
+ done
+
+UnknownText_0x61b7c:
+ text "Would you like to"
+ line "get the NEWS?"
+ done
+
+UnknownText_0x61b9d:
+ text "Reading the latest"
+ line "NEWS… Please wait."
+ done
+
+UnknownText_0x61bc4:
+ text "There is no old"
+ line "NEWS…"
+ done
+
+UnknownText_0x61bdb:
+ text "The NEWS data is"
+ line "corrupted."
+
+ para "Please download"
+ line "the NEWS again."
+ done
+
+UnknownText_0x61c18:
+ text "We're making"
+ line "preparations."
+
+ para "Please come back"
+ line "later."
+ done
+
+UnknownText_0x61c4b:
+ text "We will SAVE your"
+ line "progress before"
+
+ para "starting the NEWS"
+ line "MACHINE."
+ done
+
+UnknownText_0x61c89:
+ text "Whoa, this #MON"
+ line "CENTER is huge."
+
+ para "They just built"
+ line "this place. They"
+
+ para "installed lots of"
+ line "new machines too."
+ done
+
+UnknownText_0x61cef:
+ text "I thought up a fun"
+ line "new thing for the"
+ cont "TRADE CORNER!"
+
+ para "I make a PIDGEY"
+ line "hold MAIL, then"
+
+ para "put it up for"
+ line "trade for another"
+ cont "one!"
+
+ para "If everyone did"
+ line "that, MAIL could"
+
+ para "be traded with all"
+ line "sorts of people!"
+
+ para "I call it PIDGEY"
+ line "MAIL!"
+
+ para "If it becomes"
+ line "popular, I might"
+
+ para "make lots of new"
+ line "friends!"
+ done
+
+UnknownText_0x61dfd:
+ text "They said you can"
+ line "trade #MON with"
+
+ para "total strangers up"
+ line "here."
+
+ para "But they're still"
+ line "adjusting things."
+ done
+
+UnknownText_0x61e5c:
+ text "Some girl I don't"
+ line "know sent me her"
+
+ para "HOPPIP."
+ line "You should trade"
+
+ para "for a #MON that"
+ line "you want."
+ done
+
+UnknownText_0x61eb2:
+ text "I received a"
+ line "female HOPPIP, but"
+ cont "its named STANLEY!"
+
+ para "That's my dad's"
+ line "name!"
+ done
+
+UnknownText_0x61efa:
+ text "What is the NEWS"
+ line "MACHINE?"
+
+ para "Does it get news"
+ line "from a wider area"
+ cont "than the radio?"
+ done
+
+UnknownText_0x61f48:
+ text "The #COM CENTER"
+ line "will link with all"
+
+ para "#MON CENTERS in"
+ line "a wireless net."
+
+ para "That must mean"
+ line "I'll be able to"
+
+ para "link with all"
+ line "sorts of people."
+ done
+
+UnknownText_0x61fc9:
+ text "The machines here"
+ line "can't be used yet."
+
+ para "Still, it's nice"
+ line "coming to a trendy"
+
+ para "place before other"
+ line "people."
+ done
+
+UnknownText_0x6202c:
+ text "My friend was in"
+ line "the NEWS a while"
+
+ para "back. I was really"
+ line "surprised!"
+ done
+
+UnknownText_0x6206d:
+ text "I get anxious if I"
+ line "don't check out"
+ cont "the latest NEWS!"
+ done
+
+UnknownText_0x620a1:
+ text "If I get in the"
+ line "NEWS and become"
+
+ para "famous, I bet I'll"
+ line "be adored."
+
+ para "I wonder how I"
+ line "could get in the"
+ cont "NEWS?"
+ done
+
+GoldenrodPokecenter1FGameboyKidText:
+ text "The COLOSSEUM"
+ line "upstairs is for"
+ cont "link battles."
+
+ para "Battle records are"
+ line "posted on the"
+
+ para "wall, so I can't"
+ line "afford to lose."
+ done
+
+UnknownText_0x62173:
+ text "I came over here"
+ line "when I got word"
+
+ para "that GOLDENROD's"
+ line "#MON CENTER has"
+
+ para "new machines that"
+ line "no one's ever seen"
+ cont "before."
+
+ para "But it looks like"
+ line "they're still busy"
+
+ para "with all their"
+ line "preparations…"
+ done
+
+UnknownText_0x62222:
+ text "Just seeing all"
+ line "these new things"
+
+ para "here makes me feel"
+ line "younger!"
+ done
+
+GoldenrodPokecenter1FLassText:
+ text "A higher level"
+ line "#MON doesn't"
+ cont "always win."
+
+ para "After all, it may"
+ line "have a type dis-"
+ cont "advantage."
+
+ para "I don't think"
+ line "there is a single"
+
+ para "#MON that is"
+ line "the toughest."
+ done
+
+UnknownText_0x622f0:
+ text "<PLAYER>, isn't it?"
+
+ para "Congratulations!"
+
+ para "As a special deal,"
+ line "a GS BALL has been"
+ cont "sent just for you!"
+
+ para "Please accept it!"
+ done
+
+UnknownText_0x62359:
+ text "Please do come"
+ line "again!"
+ done
+
+UnknownText_0x62370:
+ text "#COM CENTER"
+ line "1F INFORMATION"
+
+ para "Left:"
+ line "ADMINISTRATION"
+
+ para "Center:"
+ line "TRADE CORNER"
+
+ para "Right:"
+ line "#MON NEWS"
+ done
+
+UnknownText_0x623c7:
+ text "It's a #MON"
+ line "NEWS MACHINE!"
+
+ para "It's not in"
+ line "operation yet…"
+ done
+
+UnknownText_0x623fb:
+ text "Oh my, your pack"
+ line "looks so heavy!"
+
+ para "Oh! Do you happen"
+ line "to have something"
+ cont "named EON MAIL?"
+
+ para "My daughter is"
+ line "after one."
+
+ para "You can part with"
+ line "one, can't you?"
+ done
+
+UnknownText_0x6248c:
+ text "Give away an EON"
+ line "MAIL?"
+ done
+
+UnknownText_0x624a4:
+ text "Oh, that's great!"
+ line "Thank you, honey!"
+
+ para "Here, this is for"
+ line "you in return!"
+ done
+
+UnknownText_0x624e9:
+ text "My daughter will"
+ line "be delighted!"
+ done
+
+UnknownText_0x62509:
+ text "Oh? You don't have"
+ line "one? Too bad."
+ done
+
+UnknownText_0x6252a:
+ text "Oh… Well, another"
+ line "time, then."
+ done
+
+UnknownText_0x62549:
+ text "<PLAYER> gave away"
+ line "the EON MAIL."
+ done
+
+GoldenrodPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 4
+ warp_def $7, $3, 15, GOLDENROD_CITY
+ warp_def $7, $4, 15, GOLDENROD_CITY
+ warp_def $6, $0, 1, GOLDENROD_POKECOM_CENTER_2F_MOBILE
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 2
+ coord_event 0, $7, $3, GoldenrodPokecenter1F_GSBallSceneLeft
+ coord_event 0, $7, $4, GoldenrodPokecenter1F_GSBallSceneRight
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 5
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x60f91, -1
+ object_event SPRITE_LINK_RECEPTIONIST, 8, 16, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1
+ object_event SPRITE_GAMEBOY_KID, 1, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodPokecenter1FGameboyKidScript, -1
+ object_event SPRITE_LASS, 4, 1, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodPokecenter1FLassScript, -1
+ object_event SPRITE_POKEFAN_F, 5, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, PokefanFScript_0x61024, -1
diff --git a/maps/GoldenrodUnderground.asm b/maps/GoldenrodUnderground.asm
new file mode 100644
index 000000000..49bcdd88c
--- /dev/null
+++ b/maps/GoldenrodUnderground.asm
@@ -0,0 +1,683 @@
+const_value set 2
+ const GOLDENRODUNDERGROUND_SUPER_NERD1
+ const GOLDENRODUNDERGROUND_SUPER_NERD2
+ const GOLDENRODUNDERGROUND_SUPER_NERD3
+ const GOLDENRODUNDERGROUND_SUPER_NERD4
+ const GOLDENRODUNDERGROUND_POKE_BALL
+ const GOLDENRODUNDERGROUND_GRAMPS
+ const GOLDENRODUNDERGROUND_SUPER_NERD5
+ const GOLDENRODUNDERGROUND_SUPER_NERD6
+ const GOLDENRODUNDERGROUND_GRANNY
+
+GoldenrodUnderground_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 3
+ dbw MAPCALLBACK_NEWMAP, .ResetSwitches
+ dbw MAPCALLBACK_TILES, .CheckBasementKey
+ dbw MAPCALLBACK_OBJECTS, .CheckDayOfWeek
+
+.ResetSwitches:
+ clearevent EVENT_SWITCH_1
+ clearevent EVENT_SWITCH_2
+ clearevent EVENT_SWITCH_3
+ clearevent EVENT_EMERGENCY_SWITCH
+ clearevent EVENT_SWITCH_4
+ clearevent EVENT_SWITCH_5
+ clearevent EVENT_SWITCH_6
+ clearevent EVENT_SWITCH_7
+ clearevent EVENT_SWITCH_8
+ clearevent EVENT_SWITCH_9
+ clearevent EVENT_SWITCH_10
+ clearevent EVENT_SWITCH_11
+ clearevent EVENT_SWITCH_12
+ clearevent EVENT_SWITCH_13
+ clearevent EVENT_SWITCH_14
+ writebyte $0
+ copyvartobyte UndergroundSwitchPositions
+ return
+
+.CheckBasementKey:
+ checkevent EVENT_USED_BASEMENT_KEY
+ iffalse .LockBasementDoor
+ return
+
+.LockBasementDoor:
+ changeblock $12, $6, $3d
+ return
+
+.CheckDayOfWeek:
+ checkcode VAR_WEEKDAY
+ if_equal MONDAY, .Monday
+ if_equal TUESDAY, .Tuesday
+ if_equal WEDNESDAY, .Wednesday
+ if_equal THURSDAY, .Thursday
+ if_equal FRIDAY, .Friday
+ if_equal SATURDAY, .Saturday
+
+.Sunday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD5
+ appear GOLDENRODUNDERGROUND_SUPER_NERD6
+ appear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+.Monday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ checkmorn
+ iffalse .NotMondayMorning
+ appear GOLDENRODUNDERGROUND_GRAMPS
+.NotMondayMorning:
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD5
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD6
+ disappear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+.Tuesday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ appear GOLDENRODUNDERGROUND_SUPER_NERD5
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD6
+ disappear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+.Wednesday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD5
+ appear GOLDENRODUNDERGROUND_SUPER_NERD6
+ disappear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+.Thursday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ appear GOLDENRODUNDERGROUND_SUPER_NERD5
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD6
+ disappear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+.Friday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD5
+ appear GOLDENRODUNDERGROUND_SUPER_NERD6
+ disappear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+.Saturday:
+ disappear GOLDENRODUNDERGROUND_GRAMPS
+ appear GOLDENRODUNDERGROUND_SUPER_NERD5
+ disappear GOLDENRODUNDERGROUND_SUPER_NERD6
+ appear GOLDENRODUNDERGROUND_GRANNY
+ return
+
+TrainerSupernerdEric:
+ trainer EVENT_BEAT_SUPER_NERD_ERIC, SUPER_NERD, ERIC, SupernerdEricSeenText, SupernerdEricBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext SupernerdEricAfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerSupernerdTeru:
+ trainer EVENT_BEAT_SUPER_NERD_TERU, SUPER_NERD, TERU, SupernerdTeruSeenText, SupernerdTeruBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext SupernerdTeruAfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerPokemaniacIssac:
+ trainer EVENT_BEAT_POKEMANIAC_ISSAC, POKEMANIAC, ISSAC, PokemaniacIssacSeenText, PokemaniacIssacBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext PokemaniacIssacAfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerPokemaniacDonald:
+ trainer EVENT_BEAT_POKEMANIAC_DONALD, POKEMANIAC, DONALD, PokemaniacDonaldSeenText, PokemaniacDonaldBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext PokemaniacDonaldAfterBattleText
+ waitbutton
+ closetext
+ end
+
+GrannyScript_0x7c132:
+ opentext
+ checkcode VAR_WEEKDAY
+ if_equal SUNDAY, .Open
+ if_equal SATURDAY, .Open
+ jump GoldenrodUndergroundScript_ShopClosed
+
+.Open:
+ pokemart MARTTYPE_BITTER, MART_UNDERGROUND
+ closetext
+ end
+
+GrampsScript_0x7c146:
+ opentext
+ checkflag ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED
+ iftrue GoldenrodUndergroundScript_ShopClosed
+ checkcode VAR_WEEKDAY
+ if_equal MONDAY, .CheckMorn
+ jump GoldenrodUndergroundScript_ShopClosed
+
+.CheckMorn:
+ checkmorn
+ iffalse GoldenrodUndergroundScript_ShopClosed
+ pokemart MARTTYPE_BARGAIN, 0
+ closetext
+ end
+
+OlderHaircutBrotherScript:
+ opentext
+ checkcode VAR_WEEKDAY
+ if_equal TUESDAY, .DoHaircut
+ if_equal THURSDAY, .DoHaircut
+ if_equal SATURDAY, .DoHaircut
+ jump GoldenrodUndergroundScript_ShopClosed
+
+.DoHaircut:
+ checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
+ iftrue .AlreadyGotHaircut
+ special PlaceMoneyTopRight
+ writetext UnknownText_0x7c5f9
+ yesorno
+ iffalse .Refused
+ checkmoney $0, 500
+ if_equal $2, .NotEnoughMoney
+ writetext UnknownText_0x7c69a
+ buttonsound
+ special Special_YoungerHaircutBrother
+ if_equal $0, .Refused
+ if_equal $1, .Refused
+ setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
+ if_equal $2, .two
+ if_equal $3, .three
+ jump .else
+
+.two
+ setevent EVENT_GAVE_KURT_APRICORNS
+ clearevent EVENT_RECEIVED_BALLS_FROM_KURT
+ clearevent EVENT_DRAGON_SHRINE_QUESTION_2
+ jump .then
+
+.three
+ clearevent EVENT_GAVE_KURT_APRICORNS
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
+ clearevent EVENT_DRAGON_SHRINE_QUESTION_2
+ jump .then
+
+.else
+ clearevent EVENT_GAVE_KURT_APRICORNS
+ clearevent EVENT_RECEIVED_BALLS_FROM_KURT
+ setevent EVENT_DRAGON_SHRINE_QUESTION_2
+ jump .then
+
+.then
+ takemoney $0, 500
+ special PlaceMoneyTopRight
+ writetext UnknownText_0x7c6b8
+ waitbutton
+ closetext
+ special FadeOutPalettes
+ playmusic MUSIC_HEAL
+ pause 60
+ special FadeInPalettes
+ special RestartMapMusic
+ opentext
+ writetext UnknownText_0x7c6d8
+ waitbutton
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iftrue UnknownScript_0x7c2bb
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
+ iftrue UnknownScript_0x7c2c4
+ jump UnknownScript_0x7c2cd
+
+.Refused:
+ writetext UnknownText_0x7c6ea
+ waitbutton
+ closetext
+ end
+
+.NotEnoughMoney:
+ writetext UnknownText_0x7c709
+ waitbutton
+ closetext
+ end
+
+.AlreadyGotHaircut:
+ writetext UnknownText_0x7c72b
+ waitbutton
+ closetext
+ end
+
+YoungerHaircutBrotherScript:
+ opentext
+ checkcode VAR_WEEKDAY
+ if_equal SUNDAY, .DoHaircut
+ if_equal WEDNESDAY, .DoHaircut
+ if_equal FRIDAY, .DoHaircut
+ jump GoldenrodUndergroundScript_ShopClosed
+
+.DoHaircut:
+ checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
+ iftrue .AlreadyGotHaircut
+ special PlaceMoneyTopRight
+ writetext UnknownText_0x7c75c
+ yesorno
+ iffalse .Refused
+ checkmoney $0, 300
+ if_equal $2, .NotEnoughMoney
+ writetext UnknownText_0x7c7f1
+ buttonsound
+ special Special_OlderHaircutBrother
+ if_equal $0, .Refused
+ if_equal $1, .Refused
+ setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
+ if_equal $2, .two
+ if_equal $3, .three
+ jump .else
+
+.two
+ setevent EVENT_GAVE_KURT_APRICORNS
+ clearevent EVENT_RECEIVED_BALLS_FROM_KURT
+ clearevent EVENT_DRAGON_SHRINE_QUESTION_2
+ jump .then
+
+.three
+ clearevent EVENT_GAVE_KURT_APRICORNS
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
+ clearevent EVENT_DRAGON_SHRINE_QUESTION_2
+ jump .then
+
+.else
+ clearevent EVENT_GAVE_KURT_APRICORNS
+ clearevent EVENT_RECEIVED_BALLS_FROM_KURT
+ setevent EVENT_DRAGON_SHRINE_QUESTION_2
+ jump .then
+
+.then
+ takemoney $0, 300
+ special PlaceMoneyTopRight
+ writetext UnknownText_0x7c80e
+ waitbutton
+ closetext
+ special FadeOutPalettes
+ playmusic MUSIC_HEAL
+ pause 60
+ special FadeInPalettes
+ special RestartMapMusic
+ opentext
+ writetext UnknownText_0x7c82a
+ waitbutton
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iftrue UnknownScript_0x7c2bb
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
+ iftrue UnknownScript_0x7c2c4
+ jump UnknownScript_0x7c2cd
+
+.Refused:
+ writetext UnknownText_0x7c842
+ waitbutton
+ closetext
+ end
+
+.NotEnoughMoney:
+ writetext UnknownText_0x7c85b
+ waitbutton
+ closetext
+ end
+
+.AlreadyGotHaircut:
+ writetext UnknownText_0x7c87b
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x7c2bb:
+ writetext HaircutBrosText_SlightlyHappier
+ special PlayCurMonCry
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x7c2c4:
+ writetext HaircutBrosText_Happier
+ special PlayCurMonCry
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x7c2cd:
+ writetext HaircutBrosText_MuchHappier
+ special PlayCurMonCry
+ waitbutton
+ closetext
+ end
+
+BasementDoorScript::
+ opentext
+ checkevent EVENT_USED_BASEMENT_KEY
+ iftrue .Open
+ checkitem BASEMENT_KEY
+ iftrue .Unlock
+ writetext UnknownText_0x7c5b0
+ waitbutton
+ closetext
+ end
+
+.Unlock:
+ playsound SFX_TRANSACTION
+ writetext UnknownText_0x7c5d6
+ waitbutton
+ closetext
+ changeblock $12, $6, $2e
+ reloadmappart
+ closetext
+ setevent EVENT_USED_BASEMENT_KEY
+ end
+
+.Open:
+ writetext UnknownText_0x7c5c3
+ waitbutton
+ closetext
+ end
+
+GoldenrodUndergroundScript_ShopClosed:
+ writetext UnknownText_0x7c904
+ waitbutton
+ closetext
+ end
+
+GoldenrodUndergroundCoinCase:
+ itemball COIN_CASE
+
+MapGoldenrodUndergroundSignpost1Script:
+ jumptext UnknownText_0x7c91a
+
+GoldenrodUndergroundHiddenParlyzHeal:
+ dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_PARLYZ_HEAL, PARLYZ_HEAL
+
+GoldenrodUndergroundHiddenSuperPotion:
+ dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_SUPER_POTION, SUPER_POTION
+
+GoldenrodUndergroundHiddenAntidote:
+ dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_ANTIDOTE, ANTIDOTE
+
+SupernerdEricSeenText:
+ text "I got booted out"
+ line "of the GAME COR-"
+ cont "NER."
+
+ para "I was trying to"
+ line "cheat using my"
+ cont "#MON…"
+ done
+
+SupernerdEricBeatenText:
+ text "…Grumble…"
+ done
+
+SupernerdEricAfterBattleText:
+ text "I guess I have to"
+ line "do things fair and"
+ cont "square…"
+ done
+
+SupernerdTeruSeenText:
+ text "Do you consider"
+ line "type alignments in"
+ cont "battle?"
+
+ para "If you know your"
+ line "type advantages,"
+
+ para "you'll do better"
+ line "in battle."
+ done
+
+SupernerdTeruBeatenText:
+ text "Ow, ow, ow!"
+ done
+
+SupernerdTeruAfterBattleText:
+ text "I know my #MON"
+ line "type alignments."
+
+ para "But I only use one"
+ line "type of #MON."
+ done
+
+PokemaniacIssacSeenText:
+ text "My #MON just"
+ line "got a haircut!"
+
+ para "I'll show you how"
+ line "strong it is!"
+ done
+
+PokemaniacIssacBeatenText:
+ text "Aiyeeee!"
+ done
+
+PokemaniacIssacAfterBattleText:
+ text "Your #MON will"
+ line "like you more if"
+
+ para "you give them"
+ line "haircuts."
+ done
+
+PokemaniacDonaldSeenText:
+ text "I think you have"
+ line "some rare #MON"
+ cont "with you."
+
+ para "Let me see them!"
+ done
+
+PokemaniacDonaldBeatenText:
+ text "Gaah! I lost!"
+ line "That makes me mad!"
+ done
+
+PokemaniacDonaldAfterBattleText:
+ text "Are you making a"
+ line "#DEX? Here's a"
+ cont "hot tip."
+
+ para "The HIKER on ROUTE"
+ line "33, ANTHONY, is a"
+ cont "good guy."
+
+ para "He'll phone you if"
+ line "he sees any rare"
+ cont "#MON."
+ done
+
+UnknownText_0x7c5b0:
+ text "The door's locked…"
+ done
+
+UnknownText_0x7c5c3:
+ text "The door is open."
+ done
+
+UnknownText_0x7c5d6:
+ text "The BASEMENT KEY"
+ line "opened the door."
+ done
+
+UnknownText_0x7c5f9:
+ text "Welcome!"
+
+ para "I run the #MON"
+ line "SALON!"
+
+ para "I'm the older and"
+ line "better of the two"
+ cont "HAIRCUT BROTHERS."
+
+ para "I can make your"
+ line "#MON beautiful"
+ cont "for just ¥500."
+
+ para "Would you like me"
+ line "to do that?"
+ done
+
+UnknownText_0x7c69a:
+ text "Which #MON"
+ line "should I work on?"
+ done
+
+UnknownText_0x7c6b8:
+ text "OK! Watch it"
+ line "become beautiful!"
+ done
+
+UnknownText_0x7c6d8:
+ text "There! All done!"
+ done
+
+UnknownText_0x7c6ea:
+ text "Is that right?"
+ line "That's a shame!"
+ done
+
+UnknownText_0x7c709:
+ text "You'll need more"
+ line "money than that."
+ done
+
+UnknownText_0x7c72b:
+ text "I do only one"
+ line "haircut a day. I'm"
+ cont "done for today."
+ done
+
+UnknownText_0x7c75c:
+ text "Welcome to the"
+ line "#MON SALON!"
+
+ para "I'm the younger"
+ line "and less expen-"
+ cont "sive of the two"
+ cont "HAIRCUT BROTHERS."
+
+ para "I'll spiff up your"
+ line "#MON for just"
+ cont "¥300."
+
+ para "So? How about it?"
+ done
+
+UnknownText_0x7c7f1:
+ text "OK, which #MON"
+ line "should I do?"
+ done
+
+UnknownText_0x7c80e:
+ text "OK! I'll make it"
+ line "look cool!"
+ done
+
+UnknownText_0x7c82a:
+ text "There we go!"
+ line "All done!"
+ done
+
+UnknownText_0x7c842:
+ text "No? "
+ line "How disappointing!"
+ done
+
+UnknownText_0x7c85b:
+ text "You're a little"
+ line "short on funds."
+ done
+
+UnknownText_0x7c87b:
+ text "I can do only one"
+ line "haircut a day."
+
+ para "Sorry, but I'm all"
+ line "done for today."
+ done
+
+HaircutBrosText_SlightlyHappier:
+ text_from_ram StringBuffer3
+ text " looks a"
+ line "little happier."
+ done
+
+HaircutBrosText_Happier:
+ text_from_ram StringBuffer3
+ text " looks"
+ line "happy."
+ done
+
+HaircutBrosText_MuchHappier:
+ text_from_ram StringBuffer3
+ text " looks"
+ line "delighted!"
+ done
+
+UnknownText_0x7c904:
+ text "We're not open"
+ line "today."
+ done
+
+UnknownText_0x7c91a:
+ text "NO ENTRY BEYOND"
+ line "THIS POINT"
+ done
+
+GoldenrodUnderground_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 6
+ warp_def $2, $3, 7, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
+ warp_def $22, $3, 4, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
+ warp_def $6, $12, 4, GOLDENROD_UNDERGROUND
+ warp_def $1f, $15, 3, GOLDENROD_UNDERGROUND
+ warp_def $1f, $16, 3, GOLDENROD_UNDERGROUND
+ warp_def $1b, $16, 1, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 5
+ bg_event 6, 18, BGEVENT_READ, BasementDoorScript
+ bg_event 6, 19, BGEVENT_READ, MapGoldenrodUndergroundSignpost1Script
+ bg_event 13, 6, BGEVENT_ITEM, GoldenrodUndergroundHiddenParlyzHeal
+ bg_event 18, 4, BGEVENT_ITEM, GoldenrodUndergroundHiddenSuperPotion
+ bg_event 8, 17, BGEVENT_ITEM, GoldenrodUndergroundHiddenAntidote
+
+.ObjectEvents:
+ db 9
+ object_event SPRITE_SUPER_NERD, 31, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerSupernerdEric, -1
+ object_event SPRITE_SUPER_NERD, 9, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerSupernerdTeru, -1
+ object_event SPRITE_SUPER_NERD, 27, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerPokemaniacIssac, -1
+ object_event SPRITE_SUPER_NERD, 6, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacDonald, -1
+ object_event SPRITE_POKE_BALL, 25, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundCoinCase, EVENT_GOLDENROD_UNDERGROUND_COIN_CASE
+ object_event SPRITE_GRAMPS, 11, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GrampsScript_0x7c146, EVENT_GOLDENROD_UNDERGROUND_GRAMPS
+ object_event SPRITE_SUPER_NERD, 14, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OlderHaircutBrotherScript, EVENT_GOLDENROD_UNDERGROUND_OLDER_HAIRCUT_BROTHER
+ object_event SPRITE_SUPER_NERD, 15, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, YoungerHaircutBrotherScript, EVENT_GOLDENROD_UNDERGROUND_YOUNGER_HAIRCUT_BROTHER
+ object_event SPRITE_GRANNY, 21, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GrannyScript_0x7c132, EVENT_GOLDENROD_UNDERGROUND_GRANNY
diff --git a/maps/WarehouseEntrance.blk b/maps/GoldenrodUnderground.blk
index e3d0b95be..e3d0b95be 100644
--- a/maps/WarehouseEntrance.blk
+++ b/maps/GoldenrodUnderground.blk
diff --git a/maps/GoldenrodUndergroundSwitchRoomEntrances.asm b/maps/GoldenrodUndergroundSwitchRoomEntrances.asm
new file mode 100644
index 000000000..d27b6ff85
--- /dev/null
+++ b/maps/GoldenrodUndergroundSwitchRoomEntrances.asm
@@ -0,0 +1,974 @@
+UNDERGROUND_DOOR_CLOSED1 EQU $2a
+UNDERGROUND_DOOR_CLOSED2 EQU $3e
+UNDERGROUND_DOOR_CLOSED3 EQU $3f
+UNDERGROUND_DOOR_OPEN1 EQU $2d
+UNDERGROUND_DOOR_OPEN2 EQU $3d
+
+ugdoor: macro
+\1_YCOORD EQU \2
+\1_XCOORD EQU \3
+endm
+
+ ugdoor UGDOOR_1, $10, $06
+ ugdoor UGDOOR_2, $0a, $06
+ ugdoor UGDOOR_3, $02, $06
+ ugdoor UGDOOR_4, $02, $0a
+ ugdoor UGDOOR_5, $0a, $0a
+ ugdoor UGDOOR_6, $10, $0a
+ ugdoor UGDOOR_7, $0c, $06
+ ugdoor UGDOOR_8, $0c, $08
+ ugdoor UGDOOR_9, $06, $06
+ ugdoor UGDOOR_10, $06, $08
+ ugdoor UGDOOR_11, $0c, $0a
+ ugdoor UGDOOR_12, $0c, $0c
+ ugdoor UGDOOR_13, $06, $0a
+ ugdoor UGDOOR_14, $06, $0c
+ ugdoor UGDOOR_15, $12, $0a
+ ugdoor UGDOOR_16, $12, $0c
+
+doorstate: macro
+ changeblock UGDOOR_\1_YCOORD, UGDOOR_\1_XCOORD, UNDERGROUND_DOOR_\2
+endm
+
+const_value set 2
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_PHARMACIST1
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_PHARMACIST2
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET1
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET2
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET3
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET_GIRL
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_TEACHER
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SUPER_NERD
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_POKE_BALL1
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_POKE_BALL2
+ const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+
+GoldenrodUndergroundSwitchRoomEntrances_MapScriptHeader:
+.SceneScripts:
+ db 2
+ scene_script .DummyScene0
+ scene_script .DummyScene1
+
+.MapCallbacks:
+ db 1
+ dbw MAPCALLBACK_TILES, .UpdateDoorPositions
+
+.DummyScene0:
+ end
+
+.DummyScene1:
+ end
+
+.UpdateDoorPositions:
+ checkevent EVENT_SWITCH_4
+ iffalse .false4
+ doorstate 1, OPEN1
+.false4
+ checkevent EVENT_SWITCH_5
+ iffalse .false5
+ doorstate 2, OPEN1
+.false5
+ checkevent EVENT_SWITCH_6
+ iffalse .false6
+ doorstate 3, OPEN1
+.false6
+ checkevent EVENT_SWITCH_7
+ iffalse .false7
+ doorstate 4, OPEN1
+.false7
+ checkevent EVENT_SWITCH_8
+ iffalse .false8
+ doorstate 5, OPEN1
+.false8
+ checkevent EVENT_SWITCH_9
+ iffalse .false9
+ doorstate 6, OPEN1
+.false9
+ checkevent EVENT_SWITCH_10
+ iffalse .false10
+ doorstate 7, CLOSED1
+ doorstate 8, OPEN1
+.false10
+ checkevent EVENT_SWITCH_11
+ iffalse .false11
+ doorstate 9, CLOSED1
+ doorstate 10, OPEN1
+.false11
+ checkevent EVENT_SWITCH_12
+ iffalse .false12
+ doorstate 11, CLOSED1
+ doorstate 12, OPEN1
+.false12
+ checkevent EVENT_SWITCH_13
+ iffalse .false13
+ doorstate 13, CLOSED1
+ doorstate 14, OPEN1
+.false13
+ checkevent EVENT_SWITCH_14
+ iffalse .false14
+ doorstate 15, CLOSED1
+ doorstate 16, OPEN1
+.false14
+ return
+
+SuperNerdScript_0x7ca7a:
+ jumptextfaceplayer GoldenrodUndergroundSwitchRoomEntrances_SuperNerdText
+
+TeacherScript_0x7ca7d:
+ jumptextfaceplayer GoldenrodUndergroundSwitchRoomEntrances_TeacherText
+
+UndergroundSilverScene1:
+ spriteface PLAYER, RIGHT
+ showemote EMOTE_SHOCK, PLAYER, 15
+ special Special_FadeOutMusic
+ pause 15
+ playsound SFX_EXIT_BUILDING
+ appear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ waitsfx
+ applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER, UndergroundSilverApproachMovement1
+ spriteface PLAYER, RIGHT
+ scall UndergroundSilverBattleScript
+ applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER, UndergroundSilverRetreatMovement1
+ playsound SFX_EXIT_BUILDING
+ disappear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ setscene 1
+ waitsfx
+ playmapmusic
+ end
+
+UndergroundSilverScene2:
+ spriteface PLAYER, RIGHT
+ showemote EMOTE_SHOCK, PLAYER, 15
+ special Special_FadeOutMusic
+ pause 15
+ playsound SFX_EXIT_BUILDING
+ appear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ waitsfx
+ applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER, UndergroundSilverApproachMovement2
+ spriteface PLAYER, RIGHT
+ scall UndergroundSilverBattleScript
+ applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER, UndergroundSilverRetreatMovement2
+ playsound SFX_EXIT_BUILDING
+ disappear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ setscene 1
+ waitsfx
+ playmapmusic
+ end
+
+UndergroundSilverBattleScript:
+ checkevent EVENT_RIVAL_BURNED_TOWER
+ iftrue .Continue
+ setevent EVENT_RIVAL_BURNED_TOWER
+ setmapscene BURNED_TOWER_1F, 1
+.Continue:
+ playmusic MUSIC_RIVAL_ENCOUNTER
+ opentext
+ writetext UndergroundSilverBeforeText
+ waitbutton
+ closetext
+ setevent EVENT_RIVAL_GOLDENROD_UNDERGROUND
+ checkevent EVENT_GOT_TOTODILE_FROM_ELM
+ iftrue .Totodile
+ checkevent EVENT_GOT_CHIKORITA_FROM_ELM
+ iftrue .Chikorita
+ winlosstext UndergroundSilverWinText, UndergroundSilverLossText
+ setlasttalked GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ loadtrainer RIVAL1, RIVAL1_4_TOTODILE
+ startbattle
+ dontrestartmapmusic
+ reloadmapafterbattle
+ jump .FinishRivalBattle
+
+.Totodile:
+ winlosstext UndergroundSilverWinText, UndergroundSilverLossText
+ setlasttalked GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ loadtrainer RIVAL1, RIVAL1_4_CHIKORITA
+ startbattle
+ dontrestartmapmusic
+ reloadmapafterbattle
+ jump .FinishRivalBattle
+
+.Chikorita:
+ winlosstext UndergroundSilverWinText, UndergroundSilverLossText
+ setlasttalked GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
+ loadtrainer RIVAL1, RIVAL1_4_CYNDAQUIL
+ startbattle
+ dontrestartmapmusic
+ reloadmapafterbattle
+ jump .FinishRivalBattle
+
+.FinishRivalBattle:
+ playmusic MUSIC_RIVAL_AFTER
+ opentext
+ writetext UndergroundSilverAfterText
+ waitbutton
+ closetext
+ end
+
+TrainerGruntM11:
+ trainer EVENT_BEAT_ROCKET_GRUNTM_11, GRUNTM, GRUNTM_11, GruntM11SeenText, GruntM11BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntM11AfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerGruntM25:
+ trainer EVENT_BEAT_ROCKET_GRUNTM_25, GRUNTM, GRUNTM_25, GruntM25SeenText, GruntM25BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntM25AfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerBurglarDuncan:
+ trainer EVENT_BEAT_BURGLAR_DUNCAN, BURGLAR, DUNCAN, BurglarDuncanSeenText, BurglarDuncanBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext BurglarDuncanAfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerBurglarEddie:
+ trainer EVENT_BEAT_BURGLAR_EDDIE, BURGLAR, EDDIE, BurglarEddieSeenText, BurglarEddieBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext BurglarEddieAfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerGruntM13:
+ trainer EVENT_BEAT_ROCKET_GRUNTM_13, GRUNTM, GRUNTM_13, GruntM13SeenText, GruntM13BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntM13AfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerGruntF3:
+ trainer EVENT_BEAT_ROCKET_GRUNTF_3, GRUNTF, GRUNTF_3, GruntF3SeenText, GruntF3BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntF3AfterBattleText
+ waitbutton
+ closetext
+ end
+
+Switch1Script:
+ opentext
+ writetext SwitchRoomText_Switch1
+ buttonsound
+ checkevent EVENT_SWITCH_1
+ iftrue .On
+ writetext SwitchRoomText_OffTurnOn
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ copybytetovar UndergroundSwitchPositions
+ addvar 1
+ copyvartobyte UndergroundSwitchPositions
+ setevent EVENT_SWITCH_1
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+.On:
+ writetext SwitchRoomText_OnTurnOff
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ copybytetovar UndergroundSwitchPositions
+ addvar -1
+ copyvartobyte UndergroundSwitchPositions
+ clearevent EVENT_SWITCH_1
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+Switch2Script:
+ opentext
+ writetext SwitchRoomText_Switch2
+ buttonsound
+ checkevent EVENT_SWITCH_2
+ iftrue .On
+ writetext SwitchRoomText_OffTurnOn
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ copybytetovar UndergroundSwitchPositions
+ addvar 2
+ copyvartobyte UndergroundSwitchPositions
+ setevent EVENT_SWITCH_2
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+.On:
+ writetext SwitchRoomText_OnTurnOff
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ copybytetovar UndergroundSwitchPositions
+ addvar -2
+ copyvartobyte UndergroundSwitchPositions
+ clearevent EVENT_SWITCH_2
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+Switch3Script:
+ opentext
+ writetext SwitchRoomText_Switch3
+ buttonsound
+ checkevent EVENT_SWITCH_3
+ iftrue .On
+ writetext SwitchRoomText_OffTurnOn
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ copybytetovar UndergroundSwitchPositions
+ addvar 3
+ copyvartobyte UndergroundSwitchPositions
+ setevent EVENT_SWITCH_3
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+.On:
+ writetext SwitchRoomText_OnTurnOff
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ copybytetovar UndergroundSwitchPositions
+ addvar -3
+ copyvartobyte UndergroundSwitchPositions
+ clearevent EVENT_SWITCH_3
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+EmergencySwitchScript:
+ opentext
+ writetext SwitchRoomText_Emergency
+ buttonsound
+ checkevent EVENT_EMERGENCY_SWITCH
+ iftrue .On
+ writetext SwitchRoomText_OffTurnOn
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ writebyte 7
+ copyvartobyte UndergroundSwitchPositions
+ setevent EVENT_EMERGENCY_SWITCH
+ setevent EVENT_SWITCH_1
+ setevent EVENT_SWITCH_2
+ setevent EVENT_SWITCH_3
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+.On:
+ writetext SwitchRoomText_OnTurnOff
+ yesorno
+ iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
+ writebyte 0
+ copyvartobyte UndergroundSwitchPositions
+ clearevent EVENT_EMERGENCY_SWITCH
+ clearevent EVENT_SWITCH_1
+ clearevent EVENT_SWITCH_2
+ clearevent EVENT_SWITCH_3
+ jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
+
+GoldenrodUndergroundSwitchRoomEntrances_DontToggle:
+ closetext
+ end
+
+GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors:
+ copybytetovar UndergroundSwitchPositions
+ if_equal 0, .Position0
+ if_equal 1, .Position1
+ if_equal 2, .Position2
+ if_equal 3, .Position3
+ if_equal 4, .Position4
+ if_equal 5, .Position5
+ if_equal 6, .Position6
+ if_equal 7, .EmergencyPosition
+.Position0:
+ playsound SFX_ENTER_DOOR
+ scall .Clear4
+ scall .Clear5
+ scall .Clear6
+ scall .Clear7
+ scall .Clear8
+ scall .Clear9
+ scall .Clear10
+ scall .Clear11
+ scall .Clear12
+ scall .Clear13
+ scall .Clear14
+ reloadmappart
+ closetext
+ end
+
+.Position1:
+ playsound SFX_ENTER_DOOR
+ scall .Set4
+ scall .Set10
+ scall .Set13
+ scall .Clear9
+ scall .Clear11
+ scall .Clear12
+ scall .Clear14
+ reloadmappart
+ closetext
+ end
+
+.Position2:
+ playsound SFX_ENTER_DOOR
+ scall .Set5
+ scall .Set11
+ scall .Set12
+ scall .Clear8
+ scall .Clear10
+ scall .Clear13
+ scall .Clear14
+ reloadmappart
+ closetext
+ end
+
+.Position3:
+ playsound SFX_ENTER_DOOR
+ scall .Set6
+ scall .Set10
+ scall .Set13
+ scall .Clear7
+ scall .Clear11
+ scall .Clear12
+ scall .Clear14
+ reloadmappart
+ closetext
+ end
+
+.Position4:
+ playsound SFX_ENTER_DOOR
+ scall .Set7
+ scall .Set11
+ scall .Set12
+ scall .Clear6
+ scall .Clear10
+ scall .Clear13
+ scall .Clear14
+ reloadmappart
+ closetext
+ end
+
+.Position5:
+ playsound SFX_ENTER_DOOR
+ scall .Set8
+ scall .Set10
+ scall .Set13
+ scall .Clear5
+ scall .Clear11
+ scall .Clear12
+ scall .Clear14
+ reloadmappart
+ closetext
+ end
+
+.Position6:
+ playsound SFX_ENTER_DOOR
+ scall .Set9
+ scall .Set11
+ scall .Set12
+ scall .Set14
+ scall .Clear4
+ scall .Clear10
+ scall .Clear13
+ reloadmappart
+ closetext
+ end
+
+.EmergencyPosition:
+ playsound SFX_ENTER_DOOR
+ scall .Clear4
+ scall .Clear5
+ scall .Set6
+ scall .Clear7
+ scall .Set8
+ scall .Set9
+ scall .Clear10
+ scall .Set11
+ scall .Set12
+ scall .Clear13
+ scall .Set14
+ reloadmappart
+ closetext
+ writebyte 6
+ copyvartobyte UndergroundSwitchPositions
+ end
+
+.Set4:
+ doorstate 1, OPEN1
+ setevent EVENT_SWITCH_4
+ end
+
+.Set5:
+ doorstate 2, OPEN1
+ setevent EVENT_SWITCH_5
+ end
+
+.Set6:
+ doorstate 3, OPEN1
+ setevent EVENT_SWITCH_6
+ end
+
+.Set7:
+ doorstate 4, OPEN1
+ setevent EVENT_SWITCH_7
+ end
+
+.Set8:
+ doorstate 5, OPEN1
+ setevent EVENT_SWITCH_8
+ end
+
+.Set9:
+ doorstate 6, OPEN1
+ setevent EVENT_SWITCH_9
+ end
+
+.Set10:
+ doorstate 7, CLOSED1
+ doorstate 8, OPEN1
+ setevent EVENT_SWITCH_10
+ end
+
+.Set11:
+ doorstate 9, CLOSED1
+ doorstate 10, OPEN1
+ setevent EVENT_SWITCH_11
+ end
+
+.Set12:
+ doorstate 11, CLOSED1
+ doorstate 12, OPEN1
+ setevent EVENT_SWITCH_12
+ end
+
+.Set13:
+ doorstate 13, CLOSED1
+ doorstate 14, OPEN1
+ setevent EVENT_SWITCH_13
+ end
+
+.Set14:
+ doorstate 15, CLOSED1
+ doorstate 16, OPEN1
+ setevent EVENT_SWITCH_14
+ end
+
+.Clear4:
+ doorstate 1, CLOSED2
+ clearevent EVENT_SWITCH_4
+ end
+
+.Clear5:
+ doorstate 2, CLOSED2
+ clearevent EVENT_SWITCH_5
+ end
+
+.Clear6:
+ doorstate 3, CLOSED2
+ clearevent EVENT_SWITCH_6
+ end
+
+.Clear7:
+ doorstate 4, CLOSED2
+ clearevent EVENT_SWITCH_7
+ end
+
+.Clear8:
+ doorstate 5, CLOSED2
+ clearevent EVENT_SWITCH_8
+ end
+
+.Clear9:
+ doorstate 6, CLOSED2
+ clearevent EVENT_SWITCH_9
+ end
+
+.Clear10:
+ doorstate 7, CLOSED3
+ doorstate 8, OPEN2
+ clearevent EVENT_SWITCH_10
+ end
+
+.Clear11:
+ doorstate 9, CLOSED3
+ doorstate 10, OPEN2
+ clearevent EVENT_SWITCH_11
+ end
+
+.Clear12:
+ doorstate 11, CLOSED3
+ doorstate 12, OPEN2
+ clearevent EVENT_SWITCH_12
+ end
+
+.Clear13:
+ doorstate 13, CLOSED3
+ doorstate 14, OPEN2
+ clearevent EVENT_SWITCH_13
+ end
+
+.Clear14:
+ doorstate 15, CLOSED3
+ doorstate 16, OPEN2
+ clearevent EVENT_SWITCH_14
+ end
+
+GoldenrodUndergroundSwitchRoomEntrancesSmokeBall:
+ itemball SMOKE_BALL
+
+GoldenrodUndergroundSwitchRoomEntrancesFullHeal:
+ itemball FULL_HEAL
+
+GoldenrodUndergroundSwitchRoomEntrancesHiddenMaxPotion:
+ dwb EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION, MAX_POTION
+
+GoldenrodUndergroundSwitchRoomEntrancesHiddenRevive:
+ dwb EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE, REVIVE
+
+UndergroundSilverApproachMovement1:
+ step DOWN
+ step LEFT
+ step LEFT
+ step LEFT
+ step_end
+
+UndergroundSilverApproachMovement2:
+ step DOWN
+ step DOWN
+ step LEFT
+ step LEFT
+ step LEFT
+ step_end
+
+UndergroundSilverRetreatMovement1:
+ step RIGHT
+ step RIGHT
+ step RIGHT
+ step UP
+ step_end
+
+UndergroundSilverRetreatMovement2:
+ step RIGHT
+ step RIGHT
+ step RIGHT
+ step UP
+ step UP
+ step_end
+
+UndergroundSilverBeforeText:
+ text "Hold it!"
+
+ para "I saw you, so I"
+ line "tailed you."
+
+ para "I don't need you"
+ line "underfoot while I"
+
+ para "take care of TEAM"
+ line "ROCKET."
+
+ para "…Wait a second."
+ line "You beat me be-"
+ cont "fore, didn't you?"
+
+ para "That was just a"
+ line "fluke."
+
+ para "But I repay my"
+ line "debts!"
+ done
+
+UndergroundSilverWinText:
+ text "…Why…"
+ line "Why do I lose?"
+
+ para "I've assembled the"
+ line "toughest #MON."
+
+ para "I didn't ease up"
+ line "on the gas."
+
+ para "So why do I lose?"
+ done
+
+UndergroundSilverAfterText:
+ text "…I don't under-"
+ line "stand…"
+
+ para "Is what that LANCE"
+ line "guy said true?"
+
+ para "That I don't treat"
+ line "#MON properly?"
+
+ para "Love…"
+
+ para "Trust…"
+
+ para "Are they really"
+ line "what I lack?"
+
+ para "Are they keeping"
+ line "me from winning?"
+
+ para "I… I just don't"
+ line "understand."
+
+ para "But it's not going"
+ line "to end here."
+
+ para "Not now. Not"
+ line "because of this."
+
+ para "I won't give up my"
+ line "dream of becoming"
+
+ para "the world's best"
+ line "#MON trainer!"
+ done
+
+UndergroundSilverLossText:
+ text "Humph. This is my"
+ line "real power, wimp."
+
+ para "I'll make TEAM"
+ line "ROCKET history."
+
+ para "And I'm going to"
+ line "grind that LANCE"
+ cont "under my heels."
+ done
+
+GoldenrodUndergroundSwitchRoomEntrances_SuperNerdText:
+ text "I was challenged"
+ line "to a battle down-"
+ cont "stairs."
+
+ para "It's rough down"
+ line "there. You'd"
+ cont "better be careful."
+ done
+
+GoldenrodUndergroundSwitchRoomEntrances_TeacherText:
+ text "There are some"
+ line "shops downstairs…"
+
+ para "But there are"
+ line "also trainers."
+
+ para "I'm scared to go"
+ line "down there."
+ done
+
+GruntM11SeenText:
+ text "Open one shutter,"
+ line "another closes."
+
+ para "Bet you can't get"
+ line "where you want!"
+ done
+
+GruntM11BeatenText:
+ text "Drat! I was sunk"
+ line "by indecision!"
+ done
+
+GruntM11AfterBattleText:
+ text "I'm confused too…"
+ line "The switch on the"
+
+ para "end is the one to"
+ line "press first, but…"
+ done
+
+GruntM25SeenText:
+ text "Kwahaha!"
+
+ para "Confounded by the"
+ line "shutters, are we?"
+
+ para "I'll let you in on"
+ line "a secret if you"
+ cont "can beat me!"
+ done
+
+GruntM25BeatenText:
+ text "Uwww…"
+ line "I blew it."
+ done
+
+GruntM25AfterBattleText:
+ text "All right. A hint!"
+
+ para "Change the order"
+ line "of switching."
+
+ para "That'll change the"
+ line "ways the shutters"
+ cont "open and close."
+ done
+
+BurglarDuncanSeenText:
+ text "Fork over your"
+ line "goodies!"
+ done
+
+BurglarDuncanBeatenText:
+ text "Mercy!"
+ done
+
+BurglarDuncanAfterBattleText:
+ text "Steal and sell!"
+ line "That's basic in"
+ cont "crime, kid!"
+ done
+
+BurglarEddieSeenText:
+ text "They ditched this"
+ line "project before"
+ cont "they finished."
+
+ para "I'm searching for"
+ line "leftover loot."
+ done
+
+BurglarEddieBeatenText:
+ text "Over the top!"
+ done
+
+BurglarEddieAfterBattleText:
+ text "UNDERGROUND WARE-"
+ line "HOUSE?"
+
+ para "What do you want"
+ line "to go there for?"
+
+ para "There's nothing"
+ line "down there."
+ done
+
+GruntM13SeenText:
+ text "I don't care if"
+ line "you're lost."
+
+ para "You show up here,"
+ line "you're nothing but"
+ cont "a victim!"
+ done
+
+GruntM13BeatenText:
+ text "Urk! Yeah, think"
+ line "you're cool, huh?"
+ done
+
+GruntM13AfterBattleText:
+ text "You must have ice"
+ line "in your veins to"
+ cont "dis TEAM ROCKET."
+ done
+
+SwitchRoomText_Switch1:
+ text "It's labeled"
+ line "SWITCH 1."
+ done
+
+GruntF3SeenText:
+ text "Are you lost? No,"
+ line "you can't be."
+
+ para "You don't have"
+ line "that scared look."
+
+ para "I'll give you"
+ line "something to be"
+ cont "scared about!"
+ done
+
+GruntF3BeatenText:
+ text "How could you?"
+ done
+
+GruntF3AfterBattleText:
+ text "Go wherever you'd"
+ line "like! Get lost!"
+ cont "See if I care!"
+ done
+
+SwitchRoomText_OffTurnOn:
+ text "It's OFF."
+ line "Turn it ON?"
+ done
+
+SwitchRoomText_OnTurnOff:
+ text "It's ON."
+ line "Turn it OFF?"
+ done
+
+SwitchRoomText_Switch2:
+ text "It's labeled"
+ line "SWITCH 2."
+ done
+
+SwitchRoomText_Switch3:
+ text "It's labeled"
+ line "SWITCH 3."
+ done
+
+SwitchRoomText_Emergency:
+ text "It's labeled"
+ line "EMERGENCY."
+ done
+
+GoldenrodUndergroundSwitchRoomEntrances_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 9
+ warp_def $3, $17, 6, GOLDENROD_UNDERGROUND
+ warp_def $a, $16, 1, GOLDENROD_UNDERGROUND_WAREHOUSE
+ warp_def $a, $17, 2, GOLDENROD_UNDERGROUND_WAREHOUSE
+ warp_def $19, $5, 2, GOLDENROD_UNDERGROUND
+ warp_def $1d, $4, 14, GOLDENROD_CITY
+ warp_def $1d, $5, 14, GOLDENROD_CITY
+ warp_def $19, $15, 1, GOLDENROD_UNDERGROUND
+ warp_def $1d, $14, 13, GOLDENROD_CITY
+ warp_def $1d, $15, 13, GOLDENROD_CITY
+
+.CoordEvents:
+ db 2
+ coord_event 0, $4, $13, UndergroundSilverScene1
+ coord_event 0, $5, $13, UndergroundSilverScene2
+
+.BGEvents:
+ db 6
+ bg_event 1, 16, BGEVENT_READ, Switch1Script
+ bg_event 1, 10, BGEVENT_READ, Switch2Script
+ bg_event 1, 2, BGEVENT_READ, Switch3Script
+ bg_event 11, 20, BGEVENT_READ, EmergencySwitchScript
+ bg_event 9, 8, BGEVENT_ITEM, GoldenrodUndergroundSwitchRoomEntrancesHiddenMaxPotion
+ bg_event 8, 1, BGEVENT_ITEM, GoldenrodUndergroundSwitchRoomEntrancesHiddenRevive
+
+.ObjectEvents:
+ db 11
+ object_event SPRITE_PHARMACIST, 12, 9, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerBurglarDuncan, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_PHARMACIST, 8, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerBurglarEddie, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 2, 17, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM13, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 2, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM11, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM25, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET_GIRL, 12, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerGruntF3, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_TEACHER, 27, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x7ca7d, -1
+ object_event SPRITE_SUPER_NERD, 27, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SuperNerdScript_0x7ca7a, -1
+ object_event SPRITE_POKE_BALL, 12, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundSwitchRoomEntrancesSmokeBall, EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_SMOKE_BALL
+ object_event SPRITE_POKE_BALL, 9, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundSwitchRoomEntrancesFullHeal, EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_FULL_HEAL
+ object_event SPRITE_SILVER, 3, 23, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_GOLDENROD_UNDERGROUND
diff --git a/maps/UndergroundPathSwitchRoomEntrances.blk b/maps/GoldenrodUndergroundSwitchRoomEntrances.blk
index d8a49b5ce..d8a49b5ce 100644
--- a/maps/UndergroundPathSwitchRoomEntrances.blk
+++ b/maps/GoldenrodUndergroundSwitchRoomEntrances.blk
diff --git a/maps/GoldenrodUndergroundWarehouse.asm b/maps/GoldenrodUndergroundWarehouse.asm
new file mode 100644
index 000000000..f6f27cd1a
--- /dev/null
+++ b/maps/GoldenrodUndergroundWarehouse.asm
@@ -0,0 +1,237 @@
+const_value set 2
+ const GOLDENRODUNDERGROUNDWAREHOUSE_ROCKET1
+ const GOLDENRODUNDERGROUNDWAREHOUSE_ROCKET2
+ const GOLDENRODUNDERGROUNDWAREHOUSE_ROCKET3
+ const GOLDENRODUNDERGROUNDWAREHOUSE_GENTLEMAN
+ const GOLDENRODUNDERGROUNDWAREHOUSE_POKE_BALL1
+ const GOLDENRODUNDERGROUNDWAREHOUSE_POKE_BALL2
+ const GOLDENRODUNDERGROUNDWAREHOUSE_POKE_BALL3
+
+GoldenrodUndergroundWarehouse_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 1
+ dbw MAPCALLBACK_NEWMAP, .ResetSwitches
+
+.ResetSwitches:
+ clearevent EVENT_SWITCH_1
+ clearevent EVENT_SWITCH_2
+ clearevent EVENT_SWITCH_3
+ clearevent EVENT_EMERGENCY_SWITCH
+ clearevent EVENT_SWITCH_4
+ clearevent EVENT_SWITCH_5
+ clearevent EVENT_SWITCH_6
+ clearevent EVENT_SWITCH_7
+ clearevent EVENT_SWITCH_8
+ clearevent EVENT_SWITCH_9
+ clearevent EVENT_SWITCH_10
+ clearevent EVENT_SWITCH_11
+ clearevent EVENT_SWITCH_12
+ clearevent EVENT_SWITCH_13
+ clearevent EVENT_SWITCH_14
+ writebyte $0
+ copyvartobyte UndergroundSwitchPositions
+ return
+
+TrainerGruntM24:
+ trainer EVENT_BEAT_ROCKET_GRUNTM_24, GRUNTM, GRUNTM_24, GruntM24SeenText, GruntM24BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntM24AfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerGruntM14:
+ trainer EVENT_BEAT_ROCKET_GRUNTM_14, GRUNTM, GRUNTM_14, GruntM14SeenText, GruntM14BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntM14AfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerGruntM15:
+ trainer EVENT_BEAT_ROCKET_GRUNTM_15, GRUNTM, GRUNTM_15, GruntM15SeenText, GruntM15BeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext GruntM15AfterBattleText
+ waitbutton
+ closetext
+ end
+
+GentlemanScript_0x7d9bf:
+ faceplayer
+ opentext
+ checkevent EVENT_RECEIVED_CARD_KEY
+ iftrue UnknownScript_0x7d9de
+ writetext UnknownText_0x7dbc6
+ buttonsound
+ verbosegiveitem CARD_KEY
+ setevent EVENT_RECEIVED_CARD_KEY
+ setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
+ clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
+ writetext UnknownText_0x7dc5b
+ buttonsound
+UnknownScript_0x7d9de:
+ writetext UnknownText_0x7dc8d
+ waitbutton
+ closetext
+ end
+
+GoldenrodUndergroundWarehouseMaxEther:
+ itemball MAX_ETHER
+
+GoldenrodUndergroundWarehouseTMSleepTalk:
+ itemball TM_SLEEP_TALK
+
+GoldenrodUndergroundWarehouseUltraBall:
+ itemball ULTRA_BALL
+
+GruntM24SeenText:
+ text "How did you get"
+ line "this far?"
+
+ para "I guess it can't"
+ line "be helped. I'll"
+ cont "dispose of you."
+ done
+
+GruntM24BeatenText:
+ text "I got disposed of…"
+ done
+
+GruntM24AfterBattleText:
+ text "TEAM ROCKET will"
+ line "keep going, wait-"
+ cont "ing for the return"
+ cont "of GIOVANNI."
+
+ para "We'll do whatever"
+ line "it takes."
+ done
+
+GruntM14SeenText:
+ text "You're not going"
+ line "any farther!"
+
+ para "I don't show mercy"
+ line "to my enemies, not"
+ cont "even brats!"
+ done
+
+GruntM14BeatenText:
+ text "Blast it!"
+ done
+
+GruntM14AfterBattleText:
+ text "I lost…"
+
+ para "Please forgive me,"
+ line "GIOVANNI!"
+ done
+
+GruntM15SeenText:
+ text "Hyuck-hyuck-hyuck!"
+ line "I remember you!"
+
+ para "You got me good"
+ line "at our hideout!"
+ done
+
+GruntM15BeatenText:
+ text "Hyuck-hyuck-hyuck!"
+ line "So, that's how?"
+ done
+
+GruntM15AfterBattleText:
+ text "Hyuck-hyuck-hyuck!"
+ line "That was a blast!"
+ cont "I'll remember you!"
+ done
+
+UnknownText_0x7dbc6:
+ text "DIRECTOR: Who?"
+ line "What? You came to"
+ cont "rescue me?"
+
+ para "Thank you!"
+
+ para "The RADIO TOWER!"
+
+ para "What's happening"
+ line "there?"
+
+ para "Taken over by TEAM"
+ line "ROCKET?"
+
+ para "Here. Take this"
+ line "CARD KEY."
+ done
+
+UnknownText_0x7dc5b:
+ text "DIRECTOR: Use that"
+ line "to open the shut-"
+ cont "ters on 3F."
+ done
+
+UnknownText_0x7dc8d:
+ text "I'm begging you to"
+ line "help."
+
+ para "There's no telling"
+ line "what they'll do if"
+
+ para "they control the"
+ line "transmitter."
+
+ para "They may even be"
+ line "able to control"
+
+ para "#MON using a"
+ line "special signal!"
+
+ para "You're the only"
+ line "one I can call on."
+
+ para "Please save the"
+ line "RADIO TOWER…"
+
+ para "And all the #-"
+ line "MON nationwide!"
+ done
+
+GoldenrodUndergroundWarehouse_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $c, $2, 2, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
+ warp_def $c, $3, 3, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
+ warp_def $2, $11, 1, GOLDENROD_DEPT_STORE_B1F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 7
+ object_event SPRITE_ROCKET, 8, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM24, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 15, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM14, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 3, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 4, TrainerGruntM15, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_GENTLEMAN, 8, 12, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GentlemanScript_0x7d9bf, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_POKE_BALL, 15, 18, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundWarehouseMaxEther, EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_MAX_ETHER
+ object_event SPRITE_POKE_BALL, 9, 13, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundWarehouseTMSleepTalk, EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK
+ object_event SPRITE_POKE_BALL, 1, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundWarehouseUltraBall, EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_ULTRA_BALL
diff --git a/maps/UndergroundWarehouse.blk b/maps/GoldenrodUndergroundWarehouse.blk
index 4b0f803df..4b0f803df 100644
--- a/maps/UndergroundWarehouse.blk
+++ b/maps/GoldenrodUndergroundWarehouse.blk
diff --git a/maps/GuideGentsHouse.asm b/maps/GuideGentsHouse.asm
index 1b6befa08..c8d6ed1c4 100644
--- a/maps/GuideGentsHouse.asm
+++ b/maps/GuideGentsHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const GUIDEGENTSHOUSE_GRAMPS
GuideGentsHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -36,14 +36,14 @@ GuideGentsHouse_MapEventHeader:
warp_def $7, $2, 4, CHERRYGROVE_CITY
warp_def $7, $3, 4, CHERRYGROVE_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, GuideGentsHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, GuideGentsHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, GuideGentsHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, GuideGentsHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_GRAMPS, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GuideGentsHouseGuideGent, EVENT_GUIDE_GENT_VISIBLE_IN_CHERRYGROVE
+ object_event SPRITE_GRAMPS, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GuideGentsHouseGuideGent, EVENT_GUIDE_GENT_VISIBLE_IN_CHERRYGROVE
diff --git a/maps/HallOfFame.asm b/maps/HallOfFame.asm
index bf5804c42..e795feea8 100644
--- a/maps/HallOfFame.asm
+++ b/maps/HallOfFame.asm
@@ -2,24 +2,22 @@ const_value set 2
const HALLOFFAME_LANCE
HallOfFame_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .EnterHallOfFame
+ scene_script .DummyScene
.MapCallbacks:
db 0
-.Trigger0:
- priorityjump HallOfFameScript
+.EnterHallOfFame:
+ priorityjump .EnterHallOfFameScript
end
-.Trigger1:
+.DummyScene:
end
-HallOfFameScript:
+.EnterHallOfFameScript:
follow HALLOFFAME_LANCE, PLAYER
applymovement HALLOFFAME_LANCE, HallOfFame_WalkUpWithLance
stopfollow
@@ -30,7 +28,7 @@ HallOfFameScript:
closetext
spriteface HALLOFFAME_LANCE, UP
applymovement PLAYER, HallOfFame_SlowlyApproachMachine
- dotrigger $1
+ setscene $1
pause 15
writebyte 2 ; Machine is in the Hall of Fame
special HealMachineAnim
@@ -40,7 +38,7 @@ HallOfFameScript:
clearevent EVENT_RED_IN_MT_SILVER
setevent EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME
clearevent EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME
- domaptrigger SPROUT_TOWER_3F, $1
+ setmapscene SPROUT_TOWER_3F, $1
special HealParty
checkevent EVENT_GOT_SS_TICKET_FROM_ELM
iftrue .SkipPhoneCall
@@ -121,12 +119,12 @@ HallOfFame_MapEventHeader:
warp_def $d, $4, 3, LANCES_ROOM
warp_def $d, $5, 4, LANCES_ROOM
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_LANCE, 12, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, -1
+ object_event SPRITE_LANCE, 12, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1
diff --git a/maps/IcePath1F.asm b/maps/IcePath1F.asm
index ab2ba2702..d0341d0e1 100644
--- a/maps/IcePath1F.asm
+++ b/maps/IcePath1F.asm
@@ -4,7 +4,7 @@ const_value set 2
const ICEPATH1F_POKE_BALL3
IcePath1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -30,14 +30,14 @@ IcePath1F_MapEventHeader:
warp_def $5, $25, 1, ICE_PATH_B1F
warp_def $d, $25, 7, ICE_PATH_B1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_POKE_BALL, 7, 31, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, IcePath1FHMWaterfall, EVENT_GOT_HM07_WATERFALL
- person_event SPRITE_POKE_BALL, 23, 32, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, IcePath1FPPUp, EVENT_ICE_PATH_1F_PP_UP
- person_event SPRITE_POKE_BALL, 9, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, IcePath1FProtein, EVENT_ICE_PATH_1F_PROTEIN
+ object_event SPRITE_POKE_BALL, 7, 31, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePath1FHMWaterfall, EVENT_GOT_HM07_WATERFALL
+ object_event SPRITE_POKE_BALL, 23, 32, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePath1FPPUp, EVENT_ICE_PATH_1F_PP_UP
+ object_event SPRITE_POKE_BALL, 9, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePath1FProtein, EVENT_ICE_PATH_1F_PROTEIN
diff --git a/maps/IcePathB1F.asm b/maps/IcePathB1F.asm
index afac65352..3c818c766 100644
--- a/maps/IcePathB1F.asm
+++ b/maps/IcePathB1F.asm
@@ -6,14 +6,11 @@ const_value set 2
const ICEPATHB1F_POKE_BALL
IcePathB1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_CMDQUEUE, .SetUpStoneTable
.SetUpStoneTable:
@@ -97,17 +94,17 @@ IcePathB1F_MapEventHeader:
warp_def $19, $5, 4, ICE_PATH_1F
warp_def $1b, $b, 1, ICE_PATH_B2F_BLACKTHORN_SIDE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 30, 17, SIGNPOST_ITEM, IcePathB1FHiddenMaxPotion
+ bg_event 30, 17, BGEVENT_ITEM, IcePathB1FHiddenMaxPotion
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_BOULDER, 7, 11, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, IcePathB1FBoulder, EVENT_BOULDER_IN_ICE_PATH_1
- person_event SPRITE_BOULDER, 8, 7, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, IcePathB1FBoulder, EVENT_BOULDER_IN_ICE_PATH_2
- person_event SPRITE_BOULDER, 9, 8, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, IcePathB1FBoulder, EVENT_BOULDER_IN_ICE_PATH_3
- person_event SPRITE_BOULDER, 7, 17, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, IcePathB1FBoulder, EVENT_BOULDER_IN_ICE_PATH_4
- person_event SPRITE_POKE_BALL, 35, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, IcePathB1FIron, EVENT_ICE_PATH_B1F_IRON
+ object_event SPRITE_BOULDER, 7, 11, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB1FBoulder, EVENT_BOULDER_IN_ICE_PATH_1
+ object_event SPRITE_BOULDER, 8, 7, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB1FBoulder, EVENT_BOULDER_IN_ICE_PATH_2
+ object_event SPRITE_BOULDER, 9, 8, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB1FBoulder, EVENT_BOULDER_IN_ICE_PATH_3
+ object_event SPRITE_BOULDER, 7, 17, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB1FBoulder, EVENT_BOULDER_IN_ICE_PATH_4
+ object_event SPRITE_POKE_BALL, 35, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePathB1FIron, EVENT_ICE_PATH_B1F_IRON
diff --git a/maps/IcePathB2FBlackthornSide.asm b/maps/IcePathB2FBlackthornSide.asm
index 135c70164..68b32a7e6 100644
--- a/maps/IcePathB2FBlackthornSide.asm
+++ b/maps/IcePathB2FBlackthornSide.asm
@@ -2,7 +2,7 @@ const_value set 2
const ICEPATHB2FBLACKTHORNSIDE_POKE_BALL
IcePathB2FBlackthornSide_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -24,13 +24,13 @@ IcePathB2FBlackthornSide_MapEventHeader:
warp_def $f, $3, 8, ICE_PATH_B1F
warp_def $3, $3, 2, ICE_PATH_B3F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 10, 2, SIGNPOST_ITEM, IcePathB2FBlackthornSideHiddenIceHeal
+ bg_event 10, 2, BGEVENT_ITEM, IcePathB2FBlackthornSideHiddenIceHeal
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKE_BALL, 16, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, IcePathB2FBlackthornSideTMRest, EVENT_ICE_PATH_B2F_BLACKTHORN_SIDE_TM_REST
+ object_event SPRITE_POKE_BALL, 16, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePathB2FBlackthornSideTMRest, EVENT_ICE_PATH_B2F_BLACKTHORN_SIDE_TM_REST
diff --git a/maps/IcePathB2FMahoganySide.asm b/maps/IcePathB2FMahoganySide.asm
index a588441bd..60a36ac40 100644
--- a/maps/IcePathB2FMahoganySide.asm
+++ b/maps/IcePathB2FMahoganySide.asm
@@ -7,7 +7,7 @@ const_value set 2
const ICEPATHB2FMAHOGANYSIDE_POKE_BALL2
IcePathB2FMahoganySide_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -44,18 +44,18 @@ IcePathB2FMahoganySide_MapEventHeader:
warp_def $c, $4, 5, ICE_PATH_B1F
warp_def $c, $c, 6, ICE_PATH_B1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 17, 0, SIGNPOST_ITEM, IcePathB2FMahoganySideHiddenCarbos
+ bg_event 17, 0, BGEVENT_ITEM, IcePathB2FMahoganySideHiddenCarbos
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_BOULDER, 3, 11, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BoulderScript_0x7e5a3, EVENT_BOULDER_IN_ICE_PATH_1A
- person_event SPRITE_BOULDER, 7, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BoulderScript_0x7e5a3, EVENT_BOULDER_IN_ICE_PATH_2A
- person_event SPRITE_BOULDER, 12, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BoulderScript_0x7e5a3, EVENT_BOULDER_IN_ICE_PATH_3A
- person_event SPRITE_BOULDER, 13, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BoulderScript_0x7e5a3, EVENT_BOULDER_IN_ICE_PATH_4A
- person_event SPRITE_POKE_BALL, 9, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, IcePathB2FMahoganySideFullHeal, EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_FULL_HEAL
- person_event SPRITE_POKE_BALL, 2, 0, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, IcePathB2FMahoganySideMaxPotion, EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_MAX_POTION
+ object_event SPRITE_BOULDER, 3, 11, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BoulderScript_0x7e5a3, EVENT_BOULDER_IN_ICE_PATH_1A
+ object_event SPRITE_BOULDER, 7, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BoulderScript_0x7e5a3, EVENT_BOULDER_IN_ICE_PATH_2A
+ object_event SPRITE_BOULDER, 12, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BoulderScript_0x7e5a3, EVENT_BOULDER_IN_ICE_PATH_3A
+ object_event SPRITE_BOULDER, 13, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BoulderScript_0x7e5a3, EVENT_BOULDER_IN_ICE_PATH_4A
+ object_event SPRITE_POKE_BALL, 9, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePathB2FMahoganySideFullHeal, EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_FULL_HEAL
+ object_event SPRITE_POKE_BALL, 2, 0, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePathB2FMahoganySideMaxPotion, EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_MAX_POTION
diff --git a/maps/IcePathB3F.asm b/maps/IcePathB3F.asm
index 1eb0c4548..64d448956 100644
--- a/maps/IcePathB3F.asm
+++ b/maps/IcePathB3F.asm
@@ -3,7 +3,7 @@ const_value set 2
const ICEPATHB3F_ROCK
IcePathB3F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -24,13 +24,13 @@ IcePathB3F_MapEventHeader:
warp_def $5, $3, 2, ICE_PATH_B2F_MAHOGANY_SIDE
warp_def $5, $f, 2, ICE_PATH_B2F_BLACKTHORN_SIDE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_POKE_BALL, 7, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, IcePathB3FNevermeltice, EVENT_ICE_PATH_B3F_NEVERMELTICE
- person_event SPRITE_ROCK, 6, 6, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, IcePathB3FRock, -1
+ object_event SPRITE_POKE_BALL, 7, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePathB3FNevermeltice, EVENT_ICE_PATH_B3F_NEVERMELTICE
+ object_event SPRITE_ROCK, 6, 6, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB3FRock, -1
diff --git a/maps/IlexForest.asm b/maps/IlexForest.asm
index d09ec7ab7..6ce300e27 100644
--- a/maps/IlexForest.asm
+++ b/maps/IlexForest.asm
@@ -12,14 +12,11 @@ const_value set 2
const ILEXFOREST_POKE_BALL4
IlexForest_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_OBJECTS, .FarfetchdCallback
.FarfetchdCallback:
@@ -40,52 +37,52 @@ IlexForest_MapScriptHeader:
return
.PositionOne:
- moveperson ILEXFOREST_FARFETCHD, $e, $1f
+ moveobject ILEXFOREST_FARFETCHD, $e, $1f
appear ILEXFOREST_FARFETCHD
return
.PositionTwo:
- moveperson ILEXFOREST_FARFETCHD, $f, $19
+ moveobject ILEXFOREST_FARFETCHD, $f, $19
appear ILEXFOREST_FARFETCHD
return
.PositionThree:
- moveperson ILEXFOREST_FARFETCHD, $14, $18
+ moveobject ILEXFOREST_FARFETCHD, $14, $18
appear ILEXFOREST_FARFETCHD
return
.PositionFour:
- moveperson ILEXFOREST_FARFETCHD, $1d, $16
+ moveobject ILEXFOREST_FARFETCHD, $1d, $16
appear ILEXFOREST_FARFETCHD
return
.PositionFive:
- moveperson ILEXFOREST_FARFETCHD, $1c, $1f
+ moveobject ILEXFOREST_FARFETCHD, $1c, $1f
appear ILEXFOREST_FARFETCHD
return
.PositionSix:
- moveperson ILEXFOREST_FARFETCHD, $18, $23
+ moveobject ILEXFOREST_FARFETCHD, $18, $23
appear ILEXFOREST_FARFETCHD
return
.PositionSeven:
- moveperson ILEXFOREST_FARFETCHD, $16, $1f
+ moveobject ILEXFOREST_FARFETCHD, $16, $1f
appear ILEXFOREST_FARFETCHD
return
.PositionEight:
- moveperson ILEXFOREST_FARFETCHD, $f, $1d
+ moveobject ILEXFOREST_FARFETCHD, $f, $1d
appear ILEXFOREST_FARFETCHD
return
.PositionNine:
- moveperson ILEXFOREST_FARFETCHD, $a, $23
+ moveobject ILEXFOREST_FARFETCHD, $a, $23
appear ILEXFOREST_FARFETCHD
return
.PositionTen:
- moveperson ILEXFOREST_FARFETCHD, $6, $1c
+ moveobject ILEXFOREST_FARFETCHD, $6, $1c
appear ILEXFOREST_FARFETCHD
return
@@ -128,7 +125,7 @@ IlexForestFarfetchdScript:
waitbutton
closetext
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos1_Pos2
- moveperson ILEXFOREST_FARFETCHD, $f, $19
+ moveobject ILEXFOREST_FARFETCHD, $f, $19
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 2
@@ -138,7 +135,7 @@ IlexForestFarfetchdScript:
scall .CryAndCheckFacing
if_equal DOWN, .Position2_Down
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos2_Pos3
- moveperson ILEXFOREST_FARFETCHD, $14, $18
+ moveobject ILEXFOREST_FARFETCHD, $14, $18
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 3
@@ -146,7 +143,7 @@ IlexForestFarfetchdScript:
.Position2_Down:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos2_Pos8
- moveperson ILEXFOREST_FARFETCHD, $f, $1d
+ moveobject ILEXFOREST_FARFETCHD, $f, $1d
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 8
@@ -156,7 +153,7 @@ IlexForestFarfetchdScript:
scall .CryAndCheckFacing
if_equal LEFT, .Position3_Left
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos3_Pos4
- moveperson ILEXFOREST_FARFETCHD, $1d, $16
+ moveobject ILEXFOREST_FARFETCHD, $1d, $16
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 4
@@ -164,7 +161,7 @@ IlexForestFarfetchdScript:
.Position3_Left:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos3_Pos2
- moveperson ILEXFOREST_FARFETCHD, $f, $19
+ moveobject ILEXFOREST_FARFETCHD, $f, $19
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 2
@@ -174,7 +171,7 @@ IlexForestFarfetchdScript:
scall .CryAndCheckFacing
if_equal UP, .Position4_Up
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos4_Pos5
- moveperson ILEXFOREST_FARFETCHD, $1c, $1f
+ moveobject ILEXFOREST_FARFETCHD, $1c, $1f
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 5
@@ -182,7 +179,7 @@ IlexForestFarfetchdScript:
.Position4_Up:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos4_Pos3
- moveperson ILEXFOREST_FARFETCHD, $14, $18
+ moveobject ILEXFOREST_FARFETCHD, $14, $18
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 3
@@ -194,7 +191,7 @@ IlexForestFarfetchdScript:
if_equal LEFT, .Position5_Left
if_equal RIGHT, .Position5_Right
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos5_Pos6
- moveperson ILEXFOREST_FARFETCHD, $18, $23
+ moveobject ILEXFOREST_FARFETCHD, $18, $23
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 6
@@ -202,7 +199,7 @@ IlexForestFarfetchdScript:
.Position5_Left:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos5_Pos7
- moveperson ILEXFOREST_FARFETCHD, $16, $1f
+ moveobject ILEXFOREST_FARFETCHD, $16, $1f
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 7
@@ -210,7 +207,7 @@ IlexForestFarfetchdScript:
.Position5_Up:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos5_Pos4_Up
- moveperson ILEXFOREST_FARFETCHD, $1d, $16
+ moveobject ILEXFOREST_FARFETCHD, $1d, $16
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 4
@@ -218,7 +215,7 @@ IlexForestFarfetchdScript:
.Position5_Right:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos5_Pos4_Right
- moveperson ILEXFOREST_FARFETCHD, $1d, $16
+ moveobject ILEXFOREST_FARFETCHD, $1d, $16
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 4
@@ -228,7 +225,7 @@ IlexForestFarfetchdScript:
scall .CryAndCheckFacing
if_equal RIGHT, .Position6_Right
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos6_Pos7
- moveperson ILEXFOREST_FARFETCHD, $16, $1f
+ moveobject ILEXFOREST_FARFETCHD, $16, $1f
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 7
@@ -236,7 +233,7 @@ IlexForestFarfetchdScript:
.Position6_Right:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos6_Pos5
- moveperson ILEXFOREST_FARFETCHD, $1c, $1f
+ moveobject ILEXFOREST_FARFETCHD, $1c, $1f
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 5
@@ -247,7 +244,7 @@ IlexForestFarfetchdScript:
if_equal DOWN, .Position7_Down
if_equal LEFT, .Position7_Left
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos7_Pos8
- moveperson ILEXFOREST_FARFETCHD, $f, $1d
+ moveobject ILEXFOREST_FARFETCHD, $f, $1d
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 8
@@ -255,7 +252,7 @@ IlexForestFarfetchdScript:
.Position7_Left:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos7_Pos6
- moveperson ILEXFOREST_FARFETCHD, $18, $23
+ moveobject ILEXFOREST_FARFETCHD, $18, $23
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 6
@@ -263,7 +260,7 @@ IlexForestFarfetchdScript:
.Position7_Down:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos7_Pos5
- moveperson ILEXFOREST_FARFETCHD, $1c, $1f
+ moveobject ILEXFOREST_FARFETCHD, $1c, $1f
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 5
@@ -275,7 +272,7 @@ IlexForestFarfetchdScript:
if_equal LEFT, .Position8_Left
if_equal RIGHT, .Position8_Right
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos8_Pos9
- moveperson ILEXFOREST_FARFETCHD, $a, $23
+ moveobject ILEXFOREST_FARFETCHD, $a, $23
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 9
@@ -283,7 +280,7 @@ IlexForestFarfetchdScript:
.Position8_Right:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos8_Pos7
- moveperson ILEXFOREST_FARFETCHD, $16, $1f
+ moveobject ILEXFOREST_FARFETCHD, $16, $1f
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 7
@@ -292,7 +289,7 @@ IlexForestFarfetchdScript:
.Position8_Up:
.Position8_Left:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos8_Pos2
- moveperson ILEXFOREST_FARFETCHD, $f, $19
+ moveobject ILEXFOREST_FARFETCHD, $f, $19
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 2
@@ -303,7 +300,7 @@ IlexForestFarfetchdScript:
if_equal DOWN, .Position9_Down
if_equal RIGHT, .Position9_Right
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos9_Pos10
- moveperson ILEXFOREST_FARFETCHD, $6, $1c
+ moveobject ILEXFOREST_FARFETCHD, $6, $1c
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 10
@@ -314,7 +311,7 @@ IlexForestFarfetchdScript:
.Position9_Right:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos9_Pos8_Right
- moveperson ILEXFOREST_FARFETCHD, $f, $1d
+ moveobject ILEXFOREST_FARFETCHD, $f, $1d
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 8
@@ -322,7 +319,7 @@ IlexForestFarfetchdScript:
.Position9_Down:
applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos9_Pos8_Down
- moveperson ILEXFOREST_FARFETCHD, $f, $1d
+ moveobject ILEXFOREST_FARFETCHD, $f, $1d
disappear ILEXFOREST_FARFETCHD
appear ILEXFOREST_FARFETCHD
loadvar FarfetchdPosition, 8
@@ -391,12 +388,12 @@ IlexForestHeadbuttGuyScript:
end
TrainerBug_catcherWayne:
- trainer EVENT_BEAT_BUG_CATCHER_WAYNE, BUG_CATCHER, WAYNE, Bug_catcherWayneSeenText, Bug_catcherWayneBeatenText, 0, Bug_catcherWayneScript
+ trainer EVENT_BEAT_BUG_CATCHER_WAYNE, BUG_CATCHER, WAYNE, Bug_catcherWayneSeenText, Bug_catcherWayneBeatenText, 0, .Script
-Bug_catcherWayneScript:
+.Script:
end_if_just_battled
opentext
- writetext Bug_catcherWayneAfterText
+ writetext Bug_catcherWayneAfterBattleText
waitbutton
closetext
end
@@ -929,7 +926,7 @@ Bug_catcherWayneBeatenText:
line "#MON before…"
done
-Bug_catcherWayneAfterText:
+Bug_catcherWayneAfterBattleText:
text "A #MON I've"
line "never seen before"
@@ -952,27 +949,27 @@ IlexForest_MapEventHeader:
warp_def $2a, $3, 1, ILEX_FOREST_AZALEA_GATE
warp_def $2b, $3, 2, ILEX_FOREST_AZALEA_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 5
- signpost 17, 3, SIGNPOST_READ, MapIlexForestSignpost0Script
- signpost 7, 11, SIGNPOST_ITEM, IlexForestHiddenEther
- signpost 14, 22, SIGNPOST_ITEM, IlexForestHiddenSuperPotion
- signpost 17, 1, SIGNPOST_ITEM, IlexForestHiddenFullHeal
- signpost 22, 8, SIGNPOST_UP, MapIlexForestSignpost4Script
+ bg_event 17, 3, BGEVENT_READ, MapIlexForestSignpost0Script
+ bg_event 7, 11, BGEVENT_ITEM, IlexForestHiddenEther
+ bg_event 14, 22, BGEVENT_ITEM, IlexForestHiddenSuperPotion
+ bg_event 17, 1, BGEVENT_ITEM, IlexForestHiddenFullHeal
+ bg_event 22, 8, BGEVENT_UP, MapIlexForestSignpost4Script
-.PersonEvents:
+.ObjectEvents:
db 11
- person_event SPRITE_BIRD, 31, 14, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, IlexForestFarfetchdScript, EVENT_ILEX_FOREST_FARFETCHD
- person_event SPRITE_YOUNGSTER, 28, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, IlexForestCharcoalApprenticeScript, EVENT_ILEX_FOREST_APPRENTICE
- person_event SPRITE_BLACK_BELT, 28, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, IlexForestCharcoalMasterScript, EVENT_ILEX_FOREST_CHARCOAL_MASTER
- person_event SPRITE_ROCKER, 14, 15, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, IlexForestHeadbuttGuyScript, -1
- person_event SPRITE_POKE_BALL, 32, 20, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, IlexForestRevive, EVENT_ILEX_FOREST_REVIVE
- person_event SPRITE_KURT, 29, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_ILEX_FOREST_KURT
- person_event SPRITE_LASS, 24, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, IlexForestLassScript, EVENT_ILEX_FOREST_LASS
- person_event SPRITE_YOUNGSTER, 1, 12, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 0, TrainerBug_catcherWayne, -1
- person_event SPRITE_POKE_BALL, 17, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, IlexForestXAttack, EVENT_ILEX_FOREST_X_ATTACK
- person_event SPRITE_POKE_BALL, 7, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, IlexForestAntidote, EVENT_ILEX_FOREST_ANTIDOTE
- person_event SPRITE_POKE_BALL, 1, 27, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, IlexForestEther, EVENT_ILEX_FOREST_ETHER
+ object_event SPRITE_BIRD, 31, 14, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, IlexForestFarfetchdScript, EVENT_ILEX_FOREST_FARFETCHD
+ object_event SPRITE_YOUNGSTER, 28, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, IlexForestCharcoalApprenticeScript, EVENT_ILEX_FOREST_APPRENTICE
+ object_event SPRITE_BLACK_BELT, 28, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IlexForestCharcoalMasterScript, EVENT_ILEX_FOREST_CHARCOAL_MASTER
+ object_event SPRITE_ROCKER, 14, 15, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IlexForestHeadbuttGuyScript, -1
+ object_event SPRITE_POKE_BALL, 32, 20, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IlexForestRevive, EVENT_ILEX_FOREST_REVIVE
+ object_event SPRITE_KURT, 29, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ILEX_FOREST_KURT
+ object_event SPRITE_LASS, 24, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, IlexForestLassScript, EVENT_ILEX_FOREST_LASS
+ object_event SPRITE_YOUNGSTER, 1, 12, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 0, TrainerBug_catcherWayne, -1
+ object_event SPRITE_POKE_BALL, 17, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IlexForestXAttack, EVENT_ILEX_FOREST_X_ATTACK
+ object_event SPRITE_POKE_BALL, 7, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IlexForestAntidote, EVENT_ILEX_FOREST_ANTIDOTE
+ object_event SPRITE_POKE_BALL, 1, 27, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IlexForestEther, EVENT_ILEX_FOREST_ETHER
diff --git a/maps/IlexForestAzaleaGate.asm b/maps/IlexForestAzaleaGate.asm
index 25ffdfcd0..76a2925de 100644
--- a/maps/IlexForestAzaleaGate.asm
+++ b/maps/IlexForestAzaleaGate.asm
@@ -3,25 +3,25 @@ const_value set 2
const ILEXFORESTAZALEAGATE_GRANNY
IlexForestAzaleaGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-OfficerScript_0x62c7a:
- jumptextfaceplayer UnknownText_0x62c80
+IlexForestAzaleaGateOfficerScript:
+ jumptextfaceplayer IlexForestAzaleaGateOfficerText
-GrannyScript_0x62c7d:
- jumptextfaceplayer UnknownText_0x62cb0
+IlexForestAzaleaGateGrannyScript:
+ jumptextfaceplayer IlexForestAzaleaGateGrannyText
-UnknownText_0x62c80:
+IlexForestAzaleaGateOfficerText:
text "ILEX FOREST is"
line "big. Be careful!"
cont "Don't get lost."
done
-UnknownText_0x62cb0:
+IlexForestAzaleaGateGrannyText:
text "The FOREST is"
line "watched over by"
cont "its protector."
@@ -41,13 +41,13 @@ IlexForestAzaleaGate_MapEventHeader:
warp_def $4, $9, 7, AZALEA_TOWN
warp_def $5, $9, 8, AZALEA_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, OfficerScript_0x62c7a, -1
- person_event SPRITE_GRANNY, 3, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, GrannyScript_0x62c7d, -1
+ object_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, IlexForestAzaleaGateOfficerScript, -1
+ object_event SPRITE_GRANNY, 3, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, IlexForestAzaleaGateGrannyScript, -1
diff --git a/maps/IndigoPlateauPokeCenter1F.asm b/maps/IndigoPlateauPokeCenter1F.asm
deleted file mode 100644
index 4ebc80cd1..000000000
--- a/maps/IndigoPlateauPokeCenter1F.asm
+++ /dev/null
@@ -1,336 +0,0 @@
-const_value set 2
- const INDIGOPLATEAUPOKECENTER1F_NURSE
- const INDIGOPLATEAUPOKECENTER1F_CLERK
- const INDIGOPLATEAUPOKECENTER1F_COOLTRAINER_M
- const INDIGOPLATEAUPOKECENTER1F_SILVER
- const INDIGOPLATEAUPOKECENTER1F_GRAMPS
- const INDIGOPLATEAUPOKECENTER1F_ABRA
-
-IndigoPlateauPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 1
-
- ; triggers
- dw UnknownScript_0x180009, 0
-
-.MapCallbacks:
- db 1
-
- ; callbacks
-
- dbw MAPCALLBACK_NEWMAP, UnknownScript_0x18000a
-
-UnknownScript_0x180009:
- end
-
-UnknownScript_0x18000a:
- domaptrigger WILLS_ROOM, $0
- domaptrigger KOGAS_ROOM, $0
- domaptrigger BRUNOS_ROOM, $0
- domaptrigger KARENS_ROOM, $0
- domaptrigger LANCES_ROOM, $0
- domaptrigger HALL_OF_FAME, $0
- clearevent EVENT_WILLS_ROOM_ENTRANCE_CLOSED
- clearevent EVENT_WILLS_ROOM_EXIT_OPEN
- clearevent EVENT_KOGAS_ROOM_ENTRANCE_CLOSED
- clearevent EVENT_KOGAS_ROOM_EXIT_OPEN
- clearevent EVENT_BRUNOS_ROOM_ENTRANCE_CLOSED
- clearevent EVENT_BRUNOS_ROOM_EXIT_OPEN
- clearevent EVENT_KARENS_ROOM_ENTRANCE_CLOSED
- clearevent EVENT_KARENS_ROOM_EXIT_OPEN
- clearevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED
- clearevent EVENT_LANCES_ROOM_EXIT_OPEN
- clearevent EVENT_BEAT_ELITE_4_WILL
- clearevent EVENT_BEAT_ELITE_4_KOGA
- clearevent EVENT_BEAT_ELITE_4_BRUNO
- clearevent EVENT_BEAT_ELITE_4_KAREN
- clearevent EVENT_BEAT_CHAMPION_LANCE
- setevent EVENT_LANCES_ROOM_OAK_AND_MARY
- return
-
-PlateauRivalBattle1:
- checkevent EVENT_BEAT_RIVAL_IN_MT_MOON
- iffalse PlateauRivalScriptDone
- checkflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
- iftrue PlateauRivalScriptDone
- checkcode VAR_WEEKDAY
- if_equal SUNDAY, PlateauRivalScriptDone
- if_equal TUESDAY, PlateauRivalScriptDone
- if_equal THURSDAY, PlateauRivalScriptDone
- if_equal FRIDAY, PlateauRivalScriptDone
- if_equal SATURDAY, PlateauRivalScriptDone
- moveperson INDIGOPLATEAUPOKECENTER1F_SILVER, $11, $9
- appear INDIGOPLATEAUPOKECENTER1F_SILVER
- spriteface PLAYER, DOWN
- showemote EMOTE_SHOCK, PLAYER, 15
- special Special_FadeOutMusic
- pause 15
- applymovement INDIGOPLATEAUPOKECENTER1F_SILVER, PlateauRivalMovement1
- playmusic MUSIC_RIVAL_ENCOUNTER
- spriteface PLAYER, RIGHT
- jump PlateauRivalBattleCommon
-
-PlateauRivalBattle2:
- checkevent EVENT_BEAT_RIVAL_IN_MT_MOON
- iffalse PlateauRivalScriptDone
- checkflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
- iftrue PlateauRivalScriptDone
- checkcode VAR_WEEKDAY
- if_equal SUNDAY, PlateauRivalScriptDone
- if_equal TUESDAY, PlateauRivalScriptDone
- if_equal THURSDAY, PlateauRivalScriptDone
- if_equal FRIDAY, PlateauRivalScriptDone
- if_equal SATURDAY, PlateauRivalScriptDone
- appear INDIGOPLATEAUPOKECENTER1F_SILVER
- spriteface PLAYER, DOWN
- showemote EMOTE_SHOCK, PLAYER, 15
- special Special_FadeOutMusic
- pause 15
- applymovement INDIGOPLATEAUPOKECENTER1F_SILVER, PlateauRivalMovement2
- playmusic MUSIC_RIVAL_ENCOUNTER
- spriteface PLAYER, LEFT
-PlateauRivalBattleCommon:
- opentext
- writetext PlateauRivalText1
- waitbutton
- closetext
- setevent EVENT_INDIGO_PLATEAU_POKECENTER_RIVAL
- checkevent EVENT_GOT_TOTODILE_FROM_ELM
- iftrue .Totodile
- checkevent EVENT_GOT_CHIKORITA_FROM_ELM
- iftrue .Chikorita
- ; Cyndaquil
- winlosstext PlateauRivalWinText, PlateauRivalLoseText
- setlasttalked INDIGOPLATEAUPOKECENTER1F_SILVER
- loadtrainer RIVAL2, 6
- startbattle
- dontrestartmapmusic
- reloadmapafterbattle
- jump PlateauRivalPostBattle
-
-.Totodile:
- winlosstext PlateauRivalWinText, PlateauRivalLoseText
- setlasttalked INDIGOPLATEAUPOKECENTER1F_SILVER
- loadtrainer RIVAL2, 4
- startbattle
- dontrestartmapmusic
- reloadmapafterbattle
- jump PlateauRivalPostBattle
-
-.Chikorita:
- winlosstext PlateauRivalWinText, PlateauRivalLoseText
- setlasttalked INDIGOPLATEAUPOKECENTER1F_SILVER
- loadtrainer RIVAL2, 5
- startbattle
- dontrestartmapmusic
- reloadmapafterbattle
- jump PlateauRivalPostBattle
-
-PlateauRivalPostBattle:
- playmusic MUSIC_RIVAL_AFTER
- opentext
- writetext PlateauRivalText2
- waitbutton
- closetext
- spriteface PLAYER, DOWN
- applymovement INDIGOPLATEAUPOKECENTER1F_SILVER, PlateauRivalLeavesMovement
- disappear INDIGOPLATEAUPOKECENTER1F_SILVER
- dotrigger $0
- playmapmusic
- setflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
-PlateauRivalScriptDone:
- end
-
-NurseScript_0x18012c:
- jumpstd pokecenternurse
-
-ClerkScript_0x18012f:
- opentext
- pokemart MARTTYPE_STANDARD, MART_INDIGO_PLATEAU
- closetext
- end
-
-CooltrainerMScript_0x180136:
- jumptextfaceplayer UnknownText_0x180178
-
-TeleportGuyScript:
- faceplayer
- opentext
- writetext TeleportGuyText1
- yesorno
- iffalse .No
- writetext TeleportGuyYesText
- waitbutton
- closetext
- playsound SFX_WARP_TO
- special FadeOutPalettes
- waitsfx
- warp NEW_BARK_TOWN, $d, $6
- end
-
-.No:
- writetext TeleportGuyNoText
- waitbutton
- closetext
- end
-
-AbraScript:
- opentext
- writetext AbraText
- cry ABRA
- waitbutton
- closetext
- end
-
-PlateauRivalMovement1:
- step UP
- step UP
- step UP
- step UP
- step UP
- turn_head LEFT
- step_end
-
-PlateauRivalMovement2:
- step UP
- step UP
- step UP
- step UP
- step UP
- turn_head RIGHT
- step_end
-
-PlateauRivalLeavesMovement:
- step DOWN
- step DOWN
- step DOWN
- step DOWN
- step DOWN
- step_end
-
-UnknownText_0x180178:
- text "At the #MON"
- line "LEAGUE, you'll get"
-
- para "tested by the"
- line "ELITE FOUR."
-
- para "You have to beat"
- line "them all. If you"
-
- para "lose, you have to"
- line "start all over!"
- done
-
-PlateauRivalText1:
- text "Hold it."
-
- para "You're going to"
- line "take the #MON"
-
- para "LEAGUE challenge"
- line "now?"
-
- para "That's not going"
- line "to happen."
-
- para "My super-well-"
- line "trained #MON"
-
- para "are going to pound"
- line "you."
-
- para "<PLAYER>!"
- line "I challenge you!"
- done
-
-PlateauRivalWinText:
- text "…"
-
- para "OK--I lost…"
- done
-
-PlateauRivalText2:
- text "…Darn… I still"
- line "can't win…"
-
- para "I… I have to think"
- line "more about my"
- cont "#MON…"
-
- para "Humph! Try not to"
- line "lose!"
- done
-
-PlateauRivalLoseText:
- text "…"
-
- para "Whew…"
- line "With my partners,"
-
- para "I'm going to be"
- line "the CHAMPION!"
- done
-
-TeleportGuyText1:
- text "Ah! You're chal-"
- line "lenging the ELITE"
-
- para "FOUR? Are you sure"
- line "you're ready?"
-
- para "If you need to"
- line "train some more,"
-
- para "my ABRA can help"
- line "you."
-
- para "It can TELEPORT"
- line "you home."
-
- para "Would you like to"
- line "go home now?"
- done
-
-TeleportGuyYesText:
- text "OK, OK. Picture"
- line "your house in your"
- cont "mind…"
- done
-
-TeleportGuyNoText:
- text "OK, OK. The best"
- line "of luck to you!"
- done
-
-AbraText:
- text "ABRA: Aabra…"
- done
-
-IndigoPlateauPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 4
- warp_def $d, $5, 1, ROUTE_23
- warp_def $d, $6, 2, ROUTE_23
- warp_def $d, $0, 1, POKECENTER_2F
- warp_def $3, $e, 1, WILLS_ROOM
-
-.XYTriggers:
- db 2
- xy_trigger 0, $4, $10, $0, PlateauRivalBattle1, $0, $0
- xy_trigger 0, $4, $11, $0, PlateauRivalBattle2, $0, $0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 6
- person_event SPRITE_NURSE, 7, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x18012c, -1
- person_event SPRITE_CLERK, 7, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x18012f, -1
- person_event SPRITE_COOLTRAINER_M, 11, 11, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x180136, -1
- person_event SPRITE_SILVER, 9, 16, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_INDIGO_PLATEAU_POKECENTER_RIVAL
- person_event SPRITE_GRAMPS, 9, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, TeleportGuyScript, EVENT_TELEPORT_GUY
- person_event SPRITE_JYNX, 9, 0, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, AbraScript, EVENT_TELEPORT_GUY
diff --git a/maps/IndigoPlateauPokecenter1F.asm b/maps/IndigoPlateauPokecenter1F.asm
new file mode 100644
index 000000000..dc657df20
--- /dev/null
+++ b/maps/IndigoPlateauPokecenter1F.asm
@@ -0,0 +1,331 @@
+const_value set 2
+ const INDIGOPLATEAUPOKECENTER1F_NURSE
+ const INDIGOPLATEAUPOKECENTER1F_CLERK
+ const INDIGOPLATEAUPOKECENTER1F_COOLTRAINER_M
+ const INDIGOPLATEAUPOKECENTER1F_SILVER
+ const INDIGOPLATEAUPOKECENTER1F_GRAMPS
+ const INDIGOPLATEAUPOKECENTER1F_ABRA
+
+IndigoPlateauPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 1
+ scene_script .DummyScene
+
+.MapCallbacks:
+ db 1
+ dbw MAPCALLBACK_NEWMAP, .PrepareElite4
+
+.DummyScene:
+ end
+
+.PrepareElite4:
+ setmapscene WILLS_ROOM, $0
+ setmapscene KOGAS_ROOM, $0
+ setmapscene BRUNOS_ROOM, $0
+ setmapscene KARENS_ROOM, $0
+ setmapscene LANCES_ROOM, $0
+ setmapscene HALL_OF_FAME, $0
+ clearevent EVENT_WILLS_ROOM_ENTRANCE_CLOSED
+ clearevent EVENT_WILLS_ROOM_EXIT_OPEN
+ clearevent EVENT_KOGAS_ROOM_ENTRANCE_CLOSED
+ clearevent EVENT_KOGAS_ROOM_EXIT_OPEN
+ clearevent EVENT_BRUNOS_ROOM_ENTRANCE_CLOSED
+ clearevent EVENT_BRUNOS_ROOM_EXIT_OPEN
+ clearevent EVENT_KARENS_ROOM_ENTRANCE_CLOSED
+ clearevent EVENT_KARENS_ROOM_EXIT_OPEN
+ clearevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED
+ clearevent EVENT_LANCES_ROOM_EXIT_OPEN
+ clearevent EVENT_BEAT_ELITE_4_WILL
+ clearevent EVENT_BEAT_ELITE_4_KOGA
+ clearevent EVENT_BEAT_ELITE_4_BRUNO
+ clearevent EVENT_BEAT_ELITE_4_KAREN
+ clearevent EVENT_BEAT_CHAMPION_LANCE
+ setevent EVENT_LANCES_ROOM_OAK_AND_MARY
+ return
+
+PlateauRivalBattle1:
+ checkevent EVENT_BEAT_RIVAL_IN_MT_MOON
+ iffalse PlateauRivalScriptDone
+ checkflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
+ iftrue PlateauRivalScriptDone
+ checkcode VAR_WEEKDAY
+ if_equal SUNDAY, PlateauRivalScriptDone
+ if_equal TUESDAY, PlateauRivalScriptDone
+ if_equal THURSDAY, PlateauRivalScriptDone
+ if_equal FRIDAY, PlateauRivalScriptDone
+ if_equal SATURDAY, PlateauRivalScriptDone
+ moveobject INDIGOPLATEAUPOKECENTER1F_SILVER, $11, $9
+ appear INDIGOPLATEAUPOKECENTER1F_SILVER
+ spriteface PLAYER, DOWN
+ showemote EMOTE_SHOCK, PLAYER, 15
+ special Special_FadeOutMusic
+ pause 15
+ applymovement INDIGOPLATEAUPOKECENTER1F_SILVER, PlateauRivalMovement1
+ playmusic MUSIC_RIVAL_ENCOUNTER
+ spriteface PLAYER, RIGHT
+ jump PlateauRivalBattleCommon
+
+PlateauRivalBattle2:
+ checkevent EVENT_BEAT_RIVAL_IN_MT_MOON
+ iffalse PlateauRivalScriptDone
+ checkflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
+ iftrue PlateauRivalScriptDone
+ checkcode VAR_WEEKDAY
+ if_equal SUNDAY, PlateauRivalScriptDone
+ if_equal TUESDAY, PlateauRivalScriptDone
+ if_equal THURSDAY, PlateauRivalScriptDone
+ if_equal FRIDAY, PlateauRivalScriptDone
+ if_equal SATURDAY, PlateauRivalScriptDone
+ appear INDIGOPLATEAUPOKECENTER1F_SILVER
+ spriteface PLAYER, DOWN
+ showemote EMOTE_SHOCK, PLAYER, 15
+ special Special_FadeOutMusic
+ pause 15
+ applymovement INDIGOPLATEAUPOKECENTER1F_SILVER, PlateauRivalMovement2
+ playmusic MUSIC_RIVAL_ENCOUNTER
+ spriteface PLAYER, LEFT
+PlateauRivalBattleCommon:
+ opentext
+ writetext PlateauRivalText1
+ waitbutton
+ closetext
+ setevent EVENT_INDIGO_PLATEAU_POKECENTER_RIVAL
+ checkevent EVENT_GOT_TOTODILE_FROM_ELM
+ iftrue .Totodile
+ checkevent EVENT_GOT_CHIKORITA_FROM_ELM
+ iftrue .Chikorita
+ ; Cyndaquil
+ winlosstext PlateauRivalWinText, PlateauRivalLoseText
+ setlasttalked INDIGOPLATEAUPOKECENTER1F_SILVER
+ loadtrainer RIVAL2, RIVAL2_2_TOTODILE
+ startbattle
+ dontrestartmapmusic
+ reloadmapafterbattle
+ jump PlateauRivalPostBattle
+
+.Totodile:
+ winlosstext PlateauRivalWinText, PlateauRivalLoseText
+ setlasttalked INDIGOPLATEAUPOKECENTER1F_SILVER
+ loadtrainer RIVAL2, RIVAL2_2_CHIKORITA
+ startbattle
+ dontrestartmapmusic
+ reloadmapafterbattle
+ jump PlateauRivalPostBattle
+
+.Chikorita:
+ winlosstext PlateauRivalWinText, PlateauRivalLoseText
+ setlasttalked INDIGOPLATEAUPOKECENTER1F_SILVER
+ loadtrainer RIVAL2, RIVAL2_2_CYNDAQUIL
+ startbattle
+ dontrestartmapmusic
+ reloadmapafterbattle
+ jump PlateauRivalPostBattle
+
+PlateauRivalPostBattle:
+ playmusic MUSIC_RIVAL_AFTER
+ opentext
+ writetext PlateauRivalText2
+ waitbutton
+ closetext
+ spriteface PLAYER, DOWN
+ applymovement INDIGOPLATEAUPOKECENTER1F_SILVER, PlateauRivalLeavesMovement
+ disappear INDIGOPLATEAUPOKECENTER1F_SILVER
+ setscene $0
+ playmapmusic
+ setflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
+PlateauRivalScriptDone:
+ end
+
+NurseScript_0x18012c:
+ jumpstd pokecenternurse
+
+ClerkScript_0x18012f:
+ opentext
+ pokemart MARTTYPE_STANDARD, MART_INDIGO_PLATEAU
+ closetext
+ end
+
+IndigoPlateauPokecenter1FCooltrainerMScript:
+ jumptextfaceplayer IndigoPlateauPokecenter1FCooltrainerMText
+
+TeleportGuyScript:
+ faceplayer
+ opentext
+ writetext TeleportGuyText1
+ yesorno
+ iffalse .No
+ writetext TeleportGuyYesText
+ waitbutton
+ closetext
+ playsound SFX_WARP_TO
+ special FadeOutPalettes
+ waitsfx
+ warp NEW_BARK_TOWN, $d, $6
+ end
+
+.No:
+ writetext TeleportGuyNoText
+ waitbutton
+ closetext
+ end
+
+AbraScript:
+ opentext
+ writetext AbraText
+ cry ABRA
+ waitbutton
+ closetext
+ end
+
+PlateauRivalMovement1:
+ step UP
+ step UP
+ step UP
+ step UP
+ step UP
+ turn_head LEFT
+ step_end
+
+PlateauRivalMovement2:
+ step UP
+ step UP
+ step UP
+ step UP
+ step UP
+ turn_head RIGHT
+ step_end
+
+PlateauRivalLeavesMovement:
+ step DOWN
+ step DOWN
+ step DOWN
+ step DOWN
+ step DOWN
+ step_end
+
+IndigoPlateauPokecenter1FCooltrainerMText:
+ text "At the #MON"
+ line "LEAGUE, you'll get"
+
+ para "tested by the"
+ line "ELITE FOUR."
+
+ para "You have to beat"
+ line "them all. If you"
+
+ para "lose, you have to"
+ line "start all over!"
+ done
+
+PlateauRivalText1:
+ text "Hold it."
+
+ para "You're going to"
+ line "take the #MON"
+
+ para "LEAGUE challenge"
+ line "now?"
+
+ para "That's not going"
+ line "to happen."
+
+ para "My super-well-"
+ line "trained #MON"
+
+ para "are going to pound"
+ line "you."
+
+ para "<PLAYER>!"
+ line "I challenge you!"
+ done
+
+PlateauRivalWinText:
+ text "…"
+
+ para "OK--I lost…"
+ done
+
+PlateauRivalText2:
+ text "…Darn… I still"
+ line "can't win…"
+
+ para "I… I have to think"
+ line "more about my"
+ cont "#MON…"
+
+ para "Humph! Try not to"
+ line "lose!"
+ done
+
+PlateauRivalLoseText:
+ text "…"
+
+ para "Whew…"
+ line "With my partners,"
+
+ para "I'm going to be"
+ line "the CHAMPION!"
+ done
+
+TeleportGuyText1:
+ text "Ah! You're chal-"
+ line "lenging the ELITE"
+
+ para "FOUR? Are you sure"
+ line "you're ready?"
+
+ para "If you need to"
+ line "train some more,"
+
+ para "my ABRA can help"
+ line "you."
+
+ para "It can TELEPORT"
+ line "you home."
+
+ para "Would you like to"
+ line "go home now?"
+ done
+
+TeleportGuyYesText:
+ text "OK, OK. Picture"
+ line "your house in your"
+ cont "mind…"
+ done
+
+TeleportGuyNoText:
+ text "OK, OK. The best"
+ line "of luck to you!"
+ done
+
+AbraText:
+ text "ABRA: Aabra…"
+ done
+
+IndigoPlateauPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 4
+ warp_def $d, $5, 1, ROUTE_23
+ warp_def $d, $6, 2, ROUTE_23
+ warp_def $d, $0, 1, POKECENTER_2F
+ warp_def $3, $e, 1, WILLS_ROOM
+
+.CoordEvents:
+ db 2
+ coord_event 0, $4, $10, PlateauRivalBattle1
+ coord_event 0, $4, $11, PlateauRivalBattle2
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 6
+ object_event SPRITE_NURSE, 7, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x18012c, -1
+ object_event SPRITE_CLERK, 7, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x18012f, -1
+ object_event SPRITE_COOLTRAINER_M, 11, 11, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IndigoPlateauPokecenter1FCooltrainerMScript, -1
+ object_event SPRITE_SILVER, 9, 16, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_INDIGO_PLATEAU_POKECENTER_RIVAL
+ object_event SPRITE_GRAMPS, 9, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, TeleportGuyScript, EVENT_TELEPORT_GUY
+ object_event SPRITE_JYNX, 9, 0, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, AbraScript, EVENT_TELEPORT_GUY
diff --git a/maps/IndigoPlateauPokeCenter1F.blk b/maps/IndigoPlateauPokecenter1F.blk
index 96c6a225b..96c6a225b 100644
--- a/maps/IndigoPlateauPokeCenter1F.blk
+++ b/maps/IndigoPlateauPokecenter1F.blk
diff --git a/maps/KarensRoom.asm b/maps/KarensRoom.asm
index 6ab50b3fc..a24500d24 100644
--- a/maps/KarensRoom.asm
+++ b/maps/KarensRoom.asm
@@ -2,25 +2,20 @@ const_value set 2
const KARENSROOM_KAREN
KarensRoom_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw .Trigger0, 0
- dw .Trigger1, 0
+ scene_script .LockDoor
+ scene_script .DummyScene
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_TILES, .KarensRoomDoors
-.Trigger0:
+.LockDoor:
priorityjump .KarensDoorLocksBehindYou
end
-.Trigger1:
+.DummyScene:
end
.KarensRoomDoors:
@@ -42,7 +37,7 @@ KarensRoom_MapScriptHeader:
changeblock $4, $e, $2a
reloadmappart
closetext
- dotrigger $1
+ setscene $1
setevent EVENT_KARENS_ROOM_ENTRANCE_CLOSED
waitsfx
end
@@ -148,12 +143,12 @@ KarensRoom_MapEventHeader:
warp_def $2, $4, 1, LANCES_ROOM
warp_def $2, $5, 2, LANCES_ROOM
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_KAREN, 7, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, KarenScript_Battle, -1
+ object_event SPRITE_KAREN, 7, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, KarenScript_Battle, -1
diff --git a/maps/KogasRoom.asm b/maps/KogasRoom.asm
index 35fcb68b7..15d7185ab 100644
--- a/maps/KogasRoom.asm
+++ b/maps/KogasRoom.asm
@@ -2,25 +2,20 @@ const_value set 2
const KOGASROOM_KOGA
KogasRoom_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw .Trigger0, 0
- dw .Trigger1, 0
+ scene_script .LockDoor
+ scene_script .DummyScene
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_TILES, .KogasRoomDoors
-.Trigger0:
+.LockDoor:
priorityjump .KogasDoorLocksBehindYou
end
-.Trigger1:
+.DummyScene:
end
.KogasRoomDoors:
@@ -42,7 +37,7 @@ KogasRoom_MapScriptHeader:
changeblock $4, $e, $2a
reloadmappart
closetext
- dotrigger $1
+ setscene $1
setevent EVENT_KOGAS_ROOM_ENTRANCE_CLOSED
waitsfx
end
@@ -145,12 +140,12 @@ KogasRoom_MapEventHeader:
warp_def $2, $4, 1, BRUNOS_ROOM
warp_def $2, $5, 2, BRUNOS_ROOM
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_KOGA, 7, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, KogaScript_Battle, -1
+ object_event SPRITE_KOGA, 7, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, KogaScript_Battle, -1
diff --git a/maps/KrissHouse1F.asm b/maps/KrissHouse1F.asm
index 70aad1590..20d5d0b7e 100644
--- a/maps/KrissHouse1F.asm
+++ b/maps/KrissHouse1F.asm
@@ -6,20 +6,18 @@ const_value set 2
const KRISSHOUSE1F_POKEFAN_F
KrissHouse1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x7a4d6, 0
- dw UnknownScript_0x7a4d7, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 0
-UnknownScript_0x7a4d6:
+.DummyScene0:
end
-UnknownScript_0x7a4d7:
+.DummyScene1:
end
UnknownScript_0x7a4d8:
@@ -45,7 +43,7 @@ UnknownScript_0x7a4f6:
setflag ENGINE_POKEGEAR
setflag ENGINE_PHONE_CARD
addcellnum PHONE_MOM
- dotrigger $1
+ setscene $1
setevent EVENT_KRISS_HOUSE_MOM_1
clearevent EVENT_KRISS_HOUSE_MOM_2
writetext UnknownText_0x7a6bd
@@ -117,7 +115,7 @@ UnknownScript_0x7a57e:
MomScript_0x7a582:
faceplayer
setevent EVENT_RECEIVED_BALLS_FROM_KURT
- checktriggers
+ checkscene
iffalse UnknownScript_0x7a572
opentext
checkevent EVENT_FIRST_TIME_BANKING_WITH_MOM
@@ -397,22 +395,22 @@ KrissHouse1F_MapEventHeader:
warp_def $7, $7, 2, NEW_BARK_TOWN
warp_def $0, $9, 1, KRISS_HOUSE_2F
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 0, $4, $8, $0, UnknownScript_0x7a4d8, $0, $0
- xy_trigger 0, $4, $9, $0, UnknownScript_0x7a4db, $0, $0
+ coord_event 0, $4, $8, UnknownScript_0x7a4d8
+ coord_event 0, $4, $9, UnknownScript_0x7a4db
-.Signposts:
+.BGEvents:
db 4
- signpost 1, 0, SIGNPOST_READ, StoveScript
- signpost 1, 1, SIGNPOST_READ, SinkScript
- signpost 1, 2, SIGNPOST_READ, FridgeScript
- signpost 1, 4, SIGNPOST_READ, TVScript
+ bg_event 1, 0, BGEVENT_READ, StoveScript
+ bg_event 1, 1, BGEVENT_READ, SinkScript
+ bg_event 1, 2, BGEVENT_READ, FridgeScript
+ bg_event 1, 4, BGEVENT_READ, TVScript
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_MOM, 4, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, MomScript_0x7a582, EVENT_KRISS_HOUSE_MOM_1
- person_event SPRITE_MOM, 2, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, 1, 0, PERSONTYPE_SCRIPT, 0, MomScript_0x7a582, EVENT_KRISS_HOUSE_MOM_2
- person_event SPRITE_MOM, 4, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, 2, 0, PERSONTYPE_SCRIPT, 0, MomScript_0x7a582, EVENT_KRISS_HOUSE_MOM_2
- person_event SPRITE_MOM, 2, 0, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, 4, 0, PERSONTYPE_SCRIPT, 0, MomScript_0x7a582, EVENT_KRISS_HOUSE_MOM_2
- person_event SPRITE_POKEFAN_F, 4, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, NeighborScript, EVENT_KRISS_HOUSE_1F_NEIGHBOR
+ object_event SPRITE_MOM, 4, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MomScript_0x7a582, EVENT_KRISS_HOUSE_MOM_1
+ object_event SPRITE_MOM, 2, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, MORN, 0, OBJECTTYPE_SCRIPT, 0, MomScript_0x7a582, EVENT_KRISS_HOUSE_MOM_2
+ object_event SPRITE_MOM, 4, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, DAY, 0, OBJECTTYPE_SCRIPT, 0, MomScript_0x7a582, EVENT_KRISS_HOUSE_MOM_2
+ object_event SPRITE_MOM, 2, 0, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, NITE, 0, OBJECTTYPE_SCRIPT, 0, MomScript_0x7a582, EVENT_KRISS_HOUSE_MOM_2
+ object_event SPRITE_POKEFAN_F, 4, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, NeighborScript, EVENT_KRISS_HOUSE_1F_NEIGHBOR
diff --git a/maps/KrissHouse2F.asm b/maps/KrissHouse2F.asm
index f847f6fa0..528dc505f 100644
--- a/maps/KrissHouse2F.asm
+++ b/maps/KrissHouse2F.asm
@@ -5,16 +5,12 @@ const_value set 2
const KRISSHOUSE2F_BIG_DOLL
KrissHouse2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 2
-
- ; callbacks
-
dbw MAPCALLBACK_NEWMAP, .InitializeRoom
-
dbw MAPCALLBACK_TILES, .SetSpawn
.Null:
@@ -53,6 +49,7 @@ GameConsole:
KrissHousePoster:
dw EVENT_KRISS_ROOM_POSTER, .Script
+
.Script:
describedecoration 0
@@ -127,19 +124,19 @@ KrissHouse2F_MapEventHeader:
db 1
warp_def $0, $7, 3, KRISS_HOUSE_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 4
- signpost 1, 2, SIGNPOST_UP, KrissHousePC
- signpost 1, 3, SIGNPOST_READ, KrissHouseRadio
- signpost 1, 5, SIGNPOST_READ, KrissHouseBookshelf
- signpost 0, 6, SIGNPOST_IFSET, KrissHousePoster
+ bg_event 1, 2, BGEVENT_UP, KrissHousePC
+ bg_event 1, 3, BGEVENT_READ, KrissHouseRadio
+ bg_event 1, 5, BGEVENT_READ, KrissHouseBookshelf
+ bg_event 0, 6, BGEVENT_IFSET, KrissHousePoster
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_CONSOLE, 2, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GameConsole, EVENT_KRISS_HOUSE_2F_CONSOLE
- person_event SPRITE_DOLL_1, 4, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Doll1, EVENT_KRISS_HOUSE_2F_DOLL_1
- person_event SPRITE_DOLL_2, 4, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Doll2, EVENT_KRISS_HOUSE_2F_DOLL_2
- person_event SPRITE_BIG_DOLL, 1, 0, SPRITEMOVEDATA_BIGDOLL, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BigDoll, EVENT_KRISS_HOUSE_2F_BIG_DOLL
+ object_event SPRITE_CONSOLE, 2, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GameConsole, EVENT_KRISS_HOUSE_2F_CONSOLE
+ object_event SPRITE_DOLL_1, 4, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Doll1, EVENT_KRISS_HOUSE_2F_DOLL_1
+ object_event SPRITE_DOLL_2, 4, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Doll2, EVENT_KRISS_HOUSE_2F_DOLL_2
+ object_event SPRITE_BIG_DOLL, 1, 0, SPRITEMOVEDATA_BIGDOLL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BigDoll, EVENT_KRISS_HOUSE_2F_BIG_DOLL
diff --git a/maps/KrissNeighborsHouse.asm b/maps/KrissNeighborsHouse.asm
index 70fc3794e..44dbd8449 100644
--- a/maps/KrissNeighborsHouse.asm
+++ b/maps/KrissNeighborsHouse.asm
@@ -3,7 +3,7 @@ const_value set 2
const KRISSNEIGHBORSHOUSE_POKEFAN_F
KrissNeighborsHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -107,16 +107,16 @@ KrissNeighborsHouse_MapEventHeader:
warp_def $7, $2, 3, NEW_BARK_TOWN
warp_def $7, $3, 3, NEW_BARK_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 1, 0, SIGNPOST_READ, KrissNeighborsHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, KrissNeighborsHouseBookshelf
- signpost 1, 7, SIGNPOST_READ, KrissNeighborsHouseRadio
+ bg_event 1, 0, BGEVENT_READ, KrissNeighborsHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, KrissNeighborsHouseBookshelf
+ bg_event 1, 7, BGEVENT_READ, KrissNeighborsHouseRadio
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_COOLTRAINER_F, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, KrissNeighborsDaughter, -1
- person_event SPRITE_POKEFAN_F, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, KrissNeighbor, EVENT_KRISS_NEIGHBORS_HOUSE_NEIGHBOR
+ object_event SPRITE_COOLTRAINER_F, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, KrissNeighborsDaughter, -1
+ object_event SPRITE_POKEFAN_F, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, KrissNeighbor, EVENT_KRISS_NEIGHBORS_HOUSE_NEIGHBOR
diff --git a/maps/KurtsHouse.asm b/maps/KurtsHouse.asm
index 17a278d65..ffbc78ea1 100644
--- a/maps/KurtsHouse.asm
+++ b/maps/KurtsHouse.asm
@@ -6,35 +6,32 @@ const_value set 2
const KURTSHOUSE_TWIN2
KurtsHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_OBJECTS, .KurtCallback
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, UnknownScript_0x18e154
-
-UnknownScript_0x18e154:
+.KurtCallback:
checkevent EVENT_CLEARED_SLOWPOKE_WELL
- iffalse UnknownScript_0x18e177
+ iffalse .Done
checkevent EVENT_FOREST_IS_RESTLESS
- iftrue UnknownScript_0x18e177
+ iftrue .Done
checkflag ENGINE_KURT_MAKING_BALLS
- iftrue UnknownScript_0x18e16f
+ iftrue .MakingBalls
disappear KURTSHOUSE_KURT2
appear KURTSHOUSE_KURT1
disappear KURTSHOUSE_TWIN2
appear KURTSHOUSE_TWIN1
return
-UnknownScript_0x18e16f:
+.MakingBalls:
disappear KURTSHOUSE_KURT1
appear KURTSHOUSE_KURT2
disappear KURTSHOUSE_TWIN1
appear KURTSHOUSE_TWIN2
-UnknownScript_0x18e177:
+.Done:
return
KurtScript_0x18e178:
@@ -314,7 +311,7 @@ KurtScript_0x18e178:
clearevent EVENT_AZALEA_TOWN_KURT
waitsfx
special RestartMapMusic
- domaptrigger AZALEA_TOWN, $2
+ setmapscene AZALEA_TOWN, $2
end
KurtScript_0x18e3bd:
@@ -688,23 +685,23 @@ KurtsHouse_MapEventHeader:
warp_def $7, $3, 4, AZALEA_TOWN
warp_def $7, $4, 4, AZALEA_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 7
- signpost 1, 6, SIGNPOST_READ, KurtsHouseRadio
- signpost 0, 8, SIGNPOST_READ, KurtsHouseOakPhoto
- signpost 0, 9, SIGNPOST_READ, KurtsHouseOakPhoto
- signpost 1, 5, SIGNPOST_READ, KurtsHouseBookshelf
- signpost 1, 2, SIGNPOST_READ, KurtsHouseBookshelf
- signpost 1, 3, SIGNPOST_READ, KurtsHouseBookshelf
- signpost 1, 4, SIGNPOST_READ, KurtsHouseCelebiStatue
-
-.PersonEvents:
+ bg_event 1, 6, BGEVENT_READ, KurtsHouseRadio
+ bg_event 0, 8, BGEVENT_READ, KurtsHouseOakPhoto
+ bg_event 0, 9, BGEVENT_READ, KurtsHouseOakPhoto
+ bg_event 1, 5, BGEVENT_READ, KurtsHouseBookshelf
+ bg_event 1, 2, BGEVENT_READ, KurtsHouseBookshelf
+ bg_event 1, 3, BGEVENT_READ, KurtsHouseBookshelf
+ bg_event 1, 4, BGEVENT_READ, KurtsHouseCelebiStatue
+
+.ObjectEvents:
db 5
- person_event SPRITE_KURT, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, KurtScript_0x18e178, EVENT_KURTS_HOUSE_KURT_1
- person_event SPRITE_TWIN, 3, 5, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, KurtsGranddaughter1, EVENT_KURTS_HOUSE_GRANDDAUGHTER_1
- person_event SPRITE_SLOWPOKE, 3, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, KurtsHouseSlowpoke, EVENT_KURTS_HOUSE_SLOWPOKE
- person_event SPRITE_KURT, 3, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, KurtScript_0x18e3bd, EVENT_KURTS_HOUSE_KURT_2
- person_event SPRITE_TWIN, 4, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, KurtsGranddaughter2, EVENT_KURTS_HOUSE_GRANDDAUGHTER_2
+ object_event SPRITE_KURT, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, KurtScript_0x18e178, EVENT_KURTS_HOUSE_KURT_1
+ object_event SPRITE_TWIN, 3, 5, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, KurtsGranddaughter1, EVENT_KURTS_HOUSE_GRANDDAUGHTER_1
+ object_event SPRITE_SLOWPOKE, 3, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, KurtsHouseSlowpoke, EVENT_KURTS_HOUSE_SLOWPOKE
+ object_event SPRITE_KURT, 3, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, KurtScript_0x18e3bd, EVENT_KURTS_HOUSE_KURT_2
+ object_event SPRITE_TWIN, 4, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, KurtsGranddaughter2, EVENT_KURTS_HOUSE_GRANDDAUGHTER_2
diff --git a/maps/LakeOfRage.asm b/maps/LakeOfRage.asm
new file mode 100644
index 000000000..80200cebc
--- /dev/null
+++ b/maps/LakeOfRage.asm
@@ -0,0 +1,532 @@
+const_value set 2
+ const LAKEOFRAGE_LANCE
+ const LAKEOFRAGE_GRAMPS
+ const LAKEOFRAGE_SUPER_NERD1
+ const LAKEOFRAGE_COOLTRAINER_F1
+ const LAKEOFRAGE_FISHER1
+ const LAKEOFRAGE_FISHER2
+ const LAKEOFRAGE_COOLTRAINER_M
+ const LAKEOFRAGE_COOLTRAINER_F2
+ const LAKEOFRAGE_GYARADOS
+ const LAKEOFRAGE_WESLEY
+ const LAKEOFRAGE_POKE_BALL1
+ const LAKEOFRAGE_POKE_BALL2
+
+LakeOfRage_MapScriptHeader:
+.SceneScripts:
+ db 2
+ scene_script .DummyScene0
+ scene_script .DummyScene1
+
+.MapCallbacks:
+ db 2
+ dbw MAPCALLBACK_NEWMAP, .FlyPoint
+ dbw MAPCALLBACK_OBJECTS, .Wesley
+
+.DummyScene0:
+ end
+
+.DummyScene1:
+ end
+
+.FlyPoint:
+ setflag ENGINE_FLYPOINT_LAKE_OF_RAGE
+ return
+
+.Wesley:
+ checkcode VAR_WEEKDAY
+ if_equal WEDNESDAY, .WesleyAppears
+ disappear LAKEOFRAGE_WESLEY
+ return
+
+.WesleyAppears:
+ appear LAKEOFRAGE_WESLEY
+ return
+
+LanceScript_0x70022:
+ checkevent EVENT_REFUSED_TO_HELP_LANCE_AT_LAKE_OF_RAGE
+ iftrue UnknownScript_0x70057
+ opentext
+ writetext UnknownText_0x70157
+ buttonsound
+ faceplayer
+ writetext UnknownText_0x701b4
+ yesorno
+ iffalse UnknownScript_0x7004e
+UnknownScript_0x70035:
+ writetext UnknownText_0x702c6
+ waitbutton
+ closetext
+ playsound SFX_WARP_TO
+ applymovement LAKEOFRAGE_LANCE, MovementData_0x70155
+ disappear LAKEOFRAGE_LANCE
+ clearevent EVENT_MAHOGANY_MART_LANCE_AND_DRAGONITE
+ setevent EVENT_DECIDED_TO_HELP_LANCE
+ setmapscene MAHOGANY_MART_1F, $1
+ end
+
+UnknownScript_0x7004e:
+ writetext UnknownText_0x70371
+ waitbutton
+ closetext
+ setevent EVENT_REFUSED_TO_HELP_LANCE_AT_LAKE_OF_RAGE
+ end
+
+UnknownScript_0x70057:
+ faceplayer
+ opentext
+ writetext UnknownText_0x703a5
+ yesorno
+ iffalse UnknownScript_0x7004e
+ jump UnknownScript_0x70035
+
+GyaradosScript_0x70063:
+ opentext
+ writetext UnknownText_0x703cb
+ pause 15
+ cry GYARADOS
+ closetext
+ loadwildmon GYARADOS, 30
+ writecode VAR_BATTLETYPE, BATTLETYPE_SHINY
+ startbattle
+ if_equal $1, UnknownScript_0x7007a
+ disappear LAKEOFRAGE_GYARADOS
+UnknownScript_0x7007a:
+ reloadmapafterbattle
+ opentext
+ giveitem RED_SCALE
+ waitsfx
+ writetext UnknownText_0x703df
+ playsound SFX_ITEM
+ waitsfx
+ itemnotify
+ closetext
+ setscene $0
+ appear LAKEOFRAGE_LANCE
+ end
+
+GrampsScript_0x7008e:
+ faceplayer
+ opentext
+ checkevent EVENT_CLEARED_ROCKET_HIDEOUT
+ iftrue UnknownScript_0x7009c
+ writetext UnknownText_0x703f8
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x7009c:
+ writetext UnknownText_0x70421
+ waitbutton
+ closetext
+ end
+
+LakeOfRageSuperNerdScript:
+ jumptextfaceplayer LakeOfRageSuperNerdText
+
+LakeOfRageCooltrainerFScript:
+ jumptextfaceplayer LakeOfRageCooltrainerFText
+
+MapLakeOfRageSignpost0Script:
+ jumptext UnknownText_0x708d7
+
+MapLakeOfRageSignpost1Script:
+ opentext
+ writetext UnknownText_0x70903
+ checkevent EVENT_CLEARED_ROCKET_HIDEOUT
+ iftrue UnknownScript_0x700b8
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x700b8:
+ buttonsound
+ special Special_MagikarpHouseSign
+ closetext
+ end
+
+TrainerFisherAndre:
+ trainer EVENT_BEAT_FISHER_ANDRE, FISHER, ANDRE, FisherAndreSeenText, FisherAndreBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext FisherAndreAfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerFisherRaymond:
+ trainer EVENT_BEAT_FISHER_RAYMOND, FISHER, RAYMOND, FisherRaymondSeenText, FisherRaymondBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext FisherRaymondAfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerCooltrainermAaron:
+ trainer EVENT_BEAT_COOLTRAINERM_AARON, COOLTRAINERM, AARON, CooltrainermAaronSeenText, CooltrainermAaronBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext CooltrainermAaronAfterBattleText
+ waitbutton
+ closetext
+ end
+
+TrainerCooltrainerfLois:
+ trainer EVENT_BEAT_COOLTRAINERF_LOIS, COOLTRAINERF, LOIS, CooltrainerfLoisSeenText, CooltrainerfLoisBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext CooltrainerfLoisAfterBattleText
+ waitbutton
+ closetext
+ end
+
+WesleyScript:
+ faceplayer
+ opentext
+ checkevent EVENT_GOT_BLACKBELT_FROM_WESLEY
+ iftrue WesleyWednesdayScript
+ checkcode VAR_WEEKDAY
+ if_not_equal WEDNESDAY, WesleyNotWednesdayScript
+ checkevent EVENT_MET_WESLEY_OF_WEDNESDAY
+ iftrue .MetWesley
+ writetext MeetWesleyText
+ buttonsound
+ setevent EVENT_MET_WESLEY_OF_WEDNESDAY
+.MetWesley:
+ writetext WesleyGivesGiftText
+ buttonsound
+ verbosegiveitem BLACKBELT
+ iffalse WesleyDoneScript
+ setevent EVENT_GOT_BLACKBELT_FROM_WESLEY
+ writetext WesleyGaveGiftText
+ waitbutton
+ closetext
+ end
+
+WesleyWednesdayScript:
+ writetext WesleyWednesdayText
+ waitbutton
+WesleyDoneScript:
+ closetext
+ end
+
+WesleyNotWednesdayScript:
+ writetext WesleyNotWednesdayText
+ waitbutton
+ closetext
+ end
+
+LakeOfRageElixer:
+ itemball ELIXER
+
+LakeOfRageTMDetect:
+ itemball TM_DETECT
+
+LakeOfRageHiddenFullRestore:
+ dwb EVENT_LAKE_OF_RAGE_HIDDEN_FULL_RESTORE, FULL_RESTORE
+
+
+LakeOfRageHiddenRareCandy:
+ dwb EVENT_LAKE_OF_RAGE_HIDDEN_RARE_CANDY, RARE_CANDY
+
+
+LakeOfRageHiddenMaxPotion:
+ dwb EVENT_LAKE_OF_RAGE_HIDDEN_MAX_POTION, MAX_POTION
+
+
+MovementData_0x70155:
+ teleport_from
+ step_end
+
+UnknownText_0x70157:
+ text "This lake is full"
+ line "of GYARADOS but"
+ cont "nothing else…"
+
+ para "So the MAGIKARP"
+ line "are being forced"
+ cont "to evolve…"
+ done
+
+UnknownText_0x701b4:
+ text "Did you come here"
+ line "because of the"
+ cont "rumors?"
+
+ para "You're <PLAYER>?"
+ line "I'm LANCE, a"
+ cont "trainer like you."
+
+ para "I heard some ru-"
+ line "mors, so I came to"
+ cont "investigate…"
+
+ para "I saw the way you"
+ line "battled earlier,"
+ cont "<PLAY_G>."
+
+ para "I can tell that"
+ line "you're a trainer"
+
+ para "with considerable"
+ line "skill."
+
+ para "If you don't mind,"
+ line "could you help me"
+ cont "investigate?"
+ done
+
+UnknownText_0x702c6:
+ text "LANCE: Excellent!"
+
+ para "It seems that the"
+ line "LAKE's MAGIKARP"
+
+ para "are being forced"
+ line "to evolve."
+
+ para "A mysterious radio"
+ line "broadcast coming"
+
+ para "from MAHOGANY is"
+ line "the cause."
+
+ para "I'll be waiting"
+ line "for you, <PLAY_G>."
+ done
+
+UnknownText_0x70371:
+ text "Oh… Well, if you"
+ line "change your mind,"
+ cont "please help me."
+ done
+
+UnknownText_0x703a5:
+ text "LANCE: Hm? Are you"
+ line "going to help me?"
+ done
+
+UnknownText_0x703cb:
+ text "GYARADOS: Gyashaa!"
+ done
+
+UnknownText_0x703df:
+ text "<PLAYER> obtained a"
+ line "RED SCALE."
+ done
+
+UnknownText_0x703f8:
+ text "The GYARADOS are"
+ line "angry!"
+
+ para "It's a bad omen!"
+ done
+
+UnknownText_0x70421:
+ text "Hahah! The MAGI-"
+ line "KARP are biting!"
+ done
+
+LakeOfRageSuperNerdText:
+ text "I heard this lake"
+ line "was made by ram-"
+ cont "paging GYARADOS."
+
+ para "I wonder if there"
+ line "is any connection"
+
+ para "to their mass out-"
+ line "break now?"
+ done
+
+LakeOfRageCooltrainerFText:
+ text "Did my eyes de-"
+ line "ceive me? I saw a"
+
+ para "red GYARADOS in"
+ line "the LAKE…"
+
+ para "But I thought"
+ line "GYARADOS were"
+ cont "usually blue?"
+ done
+
+FisherAndreSeenText:
+ text "Let me battle with"
+ line "the #MON I just"
+ cont "caught!"
+ done
+
+FisherAndreBeatenText:
+ text "I might be an ex-"
+ line "pert angler, but"
+
+ para "I stink as a #-"
+ line "MON trainer…"
+ done
+
+FisherAndreAfterBattleText:
+ text "I won't lose as an"
+ line "angler! I catch"
+ cont "#MON all day."
+ done
+
+FisherRaymondSeenText:
+ text "No matter what I"
+ line "do, all I catch"
+
+ para "are the same #-"
+ line "MON…"
+ done
+
+FisherRaymondBeatenText:
+ text "My line's all"
+ line "tangled up…"
+ done
+
+FisherRaymondAfterBattleText:
+ text "Why can't I catch"
+ line "any good #MON?"
+ done
+
+CooltrainermAaronSeenText:
+ text "If a trainer spots"
+ line "another trainer,"
+
+ para "he has to make a"
+ line "challenge."
+
+ para "That is our"
+ line "destiny."
+ done
+
+CooltrainermAaronBeatenText:
+ text "Whew…"
+ line "Good battle."
+ done
+
+CooltrainermAaronAfterBattleText:
+ text "#MON and their"
+ line "trainer become"
+
+ para "powerful through"
+ line "constant battling."
+ done
+
+CooltrainerfLoisSeenText:
+ text "What happened to"
+ line "the red GYARADOS?"
+
+ para "It's gone?"
+
+ para "Oh, darn. I came"
+ line "here for nothing?"
+
+ para "I know--let's"
+ line "battle!"
+ done
+
+CooltrainerfLoisBeatenText:
+ text "Good going!"
+ done
+
+CooltrainerfLoisAfterBattleText:
+ text "Come to think of"
+ line "it, I've seen a"
+ cont "pink BUTTERFREE."
+ done
+
+MeetWesleyText:
+ text "WESLEY: Well, how"
+ line "do you do?"
+
+ para "Seeing as how it's"
+ line "Wednesday today,"
+
+ para "I'm WESLEY of"
+ line "Wednesday."
+ done
+
+WesleyGivesGiftText:
+ text "Pleased to meet"
+ line "you. Please take a"
+ cont "souvenir."
+ done
+
+WesleyGaveGiftText:
+ text "WESLEY: BLACKBELT"
+ line "beefs up the power"
+ cont "of fighting moves."
+ done
+
+WesleyWednesdayText:
+ text "WESLEY: Since you"
+ line "found me, you must"
+
+ para "have met my broth-"
+ line "ers and sisters."
+
+ para "Or did you just"
+ line "get lucky?"
+ done
+
+WesleyNotWednesdayText:
+ text "WESLEY: Today's"
+ line "not Wednesday."
+ cont "That's too bad."
+ done
+
+UnknownText_0x708d7:
+ text "LAKE OF RAGE,"
+ line "also known as"
+ cont "GYARADOS LAKE."
+ done
+
+UnknownText_0x70903:
+ text "FISHING GURU'S"
+ line "HOUSE"
+ done
+
+LakeOfRage_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 2
+ warp_def $3, $7, 1, LAKE_OF_RAGE_HIDDEN_POWER_HOUSE
+ warp_def $1f, $1b, 1, LAKE_OF_RAGE_MAGIKARP_HOUSE
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 5
+ bg_event 27, 21, BGEVENT_READ, MapLakeOfRageSignpost0Script
+ bg_event 31, 25, BGEVENT_READ, MapLakeOfRageSignpost1Script
+ bg_event 28, 11, BGEVENT_ITEM, LakeOfRageHiddenFullRestore
+ bg_event 4, 4, BGEVENT_ITEM, LakeOfRageHiddenRareCandy
+ bg_event 5, 35, BGEVENT_ITEM, LakeOfRageHiddenMaxPotion
+
+.ObjectEvents:
+ db 12
+ object_event SPRITE_LANCE, 28, 21, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LanceScript_0x70022, EVENT_LAKE_OF_RAGE_LANCE
+ object_event SPRITE_GRAMPS, 26, 20, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GrampsScript_0x7008e, -1
+ object_event SPRITE_SUPER_NERD, 13, 36, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LakeOfRageSuperNerdScript, -1
+ object_event SPRITE_COOLTRAINER_F, 29, 25, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LakeOfRageCooltrainerFScript, -1
+ object_event SPRITE_FISHER, 23, 30, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerFisherAndre, EVENT_LAKE_OF_RAGE_CIVILIANS
+ object_event SPRITE_FISHER, 26, 24, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerFisherRaymond, EVENT_LAKE_OF_RAGE_CIVILIANS
+ object_event SPRITE_COOLTRAINER_M, 15, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerCooltrainermAaron, EVENT_LAKE_OF_RAGE_CIVILIANS
+ object_event SPRITE_COOLTRAINER_F, 7, 36, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 0, TrainerCooltrainerfLois, EVENT_LAKE_OF_RAGE_CIVILIANS
+ object_event SPRITE_GYARADOS, 22, 18, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GyaradosScript_0x70063, EVENT_LAKE_OF_RAGE_RED_GYARADOS
+ object_event SPRITE_SUPER_NERD, 4, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, WesleyScript, EVENT_LAKE_OF_RAGE_WESLEY_OF_WEDNESDAY
+ object_event SPRITE_POKE_BALL, 10, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, LakeOfRageElixer, EVENT_LAKE_OF_RAGE_ELIXER
+ object_event SPRITE_POKE_BALL, 2, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, LakeOfRageTMDetect, EVENT_LAKE_OF_RAGE_TM_DETECT
diff --git a/maps/LakeofRage.blk b/maps/LakeOfRage.blk
index 3b26d4f28..3b26d4f28 100644
--- a/maps/LakeofRage.blk
+++ b/maps/LakeOfRage.blk
diff --git a/maps/LakeOfRageHiddenPowerHouse.asm b/maps/LakeOfRageHiddenPowerHouse.asm
new file mode 100644
index 000000000..e5a88623d
--- /dev/null
+++ b/maps/LakeOfRageHiddenPowerHouse.asm
@@ -0,0 +1,89 @@
+const_value set 2
+ const LAKEOFRAGEHIDDENPOWERHOUSE_FISHER
+
+LakeOfRageHiddenPowerHouse_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+HiddenPowerGuy:
+ faceplayer
+ opentext
+ checkevent EVENT_GOT_TM10_HIDDEN_POWER
+ iftrue .AlreadyGotItem
+ writetext HiddenPowerGuyText1
+ buttonsound
+ verbosegiveitem TM_HIDDEN_POWER
+ iffalse .Done
+ setevent EVENT_GOT_TM10_HIDDEN_POWER
+ writetext HiddenPowerGuyText2
+ waitbutton
+ closetext
+ end
+.AlreadyGotItem:
+ writetext HiddenPowerGuyText3
+ waitbutton
+.Done:
+ closetext
+ end
+
+HiddenPowerHouseBookshelf:
+ jumpstd difficultbookshelf
+
+HiddenPowerGuyText1:
+ text "…You have strayed"
+ line "far…"
+
+ para "Here I have medi-"
+ line "tated. Inside me,"
+
+ para "a new power has"
+ line "been awakened."
+
+ para "Let me share my"
+ line "power with your"
+
+ para "#MON."
+ line "Take this, child."
+ done
+
+HiddenPowerGuyText2:
+ text "Do you see it? It"
+ line "is HIDDEN POWER!"
+
+ para "It draws out the"
+ line "power of #MON"
+ cont "for attacking."
+
+ para "Remember this: its"
+ line "type and power de-"
+ cont "pend on the #-"
+ cont "MON using it."
+ done
+
+HiddenPowerGuyText3:
+ text "I am meditating…"
+ done
+
+LakeOfRageHiddenPowerHouse_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 2
+ warp_def $7, $2, 1, LAKE_OF_RAGE
+ warp_def $7, $3, 1, LAKE_OF_RAGE
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 2
+ bg_event 1, 0, BGEVENT_READ, HiddenPowerHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, HiddenPowerHouseBookshelf
+
+.ObjectEvents:
+ db 1
+ object_event SPRITE_FISHER, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, HiddenPowerGuy, -1
diff --git a/maps/LakeOfRageMagikarpHouse.asm b/maps/LakeOfRageMagikarpHouse.asm
new file mode 100644
index 000000000..0ac776aa1
--- /dev/null
+++ b/maps/LakeOfRageMagikarpHouse.asm
@@ -0,0 +1,227 @@
+const_value set 2
+ const LAKEOFRAGEMAGIKARPHOUSE_FISHING_GURU
+
+LakeOfRageMagikarpHouse_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+FishingGuruScript_0x19a6ae:
+ faceplayer
+ opentext
+ checkevent EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY
+ iftrue UnknownScript_0x19a6fe
+ checkevent EVENT_LAKE_OF_RAGE_ASKED_FOR_MAGIKARP
+ iftrue UnknownScript_0x19a6e0
+ checkevent EVENT_CLEARED_ROCKET_HIDEOUT
+ iftrue UnknownScript_0x19a6d7
+ checkevent EVENT_LAKE_OF_RAGE_EXPLAINED_WEIRD_MAGIKARP
+ iftrue UnknownScript_0x19a6d1
+ writetext UnknownText_0x19a72e
+ waitbutton
+ closetext
+ setevent EVENT_LAKE_OF_RAGE_EXPLAINED_WEIRD_MAGIKARP
+ end
+
+UnknownScript_0x19a6d1:
+ writetext UnknownText_0x19a84d
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x19a6d7:
+ writetext UnknownText_0x19a890
+ waitbutton
+ closetext
+ setevent EVENT_LAKE_OF_RAGE_ASKED_FOR_MAGIKARP
+ end
+
+UnknownScript_0x19a6e0:
+ writebyte MAGIKARP
+ special Special_FindThatSpecies
+ iffalse UnknownScript_0x19a6d7
+ writetext UnknownText_0x19a93e
+ waitbutton
+ special Special_CheckMagikarpLength
+ if_equal $0, UnknownScript_0x19a71c
+ if_equal $1, UnknownScript_0x19a722
+ if_equal $2, UnknownScript_0x19a716
+ jump UnknownScript_0x19a6fe
+
+UnknownScript_0x19a6fe:
+ writetext UnknownText_0x19a977
+ buttonsound
+ verbosegiveitem ELIXER
+ iffalse UnknownScript_0x19a711
+ writetext UnknownText_0x19a9c3
+ waitbutton
+ closetext
+ clearevent EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY
+ end
+
+UnknownScript_0x19a711:
+ closetext
+ setevent EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY
+ end
+
+UnknownScript_0x19a716:
+ writetext UnknownText_0x19aa01
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x19a71c:
+ writetext UnknownText_0x19aa5c
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x19a722:
+ writetext UnknownText_0x19aa79
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x19a728:
+ jumptext UnknownText_0x19aabc
+
+MagikarpHouseBookshelf:
+ jumpstd difficultbookshelf
+
+UnknownText_0x19a72e:
+ text "LAKE OF RAGE is"
+ line "actually a crater"
+
+ para "made by rampaging"
+ line "GYARADOS."
+
+ para "The crater filled"
+ line "up with rainwater"
+
+ para "and the LAKE was"
+ line "formed."
+
+ para "That's the story"
+ line "passed on from my"
+
+ para "Grandpa's great-"
+ line "great-grandpa."
+
+ para "It used to be that"
+ line "you could catch"
+
+ para "lively MAGIKARP"
+ line "there, but…"
+
+ para "I don't understand"
+ line "what's happening."
+ done
+
+UnknownText_0x19a84d:
+ text "The LAKE hasn't"
+ line "been normal since"
+
+ para "those men wearing"
+ line "black arrived."
+ done
+
+UnknownText_0x19a890:
+ text "LAKE OF RAGE is"
+ line "back to normal."
+
+ para "The MAGIKARP have"
+ line "returned."
+
+ para "I may yet realize"
+ line "my dream of see-"
+ cont "ing the world's"
+ cont "largest MAGIKARP."
+
+ para "Do you have a ROD?"
+ line "Please help me if"
+ cont "you do."
+ done
+
+UnknownText_0x19a93e:
+ text "Ah, you have a"
+ line "MAGIKARP! Let's"
+
+ para "see how big that"
+ line "baby is."
+ done
+
+UnknownText_0x19a977:
+ text "Wow! This one is"
+ line "outstanding!"
+
+ para "I tip my hat to"
+ line "you!"
+
+ para "Take this as a"
+ line "memento!"
+ done
+
+UnknownText_0x19a9c3:
+ text "The record is the"
+ line "important thing."
+
+ para "Think of that as"
+ line "a bonus!"
+ done
+
+UnknownText_0x19aa01:
+ text "Wow! This one is"
+ line "outstanding!"
+
+ para "…I wish I could"
+ line "say that, but I've"
+
+ para "seen a bigger one"
+ line "before."
+ done
+
+UnknownText_0x19aa5c:
+ text "What? That's not a"
+ line "MAGIKARP!"
+ done
+
+UnknownText_0x19aa79:
+ text "Oh… So you didn't"
+ line "get one good"
+
+ para "enough to show me?"
+ line "Maybe next time."
+ done
+
+UnknownText_0x19aabc:
+ text "CURRENT RECORD"
+
+ para "@"
+ text_from_ram StringBuffer3
+ text " caught by"
+ line "@"
+ text_from_ram StringBuffer4
+ db "@@"
+
+LakeOfRageMagikarpHouse_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 2
+ warp_def $7, $2, 2, LAKE_OF_RAGE
+ warp_def $7, $3, 2, LAKE_OF_RAGE
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 2
+ bg_event 1, 0, BGEVENT_READ, MagikarpHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, MagikarpHouseBookshelf
+
+.ObjectEvents:
+ db 1
+ object_event SPRITE_FISHING_GURU, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FishingGuruScript_0x19a6ae, -1
diff --git a/maps/LakeofRage.asm b/maps/LakeofRage.asm
deleted file mode 100644
index 6f2a356b6..000000000
--- a/maps/LakeofRage.asm
+++ /dev/null
@@ -1,537 +0,0 @@
-const_value set 2
- const LAKEOFRAGE_LANCE
- const LAKEOFRAGE_GRAMPS
- const LAKEOFRAGE_SUPER_NERD1
- const LAKEOFRAGE_COOLTRAINER_F1
- const LAKEOFRAGE_FISHER1
- const LAKEOFRAGE_FISHER2
- const LAKEOFRAGE_COOLTRAINER_M
- const LAKEOFRAGE_COOLTRAINER_F2
- const LAKEOFRAGE_GYARADOS
- const LAKEOFRAGE_WESLEY
- const LAKEOFRAGE_POKE_BALL1
- const LAKEOFRAGE_POKE_BALL2
-
-LakeofRage_MapScriptHeader:
-.MapTriggers:
- db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
-
-.MapCallbacks:
- db 2
-
- ; callbacks
-
- dbw MAPCALLBACK_NEWMAP, .FlyPoint
- dbw MAPCALLBACK_OBJECTS, .Wesley
-
-.Trigger0:
- end
-
-.Trigger1:
- end
-
-.FlyPoint:
- setflag ENGINE_FLYPOINT_LAKE_OF_RAGE
- return
-
-.Wesley:
- checkcode VAR_WEEKDAY
- if_equal WEDNESDAY, .WesleyAppears
- disappear LAKEOFRAGE_WESLEY
- return
-
-.WesleyAppears:
- appear LAKEOFRAGE_WESLEY
- return
-
-LanceScript_0x70022:
- checkevent EVENT_REFUSED_TO_HELP_LANCE_AT_LAKE_OF_RAGE
- iftrue UnknownScript_0x70057
- opentext
- writetext UnknownText_0x70157
- buttonsound
- faceplayer
- writetext UnknownText_0x701b4
- yesorno
- iffalse UnknownScript_0x7004e
-UnknownScript_0x70035:
- writetext UnknownText_0x702c6
- waitbutton
- closetext
- playsound SFX_WARP_TO
- applymovement LAKEOFRAGE_LANCE, MovementData_0x70155
- disappear LAKEOFRAGE_LANCE
- clearevent EVENT_MAHOGANY_MART_LANCE_AND_DRAGONITE
- setevent EVENT_DECIDED_TO_HELP_LANCE
- domaptrigger MAHOGANY_MART_1F, $1
- end
-
-UnknownScript_0x7004e:
- writetext UnknownText_0x70371
- waitbutton
- closetext
- setevent EVENT_REFUSED_TO_HELP_LANCE_AT_LAKE_OF_RAGE
- end
-
-UnknownScript_0x70057:
- faceplayer
- opentext
- writetext UnknownText_0x703a5
- yesorno
- iffalse UnknownScript_0x7004e
- jump UnknownScript_0x70035
-
-GyaradosScript_0x70063:
- opentext
- writetext UnknownText_0x703cb
- pause 15
- cry GYARADOS
- closetext
- loadwildmon GYARADOS, 30
- writecode VAR_BATTLETYPE, BATTLETYPE_SHINY
- startbattle
- if_equal $1, UnknownScript_0x7007a
- disappear LAKEOFRAGE_GYARADOS
-UnknownScript_0x7007a:
- reloadmapafterbattle
- opentext
- giveitem RED_SCALE
- waitsfx
- writetext UnknownText_0x703df
- playsound SFX_ITEM
- waitsfx
- itemnotify
- closetext
- dotrigger $0
- appear LAKEOFRAGE_LANCE
- end
-
-GrampsScript_0x7008e:
- faceplayer
- opentext
- checkevent EVENT_CLEARED_ROCKET_HIDEOUT
- iftrue UnknownScript_0x7009c
- writetext UnknownText_0x703f8
- waitbutton
- closetext
- end
-
-UnknownScript_0x7009c:
- writetext UnknownText_0x70421
- waitbutton
- closetext
- end
-
-SuperNerdScript_0x700a2:
- jumptextfaceplayer UnknownText_0x70444
-
-CooltrainerFScript_0x700a5:
- jumptextfaceplayer UnknownText_0x704bb
-
-MapLakeofRageSignpost0Script:
- jumptext UnknownText_0x708d7
-
-MapLakeofRageSignpost1Script:
- opentext
- writetext UnknownText_0x70903
- checkevent EVENT_CLEARED_ROCKET_HIDEOUT
- iftrue UnknownScript_0x700b8
- waitbutton
- closetext
- end
-
-UnknownScript_0x700b8:
- buttonsound
- special Special_MagikarpHouseSign
- closetext
- end
-
-TrainerFisherAndre:
- trainer EVENT_BEAT_FISHER_ANDRE, FISHER, ANDRE, FisherAndreSeenText, FisherAndreBeatenText, 0, FisherAndreScript
-
-FisherAndreScript:
- end_if_just_battled
- opentext
- writetext UnknownText_0x7058f
- waitbutton
- closetext
- end
-
-TrainerFisherRaymond:
- trainer EVENT_BEAT_FISHER_RAYMOND, FISHER, RAYMOND, FisherRaymondSeenText, FisherRaymondBeatenText, 0, FisherRaymondScript
-
-FisherRaymondScript:
- end_if_just_battled
- opentext
- writetext UnknownText_0x70611
- waitbutton
- closetext
- end
-
-TrainerCooltrainermAaron:
- trainer EVENT_BEAT_COOLTRAINERM_AARON, COOLTRAINERM, AARON, CooltrainermAaronSeenText, CooltrainermAaronBeatenText, 0, CooltrainermAaronScript
-
-CooltrainermAaronScript:
- end_if_just_battled
- opentext
- writetext UnknownText_0x7069c
- waitbutton
- closetext
- end
-
-TrainerCooltrainerfLois:
- trainer EVENT_BEAT_COOLTRAINERF_LOIS, COOLTRAINERF, LOIS, CooltrainerfLoisSeenText, CooltrainerfLoisBeatenText, 0, CooltrainerfLoisScript
-
-CooltrainerfLoisScript:
- end_if_just_battled
- opentext
- writetext UnknownText_0x70752
- waitbutton
- closetext
- end
-
-WesleyScript:
- faceplayer
- opentext
- checkevent EVENT_GOT_BLACKBELT_FROM_WESLEY
- iftrue WesleyWednesdayScript
- checkcode VAR_WEEKDAY
- if_not_equal WEDNESDAY, WesleyNotWednesdayScript
- checkevent EVENT_MET_WESLEY_OF_WEDNESDAY
- iftrue .MetWesley
- writetext MeetWesleyText
- buttonsound
- setevent EVENT_MET_WESLEY_OF_WEDNESDAY
-.MetWesley:
- writetext WesleyGivesGiftText
- buttonsound
- verbosegiveitem BLACKBELT
- iffalse WesleyDoneScript
- setevent EVENT_GOT_BLACKBELT_FROM_WESLEY
- writetext WesleyGaveGiftText
- waitbutton
- closetext
- end
-
-WesleyWednesdayScript:
- writetext WesleyWednesdayText
- waitbutton
-WesleyDoneScript:
- closetext
- end
-
-WesleyNotWednesdayScript:
- writetext WesleyNotWednesdayText
- waitbutton
- closetext
- end
-
-LakeofRageElixer:
- itemball ELIXER
-
-LakeofRageTMDetect:
- itemball TM_DETECT
-
-LakeofRageHiddenFullRestore:
- dwb EVENT_LAKE_OF_RAGE_HIDDEN_FULL_RESTORE, FULL_RESTORE
-
-
-LakeofRageHiddenRareCandy:
- dwb EVENT_LAKE_OF_RAGE_HIDDEN_RARE_CANDY, RARE_CANDY
-
-
-LakeofRageHiddenMaxPotion:
- dwb EVENT_LAKE_OF_RAGE_HIDDEN_MAX_POTION, MAX_POTION
-
-
-MovementData_0x70155:
- teleport_from
- step_end
-
-UnknownText_0x70157:
- text "This lake is full"
- line "of GYARADOS but"
- cont "nothing else…"
-
- para "So the MAGIKARP"
- line "are being forced"
- cont "to evolve…"
- done
-
-UnknownText_0x701b4:
- text "Did you come here"
- line "because of the"
- cont "rumors?"
-
- para "You're <PLAYER>?"
- line "I'm LANCE, a"
- cont "trainer like you."
-
- para "I heard some ru-"
- line "mors, so I came to"
- cont "investigate…"
-
- para "I saw the way you"
- line "battled earlier,"
- cont "<PLAY_G>."
-
- para "I can tell that"
- line "you're a trainer"
-
- para "with considerable"
- line "skill."
-
- para "If you don't mind,"
- line "could you help me"
- cont "investigate?"
- done
-
-UnknownText_0x702c6:
- text "LANCE: Excellent!"
-
- para "It seems that the"
- line "LAKE's MAGIKARP"
-
- para "are being forced"
- line "to evolve."
-
- para "A mysterious radio"
- line "broadcast coming"
-
- para "from MAHOGANY is"
- line "the cause."
-
- para "I'll be waiting"
- line "for you, <PLAY_G>."
- done
-
-UnknownText_0x70371:
- text "Oh… Well, if you"
- line "change your mind,"
- cont "please help me."
- done
-
-UnknownText_0x703a5:
- text "LANCE: Hm? Are you"
- line "going to help me?"
- done
-
-UnknownText_0x703cb:
- text "GYARADOS: Gyashaa!"
- done
-
-UnknownText_0x703df:
- text "<PLAYER> obtained a"
- line "RED SCALE."
- done
-
-UnknownText_0x703f8:
- text "The GYARADOS are"
- line "angry!"
-
- para "It's a bad omen!"
- done
-
-UnknownText_0x70421:
- text "Hahah! The MAGI-"
- line "KARP are biting!"
- done
-
-UnknownText_0x70444:
- text "I heard this lake"
- line "was made by ram-"
- cont "paging GYARADOS."
-
- para "I wonder if there"
- line "is any connection"
-
- para "to their mass out-"
- line "break now?"
- done
-
-UnknownText_0x704bb:
- text "Did my eyes de-"
- line "ceive me? I saw a"
-
- para "red GYARADOS in"
- line "the LAKE…"
-
- para "But I thought"
- line "GYARADOS were"
- cont "usually blue?"
- done
-
-FisherAndreSeenText:
- text "Let me battle with"
- line "the #MON I just"
- cont "caught!"
- done
-
-FisherAndreBeatenText:
- text "I might be an ex-"
- line "pert angler, but"
-
- para "I stink as a #-"
- line "MON trainer…"
- done
-
-UnknownText_0x7058f:
- text "I won't lose as an"
- line "angler! I catch"
- cont "#MON all day."
- done
-
-FisherRaymondSeenText:
- text "No matter what I"
- line "do, all I catch"
-
- para "are the same #-"
- line "MON…"
- done
-
-FisherRaymondBeatenText:
- text "My line's all"
- line "tangled up…"
- done
-
-UnknownText_0x70611:
- text "Why can't I catch"
- line "any good #MON?"
- done
-
-CooltrainermAaronSeenText:
- text "If a trainer spots"
- line "another trainer,"
-
- para "he has to make a"
- line "challenge."
-
- para "That is our"
- line "destiny."
- done
-
-CooltrainermAaronBeatenText:
- text "Whew…"
- line "Good battle."
- done
-
-UnknownText_0x7069c:
- text "#MON and their"
- line "trainer become"
-
- para "powerful through"
- line "constant battling."
- done
-
-CooltrainerfLoisSeenText:
- text "What happened to"
- line "the red GYARADOS?"
-
- para "It's gone?"
-
- para "Oh, darn. I came"
- line "here for nothing?"
-
- para "I know--let's"
- line "battle!"
- done
-
-CooltrainerfLoisBeatenText:
- text "Good going!"
- done
-
-UnknownText_0x70752:
- text "Come to think of"
- line "it, I've seen a"
- cont "pink BUTTERFREE."
- done
-
-MeetWesleyText:
- text "WESLEY: Well, how"
- line "do you do?"
-
- para "Seeing as how it's"
- line "Wednesday today,"
-
- para "I'm WESLEY of"
- line "Wednesday."
- done
-
-WesleyGivesGiftText:
- text "Pleased to meet"
- line "you. Please take a"
- cont "souvenir."
- done
-
-WesleyGaveGiftText:
- text "WESLEY: BLACKBELT"
- line "beefs up the power"
- cont "of fighting moves."
- done
-
-WesleyWednesdayText:
- text "WESLEY: Since you"
- line "found me, you must"
-
- para "have met my broth-"
- line "ers and sisters."
-
- para "Or did you just"
- line "get lucky?"
- done
-
-WesleyNotWednesdayText:
- text "WESLEY: Today's"
- line "not Wednesday."
- cont "That's too bad."
- done
-
-UnknownText_0x708d7:
- text "LAKE OF RAGE,"
- line "also known as"
- cont "GYARADOS LAKE."
- done
-
-UnknownText_0x70903:
- text "FISHING GURU'S"
- line "HOUSE"
- done
-
-LakeofRage_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 2
- warp_def $3, $7, 1, LAKE_OF_RAGE_HIDDEN_POWER_HOUSE
- warp_def $1f, $1b, 1, LAKE_OF_RAGE_MAGIKARP_HOUSE
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 5
- signpost 27, 21, SIGNPOST_READ, MapLakeofRageSignpost0Script
- signpost 31, 25, SIGNPOST_READ, MapLakeofRageSignpost1Script
- signpost 28, 11, SIGNPOST_ITEM, LakeofRageHiddenFullRestore
- signpost 4, 4, SIGNPOST_ITEM, LakeofRageHiddenRareCandy
- signpost 5, 35, SIGNPOST_ITEM, LakeofRageHiddenMaxPotion
-
-.PersonEvents:
- db 12
- person_event SPRITE_LANCE, 28, 21, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LanceScript_0x70022, EVENT_LAKE_OF_RAGE_LANCE
- person_event SPRITE_GRAMPS, 26, 20, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrampsScript_0x7008e, -1
- person_event SPRITE_SUPER_NERD, 13, 36, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x700a2, -1
- person_event SPRITE_COOLTRAINER_F, 29, 25, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x700a5, -1
- person_event SPRITE_FISHER, 23, 30, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerFisherAndre, EVENT_LAKE_OF_RAGE_CIVILIANS
- person_event SPRITE_FISHER, 26, 24, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerFisherRaymond, EVENT_LAKE_OF_RAGE_CIVILIANS
- person_event SPRITE_COOLTRAINER_M, 15, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerCooltrainermAaron, EVENT_LAKE_OF_RAGE_CIVILIANS
- person_event SPRITE_COOLTRAINER_F, 7, 36, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 0, TrainerCooltrainerfLois, EVENT_LAKE_OF_RAGE_CIVILIANS
- person_event SPRITE_GYARADOS, 22, 18, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GyaradosScript_0x70063, EVENT_LAKE_OF_RAGE_RED_GYARADOS
- person_event SPRITE_SUPER_NERD, 4, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, WesleyScript, EVENT_LAKE_OF_RAGE_WESLEY_OF_WEDNESDAY
- person_event SPRITE_POKE_BALL, 10, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, LakeofRageElixer, EVENT_LAKE_OF_RAGE_ELIXER
- person_event SPRITE_POKE_BALL, 2, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, LakeofRageTMDetect, EVENT_LAKE_OF_RAGE_TM_DETECT
diff --git a/maps/LakeofRageHiddenPowerHouse.asm b/maps/LakeofRageHiddenPowerHouse.asm
deleted file mode 100644
index 74e3b3062..000000000
--- a/maps/LakeofRageHiddenPowerHouse.asm
+++ /dev/null
@@ -1,89 +0,0 @@
-const_value set 2
- const LAKEOFRAGEHIDDENPOWERHOUSE_FISHER
-
-LakeofRageHiddenPowerHouse_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-HiddenPowerGuy:
- faceplayer
- opentext
- checkevent EVENT_GOT_TM10_HIDDEN_POWER
- iftrue .AlreadyGotItem
- writetext HiddenPowerGuyText1
- buttonsound
- verbosegiveitem TM_HIDDEN_POWER
- iffalse .Done
- setevent EVENT_GOT_TM10_HIDDEN_POWER
- writetext HiddenPowerGuyText2
- waitbutton
- closetext
- end
-.AlreadyGotItem:
- writetext HiddenPowerGuyText3
- waitbutton
-.Done:
- closetext
- end
-
-HiddenPowerHouseBookshelf:
- jumpstd difficultbookshelf
-
-HiddenPowerGuyText1:
- text "…You have strayed"
- line "far…"
-
- para "Here I have medi-"
- line "tated. Inside me,"
-
- para "a new power has"
- line "been awakened."
-
- para "Let me share my"
- line "power with your"
-
- para "#MON."
- line "Take this, child."
- done
-
-HiddenPowerGuyText2:
- text "Do you see it? It"
- line "is HIDDEN POWER!"
-
- para "It draws out the"
- line "power of #MON"
- cont "for attacking."
-
- para "Remember this: its"
- line "type and power de-"
- cont "pend on the #-"
- cont "MON using it."
- done
-
-HiddenPowerGuyText3:
- text "I am meditating…"
- done
-
-LakeofRageHiddenPowerHouse_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 2
- warp_def $7, $2, 1, LAKE_OF_RAGE
- warp_def $7, $3, 1, LAKE_OF_RAGE
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 2
- signpost 1, 0, SIGNPOST_READ, HiddenPowerHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, HiddenPowerHouseBookshelf
-
-.PersonEvents:
- db 1
- person_event SPRITE_FISHER, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, HiddenPowerGuy, -1
diff --git a/maps/LakeofRageMagikarpHouse.asm b/maps/LakeofRageMagikarpHouse.asm
deleted file mode 100644
index 417af28d4..000000000
--- a/maps/LakeofRageMagikarpHouse.asm
+++ /dev/null
@@ -1,227 +0,0 @@
-const_value set 2
- const LAKEOFRAGEMAGIKARPHOUSE_FISHING_GURU
-
-LakeofRageMagikarpHouse_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-FishingGuruScript_0x19a6ae:
- faceplayer
- opentext
- checkevent EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY
- iftrue UnknownScript_0x19a6fe
- checkevent EVENT_LAKE_OF_RAGE_ASKED_FOR_MAGIKARP
- iftrue UnknownScript_0x19a6e0
- checkevent EVENT_CLEARED_ROCKET_HIDEOUT
- iftrue UnknownScript_0x19a6d7
- checkevent EVENT_LAKE_OF_RAGE_EXPLAINED_WEIRD_MAGIKARP
- iftrue UnknownScript_0x19a6d1
- writetext UnknownText_0x19a72e
- waitbutton
- closetext
- setevent EVENT_LAKE_OF_RAGE_EXPLAINED_WEIRD_MAGIKARP
- end
-
-UnknownScript_0x19a6d1:
- writetext UnknownText_0x19a84d
- waitbutton
- closetext
- end
-
-UnknownScript_0x19a6d7:
- writetext UnknownText_0x19a890
- waitbutton
- closetext
- setevent EVENT_LAKE_OF_RAGE_ASKED_FOR_MAGIKARP
- end
-
-UnknownScript_0x19a6e0:
- writebyte MAGIKARP
- special Special_FindThatSpecies
- iffalse UnknownScript_0x19a6d7
- writetext UnknownText_0x19a93e
- waitbutton
- special Special_CheckMagikarpLength
- if_equal $0, UnknownScript_0x19a71c
- if_equal $1, UnknownScript_0x19a722
- if_equal $2, UnknownScript_0x19a716
- jump UnknownScript_0x19a6fe
-
-UnknownScript_0x19a6fe:
- writetext UnknownText_0x19a977
- buttonsound
- verbosegiveitem ELIXER
- iffalse UnknownScript_0x19a711
- writetext UnknownText_0x19a9c3
- waitbutton
- closetext
- clearevent EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY
- end
-
-UnknownScript_0x19a711:
- closetext
- setevent EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY
- end
-
-UnknownScript_0x19a716:
- writetext UnknownText_0x19aa01
- waitbutton
- closetext
- end
-
-UnknownScript_0x19a71c:
- writetext UnknownText_0x19aa5c
- waitbutton
- closetext
- end
-
-UnknownScript_0x19a722:
- writetext UnknownText_0x19aa79
- waitbutton
- closetext
- end
-
-UnknownScript_0x19a728:
- jumptext UnknownText_0x19aabc
-
-MagikarpHouseBookshelf:
- jumpstd difficultbookshelf
-
-UnknownText_0x19a72e:
- text "LAKE OF RAGE is"
- line "actually a crater"
-
- para "made by rampaging"
- line "GYARADOS."
-
- para "The crater filled"
- line "up with rainwater"
-
- para "and the LAKE was"
- line "formed."
-
- para "That's the story"
- line "passed on from my"
-
- para "Grandpa's great-"
- line "great-grandpa."
-
- para "It used to be that"
- line "you could catch"
-
- para "lively MAGIKARP"
- line "there, but…"
-
- para "I don't understand"
- line "what's happening."
- done
-
-UnknownText_0x19a84d:
- text "The LAKE hasn't"
- line "been normal since"
-
- para "those men wearing"
- line "black arrived."
- done
-
-UnknownText_0x19a890:
- text "LAKE OF RAGE is"
- line "back to normal."
-
- para "The MAGIKARP have"
- line "returned."
-
- para "I may yet realize"
- line "my dream of see-"
- cont "ing the world's"
- cont "largest MAGIKARP."
-
- para "Do you have a ROD?"
- line "Please help me if"
- cont "you do."
- done
-
-UnknownText_0x19a93e:
- text "Ah, you have a"
- line "MAGIKARP! Let's"
-
- para "see how big that"
- line "baby is."
- done
-
-UnknownText_0x19a977:
- text "Wow! This one is"
- line "outstanding!"
-
- para "I tip my hat to"
- line "you!"
-
- para "Take this as a"
- line "memento!"
- done
-
-UnknownText_0x19a9c3:
- text "The record is the"
- line "important thing."
-
- para "Think of that as"
- line "a bonus!"
- done
-
-UnknownText_0x19aa01:
- text "Wow! This one is"
- line "outstanding!"
-
- para "…I wish I could"
- line "say that, but I've"
-
- para "seen a bigger one"
- line "before."
- done
-
-UnknownText_0x19aa5c:
- text "What? That's not a"
- line "MAGIKARP!"
- done
-
-UnknownText_0x19aa79:
- text "Oh… So you didn't"
- line "get one good"
-
- para "enough to show me?"
- line "Maybe next time."
- done
-
-UnknownText_0x19aabc:
- text "CURRENT RECORD"
-
- para "@"
- text_from_ram StringBuffer3
- text " caught by"
- line "@"
- text_from_ram StringBuffer4
- db "@@"
-
-LakeofRageMagikarpHouse_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 2
- warp_def $7, $2, 2, LAKE_OF_RAGE
- warp_def $7, $3, 2, LAKE_OF_RAGE
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 2
- signpost 1, 0, SIGNPOST_READ, MagikarpHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, MagikarpHouseBookshelf
-
-.PersonEvents:
- db 1
- person_event SPRITE_FISHING_GURU, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FishingGuruScript_0x19a6ae, -1
diff --git a/maps/LancesRoom.asm b/maps/LancesRoom.asm
index e3572d50d..17c8628ad 100644
--- a/maps/LancesRoom.asm
+++ b/maps/LancesRoom.asm
@@ -4,39 +4,34 @@ const_value set 2
const LANCESROOM_OAK
LancesRoom_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw .Trigger0, 0
- dw .Trigger1, 0
+ scene_script .LockDoor
+ scene_script .DummyScene
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_TILES, .LancesRoomDoors
- ; callbacks
-
- dbw MAPCALLBACK_TILES, .CheckDoor
-
-.Trigger0:
- priorityjump LancesRoom_PlayerWalksIn_DoorsCloseBehind
+.LockDoor:
+ priorityjump .LancesDoorLocksBehindYou
end
-.Trigger1:
+.DummyScene:
end
-.CheckDoor:
+.LancesRoomDoors:
checkevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED
- iffalse .LanceEntranceOpen
+ iffalse .KeepDoorsClosed
changeblock $4, $16, $34
-.LanceEntranceOpen:
+.KeepDoorsClosed:
checkevent EVENT_LANCES_ROOM_EXIT_OPEN
- iffalse .LanceExitClosed
+ iffalse .OpenDoors
changeblock $4, $0, $b
-.LanceExitClosed:
+.OpenDoors:
return
-LancesRoom_PlayerWalksIn_DoorsCloseBehind:
+.LancesDoorLocksBehindYou:
applymovement PLAYER, LancesRoom_PlayerWalksInMovementData
refreshscreen $86
playsound SFX_STRENGTH
@@ -44,7 +39,7 @@ LancesRoom_PlayerWalksIn_DoorsCloseBehind:
changeblock $4, $16, $34
reloadmappart
closetext
- dotrigger $1
+ setscene $1
setevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED
end
@@ -353,16 +348,16 @@ LancesRoom_MapEventHeader:
warp_def $1, $4, 1, HALL_OF_FAME
warp_def $1, $5, 2, HALL_OF_FAME
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 1, $5, $4, $0, Script_ApproachLanceFromLeft, $0, $0
- xy_trigger 1, $5, $5, $0, Script_ApproachLanceFromRight, $0, $0
+ coord_event 1, $5, $4, Script_ApproachLanceFromLeft
+ coord_event 1, $5, $5, Script_ApproachLanceFromRight
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_LANCE, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LanceScript_0x180e7b, -1
- person_event SPRITE_TEACHER, 7, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_LANCES_ROOM_OAK_AND_MARY
- person_event SPRITE_OAK, 7, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_LANCES_ROOM_OAK_AND_MARY
+ object_event SPRITE_LANCE, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LanceScript_0x180e7b, -1
+ object_event SPRITE_TEACHER, 7, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_LANCES_ROOM_OAK_AND_MARY
+ object_event SPRITE_OAK, 7, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_LANCES_ROOM_OAK_AND_MARY
diff --git a/maps/LavRadioTower1F.asm b/maps/LavRadioTower1F.asm
index 0669cf956..6a15dd7df 100644
--- a/maps/LavRadioTower1F.asm
+++ b/maps/LavRadioTower1F.asm
@@ -6,20 +6,20 @@ const_value set 2
const LAVRADIOTOWER1F_SUPER_NERD2
LavRadioTower1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-ReceptionistScript_0x7ee63:
- jumptextfaceplayer UnknownText_0x7eebf
+LavRadioTower1FReceptionistScript:
+ jumptextfaceplayer LavRadioTower1FReceptionistText
-OfficerScript_0x7ee66:
- jumptextfaceplayer UnknownText_0x7eefa
+LavRadioTower1FOfficerScript:
+ jumptextfaceplayer LavRadioTower1FOfficerText
-SuperNerdScript_0x7ee69:
- jumptextfaceplayer UnknownText_0x7ef90
+LavRadioTower1FSuperNerdScript:
+ jumptextfaceplayer LavRadioTower1FSuperNerdText
GentlemanScript_0x7ee6c:
faceplayer
@@ -77,7 +77,7 @@ MapLavRadioTower1FSignpost1Script:
UnknownScript_0x7eebc:
jumptext UnknownText_0x7f36b
-UnknownText_0x7eebf:
+LavRadioTower1FReceptionistText:
text "Welcome!"
line "Feel free to look"
@@ -85,7 +85,7 @@ UnknownText_0x7eebf:
line "this floor."
done
-UnknownText_0x7eefa:
+LavRadioTower1FOfficerText:
text "Sorry, but you can"
line "only tour the"
cont "ground floor."
@@ -100,7 +100,7 @@ UnknownText_0x7eefa:
line "up our security."
done
-UnknownText_0x7ef90:
+LavRadioTower1FSuperNerdText:
text "Many people are"
line "hard at work here"
@@ -230,18 +230,18 @@ LavRadioTower1F_MapEventHeader:
warp_def $7, $2, 7, LAVENDER_TOWN
warp_def $7, $3, 7, LAVENDER_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 11, SIGNPOST_READ, MapLavRadioTower1FSignpost0Script
- signpost 0, 5, SIGNPOST_READ, MapLavRadioTower1FSignpost1Script
+ bg_event 0, 11, BGEVENT_READ, MapLavRadioTower1FSignpost0Script
+ bg_event 0, 5, BGEVENT_READ, MapLavRadioTower1FSignpost1Script
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_RECEPTIONIST, 6, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ReceptionistScript_0x7ee63, -1
- person_event SPRITE_OFFICER, 1, 15, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, OfficerScript_0x7ee66, -1
- person_event SPRITE_SUPER_NERD, 3, 1, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x7ee69, -1
- person_event SPRITE_GENTLEMAN, 1, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x7ee6c, -1
- person_event SPRITE_SUPER_NERD, 6, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x7eea2, -1
+ object_event SPRITE_RECEPTIONIST, 6, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, LavRadioTower1FReceptionistScript, -1
+ object_event SPRITE_OFFICER, 1, 15, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, LavRadioTower1FOfficerScript, -1
+ object_event SPRITE_SUPER_NERD, 3, 1, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, LavRadioTower1FSuperNerdScript, -1
+ object_event SPRITE_GENTLEMAN, 1, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GentlemanScript_0x7ee6c, -1
+ object_event SPRITE_SUPER_NERD, 6, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SuperNerdScript_0x7eea2, -1
diff --git a/maps/LavenderMart.asm b/maps/LavenderMart.asm
index fa753ab1b..d8f88c659 100644
--- a/maps/LavenderMart.asm
+++ b/maps/LavenderMart.asm
@@ -4,7 +4,7 @@ const_value set 2
const LAVENDERMART_ROCKER
LavenderMart_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -16,13 +16,13 @@ ClerkScript_0x7eb1c:
closetext
end
-PokefanMScript_0x7eb23:
- jumptextfaceplayer UnknownText_0x7eb29
+LavenderMartPokefanMScript:
+ jumptextfaceplayer LavenderMartPokefanMText
-RockerScript_0x7eb26:
- jumptextfaceplayer UnknownText_0x7ebac
+LavenderMartRockerScript:
+ jumptextfaceplayer LavenderMartRockerText
-UnknownText_0x7eb29:
+LavenderMartPokefanMText:
text "REPEL is a neces-"
line "sity if you are"
@@ -36,7 +36,7 @@ UnknownText_0x7eb29:
line "all the caves."
done
-UnknownText_0x7ebac:
+LavenderMartRockerText:
text "I heard about a"
line "craftsman who"
@@ -56,14 +56,14 @@ LavenderMart_MapEventHeader:
warp_def $7, $2, 5, LAVENDER_TOWN
warp_def $7, $3, 5, LAVENDER_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x7eb1c, -1
- person_event SPRITE_POKEFAN_M, 6, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x7eb23, -1
- person_event SPRITE_ROCKER, 2, 9, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RockerScript_0x7eb26, -1
+ object_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x7eb1c, -1
+ object_event SPRITE_POKEFAN_M, 6, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, LavenderMartPokefanMScript, -1
+ object_event SPRITE_ROCKER, 2, 9, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LavenderMartRockerScript, -1
diff --git a/maps/LavenderNameRater.asm b/maps/LavenderNameRater.asm
index 6ac3cfb26..94eb4935b 100644
--- a/maps/LavenderNameRater.asm
+++ b/maps/LavenderNameRater.asm
@@ -2,16 +2,14 @@ const_value set 2
const LAVENDERNAMERATER_NAME_RATER
LavenderNameRater_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 1
-
- ; triggers
- dw UnknownScript_0x7eaf1, 0
+ scene_script .DummyScene
.MapCallbacks:
db 0
-UnknownScript_0x7eaf1:
+.DummyScene:
end
LavenderNameRater:
@@ -22,8 +20,7 @@ LavenderNameRater:
closetext
end
-LavenderNameRaterBookshelf:
-; unused
+LavenderNameRaterUnusedBookshelf:
jumpstd difficultbookshelf
LavenderNameRater_MapEventHeader:
@@ -35,12 +32,12 @@ LavenderNameRater_MapEventHeader:
warp_def $7, $2, 4, LAVENDER_TOWN
warp_def $7, $3, 4, LAVENDER_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_GENTLEMAN, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, LavenderNameRater, -1
+ object_event SPRITE_GENTLEMAN, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, LavenderNameRater, -1
diff --git a/maps/LavenderPokeCenter1F.asm b/maps/LavenderPokeCenter1F.asm
deleted file mode 100644
index 6cf383773..000000000
--- a/maps/LavenderPokeCenter1F.asm
+++ /dev/null
@@ -1,104 +0,0 @@
-const_value set 2
- const LAVENDERPOKECENTER1F_NURSE
- const LAVENDERPOKECENTER1F_GENTLEMAN
- const LAVENDERPOKECENTER1F_TEACHER
- const LAVENDERPOKECENTER1F_YOUNGSTER
-
-LavenderPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x7e6a0:
- jumpstd pokecenternurse
-
-GentlemanScript_0x7e6a3:
- jumptextfaceplayer UnknownText_0x7e6bd
-
-TeacherScript_0x7e6a6:
- jumptextfaceplayer UnknownText_0x7e710
-
-YoungsterScript_0x7e6a9:
- faceplayer
- opentext
- checkevent EVENT_RETURNED_MACHINE_PART
- iftrue UnknownScript_0x7e6b7
- writetext UnknownText_0x7e779
- waitbutton
- closetext
- end
-
-UnknownScript_0x7e6b7:
- writetext UnknownText_0x7e7ed
- waitbutton
- closetext
- end
-
-UnknownText_0x7e6bd:
- text "To the north of"
- line "LAVENDER is ROCK"
-
- para "TUNNEL. Go through"
- line "it to get to the"
- cont "POWER PLANT."
- done
-
-UnknownText_0x7e710:
- text "There's a radio"
- line "program that plays"
- cont "# FLUTE music."
-
- para "Oh? Ah, your radio"
- line "needs an EXPN CARD"
- cont "to tune into it."
- done
-
-UnknownText_0x7e779:
- text "If the POWER PLANT"
- line "isn't running, the"
-
- para "MAGNET TRAIN won't"
- line "run either…"
-
- para "It also means the"
- line "RADIO STATION"
- cont "can't broadcast…"
- done
-
-UnknownText_0x7e7ed:
- text "The DIRECTOR of"
- line "the RADIO STATION"
- cont "sure was happy."
-
- para "He said they're"
- line "back on the air"
-
- para "because the POWER"
- line "PLANT is running"
- cont "smoothly again."
- done
-
-LavenderPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 1, LAVENDER_TOWN
- warp_def $7, $4, 1, LAVENDER_TOWN
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 4
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x7e6a0, -1
- person_event SPRITE_GENTLEMAN, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x7e6a3, -1
- person_event SPRITE_TEACHER, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TeacherScript_0x7e6a6, -1
- person_event SPRITE_YOUNGSTER, 5, 1, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x7e6a9, -1
diff --git a/maps/LavenderPokeCenter2FBeta.asm b/maps/LavenderPokeCenter2FBeta.asm
deleted file mode 100644
index 9d31d8d4e..000000000
--- a/maps/LavenderPokeCenter2FBeta.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-LavenderPokeCenter2FBeta_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-LavenderPokeCenter2FBeta_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 1
- warp_def $7, $0, 3, LAVENDER_POKECENTER_1F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/LavenderPokecenter1F.asm b/maps/LavenderPokecenter1F.asm
new file mode 100644
index 000000000..3c0f40b20
--- /dev/null
+++ b/maps/LavenderPokecenter1F.asm
@@ -0,0 +1,104 @@
+const_value set 2
+ const LAVENDERPOKECENTER1F_NURSE
+ const LAVENDERPOKECENTER1F_GENTLEMAN
+ const LAVENDERPOKECENTER1F_TEACHER
+ const LAVENDERPOKECENTER1F_YOUNGSTER
+
+LavenderPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x7e6a0:
+ jumpstd pokecenternurse
+
+LavenderPokecenter1FGentlemanScript:
+ jumptextfaceplayer LavenderPokecenter1FGentlemanText
+
+LavenderPokecenter1FTeacherScript:
+ jumptextfaceplayer LavenderPokecenter1FTeacherText
+
+YoungsterScript_0x7e6a9:
+ faceplayer
+ opentext
+ checkevent EVENT_RETURNED_MACHINE_PART
+ iftrue UnknownScript_0x7e6b7
+ writetext UnknownText_0x7e779
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x7e6b7:
+ writetext UnknownText_0x7e7ed
+ waitbutton
+ closetext
+ end
+
+LavenderPokecenter1FGentlemanText:
+ text "To the north of"
+ line "LAVENDER is ROCK"
+
+ para "TUNNEL. Go through"
+ line "it to get to the"
+ cont "POWER PLANT."
+ done
+
+LavenderPokecenter1FTeacherText:
+ text "There's a radio"
+ line "program that plays"
+ cont "# FLUTE music."
+
+ para "Oh? Ah, your radio"
+ line "needs an EXPN CARD"
+ cont "to tune into it."
+ done
+
+UnknownText_0x7e779:
+ text "If the POWER PLANT"
+ line "isn't running, the"
+
+ para "MAGNET TRAIN won't"
+ line "run either…"
+
+ para "It also means the"
+ line "RADIO STATION"
+ cont "can't broadcast…"
+ done
+
+UnknownText_0x7e7ed:
+ text "The DIRECTOR of"
+ line "the RADIO STATION"
+ cont "sure was happy."
+
+ para "He said they're"
+ line "back on the air"
+
+ para "because the POWER"
+ line "PLANT is running"
+ cont "smoothly again."
+ done
+
+LavenderPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 1, LAVENDER_TOWN
+ warp_def $7, $4, 1, LAVENDER_TOWN
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x7e6a0, -1
+ object_event SPRITE_GENTLEMAN, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LavenderPokecenter1FGentlemanScript, -1
+ object_event SPRITE_TEACHER, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, LavenderPokecenter1FTeacherScript, -1
+ object_event SPRITE_YOUNGSTER, 5, 1, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x7e6a9, -1
diff --git a/maps/LavenderPokecenter2FBeta.asm b/maps/LavenderPokecenter2FBeta.asm
new file mode 100644
index 000000000..459b1e5a4
--- /dev/null
+++ b/maps/LavenderPokecenter2FBeta.asm
@@ -0,0 +1,23 @@
+LavenderPokecenter2FBeta_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+LavenderPokecenter2FBeta_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 1
+ warp_def $7, $0, 3, LAVENDER_POKECENTER_1F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/LavenderTown.asm b/maps/LavenderTown.asm
index 45f235d76..2e0123061 100644
--- a/maps/LavenderTown.asm
+++ b/maps/LavenderTown.asm
@@ -5,30 +5,28 @@ const_value set 2
const LAVENDERTOWN_YOUNGSTER
LavenderTown_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_LAVENDER
return
-PokefanMScript_0x1ad6e4:
- jumptextfaceplayer UnknownText_0x1ad702
+LavenderTownPokefanMScript:
+ jumptextfaceplayer LavenderTownPokefanMText
-TeacherScript_0x1ad6e7:
- jumptextfaceplayer UnknownText_0x1ad73a
+LavenderTownTeacherScript:
+ jumptextfaceplayer LavenderTownTeacherText
-GrampsScript_0x1ad6ea:
- jumptextfaceplayer UnknownText_0x1ad75c
+LavenderTownGrampsScript:
+ jumptextfaceplayer LavenderTownGrampsText
-YoungsterScript_0x1ad6ed:
- jumptextfaceplayer UnknownText_0x1ad7ac
+LavenderTownYoungsterScript:
+ jumptextfaceplayer LavenderTownYoungsterText
LavenderTownSign:
jumptext LavenderTownSignText
@@ -42,13 +40,13 @@ VolunteerPokemonHouseSign:
SoulHouseSign:
jumptext SoulHouseSignText
-LavenderPokeCenterSignText:
+LavenderPokecenterSignText:
jumpstd pokecentersign
LavenderMartSignText:
jumpstd martsign
-UnknownText_0x1ad702:
+LavenderTownPokefanMText:
text "That's quite some"
line "building, eh?"
@@ -56,12 +54,12 @@ UnknownText_0x1ad702:
line "TOWER."
done
-UnknownText_0x1ad73a:
+LavenderTownTeacherText:
text "KANTO has many"
line "good radio shows."
done
-UnknownText_0x1ad75c:
+LavenderTownGrampsText:
text "People come from"
line "all over to pay"
@@ -70,7 +68,7 @@ UnknownText_0x1ad75c:
cont "of #MON."
done
-UnknownText_0x1ad7ac:
+LavenderTownYoungsterText:
text "You need a #"
line "FLUTE to wake"
cont "sleeping #MON."
@@ -121,21 +119,21 @@ LavenderTown_MapEventHeader:
warp_def $b, $d, 1, SOUL_HOUSE
warp_def $5, $e, 1, LAV_RADIO_TOWER_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 6
- signpost 3, 11, SIGNPOST_READ, LavenderTownSign
- signpost 7, 15, SIGNPOST_READ, KantoRadioStationSign
- signpost 9, 3, SIGNPOST_READ, VolunteerPokemonHouseSign
- signpost 13, 15, SIGNPOST_READ, SoulHouseSign
- signpost 5, 6, SIGNPOST_READ, LavenderPokeCenterSignText
- signpost 5, 2, SIGNPOST_READ, LavenderMartSignText
-
-.PersonEvents:
+ bg_event 3, 11, BGEVENT_READ, LavenderTownSign
+ bg_event 7, 15, BGEVENT_READ, KantoRadioStationSign
+ bg_event 9, 3, BGEVENT_READ, VolunteerPokemonHouseSign
+ bg_event 13, 15, BGEVENT_READ, SoulHouseSign
+ bg_event 5, 6, BGEVENT_READ, LavenderPokecenterSignText
+ bg_event 5, 2, BGEVENT_READ, LavenderMartSignText
+
+.ObjectEvents:
db 4
- person_event SPRITE_POKEFAN_M, 7, 12, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x1ad6e4, -1
- person_event SPRITE_TEACHER, 15, 2, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, TeacherScript_0x1ad6e7, -1
- person_event SPRITE_GRAMPS, 12, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrampsScript_0x1ad6ea, -1
- person_event SPRITE_YOUNGSTER, 11, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 1, YoungsterScript_0x1ad6ed, -1
+ object_event SPRITE_POKEFAN_M, 7, 12, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, LavenderTownPokefanMScript, -1
+ object_event SPRITE_TEACHER, 15, 2, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, LavenderTownTeacherScript, -1
+ object_event SPRITE_GRAMPS, 12, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LavenderTownGrampsScript, -1
+ object_event SPRITE_YOUNGSTER, 11, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 1, LavenderTownYoungsterScript, -1
diff --git a/maps/LavenderTownSpeechHouse.asm b/maps/LavenderTownSpeechHouse.asm
index ad4d0e23c..d55546110 100644
--- a/maps/LavenderTownSpeechHouse.asm
+++ b/maps/LavenderTownSpeechHouse.asm
@@ -2,19 +2,19 @@ const_value set 2
const LAVENDERTOWNSPEECHHOUSE_POKEFAN_F
LavenderTownSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-PokefanFScript_0x7ea47:
- jumptextfaceplayer UnknownText_0x7ea4d
+LavenderTownSpeechHousePokefanFScript:
+ jumptextfaceplayer LavenderTownSpeechHousePokefanFText
LavenderTownSpeechHouseBookshelf:
jumpstd picturebookshelf
-UnknownText_0x7ea4d:
+LavenderTownSpeechHousePokefanFText:
text "LAVENDER is a"
line "tiny, quiet town"
@@ -37,14 +37,14 @@ LavenderTownSpeechHouse_MapEventHeader:
warp_def $7, $2, 3, LAVENDER_TOWN
warp_def $7, $3, 3, LAVENDER_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, LavenderTownSpeechHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, LavenderTownSpeechHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, LavenderTownSpeechHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, LavenderTownSpeechHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKEFAN_F, 3, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x7ea47, -1
+ object_event SPRITE_POKEFAN_F, 3, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, LavenderTownSpeechHousePokefanFScript, -1
diff --git a/maps/MahoganyGym.asm b/maps/MahoganyGym.asm
index 5ac4ef61b..9bef8263a 100644
--- a/maps/MahoganyGym.asm
+++ b/maps/MahoganyGym.asm
@@ -8,7 +8,7 @@ const_value set 2
const MAHOGANYGYM_GYM_GUY
MahoganyGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -33,7 +33,7 @@ PryceScript_0x199a9e:
waitsfx
setflag ENGINE_GLACIERBADGE
checkcode VAR_BADGES
- scall MahoganyGymTriggerRockets
+ scall MahoganyGymActivateRockets
.FightDone:
checkevent EVENT_GOT_TM16_ICY_WIND
iftrue PryceScript_Defeat
@@ -59,7 +59,7 @@ MahoganyGym_NoRoomForIcyWind:
closetext
end
-MahoganyGymTriggerRockets:
+MahoganyGymActivateRockets:
if_equal 7, .RadioTowerRockets
if_equal 6, .GoldenrodRockets
end
@@ -71,56 +71,56 @@ MahoganyGymTriggerRockets:
jumpstd radiotowerrockets
TrainerSkierRoxanne:
- trainer EVENT_BEAT_SKIER_ROXANNE, SKIER, ROXANNE, SkierRoxanneSeenText, SkierRoxanneBeatenText, 0, SkierRoxanneScript
+ trainer EVENT_BEAT_SKIER_ROXANNE, SKIER, ROXANNE, SkierRoxanneSeenText, SkierRoxanneBeatenText, 0, .Script
-SkierRoxanneScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19a116
+ writetext SkierRoxanneAfterBattleText
waitbutton
closetext
end
TrainerSkierClarissa:
- trainer EVENT_BEAT_SKIER_CLARISSA, SKIER, CLARISSA, SkierClarissaSeenText, SkierClarissaBeatenText, 0, SkierClarissaScript
+ trainer EVENT_BEAT_SKIER_CLARISSA, SKIER, CLARISSA, SkierClarissaSeenText, SkierClarissaBeatenText, 0, .Script
-SkierClarissaScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19a18f
+ writetext SkierClarissaAfterBattleText
waitbutton
closetext
end
TrainerBoarderRonald:
- trainer EVENT_BEAT_BOARDER_RONALD, BOARDER, RONALD, BoarderRonaldSeenText, BoarderRonaldBeatenText, 0, BoarderRonaldScript
+ trainer EVENT_BEAT_BOARDER_RONALD, BOARDER, RONALD, BoarderRonaldSeenText, BoarderRonaldBeatenText, 0, .Script
-BoarderRonaldScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x199f2d
+ writetext BoarderRonaldAfterBattleText
waitbutton
closetext
end
TrainerBoarderBrad:
- trainer EVENT_BEAT_BOARDER_BRAD, BOARDER, BRAD, BoarderBradSeenText, BoarderBradBeatenText, 0, BoarderBradScript
+ trainer EVENT_BEAT_BOARDER_BRAD, BOARDER, BRAD, BoarderBradSeenText, BoarderBradBeatenText, 0, .Script
-BoarderBradScript:
+.Script:
end_if_just_battled
opentext
- writetext BorderBradTalkText
+ writetext BoarderBradAfterBattleText
waitbutton
closetext
end
TrainerBoarderDouglas:
- trainer EVENT_BEAT_BOARDER_DOUGLAS, BOARDER, DOUGLAS, BoarderDouglasSeenText, BoarderDouglasBeatenText, 0, BoarderDouglasScript
+ trainer EVENT_BEAT_BOARDER_DOUGLAS, BOARDER, DOUGLAS, BoarderDouglasSeenText, BoarderDouglasBeatenText, 0, .Script
-BoarderDouglasScript:
+.Script:
end_if_just_battled
opentext
- writetext BorderDouglasTalkText
+ writetext BoarderDouglasAfterBattleText
waitbutton
closetext
end
@@ -251,7 +251,7 @@ BoarderRonaldBeatenText:
line "do a thing."
done
-UnknownText_0x199f2d:
+BoarderRonaldAfterBattleText:
text "I think there's a"
line "move a #MON"
@@ -276,7 +276,7 @@ BoarderBradBeatenText:
line "serious we are?"
done
-BorderBradTalkText:
+BoarderBradAfterBattleText:
text "This GYM is great."
line "I love boarding"
cont "with my #MON!"
@@ -292,7 +292,7 @@ BoarderDouglasBeatenText:
line "PRYCE's secret."
done
-BorderDouglasTalkText:
+BoarderDouglasAfterBattleText:
text "The secret behind"
line "PRYCE's power…"
@@ -316,7 +316,7 @@ SkierRoxanneBeatenText:
line "you in skiing!"
done
-UnknownText_0x19a116:
+SkierRoxanneAfterBattleText:
text "If you don't skate"
line "with precision,"
@@ -334,7 +334,7 @@ SkierClarissaBeatenText:
line "wipe out!"
done
-UnknownText_0x19a18f:
+SkierClarissaAfterBattleText:
text "I shouldn't have"
line "been bragging"
cont "about my skiing…"
@@ -381,20 +381,20 @@ MahoganyGym_MapEventHeader:
warp_def $11, $4, 3, MAHOGANY_TOWN
warp_def $11, $5, 3, MAHOGANY_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 15, 3, SIGNPOST_READ, MahoganyGymStatue
- signpost 15, 6, SIGNPOST_READ, MahoganyGymStatue
+ bg_event 15, 3, BGEVENT_READ, MahoganyGymStatue
+ bg_event 15, 6, BGEVENT_READ, MahoganyGymStatue
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_PRYCE, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PryceScript_0x199a9e, -1
- person_event SPRITE_BUENA, 6, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerSkierRoxanne, -1
- person_event SPRITE_ROCKER, 17, 0, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerBoarderRonald, -1
- person_event SPRITE_BUENA, 17, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerSkierClarissa, -1
- person_event SPRITE_ROCKER, 9, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerBoarderBrad, -1
- person_event SPRITE_ROCKER, 4, 2, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerBoarderDouglas, -1
- person_event SPRITE_GYM_GUY, 15, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, MahoganyGymGuyScript, -1
+ object_event SPRITE_PRYCE, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, PryceScript_0x199a9e, -1
+ object_event SPRITE_BUENA, 6, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerSkierRoxanne, -1
+ object_event SPRITE_ROCKER, 17, 0, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerBoarderRonald, -1
+ object_event SPRITE_BUENA, 17, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerSkierClarissa, -1
+ object_event SPRITE_ROCKER, 9, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerBoarderBrad, -1
+ object_event SPRITE_ROCKER, 4, 2, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerBoarderDouglas, -1
+ object_event SPRITE_GYM_GUY, 15, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, MahoganyGymGuyScript, -1
diff --git a/maps/MahoganyMart1F.asm b/maps/MahoganyMart1F.asm
index 532574644..5ae14cbd8 100644
--- a/maps/MahoganyMart1F.asm
+++ b/maps/MahoganyMart1F.asm
@@ -6,33 +6,28 @@ const_value set 2
const MAHOGANYMART1F_GRANNY
MahoganyMart1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x6c356, 0
- dw UnknownScript_0x6c357, 0
+ scene_script .DummyScene0
+ scene_script .LanceUncoversStaircase
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_TILES, .MahoganyMart1FStaircase
- ; callbacks
-
- dbw MAPCALLBACK_TILES, UnknownScript_0x6c35b
-
-UnknownScript_0x6c356:
+.DummyScene0:
end
-UnknownScript_0x6c357:
+.LanceUncoversStaircase:
priorityjump UnknownScript_0x6c38f
end
-UnknownScript_0x6c35b:
+.MahoganyMart1FStaircase:
checkevent EVENT_UNCOVERED_STAIRCASE_IN_MAHOGANY_MART
- iftrue UnknownScript_0x6c362
+ iftrue .ShowStairs
return
-UnknownScript_0x6c362:
+.ShowStairs:
changeblock $6, $2, $1e
return
@@ -106,7 +101,7 @@ UnknownScript_0x6c38f:
applymovement MAHOGANYMART1F_LANCE, MovementData_0x6c412
playsound SFX_EXIT_BUILDING
disappear MAHOGANYMART1F_LANCE
- dotrigger $0
+ setscene $0
waitsfx
end
@@ -235,16 +230,16 @@ MahoganyMart1F_MapEventHeader:
warp_def $7, $4, 1, MAHOGANY_TOWN
warp_def $3, $7, 1, TEAM_ROCKET_BASE_B1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_PHARMACIST, 3, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PharmacistScript_0x6c367, EVENT_TEAM_ROCKET_BASE_POPULATION
- person_event SPRITE_BLACK_BELT, 6, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackBeltScript_0x6c37b, EVENT_TEAM_ROCKET_BASE_POPULATION
- person_event SPRITE_LANCE, 6, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_MAHOGANY_MART_LANCE_AND_DRAGONITE
- person_event SPRITE_DRAGON, 6, 3, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_MAHOGANY_MART_LANCE_AND_DRAGONITE
- person_event SPRITE_GRANNY, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrannyScript_0x6c3ee, EVENT_MAHOGANY_MART_OWNERS
+ object_event SPRITE_PHARMACIST, 3, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PharmacistScript_0x6c367, EVENT_TEAM_ROCKET_BASE_POPULATION
+ object_event SPRITE_BLACK_BELT, 6, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackBeltScript_0x6c37b, EVENT_TEAM_ROCKET_BASE_POPULATION
+ object_event SPRITE_LANCE, 6, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_MAHOGANY_MART_LANCE_AND_DRAGONITE
+ object_event SPRITE_DRAGON, 6, 3, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_MAHOGANY_MART_LANCE_AND_DRAGONITE
+ object_event SPRITE_GRANNY, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GrannyScript_0x6c3ee, EVENT_MAHOGANY_MART_OWNERS
diff --git a/maps/MahoganyPokeCenter1F.asm b/maps/MahoganyPokeCenter1F.asm
deleted file mode 100644
index eab6b6299..000000000
--- a/maps/MahoganyPokeCenter1F.asm
+++ /dev/null
@@ -1,77 +0,0 @@
-const_value set 2
- const MAHOGANYPOKECENTER1F_NURSE
- const MAHOGANYPOKECENTER1F_POKEFAN_M
- const MAHOGANYPOKECENTER1F_YOUNGSTER
- const MAHOGANYPOKECENTER1F_COOLTRAINER_F
-
-MahoganyPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x19a356:
- jumpstd pokecenternurse
-
-PokefanMScript_0x19a359:
- jumptextfaceplayer UnknownText_0x19a362
-
-YoungsterScript_0x19a35c:
- jumptextfaceplayer UnknownText_0x19a3b3
-
-CooltrainerFScript_0x19a35f:
- jumptextfaceplayer UnknownText_0x19a418
-
-UnknownText_0x19a362:
- text "What's this? TEAM"
- line "ROCKET has come"
- cont "back?"
-
- para "I saw some men in"
- line "black at LAKE OF"
- cont "RAGE…"
- done
-
-UnknownText_0x19a3b3:
- text "I stop my #MON"
- line "from evolving too"
- cont "early."
-
- para "I make them learn"
- line "certain moves be-"
- cont "fore I let them"
- cont "evolve."
- done
-
-UnknownText_0x19a418:
- text "#MON do become"
- line "stronger when they"
-
- para "evolve, but they"
- line "also learn moves"
- cont "more slowly."
- done
-
-MahoganyPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 4, MAHOGANY_TOWN
- warp_def $7, $4, 4, MAHOGANY_TOWN
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 4
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x19a356, -1
- person_event SPRITE_POKEFAN_M, 2, 7, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x19a359, -1
- person_event SPRITE_YOUNGSTER, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x19a35c, -1
- person_event SPRITE_COOLTRAINER_F, 3, 2, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x19a35f, -1
diff --git a/maps/MahoganyPokecenter1F.asm b/maps/MahoganyPokecenter1F.asm
new file mode 100644
index 000000000..9eead5301
--- /dev/null
+++ b/maps/MahoganyPokecenter1F.asm
@@ -0,0 +1,77 @@
+const_value set 2
+ const MAHOGANYPOKECENTER1F_NURSE
+ const MAHOGANYPOKECENTER1F_POKEFAN_M
+ const MAHOGANYPOKECENTER1F_YOUNGSTER
+ const MAHOGANYPOKECENTER1F_COOLTRAINER_F
+
+MahoganyPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x19a356:
+ jumpstd pokecenternurse
+
+MahoganyPokecenter1FPokefanMScript:
+ jumptextfaceplayer MahoganyPokecenter1FPokefanMText
+
+MahoganyPokecenter1FYoungsterScript:
+ jumptextfaceplayer MahoganyPokecenter1FYoungsterText
+
+MahoganyPokecenter1FCooltrainerFScript:
+ jumptextfaceplayer MahoganyPokecenter1FCooltrainerFText
+
+MahoganyPokecenter1FPokefanMText:
+ text "What's this? TEAM"
+ line "ROCKET has come"
+ cont "back?"
+
+ para "I saw some men in"
+ line "black at LAKE OF"
+ cont "RAGE…"
+ done
+
+MahoganyPokecenter1FYoungsterText:
+ text "I stop my #MON"
+ line "from evolving too"
+ cont "early."
+
+ para "I make them learn"
+ line "certain moves be-"
+ cont "fore I let them"
+ cont "evolve."
+ done
+
+MahoganyPokecenter1FCooltrainerFText:
+ text "#MON do become"
+ line "stronger when they"
+
+ para "evolve, but they"
+ line "also learn moves"
+ cont "more slowly."
+ done
+
+MahoganyPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 4, MAHOGANY_TOWN
+ warp_def $7, $4, 4, MAHOGANY_TOWN
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x19a356, -1
+ object_event SPRITE_POKEFAN_M, 2, 7, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, MahoganyPokecenter1FPokefanMScript, -1
+ object_event SPRITE_YOUNGSTER, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, MahoganyPokecenter1FYoungsterScript, -1
+ object_event SPRITE_COOLTRAINER_F, 3, 2, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MahoganyPokecenter1FCooltrainerFScript, -1
diff --git a/maps/MahoganyRedGyaradosSpeechHouse.asm b/maps/MahoganyRedGyaradosSpeechHouse.asm
index a2681e9bf..3ced3ac77 100644
--- a/maps/MahoganyRedGyaradosSpeechHouse.asm
+++ b/maps/MahoganyRedGyaradosSpeechHouse.asm
@@ -3,14 +3,14 @@ const_value set 2
const MAHOGANYREDGYARADOSSPEECHHOUSE_TEACHER
MahoganyRedGyaradosSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-BlackBeltScript_0x19997f:
- jumptextfaceplayer UnknownText_0x19999c
+MahoganyRedGyaradosSpeechHouseBlackBeltScript:
+ jumptextfaceplayer MahoganyRedGyaradosSpeechHouseBlackBeltText
TeacherScript_0x199982:
faceplayer
@@ -34,7 +34,7 @@ UnknownScript_0x195996:
UnknownScript_0x195999:
jumpstd magazinebookshelf
-UnknownText_0x19999c:
+MahoganyRedGyaradosSpeechHouseBlackBeltText:
text "I heard that a red"
line "GYARADOS appeared"
cont "at the LAKE."
@@ -69,13 +69,13 @@ MahoganyRedGyaradosSpeechHouse_MapEventHeader:
warp_def $7, $2, 2, MAHOGANY_TOWN
warp_def $7, $3, 2, MAHOGANY_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_BLACK_BELT, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackBeltScript_0x19997f, -1
- person_event SPRITE_TEACHER, 5, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, TeacherScript_0x199982, -1
+ object_event SPRITE_BLACK_BELT, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MahoganyRedGyaradosSpeechHouseBlackBeltScript, -1
+ object_event SPRITE_TEACHER, 5, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x199982, -1
diff --git a/maps/MahoganyTown.asm b/maps/MahoganyTown.asm
index 0612b0811..93df069e8 100644
--- a/maps/MahoganyTown.asm
+++ b/maps/MahoganyTown.asm
@@ -5,23 +5,19 @@ const_value set 2
const MAHOGANYTOWN_LASS
MahoganyTown_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
+.DummyScene1:
end
.FlyPoint:
@@ -107,11 +103,11 @@ UnknownScript_0x19008c:
closetext
end
-FisherScript_0x190092:
- jumptextfaceplayer UnknownText_0x190276
+MahoganyTownFisherScript:
+ jumptextfaceplayer MahoganyTownFisherText
-LassScript_0x190095:
- jumptextfaceplayer UnknownText_0x1902f2
+MahoganyTownLassScript:
+ jumptextfaceplayer MahoganyTownLassText
MahoganyTownSign:
jumptext MahoganyTownSignText
@@ -122,7 +118,7 @@ MahoganyTownRagecandybarSign:
MahoganyGymSign:
jumptext MahoganyGymSignText
-MahoganyTownPokeCenterSign:
+MahoganyTownPokecenterSign:
jumpstd pokecentersign
MovementData_0x1900a4:
@@ -204,7 +200,7 @@ UnknownText_0x19021d:
cont "anglers there."
done
-UnknownText_0x190276:
+MahoganyTownFisherText:
text "Since you came"
line "this far, take the"
@@ -218,7 +214,7 @@ UnknownText_0x190276:
line "right now."
done
-UnknownText_0x1902f2:
+MahoganyTownLassText:
text "Visit Grandma's"
line "shop. She sells"
@@ -260,21 +256,21 @@ MahoganyTown_MapEventHeader:
warp_def $d, $f, 1, MAHOGANY_POKECENTER_1F
warp_def $1, $9, 3, ROUTE_43_MAHOGANY_GATE
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 0, $8, $13, $0, UnknownScript_0x190013, $0, $0
- xy_trigger 0, $9, $13, $0, UnknownScript_0x190013, $0, $0
+ coord_event 0, $8, $13, UnknownScript_0x190013
+ coord_event 0, $9, $13, UnknownScript_0x190013
-.Signposts:
+.BGEvents:
db 4
- signpost 5, 1, SIGNPOST_READ, MahoganyTownSign
- signpost 7, 9, SIGNPOST_READ, MahoganyTownRagecandybarSign
- signpost 13, 3, SIGNPOST_READ, MahoganyGymSign
- signpost 13, 16, SIGNPOST_READ, MahoganyTownPokeCenterSign
+ bg_event 5, 1, BGEVENT_READ, MahoganyTownSign
+ bg_event 7, 9, BGEVENT_READ, MahoganyTownRagecandybarSign
+ bg_event 13, 3, BGEVENT_READ, MahoganyGymSign
+ bg_event 13, 16, BGEVENT_READ, MahoganyTownPokecenterSign
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_POKEFAN_M, 8, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x19002e, EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST
- person_event SPRITE_GRAMPS, 9, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrampsScript_0x19007e, -1
- person_event SPRITE_FISHER, 14, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FisherScript_0x190092, EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_GYM
- person_event SPRITE_LASS, 8, 12, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LassScript_0x190095, EVENT_MAHOGANY_MART_OWNERS
+ object_event SPRITE_POKEFAN_M, 8, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PokefanMScript_0x19002e, EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST
+ object_event SPRITE_GRAMPS, 9, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GrampsScript_0x19007e, -1
+ object_event SPRITE_FISHER, 14, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, MahoganyTownFisherScript, EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_GYM
+ object_event SPRITE_LASS, 8, 12, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MahoganyTownLassScript, EVENT_MAHOGANY_MART_OWNERS
diff --git a/maps/ManiasHouse.asm b/maps/ManiasHouse.asm
index f73aa3d8c..2c868e6d2 100644
--- a/maps/ManiasHouse.asm
+++ b/maps/ManiasHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const MANIASHOUSE_ROCKER
ManiasHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -207,12 +207,12 @@ ManiasHouse_MapEventHeader:
warp_def $7, $2, 1, CIANWOOD_CITY
warp_def $7, $3, 1, CIANWOOD_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_ROCKER, 4, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ManiaScript, -1
+ object_event SPRITE_ROCKER, 4, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ManiaScript, -1
diff --git a/maps/MobileBattleRoom.asm b/maps/MobileBattleRoom.asm
index 7c5628955..4983c3fa4 100644
--- a/maps/MobileBattleRoom.asm
+++ b/maps/MobileBattleRoom.asm
@@ -1,24 +1,22 @@
MobileBattleRoom_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .InitializeMobileBattleRoom
+ scene_script .DummyScene
.MapCallbacks:
db 0
-.Trigger0:
- priorityjump MobileBattleRoom_Initialize
+.InitializeMobileBattleRoom:
+ priorityjump .InitializeAndPreparePokecenter2F
end
-.Trigger1:
+.DummyScene:
end
-MobileBattleRoom_Initialize:
- dotrigger $1
- domaptrigger POKECENTER_2F, $5
+.InitializeAndPreparePokecenter2F:
+ setscene $1
+ setmapscene POKECENTER_2F, $5
end
MapMobileBattleRoomSignpost0Script:
@@ -77,12 +75,12 @@ MobileBattleRoom_MapEventHeader:
warp_def $7, $4, 6, POKECENTER_2F
warp_def $7, $5, 6, POKECENTER_2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 2, 4, SIGNPOST_UP, MapMobileBattleRoomSignpost0Script
+ bg_event 2, 4, BGEVENT_UP, MapMobileBattleRoomSignpost0Script
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/MobileTradeRoomMobile.asm b/maps/MobileTradeRoomMobile.asm
index 60a0f72fc..1ccd70ade 100644
--- a/maps/MobileTradeRoomMobile.asm
+++ b/maps/MobileTradeRoomMobile.asm
@@ -1,24 +1,22 @@
MobileTradeRoomMobile_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .InitializeMobileTradeRoomMobile
+ scene_script .DummyScene
.MapCallbacks:
db 0
-.Trigger0:
- priorityjump MobileTradeRoomMobile_Initialize
+.InitializeMobileTradeRoomMobile:
+ priorityjump .InitializeAndPreparePokecenter2F
end
-.Trigger1:
+.DummyScene:
end
-MobileTradeRoomMobile_Initialize:
- dotrigger $1
- domaptrigger POKECENTER_2F, $4
+.InitializeAndPreparePokecenter2F:
+ setscene $1
+ setmapscene POKECENTER_2F, $4
end
MapMobileTradeRoomMobileSignpost0Script:
@@ -45,12 +43,12 @@ MobileTradeRoomMobile_MapEventHeader:
warp_def $7, $4, 5, POKECENTER_2F
warp_def $7, $5, 5, POKECENTER_2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 2, 4, SIGNPOST_UP, MapMobileTradeRoomMobileSignpost0Script
+ bg_event 2, 4, BGEVENT_UP, MapMobileTradeRoomMobileSignpost0Script
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/MountMoon.asm b/maps/MountMoon.asm
index 649b5686f..1f7301ebb 100644
--- a/maps/MountMoon.asm
+++ b/maps/MountMoon.asm
@@ -2,21 +2,19 @@ const_value set 2
const MOUNTMOON_SILVER
MountMoon_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .RivalEncounter
+ scene_script .DummyScene
.MapCallbacks:
db 0
-.Trigger0:
+.RivalEncounter:
priorityjump .RivalBattle
end
-.Trigger1:
+.DummyScene:
end
.RivalBattle:
@@ -36,7 +34,7 @@ MountMoon_MapScriptHeader:
iftrue .Chikorita
winlosstext MountMoonSilverTextWin, MountMoonSilverTextLoss
setlasttalked MOUNTMOON_SILVER
- loadtrainer RIVAL2, 3
+ loadtrainer RIVAL2, RIVAL2_1_TOTODILE
startbattle
dontrestartmapmusic
reloadmapafterbattle
@@ -45,7 +43,7 @@ MountMoon_MapScriptHeader:
.Totodile:
winlosstext MountMoonSilverTextWin, MountMoonSilverTextLoss
setlasttalked MOUNTMOON_SILVER
- loadtrainer RIVAL2, 1
+ loadtrainer RIVAL2, RIVAL2_1_CHIKORITA
startbattle
dontrestartmapmusic
reloadmapafterbattle
@@ -54,7 +52,7 @@ MountMoon_MapScriptHeader:
.Chikorita:
winlosstext MountMoonSilverTextWin, MountMoonSilverTextLoss
setlasttalked MOUNTMOON_SILVER
- loadtrainer RIVAL2, 2
+ loadtrainer RIVAL2, RIVAL2_1_CYNDAQUIL
startbattle
dontrestartmapmusic
reloadmapafterbattle
@@ -68,7 +66,7 @@ MountMoon_MapScriptHeader:
closetext
applymovement MOUNTMOON_SILVER, MountMoonSilverMovementAfter
disappear MOUNTMOON_SILVER
- dotrigger $1
+ setscene $1
setevent EVENT_BEAT_RIVAL_IN_MT_MOON
playmapmusic
end
@@ -177,12 +175,12 @@ MountMoon_MapEventHeader:
warp_def $3, $19, 3, MOUNT_MOON
warp_def $d, $19, 4, MOUNT_MOON
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_SILVER, 3, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_MT_MOON_RIVAL
+ object_event SPRITE_SILVER, 3, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_MT_MOON_RIVAL
diff --git a/maps/MountMoonGiftShop.asm b/maps/MountMoonGiftShop.asm
index 1df1c2279..954ab2d26 100644
--- a/maps/MountMoonGiftShop.asm
+++ b/maps/MountMoonGiftShop.asm
@@ -5,7 +5,7 @@ const_value set 2
const MOUNTMOONGIFTSHOP_LASS2
MountMoonGiftShop_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -18,10 +18,10 @@ GrampsScript_0x771a8:
closetext
end
-LassScript_0x771b0:
- jumptextfaceplayer UnknownText_0x771b3
+MountMoonGiftShopLassScript:
+ jumptextfaceplayer MountMoonGiftShopLassText
-UnknownText_0x771b3:
+MountMoonGiftShopLassText:
text "When the sun goes"
line "down, CLEFAIRY"
cont "come out to play."
@@ -36,15 +36,15 @@ MountMoonGiftShop_MapEventHeader:
warp_def $7, $3, 3, MOUNT_MOON_SQUARE
warp_def $7, $4, 3, MOUNT_MOON_SQUARE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_GRAMPS, 3, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, 1, 0, PERSONTYPE_SCRIPT, 0, GrampsScript_0x771a8, -1
- person_event SPRITE_GRAMPS, 2, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, 2, 0, PERSONTYPE_SCRIPT, 0, GrampsScript_0x771a8, -1
- person_event SPRITE_LASS, 6, 1, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, 1, 0, PERSONTYPE_SCRIPT, 0, LassScript_0x771b0, -1
- person_event SPRITE_LASS, 4, 5, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, 2, 0, PERSONTYPE_SCRIPT, 0, LassScript_0x771b0, -1
+ object_event SPRITE_GRAMPS, 3, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, MORN, 0, OBJECTTYPE_SCRIPT, 0, GrampsScript_0x771a8, -1
+ object_event SPRITE_GRAMPS, 2, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, DAY, 0, OBJECTTYPE_SCRIPT, 0, GrampsScript_0x771a8, -1
+ object_event SPRITE_LASS, 6, 1, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, MORN, 0, OBJECTTYPE_SCRIPT, 0, MountMoonGiftShopLassScript, -1
+ object_event SPRITE_LASS, 4, 5, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, DAY, 0, OBJECTTYPE_SCRIPT, 0, MountMoonGiftShopLassScript, -1
diff --git a/maps/MountMoonSquare.asm b/maps/MountMoonSquare.asm
index 1c84c2e65..0bfff1457 100644
--- a/maps/MountMoonSquare.asm
+++ b/maps/MountMoonSquare.asm
@@ -4,21 +4,16 @@ const_value set 2
const MOUNTMOONSQUARE_ROCK
MountMoonSquare_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 1
-
- ; triggers
- dw .Trigger0, 0
+ scene_script .DummyScene
.MapCallbacks:
db 2
-
- ; callbacks
-
dbw MAPCALLBACK_NEWMAP, .DisappearMoonStone
dbw MAPCALLBACK_OBJECTS, .DisappearRock
-.Trigger0:
+.DummyScene:
end
.DisappearMoonStone:
@@ -148,17 +143,17 @@ MountMoonSquare_MapEventHeader:
warp_def $b, $16, 6, MOUNT_MOON
warp_def $7, $d, 1, MOUNT_MOON_GIFT_SHOP
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 0, $b, $7, $0, ClefairyDance, $0, $0
+ coord_event 0, $b, $7, ClefairyDance
-.Signposts:
+.BGEvents:
db 2
- signpost 7, 7, SIGNPOST_ITEM, MountMoonSquareHiddenMoonStone
- signpost 7, 17, SIGNPOST_READ, DontLitterSign
+ bg_event 7, 7, BGEVENT_ITEM, MountMoonSquareHiddenMoonStone
+ bg_event 7, 17, BGEVENT_READ, DontLitterSign
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_FAIRY, 6, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_MT_MOON_SQUARE_CLEFAIRY
- person_event SPRITE_FAIRY, 6, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_MT_MOON_SQUARE_CLEFAIRY
- person_event SPRITE_ROCK, 7, 7, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, MtMoonSquareRock, EVENT_MT_MOON_SQUARE_ROCK
+ object_event SPRITE_FAIRY, 6, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_MT_MOON_SQUARE_CLEFAIRY
+ object_event SPRITE_FAIRY, 6, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_MT_MOON_SQUARE_CLEFAIRY
+ object_event SPRITE_ROCK, 7, 7, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MtMoonSquareRock, EVENT_MT_MOON_SQUARE_ROCK
diff --git a/maps/MountMortar1FInside.asm b/maps/MountMortar1FInside.asm
index 18abb2152..2c594870e 100644
--- a/maps/MountMortar1FInside.asm
+++ b/maps/MountMortar1FInside.asm
@@ -11,30 +11,30 @@ const_value set 2
const MOUNTMORTAR1FINSIDE_POKE_BALL7
MountMortar1FInside_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerPokemaniacMiller:
- trainer EVENT_BEAT_POKEMANIAC_MILLER, POKEMANIAC, MILLER, PokemaniacMillerSeenText, PokemaniacMillerBeatenText, 0, PokemaniacMillerScript
+ trainer EVENT_BEAT_POKEMANIAC_MILLER, POKEMANIAC, MILLER, PokemaniacMillerSeenText, PokemaniacMillerBeatenText, 0, .Script
-PokemaniacMillerScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x7debd
+ writetext PokemaniacMillerAfterBattleText
waitbutton
closetext
end
TrainerSupernerdMarkus:
- trainer EVENT_BEAT_SUPER_NERD_MARKUS, SUPER_NERD, MARKUS, SupernerdMarkusSeenText, SupernerdMarkusBeatenText, 0, SupernerdMarkusScript
+ trainer EVENT_BEAT_SUPER_NERD_MARKUS, SUPER_NERD, MARKUS, SupernerdMarkusSeenText, SupernerdMarkusBeatenText, 0, .Script
-SupernerdMarkusScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x7df97
+ writetext SupernerdMarkusAfterBattleText
waitbutton
closetext
end
@@ -77,7 +77,7 @@ PokemaniacMillerBeatenText:
line "kid…?"
done
-UnknownText_0x7debd:
+PokemaniacMillerAfterBattleText:
text "A while back, this"
line "karate dude wanted"
@@ -103,7 +103,7 @@ SupernerdMarkusBeatenText:
line "someone else…"
done
-UnknownText_0x7df97:
+SupernerdMarkusAfterBattleText:
text "I came to explore"
line "MT.MORTAR, but I"
@@ -130,22 +130,22 @@ MountMortar1FInside_MapEventHeader:
warp_def $13, $3, 1, MOUNT_MORTAR_B1F
warp_def $9, $9, 2, MOUNT_MORTAR_2F_INSIDE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 11, 30, SIGNPOST_ITEM, MountMortar1FInsideHiddenMaxRepel
+ bg_event 11, 30, BGEVENT_ITEM, MountMortar1FInsideHiddenMaxRepel
-.PersonEvents:
+.ObjectEvents:
db 10
- person_event SPRITE_BOULDER, 43, 21, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, MountMortar1FBoulder, -1
- person_event SPRITE_POKE_BALL, 38, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar1FInsideEscapeRope, EVENT_MOUNT_MORTAR_1F_INSIDE_ESCAPE_ROPE
- person_event SPRITE_POKE_BALL, 10, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar1FInsideMaxRevive, EVENT_MOUNT_MORTAR_1F_INSIDE_MAX_REVIVE
- person_event SPRITE_POKE_BALL, 27, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar1FInsideHyperPotion, EVENT_MOUNT_MORTAR_1F_INSIDE_HYPER_POTION
- person_event SPRITE_POKE_BALL, 20, 22, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar1FInsideMaxPotion, EVENT_MOUNT_MORTAR_1F_INSIDE_MAX_POTION
- person_event SPRITE_POKE_BALL, 19, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar1FInsideNugget, EVENT_MOUNT_MORTAR_1F_INSIDE_NUGGET
- person_event SPRITE_SUPER_NERD, 43, 33, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerPokemaniacMiller, -1
- person_event SPRITE_SUPER_NERD, 28, 24, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerSupernerdMarkus, -1
- person_event SPRITE_POKE_BALL, 16, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar1FInsideIron, EVENT_MOUNT_MORTAR_1F_INSIDE_IRON
- person_event SPRITE_POKE_BALL, 17, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar1FInsideUltraBall, EVENT_MOUNT_MORTAR_1F_INSIDE_ULTRA_BALL
+ object_event SPRITE_BOULDER, 43, 21, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MountMortar1FBoulder, -1
+ object_event SPRITE_POKE_BALL, 38, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideEscapeRope, EVENT_MOUNT_MORTAR_1F_INSIDE_ESCAPE_ROPE
+ object_event SPRITE_POKE_BALL, 10, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideMaxRevive, EVENT_MOUNT_MORTAR_1F_INSIDE_MAX_REVIVE
+ object_event SPRITE_POKE_BALL, 27, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideHyperPotion, EVENT_MOUNT_MORTAR_1F_INSIDE_HYPER_POTION
+ object_event SPRITE_POKE_BALL, 20, 22, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideMaxPotion, EVENT_MOUNT_MORTAR_1F_INSIDE_MAX_POTION
+ object_event SPRITE_POKE_BALL, 19, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideNugget, EVENT_MOUNT_MORTAR_1F_INSIDE_NUGGET
+ object_event SPRITE_SUPER_NERD, 43, 33, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacMiller, -1
+ object_event SPRITE_SUPER_NERD, 28, 24, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerSupernerdMarkus, -1
+ object_event SPRITE_POKE_BALL, 16, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideIron, EVENT_MOUNT_MORTAR_1F_INSIDE_IRON
+ object_event SPRITE_POKE_BALL, 17, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideUltraBall, EVENT_MOUNT_MORTAR_1F_INSIDE_ULTRA_BALL
diff --git a/maps/MountMortar1FOutside.asm b/maps/MountMortar1FOutside.asm
index 069874d8f..0cda940bb 100644
--- a/maps/MountMortar1FOutside.asm
+++ b/maps/MountMortar1FOutside.asm
@@ -3,7 +3,7 @@ const_value set 2
const MOUNTMORTAR1FOUTSIDE_POKE_BALL2
MountMortar1FOutside_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -35,14 +35,14 @@ MountMortar1FOutside_MapEventHeader:
warp_def $d, $7, 3, MOUNT_MORTAR_1F_INSIDE
warp_def $d, $21, 4, MOUNT_MORTAR_1F_INSIDE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 22, 25, SIGNPOST_ITEM, MountMortar1FOutsideHiddenHyperPotion
+ bg_event 22, 25, BGEVENT_ITEM, MountMortar1FOutsideHiddenHyperPotion
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_POKE_BALL, 15, 13, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar1FOutsideEther, EVENT_MOUNT_MORTAR_1F_OUTSIDE_ETHER
- person_event SPRITE_POKE_BALL, 18, 31, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar1FOutsideRevive, EVENT_MOUNT_MORTAR_1F_OUTSIDE_REVIVE
+ object_event SPRITE_POKE_BALL, 15, 13, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FOutsideEther, EVENT_MOUNT_MORTAR_1F_OUTSIDE_ETHER
+ object_event SPRITE_POKE_BALL, 18, 31, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FOutsideRevive, EVENT_MOUNT_MORTAR_1F_OUTSIDE_REVIVE
diff --git a/maps/MountMortar2FInside.asm b/maps/MountMortar2FInside.asm
index f76300a68..cc159273d 100644
--- a/maps/MountMortar2FInside.asm
+++ b/maps/MountMortar2FInside.asm
@@ -8,19 +8,19 @@ const_value set 2
const MOUNTMORTAR2FINSIDE_SUPER_NERD
MountMortar2FInside_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerSupernerdHugh:
- trainer EVENT_BEAT_SUPER_NERD_HUGH, SUPER_NERD, HUGH, SupernerdHughSeenText, SupernerdHughBeatenText, 0, SupernerdHughScript
+ trainer EVENT_BEAT_SUPER_NERD_HUGH, SUPER_NERD, HUGH, SupernerdHughSeenText, SupernerdHughBeatenText, 0, .Script
-SupernerdHughScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x7e10e
+ writetext SupernerdHughAfterBattleText
waitbutton
closetext
end
@@ -55,7 +55,7 @@ SupernerdHughBeatenText:
text "Sorry, my mistake."
done
-UnknownText_0x7e10e:
+SupernerdHughAfterBattleText:
text "I'm investigating"
line "MT.MORTAR, but my"
cont "pal's gone AWOL."
@@ -76,19 +76,19 @@ MountMortar2FInside_MapEventHeader:
warp_def $21, $11, 4, MOUNT_MORTAR_1F_OUTSIDE
warp_def $5, $3, 6, MOUNT_MORTAR_1F_INSIDE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 8, 24, SIGNPOST_ITEM, MountMortar2FInsideHiddenFullRestore
+ bg_event 8, 24, BGEVENT_ITEM, MountMortar2FInsideHiddenFullRestore
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_POKE_BALL, 22, 28, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar2FInsideMaxPotion, EVENT_MOUNT_MORTAR_2F_INSIDE_MAX_POTION
- person_event SPRITE_POKE_BALL, 33, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar2FInsideRareCandy, EVENT_MOUNT_MORTAR_2F_INSIDE_RARE_CANDY
- person_event SPRITE_POKE_BALL, 17, 19, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar2FInsideTMDefenseCurl, EVENT_MOUNT_MORTAR_2F_INSIDE_TM_DEFENSE_CURL
- person_event SPRITE_POKE_BALL, 5, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar2FInsideDragonScale, EVENT_MOUNT_MORTAR_2F_INSIDE_DRAGON_SCALE
- person_event SPRITE_POKE_BALL, 11, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar2FInsideElixer, EVENT_MOUNT_MORTAR_2F_INSIDE_ELIXER
- person_event SPRITE_POKE_BALL, 5, 28, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortar2FInsideEscapeRope, EVENT_MOUNT_MORTAR_2F_INSIDE_ESCAPE_ROPE
- person_event SPRITE_SUPER_NERD, 26, 13, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerSupernerdHugh, -1
+ object_event SPRITE_POKE_BALL, 22, 28, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar2FInsideMaxPotion, EVENT_MOUNT_MORTAR_2F_INSIDE_MAX_POTION
+ object_event SPRITE_POKE_BALL, 33, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar2FInsideRareCandy, EVENT_MOUNT_MORTAR_2F_INSIDE_RARE_CANDY
+ object_event SPRITE_POKE_BALL, 17, 19, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar2FInsideTMDefenseCurl, EVENT_MOUNT_MORTAR_2F_INSIDE_TM_DEFENSE_CURL
+ object_event SPRITE_POKE_BALL, 5, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar2FInsideDragonScale, EVENT_MOUNT_MORTAR_2F_INSIDE_DRAGON_SCALE
+ object_event SPRITE_POKE_BALL, 11, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar2FInsideElixer, EVENT_MOUNT_MORTAR_2F_INSIDE_ELIXER
+ object_event SPRITE_POKE_BALL, 5, 28, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar2FInsideEscapeRope, EVENT_MOUNT_MORTAR_2F_INSIDE_ESCAPE_ROPE
+ object_event SPRITE_SUPER_NERD, 26, 13, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerSupernerdHugh, -1
diff --git a/maps/MountMortarB1F.asm b/maps/MountMortarB1F.asm
index 06ebd10cc..3b7764961 100644
--- a/maps/MountMortarB1F.asm
+++ b/maps/MountMortarB1F.asm
@@ -8,7 +8,7 @@ const_value set 2
const MOUNTMORTARB1F_POKE_BALL5
MountMortarB1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -144,19 +144,19 @@ MountMortarB1F_MapEventHeader:
warp_def $3, $3, 5, MOUNT_MORTAR_1F_INSIDE
warp_def $1d, $13, 7, MOUNT_MORTAR_1F_OUTSIDE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 6, 4, SIGNPOST_ITEM, MountMortarB1FHiddenMaxRevive
+ bg_event 6, 4, BGEVENT_ITEM, MountMortarB1FHiddenMaxRevive
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_POKE_BALL, 12, 29, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortarB1FHyperPotion, EVENT_MOUNT_MORTAR_B1F_HYPER_POTION
- person_event SPRITE_POKE_BALL, 16, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortarB1FCarbos, EVENT_MOUNT_MORTAR_B1F_CARBOS
- person_event SPRITE_BOULDER, 10, 9, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, MountMortarB1FBoulder, -1
- person_event SPRITE_BLACK_BELT, 4, 16, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, BlackBeltScript_0x7e1f6, -1
- person_event SPRITE_POKE_BALL, 24, 34, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortarB1FFullRestore, EVENT_MOUNT_MORTAR_B1F_FULL_RESTORE
- person_event SPRITE_POKE_BALL, 3, 32, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortarB1FMaxEther, EVENT_MOUNT_MORTAR_B1F_MAX_ETHER
- person_event SPRITE_POKE_BALL, 26, 21, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, MountMortarB1FPPUp, EVENT_MOUNT_MORTAR_B1F_PP_UP
+ object_event SPRITE_POKE_BALL, 12, 29, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortarB1FHyperPotion, EVENT_MOUNT_MORTAR_B1F_HYPER_POTION
+ object_event SPRITE_POKE_BALL, 16, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortarB1FCarbos, EVENT_MOUNT_MORTAR_B1F_CARBOS
+ object_event SPRITE_BOULDER, 10, 9, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MountMortarB1FBoulder, -1
+ object_event SPRITE_BLACK_BELT, 4, 16, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BlackBeltScript_0x7e1f6, -1
+ object_event SPRITE_POKE_BALL, 24, 34, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortarB1FFullRestore, EVENT_MOUNT_MORTAR_B1F_FULL_RESTORE
+ object_event SPRITE_POKE_BALL, 3, 32, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortarB1FMaxEther, EVENT_MOUNT_MORTAR_B1F_MAX_ETHER
+ object_event SPRITE_POKE_BALL, 26, 21, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortarB1FPPUp, EVENT_MOUNT_MORTAR_B1F_PP_UP
diff --git a/maps/MoveDeletersHouse.asm b/maps/MoveDeletersHouse.asm
index 1d054f235..7845e98f5 100644
--- a/maps/MoveDeletersHouse.asm
+++ b/maps/MoveDeletersHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const MOVEDELETERSHOUSE_SUPER_NERD
MoveDeletersHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -28,14 +28,14 @@ MoveDeletersHouse_MapEventHeader:
warp_def $7, $2, 6, BLACKTHORN_CITY
warp_def $7, $3, 6, BLACKTHORN_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, MoveDeletersHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, MoveDeletersHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, MoveDeletersHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, MoveDeletersHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_SUPER_NERD, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, MoveDeleter, -1
+ object_event SPRITE_SUPER_NERD, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MoveDeleter, -1
diff --git a/maps/MrFujisHouse.asm b/maps/MrFujisHouse.asm
index 89ebc1568..df4b2fb8a 100644
--- a/maps/MrFujisHouse.asm
+++ b/maps/MrFujisHouse.asm
@@ -6,17 +6,17 @@ const_value set 2
const MRFUJISHOUSE_PIDGEY
MrFujisHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-SuperNerdScript_0x7e8ca:
- jumptextfaceplayer UnknownText_0x7e8f1
+MrFujisHouseSuperNerdScript:
+ jumptextfaceplayer MrFujisHouseSuperNerdText
-LassScript_0x7e8cd:
- jumptextfaceplayer UnknownText_0x7e940
+MrFujisHouseLassScript:
+ jumptextfaceplayer MrFujisHouseLassText
MrFujisPsyduck:
opentext
@@ -45,7 +45,7 @@ MrFujisPidgey:
MrFujisHouseBookshelf:
jumpstd difficultbookshelf
-UnknownText_0x7e8f1:
+MrFujisHouseSuperNerdText:
text "MR.FUJI does live"
line "here, but he's not"
@@ -55,7 +55,7 @@ UnknownText_0x7e8f1:
line "the SOUL HOUSE."
done
-UnknownText_0x7e940:
+MrFujisHouseLassText:
text "Some cold-hearted"
line "people stop caring"
cont "for their #MON."
@@ -88,18 +88,18 @@ MrFujisHouse_MapEventHeader:
warp_def $7, $2, 2, LAVENDER_TOWN
warp_def $7, $3, 2, LAVENDER_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, MrFujisHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, MrFujisHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, MrFujisHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, MrFujisHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_SUPER_NERD, 1, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x7e8ca, -1
- person_event SPRITE_LASS, 4, 3, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LassScript_0x7e8cd, -1
- person_event SPRITE_RHYDON, 4, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, MrFujisPsyduck, -1
- person_event SPRITE_GROWLITHE, 5, 5, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, MrFujisNidorino, -1
- person_event SPRITE_MOLTRES, 3, 1, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, MrFujisPidgey, -1
+ object_event SPRITE_SUPER_NERD, 1, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, MrFujisHouseSuperNerdScript, -1
+ object_event SPRITE_LASS, 4, 3, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MrFujisHouseLassScript, -1
+ object_event SPRITE_RHYDON, 4, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MrFujisPsyduck, -1
+ object_event SPRITE_GROWLITHE, 5, 5, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, MrFujisNidorino, -1
+ object_event SPRITE_MOLTRES, 3, 1, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, MrFujisPidgey, -1
diff --git a/maps/MrPokemonsHouse.asm b/maps/MrPokemonsHouse.asm
index 6449ad404..bd0650481 100644
--- a/maps/MrPokemonsHouse.asm
+++ b/maps/MrPokemonsHouse.asm
@@ -3,21 +3,19 @@ const_value set 2
const MRPOKEMONSHOUSE_OAK
MrPokemonsHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .MeetMrPokemon
+ scene_script .DummyScene
.MapCallbacks:
db 0
-.Trigger0:
+.MeetMrPokemon:
priorityjump .MrPokemonEvent
end
-.Trigger1:
+.DummyScene:
end
.MrPokemonEvent:
@@ -127,9 +125,9 @@ MrPokemonsHouse_OakScript:
setevent EVENT_RIVAL_NEW_BARK_TOWN
setevent EVENT_KRISS_HOUSE_1F_NEIGHBOR
clearevent EVENT_KRISS_NEIGHBORS_HOUSE_NEIGHBOR
- dotrigger $1
- domaptrigger CHERRYGROVE_CITY, $1
- domaptrigger ELMS_LAB, $3
+ setscene $1
+ setmapscene CHERRYGROVE_CITY, $1
+ setmapscene ELMS_LAB, $3
specialphonecall SPECIALCALL_ROBBED
clearevent EVENT_COP_IN_ELMS_LAB
checkevent EVENT_GOT_TOTODILE_FROM_ELM
@@ -383,18 +381,18 @@ MrPokemonsHouse_MapEventHeader:
warp_def $7, $2, 2, ROUTE_30
warp_def $7, $3, 2, ROUTE_30
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 5
- signpost 1, 0, SIGNPOST_READ, MapMrPokemonsHouseSignpost1Script
- signpost 1, 1, SIGNPOST_READ, MapMrPokemonsHouseSignpost1Script
- signpost 1, 6, SIGNPOST_READ, MapMrPokemonsHouseSignpost3Script
- signpost 1, 7, SIGNPOST_READ, MapMrPokemonsHouseSignpost3Script
- signpost 4, 6, SIGNPOST_READ, MapMrPokemonsHouseSignpost4Script
+ bg_event 1, 0, BGEVENT_READ, MapMrPokemonsHouseSignpost1Script
+ bg_event 1, 1, BGEVENT_READ, MapMrPokemonsHouseSignpost1Script
+ bg_event 1, 6, BGEVENT_READ, MapMrPokemonsHouseSignpost3Script
+ bg_event 1, 7, BGEVENT_READ, MapMrPokemonsHouseSignpost3Script
+ bg_event 4, 6, BGEVENT_READ, MapMrPokemonsHouseSignpost4Script
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_GENTLEMAN, 5, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, MrPokemonsHouse_MrPokemonScript, -1
- person_event SPRITE_OAK, 5, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_MR_POKEMONS_HOUSE_OAK
+ object_event SPRITE_GENTLEMAN, 5, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MrPokemonsHouse_MrPokemonScript, -1
+ object_event SPRITE_OAK, 5, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_MR_POKEMONS_HOUSE_OAK
diff --git a/maps/MrPsychicsHouse.asm b/maps/MrPsychicsHouse.asm
index 04b570bdf..77f82b91e 100644
--- a/maps/MrPsychicsHouse.asm
+++ b/maps/MrPsychicsHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const MRPSYCHICSHOUSE_FISHING_GURU
MrPsychicsHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -15,7 +15,7 @@ MrPsychic:
iftrue .AlreadyGotItem
writetext MrPsychicText1
buttonsound
- verbosegiveitem TM_PSYCHIC
+ verbosegiveitem TM_PSYCHIC_M
iffalse .Done
setevent EVENT_GOT_TM29_PSYCHIC
.AlreadyGotItem:
@@ -56,14 +56,14 @@ MrPsychicsHouse_MapEventHeader:
warp_def $7, $2, 5, SAFFRON_CITY
warp_def $7, $3, 5, SAFFRON_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, MrPsychicsHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, MrPsychicsHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, MrPsychicsHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, MrPsychicsHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_FISHING_GURU, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, MrPsychic, -1
+ object_event SPRITE_FISHING_GURU, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, MrPsychic, -1
diff --git a/maps/NationalPark.asm b/maps/NationalPark.asm
index 1babc73a2..86538fe0d 100644
--- a/maps/NationalPark.asm
+++ b/maps/NationalPark.asm
@@ -15,17 +15,17 @@ const_value set 2
const NATIONALPARK_POKE_BALL2
NationalPark_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-LassScript_0x5c002:
- jumptextfaceplayer UnknownText_0x5c1d3
+NationalParkLassScript:
+ jumptextfaceplayer NationalParkLassText
-PokefanFScript_0x5c005:
- jumptextfaceplayer UnknownText_0x5c22e
+NationalParkPokefanFScript:
+ jumptextfaceplayer NationalParkPokefanFText
TeacherScript_0x5c008:
faceplayer
@@ -44,14 +44,14 @@ UnknownScript_0x5c021:
closetext
end
-YoungsterScript_0x5c023:
- jumptextfaceplayer UnknownText_0x5c35d
+NationalParkYoungster1Script:
+ jumptextfaceplayer NationalParkYoungster1Text
-YoungsterScript_0x5c026:
- jumptextfaceplayer UnknownText_0x5c38f
+NationalParkYoungster2Script:
+ jumptextfaceplayer NationalParkYoungster2Text
-TeacherScript_0x5c029:
- jumptextfaceplayer UnknownText_0x5c3bc
+NationalParkTeacherScript:
+ jumptextfaceplayer NationalParkTeacherText
NationalParkPersian:
faceplayer
@@ -72,9 +72,9 @@ GameboyKidScript_0x5c037:
end
TrainerSchoolboyJack1:
- trainer EVENT_BEAT_SCHOOLBOY_JACK, SCHOOLBOY, JACK1, SchoolboyJack1SeenText, SchoolboyJack1BeatenText, 0, SchoolboyJack1Script
+ trainer EVENT_BEAT_SCHOOLBOY_JACK, SCHOOLBOY, JACK1, SchoolboyJack1SeenText, SchoolboyJack1BeatenText, 0, .Script
-SchoolboyJack1Script:
+.Script:
writecode VAR_CALLERID, PHONE_SCHOOLBOY_JACK
end_if_just_battled
opentext
@@ -189,20 +189,20 @@ UnknownScript_0x5c114:
end
TrainerPokefanmWilliam:
- trainer EVENT_BEAT_POKEFANM_WILLIAM, POKEFANM, WILLIAM, PokefanmWilliamSeenText, PokefanmWilliamBeatenText, 0, PokefanmWilliamScript
+ trainer EVENT_BEAT_POKEFANM_WILLIAM, POKEFANM, WILLIAM, PokefanmWilliamSeenText, PokefanmWilliamBeatenText, 0, .Script
-PokefanmWilliamScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5c645
+ writetext PokefanmWilliamAfterBattleText
waitbutton
closetext
end
TrainerPokefanfBeverly1:
- trainer EVENT_BEAT_POKEFANF_BEVERLY, POKEFANF, BEVERLY1, PokefanfBeverly1SeenText, PokefanfBeverly1BeatenText, 0, PokefanfBeverly1Script
+ trainer EVENT_BEAT_POKEFANF_BEVERLY, POKEFANF, BEVERLY1, PokefanfBeverly1SeenText, PokefanfBeverly1BeatenText, 0, .Script
-PokefanfBeverly1Script:
+.Script:
writecode VAR_CALLERID, PHONE_POKEFAN_BEVERLY
end_if_just_battled
opentext
@@ -279,12 +279,12 @@ UnknownScript_0x5c1ab:
end
TrainerLassKrise:
- trainer EVENT_BEAT_LASS_KRISE, LASS, KRISE, LassKriseSeenText, LassKriseBeatenText, 0, LassKriseScript
+ trainer EVENT_BEAT_LASS_KRISE, LASS, KRISE, LassKriseSeenText, LassKriseBeatenText, 0, .Script
-LassKriseScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5c71d
+ writetext LassKriseAfterBattleText
waitbutton
closetext
end
@@ -308,7 +308,7 @@ NationalParkHiddenFullHeal:
dwb EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL, FULL_HEAL
-UnknownText_0x5c1d3:
+NationalParkLassText:
text "Look! Check out my"
line "bag!"
@@ -319,7 +319,7 @@ UnknownText_0x5c1d3:
line "them on my bag."
done
-UnknownText_0x5c22e:
+NationalParkPokefanFText:
text "This is MAIL I got"
line "from my daughter."
cont "It cheers me up."
@@ -354,19 +354,19 @@ UnknownText_0x5c30d:
cont "during battle."
done
-UnknownText_0x5c35d:
+NationalParkYoungster1Text:
text "I'm playing with"
line "stickers I printed"
cont "from my #DEX."
done
-UnknownText_0x5c38f:
+NationalParkYoungster2Text:
text "I get the other"
line "guy's #DEX"
cont "sticker if I win."
done
-UnknownText_0x5c3bc:
+NationalParkTeacherText:
text "I take walks in"
line "the PARK, but I"
@@ -454,7 +454,7 @@ PokefanmWilliamBeatenText:
text "M-my #MON!"
done
-UnknownText_0x5c645:
+PokefanmWilliamAfterBattleText:
text "I lost the battle,"
line "but my #MON win"
@@ -484,7 +484,7 @@ LassKriseBeatenText:
text "…Hmmm…"
done
-UnknownText_0x5c71d:
+LassKriseAfterBattleText:
text "I thought you were"
line "staring at me"
cont "because I'm cute!"
@@ -525,29 +525,29 @@ NationalPark_MapEventHeader:
warp_def $2f, $a, 1, ROUTE_35_NATIONAL_PARK_GATE
warp_def $2f, $b, 2, ROUTE_35_NATIONAL_PARK_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 4
- signpost 44, 14, SIGNPOST_READ, MapNationalParkSignpost0Script
- signpost 31, 27, SIGNPOST_READ, MapNationalParkSignpost1Script
- signpost 47, 6, SIGNPOST_ITEM, NationalParkHiddenFullHeal
- signpost 4, 12, SIGNPOST_READ, MapNationalParkSignpost3Script
+ bg_event 44, 14, BGEVENT_READ, MapNationalParkSignpost0Script
+ bg_event 31, 27, BGEVENT_READ, MapNationalParkSignpost1Script
+ bg_event 47, 6, BGEVENT_ITEM, NationalParkHiddenFullHeal
+ bg_event 4, 12, BGEVENT_READ, MapNationalParkSignpost3Script
-.PersonEvents:
+.ObjectEvents:
db 14
- person_event SPRITE_LASS, 24, 15, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LassScript_0x5c002, -1
- person_event SPRITE_POKEFAN_F, 4, 14, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x5c005, -1
- person_event SPRITE_TEACHER, 40, 27, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TeacherScript_0x5c008, -1
- person_event SPRITE_YOUNGSTER, 41, 11, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x5c023, -1
- person_event SPRITE_YOUNGSTER, 41, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x5c026, -1
- person_event SPRITE_TEACHER, 41, 17, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TeacherScript_0x5c029, -1
- person_event SPRITE_GROWLITHE, 40, 26, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NationalParkPersian, -1
- person_event SPRITE_YOUNGSTER, 23, 27, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerSchoolboyJack1, -1
- person_event SPRITE_POKEFAN_F, 29, 18, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 2, TrainerPokefanfBeverly1, -1
- person_event SPRITE_POKEFAN_M, 9, 16, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 2, TrainerPokefanmWilliam, -1
- person_event SPRITE_LASS, 14, 8, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerLassKrise, -1
- person_event SPRITE_POKE_BALL, 12, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, NationalParkParlyzHeal, EVENT_NATIONAL_PARK_PARLYZ_HEAL
- person_event SPRITE_GAMEBOY_KID, 6, 26, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GameboyKidScript_0x5c037, -1
- person_event SPRITE_POKE_BALL, 43, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, NationalParkTMDig, EVENT_NATIONAL_PARK_TM_DIG
+ object_event SPRITE_LASS, 24, 15, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, NationalParkLassScript, -1
+ object_event SPRITE_POKEFAN_F, 4, 14, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkPokefanFScript, -1
+ object_event SPRITE_TEACHER, 40, 27, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x5c008, -1
+ object_event SPRITE_YOUNGSTER, 41, 11, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkYoungster1Script, -1
+ object_event SPRITE_YOUNGSTER, 41, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, NationalParkYoungster2Script, -1
+ object_event SPRITE_TEACHER, 41, 17, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkTeacherScript, -1
+ object_event SPRITE_GROWLITHE, 40, 26, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkPersian, -1
+ object_event SPRITE_YOUNGSTER, 23, 27, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSchoolboyJack1, -1
+ object_event SPRITE_POKEFAN_F, 29, 18, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerPokefanfBeverly1, -1
+ object_event SPRITE_POKEFAN_M, 9, 16, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerPokefanmWilliam, -1
+ object_event SPRITE_LASS, 14, 8, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerLassKrise, -1
+ object_event SPRITE_POKE_BALL, 12, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, NationalParkParlyzHeal, EVENT_NATIONAL_PARK_PARLYZ_HEAL
+ object_event SPRITE_GAMEBOY_KID, 6, 26, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GameboyKidScript_0x5c037, -1
+ object_event SPRITE_POKE_BALL, 43, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, NationalParkTMDig, EVENT_NATIONAL_PARK_TM_DIG
diff --git a/maps/NationalParkBugContest.asm b/maps/NationalParkBugContest.asm
index eccc3295c..9cebf82fd 100644
--- a/maps/NationalParkBugContest.asm
+++ b/maps/NationalParkBugContest.asm
@@ -13,7 +13,7 @@ const_value set 2
const NATIONALPARKBUGCONTEST_POKE_BALL2
NationalParkBugContest_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -232,27 +232,27 @@ NationalParkBugContest_MapEventHeader:
warp_def $2f, $a, 1, ROUTE_35_NATIONAL_PARK_GATE
warp_def $2f, $b, 1, ROUTE_35_NATIONAL_PARK_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 4
- signpost 44, 14, SIGNPOST_READ, MapNationalParkBugContestSignpost0Script
- signpost 31, 27, SIGNPOST_READ, MapNationalParkBugContestSignpost1Script
- signpost 47, 6, SIGNPOST_ITEM, NationalParkBugContestHiddenFullHeal
- signpost 4, 12, SIGNPOST_READ, MapNationalParkBugContestSignpost3Script
+ bg_event 44, 14, BGEVENT_READ, MapNationalParkBugContestSignpost0Script
+ bg_event 31, 27, BGEVENT_READ, MapNationalParkBugContestSignpost1Script
+ bg_event 47, 6, BGEVENT_ITEM, NationalParkBugContestHiddenFullHeal
+ bg_event 4, 12, BGEVENT_READ, MapNationalParkBugContestSignpost3Script
-.PersonEvents:
+.ObjectEvents:
db 12
- person_event SPRITE_YOUNGSTER, 29, 19, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x5c8ec, EVENT_BUG_CATCHING_CONTESTANT_1A
- person_event SPRITE_YOUNGSTER, 22, 28, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x5c8f4, EVENT_BUG_CATCHING_CONTESTANT_2A
- person_event SPRITE_ROCKER, 18, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, RockerScript_0x5c8fc, EVENT_BUG_CATCHING_CONTESTANT_3A
- person_event SPRITE_POKEFAN_M, 13, 7, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x5c904, EVENT_BUG_CATCHING_CONTESTANT_4A
- person_event SPRITE_YOUNGSTER, 9, 23, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x5c90c, EVENT_BUG_CATCHING_CONTESTANT_5A
- person_event SPRITE_YOUNGSTER, 13, 27, SPRITEMOVEDATA_WANDER, 3, 3, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x5c914, EVENT_BUG_CATCHING_CONTESTANT_6A
- person_event SPRITE_LASS, 23, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, LassScript_0x5c91c, EVENT_BUG_CATCHING_CONTESTANT_7A
- person_event SPRITE_YOUNGSTER, 27, 11, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x5c924, EVENT_BUG_CATCHING_CONTESTANT_8A
- person_event SPRITE_YOUNGSTER, 8, 16, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x5c92c, EVENT_BUG_CATCHING_CONTESTANT_9A
- person_event SPRITE_YOUNGSTER, 34, 17, SPRITEMOVEDATA_WANDER, 3, 3, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x5c934, EVENT_BUG_CATCHING_CONTESTANT_10A
- person_event SPRITE_POKE_BALL, 12, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, NationalParkBugContestParlyzHeal, EVENT_NATIONAL_PARK_PARLYZ_HEAL
- person_event SPRITE_POKE_BALL, 43, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, NationalParkBugContestTMDig, EVENT_NATIONAL_PARK_TM_DIG
+ object_event SPRITE_YOUNGSTER, 29, 19, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x5c8ec, EVENT_BUG_CATCHING_CONTESTANT_1A
+ object_event SPRITE_YOUNGSTER, 22, 28, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x5c8f4, EVENT_BUG_CATCHING_CONTESTANT_2A
+ object_event SPRITE_ROCKER, 18, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RockerScript_0x5c8fc, EVENT_BUG_CATCHING_CONTESTANT_3A
+ object_event SPRITE_POKEFAN_M, 13, 7, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, PokefanMScript_0x5c904, EVENT_BUG_CATCHING_CONTESTANT_4A
+ object_event SPRITE_YOUNGSTER, 9, 23, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x5c90c, EVENT_BUG_CATCHING_CONTESTANT_5A
+ object_event SPRITE_YOUNGSTER, 13, 27, SPRITEMOVEDATA_WANDER, 3, 3, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x5c914, EVENT_BUG_CATCHING_CONTESTANT_6A
+ object_event SPRITE_LASS, 23, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, LassScript_0x5c91c, EVENT_BUG_CATCHING_CONTESTANT_7A
+ object_event SPRITE_YOUNGSTER, 27, 11, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x5c924, EVENT_BUG_CATCHING_CONTESTANT_8A
+ object_event SPRITE_YOUNGSTER, 8, 16, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x5c92c, EVENT_BUG_CATCHING_CONTESTANT_9A
+ object_event SPRITE_YOUNGSTER, 34, 17, SPRITEMOVEDATA_WANDER, 3, 3, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x5c934, EVENT_BUG_CATCHING_CONTESTANT_10A
+ object_event SPRITE_POKE_BALL, 12, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, NationalParkBugContestParlyzHeal, EVENT_NATIONAL_PARK_PARLYZ_HEAL
+ object_event SPRITE_POKE_BALL, 43, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, NationalParkBugContestTMDig, EVENT_NATIONAL_PARK_TM_DIG
diff --git a/maps/NewBarkTown.asm b/maps/NewBarkTown.asm
index d382a4cf1..3ad5cd2bf 100644
--- a/maps/NewBarkTown.asm
+++ b/maps/NewBarkTown.asm
@@ -4,23 +4,19 @@ const_value set 2
const NEWBARKTOWN_SILVER
NewBarkTown_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
+.DummyScene1:
end
.FlyPoint:
@@ -28,7 +24,7 @@ NewBarkTown_MapScriptHeader:
clearevent EVENT_FIRST_TIME_BANKING_WITH_MOM
return
-NewBarkTown_TeacherStopsYouTrigger1:
+NewBarkTown_TeacherStopsYouScene1:
playmusic MUSIC_MOM
spriteface NEWBARKTOWN_TEACHER, LEFT
opentext
@@ -51,7 +47,7 @@ NewBarkTown_TeacherStopsYouTrigger1:
special RestartMapMusic
end
-NewBarkTown_TeacherStopsYouTrigger2:
+NewBarkTown_TeacherStopsYouScene2:
playmusic MUSIC_MOM
spriteface NEWBARKTOWN_TEACHER, LEFT
opentext
@@ -296,20 +292,20 @@ NewBarkTown_MapEventHeader:
warp_def $b, $3, 1, KRISS_NEIGHBORS_HOUSE
warp_def $d, $b, 1, ELMS_HOUSE
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 0, $8, $1, $0, NewBarkTown_TeacherStopsYouTrigger1, $0, $0
- xy_trigger 0, $9, $1, $0, NewBarkTown_TeacherStopsYouTrigger2, $0, $0
+ coord_event 0, $8, $1, NewBarkTown_TeacherStopsYouScene1
+ coord_event 0, $9, $1, NewBarkTown_TeacherStopsYouScene2
-.Signposts:
+.BGEvents:
db 4
- signpost 8, 8, SIGNPOST_READ, NewBarkTownSign
- signpost 5, 11, SIGNPOST_READ, MapNewBarkTownSignpost1Script
- signpost 3, 3, SIGNPOST_READ, MapNewBarkTownSignpost2Script
- signpost 13, 9, SIGNPOST_READ, MapNewBarkTownSignpost3Script
+ bg_event 8, 8, BGEVENT_READ, NewBarkTownSign
+ bg_event 5, 11, BGEVENT_READ, MapNewBarkTownSignpost1Script
+ bg_event 3, 3, BGEVENT_READ, MapNewBarkTownSignpost2Script
+ bg_event 13, 9, BGEVENT_READ, MapNewBarkTownSignpost3Script
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_TEACHER, 8, 6, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NewBarkTownTeacherScript, -1
- person_event SPRITE_FISHER, 9, 12, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, NewBarkTownFisherScript, -1
- person_event SPRITE_SILVER, 2, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NewBarkTownSilverScript, EVENT_RIVAL_NEW_BARK_TOWN
+ object_event SPRITE_TEACHER, 8, 6, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NewBarkTownTeacherScript, -1
+ object_event SPRITE_FISHER, 9, 12, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, NewBarkTownFisherScript, -1
+ object_event SPRITE_SILVER, 2, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NewBarkTownSilverScript, EVENT_RIVAL_NEW_BARK_TOWN
diff --git a/maps/OaksLab.asm b/maps/OaksLab.asm
index 9162692a6..d2b67c0a0 100644
--- a/maps/OaksLab.asm
+++ b/maps/OaksLab.asm
@@ -5,13 +5,13 @@ const_value set 2
const OAKSLAB_SCIENTIST3
OaksLab_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-.DummyTrigger:
+.DummyScene:
end
Oak:
@@ -265,31 +265,31 @@ OaksLab_MapEventHeader:
warp_def $b, $4, 3, PALLET_TOWN
warp_def $b, $5, 3, PALLET_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 16
- signpost 1, 6, SIGNPOST_READ, OaksLabBookshelf
- signpost 1, 7, SIGNPOST_READ, OaksLabBookshelf
- signpost 1, 8, SIGNPOST_READ, OaksLabBookshelf
- signpost 1, 9, SIGNPOST_READ, OaksLabBookshelf
- signpost 7, 0, SIGNPOST_READ, OaksLabBookshelf
- signpost 7, 1, SIGNPOST_READ, OaksLabBookshelf
- signpost 7, 2, SIGNPOST_READ, OaksLabBookshelf
- signpost 7, 3, SIGNPOST_READ, OaksLabBookshelf
- signpost 7, 6, SIGNPOST_READ, OaksLabBookshelf
- signpost 7, 7, SIGNPOST_READ, OaksLabBookshelf
- signpost 7, 8, SIGNPOST_READ, OaksLabBookshelf
- signpost 7, 9, SIGNPOST_READ, OaksLabBookshelf
- signpost 0, 4, SIGNPOST_READ, OaksLabPoster1
- signpost 0, 5, SIGNPOST_READ, OaksLabPoster2
- signpost 3, 9, SIGNPOST_READ, OaksLabTrashcan
- signpost 1, 0, SIGNPOST_READ, OaksLabPC
-
-.PersonEvents:
+ bg_event 1, 6, BGEVENT_READ, OaksLabBookshelf
+ bg_event 1, 7, BGEVENT_READ, OaksLabBookshelf
+ bg_event 1, 8, BGEVENT_READ, OaksLabBookshelf
+ bg_event 1, 9, BGEVENT_READ, OaksLabBookshelf
+ bg_event 7, 0, BGEVENT_READ, OaksLabBookshelf
+ bg_event 7, 1, BGEVENT_READ, OaksLabBookshelf
+ bg_event 7, 2, BGEVENT_READ, OaksLabBookshelf
+ bg_event 7, 3, BGEVENT_READ, OaksLabBookshelf
+ bg_event 7, 6, BGEVENT_READ, OaksLabBookshelf
+ bg_event 7, 7, BGEVENT_READ, OaksLabBookshelf
+ bg_event 7, 8, BGEVENT_READ, OaksLabBookshelf
+ bg_event 7, 9, BGEVENT_READ, OaksLabBookshelf
+ bg_event 0, 4, BGEVENT_READ, OaksLabPoster1
+ bg_event 0, 5, BGEVENT_READ, OaksLabPoster2
+ bg_event 3, 9, BGEVENT_READ, OaksLabTrashcan
+ bg_event 1, 0, BGEVENT_READ, OaksLabPC
+
+.ObjectEvents:
db 4
- person_event SPRITE_OAK, 2, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Oak, -1
- person_event SPRITE_SCIENTIST, 8, 1, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OaksAssistant1Script, -1
- person_event SPRITE_SCIENTIST, 9, 8, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OaksAssistant2Script, -1
- person_event SPRITE_SCIENTIST, 4, 1, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OaksAssistant3Script, -1
+ object_event SPRITE_OAK, 2, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Oak, -1
+ object_event SPRITE_SCIENTIST, 8, 1, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OaksAssistant1Script, -1
+ object_event SPRITE_SCIENTIST, 9, 8, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OaksAssistant2Script, -1
+ object_event SPRITE_SCIENTIST, 4, 1, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OaksAssistant3Script, -1
diff --git a/maps/OlivineCafe.asm b/maps/OlivineCafe.asm
index 9cf4e67f6..fef87b535 100644
--- a/maps/OlivineCafe.asm
+++ b/maps/OlivineCafe.asm
@@ -4,7 +4,7 @@ const_value set 2
const OLIVINECAFE_SAILOR2
OlivineCafe_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -25,11 +25,11 @@ UnknownScript_0x9c8d3:
closetext
end
-FishingGuruScript_0x9c8d9:
- jumptextfaceplayer UnknownText_0x9c9c5
+OlivineCafeFishingGuruScript:
+ jumptextfaceplayer OlivineCafeFishingGuruText
-SailorScript_0x9c8dc:
- jumptextfaceplayer UnknownText_0x9ca09
+OlivineCafeSailorScript:
+ jumptextfaceplayer OlivineCafeSailorText
UnknownText_0x9c8df:
text "Hah! Your #MON"
@@ -56,7 +56,7 @@ UnknownText_0x9c965:
line "buff bod!"
done
-UnknownText_0x9c9c5:
+OlivineCafeFishingGuruText:
text "OLIVINE CAFE's"
line "menu is chock full"
@@ -64,7 +64,7 @@ UnknownText_0x9c9c5:
line "beefy SAILORS!"
done
-UnknownText_0x9ca09:
+OlivineCafeSailorText:
text "Whenever I roll"
line "into this town, I"
@@ -87,14 +87,14 @@ OlivineCafe_MapEventHeader:
warp_def $7, $2, 7, OLIVINE_CITY
warp_def $7, $3, 7, OLIVINE_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_SAILOR, 3, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SailorScript_0x9c8c1, -1
- person_event SPRITE_FISHING_GURU, 3, 7, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FishingGuruScript_0x9c8d9, -1
- person_event SPRITE_SAILOR, 6, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SailorScript_0x9c8dc, -1
+ object_event SPRITE_SAILOR, 3, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SailorScript_0x9c8c1, -1
+ object_event SPRITE_FISHING_GURU, 3, 7, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineCafeFishingGuruScript, -1
+ object_event SPRITE_SAILOR, 6, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineCafeSailorScript, -1
diff --git a/maps/OlivineCity.asm b/maps/OlivineCity.asm
index 87b842a39..fbed4e323 100644
--- a/maps/OlivineCity.asm
+++ b/maps/OlivineCity.asm
@@ -5,23 +5,19 @@ const_value set 2
const OLIVINECITY_OLIVINE_RIVAL
OlivineCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
+.DummyScene1:
end
.FlyPoint:
@@ -45,7 +41,7 @@ UnknownScript_0x1a8833:
applymovement PLAYER, MovementData_0x1a88f4
spriteface PLAYER, RIGHT
applymovement OLIVINECITY_OLIVINE_RIVAL, MovementData_0x1a88db
- dotrigger $1
+ setscene $1
disappear OLIVINECITY_OLIVINE_RIVAL
special RestartMapMusic
variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY
@@ -70,14 +66,14 @@ UnknownScript_0x1a886b:
spriteface PLAYER, RIGHT
applymovement OLIVINECITY_OLIVINE_RIVAL, MovementData_0x1a88e8
disappear OLIVINECITY_OLIVINE_RIVAL
- dotrigger $1
+ setscene $1
special RestartMapMusic
variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY
special MapCallbackSprites_LoadUsedSpritesGFX
end
-SailorScript_0x1a88a3:
- jumptextfaceplayer UnknownText_0x1a8a58
+OlivineCitySailor1Script:
+ jumptextfaceplayer OlivineCitySailor1Text
StandingYoungsterScript_0x1a88a6:
faceplayer
@@ -95,8 +91,8 @@ UnknownScript_0x1a88b4:
closetext
end
-SailorScript_0x1a88ba:
- jumptextfaceplayer UnknownText_0x1a8b71
+OlivineCitySailor2Script:
+ jumptextfaceplayer OlivineCitySailor2Text
OlivineCitySign:
jumptext OlivineCitySignText
@@ -113,7 +109,7 @@ OlivineLighthouseSign:
OlivineCityBattleTowerSign:
jumptext OlivineCityBattleTowerSignText
-OlivineCityPokeCenterSign:
+OlivineCityPokecenterSign:
jumpstd pokecentersign
OlivineCityMartSign:
@@ -211,7 +207,7 @@ UnknownText_0x1a88fa:
cont "less weak!"
done
-UnknownText_0x1a8a58:
+OlivineCitySailor1Text:
text "Dark roads are"
line "dangerous at"
cont "night."
@@ -244,7 +240,7 @@ UnknownText_0x1a8b41:
line "awesome."
done
-UnknownText_0x1a8b71:
+OlivineCitySailor2Text:
text "The sea is sweet!"
para "Sunsets on the sea"
@@ -309,24 +305,24 @@ OlivineCity_MapEventHeader:
warp_def $1b, $13, 1, OLIVINE_PORT_PASSAGE
warp_def $1b, $14, 2, OLIVINE_PORT_PASSAGE
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 0, $c, $d, $0, UnknownScript_0x1a8833, $0, $0
- xy_trigger 0, $d, $d, $0, UnknownScript_0x1a886b, $0, $0
+ coord_event 0, $c, $d, UnknownScript_0x1a8833
+ coord_event 0, $d, $d, UnknownScript_0x1a886b
-.Signposts:
+.BGEvents:
db 7
- signpost 11, 17, SIGNPOST_READ, OlivineCitySign
- signpost 24, 20, SIGNPOST_READ, OlivineCityPortSign
- signpost 11, 7, SIGNPOST_READ, OlivineGymSign
- signpost 28, 30, SIGNPOST_READ, OlivineLighthouseSign
- signpost 23, 3, SIGNPOST_READ, OlivineCityBattleTowerSign
- signpost 21, 14, SIGNPOST_READ, OlivineCityPokeCenterSign
- signpost 17, 20, SIGNPOST_READ, OlivineCityMartSign
-
-.PersonEvents:
+ bg_event 11, 17, BGEVENT_READ, OlivineCitySign
+ bg_event 24, 20, BGEVENT_READ, OlivineCityPortSign
+ bg_event 11, 7, BGEVENT_READ, OlivineGymSign
+ bg_event 28, 30, BGEVENT_READ, OlivineLighthouseSign
+ bg_event 23, 3, BGEVENT_READ, OlivineCityBattleTowerSign
+ bg_event 21, 14, BGEVENT_READ, OlivineCityPokecenterSign
+ bg_event 17, 20, BGEVENT_READ, OlivineCityMartSign
+
+.ObjectEvents:
db 4
- person_event SPRITE_SAILOR, 27, 26, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SailorScript_0x1a88a3, -1
- person_event SPRITE_STANDING_YOUNGSTER, 13, 20, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, StandingYoungsterScript_0x1a88a6, -1
- person_event SPRITE_SAILOR, 21, 17, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SailorScript_0x1a88ba, -1
- person_event SPRITE_OLIVINE_RIVAL, 11, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_OLIVINE_CITY
+ object_event SPRITE_SAILOR, 27, 26, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineCitySailor1Script, -1
+ object_event SPRITE_STANDING_YOUNGSTER, 13, 20, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, StandingYoungsterScript_0x1a88a6, -1
+ object_event SPRITE_SAILOR, 21, 17, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineCitySailor2Script, -1
+ object_event SPRITE_OLIVINE_RIVAL, 11, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_OLIVINE_CITY
diff --git a/maps/OlivineGoodRodHouse.asm b/maps/OlivineGoodRodHouse.asm
index 59b20b95e..8fe953932 100644
--- a/maps/OlivineGoodRodHouse.asm
+++ b/maps/OlivineGoodRodHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const OLIVINEGOODRODHOUSE_FISHING_GURU
OlivineGoodRodHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -91,12 +91,12 @@ OlivineGoodRodHouse_MapEventHeader:
warp_def $7, $2, 6, OLIVINE_CITY
warp_def $7, $3, 6, OLIVINE_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_FISHING_GURU, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, GoodRodGuru, -1
+ object_event SPRITE_FISHING_GURU, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoodRodGuru, -1
diff --git a/maps/OlivineGym.asm b/maps/OlivineGym.asm
index a429b0fdc..128cbca70 100644
--- a/maps/OlivineGym.asm
+++ b/maps/OlivineGym.asm
@@ -3,7 +3,7 @@ const_value set 2
const OLIVINEGYM_GYM_GUY
OlivineGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -28,7 +28,7 @@ JasmineScript_0x9c12f:
waitsfx
setflag ENGINE_MINERALBADGE
checkcode VAR_BADGES
- scall OlivineGymTriggerRockets
+ scall OlivineGymActivateRockets
.FightDone:
checkevent EVENT_GOT_TM23_IRON_TAIL
iftrue .GotIronTail
@@ -49,7 +49,7 @@ JasmineScript_0x9c12f:
closetext
end
-OlivineGymTriggerRockets:
+OlivineGymActivateRockets:
if_equal 7, .RadioTowerRockets
if_equal 6, .GoldenrodRockets
end
@@ -206,15 +206,15 @@ OlivineGym_MapEventHeader:
warp_def $f, $4, 2, OLIVINE_CITY
warp_def $f, $5, 2, OLIVINE_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 13, 3, SIGNPOST_READ, OlivineGymStatue
- signpost 13, 6, SIGNPOST_READ, OlivineGymStatue
+ bg_event 13, 3, BGEVENT_READ, OlivineGymStatue
+ bg_event 13, 6, BGEVENT_READ, OlivineGymStatue
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_JASMINE, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, JasmineScript_0x9c12f, EVENT_OLIVINE_GYM_JASMINE
- person_event SPRITE_GYM_GUY, 13, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, OlivineGymGuyScript, -1
+ object_event SPRITE_JASMINE, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, JasmineScript_0x9c12f, EVENT_OLIVINE_GYM_JASMINE
+ object_event SPRITE_GYM_GUY, 13, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, OlivineGymGuyScript, -1
diff --git a/maps/OlivineHouseBeta.asm b/maps/OlivineHouseBeta.asm
index 06cffbe27..23b568cf0 100644
--- a/maps/OlivineHouseBeta.asm
+++ b/maps/OlivineHouseBeta.asm
@@ -3,14 +3,14 @@ const_value set 2
const OLIVINEHOUSEBETA_RHYDON
OlivineHouseBeta_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-TeacherScript_0x9c58f:
- jumptextfaceplayer UnknownText_0x9c5a2
+OlivineHouseBetaTeacherScript:
+ jumptextfaceplayer OlivineHouseBetaTeacherText
RhydonScript_0x9c592:
opentext
@@ -26,7 +26,7 @@ OlivineHouseBetaBookshelf1:
OlivineHouseBetaBookshelf2:
jumpstd magazinebookshelf
-UnknownText_0x9c5a2:
+OlivineHouseBetaTeacherText:
text "When my #MON"
line "got sick, the"
@@ -48,15 +48,15 @@ OlivineHouseBeta_MapEventHeader:
warp_def $7, $2, 4, OLIVINE_CITY
warp_def $7, $3, 4, OLIVINE_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, OlivineHouseBetaBookshelf1
- signpost 1, 1, SIGNPOST_READ, OlivineHouseBetaBookshelf2
+ bg_event 1, 0, BGEVENT_READ, OlivineHouseBetaBookshelf1
+ bg_event 1, 1, BGEVENT_READ, OlivineHouseBetaBookshelf2
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_TEACHER, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TeacherScript_0x9c58f, -1
- person_event SPRITE_RHYDON, 4, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RhydonScript_0x9c592, -1
+ object_event SPRITE_TEACHER, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineHouseBetaTeacherScript, -1
+ object_event SPRITE_RHYDON, 4, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RhydonScript_0x9c592, -1
diff --git a/maps/OlivineLighthouse1F.asm b/maps/OlivineLighthouse1F.asm
index 422e86ad2..4c5ead8cc 100644
--- a/maps/OlivineLighthouse1F.asm
+++ b/maps/OlivineLighthouse1F.asm
@@ -3,19 +3,19 @@ const_value set 2
const OLIVINELIGHTHOUSE1F_POKEFAN_F
OlivineLighthouse1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-SailorScript_0x5ae67:
- jumptextfaceplayer UnknownText_0x5ae6d
+OlivineLighthouse1FSailorScript:
+ jumptextfaceplayer OlivineLighthouse1FSailorText
-PokefanFScript_0x5ae6a:
- jumptextfaceplayer UnknownText_0x5aec2
+OlivineLighthouse1FPokefanFScript:
+ jumptextfaceplayer OlivineLighthouse1FPokefanFText
-UnknownText_0x5ae6d:
+OlivineLighthouse1FSailorText:
text "People train at"
line "this LIGHTHOUSE."
@@ -24,7 +24,7 @@ UnknownText_0x5ae6d:
cont "all the trainers."
done
-UnknownText_0x5aec2:
+OlivineLighthouse1FPokefanFText:
text "In the past, #-"
line "MON used to light"
@@ -48,13 +48,13 @@ OlivineLighthouse1F_MapEventHeader:
warp_def $d, $10, 3, OLIVINE_LIGHTHOUSE_2F
warp_def $d, $11, 4, OLIVINE_LIGHTHOUSE_2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_SAILOR, 2, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SailorScript_0x5ae67, -1
- person_event SPRITE_POKEFAN_F, 9, 16, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x5ae6a, -1
+ object_event SPRITE_SAILOR, 2, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineLighthouse1FSailorScript, -1
+ object_event SPRITE_POKEFAN_F, 9, 16, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineLighthouse1FPokefanFScript, -1
diff --git a/maps/OlivineLighthouse2F.asm b/maps/OlivineLighthouse2F.asm
index 9afec908a..be2632285 100644
--- a/maps/OlivineLighthouse2F.asm
+++ b/maps/OlivineLighthouse2F.asm
@@ -3,27 +3,27 @@ const_value set 2
const OLIVINELIGHTHOUSE2F_GENTLEMAN
OlivineLighthouse2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerGentlemanAlfred:
- trainer EVENT_BEAT_GENTLEMAN_ALFRED, GENTLEMAN, ALFRED, GentlemanAlfredSeenText, GentlemanAlfredBeatenText, 0, GentlemanAlfredScript
+ trainer EVENT_BEAT_GENTLEMAN_ALFRED, GENTLEMAN, ALFRED, GentlemanAlfredSeenText, GentlemanAlfredBeatenText, 0, .Script
-GentlemanAlfredScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5b13e
+ writetext GentlemanAlfredAfterBattleText
waitbutton
closetext
end
TrainerSailorHuey1:
- trainer EVENT_BEAT_SAILOR_HUEY, SAILOR, HUEY1, SailorHuey1SeenText, SailorHuey1BeatenText, 0, SailorHuey1Script
+ trainer EVENT_BEAT_SAILOR_HUEY, SAILOR, HUEY1, SailorHuey1SeenText, SailorHuey1BeatenText, 0, .Script
-SailorHuey1Script:
+.Script:
writecode VAR_CALLERID, PHONE_SAILOR_HUEY
end_if_just_battled
opentext
@@ -183,7 +183,7 @@ GentlemanAlfredBeatenText:
line "you're serious."
done
-UnknownText_0x5b13e:
+GentlemanAlfredAfterBattleText:
text "Up top is a #-"
line "MON that keeps the"
cont "LIGHTHOUSE lit."
@@ -217,13 +217,13 @@ OlivineLighthouse2F_MapEventHeader:
warp_def $b, $10, 4, OLIVINE_LIGHTHOUSE_3F
warp_def $b, $11, 5, OLIVINE_LIGHTHOUSE_3F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_SAILOR, 3, 9, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerSailorHuey1, -1
- person_event SPRITE_GENTLEMAN, 8, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerGentlemanAlfred, -1
+ object_event SPRITE_SAILOR, 3, 9, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSailorHuey1, -1
+ object_event SPRITE_GENTLEMAN, 8, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerGentlemanAlfred, -1
diff --git a/maps/OlivineLighthouse3F.asm b/maps/OlivineLighthouse3F.asm
index ea1c26ac3..847de0e44 100644
--- a/maps/OlivineLighthouse3F.asm
+++ b/maps/OlivineLighthouse3F.asm
@@ -5,41 +5,41 @@ const_value set 2
const OLIVINELIGHTHOUSE3F_POKE_BALL
OlivineLighthouse3F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerBird_keeperTheo:
- trainer EVENT_BEAT_BIRD_KEEPER_THEO, BIRD_KEEPER, THEO, Bird_keeperTheoSeenText, Bird_keeperTheoBeatenText, 0, Bird_keeperTheoScript
+ trainer EVENT_BEAT_BIRD_KEEPER_THEO, BIRD_KEEPER, THEO, Bird_keeperTheoSeenText, Bird_keeperTheoBeatenText, 0, .Script
-Bird_keeperTheoScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5b2df
+ writetext Bird_keeperTheoAfterBattleText
waitbutton
closetext
end
TrainerGentlemanPreston:
- trainer EVENT_BEAT_GENTLEMAN_PRESTON, GENTLEMAN, PRESTON, GentlemanPrestonSeenText, GentlemanPrestonBeatenText, 0, GentlemanPrestonScript
+ trainer EVENT_BEAT_GENTLEMAN_PRESTON, GENTLEMAN, PRESTON, GentlemanPrestonSeenText, GentlemanPrestonBeatenText, 0, .Script
-GentlemanPrestonScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5b457
+ writetext GentlemanPrestonAfterBattleText
waitbutton
closetext
end
TrainerSailorTerrell:
- trainer EVENT_BEAT_SAILOR_TERRELL, SAILOR, TERRELL, SailorTerrellSeenText, SailorTerrellBeatenText, 0, SailorTerrellScript
+ trainer EVENT_BEAT_SAILOR_TERRELL, SAILOR, TERRELL, SailorTerrellSeenText, SailorTerrellBeatenText, 0, .Script
-SailorTerrellScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5b384
+ writetext SailorTerrellAfterBattleText
waitbutton
closetext
end
@@ -60,7 +60,7 @@ Bird_keeperTheoBeatenText:
line "concerned…"
done
-UnknownText_0x5b2df:
+Bird_keeperTheoAfterBattleText:
text "How the heck do"
line "you go up?"
@@ -82,7 +82,7 @@ SailorTerrellBeatenText:
line "and strong…"
done
-UnknownText_0x5b384:
+SailorTerrellAfterBattleText:
text "Every time I come"
line "back to OLIVINE, I"
cont "visit the GYM."
@@ -106,7 +106,7 @@ GentlemanPrestonBeatenText:
line "train some more…"
done
-UnknownText_0x5b457:
+GentlemanPrestonAfterBattleText:
text "JASMINE used to"
line "use rock #MON"
cont "like ONIX."
@@ -128,15 +128,15 @@ OlivineLighthouse3F_MapEventHeader:
warp_def $3, $8, 7, OLIVINE_LIGHTHOUSE_4F
warp_def $3, $9, 8, OLIVINE_LIGHTHOUSE_4F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_SAILOR, 2, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerSailorTerrell, -1
- person_event SPRITE_GENTLEMAN, 5, 13, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 4, TrainerGentlemanPreston, -1
- person_event SPRITE_YOUNGSTER, 9, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerBird_keeperTheo, -1
- person_event SPRITE_POKE_BALL, 2, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, OlivineLighthouse3FEther, EVENT_OLIVINE_LIGHTHOUSE_3F_ETHER
+ object_event SPRITE_SAILOR, 2, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerSailorTerrell, -1
+ object_event SPRITE_GENTLEMAN, 5, 13, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerGentlemanPreston, -1
+ object_event SPRITE_YOUNGSTER, 9, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBird_keeperTheo, -1
+ object_event SPRITE_POKE_BALL, 2, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, OlivineLighthouse3FEther, EVENT_OLIVINE_LIGHTHOUSE_3F_ETHER
diff --git a/maps/OlivineLighthouse4F.asm b/maps/OlivineLighthouse4F.asm
index ae5571dec..321c7a96f 100644
--- a/maps/OlivineLighthouse4F.asm
+++ b/maps/OlivineLighthouse4F.asm
@@ -3,30 +3,30 @@ const_value set 2
const OLIVINELIGHTHOUSE4F_LASS
OlivineLighthouse4F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerLassConnie:
- trainer EVENT_BEAT_LASS_CONNIE, LASS, CONNIE1, LassConnie1SeenText, LassConnie1BeatenText, 0, LassConnie1Script
+ trainer EVENT_BEAT_LASS_CONNIE, LASS, CONNIE1, LassConnie1SeenText, LassConnie1BeatenText, 0, .Script
-LassConnie1Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5b63c
+ writetext LassConnie1AfterBattleText
waitbutton
closetext
end
TrainerSailorKent:
- trainer EVENT_BEAT_SAILOR_KENT, SAILOR, KENT, SailorKentSeenText, SailorKentBeatenText, 0, SailorKentScript
+ trainer EVENT_BEAT_SAILOR_KENT, SAILOR, KENT, SailorKentSeenText, SailorKentBeatenText, 0, .Script
-SailorKentScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5b584
+ writetext SailorKentAfterBattleText
waitbutton
closetext
end
@@ -45,7 +45,7 @@ SailorKentBeatenText:
line "smile either…"
done
-UnknownText_0x5b584:
+SailorKentAfterBattleText:
text "Speaking of sick,"
line "I've heard there's"
@@ -68,7 +68,7 @@ LassConnie1BeatenText:
text "Aaack! My #MON!"
done
-UnknownText_0x5b63c:
+LassConnie1AfterBattleText:
text "Right. Anybody"
line "would be worried"
cont "if his or her own"
@@ -98,13 +98,13 @@ OlivineLighthouse4F_MapEventHeader:
warp_def $7, $10, 4, OLIVINE_LIGHTHOUSE_5F
warp_def $7, $11, 5, OLIVINE_LIGHTHOUSE_5F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_SAILOR, 14, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerSailorKent, -1
- person_event SPRITE_LASS, 2, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerLassConnie, -1
+ object_event SPRITE_SAILOR, 14, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSailorKent, -1
+ object_event SPRITE_LASS, 2, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerLassConnie, -1
diff --git a/maps/OlivineLighthouse5F.asm b/maps/OlivineLighthouse5F.asm
index 7b8b334c9..2c166bc69 100644
--- a/maps/OlivineLighthouse5F.asm
+++ b/maps/OlivineLighthouse5F.asm
@@ -6,30 +6,30 @@ const_value set 2
const OLIVINELIGHTHOUSE5F_POKE_BALL3
OlivineLighthouse5F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerBird_keeperDenis:
- trainer EVENT_BEAT_BIRD_KEEPER_DENIS, BIRD_KEEPER, DENIS, Bird_keeperDenisSeenText, Bird_keeperDenisBeatenText, 0, Bird_keeperDenisScript
+ trainer EVENT_BEAT_BIRD_KEEPER_DENIS, BIRD_KEEPER, DENIS, Bird_keeperDenisSeenText, Bird_keeperDenisBeatenText, 0, .Script
-Bird_keeperDenisScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x60ac3
+ writetext Bird_keeperDenisAfterBattleText
waitbutton
closetext
end
TrainerSailorErnest:
- trainer EVENT_BEAT_SAILOR_ERNEST, SAILOR, ERNEST, SailorErnestSeenText, SailorErnestBeatenText, 0, SailorErnestScript
+ trainer EVENT_BEAT_SAILOR_ERNEST, SAILOR, ERNEST, SailorErnestSeenText, SailorErnestBeatenText, 0, .Script
-SailorErnestScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x60a1f
+ writetext SailorErnestAfterBattleText
waitbutton
closetext
end
@@ -60,7 +60,7 @@ SailorErnestBeatenText:
line "overwhelming!"
done
-UnknownText_0x60a1f:
+SailorErnestAfterBattleText:
text "A GYM LEADER isn't"
line "just about being"
@@ -81,7 +81,7 @@ Bird_keeperDenisBeatenText:
text "Oops…They crashed…"
done
-UnknownText_0x60ac3:
+Bird_keeperDenisAfterBattleText:
text "My #MON learned"
line "how to use FLY in"
cont "CIANWOOD."
@@ -105,17 +105,17 @@ OlivineLighthouse5F_MapEventHeader:
warp_def $5, $10, 2, OLIVINE_LIGHTHOUSE_6F
warp_def $5, $11, 3, OLIVINE_LIGHTHOUSE_6F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 13, 3, SIGNPOST_ITEM, OlivineLighthouse5FHiddenHyperPotion
+ bg_event 13, 3, BGEVENT_ITEM, OlivineLighthouse5FHiddenHyperPotion
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_SAILOR, 11, 8, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerSailorErnest, -1
- person_event SPRITE_YOUNGSTER, 3, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 4, TrainerBird_keeperDenis, -1
- person_event SPRITE_POKE_BALL, 12, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, OlivineLighthouse5FRareCandy, EVENT_OLIVINE_LIGHTHOUSE_5F_RARE_CANDY
- person_event SPRITE_POKE_BALL, 15, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, OlivineLighthouse5FSuperRepel, EVENT_OLIVINE_LIGHTHOUSE_5F_SUPER_REPEL
- person_event SPRITE_POKE_BALL, 13, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, OlivineLighthouse5FTMSwagger, EVENT_OLIVINE_LIGHTHOUSE_5F_TM_SWAGGER
+ object_event SPRITE_SAILOR, 11, 8, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSailorErnest, -1
+ object_event SPRITE_YOUNGSTER, 3, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerBird_keeperDenis, -1
+ object_event SPRITE_POKE_BALL, 12, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, OlivineLighthouse5FRareCandy, EVENT_OLIVINE_LIGHTHOUSE_5F_RARE_CANDY
+ object_event SPRITE_POKE_BALL, 15, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, OlivineLighthouse5FSuperRepel, EVENT_OLIVINE_LIGHTHOUSE_5F_SUPER_REPEL
+ object_event SPRITE_POKE_BALL, 13, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, OlivineLighthouse5FTMSwagger, EVENT_OLIVINE_LIGHTHOUSE_5F_TM_SWAGGER
diff --git a/maps/OlivineLighthouse6F.asm b/maps/OlivineLighthouse6F.asm
index f99085ea2..713d08d43 100644
--- a/maps/OlivineLighthouse6F.asm
+++ b/maps/OlivineLighthouse6F.asm
@@ -4,7 +4,7 @@ const_value set 2
const OLIVINELIGHTHOUSE6F_POKE_BALL
OlivineLighthouse6F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -267,14 +267,14 @@ OlivineLighthouse6F_MapEventHeader:
warp_def $5, $10, 6, OLIVINE_LIGHTHOUSE_5F
warp_def $5, $11, 7, OLIVINE_LIGHTHOUSE_5F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_JASMINE, 8, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, JasmineScript_0x60b91, EVENT_OLIVINE_LIGHTHOUSE_JASMINE
- person_event SPRITE_MONSTER, 8, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, MonsterScript_0x60c3a, -1
- person_event SPRITE_POKE_BALL, 4, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, OlivineLighthouse6FSuperPotion, EVENT_OLIVINE_LIGHTHOUSE_6F_SUPER_POTION
+ object_event SPRITE_JASMINE, 8, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, JasmineScript_0x60b91, EVENT_OLIVINE_LIGHTHOUSE_JASMINE
+ object_event SPRITE_MONSTER, 8, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, MonsterScript_0x60c3a, -1
+ object_event SPRITE_POKE_BALL, 4, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, OlivineLighthouse6FSuperPotion, EVENT_OLIVINE_LIGHTHOUSE_6F_SUPER_POTION
diff --git a/maps/OlivineMart.asm b/maps/OlivineMart.asm
index 06c999876..db193c7e4 100644
--- a/maps/OlivineMart.asm
+++ b/maps/OlivineMart.asm
@@ -4,7 +4,7 @@ const_value set 2
const OLIVINEMART_LASS
OlivineMart_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -16,13 +16,13 @@ ClerkScript_0x9cac7:
closetext
end
-CooltrainerFScript_0x9cace:
- jumptextfaceplayer UnknownText_0x9cad4
+OlivineMartCooltrainerFScript:
+ jumptextfaceplayer OlivineMartCooltrainerFText
-LassScript_0x9cad1:
- jumptextfaceplayer UnknownText_0x9cb16
+OlivineMartLassScript:
+ jumptextfaceplayer OlivineMartLassText
-UnknownText_0x9cad4:
+OlivineMartCooltrainerFText:
text "Do your #MON"
line "already know the"
@@ -30,7 +30,7 @@ UnknownText_0x9cad4:
line "people on water?"
done
-UnknownText_0x9cb16:
+OlivineMartLassText:
text "My BUTTERFREE came"
line "from my boyfriend"
cont "overseas."
@@ -54,14 +54,14 @@ OlivineMart_MapEventHeader:
warp_def $7, $2, 8, OLIVINE_CITY
warp_def $7, $3, 8, OLIVINE_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x9cac7, -1
- person_event SPRITE_COOLTRAINER_F, 2, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x9cace, -1
- person_event SPRITE_LASS, 6, 1, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LassScript_0x9cad1, -1
+ object_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x9cac7, -1
+ object_event SPRITE_COOLTRAINER_F, 2, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, OlivineMartCooltrainerFScript, -1
+ object_event SPRITE_LASS, 6, 1, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineMartLassScript, -1
diff --git a/maps/OlivinePokeCenter1F.asm b/maps/OlivinePokeCenter1F.asm
deleted file mode 100644
index e0f0dbb69..000000000
--- a/maps/OlivinePokeCenter1F.asm
+++ /dev/null
@@ -1,71 +0,0 @@
-const_value set 2
- const OLIVINEPOKECENTER1F_NURSE
- const OLIVINEPOKECENTER1F_FISHING_GURU
- const OLIVINEPOKECENTER1F_FISHER
- const OLIVINEPOKECENTER1F_TEACHER
-
-OlivinePokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x9c002:
- jumpstd pokecenternurse
-
-FishingGuruScript_0x9c005:
- jumpstd happinesschecknpc
-
-FisherScript_0x9c008:
- jumptextfaceplayer UnknownText_0x9c00e
-
-TeacherScript_0x9c00b:
- jumptextfaceplayer UnknownText_0x9c086
-
-UnknownText_0x9c00e:
- text "The SAILOR in the"
- line "OLIVINE CAFE next"
-
- para "door is really"
- line "generous."
-
- para "He taught my"
- line "#MON STRENGTH."
-
- para "Now it can move"
- line "big boulders."
- done
-
-UnknownText_0x9c086:
- text "There's a person"
- line "in CIANWOOD CITY"
- cont "across the sea."
-
- para "I heard him brag-"
- line "ging about his"
- cont "rare #MON."
- done
-
-OlivinePokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 1, OLIVINE_CITY
- warp_def $7, $4, 1, OLIVINE_CITY
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 4
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x9c002, -1
- person_event SPRITE_FISHING_GURU, 4, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FishingGuruScript_0x9c005, -1
- person_event SPRITE_FISHER, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FisherScript_0x9c008, -1
- person_event SPRITE_TEACHER, 1, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TeacherScript_0x9c00b, -1
diff --git a/maps/OlivinePokecenter1F.asm b/maps/OlivinePokecenter1F.asm
new file mode 100644
index 000000000..fd4bf2556
--- /dev/null
+++ b/maps/OlivinePokecenter1F.asm
@@ -0,0 +1,71 @@
+const_value set 2
+ const OLIVINEPOKECENTER1F_NURSE
+ const OLIVINEPOKECENTER1F_FISHING_GURU
+ const OLIVINEPOKECENTER1F_FISHER
+ const OLIVINEPOKECENTER1F_TEACHER
+
+OlivinePokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x9c002:
+ jumpstd pokecenternurse
+
+FishingGuruScript_0x9c005:
+ jumpstd happinesschecknpc
+
+OlivinePokecenter1FFisherScript:
+ jumptextfaceplayer OlivinePokecenter1FFisherText
+
+OlivinePokecenter1FTeacherScript:
+ jumptextfaceplayer OlivinePokecenter1FTeacherText
+
+OlivinePokecenter1FFisherText:
+ text "The SAILOR in the"
+ line "OLIVINE CAFE next"
+
+ para "door is really"
+ line "generous."
+
+ para "He taught my"
+ line "#MON STRENGTH."
+
+ para "Now it can move"
+ line "big boulders."
+ done
+
+OlivinePokecenter1FTeacherText:
+ text "There's a person"
+ line "in CIANWOOD CITY"
+ cont "across the sea."
+
+ para "I heard him brag-"
+ line "ging about his"
+ cont "rare #MON."
+ done
+
+OlivinePokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 1, OLIVINE_CITY
+ warp_def $7, $4, 1, OLIVINE_CITY
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x9c002, -1
+ object_event SPRITE_FISHING_GURU, 4, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FishingGuruScript_0x9c005, -1
+ object_event SPRITE_FISHER, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, OlivinePokecenter1FFisherScript, -1
+ object_event SPRITE_TEACHER, 1, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePokecenter1FTeacherScript, -1
diff --git a/maps/OlivinePort.asm b/maps/OlivinePort.asm
index b7830eaed..d0972ced3 100644
--- a/maps/OlivinePort.asm
+++ b/maps/OlivinePort.asm
@@ -8,27 +8,25 @@ const_value set 2
const OLIVINEPORT_COOLTRAINER_F
OlivinePort_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x748ac, 0
- dw UnknownScript_0x748ad, 0
+ scene_script .DummyScene0
+ scene_script .LeaveFastShip
.MapCallbacks:
db 0
-UnknownScript_0x748ac:
+.DummyScene0:
end
-UnknownScript_0x748ad:
- priorityjump UnknownScript_0x748b1
+.LeaveFastShip:
+ priorityjump .LeaveFastShipScript
end
-UnknownScript_0x748b1:
+.LeaveFastShipScript:
applymovement PLAYER, MovementData_0x74a32
appear OLIVINEPORT_SAILOR1
- dotrigger $0
+ setscene $0
setevent EVENT_GAVE_KURT_APRICORNS
blackoutmod OLIVINE_CITY
end
@@ -66,7 +64,7 @@ SailorScript_0x748c0:
UnknownScript_0x7490a:
clearevent EVENT_FAST_SHIP_DESTINATION_OLIVINE
appear OLIVINEPORT_SAILOR1
- domaptrigger FAST_SHIP_1F, $1
+ setmapscene FAST_SHIP_1F, $1
warp FAST_SHIP_1F, $19, $1
end
@@ -196,8 +194,8 @@ UnknownScript_0x749f8:
closetext
end
-SailorScript_0x749fe:
- jumptextfaceplayer UnknownText_0x74cd7
+OlivinePortSailorScript:
+ jumptextfaceplayer OlivinePortSailorText
FishingGuruScript_0x74a01:
faceplayer
@@ -379,7 +377,7 @@ UnknownText_0x74ca2:
para "I wish I could go…"
done
-UnknownText_0x74cd7:
+OlivinePortSailorText:
text "We don't want you"
line "to fall into the"
@@ -396,20 +394,20 @@ OlivinePort_MapEventHeader:
warp_def $7, $b, 5, OLIVINE_PORT_PASSAGE
warp_def $17, $7, 1, FAST_SHIP_1F
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 0, $f, $7, $0, UnknownScript_0x7491f, $0, $0
+ coord_event 0, $f, $7, UnknownScript_0x7491f
-.Signposts:
+.BGEvents:
db 1
- signpost 22, 1, SIGNPOST_ITEM, OlivinePortHiddenProtein
+ bg_event 22, 1, BGEVENT_ITEM, OlivinePortHiddenProtein
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_SAILOR, 23, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SailorScript_0x748c0, EVENT_OLIVINE_PORT_SAILOR_AT_GANGWAY
- person_event SPRITE_SAILOR, 15, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SailorScript_0x749fe, EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME
- person_event SPRITE_SAILOR, 15, 6, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SailorScript_0x7499c, EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME
- person_event SPRITE_FISHING_GURU, 14, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FishingGuruScript_0x74a01, EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME
- person_event SPRITE_FISHING_GURU, 14, 13, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FishingGuruScript_0x74a0c, EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME
- person_event SPRITE_YOUNGSTER, 15, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x74a17, EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME
- person_event SPRITE_COOLTRAINER_F, 15, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x74a22, EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME
+ object_event SPRITE_SAILOR, 23, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SailorScript_0x748c0, EVENT_OLIVINE_PORT_SAILOR_AT_GANGWAY
+ object_event SPRITE_SAILOR, 15, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePortSailorScript, EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME
+ object_event SPRITE_SAILOR, 15, 6, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SailorScript_0x7499c, EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME
+ object_event SPRITE_FISHING_GURU, 14, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FishingGuruScript_0x74a01, EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME
+ object_event SPRITE_FISHING_GURU, 14, 13, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FishingGuruScript_0x74a0c, EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME
+ object_event SPRITE_YOUNGSTER, 15, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x74a17, EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME
+ object_event SPRITE_COOLTRAINER_F, 15, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CooltrainerFScript_0x74a22, EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME
diff --git a/maps/OlivinePortPassage.asm b/maps/OlivinePortPassage.asm
index 116a05dfd..08f4532c0 100644
--- a/maps/OlivinePortPassage.asm
+++ b/maps/OlivinePortPassage.asm
@@ -2,16 +2,16 @@ const_value set 2
const OLIVINEPORTPASSAGE_POKEFAN_M
OlivinePortPassage_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-PokefanMScript_0x76fac:
- jumptextfaceplayer UnknownText_0x76faf
+OlivinePortPassagePokefanMScript:
+ jumptextfaceplayer OlivinePortPassagePokefanMText
-UnknownText_0x76faf:
+OlivinePortPassagePokefanMText:
text "FAST SHIP S.S.AQUA"
line "sails to KANTO on"
@@ -31,12 +31,12 @@ OlivinePortPassage_MapEventHeader:
warp_def $2, $3, 3, OLIVINE_PORT_PASSAGE
warp_def $e, $3, 1, OLIVINE_PORT
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKEFAN_M, 1, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x76fac, EVENT_OLIVINE_PORT_PASSAGE_POKEFAN_M
+ object_event SPRITE_POKEFAN_M, 1, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePortPassagePokefanMScript, EVENT_OLIVINE_PORT_PASSAGE_POKEFAN_M
diff --git a/maps/OlivinePunishmentSpeechHouse.asm b/maps/OlivinePunishmentSpeechHouse.asm
index b819ab567..f3537224b 100644
--- a/maps/OlivinePunishmentSpeechHouse.asm
+++ b/maps/OlivinePunishmentSpeechHouse.asm
@@ -3,7 +3,7 @@ const_value set 2
const OLIVINEPUNISHMENTSPEECHHOUSE_LASS
OlivinePunishmentSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -48,15 +48,15 @@ OlivinePunishmentSpeechHouse_MapEventHeader:
warp_def $7, $2, 5, OLIVINE_CITY
warp_def $7, $3, 5, OLIVINE_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, OlivinePunishmentSpeechHouseBookshelf1
- signpost 1, 1, SIGNPOST_READ, OlivinePunishmentSpeechHouseBookshelf2
+ bg_event 1, 0, BGEVENT_READ, OlivinePunishmentSpeechHouseBookshelf1
+ bg_event 1, 1, BGEVENT_READ, OlivinePunishmentSpeechHouseBookshelf2
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_POKEFAN_M, 2, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, OlivinePunishmentSpeechHouseDad, -1
- person_event SPRITE_LASS, 5, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, OlivinePunishmentSpeechHouseDaughter, -1
+ object_event SPRITE_POKEFAN_M, 2, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePunishmentSpeechHouseDad, -1
+ object_event SPRITE_LASS, 5, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePunishmentSpeechHouseDaughter, -1
diff --git a/maps/OlivineTimsHouse.asm b/maps/OlivineTimsHouse.asm
index 311f0543a..96ea2636b 100644
--- a/maps/OlivineTimsHouse.asm
+++ b/maps/OlivineTimsHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const OLIVINETIMSHOUSE_TIM
OlivineTimsHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -11,7 +11,7 @@ OlivineTimsHouse_MapScriptHeader:
Tim:
faceplayer
opentext
- trade $2
+ trade NPCTRADE_TIM
waitbutton
closetext
end
@@ -28,14 +28,14 @@ OlivineTimsHouse_MapEventHeader:
warp_def $7, $2, 3, OLIVINE_CITY
warp_def $7, $3, 3, OLIVINE_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, TimsHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, TimsHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, TimsHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, TimsHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_FISHING_GURU, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, Tim, -1
+ object_event SPRITE_FISHING_GURU, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Tim, -1
diff --git a/maps/PalletTown.asm b/maps/PalletTown.asm
index 45ab0c5ca..b7f48f47d 100644
--- a/maps/PalletTown.asm
+++ b/maps/PalletTown.asm
@@ -3,24 +3,22 @@ const_value set 2
const PALLETTOWN_FISHER
PalletTown_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_PALLET
return
-TeacherScript_0x1ac6d5:
- jumptextfaceplayer UnknownText_0x1ac6e7
+PalletTownTeacherScript:
+ jumptextfaceplayer PalletTownTeacherText
-FisherScript_0x1ac6d8:
- jumptextfaceplayer UnknownText_0x1ac720
+PalletTownFisherScript:
+ jumptextfaceplayer PalletTownFisherText
PalletTownSign:
jumptext PalletTownSignText
@@ -34,7 +32,7 @@ OaksLabSign:
BluesHouseSign:
jumptext BluesHouseSignText
-UnknownText_0x1ac6e7:
+PalletTownTeacherText:
text "I'm raising #-"
line "MON too."
@@ -42,7 +40,7 @@ UnknownText_0x1ac6e7:
line "private guards."
done
-UnknownText_0x1ac720:
+PalletTownFisherText:
text "Technology is"
line "incredible!"
@@ -81,17 +79,17 @@ PalletTown_MapEventHeader:
warp_def $5, $d, 1, BLUES_HOUSE
warp_def $b, $c, 1, OAKS_LAB
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 4
- signpost 9, 7, SIGNPOST_READ, PalletTownSign
- signpost 5, 3, SIGNPOST_READ, RedsHouseSign
- signpost 13, 13, SIGNPOST_READ, OaksLabSign
- signpost 5, 11, SIGNPOST_READ, BluesHouseSign
+ bg_event 9, 7, BGEVENT_READ, PalletTownSign
+ bg_event 5, 3, BGEVENT_READ, RedsHouseSign
+ bg_event 13, 13, BGEVENT_READ, OaksLabSign
+ bg_event 5, 11, BGEVENT_READ, BluesHouseSign
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_TEACHER, 8, 3, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TeacherScript_0x1ac6d5, -1
- person_event SPRITE_FISHER, 14, 12, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FisherScript_0x1ac6d8, -1
+ object_event SPRITE_TEACHER, 8, 3, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PalletTownTeacherScript, -1
+ object_event SPRITE_FISHER, 14, 12, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PalletTownFisherScript, -1
diff --git a/maps/PewterCity.asm b/maps/PewterCity.asm
index e70012447..04d5c0d8f 100644
--- a/maps/PewterCity.asm
+++ b/maps/PewterCity.asm
@@ -6,24 +6,22 @@ const_value set 2
const PEWTERCITY_FRUIT_TREE2
PewterCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_PEWTER
return
-CooltrainerFScript_0x18c009:
- jumptextfaceplayer UnknownText_0x18c042
+PewterCityCooltrainerFScript:
+ jumptextfaceplayer PewterCityCooltrainerFText
-BugCatcherScript_0x18c00c:
- jumptextfaceplayer UnknownText_0x18c080
+PewterCityBugCatcherScript:
+ jumptextfaceplayer PewterCityBugCatcherText
GrampsScript_0x18c00f:
faceplayer
@@ -58,7 +56,7 @@ PewterCityMtMoonGiftShopSign:
PewterCityWelcomeSign:
jumptext PewterCityWelcomeSignText
-PewterCityPokeCenterSign:
+PewterCityPokecenterSign:
jumpstd pokecentersign
PewterCityMartSign:
@@ -70,7 +68,7 @@ FruitTreeScript_0x18c03e:
FruitTreeScript_0x18c040:
fruittree FRUITTREE_PEWTER_CITY_2
-UnknownText_0x18c042:
+PewterCityCooltrainerFText:
text "Have you visited"
line "PEWTER GYM?"
@@ -78,7 +76,7 @@ UnknownText_0x18c042:
line "rock-type #MON."
done
-UnknownText_0x18c080:
+PewterCityBugCatcherText:
text "At night, CLEFAIRY"
line "come out to play"
cont "at MT.MOON."
@@ -166,23 +164,23 @@ PewterCity_MapEventHeader:
warp_def $19, $d, 1, PEWTER_POKECENTER_1F
warp_def $1d, $7, 1, PEWTER_SNOOZE_SPEECH_HOUSE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 7
- signpost 23, 25, SIGNPOST_READ, PewterCitySign
- signpost 17, 11, SIGNPOST_READ, PewterGymSign
- signpost 9, 15, SIGNPOST_READ, PewterMuseumSign
- signpost 19, 33, SIGNPOST_READ, PewterCityMtMoonGiftShopSign
- signpost 29, 19, SIGNPOST_READ, PewterCityWelcomeSign
- signpost 25, 14, SIGNPOST_READ, PewterCityPokeCenterSign
- signpost 17, 24, SIGNPOST_READ, PewterCityMartSign
-
-.PersonEvents:
+ bg_event 23, 25, BGEVENT_READ, PewterCitySign
+ bg_event 17, 11, BGEVENT_READ, PewterGymSign
+ bg_event 9, 15, BGEVENT_READ, PewterMuseumSign
+ bg_event 19, 33, BGEVENT_READ, PewterCityMtMoonGiftShopSign
+ bg_event 29, 19, BGEVENT_READ, PewterCityWelcomeSign
+ bg_event 25, 14, BGEVENT_READ, PewterCityPokecenterSign
+ bg_event 17, 24, BGEVENT_READ, PewterCityMartSign
+
+.ObjectEvents:
db 5
- person_event SPRITE_COOLTRAINER_F, 11, 19, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x18c009, -1
- person_event SPRITE_BUG_CATCHER, 29, 14, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, BugCatcherScript_0x18c00c, -1
- person_event SPRITE_GRAMPS, 17, 29, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GrampsScript_0x18c00f, -1
- person_event SPRITE_FRUIT_TREE, 3, 32, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x18c03e, -1
- person_event SPRITE_FRUIT_TREE, 3, 30, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x18c040, -1
+ object_event SPRITE_COOLTRAINER_F, 11, 19, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PewterCityCooltrainerFScript, -1
+ object_event SPRITE_BUG_CATCHER, 29, 14, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, PewterCityBugCatcherScript, -1
+ object_event SPRITE_GRAMPS, 17, 29, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GrampsScript_0x18c00f, -1
+ object_event SPRITE_FRUIT_TREE, 3, 32, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x18c03e, -1
+ object_event SPRITE_FRUIT_TREE, 3, 30, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x18c040, -1
diff --git a/maps/PewterGym.asm b/maps/PewterGym.asm
index 3adc06019..524113ba3 100644
--- a/maps/PewterGym.asm
+++ b/maps/PewterGym.asm
@@ -4,7 +4,7 @@ const_value set 2
const PEWTERGYM_GYM_GUY
PewterGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -41,12 +41,12 @@ BrockScript_0x1a2864:
end
TrainerCamperJerry:
- trainer EVENT_BEAT_CAMPER_JERRY, CAMPER, JERRY, CamperJerrySeenText, CamperJerryBeatenText, 0, CamperJerryScript
+ trainer EVENT_BEAT_CAMPER_JERRY, CAMPER, JERRY, CamperJerrySeenText, CamperJerryBeatenText, 0, .Script
-CamperJerryScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a2c0f
+ writetext CamperJerryAfterBattleText
waitbutton
closetext
end
@@ -166,7 +166,7 @@ CamperJerryBeatenText:
line "these battles…"
done
-UnknownText_0x1a2c0f:
+CamperJerryAfterBattleText:
text "Hey, you! Trainer"
line "from JOHTO! BROCK"
@@ -217,16 +217,16 @@ PewterGym_MapEventHeader:
warp_def $d, $4, 2, PEWTER_CITY
warp_def $d, $5, 2, PEWTER_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 11, 2, SIGNPOST_READ, PewterGymStatue
- signpost 11, 7, SIGNPOST_READ, PewterGymStatue
+ bg_event 11, 2, BGEVENT_READ, PewterGymStatue
+ bg_event 11, 7, BGEVENT_READ, PewterGymStatue
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_BROCK, 1, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, BrockScript_0x1a2864, -1
- person_event SPRITE_YOUNGSTER, 5, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerCamperJerry, -1
- person_event SPRITE_GYM_GUY, 11, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 1, PewterGymGuyScript, -1
+ object_event SPRITE_BROCK, 1, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BrockScript_0x1a2864, -1
+ object_event SPRITE_YOUNGSTER, 5, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerCamperJerry, -1
+ object_event SPRITE_GYM_GUY, 11, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 1, PewterGymGuyScript, -1
diff --git a/maps/PewterMart.asm b/maps/PewterMart.asm
index 6ee67b720..be92c8cac 100644
--- a/maps/PewterMart.asm
+++ b/maps/PewterMart.asm
@@ -4,7 +4,7 @@ const_value set 2
const PEWTERMART_SUPER_NERD
PewterMart_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -16,13 +16,13 @@ ClerkScript_0x1a2dcb:
closetext
end
-YoungsterScript_0x1a2dd2:
- jumptextfaceplayer UnknownText_0x1a2dd8
+PewterMartYoungsterScript:
+ jumptextfaceplayer PewterMartYoungsterText
-SuperNerdScript_0x1a2dd5:
- jumptextfaceplayer UnknownText_0x1a2e3a
+PewterMartSuperNerdScript:
+ jumptextfaceplayer PewterMartSuperNerdText
-UnknownText_0x1a2dd8:
+PewterMartYoungsterText:
text "Hi! Check out my"
line "GYARADOS!"
@@ -33,7 +33,7 @@ UnknownText_0x1a2dd8:
line "it has become."
done
-UnknownText_0x1a2e3a:
+PewterMartSuperNerdText:
text "There once was a"
line "weird old man who"
cont "sold MAGIKARP."
@@ -54,14 +54,14 @@ PewterMart_MapEventHeader:
warp_def $7, $2, 3, PEWTER_CITY
warp_def $7, $3, 3, PEWTER_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x1a2dcb, -1
- person_event SPRITE_YOUNGSTER, 2, 9, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x1a2dd2, -1
- person_event SPRITE_SUPER_NERD, 6, 6, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x1a2dd5, -1
+ object_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x1a2dcb, -1
+ object_event SPRITE_YOUNGSTER, 2, 9, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PewterMartYoungsterScript, -1
+ object_event SPRITE_SUPER_NERD, 6, 6, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, PewterMartSuperNerdScript, -1
diff --git a/maps/PewterNidoranSpeechHouse.asm b/maps/PewterNidoranSpeechHouse.asm
index 4bc958979..410e3c365 100644
--- a/maps/PewterNidoranSpeechHouse.asm
+++ b/maps/PewterNidoranSpeechHouse.asm
@@ -3,14 +3,14 @@ const_value set 2
const PEWTERNIDORANSPEECHHOUSE_GROWLITHE
PewterNidoranSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-SuperNerdScript_0x1a2807:
- jumptextfaceplayer UnknownText_0x1a2814
+PewterNidoranSpeechHouseSuperNerdScript:
+ jumptextfaceplayer PewterNidoranSpeechHouseSuperNerdText
PewterNidoran:
opentext
@@ -20,7 +20,7 @@ PewterNidoran:
closetext
end
-UnknownText_0x1a2814:
+PewterNidoranSpeechHouseSuperNerdText:
text "NIDORAN, shake!"
done
@@ -37,13 +37,13 @@ PewterNidoranSpeechHouse_MapEventHeader:
warp_def $7, $2, 1, PEWTER_CITY
warp_def $7, $3, 1, PEWTER_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_SUPER_NERD, 5, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x1a2807, -1
- person_event SPRITE_GROWLITHE, 5, 4, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, PewterNidoran, -1
+ object_event SPRITE_SUPER_NERD, 5, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PewterNidoranSpeechHouseSuperNerdScript, -1
+ object_event SPRITE_GROWLITHE, 5, 4, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PewterNidoran, -1
diff --git a/maps/PewterPokeCenter1F.asm b/maps/PewterPokeCenter1F.asm
deleted file mode 100644
index 90aac7428..000000000
--- a/maps/PewterPokeCenter1F.asm
+++ /dev/null
@@ -1,92 +0,0 @@
-const_value set 2
- const PEWTERPOKECENTER1F_NURSE
- const PEWTERPOKECENTER1F_TEACHER
- const PEWTERPOKECENTER1F_JIGGLYPUFF
- const PEWTERPOKECENTER1F_BUG_CATCHER
- const PEWTERPOKECENTER1F_CHRIS
-
-PewterPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x1a2ee7:
- jumpstd pokecenternurse
-
-TeacherScript_0x1a2eea:
- jumptextfaceplayer UnknownText_0x1a2f01
-
-PewterJigglypuff:
- opentext
- writetext PewterJigglypuffText
- cry JIGGLYPUFF
- waitbutton
- closetext
- end
-
-BugCatcherScript_0x1a2ef7:
- jumptextfaceplayer UnknownText_0x1a2f75
-
-Chris:
- faceplayer
- opentext
- trade $4
- waitbutton
- closetext
- end
-
-UnknownText_0x1a2f01:
- text "…Yeah, and the"
- line "GYM in CINNABAR's"
-
- para "gone. I was really"
- line "amazed."
-
- para "…Yes? I'm on the"
- line "phone. Go away!"
- done
-
-PewterJigglypuffText:
- text "JIGGLYPUFF: Puu"
- line "pupuu."
- done
-
-UnknownText_0x1a2f75:
- text "Most #MON get"
- line "drowsy if they"
-
- para "hear a JIGGLYPUFF"
- line "singing."
-
- para "There are several"
- line "moves that can be"
-
- para "used only while a"
- line "#MON is asleep."
- done
-
-PewterPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 4, PEWTER_CITY
- warp_def $7, $4, 4, PEWTER_CITY
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 5
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x1a2ee7, -1
- person_event SPRITE_TEACHER, 6, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TeacherScript_0x1a2eea, -1
- person_event SPRITE_JIGGLYPUFF, 3, 1, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PewterJigglypuff, -1
- person_event SPRITE_BUG_CATCHER, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, BugCatcherScript_0x1a2ef7, -1
- person_event SPRITE_POKEFAN_M, 2, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, Chris, -1
diff --git a/maps/PewterPokeCenter2FBeta.asm b/maps/PewterPokeCenter2FBeta.asm
deleted file mode 100644
index b2530ed8b..000000000
--- a/maps/PewterPokeCenter2FBeta.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-PewterPokeCenter2FBeta_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-PewterPokeCenter2FBeta_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 1
- warp_def $7, $0, 3, PEWTER_POKECENTER_1F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/PewterPokecenter1F.asm b/maps/PewterPokecenter1F.asm
new file mode 100644
index 000000000..1ab45da18
--- /dev/null
+++ b/maps/PewterPokecenter1F.asm
@@ -0,0 +1,92 @@
+const_value set 2
+ const PEWTERPOKECENTER1F_NURSE
+ const PEWTERPOKECENTER1F_TEACHER
+ const PEWTERPOKECENTER1F_JIGGLYPUFF
+ const PEWTERPOKECENTER1F_BUG_CATCHER
+ const PEWTERPOKECENTER1F_CHRIS
+
+PewterPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x1a2ee7:
+ jumpstd pokecenternurse
+
+PewterPokecenter1FTeacherScript:
+ jumptextfaceplayer PewterPokecenter1FTeacherText
+
+PewterJigglypuff:
+ opentext
+ writetext PewterJigglypuffText
+ cry JIGGLYPUFF
+ waitbutton
+ closetext
+ end
+
+PewterPokecenter1FBugCatcherScript:
+ jumptextfaceplayer PewterPokecenter1FBugCatcherText
+
+Chris:
+ faceplayer
+ opentext
+ trade NPCTRADE_CHRIS
+ waitbutton
+ closetext
+ end
+
+PewterPokecenter1FTeacherText:
+ text "…Yeah, and the"
+ line "GYM in CINNABAR's"
+
+ para "gone. I was really"
+ line "amazed."
+
+ para "…Yes? I'm on the"
+ line "phone. Go away!"
+ done
+
+PewterJigglypuffText:
+ text "JIGGLYPUFF: Puu"
+ line "pupuu."
+ done
+
+PewterPokecenter1FBugCatcherText:
+ text "Most #MON get"
+ line "drowsy if they"
+
+ para "hear a JIGGLYPUFF"
+ line "singing."
+
+ para "There are several"
+ line "moves that can be"
+
+ para "used only while a"
+ line "#MON is asleep."
+ done
+
+PewterPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 4, PEWTER_CITY
+ warp_def $7, $4, 4, PEWTER_CITY
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 5
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x1a2ee7, -1
+ object_event SPRITE_TEACHER, 6, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PewterPokecenter1FTeacherScript, -1
+ object_event SPRITE_JIGGLYPUFF, 3, 1, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PewterJigglypuff, -1
+ object_event SPRITE_BUG_CATCHER, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PewterPokecenter1FBugCatcherScript, -1
+ object_event SPRITE_POKEFAN_M, 2, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Chris, -1
diff --git a/maps/PewterPokecenter2FBeta.asm b/maps/PewterPokecenter2FBeta.asm
new file mode 100644
index 000000000..33c22b063
--- /dev/null
+++ b/maps/PewterPokecenter2FBeta.asm
@@ -0,0 +1,23 @@
+PewterPokecenter2FBeta_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+PewterPokecenter2FBeta_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 1
+ warp_def $7, $0, 3, PEWTER_POKECENTER_1F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/PewterSnoozeSpeechHouse.asm b/maps/PewterSnoozeSpeechHouse.asm
index 41d0c10ba..3b7c60f93 100644
--- a/maps/PewterSnoozeSpeechHouse.asm
+++ b/maps/PewterSnoozeSpeechHouse.asm
@@ -2,19 +2,19 @@ const_value set 2
const PEWTERSNOOZESPEECHHOUSE_GRAMPS
PewterSnoozeSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-GrampsScript_0x1a3059:
- jumptextfaceplayer UnknownText_0x1a305f
+PewterSnoozeSpeechHouseGrampsScript:
+ jumptextfaceplayer PewterSnoozeSpeechHouseGrampsText
PewterSnoozeSpeechHouseBookshelf:
jumpstd picturebookshelf
-UnknownText_0x1a305f:
+PewterSnoozeSpeechHouseGrampsText:
text "I like snoozing"
line "with the radio on…"
cont "…Zzzz…"
@@ -29,14 +29,14 @@ PewterSnoozeSpeechHouse_MapEventHeader:
warp_def $7, $2, 5, PEWTER_CITY
warp_def $7, $3, 5, PEWTER_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, PewterSnoozeSpeechHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, PewterSnoozeSpeechHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, PewterSnoozeSpeechHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, PewterSnoozeSpeechHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_GRAMPS, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GrampsScript_0x1a3059, -1
+ object_event SPRITE_GRAMPS, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PewterSnoozeSpeechHouseGrampsScript, -1
diff --git a/maps/PokeCenter2F.asm b/maps/PokeCenter2F.asm
deleted file mode 100644
index 3730b6708..000000000
--- a/maps/PokeCenter2F.asm
+++ /dev/null
@@ -1,1052 +0,0 @@
-const_value set 2
- const POKECENTER2F_TRADE_RECEPTIONIST
- const POKECENTER2F_BATTLE_RECEPTIONIST
- const POKECENTER2F_TIME_CAPSULE_RECEPTIONIST
- const POKECENTER2F_OFFICER
-
-PokeCenter2F_MapScriptHeader:
-.MapTriggers:
- db 6
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
- maptrigger .Trigger2
- maptrigger .Trigger3
- maptrigger .Trigger4
- maptrigger .Trigger5
-
-.MapCallbacks:
- db 0
-
-.Trigger0:
- special Special_CheckMysteryGift
- if_equal $0, .Trigger0Done
- clearevent EVENT_MYSTERY_GIFT_DELIVERY_GUY
- checkevent EVENT_RECEIVED_BALLS_FROM_KURT
- iftrue .Trigger0Done
- priorityjump PokeCenter2F_AppearMysteryGiftDeliveryGuy
-
-.Trigger0Done:
- end
-
-.Trigger1:
- priorityjump Script_LeftCableTradeCenter
- end
-
-.Trigger2:
- priorityjump Script_LeftCableColosseum
- end
-
-.Trigger3:
- priorityjump Script_LeftTimeCapsule
- end
-
-.Trigger4:
- priorityjump Script_LeftMobileTradeRoom
- end
-
-.Trigger5:
- priorityjump Script_LeftMobileBattleRoom
- end
-
-PokeCenter2F_AppearMysteryGiftDeliveryGuy:
- appear POKECENTER2F_OFFICER
- setevent EVENT_RECEIVED_BALLS_FROM_KURT
- end
-
-Script_TradeCenterClosed:
- faceplayer
- opentext
- writetext Text_TradeRoomClosed
- waitbutton
- closetext
- end
-
-Script_BattleRoomClosed:
- faceplayer
- opentext
- writetext Text_BattleRoomClosed
- waitbutton
- closetext
- end
-
-LinkReceptionistScript_Trade:
- checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
- iffalse Script_TradeCenterClosed
- opentext
- writetext Text_TradeReceptionistIntro
- yesorno
- iffalse .Cancel
- special Mobile_DummyReturnFalse ; always returns false
- iffalse .NoMobile
- writetext Text_TradeReceptionistMobile
- special AskMobileOrCable
- iffalse .Cancel
- if_equal $1, .Mobile
-.NoMobile:
- special Special_SetBitsForLinkTradeRequest
- writetext Text_PleaseWait
- special Special_WaitForLinkedFriend
- iffalse .FriendNotReady
- writetext Text_MustSaveGame
- yesorno
- iffalse .DidNotSave
- special Special_TryQuickSave
- iffalse .DidNotSave
- writetext Text_PleaseWait
- special Special_CheckLinkTimeout
- iffalse .LinkTimedOut
- copybytetovar wOtherPlayerLinkMode
- iffalse .LinkedToFirstGen
- special Special_CheckBothSelectedSameRoom
- iffalse .IncompatibleRooms
- writetext Text_PleaseComeIn2
- waitbutton
- closetext
- scall PokeCenter2F_CheckGender
- warpcheck
- end
-
-.FriendNotReady:
- special WaitForOtherPlayerToExit
- writetext Text_FriendNotReady
- closetext
- end
-
-.LinkedToFirstGen:
- special Special_FailedLinkToPast
- writetext Text_CantLinkToThePast
- special Special_CloseLink
- closetext
- end
-
-.IncompatibleRooms:
- writetext Text_IncompatibleRooms
- special Special_CloseLink
- closetext
- end
-
-.LinkTimedOut:
- writetext Text_LinkTimedOut
- jump .AbortLink
-
-.DidNotSave:
- writetext Text_PleaseComeAgain
-.AbortLink:
- special WaitForOtherPlayerToExit
-.Cancel:
- closetext
- end
-
-.Mobile:
- scall .Mobile_TrySave
- iftrue .Mobile_Abort
- scall BattleTradeMobile_WalkIn
- warpcheck
- end
-
-.Mobile_Abort:
- end
-
-.Mobile_TrySave:
- writetext Text_MustSaveGame
- yesorno
- iffalse .Mobile_DidNotSave
- special Special_TryQuickSave
- iffalse .Mobile_DidNotSave
- special Function1011f1
- writetext Text_PleaseComeIn2
- waitbutton
- closetext
- writebyte $0
- end
-
-.Mobile_DidNotSave:
- writetext Text_PleaseComeAgain
- closetext
- writebyte $1
- end
-
-BattleTradeMobile_WalkIn:
- applymovement2 PokeCenter2FMobileMobileMovementData_ReceptionistWalksUpAndLeft_LookDown
- applymovement PLAYER, PokeCenter2FMobileMovementData_PlayerWalksIntoMobileBattleRoom
- end
-
-LinkReceptionistScript_Battle:
- checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
- iffalse Script_BattleRoomClosed
- opentext
- writetext Text_BattleReceptionistIntro
- yesorno
- iffalse .Cancel
- special Mobile_DummyReturnFalse ; always returns false
- iffalse .NoMobile
- writetext Text_BattleReceptionistMobile
- special AskMobileOrCable
- iffalse .Cancel
- if_equal $1, .Mobile
-.NoMobile:
- special Special_SetBitsForBattleRequest
- writetext Text_PleaseWait
- special Special_WaitForLinkedFriend
- iffalse .FriendNotReady
- writetext Text_MustSaveGame
- yesorno
- iffalse .DidNotSave
- special Special_TryQuickSave
- iffalse .DidNotSave
- writetext Text_PleaseWait
- special Special_CheckLinkTimeout
- iffalse .LinkTimedOut
- copybytetovar wOtherPlayerLinkMode
- iffalse .LinkedToFirstGen
- special Special_CheckBothSelectedSameRoom
- iffalse .IncompatibleRooms
- writetext Text_PleaseComeIn2
- waitbutton
- closetext
- scall PokeCenter2F_CheckGender
- warpcheck
- end
-
-.FriendNotReady:
- special WaitForOtherPlayerToExit
- writetext Text_FriendNotReady
- closetext
- end
-
-.LinkedToFirstGen:
- special Special_FailedLinkToPast
- writetext Text_CantLinkToThePast
- special Special_CloseLink
- closetext
- end
-
-.IncompatibleRooms:
- writetext Text_IncompatibleRooms
- special Special_CloseLink
- closetext
- end
-
-.LinkTimedOut:
- writetext Text_LinkTimedOut
- jump .AbortLink
-
-.DidNotSave:
- writetext Text_PleaseComeAgain
-.AbortLink:
- special WaitForOtherPlayerToExit
-.Cancel:
- closetext
- end
-
-.Mobile:
- scall .SelectThreeMons
- iffalse .Mobile_Abort
- scall .Mobile_TrySave
- iftrue .Mobile_Abort
- scall BattleTradeMobile_WalkIn
- warpcheck
- end
-
-.Mobile_Abort:
- end
-
-.Mobile_TrySave:
- writetext Text_MustSaveGame
- yesorno
- iffalse .Mobile_DidNotSave
- special Function103780
- iffalse .Mobile_DidNotSave
- special Function1011f1
- writetext Text_PleaseComeIn2
- waitbutton
- closetext
- writebyte $0
- end
-
-.Mobile_DidNotSave:
- writetext Text_PleaseComeAgain
- closetext
- writebyte $1
- end
-
-.SelectThreeMons:
- special Mobile_SelectThreeMons
- iffalse .Mobile_DidNotSelect
- if_equal $1, .Mobile_OK
- if_equal $2, .Mobile_OK
- if_equal $3, .Mobile_InvalidParty
- jump .Mobile_DidNotSelect
-
-.Mobile_InvalidParty:
- writetext Text_BrokeStadiumRules
- waitbutton
-.Mobile_DidNotSelect:
- closetext
- writebyte $0
- end
-
-.Mobile_OK:
- writebyte $1
- end
-
-Script_TimeCapsuleClosed:
- faceplayer
- opentext
- writetext Text_TimeCapsuleClosed
- waitbutton
- closetext
- end
-
-LinkReceptionistScript_TimeCapsule:
- checkevent EVENT_MET_BILL
- iftrue Script_TimeCapsuleClosed
- checkflag ENGINE_TIME_CAPSULE
- iftrue Script_TimeCapsuleClosed
- special Special_SetBitsForTimeCapsuleRequest
- faceplayer
- opentext
- writetext Text_TimeCapsuleReceptionistIntro
- yesorno
- iffalse .Cancel
- special Special_CheckTimeCapsuleCompatibility
- if_equal $1, .MonTooNew
- if_equal $2, .MonMoveTooNew
- if_equal $3, .MonHasMail
- writetext Text_PleaseWait
- special Special_WaitForLinkedFriend
- iffalse .FriendNotReady
- writetext Text_MustSaveGame
- yesorno
- iffalse .DidNotSave
- special Special_TryQuickSave
- iffalse .DidNotSave
- writetext Text_PleaseWait
- special Special_CheckLinkTimeout
- iffalse .LinkTimedOut
- copybytetovar wOtherPlayerLinkMode
- iffalse .OK
- special Special_CheckBothSelectedSameRoom
- writetext Text_IncompatibleRooms
- special Special_CloseLink
- closetext
- end
-
-.OK:
- special Special_EnterTimeCapsule
- writetext Text_PleaseComeIn2
- waitbutton
- closetext
- scall TimeCapsuleScript_CheckPlayerGender
- warpcheck
- end
-
-.FriendNotReady:
- special WaitForOtherPlayerToExit
- writetext Text_FriendNotReady
- closetext
- end
-
-.LinkTimedOut:
- writetext Text_LinkTimedOut
- jump .Cancel
-
-.DidNotSave:
- writetext Text_PleaseComeAgain
-.Cancel:
- special WaitForOtherPlayerToExit
- closetext
- end
-
-.MonTooNew:
- writetext Text_RejectNewMon
- closetext
- end
-
-.MonMoveTooNew:
- writetext Text_RejectMonWithNewMove
- closetext
- end
-
-.MonHasMail:
- writetext Text_RejectMonWithMail
- closetext
- end
-
-Script_LeftCableTradeCenter:
- special WaitForOtherPlayerToExit
- scall Script_WalkOutOfLinkTradeRoom
- dotrigger $0
- domaptrigger TRADE_CENTER, $0
- end
-
-Script_LeftMobileTradeRoom:
- special Function101220
- scall Script_WalkOutOfMobileTradeRoom
- dotrigger $0
- domaptrigger MOBILE_TRADE_ROOM_MOBILE, $0
- end
-
-Script_WalkOutOfMobileTradeRoom:
- applymovement POKECENTER2F_TRADE_RECEPTIONIST, PokeCenter2FMobileMovementData_ReceptionistWalksUpAndLeft
- applymovement PLAYER, PokeCenter2FMovementData_PlayerWalksOutOfMobileRoom
- applymovement POKECENTER2F_TRADE_RECEPTIONIST, PokeCenter2FMobileMovementData_ReceptionistWalksRightAndDown
- end
-
-Script_LeftCableColosseum:
- special WaitForOtherPlayerToExit
- scall Script_WalkOutOfLinkBattleRoom
- dotrigger $0
- domaptrigger COLOSSEUM, $0
- end
-
-Script_LeftMobileBattleRoom:
- special Function101220
- scall Script_WalkOutOfMobileBattleRoom
- dotrigger $0
- domaptrigger MOBILE_BATTLE_ROOM, $0
- end
-
-Script_WalkOutOfMobileBattleRoom:
- applymovement POKECENTER2F_BATTLE_RECEPTIONIST, PokeCenter2FMobileMovementData_ReceptionistWalksUpAndLeft
- applymovement PLAYER, PokeCenter2FMovementData_PlayerWalksOutOfMobileRoom
- applymovement POKECENTER2F_BATTLE_RECEPTIONIST, PokeCenter2FMobileMovementData_ReceptionistWalksRightAndDown
- end
-
-PokeCenter2F_CheckGender:
- checkflag ENGINE_PLAYER_IS_FEMALE
- iftrue .Female
- applymovement2 PokeCenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesThreeStepsUp
- end
-
-.Female:
- applymovement2 PokeCenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight_2
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesTwoStepsUp
- opentext
- writetext Text_OhPleaseWait
- waitbutton
- closetext
- applymovement2 PokeCenter2FMovementData_ReceptionistLooksRight
- spriteface PLAYER, LEFT
- opentext
- writetext Text_ChangeTheLook
- waitbutton
- closetext
- playsound SFX_TINGLE
- applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
- writebyte (1 << 7) | (PAL_OW_RED << 4)
- special Special_SetPlayerPalette
- applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
- setflag ENGINE_KRIS_IN_CABLE_CLUB
- special ReplaceKrisSprite
- opentext
- writetext Text_LikeTheLook
- waitbutton
- closetext
- showemote EMOTE_SHOCK, PLAYER, 15
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepUp
- end
-
-Script_WalkOutOfLinkTradeRoom:
- checkflag ENGINE_KRIS_IN_CABLE_CLUB
- iftrue .Female
- applymovement POKECENTER2F_TRADE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_3
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesThreeStepsDown
- applymovement POKECENTER2F_TRADE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightAndDown
- end
-
-.Female:
- applymovement POKECENTER2F_TRADE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_3
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepDown_2
- clearflag ENGINE_KRIS_IN_CABLE_CLUB
- playsound SFX_TINGLE
- applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
- writebyte (1 << 7) | (PAL_OW_BLUE << 4)
- special Special_SetPlayerPalette
- applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
- special ReplaceKrisSprite
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesTwoStepsDown_2
- applymovement POKECENTER2F_TRADE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightAndDown
- end
-
-Script_WalkOutOfLinkBattleRoom:
- checkflag ENGINE_KRIS_IN_CABLE_CLUB
- iftrue .Female
- applymovement POKECENTER2F_BATTLE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_3
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesThreeStepsDown
- applymovement POKECENTER2F_BATTLE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightAndDown
- end
-
-.Female:
- applymovement POKECENTER2F_BATTLE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_3
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepDown_2
- clearflag ENGINE_KRIS_IN_CABLE_CLUB
- playsound SFX_TINGLE
- applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
- writebyte (1 << 7) | (PAL_OW_BLUE << 4)
- special Special_SetPlayerPalette
- applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
- special ReplaceKrisSprite
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesTwoStepsDown_2
- applymovement POKECENTER2F_BATTLE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightAndDown
- end
-
-TimeCapsuleScript_CheckPlayerGender:
- checkflag ENGINE_PLAYER_IS_FEMALE
- iftrue .Female
- checkcode VAR_FACING
- if_equal LEFT, .MaleFacingLeft
- if_equal RIGHT, .MaleFacingRight
- applymovement2 PokeCenter2FMovementData_ReceptionistStepsLeftLooksDown
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesTwoStepsUp_2
- end
-
-.MaleFacingLeft:
- applymovement2 PokeCenter2FMovementData_ReceptionistStepsLeftLooksDown
- applymovement PLAYER, PokeCenter2FMovementData_PlayerWalksLeftAndUp
- end
-
-.MaleFacingRight:
- applymovement2 PokeCenter2FMovementData_ReceptionistStepsRightLooksDown
- applymovement PLAYER, PokeCenter2FMovementData_PlayerWalksRightAndUp
- end
-
-.Female:
- checkcode VAR_FACING
- if_equal RIGHT, .FemaleFacingRight
- if_equal LEFT, .FemaleFacingLeft
- applymovement2 PokeCenter2FMovementData_ReceptionistStepsLeftLooksRight_2
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepUp_2
- jump .FemaleContinue
-
-.FemaleFacingRight:
- applymovement2 PokeCenter2FMovementData_ReceptionistStepsRightLooksLeft_2
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepRight
- jump .FemaleContinue
-
-.FemaleFacingLeft:
- applymovement2 PokeCenter2FMovementData_ReceptionistStepsLeftLooksRight_2
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepLeft
-.FemaleContinue:
- opentext
- writetext Text_OhPleaseWait
- waitbutton
- closetext
- checkcode VAR_FACING
- if_not_equal UP, .FemaleChangeApperance
- spriteface PLAYER, LEFT
-.FemaleChangeApperance:
- opentext
- writetext Text_ChangeTheLook
- waitbutton
- closetext
- playsound SFX_TINGLE
- applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
- writebyte (1 << 7) | (PAL_OW_RED << 4)
- special Special_SetPlayerPalette
- applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingDown
- faceperson PLAYER, POKECENTER2F_TIME_CAPSULE_RECEPTIONIST
- setflag ENGINE_KRIS_IN_CABLE_CLUB
- special ReplaceKrisSprite
- opentext
- writetext Text_LikeTheLook
- waitbutton
- closetext
- showemote EMOTE_SHOCK, PLAYER, 15
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepUp_2
- end
-
-Script_LeftTimeCapsule:
- special WaitForOtherPlayerToExit
- checkflag ENGINE_KRIS_IN_CABLE_CLUB
- iftrue .Female
- applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsLeftLooksRight
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesTwoStepsDown
- applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_2
- jump .Done
-
-.Female:
- applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsLeftLooksRight
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepDown
- clearflag ENGINE_KRIS_IN_CABLE_CLUB
- playsound SFX_TINGLE
- applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
- writebyte (1 << 7) | (PAL_OW_BLUE << 4)
- special Special_SetPlayerPalette
- applymovement PLAYER, PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
- special ReplaceKrisSprite
- applymovement PLAYER, PokeCenter2FMovementData_PlayerTakesOneStepDown
- applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_2
-.Done:
- dotrigger $0
- domaptrigger TIME_CAPSULE, $0
- end
-
-MapPokeCenter2FSignpost0Script:
- refreshscreen $0
- special Special_DisplayLinkRecord
- closetext
- end
-
-OfficerScript_0x192c9a:
- faceplayer
- opentext
- checkevent EVENT_MYSTERY_GIFT_DELIVERY_GUY
- iftrue .AlreadyGotGift
- writetext Text_MysteryGiftDeliveryGuy_Intro
- yesorno
- iffalse .RefusedGift
- writetext Text_MysteryGiftDeliveryGuy_HereYouGo
- buttonsound
- waitsfx
- special Special_GetMysteryGiftItem
- iffalse .BagIsFull
- itemnotify
- setevent EVENT_MYSTERY_GIFT_DELIVERY_GUY
-.AlreadyGotGift:
- writetext Text_MysteryGiftDeliveryGuy_Outro
- waitbutton
- closetext
- end
-
-.BagIsFull:
- writetext Text_MysteryGiftDeliveryGuy_NoRoom
- waitbutton
- closetext
- end
-
-.RefusedGift:
- writetext Text_MysteryGiftDeliveryGuy_SaidNo
- waitbutton
- closetext
- end
-
-PokeCenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight:
- slow_step UP
- slow_step LEFT
- turn_head RIGHT
- step_end
-
-PokeCenter2FMobileMobileMovementData_ReceptionistWalksUpAndLeft_LookDown:
- slow_step UP
- slow_step LEFT
- turn_head DOWN
- step_end
-
-PokeCenter2FMovementData_ReceptionistStepsLeftLooksDown:
- slow_step LEFT
- turn_head DOWN
- step_end
-
-PokeCenter2FMovementData_ReceptionistStepsRightLooksDown:
- slow_step RIGHT
- turn_head DOWN
- step_end
-
-PokeCenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight_2:
- slow_step UP
- slow_step LEFT
- turn_head RIGHT
- step_end
-
-PokeCenter2FMovementData_ReceptionistLooksRight:
- turn_head RIGHT
- step_end
-
-PokeCenter2FMovementData_PlayerTakesThreeStepsUp:
- step UP
- step UP
- step UP
- step_end
-
-PokeCenter2FMovementData_PlayerTakesTwoStepsUp:
- step UP
- step UP
- step_end
-
-PokeCenter2FMovementData_PlayerTakesOneStepUp:
- step UP
- step_end
-
-PokeCenter2FMobileMovementData_PlayerWalksIntoMobileBattleRoom:
- step UP
- step UP
- step RIGHT
- step UP
- step_end
-
-PokeCenter2FMovementData_PlayerTakesTwoStepsUp_2:
- step UP
- step UP
- step_end
-
-PokeCenter2FMovementData_PlayerWalksLeftAndUp:
- step LEFT
- step UP
- step_end
-
-PokeCenter2FMovementData_PlayerWalksRightAndUp:
- step RIGHT
- step UP
- step_end
-
-PokeCenter2FMovementData_PlayerTakesThreeStepsDown:
- step DOWN
- step DOWN
- step DOWN
- step_end
-
-PokeCenter2FMovementData_PlayerTakesTwoStepsDown:
- step DOWN
- step DOWN
- step_end
-
-PokeCenter2FMovementData_PlayerTakesOneStepDown:
- step DOWN
- step_end
-
-PokeCenter2FMovementData_ReceptionistStepsRightAndDown:
- slow_step RIGHT
- slow_step DOWN
- step_end
-
-PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_2:
- slow_step RIGHT
- turn_head DOWN
- step_end
-
-PokeCenter2FMovementData_ReceptionistStepsRightLooksDown_3:
- slow_step UP
- slow_step LEFT
- turn_head RIGHT
- step_end
-
-PokeCenter2FMovementData_ReceptionistStepsLeftLooksRight:
- slow_step LEFT
- turn_head RIGHT
- step_end
-
-PokeCenter2FMobileMovementData_ReceptionistWalksUpAndLeft:
- slow_step UP
- slow_step LEFT
- turn_head RIGHT
- step_end
-
-PokeCenter2FMovementData_PlayerWalksOutOfMobileRoom:
- step DOWN
- step LEFT
- step DOWN
- step DOWN
- step_end
-
-PokeCenter2FMobileMovementData_ReceptionistWalksRightAndDown:
- slow_step RIGHT
- slow_step DOWN
- step_end
-
-PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight:
- turn_head DOWN
- turn_head LEFT
- turn_head UP
- turn_head RIGHT
- step_end
-
-PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft:
- turn_head DOWN
- turn_head LEFT
- turn_head UP
- turn_head RIGHT
- turn_head LEFT
- step_end
-
-PokeCenter2FMovementData_PlayerSpinsClockwiseEndsFacingDown:
- turn_head DOWN
- turn_head LEFT
- turn_head UP
- turn_head RIGHT
- turn_head DOWN
- step_end
-
-PokeCenter2FMovementData_PlayerTakesOneStepDown_2:
- step DOWN
- step_end
-
-PokeCenter2FMovementData_PlayerTakesTwoStepsDown_2:
- step DOWN
- step DOWN
- step_end
-
-PokeCenter2FMovementData_PlayerTakesOneStepUp_2:
- step UP
- step_end
-
-PokeCenter2FMovementData_PlayerTakesOneStepRight:
- step RIGHT
- step_end
-
-PokeCenter2FMovementData_PlayerTakesOneStepLeft:
- step LEFT
- step_end
-
-PokeCenter2FMovementData_ReceptionistStepsLeftLooksRight_2:
- slow_step LEFT
- turn_head RIGHT
- step_end
-
-PokeCenter2FMovementData_ReceptionistStepsRightLooksLeft_2:
- slow_step RIGHT
- turn_head LEFT
- step_end
-
-Text_BattleReceptionistMobile:
- text "Would you like to"
- line "battle over a GAME"
-
- para "LINK cable or by"
- line "mobile phone?"
- done
-
-Text_TradeReceptionistMobile:
- text "Would you like to"
- line "trade over a GAME"
-
- para "LINK cable or by"
- line "mobile phone?"
- done
-
-Text_ThisWayToMobileRoom:
- text "This way to the"
- line "MOBILE ROOM."
- done
-
-Text_BattleReceptionistIntro:
- text "Welcome to CABLE"
- line "CLUB COLOSSEUM."
-
- para "You may battle a"
- line "friend here."
-
- para "Would you like to"
- line "battle?"
- done
-
-Text_TradeReceptionistIntro:
- text "Welcome to CABLE"
- line "TRADE CENTER."
-
- para "You may trade your"
- line "#MON here with"
- cont "a friend."
-
- para "Would you like to"
- line "trade?"
- done
-
-Text_TimeCapsuleReceptionistIntro:
- text "Welcome to CABLE"
- line "CLUB TIME CAPSULE."
-
- para "You can travel to"
- line "the past and trade"
- cont "your #MON."
-
- para "Would you like to"
- line "trade across time?"
- done
-
-Text_FriendNotReady:
- text "Your friend is not"
- line "ready."
- prompt
-
-Text_MustSaveGame:
- text "Before opening the"
- line "link, you must"
- cont "save your game."
- done
-
-Text_PleaseWait:
- text "Please wait."
- done
-
-Text_LinkTimedOut:
- text "The link has been"
- line "closed because of"
- cont "inactivity."
-
- para "Please contact"
- line "your friend and"
- cont "come again."
- prompt
-
-Text_PleaseComeAgain:
- text "Please come again."
- prompt
-
-Text_PleaseComeIn:
- text "Please come in."
- prompt
-
-Text_TemporaryStagingInLinkRoom:
- text "We'll put you in"
- line "the link room for"
- cont "the time being."
- done
-
-Text_CantLinkToThePast:
- text "You can't link to"
- line "the past here."
- prompt
-
-Text_IncompatibleRooms:
- text "Incompatible rooms"
- line "were chosen."
- prompt
-
-Text_PleaseComeIn2:
- text "Please come in."
- done
-
-Text_PleaseEnter:
- text "Please enter."
- prompt
-
-Text_RejectNewMon:
- text "Sorry--@"
- text_from_ram StringBuffer1
- text ""
- line "can't be taken."
- prompt
-
-Text_RejectMonWithNewMove:
- text "You can't take the"
- line "@"
- text_from_ram StringBuffer1
- text " with a"
- cont "@"
- text_from_ram StringBuffer2
- text "."
- prompt
-
-Text_RejectMonWithMail:
- text "You can't take the"
- line "@"
- text_from_ram StringBuffer1
- text " that"
- cont "has MAIL with you."
- prompt
-
-Text_TimeCapsuleClosed:
- text "I'm sorry--the"
- line "TIME CAPSULE is"
- cont "being adjusted."
- done
-
-Text_TradeRoomClosed:
- text "I'm sorry--the"
- line "TRADE MACHINE is"
- cont "being adjusted."
- done
-
-Text_BattleRoomClosed:
- text "I'm sorry--the"
- line "BATTLE MACHINE is"
- cont "being adjusted."
- done
-
-Text_MysteryGiftDeliveryGuy_Intro:
- text "Hello! You're"
- line "<PLAYER>, right?"
-
- para "I have some-"
- line "thing for you."
- done
-
-Text_MysteryGiftDeliveryGuy_HereYouGo:
- text "Here you go!"
- done
-
-Text_MysteryGiftDeliveryGuy_Outro:
- text "We hope to serve"
- line "you again."
- done
-
-Text_MysteryGiftDeliveryGuy_NoRoom:
- text "Oh, you have no"
- line "space for this."
-
- para "Stop in at any"
- line "#MON CENTER"
-
- para "across the country"
- line "to pick it up."
- done
-
-Text_MysteryGiftDeliveryGuy_SaidNo:
- text "No? That's very"
- line "strange…"
- done
-
-Text_OhPleaseWait:
- text "Oh, please wait."
- done
-
-Text_ChangeTheLook:
- text "We need to change"
- line "the look here…"
- done
-
-Text_LikeTheLook:
- text "How does this"
- line "style look to you?"
- done
-
-Text_BrokeStadiumRules:
- text "Excuse me!"
-
- para "For STADIUM rules,"
- line "please bring six"
-
- para "different #MON,"
- line "excluding EGGS."
-
- para "The six #MON"
- line "must be different."
-
- para "Also, they must"
- line "not be holding"
- cont "identical items."
-
- para "Please come back"
- line "when you're ready."
- done
-
-PokeCenter2F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 6
- warp_def $7, $0, -1, POKECENTER_2F
- warp_def $0, $5, 1, TRADE_CENTER
- warp_def $0, $9, 1, COLOSSEUM
- warp_def $2, $d, 1, TIME_CAPSULE
- warp_def $0, $6, 1, MOBILE_TRADE_ROOM_MOBILE
- warp_def $0, $a, 1, MOBILE_BATTLE_ROOM
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 1
- signpost 3, 7, SIGNPOST_READ, MapPokeCenter2FSignpost0Script
-
-.PersonEvents:
- db 4
- person_event SPRITE_LINK_RECEPTIONIST, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LinkReceptionistScript_Trade, -1
- person_event SPRITE_LINK_RECEPTIONIST, 2, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LinkReceptionistScript_Battle, -1
- person_event SPRITE_LINK_RECEPTIONIST, 3, 13, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LinkReceptionistScript_TimeCapsule, -1
- person_event SPRITE_OFFICER, 1, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, OfficerScript_0x192c9a, EVENT_MYSTERY_GIFT_DELIVERY_GUY
diff --git a/maps/PokeSeersHouse.asm b/maps/PokeSeersHouse.asm
index 40c039f83..0c79865aa 100644
--- a/maps/PokeSeersHouse.asm
+++ b/maps/PokeSeersHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const POKESEERSHOUSE_GRANNY
PokeSeersHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -25,12 +25,12 @@ PokeSeersHouse_MapEventHeader:
warp_def $7, $2, 7, CIANWOOD_CITY
warp_def $7, $3, 7, CIANWOOD_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_GRANNY, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, SeerScript, -1
+ object_event SPRITE_GRANNY, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SeerScript, -1
diff --git a/maps/PokeCenter1F.blk b/maps/Pokecenter1F.blk
index 6d4f1eca9..6d4f1eca9 100644
--- a/maps/PokeCenter1F.blk
+++ b/maps/Pokecenter1F.blk
diff --git a/maps/Pokecenter2F.asm b/maps/Pokecenter2F.asm
new file mode 100644
index 000000000..ad4682cc5
--- /dev/null
+++ b/maps/Pokecenter2F.asm
@@ -0,0 +1,1050 @@
+const_value set 2
+ const POKECENTER2F_TRADE_RECEPTIONIST
+ const POKECENTER2F_BATTLE_RECEPTIONIST
+ const POKECENTER2F_TIME_CAPSULE_RECEPTIONIST
+ const POKECENTER2F_OFFICER
+
+Pokecenter2F_MapScriptHeader:
+.SceneScripts:
+ db 6
+ scene_script .Scene0
+ scene_script .Scene1
+ scene_script .Scene2
+ scene_script .Scene3
+ scene_script .Scene4
+ scene_script .Scene5
+
+.MapCallbacks:
+ db 0
+
+.Scene0:
+ special Special_CheckMysteryGift
+ if_equal $0, .Scene0Done
+ clearevent EVENT_MYSTERY_GIFT_DELIVERY_GUY
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
+ iftrue .Scene0Done
+ priorityjump Pokecenter2F_AppearMysteryGiftDeliveryGuy
+
+.Scene0Done:
+ end
+
+.Scene1:
+ priorityjump Script_LeftCableTradeCenter
+ end
+
+.Scene2:
+ priorityjump Script_LeftCableColosseum
+ end
+
+.Scene3:
+ priorityjump Script_LeftTimeCapsule
+ end
+
+.Scene4:
+ priorityjump Script_LeftMobileTradeRoom
+ end
+
+.Scene5:
+ priorityjump Script_LeftMobileBattleRoom
+ end
+
+Pokecenter2F_AppearMysteryGiftDeliveryGuy:
+ appear POKECENTER2F_OFFICER
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
+ end
+
+Script_TradeCenterClosed:
+ faceplayer
+ opentext
+ writetext Text_TradeRoomClosed
+ waitbutton
+ closetext
+ end
+
+Script_BattleRoomClosed:
+ faceplayer
+ opentext
+ writetext Text_BattleRoomClosed
+ waitbutton
+ closetext
+ end
+
+LinkReceptionistScript_Trade:
+ checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
+ iffalse Script_TradeCenterClosed
+ opentext
+ writetext Text_TradeReceptionistIntro
+ yesorno
+ iffalse .Cancel
+ special Mobile_DummyReturnFalse ; always returns false
+ iffalse .NoMobile
+ writetext Text_TradeReceptionistMobile
+ special AskMobileOrCable
+ iffalse .Cancel
+ if_equal $1, .Mobile
+.NoMobile:
+ special Special_SetBitsForLinkTradeRequest
+ writetext Text_PleaseWait
+ special Special_WaitForLinkedFriend
+ iffalse .FriendNotReady
+ writetext Text_MustSaveGame
+ yesorno
+ iffalse .DidNotSave
+ special Special_TryQuickSave
+ iffalse .DidNotSave
+ writetext Text_PleaseWait
+ special Special_CheckLinkTimeout
+ iffalse .LinkTimedOut
+ copybytetovar wOtherPlayerLinkMode
+ iffalse .LinkedToFirstGen
+ special Special_CheckBothSelectedSameRoom
+ iffalse .IncompatibleRooms
+ writetext Text_PleaseComeIn2
+ waitbutton
+ closetext
+ scall Pokecenter2F_CheckGender
+ warpcheck
+ end
+
+.FriendNotReady:
+ special WaitForOtherPlayerToExit
+ writetext Text_FriendNotReady
+ closetext
+ end
+
+.LinkedToFirstGen:
+ special Special_FailedLinkToPast
+ writetext Text_CantLinkToThePast
+ special Special_CloseLink
+ closetext
+ end
+
+.IncompatibleRooms:
+ writetext Text_IncompatibleRooms
+ special Special_CloseLink
+ closetext
+ end
+
+.LinkTimedOut:
+ writetext Text_LinkTimedOut
+ jump .AbortLink
+
+.DidNotSave:
+ writetext Text_PleaseComeAgain
+.AbortLink:
+ special WaitForOtherPlayerToExit
+.Cancel:
+ closetext
+ end
+
+.Mobile:
+ scall .Mobile_TrySave
+ iftrue .Mobile_Abort
+ scall BattleTradeMobile_WalkIn
+ warpcheck
+ end
+
+.Mobile_Abort:
+ end
+
+.Mobile_TrySave:
+ writetext Text_MustSaveGame
+ yesorno
+ iffalse .Mobile_DidNotSave
+ special Special_TryQuickSave
+ iffalse .Mobile_DidNotSave
+ special Function1011f1
+ writetext Text_PleaseComeIn2
+ waitbutton
+ closetext
+ writebyte $0
+ end
+
+.Mobile_DidNotSave:
+ writetext Text_PleaseComeAgain
+ closetext
+ writebyte $1
+ end
+
+BattleTradeMobile_WalkIn:
+ applymovement2 Pokecenter2FMobileMobileMovementData_ReceptionistWalksUpAndLeft_LookDown
+ applymovement PLAYER, Pokecenter2FMobileMovementData_PlayerWalksIntoMobileBattleRoom
+ end
+
+LinkReceptionistScript_Battle:
+ checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
+ iffalse Script_BattleRoomClosed
+ opentext
+ writetext Text_BattleReceptionistIntro
+ yesorno
+ iffalse .Cancel
+ special Mobile_DummyReturnFalse ; always returns false
+ iffalse .NoMobile
+ writetext Text_BattleReceptionistMobile
+ special AskMobileOrCable
+ iffalse .Cancel
+ if_equal $1, .Mobile
+.NoMobile:
+ special Special_SetBitsForBattleRequest
+ writetext Text_PleaseWait
+ special Special_WaitForLinkedFriend
+ iffalse .FriendNotReady
+ writetext Text_MustSaveGame
+ yesorno
+ iffalse .DidNotSave
+ special Special_TryQuickSave
+ iffalse .DidNotSave
+ writetext Text_PleaseWait
+ special Special_CheckLinkTimeout
+ iffalse .LinkTimedOut
+ copybytetovar wOtherPlayerLinkMode
+ iffalse .LinkedToFirstGen
+ special Special_CheckBothSelectedSameRoom
+ iffalse .IncompatibleRooms
+ writetext Text_PleaseComeIn2
+ waitbutton
+ closetext
+ scall Pokecenter2F_CheckGender
+ warpcheck
+ end
+
+.FriendNotReady:
+ special WaitForOtherPlayerToExit
+ writetext Text_FriendNotReady
+ closetext
+ end
+
+.LinkedToFirstGen:
+ special Special_FailedLinkToPast
+ writetext Text_CantLinkToThePast
+ special Special_CloseLink
+ closetext
+ end
+
+.IncompatibleRooms:
+ writetext Text_IncompatibleRooms
+ special Special_CloseLink
+ closetext
+ end
+
+.LinkTimedOut:
+ writetext Text_LinkTimedOut
+ jump .AbortLink
+
+.DidNotSave:
+ writetext Text_PleaseComeAgain
+.AbortLink:
+ special WaitForOtherPlayerToExit
+.Cancel:
+ closetext
+ end
+
+.Mobile:
+ scall .SelectThreeMons
+ iffalse .Mobile_Abort
+ scall .Mobile_TrySave
+ iftrue .Mobile_Abort
+ scall BattleTradeMobile_WalkIn
+ warpcheck
+ end
+
+.Mobile_Abort:
+ end
+
+.Mobile_TrySave:
+ writetext Text_MustSaveGame
+ yesorno
+ iffalse .Mobile_DidNotSave
+ special Function103780
+ iffalse .Mobile_DidNotSave
+ special Function1011f1
+ writetext Text_PleaseComeIn2
+ waitbutton
+ closetext
+ writebyte $0
+ end
+
+.Mobile_DidNotSave:
+ writetext Text_PleaseComeAgain
+ closetext
+ writebyte $1
+ end
+
+.SelectThreeMons:
+ special Mobile_SelectThreeMons
+ iffalse .Mobile_DidNotSelect
+ if_equal $1, .Mobile_OK
+ if_equal $2, .Mobile_OK
+ if_equal $3, .Mobile_InvalidParty
+ jump .Mobile_DidNotSelect
+
+.Mobile_InvalidParty:
+ writetext Text_BrokeStadiumRules
+ waitbutton
+.Mobile_DidNotSelect:
+ closetext
+ writebyte $0
+ end
+
+.Mobile_OK:
+ writebyte $1
+ end
+
+Script_TimeCapsuleClosed:
+ faceplayer
+ opentext
+ writetext Text_TimeCapsuleClosed
+ waitbutton
+ closetext
+ end
+
+LinkReceptionistScript_TimeCapsule:
+ checkevent EVENT_MET_BILL
+ iftrue Script_TimeCapsuleClosed
+ checkflag ENGINE_TIME_CAPSULE
+ iftrue Script_TimeCapsuleClosed
+ special Special_SetBitsForTimeCapsuleRequest
+ faceplayer
+ opentext
+ writetext Text_TimeCapsuleReceptionistIntro
+ yesorno
+ iffalse .Cancel
+ special Special_CheckTimeCapsuleCompatibility
+ if_equal $1, .MonTooNew
+ if_equal $2, .MonMoveTooNew
+ if_equal $3, .MonHasMail
+ writetext Text_PleaseWait
+ special Special_WaitForLinkedFriend
+ iffalse .FriendNotReady
+ writetext Text_MustSaveGame
+ yesorno
+ iffalse .DidNotSave
+ special Special_TryQuickSave
+ iffalse .DidNotSave
+ writetext Text_PleaseWait
+ special Special_CheckLinkTimeout
+ iffalse .LinkTimedOut
+ copybytetovar wOtherPlayerLinkMode
+ iffalse .OK
+ special Special_CheckBothSelectedSameRoom
+ writetext Text_IncompatibleRooms
+ special Special_CloseLink
+ closetext
+ end
+
+.OK:
+ special Special_EnterTimeCapsule
+ writetext Text_PleaseComeIn2
+ waitbutton
+ closetext
+ scall TimeCapsuleScript_CheckPlayerGender
+ warpcheck
+ end
+
+.FriendNotReady:
+ special WaitForOtherPlayerToExit
+ writetext Text_FriendNotReady
+ closetext
+ end
+
+.LinkTimedOut:
+ writetext Text_LinkTimedOut
+ jump .Cancel
+
+.DidNotSave:
+ writetext Text_PleaseComeAgain
+.Cancel:
+ special WaitForOtherPlayerToExit
+ closetext
+ end
+
+.MonTooNew:
+ writetext Text_RejectNewMon
+ closetext
+ end
+
+.MonMoveTooNew:
+ writetext Text_RejectMonWithNewMove
+ closetext
+ end
+
+.MonHasMail:
+ writetext Text_RejectMonWithMail
+ closetext
+ end
+
+Script_LeftCableTradeCenter:
+ special WaitForOtherPlayerToExit
+ scall Script_WalkOutOfLinkTradeRoom
+ setscene $0
+ setmapscene TRADE_CENTER, $0
+ end
+
+Script_LeftMobileTradeRoom:
+ special Function101220
+ scall Script_WalkOutOfMobileTradeRoom
+ setscene $0
+ setmapscene MOBILE_TRADE_ROOM_MOBILE, $0
+ end
+
+Script_WalkOutOfMobileTradeRoom:
+ applymovement POKECENTER2F_TRADE_RECEPTIONIST, Pokecenter2FMobileMovementData_ReceptionistWalksUpAndLeft
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerWalksOutOfMobileRoom
+ applymovement POKECENTER2F_TRADE_RECEPTIONIST, Pokecenter2FMobileMovementData_ReceptionistWalksRightAndDown
+ end
+
+Script_LeftCableColosseum:
+ special WaitForOtherPlayerToExit
+ scall Script_WalkOutOfLinkBattleRoom
+ setscene $0
+ setmapscene COLOSSEUM, $0
+ end
+
+Script_LeftMobileBattleRoom:
+ special Function101220
+ scall Script_WalkOutOfMobileBattleRoom
+ setscene $0
+ setmapscene MOBILE_BATTLE_ROOM, $0
+ end
+
+Script_WalkOutOfMobileBattleRoom:
+ applymovement POKECENTER2F_BATTLE_RECEPTIONIST, Pokecenter2FMobileMovementData_ReceptionistWalksUpAndLeft
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerWalksOutOfMobileRoom
+ applymovement POKECENTER2F_BATTLE_RECEPTIONIST, Pokecenter2FMobileMovementData_ReceptionistWalksRightAndDown
+ end
+
+Pokecenter2F_CheckGender:
+ checkflag ENGINE_PLAYER_IS_FEMALE
+ iftrue .Female
+ applymovement2 Pokecenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesThreeStepsUp
+ end
+
+.Female:
+ applymovement2 Pokecenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight_2
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsUp
+ opentext
+ writetext Text_OhPleaseWait
+ waitbutton
+ closetext
+ applymovement2 Pokecenter2FMovementData_ReceptionistLooksRight
+ spriteface PLAYER, LEFT
+ opentext
+ writetext Text_ChangeTheLook
+ waitbutton
+ closetext
+ playsound SFX_TINGLE
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
+ writebyte (PAL_NPC_RED << 4)
+ special Special_SetPlayerPalette
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
+ setflag ENGINE_KRIS_IN_CABLE_CLUB
+ special ReplaceKrisSprite
+ opentext
+ writetext Text_LikeTheLook
+ waitbutton
+ closetext
+ showemote EMOTE_SHOCK, PLAYER, 15
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepUp
+ end
+
+Script_WalkOutOfLinkTradeRoom:
+ checkflag ENGINE_KRIS_IN_CABLE_CLUB
+ iftrue .Female
+ applymovement POKECENTER2F_TRADE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_3
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesThreeStepsDown
+ applymovement POKECENTER2F_TRADE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightAndDown
+ end
+
+.Female:
+ applymovement POKECENTER2F_TRADE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_3
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepDown_2
+ clearflag ENGINE_KRIS_IN_CABLE_CLUB
+ playsound SFX_TINGLE
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
+ writebyte (PAL_NPC_BLUE << 4)
+ special Special_SetPlayerPalette
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
+ special ReplaceKrisSprite
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsDown_2
+ applymovement POKECENTER2F_TRADE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightAndDown
+ end
+
+Script_WalkOutOfLinkBattleRoom:
+ checkflag ENGINE_KRIS_IN_CABLE_CLUB
+ iftrue .Female
+ applymovement POKECENTER2F_BATTLE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_3
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesThreeStepsDown
+ applymovement POKECENTER2F_BATTLE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightAndDown
+ end
+
+.Female:
+ applymovement POKECENTER2F_BATTLE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_3
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepDown_2
+ clearflag ENGINE_KRIS_IN_CABLE_CLUB
+ playsound SFX_TINGLE
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
+ writebyte (PAL_NPC_BLUE << 4)
+ special Special_SetPlayerPalette
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
+ special ReplaceKrisSprite
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsDown_2
+ applymovement POKECENTER2F_BATTLE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightAndDown
+ end
+
+TimeCapsuleScript_CheckPlayerGender:
+ checkflag ENGINE_PLAYER_IS_FEMALE
+ iftrue .Female
+ checkcode VAR_FACING
+ if_equal LEFT, .MaleFacingLeft
+ if_equal RIGHT, .MaleFacingRight
+ applymovement2 Pokecenter2FMovementData_ReceptionistStepsLeftLooksDown
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsUp_2
+ end
+
+.MaleFacingLeft:
+ applymovement2 Pokecenter2FMovementData_ReceptionistStepsLeftLooksDown
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerWalksLeftAndUp
+ end
+
+.MaleFacingRight:
+ applymovement2 Pokecenter2FMovementData_ReceptionistStepsRightLooksDown
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerWalksRightAndUp
+ end
+
+.Female:
+ checkcode VAR_FACING
+ if_equal RIGHT, .FemaleFacingRight
+ if_equal LEFT, .FemaleFacingLeft
+ applymovement2 Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight_2
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepUp_2
+ jump .FemaleContinue
+
+.FemaleFacingRight:
+ applymovement2 Pokecenter2FMovementData_ReceptionistStepsRightLooksLeft_2
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepRight
+ jump .FemaleContinue
+
+.FemaleFacingLeft:
+ applymovement2 Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight_2
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepLeft
+.FemaleContinue:
+ opentext
+ writetext Text_OhPleaseWait
+ waitbutton
+ closetext
+ checkcode VAR_FACING
+ if_not_equal UP, .FemaleChangeApperance
+ spriteface PLAYER, LEFT
+.FemaleChangeApperance:
+ opentext
+ writetext Text_ChangeTheLook
+ waitbutton
+ closetext
+ playsound SFX_TINGLE
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
+ writebyte (PAL_NPC_RED << 4)
+ special Special_SetPlayerPalette
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingDown
+ faceobject PLAYER, POKECENTER2F_TIME_CAPSULE_RECEPTIONIST
+ setflag ENGINE_KRIS_IN_CABLE_CLUB
+ special ReplaceKrisSprite
+ opentext
+ writetext Text_LikeTheLook
+ waitbutton
+ closetext
+ showemote EMOTE_SHOCK, PLAYER, 15
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepUp_2
+ end
+
+Script_LeftTimeCapsule:
+ special WaitForOtherPlayerToExit
+ checkflag ENGINE_KRIS_IN_CABLE_CLUB
+ iftrue .Female
+ applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsDown
+ applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_2
+ jump .Done
+
+.Female:
+ applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepDown
+ clearflag ENGINE_KRIS_IN_CABLE_CLUB
+ playsound SFX_TINGLE
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight
+ writebyte (PAL_NPC_BLUE << 4)
+ special Special_SetPlayerPalette
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft
+ special ReplaceKrisSprite
+ applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepDown
+ applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_2
+.Done:
+ setscene $0
+ setmapscene TIME_CAPSULE, $0
+ end
+
+MapPokecenter2FSignpost0Script:
+ refreshscreen $0
+ special Special_DisplayLinkRecord
+ closetext
+ end
+
+OfficerScript_0x192c9a:
+ faceplayer
+ opentext
+ checkevent EVENT_MYSTERY_GIFT_DELIVERY_GUY
+ iftrue .AlreadyGotGift
+ writetext Text_MysteryGiftDeliveryGuy_Intro
+ yesorno
+ iffalse .RefusedGift
+ writetext Text_MysteryGiftDeliveryGuy_HereYouGo
+ buttonsound
+ waitsfx
+ special Special_GetMysteryGiftItem
+ iffalse .BagIsFull
+ itemnotify
+ setevent EVENT_MYSTERY_GIFT_DELIVERY_GUY
+.AlreadyGotGift:
+ writetext Text_MysteryGiftDeliveryGuy_Outro
+ waitbutton
+ closetext
+ end
+
+.BagIsFull:
+ writetext Text_MysteryGiftDeliveryGuy_NoRoom
+ waitbutton
+ closetext
+ end
+
+.RefusedGift:
+ writetext Text_MysteryGiftDeliveryGuy_SaidNo
+ waitbutton
+ closetext
+ end
+
+Pokecenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight:
+ slow_step UP
+ slow_step LEFT
+ turn_head RIGHT
+ step_end
+
+Pokecenter2FMobileMobileMovementData_ReceptionistWalksUpAndLeft_LookDown:
+ slow_step UP
+ slow_step LEFT
+ turn_head DOWN
+ step_end
+
+Pokecenter2FMovementData_ReceptionistStepsLeftLooksDown:
+ slow_step LEFT
+ turn_head DOWN
+ step_end
+
+Pokecenter2FMovementData_ReceptionistStepsRightLooksDown:
+ slow_step RIGHT
+ turn_head DOWN
+ step_end
+
+Pokecenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight_2:
+ slow_step UP
+ slow_step LEFT
+ turn_head RIGHT
+ step_end
+
+Pokecenter2FMovementData_ReceptionistLooksRight:
+ turn_head RIGHT
+ step_end
+
+Pokecenter2FMovementData_PlayerTakesThreeStepsUp:
+ step UP
+ step UP
+ step UP
+ step_end
+
+Pokecenter2FMovementData_PlayerTakesTwoStepsUp:
+ step UP
+ step UP
+ step_end
+
+Pokecenter2FMovementData_PlayerTakesOneStepUp:
+ step UP
+ step_end
+
+Pokecenter2FMobileMovementData_PlayerWalksIntoMobileBattleRoom:
+ step UP
+ step UP
+ step RIGHT
+ step UP
+ step_end
+
+Pokecenter2FMovementData_PlayerTakesTwoStepsUp_2:
+ step UP
+ step UP
+ step_end
+
+Pokecenter2FMovementData_PlayerWalksLeftAndUp:
+ step LEFT
+ step UP
+ step_end
+
+Pokecenter2FMovementData_PlayerWalksRightAndUp:
+ step RIGHT
+ step UP
+ step_end
+
+Pokecenter2FMovementData_PlayerTakesThreeStepsDown:
+ step DOWN
+ step DOWN
+ step DOWN
+ step_end
+
+Pokecenter2FMovementData_PlayerTakesTwoStepsDown:
+ step DOWN
+ step DOWN
+ step_end
+
+Pokecenter2FMovementData_PlayerTakesOneStepDown:
+ step DOWN
+ step_end
+
+Pokecenter2FMovementData_ReceptionistStepsRightAndDown:
+ slow_step RIGHT
+ slow_step DOWN
+ step_end
+
+Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_2:
+ slow_step RIGHT
+ turn_head DOWN
+ step_end
+
+Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_3:
+ slow_step UP
+ slow_step LEFT
+ turn_head RIGHT
+ step_end
+
+Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight:
+ slow_step LEFT
+ turn_head RIGHT
+ step_end
+
+Pokecenter2FMobileMovementData_ReceptionistWalksUpAndLeft:
+ slow_step UP
+ slow_step LEFT
+ turn_head RIGHT
+ step_end
+
+Pokecenter2FMovementData_PlayerWalksOutOfMobileRoom:
+ step DOWN
+ step LEFT
+ step DOWN
+ step DOWN
+ step_end
+
+Pokecenter2FMobileMovementData_ReceptionistWalksRightAndDown:
+ slow_step RIGHT
+ slow_step DOWN
+ step_end
+
+Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight:
+ turn_head DOWN
+ turn_head LEFT
+ turn_head UP
+ turn_head RIGHT
+ step_end
+
+Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft:
+ turn_head DOWN
+ turn_head LEFT
+ turn_head UP
+ turn_head RIGHT
+ turn_head LEFT
+ step_end
+
+Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingDown:
+ turn_head DOWN
+ turn_head LEFT
+ turn_head UP
+ turn_head RIGHT
+ turn_head DOWN
+ step_end
+
+Pokecenter2FMovementData_PlayerTakesOneStepDown_2:
+ step DOWN
+ step_end
+
+Pokecenter2FMovementData_PlayerTakesTwoStepsDown_2:
+ step DOWN
+ step DOWN
+ step_end
+
+Pokecenter2FMovementData_PlayerTakesOneStepUp_2:
+ step UP
+ step_end
+
+Pokecenter2FMovementData_PlayerTakesOneStepRight:
+ step RIGHT
+ step_end
+
+Pokecenter2FMovementData_PlayerTakesOneStepLeft:
+ step LEFT
+ step_end
+
+Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight_2:
+ slow_step LEFT
+ turn_head RIGHT
+ step_end
+
+Pokecenter2FMovementData_ReceptionistStepsRightLooksLeft_2:
+ slow_step RIGHT
+ turn_head LEFT
+ step_end
+
+Text_BattleReceptionistMobile:
+ text "Would you like to"
+ line "battle over a GAME"
+
+ para "LINK cable or by"
+ line "mobile phone?"
+ done
+
+Text_TradeReceptionistMobile:
+ text "Would you like to"
+ line "trade over a GAME"
+
+ para "LINK cable or by"
+ line "mobile phone?"
+ done
+
+Text_ThisWayToMobileRoom:
+ text "This way to the"
+ line "MOBILE ROOM."
+ done
+
+Text_BattleReceptionistIntro:
+ text "Welcome to CABLE"
+ line "CLUB COLOSSEUM."
+
+ para "You may battle a"
+ line "friend here."
+
+ para "Would you like to"
+ line "battle?"
+ done
+
+Text_TradeReceptionistIntro:
+ text "Welcome to CABLE"
+ line "TRADE CENTER."
+
+ para "You may trade your"
+ line "#MON here with"
+ cont "a friend."
+
+ para "Would you like to"
+ line "trade?"
+ done
+
+Text_TimeCapsuleReceptionistIntro:
+ text "Welcome to CABLE"
+ line "CLUB TIME CAPSULE."
+
+ para "You can travel to"
+ line "the past and trade"
+ cont "your #MON."
+
+ para "Would you like to"
+ line "trade across time?"
+ done
+
+Text_FriendNotReady:
+ text "Your friend is not"
+ line "ready."
+ prompt
+
+Text_MustSaveGame:
+ text "Before opening the"
+ line "link, you must"
+ cont "save your game."
+ done
+
+Text_PleaseWait:
+ text "Please wait."
+ done
+
+Text_LinkTimedOut:
+ text "The link has been"
+ line "closed because of"
+ cont "inactivity."
+
+ para "Please contact"
+ line "your friend and"
+ cont "come again."
+ prompt
+
+Text_PleaseComeAgain:
+ text "Please come again."
+ prompt
+
+Text_PleaseComeIn:
+ text "Please come in."
+ prompt
+
+Text_TemporaryStagingInLinkRoom:
+ text "We'll put you in"
+ line "the link room for"
+ cont "the time being."
+ done
+
+Text_CantLinkToThePast:
+ text "You can't link to"
+ line "the past here."
+ prompt
+
+Text_IncompatibleRooms:
+ text "Incompatible rooms"
+ line "were chosen."
+ prompt
+
+Text_PleaseComeIn2:
+ text "Please come in."
+ done
+
+Text_PleaseEnter:
+ text "Please enter."
+ prompt
+
+Text_RejectNewMon:
+ text "Sorry--@"
+ text_from_ram StringBuffer1
+ text ""
+ line "can't be taken."
+ prompt
+
+Text_RejectMonWithNewMove:
+ text "You can't take the"
+ line "@"
+ text_from_ram StringBuffer1
+ text " with a"
+ cont "@"
+ text_from_ram StringBuffer2
+ text "."
+ prompt
+
+Text_RejectMonWithMail:
+ text "You can't take the"
+ line "@"
+ text_from_ram StringBuffer1
+ text " that"
+ cont "has MAIL with you."
+ prompt
+
+Text_TimeCapsuleClosed:
+ text "I'm sorry--the"
+ line "TIME CAPSULE is"
+ cont "being adjusted."
+ done
+
+Text_TradeRoomClosed:
+ text "I'm sorry--the"
+ line "TRADE MACHINE is"
+ cont "being adjusted."
+ done
+
+Text_BattleRoomClosed:
+ text "I'm sorry--the"
+ line "BATTLE MACHINE is"
+ cont "being adjusted."
+ done
+
+Text_MysteryGiftDeliveryGuy_Intro:
+ text "Hello! You're"
+ line "<PLAYER>, right?"
+
+ para "I have some-"
+ line "thing for you."
+ done
+
+Text_MysteryGiftDeliveryGuy_HereYouGo:
+ text "Here you go!"
+ done
+
+Text_MysteryGiftDeliveryGuy_Outro:
+ text "We hope to serve"
+ line "you again."
+ done
+
+Text_MysteryGiftDeliveryGuy_NoRoom:
+ text "Oh, you have no"
+ line "space for this."
+
+ para "Stop in at any"
+ line "#MON CENTER"
+
+ para "across the country"
+ line "to pick it up."
+ done
+
+Text_MysteryGiftDeliveryGuy_SaidNo:
+ text "No? That's very"
+ line "strange…"
+ done
+
+Text_OhPleaseWait:
+ text "Oh, please wait."
+ done
+
+Text_ChangeTheLook:
+ text "We need to change"
+ line "the look here…"
+ done
+
+Text_LikeTheLook:
+ text "How does this"
+ line "style look to you?"
+ done
+
+Text_BrokeStadiumRules:
+ text "Excuse me!"
+
+ para "For STADIUM rules,"
+ line "please bring six"
+
+ para "different #MON,"
+ line "excluding EGGS."
+
+ para "The six #MON"
+ line "must be different."
+
+ para "Also, they must"
+ line "not be holding"
+ cont "identical items."
+
+ para "Please come back"
+ line "when you're ready."
+ done
+
+Pokecenter2F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 6
+ warp_def $7, $0, -1, POKECENTER_2F
+ warp_def $0, $5, 1, TRADE_CENTER
+ warp_def $0, $9, 1, COLOSSEUM
+ warp_def $2, $d, 1, TIME_CAPSULE
+ warp_def $0, $6, 1, MOBILE_TRADE_ROOM_MOBILE
+ warp_def $0, $a, 1, MOBILE_BATTLE_ROOM
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 1
+ bg_event 3, 7, BGEVENT_READ, MapPokecenter2FSignpost0Script
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_LINK_RECEPTIONIST, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, LinkReceptionistScript_Trade, -1
+ object_event SPRITE_LINK_RECEPTIONIST, 2, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, LinkReceptionistScript_Battle, -1
+ object_event SPRITE_LINK_RECEPTIONIST, 3, 13, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, LinkReceptionistScript_TimeCapsule, -1
+ object_event SPRITE_OFFICER, 1, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x192c9a, EVENT_MYSTERY_GIFT_DELIVERY_GUY
diff --git a/maps/PokeCenter2F.blk b/maps/Pokecenter2F.blk
index 968f746e6..968f746e6 100644
--- a/maps/PokeCenter2F.blk
+++ b/maps/Pokecenter2F.blk
diff --git a/maps/PokemonFanClub.asm b/maps/PokemonFanClub.asm
index 7424f9b73..db04c88fd 100644
--- a/maps/PokemonFanClub.asm
+++ b/maps/PokemonFanClub.asm
@@ -7,7 +7,7 @@ const_value set 2
const POKEMONFANCLUB_ODDISH
PokemonFanClub_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -49,8 +49,8 @@ UnknownScript_0x19181f:
closetext
end
-ReceptionistScript_0x191821:
- jumptextfaceplayer UnknownText_0x191b6d
+PokemonFanClubReceptionistScript:
+ jumptextfaceplayer PokemonFanClubReceptionistText
FisherScript_0x191824:
faceplayer
@@ -100,8 +100,8 @@ UnknownScript_0x191865:
closetext
end
-TeacherScript_0x19186b:
- jumptextfaceplayer UnknownText_0x191d73
+PokemonFanClubTeacherScript:
+ jumptextfaceplayer PokemonFanClubTeacherText
ClefairyDoll:
jumptext ClefairyDollText
@@ -199,7 +199,7 @@ UnknownText_0x191b38:
line "want to listen."
done
-UnknownText_0x191b6d:
+PokemonFanClubReceptionistText:
text "Our CHAIRMAN is"
line "very vocal when it"
cont "comes to #MON…"
@@ -264,7 +264,7 @@ UnknownText_0x191d58:
line "jammed full."
done
-UnknownText_0x191d73:
+PokemonFanClubTeacherText:
text "Look at my darling"
line "BAYLEEF!"
@@ -305,19 +305,19 @@ PokemonFanClub_MapEventHeader:
warp_def $7, $2, 3, VERMILION_CITY
warp_def $7, $3, 3, VERMILION_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 7, SIGNPOST_READ, MapPokemonFanClubSignpost0Script
- signpost 0, 9, SIGNPOST_READ, MapPokemonFanClubSignpost1Script
+ bg_event 0, 7, BGEVENT_READ, MapPokemonFanClubSignpost0Script
+ bg_event 0, 9, BGEVENT_READ, MapPokemonFanClubSignpost1Script
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_GENTLEMAN, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x1917e9, -1
- person_event SPRITE_RECEPTIONIST, 1, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ReceptionistScript_0x191821, -1
- person_event SPRITE_FISHER, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FisherScript_0x191824, -1
- person_event SPRITE_TEACHER, 2, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TeacherScript_0x19186b, -1
- person_event SPRITE_FAIRY, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClefairyDoll, EVENT_VERMILION_FAN_CLUB_DOLL
- person_event SPRITE_ODDISH, 3, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FanClubBayleef, -1
+ object_event SPRITE_GENTLEMAN, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GentlemanScript_0x1917e9, -1
+ object_event SPRITE_RECEPTIONIST, 1, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PokemonFanClubReceptionistScript, -1
+ object_event SPRITE_FISHER, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FisherScript_0x191824, -1
+ object_event SPRITE_TEACHER, 2, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PokemonFanClubTeacherScript, -1
+ object_event SPRITE_FAIRY, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClefairyDoll, EVENT_VERMILION_FAN_CLUB_DOLL
+ object_event SPRITE_ODDISH, 3, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, FanClubBayleef, -1
diff --git a/maps/PowerPlant.asm b/maps/PowerPlant.asm
index 62a539eb3..9445f4c97 100644
--- a/maps/PowerPlant.asm
+++ b/maps/PowerPlant.asm
@@ -8,20 +8,18 @@ const_value set 2
const POWERPLANT_FOREST
PowerPlant_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x188dc3, 0
- dw UnknownScript_0x188dc4, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 0
-UnknownScript_0x188dc3:
+.DummyScene0:
end
-UnknownScript_0x188dc4:
+.DummyScene1:
end
PowerPlantGuardPhoneScript:
@@ -44,7 +42,7 @@ PowerPlantGuardPhoneScript:
closetext
spriteface PLAYER, DOWN
applymovement POWERPLANT_OFFICER1, MovementData_0x188eda
- dotrigger $0
+ setscene $0
end
OfficerScript_0x188df5:
@@ -150,8 +148,8 @@ PowerPlantManager:
setevent EVENT_MET_MANAGER_AT_POWER_PLANT
clearevent EVENT_CERULEAN_GYM_ROCKET
clearevent EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM
- domaptrigger CERULEAN_GYM, $1
- dotrigger $1
+ setmapscene CERULEAN_GYM, $1
+ setscene $1
end
UnknownScript_0x188e8d:
@@ -193,7 +191,7 @@ UnknownScript_0x188ec5:
Forest:
faceplayer
opentext
- trade $6
+ trade NPCTRADE_FOREST
waitbutton
closetext
end
@@ -399,21 +397,21 @@ PowerPlant_MapEventHeader:
warp_def $11, $2, 2, ROUTE_10_NORTH
warp_def $11, $3, 2, ROUTE_10_NORTH
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 1, $c, $5, $0, PowerPlantGuardPhoneScript, $0, $0
+ coord_event 1, $c, $5, PowerPlantGuardPhoneScript
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, PowerPlantBookshelf
- signpost 1, 1, SIGNPOST_READ, PowerPlantBookshelf
+ bg_event 1, 0, BGEVENT_READ, PowerPlantBookshelf
+ bg_event 1, 1, BGEVENT_READ, PowerPlantBookshelf
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_OFFICER, 14, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, OfficerScript_0x188df5, -1
- person_event SPRITE_GYM_GUY, 9, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GymGuyScript_0x188e15, -1
- person_event SPRITE_GYM_GUY, 11, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GymGuyScript_0x188e29, -1
- person_event SPRITE_OFFICER, 3, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, OfficerScript_0x188e3d, -1
- person_event SPRITE_GYM_GUY, 2, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GymGuyScript_0x188e51, -1
- person_event SPRITE_FISHER, 10, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PowerPlantManager, -1
- person_event SPRITE_GYM_GUY, 5, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, Forest, -1
+ object_event SPRITE_OFFICER, 14, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x188df5, -1
+ object_event SPRITE_GYM_GUY, 9, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GymGuyScript_0x188e15, -1
+ object_event SPRITE_GYM_GUY, 11, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GymGuyScript_0x188e29, -1
+ object_event SPRITE_OFFICER, 3, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x188e3d, -1
+ object_event SPRITE_GYM_GUY, 2, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GymGuyScript_0x188e51, -1
+ object_event SPRITE_FISHER, 10, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, PowerPlantManager, -1
+ object_event SPRITE_GYM_GUY, 5, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Forest, -1
diff --git a/maps/RadioTower1F.asm b/maps/RadioTower1F.asm
index 4e670be07..56e1b0510 100644
--- a/maps/RadioTower1F.asm
+++ b/maps/RadioTower1F.asm
@@ -7,7 +7,7 @@ const_value set 2
const RADIOTOWER1F_COOLTRAINER_F
RadioTower1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -179,19 +179,19 @@ UnknownScript_0x5ce4b:
closetext
end
-LassScript_0x5ce51:
- jumptextfaceplayer UnknownText_0x5d476
+RadioTower1FLassScript:
+ jumptextfaceplayer RadioTower1FLassText
-YoungsterScript_0x5ce54:
- jumptextfaceplayer UnknownText_0x5d4ac
+RadioTower1FYoungsterScript:
+ jumptextfaceplayer RadioTower1FYoungsterText
TrainerGruntM3:
- trainer EVENT_BEAT_ROCKET_GRUNTM_3, GRUNTM, GRUNTM_3, GruntM3SeenText, GruntM3BeatenText, 0, GruntM3Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_3, GRUNTM, GRUNTM_3, GruntM3SeenText, GruntM3BeatenText, 0, .Script
-GruntM3Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5d5a2
+ writetext GruntM3AfterBattleText
waitbutton
closetext
end
@@ -405,7 +405,7 @@ UnknownText_0x5d443:
cont "change your mind."
done
-UnknownText_0x5d476:
+RadioTower1FLassText:
text "BEN is a fabulous"
line "DJ."
@@ -413,7 +413,7 @@ UnknownText_0x5d476:
line "makes me melt!"
done
-UnknownText_0x5d4ac:
+RadioTower1FYoungsterText:
text "I love MARY, from"
line "#MON TALK."
@@ -442,7 +442,7 @@ GruntM3BeatenText:
line "must watch you…"
done
-UnknownText_0x5d5a2:
+GruntM3AfterBattleText:
text "You're too strong."
para "Our plan could be"
@@ -482,19 +482,19 @@ RadioTower1F_MapEventHeader:
warp_def $7, $3, 11, GOLDENROD_CITY
warp_def $0, $f, 2, RADIO_TOWER_2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 3, SIGNPOST_READ, MapRadioTower1FSignpost0Script
- signpost 0, 13, SIGNPOST_READ, MapRadioTower1FSignpost1Script
+ bg_event 0, 3, BGEVENT_READ, MapRadioTower1FSignpost0Script
+ bg_event 0, 13, BGEVENT_READ, MapRadioTower1FSignpost1Script
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_RECEPTIONIST, 6, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ReceptionistScript_0x5cd29, -1
- person_event SPRITE_LASS, 4, 16, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, LassScript_0x5ce51, EVENT_GOLDENROD_CITY_CIVILIANS
- person_event SPRITE_YOUNGSTER, 4, 15, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x5ce54, EVENT_GOLDENROD_CITY_CIVILIANS
- person_event SPRITE_ROCKET, 1, 14, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM3, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_GENTLEMAN, 6, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x5cd3d, EVENT_GOLDENROD_CITY_CIVILIANS
- person_event SPRITE_COOLTRAINER_F, 6, 12, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x5cdd5, EVENT_GOLDENROD_CITY_CIVILIANS
+ object_event SPRITE_RECEPTIONIST, 6, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ReceptionistScript_0x5cd29, -1
+ object_event SPRITE_LASS, 4, 16, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, RadioTower1FLassScript, EVENT_GOLDENROD_CITY_CIVILIANS
+ object_event SPRITE_YOUNGSTER, 4, 15, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RadioTower1FYoungsterScript, EVENT_GOLDENROD_CITY_CIVILIANS
+ object_event SPRITE_ROCKET, 1, 14, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM3, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_GENTLEMAN, 6, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GentlemanScript_0x5cd3d, EVENT_GOLDENROD_CITY_CIVILIANS
+ object_event SPRITE_COOLTRAINER_F, 6, 12, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CooltrainerFScript_0x5cdd5, EVENT_GOLDENROD_CITY_CIVILIANS
diff --git a/maps/RadioTower2F.asm b/maps/RadioTower2F.asm
index 5925532e9..bf267dc67 100644
--- a/maps/RadioTower2F.asm
+++ b/maps/RadioTower2F.asm
@@ -12,7 +12,7 @@ const_value set 2
const RADIOTOWER2F_RECEPTIONIST
RadioTower2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -21,8 +21,8 @@ RadioTower2F_MapScriptHeader:
UnknownScript_0x5d6fd:
end
-SuperNerdScript_0x5d6fe:
- jumptextfaceplayer UnknownText_0x5d924
+RadioTower2FSuperNerdScript:
+ jumptextfaceplayer RadioTower2FSuperNerdText
TeacherScript_0x5d701:
faceplayer
@@ -48,52 +48,52 @@ RadioTowerJigglypuff:
closetext
end
-BlackBeltScript_0x5d71f:
- jumptextfaceplayer UnknownText_0x5d9cb
+RadioTower2FBlackBelt1Script:
+ jumptextfaceplayer RadioTower2FBlackBelt1Text
-BlackBeltScript_0x5d722:
- jumptextfaceplayer UnknownText_0x5da44
+RadioTower2FBlackBelt2Script:
+ jumptextfaceplayer RadioTower2FBlackBelt2Text
TrainerGruntM4:
- trainer EVENT_BEAT_ROCKET_GRUNTM_4, GRUNTM, GRUNTM_4, GruntM4SeenText, GruntM4BeatenText, 0, GruntM4Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_4, GRUNTM, GRUNTM_4, GruntM4SeenText, GruntM4BeatenText, 0, .Script
-GruntM4Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5db07
+ writetext GruntM4AfterBattleText
waitbutton
closetext
end
TrainerGruntM5:
- trainer EVENT_BEAT_ROCKET_GRUNTM_5, GRUNTM, GRUNTM_5, GruntM5SeenText, GruntM5BeatenText, 0, GruntM5Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_5, GRUNTM, GRUNTM_5, GruntM5SeenText, GruntM5BeatenText, 0, .Script
-GruntM5Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5db99
+ writetext GruntM5AfterBattleText
waitbutton
closetext
end
TrainerGruntM6:
- trainer EVENT_BEAT_ROCKET_GRUNTM_6, GRUNTM, GRUNTM_6, GruntM6SeenText, GruntM6BeatenText, 0, GruntM6Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_6, GRUNTM, GRUNTM_6, GruntM6SeenText, GruntM6BeatenText, 0, .Script
-GruntM6Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5dc00
+ writetext GruntM6AfterBattleText
waitbutton
closetext
end
TrainerGruntF2:
- trainer EVENT_BEAT_ROCKET_GRUNTF_2, GRUNTF, GRUNTF_2, GruntF2SeenText, GruntF2BeatenText, 0, GruntF2Script
+ trainer EVENT_BEAT_ROCKET_GRUNTF_2, GRUNTF, GRUNTF_2, GruntF2SeenText, GruntF2BeatenText, 0, .Script
-GruntF2Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5dcd0
+ writetext GruntF2AfterBattleText
waitbutton
closetext
end
@@ -343,7 +343,7 @@ MovementData_0x5d921:
slow_step RIGHT
step_end
-UnknownText_0x5d924:
+RadioTower2FSuperNerdText:
text "You can listen to"
line "the radio any-"
cont "where. Tune in!"
@@ -366,7 +366,7 @@ RadioTowerJigglypuffText:
line "Jiggly…"
done
-UnknownText_0x5d9cb:
+RadioTower2FBlackBelt1Text:
text "Sorry. Authorized"
line "personnel only"
cont "beyond this point."
@@ -379,7 +379,7 @@ UnknownText_0x5d9cb:
cont "DIRECTOR…"
done
-UnknownText_0x5da44:
+RadioTower2FBlackBelt2Text:
text "Feel free to look"
line "around anywhere."
@@ -402,7 +402,7 @@ GruntM4BeatenText:
line "cute!"
done
-UnknownText_0x5db07:
+GruntM4AfterBattleText:
text "We won't let you"
line "ruin our plans"
cont "for our comeback!"
@@ -422,7 +422,7 @@ GruntM5BeatenText:
line "hero?"
done
-UnknownText_0x5db99:
+GruntM5AfterBattleText:
text "We're not always"
line "evil. We just do"
cont "whatever we like."
@@ -437,7 +437,7 @@ GruntM6BeatenText:
text "Arggh. I give up."
done
-UnknownText_0x5dc00:
+GruntM6AfterBattleText:
text "Our EXECUTIVES are"
line "trying to take"
cont "this place over."
@@ -464,7 +464,7 @@ GruntF2BeatenText:
text "Wh-who are you?"
done
-UnknownText_0x5dcd0:
+GruntF2AfterBattleText:
text "You beat me, and"
line "I won't forget it!"
done
@@ -719,28 +719,28 @@ RadioTower2F_MapEventHeader:
warp_def $0, $0, 1, RADIO_TOWER_3F
warp_def $0, $f, 3, RADIO_TOWER_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 6
- signpost 0, 3, SIGNPOST_READ, MapRadioTower2FSignpost0Script
- signpost 0, 5, SIGNPOST_READ, MapRadioTower2FSignpost1Script
- signpost 1, 9, SIGNPOST_READ, RadioTower2FBookshelf
- signpost 1, 10, SIGNPOST_READ, RadioTower2FBookshelf
- signpost 1, 11, SIGNPOST_READ, RadioTower2FBookshelf
- signpost 0, 13, SIGNPOST_READ, MapRadioTower2FSignpost5Script
-
-.PersonEvents:
+ bg_event 0, 3, BGEVENT_READ, MapRadioTower2FSignpost0Script
+ bg_event 0, 5, BGEVENT_READ, MapRadioTower2FSignpost1Script
+ bg_event 1, 9, BGEVENT_READ, RadioTower2FBookshelf
+ bg_event 1, 10, BGEVENT_READ, RadioTower2FBookshelf
+ bg_event 1, 11, BGEVENT_READ, RadioTower2FBookshelf
+ bg_event 0, 13, BGEVENT_READ, MapRadioTower2FSignpost5Script
+
+.ObjectEvents:
db 11
- person_event SPRITE_SUPER_NERD, 6, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x5d6fe, EVENT_GOLDENROD_CITY_CIVILIANS
- person_event SPRITE_TEACHER, 2, 17, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, TeacherScript_0x5d701, -1
- person_event SPRITE_ROCKET, 4, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM4, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 4, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM5, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 1, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 2, TrainerGruntM6, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET_GIRL, 5, 10, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerGruntF2, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_BLACK_BELT, 1, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackBeltScript_0x5d71f, EVENT_RADIO_TOWER_BLACKBELT_BLOCKS_STAIRS
- person_event SPRITE_BLACK_BELT, 1, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackBeltScript_0x5d722, EVENT_RADIO_TOWER_CIVILIANS_AFTER
- person_event SPRITE_JIGGLYPUFF, 1, 12, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RadioTowerJigglypuff, -1
- person_event SPRITE_BUENA, 5, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, Buena, -1
- person_event SPRITE_RECEPTIONIST, 7, 12, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ReceptionistScript_0x5d8ff, EVENT_GOLDENROD_CITY_CIVILIANS
+ object_event SPRITE_SUPER_NERD, 6, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, RadioTower2FSuperNerdScript, EVENT_GOLDENROD_CITY_CIVILIANS
+ object_event SPRITE_TEACHER, 2, 17, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x5d701, -1
+ object_event SPRITE_ROCKET, 4, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM4, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 4, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM5, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 1, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerGruntM6, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET_GIRL, 5, 10, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerGruntF2, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_BLACK_BELT, 1, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RadioTower2FBlackBelt1Script, EVENT_RADIO_TOWER_BLACKBELT_BLOCKS_STAIRS
+ object_event SPRITE_BLACK_BELT, 1, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RadioTower2FBlackBelt2Script, EVENT_RADIO_TOWER_CIVILIANS_AFTER
+ object_event SPRITE_JIGGLYPUFF, 1, 12, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RadioTowerJigglypuff, -1
+ object_event SPRITE_BUENA, 5, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Buena, -1
+ object_event SPRITE_RECEPTIONIST, 7, 12, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ReceptionistScript_0x5d8ff, EVENT_GOLDENROD_CITY_CIVILIANS
diff --git a/maps/RadioTower3F.asm b/maps/RadioTower3F.asm
index 166950d44..dc14a2912 100644
--- a/maps/RadioTower3F.asm
+++ b/maps/RadioTower3F.asm
@@ -8,17 +8,14 @@ const_value set 2
const RADIOTOWER3F_SCIENTIST
RadioTower3F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_TILES, .CardKeyShutterCallback
- ; callbacks
-
- dbw MAPCALLBACK_TILES, CardKeyShutterCallback
-
-CardKeyShutterCallback:
+.CardKeyShutterCallback:
checkevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
iftrue .Change
return
@@ -28,8 +25,8 @@ CardKeyShutterCallback:
changeblock $e, $4, $1
return
-SuperNerdScript_0x5e553:
- jumptextfaceplayer UnknownText_0x5e621
+RadioTower3FSuperNerdScript:
+ jumptextfaceplayer RadioTower3FSuperNerdText
GymGuyScript_0x5e556:
faceplayer
@@ -86,45 +83,45 @@ UnknownScript_0x5e5a1:
end
TrainerGruntM7:
- trainer EVENT_BEAT_ROCKET_GRUNTM_7, GRUNTM, GRUNTM_7, GruntM7SeenText, GruntM7BeatenText, 0, GruntM7Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_7, GRUNTM, GRUNTM_7, GruntM7SeenText, GruntM7BeatenText, 0, .Script
-GruntM7Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5e8d0
+ writetext GruntM7AfterBattleText
waitbutton
closetext
end
TrainerGruntM8:
- trainer EVENT_BEAT_ROCKET_GRUNTM_8, GRUNTM, GRUNTM_8, GruntM8SeenText, GruntM8BeatenText, 0, GruntM8Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_8, GRUNTM, GRUNTM_8, GruntM8SeenText, GruntM8BeatenText, 0, .Script
-GruntM8Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5e944
+ writetext GruntM8AfterBattleText
waitbutton
closetext
end
TrainerGruntM9:
- trainer EVENT_BEAT_ROCKET_GRUNTM_9, GRUNTM, GRUNTM_9, GruntM9SeenText, GruntM9BeatenText, 0, GruntM9Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_9, GRUNTM, GRUNTM_9, GruntM9SeenText, GruntM9BeatenText, 0, .Script
-GruntM9Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5e9d0
+ writetext GruntM9AfterBattleText
waitbutton
closetext
end
TrainerScientistMarc:
- trainer EVENT_BEAT_SCIENTIST_MARC, SCIENTIST, MARC, ScientistMarcSeenText, ScientistMarcBeatenText, 0, ScientistMarcScript
+ trainer EVENT_BEAT_SCIENTIST_MARC, SCIENTIST, MARC, ScientistMarcSeenText, ScientistMarcBeatenText, 0, .Script
-ScientistMarcScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5ea61
+ writetext ScientistMarcAfterBattleText
waitbutton
closetext
end
@@ -159,7 +156,7 @@ MapRadioTower3FSignpost0Script:
MapRadioTower3FSignpost1Script:
jumptext UnknownText_0x5eae4
-UnknownText_0x5e621:
+RadioTower3FSuperNerdText:
text "We have recordings"
line "of the cries of"
@@ -246,7 +243,7 @@ GruntM7BeatenText:
text "What?!"
done
-UnknownText_0x5e8d0:
+GruntM7AfterBattleText:
text "I failed in my"
line "duties…"
@@ -264,7 +261,7 @@ GruntM8BeatenText:
text "You're kidding!"
done
-UnknownText_0x5e944:
+GruntM8AfterBattleText:
text "I feel lousy over"
line "losing!"
@@ -284,7 +281,7 @@ GruntM9BeatenText:
text "I'm done for!"
done
-UnknownText_0x5e9d0:
+GruntM9AfterBattleText:
text "What?! You made it"
line "past our men in"
cont "the UNDERGROUND?"
@@ -304,7 +301,7 @@ ScientistMarcBeatenText:
line "too lightly!"
done
-UnknownText_0x5ea61:
+ScientistMarcAfterBattleText:
text "Bwahahaha…"
para "I can transmit as"
@@ -341,21 +338,21 @@ RadioTower3F_MapEventHeader:
warp_def $0, $7, 2, RADIO_TOWER_4F
warp_def $0, $11, 4, RADIO_TOWER_4F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 0, 3, SIGNPOST_READ, MapRadioTower3FSignpost0Script
- signpost 0, 9, SIGNPOST_READ, MapRadioTower3FSignpost1Script
- signpost 2, 14, SIGNPOST_UP, MapRadioTower3FSignpost2Script
+ bg_event 0, 3, BGEVENT_READ, MapRadioTower3FSignpost0Script
+ bg_event 0, 9, BGEVENT_READ, MapRadioTower3FSignpost1Script
+ bg_event 2, 14, BGEVENT_UP, MapRadioTower3FSignpost2Script
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_SUPER_NERD, 4, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x5e553, EVENT_RADIO_TOWER_CIVILIANS_AFTER
- person_event SPRITE_GYM_GUY, 4, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GymGuyScript_0x5e556, -1
- person_event SPRITE_COOLTRAINER_F, 3, 11, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x5e56a, -1
- person_event SPRITE_ROCKET, 1, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 2, TrainerGruntM7, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 2, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM8, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 6, 16, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM9, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_SCIENTIST, 6, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 5, TrainerScientistMarc, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_SUPER_NERD, 4, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RadioTower3FSuperNerdScript, EVENT_RADIO_TOWER_CIVILIANS_AFTER
+ object_event SPRITE_GYM_GUY, 4, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GymGuyScript_0x5e556, -1
+ object_event SPRITE_COOLTRAINER_F, 3, 11, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CooltrainerFScript_0x5e56a, -1
+ object_event SPRITE_ROCKET, 1, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerGruntM7, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 2, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM8, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 6, 16, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM9, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_SCIENTIST, 6, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 5, TrainerScientistMarc, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
diff --git a/maps/RadioTower4F.asm b/maps/RadioTower4F.asm
index 837858d69..4066bf75d 100644
--- a/maps/RadioTower4F.asm
+++ b/maps/RadioTower4F.asm
@@ -8,14 +8,14 @@ const_value set 2
const RADIOTOWER4F_SCIENTIST
RadioTower4F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-FisherScript_0x5eb82:
- jumptextfaceplayer UnknownText_0x5ec12
+RadioTower4FFisherScript:
+ jumptextfaceplayer RadioTower4FFisherText
TeacherScript_0x5eb85:
faceplayer
@@ -56,45 +56,45 @@ RadioTowerMeowth:
end
TrainerGruntM10:
- trainer EVENT_BEAT_ROCKET_GRUNTM_10, GRUNTM, GRUNTM_10, GruntM10SeenText, GruntM10BeatenText, 0, GruntM10Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_10, GRUNTM, GRUNTM_10, GruntM10SeenText, GruntM10BeatenText, 0, .Script
-GruntM10Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5ede2
+ writetext GruntM10AfterBattleText
waitbutton
closetext
end
TrainerExecutivem2:
- trainer EVENT_BEAT_ROCKET_EXECUTIVEM_2, EXECUTIVEM, 2, Executivem2SeenText, Executivem2BeatenText, 0, Executivem2Script
+ trainer EVENT_BEAT_ROCKET_EXECUTIVEM_2, EXECUTIVEM, EXECUTIVEM_2, Executivem2SeenText, Executivem2BeatenText, 0, .Script
-Executivem2Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5ee69
+ writetext Executivem2AfterBattleText
waitbutton
closetext
end
TrainerGruntF4:
- trainer EVENT_BEAT_ROCKET_GRUNTF_4, GRUNTF, GRUNTF_4, GruntF4SeenText, GruntF4BeatenText, 0, GruntF4Script
+ trainer EVENT_BEAT_ROCKET_GRUNTF_4, GRUNTF, GRUNTF_4, GruntF4SeenText, GruntF4BeatenText, 0, .Script
-GruntF4Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5ef31
+ writetext GruntF4AfterBattleText
waitbutton
closetext
end
TrainerScientistRich:
- trainer EVENT_BEAT_SCIENTIST_RICH, SCIENTIST, RICH, ScientistRichSeenText, ScientistRichBeatenText, 0, ScientistRichScript
+ trainer EVENT_BEAT_SCIENTIST_RICH, SCIENTIST, RICH, ScientistRichSeenText, ScientistRichBeatenText, 0, .Script
-ScientistRichScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5efcb
+ writetext ScientistRichAfterBattleText
waitbutton
closetext
end
@@ -105,7 +105,7 @@ MapRadioTower4FSignpost0Script:
MapRadioTower4FSignpost1Script:
jumptext UnknownText_0x5f00d
-UnknownText_0x5ec12:
+RadioTower4FFisherText:
text "I listened to the"
line "radio while I was"
cont "at the RUINS."
@@ -163,7 +163,7 @@ GruntM10BeatenText:
text "No! Unbelievable!"
done
-UnknownText_0x5ede2:
+GruntM10AfterBattleText:
text "I don't believe"
line "it! I was beaten!"
done
@@ -182,7 +182,7 @@ Executivem2BeatenText:
line "down!"
done
-UnknownText_0x5ee69:
+Executivem2AfterBattleText:
text "You've earned my"
line "respect, so here's"
cont "some advice."
@@ -208,7 +208,7 @@ GruntF4BeatenText:
line "useless!"
done
-UnknownText_0x5ef31:
+GruntF4AfterBattleText:
text "I love my"
line "beautiful self!"
@@ -231,7 +231,7 @@ ScientistRichBeatenText:
line "come with snags."
done
-UnknownText_0x5efcb:
+ScientistRichAfterBattleText:
text "Do you honestly"
line "believe you can"
cont "stop TEAM ROCKET?"
@@ -256,20 +256,20 @@ RadioTower4F_MapEventHeader:
warp_def $0, $c, 2, RADIO_TOWER_5F
warp_def $0, $11, 3, RADIO_TOWER_3F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 0, 7, SIGNPOST_READ, MapRadioTower4FSignpost0Script
- signpost 0, 15, SIGNPOST_READ, MapRadioTower4FSignpost1Script
+ bg_event 0, 7, BGEVENT_READ, MapRadioTower4FSignpost0Script
+ bg_event 0, 15, BGEVENT_READ, MapRadioTower4FSignpost1Script
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_FISHER, 4, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, FisherScript_0x5eb82, EVENT_RADIO_TOWER_CIVILIANS_AFTER
- person_event SPRITE_TEACHER, 6, 14, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TeacherScript_0x5eb85, -1
- person_event SPRITE_GROWLITHE, 7, 12, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, RadioTowerMeowth, -1
- person_event SPRITE_ROCKET, 6, 5, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM10, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 1, 14, SPRITEMOVEDATA_STANDING_LEFT, 0, 2, -1, -1, 0, PERSONTYPE_TRAINER, 2, TrainerExecutivem2, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET_GIRL, 4, 12, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerGruntF4, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_SCIENTIST, 2, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 4, TrainerScientistRich, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_FISHER, 4, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, RadioTower4FFisherScript, EVENT_RADIO_TOWER_CIVILIANS_AFTER
+ object_event SPRITE_TEACHER, 6, 14, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x5eb85, -1
+ object_event SPRITE_GROWLITHE, 7, 12, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, RadioTowerMeowth, -1
+ object_event SPRITE_ROCKET, 6, 5, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM10, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET, 1, 14, SPRITEMOVEDATA_STANDING_LEFT, 0, 2, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerExecutivem2, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET_GIRL, 4, 12, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerGruntF4, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_SCIENTIST, 2, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerScientistRich, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
diff --git a/maps/RadioTower5F.asm b/maps/RadioTower5F.asm
index 31d54e742..e09b280e1 100644
--- a/maps/RadioTower5F.asm
+++ b/maps/RadioTower5F.asm
@@ -6,24 +6,22 @@ const_value set 2
const RADIOTOWER5F_POKE_BALL
RadioTower5F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 3
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
- maptrigger .Trigger2
+ scene_script .DummyScene0
+ scene_script .DummyScene1
+ scene_script .DummyScene2
.MapCallbacks:
db 0
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
+.DummyScene1:
end
-.Trigger2:
+.DummyScene2:
end
FakeDirectorScript:
@@ -41,7 +39,7 @@ FakeDirectorScript:
closetext
winlosstext FakeDirectorWinText, 0
setlasttalked RADIOTOWER5F_DIRECTOR
- loadtrainer EXECUTIVEM, 3
+ loadtrainer EXECUTIVEM, EXECUTIVEM_3
startbattle
reloadmapafterbattle
opentext
@@ -49,7 +47,7 @@ FakeDirectorScript:
buttonsound
verbosegiveitem BASEMENT_KEY
closetext
- dotrigger $1
+ setscene $1
setevent EVENT_BEAT_ROCKET_EXECUTIVEM_3
end
@@ -70,17 +68,17 @@ Director:
end
TrainerExecutivef1:
- trainer EVENT_BEAT_ROCKET_EXECUTIVEF_1, EXECUTIVEF, 1, Executivef1SeenText, Executivef1BeatenText, 0, Executivef1Script
+ trainer EVENT_BEAT_ROCKET_EXECUTIVEF_1, EXECUTIVEF, EXECUTIVEF_1, Executivef1SeenText, Executivef1BeatenText, 0, .Script
-Executivef1Script:
+.Script:
end_if_just_battled
opentext
- writetext Executivef1AfterText
+ writetext Executivef1AfterBattleText
waitbutton
closetext
end
-RadioTower5FRocketBossTrigger:
+RadioTower5FRocketBossScene:
applymovement PLAYER, MovementData_0x60125
playmusic MUSIC_ROCKET_ENCOUNTER
spriteface RADIOTOWER5F_ROCKET, RIGHT
@@ -90,7 +88,7 @@ RadioTower5FRocketBossTrigger:
closetext
winlosstext RadioTower5FRocketBossWinText, 0
setlasttalked RADIOTOWER5F_ROCKET
- loadtrainer EXECUTIVEM, 1
+ loadtrainer EXECUTIVEM, EXECUTIVEM_1
startbattle
reloadmapafterbattle
opentext
@@ -117,7 +115,7 @@ RadioTower5FRocketBossTrigger:
clearevent EVENT_BLACKTHORN_CITY_SUPER_NERD_DOES_NOT_BLOCK_GYM
special PlayMapMusic
disappear RADIOTOWER5F_DIRECTOR
- moveperson RADIOTOWER5F_DIRECTOR, $c, $0
+ moveobject RADIOTOWER5F_DIRECTOR, $c, $0
appear RADIOTOWER5F_DIRECTOR
applymovement RADIOTOWER5F_DIRECTOR, RadioTower5FDirectorWalksIn
spriteface PLAYER, RIGHT
@@ -128,8 +126,8 @@ RadioTower5FRocketBossTrigger:
writetext RadioTower5FDirectorDescribeClearBellText
waitbutton
closetext
- dotrigger $2
- domaptrigger ECRUTEAK_HOUSE, $0
+ setscene $2
+ setmapscene ECRUTEAK_HOUSE, $0
setevent EVENT_GOT_CLEAR_BELL
setevent EVENT_TEAM_ROCKET_DISBANDED
jump .UselessJump
@@ -258,7 +256,7 @@ Executivef1BeatenText:
line "I still lost…"
done
-Executivef1AfterText:
+Executivef1AfterBattleText:
text "<PLAYER>, isn't it?"
para "A brat like you"
@@ -431,23 +429,23 @@ RadioTower5F_MapEventHeader:
warp_def $0, $0, 1, RADIO_TOWER_4F
warp_def $0, $c, 3, RADIO_TOWER_4F
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 0, $3, $0, $0, FakeDirectorScript, $0, $0
- xy_trigger 1, $5, $10, $0, RadioTower5FRocketBossTrigger, $0, $0
+ coord_event 0, $3, $0, FakeDirectorScript
+ coord_event 1, $5, $10, RadioTower5FRocketBossScene
-.Signposts:
+.BGEvents:
db 5
- signpost 0, 3, SIGNPOST_READ, MapRadioTower5FSignpost0Script
- signpost 0, 11, SIGNPOST_READ, MapRadioTower5FSignpost2Script
- signpost 0, 15, SIGNPOST_READ, MapRadioTower5FSignpost2Script
- signpost 1, 16, SIGNPOST_READ, RadioTower5FBookshelf
- signpost 1, 17, SIGNPOST_READ, RadioTower5FBookshelf
+ bg_event 0, 3, BGEVENT_READ, MapRadioTower5FSignpost0Script
+ bg_event 0, 11, BGEVENT_READ, MapRadioTower5FSignpost2Script
+ bg_event 0, 15, BGEVENT_READ, MapRadioTower5FSignpost2Script
+ bg_event 1, 16, BGEVENT_READ, RadioTower5FBookshelf
+ bg_event 1, 17, BGEVENT_READ, RadioTower5FBookshelf
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_GENTLEMAN, 6, 3, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Director, -1
- person_event SPRITE_ROCKET, 5, 13, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET_GIRL, 2, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerExecutivef1, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKER, 5, 13, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, Ben, EVENT_RADIO_TOWER_CIVILIANS_AFTER
- person_event SPRITE_POKE_BALL, 5, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RadioTower5FUltraBall, EVENT_RADIO_TOWER_5F_ULTRA_BALL
+ object_event SPRITE_GENTLEMAN, 6, 3, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Director, -1
+ object_event SPRITE_ROCKET, 5, 13, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKET_GIRL, 2, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerExecutivef1, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
+ object_event SPRITE_ROCKER, 5, 13, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Ben, EVENT_RADIO_TOWER_CIVILIANS_AFTER
+ object_event SPRITE_POKE_BALL, 5, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RadioTower5FUltraBall, EVENT_RADIO_TOWER_5F_ULTRA_BALL
diff --git a/maps/RedsHouse1F.asm b/maps/RedsHouse1F.asm
index ae909f6da..9d7408386 100644
--- a/maps/RedsHouse1F.asm
+++ b/maps/RedsHouse1F.asm
@@ -2,16 +2,14 @@ const_value set 2
const REDSHOUSE1F_REDS_MOM
RedsHouse1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 1
-
- ; triggers
- dw .Trigger, 0
+ scene_script .DummyScene
.MapCallbacks:
db 0
-.Trigger:
+.DummyScene:
end
RedsMom:
@@ -86,15 +84,15 @@ RedsHouse1F_MapEventHeader:
warp_def $7, $3, 1, PALLET_TOWN
warp_def $0, $7, 1, REDS_HOUSE_2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 1, 0, SIGNPOST_READ, RedsHouse1FBookshelf
- signpost 1, 1, SIGNPOST_READ, RedsHouse1FBookshelf
- signpost 1, 2, SIGNPOST_READ, RedsHouse1FTV
+ bg_event 1, 0, BGEVENT_READ, RedsHouse1FBookshelf
+ bg_event 1, 1, BGEVENT_READ, RedsHouse1FBookshelf
+ bg_event 1, 2, BGEVENT_READ, RedsHouse1FTV
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_REDS_MOM, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RedsMom, -1
+ object_event SPRITE_REDS_MOM, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RedsMom, -1
diff --git a/maps/RedsHouse2F.asm b/maps/RedsHouse2F.asm
index 5704cdcaf..6919b7fe0 100644
--- a/maps/RedsHouse2F.asm
+++ b/maps/RedsHouse2F.asm
@@ -1,17 +1,17 @@
RedsHouse2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-MapRedsHouse2FSignpost0Script:
- jumptext UnknownText_0x19b050
+RedsHouse2FN64Script:
+ jumptext RedsHouse2FN64Text
-MapRedsHouse2FSignpost1Script:
- jumptext UnknownText_0x19b087
+RedsHouse2FPCScript:
+ jumptext RedsHouse2FPCText
-UnknownText_0x19b050:
+RedsHouse2FN64Text:
text "<PLAYER> played the"
line "N64."
@@ -19,7 +19,7 @@ UnknownText_0x19b050:
line "no time to lose!"
done
-UnknownText_0x19b087:
+RedsHouse2FPCText:
text "It looks like it"
line "hasn't been used"
cont "in a long time…"
@@ -33,13 +33,13 @@ RedsHouse2F_MapEventHeader:
db 1
warp_def $0, $7, 3, REDS_HOUSE_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 5, 3, SIGNPOST_READ, MapRedsHouse2FSignpost0Script
- signpost 1, 0, SIGNPOST_READ, MapRedsHouse2FSignpost1Script
+ bg_event 5, 3, BGEVENT_READ, RedsHouse2FN64Script
+ bg_event 1, 0, BGEVENT_READ, RedsHouse2FPCScript
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/RockTunnel1F.asm b/maps/RockTunnel1F.asm
index 1fa6ef971..32b274ca5 100644
--- a/maps/RockTunnel1F.asm
+++ b/maps/RockTunnel1F.asm
@@ -3,7 +3,7 @@ const_value set 2
const ROCKTUNNEL1F_POKE_BALL2
RockTunnel1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -36,15 +36,15 @@ RockTunnel1F_MapEventHeader:
warp_def $3, $1b, 4, ROCK_TUNNEL_B1F
warp_def $d, $1b, 1, ROCK_TUNNEL_B1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 4, 24, SIGNPOST_ITEM, RockTunnel1FHiddenXAccuracy
- signpost 15, 21, SIGNPOST_ITEM, RockTunnel1FHiddenXDefend
+ bg_event 4, 24, BGEVENT_ITEM, RockTunnel1FHiddenXAccuracy
+ bg_event 15, 21, BGEVENT_ITEM, RockTunnel1FHiddenXDefend
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_POKE_BALL, 18, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RockTunnel1FElixer, EVENT_ROCK_TUNNEL_1F_ELIXER
- person_event SPRITE_POKE_BALL, 15, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RockTunnel1FTMSteelWing, EVENT_ROCK_TUNNEL_1F_TM_STEEL_WING
+ object_event SPRITE_POKE_BALL, 18, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RockTunnel1FElixer, EVENT_ROCK_TUNNEL_1F_ELIXER
+ object_event SPRITE_POKE_BALL, 15, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RockTunnel1FTMSteelWing, EVENT_ROCK_TUNNEL_1F_TM_STEEL_WING
diff --git a/maps/RockTunnelB1F.asm b/maps/RockTunnelB1F.asm
index 391083470..e4b820d5d 100644
--- a/maps/RockTunnelB1F.asm
+++ b/maps/RockTunnelB1F.asm
@@ -4,7 +4,7 @@ const_value set 2
const ROCKTUNNELB1F_POKE_BALL3
RockTunnelB1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -34,15 +34,15 @@ RockTunnelB1F_MapEventHeader:
warp_def $3, $17, 3, ROCK_TUNNEL_1F
warp_def $17, $19, 5, ROCK_TUNNEL_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 14, 4, SIGNPOST_ITEM, RockTunnelB1FHiddenMaxPotion
+ bg_event 14, 4, BGEVENT_ITEM, RockTunnelB1FHiddenMaxPotion
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_POKE_BALL, 25, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RockTunnelB1FIron, EVENT_ROCK_TUNNEL_B1F_IRON
- person_event SPRITE_POKE_BALL, 17, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RockTunnelB1FPPUp, EVENT_ROCK_TUNNEL_B1F_PP_UP
- person_event SPRITE_POKE_BALL, 2, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RockTunnelB1FRevive, EVENT_ROCK_TUNNEL_B1F_REVIVE
+ object_event SPRITE_POKE_BALL, 25, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RockTunnelB1FIron, EVENT_ROCK_TUNNEL_B1F_IRON
+ object_event SPRITE_POKE_BALL, 17, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RockTunnelB1FPPUp, EVENT_ROCK_TUNNEL_B1F_PP_UP
+ object_event SPRITE_POKE_BALL, 2, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RockTunnelB1FRevive, EVENT_ROCK_TUNNEL_B1F_REVIVE
diff --git a/maps/Route1.asm b/maps/Route1.asm
index a8070b4e5..0f898163c 100644
--- a/maps/Route1.asm
+++ b/maps/Route1.asm
@@ -4,30 +4,30 @@ const_value set 2
const ROUTE1_FRUIT_TREE
Route1_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerSchoolboyDanny:
- trainer EVENT_BEAT_SCHOOLBOY_DANNY, SCHOOLBOY, DANNY, SchoolboyDannySeenText, SchoolboyDannyBeatenText, 0, SchoolboyDannyScript
+ trainer EVENT_BEAT_SCHOOLBOY_DANNY, SCHOOLBOY, DANNY, SchoolboyDannySeenText, SchoolboyDannyBeatenText, 0, .Script
-SchoolboyDannyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ac5d7
+ writetext SchoolboyDannyAfterBattleText
waitbutton
closetext
end
TrainerCooltrainerfQuinn:
- trainer EVENT_BEAT_COOLTRAINERF_QUINN, COOLTRAINERF, QUINN, CooltrainerfQuinnSeenText, CooltrainerfQuinnBeatenText, 0, CooltrainerfQuinnScript
+ trainer EVENT_BEAT_COOLTRAINERF_QUINN, COOLTRAINERF, QUINN, CooltrainerfQuinnSeenText, CooltrainerfQuinnBeatenText, 0, .Script
-CooltrainerfQuinnScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ac640
+ writetext CooltrainerfQuinnAfterBattleText
waitbutton
closetext
end
@@ -49,7 +49,7 @@ SchoolboyDannyBeatenText:
line "losing record…"
done
-UnknownText_0x1ac5d7:
+SchoolboyDannyAfterBattleText:
text "For trainers, it's"
line "a given that we'll"
@@ -66,7 +66,7 @@ CooltrainerfQuinnBeatenText:
text "Down and out…"
done
-UnknownText_0x1ac640:
+CooltrainerfQuinnAfterBattleText:
text "You're strong."
para "You obviously must"
@@ -87,15 +87,15 @@ Route1_MapEventHeader:
.Warps:
db 0
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 27, 7, SIGNPOST_READ, Route1Sign
+ bg_event 27, 7, BGEVENT_READ, Route1Sign
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_YOUNGSTER, 12, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 4, TrainerSchoolboyDanny, -1
- person_event SPRITE_COOLTRAINER_F, 25, 9, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 2, TrainerCooltrainerfQuinn, -1
- person_event SPRITE_FRUIT_TREE, 7, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x1ac581, -1
+ object_event SPRITE_YOUNGSTER, 12, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSchoolboyDanny, -1
+ object_event SPRITE_COOLTRAINER_F, 25, 9, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerCooltrainerfQuinn, -1
+ object_event SPRITE_FRUIT_TREE, 7, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x1ac581, -1
diff --git a/maps/Route10North.asm b/maps/Route10North.asm
index 29b345fed..48aaa4bdc 100644
--- a/maps/Route10North.asm
+++ b/maps/Route10North.asm
@@ -1,5 +1,5 @@
Route10North_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -8,7 +8,7 @@ Route10North_MapScriptHeader:
PowerPlantSign:
jumptext PowerPlantSignText
-Route10PokeCenterSign:
+Route10PokecenterSign:
jumpstd pokecentersign
PowerPlantSignText:
@@ -24,13 +24,13 @@ Route10North_MapEventHeader:
warp_def $1, $b, 1, ROUTE_10_POKECENTER_1F
warp_def $9, $3, 1, POWER_PLANT
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 11, 5, SIGNPOST_READ, PowerPlantSign
- signpost 1, 12, SIGNPOST_READ, Route10PokeCenterSign
+ bg_event 11, 5, BGEVENT_READ, PowerPlantSign
+ bg_event 1, 12, BGEVENT_READ, Route10PokecenterSign
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/Route10PokeCenter1F.asm b/maps/Route10PokeCenter1F.asm
deleted file mode 100644
index 720421fda..000000000
--- a/maps/Route10PokeCenter1F.asm
+++ /dev/null
@@ -1,104 +0,0 @@
-const_value set 2
- const ROUTE10POKECENTER1F_NURSE
- const ROUTE10POKECENTER1F_GENTLEMAN
- const ROUTE10POKECENTER1F_GYM_GUY
- const ROUTE10POKECENTER1F_COOLTRAINER_F
-
-Route10PokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x188bd4:
- jumpstd pokecenternurse
-
-GentlemanScript_0x188bd7:
- jumptextfaceplayer UnknownText_0x188bf1
-
-GymGuyScript_0x188bda:
- faceplayer
- opentext
- checkevent EVENT_RETURNED_MACHINE_PART
- iftrue UnknownScript_0x188be8
- writetext UnknownText_0x188c26
- waitbutton
- closetext
- end
-
-UnknownScript_0x188be8:
- writetext UnknownText_0x188c9e
- waitbutton
- closetext
- end
-
-CooltrainerFScript_0x188bee:
- jumptextfaceplayer UnknownText_0x188d0c
-
-UnknownText_0x188bf1:
- text "A #MON CENTER"
- line "near a cave?"
-
- para "That's mighty"
- line "convenient."
- done
-
-UnknownText_0x188c26:
- text "The POWER PLANT's"
- line "MANAGER is looking"
-
- para "for a strong #-"
- line "MON trainer."
-
- para "He needs help"
- line "getting back"
-
- para "something that"
- line "was stolen."
- done
-
-UnknownText_0x188c9e:
- text "I hear TEAM ROCKET"
- line "got back together"
-
- para "in JOHTO but fell"
- line "apart right away."
-
- para "I didn't know any-"
- line "thing about that."
- done
-
-UnknownText_0x188d0c:
- text "When you go out-"
- line "side, you can see"
-
- para "the roof of a big"
- line "building."
-
- para "That's the POWER"
- line "PLANT."
- done
-
-Route10PokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 1, ROUTE_10_NORTH
- warp_def $7, $4, 1, ROUTE_10_NORTH
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 4
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x188bd4, -1
- person_event SPRITE_GENTLEMAN, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x188bd7, -1
- person_event SPRITE_GYM_GUY, 2, 7, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, GymGuyScript_0x188bda, -1
- person_event SPRITE_COOLTRAINER_F, 3, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x188bee, -1
diff --git a/maps/Route10PokeCenter2FBeta.asm b/maps/Route10PokeCenter2FBeta.asm
deleted file mode 100644
index a4a4aed6f..000000000
--- a/maps/Route10PokeCenter2FBeta.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-Route10PokeCenter2FBeta_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-Route10PokeCenter2FBeta_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 1
- warp_def $7, $0, 3, ROUTE_10_POKECENTER_1F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/Route10Pokecenter1F.asm b/maps/Route10Pokecenter1F.asm
new file mode 100644
index 000000000..09474c902
--- /dev/null
+++ b/maps/Route10Pokecenter1F.asm
@@ -0,0 +1,104 @@
+const_value set 2
+ const ROUTE10POKECENTER1F_NURSE
+ const ROUTE10POKECENTER1F_GENTLEMAN
+ const ROUTE10POKECENTER1F_GYM_GUY
+ const ROUTE10POKECENTER1F_COOLTRAINER_F
+
+Route10Pokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x188bd4:
+ jumpstd pokecenternurse
+
+Route10Pokecenter1FGentlemanScript:
+ jumptextfaceplayer Route10Pokecenter1FGentlemanText
+
+GymGuyScript_0x188bda:
+ faceplayer
+ opentext
+ checkevent EVENT_RETURNED_MACHINE_PART
+ iftrue UnknownScript_0x188be8
+ writetext UnknownText_0x188c26
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x188be8:
+ writetext UnknownText_0x188c9e
+ waitbutton
+ closetext
+ end
+
+Route10Pokecenter1FCooltrainerFScript:
+ jumptextfaceplayer Route10Pokecenter1FCooltrainerFText
+
+Route10Pokecenter1FGentlemanText:
+ text "A #MON CENTER"
+ line "near a cave?"
+
+ para "That's mighty"
+ line "convenient."
+ done
+
+UnknownText_0x188c26:
+ text "The POWER PLANT's"
+ line "MANAGER is looking"
+
+ para "for a strong #-"
+ line "MON trainer."
+
+ para "He needs help"
+ line "getting back"
+
+ para "something that"
+ line "was stolen."
+ done
+
+UnknownText_0x188c9e:
+ text "I hear TEAM ROCKET"
+ line "got back together"
+
+ para "in JOHTO but fell"
+ line "apart right away."
+
+ para "I didn't know any-"
+ line "thing about that."
+ done
+
+Route10Pokecenter1FCooltrainerFText:
+ text "When you go out-"
+ line "side, you can see"
+
+ para "the roof of a big"
+ line "building."
+
+ para "That's the POWER"
+ line "PLANT."
+ done
+
+Route10Pokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 1, ROUTE_10_NORTH
+ warp_def $7, $4, 1, ROUTE_10_NORTH
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x188bd4, -1
+ object_event SPRITE_GENTLEMAN, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route10Pokecenter1FGentlemanScript, -1
+ object_event SPRITE_GYM_GUY, 2, 7, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GymGuyScript_0x188bda, -1
+ object_event SPRITE_COOLTRAINER_F, 3, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route10Pokecenter1FCooltrainerFScript, -1
diff --git a/maps/Route10Pokecenter2FBeta.asm b/maps/Route10Pokecenter2FBeta.asm
new file mode 100644
index 000000000..047e42c78
--- /dev/null
+++ b/maps/Route10Pokecenter2FBeta.asm
@@ -0,0 +1,23 @@
+Route10Pokecenter2FBeta_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+Route10Pokecenter2FBeta_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 1
+ warp_def $7, $0, 3, ROUTE_10_POKECENTER_1F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/Route10South.asm b/maps/Route10South.asm
index a644f1540..ac8c56357 100644
--- a/maps/Route10South.asm
+++ b/maps/Route10South.asm
@@ -3,30 +3,30 @@ const_value set 2
const ROUTE10SOUTH_POKEFAN_M2
Route10South_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerHikerJim:
- trainer EVENT_BEAT_HIKER_JIM, HIKER, JIM, HikerJimSeenText, HikerJimBeatenText, 0, HikerJimScript
+ trainer EVENT_BEAT_HIKER_JIM, HIKER, JIM, HikerJimSeenText, HikerJimBeatenText, 0, .Script
-HikerJimScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ae43b
+ writetext HikerJimAfterBattleText
waitbutton
closetext
end
TrainerPokefanmRobert:
- trainer EVENT_BEAT_POKEFANM_ROBERT, POKEFANM, ROBERT, PokefanmRobertSeenText, PokefanmRobertBeatenText, 0, PokefanmRobertScript
+ trainer EVENT_BEAT_POKEFANM_ROBERT, POKEFANM, ROBERT, PokefanmRobertSeenText, PokefanmRobertBeatenText, 0, .Script
-PokefanmRobertScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ae4a9
+ writetext PokefanmRobertAfterBattleText
waitbutton
closetext
end
@@ -42,7 +42,7 @@ HikerJimBeatenText:
text "Hahaha-hachoo!"
done
-UnknownText_0x1ae43b:
+HikerJimAfterBattleText:
text "Hay fever is"
line "making me sneeze!"
cont "Ahahah-CHOO!"
@@ -60,7 +60,7 @@ PokefanmRobertBeatenText:
line "that's my loss."
done
-UnknownText_0x1ae4a9:
+PokefanmRobertAfterBattleText:
text "Look what you did"
line "to my #MON…"
@@ -83,14 +83,14 @@ Route10South_MapEventHeader:
db 1
warp_def $1, $6, 2, ROCK_TUNNEL_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 3, 5, SIGNPOST_READ, Route10Sign
+ bg_event 3, 5, BGEVENT_READ, Route10Sign
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_POKEFAN_M, 3, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerHikerJim, -1
- person_event SPRITE_POKEFAN_M, 10, 8, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerPokefanmRobert, -1
+ object_event SPRITE_POKEFAN_M, 3, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerHikerJim, -1
+ object_event SPRITE_POKEFAN_M, 10, 8, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerPokefanmRobert, -1
diff --git a/maps/Route11.asm b/maps/Route11.asm
index 05b19d424..9aa324439 100644
--- a/maps/Route11.asm
+++ b/maps/Route11.asm
@@ -6,52 +6,52 @@ const_value set 2
const ROUTE11_FRUIT_TREE
Route11_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerYoungsterOwen:
- trainer EVENT_BEAT_YOUNGSTER_OWEN, YOUNGSTER, OWEN, YoungsterOwenSeenText, YoungsterOwenBeatenText, 0, YoungsterOwenScript
+ trainer EVENT_BEAT_YOUNGSTER_OWEN, YOUNGSTER, OWEN, YoungsterOwenSeenText, YoungsterOwenBeatenText, 0, .Script
-YoungsterOwenScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x680b2
+ writetext YoungsterOwenAfterBattleText
waitbutton
closetext
end
TrainerYoungsterJason:
- trainer EVENT_BEAT_YOUNGSTER_JASON, YOUNGSTER, JASON, YoungsterJasonSeenText, YoungsterJasonBeatenText, 0, YoungsterJasonScript
+ trainer EVENT_BEAT_YOUNGSTER_JASON, YOUNGSTER, JASON, YoungsterJasonSeenText, YoungsterJasonBeatenText, 0, .Script
-YoungsterJasonScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6814a
+ writetext YoungsterJasonAfterBattleText
waitbutton
closetext
end
TrainerPsychicHerman:
- trainer EVENT_BEAT_PSYCHIC_HERMAN, PSYCHIC_T, HERMAN, PsychicHermanSeenText, PsychicHermanBeatenText, 0, PsychicHermanScript
+ trainer EVENT_BEAT_PSYCHIC_HERMAN, PSYCHIC_T, HERMAN, PsychicHermanSeenText, PsychicHermanBeatenText, 0, .Script
-PsychicHermanScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6817b
+ writetext PsychicHermanAfterBattleText
waitbutton
closetext
end
TrainerPsychicFidel:
- trainer EVENT_BEAT_PSYCHIC_FIDEL, PSYCHIC_T, FIDEL, PsychicFidelSeenText, PsychicFidelBeatenText, 0, PsychicFidelScript
+ trainer EVENT_BEAT_PSYCHIC_FIDEL, PSYCHIC_T, FIDEL, PsychicFidelSeenText, PsychicFidelBeatenText, 0, .Script
-PsychicFidelScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x681ec
+ writetext PsychicFidelAfterBattleText
waitbutton
closetext
end
@@ -79,7 +79,7 @@ YoungsterOwenBeatenText:
line "happen?"
done
-UnknownText_0x680b2:
+YoungsterOwenAfterBattleText:
text "I fought fair and"
line "square with honor."
@@ -100,7 +100,7 @@ YoungsterJasonBeatenText:
line "I got stomped!"
done
-UnknownText_0x6814a:
+YoungsterJasonAfterBattleText:
text "I'm going to catch"
line "more #MON in"
cont "the grass."
@@ -114,7 +114,7 @@ PsychicHermanBeatenText:
text "…"
done
-UnknownText_0x6817b:
+PsychicHermanAfterBattleText:
text "…"
para "I lost while I had"
@@ -133,7 +133,7 @@ PsychicFidelBeatenText:
line "your power…"
done
-UnknownText_0x681ec:
+PsychicFidelAfterBattleText:
text "Strength in con-"
line "viction…"
@@ -153,18 +153,18 @@ Route11_MapEventHeader:
.Warps:
db 0
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 7, 3, SIGNPOST_READ, Route11Sign
- signpost 5, 32, SIGNPOST_ITEM, Route11HiddenRevive
+ bg_event 7, 3, BGEVENT_READ, Route11Sign
+ bg_event 5, 32, BGEVENT_ITEM, Route11HiddenRevive
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_YOUNGSTER, 14, 22, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerYoungsterOwen, -1
- person_event SPRITE_YOUNGSTER, 4, 20, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerYoungsterJason, -1
- person_event SPRITE_YOUNGSTER, 7, 28, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerPsychicHerman, -1
- person_event SPRITE_YOUNGSTER, 6, 8, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerPsychicFidel, -1
- person_event SPRITE_FRUIT_TREE, 2, 32, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x68055, -1
+ object_event SPRITE_YOUNGSTER, 14, 22, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterOwen, -1
+ object_event SPRITE_YOUNGSTER, 4, 20, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterJason, -1
+ object_event SPRITE_YOUNGSTER, 7, 28, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerPsychicHerman, -1
+ object_event SPRITE_YOUNGSTER, 6, 8, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPsychicFidel, -1
+ object_event SPRITE_FRUIT_TREE, 2, 32, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x68055, -1
diff --git a/maps/Route12.asm b/maps/Route12.asm
index 2a1e078f5..3d55a2852 100644
--- a/maps/Route12.asm
+++ b/maps/Route12.asm
@@ -7,52 +7,52 @@ const_value set 2
const ROUTE12_POKE_BALL2
Route12_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerFisherKyle:
- trainer EVENT_BEAT_FISHER_KYLE, FISHER, KYLE, FisherKyleSeenText, FisherKyleBeatenText, 0, FisherKyleScript
+ trainer EVENT_BEAT_FISHER_KYLE, FISHER, KYLE, FisherKyleSeenText, FisherKyleBeatenText, 0, .Script
-FisherKyleScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a7238
+ writetext FisherKyleAfterBattleText
waitbutton
closetext
end
TrainerFisherMartin:
- trainer EVENT_BEAT_FISHER_MARTIN, FISHER, MARTIN, FisherMartinSeenText, FisherMartinBeatenText, 0, FisherMartinScript
+ trainer EVENT_BEAT_FISHER_MARTIN, FISHER, MARTIN, FisherMartinSeenText, FisherMartinBeatenText, 0, .Script
-FisherMartinScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a704c
+ writetext FisherMartinAfterBattleText
waitbutton
closetext
end
TrainerFisherStephen:
- trainer EVENT_BEAT_FISHER_STEPHEN, FISHER, STEPHEN, FisherStephenSeenText, FisherStephenBeatenText, 0, FisherStephenScript
+ trainer EVENT_BEAT_FISHER_STEPHEN, FISHER, STEPHEN, FisherStephenSeenText, FisherStephenBeatenText, 0, .Script
-FisherStephenScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a70d4
+ writetext FisherStephenAfterBattleText
waitbutton
closetext
end
TrainerFisherBarney:
- trainer EVENT_BEAT_FISHER_BARNEY, FISHER, BARNEY, FisherBarneySeenText, FisherBarneyBeatenText, 0, FisherBarneyScript
+ trainer EVENT_BEAT_FISHER_BARNEY, FISHER, BARNEY, FisherBarneySeenText, FisherBarneyBeatenText, 0, .Script
-FisherBarneyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a716d
+ writetext FisherBarneyAfterBattleText
waitbutton
closetext
end
@@ -83,7 +83,7 @@ FisherMartinBeatenText:
text "Gwaaah!"
done
-UnknownText_0x1a704c:
+FisherMartinAfterBattleText:
text "I'm too impatient"
line "for fishing…"
done
@@ -100,7 +100,7 @@ FisherStephenBeatenText:
line "distracted me!"
done
-UnknownText_0x1a70d4:
+FisherStephenAfterBattleText:
text "Have you checked"
line "out KANTO's radio"
@@ -119,7 +119,7 @@ FisherBarneyBeatenText:
line "coming up next!"
done
-UnknownText_0x1a716d:
+FisherBarneyAfterBattleText:
text "I think electric-"
line "ity is the most"
@@ -144,7 +144,7 @@ FisherKyleBeatenText:
text "You do remember?"
done
-UnknownText_0x1a7238:
+FisherKyleAfterBattleText:
text "The tug you feel"
line "on the ROD when"
@@ -175,20 +175,20 @@ Route12_MapEventHeader:
db 1
warp_def $21, $b, 1, ROUTE_12_SUPER_ROD_HOUSE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 27, 11, SIGNPOST_READ, Route12Sign
- signpost 9, 13, SIGNPOST_READ, FishingSpotSign
- signpost 13, 14, SIGNPOST_ITEM, Route12HiddenElixer
+ bg_event 27, 11, BGEVENT_READ, Route12Sign
+ bg_event 9, 13, BGEVENT_READ, FishingSpotSign
+ bg_event 13, 14, BGEVENT_ITEM, Route12HiddenElixer
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_FISHER, 13, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 1, TrainerFisherMartin, -1
- person_event SPRITE_FISHER, 23, 14, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 1, TrainerFisherStephen, -1
- person_event SPRITE_FISHER, 38, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 5, TrainerFisherBarney, -1
- person_event SPRITE_FISHER, 7, 6, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerFisherKyle, -1
- person_event SPRITE_POKE_BALL, 43, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route12Calcium, EVENT_ROUTE_12_CALCIUM
- person_event SPRITE_POKE_BALL, 51, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route12Nugget, EVENT_ROUTE_12_NUGGET
+ object_event SPRITE_FISHER, 13, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherMartin, -1
+ object_event SPRITE_FISHER, 23, 14, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherStephen, -1
+ object_event SPRITE_FISHER, 38, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 5, TrainerFisherBarney, -1
+ object_event SPRITE_FISHER, 7, 6, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerFisherKyle, -1
+ object_event SPRITE_POKE_BALL, 43, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route12Calcium, EVENT_ROUTE_12_CALCIUM
+ object_event SPRITE_POKE_BALL, 51, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route12Nugget, EVENT_ROUTE_12_NUGGET
diff --git a/maps/Route12SuperRodHouse.asm b/maps/Route12SuperRodHouse.asm
index f19594e20..a349641e0 100644
--- a/maps/Route12SuperRodHouse.asm
+++ b/maps/Route12SuperRodHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const ROUTE12SUPERRODHOUSE_FISHING_GURU
Route12SuperRodHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -88,12 +88,12 @@ Route12SuperRodHouse_MapEventHeader:
warp_def $7, $2, 1, ROUTE_12
warp_def $7, $3, 1, ROUTE_12
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_FISHING_GURU, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, FishingGuruScript_0x7f484, -1
+ object_event SPRITE_FISHING_GURU, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, FishingGuruScript_0x7f484, -1
diff --git a/maps/Route13.asm b/maps/Route13.asm
index 79e035aa6..7ea3738fd 100644
--- a/maps/Route13.asm
+++ b/maps/Route13.asm
@@ -6,63 +6,63 @@ const_value set 2
const ROUTE13_POKEFAN_M3
Route13_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerPokefanmAlex:
- trainer EVENT_BEAT_POKEFANM_ALEX, POKEFANM, ALEX, PokefanmAlexSeenText, PokefanmAlexBeatenText, 0, PokefanmAlexScript
+ trainer EVENT_BEAT_POKEFANM_ALEX, POKEFANM, ALEX, PokefanmAlexSeenText, PokefanmAlexBeatenText, 0, .Script
-PokefanmAlexScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a24e3
+ writetext PokefanmAlexAfterBattleText
waitbutton
closetext
end
TrainerPokefanmJoshua:
- trainer EVENT_BEAT_POKEFANM_JOSHUA, POKEFANM, JOSHUA, PokefanmJoshuaSeenText, PokefanmJoshuaBeatenText, 0, PokefanmJoshuaScript
+ trainer EVENT_BEAT_POKEFANM_JOSHUA, POKEFANM, JOSHUA, PokefanmJoshuaSeenText, PokefanmJoshuaBeatenText, 0, .Script
-PokefanmJoshuaScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a254f
+ writetext PokefanmJoshuaAfterBattleText
waitbutton
closetext
end
TrainerBird_keeperPerry:
- trainer EVENT_BEAT_BIRD_KEEPER_PERRY, BIRD_KEEPER, PERRY, Bird_keeperPerrySeenText, Bird_keeperPerryBeatenText, 0, Bird_keeperPerryScript
+ trainer EVENT_BEAT_BIRD_KEEPER_PERRY, BIRD_KEEPER, PERRY, Bird_keeperPerrySeenText, Bird_keeperPerryBeatenText, 0, .Script
-Bird_keeperPerryScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a25db
+ writetext Bird_keeperPerryAfterBattleText
waitbutton
closetext
end
TrainerBird_keeperBret:
- trainer EVENT_BEAT_BIRD_KEEPER_BRET, BIRD_KEEPER, BRET, Bird_keeperBretSeenText, Bird_keeperBretBeatenText, 0, Bird_keeperBretScript
+ trainer EVENT_BEAT_BIRD_KEEPER_BRET, BIRD_KEEPER, BRET, Bird_keeperBretSeenText, Bird_keeperBretBeatenText, 0, .Script
-Bird_keeperBretScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a2662
+ writetext Bird_keeperBretAfterBattleText
waitbutton
closetext
end
TrainerHikerKenny:
- trainer EVENT_BEAT_HIKER_KENNY, HIKER, KENNY, HikerKennySeenText, HikerKennyBeatenText, 0, HikerKennyScript
+ trainer EVENT_BEAT_HIKER_KENNY, HIKER, KENNY, HikerKennySeenText, HikerKennyBeatenText, 0, .Script
-HikerKennyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a26c2
+ writetext HikerKennyAfterBattleText
waitbutton
closetext
end
@@ -90,7 +90,7 @@ PokefanmAlexBeatenText:
line "mock royalty!"
done
-UnknownText_0x1a24e3:
+PokefanmAlexAfterBattleText:
text "Doesn't everyone"
line "wish to someday be"
cont "a king?"
@@ -106,7 +106,7 @@ PokefanmJoshuaBeatenText:
text "PI-PIKACHU!"
done
-UnknownText_0x1a254f:
+PokefanmJoshuaAfterBattleText:
text "You look like you"
line "have many #MON,"
@@ -125,7 +125,7 @@ Bird_keeperPerryBeatenText:
line "your speed…"
done
-UnknownText_0x1a25db:
+Bird_keeperPerryAfterBattleText:
text "Your #MON are"
line "remarkably well-"
cont "trained."
@@ -144,7 +144,7 @@ Bird_keeperBretBeatenText:
line "Not good enough!"
done
-UnknownText_0x1a2662:
+Bird_keeperBretAfterBattleText:
text "If you groom them,"
line "#MON get happy."
done
@@ -159,7 +159,7 @@ HikerKennyBeatenText:
text "I lost…"
done
-UnknownText_0x1a26c2:
+HikerKennyAfterBattleText:
text "Geological fea-"
line "tures don't appear"
cont "to change."
@@ -199,20 +199,20 @@ Route13_MapEventHeader:
.Warps:
db 0
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 4
- signpost 13, 29, SIGNPOST_READ, Route13TrainerTips
- signpost 11, 41, SIGNPOST_READ, Route13Sign
- signpost 13, 17, SIGNPOST_READ, Route13DirectionsSign
- signpost 13, 30, SIGNPOST_ITEM, Route13HiddenCalcium
+ bg_event 13, 29, BGEVENT_READ, Route13TrainerTips
+ bg_event 11, 41, BGEVENT_READ, Route13Sign
+ bg_event 13, 17, BGEVENT_READ, Route13DirectionsSign
+ bg_event 13, 30, BGEVENT_ITEM, Route13HiddenCalcium
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_YOUNGSTER, 6, 42, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, TrainerBird_keeperPerry, -1
- person_event SPRITE_YOUNGSTER, 6, 43, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, TrainerBird_keeperBret, -1
- person_event SPRITE_POKEFAN_M, 8, 32, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerPokefanmJoshua, -1
- person_event SPRITE_POKEFAN_M, 10, 14, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerHikerKenny, -1
- person_event SPRITE_POKEFAN_M, 6, 25, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerPokefanmAlex, -1
+ object_event SPRITE_YOUNGSTER, 6, 42, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerBird_keeperPerry, -1
+ object_event SPRITE_YOUNGSTER, 6, 43, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerBird_keeperBret, -1
+ object_event SPRITE_POKEFAN_M, 8, 32, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerPokefanmJoshua, -1
+ object_event SPRITE_POKEFAN_M, 10, 14, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerHikerKenny, -1
+ object_event SPRITE_POKEFAN_M, 6, 25, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerPokefanmAlex, -1
diff --git a/maps/Route14.asm b/maps/Route14.asm
index fabb3af5c..ba9a510af 100644
--- a/maps/Route14.asm
+++ b/maps/Route14.asm
@@ -5,7 +5,7 @@ const_value set 2
const ROUTE14_KIM
Route14_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -14,40 +14,40 @@ Route14_MapScriptHeader:
Kim:
faceplayer
opentext
- trade $5
+ trade NPCTRADE_KIM
waitbutton
closetext
end
TrainerPokefanmCarter:
- trainer EVENT_BEAT_POKEFANM_CARTER, POKEFANM, CARTER, PokefanmCarterSeenText, PokefanmCarterBeatenText, 0, PokefanmCarterScript
+ trainer EVENT_BEAT_POKEFANM_CARTER, POKEFANM, CARTER, PokefanmCarterSeenText, PokefanmCarterBeatenText, 0, .Script
-PokefanmCarterScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ad508
+ writetext PokefanmCarterAfterBattleText
waitbutton
closetext
end
TrainerBird_keeperRoy:
- trainer EVENT_BEAT_BIRD_KEEPER_ROY, BIRD_KEEPER, ROY, Bird_keeperRoySeenText, Bird_keeperRoyBeatenText, 0, Bird_keeperRoyScript
+ trainer EVENT_BEAT_BIRD_KEEPER_ROY, BIRD_KEEPER, ROY, Bird_keeperRoySeenText, Bird_keeperRoyBeatenText, 0, .Script
-Bird_keeperRoyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ad5a4
+ writetext Bird_keeperRoyAfterBattleText
waitbutton
closetext
end
TrainerPokefanmTrevor:
- trainer EVENT_BEAT_POKEFANM_TREVOR, POKEFANM, TREVOR, PokefanmTrevorSeenText, PokefanmTrevorBeatenText, 0, PokefanmTrevorScript
+ trainer EVENT_BEAT_POKEFANM_TREVOR, POKEFANM, TREVOR, PokefanmTrevorSeenText, PokefanmTrevorBeatenText, 0, .Script
-PokefanmTrevorScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ad660
+ writetext PokefanmTrevorAfterBattleText
waitbutton
closetext
end
@@ -64,7 +64,7 @@ PokefanmCarterBeatenText:
text "Awaaah!"
done
-UnknownText_0x1ad508:
+PokefanmCarterAfterBattleText:
text "SQUIRTLE, CHARMAN-"
line "DER and BULBASAUR…"
@@ -83,7 +83,7 @@ Bird_keeperRoyBeatenText:
line "can't ever fly…"
done
-UnknownText_0x1ad5a4:
+Bird_keeperRoyAfterBattleText:
text "You have #MON"
line "that know the HM"
@@ -107,7 +107,7 @@ PokefanmTrevorBeatenText:
line "this PSYDUCK?"
done
-UnknownText_0x1ad660:
+PokefanmTrevorAfterBattleText:
text "If only there were"
line "an easy way to"
@@ -122,15 +122,15 @@ Route14_MapEventHeader:
.Warps:
db 0
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_POKEFAN_M, 15, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerPokefanmCarter, -1
- person_event SPRITE_YOUNGSTER, 27, 11, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerBird_keeperRoy, -1
- person_event SPRITE_POKEFAN_M, 11, 6, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerPokefanmTrevor, -1
- person_event SPRITE_TEACHER, 5, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 4, Kim, -1
+ object_event SPRITE_POKEFAN_M, 15, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerPokefanmCarter, -1
+ object_event SPRITE_YOUNGSTER, 27, 11, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBird_keeperRoy, -1
+ object_event SPRITE_POKEFAN_M, 11, 6, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerPokefanmTrevor, -1
+ object_event SPRITE_TEACHER, 5, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 4, Kim, -1
diff --git a/maps/Route15.asm b/maps/Route15.asm
index 50406872e..8eb5bbb84 100644
--- a/maps/Route15.asm
+++ b/maps/Route15.asm
@@ -8,74 +8,74 @@ const_value set 2
const ROUTE15_POKE_BALL
Route15_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerTeacherColette:
- trainer EVENT_BEAT_TEACHER_COLETTE, TEACHER, COLETTE, TeacherColetteSeenText, TeacherColetteBeatenText, 0, TeacherColetteScript
+ trainer EVENT_BEAT_TEACHER_COLETTE, TEACHER, COLETTE, TeacherColetteSeenText, TeacherColetteBeatenText, 0, .Script
-TeacherColetteScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1aa60d
+ writetext TeacherColetteAfterBattleText
waitbutton
closetext
end
TrainerTeacherHillary:
- trainer EVENT_BEAT_TEACHER_HILLARY, TEACHER, HILLARY, TeacherHillarySeenText, TeacherHillaryBeatenText, 0, TeacherHillaryScript
+ trainer EVENT_BEAT_TEACHER_HILLARY, TEACHER, HILLARY, TeacherHillarySeenText, TeacherHillaryBeatenText, 0, .Script
-TeacherHillaryScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1aa6ca
+ writetext TeacherHillaryAfterBattleText
waitbutton
closetext
end
TrainerSchoolboyKipp:
- trainer EVENT_BEAT_SCHOOLBOY_KIP, SCHOOLBOY, KIPP, SchoolboyKippSeenText, SchoolboyKippBeatenText, 0, SchoolboyKippScript
+ trainer EVENT_BEAT_SCHOOLBOY_KIP, SCHOOLBOY, KIPP, SchoolboyKippSeenText, SchoolboyKippBeatenText, 0, .Script
-SchoolboyKippScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1aa740
+ writetext SchoolboyKippAfterBattleText
waitbutton
closetext
end
TrainerSchoolboyTommy:
- trainer EVENT_BEAT_SCHOOLBOY_TOMMY, SCHOOLBOY, TOMMY, SchoolboyTommySeenText, SchoolboyTommyBeatenText, 0, SchoolboyTommyScript
+ trainer EVENT_BEAT_SCHOOLBOY_TOMMY, SCHOOLBOY, TOMMY, SchoolboyTommySeenText, SchoolboyTommyBeatenText, 0, .Script
-SchoolboyTommyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1aa7bc
+ writetext SchoolboyTommyAfterBattleText
waitbutton
closetext
end
TrainerSchoolboyJohnny:
- trainer EVENT_BEAT_SCHOOLBOY_JOHNNY, SCHOOLBOY, JOHNNY, SchoolboyJohnnySeenText, SchoolboyJohnnyBeatenText, 0, SchoolboyJohnnyScript
+ trainer EVENT_BEAT_SCHOOLBOY_JOHNNY, SCHOOLBOY, JOHNNY, SchoolboyJohnnySeenText, SchoolboyJohnnyBeatenText, 0, .Script
-SchoolboyJohnnyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1aa84a
+ writetext SchoolboyJohnnyAfterBattleText
waitbutton
closetext
end
TrainerSchoolboyBilly:
- trainer EVENT_BEAT_SCHOOLBOY_BILLY, SCHOOLBOY, BILLY, SchoolboyBillySeenText, SchoolboyBillyBeatenText, 0, SchoolboyBillyScript
+ trainer EVENT_BEAT_SCHOOLBOY_BILLY, SCHOOLBOY, BILLY, SchoolboyBillySeenText, SchoolboyBillyBeatenText, 0, .Script
-SchoolboyBillyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1aa8b0
+ writetext SchoolboyBillyAfterBattleText
waitbutton
closetext
end
@@ -95,7 +95,7 @@ TeacherColetteBeatenText:
text "Kyaaah!"
done
-UnknownText_0x1aa60d:
+TeacherColetteAfterBattleText:
text "Before I became a"
line "teacher, I used to"
@@ -119,7 +119,7 @@ TeacherHillaryBeatenText:
line "lose…"
done
-UnknownText_0x1aa6ca:
+TeacherHillaryAfterBattleText:
text "Studying is impor-"
line "tant, but exercise"
cont "is just as vital."
@@ -135,7 +135,7 @@ SchoolboyKippBeatenText:
line "I was beaten!"
done
-UnknownText_0x1aa740:
+SchoolboyKippAfterBattleText:
text "My mom worries so"
line "much about me, I"
@@ -153,7 +153,7 @@ SchoolboyTommyBeatenText:
line "homework!"
done
-UnknownText_0x1aa7bc:
+SchoolboyTommyAfterBattleText:
text "Sayonara! I just"
line "learned that in my"
cont "Japanese class."
@@ -172,7 +172,7 @@ SchoolboyJohnnyBeatenText:
line "tough!"
done
-UnknownText_0x1aa84a:
+SchoolboyJohnnyAfterBattleText:
text "I'm tired of walk-"
line "ing. I need to"
cont "take a break."
@@ -188,7 +188,7 @@ SchoolboyBillyBeatenText:
line "How could I lose?"
done
-UnknownText_0x1aa8b0:
+SchoolboyBillyAfterBattleText:
text "If #MON were a"
line "subject at school,"
cont "I'd be the best!"
@@ -210,19 +210,19 @@ Route15_MapEventHeader:
warp_def $4, $2, 3, ROUTE_15_FUCHSIA_GATE
warp_def $5, $2, 4, ROUTE_15_FUCHSIA_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 9, 19, SIGNPOST_READ, Route15Sign
+ bg_event 9, 19, BGEVENT_READ, Route15Sign
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_YOUNGSTER, 10, 10, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 4, TrainerSchoolboyKipp, -1
- person_event SPRITE_YOUNGSTER, 13, 15, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerSchoolboyTommy, -1
- person_event SPRITE_YOUNGSTER, 10, 33, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerSchoolboyJohnny, -1
- person_event SPRITE_YOUNGSTER, 10, 27, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerSchoolboyBilly, -1
- person_event SPRITE_TEACHER, 12, 30, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerTeacherColette, -1
- person_event SPRITE_TEACHER, 10, 20, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerTeacherHillary, -1
- person_event SPRITE_POKE_BALL, 5, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route15PPUp, EVENT_ROUTE_15_PP_UP
+ object_event SPRITE_YOUNGSTER, 10, 10, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSchoolboyKipp, -1
+ object_event SPRITE_YOUNGSTER, 13, 15, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSchoolboyTommy, -1
+ object_event SPRITE_YOUNGSTER, 10, 33, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSchoolboyJohnny, -1
+ object_event SPRITE_YOUNGSTER, 10, 27, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSchoolboyBilly, -1
+ object_event SPRITE_TEACHER, 12, 30, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerTeacherColette, -1
+ object_event SPRITE_TEACHER, 10, 20, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerTeacherHillary, -1
+ object_event SPRITE_POKE_BALL, 5, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route15PPUp, EVENT_ROUTE_15_PP_UP
diff --git a/maps/Route15FuchsiaGate.asm b/maps/Route15FuchsiaGate.asm
index 00ba666bb..f78fab3ae 100644
--- a/maps/Route15FuchsiaGate.asm
+++ b/maps/Route15FuchsiaGate.asm
@@ -2,16 +2,16 @@ const_value set 2
const ROUTE15FUCHSIAGATE_OFFICER
Route15FuchsiaGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-OfficerScript_0x19679e:
- jumptextfaceplayer UnknownText_0x1967a1
+Route15FuchsiaGateOfficerScript:
+ jumptextfaceplayer Route15FuchsiaGateOfficerText
-UnknownText_0x1967a1:
+Route15FuchsiaGateOfficerText:
text "You're working on"
line "a #DEX? That's"
@@ -30,12 +30,12 @@ Route15FuchsiaGate_MapEventHeader:
warp_def $4, $9, 1, ROUTE_15
warp_def $5, $9, 2, ROUTE_15
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OfficerScript_0x19679e, -1
+ object_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route15FuchsiaGateOfficerScript, -1
diff --git a/maps/Route16.asm b/maps/Route16.asm
index 4d9c02ece..abbd7d7e2 100644
--- a/maps/Route16.asm
+++ b/maps/Route16.asm
@@ -1,23 +1,20 @@
Route16_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_NEWMAP, .AlwaysOnBike
- ; callbacks
-
- dbw MAPCALLBACK_NEWMAP, UnknownScript_0x1ad318
-
-UnknownScript_0x1ad318:
+.AlwaysOnBike:
checkcode VAR_YCOORD
- if_less_than $5, UnknownScript_0x1ad328
+ if_less_than $5, .CanWalk
checkcode VAR_XCOORD
- if_greater_than $d, UnknownScript_0x1ad328
+ if_greater_than $d, .CanWalk
setflag ENGINE_ALWAYS_ON_BIKE
return
-UnknownScript_0x1ad328:
+.CanWalk:
clearflag ENGINE_ALWAYS_ON_BIKE
return
@@ -43,12 +40,12 @@ Route16_MapEventHeader:
warp_def $6, $9, 1, ROUTE_16_GATE
warp_def $7, $9, 2, ROUTE_16_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 5, 5, SIGNPOST_READ, CyclingRoadSign
+ bg_event 5, 5, BGEVENT_READ, CyclingRoadSign
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/Route16FuchsiaSpeechHouse.asm b/maps/Route16FuchsiaSpeechHouse.asm
index 76cc7fa15..4b3164b23 100644
--- a/maps/Route16FuchsiaSpeechHouse.asm
+++ b/maps/Route16FuchsiaSpeechHouse.asm
@@ -2,19 +2,19 @@ const_value set 2
const ROUTE16FUCHSIASPEECHHOUSE_SUPER_NERD
Route16FuchsiaSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-SuperNerdScript_0x73373:
- jumptextfaceplayer UnknownText_0x73379
+Route16FuchsiaSpeechHouseSuperNerdScript:
+ jumptextfaceplayer Route16FuchsiaSpeechHouseSuperNerdText
Route16FuchsiaSpeechHouseBookshelf:
jumpstd picturebookshelf
-UnknownText_0x73379:
+Route16FuchsiaSpeechHouseSuperNerdText:
text "If you cruise down"
line "CYCLING ROAD, you"
@@ -31,14 +31,14 @@ Route16FuchsiaSpeechHouse_MapEventHeader:
warp_def $7, $2, 1, ROUTE_16
warp_def $7, $3, 1, ROUTE_16
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, Route16FuchsiaSpeechHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, Route16FuchsiaSpeechHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, Route16FuchsiaSpeechHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, Route16FuchsiaSpeechHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_SUPER_NERD, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x73373, -1
+ object_event SPRITE_SUPER_NERD, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route16FuchsiaSpeechHouseSuperNerdScript, -1
diff --git a/maps/Route16Gate.asm b/maps/Route16Gate.asm
index e1ed8c714..3ce10b391 100644
--- a/maps/Route16Gate.asm
+++ b/maps/Route16Gate.asm
@@ -2,20 +2,18 @@ const_value set 2
const ROUTE16GATE_OFFICER
Route16Gate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 1
-
- ; triggers
- dw UnknownScript_0x733e9, 0
+ scene_script .DummyScene
.MapCallbacks:
db 0
-UnknownScript_0x733e9:
+.DummyScene:
end
-OfficerScript_0x733ea:
- jumptextfaceplayer UnknownText_0x73408
+Route16GateOfficerScript:
+ jumptextfaceplayer Route16GateOfficerText
UnknownScript_0x733ed:
checkitem BICYCLE
@@ -37,7 +35,7 @@ MovementData_0x73405:
turn_head LEFT
step_end
-UnknownText_0x73408:
+Route16GateOfficerText:
text "CYCLING ROAD"
line "starts here."
@@ -73,14 +71,14 @@ Route16Gate_MapEventHeader:
warp_def $4, $9, 2, ROUTE_16
warp_def $5, $9, 3, ROUTE_16
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 0, $4, $5, $0, UnknownScript_0x733ed, $0, $0
- xy_trigger 0, $5, $5, $0, UnknownScript_0x733ed, $0, $0
+ coord_event 0, $4, $5, UnknownScript_0x733ed
+ coord_event 0, $5, $5, UnknownScript_0x733ed
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OfficerScript_0x733ea, -1
+ object_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route16GateOfficerScript, -1
diff --git a/maps/Route17.asm b/maps/Route17.asm
index b01ce1ddc..147e5238c 100644
--- a/maps/Route17.asm
+++ b/maps/Route17.asm
@@ -5,61 +5,58 @@ const_value set 2
const ROUTE17_BIKER4
Route17_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_NEWMAP, .AlwaysOnBike
- ; callbacks
-
- dbw MAPCALLBACK_NEWMAP, UnknownScript_0x1ad0ab
-
-UnknownScript_0x1ad0ab:
+.AlwaysOnBike:
setflag ENGINE_ALWAYS_ON_BIKE
setflag ENGINE_DOWNHILL
return
TrainerBikerCharles:
- trainer EVENT_BEAT_BIKER_CHARLES, BIKER, CHARLES, BikerCharlesSeenText, BikerCharlesBeatenText, 0, BikerCharlesScript
+ trainer EVENT_BEAT_BIKER_CHARLES, BIKER, CHARLES, BikerCharlesSeenText, BikerCharlesBeatenText, 0, .Script
-BikerCharlesScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ad293
+ writetext BikerCharlesAfterBattleText
waitbutton
closetext
end
TrainerBikerRiley:
- trainer EVENT_BEAT_BIKER_RILEY, BIKER, RILEY, BikerRileySeenText, BikerRileyBeatenText, 0, BikerRileyScript
+ trainer EVENT_BEAT_BIKER_RILEY, BIKER, RILEY, BikerRileySeenText, BikerRileyBeatenText, 0, .Script
-BikerRileyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ad13b
+ writetext BikerRileyAfterBattleText
waitbutton
closetext
end
TrainerBikerJoel:
- trainer EVENT_BEAT_BIKER_JOEL, BIKER, JOEL, BikerJoelSeenText, BikerJoelBeatenText, 0, BikerJoelScript
+ trainer EVENT_BEAT_BIKER_JOEL, BIKER, JOEL, BikerJoelSeenText, BikerJoelBeatenText, 0, .Script
-BikerJoelScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ad196
+ writetext BikerJoelAfterBattleText
waitbutton
closetext
end
TrainerBikerGlenn:
- trainer EVENT_BEAT_BIKER_GLENN, BIKER, GLENN, BikerGlennSeenText, BikerGlennBeatenText, 0, BikerGlennScript
+ trainer EVENT_BEAT_BIKER_GLENN, BIKER, GLENN, BikerGlennSeenText, BikerGlennBeatenText, 0, .Script
-BikerGlennScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ad225
+ writetext BikerGlennAfterBattleText
waitbutton
closetext
end
@@ -81,7 +78,7 @@ BikerRileyBeatenText:
text "Whoa, you kick!"
done
-UnknownText_0x1ad13b:
+BikerRileyAfterBattleText:
text "Don't get cocky,"
line "you JOHTO punk!"
done
@@ -96,7 +93,7 @@ BikerJoelBeatenText:
line "look cool…"
done
-UnknownText_0x1ad196:
+BikerJoelAfterBattleText:
text "I look cool, but"
line "I'm weak, so I'm"
cont "not really cool."
@@ -115,7 +112,7 @@ BikerGlennBeatenText:
line "awesome torque!"
done
-UnknownText_0x1ad225:
+BikerGlennAfterBattleText:
text "Hands-free riding"
line "is considered cool"
cont "on CYCLING ROAD."
@@ -131,7 +128,7 @@ BikerCharlesBeatenText:
line "burn!"
done
-UnknownText_0x1ad293:
+BikerCharlesAfterBattleText:
text "Reckless driving"
line "causes accidents!"
cont "Take it easy!"
@@ -146,17 +143,17 @@ Route17_MapEventHeader:
warp_def $52, $11, 1, ROUTE_17_18_GATE
warp_def $53, $11, 2, ROUTE_17_18_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 54, 9, SIGNPOST_ITEM, Route17HiddenMaxEther
- signpost 77, 8, SIGNPOST_ITEM, Route17HiddenMaxElixer
+ bg_event 54, 9, BGEVENT_ITEM, Route17HiddenMaxEther
+ bg_event 77, 8, BGEVENT_ITEM, Route17HiddenMaxElixer
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_BIKER, 17, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 4, TrainerBikerRiley, -1
- person_event SPRITE_BIKER, 68, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 1, TrainerBikerJoel, -1
- person_event SPRITE_BIKER, 53, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerBikerGlenn, -1
- person_event SPRITE_BIKER, 80, 6, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 4, TrainerBikerCharles, -1
+ object_event SPRITE_BIKER, 17, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 4, TrainerBikerRiley, -1
+ object_event SPRITE_BIKER, 68, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerBikerJoel, -1
+ object_event SPRITE_BIKER, 53, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBikerGlenn, -1
+ object_event SPRITE_BIKER, 80, 6, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 4, TrainerBikerCharles, -1
diff --git a/maps/Route1718Gate.asm b/maps/Route1718Gate.asm
index e1650702b..610362396 100644
--- a/maps/Route1718Gate.asm
+++ b/maps/Route1718Gate.asm
@@ -2,20 +2,18 @@ const_value set 2
const ROUTE1718GATE_OFFICER
Route1718Gate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 1
-
- ; triggers
- dw UnknownScript_0x7360d, 0
+ scene_script .DummyScene
.MapCallbacks:
db 0
-UnknownScript_0x7360d:
+.DummyScene:
end
-OfficerScript_0x7360e:
- jumptextfaceplayer UnknownText_0x7362c
+Route1718GateOfficerScript:
+ jumptextfaceplayer Route1718GateOfficerText
UnknownScript_0x73611:
checkitem BICYCLE
@@ -37,7 +35,7 @@ MovementData_0x73629:
turn_head LEFT
step_end
-UnknownText_0x7362c:
+Route1718GateOfficerText:
text "CYCLING ROAD"
line "Uphill Starts Here"
done
@@ -64,14 +62,14 @@ Route1718Gate_MapEventHeader:
warp_def $4, $9, 1, ROUTE_18
warp_def $5, $9, 2, ROUTE_18
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 0, $4, $5, $0, UnknownScript_0x73611, $0, $0
- xy_trigger 0, $5, $5, $0, UnknownScript_0x73611, $0, $0
+ coord_event 0, $4, $5, UnknownScript_0x73611
+ coord_event 0, $5, $5, UnknownScript_0x73611
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OfficerScript_0x7360e, -1
+ object_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route1718GateOfficerScript, -1
diff --git a/maps/Route18.asm b/maps/Route18.asm
index 6c28da07e..aaa2ce6cf 100644
--- a/maps/Route18.asm
+++ b/maps/Route18.asm
@@ -3,30 +3,30 @@ const_value set 2
const ROUTE18_YOUNGSTER2
Route18_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerBird_keeperBoris:
- trainer EVENT_BEAT_BIRD_KEEPER_BORIS, BIRD_KEEPER, BORIS, Bird_keeperBorisSeenText, Bird_keeperBorisBeatenText, 0, Bird_keeperBorisScript
+ trainer EVENT_BEAT_BIRD_KEEPER_BORIS, BIRD_KEEPER, BORIS, Bird_keeperBorisSeenText, Bird_keeperBorisBeatenText, 0, .Script
-Bird_keeperBorisScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1acfa5
+ writetext Bird_keeperBorisAfterBattleText
waitbutton
closetext
end
TrainerBird_keeperBob:
- trainer EVENT_BEAT_BIRD_KEEPER_BOB, BIRD_KEEPER, BOB, Bird_keeperBobSeenText, Bird_keeperBobBeatenText, 0, Bird_keeperBobScript
+ trainer EVENT_BEAT_BIRD_KEEPER_BOB, BIRD_KEEPER, BOB, Bird_keeperBobSeenText, Bird_keeperBobBeatenText, 0, .Script
-Bird_keeperBobScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ad00d
+ writetext Bird_keeperBobAfterBattleText
waitbutton
closetext
end
@@ -46,7 +46,7 @@ Bird_keeperBorisBeatenText:
text "Ayieee!"
done
-UnknownText_0x1acfa5:
+Bird_keeperBorisAfterBattleText:
text "Since you're so"
line "strong, it must be"
cont "fun to battle."
@@ -62,7 +62,7 @@ Bird_keeperBobBeatenText:
text "…Whew!"
done
-UnknownText_0x1ad00d:
+Bird_keeperBobAfterBattleText:
text "If you don't have"
line "a BICYCLE, you're"
@@ -86,14 +86,14 @@ Route18_MapEventHeader:
warp_def $6, $2, 3, ROUTE_17_18_GATE
warp_def $7, $2, 4, ROUTE_17_18_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 5, 9, SIGNPOST_READ, Route18Sign
+ bg_event 5, 9, BGEVENT_READ, Route18Sign
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_YOUNGSTER, 12, 9, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerBird_keeperBoris, -1
- person_event SPRITE_YOUNGSTER, 6, 13, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerBird_keeperBob, -1
+ object_event SPRITE_YOUNGSTER, 12, 9, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBird_keeperBoris, -1
+ object_event SPRITE_YOUNGSTER, 6, 13, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBird_keeperBob, -1
diff --git a/maps/Route19.asm b/maps/Route19.asm
index d414459a0..e0e62a5b8 100644
--- a/maps/Route19.asm
+++ b/maps/Route19.asm
@@ -7,14 +7,11 @@ const_value set 2
const ROUTE19_FISHER2
Route19_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_TILES, .ClearRocks
.ClearRocks:
@@ -30,45 +27,45 @@ Route19_MapScriptHeader:
return
TrainerSwimmerfDawn:
- trainer EVENT_BEAT_SWIMMERF_DAWN, SWIMMERF, DAWN, SwimmerfDawnSeenText, SwimmerfDawnBeatenText, 0, SwimmerfDawnScript
+ trainer EVENT_BEAT_SWIMMERF_DAWN, SWIMMERF, DAWN, SwimmerfDawnSeenText, SwimmerfDawnBeatenText, 0, .Script
-SwimmerfDawnScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19ebad
+ writetext SwimmerfDawnAfterBattleText
waitbutton
closetext
end
TrainerSwimmermHarold:
- trainer EVENT_BEAT_SWIMMERM_HAROLD, SWIMMERM, HAROLD, SwimmermHaroldSeenText, SwimmermHaroldBeatenText, 0, SwimmermHaroldScript
+ trainer EVENT_BEAT_SWIMMERM_HAROLD, SWIMMERM, HAROLD, SwimmermHaroldSeenText, SwimmermHaroldBeatenText, 0, .Script
-SwimmermHaroldScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19eab4
+ writetext SwimmermHaroldAfterBattleText
waitbutton
closetext
end
TrainerSwimmermJerome:
- trainer EVENT_BEAT_SWIMMERM_JEROME, SWIMMERM, JEROME, SwimmermJeromeSeenText, SwimmermJeromeBeatenText, 0, SwimmermJeromeScript
+ trainer EVENT_BEAT_SWIMMERM_JEROME, SWIMMERM, JEROME, SwimmermJeromeSeenText, SwimmermJeromeBeatenText, 0, .Script
-SwimmermJeromeScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19ec7e
+ writetext SwimmermJeromeAfterBattleText
waitbutton
closetext
end
TrainerSwimmermTucker:
- trainer EVENT_BEAT_SWIMMERM_TUCKER, SWIMMERM, TUCKER, SwimmermTuckerSeenText, SwimmermTuckerBeatenText, 0, SwimmermTuckerScript
+ trainer EVENT_BEAT_SWIMMERM_TUCKER, SWIMMERM, TUCKER, SwimmermTuckerSeenText, SwimmermTuckerBeatenText, 0, .Script
-SwimmermTuckerScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19eb3b
+ writetext SwimmermTuckerAfterBattleText
waitbutton
closetext
end
@@ -121,7 +118,7 @@ SwimmermHaroldBeatenText:
text "Glub…"
done
-UnknownText_0x19eab4:
+SwimmermHaroldAfterBattleText:
text "At night, the sea"
line "turns black. It"
@@ -141,7 +138,7 @@ SwimmermTuckerBeatenText:
text "I'm drowning!"
done
-UnknownText_0x19eb3b:
+SwimmermTuckerAfterBattleText:
text "I… asked my girl-"
line "friend to swim to"
cont "FUCHSIA… Gasp…"
@@ -157,7 +154,7 @@ SwimmerfDawnBeatenText:
line "at swimming…"
done
-UnknownText_0x19ebad:
+SwimmerfDawnAfterBattleText:
text "It's a quick swim"
line "between FUCHSIA"
@@ -184,7 +181,7 @@ SwimmermJeromeBeatenText:
line "win."
done
-UnknownText_0x19ec7e:
+SwimmermJeromeAfterBattleText:
text "I might be bad at"
line "swimming, but I"
cont "love the sea."
@@ -245,19 +242,19 @@ Route19_MapEventHeader:
db 1
warp_def $3, $7, 3, ROUTE_19___FUCHSIA_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 13, 11, SIGNPOST_READ, Route19Sign
- signpost 1, 11, SIGNPOST_READ, CarefulSwimmingSign
+ bg_event 13, 11, BGEVENT_READ, Route19Sign
+ bg_event 1, 11, BGEVENT_READ, CarefulSwimmingSign
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_SWIMMER_GIRL, 23, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 0, TrainerSwimmerfDawn, -1
- person_event SPRITE_SWIMMER_GUY, 28, 13, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerSwimmermHarold, -1
- person_event SPRITE_SWIMMER_GUY, 17, 11, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerSwimmermJerome, -1
- person_event SPRITE_SWIMMER_GUY, 23, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 0, TrainerSwimmermTucker, -1
- person_event SPRITE_FISHER, 5, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 1, FisherScript_0x19ea4d, -1
- person_event SPRITE_FISHER, 5, 11, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 1, FisherScript_0x19ea61, -1
+ object_event SPRITE_SWIMMER_GIRL, 23, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 0, TrainerSwimmerfDawn, -1
+ object_event SPRITE_SWIMMER_GUY, 28, 13, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermHarold, -1
+ object_event SPRITE_SWIMMER_GUY, 17, 11, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermJerome, -1
+ object_event SPRITE_SWIMMER_GUY, 23, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 0, TrainerSwimmermTucker, -1
+ object_event SPRITE_FISHER, 5, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 1, FisherScript_0x19ea4d, -1
+ object_event SPRITE_FISHER, 5, 11, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 1, FisherScript_0x19ea61, -1
diff --git a/maps/Route19FuchsiaGate.asm b/maps/Route19FuchsiaGate.asm
index fcdbc9be1..5bbf83c8c 100644
--- a/maps/Route19FuchsiaGate.asm
+++ b/maps/Route19FuchsiaGate.asm
@@ -2,7 +2,7 @@ const_value set 2
const ROUTE19FUCHSIAGATE_OFFICER
Route19FuchsiaGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -56,12 +56,12 @@ Route19FuchsiaGate_MapEventHeader:
warp_def $7, $4, 1, ROUTE_19
warp_def $7, $5, 1, ROUTE_19
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OfficerScript_0x1ab3f6, -1
+ object_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x1ab3f6, -1
diff --git a/maps/Route2.asm b/maps/Route2.asm
index 6b7a0e8ec..80f703b16 100644
--- a/maps/Route2.asm
+++ b/maps/Route2.asm
@@ -9,41 +9,41 @@ const_value set 2
const ROUTE2_FRUIT_TREE
Route2_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerBug_catcherRob:
- trainer EVENT_BEAT_BUG_CATCHER_ROB, BUG_CATCHER, ROB, Bug_catcherRobSeenText, Bug_catcherRobBeatenText, 0, Bug_catcherRobScript
+ trainer EVENT_BEAT_BUG_CATCHER_ROB, BUG_CATCHER, ROB, Bug_catcherRobSeenText, Bug_catcherRobBeatenText, 0, .Script
-Bug_catcherRobScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ac34d
+ writetext Bug_catcherRobAfterBattleText
waitbutton
closetext
end
TrainerBug_catcherEd:
- trainer EVENT_BEAT_BUG_CATCHER_ED, BUG_CATCHER, ED, Bug_catcherEdSeenText, Bug_catcherEdBeatenText, 0, Bug_catcherEdScript
+ trainer EVENT_BEAT_BUG_CATCHER_ED, BUG_CATCHER, ED, Bug_catcherEdSeenText, Bug_catcherEdBeatenText, 0, .Script
-Bug_catcherEdScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ac3cf
+ writetext Bug_catcherEdAfterBattleText
waitbutton
closetext
end
TrainerBug_catcherDoug:
- trainer EVENT_BEAT_BUG_CATCHER_DOUG, BUG_CATCHER, DOUG, Bug_catcherDougSeenText, Bug_catcherDougBeatenText, 0, Bug_catcherDougScript
+ trainer EVENT_BEAT_BUG_CATCHER_DOUG, BUG_CATCHER, DOUG, Bug_catcherDougSeenText, Bug_catcherDougBeatenText, 0, .Script
-Bug_catcherDougScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ac423
+ writetext Bug_catcherDougAfterBattleText
waitbutton
closetext
end
@@ -91,7 +91,7 @@ Bug_catcherRobBeatenText:
text "I was whipped…"
done
-UnknownText_0x1ac34d:
+Bug_catcherRobAfterBattleText:
text "I'm going to look"
line "for stronger bug"
cont "#MON."
@@ -109,7 +109,7 @@ Bug_catcherEdBeatenText:
text "Ouch, ouch, ouch!"
done
-UnknownText_0x1ac3cf:
+Bug_catcherEdAfterBattleText:
text "They'll really"
line "sting when you"
cont "take a bath."
@@ -124,7 +124,7 @@ Bug_catcherDougBeatenText:
text "No good!"
done
-UnknownText_0x1ac423:
+Bug_catcherDougAfterBattleText:
text "Bug #MON squish"
line "like plush toys"
@@ -158,25 +158,25 @@ Route2_MapEventHeader:
warp_def $1b, $11, 2, ROUTE_2_GATE
warp_def $7, $c, 3, DIGLETTS_CAVE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 6
- signpost 51, 7, SIGNPOST_READ, Route2Sign
- signpost 9, 11, SIGNPOST_READ, MapRoute2Signpost1Script
- signpost 23, 7, SIGNPOST_ITEM, Route2HiddenMaxEther
- signpost 14, 4, SIGNPOST_ITEM, Route2HiddenFullHeal
- signpost 27, 4, SIGNPOST_ITEM, Route2HiddenFullRestore
- signpost 30, 11, SIGNPOST_ITEM, Route2HiddenRevive
-
-.PersonEvents:
+ bg_event 51, 7, BGEVENT_READ, Route2Sign
+ bg_event 9, 11, BGEVENT_READ, MapRoute2Signpost1Script
+ bg_event 23, 7, BGEVENT_ITEM, Route2HiddenMaxEther
+ bg_event 14, 4, BGEVENT_ITEM, Route2HiddenFullHeal
+ bg_event 27, 4, BGEVENT_ITEM, Route2HiddenFullRestore
+ bg_event 30, 11, BGEVENT_ITEM, Route2HiddenRevive
+
+.ObjectEvents:
db 8
- person_event SPRITE_BUG_CATCHER, 45, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 5, TrainerBug_catcherRob, -1
- person_event SPRITE_BUG_CATCHER, 4, 6, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerBug_catcherEd, -1
- person_event SPRITE_BUG_CATCHER, 40, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerBug_catcherDoug, -1
- person_event SPRITE_POKE_BALL, 29, 0, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route2DireHit, EVENT_ROUTE_2_DIRE_HIT
- person_event SPRITE_POKE_BALL, 23, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route2MaxPotion, EVENT_ROUTE_2_MAX_POTION
- person_event SPRITE_POKE_BALL, 2, 19, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route2Carbos, EVENT_ROUTE_2_CARBOS
- person_event SPRITE_POKE_BALL, 50, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route2Elixer, EVENT_ROUTE_2_ELIXER
- person_event SPRITE_FRUIT_TREE, 14, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x1ac306, -1
+ object_event SPRITE_BUG_CATCHER, 45, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 5, TrainerBug_catcherRob, -1
+ object_event SPRITE_BUG_CATCHER, 4, 6, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBug_catcherEd, -1
+ object_event SPRITE_BUG_CATCHER, 40, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBug_catcherDoug, -1
+ object_event SPRITE_POKE_BALL, 29, 0, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route2DireHit, EVENT_ROUTE_2_DIRE_HIT
+ object_event SPRITE_POKE_BALL, 23, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route2MaxPotion, EVENT_ROUTE_2_MAX_POTION
+ object_event SPRITE_POKE_BALL, 2, 19, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route2Carbos, EVENT_ROUTE_2_CARBOS
+ object_event SPRITE_POKE_BALL, 50, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route2Elixer, EVENT_ROUTE_2_ELIXER
+ object_event SPRITE_FRUIT_TREE, 14, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x1ac306, -1
diff --git a/maps/Route20.asm b/maps/Route20.asm
index 3355026dd..1bdac9b3c 100644
--- a/maps/Route20.asm
+++ b/maps/Route20.asm
@@ -4,14 +4,11 @@ const_value set 2
const ROUTE20_SWIMMER_GUY
Route20_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_NEWMAP, .ClearRocks
.ClearRocks:
@@ -19,34 +16,34 @@ Route20_MapScriptHeader:
return
TrainerSwimmerfNicole:
- trainer EVENT_BEAT_SWIMMERF_NICOLE, SWIMMERF, NICOLE, SwimmerfNicoleSeenText, SwimmerfNicoleBeatenText, 0, SwimmerfNicoleScript
+ trainer EVENT_BEAT_SWIMMERF_NICOLE, SWIMMERF, NICOLE, SwimmerfNicoleSeenText, SwimmerfNicoleBeatenText, 0, .Script
-SwimmerfNicoleScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1acd93
+ writetext SwimmerfNicoleAfterBattleText
waitbutton
closetext
end
TrainerSwimmerfLori:
- trainer EVENT_BEAT_SWIMMERF_LORI, SWIMMERF, LORI, SwimmerfLoriSeenText, SwimmerfLoriBeatenText, 0, SwimmerfLoriScript
+ trainer EVENT_BEAT_SWIMMERF_LORI, SWIMMERF, LORI, SwimmerfLoriSeenText, SwimmerfLoriBeatenText, 0, .Script
-SwimmerfLoriScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ace15
+ writetext SwimmerfLoriAfterBattleText
waitbutton
closetext
end
TrainerSwimmermCameron:
- trainer EVENT_BEAT_SWIMMERM_CAMERON, SWIMMERM, CAMERON, SwimmermCameronSeenText, SwimmermCameronBeatenText, 0, SwimmermCameronScript
+ trainer EVENT_BEAT_SWIMMERM_CAMERON, SWIMMERM, CAMERON, SwimmermCameronSeenText, SwimmermCameronBeatenText, 0, .Script
-SwimmermCameronScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ace8b
+ writetext SwimmermCameronAfterBattleText
waitbutton
closetext
end
@@ -63,7 +60,7 @@ SwimmerfNicoleBeatenText:
text "Oh, no!"
done
-UnknownText_0x1acd93:
+SwimmerfNicoleAfterBattleText:
text "Swimming exercises"
line "your full body."
@@ -83,7 +80,7 @@ SwimmerfLoriBeatenText:
text "No!"
done
-UnknownText_0x1ace15:
+SwimmerfLoriAfterBattleText:
text "SURF is no longer"
line "the only HM move"
cont "you use in water."
@@ -101,7 +98,7 @@ SwimmermCameronBeatenText:
text "Aiyah!"
done
-UnknownText_0x1ace8b:
+SwimmermCameronAfterBattleText:
text "Besides the sea, I"
line "can also swim in"
cont "ponds and rivers."
@@ -123,15 +120,15 @@ Route20_MapEventHeader:
db 1
warp_def $7, $26, 1, SEAFOAM_GYM
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 11, 37, SIGNPOST_READ, CinnabarGymSign
+ bg_event 11, 37, BGEVENT_READ, CinnabarGymSign
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_SWIMMER_GIRL, 8, 52, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerSwimmerfNicole, -1
- person_event SPRITE_SWIMMER_GIRL, 13, 45, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerSwimmerfLori, -1
- person_event SPRITE_SWIMMER_GUY, 13, 12, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerSwimmermCameron, -1
+ object_event SPRITE_SWIMMER_GIRL, 8, 52, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfNicole, -1
+ object_event SPRITE_SWIMMER_GIRL, 13, 45, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfLori, -1
+ object_event SPRITE_SWIMMER_GUY, 13, 12, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermCameron, -1
diff --git a/maps/Route21.asm b/maps/Route21.asm
index bb3a2cb59..b68c3c27b 100644
--- a/maps/Route21.asm
+++ b/maps/Route21.asm
@@ -4,41 +4,41 @@ const_value set 2
const ROUTE21_FISHER
Route21_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerSwimmermSeth:
- trainer EVENT_BEAT_SWIMMERM_SETH, SWIMMERM, SETH, SwimmermSethSeenText, SwimmermSethBeatenText, 0, SwimmermSethScript
+ trainer EVENT_BEAT_SWIMMERM_SETH, SWIMMERM, SETH, SwimmermSethSeenText, SwimmermSethBeatenText, 0, .Script
-SwimmermSethScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ac873
+ writetext SwimmermSethAfterBattleText
waitbutton
closetext
end
TrainerSwimmerfNikki:
- trainer EVENT_BEAT_SWIMMERF_NIKKI, SWIMMERF, NIKKI, SwimmerfNikkiSeenText, SwimmerfNikkiBeatenText, 0, SwimmerfNikkiScript
+ trainer EVENT_BEAT_SWIMMERF_NIKKI, SWIMMERF, NIKKI, SwimmerfNikkiSeenText, SwimmerfNikkiBeatenText, 0, .Script
-SwimmerfNikkiScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ac8f1
+ writetext SwimmerfNikkiAfterBattleText
waitbutton
closetext
end
TrainerFisherArnold:
- trainer EVENT_BEAT_FISHER_ARNOLD, FISHER, ARNOLD, FisherArnoldSeenText, FisherArnoldBeatenText, 0, FisherArnoldScript
+ trainer EVENT_BEAT_FISHER_ARNOLD, FISHER, ARNOLD, FisherArnoldSeenText, FisherArnoldBeatenText, 0, .Script
-FisherArnoldScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ac95c
+ writetext FisherArnoldAfterBattleText
waitbutton
closetext
end
@@ -52,7 +52,7 @@ SwimmermSethBeatenText:
text "Glug…"
done
-UnknownText_0x1ac873:
+SwimmermSethAfterBattleText:
text "This arrogant guy"
line "was at CINNABAR's"
cont "volcano."
@@ -69,7 +69,7 @@ SwimmerfNikkiBeatenText:
line "sunburn…"
done
-UnknownText_0x1ac8f1:
+SwimmerfNikkiAfterBattleText:
text "I have to watch"
line "out for blemishes"
cont "caused by the sun."
@@ -84,7 +84,7 @@ FisherArnoldBeatenText:
text "Utter failure…"
done
-UnknownText_0x1ac95c:
+FisherArnoldAfterBattleText:
text "I'll just go back"
line "to fishing…"
done
@@ -96,14 +96,14 @@ Route21_MapEventHeader:
.Warps:
db 0
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_SWIMMER_GIRL, 16, 11, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerSwimmerfNikki, -1
- person_event SPRITE_SWIMMER_GUY, 30, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerSwimmermSeth, -1
- person_event SPRITE_FISHER, 22, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 1, TrainerFisherArnold, -1
+ object_event SPRITE_SWIMMER_GIRL, 16, 11, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfNikki, -1
+ object_event SPRITE_SWIMMER_GUY, 30, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerSwimmermSeth, -1
+ object_event SPRITE_FISHER, 22, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherArnold, -1
diff --git a/maps/Route22.asm b/maps/Route22.asm
index 9735a09e1..8e349ec34 100644
--- a/maps/Route22.asm
+++ b/maps/Route22.asm
@@ -1,5 +1,5 @@
Route22_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -23,12 +23,12 @@ Route22_MapEventHeader:
db 1
warp_def $5, $d, 1, VICTORY_ROAD_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 7, 15, SIGNPOST_READ, VictoryRoadEntranceSign
+ bg_event 7, 15, BGEVENT_READ, VictoryRoadEntranceSign
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/Route23.asm b/maps/Route23.asm
index a8bd39b5e..1c0e2aa8e 100644
--- a/maps/Route23.asm
+++ b/maps/Route23.asm
@@ -1,11 +1,9 @@
Route23_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
@@ -35,12 +33,12 @@ Route23_MapEventHeader:
warp_def $d, $9, 10, VICTORY_ROAD
warp_def $d, $a, 10, VICTORY_ROAD
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 7, 11, SIGNPOST_READ, IndigoPlateauSign
+ bg_event 7, 11, BGEVENT_READ, IndigoPlateauSign
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/Route24.asm b/maps/Route24.asm
index 365d347e5..5a98bb650 100644
--- a/maps/Route24.asm
+++ b/maps/Route24.asm
@@ -2,7 +2,7 @@ const_value set 2
const ROUTE24_ROCKET
Route24_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -125,12 +125,12 @@ Route24_MapEventHeader:
.Warps:
db 0
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_ROCKET, 7, 8, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketScript_0x1adbfa, EVENT_ROUTE_24_ROCKET
+ object_event SPRITE_ROCKET, 7, 8, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RocketScript_0x1adbfa, EVENT_ROUTE_24_ROCKET
diff --git a/maps/Route25.asm b/maps/Route25.asm
index f49c4c3d4..ca6576771 100644
--- a/maps/Route25.asm
+++ b/maps/Route25.asm
@@ -12,20 +12,18 @@ const_value set 2
const ROUTE25_POKE_BALL
Route25_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x19ee9e, 0
- dw UnknownScript_0x19ee9f, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 0
-UnknownScript_0x19ee9e:
+.DummyScene0:
end
-UnknownScript_0x19ee9f:
+.DummyScene1:
end
UnknownScript_0x19eea0:
@@ -50,7 +48,7 @@ UnknownScript_0x19eea0:
applymovement ROUTE25_MISTY, MovementData_0x19f000
disappear ROUTE25_MISTY
clearevent EVENT_TRAINERS_IN_CERULEAN_GYM
- dotrigger $0
+ setscene $0
special RestartMapMusic
end
@@ -76,83 +74,83 @@ UnknownScript_0x19eee0:
applymovement ROUTE25_MISTY, MovementData_0x19f000
disappear ROUTE25_MISTY
clearevent EVENT_TRAINERS_IN_CERULEAN_GYM
- dotrigger $0
+ setscene $0
special RestartMapMusic
end
TrainerSchoolboyDudley:
- trainer EVENT_BEAT_SCHOOLBOY_DUDLEY, SCHOOLBOY, DUDLEY, SchoolboyDudleySeenText, SchoolboyDudleyBeatenText, 0, SchoolboyDudleyScript
+ trainer EVENT_BEAT_SCHOOLBOY_DUDLEY, SCHOOLBOY, DUDLEY, SchoolboyDudleySeenText, SchoolboyDudleyBeatenText, 0, .Script
-SchoolboyDudleyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19f1b5
+ writetext SchoolboyDudleyAfterBattleText
waitbutton
closetext
end
TrainerLassEllen:
- trainer EVENT_BEAT_LASS_ELLEN, LASS, ELLEN, LassEllenSeenText, LassEllenBeatenText, 0, LassEllenScript
+ trainer EVENT_BEAT_LASS_ELLEN, LASS, ELLEN, LassEllenSeenText, LassEllenBeatenText, 0, .Script
-LassEllenScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19f208
+ writetext LassEllenAfterBattleText
waitbutton
closetext
end
TrainerSchoolboyJoe:
- trainer EVENT_BEAT_SCHOOLBOY_JOE, SCHOOLBOY, JOE, SchoolboyJoeSeenText, SchoolboyJoeBeatenText, 0, SchoolboyJoeScript
+ trainer EVENT_BEAT_SCHOOLBOY_JOE, SCHOOLBOY, JOE, SchoolboyJoeSeenText, SchoolboyJoeBeatenText, 0, .Script
-SchoolboyJoeScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19f25c
+ writetext SchoolboyJoeAfterBattleText
waitbutton
closetext
end
TrainerLassLaura:
- trainer EVENT_BEAT_LASS_LAURA, LASS, LAURA, LassLauraSeenText, LassLauraBeatenText, 0, LassLauraScript
+ trainer EVENT_BEAT_LASS_LAURA, LASS, LAURA, LassLauraSeenText, LassLauraBeatenText, 0, .Script
-LassLauraScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19f2a6
+ writetext LassLauraAfterBattleText
waitbutton
closetext
end
TrainerCamperLloyd:
- trainer EVENT_BEAT_CAMPER_LLOYD, CAMPER, LLOYD, CamperLloydSeenText, CamperLloydBeatenText, 0, CamperLloydScript
+ trainer EVENT_BEAT_CAMPER_LLOYD, CAMPER, LLOYD, CamperLloydSeenText, CamperLloydBeatenText, 0, .Script
-CamperLloydScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19f2f8
+ writetext CamperLloydAfterBattleText
waitbutton
closetext
end
TrainerLassShannon:
- trainer EVENT_BEAT_LASS_SHANNON, LASS, SHANNON, LassShannonSeenText, LassShannonBeatenText, 0, LassShannonScript
+ trainer EVENT_BEAT_LASS_SHANNON, LASS, SHANNON, LassShannonSeenText, LassShannonBeatenText, 0, .Script
-LassShannonScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19f35b
+ writetext LassShannonAfterBattleText
waitbutton
closetext
end
TrainerSupernerdPat:
- trainer EVENT_BEAT_SUPER_NERD_PAT, SUPER_NERD, PAT, SupernerdPatSeenText, SupernerdPatBeatenText, 0, SupernerdPatScript
+ trainer EVENT_BEAT_SUPER_NERD_PAT, SUPER_NERD, PAT, SupernerdPatSeenText, SupernerdPatBeatenText, 0, .Script
-SupernerdPatScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19f41a
+ writetext SupernerdPatAfterBattleText
waitbutton
closetext
end
@@ -287,7 +285,7 @@ SchoolboyDudleyBeatenText:
text "Whoo! Good stuff."
done
-UnknownText_0x19f1b5:
+SchoolboyDudleyAfterBattleText:
text "I did my best."
line "I have no regrets."
done
@@ -301,7 +299,7 @@ LassEllenBeatenText:
text "How could I lose?"
done
-UnknownText_0x19f208:
+LassEllenAfterBattleText:
text "I did my best."
line "I have no regrets."
done
@@ -315,7 +313,7 @@ SchoolboyJoeBeatenText:
text "Ow! Stomped flat!"
done
-UnknownText_0x19f25c:
+SchoolboyJoeAfterBattleText:
text "I did my best."
line "I have no regrets."
done
@@ -329,7 +327,7 @@ LassLauraBeatenText:
text "I lost too…"
done
-UnknownText_0x19f2a6:
+LassLauraAfterBattleText:
text "I did my best."
line "I have no regrets."
done
@@ -343,7 +341,7 @@ CamperLloydBeatenText:
text "Whoa! Too much."
done
-UnknownText_0x19f2f8:
+CamperLloydAfterBattleText:
text "I did my best."
line "I have no regrets."
done
@@ -358,7 +356,7 @@ LassShannonBeatenText:
text "You're kidding."
done
-UnknownText_0x19f35b:
+LassShannonAfterBattleText:
text "I did my best."
line "I have no regrets."
done
@@ -382,7 +380,7 @@ SupernerdPatBeatenText:
line "at all?"
done
-UnknownText_0x19f41a:
+SupernerdPatAfterBattleText:
text "I'm sorry… I won't"
line "cheat anymore…"
done
@@ -440,26 +438,26 @@ Route25_MapEventHeader:
db 1
warp_def $5, $2f, 1, BILLS_HOUSE
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 1, $6, $2a, $0, UnknownScript_0x19eea0, $0, $0
- xy_trigger 1, $7, $2a, $0, UnknownScript_0x19eee0, $0, $0
+ coord_event 1, $6, $2a, UnknownScript_0x19eea0
+ coord_event 1, $7, $2a, UnknownScript_0x19eee0
-.Signposts:
+.BGEvents:
db 2
- signpost 5, 45, SIGNPOST_READ, BillsHouseSign
- signpost 5, 4, SIGNPOST_ITEM, Route25HiddenPotion
+ bg_event 5, 45, BGEVENT_READ, BillsHouseSign
+ bg_event 5, 4, BGEVENT_ITEM, Route25HiddenPotion
-.PersonEvents:
+.ObjectEvents:
db 11
- person_event SPRITE_MISTY, 9, 46, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_ROUTE_25_MISTY_BOYFRIEND
- person_event SPRITE_COOLTRAINER_M, 10, 46, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_ROUTE_25_MISTY_BOYFRIEND
- person_event SPRITE_YOUNGSTER, 8, 12, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerSchoolboyDudley, -1
- person_event SPRITE_LASS, 11, 16, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerLassEllen, -1
- person_event SPRITE_YOUNGSTER, 8, 21, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerSchoolboyJoe, -1
- person_event SPRITE_LASS, 6, 22, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerLassLaura, -1
- person_event SPRITE_YOUNGSTER, 4, 25, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 2, TrainerCamperLloyd, -1
- person_event SPRITE_LASS, 11, 28, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerLassShannon, -1
- person_event SPRITE_SUPER_NERD, 7, 31, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 1, TrainerSupernerdPat, -1
- person_event SPRITE_COOLTRAINER_M, 8, 37, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x19efac, -1
- person_event SPRITE_POKE_BALL, 4, 32, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route25Protein, EVENT_ROUTE_25_PROTEIN
+ object_event SPRITE_MISTY, 9, 46, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ROUTE_25_MISTY_BOYFRIEND
+ object_event SPRITE_COOLTRAINER_M, 10, 46, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ROUTE_25_MISTY_BOYFRIEND
+ object_event SPRITE_YOUNGSTER, 8, 12, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSchoolboyDudley, -1
+ object_event SPRITE_LASS, 11, 16, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerLassEllen, -1
+ object_event SPRITE_YOUNGSTER, 8, 21, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerSchoolboyJoe, -1
+ object_event SPRITE_LASS, 6, 22, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerLassLaura, -1
+ object_event SPRITE_YOUNGSTER, 4, 25, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerCamperLloyd, -1
+ object_event SPRITE_LASS, 11, 28, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerLassShannon, -1
+ object_event SPRITE_SUPER_NERD, 7, 31, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerSupernerdPat, -1
+ object_event SPRITE_COOLTRAINER_M, 8, 37, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CooltrainerMScript_0x19efac, -1
+ object_event SPRITE_POKE_BALL, 4, 32, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route25Protein, EVENT_ROUTE_25_PROTEIN
diff --git a/maps/Route26.asm b/maps/Route26.asm
index ccc32ed63..91fcc9fab 100644
--- a/maps/Route26.asm
+++ b/maps/Route26.asm
@@ -9,27 +9,27 @@ const_value set 2
const ROUTE26_POKE_BALL
Route26_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerCooltrainermJake:
- trainer EVENT_BEAT_COOLTRAINERM_JAKE, COOLTRAINERM, JAKE, CooltrainermJakeSeenText, CooltrainermJakeBeatenText, 0, CooltrainermJakeScript
+ trainer EVENT_BEAT_COOLTRAINERM_JAKE, COOLTRAINERM, JAKE, CooltrainermJakeSeenText, CooltrainermJakeBeatenText, 0, .Script
-CooltrainermJakeScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a4f08
+ writetext CooltrainermJakeAfterBattleText
waitbutton
closetext
end
TrainerCooltrainermGaven3:
- trainer EVENT_BEAT_COOLTRAINERM_GAVEN, COOLTRAINERM, GAVEN3, CooltrainermGaven3SeenText, CooltrainermGaven3BeatenText, 0, CooltrainermGaven3Script
+ trainer EVENT_BEAT_COOLTRAINERM_GAVEN, COOLTRAINERM, GAVEN3, CooltrainermGaven3SeenText, CooltrainermGaven3BeatenText, 0, .Script
-CooltrainermGaven3Script:
+.Script:
writecode VAR_CALLERID, PHONE_COOLTRAINERM_GAVEN
end_if_just_battled
opentext
@@ -120,20 +120,20 @@ UnknownScript_0x1a4dd7:
end
TrainerCooltrainerfJoyce:
- trainer EVENT_BEAT_COOLTRAINERF_JOYCE, COOLTRAINERF, JOYCE, CooltrainerfJoyceSeenText, CooltrainerfJoyceBeatenText, 0, CooltrainerfJoyceScript
+ trainer EVENT_BEAT_COOLTRAINERF_JOYCE, COOLTRAINERF, JOYCE, CooltrainerfJoyceSeenText, CooltrainerfJoyceBeatenText, 0, .Script
-CooltrainerfJoyceScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a50d7
+ writetext CooltrainerfJoyceAfterBattleText
waitbutton
closetext
end
TrainerCooltrainerfBeth1:
- trainer EVENT_BEAT_COOLTRAINERF_BETH, COOLTRAINERF, BETH1, CooltrainerfBeth1SeenText, CooltrainerfBeth1BeatenText, 0, CooltrainerfBeth1Script
+ trainer EVENT_BEAT_COOLTRAINERF_BETH, COOLTRAINERF, BETH1, CooltrainerfBeth1SeenText, CooltrainerfBeth1BeatenText, 0, .Script
-CooltrainerfBeth1Script:
+.Script:
writecode VAR_CALLERID, PHONE_COOLTRAINERF_BETH
end_if_just_battled
opentext
@@ -224,23 +224,23 @@ UnknownScript_0x1a4e93:
end
TrainerPsychicRichard:
- trainer EVENT_BEAT_PSYCHIC_RICHARD, PSYCHIC_T, RICHARD, PsychicRichardSeenText, PsychicRichardBeatenText, 0, PsychicRichardScript
+ trainer EVENT_BEAT_PSYCHIC_RICHARD, PSYCHIC_T, RICHARD, PsychicRichardSeenText, PsychicRichardBeatenText, 0, .Script
-PsychicRichardScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a5278
+ writetext PsychicRichardAfterBattleText
waitbutton
closetext
end
TrainerFisherScott:
- trainer EVENT_BEAT_FISHER_SCOTT, FISHER, SCOTT, FisherScottSeenText, FisherScottBeatenText, 0, FisherScottScript
+ trainer EVENT_BEAT_FISHER_SCOTT, FISHER, SCOTT, FisherScottSeenText, FisherScottBeatenText, 0, .Script
-FisherScottScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a5326
+ writetext FisherScottAfterBattleText
waitbutton
closetext
end
@@ -266,7 +266,7 @@ CooltrainermJakeBeatenText:
text "I blew it!"
done
-UnknownText_0x1a4f08:
+CooltrainermJakeAfterBattleText:
text "It's going to be"
line "tough to win at"
cont "the LEAGUE."
@@ -321,7 +321,7 @@ CooltrainerfJoyceBeatenText:
line "believe this!"
done
-UnknownText_0x1a50d7:
+CooltrainerfJoyceAfterBattleText:
text "I've defeated"
line "eight GYM LEADERS,"
@@ -374,7 +374,7 @@ PsychicRichardBeatenText:
text "Good battle!"
done
-UnknownText_0x1a5278:
+PsychicRichardAfterBattleText:
text "People and #MON"
line "grow from their"
cont "experiences."
@@ -397,7 +397,7 @@ FisherScottBeatenText:
line "battle!"
done
-UnknownText_0x1a5326:
+FisherScottAfterBattleText:
text "Just like in fish-"
line "ing, it's all over"
@@ -422,20 +422,20 @@ Route26_MapEventHeader:
warp_def $39, $f, 1, ROUTE_26_HEAL_SPEECH_HOUSE
warp_def $47, $5, 1, ROUTE_26_DAY_OF_WEEK_SIBLINGS_HOUSE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 6, 8, SIGNPOST_READ, Route26Sign
+ bg_event 6, 8, BGEVENT_READ, Route26Sign
-.PersonEvents:
+.ObjectEvents:
db 8
- person_event SPRITE_COOLTRAINER_M, 24, 14, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 2, TrainerCooltrainermJake, -1
- person_event SPRITE_COOLTRAINER_M, 38, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerCooltrainermGaven3, -1
- person_event SPRITE_COOLTRAINER_F, 56, 10, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerCooltrainerfJoyce, -1
- person_event SPRITE_COOLTRAINER_F, 8, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerCooltrainerfBeth1, -1
- person_event SPRITE_YOUNGSTER, 79, 13, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, TrainerPsychicRichard, -1
- person_event SPRITE_FISHER, 92, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerFisherScott, -1
- person_event SPRITE_FRUIT_TREE, 54, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x1a4ec2, -1
- person_event SPRITE_POKE_BALL, 15, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route26MaxElixer, EVENT_ROUTE_26_MAX_ELIXER
+ object_event SPRITE_COOLTRAINER_M, 24, 14, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerCooltrainermJake, -1
+ object_event SPRITE_COOLTRAINER_M, 38, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainermGaven3, -1
+ object_event SPRITE_COOLTRAINER_F, 56, 10, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainerfJoyce, -1
+ object_event SPRITE_COOLTRAINER_F, 8, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerCooltrainerfBeth1, -1
+ object_event SPRITE_YOUNGSTER, 79, 13, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerPsychicRichard, -1
+ object_event SPRITE_FISHER, 92, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerFisherScott, -1
+ object_event SPRITE_FRUIT_TREE, 54, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x1a4ec2, -1
+ object_event SPRITE_POKE_BALL, 15, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route26MaxElixer, EVENT_ROUTE_26_MAX_ELIXER
diff --git a/maps/Route26DayofWeekSiblingsHouse.asm b/maps/Route26DayofWeekSiblingsHouse.asm
index 6463ba89e..da946711d 100644
--- a/maps/Route26DayofWeekSiblingsHouse.asm
+++ b/maps/Route26DayofWeekSiblingsHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const ROUTE26DAYOFWEEKSIBLINGSHOUSE_POKEDEX
Route26DayofWeekSiblingsHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -79,12 +79,12 @@ Route26DayofWeekSiblingsHouse_MapEventHeader:
warp_def $7, $2, 3, ROUTE_26
warp_def $7, $3, 3, ROUTE_26
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKEDEX, 3, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokedexScript_0x7b1e4, -1
+ object_event SPRITE_POKEDEX, 3, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PokedexScript_0x7b1e4, -1
diff --git a/maps/Route26HealSpeechHouse.asm b/maps/Route26HealSpeechHouse.asm
index 050493637..11a8cc50d 100644
--- a/maps/Route26HealSpeechHouse.asm
+++ b/maps/Route26HealSpeechHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const ROUTE26HEALSPEECHHOUSE_TEACHER
Route26HealSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -57,14 +57,14 @@ Route26HealSpeechHouse_MapEventHeader:
warp_def $7, $2, 2, ROUTE_26
warp_def $7, $3, 2, ROUTE_26
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, Route26HealHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, Route26HealHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, Route26HealHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, Route26HealHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_TEACHER, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, TeacherScript_0x7b125, -1
+ object_event SPRITE_TEACHER, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x7b125, -1
diff --git a/maps/Route27.asm b/maps/Route27.asm
index 1ff42703a..a058af254 100644
--- a/maps/Route27.asm
+++ b/maps/Route27.asm
@@ -10,20 +10,18 @@ const_value set 2
const ROUTE27_FISHER
Route27_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x1a0871, 0
- dw UnknownScript_0x1a0872, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 0
-UnknownScript_0x1a0871:
+.DummyScene0:
end
-UnknownScript_0x1a0872:
+.DummyScene1:
end
UnknownScript_0x1a0873:
@@ -41,30 +39,30 @@ UnknownScript_0x1a088c:
opentext
writetext UnknownText_0x1a0a6b
buttonsound
- writetext UnknownText_0x1a0a71
+ writetext Route27FisherText
waitbutton
closetext
- dotrigger $1
+ setscene $1
end
-FisherScript_0x1a089c:
- jumptextfaceplayer UnknownText_0x1a0a71
+Route27FisherScript:
+ jumptextfaceplayer Route27FisherText
TrainerPsychicGilbert:
- trainer EVENT_BEAT_PSYCHIC_GILBERT, PSYCHIC_T, GILBERT, PsychicGilbertSeenText, PsychicGilbertBeatenText, 0, PsychicGilbertScript
+ trainer EVENT_BEAT_PSYCHIC_GILBERT, PSYCHIC_T, GILBERT, PsychicGilbertSeenText, PsychicGilbertBeatenText, 0, .Script
-PsychicGilbertScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a0dd2
+ writetext PsychicGilbertAfterBattleText
waitbutton
closetext
end
TrainerBird_keeperJose2:
- trainer EVENT_BEAT_BIRD_KEEPER_JOSE2, BIRD_KEEPER, JOSE2, Bird_keeperJose2SeenText, Bird_keeperJose2BeatenText, 0, Bird_keeperJose2Script
+ trainer EVENT_BEAT_BIRD_KEEPER_JOSE2, BIRD_KEEPER, JOSE2, Bird_keeperJose2SeenText, Bird_keeperJose2BeatenText, 0, .Script
-Bird_keeperJose2Script:
+.Script:
writecode VAR_CALLERID, PHONE_BIRDKEEPER_JOSE
end_if_just_battled
opentext
@@ -175,31 +173,31 @@ UnknownScript_0x1a0977:
end
TrainerCooltrainermBlake:
- trainer EVENT_BEAT_COOLTRAINERM_BLAKE, COOLTRAINERM, BLAKE, CooltrainermBlakeSeenText, CooltrainermBlakeBeatenText, 0, CooltrainermBlakeScript
+ trainer EVENT_BEAT_COOLTRAINERM_BLAKE, COOLTRAINERM, BLAKE, CooltrainermBlakeSeenText, CooltrainermBlakeBeatenText, 0, .Script
-CooltrainermBlakeScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a0b0b
+ writetext CooltrainermBlakeAfterBattleText
waitbutton
closetext
end
TrainerCooltrainermBrian:
- trainer EVENT_BEAT_COOLTRAINERM_BRIAN, COOLTRAINERM, BRIAN, CooltrainermBrianSeenText, CooltrainermBrianBeatenText, 0, CooltrainermBrianScript
+ trainer EVENT_BEAT_COOLTRAINERM_BRIAN, COOLTRAINERM, BRIAN, CooltrainermBrianSeenText, CooltrainermBrianBeatenText, 0, .Script
-CooltrainermBrianScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a0bac
+ writetext CooltrainermBrianAfterBattleText
waitbutton
closetext
end
TrainerCooltrainerfReena:
- trainer EVENT_BEAT_COOLTRAINERF_REENA, COOLTRAINERF, REENA1, CooltrainerfReena1SeenText, CooltrainerfReena1BeatenText, 0, CooltrainerfReena1Script
+ trainer EVENT_BEAT_COOLTRAINERF_REENA, COOLTRAINERF, REENA1, CooltrainerfReena1SeenText, CooltrainerfReena1BeatenText, 0, .Script
-CooltrainerfReena1Script:
+.Script:
writecode VAR_CALLERID, PHONE_COOLTRAINERF_REENA
end_if_just_battled
opentext
@@ -290,12 +288,12 @@ UnknownScript_0x1a0a47:
end
TrainerCooltrainerfMegan:
- trainer EVENT_BEAT_COOLTRAINERF_MEGAN, COOLTRAINERF, MEGAN, CooltrainerfMeganSeenText, CooltrainerfMeganBeatenText, 0, CooltrainerfMeganScript
+ trainer EVENT_BEAT_COOLTRAINERF_MEGAN, COOLTRAINERF, MEGAN, CooltrainerfMeganSeenText, CooltrainerfMeganBeatenText, 0, .Script
-CooltrainerfMeganScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a0cce
+ writetext CooltrainerfMeganAfterBattleText
waitbutton
closetext
end
@@ -322,7 +320,7 @@ UnknownText_0x1a0a6b:
text "Hey!"
done
-UnknownText_0x1a0a71:
+Route27FisherText:
text "Do you know what"
line "you just did?"
@@ -344,7 +342,7 @@ CooltrainermBlakeBeatenText:
text "Yow!"
done
-UnknownText_0x1a0b0b:
+CooltrainermBlakeAfterBattleText:
text "If you prevail on"
line "this harsh trek,"
@@ -365,7 +363,7 @@ CooltrainermBrianBeatenText:
text "Just as I thought!"
done
-UnknownText_0x1a0bac:
+CooltrainermBrianAfterBattleText:
text "A good trainer can"
line "recognize other"
cont "good trainers."
@@ -405,7 +403,7 @@ CooltrainerfMeganBeatenText:
line "strong!"
done
-UnknownText_0x1a0cce:
+CooltrainerfMeganAfterBattleText:
text "I'm checking out"
line "pre- and post-"
cont "evolution #MON."
@@ -436,7 +434,7 @@ PsychicGilbertBeatenText:
text "You're too much!"
done
-UnknownText_0x1a0dd2:
+PsychicGilbertAfterBattleText:
text "With your skills,"
line "you'll do well at"
cont "the LEAGUE."
@@ -479,23 +477,23 @@ Route27_MapEventHeader:
warp_def $5, $1a, 1, TOHJO_FALLS
warp_def $5, $24, 2, TOHJO_FALLS
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 0, $a, $12, $0, UnknownScript_0x1a0873, $0, $0
- xy_trigger 0, $a, $13, $0, UnknownScript_0x1a0881, $0, $0
+ coord_event 0, $a, $12, UnknownScript_0x1a0873
+ coord_event 0, $a, $13, UnknownScript_0x1a0881
-.Signposts:
+.BGEvents:
db 1
- signpost 7, 25, SIGNPOST_READ, TohjoFallsSign
+ bg_event 7, 25, BGEVENT_READ, TohjoFallsSign
-.PersonEvents:
+.ObjectEvents:
db 9
- person_event SPRITE_COOLTRAINER_M, 7, 48, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerCooltrainermBlake, -1
- person_event SPRITE_COOLTRAINER_M, 6, 58, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerCooltrainermBrian, -1
- person_event SPRITE_COOLTRAINER_F, 10, 72, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerCooltrainerfReena, -1
- person_event SPRITE_COOLTRAINER_F, 6, 37, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 2, TrainerCooltrainerfMegan, -1
- person_event SPRITE_YOUNGSTER, 7, 65, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerPsychicGilbert, -1
- person_event SPRITE_YOUNGSTER, 13, 58, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerBird_keeperJose2, -1
- person_event SPRITE_POKE_BALL, 12, 60, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route27TMSolarbeam, EVENT_ROUTE_27_TM_SOLARBEAM
- person_event SPRITE_POKE_BALL, 12, 53, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route27RareCandy, EVENT_ROUTE_27_RARE_CANDY
- person_event SPRITE_FISHER, 10, 21, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 3, FisherScript_0x1a089c, -1
+ object_event SPRITE_COOLTRAINER_M, 7, 48, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainermBlake, -1
+ object_event SPRITE_COOLTRAINER_M, 6, 58, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerCooltrainermBrian, -1
+ object_event SPRITE_COOLTRAINER_F, 10, 72, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerCooltrainerfReena, -1
+ object_event SPRITE_COOLTRAINER_F, 6, 37, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerCooltrainerfMegan, -1
+ object_event SPRITE_YOUNGSTER, 7, 65, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPsychicGilbert, -1
+ object_event SPRITE_YOUNGSTER, 13, 58, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBird_keeperJose2, -1
+ object_event SPRITE_POKE_BALL, 12, 60, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route27TMSolarbeam, EVENT_ROUTE_27_TM_SOLARBEAM
+ object_event SPRITE_POKE_BALL, 12, 53, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route27RareCandy, EVENT_ROUTE_27_RARE_CANDY
+ object_event SPRITE_FISHER, 10, 21, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 3, Route27FisherScript, -1
diff --git a/maps/Route27SandstormHouse.asm b/maps/Route27SandstormHouse.asm
index 1a7d77dee..5e43f661c 100644
--- a/maps/Route27SandstormHouse.asm
+++ b/maps/Route27SandstormHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const ROUTE27SANDSTORMHOUSE_GRANNY
Route27SandstormHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -102,14 +102,14 @@ Route27SandstormHouse_MapEventHeader:
warp_def $7, $2, 1, ROUTE_27
warp_def $7, $3, 1, ROUTE_27
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, SandstormHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, SandstormHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, SandstormHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, SandstormHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_GRANNY, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SandstormHouseWoman, -1
+ object_event SPRITE_GRANNY, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SandstormHouseWoman, -1
diff --git a/maps/Route28.asm b/maps/Route28.asm
index 6923947fb..eb87b2701 100644
--- a/maps/Route28.asm
+++ b/maps/Route28.asm
@@ -1,5 +1,5 @@
Route28_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -25,13 +25,13 @@ Route28_MapEventHeader:
warp_def $3, $7, 1, ROUTE_28_FAMOUS_SPEECH_HOUSE
warp_def $5, $21, 7, VICTORY_ROAD_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 5, 31, SIGNPOST_READ, Route28Sign
- signpost 2, 25, SIGNPOST_ITEM, Route28HiddenRareCandy
+ bg_event 5, 31, BGEVENT_READ, Route28Sign
+ bg_event 2, 25, BGEVENT_ITEM, Route28HiddenRareCandy
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/Route28FamousSpeechHouse.asm b/maps/Route28FamousSpeechHouse.asm
index 0e0f95f01..e8da9da02 100644
--- a/maps/Route28FamousSpeechHouse.asm
+++ b/maps/Route28FamousSpeechHouse.asm
@@ -3,16 +3,14 @@ const_value set 2
const ROUTE28FAMOUSSPEECHHOUSE_FEAROW
Route28FamousSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 1
-
- ; triggers
- dw .Trigger, 0
+ scene_script .DummyScene
.MapCallbacks:
db 0
-.Trigger:
+.DummyScene:
end
Celebrity:
@@ -81,15 +79,15 @@ Route28FamousSpeechHouse_MapEventHeader:
warp_def $7, $2, 1, ROUTE_28
warp_def $7, $3, 1, ROUTE_28
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, CelebrityHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, CelebrityHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, CelebrityHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, CelebrityHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_COOLTRAINER_F, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, Celebrity, -1
- person_event SPRITE_MOLTRES, 5, 6, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, CelebritysFearow, -1
+ object_event SPRITE_COOLTRAINER_F, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Celebrity, -1
+ object_event SPRITE_MOLTRES, 5, 6, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CelebritysFearow, -1
diff --git a/maps/Route29.asm b/maps/Route29.asm
index 629c4dd77..a7bb9ecc5 100644
--- a/maps/Route29.asm
+++ b/maps/Route29.asm
@@ -9,24 +9,19 @@ const_value set 2
const ROUTE29_POKE_BALL
Route29_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_OBJECTS, .Tuscany
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
+.DummyScene1:
end
.Tuscany:
@@ -64,7 +59,7 @@ Route29Tutorial1:
writetext CatchingTutorialDebriefText
waitbutton
closetext
- dotrigger $0
+ setscene $0
setevent EVENT_LEARNED_TO_CATCH_POKEMON
end
@@ -89,7 +84,7 @@ Route29Tutorial2:
writetext CatchingTutorialDebriefText
waitbutton
closetext
- dotrigger $0
+ setscene $0
setevent EVENT_LEARNED_TO_CATCH_POKEMON
end
@@ -98,7 +93,7 @@ Script_RefusedTutorial1:
waitbutton
closetext
applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData1b
- dotrigger $0
+ setscene $0
end
Script_RefusedTutorial2:
@@ -106,7 +101,7 @@ Script_RefusedTutorial2:
waitbutton
closetext
applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData2b
- dotrigger $0
+ setscene $0
end
CatchingTutorialDudeScript:
@@ -428,23 +423,23 @@ Route29_MapEventHeader:
db 1
warp_def $1, $1b, 3, ROUTE_29_46_GATE
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 1, $8, $35, $0, Route29Tutorial1, $0, $0
- xy_trigger 1, $9, $35, $0, Route29Tutorial2, $0, $0
+ coord_event 1, $8, $35, Route29Tutorial1
+ coord_event 1, $9, $35, Route29Tutorial2
-.Signposts:
+.BGEvents:
db 2
- signpost 7, 51, SIGNPOST_READ, Route29Sign1
- signpost 5, 3, SIGNPOST_READ, Route29Sign2
+ bg_event 7, 51, BGEVENT_READ, Route29Sign1
+ bg_event 5, 3, BGEVENT_READ, Route29Sign2
-.PersonEvents:
+.ObjectEvents:
db 8
- person_event SPRITE_COOLTRAINER_M, 12, 50, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CatchingTutorialDudeScript, -1
- person_event SPRITE_YOUNGSTER, 16, 27, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, Route29YoungsterScript, -1
- person_event SPRITE_TEACHER, 11, 15, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, Route29TeacherScript, -1
- person_event SPRITE_FRUIT_TREE, 2, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route29FruitTree, -1
- person_event SPRITE_FISHER, 3, 25, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, Route29FisherScript, -1
- person_event SPRITE_COOLTRAINER_M, 4, 13, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x1a1031, -1
- person_event SPRITE_TEACHER, 12, 29, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TuscanyScript, EVENT_ROUTE_29_TUSCANY_OF_TUESDAY
- person_event SPRITE_POKE_BALL, 2, 48, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route29Potion, EVENT_ROUTE_29_POTION
+ object_event SPRITE_COOLTRAINER_M, 12, 50, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CatchingTutorialDudeScript, -1
+ object_event SPRITE_YOUNGSTER, 16, 27, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route29YoungsterScript, -1
+ object_event SPRITE_TEACHER, 11, 15, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route29TeacherScript, -1
+ object_event SPRITE_FRUIT_TREE, 2, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route29FruitTree, -1
+ object_event SPRITE_FISHER, 3, 25, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route29FisherScript, -1
+ object_event SPRITE_COOLTRAINER_M, 4, 13, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CooltrainerMScript_0x1a1031, -1
+ object_event SPRITE_TEACHER, 12, 29, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TuscanyScript, EVENT_ROUTE_29_TUSCANY_OF_TUESDAY
+ object_event SPRITE_POKE_BALL, 2, 48, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route29Potion, EVENT_ROUTE_29_POTION
diff --git a/maps/Route2946Gate.asm b/maps/Route2946Gate.asm
index 2101fbe64..a3d824eec 100644
--- a/maps/Route2946Gate.asm
+++ b/maps/Route2946Gate.asm
@@ -3,19 +3,19 @@ const_value set 2
const ROUTE2946GATE_YOUNGSTER
Route2946Gate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-OfficerScript_0x7b5bb:
- jumptextfaceplayer UnknownText_0x7b5c1
+Route2946GateOfficerScript:
+ jumptextfaceplayer Route2946GateOfficerText
-YoungsterScript_0x7b5be:
- jumptextfaceplayer UnknownText_0x7b60d
+Route2946GateYoungsterScript:
+ jumptextfaceplayer Route2946GateYoungsterText
-UnknownText_0x7b5c1:
+Route2946GateOfficerText:
text "You can't climb"
line "ledges."
@@ -24,7 +24,7 @@ UnknownText_0x7b5c1:
cont "take a shortcut."
done
-UnknownText_0x7b60d:
+Route2946GateYoungsterText:
text "Different kinds of"
line "#MON appear"
cont "past here."
@@ -47,13 +47,13 @@ Route2946Gate_MapEventHeader:
warp_def $7, $4, 1, ROUTE_29
warp_def $7, $5, 1, ROUTE_29
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, OfficerScript_0x7b5bb, -1
- person_event SPRITE_YOUNGSTER, 4, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x7b5be, -1
+ object_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route2946GateOfficerScript, -1
+ object_event SPRITE_YOUNGSTER, 4, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route2946GateYoungsterScript, -1
diff --git a/maps/Route2Gate.asm b/maps/Route2Gate.asm
index f567dd3ae..954714590 100644
--- a/maps/Route2Gate.asm
+++ b/maps/Route2Gate.asm
@@ -2,16 +2,16 @@ const_value set 2
const ROUTE2GATE_SCIENTIST
Route2Gate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-ScientistScript_0x9b952:
- jumptextfaceplayer UnknownText_0x9b955
+Route2GateScientistScript:
+ jumptextfaceplayer Route2GateScientistText
-UnknownText_0x9b955:
+Route2GateScientistText:
text "Are you <PLAY_G>?"
para "I work as PROF."
@@ -36,12 +36,12 @@ Route2Gate_MapEventHeader:
warp_def $7, $4, 2, ROUTE_2
warp_def $7, $5, 2, ROUTE_2
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_SCIENTIST, 4, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ScientistScript_0x9b952, -1
+ object_event SPRITE_SCIENTIST, 4, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route2GateScientistScript, -1
diff --git a/maps/Route2NuggetSpeechHouse.asm b/maps/Route2NuggetSpeechHouse.asm
index 2c37f8ff6..4ff8e2a18 100644
--- a/maps/Route2NuggetSpeechHouse.asm
+++ b/maps/Route2NuggetSpeechHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const ROUTE2NUGGETSPEECHHOUSE_FISHER
Route2NuggetSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -61,12 +61,12 @@ Route2NuggetSpeechHouse_MapEventHeader:
warp_def $7, $2, 1, ROUTE_2
warp_def $7, $3, 1, ROUTE_2
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_FISHER, 4, 2, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, FisherScript_0x9b847, -1
+ object_event SPRITE_FISHER, 4, 2, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FisherScript_0x9b847, -1
diff --git a/maps/Route3.asm b/maps/Route3.asm
index b5e08faf9..0df90cd80 100644
--- a/maps/Route3.asm
+++ b/maps/Route3.asm
@@ -5,52 +5,52 @@ const_value set 2
const ROUTE3_FISHER2
Route3_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerFirebreatherOtis:
- trainer EVENT_BEAT_FIREBREATHER_OTIS, FIREBREATHER, OTIS, FirebreatherOtisSeenText, FirebreatherOtisBeatenText, 0, FirebreatherOtisScript
+ trainer EVENT_BEAT_FIREBREATHER_OTIS, FIREBREATHER, OTIS, FirebreatherOtisSeenText, FirebreatherOtisBeatenText, 0, .Script
-FirebreatherOtisScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1adff7
+ writetext FirebreatherOtisAfterBattleText
waitbutton
closetext
end
TrainerYoungsterWarren:
- trainer EVENT_BEAT_YOUNGSTER_WARREN, YOUNGSTER, WARREN, YoungsterWarrenSeenText, YoungsterWarrenBeatenText, 0, YoungsterWarrenScript
+ trainer EVENT_BEAT_YOUNGSTER_WARREN, YOUNGSTER, WARREN, YoungsterWarrenSeenText, YoungsterWarrenBeatenText, 0, .Script
-YoungsterWarrenScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ae051
+ writetext YoungsterWarrenAfterBattleText
waitbutton
closetext
end
TrainerYoungsterJimmy:
- trainer EVENT_BEAT_YOUNGSTER_JIMMY, YOUNGSTER, JIMMY, YoungsterJimmySeenText, YoungsterJimmyBeatenText, 0, YoungsterJimmyScript
+ trainer EVENT_BEAT_YOUNGSTER_JIMMY, YOUNGSTER, JIMMY, YoungsterJimmySeenText, YoungsterJimmyBeatenText, 0, .Script
-YoungsterJimmyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ae0a9
+ writetext YoungsterJimmyAfterBattleText
waitbutton
closetext
end
TrainerFirebreatherBurt:
- trainer EVENT_BEAT_FIREBREATHER_BURT, FIREBREATHER, BURT, FirebreatherBurtSeenText, FirebreatherBurtBeatenText, 0, FirebreatherBurtScript
+ trainer EVENT_BEAT_FIREBREATHER_BURT, FIREBREATHER, BURT, FirebreatherBurtSeenText, FirebreatherBurtBeatenText, 0, .Script
-FirebreatherBurtScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ae118
+ writetext FirebreatherBurtAfterBattleText
waitbutton
closetext
end
@@ -68,7 +68,7 @@ FirebreatherOtisBeatenText:
line "I'm all wet…"
done
-UnknownText_0x1adff7:
+FirebreatherOtisAfterBattleText:
text "When it rains,"
line "it's hard to get"
cont "ignition…"
@@ -83,7 +83,7 @@ YoungsterWarrenBeatenText:
text "I knew I'd lose…"
done
-UnknownText_0x1ae051:
+YoungsterWarrenAfterBattleText:
text "You looked strong."
para "I was afraid to"
@@ -99,7 +99,7 @@ YoungsterJimmyBeatenText:
text "Blown away!"
done
-UnknownText_0x1ae0a9:
+YoungsterJimmyAfterBattleText:
text "I wear shorts the"
line "whole year round."
@@ -116,7 +116,7 @@ FirebreatherBurtBeatenText:
text "Yow! That's hot!"
done
-UnknownText_0x1ae118:
+FirebreatherBurtAfterBattleText:
text "The greatest fire-"
line "breather in KANTO,"
cont "that's me."
@@ -140,16 +140,16 @@ Route3_MapEventHeader:
db 1
warp_def $1, $34, 1, MOUNT_MOON
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 13, 49, SIGNPOST_READ, MapRoute3Signpost0Script
+ bg_event 13, 49, BGEVENT_READ, MapRoute3Signpost0Script
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_FISHER, 12, 26, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 2, TrainerFirebreatherOtis, -1
- person_event SPRITE_YOUNGSTER, 7, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerYoungsterWarren, -1
- person_event SPRITE_YOUNGSTER, 3, 16, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerYoungsterJimmy, -1
- person_event SPRITE_FISHER, 5, 49, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerFirebreatherBurt, -1
+ object_event SPRITE_FISHER, 12, 26, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerFirebreatherOtis, -1
+ object_event SPRITE_YOUNGSTER, 7, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterWarren, -1
+ object_event SPRITE_YOUNGSTER, 3, 16, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerYoungsterJimmy, -1
+ object_event SPRITE_FISHER, 5, 49, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerFirebreatherBurt, -1
diff --git a/maps/Route30.asm b/maps/Route30.asm
index e4f1f03d3..7a98c6a7e 100644
--- a/maps/Route30.asm
+++ b/maps/Route30.asm
@@ -12,7 +12,7 @@ const_value set 2
const ROUTE30_POKE_BALL
Route30_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -416,27 +416,27 @@ Route30_MapEventHeader:
warp_def $27, $7, 1, ROUTE_30_BERRY_SPEECH_HOUSE
warp_def $5, $11, 1, MR_POKEMONS_HOUSE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 5
- signpost 43, 9, SIGNPOST_READ, Route30Sign
- signpost 29, 13, SIGNPOST_READ, MrPokemonsHouseDirectionsSign
- signpost 5, 15, SIGNPOST_READ, MrPokemonsHouseSign
- signpost 21, 3, SIGNPOST_READ, Route30TrainerTips
- signpost 9, 14, SIGNPOST_ITEM, Route30HiddenPotion
+ bg_event 43, 9, BGEVENT_READ, Route30Sign
+ bg_event 29, 13, BGEVENT_READ, MrPokemonsHouseDirectionsSign
+ bg_event 5, 15, BGEVENT_READ, MrPokemonsHouseSign
+ bg_event 21, 3, BGEVENT_READ, Route30TrainerTips
+ bg_event 9, 14, BGEVENT_ITEM, Route30HiddenPotion
-.PersonEvents:
+.ObjectEvents:
db 11
- person_event SPRITE_YOUNGSTER, 26, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, YoungsterJoey_ImportantBattleScript, EVENT_ROUTE_30_BATTLE
- person_event SPRITE_YOUNGSTER, 28, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerYoungsterJoey, EVENT_ROUTE_30_YOUNGSTER_JOEY
- person_event SPRITE_YOUNGSTER, 23, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerYoungsterMikey, -1
- person_event SPRITE_BUG_CATCHER, 7, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerBug_catcherDon, -1
- person_event SPRITE_YOUNGSTER, 30, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, Route30YoungsterScript, -1
- person_event SPRITE_MONSTER, 24, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_ROUTE_30_BATTLE
- person_event SPRITE_MONSTER, 25, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_ROUTE_30_BATTLE
- person_event SPRITE_FRUIT_TREE, 39, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route30FruitTree1, -1
- person_event SPRITE_FRUIT_TREE, 5, 11, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route30FruitTree2, -1
- person_event SPRITE_COOLTRAINER_F, 13, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route30CooltrainerFScript, -1
- person_event SPRITE_POKE_BALL, 35, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route30Antidote, EVENT_ROUTE_30_ANTIDOTE
+ object_event SPRITE_YOUNGSTER, 26, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, YoungsterJoey_ImportantBattleScript, EVENT_ROUTE_30_BATTLE
+ object_event SPRITE_YOUNGSTER, 28, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterJoey, EVENT_ROUTE_30_YOUNGSTER_JOEY
+ object_event SPRITE_YOUNGSTER, 23, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerYoungsterMikey, -1
+ object_event SPRITE_BUG_CATCHER, 7, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBug_catcherDon, -1
+ object_event SPRITE_YOUNGSTER, 30, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route30YoungsterScript, -1
+ object_event SPRITE_MONSTER, 24, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ROUTE_30_BATTLE
+ object_event SPRITE_MONSTER, 25, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ROUTE_30_BATTLE
+ object_event SPRITE_FRUIT_TREE, 39, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route30FruitTree1, -1
+ object_event SPRITE_FRUIT_TREE, 5, 11, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route30FruitTree2, -1
+ object_event SPRITE_COOLTRAINER_F, 13, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route30CooltrainerFScript, -1
+ object_event SPRITE_POKE_BALL, 35, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route30Antidote, EVENT_ROUTE_30_ANTIDOTE
diff --git a/maps/Route30BerrySpeechHouse.asm b/maps/Route30BerrySpeechHouse.asm
index d05258f3f..55dbff282 100644
--- a/maps/Route30BerrySpeechHouse.asm
+++ b/maps/Route30BerrySpeechHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const ROUTE30BERRYSPEECHHOUSE_POKEFAN_M
Route30BerrySpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -55,14 +55,14 @@ Route30BerrySpeechHouse_MapEventHeader:
warp_def $7, $2, 1, ROUTE_30
warp_def $7, $3, 1, ROUTE_30
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, Route30BerrySpeechHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, Route30BerrySpeechHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, Route30BerrySpeechHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, Route30BerrySpeechHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKEFAN_M, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x196d64, -1
+ object_event SPRITE_POKEFAN_M, 3, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, PokefanMScript_0x196d64, -1
diff --git a/maps/Route31.asm b/maps/Route31.asm
index 61b67be11..d356f2c6f 100644
--- a/maps/Route31.asm
+++ b/maps/Route31.asm
@@ -8,14 +8,11 @@ const_value set 2
const ROUTE31_POKE_BALL2
Route31_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_NEWMAP, .CheckMomCall
.CheckMomCall:
@@ -429,20 +426,20 @@ Route31_MapEventHeader:
warp_def $7, $4, 4, ROUTE_31_VIOLET_GATE
warp_def $5, $22, 1, DARK_CAVE_VIOLET_ENTRANCE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 5, 7, SIGNPOST_READ, Route31Sign
- signpost 5, 31, SIGNPOST_READ, DarkCaveSign
+ bg_event 5, 7, BGEVENT_READ, Route31Sign
+ bg_event 5, 31, BGEVENT_READ, DarkCaveSign
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_FISHER, 7, 17, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route31MailRecipientScript, -1
- person_event SPRITE_YOUNGSTER, 5, 9, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route31YoungsterScript, -1
- person_event SPRITE_BUG_CATCHER, 13, 21, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 5, TrainerBug_catcherWade1, -1
- person_event SPRITE_COOLTRAINER_M, 8, 33, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route31CooltrainerMScript, -1
- person_event SPRITE_FRUIT_TREE, 7, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route31FruitTree, -1
- person_event SPRITE_POKE_BALL, 5, 29, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route31Potion, EVENT_ROUTE_31_POTION
- person_event SPRITE_POKE_BALL, 15, 19, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route31PokeBall, EVENT_ROUTE_31_POKE_BALL
+ object_event SPRITE_FISHER, 7, 17, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route31MailRecipientScript, -1
+ object_event SPRITE_YOUNGSTER, 5, 9, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route31YoungsterScript, -1
+ object_event SPRITE_BUG_CATCHER, 13, 21, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 5, TrainerBug_catcherWade1, -1
+ object_event SPRITE_COOLTRAINER_M, 8, 33, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route31CooltrainerMScript, -1
+ object_event SPRITE_FRUIT_TREE, 7, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route31FruitTree, -1
+ object_event SPRITE_POKE_BALL, 5, 29, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route31Potion, EVENT_ROUTE_31_POTION
+ object_event SPRITE_POKE_BALL, 15, 19, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route31PokeBall, EVENT_ROUTE_31_POKE_BALL
diff --git a/maps/Route31VioletGate.asm b/maps/Route31VioletGate.asm
index 68155a705..404a216e2 100644
--- a/maps/Route31VioletGate.asm
+++ b/maps/Route31VioletGate.asm
@@ -3,25 +3,25 @@ const_value set 2
const ROUTE31VIOLETGATE_COOLTRAINER_F
Route31VioletGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-OfficerScript_0x197634:
- jumptextfaceplayer UnknownText_0x19763a
+Route31VioletGateOfficerScript:
+ jumptextfaceplayer Route31VioletGateOfficerText
-CooltrainerFScript_0x197637:
- jumptextfaceplayer UnknownText_0x197661
+Route31VioletGateCooltrainerFScript:
+ jumptextfaceplayer Route31VioletGateCooltrainerFText
-UnknownText_0x19763a:
+Route31VioletGateOfficerText:
text "Hi there!"
line "Did you visit"
cont "SPROUT TOWER?"
done
-UnknownText_0x197661:
+Route31VioletGateCooltrainerFText:
text "I came too far"
line "out. I'd better"
cont "phone home!"
@@ -38,13 +38,13 @@ Route31VioletGate_MapEventHeader:
warp_def $4, $9, 1, ROUTE_31
warp_def $5, $9, 2, ROUTE_31
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, OfficerScript_0x197634, -1
- person_event SPRITE_COOLTRAINER_F, 2, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x197637, -1
+ object_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route31VioletGateOfficerScript, -1
+ object_event SPRITE_COOLTRAINER_F, 2, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route31VioletGateCooltrainerFScript, -1
diff --git a/maps/Route32.asm b/maps/Route32.asm
index da9eb5c70..660f972f3 100644
--- a/maps/Route32.asm
+++ b/maps/Route32.asm
@@ -15,28 +15,23 @@ const_value set 2
const ROUTE32_POKE_BALL2
Route32_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 3
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
- maptrigger .Trigger2
+ scene_script .DummyScene0
+ scene_script .DummyScene1
+ scene_script .DummyScene2
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_OBJECTS, .Frieda
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
+.DummyScene1:
end
-.Trigger2:
+.DummyScene2:
end
.Frieda:
@@ -51,7 +46,7 @@ Route32_MapScriptHeader:
Route32CooltrainerMScript:
faceplayer
-Route32CooltrainerMTrigger:
+Route32CooltrainerMContinueScene:
opentext
checkevent EVENT_GOT_MIRACLE_SEED_IN_ROUTE_32
iftrue .GotMiracleSeed
@@ -91,7 +86,7 @@ Route32CooltrainerMTrigger:
closetext
end
-Route32CooltrainerMStopsYou:
+Route32CooltrainerMStopsYouScene:
spriteface ROUTE32_COOLTRAINER_M, LEFT
spriteface PLAYER, RIGHT
opentext
@@ -102,7 +97,7 @@ Route32CooltrainerMStopsYou:
applymovement PLAYER, Movement_Route32CooltrainerMPushesYouBackToViolet
stopfollow
spriteface PLAYER, DOWN
- scall Route32CooltrainerMTrigger
+ scall Route32CooltrainerMContinueScene
applymovement ROUTE32_COOLTRAINER_M, Movement_Route32CooltrainerMReset1
applymovement ROUTE32_COOLTRAINER_M, Movement_Route32CooltrainerMReset2
end
@@ -132,7 +127,7 @@ Route32WannaBuyASlowpokeTailScript:
SlowpokeTailSalesmanScript:
faceplayer
_OfferToSellSlowpokeTail:
- dotrigger $2
+ setscene $2
opentext
writetext Text_MillionDollarSlowpokeTail
yesorno
@@ -507,7 +502,7 @@ Route32RuinsSign:
Route32UnionCaveSign:
jumptext Route32UnionCaveSignText
-Route32PokeCenterSign:
+Route32PokecenterSign:
jumpstd pokecentersign
Route32HiddenGreatBall:
@@ -946,33 +941,33 @@ Route32_MapEventHeader:
warp_def $3, $4, 4, ROUTE_32_RUINS_OF_ALPH_GATE
warp_def $4f, $6, 4, UNION_CAVE_1F
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 0, $8, $12, $0, Route32CooltrainerMStopsYou, $0, $0
- xy_trigger 1, $47, $7, $0, Route32WannaBuyASlowpokeTailScript, $0, $0
+ coord_event 0, $8, $12, Route32CooltrainerMStopsYouScene
+ coord_event 1, $47, $7, Route32WannaBuyASlowpokeTailScript
-.Signposts:
+.BGEvents:
db 6
- signpost 5, 13, SIGNPOST_READ, Route32Sign
- signpost 1, 9, SIGNPOST_READ, Route32RuinsSign
- signpost 84, 10, SIGNPOST_READ, Route32UnionCaveSign
- signpost 73, 12, SIGNPOST_READ, Route32PokeCenterSign
- signpost 67, 12, SIGNPOST_ITEM, Route32HiddenGreatBall
- signpost 40, 11, SIGNPOST_ITEM, Route32HiddenSuperPotion
-
-.PersonEvents:
+ bg_event 5, 13, BGEVENT_READ, Route32Sign
+ bg_event 1, 9, BGEVENT_READ, Route32RuinsSign
+ bg_event 84, 10, BGEVENT_READ, Route32UnionCaveSign
+ bg_event 73, 12, BGEVENT_READ, Route32PokecenterSign
+ bg_event 67, 12, BGEVENT_ITEM, Route32HiddenGreatBall
+ bg_event 40, 11, BGEVENT_ITEM, Route32HiddenSuperPotion
+
+.ObjectEvents:
db 14
- person_event SPRITE_FISHER, 49, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 1, TrainerFisherJustin, -1
- person_event SPRITE_FISHER, 56, 12, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerFisherRalph1, -1
- person_event SPRITE_FISHER, 48, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 1, TrainerFisherHenry, -1
- person_event SPRITE_YOUNGSTER, 22, 12, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerYoungsterAlbert, -1
- person_event SPRITE_YOUNGSTER, 63, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerYoungsterGordon, -1
- person_event SPRITE_YOUNGSTER, 45, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerCamperRoland, -1
- person_event SPRITE_LASS, 30, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 1, TrainerPicnickerLiz1, -1
- person_event SPRITE_COOLTRAINER_M, 8, 19, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route32CooltrainerMScript, -1
- person_event SPRITE_YOUNGSTER, 82, 11, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerBird_keeperPeter, -1
- person_event SPRITE_FISHER, 70, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SlowpokeTailSalesmanScript, EVENT_SLOWPOKE_WELL_ROCKETS
- person_event SPRITE_POKE_BALL, 53, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route32GreatBall, EVENT_ROUTE_32_GREAT_BALL
- person_event SPRITE_FISHER, 13, 15, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route32RoarTMGuyScript, -1
- person_event SPRITE_LASS, 67, 12, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FriedaScript, EVENT_ROUTE_32_FRIEDA_OF_FRIDAY
- person_event SPRITE_POKE_BALL, 30, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route32Repel, EVENT_ROUTE_32_REPEL
+ object_event SPRITE_FISHER, 49, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherJustin, -1
+ object_event SPRITE_FISHER, 56, 12, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerFisherRalph1, -1
+ object_event SPRITE_FISHER, 48, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherHenry, -1
+ object_event SPRITE_YOUNGSTER, 22, 12, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterAlbert, -1
+ object_event SPRITE_YOUNGSTER, 63, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterGordon, -1
+ object_event SPRITE_YOUNGSTER, 45, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerCamperRoland, -1
+ object_event SPRITE_LASS, 30, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerPicnickerLiz1, -1
+ object_event SPRITE_COOLTRAINER_M, 8, 19, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route32CooltrainerMScript, -1
+ object_event SPRITE_YOUNGSTER, 82, 11, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBird_keeperPeter, -1
+ object_event SPRITE_FISHER, 70, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SlowpokeTailSalesmanScript, EVENT_SLOWPOKE_WELL_ROCKETS
+ object_event SPRITE_POKE_BALL, 53, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route32GreatBall, EVENT_ROUTE_32_GREAT_BALL
+ object_event SPRITE_FISHER, 13, 15, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route32RoarTMGuyScript, -1
+ object_event SPRITE_LASS, 67, 12, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FriedaScript, EVENT_ROUTE_32_FRIEDA_OF_FRIDAY
+ object_event SPRITE_POKE_BALL, 30, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route32Repel, EVENT_ROUTE_32_REPEL
diff --git a/maps/Route32PokeCenter1F.asm b/maps/Route32PokeCenter1F.asm
deleted file mode 100644
index ae1b641ff..000000000
--- a/maps/Route32PokeCenter1F.asm
+++ /dev/null
@@ -1,117 +0,0 @@
-const_value set 2
- const ROUTE32POKECENTER1F_NURSE
- const ROUTE32POKECENTER1F_FISHING_GURU
- const ROUTE32POKECENTER1F_COOLTRAINER_F
-
-Route32PokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x69b52:
- jumpstd pokecenternurse
-
-FishingGuruScript_0x69b55:
- faceplayer
- opentext
- checkevent EVENT_GOT_OLD_ROD
- iftrue UnknownScript_0x69b7a
- writetext UnknownText_0x69b83
- yesorno
- iffalse UnknownScript_0x69b74
- writetext UnknownText_0x69be8
- buttonsound
- verbosegiveitem OLD_ROD
- writetext UnknownText_0x69c1b
- waitbutton
- closetext
- setevent EVENT_GOT_OLD_ROD
- end
-
-UnknownScript_0x69b74:
- writetext UnknownText_0x69c6c
- waitbutton
- closetext
- end
-
-UnknownScript_0x69b7a:
- writetext UnknownText_0x69c8d
- waitbutton
- closetext
- end
-
-CooltrainerFScript_0x69b80:
- jumptextfaceplayer UnknownText_0x69cac
-
-UnknownText_0x69b83:
- text "This is a great"
- line "fishing spot."
-
- para "You saw people"
- line "fishing? How"
- cont "about you?"
-
- para "Would you like one"
- line "of my RODS?"
- done
-
-UnknownText_0x69be8:
- text "Heh, that's good"
- line "to hear."
-
- para "Now you're an"
- line "angler too!"
- done
-
-UnknownText_0x69c1b:
- text "Fishing is great!"
-
- para "If there's water,"
- line "be it the sea or a"
-
- para "stream, try out"
- line "your ROD."
- done
-
-UnknownText_0x69c6c:
- text "Oh. That's rather"
- line "disappointing…"
- done
-
-UnknownText_0x69c8d:
- text "Yo, kid. How are"
- line "they biting?"
- done
-
-UnknownText_0x69cac:
- text "What should I make"
- line "my #MON hold?"
-
- para "Maybe an item that"
- line "increases ATTACK"
- cont "power…"
- done
-
-Route32PokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 1, ROUTE_32
- warp_def $7, $4, 1, ROUTE_32
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 3
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x69b52, -1
- person_event SPRITE_FISHING_GURU, 4, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FishingGuruScript_0x69b55, -1
- person_event SPRITE_COOLTRAINER_F, 2, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x69b80, -1
diff --git a/maps/Route32Pokecenter1F.asm b/maps/Route32Pokecenter1F.asm
new file mode 100644
index 000000000..a65239d31
--- /dev/null
+++ b/maps/Route32Pokecenter1F.asm
@@ -0,0 +1,117 @@
+const_value set 2
+ const ROUTE32POKECENTER1F_NURSE
+ const ROUTE32POKECENTER1F_FISHING_GURU
+ const ROUTE32POKECENTER1F_COOLTRAINER_F
+
+Route32Pokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x69b52:
+ jumpstd pokecenternurse
+
+FishingGuruScript_0x69b55:
+ faceplayer
+ opentext
+ checkevent EVENT_GOT_OLD_ROD
+ iftrue UnknownScript_0x69b7a
+ writetext UnknownText_0x69b83
+ yesorno
+ iffalse UnknownScript_0x69b74
+ writetext UnknownText_0x69be8
+ buttonsound
+ verbosegiveitem OLD_ROD
+ writetext UnknownText_0x69c1b
+ waitbutton
+ closetext
+ setevent EVENT_GOT_OLD_ROD
+ end
+
+UnknownScript_0x69b74:
+ writetext UnknownText_0x69c6c
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x69b7a:
+ writetext UnknownText_0x69c8d
+ waitbutton
+ closetext
+ end
+
+Route32Pokecenter1FCooltrainerFScript:
+ jumptextfaceplayer Route32Pokecenter1FCooltrainerFText
+
+UnknownText_0x69b83:
+ text "This is a great"
+ line "fishing spot."
+
+ para "You saw people"
+ line "fishing? How"
+ cont "about you?"
+
+ para "Would you like one"
+ line "of my RODS?"
+ done
+
+UnknownText_0x69be8:
+ text "Heh, that's good"
+ line "to hear."
+
+ para "Now you're an"
+ line "angler too!"
+ done
+
+UnknownText_0x69c1b:
+ text "Fishing is great!"
+
+ para "If there's water,"
+ line "be it the sea or a"
+
+ para "stream, try out"
+ line "your ROD."
+ done
+
+UnknownText_0x69c6c:
+ text "Oh. That's rather"
+ line "disappointing…"
+ done
+
+UnknownText_0x69c8d:
+ text "Yo, kid. How are"
+ line "they biting?"
+ done
+
+Route32Pokecenter1FCooltrainerFText:
+ text "What should I make"
+ line "my #MON hold?"
+
+ para "Maybe an item that"
+ line "increases ATTACK"
+ cont "power…"
+ done
+
+Route32Pokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 1, ROUTE_32
+ warp_def $7, $4, 1, ROUTE_32
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 3
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x69b52, -1
+ object_event SPRITE_FISHING_GURU, 4, 1, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, FishingGuruScript_0x69b55, -1
+ object_event SPRITE_COOLTRAINER_F, 2, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route32Pokecenter1FCooltrainerFScript, -1
diff --git a/maps/Route32RuinsOfAlphGate.asm b/maps/Route32RuinsOfAlphGate.asm
new file mode 100644
index 000000000..8b9dcede0
--- /dev/null
+++ b/maps/Route32RuinsOfAlphGate.asm
@@ -0,0 +1,70 @@
+const_value set 2
+ const ROUTE32RUINSOFALPHGATE_OFFICER
+ const ROUTE32RUINSOFALPHGATE_POKEFAN_M
+ const ROUTE32RUINSOFALPHGATE_YOUNGSTER
+
+Route32RuinsOfAlphGate_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+Route32RuinsOfAlphGateOfficerScript:
+ jumptextfaceplayer Route32RuinsOfAlphGateOfficerText
+
+Route32RuinsOfAlphGatePokefanMScript:
+ jumptextfaceplayer Route32RuinsOfAlphGatePokefanMText
+
+Route32RuinsOfAlphGateYoungsterScript:
+ jumptextfaceplayer Route32RuinsOfAlphGateYoungsterText
+
+Route32RuinsOfAlphGateOfficerText:
+ text "RUINS OF ALPH"
+
+ para "A Look-and-Touch"
+ line "Tourist Site"
+
+ para "Try the sliding"
+ line "stone panels!"
+ done
+
+Route32RuinsOfAlphGatePokefanMText:
+ text "You're studying"
+ line "the RUINS?"
+
+ para "I see a scientist"
+ line "in the making."
+ done
+
+Route32RuinsOfAlphGateYoungsterText:
+ text "There are drawings"
+ line "on stone panels."
+
+ para "I tried moving"
+ line "them. I wonder"
+ cont "what they are."
+ done
+
+Route32RuinsOfAlphGate_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 4
+ warp_def $4, $0, 10, RUINS_OF_ALPH_OUTSIDE
+ warp_def $5, $0, 11, RUINS_OF_ALPH_OUTSIDE
+ warp_def $4, $9, 2, ROUTE_32
+ warp_def $5, $9, 3, ROUTE_32
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 3
+ object_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route32RuinsOfAlphGateOfficerScript, -1
+ object_event SPRITE_POKEFAN_M, 2, 8, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, Route32RuinsOfAlphGatePokefanMScript, -1
+ object_event SPRITE_YOUNGSTER, 6, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route32RuinsOfAlphGateYoungsterScript, -1
diff --git a/maps/Route32RuinsofAlphGate.asm b/maps/Route32RuinsofAlphGate.asm
deleted file mode 100644
index 404bb1a5f..000000000
--- a/maps/Route32RuinsofAlphGate.asm
+++ /dev/null
@@ -1,70 +0,0 @@
-const_value set 2
- const ROUTE32RUINSOFALPHGATE_OFFICER
- const ROUTE32RUINSOFALPHGATE_POKEFAN_M
- const ROUTE32RUINSOFALPHGATE_YOUNGSTER
-
-Route32RuinsofAlphGate_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-OfficerScript_0x69a2d:
- jumptextfaceplayer UnknownText_0x69a36
-
-PokefanMScript_0x69a30:
- jumptextfaceplayer UnknownText_0x69a81
-
-YoungsterScript_0x69a33:
- jumptextfaceplayer UnknownText_0x69abd
-
-UnknownText_0x69a36:
- text "RUINS OF ALPH"
-
- para "A Look-and-Touch"
- line "Tourist Site"
-
- para "Try the sliding"
- line "stone panels!"
- done
-
-UnknownText_0x69a81:
- text "You're studying"
- line "the RUINS?"
-
- para "I see a scientist"
- line "in the making."
- done
-
-UnknownText_0x69abd:
- text "There are drawings"
- line "on stone panels."
-
- para "I tried moving"
- line "them. I wonder"
- cont "what they are."
- done
-
-Route32RuinsofAlphGate_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 4
- warp_def $4, $0, 10, RUINS_OF_ALPH_OUTSIDE
- warp_def $5, $0, 11, RUINS_OF_ALPH_OUTSIDE
- warp_def $4, $9, 2, ROUTE_32
- warp_def $5, $9, 3, ROUTE_32
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 3
- person_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, OfficerScript_0x69a2d, -1
- person_event SPRITE_POKEFAN_M, 2, 8, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x69a30, -1
- person_event SPRITE_YOUNGSTER, 6, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x69a33, -1
diff --git a/maps/Route33.asm b/maps/Route33.asm
index 383f32e67..e92e0cbb1 100644
--- a/maps/Route33.asm
+++ b/maps/Route33.asm
@@ -4,7 +4,7 @@ const_value set 2
const ROUTE33_FRUIT_TREE
Route33_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -202,15 +202,15 @@ Route33_MapEventHeader:
db 1
warp_def $9, $b, 3, UNION_CAVE_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 11, 11, SIGNPOST_READ, Route33Sign
+ bg_event 11, 11, BGEVENT_READ, Route33Sign
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_POKEFAN_M, 13, 6, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerHikerAnthony, -1
- person_event SPRITE_LASS, 16, 13, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, Route33LassScript, -1
- person_event SPRITE_FRUIT_TREE, 16, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route33FruitTreeScript, -1
+ object_event SPRITE_POKEFAN_M, 13, 6, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerHikerAnthony, -1
+ object_event SPRITE_LASS, 16, 13, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route33LassScript, -1
+ object_event SPRITE_FRUIT_TREE, 16, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route33FruitTreeScript, -1
diff --git a/maps/Route34.asm b/maps/Route34.asm
index 607de8968..633e9984a 100644
--- a/maps/Route34.asm
+++ b/maps/Route34.asm
@@ -6,54 +6,51 @@ const_value set 2
const ROUTE34_OFFICER
const ROUTE34_POKEFAN_M
const ROUTE34_GRAMPS
- const ROUTE34_DAYCARE_MON_1
- const ROUTE34_DAYCARE_MON_2
+ const ROUTE34_DAY_CARE_MON_1
+ const ROUTE34_DAY_CARE_MON_2
const ROUTE34_COOLTRAINER_F1
const ROUTE34_COOLTRAINER_F2
const ROUTE34_COOLTRAINER_F3
const ROUTE34_POKE_BALL
Route34_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_OBJECTS, .EggCheckCallback
.EggCheckCallback:
- checkflag ENGINE_DAYCARE_MAN_HAS_EGG
- iftrue .PutDaycareManOutside
- clearevent EVENT_DAYCARE_MAN_IN_DAYCARE
- setevent EVENT_DAYCARE_MAN_ON_ROUTE_34
+ checkflag ENGINE_DAY_CARE_MAN_HAS_EGG
+ iftrue .PutDayCareManOutside
+ clearevent EVENT_DAY_CARE_MAN_IN_DAY_CARE
+ setevent EVENT_DAY_CARE_MAN_ON_ROUTE_34
jump .CheckMon1
-.PutDaycareManOutside:
- setevent EVENT_DAYCARE_MAN_IN_DAYCARE
- clearevent EVENT_DAYCARE_MAN_ON_ROUTE_34
+.PutDayCareManOutside:
+ setevent EVENT_DAY_CARE_MAN_IN_DAY_CARE
+ clearevent EVENT_DAY_CARE_MAN_ON_ROUTE_34
jump .CheckMon1
.CheckMon1:
- checkflag ENGINE_DAYCARE_MAN_HAS_MON
+ checkflag ENGINE_DAY_CARE_MAN_HAS_MON
iffalse .HideMon1
- clearevent EVENT_DAYCARE_MON_1
+ clearevent EVENT_DAY_CARE_MON_1
jump .CheckMon2
.HideMon1:
- setevent EVENT_DAYCARE_MON_1
+ setevent EVENT_DAY_CARE_MON_1
jump .CheckMon2
.CheckMon2:
- checkflag ENGINE_DAYCARE_LADY_HAS_MON
+ checkflag ENGINE_DAY_CARE_LADY_HAS_MON
iffalse .HideMon2
- clearevent EVENT_DAYCARE_MON_2
+ clearevent EVENT_DAY_CARE_MON_2
return
.HideMon2:
- setevent EVENT_DAYCARE_MON_2
+ setevent EVENT_DAY_CARE_MON_2
return
DayCareManScript_Outside:
@@ -63,7 +60,7 @@ DayCareManScript_Outside:
waitbutton
closetext
if_equal $1, .end_fail
- clearflag ENGINE_DAYCARE_MAN_HAS_EGG
+ clearflag ENGINE_DAY_CARE_MAN_HAS_EGG
checkcode VAR_FACING
if_equal RIGHT, .walk_around_player
applymovement ROUTE34_GRAMPS, Route34MovementData_DayCareManWalksBackInside
@@ -78,13 +75,13 @@ DayCareManScript_Outside:
disappear ROUTE34_GRAMPS
end
-DaycareMon1Script:
+DayCareMon1Script:
opentext
special Special_DayCareMon1
closetext
end
-DaycareMon2Script:
+DayCareMon2Script:
opentext
special Special_DayCareMon2
closetext
@@ -773,33 +770,33 @@ Route34_MapEventHeader:
db 5
warp_def $25, $d, 1, ROUTE_34_ILEX_FOREST_GATE
warp_def $25, $e, 2, ROUTE_34_ILEX_FOREST_GATE
- warp_def $e, $b, 1, DAYCARE
- warp_def $f, $b, 2, DAYCARE
- warp_def $f, $d, 3, DAYCARE
+ warp_def $e, $b, 1, DAY_CARE
+ warp_def $f, $b, 2, DAY_CARE
+ warp_def $f, $d, 3, DAY_CARE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 5
- signpost 6, 12, SIGNPOST_READ, Route34Sign
- signpost 33, 13, SIGNPOST_READ, Route34TrainerTips
- signpost 13, 10, SIGNPOST_READ, DayCareSign
- signpost 32, 8, SIGNPOST_ITEM, Route34HiddenRareCandy
- signpost 19, 17, SIGNPOST_ITEM, Route34HiddenSuperPotion
+ bg_event 6, 12, BGEVENT_READ, Route34Sign
+ bg_event 33, 13, BGEVENT_READ, Route34TrainerTips
+ bg_event 13, 10, BGEVENT_READ, DayCareSign
+ bg_event 32, 8, BGEVENT_ITEM, Route34HiddenRareCandy
+ bg_event 19, 17, BGEVENT_ITEM, Route34HiddenSuperPotion
-.PersonEvents:
+.ObjectEvents:
db 13
- person_event SPRITE_YOUNGSTER, 7, 13, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 5, TrainerCamperTodd1, -1
- person_event SPRITE_YOUNGSTER, 32, 15, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerYoungsterSamuel, -1
- person_event SPRITE_YOUNGSTER, 20, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerYoungsterIan, -1
- person_event SPRITE_LASS, 26, 10, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerPicnickerGina1, -1
- person_event SPRITE_OFFICER, 11, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OfficerKeithScript, -1
- person_event SPRITE_POKEFAN_M, 28, 18, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerPokefanmBrandon, -1
- person_event SPRITE_GRAMPS, 16, 15, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, DayCareManScript_Outside, EVENT_DAYCARE_MAN_ON_ROUTE_34
- person_event SPRITE_DAYCARE_MON_1, 18, 14, SPRITEMOVEDATA_POKEMON, 2, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, DaycareMon1Script, EVENT_DAYCARE_MON_1
- person_event SPRITE_DAYCARE_MON_2, 19, 17, SPRITEMOVEDATA_POKEMON, 2, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, DaycareMon2Script, EVENT_DAYCARE_MON_2
- person_event SPRITE_COOLTRAINER_F, 48, 11, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 5, TrainerCooltrainerfIrene, -1
- person_event SPRITE_COOLTRAINER_F, 48, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerCooltrainerfJenn, -1
- person_event SPRITE_COOLTRAINER_F, 51, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 2, TrainerCooltrainerfKate, -1
- person_event SPRITE_POKE_BALL, 30, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route34Nugget, EVENT_ROUTE_34_NUGGET
+ object_event SPRITE_YOUNGSTER, 7, 13, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 5, TrainerCamperTodd1, -1
+ object_event SPRITE_YOUNGSTER, 32, 15, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterSamuel, -1
+ object_event SPRITE_YOUNGSTER, 20, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterIan, -1
+ object_event SPRITE_LASS, 26, 10, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerPicnickerGina1, -1
+ object_event SPRITE_OFFICER, 11, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OfficerKeithScript, -1
+ object_event SPRITE_POKEFAN_M, 28, 18, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerPokefanmBrandon, -1
+ object_event SPRITE_GRAMPS, 16, 15, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DayCareManScript_Outside, EVENT_DAY_CARE_MAN_ON_ROUTE_34
+ object_event SPRITE_DAY_CARE_MON_1, 18, 14, SPRITEMOVEDATA_POKEMON, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DayCareMon1Script, EVENT_DAY_CARE_MON_1
+ object_event SPRITE_DAY_CARE_MON_2, 19, 17, SPRITEMOVEDATA_POKEMON, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DayCareMon2Script, EVENT_DAY_CARE_MON_2
+ object_event SPRITE_COOLTRAINER_F, 48, 11, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 5, TrainerCooltrainerfIrene, -1
+ object_event SPRITE_COOLTRAINER_F, 48, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainerfJenn, -1
+ object_event SPRITE_COOLTRAINER_F, 51, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerCooltrainerfKate, -1
+ object_event SPRITE_POKE_BALL, 30, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route34Nugget, EVENT_ROUTE_34_NUGGET
diff --git a/maps/Route34IlexForestGate.asm b/maps/Route34IlexForestGate.asm
index 674bca42d..799cb4d9e 100644
--- a/maps/Route34IlexForestGate.asm
+++ b/maps/Route34IlexForestGate.asm
@@ -5,24 +5,21 @@ const_value set 2
const ROUTE34ILEXFORESTGATE_TEACHER2
Route34IlexForestGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_OBJECTS, .IsForestRestless
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, UnknownScript_0x62d2d
-
-UnknownScript_0x62d2d:
+.IsForestRestless:
checkevent EVENT_FOREST_IS_RESTLESS
- iffalse UnknownScript_0x62d38
+ iffalse .Normal
disappear ROUTE34ILEXFORESTGATE_TEACHER1
appear ROUTE34ILEXFORESTGATE_TEACHER2
return
-UnknownScript_0x62d38:
+.Normal:
disappear ROUTE34ILEXFORESTGATE_TEACHER2
appear ROUTE34ILEXFORESTGATE_TEACHER1
return
@@ -78,8 +75,8 @@ IlexGateButterfree:
closetext
end
-LassScript_0x62d94:
- jumptextfaceplayer UnknownText_0x62e97
+Route34IlexForestGateLassScript:
+ jumptextfaceplayer Route34IlexForestGateLassText
MovementData_0x62d97:
step UP
@@ -124,7 +121,7 @@ UnknownText_0x62e83:
text "BUTTERFREE: Freeh!"
done
-UnknownText_0x62e97:
+Route34IlexForestGateLassText:
text "Did you see the"
line "shrine honoring"
cont "the protector?"
@@ -149,16 +146,16 @@ Route34IlexForestGate_MapEventHeader:
warp_def $7, $4, 1, ILEX_FOREST
warp_def $7, $5, 1, ILEX_FOREST
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 0, $7, $4, $0, UnknownScript_0x62d3d, $0, $0
+ coord_event 0, $7, $4, UnknownScript_0x62d3d
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_TEACHER, 3, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, TeacherScript_0x62d63, EVENT_ROUTE_34_ILEX_FOREST_GATE_TEACHER_BEHIND_COUNTER
- person_event SPRITE_BUTTERFREE, 4, 9, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, IlexGateButterfree, -1
- person_event SPRITE_LASS, 4, 3, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LassScript_0x62d94, EVENT_ROUTE_34_ILEX_FOREST_GATE_LASS
- person_event SPRITE_TEACHER, 7, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, TeacherScript_0x62d63, EVENT_ROUTE_34_ILEX_FOREST_GATE_TEACHER_IN_WALKWAY
+ object_event SPRITE_TEACHER, 3, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x62d63, EVENT_ROUTE_34_ILEX_FOREST_GATE_TEACHER_BEHIND_COUNTER
+ object_event SPRITE_BUTTERFREE, 4, 9, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, IlexGateButterfree, -1
+ object_event SPRITE_LASS, 4, 3, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route34IlexForestGateLassScript, EVENT_ROUTE_34_ILEX_FOREST_GATE_LASS
+ object_event SPRITE_TEACHER, 7, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x62d63, EVENT_ROUTE_34_ILEX_FOREST_GATE_TEACHER_IN_WALKWAY
diff --git a/maps/Route35.asm b/maps/Route35.asm
index afa3f8ce0..2e10bd22a 100644
--- a/maps/Route35.asm
+++ b/maps/Route35.asm
@@ -12,27 +12,27 @@ const_value set 2
const ROUTE35_POKE_BALL
Route35_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerBird_keeperBryan:
- trainer EVENT_BEAT_BIRD_KEEPER_BRYAN, BIRD_KEEPER, BRYAN, Bird_keeperBryanSeenText, Bird_keeperBryanBeatenText, 0, Bird_keeperBryanScript
+ trainer EVENT_BEAT_BIRD_KEEPER_BRYAN, BIRD_KEEPER, BRYAN, Bird_keeperBryanSeenText, Bird_keeperBryanBeatenText, 0, .Script
-Bird_keeperBryanScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19cc87
+ writetext Bird_keeperBryanAfterBattleText
waitbutton
closetext
end
TrainerJugglerIrwin:
- trainer EVENT_BEAT_JUGGLER_IRWIN, JUGGLER, IRWIN1, JugglerIrwin1SeenText, JugglerIrwin1BeatenText, 0, JugglerIrwin1Script
+ trainer EVENT_BEAT_JUGGLER_IRWIN, JUGGLER, IRWIN1, JugglerIrwin1SeenText, JugglerIrwin1BeatenText, 0, .Script
-JugglerIrwin1Script:
+.Script:
writecode VAR_CALLERID, PHONE_JUGGLER_IRWIN
end_if_just_battled
opentext
@@ -85,53 +85,53 @@ UnknownScript_0x19c91b:
end
TrainerCamperIvan:
- trainer EVENT_BEAT_CAMPER_IVAN, CAMPER, IVAN, CamperIvanSeenText, CamperIvanBeatenText, 0, CamperIvanScript
+ trainer EVENT_BEAT_CAMPER_IVAN, CAMPER, IVAN, CamperIvanSeenText, CamperIvanBeatenText, 0, .Script
-CamperIvanScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19cac4
+ writetext CamperIvanAfterBattleText
waitbutton
closetext
end
TrainerCamperElliot:
- trainer EVENT_BEAT_CAMPER_ELLIOT, CAMPER, ELLIOT, CamperElliotSeenText, CamperElliotBeatenText, 0, CamperElliotScript
+ trainer EVENT_BEAT_CAMPER_ELLIOT, CAMPER, ELLIOT, CamperElliotSeenText, CamperElliotBeatenText, 0, .Script
-CamperElliotScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19cb47
+ writetext CamperElliotAfterBattleText
waitbutton
closetext
end
TrainerPicnickerBrooke:
- trainer EVENT_BEAT_PICNICKER_BROOKE, PICNICKER, BROOKE, PicnickerBrookeSeenText, PicnickerBrookeBeatenText, 0, PicnickerBrookeScript
+ trainer EVENT_BEAT_PICNICKER_BROOKE, PICNICKER, BROOKE, PicnickerBrookeSeenText, PicnickerBrookeBeatenText, 0, .Script
-PicnickerBrookeScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19cbba
+ writetext PicnickerBrookeAfterBattleText
waitbutton
closetext
end
TrainerPicnickerKim:
- trainer EVENT_BEAT_PICNICKER_KIM, PICNICKER, KIM, PicnickerKimSeenText, PicnickerKimBeatenText, 0, PicnickerKimScript
+ trainer EVENT_BEAT_PICNICKER_KIM, PICNICKER, KIM, PicnickerKimSeenText, PicnickerKimBeatenText, 0, .Script
-PicnickerKimScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19cc21
+ writetext PicnickerKimAfterBattleText
waitbutton
closetext
end
TrainerBug_catcherArnie1:
- trainer EVENT_BEAT_BUG_CATCHER_ARNIE, BUG_CATCHER, ARNIE1, Bug_catcherArnie1SeenText, Bug_catcherArnie1BeatenText, 0, Bug_catcherArnie1Script
+ trainer EVENT_BEAT_BUG_CATCHER_ARNIE, BUG_CATCHER, ARNIE1, Bug_catcherArnie1SeenText, Bug_catcherArnie1BeatenText, 0, .Script
-Bug_catcherArnie1Script:
+.Script:
writecode VAR_CALLERID, PHONE_BUG_CATCHER_ARNIE
end_if_just_battled
opentext
@@ -226,12 +226,12 @@ UnknownScript_0x19ca2f:
end
TrainerFirebreatherWalt:
- trainer EVENT_BEAT_FIREBREATHER_WALT, FIREBREATHER, WALT, FirebreatherWaltSeenText, FirebreatherWaltBeatenText, 0, FirebreatherWaltScript
+ trainer EVENT_BEAT_FIREBREATHER_WALT, FIREBREATHER, WALT, FirebreatherWaltSeenText, FirebreatherWaltBeatenText, 0, .Script
-FirebreatherWaltScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19cebc
+ writetext FirebreatherWaltAfterBattleText
waitbutton
closetext
end
@@ -288,7 +288,7 @@ CamperIvanBeatenText:
text "I give!"
done
-UnknownText_0x19cac4:
+CamperIvanAfterBattleText:
text "Music on the radio"
line "changes the moods"
cont "of wild #MON."
@@ -305,7 +305,7 @@ CamperElliotBeatenText:
line "have lost for me…"
done
-UnknownText_0x19cb47:
+CamperElliotAfterBattleText:
text "I was humiliated"
line "in front of my"
cont "girlfriend…"
@@ -322,7 +322,7 @@ PicnickerBrookeBeatenText:
line "strong!"
done
-UnknownText_0x19cbba:
+PicnickerBrookeAfterBattleText:
text "I can count on my"
line "#MON more than"
cont "my boyfriend."
@@ -338,7 +338,7 @@ PicnickerKimBeatenText:
line "win…"
done
-UnknownText_0x19cc21:
+PicnickerKimAfterBattleText:
text "The GYM BADGES are"
line "pretty. I collect"
cont "them."
@@ -354,7 +354,7 @@ Bird_keeperBryanBeatenText:
line "enough!"
done
-UnknownText_0x19cc87:
+Bird_keeperBryanAfterBattleText:
text "Some #MON flee"
line "right away."
@@ -426,7 +426,7 @@ FirebreatherWaltBeatenText:
line "tip of my nose!"
done
-UnknownText_0x19cebc:
+FirebreatherWaltAfterBattleText:
text "The #MON March"
line "on the radio lures"
cont "wild #MON."
@@ -472,24 +472,24 @@ Route35_MapEventHeader:
warp_def $21, $a, 2, ROUTE_35_GOLDENROD_GATE
warp_def $5, $3, 3, ROUTE_35_NATIONAL_PARK_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 7, 1, SIGNPOST_READ, Route35Sign
- signpost 31, 11, SIGNPOST_READ, Route35Sign
+ bg_event 7, 1, BGEVENT_READ, Route35Sign
+ bg_event 31, 11, BGEVENT_READ, Route35Sign
-.PersonEvents:
+.ObjectEvents:
db 11
- person_event SPRITE_YOUNGSTER, 19, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 2, TrainerCamperIvan, -1
- person_event SPRITE_YOUNGSTER, 20, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerCamperElliot, -1
- person_event SPRITE_LASS, 20, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerPicnickerBrooke, -1
- person_event SPRITE_LASS, 26, 10, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 1, TrainerPicnickerKim, -1
- person_event SPRITE_YOUNGSTER, 28, 14, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 0, TrainerBird_keeperBryan, -1
- person_event SPRITE_FISHER, 10, 2, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 2, TrainerFirebreatherWalt, -1
- person_event SPRITE_BUG_CATCHER, 7, 16, SPRITEMOVEDATA_STANDING_DOWN, 0, 2, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerBug_catcherArnie1, -1
- person_event SPRITE_SUPER_NERD, 10, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, TrainerJugglerIrwin, -1
- person_event SPRITE_OFFICER, 6, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OfficerScript_0x19ca49, -1
- person_event SPRITE_FRUIT_TREE, 25, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x19ca7e, -1
- person_event SPRITE_POKE_BALL, 16, 13, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route35TMRollout, EVENT_ROUTE_35_TM_ROLLOUT
+ object_event SPRITE_YOUNGSTER, 19, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerCamperIvan, -1
+ object_event SPRITE_YOUNGSTER, 20, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerCamperElliot, -1
+ object_event SPRITE_LASS, 20, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerPicnickerBrooke, -1
+ object_event SPRITE_LASS, 26, 10, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerPicnickerKim, -1
+ object_event SPRITE_YOUNGSTER, 28, 14, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 0, TrainerBird_keeperBryan, -1
+ object_event SPRITE_FISHER, 10, 2, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerFirebreatherWalt, -1
+ object_event SPRITE_BUG_CATCHER, 7, 16, SPRITEMOVEDATA_STANDING_DOWN, 0, 2, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBug_catcherArnie1, -1
+ object_event SPRITE_SUPER_NERD, 10, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerJugglerIrwin, -1
+ object_event SPRITE_OFFICER, 6, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x19ca49, -1
+ object_event SPRITE_FRUIT_TREE, 25, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x19ca7e, -1
+ object_event SPRITE_POKE_BALL, 16, 13, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route35TMRollout, EVENT_ROUTE_35_TM_ROLLOUT
diff --git a/maps/Route35GoldenrodGate.asm b/maps/Route35GoldenrodGate.asm
new file mode 100644
index 000000000..bfc8e688d
--- /dev/null
+++ b/maps/Route35GoldenrodGate.asm
@@ -0,0 +1,219 @@
+const_value set 2
+ const ROUTE35GOLDENRODGATE_OFFICER
+ const ROUTE35GOLDENRODGATE_POKEFAN_F
+ const ROUTE35GOLDENRODGATE_FISHER
+
+Route35GoldenrodGate_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+OfficerScript_0x69d37:
+ faceplayer
+ opentext
+ checkevent EVENT_GOT_HP_UP_FROM_RANDY
+ iftrue .gothpup
+ checkevent EVENT_GAVE_KENYA
+ iftrue .questcomplete
+ checkevent EVENT_GOT_KENYA
+ iftrue .alreadyhavekenya
+ writetext UnknownText_0x69ddd
+ yesorno
+ iffalse .refused
+ writetext UnknownText_0x69e48
+ buttonsound
+ waitsfx
+ checkcode VAR_PARTYCOUNT
+ if_equal PARTY_LENGTH, .partyfull
+ writetext UnknownText_0x69eb8
+ playsound SFX_KEY_ITEM
+ waitsfx
+ givepoke SPEAROW, 10, NO_ITEM, 1, GiftSpearowName, GiftSpearowOTName
+ givepokeitem GiftSpearowMail
+ setevent EVENT_GOT_KENYA
+.alreadyhavekenya
+ writetext UnknownText_0x69ed6
+ waitbutton
+ closetext
+ end
+
+.partyfull
+ writetext UnknownText_0x69f56
+ waitbutton
+ closetext
+ end
+
+.refused
+ writetext UnknownText_0x69f74
+ waitbutton
+ closetext
+ end
+
+.questcomplete
+ writetext UnknownText_0x69f8b
+ buttonsound
+ verbosegiveitem HP_UP
+ iffalse .bagfull
+ setevent EVENT_GOT_HP_UP_FROM_RANDY
+.gothpup
+ writetext UnknownText_0x69fd9
+ waitbutton
+.bagfull
+ closetext
+ end
+
+GiftSpearowMail:
+ db FLOWER_MAIL
+ db "DARK CAVE leads"
+ next "to another road@"
+GiftSpearowName:
+ db "KENYA@"
+GiftSpearowOTName:
+ db "RANDY@"
+
+ db 0
+
+PokefanFScript_0x69dc6:
+ faceplayer
+ opentext
+ checkevent EVENT_FOUGHT_SUDOWOODO
+ iftrue .aftersudowoodo
+ writetext UnknownText_0x6a00a
+ waitbutton
+ closetext
+ end
+
+.aftersudowoodo
+ writetext UnknownText_0x6a09a
+ waitbutton
+ closetext
+ end
+
+Route35GoldenrodGateFisherScript:
+ jumptextfaceplayer Route35GoldenrodGateFisherText
+
+UnknownText_0x69ddd:
+ text "Excuse me, kid!"
+ line "Can you do a guy"
+ cont "a favor?"
+
+ para "Can you take this"
+ line "#MON with MAIL"
+ cont "to my friend?"
+
+ para "He's on ROUTE 31."
+ done
+
+UnknownText_0x69e48:
+ text "You will? Perfect!"
+ line "Thanks, kid!"
+
+ para "My pal's a chubby"
+ line "guy who snoozes"
+ cont "all the time."
+
+ para "You'll recognize"
+ line "him right away!"
+ done
+
+UnknownText_0x69eb8:
+ text "<PLAYER> received a"
+ line "#MON with MAIL."
+ done
+
+UnknownText_0x69ed6:
+ text "You can read it,"
+ line "but don't lose it!"
+ cont "ROUTE 31!"
+
+ para "Oh, yeah. There"
+ line "was a weird tree"
+ cont "blocking the road."
+
+ para "I wonder if it's"
+ line "been cleared?"
+ done
+
+UnknownText_0x69f56:
+ text "You can't carry"
+ line "another #MON…"
+ done
+
+UnknownText_0x69f74:
+ text "Oh… Never mind,"
+ line "then…"
+ done
+
+UnknownText_0x69f8b:
+ text "Thanks, kid! You"
+ line "made the delivery"
+ cont "for me!"
+
+ para "Here's something"
+ line "for your trouble!"
+ done
+
+UnknownText_0x69fd9:
+ text "My pal was snooz-"
+ line "ing, right? Heh,"
+ cont "what'd I say?"
+ done
+
+UnknownText_0x6a00a:
+ text "A strange tree is"
+ line "blocking the road."
+
+ para "It wriggles around"
+ line "if you talk to it."
+
+ para "I heard it became"
+ line "wild when someone"
+
+ para "watered it with a"
+ line "SQUIRTBOTTLE."
+ done
+
+UnknownText_0x6a09a:
+ text "I like the #MON"
+ line "Lullaby they play"
+ cont "on the radio."
+ done
+
+Route35GoldenrodGateFisherText:
+ text "I wonder how many"
+ line "kinds of #MON"
+
+ para "there are in the"
+ line "world."
+
+ para "Three years ago,"
+ line "PROF.OAK said that"
+
+ para "there were 150"
+ line "different kinds."
+ done
+
+Route35GoldenrodGate_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 4
+ warp_def $0, $4, 1, ROUTE_35
+ warp_def $0, $5, 2, ROUTE_35
+ warp_def $7, $4, 12, GOLDENROD_CITY
+ warp_def $7, $5, 12, GOLDENROD_CITY
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 3
+ object_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x69d37, -1
+ object_event SPRITE_POKEFAN_F, 4, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PokefanFScript_0x69dc6, -1
+ object_event SPRITE_FISHER, 2, 3, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route35GoldenrodGateFisherScript, -1
diff --git a/maps/Route35Goldenrodgate.asm b/maps/Route35Goldenrodgate.asm
deleted file mode 100644
index 96d202f9d..000000000
--- a/maps/Route35Goldenrodgate.asm
+++ /dev/null
@@ -1,219 +0,0 @@
-const_value set 2
- const ROUTE35GOLDENRODGATE_OFFICER
- const ROUTE35GOLDENRODGATE_POKEFAN_F
- const ROUTE35GOLDENRODGATE_FISHER
-
-Route35Goldenrodgate_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-OfficerScript_0x69d37:
- faceplayer
- opentext
- checkevent EVENT_GOT_HP_UP_FROM_RANDY
- iftrue .gothpup
- checkevent EVENT_GAVE_KENYA
- iftrue .questcomplete
- checkevent EVENT_GOT_KENYA
- iftrue .alreadyhavekenya
- writetext UnknownText_0x69ddd
- yesorno
- iffalse .refused
- writetext UnknownText_0x69e48
- buttonsound
- waitsfx
- checkcode VAR_PARTYCOUNT
- if_equal PARTY_LENGTH, .partyfull
- writetext UnknownText_0x69eb8
- playsound SFX_KEY_ITEM
- waitsfx
- givepoke SPEAROW, 10, NO_ITEM, 1, GiftSpearowName, GiftSpearowOTName
- givepokeitem GiftSpearowMail
- setevent EVENT_GOT_KENYA
-.alreadyhavekenya
- writetext UnknownText_0x69ed6
- waitbutton
- closetext
- end
-
-.partyfull
- writetext UnknownText_0x69f56
- waitbutton
- closetext
- end
-
-.refused
- writetext UnknownText_0x69f74
- waitbutton
- closetext
- end
-
-.questcomplete
- writetext UnknownText_0x69f8b
- buttonsound
- verbosegiveitem HP_UP
- iffalse .bagfull
- setevent EVENT_GOT_HP_UP_FROM_RANDY
-.gothpup
- writetext UnknownText_0x69fd9
- waitbutton
-.bagfull
- closetext
- end
-
-GiftSpearowMail:
- db FLOWER_MAIL
- db "DARK CAVE leads"
- next "to another road@"
-GiftSpearowName:
- db "KENYA@"
-GiftSpearowOTName:
- db "RANDY@"
-
- db 0
-
-PokefanFScript_0x69dc6:
- faceplayer
- opentext
- checkevent EVENT_FOUGHT_SUDOWOODO
- iftrue .aftersudowoodo
- writetext UnknownText_0x6a00a
- waitbutton
- closetext
- end
-
-.aftersudowoodo
- writetext UnknownText_0x6a09a
- waitbutton
- closetext
- end
-
-FisherScript_0x69dda:
- jumptextfaceplayer UnknownText_0x6a0cb
-
-UnknownText_0x69ddd:
- text "Excuse me, kid!"
- line "Can you do a guy"
- cont "a favor?"
-
- para "Can you take this"
- line "#MON with MAIL"
- cont "to my friend?"
-
- para "He's on ROUTE 31."
- done
-
-UnknownText_0x69e48:
- text "You will? Perfect!"
- line "Thanks, kid!"
-
- para "My pal's a chubby"
- line "guy who snoozes"
- cont "all the time."
-
- para "You'll recognize"
- line "him right away!"
- done
-
-UnknownText_0x69eb8:
- text "<PLAYER> received a"
- line "#MON with MAIL."
- done
-
-UnknownText_0x69ed6:
- text "You can read it,"
- line "but don't lose it!"
- cont "ROUTE 31!"
-
- para "Oh, yeah. There"
- line "was a weird tree"
- cont "blocking the road."
-
- para "I wonder if it's"
- line "been cleared?"
- done
-
-UnknownText_0x69f56:
- text "You can't carry"
- line "another #MON…"
- done
-
-UnknownText_0x69f74:
- text "Oh… Never mind,"
- line "then…"
- done
-
-UnknownText_0x69f8b:
- text "Thanks, kid! You"
- line "made the delivery"
- cont "for me!"
-
- para "Here's something"
- line "for your trouble!"
- done
-
-UnknownText_0x69fd9:
- text "My pal was snooz-"
- line "ing, right? Heh,"
- cont "what'd I say?"
- done
-
-UnknownText_0x6a00a:
- text "A strange tree is"
- line "blocking the road."
-
- para "It wriggles around"
- line "if you talk to it."
-
- para "I heard it became"
- line "wild when someone"
-
- para "watered it with a"
- line "SQUIRTBOTTLE."
- done
-
-UnknownText_0x6a09a:
- text "I like the #MON"
- line "Lullaby they play"
- cont "on the radio."
- done
-
-UnknownText_0x6a0cb:
- text "I wonder how many"
- line "kinds of #MON"
-
- para "there are in the"
- line "world."
-
- para "Three years ago,"
- line "PROF.OAK said that"
-
- para "there were 150"
- line "different kinds."
- done
-
-Route35Goldenrodgate_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 4
- warp_def $0, $4, 1, ROUTE_35
- warp_def $0, $5, 2, ROUTE_35
- warp_def $7, $4, 12, GOLDENROD_CITY
- warp_def $7, $5, 12, GOLDENROD_CITY
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 3
- person_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, OfficerScript_0x69d37, -1
- person_event SPRITE_POKEFAN_F, 4, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x69dc6, -1
- person_event SPRITE_FISHER, 2, 3, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FisherScript_0x69dda, -1
diff --git a/maps/Route35NationalParkGate.asm b/maps/Route35NationalParkGate.asm
new file mode 100644
index 000000000..c3c38a34f
--- /dev/null
+++ b/maps/Route35NationalParkGate.asm
@@ -0,0 +1,462 @@
+const_value set 2
+ const ROUTE35NATIONALPARKGATE_OFFICER1
+ const ROUTE35NATIONALPARKGATE_YOUNGSTER
+ const ROUTE35NATIONALPARKGATE_OFFICER2
+
+Route35NationalParkGate_MapScriptHeader:
+.SceneScripts:
+ db 3
+ scene_script .DummyScene0
+ scene_script .DummyScene1
+ scene_script .LeaveContestEarly
+
+.MapCallbacks:
+ db 2
+ dbw MAPCALLBACK_NEWMAP, .CheckIfContestRunning
+ dbw MAPCALLBACK_OBJECTS, .CheckIfContestAvailable
+
+.DummyScene0:
+ end
+
+.DummyScene1:
+ end
+
+.LeaveContestEarly:
+ priorityjump .LeavingContestEarly
+ end
+
+.CheckIfContestRunning:
+ checkflag ENGINE_BUG_CONTEST_TIMER
+ iftrue .BugContestIsRunning
+ setscene $0
+ return
+
+.BugContestIsRunning:
+ setscene $2
+ return
+
+.CheckIfContestAvailable:
+ checkcode VAR_WEEKDAY
+ if_equal TUESDAY, .SetContestOfficer
+ if_equal THURSDAY, .SetContestOfficer
+ if_equal SATURDAY, .SetContestOfficer
+ checkflag ENGINE_BUG_CONTEST_TIMER
+ iftrue .BugContestIsRunning
+ disappear ROUTE35NATIONALPARKGATE_OFFICER1
+ appear ROUTE35NATIONALPARKGATE_YOUNGSTER
+ appear ROUTE35NATIONALPARKGATE_OFFICER2
+ return
+
+.SetContestOfficer:
+ appear ROUTE35NATIONALPARKGATE_OFFICER1
+ disappear ROUTE35NATIONALPARKGATE_YOUNGSTER
+ disappear ROUTE35NATIONALPARKGATE_OFFICER2
+ return
+
+.LeavingContestEarly:
+ applymovement PLAYER, MovementData_0x6a2e2
+ spriteface ROUTE35NATIONALPARKGATE_OFFICER1, RIGHT
+ opentext
+ checkcode VAR_CONTESTMINUTES
+ addvar $1
+ RAM2MEM $0
+ writetext UnknownText_0x6a79a
+ yesorno
+ iffalse .GoBackToContest
+ writetext UnknownText_0x6a7db
+ waitbutton
+ closetext
+ jumpstd bugcontestresultswarp
+
+.GoBackToContest:
+ writetext UnknownText_0x6a823
+ waitbutton
+ closetext
+ scall Route35NationalParkGate_EnterContest
+ playsound SFX_ENTER_DOOR
+ special FadeOutPalettes
+ waitsfx
+ warpfacing UP, NATIONAL_PARK_BUG_CONTEST, $a, $2f
+ end
+
+OfficerScript_0x6a204:
+ checkcode VAR_WEEKDAY
+ if_equal SUNDAY, Route35NationalParkGate_NoContestToday
+ if_equal MONDAY, Route35NationalParkGate_NoContestToday
+ if_equal WEDNESDAY, Route35NationalParkGate_NoContestToday
+ if_equal FRIDAY, Route35NationalParkGate_NoContestToday
+ faceplayer
+ opentext
+ checkflag ENGINE_DAILY_BUG_CONTEST
+ iftrue Route35NationalParkGate_ContestIsOver
+ scall Route35NationalParkGate_GetDayOfWeek
+ writetext UnknownText_0x6a2eb
+ yesorno
+ iffalse Route35NationalParkGate_DeclinedToParticipate
+ checkcode VAR_PARTYCOUNT
+ if_greater_than $1, Route35NationalParkGate_LeaveTheRestBehind
+ special ContestDropOffMons
+ clearevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
+Route35NationalParkGate_OkayToProceed:
+ setflag ENGINE_BUG_CONTEST_TIMER
+ special PlayMapMusic
+ writetext UnknownText_0x6a39d
+ buttonsound
+ writetext UnknownText_0x6a3c7
+ playsound SFX_ITEM
+ waitsfx
+ writetext UnknownText_0x6a3e2
+ waitbutton
+ closetext
+ special Special_GiveParkBalls
+ scall Route35NationalParkGate_EnterContest
+ playsound SFX_ENTER_DOOR
+ special FadeOutPalettes
+ waitsfx
+ special Special_SelectRandomBugContestContestants
+ warpfacing UP, NATIONAL_PARK_BUG_CONTEST, $a, $2f
+ end
+
+Route35NationalParkGate_EnterContest:
+ checkcode VAR_FACING
+ if_equal LEFT, Route35NationalParkGate_FacingLeft
+ applymovement PLAYER, MovementData_0x6a2e5
+ end
+
+Route35NationalParkGate_FacingLeft:
+ applymovement PLAYER, MovementData_0x6a2e9
+ end
+
+Route35NationalParkGate_LeaveTheRestBehind:
+ checkcode VAR_PARTYCOUNT
+ if_less_than 6, Route35NationalParkGate_LessThanFullParty
+ checkcode VAR_BOXSPACE
+ if_equal 0, Route35NationalParkGate_NoRoomInBox
+
+Route35NationalParkGate_LessThanFullParty: ; 6a27d
+ special CheckFirstMonIsEgg
+ if_equal $1, Route35NationalParkGate_FirstMonIsEgg
+ writetext UnknownText_0x6a4c6
+ yesorno
+ iffalse Route35NationalParkGate_DeclinedToLeaveMonsBehind
+ special ContestDropOffMons
+ iftrue Route35NationalParkGate_FirstMonIsFainted
+ setevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
+ writetext UnknownText_0x6a537
+ buttonsound
+ writetext UnknownText_0x6a56b
+ playsound SFX_GOT_SAFARI_BALLS
+ waitsfx
+ buttonsound
+ jump Route35NationalParkGate_OkayToProceed
+
+Route35NationalParkGate_DeclinedToParticipate:
+ writetext UnknownText_0x6a5dc
+ waitbutton
+ closetext
+ end
+
+Route35NationalParkGate_DeclinedToLeaveMonsBehind:
+ writetext UnknownText_0x6a597
+ waitbutton
+ closetext
+ end
+
+Route35NationalParkGate_FirstMonIsFainted:
+ writetext UnknownText_0x6a608
+ waitbutton
+ closetext
+ end
+
+Route35NationalParkGate_NoRoomInBox:
+ writetext UnknownText_0x6a67c
+ waitbutton
+ closetext
+ end
+
+Route35NationalParkGate_FirstMonIsEgg:
+ writetext UnknownText_0x6a71f
+ waitbutton
+ closetext
+ end
+
+Route35NationalParkGate_ContestIsOver:
+ writetext UnknownText_0x6a84f
+ waitbutton
+ closetext
+ end
+
+Route35NationalParkGate_NoContestToday:
+ jumptextfaceplayer UnknownText_0x6a894
+
+OfficerScript_0x6a2ca:
+ faceplayer
+ opentext
+ checkflag ENGINE_DAILY_BUG_CONTEST
+ iftrue Route35NationalParkGate_ContestIsOver
+ writetext UnknownText_0x6a894
+ waitbutton
+ closetext
+ end
+
+Route35NationalParkGateYoungsterScript:
+ jumptextfaceplayer Route35NationalParkGateYoungsterText
+
+MapRoute36NationalParkGateSignpost0Script:
+ jumptext UnknownText_0x6a90e
+
+Route35NationalParkGate_GetDayOfWeek:
+ jumpstd daytotext
+ end
+
+MovementData_0x6a2e2:
+ step DOWN
+ turn_head LEFT
+ step_end
+
+MovementData_0x6a2e5:
+ step RIGHT
+ step UP
+ step UP
+ step_end
+
+MovementData_0x6a2e9:
+ step UP
+ step_end
+
+UnknownText_0x6a2eb:
+ text "Today's @"
+ text_from_ram StringBuffer3
+ text "."
+ line "That means the"
+
+ para "Bug-Catching Con-"
+ line "test is on today."
+
+ para "The rules are sim-"
+ line "ple."
+
+ para "Using one of your"
+ line "#MON, catch a"
+
+ para "bug #MON to be"
+ line "judged."
+
+ para "Would you like to"
+ line "give it a try?"
+ done
+
+UnknownText_0x6a39d:
+ text "Here are the PARK"
+ line "BALLS for the"
+ cont "Contest."
+ done
+
+UnknownText_0x6a3c7:
+ text "<PLAYER> received"
+ line "20 PARK BALLS."
+ done
+
+UnknownText_0x6a3e2:
+ text "The person who"
+ line "gets the strong-"
+ cont "est bug #MON"
+ cont "is the winner."
+
+ para "You have 20"
+ line "minutes."
+
+ para "If you run out of"
+ line "PARK BALLS, you're"
+ cont "done."
+
+ para "You can keep the"
+ line "last #MON you"
+ cont "catch as your own."
+
+ para "Go out and catch"
+ line "the strongest bug"
+
+ para "#MON you can"
+ line "find!"
+ done
+
+UnknownText_0x6a4c6:
+ text "Uh-oh…"
+
+ para "You have more than"
+ line "one #MON."
+
+ para "You'll have to use"
+ line "@"
+ text_from_ram StringBuffer3
+ text ", the"
+
+ para "first #MON in"
+ line "your party."
+
+ para "Is that OK with"
+ line "you?"
+ done
+
+UnknownText_0x6a537:
+ text "Fine, we'll hold"
+ line "your other #MON"
+ cont "while you compete."
+ done
+
+UnknownText_0x6a56b:
+ text "<PLAYER>'s #MON"
+ line "were left with the"
+ cont "CONTEST HELPER."
+ done
+
+UnknownText_0x6a597:
+ text "Please choose the"
+ line "#MON to be used"
+
+ para "in the Contest,"
+ line "then come see me."
+ done
+
+UnknownText_0x6a5dc:
+ text "OK. We hope you'll"
+ line "take part in the"
+ cont "future."
+ done
+
+UnknownText_0x6a608:
+ text "Uh-oh…"
+ line "The first #MON"
+
+ para "in your party"
+ line "can't battle."
+
+ para "Please switch it"
+ line "with the #MON"
+
+ para "you want to use,"
+ line "then come see me."
+ done
+
+UnknownText_0x6a67c:
+ text "Uh-oh…"
+ line "Both your party"
+
+ para "and your PC BOX"
+ line "are full."
+
+ para "You have no room"
+ line "to put the bug"
+ cont "#MON you catch."
+
+ para "Please make room"
+ line "in your party or"
+
+ para "your PC BOX, then"
+ line "come see me."
+ done
+
+UnknownText_0x6a71f:
+ text "Uh-oh…"
+ line "You have an EGG as"
+
+ para "the first #MON"
+ line "in your party."
+
+ para "Please switch it"
+ line "with the #MON"
+
+ para "you want to use,"
+ line "then come see me."
+ done
+
+UnknownText_0x6a79a:
+ text "You still have @"
+ text_from_ram StringBuffer3
+ text ""
+ line "minute(s) left."
+
+ para "Do you want to"
+ line "finish now?"
+ done
+
+UnknownText_0x6a7db:
+ text "OK. Please wait at"
+ line "the North Gate for"
+
+ para "the announcement"
+ line "of the winners."
+ done
+
+UnknownText_0x6a823:
+ text "OK. Please get"
+ line "back outside and"
+ cont "finish up."
+ done
+
+UnknownText_0x6a84f:
+ text "Today's Contest is"
+ line "over. We hope you"
+
+ para "will participate"
+ line "in the future."
+ done
+
+UnknownText_0x6a894:
+ text "We hold Contests"
+ line "regularly in the"
+
+ para "PARK. You should"
+ line "give it a shot."
+ done
+
+Route35NationalParkGateYoungsterText:
+ text "When is the next"
+ line "Bug-Catching Con-"
+ cont "test going to be?"
+ done
+
+UnknownText_0x6a90e:
+ text "The Bug-Catching"
+ line "Contest is held on"
+
+ para "Tuesday, Thursday"
+ line "and Saturday."
+
+ para "Not only do you"
+ line "earn a prize just"
+
+ para "for participating,"
+ line "you also get to"
+
+ para "keep the bug"
+ line "#MON you may"
+
+ para "have at the end of"
+ line "the contest."
+ done
+
+Route35NationalParkGate_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 4
+ warp_def $0, $3, 3, NATIONAL_PARK
+ warp_def $0, $4, 4, NATIONAL_PARK
+ warp_def $7, $3, 3, ROUTE_35
+ warp_def $7, $4, 3, ROUTE_35
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 1
+ bg_event 0, 5, BGEVENT_READ, MapRoute36NationalParkGateSignpost0Script
+
+.ObjectEvents:
+ db 3
+ object_event SPRITE_OFFICER, 1, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x6a204, EVENT_ROUTE_35_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY
+ object_event SPRITE_YOUNGSTER, 5, 6, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route35NationalParkGateYoungsterScript, EVENT_ROUTE_35_NATIONAL_PARK_GATE_YOUNGSTER
+ object_event SPRITE_OFFICER, 3, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x6a2ca, EVENT_ROUTE_35_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY
diff --git a/maps/Route35NationalParkgate.blk b/maps/Route35NationalParkGate.blk
index 14662eb45..14662eb45 100644
--- a/maps/Route35NationalParkgate.blk
+++ b/maps/Route35NationalParkGate.blk
diff --git a/maps/Route35NationalParkgate.asm b/maps/Route35NationalParkgate.asm
deleted file mode 100644
index d2df78c46..000000000
--- a/maps/Route35NationalParkgate.asm
+++ /dev/null
@@ -1,468 +0,0 @@
-const_value set 2
- const ROUTE35NATIONALPARKGATE_OFFICER1
- const ROUTE35NATIONALPARKGATE_YOUNGSTER
- const ROUTE35NATIONALPARKGATE_OFFICER2
-
-Route35NationalParkgate_MapScriptHeader:
-.MapTriggers:
- db 3
-
- ; triggers
- dw Route35NationalParkgate_Trigger1, 0
- dw Route35NationalParkgate_Trigger2, 0
- dw Route35NationalParkgate_Trigger3, 0
-
-.MapCallbacks:
- db 2
-
- ; callbacks
-
- dbw MAPCALLBACK_NEWMAP, Route35NationalParkgate_CheckIfStillInContest
-
- dbw MAPCALLBACK_OBJECTS, Route35NationalParkgate_CheckIfContestDay
-
-Route35NationalParkgate_Trigger1:
- end
-
-Route35NationalParkgate_Trigger2:
- end
-
-Route35NationalParkgate_Trigger3:
- priorityjump Route35NationalParkGate_LeavingContestEarly
- end
-
-Route35NationalParkgate_CheckIfStillInContest:
- checkflag ENGINE_BUG_CONTEST_TIMER
- iftrue Route35NationalParkgate_Yes
- dotrigger $0
- return
-
-Route35NationalParkgate_Yes:
- dotrigger $2
- return
-
-Route35NationalParkgate_CheckIfContestDay:
- checkcode VAR_WEEKDAY
- if_equal TUESDAY, Route35NationalParkgate_IsContestDay
- if_equal THURSDAY, Route35NationalParkgate_IsContestDay
- if_equal SATURDAY, Route35NationalParkgate_IsContestDay
- checkflag ENGINE_BUG_CONTEST_TIMER
- iftrue Route35NationalParkgate_Yes
- disappear ROUTE35NATIONALPARKGATE_OFFICER1
- appear ROUTE35NATIONALPARKGATE_YOUNGSTER
- appear ROUTE35NATIONALPARKGATE_OFFICER2
- return
-
-Route35NationalParkgate_IsContestDay:
- appear ROUTE35NATIONALPARKGATE_OFFICER1
- disappear ROUTE35NATIONALPARKGATE_YOUNGSTER
- disappear ROUTE35NATIONALPARKGATE_OFFICER2
- return
-
-Route35NationalParkGate_LeavingContestEarly:
- applymovement PLAYER, MovementData_0x6a2e2
- spriteface ROUTE35NATIONALPARKGATE_OFFICER1, RIGHT
- opentext
- checkcode VAR_CONTESTMINUTES
- addvar $1
- RAM2MEM $0
- writetext UnknownText_0x6a79a
- yesorno
- iffalse Route35NationalParkgate_GoBackIn
- writetext UnknownText_0x6a7db
- waitbutton
- closetext
- jumpstd bugcontestresultswarp
-
-Route35NationalParkgate_GoBackIn:
- writetext UnknownText_0x6a823
- waitbutton
- closetext
- scall Route35NationalParkgate_EnterContest
- playsound SFX_ENTER_DOOR
- special FadeOutPalettes
- waitsfx
- warpfacing UP, NATIONAL_PARK_BUG_CONTEST, $a, $2f
- end
-
-OfficerScript_0x6a204:
- checkcode VAR_WEEKDAY
- if_equal SUNDAY, Route35NationalParkgate_NoContestToday
- if_equal MONDAY, Route35NationalParkgate_NoContestToday
- if_equal WEDNESDAY, Route35NationalParkgate_NoContestToday
- if_equal FRIDAY, Route35NationalParkgate_NoContestToday
- faceplayer
- opentext
- checkflag ENGINE_DAILY_BUG_CONTEST
- iftrue Route35NationalParkgate_ContestIsOver
- scall Route35NationalParkgate_GetDayOfWeek
- writetext UnknownText_0x6a2eb
- yesorno
- iffalse Route35NationalParkgate_DeclinedToParticipate
- checkcode VAR_PARTYCOUNT
- if_greater_than $1, Route35NationalParkgate_LeaveTheRestBehind
- special ContestDropOffMons
- clearevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
-Route35NationalParkgate_OkayToProceed:
- setflag ENGINE_BUG_CONTEST_TIMER
- special PlayMapMusic
- writetext UnknownText_0x6a39d
- buttonsound
- writetext UnknownText_0x6a3c7
- playsound SFX_ITEM
- waitsfx
- writetext UnknownText_0x6a3e2
- waitbutton
- closetext
- special Special_GiveParkBalls
- scall Route35NationalParkgate_EnterContest
- playsound SFX_ENTER_DOOR
- special FadeOutPalettes
- waitsfx
- special Special_SelectRandomBugContestContestants
- warpfacing UP, NATIONAL_PARK_BUG_CONTEST, $a, $2f
- end
-
-Route35NationalParkgate_EnterContest:
- checkcode VAR_FACING
- if_equal LEFT, Route35NationalParkgate_FacingLeft
- applymovement PLAYER, MovementData_0x6a2e5
- end
-
-Route35NationalParkgate_FacingLeft:
- applymovement PLAYER, MovementData_0x6a2e9
- end
-
-Route35NationalParkgate_LeaveTheRestBehind:
- checkcode VAR_PARTYCOUNT
- if_less_than 6, Route35NationalParkgate_LessThanFullParty
- checkcode VAR_BOXSPACE
- if_equal 0, Route35NationalParkgate_NoRoomInBox
-
-Route35NationalParkgate_LessThanFullParty: ; 6a27d
- special CheckFirstMonIsEgg
- if_equal $1, Route35NationalParkgate_FirstMonIsEgg
- writetext UnknownText_0x6a4c6
- yesorno
- iffalse Route35NationalParkgate_DeclinedToLeaveMonsBehind
- special ContestDropOffMons
- iftrue Route35NationalParkgate_FirstMonIsFainted
- setevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
- writetext UnknownText_0x6a537
- buttonsound
- writetext UnknownText_0x6a56b
- playsound SFX_GOT_SAFARI_BALLS
- waitsfx
- buttonsound
- jump Route35NationalParkgate_OkayToProceed
-
-Route35NationalParkgate_DeclinedToParticipate:
- writetext UnknownText_0x6a5dc
- waitbutton
- closetext
- end
-
-Route35NationalParkgate_DeclinedToLeaveMonsBehind:
- writetext UnknownText_0x6a597
- waitbutton
- closetext
- end
-
-Route35NationalParkgate_FirstMonIsFainted:
- writetext UnknownText_0x6a608
- waitbutton
- closetext
- end
-
-Route35NationalParkgate_NoRoomInBox:
- writetext UnknownText_0x6a67c
- waitbutton
- closetext
- end
-
-Route35NationalParkgate_FirstMonIsEgg:
- writetext UnknownText_0x6a71f
- waitbutton
- closetext
- end
-
-Route35NationalParkgate_ContestIsOver:
- writetext UnknownText_0x6a84f
- waitbutton
- closetext
- end
-
-Route35NationalParkgate_NoContestToday:
- jumptextfaceplayer UnknownText_0x6a894
-
-OfficerScript_0x6a2ca:
- faceplayer
- opentext
- checkflag ENGINE_DAILY_BUG_CONTEST
- iftrue Route35NationalParkgate_ContestIsOver
- writetext UnknownText_0x6a894
- waitbutton
- closetext
- end
-
-YoungsterScript_0x6a2d8:
- jumptextfaceplayer UnknownText_0x6a8d8
-
-MapRoute36NationalParkgateSignpost0Script:
- jumptext UnknownText_0x6a90e
-
-Route35NationalParkgate_GetDayOfWeek:
- jumpstd daytotext
- end
-
-MovementData_0x6a2e2:
- step DOWN
- turn_head LEFT
- step_end
-
-MovementData_0x6a2e5:
- step RIGHT
- step UP
- step UP
- step_end
-
-MovementData_0x6a2e9:
- step UP
- step_end
-
-UnknownText_0x6a2eb:
- text "Today's @"
- text_from_ram StringBuffer3
- text "."
- line "That means the"
-
- para "Bug-Catching Con-"
- line "test is on today."
-
- para "The rules are sim-"
- line "ple."
-
- para "Using one of your"
- line "#MON, catch a"
-
- para "bug #MON to be"
- line "judged."
-
- para "Would you like to"
- line "give it a try?"
- done
-
-UnknownText_0x6a39d:
- text "Here are the PARK"
- line "BALLS for the"
- cont "Contest."
- done
-
-UnknownText_0x6a3c7:
- text "<PLAYER> received"
- line "20 PARK BALLS."
- done
-
-UnknownText_0x6a3e2:
- text "The person who"
- line "gets the strong-"
- cont "est bug #MON"
- cont "is the winner."
-
- para "You have 20"
- line "minutes."
-
- para "If you run out of"
- line "PARK BALLS, you're"
- cont "done."
-
- para "You can keep the"
- line "last #MON you"
- cont "catch as your own."
-
- para "Go out and catch"
- line "the strongest bug"
-
- para "#MON you can"
- line "find!"
- done
-
-UnknownText_0x6a4c6:
- text "Uh-oh…"
-
- para "You have more than"
- line "one #MON."
-
- para "You'll have to use"
- line "@"
- text_from_ram StringBuffer3
- text ", the"
-
- para "first #MON in"
- line "your party."
-
- para "Is that OK with"
- line "you?"
- done
-
-UnknownText_0x6a537:
- text "Fine, we'll hold"
- line "your other #MON"
- cont "while you compete."
- done
-
-UnknownText_0x6a56b:
- text "<PLAYER>'s #MON"
- line "were left with the"
- cont "CONTEST HELPER."
- done
-
-UnknownText_0x6a597:
- text "Please choose the"
- line "#MON to be used"
-
- para "in the Contest,"
- line "then come see me."
- done
-
-UnknownText_0x6a5dc:
- text "OK. We hope you'll"
- line "take part in the"
- cont "future."
- done
-
-UnknownText_0x6a608:
- text "Uh-oh…"
- line "The first #MON"
-
- para "in your party"
- line "can't battle."
-
- para "Please switch it"
- line "with the #MON"
-
- para "you want to use,"
- line "then come see me."
- done
-
-UnknownText_0x6a67c:
- text "Uh-oh…"
- line "Both your party"
-
- para "and your PC BOX"
- line "are full."
-
- para "You have no room"
- line "to put the bug"
- cont "#MON you catch."
-
- para "Please make room"
- line "in your party or"
-
- para "your PC BOX, then"
- line "come see me."
- done
-
-UnknownText_0x6a71f:
- text "Uh-oh…"
- line "You have an EGG as"
-
- para "the first #MON"
- line "in your party."
-
- para "Please switch it"
- line "with the #MON"
-
- para "you want to use,"
- line "then come see me."
- done
-
-UnknownText_0x6a79a:
- text "You still have @"
- text_from_ram StringBuffer3
- text ""
- line "minute(s) left."
-
- para "Do you want to"
- line "finish now?"
- done
-
-UnknownText_0x6a7db:
- text "OK. Please wait at"
- line "the North Gate for"
-
- para "the announcement"
- line "of the winners."
- done
-
-UnknownText_0x6a823:
- text "OK. Please get"
- line "back outside and"
- cont "finish up."
- done
-
-UnknownText_0x6a84f:
- text "Today's Contest is"
- line "over. We hope you"
-
- para "will participate"
- line "in the future."
- done
-
-UnknownText_0x6a894:
- text "We hold Contests"
- line "regularly in the"
-
- para "PARK. You should"
- line "give it a shot."
- done
-
-UnknownText_0x6a8d8:
- text "When is the next"
- line "Bug-Catching Con-"
- cont "test going to be?"
- done
-
-UnknownText_0x6a90e:
- text "The Bug-Catching"
- line "Contest is held on"
-
- para "Tuesday, Thursday"
- line "and Saturday."
-
- para "Not only do you"
- line "earn a prize just"
-
- para "for participating,"
- line "you also get to"
-
- para "keep the bug"
- line "#MON you may"
-
- para "have at the end of"
- line "the contest."
- done
-
-Route35NationalParkgate_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 4
- warp_def $0, $3, 3, NATIONAL_PARK
- warp_def $0, $4, 4, NATIONAL_PARK
- warp_def $7, $3, 3, ROUTE_35
- warp_def $7, $4, 3, ROUTE_35
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 1
- signpost 0, 5, SIGNPOST_READ, MapRoute36NationalParkgateSignpost0Script
-
-.PersonEvents:
- db 3
- person_event SPRITE_OFFICER, 1, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, OfficerScript_0x6a204, EVENT_ROUTE_35_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY
- person_event SPRITE_YOUNGSTER, 5, 6, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x6a2d8, EVENT_ROUTE_35_NATIONAL_PARK_GATE_YOUNGSTER
- person_event SPRITE_OFFICER, 3, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, OfficerScript_0x6a2ca, EVENT_ROUTE_35_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY
diff --git a/maps/Route36.asm b/maps/Route36.asm
index 02ca0e9cd..86f7ca9fe 100644
--- a/maps/Route36.asm
+++ b/maps/Route36.asm
@@ -10,24 +10,19 @@ const_value set 2
const ROUTE36_SUICUNE
Route36_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw .Trigger0, 0
- dw .Trigger1, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_OBJECTS, .ArthurCallback
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
+.DummyScene1:
end
.ArthurCallback:
@@ -49,9 +44,9 @@ Route36SuicuneScript:
disappear ROUTE36_SUICUNE
spriteface PLAYER, DOWN
pause 10
- dotrigger $0
+ setscene $0
clearevent EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY
- domaptrigger CIANWOOD_CITY, $1
+ setmapscene CIANWOOD_CITY, $1
end
SudowoodoScript:
@@ -315,7 +310,7 @@ TrainerPsychicMark:
.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19471e
+ writetext PsychicMarkAfterBattleText
waitbutton
closetext
end
@@ -558,7 +553,7 @@ PsychicMarkBeatenText:
text "I misread you!"
done
-UnknownText_0x19471e:
+PsychicMarkAfterBattleText:
text "I'd be strong if"
line "only I could tell"
@@ -675,26 +670,26 @@ Route36_MapEventHeader:
warp_def $d, $2f, 1, ROUTE_36_RUINS_OF_ALPH_GATE
warp_def $d, $30, 2, ROUTE_36_RUINS_OF_ALPH_GATE
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 1, $7, $14, $0, Route36SuicuneScript, $0, $0
- xy_trigger 1, $7, $16, $0, Route36SuicuneScript, $0, $0
+ coord_event 1, $7, $14, Route36SuicuneScript
+ coord_event 1, $7, $16, Route36SuicuneScript
-.Signposts:
+.BGEvents:
db 4
- signpost 1, 29, SIGNPOST_READ, Route36TrainerTips2
- signpost 11, 45, SIGNPOST_READ, RuinsOfAlphNorthSign
- signpost 7, 55, SIGNPOST_READ, Route36Sign
- signpost 7, 21, SIGNPOST_READ, Route36TrainerTips1
+ bg_event 1, 29, BGEVENT_READ, Route36TrainerTips2
+ bg_event 11, 45, BGEVENT_READ, RuinsOfAlphNorthSign
+ bg_event 7, 55, BGEVENT_READ, Route36Sign
+ bg_event 7, 21, BGEVENT_READ, Route36TrainerTips1
-.PersonEvents:
+.ObjectEvents:
db 9
- person_event SPRITE_YOUNGSTER, 13, 20, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerPsychicMark, -1
- person_event SPRITE_YOUNGSTER, 14, 31, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 5, TrainerSchoolboyAlan1, -1
- person_event SPRITE_WEIRD_TREE, 9, 35, SPRITEMOVEDATA_SUDOWOODO, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SudowoodoScript, EVENT_ROUTE_36_SUDOWOODO
- person_event SPRITE_LASS, 8, 51, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LassScript_0x1940e0, -1
- person_event SPRITE_FISHER, 9, 44, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route36RockSmashGuyScript, -1
- person_event SPRITE_FRUIT_TREE, 4, 21, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route36FruitTree, -1
- person_event SPRITE_YOUNGSTER, 6, 46, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ArthurScript, EVENT_ROUTE_36_ARTHUR_OF_THURSDAY
- person_event SPRITE_LASS, 12, 33, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, Route36FloriaScript, EVENT_FLORIA_AT_SUDOWOODO
- person_event SPRITE_SUICUNE, 6, 21, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_SAW_SUICUNE_ON_ROUTE_36
+ object_event SPRITE_YOUNGSTER, 13, 20, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPsychicMark, -1
+ object_event SPRITE_YOUNGSTER, 14, 31, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 5, TrainerSchoolboyAlan1, -1
+ object_event SPRITE_WEIRD_TREE, 9, 35, SPRITEMOVEDATA_SUDOWOODO, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SudowoodoScript, EVENT_ROUTE_36_SUDOWOODO
+ object_event SPRITE_LASS, 8, 51, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LassScript_0x1940e0, -1
+ object_event SPRITE_FISHER, 9, 44, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route36RockSmashGuyScript, -1
+ object_event SPRITE_FRUIT_TREE, 4, 21, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route36FruitTree, -1
+ object_event SPRITE_YOUNGSTER, 6, 46, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ArthurScript, EVENT_ROUTE_36_ARTHUR_OF_THURSDAY
+ object_event SPRITE_LASS, 12, 33, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route36FloriaScript, EVENT_FLORIA_AT_SUDOWOODO
+ object_event SPRITE_SUICUNE, 6, 21, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_SAW_SUICUNE_ON_ROUTE_36
diff --git a/maps/Route36NationalParkGate.asm b/maps/Route36NationalParkGate.asm
new file mode 100644
index 000000000..8640b49cf
--- /dev/null
+++ b/maps/Route36NationalParkGate.asm
@@ -0,0 +1,884 @@
+const_value set 2
+ const ROUTE36NATIONALPARKGATE_OFFICER1
+ const ROUTE36NATIONALPARKGATE_YOUNGSTER1
+ const ROUTE36NATIONALPARKGATE_YOUNGSTER2
+ const ROUTE36NATIONALPARKGATE_ROCKER
+ const ROUTE36NATIONALPARKGATE_POKEFAN_M
+ const ROUTE36NATIONALPARKGATE_YOUNGSTER3
+ const ROUTE36NATIONALPARKGATE_YOUNGSTER4
+ const ROUTE36NATIONALPARKGATE_LASS
+ const ROUTE36NATIONALPARKGATE_YOUNGSTER5
+ const ROUTE36NATIONALPARKGATE_YOUNGSTER6
+ const ROUTE36NATIONALPARKGATE_YOUNGSTER7
+ const ROUTE36NATIONALPARKGATE_OFFICER2
+
+Route36NationalParkGate_MapScriptHeader:
+.SceneScripts:
+ db 3
+ scene_script .DummyScene0
+ scene_script .DummyScene1
+ scene_script .LeaveContestEarly
+
+.MapCallbacks:
+ db 2
+ dbw MAPCALLBACK_NEWMAP, .CheckIfContestRunning
+ dbw MAPCALLBACK_OBJECTS, .CheckIfContestAvailable
+
+.DummyScene0:
+ end
+
+.DummyScene1:
+ end
+
+.LeaveContestEarly:
+ priorityjump .LeavingContestEarly
+ end
+
+.CheckIfContestRunning:
+ checkflag ENGINE_BUG_CONTEST_TIMER
+ iftrue .BugContestIsRunning
+ setscene $0
+ return
+
+.BugContestIsRunning:
+ setscene $2
+ return
+
+.CheckIfContestAvailable:
+ checkevent EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE
+ iftrue .Return
+ checkcode VAR_WEEKDAY
+ if_equal TUESDAY, .SetContestOfficer
+ if_equal THURSDAY, .SetContestOfficer
+ if_equal SATURDAY, .SetContestOfficer
+ checkflag ENGINE_BUG_CONTEST_TIMER
+ iftrue .SetContestOfficer
+ disappear ROUTE36NATIONALPARKGATE_OFFICER1
+ appear ROUTE36NATIONALPARKGATE_OFFICER2
+ return
+
+.SetContestOfficer:
+ appear ROUTE36NATIONALPARKGATE_OFFICER1
+ disappear ROUTE36NATIONALPARKGATE_OFFICER2
+.Return:
+ return
+
+.LeavingContestEarly:
+ spriteface PLAYER, UP
+ opentext
+ checkcode VAR_CONTESTMINUTES
+ addvar $1
+ RAM2MEM $0
+ writetext UnknownText_0x6b284
+ yesorno
+ iffalse .GoBackToContest
+ writetext UnknownText_0x6b2c5
+ waitbutton
+ closetext
+ special Special_FadeBlackQuickly
+ special Special_ReloadSpritesNoPalettes
+ scall .CopyContestants
+ disappear ROUTE36NATIONALPARKGATE_OFFICER1
+ appear ROUTE36NATIONALPARKGATE_OFFICER2
+ applymovement PLAYER, MovementData_0x6add1
+ pause 15
+ special Special_FadeInQuickly
+ jumpstd bugcontestresults
+
+.GoBackToContest:
+ writetext UnknownText_0x6b300
+ waitbutton
+ closetext
+ spriteface PLAYER, LEFT
+ playsound SFX_EXIT_BUILDING
+ special FadeOutPalettes
+ waitsfx
+ warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, $21, $12
+ end
+
+.CopyContestants:
+ checkevent EVENT_BUG_CATCHING_CONTESTANT_1A
+ iftrue .Not1
+ appear ROUTE36NATIONALPARKGATE_YOUNGSTER1
+.Not1:
+ checkevent EVENT_BUG_CATCHING_CONTESTANT_2A
+ iftrue .Not2
+ appear ROUTE36NATIONALPARKGATE_YOUNGSTER2
+.Not2:
+ checkevent EVENT_BUG_CATCHING_CONTESTANT_3A
+ iftrue .Not3
+ appear ROUTE36NATIONALPARKGATE_ROCKER
+.Not3:
+ checkevent EVENT_BUG_CATCHING_CONTESTANT_4A
+ iftrue .Not4
+ appear ROUTE36NATIONALPARKGATE_POKEFAN_M
+.Not4:
+ checkevent EVENT_BUG_CATCHING_CONTESTANT_5A
+ iftrue .Not5
+ appear ROUTE36NATIONALPARKGATE_YOUNGSTER3
+.Not5:
+ checkevent EVENT_BUG_CATCHING_CONTESTANT_6A
+ iftrue .Not6
+ appear ROUTE36NATIONALPARKGATE_YOUNGSTER4
+.Not6:
+ checkevent EVENT_BUG_CATCHING_CONTESTANT_7A
+ iftrue .Not7
+ appear ROUTE36NATIONALPARKGATE_LASS
+.Not7:
+ checkevent EVENT_BUG_CATCHING_CONTESTANT_8A
+ iftrue .Not8
+ appear ROUTE36NATIONALPARKGATE_YOUNGSTER5
+.Not8:
+ checkevent EVENT_BUG_CATCHING_CONTESTANT_9A
+ iftrue .Not9
+ appear ROUTE36NATIONALPARKGATE_YOUNGSTER6
+.Not9:
+ checkevent EVENT_BUG_CATCHING_CONTESTANT_10A
+ iftrue .Not10
+ appear ROUTE36NATIONALPARKGATE_YOUNGSTER7
+.Not10:
+ special UpdateSprites
+ end
+
+Route36OfficerScriptContest:
+ checkcode VAR_WEEKDAY
+ if_equal SUNDAY, _ContestNotOn
+ if_equal MONDAY, _ContestNotOn
+ if_equal WEDNESDAY, _ContestNotOn
+ if_equal FRIDAY, _ContestNotOn
+ faceplayer
+ opentext
+ checkflag ENGINE_DAILY_BUG_CONTEST
+ iftrue Route36Officer_ContestHasConcluded
+ scall Route36ParkGate_DayToText
+ writetext UnknownText_0x6add5
+ yesorno
+ iffalse .DecidedNotToJoinContest
+ checkcode VAR_PARTYCOUNT
+ if_greater_than $1, .LeaveMonsWithOfficer
+ special ContestDropOffMons
+ clearevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
+.ResumeStartingContest:
+ setflag ENGINE_BUG_CONTEST_TIMER
+ special PlayMapMusic
+ writetext UnknownText_0x6ae87
+ buttonsound
+ waitsfx
+ writetext UnknownText_0x6aeb1
+ playsound SFX_ITEM
+ waitsfx
+ writetext UnknownText_0x6aecc
+ waitbutton
+ closetext
+ setflag ENGINE_BUG_CONTEST_TIMER
+ special Special_GiveParkBalls
+ spriteface PLAYER, LEFT
+ playsound SFX_EXIT_BUILDING
+ special FadeOutPalettes
+ waitsfx
+ special Special_SelectRandomBugContestContestants
+ warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, $21, $12
+ end
+
+.LeaveMonsWithOfficer:
+ checkcode VAR_PARTYCOUNT
+ if_less_than $6, .ContinueLeavingMons
+ checkcode VAR_BOXSPACE
+ if_equal $0, .BoxFull
+.ContinueLeavingMons:
+ special CheckFirstMonIsEgg
+ if_equal $1, .FirstMonIsEgg
+ writetext UnknownText_0x6afb0
+ yesorno
+ iffalse .RefusedToLeaveMons
+ special ContestDropOffMons
+ iftrue .FirstMonIsFainted
+ setevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
+ writetext UnknownText_0x6b021
+ buttonsound
+ writetext UnknownText_0x6b055
+ playsound SFX_GOT_SAFARI_BALLS
+ waitsfx
+ buttonsound
+ jump .ResumeStartingContest
+
+.DecidedNotToJoinContest:
+ writetext UnknownText_0x6b0c6
+ waitbutton
+ closetext
+ end
+
+.RefusedToLeaveMons:
+ writetext UnknownText_0x6b081
+ waitbutton
+ closetext
+ end
+
+.FirstMonIsFainted:
+ writetext UnknownText_0x6b0f2
+ waitbutton
+ closetext
+ end
+
+.BoxFull:
+ writetext UnknownText_0x6b166
+ waitbutton
+ closetext
+ end
+
+.FirstMonIsEgg:
+ writetext UnknownText_0x6b209
+ waitbutton
+ closetext
+ end
+
+Route36Officer_ContestHasConcluded:
+ checkevent EVENT_CONTEST_OFFICER_HAS_SUN_STONE
+ iftrue .Sunstone
+ checkevent EVENT_CONTEST_OFFICER_HAS_EVERSTONE
+ iftrue .Everstone
+ checkevent EVENT_CONTEST_OFFICER_HAS_GOLD_BERRY
+ iftrue .GoldBerry
+ checkevent EVENT_CONTEST_OFFICER_HAS_BERRY
+ iftrue .Berry
+ writetext UnknownText_0x6b32b
+ waitbutton
+ closetext
+ end
+
+.Sunstone:
+ writetext UnknownText_0x6b97f
+ buttonsound
+ verbosegiveitem SUN_STONE
+ iffalse .BagFull
+ clearevent EVENT_CONTEST_OFFICER_HAS_SUN_STONE
+ closetext
+ end
+
+.Everstone:
+ writetext UnknownText_0x6b97f
+ buttonsound
+ verbosegiveitem EVERSTONE
+ iffalse .BagFull
+ clearevent EVENT_CONTEST_OFFICER_HAS_EVERSTONE
+ closetext
+ end
+
+.GoldBerry:
+ writetext UnknownText_0x6b97f
+ buttonsound
+ verbosegiveitem GOLD_BERRY
+ iffalse .BagFull
+ clearevent EVENT_CONTEST_OFFICER_HAS_GOLD_BERRY
+ closetext
+ end
+
+.Berry:
+ writetext UnknownText_0x6b97f
+ buttonsound
+ verbosegiveitem BERRY
+ iffalse .BagFull
+ clearevent EVENT_CONTEST_OFFICER_HAS_BERRY
+ closetext
+ end
+
+.BagFull:
+ writetext UnknownText_0x6b910
+ waitbutton
+ closetext
+ end
+
+_ContestNotOn:
+ jumptextfaceplayer UnknownText_0x6b370
+
+OfficerScript_0x6acf4:
+ faceplayer
+ opentext
+ checkflag ENGINE_DAILY_BUG_CONTEST
+ iftrue Route36Officer_ContestHasConcluded
+ writetext UnknownText_0x6b370
+ waitbutton
+ closetext
+ end
+
+Route36ParkGate_DayToText:
+ jumpstd daytotext
+ end
+
+YoungsterScript_0x6ad06:
+ faceplayer
+ opentext
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iffalse UnknownScript_0x6ad14
+ writetext UnknownText_0x6b399
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x6ad14:
+ writetext UnknownText_0x6b3c4
+ waitbutton
+ closetext
+ end
+
+YoungsterScript_0x6ad1a:
+ faceplayer
+ opentext
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iffalse UnknownScript_0x6ad28
+ writetext UnknownText_0x6b40f
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x6ad28:
+ writetext UnknownText_0x6b440
+ waitbutton
+ closetext
+ end
+
+RockerScript_0x6ad2e:
+ faceplayer
+ opentext
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iffalse UnknownScript_0x6ad3c
+ writetext UnknownText_0x6b462
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x6ad3c:
+ writetext UnknownText_0x6b496
+ waitbutton
+ closetext
+ end
+
+PokefanMScript_0x6ad42:
+ faceplayer
+ opentext
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iffalse UnknownScript_0x6ad50
+ writetext UnknownText_0x6b4da
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x6ad50:
+ writetext UnknownText_0x6b50a
+ waitbutton
+ closetext
+ end
+
+YoungsterScript_0x6ad56:
+ faceplayer
+ opentext
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iffalse UnknownScript_0x6ad64
+ writetext UnknownText_0x6b54e
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x6ad64:
+ writetext UnknownText_0x6b57c
+ waitbutton
+ closetext
+ end
+
+YoungsterScript_0x6ad6a:
+ faceplayer
+ opentext
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iffalse UnknownScript_0x6ad78
+ writetext UnknownText_0x6b5b0
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x6ad78:
+ writetext UnknownText_0x6b5dd
+ waitbutton
+ closetext
+ end
+
+LassScript_0x6ad7e:
+ faceplayer
+ opentext
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iffalse UnknownScript_0x6ad8c
+ writetext UnknownText_0x6b64b
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x6ad8c:
+ writetext UnknownText_0x6b698
+ waitbutton
+ closetext
+ end
+
+YoungsterScript_0x6ad92:
+ faceplayer
+ opentext
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iffalse UnknownScript_0x6ada0
+ writetext UnknownText_0x6b6b8
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x6ada0:
+ writetext UnknownText_0x6b6e9
+ waitbutton
+ closetext
+ end
+
+YoungsterScript_0x6ada6:
+ faceplayer
+ opentext
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iffalse UnknownScript_0x6adb4
+ writetext UnknownText_0x6b71b
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x6adb4:
+ writetext UnknownText_0x6b740
+ waitbutton
+ closetext
+ end
+
+YoungsterScript_0x6adba:
+ faceplayer
+ opentext
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iffalse UnknownScript_0x6adc8
+ writetext UnknownText_0x6b76f
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x6adc8:
+ writetext UnknownText_0x6b7af
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x6adce:
+ jumptext UnknownText_0x6b84c
+
+MovementData_0x6add1:
+ big_step DOWN
+ big_step RIGHT
+ turn_head UP
+ step_end
+
+UnknownText_0x6add5:
+ text "Today's @"
+ text_from_ram StringBuffer3
+ text "."
+ line "That means the"
+
+ para "Bug-Catching Con-"
+ line "test is on today."
+
+ para "The rules are sim-"
+ line "ple."
+
+ para "Using one of your"
+ line "#MON, catch a"
+
+ para "bug #MON to be"
+ line "judged."
+
+ para "Would you like to"
+ line "give it a try?"
+ done
+
+UnknownText_0x6ae87:
+ text "Here are the PARK"
+ line "BALLS for the"
+ cont "Contest."
+ done
+
+UnknownText_0x6aeb1:
+ text "<PLAYER> received"
+ line "20 PARK BALLS."
+ done
+
+UnknownText_0x6aecc:
+ text "The person who"
+ line "gets the strong-"
+ cont "est bug #MON"
+ cont "is the winner."
+
+ para "You have 20"
+ line "minutes."
+
+ para "If you run out of"
+ line "PARK BALLS, you're"
+ cont "done."
+
+ para "You can keep the"
+ line "last #MON you"
+ cont "catch as your own."
+
+ para "Go out and catch"
+ line "the strongest bug"
+
+ para "#MON you can"
+ line "find!"
+ done
+
+UnknownText_0x6afb0:
+ text "Uh-oh…"
+
+ para "You have more than"
+ line "one #MON."
+
+ para "You'll have to use"
+ line "@"
+ text_from_ram StringBuffer3
+ text ", the"
+
+ para "first #MON in"
+ line "your party."
+
+ para "Is that OK with"
+ line "you?"
+ done
+
+UnknownText_0x6b021:
+ text "Fine, we'll hold"
+ line "your other #MON"
+ cont "while you compete."
+ done
+
+UnknownText_0x6b055:
+ text "<PLAYER>'s #MON"
+ line "were left with the"
+ cont "CONTEST HELPER."
+ done
+
+UnknownText_0x6b081:
+ text "Please choose the"
+ line "#MON to be used"
+
+ para "in the Contest,"
+ line "then come see me."
+ done
+
+UnknownText_0x6b0c6:
+ text "OK. We hope you'll"
+ line "take part in the"
+ cont "future."
+ done
+
+UnknownText_0x6b0f2:
+ text "Uh-oh…"
+ line "The first #MON"
+
+ para "in your party"
+ line "can't battle."
+
+ para "Please switch it"
+ line "with the #MON"
+
+ para "you want to use,"
+ line "then come see me."
+ done
+
+UnknownText_0x6b166:
+ text "Uh-oh…"
+ line "Both your party"
+
+ para "and your PC BOX"
+ line "are full."
+
+ para "You have no room"
+ line "to put the bug"
+ cont "#MON you catch."
+
+ para "Please make room"
+ line "in your party or"
+
+ para "your PC BOX, then"
+ line "come see me."
+ done
+
+UnknownText_0x6b209:
+ text "Uh-oh…"
+ line "You have an EGG as"
+
+ para "the first #MON"
+ line "in your party."
+
+ para "Please switch it"
+ line "with the #MON"
+
+ para "you want to use,"
+ line "then come see me."
+ done
+
+UnknownText_0x6b284:
+ text "You still have @"
+ text_from_ram StringBuffer3
+ text ""
+ line "minute(s) left."
+
+ para "Do you want to"
+ line "finish now?"
+ done
+
+UnknownText_0x6b2c5:
+ text "OK. Please wait"
+ line "here for the"
+
+ para "announcement of"
+ line "the winners."
+ done
+
+UnknownText_0x6b300:
+ text "OK. Please go back"
+ line "outside and finish"
+ cont "up."
+ done
+
+UnknownText_0x6b32b:
+ text "Today's Contest is"
+ line "over. We hope you"
+
+ para "will participate"
+ line "in the future."
+ done
+
+UnknownText_0x6b370:
+ text "Some #MON can"
+ line "only be seen in"
+ cont "the PARK."
+ done
+
+UnknownText_0x6b399:
+ text "DON: Wow, you beat"
+ line "me. You're pretty"
+ cont "good."
+ done
+
+UnknownText_0x6b3c4:
+ text "DON: Luck plays a"
+ line "big part in this."
+
+ para "You never know"
+ line "what #MON will"
+ cont "appear."
+ done
+
+UnknownText_0x6b40f:
+ text "ED: I envy you."
+ line "I just couldn't"
+ cont "do it this time."
+ done
+
+UnknownText_0x6b440:
+ text "ED: Maybe you win"
+ line "with big #MON?"
+ done
+
+UnknownText_0x6b462:
+ text "NICK: Well done!"
+ line "I'm going to raise"
+ cont "my #MON better."
+ done
+
+UnknownText_0x6b496:
+ text "NICK: Maybe you"
+ line "get a higher score"
+
+ para "for a #MON of"
+ line "an unusual color."
+ done
+
+UnknownText_0x6b4da:
+ text "WILLIAM: You're"
+ line "the winner? What"
+ cont "did you catch?"
+ done
+
+UnknownText_0x6b50a:
+ text "WILLIAM: Well, I'm"
+ line "satisfied because"
+
+ para "I caught a #MON"
+ line "that I wanted."
+ done
+
+UnknownText_0x6b54e:
+ text "BENNY: Congrats!"
+ line "You have earned my"
+ cont "respect!"
+ done
+
+UnknownText_0x6b57c:
+ text "BENNY: I caught a"
+ line "SCYTHER before,"
+ cont "but I didn't win."
+ done
+
+UnknownText_0x6b5b0:
+ text "BARRY: That #-"
+ line "MON you caught…"
+ cont "it's awesome!"
+ done
+
+UnknownText_0x6b5dd:
+ text "BARRY: It's easier"
+ line "to win if you get"
+
+ para "a high-level bug"
+ line "#MON."
+
+ para "But I think they"
+ line "also consider some"
+ cont "other points."
+ done
+
+UnknownText_0x6b64b:
+ text "CINDY: You won?"
+ line "That's great!"
+
+ para "Do you feel like"
+ line "looking for bug"
+ cont "#MON with me?"
+ done
+
+UnknownText_0x6b698:
+ text "CINDY: I really"
+ line "love bug #MON!"
+ done
+
+UnknownText_0x6b6b8:
+ text "JOSH: I… I can't"
+ line "believe I lost at"
+ cont "bug-catching…"
+ done
+
+UnknownText_0x6b6e9:
+ text "JOSH: I heard that"
+ line "somebody won with"
+ cont "a CATERPIE!"
+ done
+
+UnknownText_0x6b71b:
+ text "SAMUEL: Next time,"
+ line "I'm going to win."
+ done
+
+UnknownText_0x6b740:
+ text "SAMUEL: Darn."
+ line "I thought I would"
+ cont "score higher…"
+ done
+
+UnknownText_0x6b76f:
+ text "KIPP: Could you"
+ line "give me some tips?"
+
+ para "I want to study"
+ line "your style."
+ done
+
+UnknownText_0x6b7af:
+ text "KIPP: I study a"
+ line "lot, but that's"
+
+ para "not good enough to"
+ line "win."
+ done
+
+; This text is unused and unreferenced in the final game.
+; The tree Pokémon is Sudowoodo.
+; The Silph Scope 2 was later reworked into the Squirtbottle.
+
+UnusedSudowoodoText:
+ text "I hear there's a"
+ line "#MON that looks"
+ cont "just like a tree."
+
+ para "You can reveal its"
+ line "identity using a"
+ cont "SILPHSCOPE 2."
+ done
+
+UnknownText_0x6b84c:
+ text "The Bug-Catching"
+ line "Contest is held on"
+
+ para "Tuesday, Thursday"
+ line "and Saturday."
+
+ para "Not only do you"
+ line "earn a prize just"
+
+ para "for participating,"
+ line "you also get to"
+
+ para "keep the bug"
+ line "#MON you may"
+
+ para "have at the end of"
+ line "the contest."
+ done
+
+UnknownText_0x6b910:
+ text "Uh-oh… Your PACK"
+ line "is full."
+
+ para "We'll hold on to"
+ line "your prize, but"
+ cont "only for today."
+
+ para "Please make room,"
+ line "then come see me."
+ done
+
+UnknownText_0x6b97f:
+ text "<PLAYER>?"
+
+ para "Here's the prize"
+ line "we were holding"
+ cont "for you."
+ done
+
+Route36NationalParkGate_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 4
+ warp_def $4, $0, 1, NATIONAL_PARK
+ warp_def $5, $0, 2, NATIONAL_PARK
+ warp_def $4, $9, 1, ROUTE_36
+ warp_def $5, $9, 2, ROUTE_36
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 1
+ bg_event 0, 6, BGEVENT_READ, MapRoute36NationalParkGateSignpost0Script
+
+.ObjectEvents:
+ db 12
+ object_event SPRITE_OFFICER, 3, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route36OfficerScriptContest, EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY
+ object_event SPRITE_YOUNGSTER, 5, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x6ad06, EVENT_BUG_CATCHING_CONTESTANT_1B
+ object_event SPRITE_YOUNGSTER, 5, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x6ad1a, EVENT_BUG_CATCHING_CONTESTANT_2B
+ object_event SPRITE_ROCKER, 6, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RockerScript_0x6ad2e, EVENT_BUG_CATCHING_CONTESTANT_3B
+ object_event SPRITE_POKEFAN_M, 5, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, PokefanMScript_0x6ad42, EVENT_BUG_CATCHING_CONTESTANT_4B
+ object_event SPRITE_YOUNGSTER, 7, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x6ad56, EVENT_BUG_CATCHING_CONTESTANT_5B
+ object_event SPRITE_YOUNGSTER, 6, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x6ad6a, EVENT_BUG_CATCHING_CONTESTANT_6B
+ object_event SPRITE_LASS, 6, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, LassScript_0x6ad7e, EVENT_BUG_CATCHING_CONTESTANT_7B
+ object_event SPRITE_YOUNGSTER, 7, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x6ad92, EVENT_BUG_CATCHING_CONTESTANT_8B
+ object_event SPRITE_YOUNGSTER, 7, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x6ada6, EVENT_BUG_CATCHING_CONTESTANT_9B
+ object_event SPRITE_YOUNGSTER, 6, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x6adba, EVENT_BUG_CATCHING_CONTESTANT_10B
+ object_event SPRITE_OFFICER, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x6acf4, EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY
diff --git a/maps/Route36NationalParkgate.blk b/maps/Route36NationalParkGate.blk
index 814583120..814583120 100644
--- a/maps/Route36NationalParkgate.blk
+++ b/maps/Route36NationalParkGate.blk
diff --git a/maps/Route36NationalParkgate.asm b/maps/Route36NationalParkgate.asm
deleted file mode 100644
index d55cc48cf..000000000
--- a/maps/Route36NationalParkgate.asm
+++ /dev/null
@@ -1,890 +0,0 @@
-const_value set 2
- const ROUTE36NATIONALPARKGATE_OFFICER1
- const ROUTE36NATIONALPARKGATE_YOUNGSTER1
- const ROUTE36NATIONALPARKGATE_YOUNGSTER2
- const ROUTE36NATIONALPARKGATE_ROCKER
- const ROUTE36NATIONALPARKGATE_POKEFAN_M
- const ROUTE36NATIONALPARKGATE_YOUNGSTER3
- const ROUTE36NATIONALPARKGATE_YOUNGSTER4
- const ROUTE36NATIONALPARKGATE_LASS
- const ROUTE36NATIONALPARKGATE_YOUNGSTER5
- const ROUTE36NATIONALPARKGATE_YOUNGSTER6
- const ROUTE36NATIONALPARKGATE_YOUNGSTER7
- const ROUTE36NATIONALPARKGATE_OFFICER2
-
-Route36NationalParkgate_MapScriptHeader:
-.MapTriggers:
- db 3
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
- maptrigger .Trigger2
-
-.MapCallbacks:
- db 2
-
- ; callbacks
-
- dbw MAPCALLBACK_NEWMAP, .CheckIfContestRunning
-
- dbw MAPCALLBACK_OBJECTS, .CheckIfContestAvailable
-
-.Trigger0:
- end
-
-.Trigger1:
- end
-
-.Trigger2:
- priorityjump .LeftTheContestEarly
- end
-
-.CheckIfContestRunning:
- checkflag ENGINE_BUG_CONTEST_TIMER
- iftrue .BugContestIsRunning
- dotrigger $0
- return
-
-.BugContestIsRunning:
- dotrigger $2
- return
-
-.CheckIfContestAvailable:
- checkevent EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE
- iftrue .Return
- checkcode VAR_WEEKDAY
- if_equal TUESDAY, .SetContestOfficer
- if_equal THURSDAY, .SetContestOfficer
- if_equal SATURDAY, .SetContestOfficer
- checkflag ENGINE_BUG_CONTEST_TIMER
- iftrue .SetContestOfficer
- disappear ROUTE36NATIONALPARKGATE_OFFICER1
- appear ROUTE36NATIONALPARKGATE_OFFICER2
- return
-
-.SetContestOfficer:
- appear ROUTE36NATIONALPARKGATE_OFFICER1
- disappear ROUTE36NATIONALPARKGATE_OFFICER2
-.Return:
- return
-
-.LeftTheContestEarly:
- spriteface PLAYER, UP
- opentext
- checkcode VAR_CONTESTMINUTES
- addvar $1
- RAM2MEM $0
- writetext UnknownText_0x6b284
- yesorno
- iffalse .GoBackToContest
- writetext UnknownText_0x6b2c5
- waitbutton
- closetext
- special Special_FadeBlackQuickly
- special Special_ReloadSpritesNoPalettes
- scall .CopyContestants
- disappear ROUTE36NATIONALPARKGATE_OFFICER1
- appear ROUTE36NATIONALPARKGATE_OFFICER2
- applymovement PLAYER, MovementData_0x6add1
- pause 15
- special Special_FadeInQuickly
- jumpstd bugcontestresults
-
-.GoBackToContest:
- writetext UnknownText_0x6b300
- waitbutton
- closetext
- spriteface PLAYER, LEFT
- playsound SFX_EXIT_BUILDING
- special FadeOutPalettes
- waitsfx
- warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, $21, $12
- end
-
-.CopyContestants:
- checkevent EVENT_BUG_CATCHING_CONTESTANT_1A
- iftrue .Not1
- appear ROUTE36NATIONALPARKGATE_YOUNGSTER1
-.Not1:
- checkevent EVENT_BUG_CATCHING_CONTESTANT_2A
- iftrue .Not2
- appear ROUTE36NATIONALPARKGATE_YOUNGSTER2
-.Not2:
- checkevent EVENT_BUG_CATCHING_CONTESTANT_3A
- iftrue .Not3
- appear ROUTE36NATIONALPARKGATE_ROCKER
-.Not3:
- checkevent EVENT_BUG_CATCHING_CONTESTANT_4A
- iftrue .Not4
- appear ROUTE36NATIONALPARKGATE_POKEFAN_M
-.Not4:
- checkevent EVENT_BUG_CATCHING_CONTESTANT_5A
- iftrue .Not5
- appear ROUTE36NATIONALPARKGATE_YOUNGSTER3
-.Not5:
- checkevent EVENT_BUG_CATCHING_CONTESTANT_6A
- iftrue .Not6
- appear ROUTE36NATIONALPARKGATE_YOUNGSTER4
-.Not6:
- checkevent EVENT_BUG_CATCHING_CONTESTANT_7A
- iftrue .Not7
- appear ROUTE36NATIONALPARKGATE_LASS
-.Not7:
- checkevent EVENT_BUG_CATCHING_CONTESTANT_8A
- iftrue .Not8
- appear ROUTE36NATIONALPARKGATE_YOUNGSTER5
-.Not8:
- checkevent EVENT_BUG_CATCHING_CONTESTANT_9A
- iftrue .Not9
- appear ROUTE36NATIONALPARKGATE_YOUNGSTER6
-.Not9:
- checkevent EVENT_BUG_CATCHING_CONTESTANT_10A
- iftrue .Not10
- appear ROUTE36NATIONALPARKGATE_YOUNGSTER7
-.Not10:
- special UpdateSprites
- end
-
-Route36OfficerScriptContest:
- checkcode VAR_WEEKDAY
- if_equal SUNDAY, _ContestNotOn
- if_equal MONDAY, _ContestNotOn
- if_equal WEDNESDAY, _ContestNotOn
- if_equal FRIDAY, _ContestNotOn
- faceplayer
- opentext
- checkflag ENGINE_DAILY_BUG_CONTEST
- iftrue Route36Officer_ContestHasConcluded
- scall Route36Parkgate_DayToText
- writetext UnknownText_0x6add5
- yesorno
- iffalse .DecidedNotToJoinContest
- checkcode VAR_PARTYCOUNT
- if_greater_than $1, .LeaveMonsWithOfficer
- special ContestDropOffMons
- clearevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
-.ResumeStartingContest:
- setflag ENGINE_BUG_CONTEST_TIMER
- special PlayMapMusic
- writetext UnknownText_0x6ae87
- buttonsound
- waitsfx
- writetext UnknownText_0x6aeb1
- playsound SFX_ITEM
- waitsfx
- writetext UnknownText_0x6aecc
- waitbutton
- closetext
- setflag ENGINE_BUG_CONTEST_TIMER
- special Special_GiveParkBalls
- spriteface PLAYER, LEFT
- playsound SFX_EXIT_BUILDING
- special FadeOutPalettes
- waitsfx
- special Special_SelectRandomBugContestContestants
- warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, $21, $12
- end
-
-.LeaveMonsWithOfficer:
- checkcode VAR_PARTYCOUNT
- if_less_than $6, .ContinueLeavingMons
- checkcode VAR_BOXSPACE
- if_equal $0, .BoxFull
-.ContinueLeavingMons:
- special CheckFirstMonIsEgg
- if_equal $1, .FirstMonIsEgg
- writetext UnknownText_0x6afb0
- yesorno
- iffalse .RefusedToLeaveMons
- special ContestDropOffMons
- iftrue .FirstMonIsFainted
- setevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
- writetext UnknownText_0x6b021
- buttonsound
- writetext UnknownText_0x6b055
- playsound SFX_GOT_SAFARI_BALLS
- waitsfx
- buttonsound
- jump .ResumeStartingContest
-
-.DecidedNotToJoinContest:
- writetext UnknownText_0x6b0c6
- waitbutton
- closetext
- end
-
-.RefusedToLeaveMons:
- writetext UnknownText_0x6b081
- waitbutton
- closetext
- end
-
-.FirstMonIsFainted:
- writetext UnknownText_0x6b0f2
- waitbutton
- closetext
- end
-
-.BoxFull:
- writetext UnknownText_0x6b166
- waitbutton
- closetext
- end
-
-.FirstMonIsEgg:
- writetext UnknownText_0x6b209
- waitbutton
- closetext
- end
-
-Route36Officer_ContestHasConcluded:
- checkevent EVENT_CONTEST_OFFICER_HAS_SUN_STONE
- iftrue .Sunstone
- checkevent EVENT_CONTEST_OFFICER_HAS_EVERSTONE
- iftrue .Everstone
- checkevent EVENT_CONTEST_OFFICER_HAS_GOLD_BERRY
- iftrue .GoldBerry
- checkevent EVENT_CONTEST_OFFICER_HAS_BERRY
- iftrue .Berry
- writetext UnknownText_0x6b32b
- waitbutton
- closetext
- end
-
-.Sunstone:
- writetext UnknownText_0x6b97f
- buttonsound
- verbosegiveitem SUN_STONE
- iffalse .BagFull
- clearevent EVENT_CONTEST_OFFICER_HAS_SUN_STONE
- closetext
- end
-
-.Everstone:
- writetext UnknownText_0x6b97f
- buttonsound
- verbosegiveitem EVERSTONE
- iffalse .BagFull
- clearevent EVENT_CONTEST_OFFICER_HAS_EVERSTONE
- closetext
- end
-
-.GoldBerry:
- writetext UnknownText_0x6b97f
- buttonsound
- verbosegiveitem GOLD_BERRY
- iffalse .BagFull
- clearevent EVENT_CONTEST_OFFICER_HAS_GOLD_BERRY
- closetext
- end
-
-.Berry:
- writetext UnknownText_0x6b97f
- buttonsound
- verbosegiveitem BERRY
- iffalse .BagFull
- clearevent EVENT_CONTEST_OFFICER_HAS_BERRY
- closetext
- end
-
-.BagFull:
- writetext UnknownText_0x6b910
- waitbutton
- closetext
- end
-
-_ContestNotOn:
- jumptextfaceplayer UnknownText_0x6b370
-
-OfficerScript_0x6acf4:
- faceplayer
- opentext
- checkflag ENGINE_DAILY_BUG_CONTEST
- iftrue Route36Officer_ContestHasConcluded
- writetext UnknownText_0x6b370
- waitbutton
- closetext
- end
-
-Route36Parkgate_DayToText:
- jumpstd daytotext
- end
-
-YoungsterScript_0x6ad06:
- faceplayer
- opentext
- checkevent EVENT_GAVE_KURT_APRICORNS
- iffalse UnknownScript_0x6ad14
- writetext UnknownText_0x6b399
- waitbutton
- closetext
- end
-
-UnknownScript_0x6ad14:
- writetext UnknownText_0x6b3c4
- waitbutton
- closetext
- end
-
-YoungsterScript_0x6ad1a:
- faceplayer
- opentext
- checkevent EVENT_GAVE_KURT_APRICORNS
- iffalse UnknownScript_0x6ad28
- writetext UnknownText_0x6b40f
- waitbutton
- closetext
- end
-
-UnknownScript_0x6ad28:
- writetext UnknownText_0x6b440
- waitbutton
- closetext
- end
-
-RockerScript_0x6ad2e:
- faceplayer
- opentext
- checkevent EVENT_GAVE_KURT_APRICORNS
- iffalse UnknownScript_0x6ad3c
- writetext UnknownText_0x6b462
- waitbutton
- closetext
- end
-
-UnknownScript_0x6ad3c:
- writetext UnknownText_0x6b496
- waitbutton
- closetext
- end
-
-PokefanMScript_0x6ad42:
- faceplayer
- opentext
- checkevent EVENT_GAVE_KURT_APRICORNS
- iffalse UnknownScript_0x6ad50
- writetext UnknownText_0x6b4da
- waitbutton
- closetext
- end
-
-UnknownScript_0x6ad50:
- writetext UnknownText_0x6b50a
- waitbutton
- closetext
- end
-
-YoungsterScript_0x6ad56:
- faceplayer
- opentext
- checkevent EVENT_GAVE_KURT_APRICORNS
- iffalse UnknownScript_0x6ad64
- writetext UnknownText_0x6b54e
- waitbutton
- closetext
- end
-
-UnknownScript_0x6ad64:
- writetext UnknownText_0x6b57c
- waitbutton
- closetext
- end
-
-YoungsterScript_0x6ad6a:
- faceplayer
- opentext
- checkevent EVENT_GAVE_KURT_APRICORNS
- iffalse UnknownScript_0x6ad78
- writetext UnknownText_0x6b5b0
- waitbutton
- closetext
- end
-
-UnknownScript_0x6ad78:
- writetext UnknownText_0x6b5dd
- waitbutton
- closetext
- end
-
-LassScript_0x6ad7e:
- faceplayer
- opentext
- checkevent EVENT_GAVE_KURT_APRICORNS
- iffalse UnknownScript_0x6ad8c
- writetext UnknownText_0x6b64b
- waitbutton
- closetext
- end
-
-UnknownScript_0x6ad8c:
- writetext UnknownText_0x6b698
- waitbutton
- closetext
- end
-
-YoungsterScript_0x6ad92:
- faceplayer
- opentext
- checkevent EVENT_GAVE_KURT_APRICORNS
- iffalse UnknownScript_0x6ada0
- writetext UnknownText_0x6b6b8
- waitbutton
- closetext
- end
-
-UnknownScript_0x6ada0:
- writetext UnknownText_0x6b6e9
- waitbutton
- closetext
- end
-
-YoungsterScript_0x6ada6:
- faceplayer
- opentext
- checkevent EVENT_GAVE_KURT_APRICORNS
- iffalse UnknownScript_0x6adb4
- writetext UnknownText_0x6b71b
- waitbutton
- closetext
- end
-
-UnknownScript_0x6adb4:
- writetext UnknownText_0x6b740
- waitbutton
- closetext
- end
-
-YoungsterScript_0x6adba:
- faceplayer
- opentext
- checkevent EVENT_GAVE_KURT_APRICORNS
- iffalse UnknownScript_0x6adc8
- writetext UnknownText_0x6b76f
- waitbutton
- closetext
- end
-
-UnknownScript_0x6adc8:
- writetext UnknownText_0x6b7af
- waitbutton
- closetext
- end
-
-UnknownScript_0x6adce:
- jumptext UnknownText_0x6b84c
-
-MovementData_0x6add1:
- big_step DOWN
- big_step RIGHT
- turn_head UP
- step_end
-
-UnknownText_0x6add5:
- text "Today's @"
- text_from_ram StringBuffer3
- text "."
- line "That means the"
-
- para "Bug-Catching Con-"
- line "test is on today."
-
- para "The rules are sim-"
- line "ple."
-
- para "Using one of your"
- line "#MON, catch a"
-
- para "bug #MON to be"
- line "judged."
-
- para "Would you like to"
- line "give it a try?"
- done
-
-UnknownText_0x6ae87:
- text "Here are the PARK"
- line "BALLS for the"
- cont "Contest."
- done
-
-UnknownText_0x6aeb1:
- text "<PLAYER> received"
- line "20 PARK BALLS."
- done
-
-UnknownText_0x6aecc:
- text "The person who"
- line "gets the strong-"
- cont "est bug #MON"
- cont "is the winner."
-
- para "You have 20"
- line "minutes."
-
- para "If you run out of"
- line "PARK BALLS, you're"
- cont "done."
-
- para "You can keep the"
- line "last #MON you"
- cont "catch as your own."
-
- para "Go out and catch"
- line "the strongest bug"
-
- para "#MON you can"
- line "find!"
- done
-
-UnknownText_0x6afb0:
- text "Uh-oh…"
-
- para "You have more than"
- line "one #MON."
-
- para "You'll have to use"
- line "@"
- text_from_ram StringBuffer3
- text ", the"
-
- para "first #MON in"
- line "your party."
-
- para "Is that OK with"
- line "you?"
- done
-
-UnknownText_0x6b021:
- text "Fine, we'll hold"
- line "your other #MON"
- cont "while you compete."
- done
-
-UnknownText_0x6b055:
- text "<PLAYER>'s #MON"
- line "were left with the"
- cont "CONTEST HELPER."
- done
-
-UnknownText_0x6b081:
- text "Please choose the"
- line "#MON to be used"
-
- para "in the Contest,"
- line "then come see me."
- done
-
-UnknownText_0x6b0c6:
- text "OK. We hope you'll"
- line "take part in the"
- cont "future."
- done
-
-UnknownText_0x6b0f2:
- text "Uh-oh…"
- line "The first #MON"
-
- para "in your party"
- line "can't battle."
-
- para "Please switch it"
- line "with the #MON"
-
- para "you want to use,"
- line "then come see me."
- done
-
-UnknownText_0x6b166:
- text "Uh-oh…"
- line "Both your party"
-
- para "and your PC BOX"
- line "are full."
-
- para "You have no room"
- line "to put the bug"
- cont "#MON you catch."
-
- para "Please make room"
- line "in your party or"
-
- para "your PC BOX, then"
- line "come see me."
- done
-
-UnknownText_0x6b209:
- text "Uh-oh…"
- line "You have an EGG as"
-
- para "the first #MON"
- line "in your party."
-
- para "Please switch it"
- line "with the #MON"
-
- para "you want to use,"
- line "then come see me."
- done
-
-UnknownText_0x6b284:
- text "You still have @"
- text_from_ram StringBuffer3
- text ""
- line "minute(s) left."
-
- para "Do you want to"
- line "finish now?"
- done
-
-UnknownText_0x6b2c5:
- text "OK. Please wait"
- line "here for the"
-
- para "announcement of"
- line "the winners."
- done
-
-UnknownText_0x6b300:
- text "OK. Please go back"
- line "outside and finish"
- cont "up."
- done
-
-UnknownText_0x6b32b:
- text "Today's Contest is"
- line "over. We hope you"
-
- para "will participate"
- line "in the future."
- done
-
-UnknownText_0x6b370:
- text "Some #MON can"
- line "only be seen in"
- cont "the PARK."
- done
-
-UnknownText_0x6b399:
- text "DON: Wow, you beat"
- line "me. You're pretty"
- cont "good."
- done
-
-UnknownText_0x6b3c4:
- text "DON: Luck plays a"
- line "big part in this."
-
- para "You never know"
- line "what #MON will"
- cont "appear."
- done
-
-UnknownText_0x6b40f:
- text "ED: I envy you."
- line "I just couldn't"
- cont "do it this time."
- done
-
-UnknownText_0x6b440:
- text "ED: Maybe you win"
- line "with big #MON?"
- done
-
-UnknownText_0x6b462:
- text "NICK: Well done!"
- line "I'm going to raise"
- cont "my #MON better."
- done
-
-UnknownText_0x6b496:
- text "NICK: Maybe you"
- line "get a higher score"
-
- para "for a #MON of"
- line "an unusual color."
- done
-
-UnknownText_0x6b4da:
- text "WILLIAM: You're"
- line "the winner? What"
- cont "did you catch?"
- done
-
-UnknownText_0x6b50a:
- text "WILLIAM: Well, I'm"
- line "satisfied because"
-
- para "I caught a #MON"
- line "that I wanted."
- done
-
-UnknownText_0x6b54e:
- text "BENNY: Congrats!"
- line "You have earned my"
- cont "respect!"
- done
-
-UnknownText_0x6b57c:
- text "BENNY: I caught a"
- line "SCYTHER before,"
- cont "but I didn't win."
- done
-
-UnknownText_0x6b5b0:
- text "BARRY: That #-"
- line "MON you caught…"
- cont "it's awesome!"
- done
-
-UnknownText_0x6b5dd:
- text "BARRY: It's easier"
- line "to win if you get"
-
- para "a high-level bug"
- line "#MON."
-
- para "But I think they"
- line "also consider some"
- cont "other points."
- done
-
-UnknownText_0x6b64b:
- text "CINDY: You won?"
- line "That's great!"
-
- para "Do you feel like"
- line "looking for bug"
- cont "#MON with me?"
- done
-
-UnknownText_0x6b698:
- text "CINDY: I really"
- line "love bug #MON!"
- done
-
-UnknownText_0x6b6b8:
- text "JOSH: I… I can't"
- line "believe I lost at"
- cont "bug-catching…"
- done
-
-UnknownText_0x6b6e9:
- text "JOSH: I heard that"
- line "somebody won with"
- cont "a CATERPIE!"
- done
-
-UnknownText_0x6b71b:
- text "SAMUEL: Next time,"
- line "I'm going to win."
- done
-
-UnknownText_0x6b740:
- text "SAMUEL: Darn."
- line "I thought I would"
- cont "score higher…"
- done
-
-UnknownText_0x6b76f:
- text "KIPP: Could you"
- line "give me some tips?"
-
- para "I want to study"
- line "your style."
- done
-
-UnknownText_0x6b7af:
- text "KIPP: I study a"
- line "lot, but that's"
-
- para "not good enough to"
- line "win."
- done
-
-; This text is unused and unreferenced in the final game.
-; The tree Pokémon is Sudowoodo.
-; The Silph Scope 2 was later reworked into the Squirtbottle.
-
-UnusedSudowoodoText:
- text "I hear there's a"
- line "#MON that looks"
- cont "just like a tree."
-
- para "You can reveal its"
- line "identity using a"
- cont "SILPHSCOPE 2."
- done
-
-UnknownText_0x6b84c:
- text "The Bug-Catching"
- line "Contest is held on"
-
- para "Tuesday, Thursday"
- line "and Saturday."
-
- para "Not only do you"
- line "earn a prize just"
-
- para "for participating,"
- line "you also get to"
-
- para "keep the bug"
- line "#MON you may"
-
- para "have at the end of"
- line "the contest."
- done
-
-UnknownText_0x6b910:
- text "Uh-oh… Your PACK"
- line "is full."
-
- para "We'll hold on to"
- line "your prize, but"
- cont "only for today."
-
- para "Please make room,"
- line "then come see me."
- done
-
-UnknownText_0x6b97f:
- text "<PLAYER>?"
-
- para "Here's the prize"
- line "we were holding"
- cont "for you."
- done
-
-Route36NationalParkgate_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 4
- warp_def $4, $0, 1, NATIONAL_PARK
- warp_def $5, $0, 2, NATIONAL_PARK
- warp_def $4, $9, 1, ROUTE_36
- warp_def $5, $9, 2, ROUTE_36
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 1
- signpost 0, 6, SIGNPOST_READ, MapRoute36NationalParkgateSignpost0Script
-
-.PersonEvents:
- db 12
- person_event SPRITE_OFFICER, 3, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, Route36OfficerScriptContest, EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY
- person_event SPRITE_YOUNGSTER, 5, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x6ad06, EVENT_BUG_CATCHING_CONTESTANT_1B
- person_event SPRITE_YOUNGSTER, 5, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x6ad1a, EVENT_BUG_CATCHING_CONTESTANT_2B
- person_event SPRITE_ROCKER, 6, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, RockerScript_0x6ad2e, EVENT_BUG_CATCHING_CONTESTANT_3B
- person_event SPRITE_POKEFAN_M, 5, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x6ad42, EVENT_BUG_CATCHING_CONTESTANT_4B
- person_event SPRITE_YOUNGSTER, 7, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x6ad56, EVENT_BUG_CATCHING_CONTESTANT_5B
- person_event SPRITE_YOUNGSTER, 6, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x6ad6a, EVENT_BUG_CATCHING_CONTESTANT_6B
- person_event SPRITE_LASS, 6, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, LassScript_0x6ad7e, EVENT_BUG_CATCHING_CONTESTANT_7B
- person_event SPRITE_YOUNGSTER, 7, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x6ad92, EVENT_BUG_CATCHING_CONTESTANT_8B
- person_event SPRITE_YOUNGSTER, 7, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x6ada6, EVENT_BUG_CATCHING_CONTESTANT_9B
- person_event SPRITE_YOUNGSTER, 6, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x6adba, EVENT_BUG_CATCHING_CONTESTANT_10B
- person_event SPRITE_OFFICER, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, OfficerScript_0x6acf4, EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY
diff --git a/maps/Route36RuinsOfAlphGate.asm b/maps/Route36RuinsOfAlphGate.asm
new file mode 100644
index 000000000..a41d6b558
--- /dev/null
+++ b/maps/Route36RuinsOfAlphGate.asm
@@ -0,0 +1,57 @@
+const_value set 2
+ const ROUTE36RUINSOFALPHGATE_OFFICER
+ const ROUTE36RUINSOFALPHGATE_GRAMPS
+
+Route36RuinsOfAlphGate_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+Route36RuinsOfAlphGateOfficerScript:
+ jumptextfaceplayer Route36RuinsOfAlphGateOfficerText
+
+Route36RuinsOfAlphGateGrampsScript:
+ jumptextfaceplayer Route36RuinsOfAlphGateGrampsText
+
+Route36RuinsOfAlphGateOfficerText:
+ text "Don't you wonder"
+ line "who'd make some-"
+ cont "thing like this?"
+ cont "And why?"
+ done
+
+Route36RuinsOfAlphGateGrampsText:
+ text "Did you see that"
+ line "strange tree in"
+ cont "the road?"
+
+ para "That may explain"
+ line "why fewer people"
+
+ para "are visiting the"
+ line "RUINS OF ALPH."
+ done
+
+Route36RuinsOfAlphGate_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 4
+ warp_def $0, $4, 3, ROUTE_36
+ warp_def $0, $5, 4, ROUTE_36
+ warp_def $7, $4, 9, RUINS_OF_ALPH_OUTSIDE
+ warp_def $7, $5, 9, RUINS_OF_ALPH_OUTSIDE
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 2
+ object_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route36RuinsOfAlphGateOfficerScript, -1
+ object_event SPRITE_GRAMPS, 5, 7, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, Route36RuinsOfAlphGateGrampsScript, -1
diff --git a/maps/Route36RuinsofAlphgate.asm b/maps/Route36RuinsofAlphgate.asm
deleted file mode 100644
index 88ba737f4..000000000
--- a/maps/Route36RuinsofAlphgate.asm
+++ /dev/null
@@ -1,57 +0,0 @@
-const_value set 2
- const ROUTE36RUINSOFALPHGATE_OFFICER
- const ROUTE36RUINSOFALPHGATE_GRAMPS
-
-Route36RuinsofAlphgate_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-OfficerScript_0x6aa1a:
- jumptextfaceplayer UnknownText_0x6aa20
-
-GrampsScript_0x6aa1d:
- jumptextfaceplayer UnknownText_0x6aa5b
-
-UnknownText_0x6aa20:
- text "Don't you wonder"
- line "who'd make some-"
- cont "thing like this?"
- cont "And why?"
- done
-
-UnknownText_0x6aa5b:
- text "Did you see that"
- line "strange tree in"
- cont "the road?"
-
- para "That may explain"
- line "why fewer people"
-
- para "are visiting the"
- line "RUINS OF ALPH."
- done
-
-Route36RuinsofAlphgate_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 4
- warp_def $0, $4, 3, ROUTE_36
- warp_def $0, $5, 4, ROUTE_36
- warp_def $7, $4, 9, RUINS_OF_ALPH_OUTSIDE
- warp_def $7, $5, 9, RUINS_OF_ALPH_OUTSIDE
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 2
- person_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, OfficerScript_0x6aa1a, -1
- person_event SPRITE_GRAMPS, 5, 7, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, GrampsScript_0x6aa1d, -1
diff --git a/maps/Route37.asm b/maps/Route37.asm
index 7c4b6e98f..5be5bb297 100644
--- a/maps/Route37.asm
+++ b/maps/Route37.asm
@@ -8,17 +8,14 @@ const_value set 2
const ROUTE37_FRUIT_TREE3
Route37_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_OBJECTS, .Sunny
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, SunnyCallback
-
-SunnyCallback:
+.Sunny:
checkcode VAR_WEEKDAY
if_equal SUNDAY, .SunnyAppears
disappear ROUTE37_SUNNY
@@ -29,34 +26,34 @@ SunnyCallback:
return
TrainerTwinsAnnandanne1:
- trainer EVENT_BEAT_TWINS_ANN_AND_ANNE, TWINS, ANNANDANNE1, TwinsAnnandanne1SeenText, TwinsAnnandanne1BeatenText, 0, TwinsAnnandanne1Script
+ trainer EVENT_BEAT_TWINS_ANN_AND_ANNE, TWINS, ANNANDANNE1, TwinsAnnandanne1SeenText, TwinsAnnandanne1BeatenText, 0, .Script
-TwinsAnnandanne1Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a8e62
+ writetext TwinsAnnandanne1AfterBattleText
waitbutton
closetext
end
TrainerTwinsAnnandanne2:
- trainer EVENT_BEAT_TWINS_ANN_AND_ANNE, TWINS, ANNANDANNE2, TwinsAnnandanne2SeenText, TwinsAnnandanne2BeatenText, 0, TwinsAnnandanne2Script
+ trainer EVENT_BEAT_TWINS_ANN_AND_ANNE, TWINS, ANNANDANNE2, TwinsAnnandanne2SeenText, TwinsAnnandanne2BeatenText, 0, .Script
-TwinsAnnandanne2Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a8eec
+ writetext TwinsAnnandanne2AfterBattleText
waitbutton
closetext
end
TrainerPsychicGreg:
- trainer EVENT_BEAT_PSYCHIC_GREG, PSYCHIC_T, GREG, PsychicGregSeenText, PsychicGregBeatenText, 0, PsychicGregScript
+ trainer EVENT_BEAT_PSYCHIC_GREG, PSYCHIC_T, GREG, PsychicGregSeenText, PsychicGregBeatenText, 0, .Script
-PsychicGregScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a8f80
+ writetext PsychicGregAfterBattleText
waitbutton
closetext
end
@@ -131,7 +128,7 @@ TwinsAnnandanne1BeatenText:
line "little too strong."
done
-UnknownText_0x1a8e62:
+TwinsAnnandanne1AfterBattleText:
text "ANN: I can tell"
line "what my sister and"
@@ -150,7 +147,7 @@ TwinsAnnandanne2BeatenText:
line "little too strong."
done
-UnknownText_0x1a8eec:
+TwinsAnnandanne2AfterBattleText:
text "ANNE: We share the"
line "same feelings as"
cont "our #MON."
@@ -170,7 +167,7 @@ PsychicGregBeatenText:
line "pretty sad…"
done
-UnknownText_0x1a8f80:
+PsychicGregAfterBattleText:
text "Putting #MON to"
line "sleep or paralyz-"
cont "ing them are good"
@@ -248,20 +245,20 @@ Route37_MapEventHeader:
.Warps:
db 0
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 3, 5, SIGNPOST_READ, Route37Sign
- signpost 2, 4, SIGNPOST_ITEM, Route37HiddenEther
+ bg_event 3, 5, BGEVENT_READ, Route37Sign
+ bg_event 2, 4, BGEVENT_ITEM, Route37HiddenEther
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_WEIRD_TREE, 12, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerTwinsAnnandanne1, -1
- person_event SPRITE_WEIRD_TREE, 12, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerTwinsAnnandanne2, -1
- person_event SPRITE_YOUNGSTER, 6, 6, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerPsychicGreg, -1
- person_event SPRITE_FRUIT_TREE, 5, 13, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x1a8e09, -1
- person_event SPRITE_BUG_CATCHER, 8, 16, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SunnyScript, EVENT_ROUTE_37_SUNNY_OF_SUNDAY
- person_event SPRITE_FRUIT_TREE, 5, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x1a8e0b, -1
- person_event SPRITE_FRUIT_TREE, 7, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x1a8e0d, -1
+ object_event SPRITE_WEIRD_TREE, 12, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsAnnandanne1, -1
+ object_event SPRITE_WEIRD_TREE, 12, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsAnnandanne2, -1
+ object_event SPRITE_YOUNGSTER, 6, 6, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerPsychicGreg, -1
+ object_event SPRITE_FRUIT_TREE, 5, 13, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x1a8e09, -1
+ object_event SPRITE_BUG_CATCHER, 8, 16, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SunnyScript, EVENT_ROUTE_37_SUNNY_OF_SUNDAY
+ object_event SPRITE_FRUIT_TREE, 5, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x1a8e0b, -1
+ object_event SPRITE_FRUIT_TREE, 7, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x1a8e0d, -1
diff --git a/maps/Route38.asm b/maps/Route38.asm
index 2ef07dee0..f2ae60489 100644
--- a/maps/Route38.asm
+++ b/maps/Route38.asm
@@ -8,38 +8,38 @@ const_value set 2
const ROUTE38_BUENA2
Route38_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerBird_keeperToby:
- trainer EVENT_BEAT_BIRD_KEEPER_TOBY, BIRD_KEEPER, TOBY, Bird_keeperTobySeenText, Bird_keeperTobyBeatenText, 0, .script
+ trainer EVENT_BEAT_BIRD_KEEPER_TOBY, BIRD_KEEPER, TOBY, Bird_keeperTobySeenText, Bird_keeperTobyBeatenText, 0, .Script
-.script
+.Script
end_if_just_battled
opentext
- writetext UnknownText_0x1a1f86
+ writetext Bird_keeperTobyAfterBattleText
waitbutton
closetext
end
TrainerSailorHarry:
- trainer EVENT_BEAT_SAILOR_HARRY, SAILOR, HARRY, SailorHarrySeenText, SailorHarryBeatenText, 0, .script
+ trainer EVENT_BEAT_SAILOR_HARRY, SAILOR, HARRY, SailorHarrySeenText, SailorHarryBeatenText, 0, .Script
-.script
+.Script
end_if_just_battled
opentext
- writetext UnknownText_0x1a220c
+ writetext SailorHarryAfterBattleText
waitbutton
closetext
end
TrainerLassDana1:
- trainer EVENT_BEAT_LASS_DANA, LASS, DANA1, LassDana1SeenText, LassDana1BeatenText, 0, .script
+ trainer EVENT_BEAT_LASS_DANA, LASS, DANA1, LassDana1SeenText, LassDana1BeatenText, 0, .Script
-.script
+.Script
writecode VAR_CALLERID, PHONE_LASS_DANA
end_if_just_battled
opentext
@@ -175,9 +175,9 @@ TrainerLassDana1:
end
TrainerSchoolboyChad1:
- trainer EVENT_BEAT_SCHOOLBOY_CHAD, SCHOOLBOY, CHAD1, SchoolboyChad1SeenText, SchoolboyChad1BeatenText, 0, .script
+ trainer EVENT_BEAT_SCHOOLBOY_CHAD, SCHOOLBOY, CHAD1, SchoolboyChad1SeenText, SchoolboyChad1BeatenText, 0, .Script
-.script
+.Script
writecode VAR_CALLERID, PHONE_SCHOOLBOY_CHAD
end_if_just_battled
opentext
@@ -292,23 +292,23 @@ TrainerSchoolboyChad1:
end
TrainerBeautyValerie:
- trainer EVENT_BEAT_BEAUTY_VALERIE, BEAUTY, VALERIE, BeautyValerieSeenText, BeautyValerieBeatenText, 0, .script
+ trainer EVENT_BEAT_BEAUTY_VALERIE, BEAUTY, VALERIE, BeautyValerieSeenText, BeautyValerieBeatenText, 0, .Script
-.script
+.Script
end_if_just_battled
opentext
- writetext UnknownText_0x1a2185
+ writetext BeautyValerieAfterBattleText
waitbutton
closetext
end
TrainerBeautyOlivia:
- trainer EVENT_BEAT_BEAUTY_OLIVIA, BEAUTY, OLIVIA, BeautyOliviaSeenText, BeautyOliviaBeatenText, 0, .script
+ trainer EVENT_BEAT_BEAUTY_OLIVIA, BEAUTY, OLIVIA, BeautyOliviaSeenText, BeautyOliviaBeatenText, 0, .Script
-.script
+.Script
end_if_just_battled
opentext
- writetext UnknownText_0x1a229a
+ writetext BeautyOliviaAfterBattleText
waitbutton
closetext
end
@@ -333,7 +333,7 @@ Bird_keeperTobyBeatenText:
line "flying away now."
done
-UnknownText_0x1a1f86:
+Bird_keeperTobyAfterBattleText:
text "I plan to train in"
line "CIANWOOD CITY to"
@@ -400,7 +400,7 @@ BeautyValerieBeatenText:
line "see your #MON!"
done
-UnknownText_0x1a2185:
+BeautyValerieAfterBattleText:
text "When I see #-"
line "MON, it seems to"
cont "soothe my nerves."
@@ -419,7 +419,7 @@ SailorHarryBeatenText:
line "world class!"
done
-UnknownText_0x1a220c:
+SailorHarryAfterBattleText:
text "All kinds of peo-"
line "ple around the"
@@ -438,7 +438,7 @@ BeautyOliviaBeatenText:
line "MILK every day."
done
-UnknownText_0x1a229a:
+BeautyOliviaAfterBattleText:
text "MOOMOO MILK is"
line "good for beauty"
@@ -481,20 +481,20 @@ Route38_MapEventHeader:
warp_def $8, $23, 1, ROUTE_38_ECRUTEAK_GATE
warp_def $9, $23, 2, ROUTE_38_ECRUTEAK_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 7, 33, SIGNPOST_READ, Route38Sign
- signpost 13, 5, SIGNPOST_READ, Route38TrainerTips
+ bg_event 7, 33, BGEVENT_READ, Route38Sign
+ bg_event 13, 5, BGEVENT_READ, Route38TrainerTips
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_STANDING_YOUNGSTER, 1, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerSchoolboyChad1, -1
- person_event SPRITE_LASS, 3, 15, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, TrainerLassDana1, -1
- person_event SPRITE_STANDING_YOUNGSTER, 15, 12, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerBird_keeperToby, -1
- person_event SPRITE_BUENA, 9, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerBeautyValerie, -1
- person_event SPRITE_SAILOR, 5, 24, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, TrainerSailorHarry, -1
- person_event SPRITE_FRUIT_TREE, 10, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x1a1f33, -1
- person_event SPRITE_BUENA, 8, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerBeautyOlivia, -1
+ object_event SPRITE_STANDING_YOUNGSTER, 1, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerSchoolboyChad1, -1
+ object_event SPRITE_LASS, 3, 15, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerLassDana1, -1
+ object_event SPRITE_STANDING_YOUNGSTER, 15, 12, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerBird_keeperToby, -1
+ object_event SPRITE_BUENA, 9, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerBeautyValerie, -1
+ object_event SPRITE_SAILOR, 5, 24, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerSailorHarry, -1
+ object_event SPRITE_FRUIT_TREE, 10, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x1a1f33, -1
+ object_event SPRITE_BUENA, 8, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerBeautyOlivia, -1
diff --git a/maps/Route38EcruteakGate.asm b/maps/Route38EcruteakGate.asm
index 7e376b413..a926c1e1c 100644
--- a/maps/Route38EcruteakGate.asm
+++ b/maps/Route38EcruteakGate.asm
@@ -2,16 +2,16 @@ const_value set 2
const ROUTE38ECRUTEAKGATE_OFFICER
Route38EcruteakGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-OfficerScript_0x9cbd7:
- jumptextfaceplayer UnknownText_0x9cbda
+Route38EcruteakGateOfficerScript:
+ jumptextfaceplayer Route38EcruteakGateOfficerText
-UnknownText_0x9cbda:
+Route38EcruteakGateOfficerText:
text "Where did you say"
line "you're from?"
@@ -35,12 +35,12 @@ Route38EcruteakGate_MapEventHeader:
warp_def $4, $9, 14, ECRUTEAK_CITY
warp_def $5, $9, 15, ECRUTEAK_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, OfficerScript_0x9cbd7, -1
+ object_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route38EcruteakGateOfficerScript, -1
diff --git a/maps/Route39.asm b/maps/Route39.asm
index 5f7d33279..1ab22b0d7 100644
--- a/maps/Route39.asm
+++ b/maps/Route39.asm
@@ -11,7 +11,7 @@ const_value set 2
const ROUTE39_POKEFAN_F2
Route39_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -26,9 +26,9 @@ Route39Miltank:
end
TrainerPokefanmDerek1:
- trainer EVENT_BEAT_POKEFANM_DEREK, POKEFANM, DEREK1, PokefanmDerek1SeenText, PokefanmDerek1BeatenText, 0, PokefanmDerek1Script
+ trainer EVENT_BEAT_POKEFANM_DEREK, POKEFANM, DEREK1, PokefanmDerek1SeenText, PokefanmDerek1BeatenText, 0, .Script
-PokefanmDerek1Script:
+.Script:
writecode VAR_CALLERID, PHONE_POKEFANM_DEREK
end_if_just_battled
opentext
@@ -105,34 +105,34 @@ PackIsFull:
end
TrainerPokefanfRuth:
- trainer EVENT_BEAT_POKEFANF_RUTH, POKEFANF, RUTH, PokefanfRuthSeenText, PokefanfRuthBeatenText, 0, PokefanfRuthScript
+ trainer EVENT_BEAT_POKEFANF_RUTH, POKEFANF, RUTH, PokefanfRuthSeenText, PokefanfRuthBeatenText, 0, .Script
-PokefanfRuthScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a5db2
+ writetext PokefanfRuthAfterBattleText
waitbutton
closetext
end
TrainerSailorEugene:
- trainer EVENT_BEAT_SAILOR_EUGENE, SAILOR, EUGENE, SailorEugeneSeenText, SailorEugeneBeatenText, 0, SailorEugeneScript
+ trainer EVENT_BEAT_SAILOR_EUGENE, SAILOR, EUGENE, SailorEugeneSeenText, SailorEugeneBeatenText, 0, .Script
-SailorEugeneScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a5c4d
+ writetext SailorEugeneAfterBattleText
waitbutton
closetext
end
TrainerPsychicNorman:
- trainer EVENT_BEAT_PSYCHIC_NORMAN, PSYCHIC_T, NORMAN, PsychicNormanSeenText, PsychicNormanBeatenText, 0, PsychicNormanScript
+ trainer EVENT_BEAT_PSYCHIC_NORMAN, PSYCHIC_T, NORMAN, PsychicNormanSeenText, PsychicNormanBeatenText, 0, .Script
-PsychicNormanScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a5e57
+ writetext PsychicNormanAfterBattleText
waitbutton
closetext
end
@@ -199,7 +199,7 @@ SailorEugeneBeatenText:
text "Awaaargh!"
done
-UnknownText_0x1a5c4d:
+SailorEugeneAfterBattleText:
text "My #MON were"
line "caught and raised"
cont "overseas."
@@ -245,7 +245,7 @@ PokefanfRuthBeatenText:
line "losing."
done
-UnknownText_0x1a5db2:
+PokefanfRuthAfterBattleText:
text "Do you know about"
line "baby #MON?"
@@ -269,7 +269,7 @@ PsychicNormanBeatenText:
line "have potential."
done
-UnknownText_0x1a5e57:
+PsychicNormanAfterBattleText:
text "You know how #-"
line "MON have different"
cont "abilities?"
@@ -353,25 +353,25 @@ Route39_MapEventHeader:
warp_def $3, $1, 1, ROUTE_39_BARN
warp_def $3, $5, 1, ROUTE_39_FARMHOUSE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 4
- signpost 31, 5, SIGNPOST_READ, Route39TrainerTips
- signpost 5, 9, SIGNPOST_READ, MoomooFarmSign
- signpost 7, 15, SIGNPOST_READ, Route39Sign
- signpost 13, 5, SIGNPOST_ITEM, Route39HiddenNugget
+ bg_event 31, 5, BGEVENT_READ, Route39TrainerTips
+ bg_event 5, 9, BGEVENT_READ, MoomooFarmSign
+ bg_event 7, 15, BGEVENT_READ, Route39Sign
+ bg_event 13, 5, BGEVENT_ITEM, Route39HiddenNugget
-.PersonEvents:
+.ObjectEvents:
db 10
- person_event SPRITE_SAILOR, 29, 13, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 5, TrainerSailorEugene, -1
- person_event SPRITE_POKEFAN_M, 22, 10, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerPokefanmDerek1, -1
- person_event SPRITE_POKEFAN_F, 19, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerPokefanfRuth, -1
- person_event SPRITE_TAUROS, 12, 3, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route39Miltank, -1
- person_event SPRITE_TAUROS, 11, 6, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route39Miltank, -1
- person_event SPRITE_TAUROS, 15, 4, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route39Miltank, -1
- person_event SPRITE_TAUROS, 13, 8, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route39Miltank, -1
- person_event SPRITE_STANDING_YOUNGSTER, 7, 13, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 1, TrainerPsychicNorman, -1
- person_event SPRITE_FRUIT_TREE, 3, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x1a5bf4, -1
- person_event SPRITE_POKEFAN_F, 22, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x1a5bbe, -1
+ object_event SPRITE_SAILOR, 29, 13, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 5, TrainerSailorEugene, -1
+ object_event SPRITE_POKEFAN_M, 22, 10, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerPokefanmDerek1, -1
+ object_event SPRITE_POKEFAN_F, 19, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerPokefanfRuth, -1
+ object_event SPRITE_TAUROS, 12, 3, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route39Miltank, -1
+ object_event SPRITE_TAUROS, 11, 6, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route39Miltank, -1
+ object_event SPRITE_TAUROS, 15, 4, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route39Miltank, -1
+ object_event SPRITE_TAUROS, 13, 8, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route39Miltank, -1
+ object_event SPRITE_STANDING_YOUNGSTER, 7, 13, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerPsychicNorman, -1
+ object_event SPRITE_FRUIT_TREE, 3, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x1a5bf4, -1
+ object_event SPRITE_POKEFAN_F, 22, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, PokefanFScript_0x1a5bbe, -1
diff --git a/maps/Route39Barn.asm b/maps/Route39Barn.asm
index a057f2b5f..ba6f56c1f 100644
--- a/maps/Route39Barn.asm
+++ b/maps/Route39Barn.asm
@@ -4,7 +4,7 @@ const_value set 2
const ROUTE39BARN_MOOMOO
Route39Barn_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -197,14 +197,14 @@ Route39Barn_MapEventHeader:
warp_def $7, $3, 1, ROUTE_39
warp_def $7, $4, 1, ROUTE_39
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_TWIN, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TwinScript_0x9cc76, -1
- person_event SPRITE_TWIN, 3, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TwinScript_0x9cc90, -1
- person_event SPRITE_TAUROS, 3, 3, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, MooMoo, -1
+ object_event SPRITE_TWIN, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TwinScript_0x9cc76, -1
+ object_event SPRITE_TWIN, 3, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, TwinScript_0x9cc90, -1
+ object_event SPRITE_TAUROS, 3, 3, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MooMoo, -1
diff --git a/maps/Route39Farmhouse.asm b/maps/Route39Farmhouse.asm
index 72a675718..194a43312 100644
--- a/maps/Route39Farmhouse.asm
+++ b/maps/Route39Farmhouse.asm
@@ -3,7 +3,7 @@ const_value set 2
const ROUTE39FARMHOUSE_POKEFAN_F
Route39Farmhouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -201,15 +201,15 @@ Route39Farmhouse_MapEventHeader:
warp_def $7, $2, 2, ROUTE_39
warp_def $7, $3, 2, ROUTE_39
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, FarmhouseBookshelf
- signpost 1, 1, SIGNPOST_READ, FarmhouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, FarmhouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, FarmhouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_POKEFAN_M, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, PokefanM_DairyFarmer, -1
- person_event SPRITE_POKEFAN_F, 4, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PokefanF_SnoreFarmer, -1
+ object_event SPRITE_POKEFAN_M, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PokefanM_DairyFarmer, -1
+ object_event SPRITE_POKEFAN_F, 4, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, PokefanF_SnoreFarmer, -1
diff --git a/maps/Route4.asm b/maps/Route4.asm
index bfea8c8aa..cb1b18d69 100644
--- a/maps/Route4.asm
+++ b/maps/Route4.asm
@@ -5,41 +5,41 @@ const_value set 2
const ROUTE4_POKE_BALL
Route4_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerBird_keeperHank:
- trainer EVENT_BEAT_BIRD_KEEPER_HANK, BIRD_KEEPER, HANK, Bird_keeperHankSeenText, Bird_keeperHankBeatenText, 0, Bird_keeperHankScript
+ trainer EVENT_BEAT_BIRD_KEEPER_HANK, BIRD_KEEPER, HANK, Bird_keeperHankSeenText, Bird_keeperHankBeatenText, 0, .Script
-Bird_keeperHankScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ae258
+ writetext Bird_keeperHankAfterBattleText
waitbutton
closetext
end
TrainerPicnickerHope:
- trainer EVENT_BEAT_PICNICKER_HOPE, PICNICKER, HOPE, PicnickerHopeSeenText, PicnickerHopeBeatenText, 0, PicnickerHopeScript
+ trainer EVENT_BEAT_PICNICKER_HOPE, PICNICKER, HOPE, PicnickerHopeSeenText, PicnickerHopeBeatenText, 0, .Script
-PicnickerHopeScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ae320
+ writetext PicnickerHopeAfterBattleText
waitbutton
closetext
end
TrainerPicnickerSharon:
- trainer EVENT_BEAT_PICNICKER_SHARON, PICNICKER, SHARON, PicnickerSharonSeenText, PicnickerSharonBeatenText, 0, PicnickerSharonScript
+ trainer EVENT_BEAT_PICNICKER_SHARON, PICNICKER, SHARON, PicnickerSharonSeenText, PicnickerSharonBeatenText, 0, .Script
-PicnickerSharonScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ae369
+ writetext PicnickerSharonAfterBattleText
waitbutton
closetext
end
@@ -65,7 +65,7 @@ Bird_keeperHankBeatenText:
line "one…"
done
-UnknownText_0x1ae258:
+Bird_keeperHankAfterBattleText:
text "If you have a"
line "specific #MON"
@@ -92,7 +92,7 @@ PicnickerHopeBeatenText:
line "strong."
done
-UnknownText_0x1ae320:
+PicnickerHopeAfterBattleText:
text "I heard CLEFAIRY"
line "appear at MT.MOON."
@@ -109,7 +109,7 @@ PicnickerSharonBeatenText:
text "…"
done
-UnknownText_0x1ae369:
+PicnickerSharonAfterBattleText:
text "……I'll go train"
line "some more…"
done
@@ -129,17 +129,17 @@ Route4_MapEventHeader:
db 1
warp_def $5, $2, 2, MOUNT_MOON
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 7, 3, SIGNPOST_READ, MtMoonSquareSign
- signpost 3, 10, SIGNPOST_ITEM, Route4HiddenUltraBall
+ bg_event 7, 3, BGEVENT_READ, MtMoonSquareSign
+ bg_event 3, 10, BGEVENT_ITEM, Route4HiddenUltraBall
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_YOUNGSTER, 9, 17, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerBird_keeperHank, -1
- person_event SPRITE_LASS, 8, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 4, TrainerPicnickerHope, -1
- person_event SPRITE_LASS, 6, 21, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 4, TrainerPicnickerSharon, -1
- person_event SPRITE_POKE_BALL, 3, 26, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route4HPUp, EVENT_ROUTE_4_HP_UP
+ object_event SPRITE_YOUNGSTER, 9, 17, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBird_keeperHank, -1
+ object_event SPRITE_LASS, 8, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 4, TrainerPicnickerHope, -1
+ object_event SPRITE_LASS, 6, 21, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 4, TrainerPicnickerSharon, -1
+ object_event SPRITE_POKE_BALL, 3, 26, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route4HPUp, EVENT_ROUTE_4_HP_UP
diff --git a/maps/Route40.asm b/maps/Route40.asm
index 6ae3d5922..5b33783c5 100644
--- a/maps/Route40.asm
+++ b/maps/Route40.asm
@@ -13,17 +13,14 @@ const_value set 2
const ROUTE40_STANDING_YOUNGSTER
Route40_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_OBJECTS, .MonicaCallback
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, MonicaCallback
-
-MonicaCallback:
+.MonicaCallback:
clearevent EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
checkcode VAR_WEEKDAY
if_equal MONDAY, .MonicaAppears
@@ -35,51 +32,51 @@ MonicaCallback:
return
TrainerSwimmerfElaine:
- trainer EVENT_BEAT_SWIMMERF_ELAINE, SWIMMERF, ELAINE, SwimmerfElaineSeenText, SwimmerfElaineBeatenText, 0, SwimmerfElaineScript
+ trainer EVENT_BEAT_SWIMMERF_ELAINE, SWIMMERF, ELAINE, SwimmerfElaineSeenText, SwimmerfElaineBeatenText, 0, .Script
-SwimmerfElaineScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a637b
+ writetext SwimmerfElaineAfterBattleText
waitbutton
closetext
end
TrainerSwimmerfPaula:
- trainer EVENT_BEAT_SWIMMERF_PAULA, SWIMMERF, PAULA, SwimmerfPaulaSeenText, SwimmerfPaulaBeatenText, 0, SwimmerfPaulaScript
+ trainer EVENT_BEAT_SWIMMERF_PAULA, SWIMMERF, PAULA, SwimmerfPaulaSeenText, SwimmerfPaulaBeatenText, 0, .Script
-SwimmerfPaulaScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a63f5
+ writetext SwimmerfPaulaAfterBattleText
waitbutton
closetext
end
TrainerSwimmermSimon:
- trainer EVENT_BEAT_SWIMMERM_SIMON, SWIMMERM, SIMON, SwimmermSimonSeenText, SwimmermSimonBeatenText, 0, SwimmermSimonScript
+ trainer EVENT_BEAT_SWIMMERM_SIMON, SWIMMERM, SIMON, SwimmermSimonSeenText, SwimmermSimonBeatenText, 0, .Script
-SwimmermSimonScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a6282
+ writetext SwimmermSimonAfterBattleText
waitbutton
closetext
end
TrainerSwimmermRandall:
- trainer EVENT_BEAT_SWIMMERM_RANDALL, SWIMMERM, RANDALL, SwimmermRandallSeenText, SwimmermRandallBeatenText, 0, SwimmermRandallScript
+ trainer EVENT_BEAT_SWIMMERM_RANDALL, SWIMMERM, RANDALL, SwimmermRandallSeenText, SwimmermRandallBeatenText, 0, .Script
-SwimmermRandallScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a62fa
+ writetext SwimmermRandallAfterBattleText
waitbutton
closetext
end
-LassScript_0x1a61c4:
- jumptextfaceplayer UnknownText_0x1a6429
+Route40Lass1Script:
+ jumptextfaceplayer Route40Lass1Text
PokefanMScript_0x1a61c7:
special Mobile_DummyReturnFalse
@@ -89,11 +86,11 @@ PokefanMScript_0x1a61c7:
.mobile
jumptextfaceplayer UnknownText_0x1a649b
-LassScript_0x1a61d3:
- jumptextfaceplayer UnknownText_0x1a64e6
+Route40Lass2Script:
+ jumptextfaceplayer Route40Lass2Text
-StandingYoungsterScript_0x1a61d6:
- jumptextfaceplayer UnknownText_0x1a6564
+Route40StandingYoungsterScript:
+ jumptextfaceplayer Route40StandingYoungsterText
MonicaScript:
faceplayer
@@ -177,7 +174,7 @@ SwimmermSimonBeatenText:
text "OK! Uncle! I give!"
done
-UnknownText_0x1a6282:
+SwimmermSimonAfterBattleText:
text "CIANWOOD CITY is"
line "a good distance"
cont "away from here."
@@ -195,7 +192,7 @@ SwimmermRandallBeatenText:
text "Uh-oh. I lost…"
done
-UnknownText_0x1a62fa:
+SwimmermRandallAfterBattleText:
text "Swimming exercises"
line "your entire body."
cont "It's healthy."
@@ -213,7 +210,7 @@ SwimmerfElaineBeatenText:
text "I lost that one!"
done
-UnknownText_0x1a637b:
+SwimmerfElaineAfterBattleText:
text "I'd say I'm a bet-"
line "ter swimmer than"
cont "you. Yeah!"
@@ -232,13 +229,13 @@ SwimmerfPaulaBeatenText:
line "dizzy!"
done
-UnknownText_0x1a63f5:
+SwimmerfPaulaAfterBattleText:
text "While I float like"
line "this, the waves"
cont "carry me along."
done
-UnknownText_0x1a6429:
+Route40Lass1Text:
text "Although you can't"
line "see it from here,"
@@ -262,7 +259,7 @@ UnknownText_0x1a649b:
para "What? What?"
done
-UnknownText_0x1a64e6:
+Route40Lass2Text:
text "I came to OLIVINE"
line "by ship to see the"
@@ -274,7 +271,7 @@ UnknownText_0x1a64e6:
cont "from a big city."
done
-UnknownText_0x1a6564:
+Route40StandingYoungsterText:
text "Have you gone to"
line "the BATTLE TOWER?"
@@ -348,25 +345,25 @@ Route40_MapEventHeader:
db 1
warp_def $5, $9, 1, ROUTE_40_BATTLE_TOWER_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 10, 14, SIGNPOST_READ, Route40Sign
- signpost 8, 7, SIGNPOST_ITEM, Route40HiddenHyperPotion
+ bg_event 10, 14, BGEVENT_READ, Route40Sign
+ bg_event 8, 7, BGEVENT_ITEM, Route40HiddenHyperPotion
-.PersonEvents:
+.ObjectEvents:
db 12
- person_event SPRITE_OLIVINE_RIVAL, 15, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerSwimmermSimon, -1
- person_event SPRITE_OLIVINE_RIVAL, 30, 18, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 5, TrainerSwimmermRandall, -1
- person_event SPRITE_SWIMMER_GIRL, 19, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 4, TrainerSwimmerfElaine, -1
- person_event SPRITE_SWIMMER_GIRL, 25, 10, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerSwimmerfPaula, -1
- person_event SPRITE_ROCK, 11, 7, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route40Rock, -1
- person_event SPRITE_ROCK, 9, 6, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route40Rock, -1
- person_event SPRITE_ROCK, 8, 7, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route40Rock, -1
- person_event SPRITE_LASS, 13, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LassScript_0x1a61c4, -1
- person_event SPRITE_BUENA, 10, 8, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, MonicaScript, EVENT_ROUTE_40_MONICA_OF_MONDAY
- person_event SPRITE_POKEFAN_M, 6, 7, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x1a61c7, -1
- person_event SPRITE_LASS, 4, 13, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LassScript_0x1a61d3, -1
- person_event SPRITE_STANDING_YOUNGSTER, 9, 16, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, StandingYoungsterScript_0x1a61d6, EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
+ object_event SPRITE_OLIVINE_RIVAL, 15, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerSwimmermSimon, -1
+ object_event SPRITE_OLIVINE_RIVAL, 30, 18, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 5, TrainerSwimmermRandall, -1
+ object_event SPRITE_SWIMMER_GIRL, 19, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 4, TrainerSwimmerfElaine, -1
+ object_event SPRITE_SWIMMER_GIRL, 25, 10, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfPaula, -1
+ object_event SPRITE_ROCK, 11, 7, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route40Rock, -1
+ object_event SPRITE_ROCK, 9, 6, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route40Rock, -1
+ object_event SPRITE_ROCK, 8, 7, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route40Rock, -1
+ object_event SPRITE_LASS, 13, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route40Lass1Script, -1
+ object_event SPRITE_BUENA, 10, 8, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MonicaScript, EVENT_ROUTE_40_MONICA_OF_MONDAY
+ object_event SPRITE_POKEFAN_M, 6, 7, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PokefanMScript_0x1a61c7, -1
+ object_event SPRITE_LASS, 4, 13, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route40Lass2Script, -1
+ object_event SPRITE_STANDING_YOUNGSTER, 9, 16, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route40StandingYoungsterScript, EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
diff --git a/maps/Route40BattleTowerGate.asm b/maps/Route40BattleTowerGate.asm
index 4e6cfa8cb..6ffd98416 100644
--- a/maps/Route40BattleTowerGate.asm
+++ b/maps/Route40BattleTowerGate.asm
@@ -3,25 +3,22 @@ const_value set 2
const ROUTE40BATTLETOWERGATE_TWIN
Route40BattleTowerGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_OBJECTS, .ShowSailor
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, UnknownScript_0x9f665
-
-UnknownScript_0x9f665:
+.ShowSailor:
clearevent EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
return
-RockerScript_0x9f669:
- jumptextfaceplayer UnknownText_0x9f716
+Route40BattleTowerGateRockerScript:
+ jumptextfaceplayer Route40BattleTowerGateRockerText
-TwinScript_0x9f66c:
- jumptextfaceplayer UnknownText_0x9f7c8
+Route40BattleTowerGateTwinScript:
+ jumptextfaceplayer Route40BattleTowerGateTwinText
UnknownText_0x9f66f:
text "Did you come to"
@@ -43,7 +40,7 @@ UnknownText_0x9f6ba:
line "when I win."
done
-UnknownText_0x9f716:
+Route40BattleTowerGateRockerText:
text "Are you going to"
line "the BATTLE TOWER?"
@@ -62,7 +59,7 @@ UnknownText_0x9f783:
line "the BATTLE TOWER."
done
-UnknownText_0x9f7c8:
+Route40BattleTowerGateTwinText:
text "The levels of the"
line "#MON I want to"
@@ -84,13 +81,13 @@ Route40BattleTowerGate_MapEventHeader:
warp_def $0, $4, 1, BATTLE_TOWER_OUTSIDE
warp_def $0, $5, 2, BATTLE_TOWER_OUTSIDE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_ROCKER, 3, 3, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, RockerScript_0x9f669, EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
- person_event SPRITE_TWIN, 5, 7, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, TwinScript_0x9f66c, -1
+ object_event SPRITE_ROCKER, 3, 3, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route40BattleTowerGateRockerScript, EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
+ object_event SPRITE_TWIN, 5, 7, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route40BattleTowerGateTwinScript, -1
diff --git a/maps/Route41.asm b/maps/Route41.asm
index 6c4b5c0d5..7ba8d9972 100644
--- a/maps/Route41.asm
+++ b/maps/Route41.asm
@@ -11,118 +11,118 @@ const_value set 2
const ROUTE41_SWIMMER_GIRL5
Route41_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerSwimmerfKaylee:
- trainer EVENT_BEAT_SWIMMERF_KAYLEE, SWIMMERF, KAYLEE, SwimmerfKayleeSeenText, SwimmerfKayleeBeatenText, 0, SwimmerfKayleeScript
+ trainer EVENT_BEAT_SWIMMERF_KAYLEE, SWIMMERF, KAYLEE, SwimmerfKayleeSeenText, SwimmerfKayleeBeatenText, 0, .Script
-SwimmerfKayleeScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a6c7f
+ writetext SwimmerfKayleeAfterBattleText
waitbutton
closetext
end
TrainerSwimmerfSusie:
- trainer EVENT_BEAT_SWIMMERF_SUSIE, SWIMMERF, SUSIE, SwimmerfSusieSeenText, SwimmerfSusieBeatenText, 0, SwimmerfSusieScript
+ trainer EVENT_BEAT_SWIMMERF_SUSIE, SWIMMERF, SUSIE, SwimmerfSusieSeenText, SwimmerfSusieBeatenText, 0, .Script
-SwimmerfSusieScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a6d11
+ writetext SwimmerfSusieAfterBattleText
waitbutton
closetext
end
TrainerSwimmerfDenise:
- trainer EVENT_BEAT_SWIMMERF_DENISE, SWIMMERF, DENISE, SwimmerfDeniseSeenText, SwimmerfDeniseBeatenText, 0, SwimmerfDeniseScript
+ trainer EVENT_BEAT_SWIMMERF_DENISE, SWIMMERF, DENISE, SwimmerfDeniseSeenText, SwimmerfDeniseBeatenText, 0, .Script
-SwimmerfDeniseScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a6d79
+ writetext SwimmerfDeniseAfterBattleText
waitbutton
closetext
end
TrainerSwimmerfKara:
- trainer EVENT_BEAT_SWIMMERF_KARA, SWIMMERF, KARA, SwimmerfKaraSeenText, SwimmerfKaraBeatenText, 0, SwimmerfKaraScript
+ trainer EVENT_BEAT_SWIMMERF_KARA, SWIMMERF, KARA, SwimmerfKaraSeenText, SwimmerfKaraBeatenText, 0, .Script
-SwimmerfKaraScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a6e58
+ writetext SwimmerfKaraAfterBattleText
waitbutton
closetext
end
TrainerSwimmerfWendy:
- trainer EVENT_BEAT_SWIMMERF_WENDY, SWIMMERF, WENDY, SwimmerfWendySeenText, SwimmerfWendyBeatenText, 0, SwimmerfWendyScript
+ trainer EVENT_BEAT_SWIMMERF_WENDY, SWIMMERF, WENDY, SwimmerfWendySeenText, SwimmerfWendyBeatenText, 0, .Script
-SwimmerfWendyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a6ec2
+ writetext SwimmerfWendyAfterBattleText
waitbutton
closetext
end
TrainerSwimmermCharlie:
- trainer EVENT_BEAT_SWIMMERM_CHARLIE, SWIMMERM, CHARLIE, SwimmermCharlieSeenText, SwimmermCharlieBeatenText, 0, SwimmermCharlieScript
+ trainer EVENT_BEAT_SWIMMERM_CHARLIE, SWIMMERM, CHARLIE, SwimmermCharlieSeenText, SwimmermCharlieBeatenText, 0, .Script
-SwimmermCharlieScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a696e
+ writetext SwimmermCharlieAfterBattleText
waitbutton
closetext
end
TrainerSwimmermGeorge:
- trainer EVENT_BEAT_SWIMMERM_GEORGE, SWIMMERM, GEORGE, SwimmermGeorgeSeenText, SwimmermGeorgeBeatenText, 0, SwimmermGeorgeScript
+ trainer EVENT_BEAT_SWIMMERM_GEORGE, SWIMMERM, GEORGE, SwimmermGeorgeSeenText, SwimmermGeorgeBeatenText, 0, .Script
-SwimmermGeorgeScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a69d4
+ writetext SwimmermGeorgeAfterBattleText
waitbutton
closetext
end
TrainerSwimmermBerke:
- trainer EVENT_BEAT_SWIMMERM_BERKE, SWIMMERM, BERKE, SwimmermBerkeSeenText, SwimmermBerkeBeatenText, 0, SwimmermBerkeScript
+ trainer EVENT_BEAT_SWIMMERM_BERKE, SWIMMERM, BERKE, SwimmermBerkeSeenText, SwimmermBerkeBeatenText, 0, .Script
-SwimmermBerkeScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a6aa4
+ writetext SwimmermBerkeAfterBattleText
waitbutton
closetext
end
TrainerSwimmermKirk:
- trainer EVENT_BEAT_SWIMMERM_KIRK, SWIMMERM, KIRK, SwimmermKirkSeenText, SwimmermKirkBeatenText, 0, SwimmermKirkScript
+ trainer EVENT_BEAT_SWIMMERM_KIRK, SWIMMERM, KIRK, SwimmermKirkSeenText, SwimmermKirkBeatenText, 0, .Script
-SwimmermKirkScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a6b6c
+ writetext SwimmermKirkAfterBattleText
waitbutton
closetext
end
TrainerSwimmermMathew:
- trainer EVENT_BEAT_SWIMMERM_MATHEW, SWIMMERM, MATHEW, SwimmermMathewSeenText, SwimmermMathewBeatenText, 0, SwimmermMathewScript
+ trainer EVENT_BEAT_SWIMMERM_MATHEW, SWIMMERM, MATHEW, SwimmermMathewSeenText, SwimmermMathewBeatenText, 0, .Script
-SwimmermMathewScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a6bed
+ writetext SwimmermMathewAfterBattleText
waitbutton
closetext
end
@@ -148,7 +148,7 @@ SwimmermCharlieBeatenText:
line "prune skin!"
done
-UnknownText_0x1a696e:
+SwimmermCharlieAfterBattleText:
text "Isn't it relaxing"
line "just floating like"
cont "this?"
@@ -164,7 +164,7 @@ SwimmermGeorgeBeatenText:
text "Pant, pant…"
done
-UnknownText_0x1a69d4:
+SwimmermGeorgeAfterBattleText:
text "It's so far to"
line "CIANWOOD."
@@ -189,7 +189,7 @@ SwimmermBerkeBeatenText:
line "to your strength?"
done
-UnknownText_0x1a6aa4:
+SwimmermBerkeAfterBattleText:
text "It was a dark and"
line "stormy night…"
@@ -214,7 +214,7 @@ SwimmermKirkBeatenText:
text "I'm beat!"
done
-UnknownText_0x1a6b6c:
+SwimmermKirkAfterBattleText:
text "The currents keep"
line "me from reaching"
cont "that island."
@@ -231,7 +231,7 @@ SwimmermMathewBeatenText:
line "great endurance!"
done
-UnknownText_0x1a6bed:
+SwimmermMathewAfterBattleText:
text "A secret about"
line "WHIRL ISLANDS…"
@@ -252,7 +252,7 @@ SwimmerfKayleeBeatenText:
line "it?"
done
-UnknownText_0x1a6c7f:
+SwimmerfKayleeAfterBattleText:
text "There's supposed"
line "to be a big #-"
cont "MON deep beneath"
@@ -272,7 +272,7 @@ SwimmerfSusieBeatenText:
text "I'm crushed…"
done
-UnknownText_0x1a6d11:
+SwimmerfSusieAfterBattleText:
text "Wasn't there a hit"
line "song about a boy"
cont "riding a LAPRAS?"
@@ -288,7 +288,7 @@ SwimmerfDeniseBeatenText:
text "Ohhh!"
done
-UnknownText_0x1a6d79:
+SwimmerfDeniseAfterBattleText:
text "A sunburn is the"
line "worst for skin."
@@ -316,7 +316,7 @@ SwimmerfKaraBeatenText:
line "energy than I do."
done
-UnknownText_0x1a6e58:
+SwimmerfKaraAfterBattleText:
text "I heard roars from"
line "deep inside the"
cont "ISLANDS."
@@ -332,7 +332,7 @@ SwimmerfWendyBeatenText:
text "Oh, dear…"
done
-UnknownText_0x1a6ec2:
+SwimmerfWendyAfterBattleText:
text "The clusters of"
line "STARYU light up"
cont "at the same time."
@@ -352,22 +352,22 @@ Route41_MapEventHeader:
warp_def $25, $c, 1, WHIRL_ISLAND_SW
warp_def $2d, $24, 1, WHIRL_ISLAND_SE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 35, 9, SIGNPOST_ITEM, Route41HiddenMaxEther
+ bg_event 35, 9, BGEVENT_ITEM, Route41HiddenMaxEther
-.PersonEvents:
+.ObjectEvents:
db 10
- person_event SPRITE_OLIVINE_RIVAL, 6, 32, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerSwimmermCharlie, -1
- person_event SPRITE_OLIVINE_RIVAL, 8, 46, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerSwimmermGeorge, -1
- person_event SPRITE_OLIVINE_RIVAL, 26, 20, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerSwimmermBerke, -1
- person_event SPRITE_OLIVINE_RIVAL, 30, 32, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerSwimmermKirk, -1
- person_event SPRITE_OLIVINE_RIVAL, 46, 19, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerSwimmermMathew, -1
- person_event SPRITE_SWIMMER_GIRL, 4, 17, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerSwimmerfKaylee, -1
- person_event SPRITE_SWIMMER_GIRL, 19, 23, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerSwimmerfSusie, -1
- person_event SPRITE_SWIMMER_GIRL, 34, 27, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerSwimmerfDenise, -1
- person_event SPRITE_SWIMMER_GIRL, 28, 44, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 4, TrainerSwimmerfKara, -1
- person_event SPRITE_SWIMMER_GIRL, 50, 9, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 2, TrainerSwimmerfWendy, -1
+ object_event SPRITE_OLIVINE_RIVAL, 6, 32, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermCharlie, -1
+ object_event SPRITE_OLIVINE_RIVAL, 8, 46, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermGeorge, -1
+ object_event SPRITE_OLIVINE_RIVAL, 26, 20, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermBerke, -1
+ object_event SPRITE_OLIVINE_RIVAL, 30, 32, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermKirk, -1
+ object_event SPRITE_OLIVINE_RIVAL, 46, 19, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermMathew, -1
+ object_event SPRITE_SWIMMER_GIRL, 4, 17, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfKaylee, -1
+ object_event SPRITE_SWIMMER_GIRL, 19, 23, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfSusie, -1
+ object_event SPRITE_SWIMMER_GIRL, 34, 27, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfDenise, -1
+ object_event SPRITE_SWIMMER_GIRL, 28, 44, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 4, TrainerSwimmerfKara, -1
+ object_event SPRITE_SWIMMER_GIRL, 50, 9, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerSwimmerfWendy, -1
diff --git a/maps/Route42.asm b/maps/Route42.asm
index b9007bb08..40feaa927 100644
--- a/maps/Route42.asm
+++ b/maps/Route42.asm
@@ -10,20 +10,18 @@ const_value set 2
const ROUTE42_SUICUNE
Route42_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x1a9216, 0
- dw UnknownScript_0x1a9217, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 0
-UnknownScript_0x1a9216:
+.DummyScene0:
end
-UnknownScript_0x1a9217:
+.DummyScene1:
end
Route42SuicuneScript:
@@ -33,15 +31,15 @@ Route42SuicuneScript:
applymovement ROUTE42_SUICUNE, MovementData_0x1a9356
disappear ROUTE42_SUICUNE
pause 10
- dotrigger $0
+ setscene $0
clearevent EVENT_SAW_SUICUNE_ON_ROUTE_36
- domaptrigger ROUTE_36, $1
+ setmapscene ROUTE_36, $1
end
TrainerFisherTully1:
- trainer EVENT_BEAT_FISHER_TULLY, FISHER, TULLY1, FisherTully1SeenText, FisherTully1BeatenText, 0, FisherTully1Script
+ trainer EVENT_BEAT_FISHER_TULLY, FISHER, TULLY1, FisherTully1SeenText, FisherTully1BeatenText, 0, .Script
-FisherTully1Script:
+.Script:
writecode VAR_CALLERID, PHONE_FISHER_TULLY
end_if_just_battled
opentext
@@ -165,23 +163,23 @@ UnknownScript_0x1a9311:
end
TrainerPokemaniacShane:
- trainer EVENT_BEAT_POKEMANIAC_SHANE, POKEMANIAC, SHANE, PokemaniacShaneSeenText, PokemaniacShaneBeatenText, 0, PokemaniacShaneScript
+ trainer EVENT_BEAT_POKEMANIAC_SHANE, POKEMANIAC, SHANE, PokemaniacShaneSeenText, PokemaniacShaneBeatenText, 0, .Script
-PokemaniacShaneScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a94d6
+ writetext PokemaniacShaneAfterBattleText
waitbutton
closetext
end
TrainerHikerBenjamin:
- trainer EVENT_BEAT_HIKER_BENJAMIN, HIKER, BENJAMIN, HikerBenjaminSeenText, HikerBenjaminBeatenText, 0, HikerBenjaminScript
+ trainer EVENT_BEAT_HIKER_BENJAMIN, HIKER, BENJAMIN, HikerBenjaminSeenText, HikerBenjaminBeatenText, 0, .Script
-HikerBenjaminScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a943f
+ writetext HikerBenjaminAfterBattleText
waitbutton
closetext
end
@@ -260,7 +258,7 @@ HikerBenjaminBeatenText:
text "Gahahah!"
done
-UnknownText_0x1a943f:
+HikerBenjaminAfterBattleText:
text "Losing feels in-"
line "significant if you"
@@ -281,7 +279,7 @@ PokemaniacShaneBeatenText:
line "my MOON STONE…"
done
-UnknownText_0x1a94d6:
+PokemaniacShaneAfterBattleText:
text "You're working on"
line "a #DEX?"
@@ -333,26 +331,26 @@ Route42_MapEventHeader:
warp_def $9, $1c, 2, MOUNT_MORTAR_1F_OUTSIDE
warp_def $7, $2e, 3, MOUNT_MORTAR_1F_OUTSIDE
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 1, $e, $18, $0, Route42SuicuneScript, $0, $0
+ coord_event 1, $e, $18, Route42SuicuneScript
-.Signposts:
+.BGEvents:
db 5
- signpost 10, 4, SIGNPOST_READ, Route42Sign1
- signpost 5, 7, SIGNPOST_READ, MtMortarSign1
- signpost 9, 45, SIGNPOST_READ, MtMortarSign2
- signpost 8, 54, SIGNPOST_READ, Route42Sign2
- signpost 11, 16, SIGNPOST_ITEM, Route42HiddenMaxPotion
+ bg_event 10, 4, BGEVENT_READ, Route42Sign1
+ bg_event 5, 7, BGEVENT_READ, MtMortarSign1
+ bg_event 9, 45, BGEVENT_READ, MtMortarSign2
+ bg_event 8, 54, BGEVENT_READ, Route42Sign2
+ bg_event 11, 16, BGEVENT_ITEM, Route42HiddenMaxPotion
-.PersonEvents:
+.ObjectEvents:
db 9
- person_event SPRITE_FISHER, 10, 40, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 1, TrainerFisherTully1, -1
- person_event SPRITE_POKEFAN_M, 9, 51, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerHikerBenjamin, -1
- person_event SPRITE_SUPER_NERD, 8, 47, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerPokemaniacShane, -1
- person_event SPRITE_FRUIT_TREE, 16, 27, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x1a934d, -1
- person_event SPRITE_FRUIT_TREE, 16, 28, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x1a934f, -1
- person_event SPRITE_FRUIT_TREE, 16, 29, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x1a9351, -1
- person_event SPRITE_POKE_BALL, 4, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route42UltraBall, EVENT_ROUTE_42_ULTRA_BALL
- person_event SPRITE_POKE_BALL, 8, 33, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route42SuperPotion, EVENT_ROUTE_42_SUPER_POTION
- person_event SPRITE_SUICUNE, 16, 26, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_SAW_SUICUNE_ON_ROUTE_42
+ object_event SPRITE_FISHER, 10, 40, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherTully1, -1
+ object_event SPRITE_POKEFAN_M, 9, 51, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerHikerBenjamin, -1
+ object_event SPRITE_SUPER_NERD, 8, 47, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacShane, -1
+ object_event SPRITE_FRUIT_TREE, 16, 27, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x1a934d, -1
+ object_event SPRITE_FRUIT_TREE, 16, 28, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x1a934f, -1
+ object_event SPRITE_FRUIT_TREE, 16, 29, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x1a9351, -1
+ object_event SPRITE_POKE_BALL, 4, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route42UltraBall, EVENT_ROUTE_42_ULTRA_BALL
+ object_event SPRITE_POKE_BALL, 8, 33, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route42SuperPotion, EVENT_ROUTE_42_SUPER_POTION
+ object_event SPRITE_SUICUNE, 16, 26, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_SAW_SUICUNE_ON_ROUTE_42
diff --git a/maps/Route42EcruteakGate.asm b/maps/Route42EcruteakGate.asm
index df7927010..b7cbf6c6f 100644
--- a/maps/Route42EcruteakGate.asm
+++ b/maps/Route42EcruteakGate.asm
@@ -2,16 +2,16 @@ const_value set 2
const ROUTE42ECRUTEAKGATE_OFFICER
Route42EcruteakGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-OfficerScript_0x19a4b5:
- jumptextfaceplayer UnknownText_0x19a4b8
+Route42EcruteakGateOfficerScript:
+ jumptextfaceplayer Route42EcruteakGateOfficerText
-UnknownText_0x19a4b8:
+Route42EcruteakGateOfficerText:
text "MT.MORTAR is like"
line "a maze inside."
@@ -30,12 +30,12 @@ Route42EcruteakGate_MapEventHeader:
warp_def $4, $9, 1, ROUTE_42
warp_def $5, $9, 2, ROUTE_42
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, OfficerScript_0x19a4b5, -1
+ object_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route42EcruteakGateOfficerScript, -1
diff --git a/maps/Route43.asm b/maps/Route43.asm
index b3c3da115..871cd133c 100644
--- a/maps/Route43.asm
+++ b/maps/Route43.asm
@@ -9,52 +9,49 @@ const_value set 2
const ROUTE43_POKE_BALL
Route43_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_NEWMAP, .CheckIfRockets
- ; callbacks
-
- dbw MAPCALLBACK_NEWMAP, UnknownScript_0x19d051
-
-UnknownScript_0x19d051:
+.CheckIfRockets:
checkevent EVENT_CLEARED_ROCKET_HIDEOUT
- iftrue UnknownScript_0x19d05c
- domaptrigger ROUTE_43_GATE, $0
+ iftrue .NoRockets
+ setmapscene ROUTE_43_GATE, $0
return
-UnknownScript_0x19d05c:
- domaptrigger ROUTE_43_GATE, $1
+.NoRockets:
+ setmapscene ROUTE_43_GATE, $1
return
TrainerCamperSpencer:
- trainer EVENT_BEAT_CAMPER_SPENCER, CAMPER, SPENCER, CamperSpencerSeenText, CamperSpencerBeatenText, 0, CamperSpencerScript
+ trainer EVENT_BEAT_CAMPER_SPENCER, CAMPER, SPENCER, CamperSpencerSeenText, CamperSpencerBeatenText, 0, .Script
-CamperSpencerScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19d57e
+ writetext CamperSpencerAfterBattleText
waitbutton
closetext
end
TrainerPokemaniacBen:
- trainer EVENT_BEAT_POKEMANIAC_BEN, POKEMANIAC, BEN, PokemaniacBenSeenText, PokemaniacBenBeatenText, 0, PokemaniacBenScript
+ trainer EVENT_BEAT_POKEMANIAC_BEN, POKEMANIAC, BEN, PokemaniacBenSeenText, PokemaniacBenBeatenText, 0, .Script
-PokemaniacBenScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19d2d2
+ writetext PokemaniacBenAfterBattleText
waitbutton
closetext
end
TrainerPokemaniacBrent1:
- trainer EVENT_BEAT_POKEMANIAC_BRENT, POKEMANIAC, BRENT1, PokemaniacBrent1SeenText, PokemaniacBrent1BeatenText, 0, PokemaniacBrent1Script
+ trainer EVENT_BEAT_POKEMANIAC_BRENT, POKEMANIAC, BRENT1, PokemaniacBrent1SeenText, PokemaniacBrent1BeatenText, 0, .Script
-PokemaniacBrent1Script:
+.Script:
writecode VAR_CALLERID, PHONE_POKEMANIAC_BRENT
end_if_just_battled
opentext
@@ -157,31 +154,31 @@ UnknownScript_0x19d144:
end
TrainerPokemaniacRon:
- trainer EVENT_BEAT_POKEMANIAC_RON, POKEMANIAC, RON, PokemaniacRonSeenText, PokemaniacRonBeatenText, 0, PokemaniacRonScript
+ trainer EVENT_BEAT_POKEMANIAC_RON, POKEMANIAC, RON, PokemaniacRonSeenText, PokemaniacRonBeatenText, 0, .Script
-PokemaniacRonScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19d3f8
+ writetext PokemaniacRonAfterBattleText
waitbutton
closetext
end
TrainerFisherMarvin:
- trainer EVENT_BEAT_FISHER_MARVIN, FISHER, MARVIN, FisherMarvinSeenText, FisherMarvinBeatenText, 0, FisherMarvinScript
+ trainer EVENT_BEAT_FISHER_MARVIN, FISHER, MARVIN, FisherMarvinSeenText, FisherMarvinBeatenText, 0, .Script
-FisherMarvinScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19d4d3
+ writetext FisherMarvinAfterBattleText
waitbutton
closetext
end
TrainerPicnickerTiffany3:
- trainer EVENT_BEAT_PICNICKER_TIFFANY, PICNICKER, TIFFANY3, PicnickerTiffany3SeenText, PicnickerTiffany3BeatenText, 0, PicnickerTiffany3Script
+ trainer EVENT_BEAT_PICNICKER_TIFFANY, PICNICKER, TIFFANY3, PicnickerTiffany3SeenText, PicnickerTiffany3BeatenText, 0, .Script
-PicnickerTiffany3Script:
+.Script:
writecode VAR_CALLERID, PHONE_PICNICKER_TIFFANY
end_if_just_battled
opentext
@@ -342,7 +339,7 @@ PokemaniacBenBeatenText:
line "this to me?"
done
-UnknownText_0x19d2d2:
+PokemaniacBenAfterBattleText:
text "What else do I"
line "like besides"
cont "#MON?"
@@ -384,7 +381,7 @@ PokemaniacRonBeatenText:
line "pretty right on!"
done
-UnknownText_0x19d3f8:
+PokemaniacRonAfterBattleText:
text "It's okay for"
line "people to like"
@@ -411,7 +408,7 @@ FisherMarvinBeatenText:
line "better anyway."
done
-UnknownText_0x19d4d3:
+FisherMarvinAfterBattleText:
text "KURT's LURE BALL"
line "is the best for"
@@ -434,7 +431,7 @@ CamperSpencerBeatenText:
line "at all…"
done
-UnknownText_0x19d57e:
+CamperSpencerAfterBattleText:
text "What is going on"
line "at LAKE OF RAGE?"
@@ -515,22 +512,22 @@ Route43_MapEventHeader:
warp_def $1f, $11, 1, ROUTE_43_GATE
warp_def $1f, $12, 2, ROUTE_43_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 3, 13, SIGNPOST_READ, Route43Sign1
- signpost 49, 11, SIGNPOST_READ, Route43Sign2
- signpost 38, 16, SIGNPOST_READ, Route43TrainerTips
+ bg_event 3, 13, BGEVENT_READ, Route43Sign1
+ bg_event 49, 11, BGEVENT_READ, Route43Sign2
+ bg_event 38, 16, BGEVENT_READ, Route43TrainerTips
-.PersonEvents:
+.ObjectEvents:
db 8
- person_event SPRITE_SUPER_NERD, 5, 13, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, TrainerPokemaniacBen, -1
- person_event SPRITE_SUPER_NERD, 20, 13, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerPokemaniacBrent1, -1
- person_event SPRITE_SUPER_NERD, 7, 14, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, TrainerPokemaniacRon, -1
- person_event SPRITE_FISHER, 16, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 4, TrainerFisherMarvin, -1
- person_event SPRITE_LASS, 25, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 2, TrainerPicnickerTiffany3, -1
- person_event SPRITE_YOUNGSTER, 40, 13, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerCamperSpencer, -1
- person_event SPRITE_FRUIT_TREE, 26, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x19d266, -1
- person_event SPRITE_POKE_BALL, 32, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route43MaxEther, EVENT_ROUTE_43_MAX_ETHER
+ object_event SPRITE_SUPER_NERD, 5, 13, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerPokemaniacBen, -1
+ object_event SPRITE_SUPER_NERD, 20, 13, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacBrent1, -1
+ object_event SPRITE_SUPER_NERD, 7, 14, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerPokemaniacRon, -1
+ object_event SPRITE_FISHER, 16, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 4, TrainerFisherMarvin, -1
+ object_event SPRITE_LASS, 25, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerPicnickerTiffany3, -1
+ object_event SPRITE_YOUNGSTER, 40, 13, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerCamperSpencer, -1
+ object_event SPRITE_FRUIT_TREE, 26, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x19d266, -1
+ object_event SPRITE_POKE_BALL, 32, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route43MaxEther, EVENT_ROUTE_43_MAX_ETHER
diff --git a/maps/Route43Gate.asm b/maps/Route43Gate.asm
index ee54a42c7..04542679b 100644
--- a/maps/Route43Gate.asm
+++ b/maps/Route43Gate.asm
@@ -1,46 +1,43 @@
+ROUTE43GATE_TOLL EQU 1000
+
const_value set 2
const ROUTE43GATE_OFFICER
const ROUTE43GATE_ROCKET1
const ROUTE43GATE_ROCKET2
Route43Gate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw .Trigger0, 0
- dw .Trigger1, 0
+ scene_script .RocketShakedown
+ scene_script .DummyScene
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_NEWMAP, .CheckIfRockets
- ; callbacks
-
- dbw MAPCALLBACK_NEWMAP, GateScript_CheckIfRockets
-
-.Trigger0:
- priorityjump GateScript_RocketTakeover
+.RocketShakedown:
+ priorityjump .RocketTakeover
end
-.Trigger1:
+.DummyScene:
end
-GateScript_CheckIfRockets:
+.CheckIfRockets:
checkevent EVENT_CLEARED_ROCKET_HIDEOUT
- iftrue GateScript_NoRockets
- domaptrigger ROUTE_43, $0
+ iftrue .NoRockets
+ setmapscene ROUTE_43, $0
return
-GateScript_NoRockets:
- domaptrigger ROUTE_43, $1
+.NoRockets:
+ setmapscene ROUTE_43, $1
return
-GateScript_RocketTakeover:
+.RocketTakeover:
playmusic MUSIC_ROCKET_ENCOUNTER
checkcode VAR_FACING
if_equal DOWN, RocketScript_Southbound
if_equal UP, RocketScript_Northbound
- dotrigger $1
+ setscene $1
end
RocketScript_Southbound:
@@ -53,17 +50,17 @@ RocketScript_Southbound:
opentext
writetext RocketText_TollFee
buttonsound
- checkmoney $0, 999
+ checkmoney $0, ROUTE43GATE_TOLL - 1
if_equal $0, RocketScript_TollSouth
jump RocketScript_YoureBrokeSouth
RocketScript_TollSouth:
- takemoney $0, 1000
+ takemoney $0, ROUTE43GATE_TOLL
writetext RocketText_ThankYou
jump RocketScript_ShakeDownSouth
RocketScript_YoureBrokeSouth:
- takemoney $0, 1000
+ takemoney $0, ROUTE43GATE_TOLL
writetext RocketText_AllYouGot
jump RocketScript_ShakeDownSouth
@@ -72,7 +69,7 @@ RocketScript_ShakeDownSouth:
closetext
applymovement ROUTE43GATE_ROCKET1, Rocket1Script_LetsYouPassSouth
applymovement ROUTE43GATE_ROCKET2, Rocket2Script_LetsYouPassSouth
- dotrigger $1
+ setscene $1
special RestartMapMusic
end
@@ -85,17 +82,17 @@ RocketScript_Northbound:
opentext
writetext RocketText_TollFee
buttonsound
- checkmoney $0, 999
+ checkmoney $0, ROUTE43GATE_TOLL - 1
if_equal $0, RocketScript_TollNorth
jump RocketScript_YoureBrokeNorth
RocketScript_TollNorth:
- takemoney $0, 1000
+ takemoney $0, ROUTE43GATE_TOLL
writetext RocketText_ThankYou
jump RocketScript_ShakeDownNorth
RocketScript_YoureBrokeNorth:
- takemoney $0, 1000
+ takemoney $0, ROUTE43GATE_TOLL
writetext RocketText_AllYouGot
jump RocketScript_ShakeDownNorth
@@ -104,7 +101,7 @@ RocketScript_ShakeDownNorth:
closetext
applymovement ROUTE43GATE_ROCKET2, Rocket2Script_LetsYouPassNorth
applymovement ROUTE43GATE_ROCKET1, Rocket1Script_LetsYouPassNorth
- dotrigger $1
+ setscene $1
special RestartMapMusic
end
@@ -261,14 +258,14 @@ Route43Gate_MapEventHeader:
warp_def $7, $4, 3, ROUTE_43
warp_def $7, $5, 3, ROUTE_43
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, OfficerScript_GuardWithSludgeBomb, EVENT_LAKE_OF_RAGE_CIVILIANS
- person_event SPRITE_ROCKET, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketScript_MakingABundle, EVENT_ROUTE_43_GATE_ROCKETS
- person_event SPRITE_ROCKET, 4, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketScript_MakingABundle, EVENT_ROUTE_43_GATE_ROCKETS
+ object_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, OfficerScript_GuardWithSludgeBomb, EVENT_LAKE_OF_RAGE_CIVILIANS
+ object_event SPRITE_ROCKET, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RocketScript_MakingABundle, EVENT_ROUTE_43_GATE_ROCKETS
+ object_event SPRITE_ROCKET, 4, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RocketScript_MakingABundle, EVENT_ROUTE_43_GATE_ROCKETS
diff --git a/maps/Route43MahoganyGate.asm b/maps/Route43MahoganyGate.asm
index b60e5e160..e4b6396c1 100644
--- a/maps/Route43MahoganyGate.asm
+++ b/maps/Route43MahoganyGate.asm
@@ -2,7 +2,7 @@ const_value set 2
const ROUTE43MAHOGANYGATE_OFFICER
Route43MahoganyGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -49,12 +49,12 @@ Route43MahoganyGate_MapEventHeader:
warp_def $7, $4, 5, MAHOGANY_TOWN
warp_def $7, $5, 5, MAHOGANY_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, OfficerScript_0x19ab0b, -1
+ object_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x19ab0b, -1
diff --git a/maps/Route44.asm b/maps/Route44.asm
index 48d7a2eb5..a12953ebc 100644
--- a/maps/Route44.asm
+++ b/maps/Route44.asm
@@ -12,16 +12,16 @@ const_value set 2
const ROUTE44_POKE_BALL3
Route44_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerBird_keeperVance1:
- trainer EVENT_BEAT_BIRD_KEEPER_VANCE, BIRD_KEEPER, VANCE1, Bird_keeperVance1SeenText, Bird_keeperVance1BeatenText, 0, Bird_keeperVance1Script
+ trainer EVENT_BEAT_BIRD_KEEPER_VANCE, BIRD_KEEPER, VANCE1, Bird_keeperVance1SeenText, Bird_keeperVance1BeatenText, 0, .Script
-Bird_keeperVance1Script:
+.Script:
writecode VAR_CALLERID, PHONE_BIRDKEEPER_VANCE
end_if_just_battled
opentext
@@ -150,20 +150,20 @@ UnknownScript_0x19d90a:
end
TrainerPsychicPhil:
- trainer EVENT_BEAT_PSYCHIC_PHIL, PSYCHIC_T, PHIL, PsychicPhilSeenText, PsychicPhilBeatenText, 0, PsychicPhilScript
+ trainer EVENT_BEAT_PSYCHIC_PHIL, PSYCHIC_T, PHIL, PsychicPhilSeenText, PsychicPhilBeatenText, 0, .Script
-PsychicPhilScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19dcfc
+ writetext PsychicPhilAfterBattleText
waitbutton
closetext
end
TrainerFisherWilton1:
- trainer EVENT_BEAT_FISHER_WILTON, FISHER, WILTON1, FisherWilton1SeenText, FisherWilton1BeatenText, 0, FisherWilton1Script
+ trainer EVENT_BEAT_FISHER_WILTON, FISHER, WILTON1, FisherWilton1SeenText, FisherWilton1BeatenText, 0, .Script
-FisherWilton1Script:
+.Script:
writecode VAR_CALLERID, PHONE_FISHER_WILTON
end_if_just_battled
opentext
@@ -256,45 +256,45 @@ UnknownScript_0x19d9e7:
jump UnknownScript_0x19d8ff
TrainerFisherEdgar:
- trainer EVENT_BEAT_FISHER_EDGAR, FISHER, EDGAR, FisherEdgarSeenText, FisherEdgarBeatenText, 0, FisherEdgarScript
+ trainer EVENT_BEAT_FISHER_EDGAR, FISHER, EDGAR, FisherEdgarSeenText, FisherEdgarBeatenText, 0, .Script
-FisherEdgarScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19db6f
+ writetext FisherEdgarAfterBattleText
waitbutton
closetext
end
TrainerCooltrainerfCybil:
- trainer EVENT_BEAT_COOLTRAINERF_CYBIL, COOLTRAINERF, CYBIL, CooltrainerfCybilSeenText, CooltrainerfCybilBeatenText, 0, CooltrainerfCybilScript
+ trainer EVENT_BEAT_COOLTRAINERF_CYBIL, COOLTRAINERF, CYBIL, CooltrainerfCybilSeenText, CooltrainerfCybilBeatenText, 0, .Script
-CooltrainerfCybilScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19df4d
+ writetext CooltrainerfCybilAfterBattleText
waitbutton
closetext
end
TrainerPokemaniacZach:
- trainer EVENT_BEAT_POKEMANIAC_ZACH, POKEMANIAC, ZACH, PokemaniacZachSeenText, PokemaniacZachBeatenText, 0, PokemaniacZachScript
+ trainer EVENT_BEAT_POKEMANIAC_ZACH, POKEMANIAC, ZACH, PokemaniacZachSeenText, PokemaniacZachBeatenText, 0, .Script
-PokemaniacZachScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19dd7e
+ writetext PokemaniacZachAfterBattleText
waitbutton
closetext
end
TrainerCooltrainermAllen:
- trainer EVENT_BEAT_COOLTRAINERM_ALLEN, COOLTRAINERM, ALLEN, CooltrainermAllenSeenText, CooltrainermAllenBeatenText, 0, CooltrainermAllenScript
+ trainer EVENT_BEAT_COOLTRAINERM_ALLEN, COOLTRAINERM, ALLEN, CooltrainermAllenSeenText, CooltrainermAllenBeatenText, 0, .Script
-CooltrainermAllenScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19de66
+ writetext CooltrainermAllenAfterBattleText
waitbutton
closetext
end
@@ -360,7 +360,7 @@ FisherEdgarBeatenText:
line "This isn't right."
done
-UnknownText_0x19db6f:
+FisherEdgarAfterBattleText:
text "That's 100 wins"
line "to 101 losses."
@@ -412,7 +412,7 @@ PsychicPhilBeatenText:
line "shocking loss…"
done
-UnknownText_0x19dcfc:
+PsychicPhilAfterBattleText:
text "It's important to"
line "have conviction"
cont "on your side."
@@ -429,7 +429,7 @@ PokemaniacZachBeatenText:
line "are so appealing."
done
-UnknownText_0x19dd7e:
+PokemaniacZachAfterBattleText:
text "If a #MON has"
line "different colors"
@@ -455,7 +455,7 @@ CooltrainermAllenBeatenText:
line "loss on my part."
done
-UnknownText_0x19de66:
+CooltrainermAllenAfterBattleText:
text "Wow. You have a"
line "lot of BADGES."
@@ -485,7 +485,7 @@ CooltrainerfCybilBeatenText:
line "do at all."
done
-UnknownText_0x19df4d:
+CooltrainerfCybilAfterBattleText:
text "We all get better"
line "by experiencing"
cont "many battles."
@@ -515,25 +515,25 @@ Route44_MapEventHeader:
db 1
warp_def $7, $38, 1, ICE_PATH_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 7, 53, SIGNPOST_READ, Route44Sign1
- signpost 10, 6, SIGNPOST_READ, Route44Sign2
- signpost 9, 32, SIGNPOST_ITEM, Route44HiddenElixer
+ bg_event 7, 53, BGEVENT_READ, Route44Sign1
+ bg_event 10, 6, BGEVENT_READ, Route44Sign2
+ bg_event 9, 32, BGEVENT_ITEM, Route44HiddenElixer
-.PersonEvents:
+.ObjectEvents:
db 11
- person_event SPRITE_FISHER, 3, 35, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 1, TrainerFisherWilton1, -1
- person_event SPRITE_FISHER, 13, 19, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 1, TrainerFisherEdgar, -1
- person_event SPRITE_YOUNGSTER, 9, 10, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerPsychicPhil, -1
- person_event SPRITE_SUPER_NERD, 2, 43, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerPokemaniacZach, -1
- person_event SPRITE_YOUNGSTER, 5, 51, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 2, TrainerBird_keeperVance1, -1
- person_event SPRITE_COOLTRAINER_M, 15, 41, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 5, TrainerCooltrainermAllen, -1
- person_event SPRITE_COOLTRAINER_F, 14, 31, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 5, TrainerCooltrainerfCybil, -1
- person_event SPRITE_FRUIT_TREE, 5, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x19da40, -1
- person_event SPRITE_POKE_BALL, 8, 30, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route44MaxRevive, EVENT_ROUTE_44_MAX_REVIVE
- person_event SPRITE_POKE_BALL, 4, 45, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route44UltraBall, EVENT_ROUTE_44_ULTRA_BALL
- person_event SPRITE_POKE_BALL, 9, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route44MaxRepel, EVENT_ROUTE_44_MAX_REPEL
+ object_event SPRITE_FISHER, 3, 35, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherWilton1, -1
+ object_event SPRITE_FISHER, 13, 19, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherEdgar, -1
+ object_event SPRITE_YOUNGSTER, 9, 10, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPsychicPhil, -1
+ object_event SPRITE_SUPER_NERD, 2, 43, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacZach, -1
+ object_event SPRITE_YOUNGSTER, 5, 51, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerBird_keeperVance1, -1
+ object_event SPRITE_COOLTRAINER_M, 15, 41, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 5, TrainerCooltrainermAllen, -1
+ object_event SPRITE_COOLTRAINER_F, 14, 31, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 5, TrainerCooltrainerfCybil, -1
+ object_event SPRITE_FRUIT_TREE, 5, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x19da40, -1
+ object_event SPRITE_POKE_BALL, 8, 30, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route44MaxRevive, EVENT_ROUTE_44_MAX_REVIVE
+ object_event SPRITE_POKE_BALL, 4, 45, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route44UltraBall, EVENT_ROUTE_44_ULTRA_BALL
+ object_event SPRITE_POKE_BALL, 9, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route44MaxRepel, EVENT_ROUTE_44_MAX_REPEL
diff --git a/maps/Route45.asm b/maps/Route45.asm
index 67459ad8b..592719890 100644
--- a/maps/Route45.asm
+++ b/maps/Route45.asm
@@ -14,16 +14,16 @@ const_value set 2
const ROUTE45_YOUNGSTER
Route45_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerBlackbeltKenji:
- trainer EVENT_BEAT_BLACKBELT_KENJI, BLACKBELT_T, KENJI3, BlackbeltKenji3SeenText, BlackbeltKenji3BeatenText, 0, BlackbeltKenji3Script
+ trainer EVENT_BEAT_BLACKBELT_KENJI, BLACKBELT_T, KENJI3, BlackbeltKenji3SeenText, BlackbeltKenji3BeatenText, 0, .Script
-BlackbeltKenji3Script:
+.Script:
writecode VAR_CALLERID, PHONE_BLACKBELT_KENJI
end_if_just_battled
opentext
@@ -125,31 +125,31 @@ UnknownScript_0x19e146:
end
TrainerHikerErik:
- trainer EVENT_BEAT_HIKER_ERIK, HIKER, ERIK, HikerErikSeenText, HikerErikBeatenText, 0, HikerErikScript
+ trainer EVENT_BEAT_HIKER_ERIK, HIKER, ERIK, HikerErikSeenText, HikerErikBeatenText, 0, .Script
-HikerErikScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19e301
+ writetext HikerErikAfterBattleText
waitbutton
closetext
end
TrainerHikerMichael:
- trainer EVENT_BEAT_HIKER_MICHAEL, HIKER, MICHAEL, HikerMichaelSeenText, HikerMichaelBeatenText, 0, HikerMichaelScript
+ trainer EVENT_BEAT_HIKER_MICHAEL, HIKER, MICHAEL, HikerMichaelSeenText, HikerMichaelBeatenText, 0, .Script
-HikerMichaelScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19e3b1
+ writetext HikerMichaelAfterBattleText
waitbutton
closetext
end
TrainerHikerParry:
- trainer EVENT_BEAT_HIKER_PARRY, HIKER, PARRY3, HikerParry3SeenText, HikerParry3BeatenText, 0, HikerParry3Script
+ trainer EVENT_BEAT_HIKER_PARRY, HIKER, PARRY3, HikerParry3SeenText, HikerParry3BeatenText, 0, .Script
-HikerParry3Script:
+.Script:
writecode VAR_CALLERID, PHONE_HIKER_PARRY
end_if_just_battled
opentext
@@ -233,34 +233,34 @@ UnknownScript_0x19e219:
jump UnknownScript_0x19e127
TrainerHikerTimothy:
- trainer EVENT_BEAT_HIKER_TIMOTHY, HIKER, TIMOTHY, HikerTimothySeenText, HikerTimothyBeatenText, 0, HikerTimothyScript
+ trainer EVENT_BEAT_HIKER_TIMOTHY, HIKER, TIMOTHY, HikerTimothySeenText, HikerTimothyBeatenText, 0, .Script
-HikerTimothyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19e4f1
+ writetext HikerTimothyAfterBattleText
waitbutton
closetext
end
TrainerCooltrainermRyan:
- trainer EVENT_BEAT_COOLTRAINERM_RYAN, COOLTRAINERM, RYAN, CooltrainermRyanSeenText, CooltrainermRyanBeatenText, 0, CooltrainermRyanScript
+ trainer EVENT_BEAT_COOLTRAINERM_RYAN, COOLTRAINERM, RYAN, CooltrainermRyanSeenText, CooltrainermRyanBeatenText, 0, .Script
-CooltrainermRyanScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19e70d
+ writetext CooltrainermRyanAfterBattleText
waitbutton
closetext
end
TrainerCooltrainerfKelly:
- trainer EVENT_BEAT_COOLTRAINERF_KELLY, COOLTRAINERF, KELLY, CooltrainerfKellySeenText, CooltrainerfKellyBeatenText, 0, CooltrainerfKellyScript
+ trainer EVENT_BEAT_COOLTRAINERF_KELLY, COOLTRAINERF, KELLY, CooltrainerfKellySeenText, CooltrainerfKellyBeatenText, 0, .Script
-CooltrainerfKellyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19e7d1
+ writetext CooltrainerfKellyAfterBattleText
waitbutton
closetext
end
@@ -328,7 +328,7 @@ HikerErikBeatenText:
text "Oh, I lost that!"
done
-UnknownText_0x19e301:
+HikerErikAfterBattleText:
text "I'll head back to"
line "BLACKTHORN's ICE"
@@ -350,7 +350,7 @@ HikerMichaelBeatenText:
line "spunky enough!"
done
-UnknownText_0x19e3b1:
+HikerMichaelAfterBattleText:
text "Boy, do I love"
line "HP UP! Mmmm, yum!"
@@ -397,7 +397,7 @@ HikerTimothyBeatenText:
line "They're there too!"
done
-UnknownText_0x19e4f1:
+HikerTimothyAfterBattleText:
text "The best thing to"
line "ever happen to me"
@@ -467,7 +467,7 @@ CooltrainermRyanBeatenText:
line "respect."
done
-UnknownText_0x19e70d:
+CooltrainermRyanAfterBattleText:
text "I see you're rais-"
line "ing your #MON"
cont "with care."
@@ -490,7 +490,7 @@ CooltrainerfKellyBeatenText:
text "Fine. I lost."
done
-UnknownText_0x19e7d1:
+CooltrainerfKellyAfterBattleText:
text "I'm not in favor"
line "of overly power-"
cont "ful moves."
@@ -540,26 +540,26 @@ Route45_MapEventHeader:
db 1
warp_def $5, $2, 1, DARK_CAVE_BLACKTHORN_ENTRANCE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 4, 10, SIGNPOST_READ, Route45Sign
- signpost 80, 13, SIGNPOST_ITEM, Route45HiddenPpUp
+ bg_event 4, 10, BGEVENT_READ, Route45Sign
+ bg_event 80, 13, BGEVENT_ITEM, Route45HiddenPpUp
-.PersonEvents:
+.ObjectEvents:
db 13
- person_event SPRITE_POKEFAN_M, 16, 10, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 1, TrainerHikerErik, -1
- person_event SPRITE_POKEFAN_M, 65, 15, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerHikerMichael, -1
- person_event SPRITE_POKEFAN_M, 28, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerHikerParry, -1
- person_event SPRITE_POKEFAN_M, 65, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 1, TrainerHikerTimothy, -1
- person_event SPRITE_BLACK_BELT, 50, 11, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerBlackbeltKenji, -1
- person_event SPRITE_COOLTRAINER_M, 18, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerCooltrainermRyan, -1
- person_event SPRITE_COOLTRAINER_F, 36, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerCooltrainerfKelly, -1
- person_event SPRITE_FRUIT_TREE, 82, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x19e294, -1
- person_event SPRITE_POKE_BALL, 51, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route45Nugget, EVENT_ROUTE_45_NUGGET
- person_event SPRITE_POKE_BALL, 66, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route45Revive, EVENT_ROUTE_45_REVIVE
- person_event SPRITE_POKE_BALL, 20, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route45Elixer, EVENT_ROUTE_45_ELIXER
- person_event SPRITE_POKE_BALL, 33, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route45MaxPotion, EVENT_ROUTE_45_MAX_POTION
- person_event SPRITE_YOUNGSTER, 70, 4, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x19e269, -1
+ object_event SPRITE_POKEFAN_M, 16, 10, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerHikerErik, -1
+ object_event SPRITE_POKEFAN_M, 65, 15, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerHikerMichael, -1
+ object_event SPRITE_POKEFAN_M, 28, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerHikerParry, -1
+ object_event SPRITE_POKEFAN_M, 65, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerHikerTimothy, -1
+ object_event SPRITE_BLACK_BELT, 50, 11, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerBlackbeltKenji, -1
+ object_event SPRITE_COOLTRAINER_M, 18, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerCooltrainermRyan, -1
+ object_event SPRITE_COOLTRAINER_F, 36, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainerfKelly, -1
+ object_event SPRITE_FRUIT_TREE, 82, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x19e294, -1
+ object_event SPRITE_POKE_BALL, 51, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route45Nugget, EVENT_ROUTE_45_NUGGET
+ object_event SPRITE_POKE_BALL, 66, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route45Revive, EVENT_ROUTE_45_REVIVE
+ object_event SPRITE_POKE_BALL, 20, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route45Elixer, EVENT_ROUTE_45_ELIXER
+ object_event SPRITE_POKE_BALL, 33, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route45MaxPotion, EVENT_ROUTE_45_MAX_POTION
+ object_event SPRITE_YOUNGSTER, 70, 4, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x19e269, -1
diff --git a/maps/Route46.asm b/maps/Route46.asm
index ce4d4d5ec..89d6ac61e 100644
--- a/maps/Route46.asm
+++ b/maps/Route46.asm
@@ -7,27 +7,27 @@ const_value set 2
const ROUTE46_POKE_BALL
Route46_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerCamperTed:
- trainer EVENT_BEAT_CAMPER_TED, CAMPER, TED, CamperTedSeenText, CamperTedBeatenText, 0, CamperTedScript
+ trainer EVENT_BEAT_CAMPER_TED, CAMPER, TED, CamperTedSeenText, CamperTedBeatenText, 0, .Script
-CamperTedScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a9851
+ writetext CamperTedAfterBattleText
waitbutton
closetext
end
TrainerPicnickerErin1:
- trainer EVENT_BEAT_PICNICKER_ERIN, PICNICKER, ERIN1, PicnickerErin1SeenText, PicnickerErin1BeatenText, 0, PicnickerErin1Script
+ trainer EVENT_BEAT_PICNICKER_ERIN, PICNICKER, ERIN1, PicnickerErin1SeenText, PicnickerErin1BeatenText, 0, .Script
-PicnickerErin1Script:
+.Script:
writecode VAR_CALLERID, PHONE_PICNICKER_ERIN
end_if_just_battled
opentext
@@ -148,12 +148,12 @@ UnknownScript_0x1a9772:
end
TrainerHikerBailey:
- trainer EVENT_BEAT_HIKER_BAILEY, HIKER, BAILEY, HikerBaileySeenText, HikerBaileyBeatenText, 0, HikerBaileyScript
+ trainer EVENT_BEAT_HIKER_BAILEY, HIKER, BAILEY, HikerBaileySeenText, HikerBaileyBeatenText, 0, .Script
-HikerBaileyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1a97e8
+ writetext HikerBaileyAfterBattleText
waitbutton
closetext
end
@@ -181,7 +181,7 @@ HikerBaileyBeatenText:
line "me your power!"
done
-UnknownText_0x1a97e8:
+HikerBaileyAfterBattleText:
text "It's over. I don't"
line "mind. We HIKERS"
cont "are like that."
@@ -199,7 +199,7 @@ CamperTedBeatenText:
text "Wha…?"
done
-UnknownText_0x1a9851:
+CamperTedAfterBattleText:
text "I did my best but"
line "came up short."
@@ -260,18 +260,18 @@ Route46_MapEventHeader:
warp_def $21, $8, 2, ROUTE_29_46_GATE
warp_def $5, $e, 3, DARK_CAVE_VIOLET_ENTRANCE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 27, 9, SIGNPOST_READ, Route46Sign
+ bg_event 27, 9, BGEVENT_READ, Route46Sign
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_POKEFAN_M, 19, 12, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerHikerBailey, -1
- person_event SPRITE_YOUNGSTER, 14, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 2, TrainerCamperTed, -1
- person_event SPRITE_LASS, 13, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 2, TrainerPicnickerErin1, -1
- person_event SPRITE_FRUIT_TREE, 5, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x1a978f, -1
- person_event SPRITE_FRUIT_TREE, 6, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x1a9791, -1
- person_event SPRITE_POKE_BALL, 15, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, Route46XSpeed, EVENT_ROUTE_46_X_SPEED
+ object_event SPRITE_POKEFAN_M, 19, 12, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerHikerBailey, -1
+ object_event SPRITE_YOUNGSTER, 14, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerCamperTed, -1
+ object_event SPRITE_LASS, 13, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerPicnickerErin1, -1
+ object_event SPRITE_FRUIT_TREE, 5, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x1a978f, -1
+ object_event SPRITE_FRUIT_TREE, 6, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x1a9791, -1
+ object_event SPRITE_POKE_BALL, 15, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route46XSpeed, EVENT_ROUTE_46_X_SPEED
diff --git a/maps/Route5.asm b/maps/Route5.asm
index 951bba75c..047774506 100644
--- a/maps/Route5.asm
+++ b/maps/Route5.asm
@@ -2,14 +2,14 @@ const_value set 2
const ROUTE5_POKEFAN_M
Route5_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-PokefanMScript_0x1adb19:
- jumptextfaceplayer UnknownText_0x1adb22
+Route5PokefanMScript:
+ jumptextfaceplayer Route5PokefanMText
Route5UndergroundPathSign:
jumptext Route5UndergroundPathSignText
@@ -17,7 +17,7 @@ Route5UndergroundPathSign:
HouseForSaleSign:
jumptext HouseForSaleSignText
-UnknownText_0x1adb22:
+Route5PokefanMText:
text "The road is closed"
line "until the problem"
@@ -45,19 +45,19 @@ Route5_MapEventHeader:
.Warps:
db 4
- warp_def $f, $11, 1, ROUTE_5_UNDERGROUND_ENTRANCE
+ warp_def $f, $11, 1, ROUTE_5_UNDERGROUND_PATH_ENTRANCE
warp_def $11, $8, 1, ROUTE_5_SAFFRON_CITY_GATE
warp_def $11, $9, 2, ROUTE_5_SAFFRON_CITY_GATE
warp_def $b, $a, 1, ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 17, 17, SIGNPOST_READ, Route5UndergroundPathSign
- signpost 11, 10, SIGNPOST_READ, HouseForSaleSign
+ bg_event 17, 17, BGEVENT_READ, Route5UndergroundPathSign
+ bg_event 11, 10, BGEVENT_READ, HouseForSaleSign
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKEFAN_M, 16, 17, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x1adb19, EVENT_ROUTE_5_6_POKEFAN_M_BLOCKS_UNDERGROUND_PATH
+ object_event SPRITE_POKEFAN_M, 16, 17, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route5PokefanMScript, EVENT_ROUTE_5_6_POKEFAN_M_BLOCKS_UNDERGROUND_PATH
diff --git a/maps/Route5CleanseTagSpeechHouse.asm b/maps/Route5CleanseTagSpeechHouse.asm
index 299d80c76..513adfac2 100644
--- a/maps/Route5CleanseTagSpeechHouse.asm
+++ b/maps/Route5CleanseTagSpeechHouse.asm
@@ -3,7 +3,7 @@ const_value set 2
const ROUTE5CLEANSETAGSPEECHHOUSE_TEACHER
Route5CleanseTagSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -26,8 +26,8 @@ UnknownScript_0x18b64d:
closetext
end
-TeacherScript_0x18b64f:
- jumptextfaceplayer UnknownText_0x18b6de
+Route5CleanseTagSpeechHouseTeacherScript:
+ jumptextfaceplayer Route5CleanseTagSpeechHouseTeacherText
HouseForSaleBookshelf:
jumpstd difficultbookshelf
@@ -49,7 +49,7 @@ UnknownText_0x18b6a7:
cont "are protected now."
done
-UnknownText_0x18b6de:
+Route5CleanseTagSpeechHouseTeacherText:
text "My grandma is into"
line "warding off what"
@@ -69,15 +69,15 @@ Route5CleanseTagSpeechHouse_MapEventHeader:
warp_def $7, $2, 4, ROUTE_5
warp_def $7, $3, 4, ROUTE_5
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, HouseForSaleBookshelf
- signpost 1, 1, SIGNPOST_READ, HouseForSaleBookshelf
+ bg_event 1, 0, BGEVENT_READ, HouseForSaleBookshelf
+ bg_event 1, 1, BGEVENT_READ, HouseForSaleBookshelf
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_GRANNY, 5, 2, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, GrannyScript_0x18b634, -1
- person_event SPRITE_TEACHER, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, TeacherScript_0x18b64f, -1
+ object_event SPRITE_GRANNY, 5, 2, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GrannyScript_0x18b634, -1
+ object_event SPRITE_TEACHER, 3, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route5CleanseTagSpeechHouseTeacherScript, -1
diff --git a/maps/Route5SaffronCityGate.asm b/maps/Route5SaffronCityGate.asm
index cefe24e47..ebd84823e 100644
--- a/maps/Route5SaffronCityGate.asm
+++ b/maps/Route5SaffronCityGate.asm
@@ -2,16 +2,16 @@ const_value set 2
const ROUTE5SAFFRONCITYGATE_OFFICER
Route5SaffronCityGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-OfficerScript_0x18b5b9:
- jumptextfaceplayer UnknownText_0x18b5bc
+Route5SaffronCityGateOfficerScript:
+ jumptextfaceplayer Route5SaffronCityGateOfficerText
-UnknownText_0x18b5bc:
+Route5SaffronCityGateOfficerText:
text "You're from JOHTO,"
line "aren't you?"
@@ -31,12 +31,12 @@ Route5SaffronCityGate_MapEventHeader:
warp_def $7, $4, 9, SAFFRON_CITY
warp_def $7, $5, 9, SAFFRON_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OfficerScript_0x18b5b9, -1
+ object_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route5SaffronCityGateOfficerScript, -1
diff --git a/maps/Route5UndergroundEntrance.asm b/maps/Route5UndergroundEntrance.asm
deleted file mode 100644
index a9051d75b..000000000
--- a/maps/Route5UndergroundEntrance.asm
+++ /dev/null
@@ -1,40 +0,0 @@
-const_value set 2
- const ROUTE5UNDERGROUNDENTRANCE_TEACHER
-
-Route5UndergroundEntrance_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-TeacherScript_0x18b555:
- jumptextfaceplayer UnknownText_0x18b558
-
-UnknownText_0x18b558:
- text "Many cities in"
- line "JOHTO have long"
-
- para "histories. I'd"
- line "love to visit!"
- done
-
-Route5UndergroundEntrance_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 1, ROUTE_5
- warp_def $7, $4, 1, ROUTE_5
- warp_def $3, $4, 1, UNDERGROUND
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 1
- person_event SPRITE_TEACHER, 2, 2, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TeacherScript_0x18b555, -1
diff --git a/maps/Route5UndergroundPathEntrance.asm b/maps/Route5UndergroundPathEntrance.asm
new file mode 100644
index 000000000..ee47e150e
--- /dev/null
+++ b/maps/Route5UndergroundPathEntrance.asm
@@ -0,0 +1,40 @@
+const_value set 2
+ const ROUTE5UNDERGROUNDPATHENTRANCE_TEACHER
+
+Route5UndergroundPathEntrance_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+Route5UndergroundPathEntranceTeacherScript:
+ jumptextfaceplayer Route5UndergroundPathEntranceTeacherText
+
+Route5UndergroundPathEntranceTeacherText:
+ text "Many cities in"
+ line "JOHTO have long"
+
+ para "histories. I'd"
+ line "love to visit!"
+ done
+
+Route5UndergroundPathEntrance_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 1, ROUTE_5
+ warp_def $7, $4, 1, ROUTE_5
+ warp_def $3, $4, 1, UNDERGROUND_PATH
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 1
+ object_event SPRITE_TEACHER, 2, 2, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route5UndergroundPathEntranceTeacherScript, -1
diff --git a/maps/Route6.asm b/maps/Route6.asm
index 335980dca..884470930 100644
--- a/maps/Route6.asm
+++ b/maps/Route6.asm
@@ -4,41 +4,41 @@ const_value set 2
const ROUTE6_POKEFAN_M3
Route6_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerPokefanmRex:
- trainer EVENT_BEAT_POKEFANM_REX, POKEFANM, REX, PokefanmRexSeenText, PokefanmRexBeatenText, 0, PokefanmRexScript
+ trainer EVENT_BEAT_POKEFANM_REX, POKEFANM, REX, PokefanmRexSeenText, PokefanmRexBeatenText, 0, .Script
-PokefanmRexScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ad9ff
+ writetext PokefanmRexAfterBattleText
waitbutton
closetext
end
TrainerPokefanmAllan:
- trainer EVENT_BEAT_POKEFANM_ALLAN, POKEFANM, ALLAN, PokefanmAllanSeenText, PokefanmAllanBeatenText, 0, PokefanmAllanScript
+ trainer EVENT_BEAT_POKEFANM_ALLAN, POKEFANM, ALLAN, PokefanmAllanSeenText, PokefanmAllanBeatenText, 0, .Script
-PokefanmAllanScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ada88
+ writetext PokefanmAllanAfterBattleText
waitbutton
closetext
end
-PokefanMScript_0x1ad951:
- jumptextfaceplayer UnknownText_0x1ad957
+Route6PokefanMScript:
+ jumptextfaceplayer Route6PokefanMText
Route6UndergroundPathSign:
jumptext Route6UndergroundPathSignText
-UnknownText_0x1ad957:
+Route6PokefanMText:
text "The road is closed"
line "until the problem"
@@ -63,7 +63,7 @@ PokefanmRexBeatenText:
text "My PHANPY!"
done
-UnknownText_0x1ad9ff:
+PokefanmRexAfterBattleText:
text "Look how adorable"
line "my PHANPY acts!"
@@ -82,7 +82,7 @@ PokefanmAllanBeatenText:
text "My TEDDIURSA!"
done
-UnknownText_0x1ada88:
+PokefanmAllanAfterBattleText:
text "Look how adorable"
line "my TEDDIURSA acts!"
@@ -97,18 +97,18 @@ Route6_MapEventHeader:
.Warps:
db 2
- warp_def $3, $11, 1, ROUTE_6_UNDERGROUND_ENTRANCE
+ warp_def $3, $11, 1, ROUTE_6_UNDERGROUND_PATH_ENTRANCE
warp_def $1, $6, 3, ROUTE_6_SAFFRON_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 5, 19, SIGNPOST_READ, Route6UndergroundPathSign
+ bg_event 5, 19, BGEVENT_READ, Route6UndergroundPathSign
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_POKEFAN_M, 4, 17, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 2, PokefanMScript_0x1ad951, EVENT_ROUTE_5_6_POKEFAN_M_BLOCKS_UNDERGROUND_PATH
- person_event SPRITE_POKEFAN_M, 12, 9, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 0, TrainerPokefanmRex, -1
- person_event SPRITE_POKEFAN_M, 12, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 0, TrainerPokefanmAllan, -1
+ object_event SPRITE_POKEFAN_M, 4, 17, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 2, Route6PokefanMScript, EVENT_ROUTE_5_6_POKEFAN_M_BLOCKS_UNDERGROUND_PATH
+ object_event SPRITE_POKEFAN_M, 12, 9, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 0, TrainerPokefanmRex, -1
+ object_event SPRITE_POKEFAN_M, 12, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 0, TrainerPokefanmAllan, -1
diff --git a/maps/Route6SaffronGate.asm b/maps/Route6SaffronGate.asm
index 9e3275d97..25f234e82 100644
--- a/maps/Route6SaffronGate.asm
+++ b/maps/Route6SaffronGate.asm
@@ -2,16 +2,14 @@ const_value set 2
const ROUTE6SAFFRONGATE_OFFICER
Route6SaffronGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 1
-
- ; triggers
- dw UnknownScript_0x1926e9, 0
+ scene_script .DummyScene
.MapCallbacks:
db 0
-UnknownScript_0x1926e9:
+.DummyScene:
end
OfficerScript_0x1926ea:
@@ -70,12 +68,12 @@ Route6SaffronGate_MapEventHeader:
warp_def $7, $4, 2, ROUTE_6
warp_def $7, $5, 2, ROUTE_6
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OfficerScript_0x1926ea, -1
+ object_event SPRITE_OFFICER, 4, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x1926ea, -1
diff --git a/maps/Route6UndergroundEntrance.asm b/maps/Route6UndergroundEntrance.asm
deleted file mode 100644
index e1dbd1b86..000000000
--- a/maps/Route6UndergroundEntrance.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-Route6UndergroundEntrance_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-Route6UndergroundEntrance_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 1, ROUTE_6
- warp_def $7, $4, 1, ROUTE_6
- warp_def $3, $4, 2, UNDERGROUND
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/Route6UndergroundPathEntrance.asm b/maps/Route6UndergroundPathEntrance.asm
new file mode 100644
index 000000000..3088ae330
--- /dev/null
+++ b/maps/Route6UndergroundPathEntrance.asm
@@ -0,0 +1,25 @@
+Route6UndergroundPathEntrance_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+Route6UndergroundPathEntrance_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 1, ROUTE_6
+ warp_def $7, $4, 1, ROUTE_6
+ warp_def $3, $4, 2, UNDERGROUND_PATH
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/Route7.asm b/maps/Route7.asm
index 1b56ea3cf..c412b4a46 100644
--- a/maps/Route7.asm
+++ b/maps/Route7.asm
@@ -1,5 +1,5 @@
Route7_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -43,13 +43,13 @@ Route7_MapEventHeader:
warp_def $6, $f, 1, ROUTE_7_SAFFRON_GATE
warp_def $7, $f, 2, ROUTE_7_SAFFRON_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 11, 5, SIGNPOST_READ, Route7UndergroundPathSign
- signpost 9, 6, SIGNPOST_READ, Route7LockedDoor
+ bg_event 11, 5, BGEVENT_READ, Route7UndergroundPathSign
+ bg_event 9, 6, BGEVENT_READ, Route7LockedDoor
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/Route7SaffronGate.asm b/maps/Route7SaffronGate.asm
index df494e313..1b5a02785 100644
--- a/maps/Route7SaffronGate.asm
+++ b/maps/Route7SaffronGate.asm
@@ -2,7 +2,7 @@ const_value set 2
const ROUTE7SAFFRONGATE_OFFICER
Route7SaffronGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -56,12 +56,12 @@ Route7SaffronGate_MapEventHeader:
warp_def $4, $9, 10, SAFFRON_CITY
warp_def $5, $9, 11, SAFFRON_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OfficerScript_0x73518, -1
+ object_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x73518, -1
diff --git a/maps/Route8.asm b/maps/Route8.asm
index 67318446c..66a207130 100644
--- a/maps/Route8.asm
+++ b/maps/Route8.asm
@@ -7,63 +7,63 @@ const_value set 2
const ROUTE8_FRUIT_TREE
Route8_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerBikerDwayne:
- trainer EVENT_BEAT_BIKER_DWAYNE, BIKER, DWAYNE, BikerDwayneSeenText, BikerDwayneBeatenText, 0, BikerDwayneScript
+ trainer EVENT_BEAT_BIKER_DWAYNE, BIKER, DWAYNE, BikerDwayneSeenText, BikerDwayneBeatenText, 0, .Script
-BikerDwayneScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6c0c8
+ writetext BikerDwayneAfterBattleText
waitbutton
closetext
end
TrainerBikerHarris:
- trainer EVENT_BEAT_BIKER_HARRIS, BIKER, HARRIS, BikerHarrisSeenText, BikerHarrisBeatenText, 0, BikerHarrisScript
+ trainer EVENT_BEAT_BIKER_HARRIS, BIKER, HARRIS, BikerHarrisSeenText, BikerHarrisBeatenText, 0, .Script
-BikerHarrisScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6c143
+ writetext BikerHarrisAfterBattleText
waitbutton
closetext
end
TrainerBikerZeke:
- trainer EVENT_BEAT_BIKER_ZEKE, BIKER, ZEKE, BikerZekeSeenText, BikerZekeBeatenText, 0, BikerZekeScript
+ trainer EVENT_BEAT_BIKER_ZEKE, BIKER, ZEKE, BikerZekeSeenText, BikerZekeBeatenText, 0, .Script
-BikerZekeScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6c1a3
+ writetext BikerZekeAfterBattleText
waitbutton
closetext
end
TrainerSupernerdSam:
- trainer EVENT_BEAT_SUPER_NERD_SAM, SUPER_NERD, SAM, SupernerdSamSeenText, SupernerdSamBeatenText, 0, SupernerdSamScript
+ trainer EVENT_BEAT_SUPER_NERD_SAM, SUPER_NERD, SAM, SupernerdSamSeenText, SupernerdSamBeatenText, 0, .Script
-SupernerdSamScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6c219
+ writetext SupernerdSamAfterBattleText
waitbutton
closetext
end
TrainerSupernerdTom:
- trainer EVENT_BEAT_SUPER_NERD_TOM, SUPER_NERD, TOM, SupernerdTomSeenText, SupernerdTomBeatenText, 0, SupernerdTomScript
+ trainer EVENT_BEAT_SUPER_NERD_TOM, SUPER_NERD, TOM, SupernerdTomSeenText, SupernerdTomBeatenText, 0, .Script
-SupernerdTomScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6c27e
+ writetext SupernerdTomAfterBattleText
waitbutton
closetext
end
@@ -90,7 +90,7 @@ BikerDwayneBeatenText:
text "S-sorry!"
done
-UnknownText_0x6c0c8:
+BikerDwayneAfterBattleText:
text "The KANTO #MON"
line "FEDERATION will"
cont "never fall!"
@@ -108,7 +108,7 @@ BikerHarrisBeatenText:
text "F-forgive me!"
done
-UnknownText_0x6c143:
+BikerHarrisAfterBattleText:
text "Wiped out by some"
line "punk from JOHTO…"
done
@@ -124,7 +124,7 @@ BikerZekeBeatenText:
text "Yikes! Sorry!"
done
-UnknownText_0x6c1a3:
+BikerZekeAfterBattleText:
text "We'll try not to"
line "disturb anyone"
cont "from now on…"
@@ -140,7 +140,7 @@ SupernerdSamBeatenText:
line "the MAGNET TRAIN…"
done
-UnknownText_0x6c219:
+SupernerdSamAfterBattleText:
text "The power of mag-"
line "nets is awesome!"
done
@@ -155,7 +155,7 @@ SupernerdTomBeatenText:
line "You're tough!"
done
-UnknownText_0x6c27e:
+SupernerdTomAfterBattleText:
text "GYM BADGES give"
line "you advantages in"
cont "battles."
@@ -181,19 +181,19 @@ Route8_MapEventHeader:
warp_def $4, $4, 3, ROUTE_8_SAFFRON_GATE
warp_def $5, $4, 4, ROUTE_8_SAFFRON_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 7, 11, SIGNPOST_READ, Route8UndergroundPathSign
- signpost 5, 10, SIGNPOST_READ, Route8LockedDoor
+ bg_event 7, 11, BGEVENT_READ, Route8UndergroundPathSign
+ bg_event 5, 10, BGEVENT_READ, Route8LockedDoor
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_BIKER, 8, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 5, TrainerBikerDwayne, -1
- person_event SPRITE_BIKER, 9, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 5, TrainerBikerHarris, -1
- person_event SPRITE_BIKER, 10, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 5, TrainerBikerZeke, -1
- person_event SPRITE_SUPER_NERD, 2, 23, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerSupernerdSam, -1
- person_event SPRITE_SUPER_NERD, 12, 31, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 4, TrainerSupernerdTom, -1
- person_event SPRITE_FRUIT_TREE, 5, 33, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x6c06c, -1
+ object_event SPRITE_BIKER, 8, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 5, TrainerBikerDwayne, -1
+ object_event SPRITE_BIKER, 9, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 5, TrainerBikerHarris, -1
+ object_event SPRITE_BIKER, 10, 10, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 5, TrainerBikerZeke, -1
+ object_event SPRITE_SUPER_NERD, 2, 23, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerSupernerdSam, -1
+ object_event SPRITE_SUPER_NERD, 12, 31, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 4, TrainerSupernerdTom, -1
+ object_event SPRITE_FRUIT_TREE, 5, 33, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FruitTreeScript_0x6c06c, -1
diff --git a/maps/Route8SaffronGate.asm b/maps/Route8SaffronGate.asm
index 6f871c5fd..5fc04c8ad 100644
--- a/maps/Route8SaffronGate.asm
+++ b/maps/Route8SaffronGate.asm
@@ -2,16 +2,16 @@ const_value set 2
const ROUTE8SAFFRONGATE_OFFICER
Route8SaffronGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-OfficerScript_0x7f416:
- jumptextfaceplayer UnknownText_0x7f419
+Route8SaffronGateOfficerScript:
+ jumptextfaceplayer Route8SaffronGateOfficerText
-UnknownText_0x7f419:
+Route8SaffronGateOfficerText:
text "Have you been to"
line "LAVENDER TOWN?"
@@ -30,12 +30,12 @@ Route8SaffronGate_MapEventHeader:
warp_def $4, $9, 1, ROUTE_8
warp_def $5, $9, 2, ROUTE_8
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OfficerScript_0x7f416, -1
+ object_event SPRITE_OFFICER, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route8SaffronGateOfficerScript, -1
diff --git a/maps/Route9.asm b/maps/Route9.asm
index a8842e17b..d3a28a088 100644
--- a/maps/Route9.asm
+++ b/maps/Route9.asm
@@ -7,74 +7,74 @@ const_value set 2
const ROUTE9_POKEFAN_M2
Route9_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerCamperDean:
- trainer EVENT_BEAT_CAMPER_DEAN, CAMPER, DEAN, CamperDeanSeenText, CamperDeanBeatenText, 0, CamperDeanScript
+ trainer EVENT_BEAT_CAMPER_DEAN, CAMPER, DEAN, CamperDeanSeenText, CamperDeanBeatenText, 0, .Script
-CamperDeanScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1aafd9
+ writetext CamperDeanAfterBattleText
waitbutton
closetext
end
TrainerPicnickerHeidi:
- trainer EVENT_BEAT_PICNICKER_HEIDI, PICNICKER, HEIDI, PicnickerHeidiSeenText, PicnickerHeidiBeatenText, 0, PicnickerHeidiScript
+ trainer EVENT_BEAT_PICNICKER_HEIDI, PICNICKER, HEIDI, PicnickerHeidiSeenText, PicnickerHeidiBeatenText, 0, .Script
-PicnickerHeidiScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ab07c
+ writetext PicnickerHeidiAfterBattleText
waitbutton
closetext
end
TrainerCamperSid:
- trainer EVENT_BEAT_CAMPER_SID, CAMPER, SID, CamperSidSeenText, CamperSidBeatenText, 0, CamperSidScript
+ trainer EVENT_BEAT_CAMPER_SID, CAMPER, SID, CamperSidSeenText, CamperSidBeatenText, 0, .Script
-CamperSidScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ab0f6
+ writetext CamperSidAfterBattleText
waitbutton
closetext
end
TrainerPicnickerEdna:
- trainer EVENT_BEAT_PICNICKER_EDNA, PICNICKER, EDNA, PicnickerEdnaSeenText, PicnickerEdnaBeatenText, 0, PicnickerEdnaScript
+ trainer EVENT_BEAT_PICNICKER_EDNA, PICNICKER, EDNA, PicnickerEdnaSeenText, PicnickerEdnaBeatenText, 0, .Script
-PicnickerEdnaScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ab15f
+ writetext PicnickerEdnaAfterBattleText
waitbutton
closetext
end
TrainerHikerTim:
- trainer EVENT_BEAT_HIKER_TIM, HIKER, TIM, HikerTimSeenText, HikerTimBeatenText, 0, HikerTimScript
+ trainer EVENT_BEAT_HIKER_TIM, HIKER, TIM, HikerTimSeenText, HikerTimBeatenText, 0, .Script
-HikerTimScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ab210
+ writetext HikerTimAfterBattleText
waitbutton
closetext
end
TrainerHikerSidney:
- trainer EVENT_BEAT_HIKER_SIDNEY, HIKER, SIDNEY, HikerSidneySeenText, HikerSidneyBeatenText, 0, HikerSidneyScript
+ trainer EVENT_BEAT_HIKER_SIDNEY, HIKER, SIDNEY, HikerSidneySeenText, HikerSidneyBeatenText, 0, .Script
-HikerSidneyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1ab278
+ writetext HikerSidneyAfterBattleText
waitbutton
closetext
end
@@ -95,7 +95,7 @@ CamperDeanBeatenText:
text "Whoa! Danger, man."
done
-UnknownText_0x1aafd9:
+CamperDeanAfterBattleText:
text "My #MON were"
line "hurt before even"
@@ -119,7 +119,7 @@ PicnickerHeidiBeatenText:
text "Ohhhh!"
done
-UnknownText_0x1ab07c:
+PicnickerHeidiAfterBattleText:
text "We bake lots of"
line "goodies and share"
@@ -137,7 +137,7 @@ CamperSidBeatenText:
line "ing out…"
done
-UnknownText_0x1ab0f6:
+CamperSidAfterBattleText:
text "Sorry. You weren't"
line "littering. It was"
cont "my mistake."
@@ -153,7 +153,7 @@ PicnickerEdnaBeatenText:
text "Ohh… I lost…"
done
-UnknownText_0x1ab15f:
+PicnickerEdnaAfterBattleText:
text "Conserving energy"
line "is important, but"
@@ -175,7 +175,7 @@ HikerTimBeatenText:
line "singing…"
done
-UnknownText_0x1ab210:
+HikerTimAfterBattleText:
text "Battles are about"
line "concentration."
done
@@ -193,7 +193,7 @@ HikerSidneyBeatenText:
line "I lost that…"
done
-UnknownText_0x1ab278:
+HikerSidneyAfterBattleText:
text "The POWER PLANT is"
line "across a small"
cont "river."
@@ -214,19 +214,19 @@ Route9_MapEventHeader:
db 1
warp_def $f, $30, 1, ROCK_TUNNEL_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 7, 15, SIGNPOST_READ, Route9Sign
- signpost 15, 41, SIGNPOST_ITEM, Route9HiddenEther
+ bg_event 7, 15, BGEVENT_READ, Route9Sign
+ bg_event 15, 41, BGEVENT_ITEM, Route9HiddenEther
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_YOUNGSTER, 11, 23, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerCamperDean, -1
- person_event SPRITE_LASS, 8, 39, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 3, TrainerPicnickerHeidi, -1
- person_event SPRITE_YOUNGSTER, 4, 11, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 5, TrainerCamperSid, -1
- person_event SPRITE_LASS, 15, 12, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 1, TrainerPicnickerEdna, -1
- person_event SPRITE_POKEFAN_M, 3, 28, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerHikerTim, -1
- person_event SPRITE_POKEFAN_M, 15, 36, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 4, TrainerHikerSidney, -1
+ object_event SPRITE_YOUNGSTER, 11, 23, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerCamperDean, -1
+ object_event SPRITE_LASS, 8, 39, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerPicnickerHeidi, -1
+ object_event SPRITE_YOUNGSTER, 4, 11, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 5, TrainerCamperSid, -1
+ object_event SPRITE_LASS, 15, 12, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerPicnickerEdna, -1
+ object_event SPRITE_POKEFAN_M, 3, 28, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerHikerTim, -1
+ object_event SPRITE_POKEFAN_M, 15, 36, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 4, TrainerHikerSidney, -1
diff --git a/maps/RuinsOfAlphAerodactylChamber.asm b/maps/RuinsOfAlphAerodactylChamber.asm
new file mode 100644
index 000000000..bf84025fe
--- /dev/null
+++ b/maps/RuinsOfAlphAerodactylChamber.asm
@@ -0,0 +1,171 @@
+RuinsOfAlphAerodactylChamber_MapScriptHeader:
+.SceneScripts:
+ db 2
+ scene_script .CheckWall
+ scene_script .DummyScene
+
+.MapCallbacks:
+ db 1
+ dbw MAPCALLBACK_TILES, .HiddenDoors
+
+.CheckWall:
+ checkevent EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER
+ iftrue .OpenWall
+ end
+
+.OpenWall:
+ priorityjump .WallOpenScript
+ end
+
+.DummyScene:
+ end
+
+.HiddenDoors:
+ checkevent EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER
+ iftrue .WallOpen
+ changeblock $4, $0, $2e
+.WallOpen:
+ checkevent EVENT_SOLVED_AERODACTYL_PUZZLE
+ iffalse .FloorClosed
+ return
+
+.FloorClosed:
+ changeblock $2, $2, $1
+ changeblock $4, $2, $2
+ return
+
+.WallOpenScript:
+ pause 30
+ earthquake 30
+ showemote EMOTE_SHOCK, PLAYER, 20
+ pause 30
+ playsound SFX_STRENGTH
+ changeblock $4, $0, $30
+ reloadmappart
+ earthquake 50
+ setscene $1
+ closetext
+ end
+
+MapRuinsOfAlphAerodactylChamberSignpost2Script:
+ refreshscreen $0
+ writebyte $2
+ special Special_UnownPuzzle
+ closetext
+ iftrue UnknownScript_0x58df7
+ end
+
+UnknownScript_0x58df7:
+ setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
+ setevent EVENT_SOLVED_AERODACTYL_PUZZLE
+ setflag ENGINE_UNLOCKED_UNOWNS_3
+ setmapscene RUINS_OF_ALPH_INNER_CHAMBER, $1
+ earthquake 30
+ showemote EMOTE_SHOCK, PLAYER, 15
+ changeblock $2, $2, $18
+ changeblock $4, $2, $19
+ reloadmappart
+ playsound SFX_STRENGTH
+ earthquake 80
+ applymovement PLAYER, MovementData_0x58e4d
+ playsound SFX_KINESIS
+ waitsfx
+ pause 20
+ warpcheck
+ end
+
+MapRuinsOfAlphAerodactylChamberSignpost1Script:
+ jumptext UnknownText_0x58ec2
+
+MapRuinsOfAlphAerodactylChamberSignpost3Script:
+ jumptext UnknownText_0x58ee7
+
+MapRuinsOfAlphAerodactylChamberSignpost4Script:
+ opentext
+ writetext UnknownText_0x58e4f
+ writebyte $1
+ special Special_DisplayUnownWords
+ closetext
+ end
+
+MapRuinsOfAlphAerodactylChamberSignpost5Script:
+ checkevent EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER
+ iftrue UnknownScript_0x58e46
+ opentext
+ writetext UnknownText_0x58e81
+ writebyte $1
+ special Special_DisplayUnownWords
+ closetext
+ end
+
+UnknownScript_0x58e46:
+ opentext
+ writetext UnknownText_0x58ea2
+ waitbutton
+ closetext
+ end
+
+MovementData_0x58e4d:
+ db $59 ; movement
+ step_end
+
+UnknownText_0x58e4f:
+ text "Patterns appeared"
+ line "on the walls…"
+ done
+
+; possibly unused.. again?
+UnknownText_0x58e70:
+ text "It's UNOWN text!"
+ done
+
+UnknownText_0x58e81:
+ text "Patterns appeared"
+ line "on the walls…"
+ done
+
+UnknownText_0x58ea2:
+ text "There's a big hole"
+ line "in the wall!"
+ done
+
+UnknownText_0x58ec2:
+ text "It's a replica of"
+ line "an ancient #-"
+ cont "MON."
+ done
+
+UnknownText_0x58ee7:
+ text "This flying #-"
+ line "MON attacked its"
+
+ para "prey with saw-like"
+ line "fangs."
+ done
+
+RuinsOfAlphAerodactylChamber_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 5
+ warp_def $9, $3, 4, RUINS_OF_ALPH_OUTSIDE
+ warp_def $9, $4, 4, RUINS_OF_ALPH_OUTSIDE
+ warp_def $3, $3, 8, RUINS_OF_ALPH_INNER_CHAMBER
+ warp_def $3, $4, 9, RUINS_OF_ALPH_INNER_CHAMBER
+ warp_def $0, $4, 1, RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 6
+ bg_event 3, 2, BGEVENT_READ, MapRuinsOfAlphAerodactylChamberSignpost1Script
+ bg_event 3, 5, BGEVENT_READ, MapRuinsOfAlphAerodactylChamberSignpost1Script
+ bg_event 2, 3, BGEVENT_UP, MapRuinsOfAlphAerodactylChamberSignpost2Script
+ bg_event 2, 4, BGEVENT_UP, MapRuinsOfAlphAerodactylChamberSignpost3Script
+ bg_event 0, 3, BGEVENT_UP, MapRuinsOfAlphAerodactylChamberSignpost4Script
+ bg_event 0, 4, BGEVENT_UP, MapRuinsOfAlphAerodactylChamberSignpost5Script
+
+.ObjectEvents:
+ db 0
diff --git a/maps/RuinsOfAlphAerodactylItemRoom.asm b/maps/RuinsOfAlphAerodactylItemRoom.asm
new file mode 100644
index 000000000..56197802b
--- /dev/null
+++ b/maps/RuinsOfAlphAerodactylItemRoom.asm
@@ -0,0 +1,59 @@
+const_value set 2
+ const RUINSOFALPHAERODACTYLITEMROOM_POKE_BALL1
+ const RUINSOFALPHAERODACTYLITEMROOM_POKE_BALL2
+ const RUINSOFALPHAERODACTYLITEMROOM_POKE_BALL3
+ const RUINSOFALPHAERODACTYLITEMROOM_POKE_BALL4
+
+RuinsOfAlphAerodactylItemRoom_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+RuinsOfAlphAerodactylItemRoomGoldBerry:
+ itemball GOLD_BERRY
+
+RuinsOfAlphAerodactylItemRoomMoonStone:
+ itemball MOON_STONE
+
+RuinsOfAlphAerodactylItemRoomHealPowder:
+ itemball HEAL_POWDER
+
+RuinsOfAlphAerodactylItemRoomEnergyRoot:
+ itemball ENERGY_ROOT
+
+MapRuinsOfAlphAerodactylItemRoomSignpost1Script:
+ jumptext UnknownText_0x59ac1
+
+UnknownText_0x59ac1:
+ text "It's a replica of"
+ line "an ancient #-"
+ cont "MON."
+ done
+
+RuinsOfAlphAerodactylItemRoom_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 4
+ warp_def $9, $3, 5, RUINS_OF_ALPH_AERODACTYL_CHAMBER
+ warp_def $9, $4, 5, RUINS_OF_ALPH_AERODACTYL_CHAMBER
+ warp_def $1, $3, 1, RUINS_OF_ALPH_AERODACTYL_WORD_ROOM
+ warp_def $1, $4, 2, RUINS_OF_ALPH_AERODACTYL_WORD_ROOM
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 2
+ bg_event 1, 2, BGEVENT_READ, MapRuinsOfAlphAerodactylItemRoomSignpost1Script
+ bg_event 1, 5, BGEVENT_READ, MapRuinsOfAlphAerodactylItemRoomSignpost1Script
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_POKE_BALL, 6, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphAerodactylItemRoomGoldBerry, EVENT_PICKED_UP_GOLD_BERRY_FROM_AERODACTYL_ITEM_ROOM
+ object_event SPRITE_POKE_BALL, 6, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphAerodactylItemRoomMoonStone, EVENT_PICKED_UP_MOON_STONE_FROM_AERODACTYL_ITEM_ROOM
+ object_event SPRITE_POKE_BALL, 4, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphAerodactylItemRoomHealPowder, EVENT_PICKED_UP_HEAL_POWDER_FROM_AERODACTYL_ITEM_ROOM
+ object_event SPRITE_POKE_BALL, 4, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphAerodactylItemRoomEnergyRoot, EVENT_PICKED_UP_ENERGY_ROOT_FROM_AERODACTYL_ITEM_ROOM
diff --git a/maps/RuinsOfAlphAerodactylWordRoom.asm b/maps/RuinsOfAlphAerodactylWordRoom.asm
new file mode 100644
index 000000000..c31cc563b
--- /dev/null
+++ b/maps/RuinsOfAlphAerodactylWordRoom.asm
@@ -0,0 +1,25 @@
+RuinsOfAlphAerodactylWordRoom_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+RuinsOfAlphAerodactylWordRoom_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $5, $9, 3, RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM
+ warp_def $5, $a, 4, RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM
+ warp_def $b, $11, 8, RUINS_OF_ALPH_INNER_CHAMBER
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/RuinsofAlphAerodactylWordRoom.blk b/maps/RuinsOfAlphAerodactylWordRoom.blk
index fb849e6ad..fb849e6ad 100644
--- a/maps/RuinsofAlphAerodactylWordRoom.blk
+++ b/maps/RuinsOfAlphAerodactylWordRoom.blk
diff --git a/maps/RuinsOfAlphHoOhChamber.asm b/maps/RuinsOfAlphHoOhChamber.asm
new file mode 100644
index 000000000..ec334e397
--- /dev/null
+++ b/maps/RuinsOfAlphHoOhChamber.asm
@@ -0,0 +1,172 @@
+RuinsOfAlphHoOhChamber_MapScriptHeader:
+.SceneScripts:
+ db 2
+ scene_script .CheckWall
+ scene_script .DummyScene
+
+.MapCallbacks:
+ db 1
+ dbw MAPCALLBACK_TILES, .HiddenDoors
+
+.CheckWall:
+ special SpecialHoOhChamber
+ checkevent EVENT_WALL_OPENED_IN_HO_OH_CHAMBER
+ iftrue .OpenWall
+ end
+
+.OpenWall:
+ priorityjump .WallOpenScript
+ end
+
+.DummyScene:
+ end
+
+.HiddenDoors:
+ checkevent EVENT_WALL_OPENED_IN_HO_OH_CHAMBER
+ iftrue .WallOpen
+ changeblock $4, $0, $2e
+.WallOpen:
+ checkevent EVENT_SOLVED_HO_OH_PUZZLE
+ iffalse .FloorClosed
+ return
+
+.FloorClosed:
+ changeblock $2, $2, $1
+ changeblock $4, $2, $2
+ return
+
+.WallOpenScript:
+ pause 30
+ earthquake 30
+ showemote EMOTE_SHOCK, PLAYER, 20
+ pause 30
+ playsound SFX_STRENGTH
+ changeblock $4, $0, $30
+ reloadmappart
+ earthquake 50
+ setscene $1
+ closetext
+ end
+
+MapRuinsOfAlphHoOhChamberSignpost2Script:
+ refreshscreen $0
+ writebyte $3
+ special Special_UnownPuzzle
+ closetext
+ iftrue UnknownScript_0x585ba
+ end
+
+UnknownScript_0x585ba:
+ setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
+ setevent EVENT_SOLVED_HO_OH_PUZZLE
+ setflag ENGINE_UNLOCKED_UNOWNS_4
+ setmapscene RUINS_OF_ALPH_INNER_CHAMBER, $1
+ earthquake 30
+ showemote EMOTE_SHOCK, PLAYER, 15
+ changeblock $2, $2, $18
+ changeblock $4, $2, $19
+ reloadmappart
+ playsound SFX_STRENGTH
+ earthquake 80
+ applymovement PLAYER, MovementData_0x58610
+ playsound SFX_KINESIS
+ waitsfx
+ pause 20
+ warpcheck
+ end
+
+MapRuinsOfAlphHoOhChamberSignpost1Script:
+ jumptext UnknownText_0x58685
+
+MapRuinsOfAlphHoOhChamberSignpost3Script:
+ jumptext UnknownText_0x586aa
+
+MapRuinsOfAlphHoOhChamberSignpost4Script:
+ opentext
+ writetext UnknownText_0x58612
+ writebyte $3
+ special Special_DisplayUnownWords
+ closetext
+ end
+
+MapRuinsOfAlphHoOhChamberSignpost5Script:
+ checkevent EVENT_WALL_OPENED_IN_HO_OH_CHAMBER
+ iftrue UnknownScript_0x58609
+ opentext
+ writetext UnknownText_0x58644
+ writebyte $3
+ special Special_DisplayUnownWords
+ closetext
+ end
+
+UnknownScript_0x58609:
+ opentext
+ writetext UnknownText_0x58665
+ waitbutton
+ closetext
+ end
+
+MovementData_0x58610:
+ db $59 ; movement
+ step_end
+
+UnknownText_0x58612:
+ text "Patterns appeared"
+ line "on the walls…"
+ done
+
+; possibly unused
+UnknownText_0x58633:
+ text "It's UNOWN text!"
+ done
+
+UnknownText_0x58644:
+ text "Patterns appeared"
+ line "on the walls…"
+ done
+
+UnknownText_0x58665:
+ text "There's a big hole"
+ line "in the wall!"
+ done
+
+UnknownText_0x58685:
+ text "It's a replica of"
+ line "an ancient #-"
+ cont "MON."
+ done
+
+UnknownText_0x586aa:
+ text "A #MON that"
+ line "flew gracefully on"
+
+ para "rainbow-colored"
+ line "wings."
+ done
+
+RuinsOfAlphHoOhChamber_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 5
+ warp_def $9, $3, 1, RUINS_OF_ALPH_OUTSIDE
+ warp_def $9, $4, 1, RUINS_OF_ALPH_OUTSIDE
+ warp_def $3, $3, 2, RUINS_OF_ALPH_INNER_CHAMBER
+ warp_def $3, $4, 3, RUINS_OF_ALPH_INNER_CHAMBER
+ warp_def $0, $4, 1, RUINS_OF_ALPH_HO_OH_ITEM_ROOM
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 6
+ bg_event 3, 2, BGEVENT_READ, MapRuinsOfAlphHoOhChamberSignpost1Script
+ bg_event 3, 5, BGEVENT_READ, MapRuinsOfAlphHoOhChamberSignpost1Script
+ bg_event 2, 3, BGEVENT_UP, MapRuinsOfAlphHoOhChamberSignpost2Script
+ bg_event 2, 4, BGEVENT_UP, MapRuinsOfAlphHoOhChamberSignpost3Script
+ bg_event 0, 3, BGEVENT_UP, MapRuinsOfAlphHoOhChamberSignpost4Script
+ bg_event 0, 4, BGEVENT_UP, MapRuinsOfAlphHoOhChamberSignpost5Script
+
+.ObjectEvents:
+ db 0
diff --git a/maps/RuinsOfAlphHoOhItemRoom.asm b/maps/RuinsOfAlphHoOhItemRoom.asm
new file mode 100644
index 000000000..643dde195
--- /dev/null
+++ b/maps/RuinsOfAlphHoOhItemRoom.asm
@@ -0,0 +1,59 @@
+const_value set 2
+ const RUINSOFALPHHOOHITEMROOM_POKE_BALL1
+ const RUINSOFALPHHOOHITEMROOM_POKE_BALL2
+ const RUINSOFALPHHOOHITEMROOM_POKE_BALL3
+ const RUINSOFALPHHOOHITEMROOM_POKE_BALL4
+
+RuinsOfAlphHoOhItemRoom_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+RuinsOfAlphHoOhItemRoomGoldBerry:
+ itemball GOLD_BERRY
+
+RuinsOfAlphHoOhItemRoomMysteryberry:
+ itemball MYSTERYBERRY
+
+RuinsOfAlphHoOhItemRoomRevivalHerb:
+ itemball REVIVAL_HERB
+
+RuinsOfAlphHoOhItemRoomCharcoal:
+ itemball CHARCOAL
+
+MapRuinsOfAlphHoOhItemRoomSignpost1Script:
+ jumptext UnknownText_0x59923
+
+UnknownText_0x59923:
+ text "It's a replica of"
+ line "an ancient #-"
+ cont "MON."
+ done
+
+RuinsOfAlphHoOhItemRoom_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 4
+ warp_def $9, $3, 5, RUINS_OF_ALPH_HO_OH_CHAMBER
+ warp_def $9, $4, 5, RUINS_OF_ALPH_HO_OH_CHAMBER
+ warp_def $1, $3, 1, RUINS_OF_ALPH_HO_OH_WORD_ROOM
+ warp_def $1, $4, 2, RUINS_OF_ALPH_HO_OH_WORD_ROOM
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 2
+ bg_event 1, 2, BGEVENT_READ, MapRuinsOfAlphHoOhItemRoomSignpost1Script
+ bg_event 1, 5, BGEVENT_READ, MapRuinsOfAlphHoOhItemRoomSignpost1Script
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_POKE_BALL, 6, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphHoOhItemRoomGoldBerry, EVENT_PICKED_UP_GOLD_BERRY_FROM_HO_OH_ITEM_ROOM
+ object_event SPRITE_POKE_BALL, 6, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphHoOhItemRoomMysteryberry, EVENT_PICKED_UP_MYSTERYBERRY_FROM_HO_OH_ITEM_ROOM
+ object_event SPRITE_POKE_BALL, 4, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphHoOhItemRoomRevivalHerb, EVENT_PICKED_UP_REVIVAL_HERB_FROM_HO_OH_ITEM_ROOM
+ object_event SPRITE_POKE_BALL, 4, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphHoOhItemRoomCharcoal, EVENT_PICKED_UP_CHARCOAL_FROM_HO_OH_ITEM_ROOM
diff --git a/maps/RuinsOfAlphHoOhWordRoom.asm b/maps/RuinsOfAlphHoOhWordRoom.asm
new file mode 100644
index 000000000..059025e6b
--- /dev/null
+++ b/maps/RuinsOfAlphHoOhWordRoom.asm
@@ -0,0 +1,25 @@
+RuinsOfAlphHoOhWordRoom_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+RuinsOfAlphHoOhWordRoom_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $9, $9, 3, RUINS_OF_ALPH_HO_OH_ITEM_ROOM
+ warp_def $9, $a, 4, RUINS_OF_ALPH_HO_OH_ITEM_ROOM
+ warp_def $15, $11, 2, RUINS_OF_ALPH_INNER_CHAMBER
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/RuinsofAlphHoOhWordRoom.blk b/maps/RuinsOfAlphHoOhWordRoom.blk
index d15ce28f9..d15ce28f9 100644
--- a/maps/RuinsofAlphHoOhWordRoom.blk
+++ b/maps/RuinsOfAlphHoOhWordRoom.blk
diff --git a/maps/RuinsOfAlphInnerChamber.asm b/maps/RuinsOfAlphInnerChamber.asm
new file mode 100644
index 000000000..5fa6714a5
--- /dev/null
+++ b/maps/RuinsOfAlphInnerChamber.asm
@@ -0,0 +1,131 @@
+const_value set 2
+ const RUINSOFALPHINNERCHAMBER_FISHER
+ const RUINSOFALPHINNERCHAMBER_TEACHER
+ const RUINSOFALPHINNERCHAMBER_GRAMPS
+
+RuinsOfAlphInnerChamber_MapScriptHeader:
+.SceneScripts:
+ db 2
+ scene_script .DummyScene0
+ scene_script .UnownAppear
+
+.MapCallbacks:
+ db 0
+
+.DummyScene0:
+ end
+
+.UnownAppear:
+ priorityjump .StrangePresenceScript
+ end
+
+.StrangePresenceScript:
+ opentext
+ writetext RuinsOfAlphStrangePresenceText
+ waitbutton
+ closetext
+ setscene $0
+ setevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
+ clearevent EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_FISHER
+ end
+
+RuinsOfAlphInnerChamberFisherScript:
+ jumptextfaceplayer RuinsOfAlphInnerChamberFisherText
+
+RuinsOfAlphInnerChamberTeacherScript:
+ jumptextfaceplayer RuinsOfAlphInnerChamberTeacherText
+
+RuinsOfAlphInnerChamberGrampsScript:
+ jumptextfaceplayer RuinsOfAlphInnerChamberGrampsText
+
+RuinsOfAlphInnerChamberStatue:
+ jumptext RuinsOfAlphInnerChamberStatueText
+
+RuinsOfAlphStrangePresenceText:
+ text "There is a strange"
+ line "presence here…"
+ done
+
+RuinsOfAlphInnerChamberFisherText:
+ text "This is a big"
+ line "room, but there's"
+ cont "nothing here."
+ done
+
+RuinsOfAlphInnerChamberTeacherText:
+ text "This place has a"
+ line "mystical quality"
+ cont "to it."
+
+ para "It feels sort of"
+ line "ethereal even."
+ done
+
+RuinsOfAlphInnerChamberGrampsText:
+ text "Ancient buildings"
+ line "are often tombs of"
+ cont "kings."
+
+ para "Like the pyramids,"
+ line "for instance."
+ done
+
+RuinsOfAlphInnerChamberStatueText:
+ text "It's a replica of"
+ line "an ancient #-"
+ cont "MON."
+ done
+
+RuinsOfAlphInnerChamber_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 9
+ warp_def $d, $a, 5, RUINS_OF_ALPH_OUTSIDE
+ warp_def $f, $3, 3, RUINS_OF_ALPH_HO_OH_CHAMBER
+ warp_def $f, $4, 4, RUINS_OF_ALPH_HO_OH_CHAMBER
+ warp_def $3, $f, 3, RUINS_OF_ALPH_KABUTO_CHAMBER
+ warp_def $3, $10, 4, RUINS_OF_ALPH_KABUTO_CHAMBER
+ warp_def $15, $3, 3, RUINS_OF_ALPH_OMANYTE_CHAMBER
+ warp_def $15, $4, 4, RUINS_OF_ALPH_OMANYTE_CHAMBER
+ warp_def $18, $f, 3, RUINS_OF_ALPH_AERODACTYL_CHAMBER
+ warp_def $18, $10, 4, RUINS_OF_ALPH_AERODACTYL_CHAMBER
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 26
+ bg_event 3, 2, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 3, 5, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 3, 8, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 3, 11, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 3, 14, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 3, 17, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 8, 2, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 8, 5, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 8, 8, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 8, 11, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 8, 14, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 8, 17, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 13, 2, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 13, 17, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 18, 2, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 18, 5, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 18, 8, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 18, 11, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 18, 14, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 18, 17, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 24, 2, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 24, 5, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 24, 8, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 24, 11, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 24, 14, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+ bg_event 24, 17, BGEVENT_READ, RuinsOfAlphInnerChamberStatue
+
+.ObjectEvents:
+ db 3
+ object_event SPRITE_FISHER, 7, 3, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphInnerChamberFisherScript, EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
+ object_event SPRITE_TEACHER, 13, 14, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphInnerChamberTeacherScript, EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
+ object_event SPRITE_GRAMPS, 19, 11, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphInnerChamberGrampsScript, EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
diff --git a/maps/RuinsofAlphInnerChamber.blk b/maps/RuinsOfAlphInnerChamber.blk
index ee907fc5e..ee907fc5e 100644
--- a/maps/RuinsofAlphInnerChamber.blk
+++ b/maps/RuinsOfAlphInnerChamber.blk
diff --git a/maps/RuinsofAlphItemRoom.blk b/maps/RuinsOfAlphItemRoom.blk
index 54b53285d..54b53285d 100644
--- a/maps/RuinsofAlphItemRoom.blk
+++ b/maps/RuinsOfAlphItemRoom.blk
diff --git a/maps/RuinsOfAlphKabutoChamber.asm b/maps/RuinsOfAlphKabutoChamber.asm
new file mode 100644
index 000000000..15a9e90c4
--- /dev/null
+++ b/maps/RuinsOfAlphKabutoChamber.asm
@@ -0,0 +1,285 @@
+const_value set 2
+ const RUINSOFALPHKABUTOCHAMBER_RECEPTIONIST
+ const RUINSOFALPHKABUTOCHAMBER_SCIENTIST
+
+RuinsOfAlphKabutoChamber_MapScriptHeader:
+.SceneScripts:
+ db 2
+ scene_script .CheckWall
+ scene_script .DummyScene
+
+.MapCallbacks:
+ db 1
+ dbw MAPCALLBACK_TILES, .HiddenDoors
+
+.CheckWall:
+ checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
+ iftrue .OpenWall
+ end
+
+.OpenWall:
+ priorityjump .WallOpenScript
+ end
+
+.DummyScene:
+ end
+
+.HiddenDoors:
+ checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
+ iftrue .WallOpen
+ changeblock $4, $0, $2e
+.WallOpen:
+ checkevent EVENT_SOLVED_KABUTO_PUZZLE
+ iffalse .FloorClosed
+ return
+
+.FloorClosed:
+ changeblock $2, $2, $1
+ changeblock $4, $2, $2
+ return
+
+.WallOpenScript:
+ pause 30
+ earthquake 30
+ showemote EMOTE_SHOCK, PLAYER, 20
+ pause 30
+ playsound SFX_STRENGTH
+ changeblock $4, $0, $30
+ reloadmappart
+ earthquake 50
+ setscene $1
+ closetext
+ end
+
+RuinsOfAlphKabutoChamberReceptionistScript:
+ jumptextfaceplayer RuinsOfAlphKabutoChamberReceptionistText
+
+MapRuinsOfAlphKabutoChamberSignpost2Script:
+ refreshscreen $0
+ writebyte $0
+ special Special_UnownPuzzle
+ closetext
+ iftrue UnknownScript_0x58778
+ end
+
+UnknownScript_0x58778:
+ setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
+ setevent EVENT_SOLVED_KABUTO_PUZZLE
+ setflag ENGINE_UNLOCKED_UNOWNS_1
+ setevent EVENT_RUINS_OF_ALPH_KABUTO_CHAMBER_RECEPTIONIST
+ setmapscene RUINS_OF_ALPH_INNER_CHAMBER, $1
+ earthquake 30
+ showemote EMOTE_SHOCK, PLAYER, 15
+ changeblock $2, $2, $18
+ changeblock $4, $2, $19
+ reloadmappart
+ playsound SFX_STRENGTH
+ earthquake 80
+ applymovement PLAYER, MovementData_0x587fe
+ playsound SFX_KINESIS
+ waitsfx
+ pause 20
+ warpcheck
+ end
+
+ScientistScript_0x587a8:
+ faceplayer
+ opentext
+ checkcode VAR_UNOWNCOUNT
+ if_equal 26, UnknownScript_0x587cf
+ checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
+ iftrue UnknownScript_0x587c9
+ checkevent EVENT_SOLVED_KABUTO_PUZZLE
+ iffalse UnknownScript_0x587c0
+ writetext UnknownText_0x589b8
+ buttonsound
+UnknownScript_0x587c0:
+ writetext UnknownText_0x588f5
+ waitbutton
+ closetext
+ spriteface RUINSOFALPHKABUTOCHAMBER_SCIENTIST, UP
+ end
+
+UnknownScript_0x587c9:
+ writetext UnknownText_0x5897c
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x587cf:
+ writetext UnknownText_0x594cb
+ waitbutton
+ closetext
+ end
+
+MapRuinsOfAlphKabutoChamberSignpost1Script:
+ jumptext UnknownText_0x58b1a
+
+MapRuinsOfAlphKabutoChamberSignpost3Script:
+ jumptext UnknownText_0x58b3f
+
+MapRuinsOfAlphKabutoChamberSignpost4Script:
+ opentext
+ writetext UnknownText_0x58aa7
+ writebyte $0
+ special Special_DisplayUnownWords
+ closetext
+ end
+
+MapRuinsOfAlphKabutoChamberSignpost5Script:
+ checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
+ iftrue UnknownScript_0x587f7
+ opentext
+ writetext UnknownText_0x58ad9
+ writebyte $0
+ special Special_DisplayUnownWords
+ closetext
+ end
+
+UnknownScript_0x587f7:
+ opentext
+ writetext UnknownText_0x58afa
+ waitbutton
+ closetext
+ end
+
+MovementData_0x587fe:
+ db $59 ; movement
+ step_end
+
+RuinsOfAlphKabutoChamberReceptionistText:
+ text "Welcome to this"
+ line "chamber."
+
+ para "There are sliding"
+ line "panels that depict"
+
+ para "a #MON drawn by"
+ line "the ancients."
+
+ para "Slide the panels"
+ line "around to form the"
+ cont "picture."
+
+ para "To the right is a"
+ line "description of the"
+ cont "#MON."
+
+ para "Scientists in the"
+ line "back are examining"
+
+ para "some newly found"
+ line "patterns."
+ done
+
+UnknownText_0x588f5:
+ text "Recently, strange,"
+ line "cryptic patterns"
+ cont "have appeared."
+
+ para "It's odd. They"
+ line "weren't here a"
+ cont "little while ago…"
+
+ para "You should take a"
+ line "look at the walls."
+ done
+
+UnknownText_0x5897c:
+ text "Ah! Here's another"
+ line "huge hole!"
+
+ para "It's big enough to"
+ line "go through!"
+ done
+
+UnknownText_0x589b8:
+ text "That tremor was"
+ line "pretty scary!"
+
+ para "But I'm more"
+ line "concerned about"
+ cont "this wall here…"
+ done
+
+; possibly unused
+UnknownText_0x58a03:
+ text "The patterns on"
+ line "the wall appear to"
+ cont "be words!"
+
+ para "And those sliding"
+ line "stone panels seem"
+
+ para "to be signals of"
+ line "some kind."
+
+ para "I think they make"
+ line "#MON appear,"
+
+ para "but it's not clear"
+ line "yet…"
+ done
+
+UnknownText_0x58aa7:
+ text "Patterns appeared"
+ line "on the walls…"
+ done
+
+; possibly unused
+UnknownText_0x58ac8:
+ text "It's UNOWN text!"
+ done
+
+UnknownText_0x58ad9:
+ text "Patterns appeared"
+ line "on the walls…"
+ done
+
+UnknownText_0x58afa:
+ text "There's a big hole"
+ line "in the wall!"
+ done
+
+UnknownText_0x58b1a:
+ text "It's a replica of"
+ line "an ancient #-"
+ cont "MON."
+ done
+
+UnknownText_0x58b3f:
+ text "A #MON that hid"
+ line "on the sea floor."
+
+ para "Eyes on its back"
+ line "scanned the area."
+ done
+
+RuinsOfAlphKabutoChamber_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 5
+ warp_def $9, $3, 2, RUINS_OF_ALPH_OUTSIDE
+ warp_def $9, $4, 2, RUINS_OF_ALPH_OUTSIDE
+ warp_def $3, $3, 4, RUINS_OF_ALPH_INNER_CHAMBER
+ warp_def $3, $4, 5, RUINS_OF_ALPH_INNER_CHAMBER
+ warp_def $0, $4, 1, RUINS_OF_ALPH_KABUTO_ITEM_ROOM
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 6
+ bg_event 3, 2, BGEVENT_READ, MapRuinsOfAlphKabutoChamberSignpost1Script
+ bg_event 3, 5, BGEVENT_READ, MapRuinsOfAlphKabutoChamberSignpost1Script
+ bg_event 2, 3, BGEVENT_UP, MapRuinsOfAlphKabutoChamberSignpost2Script
+ bg_event 2, 4, BGEVENT_UP, MapRuinsOfAlphKabutoChamberSignpost3Script
+ bg_event 0, 3, BGEVENT_UP, MapRuinsOfAlphKabutoChamberSignpost4Script
+ bg_event 0, 4, BGEVENT_UP, MapRuinsOfAlphKabutoChamberSignpost5Script
+
+.ObjectEvents:
+ db 2
+ object_event SPRITE_RECEPTIONIST, 5, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphKabutoChamberReceptionistScript, EVENT_RUINS_OF_ALPH_KABUTO_CHAMBER_RECEPTIONIST
+ object_event SPRITE_SCIENTIST, 1, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ScientistScript_0x587a8, -1
diff --git a/maps/RuinsOfAlphKabutoItemRoom.asm b/maps/RuinsOfAlphKabutoItemRoom.asm
new file mode 100644
index 000000000..45afbcc45
--- /dev/null
+++ b/maps/RuinsOfAlphKabutoItemRoom.asm
@@ -0,0 +1,59 @@
+const_value set 2
+ const RUINSOFALPHKABUTOITEMROOM_POKE_BALL1
+ const RUINSOFALPHKABUTOITEMROOM_POKE_BALL2
+ const RUINSOFALPHKABUTOITEMROOM_POKE_BALL3
+ const RUINSOFALPHKABUTOITEMROOM_POKE_BALL4
+
+RuinsOfAlphKabutoItemRoom_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+RuinsOfAlphKabutoItemRoomBerry:
+ itemball BERRY
+
+RuinsOfAlphKabutoItemRoomPsncureberry:
+ itemball PSNCUREBERRY
+
+RuinsOfAlphKabutoItemRoomHealPowder:
+ itemball HEAL_POWDER
+
+RuinsOfAlphKabutoItemRoomEnergypowder:
+ itemball ENERGYPOWDER
+
+MapRuinsOfAlphKabutoItemRoomSignpost1Script:
+ jumptext UnknownText_0x599ad
+
+UnknownText_0x599ad:
+ text "It's a replica of"
+ line "an ancient #-"
+ cont "MON."
+ done
+
+RuinsOfAlphKabutoItemRoom_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 4
+ warp_def $9, $3, 5, RUINS_OF_ALPH_KABUTO_CHAMBER
+ warp_def $9, $4, 5, RUINS_OF_ALPH_KABUTO_CHAMBER
+ warp_def $1, $3, 1, RUINS_OF_ALPH_KABUTO_WORD_ROOM
+ warp_def $1, $4, 2, RUINS_OF_ALPH_KABUTO_WORD_ROOM
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 2
+ bg_event 1, 2, BGEVENT_READ, MapRuinsOfAlphKabutoItemRoomSignpost1Script
+ bg_event 1, 5, BGEVENT_READ, MapRuinsOfAlphKabutoItemRoomSignpost1Script
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_POKE_BALL, 6, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphKabutoItemRoomBerry, EVENT_PICKED_UP_BERRY_FROM_KABUTO_ITEM_ROOM
+ object_event SPRITE_POKE_BALL, 6, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphKabutoItemRoomPsncureberry, EVENT_PICKED_UP_PSNCUREBERRY_FROM_KABUTO_ITEM_ROOM
+ object_event SPRITE_POKE_BALL, 4, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphKabutoItemRoomHealPowder, EVENT_PICKED_UP_HEAL_POWDER_FROM_KABUTO_ITEM_ROOM
+ object_event SPRITE_POKE_BALL, 4, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphKabutoItemRoomEnergypowder, EVENT_PICKED_UP_ENERGYPOWDER_FROM_KABUTO_ITEM_ROOM
diff --git a/maps/RuinsOfAlphKabutoWordRoom.asm b/maps/RuinsOfAlphKabutoWordRoom.asm
new file mode 100644
index 000000000..f872baedb
--- /dev/null
+++ b/maps/RuinsOfAlphKabutoWordRoom.asm
@@ -0,0 +1,25 @@
+RuinsOfAlphKabutoWordRoom_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+RuinsOfAlphKabutoWordRoom_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $5, $9, 3, RUINS_OF_ALPH_KABUTO_ITEM_ROOM
+ warp_def $5, $a, 4, RUINS_OF_ALPH_KABUTO_ITEM_ROOM
+ warp_def $b, $11, 4, RUINS_OF_ALPH_INNER_CHAMBER
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/RuinsofAlphKabutoWordRoom.blk b/maps/RuinsOfAlphKabutoWordRoom.blk
index fb849e6ad..fb849e6ad 100644
--- a/maps/RuinsofAlphKabutoWordRoom.blk
+++ b/maps/RuinsOfAlphKabutoWordRoom.blk
diff --git a/maps/RuinsOfAlphOmanyteChamber.asm b/maps/RuinsOfAlphOmanyteChamber.asm
new file mode 100644
index 000000000..80ad32c32
--- /dev/null
+++ b/maps/RuinsOfAlphOmanyteChamber.asm
@@ -0,0 +1,172 @@
+RuinsOfAlphOmanyteChamber_MapScriptHeader:
+.SceneScripts:
+ db 2
+ scene_script .CheckWall
+ scene_script .DummyScene
+
+.MapCallbacks:
+ db 1
+ dbw MAPCALLBACK_TILES, .HiddenDoors
+
+.CheckWall:
+ special SpecialOmanyteChamber
+ checkevent EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER
+ iftrue .OpenWall
+ end
+
+.OpenWall:
+ priorityjump .WallOpenScript
+ end
+
+.DummyScene:
+ end
+
+.HiddenDoors:
+ checkevent EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER
+ iftrue .WallOpen
+ changeblock $4, $0, $2e
+.WallOpen:
+ checkevent EVENT_SOLVED_OMANYTE_PUZZLE
+ iffalse .FloorClosed
+ return
+
+.FloorClosed:
+ changeblock $2, $2, $1
+ changeblock $4, $2, $2
+ return
+
+.WallOpenScript:
+ pause 30
+ earthquake 30
+ showemote EMOTE_SHOCK, PLAYER, 20
+ pause 30
+ playsound SFX_STRENGTH
+ changeblock $4, $0, $30
+ reloadmappart
+ earthquake 50
+ setscene $1
+ closetext
+ end
+
+MapRuinsOfAlphOmanyteChamberSignpost2Script:
+ refreshscreen $0
+ writebyte $1
+ special Special_UnownPuzzle
+ closetext
+ iftrue UnknownScript_0x58c36
+ end
+
+UnknownScript_0x58c36:
+ setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
+ setevent EVENT_SOLVED_OMANYTE_PUZZLE
+ setflag ENGINE_UNLOCKED_UNOWNS_2
+ setmapscene RUINS_OF_ALPH_INNER_CHAMBER, $1
+ earthquake 30
+ showemote EMOTE_SHOCK, PLAYER, 15
+ changeblock $2, $2, $18
+ changeblock $4, $2, $19
+ reloadmappart
+ playsound SFX_STRENGTH
+ earthquake 80
+ applymovement PLAYER, MovementData_0x58c8c
+ playsound SFX_KINESIS
+ waitsfx
+ pause 20
+ warpcheck
+ end
+
+MapRuinsOfAlphOmanyteChamberSignpost1Script:
+ jumptext UnknownText_0x58d01
+
+MapRuinsOfAlphOmanyteChamberSignpost3Script:
+ jumptext UnknownText_0x58d26
+
+MapRuinsOfAlphOmanyteChamberSignpost4Script:
+ opentext
+ writetext UnknownText_0x58c8e
+ writebyte $2
+ special Special_DisplayUnownWords
+ closetext
+ end
+
+MapRuinsOfAlphOmanyteChamberSignpost5Script:
+ checkevent EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER
+ iftrue UnknownScript_0x58c85
+ opentext
+ writetext UnknownText_0x58cc0
+ writebyte $2
+ special Special_DisplayUnownWords
+ closetext
+ end
+
+UnknownScript_0x58c85:
+ opentext
+ writetext UnknownText_0x58ce1
+ waitbutton
+ closetext
+ end
+
+MovementData_0x58c8c:
+ db $59 ; movement
+ step_end
+
+UnknownText_0x58c8e:
+ text "Patterns appeared"
+ line "on the walls…"
+ done
+
+; possibly unused.. this again?
+UnknownText_0x58caf:
+ text "It's UNOWN text!"
+ done
+
+UnknownText_0x58cc0:
+ text "Patterns appeared"
+ line "on the walls…"
+ done
+
+UnknownText_0x58ce1:
+ text "There's a big hole"
+ line "in the wall!"
+ done
+
+UnknownText_0x58d01:
+ text "It's a replica of"
+ line "an ancient #-"
+ cont "MON."
+ done
+
+UnknownText_0x58d26:
+ text "This #MON"
+ line "drifted in the"
+
+ para "sea by twisting"
+ line "its ten tentacles."
+ done
+
+RuinsOfAlphOmanyteChamber_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 5
+ warp_def $9, $3, 3, RUINS_OF_ALPH_OUTSIDE
+ warp_def $9, $4, 3, RUINS_OF_ALPH_OUTSIDE
+ warp_def $3, $3, 6, RUINS_OF_ALPH_INNER_CHAMBER
+ warp_def $3, $4, 7, RUINS_OF_ALPH_INNER_CHAMBER
+ warp_def $0, $4, 1, RUINS_OF_ALPH_OMANYTE_ITEM_ROOM
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 6
+ bg_event 3, 2, BGEVENT_READ, MapRuinsOfAlphOmanyteChamberSignpost1Script
+ bg_event 3, 5, BGEVENT_READ, MapRuinsOfAlphOmanyteChamberSignpost1Script
+ bg_event 2, 3, BGEVENT_UP, MapRuinsOfAlphOmanyteChamberSignpost2Script
+ bg_event 2, 4, BGEVENT_UP, MapRuinsOfAlphOmanyteChamberSignpost3Script
+ bg_event 0, 3, BGEVENT_UP, MapRuinsOfAlphOmanyteChamberSignpost4Script
+ bg_event 0, 4, BGEVENT_UP, MapRuinsOfAlphOmanyteChamberSignpost5Script
+
+.ObjectEvents:
+ db 0
diff --git a/maps/RuinsOfAlphOmanyteItemRoom.asm b/maps/RuinsOfAlphOmanyteItemRoom.asm
new file mode 100644
index 000000000..0f3eb7e16
--- /dev/null
+++ b/maps/RuinsOfAlphOmanyteItemRoom.asm
@@ -0,0 +1,59 @@
+const_value set 2
+ const RUINSOFALPHOMANYTEITEMROOM_POKE_BALL1
+ const RUINSOFALPHOMANYTEITEMROOM_POKE_BALL2
+ const RUINSOFALPHOMANYTEITEMROOM_POKE_BALL3
+ const RUINSOFALPHOMANYTEITEMROOM_POKE_BALL4
+
+RuinsOfAlphOmanyteItemRoom_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+RuinsOfAlphOmanyteItemRoomMysteryberry:
+ itemball MYSTERYBERRY
+
+RuinsOfAlphOmanyteItemRoomMysticWater:
+ itemball MYSTIC_WATER
+
+RuinsOfAlphOmanyteItemRoomStardust:
+ itemball STARDUST
+
+RuinsOfAlphOmanyteItemRoomStarPiece:
+ itemball STAR_PIECE
+
+MapRuinsOfAlphOmanyteItemRoomSignpost1Script:
+ jumptext UnknownText_0x59a37
+
+UnknownText_0x59a37:
+ text "It's a replica of"
+ line "an ancient #-"
+ cont "MON."
+ done
+
+RuinsOfAlphOmanyteItemRoom_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 4
+ warp_def $9, $3, 5, RUINS_OF_ALPH_OMANYTE_CHAMBER
+ warp_def $9, $4, 5, RUINS_OF_ALPH_OMANYTE_CHAMBER
+ warp_def $1, $3, 1, RUINS_OF_ALPH_OMANYTE_WORD_ROOM
+ warp_def $1, $4, 2, RUINS_OF_ALPH_OMANYTE_WORD_ROOM
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 2
+ bg_event 1, 2, BGEVENT_READ, MapRuinsOfAlphOmanyteItemRoomSignpost1Script
+ bg_event 1, 5, BGEVENT_READ, MapRuinsOfAlphOmanyteItemRoomSignpost1Script
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_POKE_BALL, 6, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphOmanyteItemRoomMysteryberry, EVENT_PICKED_UP_MYSTERYBERRY_FROM_OMANYTE_ITEM_ROOM
+ object_event SPRITE_POKE_BALL, 6, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphOmanyteItemRoomMysticWater, EVENT_PICKED_UP_MYSTIC_WATER_FROM_OMANYTE_ITEM_ROOM
+ object_event SPRITE_POKE_BALL, 4, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphOmanyteItemRoomStardust, EVENT_PICKED_UP_STARDUST_FROM_OMANYTE_ITEM_ROOM
+ object_event SPRITE_POKE_BALL, 4, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphOmanyteItemRoomStarPiece, EVENT_PICKED_UP_STAR_PIECE_FROM_OMANYTE_ITEM_ROOM
diff --git a/maps/RuinsOfAlphOmanyteWordRoom.asm b/maps/RuinsOfAlphOmanyteWordRoom.asm
new file mode 100644
index 000000000..205e7575d
--- /dev/null
+++ b/maps/RuinsOfAlphOmanyteWordRoom.asm
@@ -0,0 +1,25 @@
+RuinsOfAlphOmanyteWordRoom_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+RuinsOfAlphOmanyteWordRoom_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $9, 3, RUINS_OF_ALPH_OMANYTE_ITEM_ROOM
+ warp_def $7, $a, 4, RUINS_OF_ALPH_OMANYTE_ITEM_ROOM
+ warp_def $d, $11, 6, RUINS_OF_ALPH_INNER_CHAMBER
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/RuinsofAlphOmanyteWordRoom.blk b/maps/RuinsOfAlphOmanyteWordRoom.blk
index 16c0b72b5..16c0b72b5 100644
--- a/maps/RuinsofAlphOmanyteWordRoom.blk
+++ b/maps/RuinsOfAlphOmanyteWordRoom.blk
diff --git a/maps/RuinsOfAlphOutside.asm b/maps/RuinsOfAlphOutside.asm
new file mode 100644
index 000000000..8e6ecf49b
--- /dev/null
+++ b/maps/RuinsOfAlphOutside.asm
@@ -0,0 +1,320 @@
+const_value set 2
+ const RUINSOFALPHOUTSIDE_YOUNGSTER1
+ const RUINSOFALPHOUTSIDE_SCIENTIST
+ const RUINSOFALPHOUTSIDE_FISHER
+ const RUINSOFALPHOUTSIDE_YOUNGSTER2
+ const RUINSOFALPHOUTSIDE_YOUNGSTER3
+
+RuinsOfAlphOutside_MapScriptHeader:
+.SceneScripts:
+ db 2
+ scene_script .DummyScene0
+ scene_script .DummyScene1
+
+.MapCallbacks:
+ db 1
+ dbw MAPCALLBACK_OBJECTS, .ScientistCallback
+
+.DummyScene0:
+ end
+
+.DummyScene1:
+ end
+
+.ScientistCallback:
+ checkflag ENGINE_UNOWN_DEX
+ iftrue .NoScientist
+ checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
+ iftrue .MaybeScientist
+ jump .NoScientist
+
+.MaybeScientist:
+ checkcode VAR_UNOWNCOUNT
+ if_greater_than $2, .YesScientist
+ jump .NoScientist
+
+.YesScientist:
+ appear RUINSOFALPHOUTSIDE_SCIENTIST
+ setscene $1
+ return
+
+.NoScientist:
+ disappear RUINSOFALPHOUTSIDE_SCIENTIST
+ setscene $0
+ return
+
+RuinsOfAlphOutsideScientistScene1:
+ spriteface RUINSOFALPHOUTSIDE_SCIENTIST, UP
+ spriteface PLAYER, DOWN
+ jump UnknownScript_0x58044
+
+RuinsOfAlphOutsideScientistScene2:
+ spriteface RUINSOFALPHOUTSIDE_SCIENTIST, LEFT
+ spriteface PLAYER, RIGHT
+ jump UnknownScript_0x58044
+
+ScientistScript_0x58043:
+ faceplayer
+UnknownScript_0x58044:
+ opentext
+ writetext UnknownText_0x580c7
+ waitbutton
+ closetext
+ playmusic MUSIC_SHOW_ME_AROUND
+ follow RUINSOFALPHOUTSIDE_SCIENTIST, PLAYER
+ applymovement RUINSOFALPHOUTSIDE_SCIENTIST, MovementData_0x580ba
+ disappear RUINSOFALPHOUTSIDE_SCIENTIST
+ stopfollow
+ applymovement PLAYER, MovementData_0x580c5
+ setmapscene RUINS_OF_ALPH_RESEARCH_CENTER, $1
+ warpcheck
+ end
+
+FisherScript_0x58061:
+ faceplayer
+ opentext
+ checkevent EVENT_TALKED_TO_RUINS_COWARD
+ iftrue .Next
+ setevent EVENT_TALKED_TO_RUINS_COWARD
+ writetext UnknownText_0x583a4
+ buttonsound
+.Next:
+ writetext UnknownText_0x58420
+ waitbutton
+ closetext
+ end
+
+YoungsterScript_0x58076:
+ faceplayer
+ opentext
+ writetext UnknownText_0x58449
+ waitbutton
+ closetext
+ end
+
+YoungsterScript_0x5807e:
+ faceplayer
+ opentext
+ writetext UnknownText_0x5848e
+ waitbutton
+ closetext
+ spriteface RUINSOFALPHOUTSIDE_YOUNGSTER3, UP
+ end
+
+TrainerPsychicNathan:
+ trainer EVENT_BEAT_PSYCHIC_NATHAN, PSYCHIC_T, NATHAN, PsychicNathanSeenText, PsychicNathanBeatenText, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext PsychicNathanAfterBattleText
+ waitbutton
+ closetext
+ end
+
+
+TrainerSuperNerdStan:
+ trainer EVENT_BEAT_SUPER_NERD_STAN, SUPER_NERD, STAN, UnknownText_0x581e5, UnknownText_0x58217, 0, .Script
+
+.Script:
+ end_if_just_battled
+ opentext
+ writetext SuperNerdStanAfterBattleText
+ waitbutton
+ closetext
+ end
+
+
+RuinsOfAlphOutsideSignpost0Script:
+ jumptext UnknownText_0x58325
+
+RuinsOfAlphOutsideSignpost1Script:
+ jumptext UnknownText_0x58342
+
+RuinsOfAlphOutsideSignpost2Script:
+ jumptext UnknownText_0x58362
+
+MovementData_0x580ba:
+ step RIGHT
+ step RIGHT
+ step RIGHT
+ step RIGHT
+ step UP
+ step UP
+ step RIGHT
+ step RIGHT
+ step UP
+ step UP
+ step_end
+
+MovementData_0x580c5:
+ step UP
+ step_end
+
+UnknownText_0x580c7:
+ text "Hm? That's a #-"
+ line "DEX, isn't it?"
+ cont "May I see it?"
+
+ para "There are so many"
+ line "kinds of #MON."
+
+ para "Hm? What's this?"
+
+ para "What is this"
+ line "#MON?"
+
+ para "It looks like the"
+ line "strange writing on"
+
+ para "the walls of the"
+ line "RUINS."
+
+ para "If those drawings"
+ line "are really #-"
+ cont "MON, there should"
+ cont "be many more."
+
+ para "I know! Let me up-"
+ line "grade your #-"
+ cont "DEX. Follow me."
+ done
+
+UnknownText_0x581e5:
+ text "What do you want?"
+ line "I'm studying--"
+ cont "don't disturb me!"
+ done
+
+UnknownText_0x58217:
+ text "Sorry…"
+ line "I'm frustrated by"
+
+ para "our lack of real"
+ line "understanding…"
+ done
+
+SuperNerdStanAfterBattleText:
+ text "The RUINS are from"
+ line "about 1500 years"
+ cont "ago."
+
+ para "Nobody knows who"
+ line "built them."
+
+ para "It's also not"
+ line "known if the #-"
+ cont "MON statues have"
+ cont "any meaning."
+
+ para "It's all one big"
+ line "mystery…"
+ done
+
+PsychicNathanSeenText:
+ text "Hmmm… This is a"
+ line "strange place."
+ done
+
+PsychicNathanBeatenText:
+ text "…"
+ done
+
+PsychicNathanAfterBattleText:
+ text "I like thinking"
+ line "here."
+ done
+
+UnknownText_0x58325:
+ text "MYSTERY STONE"
+ line "PANEL CHAMBER"
+ done
+
+UnknownText_0x58342:
+ text "RUINS OF ALPH"
+ line "VISITORS WELCOME"
+ done
+
+UnknownText_0x58362:
+ text "RUINS OF ALPH"
+ line "RESEARCH CENTER"
+
+ para "THE AUTHORITY ON"
+ line "THE RUINS OF ALPH"
+ done
+
+UnknownText_0x583a4:
+ text "While exploring"
+ line "the RUINS, we"
+
+ para "suddenly noticed"
+ line "an odd presence."
+
+ para "We all got scared"
+ line "and ran away."
+
+ para "You should be"
+ line "careful too."
+ done
+
+UnknownText_0x58420:
+ text "The RUINS hide a"
+ line "huge secret!"
+
+ para "…I think…"
+ done
+
+UnknownText_0x58449:
+ text "There are many"
+ line "kinds of UNOWN, so"
+
+ para "we use them for"
+ line "our secret codes."
+ done
+
+UnknownText_0x5848e:
+ text "A… H… E… A… D…"
+ line "Hmm…"
+
+ para "What?"
+
+ para "I'm decoding this"
+ line "message!"
+ done
+
+RuinsOfAlphOutside_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 11
+ warp_def $11, $2, 1, RUINS_OF_ALPH_HO_OH_CHAMBER
+ warp_def $7, $e, 1, RUINS_OF_ALPH_KABUTO_CHAMBER
+ warp_def $1d, $2, 1, RUINS_OF_ALPH_OMANYTE_CHAMBER
+ warp_def $21, $10, 1, RUINS_OF_ALPH_AERODACTYL_CHAMBER
+ warp_def $d, $a, 1, RUINS_OF_ALPH_INNER_CHAMBER
+ warp_def $b, $11, 1, RUINS_OF_ALPH_RESEARCH_CENTER
+ warp_def $13, $6, 1, UNION_CAVE_B1F
+ warp_def $1b, $6, 2, UNION_CAVE_B1F
+ warp_def $5, $7, 3, ROUTE_36_RUINS_OF_ALPH_GATE
+ warp_def $14, $d, 1, ROUTE_32_RUINS_OF_ALPH_GATE
+ warp_def $15, $d, 2, ROUTE_32_RUINS_OF_ALPH_GATE
+
+.CoordEvents:
+ db 2
+ coord_event 1, $e, $b, RuinsOfAlphOutsideScientistScene1
+ coord_event 1, $f, $a, RuinsOfAlphOutsideScientistScene2
+
+.BGEvents:
+ db 3
+ bg_event 8, 16, BGEVENT_READ, RuinsOfAlphOutsideSignpost0Script
+ bg_event 16, 12, BGEVENT_READ, RuinsOfAlphOutsideSignpost1Script
+ bg_event 12, 18, BGEVENT_READ, RuinsOfAlphOutsideSignpost2Script
+
+.ObjectEvents:
+ db 5
+ object_event SPRITE_YOUNGSTER, 20, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 1, TrainerPsychicNathan, -1
+ object_event SPRITE_SCIENTIST, 15, 11, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ScientistScript_0x58043, EVENT_RUINS_OF_ALPH_OUTSIDE_SCIENTIST
+ object_event SPRITE_FISHER, 17, 13, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, FisherScript_0x58061, EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_FISHER
+ object_event SPRITE_YOUNGSTER, 11, 14, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x58076, EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_YOUNGSTERS
+ object_event SPRITE_YOUNGSTER, 8, 12, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, YoungsterScript_0x5807e, EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_YOUNGSTERS
diff --git a/maps/RuinsofAlphOutside.blk b/maps/RuinsOfAlphOutside.blk
index fd834deae..fd834deae 100644
--- a/maps/RuinsofAlphOutside.blk
+++ b/maps/RuinsOfAlphOutside.blk
diff --git a/maps/RuinsofAlphPuzzleChamber.blk b/maps/RuinsOfAlphPuzzleChamber.blk
index 6560787d3..6560787d3 100644
--- a/maps/RuinsofAlphPuzzleChamber.blk
+++ b/maps/RuinsOfAlphPuzzleChamber.blk
diff --git a/maps/RuinsOfAlphResearchCenter.asm b/maps/RuinsOfAlphResearchCenter.asm
new file mode 100644
index 000000000..f4b62563a
--- /dev/null
+++ b/maps/RuinsOfAlphResearchCenter.asm
@@ -0,0 +1,417 @@
+const_value set 2
+ const RUINSOFALPHRESEARCHCENTER_SCIENTIST1
+ const RUINSOFALPHRESEARCHCENTER_SCIENTIST2
+ const RUINSOFALPHRESEARCHCENTER_SCIENTIST3
+
+RuinsOfAlphResearchCenter_MapScriptHeader:
+.SceneScripts:
+ db 2
+ scene_script .DummyScene0
+ scene_script .GetUnownDex
+
+.MapCallbacks:
+ db 1
+ dbw MAPCALLBACK_OBJECTS, .ScientistCallback
+
+.DummyScene0:
+ end
+
+.GetUnownDex:
+ priorityjump .GetUnownDexScript
+ end
+
+.ScientistCallback:
+ checkscene
+ if_equal $1, .ShowScientist
+ return
+
+.ShowScientist:
+ moveobject RUINSOFALPHRESEARCHCENTER_SCIENTIST3, $3, $7
+ appear RUINSOFALPHRESEARCHCENTER_SCIENTIST3
+ return
+
+.GetUnownDexScript:
+ applymovement RUINSOFALPHRESEARCHCENTER_SCIENTIST3, MovementData_0x5926f
+ playsound SFX_BOOT_PC
+ pause 60
+ playsound SFX_SWITCH_POKEMON
+ pause 30
+ playsound SFX_TALLY
+ pause 30
+ playsound SFX_TRANSACTION
+ pause 30
+ spriteface RUINSOFALPHRESEARCHCENTER_SCIENTIST3, DOWN
+ opentext
+ writetext UnknownText_0x59278
+ waitbutton
+ closetext
+ applymovement RUINSOFALPHRESEARCHCENTER_SCIENTIST3, MovementData_0x59274
+ opentext
+ writetext UnknownText_0x592fa
+ playsound SFX_ITEM
+ waitsfx
+ setflag ENGINE_UNOWN_DEX
+ writetext UnknownText_0x59311
+ waitbutton
+ closetext
+ applymovement RUINSOFALPHRESEARCHCENTER_SCIENTIST3, MovementData_0x59276
+ setscene $0
+ special RestartMapMusic
+ end
+
+ScientistScript_0x591d1:
+ faceplayer
+ opentext
+ checkcode VAR_UNOWNCOUNT
+ if_equal 26, UnknownScript_0x591df
+ writetext UnknownText_0x59311
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x591df:
+ writetext UnknownText_0x5935f
+ waitbutton
+ closetext
+ end
+
+ScientistScript_0x591e5:
+ faceplayer
+ opentext
+ checkcode VAR_UNOWNCOUNT
+ if_equal 26, UnknownScript_0x5920b
+ checkflag ENGINE_UNOWN_DEX
+ iftrue UnknownScript_0x59205
+ checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
+ iftrue UnknownScript_0x591ff
+ writetext UnknownText_0x593ed
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x591ff:
+ writetext UnknownText_0x59478
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x59205:
+ writetext UnknownText_0x59445
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x5920b:
+ writetext UnknownText_0x594cb
+ waitbutton
+ closetext
+ clearevent EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_YOUNGSTERS
+ end
+
+ScientistScript_0x59214:
+ faceplayer
+ opentext
+ checkcode VAR_UNOWNCOUNT
+ if_equal 26, UnknownScript_0x5922e
+ checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
+ iftrue UnknownScript_0x59228
+ writetext UnknownText_0x5954f
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x59228:
+ writetext UnknownText_0x595cb
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x5922e:
+ writetext UnknownText_0x59769
+ waitbutton
+ closetext
+ end
+
+MapRuinsOfAlphResearchCenterSignpost1Script:
+ opentext
+ checkevent EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST
+ iftrue UnknownScript_0x59241
+ checkcode VAR_UNOWNCOUNT
+ if_equal 26, UnknownScript_0x59247
+UnknownScript_0x59241:
+ writetext UnknownText_0x597b6
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x59247:
+ writetext UnknownText_0x597d9
+ waitbutton
+ closetext
+ end
+
+MapRuinsOfAlphResearchCenterSignpost2Script:
+ opentext
+ checkevent EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST
+ iftrue UnknownScript_0x5925a
+ checkcode VAR_UNOWNCOUNT
+ if_equal 26, UnknownScript_0x59260
+UnknownScript_0x5925a:
+ writetext UnknownText_0x5980e
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x59260:
+ writetext UnknownText_0x5982d
+ waitbutton
+ special Special_UnownPrinter
+ closetext
+ end
+
+UnknownScript_0x59269:
+ jumptext UnknownText_0x59848
+
+MapRuinsOfAlphResearchCenterSignpost0Script:
+ jumptext UnknownText_0x59886
+
+MovementData_0x5926f:
+ step UP
+ step UP
+ step LEFT
+ turn_head UP
+ step_end
+
+MovementData_0x59274:
+ step DOWN
+ step_end
+
+MovementData_0x59276:
+ step UP
+ step_end
+
+UnknownText_0x59278:
+ text "Done!"
+
+ para "I modified your"
+ line "#DEX."
+
+ para "I added an"
+ line "optional #DEX"
+
+ para "to store UNOWN"
+ line "data."
+
+ para "It records them in"
+ line "the sequence that"
+ cont "they were caught."
+ done
+
+UnknownText_0x592fa:
+ text "<PLAYER>'s #DEX"
+ line "was upgraded."
+ done
+
+UnknownText_0x59311:
+ text "The UNOWN you"
+ line "catch will all be"
+ cont "recorded."
+
+ para "Check to see how"
+ line "many kinds exist."
+ done
+
+UnknownText_0x5935f:
+ text "You caught all the"
+ line "UNOWN variations?"
+
+ para "That's a great"
+ line "achievement!"
+
+ para "I've set up the"
+ line "printer here for"
+ cont "handling UNOWN."
+
+ para "Feel free to use"
+ line "it anytime."
+ done
+
+UnknownText_0x593ed:
+ text "The RUINS are"
+ line "about 1500 years"
+ cont "old."
+
+ para "But it's not known"
+ line "why they were"
+ cont "built--or by whom."
+ done
+
+UnknownText_0x59445:
+ text "I wonder how many"
+ line "kinds of #MON"
+ cont "are in the RUINS?"
+ done
+
+UnknownText_0x59478:
+ text "#MON appeared"
+ line "in the RUINS?"
+
+ para "That's incredible"
+ line "news!"
+
+ para "We'll need to"
+ line "investigate this."
+ done
+
+UnknownText_0x594cb:
+ text "Our investigation,"
+ line "with your help, is"
+
+ para "giving us insight"
+ line "into the RUINS."
+
+ para "The RUINS appear"
+ line "to have been built"
+
+ para "as a habitat for"
+ line "#MON."
+ done
+
+UnknownText_0x5954f:
+ text "There are odd pat-"
+ line "terns drawn on the"
+
+ para "walls of the"
+ line "RUINS."
+
+ para "They must be the"
+ line "keys for unravel-"
+ cont "ing the mystery"
+ cont "of the RUINS."
+ done
+
+UnknownText_0x595cb:
+ text "The strange #-"
+ line "MON you saw in the"
+ cont "RUINS?"
+
+ para "They appear to be"
+ line "very much like the"
+
+ para "drawings on the"
+ line "walls there."
+
+ para "Hmm…"
+
+ para "That must mean"
+ line "there are many"
+ cont "kinds of them…"
+ done
+
+; possibly unused
+UnknownText_0x59669:
+ text "We think something"
+ line "caused the cryptic"
+
+ para "patterns to appear"
+ line "in the RUINS."
+
+ para "We've focused our"
+ line "studies on that."
+ done
+
+; possibly unused
+UnknownText_0x596d3:
+ text "According to my"
+ line "research…"
+
+ para "Those mysterious"
+ line "patterns appeared"
+
+ para "when the #COM"
+ line "CENTER was built."
+
+ para "It must mean that"
+ line "radio waves have"
+
+ para "some sort of a"
+ line "link…"
+ done
+
+UnknownText_0x59769:
+ text "Why did those"
+ line "ancient patterns"
+
+ para "appear on the wall"
+ line "now?"
+
+ para "The mystery"
+ line "deepens…"
+ done
+
+UnknownText_0x597b6:
+ text "RUINS OF ALPH"
+
+ para "Exploration"
+ line "Year 10"
+ done
+
+UnknownText_0x597d9:
+ text "Mystery #MON"
+ line "Name: UNOWN"
+
+ para "A total of 26"
+ line "kinds found."
+ done
+
+UnknownText_0x5980e:
+ text "This doesn't seem"
+ line "to work yet."
+ done
+
+UnknownText_0x5982d:
+ text "UNOWN may be"
+ line "printed out."
+ done
+
+; possibly unused
+UnknownText_0x59848:
+ text "It's a photo of"
+ line "the RESEARCH"
+
+ para "CENTER'S founder,"
+ line "PROF.SILKTREE."
+ done
+
+UnknownText_0x59886:
+ text "There are many"
+ line "academic books."
+
+ para "Ancient Ruins…"
+ line "Mysteries of the"
+ cont "Ancients…"
+ done
+
+RuinsOfAlphResearchCenter_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 2
+ warp_def $7, $2, 6, RUINS_OF_ALPH_OUTSIDE
+ warp_def $7, $3, 6, RUINS_OF_ALPH_OUTSIDE
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 3
+ bg_event 5, 6, BGEVENT_READ, MapRuinsOfAlphResearchCenterSignpost0Script
+ bg_event 4, 3, BGEVENT_READ, MapRuinsOfAlphResearchCenterSignpost1Script
+ bg_event 1, 7, BGEVENT_READ, MapRuinsOfAlphResearchCenterSignpost2Script
+
+.ObjectEvents:
+ db 3
+ object_event SPRITE_SCIENTIST, 5, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ScientistScript_0x591e5, -1
+ object_event SPRITE_SCIENTIST, 2, 5, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ScientistScript_0x59214, -1
+ object_event SPRITE_SCIENTIST, 5, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ScientistScript_0x591d1, EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST
diff --git a/maps/RuinsofAlphResearchCenter.blk b/maps/RuinsOfAlphResearchCenter.blk
index 051b60237..051b60237 100644
--- a/maps/RuinsofAlphResearchCenter.blk
+++ b/maps/RuinsOfAlphResearchCenter.blk
diff --git a/maps/RuinsofAlphAerodactylChamber.asm b/maps/RuinsofAlphAerodactylChamber.asm
deleted file mode 100644
index 2106a7504..000000000
--- a/maps/RuinsofAlphAerodactylChamber.asm
+++ /dev/null
@@ -1,176 +0,0 @@
-RuinsofAlphAerodactylChamber_MapScriptHeader:
-.MapTriggers:
- db 2
-
- ; triggers
- dw UnknownScript_0x58dad, 0
- dw UnknownScript_0x58db8, 0
-
-.MapCallbacks:
- db 1
-
- ; callbacks
-
- dbw MAPCALLBACK_TILES, UnknownScript_0x58db9
-
-UnknownScript_0x58dad:
- checkevent EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER
- iftrue UnknownScript_0x58db4
- end
-
-UnknownScript_0x58db4:
- priorityjump UnknownScript_0x58dd3
- end
-
-UnknownScript_0x58db8:
- end
-
-UnknownScript_0x58db9:
- checkevent EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER
- iftrue UnknownScript_0x58dc3
- changeblock $4, $0, $2e
-UnknownScript_0x58dc3:
- checkevent EVENT_SOLVED_AERODACTYL_PUZZLE
- iffalse UnknownScript_0x58dca
- return
-
-UnknownScript_0x58dca:
- changeblock $2, $2, $1
- changeblock $4, $2, $2
- return
-
-UnknownScript_0x58dd3:
- pause 30
- earthquake 30
- showemote EMOTE_SHOCK, PLAYER, 20
- pause 30
- playsound SFX_STRENGTH
- changeblock $4, $0, $30
- reloadmappart
- earthquake 50
- dotrigger $1
- closetext
- end
-
-MapRuinsofAlphAerodactylChamberSignpost2Script:
- refreshscreen $0
- writebyte $2
- special Special_UnownPuzzle
- closetext
- iftrue UnknownScript_0x58df7
- end
-
-UnknownScript_0x58df7:
- setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
- setevent EVENT_SOLVED_AERODACTYL_PUZZLE
- setflag ENGINE_UNLOCKED_UNOWNS_3
- domaptrigger RUINS_OF_ALPH_INNER_CHAMBER, $1
- earthquake 30
- showemote EMOTE_SHOCK, PLAYER, 15
- changeblock $2, $2, $18
- changeblock $4, $2, $19
- reloadmappart
- playsound SFX_STRENGTH
- earthquake 80
- applymovement PLAYER, MovementData_0x58e4d
- playsound SFX_KINESIS
- waitsfx
- pause 20
- warpcheck
- end
-
-MapRuinsofAlphAerodactylChamberSignpost1Script:
- jumptext UnknownText_0x58ec2
-
-MapRuinsofAlphAerodactylChamberSignpost3Script:
- jumptext UnknownText_0x58ee7
-
-MapRuinsofAlphAerodactylChamberSignpost4Script:
- opentext
- writetext UnknownText_0x58e4f
- writebyte $1
- special Special_DisplayUnownWords
- closetext
- end
-
-MapRuinsofAlphAerodactylChamberSignpost5Script:
- checkevent EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER
- iftrue UnknownScript_0x58e46
- opentext
- writetext UnknownText_0x58e81
- writebyte $1
- special Special_DisplayUnownWords
- closetext
- end
-
-UnknownScript_0x58e46:
- opentext
- writetext UnknownText_0x58ea2
- waitbutton
- closetext
- end
-
-MovementData_0x58e4d:
- db $59 ; movement
- step_end
-
-UnknownText_0x58e4f:
- text "Patterns appeared"
- line "on the walls…"
- done
-
-; possibly unused.. again?
-UnknownText_0x58e70:
- text "It's UNOWN text!"
- done
-
-UnknownText_0x58e81:
- text "Patterns appeared"
- line "on the walls…"
- done
-
-UnknownText_0x58ea2:
- text "There's a big hole"
- line "in the wall!"
- done
-
-UnknownText_0x58ec2:
- text "It's a replica of"
- line "an ancient #-"
- cont "MON."
- done
-
-UnknownText_0x58ee7:
- text "This flying #-"
- line "MON attacked its"
-
- para "prey with saw-like"
- line "fangs."
- done
-
-RuinsofAlphAerodactylChamber_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 5
- warp_def $9, $3, 4, RUINS_OF_ALPH_OUTSIDE
- warp_def $9, $4, 4, RUINS_OF_ALPH_OUTSIDE
- warp_def $3, $3, 8, RUINS_OF_ALPH_INNER_CHAMBER
- warp_def $3, $4, 9, RUINS_OF_ALPH_INNER_CHAMBER
- warp_def $0, $4, 1, RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 6
- signpost 3, 2, SIGNPOST_READ, MapRuinsofAlphAerodactylChamberSignpost1Script
- signpost 3, 5, SIGNPOST_READ, MapRuinsofAlphAerodactylChamberSignpost1Script
- signpost 2, 3, SIGNPOST_UP, MapRuinsofAlphAerodactylChamberSignpost2Script
- signpost 2, 4, SIGNPOST_UP, MapRuinsofAlphAerodactylChamberSignpost3Script
- signpost 0, 3, SIGNPOST_UP, MapRuinsofAlphAerodactylChamberSignpost4Script
- signpost 0, 4, SIGNPOST_UP, MapRuinsofAlphAerodactylChamberSignpost5Script
-
-.PersonEvents:
- db 0
diff --git a/maps/RuinsofAlphAerodactylItemRoom.asm b/maps/RuinsofAlphAerodactylItemRoom.asm
deleted file mode 100644
index 5f9d5c9f0..000000000
--- a/maps/RuinsofAlphAerodactylItemRoom.asm
+++ /dev/null
@@ -1,59 +0,0 @@
-const_value set 2
- const RUINSOFALPHAERODACTYLITEMROOM_POKE_BALL1
- const RUINSOFALPHAERODACTYLITEMROOM_POKE_BALL2
- const RUINSOFALPHAERODACTYLITEMROOM_POKE_BALL3
- const RUINSOFALPHAERODACTYLITEMROOM_POKE_BALL4
-
-RuinsofAlphAerodactylItemRoom_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-RuinsofAlphAerodactylItemRoomGoldBerry:
- itemball GOLD_BERRY
-
-RuinsofAlphAerodactylItemRoomMoonStone:
- itemball MOON_STONE
-
-RuinsofAlphAerodactylItemRoomHealPowder:
- itemball HEAL_POWDER
-
-RuinsofAlphAerodactylItemRoomEnergyRoot:
- itemball ENERGY_ROOT
-
-MapRuinsofAlphAerodactylItemRoomSignpost1Script:
- jumptext UnknownText_0x59ac1
-
-UnknownText_0x59ac1:
- text "It's a replica of"
- line "an ancient #-"
- cont "MON."
- done
-
-RuinsofAlphAerodactylItemRoom_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 4
- warp_def $9, $3, 5, RUINS_OF_ALPH_AERODACTYL_CHAMBER
- warp_def $9, $4, 5, RUINS_OF_ALPH_AERODACTYL_CHAMBER
- warp_def $1, $3, 1, RUINS_OF_ALPH_AERODACTYL_WORD_ROOM
- warp_def $1, $4, 2, RUINS_OF_ALPH_AERODACTYL_WORD_ROOM
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 2
- signpost 1, 2, SIGNPOST_READ, MapRuinsofAlphAerodactylItemRoomSignpost1Script
- signpost 1, 5, SIGNPOST_READ, MapRuinsofAlphAerodactylItemRoomSignpost1Script
-
-.PersonEvents:
- db 4
- person_event SPRITE_POKE_BALL, 6, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphAerodactylItemRoomGoldBerry, EVENT_PICKED_UP_GOLD_BERRY_FROM_AERODACTYL_ITEM_ROOM
- person_event SPRITE_POKE_BALL, 6, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphAerodactylItemRoomMoonStone, EVENT_PICKED_UP_MOON_STONE_FROM_AERODACTYL_ITEM_ROOM
- person_event SPRITE_POKE_BALL, 4, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphAerodactylItemRoomHealPowder, EVENT_PICKED_UP_HEAL_POWDER_FROM_AERODACTYL_ITEM_ROOM
- person_event SPRITE_POKE_BALL, 4, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphAerodactylItemRoomEnergyRoot, EVENT_PICKED_UP_ENERGY_ROOT_FROM_AERODACTYL_ITEM_ROOM
diff --git a/maps/RuinsofAlphAerodactylWordRoom.asm b/maps/RuinsofAlphAerodactylWordRoom.asm
deleted file mode 100644
index e79ca5c21..000000000
--- a/maps/RuinsofAlphAerodactylWordRoom.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-RuinsofAlphAerodactylWordRoom_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-RuinsofAlphAerodactylWordRoom_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $5, $9, 3, RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM
- warp_def $5, $a, 4, RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM
- warp_def $b, $11, 8, RUINS_OF_ALPH_INNER_CHAMBER
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/RuinsofAlphHoOhChamber.asm b/maps/RuinsofAlphHoOhChamber.asm
deleted file mode 100644
index 7df42fad2..000000000
--- a/maps/RuinsofAlphHoOhChamber.asm
+++ /dev/null
@@ -1,177 +0,0 @@
-RuinsofAlphHoOhChamber_MapScriptHeader:
-.MapTriggers:
- db 2
-
- ; triggers
- dw UnknownScript_0x5856d, 0
- dw UnknownScript_0x5857b, 0
-
-.MapCallbacks:
- db 1
-
- ; callbacks
-
- dbw MAPCALLBACK_TILES, UnknownScript_0x5857c
-
-UnknownScript_0x5856d:
- special SpecialHoOhChamber
- checkevent EVENT_WALL_OPENED_IN_HO_OH_CHAMBER
- iftrue UnknownScript_0x58577
- end
-
-UnknownScript_0x58577:
- priorityjump UnknownScript_0x58596
- end
-
-UnknownScript_0x5857b:
- end
-
-UnknownScript_0x5857c:
- checkevent EVENT_WALL_OPENED_IN_HO_OH_CHAMBER
- iftrue UnknownScript_0x58586
- changeblock $4, $0, $2e
-UnknownScript_0x58586:
- checkevent EVENT_SOLVED_HO_OH_PUZZLE
- iffalse UnknownScript_0x5858d
- return
-
-UnknownScript_0x5858d:
- changeblock $2, $2, $1
- changeblock $4, $2, $2
- return
-
-UnknownScript_0x58596:
- pause 30
- earthquake 30
- showemote EMOTE_SHOCK, PLAYER, 20
- pause 30
- playsound SFX_STRENGTH
- changeblock $4, $0, $30
- reloadmappart
- earthquake 50
- dotrigger $1
- closetext
- end
-
-MapRuinsofAlphHoOhChamberSignpost2Script:
- refreshscreen $0
- writebyte $3
- special Special_UnownPuzzle
- closetext
- iftrue UnknownScript_0x585ba
- end
-
-UnknownScript_0x585ba:
- setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
- setevent EVENT_SOLVED_HO_OH_PUZZLE
- setflag ENGINE_UNLOCKED_UNOWNS_4
- domaptrigger RUINS_OF_ALPH_INNER_CHAMBER, $1
- earthquake 30
- showemote EMOTE_SHOCK, PLAYER, 15
- changeblock $2, $2, $18
- changeblock $4, $2, $19
- reloadmappart
- playsound SFX_STRENGTH
- earthquake 80
- applymovement PLAYER, MovementData_0x58610
- playsound SFX_KINESIS
- waitsfx
- pause 20
- warpcheck
- end
-
-MapRuinsofAlphHoOhChamberSignpost1Script:
- jumptext UnknownText_0x58685
-
-MapRuinsofAlphHoOhChamberSignpost3Script:
- jumptext UnknownText_0x586aa
-
-MapRuinsofAlphHoOhChamberSignpost4Script:
- opentext
- writetext UnknownText_0x58612
- writebyte $3
- special Special_DisplayUnownWords
- closetext
- end
-
-MapRuinsofAlphHoOhChamberSignpost5Script:
- checkevent EVENT_WALL_OPENED_IN_HO_OH_CHAMBER
- iftrue UnknownScript_0x58609
- opentext
- writetext UnknownText_0x58644
- writebyte $3
- special Special_DisplayUnownWords
- closetext
- end
-
-UnknownScript_0x58609:
- opentext
- writetext UnknownText_0x58665
- waitbutton
- closetext
- end
-
-MovementData_0x58610:
- db $59 ; movement
- step_end
-
-UnknownText_0x58612:
- text "Patterns appeared"
- line "on the walls…"
- done
-
-; possibly unused
-UnknownText_0x58633:
- text "It's UNOWN text!"
- done
-
-UnknownText_0x58644:
- text "Patterns appeared"
- line "on the walls…"
- done
-
-UnknownText_0x58665:
- text "There's a big hole"
- line "in the wall!"
- done
-
-UnknownText_0x58685:
- text "It's a replica of"
- line "an ancient #-"
- cont "MON."
- done
-
-UnknownText_0x586aa:
- text "A #MON that"
- line "flew gracefully on"
-
- para "rainbow-colored"
- line "wings."
- done
-
-RuinsofAlphHoOhChamber_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 5
- warp_def $9, $3, 1, RUINS_OF_ALPH_OUTSIDE
- warp_def $9, $4, 1, RUINS_OF_ALPH_OUTSIDE
- warp_def $3, $3, 2, RUINS_OF_ALPH_INNER_CHAMBER
- warp_def $3, $4, 3, RUINS_OF_ALPH_INNER_CHAMBER
- warp_def $0, $4, 1, RUINS_OF_ALPH_HO_OH_ITEM_ROOM
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 6
- signpost 3, 2, SIGNPOST_READ, MapRuinsofAlphHoOhChamberSignpost1Script
- signpost 3, 5, SIGNPOST_READ, MapRuinsofAlphHoOhChamberSignpost1Script
- signpost 2, 3, SIGNPOST_UP, MapRuinsofAlphHoOhChamberSignpost2Script
- signpost 2, 4, SIGNPOST_UP, MapRuinsofAlphHoOhChamberSignpost3Script
- signpost 0, 3, SIGNPOST_UP, MapRuinsofAlphHoOhChamberSignpost4Script
- signpost 0, 4, SIGNPOST_UP, MapRuinsofAlphHoOhChamberSignpost5Script
-
-.PersonEvents:
- db 0
diff --git a/maps/RuinsofAlphHoOhItemRoom.asm b/maps/RuinsofAlphHoOhItemRoom.asm
deleted file mode 100644
index 85e988ce5..000000000
--- a/maps/RuinsofAlphHoOhItemRoom.asm
+++ /dev/null
@@ -1,59 +0,0 @@
-const_value set 2
- const RUINSOFALPHHOOHITEMROOM_POKE_BALL1
- const RUINSOFALPHHOOHITEMROOM_POKE_BALL2
- const RUINSOFALPHHOOHITEMROOM_POKE_BALL3
- const RUINSOFALPHHOOHITEMROOM_POKE_BALL4
-
-RuinsofAlphHoOhItemRoom_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-RuinsofAlphHoOhItemRoomGoldBerry:
- itemball GOLD_BERRY
-
-RuinsofAlphHoOhItemRoomMysteryberry:
- itemball MYSTERYBERRY
-
-RuinsofAlphHoOhItemRoomRevivalHerb:
- itemball REVIVAL_HERB
-
-RuinsofAlphHoOhItemRoomCharcoal:
- itemball CHARCOAL
-
-MapRuinsofAlphHoOhItemRoomSignpost1Script:
- jumptext UnknownText_0x59923
-
-UnknownText_0x59923:
- text "It's a replica of"
- line "an ancient #-"
- cont "MON."
- done
-
-RuinsofAlphHoOhItemRoom_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 4
- warp_def $9, $3, 5, RUINS_OF_ALPH_HO_OH_CHAMBER
- warp_def $9, $4, 5, RUINS_OF_ALPH_HO_OH_CHAMBER
- warp_def $1, $3, 1, RUINS_OF_ALPH_HO_OH_WORD_ROOM
- warp_def $1, $4, 2, RUINS_OF_ALPH_HO_OH_WORD_ROOM
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 2
- signpost 1, 2, SIGNPOST_READ, MapRuinsofAlphHoOhItemRoomSignpost1Script
- signpost 1, 5, SIGNPOST_READ, MapRuinsofAlphHoOhItemRoomSignpost1Script
-
-.PersonEvents:
- db 4
- person_event SPRITE_POKE_BALL, 6, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphHoOhItemRoomGoldBerry, EVENT_PICKED_UP_GOLD_BERRY_FROM_HO_OH_ITEM_ROOM
- person_event SPRITE_POKE_BALL, 6, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphHoOhItemRoomMysteryberry, EVENT_PICKED_UP_MYSTERYBERRY_FROM_HO_OH_ITEM_ROOM
- person_event SPRITE_POKE_BALL, 4, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphHoOhItemRoomRevivalHerb, EVENT_PICKED_UP_REVIVAL_HERB_FROM_HO_OH_ITEM_ROOM
- person_event SPRITE_POKE_BALL, 4, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphHoOhItemRoomCharcoal, EVENT_PICKED_UP_CHARCOAL_FROM_HO_OH_ITEM_ROOM
diff --git a/maps/RuinsofAlphHoOhWordRoom.asm b/maps/RuinsofAlphHoOhWordRoom.asm
deleted file mode 100644
index e0d35fa14..000000000
--- a/maps/RuinsofAlphHoOhWordRoom.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-RuinsofAlphHoOhWordRoom_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-RuinsofAlphHoOhWordRoom_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $9, $9, 3, RUINS_OF_ALPH_HO_OH_ITEM_ROOM
- warp_def $9, $a, 4, RUINS_OF_ALPH_HO_OH_ITEM_ROOM
- warp_def $15, $11, 2, RUINS_OF_ALPH_INNER_CHAMBER
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/RuinsofAlphInnerChamber.asm b/maps/RuinsofAlphInnerChamber.asm
deleted file mode 100644
index 1f900da9e..000000000
--- a/maps/RuinsofAlphInnerChamber.asm
+++ /dev/null
@@ -1,135 +0,0 @@
-const_value set 2
- const RUINSOFALPHINNERCHAMBER_FISHER
- const RUINSOFALPHINNERCHAMBER_TEACHER
- const RUINSOFALPHINNERCHAMBER_GRAMPS
-
-RuinsofAlphInnerChamber_MapScriptHeader:
-.MapTriggers:
- db 2
-
- ; triggers
- dw UnknownScript_0x58f69, 0
- dw UnknownScript_0x58f6a, 0
-
-.MapCallbacks:
- db 0
-
-UnknownScript_0x58f69:
- end
-
-UnknownScript_0x58f6a:
- priorityjump UnknownScript_0x58f6e
-
-UnknownScript_0x58f6d:
- end
-
-UnknownScript_0x58f6e:
- opentext
- writetext UnknownText_0x58f89
- waitbutton
- closetext
- dotrigger $0
- setevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
- clearevent EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_FISHER
- end
-
-FisherScript_0x58f7d:
- jumptextfaceplayer UnknownText_0x58fac
-
-TeacherScript_0x58f80:
- jumptextfaceplayer UnknownText_0x58fda
-
-GrampsScript_0x58f83:
- jumptextfaceplayer UnknownText_0x59024
-
-MapRuinsofAlphInnerChamberSignpost25Script:
- jumptext UnknownText_0x59072
-
-UnknownText_0x58f89:
- text "There is a strange"
- line "presence here…"
- done
-
-UnknownText_0x58fac:
- text "This is a big"
- line "room, but there's"
- cont "nothing here."
- done
-
-UnknownText_0x58fda:
- text "This place has a"
- line "mystical quality"
- cont "to it."
-
- para "It feels sort of"
- line "ethereal even."
- done
-
-UnknownText_0x59024:
- text "Ancient buildings"
- line "are often tombs of"
- cont "kings."
-
- para "Like the pyramids,"
- line "for instance."
- done
-
-UnknownText_0x59072:
- text "It's a replica of"
- line "an ancient #-"
- cont "MON."
- done
-
-RuinsofAlphInnerChamber_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 9
- warp_def $d, $a, 5, RUINS_OF_ALPH_OUTSIDE
- warp_def $f, $3, 3, RUINS_OF_ALPH_HO_OH_CHAMBER
- warp_def $f, $4, 4, RUINS_OF_ALPH_HO_OH_CHAMBER
- warp_def $3, $f, 3, RUINS_OF_ALPH_KABUTO_CHAMBER
- warp_def $3, $10, 4, RUINS_OF_ALPH_KABUTO_CHAMBER
- warp_def $15, $3, 3, RUINS_OF_ALPH_OMANYTE_CHAMBER
- warp_def $15, $4, 4, RUINS_OF_ALPH_OMANYTE_CHAMBER
- warp_def $18, $f, 3, RUINS_OF_ALPH_AERODACTYL_CHAMBER
- warp_def $18, $10, 4, RUINS_OF_ALPH_AERODACTYL_CHAMBER
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 26
- signpost 3, 2, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 3, 5, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 3, 8, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 3, 11, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 3, 14, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 3, 17, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 8, 2, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 8, 5, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 8, 8, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 8, 11, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 8, 14, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 8, 17, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 13, 2, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 13, 17, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 18, 2, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 18, 5, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 18, 8, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 18, 11, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 18, 14, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 18, 17, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 24, 2, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 24, 5, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 24, 8, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 24, 11, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 24, 14, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
- signpost 24, 17, SIGNPOST_READ, MapRuinsofAlphInnerChamberSignpost25Script
-
-.PersonEvents:
- db 3
- person_event SPRITE_FISHER, 7, 3, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FisherScript_0x58f7d, EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
- person_event SPRITE_TEACHER, 13, 14, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TeacherScript_0x58f80, EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
- person_event SPRITE_GRAMPS, 19, 11, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, GrampsScript_0x58f83, EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
diff --git a/maps/RuinsofAlphKabutoChamber.asm b/maps/RuinsofAlphKabutoChamber.asm
deleted file mode 100644
index c46daa6f3..000000000
--- a/maps/RuinsofAlphKabutoChamber.asm
+++ /dev/null
@@ -1,292 +0,0 @@
-const_value set 2
- const RUINSOFALPHKABUTOCHAMBER_RECEPTIONIST
- const RUINSOFALPHKABUTOCHAMBER_SCIENTIST
-
-RuinsofAlphKabutoChamber_MapScriptHeader:
-.MapTriggers:
- db 2
-
- ; triggers
- dw UnknownScript_0x5872b, 0
- dw UnknownScript_0x58736, 0
-
-.MapCallbacks:
- db 1
-
- ; callbacks
-
- dbw MAPCALLBACK_TILES, UnknownScript_0x58737
-
-UnknownScript_0x5872b:
- checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
- iftrue UnknownScript_0x58732
- end
-
-UnknownScript_0x58732:
- priorityjump UnknownScript_0x58751
-
-UnknownScript_0x58735:
- end
-
-UnknownScript_0x58736:
- end
-
-UnknownScript_0x58737:
- checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
- iftrue UnknownScript_0x58741
- changeblock $4, $0, $2e
-UnknownScript_0x58741:
- checkevent EVENT_SOLVED_KABUTO_PUZZLE
- iffalse UnknownScript_0x58748
- return
-
-UnknownScript_0x58748:
- changeblock $2, $2, $1
- changeblock $4, $2, $2
- return
-
-UnknownScript_0x58751:
- pause 30
- earthquake 30
- showemote EMOTE_SHOCK, PLAYER, 20
- pause 30
- playsound SFX_STRENGTH
- changeblock $4, $0, $30
- reloadmappart
- earthquake 50
- dotrigger $1
- closetext
- end
-
-ReceptionistScript_0x58769:
- jumptextfaceplayer UnknownText_0x58800
-
-MapRuinsofAlphKabutoChamberSignpost2Script:
- refreshscreen $0
- writebyte $0
- special Special_UnownPuzzle
- closetext
- iftrue UnknownScript_0x58778
- end
-
-UnknownScript_0x58778:
- setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
- setevent EVENT_SOLVED_KABUTO_PUZZLE
- setflag ENGINE_UNLOCKED_UNOWNS_1
- setevent EVENT_RUINS_OF_ALPH_KABUTO_CHAMBER_RECEPTIONIST
- domaptrigger RUINS_OF_ALPH_INNER_CHAMBER, $1
- earthquake 30
- showemote EMOTE_SHOCK, PLAYER, 15
- changeblock $2, $2, $18
- changeblock $4, $2, $19
- reloadmappart
- playsound SFX_STRENGTH
- earthquake 80
- applymovement PLAYER, MovementData_0x587fe
- playsound SFX_KINESIS
- waitsfx
- pause 20
- warpcheck
- end
-
-ScientistScript_0x587a8:
- faceplayer
- opentext
- checkcode VAR_UNOWNCOUNT
- if_equal 26, UnknownScript_0x587cf
- checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
- iftrue UnknownScript_0x587c9
- checkevent EVENT_SOLVED_KABUTO_PUZZLE
- iffalse UnknownScript_0x587c0
- writetext UnknownText_0x589b8
- buttonsound
-UnknownScript_0x587c0:
- writetext UnknownText_0x588f5
- waitbutton
- closetext
- spriteface RUINSOFALPHKABUTOCHAMBER_SCIENTIST, UP
- end
-
-UnknownScript_0x587c9:
- writetext UnknownText_0x5897c
- waitbutton
- closetext
- end
-
-UnknownScript_0x587cf:
- writetext UnknownText_0x594cb
- waitbutton
- closetext
- end
-
-MapRuinsofAlphKabutoChamberSignpost1Script:
- jumptext UnknownText_0x58b1a
-
-MapRuinsofAlphKabutoChamberSignpost3Script:
- jumptext UnknownText_0x58b3f
-
-MapRuinsofAlphKabutoChamberSignpost4Script:
- opentext
- writetext UnknownText_0x58aa7
- writebyte $0
- special Special_DisplayUnownWords
- closetext
- end
-
-MapRuinsofAlphKabutoChamberSignpost5Script:
- checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
- iftrue UnknownScript_0x587f7
- opentext
- writetext UnknownText_0x58ad9
- writebyte $0
- special Special_DisplayUnownWords
- closetext
- end
-
-UnknownScript_0x587f7:
- opentext
- writetext UnknownText_0x58afa
- waitbutton
- closetext
- end
-
-MovementData_0x587fe:
- db $59 ; movement
- step_end
-
-UnknownText_0x58800:
- text "Welcome to this"
- line "chamber."
-
- para "There are sliding"
- line "panels that depict"
-
- para "a #MON drawn by"
- line "the ancients."
-
- para "Slide the panels"
- line "around to form the"
- cont "picture."
-
- para "To the right is a"
- line "description of the"
- cont "#MON."
-
- para "Scientists in the"
- line "back are examining"
-
- para "some newly found"
- line "patterns."
- done
-
-UnknownText_0x588f5:
- text "Recently, strange,"
- line "cryptic patterns"
- cont "have appeared."
-
- para "It's odd. They"
- line "weren't here a"
- cont "little while ago…"
-
- para "You should take a"
- line "look at the walls."
- done
-
-UnknownText_0x5897c:
- text "Ah! Here's another"
- line "huge hole!"
-
- para "It's big enough to"
- line "go through!"
- done
-
-UnknownText_0x589b8:
- text "That tremor was"
- line "pretty scary!"
-
- para "But I'm more"
- line "concerned about"
- cont "this wall here…"
- done
-
-; possibly unused
-UnknownText_0x58a03:
- text "The patterns on"
- line "the wall appear to"
- cont "be words!"
-
- para "And those sliding"
- line "stone panels seem"
-
- para "to be signals of"
- line "some kind."
-
- para "I think they make"
- line "#MON appear,"
-
- para "but it's not clear"
- line "yet…"
- done
-
-UnknownText_0x58aa7:
- text "Patterns appeared"
- line "on the walls…"
- done
-
-; possibly unused
-UnknownText_0x58ac8:
- text "It's UNOWN text!"
- done
-
-UnknownText_0x58ad9:
- text "Patterns appeared"
- line "on the walls…"
- done
-
-UnknownText_0x58afa:
- text "There's a big hole"
- line "in the wall!"
- done
-
-UnknownText_0x58b1a:
- text "It's a replica of"
- line "an ancient #-"
- cont "MON."
- done
-
-UnknownText_0x58b3f:
- text "A #MON that hid"
- line "on the sea floor."
-
- para "Eyes on its back"
- line "scanned the area."
- done
-
-RuinsofAlphKabutoChamber_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 5
- warp_def $9, $3, 2, RUINS_OF_ALPH_OUTSIDE
- warp_def $9, $4, 2, RUINS_OF_ALPH_OUTSIDE
- warp_def $3, $3, 4, RUINS_OF_ALPH_INNER_CHAMBER
- warp_def $3, $4, 5, RUINS_OF_ALPH_INNER_CHAMBER
- warp_def $0, $4, 1, RUINS_OF_ALPH_KABUTO_ITEM_ROOM
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 6
- signpost 3, 2, SIGNPOST_READ, MapRuinsofAlphKabutoChamberSignpost1Script
- signpost 3, 5, SIGNPOST_READ, MapRuinsofAlphKabutoChamberSignpost1Script
- signpost 2, 3, SIGNPOST_UP, MapRuinsofAlphKabutoChamberSignpost2Script
- signpost 2, 4, SIGNPOST_UP, MapRuinsofAlphKabutoChamberSignpost3Script
- signpost 0, 3, SIGNPOST_UP, MapRuinsofAlphKabutoChamberSignpost4Script
- signpost 0, 4, SIGNPOST_UP, MapRuinsofAlphKabutoChamberSignpost5Script
-
-.PersonEvents:
- db 2
- person_event SPRITE_RECEPTIONIST, 5, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ReceptionistScript_0x58769, EVENT_RUINS_OF_ALPH_KABUTO_CHAMBER_RECEPTIONIST
- person_event SPRITE_SCIENTIST, 1, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ScientistScript_0x587a8, -1
diff --git a/maps/RuinsofAlphKabutoItemRoom.asm b/maps/RuinsofAlphKabutoItemRoom.asm
deleted file mode 100644
index 8b839efd9..000000000
--- a/maps/RuinsofAlphKabutoItemRoom.asm
+++ /dev/null
@@ -1,59 +0,0 @@
-const_value set 2
- const RUINSOFALPHKABUTOITEMROOM_POKE_BALL1
- const RUINSOFALPHKABUTOITEMROOM_POKE_BALL2
- const RUINSOFALPHKABUTOITEMROOM_POKE_BALL3
- const RUINSOFALPHKABUTOITEMROOM_POKE_BALL4
-
-RuinsofAlphKabutoItemRoom_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-RuinsofAlphKabutoItemRoomBerry:
- itemball BERRY
-
-RuinsofAlphKabutoItemRoomPsncureberry:
- itemball PSNCUREBERRY
-
-RuinsofAlphKabutoItemRoomHealPowder:
- itemball HEAL_POWDER
-
-RuinsofAlphKabutoItemRoomEnergypowder:
- itemball ENERGYPOWDER
-
-MapRuinsofAlphKabutoItemRoomSignpost1Script:
- jumptext UnknownText_0x599ad
-
-UnknownText_0x599ad:
- text "It's a replica of"
- line "an ancient #-"
- cont "MON."
- done
-
-RuinsofAlphKabutoItemRoom_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 4
- warp_def $9, $3, 5, RUINS_OF_ALPH_KABUTO_CHAMBER
- warp_def $9, $4, 5, RUINS_OF_ALPH_KABUTO_CHAMBER
- warp_def $1, $3, 1, RUINS_OF_ALPH_KABUTO_WORD_ROOM
- warp_def $1, $4, 2, RUINS_OF_ALPH_KABUTO_WORD_ROOM
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 2
- signpost 1, 2, SIGNPOST_READ, MapRuinsofAlphKabutoItemRoomSignpost1Script
- signpost 1, 5, SIGNPOST_READ, MapRuinsofAlphKabutoItemRoomSignpost1Script
-
-.PersonEvents:
- db 4
- person_event SPRITE_POKE_BALL, 6, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphKabutoItemRoomBerry, EVENT_PICKED_UP_BERRY_FROM_KABUTO_ITEM_ROOM
- person_event SPRITE_POKE_BALL, 6, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphKabutoItemRoomPsncureberry, EVENT_PICKED_UP_PSNCUREBERRY_FROM_KABUTO_ITEM_ROOM
- person_event SPRITE_POKE_BALL, 4, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphKabutoItemRoomHealPowder, EVENT_PICKED_UP_HEAL_POWDER_FROM_KABUTO_ITEM_ROOM
- person_event SPRITE_POKE_BALL, 4, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphKabutoItemRoomEnergypowder, EVENT_PICKED_UP_ENERGYPOWDER_FROM_KABUTO_ITEM_ROOM
diff --git a/maps/RuinsofAlphKabutoWordRoom.asm b/maps/RuinsofAlphKabutoWordRoom.asm
deleted file mode 100644
index 8d754f657..000000000
--- a/maps/RuinsofAlphKabutoWordRoom.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-RuinsofAlphKabutoWordRoom_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-RuinsofAlphKabutoWordRoom_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $5, $9, 3, RUINS_OF_ALPH_KABUTO_ITEM_ROOM
- warp_def $5, $a, 4, RUINS_OF_ALPH_KABUTO_ITEM_ROOM
- warp_def $b, $11, 4, RUINS_OF_ALPH_INNER_CHAMBER
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/RuinsofAlphOmanyteChamber.asm b/maps/RuinsofAlphOmanyteChamber.asm
deleted file mode 100644
index 5b5864d2f..000000000
--- a/maps/RuinsofAlphOmanyteChamber.asm
+++ /dev/null
@@ -1,177 +0,0 @@
-RuinsofAlphOmanyteChamber_MapScriptHeader:
-.MapTriggers:
- db 2
-
- ; triggers
- dw UnknownScript_0x58be9, 0
- dw UnknownScript_0x58bf7, 0
-
-.MapCallbacks:
- db 1
-
- ; callbacks
-
- dbw MAPCALLBACK_TILES, UnknownScript_0x58bf8
-
-UnknownScript_0x58be9:
- special SpecialOmanyteChamber
- checkevent EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER
- iftrue UnknownScript_0x58bf3
- end
-
-UnknownScript_0x58bf3:
- priorityjump UnknownScript_0x58c12
- end
-
-UnknownScript_0x58bf7:
- end
-
-UnknownScript_0x58bf8:
- checkevent EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER
- iftrue UnknownScript_0x58c02
- changeblock $4, $0, $2e
-UnknownScript_0x58c02:
- checkevent EVENT_SOLVED_OMANYTE_PUZZLE
- iffalse UnknownScript_0x58c09
- return
-
-UnknownScript_0x58c09:
- changeblock $2, $2, $1
- changeblock $4, $2, $2
- return
-
-UnknownScript_0x58c12:
- pause 30
- earthquake 30
- showemote EMOTE_SHOCK, PLAYER, 20
- pause 30
- playsound SFX_STRENGTH
- changeblock $4, $0, $30
- reloadmappart
- earthquake 50
- dotrigger $1
- closetext
- end
-
-MapRuinsofAlphOmanyteChamberSignpost2Script:
- refreshscreen $0
- writebyte $1
- special Special_UnownPuzzle
- closetext
- iftrue UnknownScript_0x58c36
- end
-
-UnknownScript_0x58c36:
- setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
- setevent EVENT_SOLVED_OMANYTE_PUZZLE
- setflag ENGINE_UNLOCKED_UNOWNS_2
- domaptrigger RUINS_OF_ALPH_INNER_CHAMBER, $1
- earthquake 30
- showemote EMOTE_SHOCK, PLAYER, 15
- changeblock $2, $2, $18
- changeblock $4, $2, $19
- reloadmappart
- playsound SFX_STRENGTH
- earthquake 80
- applymovement PLAYER, MovementData_0x58c8c
- playsound SFX_KINESIS
- waitsfx
- pause 20
- warpcheck
- end
-
-MapRuinsofAlphOmanyteChamberSignpost1Script:
- jumptext UnknownText_0x58d01
-
-MapRuinsofAlphOmanyteChamberSignpost3Script:
- jumptext UnknownText_0x58d26
-
-MapRuinsofAlphOmanyteChamberSignpost4Script:
- opentext
- writetext UnknownText_0x58c8e
- writebyte $2
- special Special_DisplayUnownWords
- closetext
- end
-
-MapRuinsofAlphOmanyteChamberSignpost5Script:
- checkevent EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER
- iftrue UnknownScript_0x58c85
- opentext
- writetext UnknownText_0x58cc0
- writebyte $2
- special Special_DisplayUnownWords
- closetext
- end
-
-UnknownScript_0x58c85:
- opentext
- writetext UnknownText_0x58ce1
- waitbutton
- closetext
- end
-
-MovementData_0x58c8c:
- db $59 ; movement
- step_end
-
-UnknownText_0x58c8e:
- text "Patterns appeared"
- line "on the walls…"
- done
-
-; possibly unused.. this again?
-UnknownText_0x58caf:
- text "It's UNOWN text!"
- done
-
-UnknownText_0x58cc0:
- text "Patterns appeared"
- line "on the walls…"
- done
-
-UnknownText_0x58ce1:
- text "There's a big hole"
- line "in the wall!"
- done
-
-UnknownText_0x58d01:
- text "It's a replica of"
- line "an ancient #-"
- cont "MON."
- done
-
-UnknownText_0x58d26:
- text "This #MON"
- line "drifted in the"
-
- para "sea by twisting"
- line "its ten tentacles."
- done
-
-RuinsofAlphOmanyteChamber_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 5
- warp_def $9, $3, 3, RUINS_OF_ALPH_OUTSIDE
- warp_def $9, $4, 3, RUINS_OF_ALPH_OUTSIDE
- warp_def $3, $3, 6, RUINS_OF_ALPH_INNER_CHAMBER
- warp_def $3, $4, 7, RUINS_OF_ALPH_INNER_CHAMBER
- warp_def $0, $4, 1, RUINS_OF_ALPH_OMANYTE_ITEM_ROOM
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 6
- signpost 3, 2, SIGNPOST_READ, MapRuinsofAlphOmanyteChamberSignpost1Script
- signpost 3, 5, SIGNPOST_READ, MapRuinsofAlphOmanyteChamberSignpost1Script
- signpost 2, 3, SIGNPOST_UP, MapRuinsofAlphOmanyteChamberSignpost2Script
- signpost 2, 4, SIGNPOST_UP, MapRuinsofAlphOmanyteChamberSignpost3Script
- signpost 0, 3, SIGNPOST_UP, MapRuinsofAlphOmanyteChamberSignpost4Script
- signpost 0, 4, SIGNPOST_UP, MapRuinsofAlphOmanyteChamberSignpost5Script
-
-.PersonEvents:
- db 0
diff --git a/maps/RuinsofAlphOmanyteItemRoom.asm b/maps/RuinsofAlphOmanyteItemRoom.asm
deleted file mode 100644
index 55d4cf9b4..000000000
--- a/maps/RuinsofAlphOmanyteItemRoom.asm
+++ /dev/null
@@ -1,59 +0,0 @@
-const_value set 2
- const RUINSOFALPHOMANYTEITEMROOM_POKE_BALL1
- const RUINSOFALPHOMANYTEITEMROOM_POKE_BALL2
- const RUINSOFALPHOMANYTEITEMROOM_POKE_BALL3
- const RUINSOFALPHOMANYTEITEMROOM_POKE_BALL4
-
-RuinsofAlphOmanyteItemRoom_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-RuinsofAlphOmanyteItemRoomMysteryberry:
- itemball MYSTERYBERRY
-
-RuinsofAlphOmanyteItemRoomMysticWater:
- itemball MYSTIC_WATER
-
-RuinsofAlphOmanyteItemRoomStardust:
- itemball STARDUST
-
-RuinsofAlphOmanyteItemRoomStarPiece:
- itemball STAR_PIECE
-
-MapRuinsofAlphOmanyteItemRoomSignpost1Script:
- jumptext UnknownText_0x59a37
-
-UnknownText_0x59a37:
- text "It's a replica of"
- line "an ancient #-"
- cont "MON."
- done
-
-RuinsofAlphOmanyteItemRoom_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 4
- warp_def $9, $3, 5, RUINS_OF_ALPH_OMANYTE_CHAMBER
- warp_def $9, $4, 5, RUINS_OF_ALPH_OMANYTE_CHAMBER
- warp_def $1, $3, 1, RUINS_OF_ALPH_OMANYTE_WORD_ROOM
- warp_def $1, $4, 2, RUINS_OF_ALPH_OMANYTE_WORD_ROOM
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 2
- signpost 1, 2, SIGNPOST_READ, MapRuinsofAlphOmanyteItemRoomSignpost1Script
- signpost 1, 5, SIGNPOST_READ, MapRuinsofAlphOmanyteItemRoomSignpost1Script
-
-.PersonEvents:
- db 4
- person_event SPRITE_POKE_BALL, 6, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphOmanyteItemRoomMysteryberry, EVENT_PICKED_UP_MYSTERYBERRY_FROM_OMANYTE_ITEM_ROOM
- person_event SPRITE_POKE_BALL, 6, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphOmanyteItemRoomMysticWater, EVENT_PICKED_UP_MYSTIC_WATER_FROM_OMANYTE_ITEM_ROOM
- person_event SPRITE_POKE_BALL, 4, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphOmanyteItemRoomStardust, EVENT_PICKED_UP_STARDUST_FROM_OMANYTE_ITEM_ROOM
- person_event SPRITE_POKE_BALL, 4, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, RuinsofAlphOmanyteItemRoomStarPiece, EVENT_PICKED_UP_STAR_PIECE_FROM_OMANYTE_ITEM_ROOM
diff --git a/maps/RuinsofAlphOmanyteWordRoom.asm b/maps/RuinsofAlphOmanyteWordRoom.asm
deleted file mode 100644
index 7600f41d9..000000000
--- a/maps/RuinsofAlphOmanyteWordRoom.asm
+++ /dev/null
@@ -1,25 +0,0 @@
-RuinsofAlphOmanyteWordRoom_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-RuinsofAlphOmanyteWordRoom_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $9, 3, RUINS_OF_ALPH_OMANYTE_ITEM_ROOM
- warp_def $7, $a, 4, RUINS_OF_ALPH_OMANYTE_ITEM_ROOM
- warp_def $d, $11, 6, RUINS_OF_ALPH_INNER_CHAMBER
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/RuinsofAlphOutside.asm b/maps/RuinsofAlphOutside.asm
deleted file mode 100644
index 8cad45e29..000000000
--- a/maps/RuinsofAlphOutside.asm
+++ /dev/null
@@ -1,325 +0,0 @@
-const_value set 2
- const RUINSOFALPHOUTSIDE_YOUNGSTER1
- const RUINSOFALPHOUTSIDE_SCIENTIST
- const RUINSOFALPHOUTSIDE_FISHER
- const RUINSOFALPHOUTSIDE_YOUNGSTER2
- const RUINSOFALPHOUTSIDE_YOUNGSTER3
-
-RuinsofAlphOutside_MapScriptHeader:
-.MapTriggers:
- db 2
-
- ; triggers
- dw UnknownScript_0x5800d, 0
- dw UnknownScript_0x5800e, 0
-
-.MapCallbacks:
- db 1
-
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, UnknownScript_0x5800f
-
-UnknownScript_0x5800d:
- end
-
-UnknownScript_0x5800e:
- end
-
-UnknownScript_0x5800f:
- checkflag ENGINE_UNOWN_DEX
- iftrue UnknownScript_0x5802c
- checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
- iftrue UnknownScript_0x5801e
- jump UnknownScript_0x5802c
-
-UnknownScript_0x5801e:
- checkcode VAR_UNOWNCOUNT
- if_greater_than $2, UnknownScript_0x58027
- jump UnknownScript_0x5802c
-
-UnknownScript_0x58027:
- appear RUINSOFALPHOUTSIDE_SCIENTIST
- dotrigger $1
- return
-
-UnknownScript_0x5802c:
- disappear RUINSOFALPHOUTSIDE_SCIENTIST
- dotrigger $0
- return
-
-UnknownScript_0x58031:
- spriteface RUINSOFALPHOUTSIDE_SCIENTIST, UP
- spriteface PLAYER, DOWN
- jump UnknownScript_0x58044
-
-UnknownScript_0x5803a:
- spriteface RUINSOFALPHOUTSIDE_SCIENTIST, LEFT
- spriteface PLAYER, RIGHT
- jump UnknownScript_0x58044
-
-ScientistScript_0x58043:
- faceplayer
-UnknownScript_0x58044:
- opentext
- writetext UnknownText_0x580c7
- waitbutton
- closetext
- playmusic MUSIC_SHOW_ME_AROUND
- follow RUINSOFALPHOUTSIDE_SCIENTIST, PLAYER
- applymovement RUINSOFALPHOUTSIDE_SCIENTIST, MovementData_0x580ba
- disappear RUINSOFALPHOUTSIDE_SCIENTIST
- stopfollow
- applymovement PLAYER, MovementData_0x580c5
- domaptrigger RUINS_OF_ALPH_RESEARCH_CENTER, $1
- warpcheck
- end
-
-FisherScript_0x58061:
- faceplayer
- opentext
- checkevent EVENT_TALKED_TO_RUINS_COWARD
- iftrue .Next
- setevent EVENT_TALKED_TO_RUINS_COWARD
- writetext UnknownText_0x583a4
- buttonsound
-.Next:
- writetext UnknownText_0x58420
- waitbutton
- closetext
- end
-
-YoungsterScript_0x58076:
- faceplayer
- opentext
- writetext UnknownText_0x58449
- waitbutton
- closetext
- end
-
-YoungsterScript_0x5807e:
- faceplayer
- opentext
- writetext UnknownText_0x5848e
- waitbutton
- closetext
- spriteface RUINSOFALPHOUTSIDE_YOUNGSTER3, UP
- end
-
-TrainerPsychicNathan:
- trainer EVENT_BEAT_PSYCHIC_NATHAN, PSYCHIC_T, NATHAN, PsychicNathanSeenText, PsychicNathanBeatenText, 0, PsychicNathanScript
-
-PsychicNathanScript:
- end_if_just_battled
- opentext
- writetext UnknownText_0x5830e
- waitbutton
- closetext
- end
-
-
-TrainerSuperNerdStan:
- trainer EVENT_BEAT_SUPER_NERD_STAN, SUPER_NERD, STAN, UnknownText_0x581e5, UnknownText_0x58217, 0, UnknownScript_0x580a9
-
-UnknownScript_0x580a9:
- end_if_just_battled
- opentext
- writetext UnknownText_0x58250
- waitbutton
- closetext
- end
-
-
-MapRuinsofAlphOutsideSignpost0Script:
- jumptext UnknownText_0x58325
-
-MapRuinsofAlphOutsideSignpost1Script:
- jumptext UnknownText_0x58342
-
-MapRuinsofAlphOutsideSignpost2Script:
- jumptext UnknownText_0x58362
-
-MovementData_0x580ba:
- step RIGHT
- step RIGHT
- step RIGHT
- step RIGHT
- step UP
- step UP
- step RIGHT
- step RIGHT
- step UP
- step UP
- step_end
-
-MovementData_0x580c5:
- step UP
- step_end
-
-UnknownText_0x580c7:
- text "Hm? That's a #-"
- line "DEX, isn't it?"
- cont "May I see it?"
-
- para "There are so many"
- line "kinds of #MON."
-
- para "Hm? What's this?"
-
- para "What is this"
- line "#MON?"
-
- para "It looks like the"
- line "strange writing on"
-
- para "the walls of the"
- line "RUINS."
-
- para "If those drawings"
- line "are really #-"
- cont "MON, there should"
- cont "be many more."
-
- para "I know! Let me up-"
- line "grade your #-"
- cont "DEX. Follow me."
- done
-
-UnknownText_0x581e5:
- text "What do you want?"
- line "I'm studying--"
- cont "don't disturb me!"
- done
-
-UnknownText_0x58217:
- text "Sorry…"
- line "I'm frustrated by"
-
- para "our lack of real"
- line "understanding…"
- done
-
-UnknownText_0x58250:
- text "The RUINS are from"
- line "about 1500 years"
- cont "ago."
-
- para "Nobody knows who"
- line "built them."
-
- para "It's also not"
- line "known if the #-"
- cont "MON statues have"
- cont "any meaning."
-
- para "It's all one big"
- line "mystery…"
- done
-
-PsychicNathanSeenText:
- text "Hmmm… This is a"
- line "strange place."
- done
-
-PsychicNathanBeatenText:
- text "…"
- done
-
-UnknownText_0x5830e:
- text "I like thinking"
- line "here."
- done
-
-UnknownText_0x58325:
- text "MYSTERY STONE"
- line "PANEL CHAMBER"
- done
-
-UnknownText_0x58342:
- text "RUINS OF ALPH"
- line "VISITORS WELCOME"
- done
-
-UnknownText_0x58362:
- text "RUINS OF ALPH"
- line "RESEARCH CENTER"
-
- para "THE AUTHORITY ON"
- line "THE RUINS OF ALPH"
- done
-
-UnknownText_0x583a4:
- text "While exploring"
- line "the RUINS, we"
-
- para "suddenly noticed"
- line "an odd presence."
-
- para "We all got scared"
- line "and ran away."
-
- para "You should be"
- line "careful too."
- done
-
-UnknownText_0x58420:
- text "The RUINS hide a"
- line "huge secret!"
-
- para "…I think…"
- done
-
-UnknownText_0x58449:
- text "There are many"
- line "kinds of UNOWN, so"
-
- para "we use them for"
- line "our secret codes."
- done
-
-UnknownText_0x5848e:
- text "A… H… E… A… D…"
- line "Hmm…"
-
- para "What?"
-
- para "I'm decoding this"
- line "message!"
- done
-
-RuinsofAlphOutside_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 11
- warp_def $11, $2, 1, RUINS_OF_ALPH_HO_OH_CHAMBER
- warp_def $7, $e, 1, RUINS_OF_ALPH_KABUTO_CHAMBER
- warp_def $1d, $2, 1, RUINS_OF_ALPH_OMANYTE_CHAMBER
- warp_def $21, $10, 1, RUINS_OF_ALPH_AERODACTYL_CHAMBER
- warp_def $d, $a, 1, RUINS_OF_ALPH_INNER_CHAMBER
- warp_def $b, $11, 1, RUINS_OF_ALPH_RESEARCH_CENTER
- warp_def $13, $6, 1, UNION_CAVE_B1F
- warp_def $1b, $6, 2, UNION_CAVE_B1F
- warp_def $5, $7, 3, ROUTE_36_RUINS_OF_ALPH_GATE
- warp_def $14, $d, 1, ROUTE_32_RUINS_OF_ALPH_GATE
- warp_def $15, $d, 2, ROUTE_32_RUINS_OF_ALPH_GATE
-
-.XYTriggers:
- db 2
- xy_trigger 1, $e, $b, $0, UnknownScript_0x58031, $0, $0
- xy_trigger 1, $f, $a, $0, UnknownScript_0x5803a, $0, $0
-
-.Signposts:
- db 3
- signpost 8, 16, SIGNPOST_READ, MapRuinsofAlphOutsideSignpost0Script
- signpost 16, 12, SIGNPOST_READ, MapRuinsofAlphOutsideSignpost1Script
- signpost 12, 18, SIGNPOST_READ, MapRuinsofAlphOutsideSignpost2Script
-
-.PersonEvents:
- db 5
- person_event SPRITE_YOUNGSTER, 20, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 1, TrainerPsychicNathan, -1
- person_event SPRITE_SCIENTIST, 15, 11, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ScientistScript_0x58043, EVENT_RUINS_OF_ALPH_OUTSIDE_SCIENTIST
- person_event SPRITE_FISHER, 17, 13, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FisherScript_0x58061, EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_FISHER
- person_event SPRITE_YOUNGSTER, 11, 14, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x58076, EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_YOUNGSTERS
- person_event SPRITE_YOUNGSTER, 8, 12, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x5807e, EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_YOUNGSTERS
diff --git a/maps/RuinsofAlphResearchCenter.asm b/maps/RuinsofAlphResearchCenter.asm
deleted file mode 100644
index b1d0f45c5..000000000
--- a/maps/RuinsofAlphResearchCenter.asm
+++ /dev/null
@@ -1,422 +0,0 @@
-const_value set 2
- const RUINSOFALPHRESEARCHCENTER_SCIENTIST1
- const RUINSOFALPHRESEARCHCENTER_SCIENTIST2
- const RUINSOFALPHRESEARCHCENTER_SCIENTIST3
-
-RuinsofAlphResearchCenter_MapScriptHeader:
-.MapTriggers:
- db 2
-
- ; triggers
- dw UnknownScript_0x59180, 0
- dw UnknownScript_0x59181, 0
-
-.MapCallbacks:
- db 1
-
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, UnknownScript_0x59185
-
-UnknownScript_0x59180:
- end
-
-UnknownScript_0x59181:
- priorityjump UnknownScript_0x59192
- end
-
-UnknownScript_0x59185:
- checktriggers
- if_equal $1, UnknownScript_0x5918b
- return
-
-UnknownScript_0x5918b:
- moveperson RUINSOFALPHRESEARCHCENTER_SCIENTIST3, $3, $7
- appear RUINSOFALPHRESEARCHCENTER_SCIENTIST3
- return
-
-UnknownScript_0x59192:
- applymovement RUINSOFALPHRESEARCHCENTER_SCIENTIST3, MovementData_0x5926f
- playsound SFX_BOOT_PC
- pause 60
- playsound SFX_SWITCH_POKEMON
- pause 30
- playsound SFX_TALLY
- pause 30
- playsound SFX_TRANSACTION
- pause 30
- spriteface RUINSOFALPHRESEARCHCENTER_SCIENTIST3, DOWN
- opentext
- writetext UnknownText_0x59278
- waitbutton
- closetext
- applymovement RUINSOFALPHRESEARCHCENTER_SCIENTIST3, MovementData_0x59274
- opentext
- writetext UnknownText_0x592fa
- playsound SFX_ITEM
- waitsfx
- setflag ENGINE_UNOWN_DEX
- writetext UnknownText_0x59311
- waitbutton
- closetext
- applymovement RUINSOFALPHRESEARCHCENTER_SCIENTIST3, MovementData_0x59276
- dotrigger $0
- special RestartMapMusic
- end
-
-ScientistScript_0x591d1:
- faceplayer
- opentext
- checkcode VAR_UNOWNCOUNT
- if_equal 26, UnknownScript_0x591df
- writetext UnknownText_0x59311
- waitbutton
- closetext
- end
-
-UnknownScript_0x591df:
- writetext UnknownText_0x5935f
- waitbutton
- closetext
- end
-
-ScientistScript_0x591e5:
- faceplayer
- opentext
- checkcode VAR_UNOWNCOUNT
- if_equal 26, UnknownScript_0x5920b
- checkflag ENGINE_UNOWN_DEX
- iftrue UnknownScript_0x59205
- checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
- iftrue UnknownScript_0x591ff
- writetext UnknownText_0x593ed
- waitbutton
- closetext
- end
-
-UnknownScript_0x591ff:
- writetext UnknownText_0x59478
- waitbutton
- closetext
- end
-
-UnknownScript_0x59205:
- writetext UnknownText_0x59445
- waitbutton
- closetext
- end
-
-UnknownScript_0x5920b:
- writetext UnknownText_0x594cb
- waitbutton
- closetext
- clearevent EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_YOUNGSTERS
- end
-
-ScientistScript_0x59214:
- faceplayer
- opentext
- checkcode VAR_UNOWNCOUNT
- if_equal 26, UnknownScript_0x5922e
- checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS
- iftrue UnknownScript_0x59228
- writetext UnknownText_0x5954f
- waitbutton
- closetext
- end
-
-UnknownScript_0x59228:
- writetext UnknownText_0x595cb
- waitbutton
- closetext
- end
-
-UnknownScript_0x5922e:
- writetext UnknownText_0x59769
- waitbutton
- closetext
- end
-
-MapRuinsofAlphResearchCenterSignpost1Script:
- opentext
- checkevent EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST
- iftrue UnknownScript_0x59241
- checkcode VAR_UNOWNCOUNT
- if_equal 26, UnknownScript_0x59247
-UnknownScript_0x59241:
- writetext UnknownText_0x597b6
- waitbutton
- closetext
- end
-
-UnknownScript_0x59247:
- writetext UnknownText_0x597d9
- waitbutton
- closetext
- end
-
-MapRuinsofAlphResearchCenterSignpost2Script:
- opentext
- checkevent EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST
- iftrue UnknownScript_0x5925a
- checkcode VAR_UNOWNCOUNT
- if_equal 26, UnknownScript_0x59260
-UnknownScript_0x5925a:
- writetext UnknownText_0x5980e
- waitbutton
- closetext
- end
-
-UnknownScript_0x59260:
- writetext UnknownText_0x5982d
- waitbutton
- special Special_UnownPrinter
- closetext
- end
-
-UnknownScript_0x59269:
- jumptext UnknownText_0x59848
-
-MapRuinsofAlphResearchCenterSignpost0Script:
- jumptext UnknownText_0x59886
-
-MovementData_0x5926f:
- step UP
- step UP
- step LEFT
- turn_head UP
- step_end
-
-MovementData_0x59274:
- step DOWN
- step_end
-
-MovementData_0x59276:
- step UP
- step_end
-
-UnknownText_0x59278:
- text "Done!"
-
- para "I modified your"
- line "#DEX."
-
- para "I added an"
- line "optional #DEX"
-
- para "to store UNOWN"
- line "data."
-
- para "It records them in"
- line "the sequence that"
- cont "they were caught."
- done
-
-UnknownText_0x592fa:
- text "<PLAYER>'s #DEX"
- line "was upgraded."
- done
-
-UnknownText_0x59311:
- text "The UNOWN you"
- line "catch will all be"
- cont "recorded."
-
- para "Check to see how"
- line "many kinds exist."
- done
-
-UnknownText_0x5935f:
- text "You caught all the"
- line "UNOWN variations?"
-
- para "That's a great"
- line "achievement!"
-
- para "I've set up the"
- line "printer here for"
- cont "handling UNOWN."
-
- para "Feel free to use"
- line "it anytime."
- done
-
-UnknownText_0x593ed:
- text "The RUINS are"
- line "about 1500 years"
- cont "old."
-
- para "But it's not known"
- line "why they were"
- cont "built--or by whom."
- done
-
-UnknownText_0x59445:
- text "I wonder how many"
- line "kinds of #MON"
- cont "are in the RUINS?"
- done
-
-UnknownText_0x59478:
- text "#MON appeared"
- line "in the RUINS?"
-
- para "That's incredible"
- line "news!"
-
- para "We'll need to"
- line "investigate this."
- done
-
-UnknownText_0x594cb:
- text "Our investigation,"
- line "with your help, is"
-
- para "giving us insight"
- line "into the RUINS."
-
- para "The RUINS appear"
- line "to have been built"
-
- para "as a habitat for"
- line "#MON."
- done
-
-UnknownText_0x5954f:
- text "There are odd pat-"
- line "terns drawn on the"
-
- para "walls of the"
- line "RUINS."
-
- para "They must be the"
- line "keys for unravel-"
- cont "ing the mystery"
- cont "of the RUINS."
- done
-
-UnknownText_0x595cb:
- text "The strange #-"
- line "MON you saw in the"
- cont "RUINS?"
-
- para "They appear to be"
- line "very much like the"
-
- para "drawings on the"
- line "walls there."
-
- para "Hmm…"
-
- para "That must mean"
- line "there are many"
- cont "kinds of them…"
- done
-
-; possibly unused
-UnknownText_0x59669:
- text "We think something"
- line "caused the cryptic"
-
- para "patterns to appear"
- line "in the RUINS."
-
- para "We've focused our"
- line "studies on that."
- done
-
-; possibly unused
-UnknownText_0x596d3:
- text "According to my"
- line "research…"
-
- para "Those mysterious"
- line "patterns appeared"
-
- para "when the #COM"
- line "CENTER was built."
-
- para "It must mean that"
- line "radio waves have"
-
- para "some sort of a"
- line "link…"
- done
-
-UnknownText_0x59769:
- text "Why did those"
- line "ancient patterns"
-
- para "appear on the wall"
- line "now?"
-
- para "The mystery"
- line "deepens…"
- done
-
-UnknownText_0x597b6:
- text "RUINS OF ALPH"
-
- para "Exploration"
- line "Year 10"
- done
-
-UnknownText_0x597d9:
- text "Mystery #MON"
- line "Name: UNOWN"
-
- para "A total of 26"
- line "kinds found."
- done
-
-UnknownText_0x5980e:
- text "This doesn't seem"
- line "to work yet."
- done
-
-UnknownText_0x5982d:
- text "UNOWN may be"
- line "printed out."
- done
-
-; possibly unused
-UnknownText_0x59848:
- text "It's a photo of"
- line "the RESEARCH"
-
- para "CENTER'S founder,"
- line "PROF.SILKTREE."
- done
-
-UnknownText_0x59886:
- text "There are many"
- line "academic books."
-
- para "Ancient Ruins…"
- line "Mysteries of the"
- cont "Ancients…"
- done
-
-RuinsofAlphResearchCenter_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 2
- warp_def $7, $2, 6, RUINS_OF_ALPH_OUTSIDE
- warp_def $7, $3, 6, RUINS_OF_ALPH_OUTSIDE
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 3
- signpost 5, 6, SIGNPOST_READ, MapRuinsofAlphResearchCenterSignpost0Script
- signpost 4, 3, SIGNPOST_READ, MapRuinsofAlphResearchCenterSignpost1Script
- signpost 1, 7, SIGNPOST_READ, MapRuinsofAlphResearchCenterSignpost2Script
-
-.PersonEvents:
- db 3
- person_event SPRITE_SCIENTIST, 5, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ScientistScript_0x591e5, -1
- person_event SPRITE_SCIENTIST, 2, 5, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ScientistScript_0x59214, -1
- person_event SPRITE_SCIENTIST, 5, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ScientistScript_0x591d1, EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST
diff --git a/maps/SafariZoneBeta.asm b/maps/SafariZoneBeta.asm
index 2f5fbe2ab..77e40f8e2 100644
--- a/maps/SafariZoneBeta.asm
+++ b/maps/SafariZoneBeta.asm
@@ -1,5 +1,5 @@
SafariZoneBeta_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -14,11 +14,11 @@ SafariZoneBeta_MapEventHeader:
warp_def $17, $9, 1, SAFARI_ZONE_FUCHSIA_GATE_BETA
warp_def $17, $a, 2, SAFARI_ZONE_FUCHSIA_GATE_BETA
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/SafariZoneFuchsiaGateBeta.asm b/maps/SafariZoneFuchsiaGateBeta.asm
index 60b24d4e1..0ffc13b75 100644
--- a/maps/SafariZoneFuchsiaGateBeta.asm
+++ b/maps/SafariZoneFuchsiaGateBeta.asm
@@ -1,5 +1,5 @@
SafariZoneFuchsiaGateBeta_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -16,11 +16,11 @@ SafariZoneFuchsiaGateBeta_MapEventHeader:
warp_def $7, $4, 7, FUCHSIA_CITY
warp_def $7, $5, 7, FUCHSIA_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/SafariZoneMainOffice.asm b/maps/SafariZoneMainOffice.asm
index a116519ba..1fd5e0b55 100644
--- a/maps/SafariZoneMainOffice.asm
+++ b/maps/SafariZoneMainOffice.asm
@@ -1,5 +1,5 @@
SafariZoneMainOffice_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -14,11 +14,11 @@ SafariZoneMainOffice_MapEventHeader:
warp_def $7, $2, 2, FUCHSIA_CITY
warp_def $7, $3, 2, FUCHSIA_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/SafariZoneWardensHome.asm b/maps/SafariZoneWardensHome.asm
index f26931fd8..f1c768e33 100644
--- a/maps/SafariZoneWardensHome.asm
+++ b/maps/SafariZoneWardensHome.asm
@@ -2,7 +2,7 @@ const_value set 2
const SAFARIZONEWARDENSHOME_LASS
SafariZoneWardensHome_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -85,16 +85,16 @@ SafariZoneWardensHome_MapEventHeader:
warp_def $7, $2, 6, FUCHSIA_CITY
warp_def $7, $3, 6, FUCHSIA_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 4
- signpost 1, 0, SIGNPOST_READ, WardensHomeBookshelf
- signpost 1, 1, SIGNPOST_READ, WardensHomeBookshelf
- signpost 0, 7, SIGNPOST_READ, WardenPhoto
- signpost 0, 9, SIGNPOST_READ, SafariZonePhoto
+ bg_event 1, 0, BGEVENT_READ, WardensHomeBookshelf
+ bg_event 1, 1, BGEVENT_READ, WardensHomeBookshelf
+ bg_event 0, 7, BGEVENT_READ, WardenPhoto
+ bg_event 0, 9, BGEVENT_READ, SafariZonePhoto
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_LASS, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, WardensGranddaughter, -1
+ object_event SPRITE_LASS, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, WardensGranddaughter, -1
diff --git a/maps/SaffronCity.asm b/maps/SaffronCity.asm
index 121273939..14334d12d 100644
--- a/maps/SaffronCity.asm
+++ b/maps/SaffronCity.asm
@@ -9,13 +9,11 @@ const_value set 2
const SAFFRONCITY_LASS2
SaffronCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
@@ -54,11 +52,11 @@ UnknownScript_0x19934c:
closetext
end
-CooltrainerMScript_0x199352:
- jumptextfaceplayer UnknownText_0x1994fe
+SaffronCityCooltrainerMScript:
+ jumptextfaceplayer SaffronCityCooltrainerMText
-CooltrainerFScript_0x199355:
- jumptextfaceplayer UnknownText_0x19958e
+SaffronCityCooltrainerFScript:
+ jumptextfaceplayer SaffronCityCooltrainerFText
FisherScript_0x199358:
faceplayer
@@ -76,14 +74,14 @@ UnknownScript_0x199366:
closetext
end
-YoungsterScript_0x19936c:
- jumptextfaceplayer UnknownText_0x1996a5
+SaffronCityYoungster1Script:
+ jumptextfaceplayer SaffronCityYoungster1Text
-YoungsterScript_0x19936f:
- jumptextfaceplayer UnknownText_0x1996e5
+SaffronCityYoungster2Script:
+ jumptextfaceplayer SaffronCityYoungster2Text
-LassScript_0x199372:
- jumptextfaceplayer UnknownText_0x199745
+SaffronCityLassScript:
+ jumptextfaceplayer SaffronCityLassText
SaffronCitySign:
jumptext SaffronCitySignText
@@ -103,7 +101,7 @@ MrPsychicsHouseSign:
SaffronCityMagnetTrainStationSign:
jumptext SaffronCityMagnetTrainStationSignText
-SaffronCityPokeCenterSign:
+SaffronCityPokecenterSign:
jumpstd pokecentersign
SaffronCityMartSign:
@@ -150,7 +148,7 @@ UnknownText_0x1994ae:
cont "the MAGNET TRAIN."
done
-UnknownText_0x1994fe:
+SaffronCityCooltrainerMText:
text "I went to the GYM,"
line "raring for battles"
cont "against trainers…"
@@ -165,7 +163,7 @@ UnknownText_0x1994fe:
line "embarrassed."
done
-UnknownText_0x19958e:
+SaffronCityCooltrainerFText:
text "This is SILPH CO.,"
line "famous for #MON"
cont "merchandise."
@@ -198,7 +196,7 @@ UnknownText_0x19964b:
line "Haaah, I'm full!"
done
-UnknownText_0x1996a5:
+SaffronCityYoungster1Text:
text "Going into an"
line "alley for the"
@@ -206,7 +204,7 @@ UnknownText_0x1996a5:
line "me sorta anxious."
done
-UnknownText_0x1996e5:
+SaffronCityYoungster2Text:
text "There's a place"
line "called TRAINER"
@@ -217,7 +215,7 @@ UnknownText_0x1996e5:
line "over the place."
done
-UnknownText_0x199745:
+SaffronCityLassText:
text "Our city was"
line "featured on a"
cont "radio program."
@@ -289,27 +287,27 @@ SaffronCity_MapEventHeader:
warp_def $16, $27, 1, ROUTE_8_SAFFRON_GATE
warp_def $17, $27, 2, ROUTE_8_SAFFRON_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 8
- signpost 5, 21, SIGNPOST_READ, SaffronCitySign
- signpost 5, 33, SIGNPOST_READ, SaffronGymSign
- signpost 5, 25, SIGNPOST_READ, FightingDojoSign
- signpost 21, 15, SIGNPOST_READ, SilphCoSign
- signpost 29, 25, SIGNPOST_READ, MrPsychicsHouseSign
- signpost 5, 11, SIGNPOST_READ, SaffronCityMagnetTrainStationSign
- signpost 29, 10, SIGNPOST_READ, SaffronCityPokeCenterSign
- signpost 11, 26, SIGNPOST_READ, SaffronCityMartSign
-
-.PersonEvents:
+ bg_event 5, 21, BGEVENT_READ, SaffronCitySign
+ bg_event 5, 33, BGEVENT_READ, SaffronGymSign
+ bg_event 5, 25, BGEVENT_READ, FightingDojoSign
+ bg_event 21, 15, BGEVENT_READ, SilphCoSign
+ bg_event 29, 25, BGEVENT_READ, MrPsychicsHouseSign
+ bg_event 5, 11, BGEVENT_READ, SaffronCityMagnetTrainStationSign
+ bg_event 29, 10, BGEVENT_READ, SaffronCityPokecenterSign
+ bg_event 11, 26, BGEVENT_READ, SaffronCityMartSign
+
+.ObjectEvents:
db 8
- person_event SPRITE_LASS, 14, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, LassScript_0x19932a, -1
- person_event SPRITE_POKEFAN_M, 30, 19, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x19933e, -1
- person_event SPRITE_COOLTRAINER_M, 7, 32, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x199352, -1
- person_event SPRITE_COOLTRAINER_F, 24, 20, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x199355, -1
- person_event SPRITE_FISHER, 12, 27, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FisherScript_0x199358, -1
- person_event SPRITE_YOUNGSTER, 19, 15, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x19936c, -1
- person_event SPRITE_YOUNGSTER, 22, 35, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x19936f, -1
- person_event SPRITE_LASS, 8, 19, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LassScript_0x199372, -1
+ object_event SPRITE_LASS, 14, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, LassScript_0x19932a, -1
+ object_event SPRITE_POKEFAN_M, 30, 19, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, PokefanMScript_0x19933e, -1
+ object_event SPRITE_COOLTRAINER_M, 7, 32, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, SaffronCityCooltrainerMScript, -1
+ object_event SPRITE_COOLTRAINER_F, 24, 20, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SaffronCityCooltrainerFScript, -1
+ object_event SPRITE_FISHER, 12, 27, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, FisherScript_0x199358, -1
+ object_event SPRITE_YOUNGSTER, 19, 15, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SaffronCityYoungster1Script, -1
+ object_event SPRITE_YOUNGSTER, 22, 35, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SaffronCityYoungster2Script, -1
+ object_event SPRITE_LASS, 8, 19, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, SaffronCityLassScript, -1
diff --git a/maps/SaffronGym.asm b/maps/SaffronGym.asm
index 8e7dce341..a780ef4da 100644
--- a/maps/SaffronGym.asm
+++ b/maps/SaffronGym.asm
@@ -7,7 +7,7 @@ const_value set 2
const SAFFRONGYM_GYM_GUY
SaffronGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -47,45 +47,45 @@ SabrinaScript_0x189c2e:
end
TrainerMediumRebecca:
- trainer EVENT_BEAT_MEDIUM_REBECCA, MEDIUM, REBECCA, MediumRebeccaSeenText, MediumRebeccaBeatenText, 0, MediumRebeccaScript
+ trainer EVENT_BEAT_MEDIUM_REBECCA, MEDIUM, REBECCA, MediumRebeccaSeenText, MediumRebeccaBeatenText, 0, .Script
-MediumRebeccaScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x18a034
+ writetext MediumRebeccaAfterBattleText
waitbutton
closetext
end
TrainerPsychicFranklin:
- trainer EVENT_BEAT_PSYCHIC_FRANKLIN, PSYCHIC_T, FRANKLIN, PsychicFranklinSeenText, PsychicFranklinBeatenText, 0, PsychicFranklinScript
+ trainer EVENT_BEAT_PSYCHIC_FRANKLIN, PSYCHIC_T, FRANKLIN, PsychicFranklinSeenText, PsychicFranklinBeatenText, 0, .Script
-PsychicFranklinScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x18a0a6
+ writetext PsychicFranklinAfterBattleText
waitbutton
closetext
end
TrainerMediumDoris:
- trainer EVENT_BEAT_MEDIUM_DORIS, MEDIUM, DORIS, MediumDorisSeenText, MediumDorisBeatenText, 0, MediumDorisScript
+ trainer EVENT_BEAT_MEDIUM_DORIS, MEDIUM, DORIS, MediumDorisSeenText, MediumDorisBeatenText, 0, .Script
-MediumDorisScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x18a136
+ writetext MediumDorisAfterBattleText
waitbutton
closetext
end
TrainerPsychicJared:
- trainer EVENT_BEAT_PSYCHIC_JARED, PSYCHIC_T, JARED, PsychicJaredSeenText, PsychicJaredBeatenText, 0, PsychicJaredScript
+ trainer EVENT_BEAT_PSYCHIC_JARED, PSYCHIC_T, JARED, PsychicJaredSeenText, PsychicJaredBeatenText, 0, .Script
-PsychicJaredScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x18a1b3
+ writetext PsychicJaredAfterBattleText
waitbutton
closetext
end
@@ -206,7 +206,7 @@ MediumRebeccaBeatenText:
line "Far too strong…"
done
-UnknownText_0x18a034:
+MediumRebeccaAfterBattleText:
text "What is the source"
line "of your power?"
done
@@ -222,7 +222,7 @@ PsychicFranklinBeatenText:
line "power than mine!"
done
-UnknownText_0x18a0a6:
+PsychicFranklinAfterBattleText:
text "You made your soul"
line "stronger, not just"
cont "your abilities."
@@ -241,7 +241,7 @@ MediumDorisBeatenText:
line "I still lost…"
done
-UnknownText_0x18a136:
+MediumDorisAfterBattleText:
text "Darn! I forgot"
line "that I predicted I"
cont "would lose to you."
@@ -257,7 +257,7 @@ PsychicJaredBeatenText:
text "I was no match…"
done
-UnknownText_0x18a1b3:
+PsychicJaredAfterBattleText:
text "KARATE KING, the"
line "master of the"
@@ -329,18 +329,18 @@ SaffronGym_MapEventHeader:
warp_def $3, $1, 16, SAFFRON_GYM
warp_def $9, $b, 17, SAFFRON_GYM
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 15, 8, SIGNPOST_READ, SaffronGymStatue
+ bg_event 15, 8, BGEVENT_READ, SaffronGymStatue
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_SABRINA, 8, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, SabrinaScript_0x189c2e, -1
- person_event SPRITE_GRANNY, 16, 17, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerMediumRebecca, -1
- person_event SPRITE_YOUNGSTER, 16, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerPsychicFranklin, -1
- person_event SPRITE_GRANNY, 4, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerMediumDoris, -1
- person_event SPRITE_YOUNGSTER, 4, 17, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, TrainerPsychicJared, -1
- person_event SPRITE_GYM_GUY, 14, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SaffronGymGuyScript, -1
+ object_event SPRITE_SABRINA, 8, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SabrinaScript_0x189c2e, -1
+ object_event SPRITE_GRANNY, 16, 17, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerMediumRebecca, -1
+ object_event SPRITE_YOUNGSTER, 16, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPsychicFranklin, -1
+ object_event SPRITE_GRANNY, 4, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerMediumDoris, -1
+ object_event SPRITE_YOUNGSTER, 4, 17, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerPsychicJared, -1
+ object_event SPRITE_GYM_GUY, 14, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SaffronGymGuyScript, -1
diff --git a/maps/SaffronMart.asm b/maps/SaffronMart.asm
index ed13ef074..c1ce96b4f 100644
--- a/maps/SaffronMart.asm
+++ b/maps/SaffronMart.asm
@@ -4,7 +4,7 @@ const_value set 2
const SAFFRONMART_COOLTRAINER_F
SaffronMart_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -16,19 +16,19 @@ ClerkScript_0x18a3bf:
closetext
end
-CooltrainerMScript_0x18a3c6:
- jumptextfaceplayer UnknownText_0x18a3cc
+SaffronMartCooltrainerMScript:
+ jumptextfaceplayer SaffronMartCooltrainerMText
-CooltrainerFScript_0x18a3c9:
- jumptextfaceplayer UnknownText_0x18a3f3
+SaffronMartCooltrainerFScript:
+ jumptextfaceplayer SaffronMartCooltrainerFText
-UnknownText_0x18a3cc:
+SaffronMartCooltrainerMText:
text "There's a big"
line "RADIO TOWER in"
cont "LAVENDER."
done
-UnknownText_0x18a3f3:
+SaffronMartCooltrainerFText:
text "I want to become"
line "stronger, but I'm"
cont "not good yet…"
@@ -46,14 +46,14 @@ SaffronMart_MapEventHeader:
warp_def $7, $2, 3, SAFFRON_CITY
warp_def $7, $3, 3, SAFFRON_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x18a3bf, -1
- person_event SPRITE_COOLTRAINER_M, 2, 7, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x18a3c6, -1
- person_event SPRITE_COOLTRAINER_F, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x18a3c9, -1
+ object_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x18a3bf, -1
+ object_event SPRITE_COOLTRAINER_M, 2, 7, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, SaffronMartCooltrainerMScript, -1
+ object_event SPRITE_COOLTRAINER_F, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, SaffronMartCooltrainerFScript, -1
diff --git a/maps/SaffronPokeCenter1F.asm b/maps/SaffronPokeCenter1F.asm
deleted file mode 100644
index aecafd6b7..000000000
--- a/maps/SaffronPokeCenter1F.asm
+++ /dev/null
@@ -1,135 +0,0 @@
-const_value set 2
- const SAFFRONPOKECENTER1F_NURSE
- const SAFFRONPOKECENTER1F_TEACHER
- const SAFFRONPOKECENTER1F_FISHER
- const SAFFRONPOKECENTER1F_YOUNGSTER
-
-SaffronPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x18a47d:
- jumpstd pokecenternurse
-
-TeacherScript_0x18a480:
- special Mobile_DummyReturnFalse
- iftrue .mobile
- jumptextfaceplayer UnknownText_0x18a4a3
-
-.mobile
- jumptextfaceplayer UnknownText_0x18a532
-
-FisherScript_0x18a48c:
- faceplayer
- opentext
- checkevent EVENT_RETURNED_MACHINE_PART
- iftrue .SolvedKantoPowerCrisis
- writetext UnknownText_0x18a5d3
- waitbutton
- closetext
- end
-
-.SolvedKantoPowerCrisis:
- writetext UnknownText_0x18a62e
- waitbutton
- closetext
- end
-
-YoungsterScript_0x18a4a0:
- jumptextfaceplayer UnknownText_0x18a6c5
-
-UnknownText_0x18a4a3:
- text "What are JOHTO's"
- line "#MON CENTERS"
- cont "like?"
-
- para "…Oh, I see. So"
- line "they're not much"
-
- para "different from the"
- line "ones in KANTO."
-
- para "I can go to JOHTO"
- line "without worrying,"
- cont "then!"
- done
-
-UnknownText_0x18a532:
- text "What are JOHTO's"
- line "#MON CENTERS"
- cont "like?"
-
- para "…Oh, I see."
- line "So they let you"
-
- para "link with people"
- line "far away?"
-
- para "Then I'll get my"
- line "friend in JOHTO to"
-
- para "catch a MARILL and"
- line "trade it to me!"
- done
-
-UnknownText_0x18a5d3:
- text "I just happened to"
- line "come through ROCK"
-
- para "TUNNEL. There was"
- line "some commotion at"
- cont "the POWER PLANT."
- done
-
-UnknownText_0x18a62e:
- text "Caves collapse"
- line "easily."
-
- para "Several caves have"
- line "disappeared in the"
-
- para "past few years,"
- line "like the one out-"
- cont "side CERULEAN."
-
- para "As a pro HIKER,"
- line "that's common"
- cont "knowledge."
- done
-
-UnknownText_0x18a6c5:
- text "SILPH CO.'s HEAD"
- line "OFFICE and the"
-
- para "MAGNET TRAIN STA-"
- line "TION--they're the"
-
- para "places to see in"
- line "SAFFRON."
- done
-
-SaffronPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 4, SAFFRON_CITY
- warp_def $7, $4, 4, SAFFRON_CITY
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 4
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x18a47d, -1
- person_event SPRITE_TEACHER, 2, 7, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, TeacherScript_0x18a480, -1
- person_event SPRITE_FISHER, 6, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, FisherScript_0x18a48c, -1
- person_event SPRITE_YOUNGSTER, 4, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x18a4a0, -1
diff --git a/maps/SaffronPokeCenter2FBeta.asm b/maps/SaffronPokeCenter2FBeta.asm
deleted file mode 100644
index 987236d0b..000000000
--- a/maps/SaffronPokeCenter2FBeta.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-SaffronPokeCenter2FBeta_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-SaffronPokeCenter2FBeta_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 1
- warp_def $7, $0, 3, SAFFRON_POKECENTER_1F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/SaffronPokecenter1F.asm b/maps/SaffronPokecenter1F.asm
new file mode 100644
index 000000000..9b4608e7b
--- /dev/null
+++ b/maps/SaffronPokecenter1F.asm
@@ -0,0 +1,135 @@
+const_value set 2
+ const SAFFRONPOKECENTER1F_NURSE
+ const SAFFRONPOKECENTER1F_TEACHER
+ const SAFFRONPOKECENTER1F_FISHER
+ const SAFFRONPOKECENTER1F_YOUNGSTER
+
+SaffronPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x18a47d:
+ jumpstd pokecenternurse
+
+TeacherScript_0x18a480:
+ special Mobile_DummyReturnFalse
+ iftrue .mobile
+ jumptextfaceplayer UnknownText_0x18a4a3
+
+.mobile
+ jumptextfaceplayer UnknownText_0x18a532
+
+FisherScript_0x18a48c:
+ faceplayer
+ opentext
+ checkevent EVENT_RETURNED_MACHINE_PART
+ iftrue .SolvedKantoPowerCrisis
+ writetext UnknownText_0x18a5d3
+ waitbutton
+ closetext
+ end
+
+.SolvedKantoPowerCrisis:
+ writetext UnknownText_0x18a62e
+ waitbutton
+ closetext
+ end
+
+SaffronPokecenter1FYoungsterScript:
+ jumptextfaceplayer SaffronPokecenter1FYoungsterText
+
+UnknownText_0x18a4a3:
+ text "What are JOHTO's"
+ line "#MON CENTERS"
+ cont "like?"
+
+ para "…Oh, I see. So"
+ line "they're not much"
+
+ para "different from the"
+ line "ones in KANTO."
+
+ para "I can go to JOHTO"
+ line "without worrying,"
+ cont "then!"
+ done
+
+UnknownText_0x18a532:
+ text "What are JOHTO's"
+ line "#MON CENTERS"
+ cont "like?"
+
+ para "…Oh, I see."
+ line "So they let you"
+
+ para "link with people"
+ line "far away?"
+
+ para "Then I'll get my"
+ line "friend in JOHTO to"
+
+ para "catch a MARILL and"
+ line "trade it to me!"
+ done
+
+UnknownText_0x18a5d3:
+ text "I just happened to"
+ line "come through ROCK"
+
+ para "TUNNEL. There was"
+ line "some commotion at"
+ cont "the POWER PLANT."
+ done
+
+UnknownText_0x18a62e:
+ text "Caves collapse"
+ line "easily."
+
+ para "Several caves have"
+ line "disappeared in the"
+
+ para "past few years,"
+ line "like the one out-"
+ cont "side CERULEAN."
+
+ para "As a pro HIKER,"
+ line "that's common"
+ cont "knowledge."
+ done
+
+SaffronPokecenter1FYoungsterText:
+ text "SILPH CO.'s HEAD"
+ line "OFFICE and the"
+
+ para "MAGNET TRAIN STA-"
+ line "TION--they're the"
+
+ para "places to see in"
+ line "SAFFRON."
+ done
+
+SaffronPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 4, SAFFRON_CITY
+ warp_def $7, $4, 4, SAFFRON_CITY
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x18a47d, -1
+ object_event SPRITE_TEACHER, 2, 7, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x18a480, -1
+ object_event SPRITE_FISHER, 6, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, FisherScript_0x18a48c, -1
+ object_event SPRITE_YOUNGSTER, 4, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SaffronPokecenter1FYoungsterScript, -1
diff --git a/maps/SaffronPokecenter2FBeta.asm b/maps/SaffronPokecenter2FBeta.asm
new file mode 100644
index 000000000..ea6adcb2f
--- /dev/null
+++ b/maps/SaffronPokecenter2FBeta.asm
@@ -0,0 +1,23 @@
+SaffronPokecenter2FBeta_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+SaffronPokecenter2FBeta_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 1
+ warp_def $7, $0, 3, SAFFRON_POKECENTER_1F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/SaffronTrainStation.asm b/maps/SaffronTrainStation.asm
index 5b14dc196..df7d7c6de 100644
--- a/maps/SaffronTrainStation.asm
+++ b/maps/SaffronTrainStation.asm
@@ -5,16 +5,14 @@ const_value set 2
const SAFFRONTRAINSTATION_LASS
SaffronTrainStation_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 1
-
- ; triggers
- maptrigger .Trigger0
+ scene_script .DummyScene
.MapCallbacks:
db 0
-.Trigger0:
+.DummyScene:
end
OfficerScript_0x18a81e:
@@ -88,11 +86,11 @@ UnknownScript_0x18a883:
closetext
end
-TeacherScript_0x18a889:
- jumptextfaceplayer UnknownText_0x18aaab
+SaffronTrainStationTeacherScript:
+ jumptextfaceplayer SaffronTrainStationTeacherText
-LassScript_0x18a88c:
- jumptextfaceplayer UnknownText_0x18ab20
+SaffronTrainStationLassScript:
+ jumptextfaceplayer SaffronTrainStationLassText
MovementData_0x18a88f:
step UP
@@ -194,7 +192,7 @@ UnknownText_0x18aa61:
line "KANTO and JOHTO?"
done
-UnknownText_0x18aaab:
+SaffronTrainStationTeacherText:
text "Before the MAGNET"
line "TRAIN STATION was"
@@ -206,7 +204,7 @@ UnknownText_0x18aaab:
cont "to live there."
done
-UnknownText_0x18ab20:
+SaffronTrainStationLassText:
text "Hi. Do you have a"
line "rail PASS? I have"
@@ -228,16 +226,16 @@ SaffronTrainStation_MapEventHeader:
warp_def $5, $6, 4, GOLDENROD_MAGNET_TRAIN_STATION
warp_def $5, $b, 3, GOLDENROD_MAGNET_TRAIN_STATION
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 0, $6, $b, $0, Script_ArriveFromGoldenrod, $0, $0
+ coord_event 0, $6, $b, Script_ArriveFromGoldenrod
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_OFFICER, 9, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, OfficerScript_0x18a81e, -1
- person_event SPRITE_GYM_GUY, 14, 10, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GymGuyScript_0x18a875, -1
- person_event SPRITE_TEACHER, 11, 6, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TeacherScript_0x18a889, EVENT_SAFFRON_TRAIN_STATION_POPULATION
- person_event SPRITE_LASS, 10, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LassScript_0x18a88c, EVENT_SAFFRON_TRAIN_STATION_POPULATION
+ object_event SPRITE_OFFICER, 9, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x18a81e, -1
+ object_event SPRITE_GYM_GUY, 14, 10, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GymGuyScript_0x18a875, -1
+ object_event SPRITE_TEACHER, 11, 6, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SaffronTrainStationTeacherScript, EVENT_SAFFRON_TRAIN_STATION_POPULATION
+ object_event SPRITE_LASS, 10, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, SaffronTrainStationLassScript, EVENT_SAFFRON_TRAIN_STATION_POPULATION
diff --git a/maps/SeafoamGym.asm b/maps/SeafoamGym.asm
index e9193a2fa..fc7806a0b 100644
--- a/maps/SeafoamGym.asm
+++ b/maps/SeafoamGym.asm
@@ -3,16 +3,14 @@ const_value set 2
const SEAFOAMGYM_GYM_GUY
SeafoamGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 1
-
- ; triggers
- dw UnknownScript_0x1ab4fa, 0
+ scene_script .DummyScene
.MapCallbacks:
db 0
-UnknownScript_0x1ab4fa:
+.DummyScene:
end
BlaineScript_0x1ab4fb:
@@ -167,13 +165,13 @@ SeafoamGym_MapEventHeader:
db 1
warp_def $5, $5, 1, ROUTE_20
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_BLAINE, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, BlaineScript_0x1ab4fb, -1
- person_event SPRITE_GYM_GUY, 5, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SeafoamGymGuyScript, EVENT_SEAFOAM_GYM_GYM_GUY
+ object_event SPRITE_BLAINE, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BlaineScript_0x1ab4fb, -1
+ object_event SPRITE_GYM_GUY, 5, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SeafoamGymGuyScript, EVENT_SEAFOAM_GYM_GYM_GUY
diff --git a/maps/SilphCo1F.asm b/maps/SilphCo1F.asm
index dd3ea9dab..4b87d0df4 100644
--- a/maps/SilphCo1F.asm
+++ b/maps/SilphCo1F.asm
@@ -3,7 +3,7 @@ const_value set 2
const SILPHCO1F_OFFICER
SilphCo1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -64,13 +64,13 @@ SilphCo1F_MapEventHeader:
warp_def $7, $2, 7, SAFFRON_CITY
warp_def $7, $3, 7, SAFFRON_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_RECEPTIONIST, 2, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SilphCoReceptionist, -1
- person_event SPRITE_OFFICER, 1, 13, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OfficerScript_0x18abe8, -1
+ object_event SPRITE_RECEPTIONIST, 2, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SilphCoReceptionist, -1
+ object_event SPRITE_OFFICER, 1, 13, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OfficerScript_0x18abe8, -1
diff --git a/maps/SilverCaveItemRooms.asm b/maps/SilverCaveItemRooms.asm
index 2996b9e84..b838c9349 100644
--- a/maps/SilverCaveItemRooms.asm
+++ b/maps/SilverCaveItemRooms.asm
@@ -3,7 +3,7 @@ const_value set 2
const SILVERCAVEITEMROOMS_POKE_BALL2
SilverCaveItemRooms_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -24,13 +24,13 @@ SilverCaveItemRooms_MapEventHeader:
warp_def $3, $d, 3, SILVER_CAVE_ROOM_2
warp_def $f, $7, 4, SILVER_CAVE_ROOM_2
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_POKE_BALL, 3, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SilverCaveItemRoomsMaxRevive, EVENT_SILVER_CAVE_ITEM_ROOMS_MAX_REVIVE
- person_event SPRITE_POKE_BALL, 11, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SilverCaveItemRoomsFullRestore, EVENT_SILVER_CAVE_ITEM_ROOMS_FULL_RESTORE
+ object_event SPRITE_POKE_BALL, 3, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveItemRoomsMaxRevive, EVENT_SILVER_CAVE_ITEM_ROOMS_MAX_REVIVE
+ object_event SPRITE_POKE_BALL, 11, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveItemRoomsFullRestore, EVENT_SILVER_CAVE_ITEM_ROOMS_FULL_RESTORE
diff --git a/maps/SilverCaveOutside.asm b/maps/SilverCaveOutside.asm
index 37e24d730..798363c52 100644
--- a/maps/SilverCaveOutside.asm
+++ b/maps/SilverCaveOutside.asm
@@ -1,18 +1,16 @@
SilverCaveOutside_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_SILVER_CAVE
return
-MtSilverPokeCenterSign:
+MtSilverPokecenterSign:
jumpstd pokecentersign
MtSilverSign:
@@ -34,14 +32,14 @@ SilverCaveOutside_MapEventHeader:
warp_def $13, $17, 1, SILVER_CAVE_POKECENTER_1F
warp_def $b, $12, 1, SILVER_CAVE_ROOM_1
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 19, 24, SIGNPOST_READ, MtSilverPokeCenterSign
- signpost 13, 17, SIGNPOST_READ, MtSilverSign
- signpost 25, 9, SIGNPOST_ITEM, SilverCaveOutsideHiddenFullRestore
+ bg_event 19, 24, BGEVENT_READ, MtSilverPokecenterSign
+ bg_event 13, 17, BGEVENT_READ, MtSilverSign
+ bg_event 25, 9, BGEVENT_ITEM, SilverCaveOutsideHiddenFullRestore
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/SilverCavePokeCenter1F.asm b/maps/SilverCavePokeCenter1F.asm
deleted file mode 100644
index 7aba170fe..000000000
--- a/maps/SilverCavePokeCenter1F.asm
+++ /dev/null
@@ -1,51 +0,0 @@
-const_value set 2
- const SILVERCAVEPOKECENTER1F_NURSE
- const SILVERCAVEPOKECENTER1F_GRANNY
-
-SilverCavePokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x1ae59a:
- jumpstd pokecenternurse
-
-GrannyScript_0x1ae59d:
- jumptextfaceplayer UnknownText_0x1ae5a0
-
-UnknownText_0x1ae5a0:
- text "Trainers who seek"
- line "power climb MT."
-
- para "SILVER despite its"
- line "many dangers…"
-
- para "With their trusted"
- line "#MON, they must"
-
- para "feel they can go"
- line "anywhere…"
- done
-
-SilverCavePokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 1, SILVER_CAVE_OUTSIDE
- warp_def $7, $4, 1, SILVER_CAVE_OUTSIDE
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 2
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x1ae59a, -1
- person_event SPRITE_GRANNY, 5, 1, SPRITEMOVEDATA_STANDING_LEFT, 1, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrannyScript_0x1ae59d, -1
diff --git a/maps/SilverCavePokecenter1F.asm b/maps/SilverCavePokecenter1F.asm
new file mode 100644
index 000000000..a1bc54a3f
--- /dev/null
+++ b/maps/SilverCavePokecenter1F.asm
@@ -0,0 +1,51 @@
+const_value set 2
+ const SILVERCAVEPOKECENTER1F_NURSE
+ const SILVERCAVEPOKECENTER1F_GRANNY
+
+SilverCavePokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x1ae59a:
+ jumpstd pokecenternurse
+
+SilverCavePokecenter1FGrannyScript:
+ jumptextfaceplayer SilverCavePokecenter1FGrannyText
+
+SilverCavePokecenter1FGrannyText:
+ text "Trainers who seek"
+ line "power climb MT."
+
+ para "SILVER despite its"
+ line "many dangers…"
+
+ para "With their trusted"
+ line "#MON, they must"
+
+ para "feel they can go"
+ line "anywhere…"
+ done
+
+SilverCavePokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 1, SILVER_CAVE_OUTSIDE
+ warp_def $7, $4, 1, SILVER_CAVE_OUTSIDE
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 2
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x1ae59a, -1
+ object_event SPRITE_GRANNY, 5, 1, SPRITEMOVEDATA_STANDING_LEFT, 1, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SilverCavePokecenter1FGrannyScript, -1
diff --git a/maps/SilverCaveRoom1.asm b/maps/SilverCaveRoom1.asm
index 84e05cdf7..57212bf38 100644
--- a/maps/SilverCaveRoom1.asm
+++ b/maps/SilverCaveRoom1.asm
@@ -5,7 +5,7 @@ const_value set 2
const SILVERCAVEROOM1_POKE_BALL4
SilverCaveRoom1_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -40,17 +40,17 @@ SilverCaveRoom1_MapEventHeader:
warp_def $21, $9, 2, SILVER_CAVE_OUTSIDE
warp_def $1, $f, 1, SILVER_CAVE_ROOM_2
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 23, 16, SIGNPOST_ITEM, SilverCaveRoom1HiddenDireHit
- signpost 12, 17, SIGNPOST_ITEM, SilverCaveRoom1HiddenUltraBall
+ bg_event 23, 16, BGEVENT_ITEM, SilverCaveRoom1HiddenDireHit
+ bg_event 12, 17, BGEVENT_ITEM, SilverCaveRoom1HiddenUltraBall
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_POKE_BALL, 9, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SilverCaveRoom1MaxElixer, EVENT_SILVER_CAVE_ROOM_1_MAX_ELIXER
- person_event SPRITE_POKE_BALL, 29, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SilverCaveRoom1Protein, EVENT_SILVER_CAVE_ROOM_1_PROTEIN
- person_event SPRITE_POKE_BALL, 30, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SilverCaveRoom1EscapeRope, EVENT_SILVER_CAVE_ROOM_1_ESCAPE_ROPE
- person_event SPRITE_POKE_BALL, 18, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SilverCaveRoom1UltraBall, EVENT_SILVER_CAVE_ROOM_1_ULTRA_BALL
+ object_event SPRITE_POKE_BALL, 9, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom1MaxElixer, EVENT_SILVER_CAVE_ROOM_1_MAX_ELIXER
+ object_event SPRITE_POKE_BALL, 29, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom1Protein, EVENT_SILVER_CAVE_ROOM_1_PROTEIN
+ object_event SPRITE_POKE_BALL, 30, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom1EscapeRope, EVENT_SILVER_CAVE_ROOM_1_ESCAPE_ROPE
+ object_event SPRITE_POKE_BALL, 18, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom1UltraBall, EVENT_SILVER_CAVE_ROOM_1_ULTRA_BALL
diff --git a/maps/SilverCaveRoom2.asm b/maps/SilverCaveRoom2.asm
index 8fe28cd86..5ee1d4bf6 100644
--- a/maps/SilverCaveRoom2.asm
+++ b/maps/SilverCaveRoom2.asm
@@ -4,7 +4,7 @@ const_value set 2
const SILVERCAVEROOM2_POKE_BALL3
SilverCaveRoom2_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -34,15 +34,15 @@ SilverCaveRoom2_MapEventHeader:
warp_def $15, $d, 1, SILVER_CAVE_ITEM_ROOMS
warp_def $3, $17, 2, SILVER_CAVE_ITEM_ROOMS
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 31, 14, SIGNPOST_ITEM, SilverCaveRoom2HiddenMaxPotion
+ bg_event 31, 14, BGEVENT_ITEM, SilverCaveRoom2HiddenMaxPotion
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_POKE_BALL, 10, 24, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SilverCaveRoom2Calcium, EVENT_SILVER_CAVE_ROOM_2_CALCIUM
- person_event SPRITE_POKE_BALL, 24, 22, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SilverCaveRoom2UltraBall, EVENT_SILVER_CAVE_ROOM_2_ULTRA_BALL
- person_event SPRITE_POKE_BALL, 20, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SilverCaveRoom2PPUp, EVENT_SILVER_CAVE_ROOM_2_PP_UP
+ object_event SPRITE_POKE_BALL, 10, 24, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom2Calcium, EVENT_SILVER_CAVE_ROOM_2_CALCIUM
+ object_event SPRITE_POKE_BALL, 24, 22, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom2UltraBall, EVENT_SILVER_CAVE_ROOM_2_ULTRA_BALL
+ object_event SPRITE_POKE_BALL, 20, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom2PPUp, EVENT_SILVER_CAVE_ROOM_2_PP_UP
diff --git a/maps/SilverCaveRoom3.asm b/maps/SilverCaveRoom3.asm
index 82575a93a..717f0532b 100644
--- a/maps/SilverCaveRoom3.asm
+++ b/maps/SilverCaveRoom3.asm
@@ -2,7 +2,7 @@ const_value set 2
const SILVERCAVEROOM3_RED
SilverCaveRoom3_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -58,12 +58,12 @@ SilverCaveRoom3_MapEventHeader:
db 1
warp_def $21, $9, 2, SILVER_CAVE_ROOM_2
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_RED, 10, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, Red, EVENT_RED_IN_MT_SILVER
+ object_event SPRITE_RED, 10, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Red, EVENT_RED_IN_MT_SILVER
diff --git a/maps/SlowpokeWellB1F.asm b/maps/SlowpokeWellB1F.asm
index 5714d6340..bd77efe09 100644
--- a/maps/SlowpokeWellB1F.asm
+++ b/maps/SlowpokeWellB1F.asm
@@ -10,30 +10,30 @@ const_value set 2
const SLOWPOKEWELLB1F_POKE_BALL
SlowpokeWellB1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-KurtScript_0x5a5d5:
- jumptextfaceplayer UnknownText_0x5a6b5
+SlowpokeWellB1FKurtScript:
+ jumptextfaceplayer SlowpokeWellB1FKurtText
TrainerGruntM29:
- trainer EVENT_BEAT_ROCKET_GRUNTM_29, GRUNTM, GRUNTM_29, GruntM29SeenText, GruntM29BeatenText, 0, GruntM29Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_29, GRUNTM, GRUNTM_29, GruntM29SeenText, GruntM29BeatenText, 0, .Script
-GruntM29Script:
+.Script:
end_if_just_battled
opentext
- writetext TrainerGruntM29SlowpokeProfitText
+ writetext GruntM29AfterBattleText
waitbutton
closetext
end
TrainerGruntM1:
- trainer EVENT_BEAT_ROCKET_GRUNTM_1, GRUNTM, GRUNTM_1, GruntM1SeenText, GruntM1BeatenText, 0, GruntM1Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_1, GRUNTM, GRUNTM_1, GruntM1SeenText, GruntM1BeatenText, 0, .Script
-GruntM1Script:
+.Script:
opentext
writetext TrainerGruntM1WhenTalkText
waitbutton
@@ -47,7 +47,7 @@ GruntM1Script:
pause 15
special Special_FadeInQuickly
disappear SLOWPOKEWELLB1F_KURT
- moveperson SLOWPOKEWELLB1F_KURT, $b, $6
+ moveobject SLOWPOKEWELLB1F_KURT, $b, $6
appear SLOWPOKEWELLB1F_KURT
applymovement SLOWPOKEWELLB1F_KURT, KurtSlowpokeWellVictoryMovementData
spriteface PLAYER, RIGHT
@@ -57,7 +57,7 @@ GruntM1Script:
closetext
setevent EVENT_CLEARED_SLOWPOKE_WELL
variablesprite SPRITE_AZALEA_ROCKET, SPRITE_SILVER
- domaptrigger AZALEA_TOWN, $1
+ setmapscene AZALEA_TOWN, $1
clearevent EVENT_ILEX_FOREST_APPRENTICE
clearevent EVENT_ILEX_FOREST_FARFETCHD
setevent EVENT_CHARCOAL_KILN_FARFETCH_D
@@ -74,23 +74,23 @@ GruntM1Script:
end
TrainerGruntM2:
- trainer EVENT_BEAT_ROCKET_GRUNTM_2, GRUNTM, GRUNTM_2, GruntM2SeenText, GruntM2BeatenText, 0, GruntM2Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_2, GRUNTM, GRUNTM_2, GruntM2SeenText, GruntM2BeatenText, 0, .Script
-GruntM2Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5aaf2
+ writetext GruntM2AfterBattleText
waitbutton
closetext
end
TrainerGruntF1:
- trainer EVENT_BEAT_ROCKET_GRUNTF_1, GRUNTF, GRUNTF_1, GruntF1SeenText, GruntF1BeatenText, 0, GruntF1Script
+ trainer EVENT_BEAT_ROCKET_GRUNTF_1, GRUNTF, GRUNTF_1, GruntF1SeenText, GruntF1BeatenText, 0, .Script
-GruntF1Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5ab8d
+ writetext GruntF1AfterBattleText
waitbutton
closetext
end
@@ -144,7 +144,7 @@ KurtSlowpokeWellVictoryMovementData:
turn_head LEFT
step_end
-UnknownText_0x5a6b5:
+SlowpokeWellB1FKurtText:
text "KURT: Hey there,"
line "<PLAYER>!"
@@ -207,7 +207,7 @@ GruntM29BeatenText:
line "my day!"
done
-TrainerGruntM29SlowpokeProfitText:
+GruntM29AfterBattleText:
text "Sure, we've been"
line "hacking the tails"
@@ -266,7 +266,7 @@ GruntM2BeatenText:
line "Too strong…"
done
-UnknownText_0x5aaf2:
+GruntM2AfterBattleText:
text "We need the money,"
line "but selling SLOW-"
cont "POKETAILS?"
@@ -286,7 +286,7 @@ GruntF1BeatenText:
text "You rotten brat!"
done
-UnknownText_0x5ab8d:
+GruntF1AfterBattleText:
text "SLOWPOKETAILS"
line "grow back fast!"
@@ -329,20 +329,20 @@ SlowpokeWellB1F_MapEventHeader:
warp_def $f, $11, 6, AZALEA_TOWN
warp_def $b, $7, 1, SLOWPOKE_WELL_B2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 9
- person_event SPRITE_ROCKET, 7, 15, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM29, EVENT_SLOWPOKE_WELL_ROCKETS
- person_event SPRITE_ROCKET, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 1, TrainerGruntM1, EVENT_SLOWPOKE_WELL_ROCKETS
- person_event SPRITE_ROCKET, 6, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 2, TrainerGruntM2, EVENT_SLOWPOKE_WELL_ROCKETS
- person_event SPRITE_ROCKET_GIRL, 4, 10, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerGruntF1, EVENT_SLOWPOKE_WELL_ROCKETS
- person_event SPRITE_SLOWPOKE, 4, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, SlowpokeScript_0x5a681, EVENT_SLOWPOKE_WELL_SLOWPOKES
- person_event SPRITE_SLOWPOKE, 2, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, SlowpokeScript_0x5a695, EVENT_SLOWPOKE_WELL_SLOWPOKES
- person_event SPRITE_KURT, 14, 16, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, KurtScript_0x5a5d5, EVENT_SLOWPOKE_WELL_KURT
- person_event SPRITE_BOULDER, 2, 3, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SlowpokeWellB1FBoulder, -1
- person_event SPRITE_POKE_BALL, 3, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SlowpokeWellB1FSuperPotion, EVENT_SLOWPOKE_WELL_B1F_SUPER_POTION
+ object_event SPRITE_ROCKET, 7, 15, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM29, EVENT_SLOWPOKE_WELL_ROCKETS
+ object_event SPRITE_ROCKET, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 1, TrainerGruntM1, EVENT_SLOWPOKE_WELL_ROCKETS
+ object_event SPRITE_ROCKET, 6, 5, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerGruntM2, EVENT_SLOWPOKE_WELL_ROCKETS
+ object_event SPRITE_ROCKET_GIRL, 4, 10, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerGruntF1, EVENT_SLOWPOKE_WELL_ROCKETS
+ object_event SPRITE_SLOWPOKE, 4, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SlowpokeScript_0x5a681, EVENT_SLOWPOKE_WELL_SLOWPOKES
+ object_event SPRITE_SLOWPOKE, 2, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SlowpokeScript_0x5a695, EVENT_SLOWPOKE_WELL_SLOWPOKES
+ object_event SPRITE_KURT, 14, 16, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SlowpokeWellB1FKurtScript, EVENT_SLOWPOKE_WELL_KURT
+ object_event SPRITE_BOULDER, 2, 3, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SlowpokeWellB1FBoulder, -1
+ object_event SPRITE_POKE_BALL, 3, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SlowpokeWellB1FSuperPotion, EVENT_SLOWPOKE_WELL_B1F_SUPER_POTION
diff --git a/maps/SlowpokeWellB2F.asm b/maps/SlowpokeWellB2F.asm
index 397203b94..21910a5fe 100644
--- a/maps/SlowpokeWellB2F.asm
+++ b/maps/SlowpokeWellB2F.asm
@@ -3,7 +3,7 @@ const_value set 2
const SLOWPOKEWELLB2F_POKE_BALL
SlowpokeWellB2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -69,13 +69,13 @@ SlowpokeWellB2F_MapEventHeader:
db 1
warp_def $b, $9, 2, SLOWPOKE_WELL_B1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_GYM_GUY, 4, 5, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 1, GymGuyScript_0x5ad0b, -1
- person_event SPRITE_POKE_BALL, 5, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SlowpokeWellB2FTMRainDance, EVENT_SLOWPOKE_WELL_B2F_TM_RAIN_DANCE
+ object_event SPRITE_GYM_GUY, 4, 5, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 1, GymGuyScript_0x5ad0b, -1
+ object_event SPRITE_POKE_BALL, 5, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SlowpokeWellB2FTMRainDance, EVENT_SLOWPOKE_WELL_B2F_TM_RAIN_DANCE
diff --git a/maps/SoulHouse.asm b/maps/SoulHouse.asm
index 37041c88d..4a2ddc61a 100644
--- a/maps/SoulHouse.asm
+++ b/maps/SoulHouse.asm
@@ -5,7 +5,7 @@ const_value set 2
const SOULHOUSE_GRANNY
SoulHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -14,14 +14,14 @@ SoulHouse_MapScriptHeader:
MrFuji:
jumptextfaceplayer MrFujiText
-TeacherScript_0x7ec4a:
- jumptextfaceplayer UnknownText_0x7ed4d
+SoulHouseTeacherScript:
+ jumptextfaceplayer SoulHouseTeacherText
-LassScript_0x7ec4d:
- jumptextfaceplayer UnknownText_0x7edb1
+SoulHouseLassScript:
+ jumptextfaceplayer SoulHouseLassText
-GrannyScript_0x7ec50:
- jumptextfaceplayer UnknownText_0x7eddb
+SoulHouseGrannyScript:
+ jumptextfaceplayer SoulHouseGrannyText
MrFujiText:
text "MR.FUJI: Welcome."
@@ -48,7 +48,7 @@ MrFujiText:
line "make them happy."
done
-UnknownText_0x7ed4d:
+SoulHouseTeacherText:
text "There are other"
line "graves of #MON"
cont "here, I think."
@@ -58,13 +58,13 @@ UnknownText_0x7ed4d:
cont "MR.FUJI may enter."
done
-UnknownText_0x7edb1:
+SoulHouseLassText:
text "I came with my mom"
line "to visit #MON"
cont "graves…"
done
-UnknownText_0x7eddb:
+SoulHouseGrannyText:
text "The #MON that"
line "lived with me…"
@@ -81,15 +81,15 @@ SoulHouse_MapEventHeader:
warp_def $7, $4, 6, LAVENDER_TOWN
warp_def $7, $5, 6, LAVENDER_TOWN
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_GRAMPS, 2, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, MrFuji, -1
- person_event SPRITE_TEACHER, 3, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, TeacherScript_0x7ec4a, -1
- person_event SPRITE_LASS, 5, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, LassScript_0x7ec4d, -1
- person_event SPRITE_GRANNY, 3, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GrannyScript_0x7ec50, -1
+ object_event SPRITE_GRAMPS, 2, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, MrFuji, -1
+ object_event SPRITE_TEACHER, 3, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SoulHouseTeacherScript, -1
+ object_event SPRITE_LASS, 5, 2, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SoulHouseLassScript, -1
+ object_event SPRITE_GRANNY, 3, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SoulHouseGrannyScript, -1
diff --git a/maps/SproutTower1F.asm b/maps/SproutTower1F.asm
index e32946903..a0345f72a 100644
--- a/maps/SproutTower1F.asm
+++ b/maps/SproutTower1F.asm
@@ -7,31 +7,31 @@ const_value set 2
const SPROUTTOWER1F_POKE_BALL
SproutTower1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-SageScript_0x1844fe:
- jumptextfaceplayer UnknownText_0x1845d8
+SproutTower1FSage1Script:
+ jumptextfaceplayer SproutTower1FSage1Text
-SageScript_0x184501:
- jumptextfaceplayer UnknownText_0x18460a
+SproutTower1FSage2Script:
+ jumptextfaceplayer SproutTower1FSage2Text
-GrannyScript_0x184504:
- jumptextfaceplayer UnknownText_0x184649
+SproutTower1FGrannyScript:
+ jumptextfaceplayer SproutTower1FGrannyText
-TeacherScript_0x184507:
- jumptextfaceplayer UnknownText_0x18469d
+SproutTower1FTeacherScript:
+ jumptextfaceplayer SproutTower1FTeacherText
TrainerSageChow:
- trainer EVENT_BEAT_SAGE_CHOW, SAGE, CHOW, SageChowSeenText, SageChowBeatenText, 0, SageChowScript
+ trainer EVENT_BEAT_SAGE_CHOW, SAGE, CHOW, SageChowSeenText, SageChowBeatenText, 0, .Script
-SageChowScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x184583
+ writetext SageChowAfterBattleText
waitbutton
closetext
end
@@ -55,7 +55,7 @@ SageChowBeatenText:
text "Th-Thank you!"
done
-UnknownText_0x184583:
+SageChowAfterBattleText:
text "All living beings"
line "coexist through"
cont "cooperation."
@@ -64,13 +64,13 @@ UnknownText_0x184583:
line "thankful for this."
done
-UnknownText_0x1845d8:
+SproutTower1FSage1Text:
text "Only if you reach"
line "the top will you"
cont "obtain an HM."
done
-UnknownText_0x18460a:
+SproutTower1FSage2Text:
text "SPROUT TOWER was"
line "built long ago"
@@ -78,7 +78,7 @@ UnknownText_0x18460a:
line "#MON training."
done
-UnknownText_0x184649:
+SproutTower1FGrannyText:
text "A BELLSPROUT over"
line "100 feet tall…"
@@ -87,7 +87,7 @@ UnknownText_0x184649:
cont "pillar here."
done
-UnknownText_0x18469d:
+SproutTower1FTeacherText:
text "See the pillar"
line "shaking?"
@@ -114,19 +114,19 @@ SproutTower1F_MapEventHeader:
warp_def $6, $2, 2, SPROUT_TOWER_2F
warp_def $3, $11, 3, SPROUT_TOWER_2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 15, 7, SIGNPOST_READ, MapSproutTower1FSignpost1Script
- signpost 15, 12, SIGNPOST_READ, MapSproutTower1FSignpost1Script
+ bg_event 15, 7, BGEVENT_READ, MapSproutTower1FSignpost1Script
+ bg_event 15, 12, BGEVENT_READ, MapSproutTower1FSignpost1Script
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_SAGE, 4, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SageScript_0x1844fe, -1
- person_event SPRITE_SAGE, 7, 6, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SageScript_0x184501, -1
- person_event SPRITE_GRANNY, 12, 11, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrannyScript_0x184504, -1
- person_event SPRITE_TEACHER, 9, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TeacherScript_0x184507, -1
- person_event SPRITE_SAGE, 5, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 4, TrainerSageChow, -1
- person_event SPRITE_POKE_BALL, 7, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SproutTower1FParlyzHeal, EVENT_SPROUT_TOWER1F_PARLYZ_HEAL
+ object_event SPRITE_SAGE, 4, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SproutTower1FSage1Script, -1
+ object_event SPRITE_SAGE, 7, 6, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SproutTower1FSage2Script, -1
+ object_event SPRITE_GRANNY, 12, 11, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SproutTower1FGrannyScript, -1
+ object_event SPRITE_TEACHER, 9, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SproutTower1FTeacherScript, -1
+ object_event SPRITE_SAGE, 5, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSageChow, -1
+ object_event SPRITE_POKE_BALL, 7, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower1FParlyzHeal, EVENT_SPROUT_TOWER1F_PARLYZ_HEAL
diff --git a/maps/SproutTower2F.asm b/maps/SproutTower2F.asm
index 621693f99..4c202eb80 100644
--- a/maps/SproutTower2F.asm
+++ b/maps/SproutTower2F.asm
@@ -4,30 +4,30 @@ const_value set 2
const SPROUTTOWER2F_POKE_BALL
SproutTower2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerSageNico:
- trainer EVENT_BEAT_SAGE_NICO, SAGE, NICO, SageNicoSeenText, SageNicoBeatenText, 0, SageNicoScript
+ trainer EVENT_BEAT_SAGE_NICO, SAGE, NICO, SageNicoSeenText, SageNicoBeatenText, 0, .Script
-SageNicoScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1847ff
+ writetext SageNicoAfterBattleText
waitbutton
closetext
end
TrainerSageEdmond:
- trainer EVENT_BEAT_SAGE_EDMOND, SAGE, EDMOND, SageEdmondSeenText, SageEdmondBeatenText, 0, SageEdmondScript
+ trainer EVENT_BEAT_SAGE_EDMOND, SAGE, EDMOND, SageEdmondSeenText, SageEdmondBeatenText, 0, .Script
-SageEdmondScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x18486f
+ writetext SageEdmondAfterBattleText
waitbutton
closetext
end
@@ -49,7 +49,7 @@ SageNicoBeatenText:
line "I'm too weak."
done
-UnknownText_0x1847ff:
+SageNicoAfterBattleText:
text "The flexible pil-"
line "lar protects the"
@@ -66,7 +66,7 @@ SageEdmondBeatenText:
text "Oh, I'm weak!"
done
-UnknownText_0x18486f:
+SageEdmondAfterBattleText:
text "I tried to copy"
line "BELLSPROUT's"
@@ -95,15 +95,15 @@ SproutTower2F_MapEventHeader:
warp_def $3, $11, 5, SPROUT_TOWER_1F
warp_def $e, $a, 1, SPROUT_TOWER_3F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 15, 12, SIGNPOST_READ, MapSproutTower2FSignpost0Script
+ bg_event 15, 12, BGEVENT_READ, MapSproutTower2FSignpost0Script
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_SAGE, 3, 12, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 4, TrainerSageNico, -1
- person_event SPRITE_SAGE, 14, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 5, TrainerSageEdmond, -1
- person_event SPRITE_POKE_BALL, 1, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SproutTower2FXAccuracy, EVENT_SPROUT_TOWER2F_X_ACCURACY
+ object_event SPRITE_SAGE, 3, 12, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSageNico, -1
+ object_event SPRITE_SAGE, 14, 9, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 5, TrainerSageEdmond, -1
+ object_event SPRITE_POKE_BALL, 1, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower2FXAccuracy, EVENT_SPROUT_TOWER2F_X_ACCURACY
diff --git a/maps/SproutTower3F.asm b/maps/SproutTower3F.asm
index ee6420d35..c92926585 100644
--- a/maps/SproutTower3F.asm
+++ b/maps/SproutTower3F.asm
@@ -8,20 +8,18 @@ const_value set 2
const SPROUTTOWER3F_SILVER
SproutTower3F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x184945, 0
- dw UnknownScript_0x184946, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 0
-UnknownScript_0x184945:
+.DummyScene0:
end
-UnknownScript_0x184946:
+.DummyScene1:
end
UnknownScript_0x184947:
@@ -61,7 +59,7 @@ UnknownScript_0x184947:
disappear SPROUTTOWER3F_SILVER
waitsfx
special Special_FadeInQuickly
- dotrigger $1
+ setscene $1
special RestartMapMusic
end
@@ -95,34 +93,34 @@ UnknownScript_0x1849d1:
end
TrainerSageJin:
- trainer EVENT_BEAT_SAGE_JIN, SAGE, JIN, SageJinSeenText, SageJinBeatenText, 0, SageJinScript
+ trainer EVENT_BEAT_SAGE_JIN, SAGE, JIN, SageJinSeenText, SageJinBeatenText, 0, .Script
-SageJinScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x184dfa
+ writetext SageJinAfterBattleText
waitbutton
closetext
end
TrainerSageTroy:
- trainer EVENT_BEAT_SAGE_TROY, SAGE, TROY, SageTroySeenText, SageTroyBeatenText, 0, SageTroyScript
+ trainer EVENT_BEAT_SAGE_TROY, SAGE, TROY, SageTroySeenText, SageTroyBeatenText, 0, .Script
-SageTroyScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x184ea4
+ writetext SageTroyAfterBattleText
waitbutton
closetext
end
TrainerSageNeal:
- trainer EVENT_BEAT_SAGE_NEAL, SAGE, NEAL, SageNealSeenText, SageNealBeatenText, 0, SageNealScript
+ trainer EVENT_BEAT_SAGE_NEAL, SAGE, NEAL, SageNealSeenText, SageNealBeatenText, 0, .Script
-SageNealScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x184f12
+ writetext SageNealAfterBattleText
waitbutton
closetext
end
@@ -274,7 +272,7 @@ SageJinBeatenText:
line "incomplete…"
done
-UnknownText_0x184dfa:
+SageJinAfterBattleText:
text "As #MON grow"
line "stronger, so does"
cont "the trainer."
@@ -297,7 +295,7 @@ SageTroyBeatenText:
line "real!"
done
-UnknownText_0x184ea4:
+SageTroyAfterBattleText:
text "It is not far to"
line "the ELDER."
done
@@ -313,7 +311,7 @@ SageNealBeatenText:
line "is bright!"
done
-UnknownText_0x184f12:
+SageNealAfterBattleText:
text "Let there be light"
line "on your journey."
done
@@ -339,25 +337,25 @@ SproutTower3F_MapEventHeader:
db 1
warp_def $e, $a, 4, SPROUT_TOWER_2F
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 0, $9, $b, $0, UnknownScript_0x184947, $0, $0
+ coord_event 0, $9, $b, UnknownScript_0x184947
-.Signposts:
+.BGEvents:
db 6
- signpost 1, 8, SIGNPOST_READ, MapSproutTower3FSignpost5Script
- signpost 1, 11, SIGNPOST_READ, MapSproutTower3FSignpost5Script
- signpost 0, 9, SIGNPOST_READ, MapSproutTower3FSignpost3Script
- signpost 0, 10, SIGNPOST_READ, MapSproutTower3FSignpost3Script
- signpost 15, 5, SIGNPOST_READ, MapSproutTower3FSignpost5Script
- signpost 15, 14, SIGNPOST_READ, MapSproutTower3FSignpost5Script
-
-.PersonEvents:
+ bg_event 1, 8, BGEVENT_READ, MapSproutTower3FSignpost5Script
+ bg_event 1, 11, BGEVENT_READ, MapSproutTower3FSignpost5Script
+ bg_event 0, 9, BGEVENT_READ, MapSproutTower3FSignpost3Script
+ bg_event 0, 10, BGEVENT_READ, MapSproutTower3FSignpost3Script
+ bg_event 15, 5, BGEVENT_READ, MapSproutTower3FSignpost5Script
+ bg_event 15, 14, BGEVENT_READ, MapSproutTower3FSignpost5Script
+
+.ObjectEvents:
db 7
- person_event SPRITE_SAGE, 13, 8, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerSageJin, -1
- person_event SPRITE_SAGE, 8, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, TrainerSageTroy, -1
- person_event SPRITE_SAGE, 2, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SageLiScript, -1
- person_event SPRITE_SAGE, 11, 11, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerSageNeal, -1
- person_event SPRITE_POKE_BALL, 14, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SproutTower3FPotion, EVENT_SPROUT_TOWER_3F_POTION
- person_event SPRITE_POKE_BALL, 1, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, SproutTower3FEscapeRope, EVENT_SPROUT_TOWER_3F_ESCAPE_ROPE
- person_event SPRITE_SILVER, 4, 10, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_SPROUT_TOWER
+ object_event SPRITE_SAGE, 13, 8, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSageJin, -1
+ object_event SPRITE_SAGE, 8, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerSageTroy, -1
+ object_event SPRITE_SAGE, 2, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SageLiScript, -1
+ object_event SPRITE_SAGE, 11, 11, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSageNeal, -1
+ object_event SPRITE_POKE_BALL, 14, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower3FPotion, EVENT_SPROUT_TOWER_3F_POTION
+ object_event SPRITE_POKE_BALL, 1, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower3FEscapeRope, EVENT_SPROUT_TOWER_3F_ESCAPE_ROPE
+ object_event SPRITE_SILVER, 4, 10, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_SPROUT_TOWER
diff --git a/maps/TeamRocketBaseB1F.asm b/maps/TeamRocketBaseB1F.asm
index a4fff5e88..c96d26104 100644
--- a/maps/TeamRocketBaseB1F.asm
+++ b/maps/TeamRocketBaseB1F.asm
@@ -7,23 +7,18 @@ const_value set 2
const TEAMROCKETBASEB1F_POKE_BALL3
TeamRocketBaseB1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 1
-
- ; triggers
- maptrigger .Trigger0
+ scene_script .DummyScene
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_OBJECTS, .HideSecurityGrunt
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, .Callback1
-
-.Trigger0:
+.DummyScene:
end
-.Callback1:
+.HideSecurityGrunt:
disappear TEAMROCKETBASEB1F_ROCKET1
return
@@ -35,7 +30,7 @@ SecurityCamera1a:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveperson TEAMROCKETBASEB1F_ROCKET1, $13, $2
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $13, $2
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
@@ -44,7 +39,7 @@ SecurityCamera1a:
scall PlaySecurityCameraSounds
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveperson TEAMROCKETBASEB1F_ROCKET1, $13, $2
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $13, $2
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
scall TrainerCameraGrunt2
@@ -60,7 +55,7 @@ SecurityCamera1b:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveperson TEAMROCKETBASEB1F_ROCKET1, $13, $3
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $13, $3
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
@@ -69,7 +64,7 @@ SecurityCamera1b:
scall PlaySecurityCameraSounds
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveperson TEAMROCKETBASEB1F_ROCKET1, $13, $3
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $13, $3
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
scall TrainerCameraGrunt2
@@ -85,7 +80,7 @@ SecurityCamera2a:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveperson TEAMROCKETBASEB1F_ROCKET1, $4, $7
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $4, $7
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement2
@@ -95,7 +90,7 @@ SecurityCamera2a:
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
spriteface PLAYER, RIGHT
- moveperson TEAMROCKETBASEB1F_ROCKET1, $c, $5
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $c, $5
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement3
scall TrainerCameraGrunt2
@@ -111,7 +106,7 @@ SecurityCamera2b:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveperson TEAMROCKETBASEB1F_ROCKET1, $4, $8
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $4, $8
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement4
@@ -121,7 +116,7 @@ SecurityCamera2b:
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
spriteface PLAYER, RIGHT
- moveperson TEAMROCKETBASEB1F_ROCKET1, $c, $5
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $c, $5
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement5
scall TrainerCameraGrunt2
@@ -137,7 +132,7 @@ SecurityCamera3a:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveperson TEAMROCKETBASEB1F_ROCKET1, $13, $6
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $13, $6
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
@@ -147,7 +142,7 @@ SecurityCamera3a:
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
spriteface PLAYER, RIGHT
- moveperson TEAMROCKETBASEB1F_ROCKET1, $19, $b
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $19, $b
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement6
scall TrainerCameraGrunt2
@@ -163,7 +158,7 @@ SecurityCamera3b:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveperson TEAMROCKETBASEB1F_ROCKET1, $13, $7
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $13, $7
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
@@ -173,7 +168,7 @@ SecurityCamera3b:
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
spriteface PLAYER, RIGHT
- moveperson TEAMROCKETBASEB1F_ROCKET1, $19, $c
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $19, $c
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement7
scall TrainerCameraGrunt2
@@ -189,7 +184,7 @@ SecurityCamera4:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveperson TEAMROCKETBASEB1F_ROCKET1, $11, $10
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $11, $10
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
@@ -199,7 +194,7 @@ SecurityCamera4:
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
spriteface PLAYER, RIGHT
- moveperson TEAMROCKETBASEB1F_ROCKET1, $19, $b
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $19, $b
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement8
scall TrainerCameraGrunt2
@@ -215,7 +210,7 @@ SecurityCamera5:
iftrue NoSecurityCamera
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
- moveperson TEAMROCKETBASEB1F_ROCKET1, $3, $10
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $3, $10
appear TEAMROCKETBASEB1F_ROCKET1
spriteface PLAYER, LEFT
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1
@@ -225,7 +220,7 @@ SecurityCamera5:
showemote EMOTE_SHOCK, PLAYER, 15
playmusic MUSIC_ROCKET_ENCOUNTER
spriteface PLAYER, RIGHT
- moveperson TEAMROCKETBASEB1F_ROCKET1, $e, $10
+ moveobject TEAMROCKETBASEB1F_ROCKET1, $e, $10
appear TEAMROCKETBASEB1F_ROCKET1
applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement9
scall TrainerCameraGrunt2
@@ -486,23 +481,23 @@ NoExplodingTrap:
end
TrainerScientistJed:
- trainer EVENT_BEAT_SCIENTIST_JED, SCIENTIST, JED, ScientistJedSeenText, ScientistJedBeatenText, 0, ScientistJedScript
+ trainer EVENT_BEAT_SCIENTIST_JED, SCIENTIST, JED, ScientistJedSeenText, ScientistJedBeatenText, 0, .Script
-ScientistJedScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6cc16
+ writetext ScientistJedAfterBattleText
waitbutton
closetext
end
TrainerGruntM16:
- trainer EVENT_BEAT_ROCKET_GRUNTM_16, GRUNTM, GRUNTM_16, GruntM16SeenText, GruntM16BeatenText, 0, GruntM16Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_16, GRUNTM, GRUNTM_16, GruntM16SeenText, GruntM16BeatenText, 0, .Script
-GruntM16Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6cd1b
+ writetext GruntM16AfterBattleText
waitbutton
closetext
end
@@ -673,7 +668,7 @@ ScientistJedBeatenText:
text "I get it…"
done
-UnknownText_0x6cc16:
+ScientistJedAfterBattleText:
text "All right. I'll"
line "divulge a secret"
cont "about our hideout."
@@ -704,7 +699,7 @@ GruntM16BeatenText:
text "Kaboom!"
done
-UnknownText_0x6cd1b:
+GruntM16AfterBattleText:
text "I don't even know"
line "where the traps"
cont "are planted."
@@ -743,60 +738,60 @@ TeamRocketBaseB1F_MapEventHeader:
warp_def $f, $5, 4, TEAM_ROCKET_BASE_B1F
warp_def $2, $19, 3, TEAM_ROCKET_BASE_B1F
-.XYTriggers:
+.CoordEvents:
db 30
; There are five security cameras in the base.
; Walking in front of one triggers two Rocket Grunts.
- xy_trigger 0, $2, $18, $0, SecurityCamera1a, $0, $0
- xy_trigger 0, $3, $18, $0, SecurityCamera1b, $0, $0
- xy_trigger 0, $2, $6, $0, SecurityCamera2a, $0, $0
- xy_trigger 0, $3, $6, $0, SecurityCamera2b, $0, $0
- xy_trigger 0, $6, $18, $0, SecurityCamera3a, $0, $0
- xy_trigger 0, $7, $18, $0, SecurityCamera3b, $0, $0
- xy_trigger 0, $10, $16, $0, SecurityCamera4, $0, $0
- xy_trigger 0, $10, $8, $0, SecurityCamera5, $0, $0
+ coord_event 0, $2, $18, SecurityCamera1a
+ coord_event 0, $3, $18, SecurityCamera1b
+ coord_event 0, $2, $6, SecurityCamera2a
+ coord_event 0, $3, $6, SecurityCamera2b
+ coord_event 0, $6, $18, SecurityCamera3a
+ coord_event 0, $7, $18, SecurityCamera3b
+ coord_event 0, $10, $16, SecurityCamera4
+ coord_event 0, $10, $8, SecurityCamera5
; There are spots on the floor that trigger a Pokémon battle.
; Each Pokémon (Voltorb, Koffing, Geodude) knows Selfdestruct.
- xy_trigger 0, $7, $2, $0, ExplodingTrap1, $0, $0
- xy_trigger 0, $7, $3, $0, ExplodingTrap2, $0, $0
- xy_trigger 0, $7, $4, $0, ExplodingTrap3, $0, $0
- xy_trigger 0, $8, $1, $0, ExplodingTrap4, $0, $0
- xy_trigger 0, $8, $3, $0, ExplodingTrap5, $0, $0
- xy_trigger 0, $8, $5, $0, ExplodingTrap6, $0, $0
- xy_trigger 0, $9, $3, $0, ExplodingTrap7, $0, $0
- xy_trigger 0, $9, $4, $0, ExplodingTrap8, $0, $0
- xy_trigger 0, $a, $1, $0, ExplodingTrap9, $0, $0
- xy_trigger 0, $a, $2, $0, ExplodingTrap10, $0, $0
- xy_trigger 0, $a, $3, $0, ExplodingTrap11, $0, $0
- xy_trigger 0, $a, $5, $0, ExplodingTrap12, $0, $0
- xy_trigger 0, $b, $2, $0, ExplodingTrap13, $0, $0
- xy_trigger 0, $b, $4, $0, ExplodingTrap14, $0, $0
- xy_trigger 0, $c, $1, $0, ExplodingTrap15, $0, $0
- xy_trigger 0, $c, $2, $0, ExplodingTrap16, $0, $0
- xy_trigger 0, $c, $4, $0, ExplodingTrap17, $0, $0
- xy_trigger 0, $c, $5, $0, ExplodingTrap18, $0, $0
- xy_trigger 0, $d, $1, $0, ExplodingTrap19, $0, $0
- xy_trigger 0, $d, $3, $0, ExplodingTrap20, $0, $0
- xy_trigger 0, $d, $4, $0, ExplodingTrap21, $0, $0
- xy_trigger 0, $d, $5, $0, ExplodingTrap22, $0, $0
-
-.Signposts:
+ coord_event 0, $7, $2, ExplodingTrap1
+ coord_event 0, $7, $3, ExplodingTrap2
+ coord_event 0, $7, $4, ExplodingTrap3
+ coord_event 0, $8, $1, ExplodingTrap4
+ coord_event 0, $8, $3, ExplodingTrap5
+ coord_event 0, $8, $5, ExplodingTrap6
+ coord_event 0, $9, $3, ExplodingTrap7
+ coord_event 0, $9, $4, ExplodingTrap8
+ coord_event 0, $a, $1, ExplodingTrap9
+ coord_event 0, $a, $2, ExplodingTrap10
+ coord_event 0, $a, $3, ExplodingTrap11
+ coord_event 0, $a, $5, ExplodingTrap12
+ coord_event 0, $b, $2, ExplodingTrap13
+ coord_event 0, $b, $4, ExplodingTrap14
+ coord_event 0, $c, $1, ExplodingTrap15
+ coord_event 0, $c, $2, ExplodingTrap16
+ coord_event 0, $c, $4, ExplodingTrap17
+ coord_event 0, $c, $5, ExplodingTrap18
+ coord_event 0, $d, $1, ExplodingTrap19
+ coord_event 0, $d, $3, ExplodingTrap20
+ coord_event 0, $d, $4, ExplodingTrap21
+ coord_event 0, $d, $5, ExplodingTrap22
+
+.BGEvents:
db 9
- signpost 11, 19, SIGNPOST_READ, MapTeamRocketBaseB1FSignpost0Script
- signpost 1, 24, SIGNPOST_UP, MapTeamRocketBaseB1FSignpost5Script
- signpost 1, 6, SIGNPOST_UP, MapTeamRocketBaseB1FSignpost5Script
- signpost 15, 8, SIGNPOST_UP, MapTeamRocketBaseB1FSignpost5Script
- signpost 15, 22, SIGNPOST_UP, MapTeamRocketBaseB1FSignpost5Script
- signpost 5, 24, SIGNPOST_UP, MapTeamRocketBaseB1FSignpost5Script
- signpost 11, 20, SIGNPOST_READ, MapTeamRocketBaseB1FSignpost7Script
- signpost 11, 21, SIGNPOST_READ, MapTeamRocketBaseB1FSignpost7Script
- signpost 11, 3, SIGNPOST_ITEM, TeamRocketBaseB1FHiddenRevive
-
-.PersonEvents:
+ bg_event 11, 19, BGEVENT_READ, MapTeamRocketBaseB1FSignpost0Script
+ bg_event 1, 24, BGEVENT_UP, MapTeamRocketBaseB1FSignpost5Script
+ bg_event 1, 6, BGEVENT_UP, MapTeamRocketBaseB1FSignpost5Script
+ bg_event 15, 8, BGEVENT_UP, MapTeamRocketBaseB1FSignpost5Script
+ bg_event 15, 22, BGEVENT_UP, MapTeamRocketBaseB1FSignpost5Script
+ bg_event 5, 24, BGEVENT_UP, MapTeamRocketBaseB1FSignpost5Script
+ bg_event 11, 20, BGEVENT_READ, MapTeamRocketBaseB1FSignpost7Script
+ bg_event 11, 21, BGEVENT_READ, MapTeamRocketBaseB1FSignpost7Script
+ bg_event 11, 3, BGEVENT_ITEM, TeamRocketBaseB1FHiddenRevive
+
+.ObjectEvents:
db 6
- person_event SPRITE_ROCKET, 0, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_SECURITY_GRUNTS
- person_event SPRITE_ROCKET, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM16, EVENT_TEAM_ROCKET_BASE_POPULATION
- person_event SPRITE_SCIENTIST, 12, 18, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerScientistJed, EVENT_TEAM_ROCKET_BASE_POPULATION
- person_event SPRITE_POKE_BALL, 6, 27, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TeamRocketBaseB1FHyperPotion, EVENT_TEAM_ROCKET_BASE_B1F_HYPER_POTION
- person_event SPRITE_POKE_BALL, 15, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TeamRocketBaseB1FNugget, EVENT_TEAM_ROCKET_BASE_B1F_NUGGET
- person_event SPRITE_POKE_BALL, 12, 21, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TeamRocketBaseB1FGuardSpec, EVENT_TEAM_ROCKET_BASE_B1F_GUARD_SPEC
+ object_event SPRITE_ROCKET, 0, 0, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_SECURITY_GRUNTS
+ object_event SPRITE_ROCKET, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM16, EVENT_TEAM_ROCKET_BASE_POPULATION
+ object_event SPRITE_SCIENTIST, 12, 18, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerScientistJed, EVENT_TEAM_ROCKET_BASE_POPULATION
+ object_event SPRITE_POKE_BALL, 6, 27, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB1FHyperPotion, EVENT_TEAM_ROCKET_BASE_B1F_HYPER_POTION
+ object_event SPRITE_POKE_BALL, 15, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB1FNugget, EVENT_TEAM_ROCKET_BASE_B1F_NUGGET
+ object_event SPRITE_POKE_BALL, 12, 21, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB1FGuardSpec, EVENT_TEAM_ROCKET_BASE_B1F_GUARD_SPEC
diff --git a/maps/TeamRocketBaseB2F.asm b/maps/TeamRocketBaseB2F.asm
index 26adc801b..12930b544 100644
--- a/maps/TeamRocketBaseB2F.asm
+++ b/maps/TeamRocketBaseB2F.asm
@@ -15,35 +15,30 @@ const_value set 2
const TEAMROCKETBASEB2F_POKE_BALL
TeamRocketBaseB2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 4
-
- ; triggers
- dw UnknownScript_0x6cf85, 0
- dw UnknownScript_0x6cf86, 0
- dw UnknownScript_0x6cf87, 0
- dw UnknownScript_0x6cf88, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
+ scene_script .DummyScene2
+ scene_script .DummyScene3
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_TILES, .TransmitterDoorCallback
- ; callbacks
-
- dbw MAPCALLBACK_TILES, TransmitterDoorCallback
-
-UnknownScript_0x6cf85:
+.DummyScene0:
end
-UnknownScript_0x6cf86:
+.DummyScene1:
end
-UnknownScript_0x6cf87:
+.DummyScene2:
end
-UnknownScript_0x6cf88:
+.DummyScene3:
end
-TransmitterDoorCallback:
+.TransmitterDoorCallback:
checkevent EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER
iftrue .Change
return
@@ -53,14 +48,14 @@ TransmitterDoorCallback:
return
UnknownScript_0x6cf95:
- moveperson TEAMROCKETBASEB2F_LANCE, $9, $d
+ moveobject TEAMROCKETBASEB2F_LANCE, $9, $d
jump UnknownScript_0x6cfac
UnknownScript_0x6cf9c:
- moveperson TEAMROCKETBASEB2F_ROCKET_GIRL, $15, $10
- moveperson TEAMROCKETBASEB2F_ROCKET1, $15, $10
- moveperson TEAMROCKETBASEB2F_DRAGON, $a, $d
- moveperson TEAMROCKETBASEB2F_LANCE, $a, $d
+ moveobject TEAMROCKETBASEB2F_ROCKET_GIRL, $15, $10
+ moveobject TEAMROCKETBASEB2F_ROCKET1, $15, $10
+ moveobject TEAMROCKETBASEB2F_DRAGON, $a, $d
+ moveobject TEAMROCKETBASEB2F_LANCE, $a, $d
UnknownScript_0x6cfac:
appear TEAMROCKETBASEB2F_ROCKET_GIRL
appear TEAMROCKETBASEB2F_ROCKET1
@@ -102,7 +97,7 @@ UnknownScript_0x6cfac:
applymovement TEAMROCKETBASEB2F_ROCKET_GIRL, MovementData_0x6d248
winlosstext UnknownText_0x6d45c, 0
setlasttalked TEAMROCKETBASEB2F_ROCKET_GIRL
- loadtrainer EXECUTIVEF, 2
+ loadtrainer EXECUTIVEF, EXECUTIVEF_2
startbattle
disappear TEAMROCKETBASEB2F_DRAGON
setevent EVENT_TEAM_ROCKET_BASE_B2F_EXECUTIVE
@@ -123,7 +118,7 @@ UnknownScript_0x6cfac:
disappear TEAMROCKETBASEB2F_ROCKET4
pause 15
special Special_FadeInQuickly
- dotrigger $2
+ setscene $2
clearevent EVENT_TEAM_ROCKET_BASE_B2F_LANCE
spriteface TEAMROCKETBASEB2F_LANCE, DOWN
opentext
@@ -180,7 +175,7 @@ LanceHealsCommon:
writetext LanceHealsText2
waitbutton
closetext
- dotrigger $1
+ setscene $1
setevent EVENT_LANCE_HEALED_YOU_IN_TEAM_ROCKET_BASE
checkcode VAR_FACING
if_equal RIGHT, UnknownScript_0x6d0be
@@ -194,34 +189,34 @@ UnknownScript_0x6d0be:
end
TrainerGruntM17:
- trainer EVENT_BEAT_ROCKET_GRUNTM_17, GRUNTM, GRUNTM_17, GruntM17SeenText, GruntM17BeatenText, 0, GruntM17Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_17, GRUNTM, GRUNTM_17, GruntM17SeenText, GruntM17BeatenText, 0, .Script
-GruntM17Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6db88
+ writetext GruntM17AfterBattleText
waitbutton
closetext
end
TrainerGruntM18:
- trainer EVENT_BEAT_ROCKET_GRUNTM_18, GRUNTM, GRUNTM_18, GruntM18SeenText, GruntM18BeatenText, 0, GruntM18Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_18, GRUNTM, GRUNTM_18, GruntM18SeenText, GruntM18BeatenText, 0, .Script
-GruntM18Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6dc1a
+ writetext GruntM18AfterBattleText
waitbutton
closetext
end
TrainerGruntM19:
- trainer EVENT_BEAT_ROCKET_GRUNTM_19, GRUNTM, GRUNTM_19, GruntM19SeenText, GruntM19BeatenText, 0, GruntM19Script
+ trainer EVENT_BEAT_ROCKET_GRUNTM_19, GRUNTM, GRUNTM_19, GruntM19SeenText, GruntM19BeatenText, 0, .Script
-GruntM19Script:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6dcd1
+ writetext GruntM19AfterBattleText
waitbutton
closetext
end
@@ -285,7 +280,7 @@ UnknownScript_0x6d182:
end
UnknownScript_0x6d184:
- moveperson TEAMROCKETBASEB2F_LANCE, $12, $6
+ moveobject TEAMROCKETBASEB2F_LANCE, $12, $6
appear TEAMROCKETBASEB2F_LANCE
applymovement TEAMROCKETBASEB2F_LANCE, MovementData_0x6d27a
spriteface PLAYER, RIGHT
@@ -309,7 +304,7 @@ UnknownScript_0x6d184:
clearflag ENGINE_ROCKET_SIGNAL_ON_CH20
setevent EVENT_ROUTE_43_GATE_ROCKETS
setevent EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_GYM
- dotrigger $3
+ setscene $3
clearevent EVENT_LAKE_OF_RAGE_CIVILIANS
setevent EVENT_TURNED_OFF_SECURITY_CAMERAS
setevent EVENT_SECURITY_CAMERA_1
@@ -319,12 +314,10 @@ UnknownScript_0x6d184:
setevent EVENT_SECURITY_CAMERA_5
end
-MapTeamRocketBaseB2FSignpostPtr1:
- dw EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER
- dw MapTeamRocketBaseB2FSignpost1Script
-
+TeamRocketBaseB2FLockedDoor:
+ dw EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER, .Script
-MapTeamRocketBaseB2FSignpost1Script:
+.Script:
opentext
checkevent EVENT_LEARNED_HAIL_GIOVANNI
iftrue UnknownScript_0x6d1e8
@@ -344,16 +337,16 @@ UnknownScript_0x6d1e8:
waitsfx
end
-MapTeamRocketBaseB2FSignpost21Script:
+TeamRocketBaseB2FTransmitterScript:
opentext
checkevent EVENT_CLEARED_ROCKET_HIDEOUT
- iftrue UnknownScript_0x6d207
+ iftrue .Deactivated
writetext UnknownText_0x6dda7
waitbutton
closetext
end
-UnknownScript_0x6d207:
+.Deactivated:
writetext UnknownText_0x6de03
waitbutton
closetext
@@ -826,7 +819,7 @@ GruntM17BeatenText:
text "What? I lost?"
done
-UnknownText_0x6db88:
+GruntM17AfterBattleText:
text "Heh, I'm just a"
line "GRUNT."
@@ -847,7 +840,7 @@ GruntM18BeatenText:
text "I knew I'd lose…"
done
-UnknownText_0x6dc1a:
+GruntM18AfterBattleText:
text "I got wiped out on"
line "the last mission"
cont "by a kid too."
@@ -871,7 +864,7 @@ GruntM19BeatenText:
text "Grrrr…"
done
-UnknownText_0x6dcd1:
+GruntM19AfterBattleText:
text "Heh, only the boss"
line "knows the password"
cont "for that door."
@@ -928,57 +921,57 @@ TeamRocketBaseB2F_MapEventHeader:
warp_def $6, $3, 3, TEAM_ROCKET_BASE_B3F
warp_def $e, $1b, 4, TEAM_ROCKET_BASE_B3F
-.XYTriggers:
+.CoordEvents:
db 9
- xy_trigger 0, $e, $5, $0, LanceHealsScript1, $0, $0
- xy_trigger 0, $d, $4, $0, LanceHealsScript2, $0, $0
- xy_trigger 1, $b, $e, $0, UnknownScript_0x6cf95, $0, $0
- xy_trigger 1, $b, $f, $0, UnknownScript_0x6cf9c, $0, $0
- xy_trigger 2, $c, $e, $0, UnknownScript_0x6d075, $0, $0
- xy_trigger 2, $c, $f, $0, UnknownScript_0x6d075, $0, $0
- xy_trigger 2, $3, $c, $0, UnknownScript_0x6d07a, $0, $0
- xy_trigger 2, $a, $c, $0, UnknownScript_0x6d07a, $0, $0
- xy_trigger 2, $b, $c, $0, UnknownScript_0x6d07a, $0, $0
-
-.Signposts:
+ coord_event 0, $e, $5, LanceHealsScript1
+ coord_event 0, $d, $4, LanceHealsScript2
+ coord_event 1, $b, $e, UnknownScript_0x6cf95
+ coord_event 1, $b, $f, UnknownScript_0x6cf9c
+ coord_event 2, $c, $e, UnknownScript_0x6d075
+ coord_event 2, $c, $f, UnknownScript_0x6d075
+ coord_event 2, $3, $c, UnknownScript_0x6d07a
+ coord_event 2, $a, $c, UnknownScript_0x6d07a
+ coord_event 2, $b, $c, UnknownScript_0x6d07a
+
+.BGEvents:
db 23
- signpost 12, 14, SIGNPOST_IFNOTSET, MapTeamRocketBaseB2FSignpostPtr1
- signpost 12, 15, SIGNPOST_IFNOTSET, MapTeamRocketBaseB2FSignpostPtr1
- signpost 9, 17, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 9, 16, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 9, 15, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 9, 14, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 9, 13, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 9, 12, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 8, 12, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 7, 12, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 6, 12, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 5, 12, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 4, 12, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 4, 13, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 4, 14, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 4, 15, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 4, 16, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 4, 17, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 5, 17, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 6, 17, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 7, 17, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 8, 17, SIGNPOST_READ, MapTeamRocketBaseB2FSignpost21Script
- signpost 7, 26, SIGNPOST_ITEM, TeamRocketBaseB2FHiddenFullHeal
-
-.PersonEvents:
+ bg_event 12, 14, BGEVENT_IFNOTSET, TeamRocketBaseB2FLockedDoor
+ bg_event 12, 15, BGEVENT_IFNOTSET, TeamRocketBaseB2FLockedDoor
+ bg_event 9, 17, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 9, 16, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 9, 15, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 9, 14, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 9, 13, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 9, 12, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 8, 12, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 7, 12, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 6, 12, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 5, 12, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 4, 12, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 4, 13, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 4, 14, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 4, 15, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 4, 16, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 4, 17, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 5, 17, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 6, 17, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 7, 17, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 8, 17, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript
+ bg_event 7, 26, BGEVENT_ITEM, TeamRocketBaseB2FHiddenFullHeal
+
+.ObjectEvents:
db 14
- person_event SPRITE_ROCKET, 16, 20, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_GRUNT_WITH_EXECUTIVE
- person_event SPRITE_ROCKET_GIRL, 16, 20, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_EXECUTIVE
- person_event SPRITE_LANCE, 13, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_LANCE
- person_event SPRITE_DRAGON, 13, 9, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_DRAGONITE
- person_event SPRITE_VOLTORB, 5, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketElectrode1, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_1
- person_event SPRITE_VOLTORB, 7, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketElectrode2, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_2
- person_event SPRITE_VOLTORB, 9, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketElectrode3, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_3
- person_event SPRITE_VOLTORB, 5, 22, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_1
- person_event SPRITE_VOLTORB, 7, 22, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_2
- person_event SPRITE_VOLTORB, 9, 22, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_3
- person_event SPRITE_ROCKET, 13, 25, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM17, EVENT_TEAM_ROCKET_BASE_POPULATION
- person_event SPRITE_ROCKET, 1, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 1, TrainerGruntM18, EVENT_TEAM_ROCKET_BASE_POPULATION
- person_event SPRITE_ROCKET, 14, 21, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 4, TrainerGruntM19, EVENT_TEAM_ROCKET_BASE_POPULATION
- person_event SPRITE_POKE_BALL, 10, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TeamRocketBaseB2FTMThief, EVENT_TEAM_ROCKET_BASE_B2F_TM_THIEF
+ object_event SPRITE_ROCKET, 16, 20, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_GRUNT_WITH_EXECUTIVE
+ object_event SPRITE_ROCKET_GIRL, 16, 20, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_EXECUTIVE
+ object_event SPRITE_LANCE, 13, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_LANCE
+ object_event SPRITE_DRAGON, 13, 9, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_DRAGONITE
+ object_event SPRITE_VOLTORB, 5, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RocketElectrode1, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_1
+ object_event SPRITE_VOLTORB, 7, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RocketElectrode2, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_2
+ object_event SPRITE_VOLTORB, 9, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RocketElectrode3, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_3
+ object_event SPRITE_VOLTORB, 5, 22, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_1
+ object_event SPRITE_VOLTORB, 7, 22, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_2
+ object_event SPRITE_VOLTORB, 9, 22, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_3
+ object_event SPRITE_ROCKET, 13, 25, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM17, EVENT_TEAM_ROCKET_BASE_POPULATION
+ object_event SPRITE_ROCKET, 1, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 1, TrainerGruntM18, EVENT_TEAM_ROCKET_BASE_POPULATION
+ object_event SPRITE_ROCKET, 14, 21, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 4, TrainerGruntM19, EVENT_TEAM_ROCKET_BASE_POPULATION
+ object_event SPRITE_POKE_BALL, 10, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB2FTMThief, EVENT_TEAM_ROCKET_BASE_B2F_TM_THIEF
diff --git a/maps/TeamRocketBaseB3F.asm b/maps/TeamRocketBaseB3F.asm
index 990e55608..f366f35aa 100644
--- a/maps/TeamRocketBaseB3F.asm
+++ b/maps/TeamRocketBaseB3F.asm
@@ -15,33 +15,28 @@ const_value set 2
const TEAMROCKETBASEB3F_POKE_BALL5
TeamRocketBaseB3F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 4
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
- maptrigger .Trigger2
- maptrigger .Trigger3
+ scene_script .LanceGetsPassword
+ scene_script .DummyScene1
+ scene_script .DummyScene2
+ scene_script .DummyScene3
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_TILES, .CheckGiovanniDoor
-.Trigger0:
+.LanceGetsPassword:
priorityjump LanceGetPasswordScript
end
-.Trigger1:
+.DummyScene1:
end
-.Trigger2:
+.DummyScene2:
end
-.Trigger3:
+.DummyScene3:
end
.CheckGiovanniDoor:
@@ -65,7 +60,7 @@ LanceGetPasswordScript:
closetext
applymovement TEAMROCKETBASEB3F_LANCE, MovementData_0x6e12c
disappear TEAMROCKETBASEB3F_LANCE
- dotrigger $1
+ setscene $1
end
RocketBaseRival:
@@ -84,12 +79,12 @@ RocketBaseRival:
applymovement PLAYER, RocketBaseRivalShovesPlayerMovement
applymovement TEAMROCKETBASEB3F_SILVER, RocketBaseRivalLeaveMovement
disappear TEAMROCKETBASEB3F_SILVER
- dotrigger $2
+ setscene $2
special RestartMapMusic
end
-RocketScript_0x6e048:
- jumptextfaceplayer UnknownText_0x6e235
+TeamRocketBaseB3FRocketScript:
+ jumptextfaceplayer TeamRocketBaseB3FRocketText
UnknownScript_0x6e04b:
applymovement PLAYER, MovementData_0x6e133
@@ -109,7 +104,7 @@ UnknownScript_0x6e056:
applymovement TEAMROCKETBASEB3F_ROCKET1, MovementData_0x6e142
winlosstext UnknownText_0x6e511, 0
setlasttalked TEAMROCKETBASEB3F_ROCKET1
- loadtrainer EXECUTIVEM, 4
+ loadtrainer EXECUTIVEM, EXECUTIVEM_4
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_ROCKET_EXECUTIVEM_4
@@ -121,7 +116,7 @@ UnknownScript_0x6e056:
playsound SFX_TACKLE
applymovement TEAMROCKETBASEB3F_ROCKET1, MovementData_0x6e147
disappear TEAMROCKETBASEB3F_ROCKET1
- dotrigger $3
+ setscene $3
end
RocketBaseMurkrow:
@@ -138,7 +133,7 @@ SlowpokeTailGrunt:
GruntF5Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6e611
+ writetext GruntF5AfterBattleText
waitbutton
closetext
setevent EVENT_LEARNED_SLOWPOKETAIL
@@ -150,37 +145,36 @@ RaticateTailGrunt:
GruntM28Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6e737
+ writetext GruntM28AfterBattleText
waitbutton
closetext
setevent EVENT_LEARNED_RATICATE_TAIL
end
TrainerScientistRoss:
- trainer EVENT_BEAT_SCIENTIST_ROSS, SCIENTIST, ROSS, ScientistRossSeenText, ScientistRossBeatenText, 0, ScientistRossScript
+ trainer EVENT_BEAT_SCIENTIST_ROSS, SCIENTIST, ROSS, ScientistRossSeenText, ScientistRossBeatenText, 0, .Script
-ScientistRossScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6e822
+ writetext ScientistRossAfterBattleText
waitbutton
closetext
end
TrainerScientistMitch:
- trainer EVENT_BEAT_SCIENTIST_MITCH, SCIENTIST, MITCH, ScientistMitchSeenText, ScientistMitchBeatenText, 0, ScientistMitchScript
+ trainer EVENT_BEAT_SCIENTIST_MITCH, SCIENTIST, MITCH, ScientistMitchSeenText, ScientistMitchBeatenText, 0, .Script
-ScientistMitchScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x6e90a
+ writetext ScientistMitchAfterBattleText
waitbutton
closetext
end
-BossDoor:
- dw EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE
- dw .Script
+TeamRocketBaseB3FLockedDoor:
+ dw EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE, .Script
.Script:
opentext
@@ -207,7 +201,7 @@ BossDoor:
waitsfx
end
-MapTeamRocketBaseB3FSignpost9Script:
+TeamRocketBaseB3FOathScript:
jumpstd teamrocketoath
TeamRocketBaseB3FProtein:
@@ -343,7 +337,7 @@ LanceGetPasswordText:
line "get the passwords."
done
-UnknownText_0x6e235:
+TeamRocketBaseB3FRocketText:
text "Urrggh… The guy"
line "in the cape is"
cont "incredibly tough…"
@@ -456,7 +450,7 @@ GruntF5BeatenText:
line "I'll tell you."
done
-UnknownText_0x6e611:
+GruntF5AfterBattleText:
text "The password to"
line "the boss's room is"
@@ -490,7 +484,7 @@ GruntM28BeatenText:
line "You're good!"
done
-UnknownText_0x6e737:
+GruntM28AfterBattleText:
text "Hyuck-hyuck-hyuck!"
para "The password to"
@@ -517,7 +511,7 @@ ScientistRossBeatenText:
line "error cost me…"
done
-UnknownText_0x6e822:
+ScientistRossAfterBattleText:
text "A radio signal"
line "that drives #-"
cont "MON mad…"
@@ -544,7 +538,7 @@ ScientistMitchBeatenText:
cont "battling."
done
-UnknownText_0x6e90a:
+ScientistMitchAfterBattleText:
text "If we turn up the"
line "power of our radio"
@@ -582,38 +576,38 @@ TeamRocketBaseB3F_MapEventHeader:
warp_def $6, $3, 4, TEAM_ROCKET_BASE_B2F
warp_def $e, $1b, 5, TEAM_ROCKET_BASE_B2F
-.XYTriggers:
+.CoordEvents:
db 3
- xy_trigger 2, $8, $a, $0, UnknownScript_0x6e04b, $0, $0
- xy_trigger 2, $8, $b, $0, UnknownScript_0x6e052, $0, $0
- xy_trigger 1, $a, $8, $0, RocketBaseRival, $0, $0
+ coord_event 2, $8, $a, UnknownScript_0x6e04b
+ coord_event 2, $8, $b, UnknownScript_0x6e052
+ coord_event 1, $a, $8, RocketBaseRival
-.Signposts:
+.BGEvents:
db 10
- signpost 9, 10, SIGNPOST_IFNOTSET, BossDoor
- signpost 9, 11, SIGNPOST_IFNOTSET, BossDoor
- signpost 1, 10, SIGNPOST_READ, MapTeamRocketBaseB3FSignpost9Script
- signpost 1, 11, SIGNPOST_READ, MapTeamRocketBaseB3FSignpost9Script
- signpost 1, 12, SIGNPOST_READ, MapTeamRocketBaseB3FSignpost9Script
- signpost 1, 13, SIGNPOST_READ, MapTeamRocketBaseB3FSignpost9Script
- signpost 13, 4, SIGNPOST_READ, MapTeamRocketBaseB3FSignpost9Script
- signpost 13, 5, SIGNPOST_READ, MapTeamRocketBaseB3FSignpost9Script
- signpost 13, 6, SIGNPOST_READ, MapTeamRocketBaseB3FSignpost9Script
- signpost 13, 7, SIGNPOST_READ, MapTeamRocketBaseB3FSignpost9Script
-
-.PersonEvents:
+ bg_event 9, 10, BGEVENT_IFNOTSET, TeamRocketBaseB3FLockedDoor
+ bg_event 9, 11, BGEVENT_IFNOTSET, TeamRocketBaseB3FLockedDoor
+ bg_event 1, 10, BGEVENT_READ, TeamRocketBaseB3FOathScript
+ bg_event 1, 11, BGEVENT_READ, TeamRocketBaseB3FOathScript
+ bg_event 1, 12, BGEVENT_READ, TeamRocketBaseB3FOathScript
+ bg_event 1, 13, BGEVENT_READ, TeamRocketBaseB3FOathScript
+ bg_event 13, 4, BGEVENT_READ, TeamRocketBaseB3FOathScript
+ bg_event 13, 5, BGEVENT_READ, TeamRocketBaseB3FOathScript
+ bg_event 13, 6, BGEVENT_READ, TeamRocketBaseB3FOathScript
+ bg_event 13, 7, BGEVENT_READ, TeamRocketBaseB3FOathScript
+
+.ObjectEvents:
db 14
- person_event SPRITE_LANCE, 14, 25, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LanceGetPasswordScript, EVENT_TEAM_ROCKET_BASE_B3F_LANCE_PASSWORDS
- person_event SPRITE_ROCKET, 3, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B3F_EXECUTIVE
- person_event SPRITE_MOLTRES, 2, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, RocketBaseMurkrow, EVENT_TEAM_ROCKET_BASE_POPULATION
- person_event SPRITE_ROCKET_GIRL, 7, 21, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 0, SlowpokeTailGrunt, EVENT_TEAM_ROCKET_BASE_POPULATION
- person_event SPRITE_ROCKET, 14, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, RaticateTailGrunt, EVENT_TEAM_ROCKET_BASE_POPULATION
- person_event SPRITE_SCIENTIST, 11, 23, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 0, TrainerScientistRoss, EVENT_TEAM_ROCKET_BASE_POPULATION
- person_event SPRITE_SCIENTIST, 15, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerScientistMitch, EVENT_TEAM_ROCKET_BASE_POPULATION
- person_event SPRITE_ROCKET, 14, 24, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, RocketScript_0x6e048, EVENT_TEAM_ROCKET_BASE_POPULATION
- person_event SPRITE_SILVER, 5, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_TEAM_ROCKET_BASE
- person_event SPRITE_POKE_BALL, 12, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TeamRocketBaseB3FProtein, EVENT_TEAM_ROCKET_BASE_B3F_PROTEIN
- person_event SPRITE_POKE_BALL, 12, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TeamRocketBaseB3FXSpecial, EVENT_TEAM_ROCKET_BASE_B3F_X_SPECIAL
- person_event SPRITE_POKE_BALL, 9, 28, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TeamRocketBaseB3FFullHeal, EVENT_TEAM_ROCKET_BASE_B3F_FULL_HEAL
- person_event SPRITE_POKE_BALL, 2, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TeamRocketBaseB3FIceHeal, EVENT_TEAM_ROCKET_BASE_B3F_ICE_HEAL
- person_event SPRITE_POKE_BALL, 10, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TeamRocketBaseB3FUltraBall, EVENT_TEAM_ROCKET_BASE_B3F_ULTRA_BALL
+ object_event SPRITE_LANCE, 14, 25, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LanceGetPasswordScript, EVENT_TEAM_ROCKET_BASE_B3F_LANCE_PASSWORDS
+ object_event SPRITE_ROCKET, 3, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B3F_EXECUTIVE
+ object_event SPRITE_MOLTRES, 2, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RocketBaseMurkrow, EVENT_TEAM_ROCKET_BASE_POPULATION
+ object_event SPRITE_ROCKET_GIRL, 7, 21, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 0, SlowpokeTailGrunt, EVENT_TEAM_ROCKET_BASE_POPULATION
+ object_event SPRITE_ROCKET, 14, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, RaticateTailGrunt, EVENT_TEAM_ROCKET_BASE_POPULATION
+ object_event SPRITE_SCIENTIST, 11, 23, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 0, TrainerScientistRoss, EVENT_TEAM_ROCKET_BASE_POPULATION
+ object_event SPRITE_SCIENTIST, 15, 11, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerScientistMitch, EVENT_TEAM_ROCKET_BASE_POPULATION
+ object_event SPRITE_ROCKET, 14, 24, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TeamRocketBaseB3FRocketScript, EVENT_TEAM_ROCKET_BASE_POPULATION
+ object_event SPRITE_SILVER, 5, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_TEAM_ROCKET_BASE
+ object_event SPRITE_POKE_BALL, 12, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB3FProtein, EVENT_TEAM_ROCKET_BASE_B3F_PROTEIN
+ object_event SPRITE_POKE_BALL, 12, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB3FXSpecial, EVENT_TEAM_ROCKET_BASE_B3F_X_SPECIAL
+ object_event SPRITE_POKE_BALL, 9, 28, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB3FFullHeal, EVENT_TEAM_ROCKET_BASE_B3F_FULL_HEAL
+ object_event SPRITE_POKE_BALL, 2, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB3FIceHeal, EVENT_TEAM_ROCKET_BASE_B3F_ICE_HEAL
+ object_event SPRITE_POKE_BALL, 10, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB3FUltraBall, EVENT_TEAM_ROCKET_BASE_B3F_ULTRA_BALL
diff --git a/maps/TimeCapsule.asm b/maps/TimeCapsule.asm
index 014e0d26b..03c22bad3 100644
--- a/maps/TimeCapsule.asm
+++ b/maps/TimeCapsule.asm
@@ -3,28 +3,23 @@ const_value set 2
const TIMECAPSULE_CHRIS2
TimeCapsule_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .InitializeTimeCapsule
+ scene_script .DummyScene
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_OBJECTS, .SetWhichChris
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, TimeCapsule_SetWhichChris
-
-.Trigger0:
- priorityjump TimeCapsule_Initialize
+.InitializeTimeCapsule:
+ priorityjump .InitializeAndPreparePokecenter2F
end
-.Trigger1:
+.DummyScene:
end
-TimeCapsule_SetWhichChris:
+.SetWhichChris:
special Special_CableClubCheckWhichChris
iffalse .Chris2
disappear TIMECAPSULE_CHRIS2
@@ -36,9 +31,9 @@ TimeCapsule_SetWhichChris:
appear TIMECAPSULE_CHRIS2
return
-TimeCapsule_Initialize:
- dotrigger $1
- domaptrigger POKECENTER_2F, $3
+.InitializeAndPreparePokecenter2F:
+ setscene $1
+ setmapscene POKECENTER_2F, $3
end
MapTimeCapsuleSignpost1Script:
@@ -67,15 +62,15 @@ TimeCapsule_MapEventHeader:
warp_def $7, $4, 4, POKECENTER_2F
warp_def $7, $5, 4, POKECENTER_2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 4, 4, SIGNPOST_RIGHT, MapTimeCapsuleSignpost1Script
- signpost 4, 5, SIGNPOST_LEFT, MapTimeCapsuleSignpost1Script
+ bg_event 4, 4, BGEVENT_RIGHT, MapTimeCapsuleSignpost1Script
+ bg_event 4, 5, BGEVENT_LEFT, MapTimeCapsuleSignpost1Script
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_CHRIS, 4, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ChrisScript_0x19351a, EVENT_GAVE_KURT_APRICORNS
- person_event SPRITE_CHRIS, 4, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ChrisScript_0x19351a, EVENT_RECEIVED_BALLS_FROM_KURT
+ object_event SPRITE_CHRIS, 4, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ChrisScript_0x19351a, EVENT_GAVE_KURT_APRICORNS
+ object_event SPRITE_CHRIS, 4, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ChrisScript_0x19351a, EVENT_RECEIVED_BALLS_FROM_KURT
diff --git a/maps/TinTower1F.asm b/maps/TinTower1F.asm
index c2b88b2a1..1d0340a0b 100644
--- a/maps/TinTower1F.asm
+++ b/maps/TinTower1F.asm
@@ -11,70 +11,64 @@ const_value set 2
const TINTOWER1F_SAGE6
TinTower1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x18502a, 0
- dw UnknownScript_0x18502e, 0
+ scene_script .FaceSuicune
+ scene_script .DummyScene
.MapCallbacks:
db 2
+ dbw MAPCALLBACK_OBJECTS, .NPCsCallback
+ dbw MAPCALLBACK_TILES, .StairsCallback
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, UnknownScript_0x18502f
-
- dbw MAPCALLBACK_TILES, TinTowerStairsCallback
-
-UnknownScript_0x18502a:
- priorityjump SuicuneBattle
+.FaceSuicune:
+ priorityjump .SuicuneBattle
end
-UnknownScript_0x18502e:
+.DummyScene:
end
-UnknownScript_0x18502f:
+.NPCsCallback:
checkevent EVENT_GOT_RAINBOW_WING
- iftrue UnknownScript_0x185047
+ iftrue .GotRainbowWing
checkevent EVENT_BEAT_ELITE_FOUR
- iffalse UnknownScript_0x185050
+ iffalse .FaceBeasts
special SpecialBeastsCheck
- iffalse UnknownScript_0x185050
+ iffalse .FaceBeasts
clearevent EVENT_TIN_TOWER_1F_WISE_TRIO_2
setevent EVENT_TIN_TOWER_1F_WISE_TRIO_1
-UnknownScript_0x185047:
+.GotRainbowWing:
checkevent EVENT_FOUGHT_HO_OH
iffalse .Done
appear TINTOWER1F_EUSINE
.Done:
return
-UnknownScript_0x185050:
+.FaceBeasts:
checkevent EVENT_FOUGHT_SUICUNE
- iftrue UnknownScript_0x185077
+ iftrue .FoughtSuicune
appear TINTOWER1F_SUICUNE
writebyte RAIKOU
special SpecialMonCheck
- iftrue UnknownScript_0x185065
+ iftrue .NoRaikou
appear TINTOWER1F_RAIKOU
- jump UnknownScript_0x185067
+ jump .CheckEntei
-UnknownScript_0x185065:
+.NoRaikou:
disappear TINTOWER1F_RAIKOU
-UnknownScript_0x185067:
+.CheckEntei:
writebyte ENTEI
special SpecialMonCheck
- iftrue UnknownScript_0x185074
+ iftrue .NoEntei
appear TINTOWER1F_ENTEI
- jump UnknownScript_0x185076
+ jump .BeastsDone
-UnknownScript_0x185074:
+.NoEntei:
disappear TINTOWER1F_ENTEI
-UnknownScript_0x185076:
+.BeastsDone:
return
-UnknownScript_0x185077:
+.FoughtSuicune:
disappear TINTOWER1F_SUICUNE
disappear TINTOWER1F_RAIKOU
disappear TINTOWER1F_ENTEI
@@ -82,14 +76,14 @@ UnknownScript_0x185077:
setevent EVENT_TIN_TOWER_1F_WISE_TRIO_2
return
-TinTowerStairsCallback:
+.StairsCallback:
checkevent EVENT_GOT_RAINBOW_WING
- iftrue .NoChange
+ iftrue .DontHideStairs
changeblock $a, $2, $9
-.NoChange:
+.DontHideStairs:
return
-SuicuneBattle:
+.SuicuneBattle:
applymovement PLAYER, TinTowerPlayerMovement1
pause 15
writebyte RAIKOU
@@ -131,36 +125,36 @@ SuicuneBattle:
disappear TINTOWER1F_SUICUNE
setevent EVENT_FOUGHT_SUICUNE
setevent EVENT_SAW_SUICUNE_ON_ROUTE_42
- domaptrigger ROUTE_42, $0
+ setmapscene ROUTE_42, $0
setevent EVENT_SAW_SUICUNE_ON_ROUTE_36
- domaptrigger ROUTE_36, $0
+ setmapscene ROUTE_36, $0
setevent EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY
- domaptrigger CIANWOOD_CITY, $0
- dotrigger $1
+ setmapscene CIANWOOD_CITY, $0
+ setscene $1
clearevent EVENT_SET_WHEN_FOUGHT_HO_OH
reloadmapafterbattle
pause 20
spriteface PLAYER, DOWN
playmusic MUSIC_MYSTICALMAN_ENCOUNTER
playsound SFX_ENTER_DOOR
- moveperson TINTOWER1F_EUSINE, $a, $f
+ moveobject TINTOWER1F_EUSINE, $a, $f
appear TINTOWER1F_EUSINE
applymovement TINTOWER1F_EUSINE, MovementData_0x1851ec
playsound SFX_ENTER_DOOR
- moveperson TINTOWER1F_SAGE1, $9, $f
+ moveobject TINTOWER1F_SAGE1, $9, $f
appear TINTOWER1F_SAGE1
applymovement TINTOWER1F_SAGE1, MovementData_0x1851f5
playsound SFX_ENTER_DOOR
- moveperson TINTOWER1F_SAGE2, $9, $f
+ moveobject TINTOWER1F_SAGE2, $9, $f
appear TINTOWER1F_SAGE2
applymovement TINTOWER1F_SAGE2, MovementData_0x1851fb
playsound SFX_ENTER_DOOR
- moveperson TINTOWER1F_SAGE3, $9, $f
+ moveobject TINTOWER1F_SAGE3, $9, $f
appear TINTOWER1F_SAGE3
applymovement TINTOWER1F_SAGE3, MovementData_0x1851fe
- moveperson TINTOWER1F_SAGE1, $7, $d
- moveperson TINTOWER1F_SAGE2, $9, $d
- moveperson TINTOWER1F_SAGE3, $b, $d
+ moveobject TINTOWER1F_SAGE1, $7, $d
+ moveobject TINTOWER1F_SAGE2, $9, $d
+ moveobject TINTOWER1F_SAGE3, $b, $d
spriteface PLAYER, RIGHT
opentext
writetext TinTowerEusineSuicuneText
@@ -175,31 +169,31 @@ SuicuneBattle:
playmapmusic
end
-SageScript_0x185173:
- jumptextfaceplayer UnknownText_0x185386
+TinTower1FSage1Script:
+ jumptextfaceplayer TinTower1FSage1Text
-SageScript_0x185176:
- jumptextfaceplayer UnknownText_0x185433
+TinTower1FSage2Script:
+ jumptextfaceplayer TinTower1FSage2Text
-SageScript_0x185179:
- jumptextfaceplayer UnknownText_0x185544
+TinTower1FSage3Script:
+ jumptextfaceplayer TinTower1FSage3Text
-SageScript_0x18517c:
+TinTower1FSage4Script:
checkevent EVENT_FOUGHT_HO_OH
- iftrue UnknownScript_0x185185
- jumptextfaceplayer UnknownText_0x1855ee
+ iftrue .FoughtHoOh
+ jumptextfaceplayer TinTower1FSage4Text1
-UnknownScript_0x185185:
- jumptextfaceplayer UnknownText_0x185765
+.FoughtHoOh:
+ jumptextfaceplayer TinTower1FSage4Text2
-SageScript_0x185188:
+TinTower1FSage5Script:
faceplayer
opentext
checkevent EVENT_FOUGHT_HO_OH
- iftrue UnknownScript_0x1851b6
+ iftrue .FoughtHoOh
checkevent EVENT_GOT_RAINBOW_WING
- iftrue UnknownScript_0x1851b0
- writetext UnknownText_0x185629
+ iftrue .GotRainbowWing
+ writetext TinTower1FSage5Text1
buttonsound
verbosegiveitem RAINBOW_WING
closetext
@@ -212,25 +206,25 @@ SageScript_0x185188:
setevent EVENT_GOT_RAINBOW_WING
closetext
opentext
-UnknownScript_0x1851b0:
- writetext UnknownText_0x18564a
+.GotRainbowWing:
+ writetext TinTower1FSage5Text2
waitbutton
closetext
end
-UnknownScript_0x1851b6:
- writetext UnknownText_0x185803
+.FoughtHoOh:
+ writetext TinTower1FSage5Text3
waitbutton
closetext
end
-SageScript_0x1851bc:
+TinTower1FSage6Script:
checkevent EVENT_FOUGHT_HO_OH
- iftrue UnknownScript_0x1851c5
- jumptextfaceplayer UnknownText_0x185654
+ iftrue .FoughtHoOh
+ jumptextfaceplayer TinTower1FSage6Text1
-UnknownScript_0x1851c5:
- jumptextfaceplayer UnknownText_0x1858d0
+.FoughtHoOh:
+ jumptextfaceplayer TinTower1FSage6Text2
TinTowerEusine:
jumptextfaceplayer TinTowerEusineHoOhText
@@ -353,7 +347,7 @@ TinTowerEusineSuicuneText:
para "Later, <PLAYER>!"
done
-UnknownText_0x185386:
+TinTower1FSage1Text:
text "According to"
line "legend…"
@@ -373,7 +367,7 @@ UnknownText_0x185386:
line "humans?"
done
-UnknownText_0x185433:
+TinTower1FSage2Text:
text "When the BRASS"
line "TOWER burned down,"
@@ -405,7 +399,7 @@ UnknownText_0x185433:
line "say."
done
-UnknownText_0x185544:
+TinTower1FSage3Text:
text "The two TOWERS are"
line "said to have been"
@@ -422,7 +416,7 @@ UnknownText_0x185544:
line "important today."
done
-UnknownText_0x1855ee:
+TinTower1FSage4Text1:
text "HO-OH appears to"
line "have descended"
@@ -430,16 +424,16 @@ UnknownText_0x1855ee:
line "TOWER!"
done
-UnknownText_0x185629:
+TinTower1FSage5Text1:
text "This will protect"
line "you. Take it."
done
-UnknownText_0x18564a:
+TinTower1FSage5Text2:
text "Now, go."
done
-UnknownText_0x185654:
+TinTower1FSage6Text1:
text "I believe you are"
line "being tested."
@@ -470,7 +464,7 @@ TinTowerEusineHoOhText:
line "#MANIAC!"
done
-UnknownText_0x185765:
+TinTower1FSage4Text2:
text "The legendary"
line "#MON are said"
@@ -487,7 +481,7 @@ UnknownText_0x185765:
line "put out the fire…"
done
-UnknownText_0x185803:
+TinTower1FSage5Text3:
text "When the legendary"
line "#MON appeared…"
@@ -508,7 +502,7 @@ UnknownText_0x185803:
cont "frightened people."
done
-UnknownText_0x1858d0:
+TinTower1FSage6Text2:
text "Of the legendary"
line "#MON, SUICUNE"
@@ -538,21 +532,21 @@ TinTower1F_MapEventHeader:
warp_def $f, $a, 12, ECRUTEAK_CITY
warp_def $2, $a, 2, TIN_TOWER_2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 10
- person_event SPRITE_SUICUNE, 9, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_TIN_TOWER_1F_SUICUNE
- person_event SPRITE_RAIKOU, 9, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_TIN_TOWER_1F_RAIKOU
- person_event SPRITE_ENTEI, 9, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_TIN_TOWER_1F_ENTEI
- person_event SPRITE_SUPER_NERD, 3, 8, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, TinTowerEusine, EVENT_TIN_TOWER_1F_EUSINE
- person_event SPRITE_SAGE, 9, 5, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SageScript_0x185173, EVENT_TIN_TOWER_1F_WISE_TRIO_1
- person_event SPRITE_SAGE, 11, 11, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SageScript_0x185176, EVENT_TIN_TOWER_1F_WISE_TRIO_1
- person_event SPRITE_SAGE, 6, 14, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SageScript_0x185179, EVENT_TIN_TOWER_1F_WISE_TRIO_1
- person_event SPRITE_SAGE, 2, 4, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SageScript_0x18517c, EVENT_TIN_TOWER_1F_WISE_TRIO_2
- person_event SPRITE_SAGE, 1, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SageScript_0x185188, EVENT_TIN_TOWER_1F_WISE_TRIO_2
- person_event SPRITE_SAGE, 2, 14, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SageScript_0x1851bc, EVENT_TIN_TOWER_1F_WISE_TRIO_2
+ object_event SPRITE_SUICUNE, 9, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TIN_TOWER_1F_SUICUNE
+ object_event SPRITE_RAIKOU, 9, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TIN_TOWER_1F_RAIKOU
+ object_event SPRITE_ENTEI, 9, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TIN_TOWER_1F_ENTEI
+ object_event SPRITE_SUPER_NERD, 3, 8, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, TinTowerEusine, EVENT_TIN_TOWER_1F_EUSINE
+ object_event SPRITE_SAGE, 9, 5, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TinTower1FSage1Script, EVENT_TIN_TOWER_1F_WISE_TRIO_1
+ object_event SPRITE_SAGE, 11, 11, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TinTower1FSage2Script, EVENT_TIN_TOWER_1F_WISE_TRIO_1
+ object_event SPRITE_SAGE, 6, 14, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TinTower1FSage3Script, EVENT_TIN_TOWER_1F_WISE_TRIO_1
+ object_event SPRITE_SAGE, 2, 4, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TinTower1FSage4Script, EVENT_TIN_TOWER_1F_WISE_TRIO_2
+ object_event SPRITE_SAGE, 1, 9, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TinTower1FSage5Script, EVENT_TIN_TOWER_1F_WISE_TRIO_2
+ object_event SPRITE_SAGE, 2, 14, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TinTower1FSage6Script, EVENT_TIN_TOWER_1F_WISE_TRIO_2
diff --git a/maps/TinTower2F.asm b/maps/TinTower2F.asm
index 95c9724ea..e572e6907 100644
--- a/maps/TinTower2F.asm
+++ b/maps/TinTower2F.asm
@@ -1,5 +1,5 @@
TinTower2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -14,11 +14,11 @@ TinTower2F_MapEventHeader:
warp_def $e, $a, 1, TIN_TOWER_3F
warp_def $2, $a, 3, TIN_TOWER_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/TinTower3F.asm b/maps/TinTower3F.asm
index 197859e64..c3d36d9cf 100644
--- a/maps/TinTower3F.asm
+++ b/maps/TinTower3F.asm
@@ -2,7 +2,7 @@ const_value set 2
const TINTOWER3F_POKE_BALL
TinTower3F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -20,12 +20,12 @@ TinTower3F_MapEventHeader:
warp_def $e, $a, 1, TIN_TOWER_2F
warp_def $2, $10, 2, TIN_TOWER_4F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKE_BALL, 14, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TinTower3FFullHeal, EVENT_TIN_TOWER_3F_FULL_HEAL
+ object_event SPRITE_POKE_BALL, 14, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower3FFullHeal, EVENT_TIN_TOWER_3F_FULL_HEAL
diff --git a/maps/TinTower4F.asm b/maps/TinTower4F.asm
index 5abc17a22..e04404c5d 100644
--- a/maps/TinTower4F.asm
+++ b/maps/TinTower4F.asm
@@ -4,7 +4,7 @@ const_value set 2
const TINTOWER4F_POKE_BALL3
TinTower4F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -34,15 +34,15 @@ TinTower4F_MapEventHeader:
warp_def $e, $2, 3, TIN_TOWER_5F
warp_def $f, $11, 4, TIN_TOWER_5F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 6, 11, SIGNPOST_ITEM, TinTower4FHiddenMaxPotion
+ bg_event 6, 11, BGEVENT_ITEM, TinTower4FHiddenMaxPotion
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_POKE_BALL, 10, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TinTower4FUltraBall, EVENT_TIN_TOWER_4F_ULTRA_BALL
- person_event SPRITE_POKE_BALL, 14, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TinTower4FPPUp, EVENT_TIN_TOWER_4F_PP_UP
- person_event SPRITE_POKE_BALL, 12, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TinTower4FEscapeRope, EVENT_TIN_TOWER_4F_ESCAPE_ROPE
+ object_event SPRITE_POKE_BALL, 10, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower4FUltraBall, EVENT_TIN_TOWER_4F_ULTRA_BALL
+ object_event SPRITE_POKE_BALL, 14, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower4FPPUp, EVENT_TIN_TOWER_4F_PP_UP
+ object_event SPRITE_POKE_BALL, 12, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower4FEscapeRope, EVENT_TIN_TOWER_4F_ESCAPE_ROPE
diff --git a/maps/TinTower5F.asm b/maps/TinTower5F.asm
index 8c9c09730..b3448203f 100644
--- a/maps/TinTower5F.asm
+++ b/maps/TinTower5F.asm
@@ -2,7 +2,7 @@ const_value set 2
const TINTOWER5F_POKE_BALL
TinTower5F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -30,14 +30,14 @@ TinTower5F_MapEventHeader:
warp_def $e, $2, 3, TIN_TOWER_4F
warp_def $f, $11, 4, TIN_TOWER_4F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 14, 16, SIGNPOST_ITEM, TinTower5FHiddenFullRestore
- signpost 15, 3, SIGNPOST_ITEM, TinTower5FHiddenCarbos
+ bg_event 14, 16, BGEVENT_ITEM, TinTower5FHiddenFullRestore
+ bg_event 15, 3, BGEVENT_ITEM, TinTower5FHiddenCarbos
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKE_BALL, 9, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TinTower5FRareCandy, EVENT_TIN_TOWER_5F_RARE_CANDY
+ object_event SPRITE_POKE_BALL, 9, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower5FRareCandy, EVENT_TIN_TOWER_5F_RARE_CANDY
diff --git a/maps/TinTower6F.asm b/maps/TinTower6F.asm
index d95d20429..0d297498f 100644
--- a/maps/TinTower6F.asm
+++ b/maps/TinTower6F.asm
@@ -2,7 +2,7 @@ const_value set 2
const TINTOWER6F_POKE_BALL
TinTower6F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -20,12 +20,12 @@ TinTower6F_MapEventHeader:
warp_def $9, $3, 1, TIN_TOWER_7F
warp_def $f, $b, 1, TIN_TOWER_5F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKE_BALL, 8, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TinTower6FMaxPotion, EVENT_TIN_TOWER_6F_MAX_POTION
+ object_event SPRITE_POKE_BALL, 8, 8, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower6FMaxPotion, EVENT_TIN_TOWER_6F_MAX_POTION
diff --git a/maps/TinTower7F.asm b/maps/TinTower7F.asm
index 2baba56cd..f7be3a5d8 100644
--- a/maps/TinTower7F.asm
+++ b/maps/TinTower7F.asm
@@ -2,7 +2,7 @@ const_value set 2
const TINTOWER7F_POKE_BALL
TinTower7F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -23,12 +23,12 @@ TinTower7F_MapEventHeader:
warp_def $3, $8, 3, TIN_TOWER_7F
warp_def $9, $6, 5, TIN_TOWER_9F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKE_BALL, 1, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TinTower7FMaxRevive, EVENT_TIN_TOWER_7F_MAX_REVIVE
+ object_event SPRITE_POKE_BALL, 1, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower7FMaxRevive, EVENT_TIN_TOWER_7F_MAX_REVIVE
diff --git a/maps/TinTower8F.asm b/maps/TinTower8F.asm
index 5156e92d1..bdbdca1b7 100644
--- a/maps/TinTower8F.asm
+++ b/maps/TinTower8F.asm
@@ -4,7 +4,7 @@ const_value set 2
const TINTOWER8F_POKE_BALL3
TinTower8F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -32,14 +32,14 @@ TinTower8F_MapEventHeader:
warp_def $f, $e, 6, TIN_TOWER_9F
warp_def $9, $6, 7, TIN_TOWER_9F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_POKE_BALL, 13, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TinTower8FNugget, EVENT_TIN_TOWER_8F_NUGGET
- person_event SPRITE_POKE_BALL, 6, 11, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TinTower8FMaxElixer, EVENT_TIN_TOWER_8F_MAX_ELIXER
- person_event SPRITE_POKE_BALL, 1, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TinTower8FFullRestore, EVENT_TIN_TOWER_8F_FULL_RESTORE
+ object_event SPRITE_POKE_BALL, 13, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower8FNugget, EVENT_TIN_TOWER_8F_NUGGET
+ object_event SPRITE_POKE_BALL, 6, 11, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower8FMaxElixer, EVENT_TIN_TOWER_8F_MAX_ELIXER
+ object_event SPRITE_POKE_BALL, 1, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower8FFullRestore, EVENT_TIN_TOWER_8F_FULL_RESTORE
diff --git a/maps/TinTower9F.asm b/maps/TinTower9F.asm
index 728a94147..83431425c 100644
--- a/maps/TinTower9F.asm
+++ b/maps/TinTower9F.asm
@@ -2,7 +2,7 @@ const_value set 2
const TINTOWER9F_POKE_BALL
TinTower9F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -11,11 +11,13 @@ TinTower9F_MapScriptHeader:
TinTower9FHPUp:
itemball HP_UP
-UnknownText_0x185b8a:
+; unused
+TinTower9FUnusedHoOhText:
text "HO-OH: Shaoooh!"
done
-UnknownText_0x185b9b:
+; unused
+TinTower9FUnusedLugiaText:
text "LUGIA: Gyaaan!"
done
@@ -33,12 +35,12 @@ TinTower9F_MapEventHeader:
warp_def $d, $6, 5, TIN_TOWER_8F
warp_def $d, $8, 6, TIN_TOWER_8F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKE_BALL, 1, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TinTower9FHPUp, EVENT_TIN_TOWER_9F_HP_UP
+ object_event SPRITE_POKE_BALL, 1, 9, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower9FHPUp, EVENT_TIN_TOWER_9F_HP_UP
diff --git a/maps/TinTowerRoof.asm b/maps/TinTowerRoof.asm
index f1ab17ccf..0a70a58ee 100644
--- a/maps/TinTowerRoof.asm
+++ b/maps/TinTowerRoof.asm
@@ -2,14 +2,11 @@ const_value set 2
const TINTOWERROOF_HO_OH
TinTowerRoof_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_OBJECTS, .HoOh
.HoOh:
@@ -55,12 +52,12 @@ TinTowerRoof_MapEventHeader:
db 1
warp_def $d, $9, 4, TIN_TOWER_9F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_HO_OH, 5, 9, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, TinTowerHoOh, EVENT_TIN_TOWER_ROOF_HO_OH
+ object_event SPRITE_HO_OH, 5, 9, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, TinTowerHoOh, EVENT_TIN_TOWER_ROOF_HO_OH
diff --git a/maps/TohjoFalls.asm b/maps/TohjoFalls.asm
index 0360c8d08..2f3589e16 100644
--- a/maps/TohjoFalls.asm
+++ b/maps/TohjoFalls.asm
@@ -2,7 +2,7 @@ const_value set 2
const TOHJOFALLS_POKE_BALL
TohjoFalls_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -20,12 +20,12 @@ TohjoFalls_MapEventHeader:
warp_def $f, $d, 2, ROUTE_27
warp_def $f, $19, 3, ROUTE_27
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKE_BALL, 6, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, TohjoFallsMoonStone, EVENT_TOHJO_FALLS_MOON_STONE
+ object_event SPRITE_POKE_BALL, 6, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TohjoFallsMoonStone, EVENT_TOHJO_FALLS_MOON_STONE
diff --git a/maps/TradeCenter.asm b/maps/TradeCenter.asm
index 36f476de4..ebd3d8a3a 100644
--- a/maps/TradeCenter.asm
+++ b/maps/TradeCenter.asm
@@ -3,28 +3,23 @@ const_value set 2
const TRADECENTER_CHRIS2
TradeCenter_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .InitializeTradeCenter
+ scene_script .DummyScene
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_OBJECTS, .SetWhichChris
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, TradeCenter_SetWhichChris
-
-.Trigger0:
- priorityjump TradeCenter_Initialize
+.InitializeTradeCenter:
+ priorityjump .InitializeAndPreparePokecenter2F
end
-.Trigger1:
+.DummyScene:
end
-TradeCenter_SetWhichChris:
+.SetWhichChris:
special Special_CableClubCheckWhichChris
iffalse .Chris2
disappear TRADECENTER_CHRIS2
@@ -36,9 +31,9 @@ TradeCenter_SetWhichChris:
appear TRADECENTER_CHRIS2
return
-TradeCenter_Initialize:
- dotrigger $1
- domaptrigger POKECENTER_2F, $1
+.InitializeAndPreparePokecenter2F:
+ setscene $1
+ setmapscene POKECENTER_2F, $1
end
MapTradeCenterSignpost1Script:
@@ -67,15 +62,15 @@ TradeCenter_MapEventHeader:
warp_def $7, $4, 2, POKECENTER_2F
warp_def $7, $5, 2, POKECENTER_2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 4, 4, SIGNPOST_RIGHT, MapTradeCenterSignpost1Script
- signpost 4, 5, SIGNPOST_LEFT, MapTradeCenterSignpost1Script
+ bg_event 4, 4, BGEVENT_RIGHT, MapTradeCenterSignpost1Script
+ bg_event 4, 5, BGEVENT_LEFT, MapTradeCenterSignpost1Script
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_CHRIS, 4, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ChrisScript_0x193499, EVENT_GAVE_KURT_APRICORNS
- person_event SPRITE_CHRIS, 4, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ChrisScript_0x193499, EVENT_RECEIVED_BALLS_FROM_KURT
+ object_event SPRITE_CHRIS, 4, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ChrisScript_0x193499, EVENT_GAVE_KURT_APRICORNS
+ object_event SPRITE_CHRIS, 4, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ChrisScript_0x193499, EVENT_RECEIVED_BALLS_FROM_KURT
diff --git a/maps/TrainerHouse1F.asm b/maps/TrainerHouse1F.asm
index d196d9a47..d62a0673f 100644
--- a/maps/TrainerHouse1F.asm
+++ b/maps/TrainerHouse1F.asm
@@ -6,26 +6,26 @@ const_value set 2
const TRAINERHOUSE1F_GENTLEMAN
TrainerHouse1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-ReceptionistScript_0x9af67:
- jumptextfaceplayer UnknownText_0x9af7f
+TrainerHouse1FReceptionistScript:
+ jumptextfaceplayer TrainerHouse1FReceptionistText
-CooltrainerMScript_0x9af6a:
- jumptextfaceplayer UnknownText_0x9b025
+TrainerHouse1FCooltrainerMScript:
+ jumptextfaceplayer TrainerHouse1FCooltrainerMText
-CooltrainerFScript_0x9af6d:
- jumptextfaceplayer UnknownText_0x9b0b5
+TrainerHouse1FCooltrainerFScript:
+ jumptextfaceplayer TrainerHouse1FCooltrainerFText
-YoungsterScript_0x9af70:
- jumptextfaceplayer UnknownText_0x9b11d
+TrainerHouse1FYoungsterScript:
+ jumptextfaceplayer TrainerHouse1FYoungsterText
-GentlemanScript_0x9af73:
- jumptextfaceplayer UnknownText_0x9b1c9
+TrainerHouse1FGentlemanScript:
+ jumptextfaceplayer TrainerHouse1FGentlemanText
MapTrainerHouse1FSignpost0Script:
jumptext UnknownText_0x9b1f4
@@ -36,7 +36,7 @@ MapTrainerHouse1FSignpost1Script:
MapTrainerHouse1FSignpost2Script:
jumptext UnknownText_0x9b2c1
-UnknownText_0x9af7f:
+TrainerHouse1FReceptionistText:
text "Welcome to TRAINER"
line "HOUSE, the newest"
@@ -53,7 +53,7 @@ UnknownText_0x9af7f:
line "downstairs."
done
-UnknownText_0x9b025:
+TrainerHouse1FCooltrainerMText:
text "VIRIDIAN is the"
line "town closest to"
cont "INDIGO PLATEAU."
@@ -68,7 +68,7 @@ UnknownText_0x9b025:
line "PLATEAU."
done
-UnknownText_0x9b0b5:
+TrainerHouse1FCooltrainerFText:
text "They hold practice"
line "battles downstairs"
cont "here."
@@ -80,7 +80,7 @@ UnknownText_0x9b0b5:
line "battles."
done
-UnknownText_0x9b11d:
+TrainerHouse1FYoungsterText:
text "I guess you can't"
line "become the CHAMP"
@@ -97,7 +97,7 @@ UnknownText_0x9b11d:
line "towns in KANTO."
done
-UnknownText_0x9b1c9:
+TrainerHouse1FGentlemanText:
text "Whew… I'm taking a"
line "rest from #MON"
cont "battles."
@@ -147,19 +147,19 @@ TrainerHouse1F_MapEventHeader:
warp_def $d, $3, 3, VIRIDIAN_CITY
warp_def $2, $8, 1, TRAINER_HOUSE_B1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 0, 5, SIGNPOST_READ, MapTrainerHouse1FSignpost0Script
- signpost 0, 7, SIGNPOST_READ, MapTrainerHouse1FSignpost1Script
- signpost 10, 7, SIGNPOST_READ, MapTrainerHouse1FSignpost2Script
+ bg_event 0, 5, BGEVENT_READ, MapTrainerHouse1FSignpost0Script
+ bg_event 0, 7, BGEVENT_READ, MapTrainerHouse1FSignpost1Script
+ bg_event 10, 7, BGEVENT_READ, MapTrainerHouse1FSignpost2Script
-.PersonEvents:
+.ObjectEvents:
db 5
- person_event SPRITE_RECEPTIONIST, 11, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ReceptionistScript_0x9af67, -1
- person_event SPRITE_COOLTRAINER_M, 11, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x9af6a, -1
- person_event SPRITE_COOLTRAINER_F, 2, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x9af6d, -1
- person_event SPRITE_YOUNGSTER, 8, 4, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x9af70, -1
- person_event SPRITE_GENTLEMAN, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x9af73, -1
+ object_event SPRITE_RECEPTIONIST, 11, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, TrainerHouse1FReceptionistScript, -1
+ object_event SPRITE_COOLTRAINER_M, 11, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TrainerHouse1FCooltrainerMScript, -1
+ object_event SPRITE_COOLTRAINER_F, 2, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, TrainerHouse1FCooltrainerFScript, -1
+ object_event SPRITE_YOUNGSTER, 8, 4, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, TrainerHouse1FYoungsterScript, -1
+ object_event SPRITE_GENTLEMAN, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TrainerHouse1FGentlemanScript, -1
diff --git a/maps/TrainerHouseB1F.asm b/maps/TrainerHouseB1F.asm
index c96f5973b..43d3bcd38 100644
--- a/maps/TrainerHouseB1F.asm
+++ b/maps/TrainerHouseB1F.asm
@@ -3,16 +3,14 @@ const_value set 2
const TRAINERHOUSEB1F_CHRIS
TrainerHouseB1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 1
-
- ; triggers
- dw Trigger0, 0
+ scene_script .DummyScene
.MapCallbacks:
db 0
-Trigger0:
+.DummyScene:
end
TrainerHouseReceptionistScript:
@@ -179,14 +177,14 @@ TrainerHouseB1F_MapEventHeader:
db 1
warp_def $4, $9, 3, TRAINER_HOUSE_1F
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 0, $3, $7, $0, TrainerHouseReceptionistScript, $0, $0
+ coord_event 0, $3, $7, TrainerHouseReceptionistScript
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_RECEPTIONIST, 1, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, ObjectEvent, -1
- person_event SPRITE_CHRIS, 11, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, ObjectEvent, -1
+ object_event SPRITE_RECEPTIONIST, 1, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1
+ object_event SPRITE_CHRIS, 11, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1
diff --git a/maps/Underground.asm b/maps/Underground.asm
deleted file mode 100644
index e3c1ec3ca..000000000
--- a/maps/Underground.asm
+++ /dev/null
@@ -1,34 +0,0 @@
-Underground_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-UndergroundHiddenFullRestore:
- dwb EVENT_UNDERGROUND_HIDDEN_FULL_RESTORE, FULL_RESTORE
-
-
-UndergroundHiddenXSpecial:
- dwb EVENT_UNDERGROUND_HIDDEN_X_SPECIAL, X_SPECIAL
-
-
-Underground_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 2
- warp_def $2, $3, 3, ROUTE_5_UNDERGROUND_ENTRANCE
- warp_def $18, $3, 3, ROUTE_6_UNDERGROUND_ENTRANCE
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 2
- signpost 9, 3, SIGNPOST_ITEM, UndergroundHiddenFullRestore
- signpost 19, 1, SIGNPOST_ITEM, UndergroundHiddenXSpecial
-
-.PersonEvents:
- db 0
diff --git a/maps/UndergroundPath.asm b/maps/UndergroundPath.asm
new file mode 100644
index 000000000..6bf10e6fa
--- /dev/null
+++ b/maps/UndergroundPath.asm
@@ -0,0 +1,34 @@
+UndergroundPath_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+UndergroundPathHiddenFullRestore:
+ dwb EVENT_UNDERGROUND_PATH_HIDDEN_FULL_RESTORE, FULL_RESTORE
+
+
+UndergroundPathHiddenXSpecial:
+ dwb EVENT_UNDERGROUND_PATH_HIDDEN_X_SPECIAL, X_SPECIAL
+
+
+UndergroundPath_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 2
+ warp_def $2, $3, 3, ROUTE_5_UNDERGROUND_PATH_ENTRANCE
+ warp_def $18, $3, 3, ROUTE_6_UNDERGROUND_PATH_ENTRANCE
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 2
+ bg_event 9, 3, BGEVENT_ITEM, UndergroundPathHiddenFullRestore
+ bg_event 19, 1, BGEVENT_ITEM, UndergroundPathHiddenXSpecial
+
+.ObjectEvents:
+ db 0
diff --git a/maps/Underground.blk b/maps/UndergroundPath.blk
index a988dc5d8..a988dc5d8 100644
--- a/maps/Underground.blk
+++ b/maps/UndergroundPath.blk
diff --git a/maps/UndergroundPathSwitchRoomEntrances.asm b/maps/UndergroundPathSwitchRoomEntrances.asm
deleted file mode 100644
index bf4f1f1c9..000000000
--- a/maps/UndergroundPathSwitchRoomEntrances.asm
+++ /dev/null
@@ -1,981 +0,0 @@
-UNDERGROUND_DOOR_CLOSED1 EQU $2a
-UNDERGROUND_DOOR_CLOSED2 EQU $3e
-UNDERGROUND_DOOR_CLOSED3 EQU $3f
-UNDERGROUND_DOOR_OPEN1 EQU $2d
-UNDERGROUND_DOOR_OPEN2 EQU $3d
-
-ugdoor: macro
-\1_YCOORD EQU \2
-\1_XCOORD EQU \3
-endm
-
- ugdoor UGDOOR_1, $10, $06
- ugdoor UGDOOR_2, $0a, $06
- ugdoor UGDOOR_3, $02, $06
- ugdoor UGDOOR_4, $02, $0a
- ugdoor UGDOOR_5, $0a, $0a
- ugdoor UGDOOR_6, $10, $0a
- ugdoor UGDOOR_7, $0c, $06
- ugdoor UGDOOR_8, $0c, $08
- ugdoor UGDOOR_9, $06, $06
- ugdoor UGDOOR_10, $06, $08
- ugdoor UGDOOR_11, $0c, $0a
- ugdoor UGDOOR_12, $0c, $0c
- ugdoor UGDOOR_13, $06, $0a
- ugdoor UGDOOR_14, $06, $0c
- ugdoor UGDOOR_15, $12, $0a
- ugdoor UGDOOR_16, $12, $0c
-
-doorstate: macro
- changeblock UGDOOR_\1_YCOORD, UGDOOR_\1_XCOORD, UNDERGROUND_DOOR_\2
-endm
-
-const_value set 2
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_PHARMACIST1
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_PHARMACIST2
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_ROCKET1
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_ROCKET2
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_ROCKET3
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_ROCKET_GIRL
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_TEACHER
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_SUPER_NERD
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_POKE_BALL1
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_POKE_BALL2
- const UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
-
-UndergroundPathSwitchRoomEntrances_MapScriptHeader:
-.MapTriggers:
- db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
-
-.MapCallbacks:
- db 1
-
- ; callbacks
-
- dbw MAPCALLBACK_TILES, .UpdateDoorPositions
-
-.Trigger0:
- end
-
-.Trigger1:
- end
-
-.UpdateDoorPositions:
- checkevent EVENT_SWITCH_4
- iffalse .false4
- doorstate 1, OPEN1
-.false4
- checkevent EVENT_SWITCH_5
- iffalse .false5
- doorstate 2, OPEN1
-.false5
- checkevent EVENT_SWITCH_6
- iffalse .false6
- doorstate 3, OPEN1
-.false6
- checkevent EVENT_SWITCH_7
- iffalse .false7
- doorstate 4, OPEN1
-.false7
- checkevent EVENT_SWITCH_8
- iffalse .false8
- doorstate 5, OPEN1
-.false8
- checkevent EVENT_SWITCH_9
- iffalse .false9
- doorstate 6, OPEN1
-.false9
- checkevent EVENT_SWITCH_10
- iffalse .false10
- doorstate 7, CLOSED1
- doorstate 8, OPEN1
-.false10
- checkevent EVENT_SWITCH_11
- iffalse .false11
- doorstate 9, CLOSED1
- doorstate 10, OPEN1
-.false11
- checkevent EVENT_SWITCH_12
- iffalse .false12
- doorstate 11, CLOSED1
- doorstate 12, OPEN1
-.false12
- checkevent EVENT_SWITCH_13
- iffalse .false13
- doorstate 13, CLOSED1
- doorstate 14, OPEN1
-.false13
- checkevent EVENT_SWITCH_14
- iffalse .false14
- doorstate 15, CLOSED1
- doorstate 16, OPEN1
-.false14
- return
-
-SuperNerdScript_0x7ca7a:
- jumptextfaceplayer UndergroundPathSwitchRoomEntrances_SuperNerdText
-
-TeacherScript_0x7ca7d:
- jumptextfaceplayer UndergroundPathSwitchRoomEntrances_TeacherText
-
-UndergroundSilverTrigger1:
- spriteface PLAYER, RIGHT
- showemote EMOTE_SHOCK, PLAYER, 15
- special Special_FadeOutMusic
- pause 15
- playsound SFX_EXIT_BUILDING
- appear UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- waitsfx
- applymovement UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER, UndergroundSilverApproachMovement1
- spriteface PLAYER, RIGHT
- scall UndergroundSilverBattleScript
- applymovement UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER, UndergroundSilverRetreatMovement1
- playsound SFX_EXIT_BUILDING
- disappear UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- dotrigger 1
- waitsfx
- playmapmusic
- end
-
-UndergroundSilverTrigger2:
- spriteface PLAYER, RIGHT
- showemote EMOTE_SHOCK, PLAYER, 15
- special Special_FadeOutMusic
- pause 15
- playsound SFX_EXIT_BUILDING
- appear UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- waitsfx
- applymovement UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER, UndergroundSilverApproachMovement2
- spriteface PLAYER, RIGHT
- scall UndergroundSilverBattleScript
- applymovement UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER, UndergroundSilverRetreatMovement2
- playsound SFX_EXIT_BUILDING
- disappear UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- dotrigger 1
- waitsfx
- playmapmusic
- end
-
-UndergroundSilverBattleScript:
- checkevent EVENT_RIVAL_BURNED_TOWER
- iftrue .Continue
- setevent EVENT_RIVAL_BURNED_TOWER
- domaptrigger BURNED_TOWER_1F, 1
-.Continue:
- playmusic MUSIC_RIVAL_ENCOUNTER
- opentext
- writetext UndergroundSilverBeforeText
- waitbutton
- closetext
- setevent EVENT_RIVAL_UNDERGROUND_PATH
- checkevent EVENT_GOT_TOTODILE_FROM_ELM
- iftrue .Totodile
- checkevent EVENT_GOT_CHIKORITA_FROM_ELM
- iftrue .Chikorita
- winlosstext UndergroundSilverWinText, UndergroundSilverLossText
- setlasttalked UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- loadtrainer RIVAL1, RIVAL1_12
- startbattle
- dontrestartmapmusic
- reloadmapafterbattle
- jump .FinishRivalBattle
-
-.Totodile:
- winlosstext UndergroundSilverWinText, UndergroundSilverLossText
- setlasttalked UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- loadtrainer RIVAL1, RIVAL1_10
- startbattle
- dontrestartmapmusic
- reloadmapafterbattle
- jump .FinishRivalBattle
-
-.Chikorita:
- winlosstext UndergroundSilverWinText, UndergroundSilverLossText
- setlasttalked UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
- loadtrainer RIVAL1, RIVAL1_11
- startbattle
- dontrestartmapmusic
- reloadmapafterbattle
- jump .FinishRivalBattle
-
-.FinishRivalBattle:
- playmusic MUSIC_RIVAL_AFTER
- opentext
- writetext UndergroundSilverAfterText
- waitbutton
- closetext
- end
-
-TrainerGruntM11:
- trainer EVENT_BEAT_ROCKET_GRUNTM_11, GRUNTM, GRUNTM_11, GruntM11SeenText, GruntM11BeatenText, 0, GruntM11Script
-
-GruntM11Script:
- end_if_just_battled
- opentext
- writetext GruntM11AfterText
- waitbutton
- closetext
- end
-
-TrainerGruntM25:
- trainer EVENT_BEAT_ROCKET_GRUNTM_25, GRUNTM, GRUNTM_25, GruntM25SeenText, GruntM25BeatenText, 0, GruntM25Script
-
-GruntM25Script:
- end_if_just_battled
- opentext
- writetext GruntM25AfterText
- waitbutton
- closetext
- end
-
-TrainerBurglarDuncan:
- trainer EVENT_BEAT_BURGLAR_DUNCAN, BURGLAR, DUNCAN, BurglarDuncanSeenText, BurglarDuncanBeatenText, 0, BurglarDuncanScript
-
-BurglarDuncanScript:
- end_if_just_battled
- opentext
- writetext BurglarDuncanAfterText
- waitbutton
- closetext
- end
-
-TrainerBurglarEddie:
- trainer EVENT_BEAT_BURGLAR_EDDIE, BURGLAR, EDDIE, BurglarEddieSeenText, BurglarEddieBeatenText, 0, BurglarEddieScript
-
-BurglarEddieScript:
- end_if_just_battled
- opentext
- writetext BurglarEddieAfterText
- waitbutton
- closetext
- end
-
-TrainerGruntM13:
- trainer EVENT_BEAT_ROCKET_GRUNTM_13, GRUNTM, GRUNTM_13, GruntM13SeenText, GruntM13BeatenText, 0, GruntM13Script
-
-GruntM13Script:
- end_if_just_battled
- opentext
- writetext GruntM13AfterText
- waitbutton
- closetext
- end
-
-TrainerGruntF3:
- trainer EVENT_BEAT_ROCKET_GRUNTF_3, GRUNTF, GRUNTF_3, GruntF3SeenText, GruntF3BeatenText, 0, GruntF3Script
-
-GruntF3Script:
- end_if_just_battled
- opentext
- writetext GruntF3AfterText
- waitbutton
- closetext
- end
-
-Switch1Script:
- opentext
- writetext SwitchRoomText_Switch1
- buttonsound
- checkevent EVENT_SWITCH_1
- iftrue .On
- writetext SwitchRoomText_OffTurnOn
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- copybytetovar UndergroundSwitchPositions
- addvar 1
- copyvartobyte UndergroundSwitchPositions
- setevent EVENT_SWITCH_1
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-.On:
- writetext SwitchRoomText_OnTurnOff
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- copybytetovar UndergroundSwitchPositions
- addvar -1
- copyvartobyte UndergroundSwitchPositions
- clearevent EVENT_SWITCH_1
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-Switch2Script:
- opentext
- writetext SwitchRoomText_Switch2
- buttonsound
- checkevent EVENT_SWITCH_2
- iftrue .On
- writetext SwitchRoomText_OffTurnOn
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- copybytetovar UndergroundSwitchPositions
- addvar 2
- copyvartobyte UndergroundSwitchPositions
- setevent EVENT_SWITCH_2
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-.On:
- writetext SwitchRoomText_OnTurnOff
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- copybytetovar UndergroundSwitchPositions
- addvar -2
- copyvartobyte UndergroundSwitchPositions
- clearevent EVENT_SWITCH_2
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-Switch3Script:
- opentext
- writetext SwitchRoomText_Switch3
- buttonsound
- checkevent EVENT_SWITCH_3
- iftrue .On
- writetext SwitchRoomText_OffTurnOn
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- copybytetovar UndergroundSwitchPositions
- addvar 3
- copyvartobyte UndergroundSwitchPositions
- setevent EVENT_SWITCH_3
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-.On:
- writetext SwitchRoomText_OnTurnOff
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- copybytetovar UndergroundSwitchPositions
- addvar -3
- copyvartobyte UndergroundSwitchPositions
- clearevent EVENT_SWITCH_3
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-EmergencySwitchScript:
- opentext
- writetext SwitchRoomText_Emergency
- buttonsound
- checkevent EVENT_EMERGENCY_SWITCH
- iftrue .On
- writetext SwitchRoomText_OffTurnOn
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- writebyte 7
- copyvartobyte UndergroundSwitchPositions
- setevent EVENT_EMERGENCY_SWITCH
- setevent EVENT_SWITCH_1
- setevent EVENT_SWITCH_2
- setevent EVENT_SWITCH_3
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-.On:
- writetext SwitchRoomText_OnTurnOff
- yesorno
- iffalse UndergroundPathSwitchRoomEntrances_DontToggle
- writebyte 0
- copyvartobyte UndergroundSwitchPositions
- clearevent EVENT_EMERGENCY_SWITCH
- clearevent EVENT_SWITCH_1
- clearevent EVENT_SWITCH_2
- clearevent EVENT_SWITCH_3
- jump UndergroundPathSwitchRoomEntrances_UpdateDoors
-
-UndergroundPathSwitchRoomEntrances_DontToggle:
- closetext
- end
-
-UndergroundPathSwitchRoomEntrances_UpdateDoors:
- copybytetovar UndergroundSwitchPositions
- if_equal 0, .Position0
- if_equal 1, .Position1
- if_equal 2, .Position2
- if_equal 3, .Position3
- if_equal 4, .Position4
- if_equal 5, .Position5
- if_equal 6, .Position6
- if_equal 7, .EmergencyPosition
-.Position0:
- playsound SFX_ENTER_DOOR
- scall .Clear4
- scall .Clear5
- scall .Clear6
- scall .Clear7
- scall .Clear8
- scall .Clear9
- scall .Clear10
- scall .Clear11
- scall .Clear12
- scall .Clear13
- scall .Clear14
- reloadmappart
- closetext
- end
-
-.Position1:
- playsound SFX_ENTER_DOOR
- scall .Set4
- scall .Set10
- scall .Set13
- scall .Clear9
- scall .Clear11
- scall .Clear12
- scall .Clear14
- reloadmappart
- closetext
- end
-
-.Position2:
- playsound SFX_ENTER_DOOR
- scall .Set5
- scall .Set11
- scall .Set12
- scall .Clear8
- scall .Clear10
- scall .Clear13
- scall .Clear14
- reloadmappart
- closetext
- end
-
-.Position3:
- playsound SFX_ENTER_DOOR
- scall .Set6
- scall .Set10
- scall .Set13
- scall .Clear7
- scall .Clear11
- scall .Clear12
- scall .Clear14
- reloadmappart
- closetext
- end
-
-.Position4:
- playsound SFX_ENTER_DOOR
- scall .Set7
- scall .Set11
- scall .Set12
- scall .Clear6
- scall .Clear10
- scall .Clear13
- scall .Clear14
- reloadmappart
- closetext
- end
-
-.Position5:
- playsound SFX_ENTER_DOOR
- scall .Set8
- scall .Set10
- scall .Set13
- scall .Clear5
- scall .Clear11
- scall .Clear12
- scall .Clear14
- reloadmappart
- closetext
- end
-
-.Position6:
- playsound SFX_ENTER_DOOR
- scall .Set9
- scall .Set11
- scall .Set12
- scall .Set14
- scall .Clear4
- scall .Clear10
- scall .Clear13
- reloadmappart
- closetext
- end
-
-.EmergencyPosition:
- playsound SFX_ENTER_DOOR
- scall .Clear4
- scall .Clear5
- scall .Set6
- scall .Clear7
- scall .Set8
- scall .Set9
- scall .Clear10
- scall .Set11
- scall .Set12
- scall .Clear13
- scall .Set14
- reloadmappart
- closetext
- writebyte 6
- copyvartobyte UndergroundSwitchPositions
- end
-
-.Set4:
- doorstate 1, OPEN1
- setevent EVENT_SWITCH_4
- end
-
-.Set5:
- doorstate 2, OPEN1
- setevent EVENT_SWITCH_5
- end
-
-.Set6:
- doorstate 3, OPEN1
- setevent EVENT_SWITCH_6
- end
-
-.Set7:
- doorstate 4, OPEN1
- setevent EVENT_SWITCH_7
- end
-
-.Set8:
- doorstate 5, OPEN1
- setevent EVENT_SWITCH_8
- end
-
-.Set9:
- doorstate 6, OPEN1
- setevent EVENT_SWITCH_9
- end
-
-.Set10:
- doorstate 7, CLOSED1
- doorstate 8, OPEN1
- setevent EVENT_SWITCH_10
- end
-
-.Set11:
- doorstate 9, CLOSED1
- doorstate 10, OPEN1
- setevent EVENT_SWITCH_11
- end
-
-.Set12:
- doorstate 11, CLOSED1
- doorstate 12, OPEN1
- setevent EVENT_SWITCH_12
- end
-
-.Set13:
- doorstate 13, CLOSED1
- doorstate 14, OPEN1
- setevent EVENT_SWITCH_13
- end
-
-.Set14:
- doorstate 15, CLOSED1
- doorstate 16, OPEN1
- setevent EVENT_SWITCH_14
- end
-
-.Clear4:
- doorstate 1, CLOSED2
- clearevent EVENT_SWITCH_4
- end
-
-.Clear5:
- doorstate 2, CLOSED2
- clearevent EVENT_SWITCH_5
- end
-
-.Clear6:
- doorstate 3, CLOSED2
- clearevent EVENT_SWITCH_6
- end
-
-.Clear7:
- doorstate 4, CLOSED2
- clearevent EVENT_SWITCH_7
- end
-
-.Clear8:
- doorstate 5, CLOSED2
- clearevent EVENT_SWITCH_8
- end
-
-.Clear9:
- doorstate 6, CLOSED2
- clearevent EVENT_SWITCH_9
- end
-
-.Clear10:
- doorstate 7, CLOSED3
- doorstate 8, OPEN2
- clearevent EVENT_SWITCH_10
- end
-
-.Clear11:
- doorstate 9, CLOSED3
- doorstate 10, OPEN2
- clearevent EVENT_SWITCH_11
- end
-
-.Clear12:
- doorstate 11, CLOSED3
- doorstate 12, OPEN2
- clearevent EVENT_SWITCH_12
- end
-
-.Clear13:
- doorstate 13, CLOSED3
- doorstate 14, OPEN2
- clearevent EVENT_SWITCH_13
- end
-
-.Clear14:
- doorstate 15, CLOSED3
- doorstate 16, OPEN2
- clearevent EVENT_SWITCH_14
- end
-
-UndergroundPathSwitchRoomEntrancesSmokeBall:
- itemball SMOKE_BALL
-
-UndergroundPathSwitchRoomEntrancesFullHeal:
- itemball FULL_HEAL
-
-UndergroundPathSwitchRoomEntrancesHiddenMaxPotion:
- dwb EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION, MAX_POTION
-
-
-UndergroundPathSwitchRoomEntrancesHiddenRevive:
- dwb EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE, REVIVE
-
-
-UndergroundSilverApproachMovement1:
- step DOWN
- step LEFT
- step LEFT
- step LEFT
- step_end
-
-UndergroundSilverApproachMovement2:
- step DOWN
- step DOWN
- step LEFT
- step LEFT
- step LEFT
- step_end
-
-UndergroundSilverRetreatMovement1:
- step RIGHT
- step RIGHT
- step RIGHT
- step UP
- step_end
-
-UndergroundSilverRetreatMovement2:
- step RIGHT
- step RIGHT
- step RIGHT
- step UP
- step UP
- step_end
-
-UndergroundSilverBeforeText:
- text "Hold it!"
-
- para "I saw you, so I"
- line "tailed you."
-
- para "I don't need you"
- line "underfoot while I"
-
- para "take care of TEAM"
- line "ROCKET."
-
- para "…Wait a second."
- line "You beat me be-"
- cont "fore, didn't you?"
-
- para "That was just a"
- line "fluke."
-
- para "But I repay my"
- line "debts!"
- done
-
-UndergroundSilverWinText:
- text "…Why…"
- line "Why do I lose?"
-
- para "I've assembled the"
- line "toughest #MON."
-
- para "I didn't ease up"
- line "on the gas."
-
- para "So why do I lose?"
- done
-
-UndergroundSilverAfterText:
- text "…I don't under-"
- line "stand…"
-
- para "Is what that LANCE"
- line "guy said true?"
-
- para "That I don't treat"
- line "#MON properly?"
-
- para "Love…"
-
- para "Trust…"
-
- para "Are they really"
- line "what I lack?"
-
- para "Are they keeping"
- line "me from winning?"
-
- para "I… I just don't"
- line "understand."
-
- para "But it's not going"
- line "to end here."
-
- para "Not now. Not"
- line "because of this."
-
- para "I won't give up my"
- line "dream of becoming"
-
- para "the world's best"
- line "#MON trainer!"
- done
-
-UndergroundSilverLossText:
- text "Humph. This is my"
- line "real power, wimp."
-
- para "I'll make TEAM"
- line "ROCKET history."
-
- para "And I'm going to"
- line "grind that LANCE"
- cont "under my heels."
- done
-
-UndergroundPathSwitchRoomEntrances_SuperNerdText:
- text "I was challenged"
- line "to a battle down-"
- cont "stairs."
-
- para "It's rough down"
- line "there. You'd"
- cont "better be careful."
- done
-
-UndergroundPathSwitchRoomEntrances_TeacherText:
- text "There are some"
- line "shops downstairs…"
-
- para "But there are"
- line "also trainers."
-
- para "I'm scared to go"
- line "down there."
- done
-
-GruntM11SeenText:
- text "Open one shutter,"
- line "another closes."
-
- para "Bet you can't get"
- line "where you want!"
- done
-
-GruntM11BeatenText:
- text "Drat! I was sunk"
- line "by indecision!"
- done
-
-GruntM11AfterText:
- text "I'm confused too…"
- line "The switch on the"
-
- para "end is the one to"
- line "press first, but…"
- done
-
-GruntM25SeenText:
- text "Kwahaha!"
-
- para "Confounded by the"
- line "shutters, are we?"
-
- para "I'll let you in on"
- line "a secret if you"
- cont "can beat me!"
- done
-
-GruntM25BeatenText:
- text "Uwww…"
- line "I blew it."
- done
-
-GruntM25AfterText:
- text "All right. A hint!"
-
- para "Change the order"
- line "of switching."
-
- para "That'll change the"
- line "ways the shutters"
- cont "open and close."
- done
-
-BurglarDuncanSeenText:
- text "Fork over your"
- line "goodies!"
- done
-
-BurglarDuncanBeatenText:
- text "Mercy!"
- done
-
-BurglarDuncanAfterText:
- text "Steal and sell!"
- line "That's basic in"
- cont "crime, kid!"
- done
-
-BurglarEddieSeenText:
- text "They ditched this"
- line "project before"
- cont "they finished."
-
- para "I'm searching for"
- line "leftover loot."
- done
-
-BurglarEddieBeatenText:
- text "Over the top!"
- done
-
-BurglarEddieAfterText:
- text "UNDERGROUND WARE-"
- line "HOUSE?"
-
- para "What do you want"
- line "to go there for?"
-
- para "There's nothing"
- line "down there."
- done
-
-GruntM13SeenText:
- text "I don't care if"
- line "you're lost."
-
- para "You show up here,"
- line "you're nothing but"
- cont "a victim!"
- done
-
-GruntM13BeatenText:
- text "Urk! Yeah, think"
- line "you're cool, huh?"
- done
-
-GruntM13AfterText:
- text "You must have ice"
- line "in your veins to"
- cont "dis TEAM ROCKET."
- done
-
-SwitchRoomText_Switch1:
- text "It's labeled"
- line "SWITCH 1."
- done
-
-GruntF3SeenText:
- text "Are you lost? No,"
- line "you can't be."
-
- para "You don't have"
- line "that scared look."
-
- para "I'll give you"
- line "something to be"
- cont "scared about!"
- done
-
-GruntF3BeatenText:
- text "How could you?"
- done
-
-GruntF3AfterText:
- text "Go wherever you'd"
- line "like! Get lost!"
- cont "See if I care!"
- done
-
-SwitchRoomText_OffTurnOn:
- text "It's OFF."
- line "Turn it ON?"
- done
-
-SwitchRoomText_OnTurnOff:
- text "It's ON."
- line "Turn it OFF?"
- done
-
-SwitchRoomText_Switch2:
- text "It's labeled"
- line "SWITCH 2."
- done
-
-SwitchRoomText_Switch3:
- text "It's labeled"
- line "SWITCH 3."
- done
-
-SwitchRoomText_Emergency:
- text "It's labeled"
- line "EMERGENCY."
- done
-
-UndergroundPathSwitchRoomEntrances_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 9
- warp_def $3, $17, 6, WAREHOUSE_ENTRANCE
- warp_def $a, $16, 1, UNDERGROUND_WAREHOUSE
- warp_def $a, $17, 2, UNDERGROUND_WAREHOUSE
- warp_def $19, $5, 2, WAREHOUSE_ENTRANCE
- warp_def $1d, $4, 14, GOLDENROD_CITY
- warp_def $1d, $5, 14, GOLDENROD_CITY
- warp_def $19, $15, 1, WAREHOUSE_ENTRANCE
- warp_def $1d, $14, 13, GOLDENROD_CITY
- warp_def $1d, $15, 13, GOLDENROD_CITY
-
-.XYTriggers:
- db 2
- xy_trigger 0, $4, $13, $0, UndergroundSilverTrigger1, $0, 0
- xy_trigger 0, $5, $13, $0, UndergroundSilverTrigger2, $0, 0
-
-.Signposts:
- db 6
- signpost 1, 16, SIGNPOST_READ, Switch1Script
- signpost 1, 10, SIGNPOST_READ, Switch2Script
- signpost 1, 2, SIGNPOST_READ, Switch3Script
- signpost 11, 20, SIGNPOST_READ, EmergencySwitchScript
- signpost 9, 8, SIGNPOST_ITEM, UndergroundPathSwitchRoomEntrancesHiddenMaxPotion
- signpost 8, 1, SIGNPOST_ITEM, UndergroundPathSwitchRoomEntrancesHiddenRevive
-
-.PersonEvents:
- db 11
- person_event SPRITE_PHARMACIST, 12, 9, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 2, TrainerBurglarDuncan, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_PHARMACIST, 8, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_TRAINER, 2, TrainerBurglarEddie, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 2, 17, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM13, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 2, 11, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM11, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 2, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM25, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET_GIRL, 12, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerGruntF3, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_TEACHER, 27, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TeacherScript_0x7ca7d, -1
- person_event SPRITE_SUPER_NERD, 27, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x7ca7a, -1
- person_event SPRITE_POKE_BALL, 12, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, UndergroundPathSwitchRoomEntrancesSmokeBall, EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_SMOKE_BALL
- person_event SPRITE_POKE_BALL, 9, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, UndergroundPathSwitchRoomEntrancesFullHeal, EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_FULL_HEAL
- person_event SPRITE_SILVER, 3, 23, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_UNDERGROUND_PATH
diff --git a/maps/UndergroundWarehouse.asm b/maps/UndergroundWarehouse.asm
deleted file mode 100644
index 943a042c1..000000000
--- a/maps/UndergroundWarehouse.asm
+++ /dev/null
@@ -1,240 +0,0 @@
-const_value set 2
- const UNDERGROUNDWAREHOUSE_ROCKET1
- const UNDERGROUNDWAREHOUSE_ROCKET2
- const UNDERGROUNDWAREHOUSE_ROCKET3
- const UNDERGROUNDWAREHOUSE_GENTLEMAN
- const UNDERGROUNDWAREHOUSE_POKE_BALL1
- const UNDERGROUNDWAREHOUSE_POKE_BALL2
- const UNDERGROUNDWAREHOUSE_POKE_BALL3
-
-UndergroundWarehouse_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 1
-
- ; callbacks
-
- dbw MAPCALLBACK_NEWMAP, .ResetSwitches
-
-.ResetSwitches:
- clearevent EVENT_SWITCH_1
- clearevent EVENT_SWITCH_2
- clearevent EVENT_SWITCH_3
- clearevent EVENT_EMERGENCY_SWITCH
- clearevent EVENT_SWITCH_4
- clearevent EVENT_SWITCH_5
- clearevent EVENT_SWITCH_6
- clearevent EVENT_SWITCH_7
- clearevent EVENT_SWITCH_8
- clearevent EVENT_SWITCH_9
- clearevent EVENT_SWITCH_10
- clearevent EVENT_SWITCH_11
- clearevent EVENT_SWITCH_12
- clearevent EVENT_SWITCH_13
- clearevent EVENT_SWITCH_14
- writebyte $0
- copyvartobyte UndergroundSwitchPositions
- return
-
-TrainerGruntM24:
- trainer EVENT_BEAT_ROCKET_GRUNTM_24, GRUNTM, GRUNTM_24, GruntM24SeenText, GruntM24BeatenText, 0, GruntM24Script
-
-GruntM24Script:
- end_if_just_battled
- opentext
- writetext UnknownText_0x7da48
- waitbutton
- closetext
- end
-
-TrainerGruntM14:
- trainer EVENT_BEAT_ROCKET_GRUNTM_14, GRUNTM, GRUNTM_14, GruntM14SeenText, GruntM14BeatenText, 0, GruntM14Script
-
-GruntM14Script:
- end_if_just_battled
- opentext
- writetext UnknownText_0x7db01
- waitbutton
- closetext
- end
-
-TrainerGruntM15:
- trainer EVENT_BEAT_ROCKET_GRUNTM_15, GRUNTM, GRUNTM_15, GruntM15SeenText, GruntM15BeatenText, 0, GruntM15Script
-
-GruntM15Script:
- end_if_just_battled
- opentext
- writetext UnknownText_0x7db8e
- waitbutton
- closetext
- end
-
-GentlemanScript_0x7d9bf:
- faceplayer
- opentext
- checkevent EVENT_RECEIVED_CARD_KEY
- iftrue UnknownScript_0x7d9de
- writetext UnknownText_0x7dbc6
- buttonsound
- verbosegiveitem CARD_KEY
- setevent EVENT_RECEIVED_CARD_KEY
- setevent EVENT_WAREHOUSE_LAYOUT_1
- clearevent EVENT_WAREHOUSE_LAYOUT_2
- clearevent EVENT_WAREHOUSE_LAYOUT_3
- writetext UnknownText_0x7dc5b
- buttonsound
-UnknownScript_0x7d9de:
- writetext UnknownText_0x7dc8d
- waitbutton
- closetext
- end
-
-UndergroundWarehouseMaxEther:
- itemball MAX_ETHER
-
-UndergroundWarehouseTMSleepTalk:
- itemball TM_SLEEP_TALK
-
-UndergroundWarehouseUltraBall:
- itemball ULTRA_BALL
-
-GruntM24SeenText:
- text "How did you get"
- line "this far?"
-
- para "I guess it can't"
- line "be helped. I'll"
- cont "dispose of you."
- done
-
-GruntM24BeatenText:
- text "I got disposed of…"
- done
-
-UnknownText_0x7da48:
- text "TEAM ROCKET will"
- line "keep going, wait-"
- cont "ing for the return"
- cont "of GIOVANNI."
-
- para "We'll do whatever"
- line "it takes."
- done
-
-GruntM14SeenText:
- text "You're not going"
- line "any farther!"
-
- para "I don't show mercy"
- line "to my enemies, not"
- cont "even brats!"
- done
-
-GruntM14BeatenText:
- text "Blast it!"
- done
-
-UnknownText_0x7db01:
- text "I lost…"
-
- para "Please forgive me,"
- line "GIOVANNI!"
- done
-
-GruntM15SeenText:
- text "Hyuck-hyuck-hyuck!"
- line "I remember you!"
-
- para "You got me good"
- line "at our hideout!"
- done
-
-GruntM15BeatenText:
- text "Hyuck-hyuck-hyuck!"
- line "So, that's how?"
- done
-
-UnknownText_0x7db8e:
- text "Hyuck-hyuck-hyuck!"
- line "That was a blast!"
- cont "I'll remember you!"
- done
-
-UnknownText_0x7dbc6:
- text "DIRECTOR: Who?"
- line "What? You came to"
- cont "rescue me?"
-
- para "Thank you!"
-
- para "The RADIO TOWER!"
-
- para "What's happening"
- line "there?"
-
- para "Taken over by TEAM"
- line "ROCKET?"
-
- para "Here. Take this"
- line "CARD KEY."
- done
-
-UnknownText_0x7dc5b:
- text "DIRECTOR: Use that"
- line "to open the shut-"
- cont "ters on 3F."
- done
-
-UnknownText_0x7dc8d:
- text "I'm begging you to"
- line "help."
-
- para "There's no telling"
- line "what they'll do if"
-
- para "they control the"
- line "transmitter."
-
- para "They may even be"
- line "able to control"
-
- para "#MON using a"
- line "special signal!"
-
- para "You're the only"
- line "one I can call on."
-
- para "Please save the"
- line "RADIO TOWER…"
-
- para "And all the #-"
- line "MON nationwide!"
- done
-
-UndergroundWarehouse_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $c, $2, 2, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
- warp_def $c, $3, 3, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
- warp_def $2, $11, 1, GOLDENROD_DEPT_STORE_B1F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 7
- person_event SPRITE_ROCKET, 8, 9, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM24, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 15, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 3, TrainerGruntM14, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_ROCKET, 3, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 4, TrainerGruntM15, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_GENTLEMAN, 8, 12, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x7d9bf, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
- person_event SPRITE_POKE_BALL, 15, 18, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, UndergroundWarehouseMaxEther, EVENT_UNDERGROUND_WAREHOUSE_MAX_ETHER
- person_event SPRITE_POKE_BALL, 9, 13, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, UndergroundWarehouseTMSleepTalk, EVENT_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK
- person_event SPRITE_POKE_BALL, 1, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, UndergroundWarehouseUltraBall, EVENT_UNDERGROUND_WAREHOUSE_ULTRA_BALL
diff --git a/maps/UnionCave1F.asm b/maps/UnionCave1F.asm
index 01875f6ae..54200c8d8 100644
--- a/maps/UnionCave1F.asm
+++ b/maps/UnionCave1F.asm
@@ -10,63 +10,63 @@ const_value set 2
const UNIONCAVE1F_POKE_BALL4
UnionCave1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerPokemaniacLarry:
- trainer EVENT_BEAT_POKEMANIAC_LARRY, POKEMANIAC, LARRY, PokemaniacLarrySeenText, PokemaniacLarryBeatenText, 0, PokemaniacLarryScript
+ trainer EVENT_BEAT_POKEMANIAC_LARRY, POKEMANIAC, LARRY, PokemaniacLarrySeenText, PokemaniacLarryBeatenText, 0, .Script
-PokemaniacLarryScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x59d31
+ writetext PokemaniacLarryAfterBattleText
waitbutton
closetext
end
TrainerHikerRussell:
- trainer EVENT_BEAT_HIKER_RUSSELL, HIKER, RUSSELL, HikerRussellSeenText, HikerRussellBeatenText, 0, HikerRussellScript
+ trainer EVENT_BEAT_HIKER_RUSSELL, HIKER, RUSSELL, HikerRussellSeenText, HikerRussellBeatenText, 0, .Script
-HikerRussellScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x59c6c
+ writetext HikerRussellAfterBattleText
waitbutton
closetext
end
TrainerHikerDaniel:
- trainer EVENT_BEAT_HIKER_DANIEL, HIKER, DANIEL, HikerDanielSeenText, HikerDanielBeatenText, 0, HikerDanielScript
+ trainer EVENT_BEAT_HIKER_DANIEL, HIKER, DANIEL, HikerDanielSeenText, HikerDanielBeatenText, 0, .Script
-HikerDanielScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x59dc9
+ writetext HikerDanielAfterBattleText
waitbutton
closetext
end
TrainerFirebreatherBill:
- trainer EVENT_BEAT_FIREBREATHER_BILL, FIREBREATHER, BILL, FirebreatherBillSeenText, FirebreatherBillBeatenText, 0, FirebreatherBillScript
+ trainer EVENT_BEAT_FIREBREATHER_BILL, FIREBREATHER, BILL, FirebreatherBillSeenText, FirebreatherBillBeatenText, 0, .Script
-FirebreatherBillScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x59e6f
+ writetext FirebreatherBillAfterBattleText
waitbutton
closetext
end
TrainerFirebreatherRay:
- trainer EVENT_BEAT_FIREBREATHER_RAY, FIREBREATHER, RAY, FirebreatherRaySeenText, FirebreatherRayBeatenText, 0, FirebreatherRayScript
+ trainer EVENT_BEAT_FIREBREATHER_RAY, FIREBREATHER, RAY, FirebreatherRaySeenText, FirebreatherRayBeatenText, 0, .Script
-FirebreatherRayScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x59efc
+ writetext FirebreatherRayAfterBattleText
waitbutton
closetext
end
@@ -99,7 +99,7 @@ HikerRussellBeatenText:
text "Oh, oh, oh!"
done
-UnknownText_0x59c6c:
+HikerRussellAfterBattleText:
text "All right, then!"
line "I've decided."
@@ -125,7 +125,7 @@ PokemaniacLarryBeatenText:
line "MON…"
done
-UnknownText_0x59d31:
+PokemaniacLarryAfterBattleText:
text "Every Friday, you"
line "can hear #MON"
@@ -146,7 +146,7 @@ HikerDanielBeatenText:
line "big time!"
done
-UnknownText_0x59dc9:
+HikerDanielAfterBattleText:
text "I was conned into"
line "buying a SLOWPOKE-"
cont "TAIL."
@@ -168,7 +168,7 @@ FirebreatherBillBeatenText:
text "I flamed out!"
done
-UnknownText_0x59e6f:
+FirebreatherBillAfterBattleText:
text "On weekends, you"
line "can hear strange"
@@ -189,7 +189,7 @@ FirebreatherRayBeatenText:
text "FLASH!"
done
-UnknownText_0x59efc:
+FirebreatherRayAfterBattleText:
text "It's my #MON's"
line "fire that lights"
cont "up this cave."
@@ -210,20 +210,20 @@ UnionCave1F_MapEventHeader:
warp_def $1f, $11, 1, ROUTE_33
warp_def $3, $11, 4, ROUTE_32
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 9
- person_event SPRITE_POKEFAN_M, 6, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerHikerDaniel, -1
- person_event SPRITE_SUPER_NERD, 21, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerPokemaniacLarry, -1
- person_event SPRITE_POKEFAN_M, 8, 11, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 1, TrainerHikerRussell, -1
- person_event SPRITE_FISHER, 27, 15, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerFirebreatherRay, -1
- person_event SPRITE_FISHER, 19, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 4, TrainerFirebreatherBill, -1
- person_event SPRITE_POKE_BALL, 21, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, UnionCave1FGreatBall, EVENT_UNION_CAVE_1F_GREAT_BALL
- person_event SPRITE_POKE_BALL, 2, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, UnionCave1FXAttack, EVENT_UNION_CAVE_1F_X_ATTACK
- person_event SPRITE_POKE_BALL, 17, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, UnionCave1FPotion, EVENT_UNION_CAVE_1F_POTION
- person_event SPRITE_POKE_BALL, 33, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, UnionCave1FAwakening, EVENT_UNION_CAVE_1F_AWAKENING
+ object_event SPRITE_POKEFAN_M, 6, 3, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerHikerDaniel, -1
+ object_event SPRITE_SUPER_NERD, 21, 4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacLarry, -1
+ object_event SPRITE_POKEFAN_M, 8, 11, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerHikerRussell, -1
+ object_event SPRITE_FISHER, 27, 15, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerFirebreatherRay, -1
+ object_event SPRITE_FISHER, 19, 14, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerFirebreatherBill, -1
+ object_event SPRITE_POKE_BALL, 21, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCave1FGreatBall, EVENT_UNION_CAVE_1F_GREAT_BALL
+ object_event SPRITE_POKE_BALL, 2, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCave1FXAttack, EVENT_UNION_CAVE_1F_X_ATTACK
+ object_event SPRITE_POKE_BALL, 17, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCave1FPotion, EVENT_UNION_CAVE_1F_POTION
+ object_event SPRITE_POKE_BALL, 33, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCave1FAwakening, EVENT_UNION_CAVE_1F_AWAKENING
diff --git a/maps/UnionCaveB1F.asm b/maps/UnionCaveB1F.asm
index 26295aab0..e3c7ac5f0 100644
--- a/maps/UnionCaveB1F.asm
+++ b/maps/UnionCaveB1F.asm
@@ -8,52 +8,52 @@ const_value set 2
const UNIONCAVEB1F_POKE_BALL2
UnionCaveB1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
TrainerPokemaniacAndrew:
- trainer EVENT_BEAT_POKEMANIAC_ANDREW, POKEMANIAC, ANDREW, PokemaniacAndrewSeenText, PokemaniacAndrewBeatenText, 0, PokemaniacAndrewScript
+ trainer EVENT_BEAT_POKEMANIAC_ANDREW, POKEMANIAC, ANDREW, PokemaniacAndrewSeenText, PokemaniacAndrewBeatenText, 0, .Script
-PokemaniacAndrewScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5a181
+ writetext PokemaniacAndrewAfterBattleText
waitbutton
closetext
end
TrainerPokemaniacCalvin:
- trainer EVENT_BEAT_POKEMANIAC_CALVIN, POKEMANIAC, CALVIN, PokemaniacCalvinSeenText, PokemaniacCalvinBeatenText, 0, PokemaniacCalvinScript
+ trainer EVENT_BEAT_POKEMANIAC_CALVIN, POKEMANIAC, CALVIN, PokemaniacCalvinSeenText, PokemaniacCalvinBeatenText, 0, .Script
-PokemaniacCalvinScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5a230
+ writetext PokemaniacCalvinAfterBattleText
waitbutton
closetext
end
TrainerHikerPhillip:
- trainer EVENT_BEAT_HIKER_PHILLIP, HIKER, PHILLIP, HikerPhillipSeenText, HikerPhillipBeatenText, 0, HikerPhillipScript
+ trainer EVENT_BEAT_HIKER_PHILLIP, HIKER, PHILLIP, HikerPhillipSeenText, HikerPhillipBeatenText, 0, .Script
-HikerPhillipScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5a073
+ writetext HikerPhillipAfterBattleText
waitbutton
closetext
end
TrainerHikerLeonard:
- trainer EVENT_BEAT_HIKER_LEONARD, HIKER, LEONARD, HikerLeonardSeenText, HikerLeonardBeatenText, 0, HikerLeonardScript
+ trainer EVENT_BEAT_HIKER_LEONARD, HIKER, LEONARD, HikerLeonardSeenText, HikerLeonardBeatenText, 0, .Script
-HikerLeonardScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5a0fb
+ writetext HikerLeonardAfterBattleText
waitbutton
closetext
end
@@ -80,7 +80,7 @@ HikerPhillipBeatenText:
text "Uurggh…"
done
-UnknownText_0x5a073:
+HikerPhillipAfterBattleText:
text "I've been lost for"
line "a long time…"
@@ -99,7 +99,7 @@ HikerLeonardBeatenText:
line "feisty one!"
done
-UnknownText_0x5a0fb:
+HikerLeonardAfterBattleText:
text "I live down here."
para "You can, too, if"
@@ -121,7 +121,7 @@ PokemaniacAndrewBeatenText:
line "Go away!"
done
-UnknownText_0x5a181:
+PokemaniacAndrewAfterBattleText:
text "Just me and my"
line "#MON. I'm de-"
cont "lirious with joy."
@@ -142,7 +142,7 @@ PokemaniacCalvinBeatenText:
line "on me!"
done
-UnknownText_0x5a230:
+PokemaniacCalvinAfterBattleText:
text "I should compile"
line "and announce my"
cont "study findings."
@@ -164,18 +164,18 @@ UnionCaveB1F_MapEventHeader:
warp_def $21, $3, 2, UNION_CAVE_1F
warp_def $1f, $11, 1, UNION_CAVE_B2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 7
- person_event SPRITE_POKEFAN_M, 4, 9, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerHikerPhillip, -1
- person_event SPRITE_POKEFAN_M, 7, 16, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerHikerLeonard, -1
- person_event SPRITE_SUPER_NERD, 32, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerPokemaniacAndrew, -1
- person_event SPRITE_SUPER_NERD, 30, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerPokemaniacCalvin, -1
- person_event SPRITE_POKE_BALL, 16, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, UnionCaveB1FTMSwift, EVENT_UNION_CAVE_B1F_TM_SWIFT
- person_event SPRITE_BOULDER, 10, 7, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, UnionCaveB1FBoulder, -1
- person_event SPRITE_POKE_BALL, 23, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, UnionCaveB1FXDefend, EVENT_UNION_CAVE_B1F_X_DEFEND
+ object_event SPRITE_POKEFAN_M, 4, 9, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerHikerPhillip, -1
+ object_event SPRITE_POKEFAN_M, 7, 16, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerHikerLeonard, -1
+ object_event SPRITE_SUPER_NERD, 32, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacAndrew, -1
+ object_event SPRITE_SUPER_NERD, 30, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacCalvin, -1
+ object_event SPRITE_POKE_BALL, 16, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCaveB1FTMSwift, EVENT_UNION_CAVE_B1F_TM_SWIFT
+ object_event SPRITE_BOULDER, 10, 7, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, UnionCaveB1FBoulder, -1
+ object_event SPRITE_POKE_BALL, 23, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCaveB1FXDefend, EVENT_UNION_CAVE_B1F_X_DEFEND
diff --git a/maps/UnionCaveB2F.asm b/maps/UnionCaveB2F.asm
index 68b3147f9..b08424670 100644
--- a/maps/UnionCaveB2F.asm
+++ b/maps/UnionCaveB2F.asm
@@ -7,14 +7,11 @@ const_value set 2
const UNIONCAVEB2F_LAPRAS
UnionCaveB2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_OBJECTS, .Lapras
.Lapras:
@@ -41,34 +38,34 @@ UnionCaveLapras:
end
TrainerCooltrainermNick:
- trainer EVENT_BEAT_COOLTRAINERM_NICK, COOLTRAINERM, NICK, CooltrainermNickSeenText, CooltrainermNickBeatenText, 0, CooltrainermNickScript
+ trainer EVENT_BEAT_COOLTRAINERM_NICK, COOLTRAINERM, NICK, CooltrainermNickSeenText, CooltrainermNickBeatenText, 0, .Script
-CooltrainermNickScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5a3f0
+ writetext CooltrainermNickAfterBattleText
waitbutton
closetext
end
TrainerCooltrainerfGwen:
- trainer EVENT_BEAT_COOLTRAINERF_GWEN, COOLTRAINERF, GWEN, CooltrainerfGwenSeenText, CooltrainerfGwenBeatenText, 0, CooltrainerfGwenScript
+ trainer EVENT_BEAT_COOLTRAINERF_GWEN, COOLTRAINERF, GWEN, CooltrainerfGwenSeenText, CooltrainerfGwenBeatenText, 0, .Script
-CooltrainerfGwenScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5a488
+ writetext CooltrainerfGwenAfterBattleText
waitbutton
closetext
end
TrainerCooltrainerfEmma:
- trainer EVENT_BEAT_COOLTRAINERF_EMMA, COOLTRAINERF, EMMA, CooltrainerfEmmaSeenText, CooltrainerfEmmaBeatenText, 0, CooltrainerfEmmaScript
+ trainer EVENT_BEAT_COOLTRAINERF_EMMA, COOLTRAINERF, EMMA, CooltrainerfEmmaSeenText, CooltrainerfEmmaBeatenText, 0, .Script
-CooltrainerfEmmaScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x5a52b
+ writetext CooltrainerfEmmaAfterBattleText
waitbutton
closetext
end
@@ -96,7 +93,7 @@ CooltrainermNickBeatenText:
line "dazzling style!"
done
-UnknownText_0x5a3f0:
+CooltrainermNickAfterBattleText:
text "Your #MON style"
line "is stunning and"
cont "colorful, I admit."
@@ -115,7 +112,7 @@ CooltrainerfGwenBeatenText:
line "too good for me."
done
-UnknownText_0x5a488:
+CooltrainerfGwenAfterBattleText:
text "I'm going to train"
line "by myself until I"
cont "improve."
@@ -135,7 +132,7 @@ CooltrainerfEmmaBeatenText:
line "babies than this!"
done
-UnknownText_0x5a52b:
+CooltrainerfEmmaAfterBattleText:
text "Just once a week,"
line "a #MON comes to"
cont "the water's edge."
@@ -152,17 +149,17 @@ UnionCaveB2F_MapEventHeader:
db 1
warp_def $3, $5, 5, UNION_CAVE_B1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_ROCKER, 19, 15, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerCooltrainermNick, -1
- person_event SPRITE_COOLTRAINER_F, 13, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 1, TrainerCooltrainerfGwen, -1
- person_event SPRITE_COOLTRAINER_F, 30, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerCooltrainerfEmma, -1
- person_event SPRITE_POKE_BALL, 2, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, UnionCaveB2FElixer, EVENT_UNION_CAVE_B2F_ELIXER
- person_event SPRITE_POKE_BALL, 19, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, UnionCaveB2FHyperPotion, EVENT_UNION_CAVE_B2F_HYPER_POTION
- person_event SPRITE_SURF, 31, 11, SPRITEMOVEDATA_LAPRAS, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, UnionCaveLapras, EVENT_UNION_CAVE_B2F_LAPRAS
+ object_event SPRITE_ROCKER, 19, 15, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainermNick, -1
+ object_event SPRITE_COOLTRAINER_F, 13, 5, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerCooltrainerfGwen, -1
+ object_event SPRITE_COOLTRAINER_F, 30, 3, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainerfEmma, -1
+ object_event SPRITE_POKE_BALL, 2, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCaveB2FElixer, EVENT_UNION_CAVE_B2F_ELIXER
+ object_event SPRITE_POKE_BALL, 19, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCaveB2FHyperPotion, EVENT_UNION_CAVE_B2F_HYPER_POTION
+ object_event SPRITE_SURF, 31, 11, SPRITEMOVEDATA_LAPRAS, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, UnionCaveLapras, EVENT_UNION_CAVE_B2F_LAPRAS
diff --git a/maps/VermilionCity.asm b/maps/VermilionCity.asm
index 2840e4ca3..e9a683162 100644
--- a/maps/VermilionCity.asm
+++ b/maps/VermilionCity.asm
@@ -7,21 +7,19 @@ const_value set 2
const VERMILIONCITY_POKEFAN_M
VermilionCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
setflag ENGINE_FLYPOINT_VERMILION
return
-TeacherScript_0x1aa983:
- jumptextfaceplayer UnknownText_0x1aaa15
+VermilionCityTeacherScript:
+ jumptextfaceplayer VermilionCityTeacherText
VermilionMachopOwner:
jumptextfaceplayer VermilionMachopOwnerText
@@ -39,8 +37,8 @@ VermilionMachop:
closetext
end
-SuperNerdScript_0x1aa99b:
- jumptextfaceplayer UnknownText_0x1aab1a
+VermilionCitySuperNerdScript:
+ jumptextfaceplayer VermilionCitySuperNerdText
VermilionSnorlax:
opentext
@@ -118,7 +116,7 @@ VermilionCityDiglettsCaveSign:
VermilionCityPortSign:
jumptext VermilionCityPortSignText
-VermilionCityPokeCenterSign:
+VermilionCityPokecenterSign:
jumpstd pokecentersign
VermilionCityMartSign:
@@ -127,7 +125,7 @@ VermilionCityMartSign:
VermilionCityHiddenFullHeal:
dwb EVENT_VERMILION_CITY_HIDDEN_FULL_HEAL, FULL_HEAL
-UnknownText_0x1aaa15:
+VermilionCityTeacherText:
text "VERMILION PORT is"
line "KANTO's seaside"
cont "gateway."
@@ -158,7 +156,7 @@ VermilionMachopText2:
cont "the ground flat."
done
-UnknownText_0x1aab1a:
+VermilionCitySuperNerdText:
text "There are eight"
line "GYMS in KANTO."
@@ -286,25 +284,25 @@ VermilionCity_MapEventHeader:
warp_def $1f, $14, 2, VERMILION_PORT_PASSAGE
warp_def $7, $22, 1, DIGLETTS_CAVE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 8
- signpost 3, 25, SIGNPOST_READ, VermilionCitySign
- signpost 19, 5, SIGNPOST_READ, VermilionGymSign
- signpost 13, 5, SIGNPOST_READ, PokemonFanClubSign
- signpost 9, 33, SIGNPOST_READ, VermilionCityDiglettsCaveSign
- signpost 15, 27, SIGNPOST_READ, VermilionCityPortSign
- signpost 5, 10, SIGNPOST_READ, VermilionCityPokeCenterSign
- signpost 13, 22, SIGNPOST_READ, VermilionCityMartSign
- signpost 19, 12, SIGNPOST_ITEM, VermilionCityHiddenFullHeal
-
-.PersonEvents:
+ bg_event 3, 25, BGEVENT_READ, VermilionCitySign
+ bg_event 19, 5, BGEVENT_READ, VermilionGymSign
+ bg_event 13, 5, BGEVENT_READ, PokemonFanClubSign
+ bg_event 9, 33, BGEVENT_READ, VermilionCityDiglettsCaveSign
+ bg_event 15, 27, BGEVENT_READ, VermilionCityPortSign
+ bg_event 5, 10, BGEVENT_READ, VermilionCityPokecenterSign
+ bg_event 13, 22, BGEVENT_READ, VermilionCityMartSign
+ bg_event 19, 12, BGEVENT_ITEM, VermilionCityHiddenFullHeal
+
+.ObjectEvents:
db 6
- person_event SPRITE_TEACHER, 9, 18, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TeacherScript_0x1aa983, -1
- person_event SPRITE_GRAMPS, 6, 23, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, VermilionMachopOwner, -1
- person_event SPRITE_MACHOP, 7, 26, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, VermilionMachop, -1
- person_event SPRITE_SUPER_NERD, 16, 14, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x1aa99b, -1
- person_event SPRITE_BIG_SNORLAX, 8, 34, SPRITEMOVEDATA_SNORLAX, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, VermilionSnorlax, EVENT_VERMILION_CITY_SNORLAX
- person_event SPRITE_POKEFAN_M, 12, 31, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, VermilionGymBadgeGuy, -1
+ object_event SPRITE_TEACHER, 9, 18, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionCityTeacherScript, -1
+ object_event SPRITE_GRAMPS, 6, 23, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionMachopOwner, -1
+ object_event SPRITE_MACHOP, 7, 26, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, VermilionMachop, -1
+ object_event SPRITE_SUPER_NERD, 16, 14, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VermilionCitySuperNerdScript, -1
+ object_event SPRITE_BIG_SNORLAX, 8, 34, SPRITEMOVEDATA_SNORLAX, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionSnorlax, EVENT_VERMILION_CITY_SNORLAX
+ object_event SPRITE_POKEFAN_M, 12, 31, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VermilionGymBadgeGuy, -1
diff --git a/maps/VermilionGym.asm b/maps/VermilionGym.asm
index 4a2af8fc1..3bd2a6590 100644
--- a/maps/VermilionGym.asm
+++ b/maps/VermilionGym.asm
@@ -6,7 +6,7 @@ const_value set 2
const VERMILIONGYM_GYM_GUY
VermilionGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -45,34 +45,34 @@ SurgeScript_0x1920a5:
end
TrainerGentlemanGregory:
- trainer EVENT_BEAT_GENTLEMAN_GREGORY, GENTLEMAN, GREGORY, GentlemanGregorySeenText, GentlemanGregoryBeatenText, 0, GentlemanGregoryScript
+ trainer EVENT_BEAT_GENTLEMAN_GREGORY, GENTLEMAN, GREGORY, GentlemanGregorySeenText, GentlemanGregoryBeatenText, 0, .Script
-GentlemanGregoryScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1923b0
+ writetext GentlemanGregoryAfterBattleText
waitbutton
closetext
end
TrainerGuitaristVincent:
- trainer EVENT_BEAT_GUITARIST_VINCENT, GUITARIST, VINCENT, GuitaristVincentSeenText, GuitaristVincentBeatenText, 0, GuitaristVincentScript
+ trainer EVENT_BEAT_GUITARIST_VINCENT, GUITARIST, VINCENT, GuitaristVincentSeenText, GuitaristVincentBeatenText, 0, .Script
-GuitaristVincentScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x19244b
+ writetext GuitaristVincentAfterBattleText
waitbutton
closetext
end
TrainerJugglerHorton:
- trainer EVENT_BEAT_JUGGLER_HORTON, JUGGLER, HORTON, JugglerHortonSeenText, JugglerHortonBeatenText, 0, JugglerHortonScript
+ trainer EVENT_BEAT_JUGGLER_HORTON, JUGGLER, HORTON, JugglerHortonSeenText, JugglerHortonBeatenText, 0, .Script
-JugglerHortonScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x1924d6
+ writetext JugglerHortonAfterBattleText
waitbutton
closetext
end
@@ -175,7 +175,7 @@ GentlemanGregoryBeatenText:
cont "sir!"
done
-UnknownText_0x1923b0:
+GentlemanGregoryAfterBattleText:
text "When I was still"
line "in the army, LT."
@@ -198,7 +198,7 @@ GuitaristVincentBeatenText:
text "Ooh, how shocking!"
done
-UnknownText_0x19244b:
+GuitaristVincentAfterBattleText:
text "If the GYM's traps"
line "were working, you"
@@ -217,7 +217,7 @@ JugglerHortonBeatenText:
line "I was overpowered…"
done
-UnknownText_0x1924d6:
+JugglerHortonAfterBattleText:
text "Don't get too com-"
line "fortable about"
@@ -269,33 +269,33 @@ VermilionGym_MapEventHeader:
warp_def $11, $4, 7, VERMILION_CITY
warp_def $11, $5, 7, VERMILION_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 17
- signpost 7, 1, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 7, 3, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 7, 5, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 7, 7, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 7, 9, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 9, 1, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 9, 3, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 9, 5, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 9, 7, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 9, 9, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 11, 1, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 11, 3, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 11, 5, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 11, 7, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 11, 9, SIGNPOST_READ, MapVermilionGymSignpost14Script
- signpost 15, 3, SIGNPOST_READ, VermilionGymStatue
- signpost 15, 6, SIGNPOST_READ, VermilionGymStatue
-
-.PersonEvents:
+ bg_event 7, 1, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 7, 3, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 7, 5, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 7, 7, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 7, 9, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 9, 1, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 9, 3, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 9, 5, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 9, 7, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 9, 9, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 11, 1, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 11, 3, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 11, 5, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 11, 7, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 11, 9, BGEVENT_READ, MapVermilionGymSignpost14Script
+ bg_event 15, 3, BGEVENT_READ, VermilionGymStatue
+ bg_event 15, 6, BGEVENT_READ, VermilionGymStatue
+
+.ObjectEvents:
db 5
- person_event SPRITE_SURGE, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, SurgeScript_0x1920a5, -1
- person_event SPRITE_GENTLEMAN, 8, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 4, TrainerGentlemanGregory, -1
- person_event SPRITE_ROCKER, 7, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 3, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_TRAINER, 3, TrainerGuitaristVincent, -1
- person_event SPRITE_SUPER_NERD, 10, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 4, TrainerJugglerHorton, -1
- person_event SPRITE_GYM_GUY, 15, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 1, VermilionGymGuyScript, -1
+ object_event SPRITE_SURGE, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, SurgeScript_0x1920a5, -1
+ object_event SPRITE_GENTLEMAN, 8, 8, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerGentlemanGregory, -1
+ object_event SPRITE_ROCKER, 7, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 3, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerGuitaristVincent, -1
+ object_event SPRITE_SUPER_NERD, 10, 0, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerJugglerHorton, -1
+ object_event SPRITE_GYM_GUY, 15, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 1, VermilionGymGuyScript, -1
diff --git a/maps/VermilionHouseDiglettsCaveSpeechHouse.asm b/maps/VermilionHouseDiglettsCaveSpeechHouse.asm
index 1f1f42e66..0901e7670 100644
--- a/maps/VermilionHouseDiglettsCaveSpeechHouse.asm
+++ b/maps/VermilionHouseDiglettsCaveSpeechHouse.asm
@@ -2,16 +2,16 @@ const_value set 2
const VERMILIONHOUSEDIGLETTSCAVESPEECHHOUSE_GENTLEMAN
VermilionHouseDiglettsCaveSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-GentlemanScript_0x192031:
- jumptextfaceplayer UnknownText_0x192034
+VermilionHouseDiglettsCaveSpeechHouseGentlemanScript:
+ jumptextfaceplayer VermilionHouseDiglettsCaveSpeechHouseGentlemanText
-UnknownText_0x192034:
+VermilionHouseDiglettsCaveSpeechHouseGentlemanText:
text "Over many years,"
line "DIGLETT dug a"
cont "large tunnel."
@@ -29,12 +29,12 @@ VermilionHouseDiglettsCaveSpeechHouse_MapEventHeader:
warp_def $7, $2, 6, VERMILION_CITY
warp_def $7, $3, 6, VERMILION_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_GENTLEMAN, 3, 1, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x192031, -1
+ object_event SPRITE_GENTLEMAN, 3, 1, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VermilionHouseDiglettsCaveSpeechHouseGentlemanScript, -1
diff --git a/maps/VermilionHouseFishingSpeechHouse.asm b/maps/VermilionHouseFishingSpeechHouse.asm
index 3571d066f..58a058aa1 100644
--- a/maps/VermilionHouseFishingSpeechHouse.asm
+++ b/maps/VermilionHouseFishingSpeechHouse.asm
@@ -2,7 +2,7 @@ const_value set 2
const VERMILIONHOUSEFISHINGSPEECHHOUSE_FISHING_GURU
VermilionHouseFishingSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -59,13 +59,13 @@ VermilionHouseFishingSpeechHouse_MapEventHeader:
warp_def $7, $2, 1, VERMILION_CITY
warp_def $7, $3, 1, VERMILION_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 1
- signpost 0, 3, SIGNPOST_READ, FishingDudesHousePhoto
+ bg_event 0, 3, BGEVENT_READ, FishingDudesHousePhoto
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_FISHING_GURU, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, FishingDude, -1
+ object_event SPRITE_FISHING_GURU, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, FishingDude, -1
diff --git a/maps/VermilionMagnetTrainSpeechHouse.asm b/maps/VermilionMagnetTrainSpeechHouse.asm
index c07f6ca28..7c5359ae3 100644
--- a/maps/VermilionMagnetTrainSpeechHouse.asm
+++ b/maps/VermilionMagnetTrainSpeechHouse.asm
@@ -3,22 +3,22 @@ const_value set 2
const VERMILIONMAGNETTRAINSPEECHHOUSE_YOUNGSTER
VermilionMagnetTrainSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-PokefanFScript_0x191eb7:
- jumptextfaceplayer UnknownText_0x191ec0
+VermilionMagnetTrainSpeechHousePokefanFScript:
+ jumptextfaceplayer VermilionMagnetTrainSpeechHousePokefanFText
-YoungsterScript_0x191eba:
- jumptextfaceplayer UnknownText_0x191f16
+VermilionMagnetTrainSpeechHouseYoungsterScript:
+ jumptextfaceplayer VermilionMagnetTrainSpeechHouseYoungsterText
VermilionMagnetTrainSpeechHouseBookshelf:
jumpstd picturebookshelf
-UnknownText_0x191ec0:
+VermilionMagnetTrainSpeechHousePokefanFText:
text "Do you know about"
line "the MAGNET TRAIN?"
@@ -27,7 +27,7 @@ UnknownText_0x191ec0:
cont "DENROD in JOHTO."
done
-UnknownText_0x191f16:
+VermilionMagnetTrainSpeechHouseYoungsterText:
text "I want to go to"
line "SAFFRON to see"
cont "the MAGNET TRAIN."
@@ -42,15 +42,15 @@ VermilionMagnetTrainSpeechHouse_MapEventHeader:
warp_def $7, $2, 4, VERMILION_CITY
warp_def $7, $3, 4, VERMILION_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 1, 0, SIGNPOST_READ, VermilionMagnetTrainSpeechHouseBookshelf
- signpost 1, 1, SIGNPOST_READ, VermilionMagnetTrainSpeechHouseBookshelf
+ bg_event 1, 0, BGEVENT_READ, VermilionMagnetTrainSpeechHouseBookshelf
+ bg_event 1, 1, BGEVENT_READ, VermilionMagnetTrainSpeechHouseBookshelf
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_POKEFAN_F, 3, 2, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanFScript_0x191eb7, -1
- person_event SPRITE_YOUNGSTER, 3, 0, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x191eba, -1
+ object_event SPRITE_POKEFAN_F, 3, 2, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionMagnetTrainSpeechHousePokefanFScript, -1
+ object_event SPRITE_YOUNGSTER, 3, 0, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VermilionMagnetTrainSpeechHouseYoungsterScript, -1
diff --git a/maps/VermilionMart.asm b/maps/VermilionMart.asm
index 7da93f1e2..0825c71d8 100644
--- a/maps/VermilionMart.asm
+++ b/maps/VermilionMart.asm
@@ -4,7 +4,7 @@ const_value set 2
const VERMILIONMART_BUENA
VermilionMart_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -16,13 +16,13 @@ ClerkScript_0x191f7e:
closetext
end
-SuperNerdScript_0x191f85:
- jumptextfaceplayer UnknownText_0x191f8b
+VermilionMartSuperNerdScript:
+ jumptextfaceplayer VermilionMartSuperNerdText
-BuenaScript_0x191f88:
- jumptextfaceplayer UnknownText_0x191fca
+VermilionMartBuenaScript:
+ jumptextfaceplayer VermilionMartBuenaText
-UnknownText_0x191f8b:
+VermilionMartSuperNerdText:
text "TEAM ROCKET is no"
line "longer in KANTO."
@@ -30,7 +30,7 @@ UnknownText_0x191f8b:
line "me happy."
done
-UnknownText_0x191fca:
+VermilionMartBuenaText:
text "I'm thinking about"
line "going shopping in"
cont "SAFFRON."
@@ -45,14 +45,14 @@ VermilionMart_MapEventHeader:
warp_def $7, $2, 5, VERMILION_CITY
warp_def $7, $3, 5, VERMILION_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x191f7e, -1
- person_event SPRITE_SUPER_NERD, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x191f85, -1
- person_event SPRITE_BUENA, 6, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, BuenaScript_0x191f88, -1
+ object_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x191f7e, -1
+ object_event SPRITE_SUPER_NERD, 2, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VermilionMartSuperNerdScript, -1
+ object_event SPRITE_BUENA, 6, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VermilionMartBuenaScript, -1
diff --git a/maps/VermilionPokeCenter1F.asm b/maps/VermilionPokeCenter1F.asm
deleted file mode 100644
index f3cc2d248..000000000
--- a/maps/VermilionPokeCenter1F.asm
+++ /dev/null
@@ -1,100 +0,0 @@
-const_value set 2
- const VERMILIONPOKECENTER1F_NURSE
- const VERMILIONPOKECENTER1F_FISHING_GURU
- const VERMILIONPOKECENTER1F_SAILOR
- const VERMILIONPOKECENTER1F_BUG_CATCHER
-
-VermilionPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x191603:
- jumpstd pokecenternurse
-
-FishingGuruScript_0x191606:
- faceplayer
- opentext
- checkevent EVENT_FOUGHT_SNORLAX
- iftrue UnknownScript_0x191614
- writetext UnknownText_0x191620
- waitbutton
- closetext
- end
-
-UnknownScript_0x191614:
- writetext UnknownText_0x191698
- waitbutton
- closetext
- end
-
-SailorScript_0x19161a:
- jumptextfaceplayer UnknownText_0x1916fe
-
-BugCatcherScript_0x19161d:
- jumptextfaceplayer UnknownText_0x19173b
-
-UnknownText_0x191620:
- text "A sleeping #MON"
- line "is lying in front"
- cont "of DIGLETT'S CAVE."
-
- para "It's a fantastic"
- line "opportunity to get"
-
- para "it, but how do you"
- line "wake it up?"
- done
-
-UnknownText_0x191698:
- text "There used to be a"
- line "sleeping #MON"
-
- para "lying in front of"
- line "DIGLETT'S CAVE."
-
- para "But it seems to"
- line "have disappeared."
- done
-
-UnknownText_0x1916fe:
- text "The FAST SHIP is a"
- line "great place to"
-
- para "meet and battle"
- line "trainers."
- done
-
-UnknownText_0x19173b:
- text "Oh? You have some"
- line "BADGES I've never"
- cont "seen before."
-
- para "Oh, I get it. You"
- line "got them in JOHTO."
- done
-
-VermilionPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 2, VERMILION_CITY
- warp_def $7, $4, 2, VERMILION_CITY
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 4
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x191603, -1
- person_event SPRITE_FISHING_GURU, 2, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, FishingGuruScript_0x191606, -1
- person_event SPRITE_SAILOR, 5, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, SailorScript_0x19161a, -1
- person_event SPRITE_BUG_CATCHER, 5, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, BugCatcherScript_0x19161d, -1
diff --git a/maps/VermilionPokeCenter2FBeta.asm b/maps/VermilionPokeCenter2FBeta.asm
deleted file mode 100644
index 3d8ad1efc..000000000
--- a/maps/VermilionPokeCenter2FBeta.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-VermilionPokeCenter2FBeta_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-VermilionPokeCenter2FBeta_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 1
- warp_def $7, $0, 3, VERMILION_POKECENTER_1F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/VermilionPokecenter1F.asm b/maps/VermilionPokecenter1F.asm
new file mode 100644
index 000000000..3cc524994
--- /dev/null
+++ b/maps/VermilionPokecenter1F.asm
@@ -0,0 +1,100 @@
+const_value set 2
+ const VERMILIONPOKECENTER1F_NURSE
+ const VERMILIONPOKECENTER1F_FISHING_GURU
+ const VERMILIONPOKECENTER1F_SAILOR
+ const VERMILIONPOKECENTER1F_BUG_CATCHER
+
+VermilionPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x191603:
+ jumpstd pokecenternurse
+
+FishingGuruScript_0x191606:
+ faceplayer
+ opentext
+ checkevent EVENT_FOUGHT_SNORLAX
+ iftrue UnknownScript_0x191614
+ writetext UnknownText_0x191620
+ waitbutton
+ closetext
+ end
+
+UnknownScript_0x191614:
+ writetext UnknownText_0x191698
+ waitbutton
+ closetext
+ end
+
+VermilionPokecenter1FSailorScript:
+ jumptextfaceplayer VermilionPokecenter1FSailorText
+
+VermilionPokecenter1FBugCatcherScript:
+ jumptextfaceplayer VermilionPokecenter1FBugCatcherText
+
+UnknownText_0x191620:
+ text "A sleeping #MON"
+ line "is lying in front"
+ cont "of DIGLETT'S CAVE."
+
+ para "It's a fantastic"
+ line "opportunity to get"
+
+ para "it, but how do you"
+ line "wake it up?"
+ done
+
+UnknownText_0x191698:
+ text "There used to be a"
+ line "sleeping #MON"
+
+ para "lying in front of"
+ line "DIGLETT'S CAVE."
+
+ para "But it seems to"
+ line "have disappeared."
+ done
+
+VermilionPokecenter1FSailorText:
+ text "The FAST SHIP is a"
+ line "great place to"
+
+ para "meet and battle"
+ line "trainers."
+ done
+
+VermilionPokecenter1FBugCatcherText:
+ text "Oh? You have some"
+ line "BADGES I've never"
+ cont "seen before."
+
+ para "Oh, I get it. You"
+ line "got them in JOHTO."
+ done
+
+VermilionPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 2, VERMILION_CITY
+ warp_def $7, $4, 2, VERMILION_CITY
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x191603, -1
+ object_event SPRITE_FISHING_GURU, 2, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, FishingGuruScript_0x191606, -1
+ object_event SPRITE_SAILOR, 5, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, VermilionPokecenter1FSailorScript, -1
+ object_event SPRITE_BUG_CATCHER, 5, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VermilionPokecenter1FBugCatcherScript, -1
diff --git a/maps/VermilionPokecenter2FBeta.asm b/maps/VermilionPokecenter2FBeta.asm
new file mode 100644
index 000000000..0fa256231
--- /dev/null
+++ b/maps/VermilionPokecenter2FBeta.asm
@@ -0,0 +1,23 @@
+VermilionPokecenter2FBeta_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+VermilionPokecenter2FBeta_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 1
+ warp_def $7, $0, 3, VERMILION_POKECENTER_1F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/VermilionPort.asm b/maps/VermilionPort.asm
index 4cbb78604..011f1560e 100644
--- a/maps/VermilionPort.asm
+++ b/maps/VermilionPort.asm
@@ -4,34 +4,30 @@ const_value set 2
const VERMILIONPORT_SUPER_NERD
VermilionPort_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- maptrigger .Trigger0
- maptrigger .Trigger1
+ scene_script .DummyScene0
+ scene_script .LeaveFastShip
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.Trigger0:
+.DummyScene0:
end
-.Trigger1:
- priorityjump UnknownScript_0x74da6
+.LeaveFastShip:
+ priorityjump .LeaveFastShipScript
end
.FlyPoint:
setflag ENGINE_FLYPOINT_VERMILION
return
-UnknownScript_0x74da6:
+.LeaveFastShipScript:
applymovement PLAYER, MovementData_0x74ef3
appear VERMILIONPORT_SAILOR1
- dotrigger $0
+ setscene $0
setevent EVENT_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_TWIN_1
setevent EVENT_FAST_SHIP_CABINS_SE_SSE_GENTLEMAN
setevent EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
@@ -72,7 +68,7 @@ SailorScript_0x74dc4:
clearevent EVENT_BEAT_SCHOOLBOY_RICKY
setevent EVENT_FAST_SHIP_DESTINATION_OLIVINE
appear VERMILIONPORT_SAILOR1
- domaptrigger FAST_SHIP_1F, $1
+ setmapscene FAST_SHIP_1F, $1
warp FAST_SHIP_1F, $19, $1
end
@@ -312,16 +308,16 @@ VermilionPort_MapEventHeader:
warp_def $5, $9, 5, VERMILION_PORT_PASSAGE
warp_def $11, $7, 1, FAST_SHIP_1F
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 0, $b, $7, $0, UnknownScript_0x74e20, $0, $0
+ coord_event 0, $b, $7, UnknownScript_0x74e20
-.Signposts:
+.BGEvents:
db 1
- signpost 13, 16, SIGNPOST_ITEM, VermilionPortHiddenIron
+ bg_event 13, 16, BGEVENT_ITEM, VermilionPortHiddenIron
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_SAILOR, 17, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SailorScript_0x74dc4, EVENT_VERMILION_PORT_SAILOR_AT_GANGWAY
- person_event SPRITE_SAILOR, 11, 6, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SailorScript_0x74e97, -1
- person_event SPRITE_SUPER_NERD, 11, 11, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SuperNerdScript_0x74ee6, -1
+ object_event SPRITE_SAILOR, 17, 7, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SailorScript_0x74dc4, EVENT_VERMILION_PORT_SAILOR_AT_GANGWAY
+ object_event SPRITE_SAILOR, 11, 6, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SailorScript_0x74e97, -1
+ object_event SPRITE_SUPER_NERD, 11, 11, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SuperNerdScript_0x74ee6, -1
diff --git a/maps/VermilionPortPassage.asm b/maps/VermilionPortPassage.asm
index 8acb74505..1b6aa8ac1 100644
--- a/maps/VermilionPortPassage.asm
+++ b/maps/VermilionPortPassage.asm
@@ -2,16 +2,16 @@ const_value set 2
const VERMILIONPORTPASSAGE_TEACHER
VermilionPortPassage_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-TeacherScript_0x7701a:
- jumptextfaceplayer UnknownText_0x7701d
+VermilionPortPassageTeacherScript:
+ jumptextfaceplayer VermilionPortPassageTeacherText
-UnknownText_0x7701d:
+VermilionPortPassageTeacherText:
text "The FAST SHIP"
line "sails on Wednes-"
cont "days and Sundays"
@@ -30,12 +30,12 @@ VermilionPortPassage_MapEventHeader:
warp_def $2, $3, 3, VERMILION_PORT_PASSAGE
warp_def $e, $3, 1, VERMILION_PORT
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_TEACHER, 1, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TeacherScript_0x7701a, -1
+ object_event SPRITE_TEACHER, 1, 17, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionPortPassageTeacherScript, -1
diff --git a/maps/VictoryRoad.asm b/maps/VictoryRoad.asm
index 3b85a534a..a2533a2ed 100644
--- a/maps/VictoryRoad.asm
+++ b/maps/VictoryRoad.asm
@@ -7,24 +7,22 @@ const_value set 2
const VICTORYROAD_POKE_BALL5
VictoryRoad_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x74490, 0
- dw UnknownScript_0x74491, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 0
-UnknownScript_0x74490:
+.DummyScene0:
end
-UnknownScript_0x74491:
+.DummyScene1:
end
UnknownScript_0x74492:
- moveperson VICTORYROAD_SILVER, $12, $b
+ moveobject VICTORYROAD_SILVER, $12, $b
spriteface PLAYER, DOWN
showemote EMOTE_SHOCK, PLAYER, 15
special Special_FadeOutMusic
@@ -34,7 +32,7 @@ UnknownScript_0x74492:
scall UnknownScript_0x744d4
applymovement VICTORYROAD_SILVER, MovementData_0x7454c
disappear VICTORYROAD_SILVER
- dotrigger $1
+ setscene $1
playmapmusic
end
@@ -48,7 +46,7 @@ UnknownScript_0x744b5:
scall UnknownScript_0x744d4
applymovement VICTORYROAD_SILVER, MovementData_0x74555
disappear VICTORYROAD_SILVER
- dotrigger $1
+ setscene $1
playmapmusic
end
@@ -66,7 +64,7 @@ UnknownScript_0x744d4:
iftrue UnknownScript_0x7450f
winlosstext UnknownText_0x7463d, UnknownText_0x747aa
setlasttalked VICTORYROAD_SILVER
- loadtrainer RIVAL1, RIVAL1_15
+ loadtrainer RIVAL1, RIVAL1_5_TOTODILE
startbattle
dontrestartmapmusic
reloadmapafterbattle
@@ -75,7 +73,7 @@ UnknownScript_0x744d4:
UnknownScript_0x744ff:
winlosstext UnknownText_0x7463d, UnknownText_0x747aa
setlasttalked VICTORYROAD_SILVER
- loadtrainer RIVAL1, RIVAL1_13
+ loadtrainer RIVAL1, RIVAL1_5_CHIKORITA
startbattle
dontrestartmapmusic
reloadmapafterbattle
@@ -84,7 +82,7 @@ UnknownScript_0x744ff:
UnknownScript_0x7450f:
winlosstext UnknownText_0x7463d, UnknownText_0x747aa
setlasttalked VICTORYROAD_SILVER
- loadtrainer RIVAL1, RIVAL1_14
+ loadtrainer RIVAL1, RIVAL1_5_CYNDAQUIL
startbattle
dontrestartmapmusic
reloadmapafterbattle
@@ -259,21 +257,21 @@ VictoryRoad_MapEventHeader:
warp_def $1b, $0, 8, VICTORY_ROAD
warp_def $5, $d, 3, ROUTE_23
-.XYTriggers:
+.CoordEvents:
db 2
- xy_trigger 0, $8, $c, $0, UnknownScript_0x74492, $0, $0
- xy_trigger 0, $8, $d, $0, UnknownScript_0x744b5, $0, $0
+ coord_event 0, $8, $c, UnknownScript_0x74492
+ coord_event 0, $8, $d, UnknownScript_0x744b5
-.Signposts:
+.BGEvents:
db 2
- signpost 29, 3, SIGNPOST_ITEM, VictoryRoadHiddenMaxPotion
- signpost 65, 3, SIGNPOST_ITEM, VictoryRoadHiddenFullHeal
+ bg_event 29, 3, BGEVENT_ITEM, VictoryRoadHiddenMaxPotion
+ bg_event 65, 3, BGEVENT_ITEM, VictoryRoadHiddenFullHeal
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_SILVER, 13, 18, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_VICTORY_ROAD
- person_event SPRITE_POKE_BALL, 28, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, VictoryRoadTMEarthquake, EVENT_VICTORY_ROAD_TM_EARTHQUAKE
- person_event SPRITE_POKE_BALL, 48, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, VictoryRoadMaxRevive, EVENT_VICTORY_ROAD_MAX_REVIVE
- person_event SPRITE_POKE_BALL, 29, 18, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, VictoryRoadFullRestore, EVENT_VICTORY_ROAD_FULL_RESTORE
- person_event SPRITE_POKE_BALL, 48, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, VictoryRoadFullHeal, EVENT_VICTORY_ROAD_FULL_HEAL
- person_event SPRITE_POKE_BALL, 38, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, VictoryRoadHPUp, EVENT_VICTORY_ROAD_HP_UP
+ object_event SPRITE_SILVER, 13, 18, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_VICTORY_ROAD
+ object_event SPRITE_POKE_BALL, 28, 3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VictoryRoadTMEarthquake, EVENT_VICTORY_ROAD_TM_EARTHQUAKE
+ object_event SPRITE_POKE_BALL, 48, 12, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VictoryRoadMaxRevive, EVENT_VICTORY_ROAD_MAX_REVIVE
+ object_event SPRITE_POKE_BALL, 29, 18, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VictoryRoadFullRestore, EVENT_VICTORY_ROAD_FULL_RESTORE
+ object_event SPRITE_POKE_BALL, 48, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VictoryRoadFullHeal, EVENT_VICTORY_ROAD_FULL_HEAL
+ object_event SPRITE_POKE_BALL, 38, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VictoryRoadHPUp, EVENT_VICTORY_ROAD_HP_UP
diff --git a/maps/VictoryRoadGate.asm b/maps/VictoryRoadGate.asm
index 08737c111..10bc70b99 100644
--- a/maps/VictoryRoadGate.asm
+++ b/maps/VictoryRoadGate.asm
@@ -4,64 +4,62 @@ const_value set 2
const VICTORYROADGATE_BLACK_BELT2
VictoryRoadGate_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x9b9fb, 0
- dw UnknownScript_0x9b9fc, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 0
-UnknownScript_0x9b9fb:
+.DummyScene0:
end
-UnknownScript_0x9b9fc:
+.DummyScene1:
end
-UnknownScript_0x9b9fd:
+VictoryRoadGateBadgeCheckScene:
spriteface PLAYER, LEFT
- jump UnknownScript_0x9ba04
+ jump VictoryRoadGateBadgeCheckScript
-OfficerScript_0x9ba03:
+VictoryRoadGateOfficerScript:
faceplayer
-UnknownScript_0x9ba04:
+VictoryRoadGateBadgeCheckScript:
opentext
- writetext UnknownText_0x9ba29
+ writetext VictoryRoadGateOfficerText
buttonsound
checkcode VAR_BADGES
- if_greater_than 7, UnknownScript_0x9ba19
- writetext UnknownText_0x9ba5f
+ if_greater_than 7, .AllEightBadges
+ writetext VictoryRoadGateNotEnoughBadgesText
waitbutton
closetext
- applymovement PLAYER, MovementData_0x9ba27
+ applymovement PLAYER, VictoryRoadGateStepDownMovement
end
-UnknownScript_0x9ba19:
- writetext UnknownText_0x9bab4
+.AllEightBadges:
+ writetext VictoryRoadGateEightBadgesText
waitbutton
closetext
- dotrigger $1
+ setscene $1
end
-BlackBeltScript_0x9ba21:
- jumptextfaceplayer UnknownText_0x9baf1
+VictoryRoadGateLeftBlackBeltScript:
+ jumptextfaceplayer VictoryRoadGateLeftBlackBeltText
-BlackBeltScript_0x9ba24:
- jumptextfaceplayer UnknownText_0x9bb37
+VictoryRoadGateRightBlackBeltScript:
+ jumptextfaceplayer VictoryRoadGateRightBlackBeltText
-MovementData_0x9ba27:
+VictoryRoadGateStepDownMovement:
step DOWN
step_end
-UnknownText_0x9ba29:
+VictoryRoadGateOfficerText:
text "Only trainers who"
line "have proven them-"
cont "selves may pass."
done
-UnknownText_0x9ba5f:
+VictoryRoadGateNotEnoughBadgesText:
text "You don't have all"
line "the GYM BADGES of"
cont "JOHTO."
@@ -71,7 +69,7 @@ UnknownText_0x9ba5f:
cont "through."
done
-UnknownText_0x9bab4:
+VictoryRoadGateEightBadgesText:
text "Oh! The eight"
line "BADGES of JOHTO!"
@@ -79,7 +77,7 @@ UnknownText_0x9bab4:
line "on through!"
done
-UnknownText_0x9baf1:
+VictoryRoadGateLeftBlackBeltText:
text "This way leads to"
line "MT.SILVER."
@@ -88,7 +86,7 @@ UnknownText_0x9baf1:
cont "there."
done
-UnknownText_0x9bb37:
+VictoryRoadGateRightBlackBeltText:
text "Off to the #MON"
line "LEAGUE, are you?"
@@ -114,15 +112,15 @@ VictoryRoadGate_MapEventHeader:
warp_def $7, $1, 2, ROUTE_28
warp_def $7, $2, 2, ROUTE_28
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 0, $b, $a, $0, UnknownScript_0x9b9fd, $0, $0
+ coord_event 0, $b, $a, VictoryRoadGateBadgeCheckScene
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_OFFICER, 11, 8, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, OfficerScript_0x9ba03, -1
- person_event SPRITE_BLACK_BELT, 5, 7, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackBeltScript_0x9ba21, EVENT_OPENED_MT_SILVER
- person_event SPRITE_BLACK_BELT, 5, 12, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, BlackBeltScript_0x9ba24, EVENT_FOUGHT_SNORLAX
+ object_event SPRITE_OFFICER, 11, 8, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VictoryRoadGateOfficerScript, -1
+ object_event SPRITE_BLACK_BELT, 5, 7, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VictoryRoadGateLeftBlackBeltScript, EVENT_OPENED_MT_SILVER
+ object_event SPRITE_BLACK_BELT, 5, 12, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VictoryRoadGateRightBlackBeltScript, EVENT_FOUGHT_SNORLAX
diff --git a/maps/VioletCity.asm b/maps/VioletCity.asm
index 87ec32077..e6ff519a4 100644
--- a/maps/VioletCity.asm
+++ b/maps/VioletCity.asm
@@ -9,13 +9,11 @@ const_value set 2
const VIOLETCITY_POKE_BALL2
VioletCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
@@ -84,7 +82,7 @@ SproutTowerSign:
EarlsPokemonAcademySign:
jumptext EarlsPokemonAcademySignText
-VioletCityPokeCenterSign:
+VioletCityPokecenterSign:
jumpstd pokecentersign
VioletCityMartSign:
@@ -291,31 +289,31 @@ VioletCity_MapEventHeader:
warp_def $11, $1e, 1, EARLS_POKEMON_ACADEMY
warp_def $f, $3, 1, VIOLET_NICKNAME_SPEECH_HOUSE
warp_def $19, $1f, 1, VIOLET_POKECENTER_1F
- warp_def $1d, $15, 1, VIOLET_ONIX_TRADE_HOUSE
+ warp_def $1d, $15, 1, VIOLET_KYLES_HOUSE
warp_def $5, $17, 1, SPROUT_TOWER_1F
warp_def $18, $27, 1, ROUTE_31_VIOLET_GATE
warp_def $19, $27, 2, ROUTE_31_VIOLET_GATE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 7
- signpost 20, 24, SIGNPOST_READ, VioletCitySign
- signpost 17, 15, SIGNPOST_READ, VioletGymSign
- signpost 8, 24, SIGNPOST_READ, SproutTowerSign
- signpost 17, 27, SIGNPOST_READ, EarlsPokemonAcademySign
- signpost 25, 32, SIGNPOST_READ, VioletCityPokeCenterSign
- signpost 17, 10, SIGNPOST_READ, VioletCityMartSign
- signpost 14, 37, SIGNPOST_ITEM, VioletCityHiddenHyperPotion
-
-.PersonEvents:
+ bg_event 20, 24, BGEVENT_READ, VioletCitySign
+ bg_event 17, 15, BGEVENT_READ, VioletGymSign
+ bg_event 8, 24, BGEVENT_READ, SproutTowerSign
+ bg_event 17, 27, BGEVENT_READ, EarlsPokemonAcademySign
+ bg_event 25, 32, BGEVENT_READ, VioletCityPokecenterSign
+ bg_event 17, 10, BGEVENT_READ, VioletCityMartSign
+ bg_event 14, 37, BGEVENT_ITEM, VioletCityHiddenHyperPotion
+
+.ObjectEvents:
db 8
- person_event SPRITE_FISHER, 16, 13, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, VioletCityEarlScript, EVENT_VIOLET_CITY_EARL
- person_event SPRITE_LASS, 28, 28, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, VioletCityLassScript, -1
- person_event SPRITE_SUPER_NERD, 14, 24, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, VioletCitySuperNerdScript, -1
- person_event SPRITE_GRAMPS, 20, 17, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, VioletCityGrampsScript, -1
- person_event SPRITE_YOUNGSTER, 18, 5, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, VioletCityYoungsterScript, -1
- person_event SPRITE_FRUIT_TREE, 29, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, VioletCityFruitTreeScript, -1
- person_event SPRITE_POKE_BALL, 1, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, VioletCityPPUp, EVENT_VIOLET_CITY_PP_UP
- person_event SPRITE_POKE_BALL, 5, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, VioletCityRareCandy, EVENT_VIOLET_CITY_RARE_CANDY
+ object_event SPRITE_FISHER, 16, 13, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VioletCityEarlScript, EVENT_VIOLET_CITY_EARL
+ object_event SPRITE_LASS, 28, 28, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VioletCityLassScript, -1
+ object_event SPRITE_SUPER_NERD, 14, 24, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VioletCitySuperNerdScript, -1
+ object_event SPRITE_GRAMPS, 20, 17, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletCityGrampsScript, -1
+ object_event SPRITE_YOUNGSTER, 18, 5, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VioletCityYoungsterScript, -1
+ object_event SPRITE_FRUIT_TREE, 29, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletCityFruitTreeScript, -1
+ object_event SPRITE_POKE_BALL, 1, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VioletCityPPUp, EVENT_VIOLET_CITY_PP_UP
+ object_event SPRITE_POKE_BALL, 5, 35, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VioletCityRareCandy, EVENT_VIOLET_CITY_RARE_CANDY
diff --git a/maps/VioletGym.asm b/maps/VioletGym.asm
index b67784821..a40fe33db 100644
--- a/maps/VioletGym.asm
+++ b/maps/VioletGym.asm
@@ -5,7 +5,7 @@ const_value set 2
const VIOLETGYM_GYM_GUY
VioletGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -30,13 +30,13 @@ FalknerScript_0x683c2:
waitsfx
setflag ENGINE_ZEPHYRBADGE
checkcode VAR_BADGES
- scall VioletGymTriggerRockets
+ scall VioletGymActivateRockets
.FightDone:
checkevent EVENT_GOT_TM31_MUD_SLAP
iftrue .SpeechAfterTM
setevent EVENT_BEAT_BIRD_KEEPER_ROD
setevent EVENT_BEAT_BIRD_KEEPER_ABE
- domaptrigger ELMS_LAB, $2
+ setmapscene ELMS_LAB, $2
specialphonecall SPECIALCALL_ASSISTANT
writetext UnknownText_0x685c8
buttonsound
@@ -55,7 +55,7 @@ FalknerScript_0x683c2:
closetext
end
-VioletGymTriggerRockets:
+VioletGymActivateRockets:
if_equal 7, .RadioTowerRockets
if_equal 6, .GoldenrodRockets
end
@@ -67,23 +67,23 @@ VioletGymTriggerRockets:
jumpstd radiotowerrockets
TrainerBird_keeperRod:
- trainer EVENT_BEAT_BIRD_KEEPER_ROD, BIRD_KEEPER, ROD, Bird_keeperRodSeenText, Bird_keeperRodBeatenText, 0, Bird_keeperRodScript
+ trainer EVENT_BEAT_BIRD_KEEPER_ROD, BIRD_KEEPER, ROD, Bird_keeperRodSeenText, Bird_keeperRodBeatenText, 0, .Script
-Bird_keeperRodScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x68837
+ writetext Bird_keeperRodAfterBattleText
waitbutton
closetext
end
TrainerBird_keeperAbe:
- trainer EVENT_BEAT_BIRD_KEEPER_ABE, BIRD_KEEPER, ABE, Bird_keeperAbeSeenText, Bird_keeperAbeBeatenText, 0, Bird_keeperAbeScript
+ trainer EVENT_BEAT_BIRD_KEEPER_ABE, BIRD_KEEPER, ABE, Bird_keeperAbeSeenText, Bird_keeperAbeBeatenText, 0, .Script
-Bird_keeperAbeScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x688c7
+ writetext Bird_keeperAbeAfterBattleText
waitbutton
closetext
end
@@ -226,7 +226,7 @@ Bird_keeperRodBeatenText:
text "Gaaah!"
done
-UnknownText_0x68837:
+Bird_keeperRodAfterBattleText:
text "FALKNER's skills"
line "are for real!"
@@ -246,7 +246,7 @@ Bird_keeperAbeBeatenText:
line "true!"
done
-UnknownText_0x688c7:
+Bird_keeperAbeAfterBattleText:
text "This is pathetic,"
line "losing to some"
cont "rookie trainer…"
@@ -290,17 +290,17 @@ VioletGym_MapEventHeader:
warp_def $f, $4, 2, VIOLET_CITY
warp_def $f, $5, 2, VIOLET_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 13, 3, SIGNPOST_READ, VioletGymStatue
- signpost 13, 6, SIGNPOST_READ, VioletGymStatue
+ bg_event 13, 3, BGEVENT_READ, VioletGymStatue
+ bg_event 13, 6, BGEVENT_READ, VioletGymStatue
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_FALKNER, 1, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, FalknerScript_0x683c2, -1
- person_event SPRITE_YOUNGSTER, 6, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerBird_keeperRod, -1
- person_event SPRITE_YOUNGSTER, 10, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerBird_keeperAbe, -1
- person_event SPRITE_GYM_GUY, 13, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, VioletGymGuyScript, -1
+ object_event SPRITE_FALKNER, 1, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FalknerScript_0x683c2, -1
+ object_event SPRITE_YOUNGSTER, 6, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBird_keeperRod, -1
+ object_event SPRITE_YOUNGSTER, 10, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBird_keeperAbe, -1
+ object_event SPRITE_GYM_GUY, 13, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VioletGymGuyScript, -1
diff --git a/maps/VioletKylesHouse.asm b/maps/VioletKylesHouse.asm
new file mode 100644
index 000000000..fb3bfc5d5
--- /dev/null
+++ b/maps/VioletKylesHouse.asm
@@ -0,0 +1,53 @@
+const_value set 2
+ const VIOLETKYLESHOUSE_POKEFAN_M
+ const VIOLETKYLESHOUSE_KYLE
+
+VioletKylesHouse_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+VioletKylesHousePokefanMScript:
+ jumptextfaceplayer VioletKylesHousePokefanMText
+
+Kyle:
+ faceplayer
+ opentext
+ trade NPCTRADE_KYLE
+ waitbutton
+ closetext
+ end
+
+VioletKylesHousePokefanMText:
+ text "A #MON you get"
+ line "in a trade grows"
+ cont "quickly."
+
+ para "But if you don't"
+ line "have the right GYM"
+
+ para "BADGE, they may"
+ line "disobey you."
+ done
+
+VioletKylesHouse_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 2
+ warp_def $7, $3, 6, VIOLET_CITY
+ warp_def $7, $4, 6, VIOLET_CITY
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 2
+ object_event SPRITE_POKEFAN_M, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletKylesHousePokefanMScript, -1
+ object_event SPRITE_YOUNGSTER, 5, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Kyle, -1
diff --git a/maps/VioletMart.asm b/maps/VioletMart.asm
index 0513be044..c28c00869 100644
--- a/maps/VioletMart.asm
+++ b/maps/VioletMart.asm
@@ -4,7 +4,7 @@ const_value set 2
const VIOLETMART_COOLTRAINER_M
VioletMart_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -16,13 +16,13 @@ ClerkScript_0x68295:
closetext
end
-GrannyScript_0x6829c:
- jumptextfaceplayer UnknownText_0x682a2
+VioletMartGrannyScript:
+ jumptextfaceplayer VioletMartGrannyText
-CooltrainerMScript_0x6829f:
- jumptextfaceplayer UnknownText_0x68323
+VioletMartCooltrainerMScript:
+ jumptextfaceplayer VioletMartCooltrainerMText
-UnknownText_0x682a2:
+VioletMartGrannyText:
text "When you first"
line "catch a #MON,"
cont "it may be weak."
@@ -36,7 +36,7 @@ UnknownText_0x682a2:
cont "love."
done
-UnknownText_0x68323:
+VioletMartCooltrainerMText:
text "#MON can hold"
line "items like POTION"
cont "and ANTIDOTE."
@@ -57,14 +57,14 @@ VioletMart_MapEventHeader:
warp_def $7, $2, 1, VIOLET_CITY
warp_def $7, $3, 1, VIOLET_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x68295, -1
- person_event SPRITE_GRANNY, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrannyScript_0x6829c, -1
- person_event SPRITE_COOLTRAINER_M, 2, 5, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x6829f, -1
+ object_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x68295, -1
+ object_event SPRITE_GRANNY, 6, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletMartGrannyScript, -1
+ object_event SPRITE_COOLTRAINER_M, 2, 5, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VioletMartCooltrainerMScript, -1
diff --git a/maps/VioletNicknameSpeechHouse.asm b/maps/VioletNicknameSpeechHouse.asm
index 7717c7136..14cdb7c0f 100644
--- a/maps/VioletNicknameSpeechHouse.asm
+++ b/maps/VioletNicknameSpeechHouse.asm
@@ -4,17 +4,17 @@ const_value set 2
const VIOLETNICKNAMESPEECHHOUSE_BIRD
VioletNicknameSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-TeacherScript_0x693e9:
- jumptextfaceplayer UnknownText_0x693fa
+VioletNicknameSpeechHouseTeacherScript:
+ jumptextfaceplayer VioletNicknameSpeechHouseTeacherText
-LassScript_0x693ec:
- jumptextfaceplayer UnknownText_0x6945e
+VioletNicknameSpeechHouseLassScript:
+ jumptextfaceplayer VioletNicknameSpeechHouseLassText
BirdScript_0x693ef:
faceplayer
@@ -25,7 +25,7 @@ BirdScript_0x693ef:
closetext
end
-UnknownText_0x693fa:
+VioletNicknameSpeechHouseTeacherText:
text "She uses the names"
line "of her favorite"
cont "things to eat."
@@ -35,7 +35,7 @@ UnknownText_0x693fa:
cont "#MON, I mean."
done
-UnknownText_0x6945e:
+VioletNicknameSpeechHouseLassText:
text "I call my PIDGEY"
line "STRAWBERRY!"
done
@@ -53,14 +53,14 @@ VioletNicknameSpeechHouse_MapEventHeader:
warp_def $7, $3, 4, VIOLET_CITY
warp_def $7, $4, 4, VIOLET_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_TEACHER, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, TeacherScript_0x693e9, -1
- person_event SPRITE_LASS, 4, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LassScript_0x693ec, -1
- person_event SPRITE_BIRD, 2, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, BirdScript_0x693ef, -1
+ object_event SPRITE_TEACHER, 3, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletNicknameSpeechHouseTeacherScript, -1
+ object_event SPRITE_LASS, 4, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VioletNicknameSpeechHouseLassScript, -1
+ object_event SPRITE_BIRD, 2, 5, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BirdScript_0x693ef, -1
diff --git a/maps/VioletOnixTradeHouse.asm b/maps/VioletOnixTradeHouse.asm
deleted file mode 100644
index 5824d6f4b..000000000
--- a/maps/VioletOnixTradeHouse.asm
+++ /dev/null
@@ -1,53 +0,0 @@
-const_value set 2
- const VIOLETONIXTRADEHOUSE_POKEFAN_M
- const VIOLETONIXTRADEHOUSE_KYLE
-
-VioletOnixTradeHouse_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-PokefanMScript_0x6998d:
- jumptextfaceplayer UnknownText_0x69997
-
-Kyle:
- faceplayer
- opentext
- trade $1
- waitbutton
- closetext
- end
-
-UnknownText_0x69997:
- text "A #MON you get"
- line "in a trade grows"
- cont "quickly."
-
- para "But if you don't"
- line "have the right GYM"
-
- para "BADGE, they may"
- line "disobey you."
- done
-
-VioletOnixTradeHouse_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 2
- warp_def $7, $3, 6, VIOLET_CITY
- warp_def $7, $4, 6, VIOLET_CITY
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 2
- person_event SPRITE_POKEFAN_M, 3, 2, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x6998d, -1
- person_event SPRITE_YOUNGSTER, 5, 6, SPRITEMOVEDATA_WALK_UP_DOWN, 2, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, Kyle, -1
diff --git a/maps/VioletPokeCenter1F.asm b/maps/VioletPokeCenter1F.asm
deleted file mode 100644
index 607c8e915..000000000
--- a/maps/VioletPokeCenter1F.asm
+++ /dev/null
@@ -1,240 +0,0 @@
-const_value set 2
- const VIOLETPOKECENTER1F_NURSE
- const VIOLETPOKECENTER1F_GAMEBOY_KID
- const VIOLETPOKECENTER1F_GENTLEMAN
- const VIOLETPOKECENTER1F_YOUNGSTER
- const VIOLETPOKECENTER1F_SCIENTIST
-
-VioletPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-VioletPokeCenterNurse:
- jumpstd pokecenternurse
-
-VioletPokeCenter1F_ElmsAideScript:
- faceplayer
- opentext
- checkevent EVENT_REFUSED_TO_TAKE_EGG_FROM_ELMS_AIDE
- iftrue .SecondTimeAsking
- writetext UnknownText_0x69555
-.AskTakeEgg:
- yesorno
- iffalse .RefusedEgg
- checkcode VAR_PARTYCOUNT
- if_equal PARTY_LENGTH, .PartyFull
- giveegg TOGEPI, 5
- stringtotext .eggname, $1
- scall .AideGivesEgg
- setevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE
- clearevent EVENT_ELMS_AIDE_IN_LAB
- clearevent EVENT_TOGEPI_HATCHED
- domaptrigger ROUTE_32, $1
- writetext UnknownText_0x695c5
- waitbutton
- closetext
- checkcode VAR_FACING
- if_equal UP, .AideWalksAroundPlayer
- spriteface PLAYER, DOWN
- applymovement VIOLETPOKECENTER1F_SCIENTIST, MovementData_AideWalksStraightOutOfPokecenter
- playsound SFX_EXIT_BUILDING
- disappear VIOLETPOKECENTER1F_SCIENTIST
- waitsfx
- end
-
-.AideWalksAroundPlayer:
- applymovement VIOLETPOKECENTER1F_SCIENTIST, MovementData_AideWalksLeftToExitPokecenter
- spriteface PLAYER, DOWN
- applymovement VIOLETPOKECENTER1F_SCIENTIST, MovementData_AideFinishesLeavingPokecenter
- playsound SFX_EXIT_BUILDING
- disappear VIOLETPOKECENTER1F_SCIENTIST
- waitsfx
- end
-
-.eggname
- db "EGG@"
-
-.AideGivesEgg:
- jumpstd receivetogepiegg
- end
-
-.PartyFull:
- writetext UnknownText_0x69693
- waitbutton
- closetext
- end
-
-.RefusedEgg:
- writetext UnknownText_0x696f2
- waitbutton
- closetext
- setevent EVENT_REFUSED_TO_TAKE_EGG_FROM_ELMS_AIDE
- end
-
-.SecondTimeAsking:
- writetext UnknownText_0x69712
- jump .AskTakeEgg
-
-GameboyKidScript_0x69540:
- jumptextfaceplayer UnknownText_0x69809
-
-GentlemanScript_0x69543:
- jumptextfaceplayer UnknownText_0x6983c
-
-YoungsterScript_0x69546:
- jumptextfaceplayer UnknownText_0x698b8
-
-MovementData_AideWalksStraightOutOfPokecenter:
- step DOWN
- step DOWN
- step DOWN
- step DOWN
- step_end
-
-MovementData_AideWalksLeftToExitPokecenter:
- step LEFT
- step DOWN
- step_end
-
-MovementData_AideFinishesLeavingPokecenter:
- step DOWN
- step DOWN
- step DOWN
- step_end
-
-UnknownText_0x69555:
- text "<PLAY_G>, long"
- line "time, no see."
-
- para "PROF.ELM asked me"
- line "to find you."
-
- para "He has another"
- line "favor to ask."
-
- para "Would you take the"
- line "#MON EGG?"
- done
-
-UnknownText_0x695c5:
- text "We discovered that"
- line "a #MON will not"
-
- para "hatch until it"
- line "grows in the EGG."
-
- para "It also has to be"
- line "with other active"
- cont "#MON to hatch."
-
- para "<PLAY_G>, you're"
- line "the only person"
- cont "we can rely on."
-
- para "Please call PROF."
- line "ELM when that EGG"
- cont "hatches!"
- done
-
-UnknownText_0x69693:
- text "Oh, no. You can't"
- line "carry any more"
- cont "#MON with you."
-
- para "I'll wait here"
- line "while you make"
- cont "room for the EGG."
- done
-
-UnknownText_0x696f2:
- text "B-but… PROF.ELM"
- line "asked for you…"
- done
-
-UnknownText_0x69712:
- text "<PLAY_G>, will you"
- line "take the EGG?"
- done
-
-UnknownText_0x6972d:
- text "I've been thinking"
- line "it'd be great to"
-
- para "be able to link up"
- line "and battle with my"
-
- para "friends who live"
- line "far away."
- done
-
-UnknownText_0x69791:
- text "I just battled a"
- line "friend in CIANWOOD"
- cont "over a link."
-
- para "If you connect a"
- line "MOBILE ADAPTER,"
-
- para "you can link with"
- line "a friend far away."
- done
-
-UnknownText_0x69809:
- text "A guy named BILL"
- line "made the #MON"
- cont "PC storage system."
- done
-
-UnknownText_0x6983c:
- text "It was around"
- line "three years ago."
-
- para "TEAM ROCKET was up"
- line "to no good with"
- cont "#MON."
-
- para "But justice pre-"
- line "vailed--a young"
- cont "kid broke 'em up."
- done
-
-UnknownText_0x698b8:
- text "#MON are smart."
- line "They won't obey a"
-
- para "trainer they don't"
- line "respect."
-
- para "Without the right"
- line "GYM BADGES, they"
-
- para "will just do as"
- line "they please."
- done
-
-VioletPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 5, VIOLET_CITY
- warp_def $7, $4, 5, VIOLET_CITY
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 5
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, VioletPokeCenterNurse, -1
- person_event SPRITE_GAMEBOY_KID, 6, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, GameboyKidScript_0x69540, -1
- person_event SPRITE_GENTLEMAN, 4, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GentlemanScript_0x69543, -1
- person_event SPRITE_YOUNGSTER, 1, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x69546, -1
- person_event SPRITE_SCIENTIST, 3, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, VioletPokeCenter1F_ElmsAideScript, EVENT_ELMS_AIDE_IN_VIOLET_POKEMON_CENTER
diff --git a/maps/VioletPokecenter1F.asm b/maps/VioletPokecenter1F.asm
new file mode 100644
index 000000000..8ddef8239
--- /dev/null
+++ b/maps/VioletPokecenter1F.asm
@@ -0,0 +1,240 @@
+const_value set 2
+ const VIOLETPOKECENTER1F_NURSE
+ const VIOLETPOKECENTER1F_GAMEBOY_KID
+ const VIOLETPOKECENTER1F_GENTLEMAN
+ const VIOLETPOKECENTER1F_YOUNGSTER
+ const VIOLETPOKECENTER1F_SCIENTIST
+
+VioletPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+VioletPokecenterNurse:
+ jumpstd pokecenternurse
+
+VioletPokecenter1F_ElmsAideScript:
+ faceplayer
+ opentext
+ checkevent EVENT_REFUSED_TO_TAKE_EGG_FROM_ELMS_AIDE
+ iftrue .SecondTimeAsking
+ writetext UnknownText_0x69555
+.AskTakeEgg:
+ yesorno
+ iffalse .RefusedEgg
+ checkcode VAR_PARTYCOUNT
+ if_equal PARTY_LENGTH, .PartyFull
+ giveegg TOGEPI, 5
+ stringtotext .eggname, $1
+ scall .AideGivesEgg
+ setevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE
+ clearevent EVENT_ELMS_AIDE_IN_LAB
+ clearevent EVENT_TOGEPI_HATCHED
+ setmapscene ROUTE_32, $1
+ writetext UnknownText_0x695c5
+ waitbutton
+ closetext
+ checkcode VAR_FACING
+ if_equal UP, .AideWalksAroundPlayer
+ spriteface PLAYER, DOWN
+ applymovement VIOLETPOKECENTER1F_SCIENTIST, MovementData_AideWalksStraightOutOfPokecenter
+ playsound SFX_EXIT_BUILDING
+ disappear VIOLETPOKECENTER1F_SCIENTIST
+ waitsfx
+ end
+
+.AideWalksAroundPlayer:
+ applymovement VIOLETPOKECENTER1F_SCIENTIST, MovementData_AideWalksLeftToExitPokecenter
+ spriteface PLAYER, DOWN
+ applymovement VIOLETPOKECENTER1F_SCIENTIST, MovementData_AideFinishesLeavingPokecenter
+ playsound SFX_EXIT_BUILDING
+ disappear VIOLETPOKECENTER1F_SCIENTIST
+ waitsfx
+ end
+
+.eggname
+ db "EGG@"
+
+.AideGivesEgg:
+ jumpstd receivetogepiegg
+ end
+
+.PartyFull:
+ writetext UnknownText_0x69693
+ waitbutton
+ closetext
+ end
+
+.RefusedEgg:
+ writetext UnknownText_0x696f2
+ waitbutton
+ closetext
+ setevent EVENT_REFUSED_TO_TAKE_EGG_FROM_ELMS_AIDE
+ end
+
+.SecondTimeAsking:
+ writetext UnknownText_0x69712
+ jump .AskTakeEgg
+
+VioletPokecenter1FGameboyKidScript:
+ jumptextfaceplayer VioletPokecenter1FGameboyKidText
+
+VioletPokecenter1FGentlemanScript:
+ jumptextfaceplayer VioletPokecenter1FGentlemanText
+
+VioletPokecenter1FYoungsterScript:
+ jumptextfaceplayer VioletPokecenter1FYoungsterText
+
+MovementData_AideWalksStraightOutOfPokecenter:
+ step DOWN
+ step DOWN
+ step DOWN
+ step DOWN
+ step_end
+
+MovementData_AideWalksLeftToExitPokecenter:
+ step LEFT
+ step DOWN
+ step_end
+
+MovementData_AideFinishesLeavingPokecenter:
+ step DOWN
+ step DOWN
+ step DOWN
+ step_end
+
+UnknownText_0x69555:
+ text "<PLAY_G>, long"
+ line "time, no see."
+
+ para "PROF.ELM asked me"
+ line "to find you."
+
+ para "He has another"
+ line "favor to ask."
+
+ para "Would you take the"
+ line "#MON EGG?"
+ done
+
+UnknownText_0x695c5:
+ text "We discovered that"
+ line "a #MON will not"
+
+ para "hatch until it"
+ line "grows in the EGG."
+
+ para "It also has to be"
+ line "with other active"
+ cont "#MON to hatch."
+
+ para "<PLAY_G>, you're"
+ line "the only person"
+ cont "we can rely on."
+
+ para "Please call PROF."
+ line "ELM when that EGG"
+ cont "hatches!"
+ done
+
+UnknownText_0x69693:
+ text "Oh, no. You can't"
+ line "carry any more"
+ cont "#MON with you."
+
+ para "I'll wait here"
+ line "while you make"
+ cont "room for the EGG."
+ done
+
+UnknownText_0x696f2:
+ text "B-but… PROF.ELM"
+ line "asked for you…"
+ done
+
+UnknownText_0x69712:
+ text "<PLAY_G>, will you"
+ line "take the EGG?"
+ done
+
+UnknownText_0x6972d:
+ text "I've been thinking"
+ line "it'd be great to"
+
+ para "be able to link up"
+ line "and battle with my"
+
+ para "friends who live"
+ line "far away."
+ done
+
+UnknownText_0x69791:
+ text "I just battled a"
+ line "friend in CIANWOOD"
+ cont "over a link."
+
+ para "If you connect a"
+ line "MOBILE ADAPTER,"
+
+ para "you can link with"
+ line "a friend far away."
+ done
+
+VioletPokecenter1FGameboyKidText:
+ text "A guy named BILL"
+ line "made the #MON"
+ cont "PC storage system."
+ done
+
+VioletPokecenter1FGentlemanText:
+ text "It was around"
+ line "three years ago."
+
+ para "TEAM ROCKET was up"
+ line "to no good with"
+ cont "#MON."
+
+ para "But justice pre-"
+ line "vailed--a young"
+ cont "kid broke 'em up."
+ done
+
+VioletPokecenter1FYoungsterText:
+ text "#MON are smart."
+ line "They won't obey a"
+
+ para "trainer they don't"
+ line "respect."
+
+ para "Without the right"
+ line "GYM BADGES, they"
+
+ para "will just do as"
+ line "they please."
+ done
+
+VioletPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 5, VIOLET_CITY
+ warp_def $7, $4, 5, VIOLET_CITY
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 5
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletPokecenterNurse, -1
+ object_event SPRITE_GAMEBOY_KID, 6, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VioletPokecenter1FGameboyKidScript, -1
+ object_event SPRITE_GENTLEMAN, 4, 1, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletPokecenter1FGentlemanScript, -1
+ object_event SPRITE_YOUNGSTER, 1, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VioletPokecenter1FYoungsterScript, -1
+ object_event SPRITE_SCIENTIST, 3, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, VioletPokecenter1F_ElmsAideScript, EVENT_ELMS_AIDE_IN_VIOLET_POKEMON_CENTER
diff --git a/maps/ViridianCity.asm b/maps/ViridianCity.asm
index ced89061b..df827c91a 100644
--- a/maps/ViridianCity.asm
+++ b/maps/ViridianCity.asm
@@ -5,13 +5,11 @@ const_value set 2
const VIRIDIANCITY_YOUNGSTER
ViridianCity_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
.FlyPoint:
@@ -68,8 +66,8 @@ FisherScript_0x1a9a75:
closetext
end
-YoungsterScript_0x1a9a90:
- jumptextfaceplayer UnknownText_0x1a9daa
+ViridianCityYoungsterScript:
+ jumptextfaceplayer ViridianCityYoungsterText
ViridianCitySign:
jumptext ViridianCitySignText
@@ -83,7 +81,7 @@ ViridianCityWelcomeSign:
TrainerHouseSign:
jumptext TrainerHouseSignText
-ViridianCityPokeCenterSign:
+ViridianCityPokecenterSign:
jumpstd pokecentersign
ViridianCityMartSign:
@@ -178,7 +176,7 @@ UnknownText_0x1a9d86:
para "…Zzzzz…"
done
-UnknownText_0x1a9daa:
+ViridianCityYoungsterText:
text "I heard that there"
line "are many items on"
@@ -229,21 +227,21 @@ ViridianCity_MapEventHeader:
warp_def $13, $1d, 2, VIRIDIAN_MART
warp_def $19, $17, 1, VIRIDIAN_POKECENTER_1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 6
- signpost 17, 17, SIGNPOST_READ, ViridianCitySign
- signpost 7, 27, SIGNPOST_READ, ViridianGymSign
- signpost 1, 19, SIGNPOST_READ, ViridianCityWelcomeSign
- signpost 15, 21, SIGNPOST_READ, TrainerHouseSign
- signpost 25, 24, SIGNPOST_READ, ViridianCityPokeCenterSign
- signpost 19, 30, SIGNPOST_READ, ViridianCityMartSign
-
-.PersonEvents:
+ bg_event 17, 17, BGEVENT_READ, ViridianCitySign
+ bg_event 7, 27, BGEVENT_READ, ViridianGymSign
+ bg_event 1, 19, BGEVENT_READ, ViridianCityWelcomeSign
+ bg_event 15, 21, BGEVENT_READ, TrainerHouseSign
+ bg_event 25, 24, BGEVENT_READ, ViridianCityPokecenterSign
+ bg_event 19, 30, BGEVENT_READ, ViridianCityMartSign
+
+.ObjectEvents:
db 4
- person_event SPRITE_GRAMPS, 5, 18, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, GrampsScript_0x1a9a4c, -1
- person_event SPRITE_GRAMPS, 8, 30, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, GrampsScript_0x1a9a61, -1
- person_event SPRITE_FISHER, 23, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, FisherScript_0x1a9a75, -1
- person_event SPRITE_YOUNGSTER, 21, 17, SPRITEMOVEDATA_WANDER, 3, 3, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungsterScript_0x1a9a90, -1
+ object_event SPRITE_GRAMPS, 5, 18, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GrampsScript_0x1a9a4c, -1
+ object_event SPRITE_GRAMPS, 8, 30, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GrampsScript_0x1a9a61, -1
+ object_event SPRITE_FISHER, 23, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, FisherScript_0x1a9a75, -1
+ object_event SPRITE_YOUNGSTER, 21, 17, SPRITEMOVEDATA_WANDER, 3, 3, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ViridianCityYoungsterScript, -1
diff --git a/maps/ViridianGym.asm b/maps/ViridianGym.asm
index f67289df9..3be7a126e 100644
--- a/maps/ViridianGym.asm
+++ b/maps/ViridianGym.asm
@@ -3,7 +3,7 @@ const_value set 2
const VIRIDIANGYM_GYM_GUY
ViridianGym_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -178,15 +178,15 @@ ViridianGym_MapEventHeader:
warp_def $11, $4, 1, VIRIDIAN_CITY
warp_def $11, $5, 1, VIRIDIAN_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 2
- signpost 13, 3, SIGNPOST_READ, ViridianGymStatue
- signpost 13, 6, SIGNPOST_READ, ViridianGymStatue
+ bg_event 13, 3, BGEVENT_READ, ViridianGymStatue
+ bg_event 13, 6, BGEVENT_READ, ViridianGymStatue
-.PersonEvents:
+.ObjectEvents:
db 2
- person_event SPRITE_BLUE, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ViridianGymBlueScript, EVENT_VIRIDIAN_GYM_BLUE
- person_event SPRITE_GYM_GUY, 13, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ViridianGymGuyScript, EVENT_VIRIDIAN_GYM_BLUE
+ object_event SPRITE_BLUE, 3, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ViridianGymBlueScript, EVENT_VIRIDIAN_GYM_BLUE
+ object_event SPRITE_GYM_GUY, 13, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ViridianGymGuyScript, EVENT_VIRIDIAN_GYM_BLUE
diff --git a/maps/ViridianMart.asm b/maps/ViridianMart.asm
index 25764b0a5..c2235496a 100644
--- a/maps/ViridianMart.asm
+++ b/maps/ViridianMart.asm
@@ -4,7 +4,7 @@ const_value set 2
const VIRIDIANMART_COOLTRAINER_M
ViridianMart_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -16,19 +16,19 @@ ClerkScript_0x9b5e7:
closetext
end
-LassScript_0x9b5ee:
- jumptextfaceplayer UnknownText_0x9b5f4
+ViridianMartLassScript:
+ jumptextfaceplayer ViridianMartLassText
-CooltrainerMScript_0x9b5f1:
- jumptextfaceplayer UnknownText_0x9b61a
+ViridianMartCooltrainerMScript:
+ jumptextfaceplayer ViridianMartCooltrainerMText
-UnknownText_0x9b5f4:
+ViridianMartLassText:
text "The GYM LEADER"
line "here is totally"
cont "cool."
done
-UnknownText_0x9b61a:
+ViridianMartCooltrainerMText:
text "Have you been to"
line "CINNABAR?"
@@ -45,14 +45,14 @@ ViridianMart_MapEventHeader:
warp_def $7, $2, 4, VIRIDIAN_CITY
warp_def $7, $3, 4, VIRIDIAN_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ClerkScript_0x9b5e7, -1
- person_event SPRITE_LASS, 2, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LassScript_0x9b5ee, -1
- person_event SPRITE_COOLTRAINER_M, 6, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x9b5f1, -1
+ object_event SPRITE_CLERK, 3, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ClerkScript_0x9b5e7, -1
+ object_event SPRITE_LASS, 2, 7, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ViridianMartLassScript, -1
+ object_event SPRITE_COOLTRAINER_M, 6, 1, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ViridianMartCooltrainerMScript, -1
diff --git a/maps/ViridianNicknameSpeechHouse.asm b/maps/ViridianNicknameSpeechHouse.asm
index 8166fb3a1..f5df4ad2f 100644
--- a/maps/ViridianNicknameSpeechHouse.asm
+++ b/maps/ViridianNicknameSpeechHouse.asm
@@ -5,17 +5,17 @@ const_value set 2
const VIRIDIANNICKNAMESPEECHHOUSE_RATTEY
ViridianNicknameSpeechHouse_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 0
-PokefanMScript_0x9ae3a:
- jumptextfaceplayer UnknownText_0x9ae54
+ViridianNicknameSpeechHousePokefanMScript:
+ jumptextfaceplayer ViridianNicknameSpeechHousePokefanMText
-LassScript_0x9ae3d:
- jumptextfaceplayer UnknownText_0x9aecb
+ViridianNicknameSpeechHouseLassScript:
+ jumptextfaceplayer ViridianNicknameSpeechHouseLassText
Speary:
opentext
@@ -33,7 +33,7 @@ Rattey:
closetext
end
-UnknownText_0x9ae54:
+ViridianNicknameSpeechHousePokefanMText:
text "Do you put a lot"
line "of thought into"
@@ -47,7 +47,7 @@ UnknownText_0x9ae54:
line "with others."
done
-UnknownText_0x9aecb:
+ViridianNicknameSpeechHouseLassText:
text "They're SPEARY--"
line "a SPEAROW--and"
cont "RATTEY--a RATTATA."
@@ -70,15 +70,15 @@ ViridianNicknameSpeechHouse_MapEventHeader:
warp_def $7, $2, 2, VIRIDIAN_CITY
warp_def $7, $3, 2, VIRIDIAN_CITY
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 4
- person_event SPRITE_POKEFAN_M, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, PokefanMScript_0x9ae3a, -1
- person_event SPRITE_LASS, 4, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, LassScript_0x9ae3d, -1
- person_event SPRITE_MOLTRES, 2, 5, SPRITEMOVEDATA_POKEMON, 0, 2, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, Speary, -1
- person_event SPRITE_GROWLITHE, 3, 6, SPRITEMOVEDATA_POKEMON, 0, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, Rattey, -1
+ object_event SPRITE_POKEFAN_M, 4, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ViridianNicknameSpeechHousePokefanMScript, -1
+ object_event SPRITE_LASS, 4, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ViridianNicknameSpeechHouseLassScript, -1
+ object_event SPRITE_MOLTRES, 2, 5, SPRITEMOVEDATA_POKEMON, 0, 2, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, Speary, -1
+ object_event SPRITE_GROWLITHE, 3, 6, SPRITEMOVEDATA_POKEMON, 0, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Rattey, -1
diff --git a/maps/ViridianPokeCenter1F.asm b/maps/ViridianPokeCenter1F.asm
deleted file mode 100644
index a19338f05..000000000
--- a/maps/ViridianPokeCenter1F.asm
+++ /dev/null
@@ -1,95 +0,0 @@
-const_value set 2
- const VIRIDIANPOKECENTER1F_NURSE
- const VIRIDIANPOKECENTER1F_COOLTRAINER_M
- const VIRIDIANPOKECENTER1F_COOLTRAINER_F
- const VIRIDIANPOKECENTER1F_BUG_CATCHER
-
-ViridianPokeCenter1F_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-NurseScript_0x9b690:
- jumpstd pokecenternurse
-
-CooltrainerMScript_0x9b693:
- faceplayer
- opentext
- checkevent EVENT_BLUE_IN_CINNABAR
- iftrue .BlueReturned
- writetext UnknownText_0x9b6ad
- waitbutton
- closetext
- end
-
-.BlueReturned:
- writetext UnknownText_0x9b6f5
- waitbutton
- closetext
- end
-
-CooltrainerFScript_0x9b6a7:
- jumptextfaceplayer UnknownText_0x9b76b
-
-BugCatcherScript_0x9b6aa:
- jumptextfaceplayer UnknownText_0x9b7c8
-
-UnknownText_0x9b6ad:
- text "Where in the world"
- line "is VIRIDIAN's GYM"
-
- para "LEADER? I wanted"
- line "to challenge him."
- done
-
-UnknownText_0x9b6f5:
- text "There are no GYM"
- line "TRAINERS at the"
- cont "VIRIDIAN GYM."
-
- para "The LEADER claims"
- line "his policy is to"
-
- para "win without having"
- line "any underlings."
- done
-
-UnknownText_0x9b76b:
- text "I heard that the"
- line "GYM in CINNABAR is"
- cont "gone."
-
- para "I wonder what be-"
- line "came of BLAINE,"
- cont "the GYM LEADER."
- done
-
-UnknownText_0x9b7c8:
- text "My dream is to be-"
- line "come a GYM LEADER."
- done
-
-ViridianPokeCenter1F_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 3
- warp_def $7, $3, 5, VIRIDIAN_CITY
- warp_def $7, $4, 5, VIRIDIAN_CITY
- warp_def $7, $0, 1, POKECENTER_2F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 4
- person_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, NurseScript_0x9b690, -1
- person_event SPRITE_COOLTRAINER_M, 4, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, CooltrainerMScript_0x9b693, -1
- person_event SPRITE_COOLTRAINER_F, 3, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, CooltrainerFScript_0x9b6a7, -1
- person_event SPRITE_BUG_CATCHER, 6, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, BugCatcherScript_0x9b6aa, -1
diff --git a/maps/ViridianPokeCenter2FBeta.asm b/maps/ViridianPokeCenter2FBeta.asm
deleted file mode 100644
index c545a50bc..000000000
--- a/maps/ViridianPokeCenter2FBeta.asm
+++ /dev/null
@@ -1,23 +0,0 @@
-ViridianPokeCenter2FBeta_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 0
-
-ViridianPokeCenter2FBeta_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 1
- warp_def $7, $0, 3, VIRIDIAN_POKECENTER_1F
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 0
-
-.PersonEvents:
- db 0
diff --git a/maps/ViridianPokecenter1F.asm b/maps/ViridianPokecenter1F.asm
new file mode 100644
index 000000000..213e64962
--- /dev/null
+++ b/maps/ViridianPokecenter1F.asm
@@ -0,0 +1,95 @@
+const_value set 2
+ const VIRIDIANPOKECENTER1F_NURSE
+ const VIRIDIANPOKECENTER1F_COOLTRAINER_M
+ const VIRIDIANPOKECENTER1F_COOLTRAINER_F
+ const VIRIDIANPOKECENTER1F_BUG_CATCHER
+
+ViridianPokecenter1F_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+NurseScript_0x9b690:
+ jumpstd pokecenternurse
+
+CooltrainerMScript_0x9b693:
+ faceplayer
+ opentext
+ checkevent EVENT_BLUE_IN_CINNABAR
+ iftrue .BlueReturned
+ writetext UnknownText_0x9b6ad
+ waitbutton
+ closetext
+ end
+
+.BlueReturned:
+ writetext UnknownText_0x9b6f5
+ waitbutton
+ closetext
+ end
+
+ViridianPokecenter1FCooltrainerFScript:
+ jumptextfaceplayer ViridianPokecenter1FCooltrainerFText
+
+ViridianPokecenter1FBugCatcherScript:
+ jumptextfaceplayer ViridianPokecenter1FBugCatcherText
+
+UnknownText_0x9b6ad:
+ text "Where in the world"
+ line "is VIRIDIAN's GYM"
+
+ para "LEADER? I wanted"
+ line "to challenge him."
+ done
+
+UnknownText_0x9b6f5:
+ text "There are no GYM"
+ line "TRAINERS at the"
+ cont "VIRIDIAN GYM."
+
+ para "The LEADER claims"
+ line "his policy is to"
+
+ para "win without having"
+ line "any underlings."
+ done
+
+ViridianPokecenter1FCooltrainerFText:
+ text "I heard that the"
+ line "GYM in CINNABAR is"
+ cont "gone."
+
+ para "I wonder what be-"
+ line "came of BLAINE,"
+ cont "the GYM LEADER."
+ done
+
+ViridianPokecenter1FBugCatcherText:
+ text "My dream is to be-"
+ line "come a GYM LEADER."
+ done
+
+ViridianPokecenter1F_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 3
+ warp_def $7, $3, 5, VIRIDIAN_CITY
+ warp_def $7, $4, 5, VIRIDIAN_CITY
+ warp_def $7, $0, 1, POKECENTER_2F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 4
+ object_event SPRITE_NURSE, 1, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NurseScript_0x9b690, -1
+ object_event SPRITE_COOLTRAINER_M, 4, 8, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CooltrainerMScript_0x9b693, -1
+ object_event SPRITE_COOLTRAINER_F, 3, 5, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ViridianPokecenter1FCooltrainerFScript, -1
+ object_event SPRITE_BUG_CATCHER, 6, 1, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ViridianPokecenter1FBugCatcherScript, -1
diff --git a/maps/ViridianPokecenter2FBeta.asm b/maps/ViridianPokecenter2FBeta.asm
new file mode 100644
index 000000000..037160cb3
--- /dev/null
+++ b/maps/ViridianPokecenter2FBeta.asm
@@ -0,0 +1,23 @@
+ViridianPokecenter2FBeta_MapScriptHeader:
+.SceneScripts:
+ db 0
+
+.MapCallbacks:
+ db 0
+
+ViridianPokecenter2FBeta_MapEventHeader:
+ ; filler
+ db 0, 0
+
+.Warps:
+ db 1
+ warp_def $7, $0, 3, VIRIDIAN_POKECENTER_1F
+
+.CoordEvents:
+ db 0
+
+.BGEvents:
+ db 0
+
+.ObjectEvents:
+ db 0
diff --git a/maps/WarehouseEntrance.asm b/maps/WarehouseEntrance.asm
deleted file mode 100644
index 402e41294..000000000
--- a/maps/WarehouseEntrance.asm
+++ /dev/null
@@ -1,691 +0,0 @@
-const_value set 2
- const WAREHOUSEENTRANCE_SUPER_NERD1
- const WAREHOUSEENTRANCE_SUPER_NERD2
- const WAREHOUSEENTRANCE_SUPER_NERD3
- const WAREHOUSEENTRANCE_SUPER_NERD4
- const WAREHOUSEENTRANCE_POKE_BALL
- const WAREHOUSEENTRANCE_GRAMPS
- const WAREHOUSEENTRANCE_SUPER_NERD5
- const WAREHOUSEENTRANCE_SUPER_NERD6
- const WAREHOUSEENTRANCE_GRANNY
-
-WarehouseEntrance_MapScriptHeader:
-.MapTriggers:
- db 0
-
-.MapCallbacks:
- db 3
-
- ; callbacks
-
- dbw MAPCALLBACK_NEWMAP, .ResetSwitches
-
- dbw MAPCALLBACK_TILES, .CheckBasementKey
-
- dbw MAPCALLBACK_OBJECTS, .CheckDayOfWeek
-
-.ResetSwitches:
- clearevent EVENT_SWITCH_1
- clearevent EVENT_SWITCH_2
- clearevent EVENT_SWITCH_3
- clearevent EVENT_EMERGENCY_SWITCH
- clearevent EVENT_SWITCH_4
- clearevent EVENT_SWITCH_5
- clearevent EVENT_SWITCH_6
- clearevent EVENT_SWITCH_7
- clearevent EVENT_SWITCH_8
- clearevent EVENT_SWITCH_9
- clearevent EVENT_SWITCH_10
- clearevent EVENT_SWITCH_11
- clearevent EVENT_SWITCH_12
- clearevent EVENT_SWITCH_13
- clearevent EVENT_SWITCH_14
- writebyte $0
- copyvartobyte UndergroundSwitchPositions
- return
-
-.CheckBasementKey:
- checkevent EVENT_USED_BASEMENT_KEY
- iffalse .LockBasementDoor
- return
-
-.LockBasementDoor:
- changeblock $12, $6, $3d
- return
-
-.CheckDayOfWeek:
- checkcode VAR_WEEKDAY
- if_equal MONDAY, .Monday
- if_equal TUESDAY, .Tuesday
- if_equal WEDNESDAY, .Wednesday
- if_equal THURSDAY, .Thursday
- if_equal FRIDAY, .Friday
- if_equal SATURDAY, .Saturday
-
-.Sunday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- disappear WAREHOUSEENTRANCE_SUPER_NERD5
- appear WAREHOUSEENTRANCE_SUPER_NERD6
- appear WAREHOUSEENTRANCE_GRANNY
- return
-
-.Monday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- checkmorn
- iffalse .NotMondayMorning
- appear WAREHOUSEENTRANCE_GRAMPS
-.NotMondayMorning:
- disappear WAREHOUSEENTRANCE_SUPER_NERD5
- disappear WAREHOUSEENTRANCE_SUPER_NERD6
- disappear WAREHOUSEENTRANCE_GRANNY
- return
-
-.Tuesday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- appear WAREHOUSEENTRANCE_SUPER_NERD5
- disappear WAREHOUSEENTRANCE_SUPER_NERD6
- disappear WAREHOUSEENTRANCE_GRANNY
- return
-
-.Wednesday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- disappear WAREHOUSEENTRANCE_SUPER_NERD5
- appear WAREHOUSEENTRANCE_SUPER_NERD6
- disappear WAREHOUSEENTRANCE_GRANNY
- return
-
-.Thursday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- appear WAREHOUSEENTRANCE_SUPER_NERD5
- disappear WAREHOUSEENTRANCE_SUPER_NERD6
- disappear WAREHOUSEENTRANCE_GRANNY
- return
-
-.Friday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- disappear WAREHOUSEENTRANCE_SUPER_NERD5
- appear WAREHOUSEENTRANCE_SUPER_NERD6
- disappear WAREHOUSEENTRANCE_GRANNY
- return
-
-.Saturday:
- disappear WAREHOUSEENTRANCE_GRAMPS
- appear WAREHOUSEENTRANCE_SUPER_NERD5
- disappear WAREHOUSEENTRANCE_SUPER_NERD6
- appear WAREHOUSEENTRANCE_GRANNY
- return
-
-TrainerSupernerdEric:
- trainer EVENT_BEAT_SUPER_NERD_ERIC, SUPER_NERD, ERIC, SupernerdEricSeenText, SupernerdEricBeatenText, 0, SupernerdEricScript
-
-SupernerdEricScript:
- end_if_just_battled
- opentext
- writetext UnknownText_0x7c36c
- waitbutton
- closetext
- end
-
-TrainerSupernerdTeru:
- trainer EVENT_BEAT_SUPER_NERD_TERU, SUPER_NERD, TERU, SupernerdTeruSeenText, SupernerdTeruBeatenText, 0, SupernerdTeruScript
-
-SupernerdTeruScript:
- end_if_just_battled
- opentext
- writetext UnknownText_0x7c410
- waitbutton
- closetext
- end
-
-TrainerPokemaniacIssac:
- trainer EVENT_BEAT_POKEMANIAC_ISSAC, POKEMANIAC, ISSAC, PokemaniacIssacSeenText, PokemaniacIssacBeatenText, 0, PokemaniacIssacScript
-
-PokemaniacIssacScript:
- end_if_just_battled
- opentext
- writetext UnknownText_0x7c498
- waitbutton
- closetext
- end
-
-TrainerPokemaniacDonald:
- trainer EVENT_BEAT_POKEMANIAC_DONALD, POKEMANIAC, DONALD, PokemaniacDonaldSeenText, PokemaniacDonaldBeatenText, 0, PokemaniacDonaldScript
-
-PokemaniacDonaldScript:
- end_if_just_battled
- opentext
- writetext UnknownText_0x7c52f
- waitbutton
- closetext
- end
-
-GrannyScript_0x7c132:
- opentext
- checkcode VAR_WEEKDAY
- if_equal SUNDAY, .Open
- if_equal SATURDAY, .Open
- jump WarehouseEntranceScript_ShopClosed
-
-.Open:
- pokemart MARTTYPE_BITTER, MART_UNDERGROUND
- closetext
- end
-
-GrampsScript_0x7c146:
- opentext
- checkflag ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED
- iftrue WarehouseEntranceScript_ShopClosed
- checkcode VAR_WEEKDAY
- if_equal MONDAY, .CheckMorn
- jump WarehouseEntranceScript_ShopClosed
-
-.CheckMorn:
- checkmorn
- iffalse WarehouseEntranceScript_ShopClosed
- pokemart MARTTYPE_BARGAIN, 0
- closetext
- end
-
-OlderHaircutBrotherScript:
- opentext
- checkcode VAR_WEEKDAY
- if_equal TUESDAY, .DoHaircut
- if_equal THURSDAY, .DoHaircut
- if_equal SATURDAY, .DoHaircut
- jump WarehouseEntranceScript_ShopClosed
-
-.DoHaircut:
- checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
- iftrue .AlreadyGotHaircut
- special PlaceMoneyTopRight
- writetext UnknownText_0x7c5f9
- yesorno
- iffalse .Refused
- checkmoney $0, 500
- if_equal $2, .NotEnoughMoney
- writetext UnknownText_0x7c69a
- buttonsound
- special Special_YoungerHaircutBrother
- if_equal $0, .Refused
- if_equal $1, .Refused
- setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
- if_equal $2, .two
- if_equal $3, .three
- jump .else
-
-.two
- setevent EVENT_GAVE_KURT_APRICORNS
- clearevent EVENT_RECEIVED_BALLS_FROM_KURT
- clearevent EVENT_DRAGON_SHRINE_QUESTION_2
- jump .then
-
-.three
- clearevent EVENT_GAVE_KURT_APRICORNS
- setevent EVENT_RECEIVED_BALLS_FROM_KURT
- clearevent EVENT_DRAGON_SHRINE_QUESTION_2
- jump .then
-
-.else
- clearevent EVENT_GAVE_KURT_APRICORNS
- clearevent EVENT_RECEIVED_BALLS_FROM_KURT
- setevent EVENT_DRAGON_SHRINE_QUESTION_2
- jump .then
-
-.then
- takemoney $0, 500
- special PlaceMoneyTopRight
- writetext UnknownText_0x7c6b8
- waitbutton
- closetext
- special FadeOutPalettes
- playmusic MUSIC_HEAL
- pause 60
- special FadeInPalettes
- special RestartMapMusic
- opentext
- writetext UnknownText_0x7c6d8
- waitbutton
- checkevent EVENT_GAVE_KURT_APRICORNS
- iftrue UnknownScript_0x7c2bb
- checkevent EVENT_RECEIVED_BALLS_FROM_KURT
- iftrue UnknownScript_0x7c2c4
- jump UnknownScript_0x7c2cd
-
-.Refused:
- writetext UnknownText_0x7c6ea
- waitbutton
- closetext
- end
-
-.NotEnoughMoney:
- writetext UnknownText_0x7c709
- waitbutton
- closetext
- end
-
-.AlreadyGotHaircut:
- writetext UnknownText_0x7c72b
- waitbutton
- closetext
- end
-
-YoungerHaircutBrotherScript:
- opentext
- checkcode VAR_WEEKDAY
- if_equal SUNDAY, .DoHaircut
- if_equal WEDNESDAY, .DoHaircut
- if_equal FRIDAY, .DoHaircut
- jump WarehouseEntranceScript_ShopClosed
-
-.DoHaircut:
- checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
- iftrue .AlreadyGotHaircut
- special PlaceMoneyTopRight
- writetext UnknownText_0x7c75c
- yesorno
- iffalse .Refused
- checkmoney $0, 300
- if_equal $2, .NotEnoughMoney
- writetext UnknownText_0x7c7f1
- buttonsound
- special Special_OlderHaircutBrother
- if_equal $0, .Refused
- if_equal $1, .Refused
- setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
- if_equal $2, .two
- if_equal $3, .three
- jump .else
-
-.two
- setevent EVENT_GAVE_KURT_APRICORNS
- clearevent EVENT_RECEIVED_BALLS_FROM_KURT
- clearevent EVENT_DRAGON_SHRINE_QUESTION_2
- jump .then
-
-.three
- clearevent EVENT_GAVE_KURT_APRICORNS
- setevent EVENT_RECEIVED_BALLS_FROM_KURT
- clearevent EVENT_DRAGON_SHRINE_QUESTION_2
- jump .then
-
-.else
- clearevent EVENT_GAVE_KURT_APRICORNS
- clearevent EVENT_RECEIVED_BALLS_FROM_KURT
- setevent EVENT_DRAGON_SHRINE_QUESTION_2
- jump .then
-
-.then
- takemoney $0, 300
- special PlaceMoneyTopRight
- writetext UnknownText_0x7c80e
- waitbutton
- closetext
- special FadeOutPalettes
- playmusic MUSIC_HEAL
- pause 60
- special FadeInPalettes
- special RestartMapMusic
- opentext
- writetext UnknownText_0x7c82a
- waitbutton
- checkevent EVENT_GAVE_KURT_APRICORNS
- iftrue UnknownScript_0x7c2bb
- checkevent EVENT_RECEIVED_BALLS_FROM_KURT
- iftrue UnknownScript_0x7c2c4
- jump UnknownScript_0x7c2cd
-
-.Refused:
- writetext UnknownText_0x7c842
- waitbutton
- closetext
- end
-
-.NotEnoughMoney:
- writetext UnknownText_0x7c85b
- waitbutton
- closetext
- end
-
-.AlreadyGotHaircut:
- writetext UnknownText_0x7c87b
- waitbutton
- closetext
- end
-
-UnknownScript_0x7c2bb:
- writetext HaircutBrosText_SlightlyHappier
- special PlayCurMonCry
- waitbutton
- closetext
- end
-
-UnknownScript_0x7c2c4:
- writetext HaircutBrosText_Happier
- special PlayCurMonCry
- waitbutton
- closetext
- end
-
-UnknownScript_0x7c2cd:
- writetext HaircutBrosText_MuchHappier
- special PlayCurMonCry
- waitbutton
- closetext
- end
-
-BasementDoorScript::
- opentext
- checkevent EVENT_USED_BASEMENT_KEY
- iftrue .Open
- checkitem BASEMENT_KEY
- iftrue .Unlock
- writetext UnknownText_0x7c5b0
- waitbutton
- closetext
- end
-
-.Unlock:
- playsound SFX_TRANSACTION
- writetext UnknownText_0x7c5d6
- waitbutton
- closetext
- changeblock $12, $6, $2e
- reloadmappart
- closetext
- setevent EVENT_USED_BASEMENT_KEY
- end
-
-.Open:
- writetext UnknownText_0x7c5c3
- waitbutton
- closetext
- end
-
-WarehouseEntranceScript_ShopClosed:
- writetext UnknownText_0x7c904
- waitbutton
- closetext
- end
-
-WarehouseEntranceCoinCase:
- itemball COIN_CASE
-
-MapWarehouseEntranceSignpost1Script:
- jumptext UnknownText_0x7c91a
-
-WarehouseEntranceHiddenParlyzHeal:
- dwb EVENT_WAREHOUSE_ENTRANCE_HIDDEN_PARLYZ_HEAL, PARLYZ_HEAL
-
-
-WarehouseEntranceHiddenSuperPotion:
- dwb EVENT_WAREHOUSE_ENTRANCE_HIDDEN_SUPER_POTION, SUPER_POTION
-
-
-WarehouseEntranceHiddenAntidote:
- dwb EVENT_WAREHOUSE_ENTRANCE_HIDDEN_ANTIDOTE, ANTIDOTE
-
-
-SupernerdEricSeenText:
- text "I got booted out"
- line "of the GAME COR-"
- cont "NER."
-
- para "I was trying to"
- line "cheat using my"
- cont "#MON…"
- done
-
-SupernerdEricBeatenText:
- text "…Grumble…"
- done
-
-UnknownText_0x7c36c:
- text "I guess I have to"
- line "do things fair and"
- cont "square…"
- done
-
-SupernerdTeruSeenText:
- text "Do you consider"
- line "type alignments in"
- cont "battle?"
-
- para "If you know your"
- line "type advantages,"
-
- para "you'll do better"
- line "in battle."
- done
-
-SupernerdTeruBeatenText:
- text "Ow, ow, ow!"
- done
-
-UnknownText_0x7c410:
- text "I know my #MON"
- line "type alignments."
-
- para "But I only use one"
- line "type of #MON."
- done
-
-PokemaniacIssacSeenText:
- text "My #MON just"
- line "got a haircut!"
-
- para "I'll show you how"
- line "strong it is!"
- done
-
-PokemaniacIssacBeatenText:
- text "Aiyeeee!"
- done
-
-UnknownText_0x7c498:
- text "Your #MON will"
- line "like you more if"
-
- para "you give them"
- line "haircuts."
- done
-
-PokemaniacDonaldSeenText:
- text "I think you have"
- line "some rare #MON"
- cont "with you."
-
- para "Let me see them!"
- done
-
-PokemaniacDonaldBeatenText:
- text "Gaah! I lost!"
- line "That makes me mad!"
- done
-
-UnknownText_0x7c52f:
- text "Are you making a"
- line "#DEX? Here's a"
- cont "hot tip."
-
- para "The HIKER on ROUTE"
- line "33, ANTHONY, is a"
- cont "good guy."
-
- para "He'll phone you if"
- line "he sees any rare"
- cont "#MON."
- done
-
-UnknownText_0x7c5b0:
- text "The door's locked…"
- done
-
-UnknownText_0x7c5c3:
- text "The door is open."
- done
-
-UnknownText_0x7c5d6:
- text "The BASEMENT KEY"
- line "opened the door."
- done
-
-UnknownText_0x7c5f9:
- text "Welcome!"
-
- para "I run the #MON"
- line "SALON!"
-
- para "I'm the older and"
- line "better of the two"
- cont "HAIRCUT BROTHERS."
-
- para "I can make your"
- line "#MON beautiful"
- cont "for just ¥500."
-
- para "Would you like me"
- line "to do that?"
- done
-
-UnknownText_0x7c69a:
- text "Which #MON"
- line "should I work on?"
- done
-
-UnknownText_0x7c6b8:
- text "OK! Watch it"
- line "become beautiful!"
- done
-
-UnknownText_0x7c6d8:
- text "There! All done!"
- done
-
-UnknownText_0x7c6ea:
- text "Is that right?"
- line "That's a shame!"
- done
-
-UnknownText_0x7c709:
- text "You'll need more"
- line "money than that."
- done
-
-UnknownText_0x7c72b:
- text "I do only one"
- line "haircut a day. I'm"
- cont "done for today."
- done
-
-UnknownText_0x7c75c:
- text "Welcome to the"
- line "#MON SALON!"
-
- para "I'm the younger"
- line "and less expen-"
- cont "sive of the two"
- cont "HAIRCUT BROTHERS."
-
- para "I'll spiff up your"
- line "#MON for just"
- cont "¥300."
-
- para "So? How about it?"
- done
-
-UnknownText_0x7c7f1:
- text "OK, which #MON"
- line "should I do?"
- done
-
-UnknownText_0x7c80e:
- text "OK! I'll make it"
- line "look cool!"
- done
-
-UnknownText_0x7c82a:
- text "There we go!"
- line "All done!"
- done
-
-UnknownText_0x7c842:
- text "No? "
- line "How disappointing!"
- done
-
-UnknownText_0x7c85b:
- text "You're a little"
- line "short on funds."
- done
-
-UnknownText_0x7c87b:
- text "I can do only one"
- line "haircut a day."
-
- para "Sorry, but I'm all"
- line "done for today."
- done
-
-HaircutBrosText_SlightlyHappier:
- text_from_ram StringBuffer3
- text " looks a"
- line "little happier."
- done
-
-HaircutBrosText_Happier:
- text_from_ram StringBuffer3
- text " looks"
- line "happy."
- done
-
-HaircutBrosText_MuchHappier:
- text_from_ram StringBuffer3
- text " looks"
- line "delighted!"
- done
-
-UnknownText_0x7c904:
- text "We're not open"
- line "today."
- done
-
-UnknownText_0x7c91a:
- text "NO ENTRY BEYOND"
- line "THIS POINT"
- done
-
-WarehouseEntrance_MapEventHeader:
- ; filler
- db 0, 0
-
-.Warps:
- db 6
- warp_def $2, $3, 7, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
- warp_def $22, $3, 4, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
- warp_def $6, $12, 4, WAREHOUSE_ENTRANCE
- warp_def $1f, $15, 3, WAREHOUSE_ENTRANCE
- warp_def $1f, $16, 3, WAREHOUSE_ENTRANCE
- warp_def $1b, $16, 1, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
-
-.XYTriggers:
- db 0
-
-.Signposts:
- db 5
- signpost 6, 18, SIGNPOST_READ, BasementDoorScript
- signpost 6, 19, SIGNPOST_READ, MapWarehouseEntranceSignpost1Script
- signpost 13, 6, SIGNPOST_ITEM, WarehouseEntranceHiddenParlyzHeal
- signpost 18, 4, SIGNPOST_ITEM, WarehouseEntranceHiddenSuperPotion
- signpost 8, 17, SIGNPOST_ITEM, WarehouseEntranceHiddenAntidote
-
-.PersonEvents:
- db 9
- person_event SPRITE_SUPER_NERD, 31, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 3, TrainerSupernerdEric, -1
- person_event SPRITE_SUPER_NERD, 9, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_TRAINER, 2, TrainerSupernerdTeru, -1
- person_event SPRITE_SUPER_NERD, 27, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, TrainerPokemaniacIssac, -1
- person_event SPRITE_SUPER_NERD, 6, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 3, TrainerPokemaniacDonald, -1
- person_event SPRITE_POKE_BALL, 25, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, WarehouseEntranceCoinCase, EVENT_WAREHOUSE_ENTRANCE_COIN_CASE
- person_event SPRITE_GRAMPS, 11, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, GrampsScript_0x7c146, EVENT_WAREHOUSE_ENTRANCE_GRAMPS
- person_event SPRITE_SUPER_NERD, 14, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, OlderHaircutBrotherScript, EVENT_WAREHOUSE_ENTRANCE_OLDER_HAIRCUT_BROTHER
- person_event SPRITE_SUPER_NERD, 15, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, YoungerHaircutBrotherScript, EVENT_WAREHOUSE_ENTRANCE_YOUNGER_HAIRCUT_BROTHER
- person_event SPRITE_GRANNY, 21, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, GrannyScript_0x7c132, EVENT_WAREHOUSE_ENTRANCE_GRANNY
diff --git a/maps/WhirlIslandB1F.asm b/maps/WhirlIslandB1F.asm
index bc6e06e6d..be315317c 100644
--- a/maps/WhirlIslandB1F.asm
+++ b/maps/WhirlIslandB1F.asm
@@ -7,7 +7,7 @@ const_value set 2
const WHIRLISLANDB1F_BOULDER
WhirlIslandB1F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -59,20 +59,20 @@ WhirlIslandB1F_MapEventHeader:
warp_def $1b, $d, 2, WHIRL_ISLAND_B2F
warp_def $15, $11, 1, WHIRL_ISLAND_CAVE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 3
- signpost 4, 30, SIGNPOST_ITEM, WhirlIslandB1FHiddenRareCandy
- signpost 18, 36, SIGNPOST_ITEM, WhirlIslandB1FHiddenUltraBall
- signpost 23, 2, SIGNPOST_ITEM, WhirlIslandB1FHiddenFullRestore
+ bg_event 4, 30, BGEVENT_ITEM, WhirlIslandB1FHiddenRareCandy
+ bg_event 18, 36, BGEVENT_ITEM, WhirlIslandB1FHiddenUltraBall
+ bg_event 23, 2, BGEVENT_ITEM, WhirlIslandB1FHiddenFullRestore
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_POKE_BALL, 13, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, WhirlIslandB1FFullRestore, EVENT_WHIRL_ISLAND_B1F_FULL_RESTORE
- person_event SPRITE_POKE_BALL, 18, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, WhirlIslandB1FCarbos, EVENT_WHIRL_ISLAND_B1F_CARBOS
- person_event SPRITE_POKE_BALL, 23, 33, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, WhirlIslandB1FCalcium, EVENT_WHIRL_ISLAND_B1F_CALCIUM
- person_event SPRITE_POKE_BALL, 8, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, WhirlIslandB1FNugget, EVENT_WHIRL_ISLAND_B1F_NUGGET
- person_event SPRITE_POKE_BALL, 26, 19, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, WhirlIslandB1FEscapeRope, EVENT_WHIRL_ISLAND_B1F_ESCAPE_ROPE
- person_event SPRITE_BOULDER, 26, 23, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, WhirlIslandB1FBoulder, -1
+ object_event SPRITE_POKE_BALL, 13, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB1FFullRestore, EVENT_WHIRL_ISLAND_B1F_FULL_RESTORE
+ object_event SPRITE_POKE_BALL, 18, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB1FCarbos, EVENT_WHIRL_ISLAND_B1F_CARBOS
+ object_event SPRITE_POKE_BALL, 23, 33, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB1FCalcium, EVENT_WHIRL_ISLAND_B1F_CALCIUM
+ object_event SPRITE_POKE_BALL, 8, 17, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB1FNugget, EVENT_WHIRL_ISLAND_B1F_NUGGET
+ object_event SPRITE_POKE_BALL, 26, 19, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB1FEscapeRope, EVENT_WHIRL_ISLAND_B1F_ESCAPE_ROPE
+ object_event SPRITE_BOULDER, 26, 23, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, WhirlIslandB1FBoulder, -1
diff --git a/maps/WhirlIslandB2F.asm b/maps/WhirlIslandB2F.asm
index 0ff3a9e78..c8cda6d8f 100644
--- a/maps/WhirlIslandB2F.asm
+++ b/maps/WhirlIslandB2F.asm
@@ -4,7 +4,7 @@ const_value set 2
const WHIRLISLANDB2F_POKE_BALL3
WhirlIslandB2F_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -30,14 +30,14 @@ WhirlIslandB2F_MapEventHeader:
warp_def $19, $7, 1, WHIRL_ISLAND_LUGIA_CHAMBER
warp_def $1f, $d, 5, WHIRL_ISLAND_SW
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 3
- person_event SPRITE_POKE_BALL, 11, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, WhirlIslandB2FFullRestore, EVENT_WHIRL_ISLAND_B2F_FULL_RESTORE
- person_event SPRITE_POKE_BALL, 4, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, WhirlIslandB2FMaxRevive, EVENT_WHIRL_ISLAND_B2F_MAX_REVIVE
- person_event SPRITE_POKE_BALL, 12, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, WhirlIslandB2FMaxElixer, EVENT_WHIRL_ISLAND_B2F_MAX_ELIXER
+ object_event SPRITE_POKE_BALL, 11, 10, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB2FFullRestore, EVENT_WHIRL_ISLAND_B2F_FULL_RESTORE
+ object_event SPRITE_POKE_BALL, 4, 6, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB2FMaxRevive, EVENT_WHIRL_ISLAND_B2F_MAX_REVIVE
+ object_event SPRITE_POKE_BALL, 12, 5, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB2FMaxElixer, EVENT_WHIRL_ISLAND_B2F_MAX_ELIXER
diff --git a/maps/WhirlIslandCave.asm b/maps/WhirlIslandCave.asm
index 3b2b6f0e7..c46746119 100644
--- a/maps/WhirlIslandCave.asm
+++ b/maps/WhirlIslandCave.asm
@@ -1,5 +1,5 @@
WhirlIslandCave_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -14,11 +14,11 @@ WhirlIslandCave_MapEventHeader:
warp_def $5, $7, 9, WHIRL_ISLAND_B1F
warp_def $d, $3, 4, WHIRL_ISLAND_NW
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/WhirlIslandLugiaChamber.asm b/maps/WhirlIslandLugiaChamber.asm
index 79b9eb2aa..86402b6ab 100644
--- a/maps/WhirlIslandLugiaChamber.asm
+++ b/maps/WhirlIslandLugiaChamber.asm
@@ -2,14 +2,11 @@ const_value set 2
const WHIRLISLANDLUGIACHAMBER_LUGIA
WhirlIslandLugiaChamber_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_OBJECTS, .Lugia
.Lugia:
@@ -54,12 +51,12 @@ WhirlIslandLugiaChamber_MapEventHeader:
db 1
warp_def $d, $9, 3, WHIRL_ISLAND_B2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_LUGIA, 5, 9, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, Lugia, EVENT_WHIRL_ISLAND_LUGIA_CHAMBER_LUGIA
+ object_event SPRITE_LUGIA, 5, 9, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Lugia, EVENT_WHIRL_ISLAND_LUGIA_CHAMBER_LUGIA
diff --git a/maps/WhirlIslandNE.asm b/maps/WhirlIslandNE.asm
index 9da9eaeaf..fa3b019fd 100644
--- a/maps/WhirlIslandNE.asm
+++ b/maps/WhirlIslandNE.asm
@@ -2,7 +2,7 @@ const_value set 2
const WHIRLISLANDNE_POKE_BALL
WhirlIslandNE_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -21,12 +21,12 @@ WhirlIslandNE_MapEventHeader:
warp_def $3, $11, 2, WHIRL_ISLAND_B1F
warp_def $b, $d, 3, WHIRL_ISLAND_B1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKE_BALL, 11, 11, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, WhirlIslandNEUltraBall, EVENT_WHIRL_ISLAND_NE_ULTRA_BALL
+ object_event SPRITE_POKE_BALL, 11, 11, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandNEUltraBall, EVENT_WHIRL_ISLAND_NE_ULTRA_BALL
diff --git a/maps/WhirlIslandNW.asm b/maps/WhirlIslandNW.asm
index 60eafae8e..ce64f2154 100644
--- a/maps/WhirlIslandNW.asm
+++ b/maps/WhirlIslandNW.asm
@@ -1,5 +1,5 @@
WhirlIslandNW_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -16,11 +16,11 @@ WhirlIslandNW_MapEventHeader:
warp_def $f, $3, 4, WHIRL_ISLAND_SW
warp_def $f, $7, 2, WHIRL_ISLAND_CAVE
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/WhirlIslandSE.asm b/maps/WhirlIslandSE.asm
index 32cad9594..7e03568d1 100644
--- a/maps/WhirlIslandSE.asm
+++ b/maps/WhirlIslandSE.asm
@@ -1,5 +1,5 @@
WhirlIslandSE_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -14,11 +14,11 @@ WhirlIslandSE_MapEventHeader:
warp_def $d, $5, 4, ROUTE_41
warp_def $3, $5, 6, WHIRL_ISLAND_B1F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 0
diff --git a/maps/WhirlIslandSW.asm b/maps/WhirlIslandSW.asm
index 1902ecbfd..c66f05245 100644
--- a/maps/WhirlIslandSW.asm
+++ b/maps/WhirlIslandSW.asm
@@ -2,7 +2,7 @@ const_value set 2
const WHIRLISLANDSW_POKE_BALL
WhirlIslandSW_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 0
.MapCallbacks:
@@ -23,12 +23,12 @@ WhirlIslandSW_MapEventHeader:
warp_def $f, $3, 3, WHIRL_ISLAND_NW
warp_def $f, $11, 4, WHIRL_ISLAND_B2F
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_POKE_BALL, 2, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_ITEMBALL, 0, WhirlIslandSWUltraBall, EVENT_WHIRL_ISLAND_SW_ULTRA_BALL
+ object_event SPRITE_POKE_BALL, 2, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandSWUltraBall, EVENT_WHIRL_ISLAND_SW_ULTRA_BALL
diff --git a/maps/WillsRoom.asm b/maps/WillsRoom.asm
index bb8b8b974..55b132356 100644
--- a/maps/WillsRoom.asm
+++ b/maps/WillsRoom.asm
@@ -2,36 +2,31 @@ const_value set 2
const WILLSROOM_WILL
WillsRoom_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw .Trigger0, 0
- dw .Trigger1, 0
+ scene_script .LockDoor
+ scene_script .DummyScene
.MapCallbacks:
db 1
-
- ; callbacks
-
dbw MAPCALLBACK_TILES, .WillsRoomDoors
-.Trigger0:
+.LockDoor:
priorityjump .WillsDoorLocksBehindYou
end
-.Trigger1:
+.DummyScene:
end
.WillsRoomDoors:
checkevent EVENT_WILLS_ROOM_ENTRANCE_CLOSED
- iffalse .KeepDoorClosed
+ iffalse .KeepDoorsClosed
changeblock $4, $e, $2a
-.KeepDoorClosed:
+.KeepDoorsClosed:
checkevent EVENT_WILLS_ROOM_EXIT_OPEN
- iffalse .OpenDoor
+ iffalse .OpenDoors
changeblock $4, $2, $16
-.OpenDoor:
+.OpenDoors:
return
.WillsDoorLocksBehindYou:
@@ -42,7 +37,7 @@ WillsRoom_MapScriptHeader:
changeblock $4, $e, $2a
reloadmappart
closetext
- dotrigger $1
+ setscene $1
setevent EVENT_WILLS_ROOM_ENTRANCE_CLOSED
waitsfx
end
@@ -143,12 +138,12 @@ WillsRoom_MapEventHeader:
warp_def $2, $4, 1, KOGAS_ROOM
warp_def $2, $5, 2, KOGAS_ROOM
-.XYTriggers:
+.CoordEvents:
db 0
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 1
- person_event SPRITE_WILL, 7, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT, 0, WillScript_Battle, -1
+ object_event SPRITE_WILL, 7, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, WillScript_Battle, -1
diff --git a/maps/WiseTriosRoom.asm b/maps/WiseTriosRoom.asm
index 2aab72239..593638297 100644
--- a/maps/WiseTriosRoom.asm
+++ b/maps/WiseTriosRoom.asm
@@ -7,55 +7,50 @@ const_value set 2
const WISETRIOSROOM_SAGE6
WiseTriosRoom_MapScriptHeader:
-.MapTriggers:
+.SceneScripts:
db 2
-
- ; triggers
- dw UnknownScript_0x98572, 0
- dw UnknownScript_0x98573, 0
+ scene_script .DummyScene0
+ scene_script .DummyScene1
.MapCallbacks:
db 1
+ dbw MAPCALLBACK_OBJECTS, .WiseTrioCallback
- ; callbacks
-
- dbw MAPCALLBACK_OBJECTS, UnknownScript_0x98574
-
-UnknownScript_0x98572:
+.DummyScene0:
end
-UnknownScript_0x98573:
+.DummyScene1:
end
-UnknownScript_0x98574:
+.WiseTrioCallback:
checkevent EVENT_FOUGHT_SUICUNE
- iftrue UnknownScript_0x98593
+ iftrue .NoWiseTrio
checkevent EVENT_KOJI_ALLOWS_YOU_PASSAGE_TO_TIN_TOWER
- iftrue UnknownScript_0x9858c
+ iftrue .WiseTrio2
checkitem CLEAR_BELL
- iftrue UnknownScript_0x9858c
+ iftrue .WiseTrio2
clearevent EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1
setevent EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2
return
-UnknownScript_0x9858c:
+.WiseTrio2:
setevent EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1
clearevent EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2
return
-UnknownScript_0x98593:
+.NoWiseTrio:
setevent EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1
setevent EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2
return
-SageScript_0x9859a:
- jumptextfaceplayer UnknownText_0x9862b
+WiseTriosRoomSage1Script:
+ jumptextfaceplayer WiseTriosRoomSage1Text
-SageScript_0x9859d:
- jumptextfaceplayer UnknownText_0x9868b
+WiseTriosRoomSage2Script:
+ jumptextfaceplayer WiseTriosRoomSage2Text
-SageScript_0x985a0:
- jumptextfaceplayer UnknownText_0x987af
+WiseTriosRoomSage3Script:
+ jumptextfaceplayer WiseTriosRoomSage3Text
UnknownScript_0x985a3:
spriteface WISETRIOSROOM_SAGE3, UP
@@ -74,9 +69,9 @@ UnknownScript_0x985a3:
end
TrainerSageGaku:
- trainer EVENT_BEAT_SAGE_GAKU, SAGE, GAKU, SageGakuSeenText, SageGakuBeatenText, 0, SageGakuScript
+ trainer EVENT_BEAT_SAGE_GAKU, SAGE, GAKU, SageGakuSeenText, SageGakuBeatenText, 0, .Script
-SageGakuScript:
+.Script:
opentext
writetext UnknownText_0x98938
waitbutton
@@ -84,9 +79,9 @@ SageGakuScript:
end
TrainerSageMasa:
- trainer EVENT_BEAT_SAGE_MASA, SAGE, MASA, SageMasaSeenText, SageMasaBeatenText, 0, SageMasaScript
+ trainer EVENT_BEAT_SAGE_MASA, SAGE, MASA, SageMasaSeenText, SageMasaBeatenText, 0, .Script
-SageMasaScript:
+.Script:
opentext
writetext UnknownText_0x98a35
waitbutton
@@ -94,9 +89,9 @@ SageMasaScript:
end
TrainerSageKoji:
- trainer EVENT_BEAT_SAGE_KOJI, SAGE, KOJI, SageKojiSeenText, SageKojiBeatenText, 0, SageKojiScript
+ trainer EVENT_BEAT_SAGE_KOJI, SAGE, KOJI, SageKojiSeenText, SageKojiBeatenText, 0, .Script
-SageKojiScript:
+.Script:
checkevent EVENT_KOJI_ALLOWS_YOU_PASSAGE_TO_TIN_TOWER
iftrue UnknownScript_0x9861b
pause 10
@@ -110,7 +105,7 @@ SageKojiScript:
applymovement WISETRIOSROOM_SAGE6, MovementData_0x98628
spriteface WISETRIOSROOM_SAGE6, UP
setevent EVENT_KOJI_ALLOWS_YOU_PASSAGE_TO_TIN_TOWER
- dotrigger $1
+ setscene $1
end
UnknownScript_0x9861b:
@@ -135,7 +130,7 @@ MovementData_0x98628:
step DOWN
step_end
-UnknownText_0x9862b:
+WiseTriosRoomSage1Text:
text "Astounding…"
para "SUICUNE, ENTEI and"
@@ -146,7 +141,7 @@ UnknownText_0x9862b:
line "coming true?"
done
-UnknownText_0x9868b:
+WiseTriosRoomSage2Text:
text "We train at the"
line "BURNED TOWER, but"
@@ -177,7 +172,7 @@ UnknownText_0x98712:
line "entering!"
done
-UnknownText_0x987af:
+WiseTriosRoomSage3Text:
text "We, the WISE TRIO,"
line "are the protectors"
@@ -359,18 +354,18 @@ WiseTriosRoom_MapEventHeader:
warp_def $5, $7, 5, ECRUTEAK_CITY
warp_def $4, $1, 5, ECRUTEAK_HOUSE
-.XYTriggers:
+.CoordEvents:
db 1
- xy_trigger 0, $4, $7, $0, UnknownScript_0x985a3, $0, $0
+ coord_event 0, $4, $7, UnknownScript_0x985a3
-.Signposts:
+.BGEvents:
db 0
-.PersonEvents:
+.ObjectEvents:
db 6
- person_event SPRITE_SAGE, 2, 6, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SageScript_0x9859a, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1
- person_event SPRITE_SAGE, 7, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SageScript_0x9859d, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1
- person_event SPRITE_SAGE, 5, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SageScript_0x985a0, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1
- person_event SPRITE_SAGE, 2, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 2, TrainerSageGaku, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2
- person_event SPRITE_SAGE, 6, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 2, TrainerSageMasa, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2
- person_event SPRITE_SAGE, 4, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_TRAINER, 2, TrainerSageKoji, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2
+ object_event SPRITE_SAGE, 2, 6, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, WiseTriosRoomSage1Script, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1
+ object_event SPRITE_SAGE, 7, 6, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, WiseTriosRoomSage2Script, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1
+ object_event SPRITE_SAGE, 5, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, WiseTriosRoomSage3Script, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1
+ object_event SPRITE_SAGE, 2, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerSageGaku, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2
+ object_event SPRITE_SAGE, 6, 4, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerSageMasa, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2
+ object_event SPRITE_SAGE, 4, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerSageKoji, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2
diff --git a/maps/blockdata.asm b/maps/blockdata.asm
new file mode 100644
index 000000000..9e44798ad
--- /dev/null
+++ b/maps/blockdata.asm
@@ -0,0 +1,1047 @@
+SECTION "Map Blockdata 1", ROMX
+
+Route32_BlockData:
+ INCBIN "maps/Route32.blk"
+
+Route40_BlockData:
+ INCBIN "maps/Route40.blk"
+
+Route36_BlockData:
+ INCBIN "maps/Route36.blk"
+
+Route44_BlockData:
+ INCBIN "maps/Route44.blk"
+
+Route28_BlockData:
+ INCBIN "maps/Route28.blk"
+
+BetaHerosHouse_BlockData:
+ INCBIN "maps/BetaHerosHouse.blk"
+
+CeladonCity_BlockData:
+ INCBIN "maps/CeladonCity.blk"
+
+SaffronCity_BlockData:
+ INCBIN "maps/SaffronCity.blk"
+
+Route2_BlockData:
+ INCBIN "maps/Route2.blk"
+
+ElmsHouse_BlockData:
+ INCBIN "maps/ElmsHouse.blk"
+
+BetaSproutTower1_BlockData:
+ INCBIN "maps/BetaSproutTower1.blk"
+
+Route11_BlockData:
+ INCBIN "maps/Route11.blk"
+
+BetaSproutTower5_BlockData:
+ INCBIN "maps/BetaSproutTower5.blk"
+
+Route15_BlockData:
+ INCBIN "maps/Route15.blk"
+
+BetaSproutTower9_BlockData:
+ INCBIN "maps/BetaSproutTower9.blk"
+
+Route19_BlockData:
+ INCBIN "maps/Route19.blk"
+
+BetaBlackthornCity_BlockData:
+ INCBIN "maps/BetaBlackthornCity.blk"
+
+Route10South_BlockData:
+ INCBIN "maps/Route10South.blk"
+
+Pokecenter2F_BlockData:
+CinnabarPokecenter2FBeta_BlockData:
+CeruleanPokecenter2FBeta_BlockData:
+Route10Pokecenter2FBeta_BlockData:
+VermilionPokecenter2FBeta_BlockData:
+PewterPokecenter2FBeta_BlockData:
+FuchsiaPokecenter2FBeta_BlockData:
+LavenderPokecenter2FBeta_BlockData:
+CeladonPokecenter2FBeta_BlockData:
+ViridianPokecenter2FBeta_BlockData:
+SaffronPokecenter2FBeta_BlockData:
+ INCBIN "maps/Pokecenter2F.blk"
+
+Route41_BlockData:
+ INCBIN "maps/Route41.blk"
+
+Route33_BlockData:
+ INCBIN "maps/Route33.blk"
+
+Route45_BlockData:
+ INCBIN "maps/Route45.blk"
+
+Route29_BlockData:
+ INCBIN "maps/Route29.blk"
+
+Route37_BlockData:
+ INCBIN "maps/Route37.blk"
+
+LavenderTown_BlockData:
+ INCBIN "maps/LavenderTown.blk"
+
+PalletTown_BlockData:
+ INCBIN "maps/PalletTown.blk"
+
+Route25_BlockData:
+ INCBIN "maps/Route25.blk"
+
+Route24_BlockData:
+ INCBIN "maps/Route24.blk"
+
+BetaVioletCity_BlockData:
+ INCBIN "maps/BetaVioletCity.blk"
+
+Route3_BlockData:
+ INCBIN "maps/Route3.blk"
+
+PewterCity_BlockData:
+ INCBIN "maps/PewterCity.blk"
+
+BetaIlexForest_BlockData:
+ INCBIN "maps/BetaIlexForest.blk"
+
+BetaSproutTower2_BlockData:
+ INCBIN "maps/BetaSproutTower2.blk"
+
+Route12_BlockData:
+ INCBIN "maps/Route12.blk"
+
+BetaGoldenrodCity_BlockData:
+ INCBIN "maps/BetaGoldenrodCity.blk"
+
+Route20_BlockData:
+ INCBIN "maps/Route20.blk"
+
+BetaSproutTower6_BlockData:
+ INCBIN "maps/BetaSproutTower6.blk"
+
+BetaPokecenterMainHouse_BlockData:
+ INCBIN "maps/BetaPokecenterMainHouse.blk"
+
+Route30_BlockData:
+ INCBIN "maps/Route30.blk"
+
+Route26_BlockData:
+ INCBIN "maps/Route26.blk"
+
+Route42_BlockData:
+ INCBIN "maps/Route42.blk"
+
+Route34_BlockData:
+ INCBIN "maps/Route34.blk"
+
+Route46_BlockData:
+ INCBIN "maps/Route46.blk"
+
+FuchsiaCity_BlockData:
+ INCBIN "maps/FuchsiaCity.blk"
+
+Route38_BlockData:
+ INCBIN "maps/Route38.blk"
+
+BetaCianwoodCity_BlockData:
+ INCBIN "maps/BetaCianwoodCity.blk"
+
+OlivineTimsHouse_BlockData:
+OlivineHouseBeta_BlockData:
+OlivinePunishmentSpeechHouse_BlockData:
+OlivineGoodRodHouse_BlockData:
+Route39Farmhouse_BlockData:
+MahoganyRedGyaradosSpeechHouse_BlockData:
+BlackthornDragonSpeechHouse_BlockData:
+BlackthornEmysHouse_BlockData:
+MoveDeletersHouse_BlockData:
+CeruleanGymBadgeSpeechHouse_BlockData:
+CeruleanPoliceStation_BlockData:
+CeruleanTradeSpeechHouse_BlockData:
+BillsHouse_BlockData:
+CharcoalKiln_BlockData:
+LakeOfRageHiddenPowerHouse_BlockData:
+LakeOfRageMagikarpHouse_BlockData:
+GoldenrodHappinessRater_BlockData:
+GoldenrodBillsHouse_BlockData:
+GoldenrodPPSpeechHouse_BlockData:
+GoldenrodNameRater_BlockData:
+VermilionHouseFishingSpeechHouse_BlockData:
+VermilionMagnetTrainSpeechHouse_BlockData:
+VermilionHouseDiglettsCaveSpeechHouse_BlockData:
+BluesHouse_BlockData:
+PewterNidoranSpeechHouse_BlockData:
+PewterSnoozeSpeechHouse_BlockData:
+FuchsiaBillSpeechHouse_BlockData:
+LavenderTownSpeechHouse_BlockData:
+LavenderNameRater_BlockData:
+Route12SuperRodHouse_BlockData:
+Route28FamousSpeechHouse_BlockData:
+CeladonMansionRoofHouse_BlockData:
+Route16FuchsiaSpeechHouse_BlockData:
+ManiasHouse_BlockData:
+CianwoodPharmacy_BlockData:
+CianwoodCityPhotoStudio_BlockData:
+CianwoodLugiaSpeechHouse_BlockData:
+PokeSeersHouse_BlockData:
+ViridianNicknameSpeechHouse_BlockData:
+Route2NuggetSpeechHouse_BlockData:
+KrissNeighborsHouse_BlockData:
+Route26HealSpeechHouse_BlockData:
+Route26DayofWeekSiblingsHouse_BlockData:
+Route27SandstormHouse_BlockData:
+MrPsychicsHouse_BlockData:
+Route5CleanseTagSpeechHouse_BlockData:
+CherrygroveGymSpeechHouse_BlockData:
+GuideGentsHouse_BlockData:
+CherrygroveEvolutionSpeechHouse_BlockData:
+Route30BerrySpeechHouse_BlockData:
+ INCBIN "maps/House1.blk"
+
+SafariZoneFuchsiaGateBeta_BlockData:
+Route19FuchsiaGate_BlockData:
+Route43MahoganyGate_BlockData:
+Route43Gate_BlockData:
+Route35GoldenrodGate_BlockData:
+Route36RuinsOfAlphGate_BlockData:
+Route34IlexForestGate_BlockData:
+Route6SaffronGate_BlockData:
+Route40BattleTowerGate_BlockData:
+Route2Gate_BlockData:
+Route2946Gate_BlockData:
+Route5SaffronCityGate_BlockData:
+ INCBIN "maps/NorthSouthGate.blk"
+
+BetaTeakCity_BlockData:
+ INCBIN "maps/BetaTeakCity.blk"
+
+BetaCherrygroveCity_BlockData:
+ INCBIN "maps/BetaCherrygroveCity.blk"
+
+CinnabarIsland_BlockData:
+ INCBIN "maps/CinnabarIsland.blk"
+
+Route4_BlockData:
+ INCBIN "maps/Route4.blk"
+
+Route8_BlockData:
+ INCBIN "maps/Route8.blk"
+
+BetaSproutTower3_BlockData:
+ INCBIN "maps/BetaSproutTower3.blk"
+
+ViridianCity_BlockData:
+ INCBIN "maps/ViridianCity.blk"
+
+Route13_BlockData:
+ INCBIN "maps/Route13.blk"
+
+Route21_BlockData:
+ INCBIN "maps/Route21.blk"
+
+BetaSproutTower7_BlockData:
+ INCBIN "maps/BetaSproutTower7.blk"
+
+Route17_BlockData:
+ INCBIN "maps/Route17.blk"
+
+BetaMahoganyTown_BlockData:
+ INCBIN "maps/BetaMahoganyTown.blk"
+
+Route31_BlockData:
+ INCBIN "maps/Route31.blk"
+
+Route27_BlockData:
+ INCBIN "maps/Route27.blk"
+
+Route35_BlockData:
+ INCBIN "maps/Route35.blk"
+
+Route43_BlockData:
+ INCBIN "maps/Route43.blk"
+
+Route39_BlockData:
+ INCBIN "maps/Route39.blk"
+
+KrissHouse1F_BlockData:
+ INCBIN "maps/KrissHouse1F.blk"
+
+Route38EcruteakGate_BlockData:
+Route42EcruteakGate_BlockData:
+Route32RuinsOfAlphGate_BlockData:
+IlexForestAzaleaGate_BlockData:
+Route15FuchsiaGate_BlockData:
+Route8SaffronGate_BlockData:
+Route16Gate_BlockData:
+Route7SaffronGate_BlockData:
+Route1718Gate_BlockData:
+Route31VioletGate_BlockData:
+ INCBIN "maps/EastWestGate.blk"
+
+BetaAzaleaTown_BlockData:
+ INCBIN "maps/BetaAzaleaTown.blk"
+
+VermilionCity_BlockData:
+ INCBIN "maps/VermilionCity.blk"
+
+BetaOlivineCity_BlockData:
+ INCBIN "maps/BetaOlivineCity.blk"
+
+BetaNewBarkTown_BlockData:
+ INCBIN "maps/BetaNewBarkTown.blk"
+
+ElmsLab_BlockData:
+ INCBIN "maps/ElmsLab.blk"
+
+CeruleanCity_BlockData:
+ INCBIN "maps/CeruleanCity.blk"
+
+Route1_BlockData:
+ INCBIN "maps/Route1.blk"
+
+Route5_BlockData:
+ INCBIN "maps/Route5.blk"
+
+Route9_BlockData:
+ INCBIN "maps/Route9.blk"
+
+Route22_BlockData:
+ INCBIN "maps/Route22.blk"
+
+
+SECTION "Map Blockdata 2", ROMX
+
+Route14_BlockData:
+ INCBIN "maps/Route14.blk"
+
+BetaSproutTower8_BlockData:
+ INCBIN "maps/BetaSproutTower8.blk"
+
+OlivineMart_BlockData:
+EcruteakMart_BlockData:
+BlackthornMart_BlockData:
+CeruleanMart_BlockData:
+AzaleaMart_BlockData:
+VioletMart_BlockData:
+VermilionMart_BlockData:
+PewterMart_BlockData:
+FuchsiaMart_BlockData:
+LavenderMart_BlockData:
+ViridianMart_BlockData:
+SaffronMart_BlockData:
+CherrygroveMart_BlockData:
+ INCBIN "maps/Mart.blk"
+
+Route10North_BlockData:
+ INCBIN "maps/Route10North.blk"
+
+BetaLakeOfRage_BlockData:
+ INCBIN "maps/BetaLakeOfRage.blk"
+
+OlivinePokecenter1F_BlockData:
+MahoganyPokecenter1F_BlockData:
+EcruteakPokecenter1F_BlockData:
+BlackthornPokecenter1F_BlockData:
+CinnabarPokecenter1F_BlockData:
+CeruleanPokecenter1F_BlockData:
+Route10Pokecenter1F_BlockData:
+AzaleaPokecenter1F_BlockData:
+VioletPokecenter1F_BlockData:
+Route32Pokecenter1F_BlockData:
+GoldenrodPokecenter1F_BlockData:
+VermilionPokecenter1F_BlockData:
+PewterPokecenter1F_BlockData:
+FuchsiaPokecenter1F_BlockData:
+LavenderPokecenter1F_BlockData:
+SilverCavePokecenter1F_BlockData:
+CeladonPokecenter1F_BlockData:
+CianwoodPokecenter1F_BlockData:
+ViridianPokecenter1F_BlockData:
+SaffronPokecenter1F_BlockData:
+CherrygrovePokecenter1F_BlockData:
+ INCBIN "maps/Pokecenter1F.blk"
+
+BetaPewterMuseumOfScience1F_BlockData:
+ INCBIN "maps/BetaPewterMuseumOfScience1F.blk"
+
+BetaPewterMuseumOfScience2F_BlockData:
+ INCBIN "maps/BetaPewterMuseumOfScience2F.blk"
+
+EarlsPokemonAcademy_BlockData:
+ INCBIN "maps/EarlsPokemonAcademy.blk"
+
+BetaCinnabarIslandPokemonLabHallway_BlockData:
+ INCBIN "maps/BetaCinnabarIslandPokemonLabHallway.blk"
+
+BetaCinnabarIslandPokemonLabRoom1_BlockData:
+ INCBIN "maps/BetaCinnabarIslandPokemonLabRoom1.blk"
+
+BetaCinnabarIslandPokemonLabRoom2_BlockData:
+ INCBIN "maps/BetaCinnabarIslandPokemonLabRoom2.blk"
+
+BetaCinnabarIslandPokemonLabRoom3_BlockData:
+ INCBIN "maps/BetaCinnabarIslandPokemonLabRoom3.blk"
+
+GoldenrodDeptStore1F_BlockData:
+CeladonDeptStore1F_BlockData:
+ INCBIN "maps/DeptStore1F.blk"
+
+GoldenrodDeptStore2F_BlockData:
+CeladonDeptStore2F_BlockData:
+ INCBIN "maps/DeptStore2F.blk"
+
+GoldenrodDeptStore3F_BlockData:
+CeladonDeptStore3F_BlockData:
+ INCBIN "maps/DeptStore3F.blk"
+
+GoldenrodDeptStore4F_BlockData:
+CeladonDeptStore4F_BlockData:
+ INCBIN "maps/DeptStore4F.blk"
+
+GoldenrodDeptStore5F_BlockData:
+CeladonDeptStore5F_BlockData:
+ INCBIN "maps/DeptStore5F.blk"
+
+GoldenrodDeptStore6F_BlockData:
+CeladonDeptStore6F_BlockData:
+ INCBIN "maps/DeptStore6F.blk"
+
+GoldenrodDeptStoreElevator_BlockData:
+CeladonDeptStoreElevator_BlockData:
+ INCBIN "maps/DeptStoreElevator.blk"
+
+CeladonMansion1F_BlockData:
+ INCBIN "maps/CeladonMansion1F.blk"
+
+CeladonMansion2F_BlockData:
+ INCBIN "maps/CeladonMansion2F.blk"
+
+CeladonMansion3F_BlockData:
+ INCBIN "maps/CeladonMansion3F.blk"
+
+CeladonMansionRoof_BlockData:
+ INCBIN "maps/CeladonMansionRoof.blk"
+
+BetaHouse_BlockData:
+ INCBIN "maps/BetaHouse.blk"
+
+CeladonGameCorner_BlockData:
+ INCBIN "maps/CeladonGameCorner.blk"
+
+CeladonGameCornerPrizeRoom_BlockData:
+ INCBIN "maps/CeladonGameCornerPrizeRoom.blk"
+
+Colosseum_BlockData:
+ INCBIN "maps/Colosseum.blk"
+
+TradeCenter_BlockData:
+TimeCapsule_BlockData:
+ INCBIN "maps/TradeCenter.blk"
+
+EcruteakLugiaSpeechHouse_BlockData:
+EcruteakItemfinderHouse_BlockData:
+VioletNicknameSpeechHouse_BlockData:
+VioletKylesHouse_BlockData:
+ INCBIN "maps/House2.blk"
+
+BetaCave_BlockData:
+ INCBIN "maps/BetaCave.blk"
+
+UnionCaveB1F_BlockData:
+ INCBIN "maps/UnionCaveB1F.blk"
+
+UnionCaveB2F_BlockData:
+ INCBIN "maps/UnionCaveB2F.blk"
+
+UnionCave1F_BlockData:
+ INCBIN "maps/UnionCave1F.blk"
+
+NationalPark_BlockData:
+NationalParkBugContest_BlockData:
+ INCBIN "maps/NationalPark.blk"
+
+Route5UndergroundPathEntrance_BlockData:
+Route6UndergroundPathEntrance_BlockData:
+ INCBIN "maps/UndergroundPathEntrance.blk"
+
+BetaPokecenterTradeStation_BlockData:
+ INCBIN "maps/BetaPokecenterTradeStation.blk"
+
+KurtsHouse_BlockData:
+ INCBIN "maps/KurtsHouse.blk"
+
+GoldenrodMagnetTrainStation_BlockData:
+ INCBIN "maps/GoldenrodMagnetTrainStation.blk"
+
+RuinsOfAlphOutside_BlockData:
+ INCBIN "maps/RuinsOfAlphOutside.blk"
+
+BetaRuinsOfAlphUnsolvedPuzzleRoom_BlockData:
+ INCBIN "maps/BetaRuinsOfAlphUnsolvedPuzzleRoom.blk"
+
+RuinsOfAlphInnerChamber_BlockData:
+ INCBIN "maps/RuinsOfAlphInnerChamber.blk"
+
+RuinsOfAlphHoOhChamber_BlockData:
+RuinsOfAlphKabutoChamber_BlockData:
+RuinsOfAlphOmanyteChamber_BlockData:
+RuinsOfAlphAerodactylChamber_BlockData:
+ INCBIN "maps/RuinsOfAlphPuzzleChamber.blk"
+
+SproutTower1F_BlockData:
+ INCBIN "maps/SproutTower1F.blk"
+
+BetaSproutTowerCutOut1_BlockData:
+ INCBIN "maps/BetaSproutTowerCutOut1.blk"
+
+SproutTower2F_BlockData:
+ INCBIN "maps/SproutTower2F.blk"
+
+BetaSproutTowerCutOut2_BlockData:
+ INCBIN "maps/BetaSproutTowerCutOut2.blk"
+
+SproutTower3F_BlockData:
+ INCBIN "maps/SproutTower3F.blk"
+
+BetaSproutTowerCutOut3_BlockData:
+ INCBIN "maps/BetaSproutTowerCutOut3.blk"
+
+RadioTower1F_BlockData:
+ INCBIN "maps/RadioTower1F.blk"
+
+RadioTower2F_BlockData:
+ INCBIN "maps/RadioTower2F.blk"
+
+RadioTower3F_BlockData:
+ INCBIN "maps/RadioTower3F.blk"
+
+RadioTower4F_BlockData:
+ INCBIN "maps/RadioTower4F.blk"
+
+RadioTower5F_BlockData:
+ INCBIN "maps/RadioTower5F.blk"
+
+NewBarkTown_BlockData:
+ INCBIN "maps/NewBarkTown.blk"
+
+CherrygroveCity_BlockData:
+ INCBIN "maps/CherrygroveCity.blk"
+
+VioletCity_BlockData:
+ INCBIN "maps/VioletCity.blk"
+
+AzaleaTown_BlockData:
+ INCBIN "maps/AzaleaTown.blk"
+
+CianwoodCity_BlockData:
+ INCBIN "maps/CianwoodCity.blk"
+
+GoldenrodCity_BlockData:
+ INCBIN "maps/GoldenrodCity.blk"
+
+OlivineCity_BlockData:
+ INCBIN "maps/OlivineCity.blk"
+
+EcruteakCity_BlockData:
+ INCBIN "maps/EcruteakCity.blk"
+
+MahoganyTown_BlockData:
+ INCBIN "maps/MahoganyTown.blk"
+
+LakeOfRage_BlockData:
+ INCBIN "maps/LakeOfRage.blk"
+
+BlackthornCity_BlockData:
+ INCBIN "maps/BlackthornCity.blk"
+
+SilverCaveOutside_BlockData:
+ INCBIN "maps/SilverCaveOutside.blk"
+
+Route6_BlockData:
+ INCBIN "maps/Route6.blk"
+
+Route7_BlockData:
+ INCBIN "maps/Route7.blk"
+
+Route16_BlockData:
+ INCBIN "maps/Route16.blk"
+
+Route18_BlockData:
+ INCBIN "maps/Route18.blk"
+
+GoldenrodUnderground_BlockData:
+ INCBIN "maps/GoldenrodUnderground.blk"
+
+GoldenrodUndergroundSwitchRoomEntrances_BlockData:
+ INCBIN "maps/GoldenrodUndergroundSwitchRoomEntrances.blk"
+
+GoldenrodDeptStoreB1F_BlockData:
+ INCBIN "maps/GoldenrodDeptStoreB1F.blk"
+
+GoldenrodUndergroundWarehouse_BlockData:
+ INCBIN "maps/GoldenrodUndergroundWarehouse.blk"
+
+BetaElevator_BlockData:
+ INCBIN "maps/BetaElevator.blk"
+
+TinTower1F_BlockData:
+ INCBIN "maps/TinTower1F.blk"
+
+TinTower2F_BlockData:
+ INCBIN "maps/TinTower2F.blk"
+
+TinTower3F_BlockData:
+ INCBIN "maps/TinTower3F.blk"
+
+TinTower4F_BlockData:
+ INCBIN "maps/TinTower4F.blk"
+
+TinTower5F_BlockData:
+ INCBIN "maps/TinTower5F.blk"
+
+TinTower6F_BlockData:
+ INCBIN "maps/TinTower6F.blk"
+
+TinTower7F_BlockData:
+ INCBIN "maps/TinTower7F.blk"
+
+TinTower8F_BlockData:
+ INCBIN "maps/TinTower8F.blk"
+
+TinTower9F_BlockData:
+ INCBIN "maps/TinTower9F.blk"
+
+TinTowerRoof_BlockData:
+ INCBIN "maps/TinTowerRoof.blk"
+
+BurnedTower1F_BlockData:
+ INCBIN "maps/BurnedTower1F.blk"
+
+BurnedTowerB1F_BlockData:
+ INCBIN "maps/BurnedTowerB1F.blk"
+
+BetaCaveTestMap_BlockData:
+ INCBIN "maps/BetaCaveTestMap.blk"
+
+MountMortar1FOutside_BlockData:
+ INCBIN "maps/MountMortar1FOutside.blk"
+
+MountMortar1FInside_BlockData:
+ INCBIN "maps/MountMortar1FInside.blk"
+
+MountMortar2FInside_BlockData:
+ INCBIN "maps/MountMortar2FInside.blk"
+
+MountMortarB1F_BlockData:
+ INCBIN "maps/MountMortarB1F.blk"
+
+IcePath1F_BlockData:
+ INCBIN "maps/IcePath1F.blk"
+
+IcePathB1F_BlockData:
+ INCBIN "maps/IcePathB1F.blk"
+
+IcePathB2FMahoganySide_BlockData:
+ INCBIN "maps/IcePathB2FMahoganySide.blk"
+
+IcePathB2FBlackthornSide_BlockData:
+ INCBIN "maps/IcePathB2FBlackthornSide.blk"
+
+IcePathB3F_BlockData:
+ INCBIN "maps/IcePathB3F.blk"
+
+WhirlIslandNW_BlockData:
+ INCBIN "maps/WhirlIslandNW.blk"
+
+WhirlIslandNE_BlockData:
+ INCBIN "maps/WhirlIslandNE.blk"
+
+WhirlIslandSW_BlockData:
+ INCBIN "maps/WhirlIslandSW.blk"
+
+WhirlIslandCave_BlockData:
+ INCBIN "maps/WhirlIslandCave.blk"
+
+WhirlIslandSE_BlockData:
+ INCBIN "maps/WhirlIslandSE.blk"
+
+WhirlIslandB1F_BlockData:
+ INCBIN "maps/WhirlIslandB1F.blk"
+
+WhirlIslandB2F_BlockData:
+ INCBIN "maps/WhirlIslandB2F.blk"
+
+WhirlIslandLugiaChamber_BlockData:
+ INCBIN "maps/WhirlIslandLugiaChamber.blk"
+
+SilverCaveRoom1_BlockData:
+ INCBIN "maps/SilverCaveRoom1.blk"
+
+SilverCaveRoom2_BlockData:
+ INCBIN "maps/SilverCaveRoom2.blk"
+
+SilverCaveRoom3_BlockData:
+ INCBIN "maps/SilverCaveRoom3.blk"
+
+BetaRocketHideout1_BlockData:
+ INCBIN "maps/BetaRocketHideout1.blk"
+
+BetaRocketHideout2_BlockData:
+ INCBIN "maps/BetaRocketHideout2.blk"
+
+BetaEmptyHouse_BlockData:
+ INCBIN "maps/BetaEmptyHouse.blk"
+
+BetaRocketHideout3_BlockData:
+ INCBIN "maps/BetaRocketHideout3.blk"
+
+MahoganyMart1F_BlockData:
+MountMoonGiftShop_BlockData:
+ INCBIN "maps/GiftShop.blk"
+
+TeamRocketBaseB1F_BlockData:
+ INCBIN "maps/TeamRocketBaseB1F.blk"
+
+TeamRocketBaseB2F_BlockData:
+ INCBIN "maps/TeamRocketBaseB2F.blk"
+
+TeamRocketBaseB3F_BlockData:
+ INCBIN "maps/TeamRocketBaseB3F.blk"
+
+BetaRoute23EarlyVersion_BlockData:
+ INCBIN "maps/BetaRoute23EarlyVersion.blk"
+
+IndigoPlateauPokecenter1F_BlockData:
+ INCBIN "maps/IndigoPlateauPokecenter1F.blk"
+
+WillsRoom_BlockData:
+ INCBIN "maps/WillsRoom.blk"
+
+KogasRoom_BlockData:
+ INCBIN "maps/KogasRoom.blk"
+
+BrunosRoom_BlockData:
+ INCBIN "maps/BrunosRoom.blk"
+
+KarensRoom_BlockData:
+ INCBIN "maps/KarensRoom.blk"
+
+AzaleaGym_BlockData:
+ INCBIN "maps/AzaleaGym.blk"
+
+VioletGym_BlockData:
+ INCBIN "maps/VioletGym.blk"
+
+GoldenrodGym_BlockData:
+ INCBIN "maps/GoldenrodGym.blk"
+
+EcruteakGym_BlockData:
+ INCBIN "maps/EcruteakGym.blk"
+
+MahoganyGym_BlockData:
+ INCBIN "maps/MahoganyGym.blk"
+
+OlivineGym_BlockData:
+ INCBIN "maps/OlivineGym.blk"
+
+BetaUnknown_BlockData:
+ INCBIN "maps/BetaUnknown.blk"
+
+CianwoodGym_BlockData:
+ INCBIN "maps/CianwoodGym.blk"
+
+BlackthornGym1F_BlockData:
+ INCBIN "maps/BlackthornGym1F.blk"
+
+BlackthornGym2F_BlockData:
+ INCBIN "maps/BlackthornGym2F.blk"
+
+OlivineLighthouse1F_BlockData:
+ INCBIN "maps/OlivineLighthouse1F.blk"
+
+OlivineLighthouse2F_BlockData:
+ INCBIN "maps/OlivineLighthouse2F.blk"
+
+OlivineLighthouse3F_BlockData:
+ INCBIN "maps/OlivineLighthouse3F.blk"
+
+OlivineLighthouse4F_BlockData:
+ INCBIN "maps/OlivineLighthouse4F.blk"
+
+OlivineLighthouse5F_BlockData:
+ INCBIN "maps/OlivineLighthouse5F.blk"
+
+OlivineLighthouse6F_BlockData:
+ INCBIN "maps/OlivineLighthouse6F.blk"
+
+
+SECTION "Map Blockdata 3", ROMX
+
+BetaCave2_BlockData:
+ INCBIN "maps/BetaCave2.blk"
+
+SlowpokeWellB1F_BlockData:
+ INCBIN "maps/SlowpokeWellB1F.blk"
+
+SlowpokeWellB2F_BlockData:
+ INCBIN "maps/SlowpokeWellB2F.blk"
+
+IlexForest_BlockData:
+ INCBIN "maps/IlexForest.blk"
+
+DarkCaveVioletEntrance_BlockData:
+ INCBIN "maps/DarkCaveVioletEntrance.blk"
+
+DarkCaveBlackthornEntrance_BlockData:
+ INCBIN "maps/DarkCaveBlackthornEntrance.blk"
+
+RuinsOfAlphResearchCenter_BlockData:
+ INCBIN "maps/RuinsOfAlphResearchCenter.blk"
+
+GoldenrodBikeShop_BlockData:
+ INCBIN "maps/GoldenrodBikeShop.blk"
+
+DanceTheatre_BlockData:
+ INCBIN "maps/DanceTheatre.blk"
+
+EcruteakHouse_BlockData:
+ INCBIN "maps/EcruteakHouse.blk"
+
+GoldenrodGameCorner_BlockData:
+ INCBIN "maps/GoldenrodGameCorner.blk"
+
+Route35NationalParkGate_BlockData:
+ INCBIN "maps/Route35NationalParkGate.blk"
+
+Route36NationalParkGate_BlockData:
+ INCBIN "maps/Route36NationalParkGate.blk"
+
+FastShip1F_BlockData:
+ INCBIN "maps/FastShip1F.blk"
+
+FastShipB1F_BlockData:
+ INCBIN "maps/FastShipB1F.blk"
+
+BetaSSAquaInsideCutOut_BlockData:
+ INCBIN "maps/BetaSSAquaInsideCutOut.blk"
+
+FastShipCabins_NNW_NNE_NE_BlockData:
+ INCBIN "maps/FastShipCabins_NNW_NNE_NE.blk"
+
+FastShipCabins_SW_SSW_NW_BlockData:
+ INCBIN "maps/FastShipCabins_SW_SSW_NW.blk"
+
+FastShipCabins_SE_SSE_CaptainsCabin_BlockData:
+ INCBIN "maps/FastShipCabins_SE_SSE_CaptainsCabin.blk"
+
+OlivinePort_BlockData:
+ INCBIN "maps/OlivinePort.blk"
+
+VermilionPort_BlockData:
+ INCBIN "maps/VermilionPort.blk"
+
+OlivineCafe_BlockData:
+SafariZoneMainOffice_BlockData:
+ INCBIN "maps/OlivineCafe.blk"
+
+KrissHouse2F_BlockData:
+ INCBIN "maps/KrissHouse2F.blk"
+
+SaffronTrainStation_BlockData:
+ INCBIN "maps/SaffronTrainStation.blk"
+
+CeruleanGym_BlockData:
+ INCBIN "maps/CeruleanGym.blk"
+
+VermilionGym_BlockData:
+ INCBIN "maps/VermilionGym.blk"
+
+SaffronGym_BlockData:
+ INCBIN "maps/SaffronGym.blk"
+
+PowerPlant_BlockData:
+ INCBIN "maps/PowerPlant.blk"
+
+PokemonFanClub_BlockData:
+SafariZoneWardensHome_BlockData:
+ INCBIN "maps/PokemonFanClub.blk"
+
+FightingDojo_BlockData:
+ INCBIN "maps/FightingDojo.blk"
+
+SilphCo1F_BlockData:
+ INCBIN "maps/SilphCo1F.blk"
+
+ViridianGym_BlockData:
+ INCBIN "maps/ViridianGym.blk"
+
+TrainerHouse1F_BlockData:
+ INCBIN "maps/TrainerHouse1F.blk"
+
+TrainerHouseB1F_BlockData:
+ INCBIN "maps/TrainerHouseB1F.blk"
+
+RedsHouse1F_BlockData:
+ INCBIN "maps/RedsHouse1F.blk"
+
+RedsHouse2F_BlockData:
+ INCBIN "maps/RedsHouse2F.blk"
+
+OaksLab_BlockData:
+ INCBIN "maps/OaksLab.blk"
+
+MrFujisHouse_BlockData:
+ INCBIN "maps/MrFujisHouse.blk"
+
+LavRadioTower1F_BlockData:
+ INCBIN "maps/LavRadioTower1F.blk"
+
+SilverCaveItemRooms_BlockData:
+ INCBIN "maps/SilverCaveItemRooms.blk"
+
+DayCare_BlockData:
+ INCBIN "maps/DayCare.blk"
+
+SoulHouse_BlockData:
+ INCBIN "maps/SoulHouse.blk"
+
+PewterGym_BlockData:
+ INCBIN "maps/PewterGym.blk"
+
+CeladonGym_BlockData:
+ INCBIN "maps/CeladonGym.blk"
+
+BetaHouse2_BlockData:
+ INCBIN "maps/BetaHouse2.blk"
+
+CeladonCafe_BlockData:
+ INCBIN "maps/CeladonCafe.blk"
+
+BetaCeladonMansion_BlockData:
+ INCBIN "maps/BetaCeladonMansion.blk"
+
+RockTunnel1F_BlockData:
+ INCBIN "maps/RockTunnel1F.blk"
+
+RockTunnelB1F_BlockData:
+ INCBIN "maps/RockTunnelB1F.blk"
+
+DiglettsCave_BlockData:
+ INCBIN "maps/DiglettsCave.blk"
+
+MountMoon_BlockData:
+ INCBIN "maps/MountMoon.blk"
+
+SeafoamGym_BlockData:
+ INCBIN "maps/SeafoamGym.blk"
+
+MrPokemonsHouse_BlockData:
+ INCBIN "maps/MrPokemonsHouse.blk"
+
+VictoryRoadGate_BlockData:
+ INCBIN "maps/VictoryRoadGate.blk"
+
+OlivinePortPassage_BlockData:
+VermilionPortPassage_BlockData:
+ INCBIN "maps/PortPassage.blk"
+
+FuchsiaGym_BlockData:
+ INCBIN "maps/FuchsiaGym.blk"
+
+SafariZoneBeta_BlockData:
+ INCBIN "maps/SafariZoneBeta.blk"
+
+UndergroundPath_BlockData:
+ INCBIN "maps/UndergroundPath.blk"
+
+Route39Barn_BlockData:
+ INCBIN "maps/Route39Barn.blk"
+
+VictoryRoad_BlockData:
+ INCBIN "maps/VictoryRoad.blk"
+
+Route23_BlockData:
+ INCBIN "maps/Route23.blk"
+
+LancesRoom_BlockData:
+ INCBIN "maps/LancesRoom.blk"
+
+HallOfFame_BlockData:
+ INCBIN "maps/HallOfFame.blk"
+
+CopycatsHouse1F_BlockData:
+ INCBIN "maps/CopycatsHouse1F.blk"
+
+CopycatsHouse2F_BlockData:
+ INCBIN "maps/CopycatsHouse2F.blk"
+
+GoldenrodFlowerShop_BlockData:
+ INCBIN "maps/GoldenrodFlowerShop.blk"
+
+MountMoonSquare_BlockData:
+ INCBIN "maps/MountMoonSquare.blk"
+
+WiseTriosRoom_BlockData:
+ INCBIN "maps/WiseTriosRoom.blk"
+
+DragonsDen1F_BlockData:
+ INCBIN "maps/DragonsDen1F.blk"
+
+DragonsDenB1F_BlockData:
+ INCBIN "maps/DragonsDenB1F.blk"
+
+TohjoFalls_BlockData:
+ INCBIN "maps/TohjoFalls.blk"
+
+RuinsOfAlphHoOhItemRoom_BlockData:
+RuinsOfAlphKabutoItemRoom_BlockData:
+RuinsOfAlphOmanyteItemRoom_BlockData:
+RuinsOfAlphAerodactylItemRoom_BlockData:
+ INCBIN "maps/RuinsOfAlphItemRoom.blk"
+
+RuinsOfAlphHoOhWordRoom_BlockData:
+ INCBIN "maps/RuinsOfAlphHoOhWordRoom.blk"
+
+RuinsOfAlphKabutoWordRoom_BlockData:
+ INCBIN "maps/RuinsOfAlphKabutoWordRoom.blk"
+
+RuinsOfAlphOmanyteWordRoom_BlockData:
+ INCBIN "maps/RuinsOfAlphOmanyteWordRoom.blk"
+
+RuinsOfAlphAerodactylWordRoom_BlockData:
+ INCBIN "maps/RuinsOfAlphAerodactylWordRoom.blk"
+
+DragonShrine_BlockData:
+ INCBIN "maps/DragonShrine.blk"
+
+BattleTower1F_BlockData:
+ INCBIN "maps/BattleTower1F.blk"
+
+BattleTowerBattleRoom_BlockData:
+ INCBIN "maps/BattleTowerBattleRoom.blk"
+
+GoldenrodPokeComCenter2FMobile_BlockData:
+ INCBIN "maps/GoldenrodPokeComCenter2FMobile.blk"
+
+MobileTradeRoomMobile_BlockData:
+ INCBIN "maps/MobileTradeRoomMobile.blk"
+
+MobileBattleRoom_BlockData:
+ INCBIN "maps/MobileBattleRoom.blk"
+
+BattleTowerHallway_BlockData:
+ INCBIN "maps/BattleTowerHallway.blk"
+
+BattleTowerElevator_BlockData:
+ INCBIN "maps/BattleTowerElevator.blk"
+
+BattleTowerOutside_BlockData:
+ INCBIN "maps/BattleTowerOutside.blk"
+
+BetaBlank_BlockData:
+ INCBIN "maps/BetaBlank.blk"
+
+GoldenrodDeptStoreRoof_BlockData:
+ INCBIN "maps/GoldenrodDeptStoreRoof.blk"
diff --git a/maps/blockdata_1.asm b/maps/blockdata_1.asm
deleted file mode 100644
index be9abbcc1..000000000
--- a/maps/blockdata_1.asm
+++ /dev/null
@@ -1,309 +0,0 @@
-Route32_BlockData:
- INCBIN "maps/Route32.blk"
-
-Route40_BlockData:
- INCBIN "maps/Route40.blk"
-
-Route36_BlockData:
- INCBIN "maps/Route36.blk"
-
-Route44_BlockData:
- INCBIN "maps/Route44.blk"
-
-Route28_BlockData:
- INCBIN "maps/Route28.blk"
-
-BetaHerosHouse_BlockData:
- INCBIN "maps/BetaHerosHouse.blk"
-
-CeladonCity_BlockData:
- INCBIN "maps/CeladonCity.blk"
-
-SaffronCity_BlockData:
- INCBIN "maps/SaffronCity.blk"
-
-Route2_BlockData:
- INCBIN "maps/Route2.blk"
-
-ElmsHouse_BlockData:
- INCBIN "maps/ElmsHouse.blk"
-
-BetaSproutTower1_BlockData:
- INCBIN "maps/BetaSproutTower1.blk"
-
-Route11_BlockData:
- INCBIN "maps/Route11.blk"
-
-BetaSproutTower5_BlockData:
- INCBIN "maps/BetaSproutTower5.blk"
-
-Route15_BlockData:
- INCBIN "maps/Route15.blk"
-
-BetaSproutTower9_BlockData:
- INCBIN "maps/BetaSproutTower9.blk"
-
-Route19_BlockData:
- INCBIN "maps/Route19.blk"
-
-BetaBlackthornCity_BlockData:
- INCBIN "maps/BetaBlackthornCity.blk"
-
-Route10South_BlockData:
- INCBIN "maps/Route10South.blk"
-
-PokeCenter2F_BlockData:
-CinnabarPokeCenter2FBeta_BlockData:
-CeruleanPokeCenter2FBeta_BlockData:
-Route10PokeCenter2FBeta_BlockData:
-VermilionPokeCenter2FBeta_BlockData:
-PewterPokeCenter2FBeta_BlockData:
-FuchsiaPokeCenter2FBeta_BlockData:
-LavenderPokeCenter2FBeta_BlockData:
-CeladonPokeCenter2FBeta_BlockData:
-ViridianPokeCenter2FBeta_BlockData:
-SaffronPokeCenter2FBeta_BlockData:
- INCBIN "maps/PokeCenter2F.blk"
-
-Route41_BlockData:
- INCBIN "maps/Route41.blk"
-
-Route33_BlockData:
- INCBIN "maps/Route33.blk"
-
-Route45_BlockData:
- INCBIN "maps/Route45.blk"
-
-Route29_BlockData:
- INCBIN "maps/Route29.blk"
-
-Route37_BlockData:
- INCBIN "maps/Route37.blk"
-
-LavenderTown_BlockData:
- INCBIN "maps/LavenderTown.blk"
-
-PalletTown_BlockData:
- INCBIN "maps/PalletTown.blk"
-
-Route25_BlockData:
- INCBIN "maps/Route25.blk"
-
-Route24_BlockData:
- INCBIN "maps/Route24.blk"
-
-BetaVioletCity_BlockData:
- INCBIN "maps/BetaVioletCity.blk"
-
-Route3_BlockData:
- INCBIN "maps/Route3.blk"
-
-PewterCity_BlockData:
- INCBIN "maps/PewterCity.blk"
-
-BetaIlexForest_BlockData:
- INCBIN "maps/BetaIlexForest.blk"
-
-BetaSproutTower2_BlockData:
- INCBIN "maps/BetaSproutTower2.blk"
-
-Route12_BlockData:
- INCBIN "maps/Route12.blk"
-
-BetaGoldenrodCity_BlockData:
- INCBIN "maps/BetaGoldenrodCity.blk"
-
-Route20_BlockData:
- INCBIN "maps/Route20.blk"
-
-BetaSproutTower6_BlockData:
- INCBIN "maps/BetaSproutTower6.blk"
-
-BetaPokecenterMainHouse_BlockData:
- INCBIN "maps/BetaPokecenterMainHouse.blk"
-
-Route30_BlockData:
- INCBIN "maps/Route30.blk"
-
-Route26_BlockData:
- INCBIN "maps/Route26.blk"
-
-Route42_BlockData:
- INCBIN "maps/Route42.blk"
-
-Route34_BlockData:
- INCBIN "maps/Route34.blk"
-
-Route46_BlockData:
- INCBIN "maps/Route46.blk"
-
-FuchsiaCity_BlockData:
- INCBIN "maps/FuchsiaCity.blk"
-
-Route38_BlockData:
- INCBIN "maps/Route38.blk"
-
-BetaCianwoodCity_BlockData:
- INCBIN "maps/BetaCianwoodCity.blk"
-
-OlivineTimsHouse_BlockData:
-OlivineHouseBeta_BlockData:
-OlivinePunishmentSpeechHouse_BlockData:
-OlivineGoodRodHouse_BlockData:
-Route39Farmhouse_BlockData:
-MahoganyRedGyaradosSpeechHouse_BlockData:
-BlackthornDragonSpeechHouse_BlockData:
-BlackthornEmysHouse_BlockData:
-MoveDeletersHouse_BlockData:
-CeruleanGymBadgeSpeechHouse_BlockData:
-CeruleanPoliceStation_BlockData:
-CeruleanTradeSpeechHouse_BlockData:
-BillsHouse_BlockData:
-CharcoalKiln_BlockData:
-LakeofRageHiddenPowerHouse_BlockData:
-LakeofRageMagikarpHouse_BlockData:
-GoldenrodHappinessRater_BlockData:
-GoldenrodBillsHouse_BlockData:
-GoldenrodPPSpeechHouse_BlockData:
-GoldenrodNameRater_BlockData:
-VermilionHouseFishingSpeechHouse_BlockData:
-VermilionMagnetTrainSpeechHouse_BlockData:
-VermilionHouseDiglettsCaveSpeechHouse_BlockData:
-BluesHouse_BlockData:
-PewterNidoranSpeechHouse_BlockData:
-PewterSnoozeSpeechHouse_BlockData:
-FuchsiaBillSpeechHouse_BlockData:
-LavenderTownSpeechHouse_BlockData:
-LavenderNameRater_BlockData:
-Route12SuperRodHouse_BlockData:
-Route28FamousSpeechHouse_BlockData:
-CeladonMansionRoofHouse_BlockData:
-Route16FuchsiaSpeechHouse_BlockData:
-ManiasHouse_BlockData:
-CianwoodPharmacy_BlockData:
-CianwoodCityPhotoStudio_BlockData:
-CianwoodLugiaSpeechHouse_BlockData:
-PokeSeersHouse_BlockData:
-ViridianNicknameSpeechHouse_BlockData:
-Route2NuggetSpeechHouse_BlockData:
-KrissNeighborsHouse_BlockData:
-Route26HealSpeechHouse_BlockData:
-Route26DayofWeekSiblingsHouse_BlockData:
-Route27SandstormHouse_BlockData:
-MrPsychicsHouse_BlockData:
-Route5CleanseTagSpeechHouse_BlockData:
-CherrygroveGymSpeechHouse_BlockData:
-GuideGentsHouse_BlockData:
-CherrygroveEvolutionSpeechHouse_BlockData:
-Route30BerrySpeechHouse_BlockData:
- INCBIN "maps/House1.blk"
-
-SafariZoneFuchsiaGateBeta_BlockData:
-Route19FuchsiaGate_BlockData:
-Route43MahoganyGate_BlockData:
-Route43Gate_BlockData:
-Route35Goldenrodgate_BlockData:
-Route36RuinsofAlphgate_BlockData:
-Route34IlexForestGate_BlockData:
-Route6SaffronGate_BlockData:
-Route40BattleTowerGate_BlockData:
-Route2Gate_BlockData:
-Route2946Gate_BlockData:
-Route5SaffronCityGate_BlockData:
- INCBIN "maps/NorthSouthGate.blk"
-
-BetaTeakCity_BlockData:
- INCBIN "maps/BetaTeakCity.blk"
-
-BetaCherrygroveCity_BlockData:
- INCBIN "maps/BetaCherrygroveCity.blk"
-
-CinnabarIsland_BlockData:
- INCBIN "maps/CinnabarIsland.blk"
-
-Route4_BlockData:
- INCBIN "maps/Route4.blk"
-
-Route8_BlockData:
- INCBIN "maps/Route8.blk"
-
-BetaSproutTower3_BlockData:
- INCBIN "maps/BetaSproutTower3.blk"
-
-ViridianCity_BlockData:
- INCBIN "maps/ViridianCity.blk"
-
-Route13_BlockData:
- INCBIN "maps/Route13.blk"
-
-Route21_BlockData:
- INCBIN "maps/Route21.blk"
-
-BetaSproutTower7_BlockData:
- INCBIN "maps/BetaSproutTower7.blk"
-
-Route17_BlockData:
- INCBIN "maps/Route17.blk"
-
-BetaMahoganyTown_BlockData:
- INCBIN "maps/BetaMahoganyTown.blk"
-
-Route31_BlockData:
- INCBIN "maps/Route31.blk"
-
-Route27_BlockData:
- INCBIN "maps/Route27.blk"
-
-Route35_BlockData:
- INCBIN "maps/Route35.blk"
-
-Route43_BlockData:
- INCBIN "maps/Route43.blk"
-
-Route39_BlockData:
- INCBIN "maps/Route39.blk"
-
-KrissHouse1F_BlockData:
- INCBIN "maps/KrissHouse1F.blk"
-
-Route38EcruteakGate_BlockData:
-Route42EcruteakGate_BlockData:
-Route32RuinsofAlphGate_BlockData:
-IlexForestAzaleaGate_BlockData:
-Route15FuchsiaGate_BlockData:
-Route8SaffronGate_BlockData:
-Route16Gate_BlockData:
-Route7SaffronGate_BlockData:
-Route1718Gate_BlockData:
-Route31VioletGate_BlockData:
- INCBIN "maps/EastWestGate.blk"
-
-BetaAzaleaTown_BlockData:
- INCBIN "maps/BetaAzaleaTown.blk"
-
-VermilionCity_BlockData:
- INCBIN "maps/VermilionCity.blk"
-
-BetaOlivineCity_BlockData:
- INCBIN "maps/BetaOlivineCity.blk"
-
-BetaNewBarkTown_BlockData:
- INCBIN "maps/BetaNewBarkTown.blk"
-
-ElmsLab_BlockData:
- INCBIN "maps/ElmsLab.blk"
-
-CeruleanCity_BlockData:
- INCBIN "maps/CeruleanCity.blk"
-
-Route1_BlockData:
- INCBIN "maps/Route1.blk"
-
-Route5_BlockData:
- INCBIN "maps/Route5.blk"
-
-Route9_BlockData:
- INCBIN "maps/Route9.blk"
-
-Route22_BlockData:
- INCBIN "maps/Route22.blk"
diff --git a/maps/blockdata_2.asm b/maps/blockdata_2.asm
deleted file mode 100644
index a5e567e9f..000000000
--- a/maps/blockdata_2.asm
+++ /dev/null
@@ -1,462 +0,0 @@
-Route14_BlockData:
- INCBIN "maps/Route14.blk"
-
-BetaSproutTower8_BlockData:
- INCBIN "maps/BetaSproutTower8.blk"
-
-OlivineMart_BlockData:
-EcruteakMart_BlockData:
-BlackthornMart_BlockData:
-CeruleanMart_BlockData:
-AzaleaMart_BlockData:
-VioletMart_BlockData:
-VermilionMart_BlockData:
-PewterMart_BlockData:
-FuchsiaMart_BlockData:
-LavenderMart_BlockData:
-ViridianMart_BlockData:
-SaffronMart_BlockData:
-CherrygroveMart_BlockData:
- INCBIN "maps/Mart.blk"
-
-Route10North_BlockData:
- INCBIN "maps/Route10North.blk"
-
-BetaLakeOfRage_BlockData:
- INCBIN "maps/BetaLakeOfRage.blk"
-
-OlivinePokeCenter1F_BlockData:
-MahoganyPokeCenter1F_BlockData:
-EcruteakPokeCenter1F_BlockData:
-BlackthornPokeCenter1F_BlockData:
-CinnabarPokeCenter1F_BlockData:
-CeruleanPokeCenter1F_BlockData:
-Route10PokeCenter1F_BlockData:
-AzaleaPokeCenter1F_BlockData:
-VioletPokeCenter1F_BlockData:
-Route32PokeCenter1F_BlockData:
-GoldenrodPokeCenter1F_BlockData:
-VermilionPokeCenter1F_BlockData:
-PewterPokeCenter1F_BlockData:
-FuchsiaPokeCenter1F_BlockData:
-LavenderPokeCenter1F_BlockData:
-SilverCavePokeCenter1F_BlockData:
-CeladonPokeCenter1F_BlockData:
-CianwoodPokeCenter1F_BlockData:
-ViridianPokeCenter1F_BlockData:
-SaffronPokeCenter1F_BlockData:
-CherrygrovePokeCenter1F_BlockData:
- INCBIN "maps/PokeCenter1F.blk"
-
-BetaPewterMuseumOfScience1F_BlockData:
- INCBIN "maps/BetaPewterMuseumOfScience1F.blk"
-
-BetaPewterMuseumOfScience2F_BlockData:
- INCBIN "maps/BetaPewterMuseumOfScience2F.blk"
-
-EarlsPokemonAcademy_BlockData:
- INCBIN "maps/EarlsPokemonAcademy.blk"
-
-BetaCinnabarIslandPokemonLabHallway_BlockData:
- INCBIN "maps/BetaCinnabarIslandPokemonLabHallway.blk"
-
-BetaCinnabarIslandPokemonLabRoom1_BlockData:
- INCBIN "maps/BetaCinnabarIslandPokemonLabRoom1.blk"
-
-BetaCinnabarIslandPokemonLabRoom2_BlockData:
- INCBIN "maps/BetaCinnabarIslandPokemonLabRoom2.blk"
-
-BetaCinnabarIslandPokemonLabRoom3_BlockData:
- INCBIN "maps/BetaCinnabarIslandPokemonLabRoom3.blk"
-
-GoldenrodDeptStore1F_BlockData:
-CeladonDeptStore1F_BlockData:
- INCBIN "maps/DeptStore1F.blk"
-
-GoldenrodDeptStore2F_BlockData:
-CeladonDeptStore2F_BlockData:
- INCBIN "maps/DeptStore2F.blk"
-
-GoldenrodDeptStore3F_BlockData:
-CeladonDeptStore3F_BlockData:
- INCBIN "maps/DeptStore3F.blk"
-
-GoldenrodDeptStore4F_BlockData:
-CeladonDeptStore4F_BlockData:
- INCBIN "maps/DeptStore4F.blk"
-
-GoldenrodDeptStore5F_BlockData:
-CeladonDeptStore5F_BlockData:
- INCBIN "maps/DeptStore5F.blk"
-
-GoldenrodDeptStore6F_BlockData:
-CeladonDeptStore6F_BlockData:
- INCBIN "maps/DeptStore6F.blk"
-
-GoldenrodDeptStoreElevator_BlockData:
-CeladonDeptStoreElevator_BlockData:
- INCBIN "maps/DeptStoreElevator.blk"
-
-CeladonMansion1F_BlockData:
- INCBIN "maps/CeladonMansion1F.blk"
-
-CeladonMansion2F_BlockData:
- INCBIN "maps/CeladonMansion2F.blk"
-
-CeladonMansion3F_BlockData:
- INCBIN "maps/CeladonMansion3F.blk"
-
-CeladonMansionRoof_BlockData:
- INCBIN "maps/CeladonMansionRoof.blk"
-
-BetaHouse_BlockData:
- INCBIN "maps/BetaHouse.blk"
-
-CeladonGameCorner_BlockData:
- INCBIN "maps/CeladonGameCorner.blk"
-
-CeladonGameCornerPrizeRoom_BlockData:
- INCBIN "maps/CeladonGameCornerPrizeRoom.blk"
-
-Colosseum_BlockData:
- INCBIN "maps/Colosseum.blk"
-
-TradeCenter_BlockData:
-TimeCapsule_BlockData:
- INCBIN "maps/TradeCenter.blk"
-
-EcruteakLugiaSpeechHouse_BlockData:
-EcruteakItemfinderHouse_BlockData:
-VioletNicknameSpeechHouse_BlockData:
-VioletOnixTradeHouse_BlockData:
- INCBIN "maps/House2.blk"
-
-BetaCave_BlockData:
- INCBIN "maps/BetaCave.blk"
-
-UnionCaveB1F_BlockData:
- INCBIN "maps/UnionCaveB1F.blk"
-
-UnionCaveB2F_BlockData:
- INCBIN "maps/UnionCaveB2F.blk"
-
-UnionCave1F_BlockData:
- INCBIN "maps/UnionCave1F.blk"
-
-NationalPark_BlockData:
-NationalParkBugContest_BlockData:
- INCBIN "maps/NationalPark.blk"
-
-Route6UndergroundEntrance_BlockData:
-Route5UndergroundEntrance_BlockData:
- INCBIN "maps/UndergroundPathEntrance.blk"
-
-BetaPokecenterTradeStation_BlockData:
- INCBIN "maps/BetaPokecenterTradeStation.blk"
-
-KurtsHouse_BlockData:
- INCBIN "maps/KurtsHouse.blk"
-
-GoldenrodMagnetTrainStation_BlockData:
- INCBIN "maps/GoldenrodMagnetTrainStation.blk"
-
-RuinsofAlphOutside_BlockData:
- INCBIN "maps/RuinsofAlphOutside.blk"
-
-BetaAlphRuinUnsolvedPuzzleRoom_BlockData:
- INCBIN "maps/BetaAlphRuinUnsolvedPuzzleRoom.blk"
-
-RuinsofAlphInnerChamber_BlockData:
- INCBIN "maps/RuinsofAlphInnerChamber.blk"
-
-RuinsofAlphHoOhChamber_BlockData:
-RuinsofAlphKabutoChamber_BlockData:
-RuinsofAlphOmanyteChamber_BlockData:
-RuinsofAlphAerodactylChamber_BlockData:
- INCBIN "maps/RuinsofAlphPuzzleChamber.blk"
-
-SproutTower1F_BlockData:
- INCBIN "maps/SproutTower1F.blk"
-
-BetaSproutTowerCutOut1_BlockData:
- INCBIN "maps/BetaSproutTowerCutOut1.blk"
-
-SproutTower2F_BlockData:
- INCBIN "maps/SproutTower2F.blk"
-
-BetaSproutTowerCutOut2_BlockData:
- INCBIN "maps/BetaSproutTowerCutOut2.blk"
-
-SproutTower3F_BlockData:
- INCBIN "maps/SproutTower3F.blk"
-
-BetaSproutTowerCutOut3_BlockData:
- INCBIN "maps/BetaSproutTowerCutOut3.blk"
-
-RadioTower1F_BlockData:
- INCBIN "maps/RadioTower1F.blk"
-
-RadioTower2F_BlockData:
- INCBIN "maps/RadioTower2F.blk"
-
-RadioTower3F_BlockData:
- INCBIN "maps/RadioTower3F.blk"
-
-RadioTower4F_BlockData:
- INCBIN "maps/RadioTower4F.blk"
-
-RadioTower5F_BlockData:
- INCBIN "maps/RadioTower5F.blk"
-
-NewBarkTown_BlockData:
- INCBIN "maps/NewBarkTown.blk"
-
-CherrygroveCity_BlockData:
- INCBIN "maps/CherrygroveCity.blk"
-
-VioletCity_BlockData:
- INCBIN "maps/VioletCity.blk"
-
-AzaleaTown_BlockData:
- INCBIN "maps/AzaleaTown.blk"
-
-CianwoodCity_BlockData:
- INCBIN "maps/CianwoodCity.blk"
-
-GoldenrodCity_BlockData:
- INCBIN "maps/GoldenrodCity.blk"
-
-OlivineCity_BlockData:
- INCBIN "maps/OlivineCity.blk"
-
-EcruteakCity_BlockData:
- INCBIN "maps/EcruteakCity.blk"
-
-MahoganyTown_BlockData:
- INCBIN "maps/MahoganyTown.blk"
-
-LakeofRage_BlockData:
- INCBIN "maps/LakeofRage.blk"
-
-BlackthornCity_BlockData:
- INCBIN "maps/BlackthornCity.blk"
-
-SilverCaveOutside_BlockData:
- INCBIN "maps/SilverCaveOutside.blk"
-
-Route6_BlockData:
- INCBIN "maps/Route6.blk"
-
-Route7_BlockData:
- INCBIN "maps/Route7.blk"
-
-Route16_BlockData:
- INCBIN "maps/Route16.blk"
-
-Route18_BlockData:
- INCBIN "maps/Route18.blk"
-
-WarehouseEntrance_BlockData:
- INCBIN "maps/WarehouseEntrance.blk"
-
-UndergroundPathSwitchRoomEntrances_BlockData:
- INCBIN "maps/UndergroundPathSwitchRoomEntrances.blk"
-
-GoldenrodDeptStoreB1F_BlockData:
- INCBIN "maps/GoldenrodDeptStoreB1F.blk"
-
-UndergroundWarehouse_BlockData:
- INCBIN "maps/UndergroundWarehouse.blk"
-
-BetaElevator_BlockData:
- INCBIN "maps/BetaElevator.blk"
-
-TinTower1F_BlockData:
- INCBIN "maps/TinTower1F.blk"
-
-TinTower2F_BlockData:
- INCBIN "maps/TinTower2F.blk"
-
-TinTower3F_BlockData:
- INCBIN "maps/TinTower3F.blk"
-
-TinTower4F_BlockData:
- INCBIN "maps/TinTower4F.blk"
-
-TinTower5F_BlockData:
- INCBIN "maps/TinTower5F.blk"
-
-TinTower6F_BlockData:
- INCBIN "maps/TinTower6F.blk"
-
-TinTower7F_BlockData:
- INCBIN "maps/TinTower7F.blk"
-
-TinTower8F_BlockData:
- INCBIN "maps/TinTower8F.blk"
-
-TinTower9F_BlockData:
- INCBIN "maps/TinTower9F.blk"
-
-TinTowerRoof_BlockData:
- INCBIN "maps/TinTowerRoof.blk"
-
-BurnedTower1F_BlockData:
- INCBIN "maps/BurnedTower1F.blk"
-
-BurnedTowerB1F_BlockData:
- INCBIN "maps/BurnedTowerB1F.blk"
-
-BetaCaveTestMap_BlockData:
- INCBIN "maps/BetaCaveTestMap.blk"
-
-MountMortar1FOutside_BlockData:
- INCBIN "maps/MountMortar1FOutside.blk"
-
-MountMortar1FInside_BlockData:
- INCBIN "maps/MountMortar1FInside.blk"
-
-MountMortar2FInside_BlockData:
- INCBIN "maps/MountMortar2FInside.blk"
-
-MountMortarB1F_BlockData:
- INCBIN "maps/MountMortarB1F.blk"
-
-IcePath1F_BlockData:
- INCBIN "maps/IcePath1F.blk"
-
-IcePathB1F_BlockData:
- INCBIN "maps/IcePathB1F.blk"
-
-IcePathB2FMahoganySide_BlockData:
- INCBIN "maps/IcePathB2FMahoganySide.blk"
-
-IcePathB2FBlackthornSide_BlockData:
- INCBIN "maps/IcePathB2FBlackthornSide.blk"
-
-IcePathB3F_BlockData:
- INCBIN "maps/IcePathB3F.blk"
-
-WhirlIslandNW_BlockData:
- INCBIN "maps/WhirlIslandNW.blk"
-
-WhirlIslandNE_BlockData:
- INCBIN "maps/WhirlIslandNE.blk"
-
-WhirlIslandSW_BlockData:
- INCBIN "maps/WhirlIslandSW.blk"
-
-WhirlIslandCave_BlockData:
- INCBIN "maps/WhirlIslandCave.blk"
-
-WhirlIslandSE_BlockData:
- INCBIN "maps/WhirlIslandSE.blk"
-
-WhirlIslandB1F_BlockData:
- INCBIN "maps/WhirlIslandB1F.blk"
-
-WhirlIslandB2F_BlockData:
- INCBIN "maps/WhirlIslandB2F.blk"
-
-WhirlIslandLugiaChamber_BlockData:
- INCBIN "maps/WhirlIslandLugiaChamber.blk"
-
-SilverCaveRoom1_BlockData:
- INCBIN "maps/SilverCaveRoom1.blk"
-
-SilverCaveRoom2_BlockData:
- INCBIN "maps/SilverCaveRoom2.blk"
-
-SilverCaveRoom3_BlockData:
- INCBIN "maps/SilverCaveRoom3.blk"
-
-BetaRocketHideout1_BlockData:
- INCBIN "maps/BetaRocketHideout1.blk"
-
-BetaRocketHideout2_BlockData:
- INCBIN "maps/BetaRocketHideout2.blk"
-
-BetaEmptyHouse_BlockData:
- INCBIN "maps/BetaEmptyHouse.blk"
-
-BetaRocketHideout3_BlockData:
- INCBIN "maps/BetaRocketHideout3.blk"
-
-MahoganyMart1F_BlockData:
-MountMoonGiftShop_BlockData:
- INCBIN "maps/GiftShop.blk"
-
-TeamRocketBaseB1F_BlockData:
- INCBIN "maps/TeamRocketBaseB1F.blk"
-
-TeamRocketBaseB2F_BlockData:
- INCBIN "maps/TeamRocketBaseB2F.blk"
-
-TeamRocketBaseB3F_BlockData:
- INCBIN "maps/TeamRocketBaseB3F.blk"
-
-BetaRoute23EarlyVersion_BlockData:
- INCBIN "maps/BetaRoute23EarlyVersion.blk"
-
-IndigoPlateauPokeCenter1F_BlockData:
- INCBIN "maps/IndigoPlateauPokeCenter1F.blk"
-
-WillsRoom_BlockData:
- INCBIN "maps/WillsRoom.blk"
-
-KogasRoom_BlockData:
- INCBIN "maps/KogasRoom.blk"
-
-BrunosRoom_BlockData:
- INCBIN "maps/BrunosRoom.blk"
-
-KarensRoom_BlockData:
- INCBIN "maps/KarensRoom.blk"
-
-AzaleaGym_BlockData:
- INCBIN "maps/AzaleaGym.blk"
-
-VioletGym_BlockData:
- INCBIN "maps/VioletGym.blk"
-
-GoldenrodGym_BlockData:
- INCBIN "maps/GoldenrodGym.blk"
-
-EcruteakGym_BlockData:
- INCBIN "maps/EcruteakGym.blk"
-
-MahoganyGym_BlockData:
- INCBIN "maps/MahoganyGym.blk"
-
-OlivineGym_BlockData:
- INCBIN "maps/OlivineGym.blk"
-
-BetaUnknown_BlockData:
- INCBIN "maps/BetaUnknown.blk"
-
-CianwoodGym_BlockData:
- INCBIN "maps/CianwoodGym.blk"
-
-BlackthornGym1F_BlockData:
- INCBIN "maps/BlackthornGym1F.blk"
-
-BlackthornGym2F_BlockData:
- INCBIN "maps/BlackthornGym2F.blk"
-
-OlivineLighthouse1F_BlockData:
- INCBIN "maps/OlivineLighthouse1F.blk"
-
-OlivineLighthouse2F_BlockData:
- INCBIN "maps/OlivineLighthouse2F.blk"
-
-OlivineLighthouse3F_BlockData:
- INCBIN "maps/OlivineLighthouse3F.blk"
-
-OlivineLighthouse4F_BlockData:
- INCBIN "maps/OlivineLighthouse4F.blk"
-
-OlivineLighthouse5F_BlockData:
- INCBIN "maps/OlivineLighthouse5F.blk"
-
-OlivineLighthouse6F_BlockData:
- INCBIN "maps/OlivineLighthouse6F.blk"
diff --git a/maps/blockdata_3.asm b/maps/blockdata_3.asm
deleted file mode 100644
index 9a64caf5c..000000000
--- a/maps/blockdata_3.asm
+++ /dev/null
@@ -1,266 +0,0 @@
-BetaCave2_BlockData:
- INCBIN "maps/BetaCave2.blk"
-
-SlowpokeWellB1F_BlockData:
- INCBIN "maps/SlowpokeWellB1F.blk"
-
-SlowpokeWellB2F_BlockData:
- INCBIN "maps/SlowpokeWellB2F.blk"
-
-IlexForest_BlockData:
- INCBIN "maps/IlexForest.blk"
-
-DarkCaveVioletEntrance_BlockData:
- INCBIN "maps/DarkCaveVioletEntrance.blk"
-
-DarkCaveBlackthornEntrance_BlockData:
- INCBIN "maps/DarkCaveBlackthornEntrance.blk"
-
-RuinsofAlphResearchCenter_BlockData:
- INCBIN "maps/RuinsofAlphResearchCenter.blk"
-
-GoldenrodBikeShop_BlockData:
- INCBIN "maps/GoldenrodBikeShop.blk"
-
-DanceTheatre_BlockData:
- INCBIN "maps/DanceTheatre.blk"
-
-EcruteakHouse_BlockData:
- INCBIN "maps/EcruteakHouse.blk"
-
-GoldenrodGameCorner_BlockData:
- INCBIN "maps/GoldenrodGameCorner.blk"
-
-Route35NationalParkgate_BlockData:
- INCBIN "maps/Route35NationalParkgate.blk"
-
-Route36NationalParkgate_BlockData:
- INCBIN "maps/Route36NationalParkgate.blk"
-
-FastShip1F_BlockData:
- INCBIN "maps/FastShip1F.blk"
-
-FastShipB1F_BlockData:
- INCBIN "maps/FastShipB1F.blk"
-
-BetaSsAquaInsideCutOut_BlockData:
- INCBIN "maps/BetaSsAquaInsideCutOut.blk"
-
-FastShipCabins_NNW_NNE_NE_BlockData:
- INCBIN "maps/FastShipCabins_NNW_NNE_NE.blk"
-
-FastShipCabins_SW_SSW_NW_BlockData:
- INCBIN "maps/FastShipCabins_SW_SSW_NW.blk"
-
-FastShipCabins_SE_SSE_CaptainsCabin_BlockData:
- INCBIN "maps/FastShipCabins_SE_SSE_CaptainsCabin.blk"
-
-OlivinePort_BlockData:
- INCBIN "maps/OlivinePort.blk"
-
-VermilionPort_BlockData:
- INCBIN "maps/VermilionPort.blk"
-
-OlivineCafe_BlockData:
-SafariZoneMainOffice_BlockData:
- INCBIN "maps/OlivineCafe.blk"
-
-KrissHouse2F_BlockData:
- INCBIN "maps/KrissHouse2F.blk"
-
-SaffronTrainStation_BlockData:
- INCBIN "maps/SaffronTrainStation.blk"
-
-CeruleanGym_BlockData:
- INCBIN "maps/CeruleanGym.blk"
-
-VermilionGym_BlockData:
- INCBIN "maps/VermilionGym.blk"
-
-SaffronGym_BlockData:
- INCBIN "maps/SaffronGym.blk"
-
-PowerPlant_BlockData:
- INCBIN "maps/PowerPlant.blk"
-
-PokemonFanClub_BlockData:
-SafariZoneWardensHome_BlockData:
- INCBIN "maps/PokemonFanClub.blk"
-
-FightingDojo_BlockData:
- INCBIN "maps/FightingDojo.blk"
-
-SilphCo1F_BlockData:
- INCBIN "maps/SilphCo1F.blk"
-
-ViridianGym_BlockData:
- INCBIN "maps/ViridianGym.blk"
-
-TrainerHouse1F_BlockData:
- INCBIN "maps/TrainerHouse1F.blk"
-
-TrainerHouseB1F_BlockData:
- INCBIN "maps/TrainerHouseB1F.blk"
-
-RedsHouse1F_BlockData:
- INCBIN "maps/RedsHouse1F.blk"
-
-RedsHouse2F_BlockData:
- INCBIN "maps/RedsHouse2F.blk"
-
-OaksLab_BlockData:
- INCBIN "maps/OaksLab.blk"
-
-MrFujisHouse_BlockData:
- INCBIN "maps/MrFujisHouse.blk"
-
-LavRadioTower1F_BlockData:
- INCBIN "maps/LavRadioTower1F.blk"
-
-SilverCaveItemRooms_BlockData:
- INCBIN "maps/SilverCaveItemRooms.blk"
-
-DayCare_BlockData:
- INCBIN "maps/DayCare.blk"
-
-SoulHouse_BlockData:
- INCBIN "maps/SoulHouse.blk"
-
-PewterGym_BlockData:
- INCBIN "maps/PewterGym.blk"
-
-CeladonGym_BlockData:
- INCBIN "maps/CeladonGym.blk"
-
-BetaHouse2_BlockData:
- INCBIN "maps/BetaHouse2.blk"
-
-CeladonCafe_BlockData:
- INCBIN "maps/CeladonCafe.blk"
-
-BetaCeladonMansion_BlockData:
- INCBIN "maps/BetaCeladonMansion.blk"
-
-RockTunnel1F_BlockData:
- INCBIN "maps/RockTunnel1F.blk"
-
-RockTunnelB1F_BlockData:
- INCBIN "maps/RockTunnelB1F.blk"
-
-DiglettsCave_BlockData:
- INCBIN "maps/DiglettsCave.blk"
-
-MountMoon_BlockData:
- INCBIN "maps/MountMoon.blk"
-
-SeafoamGym_BlockData:
- INCBIN "maps/SeafoamGym.blk"
-
-MrPokemonsHouse_BlockData:
- INCBIN "maps/MrPokemonsHouse.blk"
-
-VictoryRoadGate_BlockData:
- INCBIN "maps/VictoryRoadGate.blk"
-
-OlivinePortPassage_BlockData:
-VermilionPortPassage_BlockData:
- INCBIN "maps/PortPassage.blk"
-
-FuchsiaGym_BlockData:
- INCBIN "maps/FuchsiaGym.blk"
-
-SafariZoneBeta_BlockData:
- INCBIN "maps/SafariZoneBeta.blk"
-
-Underground_BlockData:
- INCBIN "maps/Underground.blk"
-
-Route39Barn_BlockData:
- INCBIN "maps/Route39Barn.blk"
-
-VictoryRoad_BlockData:
- INCBIN "maps/VictoryRoad.blk"
-
-Route23_BlockData:
- INCBIN "maps/Route23.blk"
-
-LancesRoom_BlockData:
- INCBIN "maps/LancesRoom.blk"
-
-HallOfFame_BlockData:
- INCBIN "maps/HallOfFame.blk"
-
-CopycatsHouse1F_BlockData:
- INCBIN "maps/CopycatsHouse1F.blk"
-
-CopycatsHouse2F_BlockData:
- INCBIN "maps/CopycatsHouse2F.blk"
-
-GoldenrodFlowerShop_BlockData:
- INCBIN "maps/GoldenrodFlowerShop.blk"
-
-MountMoonSquare_BlockData:
- INCBIN "maps/MountMoonSquare.blk"
-
-WiseTriosRoom_BlockData:
- INCBIN "maps/WiseTriosRoom.blk"
-
-DragonsDen1F_BlockData:
- INCBIN "maps/DragonsDen1F.blk"
-
-DragonsDenB1F_BlockData:
- INCBIN "maps/DragonsDenB1F.blk"
-
-TohjoFalls_BlockData:
- INCBIN "maps/TohjoFalls.blk"
-
-RuinsofAlphHoOhItemRoom_BlockData:
-RuinsofAlphKabutoItemRoom_BlockData:
-RuinsofAlphOmanyteItemRoom_BlockData:
-RuinsofAlphAerodactylItemRoom_BlockData:
- INCBIN "maps/RuinsofAlphItemRoom.blk"
-
-RuinsofAlphHoOhWordRoom_BlockData:
- INCBIN "maps/RuinsofAlphHoOhWordRoom.blk"
-
-RuinsofAlphKabutoWordRoom_BlockData:
- INCBIN "maps/RuinsofAlphKabutoWordRoom.blk"
-
-RuinsofAlphOmanyteWordRoom_BlockData:
- INCBIN "maps/RuinsofAlphOmanyteWordRoom.blk"
-
-RuinsofAlphAerodactylWordRoom_BlockData:
- INCBIN "maps/RuinsofAlphAerodactylWordRoom.blk"
-
-DragonShrine_BlockData:
- INCBIN "maps/DragonShrine.blk"
-
-BattleTower1F_BlockData:
- INCBIN "maps/BattleTower1F.blk"
-
-BattleTowerBattleRoom_BlockData:
- INCBIN "maps/BattleTowerBattleRoom.blk"
-
-GoldenrodPokeComCenter2FMobile_BlockData:
- INCBIN "maps/GoldenrodPokeComCenter2FMobile.blk"
-
-MobileTradeRoomMobile_BlockData:
- INCBIN "maps/MobileTradeRoomMobile.blk"
-
-MobileBattleRoom_BlockData:
- INCBIN "maps/MobileBattleRoom.blk"
-
-BattleTowerHallway_BlockData:
- INCBIN "maps/BattleTowerHallway.blk"
-
-BattleTowerElevator_BlockData:
- INCBIN "maps/BattleTowerElevator.blk"
-
-BattleTowerOutside_BlockData:
- INCBIN "maps/BattleTowerOutside.blk"
-
-BetaBlank_BlockData:
- INCBIN "maps/BetaBlank.blk"
-
-GoldenrodDeptStoreRoof_BlockData:
- INCBIN "maps/GoldenrodDeptStoreRoof.blk"
diff --git a/maps/map_headers.asm b/maps/map_headers.asm
index 95909baa8..d3724aa22 100644
--- a/maps/map_headers.asm
+++ b/maps/map_headers.asm
@@ -1,35 +1,51 @@
+map_header: macro
+;\1: map label
+;\2: tileset: a TILESET_* constant
+;\3: environment: TOWN, ROUTE, INDOOR, CAVE, ENVIRONMENT_5, GATE, or DUNGEON
+;\4: location: from constants/landmark_constants.asm
+;\5: music: a MUSIC_* constant
+;\6: phone service flag: 1 to prevent phone calls
+;\7: time of day: a PALETTE_* constant
+;\8: fishing group: a FISHGROUP_* constant
+\1_MapHeader:
+ db BANK(\1_SecondMapHeader), \2, \3
+ dw \1_SecondMapHeader
+ db \4, \5
+ dn \6, \7
+ db \8
+endm
+
MapGroupPointers::
; pointers to the first map header of each map group
- dw MapGroup1
- dw MapGroup2
- dw MapGroup3
- dw MapGroup4
- dw MapGroup5
- dw MapGroup6
- dw MapGroup7
- dw MapGroup8
- dw MapGroup9
- dw MapGroup10
- dw MapGroup11
- dw MapGroup12
- dw MapGroup13
- dw MapGroup14
- dw MapGroup15
- dw MapGroup16
- dw MapGroup17
- dw MapGroup18
- dw MapGroup19
- dw MapGroup20
- dw MapGroup21
- dw MapGroup22
- dw MapGroup23
- dw MapGroup24
- dw MapGroup25
- dw MapGroup26
-
-
-MapGroup1:
- map_header OlivinePokeCenter1F, TILESET_POKECENTER, INDOOR, OLIVINE_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ dw MapGroup_Olivine ; 1
+ dw MapGroup_Mahogany ; 2
+ dw MapGroup_Dungeons ; 3
+ dw MapGroup_Ecruteak ; 4
+ dw MapGroup_Blackthorn ; 5
+ dw MapGroup_Cinnabar ; 6
+ dw MapGroup_Cerulean ; 7
+ dw MapGroup_Azalea ; 8
+ dw MapGroup_LakeOfRage ; 9
+ dw MapGroup_Violet ; 10
+ dw MapGroup_Goldenrod ; 11
+ dw MapGroup_Vermilion ; 12
+ dw MapGroup_Pallet ; 13
+ dw MapGroup_Pewter ; 14
+ dw MapGroup_FastShip ; 15
+ dw MapGroup_Indigo ; 16
+ dw MapGroup_Fuchsia ; 17
+ dw MapGroup_Lavender ; 18
+ dw MapGroup_Silver ; 19
+ dw MapGroup_CableClub ; 20
+ dw MapGroup_Celadon ; 21
+ dw MapGroup_Cianwood ; 22
+ dw MapGroup_Viridian ; 23
+ dw MapGroup_NewBark ; 24
+ dw MapGroup_Saffron ; 25
+ dw MapGroup_Cherrygrove ; 26
+
+MapGroup_Olivine:
+ map_header OlivinePokecenter1F, TILESET_POKECENTER, INDOOR, OLIVINE_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header OlivineGym, TILESET_OLIVINE_GYM, INDOOR, OLIVINE_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header OlivineTimsHouse, TILESET_HOUSE_1, INDOOR, OLIVINE_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header OlivineHouseBeta, TILESET_HOUSE_1, INDOOR, OLIVINE_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
@@ -38,24 +54,24 @@ MapGroup1:
map_header OlivineCafe, TILESET_GAME_CORNER, INDOOR, OLIVINE_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header OlivineMart, TILESET_MART, INDOOR, OLIVINE_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route38EcruteakGate, TILESET_GATE, GATE, ROUTE_38, MUSIC_ROUTE_37, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route39Barn, TILESET_KURT_HOUSE, INDOOR, ROUTE_39, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route39Barn, TILESET_KURTS_HOUSE, INDOOR, ROUTE_39, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route39Farmhouse, TILESET_HOUSE_1, INDOOR, ROUTE_39, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route38, TILESET_JOHTO_1, ROUTE, ROUTE_38, MUSIC_ROUTE_37, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header Route39, TILESET_JOHTO_1, ROUTE, ROUTE_39, MUSIC_ROUTE_37, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header OlivineCity, TILESET_JOHTO_1, TOWN, OLIVINE_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_AUTO, FISHGROUP_SHORE
-MapGroup2:
+MapGroup_Mahogany:
map_header MahoganyRedGyaradosSpeechHouse, TILESET_HOUSE_1, INDOOR, MAHOGANY_TOWN, MUSIC_CHERRYGROVE_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header MahoganyGym, TILESET_GYM_1, INDOOR, MAHOGANY_TOWN, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header MahoganyPokeCenter1F, TILESET_POKECENTER, INDOOR, MAHOGANY_TOWN, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header MahoganyPokecenter1F, TILESET_POKECENTER, INDOOR, MAHOGANY_TOWN, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route42EcruteakGate, TILESET_GATE, GATE, ROUTE_42, MUSIC_LAKE_OF_RAGE, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route42, TILESET_JOHTO_1, ROUTE, ROUTE_42, MUSIC_LAKE_OF_RAGE, 0, PALETTE_AUTO, FISHGROUP_LAKE
map_header Route44, TILESET_JOHTO_1, ROUTE, ROUTE_44, MUSIC_LAKE_OF_RAGE, 0, PALETTE_AUTO, FISHGROUP_POND
map_header MahoganyTown, TILESET_JOHTO_1, TOWN, MAHOGANY_TOWN, MUSIC_CHERRYGROVE_CITY, 0, PALETTE_AUTO, FISHGROUP_SHORE
-MapGroup3:
+MapGroup_Dungeons:
map_header SproutTower1F, TILESET_SPROUT_TOWER, DUNGEON, SPROUT_TOWER, MUSIC_SPROUT_TOWER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header SproutTower2F, TILESET_SPROUT_TOWER, DUNGEON, SPROUT_TOWER, MUSIC_SPROUT_TOWER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header SproutTower3F, TILESET_SPROUT_TOWER, DUNGEON, SPROUT_TOWER, MUSIC_SPROUT_TOWER, 0, PALETTE_DAY, FISHGROUP_SHORE
@@ -72,26 +88,26 @@ MapGroup3:
map_header BurnedTowerB1F, TILESET_CAVE, CAVE, BURNED_TOWER, MUSIC_BURNED_TOWER, 1, PALETTE_NITE, FISHGROUP_SHORE
map_header NationalPark, TILESET_PARK, ROUTE, NATIONAL_PARK, MUSIC_NATIONAL_PARK, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header NationalParkBugContest, TILESET_PARK, ROUTE, NATIONAL_PARK, MUSIC_BUG_CATCHING_CONTEST, 0, PALETTE_AUTO, FISHGROUP_SHORE
- map_header RadioTower1F, TILESET_RADIO_TOWER, INDOOR, RADIO_TOWER, 1<<7 | MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RadioTower2F, TILESET_RADIO_TOWER, INDOOR, RADIO_TOWER, 1<<7 | MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RadioTower3F, TILESET_RADIO_TOWER, INDOOR, RADIO_TOWER, 1<<7 | MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RadioTower4F, TILESET_RADIO_TOWER, INDOOR, RADIO_TOWER, 1<<7 | MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RadioTower5F, TILESET_RADIO_TOWER, INDOOR, RADIO_TOWER, 1<<7 | MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphOutside, TILESET_JOHTO_1, ROUTE, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 0, PALETTE_AUTO, FISHGROUP_POND
- map_header RuinsofAlphHoOhChamber, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphKabutoChamber, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphOmanyteChamber, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphAerodactylChamber, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphInnerChamber, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_RUINS_OF_ALPH_INTERIOR, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphResearchCenter, TILESET_POWER_PLANT, INDOOR, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphHoOhItemRoom, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphKabutoItemRoom, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphOmanyteItemRoom, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphAerodactylItemRoom, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphHoOhWordRoom, TILESET_HO_OH_WORD_ROOM, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphKabutoWordRoom, TILESET_KABUTO_WORD_ROOM, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphOmanyteWordRoom, TILESET_OMANYTE_WORD_ROOM, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header RuinsofAlphAerodactylWordRoom, TILESET_AERODACTYL_WORD_ROOM, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RadioTower1F, TILESET_RADIO_TOWER, INDOOR, RADIO_TOWER, RADIO_TOWER_MUSIC | MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RadioTower2F, TILESET_RADIO_TOWER, INDOOR, RADIO_TOWER, RADIO_TOWER_MUSIC | MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RadioTower3F, TILESET_RADIO_TOWER, INDOOR, RADIO_TOWER, RADIO_TOWER_MUSIC | MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RadioTower4F, TILESET_RADIO_TOWER, INDOOR, RADIO_TOWER, RADIO_TOWER_MUSIC | MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RadioTower5F, TILESET_RADIO_TOWER, INDOOR, RADIO_TOWER, RADIO_TOWER_MUSIC | MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphOutside, TILESET_JOHTO_1, ROUTE, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 0, PALETTE_AUTO, FISHGROUP_POND
+ map_header RuinsOfAlphHoOhChamber, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphKabutoChamber, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphOmanyteChamber, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphAerodactylChamber, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphInnerChamber, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_RUINS_OF_ALPH_INTERIOR, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphResearchCenter, TILESET_POWER_PLANT, INDOOR, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphHoOhItemRoom, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphKabutoItemRoom, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphOmanyteItemRoom, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphAerodactylItemRoom, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphHoOhWordRoom, TILESET_HO_OH_WORD_ROOM, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphKabutoWordRoom, TILESET_KABUTO_WORD_ROOM, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphOmanyteWordRoom, TILESET_OMANYTE_WORD_ROOM, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RuinsOfAlphAerodactylWordRoom, TILESET_AERODACTYL_WORD_ROOM, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header UnionCave1F, TILESET_CAVE, CAVE, UNION_CAVE, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
map_header UnionCaveB1F, TILESET_CAVE, CAVE, UNION_CAVE, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
map_header UnionCaveB2F, TILESET_CAVE, CAVE, UNION_CAVE, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_SHORE
@@ -103,15 +119,15 @@ MapGroup3:
map_header OlivineLighthouse4F, TILESET_LIGHTHOUSE, DUNGEON, LIGHTHOUSE, MUSIC_LIGHTHOUSE, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header OlivineLighthouse5F, TILESET_LIGHTHOUSE, DUNGEON, LIGHTHOUSE, MUSIC_LIGHTHOUSE, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header OlivineLighthouse6F, TILESET_LIGHTHOUSE, DUNGEON, LIGHTHOUSE, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header MahoganyMart1F, TILESET_KURT_HOUSE, INDOOR, MAHOGANY_TOWN, MUSIC_MAHOGANY_MART, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header MahoganyMart1F, TILESET_KURTS_HOUSE, INDOOR, MAHOGANY_TOWN, MUSIC_MAHOGANY_MART, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header TeamRocketBaseB1F, TILESET_UNDERGROUND, DUNGEON, MAHOGANY_TOWN, MUSIC_ROCKET_HIDEOUT, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header TeamRocketBaseB2F, TILESET_POWER_PLANT, DUNGEON, MAHOGANY_TOWN, MUSIC_ROCKET_HIDEOUT, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header TeamRocketBaseB3F, TILESET_POWER_PLANT, DUNGEON, MAHOGANY_TOWN, MUSIC_ROCKET_HIDEOUT, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header IlexForest, TILESET_ILEX_FOREST, CAVE, ILEX_FOREST, MUSIC_UNION_CAVE, 0, PALETTE_NITE, FISHGROUP_POND
- map_header WarehouseEntrance, TILESET_GATE, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header UndergroundPathSwitchRoomEntrances, TILESET_GYM_1, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header GoldenrodUnderground, TILESET_GATE, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header GoldenrodUndergroundSwitchRoomEntrances, TILESET_GYM_1, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header GoldenrodDeptStoreB1F, TILESET_UNDERGROUND, DUNGEON, GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header UndergroundWarehouse, TILESET_UNDERGROUND, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header GoldenrodUndergroundWarehouse, TILESET_UNDERGROUND, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header MountMortar1FOutside, TILESET_WHIRL_ISLANDS, CAVE, MT_MORTAR, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
map_header MountMortar1FInside, TILESET_WHIRL_ISLANDS, CAVE, MT_MORTAR, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
map_header MountMortar2FInside, TILESET_WHIRL_ISLANDS, CAVE, MT_MORTAR, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
@@ -141,7 +157,7 @@ MapGroup3:
map_header TohjoFalls, TILESET_CAVE, CAVE, TOHJO_FALLS, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
map_header DiglettsCave, TILESET_CAVE, CAVE, DIGLETTS_CAVE, MUSIC_MT_MOON, 1, PALETTE_NITE, FISHGROUP_SHORE
map_header MountMoon, TILESET_CAVE, CAVE, MT_MOON, MUSIC_MT_MOON, 1, PALETTE_NITE, FISHGROUP_SHORE
- map_header Underground, TILESET_UNDERGROUND, GATE, UNDERGROUND, MUSIC_MT_MOON, 0, PALETTE_NITE, FISHGROUP_SHORE
+ map_header UndergroundPath, TILESET_UNDERGROUND, GATE, UNDERGROUND_PATH, MUSIC_MT_MOON, 0, PALETTE_NITE, FISHGROUP_SHORE
map_header RockTunnel1F, TILESET_WHIRL_ISLANDS, CAVE, ROCK_TUNNEL, MUSIC_MT_MOON, 1, PALETTE_DARK, FISHGROUP_SHORE
map_header RockTunnelB1F, TILESET_WHIRL_ISLANDS, CAVE, ROCK_TUNNEL, MUSIC_MT_MOON, 1, PALETTE_DARK, FISHGROUP_SHORE
map_header SafariZoneFuchsiaGateBeta, TILESET_GATE, INDOOR, FUCHSIA_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
@@ -149,34 +165,34 @@ MapGroup3:
map_header VictoryRoad, TILESET_CAVE, CAVE, VICTORY_ROAD, MUSIC_VICTORY_ROAD, 1, PALETTE_NITE, FISHGROUP_SHORE
-MapGroup4:
+MapGroup_Ecruteak:
map_header EcruteakHouse, TILESET_SPROUT_TOWER, INDOOR, ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header WiseTriosRoom, TILESET_KURT_HOUSE, INDOOR, ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header EcruteakPokeCenter1F, TILESET_POKECENTER, INDOOR, ECRUTEAK_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header EcruteakLugiaSpeechHouse, TILESET_KURT_HOUSE, INDOOR, ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header DanceTheatre, TILESET_KURT_HOUSE, INDOOR, ECRUTEAK_CITY, MUSIC_DANCING_HALL, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header WiseTriosRoom, TILESET_KURTS_HOUSE, INDOOR, ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
+ map_header EcruteakPokecenter1F, TILESET_POKECENTER, INDOOR, ECRUTEAK_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header EcruteakLugiaSpeechHouse, TILESET_KURTS_HOUSE, INDOOR, ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header DanceTheatre, TILESET_KURTS_HOUSE, INDOOR, ECRUTEAK_CITY, MUSIC_DANCING_HALL, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header EcruteakMart, TILESET_MART, INDOOR, ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header EcruteakGym, TILESET_SPROUT_TOWER, INDOOR, ECRUTEAK_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header EcruteakItemfinderHouse, TILESET_KURT_HOUSE, INDOOR, ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header EcruteakItemfinderHouse, TILESET_KURTS_HOUSE, INDOOR, ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header EcruteakCity, TILESET_JOHTO_1, TOWN, ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_AUTO, FISHGROUP_POND
-MapGroup5:
+MapGroup_Blackthorn:
map_header BlackthornGym1F, TILESET_GYM_1, INDOOR, BLACKTHORN_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header BlackthornGym2F, TILESET_GYM_1, INDOOR, BLACKTHORN_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header BlackthornDragonSpeechHouse, TILESET_HOUSE_1, INDOOR, BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header BlackthornEmysHouse, TILESET_HOUSE_1, INDOOR, BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header BlackthornMart, TILESET_MART, INDOOR, BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header BlackthornPokeCenter1F, TILESET_POKECENTER, INDOOR, BLACKTHORN_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header BlackthornPokecenter1F, TILESET_POKECENTER, INDOOR, BLACKTHORN_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header MoveDeletersHouse, TILESET_HOUSE_1, INDOOR, BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route45, TILESET_JOHTO_1, ROUTE, ROUTE_45, MUSIC_ROUTE_36, 0, PALETTE_AUTO, FISHGROUP_DRATINI_2
map_header Route46, TILESET_JOHTO_1, ROUTE, ROUTE_46, MUSIC_ROUTE_36, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header BlackthornCity, TILESET_JOHTO_1, TOWN, BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, 0, PALETTE_AUTO, FISHGROUP_POND
-MapGroup6:
- map_header CinnabarPokeCenter1F, TILESET_POKECENTER, INDOOR, CINNABAR_ISLAND, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header CinnabarPokeCenter2FBeta, TILESET_POKECENTER, INDOOR, CINNABAR_ISLAND, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+MapGroup_Cinnabar:
+ map_header CinnabarPokecenter1F, TILESET_POKECENTER, INDOOR, CINNABAR_ISLAND, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header CinnabarPokecenter2FBeta, TILESET_POKECENTER, INDOOR, CINNABAR_ISLAND, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route19FuchsiaGate, TILESET_GATE, GATE, ROUTE_19, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header SeafoamGym, TILESET_CAVE, INDOOR, SEAFOAM_ISLANDS, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header Route19, TILESET_KANTO, ROUTE, ROUTE_19, MUSIC_ROUTE_3, 0, PALETTE_AUTO, FISHGROUP_SHORE
@@ -185,16 +201,16 @@ MapGroup6:
map_header CinnabarIsland, TILESET_KANTO, TOWN, CINNABAR_ISLAND, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, FISHGROUP_OCEAN
-MapGroup7:
+MapGroup_Cerulean:
map_header CeruleanGymBadgeSpeechHouse, TILESET_HOUSE_1, INDOOR, CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CeruleanPoliceStation, TILESET_HOUSE_1, INDOOR, CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CeruleanTradeSpeechHouse, TILESET_HOUSE_1, INDOOR, CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header CeruleanPokeCenter1F, TILESET_POKECENTER, INDOOR, CERULEAN_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header CeruleanPokeCenter2FBeta, TILESET_POKECENTER, INDOOR, CERULEAN_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header CeruleanPokecenter1F, TILESET_POKECENTER, INDOOR, CERULEAN_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header CeruleanPokecenter2FBeta, TILESET_POKECENTER, INDOOR, CERULEAN_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CeruleanGym, TILESET_PORT, INDOOR, CERULEAN_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_NONE
map_header CeruleanMart, TILESET_MART, INDOOR, CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route10PokeCenter1F, TILESET_POKECENTER, INDOOR, ROUTE_10, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route10PokeCenter2FBeta, TILESET_POKECENTER, INDOOR, ROUTE_10, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route10Pokecenter1F, TILESET_POKECENTER, INDOOR, ROUTE_10, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route10Pokecenter2FBeta, TILESET_POKECENTER, INDOOR, ROUTE_10, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header PowerPlant, TILESET_POWER_PLANT, INDOOR, POWER_PLANT, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header BillsHouse, TILESET_HOUSE_1, INDOOR, ROUTE_25, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route4, TILESET_KANTO, ROUTE, ROUTE_4, MUSIC_ROUTE_3, 0, PALETTE_AUTO, FISHGROUP_NONE
@@ -205,26 +221,26 @@ MapGroup7:
map_header CeruleanCity, TILESET_KANTO, TOWN, CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, FISHGROUP_NONE
-MapGroup8:
- map_header AzaleaPokeCenter1F, TILESET_POKECENTER, INDOOR, AZALEA_TOWN, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+MapGroup_Azalea:
+ map_header AzaleaPokecenter1F, TILESET_POKECENTER, INDOOR, AZALEA_TOWN, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CharcoalKiln, TILESET_HOUSE_1, INDOOR, AZALEA_TOWN, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header AzaleaMart, TILESET_MART, INDOOR, AZALEA_TOWN, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header KurtsHouse, TILESET_KURT_HOUSE, INDOOR, AZALEA_TOWN, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header KurtsHouse, TILESET_KURTS_HOUSE, INDOOR, AZALEA_TOWN, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header AzaleaGym, TILESET_GYM_1, INDOOR, AZALEA_TOWN, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header Route33, TILESET_JOHTO_2, ROUTE, ROUTE_33, MUSIC_ROUTE_30, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header AzaleaTown, TILESET_JOHTO_2, TOWN, AZALEA_TOWN, MUSIC_AZALEA_TOWN, 0, PALETTE_AUTO, FISHGROUP_SHORE
-MapGroup9:
- map_header LakeofRageHiddenPowerHouse, TILESET_HOUSE_1, INDOOR, LAKE_OF_RAGE, MUSIC_LAKE_OF_RAGE, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header LakeofRageMagikarpHouse, TILESET_HOUSE_1, INDOOR, LAKE_OF_RAGE, MUSIC_LAKE_OF_RAGE, 0, PALETTE_DAY, FISHGROUP_SHORE
+MapGroup_LakeOfRage:
+ map_header LakeOfRageHiddenPowerHouse, TILESET_HOUSE_1, INDOOR, LAKE_OF_RAGE, MUSIC_LAKE_OF_RAGE, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header LakeOfRageMagikarpHouse, TILESET_HOUSE_1, INDOOR, LAKE_OF_RAGE, MUSIC_LAKE_OF_RAGE, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route43MahoganyGate, TILESET_GATE, GATE, ROUTE_43, MUSIC_LAKE_OF_RAGE, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route43Gate, TILESET_GATE, GATE, ROUTE_43, MUSIC_LAKE_OF_RAGE, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route43, TILESET_JOHTO_1, ROUTE, ROUTE_43, MUSIC_LAKE_OF_RAGE, 0, PALETTE_AUTO, FISHGROUP_POND
- map_header LakeofRage, TILESET_JOHTO_1, TOWN, LAKE_OF_RAGE, MUSIC_LAKE_OF_RAGE, 0, PALETTE_AUTO, FISHGROUP_GYARADOS
+ map_header LakeOfRage, TILESET_JOHTO_1, TOWN, LAKE_OF_RAGE, MUSIC_LAKE_OF_RAGE, 0, PALETTE_AUTO, FISHGROUP_GYARADOS
-MapGroup10:
+MapGroup_Violet:
map_header Route32, TILESET_JOHTO_1, ROUTE, ROUTE_32, MUSIC_ROUTE_30, 0, PALETTE_AUTO, FISHGROUP_QWILFISH
map_header Route35, TILESET_JOHTO_1, ROUTE, ROUTE_35, MUSIC_ROUTE_36, 0, PALETTE_AUTO, FISHGROUP_POND
map_header Route36, TILESET_JOHTO_1, ROUTE, ROUTE_36, MUSIC_ROUTE_36, 0, PALETTE_AUTO, FISHGROUP_SHORE
@@ -233,18 +249,18 @@ MapGroup10:
map_header VioletMart, TILESET_MART, INDOOR, VIOLET_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header VioletGym, TILESET_GYM_1, INDOOR, VIOLET_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header EarlsPokemonAcademy, TILESET_LAB, INDOOR, VIOLET_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header VioletNicknameSpeechHouse, TILESET_KURT_HOUSE, INDOOR, VIOLET_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header VioletPokeCenter1F, TILESET_POKECENTER, INDOOR, VIOLET_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header VioletOnixTradeHouse, TILESET_KURT_HOUSE, INDOOR, VIOLET_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route32RuinsofAlphGate, TILESET_GATE, GATE, ROUTE_32, MUSIC_ROUTE_30, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route32PokeCenter1F, TILESET_POKECENTER, INDOOR, ROUTE_32, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route35Goldenrodgate, TILESET_GATE, GATE, ROUTE_35, MUSIC_ROUTE_36, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route35NationalParkgate, TILESET_GATE, INDOOR, ROUTE_35, MUSIC_GOLDENROD_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route36RuinsofAlphgate, TILESET_GATE, GATE, ROUTE_36, MUSIC_ROUTE_36, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route36NationalParkgate, TILESET_GATE, INDOOR, ROUTE_36, MUSIC_GOLDENROD_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
-
-
-MapGroup11:
+ map_header VioletNicknameSpeechHouse, TILESET_KURTS_HOUSE, INDOOR, VIOLET_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header VioletPokecenter1F, TILESET_POKECENTER, INDOOR, VIOLET_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header VioletKylesHouse, TILESET_KURTS_HOUSE, INDOOR, VIOLET_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route32RuinsOfAlphGate, TILESET_GATE, GATE, ROUTE_32, MUSIC_ROUTE_30, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route32Pokecenter1F, TILESET_POKECENTER, INDOOR, ROUTE_32, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route35GoldenrodGate, TILESET_GATE, GATE, ROUTE_35, MUSIC_ROUTE_36, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route35NationalParkGate, TILESET_GATE, INDOOR, ROUTE_35, MUSIC_GOLDENROD_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route36RuinsOfAlphGate, TILESET_GATE, GATE, ROUTE_36, MUSIC_ROUTE_36, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route36NationalParkGate, TILESET_GATE, INDOOR, ROUTE_36, MUSIC_GOLDENROD_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+
+
+MapGroup_Goldenrod:
map_header Route34, TILESET_JOHTO_2, ROUTE, ROUTE_34, MUSIC_ROUTE_36, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header GoldenrodCity, TILESET_JOHTO_2, TOWN, GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header GoldenrodGym, TILESET_GYM_1, INDOOR, GOLDENROD_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
@@ -264,50 +280,50 @@ MapGroup11:
map_header GoldenrodDeptStoreElevator, TILESET_MART, INDOOR, GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header GoldenrodDeptStoreRoof, TILESET_MART, INDOOR, GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header GoldenrodGameCorner, TILESET_GAME_CORNER, INDOOR, GOLDENROD_CITY, MUSIC_GAME_CORNER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header GoldenrodPokeCenter1F, TILESET_POKECENTER, INDOOR, GOLDENROD_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header GoldenrodPokecenter1F, TILESET_POKECENTER, INDOOR, GOLDENROD_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header GoldenrodPokeComCenter2FMobile, TILESET_POKECOM_CENTER, INDOOR, GOLDENROD_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header IlexForestAzaleaGate, TILESET_GATE, GATE, ROUTE_34, MUSIC_ROUTE_36, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route34IlexForestGate, TILESET_GATE, GATE, ROUTE_34, MUSIC_ROUTE_36, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header DayCare, TILESET_HOUSE_1, INDOOR, ROUTE_34, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
-MapGroup12:
+MapGroup_Vermilion:
map_header Route6, TILESET_KANTO, ROUTE, ROUTE_6, MUSIC_ROUTE_3, 0, PALETTE_AUTO, FISHGROUP_POND
map_header Route11, TILESET_KANTO, ROUTE, ROUTE_11, MUSIC_ROUTE_12, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header VermilionCity, TILESET_KANTO, TOWN, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_AUTO, FISHGROUP_OCEAN
map_header VermilionHouseFishingSpeechHouse, TILESET_HOUSE_1, INDOOR, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header VermilionPokeCenter1F, TILESET_POKECENTER, INDOOR, VERMILION_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header VermilionPokeCenter2FBeta, TILESET_POKECENTER, INDOOR, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header VermilionPokecenter1F, TILESET_POKECENTER, INDOOR, VERMILION_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header VermilionPokecenter2FBeta, TILESET_POKECENTER, INDOOR, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header PokemonFanClub, TILESET_HOUSE_1, INDOOR, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header VermilionMagnetTrainSpeechHouse, TILESET_HOUSE_1, INDOOR, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header VermilionMart, TILESET_MART, INDOOR, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header VermilionHouseDiglettsCaveSpeechHouse, TILESET_HOUSE_1, INDOOR, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header VermilionGym, TILESET_GAME_CORNER, INDOOR, VERMILION_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header Route6SaffronGate, TILESET_GATE, GATE, ROUTE_6, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route6UndergroundEntrance, TILESET_GATE, GATE, ROUTE_6, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route6UndergroundPathEntrance, TILESET_GATE, GATE, ROUTE_6, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
-MapGroup13:
+MapGroup_Pallet:
map_header Route1, TILESET_KANTO, ROUTE, ROUTE_1, MUSIC_ROUTE_1, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header PalletTown, TILESET_KANTO, TOWN, PALLET_TOWN, MUSIC_PALLET_TOWN, 0, PALETTE_AUTO, FISHGROUP_OCEAN
- map_header RedsHouse1F, TILESET_KRISS_HOUSE, INDOOR, PALLET_TOWN, MUSIC_PALLET_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header RedsHouse2F, TILESET_KRISS_HOUSE, INDOOR, PALLET_TOWN, MUSIC_PALLET_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RedsHouse1F, TILESET_PLAYERS_HOUSE, INDOOR, PALLET_TOWN, MUSIC_PALLET_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header RedsHouse2F, TILESET_PLAYERS_HOUSE, INDOOR, PALLET_TOWN, MUSIC_PALLET_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header BluesHouse, TILESET_HOUSE_1, INDOOR, PALLET_TOWN, MUSIC_PALLET_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header OaksLab, TILESET_LAB, INDOOR, PALLET_TOWN, MUSIC_POKEMON_TALK, 0, PALETTE_DAY, FISHGROUP_SHORE
-MapGroup14:
+MapGroup_Pewter:
map_header Route3, TILESET_KANTO, ROUTE, ROUTE_3, MUSIC_ROUTE_3, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header PewterCity, TILESET_KANTO, TOWN, PEWTER_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header PewterNidoranSpeechHouse, TILESET_HOUSE_1, INDOOR, PEWTER_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header PewterGym, TILESET_SPROUT_TOWER, INDOOR, PEWTER_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header PewterMart, TILESET_MART, INDOOR, PEWTER_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header PewterPokeCenter1F, TILESET_POKECENTER, INDOOR, PEWTER_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header PewterPokeCenter2FBeta, TILESET_POKECENTER, INDOOR, PEWTER_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header PewterPokecenter1F, TILESET_POKECENTER, INDOOR, PEWTER_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header PewterPokecenter2FBeta, TILESET_POKECENTER, INDOOR, PEWTER_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header PewterSnoozeSpeechHouse, TILESET_HOUSE_1, INDOOR, PEWTER_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
-MapGroup15:
+MapGroup_FastShip:
map_header OlivinePort, TILESET_PORT, ROUTE, OLIVINE_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_AUTO, FISHGROUP_OCEAN
map_header VermilionPort, TILESET_PORT, ROUTE, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_AUTO, FISHGROUP_OCEAN
map_header FastShip1F, TILESET_LIGHTHOUSE, INDOOR, FAST_SHIP, MUSIC_SS_AQUA, 0, PALETTE_DAY, FISHGROUP_SHORE
@@ -318,13 +334,13 @@ MapGroup15:
map_header OlivinePortPassage, TILESET_UNDERGROUND, INDOOR, OLIVINE_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header VermilionPortPassage, TILESET_UNDERGROUND, INDOOR, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header MountMoonSquare, TILESET_KANTO, ROUTE, MT_MOON, MUSIC_MT_MOON_SQUARE, 0, PALETTE_AUTO, FISHGROUP_SHORE
- map_header MountMoonGiftShop, TILESET_KURT_HOUSE, INDOOR, MT_MOON, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header MountMoonGiftShop, TILESET_KURTS_HOUSE, INDOOR, MT_MOON, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header TinTowerRoof, TILESET_SPROUT_TOWER, ROUTE, TIN_TOWER, MUSIC_TIN_TOWER, 0, PALETTE_AUTO, FISHGROUP_SHORE
-MapGroup16:
+MapGroup_Indigo:
map_header Route23, TILESET_KANTO, TOWN, ROUTE_23, MUSIC_INDIGO_PLATEAU, 0, PALETTE_AUTO, FISHGROUP_SHORE
- map_header IndigoPlateauPokeCenter1F, TILESET_POKECENTER, INDOOR, INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header IndigoPlateauPokecenter1F, TILESET_POKECENTER, INDOOR, INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header WillsRoom, TILESET_GYM_1, INDOOR, INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header KogasRoom, TILESET_GYM_1, INDOOR, INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header BrunosRoom, TILESET_GYM_1, INDOOR, INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, 1, PALETTE_DAY, FISHGROUP_SHORE
@@ -333,7 +349,7 @@ MapGroup16:
map_header HallOfFame, TILESET_ICE_PATH, INDOOR, INDIGO_PLATEAU, MUSIC_NEW_BARK_TOWN, 1, PALETTE_DAY, FISHGROUP_SHORE
-MapGroup17:
+MapGroup_Fuchsia:
map_header Route13, TILESET_KANTO, ROUTE, ROUTE_13, MUSIC_ROUTE_12, 0, PALETTE_AUTO, FISHGROUP_QWILFISH_NO_SWARM
map_header Route14, TILESET_KANTO, ROUTE, ROUTE_14, MUSIC_ROUTE_12, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header Route15, TILESET_KANTO, ROUTE, ROUTE_15, MUSIC_ROUTE_12, 0, PALETTE_AUTO, FISHGROUP_SHORE
@@ -343,19 +359,19 @@ MapGroup17:
map_header SafariZoneMainOffice, TILESET_GAME_CORNER, INDOOR, FUCHSIA_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header FuchsiaGym, TILESET_LAB, INDOOR, FUCHSIA_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header FuchsiaBillSpeechHouse, TILESET_HOUSE_1, INDOOR, FUCHSIA_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header FuchsiaPokeCenter1F, TILESET_POKECENTER, INDOOR, FUCHSIA_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header FuchsiaPokeCenter2FBeta, TILESET_POKECENTER, INDOOR, FUCHSIA_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header FuchsiaPokecenter1F, TILESET_POKECENTER, INDOOR, FUCHSIA_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header FuchsiaPokecenter2FBeta, TILESET_POKECENTER, INDOOR, FUCHSIA_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header SafariZoneWardensHome, TILESET_HOUSE_1, INDOOR, FUCHSIA_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route15FuchsiaGate, TILESET_GATE, GATE, ROUTE_15, MUSIC_ROUTE_12, 0, PALETTE_DAY, FISHGROUP_SHORE
-MapGroup18:
+MapGroup_Lavender:
map_header Route8, TILESET_KANTO, ROUTE, ROUTE_8, MUSIC_ROUTE_3, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header Route12, TILESET_KANTO, ROUTE, ROUTE_12, MUSIC_ROUTE_12, 0, PALETTE_AUTO, FISHGROUP_QWILFISH_NO_SWARM
map_header Route10South, TILESET_KANTO, ROUTE, ROUTE_10, MUSIC_ROUTE_3, 0, PALETTE_AUTO, FISHGROUP_LAKE
map_header LavenderTown, TILESET_KANTO, TOWN, LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, 0, PALETTE_AUTO, FISHGROUP_SHORE
- map_header LavenderPokeCenter1F, TILESET_POKECENTER, INDOOR, LAVENDER_TOWN, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header LavenderPokeCenter2FBeta, TILESET_POKECENTER, INDOOR, LAVENDER_TOWN, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header LavenderPokecenter1F, TILESET_POKECENTER, INDOOR, LAVENDER_TOWN, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header LavenderPokecenter2FBeta, TILESET_POKECENTER, INDOOR, LAVENDER_TOWN, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header MrFujisHouse, TILESET_HOUSE_1, INDOOR, LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header LavenderTownSpeechHouse, TILESET_HOUSE_1, INDOOR, LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header LavenderNameRater, TILESET_HOUSE_1, INDOOR, LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
@@ -366,15 +382,15 @@ MapGroup18:
map_header Route12SuperRodHouse, TILESET_HOUSE_1, INDOOR, ROUTE_12, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
-MapGroup19:
+MapGroup_Silver :
map_header Route28, TILESET_KANTO, ROUTE, ROUTE_28, MUSIC_INDIGO_PLATEAU, 0, PALETTE_AUTO, FISHGROUP_POND
map_header SilverCaveOutside, TILESET_KANTO, TOWN, SILVER_CAVE, MUSIC_INDIGO_PLATEAU, 0, PALETTE_AUTO, FISHGROUP_POND
- map_header SilverCavePokeCenter1F, TILESET_POKECENTER, INDOOR, SILVER_CAVE, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header SilverCavePokecenter1F, TILESET_POKECENTER, INDOOR, SILVER_CAVE, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route28FamousSpeechHouse, TILESET_HOUSE_1, INDOOR, ROUTE_28, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
-MapGroup20:
- map_header PokeCenter2F, TILESET_POKECENTER, INDOOR, SPECIAL_MAP, MUSIC_POKEMON_CENTER, 1, PALETTE_DAY, FISHGROUP_SHORE
+MapGroup_CableClub:
+ map_header Pokecenter2F, TILESET_POKECENTER, INDOOR, SPECIAL_MAP, MUSIC_POKEMON_CENTER, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header TradeCenter, TILESET_GATE, INDOOR, SPECIAL_MAP, MUSIC_CHERRYGROVE_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header Colosseum, TILESET_GATE, INDOOR, SPECIAL_MAP, MUSIC_CHERRYGROVE_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header TimeCapsule, TILESET_GATE, INDOOR, SPECIAL_MAP, MUSIC_CHERRYGROVE_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
@@ -382,7 +398,7 @@ MapGroup20:
map_header MobileBattleRoom, TILESET_CELADON_MANSION, INDOOR, SPECIAL_MAP, MUSIC_CHERRYGROVE_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
-MapGroup21:
+MapGroup_Celadon:
map_header Route7, TILESET_KANTO, ROUTE, ROUTE_7, MUSIC_ROUTE_3, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header Route16, TILESET_KANTO, ROUTE, ROUTE_16, MUSIC_ROUTE_3, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header Route17, TILESET_KANTO, ROUTE, ROUTE_17, MUSIC_ROUTE_3, 0, PALETTE_AUTO, FISHGROUP_NONE
@@ -399,8 +415,8 @@ MapGroup21:
map_header CeladonMansion3F, TILESET_CELADON_MANSION, INDOOR, CELADON_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CeladonMansionRoof, TILESET_CELADON_MANSION, INDOOR, CELADON_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CeladonMansionRoofHouse, TILESET_HOUSE_1, INDOOR, CELADON_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header CeladonPokeCenter1F, TILESET_POKECENTER, INDOOR, CELADON_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header CeladonPokeCenter2FBeta, TILESET_POKECENTER, INDOOR, CELADON_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header CeladonPokecenter1F, TILESET_POKECENTER, INDOOR, CELADON_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header CeladonPokecenter2FBeta, TILESET_POKECENTER, INDOOR, CELADON_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CeladonGameCorner, TILESET_GAME_CORNER, INDOOR, CELADON_CITY, MUSIC_GAME_CORNER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CeladonGameCornerPrizeRoom, TILESET_GAME_CORNER, INDOOR, CELADON_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CeladonGym, TILESET_TRAIN_STATION, INDOOR, CELADON_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
@@ -411,13 +427,13 @@ MapGroup21:
map_header Route1718Gate, TILESET_GATE, GATE, ROUTE_17, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
-MapGroup22:
+MapGroup_Cianwood:
map_header Route40, TILESET_JOHTO_1, ROUTE, ROUTE_40, MUSIC_ROUTE_36, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header Route41, TILESET_JOHTO_1, ROUTE, ROUTE_41, MUSIC_ROUTE_36, 0, PALETTE_AUTO, FISHGROUP_OCEAN
map_header CianwoodCity, TILESET_JOHTO_1, TOWN, CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header ManiasHouse, TILESET_HOUSE_1, INDOOR, CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CianwoodGym, TILESET_SPROUT_TOWER, INDOOR, CIANWOOD_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
- map_header CianwoodPokeCenter1F, TILESET_POKECENTER, INDOOR, CIANWOOD_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header CianwoodPokecenter1F, TILESET_POKECENTER, INDOOR, CIANWOOD_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CianwoodPharmacy, TILESET_HOUSE_1, INDOOR, CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CianwoodCityPhotoStudio, TILESET_HOUSE_1, INDOOR, CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CianwoodLugiaSpeechHouse, TILESET_HOUSE_1, INDOOR, CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
@@ -430,7 +446,7 @@ MapGroup22:
map_header BattleTowerOutside, TILESET_BATTLE_TOWER_OUTSIDE, ROUTE, BATTLE_TOWER, MUSIC_BATTLE_TOWER_THEME, 0, PALETTE_AUTO, FISHGROUP_SHORE
-MapGroup23:
+MapGroup_Viridian:
map_header Route2, TILESET_KANTO, ROUTE, ROUTE_2, MUSIC_ROUTE_2, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header Route22, TILESET_KANTO, ROUTE, ROUTE_22, MUSIC_ROUTE_3, 0, PALETTE_AUTO, FISHGROUP_POND
map_header ViridianCity, TILESET_KANTO, TOWN, VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, FISHGROUP_POND
@@ -439,53 +455,53 @@ MapGroup23:
map_header TrainerHouse1F, TILESET_HOUSE_1, INDOOR, VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header TrainerHouseB1F, TILESET_POWER_PLANT, INDOOR, VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header ViridianMart, TILESET_MART, INDOOR, VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header ViridianPokeCenter1F, TILESET_POKECENTER, INDOOR, VIRIDIAN_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header ViridianPokeCenter2FBeta, TILESET_POKECENTER, INDOOR, VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header ViridianPokecenter1F, TILESET_POKECENTER, INDOOR, VIRIDIAN_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header ViridianPokecenter2FBeta, TILESET_POKECENTER, INDOOR, VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route2NuggetSpeechHouse, TILESET_HOUSE_1, INDOOR, ROUTE_2, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route2Gate, TILESET_GATE, GATE, ROUTE_2, MUSIC_ROUTE_2, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header VictoryRoadGate, TILESET_GATE, GATE, ROUTE_26, MUSIC_INDIGO_PLATEAU, 0, PALETTE_DAY, FISHGROUP_SHORE
-MapGroup24:
+MapGroup_NewBark:
map_header Route26, TILESET_JOHTO_1, ROUTE, ROUTE_26, MUSIC_ROUTE_26, 0, PALETTE_AUTO, FISHGROUP_OCEAN
map_header Route27, TILESET_JOHTO_1, ROUTE, ROUTE_27, MUSIC_ROUTE_26, 0, PALETTE_AUTO, FISHGROUP_OCEAN
map_header Route29, TILESET_JOHTO_1, ROUTE, ROUTE_29, MUSIC_ROUTE_29, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header NewBarkTown, TILESET_JOHTO_1, TOWN, NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, 0, PALETTE_AUTO, FISHGROUP_OCEAN
map_header ElmsLab, TILESET_LAB, INDOOR, NEW_BARK_TOWN, MUSIC_PROF_ELM, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header KrissHouse1F, TILESET_KRISS_HOUSE, INDOOR, NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header KrissHouse2F, TILESET_KRISS_HOUSE_2F, INDOOR, NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header KrissHouse1F, TILESET_PLAYERS_HOUSE, INDOOR, NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header KrissHouse2F, TILESET_PLAYERS_HOUSE_2F, INDOOR, NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header KrissNeighborsHouse, TILESET_HOUSE_1, INDOOR, NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header ElmsHouse, TILESET_KRISS_HOUSE, INDOOR, NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header ElmsHouse, TILESET_PLAYERS_HOUSE, INDOOR, NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route26HealSpeechHouse, TILESET_HOUSE_1, INDOOR, ROUTE_26, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route26DayofWeekSiblingsHouse, TILESET_HOUSE_1, INDOOR, ROUTE_26, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route27SandstormHouse, TILESET_HOUSE_1, INDOOR, ROUTE_27, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route2946Gate, TILESET_GATE, GATE, ROUTE_29, MUSIC_ROUTE_29, 0, PALETTE_DAY, FISHGROUP_SHORE
-MapGroup25:
+MapGroup_Saffron:
map_header Route5, TILESET_KANTO, ROUTE, ROUTE_5, MUSIC_ROUTE_3, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header SaffronCity, TILESET_KANTO, TOWN, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header FightingDojo, TILESET_TRAIN_STATION, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header SaffronGym, TILESET_UNDERGROUND, INDOOR, SAFFRON_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header SaffronMart, TILESET_MART, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header SaffronPokeCenter1F, TILESET_POKECENTER, INDOOR, SAFFRON_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header SaffronPokeCenter2FBeta, TILESET_POKECENTER, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header SaffronPokecenter1F, TILESET_POKECENTER, INDOOR, SAFFRON_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header SaffronPokecenter2FBeta, TILESET_POKECENTER, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header MrPsychicsHouse, TILESET_HOUSE_1, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header SaffronTrainStation, TILESET_TRAIN_STATION, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header SilphCo1F, TILESET_POWER_PLANT, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header CopycatsHouse1F, TILESET_KRISS_HOUSE, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header CopycatsHouse2F, TILESET_KRISS_HOUSE, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header Route5UndergroundEntrance, TILESET_GATE, GATE, ROUTE_5, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header CopycatsHouse1F, TILESET_PLAYERS_HOUSE, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header CopycatsHouse2F, TILESET_PLAYERS_HOUSE, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header Route5UndergroundPathEntrance, TILESET_GATE, GATE, ROUTE_5, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route5SaffronCityGate, TILESET_GATE, GATE, ROUTE_5, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route5CleanseTagSpeechHouse, TILESET_HOUSE_1, INDOOR, ROUTE_5, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
-MapGroup26:
+MapGroup_Cherrygrove:
map_header Route30, TILESET_JOHTO_1, ROUTE, ROUTE_30, MUSIC_ROUTE_30, 0, PALETTE_AUTO, FISHGROUP_POND
map_header Route31, TILESET_JOHTO_1, ROUTE, ROUTE_31, MUSIC_ROUTE_30, 0, PALETTE_AUTO, FISHGROUP_POND
map_header CherrygroveCity, TILESET_JOHTO_1, TOWN, CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, 0, PALETTE_AUTO, FISHGROUP_SHORE
map_header CherrygroveMart, TILESET_MART, INDOOR, CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
- map_header CherrygrovePokeCenter1F, TILESET_POKECENTER, INDOOR, CHERRYGROVE_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
+ map_header CherrygrovePokecenter1F, TILESET_POKECENTER, INDOOR, CHERRYGROVE_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CherrygroveGymSpeechHouse, TILESET_HOUSE_1, INDOOR, CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header GuideGentsHouse, TILESET_HOUSE_1, INDOOR, CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CherrygroveEvolutionSpeechHouse, TILESET_HOUSE_1, INDOOR, CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
diff --git a/maps/second_map_headers.asm b/maps/second_map_headers.asm
index 1bf8b80a2..7503e72ae 100644
--- a/maps/second_map_headers.asm
+++ b/maps/second_map_headers.asm
@@ -1,3 +1,90 @@
+map_header_2: macro
+;\1: map label
+;\2: map id
+;\3: border block
+;\4: connections: combo of NORTH, SOUTH, WEST, and/or EAST, or 0 for none
+\1_SecondMapHeader::
+ db \3
+ db \2_HEIGHT, \2_WIDTH
+ db BANK(\1_BlockData)
+ dw \1_BlockData
+ db BANK(\1_MapScriptHeader)
+ dw \1_MapScriptHeader
+ dw \1_MapEventHeader
+ db \4
+endm
+
+connection: macro
+if "\1" == "north"
+;\2: map id
+;\3: map label (eventually will be rolled into map id)
+;\4: x
+;\5: offset?
+;\6: strip length
+;\7: this map id
+ map \2
+ dw \3_BlockData + \2_WIDTH * (\2_HEIGHT - 3) + \5
+ dw OverworldMap + \4 + 3
+ db \6
+ db \2_WIDTH
+ db \2_HEIGHT * 2 - 1
+ db (\4 - \5) * -2
+ dw OverworldMap + \2_HEIGHT * (\2_WIDTH + 6) + 1
+endc
+
+if "\1" == "south"
+;\2: map id
+;\3: map label (eventually will be rolled into map id)
+;\4: x
+;\5: offset?
+;\6: strip length
+;\7: this map id
+ map \2
+ dw \3_BlockData + \5
+ dw OverworldMap + (\7_HEIGHT + 3) * (\7_WIDTH + 6) + \4 + 3
+ db \6
+ db \2_WIDTH
+ db 0
+ db (\4 - \5) * -2
+ dw OverworldMap + \2_WIDTH + 7
+endc
+
+if "\1" == "west"
+;\2: map id
+;\3: map label (eventually will be rolled into map id)
+;\4: y
+;\5: offset?
+;\6: strip length
+;\7: this map id
+ map \2
+ dw \3_BlockData + (\2_WIDTH * \5) + \2_WIDTH - 3
+ dw OverworldMap + (\7_WIDTH + 6) * (\4 + 3)
+ db \6
+ db \2_WIDTH
+ db (\4 - \5) * -2
+ db \2_WIDTH * 2 - 1
+ dw OverworldMap + \2_WIDTH * 2 + 6
+endc
+
+if "\1" == "east"
+;\2: map id
+;\3: map label (eventually will be rolled into map id)
+;\4: y
+;\5: offset?
+;\6: strip length
+;\7: this map id
+ map \2
+ dw \3_BlockData + (\2_WIDTH * \5)
+ dw OverworldMap + (\7_WIDTH + 6) * (\4 + 3 + 1) - 3
+ db \6
+ db \2_WIDTH
+ db (\4 - \5) * -2
+ db 0
+ dw OverworldMap + \2_WIDTH + 7
+endc
+endm
+
+
map_header_2 NewBarkTown, NEW_BARK_TOWN, $5, WEST | EAST
connection west, ROUTE_29, Route29, 0, 0, 9, NEW_BARK_TOWN
connection east, ROUTE_27, Route27, 0, 0, 9, NEW_BARK_TOWN
@@ -36,7 +123,7 @@
connection west, ROUTE_42, Route42, 0, 0, 9, MAHOGANY_TOWN
connection east, ROUTE_44, Route44, 0, 0, 9, MAHOGANY_TOWN
- map_header_2 LakeofRage, LAKE_OF_RAGE, $5, SOUTH
+ map_header_2 LakeOfRage, LAKE_OF_RAGE, $5, SOUTH
connection south, ROUTE_43, Route43, 5, 0, 10, LAKE_OF_RAGE
map_header_2 BlackthornCity, BLACKTHORN_CITY, $71, SOUTH | WEST
@@ -115,7 +202,7 @@
connection east, MAHOGANY_TOWN, MahoganyTown, 0, 0, 9, ROUTE_42
map_header_2 Route43, ROUTE_43, $5, NORTH | SOUTH
- connection north, LAKE_OF_RAGE, LakeofRage, -3, 2, 16, ROUTE_43
+ connection north, LAKE_OF_RAGE, LakeOfRage, -3, 2, 16, ROUTE_43
connection south, MAHOGANY_TOWN, MahoganyTown, 0, 0, 10, ROUTE_43
map_header_2 Route44, ROUTE_44, $71, WEST | EAST
@@ -298,21 +385,21 @@
map_header_2 RadioTower3F, RADIO_TOWER_3F, $0, 0
map_header_2 RadioTower4F, RADIO_TOWER_4F, $0, 0
map_header_2 RadioTower5F, RADIO_TOWER_5F, $0, 0
- map_header_2 RuinsofAlphOutside, RUINS_OF_ALPH_OUTSIDE, $5, 0
- map_header_2 RuinsofAlphHoOhChamber, RUINS_OF_ALPH_HO_OH_CHAMBER, $0, 0
- map_header_2 RuinsofAlphKabutoChamber, RUINS_OF_ALPH_KABUTO_CHAMBER, $0, 0
- map_header_2 RuinsofAlphOmanyteChamber, RUINS_OF_ALPH_OMANYTE_CHAMBER, $0, 0
- map_header_2 RuinsofAlphAerodactylChamber, RUINS_OF_ALPH_AERODACTYL_CHAMBER, $0, 0
- map_header_2 RuinsofAlphInnerChamber, RUINS_OF_ALPH_INNER_CHAMBER, $0, 0
- map_header_2 RuinsofAlphResearchCenter, RUINS_OF_ALPH_RESEARCH_CENTER, $0, 0
- map_header_2 RuinsofAlphHoOhItemRoom, RUINS_OF_ALPH_HO_OH_ITEM_ROOM, $0, 0
- map_header_2 RuinsofAlphKabutoItemRoom, RUINS_OF_ALPH_KABUTO_ITEM_ROOM, $0, 0
- map_header_2 RuinsofAlphOmanyteItemRoom, RUINS_OF_ALPH_OMANYTE_ITEM_ROOM, $0, 0
- map_header_2 RuinsofAlphAerodactylItemRoom, RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM, $0, 0
- map_header_2 RuinsofAlphHoOhWordRoom, RUINS_OF_ALPH_HO_OH_WORD_ROOM, $0, 0
- map_header_2 RuinsofAlphKabutoWordRoom, RUINS_OF_ALPH_KABUTO_WORD_ROOM, $0, 0
- map_header_2 RuinsofAlphOmanyteWordRoom, RUINS_OF_ALPH_OMANYTE_WORD_ROOM, $0, 0
- map_header_2 RuinsofAlphAerodactylWordRoom, RUINS_OF_ALPH_AERODACTYL_WORD_ROOM, $0, 0
+ map_header_2 RuinsOfAlphOutside, RUINS_OF_ALPH_OUTSIDE, $5, 0
+ map_header_2 RuinsOfAlphHoOhChamber, RUINS_OF_ALPH_HO_OH_CHAMBER, $0, 0
+ map_header_2 RuinsOfAlphKabutoChamber, RUINS_OF_ALPH_KABUTO_CHAMBER, $0, 0
+ map_header_2 RuinsOfAlphOmanyteChamber, RUINS_OF_ALPH_OMANYTE_CHAMBER, $0, 0
+ map_header_2 RuinsOfAlphAerodactylChamber, RUINS_OF_ALPH_AERODACTYL_CHAMBER, $0, 0
+ map_header_2 RuinsOfAlphInnerChamber, RUINS_OF_ALPH_INNER_CHAMBER, $0, 0
+ map_header_2 RuinsOfAlphResearchCenter, RUINS_OF_ALPH_RESEARCH_CENTER, $0, 0
+ map_header_2 RuinsOfAlphHoOhItemRoom, RUINS_OF_ALPH_HO_OH_ITEM_ROOM, $0, 0
+ map_header_2 RuinsOfAlphKabutoItemRoom, RUINS_OF_ALPH_KABUTO_ITEM_ROOM, $0, 0
+ map_header_2 RuinsOfAlphOmanyteItemRoom, RUINS_OF_ALPH_OMANYTE_ITEM_ROOM, $0, 0
+ map_header_2 RuinsOfAlphAerodactylItemRoom, RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM, $0, 0
+ map_header_2 RuinsOfAlphHoOhWordRoom, RUINS_OF_ALPH_HO_OH_WORD_ROOM, $0, 0
+ map_header_2 RuinsOfAlphKabutoWordRoom, RUINS_OF_ALPH_KABUTO_WORD_ROOM, $0, 0
+ map_header_2 RuinsOfAlphOmanyteWordRoom, RUINS_OF_ALPH_OMANYTE_WORD_ROOM, $0, 0
+ map_header_2 RuinsOfAlphAerodactylWordRoom, RUINS_OF_ALPH_AERODACTYL_WORD_ROOM, $0, 0
map_header_2 UnionCave1F, UNION_CAVE_1F, $9, 0
map_header_2 UnionCaveB1F, UNION_CAVE_B1F, $9, 0
map_header_2 UnionCaveB2F, UNION_CAVE_B2F, $9, 0
@@ -329,10 +416,10 @@
map_header_2 TeamRocketBaseB2F, TEAM_ROCKET_BASE_B2F, $0, 0
map_header_2 TeamRocketBaseB3F, TEAM_ROCKET_BASE_B3F, $0, 0
map_header_2 IlexForest, ILEX_FOREST, $5, 0
- map_header_2 WarehouseEntrance, WAREHOUSE_ENTRANCE, $0, 0
- map_header_2 UndergroundPathSwitchRoomEntrances, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES, $0, 0
+ map_header_2 GoldenrodUnderground, GOLDENROD_UNDERGROUND, $0, 0
+ map_header_2 GoldenrodUndergroundSwitchRoomEntrances, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, $0, 0
map_header_2 GoldenrodDeptStoreB1F, GOLDENROD_DEPT_STORE_B1F, $0, 0
- map_header_2 UndergroundWarehouse, UNDERGROUND_WAREHOUSE, $0, 0
+ map_header_2 GoldenrodUndergroundWarehouse, GOLDENROD_UNDERGROUND_WAREHOUSE, $0, 0
map_header_2 MountMortar1FOutside, MOUNT_MORTAR_1F_OUTSIDE, $9, 0
map_header_2 MountMortar1FInside, MOUNT_MORTAR_1F_INSIDE, $9, 0
map_header_2 MountMortar2FInside, MOUNT_MORTAR_2F_INSIDE, $9, 0
@@ -360,7 +447,7 @@
map_header_2 DragonsDenB1F, DRAGONS_DEN_B1F, $71, 0
map_header_2 DragonShrine, DRAGON_SHRINE, $0, 0
map_header_2 TohjoFalls, TOHJO_FALLS, $9, 0
- map_header_2 OlivinePokeCenter1F, OLIVINE_POKECENTER_1F, $0, 0
+ map_header_2 OlivinePokecenter1F, OLIVINE_POKECENTER_1F, $0, 0
map_header_2 OlivineGym, OLIVINE_GYM, $0, 0
map_header_2 OlivineTimsHouse, OLIVINE_TIMS_HOUSE, $0, 0
map_header_2 OlivineHouseBeta, OLIVINE_HOUSE_BETA, $0, 0
@@ -373,11 +460,11 @@
map_header_2 Route39Farmhouse, ROUTE_39_FARMHOUSE, $0, 0
map_header_2 MahoganyRedGyaradosSpeechHouse, MAHOGANY_RED_GYARADOS_SPEECH_HOUSE, $0, 0
map_header_2 MahoganyGym, MAHOGANY_GYM, $0, 0
- map_header_2 MahoganyPokeCenter1F, MAHOGANY_POKECENTER_1F, $0, 0
+ map_header_2 MahoganyPokecenter1F, MAHOGANY_POKECENTER_1F, $0, 0
map_header_2 Route42EcruteakGate, ROUTE_42_ECRUTEAK_GATE, $0, 0
map_header_2 DiglettsCave, DIGLETTS_CAVE, $9, 0
map_header_2 MountMoon, MOUNT_MOON, $9, 0
- map_header_2 Underground, UNDERGROUND, $0, 0
+ map_header_2 UndergroundPath, UNDERGROUND_PATH, $0, 0
map_header_2 RockTunnel1F, ROCK_TUNNEL_1F, $9, 0
map_header_2 RockTunnelB1F, ROCK_TUNNEL_B1F, $9, 0
map_header_2 SafariZoneFuchsiaGateBeta, SAFARI_ZONE_FUCHSIA_GATE_BETA, $0, 0
@@ -385,7 +472,7 @@
map_header_2 VictoryRoad, VICTORY_ROAD, $1d, 0
map_header_2 EcruteakHouse, ECRUTEAK_HOUSE, $0, 0
map_header_2 WiseTriosRoom, WISE_TRIOS_ROOM, $0, 0
- map_header_2 EcruteakPokeCenter1F, ECRUTEAK_POKECENTER_1F, $0, 0
+ map_header_2 EcruteakPokecenter1F, ECRUTEAK_POKECENTER_1F, $0, 0
map_header_2 EcruteakLugiaSpeechHouse, ECRUTEAK_LUGIA_SPEECH_HOUSE, $0, 0
map_header_2 DanceTheatre, DANCE_THEATRE, $0, 0
map_header_2 EcruteakMart, ECRUTEAK_MART, $0, 0
@@ -396,44 +483,44 @@
map_header_2 BlackthornDragonSpeechHouse, BLACKTHORN_DRAGON_SPEECH_HOUSE, $0, 0
map_header_2 BlackthornEmysHouse, BLACKTHORN_EMYS_HOUSE, $0, 0
map_header_2 BlackthornMart, BLACKTHORN_MART, $0, 0
- map_header_2 BlackthornPokeCenter1F, BLACKTHORN_POKECENTER_1F, $0, 0
+ map_header_2 BlackthornPokecenter1F, BLACKTHORN_POKECENTER_1F, $0, 0
map_header_2 MoveDeletersHouse, MOVE_DELETERS_HOUSE, $0, 0
- map_header_2 CinnabarPokeCenter1F, CINNABAR_POKECENTER_1F, $0, 0
- map_header_2 CinnabarPokeCenter2FBeta, CINNABAR_POKECENTER_2F_BETA, $0, 0
+ map_header_2 CinnabarPokecenter1F, CINNABAR_POKECENTER_1F, $0, 0
+ map_header_2 CinnabarPokecenter2FBeta, CINNABAR_POKECENTER_2F_BETA, $0, 0
map_header_2 Route19FuchsiaGate, ROUTE_19___FUCHSIA_GATE, $0, 0
map_header_2 SeafoamGym, SEAFOAM_GYM, $9, 0
map_header_2 CeruleanGymBadgeSpeechHouse, CERULEAN_GYM_BADGE_SPEECH_HOUSE, $0, 0
map_header_2 CeruleanPoliceStation, CERULEAN_POLICE_STATION, $0, 0
map_header_2 CeruleanTradeSpeechHouse, CERULEAN_TRADE_SPEECH_HOUSE, $0, 0
- map_header_2 CeruleanPokeCenter1F, CERULEAN_POKECENTER_1F, $0, 0
- map_header_2 CeruleanPokeCenter2FBeta, CERULEAN_POKECENTER_2F_BETA, $0, 0
+ map_header_2 CeruleanPokecenter1F, CERULEAN_POKECENTER_1F, $0, 0
+ map_header_2 CeruleanPokecenter2FBeta, CERULEAN_POKECENTER_2F_BETA, $0, 0
map_header_2 CeruleanGym, CERULEAN_GYM, $0, 0
map_header_2 CeruleanMart, CERULEAN_MART, $0, 0
- map_header_2 Route10PokeCenter1F, ROUTE_10_POKECENTER_1F, $0, 0
- map_header_2 Route10PokeCenter2FBeta, ROUTE_10_POKECENTER_2F_BETA, $0, 0
+ map_header_2 Route10Pokecenter1F, ROUTE_10_POKECENTER_1F, $0, 0
+ map_header_2 Route10Pokecenter2FBeta, ROUTE_10_POKECENTER_2F_BETA, $0, 0
map_header_2 PowerPlant, POWER_PLANT, $0, 0
map_header_2 BillsHouse, BILLS_HOUSE, $0, 0
- map_header_2 AzaleaPokeCenter1F, AZALEA_POKECENTER_1F, $0, 0
+ map_header_2 AzaleaPokecenter1F, AZALEA_POKECENTER_1F, $0, 0
map_header_2 CharcoalKiln, CHARCOAL_KILN, $0, 0
map_header_2 AzaleaMart, AZALEA_MART, $0, 0
map_header_2 KurtsHouse, KURTS_HOUSE, $0, 0
map_header_2 AzaleaGym, AZALEA_GYM, $0, 0
- map_header_2 LakeofRageHiddenPowerHouse, LAKE_OF_RAGE_HIDDEN_POWER_HOUSE, $0, 0
- map_header_2 LakeofRageMagikarpHouse, LAKE_OF_RAGE_MAGIKARP_HOUSE, $0, 0
+ map_header_2 LakeOfRageHiddenPowerHouse, LAKE_OF_RAGE_HIDDEN_POWER_HOUSE, $0, 0
+ map_header_2 LakeOfRageMagikarpHouse, LAKE_OF_RAGE_MAGIKARP_HOUSE, $0, 0
map_header_2 Route43MahoganyGate, ROUTE_43_MAHOGANY_GATE, $0, 0
map_header_2 Route43Gate, ROUTE_43_GATE, $0, 0
map_header_2 VioletMart, VIOLET_MART, $0, 0
map_header_2 VioletGym, VIOLET_GYM, $0, 0
map_header_2 EarlsPokemonAcademy, EARLS_POKEMON_ACADEMY, $0, 0
map_header_2 VioletNicknameSpeechHouse, VIOLET_NICKNAME_SPEECH_HOUSE, $0, 0
- map_header_2 VioletPokeCenter1F, VIOLET_POKECENTER_1F, $0, 0
- map_header_2 VioletOnixTradeHouse, VIOLET_ONIX_TRADE_HOUSE, $0, 0
- map_header_2 Route32RuinsofAlphGate, ROUTE_32_RUINS_OF_ALPH_GATE, $0, 0
- map_header_2 Route32PokeCenter1F, ROUTE_32_POKECENTER_1F, $0, 0
- map_header_2 Route35Goldenrodgate, ROUTE_35_GOLDENROD_GATE, $0, 0
- map_header_2 Route35NationalParkgate, ROUTE_35_NATIONAL_PARK_GATE, $0, 0
- map_header_2 Route36RuinsofAlphgate, ROUTE_36_RUINS_OF_ALPH_GATE, $0, 0
- map_header_2 Route36NationalParkgate, ROUTE_36_NATIONAL_PARK_GATE, $0, 0
+ map_header_2 VioletPokecenter1F, VIOLET_POKECENTER_1F, $0, 0
+ map_header_2 VioletKylesHouse, VIOLET_KYLES_HOUSE, $0, 0
+ map_header_2 Route32RuinsOfAlphGate, ROUTE_32_RUINS_OF_ALPH_GATE, $0, 0
+ map_header_2 Route32Pokecenter1F, ROUTE_32_POKECENTER_1F, $0, 0
+ map_header_2 Route35GoldenrodGate, ROUTE_35_GOLDENROD_GATE, $0, 0
+ map_header_2 Route35NationalParkGate, ROUTE_35_NATIONAL_PARK_GATE, $0, 0
+ map_header_2 Route36RuinsOfAlphGate, ROUTE_36_RUINS_OF_ALPH_GATE, $0, 0
+ map_header_2 Route36NationalParkGate, ROUTE_36_NATIONAL_PARK_GATE, $0, 0
map_header_2 GoldenrodGym, GOLDENROD_GYM, $0, 0
map_header_2 GoldenrodBikeShop, GOLDENROD_BIKE_SHOP, $0, 0
map_header_2 GoldenrodHappinessRater, GOLDENROD_HAPPINESS_RATER, $0, 0
@@ -451,21 +538,21 @@
map_header_2 GoldenrodDeptStoreElevator, GOLDENROD_DEPT_STORE_ELEVATOR, $0, 0
map_header_2 GoldenrodDeptStoreRoof, GOLDENROD_DEPT_STORE_ROOF, $24, 0
map_header_2 GoldenrodGameCorner, GOLDENROD_GAME_CORNER, $0, 0
- map_header_2 GoldenrodPokeCenter1F, GOLDENROD_POKECENTER_1F, $0, 0
+ map_header_2 GoldenrodPokecenter1F, GOLDENROD_POKECENTER_1F, $0, 0
map_header_2 GoldenrodPokeComCenter2FMobile, GOLDENROD_POKECOM_CENTER_2F_MOBILE, $0, 0
map_header_2 IlexForestAzaleaGate, ILEX_FOREST_AZALEA_GATE, $0, 0
map_header_2 Route34IlexForestGate, ROUTE_34_ILEX_FOREST_GATE, $0, 0
- map_header_2 DayCare, DAYCARE, $0, 0
+ map_header_2 DayCare, DAY_CARE, $0, 0
map_header_2 VermilionHouseFishingSpeechHouse, VERMILION_HOUSE_FISHING_SPEECH_HOUSE, $0, 0
- map_header_2 VermilionPokeCenter1F, VERMILION_POKECENTER_1F, $0, 0
- map_header_2 VermilionPokeCenter2FBeta, VERMILION_POKECENTER_2F_BETA, $0, 0
+ map_header_2 VermilionPokecenter1F, VERMILION_POKECENTER_1F, $0, 0
+ map_header_2 VermilionPokecenter2FBeta, VERMILION_POKECENTER_2F_BETA, $0, 0
map_header_2 PokemonFanClub, POKEMON_FAN_CLUB, $0, 0
map_header_2 VermilionMagnetTrainSpeechHouse, VERMILION_MAGNET_TRAIN_SPEECH_HOUSE, $0, 0
map_header_2 VermilionMart, VERMILION_MART, $0, 0
map_header_2 VermilionHouseDiglettsCaveSpeechHouse, VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE, $0, 0
map_header_2 VermilionGym, VERMILION_GYM, $0, 0
map_header_2 Route6SaffronGate, ROUTE_6_SAFFRON_GATE, $0, 0
- map_header_2 Route6UndergroundEntrance, ROUTE_6_UNDERGROUND_ENTRANCE, $0, 0
+ map_header_2 Route6UndergroundPathEntrance, ROUTE_6_UNDERGROUND_PATH_ENTRANCE, $0, 0
map_header_2 RedsHouse1F, REDS_HOUSE_1F, $0, 0
map_header_2 RedsHouse2F, REDS_HOUSE_2F, $0, 0
map_header_2 BluesHouse, BLUES_HOUSE, $0, 0
@@ -473,8 +560,8 @@
map_header_2 PewterNidoranSpeechHouse, PEWTER_NIDORAN_SPEECH_HOUSE, $0, 0
map_header_2 PewterGym, PEWTER_GYM, $0, 0
map_header_2 PewterMart, PEWTER_MART, $0, 0
- map_header_2 PewterPokeCenter1F, PEWTER_POKECENTER_1F, $0, 0
- map_header_2 PewterPokeCenter2FBeta, PEWTER_POKECENTER_2F_BETA, $0, 0
+ map_header_2 PewterPokecenter1F, PEWTER_POKECENTER_1F, $0, 0
+ map_header_2 PewterPokecenter2FBeta, PEWTER_POKECENTER_2F_BETA, $0, 0
map_header_2 PewterSnoozeSpeechHouse, PEWTER_SNOOZE_SPEECH_HOUSE, $0, 0
map_header_2 OlivinePort, OLIVINE_PORT, $a, 0
map_header_2 VermilionPort, VERMILION_PORT, $a, 0
@@ -488,7 +575,7 @@
map_header_2 MountMoonSquare, MOUNT_MOON_SQUARE, $2d, 0
map_header_2 MountMoonGiftShop, MOUNT_MOON_GIFT_SHOP, $0, 0
map_header_2 TinTowerRoof, TIN_TOWER_ROOF, $0, 0
- map_header_2 IndigoPlateauPokeCenter1F, INDIGO_PLATEAU_POKECENTER_1F, $0, 0
+ map_header_2 IndigoPlateauPokecenter1F, INDIGO_PLATEAU_POKECENTER_1F, $0, 0
map_header_2 WillsRoom, WILLS_ROOM, $0, 0
map_header_2 KogasRoom, KOGAS_ROOM, $0, 0
map_header_2 BrunosRoom, BRUNOS_ROOM, $0, 0
@@ -499,12 +586,12 @@
map_header_2 SafariZoneMainOffice, SAFARI_ZONE_MAIN_OFFICE, $0, 0
map_header_2 FuchsiaGym, FUCHSIA_GYM, $0, 0
map_header_2 FuchsiaBillSpeechHouse, FUCHSIA_BILL_SPEECH_HOUSE, $0, 0
- map_header_2 FuchsiaPokeCenter1F, FUCHSIA_POKECENTER_1F, $0, 0
- map_header_2 FuchsiaPokeCenter2FBeta, FUCHSIA_POKECENTER_2F_BETA, $0, 0
+ map_header_2 FuchsiaPokecenter1F, FUCHSIA_POKECENTER_1F, $0, 0
+ map_header_2 FuchsiaPokecenter2FBeta, FUCHSIA_POKECENTER_2F_BETA, $0, 0
map_header_2 SafariZoneWardensHome, SAFARI_ZONE_WARDENS_HOME, $0, 0
map_header_2 Route15FuchsiaGate, ROUTE_15_FUCHSIA_GATE, $0, 0
- map_header_2 LavenderPokeCenter1F, LAVENDER_POKECENTER_1F, $0, 0
- map_header_2 LavenderPokeCenter2FBeta, LAVENDER_POKECENTER_2F_BETA, $0, 0
+ map_header_2 LavenderPokecenter1F, LAVENDER_POKECENTER_1F, $0, 0
+ map_header_2 LavenderPokecenter2FBeta, LAVENDER_POKECENTER_2F_BETA, $0, 0
map_header_2 MrFujisHouse, MR_FUJIS_HOUSE, $0, 0
map_header_2 LavenderTownSpeechHouse, LAVENDER_TOWN_SPEECH_HOUSE, $0, 0
map_header_2 LavenderNameRater, LAVENDER_NAME_RATER, $0, 0
@@ -513,9 +600,9 @@
map_header_2 LavRadioTower1F, LAV_RADIO_TOWER_1F, $0, 0
map_header_2 Route8SaffronGate, ROUTE_8_SAFFRON_GATE, $0, 0
map_header_2 Route12SuperRodHouse, ROUTE_12_SUPER_ROD_HOUSE, $0, 0
- map_header_2 SilverCavePokeCenter1F, SILVER_CAVE_POKECENTER_1F, $0, 0
+ map_header_2 SilverCavePokecenter1F, SILVER_CAVE_POKECENTER_1F, $0, 0
map_header_2 Route28FamousSpeechHouse, ROUTE_28_FAMOUS_SPEECH_HOUSE, $0, 0
- map_header_2 PokeCenter2F, POKECENTER_2F, $0, 0
+ map_header_2 Pokecenter2F, POKECENTER_2F, $0, 0
map_header_2 TradeCenter, TRADE_CENTER, $0, 0
map_header_2 Colosseum, COLOSSEUM, $0, 0
map_header_2 TimeCapsule, TIME_CAPSULE, $0, 0
@@ -533,8 +620,8 @@
map_header_2 CeladonMansion3F, CELADON_MANSION_3F, $0, 0
map_header_2 CeladonMansionRoof, CELADON_MANSION_ROOF, $1, 0
map_header_2 CeladonMansionRoofHouse, CELADON_MANSION_ROOF_HOUSE, $0, 0
- map_header_2 CeladonPokeCenter1F, CELADON_POKECENTER_1F, $0, 0
- map_header_2 CeladonPokeCenter2FBeta, CELADON_POKECENTER_2F_BETA, $0, 0
+ map_header_2 CeladonPokecenter1F, CELADON_POKECENTER_1F, $0, 0
+ map_header_2 CeladonPokecenter2FBeta, CELADON_POKECENTER_2F_BETA, $0, 0
map_header_2 CeladonGameCorner, CELADON_GAME_CORNER, $0, 0
map_header_2 CeladonGameCornerPrizeRoom, CELADON_GAME_CORNER_PRIZE_ROOM, $0, 0
map_header_2 CeladonGym, CELADON_GYM, $0, 0
@@ -545,7 +632,7 @@
map_header_2 Route1718Gate, ROUTE_17_18_GATE, $0, 0
map_header_2 ManiasHouse, MANIAS_HOUSE, $0, 0
map_header_2 CianwoodGym, CIANWOOD_GYM, $0, 0
- map_header_2 CianwoodPokeCenter1F, CIANWOOD_POKECENTER_1F, $0, 0
+ map_header_2 CianwoodPokecenter1F, CIANWOOD_POKECENTER_1F, $0, 0
map_header_2 CianwoodPharmacy, CIANWOOD_PHARMACY, $0, 0
map_header_2 CianwoodCityPhotoStudio, CIANWOOD_CITY_PHOTO_STUDIO, $0, 0
map_header_2 CianwoodLugiaSpeechHouse, CIANWOOD_LUGIA_SPEECH_HOUSE, $0, 0
@@ -561,8 +648,8 @@
map_header_2 TrainerHouse1F, TRAINER_HOUSE_1F, $0, 0
map_header_2 TrainerHouseB1F, TRAINER_HOUSE_B1F, $0, 0
map_header_2 ViridianMart, VIRIDIAN_MART, $0, 0
- map_header_2 ViridianPokeCenter1F, VIRIDIAN_POKECENTER_1F, $0, 0
- map_header_2 ViridianPokeCenter2FBeta, VIRIDIAN_POKECENTER_2F_BETA, $0, 0
+ map_header_2 ViridianPokecenter1F, VIRIDIAN_POKECENTER_1F, $0, 0
+ map_header_2 ViridianPokecenter2FBeta, VIRIDIAN_POKECENTER_2F_BETA, $0, 0
map_header_2 Route2NuggetSpeechHouse, ROUTE_2_NUGGET_SPEECH_HOUSE, $0, 0
map_header_2 Route2Gate, ROUTE_2_GATE, $0, 0
map_header_2 VictoryRoadGate, VICTORY_ROAD_GATE, $0, 0
@@ -578,18 +665,18 @@
map_header_2 FightingDojo, FIGHTING_DOJO, $0, 0
map_header_2 SaffronGym, SAFFRON_GYM, $0, 0
map_header_2 SaffronMart, SAFFRON_MART, $0, 0
- map_header_2 SaffronPokeCenter1F, SAFFRON_POKECENTER_1F, $0, 0
- map_header_2 SaffronPokeCenter2FBeta, SAFFRON_POKECENTER_2F_BETA, $0, 0
+ map_header_2 SaffronPokecenter1F, SAFFRON_POKECENTER_1F, $0, 0
+ map_header_2 SaffronPokecenter2FBeta, SAFFRON_POKECENTER_2F_BETA, $0, 0
map_header_2 MrPsychicsHouse, MR_PSYCHICS_HOUSE, $0, 0
map_header_2 SaffronTrainStation, SAFFRON_TRAIN_STATION, $0, 0
map_header_2 SilphCo1F, SILPH_CO_1F, $0, 0
map_header_2 CopycatsHouse1F, COPYCATS_HOUSE_1F, $0, 0
map_header_2 CopycatsHouse2F, COPYCATS_HOUSE_2F, $0, 0
- map_header_2 Route5UndergroundEntrance, ROUTE_5_UNDERGROUND_ENTRANCE, $0, 0
+ map_header_2 Route5UndergroundPathEntrance, ROUTE_5_UNDERGROUND_PATH_ENTRANCE, $0, 0
map_header_2 Route5SaffronCityGate, ROUTE_5_SAFFRON_CITY_GATE, $0, 0
map_header_2 Route5CleanseTagSpeechHouse, ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE, $0, 0
map_header_2 CherrygroveMart, CHERRYGROVE_MART, $0, 0
- map_header_2 CherrygrovePokeCenter1F, CHERRYGROVE_POKECENTER_1F, $0, 0
+ map_header_2 CherrygrovePokecenter1F, CHERRYGROVE_POKECENTER_1F, $0, 0
map_header_2 CherrygroveGymSpeechHouse, CHERRYGROVE_GYM_SPEECH_HOUSE, $0, 0
map_header_2 GuideGentsHouse, GUIDE_GENTS_HOUSE, $0, 0
map_header_2 CherrygroveEvolutionSpeechHouse, CHERRYGROVE_EVOLUTION_SPEECH_HOUSE, $0, 0
diff --git a/menu/mon_icons.asm b/menu/mon_icons.asm
deleted file mode 100644
index aeb758282..000000000
--- a/menu/mon_icons.asm
+++ /dev/null
@@ -1,349 +0,0 @@
-ReadMonMenuIcon: ; 8eab3
- cp EGG
- jr z, .egg
- dec a
- ld hl, MonMenuIcons
- ld e, a
- ld d, 0
- add hl, de
- ld a, [hl]
- ret
-.egg
- ld a, ICON_EGG
- ret
-; 8eac4
-
-MonMenuIcons: ; 8eac4
- db ICON_BULBASAUR ; BULBASAUR
- db ICON_BULBASAUR ; IVYSAUR
- db ICON_BULBASAUR ; VENUSAUR
- db ICON_CHARMANDER ; CHARMANDER
- db ICON_CHARMANDER ; CHARMELEON
- db ICON_BIGMON ; CHARIZARD
- db ICON_SQUIRTLE ; SQUIRTLE
- db ICON_SQUIRTLE ; WARTORTLE
- db ICON_SQUIRTLE ; BLASTOISE
- db ICON_CATERPILLAR ; CATERPIE
- db ICON_CATERPILLAR ; METAPOD
- db ICON_MOTH ; BUTTERFREE
- db ICON_CATERPILLAR ; WEEDLE
- db ICON_CATERPILLAR ; KAKUNA
- db ICON_BUG ; BEEDRILL
- db ICON_BIRD ; PIDGEY
- db ICON_BIRD ; PIDGEOTTO
- db ICON_BIRD ; PIDGEOT
- db ICON_FOX ; RATTATA
- db ICON_FOX ; RATICATE
- db ICON_BIRD ; SPEAROW
- db ICON_BIRD ; FEAROW
- db ICON_SERPENT ; EKANS
- db ICON_SERPENT ; ARBOK
- db ICON_PIKACHU ; PIKACHU
- db ICON_PIKACHU ; RAICHU
- db ICON_MONSTER ; SANDSHREW
- db ICON_MONSTER ; SANDSLASH
- db ICON_FOX ; NIDORAN_F
- db ICON_FOX ; NIDORINA
- db ICON_MONSTER ; NIDOQUEEN
- db ICON_FOX ; NIDORAN_M
- db ICON_FOX ; NIDORINO
- db ICON_MONSTER ; NIDOKING
- db ICON_CLEFAIRY ; CLEFAIRY
- db ICON_CLEFAIRY ; CLEFABLE
- db ICON_FOX ; VULPIX
- db ICON_FOX ; NINETALES
- db ICON_JIGGLYPUFF ; JIGGLYPUFF
- db ICON_JIGGLYPUFF ; WIGGLYTUFF
- db ICON_BAT ; ZUBAT
- db ICON_BAT ; GOLBAT
- db ICON_ODDISH ; ODDISH
- db ICON_ODDISH ; GLOOM
- db ICON_ODDISH ; VILEPLUME
- db ICON_BUG ; PARAS
- db ICON_BUG ; PARASECT
- db ICON_CATERPILLAR ; VENONAT
- db ICON_MOTH ; VENOMOTH
- db ICON_DIGLETT ; DIGLETT
- db ICON_DIGLETT ; DUGTRIO
- db ICON_FOX ; MEOWTH
- db ICON_FOX ; PERSIAN
- db ICON_MONSTER ; PSYDUCK
- db ICON_MONSTER ; GOLDUCK
- db ICON_FIGHTER ; MANKEY
- db ICON_FIGHTER ; PRIMEAPE
- db ICON_FOX ; GROWLITHE
- db ICON_FOX ; ARCANINE
- db ICON_POLIWAG ; POLIWAG
- db ICON_POLIWAG ; POLIWHIRL
- db ICON_POLIWAG ; POLIWRATH
- db ICON_HUMANSHAPE ; ABRA
- db ICON_HUMANSHAPE ; KADABRA
- db ICON_HUMANSHAPE ; ALAKAZAM
- db ICON_FIGHTER ; MACHOP
- db ICON_FIGHTER ; MACHOKE
- db ICON_FIGHTER ; MACHAMP
- db ICON_ODDISH ; BELLSPROUT
- db ICON_ODDISH ; WEEPINBELL
- db ICON_ODDISH ; VICTREEBEL
- db ICON_JELLYFISH ; TENTACOOL
- db ICON_JELLYFISH ; TENTACRUEL
- db ICON_GEODUDE ; GEODUDE
- db ICON_GEODUDE ; GRAVELER
- db ICON_GEODUDE ; GOLEM
- db ICON_EQUINE ; PONYTA
- db ICON_EQUINE ; RAPIDASH
- db ICON_SLOWPOKE ; SLOWPOKE
- db ICON_SLOWPOKE ; SLOWBRO
- db ICON_VOLTORB ; MAGNEMITE
- db ICON_VOLTORB ; MAGNETON
- db ICON_BIRD ; FARFETCH_D
- db ICON_BIRD ; DODUO
- db ICON_BIRD ; DODRIO
- db ICON_LAPRAS ; SEEL
- db ICON_LAPRAS ; DEWGONG
- db ICON_BLOB ; GRIMER
- db ICON_BLOB ; MUK
- db ICON_SHELL ; SHELLDER
- db ICON_SHELL ; CLOYSTER
- db ICON_GHOST ; GASTLY
- db ICON_GHOST ; HAUNTER
- db ICON_GHOST ; GENGAR
- db ICON_SERPENT ; ONIX
- db ICON_HUMANSHAPE ; DROWZEE
- db ICON_HUMANSHAPE ; HYPNO
- db ICON_SHELL ; KRABBY
- db ICON_SHELL ; KINGLER
- db ICON_VOLTORB ; VOLTORB
- db ICON_VOLTORB ; ELECTRODE
- db ICON_ODDISH ; EXEGGCUTE
- db ICON_ODDISH ; EXEGGUTOR
- db ICON_MONSTER ; CUBONE
- db ICON_MONSTER ; MAROWAK
- db ICON_FIGHTER ; HITMONLEE
- db ICON_FIGHTER ; HITMONCHAN
- db ICON_MONSTER ; LICKITUNG
- db ICON_BLOB ; KOFFING
- db ICON_BLOB ; WEEZING
- db ICON_EQUINE ; RHYHORN
- db ICON_MONSTER ; RHYDON
- db ICON_CLEFAIRY ; CHANSEY
- db ICON_ODDISH ; TANGELA
- db ICON_MONSTER ; KANGASKHAN
- db ICON_FISH ; HORSEA
- db ICON_FISH ; SEADRA
- db ICON_FISH ; GOLDEEN
- db ICON_FISH ; SEAKING
- db ICON_STARYU ; STARYU
- db ICON_STARYU ; STARMIE
- db ICON_HUMANSHAPE ; MR__MIME
- db ICON_BUG ; SCYTHER
- db ICON_HUMANSHAPE ; JYNX
- db ICON_HUMANSHAPE ; ELECTABUZZ
- db ICON_HUMANSHAPE ; MAGMAR
- db ICON_BUG ; PINSIR
- db ICON_EQUINE ; TAUROS
- db ICON_FISH ; MAGIKARP
- db ICON_GYARADOS ; GYARADOS
- db ICON_LAPRAS ; LAPRAS
- db ICON_BLOB ; DITTO
- db ICON_FOX ; EEVEE
- db ICON_FOX ; VAPOREON
- db ICON_FOX ; JOLTEON
- db ICON_FOX ; FLAREON
- db ICON_VOLTORB ; PORYGON
- db ICON_SHELL ; OMANYTE
- db ICON_SHELL ; OMASTAR
- db ICON_SHELL ; KABUTO
- db ICON_SHELL ; KABUTOPS
- db ICON_BIRD ; AERODACTYL
- db ICON_SNORLAX ; SNORLAX
- db ICON_BIRD ; ARTICUNO
- db ICON_BIRD ; ZAPDOS
- db ICON_BIRD ; MOLTRES
- db ICON_SERPENT ; DRATINI
- db ICON_SERPENT ; DRAGONAIR
- db ICON_BIGMON ; DRAGONITE
- db ICON_HUMANSHAPE ; MEWTWO
- db ICON_HUMANSHAPE ; MEW
- db ICON_ODDISH ; CHIKORITA
- db ICON_ODDISH ; BAYLEEF
- db ICON_ODDISH ; MEGANIUM
- db ICON_FOX ; CYNDAQUIL
- db ICON_FOX ; QUILAVA
- db ICON_FOX ; TYPHLOSION
- db ICON_MONSTER ; TOTODILE
- db ICON_MONSTER ; CROCONAW
- db ICON_MONSTER ; FERALIGATR
- db ICON_FOX ; SENTRET
- db ICON_FOX ; FURRET
- db ICON_BIRD ; HOOTHOOT
- db ICON_BIRD ; NOCTOWL
- db ICON_BUG ; LEDYBA
- db ICON_BUG ; LEDIAN
- db ICON_BUG ; SPINARAK
- db ICON_BUG ; ARIADOS
- db ICON_BAT ; CROBAT
- db ICON_FISH ; CHINCHOU
- db ICON_FISH ; LANTURN
- db ICON_PIKACHU ; PICHU
- db ICON_CLEFAIRY ; CLEFFA
- db ICON_JIGGLYPUFF ; IGGLYBUFF
- db ICON_CLEFAIRY ; TOGEPI
- db ICON_BIRD ; TOGETIC
- db ICON_BIRD ; NATU
- db ICON_BIRD ; XATU
- db ICON_FOX ; MAREEP
- db ICON_MONSTER ; FLAAFFY
- db ICON_MONSTER ; AMPHAROS
- db ICON_ODDISH ; BELLOSSOM
- db ICON_JIGGLYPUFF ; MARILL
- db ICON_JIGGLYPUFF ; AZUMARILL
- db ICON_SUDOWOODO ; SUDOWOODO
- db ICON_POLIWAG ; POLITOED
- db ICON_ODDISH ; HOPPIP
- db ICON_ODDISH ; SKIPLOOM
- db ICON_ODDISH ; JUMPLUFF
- db ICON_MONSTER ; AIPOM
- db ICON_ODDISH ; SUNKERN
- db ICON_ODDISH ; SUNFLORA
- db ICON_BUG ; YANMA
- db ICON_MONSTER ; WOOPER
- db ICON_MONSTER ; QUAGSIRE
- db ICON_FOX ; ESPEON
- db ICON_FOX ; UMBREON
- db ICON_BIRD ; MURKROW
- db ICON_SLOWPOKE ; SLOWKING
- db ICON_GHOST ; MISDREAVUS
- db ICON_UNOWN ; UNOWN
- db ICON_GHOST ; WOBBUFFET
- db ICON_EQUINE ; GIRAFARIG
- db ICON_BUG ; PINECO
- db ICON_BUG ; FORRETRESS
- db ICON_SERPENT ; DUNSPARCE
- db ICON_BUG ; GLIGAR
- db ICON_SERPENT ; STEELIX
- db ICON_MONSTER ; SNUBBULL
- db ICON_MONSTER ; GRANBULL
- db ICON_FISH ; QWILFISH
- db ICON_BUG ; SCIZOR
- db ICON_BUG ; SHUCKLE
- db ICON_BUG ; HERACROSS
- db ICON_FOX ; SNEASEL
- db ICON_MONSTER ; TEDDIURSA
- db ICON_MONSTER ; URSARING
- db ICON_BLOB ; SLUGMA
- db ICON_BLOB ; MAGCARGO
- db ICON_EQUINE ; SWINUB
- db ICON_EQUINE ; PILOSWINE
- db ICON_SHELL ; CORSOLA
- db ICON_FISH ; REMORAID
- db ICON_FISH ; OCTILLERY
- db ICON_MONSTER ; DELIBIRD
- db ICON_FISH ; MANTINE
- db ICON_BIRD ; SKARMORY
- db ICON_FOX ; HOUNDOUR
- db ICON_FOX ; HOUNDOOM
- db ICON_BIGMON ; KINGDRA
- db ICON_EQUINE ; PHANPY
- db ICON_EQUINE ; DONPHAN
- db ICON_VOLTORB ; PORYGON2
- db ICON_EQUINE ; STANTLER
- db ICON_MONSTER ; SMEARGLE
- db ICON_FIGHTER ; TYROGUE
- db ICON_FIGHTER ; HITMONTOP
- db ICON_HUMANSHAPE ; SMOOCHUM
- db ICON_HUMANSHAPE ; ELEKID
- db ICON_HUMANSHAPE ; MAGBY
- db ICON_EQUINE ; MILTANK
- db ICON_CLEFAIRY ; BLISSEY
- db ICON_FOX ; RAIKOU
- db ICON_FOX ; ENTEI
- db ICON_FOX ; SUICUNE
- db ICON_MONSTER ; LARVITAR
- db ICON_MONSTER ; PUPITAR
- db ICON_MONSTER ; TYRANITAR
- db ICON_LUGIA ; LUGIA
- db ICON_HO_OH ; HO_OH
- db ICON_HUMANSHAPE ; CELEBI
-
-IconPointers:
- dw NullIcon
- dw PoliwagIcon
- dw JigglypuffIcon
- dw DiglettIcon
- dw PikachuIcon
- dw StaryuIcon
- dw FishIcon
- dw BirdIcon
- dw MonsterIcon
- dw ClefairyIcon
- dw OddishIcon
- dw BugIcon
- dw GhostIcon
- dw LaprasIcon
- dw HumanshapeIcon
- dw FoxIcon
- dw EquineIcon
- dw ShellIcon
- dw BlobIcon
- dw SerpentIcon
- dw VoltorbIcon
- dw SquirtleIcon
- dw BulbasaurIcon
- dw CharmanderIcon
- dw CaterpillarIcon
- dw UnownIcon
- dw GeodudeIcon
- dw FighterIcon
- dw EggIcon
- dw JellyfishIcon
- dw MothIcon
- dw BatIcon
- dw SnorlaxIcon
- dw HoOhIcon
- dw LugiaIcon
- dw GyaradosIcon
- dw SlowpokeIcon
- dw SudowoodoIcon
- dw BigmonIcon
-
-Icons:
-NullIcon:
-PoliwagIcon: INCBIN "gfx/icon/poliwag.2bpp" ; 0x8ec0d
-JigglypuffIcon: INCBIN "gfx/icon/jigglypuff.2bpp" ; 0x8ec8d
-DiglettIcon: INCBIN "gfx/icon/diglett.2bpp" ; 0x8ed0d
-PikachuIcon: INCBIN "gfx/icon/pikachu.2bpp" ; 0x8ed8d
-StaryuIcon: INCBIN "gfx/icon/staryu.2bpp" ; 0x8ee0d
-FishIcon: INCBIN "gfx/icon/fish.2bpp" ; 0x8ee8d
-BirdIcon: INCBIN "gfx/icon/bird.2bpp" ; 0x8ef0d
-MonsterIcon: INCBIN "gfx/icon/monster.2bpp" ; 0x8ef8d
-ClefairyIcon: INCBIN "gfx/icon/clefairy.2bpp" ; 0x8f00d
-OddishIcon: INCBIN "gfx/icon/oddish.2bpp" ; 0x8f08d
-BugIcon: INCBIN "gfx/icon/bug.2bpp" ; 0x8f10d
-GhostIcon: INCBIN "gfx/icon/ghost.2bpp" ; 0x8f18d
-LaprasIcon: INCBIN "gfx/icon/lapras.2bpp" ; 0x8f20d
-HumanshapeIcon: INCBIN "gfx/icon/humanshape.2bpp" ; 0x8f28d
-FoxIcon: INCBIN "gfx/icon/fox.2bpp" ; 0x8f30d
-EquineIcon: INCBIN "gfx/icon/equine.2bpp" ; 0x8f38d
-ShellIcon: INCBIN "gfx/icon/shell.2bpp" ; 0x8f40d
-BlobIcon: INCBIN "gfx/icon/blob.2bpp" ; 0x8f48d
-SerpentIcon: INCBIN "gfx/icon/serpent.2bpp" ; 0x8f50d
-VoltorbIcon: INCBIN "gfx/icon/voltorb.2bpp" ; 0x8f58d
-SquirtleIcon: INCBIN "gfx/icon/squirtle.2bpp" ; 0x8f60d
-BulbasaurIcon: INCBIN "gfx/icon/bulbasaur.2bpp" ; 0x8f68d
-CharmanderIcon: INCBIN "gfx/icon/charmander.2bpp" ; 0x8f70d
-CaterpillarIcon: INCBIN "gfx/icon/caterpillar.2bpp" ; 0x8f78d
-UnownIcon: INCBIN "gfx/icon/unown.2bpp" ; 0x8f80d
-GeodudeIcon: INCBIN "gfx/icon/geodude.2bpp" ; 0x8f88d
-FighterIcon: INCBIN "gfx/icon/fighter.2bpp" ; 0x8f90d
-EggIcon: INCBIN "gfx/icon/egg.2bpp" ; 0x8f98d
-JellyfishIcon: INCBIN "gfx/icon/jellyfish.2bpp" ; 0x8fa0d
-MothIcon: INCBIN "gfx/icon/moth.2bpp" ; 0x8fa8d
-BatIcon: INCBIN "gfx/icon/bat.2bpp" ; 0x8fb0d
-SnorlaxIcon: INCBIN "gfx/icon/snorlax.2bpp" ; 0x8fb8d
-HoOhIcon: INCBIN "gfx/icon/ho_oh.2bpp" ; 0x8fc0d
-LugiaIcon: INCBIN "gfx/icon/lugia.2bpp" ; 0x8fc8d
-GyaradosIcon: INCBIN "gfx/icon/gyarados.2bpp" ; 0x8fd0d
-SlowpokeIcon: INCBIN "gfx/icon/slowpoke.2bpp" ; 0x8fd8d
-SudowoodoIcon: INCBIN "gfx/icon/sudowoodo.2bpp" ; 0x8fe0d
-BigmonIcon: INCBIN "gfx/icon/bigmon.2bpp" ; 0x8fe8d
diff --git a/misc/battle_tower_47.asm b/misc/battle_tower_47.asm
deleted file mode 100755
index f9e2ac0ea..000000000
--- a/misc/battle_tower_47.asm
+++ /dev/null
@@ -1,784 +0,0 @@
-BattleTowerText:: ; 11c000
-; Print text c for trainer [BT_OTTrainerClass]
-; 1: Intro text
-; 2: Player lost
-; 3: Player won
- ld a, [rSVBK]
- push af
- ld a, 3 ; BANK(BT_OTTrainerClass)
- ld [rSVBK], a
-IF DEF(CRYSTAL11)
- ld hl, BT_OTTrainerClass
-ELSE
- ld hl, BT_OTName + 5
-; BUG ALERT
-; Instead of loading the Trainer Class, this routine
-; loads the 6th character in the Trainer's name, then
-; uses it to get the gender of the trainer.
-; As a consequence, the enemy trainer's dialog will
-; always be sampled from the female array.
-ENDC
- ld a, [hl]
- dec a
- ld e, a
- ld d, 0
- ld hl, BTTrainerClassGenders
- add hl, de
- ld a, [hl]
- and a
- jr nz, .female
- ; generate a random number between 0 and 24
- ld a, [hRandomAdd]
- and $1f
- cp 25
- jr c, .okay0
- sub 25
-
-.okay0
- ld hl, BTMaleTrainerTexts
- jr .proceed
-
-.female
- ; generate a random number between 0 and 14
- ld a, [hRandomAdd]
- and $f
- cp 15
- jr c, .okay1
- sub 15
-
-.okay1
- ld hl, BTFemaleTrainerTexts
-
-.proceed
- ld b, 0
- dec c
- jr nz, .restore
- ld [BT_TrainerTextIndex], a
- jr .okay2
-
-.restore
- ld a, [BT_TrainerTextIndex]
-
-.okay2
- push af
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld c, a
- ld a, [hl]
- ld h, a
- ld l, c
- pop af
- ld c, a
- ld b, 0
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld c, a
- ld a, [hl]
- ld l, c
- ld h, a
- bccoord 1, 14
- pop af
- ld [rSVBK], a
- call PlaceHLTextAtBC
- ret
-; 11c05d
-
-INCLUDE "misc/fixed_words.asm"
-
-BTTrainerClassGenders: ; 11f2f0
- db MALE ; FALKNER
- db FEMALE ; WHITNEY
- db FEMALE ; BUGSY
- db MALE ; MORTY
- db MALE ; PRYCE
- db FEMALE ; JASMINE
- db MALE ; CHUCK
- db FEMALE ; CLAIR
- db MALE ; RIVAL1
- db MALE ; POKEMON_PROF
- db FEMALE ; WILL
- db MALE ; CAL
- db MALE ; BRUNO
- db FEMALE ; KAREN
- db MALE ; KOGA
- db MALE ; CHAMPION
- db MALE ; BROCK
- db FEMALE ; MISTY
- db MALE ; LT_SURGE
- db MALE ; SCIENTIST
- db FEMALE ; ERIKA
- db MALE ; YOUNGSTER
- db MALE ; SCHOOLBOY
- db MALE ; BIRD_KEEPER
- db FEMALE ; LASS
- db FEMALE ; JANINE
- db MALE ; COOLTRAINERM
- db FEMALE ; COOLTRAINERF
- db FEMALE ; BEAUTY
- db MALE ; POKEMANIAC
- db MALE ; GRUNTM
- db MALE ; GENTLEMAN
- db FEMALE ; SKIER
- db FEMALE ; TEACHER
- db FEMALE ; SABRINA
- db MALE ; BUG_CATCHER
- db MALE ; FISHER
- db MALE ; SWIMMERM
- db FEMALE ; SWIMMERF
- db MALE ; SAILOR
- db MALE ; SUPER_NERD
- db MALE ; RIVAL2
- db MALE ; GUITARIST
- db MALE ; HIKER
- db MALE ; BIKER
- db MALE ; BLAINE
- db MALE ; BURGLAR
- db MALE ; FIREBREATHER
- db MALE ; JUGGLER
- db MALE ; BLACKBELT_T
- db MALE ; EXECUTIVEM
- db MALE ; PSYCHIC_T
- db FEMALE ; PICNICKER
- db MALE ; CAMPER
- db FEMALE ; EXECUTIVEF
- db MALE ; SAGE
- db FEMALE ; MEDIUM
- db MALE ; BOARDER
- db MALE ; POKEFANM
- db FEMALE ; KIMONO_GIRL
- db FEMALE ; TWINS
- db FEMALE ; POKEFANF
- db MALE ; RED
- db MALE ; BLUE
- db MALE ; OFFICER
- db FEMALE ; GRUNTF
-
-
-BTMaleTrainerTexts: ; 11f332
- dw .Greetings
- dw .PlayerLost
- dw .PlayerWon
-
-.Greetings: ; 11f338
- dw BTGreetingM1
- dw BTGreetingM2
- dw BTGreetingM3
- dw BTGreetingM4
- dw BTGreetingM5
- dw BTGreetingM6
- dw BTGreetingM7
- dw BTGreetingM8
- dw BTGreetingM9
- dw BTGreetingM10
- dw BTGreetingM11
- dw BTGreetingM12
- dw BTGreetingM13
- dw BTGreetingM14
- dw BTGreetingM15
- dw BTGreetingM16
- dw BTGreetingM17
- dw BTGreetingM18
- dw BTGreetingM19
- dw BTGreetingM20
- dw BTGreetingM21
- dw BTGreetingM22
- dw BTGreetingM23
- dw BTGreetingM24
- dw BTGreetingM25
-
-.PlayerLost: ; 11f36a
- dw BTLossM1
- dw BTLossM2
- dw BTLossM3
- dw BTLossM4
- dw BTLossM5
- dw BTLossM6
- dw BTLossM7
- dw BTLossM8
- dw BTLossM9
- dw BTLossM10
- dw BTLossM11
- dw BTLossM12
- dw BTLossM13
- dw BTLossM14
- dw BTLossM15
- dw BTLossM16
- dw BTLossM17
- dw BTLossM18
- dw BTLossM19
- dw BTLossM20
- dw BTLossM21
- dw BTLossM22
- dw BTLossM23
- dw BTLossM24
- dw BTLossM25
-
-.PlayerWon: ; 11f39c
- dw BTWinM1
- dw BTWinM2
- dw BTWinM3
- dw BTWinM4
- dw BTWinM5
- dw BTWinM6
- dw BTWinM7
- dw BTWinM8
- dw BTWinM9
- dw BTWinM10
- dw BTWinM11
- dw BTWinM12
- dw BTWinM13
- dw BTWinM14
- dw BTWinM15
- dw BTWinM16
- dw BTWinM17
- dw BTWinM18
- dw BTWinM19
- dw BTWinM20
- dw BTWinM21
- dw BTWinM22
- dw BTWinM23
- dw BTWinM24
- dw BTWinM25
-
-
-BTFemaleTrainerTexts:
- dw .Greetings
- dw .PlayerLost
- dw .PlayerWon
-
-.Greetings: ; 11f3d4
- dw BTGreetingF1
- dw BTGreetingF2
- dw BTGreetingF3
- dw BTGreetingF4
- dw BTGreetingF5
- dw BTGreetingF6
- dw BTGreetingF7
- dw BTGreetingF8
- dw BTGreetingF9
- dw BTGreetingF10
- dw BTGreetingF11
- dw BTGreetingF12
- dw BTGreetingF13
- dw BTGreetingF14
- dw BTGreetingF15
-
-.PlayerLost: ; 11f3f2
- dw BTLossF1
- dw BTLossF2
- dw BTLossF3
- dw BTLossF4
- dw BTLossF5
- dw BTLossF6
- dw BTLossF7
- dw BTLossF8
- dw BTLossF9
- dw BTLossF10
- dw BTLossF11
- dw BTLossF12
- dw BTLossF13
- dw BTLossF14
- dw BTLossF15
-
-.PlayerWon: ; 11f410
- dw BTWinF1
- dw BTWinF2
- dw BTWinF3
- dw BTWinF4
- dw BTWinF5
- dw BTWinF6
- dw BTWinF7
- dw BTWinF8
- dw BTWinF9
- dw BTWinF10
- dw BTWinF11
- dw BTWinF12
- dw BTWinF13
- dw BTWinF14
- dw BTWinF15
-
-
-BTGreetingM1: ; 0x11f42e
- text_jump BattleTowerText_0x1ec000
- db "@"
-
-BTLossM1: ; 0x11f433
- text_jump BattleTowerText_0x1ec03b
- db "@"
-
-BTWinM1: ; 0x11f438
- text_jump UnknownText_0x1ec060
- db "@"
-
-BTGreetingM2: ; 0x11f43d
- text_jump BattleTowerText_0x1ec080
- db "@"
-
-BTLossM2: ; 0x11f442
- text_jump UnknownText_0x1ec0a3
- db "@"
-
-BTWinM2: ; 0x11f447
- text_jump UnknownText_0x1ec0c4
- db "@"
-
-BTGreetingM3: ; 0x11f44c
- text_jump UnknownText_0x1ec0e1
- db "@"
-
-BTLossM3: ; 0x11f451
- text_jump UnknownText_0x1ec108
- db "@"
-
-BTWinM3: ; 0x11f456
- text_jump UnknownText_0x1ec12a
- db "@"
-
-BTGreetingM4: ; 0x11f45b
- text_jump UnknownText_0x1ec14d
- db "@"
-
-BTLossM4: ; 0x11f460
- text_jump UnknownText_0x1ec16f
- db "@"
-
-BTWinM4: ; 0x11f465
- text_jump UnknownText_0x1ec190
- db "@"
-
-BTGreetingM5: ; 0x11f46a
- text_jump UnknownText_0x1ec1ae
- db "@"
-
-BTLossM5: ; 0x11f46f
- text_jump UnknownText_0x1ec1d0
- db "@"
-
-BTWinM5: ; 0x11f474
- text_jump UnknownText_0x1ec1f4
- db "@"
-
-BTGreetingM6: ; 0x11f479
- text_jump UnknownText_0x1ec216
- db "@"
-
-BTLossM6: ; 0x11f47e
- text_jump UnknownText_0x1ec238
- db "@"
-
-BTWinM6: ; 0x11f483
- text_jump UnknownText_0x1ec259
- db "@"
-
-BTGreetingM7: ; 0x11f488
- text_jump UnknownText_0x1ec27b
- db "@"
-
-BTLossM7: ; 0x11f48d
- text_jump UnknownText_0x1ec2a0
- db "@"
-
-BTWinM7: ; 0x11f492
- text_jump UnknownText_0x1ec2c0
- db "@"
-
-BTGreetingM8: ; 0x11f497
- text_jump UnknownText_0x1ec2d9
- db "@"
-
-BTLossM8: ; 0x11f49c
- text_jump UnknownText_0x1ec2fe
- db "@"
-
-BTWinM8: ; 0x11f4a1
- text_jump UnknownText_0x1ec320
- db "@"
-
-BTGreetingM9: ; 0x11f4a6
- text_jump UnknownText_0x1ec33f
- db "@"
-
-BTLossM9: ; 0x11f4ab
- text_jump UnknownText_0x1ec36c
- db "@"
-
-BTWinM9: ; 0x11f4b0
- text_jump UnknownText_0x1ec389
- db "@"
-
-BTGreetingM10: ; 0x11f4b5
- text_jump UnknownText_0x1ec3ad
- db "@"
-
-BTLossM10: ; 0x11f4ba
- text_jump UnknownText_0x1ec3c5
- db "@"
-
-BTWinM10: ; 0x11f4bf
- text_jump UnknownText_0x1ec3e5
- db "@"
-
-BTGreetingM11: ; 0x11f4c4
- text_jump UnknownText_0x1ec402
- db "@"
-
-BTLossM11: ; 0x11f4c9
- text_jump UnknownText_0x1ec411
- db "@"
-
-BTWinM11: ; 0x11f4ce
- text_jump UnknownText_0x1ec41f
- db "@"
-
-BTGreetingM12: ; 0x11f4d3
- text_jump UnknownText_0x1ec42e
- db "@"
-
-BTLossM12: ; 0x11f4d8
- text_jump UnknownText_0x1ec461
- db "@"
-
-BTWinM12: ; 0x11f4dd
- text_jump UnknownText_0x1ec4a0
- db "@"
-
-BTGreetingM13: ; 0x11f4e2
- text_jump UnknownText_0x1ec4d6
- db "@"
-
-BTLossM13: ; 0x11f4e7
- text_jump UnknownText_0x1ec4f5
- db "@"
-
-BTWinM13: ; 0x11f4ec
- text_jump UnknownText_0x1ec512
- db "@"
-
-BTGreetingM14: ; 0x11f4f1
- text_jump UnknownText_0x1ec532
- db "@"
-
-BTLossM14: ; 0x11f4f6
- text_jump UnknownText_0x1ec54b
- db "@"
-
-BTWinM14: ; 0x11f4fb
- text_jump UnknownText_0x1ec565
- db "@"
-
-BTGreetingM15: ; 0x11f500
- text_jump UnknownText_0x1ec580
- db "@"
-
-BTLossM15: ; 0x11f505
- text_jump UnknownText_0x1ec59d
- db "@"
-
-BTWinM15: ; 0x11f50a
- text_jump UnknownText_0x1ec5b5
- db "@"
-
-BTGreetingM16: ; 0x11f50f
- text_jump UnknownText_0x1ec5d3
- db "@"
-
-BTLossM16: ; 0x11f514
- text_jump UnknownText_0x1ec5ee
- db "@"
-
-BTWinM16: ; 0x11f519
- text_jump UnknownText_0x1ec60d
- db "@"
-
-BTGreetingM17: ; 0x11f51e
- text_jump UnknownText_0x1ec631
- db "@"
-
-BTLossM17: ; 0x11f523
- text_jump UnknownText_0x1ec651
- db "@"
-
-BTWinM17: ; 0x11f528
- text_jump UnknownText_0x1ec68f
- db "@"
-
-BTGreetingM18: ; 0x11f52d
- text_jump UnknownText_0x1ec6b1
- db "@"
-
-BTLossM18: ; 0x11f532
- text_jump UnknownText_0x1ec6d0
- db "@"
-
-BTWinM18: ; 0x11f537
- text_jump UnknownText_0x1ec708
- db "@"
-
-BTGreetingM19: ; 0x11f53c
- text_jump UnknownText_0x1ec720
- db "@"
-
-BTLossM19: ; 0x11f541
- text_jump UnknownText_0x1ec73e
- db "@"
-
-BTWinM19: ; 0x11f546
- text_jump UnknownText_0x1ec75b
- db "@"
-
-BTGreetingM20: ; 0x11f54b
- text_jump UnknownText_0x1ec77f
- db "@"
-
-BTLossM20: ; 0x11f550
- text_jump UnknownText_0x1ec798
- db "@"
-
-BTWinM20: ; 0x11f555
- text_jump UnknownText_0x1ec7bb
- db "@"
-
-BTGreetingM21: ; 0x11f55a
- text_jump UnknownText_0x1ec7d8
- db "@"
-
-BTLossM21: ; 0x11f55f
- text_jump UnknownText_0x1ec818
- db "@"
-
-BTWinM21: ; 0x11f564
- text_jump UnknownText_0x1ec837
- db "@"
-
-BTGreetingM22: ; 0x11f569
- text_jump UnknownText_0x1ec858
- db "@"
-
-BTLossM22: ; 0x11f56e
- text_jump UnknownText_0x1ec876
- db "@"
-
-BTWinM22: ; 0x11f573
- text_jump UnknownText_0x1ec898
- db "@"
-
-BTGreetingM23: ; 0x11f578
- text_jump UnknownText_0x1ec8b1
- db "@"
-
-BTLossM23: ; 0x11f57d
- text_jump UnknownText_0x1ec8d5
- db "@"
-
-BTWinM23: ; 0x11f582
- text_jump UnknownText_0x1ec8f0
- db "@"
-
-BTGreetingM24: ; 0x11f587
- text_jump UnknownText_0x1ec911
- db "@"
-
-BTLossM24: ; 0x11f58c
- text_jump UnknownText_0x1ec928
- db "@"
-
-BTWinM24: ; 0x11f591
- text_jump UnknownText_0x1ec949
- db "@"
-
-BTGreetingM25: ; 0x11f596
- text_jump UnknownText_0x1ec969
- db "@"
-
-BTLossM25: ; 0x11f59b
- text_jump UnknownText_0x1ec986
- db "@"
-
-BTWinM25: ; 0x11f5a0
- text_jump UnknownText_0x1ec99b
- db "@"
-
-
-
-
-BTGreetingF1: ; 0x11f5a5
- text_jump UnknownText_0x1ec9bd
- db "@"
-
-BTLossF1: ; 0x11f5aa
- text_jump UnknownText_0x1ec9d9
- db "@"
-
-BTWinF1: ; 0x11f5af
- text_jump UnknownText_0x1ec9f7
- db "@"
-
-BTGreetingF2: ; 0x11f5b4
- text_jump UnknownText_0x1eca0a
- db "@"
-
-BTLossF2: ; 0x11f5b9
- text_jump UnknownText_0x1eca2a
- db "@"
-
-BTWinF2: ; 0x11f5be
- text_jump UnknownText_0x1eca47
- db "@"
-
-BTGreetingF3: ; 0x11f5c3
- text_jump UnknownText_0x1eca64
- db "@"
-
-BTLossF3: ; 0x11f5c8
- text_jump UnknownText_0x1eca82
- db "@"
-
-BTWinF3: ; 0x11f5cd
- text_jump UnknownText_0x1eca9d
- db "@"
-
-BTGreetingF4: ; 0x11f5d2
- text_jump UnknownText_0x1ecabf
- db "@"
-
-BTLossF4: ; 0x11f5d7
- text_jump UnknownText_0x1ecade
- db "@"
-
-BTWinF4: ; 0x11f5dc
- text_jump UnknownText_0x1ecafa
- db "@"
-
-BTGreetingF5: ; 0x11f5e1
- text_jump UnknownText_0x1ecb19
- db "@"
-
-BTLossF5: ; 0x11f5e6
- text_jump UnknownText_0x1ecb37
- db "@"
-
-BTWinF5: ; 0x11f5eb
- text_jump UnknownText_0x1ecb55
- db "@"
-
-BTGreetingF6: ; 0x11f5f0
- text_jump UnknownText_0x1ecb70
- db "@"
-
-BTLossF6: ; 0x11f5f5
- text_jump UnknownText_0x1ecb92
- db "@"
-
-BTWinF6: ; 0x11f5fa
- text_jump UnknownText_0x1ecbb6
- db "@"
-
-BTGreetingF7: ; 0x11f5ff
- text_jump UnknownText_0x1ecbd9
- db "@"
-
-BTLossF7: ; 0x11f604
- text_jump UnknownText_0x1ecbf3
- db "@"
-
-BTWinF7: ; 0x11f609
- text_jump UnknownText_0x1ecc15
- db "@"
-
-BTGreetingF8: ; 0x11f60e
- text_jump UnknownText_0x1ecc39
- db "@"
-
-BTLossF8: ; 0x11f613
- text_jump UnknownText_0x1ecc55
- db "@"
-
-BTWinF8: ; 0x11f618
- text_jump UnknownText_0x1ecc75
- db "@"
-
-BTGreetingF9: ; 0x11f61d
- text_jump UnknownText_0x1ecc92
- db "@"
-
-BTLossF9: ; 0x11f622
- text_jump UnknownText_0x1ecca7
- db "@"
-
-BTWinF9: ; 0x11f627
- text_jump UnknownText_0x1eccc1
- db "@"
-
-BTGreetingF10: ; 0x11f62c
- text_jump UnknownText_0x1eccd7
- db "@"
-
-BTLossF10: ; 0x11f631
- text_jump UnknownText_0x1eccef
- db "@"
-
-BTWinF10: ; 0x11f636
- text_jump UnknownText_0x1ecd0e
- db "@"
-
-BTGreetingF11: ; 0x11f63b
- text_jump UnknownText_0x1ecd2b
- db "@"
-
-BTLossF11: ; 0x11f640
- text_jump UnknownText_0x1ecd4d
- db "@"
-
-BTWinF11: ; 0x11f645
- text_jump UnknownText_0x1ecd6b
- db "@"
-
-BTGreetingF12: ; 0x11f64a
- text_jump UnknownText_0x1ecd8d
- db "@"
-
-BTLossF12: ; 0x11f64f
- text_jump UnknownText_0x1ecdaf
- db "@"
-
-BTWinF12: ; 0x11f654
- text_jump UnknownText_0x1ecdcf
- db "@"
-
-BTGreetingF13: ; 0x11f659
- text_jump UnknownText_0x1ecded
- db "@"
-
-BTLossF13: ; 0x11f65e
- text_jump UnknownText_0x1ece0d
- db "@"
-
-BTWinF13: ; 0x11f663
- text_jump UnknownText_0x1ece2a
- db "@"
-
-BTGreetingF14: ; 0x11f668
- text_jump UnknownText_0x1ece4b
- db "@"
-
-BTLossF14: ; 0x11f66d
- text_jump UnknownText_0x1ece70
- db "@"
-
-BTWinF14: ; 0x11f672
- text_jump UnknownText_0x1ece8a
- db "@"
-
-BTGreetingF15: ; 0x11f677
- text_jump UnknownText_0x1ecea8
- db "@"
-
-BTLossF15: ; 0x11f67c
- text_jump UnknownText_0x1ecec9
- db "@"
-
-BTWinF15: ; 0x11f681
- text_jump UnknownText_0x1ecee8
- db "@"
diff --git a/misc/battle_tower_5c.asm b/misc/battle_tower_5c.asm
deleted file mode 100755
index 54948591c..000000000
--- a/misc/battle_tower_5c.asm
+++ /dev/null
@@ -1,1772 +0,0 @@
-BattleTowerRoomMenu: ; 1700b0
-; special
- call InitBattleTowerChallengeRAM
- callba _BattleTowerRoomMenu
- ret
-; 1700ba
-
-Function1700ba: ; 1700ba
- call InitBattleTowerChallengeRAM
- callba Function11811a
- ret
-; 1700c4
-
-Function1700c4: ; 1700c4
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
-
- call Function17042c
-
- ld a, $5
- call GetSRAMBank
- ld a, $1
- ld [$be45], a
- xor a
- ld [$be46], a
- ld hl, w3_dffc
- ld de, $aa41
- ld bc, 4
- call CopyBytes
- ld hl, w3_d202Name
- ld de, $aa8e
- ld bc, 7 * $cc ; length of battle tower struct from japanese games?
- call CopyBytes
- ld hl, $aa5d ; some sort of count
- ld a, [hl]
- inc [hl]
- inc hl
- sla a
- sla a
- ld e, a
- ld d, $0
- add hl, de
- ld e, l
- ld d, h
- ld hl, w3_dffc
- ld bc, 4
- call CopyBytes
- call CloseSRAM
- pop af
- ld [rSVBK], a
- ret
-; 170114
-
-Function170114: ; 170114
- call InitBattleTowerChallengeRAM
- call .Function170121
- callba Function11805f
- ret
-; 170121
-
-.Function170121: ; 170121
- ld a, $5
- call GetSRAMBank
- ld hl, $a948
- ld de, wMisc
- ld bc, $f6 ; 246
- call CopyBytes
- call CloseSRAM
- call Function170c8b
- ret
-; 170139
-
-Function170139: ; 170139
-; Convert the 4-digit decimal number at 5:aa41 into binary
- ld a, $5
- call GetSRAMBank
- ld de, $aa41
- ld h, $0
- ld l, h
- ld bc, 1000
- call .DecToBin
- ld bc, 100
- call .DecToBin
- ld bc, 10
- call .DecToBin
- ld a, [de]
- ld c, a
- ld b, $0
- add hl, bc
- call CloseSRAM
-; Store that number in wMisc
- ld a, h
- ld [wMisc], a
- ld a, l
- ld [wMisc + 1], a
- ld hl, wBT_OTTempPkmn1DVs
- ld a, [PlayerID]
- ld [hli], a
- ld a, [PlayerID + 1]
- ld [hli], a
- ld a, [wSecretID]
- ld [hli], a
- ld a, [wSecretID + 1]
- ld [hli], a
- ld e, l
- ld d, h
- ld hl, PlayerName
- ld bc, 5 ; Japanese name length
- call CopyBytes
- ld bc, PlayerID
- ld de, PlayerGender
- callba GetMobileOTTrainerClass
- ld de, wBT_OTTempPkmn1CaughtGender
- ld a, c
- ld [de], a
- inc de
- ld a, PartyMons % $100
- ld [wcd49], a
- ld a, PartyMons / $100
- ld [wcd4a], a
- ld a, PartyMonNicknames % $100
- ld [wcd4b], a
- ld a, PartyMonNicknames / $100
- ld [wcd4c], a
- ld a, 3
-.CopyLoop:
- push af
- ld a, [wcd49]
- ld l, a
- ld a, [wcd4a]
- ld h, a
- ld bc, PARTYMON_STRUCT_LENGTH
- call CopyBytes
- ld a, l
- ld [wcd49], a
- ld a, h
- ld [wcd4a], a
- ld a, [wcd4b]
- ld l, a
- ld a, [wcd4c]
- ld h, a
- ld bc, $0006
- call CopyBytes
- ld a, l
- ld [wcd4b], a
- ld a, h
- ld [wcd4c], a
- pop af
- dec a
- jr nz, .CopyLoop
- ld a, $4
- call GetSRAMBank
- ld hl, $a013
- ld bc, $24
- call CopyBytes
- call CloseSRAM
- ld a, $5
- call GetSRAMBank
- ld hl, $a894
- ld bc, 6
- call CopyBytes
- ld hl, wMisc
- ld de, $a948
- ld bc, $f6
- call CopyBytes
- call CloseSRAM
- ret
-; 17020c
-
-.DecToBin: ; 17020c
- ld a, [de]
- inc de
- and a
- ret z
-
-.digit_loop
- add hl, bc
- dec a
- jr nz, .digit_loop
- ret
-; 170215
-
-BattleTowerBattle: ; 170215
- xor a
- ld [wBattleTowerBattleEnded], a
- call _BattleTowerBattle
- ret
-; 17021d
-
-EmptySpecial_17021d: ; 17021d
- ret
-; 17021e
-
-InitBattleTowerChallengeRAM: ; 17021e
- xor a
- ld [wBattleTowerBattleEnded], a
- ld [wNrOfBeatenBattleTowerTrainers], a
- ld [wcf65], a
- ld [wcf66], a
- ret
-; 17022c
-
-_BattleTowerBattle: ; 17022c
-.loop
- call .do_dw
- call DelayFrame
- ld a, [wBattleTowerBattleEnded]
- cp $1
- jr nz, .loop
- ret
-; 17023a
-
-.do_dw ; 17023a
- ld a, [wBattleTowerBattleEnded]
- ld e, a
- ld d, 0
- ld hl, .dw
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-; 170249
-
-.dw ; 170249
- dw RunBattleTowerTrainer
- dw SkipBattleTowerTrainer
-; 17024d
-
-RunBattleTowerTrainer: ; 17024d
- ld a, [Options]
- push af
- ld hl, Options
- set BATTLE_SHIFT, [hl] ; SET MODE
-
- ld a, [InBattleTowerBattle]
- push af
- or $1
- ld [InBattleTowerBattle], a
-
- xor a
- ld [wLinkMode], a
- callba TrainerRankings_Healings
- callba HealParty
- call ReadBTTrainerParty
- call Clears5_a89a
-
- predef StartBattle
-
- callba LoadPokemonData
- callba HealParty
- ld a, [wBattleResult]
- ld [ScriptVar], a
- and a
- jr nz, .lost
- ld a, BANK(sNrOfBeatenBattleTowerTrainers)
- call GetSRAMBank
- ld a, [sNrOfBeatenBattleTowerTrainers]
- ld [wNrOfBeatenBattleTowerTrainers], a
- call CloseSRAM
- ld hl, StringBuffer3
- ld a, [wNrOfBeatenBattleTowerTrainers]
- add "1"
- ld [hli], a
- ld a, "@"
- ld [hl], a
-
-.lost
- pop af
- ld [InBattleTowerBattle], a
- pop af
- ld [Options], a
- ld a, $1
- ld [wBattleTowerBattleEnded], a
- ret
-
-
-ReadBTTrainerParty: ; 1702b7
-; Initialise the BattleTower-Trainer and his Pkmn
- call CopyBTTrainer_FromBT_OT_TowBT_OTTemp
-
-; Check the nicknames for illegal characters, and replace bad nicknames
-; with their species names.
- ld de, wBT_OTTempPkmn1Name ; $c643
- ld c, PKMN_NAME_LENGTH
- callba CheckStringForErrors
- jr nc, .skip_mon_1
-
- ld a, [wBT_OTTempPkmn1]
- ld [wNamedObjectIndexBuffer], a
- call GetPokemonName
- ld l, e
- ld h, d
- ld de, wBT_OTTempPkmn1Name ; $c643
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
-
-.skip_mon_1
- ld de, wBT_OTTempPkmn2Name ; $c67e
- ld c, PKMN_NAME_LENGTH
- callba CheckStringForErrors
- jr nc, .skip_mon_2
- ld a, [wBT_OTTempPkmn2] ; [$c64e]
- ld [wNamedObjectIndexBuffer], a
- call GetPokemonName
- ld l, e
- ld h, d
- ld de, wBT_OTTempPkmn2Name ; $c67e
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
-
-.skip_mon_2
- ld de, wBT_OTTempPkmn3Name ; $c686 + 51 = $c6b9
- ld c, PKMN_NAME_LENGTH
- callba CheckStringForErrors
- jr nc, .skip_mon_3
- ld a, [wBT_OTTempPkmn3] ; [$c689]
- ld [wNamedObjectIndexBuffer], a
- call GetPokemonName
- ld l, e
- ld h, d
- ld de, wBT_OTTempPkmn3Name ; $c686 + 51 = $c6b9
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
-
-.skip_mon_3
-; Add the terminator character to each of these names
- ld a, "@"
- ld [wBT_OTTempPkmn1NameEnd - 1], a ; $c64d
- ld [wBT_OTTempPkmn2NameEnd - 1], a ; $c688
- ld [wBT_OTTempPkmn3NameEnd - 1], a ; $c68a + 57 = $c6c3
-; Fix errors in the movesets
- call CheckBTMonMovesForErrors
-; Repair the trainer name if needed, then copy it to OTPlayerName
- ld de, wBT_OTTempName
- ld c, NAME_LENGTH - 1
- callba CheckStringForErrors
- jr nc, .trainer_name_okay
- ld hl, BT_ChrisName
- jr .done_trainer_name
-
-.trainer_name_okay
- ld hl, wBT_OTTempName ; 0xc608
-
-.done_trainer_name
- ld de, OTPlayerName
- ld bc, NAME_LENGTH - 1
- call CopyBytes
- ld a, "@"
- ld [de], a
-
- ld hl, wBT_OTTempTrainerClass
- ld a, [hli]
- ld [OtherTrainerClass], a
- ld a, OTPartyMonNicknames % $100
- ld [BGMapBuffer], a
- ld a, OTPartyMonNicknames / $100
- ld [BGMapBuffer + 1], a
-
- ; Copy Pkmn into Memory from the address in hl
- ld de, OTPartyMon1Species
- ld bc, OTPartyCount
- ld a, BATTLETOWER_NROFPKMNS ; Number of Pkmn the BattleTower-Trainer has
- ld [bc], a
- inc bc
-.otpartymon_loop
- push af
- ld a, [hl]
- ld [bc], a
- inc bc
- push bc
- ld bc, PARTYMON_STRUCT_LENGTH
- call CopyBytes
- push de
- ld a, [BGMapBuffer]
- ld e, a
- ld a, [BGMapBuffer + 1]
- ld d, a
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
- ld a, e
- ld [BGMapBuffer], a
- ld a, d
- ld [BGMapBuffer + 1], a
- pop de
- pop bc
- pop af
- dec a
- and a
- jr nz, .otpartymon_loop
- ld a, -1
- ld [bc], a
- ret
-; 170394
-
-ValidateBTParty: ; 170394
-; Check for and fix errors in party data
- ld hl, wBT_OTTempPkmn1Species
- ld d, BATTLETOWER_NROFPKMNS
-.pkmn_loop
- push de
- push hl
- ld b, h
- ld c, l
- ld a, [hl]
- and a
-idx = $ff
-rept ($ff +- NUM_POKEMON)
- jr z, .invalid
- cp idx
-idx = idx +- 1
-endr
- jr nz, .valid
-
-.invalid
- ld a, SMEARGLE
- ld [hl], a
-
-.valid
- ld [CurSpecies], a
- call GetBaseData
- ld a, $5
- call GetSRAMBank
- ld a, [$b2fb] ; s5_b2fb ; max level?
- call CloseSRAM
- ld e, a
- ld hl, MON_LEVEL
- add hl, bc
- ld a, [hl]
- cp MIN_LEVEL
- ld a, MIN_LEVEL
- jr c, .load
- ld a, [hl]
- cp e
- jr c, .dont_load
- ld a, e
-
-.load
- ld [hl], a
-
-.dont_load
- ld [CurPartyLevel], a
- ld hl, MON_MOVES
- add hl, bc
- ld d, NUM_MOVES - 1
- ld a, [hli]
- and a
- jr z, .not_move
- cp NUM_ATTACKS + 1
- jr nc, .not_move
- jr .valid_move
-
-.not_move
- dec hl
- ld a, POUND
- ld [hli], a
- xor a
- ld [hli], a
- ld [hli], a
- ld [hl], a
- jr .done_moves
-
-.valid_move
- ld a, [hl]
- cp NUM_ATTACKS + 1
- jr c, .next
- ld [hl], $0
-
-.next
- inc hl
- dec d
- jr nz, .valid_move
-
-.done_moves
- ld hl, MON_MAXHP
- add hl, bc
- ld d, h
- ld e, l
- push hl
- push de
- ld hl, MON_STAT_EXP - 1
- add hl, bc
- ld b, $1
- predef CalcPkmnStats
- pop de
- pop hl
- dec de
- dec de
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hl]
- ld [de], a
- pop hl
- ld bc, PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH
- add hl, bc
- pop de
- dec d
- jp nz, .pkmn_loop
- ret
-; 170426
-
-BT_ChrisName: ; 170426
- db "CHRIS@"
-; 17042c
-
-Function17042c: ; 17042c
- ld hl, w3_d202TrainerData
- ld a, BATTLETOWER_NROFTRAINERS
-.loop
- push af
- push hl
- ld c, BATTLETOWER_TRAINERDATALENGTH / 2
-.loop2
- ; First byte is a comparison value.
- ld a, [hli]
- ld b, a
- ; Second byte is a lookup index.
- ld a, [hli]
- and a
- jr z, .empty
- cp 15
- jr nc, .copy_data
-
- push hl
- ld hl, Unknown_170470
- dec a
- ld e, a
- ld d, 0
- add hl, de
- ld a, [hl]
- pop hl
-
- ; If Unknown_170470[a-1] <= b, overwrite the current trainer's data
- ; with Unknown17047e, and exit the inner loop.
- cp b
- jr c, .copy_data
- jr z, .copy_data
- jr .next_iteration
-
-.empty
- ; If a == 0 and b >= $fc, overwrite the current trainer's data with
- ; Unknown17047e, and exit the inner loop.
- ld a, b
- cp $fc
- jr nc, .copy_data
-
-.next_iteration
- dec c
- jr nz, .loop2
- jr .next_trainer
-
-.copy_data
- pop de
- push de
- ld hl, Unknown_17047e
- ld bc, BATTLETOWER_TRAINERDATALENGTH
- call CopyBytes
-
-.next_trainer
- pop hl
- ld de, BATTLE_TOWER_STRUCT_LENGTH
- add hl, de
- pop af
- dec a
- jr nz, .loop
- ret
-; 170470
-
-Unknown_170470:
- db $12
- db $24
- db $45
- db $45
- db $42
- db $42
- db $45
- db $42
- db $27
- db $27
- db $45
- db $27
- db $42
- db $24
-
-Unknown_17047e:
-; see data/battle_tower_2.asm
- db $03, 4
- db $05, 8
- db $03, 5
- db $0e, 6
- db $03, 2
- db $00, 0
- db $39, 7
- db $07, 4
- db $00, 5
- db $04, 7
- db $01, 5
- db $00, 0
- db $0f, 5
- db $14, 7
- db $05, 5
- db $11, 12
- db $0c, 6
- db $06, 4
-
-
-CopyBTTrainer_FromBT_OT_TowBT_OTTemp: ; 1704a2
-; copy the BattleTower-Trainer data that lies at 'BT_OTTrainer' to 'wBT_OTTemp'
- ld a, [rSVBK]
- push af
- ld a, $3 ; BANK(BT_OTTrainer)
- ld [rSVBK], a
-
- ld hl, BT_OTTrainer ; $d100
- ld de, wBT_OTTemp ; wMisc
- ld bc, BATTLE_TOWER_STRUCT_LENGTH
- call CopyBytes
-
- pop af
- ld [rSVBK], a
-
- ld a, BANK(sBattleTowerChallengeState)
- call GetSRAMBank
- ld a, BATTLETOWER_CHALLENGE_IN_PROGESS
- ld [sBattleTowerChallengeState], a
- ld hl, sNrOfBeatenBattleTowerTrainers
- inc [hl]
- call CloseSRAM
-SkipBattleTowerTrainer: ; 1704c9
- ret
-; 1704ca
-
-Function1704ca: ; 1704ca
-; unreferenced mobile function
- ld a, [$be46]
- cp $7
- jr c, .asm_1704d3
- ld a, $6
-
-.asm_1704d3
- ld hl, $afce
- ld de, -$e0
-.asm_1704d9
- and a
- jr z, .asm_1704e0
- add hl, de
- dec a
- jr .asm_1704d9
-
-.asm_1704e0
- ret
-; 1704e1
-
-Function1704e1: ; 1704e1
-; unreferenced special
- call SpeechTextBox
- call FadeToMenu
- call InitBattleTowerChallengeRAM
- call .JumptableLoop
- call CloseSubmenu
- ret
-; 1704f1
-
-.JumptableLoop: ; 1704f1
- call ClearBGPalettes
- call ClearSprites
- call ClearScreen
-.loop
- call JoyTextDelay
- ld a, [wJumptableIndex]
- bit 7, a
- jr nz, .done
- call .DoJumptable
- callba ReloadMapPart
- jr .loop
-
-.done
- ret
-; 170510
-
-.DoJumptable: ; 170510
- ld a, [wJumptableIndex]
- ld e, a
- ld d, 0
- ld hl, .dw
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-; 17051f
-
-.dw ; 17051f
- dw .Jumptable_0
- dw .Jumptable_1
- dw .Jumptable_2
-; 170525
-
-.Jumptable_0: ; 170525
- ld a, $5
- call GetSRAMBank
-
- ld hl, $a89c
- ld de, StringBuffer3
- ld bc, $16
- call CopyBytes
-
- ld hl, $a8b2
- ld de, wMisc
- ld bc, $0096
- call CopyBytes
-
- call CloseSRAM
- hlcoord 1, 1
- ld de, StringBuffer3
- call PlaceString
- hlcoord 1, 3
- ld de, .String_Mail
- call PlaceString
- hlcoord 4, 3
- ld de, StringBuffer4
- call PlaceString
- hlcoord 8, 3
- ld de, .String_PastReaders
- call PlaceString
- call .DrawBorder
- call .PlaceTextItems
- jr .NextJumptableFunction
-
-
-.Jumptable_1:
- call SetPalettes
- call .NextJumptableFunction
-
-
-.Jumptable_2:
- ld hl, hJoyPressed
- ld a, [hl]
- and A_BUTTON
- jr nz, .pressed_a_or_b
- ld a, [hl]
- and B_BUTTON
- jr nz, .pressed_a_or_b
- ld a, [hl]
- and D_UP
- jr nz, .pressed_up
- ld a, [hl]
- and D_DOWN
- jr nz, .pressed_down
- ret
-
-.pressed_up
- ld a, [wNrOfBeatenBattleTowerTrainers]
- and a
- ret z
- sub 15
- ld [wNrOfBeatenBattleTowerTrainers], a
- call .PlaceTextItems
- ret
-
-.pressed_down
- ld a, [wNrOfBeatenBattleTowerTrainers]
- cp 60
- ret z
- add 15
- ld [wNrOfBeatenBattleTowerTrainers], a
- call .PlaceTextItems
- ret
-
-.pressed_a_or_b
- ld hl, wJumptableIndex
- set 7, [hl]
- ret
-
-.NextJumptableFunction:
- ld hl, wJumptableIndex
- inc [hl]
- ret
-; 1705b7
-
-.DrawBorder: ; 1705b7
- hlcoord 0, 4
- ld a, $79
- ld [hli], a
- ld c, SCREEN_WIDTH - 2
-.top_border_loop
- ld a, $7a
- ld [hli], a
- dec c
- jr nz, .top_border_loop
- ld a, $7b
- ld [hli], a
- ld de, SCREEN_WIDTH
- ld c, 12
-.left_border_loop
- ld a, $7c
- ld [hl], a
- add hl, de
- dec c
- jr nz, .left_border_loop
- ld a, $7d
- ld [hli], a
- ld c, SCREEN_WIDTH - 2
-.bottom_border_loop
- ld a, $7a
- ld [hli], a
- dec c
- jr nz, .bottom_border_loop
- ld a, $7e
- ld [hl], a
- ld de, -SCREEN_WIDTH
- add hl, de
- ld c, 12
-.right_border_loop
- ld a, $7c
- ld [hl], a
- add hl, de
- dec c
- jr nz, .right_border_loop
- ret
-; 1705f0
-
-.PlaceTextItems: ; 1705f0
- call .ClearBox
- call .PlaceUpDownArrows
- ld a, $50
- ld [wcd4e], a
- ld hl, wMisc
- ld a, [wNrOfBeatenBattleTowerTrainers]
- ld c, a
- xor a
- ld b, a
- add hl, bc
- push hl
- pop bc
- hlcoord 1, 6
- ld a, 6
-.loop1
- push af
- push hl
- ld a, 3
-.loop2
- push af
- ld de, wcd49
- ld a, [bc]
- and a
- jr z, .fill_with_e3
-; .copy
- ld a, 5
-.loop3a
- push af
- ld a, [bc]
- ld [de], a
- inc bc
- inc de
- pop af
- dec a
- jr nz, .loop3a
- jr .rejoin
-
-.fill_with_e3
- ld a, 5
-.loop3b
- push af
- ld a, $e3
- ld [de], a
- inc de
- inc bc
- pop af
- dec a
- jr nz, .loop3b
-
-.rejoin
- ld de, wcd49
- push bc
- call PlaceString
- ld de, 6
- add hl, de
- pop bc
- pop af
- dec a
- jr nz, .loop2
- pop hl
- ld de, $28
- add hl, de
- pop af
- dec a
- jr nz, .loop1
- ret
-; 17064b
-
-.ClearBox: ; 17064b
- hlcoord 1, 5
- xor a
- ld b, 12
-.clearbox_row
- ld c, SCREEN_WIDTH - 2
-.clearbox_column
- ld [hli], a
- dec c
- jr nz, .clearbox_column
- inc hl
- inc hl
- dec b
- jr nz, .clearbox_row
- ret
-; 17065d
-
-.PlaceUpDownArrows: ; 17065d
- ld a, [wNrOfBeatenBattleTowerTrainers]
- and a
- jr z, .nope
- hlcoord 18, 5
- ld a, "▲"
- ld [hl], a
-
-.nope
- ld a, [wNrOfBeatenBattleTowerTrainers]
- cp 60
- ret z
- hlcoord 18, 16
- ld a, "▼"
- ld [hl], a
- ret
-; 170676
-
-.String_Mail: ; 170676
- db "ルーム@"
-; 17067a
-
-.String_PastReaders: ; 17067a
- db "れきだいりーダーいちらん@"
-; 170687
-
-BattleTowerAction: ; 170687
- ld a, [ScriptVar]
- ld e, a
- ld d, 0
- ld hl, .dw
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-; 170696
-
-
-.dw ; 170696 (5c:4696)
- dw BattleTowerAction_CheckExplanationRead ; 0x00
- dw BattleTowerAction_SetExplanationRead ; 0x01
- dw BattleTowerAction_GetChallengeState ; 0x02
- dw BattleTowerAction_SetByteToQuickSaveChallenge ; 0x03
- dw BattleTowerAction_SetByteToCancelChallenge ; 0x04
- dw Function1707ac ; 0x05
- dw Function1707f4 ; 0x06
- dw SaveBattleTowerLevelGroup ; 0x07
- dw LoadBattleTowerLevelGroup ; 0x08
- dw BattleTower_CheckSaveFileExistsAndIsYours ; 0x09
- dw Function1708b1 ; 0x0a
- dw CheckMobileEventIndex ; 0x0b
- dw Function1708c8 ; 0x0c
- dw Function1708f0 ; 0x0d
- dw BattleTowerAction_EggTicket ; 0x0e
- dw Function1709aa ; 0x0f
- dw Function1709bb ; 0x10
- dw Function170a9c ; 0x11
- dw Function170aa0 ; 0x12
- dw Function170aaf ; 0x13
- dw Function170abe ; 0x14
- dw Function170ad7 ; 0x15
- dw Function170807 ; 0x16
- dw Function17081d ; 0x17
- dw BattleTowerAction_LevelCheck ; 0x18
- dw BattleTowerAction_UbersCheck ; 0x19
- dw ResetBattleTowerTrainersSRAM ; 0x1a
- dw BattleTower_GiveReward ; 0x1b
- dw Function17071b ; 0x1c
- dw Function170729 ; 0x1d
- dw BattleTower_RandomlyChooseReward ; 0x1e
- dw BattleTower_SaveOptions ; 0x1f
-
-
-; Reset the save memory for BattleTower-Trainers (Counter and all 7 TrainerBytes)
-ResetBattleTowerTrainersSRAM: ; 1706d6 (5c:46d6) BattleTowerAction $1a
- ld a, BANK(sBTTrainers)
- call GetSRAMBank
-
- ld a, $ff
- ld hl, sBTTrainers
- ld bc, BATTLETOWER_NROFTRAINERS
- call ByteFill
-
- xor a
- ld [sNrOfBeatenBattleTowerTrainers], a
-
- call CloseSRAM
-
- ret
-
-BattleTower_GiveReward: ; 1706ee (5c:46ee) BattleTowerAction $1b
- ld a, BANK(sBattleTowerReward)
- call GetSRAMBank
-
- ld a, [sBattleTowerReward]
- call CloseSRAM
- ld [ScriptVar], a
- ld hl, NumItems
- ld a, [hli]
- cp MAX_ITEMS
- ret c
- ld b, MAX_ITEMS
- ld a, [ScriptVar]
- ld c, a
-.loop
- ld a, [hli]
- cp c
- jr nz, .next
- ld a, [hl]
- cp 95
- ret c
-.next
- inc hl
- dec b
- jr nz, .loop
- ld a, POTION
- ld [ScriptVar], a
- ret
-
-Function17071b: ; 17071b (5c:471b) BattleTowerAction $1c
- ld a, BANK(sBattleTowerChallengeState)
- call GetSRAMBank
- ld a, BATTLETOWER_WON_CHALLENGE
- ld [sBattleTowerChallengeState], a
- call CloseSRAM
- ret
-
-Function170729: ; 170729 (5c:4729) BattleTowerAction $1d
- ld a, BANK(sBattleTowerChallengeState)
- call GetSRAMBank
- ld a, BATTLETOWER_RECEIVED_REWARD
- ld [sBattleTowerChallengeState], a
- call CloseSRAM
- ret
-
-BattleTower_SaveOptions: ; 170737 (5c:4737) BattleTowerAction $1f
- callba SaveOptions
- ret
-
-BattleTower_RandomlyChooseReward: ; 17073e (5c:473e) BattleTowerAction $1e
-; Generate a random stat boosting item.
-.loop
- call Random
- ld a, [hRandomAdd]
- and $7
- cp 6
- jr c, .okay
- sub 6
-.okay
- add HP_UP
- cp LUCKY_PUNCH
- jr z, .loop
- push af
- ld a, BANK(sBattleTowerReward)
- call GetSRAMBank
- pop af
- ld [sBattleTowerReward], a
- call CloseSRAM
- ret
-
-BattleTowerAction_CheckExplanationRead: ; 17075f (5c:475f) BattleTowerAction $00
- call BattleTower_CheckSaveFileExistsAndIsYours
- ld a, [ScriptVar]
- and a
- ret z
-
- ld a, BANK(s1_be4f)
- call GetSRAMBank
- ld a, [s1_be4f]
- and $2
- ld [ScriptVar], a
- call CloseSRAM
- ret
-
-BattleTowerAction_GetChallengeState: ; 170778 (5c:4778) BattleTowerAction $02
- ld hl, sBattleTowerChallengeState
- ld a, BANK(sBattleTowerChallengeState)
- call GetSRAMBank
- ld a, [hl]
- ld [ScriptVar], a
- call CloseSRAM
- ret
-
-BattleTowerAction_SetExplanationRead: ; 170788 (5c:4788) BattleTowerAction $01
- ld a, BANK(s1_be4f)
- call GetSRAMBank
- ld a, [s1_be4f]
- or $2
- ld [s1_be4f], a
- call CloseSRAM
- ret
-
-BattleTowerAction_SetByteToQuickSaveChallenge: ; 170799 (5c:4799) BattleTowerAction $03
- ld c, BATTLETOWER_SAVED_AND_LEFT
- jr asm_17079f
-
-BattleTowerAction_SetByteToCancelChallenge: ; 17079d (5c:479d) BattleTowerAction $04
- ld c, BATTLETOWER_NO_CHALLENGE
-asm_17079f: ; 17079f (5c:479f)
- ld a, BANK(sBattleTowerChallengeState)
- call GetSRAMBank
- ld a, c
- ld [sBattleTowerChallengeState], a
- call CloseSRAM
- ret
-
-Function1707ac: ; 1707ac (5c:47ac) BattleTowerAction $05
- ld a, $5
- call GetSRAMBank
- ld a, [$aa8c]
- ld b, a
- ld a, [$be46]
- ld [ScriptVar], a
- call CloseSRAM
- and a
- ret z
- ld a, b
- cp $2
- jr nc, .asm_1707ef
- push bc
- call UpdateTime
- pop bc
- ld a, $5
- call GetSRAMBank
- ld a, [$aa8b]
- call CloseSRAM
- ld c, a
- ld a, [CurDay]
- sub c
- jr c, .asm_1707e5
- cp $8
- jr nc, .asm_1707ef
- ld a, b
- and a
- jr nz, .asm_1707ef
- ret
-.asm_1707e5
- ld hl, CurDay
- ld a, $8c
- sub c
- add [hl]
- cp $8
- ret c
-.asm_1707ef
- ld a, $8
- ld [ScriptVar], a
-
-Function1707f4: ; 1707f4 (5c:47f4) BattleTowerAction $06
- ld a, $5
- call GetSRAMBank
- xor a
- ld [$be46], a
- ld [$aa8b], a
- ld [$aa8c], a
- call CloseSRAM
- ret
-
-Function170807: ; 170807 (5c:4807) BattleTowerAction $16
- call UpdateTime
- ld a, $5
- call GetSRAMBank
- ld a, [CurDay]
- ld [$b2f9], a
- xor a
- ld [$b2fa], a
- call CloseSRAM
- ret
-
-Function17081d: ; 17081d (5c:481d) BattleTowerAction $17
- xor a
- ld [ScriptVar], a
- ld a, $5
- call GetSRAMBank
- ld a, [$b2f9]
- ld c, a
- ld a, [$b2fa]
- ld b, a
- call CloseSRAM
- cp $2
- jr nc, .asm_170853
- push bc
- call UpdateTime
- pop bc
- ld a, [CurDay]
- sub c
- jr c, .asm_170849
- cp $b
- jr nc, .asm_170853
- ld a, b
- and a
- jr nz, .asm_170853
- ret
-
-.asm_170849
- ld hl, CurDay
- ld a, 140
- sub c
- add [hl]
- cp $b
- ret c
-.asm_170853
- ld a, $1
- ld [ScriptVar], a
- ld a, $5
- call GetSRAMBank
- xor a
- ld [$b2f9], a
- ld [$b2fa], a
- call CloseSRAM
- ret
-
-SaveBattleTowerLevelGroup: ; 170868 (5c:4868) BattleTowerAction $07
- ld a, BANK(sBTChoiceOfLevelGroup)
- call GetSRAMBank
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
- ld a, [wBTChoiceOfLvlGroup]
- ld [sBTChoiceOfLevelGroup], a
- pop af
- ld [rSVBK], a
- call CloseSRAM
- ret
-
-LoadBattleTowerLevelGroup: ; 170881 (5c:4881) BattleTowerAction $08 ; Load level group choice
- ld a, BANK(sBTChoiceOfLevelGroup)
- call GetSRAMBank
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
- ld a, [sBTChoiceOfLevelGroup]
- ld [wBTChoiceOfLvlGroup], a
- pop af
- ld [rSVBK], a
- call CloseSRAM
- ret
-
-BattleTower_CheckSaveFileExistsAndIsYours: ; 17089a BattleTowerAction $09
- ld a, [wSaveFileExists]
- and a
- jr z, .nope
- callba CompareLoadedAndSavedPlayerID
- jr z, .yes
- xor a
- jr .nope
-
-.yes
- ld a, $1
-
-.nope
- ld [ScriptVar], a
- ret
-; 1708b1
-
-
-Function1708b1: ; 1708b1 (5c:48b1) BattleTowerAction $0a
- xor a
- ld [MusicFade], a
- call MaxVolume
- ret
-
-CheckMobileEventIndex: ; 1708b9 (5c:48b9) BattleTowerAction $0b something to do with GS Ball
- ld a, BANK(sMobileEventIndex)
- call GetSRAMBank
- ld a, [sMobileEventIndex]
- ld [ScriptVar], a
- call CloseSRAM
- ret
-
-Function1708c8: ; 1708c8 (5c:48c8) BattleTowerAction $0c
- call UpdateTime
- ld a, $5
- call GetSRAMBank
- ld a, [CurDay]
- ld [$aa8b], a
- xor a
- ld [$aa8c], a
- ld a, [$aa5d]
- cp $2
- jr nc, .asm_1708ec
- ld a, [CurDay]
- ld [$aa48], a
- ld a, $1
- ld [$aa47], a
-.asm_1708ec
- call CloseSRAM
- ret
-
-Function1708f0: ; 1708f0 (5c:48f0) BattleTowerAction $0d
- xor a
- ld [ScriptVar], a
- call UpdateTime
- ld a, $5
- call GetSRAMBank
- ld a, [$aa48]
- ld c, a
- ld a, [$aa47]
- call CloseSRAM
- and a
- ret z
- ld hl, CurDay
- ld a, c
- cp [hl]
- jr nz, Function170923
- ld a, $5
- call GetSRAMBank
- ld a, [$aa5d]
- call CloseSRAM
- cp $5
- ret c
- ld a, $1
- ld [ScriptVar], a
- ret
-
-
-Function170923: ; 170923
- ld a, $5
- call GetSRAMBank
- xor a
- ld [$aa48], a
- ld [$aa47], a
- ld hl, $aa5d
- ld bc, $0011
- call ByteFill
- call CloseSRAM
- ret
-; 17093c
-
-
-BattleTowerAction_EggTicket: ; 17093c (5c:493c) BattleTowerAction $0e
- xor a
- ld [ScriptVar], a
- ld a, EGG_TICKET
- ld [CurItem], a
- ld hl, NumItems
- call CheckItem
- ret nc
- ld a, [PartyCount]
- ld b, 0
- ld c, a
- ld hl, PartySpecies
-.loop
- ld a, [hli]
- cp EGG
- jr nz, .not_egg
- push hl
- ld hl, PartyMonOT ; wddff (aliases: PartyMonOT)
- ld de, $6 ; NAME_LENGTH
- ld a, b
- and a
- jr z, .skip
-.loop2
- add hl, de
- dec a
- jr nz, .loop2
-.skip
- ld de, String_1709a4
- ld a, $6 ; NAME_LENGTH
-.compare_loop
- push af
- ld a, [de]
- inc de
- cp [hl]
- inc hl
- jr nz, .different
- pop af
- dec a
- jr nz, .compare_loop
-rept 4
- dec hl
-endr
- ld a, "@"
- ld [hli], a
- ld [hli], a
- pop hl
- ld a, EGG_TICKET
- ld [CurItem], a
- ld a, 1
- ld [wItemQuantityChangeBuffer], a
- ld a, -1
- ld [CurItemQuantity], a
- ld hl, NumItems
- call TossItem
- ld a, $1
- ld [ScriptVar], a
- ret
-
-.different
- pop af
- pop hl
-.not_egg
- inc b
- dec c
- jr nz, .loop
- ret
-; 1709a4 (5c:49a4)
-
-String_1709a4: ; 1709a4
- db "なぞナゾ@@"
-
-Function1709aa: ; 1709aa (5c:49aa) BattleTowerAction $0f
- ld a, [rSVBK]
- push af
- ld a, BANK(w3_d090)
- ld [rSVBK], a
- ld a, [w3_d090]
- ld [ScriptVar], a
- pop af
- ld [rSVBK], a
- ret
-
-Function1709bb: ; 1709bb (5c:49bb) BattleTowerAction $10
- xor a
- ld [ScriptVar], a
- ld a, $5
- call GetSRAMBank
- ld a, [$a800]
- call CloseSRAM
- cp 6
- jr nc, .invalid
- ld e, a
- ld d, 0
- ld hl, Jumptable_1709e7
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-.invalid
- ld a, $5
- call GetSRAMBank
- xor a
- ld [$a800], a
- call CloseSRAM
- ret
-; 1709e7 (5c:49e7)
-
-Jumptable_1709e7: ; 1709e7
- dw .NoAction
- dw .NoAction
- dw .DoAction1
- dw .DoAction1
- dw .Action4
- dw .Action5
-; 1709f3
-
-.DoAction1: ; 1709f3
- ld a, $5
- call GetSRAMBank
- ld a, $1
- ld [$a800], a
- call CloseSRAM
-
-.NoAction: ; 170a00
- ret
-; 170a01
-
-.Action4: ; 170a01
- ld a, $5
- call GetSRAMBank
- ld hl, $b023
- ld de, wMisc
- ld bc, $0069
- call CopyBytes
- ld a, [$a825]
- ld [wcd30], a
- ld a, [$a826]
- ld [wcd31], a
- call CloseSRAM
- callba Function11b6b4
- callba Function17d0f3
- ld a, $1
- ld [ScriptVar], a
- ret
-; 170a33
-
-.Action5: ; 170a33
- ld a, $0
- call GetSRAMBank
- ld hl, wRTC
- ld de, wMisc
- ld bc, $0004
- call CopyBytes
- call CloseSRAM
- ld a, $5
- call GetSRAMBank
- ld hl, $b08c
- ld de, wMisc
- ld c, $4
-.compare_loop
- ld a, [de]
- inc de
- cp [hl]
- jr nz, .different
- inc hl
- dec c
- jr nz, .compare_loop
- call CloseSRAM
- ld a, [MapGroup]
- ld b, a
- ld a, [MapNumber]
- ld c, a
- call GetMapTrigger
- ld a, d
- or e
- jr z, .no_trigger
- ld a, [de]
- and a
- ret nz
-
-.no_trigger
- ld a, $1
- ld [ScriptVar], a
- ret
-
-.different
- call CloseSRAM
- ld a, $5
- call GetSRAMBank
- xor a
- ld [$a800], a
- call CloseSRAM
- ld [ScriptVar], a
- ld a, [MapGroup]
- ld b, a
- ld a, [MapNumber]
- ld c, a
- call GetMapTrigger
- ld a, d
- or e
- jr z, .no_trigger_2
- xor a
- ld [de], a
-
-.no_trigger_2
- ret
-; 170a9c
-
-Function170a9c: ; 170a9c (5c:4a9c) BattleTowerAction $11
- ld c, $0
- jr asm_170aa2
-
-Function170aa0: ; 170aa0 (5c:4aa0) BattleTowerAction $12
- ld c, $1
-asm_170aa2: ; 170aa2 (5c:4aa2)
- ld a, $5
- call GetSRAMBank
- ld a, c
- ld [$aa8d], a
- call CloseSRAM
- ret
-
-Function170aaf: ; 170aaf (5c:4aaf) BattleTowerAction $13
- ld a, $5
- call GetSRAMBank
- ld a, [$aa8d]
- ld [ScriptVar], a
- call CloseSRAM
- ret
-
-Function170abe: ; 170abe (5c:4abe) BattleTowerAction $14
- call BattleTower_CheckSaveFileExistsAndIsYours
- ld a, [ScriptVar]
- and a
- ret z
-
- ld a, BANK(s1_be4f)
- call GetSRAMBank
- ld a, [s1_be4f]
- and $1
- ld [ScriptVar], a
- call CloseSRAM
- ret
-
-Function170ad7: ; 170ad7 (5c:4ad7) BattleTowerAction $15
- ld a, BANK(s1_be4f)
- call GetSRAMBank
- ld a, [s1_be4f]
- or $1
- ld [s1_be4f], a
- call CloseSRAM
- ret
-
-BattleTowerAction_LevelCheck: ; 170ae8 (5c:4ae8) BattleTowerAction $18
- ld a, $5
- call GetSRAMBank
- ld a, [$b2fb]
- call CloseSRAM
- ld c, 10
- call SimpleDivide
- ld a, b
- ld [wcd4f], a
- xor a
- ld [ScriptVar], a
- callba BattleTower_LevelCheck ; level check
- ret nc
- ld a, $5
- call GetSRAMBank
- ld a, [$b2fb]
- call CloseSRAM
- ld [ScriptVar], a
- ret
-
-BattleTowerAction_UbersCheck: ; 170b16 (5c:4b16) BattleTowerAction $19
- ld a, $5
- call GetSRAMBank
- ld a, [$b2fb]
- call CloseSRAM
- ld c, 10
- call SimpleDivide
- ld a, b
- ld [wcd4f], a
- xor a
- ld [ScriptVar], a
- callba BattleTower_UbersCheck
- ret nc
- ld a, $5
- call GetSRAMBank
- ld a, [$b2fb]
- call CloseSRAM
- ld [ScriptVar], a
- ret
-
-Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
- callba Function_LoadOpponentTrainerAndPokemons
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
- ld hl, BT_OTTrainerClass
- ld a, [hl]
- dec a
- ld c, a
- ld b, $0
- pop af
- ld [rSVBK], a
- ld hl, .Sprites
- add hl, bc
- ld a, [hl]
- ld [wBTTempOTSprite], a
-
-; Load sprite of the opponent trainer
-; because s/he is chosen randomly and appears out of nowhere
- ld a, [ScriptVar]
- dec a
- sla a
- ld e, a
- sla a
- sla a
- sla a
- ld c, a
- ld b, 0
- ld d, 0
- ld hl, MapObjects
- add hl, bc
- inc hl
- ld a, [wBTTempOTSprite]
- ld [hl], a
- ld hl, UsedSprites
- add hl, de
- ld [hli], a
- ld [hUsedSpriteIndex], a
- ld a, [hl]
- ld [hUsedSpriteTile], a
- callba GetUsedSprite
- ret
-; 170b90
-
-.Sprites:
- db SPRITE_FALKNER
- db SPRITE_WHITNEY
- db SPRITE_BUGSY
- db SPRITE_MORTY
- db SPRITE_PRYCE
- db SPRITE_JASMINE
- db SPRITE_CHUCK
- db SPRITE_CLAIR
- db SPRITE_SILVER
- db SPRITE_OAK
- db SPRITE_WILL
- db SPRITE_CHRIS
- db SPRITE_BRUNO
- db SPRITE_KAREN
- db SPRITE_KOGA
- db SPRITE_LANCE
- db SPRITE_BROCK
- db SPRITE_MISTY
- db SPRITE_SURGE
- db SPRITE_SCIENTIST
- db SPRITE_ERIKA
- db SPRITE_YOUNGSTER
- db SPRITE_YOUNGSTER
- db SPRITE_YOUNGSTER
- db SPRITE_LASS
- db SPRITE_JANINE
- db SPRITE_COOLTRAINER_M
- db SPRITE_COOLTRAINER_F
- db SPRITE_BUENA
- db SPRITE_SUPER_NERD
- db SPRITE_ROCKET
- db SPRITE_GENTLEMAN
- db SPRITE_BUENA
- db SPRITE_TEACHER
- db SPRITE_SABRINA
- db SPRITE_BUG_CATCHER
- db SPRITE_FISHER
- db SPRITE_SUPER_NERD
- db SPRITE_COOLTRAINER_F
- db SPRITE_SAILOR
- db SPRITE_SUPER_NERD
- db SPRITE_BLUE
- db SPRITE_ROCKER
- db SPRITE_POKEFAN_M
- db SPRITE_BIKER
- db SPRITE_BLAINE
- db SPRITE_PHARMACIST
- db SPRITE_FISHER
- db SPRITE_SUPER_NERD
- db SPRITE_BLACK_BELT
- db SPRITE_ROCKET
- db SPRITE_YOUNGSTER
- db SPRITE_LASS
- db SPRITE_YOUNGSTER
- db SPRITE_ROCKET_GIRL
- db SPRITE_SAGE
- db SPRITE_GRANNY
- db SPRITE_ROCKER
- db SPRITE_POKEFAN_M
- db SPRITE_KIMONO_GIRL
- db SPRITE_TWIN
- db SPRITE_POKEFAN_F
- db SPRITE_RED
- db SPRITE_BLUE
- db SPRITE_OFFICER
- db SPRITE_ROCKET_GIRL
-
-ret_170bd2: ; 170bd2
- ret
-; 170bd3
-
-SpecialCheckForBattleTowerRules: ; 170bd3
- callba CheckForBattleTowerRules
- jr c, .asm_170bde
- xor a
- jr .asm_170be0
-
-.asm_170bde
- ld a, $1
-
-.asm_170be0
- ld [ScriptVar], a
- ret
-; 170be4
diff --git a/misc/crystal_misc.asm b/misc/crystal_misc.asm
deleted file mode 100644
index fb9637d4c..000000000
--- a/misc/crystal_misc.asm
+++ /dev/null
@@ -1,931 +0,0 @@
-INCLUDE "includes.asm"
-
-
-SECTION "Misc Crystal", ROMX
-
-MobileAdapterGFX::
-INCBIN "gfx/misc/mobile_adapter.2bpp"
-
-
-Function17a68f:: ; 17a68f (5e:668f)
- call Function17a6a8
- call Function17a751
- ld hl, $d088
- bit 5, [hl]
- jr z, .asm_17a6a6
- ld de, StringBuffer1 ; $d073
- push de
- call Function17a721
- pop de
- xor a
- ret
-
-.asm_17a6a6
- scf
- ret
-
-Function17a6a8: ; 17a6a8 (5e:66a8)
- push de
- push bc
- ld hl, StringBuffer2 ; $d086
- ld bc, $a
- xor a
- call ByteFill
- ld hl, Buffer1
- ld bc, $10
- ld a, $ff
- call ByteFill
- pop bc
- ld a, c
- and a
- jr z, .asm_17a6c9
- ld hl, $d088
- set 4, [hl]
-.asm_17a6c9
- pop de
- call Function17a6f5
- call Function17aba0
- callba Function106464
- call Function17ac0c
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
- call Function17abcf
- callba LoadOW_BGPal7
- callba Function49420
- call SetPalettes
- call DelayFrame
- ret
-
-Function17a6f5: ; 17a6f5 (5e:66f5)
- ld hl, Buffer1
- ld c, $0
- ld b, $8
-.asm_17a6fc
- ld a, [de]
- call Function17a713
- jr c, .asm_17a70e
- ld a, [de]
- swap a
- call Function17a713
- jr c, .asm_17a70e
- inc de
- dec b
- jr nz, .asm_17a6fc
-.asm_17a70e
- ld a, c
- ld [$d08c], a
- ret
-
-Function17a713: ; 17a713 (5e:6713)
- and $f
- cp $a
- jr nc, .asm_17a71d
- ld [hli], a
- inc c
- and a
- ret
-
-.asm_17a71d
- ld [hl], $ff
- scf
- ret
-
-Function17a721: ; 17a721 (5e:6721)
- push de
- ld h, d
- ld l, e
- ld bc, $8
- ld a, $ff
- call ByteFill
- pop de
- ld hl, Buffer1
- ld b, $8
-.asm_17a732
- ld c, $0
- ld a, [hli]
- cp $a
- jr nc, .asm_17a748
- ld c, a
- ld a, [hli]
- cp $a
- jr nc, .asm_17a74c
- swap a
- or c
- ld [de], a
- inc de
- dec b
- jr nz, .asm_17a732
- ret
-
-.asm_17a748
- ld a, $ff
- ld [de], a
- ret
-
-.asm_17a74c
- ld a, $f0
- or c
- ld [de], a
- ret
-
-Function17a751: ; 17a751 (5e:6751)
- xor a
- ld [$d087], a
-.asm_17a755
- call Function17a781
- call Function17a7ae
- call Function17a97b
- call Function17a770
- call Function17a78f
- ld hl, $d08f
- inc [hl]
- ld a, [$d087]
- bit 7, a
- jr z, .asm_17a755
- ret
-
-Function17a770: ; 17a770 (5e:6770)
- ld a, [hOAMUpdate]
- push af
- ld a, $1
- ld [hOAMUpdate], a
- call HideSprites
- call Function17a9cb
- pop af
- ld [hOAMUpdate], a
- ret
-
-Function17a781: ; 17a781 (5e:6781)
- ld a, [hInMenu]
- push af
- ld a, $1
- ld [hInMenu], a
- call JoyTextDelay
- pop af
- ld [hInMenu], a
- ret
-
-Function17a78f: ; 17a78f (5e:678f)
- ld hl, $d088
- bit 7, [hl]
- res 7, [hl]
- jr nz, .asm_17a79f
- callba HDMATransferTileMapToWRAMBank3
- ret
-
-.asm_17a79f
- callba ReloadMapPart
- ret
-; 17a7a6 (5e:67a6)
-
-Function17a7a6: ; 17a7a6
- ld a, [$d087]
- inc a
- ld [$d087], a
- ret
-
-Function17a7ae: ; 17a7ae (5e:67ae)
- ld a, [$d087]
- ld hl, Jumptable_17a7b6
- rst JumpTable
- ret
-
-Jumptable_17a7b6: ; 17a7b6 (5e:67b6)
- dw Function17a7c2
- dw Function17a7cd
- dw Function17a7d8
- dw Function17a7ff
- dw Function17a81a
- dw Function17a7f4
-
-
-Function17a7c2: ; 17a7c2 (5e:67c2)
- ld a, $4
- call Function17aad3
- ld a, $1
- ld [$d087], a
- ret
-
-Function17a7cd: ; 17a7cd (5e:67cd)
- call Function17a83c
- call Function17a8ae
- ret c
- call Function17a848
- ret
-
-Function17a7d8: ; 17a7d8 (5e:67d8)
- call Function17a83c
- call Function17a848
- ld hl, $d08b
- dec [hl]
- ret nz
- call Function17ac1d
- call Function17ac2a
- ld hl, $d088
- set 7, [hl]
- ld a, $1
- ld [$d087], a
- ret
-
-Function17a7f4: ; 17a7f4 (5e:67f4)
- ld hl, $d08b
- dec [hl]
- ret nz
- ld hl, $d087
- set 7, [hl]
- ret
-
-Function17a7ff: ; 17a7ff (5e:67ff)
- ld hl, $d08b
- dec [hl]
- ret nz
- call Function17ac1d
- call Function17ac2a
- ld hl, $d088
- set 7, [hl]
- ld hl, $d088
- set 5, [hl]
- ld hl, $d087
- set 7, [hl]
- ret
-
-Function17a81a: ; 17a81a (5e:681a)
- call IsSFXPlaying
- ret nc
- ld a, [hJoyPressed]
- and $3
- ret z
- call ExitMenu
- call Function17ac1d
- call Function17ac2a
- ld hl, $d088
- set 7, [hl]
- ld hl, $d088
- res 6, [hl]
- ld a, $1
- ld [$d087], a
- ret
-
-Function17a83c: ; 17a83c (5e:683c)
- ld a, [hJoyLast]
- and $f0
- ld c, a
- ld a, [hJoyPressed]
- and $b
- or c
- ld c, a
- ret
-
-Function17a848: ; 17a848 (5e:6848)
- ld a, c
- and $60
- cp $60
- jr z, .asm_17a876
- ld a, c
- and $50
- cp $50
- jr z, .asm_17a87d
- ld a, c
- and $a0
- cp $a0
- jr z, .asm_17a884
- ld a, c
- and $90
- cp $90
- jr z, .asm_17a88b
- bit 6, c
- jr nz, .asm_17a892
- bit 7, c
- jr nz, .asm_17a899
- bit 5, c
- jr nz, .asm_17a8a0
- bit 4, c
- jr nz, .asm_17a8a7
- xor a
- ret
-
-.asm_17a876
- ld a, $9
- call Function17aad0
- scf
- ret
-
-.asm_17a87d
- ld a, $a
- call Function17aad0
- scf
- ret
-
-.asm_17a884
- ld a, $b
- call Function17aad0
- scf
- ret
-
-.asm_17a88b
- ld a, $c
- call Function17aad0
- scf
- ret
-
-.asm_17a892
- ld a, $5
- call Function17aad0
- scf
- ret
-
-.asm_17a899
- ld a, $6
- call Function17aad0
- scf
- ret
-
-.asm_17a8a0
- ld a, $7
- call Function17aad0
- scf
- ret
-
-.asm_17a8a7
- ld a, $8
- call Function17aad0
- scf
- ret
-
-Function17a8ae: ; 17a8ae (5e:68ae)
- bit 1, c
- jr nz, .asm_17a8bc
- bit 0, c
- jr nz, .asm_17a8cc
- bit 3, c
- jr nz, .asm_17a8d7
- xor a
- ret
-
-.asm_17a8bc
- ld a, $b
- ld [$d08a], a
- call Function17aa98
- call Function17a943
- call Function17aa88
- scf
- ret
-
-.asm_17a8cc
- call Function17aad7
- call Function17aa98
- call Function17a8de
- scf
- ret
-
-.asm_17a8d7
- ld a, $c
- call Function17aad3
- scf
- ret
-
-Function17a8de: ; 17a8de (5e:68de)
- ld a, $2
- call Function17aae0
- ld a, [hl]
- cp $f1
- jr z, .asm_17a8fd
- cp $f0
- jr z, .asm_17a904
- cp $f2
- jr z, .asm_17a911
- ld e, a
- call Function17a964
- ld a, $2
- ld [$d087], a
- call Function17aa88
- ret
-
-.asm_17a8fd
- call Function17a943
- call Function17aa88
- ret
-
-.asm_17a904
- call Function17aad7
- call Function17aa98
- call Function17a91e
- call Function17aa88
- ret
-
-.asm_17a911
- call Function17aa98
- ld a, $5
- ld [$d087], a
- xor a
- call Function17aa88
- ret
-
-Function17a91e: ; 17a91e (5e:691e)
- ld a, [$d08c]
- cp $7
- jr c, .asm_17a92c
- ld a, $3
- ld [$d087], a
- xor a
- ret
-
-.asm_17a92c
- call LoadStandardMenuDataHeader
- call Function17a99e
- ld hl, $d088
- set 7, [hl]
- ld hl, $d088
- set 6, [hl]
- ld a, $4
- ld [$d087], a
- scf
- ret
-
-Function17a943: ; 17a943 (5e:6943)
- ld a, [$d08c]
- and a
- jr z, .asm_17a95d
- dec a
- ld [$d08c], a
- ld c, a
- ld b, $0
- ld hl, Buffer1
- add hl, bc
- ld [hl], $ff
- ld a, $2
- ld [$d087], a
- and a
- ret
-
-.asm_17a95d
- ld a, $5
- ld [$d087], a
- xor a
- ret
-
-Function17a964: ; 17a964 (5e:6964)
- ld a, [$d08c]
- cp $10
- jr nc, .asm_17a979
- ld c, a
- ld b, $0
- inc a
- ld [$d08c], a
- ld hl, Buffer1
- add hl, bc
- ld [hl], e
- and a
- ret
-
-.asm_17a979
- scf
- ret
-
-Function17a97b: ; 17a97b (5e:697b)
- hlcoord 1, 1
- lb bc, 2, 18
- call ClearBox
- hlcoord 3, 2
- ld de, Buffer1
- ld a, [$d08c]
- and a
- ret z
- ld c, a
-.asm_17a990
- ld a, [de]
- inc de
- cp $a
- jr nc, .asm_17a99d
- add $f6
- ld [hli], a
- dec c
- jr nz, .asm_17a990
- ret
-
-.asm_17a99d
- ret
-
-Function17a99e: ; 17a99e (5e:699e)
- hlcoord 0, 12
- ld b, $4
- ld c, $12
- call Function17ac46
- hlcoord 2, 14
- ld de, String_17a9b2
- call PlaceString
- ret
-; 17a9b2 (5e:69b2)
-
-String_17a9b2: ; 17a9b2
- db "でんわばんごうが ただしく"
- next "はいって いません!"
- db "@"
-; 17a9cb
-
-Function17a9cb: ; 17a9cb (5e:69cb)
- ld de, Sprites ; $c400
- ld hl, $d088
- bit 6, [hl]
- jr nz, .bit_6_set
- call Function17a9e3
- call Function17aa22
- call Function17a9f5
- ret
-
-.bit_6_set
- call Function17a9e3
- ret
-
-Function17a9e3: ; 17a9e3 (5e:69e3)
- ld a, $3
- ld [$d08e], a
- ld hl, Unknown_17aa77
- ld b, $8
- ld c, $8
- ld a, $5
- call Function17aa4a
- ret
-
-Function17a9f5: ; 17a9f5 (5e:69f5)
- ld a, [$d08c]
- cp $10
- ret nc
- ld a, [$d08f]
- swap a
- and $1
- add $1
- ld [$d08e], a
- ld a, [$d08c]
- cp $10
- jr c, .okay
- dec a
-.okay
- ld c, $8
- call SimpleMultiply
- add $18
- ld b, a
- ld c, $11
- ld hl, Unknown_17aa72
- ld a, $4
- call Function17aa4a
- ret
-
-Function17aa22: ; 17aa22 (5e:6a22)
- ld a, $0
- ld [$d08e], a
- push de
- ld a, $3
- call Function17aae0
- add a
- add a
- add a
- add $0
- push af
- ld a, $4
- call Function17aae0
- add a
- add a
- add a
- add $8
- ld c, a
- pop af
- ld b, a
- pop de
- ld a, $0
- ld hl, Unknown_17aa77
- call Function17aa4a
- ret
-
-Function17aa4a: ; 17aa4a (5e:6a4a)
- ld [$d08d], a
- ld a, b
- add $8
- ld b, a
- ld a, c
- add $10
- ld c, a
- ld a, [hli]
-.loop
- push af
- ld a, [hli]
- add c
- ld [de], a
- inc de
- ld a, [hli]
- add b
- ld [de], a
- inc de
- ld a, [$d08d]
- add [hl]
- inc hl
- ld [de], a
- inc de
- ld a, [$d08e]
- or [hl]
- inc hl
- ld [de], a
- inc de
- pop af
- dec a
- jr nz, .loop
- ret
-; 17aa72 (5e:6a72)
-
-Unknown_17aa72: ; 17aa72
- db 1
- db 0, 0, 0, 0
-; 17aa77
-
-Unknown_17aa77: ; 17aa77
- db 4
- db 0, 0, 0, 0
- db 0, 8, 1, 0
- db 8, 0, 2, 0
- db 8, 8, 3, 0
-; 17aa88
-
-Function17aa88: ; 17aa88 (5e:6a88)
- jr c, asm_17aa91
- ld de, SFX_SWITCH_POKEMON
- call PlaySFX
- ret
-
-asm_17aa91: ; 17aa91 (5e:6a91)
- ld de, SFX_WRONG
- call PlaySFX
- ret
-
-Function17aa98: ; 17aa98 (5e:6a98)
- ld a, $5
- ld [$d08b], a
- call Function17aaa9
- call Function17aac3
- ld hl, $d088
- set 7, [hl]
- ret
-
-Function17aaa9: ; 17aaa9 (5e:6aa9)
- ld a, $3
- call Function17aae3
- ld c, a
- ld b, $0
- hlcoord 0, 0, AttrMap
- add hl, bc
- push hl
- ld a, $4
- call Function17aae3
- ld bc, $14
- pop hl
- call AddNTimes
- ret
-
-Function17aac3: ; 17aac3 (5e:6ac3)
- ld a, $b
- push hl
- ld [hli], a
- ld [hli], a
- pop hl
- ld de, SCREEN_WIDTH
- add hl, de
- ld [hli], a
- ld [hli], a
- ret
-
-Function17aad0: ; 17aad0 (5e:6ad0)
- call Function17aae0
-
-Function17aad3: ; 17aad3 (5e:6ad3)
- ld [$d089], a
- ret
-
-Function17aad7: ; 17aad7 (5e:6ad7)
- push af
- ld a, [$d089]
- ld [$d08a], a
- pop af
- ret
-
-Function17aae0: ; 17aae0 (5e:6ae0)
- call Function17aad7
-
-Function17aae3: ; 17aae3 (5e:6ae3)
- push af
- ld a, [$d08a]
- ld bc, $d
- ld hl, Unknown_17aaf7
- call AddNTimes
- pop af
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [hl]
- ret
-; 17aaf7 (5e:6af7)
-
-Unknown_17aaf7: ; 17aaf7
- db $0, $0, $1, $6, $5, $9, $3, $2, $1, $2, $1, $2, $4
- db $0, $0, $2, $9, $5, $a, $4, $0, $2, $a, $a, $3, $5
- db $0, $0, $3, $c, $5, $b, $5, $1, $0, $1, $0, $4, $0
- db $0, $0, $4, $6, $8, $0, $6, $5, $4, $5, $1, $5, $7
- db $0, $0, $5, $9, $8, $1, $7, $3, $5, $0, $2, $6, $8
- db $0, $0, $6, $c, $8, $2, $8, $4, $3, $1, $3, $7, $3
- db $0, $0, $7, $6, $b, $3, $9, $8, $7, $8, $4, $8, $a
- db $0, $0, $8, $9, $b, $4, $a, $6, $8, $3, $5, $9, $b
- db $0, $0, $9, $c, $b, $5, $b, $7, $6, $4, $6, $a, $6
- db $0, $0,$f2, $6, $e, $6, $0, $c, $a, $c, $7, $c, $0
- db $0, $0, $0, $9, $e, $7, $1, $9, $b, $6, $8, $1, $1
- db $0, $0,$f1, $c, $e, $8, $2, $a, $c, $7, $c, $2, $c
- db $0, $0,$f0,$10, $e, $c, $c, $b, $9, $b, $9, $b, $9
-; 17aba0
-
-Function17aba0: ; 17aba0 (5e:6ba0)
- ld a, [rVBK]
- push af
- ld a, $1
- ld [rVBK], a
-
- ld hl, VTiles5 tile $00
- ld de, GFX_17afa5
- lb bc, BANK(GFX_17afa5), $80
- call Get2bpp
-
- pop af
- ld [rVBK], a
-
- ld hl, VTiles0 tile $00
- ld de, GFX_17afa5 + $4c0
- lb bc, BANK(GFX_17afa5), 5
- call Get2bpp
-
- ld hl, VTiles0 tile $05
- ld de, GFX_11601a
- lb bc, BANK(GFX_11601a), 4
- call Get2bpp
- ret
-
-Function17abcf: ; 17abcf (5e:6bcf)
- ld a, [rSVBK]
- push af
- ld a, BANK(UnknBGPals)
- ld [rSVBK], a
-
- ld hl, Palette_17ac55
- ld de, UnknBGPals ; $d000
- ld bc, $30
- call CopyBytes
-
- ld hl, Palette_17ac95
- ld de, UnknOBPals
- ld bc, $40
- call CopyBytes
-
- ld hl, GFX_17afa5 + $510
- ld de, UnknOBPals + 2 * 4
- ld bc, $10
- call CopyBytes
-
- ld hl, MapObjectPals + 8
- ld de, UnknOBPals + 6 * 4
- ld bc, $8
- ld a, BANK(MapObjectPals)
- call FarCopyBytes
-
- pop af
- ld [rSVBK], a
- ret
-
-Function17ac0c: ; 17ac0c (5e:6c0c)
- call Function17ac1d
- call Function17ac2a
- hlcoord 0, 0
- ld b, 2
- ld c, SCREEN_WIDTH - 2
- call Function17ac46
- ret
-
-Function17ac1d: ; 17ac1d (5e:6c1d)
- ld hl, Tilemap_17acd5
- decoord 0, 4
- ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH
- call CopyBytes
- ret
-
-Function17ac2a: ; 17ac2a (5e:6c2a)
- ld hl, Tilemap_17ae3d
- decoord 0, 4, AttrMap
- ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH
- call CopyBytes
- hlcoord 0, 4, AttrMap
- ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH
-.loop
- ld a, [hl]
- or $8
- ld [hli], a
- dec bc
- ld a, b
- or c
- jr nz, .loop
- ret
-
-Function17ac46: ; 17ac46 (5e:6c46)
- ld a, [$d088]
- bit 4, a
- jr nz, .bit_4_set
- call TextBox
- ret
-
-.bit_4_set
- call Function3eea
- ret
-; 17ac55 (5e:6c55)
-
-Palette_17ac55: ; 17ac55
- RGB 0, 0, 0
- RGB 9, 10, 25
- RGB 16, 19, 31
- RGB 31, 31, 31
-
- RGB 5, 11, 9
- RGB 7, 14, 12
- RGB 17, 24, 22
- RGB 28, 31, 31
-
- RGB 0, 0, 0
- RGB 3, 0, 10
- RGB 3, 3, 16
- RGB 6, 8, 25
-
- RGB 5, 11, 9
- RGB 28, 31, 31
- RGB 7, 14, 12
- RGB 17, 24, 22
-
- RGB 0, 0, 0
- RGB 5, 2, 16
- RGB 8, 8, 26
- RGB 13, 9, 17
-
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
-Palette_17ac95: ; 17ac95
- RGB 31, 31, 31
- RGB 4, 3, 3
- RGB 31, 13, 0
- RGB 31, 31, 31
-
- RGB 31, 31, 31
- RGB 0, 0, 0
- RGB 31, 31, 31
- RGB 31, 31, 31
-
- RGB 31, 0, 0
- RGB 16, 3, 0
- RGB 28, 19, 11
- RGB 31, 31, 31
-
- RGB 31, 16, 0
- RGB 9, 6, 4
- RGB 31, 16, 0
- RGB 31, 24, 0
-
- RGB 31, 18, 6
- RGB 0, 3, 0
- RGB 0, 9, 0
- RGB 0, 12, 0
-
- RGB 0, 16, 0
- RGB 0, 22, 0
- RGB 0, 25, 0
- RGB 0, 27, 0
-
- RGB 0, 31, 0
- RGB 3, 31, 0
- RGB 8, 31, 0
- RGB 14, 31, 0
-
- RGB 16, 31, 0
- RGB 22, 31, 0
- RGB 27, 31, 0
- RGB 31, 31, 0
-
-Tilemap_17acd5: ; 17acd5
-INCBIN "gfx/unknown/17acd5.tilemap"
-
-Tilemap_17ae3d: ; 17ae3d
-INCBIN "gfx/unknown/17ae3d.tilemap"
-
-GFX_17afa5:: ; 17afa5
-INCBIN "gfx/unknown/17afa5.2bpp"
diff --git a/misc/fixed_words.asm b/misc/fixed_words.asm
deleted file mode 100755
index 8d1f73c28..000000000
--- a/misc/fixed_words.asm
+++ /dev/null
@@ -1,4293 +0,0 @@
-; These functions seem to be related to the selection of preset phrases
-; for use in mobile communications. Annoyingly, they separate the
-; Battle Tower function above from the data it references.
-Function11c05d: ; 11c05d
- ld a, e
- or d
- jr z, .error
- ld a, e
- and d
- cp $ff
- jr z, .error
- push hl
- call CopyMobileEZChatToC608
- pop hl
- call PlaceString
- and a
- ret
-
-.error
- ld c, l
- ld b, h
- scf
- ret
-; 11c075
-
-Function11c075: ; 11c075
- push de
- ld a, c
- call Function11c254
- pop de
- ld bc, wcd36
- call Function11c08f
- ret
-; 11c082
-
-Function11c082: ; 11c082
-; XXX
- push de
- ld a, c
- call Function11c254
- pop de
- ld bc, wcd36
- call PrintEZChatBattleMessage
- ret
-; 11c08f
-
-Function11c08f: ; 11c08f
- ld l, e
- ld h, d
- push hl
- ld a, 3
-.loop
- push af
- ld a, [bc]
- ld e, a
- inc bc
- ld a, [bc]
- ld d, a
- inc bc
- push bc
- call Function11c05d
- jr c, .okay
- inc bc
-
-.okay
- ld l, c
- ld h, b
- pop bc
- pop af
- dec a
- jr nz, .loop
- pop hl
- ld de, 2 * SCREEN_WIDTH
- add hl, de
- ld a, $3
-.loop2
- push af
- ld a, [bc]
- ld e, a
- inc bc
- ld a, [bc]
- ld d, a
- inc bc
- push bc
- call Function11c05d
- jr c, .okay2
- inc bc
-
-.okay2
- ld l, c
- ld h, b
- pop bc
- pop af
- dec a
- jr nz, .loop2
- ret
-; 11c0c6
-
-PrintEZChatBattleMessage: ; 11c0c6
-; Use up to 6 words from bc to print text starting at de.
- ; Preserve $cf63, $cf64
- ld a, [wJumptableIndex]
- ld l, a
- ld a, [wcf64]
- ld h, a
- push hl
- ; reset value at c618 (not preserved)
- ld hl, $c618
- ld a, $0
- ld [hli], a
- ; preserve de
- push de
- ; $cf63 keeps track of which line we're on (0, 1, or 2)
- ; $cf64 keeps track of how much room we have left in the current line
- xor a
- ld [wJumptableIndex], a
- ld a, 18
- ld [wcf64], a
- ld a, $6 ; up to 6 times
-.loop
- push af
- ; load the 2-byte word data pointed to by bc
- ld a, [bc]
- ld e, a
- inc bc
- ld a, [bc]
- ld d, a
- inc bc
- ; if $0000, we're done
- or e
- jr z, .done
- ; preserving hl and bc, get the length of the word
- push hl
- push bc
- call CopyMobileEZChatToC608
- call GetLengthOfWordAtC608
- ld e, c
- pop bc
- pop hl
- ; if the functions return 0, we're done
- ld a, e
- or a
- jr z, .done
-.loop2
- ; e contains the length of the word
- ; add 1 for the space, unless we're at the start of the line
- ld a, [wcf64]
- cp 18
- jr z, .skip_inc
- inc e
-
-.skip_inc
- ; if the word fits, put it on the same line
- cp e
- jr nc, .same_line
- ; otherwise, go to the next line
- ld a, [wJumptableIndex]
- inc a
- ld [wJumptableIndex], a
- ; if we're on line 2, insert "<NEXT>"
- ld [hl], "<NEXT>"
- rra
- jr c, .got_line_terminator
- ; else, insert "<CONT>"
- ld [hl], "<CONT>"
-
-.got_line_terminator
- inc hl
- ; init the next line, holding on to the same word
- ld a, 18
- ld [wcf64], a
- dec e
- jr .loop2
-
-.same_line
- ; add the space, unless we're at the start of the line
- cp 18
- jr z, .skip_space
- ld [hl], " "
- inc hl
-
-.skip_space
- ; deduct the length of the word
- sub e
- ld [wcf64], a
- ld de, $c608
-.place_string_loop
- ; load the string from de to hl
- ld a, [de]
- cp "@"
- jr z, .done
- inc de
- ld [hli], a
- jr .place_string_loop
-
-.done
- ; next word?
- pop af
- dec a
- jr nz, .loop
- ; we're finished, place "<DONE>"
- ld [hl], "<DONE>"
- ; now, let's place the string from c618 to bc
- pop bc
- ld hl, $c618
- call PlaceHLTextAtBC
- ; restore the original values of $cf63 and $cf64
- pop hl
- ld a, l
- ld [wJumptableIndex], a
- ld a, h
- ld [wcf64], a
- ret
-; 11c14a
-
-GetLengthOfWordAtC608: ; 11c14a
- ld c, $0
- ld hl, $c608
-.loop
- ld a, [hli]
- cp "@"
- ret z
- inc c
- jr .loop
-; 11c156
-
-CopyMobileEZChatToC608: ; 11c156
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld a, "@"
- ld hl, $c608
- ld bc, NAME_LENGTH
- call ByteFill
- ld a, d
- and a
- jr z, .get_name
- ld hl, MobileEZChatCategoryPointers
- dec d
- sla d
- ld c, d
- ld b, $0
- add hl, bc
- ld a, [hli]
- ld c, a
- ld a, [hl]
- ld b, a
- push bc
- pop hl
- ld c, e
- ld b, $0
- sla c
- rl b
- sla c
- rl b
- sla c
- rl b
- add hl, bc
- ld bc, 5 ; length of a string
-.copy_string
- ld de, $c608
- call CopyBytes
- ld de, $c608
- pop af
- ld [rSVBK], a
- ret
-
-.get_name
- ld a, e
- ld [wd265], a
- call GetPokemonName
- ld hl, StringBuffer1
- ld bc, PKMN_NAME_LENGTH - 1
- jr .copy_string
-; 11c1ab
-
-Function11c1ab: ; 11c1ab
- ld a, [hInMenu]
- push af
- ld a, $1
- ld [hInMenu], a
- call Function11c1b9
- pop af
- ld [hInMenu], a
- ret
-; 11c1b9
-
-Function11c1b9: ; 11c1b9
- call .InitKanaMode
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- call EZChat_MasterLoop
- pop af
- ld [rSVBK], a
- ret
-; 11c1ca
-
-.InitKanaMode: ; 11c1ca
- xor a
- ld [wJumptableIndex], a
- ld [wcf64], a
- ld [wcf65], a
- ld [wcf66], a
- ld [wcd23], a
- ld [wcd20], a
- ld [wcd21], a
- ld [wcd22], a
- ld [wcd35], a
- ld [wcd2b], a
- ld a, $ff
- ld [wcd24], a
- ld a, [wMenuCursorY]
- dec a
- call Function11c254
- call ClearBGPalettes
- call ClearSprites
- call ClearScreen
- call Function11d323
- call SetPalettes
- call DisableLCD
- ld hl, GFX_11d67e
- ld de, VTiles2
- ld bc, $60
- call CopyBytes
- ld hl, LZ_11d6de
- ld de, VTiles0
- call Decompress
- call EnableLCD
- callba ReloadMapPart
- callba ClearSpriteAnims
- callba LoadPokemonData
- callba Pokedex_ABCMode
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, $c6d0
- ld de, LYOverrides
- ld bc, $100
- call CopyBytes
- pop af
- ld [rSVBK], a
- call EZChat_GetCategoryWordsByKana
- call EZChat_GetSeenPokemonByKana
- ret
-; 11c254
-
-Function11c254: ; 11c254
- push af
- ld a, $4
- call GetSRAMBank
- ld hl, $a007
- pop af
- sla a
- sla a
- ld c, a
- sla a
- add c
- ld c, a
- ld b, $0
- add hl, bc
- ld de, wcd36
- ld bc, 12
- call CopyBytes
- call CloseSRAM
- ret
-; 11c277
-
-EZChat_ClearBottom12Rows: ; 11c277 (47:4277)
- ld a, " "
- hlcoord 0, 6
- ld bc, (SCREEN_HEIGHT - 6) * SCREEN_WIDTH
- call ByteFill
- ret
-
-EZChat_MasterLoop: ; 11c283
-.loop
- call JoyTextDelay
- ld a, [hJoyPressed]
- ld [hJoypadPressed], a
- ld a, [wJumptableIndex]
- bit 7, a
- jr nz, .exit
- call .DoJumptableFunction
- callba PlaySpriteAnimations
- callba ReloadMapPart
- jr .loop
-
-.exit
- callba ClearSpriteAnims
- call ClearSprites
- ret
-; 11c2ac
-
-.DoJumptableFunction: ; 11c2ac
- jumptable .Jumptable, wJumptableIndex
-; 11c2bb
-
-.Jumptable: ; 11c2bb (47:42bb)
- dw .SpawnObjects ; 00
- dw .InitRAM ; 01
- dw Function11c35f ; 02
- dw Function11c373 ; 03
- dw Function11c3c2 ; 04
- dw Function11c3ed ; 05
- dw Function11c52c ; 06
- dw Function11c53d ; 07
- dw Function11c658 ; 08
- dw Function11c675 ; 09
- dw Function11c9bd ; 0a
- dw Function11c9c3 ; 0b
- dw Function11caad ; 0c
- dw Function11cab3 ; 0d
- dw Function11cb52 ; 0e
- dw Function11cb66 ; 0f
- dw Function11cbf5 ; 10
- dw Function11ccef ; 11
- dw Function11cd04 ; 12
- dw Function11cd20 ; 13
- dw Function11cd54 ; 14
- dw Function11ce0b ; 15
- dw Function11ce2b ; 16
-
-.SpawnObjects: ; 11c2e9 (47:42e9)
- depixel 3, 1, 2, 5
- ld a, SPRITE_ANIM_INDEX_1D
- call _InitSpriteAnimStruct
- depixel 8, 1, 2, 5
-
- ld a, SPRITE_ANIM_INDEX_1D
- call _InitSpriteAnimStruct
- ld hl, SPRITEANIMSTRUCT_0C
- add hl, bc
- ld a, $1
- ld [hl], a
-
- depixel 9, 2, 2, 0
- ld a, SPRITE_ANIM_INDEX_1D
- call _InitSpriteAnimStruct
- ld hl, SPRITEANIMSTRUCT_0C
- add hl, bc
- ld a, $3
- ld [hl], a
-
- depixel 10, 16
- ld a, SPRITE_ANIM_INDEX_1D
- call _InitSpriteAnimStruct
- ld hl, SPRITEANIMSTRUCT_0C
- add hl, bc
- ld a, $4
- ld [hl], a
-
- depixel 10, 4
- ld a, SPRITE_ANIM_INDEX_1D
- call _InitSpriteAnimStruct
- ld hl, SPRITEANIMSTRUCT_0C
- add hl, bc
- ld a, $5
- ld [hl], a
-
- depixel 10, 2
- ld a, SPRITE_ANIM_INDEX_1D
- call _InitSpriteAnimStruct
- ld hl, SPRITEANIMSTRUCT_0C
- add hl, bc
- ld a, $2
- ld [hl], a
-
- ld hl, wcd23
- set 1, [hl]
- set 2, [hl]
- jp Function11cfb5
-
-.InitRAM: ; 11c346 (47:4346)
- ld a, $9
- ld [wcd2d], a
- ld a, $2
- ld [wcd2e], a
- ld [wcd2f], a
- ld [wcd30], a
- ld de, wcd2d
- call Function11cfce
- jp Function11cfb5
-
-Function11c35f: ; 11c35f (47:435f)
- ld hl, wcd2f
- inc [hl]
- inc [hl]
- dec hl
- dec hl
- dec [hl]
- push af
- ld de, wcd2d
- call Function11cfce
- pop af
- ret nz
- jp Function11cfb5
-
-Function11c373: ; 11c373 (47:4373)
- ld hl, wcd30
- inc [hl]
- inc [hl]
- dec hl
- dec hl
- dec [hl]
- push af
- ld de, wcd2d
- call Function11cfce
- pop af
- ret nz
- call Function11c38a
- jp Function11cfb5
-
-Function11c38a: ; 11c38a (47:438a)
- ld hl, Unknown_11c986
- ld bc, wcd36
- ld a, $6
-.asm_11c392
- push af
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- push hl
- push de
- pop hl
- ld a, [bc]
- inc bc
- ld e, a
- ld a, [bc]
- inc bc
- ld d, a
- push bc
- or e
- jr z, .asm_11c3af
- ld a, e
- and d
- cp $ff
- jr z, .asm_11c3af
- call Function11c05d
- jr .asm_11c3b5
-.asm_11c3af
- ld de, String_11c3bc
- call PlaceString
-.asm_11c3b5
- pop bc
- pop hl
- pop af
- dec a
- jr nz, .asm_11c392
- ret
-; 11c3bc (47:43bc)
-
-String_11c3bc: ; 11c3bc
- db "ーーーーー@"
-; 11c3c2
-
-Function11c3c2: ; 11c3c2 (47:43c2)
- call EZChat_ClearBottom12Rows
- ld de, Unknown_11cfbe
- call Function11d035
- hlcoord 1, 7
- ld de, String_11c4db
- call PlaceString
- hlcoord 1, 16
- ld de, String_11c51b
- call PlaceString
- call Function11c4be
- ld hl, wcd23
- set 0, [hl]
- ld hl, wcd24
- res 0, [hl]
- call Function11cfb5
-
-Function11c3ed: ; 11c3ed (47:43ed)
- ld hl, wcd20 ; wcd20
- ld de, hJoypadPressed ; $ffa3
- ld a, [de]
- and $8
- jr nz, .asm_11c426
- ld a, [de]
- and $2
- jr nz, .asm_11c41a
- ld a, [de]
- and $1
- jr nz, .asm_11c42c
- ld de, hJoyLast
- ld a, [de]
- and $40
- jr nz, .asm_11c47c
- ld a, [de]
- and $80
- jr nz, .asm_11c484
- ld a, [de]
- and $20
- jr nz, .asm_11c48c
- ld a, [de]
- and $10
- jr nz, .asm_11c498
- ret
-
-.asm_11c41a
- call PlayClickSFX
-.asm_11c41d
- ld hl, wcd24
- set 0, [hl]
- ld a, $c
- jr .asm_11c475
-.asm_11c426
- ld a, $8
- ld [wcd20], a ; wcd20
- ret
-
-.asm_11c42c
- ld a, [wcd20] ; wcd20
- cp $6
- jr c, .asm_11c472
- sub $6
- jr z, .asm_11c469
- dec a
- jr z, .asm_11c41d
- ld hl, wcd36
- ld c, $c
- xor a
-.asm_11c440
- or [hl]
- inc hl
- dec c
- jr nz, .asm_11c440
- and a
- jr z, .asm_11c460
- ld de, Unknown_11cfba
- call Function11cfce
- decoord 1, 2
- ld bc, wcd36
- call Function11c08f
- ld hl, wcd24
- set 0, [hl]
- ld a, $e
- jr .asm_11c475
-.asm_11c460
- ld hl, wcd24
- set 0, [hl]
- ld a, $11
- jr .asm_11c475
-.asm_11c469
- ld hl, wcd24
- set 0, [hl]
- ld a, $a
- jr .asm_11c475
-.asm_11c472
- call Function11c4a5
-.asm_11c475
- ld [wJumptableIndex], a
- call PlayClickSFX
- ret
-
-.asm_11c47c
- ld a, [hl]
- cp $3
- ret c
- sub $3
- jr .asm_11c4a3
-.asm_11c484
- ld a, [hl]
- cp $6
- ret nc
- add $3
- jr .asm_11c4a3
-.asm_11c48c
- ld a, [hl]
- and a
- ret z
- cp $3
- ret z
- cp $6
- ret z
- dec a
- jr .asm_11c4a3
-.asm_11c498
- ld a, [hl]
- cp $2
- ret z
- cp $5
- ret z
- cp $8
- ret z
- inc a
-.asm_11c4a3
- ld [hl], a
- ret
-
-Function11c4a5: ; 11c4a5 (47:44a5)
- ld hl, wcd23
- res 0, [hl]
- ld a, [wcd2b]
- and a
- jr nz, .asm_11c4b7
- xor a
- ld [wcd21], a
- ld a, $6
- ret
-
-.asm_11c4b7
- xor a
- ld [wcd22], a
- ld a, $15
- ret
-
-Function11c4be: ; 11c4be (47:44be)
- ld a, $1
- hlcoord 0, 6, AttrMap
- ld bc, $a0
- call ByteFill
- ld a, $7
- hlcoord 0, 14, AttrMap
- ld bc, $28
- call ByteFill
- callba ReloadMapPart
- ret
-; 11c4db (47:44db)
-
-String_11c4db: ; 11c4db
- db "6つのことば¯くみあわせます"
- next "かえたいところ¯えらぶと でてくる"
- next "ことばのグループから いれかえたい"
- next "たんご¯えらんでください"
- db "@"
-; 11c51b
-
-String_11c51b: ; 11c51b
- db "ぜんぶけす やめる けってい@"
-; 11c52c
-
-Function11c52c: ; 11c52c (47:452c)
- call EZChat_ClearBottom12Rows
- call EZChat_PlaceCategoryNames
- call Function11c618
- ld hl, wcd24
- res 1, [hl]
- call Function11cfb5
-
-Function11c53d: ; 11c53d (47:453d)
- ld hl, wcd21
- ld de, hJoypadPressed ; $ffa3
-
- ld a, [de]
- and START
- jr nz, .start
-
- ld a, [de]
- and SELECT
- jr nz, .select
-
- ld a, [de]
- and B_BUTTON
- jr nz, .b
-
- ld a, [de]
- and A_BUTTON
- jr nz, .a
-
- ld de, hJoyLast
-
- ld a, [de]
- and D_UP
- jr nz, .up
-
- ld a, [de]
- and D_DOWN
- jr nz, .down
-
- ld a, [de]
- and D_LEFT
- jr nz, .left
-
- ld a, [de]
- and D_RIGHT
- jr nz, .right
-
- ret
-
-.a
- ld a, [wcd21]
- cp 15
- jr c, .got_category
- sub $f
- jr z, .done
- dec a
- jr z, .mode
- jr .b
-
-.start
- ld hl, wcd24
- set 0, [hl]
- ld a, $8
- ld [wcd20], a ; wcd20
-
-.b
- ld a, $4
- jr .go_to_function
-
-.select
- ld a, [wcd2b]
- xor $1
- ld [wcd2b], a
- ld a, $15
- jr .go_to_function
-
-.mode
- ld a, $13
- jr .go_to_function
-
-.got_category
- ld a, $8
-
-.go_to_function
- ld hl, wcd24
- set 1, [hl]
- ld [wJumptableIndex], a
- call PlayClickSFX
- ret
-
-.done
- ld a, [wcd20] ; wcd20
- call Function11ca6a
- call PlayClickSFX
- ret
-
-.up
- ld a, [hl]
- cp $3
- ret c
- sub $3
- jr .finish_dpad
-
-.down
- ld a, [hl]
- cp $f
- ret nc
- add $3
- jr .finish_dpad
-
-.left
- ld a, [hl]
- and a
- ret z
- cp $3
- ret z
- cp $6
- ret z
- cp $9
- ret z
- cp $c
- ret z
- cp $f
- ret z
- dec a
- jr .finish_dpad
-
-.right
- ld a, [hl]
- cp $2
- ret z
- cp $5
- ret z
- cp $8
- ret z
- cp $b
- ret z
- cp $e
- ret z
- cp $11
- ret z
- inc a
-
-.finish_dpad
- ld [hl], a
- ret
-; 11c5f0
-
-EZChat_PlaceCategoryNames: ; 11c5f0 (47:45f0)
- ld de, MobileEZChatCategoryNames
- ld bc, Coords_11c63a
- ld a, 15
-.loop
- push af
- ld a, [bc]
- inc bc
- ld l, a
- ld a, [bc]
- inc bc
- ld h, a
- push bc
- call PlaceString
- ; The category names are padded with "@".
- ; To find the next category, the system must
- ; find the first character at de that is not "@".
-.find_next_string_loop
- inc de
- ld a, [de]
- cp "@"
- jr z, .find_next_string_loop
- pop bc
- pop af
- dec a
- jr nz, .loop
- hlcoord 1, 17
- ld de, EZChatString_Stop_Mode_Cancel
- call PlaceString
- ret
-
-Function11c618: ; 11c618 (47:4618)
- ld a, $2
- hlcoord 0, 6, AttrMap
- ld bc, $c8
- call ByteFill
- callba ReloadMapPart
- ret
-; 11c62a (47:462a)
-
-EZChatString_Stop_Mode_Cancel: ; 11c62a
- db "けす モード やめる@"
-; 11c63a
-
-Coords_11c63a: ; 11c63a
- dwcoord 1, 7
- dwcoord 7, 7
- dwcoord 13, 7
- dwcoord 1, 9
- dwcoord 7, 9
- dwcoord 13, 9
- dwcoord 1, 11
- dwcoord 7, 11
- dwcoord 13, 11
- dwcoord 1, 13
- dwcoord 7, 13
- dwcoord 13, 13
- dwcoord 1, 15
- dwcoord 7, 15
- dwcoord 13, 15
-; 11c658
-
-Function11c658: ; 11c658 (47:4658)
- call EZChat_ClearBottom12Rows
- call Function11c770
- ld de, Unknown_11cfc2
- call Function11d035
- call Function11c9ab
- call Function11c7bc
- call Function11c86e
- ld hl, wcd24
- res 3, [hl]
- call Function11cfb5
-
-Function11c675: ; 11c675 (47:4675)
- ld hl, wMobileCommsJumptableIndex
- ld de, hJoypadPressed ; $ffa3
- ld a, [de]
- and A_BUTTON
- jr nz, .a
- ld a, [de]
- and B_BUTTON
- jr nz, .b
- ld a, [de]
- and START
- jr nz, .start
- ld a, [de]
- and SELECT
- jr z, .select
-
- ld a, [wcd26]
- and a
- ret z
- sub $c
- jr nc, .asm_11c699
- xor a
-.asm_11c699
- ld [wcd26], a
- jr .asm_11c6c4
-
-.start
- ld hl, wcd28
- ld a, [wcd26]
- add $c
- cp [hl]
- ret nc
- ld [wcd26], a
- ld a, [hl]
- ld b, a
- ld hl, wMobileCommsJumptableIndex
- ld a, [wcd26]
- add [hl]
- jr c, .asm_11c6b9
- cp b
- jr c, .asm_11c6c4
-.asm_11c6b9
- ld a, [wcd28]
- ld hl, wcd26
- sub [hl]
- dec a
- ld [wMobileCommsJumptableIndex], a
-.asm_11c6c4
- call Function11c992
- call Function11c7bc
- call Function11c86e
- ret
-
-.select
- ld de, hJoyLast
- ld a, [de]
- and D_UP
- jr nz, .asm_11c708
- ld a, [de]
- and D_DOWN
- jr nz, .asm_11c731
- ld a, [de]
- and D_LEFT
- jr nz, .asm_11c746
- ld a, [de]
- and D_RIGHT
- jr nz, .asm_11c755
- ret
-
-.a
- call Function11c8f6
- ld a, $4
- ld [wcd35], a
- jr .asm_11c6fc
-.b
- ld a, [wcd2b]
- and a
- jr nz, .asm_11c6fa
- ld a, $6
- jr .asm_11c6fc
-.asm_11c6fa
- ld a, $15
-.asm_11c6fc
- ld [wJumptableIndex], a
- ld hl, wcd24
- set 3, [hl]
- call PlayClickSFX
- ret
-
-.asm_11c708
- ld a, [hl]
- cp $3
- jr c, .asm_11c711
- sub $3
- jr .asm_11c76e
-.asm_11c711
- ld a, [wcd26]
- sub $3
- ret c
- ld [wcd26], a
- jr .asm_11c6c4
-.asm_11c71c
- ld hl, wcd28
- ld a, [wcd26]
- add $c
- ret c
- cp [hl]
- ret nc
- ld a, [wcd26]
- add $3
- ld [wcd26], a
- jr .asm_11c6c4
-.asm_11c731
- ld a, [wcd28]
- ld b, a
- ld a, [wcd26]
- add [hl]
- add $3
- cp b
- ret nc
- ld a, [hl]
- cp $9
- jr nc, .asm_11c71c
- add $3
- jr .asm_11c76e
-.asm_11c746
- ld a, [hl]
- and a
- ret z
- cp $3
- ret z
- cp $6
- ret z
- cp $9
- ret z
- dec a
- jr .asm_11c76e
-.asm_11c755
- ld a, [wcd28]
- ld b, a
- ld a, [wcd26]
- add [hl]
- inc a
- cp b
- ret nc
- ld a, [hl]
- cp $2
- ret z
- cp $5
- ret z
- cp $8
- ret z
- cp $b
- ret z
- inc a
-.asm_11c76e
- ld [hl], a
- ret
-
-Function11c770: ; 11c770 (47:4770)
- xor a
- ld [wMobileCommsJumptableIndex], a
- ld [wcd26], a
- ld [wcd27], a
- ld a, [wcd2b]
- and a
- jr nz, .cd2b_is_nonzero
- ld a, [wcd21]
- and a
- jr z, .cd21_is_zero
- ; load from data array
- dec a
- sla a
- ld hl, MobileEZChatData_WordAndPageCounts
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [hli]
- ld [wcd28], a
- ld a, [hl]
-.load
- ld [wcd29], a
- ret
-
-.cd21_is_zero
- ; compute from [wc7d2]
- ld a, [wc7d2]
- ld [wcd28], a
-.div_12
- ld c, 12
- call SimpleDivide
- and a
- jr nz, .no_need_to_floor
- dec b
-.no_need_to_floor
- ld a, b
- jr .load
-
-.cd2b_is_nonzero
- ; compute from [c6a8 + 2 * [cd22]]
- ld hl, $c6a8 ; $c68a + 30
- ld a, [wcd22]
- ld c, a
- ld b, 0
- add hl, bc
- add hl, bc
- ld a, [hl]
- ld [wcd28], a
- jr .div_12
-
-Function11c7bc: ; 11c7bc (47:47bc)
- ld bc, Unknown_11c854
- ld a, [wcd2b]
- and a
- jr nz, .asm_11c814
- ld a, [wcd21]
- ld d, a
- and a
- jr z, .asm_11c7e9
- ld a, [wcd26]
- ld e, a
-.asm_11c7d0
- ld a, [bc]
- ld l, a
- inc bc
- ld a, [bc]
- ld h, a
- inc bc
- and l
- cp $ff
- ret z
- push bc
- push de
- call Function11c05d
- pop de
- pop bc
- inc e
- ld a, [wcd28]
- cp e
- jr nz, .asm_11c7d0
- ret
-
-.asm_11c7e9
- ld hl, wListPointer
- ld a, [wcd26]
- ld e, a
- add hl, de
-.asm_11c7f1
- push de
- ld a, [hli]
- ld e, a
- ld d, $0
- push hl
- ld a, [bc]
- ld l, a
- inc bc
- ld a, [bc]
- ld h, a
- inc bc
- and l
- cp $ff
- jr z, .asm_11c811
- push bc
- call Function11c05d
- pop bc
- pop hl
- pop de
- inc e
- ld a, [wcd28]
- cp e
- jr nz, .asm_11c7f1
- ret
-
-.asm_11c811
- pop hl
- pop de
- ret
-
-.asm_11c814
- ld hl, $c648
- ld a, [wcd22]
- ld e, a
- ld d, $0
- add hl, de
- add hl, de
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- push de
- pop hl
- ld a, [wcd26]
- ld e, a
- ld d, $0
- add hl, de
- add hl, de
- ld a, [wcd26]
- ld e, a
-.asm_11c831
- push de
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- push hl
- ld a, [bc]
- ld l, a
- inc bc
- ld a, [bc]
- ld h, a
- inc bc
- and l
- cp $ff
- jr z, .asm_11c851
- push bc
- call Function11c05d
- pop bc
- pop hl
- pop de
- inc e
- ld a, [wcd28]
- cp e
- jr nz, .asm_11c831
- ret
-
-.asm_11c851
- pop hl
- pop de
- ret
-; 11c854 (47:4854)
-
-Unknown_11c854: ; 11c854
- dwcoord 2, 8
- dwcoord 8, 8
- dwcoord 14, 8
- dwcoord 2, 10
- dwcoord 8, 10
- dwcoord 14, 10
- dwcoord 2, 12
- dwcoord 8, 12
- dwcoord 14, 12
- dwcoord 2, 14
- dwcoord 8, 14
- dwcoord 14, 14
- dw -1
-; 11c86e
-
-Function11c86e: ; 11c86e (47:486e)
- ld a, [wcd26]
- and a
- jr z, .asm_11c88a
- hlcoord 2, 17
- ld de, MobileString_Prev
- call PlaceString
- hlcoord 6, 17
- ld c, $3
- xor a
-.asm_11c883
- ld [hli], a
- inc a
- dec c
- jr nz, .asm_11c883
- jr .asm_11c895
-.asm_11c88a
- hlcoord 2, 17
- ld c, $7
- ld a, $7f
-.asm_11c891
- ld [hli], a
- dec c
- jr nz, .asm_11c891
-.asm_11c895
- ld hl, wcd28
- ld a, [wcd26]
- add $c
- jr c, .asm_11c8b7
- cp [hl]
- jr nc, .asm_11c8b7
- hlcoord 16, 17
- ld de, MobileString_Next
- call PlaceString
- hlcoord 11, 17
- ld a, $3
- ld c, a
-.asm_11c8b1
- ld [hli], a
- inc a
- dec c
- jr nz, .asm_11c8b1
- ret
-
-.asm_11c8b7
- hlcoord 17, 16
- ld a, $7f
- ld [hl], a
- hlcoord 11, 17
- ld c, $7
-.asm_11c8c2
- ld [hli], a
- dec c
- jr nz, .asm_11c8c2
- ret
-; 11c8c7 (47:48c7)
-
-BCD2String: ; 11c8c7
- inc a
- push af
- and $f
- ld [hDividend], a
- pop af
- and $f0
- swap a
- ld [hDividend + 1], a
- xor a
- ld [hDividend + 2], a
- push hl
- callba Function11a80c
- pop hl
- ld a, [wcd63]
- add "0"
- ld [hli], a
- ld a, [wcd62]
- add "0"
- ld [hli], a
- ret
-; 11c8ec
-
-MobileString_Page: ; 11c8ec
- db "ぺージ@"
-; 11c8f0
-
-MobileString_Prev: ; 11c8f0
- db "まえ@"
-; 11c8f3
-
-MobileString_Next: ; 11c8f3
- db "つぎ@"
-; 11c8f6
-
-Function11c8f6: ; 11c8f6 (47:48f6)
- ld a, [wcd20] ; wcd20
- call Function11c95d
- push hl
- ld a, [wcd2b]
- and a
- jr nz, .asm_11c938
- ld a, [wcd21]
- ld d, a
- and a
- jr z, .asm_11c927
- ld hl, wcd26
- ld a, [wMobileCommsJumptableIndex]
- add [hl]
-.asm_11c911
- ld e, a
-.asm_11c912
- pop hl
- push de
- call Function11c05d
- pop de
- ld a, [wcd20] ; wcd20
- ld c, a
- ld b, $0
- ld hl, wcd36
- add hl, bc
- add hl, bc
- ld [hl], e
- inc hl
- ld [hl], d
- ret
-
-.asm_11c927
- ld hl, wcd26
- ld a, [wMobileCommsJumptableIndex]
- add [hl]
- ld c, a
- ld b, $0
- ld hl, wListPointer
- add hl, bc
- ld a, [hl]
- jr .asm_11c911
-.asm_11c938
- ld hl, $c648
- ld a, [wcd22]
- ld e, a
- ld d, $0
- add hl, de
- add hl, de
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- push de
- pop hl
- ld a, [wcd26]
- ld e, a
- ld d, $0
- add hl, de
- add hl, de
- ld a, [wMobileCommsJumptableIndex]
- ld e, a
- add hl, de
- add hl, de
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- jr .asm_11c912
-
-Function11c95d: ; 11c95d (47:495d)
- sla a
- ld c, a
- ld b, 0
- ld hl, Unknown_11c986
- add hl, bc
- ld a, [hli]
- ld c, a
- ld a, [hl]
- ld b, a
- push bc
- push bc
- pop hl
- ld a, $5
- ld c, a
- ld a, $7f
-.asm_11c972
- ld [hli], a
- dec c
- jr nz, .asm_11c972
- dec hl
- ld bc, -20
- add hl, bc
- ld a, $5
- ld c, a
- ld a, $7f
-.asm_11c980
- ld [hld], a
- dec c
- jr nz, .asm_11c980
- pop hl
- ret
-; 11c986 (47:4986)
-
-Unknown_11c986:
- dwcoord 1, 2
- dwcoord 7, 2
- dwcoord 13, 2
- dwcoord 1, 4
- dwcoord 7, 4
- dwcoord 13, 4
-; 11c992
-
-Function11c992: ; 11c992 (47:4992)
- ld a, $8
- hlcoord 2, 7
-.asm_11c997
- push af
- ld a, $7f
- push hl
- ld bc, $11
- call ByteFill
- pop hl
- ld bc, $14
- add hl, bc
- pop af
- dec a
- jr nz, .asm_11c997
- ret
-
-Function11c9ab: ; 11c9ab (47:49ab)
- ld a, $7
- hlcoord 0, 6, AttrMap
- ld bc, $c8
- call ByteFill
- callba ReloadMapPart
- ret
-
-Function11c9bd: ; 11c9bd (47:49bd)
- ld de, String_11ca38
- call Function11ca7f
-
-Function11c9c3: ; 11c9c3 (47:49c3)
- ld hl, wcd2a
- ld de, hJoypadPressed ; $ffa3
- ld a, [de]
- and $1
- jr nz, .asm_11c9de
- ld a, [de]
- and $2
- jr nz, .asm_11c9e9
- ld a, [de]
- and $40
- jr nz, .asm_11c9f7
- ld a, [de]
- and $80
- jr nz, .asm_11c9fc
- ret
-
-.asm_11c9de
- ld a, [hl]
- and a
- jr nz, .asm_11c9e9
- call Function11ca5e
- xor a
- ld [wcd20], a ; wcd20
-.asm_11c9e9
- ld hl, wcd24
- set 4, [hl]
- ld a, $4
- ld [wJumptableIndex], a
- call PlayClickSFX
- ret
-
-.asm_11c9f7
- ld a, [hl]
- and a
- ret z
- dec [hl]
- ret
-
-.asm_11c9fc
- ld a, [hl]
- and a
- ret nz
- inc [hl]
- ret
-
-Function11ca01: ; 11ca01 (47:4a01)
- hlcoord 14, 7, AttrMap
- ld de, $14
- ld a, $5
- ld c, a
-.asm_11ca0a
- push hl
- ld a, $6
- ld b, a
- ld a, $7
-.asm_11ca10
- ld [hli], a
- dec b
- jr nz, .asm_11ca10
- pop hl
- add hl, de
- dec c
- jr nz, .asm_11ca0a
-
-Function11ca19: ; 11ca19 (47:4a19)
- hlcoord 0, 12, AttrMap
- ld de, $14
- ld a, $6
- ld c, a
-.asm_11ca22
- push hl
- ld a, $14
- ld b, a
- ld a, $7
-.asm_11ca28
- ld [hli], a
- dec b
- jr nz, .asm_11ca28
- pop hl
- add hl, de
- dec c
- jr nz, .asm_11ca22
- callba ReloadMapPart
- ret
-; 11ca38 (47:4a38)
-
-String_11ca38: ; 11ca38
- db "とうろくちゅう", $25, "あいさつ¯ぜんぶ"
- next "けしても よろしいですか?@"
-; 11ca57
-
-String_11ca57: ; 11ca57
- db "はい"
- next "いいえ@"
-; 11ca5e
-
-Function11ca5e: ; 11ca5e (47:4a5e)
- xor a
-.loop
- push af
- call Function11ca6a
- pop af
- inc a
- cp $6
- jr nz, .loop
- ret
-
-Function11ca6a: ; 11ca6a (47:4a6a)
- ld hl, wcd36
- ld c, a
- ld b, $0
- add hl, bc
- add hl, bc
- ld [hl], b
- inc hl
- ld [hl], b
- call Function11c95d
- ld de, String_11c3bc
- call PlaceString
- ret
-
-Function11ca7f: ; 11ca7f (47:4a7f)
- push de
- ld de, Unknown_11cfc6
- call Function11cfce
- ld de, Unknown_11cfca
- call Function11cfce
- hlcoord 1, 14
- pop de
- call PlaceString
- hlcoord 16, 8
- ld de, String_11ca57
- call PlaceString
- call Function11ca01
- ld a, $1
- ld [wcd2a], a
- ld hl, wcd24
- res 4, [hl]
- call Function11cfb5
- ret
-
-Function11caad: ; 11caad (47:4aad)
- ld de, String_11cb1c
- call Function11ca7f
-
-Function11cab3: ; 11cab3 (47:4ab3)
- ld hl, wcd2a
- ld de, hJoypadPressed ; $ffa3
- ld a, [de]
- and $1
- jr nz, .asm_11cace
- ld a, [de]
- and $2
- jr nz, .asm_11caf9
- ld a, [de]
- and $40
- jr nz, .asm_11cb12
- ld a, [de]
- and $80
- jr nz, .asm_11cb17
- ret
-
-.asm_11cace
- call PlayClickSFX
- ld a, [hl]
- and a
- jr nz, .asm_11cafc
- ld a, [wcd35]
- and a
- jr z, .asm_11caf3
- cp $ff
- jr z, .asm_11caf3
- ld a, $ff
- ld [wcd35], a
- hlcoord 1, 14
- ld de, String_11cb31
- call PlaceString
- ld a, $1
- ld [wcd2a], a
- ret
-
-.asm_11caf3
- ld hl, wJumptableIndex
- set 7, [hl]
- ret
-
-.asm_11caf9
- call PlayClickSFX
-.asm_11cafc
- ld hl, wcd24
- set 4, [hl]
- ld a, $4
- ld [wJumptableIndex], a
- ld a, [wcd35]
- cp $ff
- ret nz
- ld a, $1
- ld [wcd35], a
- ret
-
-.asm_11cb12
- ld a, [hl]
- and a
- ret z
- dec [hl]
- ret
-
-.asm_11cb17
- ld a, [hl]
- and a
- ret nz
- inc [hl]
- ret
-; 11cb1c (47:4b1c)
-
-String_11cb1c: ; 11cb1c
- db "あいさつ", $25, "とうろく¯ちゅうし"
- next "しますか?@"
-; 11cb31
-
-String_11cb31: ; 11cb31
- db "とうろくちゅう", $25, "あいさつ", $24, "ほぞん"
- next "されません", $4a, "よろしい ですか?@"
-; 11cb52
-
-Function11cb52: ; 11cb52 (47:4b52)
- ld hl, Unknown_11cc01
- ld a, [wMenuCursorY]
-.asm_11cb58
- dec a
- jr z, .asm_11cb5f
- inc hl
- inc hl
- jr .asm_11cb58
-.asm_11cb5f
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- call Function11ca7f
-
-Function11cb66: ; 11cb66 (47:4b66)
- ld hl, wcd2a
- ld de, hJoypadPressed ; $ffa3
- ld a, [de]
- and $1
- jr nz, .asm_11cb81
- ld a, [de]
- and $2
- jr nz, .asm_11cbd7
- ld a, [de]
- and $40
- jr nz, .asm_11cbeb
- ld a, [de]
- and $80
- jr nz, .asm_11cbf0
- ret
-
-.asm_11cb81
- ld a, [hl]
- and a
- jr nz, .asm_11cbd4
- ld a, $4
- call GetSRAMBank
- ld hl, $a007
- ld a, [wMenuCursorY]
- dec a
- sla a
- sla a
- ld c, a
- sla a
- add c
- ld c, a
- ld b, $0
- add hl, bc
- ld de, wcd36
- ld c, $c
-.asm_11cba2
- ld a, [de]
- ld [hli], a
- inc de
- dec c
- jr nz, .asm_11cba2
- call CloseSRAM
- call PlayClickSFX
- ld de, Unknown_11cfc6
- call Function11cfce
- ld hl, Unknown_11cc7e
- ld a, [wMenuCursorY]
-.asm_11cbba
- dec a
- jr z, .asm_11cbc1
- inc hl
- inc hl
- jr .asm_11cbba
-.asm_11cbc1
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- hlcoord 1, 14
- call PlaceString
- ld hl, wJumptableIndex
- inc [hl]
- inc hl
- ld a, $10
- ld [hl], a
- ret
-
-.asm_11cbd4
- call PlayClickSFX
-.asm_11cbd7
- ld de, Unknown_11cfba
- call Function11cfce
- call Function11c38a
- ld hl, wcd24
- set 4, [hl]
- ld a, $4
- ld [wJumptableIndex], a
- ret
-
-.asm_11cbeb
- ld a, [hl]
- and a
- ret z
- dec [hl]
- ret
-
-.asm_11cbf0
- ld a, [hl]
- and a
- ret nz
- inc [hl]
- ret
-
-Function11cbf5: ; 11cbf5 (47:4bf5)
- call WaitSFX
- ld hl, wcf64
- dec [hl]
- ret nz
- dec hl
- set 7, [hl]
- ret
-; 11cc01 (47:4c01)
-
-Unknown_11cc01: ; 11cc01
- dw String_11cc09
- dw String_11cc23
- dw String_11cc42
- dw String_11cc60
-
-String_11cc09: ; 11cc09
- db "じこしょうかい は"
- next "この あいさつで いいですか?@"
-
-String_11cc23: ; 11cc23
- db "たいせん ", $4a, "はじまるとき は"
- next "この あいさつで いいですか?@"
-
-String_11cc42: ; 11cc42
- db "たいせん ", $1d, "かったとき は"
- next "この あいさつで いいですか?@"
-
-String_11cc60: ; 11cc60
- db "たいせん ", $1d, "まけたとき は"
- next "この あいさつで いいですか?@"
-; 11cc7e
-
-Unknown_11cc7e: ; 11cc7e
- dw String_11cc86
- dw String_11cc9d
- dw String_11ccb9
- dw String_11ccd4
-
-String_11cc86: ; 11cc86
- db "じこしょうかい の"
- next "あいさつ¯とうろくした!@"
-
-String_11cc9d: ; 11cc9d
- db "たいせん ", $4a, "はじまるとき の"
- next "あいさつ¯とうろくした!@"
-
-String_11ccb9: ; 11ccb9
- db "たいせん ", $1d, "かったとき の"
- next "あいさつ¯とうろくした!@"
-
-String_11ccd4: ; 11ccd4
- db "たいせん ", $1d, "まけたとき の"
- next "あいさつ¯とうろくした!@"
-; 11ccef
-
-Function11ccef: ; 11ccef (47:4cef)
- ld de, Unknown_11cfc6
- call Function11cfce
- hlcoord 1, 14
- ld de, String_11cd10
- call PlaceString
- call Function11ca19
- call Function11cfb5
-
-Function11cd04: ; 11cd04 (47:4d04)
- ld de, hJoypadPressed ; $ffa3
- ld a, [de]
- and a
- ret z
- ld a, $4
- ld [wJumptableIndex], a
- ret
-; 11cd10 (47:4d10)
-
-String_11cd10: ; 11cd10
- db "なにか ことば¯いれてください@"
-; 11cd20
-
-Function11cd20: ; 11cd20 (47:4d20)
- call EZChat_ClearBottom12Rows
- ld de, Unknown_11cfc6
- call Function11cfce
- hlcoord 1, 14
- ld a, [wcd2b]
- ld [wcd2c], a
- and a
- jr nz, .asm_11cd3a
- ld de, String_11cdc7
- jr .asm_11cd3d
-.asm_11cd3a
- ld de, String_11cdd9
-.asm_11cd3d
- call PlaceString
- hlcoord 4, 8
- ld de, String_11cdf5
- call PlaceString
- call Function11cdaa
- ld hl, wcd24
- res 5, [hl]
- call Function11cfb5
-
-Function11cd54: ; 11cd54 (47:4d54)
- ld hl, wcd2c
- ld de, hJoypadPressed ; $ffa3
- ld a, [de]
- and A_BUTTON
- jr nz, .asm_11cd6f
- ld a, [de]
- and B_BUTTON
- jr nz, .asm_11cd73
- ld a, [de]
- and D_UP
- jr nz, .asm_11cd8b
- ld a, [de]
- and D_DOWN
- jr nz, .asm_11cd94
- ret
-
-.asm_11cd6f
- ld a, [hl]
- ld [wcd2b], a
-.asm_11cd73
- ld a, [wcd2b]
- and a
- jr nz, .asm_11cd7d
- ld a, $6
- jr .asm_11cd7f
-
-.asm_11cd7d
- ld a, $15
-.asm_11cd7f
- ld [wJumptableIndex], a
- ld hl, wcd24
- set 5, [hl]
- call PlayClickSFX
- ret
-
-.asm_11cd8b
- ld a, [hl]
- and a
- ret z
- dec [hl]
- ld de, String_11cdc7
- jr .asm_11cd9b
-
-.asm_11cd94
- ld a, [hl]
- and a
- ret nz
- inc [hl]
- ld de, String_11cdd9
-.asm_11cd9b
- push de
- ld de, Unknown_11cfc6
- call Function11cfce
- pop de
- hlcoord 1, 14
- call PlaceString
- ret
-
-Function11cdaa: ; 11cdaa (47:4daa)
- ld a, $2
- hlcoord 0, 6, AttrMap
- ld bc, 6 * SCREEN_WIDTH
- call ByteFill
- ld a, $7
- hlcoord 0, 12, AttrMap
- ld bc, 4 * SCREEN_WIDTH
- call ByteFill
- callba ReloadMapPart
- ret
-; 11cdc7 (47:4dc7)
-
-String_11cdc7: ; 11cdc7
-; Words will be displayed by category
- db "ことば¯しゅるいべつに"
- next "えらべます@"
-; 11cdd9
-
-String_11cdd9: ; 11cdd9
-; Words will be displayed in alphabetical order
- db "ことば¯アイウエォ の"
- next "じゅんばんで ひょうじ します@"
-; 11cdf5
-
-String_11cdf5: ; 11cdf5
- db "しゅるいべつ モード" ; Category mode
- next "アイウエォ モード@" ; ABC mode
-; 11ce0b
-
-Function11ce0b: ; 11ce0b (47:4e0b)
- call EZChat_ClearBottom12Rows
- hlcoord 1, 7
- ld de, String_11cf79
- call PlaceString
- hlcoord 1, 17
- ld de, EZChatString_Stop_Mode_Cancel
- call PlaceString
- call Function11c618
- ld hl, wcd24
- res 2, [hl]
- call Function11cfb5
-
-Function11ce2b: ; 11ce2b (47:4e2b)
- ld a, [wcd22]
- sla a
- sla a
- ld c, a
- ld b, 0
- ld hl, Unknown_11ceb9
- add hl, bc
-
- ld de, hJoypadPressed ; $ffa3
- ld a, [de]
- and START
- jr nz, .start
- ld a, [de]
- and SELECT
- jr nz, .select
- ld a, [de]
- and A_BUTTON
- jr nz, .a
- ld a, [de]
- and B_BUTTON
- jr nz, .b
-
- ld de, hJoyLast
- ld a, [de]
- and D_UP
- jr nz, .up
- ld a, [de]
- and D_DOWN
- jr nz, .down
- ld a, [de]
- and D_LEFT
- jr nz, .left
- ld a, [de]
- and D_RIGHT
- jr nz, .right
-
- ret
-
-.a
- ld a, [wcd22]
- cp NUM_KANA
- jr c, .place
- sub NUM_KANA
- jr z, .done
- dec a
- jr z, .mode
- jr .b
-
-.start
- ld hl, wcd24
- set 0, [hl]
- ld a, $8
- ld [wcd20], a ; wcd20
-.b
- ld a, $4
- jr .load
-
-.select
- ld a, [wcd2b]
- xor $1
- ld [wcd2b], a
- ld a, $6
- jr .load
-
-.place
- ld a, $8
- jr .load
-
-.mode
- ld a, $13
-.load
- ld [wJumptableIndex], a
- ld hl, wcd24
- set 2, [hl]
- call PlayClickSFX
- ret
-
-.done
- ld a, [wcd20] ; wcd20
- call Function11ca6a
- call PlayClickSFX
- ret
-
-.left
- inc hl
-.down
- inc hl
-.right
- inc hl
-.up
- ld a, [hl]
- cp $ff
- ret z
- ld [wcd22], a
- ret
-; 11ceb9 (47:4eb9)
-
-Unknown_11ceb9: ; 11ceb9
- ; up left down right
- db $ff, $01
- db $05, $ff
- db $ff, $02
- db $06, $00
- db $ff, $03
- db $07, $01
- db $ff, $04
- db $08, $02
- db $ff, $14
- db $09, $03
- db $00, $06
- db $0a, $ff
- db $01, $07
- db $0b, $05
- db $02, $08
- db $0c, $06
- db $03, $09
- db $0d, $07
- db $04, $19
- db $0e, $08
- db $05, $0b
- db $0f, $ff
- db $06, $0c
- db $10, $0a
- db $07, $0d
- db $11, $0b
- db $08, $0e
- db $12, $0c
- db $09, $1e
- db $13, $0d
- db $0a, $10
- db $2d, $ff
- db $0b, $11
- db $2d, $0f
- db $0c, $12
- db $2d, $10
- db $0d, $13
- db $2d, $11
- db $0e, $26
- db $2d, $12
- db $ff, $15
- db $19, $04
- db $ff, $16
- db $1a, $14
- db $ff, $17
- db $1b, $15
- db $ff, $18
- db $1c, $16
- db $ff, $23
- db $1d, $17
- db $14, $1a
- db $1e, $09
- db $15, $1b
- db $1f, $19
- db $16, $1c
- db $20, $1a
- db $17, $1d
- db $21, $1b
- db $18, $2b
- db $22, $1c
- db $19, $1f
- db $26, $0e
- db $1a, $20
- db $27, $1e
- db $1b, $21
- db $28, $1f
- db $1c, $22
- db $29, $20
- db $1d, $2c
- db $2a, $21
- db $ff, $24
- db $2b, $18
- db $ff, $25
- db $2b, $23
- db $ff, $ff
- db $2b, $24
- db $1e, $27
- db $2e, $13
- db $1f, $28
- db $2e, $26
- db $20, $29
- db $2e, $27
- db $21, $2a
- db $2e, $28
- db $22, $ff
- db $2e, $29
- db $23, $ff
- db $2c, $1d
- db $2b, $ff
- db $2f, $22
- db $0f, $2e
- db $ff, $ff
- db $26, $2f
- db $ff, $2d
- db $2c, $ff
- db $ff, $2e
-; 11cf79
-
-String_11cf79: ; 11cf79
-; Hiragana table
- db "あいうえお なにぬねの や ゆ よ"
- next "かきくけこ はひふへほ わ"
- next "さしすせそ まみむめも そのた"
- next "たちつてと らりるれろ"
- db "@"
-; 11cfb5
-
-Function11cfb5: ; 11cfb5 (47:4fb5)
- ld hl, wJumptableIndex
- inc [hl]
- ret
-; 11cfba (47:4fba)
-
-Unknown_11cfba:
- db 0, 0 ; start coords
- db 20, 6 ; end coords
-
-Unknown_11cfbe:
- db 0, 14 ; start coords
- db 20, 4 ; end coords
-
-Unknown_11cfc2:
- db 0, 6 ; start coords
- db 20, 10 ; end coords
-
-Unknown_11cfc6:
- db 0, 12 ; start coords
- db 20, 6 ; end coords
-
-Unknown_11cfca:
- db 14, 7 ; start coords
- db 6, 5 ; end coords
-; 11cfce
-
-Function11cfce: ; 11cfce (47:4fce)
- hlcoord 0, 0
- ld bc, SCREEN_WIDTH
- ld a, [de]
- inc de
- push af
- ld a, [de]
- inc de
- and a
-.add_n_times
- jr z, .done_add_n_times
- add hl, bc
- dec a
- jr .add_n_times
-.done_add_n_times
- pop af
- ld c, a
- ld b, 0
- add hl, bc
- push hl
- ld a, $79
- ld [hli], a
- ld a, [de]
- inc de
- dec a
- dec a
- jr z, .skip_fill
- ld c, a
- ld a, $7a
-.fill_loop
- ld [hli], a
- dec c
- jr nz, .fill_loop
-.skip_fill
- ld a, $7b
- ld [hl], a
- pop hl
- ld bc, SCREEN_WIDTH
- add hl, bc
- ld a, [de]
- dec de
- dec a
- dec a
- jr z, .skip_section
- ld b, a
-.loop
- push hl
- ld a, $7c
- ld [hli], a
- ld a, [de]
- dec a
- dec a
- jr z, .skip_row
- ld c, a
- ld a, $7f
-.row_loop
- ld [hli], a
- dec c
- jr nz, .row_loop
-.skip_row
- ld a, $7c
- ld [hl], a
- pop hl
- push bc
- ld bc, SCREEN_WIDTH
- add hl, bc
- pop bc
- dec b
- jr nz, .loop
-.skip_section
- ld a, $7d
- ld [hli], a
- ld a, [de]
- dec a
- dec a
- jr z, .skip_remainder
- ld c, a
- ld a, $7a
-.final_loop
- ld [hli], a
- dec c
- jr nz, .final_loop
-.skip_remainder
- ld a, $7e
- ld [hl], a
- ret
-
-Function11d035: ; 11d035 (47:5035)
- hlcoord 0, 0
- ld bc, SCREEN_WIDTH
- ld a, [de]
- inc de
- push af
- ld a, [de]
- inc de
- and a
-.add_n_times
- jr z, .done_add_n_times
- add hl, bc
- dec a
- jr .add_n_times
-.done_add_n_times
- pop af
- ld c, a
- ld b, $0
- add hl, bc
- push hl
- ld a, $79
- ld [hl], a
- pop hl
- push hl
- ld a, [de]
- dec a
- inc de
- ld c, a
- add hl, bc
- ld a, $7b
- ld [hl], a
- call .AddNMinusOneTimes
- ld a, $7e
- ld [hl], a
- pop hl
- push hl
- call .AddNMinusOneTimes
- ld a, $7d
- ld [hl], a
- pop hl
- push hl
- inc hl
- push hl
- call .AddNMinusOneTimes
- pop bc
- dec de
- ld a, [de]
- cp $2
- jr z, .skip
- dec a
- dec a
-.loop
- push af
- ld a, $7a
- ld [hli], a
- ld [bc], a
- inc bc
- pop af
- dec a
- jr nz, .loop
-.skip
- pop hl
- ld bc, $14
- add hl, bc
- push hl
- ld a, [de]
- dec a
- ld c, a
- ld b, $0
- add hl, bc
- pop bc
- inc de
- ld a, [de]
- cp $2
- ret z
- push bc
- dec a
- dec a
- ld c, a
- ld b, a
- ld de, $14
-.loop2
- ld a, $7c
- ld [hl], a
- add hl, de
- dec c
- jr nz, .loop2
- pop hl
-.loop3
- ld a, $7c
- ld [hl], a
- add hl, de
- dec b
- jr nz, .loop3
- ret
-
-.AddNMinusOneTimes: ; 11d0ac (47:50ac)
- ld a, [de]
- dec a
- ld bc, SCREEN_WIDTH
-.add_n_minus_one_times
- add hl, bc
- dec a
- jr nz, .add_n_minus_one_times
- ret
-
-AnimateEZChatCursor: ; 11d0b6 (47:50b6)
- ld hl, SPRITEANIMSTRUCT_0C
- add hl, bc
- ld a, [hl]
- ld e, a
- ld d, 0
- ld hl, .Jumptable
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-.Jumptable:
- dw .zero
- dw .one
- dw .two
- dw .three
- dw .four
- dw .five
- dw .six
- dw .seven
- dw .eight
- dw .nine
- dw .ten
-
-.zero ; 11d0dd (47:50dd)
- ld a, [wcd20] ; wcd20
- sla a
- ld hl, .Coords_Zero
- ld e, $1
- jr .load
-
-.one ; 11d0e9 (47:50e9)
- ld a, [wcd21]
- sla a
- ld hl, .Coords_One
- ld e, $2
- jr .load
-
-.two ; 11d0f5 (47:50f5)
- ld hl, .FramesetsIDs_Two
- ld a, [wcd22]
- ld e, a
- ld d, $0
- add hl, de
- ld a, [hl]
- call ReinitSpriteAnimFrame
-
- ld a, [wcd22]
- sla a
- ld hl, .Coords_Two
- ld e, $4
- jr .load
-
-.three ; 11d10f (47:510f)
- ld a, SPRITE_ANIM_FRAMESET_27
- call ReinitSpriteAnimFrame
- ld a, [wMobileCommsJumptableIndex]
- sla a
- ld hl, .Coords_Three
- ld e, $8
-.load ; 11d11e (47:511e)
- push de
- ld e, a
- ld d, $0
- add hl, de
- push hl
- pop de
- ld hl, SPRITEANIMSTRUCT_XCOORD
- add hl, bc
- ld a, [de]
- inc de
- ld [hli], a
- ld a, [de]
- ld [hl], a
- pop de
- ld a, e
- call .UpdateObjectFlags
- ret
-
-.four ; 11d134 (47:5134)
- ld a, SPRITE_ANIM_FRAMESET_27
- call ReinitSpriteAnimFrame
- ld a, [wcd2a]
- sla a
- ld hl, .Coords_Four
- ld e, $10
- jr .load
-
-.five ; 11d145 (47:5145)
- ld a, SPRITE_ANIM_FRAMESET_27
- call ReinitSpriteAnimFrame
- ld a, [wcd2c]
- sla a
- ld hl, .Coords_Five
- ld e, $20
- jr .load
-
-.six ; 11d156 (47:5156)
- ld a, SPRITE_ANIM_FRAMESET_2A
- call ReinitSpriteAnimFrame
- ; X = [wcd4a] * 8 + 24
- ld a, [wcd4a]
- sla a
- sla a
- sla a
- add $18
- ld hl, SPRITEANIMSTRUCT_XCOORD
- add hl, bc
- ld [hli], a
- ; Y = 48
- ld a, $30
- ld [hl], a
-
- ld a, $1
- ld e, a
- call .UpdateObjectFlags
- ret
-
-.seven ; 11d175 (47:5175)
- ld a, [wEZChatCursorYCoord]
- cp $4
- jr z, .frameset_26
- ld a, SPRITE_ANIM_FRAMESET_28
- jr .got_frameset
-
-.frameset_26
- ld a, SPRITE_ANIM_FRAMESET_26
-.got_frameset
- call ReinitSpriteAnimFrame
- ld a, [wEZChatCursorYCoord]
- cp $4
- jr z, .asm_11d1b1
- ; X = [wEZChatCursorXCoord] * 8 + 32
- ld a, [wEZChatCursorXCoord]
- sla a
- sla a
- sla a
- add $20
- ld hl, SPRITEANIMSTRUCT_XCOORD
- add hl, bc
- ld [hli], a
- ; Y = [wEZChatCursorYCoord] * 16 + 72
- ld a, [wEZChatCursorYCoord]
- sla a
- sla a
- sla a
- sla a
- add $48
- ld [hl], a
- ld a, $2
- ld e, a
- call .UpdateObjectFlags
- ret
-
-.asm_11d1b1
- ; X = [wEZChatCursorXCoord] * 40 + 24
- ld a, [wEZChatCursorXCoord]
- sla a
- sla a
- sla a
- ld e, a
- sla a
- sla a
- add e
- add $18
- ld hl, SPRITEANIMSTRUCT_XCOORD
- add hl, bc
- ld [hli], a
- ; Y = 138
- ld a, $8a
- ld [hl], a
- ld a, $2
- ld e, a
- call .UpdateObjectFlags
- ret
-
-.nine ; 11d1d1 (47:51d1)
- ld d, -13 * 8
- ld a, SPRITE_ANIM_FRAMESET_2C
- jr .eight_nine_load
-
-.eight ; 11d1d7 (47:51d7)
- ld d, 2 * 8
- ld a, SPRITE_ANIM_FRAMESET_2B
-.eight_nine_load ; 11d1db (47:51db)
- push de
- call ReinitSpriteAnimFrame
- ld a, [wcd4a]
- sla a
- sla a
- sla a
- ld e, a
- sla a
- add e
- add 8 * 8
- ld hl, SPRITEANIMSTRUCT_YCOORD
- add hl, bc
- ld [hld], a
- pop af
- ld [hl], a
- ld a, $4
- ld e, a
- call .UpdateObjectFlags
- ret
-
-.ten ; 11d1fc (47:51fc)
- ld a, SPRITE_ANIM_FRAMESET_26
- call ReinitSpriteAnimFrame
- ld a, $8
- ld e, a
- call .UpdateObjectFlags
- ret
-; 11d208 (47:5208)
-
-.Coords_Zero: ; 11d208
- dbpixel 1, 3, 5, 2
- dbpixel 7, 3, 5, 2
- dbpixel 13, 3, 5, 2
- dbpixel 1, 5, 5, 2
- dbpixel 7, 5, 5, 2
- dbpixel 13, 5, 5, 2
- dbpixel 1, 17, 5, 2
- dbpixel 7, 17, 5, 2
- dbpixel 13, 17, 5, 2
-
-.Coords_One: ; 11d21a
- dbpixel 1, 8, 5, 2
- dbpixel 7, 8, 5, 2
- dbpixel 13, 8, 5, 2
- dbpixel 1, 10, 5, 2
- dbpixel 7, 10, 5, 2
- dbpixel 13, 10, 5, 2
- dbpixel 1, 12, 5, 2
- dbpixel 7, 12, 5, 2
- dbpixel 13, 12, 5, 2
- dbpixel 1, 14, 5, 2
- dbpixel 7, 14, 5, 2
- dbpixel 13, 14, 5, 2
- dbpixel 1, 16, 5, 2
- dbpixel 7, 16, 5, 2
- dbpixel 13, 16, 5, 2
- dbpixel 1, 18, 5, 2
- dbpixel 7, 18, 5, 2
- dbpixel 13, 18, 5, 2
-
-.Coords_Two: ; 11d23e
- dbpixel 2, 9 ; 00
- dbpixel 3, 9 ; 01
- dbpixel 4, 9 ; 02
- dbpixel 5, 9 ; 03
- dbpixel 6, 9 ; 04
- dbpixel 2, 11 ; 05
- dbpixel 3, 11 ; 06
- dbpixel 4, 11 ; 07
- dbpixel 5, 11 ; 08
- dbpixel 6, 11 ; 09
- dbpixel 2, 13 ; 0a
- dbpixel 3, 13 ; 0b
- dbpixel 4, 13 ; 0c
- dbpixel 5, 13 ; 0d
- dbpixel 6, 13 ; 0e
- dbpixel 2, 15 ; 0f
- dbpixel 3, 15 ; 10
- dbpixel 4, 15 ; 11
- dbpixel 5, 15 ; 12
- dbpixel 6, 15 ; 13
- dbpixel 8, 9 ; 14
- dbpixel 9, 9 ; 15
- dbpixel 10, 9 ; 16
- dbpixel 11, 9 ; 17
- dbpixel 12, 9 ; 18
- dbpixel 8, 11 ; 19
- dbpixel 9, 11 ; 1a
- dbpixel 10, 11 ; 1b
- dbpixel 11, 11 ; 1c
- dbpixel 12, 11 ; 1d
- dbpixel 8, 13 ; 1e
- dbpixel 9, 13 ; 1f
- dbpixel 10, 13 ; 20
- dbpixel 11, 13 ; 21
- dbpixel 12, 13 ; 22
- dbpixel 14, 9 ; 23
- dbpixel 16, 9 ; 24
- dbpixel 18, 9 ; 25
- dbpixel 8, 15 ; 26
- dbpixel 9, 15 ; 27
- dbpixel 10, 15 ; 28
- dbpixel 11, 15 ; 29
- dbpixel 12, 15 ; 2a
- dbpixel 14, 11 ; 2b
- dbpixel 14, 13 ; 2c
- dbpixel 1, 18, 5, 2 ; 2d
- dbpixel 7, 18, 5, 2 ; 2e
- dbpixel 13, 18, 5, 2 ; 2f
-
-.Coords_Three: ; 11d29e
- dbpixel 2, 10
- dbpixel 8, 10
- dbpixel 14, 10
- dbpixel 2, 12
- dbpixel 8, 12
- dbpixel 14, 12
- dbpixel 2, 14
- dbpixel 8, 14
- dbpixel 14, 14
- dbpixel 2, 16
- dbpixel 8, 16
- dbpixel 14, 16
-
-.Coords_Four: ; 11d2b6
- dbpixel 16, 10
- dbpixel 16, 12
-
-.Coords_Five: ; 11d2ba
- dbpixel 4, 10
- dbpixel 4, 12
-
-.FramesetsIDs_Two: ; 11d2be
- db SPRITE_ANIM_FRAMESET_28 ; 00
- db SPRITE_ANIM_FRAMESET_28 ; 01
- db SPRITE_ANIM_FRAMESET_28 ; 02
- db SPRITE_ANIM_FRAMESET_28 ; 03
- db SPRITE_ANIM_FRAMESET_28 ; 04
- db SPRITE_ANIM_FRAMESET_28 ; 05
- db SPRITE_ANIM_FRAMESET_28 ; 06
- db SPRITE_ANIM_FRAMESET_28 ; 07
- db SPRITE_ANIM_FRAMESET_28 ; 08
- db SPRITE_ANIM_FRAMESET_28 ; 09
- db SPRITE_ANIM_FRAMESET_28 ; 0a
- db SPRITE_ANIM_FRAMESET_28 ; 0b
- db SPRITE_ANIM_FRAMESET_28 ; 0c
- db SPRITE_ANIM_FRAMESET_28 ; 0d
- db SPRITE_ANIM_FRAMESET_28 ; 0e
- db SPRITE_ANIM_FRAMESET_28 ; 0f
- db SPRITE_ANIM_FRAMESET_28 ; 10
- db SPRITE_ANIM_FRAMESET_28 ; 11
- db SPRITE_ANIM_FRAMESET_28 ; 12
- db SPRITE_ANIM_FRAMESET_28 ; 13
- db SPRITE_ANIM_FRAMESET_28 ; 14
- db SPRITE_ANIM_FRAMESET_28 ; 15
- db SPRITE_ANIM_FRAMESET_28 ; 16
- db SPRITE_ANIM_FRAMESET_28 ; 17
- db SPRITE_ANIM_FRAMESET_28 ; 18
- db SPRITE_ANIM_FRAMESET_28 ; 19
- db SPRITE_ANIM_FRAMESET_28 ; 1a
- db SPRITE_ANIM_FRAMESET_28 ; 1b
- db SPRITE_ANIM_FRAMESET_28 ; 1c
- db SPRITE_ANIM_FRAMESET_28 ; 1d
- db SPRITE_ANIM_FRAMESET_28 ; 1e
- db SPRITE_ANIM_FRAMESET_28 ; 1f
- db SPRITE_ANIM_FRAMESET_28 ; 20
- db SPRITE_ANIM_FRAMESET_28 ; 21
- db SPRITE_ANIM_FRAMESET_28 ; 22
- db SPRITE_ANIM_FRAMESET_28 ; 23
- db SPRITE_ANIM_FRAMESET_28 ; 24
- db SPRITE_ANIM_FRAMESET_28 ; 25
- db SPRITE_ANIM_FRAMESET_28 ; 26
- db SPRITE_ANIM_FRAMESET_28 ; 27
- db SPRITE_ANIM_FRAMESET_28 ; 28
- db SPRITE_ANIM_FRAMESET_28 ; 29
- db SPRITE_ANIM_FRAMESET_28 ; 2a
- db SPRITE_ANIM_FRAMESET_28 ; 2b
- db SPRITE_ANIM_FRAMESET_29 ; 2c
- db SPRITE_ANIM_FRAMESET_26 ; 2d
- db SPRITE_ANIM_FRAMESET_26 ; 2e
- db SPRITE_ANIM_FRAMESET_26 ; 2f
-
-.UpdateObjectFlags: ; 11d2ee (47:52ee)
- ld hl, wcd24
- and [hl]
- jr nz, .update_y_offset
- ld a, e
- ld hl, wcd23
- and [hl]
- jr z, .reset_y_offset
- ld hl, SPRITEANIMSTRUCT_0E
- add hl, bc
- ld a, [hl]
- and a
- jr z, .flip_bit_0
- dec [hl]
- ret
-
-.flip_bit_0
- ld a, $0
- ld [hld], a
- ld a, $1
- xor [hl]
- ld [hl], a
- and a
- jr nz, .update_y_offset
-.reset_y_offset
- ld hl, SPRITEANIMSTRUCT_YOFFSET
- add hl, bc
- xor a
- ld [hl], a
- ret
-
-.update_y_offset
- ld hl, SPRITEANIMSTRUCT_YCOORD
- add hl, bc
- ld a, $b0
- sub [hl]
- ld hl, SPRITEANIMSTRUCT_YOFFSET
- add hl, bc
- ld [hl], a
- ret
-
-Function11d323: ; 11d323
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, Palette_11d33a
- ld de, UnknBGPals
- ld bc, 16 palettes
- call CopyBytes
- pop af
- ld [rSVBK], a
- ret
-; 11d33a
-
-Palette_11d33a:
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 16, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 23, 17, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-; 11d3ba
-
-EZChat_GetSeenPokemonByKana: ; 11d3ba
- ld a, [rSVBK]
- push af
- ld hl, $c648
- ld a, w5_d800 % $100
- ld [wcd2d], a
- ld [hli], a
- ld a, w5_d800 / $100
- ld [wcd2e], a
- ld [hl], a
-
- ld a, SortedPokemon % $100
- ld [wcd2f], a
- ld a, SortedPokemon / $100
- ld [wcd30], a
-
- ld a, $c6a8 % $100
- ld [wcd31], a
- ld a, $c6a8 / $100
- ld [wcd32], a
-
- ld a, $c64a % $100
- ld [wcd33], a
- ld a, $c64a / $100
- ld [wcd34], a
-
- ld hl, EZChat_SortedWords
- ld a, (EZChat_SortedWordsEnd - EZChat_SortedWords) / 4
-
-.MasterLoop: ; 11d3ef
- push af
-; read row
-; offset
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
-; size
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
-; save the pointer to the next row
- push hl
-; add de to w3_d000
- ld hl, w3_d000
- add hl, de
-; recover de from wcd2d (default: w5_d800)
- ld a, [wcd2d]
- ld e, a
- ld a, [wcd2e]
- ld d, a
-; save bc for later
- push bc
-
-.loop1
-; copy 2*bc bytes from 3:hl to 5:de
- ld a, $3
- ld [rSVBK], a
- ld a, [hli]
- push af
- ld a, $5
- ld [rSVBK], a
- pop af
- ld [de], a
- inc de
-
- ld a, $3
- ld [rSVBK], a
- ld a, [hli]
- push af
- ld a, $5
- ld [rSVBK], a
- pop af
- ld [de], a
- inc de
-
- dec bc
- ld a, c
- or b
- jr nz, .loop1
-
-; recover the pointer from wcd2f (default: SortedPokemon)
- ld a, [wcd2f]
- ld l, a
- ld a, [wcd30]
- ld h, a
-; copy the pointer from [hl] to bc
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
-; store the pointer to the next pointer back in wcd2f
- ld a, l
- ld [wcd2f], a
- ld a, h
- ld [wcd30], a
-; push pop that pointer to hl
- push bc
- pop hl
- ld c, $0
-.loop2
-; Have you seen this Pokemon?
- ld a, [hl]
- cp $ff
- jr z, .done
- call .CheckSeenMon
- jr nz, .next
-; If not, skip it.
- inc hl
- jr .loop2
-
-.next
-; If so, append it to the list at 5:de, and increase the count.
- ld a, [hli]
- ld [de], a
- inc de
- xor a
- ld [de], a
- inc de
- inc c
- jr .loop2
-
-.done
-; Remember the original value of bc from the table?
-; Well, the stack remembers it, and it's popping it to hl.
- pop hl
-; Add the number of seen Pokemon from the list.
- ld b, $0
- add hl, bc
-; Push pop to bc.
- push hl
- pop bc
-; Load the pointer from [wcd31] (default: $c6a8)
- ld a, [wcd31]
- ld l, a
- ld a, [wcd32]
- ld h, a
-; Save the quantity from bc to [hl]
- ld a, c
- ld [hli], a
- ld a, b
- ld [hli], a
-; Save the new value of hl to [wcd31]
- ld a, l
- ld [wcd31], a
- ld a, h
- ld [wcd32], a
-; Recover the pointer from [wcd33] (default: $c64a)
- ld a, [wcd33]
- ld l, a
- ld a, [wcd34]
- ld h, a
-; Save the current value of de there
- ld a, e
- ld [wcd2d], a
- ld [hli], a
- ld a, d
- ld [wcd2e], a
-; Save the new value of hl back to [wcd33]
- ld [hli], a
- ld a, l
- ld [wcd33], a
- ld a, h
- ld [wcd34], a
-; Next row
- pop hl
- pop af
- dec a
- jr z, .ExitMasterLoop
- jp .MasterLoop
-
-.ExitMasterLoop:
- pop af
- ld [rSVBK], a
- ret
-; 11d493
-
-.CheckSeenMon: ; 11d493
- push hl
- push bc
- push de
- dec a
- ld hl, rSVBK
- ld e, $1
- ld [hl], e
- call CheckSeenMon
- ld hl, rSVBK
- ld e, $5
- ld [hl], e
- pop de
- pop bc
- pop hl
- ret
-; 11d4aa
-
-EZChat_GetCategoryWordsByKana: ; 11d4aa
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
-
- ; load pointers
- ld hl, MobileEZChatCategoryPointers
- ld bc, MobileEZChatData_WordAndPageCounts
-
- ; init WRAM registers
- xor a
- ld [wcd2d], a
- inc a
- ld [wcd2e], a
-
- ; enter the first loop
- ld a, 14
-.loop1
- push af
-
- ; load the pointer to the category
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- push hl
-
- ; skip to the attributes
- ld hl, 5 ; length of a string
- add hl, de
-
- ; get the number of words in the category
- ld a, [bc] ; number of entries to copy
- inc bc
- inc bc
- push bc
-
-.loop2
- push af
- push hl
-
- ; load offset at [hl]
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
-
- ; add to w3_d000
- ld hl, w3_d000
- add hl, de
-
- ; copy from wcd2d and increment [wcd2d] in place
- ld a, [wcd2d]
- ld [hli], a
- inc a
- ld [wcd2d], a
-
- ; copy from wcd2e
- ld a, [wcd2e]
- ld [hl], a
-
- ; next entry
- pop hl
- ld de, 8
- add hl, de
- pop af
- dec a
- jr nz, .loop2
-
- ; reset and go to next category
- ld hl, wcd2d
- xor a
- ld [hli], a
- inc [hl]
- pop bc
- pop hl
- pop af
- dec a
- jr nz, .loop1
- pop af
- ld [rSVBK], a
- ret
-; 11d4fe
-
-SortedPokemon:
-; Pokemon sorted by kana.
-; Notably, Rhydon is missing.
- dw .a
- dw .i
- dw .u
- dw .e
- dw .o
- dw .ka_ga
- dw .ki_gi
- dw .ku_gu
- dw .ke_ge
- dw .ko_go
- dw .sa_za
- dw .shi_ji
- dw .su_zu
- dw .se_ze
- dw .so_zo
- dw .ta_da
- dw .chi_dhi
- dw .tsu_du
- dw .te_de
- dw .to_do
- dw .na
- dw .ni
- dw .nu
- dw .ne
- dw .no
- dw .ha_ba_pa
- dw .hi_bi_pi
- dw .fu_bu_pu
- dw .he_be_pe
- dw .ho_bo_po
- dw .ma
- dw .mi
- dw .mu
- dw .me
- dw .mo
- dw .ya
- dw .yu
- dw .yo
- dw .ra
- dw .ri
- dw .ru
- dw .re
- dw .ro
- dw .wa
- dw .end
-
-.a: db EKANS, ARBOK, SEAKING, ARIADOS, CROCONAW, UNOWN, -1
-.i: db EEVEE, GEODUDE, SPINARAK, PILOSWINE, ONIX, -1
-.u: db ARCANINE, SUDOWOODO, WEEPINBELL, VICTREEBEL, WOOPER, SWINUB, -1
-.e: db SKARMORY, AIPOM, ESPEON, HITMONCHAN, ELEKID, ELECTABUZZ, ENTEI, -1
-.o: db FERALIGATR, FURRET, OCTILLERY, PRIMEAPE, SENTRET, STANTLER, SPEAROW, FEAROW, OMASTAR, OMANYTE, -1
-.ka_ga db GROWLITHE, MACHAMP, DRAGONITE, PINSIR, SNORLAX, KABUTO, KABUTOPS, HITMONTOP, WARTORTLE, BLASTOISE, FARFETCH_D, CUBONE, MAROWAK, KANGASKHAN, -1
-.ki_gi db SUNFLORA, CATERPIE, GYARADOS, RAPIDASH, NINETALES, GIRAFARIG, BELLOSSOM, KINGDRA, KINGLER, -1
-.ku_gu db GLOOM, PINECO, GLIGAR, KRABBY, GRANBULL, CROBAT, -1
-.ke_ge db ABRA, GENGAR, TAUROS, -1
-.ko_go db MAGIKARP, MAGNEMITE, GASTLY, HAUNTER, MACHOKE, KAKUNA, PSYDUCK, PHANPY, RATTATA, GOLDUCK, GOLBAT, GOLEM, GRAVELER, VENONAT, -1
-.sa_za db RHYHORN, PUPITAR, CORSOLA, HITMONLEE, ZAPDOS, JOLTEON, SANDSHREW, SANDSLASH, -1 ; RHYDON should lead this list
-.shi_ji db SEADRA, SHELLDER, VAPOREON, DEWGONG, -1
-.su_zu db SUICUNE, STARMIE, SCYTHER, ZUBAT, BEEDRILL, HYPNO, DROWZEE, -1
-.se_ze db SQUIRTLE, CELEBI, -1
-.so_zo db WOBBUFFET, -1
-.ta_da db DUGTRIO, HORSEA, EXEGGCUTE, -1
-.chi_dhi db CHIKORITA, CHINCHOU, -1
-.tsu_du db SHUCKLE, -1
-.te_de db DIGLETT, REMORAID, DELIBIRD, HOUNDOUR, AMPHAROS, -1
-.to_do db DODUO, DODRIO, SMEARGLE, KOFFING, TENTACRUEL, TOGETIC, TOGEPI, GOLDEEN, METAPOD, DONPHAN, -1
-.na db ODDISH, EXEGGUTOR, -1
-.ni db NIDOKING, NIDOQUEEN, NIDORAN_M, NIDORAN_F, NIDORINA, NIDORINO, MEOWTH, SNEASEL, POLIWHIRL, POLITOED, POLIWRATH, POLIWAG, -1
-.nu db QUAGSIRE, -1
-.ne db NATU, XATU, -1
-.no db DUNSPARCE, -1
-.ha_ba_pa db SEEL, STEELIX, TYPHLOSION, DRAGONAIR, BUTTERFREE, SCIZOR, HOPPIP, BLISSEY, PARAS, PARASECT, QWILFISH, MR__MIME, TYROGUE, CLOYSTER, TYRANITAR, -1
-.hi_bi_pi db CLEFFA, WEEDLE, PIKACHU, CLEFABLE, PIDGEOT, PIDGEOTTO, PICHU, CLEFAIRY, CHARMANDER, STARYU, CYNDAQUIL, SUNKERN, TEDDIURSA, VOLTORB, -1
-.fu_bu_pu db MOLTRES, FLAREON, ALAKAZAM, MAGMAR, FORRETRESS, WIGGLYTUFF, IVYSAUR, BULBASAUR, VENUSAUR, AERODACTYL, MAGBY, IGGLYBUFF, UMBREON, ARTICUNO, JIGGLYPUFF, SNUBBULL, -1
-.he_be_pe db BAYLEEF, GRIMER, MUK, HERACROSS, HOUNDOOM, PERSIAN, LICKITUNG, -1
-.ho_bo_po db HO_OH, HOOTHOOT, PIDGEY, PONYTA, SKIPLOOM, PORYGON, PORYGON2, -1
-.ma db MAGCARGO, SLUGMA, QUILAVA, BELLSPROUT, WEEZING, MARILL, AZUMARILL, ELECTRODE, MANKEY, MANTINE, -1
-.mi db DRATINI, MEW, MEWTWO, MILTANK, -1
-.mu db MISDREAVUS, SMOOCHUM, -1
-.me db MEGANIUM, DITTO, TENTACOOL, MAREEP, -1
-.mo db FLAAFFY, VENOMOTH, TANGELA, -1
-.ya db SLOWKING, SLOWBRO, SLOWPOKE, MURKROW, YANMA, -1
-.yu db KADABRA, -1
-.yo db LARVITAR, NOCTOWL, -1
-.ra db RAIKOU, RAICHU, CHANSEY, RATICATE, LAPRAS, VILEPLUME, LANTURN, -1
-.ri db CHARMELEON, CHARIZARD, URSARING, -1
-.ru db JYNX, LUGIA, -1
-.re db MAGNETON, LEDIAN, LEDYBA, -1
-.ro db VULPIX, -1
-.wa db JUMPLUFF, TOTODILE, MACHOP;, -1
-.end db -1
-; 11d67e
-
-GFX_11d67e:
-INCBIN "gfx/pokedex/select_start.2bpp"
-; 11d6de
-
-LZ_11d6de:
-INCBIN "gfx/pokedex/slowpoke.2bpp.lz"
-; 11da52
-
-MobileEZChatCategoryNames: ; 11da52
-; Fixed message categories
- db "ポケモン@@" ; 00
- db "タイプ@@@" ; 01
- db "あいさつ@@" ; 02
- db "ひと@@@@" ; 03
- db "バトル@@@" ; 04
- db "こえ@@@@" ; 05
- db "かいわ@@@" ; 06
- db "きもち@@@" ; 07
- db "じょうたい@" ; 08
- db "せいかつ@@" ; 09
- db "しゅみ@@@" ; 0a
- db "こうどう@@" ; 0b
- db "じかん@@@" ; 0c
- db "むすび@@@" ; 0d
- db "あれこれ@@" ; 0e
-; 11daac
-
-MobileEZChatCategoryPointers: ; 11daac
- dw .Types ; 01
- dw .Greetings ; 02
- dw .People ; 03
- dw .Battle ; 04
- dw .Exclamations ; 05
- dw .Conversation ; 06
- dw .Feelings ; 07
- dw .Conditions ; 08
- dw .Life ; 09
- dw .Hobbies ; 0a
- dw .Actions ; 0b
- dw .Time ; 0c
- dw .Farewells ; 0d
- dw .ThisAndThat ; 0e
-
-.Types: ; 11dac8
- db "あく@@@", $26, $0, $0
- db "いわ@@@", $aa, $0, $0
- db "エスパー@", $da, $0, $0
- db "かくとう@", $4e, $1, $0
- db "くさ@@@", $ba, $1, $0
- db "ゴースト@", $e4, $1, $0
- db "こおり@@", $e6, $1, $0
- db "じめん@@", $68, $2, $0
- db "タイプ@@", $e8, $2, $0
- db "でんき@@", $8e, $3, $0
- db "どく@@@", $ae, $3, $0
- db "ドラゴン@", $bc, $3, $0
- db "ノーマル@", $22, $4, $0
- db "はがね@@", $36, $4, $0
- db "ひこう@@", $5e, $4, $0
- db "ほのお@@", $b2, $4, $0
- db "みず@@@", $f4, $4, $0
- db "むし@@@", $12, $5, $0
-
-.Greetings: ; 11db58
- db "ありがと@", $58, $0, $0
- db "ありがとう", $5a, $0, $0
- db "いくぜ!@", $80, $0, $0
- db "いくよ!@", $82, $0, $0
- db "いくわよ!", $84, $0, $0
- db "いやー@@", $a6, $0, $0
- db "おっす@@", $a, $1, $0
- db "おはつです", $22, $1, $0
- db "おめでとう", $2a, $1, $0
- db "ごめん@@", $f8, $1, $0
- db "ごめんよ@", $fa, $1, $0
- db "こらっ@@", $fc, $1, $0
- db "こんちは!", $a, $2, $0
- db "こんにちは", $10, $2, $0
- db "さようなら", $28, $2, $0
- db "サンキュー", $2e, $2, $0
- db "さんじょう", $30, $2, $0
- db "しっけい@", $48, $2, $0
- db "しつれい@", $4c, $2, $0
- db "じゃーね@", $6c, $2, $0
- db "すいません", $8c, $2, $0
- db "それじゃ@", $ca, $2, $0
- db "どうも@@", $a6, $3, $0
- db "なんじゃ@", $ee, $3, $0
- db "ハーイ@@", $2c, $4, $0
- db "はいはい@", $32, $4, $0
- db "バイバイ@", $34, $4, $0
- db "へイ@@@", $8a, $4, $0
- db "またね@@", $de, $4, $0
- db "もしもし@", $32, $5, $0
- db "やあ@@@", $3e, $5, $0
- db "やっほー@", $4e, $5, $0
- db "よう@@@", $62, $5, $0
- db "ようこそ@", $64, $5, $0
- db "よろしく@", $80, $5, $0
- db "らっしゃい", $94, $5, $0
-
-.People: ; 11dc78
- db "あいて@@", $1c, $0, $0
- db "あたし@@", $36, $0, $0
- db "あなた@@", $40, $0, $0
- db "あなたが@", $42, $0, $0
- db "あなたに@", $44, $0, $0
- db "あなたの@", $46, $0, $0
- db "あなたは@", $48, $0, $0
- db "あなたを@", $4a, $0, $0
- db "おかあさん", $e8, $0, $0
- db "おじいさん", $fc, $0, $0
- db "おじさん@", $2, $1, $0
- db "おとうさん", $e, $1, $0
- db "おとこのこ", $10, $1, $0
- db "おとな@@", $14, $1, $0
- db "おにいさん", $16, $1, $0
- db "おねえさん", $18, $1, $0
- db "おばあさん", $1c, $1, $0
- db "おばさん@", $20, $1, $0
- db "おれさま@", $34, $1, $0
- db "おんなのこ", $3a, $1, $0
- db "ガール@@", $40, $1, $0
- db "かぞく@@", $52, $1, $0
- db "かのじょ@", $72, $1, $0
- db "かれ@@@", $7c, $1, $0
- db "きみ@@@", $9a, $1, $0
- db "きみが@@", $9c, $1, $0
- db "きみに@@", $9e, $1, $0
- db "きみの@@", $a0, $1, $0
- db "きみは@@", $a2, $1, $0
- db "きみを@@", $a4, $1, $0
- db "ギャル@@", $ae, $1, $0
- db "きょうだい", $b2, $1, $0
- db "こども@@", $f0, $1, $0
- db "じぶん@@", $54, $2, $0
- db "じぶんが@", $56, $2, $0
- db "じぶんに@", $58, $2, $0
- db "じぶんの@", $5a, $2, $0
- db "じぶんは@", $5c, $2, $0
- db "じぶんを@", $5e, $2, $0
- db "だれ@@@", $18, $3, $0
- db "だれか@@", $1a, $3, $0
- db "だれが@@", $1c, $3, $0
- db "だれに@@", $1e, $3, $0
- db "だれの@@", $20, $3, $0
- db "だれも@@", $22, $3, $0
- db "だれを@@", $24, $3, $0
- db "ちゃん@@", $38, $3, $0
- db "ともだち@", $b8, $3, $0
- db "なかま@@", $d4, $3, $0
- db "ひと@@@", $62, $4, $0
- db "ボーイ@@", $98, $4, $0
- db "ボク@@@", $a0, $4, $0
- db "ボクが@@", $a2, $4, $0
- db "ボクに@@", $a4, $4, $0
- db "ボクの@@", $a6, $4, $0
- db "ボクは@@", $a8, $4, $0
- db "ボクを@@", $aa, $4, $0
- db "みんな@@", $4, $5, $0
- db "みんなが@", $6, $5, $0
- db "みんなに@", $8, $5, $0
- db "みんなの@", $a, $5, $0
- db "みんなは@", $c, $5, $0
- db "ライバル@", $8a, $5, $0
- db "わたし@@", $c2, $5, $0
- db "わたしが@", $c4, $5, $0
- db "わたしに@", $c6, $5, $0
- db "わたしの@", $c8, $5, $0
- db "わたしは@", $ca, $5, $0
- db "わたしを@", $cc, $5, $0
-
-.Battle: ; 11dea0
- db "あいしょう", $18, $0, $0
- db "いけ!@@", $88, $0, $0
- db "いちばん@", $96, $0, $0
- db "かくご@@", $4c, $1, $0
- db "かたせて@", $54, $1, $0
- db "かち@@@", $56, $1, $0
- db "かつ@@@", $58, $1, $0
- db "かった@@", $60, $1, $0
- db "かったら@", $62, $1, $0
- db "かって@@", $64, $1, $0
- db "かてない@", $66, $1, $0
- db "かてる@@", $68, $1, $0
- db "かなわない", $70, $1, $0
- db "きあい@@", $84, $1, $0
- db "きめた@@", $a8, $1, $0
- db "きりふだ@", $b6, $1, $0
- db "くらえ@@", $c2, $1, $0
- db "こい!@@", $da, $1, $0
- db "こうげき@", $e0, $1, $0
- db "こうさん@", $e2, $1, $0
- db "こんじょう", $8, $2, $0
- db "さいのう@", $16, $2, $0
- db "さくせん@", $1a, $2, $0
- db "さばき@@", $22, $2, $0
- db "しょうぶ@", $7e, $2, $0
- db "しょうり@", $80, $2, $0
- db "せめ@@@", $b4, $2, $0
- db "センス@@", $b6, $2, $0
- db "たいせん@", $e6, $2, $0
- db "たたかい@", $f6, $2, $0
- db "ちから@@", $32, $3, $0
- db "チャレンジ", $36, $3, $0
- db "つよい@@", $58, $3, $0
- db "つよすぎ@", $5a, $3, $0
- db "つらい@@", $5c, $3, $0
- db "つらかった", $5e, $3, $0
- db "てかげん@", $6c, $3, $0
- db "てき@@@", $6e, $3, $0
- db "てんさい@", $90, $3, $0
- db "でんせつ@", $94, $3, $0
- db "トレーナー", $c6, $3, $0
- db "にげ@@@", $4, $4, $0
- db "ぬるい@@", $10, $4, $0
- db "ねらう@@", $16, $4, $0
- db "バトル@@", $4a, $4, $0
- db "ファイト@", $72, $4, $0
- db "ふっかつ@", $78, $4, $0
- db "ポイント@", $94, $4, $0
- db "ポケモン@", $ac, $4, $0
- db "ほんき@@", $bc, $4, $0
- db "まいった!", $c4, $4, $0
- db "まけ@@@", $c8, $4, $0
- db "まけたら@", $ca, $4, $0
- db "まけて@@", $cc, $4, $0
- db "まける@@", $ce, $4, $0
- db "まもり@@", $ea, $4, $0
- db "みかた@@", $f2, $4, $0
- db "みとめない", $fe, $4, $0
- db "みとめる@", $0, $5, $0
- db "むてき@@", $16, $5, $0
- db "もらった!", $3c, $5, $0
- db "よゆう@@", $7a, $5, $0
- db "よわい@@", $82, $5, $0
- db "よわすぎ@", $84, $5, $0
- db "らくしょう", $8e, $5, $0
- db "りーダー@", $9e, $5, $0
- db "ルール@@", $a0, $5, $0
- db "レべル@@", $a6, $5, $0
- db "わざ@@@", $be, $5, $0
-
-.Exclamations: ; 11e0c8
- db "!@@@@", $0, $0, $0
- db "!!@@@", $2, $0, $0
- db "!?@@@", $4, $0, $0
- db "?@@@@", $6, $0, $0
- db "…@@@@", $8, $0, $0
- db "…!@@@", $a, $0, $0
- db "………@@", $c, $0, $0
- db "ー@@@@", $e, $0, $0
- db "ーーー@@", $10, $0, $0
- db "あーあ@@", $14, $0, $0
- db "あーん@@", $16, $0, $0
- db "あははー@", $52, $0, $0
- db "あら@@@", $54, $0, $0
- db "いえ@@@", $72, $0, $0
- db "イエス@@", $74, $0, $0
- db "うう@@@", $ac, $0, $0
- db "うーん@@", $ae, $0, $0
- db "うおー!@", $b0, $0, $0
- db "うおりゃー", $b2, $0, $0
- db "うひょー@", $bc, $0, $0
- db "うふふ@@", $be, $0, $0
- db "うわー@@", $ca, $0, $0
- db "うわーん@", $cc, $0, $0
- db "ええ@@@", $d2, $0, $0
- db "えー@@@", $d4, $0, $0
- db "えーん@@", $d6, $0, $0
- db "えへへ@@", $dc, $0, $0
- db "おいおい@", $e0, $0, $0
- db "おお@@@", $e2, $0, $0
- db "おっと@@", $c, $1, $0
- db "がーん@@", $42, $1, $0
- db "キャー@@", $aa, $1, $0
- db "ギャー@@", $ac, $1, $0
- db "ぐふふふふ", $bc, $1, $0
- db "げっ@@@", $ce, $1, $0
- db "しくしく@", $3e, $2, $0
- db "ちえっ@@", $2e, $3, $0
- db "てへ@@@", $86, $3, $0
- db "ノー@@@", $20, $4, $0
- db "はあー@@", $2a, $4, $0
- db "はい@@@", $30, $4, $0
- db "はっはっは", $48, $4, $0
- db "ひいー@@", $56, $4, $0
- db "ひゃあ@@", $6a, $4, $0
- db "ふっふっふ", $7c, $4, $0
- db "ふにゃ@@", $7e, $4, $0
- db "ププ@@@", $80, $4, $0
- db "ふふん@@", $82, $4, $0
- db "ふん@@@", $88, $4, $0
- db "へっへっへ", $8e, $4, $0
- db "へへー@@", $90, $4, $0
- db "ほーほほほ", $9c, $4, $0
- db "ほら@@@", $b6, $4, $0
- db "まあ@@@", $c0, $4, $0
- db "むきー!!", $10, $5, $0
- db "むふー@@", $18, $5, $0
- db "むふふ@@", $1a, $5, $0
- db "むむ@@@", $1c, $5, $0
- db "よーし@@", $6a, $5, $0
- db "よし!@@", $72, $5, $0
- db "ラララ@@", $98, $5, $0
- db "わーい@@", $ac, $5, $0
- db "わーん!!", $b0, $5, $0
- db "ワォ@@@", $b2, $5, $0
- db "わっ!!@", $ce, $5, $0
- db "わははは!", $d0, $5, $0
-
-.Conversation: ; 11e2d8
- db "あのね@@", $50, $0, $0
- db "あんまり@", $6e, $0, $0
- db "いじわる@", $8e, $0, $0
- db "うそ@@@", $b6, $0, $0
- db "うむ@@@", $c4, $0, $0
- db "おーい@@", $e4, $0, $0
- db "おすすめ@", $6, $1, $0
- db "おばかさん", $1e, $1, $0
- db "かなり@@", $6e, $1, $0
- db "から@@@", $7a, $1, $0
- db "きぶん@@", $98, $1, $0
- db "けど@@@", $d6, $1, $0
- db "こそ@@@", $ea, $1, $0
- db "こと@@@", $ee, $1, $0
- db "さあ@@@", $12, $2, $0
- db "さっぱり@", $1e, $2, $0
- db "さて@@@", $20, $2, $0
- db "じゅうぶん", $72, $2, $0
- db "すぐ@@@", $94, $2, $0
- db "すごく@@", $98, $2, $0
- db "すこしは@", $9a, $2, $0
- db "すっっごい", $a0, $2, $0
- db "ぜーんぜん", $b0, $2, $0
- db "ぜったい@", $b2, $2, $0
- db "それで@@", $ce, $2, $0
- db "だけ@@@", $f2, $2, $0
- db "だって@@", $fc, $2, $0
- db "たぶん@@", $6, $3, $0
- db "たら@@@", $14, $3, $0
- db "ちょー@@", $3a, $3, $0
- db "ちょっと@", $3c, $3, $0
- db "ったら@@", $4e, $3, $0
- db "って@@@", $50, $3, $0
- db "ていうか@", $62, $3, $0
- db "でも@@@", $88, $3, $0
- db "どうしても", $9c, $3, $0
- db "とうぜん@", $a0, $3, $0
- db "どうぞ@@", $a2, $3, $0
- db "とりあえず", $be, $3, $0
- db "なあ@@@", $cc, $3, $0
- db "なんて@@", $f4, $3, $0
- db "なんでも@", $fc, $3, $0
- db "なんとか@", $fe, $3, $0
- db "には@@@", $8, $4, $0
- db "バッチり@", $46, $4, $0
- db "ばりばり@", $52, $4, $0
- db "ほど@@@", $b0, $4, $0
- db "ほんと@@", $be, $4, $0
- db "まさに@@", $d0, $4, $0
- db "マジ@@@", $d2, $4, $0
- db "マジで@@", $d4, $4, $0
- db "まったく@", $e4, $4, $0
- db "まで@@@", $e6, $4, $0
- db "まるで@@", $ec, $4, $0
- db "ムード@@", $e, $5, $0
- db "むしろ@@", $14, $5, $0
- db "めちゃ@@", $24, $5, $0
- db "めっぽう@", $28, $5, $0
- db "もう@@@", $2c, $5, $0
- db "モード@@", $2e, $5, $0
- db "もっと@@", $36, $5, $0
- db "もはや@@", $38, $5, $0
- db "やっと@@", $4a, $5, $0
- db "やっぱり@", $4c, $5, $0
- db "より@@@", $7c, $5, $0
- db "れば@@@", $a4, $5, $0
-
-.Feelings: ; 11e4e8
- db "あいたい@", $1a, $0, $0
- db "あそびたい", $32, $0, $0
- db "いきたい@", $7c, $0, $0
- db "うかれて@", $b4, $0, $0
- db "うれしい@", $c6, $0, $0
- db "うれしさ@", $c8, $0, $0
- db "エキサイト", $d8, $0, $0
- db "えらい@@", $de, $0, $0
- db "おかしい@", $ec, $0, $0
- db "ォッケー@", $8, $1, $0
- db "かえりたい", $48, $1, $0
- db "がっくし@", $5a, $1, $0
- db "かなしい@", $6c, $1, $0
- db "がんばって", $80, $1, $0
- db "きがしない", $86, $1, $0
- db "きがする@", $88, $1, $0
- db "ききたい@", $8a, $1, $0
- db "きになる@", $90, $1, $0
- db "きのせい@", $96, $1, $0
- db "きらい@@", $b4, $1, $0
- db "くやしい@", $be, $1, $0
- db "くやしさ@", $c0, $1, $0
- db "さみしい@", $24, $2, $0
- db "ざんねん@", $32, $2, $0
- db "しあわせ@", $36, $2, $0
- db "したい@@", $44, $2, $0
- db "したくない", $46, $2, $0
- db "しまった@", $64, $2, $0
- db "しょんぼり", $82, $2, $0
- db "すき@@@", $92, $2, $0
- db "だいきらい", $da, $2, $0
- db "たいくつ@", $dc, $2, $0
- db "だいじ@@", $de, $2, $0
- db "だいすき@", $e4, $2, $0
- db "たいへん@", $ea, $2, $0
- db "たのしい@", $0, $3, $0
- db "たのしすぎ", $2, $3, $0
- db "たべたい@", $8, $3, $0
- db "ダメダメ@", $e, $3, $0
- db "たりない@", $16, $3, $0
- db "ちくしょー", $34, $3, $0
- db "どうしよう", $9e, $3, $0
- db "ドキドキ@", $ac, $3, $0
- db "ナイス@@", $d0, $3, $0
- db "のみたい@", $26, $4, $0
- db "びっくり@", $60, $4, $0
- db "ふあん@@", $74, $4, $0
- db "ふらふら@", $86, $4, $0
- db "ほしい@@", $ae, $4, $0
- db "ボロボロ@", $b8, $4, $0
- db "まだまだ@", $e0, $4, $0
- db "まてない@", $e8, $4, $0
- db "まんぞく@", $f0, $4, $0
- db "みたい@@", $f8, $4, $0
- db "めずらしい", $22, $5, $0
- db "メラメラ@", $2a, $5, $0
- db "やだ@@@", $46, $5, $0
- db "やったー@", $48, $5, $0
- db "やばい@@", $50, $5, $0
- db "やばすぎる", $52, $5, $0
- db "やられた@", $54, $5, $0
- db "やられて@", $56, $5, $0
- db "よかった@", $6e, $5, $0
- db "ラブラブ@", $96, $5, $0
- db "ロマン@@", $a8, $5, $0
- db "ろんがい@", $aa, $5, $0
- db "わから@@", $b4, $5, $0
- db "わかり@@", $b6, $5, $0
- db "わくわく@", $ba, $5, $0
-
-.Conditions: ; 11e710
- db "あつい@@", $38, $0, $0
- db "あった@@", $3a, $0, $0
- db "あり@@@", $56, $0, $0
- db "ある@@@", $5e, $0, $0
- db "あわてて@", $6a, $0, $0
- db "いい@@@", $70, $0, $0
- db "いか@@@", $76, $0, $0
- db "イカス@@", $78, $0, $0
- db "いきおい@", $7a, $0, $0
- db "いける@@", $8a, $0, $0
- db "いじょう@", $8c, $0, $0
- db "いそがしい", $90, $0, $0
- db "いっしょに", $9a, $0, $0
- db "いっぱい@", $9c, $0, $0
- db "いない@@", $a0, $0, $0
- db "いや@@@", $a4, $0, $0
- db "いる@@@", $a8, $0, $0
- db "うまい@@", $c0, $0, $0
- db "うまく@@", $c2, $0, $0
- db "おおきい@", $e6, $0, $0
- db "おくれ@@", $f2, $0, $0
- db "おしい@@", $fa, $0, $0
- db "おもしろい", $2c, $1, $0
- db "おもしろく", $2e, $1, $0
- db "かっこいい", $5c, $1, $0
- db "かわいい@", $7e, $1, $0
- db "かんぺき@", $82, $1, $0
- db "けっこう@", $d0, $1, $0
- db "げんき@@", $d8, $1, $0
- db "こわい@@", $6, $2, $0
- db "さいこう@", $14, $2, $0
- db "さむい@@", $26, $2, $0
- db "さわやか@", $2c, $2, $0
- db "しかたない", $38, $2, $0
- db "すごい@@", $96, $2, $0
- db "すごすぎ@", $9c, $2, $0
- db "すてき@@", $a4, $2, $0
- db "たいした@", $e0, $2, $0
- db "だいじょぶ", $e2, $2, $0
- db "たかい@@", $ec, $2, $0
- db "ただしい@", $f8, $2, $0
- db "だめ@@@", $c, $3, $0
- db "ちいさい@", $2c, $3, $0
- db "ちがう@@", $30, $3, $0
- db "つかれ@@", $48, $3, $0
- db "とくい@@", $b0, $3, $0
- db "とまらない", $b6, $3, $0
- db "ない@@@", $ce, $3, $0
- db "なかった@", $d2, $3, $0
- db "なし@@@", $d8, $3, $0
- db "なって@@", $dc, $3, $0
- db "はやい@@", $50, $4, $0
- db "ひかる@@", $5a, $4, $0
- db "ひくい@@", $5c, $4, $0
- db "ひどい@@", $64, $4, $0
- db "ひとりで@", $66, $4, $0
- db "ひま@@@", $68, $4, $0
- db "ふそく@@", $76, $4, $0
- db "へた@@@", $8c, $4, $0
- db "まちがって", $e2, $4, $0
- db "やさしい@", $42, $5, $0
- db "よく@@@", $70, $5, $0
- db "よわって@", $86, $5, $0
- db "らく@@@", $8c, $5, $0
- db "らしい@@", $90, $5, $0
- db "わるい@@", $d4, $5, $0
-
-.Life: ; 11e920
- db "アルバイト", $64, $0, $0
- db "うち@@@", $ba, $0, $0
- db "おかね@@", $ee, $0, $0
- db "おこづかい", $f4, $0, $0
- db "おふろ@@", $24, $1, $0
- db "がっこう@", $5e, $1, $0
- db "きねん@@", $92, $1, $0
- db "グループ@", $c6, $1, $0
- db "ゲット@@", $d2, $1, $0
- db "こうかん@", $de, $1, $0
- db "しごと@@", $40, $2, $0
- db "しゅぎょう", $74, $2, $0
- db "じゅぎょう", $76, $2, $0
- db "じゅく@@", $78, $2, $0
- db "しんか@@", $88, $2, $0
- db "ずかん@@", $90, $2, $0
- db "せいかつ@", $ae, $2, $0
- db "せんせい@", $b8, $2, $0
- db "センター@", $ba, $2, $0
- db "タワー@@", $28, $3, $0
- db "つうしん@", $40, $3, $0
- db "テスト@@", $7e, $3, $0
- db "テレビ@@", $8c, $3, $0
- db "でんわ@@", $96, $3, $0
- db "どうぐ@@", $9a, $3, $0
- db "トレード@", $c4, $3, $0
- db "なまえ@@", $e8, $3, $0
- db "ニュース@", $a, $4, $0
- db "にんき@@", $c, $4, $0
- db "パーティー", $2e, $4, $0
- db "べんきょう", $92, $4, $0
- db "マシン@@", $d6, $4, $0
- db "めいし@@", $1e, $5, $0
- db "メッセージ", $26, $5, $0
- db "もようがえ", $3a, $5, $0
- db "ゆめ@@@", $5a, $5, $0
- db "ようちえん", $66, $5, $0
- db "ラジォ@@", $92, $5, $0
- db "ワールド@", $ae, $5, $0
-
-.Hobbies: ; 11ea58
- db "アイドル@", $1e, $0, $0
- db "アニメ@@", $4c, $0, $0
- db "うた@@@", $b8, $0, $0
- db "えいが@@", $d0, $0, $0
- db "おかし@@", $ea, $0, $0
- db "おしゃべり", $4, $1, $0
- db "おままごと", $28, $1, $0
- db "おもちゃ@", $30, $1, $0
- db "おんがく@", $38, $1, $0
- db "カード@@", $3e, $1, $0
- db "かいもの@", $46, $1, $0
- db "グルメ@@", $c8, $1, $0
- db "ゲーム@@", $cc, $1, $0
- db "ざっし@@", $1c, $2, $0
- db "さんぽ@@", $34, $2, $0
- db "じてんしゃ", $50, $2, $0
- db "しゅみ@@", $7a, $2, $0
- db "スポーツ@", $a8, $2, $0
- db "ダイエット", $d8, $2, $0
- db "たからもの", $f0, $2, $0
- db "たび@@@", $4, $3, $0
- db "ダンス@@", $2a, $3, $0
- db "つり@@@", $60, $3, $0
- db "デート@@", $6a, $3, $0
- db "でんしゃ@", $92, $3, $0
- db "ぬいぐるみ", $e, $4, $0
- db "パソコン@", $3e, $4, $0
- db "はな@@@", $4c, $4, $0
- db "ヒーロー@", $58, $4, $0
- db "ひるね@@", $6e, $4, $0
- db "ヒロイン@", $70, $4, $0
- db "ぼうけん@", $96, $4, $0
- db "ボード@@", $9a, $4, $0
- db "ボール@@", $9e, $4, $0
- db "ほん@@@", $ba, $4, $0
- db "マンガ@@", $ee, $4, $0
- db "やくそく@", $40, $5, $0
- db "やすみ@@", $44, $5, $0
- db "よてい@@", $74, $5, $0
-
-.Actions: ; 11eb90
- db "あう@@@", $20, $0, $0
- db "あきらめ@", $24, $0, $0
- db "あげる@@", $28, $0, $0
- db "あせる@@", $2e, $0, $0
- db "あそび@@", $30, $0, $0
- db "あそぶ@@", $34, $0, $0
- db "あつめ@@", $3e, $0, $0
- db "あるき@@", $60, $0, $0
- db "あるく@@", $62, $0, $0
- db "いく@@@", $7e, $0, $0
- db "いけ@@@", $86, $0, $0
- db "おき@@@", $f0, $0, $0
- db "おこり@@", $f6, $0, $0
- db "おこる@@", $f8, $0, $0
- db "おしえ@@", $fe, $0, $0
- db "おしえて@", $0, $1, $0
- db "おねがい@", $1a, $1, $0
- db "おぼえ@@", $26, $1, $0
- db "かえる@@", $4a, $1, $0
- db "がまん@@", $74, $1, $0
- db "きく@@@", $8c, $1, $0
- db "きたえ@@", $8e, $1, $0
- db "きめ@@@", $a6, $1, $0
- db "くる@@@", $c4, $1, $0
- db "さがし@@", $18, $2, $0
- db "さわぎ@@", $2a, $2, $0
- db "した@@@", $42, $2, $0
- db "しって@@", $4a, $2, $0
- db "して@@@", $4e, $2, $0
- db "しない@@", $52, $2, $0
- db "しまう@@", $60, $2, $0
- db "じまん@@", $66, $2, $0
- db "しらない@", $84, $2, $0
- db "しる@@@", $86, $2, $0
- db "しんじて@", $8a, $2, $0
- db "する@@@", $aa, $2, $0
- db "たべる@@", $a, $3, $0
- db "つかう@@", $42, $3, $0
- db "つかえ@@", $44, $3, $0
- db "つかって@", $46, $3, $0
- db "できない@", $70, $3, $0
- db "できる@@", $72, $3, $0
- db "でない@@", $84, $3, $0
- db "でる@@@", $8a, $3, $0
- db "なげる@@", $d6, $3, $0
- db "なやみ@@", $ea, $3, $0
- db "ねられ@@", $18, $4, $0
- db "ねる@@@", $1a, $4, $0
- db "のがし@@", $24, $4, $0
- db "のむ@@@", $28, $4, $0
- db "はしり@@", $3a, $4, $0
- db "はしる@@", $3c, $4, $0
- db "はたらき@", $40, $4, $0
- db "はたらく@", $42, $4, $0
- db "はまって@", $4e, $4, $0
- db "ぶつけ@@", $7a, $4, $0
- db "ほめ@@@", $b4, $4, $0
- db "みせて@@", $f6, $4, $0
- db "みて@@@", $fc, $4, $0
- db "みる@@@", $2, $5, $0
- db "めざす@@", $20, $5, $0
- db "もって@@", $34, $5, $0
- db "ゆずる@@", $58, $5, $0
- db "ゆるす@@", $5c, $5, $0
- db "ゆるせ@@", $5e, $5, $0
- db "られない@", $9a, $5, $0
- db "られる@@", $9c, $5, $0
- db "わかる@@", $b8, $5, $0
- db "わすれ@@", $c0, $5, $0
-
-.Time: ; 11edb8
- db "あき@@@", $22, $0, $0
- db "あさ@@@", $2a, $0, $0
- db "あした@@", $2c, $0, $0
- db "いちにち@", $94, $0, $0
- db "いつか@@", $98, $0, $0
- db "いつも@@", $9e, $0, $0
- db "いま@@@", $a2, $0, $0
- db "えいえん@", $ce, $0, $0
- db "おととい@", $12, $1, $0
- db "おわり@@", $36, $1, $0
- db "かようび@", $78, $1, $0
- db "きのう@@", $94, $1, $0
- db "きょう@@", $b0, $1, $0
- db "きんようび", $b8, $1, $0
- db "げつようび", $d4, $1, $0
- db "このあと@", $f4, $1, $0
- db "このまえ@", $f6, $1, $0
- db "こんど@@", $c, $2, $0
- db "じかん@@", $3c, $2, $0
- db "じゅうねん", $70, $2, $0
- db "すいようび", $8e, $2, $0
- db "スタート@", $9e, $2, $0
- db "ずっと@@", $a2, $2, $0
- db "ストップ@", $a6, $2, $0
- db "そのうち@", $c4, $2, $0
- db "ついに@@", $3e, $3, $0
- db "つぎ@@@", $4a, $3, $0
- db "どようび@", $ba, $3, $0
- db "なつ@@@", $da, $3, $0
- db "にちようび", $6, $4, $0
- db "はじめ@@", $38, $4, $0
- db "はる@@@", $54, $4, $0
- db "ひる@@@", $6c, $4, $0
- db "ふゆ@@@", $84, $4, $0
- db "まいにち@", $c6, $4, $0
- db "もくようび", $30, $5, $0
- db "よなか@@", $76, $5, $0
- db "よる@@@", $7e, $5, $0
- db "らいしゅう", $88, $5, $0
-
-.Farewells: ; 11eef0
- db "いたします", $92, $0, $0
- db "おります@", $32, $1, $0
- db "か!?@@", $3c, $1, $0
- db "かい?@@", $44, $1, $0
- db "かしら?@", $50, $1, $0
- db "かな?@@", $6a, $1, $0
- db "かも@@@", $76, $1, $0
- db "くれ@@@", $ca, $1, $0
- db "ございます", $e8, $1, $0
- db "しがち@@", $3a, $2, $0
- db "します@@", $62, $2, $0
- db "じゃ@@@", $6a, $2, $0
- db "じゃん@@", $6e, $2, $0
- db "しよう@@", $7c, $2, $0
- db "ぜ!@@@", $ac, $2, $0
- db "ぞ!@@@", $bc, $2, $0
- db "た@@@@", $d4, $2, $0
- db "だ@@@@", $d6, $2, $0
- db "だからね@", $ee, $2, $0
- db "だぜ@@@", $f4, $2, $0
- db "だった@@", $fa, $2, $0
- db "だね@@@", $fe, $2, $0
- db "だよ@@@", $10, $3, $0
- db "だよねー!", $12, $3, $0
- db "だわ@@@", $26, $3, $0
- db "ッス@@@", $4c, $3, $0
- db "ってかんじ", $52, $3, $0
- db "っぱなし@", $54, $3, $0
- db "つもり@@", $56, $3, $0
- db "ていない@", $64, $3, $0
- db "ている@@", $66, $3, $0
- db "でーす!@", $68, $3, $0
- db "でした@@", $74, $3, $0
- db "でしょ?@", $76, $3, $0
- db "でしょー!", $78, $3, $0
- db "です@@@", $7a, $3, $0
- db "ですか?@", $7c, $3, $0
- db "ですよ@@", $80, $3, $0
- db "ですわ@@", $82, $3, $0
- db "どうなの?", $a4, $3, $0
- db "どうよ?@", $a8, $3, $0
- db "とかいって", $aa, $3, $0
- db "なの@@@", $e0, $3, $0
- db "なのか@@", $e2, $3, $0
- db "なのだ@@", $e4, $3, $0
- db "なのよ@@", $e6, $3, $0
- db "なんだね@", $f2, $3, $0
- db "なんです@", $f8, $3, $0
- db "なんてね@", $fa, $3, $0
- db "ね@@@@", $12, $4, $0
- db "ねー@@@", $14, $4, $0
- db "の@@@@", $1c, $4, $0
- db "の?@@@", $1e, $4, $0
- db "ばっかり@", $44, $4, $0
- db "まーす!@", $c2, $4, $0
- db "ます@@@", $d8, $4, $0
- db "ますわ@@", $da, $4, $0
- db "ません@@", $dc, $4, $0
- db "みたいな@", $fa, $4, $0
- db "よ!@@@", $60, $5, $0
- db "よー@@@", $68, $5, $0
- db "よーん@@", $6c, $5, $0
- db "よね@@@", $78, $5, $0
- db "るよ@@@", $a2, $5, $0
- db "わけ@@@", $bc, $5, $0
- db "わよ!@@", $d2, $5, $0
-
-.ThisAndThat: ; 11f100
- db "ああ@@@", $12, $0, $0
- db "あっち@@", $3c, $0, $0
- db "あの@@@", $4e, $0, $0
- db "ありゃ@@", $5c, $0, $0
- db "あれ@@@", $66, $0, $0
- db "あれは@@", $68, $0, $0
- db "あんな@@", $6c, $0, $0
- db "こう@@@", $dc, $1, $0
- db "こっち@@", $ec, $1, $0
- db "この@@@", $f2, $1, $0
- db "こりゃ@@", $fe, $1, $0
- db "これ@@@", $0, $2, $0
- db "これだ!@", $2, $2, $0
- db "これは@@", $4, $2, $0
- db "こんな@@", $e, $2, $0
- db "そう@@@", $be, $2, $0
- db "そっち@@", $c0, $2, $0
- db "その@@@", $c2, $2, $0
- db "そりゃ@@", $c6, $2, $0
- db "それ@@@", $c8, $2, $0
- db "それだ!@", $cc, $2, $0
- db "それは@@", $d0, $2, $0
- db "そんな@@", $d2, $2, $0
- db "どう@@@", $98, $3, $0
- db "どっち@@", $b2, $3, $0
- db "どの@@@", $b4, $3, $0
- db "どりゃ@@", $c0, $3, $0
- db "どれ@@@", $c2, $3, $0
- db "どれを@@", $c8, $3, $0
- db "どんな@@", $ca, $3, $0
- db "なに@@@", $de, $3, $0
- db "なんか@@", $ec, $3, $0
- db "なんだ@@", $f0, $3, $0
- db "なんで@@", $f6, $3, $0
- db "なんなんだ", $0, $4, $0
- db "なんの@@", $2, $4, $0
-; 11f220
-
-MobileEZChatData_WordAndPageCounts:
-macro_11f220: macro
-; parameter: number of words
- db \1
-; 12 words per page (0-based indexing)
-x = \1 / 12
-if \1 % 12 == 0
-x = x +- 1
-endc
- db x
-endm
- macro_11f220 18 ; 01: Types
- macro_11f220 36 ; 02: Greetings
- macro_11f220 69 ; 03: People
- macro_11f220 69 ; 04: Battle
- macro_11f220 66 ; 05: Exclamations
- macro_11f220 66 ; 06: Conversation
- macro_11f220 69 ; 07: Feelings
- macro_11f220 66 ; 08: Conditions
- macro_11f220 39 ; 09: Life
- macro_11f220 39 ; 0a: Hobbies
- macro_11f220 69 ; 0b: Actions
- macro_11f220 39 ; 0c: Time
- macro_11f220 66 ; 0d: Farewells
- macro_11f220 36 ; 0e: ThisAndThat
-
-EZChat_SortedWords:
-; Addresses in WRAM bank 3 where EZChat words beginning
-; with the given kana are sorted in memory, and the pre-
-; allocated size for each.
-; These arrays are expanded dynamically to accomodate
-; any Pokemon you've seen that starts with each kana.\
-macro_11f23c: macro
- dw x - w3_d000, \1
-x = x + 2 * \1
-endm
-x = $d012
- macro_11f23c $2f ; a
- macro_11f23c $1e ; i
- macro_11f23c $11 ; u
- macro_11f23c $09 ; e
- macro_11f23c $2e ; o
- macro_11f23c $24 ; ka_ga
- macro_11f23c $1b ; ki_gi
- macro_11f23c $09 ; ku_gu
- macro_11f23c $07 ; ke_ge
- macro_11f23c $1c ; ko_go
- macro_11f23c $12 ; sa_za
- macro_11f23c $2b ; shi_ji
- macro_11f23c $10 ; su_zu
- macro_11f23c $08 ; se_ze
- macro_11f23c $0c ; so_zo
- macro_11f23c $2c ; ta_da
- macro_11f23c $09 ; chi_dhi
- macro_11f23c $12 ; tsu_du
- macro_11f23c $1b ; te_de
- macro_11f23c $1a ; to_do
- macro_11f23c $1c ; na
- macro_11f23c $05 ; ni
- macro_11f23c $02 ; nu
- macro_11f23c $05 ; ne
- macro_11f23c $07 ; no
- macro_11f23c $16 ; ha_ba_pa
- macro_11f23c $0e ; hi_bi_pi
- macro_11f23c $0c ; fu_bu_pu
- macro_11f23c $05 ; he_be_pe
- macro_11f23c $16 ; ho_bo_po
- macro_11f23c $19 ; ma
- macro_11f23c $0e ; mi
- macro_11f23c $08 ; mu
- macro_11f23c $07 ; me
- macro_11f23c $09 ; mo
- macro_11f23c $0d ; ya
- macro_11f23c $04 ; yu
- macro_11f23c $14 ; yo
- macro_11f23c $0b ; ra
- macro_11f23c $01 ; ri
- macro_11f23c $02 ; ru
- macro_11f23c $02 ; re
- macro_11f23c $02 ; ro
- macro_11f23c $15 ; wa
-x = $d000
- macro_11f23c $09 ; end
-EZChat_SortedWordsEnd:
diff --git a/misc/gbc_only.asm b/misc/gbc_only.asm
deleted file mode 100644
index f4b3eba8b..000000000
--- a/misc/gbc_only.asm
+++ /dev/null
@@ -1,149 +0,0 @@
-GBCOnlyScreen: ; 4ea82
-
- ld a, [hCGB]
- and a
- ret nz
-
- ld de, MUSIC_NONE
- call PlayMusic
-
- call ClearTileMap
-
- ld hl, GBCOnlyGFX
- ld de, $d000
- ld a, [rSVBK]
- push af
- ld a, 0
- ld [rSVBK], a
- call Decompress
- pop af
- ld [rSVBK], a
-
- ld de, $d000
- ld hl, VTiles2
- lb bc, BANK(GBCOnlyGFX), $54
- call Get2bpp
-
- ld de, Font
- ld hl, VTiles1
- lb bc, BANK(Font), $80
- call Get1bpp
-
- call DrawGBCOnlyScreen
-
- call WaitBGMap
-
-; better luck next time
-.loop
- call DelayFrame
- jr .loop
-; 4eac5
-
-
-DrawGBCOnlyScreen: ; 4eac5
-
- call DrawGBCOnlyBorder
-
- ; Pokemon
- hlcoord 3, 2
- ld b, 14
- ld c, 4
- ld a, $8
- call DrawGBCOnlyGraphic
-
- ; Crystal
- hlcoord 5, 6
- ld b, 10
- ld c, 2
- ld a, $40
- call DrawGBCOnlyGraphic
-
- ld de, GBCOnlyString
- hlcoord 1, 10
- call PlaceString
-
- ret
-; 4eaea
-
-
-DrawGBCOnlyBorder: ; 4eaea
-
- hlcoord 0, 0
- ld [hl], 0 ; top-left
-
- inc hl
- ld a, 1 ; top
- call .FillRow
-
- ld [hl], 2 ; top-right
-
- hlcoord 0, 1
- ld a, 3 ; left
- call .FillColumn
-
- hlcoord 19, 1
- ld a, 4 ; right
- call .FillColumn
-
- hlcoord 0, 17
- ld [hl], 5 ; bottom-left
-
- inc hl
- ld a, 6 ; bottom
- call .FillRow
-
- ld [hl], 7 ; bottom-right
- ret
-; 4eb15
-
-.FillRow: ; 4eb15
- ld c, SCREEN_WIDTH - 2
-.next_column
- ld [hli], a
- dec c
- jr nz, .next_column
- ret
-; 4eb1c
-
-.FillColumn: ; 4eb1c
- ld de, SCREEN_WIDTH
- ld c, SCREEN_HEIGHT - 2
-.next_row
- ld [hl], a
- add hl, de
- dec c
- jr nz, .next_row
- ret
-; 4eb27
-
-
-DrawGBCOnlyGraphic: ; 4eb27
- ld de, SCREEN_WIDTH
-.y
- push bc
- push hl
-.x
- ld [hli], a
- inc a
- dec b
- jr nz, .x
- pop hl
- add hl, de
- pop bc
- dec c
- jr nz, .y
- ret
-; 4eb38
-
-
-GBCOnlyString: ; 4eb38
- db "This Game Pak is"
- next "designed only for"
- next "use on the"
- next "Game Boy Color.@"
-; 4eb76
-
-
-GBCOnlyGFX: ; 4eb76
-INCBIN "gfx/misc/gbc_only.2bpp.lz"
-; 4f0bc
diff --git a/misc/gfx_41.asm b/misc/gfx_41.asm
deleted file mode 100755
index 952742ec1..000000000
--- a/misc/gfx_41.asm
+++ /dev/null
@@ -1,638 +0,0 @@
-HDMATransferAttrMapAndTileMapToWRAMBank3:: ; 104000
- ld hl, .Function
- jp CallInSafeGFXMode
-
-.Function:
- decoord 0, 0, AttrMap
- ld hl, wScratchAttrMap
- call CutAndPasteAttrMap
- decoord 0, 0
- ld hl, wScratchTileMap
- call CutAndPasteTilemap
- ld a, $0
- ld [rVBK], a
- ld hl, wScratchTileMap
- call HDMATransferToWRAMBank3
- ld a, $1
- ld [rVBK], a
- ld hl, wScratchAttrMap
- call HDMATransferToWRAMBank3
- ret
-; 10402d
-
-HDMATransferTileMapToWRAMBank3:: ; 10402d
- ld hl, .Function
- jp CallInSafeGFXMode
-
-.Function:
- decoord 0, 0
- ld hl, wScratchTileMap
- call CutAndPasteTilemap
- ld a, $0
- ld [rVBK], a
- ld hl, wScratchTileMap
- call HDMATransferToWRAMBank3
- ret
-; 104047
-
-HDMATransferAttrMapToWRAMBank3: ; 104047
- ld hl, .Function
- jp CallInSafeGFXMode
-
-.Function:
- decoord 0, 0, AttrMap
- ld hl, wScratchAttrMap
- call CutAndPasteAttrMap
- ld a, $1
- ld [rVBK], a
- ld hl, wScratchAttrMap
- call HDMATransferToWRAMBank3
- ret
-; 104061
-
-ReloadMapPart:: ; 104061
- ld hl, .Function
- jp CallInSafeGFXMode
-
-.Function:
- decoord 0, 0, AttrMap
- ld hl, wScratchAttrMap
- call CutAndPasteAttrMap
- decoord 0, 0
- ld hl, wScratchTileMap
- call CutAndPasteTilemap
- call DelayFrame
-
- di
- ld a, [rVBK]
- push af
- ld a, $1
- ld [rVBK], a
- ld hl, wScratchAttrMap
- call HDMATransfer_Wait127Scanlines_toBGMap
- ld a, $0
- ld [rVBK], a
- ld hl, wScratchTileMap
- call HDMATransfer_Wait127Scanlines_toBGMap
- pop af
- ld [rVBK], a
- ei
-
- ret
-
-Mobile_ReloadMapPart: ; 104099
- ld hl, ReloadMapPart ; useless
- ld hl, .Function
- jp CallInSafeGFXMode
-
-.Function:
- decoord 0, 0, AttrMap
- ld hl, wScratchAttrMap
- call CutAndPasteAttrMap
- decoord 0, 0
- ld hl, wScratchTileMap
- call CutAndPasteTilemap
- call DelayFrame
-
- di
- ld a, [rVBK]
- push af
- ld a, $1
- ld [rVBK], a
- ld hl, wScratchAttrMap
- call HDMATransfer_NoDI
- ld a, $0
- ld [rVBK], a
- ld hl, wScratchTileMap
- call HDMATransfer_NoDI
- pop af
- ld [rVBK], a
- ei
-
- ret
-; 1040d4
-
-; XXX
- ld hl, .unreferenced_1040da
- jp CallInSafeGFXMode
-
-.unreferenced_1040da
- ld a, $1
- ld [rVBK], a
- ld a, $3
- ld [rSVBK], a
- ld de, w3_d800
- ld a, [hBGMapAddress + 1]
- ld [rHDMA1], a
- ld a, [hBGMapAddress]
- ld [rHDMA2], a
- ld a, d
- ld [rHDMA3], a
- ld a, e
- ld [rHDMA4], a
- ld a, $23
- ld [hDMATransfer], a
- call WaitDMATransfer
- ret
-; 1040fb
-
-; XXX
- ld hl, .unreferenced_104101
- jp CallInSafeGFXMode
-
-.unreferenced_104101
- ld a, $1
- ld [rVBK], a
- ld a, $3
- ld [rSVBK], a
- ld hl, w3_d800
- call HDMATransferToWRAMBank3
- ret
-; 104110
-
-OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 104110
-; OpenText
- ld hl, .Function
- jp CallInSafeGFXMode
-
-.Function:
- ; Transfer AttrMap and Tilemap to BGMap
- ; Fill vBGAttrs with $00
- ; Fill vBGTiles with " "
- decoord 0, 0, AttrMap
- ld hl, wScratchAttrMap
- call CutAndPasteAttrMap
- decoord 0, 0
- ld hl, wScratchTileMap
- call CutAndPasteTilemap
- call DelayFrame
-
- di
- ld a, [rVBK]
- push af
- ld a, $1
- ld [rVBK], a
- ld hl, wScratchAttrMap
- call HDMATransfer_Wait123Scanlines_toBGMap
- ld a, $0
- ld [rVBK], a
- ld hl, wScratchTileMap
- call HDMATransfer_Wait123Scanlines_toBGMap
- pop af
- ld [rVBK], a
- ei
- ret
-; 104148
-
-Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap: ; 104148 (41:4148)
- ld hl, .Function
- jp CallInSafeGFXMode
-
-.Function:
- ; Transfer AttrMap and Tilemap to BGMap
- ; Fill vBGAttrs with $00
- ; Fill vBGTiles with $ff
- decoord 0, 0, AttrMap
- ld hl, wScratchAttrMap
- call CutAndPasteAttrMap
- ld c, $ff
- decoord 0, 0
- ld hl, wScratchTileMap
- call CutAndPasteMap
-
- ld a, $1
- ld [rVBK], a
- ld hl, wScratchAttrMap
- call HDMATransfer_Wait127Scanlines_toBGMap
- ld a, $0
- ld [rVBK], a
- ld hl, wScratchTileMap
- call HDMATransfer_Wait127Scanlines_toBGMap
- ret
-; 104177
-
-CallInSafeGFXMode: ; 104177
- ld a, [hBGMapMode]
- push af
- ld a, [hMapAnims]
- push af
- xor a
- ld [hBGMapMode], a
- ld [hMapAnims], a
- ld a, [rSVBK]
- push af
- ld a, $6
- ld [rSVBK], a
- ld a, [rVBK]
- push af
-
- call ._hl_
-
- pop af
- ld [rVBK], a
- pop af
- ld [rSVBK], a
- pop af
- ld [hMapAnims], a
- pop af
- ld [hBGMapMode], a
- ret
-; 10419c
-
-._hl_ ; 10419c
- jp hl
-; 10419d
-
-
-HDMATransferToWRAMBank3: ; 10419d (41:419d)
- call _LoadHDMAParameters
- ld a, $23
- ld [hDMATransfer], a
-
-WaitDMATransfer: ; 104a14
-.loop
- call DelayFrame
- ld a, [hDMATransfer]
- and a
- jr nz, .loop
- ret
-
-HDMATransfer_Wait127Scanlines_toBGMap: ; 1041ad (41:41ad)
-; HDMA transfer from hl to [hBGMapAddress]
-; hBGMapAddress -> de
-; 2 * SCREEN_HEIGHT -> c
- ld a, [hBGMapAddress + 1]
- ld d, a
- ld a, [hBGMapAddress]
- ld e, a
- ld c, 2 * SCREEN_HEIGHT
- jr HDMATransfer_Wait127Scanlines
-
-HDMATransfer_Wait123Scanlines_toBGMap: ; 1041b7 (41:41b7)
-; HDMA transfer from hl to [hBGMapAddress]
-; hBGMapAddress -> de
-; 2 * SCREEN_HEIGHT -> c
-; $7b --> b
- ld a, [hBGMapAddress + 1]
- ld d, a
- ld a, [hBGMapAddress]
- ld e, a
- ld c, 2 * SCREEN_HEIGHT
- jr HDMATransfer_Wait123Scanlines
-; 1041c1 (41:41c1)
-
-HDMATransfer_NoDI: ; 1041c1
-; HDMA transfer from hl to [hBGMapAddress]
-; [hBGMapAddress] --> de
-; 2 * SCREEN_HEIGHT --> c
- ld a, [hBGMapAddress + 1]
- ld d, a
- ld a, [hBGMapAddress]
- ld e, a
- ld c, 2 * SCREEN_HEIGHT
-
- ; [rHDMA1, rHDMA2] = hl & $fff0
- ld a, h
- ld [rHDMA1], a
- ld a, l
- and $f0
- ld [rHDMA2], a
- ; [rHDMA3, rHDMA4] = de & $1ff0
- ld a, d
- and $1f
- ld [rHDMA3], a
- ld a, e
- and $f0
- ld [rHDMA4], a
- ; b = c | %10000000
- ld a, c
- dec c
- or $80
- ld b, a
- ; d = $7f - c + 1
- ld a, $7f
- sub c
- ld d, a
- ; while [rLY] >= d: pass
-.loop1
- ld a, [rLY]
- cp d
- jr nc, .loop1
- ; while not [rSTAT] & 3: pass
-.loop2
- ld a, [rSTAT]
- and $3
- jr z, .loop2
- ; load the 5th byte of HDMA
- ld a, b
- ld [rHDMA5], a
- ; wait until rLY advances (c + 1) times
- ld a, [rLY]
- inc c
- ld hl, rLY
-.loop3
- cp [hl]
- jr z, .loop3
- ld a, [hl]
- dec c
- jr nz, .loop3
- ld hl, rHDMA5
- res 7, [hl]
- ret
-; 104205
-
-HDMATransfer_Wait123Scanlines:
- ld b, $7b
- jr _continue_HDMATransfer
-
-
-HDMATransfer_Wait127Scanlines:
- ld b, $7f
-_continue_HDMATransfer:
-; a lot of waiting around for hardware registers
- ; [rHDMA1, rHDMA2] = hl & $fff0
- ld a, h
- ld [rHDMA1], a
- ld a, l
- and $f0 ; high nybble
- ld [rHDMA2], a
- ; [rHDMA3, rHDMA4] = de & $1ff0
- ld a, d
- and $1f ; lower 5 bits
- ld [rHDMA3], a
- ld a, e
- and $f0 ; high nybble
- ld [rHDMA4], a
- ; e = c | %10000000
- ld a, c
- dec c
- or $80
- ld e, a
- ; d = b - c + 1
- ld a, b
- sub c
- ld d, a
- ; while [rLY] >= d: pass
-.ly_loop
- ld a, [rLY]
- cp d
- jr nc, .ly_loop
-
- di
- ; while [rSTAT] & 3: pass
-.rstat_loop_1
- ld a, [rSTAT]
- and $3
- jr nz, .rstat_loop_1
- ; while not [rSTAT] & 3: pass
-.rstat_loop_2
- ld a, [rSTAT]
- and $3
- jr z, .rstat_loop_2
- ; load the 5th byte of HDMA
- ld a, e
- ld [rHDMA5], a
- ; wait until rLY advances (c + 1) times
- ld a, [rLY]
- inc c
- ld hl, rLY
-.final_ly_loop
- cp [hl]
- jr z, .final_ly_loop
- ld a, [hl]
- dec c
- jr nz, .final_ly_loop
- ld hl, rHDMA5
- res 7, [hl]
- ei
-
- ret
-; 10424e
-
-
-_LoadHDMAParameters: ; 10424e (41:424e)
- ld a, h
- ld [rHDMA1], a
- ld a, l
- ld [rHDMA2], a
- ld a, [hBGMapAddress + 1]
- and $1f
- ld [rHDMA3], a
- ld a, [hBGMapAddress]
- ld [rHDMA4], a
- ret
-
-CutAndPasteTilemap: ; 10425f (41:425f)
- ld c, " "
- jr CutAndPasteMap
-
-CutAndPasteAttrMap: ; 104263 (41:4263)
- ld c, $0
-
-CutAndPasteMap: ; 104265 (41:4265)
-; back up the value of c to hMapObjectIndexBuffer
- ld a, [hMapObjectIndexBuffer]
- push af
- ld a, c
- ld [hMapObjectIndexBuffer], a
-
-; for each row on the screen
- ld c, SCREEN_HEIGHT
-.loop1
-; for each tile in the row
- ld b, SCREEN_WIDTH
-.loop2
-; copy from de to hl
- ld a, [de]
- inc de
- ld [hli], a
- dec b
- jr nz, .loop2
-
-; load the original value of c into hl 12 times
- ld a, [hMapObjectIndexBuffer]
- ld b, BG_MAP_WIDTH - SCREEN_WIDTH
-.loop3
- ld [hli], a
- dec b
- jr nz, .loop3
-
- dec c
- jr nz, .loop1
-
-; restore the original value of hMapObjectIndexBuffer
- pop af
- ld [hMapObjectIndexBuffer], a
- ret
-
-
-_Get2bpp:: ; 104284
- ; 2bpp when [rLCDC] & $80
- ; switch to WRAM bank 6
- ld a, [rSVBK]
- push af
- ld a, $6
- ld [rSVBK], a
-
- push bc
- push hl
-
- ; Copy c tiles of the 2bpp from b:de to wScratchTileMap
- ld a, b ; bank
- ld l, c ; number of tiles
- ld h, $0
- ; multiply by 16 (16 bytes of a 2bpp = 8 x 8 tile)
- add hl, hl
- add hl, hl
- add hl, hl
- add hl, hl
- ld b, h
- ld c, l
- ld h, d ; address
- ld l, e
- ld de, wScratchTileMap
- call FarCopyBytes
-
- pop hl
- pop bc
-
- push bc
- call DelayFrame
- pop bc
-
- ld d, h
- ld e, l
- ld hl, wScratchTileMap
- call HDMATransfer_Wait127Scanlines
-
- ; restore the previous bank
- pop af
- ld [rSVBK], a
- ret
-; 1042b2
-
-_Get1bpp:: ; 1042b2
- ; 1bpp when [rLCDC] & $80
-.loop
- ld a, c
- cp $10
- jp c, .bankswitch
- jp z, .bankswitch
- push bc
- push hl
- push de
- ld c, $10
- call .bankswitch
- pop de
- ld hl, $80
- add hl, de
- ld d, h
- ld e, l
- pop hl
- lb bc, 1, 0
- add hl, bc
- pop bc
- ld a, c
- sub $10
- ld c, a
- jr .loop
-; 1042d6
-
-.bankswitch ; 1042d6
- ld a, [rSVBK]
- push af
- ld a, $6
- ld [rSVBK], a
-
- push bc
- push hl
-
- ld a, b
- ld l, c
- ld h, $0
- add hl, hl ; multiply by 8
- add hl, hl ; multiply by 8
- add hl, hl ; multiply by 8
- ld c, l
- ld b, h
- ld h, d
- ld l, e
- ld de, wScratchTileMap
- call FarCopyBytesDouble_DoubleBankSwitch
-
- pop hl
- pop bc
-
- push bc
- call DelayFrame
- pop bc
-
- ld d, h
- ld e, l
- ld hl, wScratchTileMap
- call HDMATransfer_Wait127Scanlines
-
- pop af
- ld [rSVBK], a
- ret
-; 104303
-
-HDMATransfer_OnlyTopFourRows: ; 104303
- ld hl, .Function
- jp CallInSafeGFXMode
-; 104309
-
-.Function:
- ld hl, wScratchTileMap
- decoord 0, 0
- call .Copy
- ld hl, wScratchTileMap + $80
- decoord 0, 0, AttrMap
- call .Copy
- ld a, $1
- ld [rVBK], a
- ld c, $8
- ld hl, wScratchTileMap + $80
- debgcoord 0, 0, VBGMap1
- call HDMATransfer_Wait127Scanlines
- ld a, $0
- ld [rVBK], a
- ld c, $8
- ld hl, wScratchTileMap
- debgcoord 0, 0, VBGMap1
- call HDMATransfer_Wait127Scanlines
- ret
-
-.Copy: ; 10433a (41:433a)
- ld b, 4
-.outer_loop
- ld c, SCREEN_WIDTH
-.inner_loop
- ld a, [de]
- ld [hli], a
- inc de
- dec c
- jr nz, .inner_loop
- ld a, l
- add BG_MAP_WIDTH - SCREEN_WIDTH
- ld l, a
- ld a, h
- adc $0
- ld h, a
- dec b
- jr nz, .outer_loop
- ret
-; 104350
-
-ShockEmote: INCBIN "gfx/emotes/shock.2bpp"
-QuestionEmote: INCBIN "gfx/emotes/question.2bpp"
-HappyEmote: INCBIN "gfx/emotes/happy.2bpp"
-SadEmote: INCBIN "gfx/emotes/sad.2bpp"
-HeartEmote: INCBIN "gfx/emotes/heart.2bpp"
-BoltEmote: INCBIN "gfx/emotes/bolt.2bpp"
-SleepEmote: INCBIN "gfx/emotes/sleep.2bpp"
-FishEmote: INCBIN "gfx/emotes/fish.2bpp"
-JumpShadowGFX: INCBIN "gfx/misc/shadow.2bpp"
-FishingRodGFX2: INCBIN "gfx/misc/fishing2.2bpp"
-BoulderDustGFX: INCBIN "gfx/misc/boulderdust.2bpp"
-FishingRodGFX4: INCBIN "gfx/misc/fishing4.2bpp"
diff --git a/misc/mobile_12.asm b/misc/mobile_12.asm
deleted file mode 100755
index 69a5551a7..000000000
--- a/misc/mobile_12.asm
+++ /dev/null
@@ -1,1845 +0,0 @@
-InitMobileProfile: ; 4802f (12:402f)
- xor a
- set 6, a
- ld [wd002], a
- ld hl, wd003
- set 0, [hl]
- ld a, c
- and a
- call z, InitCrystalData
- call ClearBGPalettes
- call Function48d3d
- ld a, [wd479]
- bit 1, a
- jr z, .not_yet_initialized
- ld a, [wd003]
- set 0, a
- set 1, a
- set 2, a
- set 3, a
- ld [wd003], a
-.not_yet_initialized
- call Function486bf
- call LoadFontsExtra
- ld de, GFX_488c3
- ld hl, VTiles2 tile $10
- lb bc, BANK(GFX_488c3), 1
- call Request1bpp
- ld de, GFX_488cb
- ld hl, VTiles2 tile $11
- lb bc, BANK(GFX_488cb), 1
- call Request1bpp
- call Function4a3a7
- call ClearBGPalettes
- ld a, [wd002]
- bit 6, a
- jr z, .asm_4808a
- call Function48689
- jr .asm_480d7
-.asm_4808a
- ld a, $5
- ld [MusicFade], a
- ld a, MUSIC_MOBILE_ADAPTER_MENU % $100
- ld [MusicFadeIDLo], a
- ld a, MUSIC_MOBILE_ADAPTER_MENU / $100
- ld [MusicFadeIDHi], a
- ld c, 20
- call DelayFrames
- ld b, $1
- call GetMysteryGift_MobileAdapterLayout
- call ClearBGPalettes
- hlcoord 0, 0
- ld b, 2
- ld c, 20
- call ClearBox
- hlcoord 0, 1
- ld a, $c
- ld [hl], a
- ld bc, $13
- add hl, bc
- ld [hl], a
- ld de, MobileProfileString
- hlcoord 1, 1
- call PlaceString
- hlcoord 0, 2
- ld b, $a
- ld c, $12
- call Function48cdc
- hlcoord 2, 4
- ld de, MobileString_Gender
- call PlaceString
-.asm_480d7
- hlcoord 2, 6
- ld de, MobileString_Age
- call PlaceString
- hlcoord 2, 8
- ld de, MobileString_Address
- call PlaceString
- hlcoord 2, 10
- ld de, MobileString_ZipCode
- call PlaceString
- hlcoord 2, 12
- ld de, MobileString_OK
- call PlaceString
- ld a, [wd002]
- bit 6, a
- jr nz, .asm_48113
- ld a, [PlayerGender]
- ld hl, Strings_484fb
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 11, 4
- call PlaceString
-.asm_48113
- hlcoord 11, 6
- call Function487ec
- ld a, [wd474]
- dec a
- ld hl, Prefectures
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 11, 8
- call PlaceString
- hlcoord 11, 10
- call Function489ea
- hlcoord 0, 14
- ld b, $2
- ld c, $12
- call TextBox
- hlcoord 1, 16
- ld de, MobileString_PersonalInfo
- call PlaceString
- call Function48187
- call WaitBGMap2
- call SetPalettes
- call StaticMenuJoypad
- ld hl, wMenuCursorY
- ld b, [hl]
- push bc
- jr asm_4815f
-
-Function48157: ; 48157 (12:4157)
- call ScrollingMenuJoypad
- ld hl, wMenuCursorY
- ld b, [hl]
- push bc
-asm_4815f: ; 4815f (12:415f)
- bit A_BUTTON_F, a
- jp nz, Function4820d
- ld b, a
- ld a, [wd002]
- bit 6, a
- jr z, .dont_check_b_button
- ld hl, wd479
- bit 1, [hl]
- jr z, .dont_check_b_button
- bit B_BUTTON_F, b
- jr nz, .b_button
-.dont_check_b_button
- jp Function48272
-
-.b_button
- call ClearBGPalettes
- call Function48d30
- pop bc
- call ClearTileMap
- ld a, $ff
- ret
-
-Function48187: ; 48187 (12:4187)
- ld a, [wd479]
- bit 1, a
- jr nz, .asm_481f1
- ld a, [wd003]
- ld d, a
- call Function48725
- jr c, .asm_481a2
- lb bc, 1, 4
- hlcoord 2, 12
- call ClearBox
- jr .asm_481ad
-.asm_481a2
- push de
- hlcoord 2, 12
- ld de, MobileString_OK
- call PlaceString
- pop de
-.asm_481ad
- ld a, [wd002]
- bit 6, a
- jr nz, .asm_481c1
- bit 0, d
- jr nz, .asm_481c1
- lb bc, 1, 8
- hlcoord 11, 4
- call ClearBox
-.asm_481c1
- bit 1, d
- jr nz, .asm_481ce
- lb bc, 1, 8
- hlcoord 11, 6
- call ClearBox
-.asm_481ce
- bit 2, d
- jr nz, .asm_481db
- lb bc, 2, 8
- hlcoord 11, 7
- call ClearBox
-.asm_481db
- bit 3, d
- jr nz, .asm_481f1
- ld a, [wd479]
- bit 0, a
- jr nz, .asm_481f8
- lb bc, 1, 8
- hlcoord 11, 10
- call ClearBox
- jr .asm_48201
-.asm_481f1
- ld a, [wd479]
- bit 0, a
- jr nz, .asm_48201
-.asm_481f8
- hlcoord 11, 10
- ld de, .String_TellLater
- call PlaceString
-.asm_48201
- ret
-; 48202 (12:4202)
-
-.String_TellLater: ; 48202
- db "Tell Later@"
-; 4820d
-
-Function4820d: ; 4820d (12:420d)
- call PlaceHollowCursor
- ld hl, wMenuCursorY
- ld a, [hl]
- push af
- ld a, [wd002]
- bit 6, a
- jr z, .asm_4821f
- pop af
- inc a
- push af
-.asm_4821f
- pop af
- cp $1
- jr z, asm_4828d
- cp $2
- jp z, Function4876f
- cp $3
- jp z, Function48304
- cp $4
- jp z, Function488d3
- ld a, $2
- call MenuClickSound
- ld a, [wd002]
- bit 6, a
- jr z, .asm_4825c
- jr .asm_4825c
-; 48241 (12:4241)
-
- hlcoord 1, 15
- ld b, $2
- ld c, $12
- call ClearBox
- ld de, MobileString_ProfileChanged
- hlcoord 1, 16
- call PlaceString
- call WaitBGMap
- ld c, 48
- call DelayFrames
-
-.asm_4825c
- call ClearBGPalettes
- call Function48d30
- pop bc
- call ClearTileMap
- ld b, SCGB_DIPLOMA
- call GetSGBLayout
- ld hl, wd479
- set 1, [hl]
- xor a
- ret
-
-Function48272: ; 48272 (12:4272)
- jp Function4840c
-; 48275 (12:4275)
-
-MobileString_PersonalInfo: ; 48275
- db "Personal Info@"
-; 48283
-
-Function48283: ; 48283 (12:4283)
- lb bc, 2, 18
- hlcoord 1, 15
- call ClearBox
- ret
-
-asm_4828d: ; 4828d (12:428d)
- call Function48283
- hlcoord 1, 16
- ld de, MobileDesc_Gender
- call PlaceString
- ld hl, MenuDataHeader_0x484f1
- call LoadMenuDataHeader
- call Function4873c
- hlcoord 11, 2
- ld b, $4
- ld c, $7
- call Function48cdc
- hlcoord 13, 4
- ld de, String_484fb
- call PlaceString
- hlcoord 13, 6
- ld de, String_484ff
- call PlaceString
- call WaitBGMap
- ld a, [PlayerGender]
- inc a
- ld [wMenuCursorBuffer], a
- call StaticMenuJoypad
- call PlayClickSFX
- call ExitMenu
- bit 0, a
- jp z, Function4840c
- ld hl, wMenuCursorY
- ld a, [hl]
- ld hl, Strings_484fb
- cp $1
- jr z, .asm_482ed
-.asm_482e1
- ld a, [hli]
- cp $50
- jr nz, .asm_482e1
- ld a, $1
- ld [PlayerGender], a
- jr .asm_482f1
-.asm_482ed
- xor a
- ld [PlayerGender], a
-.asm_482f1
- ld d, h
- ld e, l
- hlcoord 11, 4
- call PlaceString
- ld a, [wd003]
- set 0, a
- ld [wd003], a
- jp Function4840c
-
-Function48304: ; 48304 (12:4304)
- call Function48283
- hlcoord 1, 16
- ld de, MobileDesc_Address
- call PlaceString
- ld hl, MenuDataHeader_0x48504
- call LoadMenuDataHeader
- ld hl, MenuDataHeader_0x48513
- call LoadMenuDataHeader
- hlcoord 10, 0
- ld b, $c
- ld c, $8
- call Function48cdc
- ld a, [wMenuCursorBuffer]
- ld b, a
- ld a, [wMenuScrollPosition]
- ld c, a
- push bc
- ld a, [wd474]
- dec a
- cp $29
- jr c, .asm_4833f
- sub $29
- inc a
- ld [wMenuCursorBuffer], a
- ld a, $29
-.asm_4833f
- ld [wMenuScrollPosition], a
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
-.asm_48348
- call ScrollingMenu
- ld de, $629
- call Function48383
- jr c, .asm_48348
- ld d, a
- pop bc
- ld a, b
- ld [wMenuCursorBuffer], a
- ld a, c
- ld [wMenuScrollPosition], a
- ld a, d
- push af
- call ExitMenu
- call ExitMenu
- pop af
- ld a, [hJoyPressed]
- bit 0, a
- jr z, .asm_48377
- call Function483bb
- ld a, [wd003]
- set 2, a
- ld [wd003], a
-.asm_48377
- call Function48187
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
- jp Function4840c
-
-Function48383: ; 48383 (12:4383)
- push bc
- push af
- bit 5, a
- jr nz, .asm_48390
- bit 4, a
- jr nz, .asm_4839f
- and a
- jr .asm_483b7
-.asm_48390
- ld a, [wMenuScrollPosition]
- sub d
- ld [wMenuScrollPosition], a
- jr nc, .asm_483af
- xor a
- ld [wMenuScrollPosition], a
- jr .asm_483af
-.asm_4839f
- ld a, [wMenuScrollPosition]
- add d
- ld [wMenuScrollPosition], a
- cp e
- jr c, .asm_483af
- ld a, e
- ld [wMenuScrollPosition], a
- jr .asm_483af
-.asm_483af
- ld hl, wMenuCursorY
- ld a, [hl]
- ld [wMenuCursorBuffer], a
- scf
-.asm_483b7
- pop bc
- ld a, b
- pop bc
- ret
-
-Function483bb: ; 483bb (12:43bb)
- ld hl, wScrollingMenuCursorPosition
- ld a, [hl]
- inc a
- ld [wd474], a
- dec a
- ld b, a
- ld hl, Prefectures
-.asm_483c8
- and a
- jr z, .asm_483d5
-.asm_483cb
- ld a, [hli]
- cp "@"
- jr nz, .asm_483cb
- ld a, b
- dec a
- ld b, a
- jr .asm_483c8
-.asm_483d5
- ld d, h
- ld e, l
- ld b, $2
- ld c, $8
- hlcoord 11, 7
- call ClearBox
- hlcoord 11, 8
- call PlaceString
- ret
-; 483e8 (12:43e8)
-
-Function483e8: ; 483e8
- push de
- ld hl, Prefectures
- ld a, [MenuSelection]
- cp $ff
- jr nz, .asm_483f8
- ld hl, Wakayama ; last string
- jr .asm_48405
-
-.asm_483f8
- ld d, a
- and a
- jr z, .asm_48405
-.asm_483fc
- ld a, [hli]
- cp "@"
- jr nz, .asm_483fc
- ld a, d
- dec a
- jr .asm_483f8
-
-.asm_48405
- ld d, h
- ld e, l
- pop hl
- call PlaceString
- ret
-; 4840c
-
-Function4840c: ; 4840c (12:440c)
- call Function48187
- call Function48283
- hlcoord 1, 16
- ld de, MobileString_PersonalInfo
- call PlaceString
- call Function486bf
- pop bc
- ld hl, wMenuCursorY
- ld [hl], b
- ld a, [wd002]
- bit 6, a
- jr nz, .narrower_box
- ld b, 9
- ld c, 1
- hlcoord 1, 4
- call ClearBox
- jp Function48157
-
-.narrower_box
- ld b, 7
- ld c, 1
- hlcoord 1, 6
- call ClearBox
- jp Function48157
-
-Mobile12_Bin2Dec: ; 48444 (12:4444)
- push bc
- push af
- push de
- push hl
- ld hl, .DigitStrings
-.loop
- and a
- jr z, .got_string
- inc hl
- inc hl
- dec a
- jr .loop
-.got_string
- ld d, h
- ld e, l
- pop hl
- call PlaceString
- pop de
- pop af
- pop bc
- ret
-; 4845d (12:445d)
-
-.DigitStrings: ; 4845d
-; 4845d
- db "0@"
- db "1@"
- db "2@"
- db "3@"
- db "4@"
- db "5@"
- db "6@"
- db "7@"
- db "8@"
- db "9@"
-; 48471
-
-MobileProfileString: db " Mobile Profile@"
-MobileString_Gender: db "Gender@"
-MobileString_Age: db "Age@"
-MobileString_Address: db "Address@"
-MobileString_ZipCode: db "Zip Code@"
-MobileString_OK: db "OK@"
-MobileString_ProfileChanged: db "Profile Changed@"
-MobileDesc_Gender: db "Boy or girl?@"
-MobileDesc_Age: db "How old are you?@"
-MobileDesc_Address: db "Where do you live?@"
-MobileDesc_ZipCode: db "Your zip code?@"
-; 484f1
-
-MenuDataHeader_0x484f1: ; 0x484f1
- db $40 ; flags
- db 02, 11 ; start coords
- db 07, 19 ; end coords
- dw MenuData2_0x484f9
- db 1 ; default option
-; 0x484f9
-
-MenuData2_0x484f9: ; 0x484f9
- db $a0 ; flags
- db 2 ; items
-Strings_484fb:
-String_484fb: db "Boy@"
-String_484ff: db "Girl@"
-; 0x48504
-
-MenuDataHeader_0x48504: ; 0x48504
- db $40 ; flags
- db 00, 10 ; start coords
- db 17, 19 ; end coords
-
-MenuDataHeader_0x48509: ; 0x48509
- db $40 ; flags
- db 05, 10 ; start coords
- db 07, 19 ; end coords
-
-MenuDataHeader_0x4850e: ; 0x4850e
- db $40 ; flags
- db 09, 10 ; start coords
- db 11, 19 ; end coords
-
-MenuDataHeader_0x48513: ; 0x48513
- db $40 ; flags
- db 01, 11 ; start coords
- db 12, 18 ; end coords
- dw MenuData2_0x4851b
- db 1 ; default option
-; 0x4851b
-
-MenuData2_0x4851b: ; 0x4851b
- db $1d ; flags
- db 6 ; items
-
-Unknown_4851d: ; 4851d
- db $00, $01, $12, $2b, $45, $12, $e8, $43, $00, $00, $00, $00, $00, $00, $2e, $00, $01, $02, $03, $04
- db $05, $06, $07, $08, $09, $0a, $0b, $0c, $0d, $0e, $0f, $10, $11, $12, $13, $14, $15, $16, $17, $18
- db $19, $1a, $1b, $1c, $1d, $1e, $1f, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $2a, $2b, $2c
- db $2d, $ff
-
-Prefectures:
-Aichi: db "あいちけん@" ; Aichi
-Aomori: db "あおもりけん@" ; Aomori
-Akita: db "あきたけん@" ; Akita
-Ishikawa: db "いしかわけん@" ; Ishikawa
-Ibaraki: db "いばらきけん@" ; Ibaraki
-Iwate: db "いわてけん@" ; Iwate
-Ehime: db "えひめけん@" ; Ehime
-Oita: db "おおいたけん@" ; Oita
-Osakafu: db "おおさかふ@" ; Osakafu
-Okayama: db "おかやまけん@" ; Okayama
-Okinawa: db "おきなわけん@" ; Okinawa
-Kagawa: db "かがわけん@" ; Kagawa
-Kagoshima: db "かごしまけん@" ; Kagoshima
-Kanagawa: db "かながわけん@" ; Kanagawa
-Gifu: db "ぎふけん@" ; Gifu
-Kyotofu: db "きょうとふ@" ; Kyotofu
-Kumamoto: db "くまもとけん@" ; Kumamoto
-Gunma: db "ぐんまけん@" ; Gunma
-Kochi: db "こうちけん@" ; Kochi
-Saitama: db "さいたまけん@" ; Saitama
-Saga: db "さがけん@" ; Saga
-Shiga: db "しがけん@" ; Shiga
-Shizuoka: db "しずおかけん@" ; Shizuoka
-Shimane: db "しまねけん@" ; Shimane
-Chiba: db "ちばけん@" ; Chiba
-Tokyo: db "とうきょうと@" ; Tokyo
-Tokushima: db "とくしまけん@" ; Tokushima
-Tochigi: db "とちぎけん@" ; Tochigi
-Tottori: db "とっとりけん@" ; Tottori
-Toyama: db "とやまけん@" ; Toyama
-Nagasaki: db "ながさきけん@" ; Nagasaki
-Nagano: db "ながのけん@" ; Nagano
-Naraken: db "ならけん@" ; Naraken
-Niigata: db "にいがたけん@" ; Niigata
-Hyogo: db "ひょうごけん@" ; Hyogo
-Hiroshima: db "ひろしまけん@" ; Hiroshima
-Fukui: db "ふくいけん@" ; Fukui
-Fukuoka: db "ふくおかけん@" ; Fukuoka
-Fukushima: db "ふくしまけん@" ; Fukushima
-Hokkaido: db "ほっかいどう@" ; Hokkaido
-Mie: db "みえけん@" ; Mie
-Miyagi: db "みやぎけん@" ; Miyagi
-Miyazaki: db "みやざきけん@" ; Miyazaki
-Yamagata: db "やまがたけん@" ; Yamagata
-Yamaguchi: db "やまぐちけん@" ; Yamaguchi
-Yamanashi: db "やまなしけん@" ; Yamanashi
-Wakayama: db "わかやまけん@" ; Wakayama
-; 48689
-
-Function48689: ; 48689 (12:4689)
- ld c, 7
- call DelayFrames
- ld b, $1
- call GetMysteryGift_MobileAdapterLayout
- call ClearBGPalettes
- hlcoord 0, 0
- ld b, 4
- ld c, SCREEN_WIDTH
- call ClearBox
- hlcoord 0, 2
- ld a, $c
- ld [hl], a
- ld bc, SCREEN_WIDTH - 1
- add hl, bc
- ld [hl], a
- ld de, MobileProfileString
- hlcoord 1, 2
- call PlaceString
- hlcoord 0, 4
- ld b, $8
- ld c, $12
- call Function48cdc
- ret
-
-Function486bf: ; 486bf (12:46bf)
- ld hl, w2DMenuCursorInitY
- ld a, [wd002]
- bit 6, a
- jr nz, .start_at_6
- ld a, 4
- ld [hli], a
- jr .got_init_y
-
-.start_at_6
- ld a, 6
- ld [hli], a
-.got_init_y
- ld a, 1
- ld [hli], a ; init x
- ld a, [wd002]
- bit 6, a
- jr nz, .check_wd479
- call Function48725
- ld a, 4
- jr nc, .got_num_rows_1
- ld a, 5
-.got_num_rows_1
- ld [hli], a
- jr .got_num_rows_2
-
-.check_wd479
- ld a, [wd479]
- bit 1, a
- jr nz, .four_rows
- call Function48725
- jr c, .four_rows
- ld a, 3
- ld [hli], a
- jr .got_num_rows_2
-
-.four_rows
- ld a, 4
- ld [hli], a
-.got_num_rows_2
- ld a, 1
- ld [hli], a ; num cols
- ld [hl], $0 ; flags 1
- set 5, [hl]
- inc hl
- xor a
- ld [hli], a ; flags 2
- ld a, $20
- ld [hli], a ; cursor offsets
- ld a, A_BUTTON
- add D_UP
- add D_DOWN
- push af
- ld a, [wd002]
- bit 6, a
- jr z, .got_joypad_mask
- pop af
- add B_BUTTON
- push af
-.got_joypad_mask
- pop af
- ld [hli], a
- ld a, $1
- ld [hli], a ; cursor y
- ld [hli], a ; cursor x
- xor a
- ld [hli], a ; off char
- ld [hli], a ; cursor tile
- ld [hli], a ; cursor tile + 1
- ret
-
-Function48725: ; 48725 (12:4725)
-; ld a, [wd003]
-; and $f
-; cp $f
-; jr nz, .clear_carry
-; scf
-; ret
-; .clear_carry
-; and a
-; ret
-
- ld a, [wd003]
- bit 0, a
- jr z, .clear_carry
- bit 1, a
- jr z, .clear_carry
- bit 2, a
- jr z, .clear_carry
- bit 3, a
- jr z, .clear_carry
- scf
- ret
-
-.clear_carry
- and a
- ret
-
-Function4873c: ; 4873c (12:473c)
- ld hl, w2DMenuCursorInitY
- ld a, 4
- ld [hli], a
- ld a, 12
- ld [hli], a ; init x
- ld a, 2
- ld [hli], a ; num rows
- ld a, 1
- ld [hli], a ; num cols
- ld [hl], $0 ; flags 1
- set 5, [hl]
- inc hl
- xor a
- ld [hli], a ; flags 2
- ln a, 2, 0
- ld [hli], a ; cursor offsets
- ld a, A_BUTTON
- add B_BUTTON
- ld [hli], a ; joypad filter
- ; ld a, [PlayerGender]
- ; xor 1
- ; inc a
- ld a, [PlayerGender]
- and a
- jr z, .male
- ld a, 2
- jr .okay_gender
-
-.male
- ld a, 1
-.okay_gender
- ld [hli], a ; cursor y
- ld a, $1
- ld [hli], a ; cursor x
- xor a
- ld [hli], a ; off char
- ld [hli], a ; cursor tile
- ld [hli], a ; cursor tile + 1
- ret
-
-Function4876f: ; 4876f (12:476f)
- call Function48283
- hlcoord 1, 16
- ld de, MobileDesc_Age
- call PlaceString
- ld hl, MenuDataHeader_0x48509
- call LoadMenuDataHeader
- ld a, [hInMenu]
- push af
- ld a, $1
- ld [hInMenu], a
- hlcoord 10, 5
- ld b, $1
- ld c, $8
- call Function48cdc
- call WaitBGMap
- ld a, [wd473]
- and a
- jr z, .asm_487ab
- cp $64
- jr z, .asm_487b2
- hlcoord 12, 5
- ld [hl], $10
- hlcoord 12, 7
- ld [hl], $11
- jr .asm_487b7
-.asm_487ab
- hlcoord 12, 5
- ld [hl], $10
- jr .asm_487b7
-.asm_487b2
- hlcoord 12, 7
- ld [hl], $11
-.asm_487b7
- hlcoord 11, 6
- call Function487ec
- ld c, 10
- call DelayFrames
- ld a, [wd473]
- push af
-.asm_487c6
- call JoyTextDelay
- call Function4880e
- jr nc, .asm_487c6
- ld a, $1
- call MenuClickSound
- pop bc
- jr nz, .asm_487da
- ld a, b
- ld [wd473], a
-.asm_487da
- ld a, [wd473]
- call ExitMenu
- hlcoord 11, 6
- call Function487ec
- pop af
- ld [hInMenu], a
- jp Function4840c
-
-Function487ec: ; 487ec (12:47ec)
- push hl
- ld de, wd473
- call Function487ff
- pop hl
-rept 4
- inc hl
-endr
- ld de, String_4880d
- call PlaceString
- ret
-
-Function487ff: ; 487ff (12:47ff)
- push hl
- ld a, " "
- ld [hli], a
- ld [hl], a
- pop hl
- ld b, PRINTNUM_LEADINGZEROS | 1
- ld c, 3
- call PrintNum
- ret
-; 4880d (12:480d)
-
-String_4880d: ; 4880d
- db "@"
-; 4880e
-
-Function4880e: ; 4880e (12:480e)
- ld a, [hJoyPressed]
- and A_BUTTON
- jp nz, Function488b9
- ld a, [hJoyPressed]
- and B_BUTTON
- jp nz, Function488b4
- ld hl, hJoyLast
- ld a, [hl]
- and D_UP
- jr nz, .asm_48843
- ld a, [hl]
- and D_DOWN
- jr nz, .asm_48838
- ld a, [hl]
- and D_LEFT
- jr nz, .asm_4884f
- ld a, [hl]
- and D_RIGHT
- jr nz, .asm_4885f
- call DelayFrame
- and a
- ret
-.asm_48838
- ld hl, wd473
- ld a, [hl]
- and a
- jr z, .asm_48840
- dec a
-.asm_48840
- ld [hl], a
- jr .asm_4886f
-.asm_48843
- ld hl, wd473
- ld a, [hl]
- cp $64
- jr nc, .asm_4884c
- inc a
-.asm_4884c
- ld [hl], a
- jr .asm_4886f
-.asm_4884f
- ld a, [wd473]
- cp $5b
- jr c, .asm_48858
- ld a, $5a
-.asm_48858
- add $a
- ld [wd473], a
- jr .asm_4886f
-.asm_4885f
- ld a, [wd473]
- cp $a
- jr nc, .asm_48868
- ld a, $a
-.asm_48868
- sub $a
- ld [wd473], a
- jr .asm_4886f
-.asm_4886f
- ld a, [wd473]
- and a
- jr z, .asm_48887
- cp $64
- jr z, .asm_48898
- jr z, .asm_488a7
- hlcoord 12, 5
- ld [hl], $10
- hlcoord 12, 7
- ld [hl], $11
- jr .asm_488a7
-.asm_48887
- hlcoord 10, 5
- ld b, $1
- ld c, $8
- call Function48cdc
- hlcoord 12, 5
- ld [hl], $10
- jr .asm_488a7
-.asm_48898
- hlcoord 10, 5
- ld b, $1
- ld c, $8
- call Function48cdc
- hlcoord 12, 7
- ld [hl], $11
-.asm_488a7
- hlcoord 11, 6
- call Function487ec
- call WaitBGMap
- ld a, $1
- and a
- ret
-
-Function488b4: ; 488b4 (12:48b4)
- ld a, $0
- and a
- scf
- ret
-
-Function488b9: ; 488b9 (12:48b9)
- ld a, [wd003]
- set 1, a
- ld [wd003], a
- scf
- ret
-; 488c3 (12:48c3)
-
-GFX_488c3: ; 488c3
-INCBIN "gfx/unknown/0488c3.2bpp"
-
-GFX_488cb: ; 488cb
-INCBIN "gfx/unknown/0488cb.2bpp"
-
-Function488d3: ; 488d3 (12:48d3)
- call Function48283
- hlcoord 1, 16
- ld de, MobileDesc_ZipCode
- call PlaceString
- call Function48a3a
- jp c, Function4840c
- ld hl, MenuDataHeader_0x4850e
- call LoadMenuDataHeader
- ld a, [hInMenu]
- push af
- ld a, $1
- ld [hInMenu], a
- hlcoord 10, 9
- ld b, $1
- ld c, $8
- call Function48cdc
- ld a, [wd475]
- and $f
- ld d, $0
- hlcoord 11, 10
- call Function489ea
- call WaitBGMap
- ld a, [wd475]
- ld b, a
- ld a, [wd476]
- ld c, a
- ld a, [wd477]
- ld d, a
- ld a, [wd478]
- ld e, a
- push de
- push bc
- ld d, $0
- ld b, $0
-
-asm_48922: ; 48922 (12:4922)
- push bc
- call JoyTextDelay
- ld a, [hJoyDown]
- and a
- jp z, Function4896e
- bit 0, a
- jp nz, Function4896e
- bit 1, a
- jp nz, Function4896e
- ld a, [wd002]
- and %11001111
- res 7, a
- ld [wd002], a
- pop bc
- inc b
- ld a, b
- cp $5
- push bc
- jr c, .asm_4894c
- pop bc
- ld b, $4
- push bc
-.asm_4894c
- pop bc
- push bc
- ld a, b
- cp $4
- jr nz, asm_48972
- ld c, 10
- call DelayFrames
- jr asm_48972
-; 4895a (12:495a)
-
-Function4895a: ; 4895a
- ld a, [hJoyPressed]
- and a
- jr z, .asm_48965
- pop bc
- ld b, $1
- push bc
- jr asm_48972
-
-.asm_48965
- ld a, [hJoyLast]
- and a
- jr z, asm_48972
-
- pop bc
- ld b, $1
- push bc
-
-Function4896e: ; 4896e (12:496e)
- pop bc
- ld b, $0
- push bc
-
-asm_48972: ; 48972 (12:4972)
- call Function48ab5
- push af
- cp $f0
- jr z, .asm_48994
- cp $f
- jr nz, .asm_48988
- ld a, [wd002]
- set 7, a
- and $cf
- ld [wd002], a
-.asm_48988
- hlcoord 11, 10
- ld b, $0
- ld c, d
- add hl, bc
- ld b, $3
- call Function48c11
-.asm_48994
- call WaitBGMap
- pop af
- pop bc
- jr nc, asm_48922
- jr nz, .asm_489b1
- pop bc
- ld a, b
- ld [wd475], a
- ld a, c
- ld [wd476], a
- pop bc
- ld a, b
- ld [wd477], a
- ld a, c
- ld [wd478], a
- jr .asm_489c5
-.asm_489b1
- push af
- ld a, [wd479]
- set 0, a
- ld [wd479], a
- ld a, [wd003]
- set 3, a
- ld [wd003], a
- pop af
- pop bc
- pop bc
-.asm_489c5
- push af
- push bc
- push de
- push hl
- ld a, $1
- call MenuClickSound
- pop hl
- pop de
- pop bc
- pop af
- call ExitMenu
- hlcoord 11, 10
- call Function489ea
- hlcoord 11, 9
- lb bc, 1, 8
- call ClearBox
- pop af
- ld [hInMenu], a
- jp Function4840c
-
-Function489ea: ; 489ea (12:49ea)
- push de
- ld a, [wd475]
- and $f
- call Mobile12_Bin2Dec
- ld a, [wd476]
- and $f0
- swap a
- inc hl
- call Mobile12_Bin2Dec
- ld a, [wd476]
- and $f
- inc hl
- call Mobile12_Bin2Dec
- inc hl
- ld de, String_48a38
- call PlaceString
- ld a, [wd477]
- and $f0
- swap a
- inc hl
- call Mobile12_Bin2Dec
- ld a, [wd477]
- and $f
- inc hl
- call Mobile12_Bin2Dec
- ld a, [wd478]
- and $f0
- swap a
- inc hl
- call Mobile12_Bin2Dec
- ld a, [wd478]
- and $f
- inc hl
- call Mobile12_Bin2Dec
- pop de
- ret
-; 48a38 (12:4a38)
-
-String_48a38: ; 48a38
- db "-@"
-; 48a3a
-
-Function48a3a: ; 48a3a (12:4a3a)
- ld hl, MenuDataHeader_0x48a9c
- call LoadMenuDataHeader
- call Function4873c
- ld a, $a
- ld [w2DMenuCursorInitY], a
- ld a, $b
- ld [w2DMenuCursorInitX], a
- ld a, $1
- ld [wMenuCursorY], a
- hlcoord 10, 8
- ld b, $4
- ld c, $8
- call Function48cdc
- hlcoord 12, 10
- ld de, String_48aa1
- call PlaceString
- call StaticMenuJoypad
- push af
- call PlayClickSFX
- call ExitMenu
- pop af
- bit 1, a
- jp nz, Function48a9a
- ld a, [wMenuCursorY]
- cp $1
- jr z, .asm_48a98
- ld a, [wd003]
- set 3, a
- ld [wd003], a
- ld a, [wd479]
- res 0, a
- ld [wd479], a
- xor a
- ld bc, $4
- ld hl, wd475
- call ByteFill
- jr Function48a9a
-.asm_48a98
- and a
- ret
-
-Function48a9a: ; 48a9a (12:4a9a)
- scf
- ret
-; 48a9c (12:4a9c)
-
-MenuDataHeader_0x48a9c: ; 0x48a9c
- db $40 ; flags
- db 08, 10 ; start coords
- db 13, 19 ; end coord
-
-String_48aa1: ; 48aa1
- db "Tell Now"
- next "Tell Later@"
-; 48ab5
-
-
-Function48ab5: ; 48ab5 (12:4ab5)
- ld a, [hJoyPressed]
- and A_BUTTON
- jp nz, Function48c0f
- ld a, [hJoyPressed]
- and B_BUTTON
- jp nz, Function48c0d
- ld a, d
- and a
- jr z, .asm_48adf
- cp $1
- jr z, .asm_48ae7
- cp $2
- jr z, .asm_48af1
- cp $3
- jr z, .asm_48af9
- cp $4
- jr z, .asm_48b03
- cp $5
- jr z, .asm_48b0b
- cp $6
- jr .asm_48b15
-.asm_48adf
- ld hl, wd475
- ld a, [hl]
- and $f
- jr .asm_48b1d
-.asm_48ae7
- ld hl, wd476
- ld a, [hl]
- swap a
- or $f0
- jr .asm_48b1d
-.asm_48af1
- ld hl, wd476
- ld a, [hl]
- and $f
- jr .asm_48b1d
-.asm_48af9
- ld hl, wd477
- ld a, [hl]
- swap a
- or $f0
- jr .asm_48b1d
-.asm_48b03
- ld hl, wd477
- ld a, [hl]
- and $f
- jr .asm_48b1d
-.asm_48b0b
- ld hl, wd478
- ld a, [hl]
- swap a
- or $f0
- jr .asm_48b1d
-.asm_48b15
- ld hl, wd478
- ld a, [hl]
- and $f
- jr .asm_48b1d
-.asm_48b1d
- push hl
- push af
- ld e, $0
- hlcoord 11, 10
- ld a, d
-.asm_48b25
- and a
- jr z, .asm_48b2c
- inc e
- dec a
- jr .asm_48b25
-.asm_48b2c
- ld hl, hJoyLast
- ld a, [hl]
- and D_UP
- jr nz, .asm_48b8d
- ld a, [hl]
- and D_DOWN
- jr nz, .asm_48b55
- ld a, [hl]
- and D_LEFT
- jp nz, Function48bd7
- ld a, [hl]
- and D_RIGHT
- jr nz, .asm_48b9d
- hlcoord 11, 10
- call Function489ea
- ld a, [wd002]
- bit 7, a
- jr nz, .asm_48b51
-.asm_48b51
- pop bc
- pop bc
- and a
- ret
-.asm_48b55
- pop af
- ld b, a
- and $f
- and a
- ld a, b
- jr nz, .asm_48b61
- and $f0
- add $a
-.asm_48b61
- dec a
-.asm_48b62
- push de
- push af
- hlcoord 10, 9
- ld b, $1
- ld c, $8
- call Function48cdc
- pop af
- pop de
- hlcoord 11, 10
- ld b, a
- ld a, d
- cp $3
- jr c, .asm_48b7a
- inc hl
-.asm_48b7a
- ld a, b
- pop hl
- bit 7, a
- jr z, .asm_48b85
- call Function48c4d
- jr .asm_48b88
-.asm_48b85
- call Function48c5a
-.asm_48b88
- ld a, $f0
- jp Function48c00
-.asm_48b8d
- pop af
- ld b, a
- and $f
- cp $9
- ld a, b
- jr c, .asm_48b9a
- and $f0
- add $ff
-.asm_48b9a
- inc a
- jr .asm_48b62
-.asm_48b9d
- push de
- hlcoord 10, 9
- ld b, $1
- ld c, $8
- call Function48cdc
- pop de
- ld a, d
- cp $6
- jr nc, .asm_48baf
- inc d
-.asm_48baf
- pop af
- pop hl
- ld b, a
- ld a, d
- cp $6
- ld a, b
- jr z, .asm_48bc4
- bit 7, a
- jr nz, .asm_48bc4
- inc hl
- ld a, [hl]
- swap a
- and $f
- jr asm_48bc7
-.asm_48bc4
- ld a, [hl]
- and $f
-
-asm_48bc7: ; 48bc7 (12:4bc7)
- hlcoord 11, 10
- push af
- ld a, d
- cp $3
- pop bc
- ld a, b
- jr c, .asm_48bd3
- inc hl
-.asm_48bd3
- ld a, $f
- jr Function48c00
-
-Function48bd7: ; 48bd7 (12:4bd7)
- push de
- hlcoord 10, 9
- ld b, $1
- ld c, $8
- call Function48cdc
- pop de
- ld a, d
- and a
- pop af
- pop hl
- ld b, a
- ld a, d
- and a
- ld a, b
- jr z, .asm_48bf3
- bit 7, a
- jr z, .asm_48bf8
- dec d
- dec hl
-.asm_48bf3
- ld a, [hl]
- and $f
- jr asm_48bc7
-.asm_48bf8
- dec d
- ld a, [hl]
- swap a
- and $f
- jr asm_48bc7
-
-Function48c00: ; 48c00 (12:4c00)
- push af
- hlcoord 11, 10
- call Function489ea
- ld a, $1
- and a
- pop bc
- ld a, b
- ret
-
-Function48c0d: ; 48c0d (12:4c0d)
- xor a
- and a
-
-Function48c0f: ; 48c0f (12:4c0f)
- scf
- ret
-
-Function48c11: ; 48c11 (12:4c11)
- ld a, [wd002]
- bit 7, a
- jr z, .asm_48c20
- ld a, d
- cp $3
- jr c, .asm_48c1e
- inc hl
-.asm_48c1e
- ld [hl], $7f
-.asm_48c20
- ld a, [wd002]
- swap a
- and $3
- inc a
- cp b
- jr nz, .asm_48c40
- ld a, [wd002]
- bit 7, a
- jr z, .asm_48c3a
- res 7, a
- ld [wd002], a
- xor a
- jr .asm_48c40
-.asm_48c3a
- set 7, a
- ld [wd002], a
- xor a
-.asm_48c40
- swap a
- ld b, a
- ld a, [wd002]
- and $cf
- or b
- ld [wd002], a
- ret
-
-Function48c4d: ; 48c4d (12:4c4d)
- swap a
- and $f0
- push af
- ld a, [hl]
- and $f
- ld [hl], a
- pop af
- or [hl]
- ld [hl], a
- ret
-
-Function48c5a: ; 48c5a (12:4c5a)
- push af
- ld a, [hl]
- and $f0
- ld [hl], a
- pop af
- or [hl]
- ld [hl], a
- ret
-
-Function48c63: ; 48c63
- ld a, "@"
- ld [de], a
- ld a, c
- cp $30
- jr nc, .asm_48c8c
- and a
- jr z, .asm_48c8c
- dec c
- push de
- ld h, d
- ld l, e
- ld a, "@"
- ld b, 7
-.asm_48c76
- ld [hli], a
- dec b
- jr nz, .asm_48c76
- ld hl, Prefectures
- ld a, c
- call GetNthString
-.asm_48c81
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hl]
- cp "@"
- jr nz, .asm_48c81
- and a
- pop de
- ret
-
-.asm_48c8c
- scf
- ret
-; 48c8e
-
-Function48c8e: ; 48c8e
-; unreferenced
- ld hl, $d02a
- ld d, h
- ld e, l
- callba Function48c63
- hlcoord 10, 7
- call PlaceString
- call WaitBGMap
- ret
-; 48ca3
-
-Function48ca3: ; 48ca3
- push af
- push bc
- push de
- push hl
- ld b, 0
- ld c, 0
- ld d, 0
-.asm_48cad
- cp 100
- jr c, .asm_48cb6
- sub 100
- inc b
- jr .asm_48cad
-
-.asm_48cb6
- cp 10
- jr c, .asm_48cbf
- sub 10
- inc c
- jr .asm_48cb6
-
-.asm_48cbf
- cp 1
- jr c, .asm_48cc7
- dec a
- inc d
- jr .asm_48cbf
-
-.asm_48cc7
- ld a, b
- call Mobile12_Bin2Dec
- inc hl
- ld a, c
- call Mobile12_Bin2Dec
- inc hl
- ld a, d
- call Mobile12_Bin2Dec
- pop hl
- pop de
- pop bc
- pop af
- ret
-; 48cda
-
-Function48cda: ; 48cda (12:4cda)
- ld h, d
- ld l, e
-
-Function48cdc: ; 48cdc (12:4cdc)
- push bc
- push hl
- call Function48cfd
- pop hl
- pop bc
- ld de, AttrMap - TileMap
- add hl, de
- inc b
- inc b
- inc c
- inc c
- ld a, $0
-.asm_48ced
- push bc
- push hl
-.asm_48cef
- ld [hli], a
- dec c
- jr nz, .asm_48cef
- pop hl
- ld de, $14
- add hl, de
- pop bc
- dec b
- jr nz, .asm_48ced
- ret
-
-Function48cfd: ; 48cfd (12:4cfd)
- push hl
- ld a, $4
- ld [hli], a
- inc a
- call Function48d2a
- inc a
- ld [hl], a
- pop hl
- ld de, $14
- add hl, de
-.asm_48d0c
- push hl
- ld a, $7
- ld [hli], a
- ld a, $7f
- call Function48d2a
- ld [hl], $8
- pop hl
- ld de, $14
- add hl, de
- dec b
- jr nz, .asm_48d0c
- ld a, $9
- ld [hli], a
- ld a, $a
- call Function48d2a
- ld [hl], $b
- ret
-
-Function48d2a: ; 48d2a (12:4d2a)
- ld d, c
-.asm_48d2b
- ld [hli], a
- dec d
- jr nz, .asm_48d2b
- ret
-
-Function48d30: ; 48d30 (12:4d30)
- ld hl, wd475
- call Function48d4a
- ld hl, wd477
- call Function48d4a
- ret
-
-Function48d3d: ; 48d3d (12:4d3d)
- ld hl, wd475
- call Function48d94
- ld hl, wd477
- call Function48d94
- ret
-
-Function48d4a: ; 48d4a (12:4d4a)
- inc hl
- ld a, [hl]
- ld b, a
- and $f
- ld c, a
- srl b
- srl b
- srl b
- srl b
- push bc
- ld c, 10
- ld a, b
- call SimpleMultiply
- pop bc
- add c
- ld [hld], a
- xor a
- ld [hMultiplicand + 0], a
- ld [hMultiplicand + 1], a
- ld a, [hl]
- srl a
- srl a
- srl a
- srl a
- ld c, 10
- call SimpleMultiply
- ld b, a
- ld a, [hli]
- and $f
- add b
- ld [hMultiplicand + 2], a
- ld a, 100
- ld [hMultiplier], a
- call Multiply
- ld a, [hProduct + 2]
- ld b, a
- ld a, [hProduct + 3]
- ld c, a
- ld e, [hl]
- add e
- ld c, a
- ld a, b
- adc $0
- ld b, a
- ld a, c
- ld [hld], a
- ld [hl], b
- ret
-
-Function48d94: ; 48d94 (12:4d94)
- xor a
- ld [hDividend + 0], a
- ld [hDividend + 1], a
- ld a, [hli]
- ld [hDividend + 0], a
- ld a, [hl]
- ld [hDividend + 1], a
- ld a, 100
- ld [hDivisor], a
- ld b, 2
- call Divide
- ld a, [hRemainder]
- ld c, 10
- call SimpleDivide
- sla b
- sla b
- sla b
- sla b
- or b
- ld [hld], a
- ld a, [hQuotient + 2]
- ld c, 10
- call SimpleDivide
- sla b
- sla b
- sla b
- sla b
- or b
- ld [hl], a
- ret
diff --git a/misc/mobile_12_2.asm b/misc/mobile_12_2.asm
deleted file mode 100755
index 37179c122..000000000
--- a/misc/mobile_12_2.asm
+++ /dev/null
@@ -1,936 +0,0 @@
-MobileCheckOwnMonAnywhere: ; 4a843
-; Like CheckOwnMonAnywhere, but only check for species.
-; OT/ID don't matter.
-
- ld a, [PartyCount]
- and a
- ret z
-
- ld d, a
- ld e, 0
- ld hl, PartyMon1Species
- ld bc, PartyMonOT
-.asm_4a851
- call .CheckMatch
- ret c
- push bc
- ld bc, PARTYMON_STRUCT_LENGTH
- add hl, bc
- pop bc
- call .CopyName
- dec d
- jr nz, .asm_4a851
- ld a, BANK(sBoxCount)
- call GetSRAMBank
- ld a, [sBoxCount]
- and a
- jr z, .asm_4a888
- ld d, a
- ld hl, sBoxMon1Species
- ld bc, sBoxMonOT
-.asm_4a873
- call .CheckMatch
- jr nc, .asm_4a87c
- call CloseSRAM
- ret
-
-.asm_4a87c
- push bc
- ld bc, BOXMON_STRUCT_LENGTH
- add hl, bc
- pop bc
- call .CopyName
- dec d
- jr nz, .asm_4a873
-
-.asm_4a888
- call CloseSRAM
- ld c, 0
-.asm_4a88d
- ld a, [wCurBox]
- and $f
- cp c
- jr z, .asm_4a8d1
- ld hl, .BoxAddrs
- ld b, 0
- add hl, bc
- add hl, bc
- add hl, bc
- ld a, [hli]
- call GetSRAMBank
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [hl]
- and a
- jr z, .asm_4a8d1
- push bc
- push hl
- ld de, sBoxMons - sBoxCount
- add hl, de
- ld d, h
- ld e, l
- pop hl
- push de
- ld de, sBoxMonOT - sBoxCount
- add hl, de
- ld b, h
- ld c, l
- pop hl
- ld d, a
-.asm_4a8ba
- call .CheckMatch
- jr nc, .asm_4a8c4
- pop bc
- call CloseSRAM
- ret
-
-.asm_4a8c4
- push bc
- ld bc, BOXMON_STRUCT_LENGTH
- add hl, bc
- pop bc
- call .CopyName
- dec d
- jr nz, .asm_4a8ba
- pop bc
-
-.asm_4a8d1
- inc c
- ld a, c
- cp NUM_BOXES
- jr c, .asm_4a88d
- call CloseSRAM
- and a
- ret
-; 4a8dc
-
-.CheckMatch: ; 4a8dc
- push bc
- push hl
- push de
- ld d, b
- ld e, c
- ld a, [ScriptVar]
- ld b, [hl]
- cp b
- jr nz, .no_match
- jr .match
-
-.no_match
- pop de
- pop hl
- pop bc
- and a
- ret
-
-.match
- pop de
- pop hl
- pop bc
- scf
- ret
-; 4a8f4
-
-.BoxAddrs: ; 4a8f4
- dba sBox1
- dba sBox2
- dba sBox3
- dba sBox4
- dba sBox5
- dba sBox6
- dba sBox7
- dba sBox8
- dba sBox9
- dba sBox10
- dba sBox11
- dba sBox12
- dba sBox13
- dba sBox14
-; 4a91e
-
-.CopyName: ; 4a91e
- push hl
- ld hl, NAME_LENGTH
- add hl, bc
- ld b, h
- ld c, l
- pop hl
- ret
-; 4a927
-
-FindItemInPCOrBag: ; 4a927
- ld a, [ScriptVar]
- ld [CurItem], a
- ld hl, PCItems
- call CheckItem
- jr c, .found
-
- ld a, [ScriptVar]
- ld [CurItem], a
- ld hl, NumItems
- call CheckItem
- jr c, .found
-
- xor a
- ld [ScriptVar], a
- ret
-
-.found
- ld a, 1
- ld [ScriptVar], a
- ret
-; 4a94e
-
-Function4a94e: ; 4a94e
- call FadeToMenu
- ld a, -1
- ld hl, wd002
- ld bc, 3
- call ByteFill
- xor a
- ld [wd018], a
- ld [wd019], a
- ld b, SCGB_PACKPALS
- call GetSGBLayout
- call SetPalettes
- call Function4aa22
- jr c, .asm_4a985
- jr z, .asm_4a9a1
- jr .asm_4a97b
-
-.asm_4a974
- call Function4aa25
- jr c, .asm_4a985
- jr z, .asm_4a9a1
-
-.asm_4a97b
- call Function4ac58
- ld hl, wd019
- res 1, [hl]
- jr .asm_4a974
-
-.asm_4a985
- ld a, [wd018]
- and a
- jr nz, .asm_4a990
- call Function4aba8
- jr c, .asm_4a974
-
-.asm_4a990
- call CloseSubmenu
- ld hl, wd002
- ld a, -1
- ld bc, 3
- call ByteFill
- scf
- jr .asm_4a9af
-
-.asm_4a9a1
- call Function4a9c3
- jr c, .asm_4a9b0
- call Function4a9d7
- jr c, .asm_4a974
- call CloseSubmenu
- and a
-
-.asm_4a9af
- ret
-
-.asm_4a9b0
- ld de, SFX_WRONG
- call PlaySFX
- ld hl, UnknownText_0x4a9be
- call PrintText
- jr .asm_4a974
-; 4a9be
-
-UnknownText_0x4a9be: ; 0x4a9be
- ; Pick three #MON for battle.
- text_jump UnknownText_0x1c51d7
- db "@"
-; 0x4a9c3
-
-Function4a9c3: ; 4a9c3
- ld hl, wd002
- ld a, $ff
- cp [hl]
- jr z, .asm_4a9d5
- inc hl
- cp [hl]
- jr z, .asm_4a9d5
- inc hl
- cp [hl]
- jr z, .asm_4a9d5
- and a
- ret
-
-.asm_4a9d5
- scf
- ret
-; 4a9d7
-
-Function4a9d7: ; 4a9d7
- ld a, [wd002]
- ld hl, PartyMonNicknames
- call GetNick
- ld h, d
- ld l, e
- ld de, EndFlypoint
- ld bc, 6
- call CopyBytes
- ld a, [wd003]
- ld hl, PartyMonNicknames
- call GetNick
- ld h, d
- ld l, e
- ld de, wd00c
- ld bc, 6
- call CopyBytes
- ld a, [wd004]
- ld hl, PartyMonNicknames
- call GetNick
- ld h, d
- ld l, e
- ld de, wd012
- ld bc, 6
- call CopyBytes
- ld hl, UnknownText_0x4aa1d
- call PrintText
- call YesNoBox
- ret
-; 4aa1d
-
-UnknownText_0x4aa1d: ; 0x4aa1d
- ; , @ and @ . Use these three?
- text_jump UnknownText_0x1c51f4
- db "@"
-; 0x4aa22
-
-Function4aa22: ; 4aa22
- call ClearBGPalettes
-
-Function4aa25: ; 4aa25
- callba LoadPartyMenuGFX
- callba InitPartyMenuWithCancel
- call Function4aad3
-
-Function4aa34: ; 4aa34
- ld a, PARTYMENUACTION_MOBILE
- ld [PartyMenuActionText], a
- callba WritePartyMenuTilemap
- xor a
- ld [PartyMenuActionText], a
- callba PrintPartyMenuText
- call Function4aab6
- call WaitBGMap
- call SetPalettes
- call DelayFrame
- call Function4ab1a
- jr z, .asm_4aa66
- push af
- call Function4aafb
- jr c, .asm_4aa67
- call Function4ab06
- jr c, .asm_4aa67
- pop af
-
-.asm_4aa66
- ret
-
-.asm_4aa67
- ld hl, wd019
- set 1, [hl]
- pop af
- ret
-; 4aa6e
-
-Function4aa6e: ; 4aa6e
- pop af
- ld de, SFX_WRONG
- call PlaySFX
- call WaitSFX
- jr Function4aa34
-; 4aa7a
-
-Function4aa7a: ; 4aa7a
- ld hl, wd002
- ld d, $3
-.loop
- ld e, PARTY_LENGTH
- ld a, [hli]
- push de
- push hl
- cp -1
- jr z, .done
- ld hl, wSpriteAnimationStructs
- inc a
- ld d, a
-.inner_loop
- ld a, [hl]
- and a
- jr z, .next
- cp d
- jr z, .same_as_d
- jr .next
-
- ld a, $3
- jr .proceed
-
-.same_as_d
- ld a, $2
-
-.proceed
- push hl
- ld c, l
- ld b, h
- ld hl, $2
- add hl, bc
- ld [hl], a
- pop hl
-
-.next
- ld bc, $10
- add hl, bc
- dec e
- jr nz, .inner_loop
- pop hl
- pop de
- dec d
- jr nz, .loop
- jr .finished
-
-.done
- pop hl
- pop de
-
-.finished
- ret
-; 4aab6
-
-Function4aab6: ; 4aab6
- ld hl, wd002
- ld d, $3
-.loop
- ld a, [hli]
- cp -1
- jr z, .done
- push de
- push hl
- hlcoord 0, 1
- ld bc, $28
- call AddNTimes
- ld [hl], $ec
- pop hl
- pop de
- dec d
- jr nz, .loop
-
-.done
- ret
-; 4aad3
-
-Function4aad3: ; 4aad3
- ld hl, PartyCount
- ld a, [hli]
- and a
- ret z ; Nothing in your party
-
- ld c, a
- xor a
- ld [hObjectStructIndexBuffer], a
-.loop
- push bc
- push hl
- ld e, 0
- callba LoadMenuMonIcon
- ld a, [hObjectStructIndexBuffer]
- inc a
- ld [hObjectStructIndexBuffer], a
- pop hl
- pop bc
- dec c
- jr nz, .loop
-
- call Function4aa7a
- callba PlaySpriteAnimations
- ret
-; 4aafb
-
-Function4aafb: ; 4aafb
- ld a, [CurPartySpecies]
- cp EGG
- jr z, .egg
- and a
- ret
-
-.egg
- scf
- ret
-; 4ab06
-
-Function4ab06: ; 4ab06
- ld a, [CurPartyMon]
- ld bc, PARTYMON_STRUCT_LENGTH
- ld hl, PartyMon1HP
- call AddNTimes
- ld a, [hli]
- ld b, a
- ld a, [hl]
- or b
- jr nz, .NotFainted
- scf
-
-.NotFainted:
- ret
-; 4ab1a
-
-Function4ab1a: ; 4ab1a
-.asm_4ab1a
- ld a, $fb
- ld [wMenuJoypadFilter], a
- ld a, $26
- ld [w2DMenuCursorOffsets], a
- ld a, $2
- ld [w2DMenuNumCols], a
- call Function4adf7
- call StaticMenuJoypad
- call Function4abc3
- jr c, .asm_4ab1a
- push af
- call Function4ab99
- call nc, PlaceHollowCursor
- pop af
- bit 1, a
- jr nz, .asm_4ab6d
- ld a, [PartyCount]
- inc a
- ld b, a
- ld a, [wMenuCursorY]
- ld [wPartyMenuCursor], a
- cp b
- jr z, .asm_4ab7e
- ld a, [wMenuCursorY]
- dec a
- ld [CurPartyMon], a
- ld c, a
- ld b, $0
- ld hl, PartySpecies
- add hl, bc
- ld a, [hl]
- ld [CurPartySpecies], a
- ld de, SFX_READ_TEXT_2
- call PlaySFX
- call WaitSFX
- ld a, $1
- and a
- ret
-
-.asm_4ab6d
- ld a, [wMenuCursorY]
- ld [wPartyMenuCursor], a
-.asm_4ab73
- ld de, SFX_READ_TEXT_2
- call PlaySFX
- call WaitSFX
- scf
- ret
-
-.asm_4ab7e
- ld a, $1
- ld [wd018], a
- ld a, [wMenuCursorX]
- cp $2
- jr z, .asm_4ab73
- ld de, SFX_READ_TEXT_2
- call PlaySFX
- call WaitSFX
- xor a
- ld [wd018], a
- and a
- ret
-; 4ab99
-
-Function4ab99: ; 4ab99
- bit 1, a
- jr z, .asm_4aba6
- ld a, [wd002]
- cp $ff
- jr z, .asm_4aba6
- scf
- ret
-
-.asm_4aba6
- and a
- ret
-; 4aba8
-
-Function4aba8: ; 4aba8
- ld hl, wd004
- ld a, [hl]
- cp $ff
- jr nz, .asm_4abbe
- dec hl
- ld a, [hl]
- cp $ff
- jr nz, .asm_4abbe
- dec hl
- ld a, [hl]
- cp $ff
- jr nz, .asm_4abbe
- and a
- ret
-
-.asm_4abbe
- ld a, $ff
- ld [hl], a
- scf
- ret
-; 4abc3
-
-Function4abc3: ; 4abc3
- bit 3, a
- jr z, .asm_4abd5
- ld a, [PartyCount]
- inc a
- ld [wMenuCursorY], a
- ld a, $1
- ld [wMenuCursorX], a
- jr .asm_4ac29
-
-.asm_4abd5
- bit 6, a
- jr z, .asm_4abeb
- ld a, [wMenuCursorY]
- ld [wMenuCursorY], a
- and a
- jr nz, .asm_4ac29
- ld a, [PartyCount]
- inc a
- ld [wMenuCursorY], a
- jr .asm_4ac29
-
-.asm_4abeb
- bit 7, a
- jr z, .asm_4ac08
- ld a, [wMenuCursorY]
- ld [wMenuCursorY], a
- ld a, [PartyCount]
- inc a
- inc a
- ld b, a
- ld a, [wMenuCursorY]
- cp b
- jr nz, .asm_4ac29
- ld a, $1
- ld [wMenuCursorY], a
- jr .asm_4ac29
-
-.asm_4ac08
- bit 4, a
- jr nz, .asm_4ac10
- bit 5, a
- jr z, .asm_4ac56
-
-.asm_4ac10
- ld a, [wMenuCursorY]
- ld b, a
- ld a, [PartyCount]
- inc a
- cp b
- jr nz, .asm_4ac29
- ld a, [wMenuCursorX]
- cp $1
- jr z, .asm_4ac26
- ld a, $1
- jr .asm_4ac29
-
-.asm_4ac26
- ld [wMenuCursorX], a
-
-.asm_4ac29
- hlcoord 0, 1
- lb bc, 13, 1
- call ClearBox
- call Function4aab6
- ld a, [PartyCount]
- hlcoord 6, 1
-.asm_4ac3b
- ld bc, $28
- add hl, bc
- dec a
- jr nz, .asm_4ac3b
- ld [hl], $7f
- ld a, [wMenuCursorY]
- ld b, a
- ld a, [PartyCount]
- inc a
- cp b
- jr z, .asm_4ac54
- ld a, $1
- ld [wMenuCursorX], a
-
-.asm_4ac54
- scf
- ret
-
-.asm_4ac56
- and a
- ret
-; 4ac58
-
-Function4ac58: ; 4ac58
- lb bc, 2, 18
- hlcoord 1, 15
- call ClearBox
- callba FreezeMonIcons
- ld hl, MenuDataHeader_0x4aca2
- call LoadMenuDataHeader
- ld hl, wd019
- bit 1, [hl]
- jr z, .asm_4ac89
- hlcoord 11, 13
- ld b, $3
- ld c, $7
- call TextBox
- hlcoord 13, 14
- ld de, String_4ada7
- call PlaceString
- jr .asm_4ac96
-
-.asm_4ac89
- hlcoord 11, 9
- ld b, $7
- ld c, $7
- call TextBox
- call Function4ad68
-
-.asm_4ac96
- ld a, $1
- ld [hBGMapMode], a
- call Function4acaa
- call ExitMenu
- and a
- ret
-; 4aca2
-
-MenuDataHeader_0x4aca2: ; 0x4aca2
- db $40 ; flags
- db 09, 11 ; start coords
- db 17, 19 ; end coords
- dw NULL
- db 1 ; default option
-; 0x4acaa
-
-Function4acaa: ; 4acaa
-.asm_4acaa
- ld a, $a0
- ld [wMenuData2Flags], a
- ld a, [wd019]
- bit 1, a
- jr z, .asm_4acc2
- ld a, $2
- ld [wMenuData2Items], a
- ld a, $c
- ld [wMenuBorderTopCoord], a
- jr .asm_4accc
-
-.asm_4acc2
- ld a, $4
- ld [wMenuData2Items], a
- ld a, $8
- ld [wMenuBorderTopCoord], a
-
-.asm_4accc
- ld a, $b
- ld [wMenuBorderLeftCoord], a
- ld a, $1
- ld [wMenuCursorBuffer], a
- call InitVerticalMenuCursor
- ld hl, w2DMenuFlags1
- set 6, [hl]
- call StaticMenuJoypad
- ld de, SFX_READ_TEXT_2
- call PlaySFX
- ld a, [hJoyPressed]
- bit 0, a
- jr nz, .asm_4acf4
- bit 1, a
- jr nz, .asm_4acf3
- jr .asm_4acaa
-
-.asm_4acf3
- ret
-
-.asm_4acf4
- ld a, [wd019]
- bit 1, a
- jr nz, .asm_4ad0e
- ld a, [wMenuCursorY]
- cp $1
- jr z, Function4ad17
- cp $2
- jp z, Function4ad56
- cp $3
- jp z, Function4ad60
- jr .asm_4acf3
-
-.asm_4ad0e
- ld a, [wMenuCursorY]
- cp $1
- jr z, Function4ad56
- jr .asm_4acf3
-
-Function4ad17: ; 4ad17
- call Function4adb2
- jr z, .asm_4ad4a
- ld hl, wd002
- ld a, $ff
- cp [hl]
- jr z, .asm_4ad39
- inc hl
- cp [hl]
- jr z, .asm_4ad39
- inc hl
- cp [hl]
- jr z, .asm_4ad39
- ld de, SFX_WRONG
- call WaitPlaySFX
- ld hl, UnknownText_0x4ad51
- call PrintText
- ret
-
-.asm_4ad39
- ld a, [CurPartyMon]
- ld [hl], a
- call Function4a9c3
- ret c
- ld a, [wd019]
- set 0, a
- ld [wd019], a
- ret
-
-.asm_4ad4a
- ld a, $ff
- ld [hl], a
- call Function4adc2
- ret
-
-UnknownText_0x4ad51: ; 0x4ad51
- ; Only three #MON may enter.
- text_jump UnknownText_0x1c521c
- db "@"
-; 0x4ad56
-
-Function4ad56: ; 4ad56
- callba OpenPartyStats
- call WaitBGMap2
- ret
-; 4ad60
-
-Function4ad60: ; 4ad60
- callba ManagePokemonMoves
- ret
-; 4ad67
-
-Function4ad67: ; 4ad67
- ret
-; 4ad68
-
-Function4ad68: ; 4ad68
- hlcoord 13, 12
- ld de, String_4ad88
- call PlaceString
- call Function4adb2
- jr c, .asm_4ad7e
- hlcoord 13, 10
- ld de, String_4ada0
- jr .asm_4ad84
-
-.asm_4ad7e
- hlcoord 13, 10
- ld de, String_4ad9a
-
-.asm_4ad84
- call PlaceString
- ret
-; 4ad88
-
-String_4ad88: ; 4ad88
- db "つよさをみる"
- next "つかえるわざ"
- next "もどる@"
-; 4ad9a
-
-String_4ad9a: ; 4ad9a
- db "さんかする@"
-; 4ada0
-
-String_4ada0: ; 4ada0
- db "さんかしない@"
-; 4ada7
-
-String_4ada7: ; 4ada7
- db "つよさをみる"
- next "もどる@" ; BACK
-; 4adb2
-
-Function4adb2: ; 4adb2
- ld hl, wd002
- ld a, [CurPartyMon]
- cp [hl]
- ret z
- inc hl
- cp [hl]
- ret z
- inc hl
- cp [hl]
- ret z
- scf
- ret
-; 4adc2
-
-Function4adc2: ; 4adc2
- ld a, [wd002]
- cp $ff
- jr nz, .skip
- ld a, [wd003]
- cp $ff
- jr nz, .skip2
- ld a, [wd004]
- ld [wd002], a
- ld a, $ff
- ld [wd004], a
- jr .skip
-
-.skip2
- ld [wd002], a
- ld a, $ff
- ld [wd003], a
-
-.skip
- ld a, [wd003]
- cp $ff
- ret nz
- ld b, a
- ld a, [wd004]
- ld [wd003], a
- ld a, b
- ld [wd004], a
- ret
-; 4adf7
-
-Function4adf7: ; 4adf7
- ld a, [wd019]
- bit 0, a
- ret z
- ld a, [PartyCount]
- inc a
- ld [wMenuCursorY], a
- ld a, $1
- ld [wMenuCursorX], a
- ld a, [wd019]
- res 0, a
- ld [wd019], a
- ret
-; 4ae12
diff --git a/misc/mobile_22.asm b/misc/mobile_22.asm
deleted file mode 100644
index 17b526586..000000000
--- a/misc/mobile_22.asm
+++ /dev/null
@@ -1,4448 +0,0 @@
-
-String_8911c: ; 8911c
- db "でんわばんごうが ただしく" ; Phone number is not
- next "はいって いません!@" ; entered correctly!
-; 89135
-
-String_89135: ; 89135
- db "データが かわって いますが" ; The data has changed.
- next "かきかえないで やめますか?@" ; Quit anyway?
-; 89153
-
-String_89153: ; 89153
- db "メッセージは ありません@" ; No message
-; 89160
-
-OpenSRAMBank4: ; 89160
- push af
- ld a, $4
- call GetSRAMBank
- pop af
- ret
-; 89168
-
-
-Function89168: ; 89168 (22:5168)
- ld hl, GameTimerPause
- set 7, [hl]
- ret
-
-Function8916e: ; 8916e (22:516e)
- ld hl, GameTimerPause
- res 7, [hl]
- ret
-
-Function89174: ; 89174 (22:5174)
- ld hl, GameTimerPause
- bit 7, [hl]
- ret
-
-Function8917a: ; 8917a (22:517a)
- ld hl, wd002
- ld bc, $32
- xor a
- call ByteFill
- ret
-
-Function89185: ; 89185 (22:5185)
-; strcmp(hl, de, c)
-; Compares c bytes starting at de and hl and incrementing together until a mismatch is found.
-; Preserves hl and de.
- push de
- push hl
-.loop
- ld a, [de]
- inc de
- cp [hl]
- jr nz, .done
- inc hl
- dec c
- jr nz, .loop
-.done
- pop hl
- pop de
- ret
-
-Function89193: ; 89193
-; copy(hl, de, 4)
-; Copies c bytes from hl to de.
-; Preserves hl and de.
- push de
- push hl
-.loop
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .loop
- pop hl
- pop de
- ret
-; 8919e
-
-
-Function8919e: ; 8919e (22:519e)
-; Searches for the c'th string starting at de. Returns the pointer in de.
- ld a, c
- and a
- ret z
-.loop
- ld a, [de]
- inc de
- cp "@"
- jr nz, .loop
- dec c
- jr nz, .loop
- ret
-
-Function891ab: ; 891ab
- call Mobile22_SetBGMapMode1
- callba ReloadMapPart
- call Mobile22_SetBGMapMode0
- ret
-; 891b8
-
-Function891b8: ; 891b8
- call Mobile22_SetBGMapMode0
- hlcoord 0, 0
- ld a, " "
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- call ByteFill
- call DelayFrame
- ret
-; 891ca
-
-
-Function891ca: ; 891ca (22:51ca)
- push bc
- call Function891b8
- call WaitBGMap
- pop bc
- ret
-
-Function891d3: ; 891d3 (22:51d3)
- push bc
- call Function891ca
- ld c, $10
- call DelayFrames
- pop bc
- ret
-
-Function891de: ; 891de
- call Mobile22_SetBGMapMode0
- call ClearPalettes
- hlcoord 0, 0, AttrMap
- ld a, $7
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- call ByteFill
- hlcoord 0, 0
- ld a, " "
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- call ByteFill
- call Function891ab
- ret
-; 891fe
-
-Function891fe: ; 891fe
- push bc
- call Function891de
- ld c, $10
- call DelayFrames
- pop bc
- ret
-; 89209
-
-Function89209: ; 89209
- ld a, 1
- ld [wSpriteUpdatesEnabled], a
- ret
-; 8920f
-
-Function8920f: ; 8920f
- ld a, 0
- ld [wSpriteUpdatesEnabled], a
- ret
-; 89215
-
-Function89215: ; 89215
- push hl
- push bc
- ld bc, AttrMap - TileMap
- add hl, bc
- ld [hl], a
- pop bc
- pop hl
- ret
-; 8921f
-
-
-Function8921f: ; 8921f (22:521f)
- push de
- ld de, SCREEN_WIDTH
- add hl, de
- inc hl
- ld a, $7f
-.loop
- push bc
- push hl
-.asm_89229
- ld [hli], a
- dec c
- jr nz, .asm_89229
- pop hl
- add hl, de
- pop bc
- dec b
- jr nz, .loop
- pop de
- ret
-
-Mobile22_ButtonSound: ; 89235 (22:5235)
- call JoyWaitAorB
- call PlayClickSFX
- ret
-
-Mobile22_SetBGMapMode0: ; 8923c
- xor a
- ld [hBGMapMode], a
- ret
-; 89240
-
-Mobile22_SetBGMapMode1: ; 89240
- ld a, $1
- ld [hBGMapMode], a
- ret
-; 89245
-
-
-Function89245: ; 89245 (22:5245)
- callba TryLoadSaveFile
- ret c
- callba _LoadData
- and a
- ret
-
-Function89254: ; 89254 (22:5254)
- ld bc, $d07
- jr Function89261
-
-Function89259: ; 89259
- ld bc, $0e07
- jr Function89261
-
-Function8925e: ; 8925e
- ld bc, $0e0c
-
-Function89261: ; 89261
- push af
- push bc
- ld hl, MenuDataHeader_0x892a3
- call CopyMenuDataHeader
- pop bc
- ld hl, wMenuBorderTopCoord
- ld a, c
- ld [hli], a
- ld a, b
- ld [hli], a
- ld a, c
- add $4
- ld [hli], a
- ld a, b
- add $5
- ld [hl], a
- pop af
- ld [wMenuCursorBuffer], a
- call PushWindow
- call Mobile22_SetBGMapMode0
- call Function89209
- call VerticalMenu
- push af
- ld c, $a
- call DelayFrames
- call CloseWindow
- call Function8920f
- pop af
- jr c, .done
- ld a, [wMenuCursorY]
- cp $2
- jr z, .done
- and a
- ret
-
-.done
- scf
- ret
-; 892a3
-
-MenuDataHeader_0x892a3: ; 0x892a3
- db $40 ; flags
- db 05, 10 ; start coords
- db 09, 15 ; end coords
- dw MenuData2_0x892ab
- db 1 ; default option
-; 0x892ab
-
-MenuData2_0x892ab: ; 0x892ab
- db $c0 ; flags
- db 2 ; items
- db "はい@"
- db "いいえ@"
-; 0x892b4
-
-Function892b4: ; 892b4 (22:52b4)
- call Function8931b
-
-Function892b7: ; 892b7
- ld d, b
- ld e, c
- ld hl, 0
- add hl, bc
- ld a, "@"
- ld bc, 6
- call ByteFill
- ld b, d
- ld c, e
- ld hl, 6
- add hl, bc
- ld a, "@"
- ld bc, 6
- call ByteFill
- ld b, d
- ld c, e
- ld hl, 12
- add hl, bc
- xor a
- ld [hli], a
- ld [hl], a
- ld hl, 14
- add hl, bc
- ld [hli], a
- ld [hl], a
- ld hl, 16
- add hl, bc
- ld [hl], a
- ld hl, 17
- add hl, bc
- ld a, -1
- ld bc, 8
- call ByteFill
- ld b, d
- ld c, e
- ld e, 6
- ld hl, 25
- add hl, bc
-.loop
- ld a, -1
- ld [hli], a
- ld a, -1
- ld [hli], a
- dec e
- jr nz, .loop
- ret
-; 89305
-
-
-Function89305: ; 89305 (22:5305)
- xor a
- ld [MenuSelection], a
- ld c, 40
-.loop
- ld a, [MenuSelection]
- inc a
- ld [MenuSelection], a
- push bc
- call Function892b4
- pop bc
- dec c
- jr nz, .loop
- ret
-
-Function8931b: ; 8931b
- push hl
- ld hl, $a03b ; 4:a03b
- ld a, [MenuSelection]
- dec a
- ld bc, 37
- call AddNTimes
- ld b, h
- ld c, l
- pop hl
- ret
-; 8932d
-
-Function8932d: ; 8932d
- ld hl, 0
- add hl, bc
-
-Function89331: ; 89331
-; Scans up to 5 characters starting at hl, looking for a nonspace character up to the next terminator.
-; Sets carry if it does not find a nonspace character.
-; Returns the location of the following character in hl.
- push bc
- ld c, 5
-.loop
- ld a, [hli]
- cp "@"
- jr z, .terminator
- cp " "
- jr nz, .nonspace
- dec c
- jr nz, .loop
-
-.terminator
- scf
- jr .done
-
-.nonspace
- and a
-
-.done
- pop bc
- ret
-; 89346
-
-
-Function89346: ; 89346 (22:5346)
- ld h, b
- ld l, c
- jr _incave
-
-Function8934a: ; 8934a
- ld hl, 6
- add hl, bc
-_incave:
-; Scans up to 5 characters starting at hl, looking for a nonspace character up to the next terminator. Sets carry if it does not find a nonspace character. Returns the location of the following character in hl.
- push bc
- ld c, 5
-.loop
- ld a, [hli]
- cp "@"
- jr z, .terminator
- cp " "
- jr nz, .nonspace
- dec c
- jr nz, .loop
-
-.terminator
- scf
- jr .done
-
-.nonspace
- and a
-
-.done
- pop bc
- ret
-; 89363
-
-Function89363: ; 89363
-; Scans six byte pairs starting at bc to find $ff. Sets carry if it does not find a $ff. Returns the location of the byte after the first $ff found in hl.
- ld h, b
- ld l, c
- jr ._incave
-
- ld hl, 25
- add hl, bc
-
-._incave
- push de
- ld e, 6
-.loop
- ld a, [hli]
- cp -1
- jr nz, .ok
- ld a, [hli]
- cp -1
- jr nz, .ok
- dec e
- jr nz, .loop
- scf
- jr .done
-
-.ok
- and a
-
-.done
- pop de
- ret
-; 89381
-
-Function89381: ; 89381
- push bc
- push de
- call Function89b45
- jr c, .ok
- push hl
- ld a, -1
- ld bc, 8
- call ByteFill
- pop hl
-
-.ok
- pop de
- ld c, 8
- call Function89193
- pop bc
- ret
-; 8939a
-
-Function8939a: ; 8939a
- push bc
- ld hl, 0
- add hl, bc
- ld de, wd002
- ld c, 6
- call Function89193
- pop bc
- ld hl, 17
- add hl, bc
- ld de, wd008
- call Function89381
- ret
-; 893b3
-
-
-Function893b3: ; 893b3 (22:53b3)
- call DisableLCD
- call ClearSprites
- call LoadStandardFont
- call LoadFontsExtra
- call Function893ef
- call Function8942b
- call Function89455
- call EnableLCD
- ret
-
-Function893cc: ; 893cc
- call DisableLCD
- call ClearSprites
- call LoadStandardFont
- call LoadFontsExtra
- call Function893ef
- call Function89464
- call EnableLCD
- ret
-; 893e2
-
-
-Function893e2: ; 893e2 (22:53e2)
- call Function89b1e
- call Function893b3
- call Function8a5b6
- call Function8949c
- ret
-
-Function893ef: ; 893ef
- ld de, VTiles0
- ld hl, GFX_8940b
- ld bc, $20
- ld a, BANK(GFX_8940b)
- call FarCopyBytes
- ret
-; 893fe
-
-Function893fe: ; 893fe
- call DisableLCD
- call Function893ef
- call EnableLCD
- call DelayFrame
- ret
-; 8940b
-
-GFX_8940b: ; 8940b
-INCBIN "gfx/unknown/08940b.2bpp"
-; 8942b
-
-Function8942b: ; 8942b (22:542b)
- ld de, VTiles0 tile $02
- ld hl, MobileAdapterGFX + $7d0
- ld bc, $80
- ld a, BANK(MobileAdapterGFX)
- call FarCopyBytes
- ld de, VTiles0 tile $0a
- ld hl, MobileAdapterGFX + $c60
- ld bc, $40
- ld a, BANK(MobileAdapterGFX)
- call FarCopyBytes
- ret
-
-Function89448: ; 89448 (22:5448)
-; Clears the Sprites array
- push af
- ld hl, Sprites
- ld d, $10 * 6
- xor a
-.loop
- ld [hli], a
- dec d
- jr nz, .loop
- pop af
- ret
-
-Function89455: ; 89455 (22:5455)
- ld hl, MobileAdapterGFX + $7d0
- ld de, VTiles2 tile $0c
- ld bc, $490
- ld a, BANK(MobileAdapterGFX)
- call FarCopyBytes
- ret
-
-Function89464: ; 89464
- ld hl, MobileAdapterGFX
- ld de, VTiles2
- ld bc, $200
- ld a, BANK(MobileAdapterGFX)
- call FarCopyBytes
- ld hl, MobileAdapterGFX + $660
- ld de, VTiles2 tile $20
- ld bc, $170
- ld a, BANK(MobileAdapterGFX)
- call FarCopyBytes
- ret
-; 89481
-
-Function89481: ; 89481
- ld d, 2
- call Function8934a
- ret c
- ld d, 0
- ld hl, 16
- add hl, bc
- bit 0, [hl]
- ret z
- inc d
- ret
-; 89492
-
-
-Function89492: ; 89492 (22:5492)
- ld d, 0
- ld a, [PlayerGender]
- bit 0, a
- ret z
- inc d
- ret
-
-Function8949c: ; 8949c
- ld a, [rSVBK]
- push af
- ld a, 5
- ld [rSVBK], a
- ld hl, Palette_894b3
- ld de, UnknBGPals + 8 * 7
- ld bc, 8
- call CopyBytes
- pop af
- ld [rSVBK], a
- ret
-; 894b3
-
-Palette_894b3: ; 894b3
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 00, 00, 00
-; 894bb
-
-Function894bb: ; 894bb
- call Function894dc
- push bc
- call Function8956f
- call Function8949c
- call Function8a60d
- pop bc
- ret
-; 894ca
-
-
-Function894ca: ; 894ca (22:54ca)
- push bc
- call Function894dc
- call Function895c7
- call Function8949c
- call Function8a60d
- call SetPalettes
- pop bc
- ret
-
-Function894dc: ; 894dc
- push bc
- ld a, [rSVBK]
- push af
- ld a, 5
- ld [rSVBK], a
-
- ld c, d
- ld b, 0
- ld hl, .PalettePointers
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, UnknBGPals
- ld bc, 3 palettes
- call CopyBytes
- ld hl, .Pals345
- ld de, UnknBGPals + 3 palettes
- ld bc, 3 palettes
- call CopyBytes
-
- pop af
- ld [rSVBK], a
- pop bc
- ret
-; 89509
-
-.PalettePointers: ; 89509
- dw .Pals012a
- dw .Pals012b
- dw .Pals012c
-; 8950f
-
-.Pals012a: ; 8950f
- RGB 31, 31, 31
- RGB 10, 17, 13
- RGB 10, 08, 22
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 16, 20, 31
- RGB 10, 08, 22
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 16, 20, 31
- RGB 10, 17, 13
- RGB 00, 00, 00
-
-.Pals012b: ; 89527
- RGB 31, 31, 31
- RGB 30, 22, 11
- RGB 31, 08, 15
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 16, 20, 31
- RGB 31, 08, 15
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 16, 20, 31
- RGB 30, 22, 11
- RGB 00, 00, 00
-
-.Pals012c: ; 8953f
- RGB 31, 31, 31
- RGB 15, 20, 26
- RGB 25, 07, 20
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 16, 20, 31
- RGB 25, 07, 20
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 16, 20, 31
- RGB 15, 20, 26
- RGB 00, 00, 00
-
-.Pals345: ; 89557
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 13, 00
- RGB 14, 08, 00
-
- RGB 31, 31, 31
- RGB 16, 16, 31
- RGB 00, 00, 31
- RGB 00, 00, 00
-
- RGB 19, 31, 11
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-; 8956f
-
-Function8956f: ; 8956f
- push bc
- ld hl, 16
- add hl, bc
- ld d, h
- ld e, l
- ld hl, $000c
- add hl, bc
- ld b, h
- ld c, l
- callba GetMobileOTTrainerClass
- ld a, c
- ld [TrainerClass], a
- ld a, [rSVBK]
- push af
- ld a, 5
- ld [rSVBK], a
- ld hl, wd030
- ld a, -1
- ld [hli], a
- ld a, " "
- ld [hl], a
- pop af
- ld [rSVBK], a
- ld a, [TrainerClass]
- ld h, 0
- ld l, a
- add hl, hl
- add hl, hl
- ld de, TrainerPalettes
- add hl, de
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld de, wd032
- ld c, 4
-.loop
- ld a, BANK(TrainerPalettes)
- call GetFarByte
- ld [de], a
- inc de
- inc hl
- dec c
- jr nz, .loop
- ld hl, wd036
- xor a
- ld [hli], a
- ld [hl], a
- pop af
- ld [rSVBK], a
- pop bc
- ret
-; 895c7
-
-
-Function895c7: ; 895c7 (22:55c7)
- ld a, [rSVBK]
- push af
- ld a, 5
- ld [rSVBK], a
- ld hl, Palette_895de
- ld de, wd030
- ld bc, 8
- call CopyBytes
- pop af
- ld [rSVBK], a
- ret
-; 895de (22:55de)
-
-Palette_895de: ; 895de
- RGB 31, 31, 31
- RGB 07, 07, 06
- RGB 07, 07, 06
- RGB 00, 00, 00
-; 895e6
-
-Function895e6: ; 895e6
- ld a, 7
- hlcoord 0, 0, AttrMap
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- call ByteFill
- ret
-; 895f2
-
-Function895f2: ; 895f2
- push bc
- xor a
- hlcoord 0, 0, AttrMap
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- call ByteFill
- call Function89605
- call Function89655
- pop bc
- ret
-; 89605
-
-Function89605: ; 89605
- hlcoord 19, 2, AttrMap
- ld a, 1
- ld de, SCREEN_WIDTH
- ld c, 14
-.loop
- ld [hl], a
- dec c
- jr z, .done
- add hl, de
- inc a
- ld [hl], a
- dec a
- add hl, de
- dec c
- jr nz, .loop
-
-.done
- hlcoord 0, 16, AttrMap
- ld c, 10
- ld a, 2
-.loop2
- ld [hli], a
- dec a
- ld [hli], a
- inc a
- dec c
- jr nz, .loop2
- hlcoord 1, 11, AttrMap
- ld a, 4
- ld bc, 4
- call ByteFill
- ld a, 5
- ld bc, 14
- call ByteFill
- ret
-; 8963d
-
-Function8963d: ; 8963d
- hlcoord 12, 3, AttrMap
- ld a, 6
- ld de, SCREEN_WIDTH
- lb bc, 7, 7
-.loop
- push hl
- ld c, 7
-.next
- ld [hli], a
- dec c
- jr nz, .next
- pop hl
- add hl, de
- dec b
- jr nz, .loop
- ret
-; 89655
-
-Function89655: ; 89655
- hlcoord 1, 12, AttrMap
- ld de, SCREEN_WIDTH
- ld a, 5
- ld b, 4
-.loop
- ld c, 18
- push hl
-.next
- ld [hli], a
- dec c
- jr nz, .next
- pop hl
- add hl, de
- dec b
- jr nz, .loop
- ret
-; 8966c
-
-Function8966c: ; 8966c
- push bc
- call Function89688
- hlcoord 4, 0
- ld c, 8
- call Function896f5
- pop bc
- ret
-; 8967a
-
-
-Function8967a: ; 8967a (22:567a)
- push bc
- call Function89688
- hlcoord 2, 0
- ld c, 12
- call Function896f5
- pop bc
- ret
-
-Function89688: ; 89688
- hlcoord 0, 0
- ld a, 1
- ld e, SCREEN_WIDTH
- call Function896e1
- ld a, 2
- ld e, SCREEN_WIDTH
- call Function896eb
- ld a, 3
- ld [hli], a
- ld a, 4
- ld e, SCREEN_HEIGHT
- call Function896e1
- ld a, 6
- ld [hli], a
- push bc
- ld c, 13
-.loop
- call Function896cb
- dec c
- jr z, .done
- call Function896d6
- dec c
- jr nz, .loop
-
-.done
- pop bc
- ld a, 25
- ld [hli], a
- ld a, 26
- ld e, SCREEN_HEIGHT
- call Function896e1
- ld a, 28
- ld [hli], a
- ld a, 2
- ld e, SCREEN_WIDTH
- call Function896eb
- ret
-; 896cb
-
-Function896cb: ; 896cb
- ld de, SCREEN_WIDTH - 1
- ld a, 7
- ld [hl], a
- add hl, de
- ld a, 9
- ld [hli], a
- ret
-; 896d6
-
-Function896d6: ; 896d6
- ld de, SCREEN_WIDTH - 1
- ld a, 10
- ld [hl], a
- add hl, de
- ld a, 11
- ld [hli], a
- ret
-; 896e1
-
-Function896e1: ; 896e1
-.loop
- ld [hli], a
- inc a
- dec e
- ret z
- ld [hli], a
- dec a
- dec e
- jr nz, .loop
- ret
-; 896eb
-
-Function896eb: ; 896eb
-.loop
- ld [hli], a
- dec a
- dec e
- ret z
- ld [hli], a
- inc a
- dec e
- jr nz, .loop
- ret
-; 896f5
-
-Function896f5: ; 896f5
- call Function8971f
- call Function89736
- inc hl
- inc hl
- ld b, 2
-
-ClearScreenArea: ; 0x896ff
-; clears an area of the screen
-; INPUT:
-; hl = address of upper left corner of the area
-; b = height
-; c = width
-
- ld a, " " ; blank tile
- ld de, 20 ; screen width
-.loop
- push bc
- push hl
-.innerLoop
- ld [hli], a
- dec c
- jr nz, .innerLoop
- pop hl
- pop bc
- add hl, de
- dec b
- jr nz, .loop
-
- dec hl
- inc c
- inc c
-.asm_89713
- ld a, $36
- ld [hli], a
- dec c
- ret z
- ld a, $18
- ld [hli], a
- dec c
- jr nz, .asm_89713 ; 0x8971c $f5
- ret
-; 0x8971f
-
-Function8971f: ; 8971f
- ld a, $2c
- ld [hli], a
- ld a, $2d
- ld [hld], a
- push hl
- ld de, SCREEN_WIDTH
- add hl, de
- ld a, $31
- ld [hli], a
- ld a, $32
- ld [hld], a
- add hl, de
- ld a, $35
- ld [hl], a
- pop hl
- ret
-; 89736
-
-Function89736: ; 89736
- push hl
- inc hl
- inc hl
- ld e, c
- ld d, $0
- add hl, de
- ld a, $2f
- ld [hli], a
- ld a, $30
- ld [hld], a
- ld de, SCREEN_WIDTH
- add hl, de
- ld a, $33
- ld [hli], a
- ld a, $34
- ld [hl], a
- add hl, de
- ld a, $1f
- ld [hl], a
- pop hl
- ret
-; 89753
-
-Function89753: ; 89753
- ld a, $c
- ld [hl], a
- xor a
- call Function89215
- ret
-; 8975b
-
-Function8975b: ; 8975b
- ld a, $1d
- ld [hli], a
- inc a
- ld [hli], a
- ld a, $d
- ld [hl], a
- dec hl
- dec hl
- ld a, $4
- ld e, $3
-.asm_89769
- call Function89215
- inc hl
- dec e
- jr nz, .asm_89769
- ret
-; 89771
-
-Function89771: ; 89771
- ld a, $12
- ld [hl], a
- ld a, $3
- call Function89215
- ret
-; 8977a
-
-Function8977a: ; 8977a
- ld e, $4
- ld d, $13
-.asm_8977e
- ld a, d
- ld [hl], a
- ld a, $4
- call Function89215
- inc hl
- inc d
- dec e
- jr nz, .asm_8977e
- ld e, $e
-.asm_8978c
- ld a, d
- ld [hl], a
- xor a
- call Function89215
- inc hl
- dec e
- jr nz, .asm_8978c
- ret
-; 89797
-
-Function89797: ; 89797
- push bc
- ld a, $e
- ld [hl], a
- ld bc, SCREEN_WIDTH
- add hl, bc
- ld a, $11
- ld [hli], a
- ld a, $10
- ld c, $8
-.asm_897a6
- ld [hli], a
- dec c
- jr nz, .asm_897a6
- ld a, $f
- ld [hl], a
- pop bc
- ret
-; 897af
-
-Function897af: ; 897af
- push bc
- ld hl, $0010
- add hl, bc
- ld d, h
- ld e, l
- ld hl, $000c
- add hl, bc
- ld b, h
- ld c, l
- callba GetMobileOTTrainerClass
- ld a, c
- ld [TrainerClass], a
- xor a
- ld [CurPartySpecies], a
- ld de, VTiles2 tile $37
- callba GetTrainerPic
- pop bc
- ret
-; 897d5
-
-Function897d5: ; 897d5
- push bc
- call Function8934a
- jr nc, .asm_897f3
- hlcoord 12, 3, AttrMap
- xor a
- ld de, SCREEN_WIDTH
- lb bc, 7, 7
-.asm_897e5
- push hl
- ld c, $7
-.asm_897e8
- ld [hli], a
- dec c
- jr nz, .asm_897e8
- pop hl
- add hl, de
- dec b
- jr nz, .asm_897e5
- pop bc
- ret
-
-.asm_897f3
- ld a, $37
- ld [hGraphicStartTile], a
- hlcoord 12, 3
- lb bc, 7, 7
- predef PlaceGraphic
- call Function8963d
- pop bc
- ret
-; 89807
-
-
-Function89807: ; 89807 (22:5807)
- ld hl, MobileAdapterGFX + $200
- ld a, [PlayerGender]
- bit 0, a
- jr z, .asm_89814
- ld hl, MobileAdapterGFX + $200 + $230
-.asm_89814
- call DisableLCD
- ld de, VTiles2 tile $37
- ld bc, $230
- ld a, BANK(MobileAdapterGFX)
- call FarCopyBytes
- call EnableLCD
- call DelayFrame
- ret
-
-Function89829: ; 89829 (22:5829)
- push bc
- ld bc, $705
- ld de, $14
- ld a, $37
-.asm_89832
- push bc
- push hl
-.asm_89834
- ld [hli], a
- inc a
- dec c
- jr nz, .asm_89834
- pop hl
- add hl, de
- pop bc
- dec b
- jr nz, .asm_89832
- call Function8963d
- pop bc
- ret
-
-Function89844: ; 89844
- call Function89481
- call Function894bb
- call Function897af
- push bc
- call WaitBGMap2
- call SetPalettes
- pop bc
- ret
-; 89856
-
-Function89856: ; 89856
- push bc
- call Function891b8
- pop bc
- call Function895f2
- call Function8966c
- call Function899d3
- call Function898aa
- call Function898be
- call Function898dc
- call Function898f3
- push bc
- ld bc, wd008
- hlcoord 2, 10
- call Function89975
- pop bc
- call Function897d5
- ret
-; 8987f
-
-
-Function8987f: ; 8987f (22:587f)
- call Function891b8
- call Function895f2
- call Function8967a
- call Function899d3
- hlcoord 5, 1
- call Function8999c
- hlcoord 13, 3
- call Function89829
- call Function899b2
- hlcoord 5, 5
- call Function899c9
- ld bc, wd008
- hlcoord 2, 10
- call Function89975
- ret
-
-Function898aa: ; 898aa
- ld a, [MenuSelection]
- and a
- ret z
- push bc
- hlcoord 6, 1
- ld de, MenuSelection
- lb bc, PRINTNUM_LEADINGZEROS | 1, 2
- call PrintNum
- pop bc
- ret
-; 898be
-
-Function898be: ; 898be
- push bc
- ld de, wd002
- ld hl, wd002
- call Function89331
- jr nc, .asm_898cd
- ld de, String_89116
-
-.asm_898cd
- hlcoord 9, 1
- ld a, [MenuSelection]
- and a
- jr nz, .asm_898d7
- dec hl
-
-.asm_898d7
- call PlaceString
- pop bc
- ret
-; 898dc
-
-Function898dc: ; 898dc
- ld hl, $0006
- add hl, bc
- push bc
- ld d, h
- ld e, l
- call Function8934a
- jr nc, .asm_898eb
- ld de, String_89116
-
-.asm_898eb
- hlcoord 6, 4
- call PlaceString
- pop bc
- ret
-; 898f3
-
-Function898f3: ; 898f3
- push bc
- ld hl, $000c
- add hl, bc
- ld d, h
- ld e, l
- call Function8934a
- jr c, .asm_8990a
- hlcoord 5, 5
- lb bc, PRINTNUM_LEADINGZEROS | 2, 5
- call PrintNum
- jr .asm_89913
-
-.asm_8990a
- hlcoord 5, 5
- ld de, String_89116
- call PlaceString
-
-.asm_89913
- pop bc
- ret
-; 89915
-
-Function89915: ; 89915
- push bc
- push hl
- ld de, Unknown_89942
- ld c, $8
-.asm_8991c
- ld a, [de]
- ld [hl], a
- ld a, $4
- call Function89215
- inc hl
- inc de
- dec c
- jr nz, .asm_8991c
- pop hl
- ld b, $4
- ld c, $2b
- ld a, $8
- ld de, Unknown_8994a
-.asm_89932
- push af
- ld a, [de]
- cp [hl]
- jr nz, .asm_8993b
- call Function8994e
- inc de
-
-.asm_8993b
- inc hl
- pop af
- dec a
- jr nz, .asm_89932
- pop bc
- ret
-; 89942
-
-Unknown_89942: ; 89942
- db $24, $25, $26, " ", $27, $28, $29, $2a
-Unknown_8994a: ; 8994a
- db $24, $27, $29, $ff
-; 8994e
-
-Function8994e: ; 8994e
- push hl
- push de
- ld de, SCREEN_WIDTH
- ld a, l
- sub e
- ld l, a
- ld a, h
- sbc d
- ld h, a
- ld a, c
- ld [hl], a
- ld a, b
- call Function89215
- pop de
- pop hl
- ret
-; 89962
-
-Function89962: ; 89962
- push bc
- ld c, $4
- ld b, $20
-.asm_89967
- ld a, b
- ld [hl], a
- ld a, $4
- call Function89215
- inc hl
- inc b
- dec c
- jr nz, .asm_89967
- pop bc
- ret
-; 89975
-
-Function89975: ; 89975
- push bc
- ld e, $8
-.asm_89978
- ld a, [bc]
- ld d, a
- call Function8998b
- swap d
- inc hl
- ld a, d
- call Function8998b
- inc bc
- inc hl
- dec e
- jr nz, .asm_89978
- pop bc
- ret
-; 8998b
-
-Function8998b: ; 8998b
- push bc
- and $f
- cp $a
- jr nc, .asm_89997
- ld c, $f6
- add c
- jr .asm_89999
-
-.asm_89997
- ld a, $7f
-
-.asm_89999
- ld [hl], a
- pop bc
- ret
-; 8999c
-
-
-Function8999c: ; 8999c (22:599c)
- ld de, PlayerName
- call PlaceString
- inc bc
- ld h, b
- ld l, c
- ld de, String_899ac
- call PlaceString
- ret
-; 899ac (22:59ac)
-
-String_899ac: ; 899ac
- db "の めいし@"
-; 899b2
-
-Function899b2: ; 899b2 (22:59b2)
- ld bc, PlayerName
- call Function89346
- jr c, .asm_899bf
- ld de, PlayerName
- jr .asm_899c2
-.asm_899bf
- ld de, String_89116
-.asm_899c2
- hlcoord 6, 4
- call PlaceString
- ret
-
-Function899c9: ; 899c9 (22:59c9)
- ld de, PlayerID
- lb bc, PRINTNUM_LEADINGZEROS | 2, 5
- call PrintNum
- ret
-
-Function899d3: ; 899d3
- hlcoord 1, 4
- call Function89753
- hlcoord 2, 5
- call Function8975b
- hlcoord 1, 9
- call Function89771
- hlcoord 1, 11
- call Function8977a
- hlcoord 1, 5
- call Function89797
- hlcoord 2, 4
- call Function89962
- hlcoord 2, 9
- call Function89915
- ret
-; 899fe
-
-Function899fe: ; 899fe
- push bc
- push hl
- ld hl, $0019
- add hl, bc
- ld b, h
- ld c, l
- pop hl
- call Function89a0c
- pop bc
- ret
-; 89a0c
-
-Function89a0c: ; 89a0c
- push hl
- call Function89363
- pop hl
- jr c, .asm_89a1c
- ld d, h
- ld e, l
- callba Function11c08f
- ret
-
-.asm_89a1c
- ld de, String_89153
- call PlaceString
- ret
-; 89a23
-
-
-Function89a23: ; 89a23 (22:5a23)
- hlcoord 0, 11
- ld b, $4
- ld c, $12
- call Function8921f
- ret
-
-Function89a2e: ; 89a2e (22:5a2e)
- hlcoord 11, 12
- ld b, $2
- ld c, $6
- call TextBox
- hlcoord 13, 13
- ld de, String_89a4e
- call PlaceString
- hlcoord 13, 14
- ld de, String_89a53
- call PlaceString
- call Function89655
- ret
-; 89a4e (22:5a4e)
-
-String_89a4e: ; 89a4e
- db "けってい@"
-; 89a53
-
-String_89a53: ; 89a53
- db "やめる@"
-; 89a57
-
-Function89a57: ; 89a57
- call JoyTextDelay_ForcehJoyDown ; joypad
- bit D_UP_F, c
- jr nz, .d_up
- bit D_DOWN_F, c
- jr nz, .d_down
- bit A_BUTTON_F, c
- jr nz, .a_b_button
- bit B_BUTTON_F, c
- jr nz, .a_b_button
- bit START_F, c
- jr nz, .start_button
- scf
- ret
-
-.a_b_button
- ld a, $1
- and a
- ret
-
-.start_button
- ld a, $2
- and a
- ret
-
-.d_up
- call .MoveCursorUp
- call nc, .PlayPocketSwitchSFX
- ld a, $0
- ret
-
-.d_down
- call .MoveCursorDown
- call nc, .PlayPocketSwitchSFX
- ld a, $0
- ret
-; 89a8a
-
-.PlayPocketSwitchSFX: ; 89a8a
- push af
- ld de, SFX_SWITCH_POCKETS
- call PlaySFX
- pop af
- ret
-; 89a93
-
-.MoveCursorDown: ; 89a93
- ld d, 40
- ld e, 1
- call .ApplyCursorMovement
- ret
-; 89a9b
-
-.MoveCursorUp: ; 89a9b
- ld d, 1
- ld e, -1
- call .ApplyCursorMovement
- ret
-; 89aa3
-
-.ApplyCursorMovement: ; 89aa3
- ld a, [MenuSelection]
- ld c, a
- push bc
-.loop
- ld a, [MenuSelection]
- cp d
- jr z, .equal_to_d
- add e
- jr nz, .not_zero
- inc a
-
-.not_zero
- ld [MenuSelection], a
- call .Function89ac7 ; BCD conversion of data in SRAM?
- jr nc, .loop
- call .Function89ae6 ; split [MenuSelection] into [wd030] + [wd031] where [wd030] <= 5
- pop bc
- and a
- ret
-
-.equal_to_d
- pop bc
- ld a, c
- ld [MenuSelection], a
- scf
- ret
-; 89ac7
-
-.Function89ac7: ; 89ac7
- call OpenSRAMBank4
- call Function8931b
- call .Function89ad4
- call CloseSRAM
- ret
-; 89ad4
-
-.Function89ad4: ; 89ad4
- push de
- call Function8932d ; find a non-space character within 5 bytes of bc
- jr c, .no_nonspace_character
- ld hl, 17
- add hl, bc
- call Function89b45
- jr c, .finish_decode
-
-.no_nonspace_character
- and a
-
-.finish_decode
- pop de
- ret
-; 89ae6
-
-.Function89ae6: ; 89ae6
- ld hl, wd031
- xor a
- ld [hl], a
- ld a, [MenuSelection]
-.loop2
- cp 6
- jr c, .load_and_ret
- sub 5
- ld c, a
- ld a, [hl]
- add 5
- ld [hl], a
- ld a, c
- jr .loop2
-
-.load_and_ret
- ld [wd030], a
- ret
-; 89b00
-
-
-Function89b00: ; 89b00 (22:5b00)
- callba MG_Mobile_Layout_LoadPals
- ret
-; 89b07 (22:5b07)
-
-Function89b07: ; 89b07
- call Mobile22_SetBGMapMode0
- call DelayFrame
- callba Function4a3a7
- ret
-; 89b14
-
-Function89b14: ; 89b14
- call ClearBGPalettes
- call Function89b07
- call Function89b00
- ret
-; 89b1e
-
-Function89b1e: ; 89b1e (22:5b1e)
- callba Function4a485
- call Function89b00
- ret
-
-Function89b28: ; 89b28 (22:5b28)
- call Function891de
- call ClearBGPalettes
- call Function893e2
- call Call_ExitMenu
- call Function891ab
- call SetPalettes
- ret
-
-Function89b3b: ; 89b3b (22:5b3b)
- call Mobile22_SetBGMapMode0
- callba Function48cda
- ret
-
-Function89b45: ; 89b45
- ; some sort of decoder?
- ; BCD?
- push hl
- push bc
- ld c, $10
- ld e, $0
-.loop
- ld a, [hli]
- ld b, a
- and $f
- cp 10
- jr c, .low_nybble_less_than_10
- ld a, c
- cp $b
- jr nc, .clear_carry
- jr .set_carry
-
-.low_nybble_less_than_10
- dec c
- swap b
- inc e
- ld a, b
- and $f
- cp 10
- jr c, .high_nybble_less_than_10
- ld a, c
- cp $b
- jr nc, .clear_carry
- jr .set_carry
-
-.high_nybble_less_than_10
- inc e
- dec c
- jr nz, .loop
- dec e
-
-.set_carry
- scf
- jr .finish
-
-.clear_carry
- and a
-
-.finish
- pop bc
- pop hl
- ret
-; 89b78
-
-
-Function89b78: ; 89b78 (22:5b78)
- push bc
- ld a, [wd010]
- cp $10
- jr c, .asm_89b8c
- ld a, e
- and a
- jr z, .asm_89b89
- ld c, e
-.asm_89b85
- inc hl
- dec c
- jr nz, .asm_89b85
-.asm_89b89
- ld a, $7f
- ld [hl], a
-.asm_89b8c
- ld a, [wd010]
- inc a
- and $1f
- ld [wd010], a
- pop bc
- ret
-
-Function89b97: ; 89b97 (22:5b97)
- call Function89c34
- jr c, .asm_89ba0
- call Function89448
- ret
-.asm_89ba0
- ld a, [wd011]
- ld hl, Unknown_89bd8
- and a
- jr z, .asm_89bae
-.asm_89ba9
- inc hl
- inc hl
- dec a
- jr nz, .asm_89ba9
-.asm_89bae
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, Sprites
-.asm_89bb4
- ld a, [hli]
- cp $ff
- ret z
- ld c, a
- ld b, $0
-.asm_89bbb
- push hl
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- add b
- ld [de], a
- inc de
- ld a, $8
- add b
- ld b, a
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- pop hl
- dec c
- jr nz, .asm_89bbb
- ld b, $0
- ld c, $4
- add hl, bc
- jr .asm_89bb4
-; 89bd8 (22:5bd8)
-
-Unknown_89bd8: ; 89bd8
- dw Unknown_89be0
- dw Unknown_89bf5
- dw Unknown_89c0a
- dw Unknown_89c1f
-; 89be0
-
-Unknown_89be0: ; 89be0
- db $01, $12, $4e, $01, $00
- db $01, $19, $4e, $01, $40
- db $01, $12, $72, $01, $20
- db $01, $19, $72, $01, $60
- db $ff
-
-Unknown_89bf5: ; 89bf5
- db $01, $60, $16, $01, $00
- db $01, $62, $16, $01, $40
- db $01, $60, $92, $01, $20
- db $01, $62, $92, $01, $60
- db $ff
-
-Unknown_89c0a: ; 89c0a
- db $01, $78, $66, $01, $00
- db $01, $78, $66, $01, $40
- db $01, $78, $92, $01, $20
- db $01, $78, $92, $01, $60
- db $ff
-
-Unknown_89c1f: ; 89c1f
- db $01, $80, $66, $01, $00
- db $01, $80, $66, $01, $40
- db $01, $80, $92, $01, $20
- db $01, $80, $92, $01, $60
- db $ff
-; 89c34
-
-Function89c34: ; 89c34 (22:5c34)
- push bc
- ld a, [wd012]
- ld c, a
- inc a
- and $f
- ld [wd012], a
- ld a, c
- cp $8
- pop bc
- ret
-
-Function89c44: ; 89c44 (22:5c44)
- call Function89c34
- jr c, .asm_89c4f
- push de
- call Function89448
- pop de
- ret
-.asm_89c4f
- ld hl, Sprites
- push de
- ld a, b
- ld [hli], a
- ld d, $8
- ld a, e
- and a
- ld a, c
- jr z, .asm_89c60
-.asm_89c5c
- add d
- dec e
- jr nz, .asm_89c5c
-.asm_89c60
- pop de
- ld [hli], a
- ld a, d
- ld [hli], a
- xor a
- ld [hli], a
- ret
-
-Function89c67: ; 89c67 (22:5c67)
-; menu scrolling?
- call JoyTextDelay_ForcehJoyDown ; joypad
- ld b, $0
- bit A_BUTTON_F, c
- jr z, .not_a_button
- ld b, $1
- and a
- ret
-
-.not_a_button
- bit B_BUTTON_F, c
- jr z, .not_b_button
- scf
- ret
-
-.not_b_button
- xor a
- bit D_UP_F, c
- jr z, .not_d_up
- ld a, $1
-.not_d_up
- bit D_DOWN_F, c
- jr z, .not_d_down
- ld a, $2
-.not_d_down
- bit D_LEFT_F, c
- jr z, .not_d_left
- ld a, $3
-.not_d_left
- bit D_RIGHT_F, c
- jr z, .not_d_right
- ld a, $4
-.not_d_right
- and a
- ret z ; no dpad pressed
- dec a
- ld c, a
- ld d, $0
- ld hl, .ScrollData0
- ld a, [wd02f]
- and a
- jr z, .got_data
- ld hl, .ScrollData1
-.got_data
- ld a, [wd011]
- and a
- jr z, .got_row
- ld e, $4
-.add_n_times
- add hl, de
- dec a
- jr nz, .add_n_times
-.got_row
- ld e, c
- add hl, de
- ld a, [hl]
- and a
- ret z
- dec a
- ld [wd011], a
- xor a
- ld [wd012], a
- ret
-; 89cbf (22:5cbf)
-
-.ScrollData0: ; 89cbf
- db 0, 2, 0, 0
- db 1, 3, 0, 0
- db 2, 4, 0, 0
- db 3, 0, 0, 0
-
-.ScrollData1: ; 89ccf
- db 0, 0, 0, 0
- db 0, 3, 0, 0
- db 2, 4, 0, 0
- db 3, 0, 0, 0
-; 89cdf
-
-Function89cdf: ; 89cdf (22:5cdf)
- ld a, $10
- add b
- ld b, a
- ld a, $8
- add c
- ld c, a
- ld e, $2
- ld a, $2
- ld hl, Sprites
-.asm_89cee
- push af
- push bc
- ld d, $4
-.asm_89cf2
- ld a, b
- ld [hli], a
- ld a, c
- ld [hli], a
- ld a, e
- ld [hli], a
- ld a, $1
- ld [hli], a
- ld a, $8
- add c
- ld c, a
- inc e
- dec d
- jr nz, .asm_89cf2
- pop bc
- ld a, $8
- add b
- ld b, a
- pop af
- dec a
- jr nz, .asm_89cee
- ret
-
-Function89d0d: ; 89d0d (22:5d0d)
- call Mobile22_SetBGMapMode0
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
-
- ld c, 8
- ld de, UnknBGPals
-.loop
- push bc
- ld hl, .Palette1
- ld bc, 1 palettes
- call CopyBytes
- pop bc
- dec c
- jr nz, .loop
-
- ld hl, .Palette2
- ld de, UnknBGPals + 2 palettes
- ld bc, 1 palettes
- call CopyBytes
-
- pop af
- ld [rSVBK], a
-
- call SetPalettes
- callba PrintMail_
- call Mobile22_SetBGMapMode1
- ld c, 24
- call DelayFrames
- call RestartMapMusic
- ret
-; 89d4e (22:5d4e)
-
-.Palette1: ; 89d4e
- RGB 31, 31, 31
- RGB 19, 19, 19
- RGB 15, 15, 15
- RGB 00, 00, 00
-; 89d56
-
-.Palette2: ; 89d56
- RGB 31, 31, 31
- RGB 19, 19, 19
- RGB 19, 19, 19
- RGB 00, 00, 00
-; 89d5e
-
-Function89d5e: ; 89d5e (22:5d5e)
- push af
- call CopyMenuDataHeader
- pop af
- ld [wMenuCursorBuffer], a
- call Mobile22_SetBGMapMode0
- call PlaceVerticalMenuItems
- call InitVerticalMenuCursor
- ld hl, w2DMenuFlags1
- set 7, [hl]
- ret
-
-Function89d75: ; 89d75 (22:5d75)
- push hl
- call Mobile22_SetBGMapMode0
- call _hl_
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
- pop hl
- jr asm_89d90
-
-Function89d85: ; 89d85 (22:5d85)
- push hl
- call Mobile22_SetBGMapMode0
- call _hl_
- call CGBOnly_LoadEDTile
- pop hl
-
-asm_89d90: ; 89d90 (22:5d90)
- call Mobile22_SetBGMapMode0
- push hl
- call _hl_
- call Function89dab
- ld a, [wMenuCursorY]
- push af
- call Function891ab
- pop af
- pop hl
- jr c, .asm_89da9
- jr z, asm_89d90
- scf
- ret
-.asm_89da9
- and a
- ret
-
-Function89dab: ; 89dab (22:5dab)
- call Mobile22_SetBGMapMode0
- callba MobileMenuJoypad
- call Mobile22_SetBGMapMode0
- ld a, c
- ld hl, wMenuJoypadFilter
- and [hl]
- ret z
- bit 0, a
- jr nz, .asm_89dc7
- bit 1, a
- jr nz, .asm_89dd9
- xor a
- ret
-.asm_89dc7
- call PlayClickSFX
- ld a, [w2DMenuNumRows]
- ld c, a
- ld a, [wMenuCursorY]
- cp c
- jr z, .asm_89dd9
- call PlaceHollowCursor
- scf
- ret
-.asm_89dd9
- call PlayClickSFX
- ld a, $1
- and a
- ret
-
-Function89de0: ; 89de0 (22:5de0)
- call ClearSprites
- call Function89e0a
- jr c, .asm_89e00
- ld c, $1
-.asm_89dea
- call Function8a31c
- jr z, .asm_89dfd
- ld a, [wMenuCursorY]
- ld c, a
- push bc
- ld hl, Jumptable_89e04
- ld a, e
- dec a
- rst JumpTable
- pop bc
- jr .asm_89dea
-.asm_89dfd
- call Function891fe
-.asm_89e00
- call Function8917a
- ret
-
-Jumptable_89e04: ; 89e04 (22:5e04)
- dw Function8a62c
- dw Function8a999
- dw Function8ab93
-
-
-Function89e0a: ; 89e0a (22:5e0a)
- call OpenSRAMBank4
- call Function8b3b0
- call CloseSRAM
- ld hl, Jumptable_89e18
- rst JumpTable
- ret
-
-Jumptable_89e18: ; 89e18 (22:5e18)
- dw Function89e1e
- dw Function8a116
- dw Function8a2aa
-
-
-Function89e1e: ; 89e1e (22:5e1e)
- call OpenSRAMBank4
- ld bc, $a037 ; 4:a037
- call Function8b36c
- call CloseSRAM
- xor a
- ld [wd02d], a
-
-asm_89e2e: ; 89e2e (22:5e2e)
- ld a, [wd02d]
- ld hl, Jumptable_89e3c
- rst JumpTable
- ret
-
-Function89e36: ; 89e36 (22:5e36)
- ld hl, wd02d
- inc [hl]
- jr asm_89e2e
-
-Jumptable_89e3c: ; 89e3c (22:5e3c)
- dw Function89e6f
- dw Function89fed
- dw Function89ff6
- dw Function8a03d
- dw Function89eb9
- dw Function89efd
- dw Function89fce
- dw Function8a04c
- dw Function8a055
- dw Function8a0e6
- dw Function8a0ec
- dw Function8a0f5
- dw Function89e58
- dw Function89e68
-
-
-Function89e58: ; 89e58 (22:5e58)
- ld a, $1
- call Function8a2fe
- call Function891fe
- call Function893e2
- call Function89168
- and a
- ret
-
-Function89e68: ; 89e68 (22:5e68)
- call Function891fe
- ld a, $1
- scf
- ret
-
-Function89e6f: ; 89e6f (22:5e6f)
- call Function891de
- call Function89245
- call Function89ee1
- call Function89e9a
- hlcoord 7, 4
- call Function8a58d
- ld a, $5
- hlcoord 7, 4, AttrMap
- call Function8a5a3
- ld a, $6
- hlcoord 10, 4, AttrMap
- call Function8a5a3
- call Function891ab
- call SetPalettes
- jp Function89e36
-
-Function89e9a: ; 89e9a (22:5e9a)
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, Palette_89eb1
- ld de, UnknBGPals + 5 palettes
- ld bc, 1 palettes
- call CopyBytes
- pop af
- ld [rSVBK], a
- ret
-; 89eb1 (22:5eb1)
-
-Palette_89eb1: ; 89eb1
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 27, 19, 00
- RGB 00, 00, 00
-; 89eb9
-
-Function89eb9: ; 89eb9 (22:5eb9)
- call Function891fe
- call Function89ee1
- call Function89e9a
- hlcoord 7, 4
- call Function8a58d
- ld a, $5
- hlcoord 7, 4, AttrMap
- call Function8a5a3
- ld a, $6
- hlcoord 10, 4, AttrMap
- call Function8a5a3
- call Function891ab
- call SetPalettes
- jp Function89e36
-
-Function89ee1: ; 89ee1 (22:5ee1)
- call ClearBGPalettes
- call Function893e2
- call Mobile22_SetBGMapMode0
- callba Function4a3a7
- callba MG_Mobile_Layout_CreatePalBoxes
- hlcoord 1, 0
- call Function8a53d
- ret
-
-Function89efd: ; 89efd (22:5efd)
- ld hl, wd012
- ld a, $ff
- ld [hli], a
- xor a
-rept 4
- ld [hli], a
-endr
- ld [hl], a
-.asm_89f09
- ld hl, wd012
- inc [hl]
- ld a, [hli]
- and $3
- jr nz, .asm_89f2e
- ld a, [hl]
- cp $4
- jr nc, .asm_89f2e
- ld b, $32
- inc [hl]
- ld a, [hl]
- dec a
- jr z, .asm_89f26
- ld c, a
-.asm_89f1f
- ld a, $b
- add b
- ld b, a
- dec c
- jr nz, .asm_89f1f
-.asm_89f26
- ld c, $e8
- ld a, [wd013]
- call Function89fa5
-.asm_89f2e
- ld a, [wd013]
- and a
- jr z, .asm_89f58
-.asm_89f34
- call Function89f6a
- ld e, a
- ld a, c
- cp $a8
- jr nc, .asm_89f4d
- cp $46
- jr c, .asm_89f4d
- ld d, $0
- dec e
- ld hl, wd014
- add hl, de
- set 0, [hl]
- inc e
- jr .asm_89f51
-.asm_89f4d
- ld a, $2
- add c
- ld c, a
-.asm_89f51
- ld a, e
- call Function89f77
- dec a
- jr nz, .asm_89f34
-.asm_89f58
- call DelayFrame
- ld hl, wd014
- ld c, $4
-.asm_89f60
- ld a, [hli]
- and a
- jr z, .asm_89f09
- dec c
- jr nz, .asm_89f60
- jp Function89e36
-
-Function89f6a: ; 89f6a (22:5f6a)
- push af
- ld de, $10
- call Function89f9a
- ld a, [hli]
- ld b, a
- ld a, [hl]
- ld c, a
- pop af
- ret
-
-Function89f77: ; 89f77 (22:5f77)
- push af
- ld de, $10
- call Function89f9a
- ld d, $2
-.asm_89f80
- push bc
- ld e, $2
-.asm_89f83
- ld a, b
- ld [hli], a
- ld a, c
- ld [hli], a
- inc hl
- inc hl
- ld a, $8
- add c
- ld c, a
- dec e
- jr nz, .asm_89f83
- pop bc
- ld a, $8
- add b
- ld b, a
- dec d
- jr nz, .asm_89f80
- pop af
- ret
-
-Function89f9a: ; 89f9a (22:5f9a)
- dec a
- ld hl, Sprites
- and a
- ret z
-.asm_89fa0
- add hl, de
- dec a
- jr nz, .asm_89fa0
- ret
-
-Function89fa5: ; 89fa5 (22:5fa5)
- ld de, $10
- call Function89f9a
- ld e, $2
- ld d, $a
-.asm_89faf
- push bc
- ld a, $2
-.asm_89fb2
- push af
- ld a, b
- ld [hli], a
- ld a, c
- ld [hli], a
- ld a, d
- inc d
- ld [hli], a
- ld a, $1
- ld [hli], a
- ld a, $8
- add c
- ld c, a
- pop af
- dec a
- jr nz, .asm_89fb2
- pop bc
- ld a, $8
- add b
- ld b, a
- dec e
- jr nz, .asm_89faf
- ret
-
-Function89fce: ; 89fce (22:5fce)
- call Function8a5b6
- ld a, $5
- hlcoord 7, 4, AttrMap
- call Function8a5a3
- ld a, $6
- hlcoord 10, 4, AttrMap
- call Function8a5a3
- call Function89448
- call SetPalettes
- call Function891ab
- jp Function89e36
-
-Function89fed: ; 89fed (22:5fed)
- ld hl, UnknownText_0x8a102
- call PrintText
- jp Function89e36
-
-Function89ff6: ; 89ff6 (22:5ff6)
- call Function891fe
- call ClearBGPalettes
- call Function893cc
- call Function89807
- call Function89492
- call Function894ca
- call OpenSRAMBank4
- ld hl, $a603
- ld a, -1
- ld bc, 8
- call ByteFill
- ld hl, $a603
- ld de, wd008
- call Function89381
- call CloseSRAM
- call Function8987f
- call OpenSRAMBank4
- hlcoord 1, 13
- ld bc, $a007
- call Function89a0c
- call CloseSRAM
- call Function891ab
- call Mobile22_ButtonSound
- jp Function89e36
-
-Function8a03d: ; 8a03d (22:603d)
- ld hl, UnknownText_0x8a107
- call Function89209
- call PrintText
- call Function8920f
- jp Function89e36
-
-Function8a04c: ; 8a04c (22:604c)
- ld hl, UnknownText_0x8a10c
- call PrintText
- jp Function89e36
-
-Function8a055: ; 8a055 (22:6055)
- ld c, $7
- ld b, $4
-.asm_8a059
- call Function8a0a1
- inc c
- call Function8a0c9
- push bc
- call Function8a58d
- pop bc
- call Function8a0de
- push bc
- push hl
- ld a, $5
- call Function8a5a3
- pop hl
- inc hl
- inc hl
- inc hl
- ld a, $6
- call Function8a5a3
- call CGBOnly_LoadEDTile
- pop bc
- ld a, c
- cp $b
- jr nz, .asm_8a059
- call Function8a0a1
- hlcoord 12, 4
- call Function8a58d
- ld a, $5
- hlcoord 12, 4, AttrMap
- call Function8a5a3
- pop hl
- ld a, $6
- hlcoord 15, 4, AttrMap
- call Function8a5a3
- call CGBOnly_LoadEDTile
- jp Function89e36
-
-Function8a0a1: ; 8a0a1 (22:60a1)
- call Mobile22_SetBGMapMode0
- push bc
- call Function8a0c9
- ld e, $6
-.asm_8a0aa
- push hl
- ld bc, $6
- add hl, bc
- ld d, [hl]
- call Function8a0c1
- pop hl
- ld [hl], d
- call Function89215
- ld bc, $14
- add hl, bc
- dec e
- jr nz, .asm_8a0aa
- pop bc
- ret
-
-Function8a0c1: ; 8a0c1 (22:60c1)
- push hl
- ld bc, AttrMap - TileMap
- add hl, bc
- ld a, [hl]
- pop hl
- ret
-
-Function8a0c9: ; 8a0c9 (22:60c9)
- push bc
- hlcoord 0, 0
- ld de, $14
- ld a, b
- and a
- jr z, .asm_8a0d8
-.asm_8a0d4
- add hl, de
- dec b
- jr nz, .asm_8a0d4
-.asm_8a0d8
- ld d, $0
- ld e, c
- add hl, de
- pop bc
- ret
-
-Function8a0de: ; 8a0de (22:60de)
- call Function8a0c9
- ld de, AttrMap - TileMap
- add hl, de
- ret
-
-Function8a0e6: ; 8a0e6 (22:60e6)
- call Function8b539
- jp Function89e36
-
-Function8a0ec: ; 8a0ec (22:60ec)
- ld hl, UnknownText_0x8a111
- call PrintText
- jp Function89e36
-
-Function8a0f5: ; 8a0f5 (22:60f5)
- call Function8b555
- jp nc, Function8a0ff
- ld hl, wd02d
- inc [hl]
-
-Function8a0ff: ; 8a0ff (22:60ff)
- jp Function89e36
-; 8a102 (22:6102)
-
-UnknownText_0x8a102: ; 0x8a102
- ; The CARD FOLDER stores your and your friends' CARDS. A CARD contains information like the person's name, phone number and profile.
- text_jump UnknownText_0x1c5238
- db "@"
-; 0x8a107
-
-UnknownText_0x8a107: ; 0x8a107
- ; This is your CARD. Once you've entered your phone number, you can trade CARDS with your friends.
- text_jump UnknownText_0x1c52bc
- db "@"
-; 0x8a10c
-
-UnknownText_0x8a10c: ; 0x8a10c
- ; If you have your friend's CARD, you can use it to make a call from a mobile phone on the 2nd floor of a #MON CENTER.
- text_jump UnknownText_0x1c531e
- db "@"
-; 0x8a111
-
-UnknownText_0x8a111: ; 0x8a111
- ; To safely store your collection of CARDS, you must set a PASSCODE for your CARD FOLDER.
- text_jump UnknownText_0x1c5394
- db "@"
-; 0x8a116
-
-Function8a116: ; 8a116 (22:6116)
- ld a, $1
- ld [wd030], a
- ld hl, MenuDataHeader_0x8a176
- call LoadMenuDataHeader
-.asm_8a121
- call Mobile22_SetBGMapMode0
- call Function8a17b
- jr c, .asm_8a16b
- ld a, [wMenuCursorY]
- ld [wd030], a
- dec d
- jr z, .asm_8a140
- call Function8a20d
- jr c, .asm_8a121
- xor a
- call Function8a2fe
- call Function8916e
- jr .asm_8a16b
-.asm_8a140
- call Function89174
- jr nz, .asm_8a14c
- call Function8a241
- jr c, .asm_8a121
- jr .asm_8a15a
-.asm_8a14c
- call WaitSFX
- ld de, SFX_TWINKLE
- call PlaySFX
- ld c, $10
- call DelayFrames
-.asm_8a15a
- call ExitMenu
- call Function891de
- call Function893e2
- call Function89245
- call Function89168
- and a
- ret
-.asm_8a16b
- call Function89209
- call CloseWindow
- call Function8920f
- scf
- ret
-; 8a176 (22:6176)
-
-MenuDataHeader_0x8a176: ; 0x8a176
- db $40 ; flags
- db 00, 14 ; start coords
- db 06, 19 ; end coords
-; 8a17b
-
-Function8a17b: ; 8a17b (22:617b)
- decoord 14, 0
- ld b, $5
- ld c, $4
- call Function89b3b
- ld hl, MenuDataHeader_0x8a19a
- ld a, [wd030]
- call Function89d5e
- ld hl, Function8a1b0
- call Function89d75
- jr nc, .asm_8a198
- ld a, $0
-.asm_8a198
- ld d, a
- ret
-; 8a19a (22:619a)
-
-MenuDataHeader_0x8a19a: ; 0x8a19a
- db $40 ; flags
- db 00, 14 ; start coords
- db 06, 19 ; end coords
- dw MenuData2_0x8a1a2
- db 1 ; default option
-; 0x8a1a2
-
-MenuData2_0x8a1a2: ; 0x8a1a2
- db $e0 ; flags
- db 3 ; items
- db "ひらく@"
- db "すてる@"
- db "もどる@"
-; 0x8a1b0
-
-Function8a1b0: ; 8a1b0
- hlcoord 0, 12
- ld b, $4
- ld c, $12
- call TextBox
- hlcoord 1, 14
- ld a, [wMenuCursorY]
- ld de, Strings_8a1cc
- dec a
- ld c, a
- call Function8919e
- call PlaceString
- ret
-; 8a1cc
-
-Strings_8a1cc: ; 8a1cc
- db "めいし", $25, "せいりと へんしゅうを"
- next "おこないます"
- db "@"
-
- db "めいしフ,ルダー", $25, "めいしと"
- next "あんしょうばんごう", $1f, "けします"
- db "@"
-
- db "まえ", $25, "がめん", $1d, "もどります"
- db "@"
-; 8a20d
-
-
-Function8a20d: ; 8a20d (22:620d)
- ld hl, UnknownText_0x8a232
- call PrintText
- ld a, $2
- call Function89259
- ret c
- ld hl, UnknownText_0x8a237
- call PrintText
- ld a, $2
- call Function89259
- ret c
- xor a
- call Function8a2fe
- ld hl, UnknownText_0x8a23c
- call PrintText
- xor a
- and a
- ret
-; 8a232 (22:6232)
-
-UnknownText_0x8a232: ; 0x8a232
- ; If the CARD FOLDER is deleted, all its CARDS and the PASSCODE will also be deleted. Beware--a deleted CARD FOLDER can't be restored. Want to delete your CARD FOLDER?
- text_jump UnknownText_0x1c53ee
- db "@"
-; 0x8a237
-
-UnknownText_0x8a237: ; 0x8a237
- ; Are you sure you want to delete it?
- text_jump UnknownText_0x1c5494
- db "@"
-; 0x8a23c
-
-UnknownText_0x8a23c: ; 0x8a23c
- ; The CARD FOLDER has been deleted.
- text_jump UnknownText_0x1c54b9
- db "@"
-; 0x8a241
-
-Function8a241: ; 8a241 (22:6241)
- call LoadStandardMenuDataHeader
- call Function891fe
- call Function8a262
- jr nc, .asm_8a254
- call Function891fe
- call Function89b28
- scf
- ret
-.asm_8a254
- call Function891de
- call ClearBGPalettes
- call Call_ExitMenu
- call Function891de
- and a
- ret
-
-Function8a262: ; 8a262 (22:6262)
- call ClearBGPalettes
- call Function893e2
- call Mobile22_SetBGMapMode0
- callba Function4a3a7
- callba MG_Mobile_Layout_CreatePalBoxes
- hlcoord 1, 0
- call Function8a53d
- hlcoord 12, 4
- call Function8a58d
- ld a, $5
- hlcoord 12, 4, AttrMap
- call Function8a5a3
- ld a, $6
- hlcoord 15, 4, AttrMap
- call Function8a5a3
- xor a
- ld [wd02e], a
- ld bc, wd013
- call Function8b36c
- call Function8b493
- call Function891ab
- call SetPalettes
- call Function8b5e7
- ret
-
-Function8a2aa: ; 8a2aa (22:62aa)
- ld hl, MenuDataHeader_0x8a2ef
- call LoadMenuDataHeader
- ld hl, UnknownText_0x8a2f4
- call PrintText
- ld a, $1
- call Function89259
- jr nc, .asm_8a2cf
- ld hl, UnknownText_0x8a2f9
- call PrintText
- ld a, $2
- call Function89259
- jr c, .asm_8a2ea
- call Function8a20d
- jr .asm_8a2ea
-.asm_8a2cf
- call ExitMenu
- call Function8a241
- jr c, .asm_8a2ed
- ld a, $1
- call Function8a313
- call CloseSRAM
- call Function891de
- call Function89245
- call Function89168
- and a
- ret
-.asm_8a2ea
- call CloseWindow
-.asm_8a2ed
- scf
- ret
-; 8a2ef (22:62ef)
-
-MenuDataHeader_0x8a2ef: ; 0x8a2ef
- db $40 ; flags
- db 12, 00 ; start coords
- db 17, 19 ; end coords
-; 8a2f4
-
-UnknownText_0x8a2f4: ; 0x8a2f4
- ; There is an older CARD FOLDER from a previous journey. Do you want to open it?
- text_jump UnknownText_0x1c54dd
- db "@"
-; 0x8a2f9
-
-UnknownText_0x8a2f9: ; 0x8a2f9
- ; Delete the old CARD FOLDER?
- text_jump UnknownText_0x1c552d
- db "@"
-; 0x8a2fe
-
-Function8a2fe: ; 8a2fe (22:62fe)
- call Function8a313
- call Function89305
- ld hl, $a603
- ld bc, $8
- ld a, -1
- call ByteFill
- call CloseSRAM
- ret
-
-Function8a313: ; 8a313 (22:6313)
- ld c, a
- call OpenSRAMBank4
- ld a, c
- ld [$a60b], a
- ret
-
-Function8a31c: ; 8a31c (22:631c)
- push bc
- call Mobile22_SetBGMapMode0
- callba Function4a3a7
- callba MG_Mobile_Layout_CreatePalBoxes
- hlcoord 1, 0
- call Function8a53d
- hlcoord 12, 4
- call Function8a58d
- call Function8a3b2
- pop bc
- ld a, c
- ld [wMenuCursorBuffer], a
- ld [MenuSelection], a
- call PlaceVerticalMenuItems
- call InitVerticalMenuCursor
- ld hl, w2DMenuFlags1
- set 7, [hl]
-.asm_8a34e
- call Function8a3a2
- call Mobile22_SetBGMapMode0
- call Function8a453
- call Function8a4d3
- call Function8a4fc
- call Function891ab
- call SetPalettes
- call Function8a383
- jr c, .asm_8a370
- jr z, .asm_8a34e
-.asm_8a36a
- call Function89448
- xor a
- ld e, a
- ret
-.asm_8a370
- call Function89448
- call PlaceHollowCursor
- call Function8a3a2
- ld a, [MenuSelection]
- cp $ff
- jr z, .asm_8a36a
- ld e, a
- and a
- ret
-
-Function8a383: ; 8a383 (22:6383)
- callba MobileMenuJoypad
- ld a, c
- ld hl, wMenuJoypadFilter
- and [hl]
- ret z
- bit 0, a
- jr nz, .asm_8a399
- bit 1, a
- jr nz, .asm_8a39e
- xor a
- ret
-.asm_8a399
- call PlayClickSFX
- scf
- ret
-.asm_8a39e
- call PlayClickSFX
- ret
-
-Function8a3a2: ; 8a3a2 (22:63a2)
- ld a, [wMenuCursorY]
- dec a
- ld hl, wd002
- ld e, a
- ld d, $0
- add hl, de
- ld a, [hl]
- ld [MenuSelection], a
- ret
-
-Function8a3b2: ; 8a3b2 (22:63b2)
- ld a, $1
- ld [MenuSelection], a
- call Function8a4fc
- call Function8a3df
- jr nc, .asm_8a3ce
- decoord 0, 2
- ld b, $6
- ld c, $9
- call Function89b3b
- ld hl, MenuDataHeader_0x8a435
- jr .asm_8a3db
-.asm_8a3ce
- decoord 0, 2
- ld b, $8
- ld c, $9
- call Function89b3b
- ld hl, MenuDataHeader_0x8a40f
-.asm_8a3db
- call CopyMenuDataHeader
- ret
-
-Function8a3df: ; 8a3df (22:63df)
- call OpenSRAMBank4
- ld hl, $a603
- call Function89b45
- call CloseSRAM
- ld hl, wd002
- jr c, .asm_8a3f8
- ld de, Unknown_8a408
- call Function8a400
- scf
- ret
-.asm_8a3f8
- ld de, Unknown_8a40b
- call Function8a400
- and a
- ret
-
-Function8a400: ; 8a400 (22:6400)
- ld a, [de]
- inc de
- ld [hli], a
- cp $ff
- jr nz, Function8a400
- ret
-; 8a408 (22:6408)
-
-Unknown_8a408: db 1, 2, -1
-Unknown_8a40b: db 1, 2, 3, -1
-
-MenuDataHeader_0x8a40f: ; 0x8a40f
- db $40 ; flags
- db 02, 00 ; start coords
- db 11, 10 ; end coords
- dw MenuData2_0x8a417
- db 1 ; default option
-; 0x8a417
-
-MenuData2_0x8a417: ; 0x8a417
- db $a0 ; flags
- db 4 ; items
- db "めいしりスト@"
- db "じぶんの めいし@"
- db "めいしこうかん@"
- db "やめる@"
-; 0x8a435
-
-MenuDataHeader_0x8a435: ; 0x8a435
- db $40 ; flags
- db 02, 00 ; start coords
- db 09, 10 ; end coords
- dw MenuData2_0x8a43d
- db 1 ; default option
-; 0x8a43d
-
-MenuData2_0x8a43d: ; 0x8a43d
- db $a0 ; flags
- db 3 ; items
- db "めいしりスト@"
- db "じぶんの めいし@"
- db "やめる@"
-; 0x8a453
-
-Function8a453: ; 8a453 (22:6453)
- hlcoord 0, 12
- ld b, $4
- ld c, $12
- call TextBox
- hlcoord 1, 14
- ld de, String_8a476
- ld a, [MenuSelection]
- cp $ff
- jr z, .asm_8a472
- ld de, Strings_8a483
- dec a
- ld c, a
- call Function8919e
-.asm_8a472
- call PlaceString
- ret
-; 8a476 (22:6476)
-
-String_8a476: ; 8a476
- db "まえ", $25, "がめん", $1d, "もどります@"
-; 8a483
-
-Strings_8a483: ; 8a483
- db "おともだち", $25, "めいしは"
- next "ここ", $1d, "いれておきます@"
-
- db "でんわばんごう", $1f, "いれると"
- next "めいしこうかん", $4a, "できます@"
-
- db "ともだちと じぶん", $25, "めいしを"
- next "せきがいせんで こうかん します@"
-; 8a4d3
-
-Function8a4d3: ; 8a4d3 (22:64d3)
- ld a, [MenuSelection]
- cp $1
- jr nz, .asm_8a4eb
- ld a, $5
- hlcoord 12, 4, AttrMap
- call Function8a5a3
- ld a, $7
- hlcoord 15, 4, AttrMap
- call Function8a5a3
- ret
-.asm_8a4eb
- ld a, $7
- hlcoord 12, 4, AttrMap
- call Function8a5a3
- ld a, $6
- hlcoord 15, 4, AttrMap
- call Function8a5a3
- ret
-
-Function8a4fc: ; 8a4fc (22:64fc)
- ld a, [MenuSelection]
- cp $3
- jr nz, asm_8a529
- ld hl, wd012
- ld a, [hli]
- ld b, a
- ld a, [hld]
- add b
- ld [hl], a
- ld b, a
- ld c, $80
- call Function89cdf
- call Function8a515
- ret
-
-Function8a515: ; 8a515 (22:6515)
- ld hl, wd012
- ld a, [hl]
- cp $38
- jr c, .asm_8a520
- cp $3c
- ret c
-.asm_8a520
- ld a, [wd013]
- cpl
- inc a
- ld [wd013], a
- ret
-
-asm_8a529: ; 8a529 (22:6529)
- ld hl, wd012
- ld a, $3c
- ld [hli], a
- ld a, $ff
- ld [hli], a
- ld hl, Sprites
- xor a
- ld bc, $20
- call ByteFill
- ret
-
-Function8a53d: ; 8a53d (22:653d)
- push hl
- ld a, $15
- ld c, $8
- ld de, $14
- call Function8a573
- ld a, $1d
- ld c, $9
- call Function8a57c
- inc a
- ld [hl], a
- call Function8a584
- pop hl
- add hl, de
- ld a, $1f
- ld c, $8
- call Function8a573
- dec hl
- ld a, $51
- ld [hli], a
- ld a, $26
- ld c, $1
- call Function8a57c
- ld a, $52
- ld c, $3
- call Function8a573
- ld a, $27
- ld c, $6
-
-Function8a573: ; 8a573 (22:6573)
- ld [hl], a
- call Function8a584
- inc a
- dec c
- jr nz, Function8a573
- ret
-
-Function8a57c: ; 8a57c (22:657c)
- ld [hl], a
- call Function8a584
- dec c
- jr nz, Function8a57c
- ret
-
-Function8a584: ; 8a584 (22:6584)
- push af
- ld a, $4
- call Function89215
- inc hl
- pop af
- ret
-
-Function8a58d: ; 8a58d (22:658d)
- ld a, $2d
- ld bc, $606
- ld de, $14
-.asm_8a595
- push bc
- push hl
-.asm_8a597
- ld [hli], a
- inc a
- dec c
- jr nz, .asm_8a597
- pop hl
- add hl, de
- pop bc
- dec b
- jr nz, .asm_8a595
- ret
-
-Function8a5a3: ; 8a5a3 (22:65a3)
- ld bc, $603
- ld de, $14
-.asm_8a5a9
- push bc
- push hl
-.asm_8a5ab
- ld [hli], a
- dec c
- jr nz, .asm_8a5ab
- pop hl
- add hl, de
- pop bc
- dec b
- jr nz, .asm_8a5a9
- ret
-
-Function8a5b6: ; 8a5b6 (22:65b6)
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, Palette_8a5e5
- ld de, UnknBGPals + 4 palettes
- ld bc, 3 palettes
- call CopyBytes
- ld hl, Palette_8a5fd
- ld de, UnknOBPals
- ld bc, 1 palettes
- call CopyBytes
- ld hl, Palette_8a605
- ld de, UnknOBPals + 1 palettes
- ld bc, 1 palettes
- call CopyBytes
- pop af
- ld [rSVBK], a
- ret
-; 8a5e5 (22:65e5)
-
-Palette_8a5e5: ; 8a5e5
- RGB 31, 31, 31
- RGB 27, 19, 00
- RGB 07, 11, 22
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 16, 16, 31
- RGB 27, 19, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 00, 00
- RGB 27, 19, 00
- RGB 00, 00, 00
-; 8a5fd
-
-Palette_8a5fd: ; 8a5fd
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 31, 31, 31
-; 8a605
-
-Palette_8a605: ; 8a605
- RGB 00, 00, 00
- RGB 14, 18, 31
- RGB 16, 16, 31
- RGB 31, 31, 31
-; 8a60d
-
-Function8a60d: ; 8a60d
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, Palette_8a624
- ld de, UnknOBPals
- ld bc, 1 palettes
- call CopyBytes
- pop af
- ld [rSVBK], a
- ret
-; 8a624
-
-Palette_8a624: ; 8a624
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 00, 00, 00
-; 8a62c
-
-Function8a62c: ; 8a62c (22:662c)
- call LoadStandardMenuDataHeader
- call Function891fe
- xor a
- call Function8b94a
- call Function8b677
-.asm_8a639
- xor a
- ld [wd033], a
- ld [wd032], a
- ld [wd0e3], a
- call Function8b7bd
- ld a, c
- and a
- jr z, .asm_8a66a
- ld [MenuSelection], a
- ld b, a
- ld a, [wScrollingMenuCursorPosition]
- inc a
- ld [wd034], a
- push bc
- call Function8b960
- ld a, c
- pop bc
- jr z, .asm_8a639
- ld c, a
- ld hl, Jumptable_8a671
- ld a, b
- ld [MenuSelection], a
- ld a, c
- dec a
- rst JumpTable
- jr .asm_8a639
-.asm_8a66a
- call Function891fe
- call Function89b28
- ret
-
-Jumptable_8a671: ; 8a671 (22:6671)
- dw Function8a679
- dw Function8a6cd
- dw Function8a8c3
- dw Function8a930
-
-
-Function8a679: ; 8a679 (22:6679)
- call Function891de
- call ClearBGPalettes
- call Function893cc
- call OpenSRAMBank4
- call Function8931b
- call Function89844
- call CloseSRAM
- call OpenSRAMBank4
- call Function8939a
- call Function89856
- hlcoord 1, 13
- call Function899fe
- call Function891ab
- call CloseSRAM
-.asm_8a6a3
- call Function89a57
- jr c, .asm_8a6a3
- and a
- jr z, Function8a679
- ld hl, Jumptable_8a6bc
- dec a
- rst JumpTable
- jr c, Function8a679
- call Function891fe
- call Function8b677
- call Function89448
- ret
-
-Jumptable_8a6bc: ; 8a6bc (22:66bc)
- dw Function8a6c0
- dw Function8a6c5
-
-
-Function8a6c0: ; 8a6c0 (22:66c0)
- call PlayClickSFX
- and a
- ret
-
-Function8a6c5: ; 8a6c5 (22:66c5)
- call PlayClickSFX
- call Function89d0d
- scf
- ret
-
-Function8a6cd: ; 8a6cd (22:66cd)
- call Function891de
- call ClearBGPalettes
- call Function893cc
- call OpenSRAMBank4
- call Function8931b
- call Function89844
- call Function8a757
- call CloseSRAM
-.asm_8a6e5
- call OpenSRAMBank4
- call Function8931b
- call Function89856
- call Function89a2e
- call Function891ab
- xor a
- ld [wd02f], a
- call CloseSRAM
-.asm_8a6fb
- call Function89b97
- call Function89c67
- jr c, .asm_8a718
- ld a, b
- and a
- jr z, .asm_8a6fb
- call PlayClickSFX
- call Function89448
- ld a, [wd011]
- ld hl, Jumptable_8a74f
- rst JumpTable
- jr nc, .asm_8a6e5
- jr .asm_8a742
-.asm_8a718
- call OpenSRAMBank4
- call Function8a765
- call CloseSRAM
- jr nc, .asm_8a73f
- call Mobile22_SetBGMapMode0
- call Function89448
- call Function89a23
- hlcoord 1, 13
- ld de, String_89135
- call PlaceString
- call WaitBGMap
- ld a, $2
- call Function89254
- jr c, .asm_8a6e5
-.asm_8a73f
- call CloseSRAM
-.asm_8a742
- call ClearBGPalettes
- call Function89448
- call Function891d3
- call Function8b677
- ret
-
-Jumptable_8a74f: ; 8a74f (22:674f)
- dw Function8a78c
- dw Function8a7cb
- dw Function8a818
- dw Function8a8a1
-
-
-Function8a757: ; 8a757 (22:6757)
- call Function8939a
- xor a
- ld [wd010], a
- ld [wd011], a
- ld [wd012], a
- ret
-
-Function8a765: ; 8a765 (22:6765)
- call Function8931b
- push bc
- ld hl, $0
- add hl, bc
- ld de, wd002
- ld c, $6
- call Function89185
- pop bc
- jr nz, .asm_8a78a
- push bc
- ld hl, $11
- add hl, bc
- ld de, wd008
- ld c, $8
- call Function89185
- pop bc
- jr nz, .asm_8a78a
- and a
- ret
-.asm_8a78a
- scf
- ret
-
-Function8a78c: ; 8a78c (22:678c)
- call Function891fe
- ld de, wd002
- ld b, $5
- callba NamingScreen
- call OpenSRAMBank4
- call Function8931b
- push bc
- ld hl, $0
- add hl, bc
- ld d, h
- ld e, l
- ld hl, wd002
- call InitName
- call CloseSRAM
- call DelayFrame
- call JoyTextDelay
- call Function891de
- call ClearBGPalettes
- call Function893cc
- call OpenSRAMBank4
- pop bc
- call Function89844
- call CloseSRAM
- and a
- ret
-
-Function8a7cb: ; 8a7cb (22:67cb)
- ld a, [MenuSelection]
- push af
- call Function891de
- ld de, wd008
- ld c, $0
- callba Function17a68f
- jr c, .asm_8a7f4
- ld hl, wd008
- ld a, $ff
- ld bc, $8
- call ByteFill
- ld h, d
- ld l, e
- ld de, wd008
- ld c, $8
- call Function89193
-.asm_8a7f4
- pop af
- ld [MenuSelection], a
- call Function891de
- call ClearBGPalettes
- call Function893cc
- call OpenSRAMBank4
- call Function8931b
- call Function89844
- call Function89856
- call Function89a2e
- call Function891ab
- call CloseSRAM
- and a
- ret
-
-Function8a818: ; 8a818 (22:6818)
- call Function89a23
- ld hl, wd002
- call Function89331
- jr c, .asm_8a875
- ld hl, wd008
- call Function89b45
- jr nc, .asm_8a87a
- call OpenSRAMBank4
- call Function8a765
- jr nc, .asm_8a863
- call Function8931b
- push bc
- ld hl, $0
- add hl, bc
- ld d, h
- ld e, l
- ld hl, wd002
- ld c, $6
- call Function89193
- pop bc
- ld hl, $11
- add hl, bc
- ld d, h
- ld e, l
- ld hl, wd008
- ld c, $8
- call Function89193
- hlcoord 1, 13
- ld de, .string_8a868
- call PlaceString
- call WaitBGMap
- call JoyWaitAorB
-.asm_8a863
- call CloseSRAM
- scf
- ret
-; 8a868 (22:6868)
-
-.string_8a868
- db "めいし", $1f, "かきかえ まし", $22, "@"
-
-.asm_8a875
- ld de, String_8a88b
- jr .asm_8a87d
-.asm_8a87a
- ld de, String_8911c
-.asm_8a87d
- hlcoord 1, 13
- call PlaceString
- call WaitBGMap
- call JoyWaitAorB
- and a
- ret
-; 8a88b (22:688b)
-
-String_8a88b: ; 8a88b
- db "おともだち", $25, "なまえが"
- next "かかれて いません!@"
-; 8a8a1
-
-Function8a8a1: ; 8a8a1 (22:68a1)
- call OpenSRAMBank4
- call Function8a765
- call CloseSRAM
- jr nc, .asm_8a8bf
- call Function89a23
- hlcoord 1, 13
- ld de, String_89135
- call PlaceString
- ld a, $2
- call Function89254
- jr c, .asm_8a8c1
-.asm_8a8bf
- scf
- ret
-.asm_8a8c1
- and a
- ret
-
-Function8a8c3: ; 8a8c3 (22:68c3)
- call Function891de
- call ClearBGPalettes
- call Function893cc
- call OpenSRAMBank4
- call Function8931b
- call Function89844
- call Function8939a
- call Function89856
- call CloseSRAM
- call Function891ab
- hlcoord 1, 13
- ld de, String_8a919
- call PlaceString
- ld a, $2
- call Function89254
- jr c, .asm_8a90f
- call OpenSRAMBank4
- call Function892b4
- call CloseSRAM
- call Function89a23
- call Mobile22_SetBGMapMode0
- hlcoord 1, 13
- ld de, String_8a926
- call PlaceString
- call WaitBGMap
- call JoyWaitAorB
-.asm_8a90f
- call Function89448
- call Function891fe
- call Function8b677
- ret
-; 8a919 (22:6919)
-
-String_8a919: ; 8a919
- db "このデータ", $1f, "けしますか?@"
-; 8a926
-
-String_8a926: ; 8a926
- db "データ", $1f, "けしまし", $22, "@"
-; 8a930
-
-Function8a930: ; 8a930 (22:6930)
- ld a, [MenuSelection]
- push af
- xor a
- ld [wd032], a
- ld a, $1
- ld [wd033], a
- ld a, [wd034]
- ld [wd0e3], a
-.asm_8a943
- call Function8b7bd
- ld a, [wMenuJoypad]
- and $1
- jr nz, .asm_8a953
- ld a, c
- and a
- jr nz, .asm_8a943
- pop af
- ret
-.asm_8a953
- call OpenSRAMBank4
- pop af
- cp c
- jr z, .asm_8a995
- push bc
- ld [MenuSelection], a
- call Function8931b
- push bc
- ld h, b
- ld l, c
- ld de, wd002
- ld bc, $25
- call CopyBytes
- pop de
- pop bc
- ld a, c
- ld [MenuSelection], a
- call Function8931b
- push bc
- ld h, b
- ld l, c
- ld bc, $25
- call CopyBytes
- pop de
- ld hl, wd002
- ld bc, $25
- call CopyBytes
- ld de, SFX_SWITCH_POKEMON
- call WaitPlaySFX
- ld de, SFX_SWITCH_POKEMON
- call WaitPlaySFX
-.asm_8a995
- call CloseSRAM
- ret
-
-Function8a999: ; 8a999 (22:6999)
- ld hl, MenuDataHeader_0x8a9c9
- call LoadMenuDataHeader
- ld c, $1
-.asm_8a9a1
- call Function8a9ce
- jr c, .asm_8a9bb
- push bc
- push de
- call LoadStandardMenuDataHeader
- pop de
- dec e
- ld a, e
- ld hl, Jumptable_8a9c5
- rst JumpTable
- call Function891fe
- call Function89b28
- pop bc
- jr .asm_8a9a1
-.asm_8a9bb
- call Function89209
- call CloseWindow
- call Function8920f
- ret
-
-Jumptable_8a9c5: ; 8a9c5 (22:69c5)
- dw Function8aa0a
- dw Function8ab3b
-; 8a9c9 (22:69c9)
-
-MenuDataHeader_0x8a9c9: ; 0x8a9c9
- db $40 ; flags
- db 04, 11 ; start coords
- db 11, 18 ; end coords
-; 8a9ce
-
-Function8a9ce: ; 8a9ce (22:69ce)
- push bc
- decoord 11, 4
- ld b, $6
- ld c, $6
- call Function89b3b
- pop bc
- ld a, c
- ld hl, MenuDataHeader_0x8a9f2
- call Function89d5e
- ld hl, Function8aa09
- call Function89d85
- jr c, .asm_8a9ed
- ld c, a
- ld e, a
- and a
- ret
-.asm_8a9ed
- ld c, a
- ld e, $0
- scf
- ret
-; 8a9f2 (22:69f2)
-
-MenuDataHeader_0x8a9f2: ; 0x8a9f2
- db $40 ; flags
- db 04, 11 ; start coords
- db 11, 18 ; end coords
- dw MenuData2_0x8a9fa
- db 1 ; default option
-; 0x8a9fa
-
-MenuData2_0x8a9fa: ; 0x8a9fa
- db $a0 ; flags
- db 3 ; items
- db "へんしゅう@"
- db "みる@"
- db "やめる@"
-; 0x8aa09
-
-Function8aa09: ; 8aa09
- ret
-; 8aa0a
-
-Function8aa0a: ; 8aa0a (22:6a0a)
- ld a, $1
- ld [wd02f], a
- ld [wd011], a
- xor a
- ld [wd010], a
- ld [wd012], a
- call OpenSRAMBank4
- ld hl, $a603
- ld de, wd008
- call Function89381
- call CloseSRAM
- call Function891fe
- call ClearBGPalettes
- call Function893cc
- call Function89807
- call Function89492
- call Function894ca
-.asm_8aa3a
- call Function8987f
- call Function89a2e
- call Function891ab
-.asm_8aa43
- call Function89b97
- call Function89c67
- jr c, .asm_8aa61
- ld a, b
- and a
- jr z, .asm_8aa43
- call PlayClickSFX
- call Function89448
- ld a, [wd011]
- dec a
- ld hl, Jumptable_8aa6d
- rst JumpTable
- jr nc, .asm_8aa3a
- jr .asm_8aa69
-.asm_8aa61
- call Function89448
- call Function8ab11
- jr nc, .asm_8aa3a
-.asm_8aa69
- call Function89448
- ret
-
-Jumptable_8aa6d: ; 8aa6d (22:6a6d)
- dw Function8aa73
- dw Function8aab6
- dw Function8ab11
-
-
-Function8aa73: ; 8aa73 (22:6a73)
- ld a, [MenuSelection]
- ld e, a
- push de
- call Function891de
- ld de, wd008
- ld c, $0
- callba Function17a68f
- jr c, .asm_8aa9d
- ld hl, wd008
- ld a, $ff
- ld bc, $8
- call ByteFill
- ld h, d
- ld l, e
- ld de, wd008
- ld c, $8
- call Function89193
-.asm_8aa9d
- call Function891fe
- call ClearBGPalettes
- call Function893cc
- call Function89807
- call Function89492
- call Function894ca
- pop de
- ld a, e
- ld [MenuSelection], a
- and a
- ret
-
-Function8aab6: ; 8aab6 (22:6ab6)
- call Function89a23
- ld hl, wd008
- call Function89b45
- jr nc, Function8ab00
- call OpenSRAMBank4
- ld de, wd008
- ld hl, $a603
- ld c, $8
- call Function89185
- jr z, .asm_8aaeb
- ld hl, wd008
- ld de, $a603
- ld c, $8
- call Function89193
- hlcoord 1, 13
- ld de, String_8aaf0
- call PlaceString
- call WaitBGMap
- call JoyWaitAorB
-.asm_8aaeb
- call CloseSRAM
- scf
- ret
-; 8aaf0 (22:6af0)
-
-String_8aaf0: ; 8aaf0
- db "あたらしい めいし<PKMN>できまし<LNBRK>@"
-; 8ab00
-
-Function8ab00: ; 8ab00
- ld de, String_8911c
- hlcoord 1, 13
- call PlaceString
- call WaitBGMap
- call Mobile22_ButtonSound
- and a
- ret
-
-Function8ab11: ; 8ab11 (22:6b11)
- call OpenSRAMBank4
- ld hl, $a603
- ld de, wd008
- ld c, $8
- call Function89185
- call CloseSRAM
- jr z, .asm_8ab37
- call Function89a23
- hlcoord 1, 13
- ld de, String_89135
- call PlaceString
- ld a, $2
- call Function89254
- jr c, .asm_8ab39
-.asm_8ab37
- scf
- ret
-.asm_8ab39
- and a
- ret
-
-Function8ab3b: ; 8ab3b (22:6b3b)
-.pressed_start
- call Function891fe
- call ClearBGPalettes
- call Function893cc
- call Function89807
- call Function89492
- call Function894ca
- call OpenSRAMBank4
- ld hl, $a603
- ld de, wd008
- call Function89381
- call CloseSRAM
- call Function8987f
- call OpenSRAMBank4
- hlcoord 1, 13
- ld bc, $a007
- call Function89a0c
- call CloseSRAM
- call Function891ab
- call .JoypadLoop
- jr c, .pressed_start
- ret
-
-.JoypadLoop: ; 8ab77 (22:6b77)
- call JoyTextDelay_ForcehJoyDown
- bit A_BUTTON_F, c
- jr nz, .a_b_button
- bit B_BUTTON_F, c
- jr nz, .a_b_button
- bit START_F, c
- jr z, .JoypadLoop
- call PlayClickSFX
- call Function89d0d
- scf
- ret
-
-.a_b_button
- call PlayClickSFX
- and a
- ret
-
-Function8ab93: ; 8ab93 (22:6b93)
- call ClearBGPalettes
- call LoadStandardMenuDataHeader
- callba Function105688
- call ClearSprites
- call Function891fe
- call Function89b28
- ret
-; 8aba9 (22:6ba9)
-
-Function8aba9: ; 8aba9
- ld a, $2
- call Function8b94a
- ld a, $1
- ld [wd032], a
-.asm_8abb3
- call Function891fe
- call Function8b677
-.asm_8abb9
- call Function8b7bd
- jr z, .asm_8abdf
- ld a, c
- ld [MenuSelection], a
- call OpenSRAMBank4
- call Function8931b
- ld hl, $0011
- add hl, bc
- call Function89b45
- call CloseSRAM
- jr c, .asm_8abe2
- ld de, SFX_WRONG
- call WaitPlaySFX
- call CloseSRAM
- jr .asm_8abb9
-
-.asm_8abdf
- xor a
- ld c, a
- ret
-
-.asm_8abe2
- call PlayClickSFX
-.asm_8abe5
- call Function891de
- call ClearBGPalettes
- call Function893cc
- call OpenSRAMBank4
- call Function8931b
- call Function89844
- call CloseSRAM
- call OpenSRAMBank4
- call Function8939a
- call Function89856
- hlcoord 1, 13
- call Function899fe
- call CloseSRAM
- call Function891ab
-.asm_8ac0f
- call Function89a57
- jr c, .asm_8ac0f
- and a
- jr z, .asm_8abe5
- cp $2
- jr z, .asm_8ac0f
- hlcoord 0, 12
- ld b, $4
- ld c, $12
- call TextBox
- hlcoord 1, 14
- ld de, String_8ac3b
- call PlaceString
- ld a, $1
- call Function8925e
- jp c, .asm_8abb3
- ld a, [MenuSelection]
- ld c, a
- ret
-; 8ac3b
-
-String_8ac3b: ; 8ac3b
- db "こ", $25, "ともだち", $1d, "でんわを"
- next "かけますか?@"
-; 8ac4e
-
-Function8ac4e: ; 8ac4e
- xor a
- ld [MenuSelection], a
- push de
- call Function891de
- call ClearBGPalettes
- call Function893cc
- pop bc
- call Function89844
- call Function8939a
- call Function89856
- hlcoord 1, 13
- call Function899fe
- call Function891ab
- ret
-; 8ac70
-
-Function8ac70: ; 8ac70
- push de
- ld a, $3
- call Function8b94a
-
-Function8ac76: ; 8ac76
- call Function891fe
- call Function8b677
-
-Function8ac7c: ; 8ac7c
- call Function8b7bd
- jr z, .asm_8acf0
- ld a, c
- ld [wd02f], a
- ld [MenuSelection], a
- call OpenSRAMBank4
- call Function8931b
- call Function8932d
- call CloseSRAM
- jr nc, .asm_8acb0
- call OpenSRAMBank4
- ld hl, $0011
- add hl, bc
- call Function89b45
- call CloseSRAM
- jr nc, .asm_8accc
- call OpenSRAMBank4
- call Function892b7
- call CloseSRAM
- jr .asm_8accc
-
-.asm_8acb0
- call Function8ad0b
- jr c, Function8ac76
- and a
- jr nz, .asm_8accc
- call OpenSRAMBank4
- ld h, b
- ld l, c
- ld d, $0
- ld e, $6
- add hl, de
- ld d, h
- ld e, l
- pop hl
- ld c, $1f
- call Function89193
- jr .asm_8ace4
-
-.asm_8accc
- pop hl
- call OpenSRAMBank4
- ld d, b
- ld e, c
- ld c, $6
- call Function89193
- ld a, $6
- add e
- ld e, a
- ld a, $0
- adc d
- ld d, a
- ld c, $1f
- call Function89193
-
-.asm_8ace4
- call CloseSRAM
- call LoadStandardFont
- ld a, [wd02f]
- ld c, a
- and a
- ret
-
-.asm_8acf0
- ld hl, UnknownText_0x8ad06
- call PrintText
- ld a, $2
- call Function89259
- jp c, Function8ac7c
- call LoadStandardFont
- pop de
- ld c, $0
- scf
- ret
-; 8ad06
-
-UnknownText_0x8ad06: ; 0x8ad06
- ; Finish registering CARDS?
- text_jump UnknownText_0x1c554a
- db "@"
-; 0x8ad0b
-
-Function8ad0b: ; 8ad0b
-.asm_8ad0b
- ld a, [MenuSelection]
- ld [wd02f], a
- call Function891de
- call ClearBGPalettes
- call Function893cc
- call OpenSRAMBank4
- call Function8931b
- push bc
- call Function89844
- call Function8939a
- call Function89856
- hlcoord 1, 13
- call Function899fe
- call CloseSRAM
- call Function891ab
- pop bc
-.asm_8ad37
- push bc
- call Function89a57
- pop bc
- jr c, .asm_8ad37
- and a
- jr z, .asm_8ad0b
- cp $2
- jr z, .asm_8ad37
- call Mobile22_SetBGMapMode0
- push bc
- hlcoord 0, 12
- ld b, $4
- ld c, $12
- call TextBox
- ld de, String_8ad89
- hlcoord 1, 14
- call PlaceString
- ld a, $2
- call Function8925e
- jr c, .asm_8ad87
- call Mobile22_SetBGMapMode0
- hlcoord 0, 12
- ld b, $4
- ld c, $12
- call TextBox
- ld de, String_8ad9c
- hlcoord 1, 14
- call PlaceString
- ld a, $1
- call Function8925e
- jr c, .asm_8ad84
- ld a, $0
- jr .asm_8ad86
-
-.asm_8ad84
- ld a, $1
-
-.asm_8ad86
- and a
-
-.asm_8ad87
- pop bc
- ret
-; 8ad89
-
-String_8ad89: ; 8ad89
- db "こ", $25, "めいし", $1f, "けして"
- next "いれかえますか?@"
-; 8ad9c
-
-String_8ad9c: ; 8ad9c
- db "おともだち", $25, "なまえを"
- next "のこして おきますか?@"
-; 8adb3
-
-Function8adb3: ; 8adb3
- call Function891de
- call Function8a262
- push af
- call Function891de
- pop af
- ret
-; 8adbf
-
-Function8adbf: ; 8adbf
- call OpenSRAMBank4
- ld hl, $a603
- call Function89b45
- call CloseSRAM
- ret
-; 8adcc
-
-Function8adcc: ; 8adcc
- call OpenSRAMBank4
- call Function8b3b0
- call CloseSRAM
- ret nc
- cp $2
- ret z
- scf
- ret
-; 8addb
diff --git a/misc/mobile_22_2.asm b/misc/mobile_22_2.asm
deleted file mode 100644
index 321998dc7..000000000
--- a/misc/mobile_22_2.asm
+++ /dev/null
@@ -1,1162 +0,0 @@
-Function8b342:: ; 8b342
-; Loads the secondary map header pointer, then runs through a
-; dw with three dummy functions. Spends a lot of energy
-; doing pretty much nothing.
- call GetSecondaryMapHeaderPointer
- ld d, h
- ld e, l
-
-; Everything between here and "ret" is useless.
- xor a
-.loop
- push af
- ld hl, .dw
- rst JumpTable
- pop af
- inc a
- cp 3
- jr nz, .loop
- ret
-; 8b354
-
-.dw ; 8b354
- dw .zero
- dw .one
- dw .two
-; 8b35a
-
-.zero ; 8b35a
- mobile
-; 8b35b
-
-.one ; 8b35b
- mobile
-; 8b35c
-
-.two ; 8b35c
- mobile
-; 8b35d
-
-Function8b35d: ; 8b35d
- ld a, h
- cp d
- ret nz
- ld a, l
- cp e
- ret
-; 8b363
-
-Function8b363: ; 8b363
- push bc
- callba Mobile_AlwaysReturnNotCarry
- pop bc
- ret
-; 8b36c
-
-Function8b36c: ; 8b36c (22:736c)
- ; [bc + (0:4)] = -1
- push bc
- ld h, b
- ld l, c
- ld bc, 4
- ld a, -1
- call ByteFill
- pop bc
- ret
-
-Function8b379: ; 8b379 (22:7379)
- ; d = [bc + e]
- push bc
- ld a, c
- add e
- ld c, a
- ld a, $0
- adc b
- ld b, a
- ld a, [bc]
- ld d, a
- pop bc
- ret
-
-Function8b385: ; 8b385 (22:7385)
- ; [bc + e] = d
- push bc
- ld a, c
- add e
- ld c, a
- ld a, $0
- adc b
- ld b, a
- ld a, d
- ld [bc], a
- pop bc
- ret
-
-Function8b391: ; 8b391 (22:7391)
- ; find first e in range(4) such that [bc + e] == -1
- ; if none exist, return carry
- push bc
- ld e, 0
- ld d, 4
-.loop
- ld a, [bc]
- inc bc
- cp -1
- jr z, .done
- inc e
- dec d
- jr nz, .loop
- dec e
- scf
-.done
- pop bc
- ret
-
-Function8b3a4: ; 8b3a4 (22:73a4)
- ; strcmp(hl, bc, 4)
- push de
- push bc
- ld d, b
- ld e, c
- ld c, 4
- call Function89185
- pop bc
- pop de
- ret
-
-Function8b3b0: ; 8b3b0 (22:73b0)
- ld bc, $a037 ; 4:a037
- ld a, [$a60b]
- and a
- jr z, .asm_8b3c2
- cp $3
- jr nc, .asm_8b3c2
- call Function8b391
- jr c, .asm_8b3c9
-.asm_8b3c2
- call Function8b36c
- xor a
- ld [$a60b], a
-.asm_8b3c9
- ld a, [$a60b]
- ret
-
-Function8b3cd: ; 8b3cd (22:73cd)
- push de
- push bc
- ld e, $4
-.asm_8b3d1
- ld a, [bc]
- inc bc
- call Function8998b
- inc hl
- dec e
- jr nz, .asm_8b3d1
- pop bc
- pop de
- ret
-
-Function8b3dd: ; 8b3dd (22:73dd)
- push de
- push bc
- call JoyTextDelay_ForcehJoyDown ; joypad
- ld a, c
- pop bc
- pop de
- bit A_BUTTON_F, a
- jr nz, .a_button
- bit B_BUTTON_F, a
- jr nz, .b_button
- bit D_UP_F, a
- jr nz, .d_up
- bit D_DOWN_F, a
- jr nz, .d_down
- and a
- ret
-
-.a_button
- ld a, e
- cp $3
- jr z, .e_is_zero
- inc e
- ld d, 0
- call Function8b385
- xor a
- ld [wd010], a
- ret
-
-.e_is_zero
- call PlayClickSFX
- ld d, $0
- scf
- ret
-
-.b_button
- ld a, e
- and a
- jr nz, .e_is_not_zero
- call PlayClickSFX
- ld d, -1
- call Function8b385
- ld d, 1
- scf
- ret
-
-.e_is_not_zero
- ld d, -1
- call Function8b385
- dec e
- xor a
- ld [wd010], a
- ret
-
-.d_up
- call Function8b379
- ld a, d
- cp $a
- jr c, .less_than_10_up_1
- ld d, $9
-.less_than_10_up_1
- inc d
- ld a, d
- cp $a
- jr c, .less_than_10_up_2
- ld d, $0
-.less_than_10_up_2
- call Function8b385
- xor a
- ld [wd010], a
- ret
-
-.d_down
- call Function8b379
- ld a, d
- cp $a
- jr c, .less_than_10_down
- ld d, $0
-.less_than_10_down
- ld a, d
- dec d
- and a
- jr nz, .nonzero_down
- ld d, $9
-.nonzero_down
- call Function8b385
- xor a
- ld [wd010], a
- ret
-
-Function8b45c: ; 8b45c (22:745c)
- call Function8b36c
- xor a
- ld [wd010], a
- ld [wd012], a
- call Function8b391
- ld d, $0
- call Function8b385
-.asm_8b46e
- call Mobile22_SetBGMapMode0
- call Function8b493
- call Function8b4cc
- call Function8b518
- call Function89b78
- push bc
- call Function8b4fd
- call Function89c44
- ld a, $1
- ld [hBGMapMode], a
- pop bc
- call Function8b3dd
- jr nc, .asm_8b46e
- ld a, d
- and a
- ret z
- scf
- ret
-
-Function8b493: ; 8b493 (22:7493)
- push bc
- call Mobile22_SetBGMapMode0
- call Function8b521
- ld hl, Jumptable_8b4a0
- pop bc
- rst JumpTable
- ret
-
-Jumptable_8b4a0: ; 8b4a0 (22:74a0)
- dw Function8b4a4
- dw Function8b4b8
-
-
-Function8b4a4: ; 8b4a4 (22:74a4)
- push bc
- push de
- call Function8b4d8
- call TextBox
- pop de
- pop bc
- call Function8b4cc
- call Function8b518
- call Function8b3cd
- ret
-
-Function8b4b8: ; 8b4b8 (22:74b8)
- push bc
- push de
- call Function8b4ea
- call Function89b3b
- pop de
- pop bc
- call Function8b4cc
- call Function8b518
- call Function8b3cd
- ret
-
-Function8b4cc: ; 8b4cc (22:74cc)
- push bc
- ld hl, Unknown_8b529
- call Function8b50a
- ld a, [hli]
- ld h, [hl]
- ld l, a
- pop bc
- ret
-
-Function8b4d8: ; 8b4d8 (22:74d8)
- ld hl, Unknown_8b529
- call Function8b50a
- push hl
- inc hl
- inc hl
- ld a, [hli]
- ld b, a
- ld a, [hl]
- ld c, a
- pop hl
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ret
-
-Function8b4ea: ; 8b4ea (22:74ea)
- ld hl, Unknown_8b529
- call Function8b50a
- push hl
- inc hl
- inc hl
- ld a, [hli]
- ld b, a
- ld a, [hl]
- ld c, a
- pop hl
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- ret
-
-Function8b4fd: ; 8b4fd (22:74fd)
- ld hl, Unknown_8b529 + 4
- call Function8b50a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- ld a, [hli]
- ld d, a
- ret
-
-Function8b50a: ; 8b50a (22:750a)
- ld a, [wd02e]
- and a
- ret z
- ld b, $0
- ld c, $8
-.asm_8b513
- add hl, bc
- dec a
- jr nz, .asm_8b513
- ret
-
-Function8b518: ; 8b518 (22:7518)
- push de
- ld d, $0
- ld e, $14
- add hl, de
- inc hl
- pop de
- ret
-
-Function8b521: ; 8b521 (22:7521)
- ld hl, Unknown_8b529 + 7
- call Function8b50a
- ld a, [hl]
- ret
-; 8b529 (22:7529)
-
-Unknown_8b529: ; 8b529
- dwcoord 2, 5
- db 1, 4, $20, $49, 0, 1
- dwcoord 7, 4
- db 1, 4, $48, $41, 0, 0
-; 8b539
-
-Function8b539: ; 8b539 (22:7539)
- ld bc, wd017
- call Function8b36c
- xor a
- ld [wd012], a
- ld [wd02e], a
- call Function8b493
- call Function8b4fd
- ld e, $0
- call Function89c44
- call CGBOnly_LoadEDTile
- ret
-
-Function8b555: ; 8b555 (22:7555)
-.loop
- ld hl, UnknownText_0x8b5ce
- call PrintText
- ld bc, wd017
- call Function8b45c
- jr c, .asm_8b5c8
- call Function89448
- ld bc, wd017
- call Function8b493
- ld bc, wd017
- call Function8b664
- jr nz, .asm_8b57c
- ld hl, UnknownText_0x8b5e2
- call PrintText
- jr .loop
-
-.asm_8b57c
- ld hl, UnknownText_0x8b5d3
- call PrintText
- ld bc, wd013
- call Function8b45c
- jr c, .loop
- ld bc, wd017
- ld hl, wd013
- call Function8b3a4
- jr z, .strings_equal
- call Function89448
- ld bc, wd013
- call Function8b493
- ld hl, UnknownText_0x8b5d8
- call PrintText
- jr .asm_8b57c
-
-.strings_equal
- call OpenSRAMBank4
- ld hl, wd013
- ld de, $a037 ; 4:a037
- ld bc, $4
- call CopyBytes
- call CloseSRAM
- call Function89448
- ld bc, wd013
- call Function8b493
- ld hl, UnknownText_0x8b5dd
- call PrintText
- and a
-.asm_8b5c8
- push af
- call Function89448
- pop af
- ret
-; 8b5ce (22:75ce)
-
-UnknownText_0x8b5ce: ; 0x8b5ce
- ; Please enter any four-digit number.
- text_jump UnknownText_0x1bc187
- db "@"
-; 0x8b5d3
-
-UnknownText_0x8b5d3: ; 0x8b5d3
- ; Enter the same number to confirm.
- text_jump UnknownText_0x1bc1ac
- db "@"
-; 0x8b5d8
-
-UnknownText_0x8b5d8: ; 0x8b5d8
- ; That's not the same number.
- text_jump UnknownText_0x1bc1cf
- db "@"
-; 0x8b5dd
-
-UnknownText_0x8b5dd: ; 0x8b5dd
- ; Your PASSCODE has been set. Enter this number next time to open the CARD FOLDER.
- text_jump UnknownText_0x1bc1eb
- db "@"
-; 0x8b5e2
-
-UnknownText_0x8b5e2: ; 0x8b5e2
- ; 0000 is invalid!
- text_jump UnknownText_0x1bc23e
- db "@"
-; 0x8b5e7
-
-Function8b5e7: ; 8b5e7 (22:75e7)
- ld bc, wd013
- call Function8b36c
- xor a
- ld [wd012], a
- ld [wd02e], a
- call Function8b493
- call Function891ab
- call Function8b4fd
- ld e, $0
- call Function89c44
-.asm_8b602
- ld hl, UnknownText_0x8b642
- call PrintText
- ld bc, wd013
- call Function8b45c
- jr c, .asm_8b63c
- call Function89448
- ld bc, wd013
- call Function8b493
- call OpenSRAMBank4
- ld hl, $a037 ; 4:a037
- call Function8b3a4
- call CloseSRAM
- jr z, .asm_8b635
- ld hl, UnknownText_0x8b647
- call PrintText
- ld bc, wd013
- call Function8b36c
- jr .asm_8b602
-.asm_8b635
- ld hl, UnknownText_0x8b64c
- call PrintText
- and a
-.asm_8b63c
- push af
- call Function89448
- pop af
- ret
-; 8b642 (22:7642)
-
-UnknownText_0x8b642: ; 0x8b642
- ; Enter the CARD FOLDER PASSCODE.
- text_jump UnknownText_0x1bc251
- db "@"
-; 0x8b647
-
-UnknownText_0x8b647: ; 0x8b647
- ; Incorrect PASSCODE!
- text_jump UnknownText_0x1bc272
- db "@"
-; 0x8b64c
-
-UnknownText_0x8b64c: ; 0x8b64c
- ; CARD FOLDER open.@ @
- text_jump UnknownText_0x1bc288
- start_asm
- ld de, SFX_TWINKLE
- call PlaySFX
- call WaitSFX
- ld c, $8
- call DelayFrames
- ld hl, .string_8b663
- ret
-.string_8b663
- db "@"
-; 8b664
-
-Function8b664: ; 8b664 (22:7664)
- push bc
- ld de, $4
-.asm_8b668
- ld a, [bc]
- cp $0
- jr nz, .asm_8b66e
- inc d
-.asm_8b66e
- inc bc
- dec e
- jr nz, .asm_8b668
- pop bc
- ld a, d
- cp $4
- ret
-
-Function8b677: ; 8b677
- call ClearBGPalettes
- call DisableLCD
- call Function8b690
- call Function8b6bb
- call Function8b6ed
- call EnableLCD
- call Function891ab
- call SetPalettes
- ret
-; 8b690
-
-Function8b690: ; 8b690
- ld hl, GFX_17afa5 + $514
- ld de, VTiles2
- ld bc, $160
- ld a, BANK(GFX_17afa5)
- call FarCopyBytes
- ld hl, GFX_17afa5 + $514 + $160 - $10
- ld de, VTiles2 tile $61
- ld bc, $10
- ld a, BANK(GFX_17afa5)
- call FarCopyBytes
- ld hl, GFX_17afa5 + $514 + $160
- ld de, VTiles1 tile $6e
- ld bc, $10
- ld a, BANK(GFX_17afa5)
- call FarCopyBytes
- ret
-; 8b6bb
-
-Function8b6bb: ; 8b6bb
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, Palette_8b6d5
- ld de, UnknBGPals
- ld bc, $0018
- call CopyBytes
- pop af
- ld [rSVBK], a
- call Function8949c
- ret
-; 8b6d5
-
-Palette_8b6d5: ; 8b6d5
- RGB 31, 31, 31
- RGB 31, 21, 00
- RGB 14, 07, 03
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 31, 21, 00
- RGB 22, 09, 17
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 31, 21, 00
- RGB 06, 24, 08
- RGB 00, 00, 00
-; 8b6ed
-
-Function8b6ed: ; 8b6ed
- hlcoord 0, 0, AttrMap
- ld bc, $012c
- xor a
- call ByteFill
- hlcoord 0, 14, AttrMap
- ld bc, $0050
- ld a, $7
- call ByteFill
- ret
-; 8b703
-
-Function8b703: ; 8b703
- call Mobile22_SetBGMapMode0
- push hl
- ld a, $c
- ld [hli], a
- inc a
- call Function8b73e
- inc a
- ld [hl], a
- pop hl
- push hl
- push bc
- ld de, SCREEN_WIDTH
- add hl, de
-.asm_8b717
- push hl
- ld a, $f
- ld [hli], a
- ld a, $7f
- call Function8b73e
- ld a, $11
- ld [hl], a
- pop hl
- ld de, SCREEN_WIDTH
- add hl, de
- dec b
- jr nz, .asm_8b717
- call Function8b732
- pop bc
- pop hl
- jr Function8b744
-; 8b732
-
-Function8b732: ; 8b732
- ld a, $12
- ld [hli], a
- ld a, $13
- call Function8b73e
- ld a, $14
- ld [hl], a
- ret
-; 8b73e
-
-Function8b73e: ; 8b73e
- ld d, c
-.asm_8b73f
- ld [hli], a
- dec d
- jr nz, .asm_8b73f
- ret
-; 8b744
-
-Function8b744: ; 8b744
- ld de, AttrMap - TileMap
- add hl, de
- inc b
- inc b
- inc c
- inc c
- xor a
-.asm_8b74d
- push bc
- push hl
-.asm_8b74f
- ld [hli], a
- dec c
- jr nz, .asm_8b74f
- pop hl
- ld de, SCREEN_WIDTH
- add hl, de
- pop bc
- dec b
- jr nz, .asm_8b74d
- ret
-; 8b75d
-
-Function8b75d: ; 8b75d
- call Mobile22_SetBGMapMode0
- hlcoord 0, 0
- ld a, $1
- ld bc, SCREEN_WIDTH
- call ByteFill
- hlcoord 0, 1
- ld a, $2
- ld [hl], a
- hlcoord 9, 1
- ld c, $b
- call Function8b788
- hlcoord 1, 1
- ld a, $4
- ld e, $8
-.asm_8b780
- ld [hli], a
- inc a
- dec e
- jr nz, .asm_8b780
- jr Function8b79e
-; 8b787
-
-Function8b787: ; 8b787
- ret
-; 8b788
-
-Function8b788: ; 8b788
-.asm_8b788
- ld a, $2
- ld [hli], a
- dec c
- ret z
- ld a, $1
- ld [hli], a
- dec c
- ret z
- ld a, $3
- ld [hli], a
- dec c
- ret z
- ld a, $1
- ld [hli], a
- dec c
- jr nz, .asm_8b788
- ret
-; 8b79e
-
-Function8b79e: ; 8b79e
- hlcoord 0, 1, AttrMap
- ld a, $1
- ld [hli], a
- hlcoord 9, 1, AttrMap
- ld e, $b
-.asm_8b7a9
- ld a, $2
- ld [hli], a
- dec e
- ret z
- xor a
- ld [hli], a
- dec e
- ret z
- ld a, $1
- ld [hli], a
- dec e
- ret z
- xor a
- ld [hli], a
- dec e
- jr nz, .asm_8b7a9
- ret
-; 8b7bd
-
-Function8b7bd: ; 8b7bd
- call Function8b855
- ld hl, MenuDataHeader_0x8b867
- call CopyMenuDataHeader
- ld a, [wd030]
- ld [wMenuCursorBuffer], a
- ld a, [wd031]
- ld [wMenuScrollPosition], a
- ld a, [wd032]
- and a
- jr z, .asm_8b7e0
- ld a, [wMenuFlags]
- set 3, a
- ld [wMenuFlags], a
-
-.asm_8b7e0
- ld a, [wd0e3]
- and a
- jr z, .asm_8b7ea
- dec a
- ld [wScrollingMenuCursorPosition], a
-
-.asm_8b7ea
- hlcoord 0, 2
- ld b, $b
- ld c, $12
- call Function8b703
- call Function8b75d
- call UpdateSprites
- call Function89209
- call ScrollingMenu
- call Function8920f
- ld a, [wMenuJoypad]
- cp $2
- jr z, .asm_8b823
- cp $20
- jr nz, .asm_8b813
- call Function8b832
- jr .asm_8b7ea
-
-.asm_8b813
- cp $10
- jr nz, .asm_8b81c
- call Function8b83e
- jr .asm_8b7ea
-
-.asm_8b81c
- ld a, [MenuSelection]
- cp $ff
- jr nz, .asm_8b824
-
-.asm_8b823
- xor a
-
-.asm_8b824
- ld c, a
- ld a, [wMenuCursorY]
- ld [wd030], a
- ld a, [wMenuScrollPosition]
- ld [wd031], a
- ret
-; 8b832
-
-Function8b832: ; 8b832
- ld a, [wMenuScrollPosition]
- ld hl, wMenuData2Items
- sub [hl]
- jr nc, Function8b84b
- xor a
- jr Function8b84b
-; 8b83e
-
-Function8b83e: ; 8b83e
- ld a, [wMenuScrollPosition]
- ld hl, wMenuData2Items
- add [hl]
- cp $24
- jr c, Function8b84b
- ld a, $24
-
-Function8b84b: ; 8b84b
- ld [wMenuScrollPosition], a
- ld a, [wMenuCursorY]
- ld [wMenuCursorBuffer], a
- ret
-; 8b855
-
-Function8b855: ; 8b855
- ld a, $28
- ld hl, wd002
- ld [hli], a
- ld c, $28
- xor a
-.asm_8b85e
- inc a
- ld [hli], a
- dec c
- jr nz, .asm_8b85e
- ld a, $ff
- ld [hl], a
- ret
-; 8b867
-
-MenuDataHeader_0x8b867: ; 0x8b867
- db $40 ; flags
- db 03, 01 ; start coords
- db 13, 18 ; end coords
- dw MenuData2_0x8b870
- db 1 ; default option
-; 0x8b86f
-
- db 0
-
-MenuData2_0x8b870: ; 0x8b870
- db $3c ; flags
- db 5 ; items
- db 3, 1
- dbw 0, wd002
- dba Function8b880
- dba Function8b88c
- dba Function8b8c8
-; 8b880
-
-Function8b880: ; 8b880
- ld h, d
- ld l, e
- ld de, MenuSelection
- lb bc, PRINTNUM_LEADINGZEROS | 1, 2
- call PrintNum
- ret
-; 8b88c
-
-Function8b88c: ; 8b88c
- call OpenSRAMBank4
- ld h, d
- ld l, e
- push hl
- ld de, String_89116
- call Function8931b
- call Function8932d
- jr c, .asm_8b8a3
- ld hl, 0
- add hl, bc
- ld d, h
- ld e, l
-
-.asm_8b8a3
- pop hl
- push hl
- call PlaceString
- pop hl
- ld d, $0
- ld e, $6
- add hl, de
- push hl
- ld de, String_89116
- call Function8931b
- call Function8934a
- jr c, .asm_8b8c0
- ld hl, $0006
- add hl, bc
- ld d, h
- ld e, l
-
-.asm_8b8c0
- pop hl
- call PlaceString
- call CloseSRAM
- ret
-; 8b8c8
-
-Function8b8c8: ; 8b8c8
- hlcoord 0, 14
- ld b, $2
- ld c, $12
- call TextBox
- ld a, [wd033]
- ld b, 0
- ld c, a
- ld hl, Unknown_8b903
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld d, h
- ld e, l
- hlcoord 1, 16
- call PlaceString
- hlcoord 0, 13
- ld a, $f
- ld [hl], a
- hlcoord 19, 13
- ld a, $11
- ld [hl], a
- ld a, [wMenuScrollPosition]
- cp $24
- ret c
- hlcoord 0, 13
- ld c, $12
- call Function8b732
- ret
-; 8b903
-
-Unknown_8b903: ; 8b903
- dw String_8b90b
- dw String_8b919
- dw String_8b92a
- dw String_8b938
-
-String_8b90b: db "めいしを えらんでください@" ; Please select a noun.
-String_8b919: db "どの めいしと いれかえますか?@" ; OK to swap with any noun?
-String_8b92a: db "あいてを えらんでください@" ; Please select an opponent.
-String_8b938: db "いれる ところを えらんでください@" ; Please select a location.
-; 8b94a
-
-Function8b94a: ; 8b94a
- ld [wd033], a
- xor a
- ld [wMenuScrollPosition], a
- ld [wd032], a
- ld [wd0e3], a
- ld [wd031], a
- ld a, $1
- ld [wd030], a
- ret
-; 8b960
-
-
-Function8b960: ; 8b960 (22:7960)
- ld hl, MenuDataHeader_0x8b9ac
- call LoadMenuDataHeader
- call Function8b9e9
- jr c, .asm_8b97a
- hlcoord 11, 0
- ld b, $6
- ld c, $7
- call Function8b703
- ld hl, MenuDataHeader_0x8b9b1
- jr .asm_8b987
-.asm_8b97a
- hlcoord 11, 0
- ld b, $a
- ld c, $7
- call Function8b703
- ld hl, MenuDataHeader_0x8b9ca
-.asm_8b987
- ld a, $1
- call Function89d5e
- ld hl, Function8b9ab
- call Function89d85
- call ExitMenu
- jr c, .asm_8b99c
- call Function8b99f
- jr nz, .asm_8b99d
-.asm_8b99c
- xor a
-.asm_8b99d
- ld c, a
- ret
-
-Function8b99f: ; 8b99f (22:799f)
- ld hl, wd002
- dec a
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [hl]
- cp $ff
- ret
-; 8b9ab (22:79ab)
-
-Function8b9ab: ; 8b9ab
- ret
-; 8b9ac
-
-MenuDataHeader_0x8b9ac: ; 0x8b9ac
- db $40 ; flags
- db 00, 11 ; start coords
- db 11, 19 ; end coords
-
-MenuDataHeader_0x8b9b1: ; 0x8b9b1
- db $40 ; flags
- db 00, 11 ; start coords
- db 07, 19 ; end coords
- dw MenuData2_0x8b9b9
- db 1 ; default option
-; 0x8b9b9
-
-MenuData2_0x8b9b9: ; 0x8b9b9
- db $a0 ; flags
- db 3 ; items
- db "へんしゅう@" ; EDIT
- db "いれかえ@" ; REPLACE
- db "やめる@" ; QUIT
-; 0x8b9ca
-
-MenuDataHeader_0x8b9ca: ; 0x8b9ca
- db $40 ; flags
- db 00, 11 ; start coords
- db 11, 19 ; end coords
- dw MenuData2_0x8b9d2
- db 1 ; default option
-; 0x8b9d2
-
-MenuData2_0x8b9d2: ; 0x8b9d2
- db $a0 ; flags
- db 5 ; items
- db "みる@" ; VIEW
- db "へんしゅう@" ; EDIT
- db "いれかえ@" ; REPLACE
- db "けす@" ; ERASE
- db "やめる@" ; QUIT
-; 0x8b9e9
-
-Function8b9e9: ; 8b9e9 (22:79e9)
- call OpenSRAMBank4
- call Function8931b
- call Function8932d
- jr nc, .asm_8b9f6
- jr .asm_8b9ff
-.asm_8b9f6
- ld hl, $11
- add hl, bc
- call Function89b45
- jr c, .asm_8ba08
-.asm_8b9ff
- call Function892b4
- and a
- ld de, Unknown_8ba1c
- jr .asm_8ba0c
-.asm_8ba08
- ld de, Unknown_8ba1f
- scf
-.asm_8ba0c
- push af
- ld hl, wd002
-.asm_8ba10
- ld a, [de]
- inc de
- ld [hli], a
- cp $ff
- jr nz, .asm_8ba10
- call CloseSRAM
- pop af
- ret
-; 8ba1c (22:7a1c)
-
-Unknown_8ba1c: ; 8b1ac
- db 2, 4, -1
-
-Unknown_8ba1f: ; 8ba1f
- db 1, 2, 4, 3, -1
-; 8ba24
diff --git a/misc/mobile_40.asm b/misc/mobile_40.asm
deleted file mode 100644
index 8cd0311f0..000000000
--- a/misc/mobile_40.asm
+++ /dev/null
@@ -1,8156 +0,0 @@
-Function100000: ; 100000
-; d: 1 or 2
-; e: bank
-; bc: addr
- ld a, [rSVBK]
- push af
- ld a, 1
- ld [rSVBK], a
-
- call Function100022
- call Function1000ba
- call Function100675
- call Function100057
- call Function10016f
- call Function100276
-
- push bc
- call Function100301
- pop bc
-
- pop af
- ld [rSVBK], a
- ret
-; 100022
-
-Function100022: ; 100022
- push de
- push bc
- call SetRAMStateForMobile
- pop bc
- pop de
- ld a, d
- ld [wcd21], a
- ld a, e
- ld [wcd22], a
- ld a, c
- ld [wcd23], a
- ld a, b
- ld [wcd24], a
- callba Function10127e
- callba MobileFunc_106462
- callba Function106464 ; load broken gfx
- callba Function11615a ; init RAM
- ld hl, VramState
- set 1, [hl]
- ret
-; 100057
-
-Function100057: ; 100057
- call DisableMobile
- call ReturnToMapFromSubmenu
- ld hl, VramState
- res 1, [hl]
- ret
-; 100063
-
-SetRAMStateForMobile: ; 100063
- xor a
- ld hl, BGMapBuffer
- ld bc, $65
- call ByteFill
- xor a
- ld hl, wc300
- ld bc, $100
- call ByteFill
- ld a, [rIE]
- ld [BGMapBuffer], a
- xor a
- ld [hMapAnims], a
- ld [hLCDCPointer], a
- ret
-; 100082
-
-EnableMobile: ; 100082
- xor a
- ld hl, OverworldMap
- ld bc, OverworldMapEnd - OverworldMap
- call ByteFill
-
- di
- call DoubleSpeed
- xor a
- ld [rIF], a
- ld a, 1 << VBLANK + 1 << LCD_STAT + 1 << TIMER + 1 << SERIAL
- ld [rIE], a
- xor a
- ld [hMapAnims], a
- ld [hLCDCPointer], a
- ld a, $01
- ld [hMobileReceive], a
- ld [hMobile], a
- ei
-
- ret
-; 0x1000a4
-
-DisableMobile: ; 1000a4
- di
- xor a
- ld [hMobileReceive], a
- ld [hMobile], a
- xor a
- ld [hVBlank], a
- call NormalSpeed
- xor a
- ld [rIF], a
- ld a, [BGMapBuffer]
- ld [rIE], a
- ei
- ret
-; 1000ba
-
-Function1000ba: ; 1000ba
-.loop
- ; call [wcd22]:([wcd23][wcd24] + [wMobileCommsJumptableIndex])
- ld hl, wcd23
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [wMobileCommsJumptableIndex]
- ld e, a
- ld d, 0
- add hl, de
- add hl, de
- ld a, [wcd22]
- call GetFarHalfword
- ld a, [wcd22]
- rst FarCall
-
- call Function1000e8
- call Function1000fa
- call Function100144
- call Function100163
- ld a, [wcd2b]
- and a
- jr z, .loop
- call DelayFrame
- ret
-; 1000e8
-
-Function1000e8: ; 1000e8
- ld hl, wcd29
- bit 7, [hl]
- ret z
- callba Function115dd3
- ld hl, wcd29
- set 6, [hl]
- ret
-; 1000fa
-
-Function1000fa: ; 1000fa
- ld a, [wc30d]
- and a
- ret z
- ld hl, wcd29
- bit 4, [hl]
- ret z
- ld a, [wcd2b]
- and a
- jr nz, .asm_100117
- callba Function11619d
- ld hl, wcd29
- set 6, [hl]
- ret
-
-.asm_100117
- di
- xor a
- ld [rIF], a
- ld a, [rIE]
- and $13
- ld [rIE], a
- xor a
- ld [hMobileReceive], a
- ld [hMobile], a
- ei
-
- ld a, [wLinkMode]
- push af
- xor a
- ld [wLinkMode], a
- ld a, $04
- ld [wc314 + 5], a
- callba Function11619d
- ld hl, wcd29
- set 6, [hl]
- pop af
- ld [wLinkMode], a
- ret
-; 100144
-
-Function100144: ; 100144
- ld hl, wcd29
- bit 5, [hl]
- jr z, .asm_100155
- res 5, [hl]
- res 2, [hl]
- res 6, [hl]
- call Function100320
- ret
-
-.asm_100155
- bit 2, [hl]
- ret z
- res 2, [hl]
- res 6, [hl]
- callba HDMATransferTileMapToWRAMBank3
- ret
-; 100163
-
-Function100163: ; 100163
- ld hl, wcd29
- bit 6, [hl]
- ret z
- res 6, [hl]
- call DelayFrame
- ret
-; 10016f
-
-Function10016f: ; 10016f
- ld a, [wcd2b]
- cp $01
- ret z
- cp $02
- ret z
- cp $ff
- jp z, .asm_1001f5
- cp $fe
- jr z, .asm_1001c4
- cp $f5
- jr z, .asm_1001e7
- cp $f6
- jr z, .asm_1001b6
- cp $fa
- jp z, .asm_1001bd
- cp $f7
- jp z, .asm_1001ee
- cp $f4
- jr z, .asm_1001d2
- cp $f3
- jr z, .asm_1001cb
- cp $f1
- jr z, .asm_1001c4
- cp $f2
- jr z, .asm_1001c4
- cp $fc
- jr z, .asm_1001e6
- cp $fb
- jr z, .asm_1001af
- cp $f8
- ret z
- ret ; ????????????????????????????
-
-.asm_1001af
- ld a, $d7
- ld de, 0
- jr .asm_1001d7
-
-.asm_1001b6
- ld a, $d5
- ld de, 0
- jr .asm_1001d7
-
-.asm_1001bd
- ld a, $d6
- ld de, 0
- jr .asm_1001d7
-
-.asm_1001c4
- ld a, $d2
- ld de, 2
- jr .asm_1001d7
-
-.asm_1001cb
- ld a, $d1
- ld de, 1
- jr .asm_1001d7
-
-.asm_1001d2
- ld a, $d0
- ld de, 0
-
-.asm_1001d7
- ld [wc300], a
- ld a, d
- ld [wc302], a
- ld a, e
- ld [wc301], a
- call Function10020b
- ret
-
-.asm_1001e6
- ret
-
-.asm_1001e7
- ld de, String10025e
- call Function100232
- ret
-
-.asm_1001ee
- ld de, String10024d
- call Function100232
- ret
-
-.asm_1001f5
- ld a, [wcd2c]
- ld [wc300], a
- ld a, [wcd2d]
- ld [wc302], a
- ld a, [wcd2d]
- ld [wc301], a
- call Function10020b
- ret
-; 10020b
-
-Function10020b: ; 10020b
- xor a
- ld [wc303], a
- callba FadeOutPalettes
- callba Function106464
- call HideSprites
- call DelayFrame
-
- ld a, [rSVBK]
- push af
- ld a, $01
- ld [rSVBK], a
-
- callba DisplayMobileError
-
- pop af
- ld [rSVBK], a
- ret
-; 100232
-
-Function100232: ; 100232
- push de
- callba Function106464
- call Function3f20
- call UpdateSprites
- hlcoord 1, 2
- pop de
- call PlaceString
- call Function100320
- call JoyWaitAorB
- ret
-; 10024d
-
-String10024d: ; 10024d
- db "つうしんを キャンセル しました@"
-; 10025e
-
-String10025e: ; 10025e
- db "おともだちと えらんだ へやが"
- next "ちがうようです@"
-; 100276
-
-Function100276: ; 100276
- ld a, [wcd2b]
- cp $01
- jr z, .asm_10029f
- cp $02
- jr z, .asm_100296
- cp $f5
- jr z, .asm_1002a5
- cp $f6
- jr z, .asm_1002a5
- cp $f7
- jr z, .asm_100293
- cp $f8
- jr z, .asm_1002b1
- jr .asm_1002c0
-
-.asm_100293
- ld c, $02
- ret
-
-.asm_100296
- callba Script_reloadmappart
- ld c, $04
- ret
-
-.asm_10029f
- call Function1002dc
- ld c, 0
- ret
-
-.asm_1002a5
- callba Script_reloadmappart
- call Function1002ed
- ld c, $03
- ret
-
-.asm_1002b1
- call Function1002c9
- call Function1002dc
- ld de, String10024d
- call Function100232
- ld c, $02
- ret
-
-.asm_1002c0
- call Function1002c9
- call Function1002dc
- ld c, $01
- ret
-; 1002c9
-
-Function1002c9: ; 1002c9
- ld hl, wcd2a
- bit 0, [hl]
- ret z
- callba CleanUpBattleRAM
- callba LoadPokemonData
- ret
-; 1002dc
-
-Function1002dc: ; 1002dc
- ld a, MAPSETUP_LINKRETURN
- ld [hMapEntryMethod], a
- callba RunMapSetupScript
- xor a
- ld [hMapEntryMethod], a
- call LoadStandardFont
- ret
-; 1002ed
-
-Function1002ed: ; 1002ed
- callba LoadOW_BGPal7
- callba ApplyPals
- ld a, $01
- ld [hCGBPalUpdate], a
- call DelayFrame
- ret
-; 100301
-
-Function100301: ; 100301
- ld hl, wcd2a
- bit 1, [hl]
- ret z
- callba Function106464
- callba Function10202c
- callba Function115dd3
- call Function100320
- call JoyWaitAorB
- ret
-; 100320
-
-Function100320: ; 100320
- callba Mobile_ReloadMapPart
- ret
-; 100327
-
-Function100327: ; 100327
- callba HDMATransferTileMapToWRAMBank3
- ret
-; 100327
-
-
-Function10032e: ; 10032e
- call Function10034d
- ld e, a
- ret nc
- ld [wcd2b], a
- ret
-; 100337
-
-Function100337: ; 100337
- call Function10032e
- ret c
- ld a, [wc821]
- bit 4, a
- jr z, .asm_100345
- ld a, e
- and a
- ret
-
-.asm_100345
- ld a, $f9
- ld e, a
- ld [wcd2b], a
- scf
- ret
-; 10034d
-
-Function10034d: ; 10034d
- ld a, [wc821]
- bit 1, a
- jr nz, .asm_10036a
- bit 2, a
- jr nz, .asm_10037e
- bit 3, a
- jr nz, .asm_100366
- bit 0, a
- jr nz, .asm_100364
- ld a, $01
- and a
- ret
-
-.asm_100364
- xor a
- ret
-
-.asm_100366
- ld a, $02
- and a
- ret
-
-.asm_10036a
- ld a, 0
- call Function3e32
- ld [wcd2c], a
- ld a, h
- ld [wcd2d], a
- ld a, l
- ld [wcd2e], a
- ld a, $ff
- scf
- ret
-
-.asm_10037e
- ld a, $fe
- scf
- ret
-; 100382
-
-Function100382: ; 100382
- ld a, [wcd27]
- ld hl, Jumptable_10044e
- rst JumpTable
- ret
-; 10038a
-
-Function10038a: ; 10038a
- ld hl, wccb4
- ld a, $2e
- call Function3e32
- ret
-; 100393
-
-Function100393: ; 100393
- ld hl, wcc60
- ld a, $3a
- call Function3e32
- ret
-; 10039c
-
-Function10039c: ; 10039c
- ld hl, wcc60
- ld de, w3_d000
- ld bc, $54
- ld a, $03
- call FarCopyWRAM
- ret
-; 1003ab
-
-Function1003ab: ; 1003ab
- ld hl, w3_d000
- ld de, wcc60
- ld bc, $54
- ld a, $03
- call FarCopyWRAM
- ret
-; 1003ba
-
-Function1003ba: ; 1003ba
- ld hl, wccb4
- ld de, w3_d080
- ld bc, $54
- ld a, $03
- call FarCopyWRAM
- ret
-; 1003c9
-
-Function1003c9: ; 1003c9
- ld hl, w3_d080
- ld de, wccb4
- ld bc, $54
- ld a, $03
- call FarCopyWRAM
- ret
-; 1003d8
-
-Function1003d8: ; 1003d8
- ld hl, wccb4
- ld a, [hli]
- ld c, a
- ld b, 0
- push hl
- add hl, bc
- ld a, [BGMapPalBuffer]
- ld [hl], a
- pop hl
- inc bc
- call Function10043a
- add hl, bc
- ld [hl], e
- inc hl
- ld [hl], d
- ld a, c
- add $02
- ld [wccb4], a
- ret
-; 1003f5
-
-Function1003f5: ; 1003f5
- ld a, [wcc60]
- sub $03
- ld [wcc60], a
- ld a, [wccb4]
- sub $03
- ld [wccb4], a
- ret
-; 100406
-
-Function100406: ; 100406
- ld a, [wcc60]
- sub $02
- ld c, a
- ld b, 0
- ld hl, wcc61
- call Function10043a
- add hl, bc
- ld a, [hli]
- cp e
- jr nz, .asm_100426
- ld a, [hld]
- cp d
- jr nz, .asm_100426
- dec hl
- ld a, [BGMapPalBuffer]
- cp [hl]
- jr nz, .asm_10042d
- xor a
- ret
-
-.asm_100426
- ld a, $f4
- ld [wcd2b], a
- jr .asm_100432
-
-.asm_10042d
- ld a, $f3
- ld [wcd2b], a
-
-.asm_100432
- push hl
- ld hl, wcd7c
- inc [hl]
- pop hl
- scf
- ret
-; 10043a
-
-Function10043a: ; 10043a
- push hl
- push bc
- ld de, 0
-.asm_10043f
- ld a, [hli]
- add e
- ld e, a
- ld a, d
- adc 0
- ld d, a
- dec bc
- ld a, b
- or c
- jr nz, .asm_10043f
- pop bc
- pop hl
- ret
-; 10044e
-
-
-Jumptable_10044e: ; 10044e (40:444e)
- dw Function10046a
- dw Function10047c
- dw Function100493
- dw Function1004ba
- dw Function1004f4
- dw Function1004ce
- dw Function1004de
- dw Function1004a4
- dw Function100495
- dw Function1004ce
- dw Function1004de
- dw Function1004e9
- dw Function1004f4
- dw Function1004a4
-
-Function10046a: ; 10046a
- ld hl, BGMapPalBuffer
- inc [hl]
- call Function1003d8
- call Function1003ba
- ld a, [wcd27]
- inc a
- ld [wcd27], a
- ret
-; 10047c
-
-Function10047c: ; 10047c
- call Function100337
- ret c
- ret z
- cp $02
- jr z, .asm_100487
- jr .asm_10048d
-
-.asm_100487
- ld a, $08
- ld [wcd27], a
- ret
-
-.asm_10048d
- ld a, $02
- ld [wcd27], a
- ret
-; 100493
-
-Function100493: ; 100493
- jr asm_100497
-
-Function100495: ; 100495
- jr asm_100497
-
-asm_100497
- call Function100337
- ret c
- ret z
- ld a, [wcd27]
- inc a
- ld [wcd27], a
- ret
-; 1004a4
-
-Function1004a4: ; 1004a4
- call Function100406
- jr c, .asm_1004b8
- call Function1003c9
- call Function1003f5
- ld a, [wcd27]
- set 7, a
- ld [wcd27], a
- ret
-
-.asm_1004b8
- scf
- ret
-; 1004ba
-
-Function1004ba: ; 1004ba
- call Function10038a
- and a
- jr nz, .asm_1004c8
- ld a, [wcd27]
- inc a
- ld [wcd27], a
- ret
-
-.asm_1004c8
- ld a, $08
- ld [wcd27], a
- ret
-; 1004ce
-
-Function1004ce: ; 1004ce
- call Function100337
- ret c
- ret z
- cp $02
- ret nz
- ld a, [wcd27]
- inc a
- ld [wcd27], a
- ret
-; 1004de
-
-Function1004de: ; 1004de
- call Function100393
- ld a, [wcd27]
- inc a
- ld [wcd27], a
- ret
-; 1004e9
-
-Function1004e9: ; 1004e9
- call Function10038a
- ld a, [wcd27]
- inc a
- ld [wcd27], a
- ret
-; 1004f4
-
-Function1004f4: ; 1004f4
- call Function100337
- ret c
- ret z
- ld a, [wcd27]
- inc a
- ld [wcd27], a
- call Function10039c
- ret
-; 100504
-
-Function100504: ; 100504
- push de
- call Function3f20
- call UpdateSprites
- pop de
- hlcoord 4, 2
- call PlaceString
- ret
-; 100513
-
-Function100513: ; 100513
- call Function3f7c
- call PlaceVerticalMenuItems
- call InitVerticalMenuCursor
- ld hl, w2DMenuFlags1
- set 7, [hl]
- ret
-; 100522
-
-Function100522: ; 100522
- ld a, [wcd28]
- ld hl, Jumptable_10052a
- rst JumpTable
- ret
-; 10052a
-
-Jumptable_10052a: ; 10052a
- dw Function100534
- dw Function100545
- dw Function100545
- dw Function100545
- dw Function10054d
-; 100534
-
-Function100534: ; 100534
- call Function100513
- call UpdateSprites
- call ApplyTilemap
- ld a, [wcd28]
- inc a
- ld [wcd28], a
- ret
-; 100545
-
-Function100545: ; 100545
- ld a, [wcd28]
- inc a
- ld [wcd28], a
- ret
-; 10054d
-
-Function10054d: ; 10054d
- callba MobileMenuJoypad
- ld a, c
- ld hl, wMenuJoypadFilter
- and [hl]
- ret z
- call MenuClickSound
- bit 0, a
- jr nz, .asm_100565
- bit 1, a
- jr nz, .asm_10056f
- ret
-
-.asm_100565
- ld a, [wcd28]
- set 7, a
- ld [wcd28], a
- and a
- ret
-
-.asm_10056f
- ld a, [wcd28]
- set 7, a
- ld [wcd28], a
- scf
- ret
-; 100579
-
-Function100579: ; 100579
- ld a, [wcd26]
- ld hl, Jumptable_100581
- rst JumpTable
- ret
-; 100581
-
-Jumptable_100581: ; 100581
- dw Function100585
- dw Function100597
-; 100585
-
-Function100585: ; 100585
- ld hl, MenuDataHeader_1005b2
- call LoadMenuDataHeader
- ld a, 0
- ld [wcd28], a
- ld a, [wcd26]
- inc a
- ld [wcd26], a
-
-Function100597: ; 100597
- call Function100522
- ld a, [wcd28]
- bit 7, a
- ret z
- jr nc, .asm_1005a6
- xor a
- ld [wMenuCursorY], a
-
-.asm_1005a6
- call ExitMenu
- ld a, [wcd26]
- set 7, a
- ld [wcd26], a
- ret
-; 1005b2
-
-MenuDataHeader_1005b2: ; 1005b2
- db $40 ; flags
- db 6, 14
- db 10, 19
- dw MenuData2_1005ba
- db 1 ; default option
-
-MenuData2_1005ba:
- db $c0 ; flags
- db 2
- db "はい@"
- db "いいえ@"
-; 1005c3
-
-Function1005c3: ; 1005c3
- ld a, [wcd26]
- ld hl, Jumptable_1005cb
- rst JumpTable
- ret
-; 1005cb
-
-Jumptable_1005cb: ; 1005cb
- dw Function1005cf
- dw Function1005e1
-; 1005cf
-
-Function1005cf: ; 1005cf
- ld hl, MenuDataHeader_1005fc
- call LoadMenuDataHeader
- ld a, 0
- ld [wcd28], a
- ld a, [wcd26]
- inc a
- ld [wcd26], a
-
-Function1005e1: ; 1005e1
- call Function100522
- ld a, [wcd28]
- bit 7, a
- ret z
- jr nc, .asm_1005f0
- xor a
- ld [wMenuCursorY], a
-.asm_1005f0
- call ExitMenu
- ld a, [wcd26]
- set 7, a
- ld [wcd26], a
- ret
-; 1005fc
-
-MenuDataHeader_1005fc: ; 1005fc
- db $40 ; flags
- db 6, 14
- db 10, 19
- dw MenuData2_100604
- db 1 ; default option
-
-MenuData2_100604: ; 100604
- db $c0 ; flags
- db 2
- db "かける@"
- db "まつ@"
-; 10060d
-
-Mobile_CommunicationStandby: ; 10060d
- hlcoord 3, 10
- ld b, 1
- ld c, 11
- call Function3eea
- ld de, .String
- hlcoord 4, 11
- call PlaceString
- ret
-; 100621
-
-.String: ; 100621
- db "つうしんたいきちゅう!@"
-; 10062d
-
-AdvanceMobileInactivityTimerAndCheckExpired: ; 10062d
- push bc
- call IncrementMobileInactivityTimerByCFrames
- pop bc
- ld a, [wMobileInactivityTimerMinutes]
- cp b
- jr nc, .timed_out
- and a
- ret
-
-.timed_out
- ld a, $fa
- ld [wcd2b], a
- scf
- ret
-; 100641
-
-StartMobileInactivityTimer: ; 100641
- xor a
- ld [wMobileInactivityTimerMinutes], a
- ld [wMobileInactivityTimerSeconds], a
- ld [wMobileInactivityTimerFrames], a
- ret
-; 10064c
-
-IncrementMobileInactivityTimerBy1Frame: ; 10064c
- ld c, 1
-IncrementMobileInactivityTimerByCFrames: ; 10064e
- ld hl, wMobileInactivityTimerFrames ; timer?
- ld a, [hl]
- add c
- cp 60
- jr c, .seconds
- xor a
-
-.seconds
- ld [hld], a
- ret c
- ld a, [hl]
- inc a
- cp 60
- jr c, .minutes
- xor a
-
-.minutes
- ld [hld], a
- ret c
- inc [hl]
- ret
-; 100665
-
-Function100665: ; 100665
- call UpdateTime
- ld hl, wcd36
- ld a, [hHours]
- ld [hli], a
- ld a, [hMinutes]
- ld [hli], a
- ld a, [hSeconds]
- ld [hl], a
- ret
-; 100675
-
-Function100675: ; 100675
- ld hl, wcd2a
- bit 2, [hl]
- set 2, [hl]
- ret nz
- call Function1006d3
- ret
-; 100681
-
-Function100681: ; 100681
- push hl
- ld hl, wcd2a
- bit 2, [hl]
- ld hl, wcd2a
- set 2, [hl]
- pop hl
- jr nz, .asm_100694
- push hl
- call Function1006d3
- pop hl
-.asm_100694
- ld de, wcd32
-
-Function100697: ; 100697
- ld a, [de]
- and a
- jr nz, .asm_1006bb
- inc de
- push de
- call .asm_1006b4
- ld de, String1006c2
- call PlaceString
- ld h, b
- ld l, c
- pop de
- inc de
- call .asm_1006b4
- ld de, String1006c6
- call PlaceString
- ret
-
-.asm_1006b4
- lb bc, PRINTNUM_LEADINGZEROS | 1, 2
- call PrintNum
- ret
-
-.asm_1006bb
- ld de, String1006ca
- call PlaceString
- ret
-; 1006c2
-
-String1006c2: ; 1006c2
- db "ふん @"
-String1006c6: ; 1006c6
- db "びょう@"
-String1006ca: ; 1006ca
- db "1じかんいじょう@"
-; 1006d3
-
-Function1006d3: ; 1006d3
- call UpdateTime
- ld de, wcd34
- ld hl, wcd38
-
-Function1006dc: ; 1006dc
- ld a, [hld]
- ld c, a
- ld a, [hSeconds]
- sub c
- jr nc, .asm_1006e5
- add $3c
-
-.asm_1006e5
- ld [de], a
- dec de
- ld a, [hld]
- ld c, a
- ld a, [hMinutes]
- sbc c
- jr nc, .asm_1006f0
- add $3c
-
-.asm_1006f0
- ld [de], a
- dec de
- ld a, [hl]
- ld c, a
- ld a, [hHours]
- sbc c
- jr nc, .asm_1006fb
- add $18
-
-.asm_1006fb
- ld [de], a
- ret
-; 1006fd
-
-Function1006fd: ; 1006fd
- ld a, $04
- ld hl, $a800
- call GetSRAMBank
- xor a
- ld [hli], a
- ld [hli], a
- ld [hli], a
- call CloseSRAM
- ret
-; 10070d
-
-Function10070d: ; 10070d
- ld a, $04
- ld hl, $a800
- call GetSRAMBank
- xor a
- ld [hli], a
- ld a, $0a
- ld [hli], a
- xor a
- ld [hli], a
- call CloseSRAM
- ret
-; 100720
-
-Function100720: ; 100720
- xor a
- ld [wcd6a], a
- call UpdateTime
- ld a, [hHours]
- ld [wcd72], a
- ld a, [hMinutes]
- ld [wcd73], a
- ld a, [hSeconds]
- ld [wcd74], a
- ld a, $04
- ld hl, $a800
- call GetSRAMBank
- ld a, [hli]
- ld [wcd6c], a
- ld a, [hli]
- ld [wcd6d], a
- ld a, [hli]
- ld [wcd6e], a
- call CloseSRAM
- ld a, [wcd6d]
- ld [wcd6b], a
- ret
-; 100754
-
-Function100754: ; 100754
- call UpdateTime
- ld a, [hHours]
- ld [wcd72], a
- ld a, [hMinutes]
- ld [wcd73], a
- ld a, [hSeconds]
- ld [wcd74], a
- ld a, [wcd6d]
- ld [wcd6b], a
- ld hl, wcd2a
- res 6, [hl]
- ret
-; 100772
-
-Function100772: ; 100772
- push de
- ld hl, wcd6c
- ld a, [de]
- cp [hl]
- jr c, .asm_10079a
- jr nz, .asm_10078c
- inc hl
- inc de
- ld a, [de]
- cp [hl]
- jr c, .asm_10079a
- jr nz, .asm_10078c
- inc hl
- inc de
- ld a, [de]
- cp [hl]
- jr c, .asm_10079a
- jr z, .asm_10079a
-
-.asm_10078c
- pop hl
- ld a, [hli]
- ld [wcd6c], a
- ld a, [hli]
- ld [wcd6d], a
- ld a, [hli]
- ld [wcd6e], a
- ret
-
-.asm_10079a
- pop de
- ret
-; 10079c
-
-
-Function10079c: ; 10079c
- ld a, [wcd21]
- cp $01
- jr nz, .dont_quit
- ld hl, wcd2a
- bit 5, [hl]
- jr nz, .dont_quit
- ld hl, wcd2a
- bit 6, [hl]
- jr nz, .dont_quit
- ld a, [wcd6a]
- add c
- cp 60
- jr nc, .overflow
- ld [wcd6a], a
- and a
- ret
-
-.overflow
- sub 60
- ld [wcd6a], a
- ld d, b
- push de
- call Function1007f6
- pop de
- jr c, .quit
- ld a, c
- and a
- jr nz, .quit
- ld a, b
- cp 10
- jr nc, .quit
- ld a, d
- and a
- ret z
- ld a, [wcd6b]
- cp b
- ret z
- ld a, b
- ld [wcd6b], a
- call Function1008e0
- and a
- ret
-
-.quit
- call Function1008e0
- ld hl, wcd2a
- set 4, [hl]
- ld a, $fc
- ld [wcd2b], a
- scf
- ret
-
-.dont_quit
- and a
- ret
-; 1007f6
-
-Function1007f6: ; 1007f6
- call UpdateTime
- ld hl, wcd74
- ld de, wcd71
- call Function1006dc
- ld a, $04
- call GetSRAMBank
- ld hl, $a802
- call Function100826
- call CloseSRAM
- ld hl, wcd6e
- call Function100826
- ld a, [hHours]
- ld [wcd72], a
- ld a, [hMinutes]
- ld [wcd73], a
- ld a, [hSeconds]
- ld [wcd74], a
- ret
-; 100826
-
-Function100826: ; 100826
- ld a, [wcd71]
- add [hl]
- sub $3c
- jr nc, .asm_100830
- add $3c
-
-.asm_100830
- ld [hld], a
- ccf
- ld a, [BGMapBufferPtrs]
- adc [hl]
- sub $3c
- jr nc, .asm_10083c
- add $3c
-
-.asm_10083c
- ld [hld], a
- ld b, a
- ccf
- ld a, [wcd6f]
- adc [hl]
- ld [hl], a
- ld c, a
- ret
-; 100846
-
-Function100846: ; 100846
- ld hl, wcd2a
- bit 5, [hl]
- jr nz, .asm_10087c
- ld a, [wcd6e]
- ld c, a
- ld a, 0
- sub c
- jr nc, .asm_100858
- add $3c
-
-.asm_100858
- ld [StringBuffer2 + 2], a
- ld a, [wcd6d]
- ld c, a
- ld a, $0a
- sbc c
- ld [StringBuffer2 + 1], a
- xor a
- ld [StringBuffer2], a
- ld de, String_10088e
- hlcoord 1, 14
- call PlaceString
- ld de, StringBuffer2
- hlcoord 4, 16
- call Function100697
- ret
-
-.asm_10087c
- ld de, String_10088e
- hlcoord 1, 14
- call PlaceString
- ld h, b
- ld l, c
- ld de, String_10089f
- call PlaceString
- ret
-; 10088e
-
-String_10088e: ; 10088e
- db "モバイルたいせん できる"
- next "じかん@"
-; 10089f
-
-String_10089f: ; 10089f
- db " むせいげん@"
-; 1008a6
-
-Function1008a6: ; 1008a6
- ld a, $04
- ld hl, $a800
- call GetSRAMBank
- ld a, [hli]
- ld [StringBuffer2], a
- ld a, [hli]
- ld [StringBuffer2 + 1], a
- ld a, [hli]
- ld [StringBuffer2 + 2], a
- call CloseSRAM
- ld a, [StringBuffer2 + 2]
- ld b, a
- ld a, 0
- sub b
- jr nc, .asm_1008c8
- add $3c
-
-.asm_1008c8
- ld b, a
- ld a, [StringBuffer2 + 1]
- ld c, a
- ld a, $0a
- sbc c
- ld c, a
- jr c, .asm_1008da
- ld a, [StringBuffer2]
- and a
- jr nz, .asm_1008da
- ret
-
-.asm_1008da
- call Function10070d
- ld c, 0
- ret
-; 1008e0
-
-
-Function1008e0: ; 1008e0
- ld a, [hBGMapMode]
- ld b, a
- ld a, [hVBlank]
- ld c, a
- push bc
- xor a
- ld [hBGMapMode], a
- ld a, $03
- ld [hVBlank], a
- call Function100970
- call Function100902
- call Function100989
- call DelayFrame
- pop bc
- ld a, c
- ld [hVBlank], a
- ld a, b
- ld [hBGMapMode], a
- ret
-; 100902
-
-Function100902: ; 100902
- hlcoord 3, 10
- ld b, $01
- ld c, $0b
- call TextBox
- ld a, [wcd6d]
- ld c, a
- ld a, $0a
- sub c
- ld [StringBuffer2], a
- jr z, .asm_10093f
- ld de, .string_100966
- hlcoord 4, 11
- call PlaceString
- hlcoord 8, 11
- lb bc, 1, 2
- ld de, StringBuffer2
- call PrintNum
- ld de, SFX_TWO_PC_BEEPS
- call PlaySFX
- callba ReloadMapPart
- ld c, $3c
- call DelayFrames
- ret
-
-.asm_10093f
- ld de, .string_10095a
- hlcoord 4, 11
- call PlaceString
- ld de, SFX_4_NOTE_DITTY
- call PlaySFX
- callba ReloadMapPart
- ld c, 120
- call DelayFrames
- ret
-; 10095a
-
-.string_10095a ; 10095a
- db "たいせん しゅうりょう@"
-.string_100966 ; 100966
- db "のこり ふん", $e7, "@"
-; 100970
-
-
-Function100970: ; 100970
- hlcoord 0, 0
- ld de, w3_dc00
- call Function1009a5
- hlcoord 0, 0, AttrMap
- ld de, w3_dd68
- call Function1009a5
- call Function1009d2
- call Function1009ae
- ret
-; 100989
-
-Function100989: ; 100989
- ld hl, w3_dc00
- decoord 0, 0
- call Function1009a5
- call Function1009ae
- callba ReloadMapPart
- ld hl, w3_dd68
- decoord 0, 0, AttrMap
- call Function1009a5
- ret
-; 1009a5
-
-Function1009a5: ; 1009a5
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- ld a, $03
- call FarCopyWRAM
- ret
-; 1009ae
-
-Function1009ae: ; 1009ae
- ld a, [rSVBK]
- push af
- ld a, $03
- ld [rSVBK], a
-
- ld hl, w3_d800
- decoord 0, 0, AttrMap
- ld c, SCREEN_WIDTH
- ld b, SCREEN_HEIGHT
-.loop_row
- push bc
-.loop_col
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .loop_col
- ld bc, BG_MAP_WIDTH - SCREEN_WIDTH
- add hl, bc
- pop bc
- dec b
- jr nz, .loop_row
-
- pop af
- ld [rSVBK], a
- ret
-; 1009d2
-
-Function1009d2: ; 1009d2
- ld a, [rSVBK]
- push af
- ld a, $03
- ld [rSVBK], a
-
- ld a, [rVBK]
- push af
- ld a, $01
- ld [rVBK], a
-
- ld hl, w3_d800
- debgcoord 0, 0
- lb bc, $03, $24
- call Get2bpp
-
- pop af
- ld [rVBK], a
-
- pop af
- ld [rSVBK], a
- ret
-; 1009f3
-
-Function1009f3: ; 1009f3
- ld a, [hJoyDown]
- and SELECT + A_BUTTON
- cp SELECT + A_BUTTON
- jr nz, .select_a
- ld hl, wcd2a
- set 4, [hl]
- ld a, $f8
- ld [wcd2b], a
- scf
- ret
-
-.select_a
- xor a
- ret
-; 100a09
-
-_LinkBattleSendReceiveAction: ; 100a09
- call .StageForSend
- ld [wd431], a
- callba PlaceWaitingText
- ld a, [wLinkMode]
- cp LINK_MOBILE
- jr nz, .not_mobile
-
- call .MobileBattle_SendReceiveAction
- call Function100da5
- callba FinishBattleAnim
- jr .done
-
-.not_mobile
- call .LinkBattle_SendReceiveAction
-
-.done
- ret
-; 100a2e
-
-.StageForSend: ; 100a2e
- ld a, [wPlayerAction]
- and a
- jr nz, .switch
- ld a, [CurPlayerMove]
- ld b, BATTLEACTION_E
- cp STRUGGLE
- jr z, .struggle
- ld b, BATTLEACTION_D
- cp $ff
- jr z, .struggle
- ld a, [CurMoveNum]
- jr .use_move
-
-.switch
- ld a, [CurPartyMon]
- add BATTLEACTION_SWITCH1
- jr .use_move
-
-.struggle
- ld a, b
-
-.use_move
- and $0f
- ret
-; 100a53
-
-.LinkBattle_SendReceiveAction: ; 100a53
- ld a, [wd431]
- ld [wPlayerLinkAction], a
- ld a, $ff
- ld [wOtherPlayerLinkAction], a
-.waiting
- call LinkTransfer
- call DelayFrame
- ld a, [wOtherPlayerLinkAction]
- inc a
- jr z, .waiting
-
- ld b, 10
-.receive
- call DelayFrame
- call LinkTransfer
- dec b
- jr nz, .receive
-
- ld b, 10
-.acknowledge
- call DelayFrame
- call LinkDataReceived
- dec b
- jr nz, .acknowledge
-
- ld a, [wOtherPlayerLinkAction]
- ld [wBattleAction], a
- ret
-; 100a87
-
-.MobileBattle_SendReceiveAction: ; 100a87
- call Function100acf
- call StartMobileInactivityTimer
- ld a, 0
- ld [wcd27], a
-.asm_100a92
- call DelayFrame
- call GetJoypad
- callba Function100382
- ld c, $01
- ld b, $03
- push bc
- call AdvanceMobileInactivityTimerAndCheckExpired
- pop bc
- jr c, .asm_100ac7
- ld b, $01
- call Function10079c
- jr c, .asm_100ac7
- call Function1009f3
- jr c, .asm_100ac7
- ld a, [wcd2b]
- and a
- jr nz, .asm_100ac7
- ld a, [wcd27]
- bit 7, a
- jr z, .asm_100a92
- call Function100ae7
- jr .asm_100ace
-
-.asm_100ac7
- ld a, $0f
- ld [wd430], a
- jr .asm_100ace
-
-.asm_100ace
- ret
-; 100acf
-
-Function100acf: ; 100acf
- ld de, Unknown_100b0a
- ld hl, wccb5
- ld a, [wd431]
- ld [hli], a
- ld c, $01
-.asm_100adb
- ld a, [de]
- inc de
- ld [hli], a
- inc c
- and a
- jr nz, .asm_100adb
- ld a, c
- ld [wccb4], a
- ret
-; 100ae7
-
-Function100ae7: ; 100ae7
- ld de, Unknown_100b0a
- ld hl, wcc62
-.asm_100aed
- ld a, [de]
- inc de
- and a
- jr z, .asm_100af8
- cp [hl]
- jr nz, .asm_100aff
- inc hl
- jr .asm_100aed
-
-.asm_100af8
- ld a, [wcc61]
- ld [wd430], a
- ret
-
-.asm_100aff
- ld a, $0f
- ld [wd430], a
- ld a, $f1
- ld [wcd2b], a
- ret
-; 100b0a
-
-
-SECTION "tetsuji", ROMX
-
- charmap " ", $20 ; revert to ascii
-
-Unknown_100b0a: ; 100b0a
- db "tetsuji", 0
-; 100b12
-
-
-SECTION "bank40_2", ROMX
-
-Function100b12: ; 100b12
- call Function100dd8
- ret c
- ld hl, BattleMenuDataHeader
- ld a, BANK(BattleMenuDataHeader)
- ld de, LoadMenuDataHeader
- call FarCall_de
- ld a, BANK(BattleMenuDataHeader)
- ld [wMenuData2_2DMenuItemStringsBank], a
- ld a, [wd0d2]
- ld [wMenuCursorBuffer], a
- call Function100e72
- call Function100b45
- callba InitPartyMenuBGPal7
- call Function100ed4
- ld a, [wMenuCursorBuffer]
- ld [wd0d2], a
- call ExitMenu
- ret
-; 100b45
-
-Function100b45: ; 100b45
- call Function100b7a
-.loop
- call Mobile_SetOverworldDelay
- callba MobileMenuJoypad
- push bc
- callba HDMATransferTileMapToWRAMBank3
- call Function100e2d
- pop bc
- jr c, .asm_100b6b
- ld a, [wMenuJoypadFilter]
- and c
- jr z, .loop
- callba Mobile_GetMenuSelection
- ret
-
-.asm_100b6b
- ld a, [w2DMenuNumCols]
- ld c, a
- ld a, [w2DMenuNumRows]
- call SimpleMultiply
- ld [wMenuCursorBuffer], a
- and a
- ret
-; 100b7a
-
-Function100b7a: ; 100b7a
- ld hl, CopyMenuData2
- ld a, [wMenuData2_2DMenuItemStringsBank]
- rst FarCall
- callba Draw2DMenu
- callba MobileTextBorder
- call UpdateSprites
- call ApplyTilemap
- callba Init2DMenuCursorPosition
- ld hl, w2DMenuFlags1
- set 7, [hl]
- ret
-; 100b9f
-
-MobileMoveSelectionScreen: ; 100b9f
- xor a
- ld [wMoveSwapBuffer], a
- callba CheckPlayerHasUsableMoves
- ret z
- call Function100dd8
- jp c, xor_a_dec_a
- call Function100e72
- call .GetMoveSelection
- push af
- callba InitPartyMenuBGPal7
- call Function100ed4
- pop af
- ret
-; 100bc2
-
-.GetMoveSelection: ; 100bc2
- xor a
- ld [hBGMapMode], a
- call Function100c74
- call Function100c98
-.master_loop
- callba MoveInfoBox
-.loop
- call Mobile_SetOverworldDelay
- callba MobileMenuJoypad
- push bc
- callba HDMATransferTileMapToWRAMBank3
- call Function100e2d
- pop bc
- jr c, .b_button
- ld a, [wMenuJoypadFilter]
- and c
- bit D_UP_F, a
- jp nz, .d_up
- bit D_DOWN_F, a
- jp nz, .d_down
- bit A_BUTTON_F, a
- jr nz, .a_button
- bit B_BUTTON_F, a
- jr nz, .b_button
- jr .loop
-
-.d_up
- ld a, [wMenuCursorY]
- and a
- jp nz, .master_loop
- ld a, [wNumMoves]
- inc a
- ld [wMenuCursorY], a
- jp .master_loop
-
-.d_down
- ld a, [wMenuCursorY]
- ld b, a
- ld a, [wNumMoves]
- inc a
- inc a
- cp b
- jp nz, .master_loop
- ld a, $01
- ld [wMenuCursorY], a
- jp .master_loop
-
-.b_button
- ld a, [wMenuCursorY]
- dec a
- ld [CurMoveNum], a
- ld a, $01
- and a
- ret
-
-.a_button
- ld a, [wMenuCursorY]
- dec a
- ld [CurMoveNum], a
- ld a, [wMenuCursorY]
- dec a
- ld c, a
- ld b, 0
- ld hl, BattleMonPP
- add hl, bc
- ld a, [hl]
- and $3f
- jr z, .no_pp_left
- ld a, [PlayerDisableCount]
- swap a
- and $0f
- dec a
- cp c
- jr z, .move_disabled
- ld a, [wMenuCursorY]
- dec a
- ld c, a
- ld b, 0
- ld hl, BattleMonMoves
- add hl, bc
- ld a, [hl]
- ld [CurPlayerMove], a
- xor a
- ret
-
-.move_disabled
- ld hl, BattleText_TheMoveIsDisabled
- jr .print_text
-
-.no_pp_left
- ld hl, BattleText_TheresNoPPLeftForThisMove
-
-.print_text
- call StdBattleTextBox
- call Call_LoadTempTileMapToTileMap
- jp .GetMoveSelection
-; 100c74
-
-Function100c74: ; 100c74
- hlcoord 0, 8
- ld b, 8
- ld c, 8
- call TextBox
- ld hl, BattleMonMoves
- ld de, wListMoves_MoveIndicesBuffer
- ld bc, NUM_MOVES
- call CopyBytes
- ld a, SCREEN_WIDTH * 2
- ld [Buffer1], a
- hlcoord 2, 10
- predef ListMoves
- ret
-; 100c98
-
-Function100c98: ; 100c98
- ld de, .attrs
- call SetMenuAttributes
- ld a, [wNumMoves]
- inc a
- ld [w2DMenuNumRows], a
- ld a, [CurMoveNum]
- inc a
- ld [wMenuCursorY], a
- ret
-; 100cad
-
-.attrs ; 100cad
- db 10, 1
- db 255, 1
- db $a0, $00
- dn 2, 0
- db D_UP | D_DOWN | A_BUTTON | B_BUTTON
-
-Mobile_PartyMenuSelect: ; 100cb5
- call Function100dd8
- ret c
- ld hl, w2DMenuFlags1
- set 7, [hl]
- res 6, [hl]
-.loop
- call Mobile_SetOverworldDelay
- callba MobileMenuJoypad
- push bc
- callba PlaySpriteAnimations
- callba HDMATransferTileMapToWRAMBank3
- call MobileComms_CheckInactivityTimer
- pop bc
- jr c, .done
- ld a, [wMenuJoypadFilter]
- and c
- jr z, .loop
- call PlaceHollowCursor
- ld a, [PartyCount]
- inc a
- ld b, a
- ld a, [wMenuCursorY]
- cp b
- jr z, .done
- ld [wPartyMenuCursor], a
- ld a, [hJoyLast]
- ld b, a
- bit 1, b
- jr nz, .done
- ld a, [wMenuCursorY]
- dec a
- ld [CurPartyMon], a
- ld c, a
- ld b, 0
- ld hl, PartySpecies
- add hl, bc
- ld a, [hl]
- ld [CurPartySpecies], a
- ld de, SFX_READ_TEXT_2
- call PlaySFX
- call WaitSFX
- and a
- ret
-
-.done
- ld de, SFX_READ_TEXT_2
- call PlaySFX
- call WaitSFX
- scf
- ret
-; 100d22
-
-MobileBattleMonMenu: ; 100d22
- call Function100dd8
- ret c
- call Function100d67
- ld hl, w2DMenuFlags1
- set 7, [hl]
- res 6, [hl]
-.asm_100d30
- call Mobile_SetOverworldDelay
- callba MobileMenuJoypad
- push bc
- callba PlaySpriteAnimations
- callba HDMATransferTileMapToWRAMBank3
- call MobileComms_CheckInactivityTimer
- pop bc
- jr c, .asm_100d54
- ld a, [wMenuJoypadFilter]
- and c
- jr nz, .asm_100d56
- jr .asm_100d30
-
-.asm_100d54
- scf
- ret
-
-.asm_100d56
- push af
- ld de, SFX_READ_TEXT_2
- call PlaySFX
- pop af
- bit 1, a
- jr z, .asm_100d65
- ret z
- scf
- ret
-
-.asm_100d65
- and a
- ret
-; 100d67
-
-Function100d67: ; 100d67
- ld hl, .MenuDataHeader
- call CopyMenuDataHeader
- xor a
- ld [hBGMapMode], a
- call MenuBox
- call UpdateSprites
- call PlaceVerticalMenuItems
- call WaitBGMap
- call CopyMenuData2
- call InitVerticalMenuCursor
- ld hl, w2DMenuFlags1
- set 6, [hl]
- ret
-; 100d88
-
-.MenuDataHeader: ; 100d88
- db 0 ; flags
- db 11, 11 ; start coords
- db 17, 19 ; end coords
- dw .MenuData2
- db 1 ; default option
-
-.MenuData2: ; 100d90
- db $c0 ; flags
- db 3
- db "いれかえる@" ; TRADE
- db "つよさをみる@" ; STATS
- db "キャンセル@" ; CANCEL
-; 100da5
-
-Function100da5: ; 100da5
- ld hl, wcd2a
- res 3, [hl]
- ld hl, wcd29
- res 0, [hl]
- ret
-; 100db0
-
-Function100db0: ; 100db0
- ld hl, wcd2a
- bit 3, [hl]
- jr nz, .asm_100dbe
- ld hl, wcd2a
- set 3, [hl]
- scf
- ret
-
-.asm_100dbe
- xor a
- ret
-; 100dc0
-
-
-
-Function100dc0: ; 100dc0
- ld a, [wLinkMode]
- cp LINK_MOBILE
- jr nz, .mobile
- ld hl, wcd2a
- bit 3, [hl]
- jr z, .mobile
- scf
- ret
-
-.mobile
- xor a
- ret
-; 100dd2
-
-Mobile_SetOverworldDelay: ; 100dd2
- ld a, 30
- ld [OverworldDelay], a
- ret
-; 100dd8
-
-Function100dd8: ; 100dd8
- ld c, $01
- ld b, $03
- callba AdvanceMobileInactivityTimerAndCheckExpired
- jr c, .asm_100dfb
- ld c, $3c
- ld b, $01
- call Function10079c
- jr c, .asm_100dfb
- callba Function10032e
- ld a, [wcd2b]
- and a
- jr nz, .asm_100dfb
- xor a
- ret
-
-.asm_100dfb
- scf
- ret
-; 100dfd
-
-MobileComms_CheckInactivityTimer: ; 100dfd
- ld a, [OverworldDelay]
- ld c, a
- ld a, 30
- sub c
- ld c, a
- ld b, 3
- push bc
- callba AdvanceMobileInactivityTimerAndCheckExpired ; useless to farcall
- pop bc
- jr c, .quit
- ld b, 1
- call Function10079c
- jr c, .quit
- call Function1009f3
- jr c, .quit
- callba Function10032e ; useless to farcall
- ld a, [wcd2b]
- and a
- jr nz, .quit
- xor a
- ret
-
-.quit
- scf
- ret
-; 100e2d
-
-Function100e2d: ; 100e2d
- ld a, [OverworldDelay]
- ld c, a
- ld a, 30
- sub c
- ld c, a
- ld b, 3
- push bc
- callba AdvanceMobileInactivityTimerAndCheckExpired
- pop bc
- jr c, .asm_100e61
- ld b, 1
- call Function10079c
- jr c, .asm_100e61
- call Function1009f3
- jr c, .asm_100e61
- callba Function10032e
- ld a, [wcd2b]
- and a
- jr nz, .asm_100e61
- call Function100e63
- call Function100e84
- xor a
- ret
-
-.asm_100e61
- scf
- ret
-; 100e63
-
-Function100e63: ; 100e63
- ld a, e
- cp $02
- ret nz
- call Function100db0
- ret nc
- ld de, SFX_ELEVATOR_END
- call PlaySFX
- ret
-; 100e72
-
-Function100e72: ; 100e72
- xor a
- ld hl, wcd29
- bit 0, [hl]
- jr z, .asm_100e7c
- ld a, $0a
-
-.asm_100e7c
- ld [wcd67], a
- xor a
- ld [wcd68], a
- ret
-; 100e84
-
-Function100e84: ; 100e84
- ld a, [wcd67]
- ld hl, Jumptable_100e8c
- rst JumpTable
- ret
-; 100e8c
-
-
-Jumptable_100e8c: ; 100e8c (40:4e8c)
- dw Function100ea2
- dw Function100eae
- dw Function100eb4
- dw Function100eae
- dw Function100eb4
- dw Function100eae
- dw Function100eb4
- dw Function100eae
- dw Function100eb4
- dw Function100eae
- dw Function100ec4
-
-
-Function100ea2: ; 100ea2 (40:4ea2)
- call Function100dc0
- ret nc
- ld hl, wcd29
- set 0, [hl]
- call Function100ec5
-
-
-Function100eae: ; 100eae
- scf
- call Function100eca
- jr asm_100eb8
-
-Function100eb4: ; 100eb4
- and a
- call Function100eca
-
-asm_100eb8
- ld hl, wcd68
- inc [hl]
- ld a, [hl]
- cp $02
- ret c
- ld [hl], 0
- jr Function100ec5
-
-Function100ec4: ; 100ec4
- ret
-
-Function100ec5
- ld hl, wcd67
- inc [hl]
- ret
-; 100eca
-
-Function100eca: ; 100eca
- callba Mobile_InitPartyMenuBGPal7
- call Function100ed4
- ret
-; 100ed4
-
-Function100ed4: ; 100ed4
- callba ApplyPals
- ld a, $01
- ld [hCGBPalUpdate], a
- ret
-; 100edf
-
-Function100edf: ; 100edf
- ld hl, Unknown_100fc0
- ld c, 1
- jr asm_100f02
-
-Function100ee6: ; 100ee6
- ld hl, Unknown_100fc0
- ld c, 2
- jr asm_100f02
-
-Function100eed: ; 100eed
- ld hl, Unknown_100feb
- ld c, 1
- jr asm_100f02
-
-Function100ef4: ; 100ef4
- ld hl, Unknown_100ff3
- ld c, 1
- jr asm_100f02
-
-Function100efb: ; 100efb
- ld hl, Unknown_10102c
- ld c, 1
- jr asm_100f02
-
-asm_100f02:
- ld a, c
- ld [StringBuffer2], a
- ; someting that was previously stored in de gets backed up to here
- ld a, e
- ld [StringBuffer2 + 1], a
- ld a, d
- ld [StringBuffer2 + 2], a
- ; empty this
- xor a
- ld [StringBuffer2 + 4], a
- ld [StringBuffer2 + 5], a
-.loop
- ld a, [hl]
- cp $ff
- jr z, .done
- ld [StringBuffer2 + 3], a ; bank
- push hl
- inc hl
- ; addr 1
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ; size
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- ; addr 2
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call Function100f3d
- ; next line
- pop hl
- ld de, 7
- add hl, de
- jr .loop
-
-.done
- ; recover the values into bc
- ld a, [StringBuffer2 + 4]
- ld c, a
- ld a, [StringBuffer2 + 5]
- ld b, a
- ret
-; 100f3d
-
-Function100f3d: ; 100f3d
- ; parameter
- ld a, [StringBuffer2]
- cp $02
- jr z, .two
- cp $01
- jr z, .one
- cp $03
- jr z, .three
- ret
-
-.three
- ; what was once in de gets copied to hl,
- ; modified by Function100f8d, and put back
- ; into this backup
- ld a, [StringBuffer2 + 1]
- ld l, a
- ld a, [StringBuffer2 + 2]
- ld h, a
- call Function100f8d
- ld a, l
- ld [StringBuffer2 + 1], a
- ld a, h
- ld [StringBuffer2 + 2], a
- ret
-
-.two
- ; hl gets backed up to de, then
- ; do the same as in .three
- ld d, h
- ld e, l
- ld a, [StringBuffer2 + 1]
- ld l, a
- ld a, [StringBuffer2 + 2]
- ld h, a
- call Function100f8d
- ld a, l
- ld [StringBuffer2 + 1], a
- ld a, h
- ld [StringBuffer2 + 2], a
- ret
-
-.one
- ; de gets copied to hl, then
- ; load the backup into de,
- ; finally run Function100f8d
- ; and store the de result
- ld h, d
- ld l, e
- ld a, [StringBuffer2 + 1]
- ld e, a
- ld a, [StringBuffer2 + 2]
- ld d, a
- call Function100f8d
- ld a, e
- ld [StringBuffer2 + 1], a
- ld a, d
- ld [StringBuffer2 + 2], a
- ret
-; 100f8d
-
-Function100f8d: ; 100f8d
- push hl
- ld a, [StringBuffer2 + 4]
- ld l, a
- ld a, [StringBuffer2 + 5]
- ld h, a
- add hl, bc
- ld a, l
- ld [StringBuffer2 + 4], a
- ld a, h
- ld [StringBuffer2 + 5], a
- pop hl
- ld a, [StringBuffer2 + 3]
- bit 7, a
- res 7, a
- jr z, .sram
- and a
- jr nz, .far_wram
- call CopyBytes
- ret
-
-.far_wram
- and $7f
- call FarCopyWRAM
- ret
-
-.sram
- call GetSRAMBank
- call CopyBytes
- call CloseSRAM
- ret
-; 100fc0
-
-Unknown_100fc0: ; 100fc0
- ; first byte:
- ; Bit 7 set: Not SRAM
- ; Lower 7 bits: Bank
- ; Address, size (dw), address
- dbwww $80, PlayerName, NAME_LENGTH, OTPlayerName
- dbwww $80, PartyCount, 1 + PARTY_LENGTH + 1, OTPartyCount
- dbwww $80, PlayerID, 2, OTPlayerID
- dbwww $80, PartyMons, PARTYMON_STRUCT_LENGTH * PARTY_LENGTH, OTPartyMons
- dbwww $80, PartyMonOT, NAME_LENGTH * PARTY_LENGTH, OTPartyMonOT
- dbwww $80, PartyMonNicknames, PKMN_NAME_LENGTH * PARTY_LENGTH, OTPartyMonNicknames
- db -1
-
-Unknown_100feb: ; 100feb
- dbwww $00, sPartyMail, MAIL_STRUCT_LENGTH * PARTY_LENGTH, NULL
- db -1
-
-Unknown_100ff3: ; 100ff3
- dbwww $80, wdc41, 1, NULL
- dbwww $80, PlayerName, NAME_LENGTH, NULL
- dbwww $80, PlayerName, NAME_LENGTH, NULL
- dbwww $80, PlayerID, 2, NULL
- dbwww $80, wSecretID, 2, NULL
- dbwww $80, PlayerGender, 1, NULL
- dbwww $04, $a603, 8, NULL
- dbwww $04, $a007, PARTYMON_STRUCT_LENGTH, NULL
- db -1
-
-Unknown_10102c: ; 10102c
- dbwww $80, OTPlayerName, NAME_LENGTH, NULL
- dbwww $80, OTPlayerID, 2, NULL
- dbwww $80, OTPartyMonNicknames, PKMN_NAME_LENGTH * PARTY_LENGTH, NULL
- dbwww $80, OTPartyMonOT, NAME_LENGTH * PARTY_LENGTH, NULL
- dbwww $80, OTPartyMons, PARTYMON_STRUCT_LENGTH * PARTY_LENGTH, NULL
- db -1
-; 10104f
-
-Function101050: ; 101050
- call Function10107d
- ld a, [OTPartyCount]
-rept 2 ; ???
- ld hl, wc608
-endr
- ld bc, wc7bb - wc608
- call Function1010de
- ld hl, wc7bb
- ld [hl], e
- inc hl
- ld [hl], d
- ld a, $07
- call GetSRAMBank
- ld hl, wc608
- ld de, $a001
- ld bc, wc7bd - wc608
- call CopyBytes
- call CloseSRAM
- ret
-; 10107d
-
-Function10107d: ; 10107d
- xor a
- ld hl, wc608
- ld bc, wc7bd - wc608
- call ByteFill
- ld hl, OTPlayerName
- ld de, wc608
- ld bc, NAME_LENGTH
- call CopyBytes
- ld hl, wd271
- ld a, [hli]
- ld [wc608 + 11], a
- ld a, [hl]
- ld [wc608 + 12], a
- ld hl, OTPartyMonNicknames
- ld de, wc608 + 13
- ld bc, NAME_LENGTH
- call .CopyAllFromOT
- ld hl, OTPartyMonOT
- ld de, OTClassName + 1
- ld bc, NAME_LENGTH
- call .CopyAllFromOT
- ld hl, OTPartyMon1Species
- ld de, $c699
- ld bc, PARTYMON_STRUCT_LENGTH
- call .CopyAllFromOT
- ld a, $50
- ld [wc7b9], a
- ld a, $33
- ld [wc7ba], a
- ret
-; 1010cd
-
-.CopyAllFromOT: ; 1010cd
- push hl
- ld hl, 0
- ld a, [OTPartyCount]
- call AddNTimes
- ld b, h
- ld c, l
- pop hl
- call CopyBytes
- ret
-; 1010de
-
-Function1010de: ; 1010de
- push hl
- push bc
- ld de, 0
-.loop
- ld a, [hli]
- add e
- ld e, a
- ld a, d
- adc 0
- ld d, a
- dec bc
- ld a, b
- or c
- jr nz, .loop
- pop bc
- pop hl
- ret
-; 1010f2
-
-LoadSelectedPartiesForColosseum: ; 1010f2
- xor a
- ld hl, StringBuffer2
- ld bc, 9
- call ByteFill
- ld hl, wPlayerMonSelection
- ld de, PartyCount
- call .CopyThreeSpecies
- ld hl, wPlayerMonSelection
- ld de, PartyMon1Species
- call .CopyPartyStruct
- ld hl, wPlayerMonSelection
- ld de, PartyMonOT
- call .CopyName
- ld hl, wPlayerMonSelection
- ld de, PartyMonNicknames
- call .CopyName
- ld hl, wOTMonSelection
- ld de, OTPartyCount
- call .CopyThreeSpecies
- ld hl, wOTMonSelection
- ld de, OTPartyMon1Species
- call .CopyPartyStruct
- ld hl, wOTMonSelection
- ld de, OTPartyMonOT
- call .CopyName
- ld hl, wOTMonSelection
- ld de, OTPartyMonNicknames
- call .CopyName
- ret
-; 101145
-
-.CopyThreeSpecies: ; 101145
-; Load the 3 choices to the buffer
- push de
- ld bc, StringBuffer2 + 6
- xor a
-.party_loop
- push af
- call .GetNthSpecies
- ld [bc], a
- inc bc
- pop af
- inc a
- cp 3
- jr nz, .party_loop
- pop de
-; Copy the 3 choices to the party
- ld a, 3
- ld [de], a
- inc de
- ld hl, StringBuffer2 + 6
- ld bc, 3
- call CopyBytes
- ld a, $ff
- ld [de], a
- ret
-; 101168
-
-.GetNthSpecies: ; 101168
-; Preserves hl and de
-; Get the index of the Nth selection
- push hl
- add l
- ld l, a
- ld a, h
- adc 0
- ld h, a
- ld a, [hl]
- pop hl
-; Get the corresponding species
- push de
- inc de
- add e
- ld e, a
- ld a, d
- adc 0
- ld d, a
- ld a, [de]
- pop de
- ret
-; 10117c
-
-.CopyPartyStruct: ; 10117c
- ld bc, PARTYMON_STRUCT_LENGTH
- jr .ContinueCopy
-
-.CopyName: ; 101181
- ld bc, NAME_LENGTH
-
-.ContinueCopy:
- ; Copy, via wc608...
- ld a, wc608 % $100
- ld [StringBuffer2], a
- ld a, wc608 / $100
- ld [StringBuffer2 + 1], a
- ; ... bc bytes...
- ld a, c
- ld [StringBuffer2 + 2], a
- ld a, b
- ld [StringBuffer2 + 3], a
- ; ... to de...
- ld a, e
- ld [StringBuffer2 + 4], a
- ld a, d
- ld [StringBuffer2 + 5], a
- ; ... 3 times.
- ld a, 3
-.big_copy_loop
- push af
- ld a, [hli]
- push hl
- push af
- call .GetDestinationAddress
- call .GetCopySize
- pop af
- call AddNTimes
- ld a, [StringBuffer2]
- ld e, a
- ld a, [StringBuffer2 + 1]
- ld d, a
- call CopyBytes
- ld a, e
- ld [StringBuffer2], a
- ld a, d
- ld [StringBuffer2 + 1], a
- pop hl
- pop af
- dec a
- jr nz, .big_copy_loop
- call .GetCopySize
- ld a, 3
- ld hl, 0
- call AddNTimes
- ld b, h
- ld c, l
- call .GetDestinationAddress
- ld d, h
- ld e, l
- ld hl, wc608
- call CopyBytes
- ret
-; 1011df
-
-.GetDestinationAddress: ; 1011df
- ld a, [StringBuffer2 + 4]
- ld l, a
- ld a, [StringBuffer2 + 5]
- ld h, a
- ret
-; 1011e8
-
-.GetCopySize: ; 1011e8
- ld a, [StringBuffer2 + 2]
- ld c, a
- ld a, [StringBuffer2 + 3]
- ld b, a
- ret
-; 1011f1
-
-Function1011f1: ; 1011f1
- ld a, $04
- call GetSRAMBank
- ld a, [$a60c]
- ld [wdc41], a
- call CloseSRAM
- ld hl, wdc41
- res 4, [hl]
- ld hl, GameTimerPause
- bit 7, [hl]
- jr z, .skip
- ld hl, wdc41
- set 4, [hl]
-
-.skip
- call Function10209c
- xor a
- ld [wdc5f], a
- ld [wdc60], a
- ld a, LINK_MOBILE
- ld [wLinkMode], a
- ret
-; 101220
-
-Function101220: ; 101220
- xor a
- ld [wLinkMode], a
- ret
-; 101225
-
-Function101225: ; 101225
- ld d, 1
- ld e, BANK(Jumptable_101297)
- ld bc, Jumptable_101297
- call Function100000
- jr Function10123d
-
-Function101231: ; 101231
- ld d, 2
- ld e, BANK(Jumptable_101297)
- ld bc, Jumptable_101297
- call Function100000
- jr Function10123d
-
-Function10123d: ; 10123d
- xor a
- ld [ScriptVar], a
- ld a, c
- ld hl, Jumptable_101247
- rst JumpTable
- ret
-; 101247
-
-Jumptable_101247: ; 101247
- dw Function101251
- dw Function10127d
- dw Function10127c
- dw Function10126c
- dw Function101265
-; 101251
-
-Function101251: ; 101251
- call UpdateSprites
- call RefreshScreen
- ld hl, UnknownText_0x1021f4
- call Function1021e0
- call Function1020ea
- ret c
- call Function102142
- ret
-; 101265
-
-Function101265: ; 101265
- ld hl, UnknownText_0x1021ef
- call Function1021e0
- ret
-; 10126c
-
-Function10126c: ; 10126c
- call UpdateSprites
- callba Script_reloadmappart
- ld hl, UnknownText_0x1021f4
- call Function1021e0
- ret
-; 10127c
-
-Function10127c: ; 10127c
- ret
-; 10127d
-
-Function10127d: ; 10127d
- ret
-; 10127e
-
-Function10127e: ; 10127e
- ld a, [wdc5f]
- and a
- jr z, .zero
- cp 1
- ld c, $27
- jr z, .load
- cp 2
- ld c, $37
- jr z, .load
-.zero
- ld c, 0
-.load
- ld a, c
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101297
-
-Jumptable_101297: ; 101297
- dw Function101a97 ; 00
- dw Function101ab4 ; 01
- dw Function101475 ; 02
- dw Function101b0f ; 03
- dw Function101438 ; 04
- dw Function101b2b ; 05
- dw Function101b59 ; 06
- dw Function101475 ; 07
- dw Function101b70 ; 08
- dw Function101438 ; 09
- dw Function101b8f ; 0a
- dw Function101d7b ; 0b
- dw Function101d95 ; 0c
- dw Function101475 ; 0d
- dw Function101db2 ; 0e
- dw Function101e4f ; 0f
- dw Function101475 ; 10
- dw Function101e64 ; 11
- dw Function101e4f ; 12
- dw Function101475 ; 13
- dw Function101e64 ; 14
- dw Function101d95 ; 15
- dw Function101475 ; 16
- dw Function101db2 ; 17
- dw Function101dd0 ; 18
- dw Function101de3 ; 19
- dw Function101e39 ; 1a
- dw Function101e09 ; 1b
- dw Function101e4f ; 1c
- dw Function101475 ; 1d
- dw Function101e64 ; 1e
- dw Function101d95 ; 1f
- dw Function101475 ; 20
- dw Function101db2 ; 21
- dw Function101e09 ; 22
- dw Function101e31 ; 23
- dw Function101bc8 ; 24
- dw Function101438 ; 25
- dw Function101be5 ; 26
- dw Function101ac6 ; 27
- dw Function101ab4 ; 28
- dw Function101475 ; 29
- dw Function101c11 ; 2a
- dw Function1014f4 ; 2b
- dw Function101cc8 ; 2c
- dw Function1014e2 ; 2d
- dw Function1014e2 ; 2e
- dw Function101d10 ; 2f
- dw Function101d2a ; 30
- dw Function101d2a ; 31
- dw Function101507 ; 32
- dw Function10156d ; 33
- dw Function101557 ; 34
- dw Function10158a ; 35
- dw Function101c42 ; 36
- dw Function101aed ; 37
- dw Function101ab4 ; 38
- dw Function101475 ; 39
- dw Function101c2b ; 3a
- dw Function1014f4 ; 3b
- dw Function101cdf ; 3c
- dw Function1014e2 ; 3d
- dw Function1014e2 ; 3e
- dw Function101d1e ; 3f
- dw Function101d2a ; 40
- dw Function101d2a ; 41
- dw Function101507 ; 42
- dw Function10156d ; 43
- dw Function101544 ; 44
- dw Function10158a ; 45
- dw Function101c42 ; 46
- dw Function101c50 ; 47
- dw Function1014ce ; 48
- dw Function101cf6 ; 49
- dw Function101826 ; 4a
- dw Function1017e4 ; 4b
- dw Function1017f1 ; 4c
- dw Function1018a8 ; 4d
- dw Function1018d6 ; 4e
- dw Function1017e4 ; 4f
- dw Function1017f1 ; 50
- dw Function1018e1 ; 51
- dw Function1015df ; 52
- dw Function10167d ; 53
- dw Function10168a ; 54
- dw Function10162a ; 55
- dw Function1015be ; 56
- dw Function10167d ; 57
- dw Function10168a ; 58
- dw Function10161f ; 59
- dw Function10159d ; 5a
- dw Function10167d ; 5b
- dw Function10168a ; 5c
- dw Function101600 ; 5d
- dw Function101d03 ; 5e
- dw Function101d6b ; 5f
- dw Function10159d ; 60
- dw Function1014ce ; 61
- dw Function10168e ; 62
- dw Function101600 ; 63
- dw Function101913 ; 64
- dw Function10194b ; 65
- dw _SelectMonsForMobileBattle ; 66
- dw Function1017e4 ; 67
- dw Function1017f5 ; 68
- dw _StartMobileBattle ; 69
- dw Function101537 ; 6a
- dw Function101571 ; 6b
- dw Function101c92 ; 6c
- dw Function10152a ; 6d
- dw Function101571 ; 6e
- dw Function101a4f ; 6f
- dw Function101cbc ; 70
- dw Function101c62 ; 71
- dw Function101537 ; 72
- dw Function101571 ; 73
- dw Function101c92 ; 74
- dw Function10152a ; 75
- dw Function101571 ; 76
- dw Function101ca0 ; 77
- dw Function101475 ; 78
- dw Function101cbc ; 79
-; 10138b
-
-Function10138b: ; 10138b
- callba Function8adcc
- ld c, 0
- jr c, .asm_101396
- inc c
-
-.asm_101396
- sla c
- ld a, [wcd2f]
- and a
- jr z, .asm_10139f
- inc c
-
-.asm_10139f
- sla c
- ld a, [wcd21]
- cp $01
- jr z, .asm_1013a9
- inc c
-
-.asm_1013a9
- ret
-; 1013aa
-
-Function1013aa: ; 1013aa
- call ClearBGPalettes
- call Call_ExitMenu
- call ReloadTilesetAndPalettes
- callba Function106464
- call UpdateSprites
- call FinishExitMenu
- ret
-; 1013c0
-
-Function1013c0: ; 1013c0
- callba BlankScreen
- callba MobileFunc_106462
- callba Function106464
- call FinishExitMenu
- ret
-; 1013d6
-
-Function1013d6: ; 1013d6
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
- ret
-; 1013dd
-
-Function1013dd: ; 1013dd
- call CGBOnly_LoadEDTile
- ret
-; 1013e1
-
-Function1013e1: ; 1013e1 ; unreferenced
- push de
- inc de
- ld b, a
- ld c, 0
-.asm_1013e6
- inc c
- ld a, [hli]
- ld [de], a
- inc de
- and a
- jr z, .asm_1013f1
- dec b
- jr nz, .asm_1013e6
- scf
-
-.asm_1013f1
- pop de
- ld a, c
- ld [de], a
- ret
-; 1013f5
-
-Function1013f5: ; 1013f5
- ld a, [hli]
- ld [de], a
- inc de
- ld c, a
-.asm_1013f9
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .asm_1013f9
- ret
-; 101400
-
-Function101400: ; 101400 ; unreferenced
- ld a, [de]
- inc de
- cp [hl]
- jr nz, asm_101416
- inc hl
-
-Function101406: ; 101406
- ld c, a
- ld b, 0
-.asm_101409
- ld a, [de]
- inc de
- cp [hl]
- jr nz, asm_101416
- inc hl
- dec bc
- ld a, b
- or c
- jr nz, .asm_101409
- and a
- ret
-
-asm_101416
- scf
- ret
-; 101418
-
-Function101418: ; 101418
- call GetJoypad
- ld a, [hJoyDown]
- and SELECT + A_BUTTON
- cp SELECT + A_BUTTON
- jr z, .asm_101425
- xor a
- ret
-
-.asm_101425
- ld a, $f7
- ld [wcd2b], a
- scf
- ret
-; 10142c
-
-Function10142c: ; 10142c
- ld a, $01
- ld [wc305], a
- callba Function115e18
- ret
-; 101438
-
-Function101438: ; 101438
- ld hl, wcd29
- set 6, [hl]
- ld a, [wcd26]
- ld hl, Jumptable_101457
- rst JumpTable
- ld a, [wcd26]
- bit 7, a
- ret z
- ld a, 0
- ld [wcd26], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101457
-
-Jumptable_101457: ; 101457
- dw Function10145b
- dw Function101467
-; 10145b
-
-Function10145b: ; 10145b
- ld a, $3c
- ld [wcd42], a
- ld a, [wcd26]
- inc a
- ld [wcd26], a
-
-Function101467: ; 101467
- ld hl, wcd42
- dec [hl]
- ret nz
- ld a, [wcd26]
- set 7, a
- ld [wcd26], a
- ret
-; 101475
-
-Function101475: ; 101475
- ld hl, wcd29
- set 6, [hl]
- ld a, [wcd26]
- ld hl, Jumptable_101494
- rst JumpTable
- ld a, [wcd26]
- bit 7, a
- ret z
- ld a, 0
- ld [wcd26], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101494
-
-Jumptable_101494: ; 101494
- dw Function10149a
- dw Function1014a6
- dw Function1014b7
-; 10149a
-
-Function10149a: ; 10149a
- ld a, $28
- ld [wcd42], a
- ld a, [wcd26]
- inc a
- ld [wcd26], a
-
-Function1014a6: ; 1014a6
- ld hl, wcd42
- dec [hl]
- ret nz
- ld a, $50
- ld [wcd42], a
- ld a, [wcd26]
- inc a
- ld [wcd26], a
-
-Function1014b7: ; 1014b7
- call GetJoypad
- ld a, [hJoyPressed]
- and $03
- jr nz, .asm_1014c5
- ld hl, wcd42
- dec [hl]
- ret nz
-
-.asm_1014c5
- ld a, [wcd26]
- set 7, a
- ld [wcd26], a
- ret
-; 1014ce
-
-Function1014ce: ; 1014ce
- callba Function100720
- callba StartMobileInactivityTimer
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 1014e2
-
-Function1014e2: ; 1014e2
- ld hl, wcd29
- set 6, [hl]
- ld a, 0
- ld [wcd26], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 1014f4
-
-Function1014f4: ; 1014f4
- callba EnableMobile
- ld hl, wcd29
- set 6, [hl]
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101507
-
-Function101507: ; 101507
- ld de, wcd30
- ld hl, $40
- ld bc, $40
- ld a, $02
- call Function3e32
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 10151d
-
-Function10151d: ; 10151d ; unreferenced
- ld a, $34
- call Function3e32
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 10152a
-
-Function10152a: ; 10152a
- ld a, $36
- call Function3e32
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101537
-
-Function101537: ; 101537
- ld a, $0a
- call Function3e32
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101544
-
-Function101544: ; 101544
- callba StartMobileInactivityTimer
- ld a, $12
- call Function3e32
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101557
-
-Function101557: ; 101557
- callba StartMobileInactivityTimer
- ld hl, wcd53
- ld a, $08
- call Function3e32
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 10156d
-
-Function10156d: ; 10156d
- call Function101418
- ret c
-
-Function101571: ; 101571
- callba Function10032e
- ret c
- ret z
- ld a, e
- cp $01
- jr z, .asm_101582
- ld [wcd2b], a
- ret
-
-.asm_101582
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 10158a
-
-Function10158a: ; 10158a
- callba IncrementMobileInactivityTimerBy1Frame
- ld a, [wMobileInactivityTimerMinutes]
- cp $0a
- jr c, Function10156d
- ld a, $fb
- ld [wcd2b], a
- ret
-; 10159d
-
-Function10159d: ; 10159d
- ld de, wc608
- callba Function100edf
- ld de, wc608
- ld a, $05
- ld hl, w5_d800
- call Function10174c
- ld a, 0
- ld [wcd26], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 1015be
-
-Function1015be: ; 1015be
- ld de, wc608
- callba Function100eed
- ld de, wc608
- ld a, $05
- ld hl, w5_d800
- call Function10174c
- ld a, 0
- ld [wcd26], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 1015df
-
-Function1015df: ; 1015df
- ld de, wc608
- callba Function100ef4
- ld de, wc608
- ld a, $05
- ld hl, w5_d800
- call Function10174c
- ld a, 0
- ld [wcd26], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101600
-
-Function101600: ; 101600
- ld hl, w5_d800
- ld de, wc608
- ld bc, $1e0
- ld a, $05
- call FarCopyWRAM
- ld de, wc608
- callba Function100ee6
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 10161f
-
-Function10161f: ; 10161f
- call Function101649
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 10162a
-
-Function10162a: ; 10162a
- call Function101663
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101635
-
-Function101635: ; 101635
- ld de, wc608
- ld bc, $1e0
- call FarCopyWRAM
- ret
-; 10163f
-
-Function10163f: ; 10163f
- ld hl, wc608
- ld bc, $1e0
- call FarCopyWRAM
- ret
-; 101649
-
-Function101649: ; 101649
- ld a, $05
- ld hl, w5_d800
- call Function101635
- ld a, $05
- ld de, w5_da00
- call Function10163f
- ret
-; 10165a
-
-Function10165a: ; 10165a
- ld a, $05
- ld hl, w5_da00
- call Function101635
- ret
-; 101663
-
-Function101663: ; 101663
- ld a, $05
- ld hl, w5_d800
- call Function101635
- ld a, $05
- ld de, w5_dc00
- call Function10163f
- ret
-; 101674
-
-Function101674: ; 101674 ; unreferenced
- ld a, $05
- ld hl, w5_dc00
- call Function101635
- ret
-; 10167d
-
-Function10167d: ; 10167d
- ld a, 0
- ld [wcd26], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 10168a
-
-Function10168a: ; 10168a
- call Function101418
- ret c
-
-Function10168e: ; 10168e
- ld b, 0
- ld c, $01
- callba Function10079c
- ret c
- ld c, $01
- ld b, $03
- callba AdvanceMobileInactivityTimerAndCheckExpired
- ret c
- ld a, [wcd26]
- ld hl, Jumptable_1016c3
- rst JumpTable
- ld hl, wcd29
- set 6, [hl]
- ld a, [wcd26]
- bit 7, a
- ret z
- ld a, 0
- ld [wcd26], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 1016c3
-
-Jumptable_1016c3: ; 1016c3
- dw Function1016cf
- dw Function1016de
- dw Function1016f8
- dw Function101705
- dw Function101719
- dw Function101724
-; 1016cf
-
-Function1016cf: ; 1016cf
- ld hl, wcd3a
- inc [hl]
- call Function10176f
- ld a, [wcd26]
- inc a
- ld [wcd26], a
- ret
-; 1016de
-
-Function1016de: ; 1016de
- call Function10177b
- jr nc, .asm_1016eb
- ld a, [wcd26]
- inc a
- ld [wcd26], a
- ret
-
-.asm_1016eb
- ld a, $ff
- ld [wcd39], a
- ld a, [wcd26]
- inc a
- ld [wcd26], a
- ret
-; 1016f8
-
-Function1016f8: ; 1016f8
- ld a, 0
- ld [wcd27], a
- ld a, [wcd26]
- inc a
- ld [wcd26], a
- ret
-; 101705
-
-Function101705: ; 101705
- callba Function100382
- ld a, [wcd27]
- bit 7, a
- ret z
- ld a, [wcd26]
- inc a
- ld [wcd26], a
- ret
-; 101719
-
-Function101719: ; 101719
- call Function1017c7
- ld a, [wcd26]
- inc a
- ld [wcd26], a
- ret
-; 101724
-
-Function101724: ; 101724
- ld a, [wcd39]
- cp $ff
- jr z, .asm_101731
- ld a, 0
- ld [wcd26], a
- ret
-
-.asm_101731
- ld a, [wcd26]
- set 7, a
- ld [wcd26], a
- ret
-; 10173a
-
-Unknown_10173a:
- db $50
-
-Function10173b: ; 10173b
- push bc
- push af
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [Unknown_10173a]
- ld c, a
- ld b, 0
- pop af
- call AddNTimes
- pop bc
- ret
-; 10174c
-
-Function10174c: ; 10174c
- ld [wcd3d], a
- ld a, l
- ld [wcd3e], a
- ld a, h
- ld [wcd3f], a
- ld a, e
- ld [wcd3b], a
- ld a, d
- ld [wcd3c], a
- ld a, c
- ld [wcd40], a
- ld a, b
- ld [wcd41], a
- xor a
- ld [wcd39], a
- ld [wcd3a], a
- ret
-; 10176f
-
-Function10176f: ; 10176f
- ld hl, wccb4
- ld bc, $54
- ld a, $11
- call ByteFill
- ret
-; 10177b
-
-Function10177b: ; 10177b
- ld a, [Unknown_10173a]
- ld c, a
- ld b, 0
- ld a, [wcd3a]
- ld hl, 0
- call AddNTimes
- ld e, l
- ld d, h
- ld hl, wcd40
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, l
- sub e
- ld l, a
- ld a, h
- sbc d
- ld h, a
- jr c, .asm_1017a0
- add hl, bc
- call Function1017b0
- scf
- ret
-
-.asm_1017a0
- ld a, $ff
- ld [wcd39], a
- add hl, bc
- ld a, h
- or l
- ret z
- ld c, l
- ld b, h
- call Function1017b0
- xor a
- ret
-; 1017b0
-
-Function1017b0: ; 1017b0
- ld a, c
- ld [wccb4], a
- push bc
- ld a, [wcd3a]
- dec a
- ld hl, wcd3b
- call Function10173b
- pop bc
- ld de, wccb5
- call CopyBytes
- ret
-; 1017c7
-
-Function1017c7: ; 1017c7
- ld a, [wcc60]
- ld c, a
- ld b, 0
- ld a, [wcd3a]
- dec a
- ld hl, wcd3e
- call Function10173b
- ld e, l
- ld d, h
- ld hl, wcc61
- ld a, [wcd3d]
- call FarCopyWRAM
- and a
- ret
-; 1017e4
-
-Function1017e4: ; 1017e4
- ld a, 0
- ld [wcd27], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 1017f1
-
-Function1017f1: ; 1017f1
- call Function101418
- ret c
-
-Function1017f5: ; 1017f5
- ld b, 0
- ld c, $01
- callba Function10079c
- ret c
- ld c, $01
- ld b, $03
- callba AdvanceMobileInactivityTimerAndCheckExpired
- ret c
- callba Function100382
- ld a, [wcd27]
- bit 7, a
- jr nz, .next
- ld hl, wcd29
- set 6, [hl]
- ret
-
-.next
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101826
-
-Function101826: ; 101826
- ld a, [wcd21]
- cp $02
- jr z, .asm_101833
- cp $01
- jr z, .asm_101844
- jr .asm_101869
-
-.asm_101833
- ld hl, Unknown_10186f
- ld de, wccb4
- call Function1013f5
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101844
- callba Function103654
- ld a, c
- ld hl, Unknown_101882
- cp $01
- jr z, .asm_10185b
- ld hl, Unknown_101895
- cp $02
- jr z, .asm_10185b
- jr .asm_101869
-
-.asm_10185b
- ld de, wccb4
- call Function1013f5
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101869
- ld a, $fe
- ld [wcd2b], a
- ret
-; 10186f
-
-
-SECTION "ascii 10186f", ROMX
-
- charmap " ", $20 ; revert to ascii
-
-Unknown_10186f:
- db .end - @
- db $19, $73, $09, $13, "trade_crystal"
-.end db 0
-
-Unknown_101882:
- db .end - @
- db $19, $67, $10, $01, "free__crystal"
-.end db 0
-
-Unknown_101895:
- db .end - @
- db $19, $67, $10, $01, "limit_crystal"
-.end db 0
-; 1018a8
-
-
-SECTION "bank40_3", ROMX
-
-Function1018a8: ; 1018a8
- ld hl, wccb5
- ld de, wcc61
- ld a, $04
- call Function101406
- jr c, .asm_1018d0
- ld hl, wccb9
- ld de, wcc65
- ld a, $06
- call Function101406
- jr c, .asm_1018ca
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_1018ca
- ld a, $f6
- ld [wcd2b], a
- ret
-
-.asm_1018d0
- ld a, $f5
- ld [wcd2b], a
- ret
-; 1018d6
-
-Function1018d6: ; 1018d6
- call Function1018ec
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 1018e1
-
-Function1018e1: ; 1018e1
- call Function1018fb
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 1018ec
-
-Function1018ec: ; 1018ec
- ld a, $0a
- ld hl, wccb4
- ld [hli], a
- ld c, a
-.asm_1018f3
- call Random
- ld [hli], a
- dec c
- jr nz, .asm_1018f3
- ret
-; 1018fb
-
-Function1018fb: ; 1018fb
- ld a, [wcd2f]
- and a
- jr z, .asm_101906
- ld hl, wcc61
- jr .asm_101909
-
-.asm_101906
- ld hl, wccb5
-
-.asm_101909
- ld de, LinkBattleRNs
- ld bc, 10
- call CopyBytes
- ret
-; 101913
-
-Function101913: ; 101913
- ld hl, wcd2a
- set 0, [hl]
- xor a
- ld [wc30d], a
- ld hl, wcd29
- res 4, [hl]
- xor a
- ld [wc305], a
- ld hl, wcd29
- res 7, [hl]
- ld a, $90
- ld [hWY], a
- ld a, [wcd21]
- cp $01
- jr z, .asm_10193f
- cp $02
- jr z, .asm_101945
- ld a, $71
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_10193f
- ld a, $66
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101945
- ld a, $65
- ld [wMobileCommsJumptableIndex], a
- ret
-; 10194b
-
-Function10194b: ; 10194b
- call DisableSpriteUpdates
- call ClearSprites
- callba Function1021f9
- ld hl, wcd29
- bit 3, [hl]
- jr nz, .asm_101967
- call Function1013c0
- ld a, $71
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101967
- ld a, $60
- ld [wMobileCommsJumptableIndex], a
- ret
-; 10196d
-
-_SelectMonsForMobileBattle: ; 10196d
- callba BlankScreen
- callba Mobile_CommunicationStandby
- ld hl, wcd29
- set 5, [hl]
- ld hl, wcd2a
- set 6, [hl]
- ld a, $06
- ld [wccb4], a
- ld hl, wPlayerMonSelection
- ld de, wccb5
- ld bc, 3
- call CopyBytes
- ld hl, wcd6c
- ld a, [hli]
- ld [wccb8], a
- ld a, [hli]
- ld [wccb9], a
- ld a, [hl]
- ld [wccba], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 1019ab
-
-_StartMobileBattle: ; 1019ab
- call CopyOtherPlayersBattleMonSelection
- callba Function100754
- xor a
- ld [wdc5f], a
- ld [wdc60], a
- callba BlankScreen
- call SpeechTextBox
- callba Function100846
- ld c, 120
- call DelayFrames
- callba ClearTileMap
- call .CopyOTDetails
- call StartMobileBattle
- ld a, [wcd2b]
- cp $fc
- jr nz, .asm_1019e6
- xor a
- ld [wcd2b], a
-.asm_1019e6
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 1019ee
-
-.CopyOTDetails: ; 1019ee
- ld a, [rSVBK]
- push af
- ld a, 5
- ld [rSVBK], a
-
- ld bc, w5_dc0d
- ld de, w5_dc11
- callba GetMobileOTTrainerClass
-
- pop af
- ld [rSVBK], a
-
- ld a, c
- ld [OtherTrainerClass], a
- ld hl, OTPlayerName
- ld de, OTClassName
- ld bc, NAME_LENGTH
- call CopyBytes
- ld a, [wcd2f]
- and a
- ld a, 2
- jr z, .got_link_player_number
- ld a, 1
-.got_link_player_number
- ld [hLinkPlayerNumber], a
- ret
-; 101a21
-
-StartMobileBattle: ; 101a21
- ; force stereo and fast text speed
- ld hl, Options
- ld a, [hl]
- push af
- and (1 << STEREO)
- or 1 ; 1 frame per character i.e. fast text
- ld [hl], a
- ld a, 1
- ld [wDisableTextAcceleration], a
- callba BattleIntro
- callba DoBattle
- callba ShowLinkBattleParticipantsAfterEnd
- xor a
- ld [wDisableTextAcceleration], a
- ld a, $ff
- ld [hLinkPlayerNumber], a
- pop af
- ld [Options], a
- ret
-; 101a4f
-
-Function101a4f: ; 101a4f
- ld a, 1
- ld [wDisableTextAcceleration], a
- callba DisplayLinkBattleResult
- xor a
- ld [wDisableTextAcceleration], a
- callba CleanUpBattleRAM
- callba LoadPokemonData
- call Function1013c0
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101a75
-
-CopyOtherPlayersBattleMonSelection: ; 101a75
- ld hl, wcc61
- ld de, wOTMonSelection
- ld bc, 3
- call CopyBytes
- ld de, wcc64
- callba Function100772
- callba Function101050
- callba LoadSelectedPartiesForColosseum
- ret
-; 101a97
-
-Function101a97: ; 101a97
- callba Function115d99
- ld hl, wcd29
- set 7, [hl]
- ld c, $02
- call Function10142c
- ld hl, wcd29
- set 6, [hl]
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101ab4
-
-Function101ab4: ; 101ab4
- ld e, $01
- call Function101ee4
- ld hl, wcd29
- set 5, [hl]
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101ac6
-
-Function101ac6: ; 101ac6
- callba Function115d99
- ld hl, wcd29
- set 7, [hl]
- ld c, $02
- call Function10142c
- ld hl, wcd29
- set 6, [hl]
- xor a
- ld [wcd2f], a
- ld de, wdc42
- call Function102068
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101aed
-
-Function101aed: ; 101aed
- callba Function115d99
- ld hl, wcd29
- set 7, [hl]
- ld c, $02
- call Function10142c
- ld hl, wcd29
- set 6, [hl]
- ld a, $01
- ld [wcd2f], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101b0f
-
-Function101b0f: ; 101b0f
- ld c, 0
- call Function10142c
- ld e, $03
- call Function101ee4
- ld hl, wcd29
- set 5, [hl]
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ld a, 0
- ld [wcd26], a
- ret
-; 101b2b
-
-Function101b2b: ; 101b2b
- callba Function100579
- ld hl, wcd29
- set 2, [hl]
- ld a, [wcd26]
- bit 7, a
- ret z
- call Function1013dd
- ld a, 0
- ld [wcd26], a
- ld a, [wMenuCursorY]
- cp $01
- jr z, .asm_101b51
- ld a, $02
- ld [wcd2b], a
- ret
-
-.asm_101b51
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101b59
-
-Function101b59: ; 101b59
- ld c, $02
- call Function10142c
- ld e, $02
- call Function101ee4
- ld hl, wcd29
- set 5, [hl]
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101b70
-
-Function101b70: ; 101b70
- ld c, $02
- call Function10142c
- ld e, $04
- call Function101ee4
- ld hl, wcd29
- set 5, [hl]
- call UpdateSprites
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ld a, 0
- ld [wcd26], a
- ret
-; 101b8f
-
-Function101b8f: ; 101b8f
- callba Function1005c3
- ld hl, wcd29
- set 2, [hl]
- ld a, [wcd26]
- bit 7, a
- ret z
- call Function1013dd
- ld a, 0
- ld [wcd26], a
- ld a, [wMenuCursorY]
- cp $01
- jr z, .asm_101bbc
- ld a, $01
- ld [wcd2f], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101bbc
- xor a
- ld [wcd2f], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101bc8
-
-Function101bc8: ; 101bc8
- ld c, $02
- call Function10142c
- ld e, $08
- call Function101ee4
- call Function102048
- call Function1013dd
- ld a, 0
- ld [wcd26], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101be5
-
-Function101be5: ; 101be5
- callba Function100579
- ld hl, wcd29
- set 2, [hl]
- ld a, [wcd26]
- bit 7, a
- ret z
- call Function1013dd
- ld a, 0
- ld [wcd26], a
- ld a, [wMenuCursorY]
- cp $01
- jr nz, .asm_101c0b
- ld a, $2a
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101c0b
- ld a, $02
- ld [wcd2b], a
- ret
-; 101c11
-
-Function101c11: ; 101c11
- ld a, $01
- ld [wdc5f], a
- ld e, $09
- call Function101ee4
- call Function102048
- ld hl, wcd29
- set 5, [hl]
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101c2b
-
-Function101c2b: ; 101c2b
- ld a, $02
- ld [wdc5f], a
- ld e, $07
- call Function101ee4
- ld hl, wcd29
- set 5, [hl]
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101c42
-
-Function101c42: ; 101c42
- ld hl, wcd2a
- set 1, [hl]
- call Function100665
- ld a, $47
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101c50
-
-Function101c50: ; 101c50
- ld e, $0a
- call Function101ee4
- ld hl, wcd29
- set 2, [hl]
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101c62
-
-Function101c62: ; 101c62
- callba Function115d99
- ld hl, wcd29
- set 7, [hl]
- ld c, $01
- call Function10142c
- xor a
- ld [wc30d], a
- ld hl, wcd29
- res 4, [hl]
- ld e, $0b
- call Function101ee4
- ld hl, wcd29
- set 5, [hl]
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ld a, 0
- ld [wcd26], a
- ret
-; 101c92
-
-Function101c92: ; 101c92
- callba Function100675
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101ca0
-
-Function101ca0: ; 101ca0
- ld c, $02
- call Function10142c
- ld e, $0c
- call Function101ee4
- ld hl, wcd29
- set 5, [hl]
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ld a, 0
- ld [wcd26], a
- ret
-; 101cbc
-
-Function101cbc: ; 101cbc
- ld a, $01
- ld [wcd2b], a
- ret
-; 101cc2
-
-Function101cc2: ; 101cc2 ; unreferenced
- ld a, $02
- ld [wcd2b], a
- ret
-; 101cc8
-
-Function101cc8: ; 101cc8
- ld a, $01
- ld [wc314], a
- ld a, $01
- ld [wc30d], a
- ld hl, wcd29
- set 4, [hl]
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101cdf
-
-Function101cdf: ; 101cdf
- ld a, $06
- ld [wc314], a
- ld a, $01
- ld [wc30d], a
- ld hl, wcd29
- set 4, [hl]
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101cf6
-
-Function101cf6: ; 101cf6
- ld a, $0b
- ld [wc314 + 1], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101d03
-
-Function101d03: ; 101d03
- ld a, $0e
- ld [wc314 + 1], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101d10
-
-Function101d10: ; 101d10
- ld c, $01
- call Function10142c
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- jr Function101d2a
-
-Function101d1e: ; 101d1e
- ld c, $03
- call Function10142c
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
-
-Function101d2a: ; 101d2a
- call Function101418
- ret c
- ld hl, wcd29
- set 6, [hl]
- ld a, [wcd26]
- ld hl, Jumptable_101d4d
- rst JumpTable
- ld a, [wcd26]
- bit 7, a
- ret z
- ld a, 0
- ld [wcd26], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101d4d
-
-Jumptable_101d4d: ; 101d4d
- dw Function101d51
- dw Function101d5d
-; 101d51
-
-Function101d51: ; 101d51
- ld a, $3c
- ld [wcd42], a
- ld a, [wcd26]
- inc a
- ld [wcd26], a
-
-Function101d5d: ; 101d5d
- ld hl, wcd42
- dec [hl]
- ret nz
- ld a, [wcd26]
- set 7, a
- ld [wcd26], a
- ret
-; 101d6b
-
-Function101d6b: ; 101d6b
- ld a, [wc30d]
- and a
- ret nz
- ld hl, wcd29
- res 4, [hl]
- ld a, $64
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101d7b
-
-Function101d7b: ; 101d7b
- callba Function10138b
- ld b, 0
- ld hl, Unknown_101d8d
- add hl, bc
- ld c, [hl]
- ld a, c
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101d8d
-
-Unknown_101d8d: ; 101d8d
- db $15, $15, $1f, $1f, $0c, $12, $3a, $3a
-; 101d95
-
-Function101d95: ; 101d95
- call Function101ee2
- call LoadStandardMenuDataHeader
- ld e, $0e
- call Function101ee4
- ld hl, wcd29
- set 5, [hl]
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ld a, 0
- ld [wcd26], a
- ret
-; 101db2
-
-Function101db2: ; 101db2
- callba Function103302
- call ExitMenu
- ld hl, wcd29
- set 5, [hl]
- jr c, .asm_101dca
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101dca
- ld a, $02
- ld [wcd2b], a
- ret
-; 101dd0
-
-Function101dd0: ; 101dd0
- ld hl, wdc41
- bit 1, [hl]
- jr nz, .asm_101ddd
- ld a, $19
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101ddd
- ld a, $1b
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101de3
-
-Function101de3: ; 101de3
- call Function101ecc
- call Function101ead
- jr c, .asm_101df3
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101df3
- call Function101e98
- jr c, .asm_101e00
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101e00
- call Function101ed3
- ld a, $02
- ld [wcd2b], a
- ret
-; 101e09
-
-Function101e09: ; 101e09
- call Function101ead
- jr c, .asm_101e16
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101e16
- call Function101ecc
- call Function101e98
- push af
- call Function101ed3
- pop af
- jr c, .asm_101e2b
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101e2b
- ld a, $02
- ld [wcd2b], a
- ret
-; 101e31
-
-Function101e31: ; 101e31
- ld a, $3a
- ld [wMobileCommsJumptableIndex], a
- jp Function101c2b
-; 101e39
-
-Function101e39: ; 101e39
- call Function1020bf
- push af
- call Function101ed3
- pop af
- jr c, .asm_101e49
- ld a, $2a
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101e49
- ld a, $02
- ld [wcd2b], a
- ret
-; 101e4f
-
-Function101e4f: ; 101e4f
- ld e, $06
- call Function101ee4
- call Function1013d6
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ld a, 0
- ld [wcd26], a
- ret
-; 101e64
-
-Function101e64: ; 101e64
- call Function101ecc
- call Function1020a8
- push af
- call Function101ed3
- pop af
- jr c, .asm_101e77
- ld a, $24
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_101e77
- ld hl, wcd29
- set 5, [hl]
- ld a, $02
- ld [wcd2b], a
- ret
-; 101e82
-
-Function101e82: ; 101e82 ; unreferenced
- call Function101ecc
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101e8d
-
-Function101e8d: ; 101e8d ; unreferenced
- call Function101ed3
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 101e98
-
-Function101e98: ; 101e98
- call ClearSprites
- callba Function8adb3
- ret c
- ld hl, GameTimerPause
- set 7, [hl]
- ld hl, wdc41
- set 4, [hl]
- ret
-; 101ead
-
-Function101ead: ; 101ead
- ld hl, GameTimerPause
- bit 7, [hl]
- jr nz, .asm_101ec8
- ld hl, wdc41
- bit 2, [hl]
- jr z, .asm_101eca
- ld a, [wcd2f]
- and a
- jr nz, .asm_101ec8
- ld hl, wdc41
- bit 1, [hl]
- jr z, .asm_101eca
-
-.asm_101ec8
- xor a
- ret
-
-.asm_101eca
- scf
- ret
-; 101ecc
-
-Function101ecc: ; 101ecc
- call Function101ee2
- call FadeToMenu
- ret
-; 101ed3
-
-Function101ed3: ; 101ed3
- call Function1013aa
- callba Function115d99
- ld hl, wcd29
- set 7, [hl]
- ret
-; 101ee2
-
-Function101ee2: ; 101ee2
- ld e, 0
-
-Function101ee4: ; 101ee4
- ld d, 0
- ld hl, Unknown_101ef5
- add hl, de
- add hl, de
- ld a, [hli]
- ld d, [hl]
- ld e, a
- callba Function100504
- ret
-; 101ef5
-
-Unknown_101ef5: ; 101ef5
- dw String_101f13
- dw String_101f14
- dw String_101f32
- dw String_101f4f
- dw String_101f69
- dw String_101f81
- dw String_101f93
- dw String_101faa
- dw String_101fc5
- dw String_101fd2
- dw String_101fe1
- dw String_101fef
- dw String_102000
- dw String_10200c
- dw String_102014
-
-String_101f13: ; 101f13
- db "@"
-
-String_101f14: ; 101f14
- db "モバイルアダプタを つかって"
- next "おともだちと つうしんします@"
-
-String_101f32: ; 101f32
- db "でんわを かけるひとには"
- next "つうわりょうきんが かかります@"
-
-String_101f4f: ; 101f4f
- db "モバイルアダプタの じゅんびは"
- next "できて いますか?@"
-
-String_101f69: ; 101f69
- db "あなたが おともだちに"
- next "でんわを かけますか?@"
-
-String_101f81: ; 101f81
- db "めいしフ,ルダーを"
- next "つかいますか?@"
-
-String_101f93: ; 101f93
- db "でんわばんごうを にゅうりょく"
- next "してください@"
-
-String_101faa: ; 101faa
- db "それでは おともだちからの"
- next "でんわを おまちします…@"
-
-String_101fc5: ; 101fc5
- next "に でんわを かけます@"
-
-String_101fd2: ; 101fd2
- next "に でんわを かけています@"
-
-String_101fe1: ; 101fe1
- db "でんわが つながりました!@"
-
-String_101fef: ; 101fef
- db "つうわを"
- next "しゅうりょう します…@"
-
-String_102000: ; 102000
- db "つうしん しゅうりょう@"
-
-String_10200c: ; 10200c
- db "つうわ じかん@"
-
-String_102014: ; 102014
- db "それでは つうしんの"
- next "せっていを してください@"
-; 10202c
-
-Function10202c: ; 10202c
- callba Function115d99
- ld hl, wcd29
- set 7, [hl]
- ld c, $02
- call Function10142c
- ld e, $0d
- call Function101ee4
- hlcoord 4, 4
- call Function100681
- ret
-; 102048
-
-Function102048: ; 102048
- call Function10204c
- ret
-; 10204c
-
-Function10204c: ; 10204c
- hlcoord 3, 2
- ld c, $10
- ld de, wcd53
-.asm_102054
- ld a, [de]
- inc de
- and a
- jr z, .asm_102067
- sub $30
- jr c, .asm_102067
- cp $0a
- jr nc, .asm_102067
- add $f6
- ld [hli], a
- dec c
- jr nz, .asm_102054
-
-.asm_102067
- ret
-; 102068
-
-Function102068: ; 102068
- ld hl, wcd53
- ld c, $08
-.asm_10206d
- ld a, [de]
- call Function102080
- jr c, .asm_10207f
- ld a, [de]
- swap a
- call Function102080
- jr c, .asm_10207f
- inc de
- dec c
- jr nz, .asm_10206d
-
-.asm_10207f
- ret
-; 102080
-
-Function102080: ; 102080
- and $0f
- cp $0f
- jr z, .asm_10208a
- add $30
- ld [hli], a
- ret
-
-.asm_10208a
- ld [hl], 0
- scf
- ret
-; 10208e
-
-Function10208e: ; 10208e
- push de
- ld h, d
- ld l, e
- ld de, wdc42
- ld bc, 8
- call CopyBytes
- pop de
- ret
-; 10209c
-
-Function10209c: ; 10209c
- ld a, $ff
- ld hl, wdc42
- ld bc, 8
- call ByteFill
- ret
-; 1020a8
-
-Function1020a8: ; 1020a8
- call Function10209c
- ld c, $01
- ld de, wdc42
- callba Function17a68f
- ret c
- call Function10208e
- call Function102068
- xor a
- ret
-; 1020bf
-
-Function1020bf: ; 1020bf
- call ClearSprites
- callba Function8aba9
- ld a, c
- and a
- jr z, .asm_1020e8
- dec a
- ld hl, $a04c
- ld bc, $25
- call AddNTimes
- ld d, h
- ld e, l
- ld a, $04
- call GetSRAMBank
- call Function10208e
- call Function102068
- call CloseSRAM
- xor a
- ret
-
-.asm_1020e8
- scf
- ret
-; 1020ea
-
-Function1020ea: ; 1020ea
- ld hl, wdc41
- bit 4, [hl]
- jr z, .quit
- ld hl, wdc41
- bit 2, [hl]
- jr nz, .quit
- call Function10218d
- ld hl, wc608
- bit 4, [hl]
- jr z, .quit
- ld hl, wc608
- bit 2, [hl]
- jr nz, .quit
- call Function102112
- jr z, .quit
- and a
- ret
-
-.quit
- scf
- ret
-; 102112
-
-Function102112: ; 102112
- ld a, $04
- call GetSRAMBank
- ld hl, $a041
- ld c, 40
-.outer_loop
- push hl
- ld de, $c60f
- ld b, 31
-.inner_loop
- ld a, [de]
- cp [hl]
- jr nz, .not_matching
- inc de
- inc hl
- dec b
- jr nz, .inner_loop
- pop hl
- xor a
- jr .done
-
-.not_matching
- pop hl
- ld de, 37
- add hl, de
- dec c
- jr nz, .outer_loop
- ld a, $01
- and a
- jr .done ; useless jr
-
-.done
- push af
- call CloseSRAM
- pop af
- ret
-; 102142
-
-Function102142: ; 102142
- call Function10218d
- call Function102180
- ld hl, UnknownText_0x1021d1
- call MenuTextBox
- ld de, SFX_LEVEL_UP
- call PlaySFX
- call JoyWaitAorB
- call ExitMenu
- call Function10219f
- ld hl, UnknownText_0x1021d6
- call MenuTextBox
- call YesNoBox
- call ExitMenu
- jr c, .asm_10217c
- call Function1021b8
- jr c, .asm_10217c
- call Function10218d
- call Function102180
- ld hl, UnknownText_0x1021db
- call PrintText
-
-.asm_10217c
- call Function1013d6
- ret
-; 102180
-
-Function102180: ; 102180
- ld hl, wc608 + 1
- ld de, StringBuffer2
- ld bc, 11
- call CopyBytes
- ret
-; 10218d
-
-Function10218d: ; 10218d
- ld hl, w5_dc00
- ld de, wc608
- ld bc, $26
- ld a, $05
- call FarCopyWRAM
- ld de, wc608 + 1 ; useless
- ret
-; 10219f
-
-Function10219f: ; 10219f
- call FadeToMenu
- call Function10218d
- ld de, wc608 + 1
- callba Function8ac4e
- call JoyWaitAorB
- call PlayClickSFX
- call Function1013aa
- ret
-; 1021b8
-
-Function1021b8: ; 1021b8
- call FadeToMenu
- call Function10218d
- ld de, wPlayerMoveStruct
- callba Function8ac70
- ld a, c
- ld [StringBuffer1], a
- push af
- call Function1013aa
- pop af
- ret
-; 1021d1
-
-UnknownText_0x1021d1: ; 1021d1
- text_jump UnknownText_0x1bd19a
- db "@"
-
-UnknownText_0x1021d6: ; 1021d1
- text_jump UnknownText_0x1bd1ba
- db "@"
-
-UnknownText_0x1021db: ; 1021d1
- text_jump UnknownText_0x1bd1dd
- db "@"
-; 1021e0
-
-Function1021e0: ; 1021e0
- call MenuTextBox
- call JoyWaitAorB
- call ExitMenu
- ret
-; 1021ea
-
-UnknownText_0x1021ea: ; 1021ea
- text_jump UnknownText_0x1bd201
- db "@"
-
-UnknownText_0x1021ef:
- text_jump UnknownText_0x1bd211
- db "@"
-
-UnknownText_0x1021f4:
- text_jump UnknownText_0x1bd223
- db "@"
-; 1021f9
-
-Function1021f9: ; 1021f9
- call Function102233
- ld a, $0 ; Function10234b
- ld [wcd49], a
- ld hl, wcd29
- bit 3, [hl]
- res 3, [hl]
- jr z, .asm_10220f
- ld a, $1 ; Function102361
- ld [wcd49], a
-
-.asm_10220f
- call Function1022ca
- ld a, [wcd49]
- ld hl, Jumptable_1022f5
- rst JumpTable
- call Function102241
- call Function1022d0
- jr c, .asm_102231
- ld a, [wcd49]
- bit 7, a
- jr z, .asm_10220f
- xor a
- ld hl, wcd29
- bit 3, [hl]
- ret z
- scf
- ret
-
-.asm_102231
- xor a
- ret
-; 102233
-
-Function102233: ; 102233
- ld hl, wcd49
- ld bc, 10
- xor a
- call ByteFill
- call Function10304f
- ret
-; 102241
-
-Function102241: ; 102241
- call Function10226a
- call Function102274
- call Function10224b
- ret
-; 10224b
-
-Function10224b: ; 10224b
- ld hl, wcd4b
- bit 1, [hl]
- jr nz, .asm_10225e
- bit 2, [hl]
- jr nz, .asm_10225e
- call DelayFrame
- call DelayFrame
- xor a
- ret
-
-.asm_10225e
- res 1, [hl]
- res 2, [hl]
- callba Mobile_ReloadMapPart
- scf
- ret
-; 10226a
-
-Function10226a: ; 10226a
- ld hl, wcd4b
- bit 0, [hl]
- ret z
- call Function10305d
- ret
-; 102274
-
-Function102274: ; 102274
- ld hl, wcd4b
- bit 3, [hl]
- ret z
- res 3, [hl]
- ld de, 8
- call PlaySFX
- ret
-; 102283
-
-Function102283: ; 102283
- ld a, $01
- ld [AttrMapEnd], a
- ld hl, wcd4b
- set 0, [hl]
- ret
-; 10228e
-
-Function10228e: ; 10228e
- xor a
- ld [AttrMapEnd], a
- ld hl, wcd4b
- res 0, [hl]
- ret
-; 102298
-
-Function102298: ; 102298
- ld a, e
- cp $02
- ret nz
- ld hl, wcd4b
- bit 6, [hl]
- jr z, .asm_1022b6
- ld hl, wcd4b
- bit 7, [hl]
- ld hl, wcd4b
- set 7, [hl]
- ret nz
- ld de, SFX_ELEVATOR_END
- call PlaySFX
- jr .asm_1022c1
-
-.asm_1022b6
- ld hl, wcd4b
- bit 7, [hl]
- ld hl, wcd4b
- res 7, [hl]
- ret z
-
-.asm_1022c1
- call Function10304f
- ld a, $01
- ld [AttrMapEnd], a
- ret
-; 1022ca
-
-Function1022ca: ; 1022ca
- ld a, 30
- ld [OverworldDelay], a
- ret
-; 1022d0
-
-Function1022d0: ; 1022d0
- callba Function10032e
- ld a, [wcd2b]
- and a
- jr nz, .asm_1022f3
- call Function102298
- ld a, [OverworldDelay]
- ld c, a
- ld a, 30
- sub c
- ld c, a
- ld b, $03
- callba AdvanceMobileInactivityTimerAndCheckExpired
- jr c, .asm_1022f3
- xor a
- ret
-
-.asm_1022f3
- scf
- ret
-; 1022f5
-
-Jumptable_1022f5: ; 1022f5
- dw Function10234b ; 00
- dw Function102361 ; 01
- dw Function10236e ; 02
- dw Function102387 ; 03
- dw Function1023a1 ; 04
- dw Function1025c7 ; 05
- dw Function1025dc ; 06
- dw Function1024f6 ; 07
- dw Function10250c ; 08
- dw Function1024a8 ; 09
- dw Function102591 ; 0a
- dw Function1024a8 ; 0b
- dw Function1025b0 ; 0c
- dw Function1025bd ; 0d
- dw Function102814 ; 0e
- dw Function10283c ; 0f
- dw Function102862 ; 10
- dw Function10286f ; 11
- dw Function1024a8 ; 12
- dw Function1028a5 ; 13
- dw Function1028ab ; 14
- dw Function1023b5 ; 15
- dw Function1023c6 ; 16
- dw Function1024af ; 17
- dw Function102416 ; 18
- dw Function102423 ; 19
- dw Function10244b ; 1a
- dw Function1024af ; 1b
- dw Function10246a ; 1c
- dw Function102652 ; 1d
- dw Function10266b ; 1e
- dw Function1025e9 ; 1f
- dw Function1025ff ; 20
- dw Function102738 ; 21
- dw Function102754 ; 22
- dw Function1026b7 ; 23
- dw Function1026c8 ; 24
- dw Function1028bf ; 25
- dw Function1028c6 ; 26
- dw Function1028d3 ; 27
- dw Function1028da ; 28
- dw Function1024a8 ; 29
- dw Function10248d ; 2a
-; 10234b
-
-Function10234b: ; 10234b
- call Function102d9a
- call Function102dd3
- call Function102dec
- ld hl, wcd4b
- set 1, [hl]
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 102361
-
-Function102361: ; 102361
- ld a, $cc
- call Function1028e8
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 10236e
-
-Function10236e: ; 10236e
- call Function1028fc
- ret nc
- ld a, [wcd51]
- cp $cc
- jr z, .asm_10237f
- ld a, $f2
- ld [wcd2b], a
- ret
-
-.asm_10237f
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 102387
-
-Function102387: ; 102387
- ld hl, wcd4b
- set 6, [hl]
- xor a
- ld [wdc5f], a
- ld de, MUSIC_ROUTE_30
- call PlayMusic
- call Function102d9a
- call Function102dd3
- ld a, $01
- ld [wMenuCursorY], a
-
-Function1023a1: ; 1023a1
- call Function102283
- call Function102db7
- call Function102dec
- ld hl, wcd4b
- set 1, [hl]
- ld a, $1d
- ld [wcd49], a
- ret
-; 1023b5
-
-Function1023b5: ; 1023b5
- call Function10228e
- call Function102a3b
- call Function102b12
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 1023c6
-
-Function1023c6: ; 1023c6
- call Function102c48
- call Function102c87
- ld a, [wcd4c]
- dec a
- ld [CurPartyMon], a
- xor a
- ld [wd10b], a
- callba RemoveMonFromPartyOrBox
- ld hl, PartyCount
- inc [hl]
- ld a, [hli]
- ld c, a
- ld b, 0
- add hl, bc
- ld [hl], $ff
- ld a, [PartyCount]
- ld [wcd4c], a
- call Function102c07
- call Function102d48
- call Function102b32
- call Function102f50
- ld hl, wcd4b
- set 1, [hl]
- ld a, $14
- ld [wcd4e], a
- ld a, 0
- ld [wcd4f], a
- ld a, 0
- ld [wcd4a], a
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 102416
-
-Function102416: ; 102416
- ld a, $aa
- call Function1028e8
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 102423
-
-Function102423: ; 102423
- call Function102921
- ret nc
- callba SaveAfterLinkTrade
- callba TrainerRankings_Trades
- callba BackupMobileEventIndex
- ld hl, wcd4b
- set 1, [hl]
- ld a, 0
- ld [wcd4a], a
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 10244b
-
-Function10244b: ; 10244b
- call Function102f32
- ld hl, wcd4b
- set 1, [hl]
- ld a, $19
- ld [wcd4e], a
- ld a, 0
- ld [wcd4f], a
- ld a, 0
- ld [wcd4a], a
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 10246a
-
-Function10246a: ; 10246a
- call Function102d9a
- ld hl, wcd29
- set 3, [hl]
- call Function102e07
- ld hl, wcd4b
- set 1, [hl]
- ld a, $2a
- ld [wcd49], a
- ret
-; 102480
-
-Function102480: ; 102480
- ld c, $32
- call DelayFrames
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 10248d
-
-Function10248d: ; 10248d
- ld a, [wcd49]
- set 7, a
- ld [wcd49], a
- ret
-; 102496
-
-Function102496: ; 102496
- ld hl, wcd4e
- dec [hl]
- ret nz
- ld a, 0
- ld [wcd4a], a
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 1024a8
-
-Function1024a8: ; 1024a8
- callba Function1009f3
- ret c
-
-Function1024af: ; 1024af
- call GetJoypad
- ld a, [wcd4a]
- ld hl, Jumptable_1024ba
- rst JumpTable
- ret
-; 1024ba
-
-Jumptable_1024ba: ; 1024ba
- dw Function1024c0
- dw Function1024cb
- dw Function1024de
-; 1024c0
-
-Function1024c0: ; 1024c0
- ld hl, wcd4e
- inc [hl]
- ld a, [wcd4a]
- inc a
- ld [wcd4a], a
-
-Function1024cb: ; 1024cb
- ld hl, wcd4e
- dec [hl]
- ret nz
- ld a, [wcd4f]
- inc a
- ld [wcd4e], a
- ld a, [wcd4a]
- inc a
- ld [wcd4a], a
-
-Function1024de: ; 1024de
- ld hl, wcd4e
- dec [hl]
- jr z, .asm_1024e9
- ld a, [hJoyPressed]
- and A_BUTTON | B_BUTTON
- ret z
-
-.asm_1024e9
- ld a, 0
- ld [wcd4a], a
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 1024f6
-
-Function1024f6: ; 1024f6
- call PlaceHollowCursor
- ld hl, wcd4b
- set 1, [hl]
- ld a, [wcd4c]
- call Function1028e8
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 10250c
-
-Function10250c: ; 10250c
- call Function1028fc
- ret nc
- ld a, [wcd51]
- cp $0f
- jr z, .asm_10254b
- and a
- jr z, .asm_102572
- cp $aa
- jr z, .asm_102572
- cp $07
- jr nc, .asm_102572
- ld [wcd4d], a
- dec a
- ld [wd003], a
- ld a, [wcd4c]
- dec a
- ld [wd002], a
- call Function102b9c
- call Function102bdc
- jr c, .asm_10256d
- callba Functionfb5dd
- jr c, .asm_102568
- ld hl, wcd4b
- set 1, [hl]
- ld a, $0e
- ld [wcd49], a
- ret
-
-.asm_10254b
- call Function103021
- ld hl, wcd4b
- set 1, [hl]
- ld a, 0
- ld [wcd4a], a
- ld a, $1e
- ld [wcd4e], a
- ld a, $1e
- ld [wcd4f], a
- ld a, $29
- ld [wcd49], a
- ret
-
-.asm_102568
- call Function102ff5
- jr .asm_102577
-
-.asm_10256d
- call Function102f85
- jr .asm_102577
-
-.asm_102572
- call Function102fce
- jr .asm_102577
-
-.asm_102577
- ld hl, wcd4b
- set 1, [hl]
- ld a, 0
- ld [wcd4a], a
- ld a, $1e
- ld [wcd4e], a
- ld a, $3c
- ld [wcd4f], a
- ld a, $09
- ld [wcd49], a
- ret
-; 102591
-
-Function102591: ; 102591
- call Function102ee7
- ld hl, wcd4b
- set 1, [hl]
- ld a, 0
- ld [wcd4a], a
- ld a, $1e
- ld [wcd4e], a
- ld a, $3c
- ld [wcd4f], a
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 1025b0
-
-Function1025b0: ; 1025b0
- ld a, $09
- call Function1028e8
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 1025bd
-
-Function1025bd: ; 1025bd
- call Function1028fc
- ret nc
- ld a, $04
- ld [wcd49], a
- ret
-; 1025c7
-
-Function1025c7: ; 1025c7
- call Function102f6d
- ld hl, wcd4b
- set 1, [hl]
- ld a, $0f
- call Function1028e8
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 1025dc
-
-Function1025dc: ; 1025dc
- call Function1028fc
- ret nc
- ld a, [wcd49]
- set 7, a
- ld [wcd49], a
- ret
-; 1025e9
-
-Function1025e9: ; 1025e9
- nop
- ld hl, wcd4b
- set 6, [hl]
- call Function102b4e
- ld hl, wcd4b
- set 1, [hl]
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 1025ff
-
-Function1025ff: ; 1025ff
- ld hl, wcd4b
- set 2, [hl]
- callba Function1009f3
- ret c
- callba MobileMenuJoypad
- ld a, [wMenuJoypadFilter]
- and c
- ret z
- bit A_BUTTON_F, c
- jr nz, .a_button
- bit D_UP_F, c
- jr nz, .d_up
- bit D_DOWN_F, c
- jr nz, .d_down
- ret
-
-.a_button
- ld hl, wcd4b
- set 3, [hl]
- ld a, $27 ; Function1028d3
- ld [wcd49], a
- ret
-
-.d_up
- ld a, [wMenuCursorY]
- ld b, a
- ld a, [OTPartyCount]
- cp b
- ret nz
- call HideCursor
- ld a, [PartyCount]
- ld [wMenuCursorY], a
- ld a, $1d ; Function102652
- ld [wcd49], a
- ret
-
-.d_down
- ld a, [wMenuCursorY]
- cp $01
- ret nz
- ld a, $23 ; Function1026b7
- ld [wcd49], a
- ret
-; 102652
-
-Function102652: ; 102652
- nop
- ld hl, wcd4b
- set 6, [hl]
- nop
- call Function102b7b
- nop
- ld hl, wcd4b
- set 1, [hl]
- nop
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 10266b
-
-Function10266b: ; 10266b
- ld hl, wcd4b
- set 2, [hl]
- callba Function1009f3
- ret c
- callba MobileMenuJoypad
- ld a, [wMenuJoypadFilter]
- and c
- ret z
- bit A_BUTTON_F, c
- jr nz, .a_button
- bit D_DOWN_F, c
- jr nz, .d_down
- bit D_UP_F, c
- jr nz, .d_up
- ret
-
-.a_button
- ld hl, wcd4b
- set 3, [hl]
- ld a, $21 ; Function102738
- ld [wcd49], a
- ret
-
-.d_down
- ld a, [wMenuCursorY]
- dec a
- ret nz
- call HideCursor
- ld a, $1f ; Function1025e9
- ld [wcd49], a
- ret
-
-.d_up
- ld a, [wMenuCursorY]
- ld b, a
- ld a, [PartyCount]
- cp b
- ret nz
- ld a, $23 ; Function1026b7
- ld [wcd49], a
- ret
-; 1026b7
-
-Function1026b7: ; 1026b7
- ld hl, wcd4b
- set 6, [hl]
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ld a, 0
- ld [wcd4a], a
-
-Function1026c8: ; 1026c8
- call GetJoypad
- callba Function1009f3
- ret c
- ld a, [wcd4a]
- ld hl, Jumptable_1026da
- rst JumpTable
- ret
-; 1026da
-
-Jumptable_1026da: ; 1026da
- dw Function1026de
- dw Function1026f3
-; 1026de
-
-Function1026de: ; 1026de
- call HideCursor
- hlcoord 9, 17
- ld [hl], $ed
- ld a, [wcd4a]
- inc a
- ld [wcd4a], a
- ld hl, wcd4b
- set 1, [hl]
- ret
-; 1026f3
-
-Function1026f3: ; 1026f3
- ld a, [hJoyPressed]
- bit A_BUTTON_F, a
- jr nz, .asm_102723
- bit D_UP_F, a
- jr nz, .asm_102712
- bit D_DOWN_F, a
- jr nz, .asm_102702
- ret
-
-.asm_102702
- hlcoord 9, 17
- ld [hl], " "
- ld a, $01
- ld [wMenuCursorY], a
- ld a, $1d ; Function102652
- ld [wcd49], a
- ret
-
-.asm_102712
- hlcoord 9, 17
- ld [hl], " "
- ld a, [OTPartyCount]
- ld [wMenuCursorY], a
- ld a, $1f ; Function1025e9
- ld [wcd49], a
- ret
-
-.asm_102723
- hlcoord 9, 17
- ld [hl], "▷"
- ld hl, wcd4b
- set 3, [hl]
- ld hl, wcd4b
- set 2, [hl]
- ld a, $5 ; Function1025c7
- ld [wcd49], a
- ret
-; 102738
-
-Function102738: ; 102738
- ld hl, wcd4b
- set 6, [hl]
- call PlaceHollowCursor
- call Function1027eb
- ld hl, wcd4b
- set 1, [hl]
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ld a, 0
- ld [wcd4a], a
-
-Function102754: ; 102754
- call GetJoypad
- callba Function1009f3
- ret c
- ld a, [wcd4a]
- ld hl, Jumptable_102766
- rst JumpTable
- ret
-; 102766
-
-Jumptable_102766: ; 102766
- dw Function102770
- dw Function102775
- dw Function10278c
- dw Function1027a0
- dw Function1027b7
-; 102770
-
-Function102770: ; 102770
- ld a, $01
- ld [wcd4a], a
-
-Function102775: ; 102775
- hlcoord 1, 16
- ld [hl], "▶"
- hlcoord 11, 16
- ld [hl], " "
- ld hl, wcd4b
- set 2, [hl]
- ld a, [wcd4a]
- inc a
- ld [wcd4a], a
- ret
-; 10278c
-
-Function10278c: ; 10278c
- ld a, [hJoyPressed]
- bit A_BUTTON_F, a
- jr nz, asm_1027c6
- bit B_BUTTON_F, a
- jr nz, asm_1027e2
- bit D_RIGHT_F, a
- jr nz, .asm_10279b
- ret
-
-.asm_10279b
- ld a, $03
- ld [wcd4a], a
-Function1027a0: ; 1027a0
- hlcoord 1, 16
- ld [hl], " "
- hlcoord 11, 16
- ld [hl], "▶"
- ld hl, wcd4b
- set 2, [hl]
- ld a, [wcd4a]
- inc a
- ld [wcd4a], a
- ret
-
-Function1027b7: ; 1027b7
- ld a, [hJoyPressed]
- bit A_BUTTON_F, a
- jr nz, asm_1027d1
- bit B_BUTTON_F, a
- jr nz, asm_1027e2
- bit D_LEFT_F, a
- jr nz, Function102770
- ret
-
-asm_1027c6:
- ld hl, wcd4b
- set 3, [hl]
- ld a, $25 ; Function1028bf
- ld [wcd49], a
- ret
-
-asm_1027d1:
- ld hl, wcd4b
- set 3, [hl]
- ld a, [wMenuCursorY]
- ld [wcd4c], a
- ld a, $7 ; Function1024f6
- ld [wcd49], a
- ret
-
-asm_1027e2:
- call Function102db7
- ld a, $1d ; Function102652
- ld [wcd49], a
- ret
-; 1027eb
-
-Function1027eb: ; 1027eb
- hlcoord 0, 14
- ld b, 2
- ld c, 18
- ld d, h
- ld e, l
- callba _LinkTextbox
- ld de, .Stats_Trade
- hlcoord 2, 16
- call PlaceString
- ret
-; 102804
-
-.Stats_Trade: ; 102804
- db "STATS TRADE@"
-; 102814
-
-Function102814: ; 102814
- ld a, [wMenuCursorY]
- ld [wcd52], a
- ld a, [wcd4c]
- dec a
- ld [wd002], a
- ld a, [wcd4d]
- dec a
- ld [wd003], a
- call Function102ea8
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ld a, 0
- ld [wcd4a], a
- ld hl, wcd4b
- set 1, [hl]
-
-Function10283c: ; 10283c
- ld hl, wcd4b
- set 2, [hl]
- call Function1029c3
- ret z
- jr c, .asm_102852
- ld a, $10 ; Function102862
- ld [wcd49], a
- ld hl, wcd4b
- set 1, [hl]
- ret
-
-.asm_102852
- ld a, $14 ; Function1028ab
- ld [wcd49], a
- ld hl, wcd4b
- set 3, [hl]
- ld hl, wcd4b
- set 1, [hl]
- ret
-; 102862
-
-Function102862: ; 102862
- ld a, $08
- call Function1028e8
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 10286f
-
-Function10286f: ; 10286f
- call Function1028fc
- ret nc
- ld a, [wcd52]
- ld [wMenuCursorY], a
- ld a, [wcd51]
- cp $08
- jr nz, .asm_102886
- ld a, $15 ; Function1023b5
- ld [wcd49], a
- ret
-
-.asm_102886
- call Function102ee7
- ld hl, wcd4b
- set 1, [hl]
- ld a, $1e
- ld [wcd4e], a
- ld a, $3c
- ld [wcd4f], a
- ld a, 0
- ld [wcd4a], a
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ret
-; 1028a5
-
-Function1028a5: ; 1028a5
- ld a, $4 ; Function1023a1
- ld [wcd49], a
- ret
-; 1028ab
-
-Function1028ab: ; 1028ab
- ld a, [wcd52]
- ld [wMenuCursorY], a
- call Function102f15
- ld hl, wcd4b
- set 1, [hl]
- ld a, $c ; Function1025b0
- ld [wcd49], a
- ret
-; 1028bf
-
-Function1028bf: ; 1028bf
- ld a, [wcd49]
- inc a
- ld [wcd49], a
-
-Function1028c6: ; 1028c6
- xor a
- ld [MonType], a
- call Function102bac
- ld a, $1d ; Function102652
- ld [wcd49], a
- ret
-; 1028d3
-
-Function1028d3: ; 1028d3
- ld a, [wcd49]
- inc a
- ld [wcd49], a
-
-Function1028da: ; 1028da
- ld a, OTPARTYMON
- ld [MonType], a
- call Function102bac
- ld a, $1f ; Function1025e9
- ld [wcd49], a
- ret
-; 1028e8
-
-Function1028e8: ; 1028e8
- ld hl, wcd4b
- res 6, [hl]
- ld [wcd50], a
- callba StartMobileInactivityTimer
- ld a, 0
- ld [wcd4a], a
- ret
-; 1028fc
-
-Function1028fc: ; 1028fc
- call GetJoypad
- callba Function1009f3
- jr nc, .asm_102909
- and a
- ret
-
-.asm_102909
- ld a, [wcd4a]
- ld hl, Jumptable_102917
- rst JumpTable
- ret nc
- ld a, 0
- ld [wcd4a], a
- ret
-; 102917
-
-Jumptable_102917: ; 102917
- dw Function102933
- dw Function10294f
- dw Function10295d
- dw Function10296e
- dw Function102996
-; 102921
-
-Function102921: ; 102921
- ld a, [wcd4a]
- ld hl, Jumptable_10292f
- rst JumpTable
- ret nc
- ld a, 0
- ld [wcd4a], a
- ret
-; 10292f
-
-Jumptable_10292f: ; 10292f
- dw Function10295d
- dw Function102984
-; 102933
-
-Function102933: ; 102933
- ld hl, MenuDataHeader_1029bb
- call LoadMenuDataHeader
- call Function102e07
- ld a, $32
- ld [TextDelayFrames], a
- ld hl, wcd4b
- set 1, [hl]
- ld a, [wcd4a]
- inc a
- ld [wcd4a], a
- and a
- ret
-; 10294f
-
-Function10294f: ; 10294f
- ld a, [TextDelayFrames]
- and a
- ret nz
- ld a, [wcd4a]
- inc a
- ld [wcd4a], a
- and a
- ret
-; 10295d
-
-Function10295d: ; 10295d
- call Function10299e
- ld a, 0
- ld [wcd27], a
- ld a, [wcd4a]
- inc a
- ld [wcd4a], a
- and a
- ret
-; 10296e
-
-Function10296e: ; 10296e
- callba Function100382
- and a
- ld a, [wcd27]
- bit 7, a
- ret z
- ld a, [wcd4a]
- inc a
- ld [wcd4a], a
- and a
- ret
-; 102984
-
-Function102984: ; 102984
- callba Function100382
- and a
- ld a, [wcd27]
- bit 7, a
- ret z
- call Function1029af
- scf
- ret
-; 102996
-
-Function102996: ; 102996
- call Function1029af
- call ExitMenu
- scf
- ret
-; 10299e
-
-Function10299e: ; 10299e
- ld a, $01
- ld [wccb4], a
- ld a, [wcd50]
- ld [wccb5], a
- ld a, $aa
- ld [wcd51], a
- ret
-; 1029af
-
-Function1029af: ; 1029af
- ld hl, wcd4b
- res 7, [hl]
- ld a, [wcc61]
- ld [wcd51], a
- ret
-; 1029bb
-
-MenuDataHeader_1029bb: ; 1029bb
- db $40 ; flags
- db 10, 3 ; start coords
- db 12, 15 ; end coords
- dw NULL
- db 1 ; default option
-; 1029c3
-
-Function1029c3: ; 1029c3
- ld a, [wcd4a]
- ld hl, Jumptable_1029cb
- rst JumpTable
- ret
-; 1029cb
-
-Jumptable_1029cb: ; 1029cb
- dw Function1029cf
- dw Function1029fe
-; 1029cf
-
-Function1029cf: ; 1029cf
- call LoadStandardMenuDataHeader
- hlcoord 10, 7
- ld b, 3
- ld c, 8
- ld d, h
- ld e, l
- callba _LinkTextbox
- ld de, String_102a26
- hlcoord 12, 8
- call PlaceString
- ld hl, wcd4b
- set 1, [hl]
- ld de, MenuData3_102a33
- call SetMenuAttributes
- ld a, [wcd4a]
- inc a
- ld [wcd4a], a
- xor a
- ret
-; 1029fe
-
-Function1029fe: ; 1029fe
- callba Function1009f3
- ret c
- callba MobileMenuJoypad
- ld a, c
- ld hl, wMenuJoypadFilter
- and [hl]
- ret z
- push af
- call ExitMenu
- pop af
- ld a, [wMenuCursorY]
- cp $01
- jr nz, .asm_102a21
- ld a, $01
- and a
- ret
-
-.asm_102a21
- ld a, $01
- and a
- scf
- ret
-; 102a26
-
-String_102a26: ; 102a26
- db "TRADE"
- next "CANCEL"
- db "@"
-; 102a33
-
-MenuData3_102a33:
- db 8, 11
- db 2, 1
- db $80, $00
- dn 2, 0
- db A_BUTTON
-
-Function102a3b: ; 102a3b
- ld a, [wcd30]
- ld [wc74e], a
- ld hl, PlayerName
- ld de, wPlayerTrademonSenderName
- ld bc, NAME_LENGTH
- call CopyBytes
- ld a, [wcd4c]
- dec a
- ld c, a
- ld b, 0
- ld hl, PartySpecies
- add hl, bc
- ld a, [hl]
- ld [wPlayerTrademonSpecies], a
- ld a, [wcd4c]
- dec a
- ld hl, PartyMonOT
- call SkipNames
- ld de, wPlayerTrademonOTName
- ld bc, NAME_LENGTH
- call CopyBytes
- ld a, [wcd4c]
- dec a
- ld hl, PartyMon1ID
- call GetPartyLocation
- ld a, [hli]
- ld [wPlayerTrademonID], a
- ld a, [hl]
- ld [wPlayerTrademonID + 1], a
- ld a, [wcd4c]
- dec a
- ld hl, PartyMon1DVs
- call GetPartyLocation
- ld a, [hli]
- ld [wPlayerTrademonDVs], a
- ld a, [hl]
- ld [wPlayerTrademonDVs + 1], a
- ld a, [wcd4c]
- dec a
- ld hl, PartyMon1Species
- call GetPartyLocation
- ld b, h
- ld c, l
- callba GetCaughtGender
- ld a, c
- ld [wPlayerTrademonCaughtData], a
- ld hl, OTPlayerName
- ld de, wOTTrademonSenderName
- ld bc, NAME_LENGTH
- call CopyBytes
-
- ld a, [wcd4d]
- dec a
- ld c, a
- ld b, 0
- ld hl, OTPartySpecies
- add hl, bc
- ld a, [hl]
- ld [wOTTrademonSpecies], a
- ld a, [wcd4d]
- dec a
- ld hl, OTPartyMonOT
- call SkipNames
- ld de, wOTTrademonOTName
- ld bc, NAME_LENGTH
- call CopyBytes
- ld a, [wcd4d]
- dec a
- ld hl, OTPartyMon1ID
- call GetPartyLocation
- ld a, [hli]
- ld [wOTTrademonID], a
- ld a, [hl]
- ld [wOTTrademonID + 1], a
- ld a, [wcd4d]
- dec a
- ld hl, OTPartyMon1DVs
- call GetPartyLocation
- ld a, [hli]
- ld [wOTTrademonDVs], a
- ld a, [hl]
- ld [wOTTrademonDVs + 1], a
- ld a, [wcd4d]
- dec a
- ld hl, OTPartyMon1Species
- call GetPartyLocation
- ld b, h
- ld c, l
- callba GetCaughtGender
- ld a, c
- ld [wOTTrademonCaughtData], a
- ret
-; 102b12
-
-Function102b12: ; 102b12
- ld c, 100
- call DelayFrames
- call Function102d9a
- call LoadFontsBattleExtra
- ld a, [wcd2f]
- and a
- jr nz, .asm_102b2b
- callba Function108026
- jr .asm_102b31
-
-.asm_102b2b
- callba Function10802a
-
-.asm_102b31
- ret
-; 102b32
-
-Function102b32: ; 102b32
- ld a, [wcd4c]
- dec a
- ld [CurPartyMon], a
- ld a, $01
- ld [wForceEvolution], a
- callba EvolvePokemon
- call Function102d9a
- call Function102dd3
- call Function102dec
- ret
-; 102b4e
-
-Function102b4e: ; 102b4e
- ld a, OTPARTYMON
- ld [MonType], a
- ld a, [wMenuCursorY]
- push af
- ld de, Unknown_102b73
- call SetMenuAttributes
- pop af
- ld [wMenuCursorY], a
- ld a, [OTPartyCount]
- ld [w2DMenuNumRows], a
- ret
-; 102b68
-
-Function102b68: ; 102b68 ; unreferenced
- xor a
- ld hl, wWindowStackPointer
- ld bc, $10
- call ByteFill
- ret
-; 102b73
-
-Unknown_102b73:
- db 9, 6
- db 255, 1
- db $a0, $00
- dn 1, 0
- db D_UP | D_DOWN | A_BUTTON
-
-Function102b7b: ; 102b7b
- xor a
- ld [MonType], a
- ld a, [wMenuCursorY]
- push af
- ld de, Unknown_102b94
- call SetMenuAttributes
- pop af
- ld [wMenuCursorY], a
- ld a, [PartyCount]
- ld [w2DMenuNumRows], a
- ret
-; 102b94
-
-Unknown_102b94:
- db 1, 6
- db 255, 1
- db $a0, $00
- dn 1, 0
- db D_UP | D_DOWN | A_BUTTON
-
-Function102b9c: ; 102b9c
- ld a, [wcd4d]
- dec a
- hlcoord 6, 9
- ld bc, $14
- call AddNTimes
- ld [hl], $ec
- ret
-; 102bac
-
-Function102bac: ; 102bac
- ld a, [wMenuCursorY]
- dec a
- ld [CurPartyMon], a
- call LowVolume
- call ClearSprites
- callba _MobileStatsScreenInit
- ld a, [CurPartyMon]
- inc a
- ld [wMenuCursorY], a
- call Function102d9a
- call ClearPalettes
- call DelayFrame
- call MaxVolume
- call Function102dd3
- call Function102dec
- call Function102db7
- ret
-; 102bdc
-
-Function102bdc: ; 102bdc
- ld a, [wcd4d]
- dec a
- ld hl, OTPartyMon1Species
- call GetPartyLocation
- push hl
- ld a, [wcd4d]
- ld c, a
- ld b, 0
- ld hl, OTPartyCount
- add hl, bc
- ld a, [hl]
- pop hl
- cp EGG
- jr z, .asm_102bfa
- cp [hl]
- jr nz, .asm_102c05
-
-.asm_102bfa
- ld bc, MON_LEVEL
- add hl, bc
- ld a, [hl]
- cp MAX_LEVEL + 1
- jr nc, .asm_102c05
- and a
- ret
-
-.asm_102c05
- scf
- ret
-; 102c07
-
-Function102c07: ; 102c07
- call Function102c14
- call Function102c3b
- call Function102c21
- call Function102c2e
- ret
-; 102c14
-
-Function102c14: ; 102c14
- ld hl, PartySpecies
- ld de, OTPartySpecies
- ld bc, 1
- call Function102c71
- ret
-; 102c21
-
-Function102c21: ; 102c21
- ld hl, PartyMonNicknames
- ld de, OTPartyMonNicknames
- ld bc, 11
- call Function102c71
- ret
-; 102c2e
-
-Function102c2e: ; 102c2e
- ld hl, PartyMonOT
- ld de, OTPartyMonOT
- ld bc, 11
- call Function102c71
- ret
-; 102c3b
-
-Function102c3b: ; 102c3b
- ld hl, PartyMon1
- ld de, OTPartyMon1
- ld bc, $30
- call Function102c71
- ret
-; 102c48
-
-Function102c48: ; 102c48
- callba Function10165a
- ld a, 0
- call GetSRAMBank
- ld hl, $a600
- ld de, wc608
- ld bc, $2f
- call Function102c71
- call CloseSRAM
- ld hl, wc608
- ld de, w5_da00
- ld bc, $1e0
- ld a, $05
- call FarCopyWRAM
- ret
-; 102c71
-
-Function102c71: ; 102c71
- ld a, [wcd4c]
- dec a
- call AddNTimes
- push hl
- ld h, d
- ld l, e
- ld a, [wcd4d]
- dec a
- call AddNTimes
- pop de
- call SwapBytes
- ret
-; 102c87
-
-Function102c87: ; 102c87
- ld a, [wJumptableIndex]
- push af
- ld a, [wcf64]
- push af
- ld a, [wcd4c]
- ld [wJumptableIndex], a
- ld a, [PartyCount]
- ld [wcf64], a
- ld a, 0
- ld hl, $a600
- ld de, wc608
- ld bc, $11a
- call Function102d3e
- call Function102cee
- ld a, 0
- ld hl, wc608
- ld de, $a600
- ld bc, $11a
- call Function102d3e
- ld a, [wcd4d]
- ld [wJumptableIndex], a
- ld a, [OTPartyCount]
- ld [wcf64], a
- ld a, $05
- ld hl, w5_da00
- ld de, wc608
- ld bc, $11a
- call FarCopyWRAM
- call Function102cee
- ld a, $05
- ld hl, wc608
- ld de, w5_da00
- ld bc, $11a
- call FarCopyWRAM
- pop af
- ld [wcf64], a
- pop af
- ld [wJumptableIndex], a
- ret
-; 102cee
-
-Function102cee: ; 102cee
- ld a, [wJumptableIndex]
- dec a
- call Function102d34
- ld de, wd002
- ld bc, $2f
- call CopyBytes
- ld a, [wJumptableIndex]
- ld c, a
- ld a, $06
- sub c
- ret z
- ld bc, $2f
- ld hl, 0
- call AddNTimes
- push hl
- ld a, [wJumptableIndex]
- dec a
- call Function102d34
- ld d, h
- ld e, l
- ld hl, $2f
- add hl, de
- pop bc
- call CopyBytes
- ld a, [wcf64]
- dec a
- call Function102d34
- ld d, h
- ld e, l
- ld hl, wd002
- ld bc, $2f
- call CopyBytes
- ret
-; 102d34
-
-Function102d34: ; 102d34
- ld hl, wc608
- ld bc, $2f
- call AddNTimes
- ret
-; 102d3e
-
-Function102d3e: ; 102d3e
- call GetSRAMBank
- call CopyBytes
- call CloseSRAM
- ret
-; 102d48
-
-Function102d48: ; 102d48
- ld a, [wcd4c]
- ld e, a
- ld d, 0
- ld hl, PartyCount
- add hl, de
- ld a, [hl]
- ld [wd265], a
- cp EGG
- jr z, .asm_102d6d
- dec a
- call SetSeenAndCaughtMon
- ld a, [wcd4c]
- dec a
- ld bc, PARTYMON_STRUCT_LENGTH
- ld hl, PartyMon1Happiness
- call AddNTimes
- ld [hl], BASE_HAPPINESS
-
-.asm_102d6d
- ld a, [wd265]
- cp UNOWN
- jr nz, .asm_102d98
- ld a, [wcd4c]
- dec a
- ld bc, PARTYMON_STRUCT_LENGTH
- ld hl, PartyMon1DVs
- call AddNTimes
- predef GetUnownLetter
- callba UpdateUnownDex
- ld a, [wFirstUnownSeen]
- and a
- jr nz, .asm_102d98
- ld a, [UnownLetter]
- ld [wFirstUnownSeen], a
-
-.asm_102d98
- and a
- ret
-; 102d9a
-
-Function102d9a: ; 102d9a
- ld a, " "
- hlcoord 0, 0
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- call ByteFill
- ld a, $07
- hlcoord 0, 0, AttrMap
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- call ByteFill
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
- ret
-; 102db7
-
-Function102db7: ; 102db7
- call Function102e4f
- call Function102e3e
- ld hl, wcd4b
- set 1, [hl]
- ret
-; 102dc3
-
-Function102dc3: ; 102dc3
- hlcoord 0, 12
- ld b, 4
- ld c, 18
- ld d, h
- ld e, l
- callba _LinkTextbox
- ret
-; 102dd3
-
-Function102dd3: ; 102dd3
- call DisableLCD
- ld de, GFX_1032a2
- ld hl, VTiles0
- lb bc, BANK(GFX_1032a2), 4
- call Get2bpp
- callba __LoadTradeScreenBorder
- call EnableLCD
- ret
-; 102dec
-
-Function102dec: ; 102dec
- ld hl, Palettes_1032e2
- ld de, UnknOBPals
- ld bc, 4 palettes
- ld a, $05
- call FarCopyWRAM
- callba Function49742
- call SetPalettes
- call DelayFrame
- ret
-; 102e07
-
-Function102e07: ; 102e07
- hlcoord 3, 10
- ld b, 1
- ld c, 11
- ld a, [wBattleMode]
- and a
- jr z, .link_battle
- call TextBox
- jr .okay
-
-.link_battle
-; this is idiotic
- hlcoord 3, 10
- ld b, 1
- ld c, 11
- ld d, h
- ld e, l
- callba _LinkTextbox
-
-.okay
- ld de, .waiting
- hlcoord 4, 11
- call PlaceString
- ret
-; 102e32
-
-.waiting ; 102e32
- db "Waiting...!@"
-; 102e3e
-
-Function102e3e: ; 102e3e
- ld de, .CANCEL
- hlcoord 10, 17
- call PlaceString
- ret
-; 102e48
-
-.CANCEL: ; 102e48
- db "CANCEL@"
-; 102e4f
-
-Function102e4f: ; 102e4f
- callba Function16d42e
- callba _InitMG_Mobile_LinkTradePalMap
- ld de, PlayerName
- hlcoord 4, 0
- call PlaceString
- ld a, $14
- ld [bc], a
- ld de, OTPlayerName
- hlcoord 4, 8
- call PlaceString
- ld a, $14
- ld [bc], a
- hlcoord 7, 1
- ld de, PartySpecies
- call .PlaceSpeciesNames
- hlcoord 7, 9
- ld de, OTPartySpecies
- call .PlaceSpeciesNames
- ret
-; 102e86
-
-.PlaceSpeciesNames: ; 102e86
- ld c, 0
-.count_loop
- ld a, [de]
- cp $ff
- ret z
- ld [wd265], a
- push bc
- push hl
- push de
- push hl
- ld a, c
- ld [hDividend], a
- call GetPokemonName
- pop hl
- call PlaceString
- pop de
- inc de
- pop hl
- ld bc, SCREEN_WIDTH
- add hl, bc
- pop bc
- inc c
- jr .count_loop
-; 102ea8
-
-Function102ea8: ; 102ea8
- call Function102dc3
- ld a, [wcd4c]
- dec a
- ld c, a
- ld b, 0
- ld hl, PartySpecies
- add hl, bc
- ld a, [hl]
- ld [wd265], a
- call GetPokemonName
- ld hl, StringBuffer1
- ld de, StringBuffer2
- ld bc, 11
- call CopyBytes
- ld a, [wcd4d]
- dec a
- ld c, a
- ld b, 0
- ld hl, OTPartySpecies
- add hl, bc
- ld a, [hl]
- ld [wd265], a
- call GetPokemonName
- ld hl, UnknownText_0x102ee2
- call PrintTextBoxText
- ret
-; 102ee2
-
-UnknownText_0x102ee2: ; 102ee2
- text_jump UnknownText_0x1bd286
- db "@"
-
-Function102ee7: ; 102ee7
- call Function102dc3
- ld de, String_102ef4
- hlcoord 1, 14
- call PlaceString
- ret
-; 102ef4
-
-String_102ef4: ; 102ef4
- db "Too bad! The trade"
- next "was canceled!"
- db "@"
-; 102f15
-
-Function102f15: ; 102f15
- call Function102dc3
- ld de, .TooBadTheTradeWasCanceled
- hlcoord 1, 14
- call PlaceString
- ret
-; 102f22
-
-.TooBadTheTradeWasCanceled: ; 102f22
- db "こうかんを キャンセルしました@"
-; 102f32
-
-Function102f32: ; 102f32
- call Function102dc3
- ld de, .TradeCompleted
- hlcoord 1, 14
- call PlaceString
- ret
-; 102f3f
-
-.TradeCompleted: ; 102f3f
- db "Trade completed!@"
-; 102f50
-
-Function102f50: ; 102f50
- call Function102dc3
- ld de, .PleaseWait
- hlcoord 1, 14
- call PlaceString
- ret
-; 102f5d
-
-.PleaseWait: ; 102f5d
- db "しょうしょう おまち ください@"
-; 102f6d
-
-Function102f6d: ; 102f6d
- call Function102dc3
- ld de, .Finished
- hlcoord 1, 14
- call PlaceString
- ret
-; 102f7a
-
-.Finished: ; 102f7a
- db "しゅうりょう します@"
-; 102f85
-
-Function102f85: ; 102f85
- ld a, [wd003]
- ld c, a
- ld b, 0
- ld hl, OTPartySpecies
- add hl, bc
- ld a, [hl]
- ld [wd265], a
- call GetPokemonName
- call Function102dc3
- ld de, String_102fb2
- hlcoord 1, 14
- call PlaceString
- ld de, StringBuffer1
- hlcoord 13, 14
- call PlaceString
- ld de, String_102fcc
- call PlaceString
- ret
-; 102fb2
-
-String_102fb2: ; 102fb2
- db "あいてがわ<PKMN>えらんだ "
- next "いじょう<PKMN>あるようです!!"
- db "@"
-; 102fcc
-
-String_102fcc: ; 102fcc
- db "に@"
-; 102fce
-
-Function102fce: ; 102fce
- call Function102dc3
- ld de, String_102fdb
- hlcoord 1, 14
- call PlaceString
- ret
-; 102fdb
-
-String_102fdb: ; 102fdb
- db "あいてがわ%せんたくに"
- next "いじょう<PKMN>あるようです!!"
- done
-; 102ff5
-
-Function102ff5: ; 102ff5
- call Function102dc3
- ld de, String_103002
- hlcoord 1, 14
- call PlaceString
- ret
-; 103002
-
-String_103002: ; 103002
- db "その#を こうかんすると"
- next "せんとう できなく なっちゃうよ!"
- db "@"
-; 103021
-
-Function103021: ; 103021
- call Function102dc3
- ld de, String_10302e
- hlcoord 1, 14
- call PlaceString
- ret
-; 10302e
-
-String_10302e: ; 10302e
- db "あいてが ちゅうしを えらんだので"
- next "こうかんを ちゅうし します"
- db "@"
-; 10304f
-
-Function10304f: ; 10304f
- xor a
- ld [AttrMapEnd], a
- ld [wcf42], a
- ld [wcf44], a
- ld [wcf45], a
- ret
-; 10305d
-
-Function10305d: ; 10305d
- nop
- ld a, [AttrMapEnd]
- and a
- ret z
- call Function10307f
- ret c
- call Function103094
- call Function10306e
- ret
-; 10306e
-
-Function10306e: ; 10306e
- ld a, $01
- ld [hOAMUpdate], a
- call ClearSprites
- ld de, Sprites
- call Function1030cd
- xor a
- ld [hOAMUpdate], a
- ret
-; 10307f
-
-Function10307f: ; 10307f
- ld c, $02
- ld hl, wcd4b
- bit 7, [hl]
- jr z, .asm_10308a
- ld c, $01
-
-.asm_10308a
- ld hl, wcf45
- inc [hl]
- ld a, [hl]
- cp c
- ret c
- xor a
- ld [hl], a
- ret
-; 103094
-
-Function103094: ; 103094
- ld hl, wcd4b
- bit 7, [hl]
- jr nz, .asm_1030c0
- ld a, [wcf42]
- bit 7, a
- jr nz, .asm_1030b2
- ld a, [wcf44]
- inc a
- ld [wcf44], a
- cp $2c
- ret nz
- ld hl, wcf42
- set 7, [hl]
- ret
-
-.asm_1030b2
- ld a, [wcf44]
- dec a
- ld [wcf44], a
- ret nz
- ld hl, wcf42
- res 7, [hl]
- ret
-
-.asm_1030c0
- ld hl, wcf44
- ld a, [hl]
- and a
- jr z, .asm_1030ca
- dec a
- ld [hl], a
- ret nz
-
-.asm_1030ca
- ld [hl], $2c
- ret
-; 1030cd
-
-Function1030cd: ; 1030cd
- ld a, [wcf44]
- ld l, a
- ld h, 0
- add hl, hl
- add hl, hl
- add hl, hl
- ld bc, Unknown_103112
- add hl, bc
- ld b, $30
- ld c, $08
-.asm_1030de
- push hl
- ld hl, wcd4b
- bit 7, [hl]
- pop hl
- ld a, 0
- jr z, .asm_1030eb
- ld a, $05
-.asm_1030eb
-
- add [hl]
- inc hl
- push hl
-
- add a
- add a
-
- add Unknown_10327a % $100
- ld l, a
- ld a, Unknown_10327a / $100
- adc 0
- ld h, a
-
- ld a, b
- add [hl]
- inc hl
- ld [de], a
- inc de
- ld a, $0a
- add [hl]
- inc hl
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- pop hl
- ld a, b
- add $08
- ld b, a
- dec c
- jr nz, .asm_1030de
- ret
-; 103112
-
-Unknown_103112: ; 103112
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $01, $00, $00, $00, $00, $00, $00, $00
- db $02, $01, $00, $00, $00, $00, $00, $00
- db $03, $02, $01, $00, $00, $00, $00, $00
- db $04, $03, $02, $01, $00, $00, $00, $00
- db $04, $04, $03, $02, $01, $00, $00, $00
- db $04, $04, $04, $03, $02, $01, $00, $00
- db $04, $04, $04, $04, $03, $02, $01, $00
- db $04, $04, $04, $04, $04, $03, $02, $01
- db $04, $04, $04, $04, $04, $04, $03, $02
- db $04, $04, $04, $04, $04, $04, $04, $03
- db $04, $04, $04, $04, $04, $04, $04, $04
- db $04, $04, $04, $04, $04, $04, $04, $04
- db $04, $04, $04, $04, $04, $04, $04, $04
- db $04, $04, $04, $04, $04, $04, $04, $04
- db $04, $04, $04, $04, $04, $04, $04, $04
- db $04, $04, $04, $04, $04, $04, $04, $04
- db $04, $04, $04, $04, $04, $04, $04, $04
- db $04, $04, $04, $04, $04, $04, $04, $04
- db $03, $04, $04, $04, $04, $04, $04, $04
- db $02, $03, $04, $04, $04, $04, $04, $04
- db $01, $02, $03, $04, $04, $04, $04, $04
- db $00, $01, $02, $03, $04, $04, $04, $04
- db $00, $00, $01, $02, $03, $04, $04, $04
- db $00, $00, $00, $01, $02, $03, $04, $04
- db $00, $00, $00, $00, $01, $02, $03, $04
- db $00, $00, $00, $00, $00, $01, $02, $03
- db $00, $00, $00, $00, $00, $00, $01, $02
- db $00, $00, $00, $00, $00, $00, $00, $01
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
- db $00, $00, $00, $00, $00, $00, $00, $00
-; 10327a
-
-Unknown_10327a: ; 10327a
- db $00, $00, $00, $00
- db $00, $00, $01, $00
- db $00, $00, $02, $00
- db $00, $00, $03, $00
- db $00, $00, $01, $01
- db $00, $00, $00, $00
- db $00, $00, $01, $02
- db $00, $00, $02, $02
- db $00, $00, $03, $02
- db $00, $00, $01, $03
-
-GFX_1032a2:
-INCBIN "gfx/unknown/1032a2.2bpp"
-
-Palettes_1032e2:
- RGB 0, 0, 0
- RGB 31, 31, 7
- RGB 20, 31, 6
- RGB 13, 20, 16
-
- RGB 0, 0, 0
- RGB 7, 11, 17
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 31, 24, 4
- RGB 25, 12, 0
- RGB 31, 7, 4
-
- RGB 0, 0, 0
- RGB 25, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
-; 103302
-
-Function103302: ; 103302
- call Function103309
- call Function103362
- ret
-; 103309
-
-Function103309: ; 103309
- xor a
- ld [hBGMapMode], a
- ld hl, Buffer1
- ld bc, 10
- xor a
- call ByteFill
- ld a, $04
- call GetSRAMBank
- ld a, [wdc41]
- ld [$a60c], a
- ld [Buffer1], a
- call CloseSRAM
- call Function1035c6
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- ld a, [hli]
- ld [wd1ef], a
- ld a, [hli]
- ld [wd1ec], a
- ld a, [hli]
- ld [wd1ed], a
- ld h, d
- ld l, e
- call Function3eea
- ld hl, wd1ec
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [hl]
- ld [wd1ee], a
- call Function1034be
- call UpdateSprites
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
- ld a, $01
- ld [wd1f0], a
- call Function10339a
- ret
-; 103362
-
-Function103362: ; 103362
-.asm_103362
- ld a, [wd1f0]
- ld [wd1f1], a
- call Function1033af
- call Function10339a
- call Function10342c
- callba HDMATransferTileMapToWRAMBank3
- ld a, [Buffer2]
- bit 7, a
- jr z, .asm_103362
- ld hl, Buffer2
- bit 6, [hl]
- jr z, .asm_103398
- ld a, $04
- call GetSRAMBank
- ld a, [Buffer1]
- ld [$a60c], a
- ld [wdc41], a
- call CloseSRAM
- xor a
- ret
-
-.asm_103398
- scf
- ret
-; 10339a
-
-Function10339a: ; 10339a
- ld a, [wd1f0]
- ld [wd1f2], a
- ld c, a
- ld b, 0
- ld hl, wd1ec
- ld a, [hli]
- ld h, [hl]
- ld l, a
- add hl, bc
- ld a, [hl]
- ld [wd1f3], a
- ret
-; 1033af
-
-Function1033af: ; 1033af
- call GetJoypad
- ld a, [hJoyPressed]
- bit D_LEFT_F, a
- jr nz, .left
- bit D_RIGHT_F, a
- jr nz, .right
- bit B_BUTTON_F, a
- jr nz, .b
- bit A_BUTTON_F, a
- jr nz, .a
- bit D_UP_F, a
- jr nz, .up
- bit D_DOWN_F, a
- jr nz, .down
- ret
-
-.up
- ld a, [wd1f0]
- dec a
- ld [wd1f0], a
- cp 1
- ret nc
- ld a, [wd1ee]
- ld [wd1f0], a
- ret
-
-.down
- ld a, [wd1f0]
- inc a
- ld [wd1f0], a
- ld c, a
- ld a, [wd1ee]
- cp c
- ret nc
- ld a, 1
- ld [wd1f0], a
- ret
-
-.b
- call PlayClickSFX
- ld hl, Buffer2
- set 7, [hl]
- ret
-
-.a
- ld a, [wd1f3]
- cp 3
- jr nz, .a_return
- ld de, SFX_TRANSACTION
- call PlaySFX
- ld hl, Buffer2
- set 7, [hl]
- ld hl, Buffer2
- set 6, [hl]
- ret
-
-.left
-.right
-.a_return
- ld a, [wd1f3]
- cp 3
- ret z
- ld de, SFX_PUSH_BUTTON
- call PlaySFX
- ld bc, 8
- call Function10350f
- ld a, [Buffer1]
- xor e
- ld [Buffer1], a
- ret
-; 10342c
-
-Function10342c: ; 10342c
- ld a, [wd1f0]
- ld [wd1f2], a
- call Function103490
- call Function10343c
- call Function1034a7
- ret
-; 10343c
-
-Function10343c: ; 10343c
- ld a, [wd1f3]
- cp $02
- jr nz, .asm_103452
- ld bc, 1
- call Function1034f7
- ld c, $12
- ld b, $01
- call Function1034e0
- jr .asm_10345f
-
-.asm_103452
- ld bc, $ffed
- call Function1034f7
- ld c, $12
- ld b, $02
- call Function1034e0
-
-.asm_10345f
- ld bc, 0
- call Function10350f
- ld bc, 1
- call Function103487
- ld bc, 8
- call Function10350f
- ld a, [Buffer1]
- and e
- ld bc, 2
- jr z, .asm_10347d
- ld bc, 4
-
-.asm_10347d
- call Function10350f
- ld bc, 11
- call Function103487
- ret
-; 103487
-
-Function103487: ; 103487
- push de
- call Function1034f7
- pop de
- call PlaceString
- ret
-; 103490
-
-Function103490: ; 103490
- hlcoord 0, 15
- ld c, $14
- ld b, $03
- call Function1034e0
- ld bc, 6
- call Function10350f
- hlcoord 1, 16
- call PlaceString
- ret
-; 1034a7
-
-Function1034a7: ; 1034a7
- ld a, [wd1f1]
- ld [wd1f2], a
- ld bc, 10
- call Function1034f7
- ld [hl], $7f
- ld bc, 10
- call Function1034f1
- ld [hl], $ed
- ret
-; 1034be
-
-Function1034be: ; 1034be
- ld a, $01
- ld [wd1f2], a
- ld hl, wd1ec
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [hli]
-.asm_1034ca
- push af
- ld a, [hli]
- push hl
- ld [wd1f3], a
- call Function10343c
- ld hl, wd1f2
- inc [hl]
- pop hl
- pop af
- dec a
- jr nz, .asm_1034ca
- call Function103490
- ret
-; 1034e0
-
-Function1034e0: ; 1034e0
- push bc
- push hl
- call ClearBox
- pop hl
- ld bc, AttrMap - TileMap
- add hl, bc
- pop bc
- ld a, $06
- call FillBoxWithByte
- ret
-; 1034f1
-
-Function1034f1: ; 1034f1
- ld a, [wd1f0]
- ld [wd1f2], a
-
-Function1034f7: ; 10134f7
- hlcoord 0, 0
- add hl, bc
- ld a, [wd1ef]
- ld bc, SCREEN_WIDTH
- call AddNTimes
- ld a, [wd1f2]
- dec a
- ld bc, 40
- call AddNTimes
- ret
-; 10350f
-
-Function10350f: ; 10350f
- ld a, [wd1f3]
- push bc
- ld hl, Unknown_103522
- ld bc, 9
- call AddNTimes
- pop bc
- add hl, bc
- ld a, [hli]
- ld d, [hl]
- ld e, a
- ret
-; 103522
-
-Unknown_103522: ; 103522
- dw String_103546
- dw String_103598
- dw String_1035a0
- dw String_10355f
- db $01
- dw String_10354f
- dw String_1035a8
- dw String_1035b1
- dw String_103571
- db $02
- dw String_103557
- dw String_1035ba
- dw String_1035bd
- dw String_103585
- db $04
- dw String_103545
- dw String_1035c1
- dw String_1035c1
- dw String_103545
-
-String_103545: db "@"
-String_103546: db "せんとう アニメ@"
-String_10354f: db "でんわばんごう@"
-String_103557: db "めいしこうかん@"
-String_10355f: db "でんわを かけるひとが きめられる@"
-String_103571: db "でんわばんごうの にゅうりょくのしかた@"
-String_103585: db "あたらしいめいしが あれば こうかん@"
-String_103598: db "とばして みる@"
-String_1035a0: db "じっくり みる@"
-String_1035a8: db "めいしからえらぶ@"
-String_1035b1: db "すうじで いれる@"
-String_1035ba: db "する@"
-String_1035bd: db "しない@"
-String_1035c1: db "けってい@"
-; 1035c6
-
-Function1035c6: ; 1035c6
- callba Function10138b
- ld b, 0
- ld hl, Unknown_1035d7
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ret
-; 1035d7
-
-Unknown_1035d7: ; 1035d7
- dw Unknown_1035e7
- dw Unknown_1035f3
- dw Unknown_103608
- dw Unknown_103608
- dw Unknown_1035fe
- dw AskMobileOrCable
- dw AskMobileOrCable
- dw AskMobileOrCable
-
-Unknown_1035e7: ; 1035e7
- dwcoord 0, 6
- db $12, $07, $07
- dw .this
-.this
- db 4, 2, 1, 0, 3
-
-Unknown_1035f3: ; 1035f3
- dwcoord 0, 7
- db $12, $06, $09
- dw .this
-.this
- db 3, 2, 1, 3
-
-Unknown_1035fe: ; 1035fe
- dwcoord 0, 9
- db $12, $04, $0b
- dw .this
-.this
- db 2, 0, 3
-
-Unknown_103608: ; 103608
- dwcoord 0, 9
- db $12, $04, $0b
- dw .this
-.this
- db 2, 2, 3
-; 103612
-
-AskMobileOrCable: ; 103612
- ld hl, MenuDataHeader_103640
- call LoadMenuDataHeader
- ld a, [wMobileOrCable_LastSelection]
- and $0f
- jr z, .skip_load
- ld [wMenuCursorBuffer], a
-
-.skip_load
- call VerticalMenu
- call CloseWindow
- jr c, .pressed_b
- ld a, [wMenuCursorY]
- ld [ScriptVar], a
- ld c, a
- ld a, [wMobileOrCable_LastSelection]
- and $f0
- or c
- ld [wMobileOrCable_LastSelection], a
- ret
-
-.pressed_b
- xor a
- ld [ScriptVar], a
- ret
-; 103640
-
-MenuDataHeader_103640: ; 103640
- db $40 ; flags
- db 6, 13 ; start coords
- db 11, 19 ; end coords
- dw MenuData2_103648
- db 1 ; default option
-
-MenuData2_103648: ; 103648
- db $80 ; flags
- db 2
- db "モバイル@"
- db "ケーブル@"
-; 103654
-
-Function103654: ; 103654
- callba Mobile_AlwaysReturnNotCarry
- bit 7, c
- jr nz, .asm_103666
- ld hl, wcd2a
- res 5, [hl]
- ld c, $02
- ret
-
-.asm_103666
- ld hl, wcd2a
- set 5, [hl]
- ld c, $01
- ret
-; 10366e
-
-Mobile_SelectThreeMons: ; 10366e
- callba Mobile_AlwaysReturnNotCarry
- bit 7, c
- jr z, .asm_10369b
- ld hl, UnknownText_0x10375d
- call PrintText
- call YesNoBox
- jr c, .asm_103696
- callba CheckForMobileBattleRules
- jr nc, .asm_103690
- call JoyWaitAorB
- jr .asm_103696
-
-.asm_103690
- ld a, $01
- ld [ScriptVar], a
- ret
-
-.asm_103696
- xor a
- ld [ScriptVar], a
- ret
-
-.asm_10369b
- ld hl, wMobileOrCable_LastSelection
- bit 7, [hl]
- set 7, [hl]
- jr nz, .asm_1036b5
- ld hl, UnknownText_0x103762
- call PrintText
- call YesNoBox
- jr c, .asm_1036b5
- call Function1036f9
- call JoyWaitAorB
-
-.asm_1036b5
- call Function103700
- jr c, .asm_1036f4
- ld hl, MenuDataHeader_103747
- call LoadMenuDataHeader
- call VerticalMenu
- call ExitMenu
- jr c, .asm_1036f4
- ld a, [wMenuCursorY]
- cp $01
- jr z, .asm_1036d9
- cp $02
- jr z, .asm_1036f4
- cp $03
- jr z, .asm_1036ec
- jr .asm_1036b5
-
-.asm_1036d9
- callba CheckForMobileBattleRules
- jr nc, .asm_1036e6
- call JoyWaitAorB
- jr .asm_1036f4
-
-.asm_1036e6
- ld a, $01
- ld [ScriptVar], a
- ret
-
-.asm_1036ec
- call Function1036f9
- call JoyWaitAorB
- jr .asm_1036b5
-
-.asm_1036f4
- xor a
- ld [ScriptVar], a
- ret
-; 1036f9
-
-Function1036f9: ; 1036f9
- ld hl, UnknownText_0x103767
- call PrintText
- ret
-; 103700
-
-Function103700: ; 103700
- ld c, $0a
- ld hl, SwarmFlags
- bit 4, [hl]
- jr z, .asm_10370f
- callba Function1008a6
-
-.asm_10370f
- ld a, c
- ld [StringBuffer2], a
- ld a, [StringBuffer2]
- cp $05
- jr nc, .asm_103724
- cp $02
- jr nc, .asm_10372c
- cp $01
- jr nc, .asm_103734
- jr .asm_10373c
-
-.asm_103724
- ld hl, UnknownText_0x10376c
- call PrintText
- and a
- ret
-
-.asm_10372c
- ld hl, UnknownText_0x103771
- call PrintText
- and a
- ret
-
-.asm_103734
- ld hl, UnknownText_0x103776
- call PrintText
- and a
- ret
-
-.asm_10373c
- ld hl, UnknownText_0x10377b
- call PrintText
- call JoyWaitAorB
- scf
- ret
-; 103747
-
-MenuDataHeader_103747: ; 103747
- db $40 ; flags
- db 5, 13 ; start coords
- db 11, 19 ; end coords
- dw MenuData2_10374f
- db 1 ; default option
-
-MenuData2_10374f: ; 10374f
- db $c0 ; flags
- db 3
- db "はい@"
- db "やめる@"
- db "せつめい@"
-; 10375d
-
-UnknownText_0x10375d: ; 0x10375d
- text_jump UnknownText_0x1c422a
- db "@"
-; 0x103762
-UnknownText_0x103762: ; 0x103762
- text_jump UnknownText_0x1c4275
- db "@"
-; 0x103767
-UnknownText_0x103767: ; 0x103767
- text_jump UnknownText_0x1c4298
- db "@"
-; 0x10376c
-UnknownText_0x10376c: ; 0x10376c
- text_jump UnknownText_0x1c439c
- db "@"
-; 0x103771
-UnknownText_0x103771: ; 0x103771
- text_jump UnknownText_0x1c43dc
- db "@"
-; 0x103776
-UnknownText_0x103776: ; 0x103776
- text_jump UnknownText_0x1c4419
- db "@"
-; 0x10377b
-UnknownText_0x10377b: ; 0x10377b
- text_jump UnknownText_0x1c445a
- db "@"
-; 0x103780
-
-Function103780: ; 103780
- ld a, [wd265]
- push af
- call Function10378c
- pop af
- ld [wd265], a
- ret
-; 10378c
-
-Function10378c: ; 10378c
- ld c, 0
- ld hl, SwarmFlags
- bit 4, [hl]
- jr nz, .already_set
- ld c, $01
- ld hl, SwarmFlags
- set 4, [hl]
-
-.already_set
- push bc
- callba Link_SaveGame
- pop bc
- jr c, .failed_to_save
- ld a, $01
- ld [ScriptVar], a
- ld a, c
- and a
- ret z
- callba Function1006fd
- ret
-
-.failed_to_save
- xor a
- ld [ScriptVar], a
- ld a, c
- and a
- ret z
- ld hl, SwarmFlags
- res 4, [hl]
- ret
-; 1037c2
-
-Function1037c2: ; 1037c2
- call Function103823
- jr c, .nope
- ld a, [wdc5f]
- and a
- jr z, .nope
- ld hl, UnknownText_0x1037e6
- call PrintText
- call YesNoBox
- jr c, .nope
- ld a, $01
- ld [ScriptVar], a
- ret
-
-.nope
- xor a
- ld [wdc5f], a
- ld [ScriptVar], a
- ret
-; 1037e6
-
-UnknownText_0x1037e6: ; 0x1037e6
- text_jump UnknownText_0x1c449c
- db "@"
-; 0x1037eb
-
-Function1037eb: ; 1037eb
- call Function103823
- jr nc, .asm_103807
- ld hl, UnknownText_0x103819
- call PrintText
- call JoyWaitAorB
- ld hl, UnknownText_0x10381e
- call PrintText
- call JoyWaitAorB
- xor a
- ld [ScriptVar], a
- ret
-
-.asm_103807
- ld a, [wdc60]
- and a
- jr nz, .asm_103813
- ld a, $01
- ld [ScriptVar], a
- ret
-
-.asm_103813
- ld a, $02
- ld [ScriptVar], a
- ret
-; 103819
-
-UnknownText_0x103819: ; 0x103819
- text_jump UnknownText_0x1c44c0
- db "@"
-; 0x10381e
-
-UnknownText_0x10381e: ; 0x10381e
- text_jump UnknownText_0x1c44e7
- db "@"
-; 0x103823
-
-Function103823: ; 103823
- callba Mobile_AlwaysReturnNotCarry
- bit 7, c
- jr nz, .asm_103838
- callba Function1008a6
- ld a, c
- cp $01
- jr c, .asm_10383a
-
-.asm_103838
- xor a
- ret
-
-.asm_10383a
- scf
- ret
-; 10383c
-
-Function10383c: ; 10383c
- ld a, $01
- ld [wdc60], a
- xor a
- ld hl, wPlayerMonSelection
- ld [hli], a
- ld [hli], a
- ld [hl], a
- ld hl, UnknownText_0x103876
- call PrintText
- call JoyWaitAorB
- callba Script_reloadmappart
- callba Function4a94e
- jr c, .asm_103870
- ld hl, wd002
- ld de, wPlayerMonSelection
- ld bc, 3
- call CopyBytes
- xor a
- ld [ScriptVar], a
- ret
-
-.asm_103870
- ld a, $01
- ld [ScriptVar], a
- ret
-; 103876
-
-UnknownText_0x103876: ; 0x103876
- text_jump UnknownText_0x1c4508
- db "@"
-; 0x10387b
-
-Function10387b: ; 10387b
- callba Mobile_AlwaysReturnNotCarry
- bit 7, c
- ret nz
- callba Function1008a6
- ld a, c
- ld [StringBuffer2], a
- ld hl, UnknownText_0x103898
- call PrintText
- call JoyWaitAorB
- ret
-; 103898
-
-UnknownText_0x103898: ; 0x103898
- text_jump UnknownText_0x1c4525
- db "@"
-; 0x10389d
diff --git a/misc/mobile_41.asm b/misc/mobile_41.asm
deleted file mode 100755
index 37e10a01e..000000000
--- a/misc/mobile_41.asm
+++ /dev/null
@@ -1,1115 +0,0 @@
-SECTION "bank41_2", ROMX
-
-; These functions deal with miscellaneous statistics
-; which were used for Trainer Rankings in Pokémon News.
-
-; Copies certain values at the time the player enters the Hall of Fame.
-TrainerRankings_HallOfFame2:: mobile ; 0x105ef6
- ld a, BANK(sTrainerRankingGameTimeHOF)
- call GetSRAMBank
-
- ld hl, GameTimeHours
- ld de, sTrainerRankingGameTimeHOF
- ld bc, 4
- call CopyBytes
-
- ld hl, sTrainerRankingStepCount
- ld de, sTrainerRankingStepCountHOF
- ld bc, 4
- call CopyBytes
-
- ; sTrainerRankingHealings is only a 3-byte value.
- ; One extraneous byte is copied from sTrainerRankingMysteryGift.
- ld hl, sTrainerRankingHealings
- ld de, sTrainerRankingHealingsHOF
- ld bc, 4
- call CopyBytes
-
- ld hl, sTrainerRankingBattles
- ld de, sTrainerRankingBattlesHOF
- ld bc, 3
- call CopyBytes
-
- call UpdateTrainerRankingsChecksum
- call CloseSRAM
- ret
-; 105f33
-
-TrainerRankings_MagikarpLength: mobile ; 105f33
- ld a, BANK(sTrainerRankingLongestMagikarp)
- call GetSRAMBank
- ld de, Buffer1
- ld hl, sTrainerRankingLongestMagikarp
-
- ; Is this Magikarp the longest measured?
- ld a, [de]
- cp [hl]
- jr z, .isLowByteHigher
- jr nc, .newRecordLongest
- jr .checkShortest
-
-.isLowByteHigher
- inc hl
- inc de
- ld a, [de]
- cp [hl]
- dec hl
- dec de
- jr c, .checkShortest
-
-.newRecordLongest
- ld a, [de]
- inc de
- ld [hli], a
- ld a, [de]
- dec de
- ld [hl], a
-
-.checkShortest
- ; First, check if the record for shortest Magikarp is 0.
- ; This seems unnecessary, because the value is initialized to 100.0 cm.
- ld hl, sTrainerRankingShortestMagikarp
- ld a, [hli]
- or [hl]
- dec hl
- jr z, .newRecordShortest
-
- ; Now check if this Magikarp is the shortest
- ld a, [de]
- cp [hl]
- jr z, .isLowByteLower
- jr c, .newRecordShortest
- jr .done
-
-.isLowByteLower
- inc hl
- inc de
- ld a, [de]
- cp [hl]
- jr nc, .done
- dec hl
- dec de
-
-.newRecordShortest
- ld a, [de]
- inc de
- ld [hli], a
- ld a, [de]
- ld [hl], a
-
-.done
- call UpdateTrainerRankingsChecksum
- call CloseSRAM
- ret
-; 105f79
-
-TrainerRankings_BugContestScore: mobile ; 105f79
- ld a, BANK(sTrainerRankingBugContestScore)
- call GetSRAMBank
- ld a, [hProduct]
- ld hl, sTrainerRankingBugContestScore
- cp [hl]
- jr z, .isLowByteHigher
- jr nc, .newHighScore
- jr .done
-
-.isLowByteHigher
- inc hl
- ld a, [hMultiplicand]
- cp [hl]
- jr c, .done
- dec hl
-
-.newHighScore
- ld a, [hProduct]
- ld [hli], a
- ld a, [hMultiplicand]
- ld [hl], a
-
-.done
- call UpdateTrainerRankingsChecksum
- call CloseSRAM
- ret
-; 105f9f
-
-TrainerRankings_AddToSlotsWinStreak: mobile ; 105f9f
- ld a, BANK(sTrainerRankingCurrentSlotsStreak)
- call GetSRAMBank
-
- ; Increment the current streak
- ld hl, sTrainerRankingCurrentSlotsStreak + 1
- inc [hl]
- jr nz, .noCarry
- dec hl
- inc [hl]
- inc hl
-
-.noCarry
- dec hl
- ; Now check if this is a new record for longest streak
- ld a, [sTrainerRankingLongestSlotsStreak]
- cp [hl]
- jr z, .isLowByteHigher
- jr c, .newRecordStreak
- jr .done
-
-.isLowByteHigher
- inc hl
- ld a, [sTrainerRankingLongestSlotsStreak + 1]
- cp [hl]
- jr nc, .done
- dec hl
-
-.newRecordStreak
- ld a, [hli]
- ld [sTrainerRankingLongestSlotsStreak], a
- ld a, [hl]
- ld [sTrainerRankingLongestSlotsStreak + 1], a
-
-.done
- call UpdateTrainerRankingsChecksum
- call CloseSRAM
- ret
-; 105fd0
-
-TrainerRankings_EndSlotsWinStreak: mobile ; 105fd0
- ld a, BANK(sTrainerRankingCurrentSlotsStreak)
- call GetSRAMBank
- ld hl, sTrainerRankingCurrentSlotsStreak
- xor a
- ld [hli], a
- ld [hl], a
- call UpdateTrainerRankingsChecksum
- call CloseSRAM
- ret
-; 105fe3
-
-TrainerRankings_AddToSlotsPayouts: mobile ; 105fe3
- ld a, BANK(sTrainerRankingTotalSlotsPayouts)
- call GetSRAMBank
- ld hl, sTrainerRankingTotalSlotsPayouts + 3
- ld a, e
- add [hl]
- ld [hld], a
- ld a, d
- adc [hl]
- ld [hld], a
- jr nc, .done
- inc [hl]
- jr nz, .done
- dec hl
- inc [hl]
- jr nz, .done
- ld a, $ff
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ld [hl], a
-
-.done
- call UpdateTrainerRankingsChecksum
- call CloseSRAM
- ret
-; 106008
-
-TrainerRankings_AddToBattlePayouts: mobile ; 106008
- ld a, BANK(sTrainerRankingTotalBattlePayouts)
- call GetSRAMBank
- ld hl, sTrainerRankingTotalBattlePayouts + 3
- ld a, [bc]
- dec bc
- add [hl]
- ld [hld], a
- ld a, [bc]
- dec bc
- adc [hl]
- ld [hld], a
- ld a, [bc]
- adc [hl]
- ld [hld], a
- jr nc, .done
- inc [hl]
- jr nz, .done
- ld a, $ff
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ld [hl], a
-
-.done
- call UpdateTrainerRankingsChecksum
- call CloseSRAM
- ret
-; 10602e
-
-TrainerRankings_StepCount: mobile ; 10602e (41:602e)
- ld hl, sTrainerRankingStepCount
- jp TrainerRankings_Increment4Byte
-
-; Unreferenced in English version.
-TrainerRankings_BattleTowerWins: mobile ; 106035
- ld a, $5
- call GetSRAMBank
- ld a, [$aa8d]
- and a
- call CloseSRAM
- ret nz
- ld hl, sTrainerRankingBattleTowerWins
- jp TrainerRankings_Increment2Byte
-
-TrainerRankings_TMsHMsTaught: mobile ; 106049
- ld hl, sTrainerRankingTMsHMsTaught
- jp TrainerRankings_Increment3Byte
-
-TrainerRankings_Battles: mobile ; 106050
- ld a, [BattleType]
- cp BATTLETYPE_TUTORIAL ; Exclude the Dude’s tutorial battle
- ret z
- ld hl, sTrainerRankingBattles
- jp TrainerRankings_Increment3Byte
-
-TrainerRankings_WildBattles: mobile ; 10605d
- ld a, [BattleType]
- cp BATTLETYPE_TUTORIAL ; Exclude the Dude’s tutorial battle
- ret z
- ld hl, sTrainerRankingWildBattles
- jp TrainerRankings_Increment3Byte
-
-TrainerRankings_TrainerBattles: mobile ; 10606a
- ld hl, sTrainerRankingTrainerBattles
- jp TrainerRankings_Increment3Byte
-
-TrainerRankings_Unused1: mobile ; 106071
- ld hl, sTrainerRankingUnused1
- jp TrainerRankings_Increment3Byte
-
-TrainerRankings_HallOfFame:: mobile ; 0x106078
- ld hl, sTrainerRankingHOFEntries
- jp TrainerRankings_Increment3Byte
-
-TrainerRankings_WildMonsCaught: mobile ; 10607f (41:607f)
- ld hl, sTrainerRankingWildMonsCaught
- jp TrainerRankings_Increment3Byte
-
-TrainerRankings_HookedEncounters: mobile ; 106086
- ld hl, sTrainerRankingHookedEncounters
- jp TrainerRankings_Increment3Byte
-
-TrainerRankings_EggsHatched: mobile ; 10608d (41:608d)
- ld hl, sTrainerRankingEggsHatched
- jp TrainerRankings_Increment3Byte
-
-TrainerRankings_MonsEvolved: mobile ; 106094
- ld hl, sTrainerRankingMonsEvolved
- jp TrainerRankings_Increment3Byte
-
-TrainerRankings_FruitPicked: mobile ; 10609b
- ld hl, sTrainerRankingFruitPicked
- jp TrainerRankings_Increment3Byte
-
-TrainerRankings_Healings: mobile ; 1060a2
- ld hl, sTrainerRankingHealings
- jp TrainerRankings_Increment3Byte
-
-TrainerRankings_MysteryGift: mobile ; 1060a9 (41:60a9)
- ld hl, sTrainerRankingMysteryGift
- jr TrainerRankings_Increment3Byte
-
-TrainerRankings_Trades: mobile ; 1060af
- ld hl, sTrainerRankingTrades
- jr TrainerRankings_Increment3Byte
-
-TrainerRankings_Fly: mobile ; 1060b5
- ld hl, sTrainerRankingFly
- jr TrainerRankings_Increment3Byte
-
-TrainerRankings_Surf: mobile ; 1060bb
- ld hl, sTrainerRankingSurf
- jr TrainerRankings_Increment3Byte
-
-TrainerRankings_Waterfall: mobile ; 1060c1
- ld hl, sTrainerRankingWaterfall
- jr TrainerRankings_Increment3Byte
-
-TrainerRankings_WhiteOuts: mobile ; 1060c7
- ld hl, sTrainerRankingWhiteOuts
- jr TrainerRankings_Increment3Byte
-
-TrainerRankings_LuckyNumberShow: mobile ; 1060cd
- ld hl, sTrainerRankingLuckyNumberShow
- jr TrainerRankings_Increment2Byte
-
-TrainerRankings_PhoneCalls: mobile ; 1060d3
- ld hl, sTrainerRankingPhoneCalls
- jr TrainerRankings_Increment3Byte
-
-TrainerRankings_Unused2: mobile ; 1060df
- ld hl, sTrainerRankingUnused2
- jr TrainerRankings_Increment3Byte
-
-TrainerRankings_LinkBattles: mobile ; 1060df
- ld hl, sTrainerRankingLinkBattles
- jr TrainerRankings_Increment3Byte
-
-TrainerRankings_Splash: mobile ; 1060e5
- ; Only counts if it’s the player’s turn
- ld a, [hBattleTurn]
- and a
- ret nz
- ld hl, sTrainerRankingSplash
- jr TrainerRankings_Increment3Byte
-
-TrainerRankings_TreeEncounters: mobile ; 1060ef
- ld hl, sTrainerRankingTreeEncounters
- jr TrainerRankings_Increment3Byte
-
-TrainerRankings_Unused3: mobile ; 1060f5
- ld hl, sTrainerRankingUnused3
- jr TrainerRankings_Increment3Byte
-
-TrainerRankings_ColosseumWins: mobile ; win
- ld hl, sTrainerRankingColosseumWins
- jr TrainerRankings_Increment3Byte
-
-TrainerRankings_ColosseumLosses: mobile ; lose
- ld hl, sTrainerRankingColosseumLosses
- jr TrainerRankings_Increment3Byte
-; 106107
-
-TrainerRankings_ColosseumDraws: mobile ; draw
- ld hl, sTrainerRankingColosseumDraws
- jr TrainerRankings_Increment3Byte
-; 10610d
-
-; Counts uses of both Selfdestruct and Explosion.
-TrainerRankings_Selfdestruct: mobile ; 10610d
- ; Only counts if it’s the player’s turn
- ld a, [hBattleTurn]
- and a
- ret nz
- ld hl, sTrainerRankingSelfdestruct
- jr TrainerRankings_Increment3Byte
-; 106117
-
-TrainerRankings_Increment4Byte: ; 106117
- push bc
- ld bc, 3
- jr TrainerRankings_Increment
-; 10611d
-
-TrainerRankings_Increment3Byte: ; 10611d
- push bc
- ld bc, 2
- jr TrainerRankings_Increment
-; 106123
-
-TrainerRankings_Increment2Byte: ; 106123
- push bc
- ld bc, 1
- jr TrainerRankings_Increment
-; 106129
-
-; unused
-TrainerRankings_Increment1Byte: ; 106129
- push bc
- ld bc, 0
-
-; Increments a big-endian value of bc + 1 bytes at hl
-TrainerRankings_Increment: ; 10612d
- ld a, BANK(sTrainerRankings)
- call GetSRAMBank
- push hl
- push de
- ld e, c
- inc e
-.asm_106136
- ld a, [hli]
- inc a
- jr nz, .asm_10613d
- dec e
- jr nz, .asm_106136
-
-.asm_10613d
- pop de
- pop hl
- jr z, .asm_10614d
- add hl, bc
-.asm_106142
- inc [hl]
- jr nz, .asm_10614d
- ld a, c
- and a
- jr z, .asm_10614d
- dec hl
- dec c
- jr .asm_106142
-
-.asm_10614d
- call UpdateTrainerRankingsChecksum
- call CloseSRAM
- pop bc
- ret
-; 106155
-
-; Used when SRAM bank 5 isn’t already loaded — what’s the point of this?
-UpdateTrainerRankingsChecksum2: mobile ; 106155
- ld a, BANK(sTrainerRankings)
- call GetSRAMBank
- call UpdateTrainerRankingsChecksum
- call CloseSRAM
- ret
-; 106162
-
-UpdateTrainerRankingsChecksum: ; 106162
- push de
- call CalculateTrainerRankingsChecksum
- ld hl, sTrainerRankingsChecksum
- ld [hl], d
- inc hl
- ld [hl], e
- pop de
- ret
-; 10616e
-
-CalculateTrainerRankingsChecksum: ; 10616e
- push bc
- ld hl, sTrainerRankings
- ld bc, sTrainerRankingsChecksum - sTrainerRankings
- xor a
- ld de, 0
-.asm_106179
- ld a, e
- add [hl]
- ld e, a
- jr nc, .asm_10617f
- inc d
-
-.asm_10617f
- inc hl
- dec bc
- ld a, b
- or c
- jr nz, .asm_106179
- pop bc
- ret
-; 106187
-
-
-BackupMobileEventIndex: ; 106187
- ld a, BANK(sMobileEventIndex)
- call GetSRAMBank
- ld a, [sMobileEventIndex]
- push af
- ld a, BANK(sMobileEventIndexBackup)
- call GetSRAMBank
- pop af
- ld [sMobileEventIndexBackup], a
- call CloseSRAM
- ret
-; 10619d
-
-
-RestoreMobileEventIndex: ; 10619d (41:619d)
- ld a, BANK(sMobileEventIndexBackup)
- call GetSRAMBank
- ld a, [sMobileEventIndexBackup]
- push af
- ld a, BANK(sMobileEventIndex)
- call GetSRAMBank
- pop af
- ld [sMobileEventIndex], a
- call CloseSRAM
- ret
-; 1061b3 (41:61b3)
-
-; Unreferenced in English version.
-VerifyTrainerRankingsChecksum: ; 1061b3
- call CalculateTrainerRankingsChecksum
- ld hl, sTrainerRankingsChecksum
- ld a, d
- cp [hl]
- ret nz
- inc hl
- ld a, e
- cp [hl]
- ret
-; 1061c0
-
-DeleteMobileEventIndex: ; 1061c0 (41:61c0)
- ld a, BANK(sMobileEventIndex)
- call GetSRAMBank
- xor a
- ld [sMobileEventIndex], a
- call CloseSRAM
- ret
-; 1061cd (41:61cd)
-
-; Used in the Japanese version to initialize Trainer Rankings data
-; for a new save file. Unreferenced in the English version.
-InitializeTrainerRankings:
- ld hl, sTrainerRankings
- ld bc, sTrainerRankingsEnd - sTrainerRankings
- xor a
- call ByteFill
-
- ; Initialize the shortest Magikarp to 100.0 cm
- ld hl, sTrainerRankingShortestMagikarp
- ld a, $3
- ld [hli], a
- ld [hl], $e8
-
- call UpdateTrainerRankingsChecksum
- ld hl, sTrainerRankings
- ld de, sTrainerRankingsBackup
- ld bc, sTrainerRankingsEnd - sTrainerRankings
- call CopyBytes
- ret
-; 1061ef
-
-
-_MobilePrintNum:: ; 1061ef
-; Supports signed 31-bit integers (up to 10 digits)
-; b: Bits 0-4 = # bytes
-; Bit 7 = set if negative
-; c: Number of digits
-; de: highest byte of number to convert
-; hl: where to print the converted string
- push bc
- xor a
- ld [hPrintNum1], a
- ld [hPrintNum2], a
- ld [hPrintNum3], a
- ld a, b
- and $f
- cp $1
- jr z, .one_byte
- cp $2
- jr z, .two_bytes
- cp $3
- jr z, .three_bytes
-; four bytes
- ld a, [de]
- ld [hPrintNum1], a
- inc de
-
-.three_bytes
- ld a, [de]
- ld [hPrintNum2], a
- inc de
-
-.two_bytes
- ld a, [de]
- ld [hPrintNum3], a
- inc de
-
-.one_byte
- ld a, [de]
- ld [hPrintNum4], a
- inc de
-
- push de
- xor a
- ld [hPrintNum9], a
- ld a, b
- ld [hPrintNum10], a
- ld a, c
- cp 2
- jr z, .two_digits
- ld de, ._2
- cp 3
- jr z, .three_to_nine_digits
- ld de, ._3
- cp 4
- jr z, .three_to_nine_digits
- ld de, ._4
- cp 5
- jr z, .three_to_nine_digits
- ld de, ._5
- cp 6
- jr z, .three_to_nine_digits
- ld de, ._6
- cp 7
- jr z, .three_to_nine_digits
- ld de, ._7
- cp 8
- jr z, .three_to_nine_digits
- ld de, ._8
- cp 9
- jr z, .three_to_nine_digits
- ld de, ._9
-
-.three_to_nine_digits
- inc de
- inc de
- inc de
- dec a
- dec a
-
-.digit_loop
- push af
- call .Function1062b2
- call .Function1062ff
-rept 4
- inc de
-endr
- pop af
- dec a
- jr nz, .digit_loop
-
-.two_digits
- ld c, 0
- ld a, [hPrintNum4]
-.mod_ten_loop
- cp 10
- jr c, .simple_divide_done
- sub 10
- inc c
- jr .mod_ten_loop
-
-.simple_divide_done
- ld b, a
- ld a, [hPrintNum9]
- or c
- ld [hPrintNum9], a
- jr nz, .create_digit
- call .LoadMinusTenIfNegative
- jr .done
-
-.create_digit
- ld a, "0"
- add c
- ld [hl], a
-
-.done
- call .Function1062ff
- ld a, "0"
- add b
- ld [hli], a
- pop de
- pop bc
- ret
-; 106292
-
-._9 dd 1000000000
-._8 dd 100000000
-._7 dd 10000000
-._6 dd 1000000
-._5 dd 100000
-._4 dd 10000
-._3 dd 1000
-._2 dd 100
-; 1062b2
-
-.Function1062b2: ; 1062b2
- ld c, $0
-.asm_1062b4
- ld a, [de]
- dec de
- ld b, a
- ld a, [hPrintNum4]
- sub b
- ld [hPrintNum8], a
- ld a, [de]
- dec de
- ld b, a
- ld a, [hPrintNum3]
- sbc b
- ld [hPrintNum7], a
- ld a, [de]
- dec de
- ld b, a
- ld a, [hPrintNum2]
- sbc b
- ld [hPrintNum6], a
- ld a, [de]
- inc de
- inc de
- inc de
- ld b, a
- ld a, [hPrintNum1]
- sbc b
- ld [hPrintNum5], a
- jr c, .asm_1062eb
- ld a, [hPrintNum5]
- ld [hPrintNum1], a
- ld a, [hPrintNum6]
- ld [hPrintNum2], a
- ld a, [hPrintNum7]
- ld [hPrintNum3], a
- ld a, [hPrintNum8]
- ld [hPrintNum4], a
- inc c
- jr .asm_1062b4
-
-.asm_1062eb
- ld a, [hPrintNum9]
- or c
- jr z, .LoadMinusTenIfNegative
- ld a, -10
- add c
- ld [hl], a
- ld [hPrintNum9], a
- ret
-
-.LoadMinusTenIfNegative:
- ld a, [hPrintNum10]
- bit 7, a
- ret z
-
- ld [hl], -10
- ret
-; 1062ff
-
-.Function1062ff: ; 1062ff
- ld a, [hPrintNum10]
- bit 7, a
- jr nz, .asm_10630d
- bit 6, a
- jr z, .asm_10630d
- ld a, [hPrintNum9]
- and a
- ret z
-
-.asm_10630d
- inc hl
- ret
-; 10630f
-
-; functions related to the cable club and various NPC scripts referencing mobile communications
-
-Mobile_DummyReturnFalse: ; 10630f
- xor a
- ld [ScriptVar], a
- ret
-; 106314
-
-MobileFn_106314: mobile ; 106314
- ld a, $4
- call GetSRAMBank
- ld a, c
- cpl
- ld [$b000], a
- call CloseSRAM
- ld a, $7
- call GetSRAMBank
- ld a, c
- ld [$a800], a
- call CloseSRAM
- ret
-; 10632f
-
-Mobile_AlwaysReturnNotCarry: ; 10632f
- or a
- ret
-
-Function106331: ; 106331 - called by Mobile_DummyReturnFalse in Crystal-J
- ; check ~[4:b000] == [7:a800]
- ld a, $4
- call GetSRAMBank
- ld a, [$b000]
- cpl
- ld b, a
- call CloseSRAM
- ld a, $7
- call GetSRAMBank
- ld a, [$a800]
- ld c, a
- call CloseSRAM
- ld a, c
- cp b
- jr nz, .nope
-
- ; check [7:a800] != 0
- and a
- jr z, .nope
-
- ; check !([7:a800] & %01110000)
- and %10001111
- cp c
- jr nz, .nope
-
- ld c, a
- scf
- ret
-
-.nope
- xor a
- ld c, a
- ret
-; 10635c
-
-Function10635c: ; 10635c
- ld a, [wMobileCommsJumptableIndex]
- bit 7, a
- ret nz
- ld a, [wMobileCommsJumptableIndex]
- ld hl, .Jumptable
- rst JumpTable
- ret
-; 10636a
-
-.Jumptable: ; 10636a
- dw .init
- dw Function106392
- dw Function1063cc
- dw Function1063d8
- dw Function1063e5
- dw Function1063f3
- dw Function106403
- dw Function106442
- dw Function106453
-; 10637c
-
-.init: ; 10637c
- ld de, wcd30
- ld hl, $41
- ld bc, $41
- ld a, $40
- call Function3e32
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 106392
-
-Function106392: ; 106392
- xor a
- ld [wcf64], a
- ld a, [wc821]
- bit 1, a
- jr nz, .asm_1063a2
- bit 0, a
- jr z, .asm_1063bf
- ret
-
-.asm_1063a2
- call Mobile_AlwaysReturnNotCarry
- ld a, c
- and a
- jr nz, .asm_1063b4
- ld a, $b
- ld [wcf64], a
- ld a, $7
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_1063b4
- ld a, $7
- ld [wcf64], a
- ld a, $7
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_1063bf
- ld a, $1
- ld [wcf64], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 1063cc
-
-Function1063cc: ; 1063cc
- ld a, $78
- ld [wcd42], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
-
-Function1063d8: ; 1063d8
- ld hl, wcd42
- dec [hl]
- ret nz
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 1063e5
-
-Function1063e5: ; 1063e5
- ld a, [wcf64]
- cp $3
- ret nz
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 1063f3
-
-Function1063f3: ; 1063f3
- ld de, wcd31
- ld a, $32
- call Function3e32
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 106403
-
-Function106403: ; 106403
- ld a, [wc821]
- bit 1, a
- jr nz, .asm_106426
- bit 0, a
- jr z, .asm_10640f
- ret
-
-.asm_10640f
- ld a, [wcd31]
- and $80
- ld c, a
- ld a, [wcd30]
- or c
- inc a
- ld c, a
- call MobileFn_106314
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_106426
- call Mobile_AlwaysReturnNotCarry
- ld a, c
- and a
- jr z, .asm_106435
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-
-.asm_106435
- ld c, $0
- call MobileFn_106314
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
- ret
-; 106442
-
-Function106442: ; 106442
- ld a, $36
- call Function3e32
- xor a
- ld [hMobile], a
- ld [hMobileReceive], a
- ld a, [wMobileCommsJumptableIndex]
- inc a
- ld [wMobileCommsJumptableIndex], a
-
-Function106453: ; 106453
- ld a, [wMobileCommsJumptableIndex]
- set 7, a
- ld [wMobileCommsJumptableIndex], a
- nop
- ld a, $4
- ld [wcf64], a
- ret
-; 106462
-
-MobileFunc_106462: mobile
- ret
-; 106464
-
-Function106464:: ; 106464
- ld de, MobilePhoneTilesGFX
- ld hl, VTiles2 tile $60
- lb bc, BANK(MobilePhoneTilesGFX), 1
- call Get2bpp
- ld de, FontsExtra2_UpArrowGFX
- ld hl, VTiles2 tile $61
- lb bc, BANK(FontsExtra2_UpArrowGFX), 1
- call Get2bpp
- ld de, GFX_106514
- ld hl, VTiles2 tile $62
- ld c, 9
- ld b, BANK(GFX_106514)
- call Get2bpp
- ld de, $40b0
- ld hl, VTiles2 tile $6b
- ld b, $f ; XXX no graphics at 0f:40b0
- call Get2bpp
- callba LoadFrame
- ret
-; 10649b
-
-Function10649b: ; 10649b
- ld a, [TextBoxFrame]
- and $7
- ld bc, 3 tiles
- ld hl, Frames
- call AddNTimes
- ld d, h
- ld e, l
- ld hl, VTiles2 tile $79
- ld c, 6
- ld b, BANK(Frames)
- call Function1064c3
- ld hl, VTiles2 tile $7f
- ld de, TextBoxSpaceGFX
- ld c, 1
- ld b, BANK(TextBoxSpaceGFX)
- call Function1064c3
- ret
-; 1064c3
-
-Function1064c3: ; 1064c3
- ld a, [rSVBK]
- push af
- ld a, $6
- ld [rSVBK], a
- push bc
- push hl
- ld hl, Function3f88
- ld a, b
- rst FarCall
- pop hl
- pop bc
- pop af
- ld [rSVBK], a
- jr asm_1064ed
-
-Function1064d8: ; 1064d8
- ld a, [rSVBK]
- push af
- ld a, $6
- ld [rSVBK], a
- push bc
- push hl
- ld hl, Function3f9f
- ld a, b
- rst FarCall
- pop hl
- pop bc
- pop af
- ld [rSVBK], a
- jr asm_1064ed
-
-asm_1064ed
- ld de, wDecompressScratch
- ld b, $0
- ld a, [rSVBK]
- push af
- ld a, $6
- ld [rSVBK], a
- ld a, [rVBK]
- push af
- ld a, $1
- ld [rVBK], a
- call Get2bpp
- pop af
- ld [rVBK], a
- pop af
- ld [rSVBK], a
- ret
-; 10650a
-
-Function10650a: ; 10650a
- ld de, MobilePhoneTilesGFX + $20
- lb bc, BANK(MobilePhoneTilesGFX), $11
- call Get2bpp
- ret
-; 106514
-
-GFX_106514:
-INCBIN "gfx/unknown/106514.2bpp"
diff --git a/misc/mobile_42.asm b/misc/mobile_42.asm
deleted file mode 100644
index d08bc8882..000000000
--- a/misc/mobile_42.asm
+++ /dev/null
@@ -1,2009 +0,0 @@
-MobileTradeAnimation_SendGivemonToGTS: ; 108000
- ld a, $80
- ld [wcf65], a
- ld de, .TradeAnimScript
- jp RunMobileTradeAnim_NoFrontpics
-; 10800b
-
-.TradeAnimScript:
- mobiletradeanim_showgtsgivemon
- mobiletradeanim_12
- mobiletradeanim_10
- mobiletradeanim_sendmon
- mobiletradeanim_06
- mobiletradeanim_0f
- mobiletradeanim_end
-
-MobileTradeAnimation_RetrieveGivemonFromGTS:
- ld a, $80
- jr asm_108018
-
-MobileTradeAnimation_ReceiveGetmonFromGTS: ; 108016
- ld a, $0
-asm_108018:
- ld [wcf65], a
- ld de, .TradeAnimScript
- jp RunMobileTradeAnim_NoFrontpics
-; 108021
-
-.TradeAnimScript:
- mobiletradeanim_11
- mobiletradeanim_07
- mobiletradeanim_receivemon
- mobiletradeanim_showgtsgetmon
- mobiletradeanim_end
-
-Function108026: ; 108026
- ld a, $0
- jr asm_10802c
-
-Function10802a: ; 10802a
- ld a, $1
-
-asm_10802c:
- ld [wcf65], a
- ld de, .TradeAnimScript
- jp RunMobileTradeAnim_Frontpics
-; 108035
-
-.TradeAnimScript: ; trade
- mobiletradeanim_showgivemon
- mobiletradeanim_12
- mobiletradeanim_02
- mobiletradeanim_sendmon
- mobiletradeanim_05
- mobiletradeanim_receivemon
- mobiletradeanim_showgetmon
- mobiletradeanim_end
-
-Function10803d: ; 10803d
- ld a, $0
- ld [wcf65], a
- ld de, .TradeAnimScript
- jp RunMobileTradeAnim_NoFrontpics
-; 108048
-
-.TradeAnimScript:
- mobiletradeanim_11
- mobiletradeanim_07
- mobiletradeanim_receivemon
- mobiletradeanim_showoddegg
- mobiletradeanim_end
-
-Function10804d: ; 10804d
- ld a, $0
- ld [wcf65], a
- ld de, .TradeAnimScript
- jp RunMobileTradeAnim_NoFrontpics
-; 108058
-
-.TradeAnimScript:
- mobiletradeanim_11
- mobiletradeanim_showgtsgetmon
- mobiletradeanim_end
-
-RunMobileTradeAnim_Frontpics: ; 10805b
- ld hl, wTradeAnimPointer
- ld [hl], e
- inc hl
- ld [hl], d
- ld a, [hMapAnims]
- push af
- xor a
- ld [hMapAnims], a
- ld hl, VramState
- ld a, [hl]
- push af
- res 0, [hl]
- ld hl, Options
- ld a, [hl]
- push af
- set NO_TEXT_SCROLL, [hl]
- call Function1080b7
-.loop
- call MobileTradeAnim_JumptableLoop
- jr nc, .loop
- pop af
- ld [Options], a
- pop af
- ld [VramState], a
- pop af
- ld [hMapAnims], a
- ret
-; 108089
-
-RunMobileTradeAnim_NoFrontpics: ; 108089
- ld hl, wTradeAnimPointer
- ld [hl], e
- inc hl
- ld [hl], d
- ld a, [hMapAnims]
- push af
- xor a
- ld [hMapAnims], a
- ld hl, VramState
- ld a, [hl]
- push af
- res 0, [hl]
- ld hl, Options
- ld a, [hl]
- push af
- set NO_TEXT_SCROLL, [hl]
- call Function108157
-.loop
- call MobileTradeAnim_JumptableLoop
- jr nc, .loop
- pop af
- ld [Options], a
- pop af
- ld [VramState], a
- pop af
- ld [hMapAnims], a
- ret
-; 1080b7
-
-Function1080b7: ; 1080b7
- xor a
- ld [wJumptableIndex], a
- call ClearBGPalettes
- call ClearSprites
- call ClearTileMap
- call DisableLCD
- call MobileTradeAnim_ClearVTiles
- call MobileTradeAnim_ClearBGMap
- call LoadStandardFont
- call LoadFontsBattleExtra
-
- ld a, $1
- ld [rVBK], a
- ld hl, LZ_108da7
- ld de, VTiles2
- call Decompress
-
- ld a, $0
- ld [rVBK], a
- ld hl, LZ_108d27
- ld de, VTiles0 tile $20
- call Decompress
-
- call EnableLCD
-
- xor a
- ld [hSCX], a
- ld [hSCY], a
- ld a, $7
- ld [hWX], a
- ld a, $90
- ld [hWY], a
- callba ClearSpriteAnims
-
- call DelayFrame
-
- ld de, TradeBallGFX
- ld hl, VTiles0
- lb bc, BANK(TradeBallGFX), $06
- call Request2bpp
-
- ld de, TradePoofGFX
- ld hl, VTiles0 tile $06
- lb bc, BANK(TradePoofGFX), $0c
- call Request2bpp
-
- xor a
- ld hl, wSpriteAnimDict
- ld [hli], a
- ld [hl], $0
-
- ld a, [wPlayerTrademonSpecies]
- ld hl, wPlayerTrademonDVs
- ld de, VTiles0 tile $30
- call MobileTradeAnim_GetFrontpic
-
- ld a, [wOTTrademonSpecies]
- ld hl, wOTTrademonDVs
- ld de, VTiles2 tile $31
- call MobileTradeAnim_GetFrontpic
-
- ld a, [wPlayerTrademonSpecies]
- ld de, wPlayerTrademonSpeciesName
- call MobileTradeAnim_InitSpeciesName
-
- ld a, [wOTTrademonSpecies]
- ld de, wOTTrademonSpeciesName
- call MobileTradeAnim_InitSpeciesName
-
- xor a
- call Function108b98
- call Function108af4
- ret
-; 108157
-
-Function108157: ; 108157
- xor a
- ld [wJumptableIndex], a
- call ClearBGPalettes
- call ClearSprites
- call ClearTileMap
- call DisableLCD
- call MobileTradeAnim_ClearVTiles
- call MobileTradeAnim_ClearBGMap
- call LoadStandardFont
- call LoadFontsBattleExtra
- call EnableLCD
- xor a
- ld [hSCX], a
- ld [hSCY], a
- ld a, $7
- ld [hWX], a
- ld a, $90
- ld [hWY], a
- callba ClearSpriteAnims
- xor a
- ld hl, wSpriteAnimDict
- ld [hli], a
- ld [hl], $0
- call DelayFrame
- ld a, [wPlayerTrademonSpecies]
- ld de, wPlayerTrademonSpeciesName
- call MobileTradeAnim_InitSpeciesName
- ld a, [wOTTrademonSpecies]
- ld de, wOTTrademonSpeciesName
- call MobileTradeAnim_InitSpeciesName
- xor a
- call Function108b98
- call Function108af4
- ret
-; 1081ad
-
-MobileTradeAnim_ClearVTiles: ; 1081ad
- ld a, $1
- ld [rVBK], a
- ld hl, VTiles0
- ld bc, 3 * $80 tiles
- xor a
- call ByteFill
- ld a, $0
- ld [rVBK], a
- ld hl, VTiles0
- ld bc, 3 * $80 tiles
- xor a
- call ByteFill
- ret
-; 1081ca
-
-MobileTradeAnim_ClearBGMap: ; 1081ca
- ld a, $1
- ld [rVBK], a
- hlbgcoord 0, 0
- ld bc, 2 * BG_MAP_HEIGHT * BG_MAP_WIDTH
- ld a, $0
- call ByteFill
- ld a, $0
- ld [rVBK], a
- hlbgcoord 0, 0
- ld bc, 2 * BG_MAP_HEIGHT * BG_MAP_WIDTH
- ld a, $7f
- call ByteFill
- ret
-; 1081e9
-
-MobileTradeAnim_GetFrontpic: ; 1081e9
- push de
- push af
- predef GetUnownLetter
- pop af
- ld [CurPartySpecies], a
- ld [CurSpecies], a
- call GetBaseData
- pop de
- predef GetFrontpic
- ret
-; 108201
-
-Function108201: ; 108201
- push de
- push af
- predef GetUnownLetter
- pop af
- ld [CurPartySpecies], a
- ld [CurSpecies], a
- call GetBaseData
- pop de
- predef FrontpicPredef
- ret
-; 108219
-
-Function108219: ; 108219
- ld [CurPartySpecies], a
- hlcoord 7, 2
- ld d, $0
- ld e, ANIM_MON_TRADE
- predef AnimateFrontpic
- ret
-; 108229
-
-Function108229: ; 108229
- ld [CurPartySpecies], a
- hlcoord 7, 2
- ld d, $0
- ld e, ANIM_MON_TRADE
- predef LoadMonAnimation
- ret
-; 108239
-
-MobileTradeAnim_InitSpeciesName: ; 108239
- push de
- ld [wd265], a
- call GetPokemonName
- ld hl, StringBuffer1
- pop de
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
- ret
-; 10824b
-
-MobileTradeAnim_JumptableLoop: ; 10824b
- ld a, [wJumptableIndex]
- bit 7, a
- jr nz, .StopAnim
- call .ExecuteMobileTradeAnimCommand
- call DelayFrame
- and a
- ret
-
-.StopAnim:
- xor a
- ld [hSCX], a
- ld [hSCY], a
- ld a, $7
- ld [hWX], a
- ld a, $90
- ld [hWY], a
- call LoadStandardFont
- call LoadFontsBattleExtra
- callba MobileFunc_106462
- callba Function106464
- scf
- ret
-; 10827b
-
-.ExecuteMobileTradeAnimCommand: ; 10827b
- ld a, [wJumptableIndex]
- ld e, a
- ld d, 0
- ld hl, .Jumptable
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-; 10828a
-
-.Jumptable: ; 10828a
-
- dw GetMobileTradeAnimByte ; 00
- dw MobileTradeAnim_ShowPlayerMonToBeSent ; 01
- dw MobileTradeAnim_02 ; 02
- dw MobileTradeAnim_GiveTrademon1 ; 03
- dw MobileTradeAnim_GiveTrademon2 ; 04
- dw MobileTradeAnim_05 ; 05
- dw MobileTradeAnim_06 ; 06
- dw MobileTradeAnim_07 ; 07
- dw MobileTradeAnim_GetTrademon1 ; 08
- dw MobileTradeAnim_GetTrademon2 ; 09
- dw MobileTradeAnim_GetTrademon3 ; 0a
- dw MobileTradeAnim_ShowOTMonFromTrade ; 0b
- dw EndMobileTradeAnim ; 0c
- dw MobileTradeAnim_ShowPlayerMonForGTS ; 0d
- dw MobileTradeAnim_ShowOTMonFromGTS ; 0e
- dw MobileTradeAnim_0f ; 0f
- dw MobileTradeAnim_10 ; 10
- dw MobileTradeAnim_11 ; 11
- dw MobileTradeAnim_FadeToBlack ; 12
- dw MobileTradeAnim_GetOddEgg ; 13 get odd egg
-; 1082b2
-
-MobileTradeAnim_Next: ; 1082b2
- ld hl, wJumptableIndex
- inc [hl]
- ret
-; 1082b7
-
-GetMobileTradeAnimByte: ; 1082b7
- ld hl, wTradeAnimPointer
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld a, [de]
- ld [wJumptableIndex], a
- inc de
- ld [hl], d
- dec hl
- ld [hl], e
- ret
-; 1082c6
-
-EndMobileTradeAnim: ; 1082c6
- ld hl, wJumptableIndex
- set 7, [hl]
- ret
-; 1082cc
-
-WaitMobileTradeSpriteAnims: ; 1082cc
-.loop
- push bc
- callba PlaySpriteAnimations
- pop bc
- call DelayFrame
- dec c
- jr nz, .loop
- ret
-; 1082db
-
-Function1082db: ; 1082db
-.loop
- callba PlaySpriteAnimations
- callba SetUpPokeAnim
- callba HDMATransferTileMapToWRAMBank3
- jr nc, .loop
- ret
-; 1082f0
-
-Function1082f0: ; 1082f0
-.loop
- call Function108b78
- call DelayFrame
- dec c
- jr nz, .loop
- ret
-; 1082fa
-
-Function1082fa: ; 1082fa
-.loop
- call Function108b78
- push hl
- push bc
- callba PlaySpriteAnimations
- pop bc
- pop hl
- call DelayFrame
- dec c
- jr nz, .loop
- ret
-; 10830e
-
-MobileTradeAnim_ShowPlayerMonToBeSent: ; 10830e
- ld de, MUSIC_EVOLUTION
- call PlayMusic2
- ld a, $80
- ld [hSCX], a
- xor a
- ld [hSCY], a
- ld a, $87
- ld [hWX], a
- ld a, $50
- ld [hWY], a
- call MobileTradeAnim_DisplayMonToBeSent
- ld a, [wPlayerTrademonSpecies]
- ld [CurPartySpecies], a
- call Function10895e
- ld a, [wPlayerTrademonDVs]
- ld [TempMonDVs], a
- ld a, [wPlayerTrademonDVs + 1]
- ld [TempMonDVs + 1], a
- ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
- call GetSGBLayout
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbBGPals
- call WaitBGMap
-.loop
- ld a, [hWX]
- cp $7
- jr z, .okay
- sub $4
- ld [hWX], a
- ld a, [hSCX]
- sub $4
- ld [hSCX], a
- call DelayFrame
- jr .loop
-
-.okay
- ld a, $7
- ld [hWX], a
- xor a
- ld [hSCX], a
- ld a, [wPlayerTrademonSpecies]
- call GetCryIndex
- jr c, .skip_cry
- ld e, c
- ld d, b
- call PlayCryHeader
-
-.skip_cry
- ld c, 80
- call DelayFrames
- call Function108bec
- depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_20
- call _InitSpriteAnimStruct
- ld de, SFX_BALL_POOF
- call PlaySFX
- hlcoord 0, 0
- ld bc, 12 * SCREEN_WIDTH
- ld a, " "
- call ByteFill
- ld c, 80
- call WaitMobileTradeSpriteAnims
- call GetMobileTradeAnimByte
- ret
-; 10839b
-
-MobileTradeAnim_ShowOTMonFromTrade: ; 10839b
- call ClearBGPalettes
- call ClearSprites
- call ClearTileMap
- call DisableLCD
- call MobileTradeAnim_ClearBGMap
- ld a, [wOTTrademonSpecies]
- ld [CurPartySpecies], a
- ld hl, wOTTrademonDVs
- ld de, VTiles2
- call Function108201
- call EnableLCD
- callba DeinitializeAllSprites
- xor a
- ld [hSCX], a
- ld [hSCY], a
- ld a, $7
- ld [hWX], a
- ld a, $90
- ld [hWY], a
- depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_21
- call _InitSpriteAnimStruct
- call Function108b45
- ld a, $1
- call Function108b98
- call Function108af4
- ld c, 48
- call WaitMobileTradeSpriteAnims
- ld de, SFX_BALL_POOF
- call PlaySFX
- call MobileTradeAnim_DisplayReceivedMon
- xor a
- ld [hSCX], a
- ld [hSCY], a
- ld a, $7
- ld [hWX], a
- ld a, $50
- ld [hWY], a
- ld a, [wOTTrademonSpecies]
- ld [CurPartySpecies], a
- ld a, [wOTTrademonDVs]
- ld [TempMonDVs], a
- ld a, [wOTTrademonDVs + 1]
- ld [TempMonDVs + 1], a
- ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
- call GetSGBLayout
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbBGPals
- call Function108963
- ld a, [wOTTrademonSpecies]
- call Function108229
- call Function1082db
- call Function108c16
- call GetMobileTradeAnimByte
- ret
-; 10842c
-
-MobileTradeAnim_ShowPlayerMonForGTS: ; 10842c
- ld de, MUSIC_EVOLUTION
- call PlayMusic2
- ld a, $80
- ld [hSCX], a
- xor a
- ld [hSCY], a
- ld a, $87
- ld [hWX], a
- ld a, $50
- ld [hWY], a
- call MobileTradeAnim_DisplayMonToBeSent
- ld a, [wPlayerTrademonSpecies]
- ld [CurPartySpecies], a
- ld hl, wPlayerTrademonDVs
- call Function10898a
- call DelayFrame
- ld de, TradeBallGFX
- ld hl, VTiles0
- lb bc, BANK(TradeBallGFX), $06
- call Request2bpp
- ld de, TradePoofGFX
- ld hl, VTiles0 tile $06
- lb bc, BANK(TradePoofGFX), $0c
- call Request2bpp
- ld a, [wPlayerTrademonDVs]
- ld [TempMonDVs], a
- ld a, [wPlayerTrademonDVs + 1]
- ld [TempMonDVs + 1], a
- ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
- call GetSGBLayout
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbBGPals
- call WaitBGMap
-.loop
- ld a, [hWX]
- cp $7
- jr z, .done
- sub $4
- ld [hWX], a
- ld a, [hSCX]
- sub $4
- ld [hSCX], a
- call DelayFrame
- jr .loop
-
-.done
- ld a, $7
- ld [hWX], a
- xor a
- ld [hSCX], a
- ld a, [wPlayerTrademonSpecies]
- call GetCryIndex
- jr c, .skip_cry
- ld e, c
- ld d, b
- call PlayCryHeader
-
-.skip_cry
- ld c, 80
- call DelayFrames
- call Function108c2b
- depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_20
- call _InitSpriteAnimStruct
- ld de, SFX_BALL_POOF
- call PlaySFX
- hlcoord 0, 0
- ld bc, 12 * SCREEN_WIDTH
- ld a, " "
- call ByteFill
- ld c, 80
- call WaitMobileTradeSpriteAnims
- call GetMobileTradeAnimByte
- ret
-; 1084d7
-
-MobileTradeAnim_ShowOTMonFromGTS: ; 1084d7
- call ClearBGPalettes
- call ClearSprites
- call ClearTileMap
- call DisableLCD
- call MobileTradeAnim_ClearBGMap
- ld a, [wOTTrademonSpecies]
- ld [CurPartySpecies], a
- ld hl, wOTTrademonDVs
- ld de, VTiles2
- call Function108201
- call EnableLCD
- callba DeinitializeAllSprites
- call DelayFrame
- ld de, TradeBallGFX
- ld hl, VTiles0
- lb bc, BANK(TradeBallGFX), $06
- call Request2bpp
- ld de, TradePoofGFX
- ld hl, VTiles0 tile $06
- lb bc, BANK(TradePoofGFX), $0c
- call Request2bpp
- xor a
- ld [hSCX], a
- ld [hSCY], a
- ld a, $7
- ld [hWX], a
- ld a, $90
- ld [hWY], a
- depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_21
- call _InitSpriteAnimStruct
- call Function108b45
- ld a, $1
- call Function108b98
- call Function108af4
- ld c, 48
- call WaitMobileTradeSpriteAnims
- ld de, SFX_BALL_POOF
- call PlaySFX
- call MobileTradeAnim_DisplayReceivedMon
- xor a
- ld [hSCX], a
- ld [hSCY], a
- ld a, $7
- ld [hWX], a
- ld a, $50
- ld [hWY], a
- ld a, [wOTTrademonSpecies]
- ld [CurPartySpecies], a
- ld a, [wOTTrademonDVs]
- ld [TempMonDVs], a
- ld a, [wOTTrademonDVs + 1]
- ld [TempMonDVs + 1], a
- ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
- call GetSGBLayout
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbBGPals
- ld a, [wOTTrademonSpecies]
- ld hl, wOTTrademonDVs
- call Function10898a
- ld a, [wOTTrademonSpecies]
- call Function108229
- call Function1082db
- call Function108c40
- call GetMobileTradeAnimByte
- ret
-; 108589
-
-MobileTradeAnim_GetOddEgg: ; 108589
- call ClearBGPalettes
- call ClearSprites
- call ClearTileMap
- call DisableLCD
- call MobileTradeAnim_ClearBGMap
- ld a, [wOTTrademonSpecies]
- ld [CurPartySpecies], a
- ld hl, wOTTrademonDVs
- ld de, VTiles2
- call Function108201
- call EnableLCD
- callba DeinitializeAllSprites
- call DelayFrame
- ld de, TradeBallGFX
- ld hl, VTiles0
- lb bc, BANK(TradeBallGFX), $06
- call Request2bpp
- ld de, TradePoofGFX
- ld hl, VTiles0 tile $06
- lb bc, BANK(TradePoofGFX), $0c
- call Request2bpp
- xor a
- ld [hSCX], a
- ld [hSCY], a
- ld a, $7
- ld [hWX], a
- ld a, $90
- ld [hWY], a
- depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_21
- call _InitSpriteAnimStruct
- call Function108b45
- ld a, $1
- call Function108b98
- call Function108af4
- ld c, 48
- call WaitMobileTradeSpriteAnims
- ld de, SFX_BALL_POOF
- call PlaySFX
- call Function108a33
- xor a
- ld [hSCX], a
- ld [hSCY], a
- ld a, $7
- ld [hWX], a
- ld a, $50
- ld [hWY], a
- ld a, [wOTTrademonSpecies]
- ld [CurPartySpecies], a
- ld a, [wOTTrademonDVs]
- ld [TempMonDVs], a
- ld a, [wOTTrademonDVs + 1]
- ld [TempMonDVs + 1], a
- ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
- call GetSGBLayout
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbBGPals
- ld a, [wOTTrademonSpecies]
- ld hl, wOTTrademonDVs
- call Function10898a
- ld a, [wOTTrademonSpecies]
- call Function108229
- call Function1082db
- call GetMobileTradeAnimByte
- ret
-; 108638
-
-MobileTradeAnim_02: ; 108638
- callba DeinitializeAllSprites
- call ClearBGPalettes
- call ClearSprites
- call ClearTileMap
- xor a
- ld [hBGMapMode], a
- call DisableLCD
- call MobileTradeAnim_ClearBGMap
- call Function108c80
- call Function108c6d
- call EnableLCD
- ld a, $c
- ld [hSCX], a
- ld a, $78
- ld [hSCY], a
- ld a, $7
- ld [hWX], a
- ld a, $90
- ld [hWY], a
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, Palette_109107
- ld de, UnknBGPals
- ld bc, 8 palettes
- call CopyBytes
- pop af
- ld [rSVBK], a
- call Function108d07
- call Function108af4
- call GetMobileTradeAnimByte
- ret
-; 108689
-
-MobileTradeAnim_10: ; 108689
- callba DeinitializeAllSprites
- call ClearBGPalettes
- call ClearSprites
- call ClearTileMap
- xor a
- ld [hBGMapMode], a
- call DisableLCD
- call MobileTradeAnim_ClearBGMap
- ld a, $1
- ld [rVBK], a
- ld hl, LZ_108da7
- ld de, VTiles2
- call Decompress
- ld a, $0
- ld [rVBK], a
- ld hl, LZ_108d27
- ld de, VTiles0 tile $20
- call Decompress
- call Function108c80
- call Function108c6d
- call EnableLCD
- ld a, $c
- ld [hSCX], a
- ld a, $78
- ld [hSCY], a
- ld a, $7
- ld [hWX], a
- ld a, $90
- ld [hWY], a
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, Palette_109107
- ld de, UnknBGPals
- ld bc, 8 palettes
- call CopyBytes
- pop af
- ld [rSVBK], a
- call Function108d07
- call Function108af4
- call GetMobileTradeAnimByte
- ret
-; 1086f4
-
-MobileTradeAnim_11: ; 1086f4
- call ClearBGPalettes
- call ClearSprites
- call ClearTileMap
- xor a
- ld [hBGMapMode], a
- call DisableLCD
- ld a, $1
- ld [rVBK], a
- ld hl, LZ_108da7
- ld de, VTiles2
- call Decompress
- ld a, $0
- ld [rVBK], a
- ld hl, LZ_108d27
- ld de, VTiles0 tile $20
- call Decompress
- call Function108c80
- call Function108c6d
- call EnableLCD
- ld a, $80
- ld [hSCX], a
- ld a, $90
- ld [hSCY], a
- ld a, $7
- ld [hWX], a
- ld a, $90
- ld [hWY], a
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, Palette_109107
- ld de, UnknBGPals
- ld bc, 8 palettes
- call CopyBytes
- pop af
- ld [rSVBK], a
- call Function108d07
- call Function108af4
- call Function108b5a
- ld a, $e0
- ld [hSCX], a
- ld de, MUSIC_EVOLUTION
- call PlayMusic2
- call GetMobileTradeAnimByte
- ret
-; 108763
-
-MobileTradeAnim_GiveTrademon1: ; 108763
- ld de, SFX_GIVE_TRADEMON
- call PlaySFX
- ld c, 40
- ld hl, BGPals + 6 palettes
- call Function1082f0
- call Function108af4
-.loop
- ld a, [hSCX]
- cp $e0
- jr z, .loop2
- dec a
- dec a
- ld [hSCX], a
- cp $f8
- jr nz, .next
- depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_22
- call _InitSpriteAnimStruct
-
-.next
- ld c, 1
- call WaitMobileTradeSpriteAnims
- jr .loop
-
-.loop2
- ld a, [hSCY]
- cp $f8
- jr z, .done
- dec a
- dec a
- ld [hSCY], a
- cp $40
- jr z, .init
- cp $30
- jr z, .delete
- cp $68
- jr z, .replace
- jr .next2
-
-.init
- depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_22
- call _InitSpriteAnimStruct
- xor a
- call Function108ad4
- jr .next2
-
-.delete
- call MobileTradeAnim_DeleteSprites
- jr .next2
-
-.replace
- call MobileTradeAnim_DeleteSprites
- ld a, $1
- call Function108ad4
-.next2
- ld c, 1
- call WaitMobileTradeSpriteAnims
- jr .loop2
-
-.done
- call MobileTradeAnim_Next
- ret
-; 1087cf
-
-MobileTradeAnim_GiveTrademon2: ; 1087cf
- ld c, 40
- ld hl, BGPals + 1 palettes
- call Function1082f0
- call Function108af4
- call Function108b5a
- depixel 9, 10, 2, 0
- ld a, SPRITE_ANIM_INDEX_25
- call _InitSpriteAnimStruct
- ld de, SFX_FORESIGHT
- call PlaySFX
- ld c, 10
- call WaitMobileTradeSpriteAnims
- xor a
- ld [wcf64], a
- depixel 9, 10, 2, 0
- ld a, SPRITE_ANIM_INDEX_23
- call _InitSpriteAnimStruct
-.loop
- ld a, [hSCY]
- cp $90
- jr z, .done
- sub $8
- ld [hSCY], a
- ld c, 1
- call WaitMobileTradeSpriteAnims
- jr .loop
-
-.done
- call GetMobileTradeAnimByte
- ret
-; 108811
-
-MobileTradeAnim_05: ; 108811
- ld c, 40
- call WaitMobileTradeSpriteAnims
- ld a, $1
- ld [wcf64], a
- ld de, SFX_SHARPEN
- call PlaySFX
- ld c, 60
- call WaitMobileTradeSpriteAnims
- depixel 30, 10, 2, 0
- ld a, SPRITE_ANIM_INDEX_24
- call _InitSpriteAnimStruct
- call GetMobileTradeAnimByte
- ld de, SFX_THROW_BALL
- call PlaySFX
- ret
-; 108838
-
-MobileTradeAnim_06: ; 108838
- ld c, 40
- call WaitMobileTradeSpriteAnims
- ld a, $1
- ld [wcf64], a
- ld de, SFX_SHARPEN
- call PlaySFX
- call GetMobileTradeAnimByte
- ret
-; 10884c
-
-MobileTradeAnim_07: ; 10884c
- ld c, 80
- call DelayFrames
- depixel 30, 10, 2, 0
- ld a, SPRITE_ANIM_INDEX_24
- call _InitSpriteAnimStruct
- call GetMobileTradeAnimByte
- ld de, SFX_THROW_BALL
- call PlaySFX
- ret
-; 108863
-
-MobileTradeAnim_GetTrademon1: ; 108863
- ld c, 40
- call WaitMobileTradeSpriteAnims
-.loop
- ld a, [hSCY]
- cp $f8
- jr z, .done
- add $8
- ld [hSCY], a
- ld c, 1
- call WaitMobileTradeSpriteAnims
- jr .loop
-
-.done
- callba DeinitializeAllSprites
- depixel 9, 10, 2, 0
- ld a, SPRITE_ANIM_INDEX_25
- call _InitSpriteAnimStruct
- ld de, SFX_GLASS_TING_2
- call PlaySFX
- call Function108af4
- call MobileTradeAnim_Next
- ret
-; 108894
-
-MobileTradeAnim_GetTrademon2: ; 108894
- ld c, 20
- ld hl, BGPals + 1 palettes
- call Function1082fa
- ld de, SFX_GIVE_TRADEMON
- call PlaySFX
- ld c, 20
- ld hl, BGPals + 1 palettes
- call Function1082fa
- call Function108af4
-.asm_1088ad
- ld a, [hSCY]
- cp $78
- jr z, .asm_1088ee
- inc a
- inc a
- ld [hSCY], a
- cp $30
- jr z, .asm_1088c5
- cp $40
- jr z, .asm_1088dd
- cp $68
- jr z, .asm_1088cf
- jr .asm_1088e7
-
-.asm_1088c5
- depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_22
- call _InitSpriteAnimStruct
- jr .asm_1088e7
-
-.asm_1088cf
- depixel 10, 11, 4, 0
- ld a, SPRITE_ANIM_INDEX_22
- call _InitSpriteAnimStruct
- xor a
- call Function108ad4
- jr .asm_1088e7
-
-.asm_1088dd
- call MobileTradeAnim_DeleteSprites
- ld a, $1
- call Function108ad4
- jr .asm_1088e7
-
-.asm_1088e7
- ld c, 1
- call WaitMobileTradeSpriteAnims
- jr .asm_1088ad
-
-.asm_1088ee
- ld a, [hSCX]
- cp $c
- jr z, .asm_108906
- inc a
- inc a
- ld [hSCX], a
- cp -8
- jr nz, .asm_1088e7
- call MobileTradeAnim_DeleteSprites
- ld c, 1
- call WaitMobileTradeSpriteAnims
- jr .asm_1088ee
-
-.asm_108906
- call MobileTradeAnim_Next
- ret
-; 10890a
-
-MobileTradeAnim_GetTrademon3: ; 10890a
- ld c, 40
- ld hl, BGPals + 6 palettes
- call Function1082f0
- call Function108af4
- call GetMobileTradeAnimByte
- ret
-; 108919
-
-MobileTradeAnim_0f: ; 108919
- ld c, 40
- call WaitMobileTradeSpriteAnims
- callba DeinitializeAllSprites
- call ClearBGPalettes
- call ClearSprites
- call ClearTileMap
- call DisableLCD
- call MobileTradeAnim_ClearVTiles
- call MobileTradeAnim_ClearBGMap
- call EnableLCD
- call GetMobileTradeAnimByte
- ret
-; 10893d
-
-MobileTradeAnim_FadeToBlack: ; 10893d
-.loop
- ld a, [rBGP]
- and a
- jr z, .blank
- sla a
- sla a
- call DmgToCgbBGPals
- call DmgToCgbObjPal0
- ld c, 4
- call DelayFrames
- jr .loop
-
-.blank
- xor a
- call DmgToCgbBGPals
- call DmgToCgbObjPal0
- call GetMobileTradeAnimByte
- ret
-; 10895e
-
-Function10895e: ; 10895e
- ld de, VTiles0 tile $30
- jr asm_108966
-
-Function108963:
- ld de, VTiles2 tile $31
-asm_108966
- call DelayFrame
- ld hl, VTiles2
- lb bc, $a, $31 ; $a is the bank of ?????
- call Request2bpp
- call WaitTop
- call MobileTradeAnim_ClearTilemap
- hlcoord 7, 2
- xor a
- ld [hGraphicStartTile], a
- lb bc, 7, 7
- predef PlaceGraphic
- call WaitBGMap
- ret
-; 10898a
-
-Function10898a: ; 10898a
- ld de, VTiles2
- call MobileTradeAnim_GetFrontpic
- call WaitTop
- call MobileTradeAnim_ClearTilemap
- hlcoord 7, 2
- xor a
- ld [hGraphicStartTile], a
- lb bc, 7, 7
- predef PlaceGraphic
- call WaitBGMap
- ret
-; 1089a8
-
-MobileTradeAnim_DisplayMonToBeSent: ; 1089a8
- ld de, wPlayerTrademonSpecies
- ld a, [de]
- cp EGG
- jr z, MobileTradeAnim_DisplayEggData
- call MobileTradeAnim_LoadMonTemplate
- ld de, wPlayerTrademonSpecies
- call MobileTradeAnim_MonDisplay_PrintSpeciesNumber
- ld de, wPlayerTrademonSpeciesName
- call MobileTradeAnim_MonDisplay_PrintSpeciesName
- ld a, [wPlayerTrademonCaughtData]
- ld de, wPlayerTrademonOTName
- call MobileTradeAnim_MonDisplay_PrintOTNameAndGender
- ld de, wPlayerTrademonID
- call MobileTradeAnim_MonDisplay_PrintIDNumber
- call MobileTradeAnim_MonDisplay_UpdateBGMap
- ret
-
-MobileTradeAnim_DisplayReceivedMon:
- ld de, wOTTrademonSpecies
- ld a, [de]
- cp EGG
- jr z, MobileTradeAnim_DisplayEggData
- call MobileTradeAnim_LoadMonTemplate
- ld de, wOTTrademonSpecies
- call MobileTradeAnim_MonDisplay_PrintSpeciesNumber
- ld de, wOTTrademonSpeciesName
- call MobileTradeAnim_MonDisplay_PrintSpeciesName
- ld a, [wOTTrademonCaughtData]
- ld de, wOTTrademonOTName
- call MobileTradeAnim_MonDisplay_PrintOTNameAndGender
- ld de, wOTTrademonID
- call MobileTradeAnim_MonDisplay_PrintIDNumber
- call MobileTradeAnim_MonDisplay_UpdateBGMap
- ret
-
-MobileTradeAnim_DisplayEggData
- call WaitTop
- call MobileTradeAnim_ClearTilemap
- ld a, VBGMap1 / $100
- ld [hBGMapAddress + 1], a
- hlcoord 5, 0
- ld b, 6
- ld c, 9
- call TextBox
- hlcoord 6, 2
- ld de, .EggTemplate
- call PlaceString
- call MobileTradeAnim_MonDisplay_UpdateBGMap
- ret
-; 108a1d
-
-.EggTemplate: ; 108a1d
- db "タマゴ"
- next "おや/?????"
- next "<ID>№·?????"
- db "@"
-; 108a33
-
-Function108a33: ; 108a33
- call WaitTop
- call MobileTradeAnim_ClearTilemap
- ld a, VBGMap1 / $100
- ld [hBGMapAddress + 1], a
- hlcoord 5, 0
- ld b, 6
- ld c, 9
- call TextBox
- hlcoord 7, 4
- ld de, .OddEgg
- call PlaceString
- call MobileTradeAnim_MonDisplay_UpdateBGMap
- ret
-; 108a54
-
-.OddEgg: ; 108a54
- db "なぞのタマゴ@"
-; 108a5b
-
-MobileTradeAnim_LoadMonTemplate: ; 108a5b
- call WaitTop
- call MobileTradeAnim_ClearTilemap
- ld a, VBGMap1 / $100
- ld [hBGMapAddress + 1], a
- hlcoord 4, 0
- ld b, 6
- ld c, 10
- call TextBox
- hlcoord 5, 0
- ld de, .MonTemplate
- call PlaceString
- ret
-; 108a79
-
-.MonTemplate: ; 108a79
- db "─ №·"
- next ""
- next "おや/"
- next "<ID>№·"
- db "@"
-; 108a87
-
-MobileTradeAnim_MonDisplay_UpdateBGMap: ; 108a87
- call WaitBGMap
- call WaitTop
- ld a, VBGMap0 / $100
- ld [hBGMapAddress + 1], a
- ret
-; 108a92
-
-MobileTradeAnim_MonDisplay_PrintSpeciesNumber: ; 108a92
- hlcoord 9, 0
- lb bc, PRINTNUM_LEADINGZEROS | 1, 3
- call PrintNum
- ret
-; 108a9c
-
-MobileTradeAnim_MonDisplay_PrintSpeciesName: ; 108a9c
- hlcoord 5, 2
- call PlaceString
- ret
-; 108aa3
-
-MobileTradeAnim_MonDisplay_PrintOTNameAndGender: ; 108aa3
- cp $3
- jr c, .got_gender
- xor a
-.got_gender
- push af
- hlcoord 8, 4
- call PlaceString
- inc bc
- pop af
- ld hl, .GenderChars
- ld d, 0
- ld e, a
- add hl, de
- ld a, [hl]
- ld [bc], a
- ret
-; 108abb
-
-.GenderChars: ; 108abb
- db " "
- db "♂"
- db "♀"
-; 108abe
-
-MobileTradeAnim_MonDisplay_PrintIDNumber: ; 108abe
- hlcoord 8, 6
- lb bc, PRINTNUM_LEADINGZEROS | 2, 5
- call PrintNum
- ret
-; 108ac8
-
-MobileTradeAnim_ClearTilemap: ; 108ac8
- hlcoord 0, 0
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- ld a, " "
- call ByteFill
- ret
-; 108ad4
-
-Function108ad4: ; 108ad4
- and a
- jr z, .asm_108adc
- ld de, GFX_1092c7
- jr .asm_108adf
-
-.asm_108adc
- ld de, GFX_1091c7
-.asm_108adf
- ld a, $1
- ld [rVBK], a
- ld hl, VTiles2 tile $4a
- lb bc, BANK(GFX_1092c7), 16
- call Get2bpp_2
- call DelayFrame
- ld a, $0
- ld [rVBK], a
- ret
-; 108af4
-
-Function108af4: ; 108af4
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld a, [wcf65]
- and $1
- jr z, .copy_palette_109147
- ld hl, Palette_109187
- ld de, UnknOBPals
- ld bc, 8 palettes
- call CopyBytes
- ld hl, Palette_109187
- ld de, OBPals
- ld bc, 8 palettes
- call CopyBytes
- jr .done_copy
-
-.copy_palette_109147
- ld hl, Palette_109147
- ld de, UnknOBPals
- ld bc, 8 palettes
- call CopyBytes
- ld hl, Palette_109147
- ld de, OBPals
- ld bc, 8 palettes
- call CopyBytes
-
-.done_copy
- pop af
- ld [rSVBK], a
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbObjPal0
- ld a, %11100100 ; 3,2,1,0
- call DmgToCgbBGPals
- call DelayFrame
- ret
-; 108b45
-
-Function108b45: ; 108b45
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld de, (31 << 10) + (31 << 5) + 31 ; $7fff
- ld hl, UnknBGPals
- ld a, e
- ld [hli], a
- ld d, a
- ld [hli], a
- pop af
- ld [rSVBK], a
- ret
-; 108b5a
-
-Function108b5a: ; 108b5a
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld de, (15 << 10) + (31 << 5) + 18 ; $3ff2
- ld hl, BGPals + 4 palettes
- ld c, $10
-.loop
- ld a, e
- ld [hli], a
- ld a, d
- ld [hli], a
- dec c
- jr nz, .loop
- pop af
- ld [rSVBK], a
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 108b78
-
-Function108b78: ; 108b78
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld a, c
- and $2
- jr z, .Orange
- ld de, (31 << 10) + (31 << 5) + 31 ; $7fff
- jr .load_pal
-
-.Orange:
- ld de, ( 1 << 10) + (15 << 5) + 31 ; $05ff
-.load_pal
- ld a, e
- ld [hli], a
- ld a, d
- ld [hld], a
- pop af
- ld [rSVBK], a
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 108b98
-
-Palette_108b98:
-; removed
-
-Function108b98: ; 108b98
- ld d, a
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld a, [wcf65]
- and $1
- xor d
- jr z, .asm_108bad
- ld hl, Palette_108b98 + 1 palettes
- jr .asm_108bb0
-
-.asm_108bad
- ld hl, Palette_108b98
-.asm_108bb0
- ld de, UnknBGPals + 7 palettes
- ld bc, 8 palettes
- call CopyBytes
- pop af
- ld [rSVBK], a
- ret
-; 108bbd
-
-MobileTradeAnim_DeleteSprites: ; 108bbd
- callba DeinitializeAllSprites
- call ClearSprites
- ret
-; 108bc7
-
-Function108bc7: ; 108bc7 (42:4bc7)
- ld a, [wcf64]
- and a
- ret z
- ld hl, SPRITEANIMSTRUCT_YCOORD
- add hl, bc
- ld a, [hl]
- cp -1 * 8 - 6
- jr z, .delete
- sub 1 * 8
- ld [hl], a
- ret
-
-.delete
- callba DeinitializeSprite
- ret
-
-Function108be0: ; 108be0 (42:4be0)
- ld hl, SPRITEANIMSTRUCT_YCOORD
- add hl, bc
- ld a, [hl]
- cp 9 * 8 + 2
- ret z
- add 1 * 8
- ld [hl], a
- ret
-; 108bec (42:4bec)
-
-Function108bec: ; 108bec
- ld a, $90
- ld [hWY], a
- ld hl, .PlayerWillTradeMon
- call PrintText
- ld c, 80
- call DelayFrames
- ld hl, .ForPartnersMon
- call PrintText
- ld c, 80
- call DelayFrames
- ret
-; 108c07
-
-.PlayerWillTradeMon: ; 0x108c07
- text_jump UnknownText_0x1bc787
- db "@"
-; 0x108c0c
-
-.ForPartnersMon: ; 0x108c0c
- text_jump UnknownText_0x1bc79d
- db "@"
-; 0x108c11
-
-.UnusedTextPlayersMonTrade: ; 0x108c11
- text_jump UnknownText_0x1bc7b0
- db "@"
-; 0x108c16
-
-Function108c16: ; 108c16
- ld a, $90
- ld [hWY], a
- ld hl, .TakeGoodCareOfMon
- call PrintText
- ld c, 80
- call DelayFrames
- ret
-; 108c26
-
-.TakeGoodCareOfMon: ; 0x108c26
- text_jump UnknownText_0x1bc7c3
- db "@"
-; 0x108c2b
-
-Function108c2b: ; 108c2b
- ld a, $90
- ld [hWY], a
- ld hl, .PlayersMonTrade
- call PrintText
- ld c, 80
- call DelayFrames
- ret
-; 108c3b
-
-.PlayersMonTrade: ; 0x108c3b
- text_jump UnknownText_0x1bc7dd
- db "@"
-; 0x108c40
-
-Function108c40: ; 108c40
- ld a, $90
- ld [hWY], a
- ld a, [wcf65]
- and %10000000
- jr z, .Getmon
- ld hl, .CameBack
- call PrintText
- ld c, 80
- call DelayFrames
- ret
-
-.Getmon:
- ld hl, .TakeGoodCareOf
- call PrintText
- ld c, 80
- call DelayFrames
- ret
-; 108c63
-
-.TakeGoodCareOf: ; 0x108c63
- text_jump UnknownText_0x1bc7f0
- db "@"
-; 0x108c68
-
-.CameBack: ; 0x108c68
- text_jump UnknownText_0x1bc80a
- db "@"
-; 0x108c6d
-
-Function108c6d: ; 108c6d
- ld hl, LZ_108fe7
- debgcoord 0, 0
- call Decompress
- ld hl, LZ_108fe7
- debgcoord 0, 0, VBGMap1
- call Decompress
- ret
-; 108c80
-
-Function108c80: ; 108c80
- ld a, $1
- ld [rVBK], a
- ld hl, LZ_1090a7
- debgcoord 0, 0
- call Decompress
- ld hl, LZ_1090a7
- debgcoord 0, 0, VBGMap1
- call Decompress
- ld a, $0
- ld [rVBK], a
- ret
-; 108c9b
-
-DebugMobileTrade: ; 108c9b
-; localization error: NAME_LENGTH (11) should be 6 here
-
- ld hl, .DebugTradeData
- ld a, [hli]
- ld [wPlayerTrademonSpecies], a
-
- ld de, wPlayerTrademonSenderName
- ld c, NAME_LENGTH
-.your_name_loop
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .your_name_loop
-
- ld de, wPlayerTrademonID
- ld c, 2
-.your_id_loop
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .your_id_loop
-
- ld de, wPlayerTrademonOTName
- ld c, NAME_LENGTH
-.your_ot_loop
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .your_ot_loop
-
- ld a, [hli]
- ld [wOTTrademonSpecies], a
-
- ld de, wOTTrademonSenderName
- ld c, NAME_LENGTH
-.their_name_loop
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .their_name_loop
-
- ld de, wOTTrademonID
- ld c, 2
-.their_id_loop
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .their_id_loop
-
- ld de, wOTTrademonOTName
- ld c, NAME_LENGTH
-.their_ot_loop
- ld a, [hli]
- ld [de], a
- inc de
- dec c
- jr nz, .their_ot_loop
-
- ret
-; 108ce9
-
-.DebugTradeData:
- db VENUSAUR
- db "ゲーフり@@"
- dw $0123
- db "かびーん@@"
- db CHARIZARD
- db "クりーチャ@"
- dw $0456
- db "マツミヤ@@"
-; 108d07
-
-Function108d07: ; 108d07
- ld a, [wc74e]
- and $7f
- cp $8
- jr c, .asm_108d12
- ld a, $7
-
-.asm_108d12
- ld bc, 1 palettes
- ld hl, Palette_1093c7
- call AddNTimes
- ld a, $5
- ld de, UnknBGPals + 4 palettes
- ld bc, 1 palettes
- call FarCopyWRAM
- ret
-; 108d27
-
-LZ_108d27:
-INCBIN "gfx/unknown/108d27.2bpp.lz"
-
-LZ_108da7:
-INCBIN "gfx/unknown/108da7.2bpp.lz"
-
-LZ_108fe7:
-INCBIN "gfx/unknown/108fe7.tilemap.lz"
-
-LZ_1090a7:
-INCBIN "gfx/unknown/1090a7.tilemap.lz"
-
-Palette_1090f7:
-; unreferenced
- RGB 31, 31, 31
- RGB 0, 0, 0
-
- RGB 31, 0, 25
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 0, 0, 0
-
- RGB 9, 19, 31
- RGB 0, 0, 0
-
-Palette_109107:
- RGB 18, 31, 15
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 15, 1
- RGB 14, 14, 31
- RGB 12, 9, 31
- RGB 0, 0, 0
-
- RGB 18, 31, 15
- RGB 14, 14, 31
- RGB 12, 9, 31
- RGB 0, 0, 0
-
- RGB 18, 31, 15
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 18, 31, 15
- RGB 31, 7, 9
- RGB 18, 0, 1
- RGB 0, 0, 0
-
- RGB 18, 31, 15
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 15, 1
- RGB 18, 0, 30
- RGB 9, 0, 17
- RGB 0, 0, 0
-
- RGB 18, 31, 15
- RGB 18, 0, 30
- RGB 9, 0, 17
- RGB 0, 0, 0
-
-Palette_109147:
- RGB 31, 31, 31
- RGB 31, 31, 12
- RGB 31, 13, 12
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 31, 23, 15
- RGB 31, 18, 7
- RGB 31, 15, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 31, 0, 25
- RGB 31, 0, 25
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 9, 19, 31
- RGB 9, 19, 31
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
-Palette_109187:
- RGB 31, 31, 31
- RGB 31, 31, 12
- RGB 31, 13, 12
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 31, 23, 15
- RGB 31, 18, 7
- RGB 31, 15, 0
-
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 11, 11, 11
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 9, 19, 31
- RGB 9, 19, 31
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 31, 0, 25
- RGB 31, 0, 25
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 31, 31, 31
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
-GFX_1091c7:
-INCBIN "gfx/unknown/1091c7.2bpp"
-GFX_1092c7:
-INCBIN "gfx/unknown/1092c7.2bpp"
-
-Palette_1093c7:
- RGB 18, 31, 15
- RGB 4, 13, 31
- RGB 0, 0, 31
- RGB 0, 0, 0
-
- RGB 18, 31, 15
- RGB 31, 31, 0
- RGB 31, 15, 0
- RGB 0, 0, 0
-
- RGB 18, 31, 15
- RGB 9, 24, 0
- RGB 2, 16, 0
- RGB 0, 0, 0
-
- RGB 18, 31, 15
- RGB 31, 7, 9
- RGB 18, 0, 1
- RGB 0, 0, 0
-
- RGB 18, 31, 15
- RGB 28, 5, 31
- RGB 17, 0, 17
- RGB 0, 0, 0
-
- RGB 18, 31, 15
- RGB 9, 9, 9
- RGB 4, 4, 4
- RGB 0, 0, 0
-
- RGB 18, 31, 15
- RGB 31, 13, 21
- RGB 27, 7, 12
- RGB 0, 0, 0
-
- RGB 18, 31, 15
- RGB 21, 20, 20
- RGB 14, 14, 31
- RGB 0, 0, 0
diff --git a/misc/mobile_45.asm b/misc/mobile_45.asm
deleted file mode 100644
index d6743acc2..000000000
--- a/misc/mobile_45.asm
+++ /dev/null
@@ -1,7690 +0,0 @@
-
-SECTION "bank45", ROMX
-
- charmap " ", $20 ; revert to ascii
-
-String_114000:
- db "---", 0
-String_114004:
- db "CGB-AAAA-00", 0, 0
-
-Unknown_114011: ; 114011
- dw String_114033
- dw String_11403a
- dw String_114043
- dw String_11404e
- dw String_114053
- dw String_114058
- dw String_114062
- dw String_114074
- dw String_11408d
- dw String_11409f
- dw String_1140b8
- dw String_1140e6
- dw String_114110
- dw String_11413f
- dw String_114160
- dw String_114160
- dw String_114163
-
-String_114033: ; 114033
- db "From: ", 0
-String_11403a: ; 11403a
- db "Sender: ", 0
-String_114043: ; 114043
- db "Reply-To: ", 0
-String_11404e: ; 11404e
- db "To: ", 0
-String_114053: ; 114053
- db "Cc: ", 0
-String_114058: ; 114058
- db "Subject: ", 0
-String_114062: ; 114062
- db "MIME-Version: 1.0", 0
-String_114074: ; 114074
- db "X-Game-title: XXXXXXXXXX", 0
-String_11408d: ; 11408d
- db "X-Game-code: CGB-", 0
-String_11409f: ; 11409f
- db "X-GBmail-type: exclusive", 0
-String_1140b8: ; 1140b8
- db "Content-Type: text/plain; charset=iso-2022-jp", 0
-String_1140e6: ; 1140e6
- db "Content-Type: multipart/mixed; boundary=\"", 0
-String_114110: ; 114110
- db "Content-Type: Application/Octet-Stream; name=\"", 0
-String_11413f: ; 11413f
- db "Content-Transfer-Encoding:Base64", 0
-String_114160: ; 114160
- db "--", 0
-String_114163: ; 114163
- db ".", 0
-; 114165
-
-Jumptable_114165: ; 114165
- dw Function114268
- dw Function114269
- dw Function11433c
- dw Function1143b7
- dw Function1144d1
- dw Function114b55
- dw Function114bbc
- dw Function114cd9
- dw Function114e62
- dw Function1152b8
- dw Function1154d4
- dw Function1156cc
- dw Function1159fb
-; 11417f
-
-Unknown_11417f: ; 11417f
- dw .From
- dw .Sender
- dw .ReplyTo
- dw .To
- dw .CC
- dw .Subject
- dw .Date
- dw .ContentType
- dw .MimeVersion
- dw .XMailer
- dw .XGameTitle
- dw .XGameCode
- dw .XGBMailType
-
-.From: ; 114199
- db "FROM:", 0
-.Sender: ; 11419f
- db "SENDER:", 0
-.ReplyTo: ; 1141a7
- db "REPLY-TO:", 0
-.To: ; 1141b1
- db "TO:", 0
-.CC: ; 1141b5
- db "CC:", 0
-.Subject: ; 1141b9
- db "SUBJECT:", 0
-.Date: ; 1141c2
- db "DATE:", 0
-.ContentType: ; 1141c8
- db "CONTENT-TYPE:", 0
-.MimeVersion: ; 1141d6
- db "MIME-VERSION:", 0
-.XMailer: ; 1141e4
- db "X-MAILER:", 0
-.XGameTitle: ; 1141ee
- db "X-GAME-TITLE:", 0
-.XGameCode: ; 1141fc
- db "X-GAME-CODE:", 0
-.XGBMailType: ; 114209
- db "X-GBMAIL-TYPE:", 0
-; 114218
-
-String_114218: ; 114218
- db "NAME=", 0
-String_11421e: ; 11421e
- db "MULTIPART", 0
-String_114228: ; 114228
- db "BOUNDARY=", 0
-String_114232: ; 114232
- db "=?ISO-2022-JP?B?", 0
-; 114243
-
-Function114243:: ; 114243
- ld a, SRAM_ENABLE
- ld [MBC3SRamEnable], a
- ld a, [hFF8C]
- push af ; if [$dc02] == 0, this is popped to pc.
- push de
- ld a, [$dc02]
- add a
- ld e, a
- ld d, 0
- ld hl, Jumptable_114165
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- pop de
- jp hl
-
-; 11425c
-
-Function11425c: ; 11425c
- ld [$dc02], a
- pop af
- ld [hFF8C], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ret
-
-; 114268
-
-Function114268: mobile
-
-; 114269
-
-Function114269: ; 114269
- ld h, d
- ld l, e
- xor a
- ld [$dc02], a
- ld [$dc03], a
- ld a, [hli]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- inc hl
- ld c, [hl]
- inc hl
- ld b, [hl]
-.asm_114282
- ld a, [de]
- and a
- jr z, .asm_1142a4
- ld h, a
- ld a, [$dc03]
- and a
- jr nz, .asm_114292
- ld a, h
- cp $80
- jr nc, .asm_1142ae
-
-.asm_114292
- ld a, h
- cp $d
- jr z, .asm_1142bb
- xor a
- ld [$dc02], a
-.asm_11429b
- inc e
- call z, Function114333
- dec bc
- ld a, b
- or c
- jr nz, .asm_114282
-
-.asm_1142a4
- ld a, [$dc03]
- and a
- jr nz, .asm_114303
- ld b, $80
- jr .asm_1142b0
-
-.asm_1142ae
- ld b, $81
-
-.asm_1142b0
- ld a, [$dc00]
- ld c, a
- ld a, $1
- ld h, d
- ld l, e
- jp Function11425c
-
-.asm_1142bb
- and a
- jr z, .asm_1142a4
- inc e
- call z, Function114333
- dec bc
- ld a, b
- or c
- jr z, .asm_1142a4
- ld a, [de]
- ld h, a
- ld a, [$dc03]
- and a
- jr nz, .asm_1142d4
- ld a, h
- cp $80
- jr nc, .asm_1142ae
-
-.asm_1142d4
- ld a, h
- cp $a
- jr nz, .asm_1142ae
- ld a, [$dc03]
- and a
- jr nz, .asm_11430d
- ld a, [$dc02]
- and a
- jr nz, .asm_114309
- ld a, $1
- ld [$dc02], a
- inc e
- call z, Function114333
- dec bc
- ld a, b
- or c
- jr z, .asm_1142a4
- ld a, [de]
- cp $20
- jr z, .asm_11429b
- cp $9
- jr z, .asm_11429b
- jr .asm_114282
-
-.asm_1142fe
- xor a
- ld b, a
- jp Function11425c
-
-.asm_114303
- xor a
- ld b, $1
- jp Function11425c
-
-.asm_114309
- xor a
- ld [$dc02], a
-
-.asm_11430d
- ld a, [$dc02]
- and a
- jr nz, .asm_1142fe
- ld a, $1
- ld [$dc03], a
- inc e
- call z, Function114333
- dec bc
- ld a, b
- or c
- jr z, .asm_1142a4
- ld a, [de]
- and a
- jp z, .asm_1142a4
- cp $2e
- jp nz, .asm_114282
- ld a, $1
- ld [$dc02], a
- jp .asm_11429b
-
-; 114333
-
-Function114333: ; 114333
- push bc
- ld bc, $dc00
- call Function115d80
- pop bc
- ret
-
-; 11433c
-
-Function11433c: ; 11433c
- push de
- ld h, d
- ld l, e
- ld c, [hl]
- inc hl
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld b, $b
- call Function1143f3
- cp $2
- jr z, .asm_114358
- and a
- jr z, .asm_114360
- pop hl
-.asm_114351
- xor a
- ld b, $3
- jp Function11425c
-
-.asm_114357
- pop hl
-
-.asm_114358
- pop hl
- ld a, $1
- ld b, $82
- jp Function11425c
-
-.asm_114360
- ld a, h
- ld [$dc03], a
- pop hl
- push bc
- push de
- ld c, [hl]
- inc hl
- ld e, [hl]
- inc hl
- ld d, [hl]
- inc hl
- ld b, $c
- call Function1143f3
- cp $2
- jr z, .asm_114357
- and a
- jr z, .asm_114381
- xor a
- ld b, $2
- pop hl
- pop hl
- jp Function11425c
-
-.asm_114381
- pop de
- pop bc
- ld a, [$dc03]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- call Function114c0b
- ld hl, String_114004
-.asm_114394
- ld de, $dc24
-.asm_114397
- ld a, [hli]
- and a
- jr z, .asm_1143ad
- ld b, a
- ld a, [de]
- inc de
- cp b
- jr z, .asm_114397
-.asm_1143a1
- ld a, [hli]
- and a
- jr nz, .asm_1143a1
- ld a, [hl]
- and a
- jr nz, .asm_114394
- ld b, a
- jp Function11425c
-
-.asm_1143ad
- ld a, [de]
- and a
- jr nz, .asm_114351
- xor a
- ld b, $1
- jp Function11425c
-
-; 1143b7
-
-Function1143b7: ; 1143b7
- ld a, [de]
- ld b, a
- inc de
- ld a, [de]
- ld c, a
- inc de
- ld a, [de]
- ld h, a
- inc de
- ld a, [de]
- inc de
- push de
- ld d, a
- ld e, h
- call Function1143f3
- cp $2
- jr z, .asm_1143eb
- and a
- jr nz, .asm_1143ed
- ld a, h
- pop hl
- push af
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld a, [hli]
- ld h, [hl]
- ld l, a
- pop af
- ld [hli], a
- ld a, e
- ld [hli], a
- ld a, d
- ld [hli], a
- ld a, c
- ld [hli], a
- ld [hl], b
- xor a
- jp Function11425c
-
-.asm_1143eb
- ld b, $82
-
-.asm_1143ed
- ld a, $1
- pop hl
- jp Function11425c
-
-; 1143f3
-
-Function1143f3: ; 1143f3
- call Function114412
- and a
- jr nz, .asm_11440d
- ld a, $4
- cp b
- jr c, .asm_114407
- jr z, .asm_114402
-.asm_114400
- xor a
- ret
-
-.asm_114402
- ld a, $0
- cp c
- jr nc, .asm_114400
-
-.asm_114407
- lb bc, $4, $0
- ld a, $2
- ret
-
-.asm_11440d
- ld a, $1
- ld b, $84
- ret
-
-; 114412
-
-Function114412: ; 114412
- ld a, c
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld hl, Unknown_11417f
- ld a, b
- add a
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld c, $0
- jr .asm_11444a
-
-.asm_11442b
- ld a, [de]
- and a
- jp z, .asm_1144c2
- inc e
- call z, Function1144c8
- cp $d ; CR
- jr nz, .asm_11442b
- ld a, [de]
- inc e
- call z, Function1144c8
- cp $a ; NL
- jr nz, .asm_11442b
- ld a, [de]
- cp $2e ; .
- jr z, .asm_1144ae
- cp $d ; CR
- jr z, .asm_1144b8
-
-.asm_11444a
- ld a, [$dc00]
- ld [$dc02], a
- ld a, [de]
- and a
- jr z, .asm_1144c2
- inc e
- call z, Function1144c8
- cp $61 ; "a"
- jr c, .asm_114462
- cp $7b ; "z" + 1
- jr nc, .asm_114462
- sub $20
-
-.asm_114462
- ld b, a
- ld a, [hl]
- and a
- jr z, .asm_114476
- cp b
- jr nz, .asm_11446e
- inc c
- inc hl
- jr .asm_11444a
-
-.asm_11446e
- ld a, c
- and a
- jr z, .asm_11442b
- dec c
- dec hl
- jr .asm_11446e
-
-.asm_114476
- ld a, $20 ; " "
- cp b
- jr z, .asm_114481
- ld a, $a ; NL
- cp b
- jr z, .asm_114481
- dec de
-
-.asm_114481
- ld h, d
- ld l, e
- ld bc, NULL
-.asm_114486
- ld a, [de]
- and a
- jr z, .asm_1144c2
- inc bc
- inc e
- call z, Function1144c8
- cp $d ; CR
- jr nz, .asm_114486
- ld a, [de]
- inc bc
- inc e
- call z, Function1144c8
- cp $a ; NL
- jr nz, .asm_114486
- ld a, [de]
- cp $20 ; " "
- jr z, .asm_114486
- cp $9 ; TAB
- jr z, .asm_114486
- ld d, h
- ld e, l
- ld a, [$dc02]
- ld h, a
- xor a
- ret
-
-.asm_1144ae
- inc e
- call z, Function1144c8
- ld a, [de]
- cp $d ; CR
- jp nz, .asm_11442b
-
-.asm_1144b8
- inc e
- call z, Function1144c8
- ld a, [de]
- cp $a ; NL
- jp nz, .asm_11442b
-
-.asm_1144c2
- ld a, $0
- ld [hl], a
- ld a, $1
- ret
-
-; 1144c8
-
-Function1144c8: ; 1144c8
- push bc
- ld bc, $dc00
- call Function115d80
- pop bc
- ret
-
-; 1144d1
-
-Function1144d1: ; 1144d1
- call Function114561
- dec de
- dec de
- push de
- inc de
- inc de
- inc de
- inc hl
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc hl
- ld a, [de]
- ld [hld], a
- dec de
- ld a, [de]
- ld [hl], a
- xor a
- ld [BigDoll], a
- ld [$dc17], a
- ld a, $2
- ld [$dc0e], a
- ld hl, $dc03
- ld c, [hl]
- inc hl
- ld e, [hl]
- inc hl
- ld d, [hl]
- call Function114576
- cp $2
- jr z, .asm_11455b
- and a
- jr z, .asm_114511
- ld a, $1
- ld [$dc0d], a
- call Function1146fa
- and a
- jr nz, .asm_11455b
- jr .asm_11451c
-
-.asm_114511
- call Function1146a4
- and a
- jr nz, .asm_11455b
- ld a, $2
- ld [$dc0d], a
-
-.asm_11451c
- pop hl
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld a, [$dc0d]
- ld [de], a
- ld b, $0
- ld a, [BigDoll]
- and a
- jr z, .asm_114537
- ld b, $1
-
-.asm_114537
- ld hl, $dc06
- ld a, [hl]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld hl, $dc09
- ld e, [hl]
- inc hl
- ld d, [hl]
- dec de
- ld a, d
- or e
- jr z, .asm_114559
- ld hl, wCurrMapTriggerCount
- ld e, [hl]
- inc hl
- ld d, [hl]
- xor a
- ld [de], a
- jp Function11425c
-
-.asm_114559
- ld b, $83
-
-.asm_11455b
- pop hl
- ld a, $1
- jp Function11425c
-
-; 114561
-
-Function114561: ; 114561
- ld hl, $dc03
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hl], a
- ret
-
-; 114576
-
-Function114576: ; 114576
- xor a
- ld [Bed], a
- ld b, $7
- call Function1143f3
- cp $2
- jr z, .asm_1145b6
- and a
- jr nz, .asm_1145b4
- ld a, h
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- push hl
- push de
- push bc
- ld hl, $dc24
- call Function115d53
- call Function1145c5
- pop bc
- pop de
- pop hl
- and a
- jr z, .asm_1145bf
- ld a, b
- and a
- jr nz, .asm_1145ba
- ld a, h
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld hl, String_114218
- call Function114acf
-
-.asm_1145b4
- xor a
- ret
-
-.asm_1145b6
- ld b, $82
- jr .asm_1145bc
-
-.asm_1145ba
- ld b, $81
-
-.asm_1145bc
- ld a, $2
- ret
-
-.asm_1145bf
- ld a, $1
- ld [Bed], a
- ret
-
-; 1145c5
-
-Function1145c5: ; 1145c5
- ld hl, $dc24
- ld de, String_11421e
- ld c, $0
-.asm_1145cd
- ld a, [hli]
- and a
- jr z, .asm_1145ef
- cp $20
- jr z, .asm_1145cd
- cp $d
- jr z, .asm_1145f8
- cp $61
- jr c, .asm_1145e3
- cp $7b
- jr nc, .asm_1145e3
- sub $20
-
-.asm_1145e3
- ld b, a
- ld a, [de]
- and a
- jr z, .asm_11460e
- inc de
- cp b
- jr z, .asm_1145cd
- dec de
- jr .asm_1145cd
-
-.asm_1145ef
- ld b, $0
- jr .asm_1145f5
-
-.asm_1145f3
- ld b, $81
-
-.asm_1145f5
- ld a, $1
- ret
-
-.asm_1145f8
- ld a, [hli]
- and a
- jr z, .asm_1145f3
- cp $a
- jr nz, .asm_1145f3
- ld a, [hli]
- and a
- jr z, .asm_1145f3
- cp $20
- jr z, .asm_1145cd
- cp $9
- jr z, .asm_1145cd
- jr .asm_1145f3
-
-.asm_11460e
- ld a, c
- and a
- jr nz, .asm_114619
- ld c, $1
- ld de, String_114228
- jr .asm_1145cd
-
-.asm_114619
- dec hl
- ld a, [hl]
- cp $22
- jr nz, .asm_114620
- inc hl
-
-.asm_114620
- ld de, $ddc8
- ld b, $0
- ld c, $40
-.asm_114627
- ld a, [hli]
- cp $22
- jr z, .asm_114636
- cp $d
- jr z, .asm_114636
- ld [de], a
- inc de
- inc b
- dec c
- jr nz, .asm_114627
-
-.asm_114636
- ld a, b
- ld [PartyMon5Defense], a
- xor a
- ret
-
-; 11463c
-
-Function11463c: ; 11463c
- ld a, [$dc00]
- push af
- push de
- ld hl, $ddc8
- ld a, [PartyMon5Defense]
- ld b, a
-.asm_114648
- ld a, [de]
- ld c, a
- ld a, [hli]
- cp c
- jr nz, .asm_11468a
- inc e
- call z, Function11469b
- dec b
- jr nz, .asm_114648
- ld a, [de]
- cp $2d
- jr z, .asm_114673
- cp $d
- jr nz, .asm_11468a
- xor a
- ld [Carpet], a
-.asm_114662
- inc e
- call z, Function11469b
- ld a, [de]
- cp $a
- jr nz, .asm_11468a
- inc e
- call z, Function11469b
- xor a
- pop hl
- pop hl
- ret
-
-.asm_114673
- inc e
- call z, Function11469b
- ld a, [de]
- cp $2d
- jr nz, .asm_11468a
- inc e
- call z, Function11469b
- ld a, $1
- ld [Carpet], a
- ld a, [de]
- cp $d
- jr z, .asm_114662
-
-.asm_11468a
- pop de
- pop af
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- xor a
- ld [Carpet], a
- ld a, $1
- ret
-
-; 11469b
-
-Function11469b: ; 11469b
- push bc
- ld bc, $dc00
- call Function115d80
- pop bc
- ret
-
-; 1146a4
-
-Function1146a4: ; 1146a4
- call Function114867
- and a
- jr nz, .asm_1146e4
- ld hl, $dc03
- ld a, [hli]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- call Function114a18
- and a
- jr nz, .asm_1146e8
- call Function1148c2
- and a
- jr nz, .asm_1146e4
- ld hl, $dc03
- ld a, [hli]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- call Function114a7a
- and a
- jr nz, .asm_1146e8
-.asm_1146da
- dec bc
- dec bc
- call Function1149cc
- and a
- jr nz, .asm_1146e4
- xor a
- ret
-
-.asm_1146e4
- ld b, $83
- jr .asm_1146f7
-
-.asm_1146e8
- ld a, [$dc17]
- and a
- jr z, .asm_1146f5
- ld a, $1
- ld [BigDoll], a
- jr .asm_1146da
-
-.asm_1146f5
- ld b, $81
-
-.asm_1146f7
- ld a, $1
- ret
-
-; 1146fa
-
-Function1146fa: ; 1146fa
- call Function114867
- and a
- jp nz, .asm_11478a
- ld hl, $dc03
- ld a, [hli]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- call Function114a18
- and a
- jp nz, .asm_11478e
- call Function1149cc
- and a
- jp nz, .asm_11478a
- ld a, $1
- ld [$dc0e], a
- ld a, [$dc00]
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld a, $1
- ld [RightOrnament], a
- call Function1147cd
- and a
- jp nz, .asm_1147b7
-.asm_114737
- call Function114843
- cp $1
- jr nz, .asm_114749
- ld a, [$dc17]
- and a
- jr z, .asm_114794
- ld a, $1
- ld [BigDoll], a
-
-.asm_114749
- call Function11494d
- and a
- jr nz, .asm_11478a
- ld a, [BigDoll]
- and a
- jr nz, .asm_114786
- ld hl, $dc03
- ld a, [hli]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- call Function1147cd
- and a
- jr nz, .asm_1147b7
- ld a, [$dc0e]
- cp $3
- jr nz, .asm_114773
- dec bc
- dec bc
-
-.asm_114773
- call Function1149cc
- and a
- jr nz, .asm_11478a
- ld a, [$dc0d]
- inc a
- ld [$dc0d], a
- ld a, [BigDoll]
- and a
- jr z, .asm_114799
-
-.asm_114786
- ld b, $1
- jr .asm_1147cb
-
-.asm_11478a
- ld b, $83
- jr .asm_114796
-
-.asm_11478e
- ld a, [$dc17]
- and a
- jr nz, .asm_114796
-
-.asm_114794
- ld b, $81
-
-.asm_114796
- ld a, $1
- ret
-
-.asm_114799
- ld a, [Carpet]
- and a
- jr z, .asm_114737
- jr .asm_1147cb
-
- ld hl, $dc03
- ld a, [hli]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- call Function114a7a
- and a
- jr z, .asm_1147cb
- xor a
- ld [BigDoll], a
-
-.asm_1147b7
- ld a, [$dc17]
- and a
- jr z, .asm_114794
- ld a, $1
- ld [BigDoll], a
- ld a, [$dc0d]
- cp $1
- jr nz, .asm_114773
- ld b, $1
-
-.asm_1147cb
- xor a
- ret
-
-; 1147cd
-
-Function1147cd: ; 1147cd
- ld bc, NULL
- ld a, [RightOrnament]
- and a
- jr nz, .asm_11480c
-.asm_1147d6
- ld a, [de]
- and a
- jr z, .asm_11482f
- inc e
- call z, Function11483a
- inc bc
- cp $d
- jr nz, .asm_1147d6
- ld a, [de]
- cp $a
- jr nz, .asm_11482f
-.asm_1147e8
- inc bc
- inc e
- call z, Function11483a
- ld a, [de]
- cp $20
- jr z, .asm_114827
- cp $9
- jr z, .asm_114827
- cp $d
- jr nz, .asm_11482b
- inc e
- call z, Function11483a
- ld a, [de]
- cp $a
- jr nz, .asm_11482f
- inc e
- call z, Function11483a
- ld a, h
- and a
- jr z, .asm_11480c
- dec bc
-
-.asm_11480c
- ld a, [de]
- cp $2d
- jr nz, .asm_1147d6
- inc e
- call z, Function11483a
- ld a, [de]
- cp $2d
- jr nz, .asm_1147d6
- inc e
- call z, Function11483a
- push bc
- call Function11463c
- pop bc
- and a
- jr nz, .asm_1147d6
- ret
-
-.asm_114827
- ld h, $1
- jr .asm_1147e8
-
-.asm_11482b
- ld h, $0
- jr .asm_11480c
-
-.asm_11482f
- and a
- jr nz, .asm_114837
- ld a, $1
- ld [$dc17], a
-
-.asm_114837
- ld a, $1
- ret
-
-; 11483a
-
-Function11483a: ; 11483a
- push bc
- ld bc, $dc00
- call Function115d80
- pop bc
- ret
-
-; 114843
-
-Function114843: ; 114843
- ld a, [$dc00]
- push af
- push de
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- call Function114a18
- and a
- jr nz, .asm_11485f
- pop de
- pop af
- ld [$dc00], a
- ld hl, String_114218
- call Function114acf
- ret
-
-.asm_11485f
- pop de
- pop af
- ld [$dc00], a
- ld a, $1
- ret
-
-; 114867
-
-Function114867: ; 114867
- ld hl, $dc06
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld a, $2
- ld [de], a
- inc e
- call z, Function1148b9
- ld a, $1
- ld [de], a
- inc e
- call z, Function1148b9
- ld hl, $dc03
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function1148b9
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function1148b9
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function1148b9
- ld hl, $dc06
- ld a, [wCurrentMapSignpostCount]
- ld [hli], a
- ld [hl], e
- inc hl
- ld [hl], d
- inc hl
- ld c, [hl]
- inc hl
- ld b, [hl]
- ld d, $5
-.asm_1148a9
- dec bc
- ld a, b
- or c
- jr z, .asm_1148b6
- dec d
- jr nz, .asm_1148a9
- ld [hl], b
- dec hl
- ld [hl], c
- xor a
- ret
-
-.asm_1148b6
- ld a, $1
- ret
-
-; 1148b9
-
-Function1148b9: ; 1148b9
- push bc
- ld bc, wCurrentMapSignpostCount
- call Function115d80
- pop bc
- ret
-
-; 1148c2
-
-Function1148c2: ; 1148c2
- ld hl, $dc06
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld a, c
- ld [de], a
- inc e
- call z, Function114944
- ld a, b
- ld [de], a
- inc e
- call z, Function114944
- ld a, [$dc0e]
- ld [de], a
- inc e
- call z, Function114944
- cp $3
- jr nz, .asm_114904
- ld hl, Plant
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function114944
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function114944
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function114944
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function114944
-
-.asm_114904
- ld hl, $dc03
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function114944
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function114944
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function114944
- ld hl, $dc06
- ld a, [wCurrentMapSignpostCount]
- ld [hli], a
- ld [hl], e
- inc hl
- ld [hl], d
- inc hl
- ld c, [hl]
- inc hl
- ld b, [hl]
- ld a, [$dc0e]
- cp $3
- jr z, .asm_114932
- ld d, $6
- jr .asm_114934
-
-.asm_114932
- ld d, $a
-
-.asm_114934
- dec bc
- ld a, b
- or c
- jr z, .asm_114941
- dec d
- jr nz, .asm_114934
- ld [hl], b
- dec hl
- ld [hl], c
- xor a
- ret
-
-.asm_114941
- ld a, $1
- ret
-
-; 114944
-
-Function114944: ; 114944
- push bc
- ld bc, wCurrentMapSignpostCount
- call Function115d80
- pop bc
- ret
-
-; 11494d
-
-Function11494d: ; 11494d
- ld hl, $dc06
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld a, [$dc0e]
- ld [de], a
- inc e
- call z, Function1149c3
- cp $3
- jr nz, .asm_114983
- ld hl, Plant
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function1149c3
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function1149c3
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function1149c3
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function1149c3
-
-.asm_114983
- ld hl, $dc03
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function1149c3
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function1149c3
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function1149c3
- ld hl, $dc06
- ld a, [wCurrentMapSignpostCount]
- ld [hli], a
- ld [hl], e
- inc hl
- ld [hl], d
- inc hl
- ld c, [hl]
- inc hl
- ld b, [hl]
- ld a, [$dc0e]
- cp $3
- jr z, .asm_1149b1
- ld d, $4
- jr .asm_1149b3
-
-.asm_1149b1
- ld d, $8
-
-.asm_1149b3
- dec bc
- ld a, b
- or c
- jr z, .asm_1149c0
- dec d
- jr nz, .asm_1149b3
- ld [hl], b
- dec hl
- ld [hl], c
- xor a
- ret
-
-.asm_1149c0
- ld a, $1
- ret
-
-; 1149c3
-
-Function1149c3: ; 1149c3
- push bc
- ld bc, wCurrentMapSignpostCount
- call Function115d80
- pop bc
- ret
-
-; 1149cc
-
-Function1149cc: ; 1149cc
- ld hl, $dc06
- ld a, [hl]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- push de
- ld hl, $dc09
- ld e, [hl]
- inc hl
- ld d, [hl]
- dec de
- ld a, d
- or e
- jr z, .asm_114a0b
- dec de
- ld a, d
- or e
- jr z, .asm_114a0b
- ld [hl], d
- dec hl
- ld [hl], e
- ld hl, wCurrMapTriggerCount
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld a, c
- ld [de], a
- inc e
- call z, Function114a0f
- ld a, b
- ld [de], a
- inc e
- call z, Function114a0f
- ld hl, $dc06
- ld a, [wCurrentMapSignpostCount]
- ld [hli], a
- ld [hl], e
- inc hl
- ld [hl], d
- pop de
- xor a
- ret
-
-.asm_114a0b
- pop de
- ld a, $1
- ret
-
-; 114a0f
-
-Function114a0f: ; 114a0f
- push bc
- ld bc, wCurrentMapSignpostCount
- call Function115d80
- pop bc
- ret
-
-; 114a18
-
-Function114a18: ; 114a18
- ld bc, NULL
- ld h, b
-.asm_114a1c
- inc bc
- ld a, [de]
- and a
- jr z, .asm_114a66
- inc e
- call z, Function114a71
- cp $d
- jr nz, .asm_114a1c
- ld a, [de]
- cp $a
- jr nz, .asm_114a66
-.asm_114a2e
- inc bc
- inc e
- call z, Function114a71
- ld a, [de]
- cp $20
- jr z, .asm_114a5e
- cp $9
- jr z, .asm_114a5e
- cp $d
- jr nz, .asm_114a62
- inc e
- call z, Function114a71
- ld a, [de]
- cp $a
- jr nz, .asm_114a66
- inc e
- call z, Function114a71
- ld a, h
- and a
- jr z, .asm_114a52
- dec bc
-
-.asm_114a52
- ld hl, $dc03
- ld a, [$dc00]
- ld [hli], a
- ld [hl], e
- inc hl
- ld [hl], d
- xor a
- ret
-
-.asm_114a5e
- ld h, $1
- jr .asm_114a2e
-
-.asm_114a62
- ld h, $0
- jr .asm_114a1c
-
-.asm_114a66
- and a
- jr nz, .asm_114a6e
- ld a, $1
- ld [$dc17], a
-
-.asm_114a6e
- ld a, $1
- ret
-
-; 114a71
-
-Function114a71: ; 114a71
- push bc
- ld bc, $dc00
- call Function115d80
- pop bc
- ret
-
-; 114a7a
-
-Function114a7a: ; 114a7a
- ld bc, NULL
-.asm_114a7d
- inc bc
- ld a, [de]
- and a
- jr z, .asm_114abb
- inc e
- call z, Function114ac6
- cp $d
- jr nz, .asm_114a7d
- ld a, [de]
- cp $a
- jr nz, .asm_114abb
- inc e
- call z, Function114ac6
- inc bc
- ld a, [de]
- cp $2e
- jr nz, .asm_114a7d
- inc e
- call z, Function114ac6
- ld a, [de]
- cp $d
- jr nz, .asm_114a7d
- inc e
- call z, Function114ac6
- ld a, [de]
- cp $a
- jr nz, .asm_114abb
- inc e
- call z, Function114ac6
- ld hl, $dc03
- ld a, [$dc00]
- ld [hli], a
- ld [hl], e
- inc hl
- ld [hl], d
- xor a
- ret
-
-.asm_114abb
- and a
- jr nz, .asm_114ac3
- ld a, $1
- ld [$dc17], a
-
-.asm_114ac3
- ld a, $1
- ret
-
-; 114ac6
-
-Function114ac6: ; 114ac6
- push bc
- ld bc, $dc00
- call Function115d80
- pop bc
- ret
-
-; 114acf
-
-Function114acf: ; 114acf
-.asm_114acf
- push hl
- push bc
-.asm_114ad1
- ld a, [hl]
- ld b, a
- ld a, [de]
- inc e
- call z, Function114b4c
- cp $61
- jr c, .asm_114ae2
- cp $7b
- jr nc, .asm_114ae2
- sub $20
-
-.asm_114ae2
- cp b
- jr z, .asm_114af4
- pop bc
- dec bc
- push bc
- ld a, b
- or c
- jr nz, .asm_114ad1
-.asm_114aec
- ld a, $2
- ld [$dc0e], a
- pop bc
- pop hl
- ret
-
-.asm_114af4
- inc hl
-.asm_114af5
- ld a, [hli]
- and a
- jr z, .asm_114b19
- ld b, a
- ld a, [de]
- inc e
- call z, Function114b4c
- cp $61
- jr c, .asm_114b09
- cp $7b
- jr nc, .asm_114b09
- sub $20
-
-.asm_114b09
- cp b
- jr nz, .asm_114b15
- pop bc
- dec bc
- push bc
- ld a, b
- or c
- jr nz, .asm_114af5
- jr .asm_114aec
-
-.asm_114b15
- pop bc
- pop hl
- jr .asm_114acf
-
-.asm_114b19
- ld b, $0
- ld c, $40
- ld a, [de]
- cp $22
- jr nz, .asm_114b26
- inc e
- call z, Function114b4c
-
-.asm_114b26
- ld hl, Plant
- ld a, [$dc00]
- ld [hli], a
- ld [hl], e
- inc hl
- ld [hl], d
- inc hl
-.asm_114b31
- ld a, [de]
- cp $22
- jr z, .asm_114b42
- cp $d
- jr z, .asm_114b42
- inc e
- call z, Function114b4c
- inc b
- dec c
- jr nz, .asm_114b31
-
-.asm_114b42
- ld [hl], b
- pop bc
- pop hl
- ld a, $3
- ld [$dc0e], a
- xor a
- ret
-
-; 114b4c
-
-Function114b4c: ; 114b4c
- push bc
- ld bc, $dc00
- call Function115d80
- pop bc
- ret
-
-; 114b55
-
-Function114b55: ; 114b55
- call Function114561
- ld b, $0
- ld hl, $dc03
- ld c, [hl]
- inc hl
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld hl, $dc24
-.asm_114b65
- push de
- push bc
- push hl
- call Function1143f3
- cp $2
- jr z, .asm_114bb2
- and a
- jr nz, .asm_114b8c
- ld a, h
- pop hl
- inc hl
- ld [hld], a
- ld a, $1
- ld [hli], a
- inc hl
- ld [hl], e
- inc hl
- ld [hl], d
- inc hl
- ld [hl], c
- inc hl
- ld [hl], b
- inc hl
-.asm_114b82
- pop bc
- pop de
- inc b
- ld a, b
- cp $d
- jr z, .asm_114b96
- jr .asm_114b65
-
-.asm_114b8c
- pop hl
- xor a
-rept 6
- ld [hli], a
-endr
- jr .asm_114b82
-
-.asm_114b96
- ld hl, $dc06
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- inc hl
- ld bc, $004e
- ld hl, $dc24
- call Function115d6a
- jp Function11425c
-
-.asm_114bb2
- ld a, $1
- pop bc
- pop bc
- pop bc
- ld b, $82
- jp Function11425c
-
-; 114bbc
-
-Function114bbc: ; 114bbc
- ld h, d
- ld l, e
- ld a, [hli]
- ld b, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld e, a
- ld d, [hl]
- inc hl
- push hl
- call Function1143f3
- cp $2
- jr z, .asm_114c03
- and a
- jr nz, .asm_114bff
- ld a, h
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- call Function114c0b
- ld hl, $dc24
- call Function114c5e
- ld a, b
- or c
- jr z, .asm_114bff
- pop hl
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld a, [hli]
- ld e, a
- ld d, [hl]
- ld hl, $dc24
- push bc
- call Function115d6a
- pop hl
- jp Function11425c
-
-.asm_114bff
- ld b, $84
- jr .asm_114c05
-
-.asm_114c03
- ld b, $82
-
-.asm_114c05
- ld a, $1
- pop hl
- jp Function11425c
-
-; 114c0b
-
-Function114c0b: ; 114c0b
- ld hl, $dc24
- push bc
- call Function115d53
- pop bc
- ld hl, $dc24
- ld d, h
- ld e, l
-.asm_114c18
- ld a, [hli]
- cp $d
- jr z, .asm_114c34
- ld [de], a
- inc de
- dec bc
- ld a, b
- or c
- jr nz, .asm_114c18
-.asm_114c24
- xor a
- ld [de], a
- ld hl, $dc24
- ld bc, NULL
-.asm_114c2c
- ld a, [hli]
- inc bc
- and a
- jr nz, .asm_114c2c
- dec bc
- xor a
- ret
-
-.asm_114c34
- dec bc
- ld a, b
- or c
- jr z, .asm_114c24
- ld a, [hli]
- cp $a
- jr nz, .asm_114c18
- dec bc
- ld a, b
- or c
- jr z, .asm_114c24
- ld a, [hli]
- cp $20
- jr z, .asm_114c4e
- cp $9
- jr z, .asm_114c4e
- jr .asm_114c24
-
-.asm_114c4e
- dec bc
- ld a, b
- or c
- jr z, .asm_114c24
- jr .asm_114c18
-
-; 114c55
-
-Function114c55: ; 114c55
- push bc
- ld bc, $dc00
- call Function115d80
- pop bc
- ret
-
-; 114c5e
-
-Function114c5e: ; 114c5e
- ld de, PartyMon5Defense
- push hl
-.asm_114c62
- ld a, [hli]
- ld [de], a
- inc de
- and a
- jr z, .asm_114cc6
- cp $3d
- jr nz, .asm_114c62
- ld a, [hli]
- ld [de], a
- inc de
- cp $3f
- jr nz, .asm_114c62
- dec de
- dec de
-.asm_114c75
- ld a, [hli]
- cp $3f
- jr nz, .asm_114c75
- ld a, [hli]
- cp $42
- jr nz, .asm_114cb8
- inc hl
- ld bc, NULL
- push hl
-.asm_114c84
- inc bc
- ld a, [hli]
- cp $3f
- jr nz, .asm_114c84
- inc bc
- ld a, [hli]
- cp $3d
- jr nz, .asm_114c84
- dec bc
- dec bc
- ld a, l
- ld [$dc03], a
- ld a, h
- ld [$dc04], a
- pop hl
- push de
- call Function115c49
- pop de
- ld h, d
- ld l, e
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
-.asm_114ca6
- ld a, [hli]
- ld [de], a
- inc de
- dec bc
- ld a, b
- or c
- jr nz, .asm_114ca6
- ld a, [$dc03]
- ld l, a
- ld a, [$dc04]
- ld h, a
- jr .asm_114c62
-
-.asm_114cb8
- ld a, $3d
- ld [de], a
- inc de
- ld a, $3f
- ld [de], a
- inc de
-.asm_114cc0
- ld a, [hli]
- ld [de], a
- inc de
- and a
- jr nz, .asm_114cc0
-
-.asm_114cc6
- ld [de], a
- pop hl
- ld de, PartyMon5Defense
- ld bc, NULL
-.asm_114cce
- inc bc
- ld a, [de]
- ld [hli], a
- inc de
- and a
- jr z, .asm_114cd7
- jr .asm_114cce
-
-.asm_114cd7
- dec bc
- ret
-
-; 114cd9
-
-Function114cd9: ; 114cd9
- ld h, d
- ld l, e
- ld b, [hl]
- inc hl
- ld c, [hl]
- inc hl
- ld e, [hl]
- inc hl
- ld d, [hl]
- inc hl
- push hl
- call Function1143f3
- and a
- jr nz, .asm_114d33
- ld [$dc03], a
- ld [$dc04], a
- ld a, h
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld hl, $dc24
- call Function114d39
- ld hl, $dc24
- call Function114d99
- pop hl
- push hl
-rept 4
- inc hl
-endr
- ld a, [hld]
- cp b
- jr c, .asm_114d2d
- jr z, .asm_114d29
-.asm_114d11
- pop hl
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld hl, PartyMon5Defense
- call Function115d6a
- xor a
- jp Function11425c
-
-.asm_114d29
- ld a, [hli]
- cp c
- jr nc, .asm_114d11
-
-.asm_114d2d
- ld b, $83
- jr .asm_114d33
-
- ld b, $82
-
-.asm_114d33
- pop hl
- ld a, $1
- jp Function11425c
-
-; 114d39
-
-Function114d39: ; 114d39
-.asm_114d39
- ld a, [$dc04]
- and a
- jr nz, .asm_114d4a
- ld a, [de]
- cp $28
- jr z, .asm_114d55
- cp $22
- jr z, .asm_114d55
- jr .asm_114d7f
-
-.asm_114d4a
- ld a, [de]
- cp $29
- jr z, .asm_114d5f
- cp $22
- jr z, .asm_114d6f
- jr .asm_114d84
-
-.asm_114d55
- ld [$dc03], a
- ld a, $1
- ld [$dc04], a
- jr .asm_114d84
-
-.asm_114d5f
- ld a, [$dc03]
- cp $28
- jr nz, .asm_114d84
- xor a
- ld [$dc03], a
- ld [$dc04], a
- jr .asm_114d84
-
-.asm_114d6f
- ld a, [$dc03]
- cp $22
- jr nz, .asm_114d84
- xor a
- ld [$dc03], a
- ld [$dc04], a
- jr .asm_114d84
-
-.asm_114d7f
- cp $20
- jr z, .asm_114d84
- ld [hli], a
-
-.asm_114d84
- dec bc
- ld a, b
- or c
- jr z, .asm_114d96
- inc e
- jr nz, .asm_114d39
- push bc
- ld bc, $dc00
- call Function115d80
- pop bc
- jr .asm_114d39
-
-.asm_114d96
- xor a
- ld [hli], a
- ret
-
-; 114d99
-
-Function114d99: ; 114d99
- ld de, PartyMon5Defense
- xor a
- ld [de], a
-.asm_114d9e
- ld a, [hli]
- call Function114df1
- and a
- jr z, .asm_114dde
- cp $40
- jr nz, .asm_114d9e
- dec hl
-.asm_114daa
- dec hl
- ld a, [hl]
- call Function114e2d
- and a
- jr z, .asm_114daa
- inc hl
- push hl
- ld b, $0
-.asm_114db6
- ld a, [hli]
- cp $40
- jr z, .asm_114dc1
- call Function114e2d
- and a
- jr nz, .asm_114dc4
-
-.asm_114dc1
- inc b
- jr .asm_114db6
-
-.asm_114dc4
- pop hl
- ld a, [PartyMon5Defense]
- and a
- jr z, .asm_114dd2
- ld a, $2c
- inc de
- ld [de], a
- ld a, [PartyMon5Defense]
-
-.asm_114dd2
- inc a
- ld [PartyMon5Defense], a
-.asm_114dd6
- inc de
- ld a, [hli]
- ld [de], a
- dec b
- jr nz, .asm_114dd6
- jr .asm_114d9e
-
-.asm_114dde
- inc de
- xor a
- ld [de], a
- ld a, $dd
- cpl
- ld h, a
- ld a, $c8
- cpl
- ld l, a
- inc hl
- add hl, de
- ld b, h
- ld c, l
- inc bc
- inc bc
- xor a
- ret
-
-; 114df1
-
-Function114df1: ; 114df1
- cp $1b
- ret nz
- ld a, [hli]
- and a
- jr z, .asm_114e2b
- cp $24
- jr nz, .asm_114e09
- ld a, [hli]
- and a
- jr z, .asm_114e2b
- cp $42
- jr z, .asm_114e0b
- cp $40
- jr z, .asm_114e0b
- dec hl
-
-.asm_114e09
- dec hl
- ret
-
-.asm_114e0b
- ld a, [hli]
- and a
- jr z, .asm_114e2b
- cp $1b
- jr nz, .asm_114e0b
- ld a, [hli]
- and a
- jr z, .asm_114e2b
- cp $28
- jr nz, .asm_114e0b
- ld a, [hli]
- and a
- jr z, .asm_114e2b
- cp $42
- jr z, .asm_114e29
- cp $4a
- jr z, .asm_114e29
- jr .asm_114e0b
-
-.asm_114e29
- ld a, [hli]
- ret
-
-.asm_114e2b
- xor a
- ret
-
-; 114e2d
-
-Function114e2d: ; 114e2d
- cp $30
- jr c, .asm_114e45
- cp $40
- jr c, .asm_114e58
- cp $41
- jr c, .asm_114e45
- cp $5b
- jr c, .asm_114e58
- cp $61
- jr c, .asm_114e45
- cp $7b
- jr c, .asm_114e58
-
-.asm_114e45
- cp $20
- jr z, .asm_114e58
- cp $2d
- jr z, .asm_114e58
- cp $2e
- jr z, .asm_114e58
- cp $5f
- jr z, .asm_114e58
-.asm_114e55
- ld a, $1
- ret
-
-.asm_114e58
- cp $3c
- jr z, .asm_114e55
- cp $3e
- jr z, .asm_114e55
- xor a
- ret
-
-; 114e62
-
-Function114e62: ; 114e62
- ld a, c
- and a
- jr nz, .asm_114e6f
- ld a, [wStartDay]
- and a
- jp z, Function11425c
- jr .asm_114e76
-
-.asm_114e6f
- xor a
- ld [wStartDay], a
- call Function114ee9
-
-.asm_114e76
- call Function114f0a
- cp $ff
- jp z, Function11425c
- and a
- jr nz, .asm_114e99
- call Function114ea0
- and a
- jr nz, .asm_114e99
- ld hl, $dc09
- ld a, [hli]
- cpl
- ld e, a
- ld a, [hli]
- cpl
- ld d, a
- inc de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- add hl, de
- xor a
- jp Function11425c
-
-.asm_114e99
- ld a, $1
- ld b, $83
- jp Function11425c
-
-; 114ea0
-
-Function114ea0: ; 114ea0
- ld hl, $dc06
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- ld a, $d
- ld [de], a
- dec bc
- ld a, b
- or c
- jr z, .asm_114edb
- inc e
- call z, Function114ee0
- ld a, $a
- ld [de], a
- dec bc
- inc e
- call z, Function114ee0
- ld hl, $dc06
- ld a, [wCurrentMapSignpostCount]
- ld [hli], a
- ld a, e
- ld [hli], a
- ld a, d
- ld [hli], a
- ld a, c
- ld [hli], a
- ld [hl], b
- xor a
- ld [wStartDay], a
- ret
-
-.asm_114edb
- ld a, $1
- ld b, $83
- ret
-
-; 114ee0
-
-Function114ee0: ; 114ee0
- push bc
- ld bc, wCurrentMapSignpostCount
- call Function115d80
- pop bc
- ret
-
-; 114ee9
-
-Function114ee9: ; 114ee9
- ld hl, $dc03
- ld a, b
- ld [hli], a
- ld a, c
- ld [hli], a
- ld [hli], a
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld c, a
- ld [hli], a
- inc de
- ld a, [de]
- ld b, a
- ld [hli], a
- inc de
- ld a, c
- ld [hli], a
- ld a, b
- ld [hli], a
- ld a, e
- ld [hli], a
- ld [hl], d
- ret
-
-; 114f0a
-
-Function114f0a: ; 114f0a
- call Function114f39
- and a
- jr nz, .asm_114f26
- ld a, [$dc03]
- cp $6
- jr c, .asm_114f21
- cp $c
- jr z, .asm_114f23
- call Function114f59
- and a
- jr nz, .asm_114f23
-
-.asm_114f21
- xor a
- ret
-
-.asm_114f23
- ld a, $1
- ret
-
-.asm_114f26
- call Function114f59
- and a
- jr nz, .asm_114f23
- ld hl, $dc0d
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld a, [de]
- and a
- jr z, .asm_114f21
- ld a, $ff
- ret
-
-; 114f39
-
-Function114f39: ; 114f39
- ld hl, $dc0d
- ld e, [hl]
- inc hl
- ld d, [hl]
- inc hl
- ld a, [de]
- and a
- jr z, .asm_114f58
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld hl, $dc0d
- ld [hl], e
- inc hl
- ld [hl], d
- ld a, $1
- ret
-
-.asm_114f58
- ret
-
-; 114f59
-
-Function114f59: ; 114f59
- ld a, [wStartDay]
- and a
- jr nz, .asm_114f7c
- ld a, [$dc03]
- cp $11
- jr z, .asm_114fa7
- add a
- ld e, a
- ld d, 0
- ld hl, Unknown_114011
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- call Function115020
- and a
- jr nz, .asm_114fe7
- ld a, $1
- ld [wStartDay], a
-
-.asm_114f7c
- ld a, [$dc03]
- cp $5
- jr c, .asm_114fc9
- jr z, .asm_114fec
- cp $8
- jr c, .asm_114fa5
- jr z, .asm_114ff4
- cp $b
- jr c, .asm_114fa5
- jr z, .asm_114ffc
- cp $c
- jr z, .asm_115007
- cp $d
- jr z, .asm_114fa5
- cp $10
- jr c, .asm_115015
- jr z, .asm_114fa5
- cp $12
- jr c, .asm_114fa5
- jr .asm_114fe7
-
-.asm_114fa5
- xor a
- ret
-
-.asm_114fa7
- ld hl, Bed
- ld c, [hl]
- inc hl
- ld a, [hli]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld hl, $dc24
- call Function115d53
- ld hl, $dc24
- call Function115020
- and a
- jr nz, .asm_114fe7
- jr .asm_11501e
-
-.asm_114fc9
- call Function115062
- and a
- jr nz, .asm_114fe7
- ld a, [$dc04]
- dec a
- ld [$dc04], a
- and a
- jr z, .asm_114fdf
- call Function114f39
- and a
- jr nz, .asm_114fc9
-
-.asm_114fdf
- ld a, [$dc05]
- ld [$dc04], a
- jr .asm_11501e
-
-.asm_114fe7
- ld a, $1
- ld b, $83
- ret
-
-.asm_114fec
- call Function115062
- and a
- jr nz, .asm_114fe7
- jr .asm_11501e
-
-.asm_114ff4
- call Function115179
- and a
- jr nz, .asm_114fe7
- jr .asm_11501e
-
-.asm_114ffc
- ld hl, String_114000
- call Function115217
- and a
- jr nz, .asm_114fe7
- jr .asm_11501e
-
-.asm_115007
- call Function11528f
- ld hl, $dc24
- call Function115217
- and a
- jr nz, .asm_114fe7
- jr .asm_11501e
-
-.asm_115015
- ld hl, String_114000
- call Function115217
- and a
- jr nz, .asm_114fe7
-
-.asm_11501e
- xor a
- ret
-
-; 115020
-
-Function115020: ; 115020
- push hl
- ld hl, $dc06
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- pop hl
-.asm_115036
- ld a, [hli]
- and a
- jr z, .asm_115046
- ld [de], a
- dec bc
- ld a, b
- or c
- jr z, .asm_115056
- inc e
- call z, Function115059
- jr .asm_115036
-
-.asm_115046
- ld hl, $dc06
- ld a, [wCurrentMapSignpostCount]
- ld [hli], a
- ld a, e
- ld [hli], a
- ld a, d
- ld [hli], a
- ld a, c
- ld [hli], a
- ld [hl], b
- xor a
- ret
-
-.asm_115056
- ld a, $1
- ret
-
-; 115059
-
-Function115059: ; 115059
- push bc
- ld bc, wCurrentMapSignpostCount
- call Function115d80
- pop bc
- ret
-
-; 115062
-
-Function115062: ; 115062
- ld hl, Bed
- ld a, [hli]
- and a
- jr z, .asm_1150ae
- ld c, a
- ld a, [hli]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld b, $0
- ld hl, $dc24
- ld a, [wStartDay]
- cp $1
- jr z, .asm_11509b
- cp $2
- jr z, .asm_115098
- cp $3
- jr nz, .asm_1150b2
- ld a, $2c
- ld [hli], a
- ld a, $d
- ld [hli], a
- ld a, $a
- ld [hli], a
- ld a, $9
- ld [hli], a
- jr .asm_11509b
-
-.asm_115098
- ld a, $2c
- ld [hli], a
-
-.asm_11509b
- call Function115d53
- call Function1150b3
- call Function115136
- ld a, [wStartDay]
- inc a
- cp $4
- jr nz, .asm_1150ae
- ld a, $2
-
-.asm_1150ae
- ld [wStartDay], a
- xor a
-
-.asm_1150b2
- ret
-
-; 1150b3
-
-Function1150b3: ; 1150b3
- ld hl, $dc24
- ld de, PartyMon5Defense
- ld b, $0
-.asm_1150bb
- ld c, $0
- ld a, [hli]
- cp $1b
- jr z, .asm_1150c9
- ld [de], a
- inc de
- and a
- jr z, .asm_115133
- jr .asm_1150bb
-
-.asm_1150c9
- inc c
- ld a, [hl]
- cp $24
- jr nz, .asm_1150bb
- inc hl
- inc c
- ld a, [hl]
- cp $42
- jr z, .asm_1150dc
- cp $40
- jr z, .asm_1150dc
- jr .asm_1150bb
-
-.asm_1150dc
- push hl
-.asm_1150dd
- inc c
- ld a, [hli]
- and a
- jr z, .asm_115133
- cp $1b
- jr nz, .asm_1150dd
- inc c
- ld a, [hli]
- cp $28
- jr nz, .asm_1150dd
- inc c
- ld a, [hli]
- cp $42
- jr z, .asm_1150f8
- cp $4a
- jr z, .asm_1150f8
- jr .asm_1150dd
-
-.asm_1150f8
- ld a, l
- ld [Console], a
- ld a, h
- ld [LeftOrnament], a
- ld hl, String_114232
-.asm_115103
- ld a, [hli]
- and a
- jr z, .asm_11510b
- ld [de], a
- inc de
- jr .asm_115103
-
-.asm_11510b
- pop hl
- dec hl
- dec hl
- push de
- call Function1158c2
- pop de
- ld h, d
- ld l, e
- ld c, [hl]
- inc hl
- ld b, [hl]
- inc hl
-.asm_115119
- ld a, [hli]
- ld [de], a
- inc de
- dec bc
- ld a, b
- or c
- jr nz, .asm_115119
- ld a, $3f
- ld [de], a
- inc de
- ld a, $3d
- ld [de], a
- inc de
- ld a, [Console]
- ld l, a
- ld a, [LeftOrnament]
- ld h, a
- jr .asm_1150bb
-
-.asm_115133
- xor a
- ld [de], a
- ret
-
-; 115136
-
-Function115136: ; 115136
- ld hl, $dc06
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- ld hl, PartyMon5Defense
-.asm_11514d
- ld a, [hli]
- and a
- jr z, .asm_11515d
- ld [de], a
- dec bc
- ld a, b
- or c
- jr z, .asm_11516d
- inc e
- call z, Function115170
- jr .asm_11514d
-
-.asm_11515d
- ld hl, $dc06
- ld a, [wCurrentMapSignpostCount]
- ld [hli], a
- ld a, e
- ld [hli], a
- ld a, d
- ld [hli], a
- ld a, c
- ld [hli], a
- ld [hl], b
- xor a
- ret
-
-.asm_11516d
- ld a, $1
- ret
-
-; 115170
-
-Function115170: ; 115170
- push bc
- ld bc, wCurrentMapSignpostCount
- call Function115d80
- pop bc
- ret
-
-; 115179
-
-Function115179: ; 115179
- ld hl, $dc06
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- ld hl, $013f
- ld a, [hli]
- ld [de], a
- dec bc
- ld a, b
- or c
- jr z, .asm_1151ef
- inc e
- call z, Function11520e
- ld a, [hli]
- ld [de], a
- dec bc
- ld a, b
- or c
- jr z, .asm_1151ef
- inc e
- call z, Function11520e
- ld a, [hli]
- ld [de], a
- dec bc
- ld a, b
- or c
- jr z, .asm_1151ef
- inc e
- call z, Function11520e
- ld a, [hli]
- ld [de], a
- dec bc
- ld a, b
- or c
- jr z, .asm_1151ef
- inc e
- call z, Function11520e
- ld a, $2d
- ld [de], a
- dec bc
- ld a, b
- or c
- jr z, .asm_1151ef
- inc e
- call z, Function11520e
- ld a, [$014c]
- ld h, a
- and $f0
- swap a
- cp $a
- jr nc, .asm_1151d8
- add $30
- jr .asm_1151da
-
-.asm_1151d8
- add $37
-
-.asm_1151da
- ld [de], a
- dec bc
- ld a, b
- or c
- jr z, .asm_1151ef
- inc e
- call z, Function11520e
- ld a, h
- and $f
- cp $a
- jr nc, .asm_1151f2
- add $30
- jr .asm_1151f4
-
-.asm_1151ef
- ld a, $1
- ret
-
-.asm_1151f2
- add $37
-
-.asm_1151f4
- ld [de], a
- dec bc
- ld a, b
- or c
- jr z, .asm_1151ef
- inc e
- call z, Function11520e
- ld hl, $dc06
- ld a, [wCurrentMapSignpostCount]
- ld [hli], a
- ld a, e
- ld [hli], a
- ld a, d
- ld [hli], a
- ld a, c
- ld [hli], a
- ld [hl], b
- xor a
- ret
-
-; 11520e
-
-Function11520e: ; 11520e
- push bc
- ld bc, wCurrentMapSignpostCount
- call Function115d80
- pop bc
- ret
-
-; 115217
-
-Function115217: ; 115217
- push hl
- ld hl, $dc06
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- pop hl
-.asm_11522d
- ld a, [hli]
- and a
- jr z, .asm_11523d
- ld [de], a
- dec bc
- ld a, b
- or c
- jr z, .asm_115262
- inc e
- call z, Function115286
- jr .asm_11522d
-
-.asm_11523d
- ld a, [$dc03]
- cp $b
- jr z, .asm_115278
- cp $c
- jr z, .asm_115278
- cp $e
- jr z, .asm_115252
- cp $f
- jr z, .asm_115265
- jr .asm_115262
-
-.asm_115252
- ld hl, $dc06
- ld a, [wCurrentMapSignpostCount]
- ld [hli], a
- ld a, e
- ld [hli], a
- ld a, d
- ld [hli], a
- ld a, c
- ld [hli], a
- ld [hl], b
- xor a
- ret
-
-.asm_115262
- ld a, $1
- ret
-
-.asm_115265
- ld h, $2
-.asm_115267
- ld a, $2d
- ld [de], a
- dec bc
- ld a, b
- or c
- jr z, .asm_115262
- inc e
- call z, Function115286
- dec h
- jr nz, .asm_115267
- jr .asm_115252
-
-.asm_115278
- ld a, $22
- ld [de], a
- dec bc
- ld a, b
- or c
- jr z, .asm_115262
- inc e
- call z, Function115286
- jr .asm_115252
-
-; 115286
-
-Function115286: ; 115286
- push bc
- ld bc, wCurrentMapSignpostCount
- call Function115d80
- pop bc
- ret
-
-; 11528f
-
-Function11528f: ; 11528f
- ld hl, Bed
- ld c, [hl]
- inc hl
- ld a, [hli]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld hl, $dc24
-.asm_1152a4
- ld a, [de]
- ld [hli], a
- inc e
- call z, Function1152af
- dec c
- jr nz, .asm_1152a4
- ld [hl], c
- ret
-
-; 1152af
-
-Function1152af: ; 1152af
- push bc
- ld bc, $dc00
- call Function115d80
- pop bc
- ret
-
-; 1152b8
-
-Function1152b8: ; 1152b8
- push bc
- call Function11537d
- push de
- ld h, d
- ld l, e
- ld a, [hli]
- ld b, a
- ld c, $1
- call Function1153d2
- pop de
- and a
- jr nz, .asm_1152f9
-.asm_1152ca
- ld hl, $dc0d
- ld e, [hl]
- inc hl
- ld d, [hl]
-.asm_1152d0
- ld a, [$dc03]
- cp $3
- jr nz, .asm_1152d8
- push de
-
-.asm_1152d8
- cp $5
- jr nz, .asm_1152e7
- pop hl
- ld a, [hli]
- ld b, a
- ld c, $3
- call Function1153d2
- and a
- jr nz, .asm_1152f9
-
-.asm_1152e7
- ld a, [de]
- inc de
- and a
- jr nz, .asm_115301
- ld a, [$dc03]
- cp $6
- jr z, .asm_115335
- inc a
- ld [$dc03], a
- jr .asm_1152d0
-
-.asm_1152f9
- pop hl
- ld a, $1
- ld b, $83
- jp Function11425c
-
-.asm_115301
- ld hl, $dc0d
- ld [hl], e
- inc hl
- ld [hl], d
-.asm_115307
- ld [$dc05], a
- ld a, $1
- ld [$dc04], a
- call Function1153b5
- call Function114f59
- and a
- jr nz, .asm_1152f9
- ld a, [$dc05]
- dec a
- jr nz, .asm_115307
- ld a, [$dc03]
- inc a
- ld [$dc03], a
- call Function114ea0
- and a
- jr nz, .asm_1152f9
- ld [wStartDay], a
- ld a, [$dc03]
- cp $6
- jr nz, .asm_1152ca
-
-.asm_115335
- call Function1153b5
- xor a
- ld [wStartDay], a
- call Function114f59
- and a
- jr nz, .asm_1152f9
- call Function114ea0
- and a
- jr nz, .asm_1152f9
- ld a, [$dc03]
- inc a
- ld [$dc03], a
- cp $9
- jr nz, .asm_115335
- pop bc
- ld a, b
- and a
- jr z, .asm_11536b
- call Function1153b5
- xor a
- ld [wStartDay], a
- call Function114f59
- and a
- jr nz, .asm_1152f9
- call Function114ea0
- and a
- jr nz, .asm_1152f9
-
-.asm_11536b
- ld hl, $dc09
- ld a, [hli]
- cpl
- ld e, a
- ld a, [hli]
- cpl
- ld d, a
- inc de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- add hl, de
- xor a
- jp Function11425c
-
-; 11537d
-
-Function11537d: ; 11537d
- ld hl, $dc06
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- ld b, a
- inc de
- ld a, [de]
- ld [hli], a
- inc hl
- ld a, [de]
- ld [hld], a
- ld a, b
- ld [hli], a
- inc de
- ld hl, RightOrnament
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld hl, $dc0d
- ld [hl], e
- inc hl
- ld [hl], d
- xor a
- ld [$dc03], a
- ld [wStartDay], a
- ret
-
-; 1153b5
-
-Function1153b5: ; 1153b5
- ld hl, $dc0d
- ld e, [hl]
- inc hl
- ld d, [hl]
- inc hl
- inc hl
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hl], a
- inc de
- ld a, [de]
- ld [Bed], a
- inc de
- ld hl, $dc0d
- ld [hl], e
- inc hl
- ld [hl], d
- ret
-
-; 1153d2
-
-Function1153d2: ; 1153d2
- ld a, [$dc03]
- ld d, a
- ld a, [$dc04]
- ld e, a
- push de
- xor a
- ld [$dc03], a
- ld [$dc04], a
- ld a, $24
- ld [Console], a
- ld a, $dc
- ld [LeftOrnament], a
- push bc
- jr .asm_1153f4
-
-.asm_1153ef
- ld a, [hli]
- and a
- jr z, .asm_115426
- ld b, a
-
-.asm_1153f4
- push bc
-.asm_1153f5
- ld a, [hli]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- inc hl
- ld c, [hl]
- inc hl
- push hl
- ld a, [Console]
- ld l, a
- ld a, [LeftOrnament]
- ld h, a
- push bc
- ld b, $0
- call Function115d53
- inc hl
- ld [hl], a
- pop bc
- ld a, l
- ld e, a
- ld [Console], a
- ld a, h
- ld d, a
- ld [LeftOrnament], a
- dec b
- jr z, .asm_11542b
- pop hl
- jr .asm_1153f5
-
-.asm_115426
- dec c
- jr nz, .asm_1153ef
- jr .asm_115430
-
-.asm_11542b
- pop hl
- pop bc
- dec c
- jr nz, .asm_1153ef
-
-.asm_115430
- ld a, l
- ld [Console], a
- ld a, h
- ld [LeftOrnament], a
- xor a
- ld [de], a
- ld hl, $dc24
-.asm_11543d
- ld a, [hli]
- and a
- jr nz, .asm_11543d
- ld a, [hl]
- and a
- jr z, .asm_115457
- dec hl
- ld a, $2c
- ld [hli], a
- jr .asm_11543d
-
-.asm_11544b
- pop hl
- ld a, h
- ld [$dc03], a
- ld a, l
- ld [$dc04], a
- ld a, $1
- ret
-
-.asm_115457
- ld hl, $dc24
- call Function114d99
- ld hl, $ddc8
-.asm_115460
- ld a, [hli]
- and a
- jr z, .asm_11546d
- cp $2c
- jr nz, .asm_115460
- dec hl
- xor a
- ld [hli], a
- jr .asm_115460
-
-.asm_11546d
- pop de
- ld a, e
- cp $1
- jr z, .asm_115477
- xor a
- ld [hli], a
- jr .asm_115478
-
-.asm_115477
- dec bc
-
-.asm_115478
- ld hl, $dc18
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, b
- cp h
- jr c, .asm_11548c
- jr nz, .asm_11544b
- ld a, c
- cp l
- jr c, .asm_11548c
- jr z, .asm_11548c
- jr .asm_11544b
-
-.asm_11548c
- ld hl, $dc18
- ld a, c
- cpl
- ld e, a
- ld a, b
- cpl
- ld d, a
- inc de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- add hl, de
- ld de, $dc18
- ld a, l
- ld [de], a
- inc de
- ld a, h
- ld [de], a
- ld hl, RightOrnament
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld hl, $ddc8
- call Function115d6a
- ld hl, RightOrnament
- ld a, [wCurrentMapSignpostCount]
- ld [hli], a
- ld [hl], e
- inc hl
- ld [hl], d
- ld a, [Console]
- ld e, a
- ld a, [LeftOrnament]
- ld d, a
- pop hl
- ld a, h
- ld [$dc03], a
- ld a, l
- ld [$dc04], a
- xor a
- ret
-
-; 1154d4
-
-Function1154d4: ; 1154d4
- xor a
- ld [wStartDay], a
- call Function1155af
- call Function11560a
- and a
- jr nz, .asm_11552c
- call Function1155d1
- ld a, [RightOrnament]
- dec a
- ld [RightOrnament], a
- and a
- jp z, .asm_115577
- cp $1
- jr nz, .asm_115531
- xor a
- ld [wDailyResetTimer], a
-.asm_1154f7
- ld a, [BigDoll]
- cp $2
- jr z, .asm_115502
- cp $3
- jr z, .asm_11550f
-
-.asm_115502
- ld a, $a
- ld [$dc03], a
- call Function114f59
- and a
- jr z, .asm_11551a
- jr .asm_11552c
-
-.asm_11550f
- ld a, $c
- ld [$dc03], a
- call Function114f59
- and a
- jr nz, .asm_11552c
-
-.asm_11551a
- call Function114ea0
- and a
- jr nz, .asm_11552c
- call Function114ea0
- and a
- jr nz, .asm_11552c
- call Function11560a
- and a
- jr z, .asm_1155a0
-
-.asm_11552c
- ld a, $1
- jp Function11425c
-
-.asm_115531
- ld a, $1
- ld [wDailyResetTimer], a
- ld a, $b
- ld [$dc03], a
- call Function114f59
- and a
- jr nz, .asm_11552c
- call Function114ea0
- and a
- jr nz, .asm_11552c
-.asm_115547
- call Function114ea0
- and a
- jr nz, .asm_11552c
- ld a, $e
- ld [$dc03], a
- call Function114f59
- and a
- jr nz, .asm_11552c
- call Function114ea0
- and a
- jr nz, .asm_11552c
- jr .asm_1154f7
-
-.asm_115560
- call Function114ea0
- and a
- jr nz, .asm_11552c
- ld a, [wDailyResetTimer]
- and a
- jr z, .asm_11557d
- ld a, $f
- ld [$dc03], a
- call Function114f59
- and a
- jr nz, .asm_11552c
-
-.asm_115577
- call Function114ea0
- and a
- jr nz, .asm_11552c
-
-.asm_11557d
- ld a, $10
- ld [$dc03], a
- call Function114f59
- and a
- jr nz, .asm_11552c
- call Function114ea0
- and a
- jr nz, .asm_11552c
- ld hl, $dc09
- ld a, [hli]
- cpl
- ld e, a
- ld a, [hli]
- cpl
- ld d, a
- inc de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- add hl, de
- xor a
- jp Function11425c
-
-.asm_1155a0
- ld a, [RightOrnament]
- dec a
- ld [RightOrnament], a
- and a
- jr z, .asm_115560
- call Function1155d1
- jr .asm_115547
-
-; 1155af
-
-Function1155af: ; 1155af
- ld hl, $dc06
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- ld b, a
- inc de
- ld a, [de]
- ld [hli], a
- ld [hl], b
- inc hl
- ld [hli], a
- inc de
- ld a, [de]
- ld [RightOrnament], a
- inc de
- ld a, e
- ld [hli], a
- ld [hl], d
- call Function1155d1
- ret
-
-; 1155d1
-
-Function1155d1: ; 1155d1
- ld a, [$dc0d]
- ld l, a
- ld a, [$dc0e]
- ld h, a
- ld a, [hli]
- ld [BigDoll], a
- cp $3
- jr nz, .asm_1155f0
- ld de, Carpet
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- ld a, [hli]
- ld [Bed], a
-
-.asm_1155f0
- ld de, $dc17
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- ld a, l
- ld [$dc0d], a
- ld a, h
- ld [$dc0e], a
- ret
-
-; 11560a
-
-Function11560a: ; 11560a
- ld a, [$dc06]
- ld [wCurrentMapSignpostCount], a
- ld a, [$dc17]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld hl, $dc1a
- ld c, [hl]
- inc hl
- ld b, [hl]
- ld a, [wCurrMapCallbackCount]
- cp b
- jp c, .asm_1156b1
- jr nz, .asm_115631
- ld a, [$dc09]
- cp c
- jp c, .asm_1156b1
-
-.asm_115631
- ld a, b
- or c
- jr z, .asm_1156a9
- ld a, [$dc09]
- ld l, a
- ld a, [wCurrMapCallbackCount]
- ld h, a
- ld a, c
- cpl
- ld e, a
- ld a, b
- cpl
- ld d, a
- inc de
- add hl, de
- ld a, l
- ld [$dc09], a
- ld a, h
- ld [wCurrMapCallbackCount], a
-.asm_11564d
- ld a, $3
- cp b
- jr c, .asm_1156b6
- jr nz, .asm_115659
- ld a, $db
- cp c
- jr c, .asm_1156b6
-
-.asm_115659
- ld a, [$dc1a]
- ld e, a
- ld a, [$dc1b]
- ld d, a
- ld a, c
- cpl
- ld l, a
- ld a, b
- cpl
- ld h, a
- inc hl
- add hl, de
- ld a, l
- ld [$dc1a], a
- ld a, h
- ld [$dc1b], a
- push bc
- ld hl, $dc18
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld hl, $dc24
- call Function115d53
- ld hl, $dc18
- ld [hl], e
- inc hl
- ld [hl], d
- pop bc
- ld a, [wCurrentMapSignpostCount]
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld hl, wCurrMapTriggerCount
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld hl, $dc24
- call Function115d6a
- ld hl, wCurrMapTriggerCount
- ld [hl], e
- inc hl
- ld [hl], d
- ld hl, $dc1a
- ld c, [hl]
- inc hl
- ld b, [hl]
- ld a, b
- or c
- jr nz, .asm_11564d
-
-.asm_1156a9
- ld a, [wCurrentMapSignpostCount]
- ld [$dc06], a
- xor a
- ret
-
-.asm_1156b1
- ld a, $1
- ld b, $83
- ret
-
-.asm_1156b6
- ld a, $3
- cpl
- ld h, a
- ld a, $db
- cpl
- ld l, a
- add hl, bc
- ld de, $dc1a
- ld a, l
- ld [de], a
- inc de
- ld a, h
- ld [de], a
- ld bc, $03db
- jr .asm_115659
-
-; 1156cc
-
-Function1156cc: ; 1156cc
- ld a, [wStartDay]
- and a
- jp z, Function11425c
- cp $2
- jr z, .asm_1156fa
- cp $3
- jr z, .asm_1156fd
- cp $4
- jr z, .asm_1156fd
- cp $5
- jr z, .asm_115716
- cp $ff
- jr z, .asm_11572b
- cp $1
- jp nz, Function11425c
- call Function115732
- call Function11575c
- ld a, h
- ld [Poster], a
- ld a, l
- ld [Plant], a
-
-.asm_1156fa
- call Function1157d0
-
-.asm_1156fd
- call Function11581e
- and a
- jr nz, .asm_11572b
- ld a, [wStartDay]
- cp $5
- jr z, .asm_115716
- ld a, [Poster]
- ld h, a
- ld a, [Plant]
- ld l, a
- xor a
- jp Function11425c
-
-.asm_115716
- ld hl, wCurrMapCallbackCount
- ld a, [hli]
- cpl
- ld e, a
- ld a, [hli]
- cpl
- ld d, a
- inc de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- add hl, de
- xor a
- ld [wStartDay], a
- jp Function11425c
-
-.asm_11572b
- ld a, $1
- ld b, $83
- jp Function11425c
-
-; 115732
-
-Function115732: ; 115732
- ld hl, $dc02
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- dec de
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hli], a
- ld a, c
- ld [hli], a
- ld [hl], b
- ret
-
-; 11575c
-
-Function11575c: ; 11575c
- ld hl, $dc05
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld e, $10
- ld b, $0
- ld c, b
- ld d, b
- ld a, $3
-.asm_11576a
- rl l
- rl h
- rl d
- cp d
- jr c, .asm_11577c
- rl c
- rl b
- dec e
- jr nz, .asm_11576a
- jr .asm_11578a
-
-.asm_11577c
- ld a, d
- sub $3
- ld d, a
- ld a, $3
- scf
- rl c
- rl b
- dec e
- jr nz, .asm_11576a
-
-.asm_11578a
- ld a, d
- and a
- jr z, .asm_11578f
- inc bc
-
-.asm_11578f
- sla c
- rl b
- sla c
- rl b
- ld h, b
- ld l, c
- push hl
- ld e, $10
- ld b, $0
- ld c, b
- ld d, b
- ld a, $40
-.asm_1157a2
- rl l
- rl h
- rl d
- cp d
- jr c, .asm_1157b4
- rl c
- rl b
- dec e
- jr nz, .asm_1157a2
- jr .asm_1157c3
-
-.asm_1157b4
- ld a, d
- sub $40
- ld d, a
- ld a, $40
- scf
- rl c
- rl b
- dec e
- jr nz, .asm_1157a2
- inc bc
-
-.asm_1157c3
- and a
- sla c
- rl b
- pop hl
- add hl, bc
- ld a, $2
- ld [wStartDay], a
- ret
-
-; 1157d0
-
-Function1157d0: ; 1157d0
- ld hl, $dc05
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [$dc0e]
- ld c, a
- ld a, [Bed]
- ld b, a
- cp h
- jr c, .asm_1157eb
- jr nz, .asm_1157e9
- ld a, c
- cp l
- jr c, .asm_1157eb
- jr z, .asm_1157eb
-
-.asm_1157e9
- ld b, h
- ld c, l
-
-.asm_1157eb
- push bc
- ld a, b
- cpl
- ld b, a
- ld a, c
- cpl
- ld c, a
- inc bc
- add hl, bc
- ld a, l
- ld [$dc05], a
- ld a, h
- ld [$dc06], a
- ld a, h
- or l
- jr nz, .asm_11580f
- pop bc
- ld a, c
- ld [$dc0e], a
- ld a, b
- ld [Bed], a
- ld a, $4
- ld [wStartDay], a
- ret
-
-.asm_11580f
- pop bc
- ld a, c
- ld [$dc0e], a
- ld a, b
- ld [Bed], a
- ld a, $3
- ld [wStartDay], a
- ret
-
-; 11581e
-
-Function11581e: ; 11581e
- ld a, [wStartDay]
- and a
- ret z
- ld a, [$dc0e]
- ld c, a
- ld a, [Bed]
- ld b, a
- ld hl, $dc02
- ld a, [hli]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld hl, $dc24
- push bc
- call Function115d53
- pop bc
- ld hl, $dc02
- ld a, [$dc00]
- ld [hli], a
- ld [hl], e
- inc hl
- ld [hl], d
- ld hl, $dc24
- ld de, PartyMon5Defense
- call Function1158c2
- ld hl, PartyMon5Defense
- ld c, [hl]
- inc hl
- ld b, [hl]
- inc hl
- push hl
- ld a, [wCurrMapCallbackCount]
- ld l, a
- ld a, [wCurrMapCallbackHeaderPointer]
- ld h, a
- cp b
- jr c, .asm_1158bb
- jr nz, .asm_11586e
- ld a, l
- cp c
- jr c, .asm_1158bb
-
-.asm_11586e
- push bc
- ld a, b
- cpl
- ld b, a
- ld a, c
- cpl
- ld c, a
- inc bc
- add hl, bc
- ld a, l
- ld [wCurrMapCallbackCount], a
- ld a, h
- ld [wCurrMapCallbackHeaderPointer], a
- pop bc
- pop hl
- ld hl, wCurrMapTriggerCount
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld hl, PartyMon5Speed
- call Function115d6a
- ld hl, wCurrMapTriggerCount
- ld a, [wCurrentMapSignpostCount]
- ld [hli], a
- ld a, e
- ld [hli], a
- ld [hl], d
- ld a, [wStartDay]
- cp $3
- jr z, .asm_1158b4
- cp $4
- jr z, .asm_1158ad
- jr .asm_1158bc
-
-.asm_1158ad
- ld a, $5
- ld [wStartDay], a
- jr .asm_1158b9
-
-.asm_1158b4
- ld a, $2
- ld [wStartDay], a
-
-.asm_1158b9
- xor a
- ret
-
-.asm_1158bb
- pop hl
-
-.asm_1158bc
- ld a, $ff
- ld [wStartDay], a
- ret
-
-; 1158c2
-
-Function1158c2: ; 1158c2
- ld a, e
- ld [SwarmFlags], a
- ld a, d
- ld [$dc21], a
- xor a
- ld [$dc22], a
- xor a
- ld [de], a
- inc de
- ld [de], a
- inc de
- ld a, c
- ld [$dc19], a
- ld a, b
- ld [$dc1a], a
- ld c, e
- ld b, d
- ld e, l
- ld d, h
- ld l, c
- ld h, b
- xor a
- ld [WeeklyFlags], a
-
-.asm_1158e5
- ld b, $3
- push hl
- ld hl, $dc1b
-.asm_1158eb
- ld a, [de]
- inc de
- ld [hli], a
- dec b
- jr nz, .asm_1158eb
- ld a, [$dc19]
- ld c, a
- ld a, [$dc1a]
- ld b, a
- xor a
- or b
- jr nz, .asm_115914
- ld a, $2
- cp c
- jr c, .asm_115914
- push hl
- dec hl
- ld a, c
- ld [WeeklyFlags], a
-.asm_115908
- xor a
- ld [hld], a
- inc c
- ld a, $3
- cp c
- jr nz, .asm_115908
- pop hl
- ld bc, $0003
-
-.asm_115914
- dec bc
- dec bc
- dec bc
- ld a, c
- ld [$dc19], a
- ld a, b
- ld [$dc1a], a
- push de
- push hl
- ld hl, SwarmFlags
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld e, [hl]
- inc hl
- ld d, [hl]
-rept 4
- inc de
-endr
- ld [hl], d
- dec hl
- ld [hl], e
- pop hl
- dec hl
- ld c, [hl]
- dec hl
- ld b, [hl]
- dec hl
- ld a, [hl]
- ld d, a
- srl a
- srl a
- ld [hli], a
- ld a, $3
- and d
- ld d, a
- ld a, $f0
- and b
- or d
- swap a
- ld [hli], a
- ld a, $f
- and b
- ld d, a
- ld a, c
- and $c0
- or d
- rlca
- rlca
- ld [hli], a
- ld a, $3f
- and c
- ld [hld], a
- dec hl
- dec hl
- pop de
- ld b, h
- ld c, l
- pop hl
- ld a, [bc]
- inc bc
- call Function1159dc
- ld [hli], a
- ld a, [bc]
- inc bc
- call Function1159dc
- ld [hli], a
- ld a, [bc]
- inc bc
- call Function1159dc
- ld [hli], a
- ld a, [bc]
- inc bc
- call Function1159dc
- ld [hli], a
- ld a, [$dc22]
- inc a
- cp $10
- jr nz, .asm_1159b1
- push af
- push bc
- ld a, [$dc19]
- ld b, a
- ld a, [$dc1a]
- or b
- jr nz, .asm_115998
- ld a, [$dc05]
- ld b, a
- ld a, [$dc06]
- or b
- jr nz, .asm_115998
- pop bc
- pop af
- jr .asm_1159c4
-
-.asm_115998
- pop bc
- pop af
- ld a, $d
- ld [hli], a
- ld a, $a
- ld [hli], a
- push hl
- ld hl, SwarmFlags
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [hli]
- ld c, a
- ld b, [hl]
- inc bc
- inc bc
- ld a, b
- ld [hld], a
- ld [hl], c
- pop hl
- xor a
-
-.asm_1159b1
- ld [$dc22], a
- ld a, [$dc19]
- cp $0
- jp nz, .asm_1158e5
- ld a, [$dc1a]
- cp $0
- jp nz, .asm_1158e5
-
-.asm_1159c4
- ld a, [WeeklyFlags]
- cp $0
- jr z, .asm_1159d8
- push hl
- dec hl
- ld b, a
-.asm_1159ce
- ld a, $3d
- ld [hld], a
- inc b
- ld a, $3
- cp b
- jr nz, .asm_1159ce
- pop hl
-
-.asm_1159d8
- ld a, $0
- ld [hl], a
- ret
-
-; 1159dc
-
-Function1159dc: ; 1159dc
- cp $1a
- jr c, .asm_1159ef
- cp $34
- jr c, .asm_1159f2
- cp $3e
- jr c, .asm_1159f5
- cp $3e
- jr z, .asm_1159f8
- ld a, $2f
- ret
-
-.asm_1159ef
- add $41
- ret
-
-.asm_1159f2
- add $47
- ret
-
-.asm_1159f5
- sub $4
- ret
-
-.asm_1159f8
- ld a, $2b
- ret
-
-; 1159fb
-
-Function1159fb: ; 1159fb
- ld a, [wStartDay]
- and a
- jp z, Function11425c
- cp $2
- jr z, .asm_115a29
- cp $3
- jr z, .asm_115a2c
- cp $4
- jr z, .asm_115a2c
- cp $5
- jr z, .asm_115a45
- cp $ff
- jr z, .asm_115a5a
- cp $1
- jp nz, Function11425c
- call Function115732
- call Function115a5f
- ld a, h
- ld [Plant], a
- ld a, l
- ld [Poster], a
-
-.asm_115a29
- call Function115ab0
-
-.asm_115a2c
- call Function115b00
- and a
- jr nz, .asm_115a5a
- ld a, [wStartDay]
- cp $5
- jr z, .asm_115a45
- ld a, [Poster]
- ld h, a
- ld a, [Plant]
- ld l, a
- xor a
- jp Function11425c
-
-.asm_115a45
- ld hl, wCurrMapCallbackCount
- ld a, [hli]
- cpl
- ld e, a
- ld a, [hli]
- cpl
- ld d, a
- inc de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- add hl, de
- xor a
- ld [wStartDay], a
- jp Function11425c
-
-.asm_115a5a
- ld a, $1
- jp Function11425c
-
-; 115a5f
-
-Function115a5f: ; 115a5f
- ld hl, $dc05
- ld a, [hli]
- ld h, [hl]
- ld l, a
- push hl
- ld e, $10
- ld b, $0
- ld c, b
- ld d, b
- ld a, $42
-.asm_115a6e
- rl l
- rl h
- rl d
- cp d
- jr c, .asm_115a80
- rl c
- rl b
- dec e
- jr nz, .asm_115a6e
- jr .asm_115a8e
-
-.asm_115a80
- ld a, d
- sub $42
- ld d, a
- ld a, $42
- scf
- rl c
- rl b
- dec e
- jr nz, .asm_115a6e
-
-.asm_115a8e
- sla c
- rl b
- pop hl
- ld a, b
- cpl
- ld b, a
- ld a, c
- cpl
- ld c, a
- inc bc
- add hl, bc
- srl h
- rr l
- srl h
- rr l
- ld b, h
- ld c, l
- sla c
- rl b
- add hl, bc
- ld a, $2
- ld [wStartDay], a
- ret
-
-; 115ab0
-
-Function115ab0: ; 115ab0
- ld hl, $dc05
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [$dc0e]
- ld c, a
- ld a, [Bed]
- ld b, a
- cp h
- jr c, .asm_115acb
- jr nz, .asm_115ac9
- ld a, c
- cp l
- jr c, .asm_115acb
- jr z, .asm_115acb
-
-.asm_115ac9
- ld b, h
- ld c, l
-
-.asm_115acb
- push bc
- ld a, b
- cpl
- ld b, a
- ld a, c
- cpl
- ld c, a
- inc bc
- add hl, bc
- ld a, l
- ld [$dc05], a
- ld a, h
- ld [$dc06], a
- ld a, h
- or l
- jr nz, .asm_115af0
- pop bc
- ld a, c
- ld [$dc0e], a
- ld a, b
- ld [Bed], a
- ld a, $4
- ld [wStartDay], a
- xor a
- ret
-
-.asm_115af0
- pop bc
- ld a, c
- ld [$dc0e], a
- ld a, b
- ld [Bed], a
- ld a, $3
- ld [wStartDay], a
- xor a
- ret
-
-; 115b00
-
-Function115b00: ; 115b00
- ld a, [wStartDay]
- and a
- ret z
- ld a, [$dc0e]
- ld c, a
- ld a, [Bed]
- ld b, a
- ld hl, $dc02
- ld a, [hli]
- ld [$dc00], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld hl, PartyMon5Defense
- push bc
- call Function115bc8
- pop hl
- and a
- jr z, .asm_115b43
- cp $2
- jr z, .asm_115b3b
- ld a, [wStartDay]
- cp $4
- jr z, .asm_115b43
- inc hl
- inc hl
- jr .asm_115b43
-
-.asm_115b36
- pop hl
- ld b, $83
- jr .asm_115b3d
-
-.asm_115b3b
- ld b, $81
-
-.asm_115b3d
- ld a, $ff
- ld [wStartDay], a
- ret
-
-.asm_115b43
- ld a, [Carpet]
- add a
- cpl
- ld c, a
- ld b, $ff
- inc bc
- add hl, bc
- ld b, h
- ld c, l
- ld hl, $dc02
- ld a, [$dc00]
- ld [hli], a
- ld [hl], e
- inc hl
- ld [hl], d
- ld hl, PartyMon5Defense
- ld de, $dc24
- call Function115c49
- ld hl, $dc24
- ld c, [hl]
- inc hl
- ld b, [hl]
- inc hl
- push hl
- ld a, [wCurrMapCallbackCount]
- ld l, a
- ld a, [wCurrMapCallbackHeaderPointer]
- ld h, a
- cp b
- jr c, .asm_115b36
- jr nz, .asm_115b7b
- ld a, l
- cp c
- jr c, .asm_115b36
-
-.asm_115b7b
- push bc
- ld a, b
- cpl
- ld b, a
- ld a, c
- cpl
- ld c, a
- inc bc
- add hl, bc
- ld a, l
- ld [wCurrMapCallbackCount], a
- ld a, h
- ld [wCurrMapCallbackHeaderPointer], a
- pop bc
- pop hl
- ld hl, wCurrMapTriggerCount
- ld a, [hli]
- ld [wCurrentMapSignpostCount], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld hl, $dc26
- call Function115d6a
- ld hl, wCurrMapTriggerCount
- ld a, [wCurrentMapSignpostCount]
- ld [hli], a
- ld a, e
- ld [hli], a
- ld [hl], d
- ld a, [wStartDay]
- cp $3
- jr z, .asm_115bc1
- cp $4
- jr z, .asm_115bba
- jr .asm_115b3b
-
-.asm_115bba
- ld a, $5
- ld [wStartDay], a
- jr .asm_115bc6
-
-.asm_115bc1
- ld a, $2
- ld [wStartDay], a
-
-.asm_115bc6
- xor a
- ret
-
-; 115bc8
-
-Function115bc8: ; 115bc8
- xor a
- ld [Carpet], a
-.asm_115bcc
- ld a, [de]
- ld [hli], a
- inc e
- call z, .Function115c3d
- dec bc
- ld a, b
- or c
- jr z, .asm_115c46
- ld a, [de]
- ld [hli], a
- inc e
- call z, .Function115c3d
- dec bc
- ld a, b
- or c
- jr z, .asm_115c1b
- ld a, [de]
- ld [hli], a
- inc e
- call z, .Function115c3d
- dec bc
- ld a, b
- or c
- jr z, .asm_115c46
- ld a, [de]
- ld [hli], a
- inc e
- call z, .Function115c3d
- dec bc
- ld a, b
- or c
- jr z, .asm_115c3a
- ld a, [de]
- cp $d
- jr nz, .asm_115bcc
- inc e
- call z, .Function115c3d
- ld a, [de]
- cp $a
- jr nz, .asm_115c46
- inc e
- call z, .Function115c3d
- dec bc
- ld a, b
- or c
- jr z, .asm_115c46
- ld a, [Carpet]
- inc a
- ld [Carpet], a
- dec bc
- ld a, b
- or c
- jr nz, .asm_115bcc
-
-.asm_115c1b
- ld a, [wStartDay]
- cp $4
- jr z, .asm_115c33
- ld a, [de]
- ld [hli], a
- inc e
- call z, .Function115c3d
- ld a, [de]
- ld [hli], a
- inc e
- call z, .Function115c3d
- xor a
- ld [hl], a
- ld a, $1
- ret
-
-.asm_115c33
- dec hl
- dec hl
- xor a
- ld [hl], a
- ld a, $1
- ret
-
-.asm_115c3a
- xor a
- ld [hl], a
- ret
-
-.Function115c3d:
- push bc
- ld bc, $dc00
- call Function115d80
- pop bc
- ret
-
-.asm_115c46
- ld a, $2
- ret
-
-; 115c49
-
-Function115c49: ; 115c49
- ld a, e
- ld [WeeklyFlags], a
- ld a, d
- ld [SwarmFlags], a
- xor a
- ld [de], a
- inc de
- ld [de], a
- inc de
-
- ld a, c
- ld [$dc19], a
- ld a, b
- ld [$dc1a], a
- ld c, e
- ld b, d
- ld e, l
- ld d, h
- ld l, c
- ld h, b
-
-.asm_115c64
- ld a, [$dc1a]
- or a
- jr nz, .asm_115c71
- ld a, [$dc19]
- cp $4
- jr c, .asm_115c99
-
-.asm_115c71
- ld b, $4
- push hl
- ld hl, $dc1b
-.asm_115c77
- ld a, [de]
- inc de
- call Function115cfd
- ld [hli], a
- dec b
- jr nz, .asm_115c77
- ld a, [$dc19]
- ld c, a
- ld a, [$dc1a]
- ld b, a
-rept 4
- dec bc
-endr
-.asm_115c8c
- ld a, [de]
- cp $d
- jr z, .asm_115c95
- cp $a
- jr nz, .asm_115c9f
-
-.asm_115c95
- inc de
- dec bc
- jr .asm_115c8c
-
-.asm_115c99
- ld a, $ff
- ld [wStartDay], a
- ret
-
-.asm_115c9f
- ld a, c
- ld [$dc19], a
- ld a, b
- ld [$dc1a], a
- push de
- push hl
- ld hl, WeeklyFlags
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld e, [hl]
- inc hl
- ld d, [hl]
- inc de
- inc de
- inc de
- ld [hl], d
- dec hl
- ld [hl], e
- pop hl
- dec hl
- ld d, [hl]
- dec hl
- ld c, [hl]
- dec hl
- ld b, [hl]
- dec hl
- ld a, [hl]
- sla b
- sla b
- sla b
- rla
- sla b
- rla
- ld [hli], a
- ld [hl], b
- inc hl
- rrc c
- rrc c
- ld [hl], c
- dec hl
- ld a, $f
- and c
- or [hl]
- ld [hli], a
- ld a, [hli]
- and $c0
- or [hl]
- dec hl
- ld [hld], a
- dec hl
- pop de
- ld b, h
- ld c, l
- pop hl
- ld a, [bc]
- ld [hli], a
- inc bc
- ld a, [bc]
- ld [hli], a
- inc bc
- ld a, [bc]
- ld [hli], a
- ld a, [$dc19]
- cp $0
- jp nz, .asm_115c64
- ld a, [$dc1a]
- cp $0
- jp nz, .asm_115c64
- ret
-
-; 115cfd
-
-Function115cfd: ; 115cfd
- cp $2b
- jr c, .asm_115d27
- jr z, .asm_115d2f
- cp $2f
- jr c, .asm_115d27
- jr z, .asm_115d32
- cp $30
- jr c, .asm_115d27
- cp $3a
- jr c, .asm_115d35
- cp $3d
- jr c, .asm_115d27
- jr z, .asm_115d38
- cp $41
- jr c, .asm_115d27
- cp $5b
- jr c, .asm_115d4d
- cp $61
- jr c, .asm_115d27
- cp $7b
- jr c, .asm_115d50
-
-.asm_115d27
- pop hl
- pop hl
- ld a, $ff
- ld [wStartDay], a
- ret
-
-.asm_115d2f
- ld a, $3e
- ret
-
-.asm_115d32
- ld a, $3f
- ret
-
-.asm_115d35
- add $4
- ret
-
-.asm_115d38
- push de
- push hl
- ld a, [WeeklyFlags]
- ld l, a
- ld a, [SwarmFlags]
- ld h, a
- ld e, [hl]
- inc hl
- ld d, [hl]
- dec de
- ld [hl], d
- dec hl
- ld [hl], e
- pop hl
- pop de
- xor a
- ret
-
-.asm_115d4d
- sub $41
- ret
-
-.asm_115d50
- sub $47
- ret
-
-; 115d53
-
-Function115d53: ; 115d53
-.asm_115d53
- ld a, [de]
- ld [hli], a
- inc e
- call z, Function115d61
- dec bc
- ld a, b
- or c
- jr nz, .asm_115d53
- xor a
- ld [hl], a
- ret
-
-; 115d61
-
-Function115d61: ; 115d61
- push bc
- ld bc, $dc00
- call Function115d80
- pop bc
- ret
-
-; 115d6a
-
-Function115d6a: ; 115d6a
-.asm_115d6a
- ld a, [hli]
- ld [de], a
- inc e
- call z, Function115d77
- dec bc
- ld a, b
- or c
- jr nz, .asm_115d6a
- xor a
- ret
-
-; 115d77
-
-Function115d77: ; 115d77
- push bc
- ld bc, wCurrentMapSignpostCount
- call Function115d80
- pop bc
- ret
-
-; 115d80
-
-Function115d80: ; 115d80
- ld e, a
- ld a, d
- cp $bf
- jr z, .asm_115d8b
- inc d
- ld a, e
- ld e, $0
- ret
-
-.asm_115d8b
- ld a, [bc]
- inc a
- ld [bc], a
- ld [hFF8C], a
- ld [MBC3SRamBank], a
- ld a, e
- ld d, $a0
- ld e, $0
- ret
-
-; 115d99
-
-INCLUDE "misc/mobile_45_sprite_engine.asm"
-
-; 116567
-
-Function116567: ; 116567
- ld hl, wc3f7
- dec [hl]
- ret nz
- ld hl, wc3f6
- inc [hl]
-.asm_116570
- ld a, $7
- sla a
- ld c, a
- ld b, 0
- ld hl, Unknown_1167eb
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- push de
- pop hl
- ld a, [wc3f6]
- sla a
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [hli]
- cp $fe
- jr nz, .asm_116595
- xor a
- ld [wc3f6], a
- jr .asm_116570
-
-.asm_116595
- ld [wc3f5], a
- ld a, [hl]
- ld [wc3f7], a
- ret
-
-; 11659d
-
-Function11659d: ; 11659d
- ld a, [wc314]
- cp $12
- ret nc
- ld e, a
- ld d, 0
- ld hl, Jumptable_1165af
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-; 1165af
-
-Jumptable_1165af: ; 1165af
- dw Function11677e
- dw Function1165d5
- dw Function1165d8
- dw Function1165e3
- dw Function1165f5
- dw Function116600
- dw Function116615
- dw Function116618
- dw Function116623
- dw Function116635
- dw Function116640
- dw Function116655
- dw Function11665c
- dw Function11668d
- dw Function11669f
- dw Function1166a2
- dw Function1166c4
- dw Function1166d6
- dw Function1166d6
-; 1165d5
-
-Function1165d5: ; 1165d5
- call Function11678e
-
-Function1165d8:
- ld a, $0
- ld c, a
- ld a, $ff
- ld b, a
- ld a, $a8
- call Function1166f4
-
-Function1165e3:
- call Function116747
- ld a, [wc30e]
- cp $e8
- ret nz
- ld a, $1
- call Function116780
- ret c
- jp Function116797
-
-; 1165f5
-
-Function1165f5: ; 1165f5
- ld a, $1
- ld c, a
- ld a, $1
- ld b, a
- ld a, $e8
- call Function1166f4
-
-Function116600:
- call Function116747
- ld a, [wc30e]
- cp $a8
- ret nz
- ld a, $1
- call Function116780
- ret c
- ld a, $2
- ld [wc314], a
- ret
-
-; 116615
-
-Function116615: ; 116615
- call Function11678e
-
-Function116618:
- ld a, $3
- ld c, a
- ld a, $1
- ld b, a
- ld a, $28
- call Function11671f
-
-Function116623:
- call Function116747
- ld a, [wc30f]
- cp $a0
- ret nz
- ld a, $6
- call Function116780
- ret c
- jp Function116797
-
-; 116635
-
-Function116635: ; 116635
- ld a, $2
- ld c, a
- ld a, $ff
- ld b, a
- ld a, $a0
- call Function11671f
-
-Function116640:
- call Function116747
- ld a, [wc30f]
- cp $28
- ret nz
- ld a, $6
- call Function116780
- ret c
- ld a, $7
- ld [wc314], a
- ret
-
-; 116655
-
-Function116655: ; 116655
- xor a
- ld [wc314 + 3], a
- call Function11678e
-
-Function11665c:
- ld hl, wc314 + 3
- ld a, $1
- xor [hl]
- ld [hl], a
- add $4
- ld c, a
- call Function11679c
- ld a, [wc314 + 3]
- and a
- jr nz, .asm_116673
- ld a, $48
- jr .asm_116675
-
-.asm_116673
- ld a, $78
-
-.asm_116675
- ld [wc30f], a
- call Random
- ld a, [hRandomAdd]
- and $7
- sla a
- sla a
- sla a
- add $30
- ld [wc30e], a
- call Function116797
-
-Function11668d:
- ld a, [wc311]
- cp $ff
- ret nz
- ld a, $b
- call Function116780
- ret c
- ld a, $c
- ld [wc314], a
- ret
-
-; 11669f
-
-Function11669f: ; 11669f
- call Function11678e
-
-Function1166a2:
- ld a, $a8
- ld [wc30e], a
- ld [wc3f1], a
- ld a, $60
- ld [wc30f], a
- ld [wc3f3], a
- ld a, $ff
- ld [wc314 + 2], a
- xor a
- ld [wc314 + 3], a
- ld a, $0
- ld c, a
- call Function11679c
- call Function116797
-
-Function1166c4:
- call Function116747
- ld a, [wc30e]
- cp $58
- ret nz
- ld a, $6
- ld c, a
- call Function11679c
- call Function116797
-
-Function1166d6:
- call Function116747
- ld a, [wc30e]
- cp $48
- jr nz, .asm_1166e4
- xor a
- ld [wc314 + 2], a
-
-.asm_1166e4
- ld a, [wc311]
- cp $ff
- ret nz
- ld a, $4
- ld [$c319], a
- xor a
- ld [wc314], a
- ret
-
-; 1166f4
-
-Function1166f4: ; 1166f4
- ld [wc30e], a
- ld a, b
- ld [wc314 + 2], a
- xor a
- ld [wc314 + 3], a
- ld hl, wc30f
-.asm_116702
- call Random
- ld a, [hRandomAdd]
- and $7
- jr z, .asm_11670c
- dec a
-
-.asm_11670c
- sla a
- sla a
- sla a
- add $48
- cp [hl]
- jr z, .asm_116702
- ld [hl], a
- call Function11679c
- call Function116797
- ret
-
-; 11671f
-
-Function11671f: ; 11671f
- ld [wc30f], a
- ld a, b
- ld [wc314 + 3], a
- xor a
- ld [wc314 + 2], a
- ld hl, wc30e
-.asm_11672d
- call Random
- ld a, [hRandomAdd]
- and $7
- sla a
- sla a
- sla a
- add $30
- cp [hl]
- jr z, .asm_11672d
- ld [hl], a
- call Function11679c
- call Function116797
- ret
-
-; 116747
-
-Function116747: ; 116747
- ld hl, wc30e
- ld a, [wc314 + 2]
- add [hl]
- ld [hl], a
- ld hl, wc30f
- ld a, [wc314 + 3]
- add [hl]
- ld [hl], a
- ret
-
-; 116758
-
-Function116758: ; 116758
- ld a, [wc30f]
- cp $30
- jr c, .asm_116770
- jr z, .asm_116770
- cp $38
- jr c, .asm_116774
- jr z, .asm_116774
- cp $40
- jr c, .asm_116778
- jr z, .asm_116778
- xor a
- jr .asm_11677a
-
-.asm_116770
- ld a, $c
- jr .asm_11677a
-
-.asm_116774
- ld a, $8
- jr .asm_11677a
-
-.asm_116778
- ld a, $4
-
-.asm_11677a
- ld [wc314 + 4], a
- ret
-
-; 11677e
-
-Function11677e: ; 11677e
- ld a, $0
-
-Function116780:
- ld hl, wc314 + 1
- cp [hl]
- jr z, .asm_11678c
- ld a, [hl]
- ld [wc314], a
- scf
- ret
-
-.asm_11678c
- and a
- ret
-
-; 11678e
-
-Function11678e: ; 11678e
- ld hl, wc314
- ld a, [hl]
- ld [wc314 + 1], a
- inc [hl]
- ret
-
-; 116797
-
-Function116797: ; 116797
- ld hl, wc314
- inc [hl]
- ret
-
-; 11679c
-
-Function11679c:
- ld a, c
- ld [wc311], a
- xor a
- ld [wc312], a
- jr asm_1167af
-
-Function1167a6: ; 1167a6
- ld hl, wc313
- dec [hl]
- ret nz
- ld hl, wc312
- inc [hl]
-
-asm_1167af
-.asm_1167af
- ld a, [wc311]
- cp $ff
- ret z
- sla a
- ld c, a
- ld b, 0
- ld hl, Unknown_1167eb
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- push de
- pop hl
- ld a, [wc312]
- sla a
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [hli]
- cp $ff
- jr z, .asm_1167dc
- cp $fe
- jr nz, .asm_1167e3
- xor a
- ld [wc312], a
- jr .asm_1167af
-
-.asm_1167dc
- ld a, $ff
- ld [wc311], a
- ld a, $fd
-
-.asm_1167e3
- ld [wc310], a
- ld a, [hl]
- ld [wc313], a
- ret
-
-; 1167eb
-
-Unknown_1167eb:
- dw Unknown_1167fb
- dw Unknown_116808
- dw Unknown_116867
- dw Unknown_116870
- dw Unknown_116815
- dw Unknown_11683e
- dw Unknown_116881
- dw Unknown_1168ae
-
-Unknown_1167fb: ; 1167fb
- db $0, $6
- db $1, $4
- db $2, $4
- db $3, $6
- db $2, $4
- db $1, $4
- db $fe
-
-Unknown_116808: ; 116808
- db $4, $6
- db $5, $4
- db $6, $4
- db $7, $6
- db $6, $4
- db $5, $4
- db $fe
-
-Unknown_116815: ; 116815
- db $fd, $20
- db $8, $c
- db $9, $24
- db $a, $4
- db $b, $8
- db $a, $4
- db $9, $6
- db $c, $4
- db $d, $8
- db $c, $5
- db $9, $24
- db $a, $4
- db $b, $8
- db $a, $4
- db $9, $6
- db $c, $4
- db $d, $8
- db $c, $5
- db $9, $8
- db $8, $4
- db $ff
-
-Unknown_11683e: ; 11683e
- db $fd, $20
- db $e, $c
- db $f, $24
- db $10, $4
- db $11, $8
- db $10, $4
- db $f, $6
- db $12, $4
- db $13, $8
- db $12, $5
- db $f, $24
- db $10, $4
- db $11, $8
- db $10, $4
- db $f, $6
- db $12, $4
- db $13, $8
- db $12, $5
- db $f, $8
- db $e, $4
- db $ff
-
-Unknown_116867: ; 116867
- db $14, $8
- db $15, $8
- db $16, $8
- db $15, $8
- db $fe
-
-Unknown_116870: ; 116870
- db $17, $5
- db $18, $5
- db $19, $5
- db $1a, $5
- db $1b, $5
- db $1a, $5
- db $19, $5
- db $18, $5
- db $fe
-
-Unknown_116881: ; 116881
- db $1c, $7
- db $1d, $7
- db $1e, $a
- db $1f, $a
- db $20, $5
- db $21, $5
- db $20, $5
- db $21, $5
- db $20, $18
- db $22, $4
- db $23, $2
- db $22, $2
- db $23, $2
- db $22, $1
- db $23, $1
- db $22, $1
- db $23, $4
- db $fd, $1
- db $23, $1
- db $fd, $2
- db $23, $2
- db $fd, $40
- db $ff
-
-Unknown_1168ae: ; 1168ae
- db $24, $4
- db $25, $4
- db $26, $4
- db $27, $4
- db $28, $4
- db $29, $4
- db $2a, $4
- db $2b, $4
- db $2c, $4
- db $2d, $4
- db $2e, $4
- db $fe
-; 1168c5
-
-Unknown_1168c5:
- dw Unknown_116923
- dw Unknown_116960
- dw Unknown_1169a1
- dw Unknown_1169de
- dw Unknown_116a1b
- dw Unknown_116a58
- dw Unknown_116a99
- dw Unknown_116ad6
- dw Unknown_116d1b
- dw Unknown_116d4c
- dw Unknown_116d85
- dw Unknown_116dbe
- dw Unknown_116df7
- dw Unknown_116e30
- dw Unknown_116e69
- dw Unknown_116e9a
- dw Unknown_116ed3
- dw Unknown_116f0c
- dw Unknown_116f45
- dw Unknown_116f7e
- dw Unknown_116b13
- dw Unknown_116b54
- dw Unknown_116b95
- dw Unknown_116bd6
- dw Unknown_116c17
- dw Unknown_116c58
- dw Unknown_116c99
- dw Unknown_116cda
- dw Unknown_116fb7
- dw Unknown_116fec
- dw Unknown_117025
- dw Unknown_117056
- dw Unknown_117083
- dw Unknown_1170c0
- dw Unknown_1170fd
- dw Unknown_11713a
- dw Unknown_117177
- dw Unknown_11719c
- dw Unknown_1171c1
- dw Unknown_1171e6
- dw Unknown_11720b
- dw Unknown_117230
- dw Unknown_117255
- dw Unknown_11727a
- dw Unknown_11729f
- dw Unknown_1172c4
- dw Unknown_1172e9
-
-Unknown_116923: ; 116923
- db $f
- db $0, $0, $1, $a
- db $0, $8, $2, $d
- db $0, $10, $3, $d
- db $0, $18, $4, $d
- db $8, $0, $11, $a
- db $8, $8, $12, $a
- db $8, $10, $13, $a
- db $8, $18, $14, $d
- db $10, $0, $21, $a
- db $10, $8, $22, $a
- db $10, $10, $23, $a
- db $10, $18, $24, $a
- db $18, $0, $31, $a
- db $18, $8, $32, $a
- db $18, $10, $33, $a
-
-Unknown_116960: ; 116960
- db $10
- db $1, $0, $1, $a
- db $1, $8, $2, $d
- db $1, $10, $3, $d
- db $1, $18, $4, $d
- db $9, $0, $11, $a
- db $9, $8, $12, $a
- db $9, $10, $13, $a
- db $9, $18, $14, $d
- db $11, $0, $5, $a
- db $11, $8, $6, $a
- db $11, $10, $7, $a
- db $11, $18, $34, $a
- db $19, $0, $15, $a
- db $19, $8, $16, $a
- db $19, $10, $17, $a
- db $19, $18, $35, $a
-
-Unknown_1169a1: ; 1169a1
- db $f
- db $1, $0, $1, $a
- db $1, $8, $2, $d
- db $1, $10, $3, $d
- db $1, $18, $4, $d
- db $9, $0, $11, $a
- db $9, $8, $12, $a
- db $9, $10, $13, $a
- db $9, $18, $14, $d
- db $11, $0, $25, $a
- db $11, $8, $26, $a
- db $11, $10, $27, $a
- db $11, $18, $34, $a
- db $19, $8, $36, $a
- db $19, $10, $37, $a
- db $19, $18, $35, $a
-
-Unknown_1169de: ; 1169de
- db $f
- db $0, $0, $1, $a
- db $0, $8, $2, $d
- db $0, $10, $3, $d
- db $0, $18, $4, $d
- db $8, $0, $11, $a
- db $8, $8, $12, $a
- db $8, $10, $13, $a
- db $8, $18, $14, $d
- db $10, $0, $10, $a
- db $10, $8, $20, $a
- db $10, $10, $30, $a
- db $10, $18, $24, $a
- db $18, $0, $31, $a
- db $18, $8, $32, $a
- db $18, $10, $33, $a
-
-Unknown_116a1b: ; 116a1b
- db $f
- db $0, $0, $4, $2d
- db $0, $8, $3, $2d
- db $0, $10, $2, $2d
- db $0, $18, $1, $2a
- db $8, $0, $14, $2d
- db $8, $8, $13, $2a
- db $8, $10, $12, $2a
- db $8, $18, $11, $2a
- db $10, $0, $24, $2a
- db $10, $8, $23, $2a
- db $10, $10, $22, $2a
- db $10, $18, $21, $2a
- db $18, $8, $33, $2a
- db $18, $10, $32, $2a
- db $18, $18, $31, $2a
-
-Unknown_116a58: ; 116a58
- db $10
- db $1, $0, $4, $2d
- db $1, $8, $3, $2d
- db $1, $10, $2, $2d
- db $1, $18, $1, $2a
- db $9, $0, $14, $2d
- db $9, $8, $13, $2a
- db $9, $10, $12, $2a
- db $9, $18, $11, $2a
- db $11, $0, $34, $2a
- db $11, $8, $7, $2a
- db $11, $10, $6, $2a
- db $11, $18, $5, $2a
- db $19, $0, $35, $2a
- db $19, $8, $17, $2a
- db $19, $10, $16, $2a
- db $19, $18, $15, $2a
-
-Unknown_116a99: ; 116a99
- db $f
- db $1, $0, $4, $2d
- db $1, $8, $3, $2d
- db $1, $10, $2, $2d
- db $1, $18, $1, $2a
- db $9, $0, $14, $2d
- db $9, $8, $13, $2a
- db $9, $10, $12, $2a
- db $9, $18, $11, $2a
- db $11, $0, $34, $2a
- db $11, $8, $27, $2a
- db $11, $10, $26, $2a
- db $11, $18, $25, $2a
- db $19, $0, $35, $2a
- db $19, $8, $37, $2a
- db $19, $10, $36, $2a
-
-Unknown_116ad6: ; 116ad6
- db $f
- db $0, $0, $4, $2d
- db $0, $8, $3, $2d
- db $0, $10, $2, $2d
- db $0, $18, $1, $2a
- db $8, $0, $14, $2d
- db $8, $8, $13, $2a
- db $8, $10, $12, $2a
- db $8, $18, $11, $2a
- db $10, $0, $24, $2a
- db $10, $8, $30, $2a
- db $10, $10, $20, $2a
- db $10, $18, $10, $2a
- db $18, $8, $33, $2a
- db $18, $10, $32, $2a
- db $18, $18, $31, $2a
-
-Unknown_116b13: ; 116b13
- db $10
- db $18, $0, $0, $b
- db $18, $8, $8, $b
- db $18, $10, $5c, $b
- db $18, $18, $0, $b
- db $10, $0, $0, $b
- db $10, $8, $5d, $b
- db $10, $10, $5e, $b
- db $10, $18, $0, $b
- db $8, $0, $50, $b
- db $8, $8, $51, $b
- db $8, $10, $52, $b
- db $8, $18, $50, $2b
- db $0, $0, $43, $b
- db $0, $8, $44, $b
- db $0, $10, $44, $2b
- db $0, $18, $43, $2b
-
-Unknown_116b54: ; 116b54
- db $10
- db $19, $0, $0, $b
- db $19, $8, $18, $b
- db $19, $10, $c, $b
- db $19, $18, $0, $b
- db $11, $0, $42, $b
- db $11, $8, $3a, $b
- db $11, $10, $3a, $2b
- db $11, $18, $42, $2b
- db $9, $0, $58, $b
- db $9, $8, $45, $b
- db $9, $10, $45, $2b
- db $9, $18, $58, $2b
- db $1, $0, $d, $b
- db $1, $8, $44, $b
- db $1, $10, $44, $2b
- db $1, $18, $d, $2b
-
-Unknown_116b95: ; 116b95
- db $10
- db $18, $0, $0, $b
- db $18, $8, $5c, $2b
- db $18, $10, $8, $2b
- db $18, $18, $0, $b
- db $10, $0, $0, $b
- db $10, $8, $5e, $2b
- db $10, $10, $5d, $2b
- db $10, $18, $0, $b
- db $8, $0, $50, $b
- db $8, $8, $52, $2b
- db $8, $10, $51, $2b
- db $8, $18, $50, $2b
- db $0, $0, $43, $b
- db $0, $8, $44, $b
- db $0, $10, $44, $2b
- db $0, $18, $43, $2b
-
-Unknown_116bd6: ; 116bd6
- db $10
- db $18, $0, $0, $a
- db $18, $8, $56, $a
- db $18, $10, $57, $a
- db $18, $18, $0, $a
- db $10, $0, $64, $a
- db $10, $8, $4a, $a
- db $10, $10, $4b, $a
- db $10, $18, $71, $a
- db $8, $0, $54, $a
- db $8, $8, $55, $a
- db $8, $10, $55, $2a
- db $8, $18, $54, $2a
- db $0, $0, $48, $a
- db $0, $8, $49, $a
- db $0, $10, $49, $2a
- db $0, $18, $48, $2a
-
-Unknown_116c17: ; 116c17
- db $10
- db $19, $0, $0, $a
- db $19, $8, $76, $a
- db $19, $10, $77, $a
- db $19, $18, $0, $a
- db $11, $0, $64, $a
- db $11, $8, $69, $a
- db $11, $10, $6a, $a
- db $11, $18, $6b, $a
- db $9, $0, $6f, $a
- db $9, $8, $70, $a
- db $9, $10, $70, $2a
- db $9, $18, $6f, $2a
- db $1, $0, $63, $a
- db $1, $8, $19, $a
- db $1, $10, $19, $2a
- db $1, $18, $63, $2a
-
-Unknown_116c58: ; 116c58
- db $10
- db $1a, $0, $6c, $a
- db $1a, $8, $6d, $a
- db $1a, $10, $6e, $a
- db $1a, $18, $0, $a
- db $12, $0, $5f, $a
- db $12, $8, $60, $a
- db $12, $10, $61, $a
- db $12, $18, $62, $a
- db $a, $0, $53, $a
- db $a, $8, $55, $a
- db $a, $10, $55, $2a
- db $a, $18, $53, $2a
- db $2, $0, $46, $a
- db $2, $8, $47, $a
- db $2, $10, $47, $2a
- db $2, $18, $46, $2a
-
-Unknown_116c99: ; 116c99
- db $10
- db $19, $0, $0, $2a
- db $19, $8, $77, $2a
- db $19, $10, $76, $2a
- db $19, $18, $0, $2a
- db $11, $0, $6b, $2a
- db $11, $8, $6a, $2a
- db $11, $10, $69, $2a
- db $11, $18, $64, $2a
- db $9, $0, $6f, $a
- db $9, $8, $70, $a
- db $9, $10, $70, $2a
- db $9, $18, $6f, $2a
- db $1, $0, $63, $a
- db $1, $8, $19, $a
- db $1, $10, $19, $2a
- db $1, $18, $63, $2a
-
-Unknown_116cda: ; 116cda
- db $10
- db $18, $0, $0, $a
- db $18, $8, $57, $2a
- db $18, $10, $56, $2a
- db $18, $18, $0, $a
- db $10, $0, $71, $2a
- db $10, $8, $4b, $2a
- db $10, $10, $4a, $2a
- db $10, $18, $64, $2a
- db $8, $0, $54, $a
- db $8, $8, $55, $a
- db $8, $10, $55, $2a
- db $8, $18, $54, $2a
- db $0, $0, $48, $a
- db $0, $8, $49, $a
- db $0, $10, $49, $2a
- db $0, $18, $48, $2a
-
-Unknown_116d1b: ; 116d1b
- db $c
- db $0, $0, $38, $4a
- db $0, $8, $39, $4a
- db $0, $10, $39, $6a
- db $0, $18, $38, $6a
- db $8, $0, $28, $4a
- db $8, $8, $29, $4a
- db $8, $10, $29, $6a
- db $8, $18, $28, $6a
- db $10, $0, $9, $4d
- db $10, $8, $19, $4a
- db $10, $10, $19, $6a
- db $10, $18, $9, $6d
-
-Unknown_116d4c: ; 116d4c
- db $e
- db $0, $8, $3b, $4a
- db $0, $10, $3b, $6a
- db $8, $0, $2a, $4a
- db $8, $8, $2b, $4a
- db $8, $10, $2b, $6a
- db $8, $18, $2a, $6a
- db $10, $0, $1a, $4a
- db $10, $8, $1b, $4a
- db $10, $10, $1b, $6a
- db $10, $18, $1a, $6a
- db $18, $0, $a, $4a
- db $18, $8, $b, $4a
- db $18, $10, $b, $6a
- db $18, $18, $a, $6a
-
-Unknown_116d85: ; 116d85
- db $e
- db $0, $0, $35, $2a
- db $0, $8, $3c, $4a
- db $0, $10, $3d, $4a
- db $0, $18, $3e, $4a
- db $8, $0, $2c, $4a
- db $8, $8, $2d, $4a
- db $8, $10, $2e, $4a
- db $8, $18, $2f, $4a
- db $10, $0, $1c, $4a
- db $10, $8, $1d, $4a
- db $10, $10, $1e, $4d
- db $10, $18, $1f, $4d
- db $18, $10, $e, $4d
- db $18, $18, $f, $4a
-
-Unknown_116dbe: ; 116dbe
- db $e
- db $0, $0, $65, $4a
- db $0, $8, $66, $4a
- db $0, $10, $67, $4a
- db $0, $18, $68, $4a
- db $8, $8, $59, $4a
- db $8, $10, $5a, $4a
- db $8, $18, $5b, $4a
- db $10, $0, $4c, $4a
- db $10, $8, $4d, $4d
- db $10, $10, $4e, $4d
- db $10, $18, $4f, $4a
- db $18, $0, $3f, $4d
- db $18, $8, $40, $4d
- db $18, $10, $41, $4d
-
-Unknown_116df7: ; 116df7
- db $e
- db $0, $0, $3e, $6a
- db $0, $8, $3d, $6a
- db $0, $10, $3c, $6a
- db $0, $18, $35, $a
- db $8, $0, $2f, $6a
- db $8, $8, $2e, $6a
- db $8, $10, $2d, $6a
- db $8, $18, $2c, $6a
- db $10, $0, $1f, $6d
- db $10, $8, $1e, $6d
- db $10, $10, $1d, $6a
- db $10, $18, $1c, $6a
- db $18, $0, $f, $6a
- db $18, $8, $e, $6d
-
-Unknown_116e30: ; 116e30
- db $e
- db $0, $0, $68, $6a
- db $0, $8, $67, $6a
- db $0, $10, $66, $6a
- db $0, $18, $65, $6a
- db $8, $0, $5b, $6a
- db $8, $8, $5a, $6a
- db $8, $10, $59, $6a
- db $10, $0, $4f, $6a
- db $10, $8, $4e, $6d
- db $10, $10, $4d, $6d
- db $10, $18, $4c, $6a
- db $18, $8, $41, $6d
- db $18, $10, $40, $6d
- db $18, $18, $3f, $6d
-
-Unknown_116e69: ; 116e69
- db $c
- db $8, $0, $9, $d
- db $8, $8, $19, $a
- db $8, $10, $19, $2a
- db $8, $18, $9, $2d
- db $10, $0, $28, $a
- db $10, $8, $29, $a
- db $10, $10, $29, $2a
- db $10, $18, $28, $2a
- db $18, $0, $38, $a
- db $18, $8, $39, $a
- db $18, $10, $39, $2a
- db $18, $18, $38, $2a
-
-Unknown_116e9a: ; 116e9a
- db $e
- db $0, $0, $a, $a
- db $0, $8, $b, $a
- db $0, $10, $b, $2a
- db $0, $18, $a, $2a
- db $8, $0, $1a, $a
- db $8, $8, $1b, $a
- db $8, $10, $1b, $2a
- db $8, $18, $1a, $2a
- db $10, $0, $2a, $a
- db $10, $8, $2b, $a
- db $10, $10, $2b, $2a
- db $10, $18, $2a, $2a
- db $18, $8, $3b, $a
- db $18, $10, $3b, $2a
-
-Unknown_116ed3: ; 116ed3
- db $e
- db $0, $10, $e, $d
- db $0, $18, $f, $a
- db $8, $0, $1c, $a
- db $8, $8, $1d, $a
- db $8, $10, $1e, $d
- db $8, $18, $1f, $d
- db $10, $0, $2c, $a
- db $10, $8, $2d, $a
- db $10, $10, $2e, $a
- db $10, $18, $2f, $a
- db $18, $0, $35, $6a
- db $18, $8, $3c, $a
- db $18, $10, $3d, $a
- db $18, $18, $3e, $a
-
-Unknown_116f0c: ; 116f0c
- db $e
- db $0, $0, $3f, $d
- db $0, $8, $40, $d
- db $0, $10, $41, $d
- db $8, $0, $4c, $a
- db $8, $8, $4d, $d
- db $8, $10, $4e, $d
- db $8, $18, $4f, $a
- db $10, $8, $59, $a
- db $10, $10, $5a, $a
- db $10, $18, $5b, $a
- db $18, $0, $65, $a
- db $18, $8, $66, $a
- db $18, $10, $67, $a
- db $18, $18, $68, $a
-
-Unknown_116f45: ; 116f45
- db $e
- db $0, $0, $f, $2a
- db $0, $8, $e, $2d
- db $8, $0, $1f, $2d
- db $8, $8, $1e, $2d
- db $8, $10, $1d, $2a
- db $8, $18, $1c, $2a
- db $10, $0, $2f, $2a
- db $10, $8, $2e, $2a
- db $10, $10, $2d, $2a
- db $10, $18, $2c, $2a
- db $18, $0, $3e, $2a
- db $18, $8, $3d, $2a
- db $18, $10, $3c, $2a
- db $18, $18, $35, $4a
-
-Unknown_116f7e: ; 116f7e
- db $e
- db $0, $8, $41, $2d
- db $0, $10, $40, $2d
- db $0, $18, $3f, $2d
- db $8, $0, $4f, $2a
- db $8, $8, $4e, $2d
- db $8, $10, $4d, $2d
- db $8, $18, $4c, $2a
- db $10, $0, $5b, $2a
- db $10, $8, $5a, $2a
- db $10, $10, $59, $2a
- db $18, $0, $68, $2a
- db $18, $8, $67, $2a
- db $18, $10, $66, $2a
- db $18, $18, $65, $2a
-
-Unknown_116fb7: ; 116fb7
- db $d
- db $fa, $0, $72, $a
- db $fa, $8, $73, $d
- db $fa, $10, $74, $d
- db $fa, $18, $75, $d
- db $2, $0, $81, $a
- db $2, $8, $82, $a
- db $2, $10, $83, $a
- db $2, $18, $84, $a
- db $a, $0, $91, $a
- db $a, $8, $92, $a
- db $a, $10, $93, $a
- db $a, $18, $94, $a
- db $12, $10, $a3, $a
-
-Unknown_116fec: ; 116fec
- db $e
- db $fd, $0, $85, $d
- db $fd, $8, $86, $d
- db $5, $0, $95, $d
- db $5, $8, $96, $a
- db $5, $10, $97, $a
- db $5, $18, $98, $a
- db $d, $0, $a5, $a
- db $d, $8, $a6, $a
- db $d, $10, $a7, $a
- db $d, $18, $a8, $a
- db $15, $0, $b3, $a
- db $15, $8, $b4, $a
- db $15, $10, $b5, $a
- db $15, $18, $b6, $a
-
-Unknown_117025: ; 117025
- db $c
- db $8, $0, $79, $d
- db $8, $8, $7a, $d
- db $8, $10, $7b, $a
- db $8, $18, $7c, $a
- db $10, $0, $89, $d
- db $10, $8, $8a, $a
- db $10, $10, $8b, $a
- db $10, $18, $8c, $a
- db $18, $0, $99, $a
- db $18, $8, $9a, $a
- db $18, $10, $9b, $a
- db $18, $18, $9c, $a
-
-Unknown_117056: ; 117056
- db $b
- db $8, $0, $7d, $a
- db $8, $8, $7e, $d
- db $8, $10, $7f, $d
- db $8, $18, $80, $a
- db $10, $0, $8d, $a
- db $10, $8, $8e, $a
- db $10, $10, $8f, $a
- db $10, $18, $90, $a
- db $18, $8, $9e, $a
- db $18, $10, $9f, $a
- db $18, $18, $a0, $a
-
-Unknown_117083: ; 117083
- db $f
- db $0, $0, $a1, $a
- db $0, $8, $a2, $a
- db $0, $10, $a2, $2a
- db $0, $18, $a1, $2a
- db $8, $0, $b1, $a
- db $8, $8, $b2, $d
- db $8, $10, $b2, $2d
- db $8, $18, $b1, $2a
- db $10, $0, $ab, $a
- db $10, $8, $ac, $a
- db $10, $10, $ac, $2a
- db $10, $18, $ab, $2a
- db $18, $8, $a4, $a
- db $18, $10, $87, $a
- db $18, $18, $88, $a
-
-Unknown_1170c0: ; 1170c0
- db $f
- db $0, $0, $a1, $a
- db $0, $8, $a2, $d
- db $0, $10, $a2, $2a
- db $0, $18, $a1, $2a
- db $8, $0, $b1, $a
- db $8, $8, $78, $d
- db $8, $10, $78, $2d
- db $8, $18, $b1, $2a
- db $10, $0, $ab, $a
- db $10, $8, $ac, $a
- db $10, $10, $ac, $2a
- db $10, $18, $ab, $2a
- db $18, $8, $a4, $a
- db $18, $10, $87, $a
- db $18, $18, $88, $a
-
-Unknown_1170fd: ; 1170fd
- db $f
- db $0, $0, $a9, $a
- db $0, $8, $aa, $a
- db $0, $10, $aa, $2a
- db $0, $18, $a9, $2a
- db $8, $0, $b7, $a
- db $8, $8, $b8, $a
- db $8, $10, $b8, $2a
- db $8, $18, $b7, $2a
- db $10, $0, $ab, $a
- db $10, $8, $ac, $a
- db $10, $10, $ac, $2a
- db $10, $18, $ad, $a
- db $18, $8, $a4, $a
- db $18, $10, $ba, $a
- db $18, $18, $bb, $a
-
-Unknown_11713a: ; 11713a
- db $f
- db $0, $0, $ae, $c
- db $0, $8, $af, $c
- db $0, $10, $af, $2c
- db $0, $18, $ae, $2c
- db $8, $0, $bc, $c
- db $8, $8, $bd, $c
- db $8, $10, $bd, $2c
- db $8, $18, $bc, $2c
- db $10, $0, $bf, $c
- db $10, $8, $9d, $c
- db $10, $10, $9d, $2c
- db $10, $18, $b0, $c
- db $18, $8, $b9, $c
- db $18, $10, $c0, $c
- db $18, $18, $be, $c
-
-Unknown_117177: ; 117177
- db $9
- db $14, $0, $1f, $6
- db $14, $8, $20, $6
- db $14, $10, $21, $6
- db $c, $0, $10, $6
- db $c, $8, $11, $6
- db $c, $10, $12, $6
- db $4, $0, $1, $6
- db $4, $8, $2, $6
- db $4, $10, $3, $6
-
-Unknown_11719c: ; 11719c
- db $9
- db $14, $0, $22, $6
- db $14, $8, $23, $6
- db $14, $10, $24, $6
- db $c, $0, $13, $6
- db $c, $8, $14, $6
- db $c, $10, $15, $6
- db $4, $0, $4, $6
- db $4, $8, $5, $6
- db $4, $10, $6, $6
-
-Unknown_1171c1: ; 1171c1
- db $9
- db $14, $0, $25, $6
- db $14, $8, $26, $6
- db $14, $10, $27, $6
- db $c, $0, $16, $6
- db $c, $8, $17, $6
- db $c, $10, $18, $6
- db $4, $0, $7, $6
- db $4, $8, $8, $6
- db $4, $10, $9, $6
-
-Unknown_1171e6: ; 1171e6
- db $9
- db $14, $0, $28, $6
- db $14, $8, $29, $6
- db $14, $10, $2a, $6
- db $c, $0, $19, $6
- db $c, $8, $1a, $6
- db $c, $10, $1b, $6
- db $4, $0, $a, $6
- db $4, $8, $b, $6
- db $4, $10, $c, $6
-
-Unknown_11720b: ; 11720b
- db $9
- db $14, $0, $2b, $6
- db $14, $8, $2c, $6
- db $14, $10, $2d, $6
- db $c, $0, $1c, $6
- db $c, $8, $1d, $6
- db $c, $10, $1e, $6
- db $4, $0, $d, $6
- db $4, $8, $e, $6
- db $4, $10, $f, $6
-
-Unknown_117230: ; 117230
- db $9
- db $14, $0, $47, $6
- db $14, $8, $48, $6
- db $14, $10, $49, $6
- db $c, $0, $3b, $6
- db $c, $8, $3c, $6
- db $c, $10, $3b, $26
- db $4, $0, $2e, $6
- db $4, $8, $2f, $6
- db $4, $10, $30, $6
-
-Unknown_117255: ; 117255
- db $9
- db $14, $0, $35, $6
- db $14, $8, $4a, $6
- db $14, $10, $35, $6
- db $c, $0, $3d, $6
- db $c, $8, $35, $6
- db $c, $10, $3d, $26
- db $4, $0, $31, $6
- db $4, $8, $32, $6
- db $4, $10, $31, $26
-
-Unknown_11727a: ; 11727a
- db $9
- db $14, $0, $4b, $6
- db $14, $8, $4c, $6
- db $14, $10, $4d, $6
- db $c, $0, $3e, $6
- db $c, $8, $3f, $6
- db $c, $10, $40, $6
- db $4, $0, $33, $6
- db $4, $8, $34, $6
- db $4, $10, $35, $6
-
-Unknown_11729f: ; 11729f
- db $9
- db $14, $0, $4e, $6
- db $14, $8, $4f, $6
- db $14, $10, $50, $6
- db $c, $0, $41, $6
- db $c, $8, $42, $6
- db $c, $10, $43, $6
- db $4, $0, $35, $6
- db $4, $8, $36, $6
- db $4, $10, $37, $6
-
-Unknown_1172c4: ; 1172c4
- db $9
- db $14, $0, $51, $6
- db $14, $8, $52, $6
- db $14, $10, $35, $6
- db $c, $0, $44, $6
- db $c, $8, $45, $6
- db $c, $10, $46, $6
- db $4, $0, $38, $6
- db $4, $8, $39, $6
- db $4, $10, $3a, $6
-
-Unknown_1172e9: ; 1172e9
- db $9
- db $10, $0, $0, $2
- db $10, $8, $0, $2
- db $10, $10, $0, $2
- db $8, $0, $0, $2
- db $8, $8, $0, $2
- db $c, $10, $1f, $6
- db $0, $0, $0, $2
- db $0, $8, $0, $2
- db $4, $10, $10, $6
-; 11730e
-
-Palette_11730e:
- RGB 31, 31, 31
- RGB 7, 5, 4
- RGB 31, 28, 4
- RGB 31, 5, 5
- RGB 31, 31, 31
- RGB 7, 5, 4
- RGB 31, 23, 0
- RGB 31, 28, 4
- RGB 31, 31, 31
- RGB 16, 19, 31
- RGB 17, 31, 31
- RGB 31, 31, 31
- RGB 5, 5, 5
- RGB 7, 5, 4
- RGB 31, 28, 4
- RGB 19, 11, 6
- RGB 31, 31, 31
- RGB 3, 15, 31
- RGB 4, 25, 25
- RGB 0, 7, 12
- RGB 31, 31, 31
- RGB 0, 16, 0
- RGB 0, 16, 0
- RGB 0, 16, 0
- RGB 4, 11, 22
- RGB 0, 16, 0
- RGB 0, 16, 0
- RGB 0, 16, 0
- RGB 22, 11, 8
- RGB 0, 16, 0
- RGB 0, 16, 0
- RGB 0, 16, 0
-
-Palette_11734e:
- RGB 31, 30, 30
- RGB 2, 0, 0
- RGB 10, 9, 9
- RGB 15, 14, 14
-
-Unknown_117356: ; 117356
- db $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9
- db $c9, $c9, $c9, $c9, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
- db $c5, $c6, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
- db $c2, $c2, $c6, $c5, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
- db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
- db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
- db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
- db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
- db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
- db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
- db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
- db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
- db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
- db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
- db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
- db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
- db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
- db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
- db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $d8, $c2, $c2, $d8, $c2, $c2, $c2
- db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
- db $c7, $c8, $ca, $cb, $cc, $cd, $ce, $c2, $cf, $d0, $d1, $d2, $d3, $c2, $d4, $d5
- db $d6, $d7, $c8, $c7, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
- db $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9
- db $c9, $c9, $c9, $c9, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
-
- db $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f
- db $8f, $8f, $8f, $8f, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
- db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
- db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
- db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
- db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
- db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
- db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
- db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
- db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
- db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
- db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
- db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
- db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
- db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
- db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
- db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
- db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
- db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $8f, $0f, $0f, $8f, $0f, $0f, $0f
- db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
- db $8f, $8f, $8f, $8f, $8f, $8f, $8f, $0f, $8f, $8f, $8f, $8f, $8f, $0f, $8f, $8f
- db $8f, $8f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
- db $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f
- db $8f, $8f, $8f, $8f, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
-; 117656
-
-
-SECTION "Mobile Stadium", ROMX
-
-Special_GiveOddEgg: ; 117656
- callba GiveOddEgg
- ret
-
-; 11765d
-
-Function11765d: ; 11765d (45:765d)
- ld a, [hInMenu]
- push af
- ld a, $1
- ld [hInMenu], a
- call Function11766b
- pop af
- ld [hInMenu], a
- ret
-
-Function11766b: ; 11766b (45:766b)
- call Function117699
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- call Function1176ee
- ld a, $5
- call GetSRAMBank
- ld hl, $b1f3
- ld de, wcd49
- ld bc, $8
- call CopyBytes
- ld de, $c708
- ld bc, $11
- call CopyBytes
- call CloseSRAM
- pop af
- ld [rSVBK], a
- ret
-
-Function117699: ; 117699 (45:7699)
- ld a, $5
- call GetSRAMBank
- ld hl, wcd49
- ld de, $b1f3
- ld bc, $8
- call CopyBytes
- ld hl, $c708
- ld bc, $11
- call CopyBytes
- call CloseSRAM
- xor a
- ld [wcd49], a
- ld [wcd4a], a
- ld [wcd4b], a
- ld [wcd4c], a
- ld [wcd4d], a
- ld [wcd4e], a
- ld [wcd4f], a
- ld hl, $c708
- ld bc, $11
- call ByteFill
- call ClearBGPalettes
- call ClearSprites
- callba Function171c87
- callba ReloadMapPart
- callba ClearSpriteAnims
- ret
-
-Function1176ee: ; 1176ee (45:76ee)
-.loop
- call JoyTextDelay
- ld a, [wcd49]
- bit 7, a
- jr nz, .quit
- call Function117719
- callba PlaySpriteAnimations
- callba ReloadMapPart
- jr .loop
-
-.quit
- callba ClearSpriteAnims
- call ClearBGPalettes
- call ClearScreen
- call ClearSprites
- ret
-
-Function117719: ; 117719 (45:7719)
- ld a, [wcd49]
- ld e, a
- ld d, 0
- ld hl, Jumptable_117728
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-Jumptable_117728: ; 117728 (45:7728)
- dw Function117738
- dw Function117764
- dw Function1178aa
- dw Function1178e8
- dw Function117942
- dw Function117976
- dw Function117984
- dw Function1179a7
-
-
-Function117738: ; 117738 (45:7738)
- callba Function171ccd
- depixel 6, 3
- ld a, $1d
- call _InitSpriteAnimStruct
- ld hl, $c
- add hl, bc
- ld a, $6
- ld [hl], a
- depixel 9, 4
- ld a, $1d
- call _InitSpriteAnimStruct
- ld hl, $c
- add hl, bc
- ld a, $7
- ld [hl], a
- ld a, $3
- ld [wcd23], a
- jp MobilePassword_IncrementJumptable
-
-Function117764: ; 117764 (45:7764)
- ld a, [wcd4a]
- cp $10
- jr nz, .asm_11776f
- ld a, $1
- jr .asm_117770
-
-.asm_11776f
- xor a
-.asm_117770
- ld [wcd24], a
- ld hl, hJoyPressed ; $ffa7
- ld a, [hl]
- and SELECT
- jr nz, Function117764_select
- ld a, [hl]
- and START
- jr nz, Function117764_start
- ld a, [hl]
- and A_BUTTON
- jp nz, Function117764_a_button
- ld a, [hl]
- and B_BUTTON
- jr nz, Function117764_b_button
- ld hl, hJoyLast
- ld a, [hl]
- and D_UP
- jr nz, Function117764_d_up
- ld a, [hl]
- and D_DOWN
- jr nz, Function117764_d_down
- ld a, [hl]
- and D_LEFT
- jp nz, Function117764_d_left
- ld a, [hl]
- and D_RIGHT
- jp nz, Function117764_d_right
- ret
-
-Function117764_select: ; 1177a5 (45:77a5)
- callba Function171cf0
- ret
-
-Function117764_start: ; 1177ac (45:77ac)
- ld a, $2
- ld [wcd4c], a
- ld a, $4
- ld [wcd4d], a
- ret
-
-Function1177b7: ; 1177b7 (45:77b7)
- ld a, $3
- ld [wcd24], a
- ld a, [wcd4a]
- and a
- jr z, .asm_1177c5
- jp MobilePassword_IncrementJumptable
-
-.asm_1177c5
- ld a, $6
- ld [wcd49], a
- ret
-
-Function1177cb: ; 1177cb (45:77cb)
- ld a, $80
- ld [wcd49], a
- ld [ScriptVar], a
- jp MobilePassword_IncrementJumptable
-
-Function117764_b_button: ; 1177d6 (45:77d6)
- call PlayClickSFX
- ld a, [wcd4a]
- and a
- ret z
- dec a
- ld [wcd4a], a
- ld e, a
- ld d, $0
- ld hl, $c708
- add hl, de
- xor a
- ld [hl], a
- hlcoord 2, 4
- add hl, de
- ld [hl], a
- ret
-
-Function117764_d_up: ; 1177f1 (45:77f1)
- ld a, [wcd4d]
- and a
- ret z
- dec a
- ld [wcd4d], a
- cp $3
- ret nz
- ld a, [wcd4c]
- ld e, a
- sla a
- sla a
- add e
-Function117764_d_vertical_load: ; 117806 (45:7806)
- ld [wcd4c], a
- ret
-
-Function117764_d_down: ; 11780a (45:780a)
- ld a, [wcd4d]
- cp $4
- ret z
- inc a
- ld [wcd4d], a
- cp $4
- ret nz
- ld a, [wcd4c]
- cp $a
- jr nc, .asm_117825
- cp $5
- jr nc, .asm_117829
- xor a
- jr Function117764_d_vertical_load
-
-.asm_117825
- ld a, $2
- jr Function117764_d_vertical_load
-
-.asm_117829
- ld a, $1
- jr Function117764_d_vertical_load
-
-Function117764_d_left: ; 11782d (45:782d)
- ld a, [wcd4c]
- and a
- ret z
- dec a
- ld [wcd4c], a
- ret
-
-Function117764_d_right: ; 117837 (45:7837)
- ld e, $d
- ld a, [wcd4d]
- cp $4
- jr nz, .wrap
- ld e, $2
-.wrap
- ld a, [wcd4c]
- cp e
- ret z
- inc a
- ld [wcd4c], a
- ret
-
-Function117764_a_button: ; 11784c (45:784c)
- call PlayClickSFX
- ld a, [wcd4d]
- cp $4
- jr nz, .not_4
- ld a, [wcd4c]
- cp $2
- jp z, Function1177b7
- cp $1
- jp z, Function1177cb
- jp Function117764_select
-
-.not_4
- ld a, [wcd4a]
- ld e, a
- cp $10
- jp z, Function117764_start
- inc a
- ld [wcd4a], a
- ld d, $0
- ld a, [wcd4b]
- and a
- jr nz, .ascii_symbols
- ld hl, Unknown_117a0f
- jr .got_ascii
-
-.ascii_symbols
- ld hl, Unknown_117a47
-.got_ascii
- push de
- ld a, [wcd4c]
- ld b, a
- ld a, [wcd4d]
- ld c, $e
- call SimpleMultiply
- add b
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [hl]
- ld hl, $c708
- add hl, de
- ld [hl], a
- pop de
- hlcoord 2, 4
- add hl, de
- sub $20
- ld [hl], a
- ld a, e
- cp $f
- ret nz
- jp Function117764_start
-
-Function1178aa: ; 1178aa (45:78aa)
- ld hl, MenuDataHeader_1179b5
- call LoadMenuDataHeader
- call MenuBox
- call MenuBoxCoord2Tile
- ld hl, MenuDataHeader_1179bd
- call LoadMenuDataHeader
- call MenuBox
- call MenuBoxCoord2Tile
- callba ReloadMapPart
- hlcoord 16, 8
- ld de, YessNoString_1179c5
- call PlaceString
- hlcoord 15, 10
- ld a, "▶"
- ld [hl], a
- hlcoord 1, 14
- ld de, AskSavePasswordString
- call PlaceString
- ld a, $1
- ld [wcd4e], a
- jp MobilePassword_IncrementJumptable
-
-Function1178e8: ; 1178e8 (45:78e8)
- ld a, [hJoyPressed]
- cp B_BUTTON
- jr z, .b_button
- cp A_BUTTON
- jr z, .a_button
- cp D_DOWN
- jr z, .d_down
- cp D_UP
- ret nz
- ld a, [wcd4e]
- and a
- ret z
- dec a
- ld [wcd4e], a
- hlcoord 15, 8
- ld a, "▶"
- ld [hl], a
- hlcoord 15, 10
- ld a, " "
- ld [hl], a
- ret
-
-.d_down
- ld a, [wcd4e]
- and a
- ret nz
- inc a
- ld [wcd4e], a
- hlcoord 15, 8
- ld a, " "
- ld [hl], a
- hlcoord 15, 10
- ld a, "▶"
- ld [hl], a
- ret
-
-.a_button
- call PlayClickSFX
- ld a, [wcd4e]
- and a
- jr nz, .b_button
- call ExitMenu
- ld a, $1
- ld [wcd4f], a
- jp MobilePassword_IncrementJumptable
-
-.b_button
- call ExitMenu
- call ExitMenu
- jp MobilePassword_IncrementJumptable
-
-Function117942: ; 117942 (45:7942)
- call SpeechTextBox
- hlcoord 1, 14
- ld de, SavedPasswordString
- call PlaceString
- ld a, $1e
- ld [wcd4e], a
- ld a, BANK(sMobileLoginPassword)
- call GetSRAMBank
- ld a, [wcd4f]
- ld [sMobileLoginPassword], a
- ld hl, $c708
- ld de, sMobileLoginPassword + 1
- ld bc, MOBILE_LOGIN_PASSWORD_LENGTH
- call CopyBytes
- call CloseSRAM
- ld a, [wcd4f]
- and a
- jr z, asm_11797e
- call MobilePassword_IncrementJumptable
-
-Function117976: ; 117976 (45:7976)
- ld hl, wcd4e
- dec [hl]
- ret nz
- call ExitMenu
-asm_11797e: ; 11797e (45:797e)
- ld a, $80
- ld [wcd49], a
- ret
-
-Function117984: ; 117984 (45:7984)
- ld hl, MenuDataHeader_1179b5
- call LoadMenuDataHeader
- call MenuBox
- call MenuBoxCoord2Tile
- callba ReloadMapPart
- hlcoord 1, 14
- ld de, NotAPokemonPasswordString
- call PlaceString
- ld a, $1e
- ld [wcd4e], a
- call MobilePassword_IncrementJumptable
-
-Function1179a7: ; 1179a7 (45:79a7)
- ld hl, wcd4e
- dec [hl]
- ret nz
- call ExitMenu
- ld a, $1
- ld [wcd49], a
- ret
-
-; 1179b5 (45:79b5)
-
-MenuDataHeader_1179b5: ; 1179b5
- db $40 ; flags
- db 12, 0 ; start coords
- db 17, 19 ; end coords
- dw NULL
- db 0 ; default option
-; 1179bd
-
-MenuDataHeader_1179bd: ; 1179bd
- db $40 ; flags
- db 7, 14 ; start coords
- db 11, 19 ; end coords
- dw NULL
- db 0 ; default option
-; 1179c5
-
-
-YessNoString_1179c5: ; 1179c5
- db "はい"
- next "いいえ@"
-; 1179cc
-
-AskSavePasswordString: ; 1179cc
- db "こ%パスワード¯ほぞんして"
- line "おきますか?@"
-; 1179e1
-
-NotAPokemonPasswordString: ; 1179e1
- db "パスワード<PKMN>にゅうりょく"
- line "されていません!@"
-; 1179f7
-
-SavedPasswordString: ; 1179f7
- db "ログインパスワード¯ほぞん"
- line "しました@"
-; 117a0a
-
-MobilePassword_IncrementJumptable: ; 117a0a (45:7a0a)
- ld hl, wcd49
- inc [hl]
- ret
-
-; 117a0f (45:7a0f)
-
-Unknown_117a0f:
-INCBIN "data/mobile/ascii-alpha.txt"
-
-Unknown_117a47:
-INCBIN "data/mobile/ascii-sym.txt"
-; 117a7f
-
-
-; everything from here to the end of the bank is related to the
-; Mobile Stadium option from the continue/newgame menu.
-; XXX better function names
-MobileStudium: ; 0x117a7f
- ld a, [hInMenu]
- push af
- ld a, $1
- ld [hInMenu], a
- call Function117a8d
- pop af
- ld [hInMenu], a
- ret
-
-; 0x117a8d
-
-Function117a8d: ; 0x117a8d
- call Function117a94
- call Function117acd
- ret
-
-; 0x117a94
-
-Function117a94: ; 0x117a94
- xor a
- ld [wJumptableIndex], a
- ld [wcf64], a
- ld [wcf65], a
- ld [wcf66], a
- call ClearBGPalettes
- call ClearSprites
- callba Function172e78
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
- ret
-
-; 0x117ab4
-
-Function117ab4: ; 0x117ab4
- call ClearBGPalettes
- call ClearSprites
- callba Function172e78
- callba Function172eb9
- callba ReloadMapPart
- ret
-
-; 0x117acd
-
-Function117acd: ; 0x117acd
- call JoyTextDelay
- ld a, [wJumptableIndex]
- bit 7, a
- jr nz, .asm_117ae2
- call Function117ae9
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
- jr Function117acd
-
-.asm_117ae2
- call ClearBGPalettes
- call ClearSprites
- ret
-
-Function117ae9: ; 0x117ae9
- ld a, [wJumptableIndex]
- ld e, a
- ld d, $0
- ld hl, .Jumptable
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-.Jumptable: ; 0x117af8
- dw Function117b06
- dw Function117b14
- dw Function117b28
- dw Function117b31
- dw Function117b4f
- dw Function117bb6
- dw Function117c4a
-
-Function117b06:
- callba Function172eb9
- ld a, $10
- ld [wcf64], a
- jp MobileStudium_JumptableIncrement
-
-Function117b14:
- ld hl, wcf64
- dec [hl]
- ret nz
- ld hl, MenuDataHeader_117cbc
- call LoadMenuDataHeader
- call MenuBox
- call MenuBoxCoord2Tile
- jp MobileStudium_JumptableIncrement
-
-Function117b28:
- ld hl, MobileStadiumEntryText
- call PrintText
- jp MobileStudium_JumptableIncrement
-
-Function117b31:
- ld hl, MenuDataHeader_117cc4
- call LoadMenuDataHeader
- call MenuBox
- call MenuBoxCoord2Tile
- hlcoord 16, 8
- ld de, YesNo117ccc
- call PlaceString
- hlcoord 15, 8
- ld a, "▶"
- ld [hl], a
- jp MobileStudium_JumptableIncrement
-
-Function117b4f:
- ld a, [hJoyPressed]
- cp B_BUTTON
- jr z, .b_button
- cp A_BUTTON
- jr z, .a_button
- cp D_DOWN
- jr z, .d_down
- cp D_UP
- ret nz
- ld a, [wcf64]
- and a
- ret z
- dec a
- ld [wcf64], a
- hlcoord 15, 8
- ld a, "▶"
- ld [hl], a
- hlcoord 15, 10
- ld a, " "
- ld [hl], a
- ret
-
-.d_down
- ld a, [wcf64]
- and a
- ret nz
- inc a
- ld [wcf64], a
- hlcoord 15, 8
- ld a, " "
- ld [hl], a
- hlcoord 15, 10
- ld a, "▶"
- ld [hl], a
- ret
-
-.a_button
- call PlayClickSFX
- ld a, [wcf64]
- and a
- jr nz, .b_button
- call ExitMenu
- call ExitMenu
- callba ReloadMapPart
- jp MobileStudium_JumptableIncrement
-
-.b_button
- call ExitMenu
- call ExitMenu
- callba ReloadMapPart
- ld a, $80
- ld [wJumptableIndex], a
- ret
-
-Function117bb6:
- call Function117c89
- ld a, $1
- ld [hBGMapMode], a
- callba Function118284
- call ClearSprites
- ld a, [wc300]
- and a
- jr z, .asm_117be7
- cp $a
- jr z, .asm_117be1
-.asm_117bd0
- ld a, $2
- ld [wc303], a
- callba DisplayMobileError
- ld a, $80
- ld [wJumptableIndex], a
- ret
-
-.asm_117be1
- ld a, $80
- ld [wJumptableIndex], a
- ret
-
-.asm_117be7
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
- ld a, [wcd89]
- and $1
- jr nz, .asm_117c16
- ld a, [w3_d000]
- cp $fe
- jr nz, .asm_117c16
- ld a, [w3_d001]
- cp $f
- jr nz, .asm_117c16
- ld hl, w3_dfec
- ld de, wcd69
- ld c, $10
-.asm_117c0b
- ld a, [de]
- inc de
- cp [hl]
- jr nz, .asm_117c16
- inc hl
- dec c
- jr nz, .asm_117c0b
- jr .asm_117c20
-
-.asm_117c16
- pop af
- ld [rSVBK], a
- ld a, $d3
- ld [wc300], a
- jr .asm_117bd0
-
-.asm_117c20
- pop af
- ld [rSVBK], a
- callba Function172eb9
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
- ld a, $7
- call GetSRAMBank
- ld hl, w3_d002
- ld de, $b000
- ld bc, $1000
- call CopyBytes
- call CloseSRAM
- pop af
- ld [rSVBK], a
- jp MobileStudium_JumptableIncrement
-
-Function117c4a:
- ld hl, MenuDataHeader_117cbc
- call LoadMenuDataHeader
- call MenuBox
- call MenuBoxCoord2Tile
- callba ReloadMapPart
- ld hl, MobileStadiumSuccessText
- call PrintText
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, UnknBGPals
- ld de, 1 palettes
- ld c, 8
-.loop
- push hl
- ld a, $7fff % $100
- ld [hli], a
- ld a, $7fff / $100
- ld [hl], a
- pop hl
- add hl, de
- dec c
- jr nz, .loop
- call RotateThreePalettesRight
- pop af
- ld [rSVBK], a
- ld a, $80
- ld [wJumptableIndex], a
- ret
-
-Function117c89:
- ld a, $7
- call GetSRAMBank
- ld l, $0
- ld h, l
- ld de, $b000
- ld bc, $0ffc
-.asm_117c97
- push bc
- ld a, [de]
- inc de
- ld c, a
- ld b, $0
- add hl, bc
- pop bc
- dec bc
- ld a, b
- or c
- jr nz, .asm_117c97
- ld a, l
- ld [wcd83], a
- ld a, h
- ld [wcd84], a
- ld hl, $bfea
- ld de, wcd69
- ld bc, $10
- call CopyBytes
- call CloseSRAM
- ret
-
-MenuDataHeader_117cbc: ; 0x117cbc
- db $40 ; flags
- db 12, 0 ; start coords
- db 17, 19 ; end coords
- dw NULL ; menu data 2
- db 0 ; default option
-
-MenuDataHeader_117cc4: ; 0x117cc4
- db $40 ; flags
- db 7, 14 ; start coords
- db 11, 19 ; end coords
- dw NULL ; menu data 2
- db 0 ; default item
-
-YesNo117ccc: ; 0x117ccc
- db "はい"
- next "いいえ@"
-
-MobileStadiumEntryText: ; 0x117cd3
- text_jump _MobileStadiumEntryText
- db "@"
-
-MobileStadiumSuccessText: ; 0x117cd8
- text_jump _MobileStadiumSuccessText
- db "@"
-
-MobileStudium_JumptableIncrement: ; 0x117cdd
- ld hl, wJumptableIndex
- inc [hl]
- ret
diff --git a/misc/mobile_45_sprite_engine.asm b/misc/mobile_45_sprite_engine.asm
deleted file mode 100755
index 57c45e43c..000000000
--- a/misc/mobile_45_sprite_engine.asm
+++ /dev/null
@@ -1,922 +0,0 @@
-Function115d99: ; 115d99
- ld de, GFX_11601a
- ld hl, VTiles0 tile $60
- lb bc, BANK(GFX_11601a), $14
- call Get2bpp
- xor a
- ld [wc305], a
- ld [wc306], a
- ld [wc309], a
- ld [wc30a], a
- ld [wc30b], a
- ld [wc30c], a
- ld a, $10
- ld [wc307], a
- ld a, $18
- ld [wc308], a
- ret
-
-; 115dc3
-
-Function115dc3: ; 115dc3
- xor a
- ld [wc305], a
- ld a, $a0
- ld hl, Sprites + 31 * 4
- ld bc, 8 * 4
- call ByteFill
- ret
-
-; 115dd3
-
-Function115dd3: ; 115dd3
- ld a, [wc305]
- and a
- ret z
- ld a, $a0
- ld hl, Sprites + 31 * 4
- ld bc, 8 * 4
- call ByteFill
- call Function115e22
- ld a, [wc309]
- sla a
- ld c, a
- ld b, 0
- ld hl, Unknown_115e86
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- push de
- pop hl
- ld de, Sprites + 31 * 4
- ld a, [wc307]
- ld c, a
- ld a, [wc308]
- ld b, a
- ld a, [hli]
-.asm_115e04
- push af
- ld a, [hli]
- add b
- ld [de], a
- inc de
- ld a, [hli]
- add c
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- pop af
- dec a
- jr nz, .asm_115e04
- ret
-
-; 115e18
-
-Function115e18: ; 115e18
- ld a, c
- ld [wc30a], a
- xor a
- ld [wc30b], a
- jr Function115e2b
-
-; 115e22
-
-Function115e22: ; 115e22
- ld hl, wc30c
- dec [hl]
- ret nz
- ld hl, wc30b
- inc [hl]
-
-Function115e2b: ; 115e2b
- ld a, [wc30a]
- sla a
- ld c, a
- ld b, 0
- ld hl, Unknown_115e59
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- push de
- pop hl
- ld a, [wc30b]
- sla a
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [hli]
- cp $ff
- jr nz, .not_end
- xor a
- ld [wc30b], a
- jr Function115e2b
-
-.not_end
- ld [wc309], a
- ld a, [hl]
- ld [wc30c], a
- ret
-
-; 115e59
-
-Unknown_115e59:
- dw Unknown_115e61
- dw Unknown_115e6c
- dw Unknown_115e76
- dw Unknown_115e79
-
-; OAM idx (see Unknown_115e86), flip flags/duration
-Unknown_115e61: ; 115e61
- db $04, $08
- db $05, $08
- db $06, $08
- db $07, $08
- db $08, $08
- db -1
-
-Unknown_115e6c: ; 115e6c
- db $01, $08
- db $02, $08
- db $03, $08
- db $09, $08
- db $0a, $08
-Unknown_115e76: ; 115e76
- db $00, $08
- db -1
-
-Unknown_115e79: ; 115e79
- db $0b, $08
- db $0c, $08
- db $0d, $08
- db $0e, $08
- db $0f, $08
- db $00, $08
- db -1
-; 115e86
-
-Unknown_115e86:
- dw Unknown_115ea6
- dw Unknown_115eb7
- dw Unknown_115ecc
- dw Unknown_115ee1
- dw Unknown_115ef6
- dw Unknown_115f13
- dw Unknown_115f30
- dw Unknown_115f4d
- dw Unknown_115f6a
- dw Unknown_115f87
- dw Unknown_115f9c
- dw Unknown_115fb1
- dw Unknown_115fc6
- dw Unknown_115fdb
- dw Unknown_115ff0
- dw Unknown_116005
-
-Unknown_115ea6: ; 115ea6
- db 4
- dsprite 1, 0, 0, 0, $60, $01
- dsprite 1, 0, 1, 0, $61, $01
- dsprite 2, 0, 0, 0, $62, $01
- dsprite 2, 0, 1, 0, $63, $01
-
-Unknown_115eb7: ; 115eb7
- db 5
- dsprite 0, 0, 1, 0, $64, $00
- dsprite 1, 0, 0, 0, $60, $01
- dsprite 1, 0, 1, 0, $61, $01
- dsprite 2, 0, 0, 0, $62, $01
- dsprite 2, 0, 1, 0, $63, $01
-
-Unknown_115ecc: ; 115ecc
- db 5
- dsprite 0, 0, 1, 0, $65, $00
- dsprite 1, 0, 0, 0, $60, $01
- dsprite 1, 0, 1, 0, $61, $01
- dsprite 2, 0, 0, 0, $62, $01
- dsprite 2, 0, 1, 0, $63, $01
-
-Unknown_115ee1: ; 115ee1
- db 5
- dsprite 0, 0, 1, 0, $66, $00
- dsprite 1, 0, 0, 0, $60, $01
- dsprite 1, 0, 1, 0, $61, $01
- dsprite 2, 0, 0, 0, $62, $01
- dsprite 2, 0, 1, 0, $63, $01
-
-Unknown_115ef6: ; 115ef6
- db 7
- dsprite 0, 0, 0, 0, $67, $01
- dsprite 1, 0, 0, 0, $68, $01
- dsprite 2, 0, 0, 0, $6d, $00
- dsprite 2, 0, 1, 0, $69, $00
- dsprite 2, 0, 2, 0, $6a, $00
- dsprite 3, 0, 1, 0, $6b, $00
- dsprite 3, 0, 2, 0, $6c, $00
-
-Unknown_115f13: ; 115f13
- db 7
- dsprite 0, 0, 0, 0, $67, $01
- dsprite 1, 0, 0, 0, $68, $01
- dsprite 2, 0, 0, 0, $6e, $00
- dsprite 2, 0, 1, 0, $69, $00
- dsprite 2, 0, 2, 0, $6a, $00
- dsprite 3, 0, 1, 0, $6b, $00
- dsprite 3, 0, 2, 0, $6c, $00
-
-Unknown_115f30: ; 115f30
- db 7
- dsprite 0, 0, 0, 0, $67, $01
- dsprite 1, 0, 0, 0, $68, $01
- dsprite 2, 0, 0, 0, $6f, $00
- dsprite 2, 0, 1, 0, $69, $00
- dsprite 2, 0, 2, 0, $6a, $00
- dsprite 3, 0, 1, 0, $6b, $00
- dsprite 3, 0, 2, 0, $6c, $00
-
-Unknown_115f4d: ; 115f4d
- db 7
- dsprite 0, 0, 0, 0, $67, $01
- dsprite 1, 0, 0, 0, $68, $01
- dsprite 2, 0, 0, 0, $70, $00
- dsprite 2, 0, 1, 0, $69, $00
- dsprite 2, 0, 2, 0, $6a, $00
- dsprite 3, 0, 1, 0, $6b, $00
- dsprite 3, 0, 2, 0, $6c, $00
-
-Unknown_115f6a: ; 115f6a
- db 7
- dsprite 0, 0, 0, 0, $67, $01
- dsprite 1, 0, 0, 0, $68, $01
- dsprite 2, 0, 0, 0, $71, $00
- dsprite 2, 0, 1, 0, $69, $00
- dsprite 2, 0, 2, 0, $6a, $00
- dsprite 3, 0, 1, 0, $6b, $00
- dsprite 3, 0, 2, 0, $6c, $00
-
-Unknown_115f87: ; 115f87
- db 5
- dsprite 0, 0, 1, 0, $72, $00
- dsprite 1, 0, 0, 0, $60, $01
- dsprite 1, 0, 1, 0, $61, $01
- dsprite 2, 0, 0, 0, $62, $01
- dsprite 2, 0, 1, 0, $63, $01
-
-Unknown_115f9c: ; 115f9c
- db 5
- dsprite 0, 0, 1, 0, $73, $00
- dsprite 1, 0, 0, 0, $60, $01
- dsprite 1, 0, 1, 0, $61, $01
- dsprite 2, 0, 0, 0, $62, $01
- dsprite 2, 0, 1, 0, $63, $01
-
-Unknown_115fb1: ; 115fb1
- db 5
- dsprite 0, 1, 1, 0, $64, $60
- dsprite 1, 0, 0, 0, $60, $01
- dsprite 1, 0, 1, 0, $61, $01
- dsprite 2, 0, 0, 0, $62, $01
- dsprite 2, 0, 1, 0, $63, $01
-
-Unknown_115fc6: ; 115fc6
- db 5
- dsprite 0, 1, 1, 0, $65, $60
- dsprite 1, 0, 0, 0, $60, $01
- dsprite 1, 0, 1, 0, $61, $01
- dsprite 2, 0, 0, 0, $62, $01
- dsprite 2, 0, 1, 0, $63, $01
-
-Unknown_115fdb: ; 115fdb
- db 5
- dsprite 0, 1, 1, 0, $66, $60
- dsprite 1, 0, 0, 0, $60, $01
- dsprite 1, 0, 1, 0, $61, $01
- dsprite 2, 0, 0, 0, $62, $01
- dsprite 2, 0, 1, 0, $63, $01
-
-Unknown_115ff0: ; 115ff0
- db 5
- dsprite 0, 1, 1, 0, $72, $60
- dsprite 1, 0, 0, 0, $60, $01
- dsprite 1, 0, 1, 0, $61, $01
- dsprite 2, 0, 0, 0, $62, $01
- dsprite 2, 0, 1, 0, $63, $01
-
-Unknown_116005: ; 116005
- db 5
- dsprite 0, 1, 1, 0, $73, $60
- dsprite 1, 0, 0, 0, $60, $01
- dsprite 1, 0, 1, 0, $61, $01
- dsprite 2, 0, 0, 0, $62, $01
- dsprite 2, 0, 1, 0, $63, $01
-; 11601a
-
-GFX_11601a:: ; 11601a
-INCBIN "gfx/unknown/11601a.2bpp"
-
-
-Function11615a: ; 11615a
- xor a
- ld [wc30d], a
- ld [$c319], a
- ld [wc310], a
- ld [wc311], a
- ld [wc312], a
- ld [wc313], a
- ld [wc314], a
- ld [wc314 + 1], a
- ld [wc314 + 4], a
- ld [wc3f6], a
- ld [wc3f8], a
- ld [wc3f2], a
- ld [wc3f4], a
- ld a, $24
- ld [wc3f5], a
- ld a, $7
- ld [wc3f7], a
- ld a, $b0
- ld [wc30e], a
- ld [wc3f1], a
- ld a, $48
- ld [wc30f], a
- ld [wc3f3], a
- ret
-
-; 11619d
-
-Function11619d: ; 11619d
- ld a, [wc30d]
- and a
- ret z
- ld a, [$c319]
- cp $2
- jr c, .asm_1161b4
- ld a, $a0
- ld hl, Sprites
- ld bc, $0064
- call ByteFill
-
-.asm_1161b4
- call Function1161b8
- ret
-
-; 1161b8
-
-Function1161b8: ; 1161b8
- ld a, [$c319]
- ld e, a
- ld d, 0
- ld hl, .Jumptable
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-; 1161c7
-
-.Jumptable: ; 1161c7
- dw Function1161d5
- dw Function116294
- dw Function1162cb
- dw Function1162f2
- dw Function1163c0
- dw Function11636e
- dw Function116441
-; 1161d5
-
-Function1161d5: ; 1161d5
- ld a, [rSVBK]
- push af
-
- ld a, $6
- ld [rSVBK], a
-
- ld hl, Unknown_117356
- ld de, wDecompressScratch
- ld bc, $0300
- call CopyBytes
-
- di
-
-.wait_for_vblank
-; Wait until a vblank would occur had interrupts not just been disabled.
- ld a, [rLY]
- cp $91
- jr nz, .wait_for_vblank
-
- ld a, $d0
- ld [rHDMA1], a
- ld a, $0
- ld [rHDMA2], a
- ld a, $1c
- ld [rHDMA3], a
- xor a
- ld [rHDMA4], a
- ld a, $8
- ld [rHDMA5], a
-
- ld a, $d0
- ld [rHDMA1], a
- ld a, $80
- ld [rHDMA2], a
- ld a, $1c
- ld [rHDMA3], a
- ld a, $80
- ld [rHDMA4], a
- ld a, $8
- ld [rHDMA5], a
-
- ld a, $d1
- ld [rHDMA1], a
- ld a, $0
- ld [rHDMA2], a
- ld a, $1d
- ld [rHDMA3], a
- xor a
- ld [rHDMA4], a
- ld a, $8
- ld [rHDMA5], a
-
- ld a, $1
- ld [rVBK], a
-
- ld a, $d1
- ld [rHDMA1], a
- ld a, $80
- ld [rHDMA2], a
- ld a, $1c
- ld [rHDMA3], a
- xor a
- ld [rHDMA4], a
- ld a, $8
- ld [rHDMA5], a
-
- ld a, $d2
- ld [rHDMA1], a
- ld a, $0
- ld [rHDMA2], a
- ld a, $1c
- ld [rHDMA3], a
- ld a, $80
- ld [rHDMA4], a
- ld a, $8
- ld [rHDMA5], a
-
- ld a, $d2
- ld [rHDMA1], a
- ld a, $80
- ld [rHDMA2], a
- ld a, $1d
- ld [rHDMA3], a
- xor a
- ld [rHDMA4], a
- ld a, $8
- ld [rHDMA5], a
-
- xor a
- ld [rVBK], a
-
- ei
-
- pop af
- ld [rSVBK], a
-
- callba ReloadMapPart
- ld a, $8
- ld [MusicFade], a
- ld de, MUSIC_MOBILE_ADAPTER
- ld a, e
- ld [MusicFadeIDLo], a
- ld a, d
- ld [MusicFadeIDHi], a
- ld a, [$c319]
- inc a
- ld [$c319], a
- ret
-
-; 11628c
-
-MenuDataHeader_11628c: ; 11628c
- db $40 ; flags
- db 6, 0 ; start coords
- db 17, 19 ; end coords
- dw NULL
- db 0 ; default option
-; 116294
-
-Function116294: ; 116294
- callba Function170d02
- ld a, [$c319]
- inc a
- ld [$c319], a
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, UnknBGPals + 8 * 6
- ld de, $c320
- ld bc, 2 palettes
- call CopyBytes
- ld hl, Palette_11734e
- ld de, UnknBGPals + 8 * 7
- ld bc, 1 palettes
- call CopyBytes
- call SetPalettes
- pop af
- ld [rSVBK], a
- ld a, $30
- ld [hWY], a
- ret
-
-; 1162cb
-
-Function1162cb: ; 1162cb
- callba Function170cc6
- ld a, [$c319]
- inc a
- ld [$c319], a
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, Palette_11730e
- ld de, UnknOBPals + 2 palettes
- ld bc, 6 palettes
- call CopyBytes
- call SetPalettes
- pop af
- ld [rSVBK], a
- ret
-
-; 1162f2
-
-Function1162f2: ; 1162f2
- call Function11659d
- call Function116758
- call Function1167a6
- ld a, [wc310]
- cp EGG
- ret z
- sla a
- ld c, a
- ld b, 0
- ld hl, Unknown_1168c5
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- push de
- pop hl
- ld a, [wc30e]
- ld c, a
- ld a, [wc30f]
- ld b, a
- ld a, [wc314 + 4]
- ld e, a
- ld a, [hli]
- sub e
- ld de, Sprites + $24
-.asm_116321
- push af
- ld a, [hli]
- add b
- ld [de], a
- inc de
- ld a, [hli]
- add c
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- pop af
- dec a
- jr nz, .asm_116321
- call Function116468
- ld a, [wc3f5]
- sla a
- ld c, a
- ld b, 0
- ld hl, Unknown_1168c5
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- push de
- pop hl
- ld a, [wc3f1]
- ld c, a
- ld a, [wc3f3]
- ld b, a
- ld a, [wc3f8]
- ld e, a
- ld a, [hli]
- sub e
- ld de, Sprites
-.asm_11635a
- push af
- ld a, [hli]
- add b
- ld [de], a
- inc de
- ld a, [hli]
- add c
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- pop af
- dec a
- jr nz, .asm_11635a
- ret
-
-; 11636e
-
-Function11636e: ; 11636e
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, BGPals
- ld de, UnknBGPals
- ld bc, $0040
- call CopyBytes
- pop af
- ld [rSVBK], a
- call SetPalettes
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld a, $a0
- ld hl, Sprites
- ld bc, 16 * 4
- call ByteFill
- ld a, $90
- ld [hWY], a
- call UpdateSprites
- pop af
- ld [rSVBK], a
- callba ReloadMapPart
- ld a, $8
- ld [MusicFade], a
- ld a, [wMapMusic]
- ld [MusicFadeIDLo], a
- xor a
- ld [MusicFadeIDHi], a
- xor a
- ld [$c319], a
- ld [wc30d], a
- ret
-
-; 1163c0
-
-Function1163c0: ; 1163c0
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld a, $a0
- ld hl, Sprites
- ld bc, 16 * 4
- call ByteFill
- call DelayFrame
- callba Function14146
- ld b, SCGB_MAPPALS
- call GetSGBLayout
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, $c320
- ld de, wd030
- ld bc, $0010
- call CopyBytes
- pop af
- ld [rSVBK], a
- call SetPalettes
- call DelayFrame
- ld a, $90
- ld [hWY], a
- call UpdateSprites
- callba Function14157
- pop af
- ld [rSVBK], a
- callba ReloadMapPart
- ld a, [wLinkMode]
- cp $4
- jr z, .asm_11642a
- ld a, $8
- ld [MusicFade], a
- ld a, [wMapMusic]
- ld [MusicFadeIDLo], a
- xor a
- ld [MusicFadeIDHi], a
- jr .asm_116439
-
-.asm_11642a
- ld a, $8
- ld [MusicFade], a
- ld a, $0
- ld [MusicFadeIDLo], a
- ld a, $0
- ld [MusicFadeIDHi], a
-
-.asm_116439
- xor a
- ld [$c319], a
- ld [wc30d], a
- ret
-
-; 116441
-
-Function116441: ; 116441
- callba Function17d405
- ld a, $90
- ld [hWY], a
- callba ReloadMapPart
- ld a, $8
- ld [MusicFade], a
- ld a, [wMapMusic]
- ld [MusicFadeIDLo], a
- xor a
- ld [MusicFadeIDHi], a
- xor a
- ld [$c319], a
- ld [wc30d], a
- ret
-
-; 116468
-
-Function116468: ; 116468
- call Function116567
- ld a, [wc314]
- cp $d
- jr nz, .asm_1164a8
- ld hl, wc30e
- ld a, [hl]
- cp $50
- jr nc, .asm_116484
- ld a, $50
- sub [hl]
- add $50
- ld [wc3f1], a
- jr .asm_11648d
-
-.asm_116484
- sub $50
- ld c, a
- ld a, $50
- sub c
- ld [wc3f1], a
-
-.asm_11648d
- ld hl, wc30f
- ld a, [hl]
- cp $60
- jr nc, .asm_11649e
- ld a, $60
- sub [hl]
- add $60
- ld [wc3f3], a
- ret
-
-.asm_11649e
- sub $60
- ld c, a
- ld a, $60
- sub c
- ld [wc3f3], a
- ret
-
-.asm_1164a8
- ld hl, wc30e
- ld a, $b0
- cp [hl]
- jr nc, .asm_1164b8
- ld a, [wc3f1]
- and a
- jr z, .asm_11650b
- jr .asm_1164f2
-
-.asm_1164b8
- ld a, [wc3f1]
- sub [hl]
- jr nc, .asm_1164c1
- xor $ff
- inc a
-
-.asm_1164c1
- ld b, a
- ld c, $0
- ld a, $5
-.asm_1164c6
- srl b
- rr c
- dec a
- jr nz, .asm_1164c6
- ld a, c
- ld [wc3fa], a
- ld a, b
- ld [wc3f9], a
- ld a, [wc3f1]
- sub [hl]
- jr c, .asm_1164f2
- ld c, $0
- ld a, [wc3fa]
- xor $ff
- add $1
- rl c
- ld [wc3fa], a
- ld a, [wc3f9]
- xor $ff
- add c
- ld [wc3f9], a
-
-.asm_1164f2
- ld a, [wc3f2]
- ld l, a
- ld a, [wc3f1]
- ld h, a
- ld a, [wc3fa]
- ld e, a
- ld a, [wc3f9]
- ld d, a
- add hl, de
- ld a, l
- ld [wc3f2], a
- ld a, h
- ld [wc3f1], a
-
-.asm_11650b
- ld hl, wc30f
- ld a, $b0
- cp [hl]
- jr c, .asm_11654d
- ld a, [wc3f3]
- sub [hl]
- jr nc, .asm_11651c
- xor $ff
- inc a
-
-.asm_11651c
- ld b, a
- ld c, $0
- ld a, $5
-.asm_116521
- srl b
- rr c
- dec a
- jr nz, .asm_116521
- ld a, c
- ld [wc3fc], a
- ld a, b
- ld [wc3fb], a
- ld a, [wc3f3]
- sub [hl]
- jr c, .asm_11654d
- ld c, $0
- ld a, [wc3fc]
- xor $ff
- add $1
- rl c
- ld [wc3fc], a
- ld a, [wc3fb]
- xor $ff
- add c
- ld [wc3fb], a
-
-.asm_11654d
- ld a, [wc3f4]
- ld l, a
- ld a, [wc3f3]
- ld h, a
- ld a, [wc3fc]
- ld e, a
- ld a, [wc3fb]
- ld d, a
- add hl, de
- ld a, l
- ld [wc3f4], a
- ld a, h
- ld [wc3f3], a
- ret
diff --git a/misc/mobile_46.asm b/misc/mobile_46.asm
deleted file mode 100755
index 48fed0f33..000000000
--- a/misc/mobile_46.asm
+++ /dev/null
@@ -1,7986 +0,0 @@
-SECTION "bank46", ROMX
-
-Function118000: ; 118000
- ld a, $1
- ld [wcd38], a
- jr asm_11800b
-
-Function118007: ; 118007
- xor a
- ld [wcd38], a
-
-asm_11800b
- call BattleTowerRoomMenu_InitRAM
- ld a, $18
- ld [wcd33], a
- ld a, $19
- ld [wcd34], a
- ld a, $4
- ld [wc3f0], a
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
-.loop
- call JoyTextDelay
- call Function118473
- ld a, [wcf66]
- cp $1b
- jr c, .skip
- ld a, [wcd34]
- ld [wcf66], a
-
-.skip
- call Function1184a5
- call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
- call DelayFrame
- ld a, [wcf66]
- ld hl, wcd33
- cp [hl]
- jr nz, .loop
- pop af
- ld [rSVBK], a
- call BattleTowerRoomMenu_Cleanup
- call ReturnToMapFromSubmenu
-BattleTowerRoomMenu_DoNothing: ; 11805e (46:405e)
- ret
-; 11805f
-
-Function11805f: ; 11805f
- ld a, $1
- ld [wcd38], a
- call BattleTowerRoomMenu_InitRAM
- ld a, $18
- ld [wcd33], a
- ld a, $19
- ld [wcd34], a
- ld a, $4
- ld [wc3f0], a
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
-.asm_11807d
- call JoyTextDelay
- call Function118473
- ld a, [wcf66]
- cp $1b
- jr c, .asm_118090
- ld a, [wcd34]
- ld [wcf66], a
-
-.asm_118090
- call Function11857c
- call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
- call DelayFrame
- ld a, [wcf66]
- ld hl, wcd33
- cp [hl]
- jr nz, .asm_11807d
- pop af
- ld [rSVBK], a
- call BattleTowerRoomMenu_Cleanup
- call ReturnToMapFromSubmenu
- ret
-; 1180b8
-
-Function1180b8: ; 1180b8
- call BattleTowerRoomMenu_InitRAM
- ld a, $22
- ld [wcd33], a
- ld a, $23
- ld [wcd34], a
- ld a, $4
- ld [wc3f0], a
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
-.asm_1180d1
- call JoyTextDelay
- call Function118473
- ld a, [wcf66]
- cp $28
- jr c, .asm_1180e4
- ld a, [wcd34]
- ld [wcf66], a
-
-.asm_1180e4
- ld a, [wcf66]
- cp $10
- jr c, .asm_1180f2
- cp $16
- jr nc, .asm_1180f2
- call Function11884c
-
-.asm_1180f2
- call Function1184ec
- call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
- call DelayFrame
- ld a, [wcf66]
- ld hl, wcd33
- cp [hl]
- jr nz, .asm_1180d1
- pop af
- ld [rSVBK], a
- call BattleTowerRoomMenu_Cleanup
- call ReturnToMapFromSubmenu
- ret
-; 11811a
-
-Function11811a: ; 11811a
- ld a, 1
- ld [wcd38], a
- jr Function118125
-
-_BattleTowerRoomMenu: ; 118121
- xor a
- ld [wcd38], a
-Function118125: ; 118125
- call BattleTowerRoomMenu_InitRAM
- ld a, $3
- ld [wcd33], a
- ld a, $d
- ld [wcd34], a
- ld a, $4
- ld [wc3f0], a
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
-.loop
- call JoyTextDelay
- call Function118473
- ld a, [wcf66]
- cp $f
- jr c, .skip
- ld a, [wcd34]
- ld [wcf66], a
-.skip
- call BattleTowerRoomMenu_Jumptable
- call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
- call DelayFrame
- ld a, [wcf66]
- ld hl, wcd33
- cp [hl]
- jr nz, .loop
- xor a
- ld [w3_d000], a
- pop af
- ld [rSVBK], a
- call BattleTowerRoomMenu_Cleanup
- call Function118180
- call ReturnToMapFromSubmenu
- ret
-; 118180
-
-Function118180: ; 118180
- ld a, [ScriptVar]
- and a
- ret nz
- ld a, [wcd38]
- and a
- ret z
- ld a, $5
- call GetSRAMBank
- ld hl, wcd69
- ld de, $a89c
- ld bc, $0016
- call CopyBytes
-
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
-
- ld de, w3_d202
- ld c, $96
- callba CheckStringForErrors_IgnoreTerminator
- jr c, .return_d3
-
- ld de, w3_d202
- lb bc, 1, $96
- callba CheckStringContainsLessThanBNextCharacters
- jr c, .return_d3
-
- ld hl, w3_d202
- ld de, $a8b2
- ld bc, $0096
- call CopyBytes
-.reset_banks
- pop af
- ld [rSVBK], a
- call CloseSRAM
- ret
-
-.return_d3
- ld a, $d3
- ld [wc300], a
- ld [ScriptVar], a
- jr .reset_banks
-; 1181da
-
-Function1181da: ; 1181da
- call BattleTowerRoomMenu_InitRAM
- ld a, $2
- ld [wcd38], a
- ld a, $21
- ld [wcd33], a
- ld a, $22
- ld [wcd34], a
- ld a, $4
- ld [wc3f0], a
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
-.asm_1181f8
- call JoyTextDelay
- call Function118473
- ld a, [wcf66]
- cp $28
- jr c, .asm_11820b
- ld a, [wcd34]
- ld [wcf66], a
-
-.asm_11820b
- call Function1185c3
- call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
- call DelayFrame
- ld a, [wcf66]
- ld hl, wcd33
- cp [hl]
- jr nz, .asm_1181f8
- pop af
- ld [rSVBK], a
- call BattleTowerRoomMenu_Cleanup
- call ReturnToMapFromSubmenu
- ret
-; 118233
-
-Function118233: ; 118233
- call BattleTowerRoomMenu_InitRAM
- ld a, $1b
- ld [wcd33], a
- ld a, $1c
- ld [wcd34], a
- ld a, $6
- ld [wc3f0], a
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
-.asm_11824c
- call JoyTextDelay
- call Function118473
- ld a, [wcf66]
- cp $1e
- jr c, .asm_11825f
- ld a, [wcd34]
- ld [wcf66], a
-
-.asm_11825f
- call Function118624
- call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
- call DelayFrame
- ld a, [wcf66]
- ld hl, wcd33
- cp [hl]
- jr nz, .asm_11824c
- pop af
- ld [rSVBK], a
- call BattleTowerRoomMenu_Cleanup
- ret
-; 118284
-
-Function118284: ; 118284
- call BattleTowerRoomMenu_InitRAM
- ld a, $19
- ld [wcd33], a
- ld a, $1e
- ld [wcd34], a
- ld a, $5
- ld [wc3f0], a
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
-.asm_11829d
- call JoyTextDelay
- call Function118473
- ld a, [wcf66]
- cp $20
- jr c, .asm_1182b0
- ld a, [wcd34]
- ld [wcf66], a
-.asm_1182b0
- call Function1186f5
- call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
- call DelayFrame
- ld a, [wcf66]
- ld hl, wcd33
- cp [hl]
- jr nz, .asm_11829d
- pop af
- ld [rSVBK], a
- call BattleTowerRoomMenu_Cleanup
- ret
-; 1182d5 (46:42d5)
-
-
-Function1182d5: ; 1182d5
- call BattleTowerRoomMenu_InitRAM
- ld a, $18
- ld [wcd33], a
- ld a, $19
- ld [wcd34], a
- ld a, $4
- ld [wc3f0], a
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
-.asm_1182ee
- call JoyTextDelay
- call Function118473
- ld a, [wcf66]
- cp $1b
- jr c, .asm_118301
- ld a, [wcd34]
- ld [wcf66], a
-
-.asm_118301
- call Function118746
- call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
- call DelayFrame
- ld a, [wcf66]
- ld hl, wcd33
- cp [hl]
- jr nz, .asm_1182ee
- pop af
- ld [rSVBK], a
- call BattleTowerRoomMenu_Cleanup
- call ReturnToMapFromSubmenu
- ret
-; 118329
-
-Function118329: ; 118329
- call BattleTowerRoomMenu_InitRAM
- ld a, $15
- ld [wcd33], a
- ld a, $16
- ld [wcd34], a
- ld a, $6
- ld [wc3f0], a
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
-.asm_118342
- call JoyTextDelay
- call Function118473
- ld a, [wcf66]
- cp $18
- jr c, .asm_118355
- ld a, [wcd34]
- ld [wcf66], a
-
-.asm_118355
- call Function118671
- call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
- call DelayFrame
- ld a, [wcf66]
- ld hl, wcd33
- cp [hl]
- jr nz, .asm_118342
- pop af
- ld [rSVBK], a
- call BattleTowerRoomMenu_Cleanup
- ret
-; 11837a
-
-Function11837a: ; 11837a
- call BattleTowerRoomMenu_InitRAM
- ld a, $16
- ld [wcd33], a
- ld a, $17
- ld [wcd34], a
- ld a, $6
- ld [wc3f0], a
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
-.asm_118393
- call JoyTextDelay
- call Function118473
- ld a, [wcf66]
- cp $19
- jr c, .asm_1183a6
- ld a, [wcd34]
- ld [wcf66], a
-
-.asm_1183a6
- call Function1186b2
- call BattleTowerRoomMenu_WriteMessage
- callba Function115dd3
- callba Function11619d
- call DelayFrame
- ld a, [wcf66]
- ld hl, wcd33
- cp [hl]
- jr nz, .asm_118393
- pop af
- ld [rSVBK], a
- call BattleTowerRoomMenu_Cleanup
- ret
-; 1183cb
-
-BattleTowerRoomMenu_InitRAM: ; 1183cb
- di
- ld a, [rIE]
- ld [wcd32], a
- call DoubleSpeed
- xor a
- ld [rIF], a
- ld [wc300], a
- ld [wc301], a
- ld [wc302], a
- ld [wcd80], a
- ld [wcd65], a
- ld [wcd66], a
- ld [wcd67], a
- ld [wcd68], a
- ld [$c31a], a
- ld [wcd89], a
- ld [wcd8a], a
- ld [wcd8b], a
- ld [wc3ec], a
- ld [wc3ed], a
- ld [wc3ee], a
- ld [wc3ef], a
- ld hl, VramState
- ld a, [hl]
- ld [wcd7f], a
- set 1, [hl]
- ld a, $f
- ld [rIE], a
- ld a, $1
- ld [hMobileReceive], a
- ld [hMobile], a
- ei
- callba MobileFunc_106462
- callba Function106464
- callba Function115d99
- callba Function11615a
- ld a, $5
- call GetSRAMBank
- xor a
- ld [$bfff], a
- call CloseSRAM
- ret
-; 118440
-
-Function118440: ; 118440
- push af
- ld a, $5
- call GetSRAMBank
- ld a, [$bfff]
- inc a
- ld [$bfff], a
- call CloseSRAM
- pop af
- ret
-; 118452
-
-BattleTowerRoomMenu_Cleanup: ; 118452
- di
- xor a
- ld [hMobileReceive], a
- ld [hMobile], a
- ld [hVBlank], a
- call NormalSpeed
- xor a
- ld [rIF], a
- ld a, [wcd32]
- ld [rIE], a
- ei
- ld a, [wcd7f]
- ld [VramState], a
- ld a, [wc300]
- ld [ScriptVar], a
- ret
-; 118473
-
-Function118473: ; 118473
- ld a, [wcd65]
- and a
- ret z
- ld a, [wcd66]
- inc a
- ld [wcd66], a
- cp 60
- ret nz
- xor a
- ld [wcd66], a
- ld a, [wcd67]
- inc a
- ld [wcd67], a
- cp 60
- ret nz
- ld a, [wcd68]
- inc a
- ld [wcd68], a
- cp 99
- jr z, .ninety_nine
- xor a
- ld [wcd67], a
- ret
-
-.ninety_nine
- xor a
- ld [wcd65], a
- ret
-; 1184a5
-
-Function1184a5: ; 1184a5
- jumptable .Jumptable, wcf66
-; 1184b4
-
-.Jumptable: ; 1184b4
- dw Function11886e
- dw Function118880
- dw Function11878d
- dw Function1188b0
- dw Function11878d
- dw Function1188b8
- dw Function11878d
- dw Function1188c0
- dw Function11878d
- dw Function1188c8
- dw Function11878d
- dw Function118903
- dw Function118a8f
- dw Function11878d
- dw Function118d80
- dw Function118d9b
- dw Function11878d
- dw Function118ded
- dw Function118e6d
- dw Function11878d
- dw Function11984e
- dw Function118e76
- dw Function118e7e
- dw Function11878d
- dw BattleTowerRoomMenu_DoNothing
- dw Function118e76
- dw BattleTowerRoomMenu_CallRoomMenu2
- dw Function118e76
-; 1184ec
-
-Function1184ec: ; 1184ec
- jumptable .Jumptable, wcf66
-; 1184fb
-
-.Jumptable: ; 1184fb
- dw Function11886e
- dw Function118880
- dw Function11878d
- dw Function1188b0
- dw Function11878d
- dw Function1188b8
- dw Function11878d
- dw Function1188c0
- dw Function11878d
- dw Function1188c8
- dw Function11878d
- dw Function118903
- dw Function119954
- dw Function11878d
- dw Function119973
- dw Function11878d
- dw Function119987
- dw Function11878d
- dw Function1199b4
- dw Function1199ca
- dw Function11878d
- dw Function1199e2
- dw Function119b0d
- dw Function11878d
- dw Function119b6b
- dw Function119b3b
- dw Function11878d
- dw Function119b52
- dw Function11878d
- dw Function118e6d
- dw Function11878d
- dw Function118e76
- dw Function118e7e
- dw Function11878d
- dw BattleTowerRoomMenu_DoNothing
- dw Function118e76
- dw BattleTowerRoomMenu_CallRoomMenu2
- dw Function119b45
- dw Function11878d
- dw Function119ac9
- dw Function118e76
-; 11854d
-
-BattleTowerRoomMenu_Jumptable: ; 11854d
- jumptable .Jumptable, wcf66
-; 11855c
-
-.Jumptable: ; 11855c
- dw BattleTowerRoomMenu_PickLevelMessage
- dw BattleTowerRoomMenu_PlacePickLevelMenu
- dw BattleTowerRoomMenu_UpdatePickLevelMenu
- dw BattleTowerRoomMenu_DoNothing
- dw BattleTowerRoomMenu_PartyMonTopsThisLevelMessage
- dw BattleTowerRoomMenu_WaitForMessage
- dw BattleTowerRoomMenu_DelayRestartMenu
- dw BattleTowerRoomMenu_QuitMessage
- dw BattleTowerRoomMenu_PlaceYesNoMenu
- dw BattleTowerRoomMenu_UpdateYesNoMenu
- dw BattleTowerRoomMenu_UberRestrictionMessage
- dw BattleTowerRoomMenu_WaitForMessage
- dw BattleTowerRoomMenu_DelayRestartMenu
- dw Function118e76 ; mobile
- dw BattleTowerRoomMenu_CallRoomMenu2 ; mobile
- dw Function118e76 ; mobile
-; 11857c
-
-Function11857c: ; 11857c
- jumptable .Jumptable, wcf66
-; 11858b
-
-.Jumptable: ; 11858b
- dw Function11886e
- dw Function118880
- dw Function11878d
- dw Function1188b0
- dw Function11878d
- dw Function1188b8
- dw Function11878d
- dw Function1188c0
- dw Function11878d
- dw Function1188c8
- dw Function11878d
- dw Function118903
- dw Function118a7a
- dw Function11878d
- dw Function11891c
- dw Function1198ee
- dw Function1198f7
- dw Function11878d
- dw Function119937
- dw Function118e6d
- dw Function11878d
- dw Function118e76
- dw Function118e7e
- dw Function11878d
- dw BattleTowerRoomMenu_DoNothing
- dw Function118e76
- dw BattleTowerRoomMenu_CallRoomMenu2
- dw Function118e76
-; 1185c3
-
-Function1185c3: ; 1185c3
- jumptable .Jumptable, wcf66
-; 1185d2
-
-.Jumptable: ; 1185d2
- dw Function11886e
- dw Function118880
- dw Function11878d
- dw Function1188b0
- dw Function11878d
- dw Function1188b8
- dw Function11878d
- dw Function1188c0
- dw Function11878d
- dw Function1188c8
- dw Function11878d
- dw Function118903
- dw Function118aa4
- dw Function11878d
- dw Function118e92
- dw Function11878d
- dw Function118eb0
- dw Function118ec6
- dw Function118f0d
- dw Function118f14
- dw Function118f5e
- dw Function11878d
- dw Function118fc0
- dw Function11878d
- dw Function119054
- dw Function1190d0
- dw Function11878d
- dw Function1190ec
- dw Function118e6d
- dw Function11878d
- dw Function118e76
- dw Function118e7e
- dw Function11878d
- dw BattleTowerRoomMenu_DoNothing
- dw Function118e76
- dw BattleTowerRoomMenu_CallRoomMenu2
- dw BattleTowerRoomMenu_QuitMessage
- dw BattleTowerRoomMenu_PlaceYesNoMenu
- dw BattleTowerRoomMenu_UpdateYesNoMenu
- dw Function11914e
- dw Function118e76
-; 118624
-
-Function118624: ; 118624
- jumptable .Jumptable, wcf66
-; 118633
-
-.Jumptable: ; 118633
- dw Function118866
- dw Function118880
- dw Function11878d
- dw Function1188b0
- dw Function11878d
- dw Function1188b8
- dw Function11878d
- dw Function1188c0
- dw Function11878d
- dw Function1188c8
- dw Function11878d
- dw Function118903
- dw Function118aa4
- dw Function11878d
- dw Function118e92
- dw Function11878d
- dw Function11915d
- dw Function118f68
- dw Function11878d
- dw Function119009
- dw Function11878d
- dw Function119054
- dw Function118e6d
- dw Function11878d
- dw Function118e76
- dw Function118e7e
- dw Function11878d
- dw BattleTowerRoomMenu_DoNothing
- dw Function118e76
- dw BattleTowerRoomMenu_CallRoomMenu2
- dw Function118e76
-; 118671
-
-Function118671: ; 118671
- jumptable .Jumptable, wcf66
-; 118680
-
-.Jumptable: ; 118680
- dw Function118866
- dw Function118880
- dw Function11878d
- dw Function1188b0
- dw Function11878d
- dw Function1188b8
- dw Function11878d
- dw Function1188c0
- dw Function11878d
- dw Function1188c8
- dw Function11878d
- dw Function118903
- dw Function119380
- dw Function119388
- dw Function1193a0
- dw Function11878d
- dw Function118e6d
- dw Function11878d
- dw Function118e76
- dw Function118e7e
- dw Function11878d
- dw BattleTowerRoomMenu_DoNothing
- dw Function118e76
- dw BattleTowerRoomMenu_CallRoomMenu2
- dw Function118e76
-; 1186b2
-
-Function1186b2: ; 1186b2
- jumptable .Jumptable, wcf66
-; 1186c1
-
-.Jumptable: ; 1186c1
- dw Function118866
- dw Function118880
- dw Function11878d
- dw Function1188b0
- dw Function11878d
- dw Function1188b8
- dw Function11878d
- dw Function1188c0
- dw Function11878d
- dw Function1188c8
- dw Function11878d
- dw Function118903
- dw Function119380
- dw Function1193e3
- dw Function1193fb
- dw Function11878d
- dw Function119413
- dw Function118e6d
- dw Function11878d
- dw Function118e76
- dw Function118e7e
- dw Function11878d
- dw BattleTowerRoomMenu_DoNothing
- dw Function118e76
- dw BattleTowerRoomMenu_CallRoomMenu2
- dw Function118e76
-; 1186f5
-
-Function1186f5: ; 1186f5 (46:46f5)
- jumptable .Jumptable, wcf66
-; 118704 (46:4704)
-
-.Jumptable: ; 118704 (46:4704)
- dw Function11886a
- dw Function118880
- dw Function11878d
- dw Function1188b0
- dw Function11878d
- dw Function1188b8
- dw Function11878d
- dw Function1188c0
- dw Function11878d
- dw Function1188c8
- dw Function11878d
- dw Function118903
- dw Function118abc
- dw Function11878d
- dw Function119451
- dw Function1195f8
- dw Function119612
- dw Function119629
- dw Function119648
- dw Function11878d
- dw Function118e6d
- dw Function11878d
- dw Function118e76
- dw Function118e7e
- dw Function11878d
- dw BattleTowerRoomMenu_DoNothing
- dw Function11967d
- dw Function119685
- dw Function119665
- dw Function11966d
- dw Function118e76
- dw BattleTowerRoomMenu_CallRoomMenu2
- dw Function118e76
-; 118746 (46:4746)
-
-Function118746: ; 118746
- jumptable .Jumptable, wcf66
-; 118755
-
-.Jumptable: ; 118755
- dw Function11886e
- dw Function118880
- dw Function11878d
- dw Function1188b0
- dw Function11878d
- dw Function1188b8
- dw Function11878d
- dw Function1188c0
- dw Function11878d
- dw Function1188c8
- dw Function11878d
- dw Function118903
- dw Function118ad0
- dw Function11878d
- dw Function1196f2
- dw Function1197c9
- dw Function1197dc
- dw Function11878d
- dw Function118e6d
- dw Function11878d
- dw Function119800
- dw Function118e76
- dw Function118e7e
- dw Function11878d
- dw BattleTowerRoomMenu_DoNothing
- dw Function118e76
- dw BattleTowerRoomMenu_CallRoomMenu2
- dw Function118e76
-; 11878d
-
-Function11878d: ; 11878d (46:478d)
- ld a, [wc821]
- bit 1, a
- jr nz, .asm_1187af
- bit 2, a
- jr nz, .asm_1187d1
- bit 0, a
- jr nz, .asm_1187aa
- ld a, [wcd89]
- and $1
- jr z, .asm_1187a7
- ld a, $3
- ld [rSVBK], a
-.asm_1187a7
- jp BattleTowerRoomMenu_IncrementJumptable
-.asm_1187aa
- call Function118821
- ret c
- ret
-.asm_1187af
- ld a, $0
- call Function3e32
- ld [wc300], a
- ld a, l
- ld [wc301], a
- ld a, h
- ld [wc302], a
- ld a, $a
- call Function3e32
- ld a, [wc3f0]
- ld [$c319], a
- ld a, [wcd34]
- ld [wcf66], a
- ret
-.asm_1187d1
- ld hl, wcd89
- bit 0, [hl]
- jr nz, .asm_118803
- set 0, [hl]
- ld a, $6
- ld [rSVBK], a
- ld de, w3_d000
- ld bc, $1000
- ld a, [hl]
- sla a
- jr c, .asm_1187f9
- sla a
- jr c, .asm_1187fd
- sla a
- jr c, .asm_1187f5
- ld a, $24
- jr .asm_1187ff
-.asm_1187f5
- ld a, $28
- jr .asm_1187ff
-.asm_1187f9
- ld a, $2a
- jr .asm_1187ff
-.asm_1187fd
- ld a, $2c
-.asm_1187ff
- call Function3e32
- ret
-.asm_118803
- ld a, $d3
-
-Function118805: ; 118805 (46:4805)
- ld [wc300], a
- xor a
- ld [wc301], a
- ld [wc302], a
- ld a, $a
- call Function3e32
- ld a, [wc3f0]
- ld [$c319], a
- ld a, [wcd34]
- ld [wcf66], a
- ret
-
-Function118821: ; 118821 (46:4821)
- ld a, [$c319]
- cp $3
- jr c, .asm_11884a
- cp $4
- jr z, .asm_11884a
- ld a, [hJoyDown]
- cp $5
- jr nz, .asm_11884a
- ld a, $a
- call Function3e32
- ld a, $a
- ld [wc300], a
- ld a, [wc3f0]
- ld [$c319], a
- ld a, [wcd34]
- ld [wcf66], a
- scf
- ret
-.asm_11884a
- and a
- ret
-; 11884c (46:484c)
-
-Function11884c: ; 11884c
- ld a, [hJoyDown]
- cp $5
- jr nz, .asm_118864
- ld a, $a
- call Function3e32
- ld a, $a
- ld [wc300], a
- ld a, [wcd34]
- ld [wcf66], a
- scf
- ret
-
-.asm_118864
- and a
- ret
-; 118866
-
-Function118866:
- ld a, 2
- jr asm_11886f
-
-Function11886a: ; 11886a (46:486a)
- ld a, 1
- jr asm_11886f
-; 11886e (46:486e)
-
-Function11886e:
- xor a
-
-asm_11886f
- ld [BGMapPalBuffer], a
- ld a, $0
- ld [wcd3c], a
- call BattleTowerRoomMenu_IncrementJumptable
- ld a, [wcd33]
- ld [wMobileInactivityTimerSeconds], a
-
-Function118880: ; 118880 (46:4880)
- call BattleTowerRoomMenu2
- ret c
- xor a
- ld [wcf64], a
- ld [wc807], a
- ld de, wcd81
- ld hl, $46
- ld a, $2
- jp Function119e2b
-; 118896 (46:4896)
-
-Function118896: ; 118896
- ld a, [wc821]
- bit 1, a
- jr nz, .asm_1188a5
- bit 2, a
- jr nz, .asm_1188a5
- bit 0, a
- jr z, .asm_1188aa
-
-.asm_1188a5
- ld a, $34
- jp Function119e2b
-
-.asm_1188aa
- call BattleTowerRoomMenu_IncrementJumptable
- jp BattleTowerRoomMenu_IncrementJumptable
-; 1188b0
-
-Function1188b0: ; 1188b0 (46:48b0)
- ld de, $c346
- ld a, $c
- jp Function119e2b
-
-Function1188b8: ; 1188b8 (46:48b8)
- ld de, wc3ac
- ld a, $e
- jp Function119e2b
-
-Function1188c0: ; 1188c0 (46:48c0)
- ld de, wc3cd
- ld a, $10
- jp Function119e2b
-
-Function1188c8: ; 1188c8 (46:48c8)
- ld a, $1
- ld [wcd65], a
- call Function1188e7
- ld hl, $c708
-.asm_1188d3
- ld a, [de]
- inc de
- ld [hli], a
- and a
- jr nz, .asm_1188d3
- call Function119eb4
- call Function119ec2
- ld hl, $c708
- ld a, $6
- jp Function119e2b
-
-Function1188e7: ; 1188e7 (46:48e7)
- ld de, $c346
- ld a, $5
- call GetSRAMBank
- ld a, [$aa4a]
- call CloseSRAM
- and a
- ret z
- sla a
- ld c, a
-.asm_1188fa
- ld a, [de]
- inc de
- and a
- jr nz, .asm_1188fa
- dec c
- jr nz, .asm_1188fa
- ret
-
-Function118903: ; 118903 (46:4903)
- ld a, [wc3f0]
- ld [$c319], a
- ld c, $1
- callba Function115e18
- ld a, $8
- ld [wcd3c], a
- call BattleTowerRoomMenu2
- jp BattleTowerRoomMenu_IncrementJumptable
-
-
-Function11891c: ; 11891c
- call Function118b42
- jp BattleTowerRoomMenu_IncrementJumptable
-
-
-BattleTowerRoomMenu_PickLevelMessage: ; 118922
- ld a, [wcd38]
- and a
- jr nz, .asm_11892d
- ld hl, Text_WhatLevelDoYouWantToChallenge
- jr .asm_118930
-
-.asm_11892d
- ld hl, Text_CheckBattleRoomListByMaxLevel
-
-.asm_118930
- call BattleTowerRoomMenu_SetMessage
- call BattleTowerRoomMenu_IncrementJumptable
-
-BattleTowerRoomMenu_PlacePickLevelMenu:
- ld a, [$c31a]
- and a
- ret nz
- ld hl, MenuDataHeader_119cf7
- call LoadMenuDataHeader
- call MenuBox
- call MenuBoxCoord2Tile
- call ApplyTilemap
- hlcoord 16, 8, AttrMap
- ld a, $40
- or [hl]
- ld [hl], a
- call WaitBGMap2
- ld a, $1
- ld [wcd4f], a
- ld a, $1
- ld [rSVBK], a
- ld a, [StatusFlags]
- bit 6, a ; Hall Of Fame
- jr nz, .asm_11896b
- ld hl, Strings_Ll0ToL40 ; Address to list of strings with the choosable levels
- ld a, 5 ; 4 levels to choose from, including 'Cancel'-option
- jr .asm_118970
-
-.asm_11896b
- ld hl, Strings_L10ToL100 ; Address to list of strings with the choosable levels
- ld a, 11 ; 10 levels to choose from, including 'Cancel'-option
-
-.asm_118970
- ld [wcd4a], a
- ld a, l
- ld [wcd4b], a
- ld a, h
- ld [wcd4c], a
- ld a, $3
- ld [rSVBK], a
- call BattleTowerRoomMenu_IncrementJumptable
-
-BattleTowerRoomMenu_UpdatePickLevelMenu:
- hlcoord 13, 8
- ld de, String_119d07
- call PlaceString
- hlcoord 13, 10
- ld de, String_119d07
- call PlaceString
- ld a, [wcd4b]
- ld l, a
- ld a, [wcd4c]
- ld h, a
- ld d, $0
- ld a, [wcd4f]
- dec a
- rlca
- rlca
- rlca
- ld e, a
- add hl, de
- ld a, l
- ld e, a
- ld a, h
- ld d, a
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld bc, StringBuffer3
-.asm_1189b5
- ld a, [hli]
- cp $50
- jr z, .asm_1189c4
- cp $7f
- jr z, .asm_1189c2
- ld [bc], a
- inc bc
- jr .asm_1189b5
-
-.asm_1189c2
- ld a, $50
-
-.asm_1189c4
- ld [bc], a
- pop af
- ld [rSVBK], a
- hlcoord 13, 9
- call PlaceString
- ld hl, hJoyPressed
- ld a, [hl]
- and B_BUTTON
- jr nz, .b_button
- ld a, [hl]
- and A_BUTTON
- jr nz, .a_button
- ld a, [hl]
- and D_DOWN
- jr nz, .d_down
- ld a, [hl]
- and D_UP
- jr nz, .d_up
-.asm_1189e5
- ret
-
-.d_down
- ld hl, wcd4f
- dec [hl]
- jr nz, .asm_1189e5
- ld a, [wcd4a]
- ld [hl], a
- jr .asm_1189e5
-
-.d_up
- ld a, [wcd4a]
- ld hl, wcd4f
- inc [hl]
- cp [hl]
- jr nc, .asm_1189e5
- ld a, $1
- ld [hl], a
- jr .asm_1189e5
-
-.a_button
- call PlayClickSFX
- ld a, [wcd4f]
- ld hl, wcd4a
- cp [hl]
- jr z, .asm_118a3c
- dec a
- and $fe
- srl a
- ld [wcf65], a
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- call CloseWindow
- pop af
- ld [rSVBK], a
- ld a, [wcd38]
- and a
- jr nz, .asm_118a30
- call BattleTower_LevelCheck
- ret c
- call BattleTower_UbersCheck
- ret c
-
-.asm_118a30
- ld a, [wcd4f]
- ld [w3_d800], a
- jp BattleTowerRoomMenu_IncrementJumptable
-
-.b_button
- call PlayClickSFX
-
-.asm_118a3c
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- call CloseWindow
- pop af
- ld [rSVBK], a
- ld a, $7
- ld [wcf66], a
- ld a, $0
- ld [wMobileInactivityTimerFrames], a
- ret
-
-
-
-Function118a54: ; 118a54
- ld a, [wcd55]
- ld l, a
- ld a, [wcd56]
- ld h, a
- ld de, wc3ec
- ld bc, $0004
- jp Function118ae4
-; 118a65
-
-Function118a65: ; 118a65
- ld hl, BattleDownloadURL
- ld de, wcc60
- ld bc, $80
- call CopyBytes
- ld de, w3_d000
- ld bc, $1000
- jp Function118b10
-; 118a7a
-
-Function118a7a: ; 118a7a
- ld hl, BattleDownloadURL
- ld de, wcc60
- ld bc, $80
- call CopyBytes
- ld de, w3_d000
- ld bc, $1000
- jp Function118b10
-; 118a8f
-
-Function118a8f: ; 118a8f
- ld hl, ExchangeDownloadURL
- ld de, wcc60
- ld bc, $80
- call CopyBytes
- ld de, w3_d000
- ld bc, $1000
- jp Function118b10
-; 118aa4
-
-Function118aa4: ; 118aa4
- ld hl, NewsDownloadURL
- ld de, wcc60
- ld bc, $80
- call CopyBytes
- ld a, $5
- ld [rSVBK], a
- ld de, w3_d100
- ld bc, $e00
- jr Function118b10
-; 118abc
-
-Function118abc: ; 118abc (46:4abc)
- ld hl, MenuDownloadURL
- ld de, wcc60
- ld bc, $80
- call CopyBytes
- ld de, w3_d000
- ld bc, $1000
- jr Function118b10
-; 118ad0 (46:4ad0)
-
-Function118ad0:
- ld hl, IndexDownloadURL
- ld de, wcc60
- ld bc, $80
- call CopyBytes
- ld de, w3_d000
- ld bc, $1000
- jr Function118b10
-
-Function118ae4:
- push bc
- push de
- push hl
- ld a, $8
- ld [wcd3c], a
- call BattleTowerRoomMenu2
- pop hl
- ld c, $0
- ld de, wcc60
-.asm_118af5
- ld a, [hli]
- ld [de], a
- inc de
- and a
- jr z, .asm_118b06
- inc c
- ld a, c
- cp $a6
- jr c, .asm_118af5
- ld a, $da
- jp Function118805
-
-.asm_118b06
- call Function118b24
- pop de
- pop bc
- ld a, $2a
- jp Function119e2b
-; 118b10
-
-Function118b10:
- push de
- push bc
- ld a, $8
- ld [wcd3c], a
- call BattleTowerRoomMenu2
- call Function118b24
- pop bc
- pop de
- ld a, $2a
- jp Function119e2b
-
-Function118b24: ; 118b24 (46:4b24)
- ld hl, $c346
- ld a, $8
- ld [hli], a
- ld a, $c7
- ld [hli], a
- ld a, $60
- ld [hli], a
- ld a, $cc
- ld [hli], a
- call Function119eb4
- call Function119ec2
- ld a, $80
- ld [wcd89], a
- ld hl, $c346
- ret
-; 118b42 (46:4b42)
-
-Function118b42: ; 118b42
- ld hl, wd002
- ld a, l
- ld [wcd51], a
- ld a, h
- ld [wcd52], a
- call Function118b8c
- ld a, l
- ld [wcd55], a
- ld [wcd59], a
- ld a, h
- ld [wcd56], a
- ld [wcd5a], a
- call Function118b8c
- ld a, l
- ld [wcd53], a
- ld [wcd5d], a
- ld a, h
- ld [wcd54], a
- ld [wcd5e], a
- call Function118b8c
- ld a, l
- ld [wcd57], a
- ld [wcd5b], a
- ld a, h
- ld [wcd58], a
- ld [wcd5c], a
- call Function118b8c
- ld a, l
- ld [wcd5f], a
- ld a, h
- ld [wcd60], a
- ret
-; 118b8c
-
-Function118b8c: ; 118b8c
-.asm_118b8c
- call Function118b9a
- ret nc
- ld a, [hli]
- cp $d
- jr nz, .asm_118b8c
- dec hl
- xor a
- ld [hli], a
- ld [hli], a
- ret
-; 118b9a
-
-Function118b9a: ; 118b9a
- ld a, h
- cp $e0
- ret c
- ld a, $d3
- call Function118805
- and a
- ret
-; 118ba5
-
-
- charmap " ", $20 ; revert to ascii
-
-ExchangeDownloadURL: ; 0x118ba5
- db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/exchange/index.txt", 0
-
-BattleDownloadURL: ; 0x118bf7
- db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/battle/index.txt", 0
-
-NewsDownloadURL: ; 0x118c47
- db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/news/index.txt", 0
-
-MenuDownloadURL: ; 0x118c95
- db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/POKESTA/menu.cgb", 0
-
-IndexDownloadURL: ; 0x118ce5
- db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/tamago/index.txt", 0
-
-
-Function118d35: ; 118d35
-; unreferenced
- ld hl, $d200
- ld a, [wcd38]
- and a
- jr nz, .asm_118d6e
- ld a, [hli]
- cp $94
- jr nz, .asm_118d7b
- ld a, [hl]
- cp $5
- jr nz, .asm_118d7b
- ld a, [wcd4f]
- sla a
- ld b, a
- sla a
- sla a
- add b
- ld b, a
- ld a, $5
- call GetSRAMBank
- ld a, b
- ld [$b2fb], a
- call CloseSRAM
- callba Function170be4
- callba Function1700c4
- jr .asm_118d78
-
-.asm_118d6e
- ld a, [hli]
- cp $96
- jr nz, .asm_118d7b
- ld a, [hl]
- cp $0
- jr nz, .asm_118d7b
-
-.asm_118d78
- jp BattleTowerRoomMenu_IncrementJumptable
-
-.asm_118d7b
- ld a, $d3
- jp Function118805
-; 118d80
-
-Function118d80: ; 118d80
- call Function118e06
- ld a, [wcd38]
- and a
- jr z, .asm_118d8e
- call BattleTowerRoomMenu_IncrementJumptable
- jr asm_118d9f
-
-.asm_118d8e
- ld a, $9
- ld [wcd3c], a
- ld a, $12
- ld [wMobileInactivityTimerSeconds], a
- call BattleTowerRoomMenu_IncrementJumptable
-
-Function118d9b:
- call BattleTowerRoomMenu2
- ret c
-
-asm_118d9f
- ld hl, $c608
- call Function119940
- ld a, [wcd38]
- and a
- jr nz, .asm_118db2
- ld a, $8f
- ld [wcd3b], a
- jr .asm_118db7
-
-.asm_118db2
- ld a, $26
- ld [wcd3b], a
-
-.asm_118db7
- ld hl, w3_d800
- ld a, $8
- ld [hli], a
- ld a, $c6
- ld [hli], a
- ld a, [wcd3b]
- ld [hli], a
- xor a
- ld [hli], a
- ld a, $8
- ld [hli], a
- ld a, $c7
- ld [hli], a
- ld a, [wcd39]
- ld [hli], a
- ld a, [wcd3a]
- ld [hli], a
- call Function119eb4
- call Function119ec2
- ld a, $40
- ld [wcd89], a
- ld hl, w3_d800
- ld de, $de00
- ld bc, $0200
- ld a, $2c
- jp Function119e2b
-; 118ded
-
-Function118ded: ; 118ded
- ld a, [wcd38]
- and a
- jr z, .asm_118e03
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- callba Function11b93b
- pop af
- ld [rSVBK], a
-
-.asm_118e03
- jp BattleTowerRoomMenu_IncrementJumptable
-; 118e06
-
-Function118e06: ; 118e06
- ld hl, wd002
- ld a, [wcd38]
- and a
- jr z, .asm_118e1d
-.asm_118e0f
- call Function118b9a
- ret nc
- ld a, [hli]
- cp $d
- jr nz, .asm_118e0f
- ld a, [hli]
- cp $a
- jr nz, .asm_118e0f
-
-.asm_118e1d
- ld a, l
- ld [wcd39], a
- ld a, h
- ld [wcd3a], a
-.asm_118e25
- call Function118b9a
- ret nc
- ld a, [hli]
- cp $d
- jr nz, .asm_118e25
- ld a, [hli]
- cp $a
- jr nz, .asm_118e25
- dec hl
- xor a
- ld [hld], a
- ld [hl], a
- jr asm_118e3e
-
-Function118e39: ; 118e39 (46:4e39)
-.asm_118e39
- ld a, [hli]
- and a
- jr nz, .asm_118e39
- dec hl
-asm_118e3e
-.asm_118e3e
- ld a, [hld]
- cp $2f
- jr nz, .asm_118e3e
- inc hl
- inc hl
- ld de, wcd85
- ld c, $4
-.asm_118e4a
- ld a, [hli]
- cp $2e
- jr z, .asm_118e63
- cp $30
- jr c, .asm_118e67
- cp $3a
- jr nc, .asm_118e67
- sub $30
- add $f6
- ld [de], a
- inc de
- dec c
- jr nz, .asm_118e4a
- ld de, wcd85
-.asm_118e63
- ld a, $50
- ld [de], a
- ret
-.asm_118e67
- ld a, $f3
- ld [de], a
- inc de
- jr .asm_118e63
-
-Function118e6d: ; 118e6d (46:4e6d)
- xor a
- ld [wcd65], a
- ld a, $a
- jp Function119e2b
-
-Function118e76: ; 118e76 (46:4e76)
- ; Call $c in BattleTowerRoomMenu2
- ld a, $c
- ld [wcd3c], a
- jp BattleTowerRoomMenu_IncrementJumptable
-
-Function118e7e: ; 118e7e (46:4e7e)
- call BattleTowerRoomMenu2
- ret c
- ld a, $36
- jp Function119e2b
-
-BattleTowerRoomMenu_CallRoomMenu2: ; 118e87 (46:4e87)
- call BattleTowerRoomMenu2
- ret c
- ld a, [wcd33]
- ld [wcf66], a
- ret
-; 118e92 (46:4e92)
-
-Function118e92: ; 118e92
- call Function118440
- call Function1191d3
- ld a, [wcd53]
- ld l, a
- ld a, [wcd54]
- ld h, a
- ld de, wcc60
- call Function1191ad
- ret c
- ld de, w3_d800
- ld bc, $0800
- jp Function118b10
-; 118eb0
-
-Function118eb0: ; 118eb0
- call Function118440
- ld hl, $d802
- ld de, BGMapBuffer
- ld bc, $000c
- call CopyBytes
- call Function1192cc
- ret c
- jp BattleTowerRoomMenu_IncrementJumptable
-; 118ec6
-
-Function118ec6: ; 118ec6
- call Function118440
- call SpeechTextBox
- ld hl, $d80e
- ld de, $c320
- ld bc, $0026
- call CopyBytes
- xor a
- ld [$c31f], a
- ld a, $20
- ld [$c31b], a
- ld a, $c3
- ld [$c31c], a
- hlcoord 1, 14
- ld a, l
- ld [$c31d], a
- ld a, h
- ld [$c31e], a
- ld a, $2
- ld [$c31a], a
- ld a, $1d
- ld [wcd3c], a
- ld a, $24
- ld [wMobileInactivityTimerSeconds], a
- ld a, $11
- ld [wMobileInactivityTimerFrames], a
- ld a, $1c
- ld [wcd47], a
- jp BattleTowerRoomMenu_IncrementJumptable
-; 118f0d
-
-Function118f0d: ; 118f0d
- call BattleTowerRoomMenu2
- ret c
- call Function118440
-
-Function118f14:
- call Function118440
- ld a, [wcd51]
- ld l, a
- ld a, [wcd52]
- ld h, a
- ld de, wcc60
- call Function1191ad
- ret c
- ld a, [wcc60]
- and a
- jr z, .DontSendSaveFile
- ld hl, Text_SaveFileWillBeSent
- call BattleTowerRoomMenu_SetMessage
-
-.DontSendSaveFile:
- ld a, [wcd57]
- ld l, a
- ld a, [wcd58]
- ld h, a
- ld de, wcc60
- call Function1191ad
- ret c
- ld hl, wcc60
- call Function118e39
- ld a, $9
- ld [wcd3c], a
- ld a, $24
- ld [wMobileInactivityTimerSeconds], a
- ld a, $13
- ld [wMobileInactivityTimerFrames], a
- ld a, $1c
- ld [wcd47], a
- jp BattleTowerRoomMenu_IncrementJumptable
-; 118f5e
-
-Function118f5e: ; 118f5e
- call BattleTowerRoomMenu2
- ret c
- call Function118440
- call DelayFrame
-
-Function118f68:
- call Function119223
- ret c
- call Function118440
- ld a, [wcd51]
- ld l, a
- ld a, [wcd52]
- ld h, a
- ld de, wcc60
- call Function1191ad
- ret c
- ld a, [wcc60]
- and a
- jr z, .asm_118fba
- ld hl, $c346
- ld a, $c608 % $100
- ld [hli], a
- ld a, $c608 / $100
- ld [hli], a
- ld a, [wcd4b]
- ld [hli], a
- ld a, [wcd4c]
- ld [hli], a
- ld a, $c708 % $100
- ld [hli], a
- ld a, $c708 / $100
- ld [hli], a
- ld a, $60
- ld [hli], a
- ld a, $cc
- ld [hli], a
- call Function119eb4
- call Function119ec2
- ld a, $40
- ld [wcd89], a
- ld hl, $c346
- ld de, $de00
- ld bc, $0200
- ld a, $2c
- jp Function119e2b
-
-.asm_118fba
- call BattleTowerRoomMenu_IncrementJumptable
- jp BattleTowerRoomMenu_IncrementJumptable
-; 118fc0
-
-Function118fc0: ; 118fc0
- call Function118440
- ld a, [wcd55]
- ld l, a
- ld a, [wcd56]
- ld h, a
- ld de, wcc60
- call Function1191ad
- ret c
- ld a, [wcc60]
- and a
- jr z, .asm_118ffa
- ld a, [wcd51]
- ld l, a
- ld a, [wcd52]
- ld h, a
- ld de, wcc60
- call Function1191ad
- ret c
- ld a, [wcc60]
- and a
- jr z, .asm_118ff2
- ld hl, Text_SentSaveFileReadingNews
- jr .asm_118ff5
-
-.asm_118ff2
- ld hl, Text_ReadingNews
-
-.asm_118ff5
- call BattleTowerRoomMenu_SetMessage
- jr Function119009
-
-.asm_118ffa
- ld hl, Text_ReadingNews
- call BattleTowerRoomMenu_SetMessage
- call BattleTowerRoomMenu_IncrementJumptable
- call BattleTowerRoomMenu_IncrementJumptable
- jp BattleTowerRoomMenu_IncrementJumptable
-
-Function119009:
- call Function118440
- call Function119300
- ld a, [wcd55]
- ld l, a
- ld a, [wcd56]
- ld h, a
- ld de, wcc60
- call Function1191ad
- ret c
- ld hl, $c346
- ld a, $8
- ld [hli], a
- ld a, $c6
- ld [hli], a
- ld a, [wcd4b]
- ld [hli], a
- ld a, [wcd4c]
- ld [hli], a
- ld a, $8
- ld [hli], a
- ld a, $c7
- ld [hli], a
- ld a, $60
- ld [hli], a
- ld a, $cc
- ld [hli], a
- call Function119eb4
- call Function119ec2
- ld a, $40
- ld [wcd89], a
- ld hl, $c346
- ld de, w3_d000
- ld bc, $1000
- ld a, $2c
- jp Function119e2b
-; 119054
-
-Function119054: ; 119054
- ld a, $6
- call GetSRAMBank
- ld hl, wd002
- ld a, [wcd4f]
- ld e, a
- ld a, [wcd50]
- ld d, a
- ld a, [w3_d000]
- ld c, a
- ld a, [w3_d000 + 1]
- ld b, a
- call Function119192
- ret c
- ld a, [wcd89]
- and $1
- jr z, .asm_11908a
- ld a, $6
- ld [rSVBK], a
- ld hl, wd002
- ld a, [w3_d000]
- ld c, a
- ld a, [w3_d000 + 1]
- ld b, a
- call Function119192
- ret c
-
-.asm_11908a
- call CloseSRAM
- ld a, $3
- ld [rSVBK], a
- ld a, $5
- call GetSRAMBank
- ld a, [wcd4f]
- ld [$b1b3], a
- ld a, [wcd50]
- ld [$b1b4], a
- ld hl, BGMapBuffer
- ld de, $aa7f
- ld bc, $000c
- call CopyBytes
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld a, [wd474]
- ld [$b2f3], a
- ld hl, wd475
- ld de, $b2f4
- ld bc, $0004
- call CopyBytes
- pop af
- ld [rSVBK], a
- call CloseSRAM
- jp BattleTowerRoomMenu_IncrementJumptable
-; 1190d0
-
-Function1190d0: ; 1190d0
- ld a, $3
- ld [rSVBK], a
- ld a, [wcd57]
- ld l, a
- ld a, [wcd58]
- ld h, a
- ld de, wcc60
- call Function1191ad
- ret c
- ld de, w3_d000
- ld bc, $1000
- jp Function118b10
-; 1190ec
-
-Function1190ec: ; 1190ec
- ld a, $5
- call GetSRAMBank
- ld hl, BGMapBuffer
- ld de, $aa73
- ld bc, $000c
- call CopyBytes
- call CloseSRAM
- ld a, $5
- call GetSRAMBank
- ld a, $1
- ld [$aa72], a
- call CloseSRAM
- ld a, $6
- call GetSRAMBank
- ld a, [w3_d000]
- ld c, a
- ld a, [w3_d000 + 1]
- ld b, a
- ld hl, wd002
- ld de, $a000
- call Function119192
- ret c
- ld a, [wcd89]
- and $1
- jr z, .asm_11913e
- ld a, $6
- ld [rSVBK], a
- ld a, [w3_d000]
- ld c, a
- ld a, [w3_d000 + 1]
- ld b, a
- ld hl, wd002
- call Function119192
- ret c
-
-.asm_11913e
- ld a, $3
- ld [rSVBK], a
- call CloseSRAM
- ld hl, Text_ReceivedNews
- call BattleTowerRoomMenu_SetMessage
- jp BattleTowerRoomMenu_IncrementJumptable
-; 11914e
-
-Function11914e: ; 11914e
- call BattleTowerRoomMenu2
- ret c
- ld a, $1c
- ld [wcf66], a
- ld a, $a
- ld [wc300], a
- ret
-; 11915d
-
-Function11915d: ; 11915d
- ld hl, $d802
- ld de, BGMapBuffer
- ld bc, $000c
- call CopyBytes
- ld a, $5
- call GetSRAMBank
- ld hl, BGMapBuffer
- ld de, $aa7f
- ld c, $c
-.asm_119176
- ld a, [de]
- inc de
- cp [hl]
- jr nz, .asm_119184
- inc hl
- dec c
- jr nz, .asm_119176
- call BattleTowerRoomMenu_IncrementJumptable
- jr .asm_11918e
-
-.asm_119184
- ld a, $16
- ld [wcf66], a
- ld a, $b
- ld [wc300], a
-
-.asm_11918e
- call CloseSRAM
- ret
-; 119192
-
-Function119192: ; 119192
- inc b
- inc c
- jr .asm_11919e
-
-.asm_119196
- ld a, [hli]
- ld [de], a
- inc de
- ld a, $bf
- cp d
- jr c, .asm_1191a6
-
-.asm_11919e
- dec c
- jr nz, .asm_119196
- dec b
- jr nz, .asm_119196
- and a
- ret
-
-.asm_1191a6
- ld a, $d3
- call Function118805
- scf
- ret
-; 1191ad
-
-Function1191ad: ; 1191ad
- push bc
- ld c, $0
- ld a, $5
- ld [rSVBK], a
-.asm_1191b4
- ld a, [hli]
- ld [de], a
- inc de
- and a
- jr z, .asm_1191cc
- inc c
- ld a, c
- cp $a6
- jr c, .asm_1191b4
- ld a, $da
- call Function118805
- ld a, $3
- ld [rSVBK], a
- pop bc
- scf
- ret
-
-.asm_1191cc
- ld a, $3
- ld [rSVBK], a
- pop bc
- and a
- ret
-; 1191d3
-
-Function1191d3: ; 1191d3
- ld hl, w3_d100 + 2
- ld a, l
- ld [wcd53], a
- ld a, h
- ld [wcd54], a
- call Function11920f
- ld a, l
- ld [wcd51], a
- ld a, [wcd4a]
- ld a, h
- ld [wcd52], a
- call Function11920f
- ld a, l
- ld [wcd55], a
- ld a, [wcd4a]
- ld a, h
- ld [wcd56], a
- call Function11920f
- ld a, [wcd49]
- ld a, l
- ld [wcd57], a
- ld a, [wcd4a]
- ld a, h
- ld [wcd58], a
- call Function11920f
- ret
-; 11920f
-
-Function11920f: ; 11920f
-.asm_11920f
- call Function118b9a
- ret nc
- ld a, [hli]
- cp $d
- jr nz, .asm_11920f
- ld a, [hli]
- cp $a
- jr nz, .asm_11920f
- dec hl
- xor a
- ld [hld], a
- ld [hli], a
- inc hl
- ret
-; 119223
-
-Function119223: ; 119223
- xor a
- ld [wcd4b], a
- ld [wcd4c], a
- ld a, $5
- call GetSRAMBank
- ld hl, wc3cd
- ld de, $b092
- ld bc, $001f
- call CopyBytes
- dec de
- xor a
- ld [de], a
- ld hl, $d810
-.asm_119241
- ld a, [hli]
- cp $50
- jr nz, .asm_119241
- ld a, [hli]
- ld [wcd4f], a
- ld a, [hli]
- ld [wcd50], a
- ld a, [hli]
- ld [$b1b1], a
- ld c, a
- ld a, [hli]
- ld [$b1b2], a
- ld b, a
- ld de, $b1d3
- call CopyBytes
- call CloseSRAM
- ld e, l
- ld d, h
- ld hl, $c608
-.asm_119266
- ld a, [de]
- inc de
- cp $ff
- jr z, .asm_1192c2
- cp $fe
- jr z, .asm_1192a5
- call GetSRAMBank
- ld a, [de]
- inc de
- ld c, a
- ld a, [de]
- inc de
- ld b, a
- ld a, [de]
- inc de
- push de
- push af
- ld a, [wcd4b]
- ld e, a
- ld a, [wcd4c]
- ld d, a
- pop af
-.asm_119286
- push af
- ld a, [bc]
- inc bc
- ld [hli], a
- inc de
- pop af
- dec a
- jr nz, .asm_119286
- call CloseSRAM
- ld a, e
- ld [wcd4b], a
- ld a, d
- ld [wcd4c], a
- pop de
-.asm_11929b
- and a
- jr z, .asm_119266
- ld a, $d3
- call Function118805
- scf
- ret
-
-.asm_1192a5
- ld a, [wcd4b]
- ld c, a
- ld a, [wcd4c]
- ld b, a
- ld a, [de]
- inc de
-.asm_1192af
- push af
- ld a, [de]
- inc de
- ld [hli], a
- inc bc
- pop af
- dec a
- jr nz, .asm_1192af
- ld a, c
- ld [wcd4b], a
- ld a, b
- ld [wcd4c], a
- jr .asm_11929b
-
-.asm_1192c2
- ld a, e
- ld [wcd4d], a
- ld a, d
- ld [wcd4e], a
- and a
- ret
-; 1192cc
-
-Function1192cc: ; 1192cc
- ld a, $5
- call GetSRAMBank
- ld hl, $aa73
- ld de, $c608
- ld bc, $000c
- call CopyBytes
- call CloseSRAM
- ld hl, $c608
- ld de, BGMapBuffer
- ld c, $c
-.asm_1192e8
- ld a, [de]
- inc de
- ld b, a
- ld a, [hli]
- cp b
- jr nz, .asm_1192fe
- dec c
- jr nz, .asm_1192e8
- ld a, $1f
- ld [wcd3c], a
- ld a, $27
- ld [wcf66], a
- scf
- ret
-
-.asm_1192fe
- and a
- ret
-; 119300
-
-Function119300: ; 119300
- xor a
- ld [wcd4b], a
- ld [wcd4c], a
- ld a, [wcd4d]
- ld e, a
- ld a, [wcd4e]
- ld d, a
- ld hl, $c608
- ld a, [wcd4b]
- ld c, a
- ld a, [wcd4c]
- ld b, a
-.asm_11931a
- ld a, [de]
- inc de
- cp $50
- jr z, .asm_119324
- ld [hli], a
- inc bc
- jr .asm_11931a
-
-.asm_119324
- ld a, $3d
- ld [hli], a
- inc bc
- ld a, c
- ld [wcd4b], a
- ld a, b
- ld [wcd4c], a
- ld a, [de]
- inc de
- call GetSRAMBank
- ld a, [de]
- inc de
- ld c, a
- ld a, [de]
- inc de
- ld b, a
- ld a, [de]
- inc de
- push de
- push af
- ld a, [wcd4b]
- ld e, a
- ld a, [wcd4c]
- ld d, a
- pop af
-.asm_119348
- push af
- ld a, [bc]
- and $f0
- swap a
- call Function1197bf
- ld [hli], a
- inc de
- ld a, [bc]
- inc bc
- and $f
- call Function1197bf
- ld [hli], a
- inc de
- pop af
- dec a
- jr nz, .asm_119348
- call CloseSRAM
- ld a, e
- ld [wcd4b], a
- ld a, d
- ld [wcd4c], a
- pop de
- ld a, [de]
- cp $50
- jr z, .asm_11937f
- ld a, [wcd4b]
- ld c, a
- ld a, [wcd4c]
- ld b, a
- ld a, $26
- ld [hli], a
- inc bc
- jr .asm_11931a
-
-.asm_11937f
- ret
-; 119380
-
-Function119380: ; 119380
- ld a, $80
- ld [wcd49], a
- jp BattleTowerRoomMenu_IncrementJumptable
-; 119388
-
-Function119388: ; 119388
- ld hl, wcd49
- dec [hl]
- ret nz
- ld hl, wcc60
- call Function118e39
- ld a, $9
- ld [wcd3c], a
- ld a, $10
- ld [wMobileInactivityTimerSeconds], a
- call BattleTowerRoomMenu_IncrementJumptable
-
-Function1193a0:
- call BattleTowerRoomMenu2
- ret c
- call DelayFrame
- ld a, $8
- ld [wcd3c], a
- call BattleTowerRoomMenu2
- ld hl, $c346
- ld a, wd000 % $100
- ld [hli], a
- ld a, wd000 / $100
- ld [hli], a
- ld a, [wcd3b]
- ld [hli], a
- xor a
- ld [hli], a
- ld a, $c708 % $100
- ld [hli], a
- ld a, $c708 / $100
- ld [hli], a
- ld a, $60
- ld [hli], a
- ld a, $cc
- ld [hli], a
- call Function119eb4
- call Function119ec2
- ld a, $40
- ld [wcd89], a
- ld hl, $c346
- ld de, $de00
- ld bc, $0200
- ld a, $2c
- jp Function119e2b
-; 1193e3
-
-Function1193e3: ; 1193e3
- ld hl, wcd49
- dec [hl]
- ret nz
- ld hl, wcc60
- call Function118e39
- ld a, $9
- ld [wcd3c], a
- ld a, $11
- ld [wMobileInactivityTimerSeconds], a
- call BattleTowerRoomMenu_IncrementJumptable
-
-Function1193fb:
- call BattleTowerRoomMenu2
- ret c
- call DelayFrame
- ld a, $8
- ld [wcd3c], a
- call BattleTowerRoomMenu2
- ld de, w3_d000
- ld bc, $1000
- jp Function118b10
-; 119413
-
-Function119413: ; 119413
- ld a, $6
- call GetSRAMBank
- ld a, [w3_d000]
- ld c, a
- ld a, [w3_d000 + 1]
- ld b, a
- dec bc
- dec bc
- ld hl, wd002
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- call Function119192
- ret c
- ld a, [wcd89]
- and $1
- jr z, .asm_119447
- ld a, $6
- ld [rSVBK], a
- ld a, [wd000]
- ld c, a
- ld a, [w3_d000 + 1]
- ld b, a
- ld hl, wd002
- call Function119192
- ret c
-
-.asm_119447
- ld a, $3
- ld [rSVBK], a
- call CloseSRAM
- jp BattleTowerRoomMenu_IncrementJumptable
-; 119451
-
-Function119451: ; 119451 (46:5451)
- ld a, [wcd89]
- and $1
- jr z, .asm_11945d
- ld a, $d3
- jp Function118805
-.asm_11945d
- xor a
- ld [wcd50], a
- call Function119694
- ld a, b
- ld [wcd49], a
- call Function1196cd
- ld a, [wd002]
- ld hl, wd003
-
-Function119471: ; 119471 (46:5471)
- push af
- ld a, [hli]
- ld [$c608], a
- ld a, [hli]
- ld [$c608 + 3], a
- ld a, [hli]
- ld [$c608 + 1], a
- ld a, [hli]
- ld [$c608 + 2], a
- ld a, [hli]
- ld [$c608 + 4], a
- ld a, [hli]
- ld [$c608 + 5], a ; $c608 + 5
- push hl
- ld a, [$c608]
- cp $ff
- jr z, .asm_1194a7
- ld a, [$c608 + 2]
- cp $ff
- jr z, .asm_1194a7
- ld a, [$c608 + 1]
- cp $ff
- jr nz, .asm_1194a7
- call Function119584
- jr c, .asm_11950c
- jr .asm_1194f0
-.asm_1194a7
- ld hl, $c608
- ld de, $c608 + 3
- ld c, $3
-.asm_1194af
- ld a, [de]
- inc de
- cp [hl]
- inc hl
- jr c, .asm_1194f3
- jr z, .asm_1194b9
- jr nc, .asm_1194bc
-.asm_1194b9
- dec c
- jr nz, .asm_1194af
-.asm_1194bc
- ld c, $3
- ld hl, wcd49
- ld de, $c608
-.asm_1194c4
- ld a, [de]
- inc de
- cp $ff
- jr z, .asm_1194d1
- cp [hl]
- jr z, .asm_1194d1
- jr c, .asm_1194d5
- jr nc, .asm_1194f0
-.asm_1194d1
- inc hl
- dec c
- jr nz, .asm_1194c4
-.asm_1194d5
- ld c, $3
- ld hl, wcd49
- ld de, $c608 + 3
-.asm_1194dd
- ld a, [de]
- inc de
- cp $ff
- jr z, .asm_1194ea
- cp [hl]
- jr c, .asm_1194f0
- jr z, .asm_1194ea
- jr nc, .asm_11950c
-.asm_1194ea
- inc hl
- dec c
- jr nz, .asm_1194dd
- jr .asm_11950c
-.asm_1194f0
- pop hl
- jr .asm_119557
-.asm_1194f3
- ld c, $3
- ld hl, wcd49
- ld de, $c608
-.asm_1194fb
- ld a, [de]
- inc de
- cp $ff
- jr z, .asm_119508
- cp [hl]
- jr c, .asm_11950c
- jr z, .asm_119508
- jr nc, .asm_1194d5
-.asm_119508
- inc hl
- dec c
- jr nz, .asm_1194fb
-.asm_11950c
- pop hl
- ld a, $1
- ld [wcd50], a
- ld a, l
- ld [$c608], a
- ld a, h
- ld [$c608 + 1], a
- ld de, wcd69
- ld c, $10
- ld b, $0
-.asm_119521
- ld a, [de]
- inc de
- cp [hl]
- inc hl
- jr nz, .asm_119528
- inc b
-.asm_119528
- dec c
- jr nz, .asm_119521
- ld a, $10
- cp b
- jr z, .asm_119536
-rept 4
- inc hl
-endr
- jr .asm_11957a
-.asm_119536
- ld a, [hli]
- cp $50
- jr nz, .asm_119552
- ld a, [hli]
- cp $33
- jr nz, .asm_119553
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- ld a, [wcd83]
- cp c
- jr nz, .asm_119576
- ld a, [wcd84]
- cp b
- jr nz, .asm_119576
- jr .asm_11955b
-.asm_119552
- inc hl
-.asm_119553
- inc hl
- inc hl
- jr .asm_11955b
-.asm_119557
- ld de, $14
- add hl, de
-.asm_11955b
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- add hl, de
- pop af
- dec a
- jp nz, Function119471
- ld a, [wcd50]
- and a
- jr z, .asm_119571
- ld a, $1a
- ld [wcf66], a
- ret
-.asm_119571
- ld a, $d8
- jp Function118805
-.asm_119576
- ld a, $10
- jr .asm_11957c
-.asm_11957a
- ld a, $f
-.asm_11957c
- ld [wcf66], a
- pop af
- call Function1195c4
- ret
-
-Function119584: ; 119584 (46:5584)
- ld a, [$c608]
- ld b, a
- ld a, [$c608 + 3]
- ld c, a
- cp b
- jr c, .asm_11959c
- ld a, [wcd49]
- cp b
- jr c, .asm_1195c2
-.asm_119595
- cp c
- jr c, .asm_1195a2
- jr z, .asm_1195a2
- jr .asm_1195c2
-.asm_11959c
- ld a, [wcd49]
- cp b
- jr c, .asm_119595
-.asm_1195a2
- ld a, [$c608 + 2]
- ld b, a
- ld a, [$c608 + 5] ; $c608 + 5
- ld c, a
- cp b
- jr c, .asm_1195ba
- ld a, [wcd4b]
- cp b
- jr c, .asm_1195c2
-.asm_1195b3
- cp c
- jr c, .asm_1195c0
- jr z, .asm_1195c0
- jr .asm_1195c2
-.asm_1195ba
- ld a, [wcd4b]
- cp b
- jr c, .asm_1195b3
-.asm_1195c0
- scf
- ret
-.asm_1195c2
- and a
- ret
-
-Function1195c4: ; 1195c4 (46:55c4)
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- ld de, $a5
- ld a, b
- cp d
- jr c, .asm_1195d9
- jr z, .asm_1195d3
- jr nc, .asm_1195f3
-.asm_1195d3
- ld a, c
- cp e
- jr z, .asm_1195d9
- jr nc, .asm_1195f3
-.asm_1195d9
- ld de, wcc60
- call CopyBytes
- xor a
- ld [de], a
- ld a, [$c608]
- ld l, a
- ld a, [$c608 + 1]
- ld h, a
- ld de, wcd69
- ld bc, $10
- call CopyBytes
- ret
-.asm_1195f3
- ld a, $d8
- jp Function118805
-
-Function1195f8: ; 1195f8 (46:55f8)
- ld a, $11
- ld [wcd3c], a
- ld a, $1c
- ld [wMobileInactivityTimerSeconds], a
- ld a, $f
- ld [wMobileInactivityTimerFrames], a
- ld a, $14
- ld [wcd47], a
- call BattleTowerRoomMenu_IncrementJumptable
- jp BattleTowerRoomMenu_IncrementJumptable
-
-Function119612: ; 119612 (46:5612)
- ld a, $14
- ld [wcd3c], a
- ld a, $1c
- ld [wMobileInactivityTimerSeconds], a
- ld a, $10
- ld [wMobileInactivityTimerFrames], a
- ld a, $14
- ld [wcd47], a
- jp BattleTowerRoomMenu_IncrementJumptable
-
-Function119629: ; 119629 (46:5629)
- call BattleTowerRoomMenu2
- ret c
- ld a, $60
- ld l, a
- ld a, $cc
- ld h, a
- call Function118e39
- ld a, $9
- ld [wcd3c], a
- ld a, $1c
- ld [wMobileInactivityTimerSeconds], a
- ld a, $14
- ld [wcd47], a
- call BattleTowerRoomMenu_IncrementJumptable
-
-Function119648: ; 119648 (46:5648)
- call BattleTowerRoomMenu2
- ret c
- call DelayFrame
- ld a, $8
- ld [wcd3c], a
- call BattleTowerRoomMenu2
- call Function118b24
- ld de, w3_d000
- ld bc, $1000
- ld a, $2a
- jp Function119e2b
-
-Function119665: ; 119665 (46:5665)
- ld a, $1a
- ld [wcd3c], a
- call BattleTowerRoomMenu_IncrementJumptable
-
-Function11966d: ; 11966d (46:566d)
- call BattleTowerRoomMenu2
- ret c
- ld a, [wcd47]
- ld [wcf66], a
- ld a, $a
- ld [wc300], a
- ret
-
-Function11967d: ; 11967d (46:567d)
- ld a, $18
- ld [wcd3c], a
- call BattleTowerRoomMenu_IncrementJumptable
-
-Function119685: ; 119685 (46:5685)
- call BattleTowerRoomMenu2
- ret c
- ld a, $14
- ld [wcf66], a
- ld a, $a
- ld [wc300], a
- ret
-
-Function119694: ; 119694 (46:5694)
- ld b, 0
- ld hl, Unknown_1196b8
-.asm_119699
- ld de, $c708
- ld a, [de]
- inc de
- cp [hl]
- inc hl
- jr nz, .asm_1196af
- ld a, [de]
- inc de
- cp [hl]
- inc hl
- jr nz, .asm_1196b0
- ld a, [de]
- inc de
- cp [hl]
- inc hl
- jr nz, .asm_1196b1
- ret
-.asm_1196af
- inc hl
-.asm_1196b0
- inc hl
-.asm_1196b1
- inc b
- ld a, b
- cp $7
- jr nz, .asm_119699
- ret
-; 1196b8 (46:56b8)
-
-Unknown_1196b8: ; 1196b8
- db "Mon"
- db "Tue"
- db "Wed"
- db "Thu"
- db "Fri"
- db "Sat"
- db "Sun"
-; 1196cd
-
-SECTION "bank46_2", ROMX
-; A hack to use ascii above.
-
-Function1196cd: ; 1196cd (46:56cd)
- ld de, $c719
- call Function1196de
- ld [wcd4a], a
- inc de
- call Function1196de
- ld [wcd4b], a
- ret
-
-Function1196de: ; 1196de (46:56de)
- ld a, [de]
- inc de
- ; b = ([de] - 48) * 2
- ; c = ([de] - 48) * 10
- sub $30
- sla a
- ld b, a
- sla a
- sla a
- add b
- ld c, a
- add hl, bc
- ld a, [de]
- inc de
- sub $30
- add c
- ret
-; 1196f2 (46:56f2)
-
-Function1196f2: ; 1196f2
- ld hl, wd002
-.asm_1196f5
- call Function118b9a
- ret nc
- ld a, [hli]
- cp $d
- jr nz, .asm_1196f5
- ld a, [hl]
- cp $a
- jr nz, .asm_1196f5
- xor a
- ld [hld], a
- ld [hli], a
- ld a, l
- ld [wcd5b], a
- ld a, h
- ld [wcd5c], a
- inc hl
- ld e, l
- ld d, h
- ld a, [de]
- inc de
- cp $d
- jr nz, .asm_119722
- ld a, [de]
- inc de
- cp $a
- jr nz, .asm_119722
- ld a, $b
- jp Function118805
-
-.asm_119722
- call Random
- ld c, $0
- ld b, c
-.asm_119728
- call Function119798
- ld a, d
- cp $ff
- jr nz, .asm_119735
- ld a, e
- cp $ff
- jr z, .asm_11974c
-
-.asm_119735
- ld a, [hRandomSub]
- cp d
- jr c, .asm_11974c
- jr z, .asm_11973e
- jr .asm_119745
-
-.asm_11973e
- ld a, [hRandomAdd]
- cp e
- jr c, .asm_11974c
- jr z, .asm_11974c
-
-.asm_119745
- inc bc
- ld a, c
- or b
- jr z, .asm_119770
- jr .asm_119728
-
-.asm_11974c
- ld a, [wcd5b]
- ld l, a
- ld a, [wcd5c]
- ld h, a
-.asm_119754
- ld a, [hld]
- cp $58
- jr nz, .asm_119754
- ld d, $0
-.asm_11975b
- inc d
- ld a, [hld]
- cp $58
- jr z, .asm_11975b
- inc hl
- inc hl
- ld a, d
- dec a
- jr z, .asm_11978e
- dec a
- jr z, .asm_119785
- dec a
- jr z, .asm_11977e
- dec a
- jr z, .asm_119775
-
-.asm_119770
- ld a, $d3
- jp Function118805
-
-.asm_119775
- ld a, b
- and $f0
- swap a
- call Function1197bf
- ld [hli], a
-
-.asm_11977e
- ld a, b
- and $f
- call Function1197bf
- ld [hli], a
-
-.asm_119785
- ld a, c
- and $f0
- swap a
- call Function1197bf
- ld [hli], a
-
-.asm_11978e
- ld a, c
- and $f
- call Function1197bf
- ld [hli], a
- jp BattleTowerRoomMenu_IncrementJumptable
-; 119798
-
-Function119798: ; 119798
- ld d, $0
- ld e, d
- call Function1197b4
- swap a
- or d
- ld d, a
- call Function1197b4
- or d
- ld d, a
- call Function1197b4
- swap a
- or e
- ld e, a
- call Function1197b4
- or e
- ld e, a
- ret
-; 1197b4
-
-Function1197b4: ; 1197b4
- ld a, [hli]
- cp $61
- jr nc, .asm_1197bc
- sub $30
- ret
-
-.asm_1197bc
- sub $57
- ret
-; 1197bf
-
-Function1197bf: ; 1197bf
- cp $a
- jr nc, .asm_1197c6
- add $30
- ret
-
-.asm_1197c6
- add $57
- ret
-; 1197c9
-
-Function1197c9: ; 1197c9
- ld hl, wd002
- call Function118e39
- ld a, $9
- ld [wcd3c], a
- ld a, $12
- ld [wMobileInactivityTimerSeconds], a
- call BattleTowerRoomMenu_IncrementJumptable
-
-Function1197dc:
- call BattleTowerRoomMenu2
- ret c
- call DelayFrame
- ld hl, wd002
- ld de, wcc60
- ld bc, $0080
- call CopyBytes
- dec de
- xor a
- ld [de], a
- call Function118b24
- ld de, w3_d000
- ld bc, $1000
- ld a, $2a
- jp Function119e2b
-; 119800
-
-Function119800: ; 119800
- ld a, $fd
- ld [$c6d0], a
- ld [wOTTrademonSpecies], a
- ld a, [wcd81]
- ld [wc74e], a
- ld a, [wJumptableIndex]
- push af
- ld a, [wcf64]
- push af
- ld a, [wcf65]
- push af
- ld a, [wcf66]
- push af
- ld a, $1
- ld [rSVBK], a
- call FadeToMenu
- callba Function10803d
- call Function11a9ce
- call RestartMapMusic
- ld a, $3
- ld [rSVBK], a
- pop af
- ld [wcf66], a
- pop af
- ld [wcf65], a
- pop af
- ld [wcf64], a
- pop af
- ld [wJumptableIndex], a
- callba Function115dc3
- jp BattleTowerRoomMenu_IncrementJumptable
-; 11984e
-
-Function11984e: ; 11984e
- ld a, [wcd80]
- and a
- jr nz, .asm_1198a0
- ld a, [wcd38]
- and a
- jr nz, .asm_1198a8
- callba Function170000
- ld a, [wJumptableIndex]
- push af
- ld a, [wcf64]
- push af
- ld a, [wcf65]
- push af
- ld a, [wcf66]
- push af
- ld a, $1
- ld [rSVBK], a
- call FadeToMenu
- callba MobileTradeAnimation_SendGivemonToGTS
- call Function11a9ce
- call RestartMapMusic
- ld a, $3
- ld [rSVBK], a
- pop af
- ld [wcf66], a
- pop af
- ld [wcf65], a
- pop af
- ld [wcf64], a
- pop af
- ld [wJumptableIndex], a
- callba Function115dc3
- jp BattleTowerRoomMenu_IncrementJumptable
-
-.asm_1198a0
- ld a, $a
- ld [wc300], a
- jp BattleTowerRoomMenu_IncrementJumptable
-
-.asm_1198a8
- callba Function17005a
- ld a, [wJumptableIndex]
- push af
- ld a, [wcf64]
- push af
- ld a, [wcf65]
- push af
- ld a, [wcf66]
- push af
- ld a, $1
- ld [rSVBK], a
- call FadeToMenu
- callba MobileTradeAnimation_RetrieveGivemonFromGTS
- call Function11a9ce
- call RestartMapMusic
- ld a, $3
- ld [rSVBK], a
- pop af
- ld [wcf66], a
- pop af
- ld [wcf65], a
- pop af
- ld [wcf64], a
- pop af
- ld [wJumptableIndex], a
- callba Function115dc3
- jp BattleTowerRoomMenu_IncrementJumptable
-; 1198ee
-
-Function1198ee: ; 1198ee
- ld hl, Text_RegisteringRecord
- call BattleTowerRoomMenu_SetMessage
- call BattleTowerRoomMenu_IncrementJumptable
-
-Function1198f7:
- ld a, [$c31a]
- and a
- ret nz
- ld hl, $c608 + 2
- call Function119940
- ld hl, w3_d800
- ld a, $c608 % $100
- ld [hli], a
- ld a, $c608 / $100
- ld [hli], a
- ld a, $f6
- ld [hli], a
- xor a
- ld [hli], a
- ld a, $c708 % $100
- ld [hli], a
- ld a, $c708 / $100
- ld [hli], a
- ld a, [wcd51]
- ld [hli], a
- ld a, [wcd52]
- ld [hli], a
- call Function119eb4
- call Function119ec2
- ld a, $40
- ld [wcd89], a
- ld hl, w3_d800
- ld de, $de00
- ld bc, $0200
- ld a, $2c
- jp Function119e2b
-; 119937
-
-Function119937: ; 119937
- callba Function1707f4
- jp BattleTowerRoomMenu_IncrementJumptable
-; 119940
-
-Function119940: ; 119940
- ld de, wc3cd
- ld c, $1e
-.asm_119945
- ld a, [de]
- inc de
- ld [hli], a
- dec c
- jr z, .asm_119953
- and a
- jr nz, .asm_119945
- xor a
-.asm_11994f
- ld [hli], a
- dec c
- jr nz, .asm_11994f
-
-.asm_119953
- ret
-; 119954
-
-Function119954: ; 119954
- ld a, $1c
- ld [wcd3c], a
- call BattleTowerRoomMenu2
- ld hl, $c608
- ld de, wc3cd
-.asm_119962
- ld a, [de]
- inc de
- ld [hli], a
- and a
- jr nz, .asm_119962
- call Function119ec2
- ld hl, $c608
- ld a, $1e
- jp Function119e2b
-; 119973
-
-Function119973: ; 119973
- ld a, $1
- ld [wcf64], a
- xor a
- ld [wcf65], a
- ld [w3_d090], a
- ld de, w3_d000
- ld a, $20
- jp Function119e2b
-; 119987
-
-Function119987: ; 119987
- ld hl, w3_d000 + 1
- ld a, [w3_d000]
- or [hl]
- jr z, .asm_1199a0
- ld a, [wcf64]
- ld l, a
- ld a, [wcf65]
- ld h, a
- ld de, BGPals
- ld a, $22
- jp Function119e2b
-
-.asm_1199a0
- ld a, [w3_d090]
- and a
- jr z, .asm_1199ae
- ld a, $16
- ld [wcf66], a
- jp Function119b0d
-
-.asm_1199ae
- ld a, $1b
- ld [wcf66], a
- ret
-; 1199b4
-
-Function1199b4: ; 1199b4
- ld a, [wd000 + 130]
- and a
- jr nz, .asm_1199c7
- ld a, [wd000 + 129]
- cp $7
- jr nc, .asm_1199c7
- call BattleTowerRoomMenu_IncrementJumptable
- jp Function1199ca
-
-.asm_1199c7
- jp Function119ac9
-; 1199ca
-
-Function1199ca: ; 1199ca
- ld a, $20
- ld [wcd89], a
- ld a, [wcf64]
- ld l, a
- ld a, [wcf65]
- ld h, a
- ld de, w3_d100
- ld bc, $0700
- ld a, $28
- jp Function119e2b
-; 1199e2
-
-Function1199e2: ; 1199e2
- ld c, $c
- ld de, XGameCodePrefix
- call Function119e4f
- jp c, Function119ac9
- ld a, c
- cp $1
- jp nz, Function119ac9
- ld hl, w3_d880
- ld bc, XGameCode
-.loop
- ld a, [bc]
- and a
- jr z, .game_result_prefix
- cp [hl]
- jp nz, Function119ac9
- inc bc
- inc hl
- jr .loop
-
-.game_result_prefix
- ld c, $17
- ld de, XGameResultPrefix
- call Function119e4f
- jp c, .asm_119aa7
- ld a, c
- cp $1
- jp nz, .asm_119aa7
- ld a, [w3_d880]
- cp $31
- jp nz, .asm_119aa7
- ld a, [w3_d881]
- cp $20
- jp nz, .asm_119aa7
- ld a, [w3_d88a]
- cp $20
- jp nz, .asm_119aa7
- ld a, [w3_d894]
- cp $20
- jp nz, .asm_119aa7
- xor a
- ld [w3_d8a0], a
- ld [w3_d8a1], a
- ld [w3_d8a2], a
- ld [w3_d8a3], a
- ld hl, $d8a0
- ld bc, $d889
- call Function119e98
- call Function119e98
- ld hl, $d8a0
- ld a, [wcd2d]
- cp [hl]
- jr nz, Function119ac9
- inc hl
- ld a, [wcd2c]
- cp [hl]
- jr nz, Function119ac9
- inc hl
- ld a, [wcd2b]
- cp [hl]
- jr nz, Function119ac9
- inc hl
- ld a, [wcd2a]
- cp [hl]
- jr nz, Function119ac9
- xor a
- ld [w3_d8a0], a
- ld [w3_d8a1], a
- ld [w3_d8a2], a
- ld [w3_d8a3], a
- ld hl, $d8a0
- ld bc, $d88e
- call Function119e98
- ld bc, $d893
- call Function119e98
- ld hl, $d8a0
- ld a, [wcd2f]
- cp [hl]
- jr nz, .asm_119aa7
- inc hl
- ld a, [wcd2e]
- cp [hl]
- jr nz, .asm_119aa7
- inc hl
- ld a, [wcd31]
- cp [hl]
- jr nz, .asm_119aa7
- inc hl
- ld a, [wcd30]
- cp [hl]
- jr z, .asm_119aaf
-
-.asm_119aa7
- ld a, $25
- ld [wcf66], a
- jp Function119b45
-
-.asm_119aaf
- ld a, [w3_d090]
- and a
- jr nz, .asm_119aa7
- ld a, [w3_d895]
- sub $30
- ld [w3_d090], a
- ld a, [wcf64]
- ld [w3_d090 + 1], a
- ld a, [wcf65]
- ld [w3_d090 + 2], a
-
-Function119ac9:
- ld a, [w3_d000]
- ld l, a
- ld a, [w3_d000 + 1]
- ld h, a
- dec hl
- ld a, l
- ld [w3_d000], a
- ld a, h
- ld [w3_d000 + 1], a
- ld a, [wcf64]
- ld l, a
- ld a, [wcf65]
- ld h, a
- inc hl
- ld a, l
- ld [wcf64], a
- ld a, h
- ld [wcf65], a
- ld a, $10
- ld [wcf66], a
- ret
-; 119af1
-
-XGameCode:
-INCBIN "data/mobile/x-game-code.txt"
-XGameResult:
-INCBIN "data/mobile/x-game-result.txt"
-; 119b0d
-
-Function119b0d: ; 119b0d
- ld a, $8
- ld [wcd3c], a
- call BattleTowerRoomMenu2
- ld a, [w3_d090]
- cp $1
- jr z, .asm_119b23
- ld a, $19
- ld [wcf66], a
- jr Function119b3b
-
-.asm_119b23
- ld a, $10
- ld [wcd89], a
- ld a, [w3_d090 + 1]
- ld l, a
- ld a, [w3_d090 + 2]
- ld h, a
- ld de, w3_d100
- ld bc, $0700
- ld a, $24
- jp Function119e2b
-
-Function119b3b:
- ld a, [w3_d090 + 1]
- ld l, a
- ld a, [w3_d090 + 2]
- ld h, a
- jr asm_119b4d
-
-Function119b45:
- ld a, [wcf64]
- ld l, a
- ld a, [wcf65]
- ld h, a
-
-asm_119b4d
- ld a, $26
- jp Function119e2b
-; 119b52
-
-Function119b52: ; 119b52
- ld a, [w3_d090]
- cp $1
- jr nz, .asm_119b66
- ld a, $5
- call GetSRAMBank
- ld a, $4
- ld [$a800], a
- call CloseSRAM
-
-.asm_119b66
- ld a, $1c
- jp Function119e2b
-; 119b6b
-
-Function119b6b: ; 119b6b
- ld a, [w3_d090]
- cp $1
- jr z, .asm_119b75
- jp BattleTowerRoomMenu_IncrementJumptable
-
-.asm_119b75
- ld a, [w3_d100]
- ld b, a
- ld a, [w3_d100 + 1]
- or b
- jr z, .asm_119be3
- ld hl, w3_d800
- ld de, w3_d100 + 2
-.asm_119b85
- ld a, [de]
- inc de
- cp $d
- jr nz, .asm_119b85
- inc de
- ld a, [de]
- cp $d
- jr nz, .asm_119b85
- inc de
- inc de
-.asm_119b93
- ld a, [de]
- inc de
- cp $d
- jr z, .asm_119bfa
- call Function119c3e
- ret c
- ld [hli], a
- ld a, [de]
- inc de
- call Function119c3e
- ret c
- ld [hli], a
- ld a, [de]
- inc de
- call Function119c3e
- ret c
- ld [hli], a
- ld a, [de]
- inc de
- call Function119c3e
- ret c
- ld [hl], a
- push de
- ld d, [hl]
- dec hl
- ld c, [hl]
- dec hl
- ld b, [hl]
- dec hl
- ld a, [hl]
- sla b
- sla b
- sla b
- rla
- sla b
- rla
- ld [hli], a
- ld [hl], b
- inc hl
- rrc c
- rrc c
- ld [hl], c
- dec hl
- ld a, $f
- and c
- or [hl]
- ld [hli], a
- ld a, [hli]
- and $c0
- or [hl]
- dec hl
- ld [hld], a
- dec hl
- pop de
- inc hl
- inc hl
- inc hl
- ld a, h
- cp $e0
- jr c, .asm_119b93
-
-.asm_119be3
- ld a, $19
- ld [wcf66], a
- ld a, $5
- call GetSRAMBank
- ld a, $1
- ld [$a800], a
- call CloseSRAM
- xor a
- ld [w3_d090], a
- ret
-
-.asm_119bfa
- inc de
- ld a, [de]
- cp $d
- jr nz, .asm_119b93
- ld a, l
- cp (w3_d869) % $100
- jr nz, .asm_119be3
- ld a, h
- cp (w3_d869) / $100
- jr nz, .asm_119be3
- ld a, $5
- call GetSRAMBank
- ld a, [wcf64]
- ld [$b090], a
- ld a, [wcf65]
- ld [$b091], a
- ld hl, w3_d800
- ld de, $b023
- ld bc, $0069
- call CopyBytes
- ld a, $3
- ld [$a800], a
- call CloseSRAM
- ld hl, w3_d800
- ld de, $c608
- ld bc, $0069
- call CopyBytes
- jp BattleTowerRoomMenu_IncrementJumptable
-; 119c3e
-
-Function119c3e: ; 119c3e
- cp $2b
- jr c, .asm_119c68
- jr z, .asm_119c80
- cp $2f
- jr c, .asm_119c68
- jr z, .asm_119c84
- cp $30
- jr c, .asm_119c68
- cp $3a
- jr c, .asm_119c88
- cp $3d
- jr c, .asm_119c68
- jr z, .asm_119c8c
- cp $41
- jr c, .asm_119c68
- cp $5b
- jr c, .asm_119c8f
- cp $61
- jr c, .asm_119c68
- cp $7b
- jr c, .asm_119c93
-
-.asm_119c68
- ld a, $19
- ld [wcf66], a
- ld a, $5
- call GetSRAMBank
- ld a, $1
- ld [$a800], a
- call CloseSRAM
- xor a
- ld [w3_d090], a
- scf
- ret
-
-.asm_119c80
- ld a, $3e
- and a
- ret
-
-.asm_119c84
- ld a, $3f
- and a
- ret
-
-.asm_119c88
- add $4
- and a
- ret
-
-.asm_119c8c
- xor a
- and a
- ret
-
-.asm_119c8f
- sub $41
- and a
- ret
-
-.asm_119c93
- sub $47
- and a
- ret
-; 119c97
-
-BattleTowerRoomMenu_UberRestrictionMessage: ; 119c97
- ld hl, Text_UberRestriction
- call BattleTowerRoomMenu_SetMessage
- call BattleTowerRoomMenu_IncrementJumptable
- jr BattleTowerRoomMenu_WaitForMessage
-
-BattleTowerRoomMenu_PartyMonTopsThisLevelMessage:
- ld hl, Text_PartyMonTopsThisLevel
- call BattleTowerRoomMenu_SetMessage
- call BattleTowerRoomMenu_IncrementJumptable
-
-BattleTowerRoomMenu_WaitForMessage:
- ld a, [$c31a]
- and a
- ret nz
- ld a, $80
- ld [wcd50], a
- call BattleTowerRoomMenu_IncrementJumptable
-
-BattleTowerRoomMenu_DelayRestartMenu:
- ; Loops while (--[wcd50] != 0),
- ; to create some sort of "delay" after the message is written on the screen,
- ; before starting the menu again.
- ld hl, wcd50
- dec [hl]
- ret nz
- ld a, $0
- ld [wcf66], a
- ret
-; 119cc3
-
-BattleTowerRoomMenu_QuitMessage: ; 119cc3
- ld a, [wcd38]
- and a
- jr z, .asm_119cd1
- dec a
- jr z, .asm_119cd6
- ld hl, Text_QuitReadingNews
- jr .asm_119cd9
-
-.asm_119cd1
- ld hl, Text_CancelBattleRoomChallenge
- jr .asm_119cd9
-
-.asm_119cd6
- ld hl, Text_ExitGymLeaderHonorRoll
-
-.asm_119cd9
- call BattleTowerRoomMenu_SetMessage
- call BattleTowerRoomMenu_IncrementJumptable
-
-BattleTowerRoomMenu_PlaceYesNoMenu:
- ld a, [$c31a]
- and a
- ret nz
- ld a, $f
- ld [wcd3c], a
- call BattleTowerRoomMenu_IncrementJumptable
-
-BattleTowerRoomMenu_UpdateYesNoMenu:
- ; Only ever called when [wcd3c] is $10
- call BattleTowerRoomMenu2
- ret c
- ld a, [wMobileInactivityTimerFrames]
- ld [wcf66], a
- ret
-; 119cf7
-
-MenuDataHeader_119cf7: ; 119cf7
- db $40 ; flags
- db 7, 12 ; start coords
- db 11, 19 ; end coords
- dw NULL
- db 0 ; default option
-; 119cff
-
-MenuData_119cff: ; 119cff
- db $40 ; flags
- db 7, 15 ; start coords
- db 11, 19 ; end coords
- dw NULL
- db 0 ; default option
-; 119d07
-
-String_119d07:
- db " ▼@"
-
-Strings_L10ToL100: ; 119d0c
- db " L:10 @@"
- db " L:20 @@"
- db " L:30 @@"
- db " L:40 @@"
- db " L:50 @@"
- db " L:60 @@"
- db " L:70 @@"
- db " L:80 @@"
- db " L:90 @@"
- db " L:100@@"
- db "CANCEL@@"
-
-Strings_Ll0ToL40: ; 119d64
- db " L:10 @@"
- db " L:20 @@"
- db " L:30 @@"
- db " L:40 @@"
- db "CANCEL@@"
-
-String_119d8c:
- db "CANCEL@"
-; 119d93
-
-BattleTower_LevelCheck: ; 119d93 (46:5d93)
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld a, [wcd4f]
- ld c, 10
- call SimpleMultiply
- ld hl, wcd50
- ld [hl], a
- ld bc, PARTYMON_STRUCT_LENGTH
- ld de, PartyMon1Level
- ld a, [PartyCount]
-.party_loop
- push af
- ld a, [de]
- push hl
- push de
- pop hl
- add hl, bc
- push hl
- pop de
- pop hl
- cp [hl]
- jr z, .equal
- jr nc, .exceeds
-.equal
- pop af
- dec a
- jr nz, .party_loop
- pop af
- ld [rSVBK], a
- and a
- ret
-
-.exceeds
- pop af
- ld a, $4
- ld [wcf66], a
- pop af
- ld [rSVBK], a
- scf
- ret
-
-BattleTower_UbersCheck: ; 119dd1 (46:5dd1)
- ld a, [rSVBK]
- push af
- ld a, [wcd4f]
- cp 70 / 10
- jr nc, .level_70_or_more
- ld a, $1
- ld [rSVBK], a
- ld hl, PartyMon1Level
- ld bc, PARTYMON_STRUCT_LENGTH
- ld de, PartySpecies
- ld a, [PartyCount]
-.loop
- push af
- ld a, [de]
- cp MEWTWO
- jr z, .uber
- cp MEW
- jr z, .uber
- cp LUGIA
- jr c, .next
- cp NUM_POKEMON + 1
- jr nc, .next
-.uber
- ld a, [hl]
- cp 70
- jr c, .uber_under_70
-.next
- add hl, bc
- inc de
- pop af
- dec a
- jr nz, .loop
-.level_70_or_more
- pop af
- ld [rSVBK], a
- and a
- ret
-
-.uber_under_70
- pop af
- ld a, [de]
- ld [wd265], a
- call GetPokemonName
- ld hl, StringBuffer1
- ld de, wcd49
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
- ld a, $a
- ld [wcf66], a
- pop af
- ld [rSVBK], a
- scf
- ret
-; 119e2b (46:5e2b)
-
-Function119e2b: ; 119e2b (46:5e2b)
- call Function3e32
-
-BattleTowerRoomMenu_IncrementJumptable: ; 119e2e (46:5e2e)
- ld hl, wcf66
- inc [hl]
- ret
-; 119e33 (46:5e33)
-
-XGameCodePrefix: ; 119e33
-INCBIN "data/mobile/x-game-code-prefix.txt"
-XGameCodePrefixEnd:
-;119e40
-
-XGameResultPrefix: ; 119e40
-INCBIN "data/mobile/x-game-result-prefix.txt"
-XGameResultPrefixEnd:
-; 119e4f
-
-Function119e4f: ; 119e4f
- push bc
- ld hl, w3_d100
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
-.loop
- ld a, [de]
- cp [hl]
- jr z, .found_equality
-.next
- inc hl
- dec bc
- ld a, b
- or c
- jr nz, .loop
-.return_carry
- pop bc
- scf
- ret
-
-.found_equality
- push de
-.loop2
- ld a, [de]
- inc de
- cp "\n"
- jr z, .newline
- cp [hl]
- jr nz, .unequal
- inc hl
- dec bc
- ld a, b
- or c
- jr nz, .loop2
- pop de
- jr .return_carry
-
-.unequal
- pop de
- jr .next
-
-.newline
- pop de
- pop bc
- inc hl
- ld de, w3_d880
-.loop3
- ld a, [hli]
- ld [de], a
- inc de
- cp $d
- jr z, .finish
- dec c
- jr nz, .loop3
- scf
- ret
-
-.finish
- and a
- ret
-; 119e8e
-
-Function119e8e: ; 119e8e
- cp $60
- jr c, .less_than_0x60
- sub $57
- ret
-
-.less_than_0x60
- sub $30
- ret
-; 119e98
-
-Function119e98: ; 119e98
- ld a, $2
-.loop
- push af
- ld a, [bc]
- dec bc
- call Function119e8e
- or [hl]
- ld [hl], a
- ld a, [bc]
- dec bc
- call Function119e8e
- rlca
- rlca
- rlca
- rlca
- or [hl]
- ld [hl], a
- inc hl
- pop af
- dec a
- and a
- jr nz, .loop
- ret
-; 119eb4
-
-Function119eb4: ; 119eb4 (46:5eb4)
- xor a
- ld [wc3cc], a
- ld de, wc3ac
-.loop
- ld a, [de]
- inc de
- ld [hli], a
- and a
- jr nz, .loop
- ret
-
-Function119ec2: ; 119ec2 (46:5ec2)
- ld a, BANK(sMobileLoginPassword)
- call GetSRAMBank
- xor a
- ld [sMobileLoginPassword + MOBILE_LOGIN_PASSWORD_LENGTH], a
- ld de, sMobileLoginPassword + 1
-.loop
- ld a, [de]
- inc de
- ld [hli], a
- and a
- jr nz, .loop
- call CloseSRAM
- ret
-
-BattleTowerRoomMenu2: ; 119ed8 (46:5ed8)
- ld a, [rSVBK]
- ld [wcd8c], a
- ld a, $1
- ld [rSVBK], a
-
- call .RunJumptable
-
- ld a, [wcd8c]
- ld [rSVBK], a
- ld a, $1
- ld [hBGMapMode], a
- ret
-
-.RunJumptable:
- jumptable .Jumptable, wcd3c
-
-.Jumptable:
- dw Function119f3f
- dw Function119f45
- dw Function119f56
- dw Function119f76
- dw Function119f98
- dw Function11a113
- dw Function11a129
- dw Function11a131
- dw Function11a13d
- dw Function11a14b
- dw Function11a16d
- dw Function11a192
- dw Function11a2e6
- dw Function11a302
- dw Function11a33a
- dw BattleTowerRoomMenu2_PlaceYesNoMenu
- dw BattleTowerRoomMenu2_UpdateYesNoMenu
- dw Function11a357
- dw Function11a36b
- dw Function11a38d
- dw Function11a3c5
- dw Function11a3d9
- dw Function11a3f9
- dw Function11a41b
- dw Function11a452
- dw Function11a47a
- dw Function11a488
- dw Function11a49e
- dw Function11a4db
- dw Function11a4e8
- dw Function11a4fe
- dw Function11a466
- dw Function11a47a
-; 119f3f
-
-Function119f3f: ; 119f3f
- call Function11a5b9
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 119f45
-
-Function119f45: ; 119f45
- hlcoord 4, 2
- ld de, String_11a661
- call PlaceString
- ld a, $80
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 119f56
-
-Function119f56: ; 119f56
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr z, .asm_119f62
- dec a
- ld [wMobileInactivityTimerMinutes], a
- scf
- ret
-
-.asm_119f62
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a6aa
- call PlaceString
- ld a, $80
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 119f76
-
-Function119f76: ; 119f76
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr z, .asm_119f82
- dec a
- ld [wMobileInactivityTimerMinutes], a
- scf
- ret
-
-.asm_119f82
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a679
- call PlaceString
- call Function11a5f5
- xor a
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 119f98
-
-Function119f98: ; 119f98
- call Function11a536
- ret c
- call PlayClickSFX
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr nz, .asm_119fef
- call ExitMenu
- call Function11a63c
- xor a
- ld [ScriptVar], a
- call Function11a00e
- ld a, [ScriptVar]
- and a
- jr z, .asm_119fd4
- call ExitMenu
- callba ReloadMapPart
- callba Function115dc3
- ld a, [wcd33]
- ld [wcf66], a
- ld a, $a
- ld [wc300], a
- scf
- ret
-
-.asm_119fd4
- hlcoord 4, 2
- ld de, String_11a692
- call PlaceString
- ld a, $1
- ld [wc30d], a
- ld a, $1
- ld [wc314], a
- callba ReloadMapPart
- and a
- ret
-
-.asm_119fef
- call ExitMenu
- call ExitMenu
- callba ReloadMapPart
- ld a, [wMobileInactivityTimerSeconds]
- ld [wcf66], a
- callba Function115dc3
- ld a, $a
- ld [wc300], a
- scf
- ret
-; 11a00e
-
-Function11a00e: ; 11a00e
- ld a, BANK(sMobileLoginPassword)
- call GetSRAMBank
- ld a, [sMobileLoginPassword]
- and a
- jr z, .asm_11a02a
- ld a, [sMobileLoginPassword + 1]
- call CloseSRAM
- and a
- ret nz
- ld a, BANK(sMobileLoginPassword)
- call GetSRAMBank
- xor a
- ld [sMobileLoginPassword], a
-
-.asm_11a02a
- call CloseSRAM
- ld a, [BGMapPalBuffer]
- and a
- jr z, .asm_11a039
- dec a
- jr z, .asm_11a081
- jp Function11a0ca
-
-.asm_11a039
- ld a, $3
- ld [rSVBK], a
- ld hl, $c608
- ld de, w3_d800
- ld bc, $00f6
- call CopyBytes
- ld a, $1
- ld [rSVBK], a
- call FadeToMenu
- callba Function11765d
- call Function11a9ce
- ld a, $3
- ld [rSVBK], a
- ld hl, w3_d800
- ld de, $c608
- ld bc, $00f6
- call CopyBytes
- ld a, $1
- ld [rSVBK], a
- callba Function115d99
- ld c, $0
- callba Function115e18
- ld a, $1
- ld [wc305], a
- ret
-
-.asm_11a081
- xor a
- ld [wMenuBorderLeftCoord], a
- ld [wMenuBorderTopCoord], a
- ld a, $13
- ld [wMenuBorderRightCoord], a
- ld a, $5
- ld [wMenuBorderBottomCoord], a
- call PushWindow
- callba Function11765d
- callba Function117ab4
- callba MobileFunc_106462
- callba Function106464
- call ExitMenu
- callba ReloadMapPart
- callba Function115d99
- ld c, $0
- callba Function115e18
- ld a, $1
- ld [wc305], a
- ret
-; 11a0ca
-
-Function11a0ca: ; 11a0ca
- xor a
- ld [wMenuBorderLeftCoord], a
- ld [wMenuBorderTopCoord], a
- ld a, $13
- ld [wMenuBorderRightCoord], a
- ld a, $11
- ld [wMenuBorderBottomCoord], a
- call PushWindow
- callba Function11765d
- callba Function17d3f6
- callba MobileFunc_106462
- callba Function106464
- call ExitMenu
- callba ReloadMapPart
- callba Function115d99
- ld c, $0
- callba Function115e18
- ld a, $1
- ld [wc305], a
- ret
-; 11a113
-
-Function11a113: ; 11a113
- call Function11a63c
- ld c, $1
- callba Function115e18
- hlcoord 4, 2
- ld de, String_11a6c8
- call PlaceString
- and a
- ret
-; 11a129
-
-Function11a129: ; 11a129
- ld a, $80
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a131
-
-Function11a131: ; 11a131
- ld hl, wMobileInactivityTimerMinutes
- dec [hl]
- ret nz
- ld a, [wcd3c]
- inc a
- ld [wcd3c], a
-
-Function11a13d:
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a6d2
- call PlaceString
- and a
- ret
-; 11a14b
-
-Function11a14b: ; 11a14b
- ld hl, wcd85
- ld a, [hl]
- cp $f3
- jr nz, .asm_11a155
- and a
- ret
-
-.asm_11a155
- call Function11a1d6
- ret c
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a6f1
- call PlaceString
- ld a, $80
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a16d
-
-Function11a16d: ; 11a16d
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr z, .asm_11a179
- dec a
- ld [wMobileInactivityTimerMinutes], a
- scf
- ret
-
-.asm_11a179
- call Function11a63c
- call Function11a1e6
- hlcoord 4, 2
- ld de, $c346
- call PlaceString
- call Function11a5f5
- xor a
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a192
-
-Function11a192: ; 11a192
- call Function11a536
- ret c
- call PlayClickSFX
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr nz, .asm_11a1b6
- call ExitMenu
- callba ReloadMapPart
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a6d2
- call PlaceString
- and a
- ret
-
-.asm_11a1b6
- call ExitMenu
- callba ReloadMapPart
- ld a, [wMobileInactivityTimerSeconds]
- ld [wcf66], a
- ld [wcd80], a
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a6d2
- call PlaceString
- scf
- ret
-; 11a1d6
-
-Function11a1d6: ; 11a1d6
- ld a, [wcd85]
- cp $50
- jr nz, .asm_11a1e4
- ld a, $d3
- call Function118805
- scf
- ret
-
-.asm_11a1e4
- and a
- ret
-; 11a1e6
-
-Function11a1e6: ; 11a1e6
- ld hl, String_11a706
- ld de, $c346
- call Function11a1ff
- ld hl, wcd85
- call Function11a1ff
- ld hl, String_11a70b
- call Function11a1ff
- ld a, $50
- ld [de], a
- ret
-; 11a1ff
-
-Function11a1ff: ; 11a1ff
-.asm_11a1ff
- ld a, [hli]
- cp $50
- ret z
- ld [de], a
- inc de
- jr .asm_11a1ff
-; 11a207
-
-BattleTowerRoomMenu2_PlaceYesNoMenu: ; 11a207
- ld hl, MenuDataHeader_11a2de
- call LoadMenuDataHeader
- call MenuBox
- call MenuBoxCoord2Tile
- call ApplyTilemap
- hlcoord 16, 8
- ld de, String_11a2cf
- call PlaceString
- hlcoord 16, 10
- ld de, String_11a2d3
- call PlaceString
- hlcoord 15, 8
- ld a, $ed
- ld [hl], a
- xor a
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a235
-
-BattleTowerRoomMenu2_UpdateYesNoMenu: ; 11a235
- ld hl, hJoyPressed
- ld a, [hl]
- and A_BUTTON
- jr nz, .a_button
- ld a, [hl]
- and B_BUTTON
- jr nz, .b_button
- ld a, [hl]
- and D_UP
- jr nz, .d_up
- ld a, [hl]
- and D_DOWN
- jr nz, .d_down
-.asm_11a24c
- call Function11a9f0
- scf
- ret
-
-.d_up
- xor a
- ld [wcd8a], a
- ld [wcd8b], a
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr z, .asm_11a24c
- xor a
- ld [wMobileInactivityTimerMinutes], a
- hlcoord 15, 8
- ld a, $ed
- ld [hl], a
- hlcoord 15, 10
- ld a, $7f
- ld [hl], a
- jr .asm_11a24c
-
-.d_down
- xor a
- ld [wcd8a], a
- ld [wcd8b], a
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr nz, .asm_11a24c
- inc a
- ld [wMobileInactivityTimerMinutes], a
- hlcoord 15, 8
- ld a, $7f
- ld [hl], a
- hlcoord 15, 10
- ld a, $ed
- ld [hl], a
- jr .asm_11a24c
-
-.a_button
- xor a
- ld [wcd8a], a
- ld [wcd8b], a
- call PlayClickSFX
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr nz, .exit_no_carry
- call ExitMenu
- callba ReloadMapPart
- ld a, [wMobileInactivityTimerFrames]
- cp $0
- jr z, .asm_11a2b4
- ld a, [wcd47]
- jr .exit_carry
-
-.asm_11a2b4
- ld a, [wcd33]
-
-.exit_carry
- ld [wcf66], a
- ld a, $a
- ld [wc300], a
- scf
- ret
-
-.b_button
- call PlayClickSFX
-
-.exit_no_carry
- call ExitMenu
- callba ReloadMapPart
- and a
- ret
-; 11a2cf
-
-String_11a2cf: ; 11a2cf
- db "YES@"
-; 11a2d3
-
-String_11a2d3: ; 11a2d3
- db "NO@"
-; 11a2d6
-
-MenuDataHeader_11a2d6: ; 11a2d6
- db $40 ; flags
- db 6, 14 ; start coords
- db 10, 19 ; end coords
- dw NULL
- db 0 ; default option
-; 11a2de
-
-MenuDataHeader_11a2de: ; 11a2de
- db $40 ; flags
- db 7, 14 ; start coords
- db 11, 19 ; end coords
- dw NULL
- db 0 ; default option
-; 11a2e6
-
-Function11a2e6: ; 11a2e6
- call Function11a63c
- ld c, $2
- callba Function115e18
- hlcoord 4, 2
- ld de, String_11a71e
- call PlaceString
- ld a, $80
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a302
-
-Function11a302: ; 11a302
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr z, .asm_11a30e
- dec a
- ld [wMobileInactivityTimerMinutes], a
- scf
- ret
-
-.asm_11a30e
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a72a
- call PlaceString
- hlcoord 9, 4
- ld de, wcd68
- lb bc, PRINTNUM_LEADINGZEROS | 1, 2
- call PrintNum
- hlcoord 14, 4
- ld de, wcd67
- lb bc, PRINTNUM_LEADINGZEROS | 1, 2
- call PrintNum
- ld a, $80
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a33a
-
-Function11a33a: ; 11a33a
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr z, .asm_11a346
- dec a
- ld [wMobileInactivityTimerMinutes], a
- scf
- ret
-
-.asm_11a346
- call ExitMenu
- callba ReloadMapPart
- callba Function115dc3
- and a
- ret
-; 11a357
-
-Function11a357: ; 11a357
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a743
- call PlaceString
- ld a, $80
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a36b
-
-Function11a36b: ; 11a36b
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr z, .asm_11a377
- dec a
- ld [wMobileInactivityTimerMinutes], a
- scf
- ret
-
-.asm_11a377
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a755
- call PlaceString
- call Function11a5f5
- xor a
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a38d
-
-Function11a38d: ; 11a38d
- call Function11a536
- ret c
- call PlayClickSFX
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr nz, .asm_11a3b1
- call ExitMenu
- callba ReloadMapPart
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a6d2
- call PlaceString
- and a
- ret
-
-.asm_11a3b1
- call ExitMenu
- callba ReloadMapPart
- ld a, [wMobileInactivityTimerSeconds]
- ld [wcf66], a
- ld [wcd80], a
- scf
- ret
-; 11a3c5
-
-Function11a3c5: ; 11a3c5
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a762
- call PlaceString
- ld a, $80
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a3d9
-
-Function11a3d9: ; 11a3d9
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr z, .asm_11a3e5
- dec a
- ld [wMobileInactivityTimerMinutes], a
- scf
- ret
-
-.asm_11a3e5
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a779
- call PlaceString
- ld a, $80
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a3f9
-
-Function11a3f9: ; 11a3f9
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr z, .asm_11a405
- dec a
- ld [wMobileInactivityTimerMinutes], a
- scf
- ret
-
-.asm_11a405
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a755
- call PlaceString
- call Function11a5f5
- xor a
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a41b
-
-Function11a41b: ; 11a41b
- call Function11a536
- ret c
- call PlayClickSFX
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr nz, .asm_11a43f
- call ExitMenu
- callba ReloadMapPart
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a6d2
- call PlaceString
- and a
- ret
-
-.asm_11a43f
- call ExitMenu
- callba ReloadMapPart
- ld a, $1c
- ld [wcf66], a
- ld [wcd80], a
- scf
- ret
-; 11a452
-
-Function11a452: ; 11a452
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a791
- call PlaceString
- ld a, $80
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a466
-
-Function11a466: ; 11a466
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a7c1
- call PlaceString
- ld a, $80
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a47a
-
-Function11a47a: ; 11a47a
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr z, .asm_11a486
- dec a
- ld [wMobileInactivityTimerMinutes], a
- scf
- ret
-
-.asm_11a486
- and a
- ret
-; 11a488
-
-Function11a488: ; 11a488
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a7ac
- call PlaceString
- call Function11a5f5
- xor a
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a49e
-
-Function11a49e: ; 11a49e
- call Function11a536
- ret c
- call PlayClickSFX
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr nz, .asm_11a4c7
- call ExitMenu
- callba ReloadMapPart
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a6d2
- call PlaceString
- ld a, $14
- ld [wcf66], a
- and a
- ret
-
-.asm_11a4c7
- call ExitMenu
- callba ReloadMapPart
- ld a, [wMobileInactivityTimerFrames]
- ld [wcf66], a
- ld [wcd80], a
- scf
- ret
-; 11a4db
-
-Function11a4db: ; 11a4db
- call Function11a63c
- ld de, String_11a6db
- hlcoord 4, 2
- call PlaceString
- ret
-; 11a4e8
-
-Function11a4e8: ; 11a4e8
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a7d7
- call PlaceString
- call Function11a5f5
- xor a
- ld [wMobileInactivityTimerMinutes], a
- jp BattleTowerRoomMenu2_IncrementJumptable
-; 11a4fe
-
-Function11a4fe: ; 11a4fe
- call Function11a536
- ret c
- call PlayClickSFX
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr nz, .asm_11a522
- call ExitMenu
- callba ReloadMapPart
- call Function11a63c
- hlcoord 4, 2
- ld de, String_11a6d2
- call PlaceString
- and a
- ret
-
-.asm_11a522
- call ExitMenu
- callba ReloadMapPart
- ld a, [wMobileInactivityTimerSeconds]
- ld [wcf66], a
- ld [wcd80], a
- scf
- ret
-; 11a536
-
-Function11a536: ; 11a536
- ld hl, hJoyPressed
- ld a, [hl]
- and $1
- jr nz, .asm_11a5a7
- ld a, [hl]
- and $2
- jr nz, .asm_11a5a2
- ld a, [hl]
- and $40
- jr nz, .asm_11a564
- ld a, [hl]
- and $80
- jr nz, .asm_11a583
-.asm_11a54d
- ld a, [wcd3c]
- cp $4
- jr z, .asm_11a562
- call Function11a9f0
- jr nz, .asm_11a562
- call ExitMenu
- callba ReloadMapPart
-
-.asm_11a562
- scf
- ret
-
-.asm_11a564
- xor a
- ld [wcd8a], a
- ld [wcd8b], a
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr z, .asm_11a54d
- xor a
- ld [wMobileInactivityTimerMinutes], a
- hlcoord 15, 7
- ld a, $ed
- ld [hl], a
- hlcoord 15, 9
- ld a, $7f
- ld [hl], a
- jr .asm_11a54d
-
-.asm_11a583
- xor a
- ld [wcd8a], a
- ld [wcd8b], a
- ld a, [wMobileInactivityTimerMinutes]
- and a
- jr nz, .asm_11a54d
- inc a
- ld [wMobileInactivityTimerMinutes], a
- hlcoord 15, 7
- ld a, $7f
- ld [hl], a
- hlcoord 15, 9
- ld a, $ed
- ld [hl], a
- jr .asm_11a54d
-
-.asm_11a5a2
- ld a, $1
- ld [wMobileInactivityTimerMinutes], a
-
-.asm_11a5a7
- xor a
- ld [wcd8a], a
- ld [wcd8b], a
- and a
- ret
-; 11a5b0
-
-BattleTowerRoomMenu2_IncrementJumptable: ; 11a5b0
- ld a, [wcd3c]
- inc a
- ld [wcd3c], a
- scf
- ret
-; 11a5b9
-
-Function11a5b9: ; 11a5b9
- xor a
- ld [wMenuBorderLeftCoord], a
- ld [wMenuBorderTopCoord], a
- ld a, $13
- ld [wMenuBorderRightCoord], a
- ld a, $5
- ld [wMenuBorderBottomCoord], a
- call PushWindow
- hlcoord 0, 0, AttrMap
- ld b, $6
- ld c, $14
- hlcoord 0, 0
- ld b, $4
- ld c, $12
- call Function3eea
- callba ReloadMapPart
- call UpdateSprites
- ld c, $0
- callba Function115e18
- ld a, $1
- ld [wc305], a
- ret
-; 11a5f5
-
-Function11a5f5: ; 11a5f5
- ld a, $e
- ld [wMenuBorderLeftCoord], a
- ld a, $13
- ld [wMenuBorderRightCoord], a
- ld a, $6
- ld [wMenuBorderTopCoord], a
- ld a, $a
- ld [wMenuBorderBottomCoord], a
- call PushWindow
- hlcoord 14, 6, AttrMap
- ld b, $5
- ld c, $6
- hlcoord 14, 6
- ld b, $3
- ld c, $4
- call Function3eea
- hlcoord 16, 7
- ld de, String_11a2cf
- call PlaceString
- hlcoord 16, 9
- ld de, String_11a2d3
- call PlaceString
- hlcoord 15, 7
- ld a, $ed
- ld [hl], a
- callba ReloadMapPart
- ret
-; 11a63c
-
-Function11a63c: ; 11a63c
- hlcoord 4, 1
- ld de, String_11a7f4
- call PlaceString
- hlcoord 4, 2
- ld de, String_11a7f4
- call PlaceString
- hlcoord 4, 3
- ld de, String_11a7f4
- call PlaceString
- hlcoord 4, 4
- ld de, String_11a7f4
- call PlaceString
- ret
-; 11a661
-
-String_11a661: ; 11a661
- db "これから モバイルセンターに"
- next "でんわ", $1f, "かけます@"
-; 11a679
-
-String_11a679: ; 11a679
- db "モバイルアダプタ", $25, "じゅんびは"
- next "できて いますか?@"
-; 11a692
-
-String_11a692: ; 11a692
- db "でんわ", $1f, "かけています"
- next "しばらく おまちください@"
-; 11a6aa
-
-String_11a6aa: ; 11a6aa
- db "でんわをかけると つうわりょう"
- next "せつぞくりょう", $4a, "かかります@"
-; 11a6c8
-
-String_11a6c8: ; 11a6c8
- db "せつぞく しました@"
-; 11a6d2
-
-String_11a6d2: ; 11a6d2
- db "つうしん ちゅう@"
-; 11a6db
-
-String_11a6db: ; 11a6db
- db "つうしん ちゅう"
- next "セレクト エーでちゅうし@"
-; 11a6f1
-
-String_11a6f1: ; 11a6f1
- db "この サービスには"
- next "つうわりょう", $25, "ほかに@"
-; 11a706
-
-String_11a706: ; 11a706
- db "おかね", $4a, "@"
-; 11a70b
-
-String_11a70b: ; 11a70b
- db "えん"
- next "かかります よろしい ですか?@"
-; 11a71e
-
-String_11a71e: ; 11a71e
- db "つうしん しゅうりょう@"
-; 11a72a
-
-String_11a72a: ; 11a72a
- db "つないだ じかん"
- next " やく ふん びょう@"
-; 11a743
-
-String_11a743: ; 11a743
- db "もっていない データが"
- next "あります!@"
-; 11a755
-
-String_11a755: ; 11a755
- db "データ", $1f, "よみこみますか?@"
-; 11a762
-
-String_11a762: ; 11a762
- db "おなじ データ", $1f, "よみこんだ"
- next "こと", $4a, "ありますが@"
-; 11a779
-
-String_11a779: ; 11a779
- db "そのデータ", $24, "なくなっているか"
- next "こわれて います@"
-; 11a791
-
-String_11a791: ; 11a791
- db "もっている データと"
- next "おなじデータしか ありません!@"
-; 11a7ac
-
-String_11a7ac: ; 11a7ac
- db "データ", $25, "よみこみを"
- next "ちゅうし しますか?@"
-; 11a7c1
-
-String_11a7c1: ; 11a7c1 ; new news?
- db "あたらしい ニュースは"
- next "ありません でした@"
-; 11a7d7
-
-String_11a7d7: ; 11a7d7
- db "あたらしいニュース", $4a, "あります"
- next "ニュース", $1f, "よみこみますか?@"
-; 11a7f4
-
-String_11a7f4: ; 11a7f4
- db " @"
-; 11a804
-
-MenuDataHeader_11a804: ; 11a804
- db $40 ; flags
- db 0, 0 ; start coords
- db 5, 19 ; end coords
- dw NULL
- db 0 ; default option
-; 11a80c
-
-Function11a80c: ; 11a80c
- ld de, hDivisor
- ld bc, hDividend
- ld hl, Unknown_11a89a
- call Function11a88c
- ld bc, hQuotient
- ld hl, Unknown_11a8ba
- call Function11a88c
- ld bc, hPrintNum3
- ld hl, Unknown_11a8da
- call Function11a88c
- xor a
- ld b, a
- ld a, [hDivisor]
- and $f
- ld e, a
- ld a, [hPrintNum7]
- and $f
- call Function11a884
- ld e, a
- ld a, [hPrintNum9]
- and $f
- call Function11a884
- ld [wcd62], a
- ld e, b
- xor a
- ld b, a
- ld a, [hDivisor]
- and $f0
- swap a
- call Function11a884
- ld e, a
- ld a, [hPrintNum7]
- and $f0
- swap a
- call Function11a884
- ld e, a
- ld a, [hPrintNum9]
- and $f0
- swap a
- call Function11a884
- ld [wcd63], a
- ld e, b
- xor a
- ld b, a
- ld a, [hMathBuffer]
- and $f
- call Function11a884
- ld e, a
- ld a, [hPrintNum8]
- and $f
- call Function11a884
- ld e, a
- ld a, [hPrintNum10]
- and $f
- call Function11a884
- ld [wcd64], a
- ret
-; 11a884
-
-Function11a884: ; 11a884
- add e
- cp $a
- ret c
- sub $a
- inc b
- ret
-; 11a88c
-
-Function11a88c: ; 11a88c
- ld a, [bc]
- sla a
- ld c, a
- xor a
- ld b, a
- add hl, bc
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hl]
- ld [de], a
- inc de
- ret
-; 11a89a
-
-Unknown_11a89a: ; 11a89a
-x = 0
-rept 16
- bcd x % 100, x / 100
-x = x + 1
-endr
-
-Unknown_11a8ba: ; 11a8ba
-x = 0
-rept 16
- bcd x % 100, x / 100
-x = x + 16
-endr
-
-Unknown_11a8da: ; 11a8da
-x = 0
-rept 16
- bcd x % 100, x / 100
-x = x + 256
-endr
-; 11a8fa
-
-BattleTowerRoomMenu_WriteMessage: ; 11a8fa
- jumptable .Jumptable, $c31a
-; 11a909
-
-.Jumptable: ; 11a909
- dw BattleTowerRoomMenu_WriteMessage_DoNothing
- dw Function11a90f
- dw Function11a971
-; 11a90f
-
-Function11a90f: ; 11a90f
- ld a, $1
- ld [rSVBK], a
- call SpeechTextBox
- ld a, $50
- ld hl, $c320
- ld bc, $008c
- call ByteFill
- ld a, [$c31b]
- ld l, a
- ld a, [$c31c]
- ld h, a
- ld de, $c320
-.asm_11a92c
- ld a, [hli]
- cp $57
- jr z, .asm_11a94f
- cp $0
- jr z, .asm_11a92c
- cp $50
- jr z, .asm_11a92c
- cp $1
- jr z, .asm_11a941
- ld [de], a
- inc de
- jr .asm_11a92c
-
-.asm_11a941
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
-.asm_11a945
- ld a, [bc]
- inc bc
- cp $50
- jr z, .asm_11a92c
- ld [de], a
- inc de
- jr .asm_11a945
-
-.asm_11a94f
- xor a
- ld [$c31f], a
- ld a, $c320 % $100
- ld [$c31b], a
- ld a, $c320 / $100
- ld [$c31c], a
- hlcoord 1, 14
- ld a, l
- ld [$c31d], a
- ld a, h
- ld [$c31e], a
- ld hl, $c31a
- inc [hl]
- ld a, $3
- ld [rSVBK], a
-
-BattleTowerRoomMenu_WriteMessage_DoNothing:
- ret
-; 11a971
-
-Function11a971: ; 11a971
- ld hl, $c31f
- ld a, [hJoyDown]
- and a
- jr nz, .asm_11a97f
- ld a, [hl]
- and a
- jr z, .asm_11a97f
- dec [hl]
- ret
-
-.asm_11a97f
- ld a, [Options]
- and $7
- ld [hl], a
- ld hl, wcd8d
- ld a, [$c31b]
- ld e, a
- ld a, [$c31c]
- ld d, a
- ld a, [de]
- inc de
- ld [hli], a
- ld a, e
- ld [$c31b], a
- ld a, d
- ld [$c31c], a
- ld a, $50
- ld [hl], a
- ld a, [$c31d]
- ld l, a
- ld a, [$c31e]
- ld h, a
- ld de, wcd8d
- call PlaceString
- ld a, c
- ld [$c31d], a
- ld a, b
- ld [$c31e], a
- ld a, [wcd8d]
- cp $50
- jr nz, .asm_11a9bf
- xor a
- ld [$c31a], a
-
-.asm_11a9bf
- ret
-; 11a9c0
-
-BattleTowerRoomMenu_SetMessage: ; 11a9c0
- ld a, l
- ld [$c31b], a
- ld a, h
- ld [$c31c], a
- ld a, $1
- ld [$c31a], a
- ret
-; 11a9ce
-
-Function11a9ce: ; 11a9ce
- call ClearBGPalettes
- call ReloadTilesetAndPalettes
- call Call_ExitMenu
- callba MobileFunc_106462
- callba Function106464
- call ret_d90
- callba FinishExitMenu
- call UpdateSprites
- ret
-; 11a9f0
-
-Function11a9f0: ; 11a9f0
- ld a, $1
- and a
- ret
-; 11a9f4
-
-Function11a9f4: ; 11a9f4
- ld a, [wcd8a]
- ld l, a
- ld a, [wcd8b]
- ld h, a
- inc hl
- ld a, l
- ld [wcd8a], a
- ld a, h
- ld [wcd8b], a
- ld de, $d5d0
- add hl, de
- bit 7, h
- ret nz
- ld a, $d6
- call Function118805
- and a
- ret
-; 11aa13
-
-Text_SaveFileWillBeSent: ; 0x11aa13
- text "SAVE FILE will be"
- line "sent."
- done
-; 0x11aa2c
-
-Text_SentSaveFileReadingNews: ; 0x11aa2c
- text "Sent SAVE FILE."
- line "Reading NEWS…"
- done
-; 0x11aa4b
-
-Text_ReadingNews: ; 0x11aa4b
- text "Reading NEWS…"
- done
-; 0x11aa5a
-
-Text_ReceivedNews: ; 0x11aa5a
- text "Received NEWS!"
- done
-; 0x11aa6a
-
-Text_QuitReadingNews: ; 0x11aa6a
- text "Quit reading NEWS?"
- done
-; 0x11aa7e
-
-Text_CanceledSendingSaveFile: ; 0x11aa7e
- text "Canceled sending"
- line "SAVE FILE."
- done
-; 0x11aa9b
-
-Text_ReceivedOddEgg: ; 0x11aa9b
- text "ODD EGG"
- line "was received!"
- done
-; 0x11aab2
-
-Text_RegisteringRecord: ; 0x11aab2
- text "Registering your"
- line "record…"
- done
-; 0x11aacc
-
-Text_BattleRoomVisitLimit: ; 0x11aacc
- text "One visit per day"
- line "per BATTLE ROOM!"
- done
-; 0x11aaf0
-
-Text_PartyMonTopsThisLevel: ; 0x11aaf0
- text "A party #MON"
- line "tops this level."
- done
-; 0x11ab0f
-
-Text_UberRestriction: ; 0x11ab0f
- text_from_ram wcd49
- text " may go"
- line "only to BATTLE"
-
- para "ROOMS that are"
- line "Lv.70 or higher."
- done
-; 0x11ab4a
-
-Text_CancelBattleRoomChallenge: ; 0x11ab4a
- text "Cancel your BATTLE"
- line "ROOM challenge?"
- done
-; 0x11ab6e
-
-Text_ExitGymLeaderHonorRoll: ; 0x11ab6e
- text "Exit GYM LEADER"
- line "HONOR ROLL?"
- done
-; 0x11ab8b
-
-Text_LinkingWithCenter: ; 0x11ab8b
- text "Linking with the"
- line "CENTER…"
- done
-; 0x11aba5
-
-Text_WhatLevelDoYouWantToChallenge: ; 0x11aba5
- text "What level do you"
- line "want to challenge?"
- done
-; 0x11abcb
-
-Text_CheckBattleRoomListByMaxLevel: ; 0x11abcb
- text "Check BATTLE ROOM"
- line "list by max level?"
- done
-; 0x11abf1
-
-Text_EnterWhichBattleRoom: ; 0x11abf1
- text "Enter which"
- line "BATTLE ROOM?"
- done
-; 0x11ac0b
-
-Text_WhichBattleRoom: ; 0x11ac0b
- text "Which BATTLE ROOM?"
- done
-; 0x11ac1f
-
-Text_ThisBattleRoomPleaseWait: ; 0x11ac1f
- text_from_ram StringBuffer3
- text "'s ROOM"
- line "@"
- text_from_ram StringBuffer4
- text "?"
- cont "Please wait…"
- done
-; 0x11ac3e
-
-Function11ac3e: ; 11ac3e
- call SpeechTextBox
- call FadeToMenu
- callab ClearSpriteAnims2
- call Function11ac51
- call CloseSubmenu
- ret
-; 11ac51
-
-Function11ac51: ; 11ac51
- xor a
- ld [hBGMapMode], a
- ld hl, Options
- ld a, [hl]
- push af
- set 4, [hl]
- ld a, [VramState]
- push af
- xor a
- ld [VramState], a
- ld a, [hInMenu]
- push af
- ld a, $1
- ld [hInMenu], a
- xor a
- ld [hMapAnims], a
- ld [wcd49], a
- ld [wcd4a], a
- ld [wcd4c], a
- ld [wcd4d], a
- ld [wcd4e], a
- call Function11ad1b
- call DelayFrame
-.loop
- call JoyTextDelay
- ld a, [wJumptableIndex]
- bit 7, a
- jr nz, .asm_11aca8
- call Function11b314
- call Function11acb7
- call Function11ad6e
- ld a, 30 * 4
- ld [wCurrSpriteOAMAddr], a
- callba DoNextFrameForAllSprites
- callba ReloadMapPart
- jr .loop
-
-.asm_11aca8
- call ClearSprites
- pop af
- ld [hInMenu], a
- pop af
- ld [VramState], a
- pop af
- ld [Options], a
- ret
-; 11acb7
-
-Function11acb7: ; 11acb7
- ld hl, TilemapPack_11ba44
- ld a, [wcd49]
- ld c, a
- ld b, $0
- sla c
- rl b
- sla c
- rl b
- sla c
- rl b
- add hl, bc
- decoord 6, 6
- ld a, [hli]
- ld [de], a
- decoord 0, 7
- ld bc, 7
- call CopyBytes
- ld a, [wcd49]
- inc a
- ld [wcd49], a
- ld a, [hl]
- cp $ff
- jr nz, .get_the_other
- xor a
- ld [wcd49], a
-.get_the_other
- ld hl, TilemapPack_11bb7d
- ld a, [wcd4a]
- ld c, a
- ld b, $0
- sla c
- rl b
- sla c
- rl b
- sla c
- rl b
- add hl, bc
- decoord 3, 9
- ld bc, 7
- call CopyBytes
- ld a, [wcd4a]
- inc a
- ld [wcd4a], a
- inc hl
- ld a, [hl]
- cp $ff
- ret nz
- xor a
- ld [wcd4a], a
- ret
-; 11ad1b
-
-Function11ad1b: ; 11ad1b
- call ClearBGPalettes
- call ClearSprites
- call ClearTileMap
- callba Function17c000
- ld a, [wMenuCursorY]
- ld [wcd82], a
- dec a
- ld [hObjectStructIndexBuffer], a
- ld a, $10
- ld [wCurIconTile], a
- ld hl, LoadMenuMonIcon
- ld a, BANK(LoadMenuMonIcon)
- ld e, $4
- rst FarCall
- ld hl, LoadMenuMonIcon
- ld a, BANK(LoadMenuMonIcon)
- ld e, $5
- rst FarCall
- ld hl, $c6d0
- ld bc, $0115
- xor a
- call ByteFill
- xor a
- ld [wJumptableIndex], a
- ld [wcf64], a
- ld [wcf65], a
- ld [wcf66], a
- ld [wcd30], a
- ld a, $2
- ld [wc7d4], a
- callba Pokedex_OrderMonsByMode
- ret
-; 11ad6e
-
-Function11ad6e: ; 11ad6e
- ld a, [wJumptableIndex]
- ld hl, Jumptable_11ad78
- call Function11b239
- jp hl
-; 11ad78
-
-Jumptable_11ad78: ; 11ad78
- dw Function11b082
- dw Function11b0ff
- dw Function11ad95
- dw Function11adc4
- dw Function11ae4e
- dw Function11ae98
- dw Function11ad8f
- dw Function11af04
- dw Function11af4e
-; 11ad8a
-
-Function11ad8a: ; 11ad8a
- ld hl, wJumptableIndex
- inc [hl]
- ret
-; 11ad8f
-
-Function11ad8f: ; 11ad8f
- ld hl, wJumptableIndex
- set 7, [hl]
- ret
-; 11ad95
-
-Function11ad95: ; 11ad95
- ld hl, MenuDataHeader_11ae38
- call LoadMenuDataHeader
- call MenuBox
- hlcoord 12, 12
- ld de, String_11ae40
- call PlaceString
- hlcoord 10, 10, AttrMap
- lb bc, 8, 8
- call Function11afd6
- callba ReloadMapPart
- call Function11ad8a
- ld a, $1
- ld [wMenuCursorY], a
- ld hl, Unknown_11afcc
- call Function11afb7
-
-Function11adc4:
- ld hl, hJoyPressed
- ld a, [hl]
- and a
- ret z
- ld a, [hl]
- and $40
- jr nz, .asm_11ade6
- ld a, [hl]
- and $80
- jr nz, .asm_11aded
- ld a, [hl]
- and $1
- jr nz, .asm_11ae06
- ld a, [hl]
- and $2
- ret z
- call PlayClickSFX
- xor a
- ld [wJumptableIndex], a
- jr .asm_11ae2e
-
-.asm_11ade6
- ld a, [wMenuCursorY]
- dec a
- ret z
- jr .asm_11adf4
-
-.asm_11aded
- ld a, [wMenuCursorY]
- inc a
- cp $4
- ret z
-
-.asm_11adf4
- push af
- ld hl, Unknown_11afcc
- call Function11afbb
- pop af
- ld [wMenuCursorY], a
- ld hl, Unknown_11afcc
- call Function11afb7
- ret
-
-.asm_11ae06
- call PlayClickSFX
- ld a, [wMenuCursorY]
- dec a
- ld hl, wcd30
- ld [hl], a
- and a
- jr z, .asm_11ae28
- hlcoord 2, 14
- ld a, [wMenuCursorY]
- cp $2
- jr z, .asm_11ae23
- call Function11b272
- jr .asm_11ae2b
-
-.asm_11ae23
- call Function11b267
- jr .asm_11ae2b
-
-.asm_11ae28
- ld a, $3
- ld [hl], a
-
-.asm_11ae2b
- call Function11ad8a
-
-.asm_11ae2e
- call ExitMenu
- callba ReloadMapPart
- ret
-; 11ae38
-
-MenuDataHeader_11ae38: ; 11ae38
- db $40 ; flags
- db 10, 10 ; start coords
- db 17, 17 ; end coords
- dw NULL
- db 0 ; default option
-; 11ae40
-
-String_11ae40: ; 11ae40
- db "どちらでも"
- next "♂ォス"
- next "♀メス"
- db "@"
-; 11ae4e
-
-Function11ae4e: ; 11ae4e
- ld hl, MenuDataHeader_11afe8
- call LoadMenuDataHeader
- call MenuBox
- hlcoord 10, 14
- ld de, String_11aff0
- call PlaceString
- ld hl, MenuDataHeader_11b013
- call LoadMenuDataHeader
- call MenuBox
- hlcoord 16, 8
- ld de, String_11b01b
- call PlaceString
- hlcoord 14, 7, AttrMap
- lb bc, 5, 6
- call Function11afd6
- hlcoord 9, 12, AttrMap
- lb bc, 6, 11
- call Function11afd6
- callba ReloadMapPart
- call Function11ad8a
- ld a, $1
- ld [wMenuCursorY], a
- ld hl, Unknown_11afd2
- call Function11afb7
-
-Function11ae98:
- ld hl, hJoyPressed
- ld a, [hl]
- and a
- ret z
- ld a, [hl]
- and D_UP
- jr nz, .asm_11aec1
- ld a, [hl]
- and D_DOWN
- jr nz, .asm_11aec8
- ld a, [hl]
- and A_BUTTON
- jr nz, .asm_11aee1
- ld a, [hl]
- and B_BUTTON
- ret z
- call PlayClickSFX
-.asm_11aeb4
- hlcoord 2, 14
- ld a, $7f
- ld [hl], a
- ld a, $1
- ld [wJumptableIndex], a
- jr .asm_11aef7
-
-.asm_11aec1
- ld a, [wMenuCursorY]
- dec a
- ret z
- jr .asm_11aecf
-
-.asm_11aec8
- ld a, [wMenuCursorY]
- inc a
- cp $3
- ret z
-
-.asm_11aecf
- push af
- ld hl, Unknown_11afd2
- call Function11afbb
- pop af
- ld [wMenuCursorY], a
- ld hl, Unknown_11afd2
- call Function11afb7
- ret
-
-.asm_11aee1
- call PlayClickSFX
- ld a, [wMenuCursorY]
- cp $2
- jr z, .asm_11aeb4
- ld a, [wcd4b]
- ld [ScriptVar], a
- call Function11b022
- call Function11ad8a
-
-.asm_11aef7
- call ExitMenu
- call ExitMenu
- callba ReloadMapPart
- ret
-; 11af04
-
-Function11af04: ; 11af04
- ld hl, MenuDataHeader_11afe8
- call LoadMenuDataHeader
- call MenuBox
- hlcoord 10, 14
- ld de, String_11b003
- call PlaceString
- ld hl, MenuDataHeader_11b013
- call LoadMenuDataHeader
- call MenuBox
- hlcoord 16, 8
- ld de, String_11b01b
- call PlaceString
- hlcoord 14, 7, AttrMap
- lb bc, 5, 6
- call Function11afd6
- hlcoord 9, 12, AttrMap
- lb bc, 6, 11
- call Function11afd6
- callba ReloadMapPart
- call Function11ad8a
- ld a, $2
- ld [wMenuCursorY], a
- ld hl, Unknown_11afd2
- call Function11afb7
-
-Function11af4e:
- ld hl, hJoyPressed
- ld a, [hl]
- and a
- ret z
- ld a, [hl]
- and D_UP
- jr nz, .asm_11af77
- ld a, [hl]
- and D_DOWN
- jr nz, .asm_11af7e
- ld a, [hl]
- and A_BUTTON
- jr nz, .asm_11af97
- ld a, [hl]
- and B_BUTTON
- ret z
- call PlayClickSFX
-.asm_11af6a
- hlcoord 2, 14
- ld a, $7f
- ld [hl], a
- ld a, $1
- ld [wJumptableIndex], a
- jr .asm_11afaa
-
-.asm_11af77
- ld a, [wMenuCursorY]
- dec a
- ret z
- jr .asm_11af85
-
-.asm_11af7e
- ld a, [wMenuCursorY]
- inc a
- cp $3
- ret z
-
-.asm_11af85
- push af
- ld hl, Unknown_11afd2
- call Function11afbb
- pop af
- ld [wMenuCursorY], a
- ld hl, Unknown_11afd2
- call Function11afb7
- ret
-
-.asm_11af97
- call PlayClickSFX
- ld a, [wMenuCursorY]
- cp $2
- jr z, .asm_11af6a
- ld a, $6
- ld [wJumptableIndex], a
- xor a
- ld [ScriptVar], a
-
-.asm_11afaa
- call ExitMenu
- call ExitMenu
- callba ReloadMapPart
- ret
-; 11afb7
-
-Function11afb7: ; 11afb7
- ld e, $ed
- jr asm_11afbd
-
-Function11afbb:
- ld e, $7f
-
-asm_11afbd:
- ld a, [wMenuCursorY]
- dec a
- ld c, a
- ld b, 0
- add hl, bc
- add hl, bc
- ld a, e
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld [de], a
- ret
-; 11afcc
-
-Unknown_11afcc:
- dwcoord 11, 12
- dwcoord 11, 14
- dwcoord 11, 16
-
-Unknown_11afd2:
- dwcoord 15, 8
- dwcoord 15, 10
-; 11afd6
-
-Function11afd6: ; 11afd6
- ld de, SCREEN_WIDTH
- ld a, $3
-.row
- push bc
- push hl
-.col
- ld [hli], a
- dec c
- jr nz, .col
- pop hl
- add hl, de
- pop bc
- dec b
- jr nz, .row
- ret
-; 11afe8
-
-MenuDataHeader_11afe8: ; 11afe8
- db $40 ; flags
- db 12, 9 ; start coords
- db 17, 19 ; end coords
- dw NULL
- db 0 ; default option
-; 11aff0
-
-String_11aff0: ; 11aff0
- db "この じょうけんで"
- next "よろしいですか?@"
-; 11b003
-
-String_11b003: ; 11b003
- db "こうかんを"
- next "ちゅうししますか?@"
-; 11b013
-
-MenuDataHeader_11b013: ; 11b013
- db $40 ; flags
- db 7, 14 ; start coords
- db 11, 19 ; end coords
- dw NULL
- db 1 ; default option
-; 11b01b
-
-String_11b01b:
- db "はい"
- next "いいえ@"
-; 11b022
-
-Function11b022: ; 11b022
- ld a, [wcd2e]
- and a
- jr z, .asm_11b02e
- ld hl, StringBuffer3
- call Function11b03d
-
-.asm_11b02e
- ld a, [wcd30]
- and a
- ret z
- cp $3
- ret z
- ld hl, StringBuffer4
- call Function11b03d
- ret
-; 11b03d
-
-Function11b03d: ; 11b03d
- push hl
- push af
- ld c, $1
-.loop
- ld a, [hli]
- cp "♂"
- jr z, .gender
- cp "♀"
- jr z, .gender
- cp "@"
- jr z, .done
- inc c
- jr .loop
-
-.gender
- dec hl
- ld a, "@"
- ld [hli], a
-
-.done
- dec hl
- push hl
- ld e, 4
- ld d, 0
- add hl, de
- ld e, l
- ld d, h
- pop hl
-.loop2
- ld a, [hld]
- ld [de], a
- dec de
- dec c
- jr nz, .loop2
- pop af
- pop de
- cp $1
- jr nz, .female
- ld hl, .MaleString
- jr .got_string
-
-.female
- ld hl, .FemaleString
-
-.got_string
- ld bc, 4 ; string length
- call CopyBytes
- ret
-; 11b07a
-
-.MaleString: db "ォスの "
-.FemaleString: db "メスの "
-
-Function11b082: ; 11b082
- call Function11b242
- ld a, $7
- ld [wc7d3], a
- call Function11b099
- call Function11b295
- call Function11b275
- call SetPalettes
- jp Function11ad8a
-; 11b099
-
-Function11b099: ; 11b099
- ld c, $6
- hlcoord 11, 1
- ld a, [wc7d3]
- add a
- ld b, a
- xor a
- call Function11b236
- ld a, [wc7d0]
- ld e, a
- ld d, $0
- ld hl, wc6d0
- add hl, de
- ld e, l
- ld d, h
- hlcoord 11, 2
- ld a, [wc7d3]
-.loop
- push af
- ld a, [de]
- ld [wd265], a
- push de
- push hl
- call .PlaceMonNameOrPlaceholderString
- pop hl
- ld de, 2 * SCREEN_WIDTH
- add hl, de
- pop de
- inc de
- pop af
- dec a
- jr nz, .loop
- ret
-; 11b0cf
-
-.PlaceMonNameOrPlaceholderString: ; 11b0cf
- and a
- ret z
-
- call .CheckSeenFlag
- ret c
-
- call .SetCaughtFlag
- push hl
- call GetPokemonName
- pop hl
- call PlaceString
- ret
-; 11b0e1
-
-.SetCaughtFlag: ; 11b0e1
- call CheckCaughtMemMon
- jr nz, .okay
- inc hl
- ret
-
-.okay
- ld a, $1
- ld [hli], a
- ret
-; 11b0ec
-
-.CheckSeenFlag: ; 11b0ec
- call CheckSeenMemMon
- ret nz
-
- inc hl
- ld de, .EmptySlot
- call PlaceString
- scf
- ret
-; 11b0f9
-
-.EmptySlot: ; 11b0f9
- db "ーーーーー@"
-; 11b0ff
-
-Function11b0ff: ; 11b0ff
- ld hl, hJoyPressed
- ld a, [hl]
- and $2
- jr nz, .asm_11b141
- ld a, [hl]
- and $1
- jr nz, .asm_11b131
- call Function11b175
- jr nc, .asm_11b125
- ld a, [wcd4c]
- inc a
- and $3
- ld [wcd4c], a
- xor a
- ld [hBGMapMode], a
- call Function11b099
- ld a, $1
- ld [hBGMapMode], a
- ret
-
-.asm_11b125
- ld a, [wcd4c]
- and a
- ret z
- inc a
- and $3
- ld [wcd4c], a
- ret
-
-.asm_11b131
- call Function11b20b
- call CheckSeenMemMon
- jr z, .asm_11b13d
- ld a, $1
- jr .asm_11b148
-
-.asm_11b13d
- ld a, $2
- jr .asm_11b148
-
-.asm_11b141
- ld hl, wJumptableIndex
- ld a, $7
- ld [hl], a
- ret
-
-.asm_11b148
- call PlayClickSFX
- ld [wcd4b], a
- and a
- jr z, .asm_11b16c
- ld a, [wcf65]
- cp $0
- jr z, .asm_11b163
- cp $fe
- jr z, .asm_11b167
- cp $ff
- jr z, .asm_11b16b
- jp Function11ad8a
-
-.asm_11b163
- ld a, $1
- jr .asm_11b16c
-
-.asm_11b167
- ld a, $2
- jr .asm_11b16c
-
-.asm_11b16b
- xor a
-
-.asm_11b16c
- ld [wcd30], a
- ld a, $4
- ld [wJumptableIndex], a
- ret
-; 11b175
-
-Function11b175: ; 11b175
- ld a, [wc7d3]
- ld d, a
- ld a, [wc7d2]
- ld e, a
- ld hl, hJoyLast
- ld a, [hl]
- and $40
- jr nz, .asm_11b19a
- ld a, [hl]
- and $80
- jr nz, .asm_11b1ae
- ld a, d
- cp e
- jr nc, .asm_11b1ed
- ld a, [hl]
- and $20
- jr nz, .asm_11b1c6
- ld a, [hl]
- and $10
- jr nz, .asm_11b1d8
- jr .asm_11b1ed
-
-.asm_11b19a
- ld hl, wc7d1
- ld a, [hl]
- and a
- jr z, .asm_11b1a4
- dec [hl]
- jr .asm_11b1ef
-
-.asm_11b1a4
- ld hl, wc7d0
- ld a, [hl]
- and a
- jr z, .asm_11b1ed
- dec [hl]
- jr .asm_11b1ef
-
-.asm_11b1ae
- ld hl, wc7d1
- ld a, [hl]
- inc a
- cp e
- jr nc, .asm_11b1ed
- cp d
- jr nc, .asm_11b1bc
- inc [hl]
- jr .asm_11b1ef
-
-.asm_11b1bc
- ld hl, wc7d0
- add [hl]
- cp e
- jr nc, .asm_11b1ed
- inc [hl]
- jr .asm_11b1ef
-
-.asm_11b1c6
- ld hl, wc7d0
- ld a, [hl]
- and a
- jr z, .asm_11b1ed
- cp d
- jr nc, .asm_11b1d4
- xor a
- ld [hl], a
- jr .asm_11b1ef
-
-.asm_11b1d4
- sub d
- ld [hl], a
- jr .asm_11b1ef
-
-.asm_11b1d8
- ld hl, wc7d0
- ld a, d
- add a
- add [hl]
- jr c, .asm_11b1e3
- cp e
- jr c, .asm_11b1e8
-
-.asm_11b1e3
- ld a, e
- sub d
- ld [hl], a
- jr .asm_11b1ef
-
-.asm_11b1e8
- ld a, [hl]
- add d
- ld [hl], a
- jr .asm_11b1ef
-
-.asm_11b1ed
- and a
- ret
-
-.asm_11b1ef
- call Function11b295
- call Function11b275
- scf
- ret
-; 11b1f7
-
-Function11b1f7: ; 11b1f7
- hlcoord 0, 0
- ld a, $32
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- call ByteFill
- ret
-; 11b203
-
-Function11b203: ; 11b203
-.asm_11b203
- ld a, [de]
- cp $ff
- ret z
- inc de
- ld [hli], a
- jr .asm_11b203
-; 11b20b
-
-Function11b20b: ; 11b20b
- ld a, [wc7d1]
- ld hl, wc7d0
- add [hl]
- ld e, a
- ld d, $0
- ld hl, $c6d0
- add hl, de
- ld a, [hl]
- ld [wd265], a
- ret
-; 11b21e
-
-CheckCaughtMemMon: ; 11b21e
- push de
- push hl
- ld a, [wd265]
- dec a
- call CheckCaughtMon
- pop hl
- pop de
- ret
-; 11b22a
-
-CheckSeenMemMon: ; 11b22a
- push de
- push hl
- ld a, [wd265]
- dec a
- call CheckSeenMon
- pop hl
- pop de
- ret
-; 11b236
-
-Function11b236: ; 11b236
- jp FillBoxWithByte
-; 11b239
-
-Function11b239: ; 11b239
- ld e, a
- ld d, 0
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ret
-; 11b242
-
-Function11b242: ; 11b242
- hlcoord 3, 4
- ld de, StringBuffer3
- call PlaceString
- xor a
- ld [MonType], a
- callba GetGender
- hlcoord 1, 4
- ld a, [CurPartySpecies]
- ld bc, wcd2f
- ld [bc], a
- dec bc
- jr c, asm_11b26a
- jr z, asm_11b26f
- ld a, $1
- ld [bc], a
-
-Function11b267:
- ld [hl], $ef
- ret
-
-asm_11b26a
- xor a
- ld [bc], a
- ld [hl], $7f
- ret
-
-asm_11b26f
- ld a, $2
- ld [bc], a
-
-Function11b272:
- ld [hl], $f5
- ret
-; 11b275
-
-Function11b275: ; 11b275
- call Function11b279
- ret
-; 11b279
-
-Function11b279: ; 11b279
- ld a, [wd265]
- ld [CurSpecies], a
- call CheckSeenMemMon
- jr z, .asm_11b28f
- call GetBaseData
- ld a, [BaseGender]
- ld [wcf65], a
- jr .asm_11b294
-
-.asm_11b28f
- ld a, $ff
- ld [wcf65], a
-
-.asm_11b294
- ret
-; 11b295
-
-Function11b295: ; 11b295
- hlcoord 4, 13
- ld de, String_11b308
- call PlaceString
- hlcoord 4, 14
- ld de, String_11b308
- call PlaceString
- call Function11b20b
- call CheckSeenMemMon
- jr z, .asm_11b2d1
- ld a, [$c608]
- ld c, a
- ld a, [$c608 + 1]
- ld b, a
- ld hl, $0007
- add hl, bc
- xor a
- ld [hl], a
- ld hl, $0003
- add hl, bc
- ld e, [hl]
- callba FlyFunction_GetMonIcon
- hlcoord 4, 14
- push hl
- call GetPokemonName
- jr .asm_11b2e7
-
-.asm_11b2d1
- ld a, [$c608]
- ld c, a
- ld a, [$c608 + 1]
- ld b, a
- ld hl, $0007
- add hl, bc
- ld a, $50
- ld [hl], a
- hlcoord 4, 13
- push hl
- ld de, String_11b30e
-
-.asm_11b2e7
- ld a, $6
- ld bc, StringBuffer4
-.asm_11b2ec
- push af
- ld a, [de]
- ld [bc], a
- inc de
- inc bc
- pop af
- dec a
- and a
- jr nz, .asm_11b2ec
- pop hl
- ld de, StringBuffer4
- call PlaceString
- ret
-; 11b2fe
-
-String_11b2fe: ; 11b2fe
- db "あげる#@"
-; 11b303
-
-String_11b303: ; 11b303
- db "ほしい#@"
-; 11b308
-
-String_11b308: ; 11b308
- db " @"
-; 11b30e
-
-String_11b30e: ; 11b30e
- db "みはっけん@"
-; 11b314
-
-Function11b314: ; 11b314
- call Function11b31b
- call Function11b3d9
- ret
-; 11b31b
-
-Function11b31b: ; 11b31b
- ld hl, .Coords
- ld a, [wJumptableIndex]
- cp 2
- jr c, .tilemap_1
- ld a, [wc7d1]
- cp 4
- jr nc, .tilemap_3
- cp 3
- jr c, .tilemap_1
- ld a, [wJumptableIndex]
- cp 2
- jr z, .tilemap_1
- cp 3
- jr z, .tilemap_1
- cp 6
- jr z, .tilemap_1
-
- ld bc, .Tilemap2
- jr .load_sprites
-
-.tilemap_3
- ld bc, .Tilemap3
- jr .load_sprites
-
-.tilemap_1
- ld bc, .Tilemap1
-
-.load_sprites
- call Function11b397
- ret
-; 11b350
-
-.Coords:
- dbpixel 3, 11, 2, 6 ; 0
- dbpixel 3, 12, 2, 6 ; 1
- dbpixel 3, 13, 2, 6 ; 2
- dbpixel 3, 14, 2, 6 ; 3
- dbpixel 3, 15, 2, 6 ; 4
- dbpixel 3, 16, 2, 6 ; 5
- dbpixel 3, 17, 2, 6 ; 6
- dbpixel 4, 11, 2, 6 ; 7
- dbpixel 4, 12, 2, 6 ; 8
- dbpixel 4, 13, 2, 6 ; 9
- dbpixel 4, 14, 2, 6 ; 10
- dbpixel 4, 15, 2, 6 ; 11
- dbpixel 4, 16, 2, 6 ; 12
- dbpixel 4, 17, 2, 6 ; 13
- db -1
-
-.Tilemap1: ; vtiles
- db $30 ; 0
- db $31 ; 1
- db $31 ; 2
- db $31 ; 3
- db $31 ; 4
- db $31 ; 5
- db $32 ; 6
- db $40 ; 7
- db $41 ; 8
- db $41 ; 9
- db $41 ; 10
- db $41 ; 11
- db $41 ; 12
- db $42 ; 13
-
-.Tilemap2: ; vtiles
- db $30 ; 0
- db $31 ; 1
- db $31 ; 2
- db $39 ; 3
- db $39 ; 4
- db $39 ; 5
- db $39 ; 6
- db $40 ; 7
- db $41 ; 8
- db $41 ; 9
- db $39 ; 10
- db $39 ; 11
- db $39 ; 12
- db $39 ; 13
-
-.Tilemap3: ; vtiles
- db $39 ; 0
- db $39 ; 1
- db $39 ; 2
- db $39 ; 3
- db $39 ; 4
- db $39 ; 5
- db $39 ; 6
- db $39 ; 7
- db $39 ; 8
- db $39 ; 9
- db $39 ; 10
- db $39 ; 11
- db $39 ; 12
- db $39 ; 13
-
-Function11b397: ; 11b397
- ld de, Sprites
-.loop
- ld a, [hl]
- cp $ff
- ret z
- ld a, [wc7d1]
- and $7
- swap a
- add [hl]
- inc hl ; 1
- ld [de], a
- inc de
-
- ld a, [hli] ; 2
- ld [de], a
- inc de
-
- ld a, [bc]
- inc bc
- ld [de], a
- inc de
- ld a, $5 ; OBPal 5
- ld [de], a
- inc de
- jr .loop
-; 11b3b6
-
-Function11b3b6: ; 11b3b6
-; unreferenced
-.loop
- ld a, [hl]
- cp -1
- ret z
- ld a, [wcd4d]
- and $7
- swap a
- add [hl]
- inc hl
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- inc de
- push hl
- ld l, c
- ld h, b
- ld a, [wcd4e]
- add [hl]
- inc bc
- ld [de], a
- inc de
- pop hl
- ld a, $5
- ld [de], a
- inc de
- jr .loop
-; 11b3d9
-
-Function11b3d9: ; 11b3d9
- ld de, Sprites + 28 * 4
- push de
- ld a, [wc7d2]
- dec a
- ld e, a
- ld a, [wc7d1]
- ld hl, wc7d0
- add [hl]
- cp e
- jr z, .skip
- ld hl, 0
- ld bc, $70
- call AddNTimes
- ld e, l
- ld d, h
- ld b, 0
- ld a, d
- or e
- jr z, .load_sprites
- ld a, [wc7d2]
- ld c, a
-.loop1
- ld a, e
- sub c
- ld e, a
- ld a, d
- sbc $0
- ld d, a
- jr c, .load_sprites
- inc b
- jr .loop1
-
-.skip
- ld b, 14 * 8
-
-.load_sprites
- ld a, 2 * 8 + 5
- add b
- pop hl
- ld [hli], a
- cp $41
- jr c, .version1
- ld a, [wJumptableIndex]
- cp 4
- jr z, .version2
- cp 5
- jr z, .version2
- cp 7
- jr z, .version2
- cp 8
- jr z, .version2
-
-.version1
- ld a, 19 * 8 + 3
- ld [hli], a
- ld a, [wcd4c]
- add $3c
- ld [hli], a
- ld a, [wcd4c]
- add $1
- ld [hl], a
- ret
-
-.version2
- ld a, 19 * 8 + 3
- ld [hli], a
- ld a, $39
- ld [hli], a
- xor a
- ld [hl], a
- ret
-; 11b444
-
-Function11b444: ; 11b444
-; special
- call Mobile46_InitJumptable
- call Mobile46_RunJumptable
- ret
-; 11b44b
-
-Mobile46_InitJumptable: ; 11b44b
- xor a
- ld [wJumptableIndex], a
- ld [wcf64], a
- ld [wcf65], a
- ld [wcf66], a
- call UpdateTime
- ret
-; 11b45c
-
-Mobile46_RunJumptable: ; 11b45c
-.loop
- call .IterateJumptable
- call DelayFrame
- ld a, [wJumptableIndex]
- cp 4
- jr nz, .loop
- ret
-; 11b46a
-
-.IterateJumptable: ; 11b46a
- jumptable .Jumptable, wJumptableIndex
-
-.Jumptable:
- dw Function11b483
- dw Function11b570
- dw Function11b5c0
- dw Function11b5e0
- dw Function11b5e7 ; unused
-; 11b483
-
-Function11b483: ; 11b483
- call .InitRAM
- ld hl, PlayerName
- ld a, $5 ; Japanese Name Length
-.loop1
- push af
- ld a, [hli]
- ld [bc], a
- inc bc
- pop af
- dec a
- and a
- jr nz, .loop1
-
- ld de, PARTYMON_STRUCT_LENGTH
- ld hl, PartyMon1Species
- ld a, [wcd82]
- dec a
- push af
-.loop2
- and a
- jr z, .okay
- add hl, de
- dec a
- jr .loop2
-
-.okay
- push bc
- ld a, PARTYMON_STRUCT_LENGTH
-.loop3
- push af
- ld a, [hli]
- ld [bc], a
- inc bc
- pop af
- dec a
- and a
- jr nz, .loop3
-
- pop de
- push bc
- ld a, [de]
- ld [CurSpecies], a
- call GetBaseData
- ld hl, MON_LEVEL
- add hl, de
- ld a, [hl]
- ld [CurPartyLevel], a
- ld hl, MON_MAXHP
- add hl, de
- push hl
- ld hl, MON_STAT_EXP - 1
- add hl, de
- pop de
- push de
- ld b, OTPARTYMON
- predef CalcPkmnStats
- pop de
- ld h, d
- ld l, e
- dec hl
- dec hl
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hl], a
- pop bc
- ld de, NAME_LENGTH
- ld hl, PartyMonOT
- pop af
- push af
-.loop4
- and a
- jr z, .okay2
- add hl, de
- dec a
- jr .loop4
-
-.okay2
- ld a, NAME_LENGTH - 1
-.loop5
- push af
- ld a, [hli]
- ld [bc], a
- inc bc
- pop af
- dec a
- and a
- jr nz, .loop5
- ld de, NAME_LENGTH
- ld hl, PartyMonNicknames
- pop af
- push af
-.loop6
- and a
- jr z, .okay3
- add hl, de
- dec a
- jr .loop6
-
-.okay3
- ld a, NAME_LENGTH - 1
-.loop7
- push af
- ld a, [hli]
- ld [bc], a
- inc bc
- pop af
- dec a
- and a
- jr nz, .loop7
- ld de, MAIL_STRUCT_LENGTH
- ld hl, sPartyMail
- pop af
-.loop8
- and a
- jr z, .okay4
- add hl, de
- dec a
- jr .loop8
-
-.okay4
- ld a, $0 ; BANK(sPartyMail)
- call GetSRAMBank
- ld a, MAIL_STRUCT_LENGTH
-.loop9
- push af
- ld a, [hli]
- ld [bc], a
- inc bc
- pop af
- dec a
- and a
- jr nz, .loop9
- call CloseSRAM
- jp Function11ad8a
-
-.InitRAM:
- ld bc, $c626
- ld a, [PlayerID]
- ld [wcd2a], a
- ld [bc], a
- inc bc
-
- ld a, [PlayerID + 1]
- ld [wcd2b], a
- ld [bc], a
- inc bc
-
- ld a, [wSecretID]
- ld [wcd2c], a
- ld [bc], a
- inc bc
-
- ld a, [wSecretID + 1]
- ld [wcd2d], a
- ld [bc], a
- inc bc
-
- ld a, [wcd2e]
- ld [bc], a
- inc bc
-
- ld a, [wcd2f]
- ld [bc], a
- inc bc
-
- ld a, [wcd30]
- ld [bc], a
- inc bc
-
- ld a, [wd265]
- ld [bc], a
- inc bc
- ret
-; 11b570
-
-Function11b570: ; 11b570
- call Function118007
- ld a, [ScriptVar]
- and a
- jr nz, .exit
- call .SaveData
- jp Function11ad8a
-
-.exit
- ld a, $4
- ld [wJumptableIndex], a
- ret
-
-.SaveData:
- ld a, $3
- ld [rSVBK], a
-
- ld hl, w3_d800
- ld de, $c608
- ld bc, w3_d88f - w3_d800
- call CopyBytes
-
- ld a, $1
- ld [rSVBK], a
- ld a, $5
- call GetSRAMBank
-
- ld de, $a800
- ld a, $1
- ld [de], a
- inc de
- ld hl, $c608
- ld bc, w3_d88f - w3_d800
- call CopyBytes
-
- push de
- pop hl
-
- ld a, [hRTCMinutes]
- ld [hli], a
- ld a, [hRTCHours]
- ld [hli], a
- ld a, [hRTCDayLo]
- ld [hli], a
- ld a, [hRTCDayHi]
- ld [hl], a
-
- call CloseSRAM
- ret
-; 11b5c0
-
-Function11b5c0: ; 11b5c0
- ld a, [wcd82]
- dec a
- ld [CurPartyMon], a
- xor a
- ld [wPokemonWithdrawDepositParameter], a
- callba RemoveMonFromPartyOrBox
- callba Function170807
- callba SaveAfterLinkTrade
- jp Function11ad8a
-; 11b5e0
-
-Function11b5e0: ; 11b5e0
- xor a
- ld [ScriptVar], a
- jp Function11ad8a
-; 11b5e7
-
-Function11b5e7: ; 11b5e7
- ret
-; 11b5e8
-
-Function11b5e8: ; 11b5e8
- ld a, $0
- call GetSRAMBank
- ld hl, wRTC
- ld de, $c608
- ld bc, 4
- call CopyBytes
- call CloseSRAM
- ld a, $5
- call GetSRAMBank
- ld hl, $c608
- ld de, $b08c
- ld bc, 4
- call CopyBytes
- ld a, $2
- ld [$a800], a
- ld a, [$a81f]
- ld [wcd2a], a
- ld a, [$a820]
- ld [wcd2b], a
- ld a, [$a821]
- ld [wcd2c], a
- ld a, [$a822]
- ld [wcd2d], a
- ld a, [$a823]
- ld [wcd2e], a
- ld a, [$a824]
- ld [wcd2f], a
- ld a, [$a825]
- ld [wcd30], a
- ld a, [$a826]
- ld [wcd31], a
- call CloseSRAM
- call Mobile46_InitJumptable
- call .loop
- ret
-
-.loop
- call .RunJumptable
- call DelayFrame
- ld a, [wJumptableIndex]
- cp $1
- jr nz, .loop
- ret
-
-.RunJumptable:
- jumptable .Jumptable, wJumptableIndex
-.Jumptable:
- dw Function11b66d
- dw Function11b6b3
-; 11b66d
-
-Function11b66d: ; 11b66d
- call Function1180b8
- ld a, [ScriptVar]
- and a
- jr nz, .asm_11b6b0
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
- ld a, [w3_d090]
- ld b, a
- pop af
- ld [rSVBK], a
- ld a, b
- and a
- jr z, .asm_11b691
- cp $1
- jr nz, .asm_11b6b0
- call Function11b6b4
- jr .asm_11b6b0
-
-.asm_11b691
- callba Function17081d
- ld a, [ScriptVar]
- and a
- jr z, .asm_11b6b0
- xor a
- ld [ScriptVar], a
- ld a, [rSVBK]
- push af
- ld a, $3
- ld [rSVBK], a
- ld a, $2
- ld [w3_d090], a
- pop af
- ld [rSVBK], a
-
-.asm_11b6b0
- jp Function11ad8a
-; 11b6b3
-
-Function11b6b3: ; 11b6b3
- ret
-; 11b6b4
-
-Function11b6b4: ; 11b6b4
- ld a, $5
- call GetSRAMBank
- ld a, [wcd30]
- ld [$c708], a
- ld a, [wcd31]
- ld [$c709], a
-
- ld a, $c708 % $100
- ld [wMobileMonSpeciesPointerBuffer], a
- ld a, $c708 / $100
- ld [wMobileMonSpeciesPointerBuffer + 1], a
-
- ld a, $c60d % $100 ; Partymon Struct
- ld [wMobileMonStructurePointerBuffer], a
- ld a, $c60d / $100
- ld [wMobileMonStructurePointerBuffer + 1], a
-
- ld a, $c63d % $100 ; OT
- ld [wMobileMonOTNamePointerBuffer], a
- ld a, $c63d / $100
- ld [wMobileMonOTNamePointerBuffer + 1], a
-
- ld a, $c642 % $100 ; Nickname
- ld [wMobileMonNicknamePointerBuffer], a
- ld a, $c642 / $100
- ld [wMobileMonNicknamePointerBuffer + 1], a
-
- ld a, $c647 % $100 ; ???
- ld [wMobileMonMailPointerBuffer], a
- ld a, $c647 / $100
- ld [wMobileMonMailPointerBuffer + 1], a
-
- ld a, $46
- ld [$c628], a
-
- ld de, $c63d
- ld c, 5
- callba CheckStringForErrors
- jr nc, .length_check_OT
- callba Mobile_CopyDefaultOTName
-
-.length_check_OT
- ld de, $c63d
- lb bc, 1, 5
- callba CheckStringContainsLessThanBNextCharacters
- jr nc, .error_check_nick
- callba Mobile_CopyDefaultOTName
-
-.error_check_nick
- ld de, $c642
- ld c, 5
- callba CheckStringForErrors
- jr nc, .length_check_nick
- callba Mobile_CopyDefaultNickname
-
-.length_check_nick
- ld de, $c642
- lb bc, 1, 5
- callba CheckStringContainsLessThanBNextCharacters
- jr nc, .error_check_mail
- callba Mobile_CopyDefaultNickname
-
-.error_check_mail
- ld de, $c647
- ld c, MAIL_MSG_LENGTH + 1
- callba CheckStringForErrors
- jr nc, .length_check_mail
- callba Mobile_CopyDefaultMail
-
-.length_check_mail
- ld de, $c647
- lb bc, 2, MAIL_MSG_LENGTH + 1
- callba CheckStringContainsLessThanBNextCharacters
- jr c, .fix_mail
- ld a, b
- cp $2
- jr nz, .mail_ok
-
-.fix_mail
- callba Mobile_CopyDefaultMail
-
-.mail_ok
- ld de, $c668
- ld c, $5
- callba CheckStringForErrors
- jr nc, .length_check_author
- callba Mobile_CopyDefaultMailAuthor
-
-.length_check_author
- ld de, $c668
- lb bc, 1, 5
- callba CheckStringContainsLessThanBNextCharacters
- jr nc, .author_okay
- callba Mobile_CopyDefaultMailAuthor
-
-.author_okay
- ld a, [$c60e]
- cp -1
- jr nz, .item_okay
- xor a
- ld [$c60e], a
-
-.item_okay
- ld a, [wcd31]
- ld [$c60d], a
- ld [CurSpecies], a
- call GetBaseData
-
- ld hl, $c60d + MON_LEVEL
- ld a, [hl]
- cp MIN_LEVEL
- ld a, MIN_LEVEL
- jr c, .replace_level
- ld a, [hl]
- cp MAX_LEVEL
- jr c, .done_level
- ld a, MAX_LEVEL
-.replace_level
- ld [hl], a
-.done_level
- ld [CurPartyLevel], a
-
- ld hl, $c60d + MON_STAT_EXP - 1
- ld de, $c60d + MON_MAXHP
- ld b, $1
- predef CalcPkmnStats
- ld de, $c60d + MON_MAXHP
- ld hl, $c60d + MON_HP
- ld a, [de]
- ld [hli], a
- inc de
- ld a, [de]
- ld [hl], a
- call AddMobileMonToParty
- ret
-; 11b7e5
-
-Function11b7e5: ; 11b7e5
- ld a, [$c60d] ; species
- ld [wOTTrademonSpecies], a
- ld [CurPartySpecies], a
- ld a, [wcd81]
- ld [wc74e], a
- ld hl, $c63d ; OT
- ld de, wOTTrademonOTName
- ld bc, 5
- call CopyBytes
- ld a, "@"
- ld [de], a
- ld a, [$c60d + MON_ID] ; id
- ld [wOTTrademonID], a
- ld a, [$c60d + MON_ID + 1]
- ld [wOTTrademonID + 1], a
- ld hl, $c60d + MON_DVS ; dvs
- ld a, [hli]
- ld [wOTTrademonDVs], a
- ld a, [hl]
- ld [wOTTrademonDVs + 1], a
- ld bc, $c60d ; pokemon_data_start
- callba GetCaughtGender
- ld a, c
- ld [wOTTrademonCaughtData], a
- call SpeechTextBox
- call FadeToMenu
- callba MobileTradeAnimation_ReceiveGetmonFromGTS
- callba Function17d1f1
- ld a, $1
- ld [wForceEvolution], a
- ld a, $2
- ld [wLinkMode], a
- callba EvolvePokemon
- xor a
- ld [wLinkMode], a
- callba SaveAfterLinkTrade
- ld a, $5
- call GetSRAMBank
- ld a, $5
- ld [$a800], a
- call CloseSRAM
- ld a, [MapGroup]
- ld b, a
- ld a, [MapNumber]
- ld c, a
- call GetMapTrigger
- ld a, d
- or e
- jr z, .asm_11b872
- ld a, $1
- ld [de], a
-
-.asm_11b872
- call CloseSubmenu
- call RestartMapMusic
- ret
-; 11b879
-
-Function11b879: ; 11b879
- callba BattleTower_CheckSaveFileExistsAndIsYours
- ld a, [ScriptVar]
- and a
- ret z
- ld a, $5
- call GetSRAMBank
- ld a, [$a800]
- ld [ScriptVar], a
- ld a, [$a890]
- ld [wcd49], a
- ld a, [$a891]
- ld [wcd4a], a
- ld a, [$a892]
- ld [wcd4b], a
- ld a, [$a893]
- ld [wcd4c], a
- call CloseSRAM
- ld a, [ScriptVar]
- and a
- ret z
- ld hl, wcd4c
- ld a, [hRTCDayHi]
- cp [hl]
- ret nz
- dec hl
- ld a, [hRTCDayLo]
- cp [hl]
- ret nz
- ld hl, wcd4a
- ld a, [hRTCHours]
- cp [hl]
- jr nc, .asm_11b8d8
- ld a, $18
- sub [hl]
- ld hl, hRTCHours
- add [hl]
- ld [wcd4c], a
- ld a, [hRTCMinutes]
- ld [wcd4b], a
- xor a
- ld [wcd4a], a
- jr .asm_11b8e2
-
-.asm_11b8d8
- ld a, [hRTCMinutes]
- ld [wcd4b], a
- ld a, [hRTCHours]
- ld [wcd4c], a
-
-.asm_11b8e2
- xor a
- ld l, a
- ld h, a
- ld b, a
- ld d, a
- ld a, [wcd4b]
- ld e, a
- ld a, [wcd4c]
- ld c, $3c
- call AddNTimes
- add hl, de
- push hl
- xor a
- ld l, a
- ld h, a
- ld b, a
- ld d, a
- ld a, [wcd49]
- ld e, a
- ld a, [wcd4a]
- ld c, $3c
- call AddNTimes
- add hl, de
- ld a, l
- cpl
- add $1
- ld e, a
- ld a, h
- cpl
- adc $0
- ld d, a
- pop hl
- add hl, de
- ld de, $ff88
- add hl, de
- bit 7, h
- ret z
- ld a, $2
- ld [ScriptVar], a
- ret
-; 11b920
-
-Function11b920: ; 11b920
- call Mobile46_InitJumptable
- ld a, $5
- call GetSRAMBank
- ld hl, $a81f
- ld de, $c626
- ld bc, 8
- call CopyBytes
- call CloseSRAM
- call Function118000
- ret
-; 11b93b
-
-Function11b93b: ; 11b93b
- ld a, $5
- call GetSRAMBank
- xor a
- ld [$a800], a
- ld hl, $a823
- ld de, $c608
- ld bc, $008f
- call CopyBytes
- call CloseSRAM
-
- ld a, $c608 % $100
- ld [wMobileMonSpeciesPointerBuffer], a
- ld a, $c608 / $100
- ld [wMobileMonSpeciesPointerBuffer + 1], a
-
- ld a, $c611 % $100
- ld [wMobileMonStructurePointerBuffer], a
- ld a, $c611 / $100
- ld [wMobileMonStructurePointerBuffer + 1], a
-
- ld a, $c641 % $100
- ld [wMobileMonOTNamePointerBuffer], a
- ld a, $c641 / $100
- ld [wMobileMonOTNamePointerBuffer + 1], a
-
- ld a, $c646 % $100
- ld [wMobileMonNicknamePointerBuffer], a
- ld a, $c646 / $100
- ld [wMobileMonNicknamePointerBuffer + 1], a
-
- ld a, $c64b % $100
- ld [wMobileMonMailPointerBuffer], a
- ld a, $c64b / $100
- ld [wMobileMonMailPointerBuffer + 1], a
- call AddMobileMonToParty
- callba SaveAfterLinkTrade
- ret
-; 11b98f
-
-AddMobileMonToParty: ; 11b98f
- ld hl, PartyCount
- ld a, [hl]
- ld e, a
- inc [hl]
-
- ld a, [wMobileMonSpeciesPointerBuffer]
- ld l, a
- ld a, [wMobileMonSpeciesPointerBuffer + 1]
- ld h, a
- inc hl
- ld bc, PartySpecies
- ld d, e
-.loop1
- inc bc
- dec d
- jr nz, .loop1
- ld a, e
- ld [CurPartyMon], a
- ld a, [hl]
- ld [bc], a
- inc bc
- ld a, -1
- ld [bc], a
-
- ld hl, PartyMon1Species
- ld bc, PARTYMON_STRUCT_LENGTH
- ld a, e
- ld [wMobileMonSpeciesBuffer], a
-.loop2
- add hl, bc
- dec a
- and a
- jr nz, .loop2
- ld e, l
- ld d, h
- ld a, [wMobileMonStructurePointerBuffer]
- ld l, a
- ld a, [wMobileMonStructurePointerBuffer + 1]
- ld h, a
- ld bc, PARTYMON_STRUCT_LENGTH
- call CopyBytes
-
- ld hl, PartyMonOT
- ld bc, NAME_LENGTH
- ld a, [wMobileMonSpeciesBuffer]
-.loop3
- add hl, bc
- dec a
- and a
- jr nz, .loop3
- ld e, l
- ld d, h
- ld a, [wMobileMonOTNamePointerBuffer]
- ld l, a
- ld a, [wMobileMonOTNamePointerBuffer + 1]
- ld h, a
- ld bc, PKMN_NAME_LENGTH - 1
- call CopyBytes
- ld a, "@"
- ld [de], a
-
- ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
- ld a, [wMobileMonSpeciesBuffer]
-.loop4
- add hl, bc
- dec a
- and a
- jr nz, .loop4
- ld e, l
- ld d, h
- ld a, [wMobileMonNicknamePointerBuffer]
- ld l, a
- ld a, [wMobileMonNicknamePointerBuffer + 1]
- ld h, a
- ld bc, PKMN_NAME_LENGTH - 1
- call CopyBytes
- ld a, "@"
- ld [de], a
-
- ld hl, sPartyMail
- ld bc, MAIL_STRUCT_LENGTH
- ld a, [wMobileMonSpeciesBuffer]
-.loop5
- add hl, bc
- dec a
- and a
- jr nz, .loop5
- ld a, BANK(sPartyMail)
- call GetSRAMBank
- ld e, l
- ld d, h
- ld a, [wMobileMonMailPointerBuffer]
- ld l, a
- ld a, [wMobileMonMailPointerBuffer + 1]
- ld h, a
- ld bc, MAIL_STRUCT_LENGTH
- call CopyBytes
-
- call CloseSRAM
- ret
-; 11ba38
-
-Function11ba38: ; 11ba38
- callba CheckCurPartyMonFainted
- ret c
- xor a
- ld [ScriptVar], a
- ret
-; 11ba44
-
-TilemapPack_11ba44:
- db $47, $30, $0a, $0a, $0a, $0a, $0a, $56 ; 00
- db $46, $2f, $0a, $0a, $0a, $0a, $0a, $55 ; 01
- db $45, $3d, $0a, $0a, $0a, $0a, $0a, $54 ; 02
- db $44, $30, $0a, $0a, $0a, $0a, $0a, $53 ; 03
- db $43, $2f, $0a, $0a, $0a, $0a, $0a, $52 ; 04
- db $4a, $3d, $0a, $0a, $0a, $0a, $0a, $51 ; 05
- db $4a, $30, $0a, $0a, $0a, $0a, $0a, $50 ; 06
- db $4a, $2f, $0a, $0a, $0a, $0a, $0a, $4f ; 07
- db $4a, $3d, $0a, $0a, $0a, $0a, $0a, $4e ; 08
- db $4a, $30, $0a, $0a, $0a, $0a, $4d, $42 ; 09
- db $4a, $2f, $0a, $0a, $0a, $0a, $6b, $58 ; 0a
- db $4a, $3d, $0a, $0a, $0a, $0a, $6a, $58 ; 0b
- db $4a, $30, $0a, $0a, $0a, $0a, $69, $58 ; 0c
- db $4a, $2f, $0a, $0a, $0a, $0a, $68, $58 ; 0d
- db $4a, $3d, $0a, $0a, $0a, $66, $67, $58 ; 0e
- db $4a, $30, $0a, $0a, $0a, $65, $0a, $58 ; 0f
- db $4a, $2f, $0a, $0a, $0a, $64, $0a, $58 ; 10
- db $4a, $3d, $0a, $0a, $0a, $63, $0a, $58 ; 11
- db $4a, $30, $0a, $0a, $61, $62, $0a, $58 ; 12
- db $4a, $2f, $0a, $0a, $5f, $60, $0a, $58 ; 13
- db $4a, $3d, $0a, $61, $62, $0a, $0a, $58 ; 14
- db $4a, $30, $0a, $63, $0a, $0a, $0a, $58 ; 15
- db $4a, $2f, $69, $0a, $0a, $0a, $0a, $58 ; 16
- db $4a, $3d, $81, $0a, $0a, $0a, $0a, $58 ; 17
- db $4a, $30, $80, $0a, $0a, $0a, $0a, $58 ; 18
- db $4a, $2f, $7f, $0a, $0a, $0a, $0a, $58 ; 19
- db $4a, $3d, $0a, $0a, $0a, $0a, $0a, $58 ; 1a
- db $4a, $30, $0a, $0a, $0a, $0a, $0a, $58 ; 1b
- db $4a, $2f, $68, $87, $88, $89, $0a, $58 ; 1c
- db $4a, $3d, $6e, $6f, $70, $75, $76, $58 ; 1d
- db $4a, $30, $75, $76, $5c, $5d, $5e, $58 ; 1e
- db $4a, $2f, $71, $72, $73, $74, $6d, $58 ; 1f
- db $4a, $3d, $75, $76, $77, $8a, $8b, $58 ; 20
- db $4a, $30, $66, $67, $65, $0a, $6a, $58 ; 21
- db $4a, $2f, $83, $84, $0a, $83, $84, $58 ; 22
- db $4a, $3d, $0a, $85, $82, $84, $0a, $58 ; 23
- db $4a, $30, $41, $80, $40, $0a, $0a, $58 ; 24
- db $4a, $2f, $83, $0a, $0a, $0a, $0a, $58 ; 25
- db $4a, $3d, $40, $0a, $0a, $0a, $0a, $58 ; 26
- db -1
-
-TilemapPack_11bb7d:
- db $0a, $0a, $0a, $0a, $0a, $0a, $16, $00 ; 00
- db $78, $0a, $0a, $0a, $0a, $0a, $8c, $00 ; 01
- db $79, $0a, $0a, $0a, $0a, $0a, $8d, $00 ; 02
- db $7a, $0a, $0a, $0a, $0a, $0a, $8e, $00 ; 03
- db $7b, $0a, $0a, $0a, $0a, $0a, $8c, $00 ; 04
- db $7c, $0a, $0a, $0a, $0a, $0a, $8d, $00 ; 05
- db $7d, $0a, $0a, $0a, $0a, $0a, $8e, $00 ; 06
- db $2e, $7e, $0a, $0a, $0a, $0a, $8c, $00 ; 07
- db $2e, $80, $0a, $0a, $0a, $0a, $8d, $00 ; 08
- db $2e, $81, $0a, $0a, $0a, $0a, $8e, $00 ; 09
- db $2e, $82, $0a, $0a, $0a, $0a, $8c, $00 ; 0a
- db $2e, $69, $0a, $0a, $0a, $0a, $8d, $00 ; 0b
- db $2e, $6a, $0a, $0a, $0a, $0a, $8e, $00 ; 0c
- db $2e, $6b, $0a, $0a, $0a, $0a, $8c, $00 ; 0d
- db $2e, $0a, $68, $0a, $0a, $0a, $8d, $00 ; 0e
- db $2e, $0a, $69, $0a, $0a, $0a, $8e, $00 ; 0f
- db $2e, $0a, $0a, $6a, $0a, $0a, $8c, $00 ; 10
- db $2e, $0a, $0a, $6b, $0a, $0a, $8d, $00 ; 11
- db $2e, $0a, $0a, $0a, $80, $0a, $8e, $00 ; 12
- db $2e, $0a, $0a, $0a, $82, $0a, $8c, $00 ; 13
- db $2e, $0a, $0a, $0a, $6c, $0a, $8d, $00 ; 14
- db $2e, $0a, $0a, $0a, $0a, $83, $8e, $00 ; 15
- db $2e, $0a, $6b, $0a, $0a, $0a, $8c, $00 ; 16
- db $2e, $0a, $0a, $69, $0a, $0a, $8d, $00 ; 17
- db $2e, $0a, $0a, $6a, $0a, $0a, $8e, $00 ; 18
- db $2e, $0a, $0a, $0a, $68, $0a, $8c, $00 ; 19
- db $2e, $0a, $0a, $0a, $63, $0a, $8d, $00 ; 1a
- db $2e, $0a, $0a, $61, $62, $0a, $8e, $00 ; 1b
- db $2e, $0a, $0a, $0a, $5f, $60, $8c, $00 ; 1c
- db $2e, $0a, $0a, $0a, $63, $0a, $8d, $00 ; 1d
- db $2e, $0a, $0a, $0a, $0a, $69, $8c, $00 ; 1e
- db $2e, $0a, $0a, $0a, $0a, $6b, $8d, $00 ; 1f
- db $2e, $0a, $0a, $0a, $0a, $83, $8e, $00 ; 20
- db $2e, $0a, $0a, $0a, $0a, $86, $8c, $00 ; 21
- db $2e, $0a, $85, $0a, $0a, $0a, $8d, $00 ; 22
- db $2e, $0a, $0a, $84, $0a, $0a, $8e, $00 ; 23
- db -1
-
-
diff --git a/misc/mobile_5b.asm b/misc/mobile_5b.asm
deleted file mode 100755
index d317f2af3..000000000
--- a/misc/mobile_5b.asm
+++ /dev/null
@@ -1,833 +0,0 @@
-Function16c000: ; 16c000
-; unreferenced
- ; Only for CGB
- ld a, [hCGB]
- and a
- ret z
- ; Only do this once per boot cycle
- ld a, [hFFEA]
- and a
- ret z
- ; Set some flag, preserving the old state
- ld a, [wcfbe]
- push af
- set 7, a
- ld [wcfbe], a
- ; Do stuff
- call MobileSystemSplashScreen_InitGFX ; Load GFX
- callba SetRAMStateForMobile
- callba EnableMobile
- call .RunJumptable
- callba DisableMobile
- ; Prevent this routine from running again
- ; until the next time the syatem is turned on
- xor a
- ld [hFFEA], a
- ; Restore the flag state
- pop af
- ld [wcfbe], a
- ret
-; 16c031
-
-.RunJumptable: ; 16c031
- xor a
- ld [wJumptableIndex], a
- ld [wcf64], a
- ld [wd002], a
- ld [wd003], a
-.loop
- call DelayFrame
- callba Function10635c
- ld a, [wd002]
- ld hl, .Jumptable
- rst JumpTable
- call Function16cb2e
- call Function16cbae
- ld a, [wd002]
- cp $ff
- jr nz, .loop
- ret
-; 16c05c
-
-.Jumptable: ; 16c05c
- dw .init
- dw Function16c0ba
- dw Function16c089
- dw Function16c09e
- dw Function16c0a8
- dw Function16c0dc
- dw Function16c0ec
- dw Function16c0ba
- dw Function16c0ca
- dw Function16c0dc
- dw Function16c0ec
- dw .quit
-; 16c074
-
-.init ; 16c074
- ld a, [wcf64]
- and a
- ret z
- ld [wd002], a
- xor a
- ld [wd003], a
- ret
-; 16c081
-
-.quit ; 16c081
- push af
- ld a, $ff
- ld [wd002], a
- pop af
- ret
-; 16c089
-
-Function16c089: ; 16c089
- ld a, $1
- ld [Buffer2], a
- ld [wd1f1], a
- xor a
- ld [hWY], a
- call Function16c0fa
- ld a, [wd002]
- ld [wcf64], a
- ret
-; 16c09e
-
-Function16c09e: ; 16c09e
- ld a, [wcf64]
- cp $4
- ret nz
- call Function16c0fa
- ret
-; 16c0a8
-
-Function16c0a8: ; 16c0a8
- xor a
- ld [Buffer2], a
- ld [wd1f1], a
- call ClearSprites
- ld a, $90
- ld [hWY], a
- call Function16c0fa
- ret
-; 16c0ba
-
-Function16c0ba: ; 16c0ba
- call Function16c943
- push af
- ld a, [wd003]
- inc a
- ld [wd003], a
- pop af
- call c, Function16c0fa
- ret
-; 16c0ca
-
-Function16c0ca: ; 16c0ca
- ld a, [wd003]
- cp $28
- push af
- ld a, [wd003]
- inc a
- ld [wd003], a
- pop af
- call z, Function16c0fa
- ret
-; 16c0dc
-
-Function16c0dc: ; 16c0dc
- call Function16ca11
- push af
- ld a, [wd003]
- inc a
- ld [wd003], a
- pop af
- call c, Function16c0fa
- ret
-; 16c0ec
-
-Function16c0ec: ; 16c0ec
- call ClearBGPalettes
- call ClearScreen
- push af
- ld a, $ff
- ld [wd002], a
- pop af
- ret
-; 16c0fa
-
-Function16c0fa: ; 16c0fa
- push af
- ld a, [wd002]
- inc a
- ld [wd002], a
- xor a
- ld [wd003], a
- pop af
- ret
-; 16c108
-
-MobileSystemSplashScreen_InitGFX: ; 16c108
- call DisableLCD
- ld hl, VTiles2
- ld de, .Tiles
- lb bc, BANK(.Tiles), $68
- call Get2bpp
- call .LoadPals
- call .LoadTileMap
- call .LoadAttrMap
- hlbgcoord 0, 0
- call Function16cc73
- call Function16cc02
- xor a
- ld [hBGMapMode], a
- call EnableLCD
- ret
-; 16c130
-
-.LoadPals: ; 16c130
- ld de, UnknBGPals
- ld hl, UnknownMobilePalettes_16c903
- ld bc, 8
- ld a, $5
- call FarCopyWRAM
- callba ApplyPals
- ret
-; 16c145
-
-.LoadTileMap: ; 16c145
- hlcoord 0, 0
- ld bc, 20
- xor a
- call ByteFill
- ld hl, .TileMap
- decoord 0, 1
- ld bc, $0154
- call CopyBytes
- ret
-; 16c15c
-
-.LoadAttrMap: ; 16c15c
- hlcoord 0, 0, AttrMap
- ld bc, SCREEN_WIDTH
- xor a
- call ByteFill
- ld hl, .AttrMap
- decoord 0, 1, AttrMap
- ld bc, 17 * SCREEN_WIDTH
- call CopyBytes
- ret
-; 16c173
-
-.Tiles:
-INCBIN "gfx/unknown/16c173.2bpp"
-
-.TileMap:
-INCBIN "gfx/unknown/16c633.tilemap"
-
-.AttrMap:
-INCBIN "gfx/unknown/16c79b.tilemap"
-
-UnknownMobilePalettes_16c903: ; 16c903
-INCLUDE "gfx/unknown/16c903.pal"
-
-; 16c943
-
-Function16c943: ; 16c943
- ld a, [wd003]
- and a
- jr nz, .asm_16c95e
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld a, $ff
- ld bc, $0008
- ld hl, UnknBGPals
- call ByteFill
- pop af
- ld [rSVBK], a
-
-.asm_16c95e
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld e, $0
- ld a, $0
-.asm_16c969
- ld hl, UnknownMobilePalettes_16c903
- call Function16cab6
- call Function16cabb
- ld d, a
- ld hl, UnknBGPals
- call Function16cab6
- call Function16cabb
- cp d
- jr z, .asm_16c991
- ld b, $1
-.asm_16c981
- dec a
- cp d
- jr z, .asm_16c988
- dec b
- jr nz, .asm_16c981
-
-.asm_16c988
- ld hl, UnknBGPals
- call Function16cab6
- call Function16cadc
-
-.asm_16c991
- ld hl, UnknownMobilePalettes_16c903
- call Function16cab6
- call Function16cad8
- ld d, a
- ld hl, UnknBGPals
- call Function16cab6
- call Function16cad8
- cp d
- jr z, .asm_16c9b9
- ld b, $1
-.asm_16c9a9
- dec a
- cp d
- jr z, .asm_16c9b0
- dec b
- jr nz, .asm_16c9a9
-
-.asm_16c9b0
- ld hl, UnknBGPals
- call Function16cab6
- call Function16cb08
-
-.asm_16c9b9
- ld hl, UnknownMobilePalettes_16c903
- call Function16cab6
- call Function16cac4
- ld d, a
- ld hl, UnknBGPals
- call Function16cab6
- call Function16cac4
- cp d
- jr z, .asm_16c9e1
- ld b, $1
-.asm_16c9d1
- dec a
- cp d
- jr z, .asm_16c9d8
- dec b
- jr nz, .asm_16c9d1
-
-.asm_16c9d8
- ld hl, UnknBGPals
- call Function16cab6
- call Function16cae8
-
-.asm_16c9e1
- inc e
- inc e
- ld a, e
- cp $8
- jr nz, .asm_16c969
- callba ApplyPals
- call SetPalettes
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld a, [wd003]
- cp $1f
- jr z, .asm_16ca09
- pop af
- ld [rSVBK], a
- ld e, $0
- pop af
- ld [rSVBK], a
- and a
- ret
-
-.asm_16ca09
- pop af
- ld [rSVBK], a
- pop af
- ld [rSVBK], a
- scf
- ret
-; 16ca11
-
-Function16ca11: ; 16ca11
- ld a, [wd003]
- and a
- jr nz, .asm_16ca1d
- callba ApplyPals
-
-.asm_16ca1d
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld e, $0
- ld a, $0
-.asm_16ca28
- ld hl, UnknBGPals
- call Function16cab6
- call Function16cabb
- cp $1f
- jr z, .asm_16ca48
- ld b, $1
-.asm_16ca37
- inc a
- cp $1f
- jr z, .asm_16ca3f
- dec b
- jr nz, .asm_16ca37
-
-.asm_16ca3f
- ld hl, UnknBGPals
- call Function16cab6
- call Function16cadc
-
-.asm_16ca48
- ld hl, UnknBGPals
- call Function16cab6
- call Function16cad8
- cp $1f
- jr z, .asm_16ca68
- ld b, $1
-.asm_16ca57
- inc a
- cp $1f
- jr z, .asm_16ca5f
- dec b
- jr nz, .asm_16ca57
-
-.asm_16ca5f
- ld hl, UnknBGPals
- call Function16cab6
- call Function16cb08
-
-.asm_16ca68
- ld hl, UnknBGPals
- call Function16cab6
- call Function16cac4
- cp $1f
- jr z, .asm_16ca88
- ld b, $1
-.asm_16ca77
- inc a
- cp $1f
- jr z, .asm_16ca7f
- dec b
- jr nz, .asm_16ca77
-
-.asm_16ca7f
- ld hl, UnknBGPals
- call Function16cab6
- call Function16cae8
-
-.asm_16ca88
- inc e
- inc e
- ld a, e
- cp $8
- jr nz, .asm_16ca28
- callba ApplyPals
- call SetPalettes
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld a, [wd003]
- cp $1f
- jr z, .asm_16caae
- pop af
- ld [rSVBK], a
- pop af
- ld [rSVBK], a
- and a
- ret
-
-.asm_16caae
- pop af
- ld [rSVBK], a
- pop af
- ld [rSVBK], a
- scf
- ret
-; 16cab6
-
-Function16cab6: ; 16cab6
- ld b, $0
- ld c, e
- add hl, bc
- ret
-; 16cabb
-
-Function16cabb: ; 16cabb
- inc hl
- ld a, [hl]
- srl a
- srl a
- and $1f
- ret
-; 16cac4
-
-Function16cac4: ; 16cac4
- inc hl
- ld a, [hld]
- and $3
- ld b, a
- ld a, [hl]
- sla a
- rl b
- sla a
- rl b
- sla a
- rl b
- ld a, b
- ret
-; 16cad8
-
-Function16cad8: ; 16cad8
- ld a, [hl]
- and $1f
- ret
-; 16cadc
-
-Function16cadc: ; 16cadc
- sla a
- sla a
- ld b, a
- inc hl
- ld a, [hl]
- and $83
- or b
- ld [hl], a
- ret
-; 16cae8
-
-Function16cae8: ; 16cae8
- ld c, a
- srl a
- srl a
- srl a
- ld b, a
- inc hl
- ld a, [hl]
- and $fc
- or b
- ld [hld], a
- ld a, c
- sla a
- sla a
- sla a
- sla a
- sla a
- ld b, a
- ld a, [hl]
- and $1f
- or b
- ld [hl], a
- ret
-; 16cb08
-
-Function16cb08: ; 16cb08
- ld b, a
- ld a, [hl]
- and $e0
- or b
- ld [hl], a
- ret
-; 16cb0f
-
-Function16cb0f: ; 16cb0f
- xor a
- ld [Buffer1], a
- ld [Buffer2], a
- xor a
- ld [wd1ec], a
- ld a, $70
- ld [wd1ee], a
- ld a, $4
- ld [wd1ed], a
- ld a, $a0
- ld [wd1ef], a
- xor a
- ld [wd1f0], a
- ret
-; 16cb2e
-
-Function16cb2e: ; 16cb2e
- ld a, [Buffer2]
- and a
- ret z
- call Function16cb40
- ld hl, Unknown_16cb86
- ld de, Sprites
- call Function16cb5d
- ret
-; 16cb40
-
-Function16cb40: ; 16cb40
- ld hl, wd1ec
- inc [hl]
- ld a, [hl]
- cp $18
- ret c
- xor a
- ld [hl], a
- ld a, [wd1ef]
- cp $a0
- jr nz, .asm_16cb57
- ld a, $a7
- ld [wd1ef], a
- ret
-
-.asm_16cb57
- ld a, $a0
- ld [wd1ef], a
- ret
-; 16cb5d
-
-Function16cb5d: ; 16cb5d
- ld a, [hli]
- and a
- ret z
-.asm_16cb60
- push af
- ld a, [wd1ee]
- add [hl]
- add $10
- ld [de], a
- inc hl
- inc de
- ld a, [wd1ed]
- add [hl]
- add $8
- ld [de], a
- inc hl
- inc de
- ld a, [wd1ef]
- add [hl]
- ld [de], a
- inc hl
- inc de
- ld a, [wd1f0]
- or [hl]
- ld [de], a
- inc hl
- inc de
- pop af
- dec a
- jr nz, .asm_16cb60
- ret
-; 16cb86
-
-Unknown_16cb86:
- db 7
- db 0, 0, 0, 1
- db 8, 0, 1, 1
- db 8, 8, 2, 0
- db 8, 16, 3, 0
- db 16, 0, 4, 1
- db 16, 8, 5, 0
- db 16, 16, 6, 0
-; 16cba3
-
-Function16cba3: ; 16cba3
- xor a
- ld [wd1f1], a
- ld [wd1f2], a
- ld [wd1f3], a
- ret
-; 16cbae
-
-Function16cbae: ; 16cbae
- ld a, [wd1f1]
- and a
- ret z
- call Function16cbba
- call Function16cbd1
- ret
-; 16cbba
-
-Function16cbba: ; 16cbba
- ld hl, wd1f2
- inc [hl]
- ld a, [hl]
- cp $c
- ret c
- xor a
- ld [hl], a
- ld a, [wd1f3]
- inc a
- cp $4
- jr c, .asm_16cbcd
- xor a
-
-.asm_16cbcd
- ld [wd1f3], a
- ret
-; 16cbd1
-
-Function16cbd1: ; 16cbd1
- ld a, [wd1f3]
- ld c, a
- ld b, 0
- ld hl, Unknown_16cbfb
- add hl, bc
- ld a, [hl]
- ld bc, 2
- ld hl, Unknown_16cfa3
- call AddNTimes
- ld de, UnknBGPals + 1 palettes + 4
- ld bc, 2
- ld a, $5
- call FarCopyWRAM
- callba ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 16cbfb
-
-Unknown_16cbfb:
- db 0, 1, 2, 1, 0, 1, 2
-; 16cc02
-
-Function16cc02: ; 16cc02
- call Function16cc18
- call Function16cc49
- call Function16cc62
- call Function16cc25
- call Function16cc6e
- call Function16cb0f
- call Function16cba3
- ret
-; 16cc18
-
-Function16cc18: ; 16cc18
- ld hl, VTiles1
- ld de, GFX_16cca3
- lb bc, BANK(GFX_16cca3), $2e
- call Get2bpp
- ret
-; 16cc25
-
-Function16cc25: ; 16cc25
- ld hl, Unknown_16cfa9
- ld de, UnknBGPals + 1 palettes
- call .CopyPal
- ld hl, Unknown_16cfb1
- ld de, UnknOBPals
- call .CopyPal
- ld hl, Unknown_16cfb9
- ld de, UnknOBPals + 1 palettes
- call .CopyPal
- ret
-; 16cc41
-
-.CopyPal: ; 16cc41
- ld bc, 1 palettes
- ld a, $5
- jp FarCopyWRAM
-; 16cc49
-
-Function16cc49: ; 16cc49
- hlcoord 4, 15
- ld a, $80
- call Function16cc5a
- hlcoord 4, 16
- ld a, $90
- call Function16cc5a
- ret
-; 16cc5a
-
-Function16cc5a: ; 16cc5a
- ld c, $10
-.asm_16cc5c
- ld [hli], a
- inc a
- dec c
- jr nz, .asm_16cc5c
- ret
-; 16cc62
-
-Function16cc62: ; 16cc62
- hlcoord 0, 15, AttrMap
- ld bc, $0028
- ld a, $1
- call ByteFill
- ret
-; 16cc6e
-
-Function16cc6e: ; 16cc6e
- hlbgcoord 0, 0, VBGMap1
- jr Function16cc73
-
-Function16cc73:
- ld a, [rVBK]
- push af
- ld a, $0
- ld [rVBK], a
- push hl
- decoord 0, 0
- call Function16cc90
- pop hl
- ld a, $1
- ld [rVBK], a
- decoord 0, 0, AttrMap
- call Function16cc90
- pop af
- ld [rVBK], a
- ret
-; 16cc90
-
-Function16cc90: ; 16cc90
- ld bc, $1214
-.asm_16cc93
- push bc
-.asm_16cc94
- ld a, [de]
- inc de
- ld [hli], a
- dec c
- jr nz, .asm_16cc94
- ld bc, $000c
- add hl, bc
- pop bc
- dec b
- jr nz, .asm_16cc93
- ret
-; 16cca3
-
-GFX_16cca3:
-INCBIN "gfx/unknown/16cca3.2bpp"
-
-Unknown_16cfa3:
- RGB 31, 31, 31
- RGB 25, 27, 29
- RGB 16, 19, 25
-
-Unknown_16cfa9:
- RGB 31, 31, 31
- RGB 25, 27, 29
- RGB 31, 31, 31
- RGB 07, 07, 07
-
-
-Unknown_16cfb1:
- RGB 31, 31, 31
- RGB 13, 09, 18
- RGB 26, 21, 16
- RGB 07, 07, 07
-
-
-Unknown_16cfb9:
- RGB 31, 31, 31
- RGB 18, 05, 02
- RGB 27, 11, 12
- RGB 07, 07, 07
-
-; 16cfc1
diff --git a/misc/mobile_5c.asm b/misc/mobile_5c.asm
deleted file mode 100755
index 2f1f1555c..000000000
--- a/misc/mobile_5c.asm
+++ /dev/null
@@ -1,943 +0,0 @@
-Function170000: ; 170000
- ld a, [$c62b]
- ld [wPlayerTrademonSpecies], a
- ld hl, $c62e
- ld de, wPlayerTrademonSenderName
- ld bc, $0005
- call CopyBytes
- ld a, $50
- ld [de], a
- ld hl, $c663
- ld de, wPlayerTrademonOTName
- ld bc, $0005
- call CopyBytes
- ld a, $50
- ld [de], a
- ld hl, $c648
- ld a, [hli]
- ld [wPlayerTrademonDVs], a
- ld a, [hl]
- ld [wPlayerTrademonDVs + 1], a
- ld hl, $c639
- ld a, [hli]
- ld [wPlayerTrademonID], a
- ld a, [hl]
- ld [wPlayerTrademonID + 1], a
- ld bc, $c633
- callba GetCaughtGender
- ld a, c
- ld [wPlayerTrademonCaughtData], a
- ld a, [wcd81]
- ld [wc74e], a
- ld hl, $c608
- ld de, $d800
- ld bc, $008f
- call CopyBytes
- ret
-
-; 17005a
-
-Function17005a: ; 17005a
- ld a, $5
- call GetSRAMBank
- ld a, [$a824]
- ld [wOTTrademonSpecies], a
- ld hl, $a827
- ld de, wOTTrademonSenderName
- ld bc, 5 ; Japanese Name Length
- call CopyBytes
- ld a, "@"
- ld [de], a
- ld hl, $a85c
- ld de, wOTTrademonOTName
- ld bc, 5 ; Japanese Name Length
- call CopyBytes
- ld a, "@"
- ld [de], a
- ld hl, $a841
- ld a, [hli]
- ld [wOTTrademonDVs], a
- ld a, [hl]
- ld [wOTTrademonDVs + 1], a
- ld hl, $a832
- ld a, [hli]
- ld [wOTTrademonID], a
- ld a, [hl]
- ld [wOTTrademonID + 1], a
- ld bc, $a82c
- callba GetCaughtGender
- ld a, c
- ld [wOTTrademonCaughtData], a
- ld a, [wcd81]
- ld [wc74e], a
- call CloseSRAM
- ret
-
-; 1700b0
-
-INCLUDE "misc/battle_tower_5c.asm"
-
-Function170be4: ; 170be4
- ld a, $5
- call GetSRAMBank
- xor a
- ld hl, $a894
- ld bc, $0008
- call ByteFill
- call CloseSRAM
- ret
-
-; 170bf7
-
-Clears5_a89a: ; 170bf7
- ld a, $5
- call GetSRAMBank
- ld hl, $a89a
- xor a
- ld [hli], a
- ld [hl], a
- call CloseSRAM
- ret
-
-; 170c06
-
-Function170c06: ; 170c06
- ld a, $5
- call GetSRAMBank
- ld hl, $a894
- ld a, [wBattleResult]
- and a
- jr nz, .asm_170c15
- inc [hl]
-
-.asm_170c15
- inc hl
- inc hl
- ld a, [$a89b]
- add [hl]
- ld [hld], a
- ld a, [$a89a]
- adc [hl]
- ld [hli], a
- jr nc, .asm_170c27
- ld a, $ff
- ld [hld], a
- ld [hli], a
-
-.asm_170c27
- inc hl
- push hl
- ld de, 0
- xor a
- ld [wd265], a
-.asm_170c30
- ld hl, PartyMon1HP
- ld a, [wd265]
- call GetPartyLocation
- ld a, [hli]
- ld b, a
- ld c, [hl]
- inc hl
- inc hl
- ld a, [hld]
- sub c
- ld c, a
- ld a, [hl]
- sbc b
- ld b, a
- push de
- pop hl
- add hl, bc
- push hl
- pop de
- jr c, .asm_170c58
- ld a, [wd265]
- inc a
- ld [wd265], a
- cp $3
- jr c, .asm_170c30
- jr .asm_170c5b
-
-.asm_170c58
- ld de, -1
-
-.asm_170c5b
- pop hl
- inc hl
- ld a, e
- add [hl]
- ld [hld], a
- ld a, d
- adc [hl]
- ld [hli], a
- jr nc, .asm_170c69
- ld a, $ff
- ld [hld], a
- ld [hli], a
-
-.asm_170c69
- inc hl
- push hl
- ld b, $0
- ld c, $0
-.asm_170c6f
- ld hl, PartyMon1HP
- ld a, b
- push bc
- call GetPartyLocation
- pop bc
- ld a, [hli]
- or [hl]
- jr nz, .asm_170c7d
- inc c
-
-.asm_170c7d
- inc b
- ld a, b
- cp $3
- jr c, .asm_170c6f
- pop hl
- ld a, [hl]
- add c
- ld [hl], a
- call CloseSRAM
- ret
-
-; 170c8b
-
-Function170c8b: ; 170c8b
- ld hl, LastEnemyCounterMove
- ld b, $5
-.asm_170c90
- ld a, [hl]
- xor $ff
- ld [hli], a
- dec b
- jr nz, .asm_170c90
- ret
-
-; 170c98
-
-CheckBTMonMovesForErrors: ; 170c98
- ld c, BATTLETOWER_NROFPKMNS
- ld hl, wBT_OTTempPkmn1Moves
-.loop
- push hl
- ld a, [hl]
- cp NUM_ATTACKS + 1
- jr c, .okay
- ld a, POUND
- ld [hl], a
-
-.okay
- inc hl
- ld b, NUM_MOVES - 1
-.loop2
- ld a, [hl]
- and a
- jr z, .loop3
- cp NUM_ATTACKS + 1
- jr c, .next
-
-.loop3
- xor a
- ld [hl], a
- inc hl
- dec b
- jr nz, .loop3
- jr .done
-
-.next
- inc hl
- dec b
- jr nz, .loop2
-
-.done
- pop hl
- ld de, PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH
- add hl, de
- dec c
- jr nz, .loop
- ret
-
-; 170cc6
-
-Function170cc6: ; 170cc6
- ld a, [rSVBK]
- push af
- ld a, $6
- ld [rSVBK], a
- ld hl, LZ_170d16
- ld de, wDecompressScratch
- call Decompress
- ld a, $1
- ld [rVBK], a
- ld de, wd000
- ld hl, VTiles0
- lb bc, $6, $c1
- call Get2bpp
- xor a
- ld [rVBK], a
- ld hl, LZ_1715a4
- ld de, wd000
- call Decompress
- ld de, UnknBGPals
- ld hl, VTiles0
- lb bc, $6, $53
- call Get2bpp
- pop af
- ld [rSVBK], a
- ret
-
-; 170d02
-
-Function170d02: ; 170d02
- ld a, $1
- ld [rVBK], a
- ld de, GFX_171848
- ld hl, VTiles1 tile $41
- lb bc, BANK(GFX_171848), $18
- call Get2bpp
- xor a
- ld [rVBK], a
- ret
-
-; 170d16
-
-LZ_170d16:
-INCBIN "gfx/unknown/170d16.2bpp.lz"
-
-LZ_1715a4:
-INCBIN "gfx/unknown/1715a4.2bpp.lz"
-
-GFX_171848:
-INCBIN "gfx/unknown/171848.2bpp"
-
-Function1719c8: ; 1719c8 (5c:59c8)
- ld a, [hInMenu]
- push af
- ld a, $1
- ld [hInMenu], a
- call Function1719d6
- pop af
- ld [hInMenu], a
- ret
-
-Function1719d6: ; 1719d6 (5c:59d6)
- callba BattleTowerRoomMenu_InitRAM
- call Function1719ed
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- call Function171a11
- pop af
- ld [rSVBK], a
- ret
-
-Function1719ed: ; 1719ed (5c:59ed)
- xor a
- ld [wcd49], a
- ld [wcd4a], a
- dec a
- ld [wcd4b], a
- call ClearBGPalettes
- call ClearSprites
- callba Function171d2b
- callba ReloadMapPart
- callba ClearSpriteAnims
- ret
-
-Function171a11: ; 171a11 (5c:5a11)
-.loop
- call JoyTextDelay
- ld a, [wcd49]
- bit 7, a
- jr nz, .done
- call Function171a36
- callba PlaySpriteAnimations
- callba ReloadMapPart
- jr .loop
-.done
- callba ClearSpriteAnims
- call ClearSprites
- ret
-
-Function171a36: ; 171a36 (5c:5a36)
- ld a, [wcd49]
- ld e, a
- ld d, 0
- ld hl, Jumptable_171a45
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-Jumptable_171a45: ; 171a45 (5c:5a45)
- dw Function171a95
- dw Function171ac9
- dw Function171a5d
- dw Function171ad7
- dw Function171a5d
- dw Function171aec
- dw Function171b4b
- dw Function171b85
- dw Function171bcc
- dw Function171c2c
- dw Function171c39
- dw Function171c41
-
-
-Function171a5d: ; 171a5d (5c:5a5d)
- ld a, [wc821]
- bit 1, a
- jr nz, .asm_171a6a
- bit 0, a
- ret nz
- jp Function171c66
-
-.asm_171a6a
- ld a, $0
- call Function3e32
- ld [wc300], a
- ld a, l
- ld [wc301], a
- ld a, h
- ld [wc302], a
- ld a, $a
- call Function3e32
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- callba BattleTowerRoomMenu_Cleanup
- pop af
- ld [rSVBK], a
- ld a, $a
- ld [wcd49], a
- ret
-
-Function171a95: ; 171a95 (5c:5a95)
- callba Function171ccd
- hlcoord 2, 8
- ld de, String_171aa7
- call PlaceString
- jp Function171c66
-
-; 171aa7 (5c:5aa7)
-
-String_171aa7: ; 171aa7
- db "モバイルアダプタに"
- next "せつぞく しています"
- next "しばらく おまちください"
- db "@"
-; 171ac9
-
-Function171ac9: ; 171ac9 (5c:5ac9)
- ld de, wcd81
- ld hl, $5c
- ld a, $2
- call Function3e32
- jp Function171c66
-
-Function171ad7: ; 171ad7 (5c:5ad7)
- xor a
- ld hl, $c608
- ld bc, $66
- call ByteFill
- ld de, $c608
- ld a, $c
- call Function3e32
- jp Function171c66
-
-Function171aec: ; 171aec (5c:5aec)
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- callba BattleTowerRoomMenu_Cleanup
- pop af
- ld [rSVBK], a
- hlcoord 2, 6
- ld a, $8
-.asm_171b01
- push af
- push hl
- xor a
- ld bc, $10
- call ByteFill
- pop hl
- ld de, $14
- add hl, de
- pop af
- dec a
- jr nz, .asm_171b01
- hlcoord 2, 7
- ld a, $3
- ld de, $c608
-.asm_171b1b
- push af
- push hl
- ld a, [de]
- and a
- jr z, .asm_171b34
- ld a, [wcd4b]
- inc a
- ld [wcd4b], a
- push hl
- call Function171b42
- pop hl
- ld bc, $ffec
- add hl, bc
- call Function171b42
-.asm_171b34
- pop hl
- ld bc, $14
- add hl, bc
- add hl, bc
- add hl, bc
- pop af
- dec a
- jr nz, .asm_171b1b
- jp Function171c66
-
-Function171b42: ; 171b42 (5c:5b42)
- ld a, [de]
- inc de
- and a
- ret z
- sub $20
- ld [hli], a
- jr Function171b42
-
-Function171b4b: ; 171b4b (5c:5b4b)
- depixel 8, 2
- ld a, SPRITE_ANIM_INDEX_1D
- call _InitSpriteAnimStruct
- ld hl, SPRITEANIMSTRUCT_0C
- add hl, bc
- ld a, $8
- ld [hl], a
-
- depixel 8, 19
- ld a, SPRITE_ANIM_INDEX_1D
- call _InitSpriteAnimStruct
- ld hl, SPRITEANIMSTRUCT_0C
- add hl, bc
- ld a, $9
- ld [hl], a
-
- depixel 17, 14, 2, 0
- ld a, SPRITE_ANIM_INDEX_1D
- call _InitSpriteAnimStruct
- ld hl, SPRITEANIMSTRUCT_0C
- add hl, bc
- ld a, $a
- ld [hl], a
-
- ld a, $4
- ld [wcd23], a
- ld a, $8
- ld [wcd24], a
- jp Function171c66
-
-Function171b85: ; 171b85 (5c:5b85)
- ld hl, hJoyPressed ; $ffa7
- ld a, [hl]
- and $2
- jp nz, Function171b9f
- ld a, [hl]
- and $1
- jp nz, Function171bbd
- ld a, [hl]
- and $40
- jr nz, asm_171ba5
- ld a, [hl]
- and $80
- jr nz, asm_171baf
- ret
-
-Function171b9f: ; 171b9f (5c:5b9f)
- ld a, $80
- ld [wcd49], a
- ret
-
-asm_171ba5: ; 171ba5 (5c:5ba5)
- ld a, [wcd4a]
- and a
- ret z
- dec a
- ld [wcd4a], a
- ret
-
-asm_171baf: ; 171baf (5c:5baf)
- ld a, [wcd4b]
- ld c, a
- ld a, [wcd4a]
- cp c
- ret z
- inc a
- ld [wcd4a], a
- ret
-
-Function171bbd: ; 171bbd (5c:5bbd)
- call PlayClickSFX
- ld a, $8
- ld [wcd23], a
- xor a
- ld [wcd24], a
- jp Function171c66
-
-Function171bcc: ; 171bcc (5c:5bcc)
- ld hl, hJoyPressed ; $ffa7
- ld a, [hl]
- and $2
- jp nz, Function171bdc
- ld a, [hl]
- and $1
- jp nz, Function171beb
- ret
-
-Function171bdc: ; 171bdc (5c:5bdc)
- ld a, $4
- ld [wcd23], a
- ld a, $8
- ld [wcd24], a
- ld hl, wcd49
- dec [hl]
- ret
-
-Function171beb: ; 171beb (5c:5beb)
- ld a, $5
- call GetSRAMBank
- ld a, [wcd4a]
- ld [$aa4a], a
- call CloseSRAM
- ld hl, MenuDataHeader_171c6b
- call LoadMenuDataHeader
- call MenuBox
- call MenuBoxCoord2Tile
- callba ReloadMapPart
- hlcoord 1, 14
- ld de, String_171c73
- call PlaceString
- ld a, [wcd4a]
- cp $2
- jr z, .asm_171c1f
- ld a, $8
- jr .asm_171c21
-.asm_171c1f
- ld a, $c
-.asm_171c21
- ld [wcd24], a
- ld a, $1e
- ld [wcd4c], a
- call Function171c66
-
-Function171c2c: ; 171c2c (5c:5c2c)
- ld hl, wcd4c
- dec [hl]
- ret nz
- call ExitMenu
- call ClearBGPalettes
- jr asm_171c60
-
-Function171c39: ; 171c39 (5c:5c39)
- ld a, $28
- ld [wcd4c], a
- call Function171c66
-
-Function171c41: ; 171c41 (5c:5c41)
- ld hl, wcd4c
- dec [hl]
- ret nz
- call ClearBGPalettes
- callba MobileFunc_106462
- callba Function106464
- ld a, $2
- ld [wc303], a
- callba DisplayMobileError
-asm_171c60: ; 171c60 (5c:5c60)
- ld a, $80
- ld [wcd49], a
- ret
-
-Function171c66: ; 171c66 (5c:5c66)
- ld hl, wcd49
- inc [hl]
- ret
-
-; 171c6b (5c:5c6b)
-
-MenuDataHeader_171c6b: ; 171c6b
- db $40 ; flags
- db 12, 0 ; start coords
- db 17, 19 ; end coords
- dw NULL
- db 0 ; default option
-; 171c73
-
-String_171c73: ; 171c73
- db "モバイルセンターを けってい"
- next "しました@"
-; 171c87
-
-Function171c87: ; 171c87 (5c:5c87)
- call DisableLCD
- ld hl, GFX_171db1
- ld de, VTiles2 tile $00
- ld bc, $6e0
- call CopyBytes
- ld hl, LZ_172abd
- ld de, VTiles0 tile $00
- call Decompress
- call EnableLCD
- ld hl, Tilemap_172491
- decoord 0, 0
- ld bc, $168
- call CopyBytes
- ld hl, Attrmap_1727ed
- decoord 0, 0, AttrMap
- ld bc, $168
- call CopyBytes
- hlcoord 3, 2
- ld de, String_172e31
- call PlaceString
- hlcoord 3, 16
- ld de, String_172e3f
- call PlaceString
- ret
-
-Function171ccd: ; 171ccd (5c:5ccd)
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, Palette_171d71
- ld de, UnknBGPals
- ld bc, $40
- call CopyBytes
- ld hl, EngineBuffer5
- ld a, $ff
- ld [hli], a
- ld a, $7f
- ld [hl], a
- call SetPalettes
- pop af
- ld [rSVBK], a
- ret
-
-Function171cf0: ; 171cf0 (5c:5cf0)
- xor a
- hlcoord 4, 15
- ld [hli], a
- ld [hli], a
- ld a, [wcd4b]
- xor $1
- ld [wcd4b], a
- and a
- jr nz, .asm_171d16
- ld hl, Tilemap_17251d
- decoord 0, 7
- ld bc, $8c
- call CopyBytes
- hlcoord 3, 16
- ld de, String_172e3f
- jp PlaceString
-
-.asm_171d16
- ld hl, Tilemap_1725f9
- decoord 0, 7
- ld bc, $8c
- call CopyBytes
- hlcoord 3, 16
- ld de, String_172e4e
- jp PlaceString
-
-Function171d2b: ; 171d2b (5c:5d2b)
- call DisableLCD
- ld hl, GFX_171db1
- ld de, VTiles2 tile $00
- ld bc, $6e0
- call CopyBytes
- ld hl, LZ_172abd
- ld de, VTiles0 tile $00
- call Decompress
- call EnableLCD
- ld hl, Tilemap_172685
- decoord 0, 0
- ld bc, $168
- call CopyBytes
- ld hl, Attrmap_172955
- decoord 0, 0, AttrMap
- ld bc, $168
- call CopyBytes
- hlcoord 2, 2
- ld de, String_172e5d
- call PlaceString
- hlcoord 14, 16
- ld de, String_172e58
- call PlaceString
- ret
-
-; 171d71 (5c:5d71)
-
-Palette_171d71:
- RGB 0, 0, 0
- RGB 3, 0, 0
- RGB 5, 0, 0
- RGB 31, 31, 29
- RGB 0, 2, 10
- RGB 2, 10, 21
- RGB 0, 0, 0
- RGB 10, 26, 31
- RGB 0, 0, 0
- RGB 0, 7, 8
- RGB 31, 8, 0
- RGB 1, 17, 15
- RGB 31, 16, 0
- RGB 31, 22, 0
- RGB 31, 27, 0
- RGB 31, 31, 0
- RGB 31, 18, 6
- RGB 0, 3, 0
- RGB 0, 9, 0
- RGB 0, 12, 0
- RGB 0, 16, 0
- RGB 0, 22, 0
- RGB 0, 25, 0
- RGB 0, 27, 0
- RGB 5, 5, 16
- RGB 8, 19, 28
- RGB 0, 0, 0
- RGB 31, 31, 31
- RGB 31, 31, 29
- RGB 21, 21, 20
- RGB 11, 11, 10
- RGB 0, 0, 0
-GFX_171db1:
-INCBIN "gfx/unknown/171db1.2bpp"
-Tilemap_172491:
-INCBIN "gfx/unknown/172491.tilemap"
-Tilemap_17251d:
-INCBIN "gfx/unknown/17251d.tilemap"
-Tilemap_1725f9:
-INCBIN "gfx/unknown/1725f9.tilemap"
-Tilemap_172685:
-INCBIN "gfx/unknown/172685.tilemap"
-Attrmap_1727ed:
-INCBIN "gfx/unknown/1727ed.attrmap"
-Attrmap_172955:
-INCBIN "gfx/unknown/172955.attrmap"
-LZ_172abd:
-INCBIN "gfx/pokedex/slowpoke.2bpp.lz"
-
-String_172e31: ; 172e31
- db "パスワード", $1f, "いれてください@"
-String_172e3f: ; 172e3f
- db "きりかえ やめる けってい@"
-String_172e4e: ; 172e4e
- db "きりかえ やめる "
-String_172e58:
- db "けってい@"
-String_172e5d: ; 172e5d
- db "せつぞくする モバイルセンターを"
- next "えらんで ください@"
-; 172e78
-
-
-Function172e78: ; 172e78 (5c:6e78)
- ld a, $7f
- hlcoord 0, 0
- ld bc, $168
- call ByteFill
- ld a, $7
- hlcoord 0, 0, AttrMap
- ld bc, $168
- call ByteFill
- call DisableLCD
- ld hl, GameBoyN64GFX
- ld de, VTiles2 tile $00
- ld bc, $610
- call CopyBytes
- call EnableLCD
- ld hl, Tilemap_1733af
- decoord 0, 0
- ld bc, $168
- call CopyBytes
- ld hl, Attrmap_173517
- decoord 0, 0, AttrMap
- ld bc, $168
- call CopyBytes
- ret
-
-; 172eb9 (5c:6eb9)
-
-Function172eb9:
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, Palette_172edf
- ld de, UnknBGPals
- ld bc, $40
- call CopyBytes
- ld hl, Palette_172edf
- ld de, BGPals
- ld bc, $40
- call CopyBytes
- call SetPalettes
- pop af
- ld [rSVBK], a
- ret
-
-; 172edf (5c:6edf)
-
-Palette_172edf:
- RGB 5, 12, 17
- RGB 31, 31, 31
- RGB 18, 25, 28
- RGB 10, 17, 21
- RGB 6, 13, 18
- RGB 31, 31, 31
- RGB 20, 26, 28
- RGB 12, 19, 23
- RGB 3, 10, 16
- RGB 31, 31, 31
- RGB 6, 13, 18
- RGB 20, 26, 28
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 5, 5, 16
- RGB 8, 19, 28
- RGB 0, 0, 0
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
-GameBoyN64GFX:
-INCBIN "gfx/trade/game_boy_n64.2bpp"
-
-Tilemap_1733af:
-IF DEF(CRYSTAL11)
-INCBIN "gfx/unknown/1733af_corrupt.tilemap"
-ELSE
-INCBIN "gfx/unknown/1733af.tilemap"
-ENDC
-
-Attrmap_173517:
-INCBIN "gfx/unknown/173517.attrmap"
diff --git a/misc/mobile_5f.asm b/misc/mobile_5f.asm
deleted file mode 100644
index 061b1357f..000000000
--- a/misc/mobile_5f.asm
+++ /dev/null
@@ -1,5310 +0,0 @@
-
-SECTION "bank5F", ROMX
-
-Function17c000: ; 17c000
-
- call DisableLCD
-
- ld hl, VTiles2
- ld bc, $31 tiles
- xor a
- call ByteFill
-
- call LoadStandardFont
- call LoadFontsExtra
-
- ld hl, HaveWantMap
- decoord 0, 0
- bccoord 0, 0, AttrMap
-
- ld a, SCREEN_HEIGHT
-.y
- push af
- ld a, SCREEN_WIDTH
-
- push hl
-.x
- push af
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [bc], a
- inc bc
- pop af
- dec a
- jr nz, .x
- pop hl
-
- push bc
- ld bc, BG_MAP_WIDTH * 2
- add hl, bc
- pop bc
-
- pop af
- dec a
- jr nz, .y
-
- ld a, [rSVBK]
- push af
-
- ld a, 5 ; BANK(UnknBGPals)
- ld [rSVBK], a
-
- ld hl, HaveWantPals
- ld de, UnknBGPals
- ld bc, $80
- call CopyBytes
-
- pop af
- ld [rSVBK], a
-
- ld hl, MobileSelectGFX
- ld de, VTiles0 tile $30
- ld bc, $20 tiles
- call CopyBytes
-
- ld a, 1
- ld [rVBK], a
-
- ld hl, HaveWantGFX
- ld de, VTiles2
- ld bc, $80 tiles
- call CopyBytes
-
- ld hl, HaveWantGFX + $800
- ld de, VTiles1
- ld bc, $10 tiles
- call CopyBytes
-
- xor a
- ld [rVBK], a
-
- call EnableLCD
- callba ReloadMapPart
- ret
-; 17c083
-
-HaveWantGFX: ; 17c083
-INCBIN "gfx/mobile/havewant.2bpp"
-
-MobileSelectGFX: ; 17c983
-INCBIN "gfx/mobile/select.2bpp"
-
-HaveWantMap: ; 17cb83
-; Interleaved tile/palette map.
-INCBIN "gfx/mobile/havewant_map.bin"
-
-HaveWantPals: ; 17cff3
-; BG and OBJ palettes.
- RGB 0, 0, 0
- RGB 21, 21, 21
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 4, 17, 29
- RGB 6, 19, 31
- RGB 31, 31, 31
-
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 2, 13, 18
- RGB 6, 19, 31
- RGB 31, 31, 31
-
- RGB 0, 0, 0
- RGB 31, 5, 5
- RGB 29, 21, 21
- RGB 31, 31, 31
-
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 4, 17, 29
- RGB 6, 19, 31
- RGB 2, 15, 27
-
- RGB 0, 0, 0
- RGB 28, 19, 18
- RGB 25, 9, 0
- RGB 0, 0, 0
-
- RGB 0, 0, 0
- RGB 31, 27, 27
- RGB 31, 10, 4
- RGB 29, 0, 0
-
- RGB 0, 0, 0
- RGB 31, 31, 31
- RGB 26, 8, 23
- RGB 22, 0, 16
-
- RGB 0, 0, 0
- RGB 31, 31, 31
- RGB 20, 8, 31
- RGB 15, 1, 26
-
- RGB 0, 0, 0
- RGB 31, 31, 31
- RGB 17, 12, 31
- RGB 12, 6, 31
-
- RGB 0, 16, 0
- RGB 11, 11, 14
- RGB 5, 5, 7
- RGB 31, 31, 31
-
- RGB 0, 31, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
- RGB 16, 31, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
- RGB 0, 0, 0
-
-
-CheckStringForErrors: ; 17d073
-; Valid character ranges:
-; $0, $5 - $13, $19 - $1c, $26 - $34, $3a - $3e, $40 - $48, $60 - $ff
-.loop
- ld a, [de]
- inc de
- and a
- jr z, .NextChar
- cp $60
- jr nc, .NextChar
- cp $4e
- jr z, .NextChar
- cp "@"
- jr z, .Done
- cp $5
- jr c, .Fail
- cp "<PLAY_G>"
- jr c, .NextChar
- cp $19
- jr c, .Fail
- cp $1d
- jr c, .NextChar
- cp $26
- jr c, .Fail
- cp $35
- jr c, .NextChar
- cp $3a
- jr c, .Fail
- cp $3f
- jr c, .NextChar
- cp $40
- jr c, .Fail
- cp $49
- jr c, .NextChar
-
-.Fail:
- scf
- ret
-
-.NextChar:
- dec c
- jr nz, .loop
-
-.Done:
- and a
- ret
-; 17d0b3
-
-CheckStringForErrors_IgnoreTerminator: ; 17d0b3
-; Find control chars
-.loop
- ld a, [de]
- inc de
- and a
- jr z, .next
- cp "<DEXEND>" + 1
- jr nc, .next
- cp "<NEXT>"
- jr z, .next
- cp "@"
- jr z, .next
-
- cp $5
- jr c, .end
- cp "<PLAY_G>"
- jr c, .next
- cp $19
- jr c, .end
- cp $1d
- jr c, .next
- cp "%" + 1
- jr c, .end
- cp $35
- jr c, .next
- cp "<GREEN>" + 1
- jr c, .end
- cp "<ENEMY>"
- jr c, .next
- cp "<ENEMY>" + 1
- jr c, .end
- cp "<MOM>"
- jr c, .next
-
-.end
- scf
- ret
-
-.next
- dec c
- jr nz, .loop
- and a
- ret
-; 17d0f3
-
-Function17d0f3: ; 17d0f3
- ld a, [$c608 + 5]
- ld [wOTTrademonSpecies], a
- ld [CurPartySpecies], a
- ld a, [wcd81]
- ld [$c74e], a
- ld hl, $c63d
- ld de, wOTTrademonOTName
- ld bc, 5
- call CopyBytes
- ld a, "@"
- ld [de], a
- ld a, [$c608 + 11]
- ld [wOTTrademonID], a
- ld a, [$c608 + 12]
- ld [wOTTrademonID + 1], a
- ld hl, $c608 + 26
- ld a, [hli]
- ld [wOTTrademonDVs], a
- ld a, [hl]
- ld [wOTTrademonDVs + 1], a
- ld bc, $c608 + 5
- callba GetCaughtGender
- ld a, c
- ld [wOTTrademonCaughtData], a
- call SpeechTextBox
- call FadeToMenu
- callba Function10804d
- callba Function17d1f1
- ld a, $1
- ld [wForceEvolution], a
- ld a, $2
- ld [wLinkMode], a
- callba EvolvePokemon
- xor a
- ld [wLinkMode], a
- callba SaveAfterLinkTrade
- ld a, $5
- call GetSRAMBank
- ld a, $5
- ld [$a800], a
- call CloseSRAM
- ld a, [MapGroup]
- ld b, a
- ld a, [MapNumber]
- ld c, a
- call GetMapTrigger
- ld a, d
- or e
- jr z, .asm_17d180
- ld a, $1
- ld [de], a
-
-.asm_17d180
- call CloseSubmenu
- call RestartMapMusic
- ret
-; 17d187
-
-Mobile_CopyDefaultOTName: ; 17d187
- ld hl, Mobile5F_KrissName
- ld de, $c63d
- ld bc, 5
- call CopyBytes
- ret
-; 17d194
-
-Mobile5F_KrissName:
- db "クりス@@"
-; 17d198
-
-Mobile_CopyDefaultNickname: ; 17d199
- ld hl, .DefaultNickname
- ld de, $c642
- ld bc, 5
- call CopyBytes
- ret
-; 17d1a6
-
-.DefaultNickname:
- db "?????"
-
-Mobile_CopyDefaultMail: ; 17d1ab
- ld a, "@"
- ld hl, $c647
- ld bc, MAIL_MSG_LENGTH + 1
- call ByteFill
- ld hl, .DefaultMessage
- ld de, $c647
- ld bc, 6
- call CopyBytes
- ret
-; 17d1c3
-
-.DefaultMessage:
- db "こんにちは@"
-; 17d1c9
-
-Mobile_CopyDefaultMailAuthor: ; 17d1c9
- ld a, "@"
- ld de, $c668
- ld bc, 5
- call ByteFill
- ld hl, Mobile5F_KrissName
- ld de, $c668
- ld bc, 5
- call CopyBytes
- ret
-; 17d1e1
-
-CheckStringContainsLessThanBNextCharacters: ; 17d1e1
-.loop
- ld a, [de]
- inc de
- cp "<NEXT>"
- jr nz, .next_char
- dec b
- jr z, .done
-
-.next_char
- dec c
- jr nz, .loop
- and a
- ret
-
-.done
- scf
- ret
-; 17d1f1
-
-Function17d1f1: ; 17d1f1
- ld a, [CurPartySpecies]
- dec a
- call SetSeenAndCaughtMon
-
- ld a, [CurPartySpecies]
- cp UNOWN
- jr nz, .asm_17d223
-
- ld hl, PartyMon1DVs
- ld a, [PartyCount]
- dec a
- ld bc, PARTYMON_STRUCT_LENGTH
- call AddNTimes
- predef GetUnownLetter
- callab UpdateUnownDex
- ld a, [wFirstUnownSeen]
- and a
- jr nz, .asm_17d223
-
- ld a, [UnownLetter]
- ld [wFirstUnownSeen], a
-
-.asm_17d223
- ret
-; 17d224
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Parameter: [ScriptVar] = 0..1
-;
-; if [ScriptVar] == 0
-; Show japanese menu options
-; - News - News - ??? - Cancel
-; if [ScriptVar] == 1
-; Show BattleTower-Menu with 3 options in english language
-; - Challenge - Explanation - Cancel
-Special_Menu_ChallengeExplanationCancel: ; 17d224
- ld a, [ScriptVar]
- and a
- jr nz, .English
- ld a, $4
- ld [ScriptVar], a
- ld hl, MenuDataHeader_17d26a ; Japanese Menu, where you can choose 'News' as an option
- jr .Load_Interpret
-
-.English:
- ld a, $4
- ld [ScriptVar], a
- ld hl, MenuDataHeader_ChallengeExplanationCancel ; English Menu
-
-.Load_Interpret:
- call LoadMenuDataHeader
- call Function17d246
- call CloseWindow
- ret
-; 17d246
-
-Function17d246: ; 17d246
- call VerticalMenu
- jr c, .Exit
- ld a, [ScriptVar]
- cp $5
- jr nz, .UsewMenuCursorY
- ld a, [wMenuCursorY]
- cp $3
- ret z
- jr c, .UsewMenuCursorY
- dec a
- jr .LoadToScriptVar
-
-.UsewMenuCursorY:
- ld a, [wMenuCursorY]
-
-.LoadToScriptVar:
- ld [ScriptVar], a
- ret
-
-.Exit:
- ld a, $4
- ld [ScriptVar], a
- ret
-; 17d26a
-
-MenuDataHeader_17d26a: ; 17d26a
- db $40 ; flags
- db 0, 0 ; start coords
- db 9, 14 ; end coords
- dw MenuData2_17d272
- db 1 ; default option
-
-MenuData2_17d272: ; 17d272
- db $a0 ; flags
- db 4
- db "ニュース¯よみこむ@"
- db "ニュース¯みる@"
- db "せつめい@"
- db "やめる@"
-; 17d28f
-
-MenuDataHeader_ChallengeExplanationCancel: ; 17d28f
- db $40 ; flags
- db 0, 0 ; start coords
- db 7, 14 ; end coords
- dw MenuData2_ChallengeExplanationCancel
- db 1 ; default option
-
-MenuData2_ChallengeExplanationCancel: ; 17d297
- db $a0 ; flags
- db 3
- db "Challenge@"
- db "Explanation@"
- db "Cancel@"
-; 17d2b6
-
-Function17d2b6: ; 17d2b6
- call Function17d2c0
- callba Function1181da
- ret
-; 17d2c0
-
-Function17d2c0: ; 17d2c0
- xor a
- ld [wJumptableIndex], a
- ld [wcf64], a
- ld [wcf65], a
- ld [wcf66], a
- ret
-; 17d2ce
-
-Function17d2ce: ; 17d2ce
- ld a, $5
- call GetSRAMBank
- ld a, [$aa72]
- call CloseSRAM
- and a
- jr nz, .asm_17d2e2
- ld a, $1
- ld [ScriptVar], a
- ret
-
-.asm_17d2e2
- call Function17d314
- ret c
- call SpeechTextBox
- call FadeToMenu
- ld a, [rSVBK]
- push af
- ld a, $4
- ld [rSVBK], a
- call Function17d370
- call Function17d45a
- pop af
- ld [rSVBK], a
- ld de, MUSIC_MOBILE_CENTER
- ld a, e
- ld [wMapMusic], a
- ld [MusicFadeIDLo], a
- ld a, d
- ld [MusicFadeIDHi], a
- call PlayMusic
- call ReturnToMapFromSubmenu
- call CloseSubmenu
- ret
-; 17d314
-
-Function17d314: ; 17d314
- ld a, $5
- call GetSRAMBank
- ld a, [$b1b1]
- call CloseSRAM
- cp $21
- jr nc, .asm_17d354
- ld a, $6
- call GetSRAMBank
- ld l, $0
- ld h, l
- ld de, $a006
- ld a, [$a004]
- ld c, a
- ld a, [$a005]
- ld b, a
-.asm_17d336
- push bc
- ld a, [de]
- inc de
- ld c, a
- ld b, $0
- add hl, bc
- pop bc
- dec bc
- ld a, b
- or c
- jr nz, .asm_17d336
- ld a, [$a002]
- cp l
- jr nz, .asm_17d354
- ld a, [$a003]
- cp h
- jr nz, .asm_17d354
- call CloseSRAM
- and a
- ret
-
-.asm_17d354
- call CloseSRAM
- ld a, $5
- call GetSRAMBank
- xor a
- ld hl, $aa73
- ld bc, $c
- call ByteFill
- call CloseSRAM
- ld a, $2
- ld [ScriptVar], a
- scf
- ret
-; 17d370
-
-Function17d370: ; 17d370
- xor a
- ld [wcd77], a
- ld [wcd78], a
- ld [wcd79], a
- dec a
- ld [wcd6c], a
- call ClearBGPalettes
- call ClearSprites
- call ClearScreen
- callba ReloadMapPart
- call DisableLCD
- ld hl, VTiles1 tile $6e
- ld de, $c608
- ld bc, 1 tiles
- call CopyBytes
- ld a, $1
- ld [rVBK], a
- ld hl, PokemonNewsGFX
- ld de, VTiles1
- ld bc, $48 tiles
- call CopyBytes
- xor a
- ld hl, VTiles2 tile $7f
- ld bc, 1 tiles
- call ByteFill
- ld hl, $c608
- ld de, VTiles1 tile $6e
- ld bc, 1 tiles
- call CopyBytes
- xor a
- ld [rVBK], a
- ld hl, GFX_17eb7e
- ld de, VTiles2 tile $60
- ld bc, 1 tiles
- call CopyBytes
- call EnableLCD
- call Function17d60b
- ld a, $0
- ld [BGMapBuffer], a
- ld a, $d0
- ld [wcd21], a
- ld a, $6
- call GetSRAMBank
- ld hl, $a006
- ld de, UnknBGPals
- ld bc, $1000
- call CopyBytes
- call CloseSRAM
- ret
-; 17d3f6
-
-Function17d3f6: ; 17d3f6
- call ClearBGPalettes
- call ClearSprites
- call ClearScreen
- callba ReloadMapPart
-
-Function17d405:
- call DisableLCD
- ld hl, VTiles1 tile $6e
- ld de, $c608
- ld bc, 1 tiles
- call CopyBytes
- ld a, $1
- ld [rVBK], a
- ld hl, PokemonNewsGFX
- ld de, VTiles1
- ld bc, $48 tiles
- call CopyBytes
- xor a
- ld hl, VTiles2 tile $7f
- ld bc, 1 tiles
- call ByteFill
- ld hl, $c608
- ld de, VTiles1 tile $6e
- ld bc, 1 tiles
- call CopyBytes
- xor a
- ld [rVBK], a
- call EnableLCD
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, Palette_17eff6
- ld de, UnknBGPals
- ld bc, 8 palettes
- call CopyBytes
- call SetPalettes
- pop af
- ld [rSVBK], a
- ret
-; 17d45a
-
-Function17d45a: ; 17d45a
-.asm_17d45a
- call JoyTextDelay
- ld a, [wcd77]
- bit 7, a
- jr nz, .asm_17d46f
- call Function17d474
- callba ReloadMapPart
- jr .asm_17d45a
-
-.asm_17d46f
- xor a
- ld [ScriptVar], a
- ret
-; 17d474
-
-Function17d474: ; 17d474
- jumptable Jumptable_17d483, wcd77
-; 17d483
-
-Jumptable_17d483: ; 17d483
- dw Function17d48d
- dw Function17d5be
- dw Function17d5c4
- dw Function17d6fd
- dw Function17e427
-; 17d48d
-
-Function17d48d: ; 17d48d
- ld hl, Palette_17eff6
- ld de, $c608
- ld bc, $40
- call CopyBytes
- ld hl, TileAttrmap_17eb8e
- decoord 0, 0
- bccoord 0, 0, AttrMap
- ld a, $12
-.asm_17d4a4
- push af
- ld a, $14
- push hl
-.asm_17d4a8
- push af
- ld a, [hli]
- cp $7f
- jr z, .asm_17d4b0
- add $80
-
-.asm_17d4b0
- ld [de], a
- inc de
- ld a, [hli]
- ld [bc], a
- inc bc
- pop af
- dec a
- jr nz, .asm_17d4a8
- pop hl
- push bc
- ld bc, $40
- add hl, bc
- pop bc
- pop af
- dec a
- jr nz, .asm_17d4a4
- ld a, [BGMapBuffer]
- ld l, a
- ld a, [wcd21]
- ld h, a
- ld a, [hli]
- ld e, a
- ld a, [wcd6c]
- cp e
- jr z, .asm_17d4e0
- ld a, e
- ld [wcd6c], a
- ld [wMapMusic], a
- ld d, $0
- call PlayMusic2
-
-.asm_17d4e0
- ld a, [hli]
- ld de, $c608
- ld c, $8
-.asm_17d4e6
- srl a
- jr nc, .asm_17d4f6
- ld b, $8
- push af
-.asm_17d4ed
- ld a, [hli]
- ld [de], a
- inc de
- dec b
- jr nz, .asm_17d4ed
- pop af
- jr .asm_17d4fc
-
-.asm_17d4f6
- push af
- ld a, e
- add $8
- ld e, a
- pop af
-
-.asm_17d4fc
- dec c
- jr nz, .asm_17d4e6
- push hl
- call Function17d5f6
- pop hl
- ld a, [hli]
- and a
- jr z, .asm_17d539
-.asm_17d508
- push af
- ld a, [hli]
- ld [wcd4f], a
- ld a, [hli]
- ld [wcd50], a
- ld a, [hli]
- ld [wcd51], a
- ld a, [hli]
- ld [wcd52], a
- ld a, [hli]
- sla a
- sla a
- sla a
- add $98
- ld [wcd53], a
- ld de, wcd4f
- call Function17e613
- ld a, [hli]
- ld [wcd53], a
- ld de, wcd4f
- call Function17e691
- pop af
- dec a
- jr nz, .asm_17d508
-
-.asm_17d539
- ld a, [hli]
-.asm_17d53a
- push af
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- push hl
- pop de
- hlcoord 0, 0
- add hl, bc
- call PlaceString
- push de
- pop hl
- inc hl
- pop af
- dec a
- jr nz, .asm_17d53a
- ld de, CreditsTimer
- ld bc, $c
- call CopyBytes
- xor a
- ld [wcd2e], a
- ld [wcd2f], a
- inc a
- ld [wcd30], a
- ld [wcd31], a
- ld de, wcd32
- ld bc, $10
- call CopyBytes
- ld a, [hli]
- ld [wcd42], a
- ld a, [hli]
- ld [wcd43], a
- ld a, [hli]
- ld [wMobileInactivityTimerMinutes], a
- ld a, [hli]
- ld [wMobileInactivityTimerSeconds], a
- ld a, [hli]
- ld [wMobileInactivityTimerFrames], a
- ld a, [hli]
- and a
- jr z, .asm_17d58a
- call Function17d6a1
-
-.asm_17d58a
- ld a, l
- ld [wcd49], a
- ld a, h
- ld [wcd4a], a
- ld a, [wcd42]
- ld c, a
- ld b, $0
- add hl, bc
- add hl, bc
- ld a, l
- ld [wcd4b], a
- ld a, h
- ld [wcd4c], a
- add hl, bc
- add hl, bc
- ld a, l
- ld [wcd4d], a
- ld a, h
- ld [wcd4e], a
- call Function17e451
- call Function17e55b
- call Function17e5af
- callba ReloadMapPart
- jp Function17e438
-; 17d5be
-
-Function17d5be: ; 17d5be
- call SetPalettes
- call Function17e438
-
-Function17d5c4:
- ld a, [hJoyPressed]
- and a
- ret z
- ld c, 0
- ld b, c
- ld hl, wcd32
-.loop
- srl a
- jr c, .got_button
- inc c
- inc c
- jr .loop
-
-.got_button
- add hl, bc
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- and c
- cp $ff
- ret z
- ld a, [wcd20]
- ld l, a
- ld a, [wcd21]
- ld h, a
- add hl, bc
- ld a, l
- ld [wcd78], a
- ld a, h
- ld [wcd79], a
- ld a, $3
- ld [wcd77], a
- ret
-; 17d5f6
-
-Function17d5f6: ; 17d5f6
- ld a, $5
- ld [rSVBK], a
- ld hl, $c608
- ld de, UnknBGPals
- ld bc, 8 palettes
- call CopyBytes
- ld a, $4
- ld [rSVBK], a
- ret
-; 17d60b
-
-Function17d60b: ; 17d60b
- ld a, $5
- call GetSRAMBank
- ld hl, $b1d3
- ld de, $c608
- ld bc, $20
- call CopyBytes
- ld a, [$b1b1]
- ld c, a
- ld a, [$b1b2]
- ld b, a
- ld a, [$b1b3]
- ld l, a
- ld a, [$b1b4]
- ld h, a
- call CloseSRAM
- ld a, $6
- call GetSRAMBank
- ld de, $c708
- ld a, c
- and a
- jr z, .asm_17d684
-.asm_17d63b
- push bc
- ld a, l
- ld [de], a
- inc de
- ld a, h
- ld [de], a
- inc de
- ld bc, $a
- add hl, bc
- pop bc
- ld a, [hli]
- ld [wcd4a], a
- ld a, [hli]
- ld [wcd49], a
- push hl
- push de
- ld hl, $c608
- ld e, b
- ld d, $0
- add hl, de
- ld a, [hli]
- ld [wcd4b], a
- ld a, [hl]
- ld [wcd4c], a
- pop de
- pop hl
- inc b
- inc b
- dec c
- dec c
- jr z, .asm_17d684
- push bc
- push de
- ld a, [wcd49]
- ld c, a
- ld a, [wcd4a]
- ld b, a
- ld a, [wcd4b]
- ld e, a
- ld a, [wcd4c]
- ld d, a
-.asm_17d67a
- add hl, de
- dec bc
- ld a, c
- or b
- jr nz, .asm_17d67a
- pop de
- pop bc
- jr .asm_17d63b
-
-.asm_17d684
- call CloseSRAM
- ld a, $5
- call GetSRAMBank
- ld hl, $c708
- ld de, $b1b3
- ld a, [$b1b1]
- ld c, a
- ld a, [$b1b2]
- ld b, a
- call CopyBytes
- call CloseSRAM
- ret
-; 17d6a1
-
-
-Function17d6a1: ; 17d6a1
- push hl
- ld a, [wcd6e]
- ld c, a
- ld b, $0
- ld a, $5
- call GetSRAMBank
- ld hl, $b1d3
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld [wcd47], a
- ld a, [hl]
- ld [BGMapPalBuffer], a
- ld hl, $b1b3
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld c, a
- ld a, [hl]
- ld h, a
- ld l, c
- call CloseSRAM
- ld a, $6
- call GetSRAMBank
- ld a, l
- ld [wcd5e], a
- ld a, h
- ld [wcd5f], a
- ld de, wcd60
- ld bc, $4
- call CopyBytes
- inc hl
- inc hl
- ld de, wcd64
- ld bc, $4
- call CopyBytes
- ld a, [hli]
- ld [wcd69], a
- ld a, [hli]
- ld [wcd68], a
- ld a, l
- ld [wcd6a], a
- ld a, h
- ld [wcd6b], a
- call CloseSRAM
- pop hl
- ret
-; 17d6fd
-
-Function17d6fd: ; 17d6fd
- ld a, [wcd77]
- bit 7, a
- jr nz, asm_17d721
- ld a, [wcd78]
- ld l, a
- ld a, [wcd79]
- ld h, a
- ld a, [hl]
- cp $ff
- jr z, asm_17d721
-
-Function17d711:
-.crash_loop
- cp $31
- jr nc, .crash_loop
- ld e, a
- ld d, 0
- ld hl, Jumptable17d72a
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-asm_17d721
- call Function17e5af
- ld a, $2
- ld [wcd77], a
- ret
-; 17d72a
-
-Jumptable17d72a: ; 17d72a
- dw Function17d78c
- dw Function17d78d
- dw Function17d7b4
- dw Function17d7c2
- dw Function17d7d3
- dw Function17d7e5
- dw Function17d818
- dw Function17d833
- dw Function17d85d
- dw Function17d902
- dw Function17d93a
- dw Function17d98b
- dw Function17d9e3
- dw Function17da31
- dw Function17da9c
- dw Function17dadc
- dw Function17db2d
- dw Function17db56
- dw Function17db77
- dw Function17dbe9
- dw Function17dc1f
- dw Function17dc9f
- dw Function17dca9
- dw Function17dccf
- dw Function17dd13
- dw Function17dd30
- dw Function17dd49
- dw Function17ddcd
- dw Function17de32
- dw Function17de91
- dw Function17ded9
- dw Function17e0fd
- dw Function17e133
- dw Function17e165
- dw Function17e1a1
- dw Function17e254
- dw Function17e261
- dw Function17e270
- dw Function17e27f
- dw Function17e293
- dw Function17e2a7
- dw Function17e367
- dw Function17e37e
- dw Function17e395
- dw Function17e3ac
- dw Function17e3c3
- dw Function17e3e0
- dw Function17e3f0
- dw Function17e409
-; 17d78c
-
-Function17d78c: ; 17d78c
- ret
-; 17d78d
-
-Function17d78d: ; 17d78d
- call Function17e415
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- call Function17e41e
- ld a, $6
- call GetSRAMBank
- ld hl, $a006
- add hl, bc
- ld de, UnknBGPals
- ld bc, $1000
- call CopyBytes
- call CloseSRAM
- xor a
- ld [wcd77], a
- call ClearBGPalettes
- ret
-; 17d7b4
-
-Function17d7b4: ; 17d7b4
- call Function17e415
- ld a, [hli]
- ld e, a
- ld d, $0
- call PlayMusic2
- call Function17e41e
- ret
-; 17d7c2
-
-Function17d7c2: ; 17d7c2
- call Function17e415
- ld a, [hli]
- ld e, a
- ld d, $0
- call PlaySFX
- call WaitSFX
- call Function17e41e
- ret
-; 17d7d3
-
-Function17d7d3: ; 17d7d3
- call Function17e415
- ld a, [hli]
- dec a
- ld e, a
- ld d, $0
- call PlayCryHeader
- call WaitSFX
- call Function17e41e
- ret
-; 17d7e5
-
-Function17d7e5: ; 17d7e5
- call Function17e415
- ld a, [hli]
- ld [wcd4f], a
- ld a, [hli]
- ld [wcd50], a
- ld a, [hli]
- ld [wcd51], a
- ld a, [hli]
- ld [wcd52], a
- ld a, [hli]
- sla a
- sla a
- sla a
- add $98
- ld [wcd53], a
- ld de, wcd4f
- call Function17e613
- ld a, [hli]
- ld [wcd53], a
- ld de, wcd4f
- call Function17e691
- call Function17e41e
- ret
-; 17d818
-
-Function17d818: ; 17d818
- call Function17e415
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- call Function17e41e
- call Function17e447
- ld e, l
- ld d, h
- hlcoord 0, 0
- add hl, bc
- call PlaceString
- ret
-; 17d833
-
-Function17d833: ; 17d833
- call Function17e415
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- call Function17e41e
- push de
- push bc
- call Function17e32b
- pop bc
- pop de
- call Function17e43d
- ld c, l
- ld b, h
- hlcoord 0, 0
- add hl, de
- ld e, l
- ld d, h
- callba Function11c08f
- call Function17e349
- ret
-; 17d85d
-
-Function17d85d: ; 17d85d
- call Function17e415
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- push hl
- ld hl, UnknBGPals
- add hl, de
- ld de, wcc60
-.asm_17d86c
- ld a, [hli]
- ld [de], a
- inc de
- and a
- jr nz, .asm_17d86c
- pop hl
- ld de, $c608
- ld c, $0
-.asm_17d878
- ld a, [hli]
- cp $ff
- jr z, .asm_17d8c7
- ld [wcd4f], a
- ld a, [hli]
- ld [wcd50], a
- ld a, [hli]
- ld [wcd51], a
- ld a, [hli]
- ld [wcd52], a
- ld a, [wcd51]
- push af
- cp $c0
- jr c, .asm_17d89b
- ld a, [wcd4f]
- ld [rSVBK], a
- jr .asm_17d8a1
-
-.asm_17d89b
- ld a, [wcd4f]
- call GetSRAMBank
-
-.asm_17d8a1
- push hl
- ld a, [wcd50]
- ld l, a
- ld a, [wcd51]
- ld h, a
- ld a, [wcd52]
-.asm_17d8ad
- push af
- ld a, [hli]
- ld [de], a
- inc de
- inc c
- pop af
- dec a
- jr nz, .asm_17d8ad
- pop hl
- pop af
- cp $c0
- jr c, .asm_17d8c2
- ld a, $4
- ld [rSVBK], a
- jr .asm_17d878
-
-.asm_17d8c2
- call CloseSRAM
- jr .asm_17d878
-
-.asm_17d8c7
- call Function17e41e
- push bc
- ld a, $3
- ld [rSVBK], a
- ld hl, $c608
- ld de, UnknBGPals
- ld b, $0
- call CopyBytes
- ld a, $4
- ld [rSVBK], a
- call Function17e32b
- pop bc
- ld a, c
- ld [wcd3b], a
- xor a
- ld [wcf66], a
- callba Function118329
- ld a, [wc300]
- and a
- jr z, .asm_17d8fe
- cp $a
- jr z, .asm_17d8fe
- call Function17e309
- ret
-
-.asm_17d8fe
- call Function17e349
- ret
-; 17d902
-
-Function17d902: ; 17d902
- call Function17e415
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- push de
- call Function17e41e
- call Function17e32b
- pop de
- ld hl, UnknBGPals
- add hl, de
- ld de, wcc60
-.asm_17d918
- ld a, [hli]
- ld [de], a
- inc de
- and a
- jr nz, .asm_17d918
- xor a
- ld [wcf66], a
- callba Function11837a
- ld a, [wc300]
- and a
- jr z, .asm_17d936
- cp $a
- jr z, .asm_17d936
- call Function17e309
- ret
-
-.asm_17d936
- call Function17e349
- ret
-; 17d93a
-
-Function17d93a: ; 17d93a
- call Function17e415
- ld de, $c708
- ld bc, $5
- call CopyBytes
- call Function17e41e
- call Function17e32b
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld a, [$c70c]
- call Function17e6de
- ld a, [$c70a]
- ld [CurPartySpecies], a
- ld a, [$c70c]
- ld e, a
- callba LoadMonPaletteAsNthBGPal
- call SetPalettes
- ld a, [$c708]
- ld l, a
- ld a, [$c709]
- ld h, a
- ld a, [$c70b]
- ld c, a
- decoord 0, 0
- add hl, de
- ld e, l
- ld d, h
- callba HOF_AnimateFrontpic
- pop af
- ld [rSVBK], a
- call Function17e349
- ret
-; 17d98b
-
-Function17d98b: ; 17d98b
- call Function17e415
- ld de, $c708
- ld bc, $4
- call CopyBytes
- call Function17e41e
- call Function17e32b
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld a, [$c70b]
- call Function17e6de
- ld a, [$c70a]
- ld [TrainerClass], a
- ld a, [$c70b]
- ld e, a
- callba LoadTrainerClassPaletteAsNthBGPal
- call SetPalettes
- ld a, [$c708]
- ld e, a
- ld a, [$c709]
- ld d, a
- push de
- ld de, VTiles2
- callba GetTrainerPic
- pop hl
- decoord 0, 0
- add hl, de
- ld bc, $707
- predef PlaceGraphic
- pop af
- ld [rSVBK], a
- call Function17e349
- ret
-; 17d9e3
-
-Function17d9e3: ; 17d9e3
- call Function17e415
- ld de, $c708
- ld bc, $7
- call CopyBytes
- call Function17e41e
- ld a, [$c70b]
- push af
- cp $c0
- jr c, .asm_17da01
- ld a, [$c70c]
- ld [rSVBK], a
- jr .asm_17da07
-
-.asm_17da01
- ld a, [$c70c]
- call GetSRAMBank
-
-.asm_17da07
- ld a, [$c708]
- ld l, a
- ld a, [$c709]
- ld h, a
- ld a, [$c70a]
- ld e, a
- ld a, [$c70b]
- ld d, a
- ld a, [$c70d]
- ld c, a
- ld a, [$c70e]
- ld b, a
- call CopyBytes
- pop af
- cp $c0
- jr c, .asm_17da2d
- ld a, $4
- ld [rSVBK], a
- jr .asm_17da30
-
-.asm_17da2d
- call CloseSRAM
-
-.asm_17da30
- ret
-; 17da31
-
-Function17da31: ; 17da31
- call Function17e415
- ld de, $c708
- ld bc, $4
- call CopyBytes
- call Function17e41e
- ld a, [$c709]
- push af
- cp $c0
- jr c, .asm_17da4f
- ld a, [$c70a]
- ld [rSVBK], a
- jr .asm_17da55
-
-.asm_17da4f
- ld a, [$c70a]
- call GetSRAMBank
-
-.asm_17da55
- ld a, [$c708]
- ld e, a
- ld a, [$c709]
- ld d, a
- ld a, [$c70b]
- ld c, a
- bit 7, c
- jr nz, .asm_17da70
- ld hl, Unknown_17da8c
- ld b, $0
- add hl, bc
- ld a, [de]
- or [hl]
- ld [de], a
- jr .asm_17da7d
-
-.asm_17da70
- ld hl, Unknown_17da94
- ld a, c
- and $7f
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [de]
- and [hl]
- ld [de], a
-
-.asm_17da7d
- pop af
- cp $c0
- jr c, .asm_17da88
- ld a, $4
- ld [rSVBK], a
- jr .asm_17da8b
-
-.asm_17da88
- call CloseSRAM
-
-.asm_17da8b
- ret
-; 17da8c
-
-Unknown_17da8c:
-x = 0
- rept 8
- db 1 << x
-x = x + 1
- endr
-
-Unknown_17da94:
-x = 0
- rept 8
- db (1 << x) ^ $ff
-x = x + 1
- endr
-; 17da9c
-
-Function17da9c: ; 17da9c
- ld a, [wcd31]
- dec a
- jr z, .asm_17dabd
- push af
- call Function17e566
- pop af
- ld [wcd31], a
- ld hl, wcd24
- ld a, [wcd2e]
- sub [hl]
- ld [wcd2e], a
- call Function17e55b
- call Function17e5af
-.asm_17daba
- jp Function17e415
-
-.asm_17dabd
- ld a, [wcd2f]
- and a
- jr z, .asm_17daba
- ld hl, wcd24
- sub [hl]
- ld [wcd2f], a
- ld a, [wcd2e]
- sub [hl]
- ld [wcd2e], a
- call Function17e451
- call Function17e55b
- call Function17e5af
- jr .asm_17daba
-; 17dadc
-
-Function17dadc: ; 17dadc
- ld a, [wcd2e]
- ld hl, wcd24
- add [hl]
- ld hl, wcd42
- cp [hl]
- jr z, .asm_17db0e
- jr nc, .asm_17db0e
- ld hl, wcd31
- ld a, [wcd2b]
- cp [hl]
- jr z, .asm_17db11
- call Function17e566
- ld a, [wcd31]
- inc a
- ld [wcd31], a
- ld hl, wcd24
- ld a, [wcd2e]
- add [hl]
- ld [wcd2e], a
- call Function17e55b
- call Function17e5af
-
-.asm_17db0e
- jp Function17e415
-
-.asm_17db11
- ld hl, wcd24
- ld a, [wcd2f]
- add [hl]
- ld [wcd2f], a
- ld a, [wcd2e]
- add [hl]
- ld [wcd2e], a
- call Function17e451
- call Function17e55b
- call Function17e5af
- jr .asm_17db0e
-; 17db2d
-
-Function17db2d: ; 17db2d
- ld a, [wcd30]
- ld hl, wcd24
- cp [hl]
- jr z, .asm_17db53
- ld hl, wcd42
- ld a, [wcd2e]
- inc a
- cp [hl]
- jr z, .asm_17db53
- ld [wcd2e], a
- call Function17e566
- ld a, [wcd30]
- inc a
- ld [wcd30], a
- call Function17e55b
- call Function17e5af
-
-.asm_17db53
- jp Function17e415
-; 17db56
-
-Function17db56: ; 17db56
- ld a, [wcd30]
- cp $1
- jr z, .asm_17db74
- call Function17e566
- ld a, [wcd30]
- dec a
- ld [wcd30], a
- ld a, [wcd2e]
- dec a
- ld [wcd2e], a
- call Function17e55b
- call Function17e5af
-
-.asm_17db74
- jp Function17e415
-; 17db77
-
-Function17db77: ; 17db77
- ld hl, wcd2d
- ld a, [wcd2f]
- add [hl]
- ld hl, wcd42
- cp [hl]
- jr z, .asm_17dbae
- jr nc, .asm_17dbae
- call Function17e566
- ld hl, wcd2d
- ld a, [wcd2f]
- add [hl]
- ld [wcd2f], a
- ld a, [wcd2e]
- add [hl]
- ld hl, wcd42
- cp [hl]
- jr c, .asm_17db9f
- ld a, [hl]
- dec a
-
-.asm_17db9f
- ld [wcd2e], a
- call Function17dbb1
- call Function17e451
- call Function17e55b
- call Function17e5af
-
-.asm_17dbae
- jp Function17e415
-; 17dbb1
-
-Function17dbb1: ; 17dbb1
- ld hl, wcd2f
- ld a, [wcd42]
- sub [hl]
- ld hl, wcd2d
- cp [hl]
- ret nc
- ld a, $1
- ld [wcd30], a
- ld [wcd31], a
- ld a, [wcd24]
- ld c, a
- ld a, [wcd24]
- ld b, a
- ld a, [wcd2e]
- ld hl, wcd2f
- sub [hl]
-.asm_17dbd4
- and a
- ret z
- push af
- ld hl, wcd30
- ld a, b
- cp [hl]
- jr nz, .asm_17dbe4
- ld a, $1
- ld [hl], a
- ld hl, wcd31
-
-.asm_17dbe4
- inc [hl]
- pop af
- dec a
- jr .asm_17dbd4
-; 17dbe9
-
-Function17dbe9: ; 17dbe9
- ld hl, wcd2d
- ld a, [wcd2f]
- sub [hl]
- bit 7, a
- jr z, .asm_17dbf5
- xor a
-
-.asm_17dbf5
- ld [wcd2f], a
- ld a, [wcd30]
- dec a
- ld c, a
- ld a, [wcd31]
- ld b, a
- xor a
- ld hl, wcd24
-.asm_17dc05
- dec b
- jr z, .asm_17dc0b
- add [hl]
- jr .asm_17dc05
-
-.asm_17dc0b
- add c
- ld hl, wcd2f
- add [hl]
- ld [wcd2e], a
- call Function17e451
- call Function17e55b
- call Function17e5af
- jp Function17e415
-; 17dc1f
-
-Function17dc1f: ; 17dc1f
- call Function17e415
- ld de, $c688
- ld bc, $6
- call CopyBytes
- call Function17e32b
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld hl, $c688
- ld a, $40
- ld [$c708], a
- ld a, [hli]
- ld [$c70a], a
- add $5
- ld [$c70c], a
- ld a, [hli]
- ld [$c709], a
- add $4
- ld [$c70b], a
- ld a, $96
- ld [$c70d], a
- ld a, $5c
- ld [$c70e], a
- ld a, $1
- ld [$c70f], a
- ld hl, $c708
- call LoadMenuDataHeader
- call VerticalMenu
- jr nc, .asm_17dc6e
- ld a, $2
- ld [wMenuCursorY], a
-
-.asm_17dc6e
- call CloseWindow
- pop af
- ld [rSVBK], a
- ld a, [wMenuCursorY]
- cp $1
- jr nz, .asm_17dc85
- ld a, [$c68a]
- ld l, a
- ld a, [$c68a + 1]
- ld h, a
- jr .asm_17dc8d
-
-.asm_17dc85
- ld a, [$c68a + 2]
- ld l, a
- ld a, [$c68a + 3]
- ld h, a
-
-.asm_17dc8d
- push hl
- call Function17e349
- pop hl
- call Function17e40f
- ret
-; 17dc96
-
-MenuData2_17dc96:
- db $e0 ; flags
- db 2
- db "はい@"
- db "いいえ@"
-; 17dc9f
-
-Function17dc9f: ; 17dc9f
- call Function17e415
- call Function17e41e
- call RotateFourPalettesLeft
- ret
-; 17dca9
-
-Function17dca9: ; 17dca9
- call Function17e415
- call Function17e41e
-
-Function17dcaf:
- ld a, $5
- ld [rSVBK], a
- ld hl, UnknBGPals
- ld de, $8
- ld c, $8
-.asm_17dcbb
- push hl
- ld a, $ff
- ld [hli], a
- ld a, $7f
- ld [hl], a
- pop hl
- add hl, de
- dec c
- jr nz, .asm_17dcbb
- call RotateThreePalettesRight
- ld a, $4
- ld [rSVBK], a
- ret
-; 17dccf
-
-Function17dccf: ; 17dccf
- call Function17e415
- push hl
- ld a, [wcd4b]
- ld l, a
- ld a, [wcd4c]
- ld h, a
- ld a, [wcd2e]
- ld c, a
- ld b, $0
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld c, a
- ld a, [hl]
- ld b, a
- call Function17e43d
- call Function17e41e
-.asm_17dced
- ld a, [wcd78]
- ld l, a
- ld a, [wcd79]
- ld h, a
- ld a, [hl]
- cp $ff
- jr z, .asm_17dd0d
-.crash_loop
- cp $31
- jr nc, .crash_loop
- call Function17d711
- ld a, [wcd77]
- bit 7, a
- jr nz, .asm_17dd0d
- and a
- jr z, .asm_17dd11
- jr .asm_17dced
-
-.asm_17dd0d
- pop hl
- jp Function17e41e
-
-.asm_17dd11
- pop hl
- ret
-; 17dd13
-
-Function17dd13: ; 17dd13
- call Function17e415
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- call Function17e41e
- call Function17e447
- push hl
- hlcoord 0, 0
- add hl, bc
- push hl
- pop bc
- pop hl
- call PlaceHLTextAtBC
- ret
-; 17dd30
-
-Function17dd30: ; 17dd30
- call Function17e415
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld b, $0
- ld a, [hli]
- push af
- call Function17e41e
- pop af
- hlcoord 0, 0
- add hl, de
- call Function17e600
- ret
-; 17dd49
-
-Function17dd49: ; 17dd49
- call Function17e415
- ld de, $c708
- ld bc, $a
- call CopyBytes
- ld a, [$c711]
- ld c, a
- ld b, $0
- call CopyBytes
- ld a, [$c70a]
- cp $c0
- jr c, .sram
- ld a, [$c708]
- ld [rSVBK], a
- jr .got_bank
-
-.sram
- ld a, [$c708]
- call GetSRAMBank
-
-.got_bank
- ld a, [$c709]
- ld l, a
- ld a, [$c70a]
- ld h, a
- ld de, $c688
- ld a, [$c711]
- ld c, a
- ld b, $0
- call CopyBytes
- ld a, [$c70a]
- cp $c0
- jr c, .close_sram
- ld a, $4
- ld [rSVBK], a
- jr .exited_bank
-
-.close_sram
- call CloseSRAM
-
-.exited_bank
- ld a, [$c711]
- ld c, a
- ld hl, $c712
- ld de, $c688
-.loop
- ld a, [de]
- inc de
- cp [hl]
- inc hl
- jr z, .next
- jr c, .load
- jr .load2
-
-.next
- dec c
- jr nz, .loop
- ld a, [$c70d]
- ld l, a
- ld a, [$c70e]
- ld h, a
- jr .done
-
-.load2
- ld a, [$c70f]
- ld l, a
- ld a, [$c710]
- ld h, a
- jr .done
-
-.load
- ld a, [$c70b]
- ld l, a
- ld a, [$c70c]
- ld h, a
-
-.done
- call Function17e40f
- ret
-; 17ddcd
-
-Function17ddcd: ; 17ddcd
- call Function17e415
- ld de, $c708
- ld bc, $8
- call CopyBytes
- ld a, [$c70a]
- cp $c0
- jr c, .asm_17dde7
- ld a, [$c708]
- ld [rSVBK], a
- jr .asm_17dded
-
-.asm_17dde7
- ld a, [$c708]
- call GetSRAMBank
-
-.asm_17dded
- ld a, [$c709]
- ld e, a
- ld a, [$c70a]
- ld d, a
- ld a, [de]
- ld [$c710], a
- ld a, [$c70b]
- ld c, a
- ld b, $0
- ld a, [$c70a]
- cp $c0
- jr c, .asm_17de0c
- ld a, $4
- ld [rSVBK], a
- jr .asm_17de0f
-
-.asm_17de0c
- call CloseSRAM
-
-.asm_17de0f
- push hl
- ld hl, Unknown_17da8c
- add hl, bc
- ld a, [hl]
- ld hl, $c710
- and [hl]
- pop hl
- jr nz, .asm_17de26
- ld a, [$c70e]
- ld l, a
- ld a, [$c70f]
- ld h, a
- jr .asm_17de2e
-
-.asm_17de26
- ld a, [$c70c]
- ld l, a
- ld a, [$c70d]
- ld h, a
-
-.asm_17de2e
- call Function17e40f
- ret
-; 17de32
-
-Function17de32: ; 17de32
- call Function17e415
- ld de, $c708
- ld bc, $9
- call CopyBytes
- ld a, [$c710]
- ld c, a
- ld b, $0
- call CopyBytes
- ld a, $6
- call GetSRAMBank
- call Function17f4f6
- ld a, [$c708]
- ld e, a
- ld a, [$c709]
- ld d, a
- add hl, de
- ld e, l
- ld d, h
- ld a, [$c710]
- ld c, a
- ld hl, $c711
-.asm_17de61
- ld a, [de]
- inc de
- cp [hl]
- inc hl
- jr z, .asm_17de6b
- jr c, .asm_17de82
- jr .asm_17de78
-
-.asm_17de6b
- dec c
- jr nz, .asm_17de61
- ld a, [$c70c]
- ld l, a
- ld a, [$c70d]
- ld h, a
- jr .asm_17de8a
-
-.asm_17de78
- ld a, [$c70e]
- ld l, a
- ld a, [$c70f]
- ld h, a
- jr .asm_17de8a
-
-.asm_17de82
- ld a, [$c70a]
- ld l, a
- ld a, [$c70b]
- ld h, a
-
-.asm_17de8a
- call CloseSRAM
- call Function17e40f
- ret
-; 17de91
-
-Function17de91: ; 17de91
- call Function17e415
- ld de, $c708
- ld bc, $7
- call CopyBytes
- ld a, $6
- call GetSRAMBank
- call Function17f4f6
- ld a, [$c708]
- ld e, a
- ld a, [$c709]
- ld d, a
- add hl, de
- ld e, l
- ld d, h
- ld a, [$c70a]
- ld c, a
- ld b, $0
- ld hl, Unknown_17da8c
- add hl, bc
- ld a, [hl]
- ld l, e
- ld h, d
- and [hl]
- jr nz, .asm_17deca
- ld a, [$c70d]
- ld l, a
- ld a, [$c70e]
- ld h, a
- jr .asm_17ded2
-
-.asm_17deca
- ld a, [$c70b]
- ld l, a
- ld a, [$c70c]
- ld h, a
-
-.asm_17ded2
- call CloseSRAM
- call Function17e40f
- ret
-; 17ded9
-
-Function17ded9: ; 17ded9
- call Function17e415
- ld de, $c708
- ld bc, $1f
- call CopyBytes
- call Function17e32b
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld hl, $c708
- ld a, [hli]
- ld [CurPartySpecies], a
- ld [TempEnemyMonSpecies], a
- ld a, [hli]
- ld [CurPartyLevel], a
- ld a, [hli]
- ld b, a
- ld a, [PartyCount]
- cp $6
- jp nc, Function17e026
- xor a
- ld [MonType], a
- push hl
- push bc
- predef TryAddMonToParty
- callba SetCaughtData
- pop bc
- pop hl
- bit 1, b
- jr z, .asm_17df33
- push bc
- push hl
- ld a, [PartyCount]
- dec a
- ld hl, PartyMonNicknames
- call SkipNames
- ld d, h
- ld e, l
- pop hl
- call CopyBytes
- pop bc
- jr .asm_17df37
-
-.asm_17df33
- ld de, $6
- add hl, de
-
-.asm_17df37
- bit 2, b
- jr z, .asm_17df5a
- push bc
- push hl
- ld a, [PartyCount]
- dec a
- ld hl, PartyMonOT
- call SkipNames
- ld d, h
- ld e, l
- pop hl
- call CopyBytes
- ld a, [hli]
- ld b, a
- push hl
- callba SetGiftPartyMonCaughtData
- pop hl
- pop bc
- jr .asm_17df5e
-
-.asm_17df5a
- ld de, $7
- add hl, de
-
-.asm_17df5e
- bit 3, b
- jr z, .asm_17df79
- push bc
- push hl
- ld a, [PartyCount]
- dec a
- ld hl, PartyMon1ID
- call GetPartyLocation
- ld d, h
- ld e, l
- pop hl
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- pop bc
- jr .asm_17df7b
-
-.asm_17df79
- inc hl
- inc hl
-
-.asm_17df7b
- bit 4, b
- jr z, .asm_17dfd0
- push bc
- push hl
- ld a, [PartyCount]
- dec a
- ld hl, PartyMon1DVs
- call GetPartyLocation
- ld d, h
- ld e, l
- pop hl
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- push hl
- ld a, [PartyCount]
- dec a
- ld hl, PartyMon1Species
- call GetPartyLocation
- ld a, [hl]
- ld [CurSpecies], a
- call GetBaseData
- ld a, [PartyCount]
- dec a
- ld hl, PartyMon1MaxHP
- call GetPartyLocation
- ld d, h
- ld e, l
- push hl
- ld b, $0
- callba CalcPkmnStats
- ld a, [PartyCount]
- dec a
- ld hl, PartyMon1HP
- call GetPartyLocation
- ld d, h
- ld e, l
- pop hl
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hl]
- ld [de], a
- pop hl
- pop bc
- jr .asm_17dfd2
-
-.asm_17dfd0
- inc hl
- inc hl
-
-.asm_17dfd2
- bit 5, b
- jr z, .asm_17dfea
- push bc
- push hl
- ld a, [PartyCount]
- dec a
- ld hl, PartyMon1Item
- call GetPartyLocation
- ld d, h
- ld e, l
- pop hl
- ld a, [hli]
- ld [de], a
- pop bc
- jr .asm_17dfeb
-
-.asm_17dfea
- inc hl
-
-.asm_17dfeb
- bit 6, b
- jr z, .asm_17e01f
- push bc
- push hl
- ld a, [PartyCount]
- dec a
- ld hl, PartyMon1Moves
- call GetPartyLocation
- ld d, h
- ld e, l
- pop hl
- push de
- ld bc, $4
- call CopyBytes
- pop de
- push hl
- push de
- ld a, [PartyCount]
- dec a
- ld hl, PartyMon1PP
- call GetPartyLocation
- ld d, h
- ld e, l
- pop hl
- predef FillPP
- pop hl
- pop bc
- jp asm_17e0ee
-
-.asm_17e01f
- ld de, $4
- add hl, de
- jp asm_17e0ee
-; 17e026
-
-Function17e026: ; 17e026
- ld a, BANK(sBoxCount)
- call GetSRAMBank
- ld a, [sBoxCount]
- call CloseSRAM
- cp $14
- jp nc, .asm_17e0ea
- bit 0, b
- jp z, .asm_17e0ea
- push bc
- push hl
- callba LoadEnemyMon
- callba SentPkmnIntoBox
- callba SetBoxMonCaughtData
- pop hl
- pop bc
- ld a, BANK(sBoxMonNicknames)
- call GetSRAMBank
- bit 1, b
- jr z, .asm_17e067
- push bc
- ld bc, $b
- ld de, sBoxMonNicknames
- call CopyBytes
- pop bc
- jr .asm_17e06b
-
-.asm_17e067
- ld de, $6
- add hl, de
-
-.asm_17e06b
- bit 2, b
- jr z, .asm_17e08e
- push bc
- ld bc, $6
- ld de, sBoxMonOT
- call CopyBytes
- ld a, [hli]
- ld b, a
- push hl
- call CloseSRAM
- callba SetGiftBoxMonCaughtData
- ld a, $1
- call GetSRAMBank
- pop hl
- pop bc
- jr .asm_17e092
-
-.asm_17e08e
- ld de, $7
- add hl, de
-
-.asm_17e092
- bit 3, b
- jr z, .asm_17e0a2
- push bc
- ld de, sBoxMon1ID
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- pop bc
- jr .asm_17e0a4
-
-.asm_17e0a2
- inc hl
- inc hl
-
-.asm_17e0a4
- bit 4, b
- jr z, .asm_17e0b4
- push bc
- ld de, sBoxMon1DVs
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- pop bc
- jr .asm_17e0b6
-
-.asm_17e0b4
- inc hl
- inc hl
-
-.asm_17e0b6
- bit 5, b
- ld a, [hli]
- jr z, .asm_17e0be
- ld [sBoxMon1Item], a
-
-.asm_17e0be
- bit 6, b
- jr z, .asm_17e0e1
- push bc
- ld de, sBoxMon1Moves
- ld bc, $4
- call CopyBytes
- push hl
- ld hl, sBoxMon1Moves
- ld de, sBoxMon1PP
- predef FillPP
- call CloseSRAM
- pop hl
- pop bc
- inc hl
- inc hl
- jr asm_17e0ee
-
-.asm_17e0e1
- call CloseSRAM
- ld de, $6
- add hl, de
- jr asm_17e0ee
-
-.asm_17e0ea
- ld bc, $1a
- add hl, bc
-
-asm_17e0ee
- ld a, [hli]
- ld h, [hl]
- ld l, a
- pop af
- ld [rSVBK], a
- push hl
- call Function17e349
- pop hl
- call Function17e40f
- ret
-; 17e0fd
-
-Function17e0fd: ; 17e0fd
- call Function17e415
- ld de, $c708
- ld bc, $6
- call CopyBytes
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld hl, $c708
- ld a, [hli]
- ld [CurItem], a
- ld a, [hli]
- ld [wItemQuantityChangeBuffer], a
- push hl
- ld hl, NumItems
- call ReceiveItem
- pop hl
- jr c, .asm_17e127
- inc hl
- inc hl
-
-.asm_17e127
- ld a, [hli]
- ld b, a
- ld a, [hl]
- ld h, a
- ld l, b
- pop af
- ld [rSVBK], a
- call Function17e40f
- ret
-; 17e133
-
-Function17e133: ; 17e133
- call Function17e415
- ld de, $c708
- ld bc, $5
- call CopyBytes
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld hl, $c708
- ld a, [hli]
- ld [ScriptVar], a
- push hl
- callba MobileCheckOwnMonAnywhere
- pop hl
- jr c, .asm_17e159
- inc hl
- inc hl
-
-.asm_17e159
- ld a, [hli]
- ld b, a
- ld a, [hl]
- ld h, a
- ld l, b
- pop af
- ld [rSVBK], a
- call Function17e40f
- ret
-; 17e165
-
-Function17e165: ; 17e165
- call Function17e415
- ld de, $c708
- ld bc, $5
- call CopyBytes
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- ld hl, $c708
- ld a, [hli]
- ld [CurItem], a
- push hl
- ld hl, NumItems
- call CheckItem
- pop hl
- jr c, .asm_17e195
- push hl
- ld hl, PCItems
- call CheckItem
- pop hl
- jr c, .asm_17e195
- inc hl
- inc hl
-
-.asm_17e195
- ld a, [hli]
- ld b, a
- ld a, [hl]
- ld h, a
- ld l, b
- pop af
- ld [rSVBK], a
- call Function17e40f
- ret
-; 17e1a1
-
-Function17e1a1: ; 17e1a1
- call Function17e415
- ld de, $c708
- ld bc, $d
- call CopyBytes
- ld a, [$c70a]
- cp $c0
- jr c, .asm_17e1bb
- ld a, [$c708]
- ld [rSVBK], a
- jr .asm_17e1c1
-
-.asm_17e1bb
- ld a, [$c708]
- call GetSRAMBank
-
-.asm_17e1c1
- ld a, [$c709]
- ld l, a
- ld a, [$c70a]
- ld h, a
- ld de, $c608
- ld a, [$c70b]
- ld c, a
- ld b, $0
- call CopyBytes
- ld a, [$c70a]
- cp $c0
- jr c, .asm_17e1e2
- ld a, $4
- ld [rSVBK], a
- jr .asm_17e1e5
-
-.asm_17e1e2
- call CloseSRAM
-
-.asm_17e1e5
- ld a, [$c70e]
- cp $c0
- jr c, .asm_17e1f3
- ld a, [$c70c]
- ld [rSVBK], a
- jr .asm_17e1f9
-
-.asm_17e1f3
- ld a, [$c70c]
- call GetSRAMBank
-
-.asm_17e1f9
- ld a, [$c70d]
- ld l, a
- ld a, [$c70e]
- ld h, a
- ld de, $c688
- ld a, [$c70b]
- ld c, a
- ld b, $0
- call CopyBytes
- ld a, [$c70e]
- cp $c0
- jr c, .asm_17e21a
- ld a, $4
- ld [rSVBK], a
- jr .asm_17e21d
-
-.asm_17e21a
- call CloseSRAM
-
-.asm_17e21d
- ld a, [$c70b]
- ld c, a
- ld hl, $c688
- ld de, $c608
-.asm_17e227
- ld a, [de]
- inc de
- cp [hl]
- inc hl
- jr z, .asm_17e231
- jr c, .asm_17e23e
- jr .asm_17e248
-
-.asm_17e231
- dec c
- jr nz, .asm_17e227
- ld a, [$c711]
- ld l, a
- ld a, [$c712]
- ld h, a
- jr .asm_17e250
-
-.asm_17e23e
- ld a, [$c70f]
- ld l, a
- ld a, [$c710]
- ld h, a
- jr .asm_17e250
-
-.asm_17e248
- ld a, [$c712 + 1]
- ld l, a
- ld a, [$c712 + 2]
- ld h, a
-
-.asm_17e250
- call Function17e40f
- ret
-; 17e254
-
-Function17e254: ; 17e254
- call Function17e415
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld [de], a
- call Function17e41e
- ret
-; 17e261
-
-Function17e261: ; 17e261
- call Function17e415
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [de]
- add [hl]
- ld [de], a
- inc hl
- call Function17e41e
- ret
-; 17e270
-
-Function17e270: ; 17e270
- call Function17e415
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [de]
- sub [hl]
- ld [de], a
- inc hl
- call Function17e41e
- ret
-; 17e27f
-
-Function17e27f: ; 17e27f
- call Function17e415
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- call Function17e41e
- ld l, c
- ld h, b
- ld a, [de]
- add [hl]
- ld [de], a
- ret
-; 17e293
-
-Function17e293: ; 17e293
- call Function17e415
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hli]
- ld b, a
- call Function17e41e
- ld l, c
- ld h, b
- ld a, [de]
- sub [hl]
- ld [de], a
- ret
-; 17e2a7
-
-Function17e2a7: ; 17e2a7
- call Function17e415
- call Function17e41e
- call Function17e32b
- xor a
- ld [wcf66], a
- callba Function118233
- ld de, GFX_17eb7e
- ld hl, VTiles2 tile $60
- lb bc, BANK(GFX_17eb7e), 1
- call Get2bpp
- ld a, [wc300]
- and a
- jr z, .asm_17e2d8
- cp $a
- jr z, .asm_17e2f7
- cp $b
- jr z, .asm_17e300
- call Function17e309
- ret
-
-.asm_17e2d8
- call Function17d60b
- call Function17e349
- xor a
- ld [wcd7a], a
- ld a, $5
- call GetSRAMBank
- ld hl, $aa73
- ld de, $aa7f
- ld bc, $c
- call CopyBytes
- call CloseSRAM
- ret
-
-.asm_17e2f7
- call Function17e349
- ld a, $1
- ld [wcd7a], a
- ret
-
-.asm_17e300
- call Function17e349
- ld a, $2
- ld [wcd7a], a
- ret
-; 17e309
-
-Function17e309: ; 17e309
- ld a, $2
- ld [wc303], a
- call Function17dcaf
- call ClearScreen
- call Function17e349
- call Function17d5f6
- callba DisplayMobileError
- call Function17e349
- call Function17dcaf
- xor a
- ld [wcd77], a
- ret
-; 17e32b
-
-Function17e32b: ; 17e32b
- ld a, $5
- call GetSRAMBank
- ld hl, $c608
- ld de, $b0b1
- ld bc, $40
- call CopyBytes
- ld hl, BGMapBuffer
- ld bc, $5b
- call CopyBytes
- call CloseSRAM
- ret
-; 17e349
-
-Function17e349: ; 17e349
- ld a, $5
- call GetSRAMBank
- ld hl, $b0b1
- ld de, $c608
- ld bc, $40
- call CopyBytes
- ld de, BGMapBuffer
- ld bc, $5b
- call CopyBytes
- call CloseSRAM
- ret
-; 17e367
-
-Function17e367: ; 17e367
- call Function17e415
- call Function17e41e
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- callba SaveGameData_
- pop af
- ld [rSVBK], a
- ret
-; 17e37e
-
-Function17e37e: ; 17e37e
- call Function17e415
- call Function17e41e
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- callba SaveAfterLinkTrade
- pop af
- ld [rSVBK], a
- ret
-; 17e395
-
-Function17e395: ; 17e395
- call Function17e415
- call Function17e41e
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- callba SaveBox
- pop af
- ld [rSVBK], a
- ret
-; 17e3ac
-
-Function17e3ac: ; 17e3ac
- call Function17e415
- call Function17e41e
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- callba SaveChecksum
- pop af
- ld [rSVBK], a
- ret
-; 17e3c3
-
-Function17e3c3: ; 17e3c3
- call Function17e415
- call Function17e41e
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
- callba UpdateTrainerRankingsChecksum2
- callba BackupMobileEventIndex
- pop af
- ld [rSVBK], a
- ret
-; 17e3e0
-
-Function17e3e0: ; 17e3e0
- call Function17e415
- ld a, [hli]
- ld c, a
- call Function17e41e
- ld a, $1
- ld [hBGMapMode], a
- call DelayFrames
- ret
-; 17e3f0
-
-Function17e3f0: ; 17e3f0
- call Function17e415
- call Function17e41e
-.asm_17e3f6
- call JoyTextDelay
- ld hl, hJoyPressed
- ld a, [hl]
- and $1
- ret nz
- ld a, [hl]
- and $2
- ret nz
- call WaitBGMap
- jr .asm_17e3f6
-; 17e409
-
-Function17e409: ; 17e409
- ld hl, wcd77
- set 7, [hl]
- ret
-; 17e40f
-
-Function17e40f: ; 17e40f
- ld de, UnknBGPals
- add hl, de
- jr Function17e41e
-
-Function17e415:
- ld a, [wcd78]
- ld l, a
- ld a, [wcd79]
- ld h, a
- inc hl
-
-Function17e41e:
- ld a, l
- ld [wcd78], a
- ld a, h
- ld [wcd79], a
- ret
-; 17e427
-
-Function17e427: ; 17e427
- ld hl, hJoyPressed
- ld a, [hl]
- and $1
- jr nz, .asm_17e432
- and $2
- ret z
-
-.asm_17e432
- ld a, $3
- ld [wcd77], a
- ret
-; 17e438
-
-Function17e438: ; 17e438
- ld hl, wcd77
- inc [hl]
- ret
-; 17e43d
-
-Function17e43d: ; 17e43d
- ld a, [BGMapBuffer]
- ld l, a
- ld a, [wcd21]
- ld h, a
- add hl, bc
- ret
-; 17e447
-
-Function17e447: ; 17e447
- ld a, [BGMapBuffer]
- ld l, a
- ld a, [wcd21]
- ld h, a
- add hl, de
- ret
-; 17e451
-
-Function17e451: ; 17e451
- ld a, [wcd42]
- and a
- ret z
- call Function17e51b
- call Function17e4dd
- ld a, [wcd2e]
- push af
- ld a, [wcd49]
- ld l, a
- ld a, [wcd4a]
- ld h, a
- ld a, [wcd2f]
- ld [wcd2e], a
- ld c, a
- ld b, $0
- add hl, bc
- add hl, bc
- push hl
- hlcoord 0, 0
- ld bc, $14
- ld a, [wcd23]
- call AddNTimes
- ld a, [CreditsTimer]
- ld c, a
- ld b, $0
- add hl, bc
- pop bc
- ld a, [wMobileCommsJumptableIndex]
-.asm_17e48b
- push af
- push hl
- ld a, [wcd24]
-.asm_17e490
- push af
- push hl
- ld a, [bc]
- inc bc
- ld e, a
- ld a, [bc]
- inc bc
- ld d, a
- push bc
- push hl
- ld a, [BGMapBuffer]
- ld l, a
- ld a, [wcd21]
- ld h, a
- add hl, de
- push hl
- pop de
- pop hl
- call PlaceString
- pop bc
- pop hl
- ld a, [wcd26]
- ld e, a
- ld d, $0
- add hl, de
- ld a, [wcd2e]
- inc a
- ld [wcd2e], a
- ld e, a
- ld a, [wcd42]
- cp e
- jr z, .asm_17e4d5
- pop af
- dec a
- jr nz, .asm_17e490
- pop hl
- ld a, [wcd27]
- ld de, $14
-.asm_17e4cb
- add hl, de
- dec a
- jr nz, .asm_17e4cb
- pop af
- dec a
- jr nz, .asm_17e48b
- jr .asm_17e4d8
-
-.asm_17e4d5
- pop af
- pop hl
- pop af
-
-.asm_17e4d8
- pop af
- ld [wcd2e], a
- ret
-; 17e4dd
-
-Function17e4dd: ; 17e4dd
- ld a, [wcd2c]
- and $1
- ret z
- ld a, [wcd29]
- hlcoord 0, 0
- ld bc, $14
- call AddNTimes
- ld a, [wcd28]
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [wcd2f]
- and a
- jr z, .asm_17e4ff
- ld a, $61
- ld [hl], a
-
-.asm_17e4ff
- ld a, [wcd2a]
- ld bc, $14
- call AddNTimes
- ld a, [wcd42]
- ld c, a
- ld a, [wcd2e]
- ld b, a
- ld a, [wcd24]
- add b
- cp c
- ret z
- ret nc
- ld a, $ee
- ld [hl], a
- ret
-; 17e51b
-
-Function17e51b: ; 17e51b
- ld a, [wcd28]
- ld hl, CreditsTimer
- sub [hl]
- inc a
- ld [wcd4f], a
- hlcoord 0, 0
- ld bc, $14
- ld a, [wcd23]
- dec a
- call AddNTimes
- ld a, [CreditsTimer]
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [wMobileCommsJumptableIndex]
- ld c, a
- ld a, [wcd27]
- call SimpleMultiply
-.asm_17e544
- push af
- push hl
- ld a, [wcd4f]
- ld c, a
- ld b, $0
- ld a, $7f
- call ByteFill
- pop hl
- ld bc, $14
- add hl, bc
- pop af
- dec a
- jr nz, .asm_17e544
- ret
-; 17e55b
-
-Function17e55b: ; 17e55b
- ld a, [wcd42]
- and a
- ret z
- ld a, $ed
- call Function17e571
- ret
-; 17e566
-
-Function17e566: ; 17e566
- ld a, [wcd42]
- and a
- ret z
- ld a, $7f
- call Function17e571
- ret
-; 17e571
-
-Function17e571: ; 17e571
- push af
- hlcoord 0, 0
- ld bc, $14
- ld a, [wcd23]
- call AddNTimes
- ld a, [CreditsTimer]
- ld c, a
- ld b, $0
- add hl, bc
- dec hl
- push hl
- ld a, [wcd31]
- dec a
- ld c, a
- ld a, [wcd27]
- call SimpleMultiply
- ld l, $0
- ld h, l
- ld bc, $14
- call AddNTimes
- ld a, [wcd30]
- dec a
- ld c, a
- ld a, [wcd26]
- call SimpleMultiply
- ld c, a
- ld b, $0
- add hl, bc
- pop bc
- add hl, bc
- pop af
- ld [hl], a
- ret
-; 17e5af
-
-Function17e5af: ; 17e5af
- ld a, [wcd2c]
- and $2
- ret z
- ld a, [wcd43]
- ld l, a
- ld a, [wMobileInactivityTimerMinutes]
- ld h, a
- bccoord 0, 0
- add hl, bc
- ld bc, $ffec
- add hl, bc
- ld a, [wMobileInactivityTimerSeconds]
- ld c, a
- ld b, $0
- ld a, [wMobileInactivityTimerFrames]
- call Function17e600
- ld a, [wcd2e]
- ld c, a
- ld b, $0
- ld a, [wcd4d]
- ld l, a
- ld a, [wcd4e]
- ld h, a
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [BGMapBuffer]
- ld l, a
- ld a, [wcd21]
- ld h, a
- add hl, de
- push hl
- pop de
- ld a, [wcd43]
- ld l, a
- ld a, [wMobileInactivityTimerMinutes]
- ld h, a
- bccoord 0, 0
- add hl, bc
- call PlaceString
- ret
-; 17e600
-
-Function17e600: ; 17e600
-.asm_17e600
- push af
- push hl
- push bc
- ld a, $7f
- call ByteFill
- pop bc
- pop hl
- ld de, $14
- add hl, de
- pop af
- dec a
- jr nz, .asm_17e600
- ret
-; 17e613
-
-Function17e613: ; 17e613
- push hl
- hlcoord 0, 0
- ld bc, $14
- ld a, [de]
- inc de
- push af
- ld a, [de]
- inc de
- and a
-.asm_17e620
- jr z, .asm_17e626
- add hl, bc
- dec a
- jr .asm_17e620
-
-.asm_17e626
- pop af
- ld c, a
- ld b, $0
- add hl, bc
- push hl
- ld a, [wcd53]
- ld [hli], a
- ld a, [de]
- inc de
- dec a
- dec a
- jr z, .asm_17e63f
- ld c, a
- ld a, [wcd53]
- inc a
-.asm_17e63b
- ld [hli], a
- dec c
- jr nz, .asm_17e63b
-
-.asm_17e63f
- ld a, [wcd53]
- add $2
- ld [hl], a
- pop hl
- ld bc, $14
- add hl, bc
- ld a, [de]
- dec de
- dec a
- dec a
- jr z, .asm_17e674
- ld b, a
-.asm_17e651
- push hl
- ld a, [wcd53]
- add $3
- ld [hli], a
- ld a, [de]
- dec a
- dec a
- jr z, .asm_17e664
- ld c, a
- ld a, $7f
-.asm_17e660
- ld [hli], a
- dec c
- jr nz, .asm_17e660
-
-.asm_17e664
- ld a, [wcd53]
- add $4
- ld [hl], a
- pop hl
- push bc
- ld bc, $14
- add hl, bc
- pop bc
- dec b
- jr nz, .asm_17e651
-
-.asm_17e674
- ld a, [wcd53]
- add $5
- ld [hli], a
- ld a, [de]
- dec a
- dec a
- jr z, .asm_17e689
- ld c, a
- ld a, [wcd53]
- add $6
-.asm_17e685
- ld [hli], a
- dec c
- jr nz, .asm_17e685
-
-.asm_17e689
- ld a, [wcd53]
- add $7
- ld [hl], a
- pop hl
- ret
-; 17e691
-
-Function17e691: ; 17e691
- push hl
- ld hl, NULL
- ld bc, $14
- ld a, [de]
- inc de
- push af
- ld a, [de]
- inc de
- inc de
- and a
-.asm_17e69f
- jr z, .asm_17e6a5
- add hl, bc
- dec a
- jr .asm_17e69f
-
-.asm_17e6a5
- pop af
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [de]
- dec de
-.asm_17e6ac
- push af
- push hl
- ld a, [de]
-.asm_17e6af
- push af
- push hl
- push hl
- bccoord 0, 0
- add hl, bc
- ld a, [hl]
- cp $7f
- jr z, .asm_17e6c2
- ld a, [wcd53]
- add $8
- jr .asm_17e6c7
-
-.asm_17e6c2
- ld a, [wcd53]
- jr .asm_17e6c7
-
-.asm_17e6c7
- pop hl
- bccoord 0, 0, AttrMap
- add hl, bc
- ld [hl], a
- pop hl
- inc hl
- pop af
- dec a
- jr nz, .asm_17e6af
- pop hl
- ld bc, $14
- add hl, bc
- pop af
- dec a
- jr nz, .asm_17e6ac
- pop hl
- ret
-; 17e6de
-
-Function17e6de: ; 17e6de
- push af
- ld a, [$c708]
- ld l, a
- ld a, [$c709]
- ld h, a
- decoord 0, 0, AttrMap
- add hl, de
- pop af
- ld b, $7
-.asm_17e6ee
- push hl
- ld c, $7
-.asm_17e6f1
- ld [hli], a
- dec c
- jr nz, .asm_17e6f1
- pop hl
- ld de, $14
- add hl, de
- dec b
- jr nz, .asm_17e6ee
- ret
-; 17e6fe
-
-
-PokemonNewsGFX: ; 17e6fe
-INCBIN "gfx/mobile/pokemon_news.2bpp"
-
-GFX_17eb7e:
-INCBIN "gfx/unknown/17eb7e.2bpp"
-
-TileAttrmap_17eb8e:
-INCBIN "gfx/unknown/17eb8e.attrmap"
-
-Palette_17eff6:
- RGB 24, 9, 8
- RGB 4, 9, 18
- RGB 18, 18, 12
- RGB 0, 0, 0
- RGB 24, 24, 18
- RGB 18, 18, 12
- RGB 4, 9, 18
- RGB 0, 0, 0
- RGB 31, 31, 31
- RGB 23, 11, 10
- RGB 13, 6, 5
- RGB 0, 0, 0
- RGB 31, 31, 31
- RGB 15, 25, 5
- RGB 10, 20, 0
- RGB 0, 0, 0
- RGB 31, 31, 31
- RGB 20, 28, 20
- RGB 10, 18, 15
- RGB 0, 0, 0
- RGB 31, 31, 31
- RGB 22, 22, 12
- RGB 17, 12, 5
- RGB 0, 0, 0
- RGB 5, 5, 16
- RGB 8, 19, 28
- RGB 0, 0, 0
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 27, 24, 0
- RGB 24, 16, 3
- RGB 0, 0, 0
-
-
-Function17f036:: ; 17f036
- ld a, $6
- call GetSRAMBank
- inc de
-.asm_17f03c
- call Function17f047
- jr c, .asm_17f043
- jr .asm_17f03c
-
-.asm_17f043
- call CloseSRAM
- ret
-; 17f047
-
-Function17f047: ; 17f047
- ld a, [de]
- inc de
- cp $50
- jr z, .finished
- cp $10
- jr nc, .finished
- dec a
- push de
- ld e, a
- ld d, 0
- ld hl, .Jumptable
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-
-.finished
- scf
- ret
-; 17f061
-
-.Jumptable: ; 17f061
- dw Function17f081 ; 0
- dw Function17f0f8 ; 1
- dw Function17f154 ; 2
- dw Function17f181 ; 3
- dw Function17f1d0 ; 4
- dw Function17f220 ; 5
- dw Function17f27b ; 6
- dw Function17f2cb ; 7
- dw Function17f2ff ; 8
- dw Function17f334 ; 9
- dw Function17f382 ; a
- dw Function17f3c9 ; b
- dw Function17f3f0 ; c
- dw Function17f41d ; d
- dw Function17f44f ; e
- dw Function17f44f ; f
-; 17f081
-
-Function17f081: ; 17f081
- pop hl
- call Function17f524
- jr c, .asm_17f09f
- ld de, 4
- add hl, de
- ld a, [hli]
- inc hl
- inc hl
- ld e, l
- ld d, h
- ld l, c
- ld h, b
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [de]
- cp $50
- jr z, .asm_17f09d
- and a
- ret
-
-.asm_17f09d
- scf
- ret
-
-.asm_17f09f
- push bc
- ld de, wcd54
- ld bc, 7
- call CopyBytes
- pop bc
- push hl
- push bc
- call Function17f4f6
- pop bc
- ld a, [wcd54]
- ld e, a
- ld a, [wcd55]
- ld d, a
- add hl, de
- ld e, l
- ld d, h
- ld l, c
- ld h, b
- push hl
- ld a, [wcd56]
- ld b, a
- ld a, [wcd57]
- ld c, a
- call MobilePrintNum
- ld a, l
- ld [wcd52], a
- ld a, h
- ld [wcd53], a
- ld a, [wcd59]
- and a
- jr z, .asm_17f0ee
- ld c, a
- ld a, [wcd57]
- inc a
- ld b, a
- ld e, l
- ld d, h
- dec de
-.asm_17f0e0
- ld a, c
- cp b
- jr z, .asm_17f0ea
- ld a, [de]
- dec de
- ld [hld], a
- dec b
- jr .asm_17f0e0
-
-.asm_17f0ea
- ld a, [wcd5a]
- ld [hl], a
-
-.asm_17f0ee
- pop hl
- ld a, [wcd58]
- call Function17f50f
- pop de
- and a
- ret
-; 17f0f8
-
-Function17f0f8: ; 17f0f8
- pop hl
- call Function17f524
- jr c, .asm_17f114
- ld de, $3
- add hl, de
- ld a, [hli]
- ld e, l
- ld d, h
- ld l, c
- ld h, b
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [de]
- cp $50
- jr z, .asm_17f112
- and a
- ret
-
-.asm_17f112
- scf
- ret
-
-.asm_17f114
- push bc
- ld de, wcd54
- ld bc, $4
- call CopyBytes
- pop bc
- push hl
- push bc
- call Function17f4f6
- ld a, [wcd54]
- ld e, a
- ld a, [wcd55]
- ld d, a
- add hl, de
- ld de, $c608
- ld a, [wcd56]
- ld c, a
- ld b, $0
- call CopyBytes
- ld a, $50
- ld [de], a
- pop hl
- ld de, $c608
- call PlaceString
- ld a, c
- ld [wcd52], a
- ld a, b
- ld [wcd53], a
- ld a, [wcd57]
- call Function17f50f
- pop de
- and a
- ret
-; 17f154
-
-Function17f154: ; 17f154
- pop hl
- call Function17f524
- jr c, .asm_17f167
- inc hl
- inc hl
- ld e, l
- ld d, h
- ld a, [de]
- cp $50
- jr z, .asm_17f165
- and a
- ret
-
-.asm_17f165
- scf
- ret
-
-.asm_17f167
- push bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- pop bc
- push hl
- push bc
- call Function17f4f6
- add hl, de
- ld c, l
- ld b, h
- pop de
- callba Function11c08f
- ld c, l
- ld b, h
- pop de
- and a
- ret
-; 17f181
-
-Function17f181: ; 17f181
- pop hl
- call Function17f524
- jr c, .asm_17f19d
- ld de, $2
- add hl, de
- ld a, [hli]
- ld e, l
- ld d, h
- ld l, c
- ld h, b
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [de]
- cp $50
- jr z, .asm_17f19b
- and a
- ret
-
-.asm_17f19b
- scf
- ret
-
-.asm_17f19d
- push bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld [wcd54], a
- pop bc
- push hl
- push bc
- call Function17f4f6
- add hl, de
- ld a, [hl]
- ld c, a
- ld de, $c608
- callba Function48c63
- pop hl
- ld de, $c608
- call PlaceString
- ld a, c
- ld [wcd52], a
- ld a, b
- ld [wcd53], a
- ld a, [wcd54]
- call Function17f50f
- pop de
- and a
- ret
-; 17f1d0
-
-Function17f1d0: ; 17f1d0
- pop hl
- call Function17f524
- jr c, .asm_17f1ec
- ld de, $2
- add hl, de
- ld a, [hli]
- ld e, l
- ld d, h
- ld l, c
- ld h, b
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [de]
- cp $50
- jr z, .asm_17f1ea
- and a
- ret
-
-.asm_17f1ea
- scf
- ret
-
-.asm_17f1ec
- push bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld [wcd54], a
- pop bc
- push hl
- push bc
- call Function17f4f6
- add hl, de
- ld a, [hl]
- ld a, $1
- ld [rSVBK], a
- ld [wd265], a
- call GetPokemonName
- pop hl
- call PlaceString
- ld a, c
- ld [wcd52], a
- ld a, b
- ld [wcd53], a
- ld a, $4
- ld [rSVBK], a
- ld a, [wcd54]
- call Function17f50f
- pop de
- and a
- ret
-; 17f220
-
-Function17f220: ; 17f220
- pop hl
- call Function17f524
- jr c, .asm_17f23c
- ld de, $2
- add hl, de
- ld a, [hli]
- ld e, l
- ld d, h
- ld l, c
- ld h, b
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [de]
- cp $50
- jr z, .asm_17f23a
- and a
- ret
-
-.asm_17f23a
- scf
- ret
-
-.asm_17f23c
- push bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld [wcd54], a
- pop bc
- push hl
- push bc
- call Function17f4f6
- add hl, de
- ld a, [hl]
- ld e, a
- ld d, 0
- ld hl, .Genders
- add hl, de
- add hl, de
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- pop hl
- call PlaceString
- ld a, c
- ld [wcd52], a
- ld a, b
- ld [wcd53], a
- ld a, [wcd54]
- call Function17f50f
- pop de
- and a
- ret
-; 17f26e
-
-.Genders: dw .Boy, .Girl
-.Boy: db "Boy@"
-.Girl: db "Girl@"
-
-Function17f27b: ; 17f27b
- pop hl
- call Function17f524
- jr c, .asm_17f297
- ld de, $2
- add hl, de
- ld a, [hli]
- ld e, l
- ld d, h
- ld l, c
- ld h, b
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [de]
- cp $50
- jr z, .asm_17f295
- and a
- ret
-
-.asm_17f295
- scf
- ret
-
-.asm_17f297
- push bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [hli]
- ld [wcd54], a
- pop bc
- push hl
- push bc
- call Function17f4f6
- add hl, de
- ld a, [hl]
- ld a, $1
- ld [rSVBK], a
- ld [wd265], a
- call GetItemName
- pop hl
- call PlaceString
- ld a, c
- ld [wcd52], a
- ld a, b
- ld [wcd53], a
- ld a, $4
- ld [rSVBK], a
- ld a, [wcd54]
- call Function17f50f
- pop de
- and a
- ret
-; 17f2cb
-
-Function17f2cb: ; 17f2cb
- pop hl
- push bc
- ld a, [hli]
- ld [wcd54], a
- ld a, [hli]
- ld [wcd55], a
- ld a, [wcd2e]
- inc a
- ld [wcd56], a
- pop bc
- push hl
- ld l, c
- ld h, b
- push hl
- ld de, wcd56
- ld b, $1
- ld a, [wcd54]
- ld c, a
- call MobilePrintNum
- ld a, l
- ld [wcd52], a
- ld a, h
- ld [wcd53], a
- pop hl
- ld a, [wcd55]
- call Function17f50f
- pop de
- and a
- ret
-; 17f2ff
-
-Function17f2ff: ; 17f2ff
- pop hl
- push bc
- ld a, [hli]
- ld [wcd54], a
- pop bc
- push hl
- push bc
- ld a, $1
- ld [rSVBK], a
- ld hl, PlayerName
- ld de, $c608
- ld bc, $6
- call CopyBytes
- ld a, $4
- ld [rSVBK], a
- pop hl
- ld de, $c608
- call PlaceString
- ld a, c
- ld [wcd52], a
- ld a, b
- ld [wcd53], a
- ld a, [wcd54]
- call Function17f50f
- pop de
- and a
- ret
-; 17f334
-
-Function17f334: ; 17f334
- pop hl
- push bc
- ld a, [hli]
- ld [wcd55], a
- and $f
- ld [wcd54], a
- pop bc
- push hl
- ld l, c
- ld h, b
- push hl
- ld a, [wcd55]
- bit 7, a
- jr nz, .asm_17f355
- ld a, BANK(sCrystalData)
- call GetSRAMBank
- ld a, [sCrystalData + 2]
- jr .asm_17f35d
-
-.asm_17f355
- ld a, $5
- call GetSRAMBank
- ld a, [$b2f3]
-
-.asm_17f35d
- ld c, a
- call CloseSRAM
- ld de, $c608
- callba Function48c63
- pop hl
- ld de, $c608
- call PlaceString
- ld a, c
- ld [wcd52], a
- ld a, b
- ld [wcd53], a
- ld a, [wcd54]
- call Function17f50f
- pop de
- and a
- ret
-; 17f382
-
-Function17f382: ; 17f382
- pop hl
- push bc
- ld a, [hli]
- ld [wcd55], a
- and $f
- ld [wcd54], a
- pop bc
- push hl
- push bc
- ld l, c
- ld h, b
- ld a, [wcd55]
- bit 7, a
- jr nz, .asm_17f3a3
- ld a, BANK(sCrystalData)
- call GetSRAMBank
- ld de, sCrystalData + 3
- jr .asm_17f3ab
-
-.asm_17f3a3
- ld a, $5
- call GetSRAMBank
- ld de, $b2f4
-
-.asm_17f3ab
- ld a, PRINTNUM_LEADINGZEROS | 2
- ld b, a
- ld a, 3
- ld c, a
- call PrintNum
- call CloseSRAM
- ld a, l
- ld [wcd52], a
- ld a, h
- ld [wcd53], a
- pop hl
- ld a, [wcd54]
- call Function17f50f
- pop de
- and a
- ret
-; 17f3c9
-
-Function17f3c9: ; 17f3c9
- push bc
- ld hl, wcd36
- ld de, $c708
- ld bc, 12
- call CopyBytes
- pop de
- ld c, $0
- callba Function11c075
- push hl
- ld hl, $c708
- ld de, wcd36
- ld bc, $c
- call CopyBytes
- pop bc
- pop de
- and a
- ret
-; 17f3f0
-
-Function17f3f0: ; 17f3f0
- pop hl
- push hl
- ld a, [hli]
- push af
- push bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld a, [de]
- ld c, a
- ld b, $0
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld e, a
- ld a, [hli]
- ld d, a
- ld hl, UnknBGPals
- add hl, de
- ld e, l
- ld d, h
- pop hl
- call PlaceString
- pop af
- ld e, a
- ld d, $0
- pop hl
- add hl, de
- add hl, de
- inc hl
- inc hl
- inc hl
- ld e, l
- ld d, h
- ld l, c
- ld h, b
- scf
- ret
-; 17f41d
-
-Function17f41d: ; 17f41d
- pop hl
- ld a, [hli]
- push hl
- push af
- ld l, c
- ld h, b
- ld bc, -TileMap + $10000
- add hl, bc
- ld de, -SCREEN_WIDTH
- ld c, $1
-.asm_17f42c
- ld a, h
- and a
- jr nz, .asm_17f435
- ld a, l
- cp SCREEN_WIDTH
- jr c, .asm_17f439
-
-.asm_17f435
- add hl, de
- inc c
- jr .asm_17f42c
-
-.asm_17f439
- hlcoord 0, 0
- ld de, SCREEN_WIDTH
- ld a, c
-.asm_17f440
- and a
- jr z, .asm_17f447
- add hl, de
- dec a
- jr .asm_17f440
-
-.asm_17f447
- pop af
- ld e, a
- ld d, 0
- add hl, de
- pop de
- and a
- ret
-; 17f44f
-
-Function17f44f: ; 17f44f
- pop hl
- call Function17f524
- jr c, .asm_17f46d
- ld de, $5
- add hl, de
- ld a, [hli]
- inc hl
- inc hl
- ld e, l
- ld d, h
- ld l, c
- ld h, b
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [de]
- cp $50
- jr z, .asm_17f46b
- and a
- ret
-
-.asm_17f46b
- scf
- ret
-
-.asm_17f46d
- push bc
- ld de, wcd54
- ld bc, $8
- call CopyBytes
- pop bc
- push hl
- push bc
- ld a, [wcd56]
- cp $c0
- jr c, .asm_17f488
- ld a, [wcd54]
- ld [rSVBK], a
- jr .asm_17f48e
-
-.asm_17f488
- ld a, [wcd54]
- call GetSRAMBank
-
-.asm_17f48e
- ld a, [wcd55]
- ld l, a
- ld a, [wcd56]
- ld h, a
- ld de, $c608
- ld a, [wcd57]
- ld c, a
- ld b, $0
- call CopyBytes
- ld a, [wcd56]
- cp $c0
- jr c, .asm_17f4af
- ld a, $4
- ld [rSVBK], a
- jr .asm_17f4b7
-
-.asm_17f4af
- call CloseSRAM
- ld a, $6
- call GetSRAMBank
-
-.asm_17f4b7
- ld de, $c608
- pop hl
- push hl
- ld a, [wcd57]
- ld b, a
- ld a, [wcd58]
- ld c, a
- call MobilePrintNum
- ld a, l
- ld [wcd52], a
- ld a, h
- ld [wcd53], a
- ld a, [wcd5a]
- and a
- jr z, .asm_17f4ec
- ld c, a
- ld a, [wcd58]
- inc a
- ld b, a
- ld e, l
- ld d, h
- dec de
-.asm_17f4de
- ld a, c
- cp b
- jr z, .asm_17f4e8
- ld a, [de]
- dec de
- ld [hld], a
- dec b
- jr .asm_17f4de
-
-.asm_17f4e8
- ld a, [wcd5b]
- ld [hl], a
-
-.asm_17f4ec
- pop hl
- ld a, [wcd59]
- call Function17f50f
- pop de
- and a
- ret
-; 17f4f6
-
-Function17f4f6: ; 17f4f6
- ld a, [wcd6a]
- ld l, a
- ld a, [wcd6b]
- ld h, a
- ld a, [wcd47]
- ld c, a
- ld a, [BGMapPalBuffer]
- ld b, a
- ld a, [wcd2e]
-.asm_17f509
- and a
- ret z
- dec a
- add hl, bc
- jr .asm_17f509
-; 17f50f
-
-Function17f50f: ; 17f50f
- and a
- jr z, .asm_17f519
- ld c, a
- ld b, $0
- add hl, bc
- ld c, l
- ld b, h
- ret
-
-.asm_17f519
- ld a, [wcd52]
- ld c, a
- ld l, a
- ld a, [wcd53]
- ld b, a
- ld h, a
- ret
-; 17f524
-
-Function17f524: ; 17f524
- push hl
- push bc
- push de
- ld a, [wcd42]
- dec a
- ld b, a
- ld a, [wcd2e]
- cp b
- jr z, .asm_17f53a
- ld hl, wcd68
- cp [hl]
-.asm_17f536
- pop de
- pop bc
- pop hl
- ret
-
-.asm_17f53a
- scf
- jr .asm_17f536
-; 17f53d
-
-BattleTowerMobileError: ; 17f53d
- call FadeToMenu
- xor a
- ld [wc303], a
- ld a, [rSVBK]
- push af
- ld a, $1
- ld [rSVBK], a
-
- call DisplayMobileError
-
- pop af
- ld [rSVBK], a
- call ExitAllMenus
- ret
-; 17f555
-
-DisplayMobileError: ; 17f555
-.loop
- call JoyTextDelay
- call .RunJumptable
- ld a, [wc303]
- bit 7, a
- jr nz, .quit
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
- jr .loop
-
-.quit
- call .deinit
- ret
-
-.deinit
- ld a, [wc300]
- cp $22
- jr z, .asm_17f597
- cp $31
- jr z, .asm_17f58a
- cp $33
- ret nz
- ld a, [wc301]
- cp $1
- ret nz
- ld a, [wc302]
- cp $2
- ret nz
- jr .asm_17f5a1
-
-.asm_17f58a
- ld a, [wc301]
- cp $3
- ret nz
- ld a, [wc302]
- and a
- ret nz
- jr .asm_17f5a1
-
-.asm_17f597
- ld a, [wc301]
- and a
- ret nz
- ld a, [wc302]
- and a
- ret nz
-
-.asm_17f5a1
- ld a, BANK(sMobileLoginPassword)
- call GetSRAMBank
- xor a
- ld [sMobileLoginPassword], a
- call CloseSRAM
- ret
-; 17f5ae
-
-.RunJumptable: ; 17f5ae
- jumptable .Jumptable, wc303
-; 17f5bd
-
-.Jumptable: ; 17f5bd
- dw Function17f5c3
- dw Function17ff23
- dw Function17f5d2
-; 17f5c3
-
-Function17f5c3: ; 17f5c3
- call Function17f5e4
- callba FinishExitMenu
- ld a, $1
- ld [wc303], a
- ret
-; 17f5d2
-
-Function17f5d2: ; 17f5d2
- call Function17f5e4
- callba HDMATransferAttrMapAndTileMapToWRAMBank3
- call SetPalettes
- ld a, $1
- ld [wc303], a
- ret
-; 17f5e4
-
-Function17f5e4: ; 17f5e4
- ld a, $8
- ld [MusicFade], a
- ld de, MUSIC_NONE
- ld a, e
- ld [MusicFadeIDLo], a
- ld a, d
- ld [MusicFadeIDHi], a
- ld a, " "
- hlcoord 0, 0
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- call ByteFill
- ld a, $6
- hlcoord 0, 0, AttrMap
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- call ByteFill
- hlcoord 2, 1
- ld b, $1
- ld c, $e
- call Function3eea
- hlcoord 1, 4
- ld b, $c
- ld c, $10
- call Function3eea
- hlcoord 3, 2
- ld de, String_17f6dc
- call PlaceString
- call Function17ff3c
- jr nc, .asm_17f632
- hlcoord 11, 2
- call Function17f6b7
-
-.asm_17f632
- ld a, [wc300]
- cp $d0
- jr nc, .asm_17f684
- cp $10
- jr c, .asm_17f679
- sub $10
- cp $24
- jr nc, .asm_17f679
- ld e, a
- ld d, $0
- ld hl, Table_17f706
- add hl, de
- add hl, de
- ld a, [wc301]
- ld e, a
- ld a, [wc302]
- ld d, a
- ld a, [hli]
- ld c, a
- ld a, [hl]
- ld h, a
- ld l, c
- ld a, [hli]
- and a
- jr z, .asm_17f679
- ld c, a
-.asm_17f65d
- ld a, [hli]
- ld b, a
- ld a, [hli]
- cp $ff
- jr nz, .asm_17f667
- cp b
- jr z, .asm_17f66e
-
-.asm_17f667
- xor d
- jr nz, .asm_17f674
- ld a, b
- xor e
- jr nz, .asm_17f674
-
-.asm_17f66e
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- jr .asm_17f67d
-
-.asm_17f674
- inc hl
- inc hl
- dec c
- jr nz, .asm_17f65d
-
-.asm_17f679
- ld a, $d9
- jr .asm_17f684
-
-.asm_17f67d
- hlcoord 2, 6
- call PlaceString
- ret
-
-.asm_17f684
- sub $d0
- ld e, a
- ld d, 0
- ld hl, Table_17f699
- add hl, de
- add hl, de
- ld a, [hli]
- ld e, a
- ld a, [hl]
- ld d, a
- hlcoord 2, 6
- call PlaceString
- ret
-; 17f699
-
-Table_17f699: ; 17f699
- dw String_17fedf
- dw String_17fdd9
- dw String_17fdd9
- dw String_17fe03
- dw String_17fd84
- dw String_17fe63
- dw String_17fdb2
- dw String_17fe4b
- dw String_17fe03
- dw String_17fe03
- dw String_17fe03
-; 17f6af
-
-Palette_17f6af: ; 17f6af
- RGB 5, 5, 16
- RGB 8, 19, 28
- RGB 0, 0, 0
- RGB 31, 31, 31
-; 17f6b7
-
-Function17f6b7: ; 17f6b7
- ld a, [wc300]
- call .bcd_two_digits
- inc hl
- ld a, [wc302]
- and $f
- call .bcd_digit
- ld a, [wc301]
- call .bcd_two_digits
- ret
-; 17f6cd
-
-.bcd_two_digits ; 17f6cd
- ld c, a
- and $f0
- swap a
- call .bcd_digit
- ld a, c
- and $f
-
-.bcd_digit ; 17f6d8
- add "0"
- ld [hli], a
- ret
-; 17f6dc
-
-String_17f6dc: ; 17f6dc
- db "つうしんエラー ー@"
-; 17f6e8
-
-String_17f6e8: ; 17f6e8
- db "みていぎ", $25, "エラーです"
- next "プログラム", $1f
- next "かくにん してください"
- db "@"
-; 17f706
-
-Table_17f706:
- dw Unknown_17f74e
- dw Unknown_17f753
- dw Unknown_17f758
- dw Unknown_17f75d
- dw Unknown_17f762
- dw Unknown_17f767
- dw Unknown_17f778
- dw Unknown_17f77d
- dw Unknown_17f782
- dw Unknown_17f782
- dw Unknown_17f782
- dw Unknown_17f782
- dw Unknown_17f782
- dw Unknown_17f782
- dw Unknown_17f782
- dw Unknown_17f782
- dw Unknown_17f782
- dw Unknown_17f787
- dw Unknown_17f78c
- dw Unknown_17f791
- dw Unknown_17f796
- dw Unknown_17f79b
- dw Unknown_17f7a0
- dw Unknown_17f7a5
- dw Unknown_17f7a5
- dw Unknown_17f7a5
- dw Unknown_17f7a5
- dw Unknown_17f7a5
- dw Unknown_17f7a5
- dw Unknown_17f7a5
- dw Unknown_17f7a5
- dw Unknown_17f7a5
- dw Unknown_17f7a5
- dw Unknown_17f7ea
- dw Unknown_17f7ff
- dw Unknown_17f844
-
-Unknown_17f74e: db 1
- dbbw $0, $0, String_17f891
-
-Unknown_17f753: db 1
- dbbw $0, $0, String_17f8d1
-
-Unknown_17f758: db 1
- dbbw $0, $0, String_17f913
-
-Unknown_17f75d: db 1
- dbbw $0, $0, String_17f8d1
-
-Unknown_17f762: db 1
- dbbw $0, $0, String_17fa71
-
-Unknown_17f767: db 4
- dbbw $0, $0, String_17f946
- dbbw $1, $0, String_17f946
- dbbw $2, $0, String_17f946
- dbbw $3, $0, String_17f946
-
-Unknown_17f778: db 1
- dbbw $0, $0, String_17f98e
-
-Unknown_17f77d: db 1
- dbbw $0, $0, String_17f98e
-
-Unknown_17f782: db 1
- dbbw $0, $0, String_17f98e
-
-Unknown_17f787: db 1
- dbbw $0, $0, String_17f98e
-
-Unknown_17f78c: db 1
- dbbw $0, $0, String_17f9d0
-
-Unknown_17f791: db 1
- dbbw $0, $0, String_17fa14
-
-Unknown_17f796: db 1
- dbbw $0, $0, String_17fcbf
-
-Unknown_17f79b: db 1
- dbbw $0, $0, String_17fa71
-
-Unknown_17f7a0: db 1
- dbbw $0, $0, String_17fbfe
-
-Unknown_17f7a5: db 17
- dbbw $0, $0, String_17f98e
- dbbw $21, $2, String_17fcbf
- dbbw $21, $4, String_17fcbf
- dbbw $50, $4, String_17faf9
- dbbw $51, $4, String_17fcbf
- dbbw $52, $4, String_17fcbf
- dbbw $0, $5, String_17f98e
- dbbw $1, $5, String_17f98e
- dbbw $2, $5, String_17f98e
- dbbw $3, $5, String_17f98e
- dbbw $4, $5, String_17f98e
- dbbw $50, $5, String_17faf9
- dbbw $51, $5, String_17faf9
- dbbw $52, $5, String_17fcbf
- dbbw $53, $5, String_17faf9
- dbbw $54, $5, String_17fcbf
- dbbw $ff, $ff, String_17fcbf
-
-Unknown_17f7ea: db 5
- dbbw $0, $0, String_17f98e
- dbbw $2, $0, String_17fb2a
- dbbw $3, $0, String_17fb6e
- dbbw $4, $0, String_17f98e
- dbbw $ff, $ff, String_17fcbf
-
-Unknown_17f7ff: db 17
- dbbw $0, $0, String_17f98e
- dbbw $1, $3, String_17f98e
- dbbw $2, $3, String_17f98e
- dbbw $0, $4, String_17f98e
- dbbw $1, $4, String_17f98e
- dbbw $3, $4, String_17fbb6
- dbbw $4, $4, String_17fbb6
- dbbw $5, $4, String_17f98e
- dbbw $6, $4, String_17f98e
- dbbw $7, $4, String_17f98e
- dbbw $8, $4, String_17fbfe
- dbbw $0, $5, String_17fa49
- dbbw $1, $5, String_17f98e
- dbbw $2, $5, String_17fa49
- dbbw $3, $5, String_17fab0
- dbbw $4, $5, String_17fa49
- dbbw $ff, $ff, String_17fa49
-
-Unknown_17f844: db 19
- dbbw $1, $1, String_17fc3e
- dbbw $2, $1, String_17fc88
- dbbw $3, $1, String_17fcff
- dbbw $4, $1, String_17fd84
- dbbw $5, $1, String_17fd84
- dbbw $6, $1, String_17fd47
- dbbw $1, $2, String_17fb6e
- dbbw $2, $2, String_17f98e
- dbbw $3, $2, String_17fd84
- dbbw $4, $2, String_17f98e
- dbbw $5, $2, String_17fa49
- dbbw $6, $2, String_17fd84
- dbbw $99, $2, String_17fc88
- dbbw $1, $3, String_17fa49
- dbbw $1, $4, String_17fa49
- dbbw $2, $4, String_17fa49
- dbbw $3, $4, String_17fa49
- dbbw $4, $4, String_17fa49
- dbbw $ff, $ff, String_17fa49
-
-String_17f891: ; 17f891
- db "モバイルアダプタが ただしく"
- next "さしこまれていません"
- next "とりあつかいせつめいしょを"
- next "ごらんのうえ しっかりと"
- next "さしこんで ください"
- db "@"
-
-String_17f8d1: ; 17f8d1
- db "でんわが うまく かけられないか"
- next "でんわかいせんが こんでいるので"
- next "つうしん できません"
- next "しばらく まって"
- next "かけなおして ください"
- db "@"
-
-String_17f913: ; 17f913
- db "でんわかいせんが こんでいるため"
- next "でんわが かけられません"
- next "しばらく まって"
- next "かけなおして ください"
- db "@"
-
-String_17f946: ; 17f946
- db "モバイルアダプタの エラーです"
- next "しばらく まって"
- next "かけなおして ください"
- next "なおらない ときは"
- next "モバイルサポートセンターへ"
- next "おといあわせください"
- db "@"
-
-String_17f98e: ; 17f98e
- db "つうしんエラーです"
- next "しばらく まって"
- next "かけなおして ください"
- next "なおらない ときは"
- next "モバイルサポートセンターへ"
- next "おといあわせください"
- db "@"
-
-String_17f9d0: ; 17f9d0
- db "ログインパスワードか"
- next "ログイン アイディーに"
- next "まちがいがあります"
- next "パスワードを かくにんして"
- next "しばらく まって"
- next "かけなおして ください"
- db "@"
-
-String_17fa14: ; 17fa14
- db "でんわが きれました"
- next "とりあつかいせつめいしょを"
- next "ごらんのうえ"
- next "しばらく まって"
- next "かけなおして ください"
- db "@"
-
-String_17fa49: ; 17fa49
- db "モバイルセンターの"
- next "つうしんエラーです"
- next "しばらくまって"
- next "かけなおして ください"
- db "@"
-
-String_17fa71: ; 17fa71
- db "モバイルアダプタに"
- next "とうろくされた じょうほうが"
- next "ただしく ありません"
- next "モバイルトレーナーで"
- next "しょきとうろくを してください"
- db "@"
-
-String_17fab0: ; 17fab0
- db "モバイルセンターが"
- next "こんでいて つながりません"
- next "しばらくまって"
- next "かけなおして ください"
- next "くわしくは とりあつかい"
- next "せつめいしょを ごらんください"
- db "@"
-
-String_17faf9: ; 17faf9
- db "あてさき メールアドレスに"
- next "まちがいがあります"
- next "ただしい メールアドレスを"
- next "いれなおしてください"
- db "@"
-
-String_17fb2a: ; 17fb2a
- db "メールアドレスに"
- next "まちがいが あります"
- next "とりあつかいせつめいしょを"
- next "ごらんのうえ"
- next "モバイルトレーナーで"
- next "しょきとうろくを してください"
- db "@"
-
-String_17fb6e: ; 17fb6e
- db "ログインパスワードに"
- next "まちがいが あるか"
- next "モバイルセンターの エラーです"
- next "パスワードを かくにんして"
- next "しばらく まって"
- next "かけなおして ください"
- db "@"
-
-String_17fbb6: ; 17fbb6
- db "データの よみこみが できません"
- next "しばらくまって"
- next "かけなおして ください"
- next "なおらない ときは"
- next "モバイルサポートセンターへ"
- next "おといあわせください"
- db "@"
-
-String_17fbfe: ; 17fbfe
- db "じかんぎれです"
- next "でんわが きれました"
- next "でんわを かけなおしてください"
- next "くわしくは とりあつかい"
- next "せつめいしょを ごらんください"
- db "@"
-
-String_17fc3e: ; 17fc3e
- db "ごりよう りょうきんの "
- next "おしはらいが おくれたばあいには"
- next "ごりようが できなくなります"
- next "くわしくは とりあつかい"
- next "せつめいしょを ごらんください"
- db "@"
-
-String_17fc88: ; 17fc88
- db "おきゃくさまの ごつごうにより"
- next "ごりようできません"
- next "くわしくは とりあつかい"
- next "せつめいしょを ごらんください"
- db "@"
-
-String_17fcbf: ; 17fcbf
- db "でんわかいせんが こんでいるか"
- next "モバイルセンターの エラーで"
- next "つうしんが できません"
- next "しばらく まって"
- next "かけなおして ください"
- db "@"
-
-String_17fcff: ; 17fcff
- db "ごりよう りょうきんが"
- next "じょうげんを こえているため"
- next "こんげつは ごりようできません"
- next "くわしくは とりあつかい"
- next "せつめいしょを ごらんください"
- db "@"
-
-String_17fd47: ; 17fd47
- db "げんざい モバイルセンターの"
- next "てんけんを しているので"
- next "つうしんが できません"
- next "しばらく まって"
- next "かけなおして ください"
- db "@"
-
-String_17fd84: ; 17fd84
- db "データの よみこみが できません"
- next "くわしくは とりあつかい"
- next "せつめいしょを ごらんください"
- db "@"
-
-
-String_17fdb2: ; 17fdb2
- db "3ぷん いじょう なにも"
- next "にゅうりょく しなかったので"
- next "でんわが きれました"
- db "@"
-
-String_17fdd9: ; 17fdd9
- db "つうしんが うまく"
- next "できませんでした"
- next "もういちど はじめから"
- next "やりなおしてください"
- db "@"
-
-String_17fe03: ; 17fe03
- db "データの よみこみが できません"
- next "しばらくまって"
- next "かけなおして ください"
- next "なおらない ときは"
- next "モバイルサポートセンターへ"
- next "おといあわせください"
- db "@"
-
-String_17fe4b: ; 17fe4b
- db "まちじかんが ながいので"
- next "でんわが きれました"
- db "@"
-
-String_17fe63: ; 17fe63
- db "あいての モバイルアダプタと"
- next "タイプが ちがいます"
- next "くわしくは とりあつかい"
- next "せつめいしょを ごらんください"
- db "@"
-
-String_17fe9a: ; 17fe9a ; unreferenced
- db "ポケモンニュースが"
- next "あたらしくなっているので"
- next "レポートを おくれません"
- next "あたらしい ポケモンニュースの"
- next "よみこみを さきに してください"
- db "@"
-
-String_17fedf: ; 17fedf
- db "つうしんの じょうきょうが"
- next "よくないか かけるあいてが"
- next "まちがっています"
- next "もういちど かくにんをして"
- next "でんわを かけなおして ください"
- db "@"
-; 17ff23
-
-Function17ff23: ; 17ff23
- ld a, [hJoyPressed]
- and a
- ret z
- ld a, $8
- ld [MusicFade], a
- ld a, [wMapMusic]
- ld [MusicFadeIDLo], a
- xor a
- ld [MusicFadeIDHi], a
- ld hl, wc303
- set 7, [hl]
- ret
-; 17ff3c
-
-Function17ff3c: ; 17ff3c
- nop
- ld a, [wc300]
- cp $d0
- ret c
- hlcoord 10, 2
- ld de, String_17ff68
- call PlaceString
- ld a, [wc300]
- push af
- sub $d0
- inc a
- ld [wc300], a
- hlcoord 14, 2
- ld de, wc300
- lb bc, PRINTNUM_LEADINGZEROS | 1, 3
- call PrintNum
- pop af
- ld [wc300], a
- and a
- ret
-; 17ff68
-
-String_17ff68: ; 17ff68
- db "101@"
-; 17ff6c
diff --git a/misc/mobile_menu.asm b/misc/mobile_menu.asm
deleted file mode 100755
index 518ad9a25..000000000
--- a/misc/mobile_menu.asm
+++ /dev/null
@@ -1,879 +0,0 @@
-MainMenu_Mobile: ; 49efc
- call ClearBGPalettes
- ld a, MUSIC_MOBILE_ADAPTER_MENU
- ld [wMapMusic], a
- ld de, MUSIC_MOBILE_ADAPTER_MENU
- call Function4a6c5
-Function49f0a: ; 49f0a
- call ClearBGPalettes
- call Function4a3a7
- call Function4a492
- call ClearBGPalettes
-Function49f16: ; 49f16
- call MobileMenu_InitMenuBuffers
- ld c, 12
- call DelayFrames
- hlcoord 4, 0
- ld b, 10
- ld c, 10
- call Function48cdc
- hlcoord 6, 2
- ld de, MobileString1
- call PlaceString
- hlcoord 0, 12
- ld b, 4
- ld c, SCREEN_HEIGHT
- call TextBox
- xor a
- ld de, String_0x49fe9
- hlcoord 1, 14
- call PlaceString
- call WaitBGMap2
- call SetPalettes
- call StaticMenuJoypad
- ld hl, wMenuCursorY
- ld b, [hl]
- push bc
- jr .check_buttons
-
-.joy_loop
- call ScrollingMenuJoypad
- ld hl, wMenuCursorY
- ld b, [hl]
- push bc
-
-.check_buttons
- bit A_BUTTON_F, a
- jr nz, .a_button
- bit B_BUTTON_F, a
- jr nz, .b_button
- jr .next
-
-.a_button
- ld hl, wMenuCursorY
- ld a, [hl]
- cp 1
- jp z, Function4a098
- cp 2
- jp z, Function4a0b9
- cp 3
- jp z, Function4a0c2
- cp 4
- jp z, Function4a100
- ld a, 1
- call MenuClickSound
-.b_button
- pop bc
- call ClearBGPalettes
- call ClearTileMap
- ld a, MUSIC_MAIN_MENU
- ld [wMapMusic], a
- ld de, MUSIC_MAIN_MENU
- call Function4a6c5
- ret
-
-.next
- ld hl, wMenuCursorY
- ld a, [hl]
- dec a
- ld hl, MobileStrings2
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 1, 13
- ld b, 4
- ld c, SCREEN_HEIGHT
- call ClearBox
- hlcoord 1, 14
- call PlaceString
- jp .useless_jump
-
-.useless_jump
- call MobileMenu_InitMenuBuffers
- pop bc
- ld hl, wMenuCursorY
- ld [hl], b
- ld b, $a
- ld c, $1
- hlcoord 5, 1
- call ClearBox
- jp .joy_loop
-; 49fcc
-
-
-MobileString1: ; 49fcc
- db "めいしフ,ルダー"
- next "あいさつ"
- next "プロフィール"
- next "せ", $1e, "い"
- next "もどる"
- db "@"
-; 49fe9
-
-
-MobileStrings2:
-
-String_0x49fe9: ; 49fe9
- db "めいし¯つくったり"
- next "ほぞんしておける フ,ルダーです@"
-; 4a004
-
-String_0x4a004: ; 4a004
- db "モバイルたいせんや じぶんのめいしで"
- next "つかう あいさつ¯つくります@"
-; 4a026
-
-String_0x4a026: ; 4a026
- db "あなた%じゅうしょや ねんれいの"
- next "せ", $1e, "い¯かえられます@"
-; 4a042
-
-String_0x4a042: ; 4a042
- db "モバイルセンター", $1d, "せつぞくするとき"
- next "ひつような こと¯きめます@"
-; 4a062
-
-String_0x4a062: ; 4a062
- db "まえ%がめん ", $1d, "もどります"
- next "@"
-; 4a071
-
-MobileMenu_InitMenuBuffers: ; 4a071 (12:6071)
- ld hl, w2DMenuCursorInitY
- ld a, 2
- ld [hli], a
- ld a, 5 ; w2DMenuCursorInitX
- ld [hli], a
- ld a, 5 ; w2DMenuNumRows
- ld [hli], a
- ld a, 1 ; w2DMenuNumCols
- ld [hli], a
- ld [hl], $0 ; w2DMenuFlags1
- set 5, [hl]
- inc hl
- xor a ; w2DMenuFlags2
- ld [hli], a
- ld a, $20 ; w2DMenuCursorOffsets
- ld [hli], a
- ; this is a stupid way to load $c3
- ld a, A_BUTTON
- add D_UP
- add D_DOWN
- add B_BUTTON
- ld [hli], a ; wMenuJoypadFilter
- ld a, 1
- ld [hli], a ; wMenuCursorY, wMenuCursorX
- ld [hli], a ; wMenuCursorY, wMenuCursorX
- ret
-
-Function4a098: ; 4a098 (12:6098)
- ld a, 2
- call MenuClickSound
- call PlaceHollowCursor
- call WaitBGMap
- call LoadStandardMenuDataHeader
- callba Function89de0
- call Call_ExitMenu
- call MG_Mobile_Layout_LoadPals
- call Function4a485
- pop bc
- jp Function49f16
-
-Function4a0b9: ; 4a0b9 (12:60b9)
- ld a, 2
- call MenuClickSound
- pop bc
- jp Function4a4c4
-
-Function4a0c2: ; 4a0c2 (12:60c2)
- ld a, 2
- call MenuClickSound
- ld a, BANK(sPlayerData)
- call GetSRAMBank
- ld hl, sPlayerData + PlayerName - wPlayerData
- ld de, PlayerName
- ld bc, 6 ; japanese name length
- call CopyBytes
- call CloseSRAM
- callba _LoadData
- ld c, 2
- call DelayFrames
- ld c, $1
- call InitMobileProfile
- push af
- call ClearBGPalettes
- pop af
- and a
- jr nz, .skip_save
- callba _SaveData
-.skip_save
- ld c, 5
- call DelayFrames
- jr asm_4a111
-
-Function4a100: ; 4a100 (12:6100)
- ld a, 2
- call MenuClickSound
- call ClearBGPalettes
- call Function4a13b
- call ClearBGPalettes
- call ClearTileMap
-
-asm_4a111: ; 4a111 (12:6111)
- pop bc
- call LoadFontsExtra
- jp Function49f0a
-
-Function4a118: ; 4a118 (12:6118)
- ld hl, w2DMenuCursorInitY
- ld a, $1
- ld [hli], a
- ld a, $d
- ld [hli], a
- ld a, $3
- ld [hli], a
- ld a, $1
- ld [hli], a
- ld [hl], $0
- set 5, [hl]
- inc hl
- xor a
- ld [hli], a
- ld a, $20
- ld [hli], a
- ld a, $1
- add $2
- ld [hli], a
- ld a, $1
- ld [hli], a
- ld [hli], a
- ret
-
-Function4a13b: ; 4a13b (12:613b)
- call Function4a3a7
- call Function4a492
- call Function4a373
- ld c, 10
- call DelayFrames
-
-Function4a149: ; 4a149 (12:6149)
- hlcoord 1, 2
- ld b, $6
- ld c, $10
- call Function48cdc
- hlcoord 3, 4
- ld de, String_4a1ef
- call PlaceString
- hlcoord 0, 12
- ld b, $4
- ld c, $12
- call TextBox
- ld a, [wMenuCursorY]
- dec a
- ld hl, Strings_4a23d
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 1, 13
- ld b, $4
- ld c, $12
- call ClearBox
- hlcoord 1, 14
- call PlaceString
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
- call SetPalettes
- call StaticMenuJoypad
- ld hl, wMenuCursorY
- ld b, [hl]
- push bc
- jr asm_4a19d
-
-Function4a195: ; 4a195 (12:6195)
- call ScrollingMenuJoypad
- ld hl, wMenuCursorY
- ld b, [hl]
- push bc
-
-asm_4a19d: ; 4a19d (12:619d)
- bit 0, a
- jr nz, .asm_4a1a7
- bit 1, a
- jr nz, .asm_4a1ba
- jr .asm_4a1bc
-.asm_4a1a7
- ld hl, wMenuCursorY
- ld a, [hl]
- cp $1
- jp z, Function4a20e
- cp $2
- jp z, Function4a221
- ld a, $1
- call MenuClickSound
-.asm_4a1ba
- pop bc
- ret
-.asm_4a1bc
- ld hl, wMenuCursorY
- ld a, [hl]
- dec a
- ld hl, Strings_4a23d
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 1, 13
- ld b, $4
- ld c, $12
- call ClearBox
- hlcoord 1, 14
- call PlaceString
- jr .asm_4a1db
-.asm_4a1db
- call Function4a373
- pop bc
- ld hl, wMenuCursorY
- ld [hl], b
- lb bc, 6, 1
- hlcoord 2, 3
- call ClearBox
- jp Function4a195
-; 4a1ef (12:61ef)
-
-String_4a1ef: ; 4a1ef
- db "モバイルセンター¯えらぶ"
- next "ログインパスワード¯いれる"
- next "もどる@"
-; 4a20e
-
-Function4a20e: ; 4a20e (12:620e)
- ld a, $1
- call MenuClickSound
- callba Function1719c8
- call ClearBGPalettes
- call DelayFrame
- jr Function4a239
-
-Function4a221: ; 4a221 (12:6221)
- ld a, $1
- call MenuClickSound
- call Function4a28a
- jr c, Function4a239
- call Function4a373
- ld a, $2
- ld [wMenuCursorY], a
- jr .asm_4a235
-.asm_4a235
- pop bc
- jp Function4a149
-
-Function4a239: ; 4a239 (12:6239)
- pop bc
- jp Function4a13b
-; 4a23d (12:623d)
-
-Strings_4a23d: ; 4a23d
- db "いつも せつぞく¯する"
- next "モバイルセンター¯えらびます@"
-
- db "モバイルセンター", $1d, "せつぞくするとき"
- next "つかうパスワード¯ほぞんできます@"
-
- db "まえ%がめん ", $1d, "もどります@"
-
- db "@"
-; 4a28a
-
-Function4a28a: ; 4a28a (12:628a)
- hlcoord 2, 3
- lb bc, 6, 1
- ld a, " "
- call Function4a6d8
- call PlaceHollowCursor
- call WaitBGMap
- call LoadStandardMenuDataHeader
- ld a, $5
- call GetSRAMBank
- ld a, [$aa4b]
- call CloseSRAM
- and a
- jr z, .asm_4a2df
- hlcoord 12, 0
- ld b, $5
- ld c, $6
- call Function48cdc
- hlcoord 14, 1
- ld de, String_4a34b
- call PlaceString
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
- call Function4a118
- call ScrollingMenuJoypad
- push af
- call PlayClickSFX
- pop af
- bit B_BUTTON_F, a
- jr nz, .quit
- ld a, [wMenuCursorY]
- cp $2
- jr z, .DeleteLoginPassword
- cp $3
- jr z, .quit
-.asm_4a2df
- callba Function11765d
- call ClearBGPalettes
- call Call_ExitMenu
- call LoadFontsExtra
- scf
- ret
-
-.DeleteLoginPassword:
- call PlaceHollowCursor
- ld hl, UnknownText_0x4a358
- call PrintText
- hlcoord 14, 7
- ld b, 3
- ld c, 4
- call TextBox
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
- ld hl, DeletePassword_YesNo_MenuDataHeader
- call LoadMenuDataHeader
- call VerticalMenu
- bit B_BUTTON_F, a
- jr nz, .dont_delete_password
- ld a, [wMenuCursorY]
- cp $2
- jr z, .dont_delete_password
- ld a, BANK(sMobileLoginPassword)
- call GetSRAMBank
- ld hl, sMobileLoginPassword
- xor a
- ld bc, MOBILE_LOGIN_PASSWORD_LENGTH
- call ByteFill
- call CloseSRAM
- ld hl, UnknownText_0x4a35d
- call PrintText
- call JoyWaitAorB
-.dont_delete_password
- call ExitMenu
-.quit
- call Call_ExitMenu
- callba Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
- xor a
- ret
-; 4a346 (12:6346)
-
-MenuDataHeader_0x4a346: ; 0x4a346
- db $40 ; flags
- db 00, 12 ; start coords
- db 06, 19 ; end coords
-
-String_4a34b: ; 4a34b
- db "いれなおす"
- next "けす"
- next "もどる@"
-; 4a358
-
-UnknownText_0x4a358: ; 0x4a358
- ; Delete the saved LOG-IN PASSWORD?
- text_jump UnknownText_0x1c5196
- db "@"
-; 0x4a35d
-
-UnknownText_0x4a35d: ; 0x4a35d
- ; Deleted the LOG-IN PASSWORD.
- text_jump UnknownText_0x1c51b9
- db "@"
-; 0x4a362
-
-DeletePassword_YesNo_MenuDataHeader: ; 0x4a362
- db $40 ; flags
- db 07, 14 ; start coords
- db 11, 19 ; end coords
- dw MenuData2_0x4a36a
- db 2 ; default option
-; 0x4a36a
-
-MenuData2_0x4a36a: ; 0x4a36a
- db $e0 ; flags
- db 2 ; items
- db "はい@"
- db "いいえ@"
-; 0x4a373
-
-Function4a373: ; 4a373 (12:6373)
- ld hl, w2DMenuCursorInitY
- ld a, $4
- ld [hli], a
- ld a, $2
- ld [hli], a
- ld a, $3
- ld [hli], a
- ld a, $1
- ld [hli], a
- ld [hl], $0
- set 5, [hl]
- inc hl
- xor a
- ld [hli], a
- ld a, $20
- ld [hli], a
- ld a, $1
- add $40
- add $80
- add $2
- ld [hli], a
- ld a, $1
- ld [hli], a
- ld [hli], a
- ret
-; 4a39a (12:639a)
-
-Function4a39a: ; 4a39a
- call Function4a485
- call Function4a492
- call Function4a3aa
- call SetPalettes
- ret
-; 4a3a7
-
-Function4a3a7: ; 4a3a7 (12:63a7)
- call Function4a485
-Function4a3aa: ; 4a3aa
- hlcoord 0, 0
- lb bc, 3, 1
- xor a
- call Function4a6d8
- lb bc, 1, 1
- ld a, $1
- call Function4a6d8
- lb bc, 1, 1
- xor a
- call Function4a6d8
- lb bc, 1, 1
- ld a, $1
- call Function4a6d8
- lb bc, 4, 1
- ld a, $2
- call Function4a6d8
- lb bc, 1, 1
- ld a, $3
- call Function4a6d8
- lb bc, 1, 1
- ld a, " "
- call Function4a6d8
- hlcoord 1, 0
- ld a, $1
- lb bc, 3, 18
- call Function4a6d8
- lb bc, 1, 18
- ld a, $0
- call Function4a6d8
- lb bc, 1, 18
- ld a, $1
- call Function4a6d8
- lb bc, 1, 18
- ld a, $2
- call Function4a6d8
- lb bc, 11, 18
- ld a, " "
- call Function4a6d8
- hlcoord 19, 0
- lb bc, 3, 1
- ld a, $0
- call Function4a6d8
- lb bc, 1, 1
- ld a, $1
- call Function4a6d8
- lb bc, 1, 1
- xor a
- call Function4a6d8
- lb bc, 1, 1
- ld a, $1
- call Function4a6d8
- lb bc, 4, 1
- ld a, $2
- call Function4a6d8
- lb bc, 1, 1
- ld a, $3
- call Function4a6d8
- lb bc, 1, 1
- ld a, " "
- call Function4a6d8
- ret
-; 4a449 (12:6449)
-
-Function4a449: ; 4a449
- ld bc, 3 * SCREEN_WIDTH
- ld a, $0
- hlcoord 0, 0
- call ByteFill
- ld bc, 2 * SCREEN_WIDTH
- ld a, $1
- call ByteFill
- ld bc, 2 * SCREEN_WIDTH
- ld a, $0
- call ByteFill
- ld bc, 2 * SCREEN_WIDTH
- ld a, $1
- call ByteFill
- ld bc, SCREEN_WIDTH
- ld a, $2
- call ByteFill
- ld bc, SCREEN_WIDTH
- ld a, $3
- call ByteFill
- ld bc, SCREEN_WIDTH
- ld a, " "
- call ByteFill
- ret
-; 4a485
-
-Function4a485: ; 4a485 (12:6485)
- ld de, GFX_49c0c
- ld hl, VTiles2 tile $00
- lb bc, BANK(GFX_49c0c), 13
- call Get2bpp
- ret
-
-Function4a492: ; 4a492 (12:6492)
- call MG_Mobile_Layout00
- ret
-
-
-MainMenu_MobileStudium: ; 4a496
- ld a, [StartDay]
- ld b, a
- ld a, [StartHour]
- ld c, a
- ld a, [StartMinute]
- ld d, a
- ld a, [StartSecond]
- ld e, a
- push bc
- push de
- callba MobileStudium
- call ClearBGPalettes
- pop de
- pop bc
- ld a, b
- ld [StartDay], a
- ld a, c
- ld [StartHour], a
- ld a, d
- ld [StartMinute], a
- ld a, e
- ld [StartSecond], a
- ret
-; 4a4c4
-
-
-Function4a4c4: ; 4a4c4 (12:64c4)
- call ClearBGPalettes
- call Function4a3a7
- call Function4a492
- call Function4a680
- call ClearBGPalettes
- ld c, 20
- call DelayFrames
- hlcoord 2, 0
- ld b, $a
- ld c, $e
- call Function48cdc
- hlcoord 4, 2
- ld de, String_4a5c5
- call PlaceString
- hlcoord 4, 4
- ld de, String_4a5cd
- call PlaceString
- hlcoord 4, 6
- ld de, String_4a5da
- call PlaceString
- hlcoord 4, 8
- ld de, String_4a5e6
- call PlaceString
- hlcoord 4, 10
- ld de, String_4a5f2
- call PlaceString
- hlcoord 0, 12
- ld b, $4
- ld c, $12
- call TextBox
- xor a
- ld hl, Strings_4a5f6
- ld d, h
- ld e, l
- hlcoord 1, 14
- call PlaceString
- ld a, $1
- ld hl, Strings_4a5f6
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 1, 16
- call PlaceString
- call WaitBGMap2
- call SetPalettes
- call StaticMenuJoypad
- ld hl, wMenuCursorY
- ld b, [hl]
- push bc
- jr asm_4a54d
-
-Function4a545: ; 4a545 (12:6545)
- call ScrollingMenuJoypad
- ld hl, wMenuCursorY
- ld b, [hl]
- push bc
-
-asm_4a54d: ; 4a54d (12:654d)
- bit 0, a
- jr nz, .asm_4a557
- bit 1, a
- jr nz, .asm_4a574
- jr .asm_4a57e
-.asm_4a557
- ld hl, wMenuCursorY
- ld a, [hl]
- cp $1
- jp z, Function4a6ab
- cp $2
- jp z, Function4a6ab
- cp $3
- jp z, Function4a6ab
- cp $4
- jp z, Function4a6ab
- ld a, $1
- call MenuClickSound
-.asm_4a574
- pop bc
- call ClearBGPalettes
- call ClearTileMap
- jp Function49f0a
-.asm_4a57e
- ld hl, wMenuCursorY
- ld a, [hl]
- dec a
- add a
- push af
- ld hl, Strings_4a5f6
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 1, 13
- ld b, $4
- ld c, $12
- call ClearBox
- hlcoord 1, 14
- call PlaceString
- pop af
- inc a
- ld hl, Strings_4a5f6
- call GetNthString
- ld d, h
- ld e, l
- hlcoord 1, 16
- call PlaceString
- jp Function4a5b0
-
-Function4a5b0: ; 4a5b0 (12:65b0)
- call Function4a680
- pop bc
- ld hl, wMenuCursorY
- ld [hl], b
- ld b, $a
- ld c, $1
- hlcoord 3, 1
- call ClearBox
- jp Function4a545
-; 4a5c5 (12:65c5)
-
-String_4a5c5: ; 4a5c5
- db "じこしょうかい@"
-String_4a5cd: ; 4a5cd
- db "たいせん ", $4a, "はじまるとき@"
-String_4a5da: ; 4a5da
- db "たいせん ", $1d, "かったとき@"
-String_4a5e6: ; 4a5e6
- db "たいせん ", $1d, "まけたとき@"
-String_4a5f2: ; 4a5f2
- db "もどる@"
-; 4a5f6
-
-Strings_4a5f6: ; 4a5f6
- db "めいし や ニュース ", $1d, "のせる@"
- db "あなた%あいさつです@"
- db "モバイル たいせん", $4a, "はじまるとき@"
- db "あいて", $1d, "みえる あいさつです@"
- db "モバイル たいせんで かったとき@"
- db "あいて", $1d, "みえる あいさつです@"
- db "モバイル たいせんで まけたとき@"
- db "あいて", $1d, "みえる あいさつです@"
- db "まえ%がめん ", $1d, "もどります@"
- db "@"
-; 4a680
-
-Function4a680: ; 4a680 (12:6680)
- ld hl, w2DMenuCursorInitY
- ld a, $2
- ld [hli], a
- ld a, $3
- ld [hli], a
- ld a, $5
- ld [hli], a
- ld a, $1
- ld [hli], a
- ld [hl], $0
- set 5, [hl]
- inc hl
- xor a
- ld [hli], a
- ld a, $20
- ld [hli], a
- ld a, $1
- add $40
- add $80
- add $2
- ld [hli], a
- ld a, $1
- ld [hli], a
- ld [hli], a
- xor a
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ret
-
-Function4a6ab: ; 4a6ab (12:66ab)
- ld a, $2
- call MenuClickSound
- call ClearBGPalettes
- ld b, SCGB_DIPLOMA
- call GetSGBLayout
- callba Function11c1ab
- pop bc
- call LoadFontsExtra
- jp Function4a4c4
-
-Function4a6c5: ; 4a6c5 (12:66c5)
- ld a, $5
- ld [MusicFade], a
- ld a, e
- ld [MusicFadeIDLo], a
- ld a, d
- ld [MusicFadeIDHi], a
- ld c, 22
- call DelayFrames
- ret
-
-Function4a6d8: ; 4a6d8 (12:66d8)
- push bc
- push hl
-.asm_4a6da
- ld [hli], a
- dec c
- jr nz, .asm_4a6da
- pop hl
- ld bc, SCREEN_WIDTH
- add hl, bc
- pop bc
- dec b
- jr nz, Function4a6d8
- ret
diff --git a/misc/printer_77.asm b/misc/printer_77.asm
deleted file mode 100755
index c36c21463..000000000
--- a/misc/printer_77.asm
+++ /dev/null
@@ -1,356 +0,0 @@
-PrintPage1: ; 1dc1b0
- hlcoord 0, 0
- decoord 0, 0, wPrinterTileMapBuffer
- ld bc, 17 * SCREEN_WIDTH
- call CopyBytes
- hlcoord 17, 1, wPrinterTileMapBuffer
- ld a, $62
- ld [hli], a
- inc a
- ld [hl], a
- hlcoord 17, 2, wPrinterTileMapBuffer
- ld a, $64
- ld [hli], a
- inc a
- ld [hl], a
- hlcoord 1, 9, wPrinterTileMapBuffer
- ld a, " "
- ld [hli], a
- ld [hl], a
- hlcoord 1, 10, wPrinterTileMapBuffer
- ld a, $61
- ld [hli], a
- ld [hl], a
- hlcoord 2, 11, wPrinterTileMapBuffer
- lb bc, 5, 18
- call ClearBox
- ld a, [wd265]
- dec a
- call CheckCaughtMon
- push af
- ld a, [wd265]
- ld b, a
- ld c, 1 ; get page 1
- callba GetDexEntryPagePointer
- pop af
- ld a, b
- hlcoord 1, 11, wPrinterTileMapBuffer
- call nz, FarString
- hlcoord 19, 0, wPrinterTileMapBuffer
- ld [hl], $35
- ld de, SCREEN_WIDTH
- add hl, de
- ld b, $f
-.column_loop
- ld [hl], $37
- add hl, de
- dec b
- jr nz, .column_loop
- ld [hl], $3a
- ret
-; 1dc213
-
-PrintPage2: ; 1dc213
- hlcoord 0, 0, wPrinterTileMapBuffer
- ld bc, 8 * SCREEN_WIDTH
- ld a, " "
- call ByteFill
- hlcoord 0, 0, wPrinterTileMapBuffer
- ld a, $36
- ld b, 6
- call .FillColumn
- hlcoord 19, 0, wPrinterTileMapBuffer
- ld a, $37
- ld b, 6
- call .FillColumn
- hlcoord 0, 6, wPrinterTileMapBuffer
- ld [hl], $38
- inc hl
- ld a, $39
- ld bc, SCREEN_HEIGHT
- call ByteFill
- ld [hl], $3a
- hlcoord 0, 7, wPrinterTileMapBuffer
- ld bc, SCREEN_WIDTH
- ld a, $32
- call ByteFill
- ld a, [wd265]
- dec a
- call CheckCaughtMon
- push af
- ld a, [wd265]
- ld b, a
- ld c, 2 ; get page 2
- callba GetDexEntryPagePointer
- pop af
- hlcoord 1, 1, wPrinterTileMapBuffer
- ld a, b
- call nz, FarString
- ret
-; 1dc26a
-
-.FillColumn: ; 1dc26a
- push de
- ld de, SCREEN_WIDTH
-.column_loop
- ld [hl], a
- add hl, de
- dec b
- jr nz, .column_loop
- pop de
- ret
-; 1dc275
-
-GBPrinterStrings:
-GBPrinterString_Null: db "@"
-GBPrinterString_CheckingLink: next " CHECKING LINK...@"
-GBPrinterString_Transmitting: next " TRANSMITTING...@"
-GBPrinterString_Printing: next " PRINTING...@"
-GBPrinterString_PrinterError1:
- db " Printer Error 1"
- next ""
- next "Check the Game Boy"
- next "Printer Manual."
- db "@"
-GBPrinterString_PrinterError2:
- db " Printer Error 2"
- next ""
- next "Check the Game Boy"
- next "Printer Manual."
- db "@"
-GBPrinterString_PrinterError3:
- db " Printer Error 3"
- next ""
- next "Check the Game Boy"
- next "Printer Manual."
- db "@"
-GBPrinterString_PrinterError4:
- db " Printer Error 4"
- next ""
- next "Check the Game Boy"
- next "Printer Manual."
- db "@"
-; 1dc381
-
-PrintPartyMonPage1: ; 1dc381
- call ClearBGPalettes
- call ClearTileMap
- call ClearSprites
- xor a
- ld [hBGMapMode], a
- call LoadFontsBattleExtra
-
- ld de, MobileHPIcon
- ld hl, VTiles2 tile $71
- lb bc, BANK(MobileHPIcon), 1
- call Request1bpp
-
- ld de, MobileLvIcon
- ld hl, VTiles2 tile $6e
- lb bc, BANK(MobileLvIcon), 1
- call Request1bpp
-
- ld de, ShinyIcon
- ld hl, VTiles2 tile $3f
- lb bc, BANK(ShinyIcon), 1
- call Get2bpp
-
- xor a
- ld [MonType], a
- callba CopyPkmnToTempMon
- hlcoord 0, 7
- ld b, 9
- ld c, 18
- call TextBox
- hlcoord 8, 2
- ld a, [TempMonLevel]
- call PrintLevel_Force3Digits
- hlcoord 12, 2
- ld [hl], "◀" ; Filled left triangle
- inc hl
- ld de, TempMonMaxHP
- lb bc, 2, 3
- call PrintNum
- ld a, [CurPartySpecies]
- ld [wd265], a
- ld [CurSpecies], a
- ld hl, PartyMonNicknames
- call Function1dc50e
- hlcoord 8, 4
- call PlaceString
- hlcoord 9, 6
- ld [hl], "/"
- call GetPokemonName
- hlcoord 10, 6
- call PlaceString
- hlcoord 8, 0
- ld [hl], "№"
- inc hl
- ld [hl], "."
- inc hl
- ld de, wd265
- lb bc, PRINTNUM_LEADINGZEROS | 1, 3
- call PrintNum
- hlcoord 1, 9
- ld de, String1dc550
- call PlaceString
- ld hl, PartyMonOT
- call Function1dc50e
- hlcoord 4, 9
- call PlaceString
- hlcoord 1, 11
- ld de, String1dc559
- call PlaceString
- hlcoord 4, 11
- ld de, TempMonID
- lb bc, PRINTNUM_LEADINGZEROS | 2, 5
- call PrintNum
- hlcoord 1, 14
- ld de, String1dc554
- call PlaceString
- hlcoord 7, 14
- ld a, [TempMonMoves + 0]
- call Function1dc51a
- call Function1dc52c
- ld hl, TempMonDVs
- predef GetUnownLetter
- ld hl, wBoxAlignment
- xor a
- ld [hl], a
- ld a, [CurPartySpecies]
- cp UNOWN
- jr z, .asm_1dc469
- inc [hl]
-
-.asm_1dc469
- hlcoord 0, 0
- call _PrepMonFrontpic
- call WaitBGMap
- ld b, SCGB_STATS_SCREEN_HP_PALS
- call GetSGBLayout
- call SetPalettes
- ret
-; 1dc47b
-
-PrintPartyMonPage2: ; 1dc47b
- call ClearBGPalettes
- call ClearTileMap
- call ClearSprites
- xor a
- ld [hBGMapMode], a
- call LoadFontsBattleExtra
- xor a
- ld [MonType], a
- callba CopyPkmnToTempMon
- hlcoord 0, 0
- ld b, 15
- ld c, 18
- call TextBox
- ld bc, SCREEN_WIDTH
- decoord 0, 0
- hlcoord 0, 1
- call CopyBytes
- hlcoord 7, 0
- ld a, [TempMonMoves + 1]
- call Function1dc51a
- hlcoord 7, 2
- ld a, [TempMonMoves + 2]
- call Function1dc51a
- hlcoord 7, 4
- ld a, [TempMonMoves + 3]
- call Function1dc51a
- hlcoord 7, 7
- ld de, String1dc55d
- call PlaceString
- hlcoord 16, 7
- ld de, TempMonAttack
- call .PrintTempMonStats
- hlcoord 16, 9
- ld de, TempMonDefense
- call .PrintTempMonStats
- hlcoord 16, 11
- ld de, TempMonSpclAtk
- call .PrintTempMonStats
- hlcoord 16, 13
- ld de, TempMonSpclDef
- call .PrintTempMonStats
- hlcoord 16, 15
- ld de, TempMonSpeed
- call .PrintTempMonStats
- call WaitBGMap
- ld b, SCGB_STATS_SCREEN_HP_PALS
- call GetSGBLayout
- call SetPalettes
- ret
-; 1dc507
-
-.PrintTempMonStats: ; 1dc507
- lb bc, 2, 3
- call PrintNum
- ret
-; 1dc50e
-
-Function1dc50e: ; 1dc50e
- ld bc, NAME_LENGTH
- ld a, [CurPartyMon]
- call AddNTimes
- ld e, l
- ld d, h
- ret
-; 1dc51a
-
-Function1dc51a: ; 1dc51a
- and a
- jr z, .no_move
-
- ld [wd265], a
- call GetMoveName
- jr .got_string
-
-.no_move
- ld de, String1dc584
-
-.got_string
- call PlaceString
- ret
-; 1dc52c
-
-Function1dc52c: ; 1dc52c
- callba GetGender
- ld a, " "
- jr c, .got_gender
- ld a, "♂"
- jr nz, .got_gender
- ld a, "♀"
-
-.got_gender
- hlcoord 17, 2
- ld [hl], a
- ld bc, TempMonDVs
- callba CheckShininess
- ret nc
- hlcoord 18, 2
- ld [hl], "<SHINY>"
- ret
-; 1dc550
-
-String1dc550: ; 1dc550
- db "OT/@"
-
-String1dc554: ; 1dc554
- db "MOVE@"
-
-String1dc559: ; 1dc559
- db "<ID>№.@"
-
-String1dc55d: ; 1dc55d
- db "ATTACK"
- next "DEFENSE"
- next "SPCL.ATK"
- next "SPCL.DEF"
- next "SPEED"
- db "@"
-
-String1dc584: ; 1dc584
- db "------------@"
-; 1dc591
diff --git a/misc/unused_title.asm b/misc/unused_title.asm
deleted file mode 100644
index 6cd79237b..000000000
--- a/misc/unused_title.asm
+++ /dev/null
@@ -1,556 +0,0 @@
-UnusedTitleScreen: ; 10c000
-
- call ClearBGPalettes
- call ClearTileMap
- call DisableLCD
- xor a
- ld [hBGMapMode], a
-
- ld hl, wJumptableIndex
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ld [hl], a
-
- ld hl, UnusedTitleBG_GFX
- ld de, VTiles2
- ld bc, VBGMap0 - VTiles2
- call CopyBytes
-
- ld hl, UnusedTitleBG_GFX + $800
- ld de, VTiles1
- ld bc, VTiles2 - VTiles1
- call CopyBytes
-
- ld hl, UnusedTitleFG_GFX
- ld de, VTiles0
- ld bc, VTiles1 - VTiles0
- call CopyBytes
-
- ld hl, UnusedTitleBG_Tilemap
- debgcoord 0, 0
- ld bc, 32 * 32
-.copy
- ld a, 0
- ld [rVBK], a
- ld a, [hli]
- ld [de], a
- ld a, 1
- ld [rVBK], a
- ld a, [hli]
- ld [de], a
- inc de
- dec bc
- ld a, b
- or c
- jr nz, .copy
-
- ld hl, UnusedTitleFG_OAM
- ld de, Sprites
- ld bc, $a0
- call CopyBytes
-
- call EnableLCD
- ld a, [rLCDC]
- set 1, a
- set 2, a
- ld [rLCDC], a
-
- call DelayFrame
-
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
-
- ld hl, UnusedTitleBG_Palettes
- ld de, UnknBGPals
- ld bc, $40
- call CopyBytes
-
- ld hl, UnusedTitleFG_Palettes
- ld de, UnknOBPals
- ld bc, $40
- call CopyBytes
-
- ld hl, UnusedTitleBG_Palettes
- ld de, BGPals
- ld bc, $40
- call CopyBytes
-
- ld hl, UnusedTitleFG_Palettes
- ld de, OBPals
- ld bc, $40
- call CopyBytes
-
- pop af
- ld [rSVBK], a
-
- ld a, $1
- ld [hCGBPalUpdate], a
-
- ld de, MUSIC_TITLE
- call PlayMusic
-
- ret
-; 10c0b1
-
-UnusedTitleBG_GFX: ; 10c0b1
-INCBIN "gfx/title/old_bg.2bpp"
-; 10d0b1
-
-UnusedTitleBG_Tilemap: ; 10d0b1
-; 32x32 (tile, attributes)
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $01,$00, $02,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $03,$00, $04,$00, $05,$01, $06,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $07,$05, $08,$05, $09,$05, $0a,$05, $0b,$00, $0c,$00, $0d,$00, $0e,$00, $0f,$01, $10,$01, $11,$01, $12,$01, $13,$05, $14,$05, $15,$05, $16,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $17,$04, $18,$04, $19,$04, $1a,$04, $1b,$00, $1c,$00, $1d,$02, $1e,$02, $1f,$07, $20,$07, $21,$01, $22,$01, $23,$04, $24,$04, $25,$04, $26,$04, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $27,$04, $28,$04, $29,$04, $2a,$04, $2b,$00, $2c,$00, $2d,$03, $2e,$01, $2f,$01, $30,$01, $31,$01, $32,$01, $33,$04, $34,$04, $35,$04, $36,$04, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $37,$04, $38,$04, $39,$04, $3a,$04, $3b,$00, $3c,$00, $3d,$01, $00,$00, $00,$00, $3e,$07, $3f,$01, $40,$01, $41,$04, $42,$04, $43,$04, $44,$04, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $45,$04, $46,$04, $47,$04, $48,$04, $49,$00, $3c,$00, $4a,$01, $00,$00, $00,$00, $4b,$07, $3f,$01, $4c,$01, $4d,$06, $4e,$06, $4f,$06, $50,$06, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $51,$04, $52,$06, $53,$06, $54,$06, $55,$00, $3c,$00, $56,$01, $00,$00, $00,$00, $57,$07, $58,$01, $59,$01, $5a,$06, $5b,$06, $5c,$06, $5d,$06, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $5e,$06, $5f,$06, $60,$06, $61,$06, $62,$00, $63,$00, $64,$03, $65,$01, $66,$01, $67,$07, $68,$01, $69,$01, $26,$04, $6a,$06, $26,$04, $26,$04, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $6b,$00, $6c,$05, $6d,$05, $6e,$05, $6f,$00, $70,$02, $71,$02, $72,$01, $73,$00, $74,$02, $75,$01, $76,$01, $77,$05, $78,$05, $79,$05, $6b,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $7a,$00, $7b,$00, $7c,$00, $7d,$00, $0f,$01, $7e,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $a2,$00, $80,$00, $81,$00, $82,$00, $83,$00, $84,$07, $85,$01, $86,$01, $87,$01, $88,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $89,$00, $8a,$00, $8b,$00, $8c,$07, $8d,$01, $8e,$01, $8f,$01, $90,$01, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $91,$01, $92,$01, $93,$01, $94,$01, $95,$01, $00,$00, $00,$00, $00,$00, $96,$05, $97,$05, $98,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $99,$05, $9a,$05, $9b,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $9c,$05, $9d,$05, $9e,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $9f,$05, $a0,$05, $a1,$05, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $6b,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
- db $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00, $00,$00
-; 10d8b1
-
-UnusedTitleBG_Palettes: ; 10d8b1
- RGB 00, 00, 00
- RGB 25, 15, 28
- RGB 22, 11, 28
- RGB 19, 08, 26
-
- RGB 00, 00, 00
- RGB 17, 07, 22
- RGB 13, 07, 16
- RGB 19, 08, 26
-
- RGB 25, 15, 28
- RGB 22, 11, 28
- RGB 19, 08, 26
- RGB 17, 07, 22
-
- RGB 22, 11, 28
- RGB 19, 08, 26
- RGB 17, 07, 22
- RGB 13, 07, 16
-
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 16, 16, 24
- RGB 02, 13, 21
-
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 12, 12, 12
-
- RGB 00, 00, 00
- RGB 01, 11, 23
- RGB 16, 16, 24
- RGB 02, 13, 21
-
- RGB 00, 00, 00
- RGB 22, 10, 31
- RGB 19, 08, 26
- RGB 17, 07, 22
-
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
-
- RGB 31, 31, 31
- RGB 20, 04, 20
- RGB 16, 08, 16
- RGB 24, 00, 24
-
- rept 54
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 31, 31
- endr
-; 10dab1
-
-UnusedTitleFG_GFX: ; 10dab1
-INCBIN "gfx/title/old_fg.2bpp"
-; 10eab1
-
-UnusedTitleFG_Palettes: ; 10eab1
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 16, 16, 24
- RGB 02, 13, 21
-
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 12, 12, 12
-
- RGB 00, 00, 00
- RGB 01, 11, 23
- RGB 16, 16, 24
- RGB 02, 13, 21
-
- RGB 00, 00, 00
- RGB 31, 22, 00
- RGB 31, 27, 00
- RGB 31, 31, 00
-
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 16, 16, 24
- RGB 02, 13, 21
-
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 12, 12, 12
-
- RGB 00, 00, 00
- RGB 01, 11, 23
- RGB 16, 16, 24
- RGB 02, 13, 21
-
- RGB 16, 31, 00
- RGB 22, 31, 00
- RGB 27, 31, 00
- RGB 31, 31, 00
-
-
- RGB 31, 00, 18
- RGB 31, 31, 31
- RGB 16, 16, 24
- RGB 02, 13, 21
-
- RGB 00, 00, 00
- RGB 31, 31, 31
- RGB 20, 20, 20
- RGB 12, 12, 12
-
- RGB 00, 00, 00
- RGB 01, 11, 23
- RGB 16, 16, 24
- RGB 02, 13, 21
-
- RGB 16, 31, 00
- RGB 22, 31, 00
- RGB 27, 31, 00
- RGB 31, 31, 00
-
- RGB 24, 18, 31
- RGB 31, 31, 00
- RGB 31, 31, 01
- RGB 31, 31, 03
-
- RGB 31, 31, 05
- RGB 31, 31, 08
- RGB 31, 31, 10
- RGB 31, 31, 12
-
- RGB 31, 31, 14
- RGB 31, 31, 16
- RGB 31, 31, 18
- RGB 31, 31, 20
-
- RGB 31, 31, 22
- RGB 31, 31, 25
- RGB 31, 31, 27
- RGB 31, 31, 29
-
- RGB 24, 06, 06
- RGB 01, 01, 01
- RGB 03, 03, 03
- RGB 05, 05, 05
-
- RGB 08, 08, 08
- RGB 10, 10, 10
- RGB 12, 12, 12
- RGB 14, 14, 14
-
- RGB 16, 16, 16
- RGB 18, 18, 18
- RGB 20, 20, 20
- RGB 22, 22, 22
-
- RGB 25, 25, 25
- RGB 27, 27, 27
- RGB 29, 29, 29
- RGB 31, 31, 31
-
- RGB 18, 24, 18
- RGB 31, 29, 01
- RGB 31, 27, 03
- RGB 31, 25, 05
-
- RGB 31, 22, 08
- RGB 31, 20, 10
- RGB 31, 18, 12
- RGB 31, 16, 14
-
- RGB 31, 14, 16
- RGB 31, 12, 18
- RGB 31, 10, 20
- RGB 31, 08, 22
-
- RGB 31, 05, 25
- RGB 31, 03, 27
- RGB 31, 01, 29
- RGB 31, 00, 31
-
- RGB 18, 06, 31
- RGB 00, 31, 31
- RGB 00, 31, 29
- RGB 00, 31, 27
-
- RGB 00, 31, 25
- RGB 00, 31, 22
- RGB 00, 31, 20
- RGB 00, 31, 18
-
- RGB 00, 31, 16
- RGB 00, 31, 14
- RGB 00, 31, 12
- RGB 00, 31, 10
-
- RGB 00, 31, 08
- RGB 00, 31, 05
- RGB 00, 31, 03
- RGB 00, 31, 01
-
- RGB 12, 31, 06
- RGB 00, 00, 31
- RGB 00, 01, 31
- RGB 00, 03, 31
-
- RGB 00, 05, 31
- RGB 00, 08, 31
- RGB 00, 10, 31
- RGB 00, 12, 31
-
- RGB 00, 14, 31
- RGB 00, 16, 31
- RGB 00, 18, 31
- RGB 00, 20, 31
-
- RGB 00, 22, 31
- RGB 00, 25, 31
- RGB 00, 27, 31
- RGB 00, 29, 31
-
- RGB 00, 00, 00
- RGB 06, 00, 04
- RGB 19, 02, 09
- RGB 28, 04, 11
-
- RGB 31, 07, 16
- RGB 31, 17, 23
- RGB 31, 26, 30
- RGB 07, 05, 10
-
- RGB 14, 10, 18
- RGB 20, 20, 25
- RGB 25, 27, 31
- RGB 09, 05, 06
-
- RGB 23, 16, 13
- RGB 30, 23, 22
- RGB 31, 28, 28
- RGB 31, 31, 31
-
- RGB 06, 31, 31
- RGB 04, 00, 04
- RGB 11, 02, 04
- RGB 17, 02, 04
-
- RGB 24, 05, 04
- RGB 28, 07, 04
- RGB 31, 11, 04
- RGB 02, 01, 15
-
- RGB 04, 11, 22
- RGB 12, 25, 25
- RGB 20, 31, 31
- RGB 09, 04, 03
-
- RGB 22, 11, 08
- RGB 27, 19, 16
- RGB 30, 28, 26
- RGB 31, 31, 31
-
- RGB 06, 18, 06
- RGB 04, 04, 02
- RGB 07, 07, 02
- RGB 18, 18, 04
-
- RGB 24, 24, 06
- RGB 27, 27, 11
- RGB 31, 31, 20
- RGB 02, 03, 10
-
- RGB 04, 05, 13
- RGB 06, 10, 25
- RGB 08, 15, 31
- RGB 04, 00, 06
-
- RGB 11, 07, 14
- RGB 21, 16, 23
- RGB 29, 26, 31
- RGB 31, 31, 31
-
- RGB 06, 00, 18
- RGB 00, 04, 03
- RGB 02, 09, 05
- RGB 11, 19, 07
-
- RGB 16, 24, 08
- RGB 22, 31, 09
- RGB 24, 31, 18
- RGB 03, 01, 03
-
- RGB 10, 04, 10
- RGB 20, 08, 20
- RGB 31, 17, 31
- RGB 01, 03, 06
-
- RGB 05, 09, 10
- RGB 15, 21, 21
- RGB 23, 25, 25
- RGB 31, 31, 31
-
- RGB 00, 18, 31
- RGB 00, 05, 07
- RGB 00, 08, 13
- RGB 00, 12, 17
-
- RGB 01, 20, 24
- RGB 04, 27, 31
- RGB 14, 31, 31
- RGB 04, 02, 02
-
- RGB 15, 01, 03
- RGB 26, 04, 07
- RGB 31, 13, 16
- RGB 00, 05, 02
-
- RGB 01, 11, 03
- RGB 06, 21, 06
- RGB 13, 31, 16
- RGB 31, 31, 31
-
- RGB 00, 06, 06
- RGB 00, 01, 08
- RGB 00, 05, 14
- RGB 00, 08, 19
-
- RGB 02, 14, 26
- RGB 04, 21, 31
- RGB 06, 26, 31
- RGB 13, 00, 00
-
- RGB 27, 07, 00
- RGB 31, 17, 05
- RGB 31, 25, 16
- RGB 02, 04, 00
-
- RGB 07, 11, 03
- RGB 17, 19, 05
- RGB 27, 31, 16
- RGB 31, 31, 31
-
- RGB 02, 00, 00
- RGB 04, 01, 06
- RGB 11, 03, 14
- RGB 16, 04, 19
-
- RGB 20, 07, 22
- RGB 26, 12, 27
- RGB 26, 20, 31
- RGB 04, 07, 00
-
- RGB 16, 20, 07
- RGB 24, 28, 15
- RGB 29, 31, 24
- RGB 05, 02, 02
-
- RGB 15, 04, 02
- RGB 24, 11, 10
- RGB 31, 22, 20
- RGB 31, 31, 31
-
- RGB 00, 00, 14
- RGB 12, 00, 00
- RGB 27, 05, 00
- RGB 31, 15, 05
-
- RGB 31, 26, 13
- RGB 31, 30, 21
- RGB 05, 07, 16
- RGB 04, 16, 20
-
- RGB 04, 24, 26
- RGB 08, 31, 31
- RGB 23, 31, 31
- RGB 00, 00, 00
-
- RGB 05, 05, 05
- RGB 17, 17, 15
- RGB 28, 28, 24
- RGB 31, 31, 31
-; 10ecb1
-
-UnusedTitleFG_OAM: ; 10ecb1
- db $18, $38, $00, $01, $18, $40, $02, $01, $18, $48, $04, $01, $18, $50, $06, $01
- db $18, $58, $08, $01, $18, $60, $0a, $01, $18, $68, $0c, $01, $18, $70, $0e, $01
-
- db $28, $38, $10, $00, $28, $40, $12, $00, $28, $48, $14, $00, $28, $50, $16, $00
- db $28, $58, $18, $00, $28, $60, $1a, $00, $28, $68, $1c, $00, $28, $70, $1e, $00
-
- db $38, $38, $20, $00, $38, $40, $22, $00, $38, $48, $24, $00, $38, $50, $26, $00
- db $38, $58, $28, $00, $38, $60, $2a, $00, $38, $68, $2c, $00, $38, $70, $2e, $00
-
- db $48, $38, $30, $02, $48, $40, $32, $02, $48, $48, $34, $02, $48, $50, $36, $02
- db $48, $58, $38, $02, $48, $60, $3a, $02, $48, $68, $3c, $02, $48, $70, $3e, $02
-
- db $58, $38, $40, $01, $58, $40, $42, $01, $58, $48, $44, $01, $58, $50, $46, $01
- db $58, $58, $48, $01, $58, $60, $4a, $01, $58, $68, $4c, $01, $58, $70, $4e, $01
-; 10ed51
-
-
-Function10ed51: ; 10ed51
- call _TitleScreen
-.loop
- call JoyTextDelay
- ld a, [hJoyLast]
- ld b, a
- and 1
- jr nz, .done
- call SuicuneFrameIterator
- call DelayFrame
- jr .loop
-.done
- ret
-; 10ed67
diff --git a/mobile/battle_tower_47.asm b/mobile/battle_tower_47.asm
new file mode 100755
index 000000000..d0ca6edd8
--- /dev/null
+++ b/mobile/battle_tower_47.asm
@@ -0,0 +1,784 @@
+BattleTowerText:: ; 11c000
+; Print text c for trainer [BT_OTTrainerClass]
+; 1: Intro text
+; 2: Player lost
+; 3: Player won
+ ld a, [rSVBK]
+ push af
+ ld a, 3 ; BANK(BT_OTTrainerClass)
+ ld [rSVBK], a
+IF DEF(CRYSTAL11)
+ ld hl, BT_OTTrainerClass
+ELSE
+ ld hl, BT_OTName + 5
+; BUG ALERT
+; Instead of loading the Trainer Class, this routine
+; loads the 6th character in the Trainer's name, then
+; uses it to get the gender of the trainer.
+; As a consequence, the enemy trainer's dialog will
+; always be sampled from the female array.
+ENDC
+ ld a, [hl]
+ dec a
+ ld e, a
+ ld d, 0
+ ld hl, BTTrainerClassGenders
+ add hl, de
+ ld a, [hl]
+ and a
+ jr nz, .female
+ ; generate a random number between 0 and 24
+ ld a, [hRandomAdd]
+ and $1f
+ cp 25
+ jr c, .okay0
+ sub 25
+
+.okay0
+ ld hl, BTMaleTrainerTexts
+ jr .proceed
+
+.female
+ ; generate a random number between 0 and 14
+ ld a, [hRandomAdd]
+ and $f
+ cp 15
+ jr c, .okay1
+ sub 15
+
+.okay1
+ ld hl, BTFemaleTrainerTexts
+
+.proceed
+ ld b, 0
+ dec c
+ jr nz, .restore
+ ld [BT_TrainerTextIndex], a
+ jr .okay2
+
+.restore
+ ld a, [BT_TrainerTextIndex]
+
+.okay2
+ push af
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld c, a
+ ld a, [hl]
+ ld h, a
+ ld l, c
+ pop af
+ ld c, a
+ ld b, 0
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld c, a
+ ld a, [hl]
+ ld l, c
+ ld h, a
+ bccoord 1, 14
+ pop af
+ ld [rSVBK], a
+ call PlaceHLTextAtBC
+ ret
+; 11c05d
+
+INCLUDE "mobile/fixed_words.asm"
+
+BTTrainerClassGenders: ; 11f2f0
+ db MALE ; FALKNER
+ db FEMALE ; WHITNEY
+ db FEMALE ; BUGSY
+ db MALE ; MORTY
+ db MALE ; PRYCE
+ db FEMALE ; JASMINE
+ db MALE ; CHUCK
+ db FEMALE ; CLAIR
+ db MALE ; RIVAL1
+ db MALE ; POKEMON_PROF
+ db FEMALE ; WILL
+ db MALE ; CAL
+ db MALE ; BRUNO
+ db FEMALE ; KAREN
+ db MALE ; KOGA
+ db MALE ; CHAMPION
+ db MALE ; BROCK
+ db FEMALE ; MISTY
+ db MALE ; LT_SURGE
+ db MALE ; SCIENTIST
+ db FEMALE ; ERIKA
+ db MALE ; YOUNGSTER
+ db MALE ; SCHOOLBOY
+ db MALE ; BIRD_KEEPER
+ db FEMALE ; LASS
+ db FEMALE ; JANINE
+ db MALE ; COOLTRAINERM
+ db FEMALE ; COOLTRAINERF
+ db FEMALE ; BEAUTY
+ db MALE ; POKEMANIAC
+ db MALE ; GRUNTM
+ db MALE ; GENTLEMAN
+ db FEMALE ; SKIER
+ db FEMALE ; TEACHER
+ db FEMALE ; SABRINA
+ db MALE ; BUG_CATCHER
+ db MALE ; FISHER
+ db MALE ; SWIMMERM
+ db FEMALE ; SWIMMERF
+ db MALE ; SAILOR
+ db MALE ; SUPER_NERD
+ db MALE ; RIVAL2
+ db MALE ; GUITARIST
+ db MALE ; HIKER
+ db MALE ; BIKER
+ db MALE ; BLAINE
+ db MALE ; BURGLAR
+ db MALE ; FIREBREATHER
+ db MALE ; JUGGLER
+ db MALE ; BLACKBELT_T
+ db MALE ; EXECUTIVEM
+ db MALE ; PSYCHIC_T
+ db FEMALE ; PICNICKER
+ db MALE ; CAMPER
+ db FEMALE ; EXECUTIVEF
+ db MALE ; SAGE
+ db FEMALE ; MEDIUM
+ db MALE ; BOARDER
+ db MALE ; POKEFANM
+ db FEMALE ; KIMONO_GIRL
+ db FEMALE ; TWINS
+ db FEMALE ; POKEFANF
+ db MALE ; RED
+ db MALE ; BLUE
+ db MALE ; OFFICER
+ db FEMALE ; GRUNTF
+
+
+BTMaleTrainerTexts: ; 11f332
+ dw .Greetings
+ dw .PlayerLost
+ dw .PlayerWon
+
+.Greetings: ; 11f338
+ dw BTGreetingM1
+ dw BTGreetingM2
+ dw BTGreetingM3
+ dw BTGreetingM4
+ dw BTGreetingM5
+ dw BTGreetingM6
+ dw BTGreetingM7
+ dw BTGreetingM8
+ dw BTGreetingM9
+ dw BTGreetingM10
+ dw BTGreetingM11
+ dw BTGreetingM12
+ dw BTGreetingM13
+ dw BTGreetingM14
+ dw BTGreetingM15
+ dw BTGreetingM16
+ dw BTGreetingM17
+ dw BTGreetingM18
+ dw BTGreetingM19
+ dw BTGreetingM20
+ dw BTGreetingM21
+ dw BTGreetingM22
+ dw BTGreetingM23
+ dw BTGreetingM24
+ dw BTGreetingM25
+
+.PlayerLost: ; 11f36a
+ dw BTLossM1
+ dw BTLossM2
+ dw BTLossM3
+ dw BTLossM4
+ dw BTLossM5
+ dw BTLossM6
+ dw BTLossM7
+ dw BTLossM8
+ dw BTLossM9
+ dw BTLossM10
+ dw BTLossM11
+ dw BTLossM12
+ dw BTLossM13
+ dw BTLossM14
+ dw BTLossM15
+ dw BTLossM16
+ dw BTLossM17
+ dw BTLossM18
+ dw BTLossM19
+ dw BTLossM20
+ dw BTLossM21
+ dw BTLossM22
+ dw BTLossM23
+ dw BTLossM24
+ dw BTLossM25
+
+.PlayerWon: ; 11f39c
+ dw BTWinM1
+ dw BTWinM2
+ dw BTWinM3
+ dw BTWinM4
+ dw BTWinM5
+ dw BTWinM6
+ dw BTWinM7
+ dw BTWinM8
+ dw BTWinM9
+ dw BTWinM10
+ dw BTWinM11
+ dw BTWinM12
+ dw BTWinM13
+ dw BTWinM14
+ dw BTWinM15
+ dw BTWinM16
+ dw BTWinM17
+ dw BTWinM18
+ dw BTWinM19
+ dw BTWinM20
+ dw BTWinM21
+ dw BTWinM22
+ dw BTWinM23
+ dw BTWinM24
+ dw BTWinM25
+
+
+BTFemaleTrainerTexts:
+ dw .Greetings
+ dw .PlayerLost
+ dw .PlayerWon
+
+.Greetings: ; 11f3d4
+ dw BTGreetingF1
+ dw BTGreetingF2
+ dw BTGreetingF3
+ dw BTGreetingF4
+ dw BTGreetingF5
+ dw BTGreetingF6
+ dw BTGreetingF7
+ dw BTGreetingF8
+ dw BTGreetingF9
+ dw BTGreetingF10
+ dw BTGreetingF11
+ dw BTGreetingF12
+ dw BTGreetingF13
+ dw BTGreetingF14
+ dw BTGreetingF15
+
+.PlayerLost: ; 11f3f2
+ dw BTLossF1
+ dw BTLossF2
+ dw BTLossF3
+ dw BTLossF4
+ dw BTLossF5
+ dw BTLossF6
+ dw BTLossF7
+ dw BTLossF8
+ dw BTLossF9
+ dw BTLossF10
+ dw BTLossF11
+ dw BTLossF12
+ dw BTLossF13
+ dw BTLossF14
+ dw BTLossF15
+
+.PlayerWon: ; 11f410
+ dw BTWinF1
+ dw BTWinF2
+ dw BTWinF3
+ dw BTWinF4
+ dw BTWinF5
+ dw BTWinF6
+ dw BTWinF7
+ dw BTWinF8
+ dw BTWinF9
+ dw BTWinF10
+ dw BTWinF11
+ dw BTWinF12
+ dw BTWinF13
+ dw BTWinF14
+ dw BTWinF15
+
+
+BTGreetingM1: ; 0x11f42e
+ text_jump BattleTowerText_0x1ec000
+ db "@"
+
+BTLossM1: ; 0x11f433
+ text_jump BattleTowerText_0x1ec03b
+ db "@"
+
+BTWinM1: ; 0x11f438
+ text_jump UnknownText_0x1ec060
+ db "@"
+
+BTGreetingM2: ; 0x11f43d
+ text_jump BattleTowerText_0x1ec080
+ db "@"
+
+BTLossM2: ; 0x11f442
+ text_jump UnknownText_0x1ec0a3
+ db "@"
+
+BTWinM2: ; 0x11f447
+ text_jump UnknownText_0x1ec0c4
+ db "@"
+
+BTGreetingM3: ; 0x11f44c
+ text_jump UnknownText_0x1ec0e1
+ db "@"
+
+BTLossM3: ; 0x11f451
+ text_jump UnknownText_0x1ec108
+ db "@"
+
+BTWinM3: ; 0x11f456
+ text_jump UnknownText_0x1ec12a
+ db "@"
+
+BTGreetingM4: ; 0x11f45b
+ text_jump UnknownText_0x1ec14d
+ db "@"
+
+BTLossM4: ; 0x11f460
+ text_jump UnknownText_0x1ec16f
+ db "@"
+
+BTWinM4: ; 0x11f465
+ text_jump UnknownText_0x1ec190
+ db "@"
+
+BTGreetingM5: ; 0x11f46a
+ text_jump UnknownText_0x1ec1ae
+ db "@"
+
+BTLossM5: ; 0x11f46f
+ text_jump UnknownText_0x1ec1d0
+ db "@"
+
+BTWinM5: ; 0x11f474
+ text_jump UnknownText_0x1ec1f4
+ db "@"
+
+BTGreetingM6: ; 0x11f479
+ text_jump UnknownText_0x1ec216
+ db "@"
+
+BTLossM6: ; 0x11f47e
+ text_jump UnknownText_0x1ec238
+ db "@"
+
+BTWinM6: ; 0x11f483
+ text_jump UnknownText_0x1ec259
+ db "@"
+
+BTGreetingM7: ; 0x11f488
+ text_jump UnknownText_0x1ec27b
+ db "@"
+
+BTLossM7: ; 0x11f48d
+ text_jump UnknownText_0x1ec2a0
+ db "@"
+
+BTWinM7: ; 0x11f492
+ text_jump UnknownText_0x1ec2c0
+ db "@"
+
+BTGreetingM8: ; 0x11f497
+ text_jump UnknownText_0x1ec2d9
+ db "@"
+
+BTLossM8: ; 0x11f49c
+ text_jump UnknownText_0x1ec2fe
+ db "@"
+
+BTWinM8: ; 0x11f4a1
+ text_jump UnknownText_0x1ec320
+ db "@"
+
+BTGreetingM9: ; 0x11f4a6
+ text_jump UnknownText_0x1ec33f
+ db "@"
+
+BTLossM9: ; 0x11f4ab
+ text_jump UnknownText_0x1ec36c
+ db "@"
+
+BTWinM9: ; 0x11f4b0
+ text_jump UnknownText_0x1ec389
+ db "@"
+
+BTGreetingM10: ; 0x11f4b5
+ text_jump UnknownText_0x1ec3ad
+ db "@"
+
+BTLossM10: ; 0x11f4ba
+ text_jump UnknownText_0x1ec3c5
+ db "@"
+
+BTWinM10: ; 0x11f4bf
+ text_jump UnknownText_0x1ec3e5
+ db "@"
+
+BTGreetingM11: ; 0x11f4c4
+ text_jump UnknownText_0x1ec402
+ db "@"
+
+BTLossM11: ; 0x11f4c9
+ text_jump UnknownText_0x1ec411
+ db "@"
+
+BTWinM11: ; 0x11f4ce
+ text_jump UnknownText_0x1ec41f
+ db "@"
+
+BTGreetingM12: ; 0x11f4d3
+ text_jump UnknownText_0x1ec42e
+ db "@"
+
+BTLossM12: ; 0x11f4d8
+ text_jump UnknownText_0x1ec461
+ db "@"
+
+BTWinM12: ; 0x11f4dd
+ text_jump UnknownText_0x1ec4a0
+ db "@"
+
+BTGreetingM13: ; 0x11f4e2
+ text_jump UnknownText_0x1ec4d6
+ db "@"
+
+BTLossM13: ; 0x11f4e7
+ text_jump UnknownText_0x1ec4f5
+ db "@"
+
+BTWinM13: ; 0x11f4ec
+ text_jump UnknownText_0x1ec512
+ db "@"
+
+BTGreetingM14: ; 0x11f4f1
+ text_jump UnknownText_0x1ec532
+ db "@"
+
+BTLossM14: ; 0x11f4f6
+ text_jump UnknownText_0x1ec54b
+ db "@"
+
+BTWinM14: ; 0x11f4fb
+ text_jump UnknownText_0x1ec565
+ db "@"
+
+BTGreetingM15: ; 0x11f500
+ text_jump UnknownText_0x1ec580
+ db "@"
+
+BTLossM15: ; 0x11f505
+ text_jump UnknownText_0x1ec59d
+ db "@"
+
+BTWinM15: ; 0x11f50a
+ text_jump UnknownText_0x1ec5b5
+ db "@"
+
+BTGreetingM16: ; 0x11f50f
+ text_jump UnknownText_0x1ec5d3
+ db "@"
+
+BTLossM16: ; 0x11f514
+ text_jump UnknownText_0x1ec5ee
+ db "@"
+
+BTWinM16: ; 0x11f519
+ text_jump UnknownText_0x1ec60d
+ db "@"
+
+BTGreetingM17: ; 0x11f51e
+ text_jump UnknownText_0x1ec631
+ db "@"
+
+BTLossM17: ; 0x11f523
+ text_jump UnknownText_0x1ec651
+ db "@"
+
+BTWinM17: ; 0x11f528
+ text_jump UnknownText_0x1ec68f
+ db "@"
+
+BTGreetingM18: ; 0x11f52d
+ text_jump UnknownText_0x1ec6b1
+ db "@"
+
+BTLossM18: ; 0x11f532
+ text_jump UnknownText_0x1ec6d0
+ db "@"
+
+BTWinM18: ; 0x11f537
+ text_jump UnknownText_0x1ec708
+ db "@"
+
+BTGreetingM19: ; 0x11f53c
+ text_jump UnknownText_0x1ec720
+ db "@"
+
+BTLossM19: ; 0x11f541
+ text_jump UnknownText_0x1ec73e
+ db "@"
+
+BTWinM19: ; 0x11f546
+ text_jump UnknownText_0x1ec75b
+ db "@"
+
+BTGreetingM20: ; 0x11f54b
+ text_jump UnknownText_0x1ec77f
+ db "@"
+
+BTLossM20: ; 0x11f550
+ text_jump UnknownText_0x1ec798
+ db "@"
+
+BTWinM20: ; 0x11f555
+ text_jump UnknownText_0x1ec7bb
+ db "@"
+
+BTGreetingM21: ; 0x11f55a
+ text_jump UnknownText_0x1ec7d8
+ db "@"
+
+BTLossM21: ; 0x11f55f
+ text_jump UnknownText_0x1ec818
+ db "@"
+
+BTWinM21: ; 0x11f564
+ text_jump UnknownText_0x1ec837
+ db "@"
+
+BTGreetingM22: ; 0x11f569
+ text_jump UnknownText_0x1ec858
+ db "@"
+
+BTLossM22: ; 0x11f56e
+ text_jump UnknownText_0x1ec876
+ db "@"
+
+BTWinM22: ; 0x11f573
+ text_jump UnknownText_0x1ec898
+ db "@"
+
+BTGreetingM23: ; 0x11f578
+ text_jump UnknownText_0x1ec8b1
+ db "@"
+
+BTLossM23: ; 0x11f57d
+ text_jump UnknownText_0x1ec8d5
+ db "@"
+
+BTWinM23: ; 0x11f582
+ text_jump UnknownText_0x1ec8f0
+ db "@"
+
+BTGreetingM24: ; 0x11f587
+ text_jump UnknownText_0x1ec911
+ db "@"
+
+BTLossM24: ; 0x11f58c
+ text_jump UnknownText_0x1ec928
+ db "@"
+
+BTWinM24: ; 0x11f591
+ text_jump UnknownText_0x1ec949
+ db "@"
+
+BTGreetingM25: ; 0x11f596
+ text_jump UnknownText_0x1ec969
+ db "@"
+
+BTLossM25: ; 0x11f59b
+ text_jump UnknownText_0x1ec986
+ db "@"
+
+BTWinM25: ; 0x11f5a0
+ text_jump UnknownText_0x1ec99b
+ db "@"
+
+
+
+
+BTGreetingF1: ; 0x11f5a5
+ text_jump UnknownText_0x1ec9bd
+ db "@"
+
+BTLossF1: ; 0x11f5aa
+ text_jump UnknownText_0x1ec9d9
+ db "@"
+
+BTWinF1: ; 0x11f5af
+ text_jump UnknownText_0x1ec9f7
+ db "@"
+
+BTGreetingF2: ; 0x11f5b4
+ text_jump UnknownText_0x1eca0a
+ db "@"
+
+BTLossF2: ; 0x11f5b9
+ text_jump UnknownText_0x1eca2a
+ db "@"
+
+BTWinF2: ; 0x11f5be
+ text_jump UnknownText_0x1eca47
+ db "@"
+
+BTGreetingF3: ; 0x11f5c3
+ text_jump UnknownText_0x1eca64
+ db "@"
+
+BTLossF3: ; 0x11f5c8
+ text_jump UnknownText_0x1eca82
+ db "@"
+
+BTWinF3: ; 0x11f5cd
+ text_jump UnknownText_0x1eca9d
+ db "@"
+
+BTGreetingF4: ; 0x11f5d2
+ text_jump UnknownText_0x1ecabf
+ db "@"
+
+BTLossF4: ; 0x11f5d7
+ text_jump UnknownText_0x1ecade
+ db "@"
+
+BTWinF4: ; 0x11f5dc
+ text_jump UnknownText_0x1ecafa
+ db "@"
+
+BTGreetingF5: ; 0x11f5e1
+ text_jump UnknownText_0x1ecb19
+ db "@"
+
+BTLossF5: ; 0x11f5e6
+ text_jump UnknownText_0x1ecb37
+ db "@"
+
+BTWinF5: ; 0x11f5eb
+ text_jump UnknownText_0x1ecb55
+ db "@"
+
+BTGreetingF6: ; 0x11f5f0
+ text_jump UnknownText_0x1ecb70
+ db "@"
+
+BTLossF6: ; 0x11f5f5
+ text_jump UnknownText_0x1ecb92
+ db "@"
+
+BTWinF6: ; 0x11f5fa
+ text_jump UnknownText_0x1ecbb6
+ db "@"
+
+BTGreetingF7: ; 0x11f5ff
+ text_jump UnknownText_0x1ecbd9
+ db "@"
+
+BTLossF7: ; 0x11f604
+ text_jump UnknownText_0x1ecbf3
+ db "@"
+
+BTWinF7: ; 0x11f609
+ text_jump UnknownText_0x1ecc15
+ db "@"
+
+BTGreetingF8: ; 0x11f60e
+ text_jump UnknownText_0x1ecc39
+ db "@"
+
+BTLossF8: ; 0x11f613
+ text_jump UnknownText_0x1ecc55
+ db "@"
+
+BTWinF8: ; 0x11f618
+ text_jump UnknownText_0x1ecc75
+ db "@"
+
+BTGreetingF9: ; 0x11f61d
+ text_jump UnknownText_0x1ecc92
+ db "@"
+
+BTLossF9: ; 0x11f622
+ text_jump UnknownText_0x1ecca7
+ db "@"
+
+BTWinF9: ; 0x11f627
+ text_jump UnknownText_0x1eccc1
+ db "@"
+
+BTGreetingF10: ; 0x11f62c
+ text_jump UnknownText_0x1eccd7
+ db "@"
+
+BTLossF10: ; 0x11f631
+ text_jump UnknownText_0x1eccef
+ db "@"
+
+BTWinF10: ; 0x11f636
+ text_jump UnknownText_0x1ecd0e
+ db "@"
+
+BTGreetingF11: ; 0x11f63b
+ text_jump UnknownText_0x1ecd2b
+ db "@"
+
+BTLossF11: ; 0x11f640
+ text_jump UnknownText_0x1ecd4d
+ db "@"
+
+BTWinF11: ; 0x11f645
+ text_jump UnknownText_0x1ecd6b
+ db "@"
+
+BTGreetingF12: ; 0x11f64a
+ text_jump UnknownText_0x1ecd8d
+ db "@"
+
+BTLossF12: ; 0x11f64f
+ text_jump UnknownText_0x1ecdaf
+ db "@"
+
+BTWinF12: ; 0x11f654
+ text_jump UnknownText_0x1ecdcf
+ db "@"
+
+BTGreetingF13: ; 0x11f659
+ text_jump UnknownText_0x1ecded
+ db "@"
+
+BTLossF13: ; 0x11f65e
+ text_jump UnknownText_0x1ece0d
+ db "@"
+
+BTWinF13: ; 0x11f663
+ text_jump UnknownText_0x1ece2a
+ db "@"
+
+BTGreetingF14: ; 0x11f668
+ text_jump UnknownText_0x1ece4b
+ db "@"
+
+BTLossF14: ; 0x11f66d
+ text_jump UnknownText_0x1ece70
+ db "@"
+
+BTWinF14: ; 0x11f672
+ text_jump UnknownText_0x1ece8a
+ db "@"
+
+BTGreetingF15: ; 0x11f677
+ text_jump UnknownText_0x1ecea8
+ db "@"
+
+BTLossF15: ; 0x11f67c
+ text_jump UnknownText_0x1ecec9
+ db "@"
+
+BTWinF15: ; 0x11f681
+ text_jump UnknownText_0x1ecee8
+ db "@"
diff --git a/mobile/battle_tower_5c.asm b/mobile/battle_tower_5c.asm
new file mode 100755
index 000000000..da1691038
--- /dev/null
+++ b/mobile/battle_tower_5c.asm
@@ -0,0 +1,1772 @@
+BattleTowerRoomMenu: ; 1700b0
+; special
+ call InitBattleTowerChallengeRAM
+ farcall _BattleTowerRoomMenu
+ ret
+; 1700ba
+
+Function1700ba: ; 1700ba
+ call InitBattleTowerChallengeRAM
+ farcall Function11811a
+ ret
+; 1700c4
+
+Function1700c4: ; 1700c4
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+
+ call Function17042c
+
+ ld a, $5
+ call GetSRAMBank
+ ld a, $1
+ ld [$be45], a
+ xor a
+ ld [$be46], a
+ ld hl, w3_dffc
+ ld de, $aa41
+ ld bc, 4
+ call CopyBytes
+ ld hl, w3_d202Name
+ ld de, $aa8e
+ ld bc, 7 * $cc ; length of battle tower struct from japanese games?
+ call CopyBytes
+ ld hl, $aa5d ; some sort of count
+ ld a, [hl]
+ inc [hl]
+ inc hl
+ sla a
+ sla a
+ ld e, a
+ ld d, $0
+ add hl, de
+ ld e, l
+ ld d, h
+ ld hl, w3_dffc
+ ld bc, 4
+ call CopyBytes
+ call CloseSRAM
+ pop af
+ ld [rSVBK], a
+ ret
+; 170114
+
+Function170114: ; 170114
+ call InitBattleTowerChallengeRAM
+ call .Function170121
+ farcall Function11805f
+ ret
+; 170121
+
+.Function170121: ; 170121
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $a948
+ ld de, wMisc
+ ld bc, $f6 ; 246
+ call CopyBytes
+ call CloseSRAM
+ call Function170c8b
+ ret
+; 170139
+
+Function170139: ; 170139
+; Convert the 4-digit decimal number at 5:aa41 into binary
+ ld a, $5
+ call GetSRAMBank
+ ld de, $aa41
+ ld h, $0
+ ld l, h
+ ld bc, 1000
+ call .DecToBin
+ ld bc, 100
+ call .DecToBin
+ ld bc, 10
+ call .DecToBin
+ ld a, [de]
+ ld c, a
+ ld b, $0
+ add hl, bc
+ call CloseSRAM
+; Store that number in wMisc
+ ld a, h
+ ld [wMisc], a
+ ld a, l
+ ld [wMisc + 1], a
+ ld hl, wBT_OTTempPkmn1DVs
+ ld a, [PlayerID]
+ ld [hli], a
+ ld a, [PlayerID + 1]
+ ld [hli], a
+ ld a, [wSecretID]
+ ld [hli], a
+ ld a, [wSecretID + 1]
+ ld [hli], a
+ ld e, l
+ ld d, h
+ ld hl, PlayerName
+ ld bc, NAME_LENGTH_JAPANESE - 1
+ call CopyBytes
+ ld bc, PlayerID
+ ld de, PlayerGender
+ farcall GetMobileOTTrainerClass
+ ld de, wBT_OTTempPkmn1CaughtGender
+ ld a, c
+ ld [de], a
+ inc de
+ ld a, PartyMons % $100
+ ld [wcd49], a
+ ld a, PartyMons / $100
+ ld [wcd4a], a
+ ld a, PartyMonNicknames % $100
+ ld [wcd4b], a
+ ld a, PartyMonNicknames / $100
+ ld [wcd4c], a
+ ld a, 3
+.CopyLoop:
+ push af
+ ld a, [wcd49]
+ ld l, a
+ ld a, [wcd4a]
+ ld h, a
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call CopyBytes
+ ld a, l
+ ld [wcd49], a
+ ld a, h
+ ld [wcd4a], a
+ ld a, [wcd4b]
+ ld l, a
+ ld a, [wcd4c]
+ ld h, a
+ ld bc, $0006
+ call CopyBytes
+ ld a, l
+ ld [wcd4b], a
+ ld a, h
+ ld [wcd4c], a
+ pop af
+ dec a
+ jr nz, .CopyLoop
+ ld a, $4
+ call GetSRAMBank
+ ld hl, $a013
+ ld bc, $24
+ call CopyBytes
+ call CloseSRAM
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $a894
+ ld bc, NAME_LENGTH_JAPANESE
+ call CopyBytes
+ ld hl, wMisc
+ ld de, $a948
+ ld bc, $f6
+ call CopyBytes
+ call CloseSRAM
+ ret
+; 17020c
+
+.DecToBin: ; 17020c
+ ld a, [de]
+ inc de
+ and a
+ ret z
+
+.digit_loop
+ add hl, bc
+ dec a
+ jr nz, .digit_loop
+ ret
+; 170215
+
+BattleTowerBattle: ; 170215
+ xor a
+ ld [wBattleTowerBattleEnded], a
+ call _BattleTowerBattle
+ ret
+; 17021d
+
+EmptySpecial_17021d: ; 17021d
+ ret
+; 17021e
+
+InitBattleTowerChallengeRAM: ; 17021e
+ xor a
+ ld [wBattleTowerBattleEnded], a
+ ld [wNrOfBeatenBattleTowerTrainers], a
+ ld [wcf65], a
+ ld [wcf66], a
+ ret
+; 17022c
+
+_BattleTowerBattle: ; 17022c
+.loop
+ call .do_dw
+ call DelayFrame
+ ld a, [wBattleTowerBattleEnded]
+ cp $1
+ jr nz, .loop
+ ret
+; 17023a
+
+.do_dw ; 17023a
+ ld a, [wBattleTowerBattleEnded]
+ ld e, a
+ ld d, 0
+ ld hl, .dw
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+; 170249
+
+.dw ; 170249
+ dw RunBattleTowerTrainer
+ dw SkipBattleTowerTrainer
+; 17024d
+
+RunBattleTowerTrainer: ; 17024d
+ ld a, [Options]
+ push af
+ ld hl, Options
+ set BATTLE_SHIFT, [hl] ; SET MODE
+
+ ld a, [InBattleTowerBattle]
+ push af
+ or $1
+ ld [InBattleTowerBattle], a
+
+ xor a
+ ld [wLinkMode], a
+ farcall TrainerRankings_Healings
+ farcall HealParty
+ call ReadBTTrainerParty
+ call Clears5_a89a
+
+ predef StartBattle
+
+ farcall LoadPokemonData
+ farcall HealParty
+ ld a, [wBattleResult]
+ ld [ScriptVar], a
+ and a
+ jr nz, .lost
+ ld a, BANK(sNrOfBeatenBattleTowerTrainers)
+ call GetSRAMBank
+ ld a, [sNrOfBeatenBattleTowerTrainers]
+ ld [wNrOfBeatenBattleTowerTrainers], a
+ call CloseSRAM
+ ld hl, StringBuffer3
+ ld a, [wNrOfBeatenBattleTowerTrainers]
+ add "1"
+ ld [hli], a
+ ld a, "@"
+ ld [hl], a
+
+.lost
+ pop af
+ ld [InBattleTowerBattle], a
+ pop af
+ ld [Options], a
+ ld a, $1
+ ld [wBattleTowerBattleEnded], a
+ ret
+
+
+ReadBTTrainerParty: ; 1702b7
+; Initialise the BattleTower-Trainer and his Pkmn
+ call CopyBTTrainer_FromBT_OT_TowBT_OTTemp
+
+; Check the nicknames for illegal characters, and replace bad nicknames
+; with their species names.
+ ld de, wBT_OTTempPkmn1Name ; $c643
+ ld c, PKMN_NAME_LENGTH
+ farcall CheckStringForErrors
+ jr nc, .skip_mon_1
+
+ ld a, [wBT_OTTempPkmn1]
+ ld [wNamedObjectIndexBuffer], a
+ call GetPokemonName
+ ld l, e
+ ld h, d
+ ld de, wBT_OTTempPkmn1Name ; $c643
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+
+.skip_mon_1
+ ld de, wBT_OTTempPkmn2Name ; $c67e
+ ld c, PKMN_NAME_LENGTH
+ farcall CheckStringForErrors
+ jr nc, .skip_mon_2
+ ld a, [wBT_OTTempPkmn2] ; [$c64e]
+ ld [wNamedObjectIndexBuffer], a
+ call GetPokemonName
+ ld l, e
+ ld h, d
+ ld de, wBT_OTTempPkmn2Name ; $c67e
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+
+.skip_mon_2
+ ld de, wBT_OTTempPkmn3Name ; $c686 + 51 = $c6b9
+ ld c, PKMN_NAME_LENGTH
+ farcall CheckStringForErrors
+ jr nc, .skip_mon_3
+ ld a, [wBT_OTTempPkmn3] ; [$c689]
+ ld [wNamedObjectIndexBuffer], a
+ call GetPokemonName
+ ld l, e
+ ld h, d
+ ld de, wBT_OTTempPkmn3Name ; $c686 + 51 = $c6b9
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+
+.skip_mon_3
+; Add the terminator character to each of these names
+ ld a, "@"
+ ld [wBT_OTTempPkmn1NameEnd - 1], a ; $c64d
+ ld [wBT_OTTempPkmn2NameEnd - 1], a ; $c688
+ ld [wBT_OTTempPkmn3NameEnd - 1], a ; $c68a + 57 = $c6c3
+; Fix errors in the movesets
+ call CheckBTMonMovesForErrors
+; Repair the trainer name if needed, then copy it to OTPlayerName
+ ld de, wBT_OTTempName
+ ld c, NAME_LENGTH - 1
+ farcall CheckStringForErrors
+ jr nc, .trainer_name_okay
+ ld hl, BT_ChrisName
+ jr .done_trainer_name
+
+.trainer_name_okay
+ ld hl, wBT_OTTempName ; 0xc608
+
+.done_trainer_name
+ ld de, OTPlayerName
+ ld bc, NAME_LENGTH - 1
+ call CopyBytes
+ ld a, "@"
+ ld [de], a
+
+ ld hl, wBT_OTTempTrainerClass
+ ld a, [hli]
+ ld [OtherTrainerClass], a
+ ld a, OTPartyMonNicknames % $100
+ ld [BGMapBuffer], a
+ ld a, OTPartyMonNicknames / $100
+ ld [BGMapBuffer + 1], a
+
+ ; Copy Pkmn into Memory from the address in hl
+ ld de, OTPartyMon1Species
+ ld bc, OTPartyCount
+ ld a, BATTLETOWER_NROFPKMNS ; Number of Pkmn the BattleTower-Trainer has
+ ld [bc], a
+ inc bc
+.otpartymon_loop
+ push af
+ ld a, [hl]
+ ld [bc], a
+ inc bc
+ push bc
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call CopyBytes
+ push de
+ ld a, [BGMapBuffer]
+ ld e, a
+ ld a, [BGMapBuffer + 1]
+ ld d, a
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+ ld a, e
+ ld [BGMapBuffer], a
+ ld a, d
+ ld [BGMapBuffer + 1], a
+ pop de
+ pop bc
+ pop af
+ dec a
+ and a
+ jr nz, .otpartymon_loop
+ ld a, -1
+ ld [bc], a
+ ret
+; 170394
+
+ValidateBTParty: ; 170394
+; Check for and fix errors in party data
+ ld hl, wBT_OTTempPkmn1Species
+ ld d, BATTLETOWER_NROFPKMNS
+.pkmn_loop
+ push de
+ push hl
+ ld b, h
+ ld c, l
+ ld a, [hl]
+ and a
+idx = $ff
+rept ($ff +- NUM_POKEMON)
+ jr z, .invalid
+ cp idx
+idx = idx +- 1
+endr
+ jr nz, .valid
+
+.invalid
+ ld a, SMEARGLE
+ ld [hl], a
+
+.valid
+ ld [CurSpecies], a
+ call GetBaseData
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$b2fb] ; s5_b2fb ; max level?
+ call CloseSRAM
+ ld e, a
+ ld hl, MON_LEVEL
+ add hl, bc
+ ld a, [hl]
+ cp MIN_LEVEL
+ ld a, MIN_LEVEL
+ jr c, .load
+ ld a, [hl]
+ cp e
+ jr c, .dont_load
+ ld a, e
+
+.load
+ ld [hl], a
+
+.dont_load
+ ld [CurPartyLevel], a
+ ld hl, MON_MOVES
+ add hl, bc
+ ld d, NUM_MOVES - 1
+ ld a, [hli]
+ and a
+ jr z, .not_move
+ cp NUM_ATTACKS + 1
+ jr nc, .not_move
+ jr .valid_move
+
+.not_move
+ dec hl
+ ld a, POUND
+ ld [hli], a
+ xor a
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+ jr .done_moves
+
+.valid_move
+ ld a, [hl]
+ cp NUM_ATTACKS + 1
+ jr c, .next
+ ld [hl], $0
+
+.next
+ inc hl
+ dec d
+ jr nz, .valid_move
+
+.done_moves
+ ld hl, MON_MAXHP
+ add hl, bc
+ ld d, h
+ ld e, l
+ push hl
+ push de
+ ld hl, MON_STAT_EXP - 1
+ add hl, bc
+ ld b, $1
+ predef CalcPkmnStats
+ pop de
+ pop hl
+ dec de
+ dec de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hl]
+ ld [de], a
+ pop hl
+ ld bc, PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH
+ add hl, bc
+ pop de
+ dec d
+ jp nz, .pkmn_loop
+ ret
+; 170426
+
+BT_ChrisName: ; 170426
+ db "CHRIS@"
+; 17042c
+
+Function17042c: ; 17042c
+ ld hl, w3_d202TrainerData
+ ld a, BATTLETOWER_NROFTRAINERS
+.loop
+ push af
+ push hl
+ ld c, BATTLETOWER_TRAINERDATALENGTH / 2
+.loop2
+ ; First byte is a comparison value.
+ ld a, [hli]
+ ld b, a
+ ; Second byte is a lookup index.
+ ld a, [hli]
+ and a
+ jr z, .empty
+ cp 15
+ jr nc, .copy_data
+
+ push hl
+ ld hl, Unknown_170470
+ dec a
+ ld e, a
+ ld d, 0
+ add hl, de
+ ld a, [hl]
+ pop hl
+
+ ; If Unknown_170470[a-1] <= b, overwrite the current trainer's data
+ ; with Unknown17047e, and exit the inner loop.
+ cp b
+ jr c, .copy_data
+ jr z, .copy_data
+ jr .next_iteration
+
+.empty
+ ; If a == 0 and b >= $fc, overwrite the current trainer's data with
+ ; Unknown17047e, and exit the inner loop.
+ ld a, b
+ cp $fc
+ jr nc, .copy_data
+
+.next_iteration
+ dec c
+ jr nz, .loop2
+ jr .next_trainer
+
+.copy_data
+ pop de
+ push de
+ ld hl, Unknown_17047e
+ ld bc, BATTLETOWER_TRAINERDATALENGTH
+ call CopyBytes
+
+.next_trainer
+ pop hl
+ ld de, BATTLE_TOWER_STRUCT_LENGTH
+ add hl, de
+ pop af
+ dec a
+ jr nz, .loop
+ ret
+; 170470
+
+Unknown_170470:
+ db $12
+ db $24
+ db $45
+ db $45
+ db $42
+ db $42
+ db $45
+ db $42
+ db $27
+ db $27
+ db $45
+ db $27
+ db $42
+ db $24
+
+Unknown_17047e:
+; see data/battle_tower_2.asm
+ db $03, 4
+ db $05, 8
+ db $03, 5
+ db $0e, 6
+ db $03, 2
+ db $00, 0
+ db $39, 7
+ db $07, 4
+ db $00, 5
+ db $04, 7
+ db $01, 5
+ db $00, 0
+ db $0f, 5
+ db $14, 7
+ db $05, 5
+ db $11, 12
+ db $0c, 6
+ db $06, 4
+
+
+CopyBTTrainer_FromBT_OT_TowBT_OTTemp: ; 1704a2
+; copy the BattleTower-Trainer data that lies at 'BT_OTTrainer' to 'wBT_OTTemp'
+ ld a, [rSVBK]
+ push af
+ ld a, BANK(BT_OTTrainer)
+ ld [rSVBK], a
+
+ ld hl, BT_OTTrainer
+ ld de, wBT_OTTemp
+ ld bc, BATTLE_TOWER_STRUCT_LENGTH
+ call CopyBytes
+
+ pop af
+ ld [rSVBK], a
+
+ ld a, BANK(sBattleTowerChallengeState)
+ call GetSRAMBank
+ ld a, BATTLETOWER_CHALLENGE_IN_PROGESS
+ ld [sBattleTowerChallengeState], a
+ ld hl, sNrOfBeatenBattleTowerTrainers
+ inc [hl]
+ call CloseSRAM
+SkipBattleTowerTrainer: ; 1704c9
+ ret
+; 1704ca
+
+Function1704ca: ; 1704ca
+; unreferenced mobile function
+ ld a, [$be46]
+ cp $7
+ jr c, .asm_1704d3
+ ld a, $6
+
+.asm_1704d3
+ ld hl, $afce
+ ld de, -$e0
+.asm_1704d9
+ and a
+ jr z, .asm_1704e0
+ add hl, de
+ dec a
+ jr .asm_1704d9
+
+.asm_1704e0
+ ret
+; 1704e1
+
+Function1704e1: ; 1704e1
+; unreferenced special
+ call SpeechTextBox
+ call FadeToMenu
+ call InitBattleTowerChallengeRAM
+ call .JumptableLoop
+ call CloseSubmenu
+ ret
+; 1704f1
+
+.JumptableLoop: ; 1704f1
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearScreen
+.loop
+ call JoyTextDelay
+ ld a, [wJumptableIndex]
+ bit 7, a
+ jr nz, .done
+ call .DoJumptable
+ farcall ReloadMapPart
+ jr .loop
+
+.done
+ ret
+; 170510
+
+.DoJumptable: ; 170510
+ ld a, [wJumptableIndex]
+ ld e, a
+ ld d, 0
+ ld hl, .dw
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+; 17051f
+
+.dw ; 17051f
+ dw .Jumptable_0
+ dw .Jumptable_1
+ dw .Jumptable_2
+; 170525
+
+.Jumptable_0: ; 170525
+ ld a, $5
+ call GetSRAMBank
+
+ ld hl, $a89c
+ ld de, StringBuffer3
+ ld bc, $16
+ call CopyBytes
+
+ ld hl, $a8b2
+ ld de, wMisc
+ ld bc, $0096
+ call CopyBytes
+
+ call CloseSRAM
+ hlcoord 1, 1
+ ld de, StringBuffer3
+ call PlaceString
+ hlcoord 1, 3
+ ld de, .String_Mail
+ call PlaceString
+ hlcoord 4, 3
+ ld de, StringBuffer4
+ call PlaceString
+ hlcoord 8, 3
+ ld de, .String_PastReaders
+ call PlaceString
+ call .DrawBorder
+ call .PlaceTextItems
+ jr .NextJumptableFunction
+
+
+.Jumptable_1:
+ call SetPalettes
+ call .NextJumptableFunction
+
+
+.Jumptable_2:
+ ld hl, hJoyPressed
+ ld a, [hl]
+ and A_BUTTON
+ jr nz, .pressed_a_or_b
+ ld a, [hl]
+ and B_BUTTON
+ jr nz, .pressed_a_or_b
+ ld a, [hl]
+ and D_UP
+ jr nz, .pressed_up
+ ld a, [hl]
+ and D_DOWN
+ jr nz, .pressed_down
+ ret
+
+.pressed_up
+ ld a, [wNrOfBeatenBattleTowerTrainers]
+ and a
+ ret z
+ sub 15
+ ld [wNrOfBeatenBattleTowerTrainers], a
+ call .PlaceTextItems
+ ret
+
+.pressed_down
+ ld a, [wNrOfBeatenBattleTowerTrainers]
+ cp 60
+ ret z
+ add 15
+ ld [wNrOfBeatenBattleTowerTrainers], a
+ call .PlaceTextItems
+ ret
+
+.pressed_a_or_b
+ ld hl, wJumptableIndex
+ set 7, [hl]
+ ret
+
+.NextJumptableFunction:
+ ld hl, wJumptableIndex
+ inc [hl]
+ ret
+; 1705b7
+
+.DrawBorder: ; 1705b7
+ hlcoord 0, 4
+ ld a, $79
+ ld [hli], a
+ ld c, SCREEN_WIDTH - 2
+.top_border_loop
+ ld a, $7a
+ ld [hli], a
+ dec c
+ jr nz, .top_border_loop
+ ld a, $7b
+ ld [hli], a
+ ld de, SCREEN_WIDTH
+ ld c, 12
+.left_border_loop
+ ld a, $7c
+ ld [hl], a
+ add hl, de
+ dec c
+ jr nz, .left_border_loop
+ ld a, $7d
+ ld [hli], a
+ ld c, SCREEN_WIDTH - 2
+.bottom_border_loop
+ ld a, $7a
+ ld [hli], a
+ dec c
+ jr nz, .bottom_border_loop
+ ld a, $7e
+ ld [hl], a
+ ld de, -SCREEN_WIDTH
+ add hl, de
+ ld c, 12
+.right_border_loop
+ ld a, $7c
+ ld [hl], a
+ add hl, de
+ dec c
+ jr nz, .right_border_loop
+ ret
+; 1705f0
+
+.PlaceTextItems: ; 1705f0
+ call .ClearBox
+ call .PlaceUpDownArrows
+ ld a, $50
+ ld [wcd4e], a
+ ld hl, wMisc
+ ld a, [wNrOfBeatenBattleTowerTrainers]
+ ld c, a
+ xor a
+ ld b, a
+ add hl, bc
+ push hl
+ pop bc
+ hlcoord 1, 6
+ ld a, 6
+.loop1
+ push af
+ push hl
+ ld a, 3
+.loop2
+ push af
+ ld de, wcd49
+ ld a, [bc]
+ and a
+ jr z, .fill_with_e3
+; .copy
+ ld a, 5
+.loop3a
+ push af
+ ld a, [bc]
+ ld [de], a
+ inc bc
+ inc de
+ pop af
+ dec a
+ jr nz, .loop3a
+ jr .rejoin
+
+.fill_with_e3
+ ld a, 5
+.loop3b
+ push af
+ ld a, $e3
+ ld [de], a
+ inc de
+ inc bc
+ pop af
+ dec a
+ jr nz, .loop3b
+
+.rejoin
+ ld de, wcd49
+ push bc
+ call PlaceString
+ ld de, NAME_LENGTH_JAPANESE
+ add hl, de
+ pop bc
+ pop af
+ dec a
+ jr nz, .loop2
+ pop hl
+ ld de, $28
+ add hl, de
+ pop af
+ dec a
+ jr nz, .loop1
+ ret
+; 17064b
+
+.ClearBox: ; 17064b
+ hlcoord 1, 5
+ xor a
+ ld b, 12
+.clearbox_row
+ ld c, SCREEN_WIDTH - 2
+.clearbox_column
+ ld [hli], a
+ dec c
+ jr nz, .clearbox_column
+ inc hl
+ inc hl
+ dec b
+ jr nz, .clearbox_row
+ ret
+; 17065d
+
+.PlaceUpDownArrows: ; 17065d
+ ld a, [wNrOfBeatenBattleTowerTrainers]
+ and a
+ jr z, .nope
+ hlcoord 18, 5
+ ld a, "▲"
+ ld [hl], a
+
+.nope
+ ld a, [wNrOfBeatenBattleTowerTrainers]
+ cp 60
+ ret z
+ hlcoord 18, 16
+ ld a, "▼"
+ ld [hl], a
+ ret
+; 170676
+
+.String_Mail: ; 170676
+ db "ルーム@"
+; 17067a
+
+.String_PastReaders: ; 17067a
+ db "れきだいりーダーいちらん@"
+; 170687
+
+BattleTowerAction: ; 170687
+ ld a, [ScriptVar]
+ ld e, a
+ ld d, 0
+ ld hl, .dw
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+; 170696
+
+
+.dw ; 170696 (5c:4696)
+ dw BattleTowerAction_CheckExplanationRead ; 0x00
+ dw BattleTowerAction_SetExplanationRead ; 0x01
+ dw BattleTowerAction_GetChallengeState ; 0x02
+ dw BattleTowerAction_SetByteToQuickSaveChallenge ; 0x03
+ dw BattleTowerAction_SetByteToCancelChallenge ; 0x04
+ dw Function1707ac ; 0x05
+ dw Function1707f4 ; 0x06
+ dw SaveBattleTowerLevelGroup ; 0x07
+ dw LoadBattleTowerLevelGroup ; 0x08
+ dw BattleTower_CheckSaveFileExistsAndIsYours ; 0x09
+ dw Function1708b1 ; 0x0a
+ dw CheckMobileEventIndex ; 0x0b
+ dw Function1708c8 ; 0x0c
+ dw Function1708f0 ; 0x0d
+ dw BattleTowerAction_EggTicket ; 0x0e
+ dw Function1709aa ; 0x0f
+ dw Function1709bb ; 0x10
+ dw Function170a9c ; 0x11
+ dw Function170aa0 ; 0x12
+ dw Function170aaf ; 0x13
+ dw Function170abe ; 0x14
+ dw Function170ad7 ; 0x15
+ dw Function170807 ; 0x16
+ dw Function17081d ; 0x17
+ dw BattleTowerAction_LevelCheck ; 0x18
+ dw BattleTowerAction_UbersCheck ; 0x19
+ dw ResetBattleTowerTrainersSRAM ; 0x1a
+ dw BattleTower_GiveReward ; 0x1b
+ dw Function17071b ; 0x1c
+ dw Function170729 ; 0x1d
+ dw BattleTower_RandomlyChooseReward ; 0x1e
+ dw BattleTower_SaveOptions ; 0x1f
+
+
+; Reset the save memory for BattleTower-Trainers (Counter and all 7 TrainerBytes)
+ResetBattleTowerTrainersSRAM: ; 1706d6 (5c:46d6) BattleTowerAction $1a
+ ld a, BANK(sBTTrainers)
+ call GetSRAMBank
+
+ ld a, $ff
+ ld hl, sBTTrainers
+ ld bc, BATTLETOWER_NROFTRAINERS
+ call ByteFill
+
+ xor a
+ ld [sNrOfBeatenBattleTowerTrainers], a
+
+ call CloseSRAM
+
+ ret
+
+BattleTower_GiveReward: ; 1706ee (5c:46ee) BattleTowerAction $1b
+ ld a, BANK(sBattleTowerReward)
+ call GetSRAMBank
+
+ ld a, [sBattleTowerReward]
+ call CloseSRAM
+ ld [ScriptVar], a
+ ld hl, NumItems
+ ld a, [hli]
+ cp MAX_ITEMS
+ ret c
+ ld b, MAX_ITEMS
+ ld a, [ScriptVar]
+ ld c, a
+.loop
+ ld a, [hli]
+ cp c
+ jr nz, .next
+ ld a, [hl]
+ cp 95
+ ret c
+.next
+ inc hl
+ dec b
+ jr nz, .loop
+ ld a, POTION
+ ld [ScriptVar], a
+ ret
+
+Function17071b: ; 17071b (5c:471b) BattleTowerAction $1c
+ ld a, BANK(sBattleTowerChallengeState)
+ call GetSRAMBank
+ ld a, BATTLETOWER_WON_CHALLENGE
+ ld [sBattleTowerChallengeState], a
+ call CloseSRAM
+ ret
+
+Function170729: ; 170729 (5c:4729) BattleTowerAction $1d
+ ld a, BANK(sBattleTowerChallengeState)
+ call GetSRAMBank
+ ld a, BATTLETOWER_RECEIVED_REWARD
+ ld [sBattleTowerChallengeState], a
+ call CloseSRAM
+ ret
+
+BattleTower_SaveOptions: ; 170737 (5c:4737) BattleTowerAction $1f
+ farcall SaveOptions
+ ret
+
+BattleTower_RandomlyChooseReward: ; 17073e (5c:473e) BattleTowerAction $1e
+; Generate a random stat boosting item.
+.loop
+ call Random
+ ld a, [hRandomAdd]
+ and $7
+ cp 6
+ jr c, .okay
+ sub 6
+.okay
+ add HP_UP
+ cp LUCKY_PUNCH
+ jr z, .loop
+ push af
+ ld a, BANK(sBattleTowerReward)
+ call GetSRAMBank
+ pop af
+ ld [sBattleTowerReward], a
+ call CloseSRAM
+ ret
+
+BattleTowerAction_CheckExplanationRead: ; 17075f (5c:475f) BattleTowerAction $00
+ call BattleTower_CheckSaveFileExistsAndIsYours
+ ld a, [ScriptVar]
+ and a
+ ret z
+
+ ld a, BANK(sBattleTowerSaveFileFlags)
+ call GetSRAMBank
+ ld a, [sBattleTowerSaveFileFlags]
+ and $2
+ ld [ScriptVar], a
+ call CloseSRAM
+ ret
+
+BattleTowerAction_GetChallengeState: ; 170778 (5c:4778) BattleTowerAction $02
+ ld hl, sBattleTowerChallengeState
+ ld a, BANK(sBattleTowerChallengeState)
+ call GetSRAMBank
+ ld a, [hl]
+ ld [ScriptVar], a
+ call CloseSRAM
+ ret
+
+BattleTowerAction_SetExplanationRead: ; 170788 (5c:4788) BattleTowerAction $01
+ ld a, BANK(sBattleTowerSaveFileFlags)
+ call GetSRAMBank
+ ld a, [sBattleTowerSaveFileFlags]
+ or $2
+ ld [sBattleTowerSaveFileFlags], a
+ call CloseSRAM
+ ret
+
+BattleTowerAction_SetByteToQuickSaveChallenge: ; 170799 (5c:4799) BattleTowerAction $03
+ ld c, BATTLETOWER_SAVED_AND_LEFT
+ jr asm_17079f
+
+BattleTowerAction_SetByteToCancelChallenge: ; 17079d (5c:479d) BattleTowerAction $04
+ ld c, BATTLETOWER_NO_CHALLENGE
+asm_17079f: ; 17079f (5c:479f)
+ ld a, BANK(sBattleTowerChallengeState)
+ call GetSRAMBank
+ ld a, c
+ ld [sBattleTowerChallengeState], a
+ call CloseSRAM
+ ret
+
+Function1707ac: ; 1707ac (5c:47ac) BattleTowerAction $05
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$aa8c]
+ ld b, a
+ ld a, [$be46]
+ ld [ScriptVar], a
+ call CloseSRAM
+ and a
+ ret z
+ ld a, b
+ cp $2
+ jr nc, .asm_1707ef
+ push bc
+ call UpdateTime
+ pop bc
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$aa8b]
+ call CloseSRAM
+ ld c, a
+ ld a, [CurDay]
+ sub c
+ jr c, .asm_1707e5
+ cp $8
+ jr nc, .asm_1707ef
+ ld a, b
+ and a
+ jr nz, .asm_1707ef
+ ret
+.asm_1707e5
+ ld hl, CurDay
+ ld a, $8c
+ sub c
+ add [hl]
+ cp $8
+ ret c
+.asm_1707ef
+ ld a, $8
+ ld [ScriptVar], a
+
+Function1707f4: ; 1707f4 (5c:47f4) BattleTowerAction $06
+ ld a, $5
+ call GetSRAMBank
+ xor a
+ ld [$be46], a
+ ld [$aa8b], a
+ ld [$aa8c], a
+ call CloseSRAM
+ ret
+
+Function170807: ; 170807 (5c:4807) BattleTowerAction $16
+ call UpdateTime
+ ld a, $5
+ call GetSRAMBank
+ ld a, [CurDay]
+ ld [$b2f9], a
+ xor a
+ ld [$b2fa], a
+ call CloseSRAM
+ ret
+
+Function17081d: ; 17081d (5c:481d) BattleTowerAction $17
+ xor a
+ ld [ScriptVar], a
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$b2f9]
+ ld c, a
+ ld a, [$b2fa]
+ ld b, a
+ call CloseSRAM
+ cp $2
+ jr nc, .asm_170853
+ push bc
+ call UpdateTime
+ pop bc
+ ld a, [CurDay]
+ sub c
+ jr c, .asm_170849
+ cp $b
+ jr nc, .asm_170853
+ ld a, b
+ and a
+ jr nz, .asm_170853
+ ret
+
+.asm_170849
+ ld hl, CurDay
+ ld a, 140
+ sub c
+ add [hl]
+ cp $b
+ ret c
+.asm_170853
+ ld a, $1
+ ld [ScriptVar], a
+ ld a, $5
+ call GetSRAMBank
+ xor a
+ ld [$b2f9], a
+ ld [$b2fa], a
+ call CloseSRAM
+ ret
+
+SaveBattleTowerLevelGroup: ; 170868 (5c:4868) BattleTowerAction $07
+ ld a, BANK(sBTChoiceOfLevelGroup)
+ call GetSRAMBank
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+ ld a, [wBTChoiceOfLvlGroup]
+ ld [sBTChoiceOfLevelGroup], a
+ pop af
+ ld [rSVBK], a
+ call CloseSRAM
+ ret
+
+LoadBattleTowerLevelGroup: ; 170881 (5c:4881) BattleTowerAction $08 ; Load level group choice
+ ld a, BANK(sBTChoiceOfLevelGroup)
+ call GetSRAMBank
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+ ld a, [sBTChoiceOfLevelGroup]
+ ld [wBTChoiceOfLvlGroup], a
+ pop af
+ ld [rSVBK], a
+ call CloseSRAM
+ ret
+
+BattleTower_CheckSaveFileExistsAndIsYours: ; 17089a BattleTowerAction $09
+ ld a, [wSaveFileExists]
+ and a
+ jr z, .nope
+ farcall CompareLoadedAndSavedPlayerID
+ jr z, .yes
+ xor a
+ jr .nope
+
+.yes
+ ld a, $1
+
+.nope
+ ld [ScriptVar], a
+ ret
+; 1708b1
+
+
+Function1708b1: ; 1708b1 (5c:48b1) BattleTowerAction $0a
+ xor a
+ ld [MusicFade], a
+ call MaxVolume
+ ret
+
+CheckMobileEventIndex: ; 1708b9 (5c:48b9) BattleTowerAction $0b something to do with GS Ball
+ ld a, BANK(sMobileEventIndex)
+ call GetSRAMBank
+ ld a, [sMobileEventIndex]
+ ld [ScriptVar], a
+ call CloseSRAM
+ ret
+
+Function1708c8: ; 1708c8 (5c:48c8) BattleTowerAction $0c
+ call UpdateTime
+ ld a, $5
+ call GetSRAMBank
+ ld a, [CurDay]
+ ld [$aa8b], a
+ xor a
+ ld [$aa8c], a
+ ld a, [$aa5d]
+ cp $2
+ jr nc, .asm_1708ec
+ ld a, [CurDay]
+ ld [$aa48], a
+ ld a, $1
+ ld [$aa47], a
+.asm_1708ec
+ call CloseSRAM
+ ret
+
+Function1708f0: ; 1708f0 (5c:48f0) BattleTowerAction $0d
+ xor a
+ ld [ScriptVar], a
+ call UpdateTime
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$aa48]
+ ld c, a
+ ld a, [$aa47]
+ call CloseSRAM
+ and a
+ ret z
+ ld hl, CurDay
+ ld a, c
+ cp [hl]
+ jr nz, Function170923
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$aa5d]
+ call CloseSRAM
+ cp $5
+ ret c
+ ld a, $1
+ ld [ScriptVar], a
+ ret
+
+
+Function170923: ; 170923
+ ld a, $5
+ call GetSRAMBank
+ xor a
+ ld [$aa48], a
+ ld [$aa47], a
+ ld hl, $aa5d
+ ld bc, $0011
+ call ByteFill
+ call CloseSRAM
+ ret
+; 17093c
+
+
+BattleTowerAction_EggTicket: ; 17093c (5c:493c) BattleTowerAction $0e
+ xor a
+ ld [ScriptVar], a
+ ld a, EGG_TICKET
+ ld [CurItem], a
+ ld hl, NumItems
+ call CheckItem
+ ret nc
+ ld a, [PartyCount]
+ ld b, 0
+ ld c, a
+ ld hl, PartySpecies
+.loop
+ ld a, [hli]
+ cp EGG
+ jr nz, .not_egg
+ push hl
+ ld hl, PartyMonOT
+ ld de, NAME_LENGTH_JAPANESE
+ ld a, b
+ and a
+ jr z, .skip
+.loop2
+ add hl, de
+ dec a
+ jr nz, .loop2
+.skip
+ ld de, String_1709a4
+ ld a, NAME_LENGTH_JAPANESE
+.compare_loop
+ push af
+ ld a, [de]
+ inc de
+ cp [hl]
+ inc hl
+ jr nz, .different
+ pop af
+ dec a
+ jr nz, .compare_loop
+rept 4
+ dec hl
+endr
+ ld a, "@"
+ ld [hli], a
+ ld [hli], a
+ pop hl
+ ld a, EGG_TICKET
+ ld [CurItem], a
+ ld a, 1
+ ld [wItemQuantityChangeBuffer], a
+ ld a, -1
+ ld [CurItemQuantity], a
+ ld hl, NumItems
+ call TossItem
+ ld a, $1
+ ld [ScriptVar], a
+ ret
+
+.different
+ pop af
+ pop hl
+.not_egg
+ inc b
+ dec c
+ jr nz, .loop
+ ret
+; 1709a4 (5c:49a4)
+
+String_1709a4: ; 1709a4
+ db "なぞナゾ@@"
+
+Function1709aa: ; 1709aa (5c:49aa) BattleTowerAction $0f
+ ld a, [rSVBK]
+ push af
+ ld a, BANK(w3_d090)
+ ld [rSVBK], a
+ ld a, [w3_d090]
+ ld [ScriptVar], a
+ pop af
+ ld [rSVBK], a
+ ret
+
+Function1709bb: ; 1709bb (5c:49bb) BattleTowerAction $10
+ xor a
+ ld [ScriptVar], a
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$a800]
+ call CloseSRAM
+ cp 6
+ jr nc, .invalid
+ ld e, a
+ ld d, 0
+ ld hl, Jumptable_1709e7
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+.invalid
+ ld a, $5
+ call GetSRAMBank
+ xor a
+ ld [$a800], a
+ call CloseSRAM
+ ret
+; 1709e7 (5c:49e7)
+
+Jumptable_1709e7: ; 1709e7
+ dw .NoAction
+ dw .NoAction
+ dw .DoAction1
+ dw .DoAction1
+ dw .Action4
+ dw .Action5
+; 1709f3
+
+.DoAction1: ; 1709f3
+ ld a, $5
+ call GetSRAMBank
+ ld a, $1
+ ld [$a800], a
+ call CloseSRAM
+
+.NoAction: ; 170a00
+ ret
+; 170a01
+
+.Action4: ; 170a01
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $b023
+ ld de, wMisc
+ ld bc, $0069
+ call CopyBytes
+ ld a, [$a825]
+ ld [wcd30], a
+ ld a, [$a826]
+ ld [wcd31], a
+ call CloseSRAM
+ farcall Function11b6b4
+ farcall Function17d0f3
+ ld a, $1
+ ld [ScriptVar], a
+ ret
+; 170a33
+
+.Action5: ; 170a33
+ ld a, $0
+ call GetSRAMBank
+ ld hl, wRTC
+ ld de, wMisc
+ ld bc, $0004
+ call CopyBytes
+ call CloseSRAM
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $b08c
+ ld de, wMisc
+ ld c, $4
+.compare_loop
+ ld a, [de]
+ inc de
+ cp [hl]
+ jr nz, .different
+ inc hl
+ dec c
+ jr nz, .compare_loop
+ call CloseSRAM
+ ld a, [MapGroup]
+ ld b, a
+ ld a, [MapNumber]
+ ld c, a
+ call GetMapSceneID
+ ld a, d
+ or e
+ jr z, .no_scene
+ ld a, [de]
+ and a
+ ret nz
+
+.no_scene
+ ld a, $1
+ ld [ScriptVar], a
+ ret
+
+.different
+ call CloseSRAM
+ ld a, $5
+ call GetSRAMBank
+ xor a
+ ld [$a800], a
+ call CloseSRAM
+ ld [ScriptVar], a
+ ld a, [MapGroup]
+ ld b, a
+ ld a, [MapNumber]
+ ld c, a
+ call GetMapSceneID
+ ld a, d
+ or e
+ jr z, .no_scene_2
+ xor a
+ ld [de], a
+
+.no_scene_2
+ ret
+; 170a9c
+
+Function170a9c: ; 170a9c (5c:4a9c) BattleTowerAction $11
+ ld c, $0
+ jr asm_170aa2
+
+Function170aa0: ; 170aa0 (5c:4aa0) BattleTowerAction $12
+ ld c, $1
+asm_170aa2: ; 170aa2 (5c:4aa2)
+ ld a, $5
+ call GetSRAMBank
+ ld a, c
+ ld [$aa8d], a
+ call CloseSRAM
+ ret
+
+Function170aaf: ; 170aaf (5c:4aaf) BattleTowerAction $13
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$aa8d]
+ ld [ScriptVar], a
+ call CloseSRAM
+ ret
+
+Function170abe: ; 170abe (5c:4abe) BattleTowerAction $14
+ call BattleTower_CheckSaveFileExistsAndIsYours
+ ld a, [ScriptVar]
+ and a
+ ret z
+
+ ld a, BANK(sBattleTowerSaveFileFlags)
+ call GetSRAMBank
+ ld a, [sBattleTowerSaveFileFlags]
+ and $1
+ ld [ScriptVar], a
+ call CloseSRAM
+ ret
+
+Function170ad7: ; 170ad7 (5c:4ad7) BattleTowerAction $15
+ ld a, BANK(sBattleTowerSaveFileFlags)
+ call GetSRAMBank
+ ld a, [sBattleTowerSaveFileFlags]
+ or $1
+ ld [sBattleTowerSaveFileFlags], a
+ call CloseSRAM
+ ret
+
+BattleTowerAction_LevelCheck: ; 170ae8 (5c:4ae8) BattleTowerAction $18
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$b2fb]
+ call CloseSRAM
+ ld c, 10
+ call SimpleDivide
+ ld a, b
+ ld [wcd4f], a
+ xor a
+ ld [ScriptVar], a
+ farcall BattleTower_LevelCheck ; level check
+ ret nc
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$b2fb]
+ call CloseSRAM
+ ld [ScriptVar], a
+ ret
+
+BattleTowerAction_UbersCheck: ; 170b16 (5c:4b16) BattleTowerAction $19
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$b2fb]
+ call CloseSRAM
+ ld c, 10
+ call SimpleDivide
+ ld a, b
+ ld [wcd4f], a
+ xor a
+ ld [ScriptVar], a
+ farcall BattleTower_UbersCheck
+ ret nc
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$b2fb]
+ call CloseSRAM
+ ld [ScriptVar], a
+ ret
+
+Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
+ farcall Function_LoadOpponentTrainerAndPokemons
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+ ld hl, BT_OTTrainerClass
+ ld a, [hl]
+ dec a
+ ld c, a
+ ld b, $0
+ pop af
+ ld [rSVBK], a
+ ld hl, .Sprites
+ add hl, bc
+ ld a, [hl]
+ ld [wBTTempOTSprite], a
+
+; Load sprite of the opponent trainer
+; because s/he is chosen randomly and appears out of nowhere
+ ld a, [ScriptVar]
+ dec a
+ sla a
+ ld e, a
+ sla a
+ sla a
+ sla a
+ ld c, a
+ ld b, 0
+ ld d, 0
+ ld hl, MapObjects
+ add hl, bc
+ inc hl
+ ld a, [wBTTempOTSprite]
+ ld [hl], a
+ ld hl, UsedSprites
+ add hl, de
+ ld [hli], a
+ ld [hUsedSpriteIndex], a
+ ld a, [hl]
+ ld [hUsedSpriteTile], a
+ farcall GetUsedSprite
+ ret
+; 170b90
+
+.Sprites:
+ db SPRITE_FALKNER
+ db SPRITE_WHITNEY
+ db SPRITE_BUGSY
+ db SPRITE_MORTY
+ db SPRITE_PRYCE
+ db SPRITE_JASMINE
+ db SPRITE_CHUCK
+ db SPRITE_CLAIR
+ db SPRITE_SILVER
+ db SPRITE_OAK
+ db SPRITE_WILL
+ db SPRITE_CHRIS
+ db SPRITE_BRUNO
+ db SPRITE_KAREN
+ db SPRITE_KOGA
+ db SPRITE_LANCE
+ db SPRITE_BROCK
+ db SPRITE_MISTY
+ db SPRITE_SURGE
+ db SPRITE_SCIENTIST
+ db SPRITE_ERIKA
+ db SPRITE_YOUNGSTER
+ db SPRITE_YOUNGSTER
+ db SPRITE_YOUNGSTER
+ db SPRITE_LASS
+ db SPRITE_JANINE
+ db SPRITE_COOLTRAINER_M
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_BUENA
+ db SPRITE_SUPER_NERD
+ db SPRITE_ROCKET
+ db SPRITE_GENTLEMAN
+ db SPRITE_BUENA
+ db SPRITE_TEACHER
+ db SPRITE_SABRINA
+ db SPRITE_BUG_CATCHER
+ db SPRITE_FISHER
+ db SPRITE_SUPER_NERD
+ db SPRITE_COOLTRAINER_F
+ db SPRITE_SAILOR
+ db SPRITE_SUPER_NERD
+ db SPRITE_BLUE
+ db SPRITE_ROCKER
+ db SPRITE_POKEFAN_M
+ db SPRITE_BIKER
+ db SPRITE_BLAINE
+ db SPRITE_PHARMACIST
+ db SPRITE_FISHER
+ db SPRITE_SUPER_NERD
+ db SPRITE_BLACK_BELT
+ db SPRITE_ROCKET
+ db SPRITE_YOUNGSTER
+ db SPRITE_LASS
+ db SPRITE_YOUNGSTER
+ db SPRITE_ROCKET_GIRL
+ db SPRITE_SAGE
+ db SPRITE_GRANNY
+ db SPRITE_ROCKER
+ db SPRITE_POKEFAN_M
+ db SPRITE_KIMONO_GIRL
+ db SPRITE_TWIN
+ db SPRITE_POKEFAN_F
+ db SPRITE_RED
+ db SPRITE_BLUE
+ db SPRITE_OFFICER
+ db SPRITE_ROCKET_GIRL
+
+ret_170bd2: ; 170bd2
+ ret
+; 170bd3
+
+SpecialCheckForBattleTowerRules: ; 170bd3
+ farcall CheckForBattleTowerRules
+ jr c, .asm_170bde
+ xor a
+ jr .asm_170be0
+
+.asm_170bde
+ ld a, $1
+
+.asm_170be0
+ ld [ScriptVar], a
+ ret
+; 170be4
diff --git a/mobile/fixed_words.asm b/mobile/fixed_words.asm
new file mode 100755
index 000000000..5f6fc1808
--- /dev/null
+++ b/mobile/fixed_words.asm
@@ -0,0 +1,4294 @@
+; These functions seem to be related to the selection of preset phrases
+; for use in mobile communications. Annoyingly, they separate the
+; Battle Tower function above from the data it references.
+Function11c05d: ; 11c05d
+ ld a, e
+ or d
+ jr z, .error
+ ld a, e
+ and d
+ cp $ff
+ jr z, .error
+ push hl
+ call CopyMobileEZChatToC608
+ pop hl
+ call PlaceString
+ and a
+ ret
+
+.error
+ ld c, l
+ ld b, h
+ scf
+ ret
+; 11c075
+
+Function11c075: ; 11c075
+ push de
+ ld a, c
+ call Function11c254
+ pop de
+ ld bc, wcd36
+ call Function11c08f
+ ret
+; 11c082
+
+Function11c082: ; 11c082
+; XXX
+ push de
+ ld a, c
+ call Function11c254
+ pop de
+ ld bc, wcd36
+ call PrintEZChatBattleMessage
+ ret
+; 11c08f
+
+Function11c08f: ; 11c08f
+ ld l, e
+ ld h, d
+ push hl
+ ld a, 3
+.loop
+ push af
+ ld a, [bc]
+ ld e, a
+ inc bc
+ ld a, [bc]
+ ld d, a
+ inc bc
+ push bc
+ call Function11c05d
+ jr c, .okay
+ inc bc
+
+.okay
+ ld l, c
+ ld h, b
+ pop bc
+ pop af
+ dec a
+ jr nz, .loop
+ pop hl
+ ld de, 2 * SCREEN_WIDTH
+ add hl, de
+ ld a, $3
+.loop2
+ push af
+ ld a, [bc]
+ ld e, a
+ inc bc
+ ld a, [bc]
+ ld d, a
+ inc bc
+ push bc
+ call Function11c05d
+ jr c, .okay2
+ inc bc
+
+.okay2
+ ld l, c
+ ld h, b
+ pop bc
+ pop af
+ dec a
+ jr nz, .loop2
+ ret
+; 11c0c6
+
+PrintEZChatBattleMessage: ; 11c0c6
+; Use up to 6 words from bc to print text starting at de.
+ ; Preserve $cf63, $cf64
+ ld a, [wJumptableIndex]
+ ld l, a
+ ld a, [wcf64]
+ ld h, a
+ push hl
+ ; reset value at c618 (not preserved)
+ ld hl, $c618
+ ld a, $0
+ ld [hli], a
+ ; preserve de
+ push de
+ ; $cf63 keeps track of which line we're on (0, 1, or 2)
+ ; $cf64 keeps track of how much room we have left in the current line
+ xor a
+ ld [wJumptableIndex], a
+ ld a, 18
+ ld [wcf64], a
+ ld a, $6 ; up to 6 times
+.loop
+ push af
+ ; load the 2-byte word data pointed to by bc
+ ld a, [bc]
+ ld e, a
+ inc bc
+ ld a, [bc]
+ ld d, a
+ inc bc
+ ; if $0000, we're done
+ or e
+ jr z, .done
+ ; preserving hl and bc, get the length of the word
+ push hl
+ push bc
+ call CopyMobileEZChatToC608
+ call GetLengthOfWordAtC608
+ ld e, c
+ pop bc
+ pop hl
+ ; if the functions return 0, we're done
+ ld a, e
+ or a
+ jr z, .done
+.loop2
+ ; e contains the length of the word
+ ; add 1 for the space, unless we're at the start of the line
+ ld a, [wcf64]
+ cp 18
+ jr z, .skip_inc
+ inc e
+
+.skip_inc
+ ; if the word fits, put it on the same line
+ cp e
+ jr nc, .same_line
+ ; otherwise, go to the next line
+ ld a, [wJumptableIndex]
+ inc a
+ ld [wJumptableIndex], a
+ ; if we're on line 2, insert "<NEXT>"
+ ld [hl], "<NEXT>"
+ rra
+ jr c, .got_line_terminator
+ ; else, insert "<CONT>"
+ ld [hl], "<CONT>"
+
+.got_line_terminator
+ inc hl
+ ; init the next line, holding on to the same word
+ ld a, 18
+ ld [wcf64], a
+ dec e
+ jr .loop2
+
+.same_line
+ ; add the space, unless we're at the start of the line
+ cp 18
+ jr z, .skip_space
+ ld [hl], " "
+ inc hl
+
+.skip_space
+ ; deduct the length of the word
+ sub e
+ ld [wcf64], a
+ ld de, $c608
+.place_string_loop
+ ; load the string from de to hl
+ ld a, [de]
+ cp "@"
+ jr z, .done
+ inc de
+ ld [hli], a
+ jr .place_string_loop
+
+.done
+ ; next word?
+ pop af
+ dec a
+ jr nz, .loop
+ ; we're finished, place "<DONE>"
+ ld [hl], "<DONE>"
+ ; now, let's place the string from c618 to bc
+ pop bc
+ ld hl, $c618
+ call PlaceHLTextAtBC
+ ; restore the original values of $cf63 and $cf64
+ pop hl
+ ld a, l
+ ld [wJumptableIndex], a
+ ld a, h
+ ld [wcf64], a
+ ret
+; 11c14a
+
+GetLengthOfWordAtC608: ; 11c14a
+ ld c, $0
+ ld hl, $c608
+.loop
+ ld a, [hli]
+ cp "@"
+ ret z
+ inc c
+ jr .loop
+; 11c156
+
+CopyMobileEZChatToC608: ; 11c156
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld a, "@"
+ ld hl, $c608
+ ld bc, NAME_LENGTH
+ call ByteFill
+ ld a, d
+ and a
+ jr z, .get_name
+ ld hl, MobileEZChatCategoryPointers
+ dec d
+ sla d
+ ld c, d
+ ld b, $0
+ add hl, bc
+ ld a, [hli]
+ ld c, a
+ ld a, [hl]
+ ld b, a
+ push bc
+ pop hl
+ ld c, e
+ ld b, $0
+ sla c
+ rl b
+ sla c
+ rl b
+ sla c
+ rl b
+ add hl, bc
+ ld bc, NAME_LENGTH_JAPANESE - 1
+.copy_string
+ ld de, $c608
+ call CopyBytes
+ ld de, $c608
+ pop af
+ ld [rSVBK], a
+ ret
+
+.get_name
+ ld a, e
+ ld [wd265], a
+ call GetPokemonName
+ ld hl, StringBuffer1
+ ld bc, PKMN_NAME_LENGTH - 1
+ jr .copy_string
+; 11c1ab
+
+Function11c1ab: ; 11c1ab
+ ld a, [hInMenu]
+ push af
+ ld a, $1
+ ld [hInMenu], a
+ call Function11c1b9
+ pop af
+ ld [hInMenu], a
+ ret
+; 11c1b9
+
+Function11c1b9: ; 11c1b9
+ call .InitKanaMode
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ call EZChat_MasterLoop
+ pop af
+ ld [rSVBK], a
+ ret
+; 11c1ca
+
+.InitKanaMode: ; 11c1ca
+ xor a
+ ld [wJumptableIndex], a
+ ld [wcf64], a
+ ld [wcf65], a
+ ld [wcf66], a
+ ld [wcd23], a
+ ld [wcd20], a
+ ld [wcd21], a
+ ld [wcd22], a
+ ld [wcd35], a
+ ld [wcd2b], a
+ ld a, $ff
+ ld [wcd24], a
+ ld a, [wMenuCursorY]
+ dec a
+ call Function11c254
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearScreen
+ call Function11d323
+ call SetPalettes
+ call DisableLCD
+ ld hl, GFX_11d67e
+ ld de, VTiles2
+ ld bc, $60
+ call CopyBytes
+ ld hl, LZ_11d6de
+ ld de, VTiles0
+ call Decompress
+ call EnableLCD
+ farcall ReloadMapPart
+ farcall ClearSpriteAnims
+ farcall LoadPokemonData
+ farcall Pokedex_ABCMode
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, $c6d0
+ ld de, LYOverrides
+ ld bc, $100
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ call EZChat_GetCategoryWordsByKana
+ call EZChat_GetSeenPokemonByKana
+ ret
+; 11c254
+
+Function11c254: ; 11c254
+ push af
+ ld a, $4
+ call GetSRAMBank
+ ld hl, $a007
+ pop af
+ sla a
+ sla a
+ ld c, a
+ sla a
+ add c
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld de, wcd36
+ ld bc, 12
+ call CopyBytes
+ call CloseSRAM
+ ret
+; 11c277
+
+EZChat_ClearBottom12Rows: ; 11c277 (47:4277)
+ ld a, " "
+ hlcoord 0, 6
+ ld bc, (SCREEN_HEIGHT - 6) * SCREEN_WIDTH
+ call ByteFill
+ ret
+
+EZChat_MasterLoop: ; 11c283
+.loop
+ call JoyTextDelay
+ ld a, [hJoyPressed]
+ ld [hJoypadPressed], a
+ ld a, [wJumptableIndex]
+ bit 7, a
+ jr nz, .exit
+ call .DoJumptableFunction
+ farcall PlaySpriteAnimations
+ farcall ReloadMapPart
+ jr .loop
+
+.exit
+ farcall ClearSpriteAnims
+ call ClearSprites
+ ret
+; 11c2ac
+
+.DoJumptableFunction: ; 11c2ac
+ jumptable .Jumptable, wJumptableIndex
+; 11c2bb
+
+.Jumptable: ; 11c2bb (47:42bb)
+ dw .SpawnObjects ; 00
+ dw .InitRAM ; 01
+ dw Function11c35f ; 02
+ dw Function11c373 ; 03
+ dw Function11c3c2 ; 04
+ dw Function11c3ed ; 05
+ dw Function11c52c ; 06
+ dw Function11c53d ; 07
+ dw Function11c658 ; 08
+ dw Function11c675 ; 09
+ dw Function11c9bd ; 0a
+ dw Function11c9c3 ; 0b
+ dw Function11caad ; 0c
+ dw Function11cab3 ; 0d
+ dw Function11cb52 ; 0e
+ dw Function11cb66 ; 0f
+ dw Function11cbf5 ; 10
+ dw Function11ccef ; 11
+ dw Function11cd04 ; 12
+ dw Function11cd20 ; 13
+ dw Function11cd54 ; 14
+ dw Function11ce0b ; 15
+ dw Function11ce2b ; 16
+
+.SpawnObjects: ; 11c2e9 (47:42e9)
+ depixel 3, 1, 2, 5
+ ld a, SPRITE_ANIM_INDEX_1D
+ call _InitSpriteAnimStruct
+ depixel 8, 1, 2, 5
+
+ ld a, SPRITE_ANIM_INDEX_1D
+ call _InitSpriteAnimStruct
+ ld hl, SPRITEANIMSTRUCT_0C
+ add hl, bc
+ ld a, $1
+ ld [hl], a
+
+ depixel 9, 2, 2, 0
+ ld a, SPRITE_ANIM_INDEX_1D
+ call _InitSpriteAnimStruct
+ ld hl, SPRITEANIMSTRUCT_0C
+ add hl, bc
+ ld a, $3
+ ld [hl], a
+
+ depixel 10, 16
+ ld a, SPRITE_ANIM_INDEX_1D
+ call _InitSpriteAnimStruct
+ ld hl, SPRITEANIMSTRUCT_0C
+ add hl, bc
+ ld a, $4
+ ld [hl], a
+
+ depixel 10, 4
+ ld a, SPRITE_ANIM_INDEX_1D
+ call _InitSpriteAnimStruct
+ ld hl, SPRITEANIMSTRUCT_0C
+ add hl, bc
+ ld a, $5
+ ld [hl], a
+
+ depixel 10, 2
+ ld a, SPRITE_ANIM_INDEX_1D
+ call _InitSpriteAnimStruct
+ ld hl, SPRITEANIMSTRUCT_0C
+ add hl, bc
+ ld a, $2
+ ld [hl], a
+
+ ld hl, wcd23
+ set 1, [hl]
+ set 2, [hl]
+ jp Function11cfb5
+
+.InitRAM: ; 11c346 (47:4346)
+ ld a, $9
+ ld [wcd2d], a
+ ld a, $2
+ ld [wcd2e], a
+ ld [wcd2f], a
+ ld [wcd30], a
+ ld de, wcd2d
+ call Function11cfce
+ jp Function11cfb5
+
+Function11c35f: ; 11c35f (47:435f)
+ ld hl, wcd2f
+ inc [hl]
+ inc [hl]
+ dec hl
+ dec hl
+ dec [hl]
+ push af
+ ld de, wcd2d
+ call Function11cfce
+ pop af
+ ret nz
+ jp Function11cfb5
+
+Function11c373: ; 11c373 (47:4373)
+ ld hl, wcd30
+ inc [hl]
+ inc [hl]
+ dec hl
+ dec hl
+ dec [hl]
+ push af
+ ld de, wcd2d
+ call Function11cfce
+ pop af
+ ret nz
+ call Function11c38a
+ jp Function11cfb5
+
+Function11c38a: ; 11c38a (47:438a)
+ ld hl, Unknown_11c986
+ ld bc, wcd36
+ ld a, $6
+.asm_11c392
+ push af
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ push hl
+ push de
+ pop hl
+ ld a, [bc]
+ inc bc
+ ld e, a
+ ld a, [bc]
+ inc bc
+ ld d, a
+ push bc
+ or e
+ jr z, .asm_11c3af
+ ld a, e
+ and d
+ cp $ff
+ jr z, .asm_11c3af
+ call Function11c05d
+ jr .asm_11c3b5
+.asm_11c3af
+ ld de, String_11c3bc
+ call PlaceString
+.asm_11c3b5
+ pop bc
+ pop hl
+ pop af
+ dec a
+ jr nz, .asm_11c392
+ ret
+; 11c3bc (47:43bc)
+
+String_11c3bc: ; 11c3bc
+ db "ーーーーー@"
+; 11c3c2
+
+Function11c3c2: ; 11c3c2 (47:43c2)
+ call EZChat_ClearBottom12Rows
+ ld de, Unknown_11cfbe
+ call Function11d035
+ hlcoord 1, 7
+ ld de, String_11c4db
+ call PlaceString
+ hlcoord 1, 16
+ ld de, String_11c51b
+ call PlaceString
+ call Function11c4be
+ ld hl, wcd23
+ set 0, [hl]
+ ld hl, wcd24
+ res 0, [hl]
+ call Function11cfb5
+
+Function11c3ed: ; 11c3ed (47:43ed)
+ ld hl, wcd20 ; wcd20
+ ld de, hJoypadPressed ; $ffa3
+ ld a, [de]
+ and $8
+ jr nz, .asm_11c426
+ ld a, [de]
+ and $2
+ jr nz, .asm_11c41a
+ ld a, [de]
+ and $1
+ jr nz, .asm_11c42c
+ ld de, hJoyLast
+ ld a, [de]
+ and $40
+ jr nz, .asm_11c47c
+ ld a, [de]
+ and $80
+ jr nz, .asm_11c484
+ ld a, [de]
+ and $20
+ jr nz, .asm_11c48c
+ ld a, [de]
+ and $10
+ jr nz, .asm_11c498
+ ret
+
+.asm_11c41a
+ call PlayClickSFX
+.asm_11c41d
+ ld hl, wcd24
+ set 0, [hl]
+ ld a, $c
+ jr .asm_11c475
+.asm_11c426
+ ld a, $8
+ ld [wcd20], a ; wcd20
+ ret
+
+.asm_11c42c
+ ld a, [wcd20] ; wcd20
+ cp $6
+ jr c, .asm_11c472
+ sub $6
+ jr z, .asm_11c469
+ dec a
+ jr z, .asm_11c41d
+ ld hl, wcd36
+ ld c, $c
+ xor a
+.asm_11c440
+ or [hl]
+ inc hl
+ dec c
+ jr nz, .asm_11c440
+ and a
+ jr z, .asm_11c460
+ ld de, Unknown_11cfba
+ call Function11cfce
+ decoord 1, 2
+ ld bc, wcd36
+ call Function11c08f
+ ld hl, wcd24
+ set 0, [hl]
+ ld a, $e
+ jr .asm_11c475
+.asm_11c460
+ ld hl, wcd24
+ set 0, [hl]
+ ld a, $11
+ jr .asm_11c475
+.asm_11c469
+ ld hl, wcd24
+ set 0, [hl]
+ ld a, $a
+ jr .asm_11c475
+.asm_11c472
+ call Function11c4a5
+.asm_11c475
+ ld [wJumptableIndex], a
+ call PlayClickSFX
+ ret
+
+.asm_11c47c
+ ld a, [hl]
+ cp $3
+ ret c
+ sub $3
+ jr .asm_11c4a3
+.asm_11c484
+ ld a, [hl]
+ cp $6
+ ret nc
+ add $3
+ jr .asm_11c4a3
+.asm_11c48c
+ ld a, [hl]
+ and a
+ ret z
+ cp $3
+ ret z
+ cp $6
+ ret z
+ dec a
+ jr .asm_11c4a3
+.asm_11c498
+ ld a, [hl]
+ cp $2
+ ret z
+ cp $5
+ ret z
+ cp $8
+ ret z
+ inc a
+.asm_11c4a3
+ ld [hl], a
+ ret
+
+Function11c4a5: ; 11c4a5 (47:44a5)
+ ld hl, wcd23
+ res 0, [hl]
+ ld a, [wcd2b]
+ and a
+ jr nz, .asm_11c4b7
+ xor a
+ ld [wcd21], a
+ ld a, $6
+ ret
+
+.asm_11c4b7
+ xor a
+ ld [wcd22], a
+ ld a, $15
+ ret
+
+Function11c4be: ; 11c4be (47:44be)
+ ld a, $1
+ hlcoord 0, 6, AttrMap
+ ld bc, $a0
+ call ByteFill
+ ld a, $7
+ hlcoord 0, 14, AttrMap
+ ld bc, $28
+ call ByteFill
+ farcall ReloadMapPart
+ ret
+; 11c4db (47:44db)
+
+String_11c4db: ; 11c4db
+ db "6つのことば¯くみあわせます"
+ next "かえたいところ¯えらぶと でてくる"
+ next "ことばのグループから いれかえたい"
+ next "たんご¯えらんでください"
+ db "@"
+; 11c51b
+
+String_11c51b: ; 11c51b
+ db "ぜんぶけす やめる けってい@"
+; 11c52c
+
+Function11c52c: ; 11c52c (47:452c)
+ call EZChat_ClearBottom12Rows
+ call EZChat_PlaceCategoryNames
+ call Function11c618
+ ld hl, wcd24
+ res 1, [hl]
+ call Function11cfb5
+
+Function11c53d: ; 11c53d (47:453d)
+ ld hl, wcd21
+ ld de, hJoypadPressed ; $ffa3
+
+ ld a, [de]
+ and START
+ jr nz, .start
+
+ ld a, [de]
+ and SELECT
+ jr nz, .select
+
+ ld a, [de]
+ and B_BUTTON
+ jr nz, .b
+
+ ld a, [de]
+ and A_BUTTON
+ jr nz, .a
+
+ ld de, hJoyLast
+
+ ld a, [de]
+ and D_UP
+ jr nz, .up
+
+ ld a, [de]
+ and D_DOWN
+ jr nz, .down
+
+ ld a, [de]
+ and D_LEFT
+ jr nz, .left
+
+ ld a, [de]
+ and D_RIGHT
+ jr nz, .right
+
+ ret
+
+.a
+ ld a, [wcd21]
+ cp 15
+ jr c, .got_category
+ sub $f
+ jr z, .done
+ dec a
+ jr z, .mode
+ jr .b
+
+.start
+ ld hl, wcd24
+ set 0, [hl]
+ ld a, $8
+ ld [wcd20], a ; wcd20
+
+.b
+ ld a, $4
+ jr .go_to_function
+
+.select
+ ld a, [wcd2b]
+ xor $1
+ ld [wcd2b], a
+ ld a, $15
+ jr .go_to_function
+
+.mode
+ ld a, $13
+ jr .go_to_function
+
+.got_category
+ ld a, $8
+
+.go_to_function
+ ld hl, wcd24
+ set 1, [hl]
+ ld [wJumptableIndex], a
+ call PlayClickSFX
+ ret
+
+.done
+ ld a, [wcd20] ; wcd20
+ call Function11ca6a
+ call PlayClickSFX
+ ret
+
+.up
+ ld a, [hl]
+ cp $3
+ ret c
+ sub $3
+ jr .finish_dpad
+
+.down
+ ld a, [hl]
+ cp $f
+ ret nc
+ add $3
+ jr .finish_dpad
+
+.left
+ ld a, [hl]
+ and a
+ ret z
+ cp $3
+ ret z
+ cp $6
+ ret z
+ cp $9
+ ret z
+ cp $c
+ ret z
+ cp $f
+ ret z
+ dec a
+ jr .finish_dpad
+
+.right
+ ld a, [hl]
+ cp $2
+ ret z
+ cp $5
+ ret z
+ cp $8
+ ret z
+ cp $b
+ ret z
+ cp $e
+ ret z
+ cp $11
+ ret z
+ inc a
+
+.finish_dpad
+ ld [hl], a
+ ret
+; 11c5f0
+
+EZChat_PlaceCategoryNames: ; 11c5f0 (47:45f0)
+ ld de, MobileEZChatCategoryNames
+ ld bc, Coords_11c63a
+ ld a, 15
+.loop
+ push af
+ ld a, [bc]
+ inc bc
+ ld l, a
+ ld a, [bc]
+ inc bc
+ ld h, a
+ push bc
+ call PlaceString
+ ; The category names are padded with "@".
+ ; To find the next category, the system must
+ ; find the first character at de that is not "@".
+.find_next_string_loop
+ inc de
+ ld a, [de]
+ cp "@"
+ jr z, .find_next_string_loop
+ pop bc
+ pop af
+ dec a
+ jr nz, .loop
+ hlcoord 1, 17
+ ld de, EZChatString_Stop_Mode_Cancel
+ call PlaceString
+ ret
+
+Function11c618: ; 11c618 (47:4618)
+ ld a, $2
+ hlcoord 0, 6, AttrMap
+ ld bc, $c8
+ call ByteFill
+ farcall ReloadMapPart
+ ret
+; 11c62a (47:462a)
+
+EZChatString_Stop_Mode_Cancel: ; 11c62a
+ db "けす モード やめる@"
+; 11c63a
+
+Coords_11c63a: ; 11c63a
+ dwcoord 1, 7
+ dwcoord 7, 7
+ dwcoord 13, 7
+ dwcoord 1, 9
+ dwcoord 7, 9
+ dwcoord 13, 9
+ dwcoord 1, 11
+ dwcoord 7, 11
+ dwcoord 13, 11
+ dwcoord 1, 13
+ dwcoord 7, 13
+ dwcoord 13, 13
+ dwcoord 1, 15
+ dwcoord 7, 15
+ dwcoord 13, 15
+; 11c658
+
+Function11c658: ; 11c658 (47:4658)
+ call EZChat_ClearBottom12Rows
+ call Function11c770
+ ld de, Unknown_11cfc2
+ call Function11d035
+ call Function11c9ab
+ call Function11c7bc
+ call Function11c86e
+ ld hl, wcd24
+ res 3, [hl]
+ call Function11cfb5
+
+Function11c675: ; 11c675 (47:4675)
+ ld hl, wMobileCommsJumptableIndex
+ ld de, hJoypadPressed ; $ffa3
+ ld a, [de]
+ and A_BUTTON
+ jr nz, .a
+ ld a, [de]
+ and B_BUTTON
+ jr nz, .b
+ ld a, [de]
+ and START
+ jr nz, .start
+ ld a, [de]
+ and SELECT
+ jr z, .select
+
+ ld a, [wcd26]
+ and a
+ ret z
+ sub $c
+ jr nc, .asm_11c699
+ xor a
+.asm_11c699
+ ld [wcd26], a
+ jr .asm_11c6c4
+
+.start
+ ld hl, wcd28
+ ld a, [wcd26]
+ add $c
+ cp [hl]
+ ret nc
+ ld [wcd26], a
+ ld a, [hl]
+ ld b, a
+ ld hl, wMobileCommsJumptableIndex
+ ld a, [wcd26]
+ add [hl]
+ jr c, .asm_11c6b9
+ cp b
+ jr c, .asm_11c6c4
+.asm_11c6b9
+ ld a, [wcd28]
+ ld hl, wcd26
+ sub [hl]
+ dec a
+ ld [wMobileCommsJumptableIndex], a
+.asm_11c6c4
+ call Function11c992
+ call Function11c7bc
+ call Function11c86e
+ ret
+
+.select
+ ld de, hJoyLast
+ ld a, [de]
+ and D_UP
+ jr nz, .asm_11c708
+ ld a, [de]
+ and D_DOWN
+ jr nz, .asm_11c731
+ ld a, [de]
+ and D_LEFT
+ jr nz, .asm_11c746
+ ld a, [de]
+ and D_RIGHT
+ jr nz, .asm_11c755
+ ret
+
+.a
+ call Function11c8f6
+ ld a, $4
+ ld [wcd35], a
+ jr .asm_11c6fc
+.b
+ ld a, [wcd2b]
+ and a
+ jr nz, .asm_11c6fa
+ ld a, $6
+ jr .asm_11c6fc
+.asm_11c6fa
+ ld a, $15
+.asm_11c6fc
+ ld [wJumptableIndex], a
+ ld hl, wcd24
+ set 3, [hl]
+ call PlayClickSFX
+ ret
+
+.asm_11c708
+ ld a, [hl]
+ cp $3
+ jr c, .asm_11c711
+ sub $3
+ jr .asm_11c76e
+.asm_11c711
+ ld a, [wcd26]
+ sub $3
+ ret c
+ ld [wcd26], a
+ jr .asm_11c6c4
+.asm_11c71c
+ ld hl, wcd28
+ ld a, [wcd26]
+ add $c
+ ret c
+ cp [hl]
+ ret nc
+ ld a, [wcd26]
+ add $3
+ ld [wcd26], a
+ jr .asm_11c6c4
+.asm_11c731
+ ld a, [wcd28]
+ ld b, a
+ ld a, [wcd26]
+ add [hl]
+ add $3
+ cp b
+ ret nc
+ ld a, [hl]
+ cp $9
+ jr nc, .asm_11c71c
+ add $3
+ jr .asm_11c76e
+.asm_11c746
+ ld a, [hl]
+ and a
+ ret z
+ cp $3
+ ret z
+ cp $6
+ ret z
+ cp $9
+ ret z
+ dec a
+ jr .asm_11c76e
+.asm_11c755
+ ld a, [wcd28]
+ ld b, a
+ ld a, [wcd26]
+ add [hl]
+ inc a
+ cp b
+ ret nc
+ ld a, [hl]
+ cp $2
+ ret z
+ cp $5
+ ret z
+ cp $8
+ ret z
+ cp $b
+ ret z
+ inc a
+.asm_11c76e
+ ld [hl], a
+ ret
+
+Function11c770: ; 11c770 (47:4770)
+ xor a
+ ld [wMobileCommsJumptableIndex], a
+ ld [wcd26], a
+ ld [wcd27], a
+ ld a, [wcd2b]
+ and a
+ jr nz, .cd2b_is_nonzero
+ ld a, [wcd21]
+ and a
+ jr z, .cd21_is_zero
+ ; load from data array
+ dec a
+ sla a
+ ld hl, MobileEZChatData_WordAndPageCounts
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [hli]
+ ld [wcd28], a
+ ld a, [hl]
+.load
+ ld [wcd29], a
+ ret
+
+.cd21_is_zero
+ ; compute from [wc7d2]
+ ld a, [wc7d2]
+ ld [wcd28], a
+.div_12
+ ld c, 12
+ call SimpleDivide
+ and a
+ jr nz, .no_need_to_floor
+ dec b
+.no_need_to_floor
+ ld a, b
+ jr .load
+
+.cd2b_is_nonzero
+ ; compute from [c6a8 + 2 * [cd22]]
+ ld hl, $c6a8 ; $c68a + 30
+ ld a, [wcd22]
+ ld c, a
+ ld b, 0
+ add hl, bc
+ add hl, bc
+ ld a, [hl]
+ ld [wcd28], a
+ jr .div_12
+
+Function11c7bc: ; 11c7bc (47:47bc)
+ ld bc, Unknown_11c854
+ ld a, [wcd2b]
+ and a
+ jr nz, .asm_11c814
+ ld a, [wcd21]
+ ld d, a
+ and a
+ jr z, .asm_11c7e9
+ ld a, [wcd26]
+ ld e, a
+.asm_11c7d0
+ ld a, [bc]
+ ld l, a
+ inc bc
+ ld a, [bc]
+ ld h, a
+ inc bc
+ and l
+ cp $ff
+ ret z
+ push bc
+ push de
+ call Function11c05d
+ pop de
+ pop bc
+ inc e
+ ld a, [wcd28]
+ cp e
+ jr nz, .asm_11c7d0
+ ret
+
+.asm_11c7e9
+ ld hl, wListPointer
+ ld a, [wcd26]
+ ld e, a
+ add hl, de
+.asm_11c7f1
+ push de
+ ld a, [hli]
+ ld e, a
+ ld d, $0
+ push hl
+ ld a, [bc]
+ ld l, a
+ inc bc
+ ld a, [bc]
+ ld h, a
+ inc bc
+ and l
+ cp $ff
+ jr z, .asm_11c811
+ push bc
+ call Function11c05d
+ pop bc
+ pop hl
+ pop de
+ inc e
+ ld a, [wcd28]
+ cp e
+ jr nz, .asm_11c7f1
+ ret
+
+.asm_11c811
+ pop hl
+ pop de
+ ret
+
+.asm_11c814
+ ld hl, $c648
+ ld a, [wcd22]
+ ld e, a
+ ld d, $0
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+ push de
+ pop hl
+ ld a, [wcd26]
+ ld e, a
+ ld d, $0
+ add hl, de
+ add hl, de
+ ld a, [wcd26]
+ ld e, a
+.asm_11c831
+ push de
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ push hl
+ ld a, [bc]
+ ld l, a
+ inc bc
+ ld a, [bc]
+ ld h, a
+ inc bc
+ and l
+ cp $ff
+ jr z, .asm_11c851
+ push bc
+ call Function11c05d
+ pop bc
+ pop hl
+ pop de
+ inc e
+ ld a, [wcd28]
+ cp e
+ jr nz, .asm_11c831
+ ret
+
+.asm_11c851
+ pop hl
+ pop de
+ ret
+; 11c854 (47:4854)
+
+Unknown_11c854: ; 11c854
+ dwcoord 2, 8
+ dwcoord 8, 8
+ dwcoord 14, 8
+ dwcoord 2, 10
+ dwcoord 8, 10
+ dwcoord 14, 10
+ dwcoord 2, 12
+ dwcoord 8, 12
+ dwcoord 14, 12
+ dwcoord 2, 14
+ dwcoord 8, 14
+ dwcoord 14, 14
+ dw -1
+; 11c86e
+
+Function11c86e: ; 11c86e (47:486e)
+ ld a, [wcd26]
+ and a
+ jr z, .asm_11c88a
+ hlcoord 2, 17
+ ld de, MobileString_Prev
+ call PlaceString
+ hlcoord 6, 17
+ ld c, $3
+ xor a
+.asm_11c883
+ ld [hli], a
+ inc a
+ dec c
+ jr nz, .asm_11c883
+ jr .asm_11c895
+.asm_11c88a
+ hlcoord 2, 17
+ ld c, $7
+ ld a, $7f
+.asm_11c891
+ ld [hli], a
+ dec c
+ jr nz, .asm_11c891
+.asm_11c895
+ ld hl, wcd28
+ ld a, [wcd26]
+ add $c
+ jr c, .asm_11c8b7
+ cp [hl]
+ jr nc, .asm_11c8b7
+ hlcoord 16, 17
+ ld de, MobileString_Next
+ call PlaceString
+ hlcoord 11, 17
+ ld a, $3
+ ld c, a
+.asm_11c8b1
+ ld [hli], a
+ inc a
+ dec c
+ jr nz, .asm_11c8b1
+ ret
+
+.asm_11c8b7
+ hlcoord 17, 16
+ ld a, $7f
+ ld [hl], a
+ hlcoord 11, 17
+ ld c, $7
+.asm_11c8c2
+ ld [hli], a
+ dec c
+ jr nz, .asm_11c8c2
+ ret
+; 11c8c7 (47:48c7)
+
+BCD2String: ; 11c8c7
+ inc a
+ push af
+ and $f
+ ld [hDividend], a
+ pop af
+ and $f0
+ swap a
+ ld [hDividend + 1], a
+ xor a
+ ld [hDividend + 2], a
+ push hl
+ farcall Function11a80c
+ pop hl
+ ld a, [wcd63]
+ add "0"
+ ld [hli], a
+ ld a, [wcd62]
+ add "0"
+ ld [hli], a
+ ret
+; 11c8ec
+
+MobileString_Page: ; 11c8ec
+ db "ぺージ@"
+; 11c8f0
+
+MobileString_Prev: ; 11c8f0
+ db "まえ@"
+; 11c8f3
+
+MobileString_Next: ; 11c8f3
+ db "つぎ@"
+; 11c8f6
+
+Function11c8f6: ; 11c8f6 (47:48f6)
+ ld a, [wcd20] ; wcd20
+ call Function11c95d
+ push hl
+ ld a, [wcd2b]
+ and a
+ jr nz, .asm_11c938
+ ld a, [wcd21]
+ ld d, a
+ and a
+ jr z, .asm_11c927
+ ld hl, wcd26
+ ld a, [wMobileCommsJumptableIndex]
+ add [hl]
+.asm_11c911
+ ld e, a
+.asm_11c912
+ pop hl
+ push de
+ call Function11c05d
+ pop de
+ ld a, [wcd20] ; wcd20
+ ld c, a
+ ld b, $0
+ ld hl, wcd36
+ add hl, bc
+ add hl, bc
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ ret
+
+.asm_11c927
+ ld hl, wcd26
+ ld a, [wMobileCommsJumptableIndex]
+ add [hl]
+ ld c, a
+ ld b, $0
+ ld hl, wListPointer
+ add hl, bc
+ ld a, [hl]
+ jr .asm_11c911
+.asm_11c938
+ ld hl, $c648
+ ld a, [wcd22]
+ ld e, a
+ ld d, $0
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+ push de
+ pop hl
+ ld a, [wcd26]
+ ld e, a
+ ld d, $0
+ add hl, de
+ add hl, de
+ ld a, [wMobileCommsJumptableIndex]
+ ld e, a
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+ jr .asm_11c912
+
+Function11c95d: ; 11c95d (47:495d)
+ sla a
+ ld c, a
+ ld b, 0
+ ld hl, Unknown_11c986
+ add hl, bc
+ ld a, [hli]
+ ld c, a
+ ld a, [hl]
+ ld b, a
+ push bc
+ push bc
+ pop hl
+ ld a, $5
+ ld c, a
+ ld a, $7f
+.asm_11c972
+ ld [hli], a
+ dec c
+ jr nz, .asm_11c972
+ dec hl
+ ld bc, -20
+ add hl, bc
+ ld a, $5
+ ld c, a
+ ld a, $7f
+.asm_11c980
+ ld [hld], a
+ dec c
+ jr nz, .asm_11c980
+ pop hl
+ ret
+; 11c986 (47:4986)
+
+Unknown_11c986:
+ dwcoord 1, 2
+ dwcoord 7, 2
+ dwcoord 13, 2
+ dwcoord 1, 4
+ dwcoord 7, 4
+ dwcoord 13, 4
+; 11c992
+
+Function11c992: ; 11c992 (47:4992)
+ ld a, $8
+ hlcoord 2, 7
+.asm_11c997
+ push af
+ ld a, $7f
+ push hl
+ ld bc, $11
+ call ByteFill
+ pop hl
+ ld bc, $14
+ add hl, bc
+ pop af
+ dec a
+ jr nz, .asm_11c997
+ ret
+
+Function11c9ab: ; 11c9ab (47:49ab)
+ ld a, $7
+ hlcoord 0, 6, AttrMap
+ ld bc, $c8
+ call ByteFill
+ farcall ReloadMapPart
+ ret
+
+Function11c9bd: ; 11c9bd (47:49bd)
+ ld de, String_11ca38
+ call Function11ca7f
+
+Function11c9c3: ; 11c9c3 (47:49c3)
+ ld hl, wcd2a
+ ld de, hJoypadPressed ; $ffa3
+ ld a, [de]
+ and $1
+ jr nz, .asm_11c9de
+ ld a, [de]
+ and $2
+ jr nz, .asm_11c9e9
+ ld a, [de]
+ and $40
+ jr nz, .asm_11c9f7
+ ld a, [de]
+ and $80
+ jr nz, .asm_11c9fc
+ ret
+
+.asm_11c9de
+ ld a, [hl]
+ and a
+ jr nz, .asm_11c9e9
+ call Function11ca5e
+ xor a
+ ld [wcd20], a ; wcd20
+.asm_11c9e9
+ ld hl, wcd24
+ set 4, [hl]
+ ld a, $4
+ ld [wJumptableIndex], a
+ call PlayClickSFX
+ ret
+
+.asm_11c9f7
+ ld a, [hl]
+ and a
+ ret z
+ dec [hl]
+ ret
+
+.asm_11c9fc
+ ld a, [hl]
+ and a
+ ret nz
+ inc [hl]
+ ret
+
+Function11ca01: ; 11ca01 (47:4a01)
+ hlcoord 14, 7, AttrMap
+ ld de, $14
+ ld a, $5
+ ld c, a
+.asm_11ca0a
+ push hl
+ ld a, $6
+ ld b, a
+ ld a, $7
+.asm_11ca10
+ ld [hli], a
+ dec b
+ jr nz, .asm_11ca10
+ pop hl
+ add hl, de
+ dec c
+ jr nz, .asm_11ca0a
+
+Function11ca19: ; 11ca19 (47:4a19)
+ hlcoord 0, 12, AttrMap
+ ld de, $14
+ ld a, $6
+ ld c, a
+.asm_11ca22
+ push hl
+ ld a, $14
+ ld b, a
+ ld a, $7
+.asm_11ca28
+ ld [hli], a
+ dec b
+ jr nz, .asm_11ca28
+ pop hl
+ add hl, de
+ dec c
+ jr nz, .asm_11ca22
+ farcall ReloadMapPart
+ ret
+; 11ca38 (47:4a38)
+
+String_11ca38: ; 11ca38
+ db "とうろくちゅう", $25, "あいさつ¯ぜんぶ"
+ next "けしても よろしいですか?@"
+; 11ca57
+
+String_11ca57: ; 11ca57
+ db "はい"
+ next "いいえ@"
+; 11ca5e
+
+Function11ca5e: ; 11ca5e (47:4a5e)
+ xor a
+.loop
+ push af
+ call Function11ca6a
+ pop af
+ inc a
+ cp $6
+ jr nz, .loop
+ ret
+
+Function11ca6a: ; 11ca6a (47:4a6a)
+ ld hl, wcd36
+ ld c, a
+ ld b, $0
+ add hl, bc
+ add hl, bc
+ ld [hl], b
+ inc hl
+ ld [hl], b
+ call Function11c95d
+ ld de, String_11c3bc
+ call PlaceString
+ ret
+
+Function11ca7f: ; 11ca7f (47:4a7f)
+ push de
+ ld de, Unknown_11cfc6
+ call Function11cfce
+ ld de, Unknown_11cfca
+ call Function11cfce
+ hlcoord 1, 14
+ pop de
+ call PlaceString
+ hlcoord 16, 8
+ ld de, String_11ca57
+ call PlaceString
+ call Function11ca01
+ ld a, $1
+ ld [wcd2a], a
+ ld hl, wcd24
+ res 4, [hl]
+ call Function11cfb5
+ ret
+
+Function11caad: ; 11caad (47:4aad)
+ ld de, String_11cb1c
+ call Function11ca7f
+
+Function11cab3: ; 11cab3 (47:4ab3)
+ ld hl, wcd2a
+ ld de, hJoypadPressed ; $ffa3
+ ld a, [de]
+ and $1
+ jr nz, .asm_11cace
+ ld a, [de]
+ and $2
+ jr nz, .asm_11caf9
+ ld a, [de]
+ and $40
+ jr nz, .asm_11cb12
+ ld a, [de]
+ and $80
+ jr nz, .asm_11cb17
+ ret
+
+.asm_11cace
+ call PlayClickSFX
+ ld a, [hl]
+ and a
+ jr nz, .asm_11cafc
+ ld a, [wcd35]
+ and a
+ jr z, .asm_11caf3
+ cp $ff
+ jr z, .asm_11caf3
+ ld a, $ff
+ ld [wcd35], a
+ hlcoord 1, 14
+ ld de, String_11cb31
+ call PlaceString
+ ld a, $1
+ ld [wcd2a], a
+ ret
+
+.asm_11caf3
+ ld hl, wJumptableIndex
+ set 7, [hl]
+ ret
+
+.asm_11caf9
+ call PlayClickSFX
+.asm_11cafc
+ ld hl, wcd24
+ set 4, [hl]
+ ld a, $4
+ ld [wJumptableIndex], a
+ ld a, [wcd35]
+ cp $ff
+ ret nz
+ ld a, $1
+ ld [wcd35], a
+ ret
+
+.asm_11cb12
+ ld a, [hl]
+ and a
+ ret z
+ dec [hl]
+ ret
+
+.asm_11cb17
+ ld a, [hl]
+ and a
+ ret nz
+ inc [hl]
+ ret
+; 11cb1c (47:4b1c)
+
+String_11cb1c: ; 11cb1c
+ db "あいさつ", $25, "とうろく¯ちゅうし"
+ next "しますか?@"
+; 11cb31
+
+String_11cb31: ; 11cb31
+ db "とうろくちゅう", $25, "あいさつ", $24, "ほぞん"
+ next "されません", $4a, "よろしい ですか?@"
+; 11cb52
+
+Function11cb52: ; 11cb52 (47:4b52)
+ ld hl, Unknown_11cc01
+ ld a, [wMenuCursorY]
+.asm_11cb58
+ dec a
+ jr z, .asm_11cb5f
+ inc hl
+ inc hl
+ jr .asm_11cb58
+.asm_11cb5f
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+ call Function11ca7f
+
+Function11cb66: ; 11cb66 (47:4b66)
+ ld hl, wcd2a
+ ld de, hJoypadPressed ; $ffa3
+ ld a, [de]
+ and $1
+ jr nz, .asm_11cb81
+ ld a, [de]
+ and $2
+ jr nz, .asm_11cbd7
+ ld a, [de]
+ and $40
+ jr nz, .asm_11cbeb
+ ld a, [de]
+ and $80
+ jr nz, .asm_11cbf0
+ ret
+
+.asm_11cb81
+ ld a, [hl]
+ and a
+ jr nz, .asm_11cbd4
+ ld a, $4
+ call GetSRAMBank
+ ld hl, $a007
+ ld a, [wMenuCursorY]
+ dec a
+ sla a
+ sla a
+ ld c, a
+ sla a
+ add c
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld de, wcd36
+ ld c, $c
+.asm_11cba2
+ ld a, [de]
+ ld [hli], a
+ inc de
+ dec c
+ jr nz, .asm_11cba2
+ call CloseSRAM
+ call PlayClickSFX
+ ld de, Unknown_11cfc6
+ call Function11cfce
+ ld hl, Unknown_11cc7e
+ ld a, [wMenuCursorY]
+.asm_11cbba
+ dec a
+ jr z, .asm_11cbc1
+ inc hl
+ inc hl
+ jr .asm_11cbba
+.asm_11cbc1
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+ hlcoord 1, 14
+ call PlaceString
+ ld hl, wJumptableIndex
+ inc [hl]
+ inc hl
+ ld a, $10
+ ld [hl], a
+ ret
+
+.asm_11cbd4
+ call PlayClickSFX
+.asm_11cbd7
+ ld de, Unknown_11cfba
+ call Function11cfce
+ call Function11c38a
+ ld hl, wcd24
+ set 4, [hl]
+ ld a, $4
+ ld [wJumptableIndex], a
+ ret
+
+.asm_11cbeb
+ ld a, [hl]
+ and a
+ ret z
+ dec [hl]
+ ret
+
+.asm_11cbf0
+ ld a, [hl]
+ and a
+ ret nz
+ inc [hl]
+ ret
+
+Function11cbf5: ; 11cbf5 (47:4bf5)
+ call WaitSFX
+ ld hl, wcf64
+ dec [hl]
+ ret nz
+ dec hl
+ set 7, [hl]
+ ret
+; 11cc01 (47:4c01)
+
+Unknown_11cc01: ; 11cc01
+ dw String_11cc09
+ dw String_11cc23
+ dw String_11cc42
+ dw String_11cc60
+
+String_11cc09: ; 11cc09
+ db "じこしょうかい は"
+ next "この あいさつで いいですか?@"
+
+String_11cc23: ; 11cc23
+ db "たいせん ", $4a, "はじまるとき は"
+ next "この あいさつで いいですか?@"
+
+String_11cc42: ; 11cc42
+ db "たいせん ", $1d, "かったとき は"
+ next "この あいさつで いいですか?@"
+
+String_11cc60: ; 11cc60
+ db "たいせん ", $1d, "まけたとき は"
+ next "この あいさつで いいですか?@"
+; 11cc7e
+
+Unknown_11cc7e: ; 11cc7e
+ dw String_11cc86
+ dw String_11cc9d
+ dw String_11ccb9
+ dw String_11ccd4
+
+String_11cc86: ; 11cc86
+ db "じこしょうかい の"
+ next "あいさつ¯とうろくした!@"
+
+String_11cc9d: ; 11cc9d
+ db "たいせん ", $4a, "はじまるとき の"
+ next "あいさつ¯とうろくした!@"
+
+String_11ccb9: ; 11ccb9
+ db "たいせん ", $1d, "かったとき の"
+ next "あいさつ¯とうろくした!@"
+
+String_11ccd4: ; 11ccd4
+ db "たいせん ", $1d, "まけたとき の"
+ next "あいさつ¯とうろくした!@"
+; 11ccef
+
+Function11ccef: ; 11ccef (47:4cef)
+ ld de, Unknown_11cfc6
+ call Function11cfce
+ hlcoord 1, 14
+ ld de, String_11cd10
+ call PlaceString
+ call Function11ca19
+ call Function11cfb5
+
+Function11cd04: ; 11cd04 (47:4d04)
+ ld de, hJoypadPressed ; $ffa3
+ ld a, [de]
+ and a
+ ret z
+ ld a, $4
+ ld [wJumptableIndex], a
+ ret
+; 11cd10 (47:4d10)
+
+String_11cd10: ; 11cd10
+ db "なにか ことば¯いれてください@"
+; 11cd20
+
+Function11cd20: ; 11cd20 (47:4d20)
+ call EZChat_ClearBottom12Rows
+ ld de, Unknown_11cfc6
+ call Function11cfce
+ hlcoord 1, 14
+ ld a, [wcd2b]
+ ld [wcd2c], a
+ and a
+ jr nz, .asm_11cd3a
+ ld de, String_11cdc7
+ jr .asm_11cd3d
+.asm_11cd3a
+ ld de, String_11cdd9
+.asm_11cd3d
+ call PlaceString
+ hlcoord 4, 8
+ ld de, String_11cdf5
+ call PlaceString
+ call Function11cdaa
+ ld hl, wcd24
+ res 5, [hl]
+ call Function11cfb5
+
+Function11cd54: ; 11cd54 (47:4d54)
+ ld hl, wcd2c
+ ld de, hJoypadPressed ; $ffa3
+ ld a, [de]
+ and A_BUTTON
+ jr nz, .asm_11cd6f
+ ld a, [de]
+ and B_BUTTON
+ jr nz, .asm_11cd73
+ ld a, [de]
+ and D_UP
+ jr nz, .asm_11cd8b
+ ld a, [de]
+ and D_DOWN
+ jr nz, .asm_11cd94
+ ret
+
+.asm_11cd6f
+ ld a, [hl]
+ ld [wcd2b], a
+.asm_11cd73
+ ld a, [wcd2b]
+ and a
+ jr nz, .asm_11cd7d
+ ld a, $6
+ jr .asm_11cd7f
+
+.asm_11cd7d
+ ld a, $15
+.asm_11cd7f
+ ld [wJumptableIndex], a
+ ld hl, wcd24
+ set 5, [hl]
+ call PlayClickSFX
+ ret
+
+.asm_11cd8b
+ ld a, [hl]
+ and a
+ ret z
+ dec [hl]
+ ld de, String_11cdc7
+ jr .asm_11cd9b
+
+.asm_11cd94
+ ld a, [hl]
+ and a
+ ret nz
+ inc [hl]
+ ld de, String_11cdd9
+.asm_11cd9b
+ push de
+ ld de, Unknown_11cfc6
+ call Function11cfce
+ pop de
+ hlcoord 1, 14
+ call PlaceString
+ ret
+
+Function11cdaa: ; 11cdaa (47:4daa)
+ ld a, $2
+ hlcoord 0, 6, AttrMap
+ ld bc, 6 * SCREEN_WIDTH
+ call ByteFill
+ ld a, $7
+ hlcoord 0, 12, AttrMap
+ ld bc, 4 * SCREEN_WIDTH
+ call ByteFill
+ farcall ReloadMapPart
+ ret
+; 11cdc7 (47:4dc7)
+
+String_11cdc7: ; 11cdc7
+; Words will be displayed by category
+ db "ことば¯しゅるいべつに"
+ next "えらべます@"
+; 11cdd9
+
+String_11cdd9: ; 11cdd9
+; Words will be displayed in alphabetical order
+ db "ことば¯アイウエォ の"
+ next "じゅんばんで ひょうじ します@"
+; 11cdf5
+
+String_11cdf5: ; 11cdf5
+ db "しゅるいべつ モード" ; Category mode
+ next "アイウエォ モード@" ; ABC mode
+; 11ce0b
+
+Function11ce0b: ; 11ce0b (47:4e0b)
+ call EZChat_ClearBottom12Rows
+ hlcoord 1, 7
+ ld de, String_11cf79
+ call PlaceString
+ hlcoord 1, 17
+ ld de, EZChatString_Stop_Mode_Cancel
+ call PlaceString
+ call Function11c618
+ ld hl, wcd24
+ res 2, [hl]
+ call Function11cfb5
+
+Function11ce2b: ; 11ce2b (47:4e2b)
+ ld a, [wcd22]
+ sla a
+ sla a
+ ld c, a
+ ld b, 0
+ ld hl, Unknown_11ceb9
+ add hl, bc
+
+ ld de, hJoypadPressed ; $ffa3
+ ld a, [de]
+ and START
+ jr nz, .start
+ ld a, [de]
+ and SELECT
+ jr nz, .select
+ ld a, [de]
+ and A_BUTTON
+ jr nz, .a
+ ld a, [de]
+ and B_BUTTON
+ jr nz, .b
+
+ ld de, hJoyLast
+ ld a, [de]
+ and D_UP
+ jr nz, .up
+ ld a, [de]
+ and D_DOWN
+ jr nz, .down
+ ld a, [de]
+ and D_LEFT
+ jr nz, .left
+ ld a, [de]
+ and D_RIGHT
+ jr nz, .right
+
+ ret
+
+.a
+ ld a, [wcd22]
+ cp NUM_KANA
+ jr c, .place
+ sub NUM_KANA
+ jr z, .done
+ dec a
+ jr z, .mode
+ jr .b
+
+.start
+ ld hl, wcd24
+ set 0, [hl]
+ ld a, $8
+ ld [wcd20], a ; wcd20
+.b
+ ld a, $4
+ jr .load
+
+.select
+ ld a, [wcd2b]
+ xor $1
+ ld [wcd2b], a
+ ld a, $6
+ jr .load
+
+.place
+ ld a, $8
+ jr .load
+
+.mode
+ ld a, $13
+.load
+ ld [wJumptableIndex], a
+ ld hl, wcd24
+ set 2, [hl]
+ call PlayClickSFX
+ ret
+
+.done
+ ld a, [wcd20] ; wcd20
+ call Function11ca6a
+ call PlayClickSFX
+ ret
+
+.left
+ inc hl
+.down
+ inc hl
+.right
+ inc hl
+.up
+ ld a, [hl]
+ cp $ff
+ ret z
+ ld [wcd22], a
+ ret
+; 11ceb9 (47:4eb9)
+
+Unknown_11ceb9: ; 11ceb9
+ ; up left down right
+ db $ff, $01
+ db $05, $ff
+ db $ff, $02
+ db $06, $00
+ db $ff, $03
+ db $07, $01
+ db $ff, $04
+ db $08, $02
+ db $ff, $14
+ db $09, $03
+ db $00, $06
+ db $0a, $ff
+ db $01, $07
+ db $0b, $05
+ db $02, $08
+ db $0c, $06
+ db $03, $09
+ db $0d, $07
+ db $04, $19
+ db $0e, $08
+ db $05, $0b
+ db $0f, $ff
+ db $06, $0c
+ db $10, $0a
+ db $07, $0d
+ db $11, $0b
+ db $08, $0e
+ db $12, $0c
+ db $09, $1e
+ db $13, $0d
+ db $0a, $10
+ db $2d, $ff
+ db $0b, $11
+ db $2d, $0f
+ db $0c, $12
+ db $2d, $10
+ db $0d, $13
+ db $2d, $11
+ db $0e, $26
+ db $2d, $12
+ db $ff, $15
+ db $19, $04
+ db $ff, $16
+ db $1a, $14
+ db $ff, $17
+ db $1b, $15
+ db $ff, $18
+ db $1c, $16
+ db $ff, $23
+ db $1d, $17
+ db $14, $1a
+ db $1e, $09
+ db $15, $1b
+ db $1f, $19
+ db $16, $1c
+ db $20, $1a
+ db $17, $1d
+ db $21, $1b
+ db $18, $2b
+ db $22, $1c
+ db $19, $1f
+ db $26, $0e
+ db $1a, $20
+ db $27, $1e
+ db $1b, $21
+ db $28, $1f
+ db $1c, $22
+ db $29, $20
+ db $1d, $2c
+ db $2a, $21
+ db $ff, $24
+ db $2b, $18
+ db $ff, $25
+ db $2b, $23
+ db $ff, $ff
+ db $2b, $24
+ db $1e, $27
+ db $2e, $13
+ db $1f, $28
+ db $2e, $26
+ db $20, $29
+ db $2e, $27
+ db $21, $2a
+ db $2e, $28
+ db $22, $ff
+ db $2e, $29
+ db $23, $ff
+ db $2c, $1d
+ db $2b, $ff
+ db $2f, $22
+ db $0f, $2e
+ db $ff, $ff
+ db $26, $2f
+ db $ff, $2d
+ db $2c, $ff
+ db $ff, $2e
+; 11cf79
+
+String_11cf79: ; 11cf79
+; Hiragana table
+ db "あいうえお なにぬねの や ゆ よ"
+ next "かきくけこ はひふへほ わ"
+ next "さしすせそ まみむめも そのた"
+ next "たちつてと らりるれろ"
+ db "@"
+; 11cfb5
+
+Function11cfb5: ; 11cfb5 (47:4fb5)
+ ld hl, wJumptableIndex
+ inc [hl]
+ ret
+; 11cfba (47:4fba)
+
+Unknown_11cfba:
+ db 0, 0 ; start coords
+ db 20, 6 ; end coords
+
+Unknown_11cfbe:
+ db 0, 14 ; start coords
+ db 20, 4 ; end coords
+
+Unknown_11cfc2:
+ db 0, 6 ; start coords
+ db 20, 10 ; end coords
+
+Unknown_11cfc6:
+ db 0, 12 ; start coords
+ db 20, 6 ; end coords
+
+Unknown_11cfca:
+ db 14, 7 ; start coords
+ db 6, 5 ; end coords
+; 11cfce
+
+Function11cfce: ; 11cfce (47:4fce)
+ hlcoord 0, 0
+ ld bc, SCREEN_WIDTH
+ ld a, [de]
+ inc de
+ push af
+ ld a, [de]
+ inc de
+ and a
+.add_n_times
+ jr z, .done_add_n_times
+ add hl, bc
+ dec a
+ jr .add_n_times
+.done_add_n_times
+ pop af
+ ld c, a
+ ld b, 0
+ add hl, bc
+ push hl
+ ld a, $79
+ ld [hli], a
+ ld a, [de]
+ inc de
+ dec a
+ dec a
+ jr z, .skip_fill
+ ld c, a
+ ld a, $7a
+.fill_loop
+ ld [hli], a
+ dec c
+ jr nz, .fill_loop
+.skip_fill
+ ld a, $7b
+ ld [hl], a
+ pop hl
+ ld bc, SCREEN_WIDTH
+ add hl, bc
+ ld a, [de]
+ dec de
+ dec a
+ dec a
+ jr z, .skip_section
+ ld b, a
+.loop
+ push hl
+ ld a, $7c
+ ld [hli], a
+ ld a, [de]
+ dec a
+ dec a
+ jr z, .skip_row
+ ld c, a
+ ld a, $7f
+.row_loop
+ ld [hli], a
+ dec c
+ jr nz, .row_loop
+.skip_row
+ ld a, $7c
+ ld [hl], a
+ pop hl
+ push bc
+ ld bc, SCREEN_WIDTH
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .loop
+.skip_section
+ ld a, $7d
+ ld [hli], a
+ ld a, [de]
+ dec a
+ dec a
+ jr z, .skip_remainder
+ ld c, a
+ ld a, $7a
+.final_loop
+ ld [hli], a
+ dec c
+ jr nz, .final_loop
+.skip_remainder
+ ld a, $7e
+ ld [hl], a
+ ret
+
+Function11d035: ; 11d035 (47:5035)
+ hlcoord 0, 0
+ ld bc, SCREEN_WIDTH
+ ld a, [de]
+ inc de
+ push af
+ ld a, [de]
+ inc de
+ and a
+.add_n_times
+ jr z, .done_add_n_times
+ add hl, bc
+ dec a
+ jr .add_n_times
+.done_add_n_times
+ pop af
+ ld c, a
+ ld b, $0
+ add hl, bc
+ push hl
+ ld a, $79
+ ld [hl], a
+ pop hl
+ push hl
+ ld a, [de]
+ dec a
+ inc de
+ ld c, a
+ add hl, bc
+ ld a, $7b
+ ld [hl], a
+ call .AddNMinusOneTimes
+ ld a, $7e
+ ld [hl], a
+ pop hl
+ push hl
+ call .AddNMinusOneTimes
+ ld a, $7d
+ ld [hl], a
+ pop hl
+ push hl
+ inc hl
+ push hl
+ call .AddNMinusOneTimes
+ pop bc
+ dec de
+ ld a, [de]
+ cp $2
+ jr z, .skip
+ dec a
+ dec a
+.loop
+ push af
+ ld a, $7a
+ ld [hli], a
+ ld [bc], a
+ inc bc
+ pop af
+ dec a
+ jr nz, .loop
+.skip
+ pop hl
+ ld bc, $14
+ add hl, bc
+ push hl
+ ld a, [de]
+ dec a
+ ld c, a
+ ld b, $0
+ add hl, bc
+ pop bc
+ inc de
+ ld a, [de]
+ cp $2
+ ret z
+ push bc
+ dec a
+ dec a
+ ld c, a
+ ld b, a
+ ld de, $14
+.loop2
+ ld a, $7c
+ ld [hl], a
+ add hl, de
+ dec c
+ jr nz, .loop2
+ pop hl
+.loop3
+ ld a, $7c
+ ld [hl], a
+ add hl, de
+ dec b
+ jr nz, .loop3
+ ret
+
+.AddNMinusOneTimes: ; 11d0ac (47:50ac)
+ ld a, [de]
+ dec a
+ ld bc, SCREEN_WIDTH
+.add_n_minus_one_times
+ add hl, bc
+ dec a
+ jr nz, .add_n_minus_one_times
+ ret
+
+AnimateEZChatCursor: ; 11d0b6 (47:50b6)
+ ld hl, SPRITEANIMSTRUCT_0C
+ add hl, bc
+ ld a, [hl]
+ ld e, a
+ ld d, 0
+ ld hl, .Jumptable
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+.Jumptable:
+ dw .zero
+ dw .one
+ dw .two
+ dw .three
+ dw .four
+ dw .five
+ dw .six
+ dw .seven
+ dw .eight
+ dw .nine
+ dw .ten
+
+.zero ; 11d0dd (47:50dd)
+ ld a, [wcd20] ; wcd20
+ sla a
+ ld hl, .Coords_Zero
+ ld e, $1
+ jr .load
+
+.one ; 11d0e9 (47:50e9)
+ ld a, [wcd21]
+ sla a
+ ld hl, .Coords_One
+ ld e, $2
+ jr .load
+
+.two ; 11d0f5 (47:50f5)
+ ld hl, .FramesetsIDs_Two
+ ld a, [wcd22]
+ ld e, a
+ ld d, $0
+ add hl, de
+ ld a, [hl]
+ call ReinitSpriteAnimFrame
+
+ ld a, [wcd22]
+ sla a
+ ld hl, .Coords_Two
+ ld e, $4
+ jr .load
+
+.three ; 11d10f (47:510f)
+ ld a, SPRITE_ANIM_FRAMESET_27
+ call ReinitSpriteAnimFrame
+ ld a, [wMobileCommsJumptableIndex]
+ sla a
+ ld hl, .Coords_Three
+ ld e, $8
+.load ; 11d11e (47:511e)
+ push de
+ ld e, a
+ ld d, $0
+ add hl, de
+ push hl
+ pop de
+ ld hl, SPRITEANIMSTRUCT_XCOORD
+ add hl, bc
+ ld a, [de]
+ inc de
+ ld [hli], a
+ ld a, [de]
+ ld [hl], a
+ pop de
+ ld a, e
+ call .UpdateObjectFlags
+ ret
+
+.four ; 11d134 (47:5134)
+ ld a, SPRITE_ANIM_FRAMESET_27
+ call ReinitSpriteAnimFrame
+ ld a, [wcd2a]
+ sla a
+ ld hl, .Coords_Four
+ ld e, $10
+ jr .load
+
+.five ; 11d145 (47:5145)
+ ld a, SPRITE_ANIM_FRAMESET_27
+ call ReinitSpriteAnimFrame
+ ld a, [wcd2c]
+ sla a
+ ld hl, .Coords_Five
+ ld e, $20
+ jr .load
+
+.six ; 11d156 (47:5156)
+ ld a, SPRITE_ANIM_FRAMESET_2A
+ call ReinitSpriteAnimFrame
+ ; X = [wcd4a] * 8 + 24
+ ld a, [wcd4a]
+ sla a
+ sla a
+ sla a
+ add $18
+ ld hl, SPRITEANIMSTRUCT_XCOORD
+ add hl, bc
+ ld [hli], a
+ ; Y = 48
+ ld a, $30
+ ld [hl], a
+
+ ld a, $1
+ ld e, a
+ call .UpdateObjectFlags
+ ret
+
+.seven ; 11d175 (47:5175)
+ ld a, [wEZChatCursorYCoord]
+ cp $4
+ jr z, .frameset_26
+ ld a, SPRITE_ANIM_FRAMESET_28
+ jr .got_frameset
+
+.frameset_26
+ ld a, SPRITE_ANIM_FRAMESET_26
+.got_frameset
+ call ReinitSpriteAnimFrame
+ ld a, [wEZChatCursorYCoord]
+ cp $4
+ jr z, .asm_11d1b1
+ ; X = [wEZChatCursorXCoord] * 8 + 32
+ ld a, [wEZChatCursorXCoord]
+ sla a
+ sla a
+ sla a
+ add $20
+ ld hl, SPRITEANIMSTRUCT_XCOORD
+ add hl, bc
+ ld [hli], a
+ ; Y = [wEZChatCursorYCoord] * 16 + 72
+ ld a, [wEZChatCursorYCoord]
+ sla a
+ sla a
+ sla a
+ sla a
+ add $48
+ ld [hl], a
+ ld a, $2
+ ld e, a
+ call .UpdateObjectFlags
+ ret
+
+.asm_11d1b1
+ ; X = [wEZChatCursorXCoord] * 40 + 24
+ ld a, [wEZChatCursorXCoord]
+ sla a
+ sla a
+ sla a
+ ld e, a
+ sla a
+ sla a
+ add e
+ add $18
+ ld hl, SPRITEANIMSTRUCT_XCOORD
+ add hl, bc
+ ld [hli], a
+ ; Y = 138
+ ld a, $8a
+ ld [hl], a
+ ld a, $2
+ ld e, a
+ call .UpdateObjectFlags
+ ret
+
+.nine ; 11d1d1 (47:51d1)
+ ld d, -13 * 8
+ ld a, SPRITE_ANIM_FRAMESET_2C
+ jr .eight_nine_load
+
+.eight ; 11d1d7 (47:51d7)
+ ld d, 2 * 8
+ ld a, SPRITE_ANIM_FRAMESET_2B
+.eight_nine_load ; 11d1db (47:51db)
+ push de
+ call ReinitSpriteAnimFrame
+ ld a, [wcd4a]
+ sla a
+ sla a
+ sla a
+ ld e, a
+ sla a
+ add e
+ add 8 * 8
+ ld hl, SPRITEANIMSTRUCT_YCOORD
+ add hl, bc
+ ld [hld], a
+ pop af
+ ld [hl], a
+ ld a, $4
+ ld e, a
+ call .UpdateObjectFlags
+ ret
+
+.ten ; 11d1fc (47:51fc)
+ ld a, SPRITE_ANIM_FRAMESET_26
+ call ReinitSpriteAnimFrame
+ ld a, $8
+ ld e, a
+ call .UpdateObjectFlags
+ ret
+; 11d208 (47:5208)
+
+.Coords_Zero: ; 11d208
+ dbpixel 1, 3, 5, 2
+ dbpixel 7, 3, 5, 2
+ dbpixel 13, 3, 5, 2
+ dbpixel 1, 5, 5, 2
+ dbpixel 7, 5, 5, 2
+ dbpixel 13, 5, 5, 2
+ dbpixel 1, 17, 5, 2
+ dbpixel 7, 17, 5, 2
+ dbpixel 13, 17, 5, 2
+
+.Coords_One: ; 11d21a
+ dbpixel 1, 8, 5, 2
+ dbpixel 7, 8, 5, 2
+ dbpixel 13, 8, 5, 2
+ dbpixel 1, 10, 5, 2
+ dbpixel 7, 10, 5, 2
+ dbpixel 13, 10, 5, 2
+ dbpixel 1, 12, 5, 2
+ dbpixel 7, 12, 5, 2
+ dbpixel 13, 12, 5, 2
+ dbpixel 1, 14, 5, 2
+ dbpixel 7, 14, 5, 2
+ dbpixel 13, 14, 5, 2
+ dbpixel 1, 16, 5, 2
+ dbpixel 7, 16, 5, 2
+ dbpixel 13, 16, 5, 2
+ dbpixel 1, 18, 5, 2
+ dbpixel 7, 18, 5, 2
+ dbpixel 13, 18, 5, 2
+
+.Coords_Two: ; 11d23e
+ dbpixel 2, 9 ; 00
+ dbpixel 3, 9 ; 01
+ dbpixel 4, 9 ; 02
+ dbpixel 5, 9 ; 03
+ dbpixel 6, 9 ; 04
+ dbpixel 2, 11 ; 05
+ dbpixel 3, 11 ; 06
+ dbpixel 4, 11 ; 07
+ dbpixel 5, 11 ; 08
+ dbpixel 6, 11 ; 09
+ dbpixel 2, 13 ; 0a
+ dbpixel 3, 13 ; 0b
+ dbpixel 4, 13 ; 0c
+ dbpixel 5, 13 ; 0d
+ dbpixel 6, 13 ; 0e
+ dbpixel 2, 15 ; 0f
+ dbpixel 3, 15 ; 10
+ dbpixel 4, 15 ; 11
+ dbpixel 5, 15 ; 12
+ dbpixel 6, 15 ; 13
+ dbpixel 8, 9 ; 14
+ dbpixel 9, 9 ; 15
+ dbpixel 10, 9 ; 16
+ dbpixel 11, 9 ; 17
+ dbpixel 12, 9 ; 18
+ dbpixel 8, 11 ; 19
+ dbpixel 9, 11 ; 1a
+ dbpixel 10, 11 ; 1b
+ dbpixel 11, 11 ; 1c
+ dbpixel 12, 11 ; 1d
+ dbpixel 8, 13 ; 1e
+ dbpixel 9, 13 ; 1f
+ dbpixel 10, 13 ; 20
+ dbpixel 11, 13 ; 21
+ dbpixel 12, 13 ; 22
+ dbpixel 14, 9 ; 23
+ dbpixel 16, 9 ; 24
+ dbpixel 18, 9 ; 25
+ dbpixel 8, 15 ; 26
+ dbpixel 9, 15 ; 27
+ dbpixel 10, 15 ; 28
+ dbpixel 11, 15 ; 29
+ dbpixel 12, 15 ; 2a
+ dbpixel 14, 11 ; 2b
+ dbpixel 14, 13 ; 2c
+ dbpixel 1, 18, 5, 2 ; 2d
+ dbpixel 7, 18, 5, 2 ; 2e
+ dbpixel 13, 18, 5, 2 ; 2f
+
+.Coords_Three: ; 11d29e
+ dbpixel 2, 10
+ dbpixel 8, 10
+ dbpixel 14, 10
+ dbpixel 2, 12
+ dbpixel 8, 12
+ dbpixel 14, 12
+ dbpixel 2, 14
+ dbpixel 8, 14
+ dbpixel 14, 14
+ dbpixel 2, 16
+ dbpixel 8, 16
+ dbpixel 14, 16
+
+.Coords_Four: ; 11d2b6
+ dbpixel 16, 10
+ dbpixel 16, 12
+
+.Coords_Five: ; 11d2ba
+ dbpixel 4, 10
+ dbpixel 4, 12
+
+.FramesetsIDs_Two: ; 11d2be
+ db SPRITE_ANIM_FRAMESET_28 ; 00
+ db SPRITE_ANIM_FRAMESET_28 ; 01
+ db SPRITE_ANIM_FRAMESET_28 ; 02
+ db SPRITE_ANIM_FRAMESET_28 ; 03
+ db SPRITE_ANIM_FRAMESET_28 ; 04
+ db SPRITE_ANIM_FRAMESET_28 ; 05
+ db SPRITE_ANIM_FRAMESET_28 ; 06
+ db SPRITE_ANIM_FRAMESET_28 ; 07
+ db SPRITE_ANIM_FRAMESET_28 ; 08
+ db SPRITE_ANIM_FRAMESET_28 ; 09
+ db SPRITE_ANIM_FRAMESET_28 ; 0a
+ db SPRITE_ANIM_FRAMESET_28 ; 0b
+ db SPRITE_ANIM_FRAMESET_28 ; 0c
+ db SPRITE_ANIM_FRAMESET_28 ; 0d
+ db SPRITE_ANIM_FRAMESET_28 ; 0e
+ db SPRITE_ANIM_FRAMESET_28 ; 0f
+ db SPRITE_ANIM_FRAMESET_28 ; 10
+ db SPRITE_ANIM_FRAMESET_28 ; 11
+ db SPRITE_ANIM_FRAMESET_28 ; 12
+ db SPRITE_ANIM_FRAMESET_28 ; 13
+ db SPRITE_ANIM_FRAMESET_28 ; 14
+ db SPRITE_ANIM_FRAMESET_28 ; 15
+ db SPRITE_ANIM_FRAMESET_28 ; 16
+ db SPRITE_ANIM_FRAMESET_28 ; 17
+ db SPRITE_ANIM_FRAMESET_28 ; 18
+ db SPRITE_ANIM_FRAMESET_28 ; 19
+ db SPRITE_ANIM_FRAMESET_28 ; 1a
+ db SPRITE_ANIM_FRAMESET_28 ; 1b
+ db SPRITE_ANIM_FRAMESET_28 ; 1c
+ db SPRITE_ANIM_FRAMESET_28 ; 1d
+ db SPRITE_ANIM_FRAMESET_28 ; 1e
+ db SPRITE_ANIM_FRAMESET_28 ; 1f
+ db SPRITE_ANIM_FRAMESET_28 ; 20
+ db SPRITE_ANIM_FRAMESET_28 ; 21
+ db SPRITE_ANIM_FRAMESET_28 ; 22
+ db SPRITE_ANIM_FRAMESET_28 ; 23
+ db SPRITE_ANIM_FRAMESET_28 ; 24
+ db SPRITE_ANIM_FRAMESET_28 ; 25
+ db SPRITE_ANIM_FRAMESET_28 ; 26
+ db SPRITE_ANIM_FRAMESET_28 ; 27
+ db SPRITE_ANIM_FRAMESET_28 ; 28
+ db SPRITE_ANIM_FRAMESET_28 ; 29
+ db SPRITE_ANIM_FRAMESET_28 ; 2a
+ db SPRITE_ANIM_FRAMESET_28 ; 2b
+ db SPRITE_ANIM_FRAMESET_29 ; 2c
+ db SPRITE_ANIM_FRAMESET_26 ; 2d
+ db SPRITE_ANIM_FRAMESET_26 ; 2e
+ db SPRITE_ANIM_FRAMESET_26 ; 2f
+
+.UpdateObjectFlags: ; 11d2ee (47:52ee)
+ ld hl, wcd24
+ and [hl]
+ jr nz, .update_y_offset
+ ld a, e
+ ld hl, wcd23
+ and [hl]
+ jr z, .reset_y_offset
+ ld hl, SPRITEANIMSTRUCT_0E
+ add hl, bc
+ ld a, [hl]
+ and a
+ jr z, .flip_bit_0
+ dec [hl]
+ ret
+
+.flip_bit_0
+ ld a, $0
+ ld [hld], a
+ ld a, $1
+ xor [hl]
+ ld [hl], a
+ and a
+ jr nz, .update_y_offset
+.reset_y_offset
+ ld hl, SPRITEANIMSTRUCT_YOFFSET
+ add hl, bc
+ xor a
+ ld [hl], a
+ ret
+
+.update_y_offset
+ ld hl, SPRITEANIMSTRUCT_YCOORD
+ add hl, bc
+ ld a, $b0
+ sub [hl]
+ ld hl, SPRITEANIMSTRUCT_YOFFSET
+ add hl, bc
+ ld [hl], a
+ ret
+
+Function11d323: ; 11d323
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, Palette_11d33a
+ ld de, UnknBGPals
+ ld bc, 16 palettes
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ ret
+; 11d33a
+
+Palette_11d33a:
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 16, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 23, 17, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+; 11d3ba
+
+EZChat_GetSeenPokemonByKana: ; 11d3ba
+ ld a, [rSVBK]
+ push af
+ ld hl, $c648
+ ld a, w5_d800 % $100
+ ld [wcd2d], a
+ ld [hli], a
+ ld a, w5_d800 / $100
+ ld [wcd2e], a
+ ld [hl], a
+
+ ld a, SortedPokemon % $100
+ ld [wcd2f], a
+ ld a, SortedPokemon / $100
+ ld [wcd30], a
+
+ ld a, $c6a8 % $100
+ ld [wcd31], a
+ ld a, $c6a8 / $100
+ ld [wcd32], a
+
+ ld a, $c64a % $100
+ ld [wcd33], a
+ ld a, $c64a / $100
+ ld [wcd34], a
+
+ ld hl, EZChat_SortedWords
+ ld a, (EZChat_SortedWordsEnd - EZChat_SortedWords) / 4
+
+.MasterLoop: ; 11d3ef
+ push af
+; read row
+; offset
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+; size
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+; save the pointer to the next row
+ push hl
+; add de to w3_d000
+ ld hl, w3_d000
+ add hl, de
+; recover de from wcd2d (default: w5_d800)
+ ld a, [wcd2d]
+ ld e, a
+ ld a, [wcd2e]
+ ld d, a
+; save bc for later
+ push bc
+
+.loop1
+; copy 2*bc bytes from 3:hl to 5:de
+ ld a, $3
+ ld [rSVBK], a
+ ld a, [hli]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ pop af
+ ld [de], a
+ inc de
+
+ ld a, $3
+ ld [rSVBK], a
+ ld a, [hli]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ pop af
+ ld [de], a
+ inc de
+
+ dec bc
+ ld a, c
+ or b
+ jr nz, .loop1
+
+; recover the pointer from wcd2f (default: SortedPokemon)
+ ld a, [wcd2f]
+ ld l, a
+ ld a, [wcd30]
+ ld h, a
+; copy the pointer from [hl] to bc
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+; store the pointer to the next pointer back in wcd2f
+ ld a, l
+ ld [wcd2f], a
+ ld a, h
+ ld [wcd30], a
+; push pop that pointer to hl
+ push bc
+ pop hl
+ ld c, $0
+.loop2
+; Have you seen this Pokemon?
+ ld a, [hl]
+ cp $ff
+ jr z, .done
+ call .CheckSeenMon
+ jr nz, .next
+; If not, skip it.
+ inc hl
+ jr .loop2
+
+.next
+; If so, append it to the list at 5:de, and increase the count.
+ ld a, [hli]
+ ld [de], a
+ inc de
+ xor a
+ ld [de], a
+ inc de
+ inc c
+ jr .loop2
+
+.done
+; Remember the original value of bc from the table?
+; Well, the stack remembers it, and it's popping it to hl.
+ pop hl
+; Add the number of seen Pokemon from the list.
+ ld b, $0
+ add hl, bc
+; Push pop to bc.
+ push hl
+ pop bc
+; Load the pointer from [wcd31] (default: $c6a8)
+ ld a, [wcd31]
+ ld l, a
+ ld a, [wcd32]
+ ld h, a
+; Save the quantity from bc to [hl]
+ ld a, c
+ ld [hli], a
+ ld a, b
+ ld [hli], a
+; Save the new value of hl to [wcd31]
+ ld a, l
+ ld [wcd31], a
+ ld a, h
+ ld [wcd32], a
+; Recover the pointer from [wcd33] (default: $c64a)
+ ld a, [wcd33]
+ ld l, a
+ ld a, [wcd34]
+ ld h, a
+; Save the current value of de there
+ ld a, e
+ ld [wcd2d], a
+ ld [hli], a
+ ld a, d
+ ld [wcd2e], a
+; Save the new value of hl back to [wcd33]
+ ld [hli], a
+ ld a, l
+ ld [wcd33], a
+ ld a, h
+ ld [wcd34], a
+; Next row
+ pop hl
+ pop af
+ dec a
+ jr z, .ExitMasterLoop
+ jp .MasterLoop
+
+.ExitMasterLoop:
+ pop af
+ ld [rSVBK], a
+ ret
+; 11d493
+
+.CheckSeenMon: ; 11d493
+ push hl
+ push bc
+ push de
+ dec a
+ ld hl, rSVBK
+ ld e, $1
+ ld [hl], e
+ call CheckSeenMon
+ ld hl, rSVBK
+ ld e, $5
+ ld [hl], e
+ pop de
+ pop bc
+ pop hl
+ ret
+; 11d4aa
+
+EZChat_GetCategoryWordsByKana: ; 11d4aa
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+
+ ; load pointers
+ ld hl, MobileEZChatCategoryPointers
+ ld bc, MobileEZChatData_WordAndPageCounts
+
+ ; init WRAM registers
+ xor a
+ ld [wcd2d], a
+ inc a
+ ld [wcd2e], a
+
+ ; enter the first loop
+ ld a, 14
+.loop1
+ push af
+
+ ; load the pointer to the category
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ push hl
+
+ ; skip to the attributes
+ ld hl, NAME_LENGTH_JAPANESE - 1
+ add hl, de
+
+ ; get the number of words in the category
+ ld a, [bc] ; number of entries to copy
+ inc bc
+ inc bc
+ push bc
+
+.loop2
+ push af
+ push hl
+
+ ; load offset at [hl]
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+
+ ; add to w3_d000
+ ld hl, w3_d000
+ add hl, de
+
+ ; copy from wcd2d and increment [wcd2d] in place
+ ld a, [wcd2d]
+ ld [hli], a
+ inc a
+ ld [wcd2d], a
+
+ ; copy from wcd2e
+ ld a, [wcd2e]
+ ld [hl], a
+
+ ; next entry
+ pop hl
+ ld de, 8
+ add hl, de
+ pop af
+ dec a
+ jr nz, .loop2
+
+ ; reset and go to next category
+ ld hl, wcd2d
+ xor a
+ ld [hli], a
+ inc [hl]
+ pop bc
+ pop hl
+ pop af
+ dec a
+ jr nz, .loop1
+ pop af
+ ld [rSVBK], a
+ ret
+; 11d4fe
+
+SortedPokemon:
+; Pokemon sorted by kana.
+; Notably, Rhydon is missing.
+ dw .a
+ dw .i
+ dw .u
+ dw .e
+ dw .o
+ dw .ka_ga
+ dw .ki_gi
+ dw .ku_gu
+ dw .ke_ge
+ dw .ko_go
+ dw .sa_za
+ dw .shi_ji
+ dw .su_zu
+ dw .se_ze
+ dw .so_zo
+ dw .ta_da
+ dw .chi_dhi
+ dw .tsu_du
+ dw .te_de
+ dw .to_do
+ dw .na
+ dw .ni
+ dw .nu
+ dw .ne
+ dw .no
+ dw .ha_ba_pa
+ dw .hi_bi_pi
+ dw .fu_bu_pu
+ dw .he_be_pe
+ dw .ho_bo_po
+ dw .ma
+ dw .mi
+ dw .mu
+ dw .me
+ dw .mo
+ dw .ya
+ dw .yu
+ dw .yo
+ dw .ra
+ dw .ri
+ dw .ru
+ dw .re
+ dw .ro
+ dw .wa
+ dw .end
+
+.a: db EKANS, ARBOK, SEAKING, ARIADOS, CROCONAW, UNOWN, -1
+.i: db EEVEE, GEODUDE, SPINARAK, PILOSWINE, ONIX, -1
+.u: db ARCANINE, SUDOWOODO, WEEPINBELL, VICTREEBEL, WOOPER, SWINUB, -1
+.e: db SKARMORY, AIPOM, ESPEON, HITMONCHAN, ELEKID, ELECTABUZZ, ENTEI, -1
+.o: db FERALIGATR, FURRET, OCTILLERY, PRIMEAPE, SENTRET, STANTLER, SPEAROW, FEAROW, OMASTAR, OMANYTE, -1
+.ka_ga db GROWLITHE, MACHAMP, DRAGONITE, PINSIR, SNORLAX, KABUTO, KABUTOPS, HITMONTOP, WARTORTLE, BLASTOISE, FARFETCH_D, CUBONE, MAROWAK, KANGASKHAN, -1
+.ki_gi db SUNFLORA, CATERPIE, GYARADOS, RAPIDASH, NINETALES, GIRAFARIG, BELLOSSOM, KINGDRA, KINGLER, -1
+.ku_gu db GLOOM, PINECO, GLIGAR, KRABBY, GRANBULL, CROBAT, -1
+.ke_ge db ABRA, GENGAR, TAUROS, -1
+.ko_go db MAGIKARP, MAGNEMITE, GASTLY, HAUNTER, MACHOKE, KAKUNA, PSYDUCK, PHANPY, RATTATA, GOLDUCK, GOLBAT, GOLEM, GRAVELER, VENONAT, -1
+.sa_za db RHYHORN, PUPITAR, CORSOLA, HITMONLEE, ZAPDOS, JOLTEON, SANDSHREW, SANDSLASH, -1 ; RHYDON should lead this list
+.shi_ji db SEADRA, SHELLDER, VAPOREON, DEWGONG, -1
+.su_zu db SUICUNE, STARMIE, SCYTHER, ZUBAT, BEEDRILL, HYPNO, DROWZEE, -1
+.se_ze db SQUIRTLE, CELEBI, -1
+.so_zo db WOBBUFFET, -1
+.ta_da db DUGTRIO, HORSEA, EXEGGCUTE, -1
+.chi_dhi db CHIKORITA, CHINCHOU, -1
+.tsu_du db SHUCKLE, -1
+.te_de db DIGLETT, REMORAID, DELIBIRD, HOUNDOUR, AMPHAROS, -1
+.to_do db DODUO, DODRIO, SMEARGLE, KOFFING, TENTACRUEL, TOGETIC, TOGEPI, GOLDEEN, METAPOD, DONPHAN, -1
+.na db ODDISH, EXEGGUTOR, -1
+.ni db NIDOKING, NIDOQUEEN, NIDORAN_M, NIDORAN_F, NIDORINA, NIDORINO, MEOWTH, SNEASEL, POLIWHIRL, POLITOED, POLIWRATH, POLIWAG, -1
+.nu db QUAGSIRE, -1
+.ne db NATU, XATU, -1
+.no db DUNSPARCE, -1
+.ha_ba_pa db SEEL, STEELIX, TYPHLOSION, DRAGONAIR, BUTTERFREE, SCIZOR, HOPPIP, BLISSEY, PARAS, PARASECT, QWILFISH, MR__MIME, TYROGUE, CLOYSTER, TYRANITAR, -1
+.hi_bi_pi db CLEFFA, WEEDLE, PIKACHU, CLEFABLE, PIDGEOT, PIDGEOTTO, PICHU, CLEFAIRY, CHARMANDER, STARYU, CYNDAQUIL, SUNKERN, TEDDIURSA, VOLTORB, -1
+.fu_bu_pu db MOLTRES, FLAREON, ALAKAZAM, MAGMAR, FORRETRESS, WIGGLYTUFF, IVYSAUR, BULBASAUR, VENUSAUR, AERODACTYL, MAGBY, IGGLYBUFF, UMBREON, ARTICUNO, JIGGLYPUFF, SNUBBULL, -1
+.he_be_pe db BAYLEEF, GRIMER, MUK, HERACROSS, HOUNDOOM, PERSIAN, LICKITUNG, -1
+.ho_bo_po db HO_OH, HOOTHOOT, PIDGEY, PONYTA, SKIPLOOM, PORYGON, PORYGON2, -1
+.ma db MAGCARGO, SLUGMA, QUILAVA, BELLSPROUT, WEEZING, MARILL, AZUMARILL, ELECTRODE, MANKEY, MANTINE, -1
+.mi db DRATINI, MEW, MEWTWO, MILTANK, -1
+.mu db MISDREAVUS, SMOOCHUM, -1
+.me db MEGANIUM, DITTO, TENTACOOL, MAREEP, -1
+.mo db FLAAFFY, VENOMOTH, TANGELA, -1
+.ya db SLOWKING, SLOWBRO, SLOWPOKE, MURKROW, YANMA, -1
+.yu db KADABRA, -1
+.yo db LARVITAR, NOCTOWL, -1
+.ra db RAIKOU, RAICHU, CHANSEY, RATICATE, LAPRAS, VILEPLUME, LANTURN, -1
+.ri db CHARMELEON, CHARIZARD, URSARING, -1
+.ru db JYNX, LUGIA, -1
+.re db MAGNETON, LEDIAN, LEDYBA, -1
+.ro db VULPIX, -1
+.wa db JUMPLUFF, TOTODILE, MACHOP;, -1
+.end db -1
+; 11d67e
+
+GFX_11d67e:
+INCBIN "gfx/pokedex/select_start.2bpp"
+; 11d6de
+
+LZ_11d6de:
+INCBIN "gfx/pokedex/slowpoke.2bpp.lz"
+; 11da52
+
+MobileEZChatCategoryNames: ; 11da52
+; Fixed message categories
+ db "ポケモン@@" ; 00
+ db "タイプ@@@" ; 01
+ db "あいさつ@@" ; 02
+ db "ひと@@@@" ; 03
+ db "バトル@@@" ; 04
+ db "こえ@@@@" ; 05
+ db "かいわ@@@" ; 06
+ db "きもち@@@" ; 07
+ db "じょうたい@" ; 08
+ db "せいかつ@@" ; 09
+ db "しゅみ@@@" ; 0a
+ db "こうどう@@" ; 0b
+ db "じかん@@@" ; 0c
+ db "むすび@@@" ; 0d
+ db "あれこれ@@" ; 0e
+; 11daac
+
+MobileEZChatCategoryPointers: ; 11daac
+; entries correspond to EZCHAT_* constants
+ dw .Types ; 01
+ dw .Greetings ; 02
+ dw .People ; 03
+ dw .Battle ; 04
+ dw .Exclamations ; 05
+ dw .Conversation ; 06
+ dw .Feelings ; 07
+ dw .Conditions ; 08
+ dw .Life ; 09
+ dw .Hobbies ; 0a
+ dw .Actions ; 0b
+ dw .Time ; 0c
+ dw .Farewells ; 0d
+ dw .ThisAndThat ; 0e
+
+.Types: ; 11dac8
+ db "あく@@@", $26, $0, $0
+ db "いわ@@@", $aa, $0, $0
+ db "エスパー@", $da, $0, $0
+ db "かくとう@", $4e, $1, $0
+ db "くさ@@@", $ba, $1, $0
+ db "ゴースト@", $e4, $1, $0
+ db "こおり@@", $e6, $1, $0
+ db "じめん@@", $68, $2, $0
+ db "タイプ@@", $e8, $2, $0
+ db "でんき@@", $8e, $3, $0
+ db "どく@@@", $ae, $3, $0
+ db "ドラゴン@", $bc, $3, $0
+ db "ノーマル@", $22, $4, $0
+ db "はがね@@", $36, $4, $0
+ db "ひこう@@", $5e, $4, $0
+ db "ほのお@@", $b2, $4, $0
+ db "みず@@@", $f4, $4, $0
+ db "むし@@@", $12, $5, $0
+
+.Greetings: ; 11db58
+ db "ありがと@", $58, $0, $0
+ db "ありがとう", $5a, $0, $0
+ db "いくぜ!@", $80, $0, $0
+ db "いくよ!@", $82, $0, $0
+ db "いくわよ!", $84, $0, $0
+ db "いやー@@", $a6, $0, $0
+ db "おっす@@", $a, $1, $0
+ db "おはつです", $22, $1, $0
+ db "おめでとう", $2a, $1, $0
+ db "ごめん@@", $f8, $1, $0
+ db "ごめんよ@", $fa, $1, $0
+ db "こらっ@@", $fc, $1, $0
+ db "こんちは!", $a, $2, $0
+ db "こんにちは", $10, $2, $0
+ db "さようなら", $28, $2, $0
+ db "サンキュー", $2e, $2, $0
+ db "さんじょう", $30, $2, $0
+ db "しっけい@", $48, $2, $0
+ db "しつれい@", $4c, $2, $0
+ db "じゃーね@", $6c, $2, $0
+ db "すいません", $8c, $2, $0
+ db "それじゃ@", $ca, $2, $0
+ db "どうも@@", $a6, $3, $0
+ db "なんじゃ@", $ee, $3, $0
+ db "ハーイ@@", $2c, $4, $0
+ db "はいはい@", $32, $4, $0
+ db "バイバイ@", $34, $4, $0
+ db "へイ@@@", $8a, $4, $0
+ db "またね@@", $de, $4, $0
+ db "もしもし@", $32, $5, $0
+ db "やあ@@@", $3e, $5, $0
+ db "やっほー@", $4e, $5, $0
+ db "よう@@@", $62, $5, $0
+ db "ようこそ@", $64, $5, $0
+ db "よろしく@", $80, $5, $0
+ db "らっしゃい", $94, $5, $0
+
+.People: ; 11dc78
+ db "あいて@@", $1c, $0, $0
+ db "あたし@@", $36, $0, $0
+ db "あなた@@", $40, $0, $0
+ db "あなたが@", $42, $0, $0
+ db "あなたに@", $44, $0, $0
+ db "あなたの@", $46, $0, $0
+ db "あなたは@", $48, $0, $0
+ db "あなたを@", $4a, $0, $0
+ db "おかあさん", $e8, $0, $0
+ db "おじいさん", $fc, $0, $0
+ db "おじさん@", $2, $1, $0
+ db "おとうさん", $e, $1, $0
+ db "おとこのこ", $10, $1, $0
+ db "おとな@@", $14, $1, $0
+ db "おにいさん", $16, $1, $0
+ db "おねえさん", $18, $1, $0
+ db "おばあさん", $1c, $1, $0
+ db "おばさん@", $20, $1, $0
+ db "おれさま@", $34, $1, $0
+ db "おんなのこ", $3a, $1, $0
+ db "ガール@@", $40, $1, $0
+ db "かぞく@@", $52, $1, $0
+ db "かのじょ@", $72, $1, $0
+ db "かれ@@@", $7c, $1, $0
+ db "きみ@@@", $9a, $1, $0
+ db "きみが@@", $9c, $1, $0
+ db "きみに@@", $9e, $1, $0
+ db "きみの@@", $a0, $1, $0
+ db "きみは@@", $a2, $1, $0
+ db "きみを@@", $a4, $1, $0
+ db "ギャル@@", $ae, $1, $0
+ db "きょうだい", $b2, $1, $0
+ db "こども@@", $f0, $1, $0
+ db "じぶん@@", $54, $2, $0
+ db "じぶんが@", $56, $2, $0
+ db "じぶんに@", $58, $2, $0
+ db "じぶんの@", $5a, $2, $0
+ db "じぶんは@", $5c, $2, $0
+ db "じぶんを@", $5e, $2, $0
+ db "だれ@@@", $18, $3, $0
+ db "だれか@@", $1a, $3, $0
+ db "だれが@@", $1c, $3, $0
+ db "だれに@@", $1e, $3, $0
+ db "だれの@@", $20, $3, $0
+ db "だれも@@", $22, $3, $0
+ db "だれを@@", $24, $3, $0
+ db "ちゃん@@", $38, $3, $0
+ db "ともだち@", $b8, $3, $0
+ db "なかま@@", $d4, $3, $0
+ db "ひと@@@", $62, $4, $0
+ db "ボーイ@@", $98, $4, $0
+ db "ボク@@@", $a0, $4, $0
+ db "ボクが@@", $a2, $4, $0
+ db "ボクに@@", $a4, $4, $0
+ db "ボクの@@", $a6, $4, $0
+ db "ボクは@@", $a8, $4, $0
+ db "ボクを@@", $aa, $4, $0
+ db "みんな@@", $4, $5, $0
+ db "みんなが@", $6, $5, $0
+ db "みんなに@", $8, $5, $0
+ db "みんなの@", $a, $5, $0
+ db "みんなは@", $c, $5, $0
+ db "ライバル@", $8a, $5, $0
+ db "わたし@@", $c2, $5, $0
+ db "わたしが@", $c4, $5, $0
+ db "わたしに@", $c6, $5, $0
+ db "わたしの@", $c8, $5, $0
+ db "わたしは@", $ca, $5, $0
+ db "わたしを@", $cc, $5, $0
+
+.Battle: ; 11dea0
+ db "あいしょう", $18, $0, $0
+ db "いけ!@@", $88, $0, $0
+ db "いちばん@", $96, $0, $0
+ db "かくご@@", $4c, $1, $0
+ db "かたせて@", $54, $1, $0
+ db "かち@@@", $56, $1, $0
+ db "かつ@@@", $58, $1, $0
+ db "かった@@", $60, $1, $0
+ db "かったら@", $62, $1, $0
+ db "かって@@", $64, $1, $0
+ db "かてない@", $66, $1, $0
+ db "かてる@@", $68, $1, $0
+ db "かなわない", $70, $1, $0
+ db "きあい@@", $84, $1, $0
+ db "きめた@@", $a8, $1, $0
+ db "きりふだ@", $b6, $1, $0
+ db "くらえ@@", $c2, $1, $0
+ db "こい!@@", $da, $1, $0
+ db "こうげき@", $e0, $1, $0
+ db "こうさん@", $e2, $1, $0
+ db "こんじょう", $8, $2, $0
+ db "さいのう@", $16, $2, $0
+ db "さくせん@", $1a, $2, $0
+ db "さばき@@", $22, $2, $0
+ db "しょうぶ@", $7e, $2, $0
+ db "しょうり@", $80, $2, $0
+ db "せめ@@@", $b4, $2, $0
+ db "センス@@", $b6, $2, $0
+ db "たいせん@", $e6, $2, $0
+ db "たたかい@", $f6, $2, $0
+ db "ちから@@", $32, $3, $0
+ db "チャレンジ", $36, $3, $0
+ db "つよい@@", $58, $3, $0
+ db "つよすぎ@", $5a, $3, $0
+ db "つらい@@", $5c, $3, $0
+ db "つらかった", $5e, $3, $0
+ db "てかげん@", $6c, $3, $0
+ db "てき@@@", $6e, $3, $0
+ db "てんさい@", $90, $3, $0
+ db "でんせつ@", $94, $3, $0
+ db "トレーナー", $c6, $3, $0
+ db "にげ@@@", $4, $4, $0
+ db "ぬるい@@", $10, $4, $0
+ db "ねらう@@", $16, $4, $0
+ db "バトル@@", $4a, $4, $0
+ db "ファイト@", $72, $4, $0
+ db "ふっかつ@", $78, $4, $0
+ db "ポイント@", $94, $4, $0
+ db "ポケモン@", $ac, $4, $0
+ db "ほんき@@", $bc, $4, $0
+ db "まいった!", $c4, $4, $0
+ db "まけ@@@", $c8, $4, $0
+ db "まけたら@", $ca, $4, $0
+ db "まけて@@", $cc, $4, $0
+ db "まける@@", $ce, $4, $0
+ db "まもり@@", $ea, $4, $0
+ db "みかた@@", $f2, $4, $0
+ db "みとめない", $fe, $4, $0
+ db "みとめる@", $0, $5, $0
+ db "むてき@@", $16, $5, $0
+ db "もらった!", $3c, $5, $0
+ db "よゆう@@", $7a, $5, $0
+ db "よわい@@", $82, $5, $0
+ db "よわすぎ@", $84, $5, $0
+ db "らくしょう", $8e, $5, $0
+ db "りーダー@", $9e, $5, $0
+ db "ルール@@", $a0, $5, $0
+ db "レべル@@", $a6, $5, $0
+ db "わざ@@@", $be, $5, $0
+
+.Exclamations: ; 11e0c8
+ db "!@@@@", $0, $0, $0
+ db "!!@@@", $2, $0, $0
+ db "!?@@@", $4, $0, $0
+ db "?@@@@", $6, $0, $0
+ db "…@@@@", $8, $0, $0
+ db "…!@@@", $a, $0, $0
+ db "………@@", $c, $0, $0
+ db "ー@@@@", $e, $0, $0
+ db "ーーー@@", $10, $0, $0
+ db "あーあ@@", $14, $0, $0
+ db "あーん@@", $16, $0, $0
+ db "あははー@", $52, $0, $0
+ db "あら@@@", $54, $0, $0
+ db "いえ@@@", $72, $0, $0
+ db "イエス@@", $74, $0, $0
+ db "うう@@@", $ac, $0, $0
+ db "うーん@@", $ae, $0, $0
+ db "うおー!@", $b0, $0, $0
+ db "うおりゃー", $b2, $0, $0
+ db "うひょー@", $bc, $0, $0
+ db "うふふ@@", $be, $0, $0
+ db "うわー@@", $ca, $0, $0
+ db "うわーん@", $cc, $0, $0
+ db "ええ@@@", $d2, $0, $0
+ db "えー@@@", $d4, $0, $0
+ db "えーん@@", $d6, $0, $0
+ db "えへへ@@", $dc, $0, $0
+ db "おいおい@", $e0, $0, $0
+ db "おお@@@", $e2, $0, $0
+ db "おっと@@", $c, $1, $0
+ db "がーん@@", $42, $1, $0
+ db "キャー@@", $aa, $1, $0
+ db "ギャー@@", $ac, $1, $0
+ db "ぐふふふふ", $bc, $1, $0
+ db "げっ@@@", $ce, $1, $0
+ db "しくしく@", $3e, $2, $0
+ db "ちえっ@@", $2e, $3, $0
+ db "てへ@@@", $86, $3, $0
+ db "ノー@@@", $20, $4, $0
+ db "はあー@@", $2a, $4, $0
+ db "はい@@@", $30, $4, $0
+ db "はっはっは", $48, $4, $0
+ db "ひいー@@", $56, $4, $0
+ db "ひゃあ@@", $6a, $4, $0
+ db "ふっふっふ", $7c, $4, $0
+ db "ふにゃ@@", $7e, $4, $0
+ db "ププ@@@", $80, $4, $0
+ db "ふふん@@", $82, $4, $0
+ db "ふん@@@", $88, $4, $0
+ db "へっへっへ", $8e, $4, $0
+ db "へへー@@", $90, $4, $0
+ db "ほーほほほ", $9c, $4, $0
+ db "ほら@@@", $b6, $4, $0
+ db "まあ@@@", $c0, $4, $0
+ db "むきー!!", $10, $5, $0
+ db "むふー@@", $18, $5, $0
+ db "むふふ@@", $1a, $5, $0
+ db "むむ@@@", $1c, $5, $0
+ db "よーし@@", $6a, $5, $0
+ db "よし!@@", $72, $5, $0
+ db "ラララ@@", $98, $5, $0
+ db "わーい@@", $ac, $5, $0
+ db "わーん!!", $b0, $5, $0
+ db "ワォ@@@", $b2, $5, $0
+ db "わっ!!@", $ce, $5, $0
+ db "わははは!", $d0, $5, $0
+
+.Conversation: ; 11e2d8
+ db "あのね@@", $50, $0, $0
+ db "あんまり@", $6e, $0, $0
+ db "いじわる@", $8e, $0, $0
+ db "うそ@@@", $b6, $0, $0
+ db "うむ@@@", $c4, $0, $0
+ db "おーい@@", $e4, $0, $0
+ db "おすすめ@", $6, $1, $0
+ db "おばかさん", $1e, $1, $0
+ db "かなり@@", $6e, $1, $0
+ db "から@@@", $7a, $1, $0
+ db "きぶん@@", $98, $1, $0
+ db "けど@@@", $d6, $1, $0
+ db "こそ@@@", $ea, $1, $0
+ db "こと@@@", $ee, $1, $0
+ db "さあ@@@", $12, $2, $0
+ db "さっぱり@", $1e, $2, $0
+ db "さて@@@", $20, $2, $0
+ db "じゅうぶん", $72, $2, $0
+ db "すぐ@@@", $94, $2, $0
+ db "すごく@@", $98, $2, $0
+ db "すこしは@", $9a, $2, $0
+ db "すっっごい", $a0, $2, $0
+ db "ぜーんぜん", $b0, $2, $0
+ db "ぜったい@", $b2, $2, $0
+ db "それで@@", $ce, $2, $0
+ db "だけ@@@", $f2, $2, $0
+ db "だって@@", $fc, $2, $0
+ db "たぶん@@", $6, $3, $0
+ db "たら@@@", $14, $3, $0
+ db "ちょー@@", $3a, $3, $0
+ db "ちょっと@", $3c, $3, $0
+ db "ったら@@", $4e, $3, $0
+ db "って@@@", $50, $3, $0
+ db "ていうか@", $62, $3, $0
+ db "でも@@@", $88, $3, $0
+ db "どうしても", $9c, $3, $0
+ db "とうぜん@", $a0, $3, $0
+ db "どうぞ@@", $a2, $3, $0
+ db "とりあえず", $be, $3, $0
+ db "なあ@@@", $cc, $3, $0
+ db "なんて@@", $f4, $3, $0
+ db "なんでも@", $fc, $3, $0
+ db "なんとか@", $fe, $3, $0
+ db "には@@@", $8, $4, $0
+ db "バッチり@", $46, $4, $0
+ db "ばりばり@", $52, $4, $0
+ db "ほど@@@", $b0, $4, $0
+ db "ほんと@@", $be, $4, $0
+ db "まさに@@", $d0, $4, $0
+ db "マジ@@@", $d2, $4, $0
+ db "マジで@@", $d4, $4, $0
+ db "まったく@", $e4, $4, $0
+ db "まで@@@", $e6, $4, $0
+ db "まるで@@", $ec, $4, $0
+ db "ムード@@", $e, $5, $0
+ db "むしろ@@", $14, $5, $0
+ db "めちゃ@@", $24, $5, $0
+ db "めっぽう@", $28, $5, $0
+ db "もう@@@", $2c, $5, $0
+ db "モード@@", $2e, $5, $0
+ db "もっと@@", $36, $5, $0
+ db "もはや@@", $38, $5, $0
+ db "やっと@@", $4a, $5, $0
+ db "やっぱり@", $4c, $5, $0
+ db "より@@@", $7c, $5, $0
+ db "れば@@@", $a4, $5, $0
+
+.Feelings: ; 11e4e8
+ db "あいたい@", $1a, $0, $0
+ db "あそびたい", $32, $0, $0
+ db "いきたい@", $7c, $0, $0
+ db "うかれて@", $b4, $0, $0
+ db "うれしい@", $c6, $0, $0
+ db "うれしさ@", $c8, $0, $0
+ db "エキサイト", $d8, $0, $0
+ db "えらい@@", $de, $0, $0
+ db "おかしい@", $ec, $0, $0
+ db "ォッケー@", $8, $1, $0
+ db "かえりたい", $48, $1, $0
+ db "がっくし@", $5a, $1, $0
+ db "かなしい@", $6c, $1, $0
+ db "がんばって", $80, $1, $0
+ db "きがしない", $86, $1, $0
+ db "きがする@", $88, $1, $0
+ db "ききたい@", $8a, $1, $0
+ db "きになる@", $90, $1, $0
+ db "きのせい@", $96, $1, $0
+ db "きらい@@", $b4, $1, $0
+ db "くやしい@", $be, $1, $0
+ db "くやしさ@", $c0, $1, $0
+ db "さみしい@", $24, $2, $0
+ db "ざんねん@", $32, $2, $0
+ db "しあわせ@", $36, $2, $0
+ db "したい@@", $44, $2, $0
+ db "したくない", $46, $2, $0
+ db "しまった@", $64, $2, $0
+ db "しょんぼり", $82, $2, $0
+ db "すき@@@", $92, $2, $0
+ db "だいきらい", $da, $2, $0
+ db "たいくつ@", $dc, $2, $0
+ db "だいじ@@", $de, $2, $0
+ db "だいすき@", $e4, $2, $0
+ db "たいへん@", $ea, $2, $0
+ db "たのしい@", $0, $3, $0
+ db "たのしすぎ", $2, $3, $0
+ db "たべたい@", $8, $3, $0
+ db "ダメダメ@", $e, $3, $0
+ db "たりない@", $16, $3, $0
+ db "ちくしょー", $34, $3, $0
+ db "どうしよう", $9e, $3, $0
+ db "ドキドキ@", $ac, $3, $0
+ db "ナイス@@", $d0, $3, $0
+ db "のみたい@", $26, $4, $0
+ db "びっくり@", $60, $4, $0
+ db "ふあん@@", $74, $4, $0
+ db "ふらふら@", $86, $4, $0
+ db "ほしい@@", $ae, $4, $0
+ db "ボロボロ@", $b8, $4, $0
+ db "まだまだ@", $e0, $4, $0
+ db "まてない@", $e8, $4, $0
+ db "まんぞく@", $f0, $4, $0
+ db "みたい@@", $f8, $4, $0
+ db "めずらしい", $22, $5, $0
+ db "メラメラ@", $2a, $5, $0
+ db "やだ@@@", $46, $5, $0
+ db "やったー@", $48, $5, $0
+ db "やばい@@", $50, $5, $0
+ db "やばすぎる", $52, $5, $0
+ db "やられた@", $54, $5, $0
+ db "やられて@", $56, $5, $0
+ db "よかった@", $6e, $5, $0
+ db "ラブラブ@", $96, $5, $0
+ db "ロマン@@", $a8, $5, $0
+ db "ろんがい@", $aa, $5, $0
+ db "わから@@", $b4, $5, $0
+ db "わかり@@", $b6, $5, $0
+ db "わくわく@", $ba, $5, $0
+
+.Conditions: ; 11e710
+ db "あつい@@", $38, $0, $0
+ db "あった@@", $3a, $0, $0
+ db "あり@@@", $56, $0, $0
+ db "ある@@@", $5e, $0, $0
+ db "あわてて@", $6a, $0, $0
+ db "いい@@@", $70, $0, $0
+ db "いか@@@", $76, $0, $0
+ db "イカス@@", $78, $0, $0
+ db "いきおい@", $7a, $0, $0
+ db "いける@@", $8a, $0, $0
+ db "いじょう@", $8c, $0, $0
+ db "いそがしい", $90, $0, $0
+ db "いっしょに", $9a, $0, $0
+ db "いっぱい@", $9c, $0, $0
+ db "いない@@", $a0, $0, $0
+ db "いや@@@", $a4, $0, $0
+ db "いる@@@", $a8, $0, $0
+ db "うまい@@", $c0, $0, $0
+ db "うまく@@", $c2, $0, $0
+ db "おおきい@", $e6, $0, $0
+ db "おくれ@@", $f2, $0, $0
+ db "おしい@@", $fa, $0, $0
+ db "おもしろい", $2c, $1, $0
+ db "おもしろく", $2e, $1, $0
+ db "かっこいい", $5c, $1, $0
+ db "かわいい@", $7e, $1, $0
+ db "かんぺき@", $82, $1, $0
+ db "けっこう@", $d0, $1, $0
+ db "げんき@@", $d8, $1, $0
+ db "こわい@@", $6, $2, $0
+ db "さいこう@", $14, $2, $0
+ db "さむい@@", $26, $2, $0
+ db "さわやか@", $2c, $2, $0
+ db "しかたない", $38, $2, $0
+ db "すごい@@", $96, $2, $0
+ db "すごすぎ@", $9c, $2, $0
+ db "すてき@@", $a4, $2, $0
+ db "たいした@", $e0, $2, $0
+ db "だいじょぶ", $e2, $2, $0
+ db "たかい@@", $ec, $2, $0
+ db "ただしい@", $f8, $2, $0
+ db "だめ@@@", $c, $3, $0
+ db "ちいさい@", $2c, $3, $0
+ db "ちがう@@", $30, $3, $0
+ db "つかれ@@", $48, $3, $0
+ db "とくい@@", $b0, $3, $0
+ db "とまらない", $b6, $3, $0
+ db "ない@@@", $ce, $3, $0
+ db "なかった@", $d2, $3, $0
+ db "なし@@@", $d8, $3, $0
+ db "なって@@", $dc, $3, $0
+ db "はやい@@", $50, $4, $0
+ db "ひかる@@", $5a, $4, $0
+ db "ひくい@@", $5c, $4, $0
+ db "ひどい@@", $64, $4, $0
+ db "ひとりで@", $66, $4, $0
+ db "ひま@@@", $68, $4, $0
+ db "ふそく@@", $76, $4, $0
+ db "へた@@@", $8c, $4, $0
+ db "まちがって", $e2, $4, $0
+ db "やさしい@", $42, $5, $0
+ db "よく@@@", $70, $5, $0
+ db "よわって@", $86, $5, $0
+ db "らく@@@", $8c, $5, $0
+ db "らしい@@", $90, $5, $0
+ db "わるい@@", $d4, $5, $0
+
+.Life: ; 11e920
+ db "アルバイト", $64, $0, $0
+ db "うち@@@", $ba, $0, $0
+ db "おかね@@", $ee, $0, $0
+ db "おこづかい", $f4, $0, $0
+ db "おふろ@@", $24, $1, $0
+ db "がっこう@", $5e, $1, $0
+ db "きねん@@", $92, $1, $0
+ db "グループ@", $c6, $1, $0
+ db "ゲット@@", $d2, $1, $0
+ db "こうかん@", $de, $1, $0
+ db "しごと@@", $40, $2, $0
+ db "しゅぎょう", $74, $2, $0
+ db "じゅぎょう", $76, $2, $0
+ db "じゅく@@", $78, $2, $0
+ db "しんか@@", $88, $2, $0
+ db "ずかん@@", $90, $2, $0
+ db "せいかつ@", $ae, $2, $0
+ db "せんせい@", $b8, $2, $0
+ db "センター@", $ba, $2, $0
+ db "タワー@@", $28, $3, $0
+ db "つうしん@", $40, $3, $0
+ db "テスト@@", $7e, $3, $0
+ db "テレビ@@", $8c, $3, $0
+ db "でんわ@@", $96, $3, $0
+ db "どうぐ@@", $9a, $3, $0
+ db "トレード@", $c4, $3, $0
+ db "なまえ@@", $e8, $3, $0
+ db "ニュース@", $a, $4, $0
+ db "にんき@@", $c, $4, $0
+ db "パーティー", $2e, $4, $0
+ db "べんきょう", $92, $4, $0
+ db "マシン@@", $d6, $4, $0
+ db "めいし@@", $1e, $5, $0
+ db "メッセージ", $26, $5, $0
+ db "もようがえ", $3a, $5, $0
+ db "ゆめ@@@", $5a, $5, $0
+ db "ようちえん", $66, $5, $0
+ db "ラジォ@@", $92, $5, $0
+ db "ワールド@", $ae, $5, $0
+
+.Hobbies: ; 11ea58
+ db "アイドル@", $1e, $0, $0
+ db "アニメ@@", $4c, $0, $0
+ db "うた@@@", $b8, $0, $0
+ db "えいが@@", $d0, $0, $0
+ db "おかし@@", $ea, $0, $0
+ db "おしゃべり", $4, $1, $0
+ db "おままごと", $28, $1, $0
+ db "おもちゃ@", $30, $1, $0
+ db "おんがく@", $38, $1, $0
+ db "カード@@", $3e, $1, $0
+ db "かいもの@", $46, $1, $0
+ db "グルメ@@", $c8, $1, $0
+ db "ゲーム@@", $cc, $1, $0
+ db "ざっし@@", $1c, $2, $0
+ db "さんぽ@@", $34, $2, $0
+ db "じてんしゃ", $50, $2, $0
+ db "しゅみ@@", $7a, $2, $0
+ db "スポーツ@", $a8, $2, $0
+ db "ダイエット", $d8, $2, $0
+ db "たからもの", $f0, $2, $0
+ db "たび@@@", $4, $3, $0
+ db "ダンス@@", $2a, $3, $0
+ db "つり@@@", $60, $3, $0
+ db "デート@@", $6a, $3, $0
+ db "でんしゃ@", $92, $3, $0
+ db "ぬいぐるみ", $e, $4, $0
+ db "パソコン@", $3e, $4, $0
+ db "はな@@@", $4c, $4, $0
+ db "ヒーロー@", $58, $4, $0
+ db "ひるね@@", $6e, $4, $0
+ db "ヒロイン@", $70, $4, $0
+ db "ぼうけん@", $96, $4, $0
+ db "ボード@@", $9a, $4, $0
+ db "ボール@@", $9e, $4, $0
+ db "ほん@@@", $ba, $4, $0
+ db "マンガ@@", $ee, $4, $0
+ db "やくそく@", $40, $5, $0
+ db "やすみ@@", $44, $5, $0
+ db "よてい@@", $74, $5, $0
+
+.Actions: ; 11eb90
+ db "あう@@@", $20, $0, $0
+ db "あきらめ@", $24, $0, $0
+ db "あげる@@", $28, $0, $0
+ db "あせる@@", $2e, $0, $0
+ db "あそび@@", $30, $0, $0
+ db "あそぶ@@", $34, $0, $0
+ db "あつめ@@", $3e, $0, $0
+ db "あるき@@", $60, $0, $0
+ db "あるく@@", $62, $0, $0
+ db "いく@@@", $7e, $0, $0
+ db "いけ@@@", $86, $0, $0
+ db "おき@@@", $f0, $0, $0
+ db "おこり@@", $f6, $0, $0
+ db "おこる@@", $f8, $0, $0
+ db "おしえ@@", $fe, $0, $0
+ db "おしえて@", $0, $1, $0
+ db "おねがい@", $1a, $1, $0
+ db "おぼえ@@", $26, $1, $0
+ db "かえる@@", $4a, $1, $0
+ db "がまん@@", $74, $1, $0
+ db "きく@@@", $8c, $1, $0
+ db "きたえ@@", $8e, $1, $0
+ db "きめ@@@", $a6, $1, $0
+ db "くる@@@", $c4, $1, $0
+ db "さがし@@", $18, $2, $0
+ db "さわぎ@@", $2a, $2, $0
+ db "した@@@", $42, $2, $0
+ db "しって@@", $4a, $2, $0
+ db "して@@@", $4e, $2, $0
+ db "しない@@", $52, $2, $0
+ db "しまう@@", $60, $2, $0
+ db "じまん@@", $66, $2, $0
+ db "しらない@", $84, $2, $0
+ db "しる@@@", $86, $2, $0
+ db "しんじて@", $8a, $2, $0
+ db "する@@@", $aa, $2, $0
+ db "たべる@@", $a, $3, $0
+ db "つかう@@", $42, $3, $0
+ db "つかえ@@", $44, $3, $0
+ db "つかって@", $46, $3, $0
+ db "できない@", $70, $3, $0
+ db "できる@@", $72, $3, $0
+ db "でない@@", $84, $3, $0
+ db "でる@@@", $8a, $3, $0
+ db "なげる@@", $d6, $3, $0
+ db "なやみ@@", $ea, $3, $0
+ db "ねられ@@", $18, $4, $0
+ db "ねる@@@", $1a, $4, $0
+ db "のがし@@", $24, $4, $0
+ db "のむ@@@", $28, $4, $0
+ db "はしり@@", $3a, $4, $0
+ db "はしる@@", $3c, $4, $0
+ db "はたらき@", $40, $4, $0
+ db "はたらく@", $42, $4, $0
+ db "はまって@", $4e, $4, $0
+ db "ぶつけ@@", $7a, $4, $0
+ db "ほめ@@@", $b4, $4, $0
+ db "みせて@@", $f6, $4, $0
+ db "みて@@@", $fc, $4, $0
+ db "みる@@@", $2, $5, $0
+ db "めざす@@", $20, $5, $0
+ db "もって@@", $34, $5, $0
+ db "ゆずる@@", $58, $5, $0
+ db "ゆるす@@", $5c, $5, $0
+ db "ゆるせ@@", $5e, $5, $0
+ db "られない@", $9a, $5, $0
+ db "られる@@", $9c, $5, $0
+ db "わかる@@", $b8, $5, $0
+ db "わすれ@@", $c0, $5, $0
+
+.Time: ; 11edb8
+ db "あき@@@", $22, $0, $0
+ db "あさ@@@", $2a, $0, $0
+ db "あした@@", $2c, $0, $0
+ db "いちにち@", $94, $0, $0
+ db "いつか@@", $98, $0, $0
+ db "いつも@@", $9e, $0, $0
+ db "いま@@@", $a2, $0, $0
+ db "えいえん@", $ce, $0, $0
+ db "おととい@", $12, $1, $0
+ db "おわり@@", $36, $1, $0
+ db "かようび@", $78, $1, $0
+ db "きのう@@", $94, $1, $0
+ db "きょう@@", $b0, $1, $0
+ db "きんようび", $b8, $1, $0
+ db "げつようび", $d4, $1, $0
+ db "このあと@", $f4, $1, $0
+ db "このまえ@", $f6, $1, $0
+ db "こんど@@", $c, $2, $0
+ db "じかん@@", $3c, $2, $0
+ db "じゅうねん", $70, $2, $0
+ db "すいようび", $8e, $2, $0
+ db "スタート@", $9e, $2, $0
+ db "ずっと@@", $a2, $2, $0
+ db "ストップ@", $a6, $2, $0
+ db "そのうち@", $c4, $2, $0
+ db "ついに@@", $3e, $3, $0
+ db "つぎ@@@", $4a, $3, $0
+ db "どようび@", $ba, $3, $0
+ db "なつ@@@", $da, $3, $0
+ db "にちようび", $6, $4, $0
+ db "はじめ@@", $38, $4, $0
+ db "はる@@@", $54, $4, $0
+ db "ひる@@@", $6c, $4, $0
+ db "ふゆ@@@", $84, $4, $0
+ db "まいにち@", $c6, $4, $0
+ db "もくようび", $30, $5, $0
+ db "よなか@@", $76, $5, $0
+ db "よる@@@", $7e, $5, $0
+ db "らいしゅう", $88, $5, $0
+
+.Farewells: ; 11eef0
+ db "いたします", $92, $0, $0
+ db "おります@", $32, $1, $0
+ db "か!?@@", $3c, $1, $0
+ db "かい?@@", $44, $1, $0
+ db "かしら?@", $50, $1, $0
+ db "かな?@@", $6a, $1, $0
+ db "かも@@@", $76, $1, $0
+ db "くれ@@@", $ca, $1, $0
+ db "ございます", $e8, $1, $0
+ db "しがち@@", $3a, $2, $0
+ db "します@@", $62, $2, $0
+ db "じゃ@@@", $6a, $2, $0
+ db "じゃん@@", $6e, $2, $0
+ db "しよう@@", $7c, $2, $0
+ db "ぜ!@@@", $ac, $2, $0
+ db "ぞ!@@@", $bc, $2, $0
+ db "た@@@@", $d4, $2, $0
+ db "だ@@@@", $d6, $2, $0
+ db "だからね@", $ee, $2, $0
+ db "だぜ@@@", $f4, $2, $0
+ db "だった@@", $fa, $2, $0
+ db "だね@@@", $fe, $2, $0
+ db "だよ@@@", $10, $3, $0
+ db "だよねー!", $12, $3, $0
+ db "だわ@@@", $26, $3, $0
+ db "ッス@@@", $4c, $3, $0
+ db "ってかんじ", $52, $3, $0
+ db "っぱなし@", $54, $3, $0
+ db "つもり@@", $56, $3, $0
+ db "ていない@", $64, $3, $0
+ db "ている@@", $66, $3, $0
+ db "でーす!@", $68, $3, $0
+ db "でした@@", $74, $3, $0
+ db "でしょ?@", $76, $3, $0
+ db "でしょー!", $78, $3, $0
+ db "です@@@", $7a, $3, $0
+ db "ですか?@", $7c, $3, $0
+ db "ですよ@@", $80, $3, $0
+ db "ですわ@@", $82, $3, $0
+ db "どうなの?", $a4, $3, $0
+ db "どうよ?@", $a8, $3, $0
+ db "とかいって", $aa, $3, $0
+ db "なの@@@", $e0, $3, $0
+ db "なのか@@", $e2, $3, $0
+ db "なのだ@@", $e4, $3, $0
+ db "なのよ@@", $e6, $3, $0
+ db "なんだね@", $f2, $3, $0
+ db "なんです@", $f8, $3, $0
+ db "なんてね@", $fa, $3, $0
+ db "ね@@@@", $12, $4, $0
+ db "ねー@@@", $14, $4, $0
+ db "の@@@@", $1c, $4, $0
+ db "の?@@@", $1e, $4, $0
+ db "ばっかり@", $44, $4, $0
+ db "まーす!@", $c2, $4, $0
+ db "ます@@@", $d8, $4, $0
+ db "ますわ@@", $da, $4, $0
+ db "ません@@", $dc, $4, $0
+ db "みたいな@", $fa, $4, $0
+ db "よ!@@@", $60, $5, $0
+ db "よー@@@", $68, $5, $0
+ db "よーん@@", $6c, $5, $0
+ db "よね@@@", $78, $5, $0
+ db "るよ@@@", $a2, $5, $0
+ db "わけ@@@", $bc, $5, $0
+ db "わよ!@@", $d2, $5, $0
+
+.ThisAndThat: ; 11f100
+ db "ああ@@@", $12, $0, $0
+ db "あっち@@", $3c, $0, $0
+ db "あの@@@", $4e, $0, $0
+ db "ありゃ@@", $5c, $0, $0
+ db "あれ@@@", $66, $0, $0
+ db "あれは@@", $68, $0, $0
+ db "あんな@@", $6c, $0, $0
+ db "こう@@@", $dc, $1, $0
+ db "こっち@@", $ec, $1, $0
+ db "この@@@", $f2, $1, $0
+ db "こりゃ@@", $fe, $1, $0
+ db "これ@@@", $0, $2, $0
+ db "これだ!@", $2, $2, $0
+ db "これは@@", $4, $2, $0
+ db "こんな@@", $e, $2, $0
+ db "そう@@@", $be, $2, $0
+ db "そっち@@", $c0, $2, $0
+ db "その@@@", $c2, $2, $0
+ db "そりゃ@@", $c6, $2, $0
+ db "それ@@@", $c8, $2, $0
+ db "それだ!@", $cc, $2, $0
+ db "それは@@", $d0, $2, $0
+ db "そんな@@", $d2, $2, $0
+ db "どう@@@", $98, $3, $0
+ db "どっち@@", $b2, $3, $0
+ db "どの@@@", $b4, $3, $0
+ db "どりゃ@@", $c0, $3, $0
+ db "どれ@@@", $c2, $3, $0
+ db "どれを@@", $c8, $3, $0
+ db "どんな@@", $ca, $3, $0
+ db "なに@@@", $de, $3, $0
+ db "なんか@@", $ec, $3, $0
+ db "なんだ@@", $f0, $3, $0
+ db "なんで@@", $f6, $3, $0
+ db "なんなんだ", $0, $4, $0
+ db "なんの@@", $2, $4, $0
+; 11f220
+
+MobileEZChatData_WordAndPageCounts:
+macro_11f220: macro
+; parameter: number of words
+ db \1
+; 12 words per page (0-based indexing)
+x = \1 / 12
+if \1 % 12 == 0
+x = x +- 1
+endc
+ db x
+endm
+ macro_11f220 18 ; 01: Types
+ macro_11f220 36 ; 02: Greetings
+ macro_11f220 69 ; 03: People
+ macro_11f220 69 ; 04: Battle
+ macro_11f220 66 ; 05: Exclamations
+ macro_11f220 66 ; 06: Conversation
+ macro_11f220 69 ; 07: Feelings
+ macro_11f220 66 ; 08: Conditions
+ macro_11f220 39 ; 09: Life
+ macro_11f220 39 ; 0a: Hobbies
+ macro_11f220 69 ; 0b: Actions
+ macro_11f220 39 ; 0c: Time
+ macro_11f220 66 ; 0d: Farewells
+ macro_11f220 36 ; 0e: ThisAndThat
+
+EZChat_SortedWords:
+; Addresses in WRAM bank 3 where EZChat words beginning
+; with the given kana are sorted in memory, and the pre-
+; allocated size for each.
+; These arrays are expanded dynamically to accomodate
+; any Pokemon you've seen that starts with each kana.\
+macro_11f23c: macro
+ dw x - w3_d000, \1
+x = x + 2 * \1
+endm
+x = $d012
+ macro_11f23c $2f ; a
+ macro_11f23c $1e ; i
+ macro_11f23c $11 ; u
+ macro_11f23c $09 ; e
+ macro_11f23c $2e ; o
+ macro_11f23c $24 ; ka_ga
+ macro_11f23c $1b ; ki_gi
+ macro_11f23c $09 ; ku_gu
+ macro_11f23c $07 ; ke_ge
+ macro_11f23c $1c ; ko_go
+ macro_11f23c $12 ; sa_za
+ macro_11f23c $2b ; shi_ji
+ macro_11f23c $10 ; su_zu
+ macro_11f23c $08 ; se_ze
+ macro_11f23c $0c ; so_zo
+ macro_11f23c $2c ; ta_da
+ macro_11f23c $09 ; chi_dhi
+ macro_11f23c $12 ; tsu_du
+ macro_11f23c $1b ; te_de
+ macro_11f23c $1a ; to_do
+ macro_11f23c $1c ; na
+ macro_11f23c $05 ; ni
+ macro_11f23c $02 ; nu
+ macro_11f23c $05 ; ne
+ macro_11f23c $07 ; no
+ macro_11f23c $16 ; ha_ba_pa
+ macro_11f23c $0e ; hi_bi_pi
+ macro_11f23c $0c ; fu_bu_pu
+ macro_11f23c $05 ; he_be_pe
+ macro_11f23c $16 ; ho_bo_po
+ macro_11f23c $19 ; ma
+ macro_11f23c $0e ; mi
+ macro_11f23c $08 ; mu
+ macro_11f23c $07 ; me
+ macro_11f23c $09 ; mo
+ macro_11f23c $0d ; ya
+ macro_11f23c $04 ; yu
+ macro_11f23c $14 ; yo
+ macro_11f23c $0b ; ra
+ macro_11f23c $01 ; ri
+ macro_11f23c $02 ; ru
+ macro_11f23c $02 ; re
+ macro_11f23c $02 ; ro
+ macro_11f23c $15 ; wa
+x = $d000
+ macro_11f23c $09 ; end
+EZChat_SortedWordsEnd:
diff --git a/mobile/get_trainer_class.asm b/mobile/get_trainer_class.asm
new file mode 100644
index 000000000..37fe91c56
--- /dev/null
+++ b/mobile/get_trainer_class.asm
@@ -0,0 +1,46 @@
+GetMobileOTTrainerClass: ; mobile function
+ ld h, b
+ ld l, c
+ call .GetMobileOTTrainerClass
+ ld c, a
+ ret
+
+.GetMobileOTTrainerClass: ; 4e930
+ ld a, [hli]
+ xor [hl]
+ ld c, a
+ jr z, .skip_male_trainers
+ srl c
+ srl c
+.male_trainer_loop
+ srl c
+ ld a, c
+ cp MaleTrainersEnd - MaleTrainers - 1
+ jr nc, .male_trainer_loop
+ inc c
+
+.skip_male_trainers
+ ld a, [de]
+ cp $1
+ ld hl, MaleTrainers
+ jr nz, .finished
+
+ ld hl, FemaleTrainers
+ ld a, c
+ and a
+ jr z, .finished
+
+.female_trainer_loop
+ srl c
+ ld a, c
+ cp FemaleTrainersEnd - FemaleTrainers - 1
+ jr nc, .female_trainer_loop
+ inc c
+
+.finished
+ ld b, $0
+ add hl, bc
+ ld a, [hl]
+ ret
+
+INCLUDE "data/trainers/gendered_trainers.asm"
diff --git a/mobile/mobile_12.asm b/mobile/mobile_12.asm
new file mode 100755
index 000000000..d3c1c0be3
--- /dev/null
+++ b/mobile/mobile_12.asm
@@ -0,0 +1,1845 @@
+InitMobileProfile: ; 4802f (12:402f)
+ xor a
+ set 6, a
+ ld [wd002], a
+ ld hl, wd003
+ set 0, [hl]
+ ld a, c
+ and a
+ call z, InitCrystalData
+ call ClearBGPalettes
+ call Function48d3d
+ ld a, [wd479]
+ bit 1, a
+ jr z, .not_yet_initialized
+ ld a, [wd003]
+ set 0, a
+ set 1, a
+ set 2, a
+ set 3, a
+ ld [wd003], a
+.not_yet_initialized
+ call Function486bf
+ call LoadFontsExtra
+ ld de, MobileUpArrowGFX
+ ld hl, VTiles2 tile $10
+ lb bc, BANK(MobileUpArrowGFX), 1
+ call Request1bpp
+ ld de, MobileDownArrowGFX
+ ld hl, VTiles2 tile $11
+ lb bc, BANK(MobileDownArrowGFX), 1
+ call Request1bpp
+ call Function4a3a7
+ call ClearBGPalettes
+ ld a, [wd002]
+ bit 6, a
+ jr z, .asm_4808a
+ call Function48689
+ jr .asm_480d7
+.asm_4808a
+ ld a, $5
+ ld [MusicFade], a
+ ld a, MUSIC_MOBILE_ADAPTER_MENU % $100
+ ld [MusicFadeID], a
+ ld a, MUSIC_MOBILE_ADAPTER_MENU / $100
+ ld [MusicFadeID + 1], a
+ ld c, 20
+ call DelayFrames
+ ld b, $1
+ call GetMysteryGift_MobileAdapterLayout
+ call ClearBGPalettes
+ hlcoord 0, 0
+ ld b, 2
+ ld c, 20
+ call ClearBox
+ hlcoord 0, 1
+ ld a, $c
+ ld [hl], a
+ ld bc, $13
+ add hl, bc
+ ld [hl], a
+ ld de, MobileProfileString
+ hlcoord 1, 1
+ call PlaceString
+ hlcoord 0, 2
+ ld b, $a
+ ld c, $12
+ call Function48cdc
+ hlcoord 2, 4
+ ld de, MobileString_Gender
+ call PlaceString
+.asm_480d7
+ hlcoord 2, 6
+ ld de, MobileString_Age
+ call PlaceString
+ hlcoord 2, 8
+ ld de, MobileString_Address
+ call PlaceString
+ hlcoord 2, 10
+ ld de, MobileString_ZipCode
+ call PlaceString
+ hlcoord 2, 12
+ ld de, MobileString_OK
+ call PlaceString
+ ld a, [wd002]
+ bit 6, a
+ jr nz, .asm_48113
+ ld a, [PlayerGender]
+ ld hl, Strings_484fb
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 11, 4
+ call PlaceString
+.asm_48113
+ hlcoord 11, 6
+ call Function487ec
+ ld a, [wd474]
+ dec a
+ ld hl, Prefectures
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 11, 8
+ call PlaceString
+ hlcoord 11, 10
+ call Function489ea
+ hlcoord 0, 14
+ ld b, $2
+ ld c, $12
+ call TextBox
+ hlcoord 1, 16
+ ld de, MobileString_PersonalInfo
+ call PlaceString
+ call Function48187
+ call WaitBGMap2
+ call SetPalettes
+ call StaticMenuJoypad
+ ld hl, wMenuCursorY
+ ld b, [hl]
+ push bc
+ jr asm_4815f
+
+Function48157: ; 48157 (12:4157)
+ call ScrollingMenuJoypad
+ ld hl, wMenuCursorY
+ ld b, [hl]
+ push bc
+asm_4815f: ; 4815f (12:415f)
+ bit A_BUTTON_F, a
+ jp nz, Function4820d
+ ld b, a
+ ld a, [wd002]
+ bit 6, a
+ jr z, .dont_check_b_button
+ ld hl, wd479
+ bit 1, [hl]
+ jr z, .dont_check_b_button
+ bit B_BUTTON_F, b
+ jr nz, .b_button
+.dont_check_b_button
+ jp Function48272
+
+.b_button
+ call ClearBGPalettes
+ call Function48d30
+ pop bc
+ call ClearTileMap
+ ld a, $ff
+ ret
+
+Function48187: ; 48187 (12:4187)
+ ld a, [wd479]
+ bit 1, a
+ jr nz, .asm_481f1
+ ld a, [wd003]
+ ld d, a
+ call Function48725
+ jr c, .asm_481a2
+ lb bc, 1, 4
+ hlcoord 2, 12
+ call ClearBox
+ jr .asm_481ad
+.asm_481a2
+ push de
+ hlcoord 2, 12
+ ld de, MobileString_OK
+ call PlaceString
+ pop de
+.asm_481ad
+ ld a, [wd002]
+ bit 6, a
+ jr nz, .asm_481c1
+ bit 0, d
+ jr nz, .asm_481c1
+ lb bc, 1, 8
+ hlcoord 11, 4
+ call ClearBox
+.asm_481c1
+ bit 1, d
+ jr nz, .asm_481ce
+ lb bc, 1, 8
+ hlcoord 11, 6
+ call ClearBox
+.asm_481ce
+ bit 2, d
+ jr nz, .asm_481db
+ lb bc, 2, 8
+ hlcoord 11, 7
+ call ClearBox
+.asm_481db
+ bit 3, d
+ jr nz, .asm_481f1
+ ld a, [wd479]
+ bit 0, a
+ jr nz, .asm_481f8
+ lb bc, 1, 8
+ hlcoord 11, 10
+ call ClearBox
+ jr .asm_48201
+.asm_481f1
+ ld a, [wd479]
+ bit 0, a
+ jr nz, .asm_48201
+.asm_481f8
+ hlcoord 11, 10
+ ld de, .String_TellLater
+ call PlaceString
+.asm_48201
+ ret
+; 48202 (12:4202)
+
+.String_TellLater: ; 48202
+ db "Tell Later@"
+; 4820d
+
+Function4820d: ; 4820d (12:420d)
+ call PlaceHollowCursor
+ ld hl, wMenuCursorY
+ ld a, [hl]
+ push af
+ ld a, [wd002]
+ bit 6, a
+ jr z, .asm_4821f
+ pop af
+ inc a
+ push af
+.asm_4821f
+ pop af
+ cp $1
+ jr z, asm_4828d
+ cp $2
+ jp z, Function4876f
+ cp $3
+ jp z, Function48304
+ cp $4
+ jp z, Function488d3
+ ld a, $2
+ call MenuClickSound
+ ld a, [wd002]
+ bit 6, a
+ jr z, .asm_4825c
+ jr .asm_4825c
+; 48241 (12:4241)
+
+ hlcoord 1, 15
+ ld b, $2
+ ld c, $12
+ call ClearBox
+ ld de, MobileString_ProfileChanged
+ hlcoord 1, 16
+ call PlaceString
+ call WaitBGMap
+ ld c, 48
+ call DelayFrames
+
+.asm_4825c
+ call ClearBGPalettes
+ call Function48d30
+ pop bc
+ call ClearTileMap
+ ld b, SCGB_DIPLOMA
+ call GetSGBLayout
+ ld hl, wd479
+ set 1, [hl]
+ xor a
+ ret
+
+Function48272: ; 48272 (12:4272)
+ jp Function4840c
+; 48275 (12:4275)
+
+MobileString_PersonalInfo: ; 48275
+ db "Personal Info@"
+; 48283
+
+Function48283: ; 48283 (12:4283)
+ lb bc, 2, 18
+ hlcoord 1, 15
+ call ClearBox
+ ret
+
+asm_4828d: ; 4828d (12:428d)
+ call Function48283
+ hlcoord 1, 16
+ ld de, MobileDesc_Gender
+ call PlaceString
+ ld hl, MenuDataHeader_0x484f1
+ call LoadMenuDataHeader
+ call Function4873c
+ hlcoord 11, 2
+ ld b, $4
+ ld c, $7
+ call Function48cdc
+ hlcoord 13, 4
+ ld de, String_484fb
+ call PlaceString
+ hlcoord 13, 6
+ ld de, String_484ff
+ call PlaceString
+ call WaitBGMap
+ ld a, [PlayerGender]
+ inc a
+ ld [wMenuCursorBuffer], a
+ call StaticMenuJoypad
+ call PlayClickSFX
+ call ExitMenu
+ bit 0, a
+ jp z, Function4840c
+ ld hl, wMenuCursorY
+ ld a, [hl]
+ ld hl, Strings_484fb
+ cp $1
+ jr z, .asm_482ed
+.asm_482e1
+ ld a, [hli]
+ cp $50
+ jr nz, .asm_482e1
+ ld a, $1
+ ld [PlayerGender], a
+ jr .asm_482f1
+.asm_482ed
+ xor a
+ ld [PlayerGender], a
+.asm_482f1
+ ld d, h
+ ld e, l
+ hlcoord 11, 4
+ call PlaceString
+ ld a, [wd003]
+ set 0, a
+ ld [wd003], a
+ jp Function4840c
+
+Function48304: ; 48304 (12:4304)
+ call Function48283
+ hlcoord 1, 16
+ ld de, MobileDesc_Address
+ call PlaceString
+ ld hl, MenuDataHeader_0x48504
+ call LoadMenuDataHeader
+ ld hl, MenuDataHeader_0x48513
+ call LoadMenuDataHeader
+ hlcoord 10, 0
+ ld b, $c
+ ld c, $8
+ call Function48cdc
+ ld a, [wMenuCursorBuffer]
+ ld b, a
+ ld a, [wMenuScrollPosition]
+ ld c, a
+ push bc
+ ld a, [wd474]
+ dec a
+ cp $29
+ jr c, .asm_4833f
+ sub $29
+ inc a
+ ld [wMenuCursorBuffer], a
+ ld a, $29
+.asm_4833f
+ ld [wMenuScrollPosition], a
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+.asm_48348
+ call ScrollingMenu
+ ld de, $629
+ call Function48383
+ jr c, .asm_48348
+ ld d, a
+ pop bc
+ ld a, b
+ ld [wMenuCursorBuffer], a
+ ld a, c
+ ld [wMenuScrollPosition], a
+ ld a, d
+ push af
+ call ExitMenu
+ call ExitMenu
+ pop af
+ ld a, [hJoyPressed]
+ bit 0, a
+ jr z, .asm_48377
+ call Function483bb
+ ld a, [wd003]
+ set 2, a
+ ld [wd003], a
+.asm_48377
+ call Function48187
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ jp Function4840c
+
+Function48383: ; 48383 (12:4383)
+ push bc
+ push af
+ bit 5, a
+ jr nz, .asm_48390
+ bit 4, a
+ jr nz, .asm_4839f
+ and a
+ jr .asm_483b7
+.asm_48390
+ ld a, [wMenuScrollPosition]
+ sub d
+ ld [wMenuScrollPosition], a
+ jr nc, .asm_483af
+ xor a
+ ld [wMenuScrollPosition], a
+ jr .asm_483af
+.asm_4839f
+ ld a, [wMenuScrollPosition]
+ add d
+ ld [wMenuScrollPosition], a
+ cp e
+ jr c, .asm_483af
+ ld a, e
+ ld [wMenuScrollPosition], a
+ jr .asm_483af
+.asm_483af
+ ld hl, wMenuCursorY
+ ld a, [hl]
+ ld [wMenuCursorBuffer], a
+ scf
+.asm_483b7
+ pop bc
+ ld a, b
+ pop bc
+ ret
+
+Function483bb: ; 483bb (12:43bb)
+ ld hl, wScrollingMenuCursorPosition
+ ld a, [hl]
+ inc a
+ ld [wd474], a
+ dec a
+ ld b, a
+ ld hl, Prefectures
+.asm_483c8
+ and a
+ jr z, .asm_483d5
+.asm_483cb
+ ld a, [hli]
+ cp "@"
+ jr nz, .asm_483cb
+ ld a, b
+ dec a
+ ld b, a
+ jr .asm_483c8
+.asm_483d5
+ ld d, h
+ ld e, l
+ ld b, $2
+ ld c, $8
+ hlcoord 11, 7
+ call ClearBox
+ hlcoord 11, 8
+ call PlaceString
+ ret
+; 483e8 (12:43e8)
+
+Function483e8: ; 483e8
+ push de
+ ld hl, Prefectures
+ ld a, [MenuSelection]
+ cp $ff
+ jr nz, .asm_483f8
+ ld hl, Wakayama ; last string
+ jr .asm_48405
+
+.asm_483f8
+ ld d, a
+ and a
+ jr z, .asm_48405
+.asm_483fc
+ ld a, [hli]
+ cp "@"
+ jr nz, .asm_483fc
+ ld a, d
+ dec a
+ jr .asm_483f8
+
+.asm_48405
+ ld d, h
+ ld e, l
+ pop hl
+ call PlaceString
+ ret
+; 4840c
+
+Function4840c: ; 4840c (12:440c)
+ call Function48187
+ call Function48283
+ hlcoord 1, 16
+ ld de, MobileString_PersonalInfo
+ call PlaceString
+ call Function486bf
+ pop bc
+ ld hl, wMenuCursorY
+ ld [hl], b
+ ld a, [wd002]
+ bit 6, a
+ jr nz, .narrower_box
+ ld b, 9
+ ld c, 1
+ hlcoord 1, 4
+ call ClearBox
+ jp Function48157
+
+.narrower_box
+ ld b, 7
+ ld c, 1
+ hlcoord 1, 6
+ call ClearBox
+ jp Function48157
+
+Mobile12_Bin2Dec: ; 48444 (12:4444)
+ push bc
+ push af
+ push de
+ push hl
+ ld hl, .DigitStrings
+.loop
+ and a
+ jr z, .got_string
+ inc hl
+ inc hl
+ dec a
+ jr .loop
+.got_string
+ ld d, h
+ ld e, l
+ pop hl
+ call PlaceString
+ pop de
+ pop af
+ pop bc
+ ret
+; 4845d (12:445d)
+
+.DigitStrings: ; 4845d
+; 4845d
+ db "0@"
+ db "1@"
+ db "2@"
+ db "3@"
+ db "4@"
+ db "5@"
+ db "6@"
+ db "7@"
+ db "8@"
+ db "9@"
+; 48471
+
+MobileProfileString: db " Mobile Profile@"
+MobileString_Gender: db "Gender@"
+MobileString_Age: db "Age@"
+MobileString_Address: db "Address@"
+MobileString_ZipCode: db "Zip Code@"
+MobileString_OK: db "OK@"
+MobileString_ProfileChanged: db "Profile Changed@"
+MobileDesc_Gender: db "Boy or girl?@"
+MobileDesc_Age: db "How old are you?@"
+MobileDesc_Address: db "Where do you live?@"
+MobileDesc_ZipCode: db "Your zip code?@"
+; 484f1
+
+MenuDataHeader_0x484f1: ; 0x484f1
+ db $40 ; flags
+ db 02, 11 ; start coords
+ db 07, 19 ; end coords
+ dw MenuData2_0x484f9
+ db 1 ; default option
+; 0x484f9
+
+MenuData2_0x484f9: ; 0x484f9
+ db $a0 ; flags
+ db 2 ; items
+Strings_484fb:
+String_484fb: db "Boy@"
+String_484ff: db "Girl@"
+; 0x48504
+
+MenuDataHeader_0x48504: ; 0x48504
+ db $40 ; flags
+ db 00, 10 ; start coords
+ db 17, 19 ; end coords
+
+MenuDataHeader_0x48509: ; 0x48509
+ db $40 ; flags
+ db 05, 10 ; start coords
+ db 07, 19 ; end coords
+
+MenuDataHeader_0x4850e: ; 0x4850e
+ db $40 ; flags
+ db 09, 10 ; start coords
+ db 11, 19 ; end coords
+
+MenuDataHeader_0x48513: ; 0x48513
+ db $40 ; flags
+ db 01, 11 ; start coords
+ db 12, 18 ; end coords
+ dw MenuData2_0x4851b
+ db 1 ; default option
+; 0x4851b
+
+MenuData2_0x4851b: ; 0x4851b
+ db $1d ; flags
+ db 6 ; items
+
+Unknown_4851d: ; 4851d
+ db $00, $01, $12, $2b, $45, $12, $e8, $43, $00, $00, $00, $00, $00, $00, $2e, $00, $01, $02, $03, $04
+ db $05, $06, $07, $08, $09, $0a, $0b, $0c, $0d, $0e, $0f, $10, $11, $12, $13, $14, $15, $16, $17, $18
+ db $19, $1a, $1b, $1c, $1d, $1e, $1f, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $2a, $2b, $2c
+ db $2d, $ff
+
+Prefectures:
+Aichi: db "あいちけん@" ; Aichi
+Aomori: db "あおもりけん@" ; Aomori
+Akita: db "あきたけん@" ; Akita
+Ishikawa: db "いしかわけん@" ; Ishikawa
+Ibaraki: db "いばらきけん@" ; Ibaraki
+Iwate: db "いわてけん@" ; Iwate
+Ehime: db "えひめけん@" ; Ehime
+Oita: db "おおいたけん@" ; Oita
+Osakafu: db "おおさかふ@" ; Osakafu
+Okayama: db "おかやまけん@" ; Okayama
+Okinawa: db "おきなわけん@" ; Okinawa
+Kagawa: db "かがわけん@" ; Kagawa
+Kagoshima: db "かごしまけん@" ; Kagoshima
+Kanagawa: db "かながわけん@" ; Kanagawa
+Gifu: db "ぎふけん@" ; Gifu
+Kyotofu: db "きょうとふ@" ; Kyotofu
+Kumamoto: db "くまもとけん@" ; Kumamoto
+Gunma: db "ぐんまけん@" ; Gunma
+Kochi: db "こうちけん@" ; Kochi
+Saitama: db "さいたまけん@" ; Saitama
+Saga: db "さがけん@" ; Saga
+Shiga: db "しがけん@" ; Shiga
+Shizuoka: db "しずおかけん@" ; Shizuoka
+Shimane: db "しまねけん@" ; Shimane
+Chiba: db "ちばけん@" ; Chiba
+Tokyo: db "とうきょうと@" ; Tokyo
+Tokushima: db "とくしまけん@" ; Tokushima
+Tochigi: db "とちぎけん@" ; Tochigi
+Tottori: db "とっとりけん@" ; Tottori
+Toyama: db "とやまけん@" ; Toyama
+Nagasaki: db "ながさきけん@" ; Nagasaki
+Nagano: db "ながのけん@" ; Nagano
+Naraken: db "ならけん@" ; Naraken
+Niigata: db "にいがたけん@" ; Niigata
+Hyogo: db "ひょうごけん@" ; Hyogo
+Hiroshima: db "ひろしまけん@" ; Hiroshima
+Fukui: db "ふくいけん@" ; Fukui
+Fukuoka: db "ふくおかけん@" ; Fukuoka
+Fukushima: db "ふくしまけん@" ; Fukushima
+Hokkaido: db "ほっかいどう@" ; Hokkaido
+Mie: db "みえけん@" ; Mie
+Miyagi: db "みやぎけん@" ; Miyagi
+Miyazaki: db "みやざきけん@" ; Miyazaki
+Yamagata: db "やまがたけん@" ; Yamagata
+Yamaguchi: db "やまぐちけん@" ; Yamaguchi
+Yamanashi: db "やまなしけん@" ; Yamanashi
+Wakayama: db "わかやまけん@" ; Wakayama
+; 48689
+
+Function48689: ; 48689 (12:4689)
+ ld c, 7
+ call DelayFrames
+ ld b, $1
+ call GetMysteryGift_MobileAdapterLayout
+ call ClearBGPalettes
+ hlcoord 0, 0
+ ld b, 4
+ ld c, SCREEN_WIDTH
+ call ClearBox
+ hlcoord 0, 2
+ ld a, $c
+ ld [hl], a
+ ld bc, SCREEN_WIDTH - 1
+ add hl, bc
+ ld [hl], a
+ ld de, MobileProfileString
+ hlcoord 1, 2
+ call PlaceString
+ hlcoord 0, 4
+ ld b, $8
+ ld c, $12
+ call Function48cdc
+ ret
+
+Function486bf: ; 486bf (12:46bf)
+ ld hl, w2DMenuCursorInitY
+ ld a, [wd002]
+ bit 6, a
+ jr nz, .start_at_6
+ ld a, 4
+ ld [hli], a
+ jr .got_init_y
+
+.start_at_6
+ ld a, 6
+ ld [hli], a
+.got_init_y
+ ld a, 1
+ ld [hli], a ; init x
+ ld a, [wd002]
+ bit 6, a
+ jr nz, .check_wd479
+ call Function48725
+ ld a, 4
+ jr nc, .got_num_rows_1
+ ld a, 5
+.got_num_rows_1
+ ld [hli], a
+ jr .got_num_rows_2
+
+.check_wd479
+ ld a, [wd479]
+ bit 1, a
+ jr nz, .four_rows
+ call Function48725
+ jr c, .four_rows
+ ld a, 3
+ ld [hli], a
+ jr .got_num_rows_2
+
+.four_rows
+ ld a, 4
+ ld [hli], a
+.got_num_rows_2
+ ld a, 1
+ ld [hli], a ; num cols
+ ld [hl], $0 ; flags 1
+ set 5, [hl]
+ inc hl
+ xor a
+ ld [hli], a ; flags 2
+ ld a, $20
+ ld [hli], a ; cursor offsets
+ ld a, A_BUTTON
+ add D_UP
+ add D_DOWN
+ push af
+ ld a, [wd002]
+ bit 6, a
+ jr z, .got_joypad_mask
+ pop af
+ add B_BUTTON
+ push af
+.got_joypad_mask
+ pop af
+ ld [hli], a
+ ld a, $1
+ ld [hli], a ; cursor y
+ ld [hli], a ; cursor x
+ xor a
+ ld [hli], a ; off char
+ ld [hli], a ; cursor tile
+ ld [hli], a ; cursor tile + 1
+ ret
+
+Function48725: ; 48725 (12:4725)
+; ld a, [wd003]
+; and $f
+; cp $f
+; jr nz, .clear_carry
+; scf
+; ret
+; .clear_carry
+; and a
+; ret
+
+ ld a, [wd003]
+ bit 0, a
+ jr z, .clear_carry
+ bit 1, a
+ jr z, .clear_carry
+ bit 2, a
+ jr z, .clear_carry
+ bit 3, a
+ jr z, .clear_carry
+ scf
+ ret
+
+.clear_carry
+ and a
+ ret
+
+Function4873c: ; 4873c (12:473c)
+ ld hl, w2DMenuCursorInitY
+ ld a, 4
+ ld [hli], a
+ ld a, 12
+ ld [hli], a ; init x
+ ld a, 2
+ ld [hli], a ; num rows
+ ld a, 1
+ ld [hli], a ; num cols
+ ld [hl], $0 ; flags 1
+ set 5, [hl]
+ inc hl
+ xor a
+ ld [hli], a ; flags 2
+ ln a, 2, 0
+ ld [hli], a ; cursor offsets
+ ld a, A_BUTTON
+ add B_BUTTON
+ ld [hli], a ; joypad filter
+ ; ld a, [PlayerGender]
+ ; xor 1
+ ; inc a
+ ld a, [PlayerGender]
+ and a
+ jr z, .male
+ ld a, 2
+ jr .okay_gender
+
+.male
+ ld a, 1
+.okay_gender
+ ld [hli], a ; cursor y
+ ld a, $1
+ ld [hli], a ; cursor x
+ xor a
+ ld [hli], a ; off char
+ ld [hli], a ; cursor tile
+ ld [hli], a ; cursor tile + 1
+ ret
+
+Function4876f: ; 4876f (12:476f)
+ call Function48283
+ hlcoord 1, 16
+ ld de, MobileDesc_Age
+ call PlaceString
+ ld hl, MenuDataHeader_0x48509
+ call LoadMenuDataHeader
+ ld a, [hInMenu]
+ push af
+ ld a, $1
+ ld [hInMenu], a
+ hlcoord 10, 5
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ call WaitBGMap
+ ld a, [wd473]
+ and a
+ jr z, .asm_487ab
+ cp $64
+ jr z, .asm_487b2
+ hlcoord 12, 5
+ ld [hl], $10
+ hlcoord 12, 7
+ ld [hl], $11
+ jr .asm_487b7
+.asm_487ab
+ hlcoord 12, 5
+ ld [hl], $10
+ jr .asm_487b7
+.asm_487b2
+ hlcoord 12, 7
+ ld [hl], $11
+.asm_487b7
+ hlcoord 11, 6
+ call Function487ec
+ ld c, 10
+ call DelayFrames
+ ld a, [wd473]
+ push af
+.asm_487c6
+ call JoyTextDelay
+ call Function4880e
+ jr nc, .asm_487c6
+ ld a, $1
+ call MenuClickSound
+ pop bc
+ jr nz, .asm_487da
+ ld a, b
+ ld [wd473], a
+.asm_487da
+ ld a, [wd473]
+ call ExitMenu
+ hlcoord 11, 6
+ call Function487ec
+ pop af
+ ld [hInMenu], a
+ jp Function4840c
+
+Function487ec: ; 487ec (12:47ec)
+ push hl
+ ld de, wd473
+ call Function487ff
+ pop hl
+rept 4
+ inc hl
+endr
+ ld de, String_4880d
+ call PlaceString
+ ret
+
+Function487ff: ; 487ff (12:47ff)
+ push hl
+ ld a, " "
+ ld [hli], a
+ ld [hl], a
+ pop hl
+ ld b, PRINTNUM_LEADINGZEROS | 1
+ ld c, 3
+ call PrintNum
+ ret
+; 4880d (12:480d)
+
+String_4880d: ; 4880d
+ db "@"
+; 4880e
+
+Function4880e: ; 4880e (12:480e)
+ ld a, [hJoyPressed]
+ and A_BUTTON
+ jp nz, Function488b9
+ ld a, [hJoyPressed]
+ and B_BUTTON
+ jp nz, Function488b4
+ ld hl, hJoyLast
+ ld a, [hl]
+ and D_UP
+ jr nz, .asm_48843
+ ld a, [hl]
+ and D_DOWN
+ jr nz, .asm_48838
+ ld a, [hl]
+ and D_LEFT
+ jr nz, .asm_4884f
+ ld a, [hl]
+ and D_RIGHT
+ jr nz, .asm_4885f
+ call DelayFrame
+ and a
+ ret
+.asm_48838
+ ld hl, wd473
+ ld a, [hl]
+ and a
+ jr z, .asm_48840
+ dec a
+.asm_48840
+ ld [hl], a
+ jr .asm_4886f
+.asm_48843
+ ld hl, wd473
+ ld a, [hl]
+ cp $64
+ jr nc, .asm_4884c
+ inc a
+.asm_4884c
+ ld [hl], a
+ jr .asm_4886f
+.asm_4884f
+ ld a, [wd473]
+ cp $5b
+ jr c, .asm_48858
+ ld a, $5a
+.asm_48858
+ add $a
+ ld [wd473], a
+ jr .asm_4886f
+.asm_4885f
+ ld a, [wd473]
+ cp $a
+ jr nc, .asm_48868
+ ld a, $a
+.asm_48868
+ sub $a
+ ld [wd473], a
+ jr .asm_4886f
+.asm_4886f
+ ld a, [wd473]
+ and a
+ jr z, .asm_48887
+ cp $64
+ jr z, .asm_48898
+ jr z, .asm_488a7
+ hlcoord 12, 5
+ ld [hl], $10
+ hlcoord 12, 7
+ ld [hl], $11
+ jr .asm_488a7
+.asm_48887
+ hlcoord 10, 5
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ hlcoord 12, 5
+ ld [hl], $10
+ jr .asm_488a7
+.asm_48898
+ hlcoord 10, 5
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ hlcoord 12, 7
+ ld [hl], $11
+.asm_488a7
+ hlcoord 11, 6
+ call Function487ec
+ call WaitBGMap
+ ld a, $1
+ and a
+ ret
+
+Function488b4: ; 488b4 (12:48b4)
+ ld a, $0
+ and a
+ scf
+ ret
+
+Function488b9: ; 488b9 (12:48b9)
+ ld a, [wd003]
+ set 1, a
+ ld [wd003], a
+ scf
+ ret
+; 488c3 (12:48c3)
+
+MobileUpArrowGFX: ; 488c3
+INCBIN "gfx/mobile/up_arrow.2bpp"
+
+MobileDownArrowGFX: ; 488cb
+INCBIN "gfx/mobile/down_arrow.2bpp"
+
+Function488d3: ; 488d3 (12:48d3)
+ call Function48283
+ hlcoord 1, 16
+ ld de, MobileDesc_ZipCode
+ call PlaceString
+ call Function48a3a
+ jp c, Function4840c
+ ld hl, MenuDataHeader_0x4850e
+ call LoadMenuDataHeader
+ ld a, [hInMenu]
+ push af
+ ld a, $1
+ ld [hInMenu], a
+ hlcoord 10, 9
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ ld a, [wd475]
+ and $f
+ ld d, $0
+ hlcoord 11, 10
+ call Function489ea
+ call WaitBGMap
+ ld a, [wd475]
+ ld b, a
+ ld a, [wd476]
+ ld c, a
+ ld a, [wd477]
+ ld d, a
+ ld a, [wd478]
+ ld e, a
+ push de
+ push bc
+ ld d, $0
+ ld b, $0
+
+asm_48922: ; 48922 (12:4922)
+ push bc
+ call JoyTextDelay
+ ld a, [hJoyDown]
+ and a
+ jp z, Function4896e
+ bit 0, a
+ jp nz, Function4896e
+ bit 1, a
+ jp nz, Function4896e
+ ld a, [wd002]
+ and %11001111
+ res 7, a
+ ld [wd002], a
+ pop bc
+ inc b
+ ld a, b
+ cp $5
+ push bc
+ jr c, .asm_4894c
+ pop bc
+ ld b, $4
+ push bc
+.asm_4894c
+ pop bc
+ push bc
+ ld a, b
+ cp $4
+ jr nz, asm_48972
+ ld c, 10
+ call DelayFrames
+ jr asm_48972
+; 4895a (12:495a)
+
+Function4895a: ; 4895a
+ ld a, [hJoyPressed]
+ and a
+ jr z, .asm_48965
+ pop bc
+ ld b, $1
+ push bc
+ jr asm_48972
+
+.asm_48965
+ ld a, [hJoyLast]
+ and a
+ jr z, asm_48972
+
+ pop bc
+ ld b, $1
+ push bc
+
+Function4896e: ; 4896e (12:496e)
+ pop bc
+ ld b, $0
+ push bc
+
+asm_48972: ; 48972 (12:4972)
+ call Function48ab5
+ push af
+ cp $f0
+ jr z, .asm_48994
+ cp $f
+ jr nz, .asm_48988
+ ld a, [wd002]
+ set 7, a
+ and $cf
+ ld [wd002], a
+.asm_48988
+ hlcoord 11, 10
+ ld b, $0
+ ld c, d
+ add hl, bc
+ ld b, $3
+ call Function48c11
+.asm_48994
+ call WaitBGMap
+ pop af
+ pop bc
+ jr nc, asm_48922
+ jr nz, .asm_489b1
+ pop bc
+ ld a, b
+ ld [wd475], a
+ ld a, c
+ ld [wd476], a
+ pop bc
+ ld a, b
+ ld [wd477], a
+ ld a, c
+ ld [wd478], a
+ jr .asm_489c5
+.asm_489b1
+ push af
+ ld a, [wd479]
+ set 0, a
+ ld [wd479], a
+ ld a, [wd003]
+ set 3, a
+ ld [wd003], a
+ pop af
+ pop bc
+ pop bc
+.asm_489c5
+ push af
+ push bc
+ push de
+ push hl
+ ld a, $1
+ call MenuClickSound
+ pop hl
+ pop de
+ pop bc
+ pop af
+ call ExitMenu
+ hlcoord 11, 10
+ call Function489ea
+ hlcoord 11, 9
+ lb bc, 1, 8
+ call ClearBox
+ pop af
+ ld [hInMenu], a
+ jp Function4840c
+
+Function489ea: ; 489ea (12:49ea)
+ push de
+ ld a, [wd475]
+ and $f
+ call Mobile12_Bin2Dec
+ ld a, [wd476]
+ and $f0
+ swap a
+ inc hl
+ call Mobile12_Bin2Dec
+ ld a, [wd476]
+ and $f
+ inc hl
+ call Mobile12_Bin2Dec
+ inc hl
+ ld de, String_48a38
+ call PlaceString
+ ld a, [wd477]
+ and $f0
+ swap a
+ inc hl
+ call Mobile12_Bin2Dec
+ ld a, [wd477]
+ and $f
+ inc hl
+ call Mobile12_Bin2Dec
+ ld a, [wd478]
+ and $f0
+ swap a
+ inc hl
+ call Mobile12_Bin2Dec
+ ld a, [wd478]
+ and $f
+ inc hl
+ call Mobile12_Bin2Dec
+ pop de
+ ret
+; 48a38 (12:4a38)
+
+String_48a38: ; 48a38
+ db "-@"
+; 48a3a
+
+Function48a3a: ; 48a3a (12:4a3a)
+ ld hl, MenuDataHeader_0x48a9c
+ call LoadMenuDataHeader
+ call Function4873c
+ ld a, $a
+ ld [w2DMenuCursorInitY], a
+ ld a, $b
+ ld [w2DMenuCursorInitX], a
+ ld a, $1
+ ld [wMenuCursorY], a
+ hlcoord 10, 8
+ ld b, $4
+ ld c, $8
+ call Function48cdc
+ hlcoord 12, 10
+ ld de, String_48aa1
+ call PlaceString
+ call StaticMenuJoypad
+ push af
+ call PlayClickSFX
+ call ExitMenu
+ pop af
+ bit 1, a
+ jp nz, Function48a9a
+ ld a, [wMenuCursorY]
+ cp $1
+ jr z, .asm_48a98
+ ld a, [wd003]
+ set 3, a
+ ld [wd003], a
+ ld a, [wd479]
+ res 0, a
+ ld [wd479], a
+ xor a
+ ld bc, $4
+ ld hl, wd475
+ call ByteFill
+ jr Function48a9a
+.asm_48a98
+ and a
+ ret
+
+Function48a9a: ; 48a9a (12:4a9a)
+ scf
+ ret
+; 48a9c (12:4a9c)
+
+MenuDataHeader_0x48a9c: ; 0x48a9c
+ db $40 ; flags
+ db 08, 10 ; start coords
+ db 13, 19 ; end coord
+
+String_48aa1: ; 48aa1
+ db "Tell Now"
+ next "Tell Later@"
+; 48ab5
+
+
+Function48ab5: ; 48ab5 (12:4ab5)
+ ld a, [hJoyPressed]
+ and A_BUTTON
+ jp nz, Function48c0f
+ ld a, [hJoyPressed]
+ and B_BUTTON
+ jp nz, Function48c0d
+ ld a, d
+ and a
+ jr z, .asm_48adf
+ cp $1
+ jr z, .asm_48ae7
+ cp $2
+ jr z, .asm_48af1
+ cp $3
+ jr z, .asm_48af9
+ cp $4
+ jr z, .asm_48b03
+ cp $5
+ jr z, .asm_48b0b
+ cp $6
+ jr .asm_48b15
+.asm_48adf
+ ld hl, wd475
+ ld a, [hl]
+ and $f
+ jr .asm_48b1d
+.asm_48ae7
+ ld hl, wd476
+ ld a, [hl]
+ swap a
+ or $f0
+ jr .asm_48b1d
+.asm_48af1
+ ld hl, wd476
+ ld a, [hl]
+ and $f
+ jr .asm_48b1d
+.asm_48af9
+ ld hl, wd477
+ ld a, [hl]
+ swap a
+ or $f0
+ jr .asm_48b1d
+.asm_48b03
+ ld hl, wd477
+ ld a, [hl]
+ and $f
+ jr .asm_48b1d
+.asm_48b0b
+ ld hl, wd478
+ ld a, [hl]
+ swap a
+ or $f0
+ jr .asm_48b1d
+.asm_48b15
+ ld hl, wd478
+ ld a, [hl]
+ and $f
+ jr .asm_48b1d
+.asm_48b1d
+ push hl
+ push af
+ ld e, $0
+ hlcoord 11, 10
+ ld a, d
+.asm_48b25
+ and a
+ jr z, .asm_48b2c
+ inc e
+ dec a
+ jr .asm_48b25
+.asm_48b2c
+ ld hl, hJoyLast
+ ld a, [hl]
+ and D_UP
+ jr nz, .asm_48b8d
+ ld a, [hl]
+ and D_DOWN
+ jr nz, .asm_48b55
+ ld a, [hl]
+ and D_LEFT
+ jp nz, Function48bd7
+ ld a, [hl]
+ and D_RIGHT
+ jr nz, .asm_48b9d
+ hlcoord 11, 10
+ call Function489ea
+ ld a, [wd002]
+ bit 7, a
+ jr nz, .asm_48b51
+.asm_48b51
+ pop bc
+ pop bc
+ and a
+ ret
+.asm_48b55
+ pop af
+ ld b, a
+ and $f
+ and a
+ ld a, b
+ jr nz, .asm_48b61
+ and $f0
+ add $a
+.asm_48b61
+ dec a
+.asm_48b62
+ push de
+ push af
+ hlcoord 10, 9
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ pop af
+ pop de
+ hlcoord 11, 10
+ ld b, a
+ ld a, d
+ cp $3
+ jr c, .asm_48b7a
+ inc hl
+.asm_48b7a
+ ld a, b
+ pop hl
+ bit 7, a
+ jr z, .asm_48b85
+ call Function48c4d
+ jr .asm_48b88
+.asm_48b85
+ call Function48c5a
+.asm_48b88
+ ld a, $f0
+ jp Function48c00
+.asm_48b8d
+ pop af
+ ld b, a
+ and $f
+ cp $9
+ ld a, b
+ jr c, .asm_48b9a
+ and $f0
+ add $ff
+.asm_48b9a
+ inc a
+ jr .asm_48b62
+.asm_48b9d
+ push de
+ hlcoord 10, 9
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ pop de
+ ld a, d
+ cp $6
+ jr nc, .asm_48baf
+ inc d
+.asm_48baf
+ pop af
+ pop hl
+ ld b, a
+ ld a, d
+ cp $6
+ ld a, b
+ jr z, .asm_48bc4
+ bit 7, a
+ jr nz, .asm_48bc4
+ inc hl
+ ld a, [hl]
+ swap a
+ and $f
+ jr asm_48bc7
+.asm_48bc4
+ ld a, [hl]
+ and $f
+
+asm_48bc7: ; 48bc7 (12:4bc7)
+ hlcoord 11, 10
+ push af
+ ld a, d
+ cp $3
+ pop bc
+ ld a, b
+ jr c, .asm_48bd3
+ inc hl
+.asm_48bd3
+ ld a, $f
+ jr Function48c00
+
+Function48bd7: ; 48bd7 (12:4bd7)
+ push de
+ hlcoord 10, 9
+ ld b, $1
+ ld c, $8
+ call Function48cdc
+ pop de
+ ld a, d
+ and a
+ pop af
+ pop hl
+ ld b, a
+ ld a, d
+ and a
+ ld a, b
+ jr z, .asm_48bf3
+ bit 7, a
+ jr z, .asm_48bf8
+ dec d
+ dec hl
+.asm_48bf3
+ ld a, [hl]
+ and $f
+ jr asm_48bc7
+.asm_48bf8
+ dec d
+ ld a, [hl]
+ swap a
+ and $f
+ jr asm_48bc7
+
+Function48c00: ; 48c00 (12:4c00)
+ push af
+ hlcoord 11, 10
+ call Function489ea
+ ld a, $1
+ and a
+ pop bc
+ ld a, b
+ ret
+
+Function48c0d: ; 48c0d (12:4c0d)
+ xor a
+ and a
+
+Function48c0f: ; 48c0f (12:4c0f)
+ scf
+ ret
+
+Function48c11: ; 48c11 (12:4c11)
+ ld a, [wd002]
+ bit 7, a
+ jr z, .asm_48c20
+ ld a, d
+ cp $3
+ jr c, .asm_48c1e
+ inc hl
+.asm_48c1e
+ ld [hl], $7f
+.asm_48c20
+ ld a, [wd002]
+ swap a
+ and $3
+ inc a
+ cp b
+ jr nz, .asm_48c40
+ ld a, [wd002]
+ bit 7, a
+ jr z, .asm_48c3a
+ res 7, a
+ ld [wd002], a
+ xor a
+ jr .asm_48c40
+.asm_48c3a
+ set 7, a
+ ld [wd002], a
+ xor a
+.asm_48c40
+ swap a
+ ld b, a
+ ld a, [wd002]
+ and $cf
+ or b
+ ld [wd002], a
+ ret
+
+Function48c4d: ; 48c4d (12:4c4d)
+ swap a
+ and $f0
+ push af
+ ld a, [hl]
+ and $f
+ ld [hl], a
+ pop af
+ or [hl]
+ ld [hl], a
+ ret
+
+Function48c5a: ; 48c5a (12:4c5a)
+ push af
+ ld a, [hl]
+ and $f0
+ ld [hl], a
+ pop af
+ or [hl]
+ ld [hl], a
+ ret
+
+Function48c63: ; 48c63
+ ld a, "@"
+ ld [de], a
+ ld a, c
+ cp $30
+ jr nc, .asm_48c8c
+ and a
+ jr z, .asm_48c8c
+ dec c
+ push de
+ ld h, d
+ ld l, e
+ ld a, "@"
+ ld b, 7
+.asm_48c76
+ ld [hli], a
+ dec b
+ jr nz, .asm_48c76
+ ld hl, Prefectures
+ ld a, c
+ call GetNthString
+.asm_48c81
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hl]
+ cp "@"
+ jr nz, .asm_48c81
+ and a
+ pop de
+ ret
+
+.asm_48c8c
+ scf
+ ret
+; 48c8e
+
+Function48c8e: ; 48c8e
+; unreferenced
+ ld hl, $d02a
+ ld d, h
+ ld e, l
+ farcall Function48c63
+ hlcoord 10, 7
+ call PlaceString
+ call WaitBGMap
+ ret
+; 48ca3
+
+Function48ca3: ; 48ca3
+ push af
+ push bc
+ push de
+ push hl
+ ld b, 0
+ ld c, 0
+ ld d, 0
+.asm_48cad
+ cp 100
+ jr c, .asm_48cb6
+ sub 100
+ inc b
+ jr .asm_48cad
+
+.asm_48cb6
+ cp 10
+ jr c, .asm_48cbf
+ sub 10
+ inc c
+ jr .asm_48cb6
+
+.asm_48cbf
+ cp 1
+ jr c, .asm_48cc7
+ dec a
+ inc d
+ jr .asm_48cbf
+
+.asm_48cc7
+ ld a, b
+ call Mobile12_Bin2Dec
+ inc hl
+ ld a, c
+ call Mobile12_Bin2Dec
+ inc hl
+ ld a, d
+ call Mobile12_Bin2Dec
+ pop hl
+ pop de
+ pop bc
+ pop af
+ ret
+; 48cda
+
+Function48cda: ; 48cda (12:4cda)
+ ld h, d
+ ld l, e
+
+Function48cdc: ; 48cdc (12:4cdc)
+ push bc
+ push hl
+ call Function48cfd
+ pop hl
+ pop bc
+ ld de, AttrMap - TileMap
+ add hl, de
+ inc b
+ inc b
+ inc c
+ inc c
+ ld a, $0
+.asm_48ced
+ push bc
+ push hl
+.asm_48cef
+ ld [hli], a
+ dec c
+ jr nz, .asm_48cef
+ pop hl
+ ld de, $14
+ add hl, de
+ pop bc
+ dec b
+ jr nz, .asm_48ced
+ ret
+
+Function48cfd: ; 48cfd (12:4cfd)
+ push hl
+ ld a, $4
+ ld [hli], a
+ inc a
+ call Function48d2a
+ inc a
+ ld [hl], a
+ pop hl
+ ld de, $14
+ add hl, de
+.asm_48d0c
+ push hl
+ ld a, $7
+ ld [hli], a
+ ld a, $7f
+ call Function48d2a
+ ld [hl], $8
+ pop hl
+ ld de, $14
+ add hl, de
+ dec b
+ jr nz, .asm_48d0c
+ ld a, $9
+ ld [hli], a
+ ld a, $a
+ call Function48d2a
+ ld [hl], $b
+ ret
+
+Function48d2a: ; 48d2a (12:4d2a)
+ ld d, c
+.asm_48d2b
+ ld [hli], a
+ dec d
+ jr nz, .asm_48d2b
+ ret
+
+Function48d30: ; 48d30 (12:4d30)
+ ld hl, wd475
+ call Function48d4a
+ ld hl, wd477
+ call Function48d4a
+ ret
+
+Function48d3d: ; 48d3d (12:4d3d)
+ ld hl, wd475
+ call Function48d94
+ ld hl, wd477
+ call Function48d94
+ ret
+
+Function48d4a: ; 48d4a (12:4d4a)
+ inc hl
+ ld a, [hl]
+ ld b, a
+ and $f
+ ld c, a
+ srl b
+ srl b
+ srl b
+ srl b
+ push bc
+ ld c, 10
+ ld a, b
+ call SimpleMultiply
+ pop bc
+ add c
+ ld [hld], a
+ xor a
+ ld [hMultiplicand + 0], a
+ ld [hMultiplicand + 1], a
+ ld a, [hl]
+ srl a
+ srl a
+ srl a
+ srl a
+ ld c, 10
+ call SimpleMultiply
+ ld b, a
+ ld a, [hli]
+ and $f
+ add b
+ ld [hMultiplicand + 2], a
+ ld a, 100
+ ld [hMultiplier], a
+ call Multiply
+ ld a, [hProduct + 2]
+ ld b, a
+ ld a, [hProduct + 3]
+ ld c, a
+ ld e, [hl]
+ add e
+ ld c, a
+ ld a, b
+ adc $0
+ ld b, a
+ ld a, c
+ ld [hld], a
+ ld [hl], b
+ ret
+
+Function48d94: ; 48d94 (12:4d94)
+ xor a
+ ld [hDividend + 0], a
+ ld [hDividend + 1], a
+ ld a, [hli]
+ ld [hDividend + 0], a
+ ld a, [hl]
+ ld [hDividend + 1], a
+ ld a, 100
+ ld [hDivisor], a
+ ld b, 2
+ call Divide
+ ld a, [hRemainder]
+ ld c, 10
+ call SimpleDivide
+ sla b
+ sla b
+ sla b
+ sla b
+ or b
+ ld [hld], a
+ ld a, [hQuotient + 2]
+ ld c, 10
+ call SimpleDivide
+ sla b
+ sla b
+ sla b
+ sla b
+ or b
+ ld [hl], a
+ ret
diff --git a/mobile/mobile_12_2.asm b/mobile/mobile_12_2.asm
new file mode 100755
index 000000000..ba663cf86
--- /dev/null
+++ b/mobile/mobile_12_2.asm
@@ -0,0 +1,936 @@
+MobileCheckOwnMonAnywhere: ; 4a843
+; Like CheckOwnMonAnywhere, but only check for species.
+; OT/ID don't matter.
+
+ ld a, [PartyCount]
+ and a
+ ret z
+
+ ld d, a
+ ld e, 0
+ ld hl, PartyMon1Species
+ ld bc, PartyMonOT
+.asm_4a851
+ call .CheckMatch
+ ret c
+ push bc
+ ld bc, PARTYMON_STRUCT_LENGTH
+ add hl, bc
+ pop bc
+ call .CopyName
+ dec d
+ jr nz, .asm_4a851
+ ld a, BANK(sBoxCount)
+ call GetSRAMBank
+ ld a, [sBoxCount]
+ and a
+ jr z, .asm_4a888
+ ld d, a
+ ld hl, sBoxMon1Species
+ ld bc, sBoxMonOT
+.asm_4a873
+ call .CheckMatch
+ jr nc, .asm_4a87c
+ call CloseSRAM
+ ret
+
+.asm_4a87c
+ push bc
+ ld bc, BOXMON_STRUCT_LENGTH
+ add hl, bc
+ pop bc
+ call .CopyName
+ dec d
+ jr nz, .asm_4a873
+
+.asm_4a888
+ call CloseSRAM
+ ld c, 0
+.asm_4a88d
+ ld a, [wCurBox]
+ and $f
+ cp c
+ jr z, .asm_4a8d1
+ ld hl, .BoxAddrs
+ ld b, 0
+ add hl, bc
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ call GetSRAMBank
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [hl]
+ and a
+ jr z, .asm_4a8d1
+ push bc
+ push hl
+ ld de, sBoxMons - sBoxCount
+ add hl, de
+ ld d, h
+ ld e, l
+ pop hl
+ push de
+ ld de, sBoxMonOT - sBoxCount
+ add hl, de
+ ld b, h
+ ld c, l
+ pop hl
+ ld d, a
+.asm_4a8ba
+ call .CheckMatch
+ jr nc, .asm_4a8c4
+ pop bc
+ call CloseSRAM
+ ret
+
+.asm_4a8c4
+ push bc
+ ld bc, BOXMON_STRUCT_LENGTH
+ add hl, bc
+ pop bc
+ call .CopyName
+ dec d
+ jr nz, .asm_4a8ba
+ pop bc
+
+.asm_4a8d1
+ inc c
+ ld a, c
+ cp NUM_BOXES
+ jr c, .asm_4a88d
+ call CloseSRAM
+ and a
+ ret
+; 4a8dc
+
+.CheckMatch: ; 4a8dc
+ push bc
+ push hl
+ push de
+ ld d, b
+ ld e, c
+ ld a, [ScriptVar]
+ ld b, [hl]
+ cp b
+ jr nz, .no_match
+ jr .match
+
+.no_match
+ pop de
+ pop hl
+ pop bc
+ and a
+ ret
+
+.match
+ pop de
+ pop hl
+ pop bc
+ scf
+ ret
+; 4a8f4
+
+.BoxAddrs: ; 4a8f4
+ dba sBox1
+ dba sBox2
+ dba sBox3
+ dba sBox4
+ dba sBox5
+ dba sBox6
+ dba sBox7
+ dba sBox8
+ dba sBox9
+ dba sBox10
+ dba sBox11
+ dba sBox12
+ dba sBox13
+ dba sBox14
+; 4a91e
+
+.CopyName: ; 4a91e
+ push hl
+ ld hl, NAME_LENGTH
+ add hl, bc
+ ld b, h
+ ld c, l
+ pop hl
+ ret
+; 4a927
+
+FindItemInPCOrBag: ; 4a927
+ ld a, [ScriptVar]
+ ld [CurItem], a
+ ld hl, PCItems
+ call CheckItem
+ jr c, .found
+
+ ld a, [ScriptVar]
+ ld [CurItem], a
+ ld hl, NumItems
+ call CheckItem
+ jr c, .found
+
+ xor a
+ ld [ScriptVar], a
+ ret
+
+.found
+ ld a, 1
+ ld [ScriptVar], a
+ ret
+; 4a94e
+
+Function4a94e: ; 4a94e
+ call FadeToMenu
+ ld a, -1
+ ld hl, wd002
+ ld bc, 3
+ call ByteFill
+ xor a
+ ld [wd018], a
+ ld [wd019], a
+ ld b, SCGB_PACKPALS
+ call GetSGBLayout
+ call SetPalettes
+ call Function4aa22
+ jr c, .asm_4a985
+ jr z, .asm_4a9a1
+ jr .asm_4a97b
+
+.asm_4a974
+ call Function4aa25
+ jr c, .asm_4a985
+ jr z, .asm_4a9a1
+
+.asm_4a97b
+ call Function4ac58
+ ld hl, wd019
+ res 1, [hl]
+ jr .asm_4a974
+
+.asm_4a985
+ ld a, [wd018]
+ and a
+ jr nz, .asm_4a990
+ call Function4aba8
+ jr c, .asm_4a974
+
+.asm_4a990
+ call CloseSubmenu
+ ld hl, wd002
+ ld a, -1
+ ld bc, 3
+ call ByteFill
+ scf
+ jr .asm_4a9af
+
+.asm_4a9a1
+ call Function4a9c3
+ jr c, .asm_4a9b0
+ call Function4a9d7
+ jr c, .asm_4a974
+ call CloseSubmenu
+ and a
+
+.asm_4a9af
+ ret
+
+.asm_4a9b0
+ ld de, SFX_WRONG
+ call PlaySFX
+ ld hl, UnknownText_0x4a9be
+ call PrintText
+ jr .asm_4a974
+; 4a9be
+
+UnknownText_0x4a9be: ; 0x4a9be
+ ; Pick three #MON for battle.
+ text_jump UnknownText_0x1c51d7
+ db "@"
+; 0x4a9c3
+
+Function4a9c3: ; 4a9c3
+ ld hl, wd002
+ ld a, $ff
+ cp [hl]
+ jr z, .asm_4a9d5
+ inc hl
+ cp [hl]
+ jr z, .asm_4a9d5
+ inc hl
+ cp [hl]
+ jr z, .asm_4a9d5
+ and a
+ ret
+
+.asm_4a9d5
+ scf
+ ret
+; 4a9d7
+
+Function4a9d7: ; 4a9d7
+ ld a, [wd002]
+ ld hl, PartyMonNicknames
+ call GetNick
+ ld h, d
+ ld l, e
+ ld de, EndFlypoint
+ ld bc, 6
+ call CopyBytes
+ ld a, [wd003]
+ ld hl, PartyMonNicknames
+ call GetNick
+ ld h, d
+ ld l, e
+ ld de, wd00c
+ ld bc, 6
+ call CopyBytes
+ ld a, [wd004]
+ ld hl, PartyMonNicknames
+ call GetNick
+ ld h, d
+ ld l, e
+ ld de, wd012
+ ld bc, 6
+ call CopyBytes
+ ld hl, UnknownText_0x4aa1d
+ call PrintText
+ call YesNoBox
+ ret
+; 4aa1d
+
+UnknownText_0x4aa1d: ; 0x4aa1d
+ ; , @ and @ . Use these three?
+ text_jump UnknownText_0x1c51f4
+ db "@"
+; 0x4aa22
+
+Function4aa22: ; 4aa22
+ call ClearBGPalettes
+
+Function4aa25: ; 4aa25
+ farcall LoadPartyMenuGFX
+ farcall InitPartyMenuWithCancel
+ call Function4aad3
+
+Function4aa34: ; 4aa34
+ ld a, PARTYMENUACTION_MOBILE
+ ld [PartyMenuActionText], a
+ farcall WritePartyMenuTilemap
+ xor a
+ ld [PartyMenuActionText], a
+ farcall PrintPartyMenuText
+ call Function4aab6
+ call WaitBGMap
+ call SetPalettes
+ call DelayFrame
+ call Function4ab1a
+ jr z, .asm_4aa66
+ push af
+ call Function4aafb
+ jr c, .asm_4aa67
+ call Function4ab06
+ jr c, .asm_4aa67
+ pop af
+
+.asm_4aa66
+ ret
+
+.asm_4aa67
+ ld hl, wd019
+ set 1, [hl]
+ pop af
+ ret
+; 4aa6e
+
+Function4aa6e: ; 4aa6e
+ pop af
+ ld de, SFX_WRONG
+ call PlaySFX
+ call WaitSFX
+ jr Function4aa34
+; 4aa7a
+
+Function4aa7a: ; 4aa7a
+ ld hl, wd002
+ ld d, $3
+.loop
+ ld e, PARTY_LENGTH
+ ld a, [hli]
+ push de
+ push hl
+ cp -1
+ jr z, .done
+ ld hl, wSpriteAnimationStructs
+ inc a
+ ld d, a
+.inner_loop
+ ld a, [hl]
+ and a
+ jr z, .next
+ cp d
+ jr z, .same_as_d
+ jr .next
+
+ ld a, $3
+ jr .proceed
+
+.same_as_d
+ ld a, $2
+
+.proceed
+ push hl
+ ld c, l
+ ld b, h
+ ld hl, $2
+ add hl, bc
+ ld [hl], a
+ pop hl
+
+.next
+ ld bc, $10
+ add hl, bc
+ dec e
+ jr nz, .inner_loop
+ pop hl
+ pop de
+ dec d
+ jr nz, .loop
+ jr .finished
+
+.done
+ pop hl
+ pop de
+
+.finished
+ ret
+; 4aab6
+
+Function4aab6: ; 4aab6
+ ld hl, wd002
+ ld d, $3
+.loop
+ ld a, [hli]
+ cp -1
+ jr z, .done
+ push de
+ push hl
+ hlcoord 0, 1
+ ld bc, $28
+ call AddNTimes
+ ld [hl], $ec
+ pop hl
+ pop de
+ dec d
+ jr nz, .loop
+
+.done
+ ret
+; 4aad3
+
+Function4aad3: ; 4aad3
+ ld hl, PartyCount
+ ld a, [hli]
+ and a
+ ret z ; Nothing in your party
+
+ ld c, a
+ xor a
+ ld [hObjectStructIndexBuffer], a
+.loop
+ push bc
+ push hl
+ ld e, 0
+ farcall LoadMenuMonIcon
+ ld a, [hObjectStructIndexBuffer]
+ inc a
+ ld [hObjectStructIndexBuffer], a
+ pop hl
+ pop bc
+ dec c
+ jr nz, .loop
+
+ call Function4aa7a
+ farcall PlaySpriteAnimations
+ ret
+; 4aafb
+
+Function4aafb: ; 4aafb
+ ld a, [CurPartySpecies]
+ cp EGG
+ jr z, .egg
+ and a
+ ret
+
+.egg
+ scf
+ ret
+; 4ab06
+
+Function4ab06: ; 4ab06
+ ld a, [CurPartyMon]
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld hl, PartyMon1HP
+ call AddNTimes
+ ld a, [hli]
+ ld b, a
+ ld a, [hl]
+ or b
+ jr nz, .NotFainted
+ scf
+
+.NotFainted:
+ ret
+; 4ab1a
+
+Function4ab1a: ; 4ab1a
+.asm_4ab1a
+ ld a, $fb
+ ld [wMenuJoypadFilter], a
+ ld a, $26
+ ld [w2DMenuCursorOffsets], a
+ ld a, $2
+ ld [w2DMenuNumCols], a
+ call Function4adf7
+ call StaticMenuJoypad
+ call Function4abc3
+ jr c, .asm_4ab1a
+ push af
+ call Function4ab99
+ call nc, PlaceHollowCursor
+ pop af
+ bit 1, a
+ jr nz, .asm_4ab6d
+ ld a, [PartyCount]
+ inc a
+ ld b, a
+ ld a, [wMenuCursorY]
+ ld [wPartyMenuCursor], a
+ cp b
+ jr z, .asm_4ab7e
+ ld a, [wMenuCursorY]
+ dec a
+ ld [CurPartyMon], a
+ ld c, a
+ ld b, $0
+ ld hl, PartySpecies
+ add hl, bc
+ ld a, [hl]
+ ld [CurPartySpecies], a
+ ld de, SFX_READ_TEXT_2
+ call PlaySFX
+ call WaitSFX
+ ld a, $1
+ and a
+ ret
+
+.asm_4ab6d
+ ld a, [wMenuCursorY]
+ ld [wPartyMenuCursor], a
+.asm_4ab73
+ ld de, SFX_READ_TEXT_2
+ call PlaySFX
+ call WaitSFX
+ scf
+ ret
+
+.asm_4ab7e
+ ld a, $1
+ ld [wd018], a
+ ld a, [wMenuCursorX]
+ cp $2
+ jr z, .asm_4ab73
+ ld de, SFX_READ_TEXT_2
+ call PlaySFX
+ call WaitSFX
+ xor a
+ ld [wd018], a
+ and a
+ ret
+; 4ab99
+
+Function4ab99: ; 4ab99
+ bit 1, a
+ jr z, .asm_4aba6
+ ld a, [wd002]
+ cp $ff
+ jr z, .asm_4aba6
+ scf
+ ret
+
+.asm_4aba6
+ and a
+ ret
+; 4aba8
+
+Function4aba8: ; 4aba8
+ ld hl, wd004
+ ld a, [hl]
+ cp $ff
+ jr nz, .asm_4abbe
+ dec hl
+ ld a, [hl]
+ cp $ff
+ jr nz, .asm_4abbe
+ dec hl
+ ld a, [hl]
+ cp $ff
+ jr nz, .asm_4abbe
+ and a
+ ret
+
+.asm_4abbe
+ ld a, $ff
+ ld [hl], a
+ scf
+ ret
+; 4abc3
+
+Function4abc3: ; 4abc3
+ bit 3, a
+ jr z, .asm_4abd5
+ ld a, [PartyCount]
+ inc a
+ ld [wMenuCursorY], a
+ ld a, $1
+ ld [wMenuCursorX], a
+ jr .asm_4ac29
+
+.asm_4abd5
+ bit 6, a
+ jr z, .asm_4abeb
+ ld a, [wMenuCursorY]
+ ld [wMenuCursorY], a
+ and a
+ jr nz, .asm_4ac29
+ ld a, [PartyCount]
+ inc a
+ ld [wMenuCursorY], a
+ jr .asm_4ac29
+
+.asm_4abeb
+ bit 7, a
+ jr z, .asm_4ac08
+ ld a, [wMenuCursorY]
+ ld [wMenuCursorY], a
+ ld a, [PartyCount]
+ inc a
+ inc a
+ ld b, a
+ ld a, [wMenuCursorY]
+ cp b
+ jr nz, .asm_4ac29
+ ld a, $1
+ ld [wMenuCursorY], a
+ jr .asm_4ac29
+
+.asm_4ac08
+ bit 4, a
+ jr nz, .asm_4ac10
+ bit 5, a
+ jr z, .asm_4ac56
+
+.asm_4ac10
+ ld a, [wMenuCursorY]
+ ld b, a
+ ld a, [PartyCount]
+ inc a
+ cp b
+ jr nz, .asm_4ac29
+ ld a, [wMenuCursorX]
+ cp $1
+ jr z, .asm_4ac26
+ ld a, $1
+ jr .asm_4ac29
+
+.asm_4ac26
+ ld [wMenuCursorX], a
+
+.asm_4ac29
+ hlcoord 0, 1
+ lb bc, 13, 1
+ call ClearBox
+ call Function4aab6
+ ld a, [PartyCount]
+ hlcoord 6, 1
+.asm_4ac3b
+ ld bc, $28
+ add hl, bc
+ dec a
+ jr nz, .asm_4ac3b
+ ld [hl], $7f
+ ld a, [wMenuCursorY]
+ ld b, a
+ ld a, [PartyCount]
+ inc a
+ cp b
+ jr z, .asm_4ac54
+ ld a, $1
+ ld [wMenuCursorX], a
+
+.asm_4ac54
+ scf
+ ret
+
+.asm_4ac56
+ and a
+ ret
+; 4ac58
+
+Function4ac58: ; 4ac58
+ lb bc, 2, 18
+ hlcoord 1, 15
+ call ClearBox
+ farcall FreezeMonIcons
+ ld hl, MenuDataHeader_0x4aca2
+ call LoadMenuDataHeader
+ ld hl, wd019
+ bit 1, [hl]
+ jr z, .asm_4ac89
+ hlcoord 11, 13
+ ld b, $3
+ ld c, $7
+ call TextBox
+ hlcoord 13, 14
+ ld de, String_4ada7
+ call PlaceString
+ jr .asm_4ac96
+
+.asm_4ac89
+ hlcoord 11, 9
+ ld b, $7
+ ld c, $7
+ call TextBox
+ call Function4ad68
+
+.asm_4ac96
+ ld a, $1
+ ld [hBGMapMode], a
+ call Function4acaa
+ call ExitMenu
+ and a
+ ret
+; 4aca2
+
+MenuDataHeader_0x4aca2: ; 0x4aca2
+ db $40 ; flags
+ db 09, 11 ; start coords
+ db 17, 19 ; end coords
+ dw NULL
+ db 1 ; default option
+; 0x4acaa
+
+Function4acaa: ; 4acaa
+.asm_4acaa
+ ld a, $a0
+ ld [wMenuData2Flags], a
+ ld a, [wd019]
+ bit 1, a
+ jr z, .asm_4acc2
+ ld a, $2
+ ld [wMenuData2Items], a
+ ld a, $c
+ ld [wMenuBorderTopCoord], a
+ jr .asm_4accc
+
+.asm_4acc2
+ ld a, $4
+ ld [wMenuData2Items], a
+ ld a, $8
+ ld [wMenuBorderTopCoord], a
+
+.asm_4accc
+ ld a, $b
+ ld [wMenuBorderLeftCoord], a
+ ld a, $1
+ ld [wMenuCursorBuffer], a
+ call InitVerticalMenuCursor
+ ld hl, w2DMenuFlags1
+ set 6, [hl]
+ call StaticMenuJoypad
+ ld de, SFX_READ_TEXT_2
+ call PlaySFX
+ ld a, [hJoyPressed]
+ bit 0, a
+ jr nz, .asm_4acf4
+ bit 1, a
+ jr nz, .asm_4acf3
+ jr .asm_4acaa
+
+.asm_4acf3
+ ret
+
+.asm_4acf4
+ ld a, [wd019]
+ bit 1, a
+ jr nz, .asm_4ad0e
+ ld a, [wMenuCursorY]
+ cp $1
+ jr z, Function4ad17
+ cp $2
+ jp z, Function4ad56
+ cp $3
+ jp z, Function4ad60
+ jr .asm_4acf3
+
+.asm_4ad0e
+ ld a, [wMenuCursorY]
+ cp $1
+ jr z, Function4ad56
+ jr .asm_4acf3
+
+Function4ad17: ; 4ad17
+ call Function4adb2
+ jr z, .asm_4ad4a
+ ld hl, wd002
+ ld a, $ff
+ cp [hl]
+ jr z, .asm_4ad39
+ inc hl
+ cp [hl]
+ jr z, .asm_4ad39
+ inc hl
+ cp [hl]
+ jr z, .asm_4ad39
+ ld de, SFX_WRONG
+ call WaitPlaySFX
+ ld hl, UnknownText_0x4ad51
+ call PrintText
+ ret
+
+.asm_4ad39
+ ld a, [CurPartyMon]
+ ld [hl], a
+ call Function4a9c3
+ ret c
+ ld a, [wd019]
+ set 0, a
+ ld [wd019], a
+ ret
+
+.asm_4ad4a
+ ld a, $ff
+ ld [hl], a
+ call Function4adc2
+ ret
+
+UnknownText_0x4ad51: ; 0x4ad51
+ ; Only three #MON may enter.
+ text_jump UnknownText_0x1c521c
+ db "@"
+; 0x4ad56
+
+Function4ad56: ; 4ad56
+ farcall OpenPartyStats
+ call WaitBGMap2
+ ret
+; 4ad60
+
+Function4ad60: ; 4ad60
+ farcall ManagePokemonMoves
+ ret
+; 4ad67
+
+Function4ad67: ; 4ad67
+ ret
+; 4ad68
+
+Function4ad68: ; 4ad68
+ hlcoord 13, 12
+ ld de, String_4ad88
+ call PlaceString
+ call Function4adb2
+ jr c, .asm_4ad7e
+ hlcoord 13, 10
+ ld de, String_4ada0
+ jr .asm_4ad84
+
+.asm_4ad7e
+ hlcoord 13, 10
+ ld de, String_4ad9a
+
+.asm_4ad84
+ call PlaceString
+ ret
+; 4ad88
+
+String_4ad88: ; 4ad88
+ db "つよさをみる"
+ next "つかえるわざ"
+ next "もどる@"
+; 4ad9a
+
+String_4ad9a: ; 4ad9a
+ db "さんかする@"
+; 4ada0
+
+String_4ada0: ; 4ada0
+ db "さんかしない@"
+; 4ada7
+
+String_4ada7: ; 4ada7
+ db "つよさをみる"
+ next "もどる@" ; BACK
+; 4adb2
+
+Function4adb2: ; 4adb2
+ ld hl, wd002
+ ld a, [CurPartyMon]
+ cp [hl]
+ ret z
+ inc hl
+ cp [hl]
+ ret z
+ inc hl
+ cp [hl]
+ ret z
+ scf
+ ret
+; 4adc2
+
+Function4adc2: ; 4adc2
+ ld a, [wd002]
+ cp $ff
+ jr nz, .skip
+ ld a, [wd003]
+ cp $ff
+ jr nz, .skip2
+ ld a, [wd004]
+ ld [wd002], a
+ ld a, $ff
+ ld [wd004], a
+ jr .skip
+
+.skip2
+ ld [wd002], a
+ ld a, $ff
+ ld [wd003], a
+
+.skip
+ ld a, [wd003]
+ cp $ff
+ ret nz
+ ld b, a
+ ld a, [wd004]
+ ld [wd003], a
+ ld a, b
+ ld [wd004], a
+ ret
+; 4adf7
+
+Function4adf7: ; 4adf7
+ ld a, [wd019]
+ bit 0, a
+ ret z
+ ld a, [PartyCount]
+ inc a
+ ld [wMenuCursorY], a
+ ld a, $1
+ ld [wMenuCursorX], a
+ ld a, [wd019]
+ res 0, a
+ ld [wd019], a
+ ret
+; 4ae12
diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm
new file mode 100644
index 000000000..fa58b7a05
--- /dev/null
+++ b/mobile/mobile_22.asm
@@ -0,0 +1,4450 @@
+String_89116:
+ db "-----@"
+
+String_8911c: ; 8911c
+ db "でんわばんごうが ただしく" ; Phone number is not
+ next "はいって いません!@" ; entered correctly!
+; 89135
+
+String_89135: ; 89135
+ db "データが かわって いますが" ; The data has changed.
+ next "かきかえないで やめますか?@" ; Quit anyway?
+; 89153
+
+String_89153: ; 89153
+ db "メッセージは ありません@" ; No message
+; 89160
+
+OpenSRAMBank4: ; 89160
+ push af
+ ld a, $4
+ call GetSRAMBank
+ pop af
+ ret
+; 89168
+
+
+Function89168: ; 89168 (22:5168)
+ ld hl, GameTimerPause
+ set 7, [hl]
+ ret
+
+Function8916e: ; 8916e (22:516e)
+ ld hl, GameTimerPause
+ res 7, [hl]
+ ret
+
+Function89174: ; 89174 (22:5174)
+ ld hl, GameTimerPause
+ bit 7, [hl]
+ ret
+
+Function8917a: ; 8917a (22:517a)
+ ld hl, wd002
+ ld bc, $32
+ xor a
+ call ByteFill
+ ret
+
+Function89185: ; 89185 (22:5185)
+; strcmp(hl, de, c)
+; Compares c bytes starting at de and hl and incrementing together until a mismatch is found.
+; Preserves hl and de.
+ push de
+ push hl
+.loop
+ ld a, [de]
+ inc de
+ cp [hl]
+ jr nz, .done
+ inc hl
+ dec c
+ jr nz, .loop
+.done
+ pop hl
+ pop de
+ ret
+
+Function89193: ; 89193
+; copy(hl, de, 4)
+; Copies c bytes from hl to de.
+; Preserves hl and de.
+ push de
+ push hl
+.loop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .loop
+ pop hl
+ pop de
+ ret
+; 8919e
+
+
+Function8919e: ; 8919e (22:519e)
+; Searches for the c'th string starting at de. Returns the pointer in de.
+ ld a, c
+ and a
+ ret z
+.loop
+ ld a, [de]
+ inc de
+ cp "@"
+ jr nz, .loop
+ dec c
+ jr nz, .loop
+ ret
+
+Function891ab: ; 891ab
+ call Mobile22_SetBGMapMode1
+ farcall ReloadMapPart
+ call Mobile22_SetBGMapMode0
+ ret
+; 891b8
+
+Function891b8: ; 891b8
+ call Mobile22_SetBGMapMode0
+ hlcoord 0, 0
+ ld a, " "
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ call ByteFill
+ call DelayFrame
+ ret
+; 891ca
+
+
+Function891ca: ; 891ca (22:51ca)
+ push bc
+ call Function891b8
+ call WaitBGMap
+ pop bc
+ ret
+
+Function891d3: ; 891d3 (22:51d3)
+ push bc
+ call Function891ca
+ ld c, $10
+ call DelayFrames
+ pop bc
+ ret
+
+Function891de: ; 891de
+ call Mobile22_SetBGMapMode0
+ call ClearPalettes
+ hlcoord 0, 0, AttrMap
+ ld a, $7
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ call ByteFill
+ hlcoord 0, 0
+ ld a, " "
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ call ByteFill
+ call Function891ab
+ ret
+; 891fe
+
+Function891fe: ; 891fe
+ push bc
+ call Function891de
+ ld c, $10
+ call DelayFrames
+ pop bc
+ ret
+; 89209
+
+Function89209: ; 89209
+ ld a, 1
+ ld [wSpriteUpdatesEnabled], a
+ ret
+; 8920f
+
+Function8920f: ; 8920f
+ ld a, 0
+ ld [wSpriteUpdatesEnabled], a
+ ret
+; 89215
+
+Function89215: ; 89215
+ push hl
+ push bc
+ ld bc, AttrMap - TileMap
+ add hl, bc
+ ld [hl], a
+ pop bc
+ pop hl
+ ret
+; 8921f
+
+
+Function8921f: ; 8921f (22:521f)
+ push de
+ ld de, SCREEN_WIDTH
+ add hl, de
+ inc hl
+ ld a, $7f
+.loop
+ push bc
+ push hl
+.asm_89229
+ ld [hli], a
+ dec c
+ jr nz, .asm_89229
+ pop hl
+ add hl, de
+ pop bc
+ dec b
+ jr nz, .loop
+ pop de
+ ret
+
+Mobile22_ButtonSound: ; 89235 (22:5235)
+ call JoyWaitAorB
+ call PlayClickSFX
+ ret
+
+Mobile22_SetBGMapMode0: ; 8923c
+ xor a
+ ld [hBGMapMode], a
+ ret
+; 89240
+
+Mobile22_SetBGMapMode1: ; 89240
+ ld a, $1
+ ld [hBGMapMode], a
+ ret
+; 89245
+
+
+Function89245: ; 89245 (22:5245)
+ farcall TryLoadSaveFile
+ ret c
+ farcall _LoadData
+ and a
+ ret
+
+Function89254: ; 89254 (22:5254)
+ ld bc, $d07
+ jr Function89261
+
+Function89259: ; 89259
+ ld bc, $0e07
+ jr Function89261
+
+Function8925e: ; 8925e
+ ld bc, $0e0c
+
+Function89261: ; 89261
+ push af
+ push bc
+ ld hl, MenuDataHeader_0x892a3
+ call CopyMenuDataHeader
+ pop bc
+ ld hl, wMenuBorderTopCoord
+ ld a, c
+ ld [hli], a
+ ld a, b
+ ld [hli], a
+ ld a, c
+ add $4
+ ld [hli], a
+ ld a, b
+ add $5
+ ld [hl], a
+ pop af
+ ld [wMenuCursorBuffer], a
+ call PushWindow
+ call Mobile22_SetBGMapMode0
+ call Function89209
+ call VerticalMenu
+ push af
+ ld c, $a
+ call DelayFrames
+ call CloseWindow
+ call Function8920f
+ pop af
+ jr c, .done
+ ld a, [wMenuCursorY]
+ cp $2
+ jr z, .done
+ and a
+ ret
+
+.done
+ scf
+ ret
+; 892a3
+
+MenuDataHeader_0x892a3: ; 0x892a3
+ db $40 ; flags
+ db 05, 10 ; start coords
+ db 09, 15 ; end coords
+ dw MenuData2_0x892ab
+ db 1 ; default option
+; 0x892ab
+
+MenuData2_0x892ab: ; 0x892ab
+ db $c0 ; flags
+ db 2 ; items
+ db "はい@"
+ db "いいえ@"
+; 0x892b4
+
+Function892b4: ; 892b4 (22:52b4)
+ call Function8931b
+
+Function892b7: ; 892b7
+ ld d, b
+ ld e, c
+ ld hl, 0
+ add hl, bc
+ ld a, "@"
+ ld bc, 6
+ call ByteFill
+ ld b, d
+ ld c, e
+ ld hl, 6
+ add hl, bc
+ ld a, "@"
+ ld bc, 6
+ call ByteFill
+ ld b, d
+ ld c, e
+ ld hl, 12
+ add hl, bc
+ xor a
+ ld [hli], a
+ ld [hl], a
+ ld hl, 14
+ add hl, bc
+ ld [hli], a
+ ld [hl], a
+ ld hl, 16
+ add hl, bc
+ ld [hl], a
+ ld hl, 17
+ add hl, bc
+ ld a, -1
+ ld bc, 8
+ call ByteFill
+ ld b, d
+ ld c, e
+ ld e, 6
+ ld hl, 25
+ add hl, bc
+.loop
+ ld a, -1
+ ld [hli], a
+ ld a, -1
+ ld [hli], a
+ dec e
+ jr nz, .loop
+ ret
+; 89305
+
+
+Function89305: ; 89305 (22:5305)
+ xor a
+ ld [MenuSelection], a
+ ld c, 40
+.loop
+ ld a, [MenuSelection]
+ inc a
+ ld [MenuSelection], a
+ push bc
+ call Function892b4
+ pop bc
+ dec c
+ jr nz, .loop
+ ret
+
+Function8931b: ; 8931b
+ push hl
+ ld hl, $a03b ; 4:a03b
+ ld a, [MenuSelection]
+ dec a
+ ld bc, 37
+ call AddNTimes
+ ld b, h
+ ld c, l
+ pop hl
+ ret
+; 8932d
+
+Function8932d: ; 8932d
+ ld hl, 0
+ add hl, bc
+
+Function89331: ; 89331
+; Scans up to 5 characters starting at hl, looking for a nonspace character up to the next terminator.
+; Sets carry if it does not find a nonspace character.
+; Returns the location of the following character in hl.
+ push bc
+ ld c, NAME_LENGTH_JAPANESE - 1
+.loop
+ ld a, [hli]
+ cp "@"
+ jr z, .terminator
+ cp " "
+ jr nz, .nonspace
+ dec c
+ jr nz, .loop
+
+.terminator
+ scf
+ jr .done
+
+.nonspace
+ and a
+
+.done
+ pop bc
+ ret
+; 89346
+
+
+Function89346: ; 89346 (22:5346)
+ ld h, b
+ ld l, c
+ jr _incave
+
+Function8934a: ; 8934a
+ ld hl, NAME_LENGTH_JAPANESE
+ add hl, bc
+_incave:
+; Scans up to 5 characters starting at hl, looking for a nonspace character up to the next terminator. Sets carry if it does not find a nonspace character. Returns the location of the following character in hl.
+ push bc
+ ld c, NAME_LENGTH_JAPANESE - 1
+.loop
+ ld a, [hli]
+ cp "@"
+ jr z, .terminator
+ cp " "
+ jr nz, .nonspace
+ dec c
+ jr nz, .loop
+
+.terminator
+ scf
+ jr .done
+
+.nonspace
+ and a
+
+.done
+ pop bc
+ ret
+; 89363
+
+Function89363: ; 89363
+; Scans six byte pairs starting at bc to find $ff. Sets carry if it does not find a $ff. Returns the location of the byte after the first $ff found in hl.
+ ld h, b
+ ld l, c
+ jr ._incave
+
+ ld hl, 25
+ add hl, bc
+
+._incave
+ push de
+ ld e, NAME_LENGTH_JAPANESE
+.loop
+ ld a, [hli]
+ cp -1
+ jr nz, .ok
+ ld a, [hli]
+ cp -1
+ jr nz, .ok
+ dec e
+ jr nz, .loop
+ scf
+ jr .done
+
+.ok
+ and a
+
+.done
+ pop de
+ ret
+; 89381
+
+Function89381: ; 89381
+ push bc
+ push de
+ call Function89b45
+ jr c, .ok
+ push hl
+ ld a, -1
+ ld bc, 8
+ call ByteFill
+ pop hl
+
+.ok
+ pop de
+ ld c, 8
+ call Function89193
+ pop bc
+ ret
+; 8939a
+
+Function8939a: ; 8939a
+ push bc
+ ld hl, 0
+ add hl, bc
+ ld de, wd002
+ ld c, 6
+ call Function89193
+ pop bc
+ ld hl, 17
+ add hl, bc
+ ld de, wd008
+ call Function89381
+ ret
+; 893b3
+
+
+Function893b3: ; 893b3 (22:53b3)
+ call DisableLCD
+ call ClearSprites
+ call LoadStandardFont
+ call LoadFontsExtra
+ call Function893ef
+ call Function8942b
+ call Function89455
+ call EnableLCD
+ ret
+
+Function893cc: ; 893cc
+ call DisableLCD
+ call ClearSprites
+ call LoadStandardFont
+ call LoadFontsExtra
+ call Function893ef
+ call Function89464
+ call EnableLCD
+ ret
+; 893e2
+
+
+Function893e2: ; 893e2 (22:53e2)
+ call Function89b1e
+ call Function893b3
+ call Function8a5b6
+ call Function8949c
+ ret
+
+Function893ef: ; 893ef
+ ld de, VTiles0
+ ld hl, GFX_8940b
+ ld bc, $20
+ ld a, BANK(GFX_8940b)
+ call FarCopyBytes
+ ret
+; 893fe
+
+Function893fe: ; 893fe
+ call DisableLCD
+ call Function893ef
+ call EnableLCD
+ call DelayFrame
+ ret
+; 8940b
+
+GFX_8940b: ; 8940b
+INCBIN "gfx/unknown/08940b.2bpp"
+; 8942b
+
+Function8942b: ; 8942b (22:542b)
+ ld de, VTiles0 tile $02
+ ld hl, MobileAdapterGFX + $7d0
+ ld bc, $80
+ ld a, BANK(MobileAdapterGFX)
+ call FarCopyBytes
+ ld de, VTiles0 tile $0a
+ ld hl, MobileAdapterGFX + $c60
+ ld bc, $40
+ ld a, BANK(MobileAdapterGFX)
+ call FarCopyBytes
+ ret
+
+Function89448: ; 89448 (22:5448)
+; Clears the Sprites array
+ push af
+ ld hl, Sprites
+ ld d, $10 * 6
+ xor a
+.loop
+ ld [hli], a
+ dec d
+ jr nz, .loop
+ pop af
+ ret
+
+Function89455: ; 89455 (22:5455)
+ ld hl, MobileAdapterGFX + $7d0
+ ld de, VTiles2 tile $0c
+ ld bc, $490
+ ld a, BANK(MobileAdapterGFX)
+ call FarCopyBytes
+ ret
+
+Function89464: ; 89464
+ ld hl, MobileAdapterGFX
+ ld de, VTiles2
+ ld bc, $200
+ ld a, BANK(MobileAdapterGFX)
+ call FarCopyBytes
+ ld hl, MobileAdapterGFX + $660
+ ld de, VTiles2 tile $20
+ ld bc, $170
+ ld a, BANK(MobileAdapterGFX)
+ call FarCopyBytes
+ ret
+; 89481
+
+Function89481: ; 89481
+ ld d, 2
+ call Function8934a
+ ret c
+ ld d, 0
+ ld hl, 16
+ add hl, bc
+ bit 0, [hl]
+ ret z
+ inc d
+ ret
+; 89492
+
+
+Function89492: ; 89492 (22:5492)
+ ld d, 0
+ ld a, [PlayerGender]
+ bit 0, a
+ ret z
+ inc d
+ ret
+
+Function8949c: ; 8949c
+ ld a, [rSVBK]
+ push af
+ ld a, 5
+ ld [rSVBK], a
+ ld hl, Palette_894b3
+ ld de, UnknBGPals + 8 * 7
+ ld bc, 8
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ ret
+; 894b3
+
+Palette_894b3: ; 894b3
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+; 894bb
+
+Function894bb: ; 894bb
+ call Function894dc
+ push bc
+ call Function8956f
+ call Function8949c
+ call Function8a60d
+ pop bc
+ ret
+; 894ca
+
+
+Function894ca: ; 894ca (22:54ca)
+ push bc
+ call Function894dc
+ call Function895c7
+ call Function8949c
+ call Function8a60d
+ call SetPalettes
+ pop bc
+ ret
+
+Function894dc: ; 894dc
+ push bc
+ ld a, [rSVBK]
+ push af
+ ld a, 5
+ ld [rSVBK], a
+
+ ld c, d
+ ld b, 0
+ ld hl, .PalettePointers
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, UnknBGPals
+ ld bc, 3 palettes
+ call CopyBytes
+ ld hl, .Pals345
+ ld de, UnknBGPals + 3 palettes
+ ld bc, 3 palettes
+ call CopyBytes
+
+ pop af
+ ld [rSVBK], a
+ pop bc
+ ret
+; 89509
+
+.PalettePointers: ; 89509
+ dw .Pals012a
+ dw .Pals012b
+ dw .Pals012c
+; 8950f
+
+.Pals012a: ; 8950f
+ RGB 31, 31, 31
+ RGB 10, 17, 13
+ RGB 10, 08, 22
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 20, 31
+ RGB 10, 08, 22
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 20, 31
+ RGB 10, 17, 13
+ RGB 00, 00, 00
+
+.Pals012b: ; 89527
+ RGB 31, 31, 31
+ RGB 30, 22, 11
+ RGB 31, 08, 15
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 20, 31
+ RGB 31, 08, 15
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 20, 31
+ RGB 30, 22, 11
+ RGB 00, 00, 00
+
+.Pals012c: ; 8953f
+ RGB 31, 31, 31
+ RGB 15, 20, 26
+ RGB 25, 07, 20
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 20, 31
+ RGB 25, 07, 20
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 20, 31
+ RGB 15, 20, 26
+ RGB 00, 00, 00
+
+.Pals345: ; 89557
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 13, 00
+ RGB 14, 08, 00
+
+ RGB 31, 31, 31
+ RGB 16, 16, 31
+ RGB 00, 00, 31
+ RGB 00, 00, 00
+
+ RGB 19, 31, 11
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+; 8956f
+
+Function8956f: ; 8956f
+ push bc
+ ld hl, 16
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld hl, $000c
+ add hl, bc
+ ld b, h
+ ld c, l
+ farcall GetMobileOTTrainerClass
+ ld a, c
+ ld [TrainerClass], a
+ ld a, [rSVBK]
+ push af
+ ld a, 5
+ ld [rSVBK], a
+ ld hl, wd030
+ ld a, -1
+ ld [hli], a
+ ld a, " "
+ ld [hl], a
+ pop af
+ ld [rSVBK], a
+ ld a, [TrainerClass]
+ ld h, 0
+ ld l, a
+ add hl, hl
+ add hl, hl
+ ld de, TrainerPalettes
+ add hl, de
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld de, wd032
+ ld c, 4
+.loop
+ ld a, BANK(TrainerPalettes)
+ call GetFarByte
+ ld [de], a
+ inc de
+ inc hl
+ dec c
+ jr nz, .loop
+ ld hl, wd036
+ xor a
+ ld [hli], a
+ ld [hl], a
+ pop af
+ ld [rSVBK], a
+ pop bc
+ ret
+; 895c7
+
+
+Function895c7: ; 895c7 (22:55c7)
+ ld a, [rSVBK]
+ push af
+ ld a, 5
+ ld [rSVBK], a
+ ld hl, Palette_895de
+ ld de, wd030
+ ld bc, 8
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ ret
+; 895de (22:55de)
+
+Palette_895de: ; 895de
+ RGB 31, 31, 31
+ RGB 07, 07, 06
+ RGB 07, 07, 06
+ RGB 00, 00, 00
+; 895e6
+
+Function895e6: ; 895e6
+ ld a, 7
+ hlcoord 0, 0, AttrMap
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ call ByteFill
+ ret
+; 895f2
+
+Function895f2: ; 895f2
+ push bc
+ xor a
+ hlcoord 0, 0, AttrMap
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ call ByteFill
+ call Function89605
+ call Function89655
+ pop bc
+ ret
+; 89605
+
+Function89605: ; 89605
+ hlcoord 19, 2, AttrMap
+ ld a, 1
+ ld de, SCREEN_WIDTH
+ ld c, 14
+.loop
+ ld [hl], a
+ dec c
+ jr z, .done
+ add hl, de
+ inc a
+ ld [hl], a
+ dec a
+ add hl, de
+ dec c
+ jr nz, .loop
+
+.done
+ hlcoord 0, 16, AttrMap
+ ld c, 10
+ ld a, 2
+.loop2
+ ld [hli], a
+ dec a
+ ld [hli], a
+ inc a
+ dec c
+ jr nz, .loop2
+ hlcoord 1, 11, AttrMap
+ ld a, 4
+ ld bc, 4
+ call ByteFill
+ ld a, 5
+ ld bc, 14
+ call ByteFill
+ ret
+; 8963d
+
+Function8963d: ; 8963d
+ hlcoord 12, 3, AttrMap
+ ld a, 6
+ ld de, SCREEN_WIDTH
+ lb bc, 7, 7
+.loop
+ push hl
+ ld c, 7
+.next
+ ld [hli], a
+ dec c
+ jr nz, .next
+ pop hl
+ add hl, de
+ dec b
+ jr nz, .loop
+ ret
+; 89655
+
+Function89655: ; 89655
+ hlcoord 1, 12, AttrMap
+ ld de, SCREEN_WIDTH
+ ld a, 5
+ ld b, 4
+.loop
+ ld c, 18
+ push hl
+.next
+ ld [hli], a
+ dec c
+ jr nz, .next
+ pop hl
+ add hl, de
+ dec b
+ jr nz, .loop
+ ret
+; 8966c
+
+Function8966c: ; 8966c
+ push bc
+ call Function89688
+ hlcoord 4, 0
+ ld c, 8
+ call Function896f5
+ pop bc
+ ret
+; 8967a
+
+
+Function8967a: ; 8967a (22:567a)
+ push bc
+ call Function89688
+ hlcoord 2, 0
+ ld c, 12
+ call Function896f5
+ pop bc
+ ret
+
+Function89688: ; 89688
+ hlcoord 0, 0
+ ld a, 1
+ ld e, SCREEN_WIDTH
+ call Function896e1
+ ld a, 2
+ ld e, SCREEN_WIDTH
+ call Function896eb
+ ld a, 3
+ ld [hli], a
+ ld a, 4
+ ld e, SCREEN_HEIGHT
+ call Function896e1
+ ld a, 6
+ ld [hli], a
+ push bc
+ ld c, 13
+.loop
+ call Function896cb
+ dec c
+ jr z, .done
+ call Function896d6
+ dec c
+ jr nz, .loop
+
+.done
+ pop bc
+ ld a, 25
+ ld [hli], a
+ ld a, 26
+ ld e, SCREEN_HEIGHT
+ call Function896e1
+ ld a, 28
+ ld [hli], a
+ ld a, 2
+ ld e, SCREEN_WIDTH
+ call Function896eb
+ ret
+; 896cb
+
+Function896cb: ; 896cb
+ ld de, SCREEN_WIDTH - 1
+ ld a, 7
+ ld [hl], a
+ add hl, de
+ ld a, 9
+ ld [hli], a
+ ret
+; 896d6
+
+Function896d6: ; 896d6
+ ld de, SCREEN_WIDTH - 1
+ ld a, 10
+ ld [hl], a
+ add hl, de
+ ld a, 11
+ ld [hli], a
+ ret
+; 896e1
+
+Function896e1: ; 896e1
+.loop
+ ld [hli], a
+ inc a
+ dec e
+ ret z
+ ld [hli], a
+ dec a
+ dec e
+ jr nz, .loop
+ ret
+; 896eb
+
+Function896eb: ; 896eb
+.loop
+ ld [hli], a
+ dec a
+ dec e
+ ret z
+ ld [hli], a
+ inc a
+ dec e
+ jr nz, .loop
+ ret
+; 896f5
+
+Function896f5: ; 896f5
+ call Function8971f
+ call Function89736
+ inc hl
+ inc hl
+ ld b, 2
+
+ClearScreenArea: ; 0x896ff
+; clears an area of the screen
+; INPUT:
+; hl = address of upper left corner of the area
+; b = height
+; c = width
+
+ ld a, " " ; blank tile
+ ld de, 20 ; screen width
+.loop
+ push bc
+ push hl
+.innerLoop
+ ld [hli], a
+ dec c
+ jr nz, .innerLoop
+ pop hl
+ pop bc
+ add hl, de
+ dec b
+ jr nz, .loop
+
+ dec hl
+ inc c
+ inc c
+.asm_89713
+ ld a, $36
+ ld [hli], a
+ dec c
+ ret z
+ ld a, $18
+ ld [hli], a
+ dec c
+ jr nz, .asm_89713 ; 0x8971c $f5
+ ret
+; 0x8971f
+
+Function8971f: ; 8971f
+ ld a, $2c
+ ld [hli], a
+ ld a, $2d
+ ld [hld], a
+ push hl
+ ld de, SCREEN_WIDTH
+ add hl, de
+ ld a, $31
+ ld [hli], a
+ ld a, $32
+ ld [hld], a
+ add hl, de
+ ld a, $35
+ ld [hl], a
+ pop hl
+ ret
+; 89736
+
+Function89736: ; 89736
+ push hl
+ inc hl
+ inc hl
+ ld e, c
+ ld d, $0
+ add hl, de
+ ld a, $2f
+ ld [hli], a
+ ld a, $30
+ ld [hld], a
+ ld de, SCREEN_WIDTH
+ add hl, de
+ ld a, $33
+ ld [hli], a
+ ld a, $34
+ ld [hl], a
+ add hl, de
+ ld a, $1f
+ ld [hl], a
+ pop hl
+ ret
+; 89753
+
+Function89753: ; 89753
+ ld a, $c
+ ld [hl], a
+ xor a
+ call Function89215
+ ret
+; 8975b
+
+Function8975b: ; 8975b
+ ld a, $1d
+ ld [hli], a
+ inc a
+ ld [hli], a
+ ld a, $d
+ ld [hl], a
+ dec hl
+ dec hl
+ ld a, $4
+ ld e, $3
+.asm_89769
+ call Function89215
+ inc hl
+ dec e
+ jr nz, .asm_89769
+ ret
+; 89771
+
+Function89771: ; 89771
+ ld a, $12
+ ld [hl], a
+ ld a, $3
+ call Function89215
+ ret
+; 8977a
+
+Function8977a: ; 8977a
+ ld e, $4
+ ld d, $13
+.asm_8977e
+ ld a, d
+ ld [hl], a
+ ld a, $4
+ call Function89215
+ inc hl
+ inc d
+ dec e
+ jr nz, .asm_8977e
+ ld e, $e
+.asm_8978c
+ ld a, d
+ ld [hl], a
+ xor a
+ call Function89215
+ inc hl
+ dec e
+ jr nz, .asm_8978c
+ ret
+; 89797
+
+Function89797: ; 89797
+ push bc
+ ld a, $e
+ ld [hl], a
+ ld bc, SCREEN_WIDTH
+ add hl, bc
+ ld a, $11
+ ld [hli], a
+ ld a, $10
+ ld c, $8
+.asm_897a6
+ ld [hli], a
+ dec c
+ jr nz, .asm_897a6
+ ld a, $f
+ ld [hl], a
+ pop bc
+ ret
+; 897af
+
+Function897af: ; 897af
+ push bc
+ ld hl, $0010
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld hl, $000c
+ add hl, bc
+ ld b, h
+ ld c, l
+ farcall GetMobileOTTrainerClass
+ ld a, c
+ ld [TrainerClass], a
+ xor a
+ ld [CurPartySpecies], a
+ ld de, VTiles2 tile $37
+ farcall GetTrainerPic
+ pop bc
+ ret
+; 897d5
+
+Function897d5: ; 897d5
+ push bc
+ call Function8934a
+ jr nc, .asm_897f3
+ hlcoord 12, 3, AttrMap
+ xor a
+ ld de, SCREEN_WIDTH
+ lb bc, 7, 7
+.asm_897e5
+ push hl
+ ld c, $7
+.asm_897e8
+ ld [hli], a
+ dec c
+ jr nz, .asm_897e8
+ pop hl
+ add hl, de
+ dec b
+ jr nz, .asm_897e5
+ pop bc
+ ret
+
+.asm_897f3
+ ld a, $37
+ ld [hGraphicStartTile], a
+ hlcoord 12, 3
+ lb bc, 7, 7
+ predef PlaceGraphic
+ call Function8963d
+ pop bc
+ ret
+; 89807
+
+
+Function89807: ; 89807 (22:5807)
+ ld hl, MobileAdapterGFX + $200
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, .asm_89814
+ ld hl, MobileAdapterGFX + $200 + $230
+.asm_89814
+ call DisableLCD
+ ld de, VTiles2 tile $37
+ ld bc, $230
+ ld a, BANK(MobileAdapterGFX)
+ call FarCopyBytes
+ call EnableLCD
+ call DelayFrame
+ ret
+
+Function89829: ; 89829 (22:5829)
+ push bc
+ ld bc, $705
+ ld de, $14
+ ld a, $37
+.asm_89832
+ push bc
+ push hl
+.asm_89834
+ ld [hli], a
+ inc a
+ dec c
+ jr nz, .asm_89834
+ pop hl
+ add hl, de
+ pop bc
+ dec b
+ jr nz, .asm_89832
+ call Function8963d
+ pop bc
+ ret
+
+Function89844: ; 89844
+ call Function89481
+ call Function894bb
+ call Function897af
+ push bc
+ call WaitBGMap2
+ call SetPalettes
+ pop bc
+ ret
+; 89856
+
+Function89856: ; 89856
+ push bc
+ call Function891b8
+ pop bc
+ call Function895f2
+ call Function8966c
+ call Function899d3
+ call Function898aa
+ call Function898be
+ call Function898dc
+ call Function898f3
+ push bc
+ ld bc, wd008
+ hlcoord 2, 10
+ call Function89975
+ pop bc
+ call Function897d5
+ ret
+; 8987f
+
+
+Function8987f: ; 8987f (22:587f)
+ call Function891b8
+ call Function895f2
+ call Function8967a
+ call Function899d3
+ hlcoord 5, 1
+ call Function8999c
+ hlcoord 13, 3
+ call Function89829
+ call Function899b2
+ hlcoord 5, 5
+ call Function899c9
+ ld bc, wd008
+ hlcoord 2, 10
+ call Function89975
+ ret
+
+Function898aa: ; 898aa
+ ld a, [MenuSelection]
+ and a
+ ret z
+ push bc
+ hlcoord 6, 1
+ ld de, MenuSelection
+ lb bc, PRINTNUM_LEADINGZEROS | 1, 2
+ call PrintNum
+ pop bc
+ ret
+; 898be
+
+Function898be: ; 898be
+ push bc
+ ld de, wd002
+ ld hl, wd002
+ call Function89331
+ jr nc, .asm_898cd
+ ld de, String_89116
+
+.asm_898cd
+ hlcoord 9, 1
+ ld a, [MenuSelection]
+ and a
+ jr nz, .asm_898d7
+ dec hl
+
+.asm_898d7
+ call PlaceString
+ pop bc
+ ret
+; 898dc
+
+Function898dc: ; 898dc
+ ld hl, $0006
+ add hl, bc
+ push bc
+ ld d, h
+ ld e, l
+ call Function8934a
+ jr nc, .asm_898eb
+ ld de, String_89116
+
+.asm_898eb
+ hlcoord 6, 4
+ call PlaceString
+ pop bc
+ ret
+; 898f3
+
+Function898f3: ; 898f3
+ push bc
+ ld hl, $000c
+ add hl, bc
+ ld d, h
+ ld e, l
+ call Function8934a
+ jr c, .asm_8990a
+ hlcoord 5, 5
+ lb bc, PRINTNUM_LEADINGZEROS | 2, 5
+ call PrintNum
+ jr .asm_89913
+
+.asm_8990a
+ hlcoord 5, 5
+ ld de, String_89116
+ call PlaceString
+
+.asm_89913
+ pop bc
+ ret
+; 89915
+
+Function89915: ; 89915
+ push bc
+ push hl
+ ld de, Unknown_89942
+ ld c, $8
+.asm_8991c
+ ld a, [de]
+ ld [hl], a
+ ld a, $4
+ call Function89215
+ inc hl
+ inc de
+ dec c
+ jr nz, .asm_8991c
+ pop hl
+ ld b, $4
+ ld c, $2b
+ ld a, $8
+ ld de, Unknown_8994a
+.asm_89932
+ push af
+ ld a, [de]
+ cp [hl]
+ jr nz, .asm_8993b
+ call Function8994e
+ inc de
+
+.asm_8993b
+ inc hl
+ pop af
+ dec a
+ jr nz, .asm_89932
+ pop bc
+ ret
+; 89942
+
+Unknown_89942: ; 89942
+ db $24, $25, $26, " ", $27, $28, $29, $2a
+Unknown_8994a: ; 8994a
+ db $24, $27, $29, $ff
+; 8994e
+
+Function8994e: ; 8994e
+ push hl
+ push de
+ ld de, SCREEN_WIDTH
+ ld a, l
+ sub e
+ ld l, a
+ ld a, h
+ sbc d
+ ld h, a
+ ld a, c
+ ld [hl], a
+ ld a, b
+ call Function89215
+ pop de
+ pop hl
+ ret
+; 89962
+
+Function89962: ; 89962
+ push bc
+ ld c, $4
+ ld b, $20
+.asm_89967
+ ld a, b
+ ld [hl], a
+ ld a, $4
+ call Function89215
+ inc hl
+ inc b
+ dec c
+ jr nz, .asm_89967
+ pop bc
+ ret
+; 89975
+
+Function89975: ; 89975
+ push bc
+ ld e, $8
+.asm_89978
+ ld a, [bc]
+ ld d, a
+ call Function8998b
+ swap d
+ inc hl
+ ld a, d
+ call Function8998b
+ inc bc
+ inc hl
+ dec e
+ jr nz, .asm_89978
+ pop bc
+ ret
+; 8998b
+
+Function8998b: ; 8998b
+ push bc
+ and $f
+ cp $a
+ jr nc, .asm_89997
+ ld c, $f6
+ add c
+ jr .asm_89999
+
+.asm_89997
+ ld a, $7f
+
+.asm_89999
+ ld [hl], a
+ pop bc
+ ret
+; 8999c
+
+
+Function8999c: ; 8999c (22:599c)
+ ld de, PlayerName
+ call PlaceString
+ inc bc
+ ld h, b
+ ld l, c
+ ld de, String_899ac
+ call PlaceString
+ ret
+; 899ac (22:59ac)
+
+String_899ac: ; 899ac
+ db "の めいし@"
+; 899b2
+
+Function899b2: ; 899b2 (22:59b2)
+ ld bc, PlayerName
+ call Function89346
+ jr c, .asm_899bf
+ ld de, PlayerName
+ jr .asm_899c2
+.asm_899bf
+ ld de, String_89116
+.asm_899c2
+ hlcoord 6, 4
+ call PlaceString
+ ret
+
+Function899c9: ; 899c9 (22:59c9)
+ ld de, PlayerID
+ lb bc, PRINTNUM_LEADINGZEROS | 2, 5
+ call PrintNum
+ ret
+
+Function899d3: ; 899d3
+ hlcoord 1, 4
+ call Function89753
+ hlcoord 2, 5
+ call Function8975b
+ hlcoord 1, 9
+ call Function89771
+ hlcoord 1, 11
+ call Function8977a
+ hlcoord 1, 5
+ call Function89797
+ hlcoord 2, 4
+ call Function89962
+ hlcoord 2, 9
+ call Function89915
+ ret
+; 899fe
+
+Function899fe: ; 899fe
+ push bc
+ push hl
+ ld hl, $0019
+ add hl, bc
+ ld b, h
+ ld c, l
+ pop hl
+ call Function89a0c
+ pop bc
+ ret
+; 89a0c
+
+Function89a0c: ; 89a0c
+ push hl
+ call Function89363
+ pop hl
+ jr c, .asm_89a1c
+ ld d, h
+ ld e, l
+ farcall Function11c08f
+ ret
+
+.asm_89a1c
+ ld de, String_89153
+ call PlaceString
+ ret
+; 89a23
+
+
+Function89a23: ; 89a23 (22:5a23)
+ hlcoord 0, 11
+ ld b, $4
+ ld c, $12
+ call Function8921f
+ ret
+
+Function89a2e: ; 89a2e (22:5a2e)
+ hlcoord 11, 12
+ ld b, $2
+ ld c, $6
+ call TextBox
+ hlcoord 13, 13
+ ld de, String_89a4e
+ call PlaceString
+ hlcoord 13, 14
+ ld de, String_89a53
+ call PlaceString
+ call Function89655
+ ret
+; 89a4e (22:5a4e)
+
+String_89a4e: ; 89a4e
+ db "けってい@"
+; 89a53
+
+String_89a53: ; 89a53
+ db "やめる@"
+; 89a57
+
+Function89a57: ; 89a57
+ call JoyTextDelay_ForcehJoyDown ; joypad
+ bit D_UP_F, c
+ jr nz, .d_up
+ bit D_DOWN_F, c
+ jr nz, .d_down
+ bit A_BUTTON_F, c
+ jr nz, .a_b_button
+ bit B_BUTTON_F, c
+ jr nz, .a_b_button
+ bit START_F, c
+ jr nz, .start_button
+ scf
+ ret
+
+.a_b_button
+ ld a, $1
+ and a
+ ret
+
+.start_button
+ ld a, $2
+ and a
+ ret
+
+.d_up
+ call .MoveCursorUp
+ call nc, .PlayPocketSwitchSFX
+ ld a, $0
+ ret
+
+.d_down
+ call .MoveCursorDown
+ call nc, .PlayPocketSwitchSFX
+ ld a, $0
+ ret
+; 89a8a
+
+.PlayPocketSwitchSFX: ; 89a8a
+ push af
+ ld de, SFX_SWITCH_POCKETS
+ call PlaySFX
+ pop af
+ ret
+; 89a93
+
+.MoveCursorDown: ; 89a93
+ ld d, 40
+ ld e, 1
+ call .ApplyCursorMovement
+ ret
+; 89a9b
+
+.MoveCursorUp: ; 89a9b
+ ld d, 1
+ ld e, -1
+ call .ApplyCursorMovement
+ ret
+; 89aa3
+
+.ApplyCursorMovement: ; 89aa3
+ ld a, [MenuSelection]
+ ld c, a
+ push bc
+.loop
+ ld a, [MenuSelection]
+ cp d
+ jr z, .equal_to_d
+ add e
+ jr nz, .not_zero
+ inc a
+
+.not_zero
+ ld [MenuSelection], a
+ call .Function89ac7 ; BCD conversion of data in SRAM?
+ jr nc, .loop
+ call .Function89ae6 ; split [MenuSelection] into [wd030] + [wd031] where [wd030] <= 5
+ pop bc
+ and a
+ ret
+
+.equal_to_d
+ pop bc
+ ld a, c
+ ld [MenuSelection], a
+ scf
+ ret
+; 89ac7
+
+.Function89ac7: ; 89ac7
+ call OpenSRAMBank4
+ call Function8931b
+ call .Function89ad4
+ call CloseSRAM
+ ret
+; 89ad4
+
+.Function89ad4: ; 89ad4
+ push de
+ call Function8932d ; find a non-space character within 5 bytes of bc
+ jr c, .no_nonspace_character
+ ld hl, 17
+ add hl, bc
+ call Function89b45
+ jr c, .finish_decode
+
+.no_nonspace_character
+ and a
+
+.finish_decode
+ pop de
+ ret
+; 89ae6
+
+.Function89ae6: ; 89ae6
+ ld hl, wd031
+ xor a
+ ld [hl], a
+ ld a, [MenuSelection]
+.loop2
+ cp 6
+ jr c, .load_and_ret
+ sub 5
+ ld c, a
+ ld a, [hl]
+ add 5
+ ld [hl], a
+ ld a, c
+ jr .loop2
+
+.load_and_ret
+ ld [wd030], a
+ ret
+; 89b00
+
+
+Function89b00: ; 89b00 (22:5b00)
+ farcall MG_Mobile_Layout_LoadPals
+ ret
+; 89b07 (22:5b07)
+
+Function89b07: ; 89b07
+ call Mobile22_SetBGMapMode0
+ call DelayFrame
+ farcall Function4a3a7
+ ret
+; 89b14
+
+Function89b14: ; 89b14
+ call ClearBGPalettes
+ call Function89b07
+ call Function89b00
+ ret
+; 89b1e
+
+Function89b1e: ; 89b1e (22:5b1e)
+ farcall Function4a485
+ call Function89b00
+ ret
+
+Function89b28: ; 89b28 (22:5b28)
+ call Function891de
+ call ClearBGPalettes
+ call Function893e2
+ call Call_ExitMenu
+ call Function891ab
+ call SetPalettes
+ ret
+
+Function89b3b: ; 89b3b (22:5b3b)
+ call Mobile22_SetBGMapMode0
+ farcall Function48cda
+ ret
+
+Function89b45: ; 89b45
+ ; some sort of decoder?
+ ; BCD?
+ push hl
+ push bc
+ ld c, $10
+ ld e, $0
+.loop
+ ld a, [hli]
+ ld b, a
+ and $f
+ cp 10
+ jr c, .low_nybble_less_than_10
+ ld a, c
+ cp $b
+ jr nc, .clear_carry
+ jr .set_carry
+
+.low_nybble_less_than_10
+ dec c
+ swap b
+ inc e
+ ld a, b
+ and $f
+ cp 10
+ jr c, .high_nybble_less_than_10
+ ld a, c
+ cp $b
+ jr nc, .clear_carry
+ jr .set_carry
+
+.high_nybble_less_than_10
+ inc e
+ dec c
+ jr nz, .loop
+ dec e
+
+.set_carry
+ scf
+ jr .finish
+
+.clear_carry
+ and a
+
+.finish
+ pop bc
+ pop hl
+ ret
+; 89b78
+
+
+Function89b78: ; 89b78 (22:5b78)
+ push bc
+ ld a, [wd010]
+ cp $10
+ jr c, .asm_89b8c
+ ld a, e
+ and a
+ jr z, .asm_89b89
+ ld c, e
+.asm_89b85
+ inc hl
+ dec c
+ jr nz, .asm_89b85
+.asm_89b89
+ ld a, $7f
+ ld [hl], a
+.asm_89b8c
+ ld a, [wd010]
+ inc a
+ and $1f
+ ld [wd010], a
+ pop bc
+ ret
+
+Function89b97: ; 89b97 (22:5b97)
+ call Function89c34
+ jr c, .asm_89ba0
+ call Function89448
+ ret
+.asm_89ba0
+ ld a, [wd011]
+ ld hl, Unknown_89bd8
+ and a
+ jr z, .asm_89bae
+.asm_89ba9
+ inc hl
+ inc hl
+ dec a
+ jr nz, .asm_89ba9
+.asm_89bae
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, Sprites
+.asm_89bb4
+ ld a, [hli]
+ cp $ff
+ ret z
+ ld c, a
+ ld b, $0
+.asm_89bbb
+ push hl
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ add b
+ ld [de], a
+ inc de
+ ld a, $8
+ add b
+ ld b, a
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ pop hl
+ dec c
+ jr nz, .asm_89bbb
+ ld b, $0
+ ld c, $4
+ add hl, bc
+ jr .asm_89bb4
+; 89bd8 (22:5bd8)
+
+Unknown_89bd8: ; 89bd8
+ dw Unknown_89be0
+ dw Unknown_89bf5
+ dw Unknown_89c0a
+ dw Unknown_89c1f
+; 89be0
+
+Unknown_89be0: ; 89be0
+ db $01, $12, $4e, $01, $00
+ db $01, $19, $4e, $01, $40
+ db $01, $12, $72, $01, $20
+ db $01, $19, $72, $01, $60
+ db $ff
+
+Unknown_89bf5: ; 89bf5
+ db $01, $60, $16, $01, $00
+ db $01, $62, $16, $01, $40
+ db $01, $60, $92, $01, $20
+ db $01, $62, $92, $01, $60
+ db $ff
+
+Unknown_89c0a: ; 89c0a
+ db $01, $78, $66, $01, $00
+ db $01, $78, $66, $01, $40
+ db $01, $78, $92, $01, $20
+ db $01, $78, $92, $01, $60
+ db $ff
+
+Unknown_89c1f: ; 89c1f
+ db $01, $80, $66, $01, $00
+ db $01, $80, $66, $01, $40
+ db $01, $80, $92, $01, $20
+ db $01, $80, $92, $01, $60
+ db $ff
+; 89c34
+
+Function89c34: ; 89c34 (22:5c34)
+ push bc
+ ld a, [wd012]
+ ld c, a
+ inc a
+ and $f
+ ld [wd012], a
+ ld a, c
+ cp $8
+ pop bc
+ ret
+
+Function89c44: ; 89c44 (22:5c44)
+ call Function89c34
+ jr c, .asm_89c4f
+ push de
+ call Function89448
+ pop de
+ ret
+.asm_89c4f
+ ld hl, Sprites
+ push de
+ ld a, b
+ ld [hli], a
+ ld d, $8
+ ld a, e
+ and a
+ ld a, c
+ jr z, .asm_89c60
+.asm_89c5c
+ add d
+ dec e
+ jr nz, .asm_89c5c
+.asm_89c60
+ pop de
+ ld [hli], a
+ ld a, d
+ ld [hli], a
+ xor a
+ ld [hli], a
+ ret
+
+Function89c67: ; 89c67 (22:5c67)
+; menu scrolling?
+ call JoyTextDelay_ForcehJoyDown ; joypad
+ ld b, $0
+ bit A_BUTTON_F, c
+ jr z, .not_a_button
+ ld b, $1
+ and a
+ ret
+
+.not_a_button
+ bit B_BUTTON_F, c
+ jr z, .not_b_button
+ scf
+ ret
+
+.not_b_button
+ xor a
+ bit D_UP_F, c
+ jr z, .not_d_up
+ ld a, $1
+.not_d_up
+ bit D_DOWN_F, c
+ jr z, .not_d_down
+ ld a, $2
+.not_d_down
+ bit D_LEFT_F, c
+ jr z, .not_d_left
+ ld a, $3
+.not_d_left
+ bit D_RIGHT_F, c
+ jr z, .not_d_right
+ ld a, $4
+.not_d_right
+ and a
+ ret z ; no dpad pressed
+ dec a
+ ld c, a
+ ld d, $0
+ ld hl, .ScrollData0
+ ld a, [wd02f]
+ and a
+ jr z, .got_data
+ ld hl, .ScrollData1
+.got_data
+ ld a, [wd011]
+ and a
+ jr z, .got_row
+ ld e, $4
+.add_n_times
+ add hl, de
+ dec a
+ jr nz, .add_n_times
+.got_row
+ ld e, c
+ add hl, de
+ ld a, [hl]
+ and a
+ ret z
+ dec a
+ ld [wd011], a
+ xor a
+ ld [wd012], a
+ ret
+; 89cbf (22:5cbf)
+
+.ScrollData0: ; 89cbf
+ db 0, 2, 0, 0
+ db 1, 3, 0, 0
+ db 2, 4, 0, 0
+ db 3, 0, 0, 0
+
+.ScrollData1: ; 89ccf
+ db 0, 0, 0, 0
+ db 0, 3, 0, 0
+ db 2, 4, 0, 0
+ db 3, 0, 0, 0
+; 89cdf
+
+Function89cdf: ; 89cdf (22:5cdf)
+ ld a, $10
+ add b
+ ld b, a
+ ld a, $8
+ add c
+ ld c, a
+ ld e, $2
+ ld a, $2
+ ld hl, Sprites
+.asm_89cee
+ push af
+ push bc
+ ld d, $4
+.asm_89cf2
+ ld a, b
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ ld a, e
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ ld a, $8
+ add c
+ ld c, a
+ inc e
+ dec d
+ jr nz, .asm_89cf2
+ pop bc
+ ld a, $8
+ add b
+ ld b, a
+ pop af
+ dec a
+ jr nz, .asm_89cee
+ ret
+
+Function89d0d: ; 89d0d (22:5d0d)
+ call Mobile22_SetBGMapMode0
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+
+ ld c, 8
+ ld de, UnknBGPals
+.loop
+ push bc
+ ld hl, .Palette1
+ ld bc, 1 palettes
+ call CopyBytes
+ pop bc
+ dec c
+ jr nz, .loop
+
+ ld hl, .Palette2
+ ld de, UnknBGPals + 2 palettes
+ ld bc, 1 palettes
+ call CopyBytes
+
+ pop af
+ ld [rSVBK], a
+
+ call SetPalettes
+ farcall PrintMail_
+ call Mobile22_SetBGMapMode1
+ ld c, 24
+ call DelayFrames
+ call RestartMapMusic
+ ret
+; 89d4e (22:5d4e)
+
+.Palette1: ; 89d4e
+ RGB 31, 31, 31
+ RGB 19, 19, 19
+ RGB 15, 15, 15
+ RGB 00, 00, 00
+; 89d56
+
+.Palette2: ; 89d56
+ RGB 31, 31, 31
+ RGB 19, 19, 19
+ RGB 19, 19, 19
+ RGB 00, 00, 00
+; 89d5e
+
+Function89d5e: ; 89d5e (22:5d5e)
+ push af
+ call CopyMenuDataHeader
+ pop af
+ ld [wMenuCursorBuffer], a
+ call Mobile22_SetBGMapMode0
+ call PlaceVerticalMenuItems
+ call InitVerticalMenuCursor
+ ld hl, w2DMenuFlags1
+ set 7, [hl]
+ ret
+
+Function89d75: ; 89d75 (22:5d75)
+ push hl
+ call Mobile22_SetBGMapMode0
+ call _hl_
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ pop hl
+ jr asm_89d90
+
+Function89d85: ; 89d85 (22:5d85)
+ push hl
+ call Mobile22_SetBGMapMode0
+ call _hl_
+ call CGBOnly_CopyTilemapAtOnce
+ pop hl
+
+asm_89d90: ; 89d90 (22:5d90)
+ call Mobile22_SetBGMapMode0
+ push hl
+ call _hl_
+ call Function89dab
+ ld a, [wMenuCursorY]
+ push af
+ call Function891ab
+ pop af
+ pop hl
+ jr c, .asm_89da9
+ jr z, asm_89d90
+ scf
+ ret
+.asm_89da9
+ and a
+ ret
+
+Function89dab: ; 89dab (22:5dab)
+ call Mobile22_SetBGMapMode0
+ farcall MobileMenuJoypad
+ call Mobile22_SetBGMapMode0
+ ld a, c
+ ld hl, wMenuJoypadFilter
+ and [hl]
+ ret z
+ bit 0, a
+ jr nz, .asm_89dc7
+ bit 1, a
+ jr nz, .asm_89dd9
+ xor a
+ ret
+.asm_89dc7
+ call PlayClickSFX
+ ld a, [w2DMenuNumRows]
+ ld c, a
+ ld a, [wMenuCursorY]
+ cp c
+ jr z, .asm_89dd9
+ call PlaceHollowCursor
+ scf
+ ret
+.asm_89dd9
+ call PlayClickSFX
+ ld a, $1
+ and a
+ ret
+
+Function89de0: ; 89de0 (22:5de0)
+ call ClearSprites
+ call Function89e0a
+ jr c, .asm_89e00
+ ld c, $1
+.asm_89dea
+ call Function8a31c
+ jr z, .asm_89dfd
+ ld a, [wMenuCursorY]
+ ld c, a
+ push bc
+ ld hl, Jumptable_89e04
+ ld a, e
+ dec a
+ rst JumpTable
+ pop bc
+ jr .asm_89dea
+.asm_89dfd
+ call Function891fe
+.asm_89e00
+ call Function8917a
+ ret
+
+Jumptable_89e04: ; 89e04 (22:5e04)
+ dw Function8a62c
+ dw Function8a999
+ dw Function8ab93
+
+
+Function89e0a: ; 89e0a (22:5e0a)
+ call OpenSRAMBank4
+ call Function8b3b0
+ call CloseSRAM
+ ld hl, Jumptable_89e18
+ rst JumpTable
+ ret
+
+Jumptable_89e18: ; 89e18 (22:5e18)
+ dw Function89e1e
+ dw Function8a116
+ dw Function8a2aa
+
+
+Function89e1e: ; 89e1e (22:5e1e)
+ call OpenSRAMBank4
+ ld bc, $a037 ; 4:a037
+ call Function8b36c
+ call CloseSRAM
+ xor a
+ ld [wd02d], a
+
+asm_89e2e: ; 89e2e (22:5e2e)
+ ld a, [wd02d]
+ ld hl, Jumptable_89e3c
+ rst JumpTable
+ ret
+
+Function89e36: ; 89e36 (22:5e36)
+ ld hl, wd02d
+ inc [hl]
+ jr asm_89e2e
+
+Jumptable_89e3c: ; 89e3c (22:5e3c)
+ dw Function89e6f
+ dw Function89fed
+ dw Function89ff6
+ dw Function8a03d
+ dw Function89eb9
+ dw Function89efd
+ dw Function89fce
+ dw Function8a04c
+ dw Function8a055
+ dw Function8a0e6
+ dw Function8a0ec
+ dw Function8a0f5
+ dw Function89e58
+ dw Function89e68
+
+
+Function89e58: ; 89e58 (22:5e58)
+ ld a, $1
+ call Function8a2fe
+ call Function891fe
+ call Function893e2
+ call Function89168
+ and a
+ ret
+
+Function89e68: ; 89e68 (22:5e68)
+ call Function891fe
+ ld a, $1
+ scf
+ ret
+
+Function89e6f: ; 89e6f (22:5e6f)
+ call Function891de
+ call Function89245
+ call Function89ee1
+ call Function89e9a
+ hlcoord 7, 4
+ call Function8a58d
+ ld a, $5
+ hlcoord 7, 4, AttrMap
+ call Function8a5a3
+ ld a, $6
+ hlcoord 10, 4, AttrMap
+ call Function8a5a3
+ call Function891ab
+ call SetPalettes
+ jp Function89e36
+
+Function89e9a: ; 89e9a (22:5e9a)
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, Palette_89eb1
+ ld de, UnknBGPals palette 5
+ ld bc, 1 palettes
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ ret
+; 89eb1 (22:5eb1)
+
+Palette_89eb1: ; 89eb1
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 27, 19, 00
+ RGB 00, 00, 00
+; 89eb9
+
+Function89eb9: ; 89eb9 (22:5eb9)
+ call Function891fe
+ call Function89ee1
+ call Function89e9a
+ hlcoord 7, 4
+ call Function8a58d
+ ld a, $5
+ hlcoord 7, 4, AttrMap
+ call Function8a5a3
+ ld a, $6
+ hlcoord 10, 4, AttrMap
+ call Function8a5a3
+ call Function891ab
+ call SetPalettes
+ jp Function89e36
+
+Function89ee1: ; 89ee1 (22:5ee1)
+ call ClearBGPalettes
+ call Function893e2
+ call Mobile22_SetBGMapMode0
+ farcall Function4a3a7
+ farcall MG_Mobile_Layout_CreatePalBoxes
+ hlcoord 1, 0
+ call Function8a53d
+ ret
+
+Function89efd: ; 89efd (22:5efd)
+ ld hl, wd012
+ ld a, $ff
+ ld [hli], a
+ xor a
+rept 4
+ ld [hli], a
+endr
+ ld [hl], a
+.asm_89f09
+ ld hl, wd012
+ inc [hl]
+ ld a, [hli]
+ and $3
+ jr nz, .asm_89f2e
+ ld a, [hl]
+ cp $4
+ jr nc, .asm_89f2e
+ ld b, $32
+ inc [hl]
+ ld a, [hl]
+ dec a
+ jr z, .asm_89f26
+ ld c, a
+.asm_89f1f
+ ld a, $b
+ add b
+ ld b, a
+ dec c
+ jr nz, .asm_89f1f
+.asm_89f26
+ ld c, $e8
+ ld a, [wd013]
+ call Function89fa5
+.asm_89f2e
+ ld a, [wd013]
+ and a
+ jr z, .asm_89f58
+.asm_89f34
+ call Function89f6a
+ ld e, a
+ ld a, c
+ cp $a8
+ jr nc, .asm_89f4d
+ cp $46
+ jr c, .asm_89f4d
+ ld d, $0
+ dec e
+ ld hl, wd014
+ add hl, de
+ set 0, [hl]
+ inc e
+ jr .asm_89f51
+.asm_89f4d
+ ld a, $2
+ add c
+ ld c, a
+.asm_89f51
+ ld a, e
+ call Function89f77
+ dec a
+ jr nz, .asm_89f34
+.asm_89f58
+ call DelayFrame
+ ld hl, wd014
+ ld c, $4
+.asm_89f60
+ ld a, [hli]
+ and a
+ jr z, .asm_89f09
+ dec c
+ jr nz, .asm_89f60
+ jp Function89e36
+
+Function89f6a: ; 89f6a (22:5f6a)
+ push af
+ ld de, $10
+ call Function89f9a
+ ld a, [hli]
+ ld b, a
+ ld a, [hl]
+ ld c, a
+ pop af
+ ret
+
+Function89f77: ; 89f77 (22:5f77)
+ push af
+ ld de, $10
+ call Function89f9a
+ ld d, $2
+.asm_89f80
+ push bc
+ ld e, $2
+.asm_89f83
+ ld a, b
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ inc hl
+ inc hl
+ ld a, $8
+ add c
+ ld c, a
+ dec e
+ jr nz, .asm_89f83
+ pop bc
+ ld a, $8
+ add b
+ ld b, a
+ dec d
+ jr nz, .asm_89f80
+ pop af
+ ret
+
+Function89f9a: ; 89f9a (22:5f9a)
+ dec a
+ ld hl, Sprites
+ and a
+ ret z
+.asm_89fa0
+ add hl, de
+ dec a
+ jr nz, .asm_89fa0
+ ret
+
+Function89fa5: ; 89fa5 (22:5fa5)
+ ld de, $10
+ call Function89f9a
+ ld e, $2
+ ld d, $a
+.asm_89faf
+ push bc
+ ld a, $2
+.asm_89fb2
+ push af
+ ld a, b
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ ld a, d
+ inc d
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ ld a, $8
+ add c
+ ld c, a
+ pop af
+ dec a
+ jr nz, .asm_89fb2
+ pop bc
+ ld a, $8
+ add b
+ ld b, a
+ dec e
+ jr nz, .asm_89faf
+ ret
+
+Function89fce: ; 89fce (22:5fce)
+ call Function8a5b6
+ ld a, $5
+ hlcoord 7, 4, AttrMap
+ call Function8a5a3
+ ld a, $6
+ hlcoord 10, 4, AttrMap
+ call Function8a5a3
+ call Function89448
+ call SetPalettes
+ call Function891ab
+ jp Function89e36
+
+Function89fed: ; 89fed (22:5fed)
+ ld hl, UnknownText_0x8a102
+ call PrintText
+ jp Function89e36
+
+Function89ff6: ; 89ff6 (22:5ff6)
+ call Function891fe
+ call ClearBGPalettes
+ call Function893cc
+ call Function89807
+ call Function89492
+ call Function894ca
+ call OpenSRAMBank4
+ ld hl, $a603
+ ld a, -1
+ ld bc, 8
+ call ByteFill
+ ld hl, $a603
+ ld de, wd008
+ call Function89381
+ call CloseSRAM
+ call Function8987f
+ call OpenSRAMBank4
+ hlcoord 1, 13
+ ld bc, $a007
+ call Function89a0c
+ call CloseSRAM
+ call Function891ab
+ call Mobile22_ButtonSound
+ jp Function89e36
+
+Function8a03d: ; 8a03d (22:603d)
+ ld hl, UnknownText_0x8a107
+ call Function89209
+ call PrintText
+ call Function8920f
+ jp Function89e36
+
+Function8a04c: ; 8a04c (22:604c)
+ ld hl, UnknownText_0x8a10c
+ call PrintText
+ jp Function89e36
+
+Function8a055: ; 8a055 (22:6055)
+ ld c, $7
+ ld b, $4
+.asm_8a059
+ call Function8a0a1
+ inc c
+ call Function8a0c9
+ push bc
+ call Function8a58d
+ pop bc
+ call Function8a0de
+ push bc
+ push hl
+ ld a, $5
+ call Function8a5a3
+ pop hl
+ inc hl
+ inc hl
+ inc hl
+ ld a, $6
+ call Function8a5a3
+ call CGBOnly_CopyTilemapAtOnce
+ pop bc
+ ld a, c
+ cp $b
+ jr nz, .asm_8a059
+ call Function8a0a1
+ hlcoord 12, 4
+ call Function8a58d
+ ld a, $5
+ hlcoord 12, 4, AttrMap
+ call Function8a5a3
+ pop hl
+ ld a, $6
+ hlcoord 15, 4, AttrMap
+ call Function8a5a3
+ call CGBOnly_CopyTilemapAtOnce
+ jp Function89e36
+
+Function8a0a1: ; 8a0a1 (22:60a1)
+ call Mobile22_SetBGMapMode0
+ push bc
+ call Function8a0c9
+ ld e, $6
+.asm_8a0aa
+ push hl
+ ld bc, $6
+ add hl, bc
+ ld d, [hl]
+ call Function8a0c1
+ pop hl
+ ld [hl], d
+ call Function89215
+ ld bc, $14
+ add hl, bc
+ dec e
+ jr nz, .asm_8a0aa
+ pop bc
+ ret
+
+Function8a0c1: ; 8a0c1 (22:60c1)
+ push hl
+ ld bc, AttrMap - TileMap
+ add hl, bc
+ ld a, [hl]
+ pop hl
+ ret
+
+Function8a0c9: ; 8a0c9 (22:60c9)
+ push bc
+ hlcoord 0, 0
+ ld de, $14
+ ld a, b
+ and a
+ jr z, .asm_8a0d8
+.asm_8a0d4
+ add hl, de
+ dec b
+ jr nz, .asm_8a0d4
+.asm_8a0d8
+ ld d, $0
+ ld e, c
+ add hl, de
+ pop bc
+ ret
+
+Function8a0de: ; 8a0de (22:60de)
+ call Function8a0c9
+ ld de, AttrMap - TileMap
+ add hl, de
+ ret
+
+Function8a0e6: ; 8a0e6 (22:60e6)
+ call Function8b539
+ jp Function89e36
+
+Function8a0ec: ; 8a0ec (22:60ec)
+ ld hl, UnknownText_0x8a111
+ call PrintText
+ jp Function89e36
+
+Function8a0f5: ; 8a0f5 (22:60f5)
+ call Function8b555
+ jp nc, Function8a0ff
+ ld hl, wd02d
+ inc [hl]
+
+Function8a0ff: ; 8a0ff (22:60ff)
+ jp Function89e36
+; 8a102 (22:6102)
+
+UnknownText_0x8a102: ; 0x8a102
+ ; The CARD FOLDER stores your and your friends' CARDS. A CARD contains information like the person's name, phone number and profile.
+ text_jump UnknownText_0x1c5238
+ db "@"
+; 0x8a107
+
+UnknownText_0x8a107: ; 0x8a107
+ ; This is your CARD. Once you've entered your phone number, you can trade CARDS with your friends.
+ text_jump UnknownText_0x1c52bc
+ db "@"
+; 0x8a10c
+
+UnknownText_0x8a10c: ; 0x8a10c
+ ; If you have your friend's CARD, you can use it to make a call from a mobile phone on the 2nd floor of a #MON CENTER.
+ text_jump UnknownText_0x1c531e
+ db "@"
+; 0x8a111
+
+UnknownText_0x8a111: ; 0x8a111
+ ; To safely store your collection of CARDS, you must set a PASSCODE for your CARD FOLDER.
+ text_jump UnknownText_0x1c5394
+ db "@"
+; 0x8a116
+
+Function8a116: ; 8a116 (22:6116)
+ ld a, $1
+ ld [wd030], a
+ ld hl, MenuDataHeader_0x8a176
+ call LoadMenuDataHeader
+.asm_8a121
+ call Mobile22_SetBGMapMode0
+ call Function8a17b
+ jr c, .asm_8a16b
+ ld a, [wMenuCursorY]
+ ld [wd030], a
+ dec d
+ jr z, .asm_8a140
+ call Function8a20d
+ jr c, .asm_8a121
+ xor a
+ call Function8a2fe
+ call Function8916e
+ jr .asm_8a16b
+.asm_8a140
+ call Function89174
+ jr nz, .asm_8a14c
+ call Function8a241
+ jr c, .asm_8a121
+ jr .asm_8a15a
+.asm_8a14c
+ call WaitSFX
+ ld de, SFX_TWINKLE
+ call PlaySFX
+ ld c, $10
+ call DelayFrames
+.asm_8a15a
+ call ExitMenu
+ call Function891de
+ call Function893e2
+ call Function89245
+ call Function89168
+ and a
+ ret
+.asm_8a16b
+ call Function89209
+ call CloseWindow
+ call Function8920f
+ scf
+ ret
+; 8a176 (22:6176)
+
+MenuDataHeader_0x8a176: ; 0x8a176
+ db $40 ; flags
+ db 00, 14 ; start coords
+ db 06, 19 ; end coords
+; 8a17b
+
+Function8a17b: ; 8a17b (22:617b)
+ decoord 14, 0
+ ld b, $5
+ ld c, $4
+ call Function89b3b
+ ld hl, MenuDataHeader_0x8a19a
+ ld a, [wd030]
+ call Function89d5e
+ ld hl, Function8a1b0
+ call Function89d75
+ jr nc, .asm_8a198
+ ld a, $0
+.asm_8a198
+ ld d, a
+ ret
+; 8a19a (22:619a)
+
+MenuDataHeader_0x8a19a: ; 0x8a19a
+ db $40 ; flags
+ db 00, 14 ; start coords
+ db 06, 19 ; end coords
+ dw MenuData2_0x8a1a2
+ db 1 ; default option
+; 0x8a1a2
+
+MenuData2_0x8a1a2: ; 0x8a1a2
+ db $e0 ; flags
+ db 3 ; items
+ db "ひらく@"
+ db "すてる@"
+ db "もどる@"
+; 0x8a1b0
+
+Function8a1b0: ; 8a1b0
+ hlcoord 0, 12
+ ld b, $4
+ ld c, $12
+ call TextBox
+ hlcoord 1, 14
+ ld a, [wMenuCursorY]
+ ld de, Strings_8a1cc
+ dec a
+ ld c, a
+ call Function8919e
+ call PlaceString
+ ret
+; 8a1cc
+
+Strings_8a1cc: ; 8a1cc
+ db "めいし", $25, "せいりと へんしゅうを"
+ next "おこないます"
+ db "@"
+
+ db "めいしフ,ルダー", $25, "めいしと"
+ next "あんしょうばんごう", $1f, "けします"
+ db "@"
+
+ db "まえ", $25, "がめん", $1d, "もどります"
+ db "@"
+; 8a20d
+
+
+Function8a20d: ; 8a20d (22:620d)
+ ld hl, UnknownText_0x8a232
+ call PrintText
+ ld a, $2
+ call Function89259
+ ret c
+ ld hl, UnknownText_0x8a237
+ call PrintText
+ ld a, $2
+ call Function89259
+ ret c
+ xor a
+ call Function8a2fe
+ ld hl, UnknownText_0x8a23c
+ call PrintText
+ xor a
+ and a
+ ret
+; 8a232 (22:6232)
+
+UnknownText_0x8a232: ; 0x8a232
+ ; If the CARD FOLDER is deleted, all its CARDS and the PASSCODE will also be deleted. Beware--a deleted CARD FOLDER can't be restored. Want to delete your CARD FOLDER?
+ text_jump UnknownText_0x1c53ee
+ db "@"
+; 0x8a237
+
+UnknownText_0x8a237: ; 0x8a237
+ ; Are you sure you want to delete it?
+ text_jump UnknownText_0x1c5494
+ db "@"
+; 0x8a23c
+
+UnknownText_0x8a23c: ; 0x8a23c
+ ; The CARD FOLDER has been deleted.
+ text_jump UnknownText_0x1c54b9
+ db "@"
+; 0x8a241
+
+Function8a241: ; 8a241 (22:6241)
+ call LoadStandardMenuDataHeader
+ call Function891fe
+ call Function8a262
+ jr nc, .asm_8a254
+ call Function891fe
+ call Function89b28
+ scf
+ ret
+.asm_8a254
+ call Function891de
+ call ClearBGPalettes
+ call Call_ExitMenu
+ call Function891de
+ and a
+ ret
+
+Function8a262: ; 8a262 (22:6262)
+ call ClearBGPalettes
+ call Function893e2
+ call Mobile22_SetBGMapMode0
+ farcall Function4a3a7
+ farcall MG_Mobile_Layout_CreatePalBoxes
+ hlcoord 1, 0
+ call Function8a53d
+ hlcoord 12, 4
+ call Function8a58d
+ ld a, $5
+ hlcoord 12, 4, AttrMap
+ call Function8a5a3
+ ld a, $6
+ hlcoord 15, 4, AttrMap
+ call Function8a5a3
+ xor a
+ ld [wd02e], a
+ ld bc, wd013
+ call Function8b36c
+ call Function8b493
+ call Function891ab
+ call SetPalettes
+ call Function8b5e7
+ ret
+
+Function8a2aa: ; 8a2aa (22:62aa)
+ ld hl, MenuDataHeader_0x8a2ef
+ call LoadMenuDataHeader
+ ld hl, UnknownText_0x8a2f4
+ call PrintText
+ ld a, $1
+ call Function89259
+ jr nc, .asm_8a2cf
+ ld hl, UnknownText_0x8a2f9
+ call PrintText
+ ld a, $2
+ call Function89259
+ jr c, .asm_8a2ea
+ call Function8a20d
+ jr .asm_8a2ea
+.asm_8a2cf
+ call ExitMenu
+ call Function8a241
+ jr c, .asm_8a2ed
+ ld a, $1
+ call Function8a313
+ call CloseSRAM
+ call Function891de
+ call Function89245
+ call Function89168
+ and a
+ ret
+.asm_8a2ea
+ call CloseWindow
+.asm_8a2ed
+ scf
+ ret
+; 8a2ef (22:62ef)
+
+MenuDataHeader_0x8a2ef: ; 0x8a2ef
+ db $40 ; flags
+ db 12, 00 ; start coords
+ db 17, 19 ; end coords
+; 8a2f4
+
+UnknownText_0x8a2f4: ; 0x8a2f4
+ ; There is an older CARD FOLDER from a previous journey. Do you want to open it?
+ text_jump UnknownText_0x1c54dd
+ db "@"
+; 0x8a2f9
+
+UnknownText_0x8a2f9: ; 0x8a2f9
+ ; Delete the old CARD FOLDER?
+ text_jump UnknownText_0x1c552d
+ db "@"
+; 0x8a2fe
+
+Function8a2fe: ; 8a2fe (22:62fe)
+ call Function8a313
+ call Function89305
+ ld hl, $a603
+ ld bc, $8
+ ld a, -1
+ call ByteFill
+ call CloseSRAM
+ ret
+
+Function8a313: ; 8a313 (22:6313)
+ ld c, a
+ call OpenSRAMBank4
+ ld a, c
+ ld [$a60b], a
+ ret
+
+Function8a31c: ; 8a31c (22:631c)
+ push bc
+ call Mobile22_SetBGMapMode0
+ farcall Function4a3a7
+ farcall MG_Mobile_Layout_CreatePalBoxes
+ hlcoord 1, 0
+ call Function8a53d
+ hlcoord 12, 4
+ call Function8a58d
+ call Function8a3b2
+ pop bc
+ ld a, c
+ ld [wMenuCursorBuffer], a
+ ld [MenuSelection], a
+ call PlaceVerticalMenuItems
+ call InitVerticalMenuCursor
+ ld hl, w2DMenuFlags1
+ set 7, [hl]
+.asm_8a34e
+ call Function8a3a2
+ call Mobile22_SetBGMapMode0
+ call Function8a453
+ call Function8a4d3
+ call Function8a4fc
+ call Function891ab
+ call SetPalettes
+ call Function8a383
+ jr c, .asm_8a370
+ jr z, .asm_8a34e
+.asm_8a36a
+ call Function89448
+ xor a
+ ld e, a
+ ret
+.asm_8a370
+ call Function89448
+ call PlaceHollowCursor
+ call Function8a3a2
+ ld a, [MenuSelection]
+ cp $ff
+ jr z, .asm_8a36a
+ ld e, a
+ and a
+ ret
+
+Function8a383: ; 8a383 (22:6383)
+ farcall MobileMenuJoypad
+ ld a, c
+ ld hl, wMenuJoypadFilter
+ and [hl]
+ ret z
+ bit 0, a
+ jr nz, .asm_8a399
+ bit 1, a
+ jr nz, .asm_8a39e
+ xor a
+ ret
+.asm_8a399
+ call PlayClickSFX
+ scf
+ ret
+.asm_8a39e
+ call PlayClickSFX
+ ret
+
+Function8a3a2: ; 8a3a2 (22:63a2)
+ ld a, [wMenuCursorY]
+ dec a
+ ld hl, wd002
+ ld e, a
+ ld d, $0
+ add hl, de
+ ld a, [hl]
+ ld [MenuSelection], a
+ ret
+
+Function8a3b2: ; 8a3b2 (22:63b2)
+ ld a, $1
+ ld [MenuSelection], a
+ call Function8a4fc
+ call Function8a3df
+ jr nc, .asm_8a3ce
+ decoord 0, 2
+ ld b, $6
+ ld c, $9
+ call Function89b3b
+ ld hl, MenuDataHeader_0x8a435
+ jr .asm_8a3db
+.asm_8a3ce
+ decoord 0, 2
+ ld b, $8
+ ld c, $9
+ call Function89b3b
+ ld hl, MenuDataHeader_0x8a40f
+.asm_8a3db
+ call CopyMenuDataHeader
+ ret
+
+Function8a3df: ; 8a3df (22:63df)
+ call OpenSRAMBank4
+ ld hl, $a603
+ call Function89b45
+ call CloseSRAM
+ ld hl, wd002
+ jr c, .asm_8a3f8
+ ld de, Unknown_8a408
+ call Function8a400
+ scf
+ ret
+.asm_8a3f8
+ ld de, Unknown_8a40b
+ call Function8a400
+ and a
+ ret
+
+Function8a400: ; 8a400 (22:6400)
+ ld a, [de]
+ inc de
+ ld [hli], a
+ cp $ff
+ jr nz, Function8a400
+ ret
+; 8a408 (22:6408)
+
+Unknown_8a408: db 1, 2, -1
+Unknown_8a40b: db 1, 2, 3, -1
+
+MenuDataHeader_0x8a40f: ; 0x8a40f
+ db $40 ; flags
+ db 02, 00 ; start coords
+ db 11, 10 ; end coords
+ dw MenuData2_0x8a417
+ db 1 ; default option
+; 0x8a417
+
+MenuData2_0x8a417: ; 0x8a417
+ db $a0 ; flags
+ db 4 ; items
+ db "めいしりスト@"
+ db "じぶんの めいし@"
+ db "めいしこうかん@"
+ db "やめる@"
+; 0x8a435
+
+MenuDataHeader_0x8a435: ; 0x8a435
+ db $40 ; flags
+ db 02, 00 ; start coords
+ db 09, 10 ; end coords
+ dw MenuData2_0x8a43d
+ db 1 ; default option
+; 0x8a43d
+
+MenuData2_0x8a43d: ; 0x8a43d
+ db $a0 ; flags
+ db 3 ; items
+ db "めいしりスト@"
+ db "じぶんの めいし@"
+ db "やめる@"
+; 0x8a453
+
+Function8a453: ; 8a453 (22:6453)
+ hlcoord 0, 12
+ ld b, $4
+ ld c, $12
+ call TextBox
+ hlcoord 1, 14
+ ld de, String_8a476
+ ld a, [MenuSelection]
+ cp $ff
+ jr z, .asm_8a472
+ ld de, Strings_8a483
+ dec a
+ ld c, a
+ call Function8919e
+.asm_8a472
+ call PlaceString
+ ret
+; 8a476 (22:6476)
+
+String_8a476: ; 8a476
+ db "まえ", $25, "がめん", $1d, "もどります@"
+; 8a483
+
+Strings_8a483: ; 8a483
+ db "おともだち", $25, "めいしは"
+ next "ここ", $1d, "いれておきます@"
+
+ db "でんわばんごう", $1f, "いれると"
+ next "めいしこうかん", $4a, "できます@"
+
+ db "ともだちと じぶん", $25, "めいしを"
+ next "せきがいせんで こうかん します@"
+; 8a4d3
+
+Function8a4d3: ; 8a4d3 (22:64d3)
+ ld a, [MenuSelection]
+ cp $1
+ jr nz, .asm_8a4eb
+ ld a, $5
+ hlcoord 12, 4, AttrMap
+ call Function8a5a3
+ ld a, $7
+ hlcoord 15, 4, AttrMap
+ call Function8a5a3
+ ret
+.asm_8a4eb
+ ld a, $7
+ hlcoord 12, 4, AttrMap
+ call Function8a5a3
+ ld a, $6
+ hlcoord 15, 4, AttrMap
+ call Function8a5a3
+ ret
+
+Function8a4fc: ; 8a4fc (22:64fc)
+ ld a, [MenuSelection]
+ cp $3
+ jr nz, asm_8a529
+ ld hl, wd012
+ ld a, [hli]
+ ld b, a
+ ld a, [hld]
+ add b
+ ld [hl], a
+ ld b, a
+ ld c, $80
+ call Function89cdf
+ call Function8a515
+ ret
+
+Function8a515: ; 8a515 (22:6515)
+ ld hl, wd012
+ ld a, [hl]
+ cp $38
+ jr c, .asm_8a520
+ cp $3c
+ ret c
+.asm_8a520
+ ld a, [wd013]
+ cpl
+ inc a
+ ld [wd013], a
+ ret
+
+asm_8a529: ; 8a529 (22:6529)
+ ld hl, wd012
+ ld a, $3c
+ ld [hli], a
+ ld a, $ff
+ ld [hli], a
+ ld hl, Sprites
+ xor a
+ ld bc, $20
+ call ByteFill
+ ret
+
+Function8a53d: ; 8a53d (22:653d)
+ push hl
+ ld a, $15
+ ld c, $8
+ ld de, $14
+ call Function8a573
+ ld a, $1d
+ ld c, $9
+ call Function8a57c
+ inc a
+ ld [hl], a
+ call Function8a584
+ pop hl
+ add hl, de
+ ld a, $1f
+ ld c, $8
+ call Function8a573
+ dec hl
+ ld a, $51
+ ld [hli], a
+ ld a, $26
+ ld c, $1
+ call Function8a57c
+ ld a, $52
+ ld c, $3
+ call Function8a573
+ ld a, $27
+ ld c, $6
+
+Function8a573: ; 8a573 (22:6573)
+ ld [hl], a
+ call Function8a584
+ inc a
+ dec c
+ jr nz, Function8a573
+ ret
+
+Function8a57c: ; 8a57c (22:657c)
+ ld [hl], a
+ call Function8a584
+ dec c
+ jr nz, Function8a57c
+ ret
+
+Function8a584: ; 8a584 (22:6584)
+ push af
+ ld a, $4
+ call Function89215
+ inc hl
+ pop af
+ ret
+
+Function8a58d: ; 8a58d (22:658d)
+ ld a, $2d
+ ld bc, $606
+ ld de, $14
+.asm_8a595
+ push bc
+ push hl
+.asm_8a597
+ ld [hli], a
+ inc a
+ dec c
+ jr nz, .asm_8a597
+ pop hl
+ add hl, de
+ pop bc
+ dec b
+ jr nz, .asm_8a595
+ ret
+
+Function8a5a3: ; 8a5a3 (22:65a3)
+ ld bc, $603
+ ld de, $14
+.asm_8a5a9
+ push bc
+ push hl
+.asm_8a5ab
+ ld [hli], a
+ dec c
+ jr nz, .asm_8a5ab
+ pop hl
+ add hl, de
+ pop bc
+ dec b
+ jr nz, .asm_8a5a9
+ ret
+
+Function8a5b6: ; 8a5b6 (22:65b6)
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, Palette_8a5e5
+ ld de, UnknBGPals + 4 palettes
+ ld bc, 3 palettes
+ call CopyBytes
+ ld hl, Palette_8a5fd
+ ld de, UnknOBPals
+ ld bc, 1 palettes
+ call CopyBytes
+ ld hl, Palette_8a605
+ ld de, UnknOBPals + 1 palettes
+ ld bc, 1 palettes
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ ret
+; 8a5e5 (22:65e5)
+
+Palette_8a5e5: ; 8a5e5
+ RGB 31, 31, 31
+ RGB 27, 19, 00
+ RGB 07, 11, 22
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 16, 16, 31
+ RGB 27, 19, 00
+ RGB 00, 00, 00
+
+ RGB 31, 31, 31
+ RGB 31, 00, 00
+ RGB 27, 19, 00
+ RGB 00, 00, 00
+; 8a5fd
+
+Palette_8a5fd: ; 8a5fd
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+; 8a605
+
+Palette_8a605: ; 8a605
+ RGB 00, 00, 00
+ RGB 14, 18, 31
+ RGB 16, 16, 31
+ RGB 31, 31, 31
+; 8a60d
+
+Function8a60d: ; 8a60d
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, Palette_8a624
+ ld de, UnknOBPals
+ ld bc, 1 palettes
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ ret
+; 8a624
+
+Palette_8a624: ; 8a624
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 00, 00, 00
+; 8a62c
+
+Function8a62c: ; 8a62c (22:662c)
+ call LoadStandardMenuDataHeader
+ call Function891fe
+ xor a
+ call Function8b94a
+ call Function8b677
+.asm_8a639
+ xor a
+ ld [wd033], a
+ ld [wd032], a
+ ld [wd0e3], a
+ call Function8b7bd
+ ld a, c
+ and a
+ jr z, .asm_8a66a
+ ld [MenuSelection], a
+ ld b, a
+ ld a, [wScrollingMenuCursorPosition]
+ inc a
+ ld [wd034], a
+ push bc
+ call Function8b960
+ ld a, c
+ pop bc
+ jr z, .asm_8a639
+ ld c, a
+ ld hl, Jumptable_8a671
+ ld a, b
+ ld [MenuSelection], a
+ ld a, c
+ dec a
+ rst JumpTable
+ jr .asm_8a639
+.asm_8a66a
+ call Function891fe
+ call Function89b28
+ ret
+
+Jumptable_8a671: ; 8a671 (22:6671)
+ dw Function8a679
+ dw Function8a6cd
+ dw Function8a8c3
+ dw Function8a930
+
+
+Function8a679: ; 8a679 (22:6679)
+ call Function891de
+ call ClearBGPalettes
+ call Function893cc
+ call OpenSRAMBank4
+ call Function8931b
+ call Function89844
+ call CloseSRAM
+ call OpenSRAMBank4
+ call Function8939a
+ call Function89856
+ hlcoord 1, 13
+ call Function899fe
+ call Function891ab
+ call CloseSRAM
+.asm_8a6a3
+ call Function89a57
+ jr c, .asm_8a6a3
+ and a
+ jr z, Function8a679
+ ld hl, Jumptable_8a6bc
+ dec a
+ rst JumpTable
+ jr c, Function8a679
+ call Function891fe
+ call Function8b677
+ call Function89448
+ ret
+
+Jumptable_8a6bc: ; 8a6bc (22:66bc)
+ dw Function8a6c0
+ dw Function8a6c5
+
+
+Function8a6c0: ; 8a6c0 (22:66c0)
+ call PlayClickSFX
+ and a
+ ret
+
+Function8a6c5: ; 8a6c5 (22:66c5)
+ call PlayClickSFX
+ call Function89d0d
+ scf
+ ret
+
+Function8a6cd: ; 8a6cd (22:66cd)
+ call Function891de
+ call ClearBGPalettes
+ call Function893cc
+ call OpenSRAMBank4
+ call Function8931b
+ call Function89844
+ call Function8a757
+ call CloseSRAM
+.asm_8a6e5
+ call OpenSRAMBank4
+ call Function8931b
+ call Function89856
+ call Function89a2e
+ call Function891ab
+ xor a
+ ld [wd02f], a
+ call CloseSRAM
+.asm_8a6fb
+ call Function89b97
+ call Function89c67
+ jr c, .asm_8a718
+ ld a, b
+ and a
+ jr z, .asm_8a6fb
+ call PlayClickSFX
+ call Function89448
+ ld a, [wd011]
+ ld hl, Jumptable_8a74f
+ rst JumpTable
+ jr nc, .asm_8a6e5
+ jr .asm_8a742
+.asm_8a718
+ call OpenSRAMBank4
+ call Function8a765
+ call CloseSRAM
+ jr nc, .asm_8a73f
+ call Mobile22_SetBGMapMode0
+ call Function89448
+ call Function89a23
+ hlcoord 1, 13
+ ld de, String_89135
+ call PlaceString
+ call WaitBGMap
+ ld a, $2
+ call Function89254
+ jr c, .asm_8a6e5
+.asm_8a73f
+ call CloseSRAM
+.asm_8a742
+ call ClearBGPalettes
+ call Function89448
+ call Function891d3
+ call Function8b677
+ ret
+
+Jumptable_8a74f: ; 8a74f (22:674f)
+ dw Function8a78c
+ dw Function8a7cb
+ dw Function8a818
+ dw Function8a8a1
+
+
+Function8a757: ; 8a757 (22:6757)
+ call Function8939a
+ xor a
+ ld [wd010], a
+ ld [wd011], a
+ ld [wd012], a
+ ret
+
+Function8a765: ; 8a765 (22:6765)
+ call Function8931b
+ push bc
+ ld hl, $0
+ add hl, bc
+ ld de, wd002
+ ld c, $6
+ call Function89185
+ pop bc
+ jr nz, .asm_8a78a
+ push bc
+ ld hl, $11
+ add hl, bc
+ ld de, wd008
+ ld c, $8
+ call Function89185
+ pop bc
+ jr nz, .asm_8a78a
+ and a
+ ret
+.asm_8a78a
+ scf
+ ret
+
+Function8a78c: ; 8a78c (22:678c)
+ call Function891fe
+ ld de, wd002
+ ld b, $5
+ farcall NamingScreen
+ call OpenSRAMBank4
+ call Function8931b
+ push bc
+ ld hl, $0
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld hl, wd002
+ call InitName
+ call CloseSRAM
+ call DelayFrame
+ call JoyTextDelay
+ call Function891de
+ call ClearBGPalettes
+ call Function893cc
+ call OpenSRAMBank4
+ pop bc
+ call Function89844
+ call CloseSRAM
+ and a
+ ret
+
+Function8a7cb: ; 8a7cb (22:67cb)
+ ld a, [MenuSelection]
+ push af
+ call Function891de
+ ld de, wd008
+ ld c, $0
+ farcall Function17a68f
+ jr c, .asm_8a7f4
+ ld hl, wd008
+ ld a, $ff
+ ld bc, $8
+ call ByteFill
+ ld h, d
+ ld l, e
+ ld de, wd008
+ ld c, $8
+ call Function89193
+.asm_8a7f4
+ pop af
+ ld [MenuSelection], a
+ call Function891de
+ call ClearBGPalettes
+ call Function893cc
+ call OpenSRAMBank4
+ call Function8931b
+ call Function89844
+ call Function89856
+ call Function89a2e
+ call Function891ab
+ call CloseSRAM
+ and a
+ ret
+
+Function8a818: ; 8a818 (22:6818)
+ call Function89a23
+ ld hl, wd002
+ call Function89331
+ jr c, .asm_8a875
+ ld hl, wd008
+ call Function89b45
+ jr nc, .asm_8a87a
+ call OpenSRAMBank4
+ call Function8a765
+ jr nc, .asm_8a863
+ call Function8931b
+ push bc
+ ld hl, $0
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld hl, wd002
+ ld c, $6
+ call Function89193
+ pop bc
+ ld hl, $11
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld hl, wd008
+ ld c, $8
+ call Function89193
+ hlcoord 1, 13
+ ld de, .string_8a868
+ call PlaceString
+ call WaitBGMap
+ call JoyWaitAorB
+.asm_8a863
+ call CloseSRAM
+ scf
+ ret
+; 8a868 (22:6868)
+
+.string_8a868
+ db "めいし", $1f, "かきかえ まし", $22, "@"
+
+.asm_8a875
+ ld de, String_8a88b
+ jr .asm_8a87d
+.asm_8a87a
+ ld de, String_8911c
+.asm_8a87d
+ hlcoord 1, 13
+ call PlaceString
+ call WaitBGMap
+ call JoyWaitAorB
+ and a
+ ret
+; 8a88b (22:688b)
+
+String_8a88b: ; 8a88b
+ db "おともだち", $25, "なまえが"
+ next "かかれて いません!@"
+; 8a8a1
+
+Function8a8a1: ; 8a8a1 (22:68a1)
+ call OpenSRAMBank4
+ call Function8a765
+ call CloseSRAM
+ jr nc, .asm_8a8bf
+ call Function89a23
+ hlcoord 1, 13
+ ld de, String_89135
+ call PlaceString
+ ld a, $2
+ call Function89254
+ jr c, .asm_8a8c1
+.asm_8a8bf
+ scf
+ ret
+.asm_8a8c1
+ and a
+ ret
+
+Function8a8c3: ; 8a8c3 (22:68c3)
+ call Function891de
+ call ClearBGPalettes
+ call Function893cc
+ call OpenSRAMBank4
+ call Function8931b
+ call Function89844
+ call Function8939a
+ call Function89856
+ call CloseSRAM
+ call Function891ab
+ hlcoord 1, 13
+ ld de, String_8a919
+ call PlaceString
+ ld a, $2
+ call Function89254
+ jr c, .asm_8a90f
+ call OpenSRAMBank4
+ call Function892b4
+ call CloseSRAM
+ call Function89a23
+ call Mobile22_SetBGMapMode0
+ hlcoord 1, 13
+ ld de, String_8a926
+ call PlaceString
+ call WaitBGMap
+ call JoyWaitAorB
+.asm_8a90f
+ call Function89448
+ call Function891fe
+ call Function8b677
+ ret
+; 8a919 (22:6919)
+
+String_8a919: ; 8a919
+ db "このデータ", $1f, "けしますか?@"
+; 8a926
+
+String_8a926: ; 8a926
+ db "データ", $1f, "けしまし", $22, "@"
+; 8a930
+
+Function8a930: ; 8a930 (22:6930)
+ ld a, [MenuSelection]
+ push af
+ xor a
+ ld [wd032], a
+ ld a, $1
+ ld [wd033], a
+ ld a, [wd034]
+ ld [wd0e3], a
+.asm_8a943
+ call Function8b7bd
+ ld a, [wMenuJoypad]
+ and $1
+ jr nz, .asm_8a953
+ ld a, c
+ and a
+ jr nz, .asm_8a943
+ pop af
+ ret
+.asm_8a953
+ call OpenSRAMBank4
+ pop af
+ cp c
+ jr z, .asm_8a995
+ push bc
+ ld [MenuSelection], a
+ call Function8931b
+ push bc
+ ld h, b
+ ld l, c
+ ld de, wd002
+ ld bc, $25
+ call CopyBytes
+ pop de
+ pop bc
+ ld a, c
+ ld [MenuSelection], a
+ call Function8931b
+ push bc
+ ld h, b
+ ld l, c
+ ld bc, $25
+ call CopyBytes
+ pop de
+ ld hl, wd002
+ ld bc, $25
+ call CopyBytes
+ ld de, SFX_SWITCH_POKEMON
+ call WaitPlaySFX
+ ld de, SFX_SWITCH_POKEMON
+ call WaitPlaySFX
+.asm_8a995
+ call CloseSRAM
+ ret
+
+Function8a999: ; 8a999 (22:6999)
+ ld hl, MenuDataHeader_0x8a9c9
+ call LoadMenuDataHeader
+ ld c, $1
+.asm_8a9a1
+ call Function8a9ce
+ jr c, .asm_8a9bb
+ push bc
+ push de
+ call LoadStandardMenuDataHeader
+ pop de
+ dec e
+ ld a, e
+ ld hl, Jumptable_8a9c5
+ rst JumpTable
+ call Function891fe
+ call Function89b28
+ pop bc
+ jr .asm_8a9a1
+.asm_8a9bb
+ call Function89209
+ call CloseWindow
+ call Function8920f
+ ret
+
+Jumptable_8a9c5: ; 8a9c5 (22:69c5)
+ dw Function8aa0a
+ dw Function8ab3b
+; 8a9c9 (22:69c9)
+
+MenuDataHeader_0x8a9c9: ; 0x8a9c9
+ db $40 ; flags
+ db 04, 11 ; start coords
+ db 11, 18 ; end coords
+; 8a9ce
+
+Function8a9ce: ; 8a9ce (22:69ce)
+ push bc
+ decoord 11, 4
+ ld b, $6
+ ld c, $6
+ call Function89b3b
+ pop bc
+ ld a, c
+ ld hl, MenuDataHeader_0x8a9f2
+ call Function89d5e
+ ld hl, Function8aa09
+ call Function89d85
+ jr c, .asm_8a9ed
+ ld c, a
+ ld e, a
+ and a
+ ret
+.asm_8a9ed
+ ld c, a
+ ld e, $0
+ scf
+ ret
+; 8a9f2 (22:69f2)
+
+MenuDataHeader_0x8a9f2: ; 0x8a9f2
+ db $40 ; flags
+ db 04, 11 ; start coords
+ db 11, 18 ; end coords
+ dw MenuData2_0x8a9fa
+ db 1 ; default option
+; 0x8a9fa
+
+MenuData2_0x8a9fa: ; 0x8a9fa
+ db $a0 ; flags
+ db 3 ; items
+ db "へんしゅう@"
+ db "みる@"
+ db "やめる@"
+; 0x8aa09
+
+Function8aa09: ; 8aa09
+ ret
+; 8aa0a
+
+Function8aa0a: ; 8aa0a (22:6a0a)
+ ld a, $1
+ ld [wd02f], a
+ ld [wd011], a
+ xor a
+ ld [wd010], a
+ ld [wd012], a
+ call OpenSRAMBank4
+ ld hl, $a603
+ ld de, wd008
+ call Function89381
+ call CloseSRAM
+ call Function891fe
+ call ClearBGPalettes
+ call Function893cc
+ call Function89807
+ call Function89492
+ call Function894ca
+.asm_8aa3a
+ call Function8987f
+ call Function89a2e
+ call Function891ab
+.asm_8aa43
+ call Function89b97
+ call Function89c67
+ jr c, .asm_8aa61
+ ld a, b
+ and a
+ jr z, .asm_8aa43
+ call PlayClickSFX
+ call Function89448
+ ld a, [wd011]
+ dec a
+ ld hl, Jumptable_8aa6d
+ rst JumpTable
+ jr nc, .asm_8aa3a
+ jr .asm_8aa69
+.asm_8aa61
+ call Function89448
+ call Function8ab11
+ jr nc, .asm_8aa3a
+.asm_8aa69
+ call Function89448
+ ret
+
+Jumptable_8aa6d: ; 8aa6d (22:6a6d)
+ dw Function8aa73
+ dw Function8aab6
+ dw Function8ab11
+
+
+Function8aa73: ; 8aa73 (22:6a73)
+ ld a, [MenuSelection]
+ ld e, a
+ push de
+ call Function891de
+ ld de, wd008
+ ld c, $0
+ farcall Function17a68f
+ jr c, .asm_8aa9d
+ ld hl, wd008
+ ld a, $ff
+ ld bc, $8
+ call ByteFill
+ ld h, d
+ ld l, e
+ ld de, wd008
+ ld c, $8
+ call Function89193
+.asm_8aa9d
+ call Function891fe
+ call ClearBGPalettes
+ call Function893cc
+ call Function89807
+ call Function89492
+ call Function894ca
+ pop de
+ ld a, e
+ ld [MenuSelection], a
+ and a
+ ret
+
+Function8aab6: ; 8aab6 (22:6ab6)
+ call Function89a23
+ ld hl, wd008
+ call Function89b45
+ jr nc, Function8ab00
+ call OpenSRAMBank4
+ ld de, wd008
+ ld hl, $a603
+ ld c, $8
+ call Function89185
+ jr z, .asm_8aaeb
+ ld hl, wd008
+ ld de, $a603
+ ld c, $8
+ call Function89193
+ hlcoord 1, 13
+ ld de, String_8aaf0
+ call PlaceString
+ call WaitBGMap
+ call JoyWaitAorB
+.asm_8aaeb
+ call CloseSRAM
+ scf
+ ret
+; 8aaf0 (22:6af0)
+
+String_8aaf0: ; 8aaf0
+ db "あたらしい めいし<PKMN>できまし<LNBRK>@"
+; 8ab00
+
+Function8ab00: ; 8ab00
+ ld de, String_8911c
+ hlcoord 1, 13
+ call PlaceString
+ call WaitBGMap
+ call Mobile22_ButtonSound
+ and a
+ ret
+
+Function8ab11: ; 8ab11 (22:6b11)
+ call OpenSRAMBank4
+ ld hl, $a603
+ ld de, wd008
+ ld c, $8
+ call Function89185
+ call CloseSRAM
+ jr z, .asm_8ab37
+ call Function89a23
+ hlcoord 1, 13
+ ld de, String_89135
+ call PlaceString
+ ld a, $2
+ call Function89254
+ jr c, .asm_8ab39
+.asm_8ab37
+ scf
+ ret
+.asm_8ab39
+ and a
+ ret
+
+Function8ab3b: ; 8ab3b (22:6b3b)
+.pressed_start
+ call Function891fe
+ call ClearBGPalettes
+ call Function893cc
+ call Function89807
+ call Function89492
+ call Function894ca
+ call OpenSRAMBank4
+ ld hl, $a603
+ ld de, wd008
+ call Function89381
+ call CloseSRAM
+ call Function8987f
+ call OpenSRAMBank4
+ hlcoord 1, 13
+ ld bc, $a007
+ call Function89a0c
+ call CloseSRAM
+ call Function891ab
+ call .JoypadLoop
+ jr c, .pressed_start
+ ret
+
+.JoypadLoop: ; 8ab77 (22:6b77)
+ call JoyTextDelay_ForcehJoyDown
+ bit A_BUTTON_F, c
+ jr nz, .a_b_button
+ bit B_BUTTON_F, c
+ jr nz, .a_b_button
+ bit START_F, c
+ jr z, .JoypadLoop
+ call PlayClickSFX
+ call Function89d0d
+ scf
+ ret
+
+.a_b_button
+ call PlayClickSFX
+ and a
+ ret
+
+Function8ab93: ; 8ab93 (22:6b93)
+ call ClearBGPalettes
+ call LoadStandardMenuDataHeader
+ farcall Function105688
+ call ClearSprites
+ call Function891fe
+ call Function89b28
+ ret
+; 8aba9 (22:6ba9)
+
+Function8aba9: ; 8aba9
+ ld a, $2
+ call Function8b94a
+ ld a, $1
+ ld [wd032], a
+.asm_8abb3
+ call Function891fe
+ call Function8b677
+.asm_8abb9
+ call Function8b7bd
+ jr z, .asm_8abdf
+ ld a, c
+ ld [MenuSelection], a
+ call OpenSRAMBank4
+ call Function8931b
+ ld hl, $0011
+ add hl, bc
+ call Function89b45
+ call CloseSRAM
+ jr c, .asm_8abe2
+ ld de, SFX_WRONG
+ call WaitPlaySFX
+ call CloseSRAM
+ jr .asm_8abb9
+
+.asm_8abdf
+ xor a
+ ld c, a
+ ret
+
+.asm_8abe2
+ call PlayClickSFX
+.asm_8abe5
+ call Function891de
+ call ClearBGPalettes
+ call Function893cc
+ call OpenSRAMBank4
+ call Function8931b
+ call Function89844
+ call CloseSRAM
+ call OpenSRAMBank4
+ call Function8939a
+ call Function89856
+ hlcoord 1, 13
+ call Function899fe
+ call CloseSRAM
+ call Function891ab
+.asm_8ac0f
+ call Function89a57
+ jr c, .asm_8ac0f
+ and a
+ jr z, .asm_8abe5
+ cp $2
+ jr z, .asm_8ac0f
+ hlcoord 0, 12
+ ld b, $4
+ ld c, $12
+ call TextBox
+ hlcoord 1, 14
+ ld de, String_8ac3b
+ call PlaceString
+ ld a, $1
+ call Function8925e
+ jp c, .asm_8abb3
+ ld a, [MenuSelection]
+ ld c, a
+ ret
+; 8ac3b
+
+String_8ac3b: ; 8ac3b
+ db "こ", $25, "ともだち", $1d, "でんわを"
+ next "かけますか?@"
+; 8ac4e
+
+Function8ac4e: ; 8ac4e
+ xor a
+ ld [MenuSelection], a
+ push de
+ call Function891de
+ call ClearBGPalettes
+ call Function893cc
+ pop bc
+ call Function89844
+ call Function8939a
+ call Function89856
+ hlcoord 1, 13
+ call Function899fe
+ call Function891ab
+ ret
+; 8ac70
+
+Function8ac70: ; 8ac70
+ push de
+ ld a, $3
+ call Function8b94a
+
+Function8ac76: ; 8ac76
+ call Function891fe
+ call Function8b677
+
+Function8ac7c: ; 8ac7c
+ call Function8b7bd
+ jr z, .asm_8acf0
+ ld a, c
+ ld [wd02f], a
+ ld [MenuSelection], a
+ call OpenSRAMBank4
+ call Function8931b
+ call Function8932d
+ call CloseSRAM
+ jr nc, .asm_8acb0
+ call OpenSRAMBank4
+ ld hl, $0011
+ add hl, bc
+ call Function89b45
+ call CloseSRAM
+ jr nc, .asm_8accc
+ call OpenSRAMBank4
+ call Function892b7
+ call CloseSRAM
+ jr .asm_8accc
+
+.asm_8acb0
+ call Function8ad0b
+ jr c, Function8ac76
+ and a
+ jr nz, .asm_8accc
+ call OpenSRAMBank4
+ ld h, b
+ ld l, c
+ ld d, $0
+ ld e, $6
+ add hl, de
+ ld d, h
+ ld e, l
+ pop hl
+ ld c, $1f
+ call Function89193
+ jr .asm_8ace4
+
+.asm_8accc
+ pop hl
+ call OpenSRAMBank4
+ ld d, b
+ ld e, c
+ ld c, $6
+ call Function89193
+ ld a, $6
+ add e
+ ld e, a
+ ld a, $0
+ adc d
+ ld d, a
+ ld c, $1f
+ call Function89193
+
+.asm_8ace4
+ call CloseSRAM
+ call LoadStandardFont
+ ld a, [wd02f]
+ ld c, a
+ and a
+ ret
+
+.asm_8acf0
+ ld hl, UnknownText_0x8ad06
+ call PrintText
+ ld a, $2
+ call Function89259
+ jp c, Function8ac7c
+ call LoadStandardFont
+ pop de
+ ld c, $0
+ scf
+ ret
+; 8ad06
+
+UnknownText_0x8ad06: ; 0x8ad06
+ ; Finish registering CARDS?
+ text_jump UnknownText_0x1c554a
+ db "@"
+; 0x8ad0b
+
+Function8ad0b: ; 8ad0b
+.asm_8ad0b
+ ld a, [MenuSelection]
+ ld [wd02f], a
+ call Function891de
+ call ClearBGPalettes
+ call Function893cc
+ call OpenSRAMBank4
+ call Function8931b
+ push bc
+ call Function89844
+ call Function8939a
+ call Function89856
+ hlcoord 1, 13
+ call Function899fe
+ call CloseSRAM
+ call Function891ab
+ pop bc
+.asm_8ad37
+ push bc
+ call Function89a57
+ pop bc
+ jr c, .asm_8ad37
+ and a
+ jr z, .asm_8ad0b
+ cp $2
+ jr z, .asm_8ad37
+ call Mobile22_SetBGMapMode0
+ push bc
+ hlcoord 0, 12
+ ld b, $4
+ ld c, $12
+ call TextBox
+ ld de, String_8ad89
+ hlcoord 1, 14
+ call PlaceString
+ ld a, $2
+ call Function8925e
+ jr c, .asm_8ad87
+ call Mobile22_SetBGMapMode0
+ hlcoord 0, 12
+ ld b, $4
+ ld c, $12
+ call TextBox
+ ld de, String_8ad9c
+ hlcoord 1, 14
+ call PlaceString
+ ld a, $1
+ call Function8925e
+ jr c, .asm_8ad84
+ ld a, $0
+ jr .asm_8ad86
+
+.asm_8ad84
+ ld a, $1
+
+.asm_8ad86
+ and a
+
+.asm_8ad87
+ pop bc
+ ret
+; 8ad89
+
+String_8ad89: ; 8ad89
+ db "こ", $25, "めいし", $1f, "けして"
+ next "いれかえますか?@"
+; 8ad9c
+
+String_8ad9c: ; 8ad9c
+ db "おともだち", $25, "なまえを"
+ next "のこして おきますか?@"
+; 8adb3
+
+Function8adb3: ; 8adb3
+ call Function891de
+ call Function8a262
+ push af
+ call Function891de
+ pop af
+ ret
+; 8adbf
+
+Function8adbf: ; 8adbf
+ call OpenSRAMBank4
+ ld hl, $a603
+ call Function89b45
+ call CloseSRAM
+ ret
+; 8adcc
+
+Function8adcc: ; 8adcc
+ call OpenSRAMBank4
+ call Function8b3b0
+ call CloseSRAM
+ ret nc
+ cp $2
+ ret z
+ scf
+ ret
+; 8addb
diff --git a/mobile/mobile_22_2.asm b/mobile/mobile_22_2.asm
new file mode 100644
index 000000000..49780d4aa
--- /dev/null
+++ b/mobile/mobile_22_2.asm
@@ -0,0 +1,1162 @@
+Function8b342:: ; 8b342
+; Loads the secondary map header pointer, then runs through a
+; dw with three dummy functions. Spends a lot of energy
+; doing pretty much nothing.
+ call GetSecondaryMapHeaderPointer
+ ld d, h
+ ld e, l
+
+; Everything between here and "ret" is useless.
+ xor a
+.loop
+ push af
+ ld hl, .dw
+ rst JumpTable
+ pop af
+ inc a
+ cp 3
+ jr nz, .loop
+ ret
+; 8b354
+
+.dw ; 8b354
+ dw .zero
+ dw .one
+ dw .two
+; 8b35a
+
+.zero ; 8b35a
+ mobile
+; 8b35b
+
+.one ; 8b35b
+ mobile
+; 8b35c
+
+.two ; 8b35c
+ mobile
+; 8b35d
+
+Function8b35d: ; 8b35d
+ ld a, h
+ cp d
+ ret nz
+ ld a, l
+ cp e
+ ret
+; 8b363
+
+Function8b363: ; 8b363
+ push bc
+ farcall Mobile_AlwaysReturnNotCarry
+ pop bc
+ ret
+; 8b36c
+
+Function8b36c: ; 8b36c (22:736c)
+ ; [bc + (0:4)] = -1
+ push bc
+ ld h, b
+ ld l, c
+ ld bc, 4
+ ld a, -1
+ call ByteFill
+ pop bc
+ ret
+
+Function8b379: ; 8b379 (22:7379)
+ ; d = [bc + e]
+ push bc
+ ld a, c
+ add e
+ ld c, a
+ ld a, $0
+ adc b
+ ld b, a
+ ld a, [bc]
+ ld d, a
+ pop bc
+ ret
+
+Function8b385: ; 8b385 (22:7385)
+ ; [bc + e] = d
+ push bc
+ ld a, c
+ add e
+ ld c, a
+ ld a, $0
+ adc b
+ ld b, a
+ ld a, d
+ ld [bc], a
+ pop bc
+ ret
+
+Function8b391: ; 8b391 (22:7391)
+ ; find first e in range(4) such that [bc + e] == -1
+ ; if none exist, return carry
+ push bc
+ ld e, 0
+ ld d, 4
+.loop
+ ld a, [bc]
+ inc bc
+ cp -1
+ jr z, .done
+ inc e
+ dec d
+ jr nz, .loop
+ dec e
+ scf
+.done
+ pop bc
+ ret
+
+Function8b3a4: ; 8b3a4 (22:73a4)
+ ; strcmp(hl, bc, 4)
+ push de
+ push bc
+ ld d, b
+ ld e, c
+ ld c, 4
+ call Function89185
+ pop bc
+ pop de
+ ret
+
+Function8b3b0: ; 8b3b0 (22:73b0)
+ ld bc, $a037 ; 4:a037
+ ld a, [$a60b]
+ and a
+ jr z, .asm_8b3c2
+ cp $3
+ jr nc, .asm_8b3c2
+ call Function8b391
+ jr c, .asm_8b3c9
+.asm_8b3c2
+ call Function8b36c
+ xor a
+ ld [$a60b], a
+.asm_8b3c9
+ ld a, [$a60b]
+ ret
+
+Function8b3cd: ; 8b3cd (22:73cd)
+ push de
+ push bc
+ ld e, $4
+.asm_8b3d1
+ ld a, [bc]
+ inc bc
+ call Function8998b
+ inc hl
+ dec e
+ jr nz, .asm_8b3d1
+ pop bc
+ pop de
+ ret
+
+Function8b3dd: ; 8b3dd (22:73dd)
+ push de
+ push bc
+ call JoyTextDelay_ForcehJoyDown ; joypad
+ ld a, c
+ pop bc
+ pop de
+ bit A_BUTTON_F, a
+ jr nz, .a_button
+ bit B_BUTTON_F, a
+ jr nz, .b_button
+ bit D_UP_F, a
+ jr nz, .d_up
+ bit D_DOWN_F, a
+ jr nz, .d_down
+ and a
+ ret
+
+.a_button
+ ld a, e
+ cp $3
+ jr z, .e_is_zero
+ inc e
+ ld d, 0
+ call Function8b385
+ xor a
+ ld [wd010], a
+ ret
+
+.e_is_zero
+ call PlayClickSFX
+ ld d, $0
+ scf
+ ret
+
+.b_button
+ ld a, e
+ and a
+ jr nz, .e_is_not_zero
+ call PlayClickSFX
+ ld d, -1
+ call Function8b385
+ ld d, 1
+ scf
+ ret
+
+.e_is_not_zero
+ ld d, -1
+ call Function8b385
+ dec e
+ xor a
+ ld [wd010], a
+ ret
+
+.d_up
+ call Function8b379
+ ld a, d
+ cp $a
+ jr c, .less_than_10_up_1
+ ld d, $9
+.less_than_10_up_1
+ inc d
+ ld a, d
+ cp $a
+ jr c, .less_than_10_up_2
+ ld d, $0
+.less_than_10_up_2
+ call Function8b385
+ xor a
+ ld [wd010], a
+ ret
+
+.d_down
+ call Function8b379
+ ld a, d
+ cp $a
+ jr c, .less_than_10_down
+ ld d, $0
+.less_than_10_down
+ ld a, d
+ dec d
+ and a
+ jr nz, .nonzero_down
+ ld d, $9
+.nonzero_down
+ call Function8b385
+ xor a
+ ld [wd010], a
+ ret
+
+Function8b45c: ; 8b45c (22:745c)
+ call Function8b36c
+ xor a
+ ld [wd010], a
+ ld [wd012], a
+ call Function8b391
+ ld d, $0
+ call Function8b385
+.asm_8b46e
+ call Mobile22_SetBGMapMode0
+ call Function8b493
+ call Function8b4cc
+ call Function8b518
+ call Function89b78
+ push bc
+ call Function8b4fd
+ call Function89c44
+ ld a, $1
+ ld [hBGMapMode], a
+ pop bc
+ call Function8b3dd
+ jr nc, .asm_8b46e
+ ld a, d
+ and a
+ ret z
+ scf
+ ret
+
+Function8b493: ; 8b493 (22:7493)
+ push bc
+ call Mobile22_SetBGMapMode0
+ call Function8b521
+ ld hl, Jumptable_8b4a0
+ pop bc
+ rst JumpTable
+ ret
+
+Jumptable_8b4a0: ; 8b4a0 (22:74a0)
+ dw Function8b4a4
+ dw Function8b4b8
+
+
+Function8b4a4: ; 8b4a4 (22:74a4)
+ push bc
+ push de
+ call Function8b4d8
+ call TextBox
+ pop de
+ pop bc
+ call Function8b4cc
+ call Function8b518
+ call Function8b3cd
+ ret
+
+Function8b4b8: ; 8b4b8 (22:74b8)
+ push bc
+ push de
+ call Function8b4ea
+ call Function89b3b
+ pop de
+ pop bc
+ call Function8b4cc
+ call Function8b518
+ call Function8b3cd
+ ret
+
+Function8b4cc: ; 8b4cc (22:74cc)
+ push bc
+ ld hl, Unknown_8b529
+ call Function8b50a
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ pop bc
+ ret
+
+Function8b4d8: ; 8b4d8 (22:74d8)
+ ld hl, Unknown_8b529
+ call Function8b50a
+ push hl
+ inc hl
+ inc hl
+ ld a, [hli]
+ ld b, a
+ ld a, [hl]
+ ld c, a
+ pop hl
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ret
+
+Function8b4ea: ; 8b4ea (22:74ea)
+ ld hl, Unknown_8b529
+ call Function8b50a
+ push hl
+ inc hl
+ inc hl
+ ld a, [hli]
+ ld b, a
+ ld a, [hl]
+ ld c, a
+ pop hl
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+ ret
+
+Function8b4fd: ; 8b4fd (22:74fd)
+ ld hl, Unknown_8b529 + 4
+ call Function8b50a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ld a, [hli]
+ ld d, a
+ ret
+
+Function8b50a: ; 8b50a (22:750a)
+ ld a, [wd02e]
+ and a
+ ret z
+ ld b, $0
+ ld c, $8
+.asm_8b513
+ add hl, bc
+ dec a
+ jr nz, .asm_8b513
+ ret
+
+Function8b518: ; 8b518 (22:7518)
+ push de
+ ld d, $0
+ ld e, $14
+ add hl, de
+ inc hl
+ pop de
+ ret
+
+Function8b521: ; 8b521 (22:7521)
+ ld hl, Unknown_8b529 + 7
+ call Function8b50a
+ ld a, [hl]
+ ret
+; 8b529 (22:7529)
+
+Unknown_8b529: ; 8b529
+ dwcoord 2, 5
+ db 1, 4, $20, $49, 0, 1
+ dwcoord 7, 4
+ db 1, 4, $48, $41, 0, 0
+; 8b539
+
+Function8b539: ; 8b539 (22:7539)
+ ld bc, wd017
+ call Function8b36c
+ xor a
+ ld [wd012], a
+ ld [wd02e], a
+ call Function8b493
+ call Function8b4fd
+ ld e, $0
+ call Function89c44
+ call CGBOnly_CopyTilemapAtOnce
+ ret
+
+Function8b555: ; 8b555 (22:7555)
+.loop
+ ld hl, UnknownText_0x8b5ce
+ call PrintText
+ ld bc, wd017
+ call Function8b45c
+ jr c, .asm_8b5c8
+ call Function89448
+ ld bc, wd017
+ call Function8b493
+ ld bc, wd017
+ call Function8b664
+ jr nz, .asm_8b57c
+ ld hl, UnknownText_0x8b5e2
+ call PrintText
+ jr .loop
+
+.asm_8b57c
+ ld hl, UnknownText_0x8b5d3
+ call PrintText
+ ld bc, wd013
+ call Function8b45c
+ jr c, .loop
+ ld bc, wd017
+ ld hl, wd013
+ call Function8b3a4
+ jr z, .strings_equal
+ call Function89448
+ ld bc, wd013
+ call Function8b493
+ ld hl, UnknownText_0x8b5d8
+ call PrintText
+ jr .asm_8b57c
+
+.strings_equal
+ call OpenSRAMBank4
+ ld hl, wd013
+ ld de, $a037 ; 4:a037
+ ld bc, $4
+ call CopyBytes
+ call CloseSRAM
+ call Function89448
+ ld bc, wd013
+ call Function8b493
+ ld hl, UnknownText_0x8b5dd
+ call PrintText
+ and a
+.asm_8b5c8
+ push af
+ call Function89448
+ pop af
+ ret
+; 8b5ce (22:75ce)
+
+UnknownText_0x8b5ce: ; 0x8b5ce
+ ; Please enter any four-digit number.
+ text_jump UnknownText_0x1bc187
+ db "@"
+; 0x8b5d3
+
+UnknownText_0x8b5d3: ; 0x8b5d3
+ ; Enter the same number to confirm.
+ text_jump UnknownText_0x1bc1ac
+ db "@"
+; 0x8b5d8
+
+UnknownText_0x8b5d8: ; 0x8b5d8
+ ; That's not the same number.
+ text_jump UnknownText_0x1bc1cf
+ db "@"
+; 0x8b5dd
+
+UnknownText_0x8b5dd: ; 0x8b5dd
+ ; Your PASSCODE has been set. Enter this number next time to open the CARD FOLDER.
+ text_jump UnknownText_0x1bc1eb
+ db "@"
+; 0x8b5e2
+
+UnknownText_0x8b5e2: ; 0x8b5e2
+ ; 0000 is invalid!
+ text_jump UnknownText_0x1bc23e
+ db "@"
+; 0x8b5e7
+
+Function8b5e7: ; 8b5e7 (22:75e7)
+ ld bc, wd013
+ call Function8b36c
+ xor a
+ ld [wd012], a
+ ld [wd02e], a
+ call Function8b493
+ call Function891ab
+ call Function8b4fd
+ ld e, $0
+ call Function89c44
+.asm_8b602
+ ld hl, UnknownText_0x8b642
+ call PrintText
+ ld bc, wd013
+ call Function8b45c
+ jr c, .asm_8b63c
+ call Function89448
+ ld bc, wd013
+ call Function8b493
+ call OpenSRAMBank4
+ ld hl, $a037 ; 4:a037
+ call Function8b3a4
+ call CloseSRAM
+ jr z, .asm_8b635
+ ld hl, UnknownText_0x8b647
+ call PrintText
+ ld bc, wd013
+ call Function8b36c
+ jr .asm_8b602
+.asm_8b635
+ ld hl, UnknownText_0x8b64c
+ call PrintText
+ and a
+.asm_8b63c
+ push af
+ call Function89448
+ pop af
+ ret
+; 8b642 (22:7642)
+
+UnknownText_0x8b642: ; 0x8b642
+ ; Enter the CARD FOLDER PASSCODE.
+ text_jump UnknownText_0x1bc251
+ db "@"
+; 0x8b647
+
+UnknownText_0x8b647: ; 0x8b647
+ ; Incorrect PASSCODE!
+ text_jump UnknownText_0x1bc272
+ db "@"
+; 0x8b64c
+
+UnknownText_0x8b64c: ; 0x8b64c
+ ; CARD FOLDER open.@ @
+ text_jump UnknownText_0x1bc288
+ start_asm
+ ld de, SFX_TWINKLE
+ call PlaySFX
+ call WaitSFX
+ ld c, $8
+ call DelayFrames
+ ld hl, .string_8b663
+ ret
+.string_8b663
+ db "@"
+; 8b664
+
+Function8b664: ; 8b664 (22:7664)
+ push bc
+ ld de, $4
+.asm_8b668
+ ld a, [bc]
+ cp $0
+ jr nz, .asm_8b66e
+ inc d
+.asm_8b66e
+ inc bc
+ dec e
+ jr nz, .asm_8b668
+ pop bc
+ ld a, d
+ cp $4
+ ret
+
+Function8b677: ; 8b677
+ call ClearBGPalettes
+ call DisableLCD
+ call Function8b690
+ call Function8b6bb
+ call Function8b6ed
+ call EnableLCD
+ call Function891ab
+ call SetPalettes
+ ret
+; 8b690
+
+Function8b690: ; 8b690
+ ld hl, GFX_17afa5 + $514
+ ld de, VTiles2
+ ld bc, $160
+ ld a, BANK(GFX_17afa5)
+ call FarCopyBytes
+ ld hl, GFX_17afa5 + $514 + $160 - $10
+ ld de, VTiles2 tile $61
+ ld bc, $10
+ ld a, BANK(GFX_17afa5)
+ call FarCopyBytes
+ ld hl, GFX_17afa5 + $514 + $160
+ ld de, VTiles1 tile $6e
+ ld bc, $10
+ ld a, BANK(GFX_17afa5)
+ call FarCopyBytes
+ ret
+; 8b6bb
+
+Function8b6bb: ; 8b6bb
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, Palette_8b6d5
+ ld de, UnknBGPals
+ ld bc, $0018
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ call Function8949c
+ ret
+; 8b6d5
+
+Palette_8b6d5: ; 8b6d5
+ RGB 31, 31, 31
+ RGB 31, 21, 00
+ RGB 14, 07, 03
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 31, 21, 00
+ RGB 22, 09, 17
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+ RGB 31, 21, 00
+ RGB 06, 24, 08
+ RGB 00, 00, 00
+; 8b6ed
+
+Function8b6ed: ; 8b6ed
+ hlcoord 0, 0, AttrMap
+ ld bc, $012c
+ xor a
+ call ByteFill
+ hlcoord 0, 14, AttrMap
+ ld bc, $0050
+ ld a, $7
+ call ByteFill
+ ret
+; 8b703
+
+Function8b703: ; 8b703
+ call Mobile22_SetBGMapMode0
+ push hl
+ ld a, $c
+ ld [hli], a
+ inc a
+ call Function8b73e
+ inc a
+ ld [hl], a
+ pop hl
+ push hl
+ push bc
+ ld de, SCREEN_WIDTH
+ add hl, de
+.asm_8b717
+ push hl
+ ld a, $f
+ ld [hli], a
+ ld a, $7f
+ call Function8b73e
+ ld a, $11
+ ld [hl], a
+ pop hl
+ ld de, SCREEN_WIDTH
+ add hl, de
+ dec b
+ jr nz, .asm_8b717
+ call Function8b732
+ pop bc
+ pop hl
+ jr Function8b744
+; 8b732
+
+Function8b732: ; 8b732
+ ld a, $12
+ ld [hli], a
+ ld a, $13
+ call Function8b73e
+ ld a, $14
+ ld [hl], a
+ ret
+; 8b73e
+
+Function8b73e: ; 8b73e
+ ld d, c
+.asm_8b73f
+ ld [hli], a
+ dec d
+ jr nz, .asm_8b73f
+ ret
+; 8b744
+
+Function8b744: ; 8b744
+ ld de, AttrMap - TileMap
+ add hl, de
+ inc b
+ inc b
+ inc c
+ inc c
+ xor a
+.asm_8b74d
+ push bc
+ push hl
+.asm_8b74f
+ ld [hli], a
+ dec c
+ jr nz, .asm_8b74f
+ pop hl
+ ld de, SCREEN_WIDTH
+ add hl, de
+ pop bc
+ dec b
+ jr nz, .asm_8b74d
+ ret
+; 8b75d
+
+Function8b75d: ; 8b75d
+ call Mobile22_SetBGMapMode0
+ hlcoord 0, 0
+ ld a, $1
+ ld bc, SCREEN_WIDTH
+ call ByteFill
+ hlcoord 0, 1
+ ld a, $2
+ ld [hl], a
+ hlcoord 9, 1
+ ld c, $b
+ call Function8b788
+ hlcoord 1, 1
+ ld a, $4
+ ld e, $8
+.asm_8b780
+ ld [hli], a
+ inc a
+ dec e
+ jr nz, .asm_8b780
+ jr Function8b79e
+; 8b787
+
+Function8b787: ; 8b787
+ ret
+; 8b788
+
+Function8b788: ; 8b788
+.asm_8b788
+ ld a, $2
+ ld [hli], a
+ dec c
+ ret z
+ ld a, $1
+ ld [hli], a
+ dec c
+ ret z
+ ld a, $3
+ ld [hli], a
+ dec c
+ ret z
+ ld a, $1
+ ld [hli], a
+ dec c
+ jr nz, .asm_8b788
+ ret
+; 8b79e
+
+Function8b79e: ; 8b79e
+ hlcoord 0, 1, AttrMap
+ ld a, $1
+ ld [hli], a
+ hlcoord 9, 1, AttrMap
+ ld e, $b
+.asm_8b7a9
+ ld a, $2
+ ld [hli], a
+ dec e
+ ret z
+ xor a
+ ld [hli], a
+ dec e
+ ret z
+ ld a, $1
+ ld [hli], a
+ dec e
+ ret z
+ xor a
+ ld [hli], a
+ dec e
+ jr nz, .asm_8b7a9
+ ret
+; 8b7bd
+
+Function8b7bd: ; 8b7bd
+ call Function8b855
+ ld hl, MenuDataHeader_0x8b867
+ call CopyMenuDataHeader
+ ld a, [wd030]
+ ld [wMenuCursorBuffer], a
+ ld a, [wd031]
+ ld [wMenuScrollPosition], a
+ ld a, [wd032]
+ and a
+ jr z, .asm_8b7e0
+ ld a, [wMenuFlags]
+ set 3, a
+ ld [wMenuFlags], a
+
+.asm_8b7e0
+ ld a, [wd0e3]
+ and a
+ jr z, .asm_8b7ea
+ dec a
+ ld [wScrollingMenuCursorPosition], a
+
+.asm_8b7ea
+ hlcoord 0, 2
+ ld b, $b
+ ld c, $12
+ call Function8b703
+ call Function8b75d
+ call UpdateSprites
+ call Function89209
+ call ScrollingMenu
+ call Function8920f
+ ld a, [wMenuJoypad]
+ cp $2
+ jr z, .asm_8b823
+ cp $20
+ jr nz, .asm_8b813
+ call Function8b832
+ jr .asm_8b7ea
+
+.asm_8b813
+ cp $10
+ jr nz, .asm_8b81c
+ call Function8b83e
+ jr .asm_8b7ea
+
+.asm_8b81c
+ ld a, [MenuSelection]
+ cp $ff
+ jr nz, .asm_8b824
+
+.asm_8b823
+ xor a
+
+.asm_8b824
+ ld c, a
+ ld a, [wMenuCursorY]
+ ld [wd030], a
+ ld a, [wMenuScrollPosition]
+ ld [wd031], a
+ ret
+; 8b832
+
+Function8b832: ; 8b832
+ ld a, [wMenuScrollPosition]
+ ld hl, wMenuData2Items
+ sub [hl]
+ jr nc, Function8b84b
+ xor a
+ jr Function8b84b
+; 8b83e
+
+Function8b83e: ; 8b83e
+ ld a, [wMenuScrollPosition]
+ ld hl, wMenuData2Items
+ add [hl]
+ cp $24
+ jr c, Function8b84b
+ ld a, $24
+
+Function8b84b: ; 8b84b
+ ld [wMenuScrollPosition], a
+ ld a, [wMenuCursorY]
+ ld [wMenuCursorBuffer], a
+ ret
+; 8b855
+
+Function8b855: ; 8b855
+ ld a, $28
+ ld hl, wd002
+ ld [hli], a
+ ld c, $28
+ xor a
+.asm_8b85e
+ inc a
+ ld [hli], a
+ dec c
+ jr nz, .asm_8b85e
+ ld a, $ff
+ ld [hl], a
+ ret
+; 8b867
+
+MenuDataHeader_0x8b867: ; 0x8b867
+ db $40 ; flags
+ db 03, 01 ; start coords
+ db 13, 18 ; end coords
+ dw MenuData2_0x8b870
+ db 1 ; default option
+; 0x8b86f
+
+ db 0
+
+MenuData2_0x8b870: ; 0x8b870
+ db $3c ; flags
+ db 5 ; items
+ db 3, 1
+ dbw 0, wd002
+ dba Function8b880
+ dba Function8b88c
+ dba Function8b8c8
+; 8b880
+
+Function8b880: ; 8b880
+ ld h, d
+ ld l, e
+ ld de, MenuSelection
+ lb bc, PRINTNUM_LEADINGZEROS | 1, 2
+ call PrintNum
+ ret
+; 8b88c
+
+Function8b88c: ; 8b88c
+ call OpenSRAMBank4
+ ld h, d
+ ld l, e
+ push hl
+ ld de, String_89116
+ call Function8931b
+ call Function8932d
+ jr c, .asm_8b8a3
+ ld hl, 0
+ add hl, bc
+ ld d, h
+ ld e, l
+
+.asm_8b8a3
+ pop hl
+ push hl
+ call PlaceString
+ pop hl
+ ld d, $0
+ ld e, $6
+ add hl, de
+ push hl
+ ld de, String_89116
+ call Function8931b
+ call Function8934a
+ jr c, .asm_8b8c0
+ ld hl, $0006
+ add hl, bc
+ ld d, h
+ ld e, l
+
+.asm_8b8c0
+ pop hl
+ call PlaceString
+ call CloseSRAM
+ ret
+; 8b8c8
+
+Function8b8c8: ; 8b8c8
+ hlcoord 0, 14
+ ld b, $2
+ ld c, $12
+ call TextBox
+ ld a, [wd033]
+ ld b, 0
+ ld c, a
+ ld hl, Unknown_8b903
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld d, h
+ ld e, l
+ hlcoord 1, 16
+ call PlaceString
+ hlcoord 0, 13
+ ld a, $f
+ ld [hl], a
+ hlcoord 19, 13
+ ld a, $11
+ ld [hl], a
+ ld a, [wMenuScrollPosition]
+ cp $24
+ ret c
+ hlcoord 0, 13
+ ld c, $12
+ call Function8b732
+ ret
+; 8b903
+
+Unknown_8b903: ; 8b903
+ dw String_8b90b
+ dw String_8b919
+ dw String_8b92a
+ dw String_8b938
+
+String_8b90b: db "めいしを えらんでください@" ; Please select a noun.
+String_8b919: db "どの めいしと いれかえますか?@" ; OK to swap with any noun?
+String_8b92a: db "あいてを えらんでください@" ; Please select an opponent.
+String_8b938: db "いれる ところを えらんでください@" ; Please select a location.
+; 8b94a
+
+Function8b94a: ; 8b94a
+ ld [wd033], a
+ xor a
+ ld [wMenuScrollPosition], a
+ ld [wd032], a
+ ld [wd0e3], a
+ ld [wd031], a
+ ld a, $1
+ ld [wd030], a
+ ret
+; 8b960
+
+
+Function8b960: ; 8b960 (22:7960)
+ ld hl, MenuDataHeader_0x8b9ac
+ call LoadMenuDataHeader
+ call Function8b9e9
+ jr c, .asm_8b97a
+ hlcoord 11, 0
+ ld b, $6
+ ld c, $7
+ call Function8b703
+ ld hl, MenuDataHeader_0x8b9b1
+ jr .asm_8b987
+.asm_8b97a
+ hlcoord 11, 0
+ ld b, $a
+ ld c, $7
+ call Function8b703
+ ld hl, MenuDataHeader_0x8b9ca
+.asm_8b987
+ ld a, $1
+ call Function89d5e
+ ld hl, Function8b9ab
+ call Function89d85
+ call ExitMenu
+ jr c, .asm_8b99c
+ call Function8b99f
+ jr nz, .asm_8b99d
+.asm_8b99c
+ xor a
+.asm_8b99d
+ ld c, a
+ ret
+
+Function8b99f: ; 8b99f (22:799f)
+ ld hl, wd002
+ dec a
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hl]
+ cp $ff
+ ret
+; 8b9ab (22:79ab)
+
+Function8b9ab: ; 8b9ab
+ ret
+; 8b9ac
+
+MenuDataHeader_0x8b9ac: ; 0x8b9ac
+ db $40 ; flags
+ db 00, 11 ; start coords
+ db 11, 19 ; end coords
+
+MenuDataHeader_0x8b9b1: ; 0x8b9b1
+ db $40 ; flags
+ db 00, 11 ; start coords
+ db 07, 19 ; end coords
+ dw MenuData2_0x8b9b9
+ db 1 ; default option
+; 0x8b9b9
+
+MenuData2_0x8b9b9: ; 0x8b9b9
+ db $a0 ; flags
+ db 3 ; items
+ db "へんしゅう@" ; EDIT
+ db "いれかえ@" ; REPLACE
+ db "やめる@" ; QUIT
+; 0x8b9ca
+
+MenuDataHeader_0x8b9ca: ; 0x8b9ca
+ db $40 ; flags
+ db 00, 11 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x8b9d2
+ db 1 ; default option
+; 0x8b9d2
+
+MenuData2_0x8b9d2: ; 0x8b9d2
+ db $a0 ; flags
+ db 5 ; items
+ db "みる@" ; VIEW
+ db "へんしゅう@" ; EDIT
+ db "いれかえ@" ; REPLACE
+ db "けす@" ; ERASE
+ db "やめる@" ; QUIT
+; 0x8b9e9
+
+Function8b9e9: ; 8b9e9 (22:79e9)
+ call OpenSRAMBank4
+ call Function8931b
+ call Function8932d
+ jr nc, .asm_8b9f6
+ jr .asm_8b9ff
+.asm_8b9f6
+ ld hl, $11
+ add hl, bc
+ call Function89b45
+ jr c, .asm_8ba08
+.asm_8b9ff
+ call Function892b4
+ and a
+ ld de, Unknown_8ba1c
+ jr .asm_8ba0c
+.asm_8ba08
+ ld de, Unknown_8ba1f
+ scf
+.asm_8ba0c
+ push af
+ ld hl, wd002
+.asm_8ba10
+ ld a, [de]
+ inc de
+ ld [hli], a
+ cp $ff
+ jr nz, .asm_8ba10
+ call CloseSRAM
+ pop af
+ ret
+; 8ba1c (22:7a1c)
+
+Unknown_8ba1c: ; 8b1ac
+ db 2, 4, -1
+
+Unknown_8ba1f: ; 8ba1f
+ db 1, 2, 4, 3, -1
+; 8ba24
diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm
new file mode 100644
index 000000000..fc8ea13cf
--- /dev/null
+++ b/mobile/mobile_40.asm
@@ -0,0 +1,8158 @@
+SECTION "mobile_40", ROMX
+
+Function100000: ; 100000
+; d: 1 or 2
+; e: bank
+; bc: addr
+ ld a, [rSVBK]
+ push af
+ ld a, 1
+ ld [rSVBK], a
+
+ call Function100022
+ call Function1000ba
+ call Function100675
+ call Function100057
+ call Function10016f
+ call Function100276
+
+ push bc
+ call Function100301
+ pop bc
+
+ pop af
+ ld [rSVBK], a
+ ret
+; 100022
+
+Function100022: ; 100022
+ push de
+ push bc
+ call SetRAMStateForMobile
+ pop bc
+ pop de
+ ld a, d
+ ld [wcd21], a
+ ld a, e
+ ld [wcd22], a
+ ld a, c
+ ld [wcd23], a
+ ld a, b
+ ld [wcd24], a
+ farcall Function10127e
+ farcall MobileFunc_106462
+ farcall Function106464 ; load broken gfx
+ farcall Function11615a ; init RAM
+ ld hl, VramState
+ set 1, [hl]
+ ret
+; 100057
+
+Function100057: ; 100057
+ call DisableMobile
+ call ReturnToMapFromSubmenu
+ ld hl, VramState
+ res 1, [hl]
+ ret
+; 100063
+
+SetRAMStateForMobile: ; 100063
+ xor a
+ ld hl, BGMapBuffer
+ ld bc, $65
+ call ByteFill
+ xor a
+ ld hl, wc300
+ ld bc, $100
+ call ByteFill
+ ld a, [rIE]
+ ld [BGMapBuffer], a
+ xor a
+ ld [hMapAnims], a
+ ld [hLCDCPointer], a
+ ret
+; 100082
+
+EnableMobile: ; 100082
+ xor a
+ ld hl, OverworldMap
+ ld bc, OverworldMapEnd - OverworldMap
+ call ByteFill
+
+ di
+ call DoubleSpeed
+ xor a
+ ld [rIF], a
+ ld a, 1 << VBLANK + 1 << LCD_STAT + 1 << TIMER + 1 << SERIAL
+ ld [rIE], a
+ xor a
+ ld [hMapAnims], a
+ ld [hLCDCPointer], a
+ ld a, $01
+ ld [hMobileReceive], a
+ ld [hMobile], a
+ ei
+
+ ret
+; 0x1000a4
+
+DisableMobile: ; 1000a4
+ di
+ xor a
+ ld [hMobileReceive], a
+ ld [hMobile], a
+ xor a
+ ld [hVBlank], a
+ call NormalSpeed
+ xor a
+ ld [rIF], a
+ ld a, [BGMapBuffer]
+ ld [rIE], a
+ ei
+ ret
+; 1000ba
+
+Function1000ba: ; 1000ba
+.loop
+ ; call [wcd22]:([wcd23][wcd24] + [wMobileCommsJumptableIndex])
+ ld hl, wcd23
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [wMobileCommsJumptableIndex]
+ ld e, a
+ ld d, 0
+ add hl, de
+ add hl, de
+ ld a, [wcd22]
+ call GetFarHalfword
+ ld a, [wcd22]
+ rst FarCall
+
+ call Function1000e8
+ call Function1000fa
+ call Function100144
+ call Function100163
+ ld a, [wcd2b]
+ and a
+ jr z, .loop
+ call DelayFrame
+ ret
+; 1000e8
+
+Function1000e8: ; 1000e8
+ ld hl, wcd29
+ bit 7, [hl]
+ ret z
+ farcall Function115dd3
+ ld hl, wcd29
+ set 6, [hl]
+ ret
+; 1000fa
+
+Function1000fa: ; 1000fa
+ ld a, [wc30d]
+ and a
+ ret z
+ ld hl, wcd29
+ bit 4, [hl]
+ ret z
+ ld a, [wcd2b]
+ and a
+ jr nz, .asm_100117
+ farcall Function11619d
+ ld hl, wcd29
+ set 6, [hl]
+ ret
+
+.asm_100117
+ di
+ xor a
+ ld [rIF], a
+ ld a, [rIE]
+ and $13
+ ld [rIE], a
+ xor a
+ ld [hMobileReceive], a
+ ld [hMobile], a
+ ei
+
+ ld a, [wLinkMode]
+ push af
+ xor a
+ ld [wLinkMode], a
+ ld a, $04
+ ld [wc314 + 5], a
+ farcall Function11619d
+ ld hl, wcd29
+ set 6, [hl]
+ pop af
+ ld [wLinkMode], a
+ ret
+; 100144
+
+Function100144: ; 100144
+ ld hl, wcd29
+ bit 5, [hl]
+ jr z, .asm_100155
+ res 5, [hl]
+ res 2, [hl]
+ res 6, [hl]
+ call Function100320
+ ret
+
+.asm_100155
+ bit 2, [hl]
+ ret z
+ res 2, [hl]
+ res 6, [hl]
+ farcall HDMATransferTileMapToWRAMBank3
+ ret
+; 100163
+
+Function100163: ; 100163
+ ld hl, wcd29
+ bit 6, [hl]
+ ret z
+ res 6, [hl]
+ call DelayFrame
+ ret
+; 10016f
+
+Function10016f: ; 10016f
+ ld a, [wcd2b]
+ cp $01
+ ret z
+ cp $02
+ ret z
+ cp $ff
+ jp z, .asm_1001f5
+ cp $fe
+ jr z, .asm_1001c4
+ cp $f5
+ jr z, .asm_1001e7
+ cp $f6
+ jr z, .asm_1001b6
+ cp $fa
+ jp z, .asm_1001bd
+ cp $f7
+ jp z, .asm_1001ee
+ cp $f4
+ jr z, .asm_1001d2
+ cp $f3
+ jr z, .asm_1001cb
+ cp $f1
+ jr z, .asm_1001c4
+ cp $f2
+ jr z, .asm_1001c4
+ cp $fc
+ jr z, .asm_1001e6
+ cp $fb
+ jr z, .asm_1001af
+ cp $f8
+ ret z
+ ret ; ????????????????????????????
+
+.asm_1001af
+ ld a, $d7
+ ld de, 0
+ jr .asm_1001d7
+
+.asm_1001b6
+ ld a, $d5
+ ld de, 0
+ jr .asm_1001d7
+
+.asm_1001bd
+ ld a, $d6
+ ld de, 0
+ jr .asm_1001d7
+
+.asm_1001c4
+ ld a, $d2
+ ld de, 2
+ jr .asm_1001d7
+
+.asm_1001cb
+ ld a, $d1
+ ld de, 1
+ jr .asm_1001d7
+
+.asm_1001d2
+ ld a, $d0
+ ld de, 0
+
+.asm_1001d7
+ ld [wc300], a
+ ld a, d
+ ld [wc302], a
+ ld a, e
+ ld [wc301], a
+ call Function10020b
+ ret
+
+.asm_1001e6
+ ret
+
+.asm_1001e7
+ ld de, String10025e
+ call Function100232
+ ret
+
+.asm_1001ee
+ ld de, String10024d
+ call Function100232
+ ret
+
+.asm_1001f5
+ ld a, [wcd2c]
+ ld [wc300], a
+ ld a, [wcd2d]
+ ld [wc302], a
+ ld a, [wcd2d]
+ ld [wc301], a
+ call Function10020b
+ ret
+; 10020b
+
+Function10020b: ; 10020b
+ xor a
+ ld [wc303], a
+ farcall FadeOutPalettes
+ farcall Function106464
+ call HideSprites
+ call DelayFrame
+
+ ld a, [rSVBK]
+ push af
+ ld a, $01
+ ld [rSVBK], a
+
+ farcall DisplayMobileError
+
+ pop af
+ ld [rSVBK], a
+ ret
+; 100232
+
+Function100232: ; 100232
+ push de
+ farcall Function106464
+ call Function3f20
+ call UpdateSprites
+ hlcoord 1, 2
+ pop de
+ call PlaceString
+ call Function100320
+ call JoyWaitAorB
+ ret
+; 10024d
+
+String10024d: ; 10024d
+ db "つうしんを キャンセル しました@"
+; 10025e
+
+String10025e: ; 10025e
+ db "おともだちと えらんだ へやが"
+ next "ちがうようです@"
+; 100276
+
+Function100276: ; 100276
+ ld a, [wcd2b]
+ cp $01
+ jr z, .asm_10029f
+ cp $02
+ jr z, .asm_100296
+ cp $f5
+ jr z, .asm_1002a5
+ cp $f6
+ jr z, .asm_1002a5
+ cp $f7
+ jr z, .asm_100293
+ cp $f8
+ jr z, .asm_1002b1
+ jr .asm_1002c0
+
+.asm_100293
+ ld c, $02
+ ret
+
+.asm_100296
+ farcall Script_reloadmappart
+ ld c, $04
+ ret
+
+.asm_10029f
+ call Function1002dc
+ ld c, 0
+ ret
+
+.asm_1002a5
+ farcall Script_reloadmappart
+ call Function1002ed
+ ld c, $03
+ ret
+
+.asm_1002b1
+ call Function1002c9
+ call Function1002dc
+ ld de, String10024d
+ call Function100232
+ ld c, $02
+ ret
+
+.asm_1002c0
+ call Function1002c9
+ call Function1002dc
+ ld c, $01
+ ret
+; 1002c9
+
+Function1002c9: ; 1002c9
+ ld hl, wcd2a
+ bit 0, [hl]
+ ret z
+ farcall CleanUpBattleRAM
+ farcall LoadPokemonData
+ ret
+; 1002dc
+
+Function1002dc: ; 1002dc
+ ld a, MAPSETUP_LINKRETURN
+ ld [hMapEntryMethod], a
+ farcall RunMapSetupScript
+ xor a
+ ld [hMapEntryMethod], a
+ call LoadStandardFont
+ ret
+; 1002ed
+
+Function1002ed: ; 1002ed
+ farcall LoadOW_BGPal7
+ farcall ApplyPals
+ ld a, $01
+ ld [hCGBPalUpdate], a
+ call DelayFrame
+ ret
+; 100301
+
+Function100301: ; 100301
+ ld hl, wcd2a
+ bit 1, [hl]
+ ret z
+ farcall Function106464
+ farcall Function10202c
+ farcall Function115dd3
+ call Function100320
+ call JoyWaitAorB
+ ret
+; 100320
+
+Function100320: ; 100320
+ farcall Mobile_ReloadMapPart
+ ret
+; 100327
+
+Function100327: ; 100327
+ farcall HDMATransferTileMapToWRAMBank3
+ ret
+; 100327
+
+
+Function10032e: ; 10032e
+ call Function10034d
+ ld e, a
+ ret nc
+ ld [wcd2b], a
+ ret
+; 100337
+
+Function100337: ; 100337
+ call Function10032e
+ ret c
+ ld a, [wc821]
+ bit 4, a
+ jr z, .asm_100345
+ ld a, e
+ and a
+ ret
+
+.asm_100345
+ ld a, $f9
+ ld e, a
+ ld [wcd2b], a
+ scf
+ ret
+; 10034d
+
+Function10034d: ; 10034d
+ ld a, [wc821]
+ bit 1, a
+ jr nz, .asm_10036a
+ bit 2, a
+ jr nz, .asm_10037e
+ bit 3, a
+ jr nz, .asm_100366
+ bit 0, a
+ jr nz, .asm_100364
+ ld a, $01
+ and a
+ ret
+
+.asm_100364
+ xor a
+ ret
+
+.asm_100366
+ ld a, $02
+ and a
+ ret
+
+.asm_10036a
+ ld a, 0
+ call Function3e32
+ ld [wcd2c], a
+ ld a, h
+ ld [wcd2d], a
+ ld a, l
+ ld [wcd2e], a
+ ld a, $ff
+ scf
+ ret
+
+.asm_10037e
+ ld a, $fe
+ scf
+ ret
+; 100382
+
+Function100382: ; 100382
+ ld a, [wcd27]
+ ld hl, Jumptable_10044e
+ rst JumpTable
+ ret
+; 10038a
+
+Function10038a: ; 10038a
+ ld hl, wccb4
+ ld a, $2e
+ call Function3e32
+ ret
+; 100393
+
+Function100393: ; 100393
+ ld hl, wcc60
+ ld a, $3a
+ call Function3e32
+ ret
+; 10039c
+
+Function10039c: ; 10039c
+ ld hl, wcc60
+ ld de, w3_d000
+ ld bc, $54
+ ld a, $03
+ call FarCopyWRAM
+ ret
+; 1003ab
+
+Function1003ab: ; 1003ab
+ ld hl, w3_d000
+ ld de, wcc60
+ ld bc, $54
+ ld a, $03
+ call FarCopyWRAM
+ ret
+; 1003ba
+
+Function1003ba: ; 1003ba
+ ld hl, wccb4
+ ld de, w3_d080
+ ld bc, $54
+ ld a, $03
+ call FarCopyWRAM
+ ret
+; 1003c9
+
+Function1003c9: ; 1003c9
+ ld hl, w3_d080
+ ld de, wccb4
+ ld bc, $54
+ ld a, $03
+ call FarCopyWRAM
+ ret
+; 1003d8
+
+Function1003d8: ; 1003d8
+ ld hl, wccb4
+ ld a, [hli]
+ ld c, a
+ ld b, 0
+ push hl
+ add hl, bc
+ ld a, [BGMapPalBuffer]
+ ld [hl], a
+ pop hl
+ inc bc
+ call Function10043a
+ add hl, bc
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ ld a, c
+ add $02
+ ld [wccb4], a
+ ret
+; 1003f5
+
+Function1003f5: ; 1003f5
+ ld a, [wcc60]
+ sub $03
+ ld [wcc60], a
+ ld a, [wccb4]
+ sub $03
+ ld [wccb4], a
+ ret
+; 100406
+
+Function100406: ; 100406
+ ld a, [wcc60]
+ sub $02
+ ld c, a
+ ld b, 0
+ ld hl, wcc61
+ call Function10043a
+ add hl, bc
+ ld a, [hli]
+ cp e
+ jr nz, .asm_100426
+ ld a, [hld]
+ cp d
+ jr nz, .asm_100426
+ dec hl
+ ld a, [BGMapPalBuffer]
+ cp [hl]
+ jr nz, .asm_10042d
+ xor a
+ ret
+
+.asm_100426
+ ld a, $f4
+ ld [wcd2b], a
+ jr .asm_100432
+
+.asm_10042d
+ ld a, $f3
+ ld [wcd2b], a
+
+.asm_100432
+ push hl
+ ld hl, wcd7c
+ inc [hl]
+ pop hl
+ scf
+ ret
+; 10043a
+
+Function10043a: ; 10043a
+ push hl
+ push bc
+ ld de, 0
+.asm_10043f
+ ld a, [hli]
+ add e
+ ld e, a
+ ld a, d
+ adc 0
+ ld d, a
+ dec bc
+ ld a, b
+ or c
+ jr nz, .asm_10043f
+ pop bc
+ pop hl
+ ret
+; 10044e
+
+
+Jumptable_10044e: ; 10044e (40:444e)
+ dw Function10046a
+ dw Function10047c
+ dw Function100493
+ dw Function1004ba
+ dw Function1004f4
+ dw Function1004ce
+ dw Function1004de
+ dw Function1004a4
+ dw Function100495
+ dw Function1004ce
+ dw Function1004de
+ dw Function1004e9
+ dw Function1004f4
+ dw Function1004a4
+
+Function10046a: ; 10046a
+ ld hl, BGMapPalBuffer
+ inc [hl]
+ call Function1003d8
+ call Function1003ba
+ ld a, [wcd27]
+ inc a
+ ld [wcd27], a
+ ret
+; 10047c
+
+Function10047c: ; 10047c
+ call Function100337
+ ret c
+ ret z
+ cp $02
+ jr z, .asm_100487
+ jr .asm_10048d
+
+.asm_100487
+ ld a, $08
+ ld [wcd27], a
+ ret
+
+.asm_10048d
+ ld a, $02
+ ld [wcd27], a
+ ret
+; 100493
+
+Function100493: ; 100493
+ jr asm_100497
+
+Function100495: ; 100495
+ jr asm_100497
+
+asm_100497
+ call Function100337
+ ret c
+ ret z
+ ld a, [wcd27]
+ inc a
+ ld [wcd27], a
+ ret
+; 1004a4
+
+Function1004a4: ; 1004a4
+ call Function100406
+ jr c, .asm_1004b8
+ call Function1003c9
+ call Function1003f5
+ ld a, [wcd27]
+ set 7, a
+ ld [wcd27], a
+ ret
+
+.asm_1004b8
+ scf
+ ret
+; 1004ba
+
+Function1004ba: ; 1004ba
+ call Function10038a
+ and a
+ jr nz, .asm_1004c8
+ ld a, [wcd27]
+ inc a
+ ld [wcd27], a
+ ret
+
+.asm_1004c8
+ ld a, $08
+ ld [wcd27], a
+ ret
+; 1004ce
+
+Function1004ce: ; 1004ce
+ call Function100337
+ ret c
+ ret z
+ cp $02
+ ret nz
+ ld a, [wcd27]
+ inc a
+ ld [wcd27], a
+ ret
+; 1004de
+
+Function1004de: ; 1004de
+ call Function100393
+ ld a, [wcd27]
+ inc a
+ ld [wcd27], a
+ ret
+; 1004e9
+
+Function1004e9: ; 1004e9
+ call Function10038a
+ ld a, [wcd27]
+ inc a
+ ld [wcd27], a
+ ret
+; 1004f4
+
+Function1004f4: ; 1004f4
+ call Function100337
+ ret c
+ ret z
+ ld a, [wcd27]
+ inc a
+ ld [wcd27], a
+ call Function10039c
+ ret
+; 100504
+
+Function100504: ; 100504
+ push de
+ call Function3f20
+ call UpdateSprites
+ pop de
+ hlcoord 4, 2
+ call PlaceString
+ ret
+; 100513
+
+Function100513: ; 100513
+ call Function3f7c
+ call PlaceVerticalMenuItems
+ call InitVerticalMenuCursor
+ ld hl, w2DMenuFlags1
+ set 7, [hl]
+ ret
+; 100522
+
+Function100522: ; 100522
+ ld a, [wcd28]
+ ld hl, Jumptable_10052a
+ rst JumpTable
+ ret
+; 10052a
+
+Jumptable_10052a: ; 10052a
+ dw Function100534
+ dw Function100545
+ dw Function100545
+ dw Function100545
+ dw Function10054d
+; 100534
+
+Function100534: ; 100534
+ call Function100513
+ call UpdateSprites
+ call ApplyTilemap
+ ld a, [wcd28]
+ inc a
+ ld [wcd28], a
+ ret
+; 100545
+
+Function100545: ; 100545
+ ld a, [wcd28]
+ inc a
+ ld [wcd28], a
+ ret
+; 10054d
+
+Function10054d: ; 10054d
+ farcall MobileMenuJoypad
+ ld a, c
+ ld hl, wMenuJoypadFilter
+ and [hl]
+ ret z
+ call MenuClickSound
+ bit 0, a
+ jr nz, .asm_100565
+ bit 1, a
+ jr nz, .asm_10056f
+ ret
+
+.asm_100565
+ ld a, [wcd28]
+ set 7, a
+ ld [wcd28], a
+ and a
+ ret
+
+.asm_10056f
+ ld a, [wcd28]
+ set 7, a
+ ld [wcd28], a
+ scf
+ ret
+; 100579
+
+Function100579: ; 100579
+ ld a, [wcd26]
+ ld hl, Jumptable_100581
+ rst JumpTable
+ ret
+; 100581
+
+Jumptable_100581: ; 100581
+ dw Function100585
+ dw Function100597
+; 100585
+
+Function100585: ; 100585
+ ld hl, MenuDataHeader_1005b2
+ call LoadMenuDataHeader
+ ld a, 0
+ ld [wcd28], a
+ ld a, [wcd26]
+ inc a
+ ld [wcd26], a
+
+Function100597: ; 100597
+ call Function100522
+ ld a, [wcd28]
+ bit 7, a
+ ret z
+ jr nc, .asm_1005a6
+ xor a
+ ld [wMenuCursorY], a
+
+.asm_1005a6
+ call ExitMenu
+ ld a, [wcd26]
+ set 7, a
+ ld [wcd26], a
+ ret
+; 1005b2
+
+MenuDataHeader_1005b2: ; 1005b2
+ db $40 ; flags
+ db 6, 14
+ db 10, 19
+ dw MenuData2_1005ba
+ db 1 ; default option
+
+MenuData2_1005ba:
+ db $c0 ; flags
+ db 2
+ db "はい@"
+ db "いいえ@"
+; 1005c3
+
+Function1005c3: ; 1005c3
+ ld a, [wcd26]
+ ld hl, Jumptable_1005cb
+ rst JumpTable
+ ret
+; 1005cb
+
+Jumptable_1005cb: ; 1005cb
+ dw Function1005cf
+ dw Function1005e1
+; 1005cf
+
+Function1005cf: ; 1005cf
+ ld hl, MenuDataHeader_1005fc
+ call LoadMenuDataHeader
+ ld a, 0
+ ld [wcd28], a
+ ld a, [wcd26]
+ inc a
+ ld [wcd26], a
+
+Function1005e1: ; 1005e1
+ call Function100522
+ ld a, [wcd28]
+ bit 7, a
+ ret z
+ jr nc, .asm_1005f0
+ xor a
+ ld [wMenuCursorY], a
+.asm_1005f0
+ call ExitMenu
+ ld a, [wcd26]
+ set 7, a
+ ld [wcd26], a
+ ret
+; 1005fc
+
+MenuDataHeader_1005fc: ; 1005fc
+ db $40 ; flags
+ db 6, 14
+ db 10, 19
+ dw MenuData2_100604
+ db 1 ; default option
+
+MenuData2_100604: ; 100604
+ db $c0 ; flags
+ db 2
+ db "かける@"
+ db "まつ@"
+; 10060d
+
+Mobile_CommunicationStandby: ; 10060d
+ hlcoord 3, 10
+ ld b, 1
+ ld c, 11
+ call Function3eea
+ ld de, .String
+ hlcoord 4, 11
+ call PlaceString
+ ret
+; 100621
+
+.String: ; 100621
+ db "つうしんたいきちゅう!@"
+; 10062d
+
+AdvanceMobileInactivityTimerAndCheckExpired: ; 10062d
+ push bc
+ call IncrementMobileInactivityTimerByCFrames
+ pop bc
+ ld a, [wMobileInactivityTimerMinutes]
+ cp b
+ jr nc, .timed_out
+ and a
+ ret
+
+.timed_out
+ ld a, $fa
+ ld [wcd2b], a
+ scf
+ ret
+; 100641
+
+StartMobileInactivityTimer: ; 100641
+ xor a
+ ld [wMobileInactivityTimerMinutes], a
+ ld [wMobileInactivityTimerSeconds], a
+ ld [wMobileInactivityTimerFrames], a
+ ret
+; 10064c
+
+IncrementMobileInactivityTimerBy1Frame: ; 10064c
+ ld c, 1
+IncrementMobileInactivityTimerByCFrames: ; 10064e
+ ld hl, wMobileInactivityTimerFrames ; timer?
+ ld a, [hl]
+ add c
+ cp 60
+ jr c, .seconds
+ xor a
+
+.seconds
+ ld [hld], a
+ ret c
+ ld a, [hl]
+ inc a
+ cp 60
+ jr c, .minutes
+ xor a
+
+.minutes
+ ld [hld], a
+ ret c
+ inc [hl]
+ ret
+; 100665
+
+Function100665: ; 100665
+ call UpdateTime
+ ld hl, wcd36
+ ld a, [hHours]
+ ld [hli], a
+ ld a, [hMinutes]
+ ld [hli], a
+ ld a, [hSeconds]
+ ld [hl], a
+ ret
+; 100675
+
+Function100675: ; 100675
+ ld hl, wcd2a
+ bit 2, [hl]
+ set 2, [hl]
+ ret nz
+ call Function1006d3
+ ret
+; 100681
+
+Function100681: ; 100681
+ push hl
+ ld hl, wcd2a
+ bit 2, [hl]
+ ld hl, wcd2a
+ set 2, [hl]
+ pop hl
+ jr nz, .asm_100694
+ push hl
+ call Function1006d3
+ pop hl
+.asm_100694
+ ld de, wcd32
+
+Function100697: ; 100697
+ ld a, [de]
+ and a
+ jr nz, .asm_1006bb
+ inc de
+ push de
+ call .asm_1006b4
+ ld de, String1006c2
+ call PlaceString
+ ld h, b
+ ld l, c
+ pop de
+ inc de
+ call .asm_1006b4
+ ld de, String1006c6
+ call PlaceString
+ ret
+
+.asm_1006b4
+ lb bc, PRINTNUM_LEADINGZEROS | 1, 2
+ call PrintNum
+ ret
+
+.asm_1006bb
+ ld de, String1006ca
+ call PlaceString
+ ret
+; 1006c2
+
+String1006c2: ; 1006c2
+ db "ふん @"
+String1006c6: ; 1006c6
+ db "びょう@"
+String1006ca: ; 1006ca
+ db "1じかんいじょう@"
+; 1006d3
+
+Function1006d3: ; 1006d3
+ call UpdateTime
+ ld de, wcd34
+ ld hl, wcd38
+
+Function1006dc: ; 1006dc
+ ld a, [hld]
+ ld c, a
+ ld a, [hSeconds]
+ sub c
+ jr nc, .asm_1006e5
+ add $3c
+
+.asm_1006e5
+ ld [de], a
+ dec de
+ ld a, [hld]
+ ld c, a
+ ld a, [hMinutes]
+ sbc c
+ jr nc, .asm_1006f0
+ add $3c
+
+.asm_1006f0
+ ld [de], a
+ dec de
+ ld a, [hl]
+ ld c, a
+ ld a, [hHours]
+ sbc c
+ jr nc, .asm_1006fb
+ add $18
+
+.asm_1006fb
+ ld [de], a
+ ret
+; 1006fd
+
+Function1006fd: ; 1006fd
+ ld a, $04
+ ld hl, $a800
+ call GetSRAMBank
+ xor a
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ call CloseSRAM
+ ret
+; 10070d
+
+Function10070d: ; 10070d
+ ld a, $04
+ ld hl, $a800
+ call GetSRAMBank
+ xor a
+ ld [hli], a
+ ld a, $0a
+ ld [hli], a
+ xor a
+ ld [hli], a
+ call CloseSRAM
+ ret
+; 100720
+
+Function100720: ; 100720
+ xor a
+ ld [wcd6a], a
+ call UpdateTime
+ ld a, [hHours]
+ ld [wcd72], a
+ ld a, [hMinutes]
+ ld [wcd73], a
+ ld a, [hSeconds]
+ ld [wcd74], a
+ ld a, $04
+ ld hl, $a800
+ call GetSRAMBank
+ ld a, [hli]
+ ld [wcd6c], a
+ ld a, [hli]
+ ld [wcd6d], a
+ ld a, [hli]
+ ld [wcd6e], a
+ call CloseSRAM
+ ld a, [wcd6d]
+ ld [wcd6b], a
+ ret
+; 100754
+
+Function100754: ; 100754
+ call UpdateTime
+ ld a, [hHours]
+ ld [wcd72], a
+ ld a, [hMinutes]
+ ld [wcd73], a
+ ld a, [hSeconds]
+ ld [wcd74], a
+ ld a, [wcd6d]
+ ld [wcd6b], a
+ ld hl, wcd2a
+ res 6, [hl]
+ ret
+; 100772
+
+Function100772: ; 100772
+ push de
+ ld hl, wcd6c
+ ld a, [de]
+ cp [hl]
+ jr c, .asm_10079a
+ jr nz, .asm_10078c
+ inc hl
+ inc de
+ ld a, [de]
+ cp [hl]
+ jr c, .asm_10079a
+ jr nz, .asm_10078c
+ inc hl
+ inc de
+ ld a, [de]
+ cp [hl]
+ jr c, .asm_10079a
+ jr z, .asm_10079a
+
+.asm_10078c
+ pop hl
+ ld a, [hli]
+ ld [wcd6c], a
+ ld a, [hli]
+ ld [wcd6d], a
+ ld a, [hli]
+ ld [wcd6e], a
+ ret
+
+.asm_10079a
+ pop de
+ ret
+; 10079c
+
+
+Function10079c: ; 10079c
+ ld a, [wcd21]
+ cp $01
+ jr nz, .dont_quit
+ ld hl, wcd2a
+ bit 5, [hl]
+ jr nz, .dont_quit
+ ld hl, wcd2a
+ bit 6, [hl]
+ jr nz, .dont_quit
+ ld a, [wcd6a]
+ add c
+ cp 60
+ jr nc, .overflow
+ ld [wcd6a], a
+ and a
+ ret
+
+.overflow
+ sub 60
+ ld [wcd6a], a
+ ld d, b
+ push de
+ call Function1007f6
+ pop de
+ jr c, .quit
+ ld a, c
+ and a
+ jr nz, .quit
+ ld a, b
+ cp 10
+ jr nc, .quit
+ ld a, d
+ and a
+ ret z
+ ld a, [wcd6b]
+ cp b
+ ret z
+ ld a, b
+ ld [wcd6b], a
+ call Function1008e0
+ and a
+ ret
+
+.quit
+ call Function1008e0
+ ld hl, wcd2a
+ set 4, [hl]
+ ld a, $fc
+ ld [wcd2b], a
+ scf
+ ret
+
+.dont_quit
+ and a
+ ret
+; 1007f6
+
+Function1007f6: ; 1007f6
+ call UpdateTime
+ ld hl, wcd74
+ ld de, wcd71
+ call Function1006dc
+ ld a, $04
+ call GetSRAMBank
+ ld hl, $a802
+ call Function100826
+ call CloseSRAM
+ ld hl, wcd6e
+ call Function100826
+ ld a, [hHours]
+ ld [wcd72], a
+ ld a, [hMinutes]
+ ld [wcd73], a
+ ld a, [hSeconds]
+ ld [wcd74], a
+ ret
+; 100826
+
+Function100826: ; 100826
+ ld a, [wcd71]
+ add [hl]
+ sub $3c
+ jr nc, .asm_100830
+ add $3c
+
+.asm_100830
+ ld [hld], a
+ ccf
+ ld a, [BGMapBufferPtrs]
+ adc [hl]
+ sub $3c
+ jr nc, .asm_10083c
+ add $3c
+
+.asm_10083c
+ ld [hld], a
+ ld b, a
+ ccf
+ ld a, [wcd6f]
+ adc [hl]
+ ld [hl], a
+ ld c, a
+ ret
+; 100846
+
+Function100846: ; 100846
+ ld hl, wcd2a
+ bit 5, [hl]
+ jr nz, .asm_10087c
+ ld a, [wcd6e]
+ ld c, a
+ ld a, 0
+ sub c
+ jr nc, .asm_100858
+ add $3c
+
+.asm_100858
+ ld [StringBuffer2 + 2], a
+ ld a, [wcd6d]
+ ld c, a
+ ld a, $0a
+ sbc c
+ ld [StringBuffer2 + 1], a
+ xor a
+ ld [StringBuffer2], a
+ ld de, String_10088e
+ hlcoord 1, 14
+ call PlaceString
+ ld de, StringBuffer2
+ hlcoord 4, 16
+ call Function100697
+ ret
+
+.asm_10087c
+ ld de, String_10088e
+ hlcoord 1, 14
+ call PlaceString
+ ld h, b
+ ld l, c
+ ld de, String_10089f
+ call PlaceString
+ ret
+; 10088e
+
+String_10088e: ; 10088e
+ db "モバイルたいせん できる"
+ next "じかん@"
+; 10089f
+
+String_10089f: ; 10089f
+ db " むせいげん@"
+; 1008a6
+
+Function1008a6: ; 1008a6
+ ld a, $04
+ ld hl, $a800
+ call GetSRAMBank
+ ld a, [hli]
+ ld [StringBuffer2], a
+ ld a, [hli]
+ ld [StringBuffer2 + 1], a
+ ld a, [hli]
+ ld [StringBuffer2 + 2], a
+ call CloseSRAM
+ ld a, [StringBuffer2 + 2]
+ ld b, a
+ ld a, 0
+ sub b
+ jr nc, .asm_1008c8
+ add $3c
+
+.asm_1008c8
+ ld b, a
+ ld a, [StringBuffer2 + 1]
+ ld c, a
+ ld a, $0a
+ sbc c
+ ld c, a
+ jr c, .asm_1008da
+ ld a, [StringBuffer2]
+ and a
+ jr nz, .asm_1008da
+ ret
+
+.asm_1008da
+ call Function10070d
+ ld c, 0
+ ret
+; 1008e0
+
+
+Function1008e0: ; 1008e0
+ ld a, [hBGMapMode]
+ ld b, a
+ ld a, [hVBlank]
+ ld c, a
+ push bc
+ xor a
+ ld [hBGMapMode], a
+ ld a, $03
+ ld [hVBlank], a
+ call Function100970
+ call Function100902
+ call Function100989
+ call DelayFrame
+ pop bc
+ ld a, c
+ ld [hVBlank], a
+ ld a, b
+ ld [hBGMapMode], a
+ ret
+; 100902
+
+Function100902: ; 100902
+ hlcoord 3, 10
+ ld b, $01
+ ld c, $0b
+ call TextBox
+ ld a, [wcd6d]
+ ld c, a
+ ld a, $0a
+ sub c
+ ld [StringBuffer2], a
+ jr z, .asm_10093f
+ ld de, .string_100966
+ hlcoord 4, 11
+ call PlaceString
+ hlcoord 8, 11
+ lb bc, 1, 2
+ ld de, StringBuffer2
+ call PrintNum
+ ld de, SFX_TWO_PC_BEEPS
+ call PlaySFX
+ farcall ReloadMapPart
+ ld c, $3c
+ call DelayFrames
+ ret
+
+.asm_10093f
+ ld de, .string_10095a
+ hlcoord 4, 11
+ call PlaceString
+ ld de, SFX_4_NOTE_DITTY
+ call PlaySFX
+ farcall ReloadMapPart
+ ld c, 120
+ call DelayFrames
+ ret
+; 10095a
+
+.string_10095a ; 10095a
+ db "たいせん しゅうりょう@"
+.string_100966 ; 100966
+ db "のこり ふん", $e7, "@"
+; 100970
+
+
+Function100970: ; 100970
+ hlcoord 0, 0
+ ld de, w3_dc00
+ call Function1009a5
+ hlcoord 0, 0, AttrMap
+ ld de, w3_dd68
+ call Function1009a5
+ call Function1009d2
+ call Function1009ae
+ ret
+; 100989
+
+Function100989: ; 100989
+ ld hl, w3_dc00
+ decoord 0, 0
+ call Function1009a5
+ call Function1009ae
+ farcall ReloadMapPart
+ ld hl, w3_dd68
+ decoord 0, 0, AttrMap
+ call Function1009a5
+ ret
+; 1009a5
+
+Function1009a5: ; 1009a5
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ ld a, $03
+ call FarCopyWRAM
+ ret
+; 1009ae
+
+Function1009ae: ; 1009ae
+ ld a, [rSVBK]
+ push af
+ ld a, $03
+ ld [rSVBK], a
+
+ ld hl, w3_d800
+ decoord 0, 0, AttrMap
+ ld c, SCREEN_WIDTH
+ ld b, SCREEN_HEIGHT
+.loop_row
+ push bc
+.loop_col
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .loop_col
+ ld bc, BG_MAP_WIDTH - SCREEN_WIDTH
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .loop_row
+
+ pop af
+ ld [rSVBK], a
+ ret
+; 1009d2
+
+Function1009d2: ; 1009d2
+ ld a, [rSVBK]
+ push af
+ ld a, $03
+ ld [rSVBK], a
+
+ ld a, [rVBK]
+ push af
+ ld a, $01
+ ld [rVBK], a
+
+ ld hl, w3_d800
+ debgcoord 0, 0
+ lb bc, $03, $24
+ call Get2bpp
+
+ pop af
+ ld [rVBK], a
+
+ pop af
+ ld [rSVBK], a
+ ret
+; 1009f3
+
+Function1009f3: ; 1009f3
+ ld a, [hJoyDown]
+ and SELECT + A_BUTTON
+ cp SELECT + A_BUTTON
+ jr nz, .select_a
+ ld hl, wcd2a
+ set 4, [hl]
+ ld a, $f8
+ ld [wcd2b], a
+ scf
+ ret
+
+.select_a
+ xor a
+ ret
+; 100a09
+
+_LinkBattleSendReceiveAction: ; 100a09
+ call .StageForSend
+ ld [wd431], a
+ farcall PlaceWaitingText
+ ld a, [wLinkMode]
+ cp LINK_MOBILE
+ jr nz, .not_mobile
+
+ call .MobileBattle_SendReceiveAction
+ call Function100da5
+ farcall FinishBattleAnim
+ jr .done
+
+.not_mobile
+ call .LinkBattle_SendReceiveAction
+
+.done
+ ret
+; 100a2e
+
+.StageForSend: ; 100a2e
+ ld a, [wPlayerAction]
+ and a
+ jr nz, .switch
+ ld a, [CurPlayerMove]
+ ld b, BATTLEACTION_E
+ cp STRUGGLE
+ jr z, .struggle
+ ld b, BATTLEACTION_D
+ cp $ff
+ jr z, .struggle
+ ld a, [CurMoveNum]
+ jr .use_move
+
+.switch
+ ld a, [CurPartyMon]
+ add BATTLEACTION_SWITCH1
+ jr .use_move
+
+.struggle
+ ld a, b
+
+.use_move
+ and $0f
+ ret
+; 100a53
+
+.LinkBattle_SendReceiveAction: ; 100a53
+ ld a, [wd431]
+ ld [wPlayerLinkAction], a
+ ld a, $ff
+ ld [wOtherPlayerLinkAction], a
+.waiting
+ call LinkTransfer
+ call DelayFrame
+ ld a, [wOtherPlayerLinkAction]
+ inc a
+ jr z, .waiting
+
+ ld b, 10
+.receive
+ call DelayFrame
+ call LinkTransfer
+ dec b
+ jr nz, .receive
+
+ ld b, 10
+.acknowledge
+ call DelayFrame
+ call LinkDataReceived
+ dec b
+ jr nz, .acknowledge
+
+ ld a, [wOtherPlayerLinkAction]
+ ld [wBattleAction], a
+ ret
+; 100a87
+
+.MobileBattle_SendReceiveAction: ; 100a87
+ call Function100acf
+ call StartMobileInactivityTimer
+ ld a, 0
+ ld [wcd27], a
+.asm_100a92
+ call DelayFrame
+ call GetJoypad
+ farcall Function100382
+ ld c, $01
+ ld b, $03
+ push bc
+ call AdvanceMobileInactivityTimerAndCheckExpired
+ pop bc
+ jr c, .asm_100ac7
+ ld b, $01
+ call Function10079c
+ jr c, .asm_100ac7
+ call Function1009f3
+ jr c, .asm_100ac7
+ ld a, [wcd2b]
+ and a
+ jr nz, .asm_100ac7
+ ld a, [wcd27]
+ bit 7, a
+ jr z, .asm_100a92
+ call Function100ae7
+ jr .asm_100ace
+
+.asm_100ac7
+ ld a, $0f
+ ld [wd430], a
+ jr .asm_100ace
+
+.asm_100ace
+ ret
+; 100acf
+
+Function100acf: ; 100acf
+ ld de, Unknown_100b0a
+ ld hl, wccb5
+ ld a, [wd431]
+ ld [hli], a
+ ld c, $01
+.asm_100adb
+ ld a, [de]
+ inc de
+ ld [hli], a
+ inc c
+ and a
+ jr nz, .asm_100adb
+ ld a, c
+ ld [wccb4], a
+ ret
+; 100ae7
+
+Function100ae7: ; 100ae7
+ ld de, Unknown_100b0a
+ ld hl, wcc62
+.asm_100aed
+ ld a, [de]
+ inc de
+ and a
+ jr z, .asm_100af8
+ cp [hl]
+ jr nz, .asm_100aff
+ inc hl
+ jr .asm_100aed
+
+.asm_100af8
+ ld a, [wcc61]
+ ld [wd430], a
+ ret
+
+.asm_100aff
+ ld a, $0f
+ ld [wd430], a
+ ld a, $f1
+ ld [wcd2b], a
+ ret
+; 100b0a
+
+
+SECTION "tetsuji", ROMX
+
+ charmap " ", $20 ; revert to ascii
+
+Unknown_100b0a: ; 100b0a
+ db "tetsuji", 0
+; 100b12
+
+
+SECTION "bank40_2", ROMX
+
+Function100b12: ; 100b12
+ call Function100dd8
+ ret c
+ ld hl, BattleMenuDataHeader
+ ld a, BANK(BattleMenuDataHeader)
+ ld de, LoadMenuDataHeader
+ call FarCall_de
+ ld a, BANK(BattleMenuDataHeader)
+ ld [wMenuData2_2DMenuItemStringsBank], a
+ ld a, [wBattleMenuCursorBuffer]
+ ld [wMenuCursorBuffer], a
+ call Function100e72
+ call Function100b45
+ farcall InitPartyMenuBGPal7
+ call Function100ed4
+ ld a, [wMenuCursorBuffer]
+ ld [wBattleMenuCursorBuffer], a
+ call ExitMenu
+ ret
+; 100b45
+
+Function100b45: ; 100b45
+ call Function100b7a
+.loop
+ call Mobile_SetOverworldDelay
+ farcall MobileMenuJoypad
+ push bc
+ farcall HDMATransferTileMapToWRAMBank3
+ call Function100e2d
+ pop bc
+ jr c, .asm_100b6b
+ ld a, [wMenuJoypadFilter]
+ and c
+ jr z, .loop
+ farcall Mobile_GetMenuSelection
+ ret
+
+.asm_100b6b
+ ld a, [w2DMenuNumCols]
+ ld c, a
+ ld a, [w2DMenuNumRows]
+ call SimpleMultiply
+ ld [wMenuCursorBuffer], a
+ and a
+ ret
+; 100b7a
+
+Function100b7a: ; 100b7a
+ ld hl, CopyMenuData2
+ ld a, [wMenuData2_2DMenuItemStringsBank]
+ rst FarCall
+ farcall Draw2DMenu
+ farcall MobileTextBorder
+ call UpdateSprites
+ call ApplyTilemap
+ farcall Init2DMenuCursorPosition
+ ld hl, w2DMenuFlags1
+ set 7, [hl]
+ ret
+; 100b9f
+
+MobileMoveSelectionScreen: ; 100b9f
+ xor a
+ ld [wMoveSwapBuffer], a
+ farcall CheckPlayerHasUsableMoves
+ ret z
+ call Function100dd8
+ jp c, xor_a_dec_a
+ call Function100e72
+ call .GetMoveSelection
+ push af
+ farcall InitPartyMenuBGPal7
+ call Function100ed4
+ pop af
+ ret
+; 100bc2
+
+.GetMoveSelection: ; 100bc2
+ xor a
+ ld [hBGMapMode], a
+ call Function100c74
+ call Function100c98
+.master_loop
+ farcall MoveInfoBox
+.loop
+ call Mobile_SetOverworldDelay
+ farcall MobileMenuJoypad
+ push bc
+ farcall HDMATransferTileMapToWRAMBank3
+ call Function100e2d
+ pop bc
+ jr c, .b_button
+ ld a, [wMenuJoypadFilter]
+ and c
+ bit D_UP_F, a
+ jp nz, .d_up
+ bit D_DOWN_F, a
+ jp nz, .d_down
+ bit A_BUTTON_F, a
+ jr nz, .a_button
+ bit B_BUTTON_F, a
+ jr nz, .b_button
+ jr .loop
+
+.d_up
+ ld a, [wMenuCursorY]
+ and a
+ jp nz, .master_loop
+ ld a, [wNumMoves]
+ inc a
+ ld [wMenuCursorY], a
+ jp .master_loop
+
+.d_down
+ ld a, [wMenuCursorY]
+ ld b, a
+ ld a, [wNumMoves]
+ inc a
+ inc a
+ cp b
+ jp nz, .master_loop
+ ld a, $01
+ ld [wMenuCursorY], a
+ jp .master_loop
+
+.b_button
+ ld a, [wMenuCursorY]
+ dec a
+ ld [CurMoveNum], a
+ ld a, $01
+ and a
+ ret
+
+.a_button
+ ld a, [wMenuCursorY]
+ dec a
+ ld [CurMoveNum], a
+ ld a, [wMenuCursorY]
+ dec a
+ ld c, a
+ ld b, 0
+ ld hl, BattleMonPP
+ add hl, bc
+ ld a, [hl]
+ and $3f
+ jr z, .no_pp_left
+ ld a, [PlayerDisableCount]
+ swap a
+ and $0f
+ dec a
+ cp c
+ jr z, .move_disabled
+ ld a, [wMenuCursorY]
+ dec a
+ ld c, a
+ ld b, 0
+ ld hl, BattleMonMoves
+ add hl, bc
+ ld a, [hl]
+ ld [CurPlayerMove], a
+ xor a
+ ret
+
+.move_disabled
+ ld hl, BattleText_TheMoveIsDisabled
+ jr .print_text
+
+.no_pp_left
+ ld hl, BattleText_TheresNoPPLeftForThisMove
+
+.print_text
+ call StdBattleTextBox
+ call Call_LoadTempTileMapToTileMap
+ jp .GetMoveSelection
+; 100c74
+
+Function100c74: ; 100c74
+ hlcoord 0, 8
+ ld b, 8
+ ld c, 8
+ call TextBox
+ ld hl, BattleMonMoves
+ ld de, wListMoves_MoveIndicesBuffer
+ ld bc, NUM_MOVES
+ call CopyBytes
+ ld a, SCREEN_WIDTH * 2
+ ld [Buffer1], a
+ hlcoord 2, 10
+ predef ListMoves
+ ret
+; 100c98
+
+Function100c98: ; 100c98
+ ld de, .attrs
+ call SetMenuAttributes
+ ld a, [wNumMoves]
+ inc a
+ ld [w2DMenuNumRows], a
+ ld a, [CurMoveNum]
+ inc a
+ ld [wMenuCursorY], a
+ ret
+; 100cad
+
+.attrs ; 100cad
+ db 10, 1
+ db 255, 1
+ db $a0, $00
+ dn 2, 0
+ db D_UP | D_DOWN | A_BUTTON | B_BUTTON
+
+Mobile_PartyMenuSelect: ; 100cb5
+ call Function100dd8
+ ret c
+ ld hl, w2DMenuFlags1
+ set 7, [hl]
+ res 6, [hl]
+.loop
+ call Mobile_SetOverworldDelay
+ farcall MobileMenuJoypad
+ push bc
+ farcall PlaySpriteAnimations
+ farcall HDMATransferTileMapToWRAMBank3
+ call MobileComms_CheckInactivityTimer
+ pop bc
+ jr c, .done
+ ld a, [wMenuJoypadFilter]
+ and c
+ jr z, .loop
+ call PlaceHollowCursor
+ ld a, [PartyCount]
+ inc a
+ ld b, a
+ ld a, [wMenuCursorY]
+ cp b
+ jr z, .done
+ ld [wPartyMenuCursor], a
+ ld a, [hJoyLast]
+ ld b, a
+ bit 1, b
+ jr nz, .done
+ ld a, [wMenuCursorY]
+ dec a
+ ld [CurPartyMon], a
+ ld c, a
+ ld b, 0
+ ld hl, PartySpecies
+ add hl, bc
+ ld a, [hl]
+ ld [CurPartySpecies], a
+ ld de, SFX_READ_TEXT_2
+ call PlaySFX
+ call WaitSFX
+ and a
+ ret
+
+.done
+ ld de, SFX_READ_TEXT_2
+ call PlaySFX
+ call WaitSFX
+ scf
+ ret
+; 100d22
+
+MobileBattleMonMenu: ; 100d22
+ call Function100dd8
+ ret c
+ call Function100d67
+ ld hl, w2DMenuFlags1
+ set 7, [hl]
+ res 6, [hl]
+.asm_100d30
+ call Mobile_SetOverworldDelay
+ farcall MobileMenuJoypad
+ push bc
+ farcall PlaySpriteAnimations
+ farcall HDMATransferTileMapToWRAMBank3
+ call MobileComms_CheckInactivityTimer
+ pop bc
+ jr c, .asm_100d54
+ ld a, [wMenuJoypadFilter]
+ and c
+ jr nz, .asm_100d56
+ jr .asm_100d30
+
+.asm_100d54
+ scf
+ ret
+
+.asm_100d56
+ push af
+ ld de, SFX_READ_TEXT_2
+ call PlaySFX
+ pop af
+ bit 1, a
+ jr z, .asm_100d65
+ ret z
+ scf
+ ret
+
+.asm_100d65
+ and a
+ ret
+; 100d67
+
+Function100d67: ; 100d67
+ ld hl, .MenuDataHeader
+ call CopyMenuDataHeader
+ xor a
+ ld [hBGMapMode], a
+ call MenuBox
+ call UpdateSprites
+ call PlaceVerticalMenuItems
+ call WaitBGMap
+ call CopyMenuData2
+ call InitVerticalMenuCursor
+ ld hl, w2DMenuFlags1
+ set 6, [hl]
+ ret
+; 100d88
+
+.MenuDataHeader: ; 100d88
+ db 0 ; flags
+ db 11, 11 ; start coords
+ db 17, 19 ; end coords
+ dw .MenuData2
+ db 1 ; default option
+
+.MenuData2: ; 100d90
+ db $c0 ; flags
+ db 3
+ db "いれかえる@" ; TRADE
+ db "つよさをみる@" ; STATS
+ db "キャンセル@" ; CANCEL
+; 100da5
+
+Function100da5: ; 100da5
+ ld hl, wcd2a
+ res 3, [hl]
+ ld hl, wcd29
+ res 0, [hl]
+ ret
+; 100db0
+
+Function100db0: ; 100db0
+ ld hl, wcd2a
+ bit 3, [hl]
+ jr nz, .asm_100dbe
+ ld hl, wcd2a
+ set 3, [hl]
+ scf
+ ret
+
+.asm_100dbe
+ xor a
+ ret
+; 100dc0
+
+
+
+Function100dc0: ; 100dc0
+ ld a, [wLinkMode]
+ cp LINK_MOBILE
+ jr nz, .mobile
+ ld hl, wcd2a
+ bit 3, [hl]
+ jr z, .mobile
+ scf
+ ret
+
+.mobile
+ xor a
+ ret
+; 100dd2
+
+Mobile_SetOverworldDelay: ; 100dd2
+ ld a, 30
+ ld [OverworldDelay], a
+ ret
+; 100dd8
+
+Function100dd8: ; 100dd8
+ ld c, $01
+ ld b, $03
+ farcall AdvanceMobileInactivityTimerAndCheckExpired
+ jr c, .asm_100dfb
+ ld c, $3c
+ ld b, $01
+ call Function10079c
+ jr c, .asm_100dfb
+ farcall Function10032e
+ ld a, [wcd2b]
+ and a
+ jr nz, .asm_100dfb
+ xor a
+ ret
+
+.asm_100dfb
+ scf
+ ret
+; 100dfd
+
+MobileComms_CheckInactivityTimer: ; 100dfd
+ ld a, [OverworldDelay]
+ ld c, a
+ ld a, 30
+ sub c
+ ld c, a
+ ld b, 3
+ push bc
+ farcall AdvanceMobileInactivityTimerAndCheckExpired ; useless to farcall
+ pop bc
+ jr c, .quit
+ ld b, 1
+ call Function10079c
+ jr c, .quit
+ call Function1009f3
+ jr c, .quit
+ farcall Function10032e ; useless to farcall
+ ld a, [wcd2b]
+ and a
+ jr nz, .quit
+ xor a
+ ret
+
+.quit
+ scf
+ ret
+; 100e2d
+
+Function100e2d: ; 100e2d
+ ld a, [OverworldDelay]
+ ld c, a
+ ld a, 30
+ sub c
+ ld c, a
+ ld b, 3
+ push bc
+ farcall AdvanceMobileInactivityTimerAndCheckExpired
+ pop bc
+ jr c, .asm_100e61
+ ld b, 1
+ call Function10079c
+ jr c, .asm_100e61
+ call Function1009f3
+ jr c, .asm_100e61
+ farcall Function10032e
+ ld a, [wcd2b]
+ and a
+ jr nz, .asm_100e61
+ call Function100e63
+ call Function100e84
+ xor a
+ ret
+
+.asm_100e61
+ scf
+ ret
+; 100e63
+
+Function100e63: ; 100e63
+ ld a, e
+ cp $02
+ ret nz
+ call Function100db0
+ ret nc
+ ld de, SFX_ELEVATOR_END
+ call PlaySFX
+ ret
+; 100e72
+
+Function100e72: ; 100e72
+ xor a
+ ld hl, wcd29
+ bit 0, [hl]
+ jr z, .asm_100e7c
+ ld a, $0a
+
+.asm_100e7c
+ ld [wcd67], a
+ xor a
+ ld [wcd68], a
+ ret
+; 100e84
+
+Function100e84: ; 100e84
+ ld a, [wcd67]
+ ld hl, Jumptable_100e8c
+ rst JumpTable
+ ret
+; 100e8c
+
+
+Jumptable_100e8c: ; 100e8c (40:4e8c)
+ dw Function100ea2
+ dw Function100eae
+ dw Function100eb4
+ dw Function100eae
+ dw Function100eb4
+ dw Function100eae
+ dw Function100eb4
+ dw Function100eae
+ dw Function100eb4
+ dw Function100eae
+ dw Function100ec4
+
+
+Function100ea2: ; 100ea2 (40:4ea2)
+ call Function100dc0
+ ret nc
+ ld hl, wcd29
+ set 0, [hl]
+ call Function100ec5
+
+
+Function100eae: ; 100eae
+ scf
+ call Function100eca
+ jr asm_100eb8
+
+Function100eb4: ; 100eb4
+ and a
+ call Function100eca
+
+asm_100eb8
+ ld hl, wcd68
+ inc [hl]
+ ld a, [hl]
+ cp $02
+ ret c
+ ld [hl], 0
+ jr Function100ec5
+
+Function100ec4: ; 100ec4
+ ret
+
+Function100ec5
+ ld hl, wcd67
+ inc [hl]
+ ret
+; 100eca
+
+Function100eca: ; 100eca
+ farcall Mobile_InitPartyMenuBGPal7
+ call Function100ed4
+ ret
+; 100ed4
+
+Function100ed4: ; 100ed4
+ farcall ApplyPals
+ ld a, $01
+ ld [hCGBPalUpdate], a
+ ret
+; 100edf
+
+Function100edf: ; 100edf
+ ld hl, Unknown_100fc0
+ ld c, 1
+ jr asm_100f02
+
+Function100ee6: ; 100ee6
+ ld hl, Unknown_100fc0
+ ld c, 2
+ jr asm_100f02
+
+Function100eed: ; 100eed
+ ld hl, Unknown_100feb
+ ld c, 1
+ jr asm_100f02
+
+Function100ef4: ; 100ef4
+ ld hl, Unknown_100ff3
+ ld c, 1
+ jr asm_100f02
+
+Function100efb: ; 100efb
+ ld hl, Unknown_10102c
+ ld c, 1
+ jr asm_100f02
+
+asm_100f02:
+ ld a, c
+ ld [StringBuffer2], a
+ ; someting that was previously stored in de gets backed up to here
+ ld a, e
+ ld [StringBuffer2 + 1], a
+ ld a, d
+ ld [StringBuffer2 + 2], a
+ ; empty this
+ xor a
+ ld [StringBuffer2 + 4], a
+ ld [StringBuffer2 + 5], a
+.loop
+ ld a, [hl]
+ cp $ff
+ jr z, .done
+ ld [StringBuffer2 + 3], a ; bank
+ push hl
+ inc hl
+ ; addr 1
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ; size
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ; addr 2
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ call Function100f3d
+ ; next line
+ pop hl
+ ld de, 7
+ add hl, de
+ jr .loop
+
+.done
+ ; recover the values into bc
+ ld a, [StringBuffer2 + 4]
+ ld c, a
+ ld a, [StringBuffer2 + 5]
+ ld b, a
+ ret
+; 100f3d
+
+Function100f3d: ; 100f3d
+ ; parameter
+ ld a, [StringBuffer2]
+ cp $02
+ jr z, .two
+ cp $01
+ jr z, .one
+ cp $03
+ jr z, .three
+ ret
+
+.three
+ ; what was once in de gets copied to hl,
+ ; modified by Function100f8d, and put back
+ ; into this backup
+ ld a, [StringBuffer2 + 1]
+ ld l, a
+ ld a, [StringBuffer2 + 2]
+ ld h, a
+ call Function100f8d
+ ld a, l
+ ld [StringBuffer2 + 1], a
+ ld a, h
+ ld [StringBuffer2 + 2], a
+ ret
+
+.two
+ ; hl gets backed up to de, then
+ ; do the same as in .three
+ ld d, h
+ ld e, l
+ ld a, [StringBuffer2 + 1]
+ ld l, a
+ ld a, [StringBuffer2 + 2]
+ ld h, a
+ call Function100f8d
+ ld a, l
+ ld [StringBuffer2 + 1], a
+ ld a, h
+ ld [StringBuffer2 + 2], a
+ ret
+
+.one
+ ; de gets copied to hl, then
+ ; load the backup into de,
+ ; finally run Function100f8d
+ ; and store the de result
+ ld h, d
+ ld l, e
+ ld a, [StringBuffer2 + 1]
+ ld e, a
+ ld a, [StringBuffer2 + 2]
+ ld d, a
+ call Function100f8d
+ ld a, e
+ ld [StringBuffer2 + 1], a
+ ld a, d
+ ld [StringBuffer2 + 2], a
+ ret
+; 100f8d
+
+Function100f8d: ; 100f8d
+ push hl
+ ld a, [StringBuffer2 + 4]
+ ld l, a
+ ld a, [StringBuffer2 + 5]
+ ld h, a
+ add hl, bc
+ ld a, l
+ ld [StringBuffer2 + 4], a
+ ld a, h
+ ld [StringBuffer2 + 5], a
+ pop hl
+ ld a, [StringBuffer2 + 3]
+ bit 7, a
+ res 7, a
+ jr z, .sram
+ and a
+ jr nz, .far_wram
+ call CopyBytes
+ ret
+
+.far_wram
+ and $7f
+ call FarCopyWRAM
+ ret
+
+.sram
+ call GetSRAMBank
+ call CopyBytes
+ call CloseSRAM
+ ret
+; 100fc0
+
+Unknown_100fc0: ; 100fc0
+ ; first byte:
+ ; Bit 7 set: Not SRAM
+ ; Lower 7 bits: Bank
+ ; Address, size (dw), address
+ dbwww $80, PlayerName, NAME_LENGTH, OTPlayerName
+ dbwww $80, PartyCount, 1 + PARTY_LENGTH + 1, OTPartyCount
+ dbwww $80, PlayerID, 2, OTPlayerID
+ dbwww $80, PartyMons, PARTYMON_STRUCT_LENGTH * PARTY_LENGTH, OTPartyMons
+ dbwww $80, PartyMonOT, NAME_LENGTH * PARTY_LENGTH, OTPartyMonOT
+ dbwww $80, PartyMonNicknames, PKMN_NAME_LENGTH * PARTY_LENGTH, OTPartyMonNicknames
+ db -1
+
+Unknown_100feb: ; 100feb
+ dbwww $00, sPartyMail, MAIL_STRUCT_LENGTH * PARTY_LENGTH, NULL
+ db -1
+
+Unknown_100ff3: ; 100ff3
+ dbwww $80, wdc41, 1, NULL
+ dbwww $80, PlayerName, NAME_LENGTH, NULL
+ dbwww $80, PlayerName, NAME_LENGTH, NULL
+ dbwww $80, PlayerID, 2, NULL
+ dbwww $80, wSecretID, 2, NULL
+ dbwww $80, PlayerGender, 1, NULL
+ dbwww $04, $a603, 8, NULL
+ dbwww $04, $a007, PARTYMON_STRUCT_LENGTH, NULL
+ db -1
+
+Unknown_10102c: ; 10102c
+ dbwww $80, OTPlayerName, NAME_LENGTH, NULL
+ dbwww $80, OTPlayerID, 2, NULL
+ dbwww $80, OTPartyMonNicknames, PKMN_NAME_LENGTH * PARTY_LENGTH, NULL
+ dbwww $80, OTPartyMonOT, NAME_LENGTH * PARTY_LENGTH, NULL
+ dbwww $80, OTPartyMons, PARTYMON_STRUCT_LENGTH * PARTY_LENGTH, NULL
+ db -1
+; 10104f
+
+Function101050: ; 101050
+ call Function10107d
+ ld a, [OTPartyCount]
+rept 2 ; ???
+ ld hl, wc608
+endr
+ ld bc, wc7bb - wc608
+ call Function1010de
+ ld hl, wc7bb
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ ld a, $07
+ call GetSRAMBank
+ ld hl, wc608
+ ld de, $a001
+ ld bc, wc7bd - wc608
+ call CopyBytes
+ call CloseSRAM
+ ret
+; 10107d
+
+Function10107d: ; 10107d
+ xor a
+ ld hl, wc608
+ ld bc, wc7bd - wc608
+ call ByteFill
+ ld hl, OTPlayerName
+ ld de, wc608
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ ld hl, wd271
+ ld a, [hli]
+ ld [wc608 + 11], a
+ ld a, [hl]
+ ld [wc608 + 12], a
+ ld hl, OTPartyMonNicknames
+ ld de, wc608 + 13
+ ld bc, NAME_LENGTH
+ call .CopyAllFromOT
+ ld hl, OTPartyMonOT
+ ld de, OTClassName + 1
+ ld bc, NAME_LENGTH
+ call .CopyAllFromOT
+ ld hl, OTPartyMon1Species
+ ld de, $c699
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call .CopyAllFromOT
+ ld a, $50
+ ld [wc7b9], a
+ ld a, $33
+ ld [wc7ba], a
+ ret
+; 1010cd
+
+.CopyAllFromOT: ; 1010cd
+ push hl
+ ld hl, 0
+ ld a, [OTPartyCount]
+ call AddNTimes
+ ld b, h
+ ld c, l
+ pop hl
+ call CopyBytes
+ ret
+; 1010de
+
+Function1010de: ; 1010de
+ push hl
+ push bc
+ ld de, 0
+.loop
+ ld a, [hli]
+ add e
+ ld e, a
+ ld a, d
+ adc 0
+ ld d, a
+ dec bc
+ ld a, b
+ or c
+ jr nz, .loop
+ pop bc
+ pop hl
+ ret
+; 1010f2
+
+LoadSelectedPartiesForColosseum: ; 1010f2
+ xor a
+ ld hl, StringBuffer2
+ ld bc, 9
+ call ByteFill
+ ld hl, wPlayerMonSelection
+ ld de, PartyCount
+ call .CopyThreeSpecies
+ ld hl, wPlayerMonSelection
+ ld de, PartyMon1Species
+ call .CopyPartyStruct
+ ld hl, wPlayerMonSelection
+ ld de, PartyMonOT
+ call .CopyName
+ ld hl, wPlayerMonSelection
+ ld de, PartyMonNicknames
+ call .CopyName
+ ld hl, wOTMonSelection
+ ld de, OTPartyCount
+ call .CopyThreeSpecies
+ ld hl, wOTMonSelection
+ ld de, OTPartyMon1Species
+ call .CopyPartyStruct
+ ld hl, wOTMonSelection
+ ld de, OTPartyMonOT
+ call .CopyName
+ ld hl, wOTMonSelection
+ ld de, OTPartyMonNicknames
+ call .CopyName
+ ret
+; 101145
+
+.CopyThreeSpecies: ; 101145
+; Load the 3 choices to the buffer
+ push de
+ ld bc, StringBuffer2 + NAME_LENGTH_JAPANESE
+ xor a
+.party_loop
+ push af
+ call .GetNthSpecies
+ ld [bc], a
+ inc bc
+ pop af
+ inc a
+ cp 3
+ jr nz, .party_loop
+ pop de
+; Copy the 3 choices to the party
+ ld a, 3
+ ld [de], a
+ inc de
+ ld hl, StringBuffer2 + NAME_LENGTH_JAPANESE
+ ld bc, 3
+ call CopyBytes
+ ld a, $ff
+ ld [de], a
+ ret
+; 101168
+
+.GetNthSpecies: ; 101168
+; Preserves hl and de
+; Get the index of the Nth selection
+ push hl
+ add l
+ ld l, a
+ ld a, h
+ adc 0
+ ld h, a
+ ld a, [hl]
+ pop hl
+; Get the corresponding species
+ push de
+ inc de
+ add e
+ ld e, a
+ ld a, d
+ adc 0
+ ld d, a
+ ld a, [de]
+ pop de
+ ret
+; 10117c
+
+.CopyPartyStruct: ; 10117c
+ ld bc, PARTYMON_STRUCT_LENGTH
+ jr .ContinueCopy
+
+.CopyName: ; 101181
+ ld bc, NAME_LENGTH
+
+.ContinueCopy:
+ ; Copy, via wc608...
+ ld a, wc608 % $100
+ ld [StringBuffer2], a
+ ld a, wc608 / $100
+ ld [StringBuffer2 + 1], a
+ ; ... bc bytes...
+ ld a, c
+ ld [StringBuffer2 + 2], a
+ ld a, b
+ ld [StringBuffer2 + 3], a
+ ; ... to de...
+ ld a, e
+ ld [StringBuffer2 + 4], a
+ ld a, d
+ ld [StringBuffer2 + 5], a
+ ; ... 3 times.
+ ld a, 3
+.big_copy_loop
+ push af
+ ld a, [hli]
+ push hl
+ push af
+ call .GetDestinationAddress
+ call .GetCopySize
+ pop af
+ call AddNTimes
+ ld a, [StringBuffer2]
+ ld e, a
+ ld a, [StringBuffer2 + 1]
+ ld d, a
+ call CopyBytes
+ ld a, e
+ ld [StringBuffer2], a
+ ld a, d
+ ld [StringBuffer2 + 1], a
+ pop hl
+ pop af
+ dec a
+ jr nz, .big_copy_loop
+ call .GetCopySize
+ ld a, 3
+ ld hl, 0
+ call AddNTimes
+ ld b, h
+ ld c, l
+ call .GetDestinationAddress
+ ld d, h
+ ld e, l
+ ld hl, wc608
+ call CopyBytes
+ ret
+; 1011df
+
+.GetDestinationAddress: ; 1011df
+ ld a, [StringBuffer2 + 4]
+ ld l, a
+ ld a, [StringBuffer2 + 5]
+ ld h, a
+ ret
+; 1011e8
+
+.GetCopySize: ; 1011e8
+ ld a, [StringBuffer2 + 2]
+ ld c, a
+ ld a, [StringBuffer2 + 3]
+ ld b, a
+ ret
+; 1011f1
+
+Function1011f1: ; 1011f1
+ ld a, $04
+ call GetSRAMBank
+ ld a, [$a60c]
+ ld [wdc41], a
+ call CloseSRAM
+ ld hl, wdc41
+ res 4, [hl]
+ ld hl, GameTimerPause
+ bit 7, [hl]
+ jr z, .skip
+ ld hl, wdc41
+ set 4, [hl]
+
+.skip
+ call Function10209c
+ xor a
+ ld [wdc5f], a
+ ld [wdc60], a
+ ld a, LINK_MOBILE
+ ld [wLinkMode], a
+ ret
+; 101220
+
+Function101220: ; 101220
+ xor a
+ ld [wLinkMode], a
+ ret
+; 101225
+
+Function101225: ; 101225
+ ld d, 1
+ ld e, BANK(Jumptable_101297)
+ ld bc, Jumptable_101297
+ call Function100000
+ jr Function10123d
+
+Function101231: ; 101231
+ ld d, 2
+ ld e, BANK(Jumptable_101297)
+ ld bc, Jumptable_101297
+ call Function100000
+ jr Function10123d
+
+Function10123d: ; 10123d
+ xor a
+ ld [ScriptVar], a
+ ld a, c
+ ld hl, Jumptable_101247
+ rst JumpTable
+ ret
+; 101247
+
+Jumptable_101247: ; 101247
+ dw Function101251
+ dw Function10127d
+ dw Function10127c
+ dw Function10126c
+ dw Function101265
+; 101251
+
+Function101251: ; 101251
+ call UpdateSprites
+ call RefreshScreen
+ ld hl, UnknownText_0x1021f4
+ call Function1021e0
+ call Function1020ea
+ ret c
+ call Function102142
+ ret
+; 101265
+
+Function101265: ; 101265
+ ld hl, UnknownText_0x1021ef
+ call Function1021e0
+ ret
+; 10126c
+
+Function10126c: ; 10126c
+ call UpdateSprites
+ farcall Script_reloadmappart
+ ld hl, UnknownText_0x1021f4
+ call Function1021e0
+ ret
+; 10127c
+
+Function10127c: ; 10127c
+ ret
+; 10127d
+
+Function10127d: ; 10127d
+ ret
+; 10127e
+
+Function10127e: ; 10127e
+ ld a, [wdc5f]
+ and a
+ jr z, .zero
+ cp 1
+ ld c, $27
+ jr z, .load
+ cp 2
+ ld c, $37
+ jr z, .load
+.zero
+ ld c, 0
+.load
+ ld a, c
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101297
+
+Jumptable_101297: ; 101297
+ dw Function101a97 ; 00
+ dw Function101ab4 ; 01
+ dw Function101475 ; 02
+ dw Function101b0f ; 03
+ dw Function101438 ; 04
+ dw Function101b2b ; 05
+ dw Function101b59 ; 06
+ dw Function101475 ; 07
+ dw Function101b70 ; 08
+ dw Function101438 ; 09
+ dw Function101b8f ; 0a
+ dw Function101d7b ; 0b
+ dw Function101d95 ; 0c
+ dw Function101475 ; 0d
+ dw Function101db2 ; 0e
+ dw Function101e4f ; 0f
+ dw Function101475 ; 10
+ dw Function101e64 ; 11
+ dw Function101e4f ; 12
+ dw Function101475 ; 13
+ dw Function101e64 ; 14
+ dw Function101d95 ; 15
+ dw Function101475 ; 16
+ dw Function101db2 ; 17
+ dw Function101dd0 ; 18
+ dw Function101de3 ; 19
+ dw Function101e39 ; 1a
+ dw Function101e09 ; 1b
+ dw Function101e4f ; 1c
+ dw Function101475 ; 1d
+ dw Function101e64 ; 1e
+ dw Function101d95 ; 1f
+ dw Function101475 ; 20
+ dw Function101db2 ; 21
+ dw Function101e09 ; 22
+ dw Function101e31 ; 23
+ dw Function101bc8 ; 24
+ dw Function101438 ; 25
+ dw Function101be5 ; 26
+ dw Function101ac6 ; 27
+ dw Function101ab4 ; 28
+ dw Function101475 ; 29
+ dw Function101c11 ; 2a
+ dw Function1014f4 ; 2b
+ dw Function101cc8 ; 2c
+ dw Function1014e2 ; 2d
+ dw Function1014e2 ; 2e
+ dw Function101d10 ; 2f
+ dw Function101d2a ; 30
+ dw Function101d2a ; 31
+ dw Function101507 ; 32
+ dw Function10156d ; 33
+ dw Function101557 ; 34
+ dw Function10158a ; 35
+ dw Function101c42 ; 36
+ dw Function101aed ; 37
+ dw Function101ab4 ; 38
+ dw Function101475 ; 39
+ dw Function101c2b ; 3a
+ dw Function1014f4 ; 3b
+ dw Function101cdf ; 3c
+ dw Function1014e2 ; 3d
+ dw Function1014e2 ; 3e
+ dw Function101d1e ; 3f
+ dw Function101d2a ; 40
+ dw Function101d2a ; 41
+ dw Function101507 ; 42
+ dw Function10156d ; 43
+ dw Function101544 ; 44
+ dw Function10158a ; 45
+ dw Function101c42 ; 46
+ dw Function101c50 ; 47
+ dw Function1014ce ; 48
+ dw Function101cf6 ; 49
+ dw Function101826 ; 4a
+ dw Function1017e4 ; 4b
+ dw Function1017f1 ; 4c
+ dw Function1018a8 ; 4d
+ dw Function1018d6 ; 4e
+ dw Function1017e4 ; 4f
+ dw Function1017f1 ; 50
+ dw Function1018e1 ; 51
+ dw Function1015df ; 52
+ dw Function10167d ; 53
+ dw Function10168a ; 54
+ dw Function10162a ; 55
+ dw Function1015be ; 56
+ dw Function10167d ; 57
+ dw Function10168a ; 58
+ dw Function10161f ; 59
+ dw Function10159d ; 5a
+ dw Function10167d ; 5b
+ dw Function10168a ; 5c
+ dw Function101600 ; 5d
+ dw Function101d03 ; 5e
+ dw Function101d6b ; 5f
+ dw Function10159d ; 60
+ dw Function1014ce ; 61
+ dw Function10168e ; 62
+ dw Function101600 ; 63
+ dw Function101913 ; 64
+ dw Function10194b ; 65
+ dw _SelectMonsForMobileBattle ; 66
+ dw Function1017e4 ; 67
+ dw Function1017f5 ; 68
+ dw _StartMobileBattle ; 69
+ dw Function101537 ; 6a
+ dw Function101571 ; 6b
+ dw Function101c92 ; 6c
+ dw Function10152a ; 6d
+ dw Function101571 ; 6e
+ dw Function101a4f ; 6f
+ dw Function101cbc ; 70
+ dw Function101c62 ; 71
+ dw Function101537 ; 72
+ dw Function101571 ; 73
+ dw Function101c92 ; 74
+ dw Function10152a ; 75
+ dw Function101571 ; 76
+ dw Function101ca0 ; 77
+ dw Function101475 ; 78
+ dw Function101cbc ; 79
+; 10138b
+
+Function10138b: ; 10138b
+ farcall Function8adcc
+ ld c, 0
+ jr c, .asm_101396
+ inc c
+
+.asm_101396
+ sla c
+ ld a, [wcd2f]
+ and a
+ jr z, .asm_10139f
+ inc c
+
+.asm_10139f
+ sla c
+ ld a, [wcd21]
+ cp $01
+ jr z, .asm_1013a9
+ inc c
+
+.asm_1013a9
+ ret
+; 1013aa
+
+Function1013aa: ; 1013aa
+ call ClearBGPalettes
+ call Call_ExitMenu
+ call ReloadTilesetAndPalettes
+ farcall Function106464
+ call UpdateSprites
+ call FinishExitMenu
+ ret
+; 1013c0
+
+Function1013c0: ; 1013c0
+ farcall BlankScreen
+ farcall MobileFunc_106462
+ farcall Function106464
+ call FinishExitMenu
+ ret
+; 1013d6
+
+Function1013d6: ; 1013d6
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
+ ret
+; 1013dd
+
+Function1013dd: ; 1013dd
+ call CGBOnly_CopyTilemapAtOnce
+ ret
+; 1013e1
+
+Function1013e1: ; 1013e1 ; unreferenced
+ push de
+ inc de
+ ld b, a
+ ld c, 0
+.asm_1013e6
+ inc c
+ ld a, [hli]
+ ld [de], a
+ inc de
+ and a
+ jr z, .asm_1013f1
+ dec b
+ jr nz, .asm_1013e6
+ scf
+
+.asm_1013f1
+ pop de
+ ld a, c
+ ld [de], a
+ ret
+; 1013f5
+
+Function1013f5: ; 1013f5
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld c, a
+.asm_1013f9
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .asm_1013f9
+ ret
+; 101400
+
+Function101400: ; 101400 ; unreferenced
+ ld a, [de]
+ inc de
+ cp [hl]
+ jr nz, asm_101416
+ inc hl
+
+Function101406: ; 101406
+ ld c, a
+ ld b, 0
+.asm_101409
+ ld a, [de]
+ inc de
+ cp [hl]
+ jr nz, asm_101416
+ inc hl
+ dec bc
+ ld a, b
+ or c
+ jr nz, .asm_101409
+ and a
+ ret
+
+asm_101416
+ scf
+ ret
+; 101418
+
+Function101418: ; 101418
+ call GetJoypad
+ ld a, [hJoyDown]
+ and SELECT + A_BUTTON
+ cp SELECT + A_BUTTON
+ jr z, .asm_101425
+ xor a
+ ret
+
+.asm_101425
+ ld a, $f7
+ ld [wcd2b], a
+ scf
+ ret
+; 10142c
+
+Function10142c: ; 10142c
+ ld a, $01
+ ld [wc305], a
+ farcall Function115e18
+ ret
+; 101438
+
+Function101438: ; 101438
+ ld hl, wcd29
+ set 6, [hl]
+ ld a, [wcd26]
+ ld hl, Jumptable_101457
+ rst JumpTable
+ ld a, [wcd26]
+ bit 7, a
+ ret z
+ ld a, 0
+ ld [wcd26], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101457
+
+Jumptable_101457: ; 101457
+ dw Function10145b
+ dw Function101467
+; 10145b
+
+Function10145b: ; 10145b
+ ld a, $3c
+ ld [wcd42], a
+ ld a, [wcd26]
+ inc a
+ ld [wcd26], a
+
+Function101467: ; 101467
+ ld hl, wcd42
+ dec [hl]
+ ret nz
+ ld a, [wcd26]
+ set 7, a
+ ld [wcd26], a
+ ret
+; 101475
+
+Function101475: ; 101475
+ ld hl, wcd29
+ set 6, [hl]
+ ld a, [wcd26]
+ ld hl, Jumptable_101494
+ rst JumpTable
+ ld a, [wcd26]
+ bit 7, a
+ ret z
+ ld a, 0
+ ld [wcd26], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101494
+
+Jumptable_101494: ; 101494
+ dw Function10149a
+ dw Function1014a6
+ dw Function1014b7
+; 10149a
+
+Function10149a: ; 10149a
+ ld a, $28
+ ld [wcd42], a
+ ld a, [wcd26]
+ inc a
+ ld [wcd26], a
+
+Function1014a6: ; 1014a6
+ ld hl, wcd42
+ dec [hl]
+ ret nz
+ ld a, $50
+ ld [wcd42], a
+ ld a, [wcd26]
+ inc a
+ ld [wcd26], a
+
+Function1014b7: ; 1014b7
+ call GetJoypad
+ ld a, [hJoyPressed]
+ and $03
+ jr nz, .asm_1014c5
+ ld hl, wcd42
+ dec [hl]
+ ret nz
+
+.asm_1014c5
+ ld a, [wcd26]
+ set 7, a
+ ld [wcd26], a
+ ret
+; 1014ce
+
+Function1014ce: ; 1014ce
+ farcall Function100720
+ farcall StartMobileInactivityTimer
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 1014e2
+
+Function1014e2: ; 1014e2
+ ld hl, wcd29
+ set 6, [hl]
+ ld a, 0
+ ld [wcd26], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 1014f4
+
+Function1014f4: ; 1014f4
+ farcall EnableMobile
+ ld hl, wcd29
+ set 6, [hl]
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101507
+
+Function101507: ; 101507
+ ld de, wcd30
+ ld hl, $40
+ ld bc, $40
+ ld a, $02
+ call Function3e32
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 10151d
+
+Function10151d: ; 10151d ; unreferenced
+ ld a, $34
+ call Function3e32
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 10152a
+
+Function10152a: ; 10152a
+ ld a, $36
+ call Function3e32
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101537
+
+Function101537: ; 101537
+ ld a, $0a
+ call Function3e32
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101544
+
+Function101544: ; 101544
+ farcall StartMobileInactivityTimer
+ ld a, $12
+ call Function3e32
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101557
+
+Function101557: ; 101557
+ farcall StartMobileInactivityTimer
+ ld hl, wcd53
+ ld a, $08
+ call Function3e32
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 10156d
+
+Function10156d: ; 10156d
+ call Function101418
+ ret c
+
+Function101571: ; 101571
+ farcall Function10032e
+ ret c
+ ret z
+ ld a, e
+ cp $01
+ jr z, .asm_101582
+ ld [wcd2b], a
+ ret
+
+.asm_101582
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 10158a
+
+Function10158a: ; 10158a
+ farcall IncrementMobileInactivityTimerBy1Frame
+ ld a, [wMobileInactivityTimerMinutes]
+ cp $0a
+ jr c, Function10156d
+ ld a, $fb
+ ld [wcd2b], a
+ ret
+; 10159d
+
+Function10159d: ; 10159d
+ ld de, wc608
+ farcall Function100edf
+ ld de, wc608
+ ld a, $05
+ ld hl, w5_d800
+ call Function10174c
+ ld a, 0
+ ld [wcd26], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 1015be
+
+Function1015be: ; 1015be
+ ld de, wc608
+ farcall Function100eed
+ ld de, wc608
+ ld a, $05
+ ld hl, w5_d800
+ call Function10174c
+ ld a, 0
+ ld [wcd26], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 1015df
+
+Function1015df: ; 1015df
+ ld de, wc608
+ farcall Function100ef4
+ ld de, wc608
+ ld a, $05
+ ld hl, w5_d800
+ call Function10174c
+ ld a, 0
+ ld [wcd26], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101600
+
+Function101600: ; 101600
+ ld hl, w5_d800
+ ld de, wc608
+ ld bc, $1e0
+ ld a, $05
+ call FarCopyWRAM
+ ld de, wc608
+ farcall Function100ee6
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 10161f
+
+Function10161f: ; 10161f
+ call Function101649
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 10162a
+
+Function10162a: ; 10162a
+ call Function101663
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101635
+
+Function101635: ; 101635
+ ld de, wc608
+ ld bc, $1e0
+ call FarCopyWRAM
+ ret
+; 10163f
+
+Function10163f: ; 10163f
+ ld hl, wc608
+ ld bc, $1e0
+ call FarCopyWRAM
+ ret
+; 101649
+
+Function101649: ; 101649
+ ld a, $05
+ ld hl, w5_d800
+ call Function101635
+ ld a, $05
+ ld de, w5_da00
+ call Function10163f
+ ret
+; 10165a
+
+Function10165a: ; 10165a
+ ld a, $05
+ ld hl, w5_da00
+ call Function101635
+ ret
+; 101663
+
+Function101663: ; 101663
+ ld a, $05
+ ld hl, w5_d800
+ call Function101635
+ ld a, $05
+ ld de, w5_dc00
+ call Function10163f
+ ret
+; 101674
+
+Function101674: ; 101674 ; unreferenced
+ ld a, $05
+ ld hl, w5_dc00
+ call Function101635
+ ret
+; 10167d
+
+Function10167d: ; 10167d
+ ld a, 0
+ ld [wcd26], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 10168a
+
+Function10168a: ; 10168a
+ call Function101418
+ ret c
+
+Function10168e: ; 10168e
+ ld b, 0
+ ld c, $01
+ farcall Function10079c
+ ret c
+ ld c, $01
+ ld b, $03
+ farcall AdvanceMobileInactivityTimerAndCheckExpired
+ ret c
+ ld a, [wcd26]
+ ld hl, Jumptable_1016c3
+ rst JumpTable
+ ld hl, wcd29
+ set 6, [hl]
+ ld a, [wcd26]
+ bit 7, a
+ ret z
+ ld a, 0
+ ld [wcd26], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 1016c3
+
+Jumptable_1016c3: ; 1016c3
+ dw Function1016cf
+ dw Function1016de
+ dw Function1016f8
+ dw Function101705
+ dw Function101719
+ dw Function101724
+; 1016cf
+
+Function1016cf: ; 1016cf
+ ld hl, wcd3a
+ inc [hl]
+ call Function10176f
+ ld a, [wcd26]
+ inc a
+ ld [wcd26], a
+ ret
+; 1016de
+
+Function1016de: ; 1016de
+ call Function10177b
+ jr nc, .asm_1016eb
+ ld a, [wcd26]
+ inc a
+ ld [wcd26], a
+ ret
+
+.asm_1016eb
+ ld a, $ff
+ ld [wcd39], a
+ ld a, [wcd26]
+ inc a
+ ld [wcd26], a
+ ret
+; 1016f8
+
+Function1016f8: ; 1016f8
+ ld a, 0
+ ld [wcd27], a
+ ld a, [wcd26]
+ inc a
+ ld [wcd26], a
+ ret
+; 101705
+
+Function101705: ; 101705
+ farcall Function100382
+ ld a, [wcd27]
+ bit 7, a
+ ret z
+ ld a, [wcd26]
+ inc a
+ ld [wcd26], a
+ ret
+; 101719
+
+Function101719: ; 101719
+ call Function1017c7
+ ld a, [wcd26]
+ inc a
+ ld [wcd26], a
+ ret
+; 101724
+
+Function101724: ; 101724
+ ld a, [wcd39]
+ cp $ff
+ jr z, .asm_101731
+ ld a, 0
+ ld [wcd26], a
+ ret
+
+.asm_101731
+ ld a, [wcd26]
+ set 7, a
+ ld [wcd26], a
+ ret
+; 10173a
+
+Unknown_10173a:
+ db $50
+
+Function10173b: ; 10173b
+ push bc
+ push af
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [Unknown_10173a]
+ ld c, a
+ ld b, 0
+ pop af
+ call AddNTimes
+ pop bc
+ ret
+; 10174c
+
+Function10174c: ; 10174c
+ ld [wcd3d], a
+ ld a, l
+ ld [wcd3e], a
+ ld a, h
+ ld [wcd3f], a
+ ld a, e
+ ld [wcd3b], a
+ ld a, d
+ ld [wcd3c], a
+ ld a, c
+ ld [wcd40], a
+ ld a, b
+ ld [wcd41], a
+ xor a
+ ld [wcd39], a
+ ld [wcd3a], a
+ ret
+; 10176f
+
+Function10176f: ; 10176f
+ ld hl, wccb4
+ ld bc, $54
+ ld a, $11
+ call ByteFill
+ ret
+; 10177b
+
+Function10177b: ; 10177b
+ ld a, [Unknown_10173a]
+ ld c, a
+ ld b, 0
+ ld a, [wcd3a]
+ ld hl, 0
+ call AddNTimes
+ ld e, l
+ ld d, h
+ ld hl, wcd40
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, l
+ sub e
+ ld l, a
+ ld a, h
+ sbc d
+ ld h, a
+ jr c, .asm_1017a0
+ add hl, bc
+ call Function1017b0
+ scf
+ ret
+
+.asm_1017a0
+ ld a, $ff
+ ld [wcd39], a
+ add hl, bc
+ ld a, h
+ or l
+ ret z
+ ld c, l
+ ld b, h
+ call Function1017b0
+ xor a
+ ret
+; 1017b0
+
+Function1017b0: ; 1017b0
+ ld a, c
+ ld [wccb4], a
+ push bc
+ ld a, [wcd3a]
+ dec a
+ ld hl, wcd3b
+ call Function10173b
+ pop bc
+ ld de, wccb5
+ call CopyBytes
+ ret
+; 1017c7
+
+Function1017c7: ; 1017c7
+ ld a, [wcc60]
+ ld c, a
+ ld b, 0
+ ld a, [wcd3a]
+ dec a
+ ld hl, wcd3e
+ call Function10173b
+ ld e, l
+ ld d, h
+ ld hl, wcc61
+ ld a, [wcd3d]
+ call FarCopyWRAM
+ and a
+ ret
+; 1017e4
+
+Function1017e4: ; 1017e4
+ ld a, 0
+ ld [wcd27], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 1017f1
+
+Function1017f1: ; 1017f1
+ call Function101418
+ ret c
+
+Function1017f5: ; 1017f5
+ ld b, 0
+ ld c, $01
+ farcall Function10079c
+ ret c
+ ld c, $01
+ ld b, $03
+ farcall AdvanceMobileInactivityTimerAndCheckExpired
+ ret c
+ farcall Function100382
+ ld a, [wcd27]
+ bit 7, a
+ jr nz, .next
+ ld hl, wcd29
+ set 6, [hl]
+ ret
+
+.next
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101826
+
+Function101826: ; 101826
+ ld a, [wcd21]
+ cp $02
+ jr z, .asm_101833
+ cp $01
+ jr z, .asm_101844
+ jr .asm_101869
+
+.asm_101833
+ ld hl, Unknown_10186f
+ ld de, wccb4
+ call Function1013f5
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101844
+ farcall Function103654
+ ld a, c
+ ld hl, Unknown_101882
+ cp $01
+ jr z, .asm_10185b
+ ld hl, Unknown_101895
+ cp $02
+ jr z, .asm_10185b
+ jr .asm_101869
+
+.asm_10185b
+ ld de, wccb4
+ call Function1013f5
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101869
+ ld a, $fe
+ ld [wcd2b], a
+ ret
+; 10186f
+
+
+SECTION "ascii 10186f", ROMX
+
+ charmap " ", $20 ; revert to ascii
+
+Unknown_10186f:
+ db .end - @
+ db $19, $73, $09, $13, "trade_crystal"
+.end db 0
+
+Unknown_101882:
+ db .end - @
+ db $19, $67, $10, $01, "free__crystal"
+.end db 0
+
+Unknown_101895:
+ db .end - @
+ db $19, $67, $10, $01, "limit_crystal"
+.end db 0
+; 1018a8
+
+
+SECTION "bank40_3", ROMX
+
+Function1018a8: ; 1018a8
+ ld hl, wccb5
+ ld de, wcc61
+ ld a, $04
+ call Function101406
+ jr c, .asm_1018d0
+ ld hl, wccb9
+ ld de, wcc65
+ ld a, $06
+ call Function101406
+ jr c, .asm_1018ca
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_1018ca
+ ld a, $f6
+ ld [wcd2b], a
+ ret
+
+.asm_1018d0
+ ld a, $f5
+ ld [wcd2b], a
+ ret
+; 1018d6
+
+Function1018d6: ; 1018d6
+ call Function1018ec
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 1018e1
+
+Function1018e1: ; 1018e1
+ call Function1018fb
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 1018ec
+
+Function1018ec: ; 1018ec
+ ld a, $0a
+ ld hl, wccb4
+ ld [hli], a
+ ld c, a
+.asm_1018f3
+ call Random
+ ld [hli], a
+ dec c
+ jr nz, .asm_1018f3
+ ret
+; 1018fb
+
+Function1018fb: ; 1018fb
+ ld a, [wcd2f]
+ and a
+ jr z, .asm_101906
+ ld hl, wcc61
+ jr .asm_101909
+
+.asm_101906
+ ld hl, wccb5
+
+.asm_101909
+ ld de, LinkBattleRNs
+ ld bc, 10
+ call CopyBytes
+ ret
+; 101913
+
+Function101913: ; 101913
+ ld hl, wcd2a
+ set 0, [hl]
+ xor a
+ ld [wc30d], a
+ ld hl, wcd29
+ res 4, [hl]
+ xor a
+ ld [wc305], a
+ ld hl, wcd29
+ res 7, [hl]
+ ld a, $90
+ ld [hWY], a
+ ld a, [wcd21]
+ cp $01
+ jr z, .asm_10193f
+ cp $02
+ jr z, .asm_101945
+ ld a, $71
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_10193f
+ ld a, $66
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101945
+ ld a, $65
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 10194b
+
+Function10194b: ; 10194b
+ call DisableSpriteUpdates
+ call ClearSprites
+ farcall Function1021f9
+ ld hl, wcd29
+ bit 3, [hl]
+ jr nz, .asm_101967
+ call Function1013c0
+ ld a, $71
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101967
+ ld a, $60
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 10196d
+
+_SelectMonsForMobileBattle: ; 10196d
+ farcall BlankScreen
+ farcall Mobile_CommunicationStandby
+ ld hl, wcd29
+ set 5, [hl]
+ ld hl, wcd2a
+ set 6, [hl]
+ ld a, $06
+ ld [wccb4], a
+ ld hl, wPlayerMonSelection
+ ld de, wccb5
+ ld bc, 3
+ call CopyBytes
+ ld hl, wcd6c
+ ld a, [hli]
+ ld [wccb8], a
+ ld a, [hli]
+ ld [wccb9], a
+ ld a, [hl]
+ ld [wccba], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 1019ab
+
+_StartMobileBattle: ; 1019ab
+ call CopyOtherPlayersBattleMonSelection
+ farcall Function100754
+ xor a
+ ld [wdc5f], a
+ ld [wdc60], a
+ farcall BlankScreen
+ call SpeechTextBox
+ farcall Function100846
+ ld c, 120
+ call DelayFrames
+ farcall ClearTileMap
+ call .CopyOTDetails
+ call StartMobileBattle
+ ld a, [wcd2b]
+ cp $fc
+ jr nz, .asm_1019e6
+ xor a
+ ld [wcd2b], a
+.asm_1019e6
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 1019ee
+
+.CopyOTDetails: ; 1019ee
+ ld a, [rSVBK]
+ push af
+ ld a, 5
+ ld [rSVBK], a
+
+ ld bc, w5_dc0d
+ ld de, w5_dc11
+ farcall GetMobileOTTrainerClass
+
+ pop af
+ ld [rSVBK], a
+
+ ld a, c
+ ld [OtherTrainerClass], a
+ ld hl, OTPlayerName
+ ld de, OTClassName
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ ld a, [wcd2f]
+ and a
+ ld a, 2
+ jr z, .got_link_player_number
+ ld a, 1
+.got_link_player_number
+ ld [hLinkPlayerNumber], a
+ ret
+; 101a21
+
+StartMobileBattle: ; 101a21
+ ; force stereo and fast text speed
+ ld hl, Options
+ ld a, [hl]
+ push af
+ and (1 << STEREO)
+ or 1 ; 1 frame per character i.e. fast text
+ ld [hl], a
+ ld a, 1
+ ld [wDisableTextAcceleration], a
+ farcall BattleIntro
+ farcall DoBattle
+ farcall ShowLinkBattleParticipantsAfterEnd
+ xor a
+ ld [wDisableTextAcceleration], a
+ ld a, $ff
+ ld [hLinkPlayerNumber], a
+ pop af
+ ld [Options], a
+ ret
+; 101a4f
+
+Function101a4f: ; 101a4f
+ ld a, 1
+ ld [wDisableTextAcceleration], a
+ farcall DisplayLinkBattleResult
+ xor a
+ ld [wDisableTextAcceleration], a
+ farcall CleanUpBattleRAM
+ farcall LoadPokemonData
+ call Function1013c0
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101a75
+
+CopyOtherPlayersBattleMonSelection: ; 101a75
+ ld hl, wcc61
+ ld de, wOTMonSelection
+ ld bc, 3
+ call CopyBytes
+ ld de, wcc64
+ farcall Function100772
+ farcall Function101050
+ farcall LoadSelectedPartiesForColosseum
+ ret
+; 101a97
+
+Function101a97: ; 101a97
+ farcall Function115d99
+ ld hl, wcd29
+ set 7, [hl]
+ ld c, $02
+ call Function10142c
+ ld hl, wcd29
+ set 6, [hl]
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101ab4
+
+Function101ab4: ; 101ab4
+ ld e, $01
+ call Function101ee4
+ ld hl, wcd29
+ set 5, [hl]
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101ac6
+
+Function101ac6: ; 101ac6
+ farcall Function115d99
+ ld hl, wcd29
+ set 7, [hl]
+ ld c, $02
+ call Function10142c
+ ld hl, wcd29
+ set 6, [hl]
+ xor a
+ ld [wcd2f], a
+ ld de, wdc42
+ call Function102068
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101aed
+
+Function101aed: ; 101aed
+ farcall Function115d99
+ ld hl, wcd29
+ set 7, [hl]
+ ld c, $02
+ call Function10142c
+ ld hl, wcd29
+ set 6, [hl]
+ ld a, $01
+ ld [wcd2f], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101b0f
+
+Function101b0f: ; 101b0f
+ ld c, 0
+ call Function10142c
+ ld e, $03
+ call Function101ee4
+ ld hl, wcd29
+ set 5, [hl]
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ld a, 0
+ ld [wcd26], a
+ ret
+; 101b2b
+
+Function101b2b: ; 101b2b
+ farcall Function100579
+ ld hl, wcd29
+ set 2, [hl]
+ ld a, [wcd26]
+ bit 7, a
+ ret z
+ call Function1013dd
+ ld a, 0
+ ld [wcd26], a
+ ld a, [wMenuCursorY]
+ cp $01
+ jr z, .asm_101b51
+ ld a, $02
+ ld [wcd2b], a
+ ret
+
+.asm_101b51
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101b59
+
+Function101b59: ; 101b59
+ ld c, $02
+ call Function10142c
+ ld e, $02
+ call Function101ee4
+ ld hl, wcd29
+ set 5, [hl]
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101b70
+
+Function101b70: ; 101b70
+ ld c, $02
+ call Function10142c
+ ld e, $04
+ call Function101ee4
+ ld hl, wcd29
+ set 5, [hl]
+ call UpdateSprites
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ld a, 0
+ ld [wcd26], a
+ ret
+; 101b8f
+
+Function101b8f: ; 101b8f
+ farcall Function1005c3
+ ld hl, wcd29
+ set 2, [hl]
+ ld a, [wcd26]
+ bit 7, a
+ ret z
+ call Function1013dd
+ ld a, 0
+ ld [wcd26], a
+ ld a, [wMenuCursorY]
+ cp $01
+ jr z, .asm_101bbc
+ ld a, $01
+ ld [wcd2f], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101bbc
+ xor a
+ ld [wcd2f], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101bc8
+
+Function101bc8: ; 101bc8
+ ld c, $02
+ call Function10142c
+ ld e, $08
+ call Function101ee4
+ call Function102048
+ call Function1013dd
+ ld a, 0
+ ld [wcd26], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101be5
+
+Function101be5: ; 101be5
+ farcall Function100579
+ ld hl, wcd29
+ set 2, [hl]
+ ld a, [wcd26]
+ bit 7, a
+ ret z
+ call Function1013dd
+ ld a, 0
+ ld [wcd26], a
+ ld a, [wMenuCursorY]
+ cp $01
+ jr nz, .asm_101c0b
+ ld a, $2a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101c0b
+ ld a, $02
+ ld [wcd2b], a
+ ret
+; 101c11
+
+Function101c11: ; 101c11
+ ld a, $01
+ ld [wdc5f], a
+ ld e, $09
+ call Function101ee4
+ call Function102048
+ ld hl, wcd29
+ set 5, [hl]
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101c2b
+
+Function101c2b: ; 101c2b
+ ld a, $02
+ ld [wdc5f], a
+ ld e, $07
+ call Function101ee4
+ ld hl, wcd29
+ set 5, [hl]
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101c42
+
+Function101c42: ; 101c42
+ ld hl, wcd2a
+ set 1, [hl]
+ call Function100665
+ ld a, $47
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101c50
+
+Function101c50: ; 101c50
+ ld e, $0a
+ call Function101ee4
+ ld hl, wcd29
+ set 2, [hl]
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101c62
+
+Function101c62: ; 101c62
+ farcall Function115d99
+ ld hl, wcd29
+ set 7, [hl]
+ ld c, $01
+ call Function10142c
+ xor a
+ ld [wc30d], a
+ ld hl, wcd29
+ res 4, [hl]
+ ld e, $0b
+ call Function101ee4
+ ld hl, wcd29
+ set 5, [hl]
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ld a, 0
+ ld [wcd26], a
+ ret
+; 101c92
+
+Function101c92: ; 101c92
+ farcall Function100675
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101ca0
+
+Function101ca0: ; 101ca0
+ ld c, $02
+ call Function10142c
+ ld e, $0c
+ call Function101ee4
+ ld hl, wcd29
+ set 5, [hl]
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ld a, 0
+ ld [wcd26], a
+ ret
+; 101cbc
+
+Function101cbc: ; 101cbc
+ ld a, $01
+ ld [wcd2b], a
+ ret
+; 101cc2
+
+Function101cc2: ; 101cc2 ; unreferenced
+ ld a, $02
+ ld [wcd2b], a
+ ret
+; 101cc8
+
+Function101cc8: ; 101cc8
+ ld a, $01
+ ld [wc314], a
+ ld a, $01
+ ld [wc30d], a
+ ld hl, wcd29
+ set 4, [hl]
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101cdf
+
+Function101cdf: ; 101cdf
+ ld a, $06
+ ld [wc314], a
+ ld a, $01
+ ld [wc30d], a
+ ld hl, wcd29
+ set 4, [hl]
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101cf6
+
+Function101cf6: ; 101cf6
+ ld a, $0b
+ ld [wc314 + 1], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101d03
+
+Function101d03: ; 101d03
+ ld a, $0e
+ ld [wc314 + 1], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101d10
+
+Function101d10: ; 101d10
+ ld c, $01
+ call Function10142c
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ jr Function101d2a
+
+Function101d1e: ; 101d1e
+ ld c, $03
+ call Function10142c
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+
+Function101d2a: ; 101d2a
+ call Function101418
+ ret c
+ ld hl, wcd29
+ set 6, [hl]
+ ld a, [wcd26]
+ ld hl, Jumptable_101d4d
+ rst JumpTable
+ ld a, [wcd26]
+ bit 7, a
+ ret z
+ ld a, 0
+ ld [wcd26], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101d4d
+
+Jumptable_101d4d: ; 101d4d
+ dw Function101d51
+ dw Function101d5d
+; 101d51
+
+Function101d51: ; 101d51
+ ld a, $3c
+ ld [wcd42], a
+ ld a, [wcd26]
+ inc a
+ ld [wcd26], a
+
+Function101d5d: ; 101d5d
+ ld hl, wcd42
+ dec [hl]
+ ret nz
+ ld a, [wcd26]
+ set 7, a
+ ld [wcd26], a
+ ret
+; 101d6b
+
+Function101d6b: ; 101d6b
+ ld a, [wc30d]
+ and a
+ ret nz
+ ld hl, wcd29
+ res 4, [hl]
+ ld a, $64
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101d7b
+
+Function101d7b: ; 101d7b
+ farcall Function10138b
+ ld b, 0
+ ld hl, Unknown_101d8d
+ add hl, bc
+ ld c, [hl]
+ ld a, c
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101d8d
+
+Unknown_101d8d: ; 101d8d
+ db $15, $15, $1f, $1f, $0c, $12, $3a, $3a
+; 101d95
+
+Function101d95: ; 101d95
+ call Function101ee2
+ call LoadStandardMenuDataHeader
+ ld e, $0e
+ call Function101ee4
+ ld hl, wcd29
+ set 5, [hl]
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ld a, 0
+ ld [wcd26], a
+ ret
+; 101db2
+
+Function101db2: ; 101db2
+ farcall Function103302
+ call ExitMenu
+ ld hl, wcd29
+ set 5, [hl]
+ jr c, .asm_101dca
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101dca
+ ld a, $02
+ ld [wcd2b], a
+ ret
+; 101dd0
+
+Function101dd0: ; 101dd0
+ ld hl, wdc41
+ bit 1, [hl]
+ jr nz, .asm_101ddd
+ ld a, $19
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101ddd
+ ld a, $1b
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101de3
+
+Function101de3: ; 101de3
+ call Function101ecc
+ call Function101ead
+ jr c, .asm_101df3
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101df3
+ call Function101e98
+ jr c, .asm_101e00
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101e00
+ call Function101ed3
+ ld a, $02
+ ld [wcd2b], a
+ ret
+; 101e09
+
+Function101e09: ; 101e09
+ call Function101ead
+ jr c, .asm_101e16
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101e16
+ call Function101ecc
+ call Function101e98
+ push af
+ call Function101ed3
+ pop af
+ jr c, .asm_101e2b
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101e2b
+ ld a, $02
+ ld [wcd2b], a
+ ret
+; 101e31
+
+Function101e31: ; 101e31
+ ld a, $3a
+ ld [wMobileCommsJumptableIndex], a
+ jp Function101c2b
+; 101e39
+
+Function101e39: ; 101e39
+ call Function1020bf
+ push af
+ call Function101ed3
+ pop af
+ jr c, .asm_101e49
+ ld a, $2a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101e49
+ ld a, $02
+ ld [wcd2b], a
+ ret
+; 101e4f
+
+Function101e4f: ; 101e4f
+ ld e, $06
+ call Function101ee4
+ call Function1013d6
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ld a, 0
+ ld [wcd26], a
+ ret
+; 101e64
+
+Function101e64: ; 101e64
+ call Function101ecc
+ call Function1020a8
+ push af
+ call Function101ed3
+ pop af
+ jr c, .asm_101e77
+ ld a, $24
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_101e77
+ ld hl, wcd29
+ set 5, [hl]
+ ld a, $02
+ ld [wcd2b], a
+ ret
+; 101e82
+
+Function101e82: ; 101e82 ; unreferenced
+ call Function101ecc
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101e8d
+
+Function101e8d: ; 101e8d ; unreferenced
+ call Function101ed3
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 101e98
+
+Function101e98: ; 101e98
+ call ClearSprites
+ farcall Function8adb3
+ ret c
+ ld hl, GameTimerPause
+ set 7, [hl]
+ ld hl, wdc41
+ set 4, [hl]
+ ret
+; 101ead
+
+Function101ead: ; 101ead
+ ld hl, GameTimerPause
+ bit 7, [hl]
+ jr nz, .asm_101ec8
+ ld hl, wdc41
+ bit 2, [hl]
+ jr z, .asm_101eca
+ ld a, [wcd2f]
+ and a
+ jr nz, .asm_101ec8
+ ld hl, wdc41
+ bit 1, [hl]
+ jr z, .asm_101eca
+
+.asm_101ec8
+ xor a
+ ret
+
+.asm_101eca
+ scf
+ ret
+; 101ecc
+
+Function101ecc: ; 101ecc
+ call Function101ee2
+ call FadeToMenu
+ ret
+; 101ed3
+
+Function101ed3: ; 101ed3
+ call Function1013aa
+ farcall Function115d99
+ ld hl, wcd29
+ set 7, [hl]
+ ret
+; 101ee2
+
+Function101ee2: ; 101ee2
+ ld e, 0
+
+Function101ee4: ; 101ee4
+ ld d, 0
+ ld hl, Unknown_101ef5
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld d, [hl]
+ ld e, a
+ farcall Function100504
+ ret
+; 101ef5
+
+Unknown_101ef5: ; 101ef5
+ dw String_101f13
+ dw String_101f14
+ dw String_101f32
+ dw String_101f4f
+ dw String_101f69
+ dw String_101f81
+ dw String_101f93
+ dw String_101faa
+ dw String_101fc5
+ dw String_101fd2
+ dw String_101fe1
+ dw String_101fef
+ dw String_102000
+ dw String_10200c
+ dw String_102014
+
+String_101f13: ; 101f13
+ db "@"
+
+String_101f14: ; 101f14
+ db "モバイルアダプタを つかって"
+ next "おともだちと つうしんします@"
+
+String_101f32: ; 101f32
+ db "でんわを かけるひとには"
+ next "つうわりょうきんが かかります@"
+
+String_101f4f: ; 101f4f
+ db "モバイルアダプタの じゅんびは"
+ next "できて いますか?@"
+
+String_101f69: ; 101f69
+ db "あなたが おともだちに"
+ next "でんわを かけますか?@"
+
+String_101f81: ; 101f81
+ db "めいしフ,ルダーを"
+ next "つかいますか?@"
+
+String_101f93: ; 101f93
+ db "でんわばんごうを にゅうりょく"
+ next "してください@"
+
+String_101faa: ; 101faa
+ db "それでは おともだちからの"
+ next "でんわを おまちします…@"
+
+String_101fc5: ; 101fc5
+ next "に でんわを かけます@"
+
+String_101fd2: ; 101fd2
+ next "に でんわを かけています@"
+
+String_101fe1: ; 101fe1
+ db "でんわが つながりました!@"
+
+String_101fef: ; 101fef
+ db "つうわを"
+ next "しゅうりょう します…@"
+
+String_102000: ; 102000
+ db "つうしん しゅうりょう@"
+
+String_10200c: ; 10200c
+ db "つうわ じかん@"
+
+String_102014: ; 102014
+ db "それでは つうしんの"
+ next "せっていを してください@"
+; 10202c
+
+Function10202c: ; 10202c
+ farcall Function115d99
+ ld hl, wcd29
+ set 7, [hl]
+ ld c, $02
+ call Function10142c
+ ld e, $0d
+ call Function101ee4
+ hlcoord 4, 4
+ call Function100681
+ ret
+; 102048
+
+Function102048: ; 102048
+ call Function10204c
+ ret
+; 10204c
+
+Function10204c: ; 10204c
+ hlcoord 3, 2
+ ld c, $10
+ ld de, wcd53
+.asm_102054
+ ld a, [de]
+ inc de
+ and a
+ jr z, .asm_102067
+ sub $30
+ jr c, .asm_102067
+ cp $0a
+ jr nc, .asm_102067
+ add $f6
+ ld [hli], a
+ dec c
+ jr nz, .asm_102054
+
+.asm_102067
+ ret
+; 102068
+
+Function102068: ; 102068
+ ld hl, wcd53
+ ld c, $08
+.asm_10206d
+ ld a, [de]
+ call Function102080
+ jr c, .asm_10207f
+ ld a, [de]
+ swap a
+ call Function102080
+ jr c, .asm_10207f
+ inc de
+ dec c
+ jr nz, .asm_10206d
+
+.asm_10207f
+ ret
+; 102080
+
+Function102080: ; 102080
+ and $0f
+ cp $0f
+ jr z, .asm_10208a
+ add $30
+ ld [hli], a
+ ret
+
+.asm_10208a
+ ld [hl], 0
+ scf
+ ret
+; 10208e
+
+Function10208e: ; 10208e
+ push de
+ ld h, d
+ ld l, e
+ ld de, wdc42
+ ld bc, 8
+ call CopyBytes
+ pop de
+ ret
+; 10209c
+
+Function10209c: ; 10209c
+ ld a, $ff
+ ld hl, wdc42
+ ld bc, 8
+ call ByteFill
+ ret
+; 1020a8
+
+Function1020a8: ; 1020a8
+ call Function10209c
+ ld c, $01
+ ld de, wdc42
+ farcall Function17a68f
+ ret c
+ call Function10208e
+ call Function102068
+ xor a
+ ret
+; 1020bf
+
+Function1020bf: ; 1020bf
+ call ClearSprites
+ farcall Function8aba9
+ ld a, c
+ and a
+ jr z, .asm_1020e8
+ dec a
+ ld hl, $a04c
+ ld bc, $25
+ call AddNTimes
+ ld d, h
+ ld e, l
+ ld a, $04
+ call GetSRAMBank
+ call Function10208e
+ call Function102068
+ call CloseSRAM
+ xor a
+ ret
+
+.asm_1020e8
+ scf
+ ret
+; 1020ea
+
+Function1020ea: ; 1020ea
+ ld hl, wdc41
+ bit 4, [hl]
+ jr z, .quit
+ ld hl, wdc41
+ bit 2, [hl]
+ jr nz, .quit
+ call Function10218d
+ ld hl, wc608
+ bit 4, [hl]
+ jr z, .quit
+ ld hl, wc608
+ bit 2, [hl]
+ jr nz, .quit
+ call Function102112
+ jr z, .quit
+ and a
+ ret
+
+.quit
+ scf
+ ret
+; 102112
+
+Function102112: ; 102112
+ ld a, $04
+ call GetSRAMBank
+ ld hl, $a041
+ ld c, 40
+.outer_loop
+ push hl
+ ld de, $c60f
+ ld b, 31
+.inner_loop
+ ld a, [de]
+ cp [hl]
+ jr nz, .not_matching
+ inc de
+ inc hl
+ dec b
+ jr nz, .inner_loop
+ pop hl
+ xor a
+ jr .done
+
+.not_matching
+ pop hl
+ ld de, 37
+ add hl, de
+ dec c
+ jr nz, .outer_loop
+ ld a, $01
+ and a
+ jr .done ; useless jr
+
+.done
+ push af
+ call CloseSRAM
+ pop af
+ ret
+; 102142
+
+Function102142: ; 102142
+ call Function10218d
+ call Function102180
+ ld hl, UnknownText_0x1021d1
+ call MenuTextBox
+ ld de, SFX_LEVEL_UP
+ call PlaySFX
+ call JoyWaitAorB
+ call ExitMenu
+ call Function10219f
+ ld hl, UnknownText_0x1021d6
+ call MenuTextBox
+ call YesNoBox
+ call ExitMenu
+ jr c, .asm_10217c
+ call Function1021b8
+ jr c, .asm_10217c
+ call Function10218d
+ call Function102180
+ ld hl, UnknownText_0x1021db
+ call PrintText
+
+.asm_10217c
+ call Function1013d6
+ ret
+; 102180
+
+Function102180: ; 102180
+ ld hl, wc608 + 1
+ ld de, StringBuffer2
+ ld bc, 11
+ call CopyBytes
+ ret
+; 10218d
+
+Function10218d: ; 10218d
+ ld hl, w5_dc00
+ ld de, wc608
+ ld bc, $26
+ ld a, $05
+ call FarCopyWRAM
+ ld de, wc608 + 1 ; useless
+ ret
+; 10219f
+
+Function10219f: ; 10219f
+ call FadeToMenu
+ call Function10218d
+ ld de, wc608 + 1
+ farcall Function8ac4e
+ call JoyWaitAorB
+ call PlayClickSFX
+ call Function1013aa
+ ret
+; 1021b8
+
+Function1021b8: ; 1021b8
+ call FadeToMenu
+ call Function10218d
+ ld de, wPlayerMoveStruct
+ farcall Function8ac70
+ ld a, c
+ ld [StringBuffer1], a
+ push af
+ call Function1013aa
+ pop af
+ ret
+; 1021d1
+
+UnknownText_0x1021d1: ; 1021d1
+ text_jump UnknownText_0x1bd19a
+ db "@"
+
+UnknownText_0x1021d6: ; 1021d1
+ text_jump UnknownText_0x1bd1ba
+ db "@"
+
+UnknownText_0x1021db: ; 1021d1
+ text_jump UnknownText_0x1bd1dd
+ db "@"
+; 1021e0
+
+Function1021e0: ; 1021e0
+ call MenuTextBox
+ call JoyWaitAorB
+ call ExitMenu
+ ret
+; 1021ea
+
+UnknownText_0x1021ea: ; 1021ea
+ text_jump UnknownText_0x1bd201
+ db "@"
+
+UnknownText_0x1021ef:
+ text_jump UnknownText_0x1bd211
+ db "@"
+
+UnknownText_0x1021f4:
+ text_jump UnknownText_0x1bd223
+ db "@"
+; 1021f9
+
+Function1021f9: ; 1021f9
+ call Function102233
+ ld a, $0 ; Function10234b
+ ld [wcd49], a
+ ld hl, wcd29
+ bit 3, [hl]
+ res 3, [hl]
+ jr z, .asm_10220f
+ ld a, $1 ; Function102361
+ ld [wcd49], a
+
+.asm_10220f
+ call Function1022ca
+ ld a, [wcd49]
+ ld hl, Jumptable_1022f5
+ rst JumpTable
+ call Function102241
+ call Function1022d0
+ jr c, .asm_102231
+ ld a, [wcd49]
+ bit 7, a
+ jr z, .asm_10220f
+ xor a
+ ld hl, wcd29
+ bit 3, [hl]
+ ret z
+ scf
+ ret
+
+.asm_102231
+ xor a
+ ret
+; 102233
+
+Function102233: ; 102233
+ ld hl, wcd49
+ ld bc, 10
+ xor a
+ call ByteFill
+ call Function10304f
+ ret
+; 102241
+
+Function102241: ; 102241
+ call Function10226a
+ call Function102274
+ call Function10224b
+ ret
+; 10224b
+
+Function10224b: ; 10224b
+ ld hl, wcd4b
+ bit 1, [hl]
+ jr nz, .asm_10225e
+ bit 2, [hl]
+ jr nz, .asm_10225e
+ call DelayFrame
+ call DelayFrame
+ xor a
+ ret
+
+.asm_10225e
+ res 1, [hl]
+ res 2, [hl]
+ farcall Mobile_ReloadMapPart
+ scf
+ ret
+; 10226a
+
+Function10226a: ; 10226a
+ ld hl, wcd4b
+ bit 0, [hl]
+ ret z
+ call Function10305d
+ ret
+; 102274
+
+Function102274: ; 102274
+ ld hl, wcd4b
+ bit 3, [hl]
+ ret z
+ res 3, [hl]
+ ld de, 8
+ call PlaySFX
+ ret
+; 102283
+
+Function102283: ; 102283
+ ld a, $01
+ ld [AttrMapEnd], a
+ ld hl, wcd4b
+ set 0, [hl]
+ ret
+; 10228e
+
+Function10228e: ; 10228e
+ xor a
+ ld [AttrMapEnd], a
+ ld hl, wcd4b
+ res 0, [hl]
+ ret
+; 102298
+
+Function102298: ; 102298
+ ld a, e
+ cp $02
+ ret nz
+ ld hl, wcd4b
+ bit 6, [hl]
+ jr z, .asm_1022b6
+ ld hl, wcd4b
+ bit 7, [hl]
+ ld hl, wcd4b
+ set 7, [hl]
+ ret nz
+ ld de, SFX_ELEVATOR_END
+ call PlaySFX
+ jr .asm_1022c1
+
+.asm_1022b6
+ ld hl, wcd4b
+ bit 7, [hl]
+ ld hl, wcd4b
+ res 7, [hl]
+ ret z
+
+.asm_1022c1
+ call Function10304f
+ ld a, $01
+ ld [AttrMapEnd], a
+ ret
+; 1022ca
+
+Function1022ca: ; 1022ca
+ ld a, 30
+ ld [OverworldDelay], a
+ ret
+; 1022d0
+
+Function1022d0: ; 1022d0
+ farcall Function10032e
+ ld a, [wcd2b]
+ and a
+ jr nz, .asm_1022f3
+ call Function102298
+ ld a, [OverworldDelay]
+ ld c, a
+ ld a, 30
+ sub c
+ ld c, a
+ ld b, $03
+ farcall AdvanceMobileInactivityTimerAndCheckExpired
+ jr c, .asm_1022f3
+ xor a
+ ret
+
+.asm_1022f3
+ scf
+ ret
+; 1022f5
+
+Jumptable_1022f5: ; 1022f5
+ dw Function10234b ; 00
+ dw Function102361 ; 01
+ dw Function10236e ; 02
+ dw Function102387 ; 03
+ dw Function1023a1 ; 04
+ dw Function1025c7 ; 05
+ dw Function1025dc ; 06
+ dw Function1024f6 ; 07
+ dw Function10250c ; 08
+ dw Function1024a8 ; 09
+ dw Function102591 ; 0a
+ dw Function1024a8 ; 0b
+ dw Function1025b0 ; 0c
+ dw Function1025bd ; 0d
+ dw Function102814 ; 0e
+ dw Function10283c ; 0f
+ dw Function102862 ; 10
+ dw Function10286f ; 11
+ dw Function1024a8 ; 12
+ dw Function1028a5 ; 13
+ dw Function1028ab ; 14
+ dw Function1023b5 ; 15
+ dw Function1023c6 ; 16
+ dw Function1024af ; 17
+ dw Function102416 ; 18
+ dw Function102423 ; 19
+ dw Function10244b ; 1a
+ dw Function1024af ; 1b
+ dw Function10246a ; 1c
+ dw Function102652 ; 1d
+ dw Function10266b ; 1e
+ dw Function1025e9 ; 1f
+ dw Function1025ff ; 20
+ dw Function102738 ; 21
+ dw Function102754 ; 22
+ dw Function1026b7 ; 23
+ dw Function1026c8 ; 24
+ dw Function1028bf ; 25
+ dw Function1028c6 ; 26
+ dw Function1028d3 ; 27
+ dw Function1028da ; 28
+ dw Function1024a8 ; 29
+ dw Function10248d ; 2a
+; 10234b
+
+Function10234b: ; 10234b
+ call Function102d9a
+ call Function102dd3
+ call Function102dec
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 102361
+
+Function102361: ; 102361
+ ld a, $cc
+ call Function1028e8
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 10236e
+
+Function10236e: ; 10236e
+ call Function1028fc
+ ret nc
+ ld a, [wcd51]
+ cp $cc
+ jr z, .asm_10237f
+ ld a, $f2
+ ld [wcd2b], a
+ ret
+
+.asm_10237f
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 102387
+
+Function102387: ; 102387
+ ld hl, wcd4b
+ set 6, [hl]
+ xor a
+ ld [wdc5f], a
+ ld de, MUSIC_ROUTE_30
+ call PlayMusic
+ call Function102d9a
+ call Function102dd3
+ ld a, $01
+ ld [wMenuCursorY], a
+
+Function1023a1: ; 1023a1
+ call Function102283
+ call Function102db7
+ call Function102dec
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, $1d
+ ld [wcd49], a
+ ret
+; 1023b5
+
+Function1023b5: ; 1023b5
+ call Function10228e
+ call Function102a3b
+ call Function102b12
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 1023c6
+
+Function1023c6: ; 1023c6
+ call Function102c48
+ call Function102c87
+ ld a, [wcd4c]
+ dec a
+ ld [CurPartyMon], a
+ xor a
+ ld [wPokemonWithdrawDepositParameter], a
+ farcall RemoveMonFromPartyOrBox
+ ld hl, PartyCount
+ inc [hl]
+ ld a, [hli]
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld [hl], $ff
+ ld a, [PartyCount]
+ ld [wcd4c], a
+ call Function102c07
+ call Function102d48
+ call Function102b32
+ call Function102f50
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, $14
+ ld [wcd4e], a
+ ld a, 0
+ ld [wcd4f], a
+ ld a, 0
+ ld [wcd4a], a
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 102416
+
+Function102416: ; 102416
+ ld a, $aa
+ call Function1028e8
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 102423
+
+Function102423: ; 102423
+ call Function102921
+ ret nc
+ farcall SaveAfterLinkTrade
+ farcall TrainerRankings_Trades
+ farcall BackupMobileEventIndex
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, 0
+ ld [wcd4a], a
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 10244b
+
+Function10244b: ; 10244b
+ call Function102f32
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, $19
+ ld [wcd4e], a
+ ld a, 0
+ ld [wcd4f], a
+ ld a, 0
+ ld [wcd4a], a
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 10246a
+
+Function10246a: ; 10246a
+ call Function102d9a
+ ld hl, wcd29
+ set 3, [hl]
+ call Function102e07
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, $2a
+ ld [wcd49], a
+ ret
+; 102480
+
+Function102480: ; 102480
+ ld c, $32
+ call DelayFrames
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 10248d
+
+Function10248d: ; 10248d
+ ld a, [wcd49]
+ set 7, a
+ ld [wcd49], a
+ ret
+; 102496
+
+Function102496: ; 102496
+ ld hl, wcd4e
+ dec [hl]
+ ret nz
+ ld a, 0
+ ld [wcd4a], a
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 1024a8
+
+Function1024a8: ; 1024a8
+ farcall Function1009f3
+ ret c
+
+Function1024af: ; 1024af
+ call GetJoypad
+ ld a, [wcd4a]
+ ld hl, Jumptable_1024ba
+ rst JumpTable
+ ret
+; 1024ba
+
+Jumptable_1024ba: ; 1024ba
+ dw Function1024c0
+ dw Function1024cb
+ dw Function1024de
+; 1024c0
+
+Function1024c0: ; 1024c0
+ ld hl, wcd4e
+ inc [hl]
+ ld a, [wcd4a]
+ inc a
+ ld [wcd4a], a
+
+Function1024cb: ; 1024cb
+ ld hl, wcd4e
+ dec [hl]
+ ret nz
+ ld a, [wcd4f]
+ inc a
+ ld [wcd4e], a
+ ld a, [wcd4a]
+ inc a
+ ld [wcd4a], a
+
+Function1024de: ; 1024de
+ ld hl, wcd4e
+ dec [hl]
+ jr z, .asm_1024e9
+ ld a, [hJoyPressed]
+ and A_BUTTON | B_BUTTON
+ ret z
+
+.asm_1024e9
+ ld a, 0
+ ld [wcd4a], a
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 1024f6
+
+Function1024f6: ; 1024f6
+ call PlaceHollowCursor
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, [wcd4c]
+ call Function1028e8
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 10250c
+
+Function10250c: ; 10250c
+ call Function1028fc
+ ret nc
+ ld a, [wcd51]
+ cp $0f
+ jr z, .asm_10254b
+ and a
+ jr z, .asm_102572
+ cp $aa
+ jr z, .asm_102572
+ cp $07
+ jr nc, .asm_102572
+ ld [wcd4d], a
+ dec a
+ ld [wd003], a
+ ld a, [wcd4c]
+ dec a
+ ld [wd002], a
+ call Function102b9c
+ call Function102bdc
+ jr c, .asm_10256d
+ farcall Functionfb5dd
+ jr c, .asm_102568
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, $0e
+ ld [wcd49], a
+ ret
+
+.asm_10254b
+ call Function103021
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, 0
+ ld [wcd4a], a
+ ld a, $1e
+ ld [wcd4e], a
+ ld a, $1e
+ ld [wcd4f], a
+ ld a, $29
+ ld [wcd49], a
+ ret
+
+.asm_102568
+ call Function102ff5
+ jr .asm_102577
+
+.asm_10256d
+ call Function102f85
+ jr .asm_102577
+
+.asm_102572
+ call Function102fce
+ jr .asm_102577
+
+.asm_102577
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, 0
+ ld [wcd4a], a
+ ld a, $1e
+ ld [wcd4e], a
+ ld a, $3c
+ ld [wcd4f], a
+ ld a, $09
+ ld [wcd49], a
+ ret
+; 102591
+
+Function102591: ; 102591
+ call Function102ee7
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, 0
+ ld [wcd4a], a
+ ld a, $1e
+ ld [wcd4e], a
+ ld a, $3c
+ ld [wcd4f], a
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 1025b0
+
+Function1025b0: ; 1025b0
+ ld a, $09
+ call Function1028e8
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 1025bd
+
+Function1025bd: ; 1025bd
+ call Function1028fc
+ ret nc
+ ld a, $04
+ ld [wcd49], a
+ ret
+; 1025c7
+
+Function1025c7: ; 1025c7
+ call Function102f6d
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, $0f
+ call Function1028e8
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 1025dc
+
+Function1025dc: ; 1025dc
+ call Function1028fc
+ ret nc
+ ld a, [wcd49]
+ set 7, a
+ ld [wcd49], a
+ ret
+; 1025e9
+
+Function1025e9: ; 1025e9
+ nop
+ ld hl, wcd4b
+ set 6, [hl]
+ call Function102b4e
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 1025ff
+
+Function1025ff: ; 1025ff
+ ld hl, wcd4b
+ set 2, [hl]
+ farcall Function1009f3
+ ret c
+ farcall MobileMenuJoypad
+ ld a, [wMenuJoypadFilter]
+ and c
+ ret z
+ bit A_BUTTON_F, c
+ jr nz, .a_button
+ bit D_UP_F, c
+ jr nz, .d_up
+ bit D_DOWN_F, c
+ jr nz, .d_down
+ ret
+
+.a_button
+ ld hl, wcd4b
+ set 3, [hl]
+ ld a, $27 ; Function1028d3
+ ld [wcd49], a
+ ret
+
+.d_up
+ ld a, [wMenuCursorY]
+ ld b, a
+ ld a, [OTPartyCount]
+ cp b
+ ret nz
+ call HideCursor
+ ld a, [PartyCount]
+ ld [wMenuCursorY], a
+ ld a, $1d ; Function102652
+ ld [wcd49], a
+ ret
+
+.d_down
+ ld a, [wMenuCursorY]
+ cp $01
+ ret nz
+ ld a, $23 ; Function1026b7
+ ld [wcd49], a
+ ret
+; 102652
+
+Function102652: ; 102652
+ nop
+ ld hl, wcd4b
+ set 6, [hl]
+ nop
+ call Function102b7b
+ nop
+ ld hl, wcd4b
+ set 1, [hl]
+ nop
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 10266b
+
+Function10266b: ; 10266b
+ ld hl, wcd4b
+ set 2, [hl]
+ farcall Function1009f3
+ ret c
+ farcall MobileMenuJoypad
+ ld a, [wMenuJoypadFilter]
+ and c
+ ret z
+ bit A_BUTTON_F, c
+ jr nz, .a_button
+ bit D_DOWN_F, c
+ jr nz, .d_down
+ bit D_UP_F, c
+ jr nz, .d_up
+ ret
+
+.a_button
+ ld hl, wcd4b
+ set 3, [hl]
+ ld a, $21 ; Function102738
+ ld [wcd49], a
+ ret
+
+.d_down
+ ld a, [wMenuCursorY]
+ dec a
+ ret nz
+ call HideCursor
+ ld a, $1f ; Function1025e9
+ ld [wcd49], a
+ ret
+
+.d_up
+ ld a, [wMenuCursorY]
+ ld b, a
+ ld a, [PartyCount]
+ cp b
+ ret nz
+ ld a, $23 ; Function1026b7
+ ld [wcd49], a
+ ret
+; 1026b7
+
+Function1026b7: ; 1026b7
+ ld hl, wcd4b
+ set 6, [hl]
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ld a, 0
+ ld [wcd4a], a
+
+Function1026c8: ; 1026c8
+ call GetJoypad
+ farcall Function1009f3
+ ret c
+ ld a, [wcd4a]
+ ld hl, Jumptable_1026da
+ rst JumpTable
+ ret
+; 1026da
+
+Jumptable_1026da: ; 1026da
+ dw Function1026de
+ dw Function1026f3
+; 1026de
+
+Function1026de: ; 1026de
+ call HideCursor
+ hlcoord 9, 17
+ ld [hl], $ed
+ ld a, [wcd4a]
+ inc a
+ ld [wcd4a], a
+ ld hl, wcd4b
+ set 1, [hl]
+ ret
+; 1026f3
+
+Function1026f3: ; 1026f3
+ ld a, [hJoyPressed]
+ bit A_BUTTON_F, a
+ jr nz, .asm_102723
+ bit D_UP_F, a
+ jr nz, .asm_102712
+ bit D_DOWN_F, a
+ jr nz, .asm_102702
+ ret
+
+.asm_102702
+ hlcoord 9, 17
+ ld [hl], " "
+ ld a, $01
+ ld [wMenuCursorY], a
+ ld a, $1d ; Function102652
+ ld [wcd49], a
+ ret
+
+.asm_102712
+ hlcoord 9, 17
+ ld [hl], " "
+ ld a, [OTPartyCount]
+ ld [wMenuCursorY], a
+ ld a, $1f ; Function1025e9
+ ld [wcd49], a
+ ret
+
+.asm_102723
+ hlcoord 9, 17
+ ld [hl], "▷"
+ ld hl, wcd4b
+ set 3, [hl]
+ ld hl, wcd4b
+ set 2, [hl]
+ ld a, $5 ; Function1025c7
+ ld [wcd49], a
+ ret
+; 102738
+
+Function102738: ; 102738
+ ld hl, wcd4b
+ set 6, [hl]
+ call PlaceHollowCursor
+ call Function1027eb
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ld a, 0
+ ld [wcd4a], a
+
+Function102754: ; 102754
+ call GetJoypad
+ farcall Function1009f3
+ ret c
+ ld a, [wcd4a]
+ ld hl, Jumptable_102766
+ rst JumpTable
+ ret
+; 102766
+
+Jumptable_102766: ; 102766
+ dw Function102770
+ dw Function102775
+ dw Function10278c
+ dw Function1027a0
+ dw Function1027b7
+; 102770
+
+Function102770: ; 102770
+ ld a, $01
+ ld [wcd4a], a
+
+Function102775: ; 102775
+ hlcoord 1, 16
+ ld [hl], "▶"
+ hlcoord 11, 16
+ ld [hl], " "
+ ld hl, wcd4b
+ set 2, [hl]
+ ld a, [wcd4a]
+ inc a
+ ld [wcd4a], a
+ ret
+; 10278c
+
+Function10278c: ; 10278c
+ ld a, [hJoyPressed]
+ bit A_BUTTON_F, a
+ jr nz, asm_1027c6
+ bit B_BUTTON_F, a
+ jr nz, asm_1027e2
+ bit D_RIGHT_F, a
+ jr nz, .asm_10279b
+ ret
+
+.asm_10279b
+ ld a, $03
+ ld [wcd4a], a
+Function1027a0: ; 1027a0
+ hlcoord 1, 16
+ ld [hl], " "
+ hlcoord 11, 16
+ ld [hl], "▶"
+ ld hl, wcd4b
+ set 2, [hl]
+ ld a, [wcd4a]
+ inc a
+ ld [wcd4a], a
+ ret
+
+Function1027b7: ; 1027b7
+ ld a, [hJoyPressed]
+ bit A_BUTTON_F, a
+ jr nz, asm_1027d1
+ bit B_BUTTON_F, a
+ jr nz, asm_1027e2
+ bit D_LEFT_F, a
+ jr nz, Function102770
+ ret
+
+asm_1027c6:
+ ld hl, wcd4b
+ set 3, [hl]
+ ld a, $25 ; Function1028bf
+ ld [wcd49], a
+ ret
+
+asm_1027d1:
+ ld hl, wcd4b
+ set 3, [hl]
+ ld a, [wMenuCursorY]
+ ld [wcd4c], a
+ ld a, $7 ; Function1024f6
+ ld [wcd49], a
+ ret
+
+asm_1027e2:
+ call Function102db7
+ ld a, $1d ; Function102652
+ ld [wcd49], a
+ ret
+; 1027eb
+
+Function1027eb: ; 1027eb
+ hlcoord 0, 14
+ ld b, 2
+ ld c, 18
+ ld d, h
+ ld e, l
+ farcall _LinkTextbox
+ ld de, .Stats_Trade
+ hlcoord 2, 16
+ call PlaceString
+ ret
+; 102804
+
+.Stats_Trade: ; 102804
+ db "STATS TRADE@"
+; 102814
+
+Function102814: ; 102814
+ ld a, [wMenuCursorY]
+ ld [wcd52], a
+ ld a, [wcd4c]
+ dec a
+ ld [wd002], a
+ ld a, [wcd4d]
+ dec a
+ ld [wd003], a
+ call Function102ea8
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ld a, 0
+ ld [wcd4a], a
+ ld hl, wcd4b
+ set 1, [hl]
+
+Function10283c: ; 10283c
+ ld hl, wcd4b
+ set 2, [hl]
+ call Function1029c3
+ ret z
+ jr c, .asm_102852
+ ld a, $10 ; Function102862
+ ld [wcd49], a
+ ld hl, wcd4b
+ set 1, [hl]
+ ret
+
+.asm_102852
+ ld a, $14 ; Function1028ab
+ ld [wcd49], a
+ ld hl, wcd4b
+ set 3, [hl]
+ ld hl, wcd4b
+ set 1, [hl]
+ ret
+; 102862
+
+Function102862: ; 102862
+ ld a, $08
+ call Function1028e8
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 10286f
+
+Function10286f: ; 10286f
+ call Function1028fc
+ ret nc
+ ld a, [wcd52]
+ ld [wMenuCursorY], a
+ ld a, [wcd51]
+ cp $08
+ jr nz, .asm_102886
+ ld a, $15 ; Function1023b5
+ ld [wcd49], a
+ ret
+
+.asm_102886
+ call Function102ee7
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, $1e
+ ld [wcd4e], a
+ ld a, $3c
+ ld [wcd4f], a
+ ld a, 0
+ ld [wcd4a], a
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ret
+; 1028a5
+
+Function1028a5: ; 1028a5
+ ld a, $4 ; Function1023a1
+ ld [wcd49], a
+ ret
+; 1028ab
+
+Function1028ab: ; 1028ab
+ ld a, [wcd52]
+ ld [wMenuCursorY], a
+ call Function102f15
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, $c ; Function1025b0
+ ld [wcd49], a
+ ret
+; 1028bf
+
+Function1028bf: ; 1028bf
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+
+Function1028c6: ; 1028c6
+ xor a
+ ld [MonType], a
+ call Function102bac
+ ld a, $1d ; Function102652
+ ld [wcd49], a
+ ret
+; 1028d3
+
+Function1028d3: ; 1028d3
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+
+Function1028da: ; 1028da
+ ld a, OTPARTYMON
+ ld [MonType], a
+ call Function102bac
+ ld a, $1f ; Function1025e9
+ ld [wcd49], a
+ ret
+; 1028e8
+
+Function1028e8: ; 1028e8
+ ld hl, wcd4b
+ res 6, [hl]
+ ld [wcd50], a
+ farcall StartMobileInactivityTimer
+ ld a, 0
+ ld [wcd4a], a
+ ret
+; 1028fc
+
+Function1028fc: ; 1028fc
+ call GetJoypad
+ farcall Function1009f3
+ jr nc, .asm_102909
+ and a
+ ret
+
+.asm_102909
+ ld a, [wcd4a]
+ ld hl, Jumptable_102917
+ rst JumpTable
+ ret nc
+ ld a, 0
+ ld [wcd4a], a
+ ret
+; 102917
+
+Jumptable_102917: ; 102917
+ dw Function102933
+ dw Function10294f
+ dw Function10295d
+ dw Function10296e
+ dw Function102996
+; 102921
+
+Function102921: ; 102921
+ ld a, [wcd4a]
+ ld hl, Jumptable_10292f
+ rst JumpTable
+ ret nc
+ ld a, 0
+ ld [wcd4a], a
+ ret
+; 10292f
+
+Jumptable_10292f: ; 10292f
+ dw Function10295d
+ dw Function102984
+; 102933
+
+Function102933: ; 102933
+ ld hl, MenuDataHeader_1029bb
+ call LoadMenuDataHeader
+ call Function102e07
+ ld a, $32
+ ld [TextDelayFrames], a
+ ld hl, wcd4b
+ set 1, [hl]
+ ld a, [wcd4a]
+ inc a
+ ld [wcd4a], a
+ and a
+ ret
+; 10294f
+
+Function10294f: ; 10294f
+ ld a, [TextDelayFrames]
+ and a
+ ret nz
+ ld a, [wcd4a]
+ inc a
+ ld [wcd4a], a
+ and a
+ ret
+; 10295d
+
+Function10295d: ; 10295d
+ call Function10299e
+ ld a, 0
+ ld [wcd27], a
+ ld a, [wcd4a]
+ inc a
+ ld [wcd4a], a
+ and a
+ ret
+; 10296e
+
+Function10296e: ; 10296e
+ farcall Function100382
+ and a
+ ld a, [wcd27]
+ bit 7, a
+ ret z
+ ld a, [wcd4a]
+ inc a
+ ld [wcd4a], a
+ and a
+ ret
+; 102984
+
+Function102984: ; 102984
+ farcall Function100382
+ and a
+ ld a, [wcd27]
+ bit 7, a
+ ret z
+ call Function1029af
+ scf
+ ret
+; 102996
+
+Function102996: ; 102996
+ call Function1029af
+ call ExitMenu
+ scf
+ ret
+; 10299e
+
+Function10299e: ; 10299e
+ ld a, $01
+ ld [wccb4], a
+ ld a, [wcd50]
+ ld [wccb5], a
+ ld a, $aa
+ ld [wcd51], a
+ ret
+; 1029af
+
+Function1029af: ; 1029af
+ ld hl, wcd4b
+ res 7, [hl]
+ ld a, [wcc61]
+ ld [wcd51], a
+ ret
+; 1029bb
+
+MenuDataHeader_1029bb: ; 1029bb
+ db $40 ; flags
+ db 10, 3 ; start coords
+ db 12, 15 ; end coords
+ dw NULL
+ db 1 ; default option
+; 1029c3
+
+Function1029c3: ; 1029c3
+ ld a, [wcd4a]
+ ld hl, Jumptable_1029cb
+ rst JumpTable
+ ret
+; 1029cb
+
+Jumptable_1029cb: ; 1029cb
+ dw Function1029cf
+ dw Function1029fe
+; 1029cf
+
+Function1029cf: ; 1029cf
+ call LoadStandardMenuDataHeader
+ hlcoord 10, 7
+ ld b, 3
+ ld c, 8
+ ld d, h
+ ld e, l
+ farcall _LinkTextbox
+ ld de, String_102a26
+ hlcoord 12, 8
+ call PlaceString
+ ld hl, wcd4b
+ set 1, [hl]
+ ld de, MenuData3_102a33
+ call SetMenuAttributes
+ ld a, [wcd4a]
+ inc a
+ ld [wcd4a], a
+ xor a
+ ret
+; 1029fe
+
+Function1029fe: ; 1029fe
+ farcall Function1009f3
+ ret c
+ farcall MobileMenuJoypad
+ ld a, c
+ ld hl, wMenuJoypadFilter
+ and [hl]
+ ret z
+ push af
+ call ExitMenu
+ pop af
+ ld a, [wMenuCursorY]
+ cp $01
+ jr nz, .asm_102a21
+ ld a, $01
+ and a
+ ret
+
+.asm_102a21
+ ld a, $01
+ and a
+ scf
+ ret
+; 102a26
+
+String_102a26: ; 102a26
+ db "TRADE"
+ next "CANCEL"
+ db "@"
+; 102a33
+
+MenuData3_102a33:
+ db 8, 11
+ db 2, 1
+ db $80, $00
+ dn 2, 0
+ db A_BUTTON
+
+Function102a3b: ; 102a3b
+ ld a, [wcd30]
+ ld [wc74e], a
+ ld hl, PlayerName
+ ld de, wPlayerTrademonSenderName
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ ld a, [wcd4c]
+ dec a
+ ld c, a
+ ld b, 0
+ ld hl, PartySpecies
+ add hl, bc
+ ld a, [hl]
+ ld [wPlayerTrademonSpecies], a
+ ld a, [wcd4c]
+ dec a
+ ld hl, PartyMonOT
+ call SkipNames
+ ld de, wPlayerTrademonOTName
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ ld a, [wcd4c]
+ dec a
+ ld hl, PartyMon1ID
+ call GetPartyLocation
+ ld a, [hli]
+ ld [wPlayerTrademonID], a
+ ld a, [hl]
+ ld [wPlayerTrademonID + 1], a
+ ld a, [wcd4c]
+ dec a
+ ld hl, PartyMon1DVs
+ call GetPartyLocation
+ ld a, [hli]
+ ld [wPlayerTrademonDVs], a
+ ld a, [hl]
+ ld [wPlayerTrademonDVs + 1], a
+ ld a, [wcd4c]
+ dec a
+ ld hl, PartyMon1Species
+ call GetPartyLocation
+ ld b, h
+ ld c, l
+ farcall GetCaughtGender
+ ld a, c
+ ld [wPlayerTrademonCaughtData], a
+ ld hl, OTPlayerName
+ ld de, wOTTrademonSenderName
+ ld bc, NAME_LENGTH
+ call CopyBytes
+
+ ld a, [wcd4d]
+ dec a
+ ld c, a
+ ld b, 0
+ ld hl, OTPartySpecies
+ add hl, bc
+ ld a, [hl]
+ ld [wOTTrademonSpecies], a
+ ld a, [wcd4d]
+ dec a
+ ld hl, OTPartyMonOT
+ call SkipNames
+ ld de, wOTTrademonOTName
+ ld bc, NAME_LENGTH
+ call CopyBytes
+ ld a, [wcd4d]
+ dec a
+ ld hl, OTPartyMon1ID
+ call GetPartyLocation
+ ld a, [hli]
+ ld [wOTTrademonID], a
+ ld a, [hl]
+ ld [wOTTrademonID + 1], a
+ ld a, [wcd4d]
+ dec a
+ ld hl, OTPartyMon1DVs
+ call GetPartyLocation
+ ld a, [hli]
+ ld [wOTTrademonDVs], a
+ ld a, [hl]
+ ld [wOTTrademonDVs + 1], a
+ ld a, [wcd4d]
+ dec a
+ ld hl, OTPartyMon1Species
+ call GetPartyLocation
+ ld b, h
+ ld c, l
+ farcall GetCaughtGender
+ ld a, c
+ ld [wOTTrademonCaughtData], a
+ ret
+; 102b12
+
+Function102b12: ; 102b12
+ ld c, 100
+ call DelayFrames
+ call Function102d9a
+ call LoadFontsBattleExtra
+ ld a, [wcd2f]
+ and a
+ jr nz, .asm_102b2b
+ farcall Function108026
+ jr .asm_102b31
+
+.asm_102b2b
+ farcall Function10802a
+
+.asm_102b31
+ ret
+; 102b32
+
+Function102b32: ; 102b32
+ ld a, [wcd4c]
+ dec a
+ ld [CurPartyMon], a
+ ld a, $01
+ ld [wForceEvolution], a
+ farcall EvolvePokemon
+ call Function102d9a
+ call Function102dd3
+ call Function102dec
+ ret
+; 102b4e
+
+Function102b4e: ; 102b4e
+ ld a, OTPARTYMON
+ ld [MonType], a
+ ld a, [wMenuCursorY]
+ push af
+ ld de, Unknown_102b73
+ call SetMenuAttributes
+ pop af
+ ld [wMenuCursorY], a
+ ld a, [OTPartyCount]
+ ld [w2DMenuNumRows], a
+ ret
+; 102b68
+
+Function102b68: ; 102b68 ; unreferenced
+ xor a
+ ld hl, wWindowStackPointer
+ ld bc, $10
+ call ByteFill
+ ret
+; 102b73
+
+Unknown_102b73:
+ db 9, 6
+ db 255, 1
+ db $a0, $00
+ dn 1, 0
+ db D_UP | D_DOWN | A_BUTTON
+
+Function102b7b: ; 102b7b
+ xor a
+ ld [MonType], a
+ ld a, [wMenuCursorY]
+ push af
+ ld de, Unknown_102b94
+ call SetMenuAttributes
+ pop af
+ ld [wMenuCursorY], a
+ ld a, [PartyCount]
+ ld [w2DMenuNumRows], a
+ ret
+; 102b94
+
+Unknown_102b94:
+ db 1, 6
+ db 255, 1
+ db $a0, $00
+ dn 1, 0
+ db D_UP | D_DOWN | A_BUTTON
+
+Function102b9c: ; 102b9c
+ ld a, [wcd4d]
+ dec a
+ hlcoord 6, 9
+ ld bc, $14
+ call AddNTimes
+ ld [hl], $ec
+ ret
+; 102bac
+
+Function102bac: ; 102bac
+ ld a, [wMenuCursorY]
+ dec a
+ ld [CurPartyMon], a
+ call LowVolume
+ call ClearSprites
+ farcall _MobileStatsScreenInit
+ ld a, [CurPartyMon]
+ inc a
+ ld [wMenuCursorY], a
+ call Function102d9a
+ call ClearPalettes
+ call DelayFrame
+ call MaxVolume
+ call Function102dd3
+ call Function102dec
+ call Function102db7
+ ret
+; 102bdc
+
+Function102bdc: ; 102bdc
+ ld a, [wcd4d]
+ dec a
+ ld hl, OTPartyMon1Species
+ call GetPartyLocation
+ push hl
+ ld a, [wcd4d]
+ ld c, a
+ ld b, 0
+ ld hl, OTPartyCount
+ add hl, bc
+ ld a, [hl]
+ pop hl
+ cp EGG
+ jr z, .asm_102bfa
+ cp [hl]
+ jr nz, .asm_102c05
+
+.asm_102bfa
+ ld bc, MON_LEVEL
+ add hl, bc
+ ld a, [hl]
+ cp MAX_LEVEL + 1
+ jr nc, .asm_102c05
+ and a
+ ret
+
+.asm_102c05
+ scf
+ ret
+; 102c07
+
+Function102c07: ; 102c07
+ call Function102c14
+ call Function102c3b
+ call Function102c21
+ call Function102c2e
+ ret
+; 102c14
+
+Function102c14: ; 102c14
+ ld hl, PartySpecies
+ ld de, OTPartySpecies
+ ld bc, 1
+ call Function102c71
+ ret
+; 102c21
+
+Function102c21: ; 102c21
+ ld hl, PartyMonNicknames
+ ld de, OTPartyMonNicknames
+ ld bc, 11
+ call Function102c71
+ ret
+; 102c2e
+
+Function102c2e: ; 102c2e
+ ld hl, PartyMonOT
+ ld de, OTPartyMonOT
+ ld bc, 11
+ call Function102c71
+ ret
+; 102c3b
+
+Function102c3b: ; 102c3b
+ ld hl, PartyMon1
+ ld de, OTPartyMon1
+ ld bc, $30
+ call Function102c71
+ ret
+; 102c48
+
+Function102c48: ; 102c48
+ farcall Function10165a
+ ld a, 0
+ call GetSRAMBank
+ ld hl, $a600
+ ld de, wc608
+ ld bc, $2f
+ call Function102c71
+ call CloseSRAM
+ ld hl, wc608
+ ld de, w5_da00
+ ld bc, $1e0
+ ld a, $05
+ call FarCopyWRAM
+ ret
+; 102c71
+
+Function102c71: ; 102c71
+ ld a, [wcd4c]
+ dec a
+ call AddNTimes
+ push hl
+ ld h, d
+ ld l, e
+ ld a, [wcd4d]
+ dec a
+ call AddNTimes
+ pop de
+ call SwapBytes
+ ret
+; 102c87
+
+Function102c87: ; 102c87
+ ld a, [wJumptableIndex]
+ push af
+ ld a, [wcf64]
+ push af
+ ld a, [wcd4c]
+ ld [wJumptableIndex], a
+ ld a, [PartyCount]
+ ld [wcf64], a
+ ld a, 0
+ ld hl, $a600
+ ld de, wc608
+ ld bc, $11a
+ call Function102d3e
+ call Function102cee
+ ld a, 0
+ ld hl, wc608
+ ld de, $a600
+ ld bc, $11a
+ call Function102d3e
+ ld a, [wcd4d]
+ ld [wJumptableIndex], a
+ ld a, [OTPartyCount]
+ ld [wcf64], a
+ ld a, $05
+ ld hl, w5_da00
+ ld de, wc608
+ ld bc, $11a
+ call FarCopyWRAM
+ call Function102cee
+ ld a, $05
+ ld hl, wc608
+ ld de, w5_da00
+ ld bc, $11a
+ call FarCopyWRAM
+ pop af
+ ld [wcf64], a
+ pop af
+ ld [wJumptableIndex], a
+ ret
+; 102cee
+
+Function102cee: ; 102cee
+ ld a, [wJumptableIndex]
+ dec a
+ call Function102d34
+ ld de, wd002
+ ld bc, $2f
+ call CopyBytes
+ ld a, [wJumptableIndex]
+ ld c, a
+ ld a, $06
+ sub c
+ ret z
+ ld bc, $2f
+ ld hl, 0
+ call AddNTimes
+ push hl
+ ld a, [wJumptableIndex]
+ dec a
+ call Function102d34
+ ld d, h
+ ld e, l
+ ld hl, $2f
+ add hl, de
+ pop bc
+ call CopyBytes
+ ld a, [wcf64]
+ dec a
+ call Function102d34
+ ld d, h
+ ld e, l
+ ld hl, wd002
+ ld bc, $2f
+ call CopyBytes
+ ret
+; 102d34
+
+Function102d34: ; 102d34
+ ld hl, wc608
+ ld bc, $2f
+ call AddNTimes
+ ret
+; 102d3e
+
+Function102d3e: ; 102d3e
+ call GetSRAMBank
+ call CopyBytes
+ call CloseSRAM
+ ret
+; 102d48
+
+Function102d48: ; 102d48
+ ld a, [wcd4c]
+ ld e, a
+ ld d, 0
+ ld hl, PartyCount
+ add hl, de
+ ld a, [hl]
+ ld [wd265], a
+ cp EGG
+ jr z, .asm_102d6d
+ dec a
+ call SetSeenAndCaughtMon
+ ld a, [wcd4c]
+ dec a
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld hl, PartyMon1Happiness
+ call AddNTimes
+ ld [hl], BASE_HAPPINESS
+
+.asm_102d6d
+ ld a, [wd265]
+ cp UNOWN
+ jr nz, .asm_102d98
+ ld a, [wcd4c]
+ dec a
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld hl, PartyMon1DVs
+ call AddNTimes
+ predef GetUnownLetter
+ farcall UpdateUnownDex
+ ld a, [wFirstUnownSeen]
+ and a
+ jr nz, .asm_102d98
+ ld a, [UnownLetter]
+ ld [wFirstUnownSeen], a
+
+.asm_102d98
+ and a
+ ret
+; 102d9a
+
+Function102d9a: ; 102d9a
+ ld a, " "
+ hlcoord 0, 0
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ call ByteFill
+ ld a, $07
+ hlcoord 0, 0, AttrMap
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ call ByteFill
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
+ ret
+; 102db7
+
+Function102db7: ; 102db7
+ call Function102e4f
+ call Function102e3e
+ ld hl, wcd4b
+ set 1, [hl]
+ ret
+; 102dc3
+
+Function102dc3: ; 102dc3
+ hlcoord 0, 12
+ ld b, 4
+ ld c, 18
+ ld d, h
+ ld e, l
+ farcall _LinkTextbox
+ ret
+; 102dd3
+
+Function102dd3: ; 102dd3
+ call DisableLCD
+ ld de, GFX_1032a2
+ ld hl, VTiles0
+ lb bc, BANK(GFX_1032a2), 4
+ call Get2bpp
+ farcall __LoadTradeScreenBorder
+ call EnableLCD
+ ret
+; 102dec
+
+Function102dec: ; 102dec
+ ld hl, Palettes_1032e2
+ ld de, UnknOBPals
+ ld bc, 4 palettes
+ ld a, $05
+ call FarCopyWRAM
+ farcall Function49742
+ call SetPalettes
+ call DelayFrame
+ ret
+; 102e07
+
+Function102e07: ; 102e07
+ hlcoord 3, 10
+ ld b, 1
+ ld c, 11
+ ld a, [wBattleMode]
+ and a
+ jr z, .link_battle
+ call TextBox
+ jr .okay
+
+.link_battle
+; this is idiotic
+ hlcoord 3, 10
+ ld b, 1
+ ld c, 11
+ ld d, h
+ ld e, l
+ farcall _LinkTextbox
+
+.okay
+ ld de, .waiting
+ hlcoord 4, 11
+ call PlaceString
+ ret
+; 102e32
+
+.waiting ; 102e32
+ db "Waiting...!@"
+; 102e3e
+
+Function102e3e: ; 102e3e
+ ld de, .CANCEL
+ hlcoord 10, 17
+ call PlaceString
+ ret
+; 102e48
+
+.CANCEL: ; 102e48
+ db "CANCEL@"
+; 102e4f
+
+Function102e4f: ; 102e4f
+ farcall Function16d42e
+ farcall _InitMG_Mobile_LinkTradePalMap
+ ld de, PlayerName
+ hlcoord 4, 0
+ call PlaceString
+ ld a, $14
+ ld [bc], a
+ ld de, OTPlayerName
+ hlcoord 4, 8
+ call PlaceString
+ ld a, $14
+ ld [bc], a
+ hlcoord 7, 1
+ ld de, PartySpecies
+ call .PlaceSpeciesNames
+ hlcoord 7, 9
+ ld de, OTPartySpecies
+ call .PlaceSpeciesNames
+ ret
+; 102e86
+
+.PlaceSpeciesNames: ; 102e86
+ ld c, 0
+.count_loop
+ ld a, [de]
+ cp $ff
+ ret z
+ ld [wd265], a
+ push bc
+ push hl
+ push de
+ push hl
+ ld a, c
+ ld [hDividend], a
+ call GetPokemonName
+ pop hl
+ call PlaceString
+ pop de
+ inc de
+ pop hl
+ ld bc, SCREEN_WIDTH
+ add hl, bc
+ pop bc
+ inc c
+ jr .count_loop
+; 102ea8
+
+Function102ea8: ; 102ea8
+ call Function102dc3
+ ld a, [wcd4c]
+ dec a
+ ld c, a
+ ld b, 0
+ ld hl, PartySpecies
+ add hl, bc
+ ld a, [hl]
+ ld [wd265], a
+ call GetPokemonName
+ ld hl, StringBuffer1
+ ld de, StringBuffer2
+ ld bc, 11
+ call CopyBytes
+ ld a, [wcd4d]
+ dec a
+ ld c, a
+ ld b, 0
+ ld hl, OTPartySpecies
+ add hl, bc
+ ld a, [hl]
+ ld [wd265], a
+ call GetPokemonName
+ ld hl, UnknownText_0x102ee2
+ call PrintTextBoxText
+ ret
+; 102ee2
+
+UnknownText_0x102ee2: ; 102ee2
+ text_jump UnknownText_0x1bd286
+ db "@"
+
+Function102ee7: ; 102ee7
+ call Function102dc3
+ ld de, String_102ef4
+ hlcoord 1, 14
+ call PlaceString
+ ret
+; 102ef4
+
+String_102ef4: ; 102ef4
+ db "Too bad! The trade"
+ next "was canceled!"
+ db "@"
+; 102f15
+
+Function102f15: ; 102f15
+ call Function102dc3
+ ld de, .TooBadTheTradeWasCanceled
+ hlcoord 1, 14
+ call PlaceString
+ ret
+; 102f22
+
+.TooBadTheTradeWasCanceled: ; 102f22
+ db "こうかんを キャンセルしました@"
+; 102f32
+
+Function102f32: ; 102f32
+ call Function102dc3
+ ld de, .TradeCompleted
+ hlcoord 1, 14
+ call PlaceString
+ ret
+; 102f3f
+
+.TradeCompleted: ; 102f3f
+ db "Trade completed!@"
+; 102f50
+
+Function102f50: ; 102f50
+ call Function102dc3
+ ld de, .PleaseWait
+ hlcoord 1, 14
+ call PlaceString
+ ret
+; 102f5d
+
+.PleaseWait: ; 102f5d
+ db "しょうしょう おまち ください@"
+; 102f6d
+
+Function102f6d: ; 102f6d
+ call Function102dc3
+ ld de, .Finished
+ hlcoord 1, 14
+ call PlaceString
+ ret
+; 102f7a
+
+.Finished: ; 102f7a
+ db "しゅうりょう します@"
+; 102f85
+
+Function102f85: ; 102f85
+ ld a, [wd003]
+ ld c, a
+ ld b, 0
+ ld hl, OTPartySpecies
+ add hl, bc
+ ld a, [hl]
+ ld [wd265], a
+ call GetPokemonName
+ call Function102dc3
+ ld de, String_102fb2
+ hlcoord 1, 14
+ call PlaceString
+ ld de, StringBuffer1
+ hlcoord 13, 14
+ call PlaceString
+ ld de, String_102fcc
+ call PlaceString
+ ret
+; 102fb2
+
+String_102fb2: ; 102fb2
+ db "あいてがわ<PKMN>えらんだ "
+ next "いじょう<PKMN>あるようです!!"
+ db "@"
+; 102fcc
+
+String_102fcc: ; 102fcc
+ db "に@"
+; 102fce
+
+Function102fce: ; 102fce
+ call Function102dc3
+ ld de, String_102fdb
+ hlcoord 1, 14
+ call PlaceString
+ ret
+; 102fdb
+
+String_102fdb: ; 102fdb
+ db "あいてがわ%せんたくに"
+ next "いじょう<PKMN>あるようです!!"
+ done
+; 102ff5
+
+Function102ff5: ; 102ff5
+ call Function102dc3
+ ld de, String_103002
+ hlcoord 1, 14
+ call PlaceString
+ ret
+; 103002
+
+String_103002: ; 103002
+ db "その#を こうかんすると"
+ next "せんとう できなく なっちゃうよ!"
+ db "@"
+; 103021
+
+Function103021: ; 103021
+ call Function102dc3
+ ld de, String_10302e
+ hlcoord 1, 14
+ call PlaceString
+ ret
+; 10302e
+
+String_10302e: ; 10302e
+ db "あいてが ちゅうしを えらんだので"
+ next "こうかんを ちゅうし します"
+ db "@"
+; 10304f
+
+Function10304f: ; 10304f
+ xor a
+ ld [AttrMapEnd], a
+ ld [wcf42], a
+ ld [wcf44], a
+ ld [wcf45], a
+ ret
+; 10305d
+
+Function10305d: ; 10305d
+ nop
+ ld a, [AttrMapEnd]
+ and a
+ ret z
+ call Function10307f
+ ret c
+ call Function103094
+ call Function10306e
+ ret
+; 10306e
+
+Function10306e: ; 10306e
+ ld a, $01
+ ld [hOAMUpdate], a
+ call ClearSprites
+ ld de, Sprites
+ call Function1030cd
+ xor a
+ ld [hOAMUpdate], a
+ ret
+; 10307f
+
+Function10307f: ; 10307f
+ ld c, $02
+ ld hl, wcd4b
+ bit 7, [hl]
+ jr z, .asm_10308a
+ ld c, $01
+
+.asm_10308a
+ ld hl, wcf45
+ inc [hl]
+ ld a, [hl]
+ cp c
+ ret c
+ xor a
+ ld [hl], a
+ ret
+; 103094
+
+Function103094: ; 103094
+ ld hl, wcd4b
+ bit 7, [hl]
+ jr nz, .asm_1030c0
+ ld a, [wcf42]
+ bit 7, a
+ jr nz, .asm_1030b2
+ ld a, [wcf44]
+ inc a
+ ld [wcf44], a
+ cp $2c
+ ret nz
+ ld hl, wcf42
+ set 7, [hl]
+ ret
+
+.asm_1030b2
+ ld a, [wcf44]
+ dec a
+ ld [wcf44], a
+ ret nz
+ ld hl, wcf42
+ res 7, [hl]
+ ret
+
+.asm_1030c0
+ ld hl, wcf44
+ ld a, [hl]
+ and a
+ jr z, .asm_1030ca
+ dec a
+ ld [hl], a
+ ret nz
+
+.asm_1030ca
+ ld [hl], $2c
+ ret
+; 1030cd
+
+Function1030cd: ; 1030cd
+ ld a, [wcf44]
+ ld l, a
+ ld h, 0
+ add hl, hl
+ add hl, hl
+ add hl, hl
+ ld bc, Unknown_103112
+ add hl, bc
+ ld b, $30
+ ld c, $08
+.asm_1030de
+ push hl
+ ld hl, wcd4b
+ bit 7, [hl]
+ pop hl
+ ld a, 0
+ jr z, .asm_1030eb
+ ld a, $05
+.asm_1030eb
+
+ add [hl]
+ inc hl
+ push hl
+
+ add a
+ add a
+
+ add Unknown_10327a % $100
+ ld l, a
+ ld a, Unknown_10327a / $100
+ adc 0
+ ld h, a
+
+ ld a, b
+ add [hl]
+ inc hl
+ ld [de], a
+ inc de
+ ld a, $0a
+ add [hl]
+ inc hl
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ pop hl
+ ld a, b
+ add $08
+ ld b, a
+ dec c
+ jr nz, .asm_1030de
+ ret
+; 103112
+
+Unknown_103112: ; 103112
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $01, $00, $00, $00, $00, $00, $00, $00
+ db $02, $01, $00, $00, $00, $00, $00, $00
+ db $03, $02, $01, $00, $00, $00, $00, $00
+ db $04, $03, $02, $01, $00, $00, $00, $00
+ db $04, $04, $03, $02, $01, $00, $00, $00
+ db $04, $04, $04, $03, $02, $01, $00, $00
+ db $04, $04, $04, $04, $03, $02, $01, $00
+ db $04, $04, $04, $04, $04, $03, $02, $01
+ db $04, $04, $04, $04, $04, $04, $03, $02
+ db $04, $04, $04, $04, $04, $04, $04, $03
+ db $04, $04, $04, $04, $04, $04, $04, $04
+ db $04, $04, $04, $04, $04, $04, $04, $04
+ db $04, $04, $04, $04, $04, $04, $04, $04
+ db $04, $04, $04, $04, $04, $04, $04, $04
+ db $04, $04, $04, $04, $04, $04, $04, $04
+ db $04, $04, $04, $04, $04, $04, $04, $04
+ db $04, $04, $04, $04, $04, $04, $04, $04
+ db $04, $04, $04, $04, $04, $04, $04, $04
+ db $03, $04, $04, $04, $04, $04, $04, $04
+ db $02, $03, $04, $04, $04, $04, $04, $04
+ db $01, $02, $03, $04, $04, $04, $04, $04
+ db $00, $01, $02, $03, $04, $04, $04, $04
+ db $00, $00, $01, $02, $03, $04, $04, $04
+ db $00, $00, $00, $01, $02, $03, $04, $04
+ db $00, $00, $00, $00, $01, $02, $03, $04
+ db $00, $00, $00, $00, $00, $01, $02, $03
+ db $00, $00, $00, $00, $00, $00, $01, $02
+ db $00, $00, $00, $00, $00, $00, $00, $01
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+ db $00, $00, $00, $00, $00, $00, $00, $00
+; 10327a
+
+Unknown_10327a: ; 10327a
+ db $00, $00, $00, $00
+ db $00, $00, $01, $00
+ db $00, $00, $02, $00
+ db $00, $00, $03, $00
+ db $00, $00, $01, $01
+ db $00, $00, $00, $00
+ db $00, $00, $01, $02
+ db $00, $00, $02, $02
+ db $00, $00, $03, $02
+ db $00, $00, $01, $03
+
+GFX_1032a2:
+INCBIN "gfx/unknown/1032a2.2bpp"
+
+Palettes_1032e2:
+ RGB 0, 0, 0
+ RGB 31, 31, 7
+ RGB 20, 31, 6
+ RGB 13, 20, 16
+
+ RGB 0, 0, 0
+ RGB 7, 11, 17
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 31, 24, 4
+ RGB 25, 12, 0
+ RGB 31, 7, 4
+
+ RGB 0, 0, 0
+ RGB 25, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+; 103302
+
+Function103302: ; 103302
+ call Function103309
+ call Function103362
+ ret
+; 103309
+
+Function103309: ; 103309
+ xor a
+ ld [hBGMapMode], a
+ ld hl, Buffer1
+ ld bc, 10
+ xor a
+ call ByteFill
+ ld a, $04
+ call GetSRAMBank
+ ld a, [wdc41]
+ ld [$a60c], a
+ ld [Buffer1], a
+ call CloseSRAM
+ call Function1035c6
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ld a, [hli]
+ ld [wd1ef], a
+ ld a, [hli]
+ ld [wd1ec], a
+ ld a, [hli]
+ ld [wd1ed], a
+ ld h, d
+ ld l, e
+ call Function3eea
+ ld hl, wd1ec
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [hl]
+ ld [wd1ee], a
+ call Function1034be
+ call UpdateSprites
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
+ ld a, $01
+ ld [wd1f0], a
+ call Function10339a
+ ret
+; 103362
+
+Function103362: ; 103362
+.asm_103362
+ ld a, [wd1f0]
+ ld [wd1f1], a
+ call Function1033af
+ call Function10339a
+ call Function10342c
+ farcall HDMATransferTileMapToWRAMBank3
+ ld a, [Buffer2]
+ bit 7, a
+ jr z, .asm_103362
+ ld hl, Buffer2
+ bit 6, [hl]
+ jr z, .asm_103398
+ ld a, $04
+ call GetSRAMBank
+ ld a, [Buffer1]
+ ld [$a60c], a
+ ld [wdc41], a
+ call CloseSRAM
+ xor a
+ ret
+
+.asm_103398
+ scf
+ ret
+; 10339a
+
+Function10339a: ; 10339a
+ ld a, [wd1f0]
+ ld [wd1f2], a
+ ld c, a
+ ld b, 0
+ ld hl, wd1ec
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ add hl, bc
+ ld a, [hl]
+ ld [wd1f3], a
+ ret
+; 1033af
+
+Function1033af: ; 1033af
+ call GetJoypad
+ ld a, [hJoyPressed]
+ bit D_LEFT_F, a
+ jr nz, .left
+ bit D_RIGHT_F, a
+ jr nz, .right
+ bit B_BUTTON_F, a
+ jr nz, .b
+ bit A_BUTTON_F, a
+ jr nz, .a
+ bit D_UP_F, a
+ jr nz, .up
+ bit D_DOWN_F, a
+ jr nz, .down
+ ret
+
+.up
+ ld a, [wd1f0]
+ dec a
+ ld [wd1f0], a
+ cp 1
+ ret nc
+ ld a, [wd1ee]
+ ld [wd1f0], a
+ ret
+
+.down
+ ld a, [wd1f0]
+ inc a
+ ld [wd1f0], a
+ ld c, a
+ ld a, [wd1ee]
+ cp c
+ ret nc
+ ld a, 1
+ ld [wd1f0], a
+ ret
+
+.b
+ call PlayClickSFX
+ ld hl, Buffer2
+ set 7, [hl]
+ ret
+
+.a
+ ld a, [wd1f3]
+ cp 3
+ jr nz, .a_return
+ ld de, SFX_TRANSACTION
+ call PlaySFX
+ ld hl, Buffer2
+ set 7, [hl]
+ ld hl, Buffer2
+ set 6, [hl]
+ ret
+
+.left
+.right
+.a_return
+ ld a, [wd1f3]
+ cp 3
+ ret z
+ ld de, SFX_PUSH_BUTTON
+ call PlaySFX
+ ld bc, 8
+ call Function10350f
+ ld a, [Buffer1]
+ xor e
+ ld [Buffer1], a
+ ret
+; 10342c
+
+Function10342c: ; 10342c
+ ld a, [wd1f0]
+ ld [wd1f2], a
+ call Function103490
+ call Function10343c
+ call Function1034a7
+ ret
+; 10343c
+
+Function10343c: ; 10343c
+ ld a, [wd1f3]
+ cp $02
+ jr nz, .asm_103452
+ ld bc, 1
+ call Function1034f7
+ ld c, $12
+ ld b, $01
+ call Function1034e0
+ jr .asm_10345f
+
+.asm_103452
+ ld bc, $ffed
+ call Function1034f7
+ ld c, $12
+ ld b, $02
+ call Function1034e0
+
+.asm_10345f
+ ld bc, 0
+ call Function10350f
+ ld bc, 1
+ call Function103487
+ ld bc, 8
+ call Function10350f
+ ld a, [Buffer1]
+ and e
+ ld bc, 2
+ jr z, .asm_10347d
+ ld bc, 4
+
+.asm_10347d
+ call Function10350f
+ ld bc, 11
+ call Function103487
+ ret
+; 103487
+
+Function103487: ; 103487
+ push de
+ call Function1034f7
+ pop de
+ call PlaceString
+ ret
+; 103490
+
+Function103490: ; 103490
+ hlcoord 0, 15
+ ld c, $14
+ ld b, $03
+ call Function1034e0
+ ld bc, 6
+ call Function10350f
+ hlcoord 1, 16
+ call PlaceString
+ ret
+; 1034a7
+
+Function1034a7: ; 1034a7
+ ld a, [wd1f1]
+ ld [wd1f2], a
+ ld bc, 10
+ call Function1034f7
+ ld [hl], $7f
+ ld bc, 10
+ call Function1034f1
+ ld [hl], $ed
+ ret
+; 1034be
+
+Function1034be: ; 1034be
+ ld a, $01
+ ld [wd1f2], a
+ ld hl, wd1ec
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [hli]
+.asm_1034ca
+ push af
+ ld a, [hli]
+ push hl
+ ld [wd1f3], a
+ call Function10343c
+ ld hl, wd1f2
+ inc [hl]
+ pop hl
+ pop af
+ dec a
+ jr nz, .asm_1034ca
+ call Function103490
+ ret
+; 1034e0
+
+Function1034e0: ; 1034e0
+ push bc
+ push hl
+ call ClearBox
+ pop hl
+ ld bc, AttrMap - TileMap
+ add hl, bc
+ pop bc
+ ld a, $06
+ call FillBoxWithByte
+ ret
+; 1034f1
+
+Function1034f1: ; 1034f1
+ ld a, [wd1f0]
+ ld [wd1f2], a
+
+Function1034f7: ; 10134f7
+ hlcoord 0, 0
+ add hl, bc
+ ld a, [wd1ef]
+ ld bc, SCREEN_WIDTH
+ call AddNTimes
+ ld a, [wd1f2]
+ dec a
+ ld bc, 40
+ call AddNTimes
+ ret
+; 10350f
+
+Function10350f: ; 10350f
+ ld a, [wd1f3]
+ push bc
+ ld hl, Unknown_103522
+ ld bc, 9
+ call AddNTimes
+ pop bc
+ add hl, bc
+ ld a, [hli]
+ ld d, [hl]
+ ld e, a
+ ret
+; 103522
+
+Unknown_103522: ; 103522
+ dw String_103546
+ dw String_103598
+ dw String_1035a0
+ dw String_10355f
+ db $01
+ dw String_10354f
+ dw String_1035a8
+ dw String_1035b1
+ dw String_103571
+ db $02
+ dw String_103557
+ dw String_1035ba
+ dw String_1035bd
+ dw String_103585
+ db $04
+ dw String_103545
+ dw String_1035c1
+ dw String_1035c1
+ dw String_103545
+
+String_103545: db "@"
+String_103546: db "せんとう アニメ@"
+String_10354f: db "でんわばんごう@"
+String_103557: db "めいしこうかん@"
+String_10355f: db "でんわを かけるひとが きめられる@"
+String_103571: db "でんわばんごうの にゅうりょくのしかた@"
+String_103585: db "あたらしいめいしが あれば こうかん@"
+String_103598: db "とばして みる@"
+String_1035a0: db "じっくり みる@"
+String_1035a8: db "めいしからえらぶ@"
+String_1035b1: db "すうじで いれる@"
+String_1035ba: db "する@"
+String_1035bd: db "しない@"
+String_1035c1: db "けってい@"
+; 1035c6
+
+Function1035c6: ; 1035c6
+ farcall Function10138b
+ ld b, 0
+ ld hl, Unknown_1035d7
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ret
+; 1035d7
+
+Unknown_1035d7: ; 1035d7
+ dw Unknown_1035e7
+ dw Unknown_1035f3
+ dw Unknown_103608
+ dw Unknown_103608
+ dw Unknown_1035fe
+ dw AskMobileOrCable
+ dw AskMobileOrCable
+ dw AskMobileOrCable
+
+Unknown_1035e7: ; 1035e7
+ dwcoord 0, 6
+ db $12, $07, $07
+ dw .this
+.this
+ db 4, 2, 1, 0, 3
+
+Unknown_1035f3: ; 1035f3
+ dwcoord 0, 7
+ db $12, $06, $09
+ dw .this
+.this
+ db 3, 2, 1, 3
+
+Unknown_1035fe: ; 1035fe
+ dwcoord 0, 9
+ db $12, $04, $0b
+ dw .this
+.this
+ db 2, 0, 3
+
+Unknown_103608: ; 103608
+ dwcoord 0, 9
+ db $12, $04, $0b
+ dw .this
+.this
+ db 2, 2, 3
+; 103612
+
+AskMobileOrCable: ; 103612
+ ld hl, MenuDataHeader_103640
+ call LoadMenuDataHeader
+ ld a, [wMobileOrCable_LastSelection]
+ and $0f
+ jr z, .skip_load
+ ld [wMenuCursorBuffer], a
+
+.skip_load
+ call VerticalMenu
+ call CloseWindow
+ jr c, .pressed_b
+ ld a, [wMenuCursorY]
+ ld [ScriptVar], a
+ ld c, a
+ ld a, [wMobileOrCable_LastSelection]
+ and $f0
+ or c
+ ld [wMobileOrCable_LastSelection], a
+ ret
+
+.pressed_b
+ xor a
+ ld [ScriptVar], a
+ ret
+; 103640
+
+MenuDataHeader_103640: ; 103640
+ db $40 ; flags
+ db 6, 13 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_103648
+ db 1 ; default option
+
+MenuData2_103648: ; 103648
+ db $80 ; flags
+ db 2
+ db "モバイル@"
+ db "ケーブル@"
+; 103654
+
+Function103654: ; 103654
+ farcall Mobile_AlwaysReturnNotCarry
+ bit 7, c
+ jr nz, .asm_103666
+ ld hl, wcd2a
+ res 5, [hl]
+ ld c, $02
+ ret
+
+.asm_103666
+ ld hl, wcd2a
+ set 5, [hl]
+ ld c, $01
+ ret
+; 10366e
+
+Mobile_SelectThreeMons: ; 10366e
+ farcall Mobile_AlwaysReturnNotCarry
+ bit 7, c
+ jr z, .asm_10369b
+ ld hl, UnknownText_0x10375d
+ call PrintText
+ call YesNoBox
+ jr c, .asm_103696
+ farcall CheckForMobileBattleRules
+ jr nc, .asm_103690
+ call JoyWaitAorB
+ jr .asm_103696
+
+.asm_103690
+ ld a, $01
+ ld [ScriptVar], a
+ ret
+
+.asm_103696
+ xor a
+ ld [ScriptVar], a
+ ret
+
+.asm_10369b
+ ld hl, wMobileOrCable_LastSelection
+ bit 7, [hl]
+ set 7, [hl]
+ jr nz, .asm_1036b5
+ ld hl, UnknownText_0x103762
+ call PrintText
+ call YesNoBox
+ jr c, .asm_1036b5
+ call Function1036f9
+ call JoyWaitAorB
+
+.asm_1036b5
+ call Function103700
+ jr c, .asm_1036f4
+ ld hl, MenuDataHeader_103747
+ call LoadMenuDataHeader
+ call VerticalMenu
+ call ExitMenu
+ jr c, .asm_1036f4
+ ld a, [wMenuCursorY]
+ cp $01
+ jr z, .asm_1036d9
+ cp $02
+ jr z, .asm_1036f4
+ cp $03
+ jr z, .asm_1036ec
+ jr .asm_1036b5
+
+.asm_1036d9
+ farcall CheckForMobileBattleRules
+ jr nc, .asm_1036e6
+ call JoyWaitAorB
+ jr .asm_1036f4
+
+.asm_1036e6
+ ld a, $01
+ ld [ScriptVar], a
+ ret
+
+.asm_1036ec
+ call Function1036f9
+ call JoyWaitAorB
+ jr .asm_1036b5
+
+.asm_1036f4
+ xor a
+ ld [ScriptVar], a
+ ret
+; 1036f9
+
+Function1036f9: ; 1036f9
+ ld hl, UnknownText_0x103767
+ call PrintText
+ ret
+; 103700
+
+Function103700: ; 103700
+ ld c, $0a
+ ld hl, SwarmFlags
+ bit 4, [hl]
+ jr z, .asm_10370f
+ farcall Function1008a6
+
+.asm_10370f
+ ld a, c
+ ld [StringBuffer2], a
+ ld a, [StringBuffer2]
+ cp $05
+ jr nc, .asm_103724
+ cp $02
+ jr nc, .asm_10372c
+ cp $01
+ jr nc, .asm_103734
+ jr .asm_10373c
+
+.asm_103724
+ ld hl, UnknownText_0x10376c
+ call PrintText
+ and a
+ ret
+
+.asm_10372c
+ ld hl, UnknownText_0x103771
+ call PrintText
+ and a
+ ret
+
+.asm_103734
+ ld hl, UnknownText_0x103776
+ call PrintText
+ and a
+ ret
+
+.asm_10373c
+ ld hl, UnknownText_0x10377b
+ call PrintText
+ call JoyWaitAorB
+ scf
+ ret
+; 103747
+
+MenuDataHeader_103747: ; 103747
+ db $40 ; flags
+ db 5, 13 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_10374f
+ db 1 ; default option
+
+MenuData2_10374f: ; 10374f
+ db $c0 ; flags
+ db 3
+ db "はい@"
+ db "やめる@"
+ db "せつめい@"
+; 10375d
+
+UnknownText_0x10375d: ; 0x10375d
+ text_jump UnknownText_0x1c422a
+ db "@"
+; 0x103762
+UnknownText_0x103762: ; 0x103762
+ text_jump UnknownText_0x1c4275
+ db "@"
+; 0x103767
+UnknownText_0x103767: ; 0x103767
+ text_jump UnknownText_0x1c4298
+ db "@"
+; 0x10376c
+UnknownText_0x10376c: ; 0x10376c
+ text_jump UnknownText_0x1c439c
+ db "@"
+; 0x103771
+UnknownText_0x103771: ; 0x103771
+ text_jump UnknownText_0x1c43dc
+ db "@"
+; 0x103776
+UnknownText_0x103776: ; 0x103776
+ text_jump UnknownText_0x1c4419
+ db "@"
+; 0x10377b
+UnknownText_0x10377b: ; 0x10377b
+ text_jump UnknownText_0x1c445a
+ db "@"
+; 0x103780
+
+Function103780: ; 103780
+ ld a, [wd265]
+ push af
+ call Function10378c
+ pop af
+ ld [wd265], a
+ ret
+; 10378c
+
+Function10378c: ; 10378c
+ ld c, 0
+ ld hl, SwarmFlags
+ bit 4, [hl]
+ jr nz, .already_set
+ ld c, $01
+ ld hl, SwarmFlags
+ set 4, [hl]
+
+.already_set
+ push bc
+ farcall Link_SaveGame
+ pop bc
+ jr c, .failed_to_save
+ ld a, $01
+ ld [ScriptVar], a
+ ld a, c
+ and a
+ ret z
+ farcall Function1006fd
+ ret
+
+.failed_to_save
+ xor a
+ ld [ScriptVar], a
+ ld a, c
+ and a
+ ret z
+ ld hl, SwarmFlags
+ res 4, [hl]
+ ret
+; 1037c2
+
+Function1037c2: ; 1037c2
+ call Function103823
+ jr c, .nope
+ ld a, [wdc5f]
+ and a
+ jr z, .nope
+ ld hl, UnknownText_0x1037e6
+ call PrintText
+ call YesNoBox
+ jr c, .nope
+ ld a, $01
+ ld [ScriptVar], a
+ ret
+
+.nope
+ xor a
+ ld [wdc5f], a
+ ld [ScriptVar], a
+ ret
+; 1037e6
+
+UnknownText_0x1037e6: ; 0x1037e6
+ text_jump UnknownText_0x1c449c
+ db "@"
+; 0x1037eb
+
+Function1037eb: ; 1037eb
+ call Function103823
+ jr nc, .asm_103807
+ ld hl, UnknownText_0x103819
+ call PrintText
+ call JoyWaitAorB
+ ld hl, UnknownText_0x10381e
+ call PrintText
+ call JoyWaitAorB
+ xor a
+ ld [ScriptVar], a
+ ret
+
+.asm_103807
+ ld a, [wdc60]
+ and a
+ jr nz, .asm_103813
+ ld a, $01
+ ld [ScriptVar], a
+ ret
+
+.asm_103813
+ ld a, $02
+ ld [ScriptVar], a
+ ret
+; 103819
+
+UnknownText_0x103819: ; 0x103819
+ text_jump UnknownText_0x1c44c0
+ db "@"
+; 0x10381e
+
+UnknownText_0x10381e: ; 0x10381e
+ text_jump UnknownText_0x1c44e7
+ db "@"
+; 0x103823
+
+Function103823: ; 103823
+ farcall Mobile_AlwaysReturnNotCarry
+ bit 7, c
+ jr nz, .asm_103838
+ farcall Function1008a6
+ ld a, c
+ cp $01
+ jr c, .asm_10383a
+
+.asm_103838
+ xor a
+ ret
+
+.asm_10383a
+ scf
+ ret
+; 10383c
+
+Function10383c: ; 10383c
+ ld a, $01
+ ld [wdc60], a
+ xor a
+ ld hl, wPlayerMonSelection
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+ ld hl, UnknownText_0x103876
+ call PrintText
+ call JoyWaitAorB
+ farcall Script_reloadmappart
+ farcall Function4a94e
+ jr c, .asm_103870
+ ld hl, wd002
+ ld de, wPlayerMonSelection
+ ld bc, 3
+ call CopyBytes
+ xor a
+ ld [ScriptVar], a
+ ret
+
+.asm_103870
+ ld a, $01
+ ld [ScriptVar], a
+ ret
+; 103876
+
+UnknownText_0x103876: ; 0x103876
+ text_jump UnknownText_0x1c4508
+ db "@"
+; 0x10387b
+
+Function10387b: ; 10387b
+ farcall Mobile_AlwaysReturnNotCarry
+ bit 7, c
+ ret nz
+ farcall Function1008a6
+ ld a, c
+ ld [StringBuffer2], a
+ ld hl, UnknownText_0x103898
+ call PrintText
+ call JoyWaitAorB
+ ret
+; 103898
+
+UnknownText_0x103898: ; 0x103898
+ text_jump UnknownText_0x1c4525
+ db "@"
+; 0x10389d
diff --git a/mobile/mobile_41.asm b/mobile/mobile_41.asm
new file mode 100755
index 000000000..7e1d20db6
--- /dev/null
+++ b/mobile/mobile_41.asm
@@ -0,0 +1,1113 @@
+; These functions deal with miscellaneous statistics
+; which were used for Trainer Rankings in Pokémon News.
+
+; Copies certain values at the time the player enters the Hall of Fame.
+TrainerRankings_HallOfFame2:: mobile ; 0x105ef6
+ ld a, BANK(sTrainerRankingGameTimeHOF)
+ call GetSRAMBank
+
+ ld hl, GameTimeHours
+ ld de, sTrainerRankingGameTimeHOF
+ ld bc, 4
+ call CopyBytes
+
+ ld hl, sTrainerRankingStepCount
+ ld de, sTrainerRankingStepCountHOF
+ ld bc, 4
+ call CopyBytes
+
+ ; sTrainerRankingHealings is only a 3-byte value.
+ ; One extraneous byte is copied from sTrainerRankingMysteryGift.
+ ld hl, sTrainerRankingHealings
+ ld de, sTrainerRankingHealingsHOF
+ ld bc, 4
+ call CopyBytes
+
+ ld hl, sTrainerRankingBattles
+ ld de, sTrainerRankingBattlesHOF
+ ld bc, 3
+ call CopyBytes
+
+ call UpdateTrainerRankingsChecksum
+ call CloseSRAM
+ ret
+; 105f33
+
+TrainerRankings_MagikarpLength: mobile ; 105f33
+ ld a, BANK(sTrainerRankingLongestMagikarp)
+ call GetSRAMBank
+ ld de, Buffer1
+ ld hl, sTrainerRankingLongestMagikarp
+
+ ; Is this Magikarp the longest measured?
+ ld a, [de]
+ cp [hl]
+ jr z, .isLowByteHigher
+ jr nc, .newRecordLongest
+ jr .checkShortest
+
+.isLowByteHigher
+ inc hl
+ inc de
+ ld a, [de]
+ cp [hl]
+ dec hl
+ dec de
+ jr c, .checkShortest
+
+.newRecordLongest
+ ld a, [de]
+ inc de
+ ld [hli], a
+ ld a, [de]
+ dec de
+ ld [hl], a
+
+.checkShortest
+ ; First, check if the record for shortest Magikarp is 0.
+ ; This seems unnecessary, because the value is initialized to 100.0 cm.
+ ld hl, sTrainerRankingShortestMagikarp
+ ld a, [hli]
+ or [hl]
+ dec hl
+ jr z, .newRecordShortest
+
+ ; Now check if this Magikarp is the shortest
+ ld a, [de]
+ cp [hl]
+ jr z, .isLowByteLower
+ jr c, .newRecordShortest
+ jr .done
+
+.isLowByteLower
+ inc hl
+ inc de
+ ld a, [de]
+ cp [hl]
+ jr nc, .done
+ dec hl
+ dec de
+
+.newRecordShortest
+ ld a, [de]
+ inc de
+ ld [hli], a
+ ld a, [de]
+ ld [hl], a
+
+.done
+ call UpdateTrainerRankingsChecksum
+ call CloseSRAM
+ ret
+; 105f79
+
+TrainerRankings_BugContestScore: mobile ; 105f79
+ ld a, BANK(sTrainerRankingBugContestScore)
+ call GetSRAMBank
+ ld a, [hProduct]
+ ld hl, sTrainerRankingBugContestScore
+ cp [hl]
+ jr z, .isLowByteHigher
+ jr nc, .newHighScore
+ jr .done
+
+.isLowByteHigher
+ inc hl
+ ld a, [hMultiplicand]
+ cp [hl]
+ jr c, .done
+ dec hl
+
+.newHighScore
+ ld a, [hProduct]
+ ld [hli], a
+ ld a, [hMultiplicand]
+ ld [hl], a
+
+.done
+ call UpdateTrainerRankingsChecksum
+ call CloseSRAM
+ ret
+; 105f9f
+
+TrainerRankings_AddToSlotsWinStreak: mobile ; 105f9f
+ ld a, BANK(sTrainerRankingCurrentSlotsStreak)
+ call GetSRAMBank
+
+ ; Increment the current streak
+ ld hl, sTrainerRankingCurrentSlotsStreak + 1
+ inc [hl]
+ jr nz, .noCarry
+ dec hl
+ inc [hl]
+ inc hl
+
+.noCarry
+ dec hl
+ ; Now check if this is a new record for longest streak
+ ld a, [sTrainerRankingLongestSlotsStreak]
+ cp [hl]
+ jr z, .isLowByteHigher
+ jr c, .newRecordStreak
+ jr .done
+
+.isLowByteHigher
+ inc hl
+ ld a, [sTrainerRankingLongestSlotsStreak + 1]
+ cp [hl]
+ jr nc, .done
+ dec hl
+
+.newRecordStreak
+ ld a, [hli]
+ ld [sTrainerRankingLongestSlotsStreak], a
+ ld a, [hl]
+ ld [sTrainerRankingLongestSlotsStreak + 1], a
+
+.done
+ call UpdateTrainerRankingsChecksum
+ call CloseSRAM
+ ret
+; 105fd0
+
+TrainerRankings_EndSlotsWinStreak: mobile ; 105fd0
+ ld a, BANK(sTrainerRankingCurrentSlotsStreak)
+ call GetSRAMBank
+ ld hl, sTrainerRankingCurrentSlotsStreak
+ xor a
+ ld [hli], a
+ ld [hl], a
+ call UpdateTrainerRankingsChecksum
+ call CloseSRAM
+ ret
+; 105fe3
+
+TrainerRankings_AddToSlotsPayouts: mobile ; 105fe3
+ ld a, BANK(sTrainerRankingTotalSlotsPayouts)
+ call GetSRAMBank
+ ld hl, sTrainerRankingTotalSlotsPayouts + 3
+ ld a, e
+ add [hl]
+ ld [hld], a
+ ld a, d
+ adc [hl]
+ ld [hld], a
+ jr nc, .done
+ inc [hl]
+ jr nz, .done
+ dec hl
+ inc [hl]
+ jr nz, .done
+ ld a, $ff
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+
+.done
+ call UpdateTrainerRankingsChecksum
+ call CloseSRAM
+ ret
+; 106008
+
+TrainerRankings_AddToBattlePayouts: mobile ; 106008
+ ld a, BANK(sTrainerRankingTotalBattlePayouts)
+ call GetSRAMBank
+ ld hl, sTrainerRankingTotalBattlePayouts + 3
+ ld a, [bc]
+ dec bc
+ add [hl]
+ ld [hld], a
+ ld a, [bc]
+ dec bc
+ adc [hl]
+ ld [hld], a
+ ld a, [bc]
+ adc [hl]
+ ld [hld], a
+ jr nc, .done
+ inc [hl]
+ jr nz, .done
+ ld a, $ff
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ ld [hl], a
+
+.done
+ call UpdateTrainerRankingsChecksum
+ call CloseSRAM
+ ret
+; 10602e
+
+TrainerRankings_StepCount: mobile ; 10602e (41:602e)
+ ld hl, sTrainerRankingStepCount
+ jp TrainerRankings_Increment4Byte
+
+; Unreferenced in English version.
+TrainerRankings_BattleTowerWins: mobile ; 106035
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$aa8d]
+ and a
+ call CloseSRAM
+ ret nz
+ ld hl, sTrainerRankingBattleTowerWins
+ jp TrainerRankings_Increment2Byte
+
+TrainerRankings_TMsHMsTaught: mobile ; 106049
+ ld hl, sTrainerRankingTMsHMsTaught
+ jp TrainerRankings_Increment3Byte
+
+TrainerRankings_Battles: mobile ; 106050
+ ld a, [BattleType]
+ cp BATTLETYPE_TUTORIAL ; Exclude the Dude’s tutorial battle
+ ret z
+ ld hl, sTrainerRankingBattles
+ jp TrainerRankings_Increment3Byte
+
+TrainerRankings_WildBattles: mobile ; 10605d
+ ld a, [BattleType]
+ cp BATTLETYPE_TUTORIAL ; Exclude the Dude’s tutorial battle
+ ret z
+ ld hl, sTrainerRankingWildBattles
+ jp TrainerRankings_Increment3Byte
+
+TrainerRankings_TrainerBattles: mobile ; 10606a
+ ld hl, sTrainerRankingTrainerBattles
+ jp TrainerRankings_Increment3Byte
+
+TrainerRankings_Unused1: mobile ; 106071
+ ld hl, sTrainerRankingUnused1
+ jp TrainerRankings_Increment3Byte
+
+TrainerRankings_HallOfFame:: mobile ; 0x106078
+ ld hl, sTrainerRankingHOFEntries
+ jp TrainerRankings_Increment3Byte
+
+TrainerRankings_WildMonsCaught: mobile ; 10607f (41:607f)
+ ld hl, sTrainerRankingWildMonsCaught
+ jp TrainerRankings_Increment3Byte
+
+TrainerRankings_HookedEncounters: mobile ; 106086
+ ld hl, sTrainerRankingHookedEncounters
+ jp TrainerRankings_Increment3Byte
+
+TrainerRankings_EggsHatched: mobile ; 10608d (41:608d)
+ ld hl, sTrainerRankingEggsHatched
+ jp TrainerRankings_Increment3Byte
+
+TrainerRankings_MonsEvolved: mobile ; 106094
+ ld hl, sTrainerRankingMonsEvolved
+ jp TrainerRankings_Increment3Byte
+
+TrainerRankings_FruitPicked: mobile ; 10609b
+ ld hl, sTrainerRankingFruitPicked
+ jp TrainerRankings_Increment3Byte
+
+TrainerRankings_Healings: mobile ; 1060a2
+ ld hl, sTrainerRankingHealings
+ jp TrainerRankings_Increment3Byte
+
+TrainerRankings_MysteryGift: mobile ; 1060a9 (41:60a9)
+ ld hl, sTrainerRankingMysteryGift
+ jr TrainerRankings_Increment3Byte
+
+TrainerRankings_Trades: mobile ; 1060af
+ ld hl, sTrainerRankingTrades
+ jr TrainerRankings_Increment3Byte
+
+TrainerRankings_Fly: mobile ; 1060b5
+ ld hl, sTrainerRankingFly
+ jr TrainerRankings_Increment3Byte
+
+TrainerRankings_Surf: mobile ; 1060bb
+ ld hl, sTrainerRankingSurf
+ jr TrainerRankings_Increment3Byte
+
+TrainerRankings_Waterfall: mobile ; 1060c1
+ ld hl, sTrainerRankingWaterfall
+ jr TrainerRankings_Increment3Byte
+
+TrainerRankings_WhiteOuts: mobile ; 1060c7
+ ld hl, sTrainerRankingWhiteOuts
+ jr TrainerRankings_Increment3Byte
+
+TrainerRankings_LuckyNumberShow: mobile ; 1060cd
+ ld hl, sTrainerRankingLuckyNumberShow
+ jr TrainerRankings_Increment2Byte
+
+TrainerRankings_PhoneCalls: mobile ; 1060d3
+ ld hl, sTrainerRankingPhoneCalls
+ jr TrainerRankings_Increment3Byte
+
+TrainerRankings_Unused2: mobile ; 1060df
+ ld hl, sTrainerRankingUnused2
+ jr TrainerRankings_Increment3Byte
+
+TrainerRankings_LinkBattles: mobile ; 1060df
+ ld hl, sTrainerRankingLinkBattles
+ jr TrainerRankings_Increment3Byte
+
+TrainerRankings_Splash: mobile ; 1060e5
+ ; Only counts if it’s the player’s turn
+ ld a, [hBattleTurn]
+ and a
+ ret nz
+ ld hl, sTrainerRankingSplash
+ jr TrainerRankings_Increment3Byte
+
+TrainerRankings_TreeEncounters: mobile ; 1060ef
+ ld hl, sTrainerRankingTreeEncounters
+ jr TrainerRankings_Increment3Byte
+
+TrainerRankings_Unused3: mobile ; 1060f5
+ ld hl, sTrainerRankingUnused3
+ jr TrainerRankings_Increment3Byte
+
+TrainerRankings_ColosseumWins: mobile ; win
+ ld hl, sTrainerRankingColosseumWins
+ jr TrainerRankings_Increment3Byte
+
+TrainerRankings_ColosseumLosses: mobile ; lose
+ ld hl, sTrainerRankingColosseumLosses
+ jr TrainerRankings_Increment3Byte
+; 106107
+
+TrainerRankings_ColosseumDraws: mobile ; draw
+ ld hl, sTrainerRankingColosseumDraws
+ jr TrainerRankings_Increment3Byte
+; 10610d
+
+; Counts uses of both Selfdestruct and Explosion.
+TrainerRankings_Selfdestruct: mobile ; 10610d
+ ; Only counts if it’s the player’s turn
+ ld a, [hBattleTurn]
+ and a
+ ret nz
+ ld hl, sTrainerRankingSelfdestruct
+ jr TrainerRankings_Increment3Byte
+; 106117
+
+TrainerRankings_Increment4Byte: ; 106117
+ push bc
+ ld bc, 3
+ jr TrainerRankings_Increment
+; 10611d
+
+TrainerRankings_Increment3Byte: ; 10611d
+ push bc
+ ld bc, 2
+ jr TrainerRankings_Increment
+; 106123
+
+TrainerRankings_Increment2Byte: ; 106123
+ push bc
+ ld bc, 1
+ jr TrainerRankings_Increment
+; 106129
+
+; unused
+TrainerRankings_Increment1Byte: ; 106129
+ push bc
+ ld bc, 0
+
+; Increments a big-endian value of bc + 1 bytes at hl
+TrainerRankings_Increment: ; 10612d
+ ld a, BANK(sTrainerRankings)
+ call GetSRAMBank
+ push hl
+ push de
+ ld e, c
+ inc e
+.asm_106136
+ ld a, [hli]
+ inc a
+ jr nz, .asm_10613d
+ dec e
+ jr nz, .asm_106136
+
+.asm_10613d
+ pop de
+ pop hl
+ jr z, .asm_10614d
+ add hl, bc
+.asm_106142
+ inc [hl]
+ jr nz, .asm_10614d
+ ld a, c
+ and a
+ jr z, .asm_10614d
+ dec hl
+ dec c
+ jr .asm_106142
+
+.asm_10614d
+ call UpdateTrainerRankingsChecksum
+ call CloseSRAM
+ pop bc
+ ret
+; 106155
+
+; Used when SRAM bank 5 isn’t already loaded — what’s the point of this?
+UpdateTrainerRankingsChecksum2: mobile ; 106155
+ ld a, BANK(sTrainerRankings)
+ call GetSRAMBank
+ call UpdateTrainerRankingsChecksum
+ call CloseSRAM
+ ret
+; 106162
+
+UpdateTrainerRankingsChecksum: ; 106162
+ push de
+ call CalculateTrainerRankingsChecksum
+ ld hl, sTrainerRankingsChecksum
+ ld [hl], d
+ inc hl
+ ld [hl], e
+ pop de
+ ret
+; 10616e
+
+CalculateTrainerRankingsChecksum: ; 10616e
+ push bc
+ ld hl, sTrainerRankings
+ ld bc, sTrainerRankingsChecksum - sTrainerRankings
+ xor a
+ ld de, 0
+.asm_106179
+ ld a, e
+ add [hl]
+ ld e, a
+ jr nc, .asm_10617f
+ inc d
+
+.asm_10617f
+ inc hl
+ dec bc
+ ld a, b
+ or c
+ jr nz, .asm_106179
+ pop bc
+ ret
+; 106187
+
+
+BackupMobileEventIndex: ; 106187
+ ld a, BANK(sMobileEventIndex)
+ call GetSRAMBank
+ ld a, [sMobileEventIndex]
+ push af
+ ld a, BANK(sMobileEventIndexBackup)
+ call GetSRAMBank
+ pop af
+ ld [sMobileEventIndexBackup], a
+ call CloseSRAM
+ ret
+; 10619d
+
+
+RestoreMobileEventIndex: ; 10619d (41:619d)
+ ld a, BANK(sMobileEventIndexBackup)
+ call GetSRAMBank
+ ld a, [sMobileEventIndexBackup]
+ push af
+ ld a, BANK(sMobileEventIndex)
+ call GetSRAMBank
+ pop af
+ ld [sMobileEventIndex], a
+ call CloseSRAM
+ ret
+; 1061b3 (41:61b3)
+
+; Unreferenced in English version.
+VerifyTrainerRankingsChecksum: ; 1061b3
+ call CalculateTrainerRankingsChecksum
+ ld hl, sTrainerRankingsChecksum
+ ld a, d
+ cp [hl]
+ ret nz
+ inc hl
+ ld a, e
+ cp [hl]
+ ret
+; 1061c0
+
+DeleteMobileEventIndex: ; 1061c0 (41:61c0)
+ ld a, BANK(sMobileEventIndex)
+ call GetSRAMBank
+ xor a
+ ld [sMobileEventIndex], a
+ call CloseSRAM
+ ret
+; 1061cd (41:61cd)
+
+; Used in the Japanese version to initialize Trainer Rankings data
+; for a new save file. Unreferenced in the English version.
+InitializeTrainerRankings:
+ ld hl, sTrainerRankings
+ ld bc, sTrainerRankingsEnd - sTrainerRankings
+ xor a
+ call ByteFill
+
+ ; Initialize the shortest Magikarp to 100.0 cm
+ ld hl, sTrainerRankingShortestMagikarp
+ ld a, $3
+ ld [hli], a
+ ld [hl], $e8
+
+ call UpdateTrainerRankingsChecksum
+ ld hl, sTrainerRankings
+ ld de, sTrainerRankingsBackup
+ ld bc, sTrainerRankingsEnd - sTrainerRankings
+ call CopyBytes
+ ret
+; 1061ef
+
+
+_MobilePrintNum:: ; 1061ef
+; Supports signed 31-bit integers (up to 10 digits)
+; b: Bits 0-4 = # bytes
+; Bit 7 = set if negative
+; c: Number of digits
+; de: highest byte of number to convert
+; hl: where to print the converted string
+ push bc
+ xor a
+ ld [hPrintNum1], a
+ ld [hPrintNum2], a
+ ld [hPrintNum3], a
+ ld a, b
+ and $f
+ cp $1
+ jr z, .one_byte
+ cp $2
+ jr z, .two_bytes
+ cp $3
+ jr z, .three_bytes
+; four bytes
+ ld a, [de]
+ ld [hPrintNum1], a
+ inc de
+
+.three_bytes
+ ld a, [de]
+ ld [hPrintNum2], a
+ inc de
+
+.two_bytes
+ ld a, [de]
+ ld [hPrintNum3], a
+ inc de
+
+.one_byte
+ ld a, [de]
+ ld [hPrintNum4], a
+ inc de
+
+ push de
+ xor a
+ ld [hPrintNum9], a
+ ld a, b
+ ld [hPrintNum10], a
+ ld a, c
+ cp 2
+ jr z, .two_digits
+ ld de, ._2
+ cp 3
+ jr z, .three_to_nine_digits
+ ld de, ._3
+ cp 4
+ jr z, .three_to_nine_digits
+ ld de, ._4
+ cp 5
+ jr z, .three_to_nine_digits
+ ld de, ._5
+ cp 6
+ jr z, .three_to_nine_digits
+ ld de, ._6
+ cp 7
+ jr z, .three_to_nine_digits
+ ld de, ._7
+ cp 8
+ jr z, .three_to_nine_digits
+ ld de, ._8
+ cp 9
+ jr z, .three_to_nine_digits
+ ld de, ._9
+
+.three_to_nine_digits
+ inc de
+ inc de
+ inc de
+ dec a
+ dec a
+
+.digit_loop
+ push af
+ call .Function1062b2
+ call .Function1062ff
+rept 4
+ inc de
+endr
+ pop af
+ dec a
+ jr nz, .digit_loop
+
+.two_digits
+ ld c, 0
+ ld a, [hPrintNum4]
+.mod_ten_loop
+ cp 10
+ jr c, .simple_divide_done
+ sub 10
+ inc c
+ jr .mod_ten_loop
+
+.simple_divide_done
+ ld b, a
+ ld a, [hPrintNum9]
+ or c
+ ld [hPrintNum9], a
+ jr nz, .create_digit
+ call .LoadMinusTenIfNegative
+ jr .done
+
+.create_digit
+ ld a, "0"
+ add c
+ ld [hl], a
+
+.done
+ call .Function1062ff
+ ld a, "0"
+ add b
+ ld [hli], a
+ pop de
+ pop bc
+ ret
+; 106292
+
+._9 dd 1000000000
+._8 dd 100000000
+._7 dd 10000000
+._6 dd 1000000
+._5 dd 100000
+._4 dd 10000
+._3 dd 1000
+._2 dd 100
+; 1062b2
+
+.Function1062b2: ; 1062b2
+ ld c, $0
+.asm_1062b4
+ ld a, [de]
+ dec de
+ ld b, a
+ ld a, [hPrintNum4]
+ sub b
+ ld [hPrintNum8], a
+ ld a, [de]
+ dec de
+ ld b, a
+ ld a, [hPrintNum3]
+ sbc b
+ ld [hPrintNum7], a
+ ld a, [de]
+ dec de
+ ld b, a
+ ld a, [hPrintNum2]
+ sbc b
+ ld [hPrintNum6], a
+ ld a, [de]
+ inc de
+ inc de
+ inc de
+ ld b, a
+ ld a, [hPrintNum1]
+ sbc b
+ ld [hPrintNum5], a
+ jr c, .asm_1062eb
+ ld a, [hPrintNum5]
+ ld [hPrintNum1], a
+ ld a, [hPrintNum6]
+ ld [hPrintNum2], a
+ ld a, [hPrintNum7]
+ ld [hPrintNum3], a
+ ld a, [hPrintNum8]
+ ld [hPrintNum4], a
+ inc c
+ jr .asm_1062b4
+
+.asm_1062eb
+ ld a, [hPrintNum9]
+ or c
+ jr z, .LoadMinusTenIfNegative
+ ld a, -10
+ add c
+ ld [hl], a
+ ld [hPrintNum9], a
+ ret
+
+.LoadMinusTenIfNegative:
+ ld a, [hPrintNum10]
+ bit 7, a
+ ret z
+
+ ld [hl], -10
+ ret
+; 1062ff
+
+.Function1062ff: ; 1062ff
+ ld a, [hPrintNum10]
+ bit 7, a
+ jr nz, .asm_10630d
+ bit 6, a
+ jr z, .asm_10630d
+ ld a, [hPrintNum9]
+ and a
+ ret z
+
+.asm_10630d
+ inc hl
+ ret
+; 10630f
+
+; functions related to the cable club and various NPC scripts referencing mobile communications
+
+Mobile_DummyReturnFalse: ; 10630f
+ xor a
+ ld [ScriptVar], a
+ ret
+; 106314
+
+MobileFn_106314: mobile ; 106314
+ ld a, $4
+ call GetSRAMBank
+ ld a, c
+ cpl
+ ld [$b000], a
+ call CloseSRAM
+ ld a, $7
+ call GetSRAMBank
+ ld a, c
+ ld [$a800], a
+ call CloseSRAM
+ ret
+; 10632f
+
+Mobile_AlwaysReturnNotCarry: ; 10632f
+ or a
+ ret
+
+Function106331: ; 106331 - called by Mobile_DummyReturnFalse in Crystal-J
+ ; check ~[4:b000] == [7:a800]
+ ld a, $4
+ call GetSRAMBank
+ ld a, [$b000]
+ cpl
+ ld b, a
+ call CloseSRAM
+ ld a, $7
+ call GetSRAMBank
+ ld a, [$a800]
+ ld c, a
+ call CloseSRAM
+ ld a, c
+ cp b
+ jr nz, .nope
+
+ ; check [7:a800] != 0
+ and a
+ jr z, .nope
+
+ ; check !([7:a800] & %01110000)
+ and %10001111
+ cp c
+ jr nz, .nope
+
+ ld c, a
+ scf
+ ret
+
+.nope
+ xor a
+ ld c, a
+ ret
+; 10635c
+
+Function10635c: ; 10635c
+ ld a, [wMobileCommsJumptableIndex]
+ bit 7, a
+ ret nz
+ ld a, [wMobileCommsJumptableIndex]
+ ld hl, .Jumptable
+ rst JumpTable
+ ret
+; 10636a
+
+.Jumptable: ; 10636a
+ dw .init
+ dw Function106392
+ dw Function1063cc
+ dw Function1063d8
+ dw Function1063e5
+ dw Function1063f3
+ dw Function106403
+ dw Function106442
+ dw Function106453
+; 10637c
+
+.init: ; 10637c
+ ld de, wcd30
+ ld hl, $41
+ ld bc, $41
+ ld a, $40
+ call Function3e32
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 106392
+
+Function106392: ; 106392
+ xor a
+ ld [wcf64], a
+ ld a, [wc821]
+ bit 1, a
+ jr nz, .asm_1063a2
+ bit 0, a
+ jr z, .asm_1063bf
+ ret
+
+.asm_1063a2
+ call Mobile_AlwaysReturnNotCarry
+ ld a, c
+ and a
+ jr nz, .asm_1063b4
+ ld a, $b
+ ld [wcf64], a
+ ld a, $7
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_1063b4
+ ld a, $7
+ ld [wcf64], a
+ ld a, $7
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_1063bf
+ ld a, $1
+ ld [wcf64], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 1063cc
+
+Function1063cc: ; 1063cc
+ ld a, $78
+ ld [wcd42], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+
+Function1063d8: ; 1063d8
+ ld hl, wcd42
+ dec [hl]
+ ret nz
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 1063e5
+
+Function1063e5: ; 1063e5
+ ld a, [wcf64]
+ cp $3
+ ret nz
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 1063f3
+
+Function1063f3: ; 1063f3
+ ld de, wcd31
+ ld a, $32
+ call Function3e32
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 106403
+
+Function106403: ; 106403
+ ld a, [wc821]
+ bit 1, a
+ jr nz, .asm_106426
+ bit 0, a
+ jr z, .asm_10640f
+ ret
+
+.asm_10640f
+ ld a, [wcd31]
+ and $80
+ ld c, a
+ ld a, [wcd30]
+ or c
+ inc a
+ ld c, a
+ call MobileFn_106314
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_106426
+ call Mobile_AlwaysReturnNotCarry
+ ld a, c
+ and a
+ jr z, .asm_106435
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+
+.asm_106435
+ ld c, $0
+ call MobileFn_106314
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+ ret
+; 106442
+
+Function106442: ; 106442
+ ld a, $36
+ call Function3e32
+ xor a
+ ld [hMobile], a
+ ld [hMobileReceive], a
+ ld a, [wMobileCommsJumptableIndex]
+ inc a
+ ld [wMobileCommsJumptableIndex], a
+
+Function106453: ; 106453
+ ld a, [wMobileCommsJumptableIndex]
+ set 7, a
+ ld [wMobileCommsJumptableIndex], a
+ nop
+ ld a, $4
+ ld [wcf64], a
+ ret
+; 106462
+
+MobileFunc_106462: mobile
+ ret
+; 106464
+
+Function106464:: ; 106464
+ ld de, MobilePhoneTilesGFX
+ ld hl, VTiles2 tile $60
+ lb bc, BANK(MobilePhoneTilesGFX), 1
+ call Get2bpp
+ ld de, FontsExtra2_UpArrowGFX
+ ld hl, VTiles2 tile $61
+ lb bc, BANK(FontsExtra2_UpArrowGFX), 1
+ call Get2bpp
+ ld de, GFX_106514
+ ld hl, VTiles2 tile $62
+ ld c, 9
+ ld b, BANK(GFX_106514)
+ call Get2bpp
+ ld de, $40b0
+ ld hl, VTiles2 tile $6b
+ ld b, $f ; XXX no graphics at 0f:40b0
+ call Get2bpp
+ farcall LoadFrame
+ ret
+; 10649b
+
+Function10649b: ; 10649b
+ ld a, [TextBoxFrame]
+ and $7
+ ld bc, 3 tiles
+ ld hl, Frames
+ call AddNTimes
+ ld d, h
+ ld e, l
+ ld hl, VTiles2 tile $79
+ ld c, 6
+ ld b, BANK(Frames)
+ call Function1064c3
+ ld hl, VTiles2 tile $7f
+ ld de, TextBoxSpaceGFX
+ ld c, 1
+ ld b, BANK(TextBoxSpaceGFX)
+ call Function1064c3
+ ret
+; 1064c3
+
+Function1064c3: ; 1064c3
+ ld a, [rSVBK]
+ push af
+ ld a, $6
+ ld [rSVBK], a
+ push bc
+ push hl
+ ld hl, Function3f88
+ ld a, b
+ rst FarCall
+ pop hl
+ pop bc
+ pop af
+ ld [rSVBK], a
+ jr asm_1064ed
+
+Function1064d8: ; 1064d8
+ ld a, [rSVBK]
+ push af
+ ld a, $6
+ ld [rSVBK], a
+ push bc
+ push hl
+ ld hl, Function3f9f
+ ld a, b
+ rst FarCall
+ pop hl
+ pop bc
+ pop af
+ ld [rSVBK], a
+ jr asm_1064ed
+
+asm_1064ed
+ ld de, wDecompressScratch
+ ld b, $0
+ ld a, [rSVBK]
+ push af
+ ld a, $6
+ ld [rSVBK], a
+ ld a, [rVBK]
+ push af
+ ld a, $1
+ ld [rVBK], a
+ call Get2bpp
+ pop af
+ ld [rVBK], a
+ pop af
+ ld [rSVBK], a
+ ret
+; 10650a
+
+Function10650a: ; 10650a
+ ld de, MobilePhoneTilesGFX + $20
+ lb bc, BANK(MobilePhoneTilesGFX), $11
+ call Get2bpp
+ ret
+; 106514
+
+GFX_106514:
+INCBIN "gfx/unknown/106514.2bpp"
diff --git a/mobile/mobile_42.asm b/mobile/mobile_42.asm
new file mode 100644
index 000000000..e551b5245
--- /dev/null
+++ b/mobile/mobile_42.asm
@@ -0,0 +1,2009 @@
+MobileTradeAnimation_SendGivemonToGTS: ; 108000
+ ld a, $80
+ ld [wcf65], a
+ ld de, .TradeAnimScript
+ jp RunMobileTradeAnim_NoFrontpics
+; 10800b
+
+.TradeAnimScript:
+ mobiletradeanim_showgtsgivemon
+ mobiletradeanim_12
+ mobiletradeanim_10
+ mobiletradeanim_sendmon
+ mobiletradeanim_06
+ mobiletradeanim_0f
+ mobiletradeanim_end
+
+MobileTradeAnimation_RetrieveGivemonFromGTS:
+ ld a, $80
+ jr asm_108018
+
+MobileTradeAnimation_ReceiveGetmonFromGTS: ; 108016
+ ld a, $0
+asm_108018:
+ ld [wcf65], a
+ ld de, .TradeAnimScript
+ jp RunMobileTradeAnim_NoFrontpics
+; 108021
+
+.TradeAnimScript:
+ mobiletradeanim_11
+ mobiletradeanim_07
+ mobiletradeanim_receivemon
+ mobiletradeanim_showgtsgetmon
+ mobiletradeanim_end
+
+Function108026: ; 108026
+ ld a, $0
+ jr asm_10802c
+
+Function10802a: ; 10802a
+ ld a, $1
+
+asm_10802c:
+ ld [wcf65], a
+ ld de, .TradeAnimScript
+ jp RunMobileTradeAnim_Frontpics
+; 108035
+
+.TradeAnimScript: ; trade
+ mobiletradeanim_showgivemon
+ mobiletradeanim_12
+ mobiletradeanim_02
+ mobiletradeanim_sendmon
+ mobiletradeanim_05
+ mobiletradeanim_receivemon
+ mobiletradeanim_showgetmon
+ mobiletradeanim_end
+
+Function10803d: ; 10803d
+ ld a, $0
+ ld [wcf65], a
+ ld de, .TradeAnimScript
+ jp RunMobileTradeAnim_NoFrontpics
+; 108048
+
+.TradeAnimScript:
+ mobiletradeanim_11
+ mobiletradeanim_07
+ mobiletradeanim_receivemon
+ mobiletradeanim_showoddegg
+ mobiletradeanim_end
+
+Function10804d: ; 10804d
+ ld a, $0
+ ld [wcf65], a
+ ld de, .TradeAnimScript
+ jp RunMobileTradeAnim_NoFrontpics
+; 108058
+
+.TradeAnimScript:
+ mobiletradeanim_11
+ mobiletradeanim_showgtsgetmon
+ mobiletradeanim_end
+
+RunMobileTradeAnim_Frontpics: ; 10805b
+ ld hl, wTradeAnimAddress
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ ld a, [hMapAnims]
+ push af
+ xor a
+ ld [hMapAnims], a
+ ld hl, VramState
+ ld a, [hl]
+ push af
+ res 0, [hl]
+ ld hl, Options
+ ld a, [hl]
+ push af
+ set NO_TEXT_SCROLL, [hl]
+ call Function1080b7
+.loop
+ call MobileTradeAnim_JumptableLoop
+ jr nc, .loop
+ pop af
+ ld [Options], a
+ pop af
+ ld [VramState], a
+ pop af
+ ld [hMapAnims], a
+ ret
+; 108089
+
+RunMobileTradeAnim_NoFrontpics: ; 108089
+ ld hl, wTradeAnimAddress
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ ld a, [hMapAnims]
+ push af
+ xor a
+ ld [hMapAnims], a
+ ld hl, VramState
+ ld a, [hl]
+ push af
+ res 0, [hl]
+ ld hl, Options
+ ld a, [hl]
+ push af
+ set NO_TEXT_SCROLL, [hl]
+ call Function108157
+.loop
+ call MobileTradeAnim_JumptableLoop
+ jr nc, .loop
+ pop af
+ ld [Options], a
+ pop af
+ ld [VramState], a
+ pop af
+ ld [hMapAnims], a
+ ret
+; 1080b7
+
+Function1080b7: ; 1080b7
+ xor a
+ ld [wJumptableIndex], a
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearTileMap
+ call DisableLCD
+ call MobileTradeAnim_ClearVTiles
+ call MobileTradeAnim_ClearBGMap
+ call LoadStandardFont
+ call LoadFontsBattleExtra
+
+ ld a, $1
+ ld [rVBK], a
+ ld hl, LZ_108da7
+ ld de, VTiles2
+ call Decompress
+
+ ld a, $0
+ ld [rVBK], a
+ ld hl, LZ_108d27
+ ld de, VTiles0 tile $20
+ call Decompress
+
+ call EnableLCD
+
+ xor a
+ ld [hSCX], a
+ ld [hSCY], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $90
+ ld [hWY], a
+ farcall ClearSpriteAnims
+
+ call DelayFrame
+
+ ld de, TradeBallGFX
+ ld hl, VTiles0
+ lb bc, BANK(TradeBallGFX), $06
+ call Request2bpp
+
+ ld de, TradePoofGFX
+ ld hl, VTiles0 tile $06
+ lb bc, BANK(TradePoofGFX), $0c
+ call Request2bpp
+
+ xor a
+ ld hl, wSpriteAnimDict
+ ld [hli], a
+ ld [hl], $0
+
+ ld a, [wPlayerTrademonSpecies]
+ ld hl, wPlayerTrademonDVs
+ ld de, VTiles0 tile $30
+ call MobileTradeAnim_GetFrontpic
+
+ ld a, [wOTTrademonSpecies]
+ ld hl, wOTTrademonDVs
+ ld de, VTiles2 tile $31
+ call MobileTradeAnim_GetFrontpic
+
+ ld a, [wPlayerTrademonSpecies]
+ ld de, wPlayerTrademonSpeciesName
+ call MobileTradeAnim_InitSpeciesName
+
+ ld a, [wOTTrademonSpecies]
+ ld de, wOTTrademonSpeciesName
+ call MobileTradeAnim_InitSpeciesName
+
+ xor a
+ call Function108b98
+ call Function108af4
+ ret
+; 108157
+
+Function108157: ; 108157
+ xor a
+ ld [wJumptableIndex], a
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearTileMap
+ call DisableLCD
+ call MobileTradeAnim_ClearVTiles
+ call MobileTradeAnim_ClearBGMap
+ call LoadStandardFont
+ call LoadFontsBattleExtra
+ call EnableLCD
+ xor a
+ ld [hSCX], a
+ ld [hSCY], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $90
+ ld [hWY], a
+ farcall ClearSpriteAnims
+ xor a
+ ld hl, wSpriteAnimDict
+ ld [hli], a
+ ld [hl], $0
+ call DelayFrame
+ ld a, [wPlayerTrademonSpecies]
+ ld de, wPlayerTrademonSpeciesName
+ call MobileTradeAnim_InitSpeciesName
+ ld a, [wOTTrademonSpecies]
+ ld de, wOTTrademonSpeciesName
+ call MobileTradeAnim_InitSpeciesName
+ xor a
+ call Function108b98
+ call Function108af4
+ ret
+; 1081ad
+
+MobileTradeAnim_ClearVTiles: ; 1081ad
+ ld a, $1
+ ld [rVBK], a
+ ld hl, VTiles0
+ ld bc, 3 * $80 tiles
+ xor a
+ call ByteFill
+ ld a, $0
+ ld [rVBK], a
+ ld hl, VTiles0
+ ld bc, 3 * $80 tiles
+ xor a
+ call ByteFill
+ ret
+; 1081ca
+
+MobileTradeAnim_ClearBGMap: ; 1081ca
+ ld a, $1
+ ld [rVBK], a
+ hlbgcoord 0, 0
+ ld bc, 2 * BG_MAP_HEIGHT * BG_MAP_WIDTH
+ ld a, $0
+ call ByteFill
+ ld a, $0
+ ld [rVBK], a
+ hlbgcoord 0, 0
+ ld bc, 2 * BG_MAP_HEIGHT * BG_MAP_WIDTH
+ ld a, $7f
+ call ByteFill
+ ret
+; 1081e9
+
+MobileTradeAnim_GetFrontpic: ; 1081e9
+ push de
+ push af
+ predef GetUnownLetter
+ pop af
+ ld [CurPartySpecies], a
+ ld [CurSpecies], a
+ call GetBaseData
+ pop de
+ predef GetMonFrontpic
+ ret
+; 108201
+
+Function108201: ; 108201
+ push de
+ push af
+ predef GetUnownLetter
+ pop af
+ ld [CurPartySpecies], a
+ ld [CurSpecies], a
+ call GetBaseData
+ pop de
+ predef GetAnimatedFrontpicPredef
+ ret
+; 108219
+
+Function108219: ; 108219
+ ld [CurPartySpecies], a
+ hlcoord 7, 2
+ ld d, $0
+ ld e, ANIM_MON_TRADE
+ predef AnimateFrontpic
+ ret
+; 108229
+
+Function108229: ; 108229
+ ld [CurPartySpecies], a
+ hlcoord 7, 2
+ ld d, $0
+ ld e, ANIM_MON_TRADE
+ predef LoadMonAnimation
+ ret
+; 108239
+
+MobileTradeAnim_InitSpeciesName: ; 108239
+ push de
+ ld [wd265], a
+ call GetPokemonName
+ ld hl, StringBuffer1
+ pop de
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+ ret
+; 10824b
+
+MobileTradeAnim_JumptableLoop: ; 10824b
+ ld a, [wJumptableIndex]
+ bit 7, a
+ jr nz, .StopAnim
+ call .ExecuteMobileTradeAnimCommand
+ call DelayFrame
+ and a
+ ret
+
+.StopAnim:
+ xor a
+ ld [hSCX], a
+ ld [hSCY], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $90
+ ld [hWY], a
+ call LoadStandardFont
+ call LoadFontsBattleExtra
+ farcall MobileFunc_106462
+ farcall Function106464
+ scf
+ ret
+; 10827b
+
+.ExecuteMobileTradeAnimCommand: ; 10827b
+ ld a, [wJumptableIndex]
+ ld e, a
+ ld d, 0
+ ld hl, .Jumptable
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+; 10828a
+
+.Jumptable: ; 10828a
+
+ dw GetMobileTradeAnimByte ; 00
+ dw MobileTradeAnim_ShowPlayerMonToBeSent ; 01
+ dw MobileTradeAnim_02 ; 02
+ dw MobileTradeAnim_GiveTrademon1 ; 03
+ dw MobileTradeAnim_GiveTrademon2 ; 04
+ dw MobileTradeAnim_05 ; 05
+ dw MobileTradeAnim_06 ; 06
+ dw MobileTradeAnim_07 ; 07
+ dw MobileTradeAnim_GetTrademon1 ; 08
+ dw MobileTradeAnim_GetTrademon2 ; 09
+ dw MobileTradeAnim_GetTrademon3 ; 0a
+ dw MobileTradeAnim_ShowOTMonFromTrade ; 0b
+ dw EndMobileTradeAnim ; 0c
+ dw MobileTradeAnim_ShowPlayerMonForGTS ; 0d
+ dw MobileTradeAnim_ShowOTMonFromGTS ; 0e
+ dw MobileTradeAnim_0f ; 0f
+ dw MobileTradeAnim_10 ; 10
+ dw MobileTradeAnim_11 ; 11
+ dw MobileTradeAnim_FadeToBlack ; 12
+ dw MobileTradeAnim_GetOddEgg ; 13 get odd egg
+; 1082b2
+
+MobileTradeAnim_Next: ; 1082b2
+ ld hl, wJumptableIndex
+ inc [hl]
+ ret
+; 1082b7
+
+GetMobileTradeAnimByte: ; 1082b7
+ ld hl, wTradeAnimAddress
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld a, [de]
+ ld [wJumptableIndex], a
+ inc de
+ ld [hl], d
+ dec hl
+ ld [hl], e
+ ret
+; 1082c6
+
+EndMobileTradeAnim: ; 1082c6
+ ld hl, wJumptableIndex
+ set 7, [hl]
+ ret
+; 1082cc
+
+WaitMobileTradeSpriteAnims: ; 1082cc
+.loop
+ push bc
+ farcall PlaySpriteAnimations
+ pop bc
+ call DelayFrame
+ dec c
+ jr nz, .loop
+ ret
+; 1082db
+
+Function1082db: ; 1082db
+.loop
+ farcall PlaySpriteAnimations
+ farcall SetUpPokeAnim
+ farcall HDMATransferTileMapToWRAMBank3
+ jr nc, .loop
+ ret
+; 1082f0
+
+Function1082f0: ; 1082f0
+.loop
+ call Function108b78
+ call DelayFrame
+ dec c
+ jr nz, .loop
+ ret
+; 1082fa
+
+Function1082fa: ; 1082fa
+.loop
+ call Function108b78
+ push hl
+ push bc
+ farcall PlaySpriteAnimations
+ pop bc
+ pop hl
+ call DelayFrame
+ dec c
+ jr nz, .loop
+ ret
+; 10830e
+
+MobileTradeAnim_ShowPlayerMonToBeSent: ; 10830e
+ ld de, MUSIC_EVOLUTION
+ call PlayMusic2
+ ld a, $80
+ ld [hSCX], a
+ xor a
+ ld [hSCY], a
+ ld a, $87
+ ld [hWX], a
+ ld a, $50
+ ld [hWY], a
+ call MobileTradeAnim_DisplayMonToBeSent
+ ld a, [wPlayerTrademonSpecies]
+ ld [CurPartySpecies], a
+ call Function10895e
+ ld a, [wPlayerTrademonDVs]
+ ld [TempMonDVs], a
+ ld a, [wPlayerTrademonDVs + 1]
+ ld [TempMonDVs + 1], a
+ ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
+ call GetSGBLayout
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbBGPals
+ call WaitBGMap
+.loop
+ ld a, [hWX]
+ cp $7
+ jr z, .okay
+ sub $4
+ ld [hWX], a
+ ld a, [hSCX]
+ sub $4
+ ld [hSCX], a
+ call DelayFrame
+ jr .loop
+
+.okay
+ ld a, $7
+ ld [hWX], a
+ xor a
+ ld [hSCX], a
+ ld a, [wPlayerTrademonSpecies]
+ call GetCryIndex
+ jr c, .skip_cry
+ ld e, c
+ ld d, b
+ call PlayCryHeader
+
+.skip_cry
+ ld c, 80
+ call DelayFrames
+ call Function108bec
+ depixel 10, 11, 4, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL
+ call _InitSpriteAnimStruct
+ ld de, SFX_BALL_POOF
+ call PlaySFX
+ hlcoord 0, 0
+ ld bc, 12 * SCREEN_WIDTH
+ ld a, " "
+ call ByteFill
+ ld c, 80
+ call WaitMobileTradeSpriteAnims
+ call GetMobileTradeAnimByte
+ ret
+; 10839b
+
+MobileTradeAnim_ShowOTMonFromTrade: ; 10839b
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearTileMap
+ call DisableLCD
+ call MobileTradeAnim_ClearBGMap
+ ld a, [wOTTrademonSpecies]
+ ld [CurPartySpecies], a
+ ld hl, wOTTrademonDVs
+ ld de, VTiles2
+ call Function108201
+ call EnableLCD
+ farcall DeinitializeAllSprites
+ xor a
+ ld [hSCX], a
+ ld [hSCY], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $90
+ ld [hWY], a
+ depixel 10, 11, 4, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL
+ call _InitSpriteAnimStruct
+ call Function108b45
+ ld a, $1
+ call Function108b98
+ call Function108af4
+ ld c, 48
+ call WaitMobileTradeSpriteAnims
+ ld de, SFX_BALL_POOF
+ call PlaySFX
+ call MobileTradeAnim_DisplayReceivedMon
+ xor a
+ ld [hSCX], a
+ ld [hSCY], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $50
+ ld [hWY], a
+ ld a, [wOTTrademonSpecies]
+ ld [CurPartySpecies], a
+ ld a, [wOTTrademonDVs]
+ ld [TempMonDVs], a
+ ld a, [wOTTrademonDVs + 1]
+ ld [TempMonDVs + 1], a
+ ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
+ call GetSGBLayout
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbBGPals
+ call Function108963
+ ld a, [wOTTrademonSpecies]
+ call Function108229
+ call Function1082db
+ call Function108c16
+ call GetMobileTradeAnimByte
+ ret
+; 10842c
+
+MobileTradeAnim_ShowPlayerMonForGTS: ; 10842c
+ ld de, MUSIC_EVOLUTION
+ call PlayMusic2
+ ld a, $80
+ ld [hSCX], a
+ xor a
+ ld [hSCY], a
+ ld a, $87
+ ld [hWX], a
+ ld a, $50
+ ld [hWY], a
+ call MobileTradeAnim_DisplayMonToBeSent
+ ld a, [wPlayerTrademonSpecies]
+ ld [CurPartySpecies], a
+ ld hl, wPlayerTrademonDVs
+ call Function10898a
+ call DelayFrame
+ ld de, TradeBallGFX
+ ld hl, VTiles0
+ lb bc, BANK(TradeBallGFX), $06
+ call Request2bpp
+ ld de, TradePoofGFX
+ ld hl, VTiles0 tile $06
+ lb bc, BANK(TradePoofGFX), $0c
+ call Request2bpp
+ ld a, [wPlayerTrademonDVs]
+ ld [TempMonDVs], a
+ ld a, [wPlayerTrademonDVs + 1]
+ ld [TempMonDVs + 1], a
+ ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
+ call GetSGBLayout
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbBGPals
+ call WaitBGMap
+.loop
+ ld a, [hWX]
+ cp $7
+ jr z, .done
+ sub $4
+ ld [hWX], a
+ ld a, [hSCX]
+ sub $4
+ ld [hSCX], a
+ call DelayFrame
+ jr .loop
+
+.done
+ ld a, $7
+ ld [hWX], a
+ xor a
+ ld [hSCX], a
+ ld a, [wPlayerTrademonSpecies]
+ call GetCryIndex
+ jr c, .skip_cry
+ ld e, c
+ ld d, b
+ call PlayCryHeader
+
+.skip_cry
+ ld c, 80
+ call DelayFrames
+ call Function108c2b
+ depixel 10, 11, 4, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL
+ call _InitSpriteAnimStruct
+ ld de, SFX_BALL_POOF
+ call PlaySFX
+ hlcoord 0, 0
+ ld bc, 12 * SCREEN_WIDTH
+ ld a, " "
+ call ByteFill
+ ld c, 80
+ call WaitMobileTradeSpriteAnims
+ call GetMobileTradeAnimByte
+ ret
+; 1084d7
+
+MobileTradeAnim_ShowOTMonFromGTS: ; 1084d7
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearTileMap
+ call DisableLCD
+ call MobileTradeAnim_ClearBGMap
+ ld a, [wOTTrademonSpecies]
+ ld [CurPartySpecies], a
+ ld hl, wOTTrademonDVs
+ ld de, VTiles2
+ call Function108201
+ call EnableLCD
+ farcall DeinitializeAllSprites
+ call DelayFrame
+ ld de, TradeBallGFX
+ ld hl, VTiles0
+ lb bc, BANK(TradeBallGFX), $06
+ call Request2bpp
+ ld de, TradePoofGFX
+ ld hl, VTiles0 tile $06
+ lb bc, BANK(TradePoofGFX), $0c
+ call Request2bpp
+ xor a
+ ld [hSCX], a
+ ld [hSCY], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $90
+ ld [hWY], a
+ depixel 10, 11, 4, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL
+ call _InitSpriteAnimStruct
+ call Function108b45
+ ld a, $1
+ call Function108b98
+ call Function108af4
+ ld c, 48
+ call WaitMobileTradeSpriteAnims
+ ld de, SFX_BALL_POOF
+ call PlaySFX
+ call MobileTradeAnim_DisplayReceivedMon
+ xor a
+ ld [hSCX], a
+ ld [hSCY], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $50
+ ld [hWY], a
+ ld a, [wOTTrademonSpecies]
+ ld [CurPartySpecies], a
+ ld a, [wOTTrademonDVs]
+ ld [TempMonDVs], a
+ ld a, [wOTTrademonDVs + 1]
+ ld [TempMonDVs + 1], a
+ ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
+ call GetSGBLayout
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbBGPals
+ ld a, [wOTTrademonSpecies]
+ ld hl, wOTTrademonDVs
+ call Function10898a
+ ld a, [wOTTrademonSpecies]
+ call Function108229
+ call Function1082db
+ call Function108c40
+ call GetMobileTradeAnimByte
+ ret
+; 108589
+
+MobileTradeAnim_GetOddEgg: ; 108589
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearTileMap
+ call DisableLCD
+ call MobileTradeAnim_ClearBGMap
+ ld a, [wOTTrademonSpecies]
+ ld [CurPartySpecies], a
+ ld hl, wOTTrademonDVs
+ ld de, VTiles2
+ call Function108201
+ call EnableLCD
+ farcall DeinitializeAllSprites
+ call DelayFrame
+ ld de, TradeBallGFX
+ ld hl, VTiles0
+ lb bc, BANK(TradeBallGFX), $06
+ call Request2bpp
+ ld de, TradePoofGFX
+ ld hl, VTiles0 tile $06
+ lb bc, BANK(TradePoofGFX), $0c
+ call Request2bpp
+ xor a
+ ld [hSCX], a
+ ld [hSCY], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $90
+ ld [hWY], a
+ depixel 10, 11, 4, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL
+ call _InitSpriteAnimStruct
+ call Function108b45
+ ld a, $1
+ call Function108b98
+ call Function108af4
+ ld c, 48
+ call WaitMobileTradeSpriteAnims
+ ld de, SFX_BALL_POOF
+ call PlaySFX
+ call Function108a33
+ xor a
+ ld [hSCX], a
+ ld [hSCY], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $50
+ ld [hWY], a
+ ld a, [wOTTrademonSpecies]
+ ld [CurPartySpecies], a
+ ld a, [wOTTrademonDVs]
+ ld [TempMonDVs], a
+ ld a, [wOTTrademonDVs + 1]
+ ld [TempMonDVs + 1], a
+ ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
+ call GetSGBLayout
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbBGPals
+ ld a, [wOTTrademonSpecies]
+ ld hl, wOTTrademonDVs
+ call Function10898a
+ ld a, [wOTTrademonSpecies]
+ call Function108229
+ call Function1082db
+ call GetMobileTradeAnimByte
+ ret
+; 108638
+
+MobileTradeAnim_02: ; 108638
+ farcall DeinitializeAllSprites
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearTileMap
+ xor a
+ ld [hBGMapMode], a
+ call DisableLCD
+ call MobileTradeAnim_ClearBGMap
+ call Function108c80
+ call Function108c6d
+ call EnableLCD
+ ld a, $c
+ ld [hSCX], a
+ ld a, $78
+ ld [hSCY], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $90
+ ld [hWY], a
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, Palette_109107
+ ld de, UnknBGPals
+ ld bc, 8 palettes
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ call Function108d07
+ call Function108af4
+ call GetMobileTradeAnimByte
+ ret
+; 108689
+
+MobileTradeAnim_10: ; 108689
+ farcall DeinitializeAllSprites
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearTileMap
+ xor a
+ ld [hBGMapMode], a
+ call DisableLCD
+ call MobileTradeAnim_ClearBGMap
+ ld a, $1
+ ld [rVBK], a
+ ld hl, LZ_108da7
+ ld de, VTiles2
+ call Decompress
+ ld a, $0
+ ld [rVBK], a
+ ld hl, LZ_108d27
+ ld de, VTiles0 tile $20
+ call Decompress
+ call Function108c80
+ call Function108c6d
+ call EnableLCD
+ ld a, $c
+ ld [hSCX], a
+ ld a, $78
+ ld [hSCY], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $90
+ ld [hWY], a
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, Palette_109107
+ ld de, UnknBGPals
+ ld bc, 8 palettes
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ call Function108d07
+ call Function108af4
+ call GetMobileTradeAnimByte
+ ret
+; 1086f4
+
+MobileTradeAnim_11: ; 1086f4
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearTileMap
+ xor a
+ ld [hBGMapMode], a
+ call DisableLCD
+ ld a, $1
+ ld [rVBK], a
+ ld hl, LZ_108da7
+ ld de, VTiles2
+ call Decompress
+ ld a, $0
+ ld [rVBK], a
+ ld hl, LZ_108d27
+ ld de, VTiles0 tile $20
+ call Decompress
+ call Function108c80
+ call Function108c6d
+ call EnableLCD
+ ld a, $80
+ ld [hSCX], a
+ ld a, $90
+ ld [hSCY], a
+ ld a, $7
+ ld [hWX], a
+ ld a, $90
+ ld [hWY], a
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, Palette_109107
+ ld de, UnknBGPals
+ ld bc, 8 palettes
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ call Function108d07
+ call Function108af4
+ call Function108b5a
+ ld a, $e0
+ ld [hSCX], a
+ ld de, MUSIC_EVOLUTION
+ call PlayMusic2
+ call GetMobileTradeAnimByte
+ ret
+; 108763
+
+MobileTradeAnim_GiveTrademon1: ; 108763
+ ld de, SFX_GIVE_TRADEMON
+ call PlaySFX
+ ld c, 40
+ ld hl, BGPals palette 6
+ call Function1082f0
+ call Function108af4
+.loop
+ ld a, [hSCX]
+ cp $e0
+ jr z, .loop2
+ dec a
+ dec a
+ ld [hSCX], a
+ cp $f8
+ jr nz, .next
+ depixel 10, 11, 4, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_22
+ call _InitSpriteAnimStruct
+
+.next
+ ld c, 1
+ call WaitMobileTradeSpriteAnims
+ jr .loop
+
+.loop2
+ ld a, [hSCY]
+ cp $f8
+ jr z, .done
+ dec a
+ dec a
+ ld [hSCY], a
+ cp $40
+ jr z, .init
+ cp $30
+ jr z, .delete
+ cp $68
+ jr z, .replace
+ jr .next2
+
+.init
+ depixel 10, 11, 4, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_22
+ call _InitSpriteAnimStruct
+ xor a
+ call Function108ad4
+ jr .next2
+
+.delete
+ call MobileTradeAnim_DeleteSprites
+ jr .next2
+
+.replace
+ call MobileTradeAnim_DeleteSprites
+ ld a, $1
+ call Function108ad4
+.next2
+ ld c, 1
+ call WaitMobileTradeSpriteAnims
+ jr .loop2
+
+.done
+ call MobileTradeAnim_Next
+ ret
+; 1087cf
+
+MobileTradeAnim_GiveTrademon2: ; 1087cf
+ ld c, 40
+ ld hl, BGPals + 1 palettes
+ call Function1082f0
+ call Function108af4
+ call Function108b5a
+ depixel 9, 10, 2, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_25
+ call _InitSpriteAnimStruct
+ ld de, SFX_FORESIGHT
+ call PlaySFX
+ ld c, 10
+ call WaitMobileTradeSpriteAnims
+ xor a
+ ld [wcf64], a
+ depixel 9, 10, 2, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_23
+ call _InitSpriteAnimStruct
+.loop
+ ld a, [hSCY]
+ cp $90
+ jr z, .done
+ sub $8
+ ld [hSCY], a
+ ld c, 1
+ call WaitMobileTradeSpriteAnims
+ jr .loop
+
+.done
+ call GetMobileTradeAnimByte
+ ret
+; 108811
+
+MobileTradeAnim_05: ; 108811
+ ld c, 40
+ call WaitMobileTradeSpriteAnims
+ ld a, $1
+ ld [wcf64], a
+ ld de, SFX_SHARPEN
+ call PlaySFX
+ ld c, 60
+ call WaitMobileTradeSpriteAnims
+ depixel 30, 10, 2, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_24
+ call _InitSpriteAnimStruct
+ call GetMobileTradeAnimByte
+ ld de, SFX_THROW_BALL
+ call PlaySFX
+ ret
+; 108838
+
+MobileTradeAnim_06: ; 108838
+ ld c, 40
+ call WaitMobileTradeSpriteAnims
+ ld a, $1
+ ld [wcf64], a
+ ld de, SFX_SHARPEN
+ call PlaySFX
+ call GetMobileTradeAnimByte
+ ret
+; 10884c
+
+MobileTradeAnim_07: ; 10884c
+ ld c, 80
+ call DelayFrames
+ depixel 30, 10, 2, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_24
+ call _InitSpriteAnimStruct
+ call GetMobileTradeAnimByte
+ ld de, SFX_THROW_BALL
+ call PlaySFX
+ ret
+; 108863
+
+MobileTradeAnim_GetTrademon1: ; 108863
+ ld c, 40
+ call WaitMobileTradeSpriteAnims
+.loop
+ ld a, [hSCY]
+ cp $f8
+ jr z, .done
+ add $8
+ ld [hSCY], a
+ ld c, 1
+ call WaitMobileTradeSpriteAnims
+ jr .loop
+
+.done
+ farcall DeinitializeAllSprites
+ depixel 9, 10, 2, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_25
+ call _InitSpriteAnimStruct
+ ld de, SFX_GLASS_TING_2
+ call PlaySFX
+ call Function108af4
+ call MobileTradeAnim_Next
+ ret
+; 108894
+
+MobileTradeAnim_GetTrademon2: ; 108894
+ ld c, 20
+ ld hl, BGPals + 1 palettes
+ call Function1082fa
+ ld de, SFX_GIVE_TRADEMON
+ call PlaySFX
+ ld c, 20
+ ld hl, BGPals + 1 palettes
+ call Function1082fa
+ call Function108af4
+.asm_1088ad
+ ld a, [hSCY]
+ cp $78
+ jr z, .asm_1088ee
+ inc a
+ inc a
+ ld [hSCY], a
+ cp $30
+ jr z, .asm_1088c5
+ cp $40
+ jr z, .asm_1088dd
+ cp $68
+ jr z, .asm_1088cf
+ jr .asm_1088e7
+
+.asm_1088c5
+ depixel 10, 11, 4, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_22
+ call _InitSpriteAnimStruct
+ jr .asm_1088e7
+
+.asm_1088cf
+ depixel 10, 11, 4, 0
+ ld a, SPRITE_ANIM_INDEX_MOBILE_22
+ call _InitSpriteAnimStruct
+ xor a
+ call Function108ad4
+ jr .asm_1088e7
+
+.asm_1088dd
+ call MobileTradeAnim_DeleteSprites
+ ld a, $1
+ call Function108ad4
+ jr .asm_1088e7
+
+.asm_1088e7
+ ld c, 1
+ call WaitMobileTradeSpriteAnims
+ jr .asm_1088ad
+
+.asm_1088ee
+ ld a, [hSCX]
+ cp $c
+ jr z, .asm_108906
+ inc a
+ inc a
+ ld [hSCX], a
+ cp -8
+ jr nz, .asm_1088e7
+ call MobileTradeAnim_DeleteSprites
+ ld c, 1
+ call WaitMobileTradeSpriteAnims
+ jr .asm_1088ee
+
+.asm_108906
+ call MobileTradeAnim_Next
+ ret
+; 10890a
+
+MobileTradeAnim_GetTrademon3: ; 10890a
+ ld c, 40
+ ld hl, BGPals palette 6
+ call Function1082f0
+ call Function108af4
+ call GetMobileTradeAnimByte
+ ret
+; 108919
+
+MobileTradeAnim_0f: ; 108919
+ ld c, 40
+ call WaitMobileTradeSpriteAnims
+ farcall DeinitializeAllSprites
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearTileMap
+ call DisableLCD
+ call MobileTradeAnim_ClearVTiles
+ call MobileTradeAnim_ClearBGMap
+ call EnableLCD
+ call GetMobileTradeAnimByte
+ ret
+; 10893d
+
+MobileTradeAnim_FadeToBlack: ; 10893d
+.loop
+ ld a, [rBGP]
+ and a
+ jr z, .blank
+ sla a
+ sla a
+ call DmgToCgbBGPals
+ call DmgToCgbObjPal0
+ ld c, 4
+ call DelayFrames
+ jr .loop
+
+.blank
+ xor a
+ call DmgToCgbBGPals
+ call DmgToCgbObjPal0
+ call GetMobileTradeAnimByte
+ ret
+; 10895e
+
+Function10895e: ; 10895e
+ ld de, VTiles0 tile $30
+ jr asm_108966
+
+Function108963:
+ ld de, VTiles2 tile $31
+asm_108966
+ call DelayFrame
+ ld hl, VTiles2
+ lb bc, $a, $31 ; $a is the bank of ?????
+ call Request2bpp
+ call WaitTop
+ call MobileTradeAnim_ClearTilemap
+ hlcoord 7, 2
+ xor a
+ ld [hGraphicStartTile], a
+ lb bc, 7, 7
+ predef PlaceGraphic
+ call WaitBGMap
+ ret
+; 10898a
+
+Function10898a: ; 10898a
+ ld de, VTiles2
+ call MobileTradeAnim_GetFrontpic
+ call WaitTop
+ call MobileTradeAnim_ClearTilemap
+ hlcoord 7, 2
+ xor a
+ ld [hGraphicStartTile], a
+ lb bc, 7, 7
+ predef PlaceGraphic
+ call WaitBGMap
+ ret
+; 1089a8
+
+MobileTradeAnim_DisplayMonToBeSent: ; 1089a8
+ ld de, wPlayerTrademonSpecies
+ ld a, [de]
+ cp EGG
+ jr z, MobileTradeAnim_DisplayEggData
+ call MobileTradeAnim_LoadMonTemplate
+ ld de, wPlayerTrademonSpecies
+ call MobileTradeAnim_MonDisplay_PrintSpeciesNumber
+ ld de, wPlayerTrademonSpeciesName
+ call MobileTradeAnim_MonDisplay_PrintSpeciesName
+ ld a, [wPlayerTrademonCaughtData]
+ ld de, wPlayerTrademonOTName
+ call MobileTradeAnim_MonDisplay_PrintOTNameAndGender
+ ld de, wPlayerTrademonID
+ call MobileTradeAnim_MonDisplay_PrintIDNumber
+ call MobileTradeAnim_MonDisplay_UpdateBGMap
+ ret
+
+MobileTradeAnim_DisplayReceivedMon:
+ ld de, wOTTrademonSpecies
+ ld a, [de]
+ cp EGG
+ jr z, MobileTradeAnim_DisplayEggData
+ call MobileTradeAnim_LoadMonTemplate
+ ld de, wOTTrademonSpecies
+ call MobileTradeAnim_MonDisplay_PrintSpeciesNumber
+ ld de, wOTTrademonSpeciesName
+ call MobileTradeAnim_MonDisplay_PrintSpeciesName
+ ld a, [wOTTrademonCaughtData]
+ ld de, wOTTrademonOTName
+ call MobileTradeAnim_MonDisplay_PrintOTNameAndGender
+ ld de, wOTTrademonID
+ call MobileTradeAnim_MonDisplay_PrintIDNumber
+ call MobileTradeAnim_MonDisplay_UpdateBGMap
+ ret
+
+MobileTradeAnim_DisplayEggData
+ call WaitTop
+ call MobileTradeAnim_ClearTilemap
+ ld a, VBGMap1 / $100
+ ld [hBGMapAddress + 1], a
+ hlcoord 5, 0
+ ld b, 6
+ ld c, 9
+ call TextBox
+ hlcoord 6, 2
+ ld de, .EggTemplate
+ call PlaceString
+ call MobileTradeAnim_MonDisplay_UpdateBGMap
+ ret
+; 108a1d
+
+.EggTemplate: ; 108a1d
+ db "タマゴ"
+ next "おや/?????"
+ next "<ID>№<DOT>?????"
+ db "@"
+; 108a33
+
+Function108a33: ; 108a33
+ call WaitTop
+ call MobileTradeAnim_ClearTilemap
+ ld a, VBGMap1 / $100
+ ld [hBGMapAddress + 1], a
+ hlcoord 5, 0
+ ld b, 6
+ ld c, 9
+ call TextBox
+ hlcoord 7, 4
+ ld de, .OddEgg
+ call PlaceString
+ call MobileTradeAnim_MonDisplay_UpdateBGMap
+ ret
+; 108a54
+
+.OddEgg: ; 108a54
+ db "なぞのタマゴ@"
+; 108a5b
+
+MobileTradeAnim_LoadMonTemplate: ; 108a5b
+ call WaitTop
+ call MobileTradeAnim_ClearTilemap
+ ld a, VBGMap1 / $100
+ ld [hBGMapAddress + 1], a
+ hlcoord 4, 0
+ ld b, 6
+ ld c, 10
+ call TextBox
+ hlcoord 5, 0
+ ld de, .MonTemplate
+ call PlaceString
+ ret
+; 108a79
+
+.MonTemplate: ; 108a79
+ db "─ №<DOT>"
+ next ""
+ next "おや/"
+ next "<ID>№<DOT>"
+ db "@"
+; 108a87
+
+MobileTradeAnim_MonDisplay_UpdateBGMap: ; 108a87
+ call WaitBGMap
+ call WaitTop
+ ld a, VBGMap0 / $100
+ ld [hBGMapAddress + 1], a
+ ret
+; 108a92
+
+MobileTradeAnim_MonDisplay_PrintSpeciesNumber: ; 108a92
+ hlcoord 9, 0
+ lb bc, PRINTNUM_LEADINGZEROS | 1, 3
+ call PrintNum
+ ret
+; 108a9c
+
+MobileTradeAnim_MonDisplay_PrintSpeciesName: ; 108a9c
+ hlcoord 5, 2
+ call PlaceString
+ ret
+; 108aa3
+
+MobileTradeAnim_MonDisplay_PrintOTNameAndGender: ; 108aa3
+ cp $3
+ jr c, .got_gender
+ xor a
+.got_gender
+ push af
+ hlcoord 8, 4
+ call PlaceString
+ inc bc
+ pop af
+ ld hl, .GenderChars
+ ld d, 0
+ ld e, a
+ add hl, de
+ ld a, [hl]
+ ld [bc], a
+ ret
+; 108abb
+
+.GenderChars: ; 108abb
+ db " "
+ db "♂"
+ db "♀"
+; 108abe
+
+MobileTradeAnim_MonDisplay_PrintIDNumber: ; 108abe
+ hlcoord 8, 6
+ lb bc, PRINTNUM_LEADINGZEROS | 2, 5
+ call PrintNum
+ ret
+; 108ac8
+
+MobileTradeAnim_ClearTilemap: ; 108ac8
+ hlcoord 0, 0
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ ld a, " "
+ call ByteFill
+ ret
+; 108ad4
+
+Function108ad4: ; 108ad4
+ and a
+ jr z, .asm_108adc
+ ld de, GFX_1092c7
+ jr .asm_108adf
+
+.asm_108adc
+ ld de, GFX_1091c7
+.asm_108adf
+ ld a, $1
+ ld [rVBK], a
+ ld hl, VTiles2 tile $4a
+ lb bc, BANK(GFX_1092c7), 16
+ call Get2bpp_2
+ call DelayFrame
+ ld a, $0
+ ld [rVBK], a
+ ret
+; 108af4
+
+Function108af4: ; 108af4
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld a, [wcf65]
+ and $1
+ jr z, .copy_palette_109147
+ ld hl, Palette_109187
+ ld de, UnknOBPals
+ ld bc, 8 palettes
+ call CopyBytes
+ ld hl, Palette_109187
+ ld de, OBPals
+ ld bc, 8 palettes
+ call CopyBytes
+ jr .done_copy
+
+.copy_palette_109147
+ ld hl, Palette_109147
+ ld de, UnknOBPals
+ ld bc, 8 palettes
+ call CopyBytes
+ ld hl, Palette_109147
+ ld de, OBPals
+ ld bc, 8 palettes
+ call CopyBytes
+
+.done_copy
+ pop af
+ ld [rSVBK], a
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbObjPal0
+ ld a, %11100100 ; 3,2,1,0
+ call DmgToCgbBGPals
+ call DelayFrame
+ ret
+; 108b45
+
+Function108b45: ; 108b45
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld de, (31 << 10) + (31 << 5) + 31 ; $7fff
+ ld hl, UnknBGPals
+ ld a, e
+ ld [hli], a
+ ld d, a
+ ld [hli], a
+ pop af
+ ld [rSVBK], a
+ ret
+; 108b5a
+
+Function108b5a: ; 108b5a
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld de, (15 << 10) + (31 << 5) + 18 ; $3ff2
+ ld hl, BGPals + 4 palettes
+ ld c, $10
+.loop
+ ld a, e
+ ld [hli], a
+ ld a, d
+ ld [hli], a
+ dec c
+ jr nz, .loop
+ pop af
+ ld [rSVBK], a
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 108b78
+
+Function108b78: ; 108b78
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld a, c
+ and $2
+ jr z, .Orange
+ ld de, (31 << 10) + (31 << 5) + 31 ; $7fff
+ jr .load_pal
+
+.Orange:
+ ld de, ( 1 << 10) + (15 << 5) + 31 ; $05ff
+.load_pal
+ ld a, e
+ ld [hli], a
+ ld a, d
+ ld [hld], a
+ pop af
+ ld [rSVBK], a
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 108b98
+
+Palette_108b98:
+; removed
+
+Function108b98: ; 108b98
+ ld d, a
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld a, [wcf65]
+ and $1
+ xor d
+ jr z, .asm_108bad
+ ld hl, Palette_108b98 + 1 palettes
+ jr .asm_108bb0
+
+.asm_108bad
+ ld hl, Palette_108b98
+.asm_108bb0
+ ld de, UnknBGPals + 7 palettes
+ ld bc, 8 palettes
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ ret
+; 108bbd
+
+MobileTradeAnim_DeleteSprites: ; 108bbd
+ farcall DeinitializeAllSprites
+ call ClearSprites
+ ret
+; 108bc7
+
+Function108bc7: ; 108bc7 (42:4bc7)
+ ld a, [wcf64]
+ and a
+ ret z
+ ld hl, SPRITEANIMSTRUCT_YCOORD
+ add hl, bc
+ ld a, [hl]
+ cp -1 * 8 - 6
+ jr z, .delete
+ sub 1 * 8
+ ld [hl], a
+ ret
+
+.delete
+ farcall DeinitializeSprite
+ ret
+
+Function108be0: ; 108be0 (42:4be0)
+ ld hl, SPRITEANIMSTRUCT_YCOORD
+ add hl, bc
+ ld a, [hl]
+ cp 9 * 8 + 2
+ ret z
+ add 1 * 8
+ ld [hl], a
+ ret
+; 108bec (42:4bec)
+
+Function108bec: ; 108bec
+ ld a, $90
+ ld [hWY], a
+ ld hl, .PlayerWillTradeMon
+ call PrintText
+ ld c, 80
+ call DelayFrames
+ ld hl, .ForPartnersMon
+ call PrintText
+ ld c, 80
+ call DelayFrames
+ ret
+; 108c07
+
+.PlayerWillTradeMon: ; 0x108c07
+ text_jump UnknownText_0x1bc787
+ db "@"
+; 0x108c0c
+
+.ForPartnersMon: ; 0x108c0c
+ text_jump UnknownText_0x1bc79d
+ db "@"
+; 0x108c11
+
+.UnusedTextPlayersMonTrade: ; 0x108c11
+ text_jump UnknownText_0x1bc7b0
+ db "@"
+; 0x108c16
+
+Function108c16: ; 108c16
+ ld a, $90
+ ld [hWY], a
+ ld hl, .TakeGoodCareOfMon
+ call PrintText
+ ld c, 80
+ call DelayFrames
+ ret
+; 108c26
+
+.TakeGoodCareOfMon: ; 0x108c26
+ text_jump UnknownText_0x1bc7c3
+ db "@"
+; 0x108c2b
+
+Function108c2b: ; 108c2b
+ ld a, $90
+ ld [hWY], a
+ ld hl, .PlayersMonTrade
+ call PrintText
+ ld c, 80
+ call DelayFrames
+ ret
+; 108c3b
+
+.PlayersMonTrade: ; 0x108c3b
+ text_jump UnknownText_0x1bc7dd
+ db "@"
+; 0x108c40
+
+Function108c40: ; 108c40
+ ld a, $90
+ ld [hWY], a
+ ld a, [wcf65]
+ and %10000000
+ jr z, .Getmon
+ ld hl, .CameBack
+ call PrintText
+ ld c, 80
+ call DelayFrames
+ ret
+
+.Getmon:
+ ld hl, .TakeGoodCareOf
+ call PrintText
+ ld c, 80
+ call DelayFrames
+ ret
+; 108c63
+
+.TakeGoodCareOf: ; 0x108c63
+ text_jump UnknownText_0x1bc7f0
+ db "@"
+; 0x108c68
+
+.CameBack: ; 0x108c68
+ text_jump UnknownText_0x1bc80a
+ db "@"
+; 0x108c6d
+
+Function108c6d: ; 108c6d
+ ld hl, LZ_108fe7
+ debgcoord 0, 0
+ call Decompress
+ ld hl, LZ_108fe7
+ debgcoord 0, 0, VBGMap1
+ call Decompress
+ ret
+; 108c80
+
+Function108c80: ; 108c80
+ ld a, $1
+ ld [rVBK], a
+ ld hl, LZ_1090a7
+ debgcoord 0, 0
+ call Decompress
+ ld hl, LZ_1090a7
+ debgcoord 0, 0, VBGMap1
+ call Decompress
+ ld a, $0
+ ld [rVBK], a
+ ret
+; 108c9b
+
+DebugMobileTrade: ; 108c9b
+; localization error: NAME_LENGTH (11) should be NAME_LENGTH_JAPANESE (6) here
+
+ ld hl, .DebugTradeData
+ ld a, [hli]
+ ld [wPlayerTrademonSpecies], a
+
+ ld de, wPlayerTrademonSenderName
+ ld c, NAME_LENGTH
+.your_name_loop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .your_name_loop
+
+ ld de, wPlayerTrademonID
+ ld c, 2
+.your_id_loop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .your_id_loop
+
+ ld de, wPlayerTrademonOTName
+ ld c, NAME_LENGTH
+.your_ot_loop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .your_ot_loop
+
+ ld a, [hli]
+ ld [wOTTrademonSpecies], a
+
+ ld de, wOTTrademonSenderName
+ ld c, NAME_LENGTH
+.their_name_loop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .their_name_loop
+
+ ld de, wOTTrademonID
+ ld c, 2
+.their_id_loop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .their_id_loop
+
+ ld de, wOTTrademonOTName
+ ld c, NAME_LENGTH
+.their_ot_loop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .their_ot_loop
+
+ ret
+; 108ce9
+
+.DebugTradeData:
+ db VENUSAUR
+ db "ゲーフり@@"
+ dw $0123
+ db "かびーん@@"
+ db CHARIZARD
+ db "クりーチャ@"
+ dw $0456
+ db "マツミヤ@@"
+; 108d07
+
+Function108d07: ; 108d07
+ ld a, [wc74e]
+ and $7f
+ cp $8
+ jr c, .asm_108d12
+ ld a, $7
+
+.asm_108d12
+ ld bc, 1 palettes
+ ld hl, Palette_1093c7
+ call AddNTimes
+ ld a, $5
+ ld de, UnknBGPals + 4 palettes
+ ld bc, 1 palettes
+ call FarCopyWRAM
+ ret
+; 108d27
+
+LZ_108d27:
+INCBIN "gfx/unknown/108d27.2bpp.lz"
+
+LZ_108da7:
+INCBIN "gfx/unknown/108da7.2bpp.lz"
+
+LZ_108fe7:
+INCBIN "gfx/unknown/108fe7.tilemap.lz"
+
+LZ_1090a7:
+INCBIN "gfx/unknown/1090a7.tilemap.lz"
+
+Palette_1090f7:
+; unreferenced
+ RGB 31, 31, 31
+ RGB 0, 0, 0
+
+ RGB 31, 0, 25
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 0, 0, 0
+
+ RGB 9, 19, 31
+ RGB 0, 0, 0
+
+Palette_109107:
+ RGB 18, 31, 15
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 15, 1
+ RGB 14, 14, 31
+ RGB 12, 9, 31
+ RGB 0, 0, 0
+
+ RGB 18, 31, 15
+ RGB 14, 14, 31
+ RGB 12, 9, 31
+ RGB 0, 0, 0
+
+ RGB 18, 31, 15
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 18, 31, 15
+ RGB 31, 7, 9
+ RGB 18, 0, 1
+ RGB 0, 0, 0
+
+ RGB 18, 31, 15
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 15, 1
+ RGB 18, 0, 30
+ RGB 9, 0, 17
+ RGB 0, 0, 0
+
+ RGB 18, 31, 15
+ RGB 18, 0, 30
+ RGB 9, 0, 17
+ RGB 0, 0, 0
+
+Palette_109147:
+ RGB 31, 31, 31
+ RGB 31, 31, 12
+ RGB 31, 13, 12
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 31, 23, 15
+ RGB 31, 18, 7
+ RGB 31, 15, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 31, 0, 25
+ RGB 31, 0, 25
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 9, 19, 31
+ RGB 9, 19, 31
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+Palette_109187:
+ RGB 31, 31, 31
+ RGB 31, 31, 12
+ RGB 31, 13, 12
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 31, 23, 15
+ RGB 31, 18, 7
+ RGB 31, 15, 0
+
+ RGB 31, 31, 31
+ RGB 20, 20, 20
+ RGB 11, 11, 11
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 9, 19, 31
+ RGB 9, 19, 31
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 31, 0, 25
+ RGB 31, 0, 25
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 31, 31, 31
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+GFX_1091c7:
+INCBIN "gfx/unknown/1091c7.2bpp"
+GFX_1092c7:
+INCBIN "gfx/unknown/1092c7.2bpp"
+
+Palette_1093c7:
+ RGB 18, 31, 15
+ RGB 4, 13, 31
+ RGB 0, 0, 31
+ RGB 0, 0, 0
+
+ RGB 18, 31, 15
+ RGB 31, 31, 0
+ RGB 31, 15, 0
+ RGB 0, 0, 0
+
+ RGB 18, 31, 15
+ RGB 9, 24, 0
+ RGB 2, 16, 0
+ RGB 0, 0, 0
+
+ RGB 18, 31, 15
+ RGB 31, 7, 9
+ RGB 18, 0, 1
+ RGB 0, 0, 0
+
+ RGB 18, 31, 15
+ RGB 28, 5, 31
+ RGB 17, 0, 17
+ RGB 0, 0, 0
+
+ RGB 18, 31, 15
+ RGB 9, 9, 9
+ RGB 4, 4, 4
+ RGB 0, 0, 0
+
+ RGB 18, 31, 15
+ RGB 31, 13, 21
+ RGB 27, 7, 12
+ RGB 0, 0, 0
+
+ RGB 18, 31, 15
+ RGB 21, 20, 20
+ RGB 14, 14, 31
+ RGB 0, 0, 0
diff --git a/mobile/mobile_45.asm b/mobile/mobile_45.asm
new file mode 100644
index 000000000..1c2adbfce
--- /dev/null
+++ b/mobile/mobile_45.asm
@@ -0,0 +1,7690 @@
+
+SECTION "bank45", ROMX
+
+ charmap " ", $20 ; revert to ascii
+
+String_114000:
+ db "---", 0
+String_114004:
+ db "CGB-AAAA-00", 0, 0
+
+Unknown_114011: ; 114011
+ dw String_114033
+ dw String_11403a
+ dw String_114043
+ dw String_11404e
+ dw String_114053
+ dw String_114058
+ dw String_114062
+ dw String_114074
+ dw String_11408d
+ dw String_11409f
+ dw String_1140b8
+ dw String_1140e6
+ dw String_114110
+ dw String_11413f
+ dw String_114160
+ dw String_114160
+ dw String_114163
+
+String_114033: ; 114033
+ db "From: ", 0
+String_11403a: ; 11403a
+ db "Sender: ", 0
+String_114043: ; 114043
+ db "Reply-To: ", 0
+String_11404e: ; 11404e
+ db "To: ", 0
+String_114053: ; 114053
+ db "Cc: ", 0
+String_114058: ; 114058
+ db "Subject: ", 0
+String_114062: ; 114062
+ db "MIME-Version: 1.0", 0
+String_114074: ; 114074
+ db "X-Game-title: XXXXXXXXXX", 0
+String_11408d: ; 11408d
+ db "X-Game-code: CGB-", 0
+String_11409f: ; 11409f
+ db "X-GBmail-type: exclusive", 0
+String_1140b8: ; 1140b8
+ db "Content-Type: text/plain; charset=iso-2022-jp", 0
+String_1140e6: ; 1140e6
+ db "Content-Type: multipart/mixed; boundary=\"", 0
+String_114110: ; 114110
+ db "Content-Type: Application/Octet-Stream; name=\"", 0
+String_11413f: ; 11413f
+ db "Content-Transfer-Encoding:Base64", 0
+String_114160: ; 114160
+ db "--", 0
+String_114163: ; 114163
+ db ".", 0
+; 114165
+
+Jumptable_114165: ; 114165
+ dw Function114268
+ dw Function114269
+ dw Function11433c
+ dw Function1143b7
+ dw Function1144d1
+ dw Function114b55
+ dw Function114bbc
+ dw Function114cd9
+ dw Function114e62
+ dw Function1152b8
+ dw Function1154d4
+ dw Function1156cc
+ dw Function1159fb
+; 11417f
+
+Unknown_11417f: ; 11417f
+ dw .From
+ dw .Sender
+ dw .ReplyTo
+ dw .To
+ dw .CC
+ dw .Subject
+ dw .Date
+ dw .ContentType
+ dw .MimeVersion
+ dw .XMailer
+ dw .XGameTitle
+ dw .XGameCode
+ dw .XGBMailType
+
+.From: ; 114199
+ db "FROM:", 0
+.Sender: ; 11419f
+ db "SENDER:", 0
+.ReplyTo: ; 1141a7
+ db "REPLY-TO:", 0
+.To: ; 1141b1
+ db "TO:", 0
+.CC: ; 1141b5
+ db "CC:", 0
+.Subject: ; 1141b9
+ db "SUBJECT:", 0
+.Date: ; 1141c2
+ db "DATE:", 0
+.ContentType: ; 1141c8
+ db "CONTENT-TYPE:", 0
+.MimeVersion: ; 1141d6
+ db "MIME-VERSION:", 0
+.XMailer: ; 1141e4
+ db "X-MAILER:", 0
+.XGameTitle: ; 1141ee
+ db "X-GAME-TITLE:", 0
+.XGameCode: ; 1141fc
+ db "X-GAME-CODE:", 0
+.XGBMailType: ; 114209
+ db "X-GBMAIL-TYPE:", 0
+; 114218
+
+String_114218: ; 114218
+ db "NAME=", 0
+String_11421e: ; 11421e
+ db "MULTIPART", 0
+String_114228: ; 114228
+ db "BOUNDARY=", 0
+String_114232: ; 114232
+ db "=?ISO-2022-JP?B?", 0
+; 114243
+
+Function114243:: ; 114243
+ ld a, SRAM_ENABLE
+ ld [MBC3SRamEnable], a
+ ld a, [hFF8C]
+ push af ; if [$dc02] == 0, this is popped to pc.
+ push de
+ ld a, [$dc02]
+ add a
+ ld e, a
+ ld d, 0
+ ld hl, Jumptable_114165
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ pop de
+ jp hl
+
+; 11425c
+
+Function11425c: ; 11425c
+ ld [$dc02], a
+ pop af
+ ld [hFF8C], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ret
+
+; 114268
+
+Function114268: mobile
+
+; 114269
+
+Function114269: ; 114269
+ ld h, d
+ ld l, e
+ xor a
+ ld [$dc02], a
+ ld [$dc03], a
+ ld a, [hli]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ inc hl
+ ld c, [hl]
+ inc hl
+ ld b, [hl]
+.asm_114282
+ ld a, [de]
+ and a
+ jr z, .asm_1142a4
+ ld h, a
+ ld a, [$dc03]
+ and a
+ jr nz, .asm_114292
+ ld a, h
+ cp $80
+ jr nc, .asm_1142ae
+
+.asm_114292
+ ld a, h
+ cp $d
+ jr z, .asm_1142bb
+ xor a
+ ld [$dc02], a
+.asm_11429b
+ inc e
+ call z, Function114333
+ dec bc
+ ld a, b
+ or c
+ jr nz, .asm_114282
+
+.asm_1142a4
+ ld a, [$dc03]
+ and a
+ jr nz, .asm_114303
+ ld b, $80
+ jr .asm_1142b0
+
+.asm_1142ae
+ ld b, $81
+
+.asm_1142b0
+ ld a, [$dc00]
+ ld c, a
+ ld a, $1
+ ld h, d
+ ld l, e
+ jp Function11425c
+
+.asm_1142bb
+ and a
+ jr z, .asm_1142a4
+ inc e
+ call z, Function114333
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_1142a4
+ ld a, [de]
+ ld h, a
+ ld a, [$dc03]
+ and a
+ jr nz, .asm_1142d4
+ ld a, h
+ cp $80
+ jr nc, .asm_1142ae
+
+.asm_1142d4
+ ld a, h
+ cp $a
+ jr nz, .asm_1142ae
+ ld a, [$dc03]
+ and a
+ jr nz, .asm_11430d
+ ld a, [$dc02]
+ and a
+ jr nz, .asm_114309
+ ld a, $1
+ ld [$dc02], a
+ inc e
+ call z, Function114333
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_1142a4
+ ld a, [de]
+ cp $20
+ jr z, .asm_11429b
+ cp $9
+ jr z, .asm_11429b
+ jr .asm_114282
+
+.asm_1142fe
+ xor a
+ ld b, a
+ jp Function11425c
+
+.asm_114303
+ xor a
+ ld b, $1
+ jp Function11425c
+
+.asm_114309
+ xor a
+ ld [$dc02], a
+
+.asm_11430d
+ ld a, [$dc02]
+ and a
+ jr nz, .asm_1142fe
+ ld a, $1
+ ld [$dc03], a
+ inc e
+ call z, Function114333
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_1142a4
+ ld a, [de]
+ and a
+ jp z, .asm_1142a4
+ cp $2e
+ jp nz, .asm_114282
+ ld a, $1
+ ld [$dc02], a
+ jp .asm_11429b
+
+; 114333
+
+Function114333: ; 114333
+ push bc
+ ld bc, $dc00
+ call Function115d80
+ pop bc
+ ret
+
+; 11433c
+
+Function11433c: ; 11433c
+ push de
+ ld h, d
+ ld l, e
+ ld c, [hl]
+ inc hl
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld b, $b
+ call Function1143f3
+ cp $2
+ jr z, .asm_114358
+ and a
+ jr z, .asm_114360
+ pop hl
+.asm_114351
+ xor a
+ ld b, $3
+ jp Function11425c
+
+.asm_114357
+ pop hl
+
+.asm_114358
+ pop hl
+ ld a, $1
+ ld b, $82
+ jp Function11425c
+
+.asm_114360
+ ld a, h
+ ld [$dc03], a
+ pop hl
+ push bc
+ push de
+ ld c, [hl]
+ inc hl
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ inc hl
+ ld b, $c
+ call Function1143f3
+ cp $2
+ jr z, .asm_114357
+ and a
+ jr z, .asm_114381
+ xor a
+ ld b, $2
+ pop hl
+ pop hl
+ jp Function11425c
+
+.asm_114381
+ pop de
+ pop bc
+ ld a, [$dc03]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ call Function114c0b
+ ld hl, String_114004
+.asm_114394
+ ld de, $dc24
+.asm_114397
+ ld a, [hli]
+ and a
+ jr z, .asm_1143ad
+ ld b, a
+ ld a, [de]
+ inc de
+ cp b
+ jr z, .asm_114397
+.asm_1143a1
+ ld a, [hli]
+ and a
+ jr nz, .asm_1143a1
+ ld a, [hl]
+ and a
+ jr nz, .asm_114394
+ ld b, a
+ jp Function11425c
+
+.asm_1143ad
+ ld a, [de]
+ and a
+ jr nz, .asm_114351
+ xor a
+ ld b, $1
+ jp Function11425c
+
+; 1143b7
+
+Function1143b7: ; 1143b7
+ ld a, [de]
+ ld b, a
+ inc de
+ ld a, [de]
+ ld c, a
+ inc de
+ ld a, [de]
+ ld h, a
+ inc de
+ ld a, [de]
+ inc de
+ push de
+ ld d, a
+ ld e, h
+ call Function1143f3
+ cp $2
+ jr z, .asm_1143eb
+ and a
+ jr nz, .asm_1143ed
+ ld a, h
+ pop hl
+ push af
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ pop af
+ ld [hli], a
+ ld a, e
+ ld [hli], a
+ ld a, d
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ ld [hl], b
+ xor a
+ jp Function11425c
+
+.asm_1143eb
+ ld b, $82
+
+.asm_1143ed
+ ld a, $1
+ pop hl
+ jp Function11425c
+
+; 1143f3
+
+Function1143f3: ; 1143f3
+ call Function114412
+ and a
+ jr nz, .asm_11440d
+ ld a, $4
+ cp b
+ jr c, .asm_114407
+ jr z, .asm_114402
+.asm_114400
+ xor a
+ ret
+
+.asm_114402
+ ld a, $0
+ cp c
+ jr nc, .asm_114400
+
+.asm_114407
+ lb bc, $4, $0
+ ld a, $2
+ ret
+
+.asm_11440d
+ ld a, $1
+ ld b, $84
+ ret
+
+; 114412
+
+Function114412: ; 114412
+ ld a, c
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld hl, Unknown_11417f
+ ld a, b
+ add a
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld c, $0
+ jr .asm_11444a
+
+.asm_11442b
+ ld a, [de]
+ and a
+ jp z, .asm_1144c2
+ inc e
+ call z, Function1144c8
+ cp $d ; CR
+ jr nz, .asm_11442b
+ ld a, [de]
+ inc e
+ call z, Function1144c8
+ cp $a ; NL
+ jr nz, .asm_11442b
+ ld a, [de]
+ cp $2e ; .
+ jr z, .asm_1144ae
+ cp $d ; CR
+ jr z, .asm_1144b8
+
+.asm_11444a
+ ld a, [$dc00]
+ ld [$dc02], a
+ ld a, [de]
+ and a
+ jr z, .asm_1144c2
+ inc e
+ call z, Function1144c8
+ cp $61 ; "a"
+ jr c, .asm_114462
+ cp $7b ; "z" + 1
+ jr nc, .asm_114462
+ sub $20
+
+.asm_114462
+ ld b, a
+ ld a, [hl]
+ and a
+ jr z, .asm_114476
+ cp b
+ jr nz, .asm_11446e
+ inc c
+ inc hl
+ jr .asm_11444a
+
+.asm_11446e
+ ld a, c
+ and a
+ jr z, .asm_11442b
+ dec c
+ dec hl
+ jr .asm_11446e
+
+.asm_114476
+ ld a, $20 ; " "
+ cp b
+ jr z, .asm_114481
+ ld a, $a ; NL
+ cp b
+ jr z, .asm_114481
+ dec de
+
+.asm_114481
+ ld h, d
+ ld l, e
+ ld bc, NULL
+.asm_114486
+ ld a, [de]
+ and a
+ jr z, .asm_1144c2
+ inc bc
+ inc e
+ call z, Function1144c8
+ cp $d ; CR
+ jr nz, .asm_114486
+ ld a, [de]
+ inc bc
+ inc e
+ call z, Function1144c8
+ cp $a ; NL
+ jr nz, .asm_114486
+ ld a, [de]
+ cp $20 ; " "
+ jr z, .asm_114486
+ cp $9 ; TAB
+ jr z, .asm_114486
+ ld d, h
+ ld e, l
+ ld a, [$dc02]
+ ld h, a
+ xor a
+ ret
+
+.asm_1144ae
+ inc e
+ call z, Function1144c8
+ ld a, [de]
+ cp $d ; CR
+ jp nz, .asm_11442b
+
+.asm_1144b8
+ inc e
+ call z, Function1144c8
+ ld a, [de]
+ cp $a ; NL
+ jp nz, .asm_11442b
+
+.asm_1144c2
+ ld a, $0
+ ld [hl], a
+ ld a, $1
+ ret
+
+; 1144c8
+
+Function1144c8: ; 1144c8
+ push bc
+ ld bc, $dc00
+ call Function115d80
+ pop bc
+ ret
+
+; 1144d1
+
+Function1144d1: ; 1144d1
+ call Function114561
+ dec de
+ dec de
+ push de
+ inc de
+ inc de
+ inc de
+ inc hl
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc hl
+ ld a, [de]
+ ld [hld], a
+ dec de
+ ld a, [de]
+ ld [hl], a
+ xor a
+ ld [BigDoll], a
+ ld [$dc17], a
+ ld a, $2
+ ld [$dc0e], a
+ ld hl, $dc03
+ ld c, [hl]
+ inc hl
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ call Function114576
+ cp $2
+ jr z, .asm_11455b
+ and a
+ jr z, .asm_114511
+ ld a, $1
+ ld [$dc0d], a
+ call Function1146fa
+ and a
+ jr nz, .asm_11455b
+ jr .asm_11451c
+
+.asm_114511
+ call Function1146a4
+ and a
+ jr nz, .asm_11455b
+ ld a, $2
+ ld [$dc0d], a
+
+.asm_11451c
+ pop hl
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld a, [$dc0d]
+ ld [de], a
+ ld b, $0
+ ld a, [BigDoll]
+ and a
+ jr z, .asm_114537
+ ld b, $1
+
+.asm_114537
+ ld hl, $dc06
+ ld a, [hl]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld hl, $dc09
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ dec de
+ ld a, d
+ or e
+ jr z, .asm_114559
+ ld hl, wCurrMapSceneScriptCount
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ xor a
+ ld [de], a
+ jp Function11425c
+
+.asm_114559
+ ld b, $83
+
+.asm_11455b
+ pop hl
+ ld a, $1
+ jp Function11425c
+
+; 114561
+
+Function114561: ; 114561
+ ld hl, $dc03
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hl], a
+ ret
+
+; 114576
+
+Function114576: ; 114576
+ xor a
+ ld [Bed], a
+ ld b, $7
+ call Function1143f3
+ cp $2
+ jr z, .asm_1145b6
+ and a
+ jr nz, .asm_1145b4
+ ld a, h
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ push hl
+ push de
+ push bc
+ ld hl, $dc24
+ call Function115d53
+ call Function1145c5
+ pop bc
+ pop de
+ pop hl
+ and a
+ jr z, .asm_1145bf
+ ld a, b
+ and a
+ jr nz, .asm_1145ba
+ ld a, h
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld hl, String_114218
+ call Function114acf
+
+.asm_1145b4
+ xor a
+ ret
+
+.asm_1145b6
+ ld b, $82
+ jr .asm_1145bc
+
+.asm_1145ba
+ ld b, $81
+
+.asm_1145bc
+ ld a, $2
+ ret
+
+.asm_1145bf
+ ld a, $1
+ ld [Bed], a
+ ret
+
+; 1145c5
+
+Function1145c5: ; 1145c5
+ ld hl, $dc24
+ ld de, String_11421e
+ ld c, $0
+.asm_1145cd
+ ld a, [hli]
+ and a
+ jr z, .asm_1145ef
+ cp $20
+ jr z, .asm_1145cd
+ cp $d
+ jr z, .asm_1145f8
+ cp $61
+ jr c, .asm_1145e3
+ cp $7b
+ jr nc, .asm_1145e3
+ sub $20
+
+.asm_1145e3
+ ld b, a
+ ld a, [de]
+ and a
+ jr z, .asm_11460e
+ inc de
+ cp b
+ jr z, .asm_1145cd
+ dec de
+ jr .asm_1145cd
+
+.asm_1145ef
+ ld b, $0
+ jr .asm_1145f5
+
+.asm_1145f3
+ ld b, $81
+
+.asm_1145f5
+ ld a, $1
+ ret
+
+.asm_1145f8
+ ld a, [hli]
+ and a
+ jr z, .asm_1145f3
+ cp $a
+ jr nz, .asm_1145f3
+ ld a, [hli]
+ and a
+ jr z, .asm_1145f3
+ cp $20
+ jr z, .asm_1145cd
+ cp $9
+ jr z, .asm_1145cd
+ jr .asm_1145f3
+
+.asm_11460e
+ ld a, c
+ and a
+ jr nz, .asm_114619
+ ld c, $1
+ ld de, String_114228
+ jr .asm_1145cd
+
+.asm_114619
+ dec hl
+ ld a, [hl]
+ cp $22
+ jr nz, .asm_114620
+ inc hl
+
+.asm_114620
+ ld de, $ddc8
+ ld b, $0
+ ld c, $40
+.asm_114627
+ ld a, [hli]
+ cp $22
+ jr z, .asm_114636
+ cp $d
+ jr z, .asm_114636
+ ld [de], a
+ inc de
+ inc b
+ dec c
+ jr nz, .asm_114627
+
+.asm_114636
+ ld a, b
+ ld [PartyMon5Defense], a
+ xor a
+ ret
+
+; 11463c
+
+Function11463c: ; 11463c
+ ld a, [$dc00]
+ push af
+ push de
+ ld hl, $ddc8
+ ld a, [PartyMon5Defense]
+ ld b, a
+.asm_114648
+ ld a, [de]
+ ld c, a
+ ld a, [hli]
+ cp c
+ jr nz, .asm_11468a
+ inc e
+ call z, Function11469b
+ dec b
+ jr nz, .asm_114648
+ ld a, [de]
+ cp $2d
+ jr z, .asm_114673
+ cp $d
+ jr nz, .asm_11468a
+ xor a
+ ld [Carpet], a
+.asm_114662
+ inc e
+ call z, Function11469b
+ ld a, [de]
+ cp $a
+ jr nz, .asm_11468a
+ inc e
+ call z, Function11469b
+ xor a
+ pop hl
+ pop hl
+ ret
+
+.asm_114673
+ inc e
+ call z, Function11469b
+ ld a, [de]
+ cp $2d
+ jr nz, .asm_11468a
+ inc e
+ call z, Function11469b
+ ld a, $1
+ ld [Carpet], a
+ ld a, [de]
+ cp $d
+ jr z, .asm_114662
+
+.asm_11468a
+ pop de
+ pop af
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ xor a
+ ld [Carpet], a
+ ld a, $1
+ ret
+
+; 11469b
+
+Function11469b: ; 11469b
+ push bc
+ ld bc, $dc00
+ call Function115d80
+ pop bc
+ ret
+
+; 1146a4
+
+Function1146a4: ; 1146a4
+ call Function114867
+ and a
+ jr nz, .asm_1146e4
+ ld hl, $dc03
+ ld a, [hli]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ call Function114a18
+ and a
+ jr nz, .asm_1146e8
+ call Function1148c2
+ and a
+ jr nz, .asm_1146e4
+ ld hl, $dc03
+ ld a, [hli]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ call Function114a7a
+ and a
+ jr nz, .asm_1146e8
+.asm_1146da
+ dec bc
+ dec bc
+ call Function1149cc
+ and a
+ jr nz, .asm_1146e4
+ xor a
+ ret
+
+.asm_1146e4
+ ld b, $83
+ jr .asm_1146f7
+
+.asm_1146e8
+ ld a, [$dc17]
+ and a
+ jr z, .asm_1146f5
+ ld a, $1
+ ld [BigDoll], a
+ jr .asm_1146da
+
+.asm_1146f5
+ ld b, $81
+
+.asm_1146f7
+ ld a, $1
+ ret
+
+; 1146fa
+
+Function1146fa: ; 1146fa
+ call Function114867
+ and a
+ jp nz, .asm_11478a
+ ld hl, $dc03
+ ld a, [hli]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ call Function114a18
+ and a
+ jp nz, .asm_11478e
+ call Function1149cc
+ and a
+ jp nz, .asm_11478a
+ ld a, $1
+ ld [$dc0e], a
+ ld a, [$dc00]
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld a, $1
+ ld [RightOrnament], a
+ call Function1147cd
+ and a
+ jp nz, .asm_1147b7
+.asm_114737
+ call Function114843
+ cp $1
+ jr nz, .asm_114749
+ ld a, [$dc17]
+ and a
+ jr z, .asm_114794
+ ld a, $1
+ ld [BigDoll], a
+
+.asm_114749
+ call Function11494d
+ and a
+ jr nz, .asm_11478a
+ ld a, [BigDoll]
+ and a
+ jr nz, .asm_114786
+ ld hl, $dc03
+ ld a, [hli]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ call Function1147cd
+ and a
+ jr nz, .asm_1147b7
+ ld a, [$dc0e]
+ cp $3
+ jr nz, .asm_114773
+ dec bc
+ dec bc
+
+.asm_114773
+ call Function1149cc
+ and a
+ jr nz, .asm_11478a
+ ld a, [$dc0d]
+ inc a
+ ld [$dc0d], a
+ ld a, [BigDoll]
+ and a
+ jr z, .asm_114799
+
+.asm_114786
+ ld b, $1
+ jr .asm_1147cb
+
+.asm_11478a
+ ld b, $83
+ jr .asm_114796
+
+.asm_11478e
+ ld a, [$dc17]
+ and a
+ jr nz, .asm_114796
+
+.asm_114794
+ ld b, $81
+
+.asm_114796
+ ld a, $1
+ ret
+
+.asm_114799
+ ld a, [Carpet]
+ and a
+ jr z, .asm_114737
+ jr .asm_1147cb
+
+ ld hl, $dc03
+ ld a, [hli]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ call Function114a7a
+ and a
+ jr z, .asm_1147cb
+ xor a
+ ld [BigDoll], a
+
+.asm_1147b7
+ ld a, [$dc17]
+ and a
+ jr z, .asm_114794
+ ld a, $1
+ ld [BigDoll], a
+ ld a, [$dc0d]
+ cp $1
+ jr nz, .asm_114773
+ ld b, $1
+
+.asm_1147cb
+ xor a
+ ret
+
+; 1147cd
+
+Function1147cd: ; 1147cd
+ ld bc, NULL
+ ld a, [RightOrnament]
+ and a
+ jr nz, .asm_11480c
+.asm_1147d6
+ ld a, [de]
+ and a
+ jr z, .asm_11482f
+ inc e
+ call z, Function11483a
+ inc bc
+ cp $d
+ jr nz, .asm_1147d6
+ ld a, [de]
+ cp $a
+ jr nz, .asm_11482f
+.asm_1147e8
+ inc bc
+ inc e
+ call z, Function11483a
+ ld a, [de]
+ cp $20
+ jr z, .asm_114827
+ cp $9
+ jr z, .asm_114827
+ cp $d
+ jr nz, .asm_11482b
+ inc e
+ call z, Function11483a
+ ld a, [de]
+ cp $a
+ jr nz, .asm_11482f
+ inc e
+ call z, Function11483a
+ ld a, h
+ and a
+ jr z, .asm_11480c
+ dec bc
+
+.asm_11480c
+ ld a, [de]
+ cp $2d
+ jr nz, .asm_1147d6
+ inc e
+ call z, Function11483a
+ ld a, [de]
+ cp $2d
+ jr nz, .asm_1147d6
+ inc e
+ call z, Function11483a
+ push bc
+ call Function11463c
+ pop bc
+ and a
+ jr nz, .asm_1147d6
+ ret
+
+.asm_114827
+ ld h, $1
+ jr .asm_1147e8
+
+.asm_11482b
+ ld h, $0
+ jr .asm_11480c
+
+.asm_11482f
+ and a
+ jr nz, .asm_114837
+ ld a, $1
+ ld [$dc17], a
+
+.asm_114837
+ ld a, $1
+ ret
+
+; 11483a
+
+Function11483a: ; 11483a
+ push bc
+ ld bc, $dc00
+ call Function115d80
+ pop bc
+ ret
+
+; 114843
+
+Function114843: ; 114843
+ ld a, [$dc00]
+ push af
+ push de
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ call Function114a18
+ and a
+ jr nz, .asm_11485f
+ pop de
+ pop af
+ ld [$dc00], a
+ ld hl, String_114218
+ call Function114acf
+ ret
+
+.asm_11485f
+ pop de
+ pop af
+ ld [$dc00], a
+ ld a, $1
+ ret
+
+; 114867
+
+Function114867: ; 114867
+ ld hl, $dc06
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld a, $2
+ ld [de], a
+ inc e
+ call z, Function1148b9
+ ld a, $1
+ ld [de], a
+ inc e
+ call z, Function1148b9
+ ld hl, $dc03
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function1148b9
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function1148b9
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function1148b9
+ ld hl, $dc06
+ ld a, [wCurrMapBGEventCount]
+ ld [hli], a
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ inc hl
+ ld c, [hl]
+ inc hl
+ ld b, [hl]
+ ld d, $5
+.asm_1148a9
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_1148b6
+ dec d
+ jr nz, .asm_1148a9
+ ld [hl], b
+ dec hl
+ ld [hl], c
+ xor a
+ ret
+
+.asm_1148b6
+ ld a, $1
+ ret
+
+; 1148b9
+
+Function1148b9: ; 1148b9
+ push bc
+ ld bc, wCurrMapBGEventCount
+ call Function115d80
+ pop bc
+ ret
+
+; 1148c2
+
+Function1148c2: ; 1148c2
+ ld hl, $dc06
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld a, c
+ ld [de], a
+ inc e
+ call z, Function114944
+ ld a, b
+ ld [de], a
+ inc e
+ call z, Function114944
+ ld a, [$dc0e]
+ ld [de], a
+ inc e
+ call z, Function114944
+ cp $3
+ jr nz, .asm_114904
+ ld hl, Plant
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function114944
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function114944
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function114944
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function114944
+
+.asm_114904
+ ld hl, $dc03
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function114944
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function114944
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function114944
+ ld hl, $dc06
+ ld a, [wCurrMapBGEventCount]
+ ld [hli], a
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ inc hl
+ ld c, [hl]
+ inc hl
+ ld b, [hl]
+ ld a, [$dc0e]
+ cp $3
+ jr z, .asm_114932
+ ld d, $6
+ jr .asm_114934
+
+.asm_114932
+ ld d, $a
+
+.asm_114934
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_114941
+ dec d
+ jr nz, .asm_114934
+ ld [hl], b
+ dec hl
+ ld [hl], c
+ xor a
+ ret
+
+.asm_114941
+ ld a, $1
+ ret
+
+; 114944
+
+Function114944: ; 114944
+ push bc
+ ld bc, wCurrMapBGEventCount
+ call Function115d80
+ pop bc
+ ret
+
+; 11494d
+
+Function11494d: ; 11494d
+ ld hl, $dc06
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld a, [$dc0e]
+ ld [de], a
+ inc e
+ call z, Function1149c3
+ cp $3
+ jr nz, .asm_114983
+ ld hl, Plant
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function1149c3
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function1149c3
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function1149c3
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function1149c3
+
+.asm_114983
+ ld hl, $dc03
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function1149c3
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function1149c3
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function1149c3
+ ld hl, $dc06
+ ld a, [wCurrMapBGEventCount]
+ ld [hli], a
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ inc hl
+ ld c, [hl]
+ inc hl
+ ld b, [hl]
+ ld a, [$dc0e]
+ cp $3
+ jr z, .asm_1149b1
+ ld d, $4
+ jr .asm_1149b3
+
+.asm_1149b1
+ ld d, $8
+
+.asm_1149b3
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_1149c0
+ dec d
+ jr nz, .asm_1149b3
+ ld [hl], b
+ dec hl
+ ld [hl], c
+ xor a
+ ret
+
+.asm_1149c0
+ ld a, $1
+ ret
+
+; 1149c3
+
+Function1149c3: ; 1149c3
+ push bc
+ ld bc, wCurrMapBGEventCount
+ call Function115d80
+ pop bc
+ ret
+
+; 1149cc
+
+Function1149cc: ; 1149cc
+ ld hl, $dc06
+ ld a, [hl]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ push de
+ ld hl, $dc09
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ dec de
+ ld a, d
+ or e
+ jr z, .asm_114a0b
+ dec de
+ ld a, d
+ or e
+ jr z, .asm_114a0b
+ ld [hl], d
+ dec hl
+ ld [hl], e
+ ld hl, wCurrMapSceneScriptCount
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld a, c
+ ld [de], a
+ inc e
+ call z, Function114a0f
+ ld a, b
+ ld [de], a
+ inc e
+ call z, Function114a0f
+ ld hl, $dc06
+ ld a, [wCurrMapBGEventCount]
+ ld [hli], a
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ pop de
+ xor a
+ ret
+
+.asm_114a0b
+ pop de
+ ld a, $1
+ ret
+
+; 114a0f
+
+Function114a0f: ; 114a0f
+ push bc
+ ld bc, wCurrMapBGEventCount
+ call Function115d80
+ pop bc
+ ret
+
+; 114a18
+
+Function114a18: ; 114a18
+ ld bc, NULL
+ ld h, b
+.asm_114a1c
+ inc bc
+ ld a, [de]
+ and a
+ jr z, .asm_114a66
+ inc e
+ call z, Function114a71
+ cp $d
+ jr nz, .asm_114a1c
+ ld a, [de]
+ cp $a
+ jr nz, .asm_114a66
+.asm_114a2e
+ inc bc
+ inc e
+ call z, Function114a71
+ ld a, [de]
+ cp $20
+ jr z, .asm_114a5e
+ cp $9
+ jr z, .asm_114a5e
+ cp $d
+ jr nz, .asm_114a62
+ inc e
+ call z, Function114a71
+ ld a, [de]
+ cp $a
+ jr nz, .asm_114a66
+ inc e
+ call z, Function114a71
+ ld a, h
+ and a
+ jr z, .asm_114a52
+ dec bc
+
+.asm_114a52
+ ld hl, $dc03
+ ld a, [$dc00]
+ ld [hli], a
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ xor a
+ ret
+
+.asm_114a5e
+ ld h, $1
+ jr .asm_114a2e
+
+.asm_114a62
+ ld h, $0
+ jr .asm_114a1c
+
+.asm_114a66
+ and a
+ jr nz, .asm_114a6e
+ ld a, $1
+ ld [$dc17], a
+
+.asm_114a6e
+ ld a, $1
+ ret
+
+; 114a71
+
+Function114a71: ; 114a71
+ push bc
+ ld bc, $dc00
+ call Function115d80
+ pop bc
+ ret
+
+; 114a7a
+
+Function114a7a: ; 114a7a
+ ld bc, NULL
+.asm_114a7d
+ inc bc
+ ld a, [de]
+ and a
+ jr z, .asm_114abb
+ inc e
+ call z, Function114ac6
+ cp $d
+ jr nz, .asm_114a7d
+ ld a, [de]
+ cp $a
+ jr nz, .asm_114abb
+ inc e
+ call z, Function114ac6
+ inc bc
+ ld a, [de]
+ cp $2e
+ jr nz, .asm_114a7d
+ inc e
+ call z, Function114ac6
+ ld a, [de]
+ cp $d
+ jr nz, .asm_114a7d
+ inc e
+ call z, Function114ac6
+ ld a, [de]
+ cp $a
+ jr nz, .asm_114abb
+ inc e
+ call z, Function114ac6
+ ld hl, $dc03
+ ld a, [$dc00]
+ ld [hli], a
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ xor a
+ ret
+
+.asm_114abb
+ and a
+ jr nz, .asm_114ac3
+ ld a, $1
+ ld [$dc17], a
+
+.asm_114ac3
+ ld a, $1
+ ret
+
+; 114ac6
+
+Function114ac6: ; 114ac6
+ push bc
+ ld bc, $dc00
+ call Function115d80
+ pop bc
+ ret
+
+; 114acf
+
+Function114acf: ; 114acf
+.asm_114acf
+ push hl
+ push bc
+.asm_114ad1
+ ld a, [hl]
+ ld b, a
+ ld a, [de]
+ inc e
+ call z, Function114b4c
+ cp $61
+ jr c, .asm_114ae2
+ cp $7b
+ jr nc, .asm_114ae2
+ sub $20
+
+.asm_114ae2
+ cp b
+ jr z, .asm_114af4
+ pop bc
+ dec bc
+ push bc
+ ld a, b
+ or c
+ jr nz, .asm_114ad1
+.asm_114aec
+ ld a, $2
+ ld [$dc0e], a
+ pop bc
+ pop hl
+ ret
+
+.asm_114af4
+ inc hl
+.asm_114af5
+ ld a, [hli]
+ and a
+ jr z, .asm_114b19
+ ld b, a
+ ld a, [de]
+ inc e
+ call z, Function114b4c
+ cp $61
+ jr c, .asm_114b09
+ cp $7b
+ jr nc, .asm_114b09
+ sub $20
+
+.asm_114b09
+ cp b
+ jr nz, .asm_114b15
+ pop bc
+ dec bc
+ push bc
+ ld a, b
+ or c
+ jr nz, .asm_114af5
+ jr .asm_114aec
+
+.asm_114b15
+ pop bc
+ pop hl
+ jr .asm_114acf
+
+.asm_114b19
+ ld b, $0
+ ld c, $40
+ ld a, [de]
+ cp $22
+ jr nz, .asm_114b26
+ inc e
+ call z, Function114b4c
+
+.asm_114b26
+ ld hl, Plant
+ ld a, [$dc00]
+ ld [hli], a
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ inc hl
+.asm_114b31
+ ld a, [de]
+ cp $22
+ jr z, .asm_114b42
+ cp $d
+ jr z, .asm_114b42
+ inc e
+ call z, Function114b4c
+ inc b
+ dec c
+ jr nz, .asm_114b31
+
+.asm_114b42
+ ld [hl], b
+ pop bc
+ pop hl
+ ld a, $3
+ ld [$dc0e], a
+ xor a
+ ret
+
+; 114b4c
+
+Function114b4c: ; 114b4c
+ push bc
+ ld bc, $dc00
+ call Function115d80
+ pop bc
+ ret
+
+; 114b55
+
+Function114b55: ; 114b55
+ call Function114561
+ ld b, $0
+ ld hl, $dc03
+ ld c, [hl]
+ inc hl
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, $dc24
+.asm_114b65
+ push de
+ push bc
+ push hl
+ call Function1143f3
+ cp $2
+ jr z, .asm_114bb2
+ and a
+ jr nz, .asm_114b8c
+ ld a, h
+ pop hl
+ inc hl
+ ld [hld], a
+ ld a, $1
+ ld [hli], a
+ inc hl
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ inc hl
+ ld [hl], c
+ inc hl
+ ld [hl], b
+ inc hl
+.asm_114b82
+ pop bc
+ pop de
+ inc b
+ ld a, b
+ cp $d
+ jr z, .asm_114b96
+ jr .asm_114b65
+
+.asm_114b8c
+ pop hl
+ xor a
+rept NAME_LENGTH_JAPANESE
+ ld [hli], a
+endr
+ jr .asm_114b82
+
+.asm_114b96
+ ld hl, $dc06
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ inc hl
+ ld bc, $004e
+ ld hl, $dc24
+ call Function115d6a
+ jp Function11425c
+
+.asm_114bb2
+ ld a, $1
+ pop bc
+ pop bc
+ pop bc
+ ld b, $82
+ jp Function11425c
+
+; 114bbc
+
+Function114bbc: ; 114bbc
+ ld h, d
+ ld l, e
+ ld a, [hli]
+ ld b, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld e, a
+ ld d, [hl]
+ inc hl
+ push hl
+ call Function1143f3
+ cp $2
+ jr z, .asm_114c03
+ and a
+ jr nz, .asm_114bff
+ ld a, h
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ call Function114c0b
+ ld hl, $dc24
+ call Function114c5e
+ ld a, b
+ or c
+ jr z, .asm_114bff
+ pop hl
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld a, [hli]
+ ld e, a
+ ld d, [hl]
+ ld hl, $dc24
+ push bc
+ call Function115d6a
+ pop hl
+ jp Function11425c
+
+.asm_114bff
+ ld b, $84
+ jr .asm_114c05
+
+.asm_114c03
+ ld b, $82
+
+.asm_114c05
+ ld a, $1
+ pop hl
+ jp Function11425c
+
+; 114c0b
+
+Function114c0b: ; 114c0b
+ ld hl, $dc24
+ push bc
+ call Function115d53
+ pop bc
+ ld hl, $dc24
+ ld d, h
+ ld e, l
+.asm_114c18
+ ld a, [hli]
+ cp $d
+ jr z, .asm_114c34
+ ld [de], a
+ inc de
+ dec bc
+ ld a, b
+ or c
+ jr nz, .asm_114c18
+.asm_114c24
+ xor a
+ ld [de], a
+ ld hl, $dc24
+ ld bc, NULL
+.asm_114c2c
+ ld a, [hli]
+ inc bc
+ and a
+ jr nz, .asm_114c2c
+ dec bc
+ xor a
+ ret
+
+.asm_114c34
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_114c24
+ ld a, [hli]
+ cp $a
+ jr nz, .asm_114c18
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_114c24
+ ld a, [hli]
+ cp $20
+ jr z, .asm_114c4e
+ cp $9
+ jr z, .asm_114c4e
+ jr .asm_114c24
+
+.asm_114c4e
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_114c24
+ jr .asm_114c18
+
+; 114c55
+
+Function114c55: ; 114c55
+ push bc
+ ld bc, $dc00
+ call Function115d80
+ pop bc
+ ret
+
+; 114c5e
+
+Function114c5e: ; 114c5e
+ ld de, PartyMon5Defense
+ push hl
+.asm_114c62
+ ld a, [hli]
+ ld [de], a
+ inc de
+ and a
+ jr z, .asm_114cc6
+ cp $3d
+ jr nz, .asm_114c62
+ ld a, [hli]
+ ld [de], a
+ inc de
+ cp $3f
+ jr nz, .asm_114c62
+ dec de
+ dec de
+.asm_114c75
+ ld a, [hli]
+ cp $3f
+ jr nz, .asm_114c75
+ ld a, [hli]
+ cp $42
+ jr nz, .asm_114cb8
+ inc hl
+ ld bc, NULL
+ push hl
+.asm_114c84
+ inc bc
+ ld a, [hli]
+ cp $3f
+ jr nz, .asm_114c84
+ inc bc
+ ld a, [hli]
+ cp $3d
+ jr nz, .asm_114c84
+ dec bc
+ dec bc
+ ld a, l
+ ld [$dc03], a
+ ld a, h
+ ld [$dc04], a
+ pop hl
+ push de
+ call Function115c49
+ pop de
+ ld h, d
+ ld l, e
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+.asm_114ca6
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec bc
+ ld a, b
+ or c
+ jr nz, .asm_114ca6
+ ld a, [$dc03]
+ ld l, a
+ ld a, [$dc04]
+ ld h, a
+ jr .asm_114c62
+
+.asm_114cb8
+ ld a, $3d
+ ld [de], a
+ inc de
+ ld a, $3f
+ ld [de], a
+ inc de
+.asm_114cc0
+ ld a, [hli]
+ ld [de], a
+ inc de
+ and a
+ jr nz, .asm_114cc0
+
+.asm_114cc6
+ ld [de], a
+ pop hl
+ ld de, PartyMon5Defense
+ ld bc, NULL
+.asm_114cce
+ inc bc
+ ld a, [de]
+ ld [hli], a
+ inc de
+ and a
+ jr z, .asm_114cd7
+ jr .asm_114cce
+
+.asm_114cd7
+ dec bc
+ ret
+
+; 114cd9
+
+Function114cd9: ; 114cd9
+ ld h, d
+ ld l, e
+ ld b, [hl]
+ inc hl
+ ld c, [hl]
+ inc hl
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ inc hl
+ push hl
+ call Function1143f3
+ and a
+ jr nz, .asm_114d33
+ ld [$dc03], a
+ ld [$dc04], a
+ ld a, h
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld hl, $dc24
+ call Function114d39
+ ld hl, $dc24
+ call Function114d99
+ pop hl
+ push hl
+rept 4
+ inc hl
+endr
+ ld a, [hld]
+ cp b
+ jr c, .asm_114d2d
+ jr z, .asm_114d29
+.asm_114d11
+ pop hl
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld hl, PartyMon5Defense
+ call Function115d6a
+ xor a
+ jp Function11425c
+
+.asm_114d29
+ ld a, [hli]
+ cp c
+ jr nc, .asm_114d11
+
+.asm_114d2d
+ ld b, $83
+ jr .asm_114d33
+
+ ld b, $82
+
+.asm_114d33
+ pop hl
+ ld a, $1
+ jp Function11425c
+
+; 114d39
+
+Function114d39: ; 114d39
+.asm_114d39
+ ld a, [$dc04]
+ and a
+ jr nz, .asm_114d4a
+ ld a, [de]
+ cp $28
+ jr z, .asm_114d55
+ cp $22
+ jr z, .asm_114d55
+ jr .asm_114d7f
+
+.asm_114d4a
+ ld a, [de]
+ cp $29
+ jr z, .asm_114d5f
+ cp $22
+ jr z, .asm_114d6f
+ jr .asm_114d84
+
+.asm_114d55
+ ld [$dc03], a
+ ld a, $1
+ ld [$dc04], a
+ jr .asm_114d84
+
+.asm_114d5f
+ ld a, [$dc03]
+ cp $28
+ jr nz, .asm_114d84
+ xor a
+ ld [$dc03], a
+ ld [$dc04], a
+ jr .asm_114d84
+
+.asm_114d6f
+ ld a, [$dc03]
+ cp $22
+ jr nz, .asm_114d84
+ xor a
+ ld [$dc03], a
+ ld [$dc04], a
+ jr .asm_114d84
+
+.asm_114d7f
+ cp $20
+ jr z, .asm_114d84
+ ld [hli], a
+
+.asm_114d84
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_114d96
+ inc e
+ jr nz, .asm_114d39
+ push bc
+ ld bc, $dc00
+ call Function115d80
+ pop bc
+ jr .asm_114d39
+
+.asm_114d96
+ xor a
+ ld [hli], a
+ ret
+
+; 114d99
+
+Function114d99: ; 114d99
+ ld de, PartyMon5Defense
+ xor a
+ ld [de], a
+.asm_114d9e
+ ld a, [hli]
+ call Function114df1
+ and a
+ jr z, .asm_114dde
+ cp $40
+ jr nz, .asm_114d9e
+ dec hl
+.asm_114daa
+ dec hl
+ ld a, [hl]
+ call Function114e2d
+ and a
+ jr z, .asm_114daa
+ inc hl
+ push hl
+ ld b, $0
+.asm_114db6
+ ld a, [hli]
+ cp $40
+ jr z, .asm_114dc1
+ call Function114e2d
+ and a
+ jr nz, .asm_114dc4
+
+.asm_114dc1
+ inc b
+ jr .asm_114db6
+
+.asm_114dc4
+ pop hl
+ ld a, [PartyMon5Defense]
+ and a
+ jr z, .asm_114dd2
+ ld a, $2c
+ inc de
+ ld [de], a
+ ld a, [PartyMon5Defense]
+
+.asm_114dd2
+ inc a
+ ld [PartyMon5Defense], a
+.asm_114dd6
+ inc de
+ ld a, [hli]
+ ld [de], a
+ dec b
+ jr nz, .asm_114dd6
+ jr .asm_114d9e
+
+.asm_114dde
+ inc de
+ xor a
+ ld [de], a
+ ld a, $dd
+ cpl
+ ld h, a
+ ld a, $c8
+ cpl
+ ld l, a
+ inc hl
+ add hl, de
+ ld b, h
+ ld c, l
+ inc bc
+ inc bc
+ xor a
+ ret
+
+; 114df1
+
+Function114df1: ; 114df1
+ cp $1b
+ ret nz
+ ld a, [hli]
+ and a
+ jr z, .asm_114e2b
+ cp $24
+ jr nz, .asm_114e09
+ ld a, [hli]
+ and a
+ jr z, .asm_114e2b
+ cp $42
+ jr z, .asm_114e0b
+ cp $40
+ jr z, .asm_114e0b
+ dec hl
+
+.asm_114e09
+ dec hl
+ ret
+
+.asm_114e0b
+ ld a, [hli]
+ and a
+ jr z, .asm_114e2b
+ cp $1b
+ jr nz, .asm_114e0b
+ ld a, [hli]
+ and a
+ jr z, .asm_114e2b
+ cp $28
+ jr nz, .asm_114e0b
+ ld a, [hli]
+ and a
+ jr z, .asm_114e2b
+ cp $42
+ jr z, .asm_114e29
+ cp $4a
+ jr z, .asm_114e29
+ jr .asm_114e0b
+
+.asm_114e29
+ ld a, [hli]
+ ret
+
+.asm_114e2b
+ xor a
+ ret
+
+; 114e2d
+
+Function114e2d: ; 114e2d
+ cp $30
+ jr c, .asm_114e45
+ cp $40
+ jr c, .asm_114e58
+ cp $41
+ jr c, .asm_114e45
+ cp $5b
+ jr c, .asm_114e58
+ cp $61
+ jr c, .asm_114e45
+ cp $7b
+ jr c, .asm_114e58
+
+.asm_114e45
+ cp $20
+ jr z, .asm_114e58
+ cp $2d
+ jr z, .asm_114e58
+ cp $2e
+ jr z, .asm_114e58
+ cp $5f
+ jr z, .asm_114e58
+.asm_114e55
+ ld a, $1
+ ret
+
+.asm_114e58
+ cp $3c
+ jr z, .asm_114e55
+ cp $3e
+ jr z, .asm_114e55
+ xor a
+ ret
+
+; 114e62
+
+Function114e62: ; 114e62
+ ld a, c
+ and a
+ jr nz, .asm_114e6f
+ ld a, [wStartDay]
+ and a
+ jp z, Function11425c
+ jr .asm_114e76
+
+.asm_114e6f
+ xor a
+ ld [wStartDay], a
+ call Function114ee9
+
+.asm_114e76
+ call Function114f0a
+ cp $ff
+ jp z, Function11425c
+ and a
+ jr nz, .asm_114e99
+ call Function114ea0
+ and a
+ jr nz, .asm_114e99
+ ld hl, $dc09
+ ld a, [hli]
+ cpl
+ ld e, a
+ ld a, [hli]
+ cpl
+ ld d, a
+ inc de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ add hl, de
+ xor a
+ jp Function11425c
+
+.asm_114e99
+ ld a, $1
+ ld b, $83
+ jp Function11425c
+
+; 114ea0
+
+Function114ea0: ; 114ea0
+ ld hl, $dc06
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ld a, $d
+ ld [de], a
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_114edb
+ inc e
+ call z, Function114ee0
+ ld a, $a
+ ld [de], a
+ dec bc
+ inc e
+ call z, Function114ee0
+ ld hl, $dc06
+ ld a, [wCurrMapBGEventCount]
+ ld [hli], a
+ ld a, e
+ ld [hli], a
+ ld a, d
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ ld [hl], b
+ xor a
+ ld [wStartDay], a
+ ret
+
+.asm_114edb
+ ld a, $1
+ ld b, $83
+ ret
+
+; 114ee0
+
+Function114ee0: ; 114ee0
+ push bc
+ ld bc, wCurrMapBGEventCount
+ call Function115d80
+ pop bc
+ ret
+
+; 114ee9
+
+Function114ee9: ; 114ee9
+ ld hl, $dc03
+ ld a, b
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ ld [hli], a
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld c, a
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld b, a
+ ld [hli], a
+ inc de
+ ld a, c
+ ld [hli], a
+ ld a, b
+ ld [hli], a
+ ld a, e
+ ld [hli], a
+ ld [hl], d
+ ret
+
+; 114f0a
+
+Function114f0a: ; 114f0a
+ call Function114f39
+ and a
+ jr nz, .asm_114f26
+ ld a, [$dc03]
+ cp $6
+ jr c, .asm_114f21
+ cp $c
+ jr z, .asm_114f23
+ call Function114f59
+ and a
+ jr nz, .asm_114f23
+
+.asm_114f21
+ xor a
+ ret
+
+.asm_114f23
+ ld a, $1
+ ret
+
+.asm_114f26
+ call Function114f59
+ and a
+ jr nz, .asm_114f23
+ ld hl, $dc0d
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld a, [de]
+ and a
+ jr z, .asm_114f21
+ ld a, $ff
+ ret
+
+; 114f39
+
+Function114f39: ; 114f39
+ ld hl, $dc0d
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ inc hl
+ ld a, [de]
+ and a
+ jr z, .asm_114f58
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld hl, $dc0d
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ ld a, $1
+ ret
+
+.asm_114f58
+ ret
+
+; 114f59
+
+Function114f59: ; 114f59
+ ld a, [wStartDay]
+ and a
+ jr nz, .asm_114f7c
+ ld a, [$dc03]
+ cp $11
+ jr z, .asm_114fa7
+ add a
+ ld e, a
+ ld d, 0
+ ld hl, Unknown_114011
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ call Function115020
+ and a
+ jr nz, .asm_114fe7
+ ld a, $1
+ ld [wStartDay], a
+
+.asm_114f7c
+ ld a, [$dc03]
+ cp $5
+ jr c, .asm_114fc9
+ jr z, .asm_114fec
+ cp $8
+ jr c, .asm_114fa5
+ jr z, .asm_114ff4
+ cp $b
+ jr c, .asm_114fa5
+ jr z, .asm_114ffc
+ cp $c
+ jr z, .asm_115007
+ cp $d
+ jr z, .asm_114fa5
+ cp $10
+ jr c, .asm_115015
+ jr z, .asm_114fa5
+ cp $12
+ jr c, .asm_114fa5
+ jr .asm_114fe7
+
+.asm_114fa5
+ xor a
+ ret
+
+.asm_114fa7
+ ld hl, Bed
+ ld c, [hl]
+ inc hl
+ ld a, [hli]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, $dc24
+ call Function115d53
+ ld hl, $dc24
+ call Function115020
+ and a
+ jr nz, .asm_114fe7
+ jr .asm_11501e
+
+.asm_114fc9
+ call Function115062
+ and a
+ jr nz, .asm_114fe7
+ ld a, [$dc04]
+ dec a
+ ld [$dc04], a
+ and a
+ jr z, .asm_114fdf
+ call Function114f39
+ and a
+ jr nz, .asm_114fc9
+
+.asm_114fdf
+ ld a, [$dc05]
+ ld [$dc04], a
+ jr .asm_11501e
+
+.asm_114fe7
+ ld a, $1
+ ld b, $83
+ ret
+
+.asm_114fec
+ call Function115062
+ and a
+ jr nz, .asm_114fe7
+ jr .asm_11501e
+
+.asm_114ff4
+ call Function115179
+ and a
+ jr nz, .asm_114fe7
+ jr .asm_11501e
+
+.asm_114ffc
+ ld hl, String_114000
+ call Function115217
+ and a
+ jr nz, .asm_114fe7
+ jr .asm_11501e
+
+.asm_115007
+ call Function11528f
+ ld hl, $dc24
+ call Function115217
+ and a
+ jr nz, .asm_114fe7
+ jr .asm_11501e
+
+.asm_115015
+ ld hl, String_114000
+ call Function115217
+ and a
+ jr nz, .asm_114fe7
+
+.asm_11501e
+ xor a
+ ret
+
+; 115020
+
+Function115020: ; 115020
+ push hl
+ ld hl, $dc06
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ pop hl
+.asm_115036
+ ld a, [hli]
+ and a
+ jr z, .asm_115046
+ ld [de], a
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_115056
+ inc e
+ call z, Function115059
+ jr .asm_115036
+
+.asm_115046
+ ld hl, $dc06
+ ld a, [wCurrMapBGEventCount]
+ ld [hli], a
+ ld a, e
+ ld [hli], a
+ ld a, d
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ ld [hl], b
+ xor a
+ ret
+
+.asm_115056
+ ld a, $1
+ ret
+
+; 115059
+
+Function115059: ; 115059
+ push bc
+ ld bc, wCurrMapBGEventCount
+ call Function115d80
+ pop bc
+ ret
+
+; 115062
+
+Function115062: ; 115062
+ ld hl, Bed
+ ld a, [hli]
+ and a
+ jr z, .asm_1150ae
+ ld c, a
+ ld a, [hli]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld b, $0
+ ld hl, $dc24
+ ld a, [wStartDay]
+ cp $1
+ jr z, .asm_11509b
+ cp $2
+ jr z, .asm_115098
+ cp $3
+ jr nz, .asm_1150b2
+ ld a, $2c
+ ld [hli], a
+ ld a, $d
+ ld [hli], a
+ ld a, $a
+ ld [hli], a
+ ld a, $9
+ ld [hli], a
+ jr .asm_11509b
+
+.asm_115098
+ ld a, $2c
+ ld [hli], a
+
+.asm_11509b
+ call Function115d53
+ call Function1150b3
+ call Function115136
+ ld a, [wStartDay]
+ inc a
+ cp $4
+ jr nz, .asm_1150ae
+ ld a, $2
+
+.asm_1150ae
+ ld [wStartDay], a
+ xor a
+
+.asm_1150b2
+ ret
+
+; 1150b3
+
+Function1150b3: ; 1150b3
+ ld hl, $dc24
+ ld de, PartyMon5Defense
+ ld b, $0
+.asm_1150bb
+ ld c, $0
+ ld a, [hli]
+ cp $1b
+ jr z, .asm_1150c9
+ ld [de], a
+ inc de
+ and a
+ jr z, .asm_115133
+ jr .asm_1150bb
+
+.asm_1150c9
+ inc c
+ ld a, [hl]
+ cp $24
+ jr nz, .asm_1150bb
+ inc hl
+ inc c
+ ld a, [hl]
+ cp $42
+ jr z, .asm_1150dc
+ cp $40
+ jr z, .asm_1150dc
+ jr .asm_1150bb
+
+.asm_1150dc
+ push hl
+.asm_1150dd
+ inc c
+ ld a, [hli]
+ and a
+ jr z, .asm_115133
+ cp $1b
+ jr nz, .asm_1150dd
+ inc c
+ ld a, [hli]
+ cp $28
+ jr nz, .asm_1150dd
+ inc c
+ ld a, [hli]
+ cp $42
+ jr z, .asm_1150f8
+ cp $4a
+ jr z, .asm_1150f8
+ jr .asm_1150dd
+
+.asm_1150f8
+ ld a, l
+ ld [Console], a
+ ld a, h
+ ld [LeftOrnament], a
+ ld hl, String_114232
+.asm_115103
+ ld a, [hli]
+ and a
+ jr z, .asm_11510b
+ ld [de], a
+ inc de
+ jr .asm_115103
+
+.asm_11510b
+ pop hl
+ dec hl
+ dec hl
+ push de
+ call Function1158c2
+ pop de
+ ld h, d
+ ld l, e
+ ld c, [hl]
+ inc hl
+ ld b, [hl]
+ inc hl
+.asm_115119
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec bc
+ ld a, b
+ or c
+ jr nz, .asm_115119
+ ld a, $3f
+ ld [de], a
+ inc de
+ ld a, $3d
+ ld [de], a
+ inc de
+ ld a, [Console]
+ ld l, a
+ ld a, [LeftOrnament]
+ ld h, a
+ jr .asm_1150bb
+
+.asm_115133
+ xor a
+ ld [de], a
+ ret
+
+; 115136
+
+Function115136: ; 115136
+ ld hl, $dc06
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ld hl, PartyMon5Defense
+.asm_11514d
+ ld a, [hli]
+ and a
+ jr z, .asm_11515d
+ ld [de], a
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_11516d
+ inc e
+ call z, Function115170
+ jr .asm_11514d
+
+.asm_11515d
+ ld hl, $dc06
+ ld a, [wCurrMapBGEventCount]
+ ld [hli], a
+ ld a, e
+ ld [hli], a
+ ld a, d
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ ld [hl], b
+ xor a
+ ret
+
+.asm_11516d
+ ld a, $1
+ ret
+
+; 115170
+
+Function115170: ; 115170
+ push bc
+ ld bc, wCurrMapBGEventCount
+ call Function115d80
+ pop bc
+ ret
+
+; 115179
+
+Function115179: ; 115179
+ ld hl, $dc06
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ld hl, $013f
+ ld a, [hli]
+ ld [de], a
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_1151ef
+ inc e
+ call z, Function11520e
+ ld a, [hli]
+ ld [de], a
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_1151ef
+ inc e
+ call z, Function11520e
+ ld a, [hli]
+ ld [de], a
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_1151ef
+ inc e
+ call z, Function11520e
+ ld a, [hli]
+ ld [de], a
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_1151ef
+ inc e
+ call z, Function11520e
+ ld a, $2d
+ ld [de], a
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_1151ef
+ inc e
+ call z, Function11520e
+ ld a, [$014c]
+ ld h, a
+ and $f0
+ swap a
+ cp $a
+ jr nc, .asm_1151d8
+ add $30
+ jr .asm_1151da
+
+.asm_1151d8
+ add $37
+
+.asm_1151da
+ ld [de], a
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_1151ef
+ inc e
+ call z, Function11520e
+ ld a, h
+ and $f
+ cp $a
+ jr nc, .asm_1151f2
+ add $30
+ jr .asm_1151f4
+
+.asm_1151ef
+ ld a, $1
+ ret
+
+.asm_1151f2
+ add $37
+
+.asm_1151f4
+ ld [de], a
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_1151ef
+ inc e
+ call z, Function11520e
+ ld hl, $dc06
+ ld a, [wCurrMapBGEventCount]
+ ld [hli], a
+ ld a, e
+ ld [hli], a
+ ld a, d
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ ld [hl], b
+ xor a
+ ret
+
+; 11520e
+
+Function11520e: ; 11520e
+ push bc
+ ld bc, wCurrMapBGEventCount
+ call Function115d80
+ pop bc
+ ret
+
+; 115217
+
+Function115217: ; 115217
+ push hl
+ ld hl, $dc06
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ pop hl
+.asm_11522d
+ ld a, [hli]
+ and a
+ jr z, .asm_11523d
+ ld [de], a
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_115262
+ inc e
+ call z, Function115286
+ jr .asm_11522d
+
+.asm_11523d
+ ld a, [$dc03]
+ cp $b
+ jr z, .asm_115278
+ cp $c
+ jr z, .asm_115278
+ cp $e
+ jr z, .asm_115252
+ cp $f
+ jr z, .asm_115265
+ jr .asm_115262
+
+.asm_115252
+ ld hl, $dc06
+ ld a, [wCurrMapBGEventCount]
+ ld [hli], a
+ ld a, e
+ ld [hli], a
+ ld a, d
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ ld [hl], b
+ xor a
+ ret
+
+.asm_115262
+ ld a, $1
+ ret
+
+.asm_115265
+ ld h, $2
+.asm_115267
+ ld a, $2d
+ ld [de], a
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_115262
+ inc e
+ call z, Function115286
+ dec h
+ jr nz, .asm_115267
+ jr .asm_115252
+
+.asm_115278
+ ld a, $22
+ ld [de], a
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_115262
+ inc e
+ call z, Function115286
+ jr .asm_115252
+
+; 115286
+
+Function115286: ; 115286
+ push bc
+ ld bc, wCurrMapBGEventCount
+ call Function115d80
+ pop bc
+ ret
+
+; 11528f
+
+Function11528f: ; 11528f
+ ld hl, Bed
+ ld c, [hl]
+ inc hl
+ ld a, [hli]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld hl, $dc24
+.asm_1152a4
+ ld a, [de]
+ ld [hli], a
+ inc e
+ call z, Function1152af
+ dec c
+ jr nz, .asm_1152a4
+ ld [hl], c
+ ret
+
+; 1152af
+
+Function1152af: ; 1152af
+ push bc
+ ld bc, $dc00
+ call Function115d80
+ pop bc
+ ret
+
+; 1152b8
+
+Function1152b8: ; 1152b8
+ push bc
+ call Function11537d
+ push de
+ ld h, d
+ ld l, e
+ ld a, [hli]
+ ld b, a
+ ld c, $1
+ call Function1153d2
+ pop de
+ and a
+ jr nz, .asm_1152f9
+.asm_1152ca
+ ld hl, $dc0d
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+.asm_1152d0
+ ld a, [$dc03]
+ cp $3
+ jr nz, .asm_1152d8
+ push de
+
+.asm_1152d8
+ cp $5
+ jr nz, .asm_1152e7
+ pop hl
+ ld a, [hli]
+ ld b, a
+ ld c, $3
+ call Function1153d2
+ and a
+ jr nz, .asm_1152f9
+
+.asm_1152e7
+ ld a, [de]
+ inc de
+ and a
+ jr nz, .asm_115301
+ ld a, [$dc03]
+ cp $6
+ jr z, .asm_115335
+ inc a
+ ld [$dc03], a
+ jr .asm_1152d0
+
+.asm_1152f9
+ pop hl
+ ld a, $1
+ ld b, $83
+ jp Function11425c
+
+.asm_115301
+ ld hl, $dc0d
+ ld [hl], e
+ inc hl
+ ld [hl], d
+.asm_115307
+ ld [$dc05], a
+ ld a, $1
+ ld [$dc04], a
+ call Function1153b5
+ call Function114f59
+ and a
+ jr nz, .asm_1152f9
+ ld a, [$dc05]
+ dec a
+ jr nz, .asm_115307
+ ld a, [$dc03]
+ inc a
+ ld [$dc03], a
+ call Function114ea0
+ and a
+ jr nz, .asm_1152f9
+ ld [wStartDay], a
+ ld a, [$dc03]
+ cp $6
+ jr nz, .asm_1152ca
+
+.asm_115335
+ call Function1153b5
+ xor a
+ ld [wStartDay], a
+ call Function114f59
+ and a
+ jr nz, .asm_1152f9
+ call Function114ea0
+ and a
+ jr nz, .asm_1152f9
+ ld a, [$dc03]
+ inc a
+ ld [$dc03], a
+ cp $9
+ jr nz, .asm_115335
+ pop bc
+ ld a, b
+ and a
+ jr z, .asm_11536b
+ call Function1153b5
+ xor a
+ ld [wStartDay], a
+ call Function114f59
+ and a
+ jr nz, .asm_1152f9
+ call Function114ea0
+ and a
+ jr nz, .asm_1152f9
+
+.asm_11536b
+ ld hl, $dc09
+ ld a, [hli]
+ cpl
+ ld e, a
+ ld a, [hli]
+ cpl
+ ld d, a
+ inc de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ add hl, de
+ xor a
+ jp Function11425c
+
+; 11537d
+
+Function11537d: ; 11537d
+ ld hl, $dc06
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ ld b, a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc hl
+ ld a, [de]
+ ld [hld], a
+ ld a, b
+ ld [hli], a
+ inc de
+ ld hl, RightOrnament
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld hl, $dc0d
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ xor a
+ ld [$dc03], a
+ ld [wStartDay], a
+ ret
+
+; 1153b5
+
+Function1153b5: ; 1153b5
+ ld hl, $dc0d
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ inc hl
+ inc hl
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hl], a
+ inc de
+ ld a, [de]
+ ld [Bed], a
+ inc de
+ ld hl, $dc0d
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ ret
+
+; 1153d2
+
+Function1153d2: ; 1153d2
+ ld a, [$dc03]
+ ld d, a
+ ld a, [$dc04]
+ ld e, a
+ push de
+ xor a
+ ld [$dc03], a
+ ld [$dc04], a
+ ld a, $24
+ ld [Console], a
+ ld a, $dc
+ ld [LeftOrnament], a
+ push bc
+ jr .asm_1153f4
+
+.asm_1153ef
+ ld a, [hli]
+ and a
+ jr z, .asm_115426
+ ld b, a
+
+.asm_1153f4
+ push bc
+.asm_1153f5
+ ld a, [hli]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ inc hl
+ ld c, [hl]
+ inc hl
+ push hl
+ ld a, [Console]
+ ld l, a
+ ld a, [LeftOrnament]
+ ld h, a
+ push bc
+ ld b, $0
+ call Function115d53
+ inc hl
+ ld [hl], a
+ pop bc
+ ld a, l
+ ld e, a
+ ld [Console], a
+ ld a, h
+ ld d, a
+ ld [LeftOrnament], a
+ dec b
+ jr z, .asm_11542b
+ pop hl
+ jr .asm_1153f5
+
+.asm_115426
+ dec c
+ jr nz, .asm_1153ef
+ jr .asm_115430
+
+.asm_11542b
+ pop hl
+ pop bc
+ dec c
+ jr nz, .asm_1153ef
+
+.asm_115430
+ ld a, l
+ ld [Console], a
+ ld a, h
+ ld [LeftOrnament], a
+ xor a
+ ld [de], a
+ ld hl, $dc24
+.asm_11543d
+ ld a, [hli]
+ and a
+ jr nz, .asm_11543d
+ ld a, [hl]
+ and a
+ jr z, .asm_115457
+ dec hl
+ ld a, $2c
+ ld [hli], a
+ jr .asm_11543d
+
+.asm_11544b
+ pop hl
+ ld a, h
+ ld [$dc03], a
+ ld a, l
+ ld [$dc04], a
+ ld a, $1
+ ret
+
+.asm_115457
+ ld hl, $dc24
+ call Function114d99
+ ld hl, $ddc8
+.asm_115460
+ ld a, [hli]
+ and a
+ jr z, .asm_11546d
+ cp $2c
+ jr nz, .asm_115460
+ dec hl
+ xor a
+ ld [hli], a
+ jr .asm_115460
+
+.asm_11546d
+ pop de
+ ld a, e
+ cp $1
+ jr z, .asm_115477
+ xor a
+ ld [hli], a
+ jr .asm_115478
+
+.asm_115477
+ dec bc
+
+.asm_115478
+ ld hl, $dc18
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, b
+ cp h
+ jr c, .asm_11548c
+ jr nz, .asm_11544b
+ ld a, c
+ cp l
+ jr c, .asm_11548c
+ jr z, .asm_11548c
+ jr .asm_11544b
+
+.asm_11548c
+ ld hl, $dc18
+ ld a, c
+ cpl
+ ld e, a
+ ld a, b
+ cpl
+ ld d, a
+ inc de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ add hl, de
+ ld de, $dc18
+ ld a, l
+ ld [de], a
+ inc de
+ ld a, h
+ ld [de], a
+ ld hl, RightOrnament
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, $ddc8
+ call Function115d6a
+ ld hl, RightOrnament
+ ld a, [wCurrMapBGEventCount]
+ ld [hli], a
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ ld a, [Console]
+ ld e, a
+ ld a, [LeftOrnament]
+ ld d, a
+ pop hl
+ ld a, h
+ ld [$dc03], a
+ ld a, l
+ ld [$dc04], a
+ xor a
+ ret
+
+; 1154d4
+
+Function1154d4: ; 1154d4
+ xor a
+ ld [wStartDay], a
+ call Function1155af
+ call Function11560a
+ and a
+ jr nz, .asm_11552c
+ call Function1155d1
+ ld a, [RightOrnament]
+ dec a
+ ld [RightOrnament], a
+ and a
+ jp z, .asm_115577
+ cp $1
+ jr nz, .asm_115531
+ xor a
+ ld [wDailyResetTimer], a
+.asm_1154f7
+ ld a, [BigDoll]
+ cp $2
+ jr z, .asm_115502
+ cp $3
+ jr z, .asm_11550f
+
+.asm_115502
+ ld a, $a
+ ld [$dc03], a
+ call Function114f59
+ and a
+ jr z, .asm_11551a
+ jr .asm_11552c
+
+.asm_11550f
+ ld a, $c
+ ld [$dc03], a
+ call Function114f59
+ and a
+ jr nz, .asm_11552c
+
+.asm_11551a
+ call Function114ea0
+ and a
+ jr nz, .asm_11552c
+ call Function114ea0
+ and a
+ jr nz, .asm_11552c
+ call Function11560a
+ and a
+ jr z, .asm_1155a0
+
+.asm_11552c
+ ld a, $1
+ jp Function11425c
+
+.asm_115531
+ ld a, $1
+ ld [wDailyResetTimer], a
+ ld a, $b
+ ld [$dc03], a
+ call Function114f59
+ and a
+ jr nz, .asm_11552c
+ call Function114ea0
+ and a
+ jr nz, .asm_11552c
+.asm_115547
+ call Function114ea0
+ and a
+ jr nz, .asm_11552c
+ ld a, $e
+ ld [$dc03], a
+ call Function114f59
+ and a
+ jr nz, .asm_11552c
+ call Function114ea0
+ and a
+ jr nz, .asm_11552c
+ jr .asm_1154f7
+
+.asm_115560
+ call Function114ea0
+ and a
+ jr nz, .asm_11552c
+ ld a, [wDailyResetTimer]
+ and a
+ jr z, .asm_11557d
+ ld a, $f
+ ld [$dc03], a
+ call Function114f59
+ and a
+ jr nz, .asm_11552c
+
+.asm_115577
+ call Function114ea0
+ and a
+ jr nz, .asm_11552c
+
+.asm_11557d
+ ld a, $10
+ ld [$dc03], a
+ call Function114f59
+ and a
+ jr nz, .asm_11552c
+ call Function114ea0
+ and a
+ jr nz, .asm_11552c
+ ld hl, $dc09
+ ld a, [hli]
+ cpl
+ ld e, a
+ ld a, [hli]
+ cpl
+ ld d, a
+ inc de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ add hl, de
+ xor a
+ jp Function11425c
+
+.asm_1155a0
+ ld a, [RightOrnament]
+ dec a
+ ld [RightOrnament], a
+ and a
+ jr z, .asm_115560
+ call Function1155d1
+ jr .asm_115547
+
+; 1155af
+
+Function1155af: ; 1155af
+ ld hl, $dc06
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ ld b, a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ ld [hl], b
+ inc hl
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [RightOrnament], a
+ inc de
+ ld a, e
+ ld [hli], a
+ ld [hl], d
+ call Function1155d1
+ ret
+
+; 1155d1
+
+Function1155d1: ; 1155d1
+ ld a, [$dc0d]
+ ld l, a
+ ld a, [$dc0e]
+ ld h, a
+ ld a, [hli]
+ ld [BigDoll], a
+ cp $3
+ jr nz, .asm_1155f0
+ ld de, Carpet
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ ld a, [hli]
+ ld [Bed], a
+
+.asm_1155f0
+ ld de, $dc17
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ ld a, l
+ ld [$dc0d], a
+ ld a, h
+ ld [$dc0e], a
+ ret
+
+; 11560a
+
+Function11560a: ; 11560a
+ ld a, [$dc06]
+ ld [wCurrMapBGEventCount], a
+ ld a, [$dc17]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld hl, $dc1a
+ ld c, [hl]
+ inc hl
+ ld b, [hl]
+ ld a, [wCurrMapCallbackCount]
+ cp b
+ jp c, .asm_1156b1
+ jr nz, .asm_115631
+ ld a, [$dc09]
+ cp c
+ jp c, .asm_1156b1
+
+.asm_115631
+ ld a, b
+ or c
+ jr z, .asm_1156a9
+ ld a, [$dc09]
+ ld l, a
+ ld a, [wCurrMapCallbackCount]
+ ld h, a
+ ld a, c
+ cpl
+ ld e, a
+ ld a, b
+ cpl
+ ld d, a
+ inc de
+ add hl, de
+ ld a, l
+ ld [$dc09], a
+ ld a, h
+ ld [wCurrMapCallbackCount], a
+.asm_11564d
+ ld a, $3
+ cp b
+ jr c, .asm_1156b6
+ jr nz, .asm_115659
+ ld a, $db
+ cp c
+ jr c, .asm_1156b6
+
+.asm_115659
+ ld a, [$dc1a]
+ ld e, a
+ ld a, [$dc1b]
+ ld d, a
+ ld a, c
+ cpl
+ ld l, a
+ ld a, b
+ cpl
+ ld h, a
+ inc hl
+ add hl, de
+ ld a, l
+ ld [$dc1a], a
+ ld a, h
+ ld [$dc1b], a
+ push bc
+ ld hl, $dc18
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, $dc24
+ call Function115d53
+ ld hl, $dc18
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ pop bc
+ ld a, [wCurrMapBGEventCount]
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld hl, wCurrMapSceneScriptCount
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, $dc24
+ call Function115d6a
+ ld hl, wCurrMapSceneScriptCount
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ ld hl, $dc1a
+ ld c, [hl]
+ inc hl
+ ld b, [hl]
+ ld a, b
+ or c
+ jr nz, .asm_11564d
+
+.asm_1156a9
+ ld a, [wCurrMapBGEventCount]
+ ld [$dc06], a
+ xor a
+ ret
+
+.asm_1156b1
+ ld a, $1
+ ld b, $83
+ ret
+
+.asm_1156b6
+ ld a, $3
+ cpl
+ ld h, a
+ ld a, $db
+ cpl
+ ld l, a
+ add hl, bc
+ ld de, $dc1a
+ ld a, l
+ ld [de], a
+ inc de
+ ld a, h
+ ld [de], a
+ ld bc, $03db
+ jr .asm_115659
+
+; 1156cc
+
+Function1156cc: ; 1156cc
+ ld a, [wStartDay]
+ and a
+ jp z, Function11425c
+ cp $2
+ jr z, .asm_1156fa
+ cp $3
+ jr z, .asm_1156fd
+ cp $4
+ jr z, .asm_1156fd
+ cp $5
+ jr z, .asm_115716
+ cp $ff
+ jr z, .asm_11572b
+ cp $1
+ jp nz, Function11425c
+ call Function115732
+ call Function11575c
+ ld a, h
+ ld [Poster], a
+ ld a, l
+ ld [Plant], a
+
+.asm_1156fa
+ call Function1157d0
+
+.asm_1156fd
+ call Function11581e
+ and a
+ jr nz, .asm_11572b
+ ld a, [wStartDay]
+ cp $5
+ jr z, .asm_115716
+ ld a, [Poster]
+ ld h, a
+ ld a, [Plant]
+ ld l, a
+ xor a
+ jp Function11425c
+
+.asm_115716
+ ld hl, wCurrMapCallbackCount
+ ld a, [hli]
+ cpl
+ ld e, a
+ ld a, [hli]
+ cpl
+ ld d, a
+ inc de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ add hl, de
+ xor a
+ ld [wStartDay], a
+ jp Function11425c
+
+.asm_11572b
+ ld a, $1
+ ld b, $83
+ jp Function11425c
+
+; 115732
+
+Function115732: ; 115732
+ ld hl, $dc02
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ dec de
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hli], a
+ ld a, c
+ ld [hli], a
+ ld [hl], b
+ ret
+
+; 11575c
+
+Function11575c: ; 11575c
+ ld hl, $dc05
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld e, $10
+ ld b, $0
+ ld c, b
+ ld d, b
+ ld a, $3
+.asm_11576a
+ rl l
+ rl h
+ rl d
+ cp d
+ jr c, .asm_11577c
+ rl c
+ rl b
+ dec e
+ jr nz, .asm_11576a
+ jr .asm_11578a
+
+.asm_11577c
+ ld a, d
+ sub $3
+ ld d, a
+ ld a, $3
+ scf
+ rl c
+ rl b
+ dec e
+ jr nz, .asm_11576a
+
+.asm_11578a
+ ld a, d
+ and a
+ jr z, .asm_11578f
+ inc bc
+
+.asm_11578f
+ sla c
+ rl b
+ sla c
+ rl b
+ ld h, b
+ ld l, c
+ push hl
+ ld e, $10
+ ld b, $0
+ ld c, b
+ ld d, b
+ ld a, $40
+.asm_1157a2
+ rl l
+ rl h
+ rl d
+ cp d
+ jr c, .asm_1157b4
+ rl c
+ rl b
+ dec e
+ jr nz, .asm_1157a2
+ jr .asm_1157c3
+
+.asm_1157b4
+ ld a, d
+ sub $40
+ ld d, a
+ ld a, $40
+ scf
+ rl c
+ rl b
+ dec e
+ jr nz, .asm_1157a2
+ inc bc
+
+.asm_1157c3
+ and a
+ sla c
+ rl b
+ pop hl
+ add hl, bc
+ ld a, $2
+ ld [wStartDay], a
+ ret
+
+; 1157d0
+
+Function1157d0: ; 1157d0
+ ld hl, $dc05
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [$dc0e]
+ ld c, a
+ ld a, [Bed]
+ ld b, a
+ cp h
+ jr c, .asm_1157eb
+ jr nz, .asm_1157e9
+ ld a, c
+ cp l
+ jr c, .asm_1157eb
+ jr z, .asm_1157eb
+
+.asm_1157e9
+ ld b, h
+ ld c, l
+
+.asm_1157eb
+ push bc
+ ld a, b
+ cpl
+ ld b, a
+ ld a, c
+ cpl
+ ld c, a
+ inc bc
+ add hl, bc
+ ld a, l
+ ld [$dc05], a
+ ld a, h
+ ld [$dc06], a
+ ld a, h
+ or l
+ jr nz, .asm_11580f
+ pop bc
+ ld a, c
+ ld [$dc0e], a
+ ld a, b
+ ld [Bed], a
+ ld a, $4
+ ld [wStartDay], a
+ ret
+
+.asm_11580f
+ pop bc
+ ld a, c
+ ld [$dc0e], a
+ ld a, b
+ ld [Bed], a
+ ld a, $3
+ ld [wStartDay], a
+ ret
+
+; 11581e
+
+Function11581e: ; 11581e
+ ld a, [wStartDay]
+ and a
+ ret z
+ ld a, [$dc0e]
+ ld c, a
+ ld a, [Bed]
+ ld b, a
+ ld hl, $dc02
+ ld a, [hli]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, $dc24
+ push bc
+ call Function115d53
+ pop bc
+ ld hl, $dc02
+ ld a, [$dc00]
+ ld [hli], a
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ ld hl, $dc24
+ ld de, PartyMon5Defense
+ call Function1158c2
+ ld hl, PartyMon5Defense
+ ld c, [hl]
+ inc hl
+ ld b, [hl]
+ inc hl
+ push hl
+ ld a, [wCurrMapCallbackCount]
+ ld l, a
+ ld a, [wCurrMapCallbackHeaderPointer]
+ ld h, a
+ cp b
+ jr c, .asm_1158bb
+ jr nz, .asm_11586e
+ ld a, l
+ cp c
+ jr c, .asm_1158bb
+
+.asm_11586e
+ push bc
+ ld a, b
+ cpl
+ ld b, a
+ ld a, c
+ cpl
+ ld c, a
+ inc bc
+ add hl, bc
+ ld a, l
+ ld [wCurrMapCallbackCount], a
+ ld a, h
+ ld [wCurrMapCallbackHeaderPointer], a
+ pop bc
+ pop hl
+ ld hl, wCurrMapSceneScriptCount
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, PartyMon5Speed
+ call Function115d6a
+ ld hl, wCurrMapSceneScriptCount
+ ld a, [wCurrMapBGEventCount]
+ ld [hli], a
+ ld a, e
+ ld [hli], a
+ ld [hl], d
+ ld a, [wStartDay]
+ cp $3
+ jr z, .asm_1158b4
+ cp $4
+ jr z, .asm_1158ad
+ jr .asm_1158bc
+
+.asm_1158ad
+ ld a, $5
+ ld [wStartDay], a
+ jr .asm_1158b9
+
+.asm_1158b4
+ ld a, $2
+ ld [wStartDay], a
+
+.asm_1158b9
+ xor a
+ ret
+
+.asm_1158bb
+ pop hl
+
+.asm_1158bc
+ ld a, $ff
+ ld [wStartDay], a
+ ret
+
+; 1158c2
+
+Function1158c2: ; 1158c2
+ ld a, e
+ ld [SwarmFlags], a
+ ld a, d
+ ld [$dc21], a
+ xor a
+ ld [$dc22], a
+ xor a
+ ld [de], a
+ inc de
+ ld [de], a
+ inc de
+ ld a, c
+ ld [$dc19], a
+ ld a, b
+ ld [$dc1a], a
+ ld c, e
+ ld b, d
+ ld e, l
+ ld d, h
+ ld l, c
+ ld h, b
+ xor a
+ ld [WeeklyFlags], a
+
+.asm_1158e5
+ ld b, $3
+ push hl
+ ld hl, $dc1b
+.asm_1158eb
+ ld a, [de]
+ inc de
+ ld [hli], a
+ dec b
+ jr nz, .asm_1158eb
+ ld a, [$dc19]
+ ld c, a
+ ld a, [$dc1a]
+ ld b, a
+ xor a
+ or b
+ jr nz, .asm_115914
+ ld a, $2
+ cp c
+ jr c, .asm_115914
+ push hl
+ dec hl
+ ld a, c
+ ld [WeeklyFlags], a
+.asm_115908
+ xor a
+ ld [hld], a
+ inc c
+ ld a, $3
+ cp c
+ jr nz, .asm_115908
+ pop hl
+ ld bc, $0003
+
+.asm_115914
+ dec bc
+ dec bc
+ dec bc
+ ld a, c
+ ld [$dc19], a
+ ld a, b
+ ld [$dc1a], a
+ push de
+ push hl
+ ld hl, SwarmFlags
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+rept 4
+ inc de
+endr
+ ld [hl], d
+ dec hl
+ ld [hl], e
+ pop hl
+ dec hl
+ ld c, [hl]
+ dec hl
+ ld b, [hl]
+ dec hl
+ ld a, [hl]
+ ld d, a
+ srl a
+ srl a
+ ld [hli], a
+ ld a, $3
+ and d
+ ld d, a
+ ld a, $f0
+ and b
+ or d
+ swap a
+ ld [hli], a
+ ld a, $f
+ and b
+ ld d, a
+ ld a, c
+ and $c0
+ or d
+ rlca
+ rlca
+ ld [hli], a
+ ld a, $3f
+ and c
+ ld [hld], a
+ dec hl
+ dec hl
+ pop de
+ ld b, h
+ ld c, l
+ pop hl
+ ld a, [bc]
+ inc bc
+ call Function1159dc
+ ld [hli], a
+ ld a, [bc]
+ inc bc
+ call Function1159dc
+ ld [hli], a
+ ld a, [bc]
+ inc bc
+ call Function1159dc
+ ld [hli], a
+ ld a, [bc]
+ inc bc
+ call Function1159dc
+ ld [hli], a
+ ld a, [$dc22]
+ inc a
+ cp $10
+ jr nz, .asm_1159b1
+ push af
+ push bc
+ ld a, [$dc19]
+ ld b, a
+ ld a, [$dc1a]
+ or b
+ jr nz, .asm_115998
+ ld a, [$dc05]
+ ld b, a
+ ld a, [$dc06]
+ or b
+ jr nz, .asm_115998
+ pop bc
+ pop af
+ jr .asm_1159c4
+
+.asm_115998
+ pop bc
+ pop af
+ ld a, $d
+ ld [hli], a
+ ld a, $a
+ ld [hli], a
+ push hl
+ ld hl, SwarmFlags
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [hli]
+ ld c, a
+ ld b, [hl]
+ inc bc
+ inc bc
+ ld a, b
+ ld [hld], a
+ ld [hl], c
+ pop hl
+ xor a
+
+.asm_1159b1
+ ld [$dc22], a
+ ld a, [$dc19]
+ cp $0
+ jp nz, .asm_1158e5
+ ld a, [$dc1a]
+ cp $0
+ jp nz, .asm_1158e5
+
+.asm_1159c4
+ ld a, [WeeklyFlags]
+ cp $0
+ jr z, .asm_1159d8
+ push hl
+ dec hl
+ ld b, a
+.asm_1159ce
+ ld a, $3d
+ ld [hld], a
+ inc b
+ ld a, $3
+ cp b
+ jr nz, .asm_1159ce
+ pop hl
+
+.asm_1159d8
+ ld a, $0
+ ld [hl], a
+ ret
+
+; 1159dc
+
+Function1159dc: ; 1159dc
+ cp $1a
+ jr c, .asm_1159ef
+ cp $34
+ jr c, .asm_1159f2
+ cp $3e
+ jr c, .asm_1159f5
+ cp $3e
+ jr z, .asm_1159f8
+ ld a, $2f
+ ret
+
+.asm_1159ef
+ add $41
+ ret
+
+.asm_1159f2
+ add $47
+ ret
+
+.asm_1159f5
+ sub $4
+ ret
+
+.asm_1159f8
+ ld a, $2b
+ ret
+
+; 1159fb
+
+Function1159fb: ; 1159fb
+ ld a, [wStartDay]
+ and a
+ jp z, Function11425c
+ cp $2
+ jr z, .asm_115a29
+ cp $3
+ jr z, .asm_115a2c
+ cp $4
+ jr z, .asm_115a2c
+ cp $5
+ jr z, .asm_115a45
+ cp $ff
+ jr z, .asm_115a5a
+ cp $1
+ jp nz, Function11425c
+ call Function115732
+ call Function115a5f
+ ld a, h
+ ld [Plant], a
+ ld a, l
+ ld [Poster], a
+
+.asm_115a29
+ call Function115ab0
+
+.asm_115a2c
+ call Function115b00
+ and a
+ jr nz, .asm_115a5a
+ ld a, [wStartDay]
+ cp $5
+ jr z, .asm_115a45
+ ld a, [Poster]
+ ld h, a
+ ld a, [Plant]
+ ld l, a
+ xor a
+ jp Function11425c
+
+.asm_115a45
+ ld hl, wCurrMapCallbackCount
+ ld a, [hli]
+ cpl
+ ld e, a
+ ld a, [hli]
+ cpl
+ ld d, a
+ inc de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ add hl, de
+ xor a
+ ld [wStartDay], a
+ jp Function11425c
+
+.asm_115a5a
+ ld a, $1
+ jp Function11425c
+
+; 115a5f
+
+Function115a5f: ; 115a5f
+ ld hl, $dc05
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ push hl
+ ld e, $10
+ ld b, $0
+ ld c, b
+ ld d, b
+ ld a, $42
+.asm_115a6e
+ rl l
+ rl h
+ rl d
+ cp d
+ jr c, .asm_115a80
+ rl c
+ rl b
+ dec e
+ jr nz, .asm_115a6e
+ jr .asm_115a8e
+
+.asm_115a80
+ ld a, d
+ sub $42
+ ld d, a
+ ld a, $42
+ scf
+ rl c
+ rl b
+ dec e
+ jr nz, .asm_115a6e
+
+.asm_115a8e
+ sla c
+ rl b
+ pop hl
+ ld a, b
+ cpl
+ ld b, a
+ ld a, c
+ cpl
+ ld c, a
+ inc bc
+ add hl, bc
+ srl h
+ rr l
+ srl h
+ rr l
+ ld b, h
+ ld c, l
+ sla c
+ rl b
+ add hl, bc
+ ld a, $2
+ ld [wStartDay], a
+ ret
+
+; 115ab0
+
+Function115ab0: ; 115ab0
+ ld hl, $dc05
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [$dc0e]
+ ld c, a
+ ld a, [Bed]
+ ld b, a
+ cp h
+ jr c, .asm_115acb
+ jr nz, .asm_115ac9
+ ld a, c
+ cp l
+ jr c, .asm_115acb
+ jr z, .asm_115acb
+
+.asm_115ac9
+ ld b, h
+ ld c, l
+
+.asm_115acb
+ push bc
+ ld a, b
+ cpl
+ ld b, a
+ ld a, c
+ cpl
+ ld c, a
+ inc bc
+ add hl, bc
+ ld a, l
+ ld [$dc05], a
+ ld a, h
+ ld [$dc06], a
+ ld a, h
+ or l
+ jr nz, .asm_115af0
+ pop bc
+ ld a, c
+ ld [$dc0e], a
+ ld a, b
+ ld [Bed], a
+ ld a, $4
+ ld [wStartDay], a
+ xor a
+ ret
+
+.asm_115af0
+ pop bc
+ ld a, c
+ ld [$dc0e], a
+ ld a, b
+ ld [Bed], a
+ ld a, $3
+ ld [wStartDay], a
+ xor a
+ ret
+
+; 115b00
+
+Function115b00: ; 115b00
+ ld a, [wStartDay]
+ and a
+ ret z
+ ld a, [$dc0e]
+ ld c, a
+ ld a, [Bed]
+ ld b, a
+ ld hl, $dc02
+ ld a, [hli]
+ ld [$dc00], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, PartyMon5Defense
+ push bc
+ call Function115bc8
+ pop hl
+ and a
+ jr z, .asm_115b43
+ cp $2
+ jr z, .asm_115b3b
+ ld a, [wStartDay]
+ cp $4
+ jr z, .asm_115b43
+ inc hl
+ inc hl
+ jr .asm_115b43
+
+.asm_115b36
+ pop hl
+ ld b, $83
+ jr .asm_115b3d
+
+.asm_115b3b
+ ld b, $81
+
+.asm_115b3d
+ ld a, $ff
+ ld [wStartDay], a
+ ret
+
+.asm_115b43
+ ld a, [Carpet]
+ add a
+ cpl
+ ld c, a
+ ld b, $ff
+ inc bc
+ add hl, bc
+ ld b, h
+ ld c, l
+ ld hl, $dc02
+ ld a, [$dc00]
+ ld [hli], a
+ ld [hl], e
+ inc hl
+ ld [hl], d
+ ld hl, PartyMon5Defense
+ ld de, $dc24
+ call Function115c49
+ ld hl, $dc24
+ ld c, [hl]
+ inc hl
+ ld b, [hl]
+ inc hl
+ push hl
+ ld a, [wCurrMapCallbackCount]
+ ld l, a
+ ld a, [wCurrMapCallbackHeaderPointer]
+ ld h, a
+ cp b
+ jr c, .asm_115b36
+ jr nz, .asm_115b7b
+ ld a, l
+ cp c
+ jr c, .asm_115b36
+
+.asm_115b7b
+ push bc
+ ld a, b
+ cpl
+ ld b, a
+ ld a, c
+ cpl
+ ld c, a
+ inc bc
+ add hl, bc
+ ld a, l
+ ld [wCurrMapCallbackCount], a
+ ld a, h
+ ld [wCurrMapCallbackHeaderPointer], a
+ pop bc
+ pop hl
+ ld hl, wCurrMapSceneScriptCount
+ ld a, [hli]
+ ld [wCurrMapBGEventCount], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, $dc26
+ call Function115d6a
+ ld hl, wCurrMapSceneScriptCount
+ ld a, [wCurrMapBGEventCount]
+ ld [hli], a
+ ld a, e
+ ld [hli], a
+ ld [hl], d
+ ld a, [wStartDay]
+ cp $3
+ jr z, .asm_115bc1
+ cp $4
+ jr z, .asm_115bba
+ jr .asm_115b3b
+
+.asm_115bba
+ ld a, $5
+ ld [wStartDay], a
+ jr .asm_115bc6
+
+.asm_115bc1
+ ld a, $2
+ ld [wStartDay], a
+
+.asm_115bc6
+ xor a
+ ret
+
+; 115bc8
+
+Function115bc8: ; 115bc8
+ xor a
+ ld [Carpet], a
+.asm_115bcc
+ ld a, [de]
+ ld [hli], a
+ inc e
+ call z, .Function115c3d
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_115c46
+ ld a, [de]
+ ld [hli], a
+ inc e
+ call z, .Function115c3d
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_115c1b
+ ld a, [de]
+ ld [hli], a
+ inc e
+ call z, .Function115c3d
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_115c46
+ ld a, [de]
+ ld [hli], a
+ inc e
+ call z, .Function115c3d
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_115c3a
+ ld a, [de]
+ cp $d
+ jr nz, .asm_115bcc
+ inc e
+ call z, .Function115c3d
+ ld a, [de]
+ cp $a
+ jr nz, .asm_115c46
+ inc e
+ call z, .Function115c3d
+ dec bc
+ ld a, b
+ or c
+ jr z, .asm_115c46
+ ld a, [Carpet]
+ inc a
+ ld [Carpet], a
+ dec bc
+ ld a, b
+ or c
+ jr nz, .asm_115bcc
+
+.asm_115c1b
+ ld a, [wStartDay]
+ cp $4
+ jr z, .asm_115c33
+ ld a, [de]
+ ld [hli], a
+ inc e
+ call z, .Function115c3d
+ ld a, [de]
+ ld [hli], a
+ inc e
+ call z, .Function115c3d
+ xor a
+ ld [hl], a
+ ld a, $1
+ ret
+
+.asm_115c33
+ dec hl
+ dec hl
+ xor a
+ ld [hl], a
+ ld a, $1
+ ret
+
+.asm_115c3a
+ xor a
+ ld [hl], a
+ ret
+
+.Function115c3d:
+ push bc
+ ld bc, $dc00
+ call Function115d80
+ pop bc
+ ret
+
+.asm_115c46
+ ld a, $2
+ ret
+
+; 115c49
+
+Function115c49: ; 115c49
+ ld a, e
+ ld [WeeklyFlags], a
+ ld a, d
+ ld [SwarmFlags], a
+ xor a
+ ld [de], a
+ inc de
+ ld [de], a
+ inc de
+
+ ld a, c
+ ld [$dc19], a
+ ld a, b
+ ld [$dc1a], a
+ ld c, e
+ ld b, d
+ ld e, l
+ ld d, h
+ ld l, c
+ ld h, b
+
+.asm_115c64
+ ld a, [$dc1a]
+ or a
+ jr nz, .asm_115c71
+ ld a, [$dc19]
+ cp $4
+ jr c, .asm_115c99
+
+.asm_115c71
+ ld b, $4
+ push hl
+ ld hl, $dc1b
+.asm_115c77
+ ld a, [de]
+ inc de
+ call Function115cfd
+ ld [hli], a
+ dec b
+ jr nz, .asm_115c77
+ ld a, [$dc19]
+ ld c, a
+ ld a, [$dc1a]
+ ld b, a
+rept 4
+ dec bc
+endr
+.asm_115c8c
+ ld a, [de]
+ cp $d
+ jr z, .asm_115c95
+ cp $a
+ jr nz, .asm_115c9f
+
+.asm_115c95
+ inc de
+ dec bc
+ jr .asm_115c8c
+
+.asm_115c99
+ ld a, $ff
+ ld [wStartDay], a
+ ret
+
+.asm_115c9f
+ ld a, c
+ ld [$dc19], a
+ ld a, b
+ ld [$dc1a], a
+ push de
+ push hl
+ ld hl, WeeklyFlags
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ inc de
+ inc de
+ inc de
+ ld [hl], d
+ dec hl
+ ld [hl], e
+ pop hl
+ dec hl
+ ld d, [hl]
+ dec hl
+ ld c, [hl]
+ dec hl
+ ld b, [hl]
+ dec hl
+ ld a, [hl]
+ sla b
+ sla b
+ sla b
+ rla
+ sla b
+ rla
+ ld [hli], a
+ ld [hl], b
+ inc hl
+ rrc c
+ rrc c
+ ld [hl], c
+ dec hl
+ ld a, $f
+ and c
+ or [hl]
+ ld [hli], a
+ ld a, [hli]
+ and $c0
+ or [hl]
+ dec hl
+ ld [hld], a
+ dec hl
+ pop de
+ ld b, h
+ ld c, l
+ pop hl
+ ld a, [bc]
+ ld [hli], a
+ inc bc
+ ld a, [bc]
+ ld [hli], a
+ inc bc
+ ld a, [bc]
+ ld [hli], a
+ ld a, [$dc19]
+ cp $0
+ jp nz, .asm_115c64
+ ld a, [$dc1a]
+ cp $0
+ jp nz, .asm_115c64
+ ret
+
+; 115cfd
+
+Function115cfd: ; 115cfd
+ cp $2b
+ jr c, .asm_115d27
+ jr z, .asm_115d2f
+ cp $2f
+ jr c, .asm_115d27
+ jr z, .asm_115d32
+ cp $30
+ jr c, .asm_115d27
+ cp $3a
+ jr c, .asm_115d35
+ cp $3d
+ jr c, .asm_115d27
+ jr z, .asm_115d38
+ cp $41
+ jr c, .asm_115d27
+ cp $5b
+ jr c, .asm_115d4d
+ cp $61
+ jr c, .asm_115d27
+ cp $7b
+ jr c, .asm_115d50
+
+.asm_115d27
+ pop hl
+ pop hl
+ ld a, $ff
+ ld [wStartDay], a
+ ret
+
+.asm_115d2f
+ ld a, $3e
+ ret
+
+.asm_115d32
+ ld a, $3f
+ ret
+
+.asm_115d35
+ add $4
+ ret
+
+.asm_115d38
+ push de
+ push hl
+ ld a, [WeeklyFlags]
+ ld l, a
+ ld a, [SwarmFlags]
+ ld h, a
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ dec de
+ ld [hl], d
+ dec hl
+ ld [hl], e
+ pop hl
+ pop de
+ xor a
+ ret
+
+.asm_115d4d
+ sub $41
+ ret
+
+.asm_115d50
+ sub $47
+ ret
+
+; 115d53
+
+Function115d53: ; 115d53
+.asm_115d53
+ ld a, [de]
+ ld [hli], a
+ inc e
+ call z, Function115d61
+ dec bc
+ ld a, b
+ or c
+ jr nz, .asm_115d53
+ xor a
+ ld [hl], a
+ ret
+
+; 115d61
+
+Function115d61: ; 115d61
+ push bc
+ ld bc, $dc00
+ call Function115d80
+ pop bc
+ ret
+
+; 115d6a
+
+Function115d6a: ; 115d6a
+.asm_115d6a
+ ld a, [hli]
+ ld [de], a
+ inc e
+ call z, Function115d77
+ dec bc
+ ld a, b
+ or c
+ jr nz, .asm_115d6a
+ xor a
+ ret
+
+; 115d77
+
+Function115d77: ; 115d77
+ push bc
+ ld bc, wCurrMapBGEventCount
+ call Function115d80
+ pop bc
+ ret
+
+; 115d80
+
+Function115d80: ; 115d80
+ ld e, a
+ ld a, d
+ cp $bf
+ jr z, .asm_115d8b
+ inc d
+ ld a, e
+ ld e, $0
+ ret
+
+.asm_115d8b
+ ld a, [bc]
+ inc a
+ ld [bc], a
+ ld [hFF8C], a
+ ld [MBC3SRamBank], a
+ ld a, e
+ ld d, $a0
+ ld e, $0
+ ret
+
+; 115d99
+
+INCLUDE "mobile/mobile_45_sprite_engine.asm"
+
+; 116567
+
+Function116567: ; 116567
+ ld hl, wc3f7
+ dec [hl]
+ ret nz
+ ld hl, wc3f6
+ inc [hl]
+.asm_116570
+ ld a, $7
+ sla a
+ ld c, a
+ ld b, 0
+ ld hl, Unknown_1167eb
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ push de
+ pop hl
+ ld a, [wc3f6]
+ sla a
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hli]
+ cp $fe
+ jr nz, .asm_116595
+ xor a
+ ld [wc3f6], a
+ jr .asm_116570
+
+.asm_116595
+ ld [wc3f5], a
+ ld a, [hl]
+ ld [wc3f7], a
+ ret
+
+; 11659d
+
+Function11659d: ; 11659d
+ ld a, [wc314]
+ cp $12
+ ret nc
+ ld e, a
+ ld d, 0
+ ld hl, Jumptable_1165af
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+; 1165af
+
+Jumptable_1165af: ; 1165af
+ dw Function11677e
+ dw Function1165d5
+ dw Function1165d8
+ dw Function1165e3
+ dw Function1165f5
+ dw Function116600
+ dw Function116615
+ dw Function116618
+ dw Function116623
+ dw Function116635
+ dw Function116640
+ dw Function116655
+ dw Function11665c
+ dw Function11668d
+ dw Function11669f
+ dw Function1166a2
+ dw Function1166c4
+ dw Function1166d6
+ dw Function1166d6
+; 1165d5
+
+Function1165d5: ; 1165d5
+ call Function11678e
+
+Function1165d8:
+ ld a, $0
+ ld c, a
+ ld a, $ff
+ ld b, a
+ ld a, $a8
+ call Function1166f4
+
+Function1165e3:
+ call Function116747
+ ld a, [wc30e]
+ cp $e8
+ ret nz
+ ld a, $1
+ call Function116780
+ ret c
+ jp Function116797
+
+; 1165f5
+
+Function1165f5: ; 1165f5
+ ld a, $1
+ ld c, a
+ ld a, $1
+ ld b, a
+ ld a, $e8
+ call Function1166f4
+
+Function116600:
+ call Function116747
+ ld a, [wc30e]
+ cp $a8
+ ret nz
+ ld a, $1
+ call Function116780
+ ret c
+ ld a, $2
+ ld [wc314], a
+ ret
+
+; 116615
+
+Function116615: ; 116615
+ call Function11678e
+
+Function116618:
+ ld a, $3
+ ld c, a
+ ld a, $1
+ ld b, a
+ ld a, $28
+ call Function11671f
+
+Function116623:
+ call Function116747
+ ld a, [wc30f]
+ cp $a0
+ ret nz
+ ld a, $6
+ call Function116780
+ ret c
+ jp Function116797
+
+; 116635
+
+Function116635: ; 116635
+ ld a, $2
+ ld c, a
+ ld a, $ff
+ ld b, a
+ ld a, $a0
+ call Function11671f
+
+Function116640:
+ call Function116747
+ ld a, [wc30f]
+ cp $28
+ ret nz
+ ld a, $6
+ call Function116780
+ ret c
+ ld a, $7
+ ld [wc314], a
+ ret
+
+; 116655
+
+Function116655: ; 116655
+ xor a
+ ld [wc314 + 3], a
+ call Function11678e
+
+Function11665c:
+ ld hl, wc314 + 3
+ ld a, $1
+ xor [hl]
+ ld [hl], a
+ add $4
+ ld c, a
+ call Function11679c
+ ld a, [wc314 + 3]
+ and a
+ jr nz, .asm_116673
+ ld a, $48
+ jr .asm_116675
+
+.asm_116673
+ ld a, $78
+
+.asm_116675
+ ld [wc30f], a
+ call Random
+ ld a, [hRandomAdd]
+ and $7
+ sla a
+ sla a
+ sla a
+ add $30
+ ld [wc30e], a
+ call Function116797
+
+Function11668d:
+ ld a, [wc311]
+ cp $ff
+ ret nz
+ ld a, $b
+ call Function116780
+ ret c
+ ld a, $c
+ ld [wc314], a
+ ret
+
+; 11669f
+
+Function11669f: ; 11669f
+ call Function11678e
+
+Function1166a2:
+ ld a, $a8
+ ld [wc30e], a
+ ld [wc3f1], a
+ ld a, $60
+ ld [wc30f], a
+ ld [wc3f3], a
+ ld a, $ff
+ ld [wc314 + 2], a
+ xor a
+ ld [wc314 + 3], a
+ ld a, $0
+ ld c, a
+ call Function11679c
+ call Function116797
+
+Function1166c4:
+ call Function116747
+ ld a, [wc30e]
+ cp $58
+ ret nz
+ ld a, $6
+ ld c, a
+ call Function11679c
+ call Function116797
+
+Function1166d6:
+ call Function116747
+ ld a, [wc30e]
+ cp $48
+ jr nz, .asm_1166e4
+ xor a
+ ld [wc314 + 2], a
+
+.asm_1166e4
+ ld a, [wc311]
+ cp $ff
+ ret nz
+ ld a, $4
+ ld [$c319], a
+ xor a
+ ld [wc314], a
+ ret
+
+; 1166f4
+
+Function1166f4: ; 1166f4
+ ld [wc30e], a
+ ld a, b
+ ld [wc314 + 2], a
+ xor a
+ ld [wc314 + 3], a
+ ld hl, wc30f
+.asm_116702
+ call Random
+ ld a, [hRandomAdd]
+ and $7
+ jr z, .asm_11670c
+ dec a
+
+.asm_11670c
+ sla a
+ sla a
+ sla a
+ add $48
+ cp [hl]
+ jr z, .asm_116702
+ ld [hl], a
+ call Function11679c
+ call Function116797
+ ret
+
+; 11671f
+
+Function11671f: ; 11671f
+ ld [wc30f], a
+ ld a, b
+ ld [wc314 + 3], a
+ xor a
+ ld [wc314 + 2], a
+ ld hl, wc30e
+.asm_11672d
+ call Random
+ ld a, [hRandomAdd]
+ and $7
+ sla a
+ sla a
+ sla a
+ add $30
+ cp [hl]
+ jr z, .asm_11672d
+ ld [hl], a
+ call Function11679c
+ call Function116797
+ ret
+
+; 116747
+
+Function116747: ; 116747
+ ld hl, wc30e
+ ld a, [wc314 + 2]
+ add [hl]
+ ld [hl], a
+ ld hl, wc30f
+ ld a, [wc314 + 3]
+ add [hl]
+ ld [hl], a
+ ret
+
+; 116758
+
+Function116758: ; 116758
+ ld a, [wc30f]
+ cp $30
+ jr c, .asm_116770
+ jr z, .asm_116770
+ cp $38
+ jr c, .asm_116774
+ jr z, .asm_116774
+ cp $40
+ jr c, .asm_116778
+ jr z, .asm_116778
+ xor a
+ jr .asm_11677a
+
+.asm_116770
+ ld a, $c
+ jr .asm_11677a
+
+.asm_116774
+ ld a, $8
+ jr .asm_11677a
+
+.asm_116778
+ ld a, $4
+
+.asm_11677a
+ ld [wc314 + 4], a
+ ret
+
+; 11677e
+
+Function11677e: ; 11677e
+ ld a, $0
+
+Function116780:
+ ld hl, wc314 + 1
+ cp [hl]
+ jr z, .asm_11678c
+ ld a, [hl]
+ ld [wc314], a
+ scf
+ ret
+
+.asm_11678c
+ and a
+ ret
+
+; 11678e
+
+Function11678e: ; 11678e
+ ld hl, wc314
+ ld a, [hl]
+ ld [wc314 + 1], a
+ inc [hl]
+ ret
+
+; 116797
+
+Function116797: ; 116797
+ ld hl, wc314
+ inc [hl]
+ ret
+
+; 11679c
+
+Function11679c:
+ ld a, c
+ ld [wc311], a
+ xor a
+ ld [wc312], a
+ jr asm_1167af
+
+Function1167a6: ; 1167a6
+ ld hl, wc313
+ dec [hl]
+ ret nz
+ ld hl, wc312
+ inc [hl]
+
+asm_1167af
+.asm_1167af
+ ld a, [wc311]
+ cp $ff
+ ret z
+ sla a
+ ld c, a
+ ld b, 0
+ ld hl, Unknown_1167eb
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ push de
+ pop hl
+ ld a, [wc312]
+ sla a
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hli]
+ cp $ff
+ jr z, .asm_1167dc
+ cp $fe
+ jr nz, .asm_1167e3
+ xor a
+ ld [wc312], a
+ jr .asm_1167af
+
+.asm_1167dc
+ ld a, $ff
+ ld [wc311], a
+ ld a, $fd
+
+.asm_1167e3
+ ld [wc310], a
+ ld a, [hl]
+ ld [wc313], a
+ ret
+
+; 1167eb
+
+Unknown_1167eb:
+ dw Unknown_1167fb
+ dw Unknown_116808
+ dw Unknown_116867
+ dw Unknown_116870
+ dw Unknown_116815
+ dw Unknown_11683e
+ dw Unknown_116881
+ dw Unknown_1168ae
+
+Unknown_1167fb: ; 1167fb
+ db $0, $6
+ db $1, $4
+ db $2, $4
+ db $3, $6
+ db $2, $4
+ db $1, $4
+ db $fe
+
+Unknown_116808: ; 116808
+ db $4, $6
+ db $5, $4
+ db $6, $4
+ db $7, $6
+ db $6, $4
+ db $5, $4
+ db $fe
+
+Unknown_116815: ; 116815
+ db $fd, $20
+ db $8, $c
+ db $9, $24
+ db $a, $4
+ db $b, $8
+ db $a, $4
+ db $9, $6
+ db $c, $4
+ db $d, $8
+ db $c, $5
+ db $9, $24
+ db $a, $4
+ db $b, $8
+ db $a, $4
+ db $9, $6
+ db $c, $4
+ db $d, $8
+ db $c, $5
+ db $9, $8
+ db $8, $4
+ db $ff
+
+Unknown_11683e: ; 11683e
+ db $fd, $20
+ db $e, $c
+ db $f, $24
+ db $10, $4
+ db $11, $8
+ db $10, $4
+ db $f, $6
+ db $12, $4
+ db $13, $8
+ db $12, $5
+ db $f, $24
+ db $10, $4
+ db $11, $8
+ db $10, $4
+ db $f, $6
+ db $12, $4
+ db $13, $8
+ db $12, $5
+ db $f, $8
+ db $e, $4
+ db $ff
+
+Unknown_116867: ; 116867
+ db $14, $8
+ db $15, $8
+ db $16, $8
+ db $15, $8
+ db $fe
+
+Unknown_116870: ; 116870
+ db $17, $5
+ db $18, $5
+ db $19, $5
+ db $1a, $5
+ db $1b, $5
+ db $1a, $5
+ db $19, $5
+ db $18, $5
+ db $fe
+
+Unknown_116881: ; 116881
+ db $1c, $7
+ db $1d, $7
+ db $1e, $a
+ db $1f, $a
+ db $20, $5
+ db $21, $5
+ db $20, $5
+ db $21, $5
+ db $20, $18
+ db $22, $4
+ db $23, $2
+ db $22, $2
+ db $23, $2
+ db $22, $1
+ db $23, $1
+ db $22, $1
+ db $23, $4
+ db $fd, $1
+ db $23, $1
+ db $fd, $2
+ db $23, $2
+ db $fd, $40
+ db $ff
+
+Unknown_1168ae: ; 1168ae
+ db $24, $4
+ db $25, $4
+ db $26, $4
+ db $27, $4
+ db $28, $4
+ db $29, $4
+ db $2a, $4
+ db $2b, $4
+ db $2c, $4
+ db $2d, $4
+ db $2e, $4
+ db $fe
+; 1168c5
+
+Unknown_1168c5:
+ dw Unknown_116923
+ dw Unknown_116960
+ dw Unknown_1169a1
+ dw Unknown_1169de
+ dw Unknown_116a1b
+ dw Unknown_116a58
+ dw Unknown_116a99
+ dw Unknown_116ad6
+ dw Unknown_116d1b
+ dw Unknown_116d4c
+ dw Unknown_116d85
+ dw Unknown_116dbe
+ dw Unknown_116df7
+ dw Unknown_116e30
+ dw Unknown_116e69
+ dw Unknown_116e9a
+ dw Unknown_116ed3
+ dw Unknown_116f0c
+ dw Unknown_116f45
+ dw Unknown_116f7e
+ dw Unknown_116b13
+ dw Unknown_116b54
+ dw Unknown_116b95
+ dw Unknown_116bd6
+ dw Unknown_116c17
+ dw Unknown_116c58
+ dw Unknown_116c99
+ dw Unknown_116cda
+ dw Unknown_116fb7
+ dw Unknown_116fec
+ dw Unknown_117025
+ dw Unknown_117056
+ dw Unknown_117083
+ dw Unknown_1170c0
+ dw Unknown_1170fd
+ dw Unknown_11713a
+ dw Unknown_117177
+ dw Unknown_11719c
+ dw Unknown_1171c1
+ dw Unknown_1171e6
+ dw Unknown_11720b
+ dw Unknown_117230
+ dw Unknown_117255
+ dw Unknown_11727a
+ dw Unknown_11729f
+ dw Unknown_1172c4
+ dw Unknown_1172e9
+
+Unknown_116923: ; 116923
+ db $f
+ db $0, $0, $1, $a
+ db $0, $8, $2, $d
+ db $0, $10, $3, $d
+ db $0, $18, $4, $d
+ db $8, $0, $11, $a
+ db $8, $8, $12, $a
+ db $8, $10, $13, $a
+ db $8, $18, $14, $d
+ db $10, $0, $21, $a
+ db $10, $8, $22, $a
+ db $10, $10, $23, $a
+ db $10, $18, $24, $a
+ db $18, $0, $31, $a
+ db $18, $8, $32, $a
+ db $18, $10, $33, $a
+
+Unknown_116960: ; 116960
+ db $10
+ db $1, $0, $1, $a
+ db $1, $8, $2, $d
+ db $1, $10, $3, $d
+ db $1, $18, $4, $d
+ db $9, $0, $11, $a
+ db $9, $8, $12, $a
+ db $9, $10, $13, $a
+ db $9, $18, $14, $d
+ db $11, $0, $5, $a
+ db $11, $8, $6, $a
+ db $11, $10, $7, $a
+ db $11, $18, $34, $a
+ db $19, $0, $15, $a
+ db $19, $8, $16, $a
+ db $19, $10, $17, $a
+ db $19, $18, $35, $a
+
+Unknown_1169a1: ; 1169a1
+ db $f
+ db $1, $0, $1, $a
+ db $1, $8, $2, $d
+ db $1, $10, $3, $d
+ db $1, $18, $4, $d
+ db $9, $0, $11, $a
+ db $9, $8, $12, $a
+ db $9, $10, $13, $a
+ db $9, $18, $14, $d
+ db $11, $0, $25, $a
+ db $11, $8, $26, $a
+ db $11, $10, $27, $a
+ db $11, $18, $34, $a
+ db $19, $8, $36, $a
+ db $19, $10, $37, $a
+ db $19, $18, $35, $a
+
+Unknown_1169de: ; 1169de
+ db $f
+ db $0, $0, $1, $a
+ db $0, $8, $2, $d
+ db $0, $10, $3, $d
+ db $0, $18, $4, $d
+ db $8, $0, $11, $a
+ db $8, $8, $12, $a
+ db $8, $10, $13, $a
+ db $8, $18, $14, $d
+ db $10, $0, $10, $a
+ db $10, $8, $20, $a
+ db $10, $10, $30, $a
+ db $10, $18, $24, $a
+ db $18, $0, $31, $a
+ db $18, $8, $32, $a
+ db $18, $10, $33, $a
+
+Unknown_116a1b: ; 116a1b
+ db $f
+ db $0, $0, $4, $2d
+ db $0, $8, $3, $2d
+ db $0, $10, $2, $2d
+ db $0, $18, $1, $2a
+ db $8, $0, $14, $2d
+ db $8, $8, $13, $2a
+ db $8, $10, $12, $2a
+ db $8, $18, $11, $2a
+ db $10, $0, $24, $2a
+ db $10, $8, $23, $2a
+ db $10, $10, $22, $2a
+ db $10, $18, $21, $2a
+ db $18, $8, $33, $2a
+ db $18, $10, $32, $2a
+ db $18, $18, $31, $2a
+
+Unknown_116a58: ; 116a58
+ db $10
+ db $1, $0, $4, $2d
+ db $1, $8, $3, $2d
+ db $1, $10, $2, $2d
+ db $1, $18, $1, $2a
+ db $9, $0, $14, $2d
+ db $9, $8, $13, $2a
+ db $9, $10, $12, $2a
+ db $9, $18, $11, $2a
+ db $11, $0, $34, $2a
+ db $11, $8, $7, $2a
+ db $11, $10, $6, $2a
+ db $11, $18, $5, $2a
+ db $19, $0, $35, $2a
+ db $19, $8, $17, $2a
+ db $19, $10, $16, $2a
+ db $19, $18, $15, $2a
+
+Unknown_116a99: ; 116a99
+ db $f
+ db $1, $0, $4, $2d
+ db $1, $8, $3, $2d
+ db $1, $10, $2, $2d
+ db $1, $18, $1, $2a
+ db $9, $0, $14, $2d
+ db $9, $8, $13, $2a
+ db $9, $10, $12, $2a
+ db $9, $18, $11, $2a
+ db $11, $0, $34, $2a
+ db $11, $8, $27, $2a
+ db $11, $10, $26, $2a
+ db $11, $18, $25, $2a
+ db $19, $0, $35, $2a
+ db $19, $8, $37, $2a
+ db $19, $10, $36, $2a
+
+Unknown_116ad6: ; 116ad6
+ db $f
+ db $0, $0, $4, $2d
+ db $0, $8, $3, $2d
+ db $0, $10, $2, $2d
+ db $0, $18, $1, $2a
+ db $8, $0, $14, $2d
+ db $8, $8, $13, $2a
+ db $8, $10, $12, $2a
+ db $8, $18, $11, $2a
+ db $10, $0, $24, $2a
+ db $10, $8, $30, $2a
+ db $10, $10, $20, $2a
+ db $10, $18, $10, $2a
+ db $18, $8, $33, $2a
+ db $18, $10, $32, $2a
+ db $18, $18, $31, $2a
+
+Unknown_116b13: ; 116b13
+ db $10
+ db $18, $0, $0, $b
+ db $18, $8, $8, $b
+ db $18, $10, $5c, $b
+ db $18, $18, $0, $b
+ db $10, $0, $0, $b
+ db $10, $8, $5d, $b
+ db $10, $10, $5e, $b
+ db $10, $18, $0, $b
+ db $8, $0, $50, $b
+ db $8, $8, $51, $b
+ db $8, $10, $52, $b
+ db $8, $18, $50, $2b
+ db $0, $0, $43, $b
+ db $0, $8, $44, $b
+ db $0, $10, $44, $2b
+ db $0, $18, $43, $2b
+
+Unknown_116b54: ; 116b54
+ db $10
+ db $19, $0, $0, $b
+ db $19, $8, $18, $b
+ db $19, $10, $c, $b
+ db $19, $18, $0, $b
+ db $11, $0, $42, $b
+ db $11, $8, $3a, $b
+ db $11, $10, $3a, $2b
+ db $11, $18, $42, $2b
+ db $9, $0, $58, $b
+ db $9, $8, $45, $b
+ db $9, $10, $45, $2b
+ db $9, $18, $58, $2b
+ db $1, $0, $d, $b
+ db $1, $8, $44, $b
+ db $1, $10, $44, $2b
+ db $1, $18, $d, $2b
+
+Unknown_116b95: ; 116b95
+ db $10
+ db $18, $0, $0, $b
+ db $18, $8, $5c, $2b
+ db $18, $10, $8, $2b
+ db $18, $18, $0, $b
+ db $10, $0, $0, $b
+ db $10, $8, $5e, $2b
+ db $10, $10, $5d, $2b
+ db $10, $18, $0, $b
+ db $8, $0, $50, $b
+ db $8, $8, $52, $2b
+ db $8, $10, $51, $2b
+ db $8, $18, $50, $2b
+ db $0, $0, $43, $b
+ db $0, $8, $44, $b
+ db $0, $10, $44, $2b
+ db $0, $18, $43, $2b
+
+Unknown_116bd6: ; 116bd6
+ db $10
+ db $18, $0, $0, $a
+ db $18, $8, $56, $a
+ db $18, $10, $57, $a
+ db $18, $18, $0, $a
+ db $10, $0, $64, $a
+ db $10, $8, $4a, $a
+ db $10, $10, $4b, $a
+ db $10, $18, $71, $a
+ db $8, $0, $54, $a
+ db $8, $8, $55, $a
+ db $8, $10, $55, $2a
+ db $8, $18, $54, $2a
+ db $0, $0, $48, $a
+ db $0, $8, $49, $a
+ db $0, $10, $49, $2a
+ db $0, $18, $48, $2a
+
+Unknown_116c17: ; 116c17
+ db $10
+ db $19, $0, $0, $a
+ db $19, $8, $76, $a
+ db $19, $10, $77, $a
+ db $19, $18, $0, $a
+ db $11, $0, $64, $a
+ db $11, $8, $69, $a
+ db $11, $10, $6a, $a
+ db $11, $18, $6b, $a
+ db $9, $0, $6f, $a
+ db $9, $8, $70, $a
+ db $9, $10, $70, $2a
+ db $9, $18, $6f, $2a
+ db $1, $0, $63, $a
+ db $1, $8, $19, $a
+ db $1, $10, $19, $2a
+ db $1, $18, $63, $2a
+
+Unknown_116c58: ; 116c58
+ db $10
+ db $1a, $0, $6c, $a
+ db $1a, $8, $6d, $a
+ db $1a, $10, $6e, $a
+ db $1a, $18, $0, $a
+ db $12, $0, $5f, $a
+ db $12, $8, $60, $a
+ db $12, $10, $61, $a
+ db $12, $18, $62, $a
+ db $a, $0, $53, $a
+ db $a, $8, $55, $a
+ db $a, $10, $55, $2a
+ db $a, $18, $53, $2a
+ db $2, $0, $46, $a
+ db $2, $8, $47, $a
+ db $2, $10, $47, $2a
+ db $2, $18, $46, $2a
+
+Unknown_116c99: ; 116c99
+ db $10
+ db $19, $0, $0, $2a
+ db $19, $8, $77, $2a
+ db $19, $10, $76, $2a
+ db $19, $18, $0, $2a
+ db $11, $0, $6b, $2a
+ db $11, $8, $6a, $2a
+ db $11, $10, $69, $2a
+ db $11, $18, $64, $2a
+ db $9, $0, $6f, $a
+ db $9, $8, $70, $a
+ db $9, $10, $70, $2a
+ db $9, $18, $6f, $2a
+ db $1, $0, $63, $a
+ db $1, $8, $19, $a
+ db $1, $10, $19, $2a
+ db $1, $18, $63, $2a
+
+Unknown_116cda: ; 116cda
+ db $10
+ db $18, $0, $0, $a
+ db $18, $8, $57, $2a
+ db $18, $10, $56, $2a
+ db $18, $18, $0, $a
+ db $10, $0, $71, $2a
+ db $10, $8, $4b, $2a
+ db $10, $10, $4a, $2a
+ db $10, $18, $64, $2a
+ db $8, $0, $54, $a
+ db $8, $8, $55, $a
+ db $8, $10, $55, $2a
+ db $8, $18, $54, $2a
+ db $0, $0, $48, $a
+ db $0, $8, $49, $a
+ db $0, $10, $49, $2a
+ db $0, $18, $48, $2a
+
+Unknown_116d1b: ; 116d1b
+ db $c
+ db $0, $0, $38, $4a
+ db $0, $8, $39, $4a
+ db $0, $10, $39, $6a
+ db $0, $18, $38, $6a
+ db $8, $0, $28, $4a
+ db $8, $8, $29, $4a
+ db $8, $10, $29, $6a
+ db $8, $18, $28, $6a
+ db $10, $0, $9, $4d
+ db $10, $8, $19, $4a
+ db $10, $10, $19, $6a
+ db $10, $18, $9, $6d
+
+Unknown_116d4c: ; 116d4c
+ db $e
+ db $0, $8, $3b, $4a
+ db $0, $10, $3b, $6a
+ db $8, $0, $2a, $4a
+ db $8, $8, $2b, $4a
+ db $8, $10, $2b, $6a
+ db $8, $18, $2a, $6a
+ db $10, $0, $1a, $4a
+ db $10, $8, $1b, $4a
+ db $10, $10, $1b, $6a
+ db $10, $18, $1a, $6a
+ db $18, $0, $a, $4a
+ db $18, $8, $b, $4a
+ db $18, $10, $b, $6a
+ db $18, $18, $a, $6a
+
+Unknown_116d85: ; 116d85
+ db $e
+ db $0, $0, $35, $2a
+ db $0, $8, $3c, $4a
+ db $0, $10, $3d, $4a
+ db $0, $18, $3e, $4a
+ db $8, $0, $2c, $4a
+ db $8, $8, $2d, $4a
+ db $8, $10, $2e, $4a
+ db $8, $18, $2f, $4a
+ db $10, $0, $1c, $4a
+ db $10, $8, $1d, $4a
+ db $10, $10, $1e, $4d
+ db $10, $18, $1f, $4d
+ db $18, $10, $e, $4d
+ db $18, $18, $f, $4a
+
+Unknown_116dbe: ; 116dbe
+ db $e
+ db $0, $0, $65, $4a
+ db $0, $8, $66, $4a
+ db $0, $10, $67, $4a
+ db $0, $18, $68, $4a
+ db $8, $8, $59, $4a
+ db $8, $10, $5a, $4a
+ db $8, $18, $5b, $4a
+ db $10, $0, $4c, $4a
+ db $10, $8, $4d, $4d
+ db $10, $10, $4e, $4d
+ db $10, $18, $4f, $4a
+ db $18, $0, $3f, $4d
+ db $18, $8, $40, $4d
+ db $18, $10, $41, $4d
+
+Unknown_116df7: ; 116df7
+ db $e
+ db $0, $0, $3e, $6a
+ db $0, $8, $3d, $6a
+ db $0, $10, $3c, $6a
+ db $0, $18, $35, $a
+ db $8, $0, $2f, $6a
+ db $8, $8, $2e, $6a
+ db $8, $10, $2d, $6a
+ db $8, $18, $2c, $6a
+ db $10, $0, $1f, $6d
+ db $10, $8, $1e, $6d
+ db $10, $10, $1d, $6a
+ db $10, $18, $1c, $6a
+ db $18, $0, $f, $6a
+ db $18, $8, $e, $6d
+
+Unknown_116e30: ; 116e30
+ db $e
+ db $0, $0, $68, $6a
+ db $0, $8, $67, $6a
+ db $0, $10, $66, $6a
+ db $0, $18, $65, $6a
+ db $8, $0, $5b, $6a
+ db $8, $8, $5a, $6a
+ db $8, $10, $59, $6a
+ db $10, $0, $4f, $6a
+ db $10, $8, $4e, $6d
+ db $10, $10, $4d, $6d
+ db $10, $18, $4c, $6a
+ db $18, $8, $41, $6d
+ db $18, $10, $40, $6d
+ db $18, $18, $3f, $6d
+
+Unknown_116e69: ; 116e69
+ db $c
+ db $8, $0, $9, $d
+ db $8, $8, $19, $a
+ db $8, $10, $19, $2a
+ db $8, $18, $9, $2d
+ db $10, $0, $28, $a
+ db $10, $8, $29, $a
+ db $10, $10, $29, $2a
+ db $10, $18, $28, $2a
+ db $18, $0, $38, $a
+ db $18, $8, $39, $a
+ db $18, $10, $39, $2a
+ db $18, $18, $38, $2a
+
+Unknown_116e9a: ; 116e9a
+ db $e
+ db $0, $0, $a, $a
+ db $0, $8, $b, $a
+ db $0, $10, $b, $2a
+ db $0, $18, $a, $2a
+ db $8, $0, $1a, $a
+ db $8, $8, $1b, $a
+ db $8, $10, $1b, $2a
+ db $8, $18, $1a, $2a
+ db $10, $0, $2a, $a
+ db $10, $8, $2b, $a
+ db $10, $10, $2b, $2a
+ db $10, $18, $2a, $2a
+ db $18, $8, $3b, $a
+ db $18, $10, $3b, $2a
+
+Unknown_116ed3: ; 116ed3
+ db $e
+ db $0, $10, $e, $d
+ db $0, $18, $f, $a
+ db $8, $0, $1c, $a
+ db $8, $8, $1d, $a
+ db $8, $10, $1e, $d
+ db $8, $18, $1f, $d
+ db $10, $0, $2c, $a
+ db $10, $8, $2d, $a
+ db $10, $10, $2e, $a
+ db $10, $18, $2f, $a
+ db $18, $0, $35, $6a
+ db $18, $8, $3c, $a
+ db $18, $10, $3d, $a
+ db $18, $18, $3e, $a
+
+Unknown_116f0c: ; 116f0c
+ db $e
+ db $0, $0, $3f, $d
+ db $0, $8, $40, $d
+ db $0, $10, $41, $d
+ db $8, $0, $4c, $a
+ db $8, $8, $4d, $d
+ db $8, $10, $4e, $d
+ db $8, $18, $4f, $a
+ db $10, $8, $59, $a
+ db $10, $10, $5a, $a
+ db $10, $18, $5b, $a
+ db $18, $0, $65, $a
+ db $18, $8, $66, $a
+ db $18, $10, $67, $a
+ db $18, $18, $68, $a
+
+Unknown_116f45: ; 116f45
+ db $e
+ db $0, $0, $f, $2a
+ db $0, $8, $e, $2d
+ db $8, $0, $1f, $2d
+ db $8, $8, $1e, $2d
+ db $8, $10, $1d, $2a
+ db $8, $18, $1c, $2a
+ db $10, $0, $2f, $2a
+ db $10, $8, $2e, $2a
+ db $10, $10, $2d, $2a
+ db $10, $18, $2c, $2a
+ db $18, $0, $3e, $2a
+ db $18, $8, $3d, $2a
+ db $18, $10, $3c, $2a
+ db $18, $18, $35, $4a
+
+Unknown_116f7e: ; 116f7e
+ db $e
+ db $0, $8, $41, $2d
+ db $0, $10, $40, $2d
+ db $0, $18, $3f, $2d
+ db $8, $0, $4f, $2a
+ db $8, $8, $4e, $2d
+ db $8, $10, $4d, $2d
+ db $8, $18, $4c, $2a
+ db $10, $0, $5b, $2a
+ db $10, $8, $5a, $2a
+ db $10, $10, $59, $2a
+ db $18, $0, $68, $2a
+ db $18, $8, $67, $2a
+ db $18, $10, $66, $2a
+ db $18, $18, $65, $2a
+
+Unknown_116fb7: ; 116fb7
+ db $d
+ db $fa, $0, $72, $a
+ db $fa, $8, $73, $d
+ db $fa, $10, $74, $d
+ db $fa, $18, $75, $d
+ db $2, $0, $81, $a
+ db $2, $8, $82, $a
+ db $2, $10, $83, $a
+ db $2, $18, $84, $a
+ db $a, $0, $91, $a
+ db $a, $8, $92, $a
+ db $a, $10, $93, $a
+ db $a, $18, $94, $a
+ db $12, $10, $a3, $a
+
+Unknown_116fec: ; 116fec
+ db $e
+ db $fd, $0, $85, $d
+ db $fd, $8, $86, $d
+ db $5, $0, $95, $d
+ db $5, $8, $96, $a
+ db $5, $10, $97, $a
+ db $5, $18, $98, $a
+ db $d, $0, $a5, $a
+ db $d, $8, $a6, $a
+ db $d, $10, $a7, $a
+ db $d, $18, $a8, $a
+ db $15, $0, $b3, $a
+ db $15, $8, $b4, $a
+ db $15, $10, $b5, $a
+ db $15, $18, $b6, $a
+
+Unknown_117025: ; 117025
+ db $c
+ db $8, $0, $79, $d
+ db $8, $8, $7a, $d
+ db $8, $10, $7b, $a
+ db $8, $18, $7c, $a
+ db $10, $0, $89, $d
+ db $10, $8, $8a, $a
+ db $10, $10, $8b, $a
+ db $10, $18, $8c, $a
+ db $18, $0, $99, $a
+ db $18, $8, $9a, $a
+ db $18, $10, $9b, $a
+ db $18, $18, $9c, $a
+
+Unknown_117056: ; 117056
+ db $b
+ db $8, $0, $7d, $a
+ db $8, $8, $7e, $d
+ db $8, $10, $7f, $d
+ db $8, $18, $80, $a
+ db $10, $0, $8d, $a
+ db $10, $8, $8e, $a
+ db $10, $10, $8f, $a
+ db $10, $18, $90, $a
+ db $18, $8, $9e, $a
+ db $18, $10, $9f, $a
+ db $18, $18, $a0, $a
+
+Unknown_117083: ; 117083
+ db $f
+ db $0, $0, $a1, $a
+ db $0, $8, $a2, $a
+ db $0, $10, $a2, $2a
+ db $0, $18, $a1, $2a
+ db $8, $0, $b1, $a
+ db $8, $8, $b2, $d
+ db $8, $10, $b2, $2d
+ db $8, $18, $b1, $2a
+ db $10, $0, $ab, $a
+ db $10, $8, $ac, $a
+ db $10, $10, $ac, $2a
+ db $10, $18, $ab, $2a
+ db $18, $8, $a4, $a
+ db $18, $10, $87, $a
+ db $18, $18, $88, $a
+
+Unknown_1170c0: ; 1170c0
+ db $f
+ db $0, $0, $a1, $a
+ db $0, $8, $a2, $d
+ db $0, $10, $a2, $2a
+ db $0, $18, $a1, $2a
+ db $8, $0, $b1, $a
+ db $8, $8, $78, $d
+ db $8, $10, $78, $2d
+ db $8, $18, $b1, $2a
+ db $10, $0, $ab, $a
+ db $10, $8, $ac, $a
+ db $10, $10, $ac, $2a
+ db $10, $18, $ab, $2a
+ db $18, $8, $a4, $a
+ db $18, $10, $87, $a
+ db $18, $18, $88, $a
+
+Unknown_1170fd: ; 1170fd
+ db $f
+ db $0, $0, $a9, $a
+ db $0, $8, $aa, $a
+ db $0, $10, $aa, $2a
+ db $0, $18, $a9, $2a
+ db $8, $0, $b7, $a
+ db $8, $8, $b8, $a
+ db $8, $10, $b8, $2a
+ db $8, $18, $b7, $2a
+ db $10, $0, $ab, $a
+ db $10, $8, $ac, $a
+ db $10, $10, $ac, $2a
+ db $10, $18, $ad, $a
+ db $18, $8, $a4, $a
+ db $18, $10, $ba, $a
+ db $18, $18, $bb, $a
+
+Unknown_11713a: ; 11713a
+ db $f
+ db $0, $0, $ae, $c
+ db $0, $8, $af, $c
+ db $0, $10, $af, $2c
+ db $0, $18, $ae, $2c
+ db $8, $0, $bc, $c
+ db $8, $8, $bd, $c
+ db $8, $10, $bd, $2c
+ db $8, $18, $bc, $2c
+ db $10, $0, $bf, $c
+ db $10, $8, $9d, $c
+ db $10, $10, $9d, $2c
+ db $10, $18, $b0, $c
+ db $18, $8, $b9, $c
+ db $18, $10, $c0, $c
+ db $18, $18, $be, $c
+
+Unknown_117177: ; 117177
+ db $9
+ db $14, $0, $1f, $6
+ db $14, $8, $20, $6
+ db $14, $10, $21, $6
+ db $c, $0, $10, $6
+ db $c, $8, $11, $6
+ db $c, $10, $12, $6
+ db $4, $0, $1, $6
+ db $4, $8, $2, $6
+ db $4, $10, $3, $6
+
+Unknown_11719c: ; 11719c
+ db $9
+ db $14, $0, $22, $6
+ db $14, $8, $23, $6
+ db $14, $10, $24, $6
+ db $c, $0, $13, $6
+ db $c, $8, $14, $6
+ db $c, $10, $15, $6
+ db $4, $0, $4, $6
+ db $4, $8, $5, $6
+ db $4, $10, $6, $6
+
+Unknown_1171c1: ; 1171c1
+ db $9
+ db $14, $0, $25, $6
+ db $14, $8, $26, $6
+ db $14, $10, $27, $6
+ db $c, $0, $16, $6
+ db $c, $8, $17, $6
+ db $c, $10, $18, $6
+ db $4, $0, $7, $6
+ db $4, $8, $8, $6
+ db $4, $10, $9, $6
+
+Unknown_1171e6: ; 1171e6
+ db $9
+ db $14, $0, $28, $6
+ db $14, $8, $29, $6
+ db $14, $10, $2a, $6
+ db $c, $0, $19, $6
+ db $c, $8, $1a, $6
+ db $c, $10, $1b, $6
+ db $4, $0, $a, $6
+ db $4, $8, $b, $6
+ db $4, $10, $c, $6
+
+Unknown_11720b: ; 11720b
+ db $9
+ db $14, $0, $2b, $6
+ db $14, $8, $2c, $6
+ db $14, $10, $2d, $6
+ db $c, $0, $1c, $6
+ db $c, $8, $1d, $6
+ db $c, $10, $1e, $6
+ db $4, $0, $d, $6
+ db $4, $8, $e, $6
+ db $4, $10, $f, $6
+
+Unknown_117230: ; 117230
+ db $9
+ db $14, $0, $47, $6
+ db $14, $8, $48, $6
+ db $14, $10, $49, $6
+ db $c, $0, $3b, $6
+ db $c, $8, $3c, $6
+ db $c, $10, $3b, $26
+ db $4, $0, $2e, $6
+ db $4, $8, $2f, $6
+ db $4, $10, $30, $6
+
+Unknown_117255: ; 117255
+ db $9
+ db $14, $0, $35, $6
+ db $14, $8, $4a, $6
+ db $14, $10, $35, $6
+ db $c, $0, $3d, $6
+ db $c, $8, $35, $6
+ db $c, $10, $3d, $26
+ db $4, $0, $31, $6
+ db $4, $8, $32, $6
+ db $4, $10, $31, $26
+
+Unknown_11727a: ; 11727a
+ db $9
+ db $14, $0, $4b, $6
+ db $14, $8, $4c, $6
+ db $14, $10, $4d, $6
+ db $c, $0, $3e, $6
+ db $c, $8, $3f, $6
+ db $c, $10, $40, $6
+ db $4, $0, $33, $6
+ db $4, $8, $34, $6
+ db $4, $10, $35, $6
+
+Unknown_11729f: ; 11729f
+ db $9
+ db $14, $0, $4e, $6
+ db $14, $8, $4f, $6
+ db $14, $10, $50, $6
+ db $c, $0, $41, $6
+ db $c, $8, $42, $6
+ db $c, $10, $43, $6
+ db $4, $0, $35, $6
+ db $4, $8, $36, $6
+ db $4, $10, $37, $6
+
+Unknown_1172c4: ; 1172c4
+ db $9
+ db $14, $0, $51, $6
+ db $14, $8, $52, $6
+ db $14, $10, $35, $6
+ db $c, $0, $44, $6
+ db $c, $8, $45, $6
+ db $c, $10, $46, $6
+ db $4, $0, $38, $6
+ db $4, $8, $39, $6
+ db $4, $10, $3a, $6
+
+Unknown_1172e9: ; 1172e9
+ db $9
+ db $10, $0, $0, $2
+ db $10, $8, $0, $2
+ db $10, $10, $0, $2
+ db $8, $0, $0, $2
+ db $8, $8, $0, $2
+ db $c, $10, $1f, $6
+ db $0, $0, $0, $2
+ db $0, $8, $0, $2
+ db $4, $10, $10, $6
+; 11730e
+
+Palette_11730e:
+ RGB 31, 31, 31
+ RGB 7, 5, 4
+ RGB 31, 28, 4
+ RGB 31, 5, 5
+ RGB 31, 31, 31
+ RGB 7, 5, 4
+ RGB 31, 23, 0
+ RGB 31, 28, 4
+ RGB 31, 31, 31
+ RGB 16, 19, 31
+ RGB 17, 31, 31
+ RGB 31, 31, 31
+ RGB 5, 5, 5
+ RGB 7, 5, 4
+ RGB 31, 28, 4
+ RGB 19, 11, 6
+ RGB 31, 31, 31
+ RGB 3, 15, 31
+ RGB 4, 25, 25
+ RGB 0, 7, 12
+ RGB 31, 31, 31
+ RGB 0, 16, 0
+ RGB 0, 16, 0
+ RGB 0, 16, 0
+ RGB 4, 11, 22
+ RGB 0, 16, 0
+ RGB 0, 16, 0
+ RGB 0, 16, 0
+ RGB 22, 11, 8
+ RGB 0, 16, 0
+ RGB 0, 16, 0
+ RGB 0, 16, 0
+
+Palette_11734e:
+ RGB 31, 30, 30
+ RGB 2, 0, 0
+ RGB 10, 9, 9
+ RGB 15, 14, 14
+
+Unknown_117356: ; 117356
+ db $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9
+ db $c9, $c9, $c9, $c9, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
+ db $c5, $c6, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
+ db $c2, $c2, $c6, $c5, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
+ db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
+ db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
+ db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
+ db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
+ db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
+ db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
+ db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
+ db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
+ db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
+ db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
+ db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
+ db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
+ db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2
+ db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
+ db $c3, $c4, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $d8, $c2, $c2, $d8, $c2, $c2, $c2
+ db $c2, $c2, $c4, $c3, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
+ db $c7, $c8, $ca, $cb, $cc, $cd, $ce, $c2, $cf, $d0, $d1, $d2, $d3, $c2, $d4, $d5
+ db $d6, $d7, $c8, $c7, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
+ db $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9
+ db $c9, $c9, $c9, $c9, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1
+
+ db $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f
+ db $8f, $8f, $8f, $8f, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
+ db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
+ db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
+ db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
+ db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
+ db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
+ db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
+ db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
+ db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
+ db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
+ db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
+ db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
+ db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
+ db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
+ db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
+ db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $0f
+ db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
+ db $8f, $8f, $0f, $0f, $0f, $0f, $0f, $0f, $0f, $8f, $0f, $0f, $8f, $0f, $0f, $0f
+ db $0f, $0f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
+ db $8f, $8f, $8f, $8f, $8f, $8f, $8f, $0f, $8f, $8f, $8f, $8f, $8f, $0f, $8f, $8f
+ db $8f, $8f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
+ db $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f
+ db $8f, $8f, $8f, $8f, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08
+; 117656
+
+
+SECTION "Mobile Stadium", ROMX
+
+Special_GiveOddEgg: ; 117656
+ farcall GiveOddEgg
+ ret
+
+; 11765d
+
+Function11765d: ; 11765d (45:765d)
+ ld a, [hInMenu]
+ push af
+ ld a, $1
+ ld [hInMenu], a
+ call Function11766b
+ pop af
+ ld [hInMenu], a
+ ret
+
+Function11766b: ; 11766b (45:766b)
+ call Function117699
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ call Function1176ee
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $b1f3
+ ld de, wcd49
+ ld bc, $8
+ call CopyBytes
+ ld de, $c708
+ ld bc, $11
+ call CopyBytes
+ call CloseSRAM
+ pop af
+ ld [rSVBK], a
+ ret
+
+Function117699: ; 117699 (45:7699)
+ ld a, $5
+ call GetSRAMBank
+ ld hl, wcd49
+ ld de, $b1f3
+ ld bc, $8
+ call CopyBytes
+ ld hl, $c708
+ ld bc, $11
+ call CopyBytes
+ call CloseSRAM
+ xor a
+ ld [wcd49], a
+ ld [wcd4a], a
+ ld [wcd4b], a
+ ld [wcd4c], a
+ ld [wcd4d], a
+ ld [wcd4e], a
+ ld [wcd4f], a
+ ld hl, $c708
+ ld bc, $11
+ call ByteFill
+ call ClearBGPalettes
+ call ClearSprites
+ farcall Function171c87
+ farcall ReloadMapPart
+ farcall ClearSpriteAnims
+ ret
+
+Function1176ee: ; 1176ee (45:76ee)
+.loop
+ call JoyTextDelay
+ ld a, [wcd49]
+ bit 7, a
+ jr nz, .quit
+ call Function117719
+ farcall PlaySpriteAnimations
+ farcall ReloadMapPart
+ jr .loop
+
+.quit
+ farcall ClearSpriteAnims
+ call ClearBGPalettes
+ call ClearScreen
+ call ClearSprites
+ ret
+
+Function117719: ; 117719 (45:7719)
+ ld a, [wcd49]
+ ld e, a
+ ld d, 0
+ ld hl, Jumptable_117728
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+Jumptable_117728: ; 117728 (45:7728)
+ dw Function117738
+ dw Function117764
+ dw Function1178aa
+ dw Function1178e8
+ dw Function117942
+ dw Function117976
+ dw Function117984
+ dw Function1179a7
+
+
+Function117738: ; 117738 (45:7738)
+ farcall Function171ccd
+ depixel 6, 3
+ ld a, $1d
+ call _InitSpriteAnimStruct
+ ld hl, $c
+ add hl, bc
+ ld a, $6
+ ld [hl], a
+ depixel 9, 4
+ ld a, $1d
+ call _InitSpriteAnimStruct
+ ld hl, $c
+ add hl, bc
+ ld a, $7
+ ld [hl], a
+ ld a, $3
+ ld [wcd23], a
+ jp MobilePassword_IncrementJumptable
+
+Function117764: ; 117764 (45:7764)
+ ld a, [wcd4a]
+ cp $10
+ jr nz, .asm_11776f
+ ld a, $1
+ jr .asm_117770
+
+.asm_11776f
+ xor a
+.asm_117770
+ ld [wcd24], a
+ ld hl, hJoyPressed ; $ffa7
+ ld a, [hl]
+ and SELECT
+ jr nz, Function117764_select
+ ld a, [hl]
+ and START
+ jr nz, Function117764_start
+ ld a, [hl]
+ and A_BUTTON
+ jp nz, Function117764_a_button
+ ld a, [hl]
+ and B_BUTTON
+ jr nz, Function117764_b_button
+ ld hl, hJoyLast
+ ld a, [hl]
+ and D_UP
+ jr nz, Function117764_d_up
+ ld a, [hl]
+ and D_DOWN
+ jr nz, Function117764_d_down
+ ld a, [hl]
+ and D_LEFT
+ jp nz, Function117764_d_left
+ ld a, [hl]
+ and D_RIGHT
+ jp nz, Function117764_d_right
+ ret
+
+Function117764_select: ; 1177a5 (45:77a5)
+ farcall Function171cf0
+ ret
+
+Function117764_start: ; 1177ac (45:77ac)
+ ld a, $2
+ ld [wcd4c], a
+ ld a, $4
+ ld [wcd4d], a
+ ret
+
+Function1177b7: ; 1177b7 (45:77b7)
+ ld a, $3
+ ld [wcd24], a
+ ld a, [wcd4a]
+ and a
+ jr z, .asm_1177c5
+ jp MobilePassword_IncrementJumptable
+
+.asm_1177c5
+ ld a, $6
+ ld [wcd49], a
+ ret
+
+Function1177cb: ; 1177cb (45:77cb)
+ ld a, $80
+ ld [wcd49], a
+ ld [ScriptVar], a
+ jp MobilePassword_IncrementJumptable
+
+Function117764_b_button: ; 1177d6 (45:77d6)
+ call PlayClickSFX
+ ld a, [wcd4a]
+ and a
+ ret z
+ dec a
+ ld [wcd4a], a
+ ld e, a
+ ld d, $0
+ ld hl, $c708
+ add hl, de
+ xor a
+ ld [hl], a
+ hlcoord 2, 4
+ add hl, de
+ ld [hl], a
+ ret
+
+Function117764_d_up: ; 1177f1 (45:77f1)
+ ld a, [wcd4d]
+ and a
+ ret z
+ dec a
+ ld [wcd4d], a
+ cp $3
+ ret nz
+ ld a, [wcd4c]
+ ld e, a
+ sla a
+ sla a
+ add e
+Function117764_d_vertical_load: ; 117806 (45:7806)
+ ld [wcd4c], a
+ ret
+
+Function117764_d_down: ; 11780a (45:780a)
+ ld a, [wcd4d]
+ cp $4
+ ret z
+ inc a
+ ld [wcd4d], a
+ cp $4
+ ret nz
+ ld a, [wcd4c]
+ cp $a
+ jr nc, .asm_117825
+ cp $5
+ jr nc, .asm_117829
+ xor a
+ jr Function117764_d_vertical_load
+
+.asm_117825
+ ld a, $2
+ jr Function117764_d_vertical_load
+
+.asm_117829
+ ld a, $1
+ jr Function117764_d_vertical_load
+
+Function117764_d_left: ; 11782d (45:782d)
+ ld a, [wcd4c]
+ and a
+ ret z
+ dec a
+ ld [wcd4c], a
+ ret
+
+Function117764_d_right: ; 117837 (45:7837)
+ ld e, $d
+ ld a, [wcd4d]
+ cp $4
+ jr nz, .wrap
+ ld e, $2
+.wrap
+ ld a, [wcd4c]
+ cp e
+ ret z
+ inc a
+ ld [wcd4c], a
+ ret
+
+Function117764_a_button: ; 11784c (45:784c)
+ call PlayClickSFX
+ ld a, [wcd4d]
+ cp $4
+ jr nz, .not_4
+ ld a, [wcd4c]
+ cp $2
+ jp z, Function1177b7
+ cp $1
+ jp z, Function1177cb
+ jp Function117764_select
+
+.not_4
+ ld a, [wcd4a]
+ ld e, a
+ cp $10
+ jp z, Function117764_start
+ inc a
+ ld [wcd4a], a
+ ld d, $0
+ ld a, [wcd4b]
+ and a
+ jr nz, .ascii_symbols
+ ld hl, Unknown_117a0f
+ jr .got_ascii
+
+.ascii_symbols
+ ld hl, Unknown_117a47
+.got_ascii
+ push de
+ ld a, [wcd4c]
+ ld b, a
+ ld a, [wcd4d]
+ ld c, $e
+ call SimpleMultiply
+ add b
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hl]
+ ld hl, $c708
+ add hl, de
+ ld [hl], a
+ pop de
+ hlcoord 2, 4
+ add hl, de
+ sub $20
+ ld [hl], a
+ ld a, e
+ cp $f
+ ret nz
+ jp Function117764_start
+
+Function1178aa: ; 1178aa (45:78aa)
+ ld hl, MenuDataHeader_1179b5
+ call LoadMenuDataHeader
+ call MenuBox
+ call MenuBoxCoord2Tile
+ ld hl, MenuDataHeader_1179bd
+ call LoadMenuDataHeader
+ call MenuBox
+ call MenuBoxCoord2Tile
+ farcall ReloadMapPart
+ hlcoord 16, 8
+ ld de, YessNoString_1179c5
+ call PlaceString
+ hlcoord 15, 10
+ ld a, "▶"
+ ld [hl], a
+ hlcoord 1, 14
+ ld de, AskSavePasswordString
+ call PlaceString
+ ld a, $1
+ ld [wcd4e], a
+ jp MobilePassword_IncrementJumptable
+
+Function1178e8: ; 1178e8 (45:78e8)
+ ld a, [hJoyPressed]
+ cp B_BUTTON
+ jr z, .b_button
+ cp A_BUTTON
+ jr z, .a_button
+ cp D_DOWN
+ jr z, .d_down
+ cp D_UP
+ ret nz
+ ld a, [wcd4e]
+ and a
+ ret z
+ dec a
+ ld [wcd4e], a
+ hlcoord 15, 8
+ ld a, "▶"
+ ld [hl], a
+ hlcoord 15, 10
+ ld a, " "
+ ld [hl], a
+ ret
+
+.d_down
+ ld a, [wcd4e]
+ and a
+ ret nz
+ inc a
+ ld [wcd4e], a
+ hlcoord 15, 8
+ ld a, " "
+ ld [hl], a
+ hlcoord 15, 10
+ ld a, "▶"
+ ld [hl], a
+ ret
+
+.a_button
+ call PlayClickSFX
+ ld a, [wcd4e]
+ and a
+ jr nz, .b_button
+ call ExitMenu
+ ld a, $1
+ ld [wcd4f], a
+ jp MobilePassword_IncrementJumptable
+
+.b_button
+ call ExitMenu
+ call ExitMenu
+ jp MobilePassword_IncrementJumptable
+
+Function117942: ; 117942 (45:7942)
+ call SpeechTextBox
+ hlcoord 1, 14
+ ld de, SavedPasswordString
+ call PlaceString
+ ld a, $1e
+ ld [wcd4e], a
+ ld a, BANK(sMobileLoginPassword)
+ call GetSRAMBank
+ ld a, [wcd4f]
+ ld [sMobileLoginPassword], a
+ ld hl, $c708
+ ld de, sMobileLoginPassword + 1
+ ld bc, MOBILE_LOGIN_PASSWORD_LENGTH
+ call CopyBytes
+ call CloseSRAM
+ ld a, [wcd4f]
+ and a
+ jr z, asm_11797e
+ call MobilePassword_IncrementJumptable
+
+Function117976: ; 117976 (45:7976)
+ ld hl, wcd4e
+ dec [hl]
+ ret nz
+ call ExitMenu
+asm_11797e: ; 11797e (45:797e)
+ ld a, $80
+ ld [wcd49], a
+ ret
+
+Function117984: ; 117984 (45:7984)
+ ld hl, MenuDataHeader_1179b5
+ call LoadMenuDataHeader
+ call MenuBox
+ call MenuBoxCoord2Tile
+ farcall ReloadMapPart
+ hlcoord 1, 14
+ ld de, NotAPokemonPasswordString
+ call PlaceString
+ ld a, $1e
+ ld [wcd4e], a
+ call MobilePassword_IncrementJumptable
+
+Function1179a7: ; 1179a7 (45:79a7)
+ ld hl, wcd4e
+ dec [hl]
+ ret nz
+ call ExitMenu
+ ld a, $1
+ ld [wcd49], a
+ ret
+
+; 1179b5 (45:79b5)
+
+MenuDataHeader_1179b5: ; 1179b5
+ db $40 ; flags
+ db 12, 0 ; start coords
+ db 17, 19 ; end coords
+ dw NULL
+ db 0 ; default option
+; 1179bd
+
+MenuDataHeader_1179bd: ; 1179bd
+ db $40 ; flags
+ db 7, 14 ; start coords
+ db 11, 19 ; end coords
+ dw NULL
+ db 0 ; default option
+; 1179c5
+
+
+YessNoString_1179c5: ; 1179c5
+ db "はい"
+ next "いいえ@"
+; 1179cc
+
+AskSavePasswordString: ; 1179cc
+ db "こ%パスワード¯ほぞんして"
+ line "おきますか?@"
+; 1179e1
+
+NotAPokemonPasswordString: ; 1179e1
+ db "パスワード<PKMN>にゅうりょく"
+ line "されていません!@"
+; 1179f7
+
+SavedPasswordString: ; 1179f7
+ db "ログインパスワード¯ほぞん"
+ line "しました@"
+; 117a0a
+
+MobilePassword_IncrementJumptable: ; 117a0a (45:7a0a)
+ ld hl, wcd49
+ inc [hl]
+ ret
+
+; 117a0f (45:7a0f)
+
+Unknown_117a0f:
+INCBIN "data/mobile/ascii-alpha.txt"
+
+Unknown_117a47:
+INCBIN "data/mobile/ascii-sym.txt"
+; 117a7f
+
+
+; everything from here to the end of the bank is related to the
+; Mobile Stadium option from the continue/newgame menu.
+; XXX better function names
+MobileStudium: ; 0x117a7f
+ ld a, [hInMenu]
+ push af
+ ld a, $1
+ ld [hInMenu], a
+ call Function117a8d
+ pop af
+ ld [hInMenu], a
+ ret
+
+; 0x117a8d
+
+Function117a8d: ; 0x117a8d
+ call Function117a94
+ call Function117acd
+ ret
+
+; 0x117a94
+
+Function117a94: ; 0x117a94
+ xor a
+ ld [wJumptableIndex], a
+ ld [wcf64], a
+ ld [wcf65], a
+ ld [wcf66], a
+ call ClearBGPalettes
+ call ClearSprites
+ farcall Function172e78
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
+ ret
+
+; 0x117ab4
+
+Function117ab4: ; 0x117ab4
+ call ClearBGPalettes
+ call ClearSprites
+ farcall Function172e78
+ farcall Function172eb9
+ farcall ReloadMapPart
+ ret
+
+; 0x117acd
+
+Function117acd: ; 0x117acd
+ call JoyTextDelay
+ ld a, [wJumptableIndex]
+ bit 7, a
+ jr nz, .asm_117ae2
+ call Function117ae9
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
+ jr Function117acd
+
+.asm_117ae2
+ call ClearBGPalettes
+ call ClearSprites
+ ret
+
+Function117ae9: ; 0x117ae9
+ ld a, [wJumptableIndex]
+ ld e, a
+ ld d, $0
+ ld hl, .Jumptable
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+.Jumptable: ; 0x117af8
+ dw Function117b06
+ dw Function117b14
+ dw Function117b28
+ dw Function117b31
+ dw Function117b4f
+ dw Function117bb6
+ dw Function117c4a
+
+Function117b06:
+ farcall Function172eb9
+ ld a, $10
+ ld [wcf64], a
+ jp MobileStudium_JumptableIncrement
+
+Function117b14:
+ ld hl, wcf64
+ dec [hl]
+ ret nz
+ ld hl, MenuDataHeader_117cbc
+ call LoadMenuDataHeader
+ call MenuBox
+ call MenuBoxCoord2Tile
+ jp MobileStudium_JumptableIncrement
+
+Function117b28:
+ ld hl, MobileStadiumEntryText
+ call PrintText
+ jp MobileStudium_JumptableIncrement
+
+Function117b31:
+ ld hl, MenuDataHeader_117cc4
+ call LoadMenuDataHeader
+ call MenuBox
+ call MenuBoxCoord2Tile
+ hlcoord 16, 8
+ ld de, YesNo117ccc
+ call PlaceString
+ hlcoord 15, 8
+ ld a, "▶"
+ ld [hl], a
+ jp MobileStudium_JumptableIncrement
+
+Function117b4f:
+ ld a, [hJoyPressed]
+ cp B_BUTTON
+ jr z, .b_button
+ cp A_BUTTON
+ jr z, .a_button
+ cp D_DOWN
+ jr z, .d_down
+ cp D_UP
+ ret nz
+ ld a, [wcf64]
+ and a
+ ret z
+ dec a
+ ld [wcf64], a
+ hlcoord 15, 8
+ ld a, "▶"
+ ld [hl], a
+ hlcoord 15, 10
+ ld a, " "
+ ld [hl], a
+ ret
+
+.d_down
+ ld a, [wcf64]
+ and a
+ ret nz
+ inc a
+ ld [wcf64], a
+ hlcoord 15, 8
+ ld a, " "
+ ld [hl], a
+ hlcoord 15, 10
+ ld a, "▶"
+ ld [hl], a
+ ret
+
+.a_button
+ call PlayClickSFX
+ ld a, [wcf64]
+ and a
+ jr nz, .b_button
+ call ExitMenu
+ call ExitMenu
+ farcall ReloadMapPart
+ jp MobileStudium_JumptableIncrement
+
+.b_button
+ call ExitMenu
+ call ExitMenu
+ farcall ReloadMapPart
+ ld a, $80
+ ld [wJumptableIndex], a
+ ret
+
+Function117bb6:
+ call Function117c89
+ ld a, $1
+ ld [hBGMapMode], a
+ farcall Function118284
+ call ClearSprites
+ ld a, [wc300]
+ and a
+ jr z, .asm_117be7
+ cp $a
+ jr z, .asm_117be1
+.asm_117bd0
+ ld a, $2
+ ld [wc303], a
+ farcall DisplayMobileError
+ ld a, $80
+ ld [wJumptableIndex], a
+ ret
+
+.asm_117be1
+ ld a, $80
+ ld [wJumptableIndex], a
+ ret
+
+.asm_117be7
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+ ld a, [wcd89]
+ and $1
+ jr nz, .asm_117c16
+ ld a, [w3_d000]
+ cp $fe
+ jr nz, .asm_117c16
+ ld a, [w3_d001]
+ cp $f
+ jr nz, .asm_117c16
+ ld hl, w3_dfec
+ ld de, wcd69
+ ld c, $10
+.asm_117c0b
+ ld a, [de]
+ inc de
+ cp [hl]
+ jr nz, .asm_117c16
+ inc hl
+ dec c
+ jr nz, .asm_117c0b
+ jr .asm_117c20
+
+.asm_117c16
+ pop af
+ ld [rSVBK], a
+ ld a, $d3
+ ld [wc300], a
+ jr .asm_117bd0
+
+.asm_117c20
+ pop af
+ ld [rSVBK], a
+ farcall Function172eb9
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+ ld a, $7
+ call GetSRAMBank
+ ld hl, w3_d002
+ ld de, $b000
+ ld bc, $1000
+ call CopyBytes
+ call CloseSRAM
+ pop af
+ ld [rSVBK], a
+ jp MobileStudium_JumptableIncrement
+
+Function117c4a:
+ ld hl, MenuDataHeader_117cbc
+ call LoadMenuDataHeader
+ call MenuBox
+ call MenuBoxCoord2Tile
+ farcall ReloadMapPart
+ ld hl, MobileStadiumSuccessText
+ call PrintText
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, UnknBGPals
+ ld de, 1 palettes
+ ld c, 8
+.loop
+ push hl
+ ld a, $7fff % $100
+ ld [hli], a
+ ld a, $7fff / $100
+ ld [hl], a
+ pop hl
+ add hl, de
+ dec c
+ jr nz, .loop
+ call RotateThreePalettesRight
+ pop af
+ ld [rSVBK], a
+ ld a, $80
+ ld [wJumptableIndex], a
+ ret
+
+Function117c89:
+ ld a, $7
+ call GetSRAMBank
+ ld l, $0
+ ld h, l
+ ld de, $b000
+ ld bc, $0ffc
+.asm_117c97
+ push bc
+ ld a, [de]
+ inc de
+ ld c, a
+ ld b, $0
+ add hl, bc
+ pop bc
+ dec bc
+ ld a, b
+ or c
+ jr nz, .asm_117c97
+ ld a, l
+ ld [wcd83], a
+ ld a, h
+ ld [wcd84], a
+ ld hl, $bfea
+ ld de, wcd69
+ ld bc, $10
+ call CopyBytes
+ call CloseSRAM
+ ret
+
+MenuDataHeader_117cbc: ; 0x117cbc
+ db $40 ; flags
+ db 12, 0 ; start coords
+ db 17, 19 ; end coords
+ dw NULL ; menu data 2
+ db 0 ; default option
+
+MenuDataHeader_117cc4: ; 0x117cc4
+ db $40 ; flags
+ db 7, 14 ; start coords
+ db 11, 19 ; end coords
+ dw NULL ; menu data 2
+ db 0 ; default item
+
+YesNo117ccc: ; 0x117ccc
+ db "はい"
+ next "いいえ@"
+
+MobileStadiumEntryText: ; 0x117cd3
+ text_jump _MobileStadiumEntryText
+ db "@"
+
+MobileStadiumSuccessText: ; 0x117cd8
+ text_jump _MobileStadiumSuccessText
+ db "@"
+
+MobileStudium_JumptableIncrement: ; 0x117cdd
+ ld hl, wJumptableIndex
+ inc [hl]
+ ret
diff --git a/mobile/mobile_45_sprite_engine.asm b/mobile/mobile_45_sprite_engine.asm
new file mode 100755
index 000000000..e2382fc38
--- /dev/null
+++ b/mobile/mobile_45_sprite_engine.asm
@@ -0,0 +1,922 @@
+Function115d99: ; 115d99
+ ld de, GFX_11601a
+ ld hl, VTiles0 tile $60
+ lb bc, BANK(GFX_11601a), $14
+ call Get2bpp
+ xor a
+ ld [wc305], a
+ ld [wc306], a
+ ld [wc309], a
+ ld [wc30a], a
+ ld [wc30b], a
+ ld [wc30c], a
+ ld a, $10
+ ld [wc307], a
+ ld a, $18
+ ld [wc308], a
+ ret
+
+; 115dc3
+
+Function115dc3: ; 115dc3
+ xor a
+ ld [wc305], a
+ ld a, $a0
+ ld hl, Sprites + 31 * 4
+ ld bc, 8 * 4
+ call ByteFill
+ ret
+
+; 115dd3
+
+Function115dd3: ; 115dd3
+ ld a, [wc305]
+ and a
+ ret z
+ ld a, $a0
+ ld hl, Sprites + 31 * 4
+ ld bc, 8 * 4
+ call ByteFill
+ call Function115e22
+ ld a, [wc309]
+ sla a
+ ld c, a
+ ld b, 0
+ ld hl, Unknown_115e86
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+ push de
+ pop hl
+ ld de, Sprites + 31 * 4
+ ld a, [wc307]
+ ld c, a
+ ld a, [wc308]
+ ld b, a
+ ld a, [hli]
+.asm_115e04
+ push af
+ ld a, [hli]
+ add b
+ ld [de], a
+ inc de
+ ld a, [hli]
+ add c
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ pop af
+ dec a
+ jr nz, .asm_115e04
+ ret
+
+; 115e18
+
+Function115e18: ; 115e18
+ ld a, c
+ ld [wc30a], a
+ xor a
+ ld [wc30b], a
+ jr Function115e2b
+
+; 115e22
+
+Function115e22: ; 115e22
+ ld hl, wc30c
+ dec [hl]
+ ret nz
+ ld hl, wc30b
+ inc [hl]
+
+Function115e2b: ; 115e2b
+ ld a, [wc30a]
+ sla a
+ ld c, a
+ ld b, 0
+ ld hl, Unknown_115e59
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ push de
+ pop hl
+ ld a, [wc30b]
+ sla a
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hli]
+ cp $ff
+ jr nz, .not_end
+ xor a
+ ld [wc30b], a
+ jr Function115e2b
+
+.not_end
+ ld [wc309], a
+ ld a, [hl]
+ ld [wc30c], a
+ ret
+
+; 115e59
+
+Unknown_115e59:
+ dw Unknown_115e61
+ dw Unknown_115e6c
+ dw Unknown_115e76
+ dw Unknown_115e79
+
+; OAM idx (see Unknown_115e86), flip flags/duration
+Unknown_115e61: ; 115e61
+ db $04, $08
+ db $05, $08
+ db $06, $08
+ db $07, $08
+ db $08, $08
+ db -1
+
+Unknown_115e6c: ; 115e6c
+ db $01, $08
+ db $02, $08
+ db $03, $08
+ db $09, $08
+ db $0a, $08
+Unknown_115e76: ; 115e76
+ db $00, $08
+ db -1
+
+Unknown_115e79: ; 115e79
+ db $0b, $08
+ db $0c, $08
+ db $0d, $08
+ db $0e, $08
+ db $0f, $08
+ db $00, $08
+ db -1
+; 115e86
+
+Unknown_115e86:
+ dw Unknown_115ea6
+ dw Unknown_115eb7
+ dw Unknown_115ecc
+ dw Unknown_115ee1
+ dw Unknown_115ef6
+ dw Unknown_115f13
+ dw Unknown_115f30
+ dw Unknown_115f4d
+ dw Unknown_115f6a
+ dw Unknown_115f87
+ dw Unknown_115f9c
+ dw Unknown_115fb1
+ dw Unknown_115fc6
+ dw Unknown_115fdb
+ dw Unknown_115ff0
+ dw Unknown_116005
+
+Unknown_115ea6: ; 115ea6
+ db 4
+ dsprite 1, 0, 0, 0, $60, $01
+ dsprite 1, 0, 1, 0, $61, $01
+ dsprite 2, 0, 0, 0, $62, $01
+ dsprite 2, 0, 1, 0, $63, $01
+
+Unknown_115eb7: ; 115eb7
+ db 5
+ dsprite 0, 0, 1, 0, $64, $00
+ dsprite 1, 0, 0, 0, $60, $01
+ dsprite 1, 0, 1, 0, $61, $01
+ dsprite 2, 0, 0, 0, $62, $01
+ dsprite 2, 0, 1, 0, $63, $01
+
+Unknown_115ecc: ; 115ecc
+ db 5
+ dsprite 0, 0, 1, 0, $65, $00
+ dsprite 1, 0, 0, 0, $60, $01
+ dsprite 1, 0, 1, 0, $61, $01
+ dsprite 2, 0, 0, 0, $62, $01
+ dsprite 2, 0, 1, 0, $63, $01
+
+Unknown_115ee1: ; 115ee1
+ db 5
+ dsprite 0, 0, 1, 0, $66, $00
+ dsprite 1, 0, 0, 0, $60, $01
+ dsprite 1, 0, 1, 0, $61, $01
+ dsprite 2, 0, 0, 0, $62, $01
+ dsprite 2, 0, 1, 0, $63, $01
+
+Unknown_115ef6: ; 115ef6
+ db 7
+ dsprite 0, 0, 0, 0, $67, $01
+ dsprite 1, 0, 0, 0, $68, $01
+ dsprite 2, 0, 0, 0, $6d, $00
+ dsprite 2, 0, 1, 0, $69, $00
+ dsprite 2, 0, 2, 0, $6a, $00
+ dsprite 3, 0, 1, 0, $6b, $00
+ dsprite 3, 0, 2, 0, $6c, $00
+
+Unknown_115f13: ; 115f13
+ db 7
+ dsprite 0, 0, 0, 0, $67, $01
+ dsprite 1, 0, 0, 0, $68, $01
+ dsprite 2, 0, 0, 0, $6e, $00
+ dsprite 2, 0, 1, 0, $69, $00
+ dsprite 2, 0, 2, 0, $6a, $00
+ dsprite 3, 0, 1, 0, $6b, $00
+ dsprite 3, 0, 2, 0, $6c, $00
+
+Unknown_115f30: ; 115f30
+ db 7
+ dsprite 0, 0, 0, 0, $67, $01
+ dsprite 1, 0, 0, 0, $68, $01
+ dsprite 2, 0, 0, 0, $6f, $00
+ dsprite 2, 0, 1, 0, $69, $00
+ dsprite 2, 0, 2, 0, $6a, $00
+ dsprite 3, 0, 1, 0, $6b, $00
+ dsprite 3, 0, 2, 0, $6c, $00
+
+Unknown_115f4d: ; 115f4d
+ db 7
+ dsprite 0, 0, 0, 0, $67, $01
+ dsprite 1, 0, 0, 0, $68, $01
+ dsprite 2, 0, 0, 0, $70, $00
+ dsprite 2, 0, 1, 0, $69, $00
+ dsprite 2, 0, 2, 0, $6a, $00
+ dsprite 3, 0, 1, 0, $6b, $00
+ dsprite 3, 0, 2, 0, $6c, $00
+
+Unknown_115f6a: ; 115f6a
+ db 7
+ dsprite 0, 0, 0, 0, $67, $01
+ dsprite 1, 0, 0, 0, $68, $01
+ dsprite 2, 0, 0, 0, $71, $00
+ dsprite 2, 0, 1, 0, $69, $00
+ dsprite 2, 0, 2, 0, $6a, $00
+ dsprite 3, 0, 1, 0, $6b, $00
+ dsprite 3, 0, 2, 0, $6c, $00
+
+Unknown_115f87: ; 115f87
+ db 5
+ dsprite 0, 0, 1, 0, $72, $00
+ dsprite 1, 0, 0, 0, $60, $01
+ dsprite 1, 0, 1, 0, $61, $01
+ dsprite 2, 0, 0, 0, $62, $01
+ dsprite 2, 0, 1, 0, $63, $01
+
+Unknown_115f9c: ; 115f9c
+ db 5
+ dsprite 0, 0, 1, 0, $73, $00
+ dsprite 1, 0, 0, 0, $60, $01
+ dsprite 1, 0, 1, 0, $61, $01
+ dsprite 2, 0, 0, 0, $62, $01
+ dsprite 2, 0, 1, 0, $63, $01
+
+Unknown_115fb1: ; 115fb1
+ db 5
+ dsprite 0, 1, 1, 0, $64, $60
+ dsprite 1, 0, 0, 0, $60, $01
+ dsprite 1, 0, 1, 0, $61, $01
+ dsprite 2, 0, 0, 0, $62, $01
+ dsprite 2, 0, 1, 0, $63, $01
+
+Unknown_115fc6: ; 115fc6
+ db 5
+ dsprite 0, 1, 1, 0, $65, $60
+ dsprite 1, 0, 0, 0, $60, $01
+ dsprite 1, 0, 1, 0, $61, $01
+ dsprite 2, 0, 0, 0, $62, $01
+ dsprite 2, 0, 1, 0, $63, $01
+
+Unknown_115fdb: ; 115fdb
+ db 5
+ dsprite 0, 1, 1, 0, $66, $60
+ dsprite 1, 0, 0, 0, $60, $01
+ dsprite 1, 0, 1, 0, $61, $01
+ dsprite 2, 0, 0, 0, $62, $01
+ dsprite 2, 0, 1, 0, $63, $01
+
+Unknown_115ff0: ; 115ff0
+ db 5
+ dsprite 0, 1, 1, 0, $72, $60
+ dsprite 1, 0, 0, 0, $60, $01
+ dsprite 1, 0, 1, 0, $61, $01
+ dsprite 2, 0, 0, 0, $62, $01
+ dsprite 2, 0, 1, 0, $63, $01
+
+Unknown_116005: ; 116005
+ db 5
+ dsprite 0, 1, 1, 0, $73, $60
+ dsprite 1, 0, 0, 0, $60, $01
+ dsprite 1, 0, 1, 0, $61, $01
+ dsprite 2, 0, 0, 0, $62, $01
+ dsprite 2, 0, 1, 0, $63, $01
+; 11601a
+
+GFX_11601a:: ; 11601a
+INCBIN "gfx/unknown/11601a.2bpp"
+
+
+Function11615a: ; 11615a
+ xor a
+ ld [wc30d], a
+ ld [$c319], a
+ ld [wc310], a
+ ld [wc311], a
+ ld [wc312], a
+ ld [wc313], a
+ ld [wc314], a
+ ld [wc314 + 1], a
+ ld [wc314 + 4], a
+ ld [wc3f6], a
+ ld [wc3f8], a
+ ld [wc3f2], a
+ ld [wc3f4], a
+ ld a, $24
+ ld [wc3f5], a
+ ld a, $7
+ ld [wc3f7], a
+ ld a, $b0
+ ld [wc30e], a
+ ld [wc3f1], a
+ ld a, $48
+ ld [wc30f], a
+ ld [wc3f3], a
+ ret
+
+; 11619d
+
+Function11619d: ; 11619d
+ ld a, [wc30d]
+ and a
+ ret z
+ ld a, [$c319]
+ cp $2
+ jr c, .asm_1161b4
+ ld a, $a0
+ ld hl, Sprites
+ ld bc, $0064
+ call ByteFill
+
+.asm_1161b4
+ call Function1161b8
+ ret
+
+; 1161b8
+
+Function1161b8: ; 1161b8
+ ld a, [$c319]
+ ld e, a
+ ld d, 0
+ ld hl, .Jumptable
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+; 1161c7
+
+.Jumptable: ; 1161c7
+ dw Function1161d5
+ dw Function116294
+ dw Function1162cb
+ dw Function1162f2
+ dw Function1163c0
+ dw Function11636e
+ dw Function116441
+; 1161d5
+
+Function1161d5: ; 1161d5
+ ld a, [rSVBK]
+ push af
+
+ ld a, $6
+ ld [rSVBK], a
+
+ ld hl, Unknown_117356
+ ld de, wDecompressScratch
+ ld bc, $0300
+ call CopyBytes
+
+ di
+
+.wait_for_vblank
+; Wait until a vblank would occur had interrupts not just been disabled.
+ ld a, [rLY]
+ cp $91
+ jr nz, .wait_for_vblank
+
+ ld a, $d0
+ ld [rHDMA1], a
+ ld a, $0
+ ld [rHDMA2], a
+ ld a, $1c
+ ld [rHDMA3], a
+ xor a
+ ld [rHDMA4], a
+ ld a, $8
+ ld [rHDMA5], a
+
+ ld a, $d0
+ ld [rHDMA1], a
+ ld a, $80
+ ld [rHDMA2], a
+ ld a, $1c
+ ld [rHDMA3], a
+ ld a, $80
+ ld [rHDMA4], a
+ ld a, $8
+ ld [rHDMA5], a
+
+ ld a, $d1
+ ld [rHDMA1], a
+ ld a, $0
+ ld [rHDMA2], a
+ ld a, $1d
+ ld [rHDMA3], a
+ xor a
+ ld [rHDMA4], a
+ ld a, $8
+ ld [rHDMA5], a
+
+ ld a, $1
+ ld [rVBK], a
+
+ ld a, $d1
+ ld [rHDMA1], a
+ ld a, $80
+ ld [rHDMA2], a
+ ld a, $1c
+ ld [rHDMA3], a
+ xor a
+ ld [rHDMA4], a
+ ld a, $8
+ ld [rHDMA5], a
+
+ ld a, $d2
+ ld [rHDMA1], a
+ ld a, $0
+ ld [rHDMA2], a
+ ld a, $1c
+ ld [rHDMA3], a
+ ld a, $80
+ ld [rHDMA4], a
+ ld a, $8
+ ld [rHDMA5], a
+
+ ld a, $d2
+ ld [rHDMA1], a
+ ld a, $80
+ ld [rHDMA2], a
+ ld a, $1d
+ ld [rHDMA3], a
+ xor a
+ ld [rHDMA4], a
+ ld a, $8
+ ld [rHDMA5], a
+
+ xor a
+ ld [rVBK], a
+
+ ei
+
+ pop af
+ ld [rSVBK], a
+
+ farcall ReloadMapPart
+ ld a, $8
+ ld [MusicFade], a
+ ld de, MUSIC_MOBILE_ADAPTER
+ ld a, e
+ ld [MusicFadeID], a
+ ld a, d
+ ld [MusicFadeID + 1], a
+ ld a, [$c319]
+ inc a
+ ld [$c319], a
+ ret
+
+; 11628c
+
+MenuDataHeader_11628c: ; 11628c
+ db $40 ; flags
+ db 6, 0 ; start coords
+ db 17, 19 ; end coords
+ dw NULL
+ db 0 ; default option
+; 116294
+
+Function116294: ; 116294
+ farcall Function170d02
+ ld a, [$c319]
+ inc a
+ ld [$c319], a
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, UnknBGPals palette 6
+ ld de, $c320
+ ld bc, 2 palettes
+ call CopyBytes
+ ld hl, Palette_11734e
+ ld de, UnknBGPals palette 7
+ ld bc, 1 palettes
+ call CopyBytes
+ call SetPalettes
+ pop af
+ ld [rSVBK], a
+ ld a, $30
+ ld [hWY], a
+ ret
+
+; 1162cb
+
+Function1162cb: ; 1162cb
+ farcall Function170cc6
+ ld a, [$c319]
+ inc a
+ ld [$c319], a
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, Palette_11730e
+ ld de, UnknOBPals + 2 palettes
+ ld bc, 6 palettes
+ call CopyBytes
+ call SetPalettes
+ pop af
+ ld [rSVBK], a
+ ret
+
+; 1162f2
+
+Function1162f2: ; 1162f2
+ call Function11659d
+ call Function116758
+ call Function1167a6
+ ld a, [wc310]
+ cp EGG
+ ret z
+ sla a
+ ld c, a
+ ld b, 0
+ ld hl, Unknown_1168c5
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+ push de
+ pop hl
+ ld a, [wc30e]
+ ld c, a
+ ld a, [wc30f]
+ ld b, a
+ ld a, [wc314 + 4]
+ ld e, a
+ ld a, [hli]
+ sub e
+ ld de, Sprites + $24
+.asm_116321
+ push af
+ ld a, [hli]
+ add b
+ ld [de], a
+ inc de
+ ld a, [hli]
+ add c
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ pop af
+ dec a
+ jr nz, .asm_116321
+ call Function116468
+ ld a, [wc3f5]
+ sla a
+ ld c, a
+ ld b, 0
+ ld hl, Unknown_1168c5
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+ push de
+ pop hl
+ ld a, [wc3f1]
+ ld c, a
+ ld a, [wc3f3]
+ ld b, a
+ ld a, [wc3f8]
+ ld e, a
+ ld a, [hli]
+ sub e
+ ld de, Sprites
+.asm_11635a
+ push af
+ ld a, [hli]
+ add b
+ ld [de], a
+ inc de
+ ld a, [hli]
+ add c
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ pop af
+ dec a
+ jr nz, .asm_11635a
+ ret
+
+; 11636e
+
+Function11636e: ; 11636e
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, BGPals
+ ld de, UnknBGPals
+ ld bc, $0040
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ call SetPalettes
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld a, $a0
+ ld hl, Sprites
+ ld bc, 16 * 4
+ call ByteFill
+ ld a, $90
+ ld [hWY], a
+ call UpdateSprites
+ pop af
+ ld [rSVBK], a
+ farcall ReloadMapPart
+ ld a, $8
+ ld [MusicFade], a
+ ld a, [wMapMusic]
+ ld [MusicFadeID], a
+ xor a
+ ld [MusicFadeID + 1], a
+ xor a
+ ld [$c319], a
+ ld [wc30d], a
+ ret
+
+; 1163c0
+
+Function1163c0: ; 1163c0
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld a, $a0
+ ld hl, Sprites
+ ld bc, 16 * 4
+ call ByteFill
+ call DelayFrame
+ farcall Function14146
+ ld b, SCGB_MAPPALS
+ call GetSGBLayout
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, $c320
+ ld de, wd030
+ ld bc, $0010
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ call SetPalettes
+ call DelayFrame
+ ld a, $90
+ ld [hWY], a
+ call UpdateSprites
+ farcall Function14157
+ pop af
+ ld [rSVBK], a
+ farcall ReloadMapPart
+ ld a, [wLinkMode]
+ cp $4
+ jr z, .asm_11642a
+ ld a, $8
+ ld [MusicFade], a
+ ld a, [wMapMusic]
+ ld [MusicFadeID], a
+ xor a
+ ld [MusicFadeID + 1], a
+ jr .asm_116439
+
+.asm_11642a
+ ld a, $8
+ ld [MusicFade], a
+ ld a, $0
+ ld [MusicFadeID], a
+ ld a, $0
+ ld [MusicFadeID + 1], a
+
+.asm_116439
+ xor a
+ ld [$c319], a
+ ld [wc30d], a
+ ret
+
+; 116441
+
+Function116441: ; 116441
+ farcall Function17d405
+ ld a, $90
+ ld [hWY], a
+ farcall ReloadMapPart
+ ld a, $8
+ ld [MusicFade], a
+ ld a, [wMapMusic]
+ ld [MusicFadeID], a
+ xor a
+ ld [MusicFadeID + 1], a
+ xor a
+ ld [$c319], a
+ ld [wc30d], a
+ ret
+
+; 116468
+
+Function116468: ; 116468
+ call Function116567
+ ld a, [wc314]
+ cp $d
+ jr nz, .asm_1164a8
+ ld hl, wc30e
+ ld a, [hl]
+ cp $50
+ jr nc, .asm_116484
+ ld a, $50
+ sub [hl]
+ add $50
+ ld [wc3f1], a
+ jr .asm_11648d
+
+.asm_116484
+ sub $50
+ ld c, a
+ ld a, $50
+ sub c
+ ld [wc3f1], a
+
+.asm_11648d
+ ld hl, wc30f
+ ld a, [hl]
+ cp $60
+ jr nc, .asm_11649e
+ ld a, $60
+ sub [hl]
+ add $60
+ ld [wc3f3], a
+ ret
+
+.asm_11649e
+ sub $60
+ ld c, a
+ ld a, $60
+ sub c
+ ld [wc3f3], a
+ ret
+
+.asm_1164a8
+ ld hl, wc30e
+ ld a, $b0
+ cp [hl]
+ jr nc, .asm_1164b8
+ ld a, [wc3f1]
+ and a
+ jr z, .asm_11650b
+ jr .asm_1164f2
+
+.asm_1164b8
+ ld a, [wc3f1]
+ sub [hl]
+ jr nc, .asm_1164c1
+ xor $ff
+ inc a
+
+.asm_1164c1
+ ld b, a
+ ld c, $0
+ ld a, $5
+.asm_1164c6
+ srl b
+ rr c
+ dec a
+ jr nz, .asm_1164c6
+ ld a, c
+ ld [wc3fa], a
+ ld a, b
+ ld [wc3f9], a
+ ld a, [wc3f1]
+ sub [hl]
+ jr c, .asm_1164f2
+ ld c, $0
+ ld a, [wc3fa]
+ xor $ff
+ add $1
+ rl c
+ ld [wc3fa], a
+ ld a, [wc3f9]
+ xor $ff
+ add c
+ ld [wc3f9], a
+
+.asm_1164f2
+ ld a, [wc3f2]
+ ld l, a
+ ld a, [wc3f1]
+ ld h, a
+ ld a, [wc3fa]
+ ld e, a
+ ld a, [wc3f9]
+ ld d, a
+ add hl, de
+ ld a, l
+ ld [wc3f2], a
+ ld a, h
+ ld [wc3f1], a
+
+.asm_11650b
+ ld hl, wc30f
+ ld a, $b0
+ cp [hl]
+ jr c, .asm_11654d
+ ld a, [wc3f3]
+ sub [hl]
+ jr nc, .asm_11651c
+ xor $ff
+ inc a
+
+.asm_11651c
+ ld b, a
+ ld c, $0
+ ld a, $5
+.asm_116521
+ srl b
+ rr c
+ dec a
+ jr nz, .asm_116521
+ ld a, c
+ ld [wc3fc], a
+ ld a, b
+ ld [wc3fb], a
+ ld a, [wc3f3]
+ sub [hl]
+ jr c, .asm_11654d
+ ld c, $0
+ ld a, [wc3fc]
+ xor $ff
+ add $1
+ rl c
+ ld [wc3fc], a
+ ld a, [wc3fb]
+ xor $ff
+ add c
+ ld [wc3fb], a
+
+.asm_11654d
+ ld a, [wc3f4]
+ ld l, a
+ ld a, [wc3f3]
+ ld h, a
+ ld a, [wc3fc]
+ ld e, a
+ ld a, [wc3fb]
+ ld d, a
+ add hl, de
+ ld a, l
+ ld [wc3f4], a
+ ld a, h
+ ld [wc3f3], a
+ ret
diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm
new file mode 100755
index 000000000..150f9baa7
--- /dev/null
+++ b/mobile/mobile_46.asm
@@ -0,0 +1,7987 @@
+SECTION "bank46", ROMX
+
+Function118000: ; 118000
+ ld a, $1
+ ld [wcd38], a
+ jr asm_11800b
+
+Function118007: ; 118007
+ xor a
+ ld [wcd38], a
+
+asm_11800b
+ call BattleTowerRoomMenu_InitRAM
+ ld a, $18
+ ld [wcd33], a
+ ld a, $19
+ ld [wcd34], a
+ ld a, $4
+ ld [wc3f0], a
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+.loop
+ call JoyTextDelay
+ call Function118473
+ ld a, [wcf66]
+ cp $1b
+ jr c, .skip
+ ld a, [wcd34]
+ ld [wcf66], a
+
+.skip
+ call Function1184a5
+ call BattleTowerRoomMenu_WriteMessage
+ farcall Function115dd3
+ farcall Function11619d
+ call DelayFrame
+ ld a, [wcf66]
+ ld hl, wcd33
+ cp [hl]
+ jr nz, .loop
+ pop af
+ ld [rSVBK], a
+ call BattleTowerRoomMenu_Cleanup
+ call ReturnToMapFromSubmenu
+BattleTowerRoomMenu_DoNothing: ; 11805e (46:405e)
+ ret
+; 11805f
+
+Function11805f: ; 11805f
+ ld a, $1
+ ld [wcd38], a
+ call BattleTowerRoomMenu_InitRAM
+ ld a, $18
+ ld [wcd33], a
+ ld a, $19
+ ld [wcd34], a
+ ld a, $4
+ ld [wc3f0], a
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+.asm_11807d
+ call JoyTextDelay
+ call Function118473
+ ld a, [wcf66]
+ cp $1b
+ jr c, .asm_118090
+ ld a, [wcd34]
+ ld [wcf66], a
+
+.asm_118090
+ call Function11857c
+ call BattleTowerRoomMenu_WriteMessage
+ farcall Function115dd3
+ farcall Function11619d
+ call DelayFrame
+ ld a, [wcf66]
+ ld hl, wcd33
+ cp [hl]
+ jr nz, .asm_11807d
+ pop af
+ ld [rSVBK], a
+ call BattleTowerRoomMenu_Cleanup
+ call ReturnToMapFromSubmenu
+ ret
+; 1180b8
+
+Function1180b8: ; 1180b8
+ call BattleTowerRoomMenu_InitRAM
+ ld a, $22
+ ld [wcd33], a
+ ld a, $23
+ ld [wcd34], a
+ ld a, $4
+ ld [wc3f0], a
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+.asm_1180d1
+ call JoyTextDelay
+ call Function118473
+ ld a, [wcf66]
+ cp $28
+ jr c, .asm_1180e4
+ ld a, [wcd34]
+ ld [wcf66], a
+
+.asm_1180e4
+ ld a, [wcf66]
+ cp $10
+ jr c, .asm_1180f2
+ cp $16
+ jr nc, .asm_1180f2
+ call Function11884c
+
+.asm_1180f2
+ call Function1184ec
+ call BattleTowerRoomMenu_WriteMessage
+ farcall Function115dd3
+ farcall Function11619d
+ call DelayFrame
+ ld a, [wcf66]
+ ld hl, wcd33
+ cp [hl]
+ jr nz, .asm_1180d1
+ pop af
+ ld [rSVBK], a
+ call BattleTowerRoomMenu_Cleanup
+ call ReturnToMapFromSubmenu
+ ret
+; 11811a
+
+Function11811a: ; 11811a
+ ld a, 1
+ ld [wcd38], a
+ jr Function118125
+
+_BattleTowerRoomMenu: ; 118121
+ xor a
+ ld [wcd38], a
+Function118125: ; 118125
+ call BattleTowerRoomMenu_InitRAM
+ ld a, $3
+ ld [wcd33], a
+ ld a, $d
+ ld [wcd34], a
+ ld a, $4
+ ld [wc3f0], a
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+.loop
+ call JoyTextDelay
+ call Function118473
+ ld a, [wcf66]
+ cp $f
+ jr c, .skip
+ ld a, [wcd34]
+ ld [wcf66], a
+.skip
+ call BattleTowerRoomMenu_Jumptable
+ call BattleTowerRoomMenu_WriteMessage
+ farcall Function115dd3
+ farcall Function11619d
+ call DelayFrame
+ ld a, [wcf66]
+ ld hl, wcd33
+ cp [hl]
+ jr nz, .loop
+ xor a
+ ld [w3_d000], a
+ pop af
+ ld [rSVBK], a
+ call BattleTowerRoomMenu_Cleanup
+ call Function118180
+ call ReturnToMapFromSubmenu
+ ret
+; 118180
+
+Function118180: ; 118180
+ ld a, [ScriptVar]
+ and a
+ ret nz
+ ld a, [wcd38]
+ and a
+ ret z
+ ld a, $5
+ call GetSRAMBank
+ ld hl, wcd69
+ ld de, $a89c
+ ld bc, $0016
+ call CopyBytes
+
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+
+ ld de, w3_d202
+ ld c, $96
+ farcall CheckStringForErrors_IgnoreTerminator
+ jr c, .return_d3
+
+ ld de, w3_d202
+ lb bc, 1, $96
+ farcall CheckStringContainsLessThanBNextCharacters
+ jr c, .return_d3
+
+ ld hl, w3_d202
+ ld de, $a8b2
+ ld bc, $0096
+ call CopyBytes
+.reset_banks
+ pop af
+ ld [rSVBK], a
+ call CloseSRAM
+ ret
+
+.return_d3
+ ld a, $d3
+ ld [wc300], a
+ ld [ScriptVar], a
+ jr .reset_banks
+; 1181da
+
+Function1181da: ; 1181da
+ call BattleTowerRoomMenu_InitRAM
+ ld a, $2
+ ld [wcd38], a
+ ld a, $21
+ ld [wcd33], a
+ ld a, $22
+ ld [wcd34], a
+ ld a, $4
+ ld [wc3f0], a
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+.asm_1181f8
+ call JoyTextDelay
+ call Function118473
+ ld a, [wcf66]
+ cp $28
+ jr c, .asm_11820b
+ ld a, [wcd34]
+ ld [wcf66], a
+
+.asm_11820b
+ call Function1185c3
+ call BattleTowerRoomMenu_WriteMessage
+ farcall Function115dd3
+ farcall Function11619d
+ call DelayFrame
+ ld a, [wcf66]
+ ld hl, wcd33
+ cp [hl]
+ jr nz, .asm_1181f8
+ pop af
+ ld [rSVBK], a
+ call BattleTowerRoomMenu_Cleanup
+ call ReturnToMapFromSubmenu
+ ret
+; 118233
+
+Function118233: ; 118233
+ call BattleTowerRoomMenu_InitRAM
+ ld a, $1b
+ ld [wcd33], a
+ ld a, $1c
+ ld [wcd34], a
+ ld a, $6
+ ld [wc3f0], a
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+.asm_11824c
+ call JoyTextDelay
+ call Function118473
+ ld a, [wcf66]
+ cp $1e
+ jr c, .asm_11825f
+ ld a, [wcd34]
+ ld [wcf66], a
+
+.asm_11825f
+ call Function118624
+ call BattleTowerRoomMenu_WriteMessage
+ farcall Function115dd3
+ farcall Function11619d
+ call DelayFrame
+ ld a, [wcf66]
+ ld hl, wcd33
+ cp [hl]
+ jr nz, .asm_11824c
+ pop af
+ ld [rSVBK], a
+ call BattleTowerRoomMenu_Cleanup
+ ret
+; 118284
+
+Function118284: ; 118284
+ call BattleTowerRoomMenu_InitRAM
+ ld a, $19
+ ld [wcd33], a
+ ld a, $1e
+ ld [wcd34], a
+ ld a, $5
+ ld [wc3f0], a
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+.asm_11829d
+ call JoyTextDelay
+ call Function118473
+ ld a, [wcf66]
+ cp $20
+ jr c, .asm_1182b0
+ ld a, [wcd34]
+ ld [wcf66], a
+.asm_1182b0
+ call Function1186f5
+ call BattleTowerRoomMenu_WriteMessage
+ farcall Function115dd3
+ farcall Function11619d
+ call DelayFrame
+ ld a, [wcf66]
+ ld hl, wcd33
+ cp [hl]
+ jr nz, .asm_11829d
+ pop af
+ ld [rSVBK], a
+ call BattleTowerRoomMenu_Cleanup
+ ret
+; 1182d5 (46:42d5)
+
+
+Function1182d5: ; 1182d5
+ call BattleTowerRoomMenu_InitRAM
+ ld a, $18
+ ld [wcd33], a
+ ld a, $19
+ ld [wcd34], a
+ ld a, $4
+ ld [wc3f0], a
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+.asm_1182ee
+ call JoyTextDelay
+ call Function118473
+ ld a, [wcf66]
+ cp $1b
+ jr c, .asm_118301
+ ld a, [wcd34]
+ ld [wcf66], a
+
+.asm_118301
+ call Function118746
+ call BattleTowerRoomMenu_WriteMessage
+ farcall Function115dd3
+ farcall Function11619d
+ call DelayFrame
+ ld a, [wcf66]
+ ld hl, wcd33
+ cp [hl]
+ jr nz, .asm_1182ee
+ pop af
+ ld [rSVBK], a
+ call BattleTowerRoomMenu_Cleanup
+ call ReturnToMapFromSubmenu
+ ret
+; 118329
+
+Function118329: ; 118329
+ call BattleTowerRoomMenu_InitRAM
+ ld a, $15
+ ld [wcd33], a
+ ld a, $16
+ ld [wcd34], a
+ ld a, $6
+ ld [wc3f0], a
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+.asm_118342
+ call JoyTextDelay
+ call Function118473
+ ld a, [wcf66]
+ cp $18
+ jr c, .asm_118355
+ ld a, [wcd34]
+ ld [wcf66], a
+
+.asm_118355
+ call Function118671
+ call BattleTowerRoomMenu_WriteMessage
+ farcall Function115dd3
+ farcall Function11619d
+ call DelayFrame
+ ld a, [wcf66]
+ ld hl, wcd33
+ cp [hl]
+ jr nz, .asm_118342
+ pop af
+ ld [rSVBK], a
+ call BattleTowerRoomMenu_Cleanup
+ ret
+; 11837a
+
+Function11837a: ; 11837a
+ call BattleTowerRoomMenu_InitRAM
+ ld a, $16
+ ld [wcd33], a
+ ld a, $17
+ ld [wcd34], a
+ ld a, $6
+ ld [wc3f0], a
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+.asm_118393
+ call JoyTextDelay
+ call Function118473
+ ld a, [wcf66]
+ cp $19
+ jr c, .asm_1183a6
+ ld a, [wcd34]
+ ld [wcf66], a
+
+.asm_1183a6
+ call Function1186b2
+ call BattleTowerRoomMenu_WriteMessage
+ farcall Function115dd3
+ farcall Function11619d
+ call DelayFrame
+ ld a, [wcf66]
+ ld hl, wcd33
+ cp [hl]
+ jr nz, .asm_118393
+ pop af
+ ld [rSVBK], a
+ call BattleTowerRoomMenu_Cleanup
+ ret
+; 1183cb
+
+BattleTowerRoomMenu_InitRAM: ; 1183cb
+ di
+ ld a, [rIE]
+ ld [wcd32], a
+ call DoubleSpeed
+ xor a
+ ld [rIF], a
+ ld [wc300], a
+ ld [wc301], a
+ ld [wc302], a
+ ld [wcd80], a
+ ld [wcd65], a
+ ld [wcd66], a
+ ld [wcd67], a
+ ld [wcd68], a
+ ld [$c31a], a
+ ld [wcd89], a
+ ld [wcd8a], a
+ ld [wcd8b], a
+ ld [wc3ec], a
+ ld [wc3ed], a
+ ld [wc3ee], a
+ ld [wc3ef], a
+ ld hl, VramState
+ ld a, [hl]
+ ld [wcd7f], a
+ set 1, [hl]
+ ld a, $f
+ ld [rIE], a
+ ld a, $1
+ ld [hMobileReceive], a
+ ld [hMobile], a
+ ei
+ farcall MobileFunc_106462
+ farcall Function106464
+ farcall Function115d99
+ farcall Function11615a
+ ld a, $5
+ call GetSRAMBank
+ xor a
+ ld [$bfff], a
+ call CloseSRAM
+ ret
+; 118440
+
+Function118440: ; 118440
+ push af
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$bfff]
+ inc a
+ ld [$bfff], a
+ call CloseSRAM
+ pop af
+ ret
+; 118452
+
+BattleTowerRoomMenu_Cleanup: ; 118452
+ di
+ xor a
+ ld [hMobileReceive], a
+ ld [hMobile], a
+ ld [hVBlank], a
+ call NormalSpeed
+ xor a
+ ld [rIF], a
+ ld a, [wcd32]
+ ld [rIE], a
+ ei
+ ld a, [wcd7f]
+ ld [VramState], a
+ ld a, [wc300]
+ ld [ScriptVar], a
+ ret
+; 118473
+
+Function118473: ; 118473
+ ld a, [wcd65]
+ and a
+ ret z
+ ld a, [wcd66]
+ inc a
+ ld [wcd66], a
+ cp 60
+ ret nz
+ xor a
+ ld [wcd66], a
+ ld a, [wcd67]
+ inc a
+ ld [wcd67], a
+ cp 60
+ ret nz
+ ld a, [wcd68]
+ inc a
+ ld [wcd68], a
+ cp 99
+ jr z, .ninety_nine
+ xor a
+ ld [wcd67], a
+ ret
+
+.ninety_nine
+ xor a
+ ld [wcd65], a
+ ret
+; 1184a5
+
+Function1184a5: ; 1184a5
+ jumptable .Jumptable, wcf66
+; 1184b4
+
+.Jumptable: ; 1184b4
+ dw Function11886e
+ dw Function118880
+ dw Function11878d
+ dw Function1188b0
+ dw Function11878d
+ dw Function1188b8
+ dw Function11878d
+ dw Function1188c0
+ dw Function11878d
+ dw Function1188c8
+ dw Function11878d
+ dw Function118903
+ dw Function118a8f
+ dw Function11878d
+ dw Function118d80
+ dw Function118d9b
+ dw Function11878d
+ dw Function118ded
+ dw Function118e6d
+ dw Function11878d
+ dw Function11984e
+ dw Function118e76
+ dw Function118e7e
+ dw Function11878d
+ dw BattleTowerRoomMenu_DoNothing
+ dw Function118e76
+ dw BattleTowerRoomMenu_CallRoomMenu2
+ dw Function118e76
+; 1184ec
+
+Function1184ec: ; 1184ec
+ jumptable .Jumptable, wcf66
+; 1184fb
+
+.Jumptable: ; 1184fb
+ dw Function11886e
+ dw Function118880
+ dw Function11878d
+ dw Function1188b0
+ dw Function11878d
+ dw Function1188b8
+ dw Function11878d
+ dw Function1188c0
+ dw Function11878d
+ dw Function1188c8
+ dw Function11878d
+ dw Function118903
+ dw Function119954
+ dw Function11878d
+ dw Function119973
+ dw Function11878d
+ dw Function119987
+ dw Function11878d
+ dw Function1199b4
+ dw Function1199ca
+ dw Function11878d
+ dw Function1199e2
+ dw Function119b0d
+ dw Function11878d
+ dw Function119b6b
+ dw Function119b3b
+ dw Function11878d
+ dw Function119b52
+ dw Function11878d
+ dw Function118e6d
+ dw Function11878d
+ dw Function118e76
+ dw Function118e7e
+ dw Function11878d
+ dw BattleTowerRoomMenu_DoNothing
+ dw Function118e76
+ dw BattleTowerRoomMenu_CallRoomMenu2
+ dw Function119b45
+ dw Function11878d
+ dw Function119ac9
+ dw Function118e76
+; 11854d
+
+BattleTowerRoomMenu_Jumptable: ; 11854d
+ jumptable .Jumptable, wcf66
+; 11855c
+
+.Jumptable: ; 11855c
+ dw BattleTowerRoomMenu_PickLevelMessage
+ dw BattleTowerRoomMenu_PlacePickLevelMenu
+ dw BattleTowerRoomMenu_UpdatePickLevelMenu
+ dw BattleTowerRoomMenu_DoNothing
+ dw BattleTowerRoomMenu_PartyMonTopsThisLevelMessage
+ dw BattleTowerRoomMenu_WaitForMessage
+ dw BattleTowerRoomMenu_DelayRestartMenu
+ dw BattleTowerRoomMenu_QuitMessage
+ dw BattleTowerRoomMenu_PlaceYesNoMenu
+ dw BattleTowerRoomMenu_UpdateYesNoMenu
+ dw BattleTowerRoomMenu_UberRestrictionMessage
+ dw BattleTowerRoomMenu_WaitForMessage
+ dw BattleTowerRoomMenu_DelayRestartMenu
+ dw Function118e76 ; mobile
+ dw BattleTowerRoomMenu_CallRoomMenu2 ; mobile
+ dw Function118e76 ; mobile
+; 11857c
+
+Function11857c: ; 11857c
+ jumptable .Jumptable, wcf66
+; 11858b
+
+.Jumptable: ; 11858b
+ dw Function11886e
+ dw Function118880
+ dw Function11878d
+ dw Function1188b0
+ dw Function11878d
+ dw Function1188b8
+ dw Function11878d
+ dw Function1188c0
+ dw Function11878d
+ dw Function1188c8
+ dw Function11878d
+ dw Function118903
+ dw Function118a7a
+ dw Function11878d
+ dw Function11891c
+ dw Function1198ee
+ dw Function1198f7
+ dw Function11878d
+ dw Function119937
+ dw Function118e6d
+ dw Function11878d
+ dw Function118e76
+ dw Function118e7e
+ dw Function11878d
+ dw BattleTowerRoomMenu_DoNothing
+ dw Function118e76
+ dw BattleTowerRoomMenu_CallRoomMenu2
+ dw Function118e76
+; 1185c3
+
+Function1185c3: ; 1185c3
+ jumptable .Jumptable, wcf66
+; 1185d2
+
+.Jumptable: ; 1185d2
+ dw Function11886e
+ dw Function118880
+ dw Function11878d
+ dw Function1188b0
+ dw Function11878d
+ dw Function1188b8
+ dw Function11878d
+ dw Function1188c0
+ dw Function11878d
+ dw Function1188c8
+ dw Function11878d
+ dw Function118903
+ dw Function118aa4
+ dw Function11878d
+ dw Function118e92
+ dw Function11878d
+ dw Function118eb0
+ dw Function118ec6
+ dw Function118f0d
+ dw Function118f14
+ dw Function118f5e
+ dw Function11878d
+ dw Function118fc0
+ dw Function11878d
+ dw Function119054
+ dw Function1190d0
+ dw Function11878d
+ dw Function1190ec
+ dw Function118e6d
+ dw Function11878d
+ dw Function118e76
+ dw Function118e7e
+ dw Function11878d
+ dw BattleTowerRoomMenu_DoNothing
+ dw Function118e76
+ dw BattleTowerRoomMenu_CallRoomMenu2
+ dw BattleTowerRoomMenu_QuitMessage
+ dw BattleTowerRoomMenu_PlaceYesNoMenu
+ dw BattleTowerRoomMenu_UpdateYesNoMenu
+ dw Function11914e
+ dw Function118e76
+; 118624
+
+Function118624: ; 118624
+ jumptable .Jumptable, wcf66
+; 118633
+
+.Jumptable: ; 118633
+ dw Function118866
+ dw Function118880
+ dw Function11878d
+ dw Function1188b0
+ dw Function11878d
+ dw Function1188b8
+ dw Function11878d
+ dw Function1188c0
+ dw Function11878d
+ dw Function1188c8
+ dw Function11878d
+ dw Function118903
+ dw Function118aa4
+ dw Function11878d
+ dw Function118e92
+ dw Function11878d
+ dw Function11915d
+ dw Function118f68
+ dw Function11878d
+ dw Function119009
+ dw Function11878d
+ dw Function119054
+ dw Function118e6d
+ dw Function11878d
+ dw Function118e76
+ dw Function118e7e
+ dw Function11878d
+ dw BattleTowerRoomMenu_DoNothing
+ dw Function118e76
+ dw BattleTowerRoomMenu_CallRoomMenu2
+ dw Function118e76
+; 118671
+
+Function118671: ; 118671
+ jumptable .Jumptable, wcf66
+; 118680
+
+.Jumptable: ; 118680
+ dw Function118866
+ dw Function118880
+ dw Function11878d
+ dw Function1188b0
+ dw Function11878d
+ dw Function1188b8
+ dw Function11878d
+ dw Function1188c0
+ dw Function11878d
+ dw Function1188c8
+ dw Function11878d
+ dw Function118903
+ dw Function119380
+ dw Function119388
+ dw Function1193a0
+ dw Function11878d
+ dw Function118e6d
+ dw Function11878d
+ dw Function118e76
+ dw Function118e7e
+ dw Function11878d
+ dw BattleTowerRoomMenu_DoNothing
+ dw Function118e76
+ dw BattleTowerRoomMenu_CallRoomMenu2
+ dw Function118e76
+; 1186b2
+
+Function1186b2: ; 1186b2
+ jumptable .Jumptable, wcf66
+; 1186c1
+
+.Jumptable: ; 1186c1
+ dw Function118866
+ dw Function118880
+ dw Function11878d
+ dw Function1188b0
+ dw Function11878d
+ dw Function1188b8
+ dw Function11878d
+ dw Function1188c0
+ dw Function11878d
+ dw Function1188c8
+ dw Function11878d
+ dw Function118903
+ dw Function119380
+ dw Function1193e3
+ dw Function1193fb
+ dw Function11878d
+ dw Function119413
+ dw Function118e6d
+ dw Function11878d
+ dw Function118e76
+ dw Function118e7e
+ dw Function11878d
+ dw BattleTowerRoomMenu_DoNothing
+ dw Function118e76
+ dw BattleTowerRoomMenu_CallRoomMenu2
+ dw Function118e76
+; 1186f5
+
+Function1186f5: ; 1186f5 (46:46f5)
+ jumptable .Jumptable, wcf66
+; 118704 (46:4704)
+
+.Jumptable: ; 118704 (46:4704)
+ dw Function11886a
+ dw Function118880
+ dw Function11878d
+ dw Function1188b0
+ dw Function11878d
+ dw Function1188b8
+ dw Function11878d
+ dw Function1188c0
+ dw Function11878d
+ dw Function1188c8
+ dw Function11878d
+ dw Function118903
+ dw Function118abc
+ dw Function11878d
+ dw Function119451
+ dw Function1195f8
+ dw Function119612
+ dw Function119629
+ dw Function119648
+ dw Function11878d
+ dw Function118e6d
+ dw Function11878d
+ dw Function118e76
+ dw Function118e7e
+ dw Function11878d
+ dw BattleTowerRoomMenu_DoNothing
+ dw Function11967d
+ dw Function119685
+ dw Function119665
+ dw Function11966d
+ dw Function118e76
+ dw BattleTowerRoomMenu_CallRoomMenu2
+ dw Function118e76
+; 118746 (46:4746)
+
+Function118746: ; 118746
+ jumptable .Jumptable, wcf66
+; 118755
+
+.Jumptable: ; 118755
+ dw Function11886e
+ dw Function118880
+ dw Function11878d
+ dw Function1188b0
+ dw Function11878d
+ dw Function1188b8
+ dw Function11878d
+ dw Function1188c0
+ dw Function11878d
+ dw Function1188c8
+ dw Function11878d
+ dw Function118903
+ dw Function118ad0
+ dw Function11878d
+ dw Function1196f2
+ dw Function1197c9
+ dw Function1197dc
+ dw Function11878d
+ dw Function118e6d
+ dw Function11878d
+ dw Function119800
+ dw Function118e76
+ dw Function118e7e
+ dw Function11878d
+ dw BattleTowerRoomMenu_DoNothing
+ dw Function118e76
+ dw BattleTowerRoomMenu_CallRoomMenu2
+ dw Function118e76
+; 11878d
+
+Function11878d: ; 11878d (46:478d)
+ ld a, [wc821]
+ bit 1, a
+ jr nz, .asm_1187af
+ bit 2, a
+ jr nz, .asm_1187d1
+ bit 0, a
+ jr nz, .asm_1187aa
+ ld a, [wcd89]
+ and $1
+ jr z, .asm_1187a7
+ ld a, $3
+ ld [rSVBK], a
+.asm_1187a7
+ jp BattleTowerRoomMenu_IncrementJumptable
+.asm_1187aa
+ call Function118821
+ ret c
+ ret
+.asm_1187af
+ ld a, $0
+ call Function3e32
+ ld [wc300], a
+ ld a, l
+ ld [wc301], a
+ ld a, h
+ ld [wc302], a
+ ld a, $a
+ call Function3e32
+ ld a, [wc3f0]
+ ld [$c319], a
+ ld a, [wcd34]
+ ld [wcf66], a
+ ret
+.asm_1187d1
+ ld hl, wcd89
+ bit 0, [hl]
+ jr nz, .asm_118803
+ set 0, [hl]
+ ld a, $6
+ ld [rSVBK], a
+ ld de, w3_d000
+ ld bc, $1000
+ ld a, [hl]
+ sla a
+ jr c, .asm_1187f9
+ sla a
+ jr c, .asm_1187fd
+ sla a
+ jr c, .asm_1187f5
+ ld a, $24
+ jr .asm_1187ff
+.asm_1187f5
+ ld a, $28
+ jr .asm_1187ff
+.asm_1187f9
+ ld a, $2a
+ jr .asm_1187ff
+.asm_1187fd
+ ld a, $2c
+.asm_1187ff
+ call Function3e32
+ ret
+.asm_118803
+ ld a, $d3
+
+Function118805: ; 118805 (46:4805)
+ ld [wc300], a
+ xor a
+ ld [wc301], a
+ ld [wc302], a
+ ld a, $a
+ call Function3e32
+ ld a, [wc3f0]
+ ld [$c319], a
+ ld a, [wcd34]
+ ld [wcf66], a
+ ret
+
+Function118821: ; 118821 (46:4821)
+ ld a, [$c319]
+ cp $3
+ jr c, .asm_11884a
+ cp $4
+ jr z, .asm_11884a
+ ld a, [hJoyDown]
+ cp $5
+ jr nz, .asm_11884a
+ ld a, $a
+ call Function3e32
+ ld a, $a
+ ld [wc300], a
+ ld a, [wc3f0]
+ ld [$c319], a
+ ld a, [wcd34]
+ ld [wcf66], a
+ scf
+ ret
+.asm_11884a
+ and a
+ ret
+; 11884c (46:484c)
+
+Function11884c: ; 11884c
+ ld a, [hJoyDown]
+ cp $5
+ jr nz, .asm_118864
+ ld a, $a
+ call Function3e32
+ ld a, $a
+ ld [wc300], a
+ ld a, [wcd34]
+ ld [wcf66], a
+ scf
+ ret
+
+.asm_118864
+ and a
+ ret
+; 118866
+
+Function118866:
+ ld a, 2
+ jr asm_11886f
+
+Function11886a: ; 11886a (46:486a)
+ ld a, 1
+ jr asm_11886f
+; 11886e (46:486e)
+
+Function11886e:
+ xor a
+
+asm_11886f
+ ld [BGMapPalBuffer], a
+ ld a, $0
+ ld [wcd3c], a
+ call BattleTowerRoomMenu_IncrementJumptable
+ ld a, [wcd33]
+ ld [wMobileInactivityTimerSeconds], a
+
+Function118880: ; 118880 (46:4880)
+ call BattleTowerRoomMenu2
+ ret c
+ xor a
+ ld [wcf64], a
+ ld [wc807], a
+ ld de, wcd81
+ ld hl, $46
+ ld a, $2
+ jp Function119e2b
+; 118896 (46:4896)
+
+Function118896: ; 118896
+ ld a, [wc821]
+ bit 1, a
+ jr nz, .asm_1188a5
+ bit 2, a
+ jr nz, .asm_1188a5
+ bit 0, a
+ jr z, .asm_1188aa
+
+.asm_1188a5
+ ld a, $34
+ jp Function119e2b
+
+.asm_1188aa
+ call BattleTowerRoomMenu_IncrementJumptable
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 1188b0
+
+Function1188b0: ; 1188b0 (46:48b0)
+ ld de, $c346
+ ld a, $c
+ jp Function119e2b
+
+Function1188b8: ; 1188b8 (46:48b8)
+ ld de, wc3ac
+ ld a, $e
+ jp Function119e2b
+
+Function1188c0: ; 1188c0 (46:48c0)
+ ld de, wc3cd
+ ld a, $10
+ jp Function119e2b
+
+Function1188c8: ; 1188c8 (46:48c8)
+ ld a, $1
+ ld [wcd65], a
+ call Function1188e7
+ ld hl, $c708
+.asm_1188d3
+ ld a, [de]
+ inc de
+ ld [hli], a
+ and a
+ jr nz, .asm_1188d3
+ call Function119eb4
+ call Function119ec2
+ ld hl, $c708
+ ld a, $6
+ jp Function119e2b
+
+Function1188e7: ; 1188e7 (46:48e7)
+ ld de, $c346
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$aa4a]
+ call CloseSRAM
+ and a
+ ret z
+ sla a
+ ld c, a
+.asm_1188fa
+ ld a, [de]
+ inc de
+ and a
+ jr nz, .asm_1188fa
+ dec c
+ jr nz, .asm_1188fa
+ ret
+
+Function118903: ; 118903 (46:4903)
+ ld a, [wc3f0]
+ ld [$c319], a
+ ld c, $1
+ farcall Function115e18
+ ld a, $8
+ ld [wcd3c], a
+ call BattleTowerRoomMenu2
+ jp BattleTowerRoomMenu_IncrementJumptable
+
+
+Function11891c: ; 11891c
+ call Function118b42
+ jp BattleTowerRoomMenu_IncrementJumptable
+
+
+BattleTowerRoomMenu_PickLevelMessage: ; 118922
+ ld a, [wcd38]
+ and a
+ jr nz, .asm_11892d
+ ld hl, Text_WhatLevelDoYouWantToChallenge
+ jr .asm_118930
+
+.asm_11892d
+ ld hl, Text_CheckBattleRoomListByMaxLevel
+
+.asm_118930
+ call BattleTowerRoomMenu_SetMessage
+ call BattleTowerRoomMenu_IncrementJumptable
+
+BattleTowerRoomMenu_PlacePickLevelMenu:
+ ld a, [$c31a]
+ and a
+ ret nz
+ ld hl, MenuDataHeader_119cf7
+ call LoadMenuDataHeader
+ call MenuBox
+ call MenuBoxCoord2Tile
+ call ApplyTilemap
+ hlcoord 16, 8, AttrMap
+ ld a, $40
+ or [hl]
+ ld [hl], a
+ call WaitBGMap2
+ ld a, $1
+ ld [wcd4f], a
+ ld a, $1
+ ld [rSVBK], a
+ ld a, [StatusFlags]
+ bit 6, a ; Hall Of Fame
+ jr nz, .asm_11896b
+ ld hl, Strings_Ll0ToL40 ; Address to list of strings with the choosable levels
+ ld a, 5 ; 4 levels to choose from, including 'Cancel'-option
+ jr .asm_118970
+
+.asm_11896b
+ ld hl, Strings_L10ToL100 ; Address to list of strings with the choosable levels
+ ld a, 11 ; 10 levels to choose from, including 'Cancel'-option
+
+.asm_118970
+ ld [wcd4a], a
+ ld a, l
+ ld [wcd4b], a
+ ld a, h
+ ld [wcd4c], a
+ ld a, $3
+ ld [rSVBK], a
+ call BattleTowerRoomMenu_IncrementJumptable
+
+BattleTowerRoomMenu_UpdatePickLevelMenu:
+ hlcoord 13, 8
+ ld de, String_119d07
+ call PlaceString
+ hlcoord 13, 10
+ ld de, String_119d07
+ call PlaceString
+ ld a, [wcd4b]
+ ld l, a
+ ld a, [wcd4c]
+ ld h, a
+ ld d, $0
+ ld a, [wcd4f]
+ dec a
+ rlca
+ rlca
+ rlca
+ ld e, a
+ add hl, de
+ ld a, l
+ ld e, a
+ ld a, h
+ ld d, a
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld bc, StringBuffer3
+.asm_1189b5
+ ld a, [hli]
+ cp $50
+ jr z, .asm_1189c4
+ cp $7f
+ jr z, .asm_1189c2
+ ld [bc], a
+ inc bc
+ jr .asm_1189b5
+
+.asm_1189c2
+ ld a, $50
+
+.asm_1189c4
+ ld [bc], a
+ pop af
+ ld [rSVBK], a
+ hlcoord 13, 9
+ call PlaceString
+ ld hl, hJoyPressed
+ ld a, [hl]
+ and B_BUTTON
+ jr nz, .b_button
+ ld a, [hl]
+ and A_BUTTON
+ jr nz, .a_button
+ ld a, [hl]
+ and D_DOWN
+ jr nz, .d_down
+ ld a, [hl]
+ and D_UP
+ jr nz, .d_up
+.asm_1189e5
+ ret
+
+.d_down
+ ld hl, wcd4f
+ dec [hl]
+ jr nz, .asm_1189e5
+ ld a, [wcd4a]
+ ld [hl], a
+ jr .asm_1189e5
+
+.d_up
+ ld a, [wcd4a]
+ ld hl, wcd4f
+ inc [hl]
+ cp [hl]
+ jr nc, .asm_1189e5
+ ld a, $1
+ ld [hl], a
+ jr .asm_1189e5
+
+.a_button
+ call PlayClickSFX
+ ld a, [wcd4f]
+ ld hl, wcd4a
+ cp [hl]
+ jr z, .asm_118a3c
+ dec a
+ and $fe
+ srl a
+ ld [wcf65], a
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ call CloseWindow
+ pop af
+ ld [rSVBK], a
+ ld a, [wcd38]
+ and a
+ jr nz, .asm_118a30
+ call BattleTower_LevelCheck
+ ret c
+ call BattleTower_UbersCheck
+ ret c
+
+.asm_118a30
+ ld a, [wcd4f]
+ ld [w3_d800], a
+ jp BattleTowerRoomMenu_IncrementJumptable
+
+.b_button
+ call PlayClickSFX
+
+.asm_118a3c
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ call CloseWindow
+ pop af
+ ld [rSVBK], a
+ ld a, $7
+ ld [wcf66], a
+ ld a, $0
+ ld [wMobileInactivityTimerFrames], a
+ ret
+
+
+
+Function118a54: ; 118a54
+ ld a, [wcd55]
+ ld l, a
+ ld a, [wcd56]
+ ld h, a
+ ld de, wc3ec
+ ld bc, $0004
+ jp Function118ae4
+; 118a65
+
+Function118a65: ; 118a65
+ ld hl, BattleDownloadURL
+ ld de, wcc60
+ ld bc, $80
+ call CopyBytes
+ ld de, w3_d000
+ ld bc, $1000
+ jp Function118b10
+; 118a7a
+
+Function118a7a: ; 118a7a
+ ld hl, BattleDownloadURL
+ ld de, wcc60
+ ld bc, $80
+ call CopyBytes
+ ld de, w3_d000
+ ld bc, $1000
+ jp Function118b10
+; 118a8f
+
+Function118a8f: ; 118a8f
+ ld hl, ExchangeDownloadURL
+ ld de, wcc60
+ ld bc, $80
+ call CopyBytes
+ ld de, w3_d000
+ ld bc, $1000
+ jp Function118b10
+; 118aa4
+
+Function118aa4: ; 118aa4
+ ld hl, NewsDownloadURL
+ ld de, wcc60
+ ld bc, $80
+ call CopyBytes
+ ld a, $5
+ ld [rSVBK], a
+ ld de, w3_d100
+ ld bc, $e00
+ jr Function118b10
+; 118abc
+
+Function118abc: ; 118abc (46:4abc)
+ ld hl, MenuDownloadURL
+ ld de, wcc60
+ ld bc, $80
+ call CopyBytes
+ ld de, w3_d000
+ ld bc, $1000
+ jr Function118b10
+; 118ad0 (46:4ad0)
+
+Function118ad0:
+ ld hl, IndexDownloadURL
+ ld de, wcc60
+ ld bc, $80
+ call CopyBytes
+ ld de, w3_d000
+ ld bc, $1000
+ jr Function118b10
+
+Function118ae4:
+ push bc
+ push de
+ push hl
+ ld a, $8
+ ld [wcd3c], a
+ call BattleTowerRoomMenu2
+ pop hl
+ ld c, $0
+ ld de, wcc60
+.asm_118af5
+ ld a, [hli]
+ ld [de], a
+ inc de
+ and a
+ jr z, .asm_118b06
+ inc c
+ ld a, c
+ cp $a6
+ jr c, .asm_118af5
+ ld a, $da
+ jp Function118805
+
+.asm_118b06
+ call Function118b24
+ pop de
+ pop bc
+ ld a, $2a
+ jp Function119e2b
+; 118b10
+
+Function118b10:
+ push de
+ push bc
+ ld a, $8
+ ld [wcd3c], a
+ call BattleTowerRoomMenu2
+ call Function118b24
+ pop bc
+ pop de
+ ld a, $2a
+ jp Function119e2b
+
+Function118b24: ; 118b24 (46:4b24)
+ ld hl, $c346
+ ld a, $8
+ ld [hli], a
+ ld a, $c7
+ ld [hli], a
+ ld a, $60
+ ld [hli], a
+ ld a, $cc
+ ld [hli], a
+ call Function119eb4
+ call Function119ec2
+ ld a, $80
+ ld [wcd89], a
+ ld hl, $c346
+ ret
+; 118b42 (46:4b42)
+
+Function118b42: ; 118b42
+ ld hl, wd002
+ ld a, l
+ ld [wcd51], a
+ ld a, h
+ ld [wcd52], a
+ call Function118b8c
+ ld a, l
+ ld [wcd55], a
+ ld [wcd59], a
+ ld a, h
+ ld [wcd56], a
+ ld [wcd5a], a
+ call Function118b8c
+ ld a, l
+ ld [wcd53], a
+ ld [wcd5d], a
+ ld a, h
+ ld [wcd54], a
+ ld [wcd5e], a
+ call Function118b8c
+ ld a, l
+ ld [wcd57], a
+ ld [wcd5b], a
+ ld a, h
+ ld [wcd58], a
+ ld [wcd5c], a
+ call Function118b8c
+ ld a, l
+ ld [wcd5f], a
+ ld a, h
+ ld [wcd60], a
+ ret
+; 118b8c
+
+Function118b8c: ; 118b8c
+.asm_118b8c
+ call Function118b9a
+ ret nc
+ ld a, [hli]
+ cp $d
+ jr nz, .asm_118b8c
+ dec hl
+ xor a
+ ld [hli], a
+ ld [hli], a
+ ret
+; 118b9a
+
+Function118b9a: ; 118b9a
+ ld a, h
+ cp $e0
+ ret c
+ ld a, $d3
+ call Function118805
+ and a
+ ret
+; 118ba5
+
+
+ charmap " ", $20 ; revert to ascii
+
+ExchangeDownloadURL: ; 0x118ba5
+ db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/exchange/index.txt", 0
+
+BattleDownloadURL: ; 0x118bf7
+ db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/battle/index.txt", 0
+
+NewsDownloadURL: ; 0x118c47
+ db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/news/index.txt", 0
+
+MenuDownloadURL: ; 0x118c95
+ db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/POKESTA/menu.cgb", 0
+
+IndexDownloadURL: ; 0x118ce5
+ db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/tamago/index.txt", 0
+
+
+Function118d35: ; 118d35
+; unreferenced
+ ld hl, $d200
+ ld a, [wcd38]
+ and a
+ jr nz, .asm_118d6e
+ ld a, [hli]
+ cp $94
+ jr nz, .asm_118d7b
+ ld a, [hl]
+ cp $5
+ jr nz, .asm_118d7b
+ ld a, [wcd4f]
+ sla a
+ ld b, a
+ sla a
+ sla a
+ add b
+ ld b, a
+ ld a, $5
+ call GetSRAMBank
+ ld a, b
+ ld [$b2fb], a
+ call CloseSRAM
+ farcall Function170be4
+ farcall Function1700c4
+ jr .asm_118d78
+
+.asm_118d6e
+ ld a, [hli]
+ cp $96
+ jr nz, .asm_118d7b
+ ld a, [hl]
+ cp $0
+ jr nz, .asm_118d7b
+
+.asm_118d78
+ jp BattleTowerRoomMenu_IncrementJumptable
+
+.asm_118d7b
+ ld a, $d3
+ jp Function118805
+; 118d80
+
+Function118d80: ; 118d80
+ call Function118e06
+ ld a, [wcd38]
+ and a
+ jr z, .asm_118d8e
+ call BattleTowerRoomMenu_IncrementJumptable
+ jr asm_118d9f
+
+.asm_118d8e
+ ld a, $9
+ ld [wcd3c], a
+ ld a, $12
+ ld [wMobileInactivityTimerSeconds], a
+ call BattleTowerRoomMenu_IncrementJumptable
+
+Function118d9b:
+ call BattleTowerRoomMenu2
+ ret c
+
+asm_118d9f
+ ld hl, $c608
+ call Function119940
+ ld a, [wcd38]
+ and a
+ jr nz, .asm_118db2
+ ld a, $8f
+ ld [wcd3b], a
+ jr .asm_118db7
+
+.asm_118db2
+ ld a, $26
+ ld [wcd3b], a
+
+.asm_118db7
+ ld hl, w3_d800
+ ld a, $8
+ ld [hli], a
+ ld a, $c6
+ ld [hli], a
+ ld a, [wcd3b]
+ ld [hli], a
+ xor a
+ ld [hli], a
+ ld a, $8
+ ld [hli], a
+ ld a, $c7
+ ld [hli], a
+ ld a, [wcd39]
+ ld [hli], a
+ ld a, [wcd3a]
+ ld [hli], a
+ call Function119eb4
+ call Function119ec2
+ ld a, $40
+ ld [wcd89], a
+ ld hl, w3_d800
+ ld de, $de00
+ ld bc, $0200
+ ld a, $2c
+ jp Function119e2b
+; 118ded
+
+Function118ded: ; 118ded
+ ld a, [wcd38]
+ and a
+ jr z, .asm_118e03
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ farcall Function11b93b
+ pop af
+ ld [rSVBK], a
+
+.asm_118e03
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 118e06
+
+Function118e06: ; 118e06
+ ld hl, wd002
+ ld a, [wcd38]
+ and a
+ jr z, .asm_118e1d
+.asm_118e0f
+ call Function118b9a
+ ret nc
+ ld a, [hli]
+ cp $d
+ jr nz, .asm_118e0f
+ ld a, [hli]
+ cp $a
+ jr nz, .asm_118e0f
+
+.asm_118e1d
+ ld a, l
+ ld [wcd39], a
+ ld a, h
+ ld [wcd3a], a
+.asm_118e25
+ call Function118b9a
+ ret nc
+ ld a, [hli]
+ cp $d
+ jr nz, .asm_118e25
+ ld a, [hli]
+ cp $a
+ jr nz, .asm_118e25
+ dec hl
+ xor a
+ ld [hld], a
+ ld [hl], a
+ jr asm_118e3e
+
+Function118e39: ; 118e39 (46:4e39)
+.asm_118e39
+ ld a, [hli]
+ and a
+ jr nz, .asm_118e39
+ dec hl
+asm_118e3e
+.asm_118e3e
+ ld a, [hld]
+ cp $2f
+ jr nz, .asm_118e3e
+ inc hl
+ inc hl
+ ld de, wcd85
+ ld c, $4
+.asm_118e4a
+ ld a, [hli]
+ cp $2e
+ jr z, .asm_118e63
+ cp $30
+ jr c, .asm_118e67
+ cp $3a
+ jr nc, .asm_118e67
+ sub $30
+ add $f6
+ ld [de], a
+ inc de
+ dec c
+ jr nz, .asm_118e4a
+ ld de, wcd85
+.asm_118e63
+ ld a, $50
+ ld [de], a
+ ret
+.asm_118e67
+ ld a, $f3
+ ld [de], a
+ inc de
+ jr .asm_118e63
+
+Function118e6d: ; 118e6d (46:4e6d)
+ xor a
+ ld [wcd65], a
+ ld a, $a
+ jp Function119e2b
+
+Function118e76: ; 118e76 (46:4e76)
+ ; Call $c in BattleTowerRoomMenu2
+ ld a, $c
+ ld [wcd3c], a
+ jp BattleTowerRoomMenu_IncrementJumptable
+
+Function118e7e: ; 118e7e (46:4e7e)
+ call BattleTowerRoomMenu2
+ ret c
+ ld a, $36
+ jp Function119e2b
+
+BattleTowerRoomMenu_CallRoomMenu2: ; 118e87 (46:4e87)
+ call BattleTowerRoomMenu2
+ ret c
+ ld a, [wcd33]
+ ld [wcf66], a
+ ret
+; 118e92 (46:4e92)
+
+Function118e92: ; 118e92
+ call Function118440
+ call Function1191d3
+ ld a, [wcd53]
+ ld l, a
+ ld a, [wcd54]
+ ld h, a
+ ld de, wcc60
+ call Function1191ad
+ ret c
+ ld de, w3_d800
+ ld bc, $0800
+ jp Function118b10
+; 118eb0
+
+Function118eb0: ; 118eb0
+ call Function118440
+ ld hl, $d802
+ ld de, BGMapBuffer
+ ld bc, $000c
+ call CopyBytes
+ call Function1192cc
+ ret c
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 118ec6
+
+Function118ec6: ; 118ec6
+ call Function118440
+ call SpeechTextBox
+ ld hl, $d80e
+ ld de, $c320
+ ld bc, $0026
+ call CopyBytes
+ xor a
+ ld [$c31f], a
+ ld a, $20
+ ld [$c31b], a
+ ld a, $c3
+ ld [$c31c], a
+ hlcoord 1, 14
+ ld a, l
+ ld [$c31d], a
+ ld a, h
+ ld [$c31e], a
+ ld a, $2
+ ld [$c31a], a
+ ld a, $1d
+ ld [wcd3c], a
+ ld a, $24
+ ld [wMobileInactivityTimerSeconds], a
+ ld a, $11
+ ld [wMobileInactivityTimerFrames], a
+ ld a, $1c
+ ld [wcd47], a
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 118f0d
+
+Function118f0d: ; 118f0d
+ call BattleTowerRoomMenu2
+ ret c
+ call Function118440
+
+Function118f14:
+ call Function118440
+ ld a, [wcd51]
+ ld l, a
+ ld a, [wcd52]
+ ld h, a
+ ld de, wcc60
+ call Function1191ad
+ ret c
+ ld a, [wcc60]
+ and a
+ jr z, .DontSendSaveFile
+ ld hl, Text_SaveFileWillBeSent
+ call BattleTowerRoomMenu_SetMessage
+
+.DontSendSaveFile:
+ ld a, [wcd57]
+ ld l, a
+ ld a, [wcd58]
+ ld h, a
+ ld de, wcc60
+ call Function1191ad
+ ret c
+ ld hl, wcc60
+ call Function118e39
+ ld a, $9
+ ld [wcd3c], a
+ ld a, $24
+ ld [wMobileInactivityTimerSeconds], a
+ ld a, $13
+ ld [wMobileInactivityTimerFrames], a
+ ld a, $1c
+ ld [wcd47], a
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 118f5e
+
+Function118f5e: ; 118f5e
+ call BattleTowerRoomMenu2
+ ret c
+ call Function118440
+ call DelayFrame
+
+Function118f68:
+ call Function119223
+ ret c
+ call Function118440
+ ld a, [wcd51]
+ ld l, a
+ ld a, [wcd52]
+ ld h, a
+ ld de, wcc60
+ call Function1191ad
+ ret c
+ ld a, [wcc60]
+ and a
+ jr z, .asm_118fba
+ ld hl, $c346
+ ld a, $c608 % $100
+ ld [hli], a
+ ld a, $c608 / $100
+ ld [hli], a
+ ld a, [wcd4b]
+ ld [hli], a
+ ld a, [wcd4c]
+ ld [hli], a
+ ld a, $c708 % $100
+ ld [hli], a
+ ld a, $c708 / $100
+ ld [hli], a
+ ld a, $60
+ ld [hli], a
+ ld a, $cc
+ ld [hli], a
+ call Function119eb4
+ call Function119ec2
+ ld a, $40
+ ld [wcd89], a
+ ld hl, $c346
+ ld de, $de00
+ ld bc, $0200
+ ld a, $2c
+ jp Function119e2b
+
+.asm_118fba
+ call BattleTowerRoomMenu_IncrementJumptable
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 118fc0
+
+Function118fc0: ; 118fc0
+ call Function118440
+ ld a, [wcd55]
+ ld l, a
+ ld a, [wcd56]
+ ld h, a
+ ld de, wcc60
+ call Function1191ad
+ ret c
+ ld a, [wcc60]
+ and a
+ jr z, .asm_118ffa
+ ld a, [wcd51]
+ ld l, a
+ ld a, [wcd52]
+ ld h, a
+ ld de, wcc60
+ call Function1191ad
+ ret c
+ ld a, [wcc60]
+ and a
+ jr z, .asm_118ff2
+ ld hl, Text_SentSaveFileReadingNews
+ jr .asm_118ff5
+
+.asm_118ff2
+ ld hl, Text_ReadingNews
+
+.asm_118ff5
+ call BattleTowerRoomMenu_SetMessage
+ jr Function119009
+
+.asm_118ffa
+ ld hl, Text_ReadingNews
+ call BattleTowerRoomMenu_SetMessage
+ call BattleTowerRoomMenu_IncrementJumptable
+ call BattleTowerRoomMenu_IncrementJumptable
+ jp BattleTowerRoomMenu_IncrementJumptable
+
+Function119009:
+ call Function118440
+ call Function119300
+ ld a, [wcd55]
+ ld l, a
+ ld a, [wcd56]
+ ld h, a
+ ld de, wcc60
+ call Function1191ad
+ ret c
+ ld hl, $c346
+ ld a, $8
+ ld [hli], a
+ ld a, $c6
+ ld [hli], a
+ ld a, [wcd4b]
+ ld [hli], a
+ ld a, [wcd4c]
+ ld [hli], a
+ ld a, $8
+ ld [hli], a
+ ld a, $c7
+ ld [hli], a
+ ld a, $60
+ ld [hli], a
+ ld a, $cc
+ ld [hli], a
+ call Function119eb4
+ call Function119ec2
+ ld a, $40
+ ld [wcd89], a
+ ld hl, $c346
+ ld de, w3_d000
+ ld bc, $1000
+ ld a, $2c
+ jp Function119e2b
+; 119054
+
+Function119054: ; 119054
+ ld a, $6
+ call GetSRAMBank
+ ld hl, wd002
+ ld a, [wcd4f]
+ ld e, a
+ ld a, [wcd50]
+ ld d, a
+ ld a, [w3_d000]
+ ld c, a
+ ld a, [w3_d000 + 1]
+ ld b, a
+ call Function119192
+ ret c
+ ld a, [wcd89]
+ and $1
+ jr z, .asm_11908a
+ ld a, $6
+ ld [rSVBK], a
+ ld hl, wd002
+ ld a, [w3_d000]
+ ld c, a
+ ld a, [w3_d000 + 1]
+ ld b, a
+ call Function119192
+ ret c
+
+.asm_11908a
+ call CloseSRAM
+ ld a, $3
+ ld [rSVBK], a
+ ld a, $5
+ call GetSRAMBank
+ ld a, [wcd4f]
+ ld [$b1b3], a
+ ld a, [wcd50]
+ ld [$b1b4], a
+ ld hl, BGMapBuffer
+ ld de, $aa7f
+ ld bc, $000c
+ call CopyBytes
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld a, [wd474]
+ ld [$b2f3], a
+ ld hl, wd475
+ ld de, $b2f4
+ ld bc, $0004
+ call CopyBytes
+ pop af
+ ld [rSVBK], a
+ call CloseSRAM
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 1190d0
+
+Function1190d0: ; 1190d0
+ ld a, $3
+ ld [rSVBK], a
+ ld a, [wcd57]
+ ld l, a
+ ld a, [wcd58]
+ ld h, a
+ ld de, wcc60
+ call Function1191ad
+ ret c
+ ld de, w3_d000
+ ld bc, $1000
+ jp Function118b10
+; 1190ec
+
+Function1190ec: ; 1190ec
+ ld a, $5
+ call GetSRAMBank
+ ld hl, BGMapBuffer
+ ld de, $aa73
+ ld bc, $000c
+ call CopyBytes
+ call CloseSRAM
+ ld a, $5
+ call GetSRAMBank
+ ld a, $1
+ ld [$aa72], a
+ call CloseSRAM
+ ld a, $6
+ call GetSRAMBank
+ ld a, [w3_d000]
+ ld c, a
+ ld a, [w3_d000 + 1]
+ ld b, a
+ ld hl, wd002
+ ld de, $a000
+ call Function119192
+ ret c
+ ld a, [wcd89]
+ and $1
+ jr z, .asm_11913e
+ ld a, $6
+ ld [rSVBK], a
+ ld a, [w3_d000]
+ ld c, a
+ ld a, [w3_d000 + 1]
+ ld b, a
+ ld hl, wd002
+ call Function119192
+ ret c
+
+.asm_11913e
+ ld a, $3
+ ld [rSVBK], a
+ call CloseSRAM
+ ld hl, Text_ReceivedNews
+ call BattleTowerRoomMenu_SetMessage
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 11914e
+
+Function11914e: ; 11914e
+ call BattleTowerRoomMenu2
+ ret c
+ ld a, $1c
+ ld [wcf66], a
+ ld a, $a
+ ld [wc300], a
+ ret
+; 11915d
+
+Function11915d: ; 11915d
+ ld hl, $d802
+ ld de, BGMapBuffer
+ ld bc, $000c
+ call CopyBytes
+ ld a, $5
+ call GetSRAMBank
+ ld hl, BGMapBuffer
+ ld de, $aa7f
+ ld c, $c
+.asm_119176
+ ld a, [de]
+ inc de
+ cp [hl]
+ jr nz, .asm_119184
+ inc hl
+ dec c
+ jr nz, .asm_119176
+ call BattleTowerRoomMenu_IncrementJumptable
+ jr .asm_11918e
+
+.asm_119184
+ ld a, $16
+ ld [wcf66], a
+ ld a, $b
+ ld [wc300], a
+
+.asm_11918e
+ call CloseSRAM
+ ret
+; 119192
+
+Function119192: ; 119192
+ inc b
+ inc c
+ jr .asm_11919e
+
+.asm_119196
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, $bf
+ cp d
+ jr c, .asm_1191a6
+
+.asm_11919e
+ dec c
+ jr nz, .asm_119196
+ dec b
+ jr nz, .asm_119196
+ and a
+ ret
+
+.asm_1191a6
+ ld a, $d3
+ call Function118805
+ scf
+ ret
+; 1191ad
+
+Function1191ad: ; 1191ad
+ push bc
+ ld c, $0
+ ld a, $5
+ ld [rSVBK], a
+.asm_1191b4
+ ld a, [hli]
+ ld [de], a
+ inc de
+ and a
+ jr z, .asm_1191cc
+ inc c
+ ld a, c
+ cp $a6
+ jr c, .asm_1191b4
+ ld a, $da
+ call Function118805
+ ld a, $3
+ ld [rSVBK], a
+ pop bc
+ scf
+ ret
+
+.asm_1191cc
+ ld a, $3
+ ld [rSVBK], a
+ pop bc
+ and a
+ ret
+; 1191d3
+
+Function1191d3: ; 1191d3
+ ld hl, w3_d100 + 2
+ ld a, l
+ ld [wcd53], a
+ ld a, h
+ ld [wcd54], a
+ call Function11920f
+ ld a, l
+ ld [wcd51], a
+ ld a, [wcd4a]
+ ld a, h
+ ld [wcd52], a
+ call Function11920f
+ ld a, l
+ ld [wcd55], a
+ ld a, [wcd4a]
+ ld a, h
+ ld [wcd56], a
+ call Function11920f
+ ld a, [wcd49]
+ ld a, l
+ ld [wcd57], a
+ ld a, [wcd4a]
+ ld a, h
+ ld [wcd58], a
+ call Function11920f
+ ret
+; 11920f
+
+Function11920f: ; 11920f
+.asm_11920f
+ call Function118b9a
+ ret nc
+ ld a, [hli]
+ cp $d
+ jr nz, .asm_11920f
+ ld a, [hli]
+ cp $a
+ jr nz, .asm_11920f
+ dec hl
+ xor a
+ ld [hld], a
+ ld [hli], a
+ inc hl
+ ret
+; 119223
+
+Function119223: ; 119223
+ xor a
+ ld [wcd4b], a
+ ld [wcd4c], a
+ ld a, $5
+ call GetSRAMBank
+ ld hl, wc3cd
+ ld de, $b092
+ ld bc, $001f
+ call CopyBytes
+ dec de
+ xor a
+ ld [de], a
+ ld hl, $d810
+.asm_119241
+ ld a, [hli]
+ cp $50
+ jr nz, .asm_119241
+ ld a, [hli]
+ ld [wcd4f], a
+ ld a, [hli]
+ ld [wcd50], a
+ ld a, [hli]
+ ld [$b1b1], a
+ ld c, a
+ ld a, [hli]
+ ld [$b1b2], a
+ ld b, a
+ ld de, $b1d3
+ call CopyBytes
+ call CloseSRAM
+ ld e, l
+ ld d, h
+ ld hl, $c608
+.asm_119266
+ ld a, [de]
+ inc de
+ cp $ff
+ jr z, .asm_1192c2
+ cp $fe
+ jr z, .asm_1192a5
+ call GetSRAMBank
+ ld a, [de]
+ inc de
+ ld c, a
+ ld a, [de]
+ inc de
+ ld b, a
+ ld a, [de]
+ inc de
+ push de
+ push af
+ ld a, [wcd4b]
+ ld e, a
+ ld a, [wcd4c]
+ ld d, a
+ pop af
+.asm_119286
+ push af
+ ld a, [bc]
+ inc bc
+ ld [hli], a
+ inc de
+ pop af
+ dec a
+ jr nz, .asm_119286
+ call CloseSRAM
+ ld a, e
+ ld [wcd4b], a
+ ld a, d
+ ld [wcd4c], a
+ pop de
+.asm_11929b
+ and a
+ jr z, .asm_119266
+ ld a, $d3
+ call Function118805
+ scf
+ ret
+
+.asm_1192a5
+ ld a, [wcd4b]
+ ld c, a
+ ld a, [wcd4c]
+ ld b, a
+ ld a, [de]
+ inc de
+.asm_1192af
+ push af
+ ld a, [de]
+ inc de
+ ld [hli], a
+ inc bc
+ pop af
+ dec a
+ jr nz, .asm_1192af
+ ld a, c
+ ld [wcd4b], a
+ ld a, b
+ ld [wcd4c], a
+ jr .asm_11929b
+
+.asm_1192c2
+ ld a, e
+ ld [wcd4d], a
+ ld a, d
+ ld [wcd4e], a
+ and a
+ ret
+; 1192cc
+
+Function1192cc: ; 1192cc
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $aa73
+ ld de, $c608
+ ld bc, $000c
+ call CopyBytes
+ call CloseSRAM
+ ld hl, $c608
+ ld de, BGMapBuffer
+ ld c, $c
+.asm_1192e8
+ ld a, [de]
+ inc de
+ ld b, a
+ ld a, [hli]
+ cp b
+ jr nz, .asm_1192fe
+ dec c
+ jr nz, .asm_1192e8
+ ld a, $1f
+ ld [wcd3c], a
+ ld a, $27
+ ld [wcf66], a
+ scf
+ ret
+
+.asm_1192fe
+ and a
+ ret
+; 119300
+
+Function119300: ; 119300
+ xor a
+ ld [wcd4b], a
+ ld [wcd4c], a
+ ld a, [wcd4d]
+ ld e, a
+ ld a, [wcd4e]
+ ld d, a
+ ld hl, $c608
+ ld a, [wcd4b]
+ ld c, a
+ ld a, [wcd4c]
+ ld b, a
+.asm_11931a
+ ld a, [de]
+ inc de
+ cp $50
+ jr z, .asm_119324
+ ld [hli], a
+ inc bc
+ jr .asm_11931a
+
+.asm_119324
+ ld a, $3d
+ ld [hli], a
+ inc bc
+ ld a, c
+ ld [wcd4b], a
+ ld a, b
+ ld [wcd4c], a
+ ld a, [de]
+ inc de
+ call GetSRAMBank
+ ld a, [de]
+ inc de
+ ld c, a
+ ld a, [de]
+ inc de
+ ld b, a
+ ld a, [de]
+ inc de
+ push de
+ push af
+ ld a, [wcd4b]
+ ld e, a
+ ld a, [wcd4c]
+ ld d, a
+ pop af
+.asm_119348
+ push af
+ ld a, [bc]
+ and $f0
+ swap a
+ call Function1197bf
+ ld [hli], a
+ inc de
+ ld a, [bc]
+ inc bc
+ and $f
+ call Function1197bf
+ ld [hli], a
+ inc de
+ pop af
+ dec a
+ jr nz, .asm_119348
+ call CloseSRAM
+ ld a, e
+ ld [wcd4b], a
+ ld a, d
+ ld [wcd4c], a
+ pop de
+ ld a, [de]
+ cp $50
+ jr z, .asm_11937f
+ ld a, [wcd4b]
+ ld c, a
+ ld a, [wcd4c]
+ ld b, a
+ ld a, $26
+ ld [hli], a
+ inc bc
+ jr .asm_11931a
+
+.asm_11937f
+ ret
+; 119380
+
+Function119380: ; 119380
+ ld a, $80
+ ld [wcd49], a
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 119388
+
+Function119388: ; 119388
+ ld hl, wcd49
+ dec [hl]
+ ret nz
+ ld hl, wcc60
+ call Function118e39
+ ld a, $9
+ ld [wcd3c], a
+ ld a, $10
+ ld [wMobileInactivityTimerSeconds], a
+ call BattleTowerRoomMenu_IncrementJumptable
+
+Function1193a0:
+ call BattleTowerRoomMenu2
+ ret c
+ call DelayFrame
+ ld a, $8
+ ld [wcd3c], a
+ call BattleTowerRoomMenu2
+ ld hl, $c346
+ ld a, wd000 % $100
+ ld [hli], a
+ ld a, wd000 / $100
+ ld [hli], a
+ ld a, [wcd3b]
+ ld [hli], a
+ xor a
+ ld [hli], a
+ ld a, $c708 % $100
+ ld [hli], a
+ ld a, $c708 / $100
+ ld [hli], a
+ ld a, $60
+ ld [hli], a
+ ld a, $cc
+ ld [hli], a
+ call Function119eb4
+ call Function119ec2
+ ld a, $40
+ ld [wcd89], a
+ ld hl, $c346
+ ld de, $de00
+ ld bc, $0200
+ ld a, $2c
+ jp Function119e2b
+; 1193e3
+
+Function1193e3: ; 1193e3
+ ld hl, wcd49
+ dec [hl]
+ ret nz
+ ld hl, wcc60
+ call Function118e39
+ ld a, $9
+ ld [wcd3c], a
+ ld a, $11
+ ld [wMobileInactivityTimerSeconds], a
+ call BattleTowerRoomMenu_IncrementJumptable
+
+Function1193fb:
+ call BattleTowerRoomMenu2
+ ret c
+ call DelayFrame
+ ld a, $8
+ ld [wcd3c], a
+ call BattleTowerRoomMenu2
+ ld de, w3_d000
+ ld bc, $1000
+ jp Function118b10
+; 119413
+
+Function119413: ; 119413
+ ld a, $6
+ call GetSRAMBank
+ ld a, [w3_d000]
+ ld c, a
+ ld a, [w3_d000 + 1]
+ ld b, a
+ dec bc
+ dec bc
+ ld hl, wd002
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ call Function119192
+ ret c
+ ld a, [wcd89]
+ and $1
+ jr z, .asm_119447
+ ld a, $6
+ ld [rSVBK], a
+ ld a, [wd000]
+ ld c, a
+ ld a, [w3_d000 + 1]
+ ld b, a
+ ld hl, wd002
+ call Function119192
+ ret c
+
+.asm_119447
+ ld a, $3
+ ld [rSVBK], a
+ call CloseSRAM
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 119451
+
+Function119451: ; 119451 (46:5451)
+ ld a, [wcd89]
+ and $1
+ jr z, .asm_11945d
+ ld a, $d3
+ jp Function118805
+.asm_11945d
+ xor a
+ ld [wcd50], a
+ call Function119694
+ ld a, b
+ ld [wcd49], a
+ call Function1196cd
+ ld a, [wd002]
+ ld hl, wd003
+
+Function119471: ; 119471 (46:5471)
+ push af
+ ld a, [hli]
+ ld [$c608], a
+ ld a, [hli]
+ ld [$c608 + 3], a
+ ld a, [hli]
+ ld [$c608 + 1], a
+ ld a, [hli]
+ ld [$c608 + 2], a
+ ld a, [hli]
+ ld [$c608 + 4], a
+ ld a, [hli]
+ ld [$c608 + 5], a ; $c608 + 5
+ push hl
+ ld a, [$c608]
+ cp $ff
+ jr z, .asm_1194a7
+ ld a, [$c608 + 2]
+ cp $ff
+ jr z, .asm_1194a7
+ ld a, [$c608 + 1]
+ cp $ff
+ jr nz, .asm_1194a7
+ call Function119584
+ jr c, .asm_11950c
+ jr .asm_1194f0
+.asm_1194a7
+ ld hl, $c608
+ ld de, $c608 + 3
+ ld c, $3
+.asm_1194af
+ ld a, [de]
+ inc de
+ cp [hl]
+ inc hl
+ jr c, .asm_1194f3
+ jr z, .asm_1194b9
+ jr nc, .asm_1194bc
+.asm_1194b9
+ dec c
+ jr nz, .asm_1194af
+.asm_1194bc
+ ld c, $3
+ ld hl, wcd49
+ ld de, $c608
+.asm_1194c4
+ ld a, [de]
+ inc de
+ cp $ff
+ jr z, .asm_1194d1
+ cp [hl]
+ jr z, .asm_1194d1
+ jr c, .asm_1194d5
+ jr nc, .asm_1194f0
+.asm_1194d1
+ inc hl
+ dec c
+ jr nz, .asm_1194c4
+.asm_1194d5
+ ld c, $3
+ ld hl, wcd49
+ ld de, $c608 + 3
+.asm_1194dd
+ ld a, [de]
+ inc de
+ cp $ff
+ jr z, .asm_1194ea
+ cp [hl]
+ jr c, .asm_1194f0
+ jr z, .asm_1194ea
+ jr nc, .asm_11950c
+.asm_1194ea
+ inc hl
+ dec c
+ jr nz, .asm_1194dd
+ jr .asm_11950c
+.asm_1194f0
+ pop hl
+ jr .asm_119557
+.asm_1194f3
+ ld c, $3
+ ld hl, wcd49
+ ld de, $c608
+.asm_1194fb
+ ld a, [de]
+ inc de
+ cp $ff
+ jr z, .asm_119508
+ cp [hl]
+ jr c, .asm_11950c
+ jr z, .asm_119508
+ jr nc, .asm_1194d5
+.asm_119508
+ inc hl
+ dec c
+ jr nz, .asm_1194fb
+.asm_11950c
+ pop hl
+ ld a, $1
+ ld [wcd50], a
+ ld a, l
+ ld [$c608], a
+ ld a, h
+ ld [$c608 + 1], a
+ ld de, wcd69
+ ld c, $10
+ ld b, $0
+.asm_119521
+ ld a, [de]
+ inc de
+ cp [hl]
+ inc hl
+ jr nz, .asm_119528
+ inc b
+.asm_119528
+ dec c
+ jr nz, .asm_119521
+ ld a, $10
+ cp b
+ jr z, .asm_119536
+rept 4
+ inc hl
+endr
+ jr .asm_11957a
+.asm_119536
+ ld a, [hli]
+ cp $50
+ jr nz, .asm_119552
+ ld a, [hli]
+ cp $33
+ jr nz, .asm_119553
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ld a, [wcd83]
+ cp c
+ jr nz, .asm_119576
+ ld a, [wcd84]
+ cp b
+ jr nz, .asm_119576
+ jr .asm_11955b
+.asm_119552
+ inc hl
+.asm_119553
+ inc hl
+ inc hl
+ jr .asm_11955b
+.asm_119557
+ ld de, $14
+ add hl, de
+.asm_11955b
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ add hl, de
+ pop af
+ dec a
+ jp nz, Function119471
+ ld a, [wcd50]
+ and a
+ jr z, .asm_119571
+ ld a, $1a
+ ld [wcf66], a
+ ret
+.asm_119571
+ ld a, $d8
+ jp Function118805
+.asm_119576
+ ld a, $10
+ jr .asm_11957c
+.asm_11957a
+ ld a, $f
+.asm_11957c
+ ld [wcf66], a
+ pop af
+ call Function1195c4
+ ret
+
+Function119584: ; 119584 (46:5584)
+ ld a, [$c608]
+ ld b, a
+ ld a, [$c608 + 3]
+ ld c, a
+ cp b
+ jr c, .asm_11959c
+ ld a, [wcd49]
+ cp b
+ jr c, .asm_1195c2
+.asm_119595
+ cp c
+ jr c, .asm_1195a2
+ jr z, .asm_1195a2
+ jr .asm_1195c2
+.asm_11959c
+ ld a, [wcd49]
+ cp b
+ jr c, .asm_119595
+.asm_1195a2
+ ld a, [$c608 + 2]
+ ld b, a
+ ld a, [$c608 + 5] ; $c608 + 5
+ ld c, a
+ cp b
+ jr c, .asm_1195ba
+ ld a, [wcd4b]
+ cp b
+ jr c, .asm_1195c2
+.asm_1195b3
+ cp c
+ jr c, .asm_1195c0
+ jr z, .asm_1195c0
+ jr .asm_1195c2
+.asm_1195ba
+ ld a, [wcd4b]
+ cp b
+ jr c, .asm_1195b3
+.asm_1195c0
+ scf
+ ret
+.asm_1195c2
+ and a
+ ret
+
+Function1195c4: ; 1195c4 (46:55c4)
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ld de, $a5
+ ld a, b
+ cp d
+ jr c, .asm_1195d9
+ jr z, .asm_1195d3
+ jr nc, .asm_1195f3
+.asm_1195d3
+ ld a, c
+ cp e
+ jr z, .asm_1195d9
+ jr nc, .asm_1195f3
+.asm_1195d9
+ ld de, wcc60
+ call CopyBytes
+ xor a
+ ld [de], a
+ ld a, [$c608]
+ ld l, a
+ ld a, [$c608 + 1]
+ ld h, a
+ ld de, wcd69
+ ld bc, $10
+ call CopyBytes
+ ret
+.asm_1195f3
+ ld a, $d8
+ jp Function118805
+
+Function1195f8: ; 1195f8 (46:55f8)
+ ld a, $11
+ ld [wcd3c], a
+ ld a, $1c
+ ld [wMobileInactivityTimerSeconds], a
+ ld a, $f
+ ld [wMobileInactivityTimerFrames], a
+ ld a, $14
+ ld [wcd47], a
+ call BattleTowerRoomMenu_IncrementJumptable
+ jp BattleTowerRoomMenu_IncrementJumptable
+
+Function119612: ; 119612 (46:5612)
+ ld a, $14
+ ld [wcd3c], a
+ ld a, $1c
+ ld [wMobileInactivityTimerSeconds], a
+ ld a, $10
+ ld [wMobileInactivityTimerFrames], a
+ ld a, $14
+ ld [wcd47], a
+ jp BattleTowerRoomMenu_IncrementJumptable
+
+Function119629: ; 119629 (46:5629)
+ call BattleTowerRoomMenu2
+ ret c
+ ld a, $60
+ ld l, a
+ ld a, $cc
+ ld h, a
+ call Function118e39
+ ld a, $9
+ ld [wcd3c], a
+ ld a, $1c
+ ld [wMobileInactivityTimerSeconds], a
+ ld a, $14
+ ld [wcd47], a
+ call BattleTowerRoomMenu_IncrementJumptable
+
+Function119648: ; 119648 (46:5648)
+ call BattleTowerRoomMenu2
+ ret c
+ call DelayFrame
+ ld a, $8
+ ld [wcd3c], a
+ call BattleTowerRoomMenu2
+ call Function118b24
+ ld de, w3_d000
+ ld bc, $1000
+ ld a, $2a
+ jp Function119e2b
+
+Function119665: ; 119665 (46:5665)
+ ld a, $1a
+ ld [wcd3c], a
+ call BattleTowerRoomMenu_IncrementJumptable
+
+Function11966d: ; 11966d (46:566d)
+ call BattleTowerRoomMenu2
+ ret c
+ ld a, [wcd47]
+ ld [wcf66], a
+ ld a, $a
+ ld [wc300], a
+ ret
+
+Function11967d: ; 11967d (46:567d)
+ ld a, $18
+ ld [wcd3c], a
+ call BattleTowerRoomMenu_IncrementJumptable
+
+Function119685: ; 119685 (46:5685)
+ call BattleTowerRoomMenu2
+ ret c
+ ld a, $14
+ ld [wcf66], a
+ ld a, $a
+ ld [wc300], a
+ ret
+
+Function119694: ; 119694 (46:5694)
+ ld b, 0
+ ld hl, Unknown_1196b8
+.asm_119699
+ ld de, $c708
+ ld a, [de]
+ inc de
+ cp [hl]
+ inc hl
+ jr nz, .asm_1196af
+ ld a, [de]
+ inc de
+ cp [hl]
+ inc hl
+ jr nz, .asm_1196b0
+ ld a, [de]
+ inc de
+ cp [hl]
+ inc hl
+ jr nz, .asm_1196b1
+ ret
+.asm_1196af
+ inc hl
+.asm_1196b0
+ inc hl
+.asm_1196b1
+ inc b
+ ld a, b
+ cp $7
+ jr nz, .asm_119699
+ ret
+; 1196b8 (46:56b8)
+
+Unknown_1196b8: ; 1196b8
+ db "Mon"
+ db "Tue"
+ db "Wed"
+ db "Thu"
+ db "Fri"
+ db "Sat"
+ db "Sun"
+; 1196cd
+
+
+SECTION "bank46_2", ROMX
+; A hack to use ascii above.
+
+Function1196cd: ; 1196cd (46:56cd)
+ ld de, $c719
+ call Function1196de
+ ld [wcd4a], a
+ inc de
+ call Function1196de
+ ld [wcd4b], a
+ ret
+
+Function1196de: ; 1196de (46:56de)
+ ld a, [de]
+ inc de
+ ; b = ([de] - 48) * 2
+ ; c = ([de] - 48) * 10
+ sub $30
+ sla a
+ ld b, a
+ sla a
+ sla a
+ add b
+ ld c, a
+ add hl, bc
+ ld a, [de]
+ inc de
+ sub $30
+ add c
+ ret
+; 1196f2 (46:56f2)
+
+Function1196f2: ; 1196f2
+ ld hl, wd002
+.asm_1196f5
+ call Function118b9a
+ ret nc
+ ld a, [hli]
+ cp $d
+ jr nz, .asm_1196f5
+ ld a, [hl]
+ cp $a
+ jr nz, .asm_1196f5
+ xor a
+ ld [hld], a
+ ld [hli], a
+ ld a, l
+ ld [wcd5b], a
+ ld a, h
+ ld [wcd5c], a
+ inc hl
+ ld e, l
+ ld d, h
+ ld a, [de]
+ inc de
+ cp $d
+ jr nz, .asm_119722
+ ld a, [de]
+ inc de
+ cp $a
+ jr nz, .asm_119722
+ ld a, $b
+ jp Function118805
+
+.asm_119722
+ call Random
+ ld c, $0
+ ld b, c
+.asm_119728
+ call Function119798
+ ld a, d
+ cp $ff
+ jr nz, .asm_119735
+ ld a, e
+ cp $ff
+ jr z, .asm_11974c
+
+.asm_119735
+ ld a, [hRandomSub]
+ cp d
+ jr c, .asm_11974c
+ jr z, .asm_11973e
+ jr .asm_119745
+
+.asm_11973e
+ ld a, [hRandomAdd]
+ cp e
+ jr c, .asm_11974c
+ jr z, .asm_11974c
+
+.asm_119745
+ inc bc
+ ld a, c
+ or b
+ jr z, .asm_119770
+ jr .asm_119728
+
+.asm_11974c
+ ld a, [wcd5b]
+ ld l, a
+ ld a, [wcd5c]
+ ld h, a
+.asm_119754
+ ld a, [hld]
+ cp $58
+ jr nz, .asm_119754
+ ld d, $0
+.asm_11975b
+ inc d
+ ld a, [hld]
+ cp $58
+ jr z, .asm_11975b
+ inc hl
+ inc hl
+ ld a, d
+ dec a
+ jr z, .asm_11978e
+ dec a
+ jr z, .asm_119785
+ dec a
+ jr z, .asm_11977e
+ dec a
+ jr z, .asm_119775
+
+.asm_119770
+ ld a, $d3
+ jp Function118805
+
+.asm_119775
+ ld a, b
+ and $f0
+ swap a
+ call Function1197bf
+ ld [hli], a
+
+.asm_11977e
+ ld a, b
+ and $f
+ call Function1197bf
+ ld [hli], a
+
+.asm_119785
+ ld a, c
+ and $f0
+ swap a
+ call Function1197bf
+ ld [hli], a
+
+.asm_11978e
+ ld a, c
+ and $f
+ call Function1197bf
+ ld [hli], a
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 119798
+
+Function119798: ; 119798
+ ld d, $0
+ ld e, d
+ call Function1197b4
+ swap a
+ or d
+ ld d, a
+ call Function1197b4
+ or d
+ ld d, a
+ call Function1197b4
+ swap a
+ or e
+ ld e, a
+ call Function1197b4
+ or e
+ ld e, a
+ ret
+; 1197b4
+
+Function1197b4: ; 1197b4
+ ld a, [hli]
+ cp $61
+ jr nc, .asm_1197bc
+ sub $30
+ ret
+
+.asm_1197bc
+ sub $57
+ ret
+; 1197bf
+
+Function1197bf: ; 1197bf
+ cp $a
+ jr nc, .asm_1197c6
+ add $30
+ ret
+
+.asm_1197c6
+ add $57
+ ret
+; 1197c9
+
+Function1197c9: ; 1197c9
+ ld hl, wd002
+ call Function118e39
+ ld a, $9
+ ld [wcd3c], a
+ ld a, $12
+ ld [wMobileInactivityTimerSeconds], a
+ call BattleTowerRoomMenu_IncrementJumptable
+
+Function1197dc:
+ call BattleTowerRoomMenu2
+ ret c
+ call DelayFrame
+ ld hl, wd002
+ ld de, wcc60
+ ld bc, $0080
+ call CopyBytes
+ dec de
+ xor a
+ ld [de], a
+ call Function118b24
+ ld de, w3_d000
+ ld bc, $1000
+ ld a, $2a
+ jp Function119e2b
+; 119800
+
+Function119800: ; 119800
+ ld a, $fd
+ ld [$c6d0], a
+ ld [wOTTrademonSpecies], a
+ ld a, [wcd81]
+ ld [wc74e], a
+ ld a, [wJumptableIndex]
+ push af
+ ld a, [wcf64]
+ push af
+ ld a, [wcf65]
+ push af
+ ld a, [wcf66]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ call FadeToMenu
+ farcall Function10803d
+ call Function11a9ce
+ call RestartMapMusic
+ ld a, $3
+ ld [rSVBK], a
+ pop af
+ ld [wcf66], a
+ pop af
+ ld [wcf65], a
+ pop af
+ ld [wcf64], a
+ pop af
+ ld [wJumptableIndex], a
+ farcall Function115dc3
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 11984e
+
+Function11984e: ; 11984e
+ ld a, [wcd80]
+ and a
+ jr nz, .asm_1198a0
+ ld a, [wcd38]
+ and a
+ jr nz, .asm_1198a8
+ farcall Function170000
+ ld a, [wJumptableIndex]
+ push af
+ ld a, [wcf64]
+ push af
+ ld a, [wcf65]
+ push af
+ ld a, [wcf66]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ call FadeToMenu
+ farcall MobileTradeAnimation_SendGivemonToGTS
+ call Function11a9ce
+ call RestartMapMusic
+ ld a, $3
+ ld [rSVBK], a
+ pop af
+ ld [wcf66], a
+ pop af
+ ld [wcf65], a
+ pop af
+ ld [wcf64], a
+ pop af
+ ld [wJumptableIndex], a
+ farcall Function115dc3
+ jp BattleTowerRoomMenu_IncrementJumptable
+
+.asm_1198a0
+ ld a, $a
+ ld [wc300], a
+ jp BattleTowerRoomMenu_IncrementJumptable
+
+.asm_1198a8
+ farcall Function17005a
+ ld a, [wJumptableIndex]
+ push af
+ ld a, [wcf64]
+ push af
+ ld a, [wcf65]
+ push af
+ ld a, [wcf66]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ call FadeToMenu
+ farcall MobileTradeAnimation_RetrieveGivemonFromGTS
+ call Function11a9ce
+ call RestartMapMusic
+ ld a, $3
+ ld [rSVBK], a
+ pop af
+ ld [wcf66], a
+ pop af
+ ld [wcf65], a
+ pop af
+ ld [wcf64], a
+ pop af
+ ld [wJumptableIndex], a
+ farcall Function115dc3
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 1198ee
+
+Function1198ee: ; 1198ee
+ ld hl, Text_RegisteringRecord
+ call BattleTowerRoomMenu_SetMessage
+ call BattleTowerRoomMenu_IncrementJumptable
+
+Function1198f7:
+ ld a, [$c31a]
+ and a
+ ret nz
+ ld hl, $c608 + 2
+ call Function119940
+ ld hl, w3_d800
+ ld a, $c608 % $100
+ ld [hli], a
+ ld a, $c608 / $100
+ ld [hli], a
+ ld a, $f6
+ ld [hli], a
+ xor a
+ ld [hli], a
+ ld a, $c708 % $100
+ ld [hli], a
+ ld a, $c708 / $100
+ ld [hli], a
+ ld a, [wcd51]
+ ld [hli], a
+ ld a, [wcd52]
+ ld [hli], a
+ call Function119eb4
+ call Function119ec2
+ ld a, $40
+ ld [wcd89], a
+ ld hl, w3_d800
+ ld de, $de00
+ ld bc, $0200
+ ld a, $2c
+ jp Function119e2b
+; 119937
+
+Function119937: ; 119937
+ farcall Function1707f4
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 119940
+
+Function119940: ; 119940
+ ld de, wc3cd
+ ld c, $1e
+.asm_119945
+ ld a, [de]
+ inc de
+ ld [hli], a
+ dec c
+ jr z, .asm_119953
+ and a
+ jr nz, .asm_119945
+ xor a
+.asm_11994f
+ ld [hli], a
+ dec c
+ jr nz, .asm_11994f
+
+.asm_119953
+ ret
+; 119954
+
+Function119954: ; 119954
+ ld a, $1c
+ ld [wcd3c], a
+ call BattleTowerRoomMenu2
+ ld hl, $c608
+ ld de, wc3cd
+.asm_119962
+ ld a, [de]
+ inc de
+ ld [hli], a
+ and a
+ jr nz, .asm_119962
+ call Function119ec2
+ ld hl, $c608
+ ld a, $1e
+ jp Function119e2b
+; 119973
+
+Function119973: ; 119973
+ ld a, $1
+ ld [wcf64], a
+ xor a
+ ld [wcf65], a
+ ld [w3_d090], a
+ ld de, w3_d000
+ ld a, $20
+ jp Function119e2b
+; 119987
+
+Function119987: ; 119987
+ ld hl, w3_d000 + 1
+ ld a, [w3_d000]
+ or [hl]
+ jr z, .asm_1199a0
+ ld a, [wcf64]
+ ld l, a
+ ld a, [wcf65]
+ ld h, a
+ ld de, BGPals
+ ld a, $22
+ jp Function119e2b
+
+.asm_1199a0
+ ld a, [w3_d090]
+ and a
+ jr z, .asm_1199ae
+ ld a, $16
+ ld [wcf66], a
+ jp Function119b0d
+
+.asm_1199ae
+ ld a, $1b
+ ld [wcf66], a
+ ret
+; 1199b4
+
+Function1199b4: ; 1199b4
+ ld a, [wd000 + 130]
+ and a
+ jr nz, .asm_1199c7
+ ld a, [wd000 + 129]
+ cp $7
+ jr nc, .asm_1199c7
+ call BattleTowerRoomMenu_IncrementJumptable
+ jp Function1199ca
+
+.asm_1199c7
+ jp Function119ac9
+; 1199ca
+
+Function1199ca: ; 1199ca
+ ld a, $20
+ ld [wcd89], a
+ ld a, [wcf64]
+ ld l, a
+ ld a, [wcf65]
+ ld h, a
+ ld de, w3_d100
+ ld bc, $0700
+ ld a, $28
+ jp Function119e2b
+; 1199e2
+
+Function1199e2: ; 1199e2
+ ld c, $c
+ ld de, XGameCodePrefix
+ call Function119e4f
+ jp c, Function119ac9
+ ld a, c
+ cp $1
+ jp nz, Function119ac9
+ ld hl, w3_d880
+ ld bc, XGameCode
+.loop
+ ld a, [bc]
+ and a
+ jr z, .game_result_prefix
+ cp [hl]
+ jp nz, Function119ac9
+ inc bc
+ inc hl
+ jr .loop
+
+.game_result_prefix
+ ld c, $17
+ ld de, XGameResultPrefix
+ call Function119e4f
+ jp c, .asm_119aa7
+ ld a, c
+ cp $1
+ jp nz, .asm_119aa7
+ ld a, [w3_d880]
+ cp $31
+ jp nz, .asm_119aa7
+ ld a, [w3_d881]
+ cp $20
+ jp nz, .asm_119aa7
+ ld a, [w3_d88a]
+ cp $20
+ jp nz, .asm_119aa7
+ ld a, [w3_d894]
+ cp $20
+ jp nz, .asm_119aa7
+ xor a
+ ld [w3_d8a0], a
+ ld [w3_d8a1], a
+ ld [w3_d8a2], a
+ ld [w3_d8a3], a
+ ld hl, $d8a0
+ ld bc, $d889
+ call Function119e98
+ call Function119e98
+ ld hl, $d8a0
+ ld a, [wcd2d]
+ cp [hl]
+ jr nz, Function119ac9
+ inc hl
+ ld a, [wcd2c]
+ cp [hl]
+ jr nz, Function119ac9
+ inc hl
+ ld a, [wcd2b]
+ cp [hl]
+ jr nz, Function119ac9
+ inc hl
+ ld a, [wcd2a]
+ cp [hl]
+ jr nz, Function119ac9
+ xor a
+ ld [w3_d8a0], a
+ ld [w3_d8a1], a
+ ld [w3_d8a2], a
+ ld [w3_d8a3], a
+ ld hl, $d8a0
+ ld bc, $d88e
+ call Function119e98
+ ld bc, $d893
+ call Function119e98
+ ld hl, $d8a0
+ ld a, [wcd2f]
+ cp [hl]
+ jr nz, .asm_119aa7
+ inc hl
+ ld a, [wcd2e]
+ cp [hl]
+ jr nz, .asm_119aa7
+ inc hl
+ ld a, [wcd31]
+ cp [hl]
+ jr nz, .asm_119aa7
+ inc hl
+ ld a, [wcd30]
+ cp [hl]
+ jr z, .asm_119aaf
+
+.asm_119aa7
+ ld a, $25
+ ld [wcf66], a
+ jp Function119b45
+
+.asm_119aaf
+ ld a, [w3_d090]
+ and a
+ jr nz, .asm_119aa7
+ ld a, [w3_d895]
+ sub $30
+ ld [w3_d090], a
+ ld a, [wcf64]
+ ld [w3_d090 + 1], a
+ ld a, [wcf65]
+ ld [w3_d090 + 2], a
+
+Function119ac9:
+ ld a, [w3_d000]
+ ld l, a
+ ld a, [w3_d000 + 1]
+ ld h, a
+ dec hl
+ ld a, l
+ ld [w3_d000], a
+ ld a, h
+ ld [w3_d000 + 1], a
+ ld a, [wcf64]
+ ld l, a
+ ld a, [wcf65]
+ ld h, a
+ inc hl
+ ld a, l
+ ld [wcf64], a
+ ld a, h
+ ld [wcf65], a
+ ld a, $10
+ ld [wcf66], a
+ ret
+; 119af1
+
+XGameCode:
+INCBIN "data/mobile/x-game-code.txt"
+XGameResult:
+INCBIN "data/mobile/x-game-result.txt"
+; 119b0d
+
+Function119b0d: ; 119b0d
+ ld a, $8
+ ld [wcd3c], a
+ call BattleTowerRoomMenu2
+ ld a, [w3_d090]
+ cp $1
+ jr z, .asm_119b23
+ ld a, $19
+ ld [wcf66], a
+ jr Function119b3b
+
+.asm_119b23
+ ld a, $10
+ ld [wcd89], a
+ ld a, [w3_d090 + 1]
+ ld l, a
+ ld a, [w3_d090 + 2]
+ ld h, a
+ ld de, w3_d100
+ ld bc, $0700
+ ld a, $24
+ jp Function119e2b
+
+Function119b3b:
+ ld a, [w3_d090 + 1]
+ ld l, a
+ ld a, [w3_d090 + 2]
+ ld h, a
+ jr asm_119b4d
+
+Function119b45:
+ ld a, [wcf64]
+ ld l, a
+ ld a, [wcf65]
+ ld h, a
+
+asm_119b4d
+ ld a, $26
+ jp Function119e2b
+; 119b52
+
+Function119b52: ; 119b52
+ ld a, [w3_d090]
+ cp $1
+ jr nz, .asm_119b66
+ ld a, $5
+ call GetSRAMBank
+ ld a, $4
+ ld [$a800], a
+ call CloseSRAM
+
+.asm_119b66
+ ld a, $1c
+ jp Function119e2b
+; 119b6b
+
+Function119b6b: ; 119b6b
+ ld a, [w3_d090]
+ cp $1
+ jr z, .asm_119b75
+ jp BattleTowerRoomMenu_IncrementJumptable
+
+.asm_119b75
+ ld a, [w3_d100]
+ ld b, a
+ ld a, [w3_d100 + 1]
+ or b
+ jr z, .asm_119be3
+ ld hl, w3_d800
+ ld de, w3_d100 + 2
+.asm_119b85
+ ld a, [de]
+ inc de
+ cp $d
+ jr nz, .asm_119b85
+ inc de
+ ld a, [de]
+ cp $d
+ jr nz, .asm_119b85
+ inc de
+ inc de
+.asm_119b93
+ ld a, [de]
+ inc de
+ cp $d
+ jr z, .asm_119bfa
+ call Function119c3e
+ ret c
+ ld [hli], a
+ ld a, [de]
+ inc de
+ call Function119c3e
+ ret c
+ ld [hli], a
+ ld a, [de]
+ inc de
+ call Function119c3e
+ ret c
+ ld [hli], a
+ ld a, [de]
+ inc de
+ call Function119c3e
+ ret c
+ ld [hl], a
+ push de
+ ld d, [hl]
+ dec hl
+ ld c, [hl]
+ dec hl
+ ld b, [hl]
+ dec hl
+ ld a, [hl]
+ sla b
+ sla b
+ sla b
+ rla
+ sla b
+ rla
+ ld [hli], a
+ ld [hl], b
+ inc hl
+ rrc c
+ rrc c
+ ld [hl], c
+ dec hl
+ ld a, $f
+ and c
+ or [hl]
+ ld [hli], a
+ ld a, [hli]
+ and $c0
+ or [hl]
+ dec hl
+ ld [hld], a
+ dec hl
+ pop de
+ inc hl
+ inc hl
+ inc hl
+ ld a, h
+ cp $e0
+ jr c, .asm_119b93
+
+.asm_119be3
+ ld a, $19
+ ld [wcf66], a
+ ld a, $5
+ call GetSRAMBank
+ ld a, $1
+ ld [$a800], a
+ call CloseSRAM
+ xor a
+ ld [w3_d090], a
+ ret
+
+.asm_119bfa
+ inc de
+ ld a, [de]
+ cp $d
+ jr nz, .asm_119b93
+ ld a, l
+ cp (w3_d869) % $100
+ jr nz, .asm_119be3
+ ld a, h
+ cp (w3_d869) / $100
+ jr nz, .asm_119be3
+ ld a, $5
+ call GetSRAMBank
+ ld a, [wcf64]
+ ld [$b090], a
+ ld a, [wcf65]
+ ld [$b091], a
+ ld hl, w3_d800
+ ld de, $b023
+ ld bc, $0069
+ call CopyBytes
+ ld a, $3
+ ld [$a800], a
+ call CloseSRAM
+ ld hl, w3_d800
+ ld de, $c608
+ ld bc, $0069
+ call CopyBytes
+ jp BattleTowerRoomMenu_IncrementJumptable
+; 119c3e
+
+Function119c3e: ; 119c3e
+ cp $2b
+ jr c, .asm_119c68
+ jr z, .asm_119c80
+ cp $2f
+ jr c, .asm_119c68
+ jr z, .asm_119c84
+ cp $30
+ jr c, .asm_119c68
+ cp $3a
+ jr c, .asm_119c88
+ cp $3d
+ jr c, .asm_119c68
+ jr z, .asm_119c8c
+ cp $41
+ jr c, .asm_119c68
+ cp $5b
+ jr c, .asm_119c8f
+ cp $61
+ jr c, .asm_119c68
+ cp $7b
+ jr c, .asm_119c93
+
+.asm_119c68
+ ld a, $19
+ ld [wcf66], a
+ ld a, $5
+ call GetSRAMBank
+ ld a, $1
+ ld [$a800], a
+ call CloseSRAM
+ xor a
+ ld [w3_d090], a
+ scf
+ ret
+
+.asm_119c80
+ ld a, $3e
+ and a
+ ret
+
+.asm_119c84
+ ld a, $3f
+ and a
+ ret
+
+.asm_119c88
+ add $4
+ and a
+ ret
+
+.asm_119c8c
+ xor a
+ and a
+ ret
+
+.asm_119c8f
+ sub $41
+ and a
+ ret
+
+.asm_119c93
+ sub $47
+ and a
+ ret
+; 119c97
+
+BattleTowerRoomMenu_UberRestrictionMessage: ; 119c97
+ ld hl, Text_UberRestriction
+ call BattleTowerRoomMenu_SetMessage
+ call BattleTowerRoomMenu_IncrementJumptable
+ jr BattleTowerRoomMenu_WaitForMessage
+
+BattleTowerRoomMenu_PartyMonTopsThisLevelMessage:
+ ld hl, Text_PartyMonTopsThisLevel
+ call BattleTowerRoomMenu_SetMessage
+ call BattleTowerRoomMenu_IncrementJumptable
+
+BattleTowerRoomMenu_WaitForMessage:
+ ld a, [$c31a]
+ and a
+ ret nz
+ ld a, $80
+ ld [wcd50], a
+ call BattleTowerRoomMenu_IncrementJumptable
+
+BattleTowerRoomMenu_DelayRestartMenu:
+ ; Loops while (--[wcd50] != 0),
+ ; to create some sort of "delay" after the message is written on the screen,
+ ; before starting the menu again.
+ ld hl, wcd50
+ dec [hl]
+ ret nz
+ ld a, $0
+ ld [wcf66], a
+ ret
+; 119cc3
+
+BattleTowerRoomMenu_QuitMessage: ; 119cc3
+ ld a, [wcd38]
+ and a
+ jr z, .asm_119cd1
+ dec a
+ jr z, .asm_119cd6
+ ld hl, Text_QuitReadingNews
+ jr .asm_119cd9
+
+.asm_119cd1
+ ld hl, Text_CancelBattleRoomChallenge
+ jr .asm_119cd9
+
+.asm_119cd6
+ ld hl, Text_ExitGymLeaderHonorRoll
+
+.asm_119cd9
+ call BattleTowerRoomMenu_SetMessage
+ call BattleTowerRoomMenu_IncrementJumptable
+
+BattleTowerRoomMenu_PlaceYesNoMenu:
+ ld a, [$c31a]
+ and a
+ ret nz
+ ld a, $f
+ ld [wcd3c], a
+ call BattleTowerRoomMenu_IncrementJumptable
+
+BattleTowerRoomMenu_UpdateYesNoMenu:
+ ; Only ever called when [wcd3c] is $10
+ call BattleTowerRoomMenu2
+ ret c
+ ld a, [wMobileInactivityTimerFrames]
+ ld [wcf66], a
+ ret
+; 119cf7
+
+MenuDataHeader_119cf7: ; 119cf7
+ db $40 ; flags
+ db 7, 12 ; start coords
+ db 11, 19 ; end coords
+ dw NULL
+ db 0 ; default option
+; 119cff
+
+MenuData_119cff: ; 119cff
+ db $40 ; flags
+ db 7, 15 ; start coords
+ db 11, 19 ; end coords
+ dw NULL
+ db 0 ; default option
+; 119d07
+
+String_119d07:
+ db " ▼@"
+
+Strings_L10ToL100: ; 119d0c
+ db " L:10 @@"
+ db " L:20 @@"
+ db " L:30 @@"
+ db " L:40 @@"
+ db " L:50 @@"
+ db " L:60 @@"
+ db " L:70 @@"
+ db " L:80 @@"
+ db " L:90 @@"
+ db " L:100@@"
+ db "CANCEL@@"
+
+Strings_Ll0ToL40: ; 119d64
+ db " L:10 @@"
+ db " L:20 @@"
+ db " L:30 @@"
+ db " L:40 @@"
+ db "CANCEL@@"
+
+String_119d8c:
+ db "CANCEL@"
+; 119d93
+
+BattleTower_LevelCheck: ; 119d93 (46:5d93)
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld a, [wcd4f]
+ ld c, 10
+ call SimpleMultiply
+ ld hl, wcd50
+ ld [hl], a
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld de, PartyMon1Level
+ ld a, [PartyCount]
+.party_loop
+ push af
+ ld a, [de]
+ push hl
+ push de
+ pop hl
+ add hl, bc
+ push hl
+ pop de
+ pop hl
+ cp [hl]
+ jr z, .equal
+ jr nc, .exceeds
+.equal
+ pop af
+ dec a
+ jr nz, .party_loop
+ pop af
+ ld [rSVBK], a
+ and a
+ ret
+
+.exceeds
+ pop af
+ ld a, $4
+ ld [wcf66], a
+ pop af
+ ld [rSVBK], a
+ scf
+ ret
+
+BattleTower_UbersCheck: ; 119dd1 (46:5dd1)
+ ld a, [rSVBK]
+ push af
+ ld a, [wcd4f]
+ cp 70 / 10
+ jr nc, .level_70_or_more
+ ld a, $1
+ ld [rSVBK], a
+ ld hl, PartyMon1Level
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld de, PartySpecies
+ ld a, [PartyCount]
+.loop
+ push af
+ ld a, [de]
+ cp MEWTWO
+ jr z, .uber
+ cp MEW
+ jr z, .uber
+ cp LUGIA
+ jr c, .next
+ cp NUM_POKEMON + 1
+ jr nc, .next
+.uber
+ ld a, [hl]
+ cp 70
+ jr c, .uber_under_70
+.next
+ add hl, bc
+ inc de
+ pop af
+ dec a
+ jr nz, .loop
+.level_70_or_more
+ pop af
+ ld [rSVBK], a
+ and a
+ ret
+
+.uber_under_70
+ pop af
+ ld a, [de]
+ ld [wd265], a
+ call GetPokemonName
+ ld hl, StringBuffer1
+ ld de, wcd49
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+ ld a, $a
+ ld [wcf66], a
+ pop af
+ ld [rSVBK], a
+ scf
+ ret
+; 119e2b (46:5e2b)
+
+Function119e2b: ; 119e2b (46:5e2b)
+ call Function3e32
+
+BattleTowerRoomMenu_IncrementJumptable: ; 119e2e (46:5e2e)
+ ld hl, wcf66
+ inc [hl]
+ ret
+; 119e33 (46:5e33)
+
+XGameCodePrefix: ; 119e33
+INCBIN "data/mobile/x-game-code-prefix.txt"
+XGameCodePrefixEnd:
+;119e40
+
+XGameResultPrefix: ; 119e40
+INCBIN "data/mobile/x-game-result-prefix.txt"
+XGameResultPrefixEnd:
+; 119e4f
+
+Function119e4f: ; 119e4f
+ push bc
+ ld hl, w3_d100
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+.loop
+ ld a, [de]
+ cp [hl]
+ jr z, .found_equality
+.next
+ inc hl
+ dec bc
+ ld a, b
+ or c
+ jr nz, .loop
+.return_carry
+ pop bc
+ scf
+ ret
+
+.found_equality
+ push de
+.loop2
+ ld a, [de]
+ inc de
+ cp "\n"
+ jr z, .newline
+ cp [hl]
+ jr nz, .unequal
+ inc hl
+ dec bc
+ ld a, b
+ or c
+ jr nz, .loop2
+ pop de
+ jr .return_carry
+
+.unequal
+ pop de
+ jr .next
+
+.newline
+ pop de
+ pop bc
+ inc hl
+ ld de, w3_d880
+.loop3
+ ld a, [hli]
+ ld [de], a
+ inc de
+ cp $d
+ jr z, .finish
+ dec c
+ jr nz, .loop3
+ scf
+ ret
+
+.finish
+ and a
+ ret
+; 119e8e
+
+Function119e8e: ; 119e8e
+ cp $60
+ jr c, .less_than_0x60
+ sub $57
+ ret
+
+.less_than_0x60
+ sub $30
+ ret
+; 119e98
+
+Function119e98: ; 119e98
+ ld a, $2
+.loop
+ push af
+ ld a, [bc]
+ dec bc
+ call Function119e8e
+ or [hl]
+ ld [hl], a
+ ld a, [bc]
+ dec bc
+ call Function119e8e
+ rlca
+ rlca
+ rlca
+ rlca
+ or [hl]
+ ld [hl], a
+ inc hl
+ pop af
+ dec a
+ and a
+ jr nz, .loop
+ ret
+; 119eb4
+
+Function119eb4: ; 119eb4 (46:5eb4)
+ xor a
+ ld [wc3cc], a
+ ld de, wc3ac
+.loop
+ ld a, [de]
+ inc de
+ ld [hli], a
+ and a
+ jr nz, .loop
+ ret
+
+Function119ec2: ; 119ec2 (46:5ec2)
+ ld a, BANK(sMobileLoginPassword)
+ call GetSRAMBank
+ xor a
+ ld [sMobileLoginPassword + MOBILE_LOGIN_PASSWORD_LENGTH], a
+ ld de, sMobileLoginPassword + 1
+.loop
+ ld a, [de]
+ inc de
+ ld [hli], a
+ and a
+ jr nz, .loop
+ call CloseSRAM
+ ret
+
+BattleTowerRoomMenu2: ; 119ed8 (46:5ed8)
+ ld a, [rSVBK]
+ ld [wcd8c], a
+ ld a, $1
+ ld [rSVBK], a
+
+ call .RunJumptable
+
+ ld a, [wcd8c]
+ ld [rSVBK], a
+ ld a, $1
+ ld [hBGMapMode], a
+ ret
+
+.RunJumptable:
+ jumptable .Jumptable, wcd3c
+
+.Jumptable:
+ dw Function119f3f
+ dw Function119f45
+ dw Function119f56
+ dw Function119f76
+ dw Function119f98
+ dw Function11a113
+ dw Function11a129
+ dw Function11a131
+ dw Function11a13d
+ dw Function11a14b
+ dw Function11a16d
+ dw Function11a192
+ dw Function11a2e6
+ dw Function11a302
+ dw Function11a33a
+ dw BattleTowerRoomMenu2_PlaceYesNoMenu
+ dw BattleTowerRoomMenu2_UpdateYesNoMenu
+ dw Function11a357
+ dw Function11a36b
+ dw Function11a38d
+ dw Function11a3c5
+ dw Function11a3d9
+ dw Function11a3f9
+ dw Function11a41b
+ dw Function11a452
+ dw Function11a47a
+ dw Function11a488
+ dw Function11a49e
+ dw Function11a4db
+ dw Function11a4e8
+ dw Function11a4fe
+ dw Function11a466
+ dw Function11a47a
+; 119f3f
+
+Function119f3f: ; 119f3f
+ call Function11a5b9
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 119f45
+
+Function119f45: ; 119f45
+ hlcoord 4, 2
+ ld de, String_11a661
+ call PlaceString
+ ld a, $80
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 119f56
+
+Function119f56: ; 119f56
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr z, .asm_119f62
+ dec a
+ ld [wMobileInactivityTimerMinutes], a
+ scf
+ ret
+
+.asm_119f62
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a6aa
+ call PlaceString
+ ld a, $80
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 119f76
+
+Function119f76: ; 119f76
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr z, .asm_119f82
+ dec a
+ ld [wMobileInactivityTimerMinutes], a
+ scf
+ ret
+
+.asm_119f82
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a679
+ call PlaceString
+ call Function11a5f5
+ xor a
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 119f98
+
+Function119f98: ; 119f98
+ call Function11a536
+ ret c
+ call PlayClickSFX
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr nz, .asm_119fef
+ call ExitMenu
+ call Function11a63c
+ xor a
+ ld [ScriptVar], a
+ call Function11a00e
+ ld a, [ScriptVar]
+ and a
+ jr z, .asm_119fd4
+ call ExitMenu
+ farcall ReloadMapPart
+ farcall Function115dc3
+ ld a, [wcd33]
+ ld [wcf66], a
+ ld a, $a
+ ld [wc300], a
+ scf
+ ret
+
+.asm_119fd4
+ hlcoord 4, 2
+ ld de, String_11a692
+ call PlaceString
+ ld a, $1
+ ld [wc30d], a
+ ld a, $1
+ ld [wc314], a
+ farcall ReloadMapPart
+ and a
+ ret
+
+.asm_119fef
+ call ExitMenu
+ call ExitMenu
+ farcall ReloadMapPart
+ ld a, [wMobileInactivityTimerSeconds]
+ ld [wcf66], a
+ farcall Function115dc3
+ ld a, $a
+ ld [wc300], a
+ scf
+ ret
+; 11a00e
+
+Function11a00e: ; 11a00e
+ ld a, BANK(sMobileLoginPassword)
+ call GetSRAMBank
+ ld a, [sMobileLoginPassword]
+ and a
+ jr z, .asm_11a02a
+ ld a, [sMobileLoginPassword + 1]
+ call CloseSRAM
+ and a
+ ret nz
+ ld a, BANK(sMobileLoginPassword)
+ call GetSRAMBank
+ xor a
+ ld [sMobileLoginPassword], a
+
+.asm_11a02a
+ call CloseSRAM
+ ld a, [BGMapPalBuffer]
+ and a
+ jr z, .asm_11a039
+ dec a
+ jr z, .asm_11a081
+ jp Function11a0ca
+
+.asm_11a039
+ ld a, $3
+ ld [rSVBK], a
+ ld hl, $c608
+ ld de, w3_d800
+ ld bc, $00f6
+ call CopyBytes
+ ld a, $1
+ ld [rSVBK], a
+ call FadeToMenu
+ farcall Function11765d
+ call Function11a9ce
+ ld a, $3
+ ld [rSVBK], a
+ ld hl, w3_d800
+ ld de, $c608
+ ld bc, $00f6
+ call CopyBytes
+ ld a, $1
+ ld [rSVBK], a
+ farcall Function115d99
+ ld c, $0
+ farcall Function115e18
+ ld a, $1
+ ld [wc305], a
+ ret
+
+.asm_11a081
+ xor a
+ ld [wMenuBorderLeftCoord], a
+ ld [wMenuBorderTopCoord], a
+ ld a, $13
+ ld [wMenuBorderRightCoord], a
+ ld a, $5
+ ld [wMenuBorderBottomCoord], a
+ call PushWindow
+ farcall Function11765d
+ farcall Function117ab4
+ farcall MobileFunc_106462
+ farcall Function106464
+ call ExitMenu
+ farcall ReloadMapPart
+ farcall Function115d99
+ ld c, $0
+ farcall Function115e18
+ ld a, $1
+ ld [wc305], a
+ ret
+; 11a0ca
+
+Function11a0ca: ; 11a0ca
+ xor a
+ ld [wMenuBorderLeftCoord], a
+ ld [wMenuBorderTopCoord], a
+ ld a, $13
+ ld [wMenuBorderRightCoord], a
+ ld a, $11
+ ld [wMenuBorderBottomCoord], a
+ call PushWindow
+ farcall Function11765d
+ farcall Function17d3f6
+ farcall MobileFunc_106462
+ farcall Function106464
+ call ExitMenu
+ farcall ReloadMapPart
+ farcall Function115d99
+ ld c, $0
+ farcall Function115e18
+ ld a, $1
+ ld [wc305], a
+ ret
+; 11a113
+
+Function11a113: ; 11a113
+ call Function11a63c
+ ld c, $1
+ farcall Function115e18
+ hlcoord 4, 2
+ ld de, String_11a6c8
+ call PlaceString
+ and a
+ ret
+; 11a129
+
+Function11a129: ; 11a129
+ ld a, $80
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a131
+
+Function11a131: ; 11a131
+ ld hl, wMobileInactivityTimerMinutes
+ dec [hl]
+ ret nz
+ ld a, [wcd3c]
+ inc a
+ ld [wcd3c], a
+
+Function11a13d:
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a6d2
+ call PlaceString
+ and a
+ ret
+; 11a14b
+
+Function11a14b: ; 11a14b
+ ld hl, wcd85
+ ld a, [hl]
+ cp $f3
+ jr nz, .asm_11a155
+ and a
+ ret
+
+.asm_11a155
+ call Function11a1d6
+ ret c
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a6f1
+ call PlaceString
+ ld a, $80
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a16d
+
+Function11a16d: ; 11a16d
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr z, .asm_11a179
+ dec a
+ ld [wMobileInactivityTimerMinutes], a
+ scf
+ ret
+
+.asm_11a179
+ call Function11a63c
+ call Function11a1e6
+ hlcoord 4, 2
+ ld de, $c346
+ call PlaceString
+ call Function11a5f5
+ xor a
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a192
+
+Function11a192: ; 11a192
+ call Function11a536
+ ret c
+ call PlayClickSFX
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr nz, .asm_11a1b6
+ call ExitMenu
+ farcall ReloadMapPart
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a6d2
+ call PlaceString
+ and a
+ ret
+
+.asm_11a1b6
+ call ExitMenu
+ farcall ReloadMapPart
+ ld a, [wMobileInactivityTimerSeconds]
+ ld [wcf66], a
+ ld [wcd80], a
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a6d2
+ call PlaceString
+ scf
+ ret
+; 11a1d6
+
+Function11a1d6: ; 11a1d6
+ ld a, [wcd85]
+ cp $50
+ jr nz, .asm_11a1e4
+ ld a, $d3
+ call Function118805
+ scf
+ ret
+
+.asm_11a1e4
+ and a
+ ret
+; 11a1e6
+
+Function11a1e6: ; 11a1e6
+ ld hl, String_11a706
+ ld de, $c346
+ call Function11a1ff
+ ld hl, wcd85
+ call Function11a1ff
+ ld hl, String_11a70b
+ call Function11a1ff
+ ld a, $50
+ ld [de], a
+ ret
+; 11a1ff
+
+Function11a1ff: ; 11a1ff
+.asm_11a1ff
+ ld a, [hli]
+ cp $50
+ ret z
+ ld [de], a
+ inc de
+ jr .asm_11a1ff
+; 11a207
+
+BattleTowerRoomMenu2_PlaceYesNoMenu: ; 11a207
+ ld hl, MenuDataHeader_11a2de
+ call LoadMenuDataHeader
+ call MenuBox
+ call MenuBoxCoord2Tile
+ call ApplyTilemap
+ hlcoord 16, 8
+ ld de, String_11a2cf
+ call PlaceString
+ hlcoord 16, 10
+ ld de, String_11a2d3
+ call PlaceString
+ hlcoord 15, 8
+ ld a, $ed
+ ld [hl], a
+ xor a
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a235
+
+BattleTowerRoomMenu2_UpdateYesNoMenu: ; 11a235
+ ld hl, hJoyPressed
+ ld a, [hl]
+ and A_BUTTON
+ jr nz, .a_button
+ ld a, [hl]
+ and B_BUTTON
+ jr nz, .b_button
+ ld a, [hl]
+ and D_UP
+ jr nz, .d_up
+ ld a, [hl]
+ and D_DOWN
+ jr nz, .d_down
+.asm_11a24c
+ call Function11a9f0
+ scf
+ ret
+
+.d_up
+ xor a
+ ld [wcd8a], a
+ ld [wcd8b], a
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr z, .asm_11a24c
+ xor a
+ ld [wMobileInactivityTimerMinutes], a
+ hlcoord 15, 8
+ ld a, $ed
+ ld [hl], a
+ hlcoord 15, 10
+ ld a, $7f
+ ld [hl], a
+ jr .asm_11a24c
+
+.d_down
+ xor a
+ ld [wcd8a], a
+ ld [wcd8b], a
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr nz, .asm_11a24c
+ inc a
+ ld [wMobileInactivityTimerMinutes], a
+ hlcoord 15, 8
+ ld a, $7f
+ ld [hl], a
+ hlcoord 15, 10
+ ld a, $ed
+ ld [hl], a
+ jr .asm_11a24c
+
+.a_button
+ xor a
+ ld [wcd8a], a
+ ld [wcd8b], a
+ call PlayClickSFX
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr nz, .exit_no_carry
+ call ExitMenu
+ farcall ReloadMapPart
+ ld a, [wMobileInactivityTimerFrames]
+ cp $0
+ jr z, .asm_11a2b4
+ ld a, [wcd47]
+ jr .exit_carry
+
+.asm_11a2b4
+ ld a, [wcd33]
+
+.exit_carry
+ ld [wcf66], a
+ ld a, $a
+ ld [wc300], a
+ scf
+ ret
+
+.b_button
+ call PlayClickSFX
+
+.exit_no_carry
+ call ExitMenu
+ farcall ReloadMapPart
+ and a
+ ret
+; 11a2cf
+
+String_11a2cf: ; 11a2cf
+ db "YES@"
+; 11a2d3
+
+String_11a2d3: ; 11a2d3
+ db "NO@"
+; 11a2d6
+
+MenuDataHeader_11a2d6: ; 11a2d6
+ db $40 ; flags
+ db 6, 14 ; start coords
+ db 10, 19 ; end coords
+ dw NULL
+ db 0 ; default option
+; 11a2de
+
+MenuDataHeader_11a2de: ; 11a2de
+ db $40 ; flags
+ db 7, 14 ; start coords
+ db 11, 19 ; end coords
+ dw NULL
+ db 0 ; default option
+; 11a2e6
+
+Function11a2e6: ; 11a2e6
+ call Function11a63c
+ ld c, $2
+ farcall Function115e18
+ hlcoord 4, 2
+ ld de, String_11a71e
+ call PlaceString
+ ld a, $80
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a302
+
+Function11a302: ; 11a302
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr z, .asm_11a30e
+ dec a
+ ld [wMobileInactivityTimerMinutes], a
+ scf
+ ret
+
+.asm_11a30e
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a72a
+ call PlaceString
+ hlcoord 9, 4
+ ld de, wcd68
+ lb bc, PRINTNUM_LEADINGZEROS | 1, 2
+ call PrintNum
+ hlcoord 14, 4
+ ld de, wcd67
+ lb bc, PRINTNUM_LEADINGZEROS | 1, 2
+ call PrintNum
+ ld a, $80
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a33a
+
+Function11a33a: ; 11a33a
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr z, .asm_11a346
+ dec a
+ ld [wMobileInactivityTimerMinutes], a
+ scf
+ ret
+
+.asm_11a346
+ call ExitMenu
+ farcall ReloadMapPart
+ farcall Function115dc3
+ and a
+ ret
+; 11a357
+
+Function11a357: ; 11a357
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a743
+ call PlaceString
+ ld a, $80
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a36b
+
+Function11a36b: ; 11a36b
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr z, .asm_11a377
+ dec a
+ ld [wMobileInactivityTimerMinutes], a
+ scf
+ ret
+
+.asm_11a377
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a755
+ call PlaceString
+ call Function11a5f5
+ xor a
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a38d
+
+Function11a38d: ; 11a38d
+ call Function11a536
+ ret c
+ call PlayClickSFX
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr nz, .asm_11a3b1
+ call ExitMenu
+ farcall ReloadMapPart
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a6d2
+ call PlaceString
+ and a
+ ret
+
+.asm_11a3b1
+ call ExitMenu
+ farcall ReloadMapPart
+ ld a, [wMobileInactivityTimerSeconds]
+ ld [wcf66], a
+ ld [wcd80], a
+ scf
+ ret
+; 11a3c5
+
+Function11a3c5: ; 11a3c5
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a762
+ call PlaceString
+ ld a, $80
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a3d9
+
+Function11a3d9: ; 11a3d9
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr z, .asm_11a3e5
+ dec a
+ ld [wMobileInactivityTimerMinutes], a
+ scf
+ ret
+
+.asm_11a3e5
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a779
+ call PlaceString
+ ld a, $80
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a3f9
+
+Function11a3f9: ; 11a3f9
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr z, .asm_11a405
+ dec a
+ ld [wMobileInactivityTimerMinutes], a
+ scf
+ ret
+
+.asm_11a405
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a755
+ call PlaceString
+ call Function11a5f5
+ xor a
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a41b
+
+Function11a41b: ; 11a41b
+ call Function11a536
+ ret c
+ call PlayClickSFX
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr nz, .asm_11a43f
+ call ExitMenu
+ farcall ReloadMapPart
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a6d2
+ call PlaceString
+ and a
+ ret
+
+.asm_11a43f
+ call ExitMenu
+ farcall ReloadMapPart
+ ld a, $1c
+ ld [wcf66], a
+ ld [wcd80], a
+ scf
+ ret
+; 11a452
+
+Function11a452: ; 11a452
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a791
+ call PlaceString
+ ld a, $80
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a466
+
+Function11a466: ; 11a466
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a7c1
+ call PlaceString
+ ld a, $80
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a47a
+
+Function11a47a: ; 11a47a
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr z, .asm_11a486
+ dec a
+ ld [wMobileInactivityTimerMinutes], a
+ scf
+ ret
+
+.asm_11a486
+ and a
+ ret
+; 11a488
+
+Function11a488: ; 11a488
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a7ac
+ call PlaceString
+ call Function11a5f5
+ xor a
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a49e
+
+Function11a49e: ; 11a49e
+ call Function11a536
+ ret c
+ call PlayClickSFX
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr nz, .asm_11a4c7
+ call ExitMenu
+ farcall ReloadMapPart
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a6d2
+ call PlaceString
+ ld a, $14
+ ld [wcf66], a
+ and a
+ ret
+
+.asm_11a4c7
+ call ExitMenu
+ farcall ReloadMapPart
+ ld a, [wMobileInactivityTimerFrames]
+ ld [wcf66], a
+ ld [wcd80], a
+ scf
+ ret
+; 11a4db
+
+Function11a4db: ; 11a4db
+ call Function11a63c
+ ld de, String_11a6db
+ hlcoord 4, 2
+ call PlaceString
+ ret
+; 11a4e8
+
+Function11a4e8: ; 11a4e8
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a7d7
+ call PlaceString
+ call Function11a5f5
+ xor a
+ ld [wMobileInactivityTimerMinutes], a
+ jp BattleTowerRoomMenu2_IncrementJumptable
+; 11a4fe
+
+Function11a4fe: ; 11a4fe
+ call Function11a536
+ ret c
+ call PlayClickSFX
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr nz, .asm_11a522
+ call ExitMenu
+ farcall ReloadMapPart
+ call Function11a63c
+ hlcoord 4, 2
+ ld de, String_11a6d2
+ call PlaceString
+ and a
+ ret
+
+.asm_11a522
+ call ExitMenu
+ farcall ReloadMapPart
+ ld a, [wMobileInactivityTimerSeconds]
+ ld [wcf66], a
+ ld [wcd80], a
+ scf
+ ret
+; 11a536
+
+Function11a536: ; 11a536
+ ld hl, hJoyPressed
+ ld a, [hl]
+ and $1
+ jr nz, .asm_11a5a7
+ ld a, [hl]
+ and $2
+ jr nz, .asm_11a5a2
+ ld a, [hl]
+ and $40
+ jr nz, .asm_11a564
+ ld a, [hl]
+ and $80
+ jr nz, .asm_11a583
+.asm_11a54d
+ ld a, [wcd3c]
+ cp $4
+ jr z, .asm_11a562
+ call Function11a9f0
+ jr nz, .asm_11a562
+ call ExitMenu
+ farcall ReloadMapPart
+
+.asm_11a562
+ scf
+ ret
+
+.asm_11a564
+ xor a
+ ld [wcd8a], a
+ ld [wcd8b], a
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr z, .asm_11a54d
+ xor a
+ ld [wMobileInactivityTimerMinutes], a
+ hlcoord 15, 7
+ ld a, $ed
+ ld [hl], a
+ hlcoord 15, 9
+ ld a, $7f
+ ld [hl], a
+ jr .asm_11a54d
+
+.asm_11a583
+ xor a
+ ld [wcd8a], a
+ ld [wcd8b], a
+ ld a, [wMobileInactivityTimerMinutes]
+ and a
+ jr nz, .asm_11a54d
+ inc a
+ ld [wMobileInactivityTimerMinutes], a
+ hlcoord 15, 7
+ ld a, $7f
+ ld [hl], a
+ hlcoord 15, 9
+ ld a, $ed
+ ld [hl], a
+ jr .asm_11a54d
+
+.asm_11a5a2
+ ld a, $1
+ ld [wMobileInactivityTimerMinutes], a
+
+.asm_11a5a7
+ xor a
+ ld [wcd8a], a
+ ld [wcd8b], a
+ and a
+ ret
+; 11a5b0
+
+BattleTowerRoomMenu2_IncrementJumptable: ; 11a5b0
+ ld a, [wcd3c]
+ inc a
+ ld [wcd3c], a
+ scf
+ ret
+; 11a5b9
+
+Function11a5b9: ; 11a5b9
+ xor a
+ ld [wMenuBorderLeftCoord], a
+ ld [wMenuBorderTopCoord], a
+ ld a, $13
+ ld [wMenuBorderRightCoord], a
+ ld a, $5
+ ld [wMenuBorderBottomCoord], a
+ call PushWindow
+ hlcoord 0, 0, AttrMap
+ ld b, $6
+ ld c, $14
+ hlcoord 0, 0
+ ld b, $4
+ ld c, $12
+ call Function3eea
+ farcall ReloadMapPart
+ call UpdateSprites
+ ld c, $0
+ farcall Function115e18
+ ld a, $1
+ ld [wc305], a
+ ret
+; 11a5f5
+
+Function11a5f5: ; 11a5f5
+ ld a, $e
+ ld [wMenuBorderLeftCoord], a
+ ld a, $13
+ ld [wMenuBorderRightCoord], a
+ ld a, $6
+ ld [wMenuBorderTopCoord], a
+ ld a, $a
+ ld [wMenuBorderBottomCoord], a
+ call PushWindow
+ hlcoord 14, 6, AttrMap
+ ld b, $5
+ ld c, $6
+ hlcoord 14, 6
+ ld b, $3
+ ld c, $4
+ call Function3eea
+ hlcoord 16, 7
+ ld de, String_11a2cf
+ call PlaceString
+ hlcoord 16, 9
+ ld de, String_11a2d3
+ call PlaceString
+ hlcoord 15, 7
+ ld a, $ed
+ ld [hl], a
+ farcall ReloadMapPart
+ ret
+; 11a63c
+
+Function11a63c: ; 11a63c
+ hlcoord 4, 1
+ ld de, String_11a7f4
+ call PlaceString
+ hlcoord 4, 2
+ ld de, String_11a7f4
+ call PlaceString
+ hlcoord 4, 3
+ ld de, String_11a7f4
+ call PlaceString
+ hlcoord 4, 4
+ ld de, String_11a7f4
+ call PlaceString
+ ret
+; 11a661
+
+String_11a661: ; 11a661
+ db "これから モバイルセンターに"
+ next "でんわ", $1f, "かけます@"
+; 11a679
+
+String_11a679: ; 11a679
+ db "モバイルアダプタ", $25, "じゅんびは"
+ next "できて いますか?@"
+; 11a692
+
+String_11a692: ; 11a692
+ db "でんわ", $1f, "かけています"
+ next "しばらく おまちください@"
+; 11a6aa
+
+String_11a6aa: ; 11a6aa
+ db "でんわをかけると つうわりょう"
+ next "せつぞくりょう", $4a, "かかります@"
+; 11a6c8
+
+String_11a6c8: ; 11a6c8
+ db "せつぞく しました@"
+; 11a6d2
+
+String_11a6d2: ; 11a6d2
+ db "つうしん ちゅう@"
+; 11a6db
+
+String_11a6db: ; 11a6db
+ db "つうしん ちゅう"
+ next "セレクト エーでちゅうし@"
+; 11a6f1
+
+String_11a6f1: ; 11a6f1
+ db "この サービスには"
+ next "つうわりょう", $25, "ほかに@"
+; 11a706
+
+String_11a706: ; 11a706
+ db "おかね", $4a, "@"
+; 11a70b
+
+String_11a70b: ; 11a70b
+ db "えん"
+ next "かかります よろしい ですか?@"
+; 11a71e
+
+String_11a71e: ; 11a71e
+ db "つうしん しゅうりょう@"
+; 11a72a
+
+String_11a72a: ; 11a72a
+ db "つないだ じかん"
+ next " やく ふん びょう@"
+; 11a743
+
+String_11a743: ; 11a743
+ db "もっていない データが"
+ next "あります!@"
+; 11a755
+
+String_11a755: ; 11a755
+ db "データ", $1f, "よみこみますか?@"
+; 11a762
+
+String_11a762: ; 11a762
+ db "おなじ データ", $1f, "よみこんだ"
+ next "こと", $4a, "ありますが@"
+; 11a779
+
+String_11a779: ; 11a779
+ db "そのデータ", $24, "なくなっているか"
+ next "こわれて います@"
+; 11a791
+
+String_11a791: ; 11a791
+ db "もっている データと"
+ next "おなじデータしか ありません!@"
+; 11a7ac
+
+String_11a7ac: ; 11a7ac
+ db "データ", $25, "よみこみを"
+ next "ちゅうし しますか?@"
+; 11a7c1
+
+String_11a7c1: ; 11a7c1 ; new news?
+ db "あたらしい ニュースは"
+ next "ありません でした@"
+; 11a7d7
+
+String_11a7d7: ; 11a7d7
+ db "あたらしいニュース", $4a, "あります"
+ next "ニュース", $1f, "よみこみますか?@"
+; 11a7f4
+
+String_11a7f4: ; 11a7f4
+ db " @"
+; 11a804
+
+MenuDataHeader_11a804: ; 11a804
+ db $40 ; flags
+ db 0, 0 ; start coords
+ db 5, 19 ; end coords
+ dw NULL
+ db 0 ; default option
+; 11a80c
+
+Function11a80c: ; 11a80c
+ ld de, hDivisor
+ ld bc, hDividend
+ ld hl, Unknown_11a89a
+ call Function11a88c
+ ld bc, hQuotient
+ ld hl, Unknown_11a8ba
+ call Function11a88c
+ ld bc, hPrintNum3
+ ld hl, Unknown_11a8da
+ call Function11a88c
+ xor a
+ ld b, a
+ ld a, [hDivisor]
+ and $f
+ ld e, a
+ ld a, [hPrintNum7]
+ and $f
+ call Function11a884
+ ld e, a
+ ld a, [hPrintNum9]
+ and $f
+ call Function11a884
+ ld [wcd62], a
+ ld e, b
+ xor a
+ ld b, a
+ ld a, [hDivisor]
+ and $f0
+ swap a
+ call Function11a884
+ ld e, a
+ ld a, [hPrintNum7]
+ and $f0
+ swap a
+ call Function11a884
+ ld e, a
+ ld a, [hPrintNum9]
+ and $f0
+ swap a
+ call Function11a884
+ ld [wcd63], a
+ ld e, b
+ xor a
+ ld b, a
+ ld a, [hMathBuffer]
+ and $f
+ call Function11a884
+ ld e, a
+ ld a, [hPrintNum8]
+ and $f
+ call Function11a884
+ ld e, a
+ ld a, [hPrintNum10]
+ and $f
+ call Function11a884
+ ld [wcd64], a
+ ret
+; 11a884
+
+Function11a884: ; 11a884
+ add e
+ cp $a
+ ret c
+ sub $a
+ inc b
+ ret
+; 11a88c
+
+Function11a88c: ; 11a88c
+ ld a, [bc]
+ sla a
+ ld c, a
+ xor a
+ ld b, a
+ add hl, bc
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hl]
+ ld [de], a
+ inc de
+ ret
+; 11a89a
+
+Unknown_11a89a: ; 11a89a
+x = 0
+rept 16
+ bcd x % 100, x / 100
+x = x + 1
+endr
+
+Unknown_11a8ba: ; 11a8ba
+x = 0
+rept 16
+ bcd x % 100, x / 100
+x = x + 16
+endr
+
+Unknown_11a8da: ; 11a8da
+x = 0
+rept 16
+ bcd x % 100, x / 100
+x = x + 256
+endr
+; 11a8fa
+
+BattleTowerRoomMenu_WriteMessage: ; 11a8fa
+ jumptable .Jumptable, $c31a
+; 11a909
+
+.Jumptable: ; 11a909
+ dw BattleTowerRoomMenu_WriteMessage_DoNothing
+ dw Function11a90f
+ dw Function11a971
+; 11a90f
+
+Function11a90f: ; 11a90f
+ ld a, $1
+ ld [rSVBK], a
+ call SpeechTextBox
+ ld a, $50
+ ld hl, $c320
+ ld bc, $008c
+ call ByteFill
+ ld a, [$c31b]
+ ld l, a
+ ld a, [$c31c]
+ ld h, a
+ ld de, $c320
+.asm_11a92c
+ ld a, [hli]
+ cp $57
+ jr z, .asm_11a94f
+ cp $0
+ jr z, .asm_11a92c
+ cp $50
+ jr z, .asm_11a92c
+ cp $1
+ jr z, .asm_11a941
+ ld [de], a
+ inc de
+ jr .asm_11a92c
+
+.asm_11a941
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+.asm_11a945
+ ld a, [bc]
+ inc bc
+ cp $50
+ jr z, .asm_11a92c
+ ld [de], a
+ inc de
+ jr .asm_11a945
+
+.asm_11a94f
+ xor a
+ ld [$c31f], a
+ ld a, $c320 % $100
+ ld [$c31b], a
+ ld a, $c320 / $100
+ ld [$c31c], a
+ hlcoord 1, 14
+ ld a, l
+ ld [$c31d], a
+ ld a, h
+ ld [$c31e], a
+ ld hl, $c31a
+ inc [hl]
+ ld a, $3
+ ld [rSVBK], a
+
+BattleTowerRoomMenu_WriteMessage_DoNothing:
+ ret
+; 11a971
+
+Function11a971: ; 11a971
+ ld hl, $c31f
+ ld a, [hJoyDown]
+ and a
+ jr nz, .asm_11a97f
+ ld a, [hl]
+ and a
+ jr z, .asm_11a97f
+ dec [hl]
+ ret
+
+.asm_11a97f
+ ld a, [Options]
+ and $7
+ ld [hl], a
+ ld hl, wcd8d
+ ld a, [$c31b]
+ ld e, a
+ ld a, [$c31c]
+ ld d, a
+ ld a, [de]
+ inc de
+ ld [hli], a
+ ld a, e
+ ld [$c31b], a
+ ld a, d
+ ld [$c31c], a
+ ld a, $50
+ ld [hl], a
+ ld a, [$c31d]
+ ld l, a
+ ld a, [$c31e]
+ ld h, a
+ ld de, wcd8d
+ call PlaceString
+ ld a, c
+ ld [$c31d], a
+ ld a, b
+ ld [$c31e], a
+ ld a, [wcd8d]
+ cp $50
+ jr nz, .asm_11a9bf
+ xor a
+ ld [$c31a], a
+
+.asm_11a9bf
+ ret
+; 11a9c0
+
+BattleTowerRoomMenu_SetMessage: ; 11a9c0
+ ld a, l
+ ld [$c31b], a
+ ld a, h
+ ld [$c31c], a
+ ld a, $1
+ ld [$c31a], a
+ ret
+; 11a9ce
+
+Function11a9ce: ; 11a9ce
+ call ClearBGPalettes
+ call ReloadTilesetAndPalettes
+ call Call_ExitMenu
+ farcall MobileFunc_106462
+ farcall Function106464
+ call ret_d90
+ farcall FinishExitMenu
+ call UpdateSprites
+ ret
+; 11a9f0
+
+Function11a9f0: ; 11a9f0
+ ld a, $1
+ and a
+ ret
+; 11a9f4
+
+Function11a9f4: ; 11a9f4
+ ld a, [wcd8a]
+ ld l, a
+ ld a, [wcd8b]
+ ld h, a
+ inc hl
+ ld a, l
+ ld [wcd8a], a
+ ld a, h
+ ld [wcd8b], a
+ ld de, $d5d0
+ add hl, de
+ bit 7, h
+ ret nz
+ ld a, $d6
+ call Function118805
+ and a
+ ret
+; 11aa13
+
+Text_SaveFileWillBeSent: ; 0x11aa13
+ text "SAVE FILE will be"
+ line "sent."
+ done
+; 0x11aa2c
+
+Text_SentSaveFileReadingNews: ; 0x11aa2c
+ text "Sent SAVE FILE."
+ line "Reading NEWS…"
+ done
+; 0x11aa4b
+
+Text_ReadingNews: ; 0x11aa4b
+ text "Reading NEWS…"
+ done
+; 0x11aa5a
+
+Text_ReceivedNews: ; 0x11aa5a
+ text "Received NEWS!"
+ done
+; 0x11aa6a
+
+Text_QuitReadingNews: ; 0x11aa6a
+ text "Quit reading NEWS?"
+ done
+; 0x11aa7e
+
+Text_CanceledSendingSaveFile: ; 0x11aa7e
+ text "Canceled sending"
+ line "SAVE FILE."
+ done
+; 0x11aa9b
+
+Text_ReceivedOddEgg: ; 0x11aa9b
+ text "ODD EGG"
+ line "was received!"
+ done
+; 0x11aab2
+
+Text_RegisteringRecord: ; 0x11aab2
+ text "Registering your"
+ line "record…"
+ done
+; 0x11aacc
+
+Text_BattleRoomVisitLimit: ; 0x11aacc
+ text "One visit per day"
+ line "per BATTLE ROOM!"
+ done
+; 0x11aaf0
+
+Text_PartyMonTopsThisLevel: ; 0x11aaf0
+ text "A party #MON"
+ line "tops this level."
+ done
+; 0x11ab0f
+
+Text_UberRestriction: ; 0x11ab0f
+ text_from_ram wcd49
+ text " may go"
+ line "only to BATTLE"
+
+ para "ROOMS that are"
+ line "Lv.70 or higher."
+ done
+; 0x11ab4a
+
+Text_CancelBattleRoomChallenge: ; 0x11ab4a
+ text "Cancel your BATTLE"
+ line "ROOM challenge?"
+ done
+; 0x11ab6e
+
+Text_ExitGymLeaderHonorRoll: ; 0x11ab6e
+ text "Exit GYM LEADER"
+ line "HONOR ROLL?"
+ done
+; 0x11ab8b
+
+Text_LinkingWithCenter: ; 0x11ab8b
+ text "Linking with the"
+ line "CENTER…"
+ done
+; 0x11aba5
+
+Text_WhatLevelDoYouWantToChallenge: ; 0x11aba5
+ text "What level do you"
+ line "want to challenge?"
+ done
+; 0x11abcb
+
+Text_CheckBattleRoomListByMaxLevel: ; 0x11abcb
+ text "Check BATTLE ROOM"
+ line "list by max level?"
+ done
+; 0x11abf1
+
+Text_EnterWhichBattleRoom: ; 0x11abf1
+ text "Enter which"
+ line "BATTLE ROOM?"
+ done
+; 0x11ac0b
+
+Text_WhichBattleRoom: ; 0x11ac0b
+ text "Which BATTLE ROOM?"
+ done
+; 0x11ac1f
+
+Text_ThisBattleRoomPleaseWait: ; 0x11ac1f
+ text_from_ram StringBuffer3
+ text "'s ROOM"
+ line "@"
+ text_from_ram StringBuffer4
+ text "?"
+ cont "Please wait…"
+ done
+; 0x11ac3e
+
+Function11ac3e: ; 11ac3e
+ call SpeechTextBox
+ call FadeToMenu
+ callfar ClearSpriteAnims2
+ call Function11ac51
+ call CloseSubmenu
+ ret
+; 11ac51
+
+Function11ac51: ; 11ac51
+ xor a
+ ld [hBGMapMode], a
+ ld hl, Options
+ ld a, [hl]
+ push af
+ set 4, [hl]
+ ld a, [VramState]
+ push af
+ xor a
+ ld [VramState], a
+ ld a, [hInMenu]
+ push af
+ ld a, $1
+ ld [hInMenu], a
+ xor a
+ ld [hMapAnims], a
+ ld [wcd49], a
+ ld [wcd4a], a
+ ld [wcd4c], a
+ ld [wcd4d], a
+ ld [wcd4e], a
+ call Function11ad1b
+ call DelayFrame
+.loop
+ call JoyTextDelay
+ ld a, [wJumptableIndex]
+ bit 7, a
+ jr nz, .asm_11aca8
+ call Function11b314
+ call Function11acb7
+ call Function11ad6e
+ ld a, 30 * 4
+ ld [wCurrSpriteOAMAddr], a
+ farcall DoNextFrameForAllSprites
+ farcall ReloadMapPart
+ jr .loop
+
+.asm_11aca8
+ call ClearSprites
+ pop af
+ ld [hInMenu], a
+ pop af
+ ld [VramState], a
+ pop af
+ ld [Options], a
+ ret
+; 11acb7
+
+Function11acb7: ; 11acb7
+ ld hl, TilemapPack_11ba44
+ ld a, [wcd49]
+ ld c, a
+ ld b, $0
+ sla c
+ rl b
+ sla c
+ rl b
+ sla c
+ rl b
+ add hl, bc
+ decoord 6, 6
+ ld a, [hli]
+ ld [de], a
+ decoord 0, 7
+ ld bc, 7
+ call CopyBytes
+ ld a, [wcd49]
+ inc a
+ ld [wcd49], a
+ ld a, [hl]
+ cp $ff
+ jr nz, .get_the_other
+ xor a
+ ld [wcd49], a
+.get_the_other
+ ld hl, TilemapPack_11bb7d
+ ld a, [wcd4a]
+ ld c, a
+ ld b, $0
+ sla c
+ rl b
+ sla c
+ rl b
+ sla c
+ rl b
+ add hl, bc
+ decoord 3, 9
+ ld bc, 7
+ call CopyBytes
+ ld a, [wcd4a]
+ inc a
+ ld [wcd4a], a
+ inc hl
+ ld a, [hl]
+ cp $ff
+ ret nz
+ xor a
+ ld [wcd4a], a
+ ret
+; 11ad1b
+
+Function11ad1b: ; 11ad1b
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearTileMap
+ farcall Function17c000
+ ld a, [wMenuCursorY]
+ ld [wcd82], a
+ dec a
+ ld [hObjectStructIndexBuffer], a
+ ld a, $10
+ ld [wCurIconTile], a
+ ld hl, LoadMenuMonIcon
+ ld a, BANK(LoadMenuMonIcon)
+ ld e, $4
+ rst FarCall
+ ld hl, LoadMenuMonIcon
+ ld a, BANK(LoadMenuMonIcon)
+ ld e, $5
+ rst FarCall
+ ld hl, $c6d0
+ ld bc, $0115
+ xor a
+ call ByteFill
+ xor a
+ ld [wJumptableIndex], a
+ ld [wcf64], a
+ ld [wcf65], a
+ ld [wcf66], a
+ ld [wcd30], a
+ ld a, $2
+ ld [wc7d4], a
+ farcall Pokedex_OrderMonsByMode
+ ret
+; 11ad6e
+
+Function11ad6e: ; 11ad6e
+ ld a, [wJumptableIndex]
+ ld hl, Jumptable_11ad78
+ call Function11b239
+ jp hl
+; 11ad78
+
+Jumptable_11ad78: ; 11ad78
+ dw Function11b082
+ dw Function11b0ff
+ dw Function11ad95
+ dw Function11adc4
+ dw Function11ae4e
+ dw Function11ae98
+ dw Function11ad8f
+ dw Function11af04
+ dw Function11af4e
+; 11ad8a
+
+Function11ad8a: ; 11ad8a
+ ld hl, wJumptableIndex
+ inc [hl]
+ ret
+; 11ad8f
+
+Function11ad8f: ; 11ad8f
+ ld hl, wJumptableIndex
+ set 7, [hl]
+ ret
+; 11ad95
+
+Function11ad95: ; 11ad95
+ ld hl, MenuDataHeader_11ae38
+ call LoadMenuDataHeader
+ call MenuBox
+ hlcoord 12, 12
+ ld de, String_11ae40
+ call PlaceString
+ hlcoord 10, 10, AttrMap
+ lb bc, 8, 8
+ call Function11afd6
+ farcall ReloadMapPart
+ call Function11ad8a
+ ld a, $1
+ ld [wMenuCursorY], a
+ ld hl, Unknown_11afcc
+ call Function11afb7
+
+Function11adc4:
+ ld hl, hJoyPressed
+ ld a, [hl]
+ and a
+ ret z
+ ld a, [hl]
+ and $40
+ jr nz, .asm_11ade6
+ ld a, [hl]
+ and $80
+ jr nz, .asm_11aded
+ ld a, [hl]
+ and $1
+ jr nz, .asm_11ae06
+ ld a, [hl]
+ and $2
+ ret z
+ call PlayClickSFX
+ xor a
+ ld [wJumptableIndex], a
+ jr .asm_11ae2e
+
+.asm_11ade6
+ ld a, [wMenuCursorY]
+ dec a
+ ret z
+ jr .asm_11adf4
+
+.asm_11aded
+ ld a, [wMenuCursorY]
+ inc a
+ cp $4
+ ret z
+
+.asm_11adf4
+ push af
+ ld hl, Unknown_11afcc
+ call Function11afbb
+ pop af
+ ld [wMenuCursorY], a
+ ld hl, Unknown_11afcc
+ call Function11afb7
+ ret
+
+.asm_11ae06
+ call PlayClickSFX
+ ld a, [wMenuCursorY]
+ dec a
+ ld hl, wcd30
+ ld [hl], a
+ and a
+ jr z, .asm_11ae28
+ hlcoord 2, 14
+ ld a, [wMenuCursorY]
+ cp $2
+ jr z, .asm_11ae23
+ call Function11b272
+ jr .asm_11ae2b
+
+.asm_11ae23
+ call Function11b267
+ jr .asm_11ae2b
+
+.asm_11ae28
+ ld a, $3
+ ld [hl], a
+
+.asm_11ae2b
+ call Function11ad8a
+
+.asm_11ae2e
+ call ExitMenu
+ farcall ReloadMapPart
+ ret
+; 11ae38
+
+MenuDataHeader_11ae38: ; 11ae38
+ db $40 ; flags
+ db 10, 10 ; start coords
+ db 17, 17 ; end coords
+ dw NULL
+ db 0 ; default option
+; 11ae40
+
+String_11ae40: ; 11ae40
+ db "どちらでも"
+ next "♂ォス"
+ next "♀メス"
+ db "@"
+; 11ae4e
+
+Function11ae4e: ; 11ae4e
+ ld hl, MenuDataHeader_11afe8
+ call LoadMenuDataHeader
+ call MenuBox
+ hlcoord 10, 14
+ ld de, String_11aff0
+ call PlaceString
+ ld hl, MenuDataHeader_11b013
+ call LoadMenuDataHeader
+ call MenuBox
+ hlcoord 16, 8
+ ld de, String_11b01b
+ call PlaceString
+ hlcoord 14, 7, AttrMap
+ lb bc, 5, 6
+ call Function11afd6
+ hlcoord 9, 12, AttrMap
+ lb bc, 6, 11
+ call Function11afd6
+ farcall ReloadMapPart
+ call Function11ad8a
+ ld a, $1
+ ld [wMenuCursorY], a
+ ld hl, Unknown_11afd2
+ call Function11afb7
+
+Function11ae98:
+ ld hl, hJoyPressed
+ ld a, [hl]
+ and a
+ ret z
+ ld a, [hl]
+ and D_UP
+ jr nz, .asm_11aec1
+ ld a, [hl]
+ and D_DOWN
+ jr nz, .asm_11aec8
+ ld a, [hl]
+ and A_BUTTON
+ jr nz, .asm_11aee1
+ ld a, [hl]
+ and B_BUTTON
+ ret z
+ call PlayClickSFX
+.asm_11aeb4
+ hlcoord 2, 14
+ ld a, $7f
+ ld [hl], a
+ ld a, $1
+ ld [wJumptableIndex], a
+ jr .asm_11aef7
+
+.asm_11aec1
+ ld a, [wMenuCursorY]
+ dec a
+ ret z
+ jr .asm_11aecf
+
+.asm_11aec8
+ ld a, [wMenuCursorY]
+ inc a
+ cp $3
+ ret z
+
+.asm_11aecf
+ push af
+ ld hl, Unknown_11afd2
+ call Function11afbb
+ pop af
+ ld [wMenuCursorY], a
+ ld hl, Unknown_11afd2
+ call Function11afb7
+ ret
+
+.asm_11aee1
+ call PlayClickSFX
+ ld a, [wMenuCursorY]
+ cp $2
+ jr z, .asm_11aeb4
+ ld a, [wcd4b]
+ ld [ScriptVar], a
+ call Function11b022
+ call Function11ad8a
+
+.asm_11aef7
+ call ExitMenu
+ call ExitMenu
+ farcall ReloadMapPart
+ ret
+; 11af04
+
+Function11af04: ; 11af04
+ ld hl, MenuDataHeader_11afe8
+ call LoadMenuDataHeader
+ call MenuBox
+ hlcoord 10, 14
+ ld de, String_11b003
+ call PlaceString
+ ld hl, MenuDataHeader_11b013
+ call LoadMenuDataHeader
+ call MenuBox
+ hlcoord 16, 8
+ ld de, String_11b01b
+ call PlaceString
+ hlcoord 14, 7, AttrMap
+ lb bc, 5, 6
+ call Function11afd6
+ hlcoord 9, 12, AttrMap
+ lb bc, 6, 11
+ call Function11afd6
+ farcall ReloadMapPart
+ call Function11ad8a
+ ld a, $2
+ ld [wMenuCursorY], a
+ ld hl, Unknown_11afd2
+ call Function11afb7
+
+Function11af4e:
+ ld hl, hJoyPressed
+ ld a, [hl]
+ and a
+ ret z
+ ld a, [hl]
+ and D_UP
+ jr nz, .asm_11af77
+ ld a, [hl]
+ and D_DOWN
+ jr nz, .asm_11af7e
+ ld a, [hl]
+ and A_BUTTON
+ jr nz, .asm_11af97
+ ld a, [hl]
+ and B_BUTTON
+ ret z
+ call PlayClickSFX
+.asm_11af6a
+ hlcoord 2, 14
+ ld a, $7f
+ ld [hl], a
+ ld a, $1
+ ld [wJumptableIndex], a
+ jr .asm_11afaa
+
+.asm_11af77
+ ld a, [wMenuCursorY]
+ dec a
+ ret z
+ jr .asm_11af85
+
+.asm_11af7e
+ ld a, [wMenuCursorY]
+ inc a
+ cp $3
+ ret z
+
+.asm_11af85
+ push af
+ ld hl, Unknown_11afd2
+ call Function11afbb
+ pop af
+ ld [wMenuCursorY], a
+ ld hl, Unknown_11afd2
+ call Function11afb7
+ ret
+
+.asm_11af97
+ call PlayClickSFX
+ ld a, [wMenuCursorY]
+ cp $2
+ jr z, .asm_11af6a
+ ld a, $6
+ ld [wJumptableIndex], a
+ xor a
+ ld [ScriptVar], a
+
+.asm_11afaa
+ call ExitMenu
+ call ExitMenu
+ farcall ReloadMapPart
+ ret
+; 11afb7
+
+Function11afb7: ; 11afb7
+ ld e, $ed
+ jr asm_11afbd
+
+Function11afbb:
+ ld e, $7f
+
+asm_11afbd:
+ ld a, [wMenuCursorY]
+ dec a
+ ld c, a
+ ld b, 0
+ add hl, bc
+ add hl, bc
+ ld a, e
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld [de], a
+ ret
+; 11afcc
+
+Unknown_11afcc:
+ dwcoord 11, 12
+ dwcoord 11, 14
+ dwcoord 11, 16
+
+Unknown_11afd2:
+ dwcoord 15, 8
+ dwcoord 15, 10
+; 11afd6
+
+Function11afd6: ; 11afd6
+ ld de, SCREEN_WIDTH
+ ld a, $3
+.row
+ push bc
+ push hl
+.col
+ ld [hli], a
+ dec c
+ jr nz, .col
+ pop hl
+ add hl, de
+ pop bc
+ dec b
+ jr nz, .row
+ ret
+; 11afe8
+
+MenuDataHeader_11afe8: ; 11afe8
+ db $40 ; flags
+ db 12, 9 ; start coords
+ db 17, 19 ; end coords
+ dw NULL
+ db 0 ; default option
+; 11aff0
+
+String_11aff0: ; 11aff0
+ db "この じょうけんで"
+ next "よろしいですか?@"
+; 11b003
+
+String_11b003: ; 11b003
+ db "こうかんを"
+ next "ちゅうししますか?@"
+; 11b013
+
+MenuDataHeader_11b013: ; 11b013
+ db $40 ; flags
+ db 7, 14 ; start coords
+ db 11, 19 ; end coords
+ dw NULL
+ db 1 ; default option
+; 11b01b
+
+String_11b01b:
+ db "はい"
+ next "いいえ@"
+; 11b022
+
+Function11b022: ; 11b022
+ ld a, [wcd2e]
+ and a
+ jr z, .asm_11b02e
+ ld hl, StringBuffer3
+ call Function11b03d
+
+.asm_11b02e
+ ld a, [wcd30]
+ and a
+ ret z
+ cp $3
+ ret z
+ ld hl, StringBuffer4
+ call Function11b03d
+ ret
+; 11b03d
+
+Function11b03d: ; 11b03d
+ push hl
+ push af
+ ld c, $1
+.loop
+ ld a, [hli]
+ cp "♂"
+ jr z, .gender
+ cp "♀"
+ jr z, .gender
+ cp "@"
+ jr z, .done
+ inc c
+ jr .loop
+
+.gender
+ dec hl
+ ld a, "@"
+ ld [hli], a
+
+.done
+ dec hl
+ push hl
+ ld e, 4
+ ld d, 0
+ add hl, de
+ ld e, l
+ ld d, h
+ pop hl
+.loop2
+ ld a, [hld]
+ ld [de], a
+ dec de
+ dec c
+ jr nz, .loop2
+ pop af
+ pop de
+ cp $1
+ jr nz, .female
+ ld hl, .MaleString
+ jr .got_string
+
+.female
+ ld hl, .FemaleString
+
+.got_string
+ ld bc, 4 ; string length
+ call CopyBytes
+ ret
+; 11b07a
+
+.MaleString: db "ォスの "
+.FemaleString: db "メスの "
+
+Function11b082: ; 11b082
+ call Function11b242
+ ld a, $7
+ ld [wc7d3], a
+ call Function11b099
+ call Function11b295
+ call Function11b275
+ call SetPalettes
+ jp Function11ad8a
+; 11b099
+
+Function11b099: ; 11b099
+ ld c, $6
+ hlcoord 11, 1
+ ld a, [wc7d3]
+ add a
+ ld b, a
+ xor a
+ call Function11b236
+ ld a, [wc7d0]
+ ld e, a
+ ld d, $0
+ ld hl, wc6d0
+ add hl, de
+ ld e, l
+ ld d, h
+ hlcoord 11, 2
+ ld a, [wc7d3]
+.loop
+ push af
+ ld a, [de]
+ ld [wd265], a
+ push de
+ push hl
+ call .PlaceMonNameOrPlaceholderString
+ pop hl
+ ld de, 2 * SCREEN_WIDTH
+ add hl, de
+ pop de
+ inc de
+ pop af
+ dec a
+ jr nz, .loop
+ ret
+; 11b0cf
+
+.PlaceMonNameOrPlaceholderString: ; 11b0cf
+ and a
+ ret z
+
+ call .CheckSeenFlag
+ ret c
+
+ call .SetCaughtFlag
+ push hl
+ call GetPokemonName
+ pop hl
+ call PlaceString
+ ret
+; 11b0e1
+
+.SetCaughtFlag: ; 11b0e1
+ call CheckCaughtMemMon
+ jr nz, .okay
+ inc hl
+ ret
+
+.okay
+ ld a, $1
+ ld [hli], a
+ ret
+; 11b0ec
+
+.CheckSeenFlag: ; 11b0ec
+ call CheckSeenMemMon
+ ret nz
+
+ inc hl
+ ld de, .EmptySlot
+ call PlaceString
+ scf
+ ret
+; 11b0f9
+
+.EmptySlot: ; 11b0f9
+ db "ーーーーー@"
+; 11b0ff
+
+Function11b0ff: ; 11b0ff
+ ld hl, hJoyPressed
+ ld a, [hl]
+ and $2
+ jr nz, .asm_11b141
+ ld a, [hl]
+ and $1
+ jr nz, .asm_11b131
+ call Function11b175
+ jr nc, .asm_11b125
+ ld a, [wcd4c]
+ inc a
+ and $3
+ ld [wcd4c], a
+ xor a
+ ld [hBGMapMode], a
+ call Function11b099
+ ld a, $1
+ ld [hBGMapMode], a
+ ret
+
+.asm_11b125
+ ld a, [wcd4c]
+ and a
+ ret z
+ inc a
+ and $3
+ ld [wcd4c], a
+ ret
+
+.asm_11b131
+ call Function11b20b
+ call CheckSeenMemMon
+ jr z, .asm_11b13d
+ ld a, $1
+ jr .asm_11b148
+
+.asm_11b13d
+ ld a, $2
+ jr .asm_11b148
+
+.asm_11b141
+ ld hl, wJumptableIndex
+ ld a, $7
+ ld [hl], a
+ ret
+
+.asm_11b148
+ call PlayClickSFX
+ ld [wcd4b], a
+ and a
+ jr z, .asm_11b16c
+ ld a, [wcf65]
+ cp $0
+ jr z, .asm_11b163
+ cp $fe
+ jr z, .asm_11b167
+ cp $ff
+ jr z, .asm_11b16b
+ jp Function11ad8a
+
+.asm_11b163
+ ld a, $1
+ jr .asm_11b16c
+
+.asm_11b167
+ ld a, $2
+ jr .asm_11b16c
+
+.asm_11b16b
+ xor a
+
+.asm_11b16c
+ ld [wcd30], a
+ ld a, $4
+ ld [wJumptableIndex], a
+ ret
+; 11b175
+
+Function11b175: ; 11b175
+ ld a, [wc7d3]
+ ld d, a
+ ld a, [wc7d2]
+ ld e, a
+ ld hl, hJoyLast
+ ld a, [hl]
+ and $40
+ jr nz, .asm_11b19a
+ ld a, [hl]
+ and $80
+ jr nz, .asm_11b1ae
+ ld a, d
+ cp e
+ jr nc, .asm_11b1ed
+ ld a, [hl]
+ and $20
+ jr nz, .asm_11b1c6
+ ld a, [hl]
+ and $10
+ jr nz, .asm_11b1d8
+ jr .asm_11b1ed
+
+.asm_11b19a
+ ld hl, wc7d1
+ ld a, [hl]
+ and a
+ jr z, .asm_11b1a4
+ dec [hl]
+ jr .asm_11b1ef
+
+.asm_11b1a4
+ ld hl, wc7d0
+ ld a, [hl]
+ and a
+ jr z, .asm_11b1ed
+ dec [hl]
+ jr .asm_11b1ef
+
+.asm_11b1ae
+ ld hl, wc7d1
+ ld a, [hl]
+ inc a
+ cp e
+ jr nc, .asm_11b1ed
+ cp d
+ jr nc, .asm_11b1bc
+ inc [hl]
+ jr .asm_11b1ef
+
+.asm_11b1bc
+ ld hl, wc7d0
+ add [hl]
+ cp e
+ jr nc, .asm_11b1ed
+ inc [hl]
+ jr .asm_11b1ef
+
+.asm_11b1c6
+ ld hl, wc7d0
+ ld a, [hl]
+ and a
+ jr z, .asm_11b1ed
+ cp d
+ jr nc, .asm_11b1d4
+ xor a
+ ld [hl], a
+ jr .asm_11b1ef
+
+.asm_11b1d4
+ sub d
+ ld [hl], a
+ jr .asm_11b1ef
+
+.asm_11b1d8
+ ld hl, wc7d0
+ ld a, d
+ add a
+ add [hl]
+ jr c, .asm_11b1e3
+ cp e
+ jr c, .asm_11b1e8
+
+.asm_11b1e3
+ ld a, e
+ sub d
+ ld [hl], a
+ jr .asm_11b1ef
+
+.asm_11b1e8
+ ld a, [hl]
+ add d
+ ld [hl], a
+ jr .asm_11b1ef
+
+.asm_11b1ed
+ and a
+ ret
+
+.asm_11b1ef
+ call Function11b295
+ call Function11b275
+ scf
+ ret
+; 11b1f7
+
+Function11b1f7: ; 11b1f7
+ hlcoord 0, 0
+ ld a, $32
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ call ByteFill
+ ret
+; 11b203
+
+Function11b203: ; 11b203
+.asm_11b203
+ ld a, [de]
+ cp $ff
+ ret z
+ inc de
+ ld [hli], a
+ jr .asm_11b203
+; 11b20b
+
+Function11b20b: ; 11b20b
+ ld a, [wc7d1]
+ ld hl, wc7d0
+ add [hl]
+ ld e, a
+ ld d, $0
+ ld hl, $c6d0
+ add hl, de
+ ld a, [hl]
+ ld [wd265], a
+ ret
+; 11b21e
+
+CheckCaughtMemMon: ; 11b21e
+ push de
+ push hl
+ ld a, [wd265]
+ dec a
+ call CheckCaughtMon
+ pop hl
+ pop de
+ ret
+; 11b22a
+
+CheckSeenMemMon: ; 11b22a
+ push de
+ push hl
+ ld a, [wd265]
+ dec a
+ call CheckSeenMon
+ pop hl
+ pop de
+ ret
+; 11b236
+
+Function11b236: ; 11b236
+ jp FillBoxWithByte
+; 11b239
+
+Function11b239: ; 11b239
+ ld e, a
+ ld d, 0
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ret
+; 11b242
+
+Function11b242: ; 11b242
+ hlcoord 3, 4
+ ld de, StringBuffer3
+ call PlaceString
+ xor a
+ ld [MonType], a
+ farcall GetGender
+ hlcoord 1, 4
+ ld a, [CurPartySpecies]
+ ld bc, wcd2f
+ ld [bc], a
+ dec bc
+ jr c, asm_11b26a
+ jr z, asm_11b26f
+ ld a, $1
+ ld [bc], a
+
+Function11b267:
+ ld [hl], $ef
+ ret
+
+asm_11b26a
+ xor a
+ ld [bc], a
+ ld [hl], $7f
+ ret
+
+asm_11b26f
+ ld a, $2
+ ld [bc], a
+
+Function11b272:
+ ld [hl], $f5
+ ret
+; 11b275
+
+Function11b275: ; 11b275
+ call Function11b279
+ ret
+; 11b279
+
+Function11b279: ; 11b279
+ ld a, [wd265]
+ ld [CurSpecies], a
+ call CheckSeenMemMon
+ jr z, .asm_11b28f
+ call GetBaseData
+ ld a, [BaseGender]
+ ld [wcf65], a
+ jr .asm_11b294
+
+.asm_11b28f
+ ld a, $ff
+ ld [wcf65], a
+
+.asm_11b294
+ ret
+; 11b295
+
+Function11b295: ; 11b295
+ hlcoord 4, 13
+ ld de, String_11b308
+ call PlaceString
+ hlcoord 4, 14
+ ld de, String_11b308
+ call PlaceString
+ call Function11b20b
+ call CheckSeenMemMon
+ jr z, .asm_11b2d1
+ ld a, [$c608]
+ ld c, a
+ ld a, [$c608 + 1]
+ ld b, a
+ ld hl, $0007
+ add hl, bc
+ xor a
+ ld [hl], a
+ ld hl, $0003
+ add hl, bc
+ ld e, [hl]
+ farcall FlyFunction_GetMonIcon
+ hlcoord 4, 14
+ push hl
+ call GetPokemonName
+ jr .asm_11b2e7
+
+.asm_11b2d1
+ ld a, [$c608]
+ ld c, a
+ ld a, [$c608 + 1]
+ ld b, a
+ ld hl, $0007
+ add hl, bc
+ ld a, $50
+ ld [hl], a
+ hlcoord 4, 13
+ push hl
+ ld de, String_11b30e
+
+.asm_11b2e7
+ ld a, $6
+ ld bc, StringBuffer4
+.asm_11b2ec
+ push af
+ ld a, [de]
+ ld [bc], a
+ inc de
+ inc bc
+ pop af
+ dec a
+ and a
+ jr nz, .asm_11b2ec
+ pop hl
+ ld de, StringBuffer4
+ call PlaceString
+ ret
+; 11b2fe
+
+String_11b2fe: ; 11b2fe
+ db "あげる#@"
+; 11b303
+
+String_11b303: ; 11b303
+ db "ほしい#@"
+; 11b308
+
+String_11b308: ; 11b308
+ db " @"
+; 11b30e
+
+String_11b30e: ; 11b30e
+ db "みはっけん@"
+; 11b314
+
+Function11b314: ; 11b314
+ call Function11b31b
+ call Function11b3d9
+ ret
+; 11b31b
+
+Function11b31b: ; 11b31b
+ ld hl, .Coords
+ ld a, [wJumptableIndex]
+ cp 2
+ jr c, .tilemap_1
+ ld a, [wc7d1]
+ cp 4
+ jr nc, .tilemap_3
+ cp 3
+ jr c, .tilemap_1
+ ld a, [wJumptableIndex]
+ cp 2
+ jr z, .tilemap_1
+ cp 3
+ jr z, .tilemap_1
+ cp 6
+ jr z, .tilemap_1
+
+ ld bc, .Tilemap2
+ jr .load_sprites
+
+.tilemap_3
+ ld bc, .Tilemap3
+ jr .load_sprites
+
+.tilemap_1
+ ld bc, .Tilemap1
+
+.load_sprites
+ call Function11b397
+ ret
+; 11b350
+
+.Coords:
+ dbpixel 3, 11, 2, 6 ; 0
+ dbpixel 3, 12, 2, 6 ; 1
+ dbpixel 3, 13, 2, 6 ; 2
+ dbpixel 3, 14, 2, 6 ; 3
+ dbpixel 3, 15, 2, 6 ; 4
+ dbpixel 3, 16, 2, 6 ; 5
+ dbpixel 3, 17, 2, 6 ; 6
+ dbpixel 4, 11, 2, 6 ; 7
+ dbpixel 4, 12, 2, 6 ; 8
+ dbpixel 4, 13, 2, 6 ; 9
+ dbpixel 4, 14, 2, 6 ; 10
+ dbpixel 4, 15, 2, 6 ; 11
+ dbpixel 4, 16, 2, 6 ; 12
+ dbpixel 4, 17, 2, 6 ; 13
+ db -1
+
+.Tilemap1: ; vtiles
+ db $30 ; 0
+ db $31 ; 1
+ db $31 ; 2
+ db $31 ; 3
+ db $31 ; 4
+ db $31 ; 5
+ db $32 ; 6
+ db $40 ; 7
+ db $41 ; 8
+ db $41 ; 9
+ db $41 ; 10
+ db $41 ; 11
+ db $41 ; 12
+ db $42 ; 13
+
+.Tilemap2: ; vtiles
+ db $30 ; 0
+ db $31 ; 1
+ db $31 ; 2
+ db $39 ; 3
+ db $39 ; 4
+ db $39 ; 5
+ db $39 ; 6
+ db $40 ; 7
+ db $41 ; 8
+ db $41 ; 9
+ db $39 ; 10
+ db $39 ; 11
+ db $39 ; 12
+ db $39 ; 13
+
+.Tilemap3: ; vtiles
+ db $39 ; 0
+ db $39 ; 1
+ db $39 ; 2
+ db $39 ; 3
+ db $39 ; 4
+ db $39 ; 5
+ db $39 ; 6
+ db $39 ; 7
+ db $39 ; 8
+ db $39 ; 9
+ db $39 ; 10
+ db $39 ; 11
+ db $39 ; 12
+ db $39 ; 13
+
+Function11b397: ; 11b397
+ ld de, Sprites
+.loop
+ ld a, [hl]
+ cp $ff
+ ret z
+ ld a, [wc7d1]
+ and $7
+ swap a
+ add [hl]
+ inc hl ; 1
+ ld [de], a
+ inc de
+
+ ld a, [hli] ; 2
+ ld [de], a
+ inc de
+
+ ld a, [bc]
+ inc bc
+ ld [de], a
+ inc de
+ ld a, $5 ; OBPal 5
+ ld [de], a
+ inc de
+ jr .loop
+; 11b3b6
+
+Function11b3b6: ; 11b3b6
+; unreferenced
+.loop
+ ld a, [hl]
+ cp -1
+ ret z
+ ld a, [wcd4d]
+ and $7
+ swap a
+ add [hl]
+ inc hl
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ inc de
+ push hl
+ ld l, c
+ ld h, b
+ ld a, [wcd4e]
+ add [hl]
+ inc bc
+ ld [de], a
+ inc de
+ pop hl
+ ld a, $5
+ ld [de], a
+ inc de
+ jr .loop
+; 11b3d9
+
+Function11b3d9: ; 11b3d9
+ ld de, Sprites + 28 * 4
+ push de
+ ld a, [wc7d2]
+ dec a
+ ld e, a
+ ld a, [wc7d1]
+ ld hl, wc7d0
+ add [hl]
+ cp e
+ jr z, .skip
+ ld hl, 0
+ ld bc, $70
+ call AddNTimes
+ ld e, l
+ ld d, h
+ ld b, 0
+ ld a, d
+ or e
+ jr z, .load_sprites
+ ld a, [wc7d2]
+ ld c, a
+.loop1
+ ld a, e
+ sub c
+ ld e, a
+ ld a, d
+ sbc $0
+ ld d, a
+ jr c, .load_sprites
+ inc b
+ jr .loop1
+
+.skip
+ ld b, 14 * 8
+
+.load_sprites
+ ld a, 2 * 8 + 5
+ add b
+ pop hl
+ ld [hli], a
+ cp $41
+ jr c, .version1
+ ld a, [wJumptableIndex]
+ cp 4
+ jr z, .version2
+ cp 5
+ jr z, .version2
+ cp 7
+ jr z, .version2
+ cp 8
+ jr z, .version2
+
+.version1
+ ld a, 19 * 8 + 3
+ ld [hli], a
+ ld a, [wcd4c]
+ add $3c
+ ld [hli], a
+ ld a, [wcd4c]
+ add $1
+ ld [hl], a
+ ret
+
+.version2
+ ld a, 19 * 8 + 3
+ ld [hli], a
+ ld a, $39
+ ld [hli], a
+ xor a
+ ld [hl], a
+ ret
+; 11b444
+
+Function11b444: ; 11b444
+; special
+ call Mobile46_InitJumptable
+ call Mobile46_RunJumptable
+ ret
+; 11b44b
+
+Mobile46_InitJumptable: ; 11b44b
+ xor a
+ ld [wJumptableIndex], a
+ ld [wcf64], a
+ ld [wcf65], a
+ ld [wcf66], a
+ call UpdateTime
+ ret
+; 11b45c
+
+Mobile46_RunJumptable: ; 11b45c
+.loop
+ call .IterateJumptable
+ call DelayFrame
+ ld a, [wJumptableIndex]
+ cp 4
+ jr nz, .loop
+ ret
+; 11b46a
+
+.IterateJumptable: ; 11b46a
+ jumptable .Jumptable, wJumptableIndex
+
+.Jumptable:
+ dw Function11b483
+ dw Function11b570
+ dw Function11b5c0
+ dw Function11b5e0
+ dw Function11b5e7 ; unused
+; 11b483
+
+Function11b483: ; 11b483
+ call .InitRAM
+ ld hl, PlayerName
+ ld a, NAME_LENGTH_JAPANESE - 1
+.loop1
+ push af
+ ld a, [hli]
+ ld [bc], a
+ inc bc
+ pop af
+ dec a
+ and a
+ jr nz, .loop1
+
+ ld de, PARTYMON_STRUCT_LENGTH
+ ld hl, PartyMon1Species
+ ld a, [wcd82]
+ dec a
+ push af
+.loop2
+ and a
+ jr z, .okay
+ add hl, de
+ dec a
+ jr .loop2
+
+.okay
+ push bc
+ ld a, PARTYMON_STRUCT_LENGTH
+.loop3
+ push af
+ ld a, [hli]
+ ld [bc], a
+ inc bc
+ pop af
+ dec a
+ and a
+ jr nz, .loop3
+
+ pop de
+ push bc
+ ld a, [de]
+ ld [CurSpecies], a
+ call GetBaseData
+ ld hl, MON_LEVEL
+ add hl, de
+ ld a, [hl]
+ ld [CurPartyLevel], a
+ ld hl, MON_MAXHP
+ add hl, de
+ push hl
+ ld hl, MON_STAT_EXP - 1
+ add hl, de
+ pop de
+ push de
+ ld b, OTPARTYMON
+ predef CalcPkmnStats
+ pop de
+ ld h, d
+ ld l, e
+ dec hl
+ dec hl
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hl], a
+ pop bc
+ ld de, NAME_LENGTH
+ ld hl, PartyMonOT
+ pop af
+ push af
+.loop4
+ and a
+ jr z, .okay2
+ add hl, de
+ dec a
+ jr .loop4
+
+.okay2
+ ld a, NAME_LENGTH - 1
+.loop5
+ push af
+ ld a, [hli]
+ ld [bc], a
+ inc bc
+ pop af
+ dec a
+ and a
+ jr nz, .loop5
+ ld de, NAME_LENGTH
+ ld hl, PartyMonNicknames
+ pop af
+ push af
+.loop6
+ and a
+ jr z, .okay3
+ add hl, de
+ dec a
+ jr .loop6
+
+.okay3
+ ld a, NAME_LENGTH - 1
+.loop7
+ push af
+ ld a, [hli]
+ ld [bc], a
+ inc bc
+ pop af
+ dec a
+ and a
+ jr nz, .loop7
+ ld de, MAIL_STRUCT_LENGTH
+ ld hl, sPartyMail
+ pop af
+.loop8
+ and a
+ jr z, .okay4
+ add hl, de
+ dec a
+ jr .loop8
+
+.okay4
+ ld a, $0 ; BANK(sPartyMail)
+ call GetSRAMBank
+ ld a, MAIL_STRUCT_LENGTH
+.loop9
+ push af
+ ld a, [hli]
+ ld [bc], a
+ inc bc
+ pop af
+ dec a
+ and a
+ jr nz, .loop9
+ call CloseSRAM
+ jp Function11ad8a
+
+.InitRAM:
+ ld bc, $c626
+ ld a, [PlayerID]
+ ld [wcd2a], a
+ ld [bc], a
+ inc bc
+
+ ld a, [PlayerID + 1]
+ ld [wcd2b], a
+ ld [bc], a
+ inc bc
+
+ ld a, [wSecretID]
+ ld [wcd2c], a
+ ld [bc], a
+ inc bc
+
+ ld a, [wSecretID + 1]
+ ld [wcd2d], a
+ ld [bc], a
+ inc bc
+
+ ld a, [wcd2e]
+ ld [bc], a
+ inc bc
+
+ ld a, [wcd2f]
+ ld [bc], a
+ inc bc
+
+ ld a, [wcd30]
+ ld [bc], a
+ inc bc
+
+ ld a, [wd265]
+ ld [bc], a
+ inc bc
+ ret
+; 11b570
+
+Function11b570: ; 11b570
+ call Function118007
+ ld a, [ScriptVar]
+ and a
+ jr nz, .exit
+ call .SaveData
+ jp Function11ad8a
+
+.exit
+ ld a, $4
+ ld [wJumptableIndex], a
+ ret
+
+.SaveData:
+ ld a, $3
+ ld [rSVBK], a
+
+ ld hl, w3_d800
+ ld de, $c608
+ ld bc, w3_d88f - w3_d800
+ call CopyBytes
+
+ ld a, $1
+ ld [rSVBK], a
+ ld a, $5
+ call GetSRAMBank
+
+ ld de, $a800
+ ld a, $1
+ ld [de], a
+ inc de
+ ld hl, $c608
+ ld bc, w3_d88f - w3_d800
+ call CopyBytes
+
+ push de
+ pop hl
+
+ ld a, [hRTCMinutes]
+ ld [hli], a
+ ld a, [hRTCHours]
+ ld [hli], a
+ ld a, [hRTCDayLo]
+ ld [hli], a
+ ld a, [hRTCDayHi]
+ ld [hl], a
+
+ call CloseSRAM
+ ret
+; 11b5c0
+
+Function11b5c0: ; 11b5c0
+ ld a, [wcd82]
+ dec a
+ ld [CurPartyMon], a
+ xor a
+ ld [wPokemonWithdrawDepositParameter], a
+ farcall RemoveMonFromPartyOrBox
+ farcall Function170807
+ farcall SaveAfterLinkTrade
+ jp Function11ad8a
+; 11b5e0
+
+Function11b5e0: ; 11b5e0
+ xor a
+ ld [ScriptVar], a
+ jp Function11ad8a
+; 11b5e7
+
+Function11b5e7: ; 11b5e7
+ ret
+; 11b5e8
+
+Function11b5e8: ; 11b5e8
+ ld a, $0
+ call GetSRAMBank
+ ld hl, wRTC
+ ld de, $c608
+ ld bc, 4
+ call CopyBytes
+ call CloseSRAM
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $c608
+ ld de, $b08c
+ ld bc, 4
+ call CopyBytes
+ ld a, $2
+ ld [$a800], a
+ ld a, [$a81f]
+ ld [wcd2a], a
+ ld a, [$a820]
+ ld [wcd2b], a
+ ld a, [$a821]
+ ld [wcd2c], a
+ ld a, [$a822]
+ ld [wcd2d], a
+ ld a, [$a823]
+ ld [wcd2e], a
+ ld a, [$a824]
+ ld [wcd2f], a
+ ld a, [$a825]
+ ld [wcd30], a
+ ld a, [$a826]
+ ld [wcd31], a
+ call CloseSRAM
+ call Mobile46_InitJumptable
+ call .loop
+ ret
+
+.loop
+ call .RunJumptable
+ call DelayFrame
+ ld a, [wJumptableIndex]
+ cp $1
+ jr nz, .loop
+ ret
+
+.RunJumptable:
+ jumptable .Jumptable, wJumptableIndex
+.Jumptable:
+ dw Function11b66d
+ dw Function11b6b3
+; 11b66d
+
+Function11b66d: ; 11b66d
+ call Function1180b8
+ ld a, [ScriptVar]
+ and a
+ jr nz, .asm_11b6b0
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+ ld a, [w3_d090]
+ ld b, a
+ pop af
+ ld [rSVBK], a
+ ld a, b
+ and a
+ jr z, .asm_11b691
+ cp $1
+ jr nz, .asm_11b6b0
+ call Function11b6b4
+ jr .asm_11b6b0
+
+.asm_11b691
+ farcall Function17081d
+ ld a, [ScriptVar]
+ and a
+ jr z, .asm_11b6b0
+ xor a
+ ld [ScriptVar], a
+ ld a, [rSVBK]
+ push af
+ ld a, $3
+ ld [rSVBK], a
+ ld a, $2
+ ld [w3_d090], a
+ pop af
+ ld [rSVBK], a
+
+.asm_11b6b0
+ jp Function11ad8a
+; 11b6b3
+
+Function11b6b3: ; 11b6b3
+ ret
+; 11b6b4
+
+Function11b6b4: ; 11b6b4
+ ld a, $5
+ call GetSRAMBank
+ ld a, [wcd30]
+ ld [$c708], a
+ ld a, [wcd31]
+ ld [$c709], a
+
+ ld a, $c708 % $100
+ ld [wMobileMonSpeciesPointerBuffer], a
+ ld a, $c708 / $100
+ ld [wMobileMonSpeciesPointerBuffer + 1], a
+
+ ld a, $c60d % $100 ; Partymon Struct
+ ld [wMobileMonStructurePointerBuffer], a
+ ld a, $c60d / $100
+ ld [wMobileMonStructurePointerBuffer + 1], a
+
+ ld a, $c63d % $100 ; OT
+ ld [wMobileMonOTNamePointerBuffer], a
+ ld a, $c63d / $100
+ ld [wMobileMonOTNamePointerBuffer + 1], a
+
+ ld a, $c642 % $100 ; Nickname
+ ld [wMobileMonNicknamePointerBuffer], a
+ ld a, $c642 / $100
+ ld [wMobileMonNicknamePointerBuffer + 1], a
+
+ ld a, $c647 % $100 ; ???
+ ld [wMobileMonMailPointerBuffer], a
+ ld a, $c647 / $100
+ ld [wMobileMonMailPointerBuffer + 1], a
+
+ ld a, $46
+ ld [$c628], a
+
+ ld de, $c63d
+ ld c, 5
+ farcall CheckStringForErrors
+ jr nc, .length_check_OT
+ farcall Mobile_CopyDefaultOTName
+
+.length_check_OT
+ ld de, $c63d
+ lb bc, 1, 5
+ farcall CheckStringContainsLessThanBNextCharacters
+ jr nc, .error_check_nick
+ farcall Mobile_CopyDefaultOTName
+
+.error_check_nick
+ ld de, $c642
+ ld c, 5
+ farcall CheckStringForErrors
+ jr nc, .length_check_nick
+ farcall Mobile_CopyDefaultNickname
+
+.length_check_nick
+ ld de, $c642
+ lb bc, 1, 5
+ farcall CheckStringContainsLessThanBNextCharacters
+ jr nc, .error_check_mail
+ farcall Mobile_CopyDefaultNickname
+
+.error_check_mail
+ ld de, $c647
+ ld c, MAIL_MSG_LENGTH + 1
+ farcall CheckStringForErrors
+ jr nc, .length_check_mail
+ farcall Mobile_CopyDefaultMail
+
+.length_check_mail
+ ld de, $c647
+ lb bc, 2, MAIL_MSG_LENGTH + 1
+ farcall CheckStringContainsLessThanBNextCharacters
+ jr c, .fix_mail
+ ld a, b
+ cp $2
+ jr nz, .mail_ok
+
+.fix_mail
+ farcall Mobile_CopyDefaultMail
+
+.mail_ok
+ ld de, $c668
+ ld c, $5
+ farcall CheckStringForErrors
+ jr nc, .length_check_author
+ farcall Mobile_CopyDefaultMailAuthor
+
+.length_check_author
+ ld de, $c668
+ lb bc, 1, 5
+ farcall CheckStringContainsLessThanBNextCharacters
+ jr nc, .author_okay
+ farcall Mobile_CopyDefaultMailAuthor
+
+.author_okay
+ ld a, [$c60e]
+ cp -1
+ jr nz, .item_okay
+ xor a
+ ld [$c60e], a
+
+.item_okay
+ ld a, [wcd31]
+ ld [$c60d], a
+ ld [CurSpecies], a
+ call GetBaseData
+
+ ld hl, $c60d + MON_LEVEL
+ ld a, [hl]
+ cp MIN_LEVEL
+ ld a, MIN_LEVEL
+ jr c, .replace_level
+ ld a, [hl]
+ cp MAX_LEVEL
+ jr c, .done_level
+ ld a, MAX_LEVEL
+.replace_level
+ ld [hl], a
+.done_level
+ ld [CurPartyLevel], a
+
+ ld hl, $c60d + MON_STAT_EXP - 1
+ ld de, $c60d + MON_MAXHP
+ ld b, $1
+ predef CalcPkmnStats
+ ld de, $c60d + MON_MAXHP
+ ld hl, $c60d + MON_HP
+ ld a, [de]
+ ld [hli], a
+ inc de
+ ld a, [de]
+ ld [hl], a
+ call AddMobileMonToParty
+ ret
+; 11b7e5
+
+Function11b7e5: ; 11b7e5
+ ld a, [$c60d] ; species
+ ld [wOTTrademonSpecies], a
+ ld [CurPartySpecies], a
+ ld a, [wcd81]
+ ld [wc74e], a
+ ld hl, $c63d ; OT
+ ld de, wOTTrademonOTName
+ ld bc, 5
+ call CopyBytes
+ ld a, "@"
+ ld [de], a
+ ld a, [$c60d + MON_ID] ; id
+ ld [wOTTrademonID], a
+ ld a, [$c60d + MON_ID + 1]
+ ld [wOTTrademonID + 1], a
+ ld hl, $c60d + MON_DVS ; dvs
+ ld a, [hli]
+ ld [wOTTrademonDVs], a
+ ld a, [hl]
+ ld [wOTTrademonDVs + 1], a
+ ld bc, $c60d ; pokemon_data_start
+ farcall GetCaughtGender
+ ld a, c
+ ld [wOTTrademonCaughtData], a
+ call SpeechTextBox
+ call FadeToMenu
+ farcall MobileTradeAnimation_ReceiveGetmonFromGTS
+ farcall Function17d1f1
+ ld a, $1
+ ld [wForceEvolution], a
+ ld a, $2
+ ld [wLinkMode], a
+ farcall EvolvePokemon
+ xor a
+ ld [wLinkMode], a
+ farcall SaveAfterLinkTrade
+ ld a, $5
+ call GetSRAMBank
+ ld a, $5
+ ld [$a800], a
+ call CloseSRAM
+ ld a, [MapGroup]
+ ld b, a
+ ld a, [MapNumber]
+ ld c, a
+ call GetMapSceneID
+ ld a, d
+ or e
+ jr z, .asm_11b872
+ ld a, $1
+ ld [de], a
+
+.asm_11b872
+ call CloseSubmenu
+ call RestartMapMusic
+ ret
+; 11b879
+
+Function11b879: ; 11b879
+ farcall BattleTower_CheckSaveFileExistsAndIsYours
+ ld a, [ScriptVar]
+ and a
+ ret z
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$a800]
+ ld [ScriptVar], a
+ ld a, [$a890]
+ ld [wcd49], a
+ ld a, [$a891]
+ ld [wcd4a], a
+ ld a, [$a892]
+ ld [wcd4b], a
+ ld a, [$a893]
+ ld [wcd4c], a
+ call CloseSRAM
+ ld a, [ScriptVar]
+ and a
+ ret z
+ ld hl, wcd4c
+ ld a, [hRTCDayHi]
+ cp [hl]
+ ret nz
+ dec hl
+ ld a, [hRTCDayLo]
+ cp [hl]
+ ret nz
+ ld hl, wcd4a
+ ld a, [hRTCHours]
+ cp [hl]
+ jr nc, .asm_11b8d8
+ ld a, $18
+ sub [hl]
+ ld hl, hRTCHours
+ add [hl]
+ ld [wcd4c], a
+ ld a, [hRTCMinutes]
+ ld [wcd4b], a
+ xor a
+ ld [wcd4a], a
+ jr .asm_11b8e2
+
+.asm_11b8d8
+ ld a, [hRTCMinutes]
+ ld [wcd4b], a
+ ld a, [hRTCHours]
+ ld [wcd4c], a
+
+.asm_11b8e2
+ xor a
+ ld l, a
+ ld h, a
+ ld b, a
+ ld d, a
+ ld a, [wcd4b]
+ ld e, a
+ ld a, [wcd4c]
+ ld c, $3c
+ call AddNTimes
+ add hl, de
+ push hl
+ xor a
+ ld l, a
+ ld h, a
+ ld b, a
+ ld d, a
+ ld a, [wcd49]
+ ld e, a
+ ld a, [wcd4a]
+ ld c, $3c
+ call AddNTimes
+ add hl, de
+ ld a, l
+ cpl
+ add $1
+ ld e, a
+ ld a, h
+ cpl
+ adc $0
+ ld d, a
+ pop hl
+ add hl, de
+ ld de, $ff88
+ add hl, de
+ bit 7, h
+ ret z
+ ld a, $2
+ ld [ScriptVar], a
+ ret
+; 11b920
+
+Function11b920: ; 11b920
+ call Mobile46_InitJumptable
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $a81f
+ ld de, $c626
+ ld bc, 8
+ call CopyBytes
+ call CloseSRAM
+ call Function118000
+ ret
+; 11b93b
+
+Function11b93b: ; 11b93b
+ ld a, $5
+ call GetSRAMBank
+ xor a
+ ld [$a800], a
+ ld hl, $a823
+ ld de, $c608
+ ld bc, $008f
+ call CopyBytes
+ call CloseSRAM
+
+ ld a, $c608 % $100
+ ld [wMobileMonSpeciesPointerBuffer], a
+ ld a, $c608 / $100
+ ld [wMobileMonSpeciesPointerBuffer + 1], a
+
+ ld a, $c611 % $100
+ ld [wMobileMonStructurePointerBuffer], a
+ ld a, $c611 / $100
+ ld [wMobileMonStructurePointerBuffer + 1], a
+
+ ld a, $c641 % $100
+ ld [wMobileMonOTNamePointerBuffer], a
+ ld a, $c641 / $100
+ ld [wMobileMonOTNamePointerBuffer + 1], a
+
+ ld a, $c646 % $100
+ ld [wMobileMonNicknamePointerBuffer], a
+ ld a, $c646 / $100
+ ld [wMobileMonNicknamePointerBuffer + 1], a
+
+ ld a, $c64b % $100
+ ld [wMobileMonMailPointerBuffer], a
+ ld a, $c64b / $100
+ ld [wMobileMonMailPointerBuffer + 1], a
+ call AddMobileMonToParty
+ farcall SaveAfterLinkTrade
+ ret
+; 11b98f
+
+AddMobileMonToParty: ; 11b98f
+ ld hl, PartyCount
+ ld a, [hl]
+ ld e, a
+ inc [hl]
+
+ ld a, [wMobileMonSpeciesPointerBuffer]
+ ld l, a
+ ld a, [wMobileMonSpeciesPointerBuffer + 1]
+ ld h, a
+ inc hl
+ ld bc, PartySpecies
+ ld d, e
+.loop1
+ inc bc
+ dec d
+ jr nz, .loop1
+ ld a, e
+ ld [CurPartyMon], a
+ ld a, [hl]
+ ld [bc], a
+ inc bc
+ ld a, -1
+ ld [bc], a
+
+ ld hl, PartyMon1Species
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld a, e
+ ld [wMobileMonSpeciesBuffer], a
+.loop2
+ add hl, bc
+ dec a
+ and a
+ jr nz, .loop2
+ ld e, l
+ ld d, h
+ ld a, [wMobileMonStructurePointerBuffer]
+ ld l, a
+ ld a, [wMobileMonStructurePointerBuffer + 1]
+ ld h, a
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call CopyBytes
+
+ ld hl, PartyMonOT
+ ld bc, NAME_LENGTH
+ ld a, [wMobileMonSpeciesBuffer]
+.loop3
+ add hl, bc
+ dec a
+ and a
+ jr nz, .loop3
+ ld e, l
+ ld d, h
+ ld a, [wMobileMonOTNamePointerBuffer]
+ ld l, a
+ ld a, [wMobileMonOTNamePointerBuffer + 1]
+ ld h, a
+ ld bc, PKMN_NAME_LENGTH - 1
+ call CopyBytes
+ ld a, "@"
+ ld [de], a
+
+ ld hl, PartyMonNicknames
+ ld bc, PKMN_NAME_LENGTH
+ ld a, [wMobileMonSpeciesBuffer]
+.loop4
+ add hl, bc
+ dec a
+ and a
+ jr nz, .loop4
+ ld e, l
+ ld d, h
+ ld a, [wMobileMonNicknamePointerBuffer]
+ ld l, a
+ ld a, [wMobileMonNicknamePointerBuffer + 1]
+ ld h, a
+ ld bc, PKMN_NAME_LENGTH - 1
+ call CopyBytes
+ ld a, "@"
+ ld [de], a
+
+ ld hl, sPartyMail
+ ld bc, MAIL_STRUCT_LENGTH
+ ld a, [wMobileMonSpeciesBuffer]
+.loop5
+ add hl, bc
+ dec a
+ and a
+ jr nz, .loop5
+ ld a, BANK(sPartyMail)
+ call GetSRAMBank
+ ld e, l
+ ld d, h
+ ld a, [wMobileMonMailPointerBuffer]
+ ld l, a
+ ld a, [wMobileMonMailPointerBuffer + 1]
+ ld h, a
+ ld bc, MAIL_STRUCT_LENGTH
+ call CopyBytes
+
+ call CloseSRAM
+ ret
+; 11ba38
+
+Function11ba38: ; 11ba38
+ farcall CheckCurPartyMonFainted
+ ret c
+ xor a
+ ld [ScriptVar], a
+ ret
+; 11ba44
+
+TilemapPack_11ba44:
+ db $47, $30, $0a, $0a, $0a, $0a, $0a, $56 ; 00
+ db $46, $2f, $0a, $0a, $0a, $0a, $0a, $55 ; 01
+ db $45, $3d, $0a, $0a, $0a, $0a, $0a, $54 ; 02
+ db $44, $30, $0a, $0a, $0a, $0a, $0a, $53 ; 03
+ db $43, $2f, $0a, $0a, $0a, $0a, $0a, $52 ; 04
+ db $4a, $3d, $0a, $0a, $0a, $0a, $0a, $51 ; 05
+ db $4a, $30, $0a, $0a, $0a, $0a, $0a, $50 ; 06
+ db $4a, $2f, $0a, $0a, $0a, $0a, $0a, $4f ; 07
+ db $4a, $3d, $0a, $0a, $0a, $0a, $0a, $4e ; 08
+ db $4a, $30, $0a, $0a, $0a, $0a, $4d, $42 ; 09
+ db $4a, $2f, $0a, $0a, $0a, $0a, $6b, $58 ; 0a
+ db $4a, $3d, $0a, $0a, $0a, $0a, $6a, $58 ; 0b
+ db $4a, $30, $0a, $0a, $0a, $0a, $69, $58 ; 0c
+ db $4a, $2f, $0a, $0a, $0a, $0a, $68, $58 ; 0d
+ db $4a, $3d, $0a, $0a, $0a, $66, $67, $58 ; 0e
+ db $4a, $30, $0a, $0a, $0a, $65, $0a, $58 ; 0f
+ db $4a, $2f, $0a, $0a, $0a, $64, $0a, $58 ; 10
+ db $4a, $3d, $0a, $0a, $0a, $63, $0a, $58 ; 11
+ db $4a, $30, $0a, $0a, $61, $62, $0a, $58 ; 12
+ db $4a, $2f, $0a, $0a, $5f, $60, $0a, $58 ; 13
+ db $4a, $3d, $0a, $61, $62, $0a, $0a, $58 ; 14
+ db $4a, $30, $0a, $63, $0a, $0a, $0a, $58 ; 15
+ db $4a, $2f, $69, $0a, $0a, $0a, $0a, $58 ; 16
+ db $4a, $3d, $81, $0a, $0a, $0a, $0a, $58 ; 17
+ db $4a, $30, $80, $0a, $0a, $0a, $0a, $58 ; 18
+ db $4a, $2f, $7f, $0a, $0a, $0a, $0a, $58 ; 19
+ db $4a, $3d, $0a, $0a, $0a, $0a, $0a, $58 ; 1a
+ db $4a, $30, $0a, $0a, $0a, $0a, $0a, $58 ; 1b
+ db $4a, $2f, $68, $87, $88, $89, $0a, $58 ; 1c
+ db $4a, $3d, $6e, $6f, $70, $75, $76, $58 ; 1d
+ db $4a, $30, $75, $76, $5c, $5d, $5e, $58 ; 1e
+ db $4a, $2f, $71, $72, $73, $74, $6d, $58 ; 1f
+ db $4a, $3d, $75, $76, $77, $8a, $8b, $58 ; 20
+ db $4a, $30, $66, $67, $65, $0a, $6a, $58 ; 21
+ db $4a, $2f, $83, $84, $0a, $83, $84, $58 ; 22
+ db $4a, $3d, $0a, $85, $82, $84, $0a, $58 ; 23
+ db $4a, $30, $41, $80, $40, $0a, $0a, $58 ; 24
+ db $4a, $2f, $83, $0a, $0a, $0a, $0a, $58 ; 25
+ db $4a, $3d, $40, $0a, $0a, $0a, $0a, $58 ; 26
+ db -1
+
+TilemapPack_11bb7d:
+ db $0a, $0a, $0a, $0a, $0a, $0a, $16, $00 ; 00
+ db $78, $0a, $0a, $0a, $0a, $0a, $8c, $00 ; 01
+ db $79, $0a, $0a, $0a, $0a, $0a, $8d, $00 ; 02
+ db $7a, $0a, $0a, $0a, $0a, $0a, $8e, $00 ; 03
+ db $7b, $0a, $0a, $0a, $0a, $0a, $8c, $00 ; 04
+ db $7c, $0a, $0a, $0a, $0a, $0a, $8d, $00 ; 05
+ db $7d, $0a, $0a, $0a, $0a, $0a, $8e, $00 ; 06
+ db $2e, $7e, $0a, $0a, $0a, $0a, $8c, $00 ; 07
+ db $2e, $80, $0a, $0a, $0a, $0a, $8d, $00 ; 08
+ db $2e, $81, $0a, $0a, $0a, $0a, $8e, $00 ; 09
+ db $2e, $82, $0a, $0a, $0a, $0a, $8c, $00 ; 0a
+ db $2e, $69, $0a, $0a, $0a, $0a, $8d, $00 ; 0b
+ db $2e, $6a, $0a, $0a, $0a, $0a, $8e, $00 ; 0c
+ db $2e, $6b, $0a, $0a, $0a, $0a, $8c, $00 ; 0d
+ db $2e, $0a, $68, $0a, $0a, $0a, $8d, $00 ; 0e
+ db $2e, $0a, $69, $0a, $0a, $0a, $8e, $00 ; 0f
+ db $2e, $0a, $0a, $6a, $0a, $0a, $8c, $00 ; 10
+ db $2e, $0a, $0a, $6b, $0a, $0a, $8d, $00 ; 11
+ db $2e, $0a, $0a, $0a, $80, $0a, $8e, $00 ; 12
+ db $2e, $0a, $0a, $0a, $82, $0a, $8c, $00 ; 13
+ db $2e, $0a, $0a, $0a, $6c, $0a, $8d, $00 ; 14
+ db $2e, $0a, $0a, $0a, $0a, $83, $8e, $00 ; 15
+ db $2e, $0a, $6b, $0a, $0a, $0a, $8c, $00 ; 16
+ db $2e, $0a, $0a, $69, $0a, $0a, $8d, $00 ; 17
+ db $2e, $0a, $0a, $6a, $0a, $0a, $8e, $00 ; 18
+ db $2e, $0a, $0a, $0a, $68, $0a, $8c, $00 ; 19
+ db $2e, $0a, $0a, $0a, $63, $0a, $8d, $00 ; 1a
+ db $2e, $0a, $0a, $61, $62, $0a, $8e, $00 ; 1b
+ db $2e, $0a, $0a, $0a, $5f, $60, $8c, $00 ; 1c
+ db $2e, $0a, $0a, $0a, $63, $0a, $8d, $00 ; 1d
+ db $2e, $0a, $0a, $0a, $0a, $69, $8c, $00 ; 1e
+ db $2e, $0a, $0a, $0a, $0a, $6b, $8d, $00 ; 1f
+ db $2e, $0a, $0a, $0a, $0a, $83, $8e, $00 ; 20
+ db $2e, $0a, $0a, $0a, $0a, $86, $8c, $00 ; 21
+ db $2e, $0a, $85, $0a, $0a, $0a, $8d, $00 ; 22
+ db $2e, $0a, $0a, $84, $0a, $0a, $8e, $00 ; 23
+ db -1
+
+
diff --git a/mobile/mobile_5b.asm b/mobile/mobile_5b.asm
new file mode 100755
index 000000000..08cb86426
--- /dev/null
+++ b/mobile/mobile_5b.asm
@@ -0,0 +1,833 @@
+Function16c000: ; 16c000
+; unreferenced
+ ; Only for CGB
+ ld a, [hCGB]
+ and a
+ ret z
+ ; Only do this once per boot cycle
+ ld a, [hFFEA]
+ and a
+ ret z
+ ; Set some flag, preserving the old state
+ ld a, [wcfbe]
+ push af
+ set 7, a
+ ld [wcfbe], a
+ ; Do stuff
+ call MobileSystemSplashScreen_InitGFX ; Load GFX
+ farcall SetRAMStateForMobile
+ farcall EnableMobile
+ call .RunJumptable
+ farcall DisableMobile
+ ; Prevent this routine from running again
+ ; until the next time the syatem is turned on
+ xor a
+ ld [hFFEA], a
+ ; Restore the flag state
+ pop af
+ ld [wcfbe], a
+ ret
+; 16c031
+
+.RunJumptable: ; 16c031
+ xor a
+ ld [wJumptableIndex], a
+ ld [wcf64], a
+ ld [wd002], a
+ ld [wd003], a
+.loop
+ call DelayFrame
+ farcall Function10635c
+ ld a, [wd002]
+ ld hl, .Jumptable
+ rst JumpTable
+ call Function16cb2e
+ call Function16cbae
+ ld a, [wd002]
+ cp $ff
+ jr nz, .loop
+ ret
+; 16c05c
+
+.Jumptable: ; 16c05c
+ dw .init
+ dw Function16c0ba
+ dw Function16c089
+ dw Function16c09e
+ dw Function16c0a8
+ dw Function16c0dc
+ dw Function16c0ec
+ dw Function16c0ba
+ dw Function16c0ca
+ dw Function16c0dc
+ dw Function16c0ec
+ dw .quit
+; 16c074
+
+.init ; 16c074
+ ld a, [wcf64]
+ and a
+ ret z
+ ld [wd002], a
+ xor a
+ ld [wd003], a
+ ret
+; 16c081
+
+.quit ; 16c081
+ push af
+ ld a, $ff
+ ld [wd002], a
+ pop af
+ ret
+; 16c089
+
+Function16c089: ; 16c089
+ ld a, $1
+ ld [Buffer2], a
+ ld [wd1f1], a
+ xor a
+ ld [hWY], a
+ call Function16c0fa
+ ld a, [wd002]
+ ld [wcf64], a
+ ret
+; 16c09e
+
+Function16c09e: ; 16c09e
+ ld a, [wcf64]
+ cp $4
+ ret nz
+ call Function16c0fa
+ ret
+; 16c0a8
+
+Function16c0a8: ; 16c0a8
+ xor a
+ ld [Buffer2], a
+ ld [wd1f1], a
+ call ClearSprites
+ ld a, $90
+ ld [hWY], a
+ call Function16c0fa
+ ret
+; 16c0ba
+
+Function16c0ba: ; 16c0ba
+ call Function16c943
+ push af
+ ld a, [wd003]
+ inc a
+ ld [wd003], a
+ pop af
+ call c, Function16c0fa
+ ret
+; 16c0ca
+
+Function16c0ca: ; 16c0ca
+ ld a, [wd003]
+ cp $28
+ push af
+ ld a, [wd003]
+ inc a
+ ld [wd003], a
+ pop af
+ call z, Function16c0fa
+ ret
+; 16c0dc
+
+Function16c0dc: ; 16c0dc
+ call Function16ca11
+ push af
+ ld a, [wd003]
+ inc a
+ ld [wd003], a
+ pop af
+ call c, Function16c0fa
+ ret
+; 16c0ec
+
+Function16c0ec: ; 16c0ec
+ call ClearBGPalettes
+ call ClearScreen
+ push af
+ ld a, $ff
+ ld [wd002], a
+ pop af
+ ret
+; 16c0fa
+
+Function16c0fa: ; 16c0fa
+ push af
+ ld a, [wd002]
+ inc a
+ ld [wd002], a
+ xor a
+ ld [wd003], a
+ pop af
+ ret
+; 16c108
+
+MobileSystemSplashScreen_InitGFX: ; 16c108
+ call DisableLCD
+ ld hl, VTiles2
+ ld de, .Tiles
+ lb bc, BANK(.Tiles), $68
+ call Get2bpp
+ call .LoadPals
+ call .LoadTileMap
+ call .LoadAttrMap
+ hlbgcoord 0, 0
+ call Function16cc73
+ call Function16cc02
+ xor a
+ ld [hBGMapMode], a
+ call EnableLCD
+ ret
+; 16c130
+
+.LoadPals: ; 16c130
+ ld de, UnknBGPals
+ ld hl, UnknownMobilePalettes_16c903
+ ld bc, 8
+ ld a, $5
+ call FarCopyWRAM
+ farcall ApplyPals
+ ret
+; 16c145
+
+.LoadTileMap: ; 16c145
+ hlcoord 0, 0
+ ld bc, 20
+ xor a
+ call ByteFill
+ ld hl, .TileMap
+ decoord 0, 1
+ ld bc, $0154
+ call CopyBytes
+ ret
+; 16c15c
+
+.LoadAttrMap: ; 16c15c
+ hlcoord 0, 0, AttrMap
+ ld bc, SCREEN_WIDTH
+ xor a
+ call ByteFill
+ ld hl, .AttrMap
+ decoord 0, 1, AttrMap
+ ld bc, 17 * SCREEN_WIDTH
+ call CopyBytes
+ ret
+; 16c173
+
+.Tiles:
+INCBIN "gfx/mobile/mobile_splash.2bpp"
+
+.TileMap:
+INCBIN "gfx/mobile/mobile_splash.tilemap"
+
+.AttrMap:
+INCBIN "gfx/mobile/mobile_splash.attrmap"
+
+UnknownMobilePalettes_16c903: ; 16c903
+INCLUDE "gfx/unknown/16c903.pal"
+
+; 16c943
+
+Function16c943: ; 16c943
+ ld a, [wd003]
+ and a
+ jr nz, .asm_16c95e
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld a, $ff
+ ld bc, $0008
+ ld hl, UnknBGPals
+ call ByteFill
+ pop af
+ ld [rSVBK], a
+
+.asm_16c95e
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld e, $0
+ ld a, $0
+.asm_16c969
+ ld hl, UnknownMobilePalettes_16c903
+ call Function16cab6
+ call Function16cabb
+ ld d, a
+ ld hl, UnknBGPals
+ call Function16cab6
+ call Function16cabb
+ cp d
+ jr z, .asm_16c991
+ ld b, $1
+.asm_16c981
+ dec a
+ cp d
+ jr z, .asm_16c988
+ dec b
+ jr nz, .asm_16c981
+
+.asm_16c988
+ ld hl, UnknBGPals
+ call Function16cab6
+ call Function16cadc
+
+.asm_16c991
+ ld hl, UnknownMobilePalettes_16c903
+ call Function16cab6
+ call Function16cad8
+ ld d, a
+ ld hl, UnknBGPals
+ call Function16cab6
+ call Function16cad8
+ cp d
+ jr z, .asm_16c9b9
+ ld b, $1
+.asm_16c9a9
+ dec a
+ cp d
+ jr z, .asm_16c9b0
+ dec b
+ jr nz, .asm_16c9a9
+
+.asm_16c9b0
+ ld hl, UnknBGPals
+ call Function16cab6
+ call Function16cb08
+
+.asm_16c9b9
+ ld hl, UnknownMobilePalettes_16c903
+ call Function16cab6
+ call Function16cac4
+ ld d, a
+ ld hl, UnknBGPals
+ call Function16cab6
+ call Function16cac4
+ cp d
+ jr z, .asm_16c9e1
+ ld b, $1
+.asm_16c9d1
+ dec a
+ cp d
+ jr z, .asm_16c9d8
+ dec b
+ jr nz, .asm_16c9d1
+
+.asm_16c9d8
+ ld hl, UnknBGPals
+ call Function16cab6
+ call Function16cae8
+
+.asm_16c9e1
+ inc e
+ inc e
+ ld a, e
+ cp $8
+ jr nz, .asm_16c969
+ farcall ApplyPals
+ call SetPalettes
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld a, [wd003]
+ cp $1f
+ jr z, .asm_16ca09
+ pop af
+ ld [rSVBK], a
+ ld e, $0
+ pop af
+ ld [rSVBK], a
+ and a
+ ret
+
+.asm_16ca09
+ pop af
+ ld [rSVBK], a
+ pop af
+ ld [rSVBK], a
+ scf
+ ret
+; 16ca11
+
+Function16ca11: ; 16ca11
+ ld a, [wd003]
+ and a
+ jr nz, .asm_16ca1d
+ farcall ApplyPals
+
+.asm_16ca1d
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld e, $0
+ ld a, $0
+.asm_16ca28
+ ld hl, UnknBGPals
+ call Function16cab6
+ call Function16cabb
+ cp $1f
+ jr z, .asm_16ca48
+ ld b, $1
+.asm_16ca37
+ inc a
+ cp $1f
+ jr z, .asm_16ca3f
+ dec b
+ jr nz, .asm_16ca37
+
+.asm_16ca3f
+ ld hl, UnknBGPals
+ call Function16cab6
+ call Function16cadc
+
+.asm_16ca48
+ ld hl, UnknBGPals
+ call Function16cab6
+ call Function16cad8
+ cp $1f
+ jr z, .asm_16ca68
+ ld b, $1
+.asm_16ca57
+ inc a
+ cp $1f
+ jr z, .asm_16ca5f
+ dec b
+ jr nz, .asm_16ca57
+
+.asm_16ca5f
+ ld hl, UnknBGPals
+ call Function16cab6
+ call Function16cb08
+
+.asm_16ca68
+ ld hl, UnknBGPals
+ call Function16cab6
+ call Function16cac4
+ cp $1f
+ jr z, .asm_16ca88
+ ld b, $1
+.asm_16ca77
+ inc a
+ cp $1f
+ jr z, .asm_16ca7f
+ dec b
+ jr nz, .asm_16ca77
+
+.asm_16ca7f
+ ld hl, UnknBGPals
+ call Function16cab6
+ call Function16cae8
+
+.asm_16ca88
+ inc e
+ inc e
+ ld a, e
+ cp $8
+ jr nz, .asm_16ca28
+ farcall ApplyPals
+ call SetPalettes
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld a, [wd003]
+ cp $1f
+ jr z, .asm_16caae
+ pop af
+ ld [rSVBK], a
+ pop af
+ ld [rSVBK], a
+ and a
+ ret
+
+.asm_16caae
+ pop af
+ ld [rSVBK], a
+ pop af
+ ld [rSVBK], a
+ scf
+ ret
+; 16cab6
+
+Function16cab6: ; 16cab6
+ ld b, $0
+ ld c, e
+ add hl, bc
+ ret
+; 16cabb
+
+Function16cabb: ; 16cabb
+ inc hl
+ ld a, [hl]
+ srl a
+ srl a
+ and $1f
+ ret
+; 16cac4
+
+Function16cac4: ; 16cac4
+ inc hl
+ ld a, [hld]
+ and $3
+ ld b, a
+ ld a, [hl]
+ sla a
+ rl b
+ sla a
+ rl b
+ sla a
+ rl b
+ ld a, b
+ ret
+; 16cad8
+
+Function16cad8: ; 16cad8
+ ld a, [hl]
+ and $1f
+ ret
+; 16cadc
+
+Function16cadc: ; 16cadc
+ sla a
+ sla a
+ ld b, a
+ inc hl
+ ld a, [hl]
+ and $83
+ or b
+ ld [hl], a
+ ret
+; 16cae8
+
+Function16cae8: ; 16cae8
+ ld c, a
+ srl a
+ srl a
+ srl a
+ ld b, a
+ inc hl
+ ld a, [hl]
+ and $fc
+ or b
+ ld [hld], a
+ ld a, c
+ sla a
+ sla a
+ sla a
+ sla a
+ sla a
+ ld b, a
+ ld a, [hl]
+ and $1f
+ or b
+ ld [hl], a
+ ret
+; 16cb08
+
+Function16cb08: ; 16cb08
+ ld b, a
+ ld a, [hl]
+ and $e0
+ or b
+ ld [hl], a
+ ret
+; 16cb0f
+
+Function16cb0f: ; 16cb0f
+ xor a
+ ld [Buffer1], a
+ ld [Buffer2], a
+ xor a
+ ld [wd1ec], a
+ ld a, $70
+ ld [wd1ee], a
+ ld a, $4
+ ld [wd1ed], a
+ ld a, $a0
+ ld [wd1ef], a
+ xor a
+ ld [wd1f0], a
+ ret
+; 16cb2e
+
+Function16cb2e: ; 16cb2e
+ ld a, [Buffer2]
+ and a
+ ret z
+ call Function16cb40
+ ld hl, Unknown_16cb86
+ ld de, Sprites
+ call Function16cb5d
+ ret
+; 16cb40
+
+Function16cb40: ; 16cb40
+ ld hl, wd1ec
+ inc [hl]
+ ld a, [hl]
+ cp $18
+ ret c
+ xor a
+ ld [hl], a
+ ld a, [wd1ef]
+ cp $a0
+ jr nz, .asm_16cb57
+ ld a, $a7
+ ld [wd1ef], a
+ ret
+
+.asm_16cb57
+ ld a, $a0
+ ld [wd1ef], a
+ ret
+; 16cb5d
+
+Function16cb5d: ; 16cb5d
+ ld a, [hli]
+ and a
+ ret z
+.asm_16cb60
+ push af
+ ld a, [wd1ee]
+ add [hl]
+ add $10
+ ld [de], a
+ inc hl
+ inc de
+ ld a, [wd1ed]
+ add [hl]
+ add $8
+ ld [de], a
+ inc hl
+ inc de
+ ld a, [wd1ef]
+ add [hl]
+ ld [de], a
+ inc hl
+ inc de
+ ld a, [wd1f0]
+ or [hl]
+ ld [de], a
+ inc hl
+ inc de
+ pop af
+ dec a
+ jr nz, .asm_16cb60
+ ret
+; 16cb86
+
+Unknown_16cb86:
+ db 7
+ db 0, 0, 0, 1
+ db 8, 0, 1, 1
+ db 8, 8, 2, 0
+ db 8, 16, 3, 0
+ db 16, 0, 4, 1
+ db 16, 8, 5, 0
+ db 16, 16, 6, 0
+; 16cba3
+
+Function16cba3: ; 16cba3
+ xor a
+ ld [wd1f1], a
+ ld [wd1f2], a
+ ld [wd1f3], a
+ ret
+; 16cbae
+
+Function16cbae: ; 16cbae
+ ld a, [wd1f1]
+ and a
+ ret z
+ call Function16cbba
+ call Function16cbd1
+ ret
+; 16cbba
+
+Function16cbba: ; 16cbba
+ ld hl, wd1f2
+ inc [hl]
+ ld a, [hl]
+ cp $c
+ ret c
+ xor a
+ ld [hl], a
+ ld a, [wd1f3]
+ inc a
+ cp $4
+ jr c, .asm_16cbcd
+ xor a
+
+.asm_16cbcd
+ ld [wd1f3], a
+ ret
+; 16cbd1
+
+Function16cbd1: ; 16cbd1
+ ld a, [wd1f3]
+ ld c, a
+ ld b, 0
+ ld hl, Unknown_16cbfb
+ add hl, bc
+ ld a, [hl]
+ ld bc, 2
+ ld hl, Unknown_16cfa3
+ call AddNTimes
+ ld de, UnknBGPals + 1 palettes + 4
+ ld bc, 2
+ ld a, $5
+ call FarCopyWRAM
+ farcall ApplyPals
+ ld a, $1
+ ld [hCGBPalUpdate], a
+ ret
+; 16cbfb
+
+Unknown_16cbfb:
+ db 0, 1, 2, 1, 0, 1, 2
+; 16cc02
+
+Function16cc02: ; 16cc02
+ call Function16cc18
+ call Function16cc49
+ call Function16cc62
+ call Function16cc25
+ call Function16cc6e
+ call Function16cb0f
+ call Function16cba3
+ ret
+; 16cc18
+
+Function16cc18: ; 16cc18
+ ld hl, VTiles1
+ ld de, GFX_16cca3
+ lb bc, BANK(GFX_16cca3), $2e
+ call Get2bpp
+ ret
+; 16cc25
+
+Function16cc25: ; 16cc25
+ ld hl, Unknown_16cfa9
+ ld de, UnknBGPals + 1 palettes
+ call .CopyPal
+ ld hl, Unknown_16cfb1
+ ld de, UnknOBPals
+ call .CopyPal
+ ld hl, Unknown_16cfb9
+ ld de, UnknOBPals + 1 palettes
+ call .CopyPal
+ ret
+; 16cc41
+
+.CopyPal: ; 16cc41
+ ld bc, 1 palettes
+ ld a, $5
+ jp FarCopyWRAM
+; 16cc49
+
+Function16cc49: ; 16cc49
+ hlcoord 4, 15
+ ld a, $80
+ call Function16cc5a
+ hlcoord 4, 16
+ ld a, $90
+ call Function16cc5a
+ ret
+; 16cc5a
+
+Function16cc5a: ; 16cc5a
+ ld c, $10
+.asm_16cc5c
+ ld [hli], a
+ inc a
+ dec c
+ jr nz, .asm_16cc5c
+ ret
+; 16cc62
+
+Function16cc62: ; 16cc62
+ hlcoord 0, 15, AttrMap
+ ld bc, $0028
+ ld a, $1
+ call ByteFill
+ ret
+; 16cc6e
+
+Function16cc6e: ; 16cc6e
+ hlbgcoord 0, 0, VBGMap1
+ jr Function16cc73
+
+Function16cc73:
+ ld a, [rVBK]
+ push af
+ ld a, $0
+ ld [rVBK], a
+ push hl
+ decoord 0, 0
+ call Function16cc90
+ pop hl
+ ld a, $1
+ ld [rVBK], a
+ decoord 0, 0, AttrMap
+ call Function16cc90
+ pop af
+ ld [rVBK], a
+ ret
+; 16cc90
+
+Function16cc90: ; 16cc90
+ ld bc, $1214
+.asm_16cc93
+ push bc
+.asm_16cc94
+ ld a, [de]
+ inc de
+ ld [hli], a
+ dec c
+ jr nz, .asm_16cc94
+ ld bc, $000c
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .asm_16cc93
+ ret
+; 16cca3
+
+GFX_16cca3:
+INCBIN "gfx/unknown/16cca3.2bpp"
+
+Unknown_16cfa3:
+ RGB 31, 31, 31
+ RGB 25, 27, 29
+ RGB 16, 19, 25
+
+Unknown_16cfa9:
+ RGB 31, 31, 31
+ RGB 25, 27, 29
+ RGB 31, 31, 31
+ RGB 07, 07, 07
+
+
+Unknown_16cfb1:
+ RGB 31, 31, 31
+ RGB 13, 09, 18
+ RGB 26, 21, 16
+ RGB 07, 07, 07
+
+
+Unknown_16cfb9:
+ RGB 31, 31, 31
+ RGB 18, 05, 02
+ RGB 27, 11, 12
+ RGB 07, 07, 07
+
+; 16cfc1
diff --git a/mobile/mobile_5c.asm b/mobile/mobile_5c.asm
new file mode 100755
index 000000000..005bb1a1b
--- /dev/null
+++ b/mobile/mobile_5c.asm
@@ -0,0 +1,946 @@
+Function170000: ; 170000
+ ld a, [$c62b]
+ ld [wPlayerTrademonSpecies], a
+ ld hl, $c62e
+ ld de, wPlayerTrademonSenderName
+ ld bc, $0005
+ call CopyBytes
+ ld a, $50
+ ld [de], a
+ ld hl, $c663
+ ld de, wPlayerTrademonOTName
+ ld bc, $0005
+ call CopyBytes
+ ld a, $50
+ ld [de], a
+ ld hl, $c648
+ ld a, [hli]
+ ld [wPlayerTrademonDVs], a
+ ld a, [hl]
+ ld [wPlayerTrademonDVs + 1], a
+ ld hl, $c639
+ ld a, [hli]
+ ld [wPlayerTrademonID], a
+ ld a, [hl]
+ ld [wPlayerTrademonID + 1], a
+ ld bc, $c633
+ farcall GetCaughtGender
+ ld a, c
+ ld [wPlayerTrademonCaughtData], a
+ ld a, [wcd81]
+ ld [wc74e], a
+ ld hl, $c608
+ ld de, $d800
+ ld bc, $008f
+ call CopyBytes
+ ret
+
+; 17005a
+
+Function17005a: ; 17005a
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$a824]
+ ld [wOTTrademonSpecies], a
+ ld hl, $a827
+ ld de, wOTTrademonSenderName
+ ld bc, NAME_LENGTH_JAPANESE - 1
+ call CopyBytes
+ ld a, "@"
+ ld [de], a
+ ld hl, $a85c
+ ld de, wOTTrademonOTName
+ ld bc, NAME_LENGTH_JAPANESE - 1
+ call CopyBytes
+ ld a, "@"
+ ld [de], a
+ ld hl, $a841
+ ld a, [hli]
+ ld [wOTTrademonDVs], a
+ ld a, [hl]
+ ld [wOTTrademonDVs + 1], a
+ ld hl, $a832
+ ld a, [hli]
+ ld [wOTTrademonID], a
+ ld a, [hl]
+ ld [wOTTrademonID + 1], a
+ ld bc, $a82c
+ farcall GetCaughtGender
+ ld a, c
+ ld [wOTTrademonCaughtData], a
+ ld a, [wcd81]
+ ld [wc74e], a
+ call CloseSRAM
+ ret
+
+; 1700b0
+
+INCLUDE "mobile/battle_tower_5c.asm"
+
+Function170be4: ; 170be4
+ ld a, $5
+ call GetSRAMBank
+ xor a
+ ld hl, $a894
+ ld bc, $0008
+ call ByteFill
+ call CloseSRAM
+ ret
+
+; 170bf7
+
+Clears5_a89a: ; 170bf7
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $a89a
+ xor a
+ ld [hli], a
+ ld [hl], a
+ call CloseSRAM
+ ret
+
+; 170c06
+
+Function170c06: ; 170c06
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $a894
+ ld a, [wBattleResult]
+ and a
+ jr nz, .asm_170c15
+ inc [hl]
+
+.asm_170c15
+ inc hl
+ inc hl
+ ld a, [$a89b]
+ add [hl]
+ ld [hld], a
+ ld a, [$a89a]
+ adc [hl]
+ ld [hli], a
+ jr nc, .asm_170c27
+ ld a, $ff
+ ld [hld], a
+ ld [hli], a
+
+.asm_170c27
+ inc hl
+ push hl
+ ld de, 0
+ xor a
+ ld [wd265], a
+.asm_170c30
+ ld hl, PartyMon1HP
+ ld a, [wd265]
+ call GetPartyLocation
+ ld a, [hli]
+ ld b, a
+ ld c, [hl]
+ inc hl
+ inc hl
+ ld a, [hld]
+ sub c
+ ld c, a
+ ld a, [hl]
+ sbc b
+ ld b, a
+ push de
+ pop hl
+ add hl, bc
+ push hl
+ pop de
+ jr c, .asm_170c58
+ ld a, [wd265]
+ inc a
+ ld [wd265], a
+ cp $3
+ jr c, .asm_170c30
+ jr .asm_170c5b
+
+.asm_170c58
+ ld de, -1
+
+.asm_170c5b
+ pop hl
+ inc hl
+ ld a, e
+ add [hl]
+ ld [hld], a
+ ld a, d
+ adc [hl]
+ ld [hli], a
+ jr nc, .asm_170c69
+ ld a, $ff
+ ld [hld], a
+ ld [hli], a
+
+.asm_170c69
+ inc hl
+ push hl
+ ld b, $0
+ ld c, $0
+.asm_170c6f
+ ld hl, PartyMon1HP
+ ld a, b
+ push bc
+ call GetPartyLocation
+ pop bc
+ ld a, [hli]
+ or [hl]
+ jr nz, .asm_170c7d
+ inc c
+
+.asm_170c7d
+ inc b
+ ld a, b
+ cp $3
+ jr c, .asm_170c6f
+ pop hl
+ ld a, [hl]
+ add c
+ ld [hl], a
+ call CloseSRAM
+ ret
+
+; 170c8b
+
+Function170c8b: ; 170c8b
+ ld hl, LastEnemyCounterMove
+ ld b, $5
+.asm_170c90
+ ld a, [hl]
+ xor $ff
+ ld [hli], a
+ dec b
+ jr nz, .asm_170c90
+ ret
+
+; 170c98
+
+CheckBTMonMovesForErrors: ; 170c98
+ ld c, BATTLETOWER_NROFPKMNS
+ ld hl, wBT_OTTempPkmn1Moves
+.loop
+ push hl
+ ld a, [hl]
+ cp NUM_ATTACKS + 1
+ jr c, .okay
+ ld a, POUND
+ ld [hl], a
+
+.okay
+ inc hl
+ ld b, NUM_MOVES - 1
+.loop2
+ ld a, [hl]
+ and a
+ jr z, .loop3
+ cp NUM_ATTACKS + 1
+ jr c, .next
+
+.loop3
+ xor a
+ ld [hl], a
+ inc hl
+ dec b
+ jr nz, .loop3
+ jr .done
+
+.next
+ inc hl
+ dec b
+ jr nz, .loop2
+
+.done
+ pop hl
+ ld de, PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH
+ add hl, de
+ dec c
+ jr nz, .loop
+ ret
+
+; 170cc6
+
+Function170cc6: ; 170cc6
+ ld a, [rSVBK]
+ push af
+ ld a, $6
+ ld [rSVBK], a
+ ld hl, LZ_170d16
+ ld de, wDecompressScratch
+ call Decompress
+ ld a, $1
+ ld [rVBK], a
+ ld de, wd000
+ ld hl, VTiles0
+ lb bc, $6, $c1
+ call Get2bpp
+ xor a
+ ld [rVBK], a
+ ld hl, LZ_1715a4
+ ld de, wd000
+ call Decompress
+ ld de, UnknBGPals
+ ld hl, VTiles0
+ lb bc, $6, $53
+ call Get2bpp
+ pop af
+ ld [rSVBK], a
+ ret
+
+; 170d02
+
+Function170d02: ; 170d02
+ ld a, $1
+ ld [rVBK], a
+ ld de, GFX_171848
+ ld hl, VTiles1 tile $41
+ lb bc, BANK(GFX_171848), $18
+ call Get2bpp
+ xor a
+ ld [rVBK], a
+ ret
+
+; 170d16
+
+LZ_170d16:
+INCBIN "gfx/mobile/pichu_animated.2bpp.lz"
+
+LZ_1715a4:
+INCBIN "gfx/mobile/electro_ball.2bpp.lz"
+
+GFX_171848:
+INCBIN "gfx/unknown/171848.2bpp"
+
+Function1719c8: ; 1719c8 (5c:59c8)
+ ld a, [hInMenu]
+ push af
+ ld a, $1
+ ld [hInMenu], a
+ call Function1719d6
+ pop af
+ ld [hInMenu], a
+ ret
+
+Function1719d6: ; 1719d6 (5c:59d6)
+ farcall BattleTowerRoomMenu_InitRAM
+ call Function1719ed
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ call Function171a11
+ pop af
+ ld [rSVBK], a
+ ret
+
+Function1719ed: ; 1719ed (5c:59ed)
+ xor a
+ ld [wcd49], a
+ ld [wcd4a], a
+ dec a
+ ld [wcd4b], a
+ call ClearBGPalettes
+ call ClearSprites
+ farcall Function171d2b
+ farcall ReloadMapPart
+ farcall ClearSpriteAnims
+ ret
+
+Function171a11: ; 171a11 (5c:5a11)
+.loop
+ call JoyTextDelay
+ ld a, [wcd49]
+ bit 7, a
+ jr nz, .done
+ call Function171a36
+ farcall PlaySpriteAnimations
+ farcall ReloadMapPart
+ jr .loop
+.done
+ farcall ClearSpriteAnims
+ call ClearSprites
+ ret
+
+Function171a36: ; 171a36 (5c:5a36)
+ ld a, [wcd49]
+ ld e, a
+ ld d, 0
+ ld hl, Jumptable_171a45
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+Jumptable_171a45: ; 171a45 (5c:5a45)
+ dw Function171a95
+ dw Function171ac9
+ dw Function171a5d
+ dw Function171ad7
+ dw Function171a5d
+ dw Function171aec
+ dw Function171b4b
+ dw Function171b85
+ dw Function171bcc
+ dw Function171c2c
+ dw Function171c39
+ dw Function171c41
+
+
+Function171a5d: ; 171a5d (5c:5a5d)
+ ld a, [wc821]
+ bit 1, a
+ jr nz, .asm_171a6a
+ bit 0, a
+ ret nz
+ jp Function171c66
+
+.asm_171a6a
+ ld a, $0
+ call Function3e32
+ ld [wc300], a
+ ld a, l
+ ld [wc301], a
+ ld a, h
+ ld [wc302], a
+ ld a, $a
+ call Function3e32
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ farcall BattleTowerRoomMenu_Cleanup
+ pop af
+ ld [rSVBK], a
+ ld a, $a
+ ld [wcd49], a
+ ret
+
+Function171a95: ; 171a95 (5c:5a95)
+ farcall Function171ccd
+ hlcoord 2, 8
+ ld de, String_171aa7
+ call PlaceString
+ jp Function171c66
+
+; 171aa7 (5c:5aa7)
+
+String_171aa7: ; 171aa7
+ db "モバイルアダプタに"
+ next "せつぞく しています"
+ next "しばらく おまちください"
+ db "@"
+; 171ac9
+
+Function171ac9: ; 171ac9 (5c:5ac9)
+ ld de, wcd81
+ ld hl, $5c
+ ld a, $2
+ call Function3e32
+ jp Function171c66
+
+Function171ad7: ; 171ad7 (5c:5ad7)
+ xor a
+ ld hl, $c608
+ ld bc, $66
+ call ByteFill
+ ld de, $c608
+ ld a, $c
+ call Function3e32
+ jp Function171c66
+
+Function171aec: ; 171aec (5c:5aec)
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ farcall BattleTowerRoomMenu_Cleanup
+ pop af
+ ld [rSVBK], a
+ hlcoord 2, 6
+ ld a, $8
+.asm_171b01
+ push af
+ push hl
+ xor a
+ ld bc, $10
+ call ByteFill
+ pop hl
+ ld de, $14
+ add hl, de
+ pop af
+ dec a
+ jr nz, .asm_171b01
+ hlcoord 2, 7
+ ld a, $3
+ ld de, $c608
+.asm_171b1b
+ push af
+ push hl
+ ld a, [de]
+ and a
+ jr z, .asm_171b34
+ ld a, [wcd4b]
+ inc a
+ ld [wcd4b], a
+ push hl
+ call Function171b42
+ pop hl
+ ld bc, $ffec
+ add hl, bc
+ call Function171b42
+.asm_171b34
+ pop hl
+ ld bc, $14
+ add hl, bc
+ add hl, bc
+ add hl, bc
+ pop af
+ dec a
+ jr nz, .asm_171b1b
+ jp Function171c66
+
+Function171b42: ; 171b42 (5c:5b42)
+ ld a, [de]
+ inc de
+ and a
+ ret z
+ sub $20
+ ld [hli], a
+ jr Function171b42
+
+Function171b4b: ; 171b4b (5c:5b4b)
+ depixel 8, 2
+ ld a, SPRITE_ANIM_INDEX_1D
+ call _InitSpriteAnimStruct
+ ld hl, SPRITEANIMSTRUCT_0C
+ add hl, bc
+ ld a, $8
+ ld [hl], a
+
+ depixel 8, 19
+ ld a, SPRITE_ANIM_INDEX_1D
+ call _InitSpriteAnimStruct
+ ld hl, SPRITEANIMSTRUCT_0C
+ add hl, bc
+ ld a, $9
+ ld [hl], a
+
+ depixel 17, 14, 2, 0
+ ld a, SPRITE_ANIM_INDEX_1D
+ call _InitSpriteAnimStruct
+ ld hl, SPRITEANIMSTRUCT_0C
+ add hl, bc
+ ld a, $a
+ ld [hl], a
+
+ ld a, $4
+ ld [wcd23], a
+ ld a, $8
+ ld [wcd24], a
+ jp Function171c66
+
+Function171b85: ; 171b85 (5c:5b85)
+ ld hl, hJoyPressed ; $ffa7
+ ld a, [hl]
+ and $2
+ jp nz, Function171b9f
+ ld a, [hl]
+ and $1
+ jp nz, Function171bbd
+ ld a, [hl]
+ and $40
+ jr nz, asm_171ba5
+ ld a, [hl]
+ and $80
+ jr nz, asm_171baf
+ ret
+
+Function171b9f: ; 171b9f (5c:5b9f)
+ ld a, $80
+ ld [wcd49], a
+ ret
+
+asm_171ba5: ; 171ba5 (5c:5ba5)
+ ld a, [wcd4a]
+ and a
+ ret z
+ dec a
+ ld [wcd4a], a
+ ret
+
+asm_171baf: ; 171baf (5c:5baf)
+ ld a, [wcd4b]
+ ld c, a
+ ld a, [wcd4a]
+ cp c
+ ret z
+ inc a
+ ld [wcd4a], a
+ ret
+
+Function171bbd: ; 171bbd (5c:5bbd)
+ call PlayClickSFX
+ ld a, $8
+ ld [wcd23], a
+ xor a
+ ld [wcd24], a
+ jp Function171c66
+
+Function171bcc: ; 171bcc (5c:5bcc)
+ ld hl, hJoyPressed ; $ffa7
+ ld a, [hl]
+ and $2
+ jp nz, Function171bdc
+ ld a, [hl]
+ and $1
+ jp nz, Function171beb
+ ret
+
+Function171bdc: ; 171bdc (5c:5bdc)
+ ld a, $4
+ ld [wcd23], a
+ ld a, $8
+ ld [wcd24], a
+ ld hl, wcd49
+ dec [hl]
+ ret
+
+Function171beb: ; 171beb (5c:5beb)
+ ld a, $5
+ call GetSRAMBank
+ ld a, [wcd4a]
+ ld [$aa4a], a
+ call CloseSRAM
+ ld hl, MenuDataHeader_171c6b
+ call LoadMenuDataHeader
+ call MenuBox
+ call MenuBoxCoord2Tile
+ farcall ReloadMapPart
+ hlcoord 1, 14
+ ld de, String_171c73
+ call PlaceString
+ ld a, [wcd4a]
+ cp $2
+ jr z, .asm_171c1f
+ ld a, $8
+ jr .asm_171c21
+.asm_171c1f
+ ld a, $c
+.asm_171c21
+ ld [wcd24], a
+ ld a, $1e
+ ld [wcd4c], a
+ call Function171c66
+
+Function171c2c: ; 171c2c (5c:5c2c)
+ ld hl, wcd4c
+ dec [hl]
+ ret nz
+ call ExitMenu
+ call ClearBGPalettes
+ jr asm_171c60
+
+Function171c39: ; 171c39 (5c:5c39)
+ ld a, $28
+ ld [wcd4c], a
+ call Function171c66
+
+Function171c41: ; 171c41 (5c:5c41)
+ ld hl, wcd4c
+ dec [hl]
+ ret nz
+ call ClearBGPalettes
+ farcall MobileFunc_106462
+ farcall Function106464
+ ld a, $2
+ ld [wc303], a
+ farcall DisplayMobileError
+asm_171c60: ; 171c60 (5c:5c60)
+ ld a, $80
+ ld [wcd49], a
+ ret
+
+Function171c66: ; 171c66 (5c:5c66)
+ ld hl, wcd49
+ inc [hl]
+ ret
+
+; 171c6b (5c:5c6b)
+
+MenuDataHeader_171c6b: ; 171c6b
+ db $40 ; flags
+ db 12, 0 ; start coords
+ db 17, 19 ; end coords
+ dw NULL
+ db 0 ; default option
+; 171c73
+
+String_171c73: ; 171c73
+ db "モバイルセンターを けってい"
+ next "しました@"
+; 171c87
+
+Function171c87: ; 171c87 (5c:5c87)
+ call DisableLCD
+ ld hl, GFX_171db1
+ ld de, VTiles2 tile $00
+ ld bc, $6e0
+ call CopyBytes
+ ld hl, LZ_172abd
+ ld de, VTiles0 tile $00
+ call Decompress
+ call EnableLCD
+ ld hl, Tilemap_172491
+ decoord 0, 0
+ ld bc, $168
+ call CopyBytes
+ ld hl, Attrmap_1727ed
+ decoord 0, 0, AttrMap
+ ld bc, $168
+ call CopyBytes
+ hlcoord 3, 2
+ ld de, String_172e31
+ call PlaceString
+ hlcoord 3, 16
+ ld de, String_172e3f
+ call PlaceString
+ ret
+
+Function171ccd: ; 171ccd (5c:5ccd)
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, Palette_171d71
+ ld de, UnknBGPals
+ ld bc, $40
+ call CopyBytes
+ ld hl, EngineBuffer5
+ ld a, $ff
+ ld [hli], a
+ ld a, $7f
+ ld [hl], a
+ call SetPalettes
+ pop af
+ ld [rSVBK], a
+ ret
+
+Function171cf0: ; 171cf0 (5c:5cf0)
+ xor a
+ hlcoord 4, 15
+ ld [hli], a
+ ld [hli], a
+ ld a, [wcd4b]
+ xor $1
+ ld [wcd4b], a
+ and a
+ jr nz, .asm_171d16
+ ld hl, Tilemap_17251d
+ decoord 0, 7
+ ld bc, $8c
+ call CopyBytes
+ hlcoord 3, 16
+ ld de, String_172e3f
+ jp PlaceString
+
+.asm_171d16
+ ld hl, Tilemap_1725f9
+ decoord 0, 7
+ ld bc, $8c
+ call CopyBytes
+ hlcoord 3, 16
+ ld de, String_172e4e
+ jp PlaceString
+
+Function171d2b: ; 171d2b (5c:5d2b)
+ call DisableLCD
+ ld hl, GFX_171db1
+ ld de, VTiles2 tile $00
+ ld bc, $6e0
+ call CopyBytes
+ ld hl, LZ_172abd
+ ld de, VTiles0 tile $00
+ call Decompress
+ call EnableLCD
+ ld hl, Tilemap_172685
+ decoord 0, 0
+ ld bc, $168
+ call CopyBytes
+ ld hl, Attrmap_172955
+ decoord 0, 0, AttrMap
+ ld bc, $168
+ call CopyBytes
+ hlcoord 2, 2
+ ld de, String_172e5d
+ call PlaceString
+ hlcoord 14, 16
+ ld de, String_172e58
+ call PlaceString
+ ret
+
+; 171d71 (5c:5d71)
+
+Palette_171d71:
+ RGB 0, 0, 0
+ RGB 3, 0, 0
+ RGB 5, 0, 0
+ RGB 31, 31, 29
+ RGB 0, 2, 10
+ RGB 2, 10, 21
+ RGB 0, 0, 0
+ RGB 10, 26, 31
+ RGB 0, 0, 0
+ RGB 0, 7, 8
+ RGB 31, 8, 0
+ RGB 1, 17, 15
+ RGB 31, 16, 0
+ RGB 31, 22, 0
+ RGB 31, 27, 0
+ RGB 31, 31, 0
+ RGB 31, 18, 6
+ RGB 0, 3, 0
+ RGB 0, 9, 0
+ RGB 0, 12, 0
+ RGB 0, 16, 0
+ RGB 0, 22, 0
+ RGB 0, 25, 0
+ RGB 0, 27, 0
+ RGB 5, 5, 16
+ RGB 8, 19, 28
+ RGB 0, 0, 0
+ RGB 31, 31, 31
+ RGB 31, 31, 29
+ RGB 21, 21, 20
+ RGB 11, 11, 10
+ RGB 0, 0, 0
+
+GFX_171db1:
+INCBIN "gfx/mobile/ascii_font.2bpp"
+
+Tilemap_172491:
+INCBIN "gfx/unknown/172491.tilemap"
+Tilemap_17251d:
+INCBIN "gfx/unknown/17251d.tilemap"
+Tilemap_1725f9:
+INCBIN "gfx/unknown/1725f9.tilemap"
+Tilemap_172685:
+INCBIN "gfx/unknown/172685.tilemap"
+Attrmap_1727ed:
+INCBIN "gfx/unknown/1727ed.attrmap"
+Attrmap_172955:
+INCBIN "gfx/unknown/172955.attrmap"
+
+LZ_172abd:
+INCBIN "gfx/pokedex/slowpoke.2bpp.lz"
+
+String_172e31: ; 172e31
+ db "パスワード", $1f, "いれてください@"
+String_172e3f: ; 172e3f
+ db "きりかえ やめる けってい@"
+String_172e4e: ; 172e4e
+ db "きりかえ やめる "
+String_172e58:
+ db "けってい@"
+String_172e5d: ; 172e5d
+ db "せつぞくする モバイルセンターを"
+ next "えらんで ください@"
+; 172e78
+
+
+Function172e78: ; 172e78 (5c:6e78)
+ ld a, $7f
+ hlcoord 0, 0
+ ld bc, $168
+ call ByteFill
+ ld a, $7
+ hlcoord 0, 0, AttrMap
+ ld bc, $168
+ call ByteFill
+ call DisableLCD
+ ld hl, GameBoyN64GFX
+ ld de, VTiles2 tile $00
+ ld bc, $610
+ call CopyBytes
+ call EnableLCD
+ ld hl, Tilemap_1733af
+ decoord 0, 0
+ ld bc, $168
+ call CopyBytes
+ ld hl, Attrmap_173517
+ decoord 0, 0, AttrMap
+ ld bc, $168
+ call CopyBytes
+ ret
+
+; 172eb9 (5c:6eb9)
+
+Function172eb9:
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, Palette_172edf
+ ld de, UnknBGPals
+ ld bc, $40
+ call CopyBytes
+ ld hl, Palette_172edf
+ ld de, BGPals
+ ld bc, $40
+ call CopyBytes
+ call SetPalettes
+ pop af
+ ld [rSVBK], a
+ ret
+
+; 172edf (5c:6edf)
+
+Palette_172edf:
+ RGB 5, 12, 17
+ RGB 31, 31, 31
+ RGB 18, 25, 28
+ RGB 10, 17, 21
+ RGB 6, 13, 18
+ RGB 31, 31, 31
+ RGB 20, 26, 28
+ RGB 12, 19, 23
+ RGB 3, 10, 16
+ RGB 31, 31, 31
+ RGB 6, 13, 18
+ RGB 20, 26, 28
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 5, 5, 16
+ RGB 8, 19, 28
+ RGB 0, 0, 0
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+GameBoyN64GFX:
+INCBIN "gfx/trade/game_boy_n64.2bpp"
+
+Tilemap_1733af:
+IF DEF(CRYSTAL11)
+INCBIN "gfx/unknown/1733af_corrupt.tilemap"
+ELSE
+INCBIN "gfx/unknown/1733af.tilemap"
+ENDC
+
+Attrmap_173517:
+INCBIN "gfx/unknown/173517.attrmap"
diff --git a/mobile/mobile_5e.asm b/mobile/mobile_5e.asm
new file mode 100644
index 000000000..c8cae6654
--- /dev/null
+++ b/mobile/mobile_5e.asm
@@ -0,0 +1,925 @@
+MobileAdapterGFX::
+INCBIN "gfx/mobile/mobile_adapter.2bpp"
+
+Function17a68f:: ; 17a68f (5e:668f)
+ call Function17a6a8
+ call Function17a751
+ ld hl, $d088
+ bit 5, [hl]
+ jr z, .asm_17a6a6
+ ld de, StringBuffer1 ; $d073
+ push de
+ call Function17a721
+ pop de
+ xor a
+ ret
+
+.asm_17a6a6
+ scf
+ ret
+
+Function17a6a8: ; 17a6a8 (5e:66a8)
+ push de
+ push bc
+ ld hl, StringBuffer2 ; $d086
+ ld bc, $a
+ xor a
+ call ByteFill
+ ld hl, Buffer1
+ ld bc, $10
+ ld a, $ff
+ call ByteFill
+ pop bc
+ ld a, c
+ and a
+ jr z, .asm_17a6c9
+ ld hl, $d088
+ set 4, [hl]
+.asm_17a6c9
+ pop de
+ call Function17a6f5
+ call Function17aba0
+ farcall Function106464
+ call Function17ac0c
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
+ call Function17abcf
+ farcall LoadOW_BGPal7
+ farcall Function49420
+ call SetPalettes
+ call DelayFrame
+ ret
+
+Function17a6f5: ; 17a6f5 (5e:66f5)
+ ld hl, Buffer1
+ ld c, $0
+ ld b, $8
+.asm_17a6fc
+ ld a, [de]
+ call Function17a713
+ jr c, .asm_17a70e
+ ld a, [de]
+ swap a
+ call Function17a713
+ jr c, .asm_17a70e
+ inc de
+ dec b
+ jr nz, .asm_17a6fc
+.asm_17a70e
+ ld a, c
+ ld [$d08c], a
+ ret
+
+Function17a713: ; 17a713 (5e:6713)
+ and $f
+ cp $a
+ jr nc, .asm_17a71d
+ ld [hli], a
+ inc c
+ and a
+ ret
+
+.asm_17a71d
+ ld [hl], $ff
+ scf
+ ret
+
+Function17a721: ; 17a721 (5e:6721)
+ push de
+ ld h, d
+ ld l, e
+ ld bc, $8
+ ld a, $ff
+ call ByteFill
+ pop de
+ ld hl, Buffer1
+ ld b, $8
+.asm_17a732
+ ld c, $0
+ ld a, [hli]
+ cp $a
+ jr nc, .asm_17a748
+ ld c, a
+ ld a, [hli]
+ cp $a
+ jr nc, .asm_17a74c
+ swap a
+ or c
+ ld [de], a
+ inc de
+ dec b
+ jr nz, .asm_17a732
+ ret
+
+.asm_17a748
+ ld a, $ff
+ ld [de], a
+ ret
+
+.asm_17a74c
+ ld a, $f0
+ or c
+ ld [de], a
+ ret
+
+Function17a751: ; 17a751 (5e:6751)
+ xor a
+ ld [$d087], a
+.asm_17a755
+ call Function17a781
+ call Function17a7ae
+ call Function17a97b
+ call Function17a770
+ call Function17a78f
+ ld hl, $d08f
+ inc [hl]
+ ld a, [$d087]
+ bit 7, a
+ jr z, .asm_17a755
+ ret
+
+Function17a770: ; 17a770 (5e:6770)
+ ld a, [hOAMUpdate]
+ push af
+ ld a, $1
+ ld [hOAMUpdate], a
+ call HideSprites
+ call Function17a9cb
+ pop af
+ ld [hOAMUpdate], a
+ ret
+
+Function17a781: ; 17a781 (5e:6781)
+ ld a, [hInMenu]
+ push af
+ ld a, $1
+ ld [hInMenu], a
+ call JoyTextDelay
+ pop af
+ ld [hInMenu], a
+ ret
+
+Function17a78f: ; 17a78f (5e:678f)
+ ld hl, $d088
+ bit 7, [hl]
+ res 7, [hl]
+ jr nz, .asm_17a79f
+ farcall HDMATransferTileMapToWRAMBank3
+ ret
+
+.asm_17a79f
+ farcall ReloadMapPart
+ ret
+; 17a7a6 (5e:67a6)
+
+Function17a7a6: ; 17a7a6
+ ld a, [$d087]
+ inc a
+ ld [$d087], a
+ ret
+
+Function17a7ae: ; 17a7ae (5e:67ae)
+ ld a, [$d087]
+ ld hl, Jumptable_17a7b6
+ rst JumpTable
+ ret
+
+Jumptable_17a7b6: ; 17a7b6 (5e:67b6)
+ dw Function17a7c2
+ dw Function17a7cd
+ dw Function17a7d8
+ dw Function17a7ff
+ dw Function17a81a
+ dw Function17a7f4
+
+
+Function17a7c2: ; 17a7c2 (5e:67c2)
+ ld a, $4
+ call Function17aad3
+ ld a, $1
+ ld [$d087], a
+ ret
+
+Function17a7cd: ; 17a7cd (5e:67cd)
+ call Function17a83c
+ call Function17a8ae
+ ret c
+ call Function17a848
+ ret
+
+Function17a7d8: ; 17a7d8 (5e:67d8)
+ call Function17a83c
+ call Function17a848
+ ld hl, $d08b
+ dec [hl]
+ ret nz
+ call Function17ac1d
+ call Function17ac2a
+ ld hl, $d088
+ set 7, [hl]
+ ld a, $1
+ ld [$d087], a
+ ret
+
+Function17a7f4: ; 17a7f4 (5e:67f4)
+ ld hl, $d08b
+ dec [hl]
+ ret nz
+ ld hl, $d087
+ set 7, [hl]
+ ret
+
+Function17a7ff: ; 17a7ff (5e:67ff)
+ ld hl, $d08b
+ dec [hl]
+ ret nz
+ call Function17ac1d
+ call Function17ac2a
+ ld hl, $d088
+ set 7, [hl]
+ ld hl, $d088
+ set 5, [hl]
+ ld hl, $d087
+ set 7, [hl]
+ ret
+
+Function17a81a: ; 17a81a (5e:681a)
+ call IsSFXPlaying
+ ret nc
+ ld a, [hJoyPressed]
+ and $3
+ ret z
+ call ExitMenu
+ call Function17ac1d
+ call Function17ac2a
+ ld hl, $d088
+ set 7, [hl]
+ ld hl, $d088
+ res 6, [hl]
+ ld a, $1
+ ld [$d087], a
+ ret
+
+Function17a83c: ; 17a83c (5e:683c)
+ ld a, [hJoyLast]
+ and $f0
+ ld c, a
+ ld a, [hJoyPressed]
+ and $b
+ or c
+ ld c, a
+ ret
+
+Function17a848: ; 17a848 (5e:6848)
+ ld a, c
+ and $60
+ cp $60
+ jr z, .asm_17a876
+ ld a, c
+ and $50
+ cp $50
+ jr z, .asm_17a87d
+ ld a, c
+ and $a0
+ cp $a0
+ jr z, .asm_17a884
+ ld a, c
+ and $90
+ cp $90
+ jr z, .asm_17a88b
+ bit 6, c
+ jr nz, .asm_17a892
+ bit 7, c
+ jr nz, .asm_17a899
+ bit 5, c
+ jr nz, .asm_17a8a0
+ bit 4, c
+ jr nz, .asm_17a8a7
+ xor a
+ ret
+
+.asm_17a876
+ ld a, $9
+ call Function17aad0
+ scf
+ ret
+
+.asm_17a87d
+ ld a, $a
+ call Function17aad0
+ scf
+ ret
+
+.asm_17a884
+ ld a, $b
+ call Function17aad0
+ scf
+ ret
+
+.asm_17a88b
+ ld a, $c
+ call Function17aad0
+ scf
+ ret
+
+.asm_17a892
+ ld a, $5
+ call Function17aad0
+ scf
+ ret
+
+.asm_17a899
+ ld a, $6
+ call Function17aad0
+ scf
+ ret
+
+.asm_17a8a0
+ ld a, $7
+ call Function17aad0
+ scf
+ ret
+
+.asm_17a8a7
+ ld a, $8
+ call Function17aad0
+ scf
+ ret
+
+Function17a8ae: ; 17a8ae (5e:68ae)
+ bit 1, c
+ jr nz, .asm_17a8bc
+ bit 0, c
+ jr nz, .asm_17a8cc
+ bit 3, c
+ jr nz, .asm_17a8d7
+ xor a
+ ret
+
+.asm_17a8bc
+ ld a, $b
+ ld [$d08a], a
+ call Function17aa98
+ call Function17a943
+ call Function17aa88
+ scf
+ ret
+
+.asm_17a8cc
+ call Function17aad7
+ call Function17aa98
+ call Function17a8de
+ scf
+ ret
+
+.asm_17a8d7
+ ld a, $c
+ call Function17aad3
+ scf
+ ret
+
+Function17a8de: ; 17a8de (5e:68de)
+ ld a, $2
+ call Function17aae0
+ ld a, [hl]
+ cp $f1
+ jr z, .asm_17a8fd
+ cp $f0
+ jr z, .asm_17a904
+ cp $f2
+ jr z, .asm_17a911
+ ld e, a
+ call Function17a964
+ ld a, $2
+ ld [$d087], a
+ call Function17aa88
+ ret
+
+.asm_17a8fd
+ call Function17a943
+ call Function17aa88
+ ret
+
+.asm_17a904
+ call Function17aad7
+ call Function17aa98
+ call Function17a91e
+ call Function17aa88
+ ret
+
+.asm_17a911
+ call Function17aa98
+ ld a, $5
+ ld [$d087], a
+ xor a
+ call Function17aa88
+ ret
+
+Function17a91e: ; 17a91e (5e:691e)
+ ld a, [$d08c]
+ cp $7
+ jr c, .asm_17a92c
+ ld a, $3
+ ld [$d087], a
+ xor a
+ ret
+
+.asm_17a92c
+ call LoadStandardMenuDataHeader
+ call Function17a99e
+ ld hl, $d088
+ set 7, [hl]
+ ld hl, $d088
+ set 6, [hl]
+ ld a, $4
+ ld [$d087], a
+ scf
+ ret
+
+Function17a943: ; 17a943 (5e:6943)
+ ld a, [$d08c]
+ and a
+ jr z, .asm_17a95d
+ dec a
+ ld [$d08c], a
+ ld c, a
+ ld b, $0
+ ld hl, Buffer1
+ add hl, bc
+ ld [hl], $ff
+ ld a, $2
+ ld [$d087], a
+ and a
+ ret
+
+.asm_17a95d
+ ld a, $5
+ ld [$d087], a
+ xor a
+ ret
+
+Function17a964: ; 17a964 (5e:6964)
+ ld a, [$d08c]
+ cp $10
+ jr nc, .asm_17a979
+ ld c, a
+ ld b, $0
+ inc a
+ ld [$d08c], a
+ ld hl, Buffer1
+ add hl, bc
+ ld [hl], e
+ and a
+ ret
+
+.asm_17a979
+ scf
+ ret
+
+Function17a97b: ; 17a97b (5e:697b)
+ hlcoord 1, 1
+ lb bc, 2, 18
+ call ClearBox
+ hlcoord 3, 2
+ ld de, Buffer1
+ ld a, [$d08c]
+ and a
+ ret z
+ ld c, a
+.asm_17a990
+ ld a, [de]
+ inc de
+ cp $a
+ jr nc, .asm_17a99d
+ add $f6
+ ld [hli], a
+ dec c
+ jr nz, .asm_17a990
+ ret
+
+.asm_17a99d
+ ret
+
+Function17a99e: ; 17a99e (5e:699e)
+ hlcoord 0, 12
+ ld b, $4
+ ld c, $12
+ call Function17ac46
+ hlcoord 2, 14
+ ld de, String_17a9b2
+ call PlaceString
+ ret
+; 17a9b2 (5e:69b2)
+
+String_17a9b2: ; 17a9b2
+ db "でんわばんごうが ただしく"
+ next "はいって いません!"
+ db "@"
+; 17a9cb
+
+Function17a9cb: ; 17a9cb (5e:69cb)
+ ld de, Sprites ; $c400
+ ld hl, $d088
+ bit 6, [hl]
+ jr nz, .bit_6_set
+ call Function17a9e3
+ call Function17aa22
+ call Function17a9f5
+ ret
+
+.bit_6_set
+ call Function17a9e3
+ ret
+
+Function17a9e3: ; 17a9e3 (5e:69e3)
+ ld a, $3
+ ld [$d08e], a
+ ld hl, Unknown_17aa77
+ ld b, $8
+ ld c, $8
+ ld a, $5
+ call Function17aa4a
+ ret
+
+Function17a9f5: ; 17a9f5 (5e:69f5)
+ ld a, [$d08c]
+ cp $10
+ ret nc
+ ld a, [$d08f]
+ swap a
+ and $1
+ add $1
+ ld [$d08e], a
+ ld a, [$d08c]
+ cp $10
+ jr c, .okay
+ dec a
+.okay
+ ld c, $8
+ call SimpleMultiply
+ add $18
+ ld b, a
+ ld c, $11
+ ld hl, Unknown_17aa72
+ ld a, $4
+ call Function17aa4a
+ ret
+
+Function17aa22: ; 17aa22 (5e:6a22)
+ ld a, $0
+ ld [$d08e], a
+ push de
+ ld a, $3
+ call Function17aae0
+ add a
+ add a
+ add a
+ add $0
+ push af
+ ld a, $4
+ call Function17aae0
+ add a
+ add a
+ add a
+ add $8
+ ld c, a
+ pop af
+ ld b, a
+ pop de
+ ld a, $0
+ ld hl, Unknown_17aa77
+ call Function17aa4a
+ ret
+
+Function17aa4a: ; 17aa4a (5e:6a4a)
+ ld [$d08d], a
+ ld a, b
+ add $8
+ ld b, a
+ ld a, c
+ add $10
+ ld c, a
+ ld a, [hli]
+.loop
+ push af
+ ld a, [hli]
+ add c
+ ld [de], a
+ inc de
+ ld a, [hli]
+ add b
+ ld [de], a
+ inc de
+ ld a, [$d08d]
+ add [hl]
+ inc hl
+ ld [de], a
+ inc de
+ ld a, [$d08e]
+ or [hl]
+ inc hl
+ ld [de], a
+ inc de
+ pop af
+ dec a
+ jr nz, .loop
+ ret
+; 17aa72 (5e:6a72)
+
+Unknown_17aa72: ; 17aa72
+ db 1
+ db 0, 0, 0, 0
+; 17aa77
+
+Unknown_17aa77: ; 17aa77
+ db 4
+ db 0, 0, 0, 0
+ db 0, 8, 1, 0
+ db 8, 0, 2, 0
+ db 8, 8, 3, 0
+; 17aa88
+
+Function17aa88: ; 17aa88 (5e:6a88)
+ jr c, asm_17aa91
+ ld de, SFX_SWITCH_POKEMON
+ call PlaySFX
+ ret
+
+asm_17aa91: ; 17aa91 (5e:6a91)
+ ld de, SFX_WRONG
+ call PlaySFX
+ ret
+
+Function17aa98: ; 17aa98 (5e:6a98)
+ ld a, $5
+ ld [$d08b], a
+ call Function17aaa9
+ call Function17aac3
+ ld hl, $d088
+ set 7, [hl]
+ ret
+
+Function17aaa9: ; 17aaa9 (5e:6aa9)
+ ld a, $3
+ call Function17aae3
+ ld c, a
+ ld b, $0
+ hlcoord 0, 0, AttrMap
+ add hl, bc
+ push hl
+ ld a, $4
+ call Function17aae3
+ ld bc, $14
+ pop hl
+ call AddNTimes
+ ret
+
+Function17aac3: ; 17aac3 (5e:6ac3)
+ ld a, $b
+ push hl
+ ld [hli], a
+ ld [hli], a
+ pop hl
+ ld de, SCREEN_WIDTH
+ add hl, de
+ ld [hli], a
+ ld [hli], a
+ ret
+
+Function17aad0: ; 17aad0 (5e:6ad0)
+ call Function17aae0
+
+Function17aad3: ; 17aad3 (5e:6ad3)
+ ld [$d089], a
+ ret
+
+Function17aad7: ; 17aad7 (5e:6ad7)
+ push af
+ ld a, [$d089]
+ ld [$d08a], a
+ pop af
+ ret
+
+Function17aae0: ; 17aae0 (5e:6ae0)
+ call Function17aad7
+
+Function17aae3: ; 17aae3 (5e:6ae3)
+ push af
+ ld a, [$d08a]
+ ld bc, $d
+ ld hl, Unknown_17aaf7
+ call AddNTimes
+ pop af
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [hl]
+ ret
+; 17aaf7 (5e:6af7)
+
+Unknown_17aaf7: ; 17aaf7
+ db $0, $0, $1, $6, $5, $9, $3, $2, $1, $2, $1, $2, $4
+ db $0, $0, $2, $9, $5, $a, $4, $0, $2, $a, $a, $3, $5
+ db $0, $0, $3, $c, $5, $b, $5, $1, $0, $1, $0, $4, $0
+ db $0, $0, $4, $6, $8, $0, $6, $5, $4, $5, $1, $5, $7
+ db $0, $0, $5, $9, $8, $1, $7, $3, $5, $0, $2, $6, $8
+ db $0, $0, $6, $c, $8, $2, $8, $4, $3, $1, $3, $7, $3
+ db $0, $0, $7, $6, $b, $3, $9, $8, $7, $8, $4, $8, $a
+ db $0, $0, $8, $9, $b, $4, $a, $6, $8, $3, $5, $9, $b
+ db $0, $0, $9, $c, $b, $5, $b, $7, $6, $4, $6, $a, $6
+ db $0, $0,$f2, $6, $e, $6, $0, $c, $a, $c, $7, $c, $0
+ db $0, $0, $0, $9, $e, $7, $1, $9, $b, $6, $8, $1, $1
+ db $0, $0,$f1, $c, $e, $8, $2, $a, $c, $7, $c, $2, $c
+ db $0, $0,$f0,$10, $e, $c, $c, $b, $9, $b, $9, $b, $9
+; 17aba0
+
+Function17aba0: ; 17aba0 (5e:6ba0)
+ ld a, [rVBK]
+ push af
+ ld a, $1
+ ld [rVBK], a
+
+ ld hl, VTiles5 tile $00
+ ld de, GFX_17afa5
+ lb bc, BANK(GFX_17afa5), $80
+ call Get2bpp
+
+ pop af
+ ld [rVBK], a
+
+ ld hl, VTiles0 tile $00
+ ld de, GFX_17afa5 + $4c0
+ lb bc, BANK(GFX_17afa5), 5
+ call Get2bpp
+
+ ld hl, VTiles0 tile $05
+ ld de, GFX_11601a
+ lb bc, BANK(GFX_11601a), 4
+ call Get2bpp
+ ret
+
+Function17abcf: ; 17abcf (5e:6bcf)
+ ld a, [rSVBK]
+ push af
+ ld a, BANK(UnknBGPals)
+ ld [rSVBK], a
+
+ ld hl, Palette_17ac55
+ ld de, UnknBGPals ; $d000
+ ld bc, $30
+ call CopyBytes
+
+ ld hl, Palette_17ac95
+ ld de, UnknOBPals
+ ld bc, $40
+ call CopyBytes
+
+ ld hl, GFX_17afa5 + $510
+ ld de, UnknOBPals + 2 * 4
+ ld bc, $10
+ call CopyBytes
+
+ ld hl, MapObjectPals + 8
+ ld de, UnknOBPals + 6 * 4
+ ld bc, $8
+ ld a, BANK(MapObjectPals)
+ call FarCopyBytes
+
+ pop af
+ ld [rSVBK], a
+ ret
+
+Function17ac0c: ; 17ac0c (5e:6c0c)
+ call Function17ac1d
+ call Function17ac2a
+ hlcoord 0, 0
+ ld b, 2
+ ld c, SCREEN_WIDTH - 2
+ call Function17ac46
+ ret
+
+Function17ac1d: ; 17ac1d (5e:6c1d)
+ ld hl, Tilemap_17acd5
+ decoord 0, 4
+ ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH
+ call CopyBytes
+ ret
+
+Function17ac2a: ; 17ac2a (5e:6c2a)
+ ld hl, Tilemap_17ae3d
+ decoord 0, 4, AttrMap
+ ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH
+ call CopyBytes
+ hlcoord 0, 4, AttrMap
+ ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH
+.loop
+ ld a, [hl]
+ or $8
+ ld [hli], a
+ dec bc
+ ld a, b
+ or c
+ jr nz, .loop
+ ret
+
+Function17ac46: ; 17ac46 (5e:6c46)
+ ld a, [$d088]
+ bit 4, a
+ jr nz, .bit_4_set
+ call TextBox
+ ret
+
+.bit_4_set
+ call Function3eea
+ ret
+; 17ac55 (5e:6c55)
+
+Palette_17ac55: ; 17ac55
+ RGB 0, 0, 0
+ RGB 9, 10, 25
+ RGB 16, 19, 31
+ RGB 31, 31, 31
+
+ RGB 5, 11, 9
+ RGB 7, 14, 12
+ RGB 17, 24, 22
+ RGB 28, 31, 31
+
+ RGB 0, 0, 0
+ RGB 3, 0, 10
+ RGB 3, 3, 16
+ RGB 6, 8, 25
+
+ RGB 5, 11, 9
+ RGB 28, 31, 31
+ RGB 7, 14, 12
+ RGB 17, 24, 22
+
+ RGB 0, 0, 0
+ RGB 5, 2, 16
+ RGB 8, 8, 26
+ RGB 13, 9, 17
+
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+Palette_17ac95: ; 17ac95
+ RGB 31, 31, 31
+ RGB 4, 3, 3
+ RGB 31, 13, 0
+ RGB 31, 31, 31
+
+ RGB 31, 31, 31
+ RGB 0, 0, 0
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+
+ RGB 31, 0, 0
+ RGB 16, 3, 0
+ RGB 28, 19, 11
+ RGB 31, 31, 31
+
+ RGB 31, 16, 0
+ RGB 9, 6, 4
+ RGB 31, 16, 0
+ RGB 31, 24, 0
+
+ RGB 31, 18, 6
+ RGB 0, 3, 0
+ RGB 0, 9, 0
+ RGB 0, 12, 0
+
+ RGB 0, 16, 0
+ RGB 0, 22, 0
+ RGB 0, 25, 0
+ RGB 0, 27, 0
+
+ RGB 0, 31, 0
+ RGB 3, 31, 0
+ RGB 8, 31, 0
+ RGB 14, 31, 0
+
+ RGB 16, 31, 0
+ RGB 22, 31, 0
+ RGB 27, 31, 0
+ RGB 31, 31, 0
+
+Tilemap_17acd5: ; 17acd5
+INCBIN "gfx/unknown/17acd5.tilemap"
+
+Tilemap_17ae3d: ; 17ae3d
+INCBIN "gfx/unknown/17ae3d.tilemap"
+
+GFX_17afa5:: ; 17afa5
+INCBIN "gfx/unknown/17afa5.2bpp"
diff --git a/mobile/mobile_5f.asm b/mobile/mobile_5f.asm
new file mode 100644
index 000000000..ea485089c
--- /dev/null
+++ b/mobile/mobile_5f.asm
@@ -0,0 +1,5306 @@
+Function17c000: ; 17c000
+ call DisableLCD
+
+ ld hl, VTiles2
+ ld bc, $31 tiles
+ xor a
+ call ByteFill
+
+ call LoadStandardFont
+ call LoadFontsExtra
+
+ ld hl, HaveWantMap
+ decoord 0, 0
+ bccoord 0, 0, AttrMap
+
+ ld a, SCREEN_HEIGHT
+.y
+ push af
+ ld a, SCREEN_WIDTH
+
+ push hl
+.x
+ push af
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [bc], a
+ inc bc
+ pop af
+ dec a
+ jr nz, .x
+ pop hl
+
+ push bc
+ ld bc, BG_MAP_WIDTH * 2
+ add hl, bc
+ pop bc
+
+ pop af
+ dec a
+ jr nz, .y
+
+ ld a, [rSVBK]
+ push af
+
+ ld a, 5 ; BANK(UnknBGPals)
+ ld [rSVBK], a
+
+ ld hl, HaveWantPals
+ ld de, UnknBGPals
+ ld bc, $80
+ call CopyBytes
+
+ pop af
+ ld [rSVBK], a
+
+ ld hl, MobileSelectGFX
+ ld de, VTiles0 tile $30
+ ld bc, $20 tiles
+ call CopyBytes
+
+ ld a, 1
+ ld [rVBK], a
+
+ ld hl, HaveWantGFX
+ ld de, VTiles2
+ ld bc, $80 tiles
+ call CopyBytes
+
+ ld hl, HaveWantGFX + $800
+ ld de, VTiles1
+ ld bc, $10 tiles
+ call CopyBytes
+
+ xor a
+ ld [rVBK], a
+
+ call EnableLCD
+ farcall ReloadMapPart
+ ret
+; 17c083
+
+HaveWantGFX: ; 17c083
+INCBIN "gfx/mobile/havewant.2bpp"
+
+MobileSelectGFX: ; 17c983
+INCBIN "gfx/mobile/select.2bpp"
+
+HaveWantMap: ; 17cb83
+; Interleaved tile/palette map.
+INCBIN "gfx/mobile/havewant_map.bin"
+
+HaveWantPals: ; 17cff3
+; BG and OBJ palettes.
+ RGB 0, 0, 0
+ RGB 21, 21, 21
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 4, 17, 29
+ RGB 6, 19, 31
+ RGB 31, 31, 31
+
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 2, 13, 18
+ RGB 6, 19, 31
+ RGB 31, 31, 31
+
+ RGB 0, 0, 0
+ RGB 31, 5, 5
+ RGB 29, 21, 21
+ RGB 31, 31, 31
+
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 4, 17, 29
+ RGB 6, 19, 31
+ RGB 2, 15, 27
+
+ RGB 0, 0, 0
+ RGB 28, 19, 18
+ RGB 25, 9, 0
+ RGB 0, 0, 0
+
+ RGB 0, 0, 0
+ RGB 31, 27, 27
+ RGB 31, 10, 4
+ RGB 29, 0, 0
+
+ RGB 0, 0, 0
+ RGB 31, 31, 31
+ RGB 26, 8, 23
+ RGB 22, 0, 16
+
+ RGB 0, 0, 0
+ RGB 31, 31, 31
+ RGB 20, 8, 31
+ RGB 15, 1, 26
+
+ RGB 0, 0, 0
+ RGB 31, 31, 31
+ RGB 17, 12, 31
+ RGB 12, 6, 31
+
+ RGB 0, 16, 0
+ RGB 11, 11, 14
+ RGB 5, 5, 7
+ RGB 31, 31, 31
+
+ RGB 0, 31, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+ RGB 16, 31, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+ RGB 0, 0, 0
+
+
+CheckStringForErrors: ; 17d073
+; Valid character ranges:
+; $0, $5 - $13, $19 - $1c, $26 - $34, $3a - $3e, $40 - $48, $60 - $ff
+.loop
+ ld a, [de]
+ inc de
+ and a
+ jr z, .NextChar
+ cp $60
+ jr nc, .NextChar
+ cp $4e
+ jr z, .NextChar
+ cp "@"
+ jr z, .Done
+ cp $5
+ jr c, .Fail
+ cp "<PLAY_G>"
+ jr c, .NextChar
+ cp $19
+ jr c, .Fail
+ cp $1d
+ jr c, .NextChar
+ cp $26
+ jr c, .Fail
+ cp $35
+ jr c, .NextChar
+ cp $3a
+ jr c, .Fail
+ cp $3f
+ jr c, .NextChar
+ cp $40
+ jr c, .Fail
+ cp $49
+ jr c, .NextChar
+
+.Fail:
+ scf
+ ret
+
+.NextChar:
+ dec c
+ jr nz, .loop
+
+.Done:
+ and a
+ ret
+; 17d0b3
+
+CheckStringForErrors_IgnoreTerminator: ; 17d0b3
+; Find control chars
+.loop
+ ld a, [de]
+ inc de
+ and a
+ jr z, .next
+ cp "<DEXEND>" + 1
+ jr nc, .next
+ cp "<NEXT>"
+ jr z, .next
+ cp "@"
+ jr z, .next
+
+ cp $5
+ jr c, .end
+ cp "<PLAY_G>"
+ jr c, .next
+ cp $19
+ jr c, .end
+ cp $1d
+ jr c, .next
+ cp "%" + 1
+ jr c, .end
+ cp $35
+ jr c, .next
+ cp "<GREEN>" + 1
+ jr c, .end
+ cp "<ENEMY>"
+ jr c, .next
+ cp "<ENEMY>" + 1
+ jr c, .end
+ cp "<MOM>"
+ jr c, .next
+
+.end
+ scf
+ ret
+
+.next
+ dec c
+ jr nz, .loop
+ and a
+ ret
+; 17d0f3
+
+Function17d0f3: ; 17d0f3
+ ld a, [$c608 + 5]
+ ld [wOTTrademonSpecies], a
+ ld [CurPartySpecies], a
+ ld a, [wcd81]
+ ld [$c74e], a
+ ld hl, $c63d
+ ld de, wOTTrademonOTName
+ ld bc, 5
+ call CopyBytes
+ ld a, "@"
+ ld [de], a
+ ld a, [$c608 + 11]
+ ld [wOTTrademonID], a
+ ld a, [$c608 + 12]
+ ld [wOTTrademonID + 1], a
+ ld hl, $c608 + 26
+ ld a, [hli]
+ ld [wOTTrademonDVs], a
+ ld a, [hl]
+ ld [wOTTrademonDVs + 1], a
+ ld bc, $c608 + 5
+ farcall GetCaughtGender
+ ld a, c
+ ld [wOTTrademonCaughtData], a
+ call SpeechTextBox
+ call FadeToMenu
+ farcall Function10804d
+ farcall Function17d1f1
+ ld a, $1
+ ld [wForceEvolution], a
+ ld a, $2
+ ld [wLinkMode], a
+ farcall EvolvePokemon
+ xor a
+ ld [wLinkMode], a
+ farcall SaveAfterLinkTrade
+ ld a, $5
+ call GetSRAMBank
+ ld a, $5
+ ld [$a800], a
+ call CloseSRAM
+ ld a, [MapGroup]
+ ld b, a
+ ld a, [MapNumber]
+ ld c, a
+ call GetMapSceneID
+ ld a, d
+ or e
+ jr z, .asm_17d180
+ ld a, $1
+ ld [de], a
+
+.asm_17d180
+ call CloseSubmenu
+ call RestartMapMusic
+ ret
+; 17d187
+
+Mobile_CopyDefaultOTName: ; 17d187
+ ld hl, Mobile5F_KrissName
+ ld de, $c63d
+ ld bc, 5
+ call CopyBytes
+ ret
+; 17d194
+
+Mobile5F_KrissName:
+ db "クりス@@"
+; 17d198
+
+Mobile_CopyDefaultNickname: ; 17d199
+ ld hl, .DefaultNickname
+ ld de, $c642
+ ld bc, 5
+ call CopyBytes
+ ret
+; 17d1a6
+
+.DefaultNickname:
+ db "?????"
+
+Mobile_CopyDefaultMail: ; 17d1ab
+ ld a, "@"
+ ld hl, $c647
+ ld bc, MAIL_MSG_LENGTH + 1
+ call ByteFill
+ ld hl, .DefaultMessage
+ ld de, $c647
+ ld bc, 6
+ call CopyBytes
+ ret
+; 17d1c3
+
+.DefaultMessage:
+ db "こんにちは@"
+; 17d1c9
+
+Mobile_CopyDefaultMailAuthor: ; 17d1c9
+ ld a, "@"
+ ld de, $c668
+ ld bc, 5
+ call ByteFill
+ ld hl, Mobile5F_KrissName
+ ld de, $c668
+ ld bc, 5
+ call CopyBytes
+ ret
+; 17d1e1
+
+CheckStringContainsLessThanBNextCharacters: ; 17d1e1
+.loop
+ ld a, [de]
+ inc de
+ cp "<NEXT>"
+ jr nz, .next_char
+ dec b
+ jr z, .done
+
+.next_char
+ dec c
+ jr nz, .loop
+ and a
+ ret
+
+.done
+ scf
+ ret
+; 17d1f1
+
+Function17d1f1: ; 17d1f1
+ ld a, [CurPartySpecies]
+ dec a
+ call SetSeenAndCaughtMon
+
+ ld a, [CurPartySpecies]
+ cp UNOWN
+ jr nz, .asm_17d223
+
+ ld hl, PartyMon1DVs
+ ld a, [PartyCount]
+ dec a
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+ predef GetUnownLetter
+ callfar UpdateUnownDex
+ ld a, [wFirstUnownSeen]
+ and a
+ jr nz, .asm_17d223
+
+ ld a, [UnownLetter]
+ ld [wFirstUnownSeen], a
+
+.asm_17d223
+ ret
+; 17d224
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Parameter: [ScriptVar] = 0..1
+;
+; if [ScriptVar] == 0
+; Show japanese menu options
+; - News - News - ??? - Cancel
+; if [ScriptVar] == 1
+; Show BattleTower-Menu with 3 options in english language
+; - Challenge - Explanation - Cancel
+Special_Menu_ChallengeExplanationCancel: ; 17d224
+ ld a, [ScriptVar]
+ and a
+ jr nz, .English
+ ld a, $4
+ ld [ScriptVar], a
+ ld hl, MenuDataHeader_17d26a ; Japanese Menu, where you can choose 'News' as an option
+ jr .Load_Interpret
+
+.English:
+ ld a, $4
+ ld [ScriptVar], a
+ ld hl, MenuDataHeader_ChallengeExplanationCancel ; English Menu
+
+.Load_Interpret:
+ call LoadMenuDataHeader
+ call Function17d246
+ call CloseWindow
+ ret
+; 17d246
+
+Function17d246: ; 17d246
+ call VerticalMenu
+ jr c, .Exit
+ ld a, [ScriptVar]
+ cp $5
+ jr nz, .UsewMenuCursorY
+ ld a, [wMenuCursorY]
+ cp $3
+ ret z
+ jr c, .UsewMenuCursorY
+ dec a
+ jr .LoadToScriptVar
+
+.UsewMenuCursorY:
+ ld a, [wMenuCursorY]
+
+.LoadToScriptVar:
+ ld [ScriptVar], a
+ ret
+
+.Exit:
+ ld a, $4
+ ld [ScriptVar], a
+ ret
+; 17d26a
+
+MenuDataHeader_17d26a: ; 17d26a
+ db $40 ; flags
+ db 0, 0 ; start coords
+ db 9, 14 ; end coords
+ dw MenuData2_17d272
+ db 1 ; default option
+
+MenuData2_17d272: ; 17d272
+ db $a0 ; flags
+ db 4
+ db "ニュース¯よみこむ@"
+ db "ニュース¯みる@"
+ db "せつめい@"
+ db "やめる@"
+; 17d28f
+
+MenuDataHeader_ChallengeExplanationCancel: ; 17d28f
+ db $40 ; flags
+ db 0, 0 ; start coords
+ db 7, 14 ; end coords
+ dw MenuData2_ChallengeExplanationCancel
+ db 1 ; default option
+
+MenuData2_ChallengeExplanationCancel: ; 17d297
+ db $a0 ; flags
+ db 3
+ db "Challenge@"
+ db "Explanation@"
+ db "Cancel@"
+; 17d2b6
+
+Function17d2b6: ; 17d2b6
+ call Function17d2c0
+ farcall Function1181da
+ ret
+; 17d2c0
+
+Function17d2c0: ; 17d2c0
+ xor a
+ ld [wJumptableIndex], a
+ ld [wcf64], a
+ ld [wcf65], a
+ ld [wcf66], a
+ ret
+; 17d2ce
+
+Function17d2ce: ; 17d2ce
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$aa72]
+ call CloseSRAM
+ and a
+ jr nz, .asm_17d2e2
+ ld a, $1
+ ld [ScriptVar], a
+ ret
+
+.asm_17d2e2
+ call Function17d314
+ ret c
+ call SpeechTextBox
+ call FadeToMenu
+ ld a, [rSVBK]
+ push af
+ ld a, $4
+ ld [rSVBK], a
+ call Function17d370
+ call Function17d45a
+ pop af
+ ld [rSVBK], a
+ ld de, MUSIC_MOBILE_CENTER
+ ld a, e
+ ld [wMapMusic], a
+ ld [MusicFadeID], a
+ ld a, d
+ ld [MusicFadeID + 1], a
+ call PlayMusic
+ call ReturnToMapFromSubmenu
+ call CloseSubmenu
+ ret
+; 17d314
+
+Function17d314: ; 17d314
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$b1b1]
+ call CloseSRAM
+ cp $21
+ jr nc, .asm_17d354
+ ld a, $6
+ call GetSRAMBank
+ ld l, $0
+ ld h, l
+ ld de, $a006
+ ld a, [$a004]
+ ld c, a
+ ld a, [$a005]
+ ld b, a
+.asm_17d336
+ push bc
+ ld a, [de]
+ inc de
+ ld c, a
+ ld b, $0
+ add hl, bc
+ pop bc
+ dec bc
+ ld a, b
+ or c
+ jr nz, .asm_17d336
+ ld a, [$a002]
+ cp l
+ jr nz, .asm_17d354
+ ld a, [$a003]
+ cp h
+ jr nz, .asm_17d354
+ call CloseSRAM
+ and a
+ ret
+
+.asm_17d354
+ call CloseSRAM
+ ld a, $5
+ call GetSRAMBank
+ xor a
+ ld hl, $aa73
+ ld bc, $c
+ call ByteFill
+ call CloseSRAM
+ ld a, $2
+ ld [ScriptVar], a
+ scf
+ ret
+; 17d370
+
+Function17d370: ; 17d370
+ xor a
+ ld [wcd77], a
+ ld [wcd78], a
+ ld [wcd79], a
+ dec a
+ ld [wcd6c], a
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearScreen
+ farcall ReloadMapPart
+ call DisableLCD
+ ld hl, VTiles1 tile $6e
+ ld de, $c608
+ ld bc, 1 tiles
+ call CopyBytes
+ ld a, $1
+ ld [rVBK], a
+ ld hl, PokemonNewsGFX
+ ld de, VTiles1
+ ld bc, $48 tiles
+ call CopyBytes
+ xor a
+ ld hl, VTiles2 tile $7f
+ ld bc, 1 tiles
+ call ByteFill
+ ld hl, $c608
+ ld de, VTiles1 tile $6e
+ ld bc, 1 tiles
+ call CopyBytes
+ xor a
+ ld [rVBK], a
+ ld hl, GFX_17eb7e
+ ld de, VTiles2 tile $60
+ ld bc, 1 tiles
+ call CopyBytes
+ call EnableLCD
+ call Function17d60b
+ ld a, $0
+ ld [BGMapBuffer], a
+ ld a, $d0
+ ld [wcd21], a
+ ld a, $6
+ call GetSRAMBank
+ ld hl, $a006
+ ld de, UnknBGPals
+ ld bc, $1000
+ call CopyBytes
+ call CloseSRAM
+ ret
+; 17d3f6
+
+Function17d3f6: ; 17d3f6
+ call ClearBGPalettes
+ call ClearSprites
+ call ClearScreen
+ farcall ReloadMapPart
+
+Function17d405:
+ call DisableLCD
+ ld hl, VTiles1 tile $6e
+ ld de, $c608
+ ld bc, 1 tiles
+ call CopyBytes
+ ld a, $1
+ ld [rVBK], a
+ ld hl, PokemonNewsGFX
+ ld de, VTiles1
+ ld bc, $48 tiles
+ call CopyBytes
+ xor a
+ ld hl, VTiles2 tile $7f
+ ld bc, 1 tiles
+ call ByteFill
+ ld hl, $c608
+ ld de, VTiles1 tile $6e
+ ld bc, 1 tiles
+ call CopyBytes
+ xor a
+ ld [rVBK], a
+ call EnableLCD
+ ld a, [rSVBK]
+ push af
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, Palette_17eff6
+ ld de, UnknBGPals
+ ld bc, 8 palettes
+ call CopyBytes
+ call SetPalettes
+ pop af
+ ld [rSVBK], a
+ ret
+; 17d45a
+
+Function17d45a: ; 17d45a
+.asm_17d45a
+ call JoyTextDelay
+ ld a, [wcd77]
+ bit 7, a
+ jr nz, .asm_17d46f
+ call Function17d474
+ farcall ReloadMapPart
+ jr .asm_17d45a
+
+.asm_17d46f
+ xor a
+ ld [ScriptVar], a
+ ret
+; 17d474
+
+Function17d474: ; 17d474
+ jumptable Jumptable_17d483, wcd77
+; 17d483
+
+Jumptable_17d483: ; 17d483
+ dw Function17d48d
+ dw Function17d5be
+ dw Function17d5c4
+ dw Function17d6fd
+ dw Function17e427
+; 17d48d
+
+Function17d48d: ; 17d48d
+ ld hl, Palette_17eff6
+ ld de, $c608
+ ld bc, $40
+ call CopyBytes
+ ld hl, TileAttrmap_17eb8e
+ decoord 0, 0
+ bccoord 0, 0, AttrMap
+ ld a, $12
+.asm_17d4a4
+ push af
+ ld a, $14
+ push hl
+.asm_17d4a8
+ push af
+ ld a, [hli]
+ cp $7f
+ jr z, .asm_17d4b0
+ add $80
+
+.asm_17d4b0
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [bc], a
+ inc bc
+ pop af
+ dec a
+ jr nz, .asm_17d4a8
+ pop hl
+ push bc
+ ld bc, $40
+ add hl, bc
+ pop bc
+ pop af
+ dec a
+ jr nz, .asm_17d4a4
+ ld a, [BGMapBuffer]
+ ld l, a
+ ld a, [wcd21]
+ ld h, a
+ ld a, [hli]
+ ld e, a
+ ld a, [wcd6c]
+ cp e
+ jr z, .asm_17d4e0
+ ld a, e
+ ld [wcd6c], a
+ ld [wMapMusic], a
+ ld d, $0
+ call PlayMusic2
+
+.asm_17d4e0
+ ld a, [hli]
+ ld de, $c608
+ ld c, $8
+.asm_17d4e6
+ srl a
+ jr nc, .asm_17d4f6
+ ld b, $8
+ push af
+.asm_17d4ed
+ ld a, [hli]
+ ld [de], a
+ inc de
+ dec b
+ jr nz, .asm_17d4ed
+ pop af
+ jr .asm_17d4fc
+
+.asm_17d4f6
+ push af
+ ld a, e
+ add $8
+ ld e, a
+ pop af
+
+.asm_17d4fc
+ dec c
+ jr nz, .asm_17d4e6
+ push hl
+ call Function17d5f6
+ pop hl
+ ld a, [hli]
+ and a
+ jr z, .asm_17d539
+.asm_17d508
+ push af
+ ld a, [hli]
+ ld [wcd4f], a
+ ld a, [hli]
+ ld [wcd50], a
+ ld a, [hli]
+ ld [wcd51], a
+ ld a, [hli]
+ ld [wcd52], a
+ ld a, [hli]
+ sla a
+ sla a
+ sla a
+ add $98
+ ld [wcd53], a
+ ld de, wcd4f
+ call Function17e613
+ ld a, [hli]
+ ld [wcd53], a
+ ld de, wcd4f
+ call Function17e691
+ pop af
+ dec a
+ jr nz, .asm_17d508
+
+.asm_17d539
+ ld a, [hli]
+.asm_17d53a
+ push af
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ push hl
+ pop de
+ hlcoord 0, 0
+ add hl, bc
+ call PlaceString
+ push de
+ pop hl
+ inc hl
+ pop af
+ dec a
+ jr nz, .asm_17d53a
+ ld de, CreditsTimer
+ ld bc, $c
+ call CopyBytes
+ xor a
+ ld [wcd2e], a
+ ld [wcd2f], a
+ inc a
+ ld [wcd30], a
+ ld [wcd31], a
+ ld de, wcd32
+ ld bc, $10
+ call CopyBytes
+ ld a, [hli]
+ ld [wcd42], a
+ ld a, [hli]
+ ld [wcd43], a
+ ld a, [hli]
+ ld [wMobileInactivityTimerMinutes], a
+ ld a, [hli]
+ ld [wMobileInactivityTimerSeconds], a
+ ld a, [hli]
+ ld [wMobileInactivityTimerFrames], a
+ ld a, [hli]
+ and a
+ jr z, .asm_17d58a
+ call Function17d6a1
+
+.asm_17d58a
+ ld a, l
+ ld [wcd49], a
+ ld a, h
+ ld [wcd4a], a
+ ld a, [wcd42]
+ ld c, a
+ ld b, $0
+ add hl, bc
+ add hl, bc
+ ld a, l
+ ld [wcd4b], a
+ ld a, h
+ ld [wcd4c], a
+ add hl, bc
+ add hl, bc
+ ld a, l
+ ld [wcd4d], a
+ ld a, h
+ ld [wcd4e], a
+ call Function17e451
+ call Function17e55b
+ call Function17e5af
+ farcall ReloadMapPart
+ jp Function17e438
+; 17d5be
+
+Function17d5be: ; 17d5be
+ call SetPalettes
+ call Function17e438
+
+Function17d5c4:
+ ld a, [hJoyPressed]
+ and a
+ ret z
+ ld c, 0
+ ld b, c
+ ld hl, wcd32
+.loop
+ srl a
+ jr c, .got_button
+ inc c
+ inc c
+ jr .loop
+
+.got_button
+ add hl, bc
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ and c
+ cp $ff
+ ret z
+ ld a, [wcd20]
+ ld l, a
+ ld a, [wcd21]
+ ld h, a
+ add hl, bc
+ ld a, l
+ ld [wcd78], a
+ ld a, h
+ ld [wcd79], a
+ ld a, $3
+ ld [wcd77], a
+ ret
+; 17d5f6
+
+Function17d5f6: ; 17d5f6
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, $c608
+ ld de, UnknBGPals
+ ld bc, 8 palettes
+ call CopyBytes
+ ld a, $4
+ ld [rSVBK], a
+ ret
+; 17d60b
+
+Function17d60b: ; 17d60b
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $b1d3
+ ld de, $c608
+ ld bc, $20
+ call CopyBytes
+ ld a, [$b1b1]
+ ld c, a
+ ld a, [$b1b2]
+ ld b, a
+ ld a, [$b1b3]
+ ld l, a
+ ld a, [$b1b4]
+ ld h, a
+ call CloseSRAM
+ ld a, $6
+ call GetSRAMBank
+ ld de, $c708
+ ld a, c
+ and a
+ jr z, .asm_17d684
+.asm_17d63b
+ push bc
+ ld a, l
+ ld [de], a
+ inc de
+ ld a, h
+ ld [de], a
+ inc de
+ ld bc, $a
+ add hl, bc
+ pop bc
+ ld a, [hli]
+ ld [wcd4a], a
+ ld a, [hli]
+ ld [wcd49], a
+ push hl
+ push de
+ ld hl, $c608
+ ld e, b
+ ld d, $0
+ add hl, de
+ ld a, [hli]
+ ld [wcd4b], a
+ ld a, [hl]
+ ld [wcd4c], a
+ pop de
+ pop hl
+ inc b
+ inc b
+ dec c
+ dec c
+ jr z, .asm_17d684
+ push bc
+ push de
+ ld a, [wcd49]
+ ld c, a
+ ld a, [wcd4a]
+ ld b, a
+ ld a, [wcd4b]
+ ld e, a
+ ld a, [wcd4c]
+ ld d, a
+.asm_17d67a
+ add hl, de
+ dec bc
+ ld a, c
+ or b
+ jr nz, .asm_17d67a
+ pop de
+ pop bc
+ jr .asm_17d63b
+
+.asm_17d684
+ call CloseSRAM
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $c708
+ ld de, $b1b3
+ ld a, [$b1b1]
+ ld c, a
+ ld a, [$b1b2]
+ ld b, a
+ call CopyBytes
+ call CloseSRAM
+ ret
+; 17d6a1
+
+
+Function17d6a1: ; 17d6a1
+ push hl
+ ld a, [wcd6e]
+ ld c, a
+ ld b, $0
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $b1d3
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld [wcd47], a
+ ld a, [hl]
+ ld [BGMapPalBuffer], a
+ ld hl, $b1b3
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld c, a
+ ld a, [hl]
+ ld h, a
+ ld l, c
+ call CloseSRAM
+ ld a, $6
+ call GetSRAMBank
+ ld a, l
+ ld [wcd5e], a
+ ld a, h
+ ld [wcd5f], a
+ ld de, wcd60
+ ld bc, $4
+ call CopyBytes
+ inc hl
+ inc hl
+ ld de, wcd64
+ ld bc, $4
+ call CopyBytes
+ ld a, [hli]
+ ld [wcd69], a
+ ld a, [hli]
+ ld [wcd68], a
+ ld a, l
+ ld [wcd6a], a
+ ld a, h
+ ld [wcd6b], a
+ call CloseSRAM
+ pop hl
+ ret
+; 17d6fd
+
+Function17d6fd: ; 17d6fd
+ ld a, [wcd77]
+ bit 7, a
+ jr nz, asm_17d721
+ ld a, [wcd78]
+ ld l, a
+ ld a, [wcd79]
+ ld h, a
+ ld a, [hl]
+ cp $ff
+ jr z, asm_17d721
+
+Function17d711:
+.crash_loop
+ cp $31
+ jr nc, .crash_loop
+ ld e, a
+ ld d, 0
+ ld hl, Jumptable17d72a
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+asm_17d721
+ call Function17e5af
+ ld a, $2
+ ld [wcd77], a
+ ret
+; 17d72a
+
+Jumptable17d72a: ; 17d72a
+ dw Function17d78c
+ dw Function17d78d
+ dw Function17d7b4
+ dw Function17d7c2
+ dw Function17d7d3
+ dw Function17d7e5
+ dw Function17d818
+ dw Function17d833
+ dw Function17d85d
+ dw Function17d902
+ dw Function17d93a
+ dw Function17d98b
+ dw Function17d9e3
+ dw Function17da31
+ dw Function17da9c
+ dw Function17dadc
+ dw Function17db2d
+ dw Function17db56
+ dw Function17db77
+ dw Function17dbe9
+ dw Function17dc1f
+ dw Function17dc9f
+ dw Function17dca9
+ dw Function17dccf
+ dw Function17dd13
+ dw Function17dd30
+ dw Function17dd49
+ dw Function17ddcd
+ dw Function17de32
+ dw Function17de91
+ dw Function17ded9
+ dw Function17e0fd
+ dw Function17e133
+ dw Function17e165
+ dw Function17e1a1
+ dw Function17e254
+ dw Function17e261
+ dw Function17e270
+ dw Function17e27f
+ dw Function17e293
+ dw Function17e2a7
+ dw Function17e367
+ dw Function17e37e
+ dw Function17e395
+ dw Function17e3ac
+ dw Function17e3c3
+ dw Function17e3e0
+ dw Function17e3f0
+ dw Function17e409
+; 17d78c
+
+Function17d78c: ; 17d78c
+ ret
+; 17d78d
+
+Function17d78d: ; 17d78d
+ call Function17e415
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ call Function17e41e
+ ld a, $6
+ call GetSRAMBank
+ ld hl, $a006
+ add hl, bc
+ ld de, UnknBGPals
+ ld bc, $1000
+ call CopyBytes
+ call CloseSRAM
+ xor a
+ ld [wcd77], a
+ call ClearBGPalettes
+ ret
+; 17d7b4
+
+Function17d7b4: ; 17d7b4
+ call Function17e415
+ ld a, [hli]
+ ld e, a
+ ld d, $0
+ call PlayMusic2
+ call Function17e41e
+ ret
+; 17d7c2
+
+Function17d7c2: ; 17d7c2
+ call Function17e415
+ ld a, [hli]
+ ld e, a
+ ld d, $0
+ call PlaySFX
+ call WaitSFX
+ call Function17e41e
+ ret
+; 17d7d3
+
+Function17d7d3: ; 17d7d3
+ call Function17e415
+ ld a, [hli]
+ dec a
+ ld e, a
+ ld d, $0
+ call PlayCryHeader
+ call WaitSFX
+ call Function17e41e
+ ret
+; 17d7e5
+
+Function17d7e5: ; 17d7e5
+ call Function17e415
+ ld a, [hli]
+ ld [wcd4f], a
+ ld a, [hli]
+ ld [wcd50], a
+ ld a, [hli]
+ ld [wcd51], a
+ ld a, [hli]
+ ld [wcd52], a
+ ld a, [hli]
+ sla a
+ sla a
+ sla a
+ add $98
+ ld [wcd53], a
+ ld de, wcd4f
+ call Function17e613
+ ld a, [hli]
+ ld [wcd53], a
+ ld de, wcd4f
+ call Function17e691
+ call Function17e41e
+ ret
+; 17d818
+
+Function17d818: ; 17d818
+ call Function17e415
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ call Function17e41e
+ call Function17e447
+ ld e, l
+ ld d, h
+ hlcoord 0, 0
+ add hl, bc
+ call PlaceString
+ ret
+; 17d833
+
+Function17d833: ; 17d833
+ call Function17e415
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ call Function17e41e
+ push de
+ push bc
+ call Function17e32b
+ pop bc
+ pop de
+ call Function17e43d
+ ld c, l
+ ld b, h
+ hlcoord 0, 0
+ add hl, de
+ ld e, l
+ ld d, h
+ farcall Function11c08f
+ call Function17e349
+ ret
+; 17d85d
+
+Function17d85d: ; 17d85d
+ call Function17e415
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ push hl
+ ld hl, UnknBGPals
+ add hl, de
+ ld de, wcc60
+.asm_17d86c
+ ld a, [hli]
+ ld [de], a
+ inc de
+ and a
+ jr nz, .asm_17d86c
+ pop hl
+ ld de, $c608
+ ld c, $0
+.asm_17d878
+ ld a, [hli]
+ cp $ff
+ jr z, .asm_17d8c7
+ ld [wcd4f], a
+ ld a, [hli]
+ ld [wcd50], a
+ ld a, [hli]
+ ld [wcd51], a
+ ld a, [hli]
+ ld [wcd52], a
+ ld a, [wcd51]
+ push af
+ cp $c0
+ jr c, .asm_17d89b
+ ld a, [wcd4f]
+ ld [rSVBK], a
+ jr .asm_17d8a1
+
+.asm_17d89b
+ ld a, [wcd4f]
+ call GetSRAMBank
+
+.asm_17d8a1
+ push hl
+ ld a, [wcd50]
+ ld l, a
+ ld a, [wcd51]
+ ld h, a
+ ld a, [wcd52]
+.asm_17d8ad
+ push af
+ ld a, [hli]
+ ld [de], a
+ inc de
+ inc c
+ pop af
+ dec a
+ jr nz, .asm_17d8ad
+ pop hl
+ pop af
+ cp $c0
+ jr c, .asm_17d8c2
+ ld a, $4
+ ld [rSVBK], a
+ jr .asm_17d878
+
+.asm_17d8c2
+ call CloseSRAM
+ jr .asm_17d878
+
+.asm_17d8c7
+ call Function17e41e
+ push bc
+ ld a, $3
+ ld [rSVBK], a
+ ld hl, $c608
+ ld de, UnknBGPals
+ ld b, $0
+ call CopyBytes
+ ld a, $4
+ ld [rSVBK], a
+ call Function17e32b
+ pop bc
+ ld a, c
+ ld [wcd3b], a
+ xor a
+ ld [wcf66], a
+ farcall Function118329
+ ld a, [wc300]
+ and a
+ jr z, .asm_17d8fe
+ cp $a
+ jr z, .asm_17d8fe
+ call Function17e309
+ ret
+
+.asm_17d8fe
+ call Function17e349
+ ret
+; 17d902
+
+Function17d902: ; 17d902
+ call Function17e415
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ push de
+ call Function17e41e
+ call Function17e32b
+ pop de
+ ld hl, UnknBGPals
+ add hl, de
+ ld de, wcc60
+.asm_17d918
+ ld a, [hli]
+ ld [de], a
+ inc de
+ and a
+ jr nz, .asm_17d918
+ xor a
+ ld [wcf66], a
+ farcall Function11837a
+ ld a, [wc300]
+ and a
+ jr z, .asm_17d936
+ cp $a
+ jr z, .asm_17d936
+ call Function17e309
+ ret
+
+.asm_17d936
+ call Function17e349
+ ret
+; 17d93a
+
+Function17d93a: ; 17d93a
+ call Function17e415
+ ld de, $c708
+ ld bc, $5
+ call CopyBytes
+ call Function17e41e
+ call Function17e32b
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld a, [$c70c]
+ call Function17e6de
+ ld a, [$c70a]
+ ld [CurPartySpecies], a
+ ld a, [$c70c]
+ ld e, a
+ farcall LoadMonPaletteAsNthBGPal
+ call SetPalettes
+ ld a, [$c708]
+ ld l, a
+ ld a, [$c709]
+ ld h, a
+ ld a, [$c70b]
+ ld c, a
+ decoord 0, 0
+ add hl, de
+ ld e, l
+ ld d, h
+ farcall HOF_AnimateFrontpic
+ pop af
+ ld [rSVBK], a
+ call Function17e349
+ ret
+; 17d98b
+
+Function17d98b: ; 17d98b
+ call Function17e415
+ ld de, $c708
+ ld bc, $4
+ call CopyBytes
+ call Function17e41e
+ call Function17e32b
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld a, [$c70b]
+ call Function17e6de
+ ld a, [$c70a]
+ ld [TrainerClass], a
+ ld a, [$c70b]
+ ld e, a
+ farcall LoadTrainerClassPaletteAsNthBGPal
+ call SetPalettes
+ ld a, [$c708]
+ ld e, a
+ ld a, [$c709]
+ ld d, a
+ push de
+ ld de, VTiles2
+ farcall GetTrainerPic
+ pop hl
+ decoord 0, 0
+ add hl, de
+ ld bc, $707
+ predef PlaceGraphic
+ pop af
+ ld [rSVBK], a
+ call Function17e349
+ ret
+; 17d9e3
+
+Function17d9e3: ; 17d9e3
+ call Function17e415
+ ld de, $c708
+ ld bc, $7
+ call CopyBytes
+ call Function17e41e
+ ld a, [$c70b]
+ push af
+ cp $c0
+ jr c, .asm_17da01
+ ld a, [$c70c]
+ ld [rSVBK], a
+ jr .asm_17da07
+
+.asm_17da01
+ ld a, [$c70c]
+ call GetSRAMBank
+
+.asm_17da07
+ ld a, [$c708]
+ ld l, a
+ ld a, [$c709]
+ ld h, a
+ ld a, [$c70a]
+ ld e, a
+ ld a, [$c70b]
+ ld d, a
+ ld a, [$c70d]
+ ld c, a
+ ld a, [$c70e]
+ ld b, a
+ call CopyBytes
+ pop af
+ cp $c0
+ jr c, .asm_17da2d
+ ld a, $4
+ ld [rSVBK], a
+ jr .asm_17da30
+
+.asm_17da2d
+ call CloseSRAM
+
+.asm_17da30
+ ret
+; 17da31
+
+Function17da31: ; 17da31
+ call Function17e415
+ ld de, $c708
+ ld bc, $4
+ call CopyBytes
+ call Function17e41e
+ ld a, [$c709]
+ push af
+ cp $c0
+ jr c, .asm_17da4f
+ ld a, [$c70a]
+ ld [rSVBK], a
+ jr .asm_17da55
+
+.asm_17da4f
+ ld a, [$c70a]
+ call GetSRAMBank
+
+.asm_17da55
+ ld a, [$c708]
+ ld e, a
+ ld a, [$c709]
+ ld d, a
+ ld a, [$c70b]
+ ld c, a
+ bit 7, c
+ jr nz, .asm_17da70
+ ld hl, Unknown_17da8c
+ ld b, $0
+ add hl, bc
+ ld a, [de]
+ or [hl]
+ ld [de], a
+ jr .asm_17da7d
+
+.asm_17da70
+ ld hl, Unknown_17da94
+ ld a, c
+ and $7f
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [de]
+ and [hl]
+ ld [de], a
+
+.asm_17da7d
+ pop af
+ cp $c0
+ jr c, .asm_17da88
+ ld a, $4
+ ld [rSVBK], a
+ jr .asm_17da8b
+
+.asm_17da88
+ call CloseSRAM
+
+.asm_17da8b
+ ret
+; 17da8c
+
+Unknown_17da8c:
+x = 0
+ rept 8
+ db 1 << x
+x = x + 1
+ endr
+
+Unknown_17da94:
+x = 0
+ rept 8
+ db (1 << x) ^ $ff
+x = x + 1
+ endr
+; 17da9c
+
+Function17da9c: ; 17da9c
+ ld a, [wcd31]
+ dec a
+ jr z, .asm_17dabd
+ push af
+ call Function17e566
+ pop af
+ ld [wcd31], a
+ ld hl, wcd24
+ ld a, [wcd2e]
+ sub [hl]
+ ld [wcd2e], a
+ call Function17e55b
+ call Function17e5af
+.asm_17daba
+ jp Function17e415
+
+.asm_17dabd
+ ld a, [wcd2f]
+ and a
+ jr z, .asm_17daba
+ ld hl, wcd24
+ sub [hl]
+ ld [wcd2f], a
+ ld a, [wcd2e]
+ sub [hl]
+ ld [wcd2e], a
+ call Function17e451
+ call Function17e55b
+ call Function17e5af
+ jr .asm_17daba
+; 17dadc
+
+Function17dadc: ; 17dadc
+ ld a, [wcd2e]
+ ld hl, wcd24
+ add [hl]
+ ld hl, wcd42
+ cp [hl]
+ jr z, .asm_17db0e
+ jr nc, .asm_17db0e
+ ld hl, wcd31
+ ld a, [wcd2b]
+ cp [hl]
+ jr z, .asm_17db11
+ call Function17e566
+ ld a, [wcd31]
+ inc a
+ ld [wcd31], a
+ ld hl, wcd24
+ ld a, [wcd2e]
+ add [hl]
+ ld [wcd2e], a
+ call Function17e55b
+ call Function17e5af
+
+.asm_17db0e
+ jp Function17e415
+
+.asm_17db11
+ ld hl, wcd24
+ ld a, [wcd2f]
+ add [hl]
+ ld [wcd2f], a
+ ld a, [wcd2e]
+ add [hl]
+ ld [wcd2e], a
+ call Function17e451
+ call Function17e55b
+ call Function17e5af
+ jr .asm_17db0e
+; 17db2d
+
+Function17db2d: ; 17db2d
+ ld a, [wcd30]
+ ld hl, wcd24
+ cp [hl]
+ jr z, .asm_17db53
+ ld hl, wcd42
+ ld a, [wcd2e]
+ inc a
+ cp [hl]
+ jr z, .asm_17db53
+ ld [wcd2e], a
+ call Function17e566
+ ld a, [wcd30]
+ inc a
+ ld [wcd30], a
+ call Function17e55b
+ call Function17e5af
+
+.asm_17db53
+ jp Function17e415
+; 17db56
+
+Function17db56: ; 17db56
+ ld a, [wcd30]
+ cp $1
+ jr z, .asm_17db74
+ call Function17e566
+ ld a, [wcd30]
+ dec a
+ ld [wcd30], a
+ ld a, [wcd2e]
+ dec a
+ ld [wcd2e], a
+ call Function17e55b
+ call Function17e5af
+
+.asm_17db74
+ jp Function17e415
+; 17db77
+
+Function17db77: ; 17db77
+ ld hl, wcd2d
+ ld a, [wcd2f]
+ add [hl]
+ ld hl, wcd42
+ cp [hl]
+ jr z, .asm_17dbae
+ jr nc, .asm_17dbae
+ call Function17e566
+ ld hl, wcd2d
+ ld a, [wcd2f]
+ add [hl]
+ ld [wcd2f], a
+ ld a, [wcd2e]
+ add [hl]
+ ld hl, wcd42
+ cp [hl]
+ jr c, .asm_17db9f
+ ld a, [hl]
+ dec a
+
+.asm_17db9f
+ ld [wcd2e], a
+ call Function17dbb1
+ call Function17e451
+ call Function17e55b
+ call Function17e5af
+
+.asm_17dbae
+ jp Function17e415
+; 17dbb1
+
+Function17dbb1: ; 17dbb1
+ ld hl, wcd2f
+ ld a, [wcd42]
+ sub [hl]
+ ld hl, wcd2d
+ cp [hl]
+ ret nc
+ ld a, $1
+ ld [wcd30], a
+ ld [wcd31], a
+ ld a, [wcd24]
+ ld c, a
+ ld a, [wcd24]
+ ld b, a
+ ld a, [wcd2e]
+ ld hl, wcd2f
+ sub [hl]
+.asm_17dbd4
+ and a
+ ret z
+ push af
+ ld hl, wcd30
+ ld a, b
+ cp [hl]
+ jr nz, .asm_17dbe4
+ ld a, $1
+ ld [hl], a
+ ld hl, wcd31
+
+.asm_17dbe4
+ inc [hl]
+ pop af
+ dec a
+ jr .asm_17dbd4
+; 17dbe9
+
+Function17dbe9: ; 17dbe9
+ ld hl, wcd2d
+ ld a, [wcd2f]
+ sub [hl]
+ bit 7, a
+ jr z, .asm_17dbf5
+ xor a
+
+.asm_17dbf5
+ ld [wcd2f], a
+ ld a, [wcd30]
+ dec a
+ ld c, a
+ ld a, [wcd31]
+ ld b, a
+ xor a
+ ld hl, wcd24
+.asm_17dc05
+ dec b
+ jr z, .asm_17dc0b
+ add [hl]
+ jr .asm_17dc05
+
+.asm_17dc0b
+ add c
+ ld hl, wcd2f
+ add [hl]
+ ld [wcd2e], a
+ call Function17e451
+ call Function17e55b
+ call Function17e5af
+ jp Function17e415
+; 17dc1f
+
+Function17dc1f: ; 17dc1f
+ call Function17e415
+ ld de, $c688
+ ld bc, $6
+ call CopyBytes
+ call Function17e32b
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld hl, $c688
+ ld a, $40
+ ld [$c708], a
+ ld a, [hli]
+ ld [$c70a], a
+ add $5
+ ld [$c70c], a
+ ld a, [hli]
+ ld [$c709], a
+ add $4
+ ld [$c70b], a
+ ld a, $96
+ ld [$c70d], a
+ ld a, $5c
+ ld [$c70e], a
+ ld a, $1
+ ld [$c70f], a
+ ld hl, $c708
+ call LoadMenuDataHeader
+ call VerticalMenu
+ jr nc, .asm_17dc6e
+ ld a, $2
+ ld [wMenuCursorY], a
+
+.asm_17dc6e
+ call CloseWindow
+ pop af
+ ld [rSVBK], a
+ ld a, [wMenuCursorY]
+ cp $1
+ jr nz, .asm_17dc85
+ ld a, [$c68a]
+ ld l, a
+ ld a, [$c68a + 1]
+ ld h, a
+ jr .asm_17dc8d
+
+.asm_17dc85
+ ld a, [$c68a + 2]
+ ld l, a
+ ld a, [$c68a + 3]
+ ld h, a
+
+.asm_17dc8d
+ push hl
+ call Function17e349
+ pop hl
+ call Function17e40f
+ ret
+; 17dc96
+
+MenuData2_17dc96:
+ db $e0 ; flags
+ db 2
+ db "はい@"
+ db "いいえ@"
+; 17dc9f
+
+Function17dc9f: ; 17dc9f
+ call Function17e415
+ call Function17e41e
+ call RotateFourPalettesLeft
+ ret
+; 17dca9
+
+Function17dca9: ; 17dca9
+ call Function17e415
+ call Function17e41e
+
+Function17dcaf:
+ ld a, $5
+ ld [rSVBK], a
+ ld hl, UnknBGPals
+ ld de, $8
+ ld c, $8
+.asm_17dcbb
+ push hl
+ ld a, $ff
+ ld [hli], a
+ ld a, $7f
+ ld [hl], a
+ pop hl
+ add hl, de
+ dec c
+ jr nz, .asm_17dcbb
+ call RotateThreePalettesRight
+ ld a, $4
+ ld [rSVBK], a
+ ret
+; 17dccf
+
+Function17dccf: ; 17dccf
+ call Function17e415
+ push hl
+ ld a, [wcd4b]
+ ld l, a
+ ld a, [wcd4c]
+ ld h, a
+ ld a, [wcd2e]
+ ld c, a
+ ld b, $0
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld c, a
+ ld a, [hl]
+ ld b, a
+ call Function17e43d
+ call Function17e41e
+.asm_17dced
+ ld a, [wcd78]
+ ld l, a
+ ld a, [wcd79]
+ ld h, a
+ ld a, [hl]
+ cp $ff
+ jr z, .asm_17dd0d
+.crash_loop
+ cp $31
+ jr nc, .crash_loop
+ call Function17d711
+ ld a, [wcd77]
+ bit 7, a
+ jr nz, .asm_17dd0d
+ and a
+ jr z, .asm_17dd11
+ jr .asm_17dced
+
+.asm_17dd0d
+ pop hl
+ jp Function17e41e
+
+.asm_17dd11
+ pop hl
+ ret
+; 17dd13
+
+Function17dd13: ; 17dd13
+ call Function17e415
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ call Function17e41e
+ call Function17e447
+ push hl
+ hlcoord 0, 0
+ add hl, bc
+ push hl
+ pop bc
+ pop hl
+ call PlaceHLTextAtBC
+ ret
+; 17dd30
+
+Function17dd30: ; 17dd30
+ call Function17e415
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld b, $0
+ ld a, [hli]
+ push af
+ call Function17e41e
+ pop af
+ hlcoord 0, 0
+ add hl, de
+ call Function17e600
+ ret
+; 17dd49
+
+Function17dd49: ; 17dd49
+ call Function17e415
+ ld de, $c708
+ ld bc, $a
+ call CopyBytes
+ ld a, [$c711]
+ ld c, a
+ ld b, $0
+ call CopyBytes
+ ld a, [$c70a]
+ cp $c0
+ jr c, .sram
+ ld a, [$c708]
+ ld [rSVBK], a
+ jr .got_bank
+
+.sram
+ ld a, [$c708]
+ call GetSRAMBank
+
+.got_bank
+ ld a, [$c709]
+ ld l, a
+ ld a, [$c70a]
+ ld h, a
+ ld de, $c688
+ ld a, [$c711]
+ ld c, a
+ ld b, $0
+ call CopyBytes
+ ld a, [$c70a]
+ cp $c0
+ jr c, .close_sram
+ ld a, $4
+ ld [rSVBK], a
+ jr .exited_bank
+
+.close_sram
+ call CloseSRAM
+
+.exited_bank
+ ld a, [$c711]
+ ld c, a
+ ld hl, $c712
+ ld de, $c688
+.loop
+ ld a, [de]
+ inc de
+ cp [hl]
+ inc hl
+ jr z, .next
+ jr c, .load
+ jr .load2
+
+.next
+ dec c
+ jr nz, .loop
+ ld a, [$c70d]
+ ld l, a
+ ld a, [$c70e]
+ ld h, a
+ jr .done
+
+.load2
+ ld a, [$c70f]
+ ld l, a
+ ld a, [$c710]
+ ld h, a
+ jr .done
+
+.load
+ ld a, [$c70b]
+ ld l, a
+ ld a, [$c70c]
+ ld h, a
+
+.done
+ call Function17e40f
+ ret
+; 17ddcd
+
+Function17ddcd: ; 17ddcd
+ call Function17e415
+ ld de, $c708
+ ld bc, $8
+ call CopyBytes
+ ld a, [$c70a]
+ cp $c0
+ jr c, .asm_17dde7
+ ld a, [$c708]
+ ld [rSVBK], a
+ jr .asm_17dded
+
+.asm_17dde7
+ ld a, [$c708]
+ call GetSRAMBank
+
+.asm_17dded
+ ld a, [$c709]
+ ld e, a
+ ld a, [$c70a]
+ ld d, a
+ ld a, [de]
+ ld [$c710], a
+ ld a, [$c70b]
+ ld c, a
+ ld b, $0
+ ld a, [$c70a]
+ cp $c0
+ jr c, .asm_17de0c
+ ld a, $4
+ ld [rSVBK], a
+ jr .asm_17de0f
+
+.asm_17de0c
+ call CloseSRAM
+
+.asm_17de0f
+ push hl
+ ld hl, Unknown_17da8c
+ add hl, bc
+ ld a, [hl]
+ ld hl, $c710
+ and [hl]
+ pop hl
+ jr nz, .asm_17de26
+ ld a, [$c70e]
+ ld l, a
+ ld a, [$c70f]
+ ld h, a
+ jr .asm_17de2e
+
+.asm_17de26
+ ld a, [$c70c]
+ ld l, a
+ ld a, [$c70d]
+ ld h, a
+
+.asm_17de2e
+ call Function17e40f
+ ret
+; 17de32
+
+Function17de32: ; 17de32
+ call Function17e415
+ ld de, $c708
+ ld bc, $9
+ call CopyBytes
+ ld a, [$c710]
+ ld c, a
+ ld b, $0
+ call CopyBytes
+ ld a, $6
+ call GetSRAMBank
+ call Function17f4f6
+ ld a, [$c708]
+ ld e, a
+ ld a, [$c709]
+ ld d, a
+ add hl, de
+ ld e, l
+ ld d, h
+ ld a, [$c710]
+ ld c, a
+ ld hl, $c711
+.asm_17de61
+ ld a, [de]
+ inc de
+ cp [hl]
+ inc hl
+ jr z, .asm_17de6b
+ jr c, .asm_17de82
+ jr .asm_17de78
+
+.asm_17de6b
+ dec c
+ jr nz, .asm_17de61
+ ld a, [$c70c]
+ ld l, a
+ ld a, [$c70d]
+ ld h, a
+ jr .asm_17de8a
+
+.asm_17de78
+ ld a, [$c70e]
+ ld l, a
+ ld a, [$c70f]
+ ld h, a
+ jr .asm_17de8a
+
+.asm_17de82
+ ld a, [$c70a]
+ ld l, a
+ ld a, [$c70b]
+ ld h, a
+
+.asm_17de8a
+ call CloseSRAM
+ call Function17e40f
+ ret
+; 17de91
+
+Function17de91: ; 17de91
+ call Function17e415
+ ld de, $c708
+ ld bc, $7
+ call CopyBytes
+ ld a, $6
+ call GetSRAMBank
+ call Function17f4f6
+ ld a, [$c708]
+ ld e, a
+ ld a, [$c709]
+ ld d, a
+ add hl, de
+ ld e, l
+ ld d, h
+ ld a, [$c70a]
+ ld c, a
+ ld b, $0
+ ld hl, Unknown_17da8c
+ add hl, bc
+ ld a, [hl]
+ ld l, e
+ ld h, d
+ and [hl]
+ jr nz, .asm_17deca
+ ld a, [$c70d]
+ ld l, a
+ ld a, [$c70e]
+ ld h, a
+ jr .asm_17ded2
+
+.asm_17deca
+ ld a, [$c70b]
+ ld l, a
+ ld a, [$c70c]
+ ld h, a
+
+.asm_17ded2
+ call CloseSRAM
+ call Function17e40f
+ ret
+; 17ded9
+
+Function17ded9: ; 17ded9
+ call Function17e415
+ ld de, $c708
+ ld bc, $1f
+ call CopyBytes
+ call Function17e32b
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld hl, $c708
+ ld a, [hli]
+ ld [CurPartySpecies], a
+ ld [TempEnemyMonSpecies], a
+ ld a, [hli]
+ ld [CurPartyLevel], a
+ ld a, [hli]
+ ld b, a
+ ld a, [PartyCount]
+ cp $6
+ jp nc, Function17e026
+ xor a
+ ld [MonType], a
+ push hl
+ push bc
+ predef TryAddMonToParty
+ farcall SetCaughtData
+ pop bc
+ pop hl
+ bit 1, b
+ jr z, .asm_17df33
+ push bc
+ push hl
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMonNicknames
+ call SkipNames
+ ld d, h
+ ld e, l
+ pop hl
+ call CopyBytes
+ pop bc
+ jr .asm_17df37
+
+.asm_17df33
+ ld de, $6
+ add hl, de
+
+.asm_17df37
+ bit 2, b
+ jr z, .asm_17df5a
+ push bc
+ push hl
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMonOT
+ call SkipNames
+ ld d, h
+ ld e, l
+ pop hl
+ call CopyBytes
+ ld a, [hli]
+ ld b, a
+ push hl
+ farcall SetGiftPartyMonCaughtData
+ pop hl
+ pop bc
+ jr .asm_17df5e
+
+.asm_17df5a
+ ld de, $7
+ add hl, de
+
+.asm_17df5e
+ bit 3, b
+ jr z, .asm_17df79
+ push bc
+ push hl
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMon1ID
+ call GetPartyLocation
+ ld d, h
+ ld e, l
+ pop hl
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ pop bc
+ jr .asm_17df7b
+
+.asm_17df79
+ inc hl
+ inc hl
+
+.asm_17df7b
+ bit 4, b
+ jr z, .asm_17dfd0
+ push bc
+ push hl
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMon1DVs
+ call GetPartyLocation
+ ld d, h
+ ld e, l
+ pop hl
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ push hl
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMon1Species
+ call GetPartyLocation
+ ld a, [hl]
+ ld [CurSpecies], a
+ call GetBaseData
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMon1MaxHP
+ call GetPartyLocation
+ ld d, h
+ ld e, l
+ push hl
+ ld b, $0
+ farcall CalcPkmnStats
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMon1HP
+ call GetPartyLocation
+ ld d, h
+ ld e, l
+ pop hl
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hl]
+ ld [de], a
+ pop hl
+ pop bc
+ jr .asm_17dfd2
+
+.asm_17dfd0
+ inc hl
+ inc hl
+
+.asm_17dfd2
+ bit 5, b
+ jr z, .asm_17dfea
+ push bc
+ push hl
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMon1Item
+ call GetPartyLocation
+ ld d, h
+ ld e, l
+ pop hl
+ ld a, [hli]
+ ld [de], a
+ pop bc
+ jr .asm_17dfeb
+
+.asm_17dfea
+ inc hl
+
+.asm_17dfeb
+ bit 6, b
+ jr z, .asm_17e01f
+ push bc
+ push hl
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMon1Moves
+ call GetPartyLocation
+ ld d, h
+ ld e, l
+ pop hl
+ push de
+ ld bc, $4
+ call CopyBytes
+ pop de
+ push hl
+ push de
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMon1PP
+ call GetPartyLocation
+ ld d, h
+ ld e, l
+ pop hl
+ predef FillPP
+ pop hl
+ pop bc
+ jp asm_17e0ee
+
+.asm_17e01f
+ ld de, $4
+ add hl, de
+ jp asm_17e0ee
+; 17e026
+
+Function17e026: ; 17e026
+ ld a, BANK(sBoxCount)
+ call GetSRAMBank
+ ld a, [sBoxCount]
+ call CloseSRAM
+ cp $14
+ jp nc, .asm_17e0ea
+ bit 0, b
+ jp z, .asm_17e0ea
+ push bc
+ push hl
+ farcall LoadEnemyMon
+ farcall SentPkmnIntoBox
+ farcall SetBoxMonCaughtData
+ pop hl
+ pop bc
+ ld a, BANK(sBoxMonNicknames)
+ call GetSRAMBank
+ bit 1, b
+ jr z, .asm_17e067
+ push bc
+ ld bc, $b
+ ld de, sBoxMonNicknames
+ call CopyBytes
+ pop bc
+ jr .asm_17e06b
+
+.asm_17e067
+ ld de, $6
+ add hl, de
+
+.asm_17e06b
+ bit 2, b
+ jr z, .asm_17e08e
+ push bc
+ ld bc, $6
+ ld de, sBoxMonOT
+ call CopyBytes
+ ld a, [hli]
+ ld b, a
+ push hl
+ call CloseSRAM
+ farcall SetGiftBoxMonCaughtData
+ ld a, $1
+ call GetSRAMBank
+ pop hl
+ pop bc
+ jr .asm_17e092
+
+.asm_17e08e
+ ld de, $7
+ add hl, de
+
+.asm_17e092
+ bit 3, b
+ jr z, .asm_17e0a2
+ push bc
+ ld de, sBoxMon1ID
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ pop bc
+ jr .asm_17e0a4
+
+.asm_17e0a2
+ inc hl
+ inc hl
+
+.asm_17e0a4
+ bit 4, b
+ jr z, .asm_17e0b4
+ push bc
+ ld de, sBoxMon1DVs
+ ld a, [hli]
+ ld [de], a
+ inc de
+ ld a, [hli]
+ ld [de], a
+ pop bc
+ jr .asm_17e0b6
+
+.asm_17e0b4
+ inc hl
+ inc hl
+
+.asm_17e0b6
+ bit 5, b
+ ld a, [hli]
+ jr z, .asm_17e0be
+ ld [sBoxMon1Item], a
+
+.asm_17e0be
+ bit 6, b
+ jr z, .asm_17e0e1
+ push bc
+ ld de, sBoxMon1Moves
+ ld bc, $4
+ call CopyBytes
+ push hl
+ ld hl, sBoxMon1Moves
+ ld de, sBoxMon1PP
+ predef FillPP
+ call CloseSRAM
+ pop hl
+ pop bc
+ inc hl
+ inc hl
+ jr asm_17e0ee
+
+.asm_17e0e1
+ call CloseSRAM
+ ld de, $6
+ add hl, de
+ jr asm_17e0ee
+
+.asm_17e0ea
+ ld bc, $1a
+ add hl, bc
+
+asm_17e0ee
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ pop af
+ ld [rSVBK], a
+ push hl
+ call Function17e349
+ pop hl
+ call Function17e40f
+ ret
+; 17e0fd
+
+Function17e0fd: ; 17e0fd
+ call Function17e415
+ ld de, $c708
+ ld bc, $6
+ call CopyBytes
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld hl, $c708
+ ld a, [hli]
+ ld [CurItem], a
+ ld a, [hli]
+ ld [wItemQuantityChangeBuffer], a
+ push hl
+ ld hl, NumItems
+ call ReceiveItem
+ pop hl
+ jr c, .asm_17e127
+ inc hl
+ inc hl
+
+.asm_17e127
+ ld a, [hli]
+ ld b, a
+ ld a, [hl]
+ ld h, a
+ ld l, b
+ pop af
+ ld [rSVBK], a
+ call Function17e40f
+ ret
+; 17e133
+
+Function17e133: ; 17e133
+ call Function17e415
+ ld de, $c708
+ ld bc, $5
+ call CopyBytes
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld hl, $c708
+ ld a, [hli]
+ ld [ScriptVar], a
+ push hl
+ farcall MobileCheckOwnMonAnywhere
+ pop hl
+ jr c, .asm_17e159
+ inc hl
+ inc hl
+
+.asm_17e159
+ ld a, [hli]
+ ld b, a
+ ld a, [hl]
+ ld h, a
+ ld l, b
+ pop af
+ ld [rSVBK], a
+ call Function17e40f
+ ret
+; 17e165
+
+Function17e165: ; 17e165
+ call Function17e415
+ ld de, $c708
+ ld bc, $5
+ call CopyBytes
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ ld hl, $c708
+ ld a, [hli]
+ ld [CurItem], a
+ push hl
+ ld hl, NumItems
+ call CheckItem
+ pop hl
+ jr c, .asm_17e195
+ push hl
+ ld hl, PCItems
+ call CheckItem
+ pop hl
+ jr c, .asm_17e195
+ inc hl
+ inc hl
+
+.asm_17e195
+ ld a, [hli]
+ ld b, a
+ ld a, [hl]
+ ld h, a
+ ld l, b
+ pop af
+ ld [rSVBK], a
+ call Function17e40f
+ ret
+; 17e1a1
+
+Function17e1a1: ; 17e1a1
+ call Function17e415
+ ld de, $c708
+ ld bc, $d
+ call CopyBytes
+ ld a, [$c70a]
+ cp $c0
+ jr c, .asm_17e1bb
+ ld a, [$c708]
+ ld [rSVBK], a
+ jr .asm_17e1c1
+
+.asm_17e1bb
+ ld a, [$c708]
+ call GetSRAMBank
+
+.asm_17e1c1
+ ld a, [$c709]
+ ld l, a
+ ld a, [$c70a]
+ ld h, a
+ ld de, $c608
+ ld a, [$c70b]
+ ld c, a
+ ld b, $0
+ call CopyBytes
+ ld a, [$c70a]
+ cp $c0
+ jr c, .asm_17e1e2
+ ld a, $4
+ ld [rSVBK], a
+ jr .asm_17e1e5
+
+.asm_17e1e2
+ call CloseSRAM
+
+.asm_17e1e5
+ ld a, [$c70e]
+ cp $c0
+ jr c, .asm_17e1f3
+ ld a, [$c70c]
+ ld [rSVBK], a
+ jr .asm_17e1f9
+
+.asm_17e1f3
+ ld a, [$c70c]
+ call GetSRAMBank
+
+.asm_17e1f9
+ ld a, [$c70d]
+ ld l, a
+ ld a, [$c70e]
+ ld h, a
+ ld de, $c688
+ ld a, [$c70b]
+ ld c, a
+ ld b, $0
+ call CopyBytes
+ ld a, [$c70e]
+ cp $c0
+ jr c, .asm_17e21a
+ ld a, $4
+ ld [rSVBK], a
+ jr .asm_17e21d
+
+.asm_17e21a
+ call CloseSRAM
+
+.asm_17e21d
+ ld a, [$c70b]
+ ld c, a
+ ld hl, $c688
+ ld de, $c608
+.asm_17e227
+ ld a, [de]
+ inc de
+ cp [hl]
+ inc hl
+ jr z, .asm_17e231
+ jr c, .asm_17e23e
+ jr .asm_17e248
+
+.asm_17e231
+ dec c
+ jr nz, .asm_17e227
+ ld a, [$c711]
+ ld l, a
+ ld a, [$c712]
+ ld h, a
+ jr .asm_17e250
+
+.asm_17e23e
+ ld a, [$c70f]
+ ld l, a
+ ld a, [$c710]
+ ld h, a
+ jr .asm_17e250
+
+.asm_17e248
+ ld a, [$c712 + 1]
+ ld l, a
+ ld a, [$c712 + 2]
+ ld h, a
+
+.asm_17e250
+ call Function17e40f
+ ret
+; 17e254
+
+Function17e254: ; 17e254
+ call Function17e415
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld [de], a
+ call Function17e41e
+ ret
+; 17e261
+
+Function17e261: ; 17e261
+ call Function17e415
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [de]
+ add [hl]
+ ld [de], a
+ inc hl
+ call Function17e41e
+ ret
+; 17e270
+
+Function17e270: ; 17e270
+ call Function17e415
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [de]
+ sub [hl]
+ ld [de], a
+ inc hl
+ call Function17e41e
+ ret
+; 17e27f
+
+Function17e27f: ; 17e27f
+ call Function17e415
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ call Function17e41e
+ ld l, c
+ ld h, b
+ ld a, [de]
+ add [hl]
+ ld [de], a
+ ret
+; 17e293
+
+Function17e293: ; 17e293
+ call Function17e415
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hli]
+ ld b, a
+ call Function17e41e
+ ld l, c
+ ld h, b
+ ld a, [de]
+ sub [hl]
+ ld [de], a
+ ret
+; 17e2a7
+
+Function17e2a7: ; 17e2a7
+ call Function17e415
+ call Function17e41e
+ call Function17e32b
+ xor a
+ ld [wcf66], a
+ farcall Function118233
+ ld de, GFX_17eb7e
+ ld hl, VTiles2 tile $60
+ lb bc, BANK(GFX_17eb7e), 1
+ call Get2bpp
+ ld a, [wc300]
+ and a
+ jr z, .asm_17e2d8
+ cp $a
+ jr z, .asm_17e2f7
+ cp $b
+ jr z, .asm_17e300
+ call Function17e309
+ ret
+
+.asm_17e2d8
+ call Function17d60b
+ call Function17e349
+ xor a
+ ld [wcd7a], a
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $aa73
+ ld de, $aa7f
+ ld bc, $c
+ call CopyBytes
+ call CloseSRAM
+ ret
+
+.asm_17e2f7
+ call Function17e349
+ ld a, $1
+ ld [wcd7a], a
+ ret
+
+.asm_17e300
+ call Function17e349
+ ld a, $2
+ ld [wcd7a], a
+ ret
+; 17e309
+
+Function17e309: ; 17e309
+ ld a, $2
+ ld [wc303], a
+ call Function17dcaf
+ call ClearScreen
+ call Function17e349
+ call Function17d5f6
+ farcall DisplayMobileError
+ call Function17e349
+ call Function17dcaf
+ xor a
+ ld [wcd77], a
+ ret
+; 17e32b
+
+Function17e32b: ; 17e32b
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $c608
+ ld de, $b0b1
+ ld bc, $40
+ call CopyBytes
+ ld hl, BGMapBuffer
+ ld bc, $5b
+ call CopyBytes
+ call CloseSRAM
+ ret
+; 17e349
+
+Function17e349: ; 17e349
+ ld a, $5
+ call GetSRAMBank
+ ld hl, $b0b1
+ ld de, $c608
+ ld bc, $40
+ call CopyBytes
+ ld de, BGMapBuffer
+ ld bc, $5b
+ call CopyBytes
+ call CloseSRAM
+ ret
+; 17e367
+
+Function17e367: ; 17e367
+ call Function17e415
+ call Function17e41e
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ farcall SaveGameData_
+ pop af
+ ld [rSVBK], a
+ ret
+; 17e37e
+
+Function17e37e: ; 17e37e
+ call Function17e415
+ call Function17e41e
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ farcall SaveAfterLinkTrade
+ pop af
+ ld [rSVBK], a
+ ret
+; 17e395
+
+Function17e395: ; 17e395
+ call Function17e415
+ call Function17e41e
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ farcall SaveBox
+ pop af
+ ld [rSVBK], a
+ ret
+; 17e3ac
+
+Function17e3ac: ; 17e3ac
+ call Function17e415
+ call Function17e41e
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ farcall SaveChecksum
+ pop af
+ ld [rSVBK], a
+ ret
+; 17e3c3
+
+Function17e3c3: ; 17e3c3
+ call Function17e415
+ call Function17e41e
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+ farcall UpdateTrainerRankingsChecksum2
+ farcall BackupMobileEventIndex
+ pop af
+ ld [rSVBK], a
+ ret
+; 17e3e0
+
+Function17e3e0: ; 17e3e0
+ call Function17e415
+ ld a, [hli]
+ ld c, a
+ call Function17e41e
+ ld a, $1
+ ld [hBGMapMode], a
+ call DelayFrames
+ ret
+; 17e3f0
+
+Function17e3f0: ; 17e3f0
+ call Function17e415
+ call Function17e41e
+.asm_17e3f6
+ call JoyTextDelay
+ ld hl, hJoyPressed
+ ld a, [hl]
+ and $1
+ ret nz
+ ld a, [hl]
+ and $2
+ ret nz
+ call WaitBGMap
+ jr .asm_17e3f6
+; 17e409
+
+Function17e409: ; 17e409
+ ld hl, wcd77
+ set 7, [hl]
+ ret
+; 17e40f
+
+Function17e40f: ; 17e40f
+ ld de, UnknBGPals
+ add hl, de
+ jr Function17e41e
+
+Function17e415:
+ ld a, [wcd78]
+ ld l, a
+ ld a, [wcd79]
+ ld h, a
+ inc hl
+
+Function17e41e:
+ ld a, l
+ ld [wcd78], a
+ ld a, h
+ ld [wcd79], a
+ ret
+; 17e427
+
+Function17e427: ; 17e427
+ ld hl, hJoyPressed
+ ld a, [hl]
+ and $1
+ jr nz, .asm_17e432
+ and $2
+ ret z
+
+.asm_17e432
+ ld a, $3
+ ld [wcd77], a
+ ret
+; 17e438
+
+Function17e438: ; 17e438
+ ld hl, wcd77
+ inc [hl]
+ ret
+; 17e43d
+
+Function17e43d: ; 17e43d
+ ld a, [BGMapBuffer]
+ ld l, a
+ ld a, [wcd21]
+ ld h, a
+ add hl, bc
+ ret
+; 17e447
+
+Function17e447: ; 17e447
+ ld a, [BGMapBuffer]
+ ld l, a
+ ld a, [wcd21]
+ ld h, a
+ add hl, de
+ ret
+; 17e451
+
+Function17e451: ; 17e451
+ ld a, [wcd42]
+ and a
+ ret z
+ call Function17e51b
+ call Function17e4dd
+ ld a, [wcd2e]
+ push af
+ ld a, [wcd49]
+ ld l, a
+ ld a, [wcd4a]
+ ld h, a
+ ld a, [wcd2f]
+ ld [wcd2e], a
+ ld c, a
+ ld b, $0
+ add hl, bc
+ add hl, bc
+ push hl
+ hlcoord 0, 0
+ ld bc, $14
+ ld a, [wcd23]
+ call AddNTimes
+ ld a, [CreditsTimer]
+ ld c, a
+ ld b, $0
+ add hl, bc
+ pop bc
+ ld a, [wMobileCommsJumptableIndex]
+.asm_17e48b
+ push af
+ push hl
+ ld a, [wcd24]
+.asm_17e490
+ push af
+ push hl
+ ld a, [bc]
+ inc bc
+ ld e, a
+ ld a, [bc]
+ inc bc
+ ld d, a
+ push bc
+ push hl
+ ld a, [BGMapBuffer]
+ ld l, a
+ ld a, [wcd21]
+ ld h, a
+ add hl, de
+ push hl
+ pop de
+ pop hl
+ call PlaceString
+ pop bc
+ pop hl
+ ld a, [wcd26]
+ ld e, a
+ ld d, $0
+ add hl, de
+ ld a, [wcd2e]
+ inc a
+ ld [wcd2e], a
+ ld e, a
+ ld a, [wcd42]
+ cp e
+ jr z, .asm_17e4d5
+ pop af
+ dec a
+ jr nz, .asm_17e490
+ pop hl
+ ld a, [wcd27]
+ ld de, $14
+.asm_17e4cb
+ add hl, de
+ dec a
+ jr nz, .asm_17e4cb
+ pop af
+ dec a
+ jr nz, .asm_17e48b
+ jr .asm_17e4d8
+
+.asm_17e4d5
+ pop af
+ pop hl
+ pop af
+
+.asm_17e4d8
+ pop af
+ ld [wcd2e], a
+ ret
+; 17e4dd
+
+Function17e4dd: ; 17e4dd
+ ld a, [wcd2c]
+ and $1
+ ret z
+ ld a, [wcd29]
+ hlcoord 0, 0
+ ld bc, $14
+ call AddNTimes
+ ld a, [wcd28]
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [wcd2f]
+ and a
+ jr z, .asm_17e4ff
+ ld a, $61
+ ld [hl], a
+
+.asm_17e4ff
+ ld a, [wcd2a]
+ ld bc, $14
+ call AddNTimes
+ ld a, [wcd42]
+ ld c, a
+ ld a, [wcd2e]
+ ld b, a
+ ld a, [wcd24]
+ add b
+ cp c
+ ret z
+ ret nc
+ ld a, $ee
+ ld [hl], a
+ ret
+; 17e51b
+
+Function17e51b: ; 17e51b
+ ld a, [wcd28]
+ ld hl, CreditsTimer
+ sub [hl]
+ inc a
+ ld [wcd4f], a
+ hlcoord 0, 0
+ ld bc, $14
+ ld a, [wcd23]
+ dec a
+ call AddNTimes
+ ld a, [CreditsTimer]
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [wMobileCommsJumptableIndex]
+ ld c, a
+ ld a, [wcd27]
+ call SimpleMultiply
+.asm_17e544
+ push af
+ push hl
+ ld a, [wcd4f]
+ ld c, a
+ ld b, $0
+ ld a, $7f
+ call ByteFill
+ pop hl
+ ld bc, $14
+ add hl, bc
+ pop af
+ dec a
+ jr nz, .asm_17e544
+ ret
+; 17e55b
+
+Function17e55b: ; 17e55b
+ ld a, [wcd42]
+ and a
+ ret z
+ ld a, $ed
+ call Function17e571
+ ret
+; 17e566
+
+Function17e566: ; 17e566
+ ld a, [wcd42]
+ and a
+ ret z
+ ld a, $7f
+ call Function17e571
+ ret
+; 17e571
+
+Function17e571: ; 17e571
+ push af
+ hlcoord 0, 0
+ ld bc, $14
+ ld a, [wcd23]
+ call AddNTimes
+ ld a, [CreditsTimer]
+ ld c, a
+ ld b, $0
+ add hl, bc
+ dec hl
+ push hl
+ ld a, [wcd31]
+ dec a
+ ld c, a
+ ld a, [wcd27]
+ call SimpleMultiply
+ ld l, $0
+ ld h, l
+ ld bc, $14
+ call AddNTimes
+ ld a, [wcd30]
+ dec a
+ ld c, a
+ ld a, [wcd26]
+ call SimpleMultiply
+ ld c, a
+ ld b, $0
+ add hl, bc
+ pop bc
+ add hl, bc
+ pop af
+ ld [hl], a
+ ret
+; 17e5af
+
+Function17e5af: ; 17e5af
+ ld a, [wcd2c]
+ and $2
+ ret z
+ ld a, [wcd43]
+ ld l, a
+ ld a, [wMobileInactivityTimerMinutes]
+ ld h, a
+ bccoord 0, 0
+ add hl, bc
+ ld bc, $ffec
+ add hl, bc
+ ld a, [wMobileInactivityTimerSeconds]
+ ld c, a
+ ld b, $0
+ ld a, [wMobileInactivityTimerFrames]
+ call Function17e600
+ ld a, [wcd2e]
+ ld c, a
+ ld b, $0
+ ld a, [wcd4d]
+ ld l, a
+ ld a, [wcd4e]
+ ld h, a
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [BGMapBuffer]
+ ld l, a
+ ld a, [wcd21]
+ ld h, a
+ add hl, de
+ push hl
+ pop de
+ ld a, [wcd43]
+ ld l, a
+ ld a, [wMobileInactivityTimerMinutes]
+ ld h, a
+ bccoord 0, 0
+ add hl, bc
+ call PlaceString
+ ret
+; 17e600
+
+Function17e600: ; 17e600
+.asm_17e600
+ push af
+ push hl
+ push bc
+ ld a, $7f
+ call ByteFill
+ pop bc
+ pop hl
+ ld de, $14
+ add hl, de
+ pop af
+ dec a
+ jr nz, .asm_17e600
+ ret
+; 17e613
+
+Function17e613: ; 17e613
+ push hl
+ hlcoord 0, 0
+ ld bc, $14
+ ld a, [de]
+ inc de
+ push af
+ ld a, [de]
+ inc de
+ and a
+.asm_17e620
+ jr z, .asm_17e626
+ add hl, bc
+ dec a
+ jr .asm_17e620
+
+.asm_17e626
+ pop af
+ ld c, a
+ ld b, $0
+ add hl, bc
+ push hl
+ ld a, [wcd53]
+ ld [hli], a
+ ld a, [de]
+ inc de
+ dec a
+ dec a
+ jr z, .asm_17e63f
+ ld c, a
+ ld a, [wcd53]
+ inc a
+.asm_17e63b
+ ld [hli], a
+ dec c
+ jr nz, .asm_17e63b
+
+.asm_17e63f
+ ld a, [wcd53]
+ add $2
+ ld [hl], a
+ pop hl
+ ld bc, $14
+ add hl, bc
+ ld a, [de]
+ dec de
+ dec a
+ dec a
+ jr z, .asm_17e674
+ ld b, a
+.asm_17e651
+ push hl
+ ld a, [wcd53]
+ add $3
+ ld [hli], a
+ ld a, [de]
+ dec a
+ dec a
+ jr z, .asm_17e664
+ ld c, a
+ ld a, $7f
+.asm_17e660
+ ld [hli], a
+ dec c
+ jr nz, .asm_17e660
+
+.asm_17e664
+ ld a, [wcd53]
+ add $4
+ ld [hl], a
+ pop hl
+ push bc
+ ld bc, $14
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .asm_17e651
+
+.asm_17e674
+ ld a, [wcd53]
+ add $5
+ ld [hli], a
+ ld a, [de]
+ dec a
+ dec a
+ jr z, .asm_17e689
+ ld c, a
+ ld a, [wcd53]
+ add $6
+.asm_17e685
+ ld [hli], a
+ dec c
+ jr nz, .asm_17e685
+
+.asm_17e689
+ ld a, [wcd53]
+ add $7
+ ld [hl], a
+ pop hl
+ ret
+; 17e691
+
+Function17e691: ; 17e691
+ push hl
+ ld hl, NULL
+ ld bc, $14
+ ld a, [de]
+ inc de
+ push af
+ ld a, [de]
+ inc de
+ inc de
+ and a
+.asm_17e69f
+ jr z, .asm_17e6a5
+ add hl, bc
+ dec a
+ jr .asm_17e69f
+
+.asm_17e6a5
+ pop af
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [de]
+ dec de
+.asm_17e6ac
+ push af
+ push hl
+ ld a, [de]
+.asm_17e6af
+ push af
+ push hl
+ push hl
+ bccoord 0, 0
+ add hl, bc
+ ld a, [hl]
+ cp $7f
+ jr z, .asm_17e6c2
+ ld a, [wcd53]
+ add $8
+ jr .asm_17e6c7
+
+.asm_17e6c2
+ ld a, [wcd53]
+ jr .asm_17e6c7
+
+.asm_17e6c7
+ pop hl
+ bccoord 0, 0, AttrMap
+ add hl, bc
+ ld [hl], a
+ pop hl
+ inc hl
+ pop af
+ dec a
+ jr nz, .asm_17e6af
+ pop hl
+ ld bc, $14
+ add hl, bc
+ pop af
+ dec a
+ jr nz, .asm_17e6ac
+ pop hl
+ ret
+; 17e6de
+
+Function17e6de: ; 17e6de
+ push af
+ ld a, [$c708]
+ ld l, a
+ ld a, [$c709]
+ ld h, a
+ decoord 0, 0, AttrMap
+ add hl, de
+ pop af
+ ld b, $7
+.asm_17e6ee
+ push hl
+ ld c, $7
+.asm_17e6f1
+ ld [hli], a
+ dec c
+ jr nz, .asm_17e6f1
+ pop hl
+ ld de, $14
+ add hl, de
+ dec b
+ jr nz, .asm_17e6ee
+ ret
+; 17e6fe
+
+
+PokemonNewsGFX: ; 17e6fe
+INCBIN "gfx/mobile/pokemon_news.2bpp"
+
+GFX_17eb7e:
+INCBIN "gfx/unknown/17eb7e.2bpp"
+
+TileAttrmap_17eb8e:
+INCBIN "gfx/unknown/17eb8e.attrmap"
+
+Palette_17eff6:
+ RGB 24, 9, 8
+ RGB 4, 9, 18
+ RGB 18, 18, 12
+ RGB 0, 0, 0
+ RGB 24, 24, 18
+ RGB 18, 18, 12
+ RGB 4, 9, 18
+ RGB 0, 0, 0
+ RGB 31, 31, 31
+ RGB 23, 11, 10
+ RGB 13, 6, 5
+ RGB 0, 0, 0
+ RGB 31, 31, 31
+ RGB 15, 25, 5
+ RGB 10, 20, 0
+ RGB 0, 0, 0
+ RGB 31, 31, 31
+ RGB 20, 28, 20
+ RGB 10, 18, 15
+ RGB 0, 0, 0
+ RGB 31, 31, 31
+ RGB 22, 22, 12
+ RGB 17, 12, 5
+ RGB 0, 0, 0
+ RGB 5, 5, 16
+ RGB 8, 19, 28
+ RGB 0, 0, 0
+ RGB 31, 31, 31
+ RGB 31, 31, 31
+ RGB 27, 24, 0
+ RGB 24, 16, 3
+ RGB 0, 0, 0
+
+
+Function17f036:: ; 17f036
+ ld a, $6
+ call GetSRAMBank
+ inc de
+.asm_17f03c
+ call Function17f047
+ jr c, .asm_17f043
+ jr .asm_17f03c
+
+.asm_17f043
+ call CloseSRAM
+ ret
+; 17f047
+
+Function17f047: ; 17f047
+ ld a, [de]
+ inc de
+ cp $50
+ jr z, .finished
+ cp $10
+ jr nc, .finished
+ dec a
+ push de
+ ld e, a
+ ld d, 0
+ ld hl, .Jumptable
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp hl
+
+.finished
+ scf
+ ret
+; 17f061
+
+.Jumptable: ; 17f061
+ dw Function17f081 ; 0
+ dw Function17f0f8 ; 1
+ dw Function17f154 ; 2
+ dw Function17f181 ; 3
+ dw Function17f1d0 ; 4
+ dw Function17f220 ; 5
+ dw Function17f27b ; 6
+ dw Function17f2cb ; 7
+ dw Function17f2ff ; 8
+ dw Function17f334 ; 9
+ dw Function17f382 ; a
+ dw Function17f3c9 ; b
+ dw Function17f3f0 ; c
+ dw Function17f41d ; d
+ dw Function17f44f ; e
+ dw Function17f44f ; f
+; 17f081
+
+Function17f081: ; 17f081
+ pop hl
+ call Function17f524
+ jr c, .asm_17f09f
+ ld de, 4
+ add hl, de
+ ld a, [hli]
+ inc hl
+ inc hl
+ ld e, l
+ ld d, h
+ ld l, c
+ ld h, b
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [de]
+ cp $50
+ jr z, .asm_17f09d
+ and a
+ ret
+
+.asm_17f09d
+ scf
+ ret
+
+.asm_17f09f
+ push bc
+ ld de, wcd54
+ ld bc, 7
+ call CopyBytes
+ pop bc
+ push hl
+ push bc
+ call Function17f4f6
+ pop bc
+ ld a, [wcd54]
+ ld e, a
+ ld a, [wcd55]
+ ld d, a
+ add hl, de
+ ld e, l
+ ld d, h
+ ld l, c
+ ld h, b
+ push hl
+ ld a, [wcd56]
+ ld b, a
+ ld a, [wcd57]
+ ld c, a
+ call MobilePrintNum
+ ld a, l
+ ld [wcd52], a
+ ld a, h
+ ld [wcd53], a
+ ld a, [wcd59]
+ and a
+ jr z, .asm_17f0ee
+ ld c, a
+ ld a, [wcd57]
+ inc a
+ ld b, a
+ ld e, l
+ ld d, h
+ dec de
+.asm_17f0e0
+ ld a, c
+ cp b
+ jr z, .asm_17f0ea
+ ld a, [de]
+ dec de
+ ld [hld], a
+ dec b
+ jr .asm_17f0e0
+
+.asm_17f0ea
+ ld a, [wcd5a]
+ ld [hl], a
+
+.asm_17f0ee
+ pop hl
+ ld a, [wcd58]
+ call Function17f50f
+ pop de
+ and a
+ ret
+; 17f0f8
+
+Function17f0f8: ; 17f0f8
+ pop hl
+ call Function17f524
+ jr c, .asm_17f114
+ ld de, $3
+ add hl, de
+ ld a, [hli]
+ ld e, l
+ ld d, h
+ ld l, c
+ ld h, b
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [de]
+ cp $50
+ jr z, .asm_17f112
+ and a
+ ret
+
+.asm_17f112
+ scf
+ ret
+
+.asm_17f114
+ push bc
+ ld de, wcd54
+ ld bc, $4
+ call CopyBytes
+ pop bc
+ push hl
+ push bc
+ call Function17f4f6
+ ld a, [wcd54]
+ ld e, a
+ ld a, [wcd55]
+ ld d, a
+ add hl, de
+ ld de, $c608
+ ld a, [wcd56]
+ ld c, a
+ ld b, $0
+ call CopyBytes
+ ld a, $50
+ ld [de], a
+ pop hl
+ ld de, $c608
+ call PlaceString
+ ld a, c
+ ld [wcd52], a
+ ld a, b
+ ld [wcd53], a
+ ld a, [wcd57]
+ call Function17f50f
+ pop de
+ and a
+ ret
+; 17f154
+
+Function17f154: ; 17f154
+ pop hl
+ call Function17f524
+ jr c, .asm_17f167
+ inc hl
+ inc hl
+ ld e, l
+ ld d, h
+ ld a, [de]
+ cp $50
+ jr z, .asm_17f165
+ and a
+ ret
+
+.asm_17f165
+ scf
+ ret
+
+.asm_17f167
+ push bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ pop bc
+ push hl
+ push bc
+ call Function17f4f6
+ add hl, de
+ ld c, l
+ ld b, h
+ pop de
+ farcall Function11c08f
+ ld c, l
+ ld b, h
+ pop de
+ and a
+ ret
+; 17f181
+
+Function17f181: ; 17f181
+ pop hl
+ call Function17f524
+ jr c, .asm_17f19d
+ ld de, $2
+ add hl, de
+ ld a, [hli]
+ ld e, l
+ ld d, h
+ ld l, c
+ ld h, b
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [de]
+ cp $50
+ jr z, .asm_17f19b
+ and a
+ ret
+
+.asm_17f19b
+ scf
+ ret
+
+.asm_17f19d
+ push bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld [wcd54], a
+ pop bc
+ push hl
+ push bc
+ call Function17f4f6
+ add hl, de
+ ld a, [hl]
+ ld c, a
+ ld de, $c608
+ farcall Function48c63
+ pop hl
+ ld de, $c608
+ call PlaceString
+ ld a, c
+ ld [wcd52], a
+ ld a, b
+ ld [wcd53], a
+ ld a, [wcd54]
+ call Function17f50f
+ pop de
+ and a
+ ret
+; 17f1d0
+
+Function17f1d0: ; 17f1d0
+ pop hl
+ call Function17f524
+ jr c, .asm_17f1ec
+ ld de, $2
+ add hl, de
+ ld a, [hli]
+ ld e, l
+ ld d, h
+ ld l, c
+ ld h, b
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [de]
+ cp $50
+ jr z, .asm_17f1ea
+ and a
+ ret
+
+.asm_17f1ea
+ scf
+ ret
+
+.asm_17f1ec
+ push bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld [wcd54], a
+ pop bc
+ push hl
+ push bc
+ call Function17f4f6
+ add hl, de
+ ld a, [hl]
+ ld a, $1
+ ld [rSVBK], a
+ ld [wd265], a
+ call GetPokemonName
+ pop hl
+ call PlaceString
+ ld a, c
+ ld [wcd52], a
+ ld a, b
+ ld [wcd53], a
+ ld a, $4
+ ld [rSVBK], a
+ ld a, [wcd54]
+ call Function17f50f
+ pop de
+ and a
+ ret
+; 17f220
+
+Function17f220: ; 17f220
+ pop hl
+ call Function17f524
+ jr c, .asm_17f23c
+ ld de, $2
+ add hl, de
+ ld a, [hli]
+ ld e, l
+ ld d, h
+ ld l, c
+ ld h, b
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [de]
+ cp $50
+ jr z, .asm_17f23a
+ and a
+ ret
+
+.asm_17f23a
+ scf
+ ret
+
+.asm_17f23c
+ push bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld [wcd54], a
+ pop bc
+ push hl
+ push bc
+ call Function17f4f6
+ add hl, de
+ ld a, [hl]
+ ld e, a
+ ld d, 0
+ ld hl, .Genders
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+ pop hl
+ call PlaceString
+ ld a, c
+ ld [wcd52], a
+ ld a, b
+ ld [wcd53], a
+ ld a, [wcd54]
+ call Function17f50f
+ pop de
+ and a
+ ret
+; 17f26e
+
+.Genders: dw .Boy, .Girl
+.Boy: db "Boy@"
+.Girl: db "Girl@"
+
+Function17f27b: ; 17f27b
+ pop hl
+ call Function17f524
+ jr c, .asm_17f297
+ ld de, $2
+ add hl, de
+ ld a, [hli]
+ ld e, l
+ ld d, h
+ ld l, c
+ ld h, b
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [de]
+ cp $50
+ jr z, .asm_17f295
+ and a
+ ret
+
+.asm_17f295
+ scf
+ ret
+
+.asm_17f297
+ push bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [hli]
+ ld [wcd54], a
+ pop bc
+ push hl
+ push bc
+ call Function17f4f6
+ add hl, de
+ ld a, [hl]
+ ld a, $1
+ ld [rSVBK], a
+ ld [wd265], a
+ call GetItemName
+ pop hl
+ call PlaceString
+ ld a, c
+ ld [wcd52], a
+ ld a, b
+ ld [wcd53], a
+ ld a, $4
+ ld [rSVBK], a
+ ld a, [wcd54]
+ call Function17f50f
+ pop de
+ and a
+ ret
+; 17f2cb
+
+Function17f2cb: ; 17f2cb
+ pop hl
+ push bc
+ ld a, [hli]
+ ld [wcd54], a
+ ld a, [hli]
+ ld [wcd55], a
+ ld a, [wcd2e]
+ inc a
+ ld [wcd56], a
+ pop bc
+ push hl
+ ld l, c
+ ld h, b
+ push hl
+ ld de, wcd56
+ ld b, $1
+ ld a, [wcd54]
+ ld c, a
+ call MobilePrintNum
+ ld a, l
+ ld [wcd52], a
+ ld a, h
+ ld [wcd53], a
+ pop hl
+ ld a, [wcd55]
+ call Function17f50f
+ pop de
+ and a
+ ret
+; 17f2ff
+
+Function17f2ff: ; 17f2ff
+ pop hl
+ push bc
+ ld a, [hli]
+ ld [wcd54], a
+ pop bc
+ push hl
+ push bc
+ ld a, $1
+ ld [rSVBK], a
+ ld hl, PlayerName
+ ld de, $c608
+ ld bc, $6
+ call CopyBytes
+ ld a, $4
+ ld [rSVBK], a
+ pop hl
+ ld de, $c608
+ call PlaceString
+ ld a, c
+ ld [wcd52], a
+ ld a, b
+ ld [wcd53], a
+ ld a, [wcd54]
+ call Function17f50f
+ pop de
+ and a
+ ret
+; 17f334
+
+Function17f334: ; 17f334
+ pop hl
+ push bc
+ ld a, [hli]
+ ld [wcd55], a
+ and $f
+ ld [wcd54], a
+ pop bc
+ push hl
+ ld l, c
+ ld h, b
+ push hl
+ ld a, [wcd55]
+ bit 7, a
+ jr nz, .asm_17f355
+ ld a, BANK(sCrystalData)
+ call GetSRAMBank
+ ld a, [sCrystalData + 2]
+ jr .asm_17f35d
+
+.asm_17f355
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$b2f3]
+
+.asm_17f35d
+ ld c, a
+ call CloseSRAM
+ ld de, $c608
+ farcall Function48c63
+ pop hl
+ ld de, $c608
+ call PlaceString
+ ld a, c
+ ld [wcd52], a
+ ld a, b
+ ld [wcd53], a
+ ld a, [wcd54]
+ call Function17f50f
+ pop de
+ and a
+ ret
+; 17f382
+
+Function17f382: ; 17f382
+ pop hl
+ push bc
+ ld a, [hli]
+ ld [wcd55], a
+ and $f
+ ld [wcd54], a
+ pop bc
+ push hl
+ push bc
+ ld l, c
+ ld h, b
+ ld a, [wcd55]
+ bit 7, a
+ jr nz, .asm_17f3a3
+ ld a, BANK(sCrystalData)
+ call GetSRAMBank
+ ld de, sCrystalData + 3
+ jr .asm_17f3ab
+
+.asm_17f3a3
+ ld a, $5
+ call GetSRAMBank
+ ld de, $b2f4
+
+.asm_17f3ab
+ ld a, PRINTNUM_LEADINGZEROS | 2
+ ld b, a
+ ld a, 3
+ ld c, a
+ call PrintNum
+ call CloseSRAM
+ ld a, l
+ ld [wcd52], a
+ ld a, h
+ ld [wcd53], a
+ pop hl
+ ld a, [wcd54]
+ call Function17f50f
+ pop de
+ and a
+ ret
+; 17f3c9
+
+Function17f3c9: ; 17f3c9
+ push bc
+ ld hl, wcd36
+ ld de, $c708
+ ld bc, 12
+ call CopyBytes
+ pop de
+ ld c, $0
+ farcall Function11c075
+ push hl
+ ld hl, $c708
+ ld de, wcd36
+ ld bc, $c
+ call CopyBytes
+ pop bc
+ pop de
+ and a
+ ret
+; 17f3f0
+
+Function17f3f0: ; 17f3f0
+ pop hl
+ push hl
+ ld a, [hli]
+ push af
+ push bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld a, [de]
+ ld c, a
+ ld b, $0
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld e, a
+ ld a, [hli]
+ ld d, a
+ ld hl, UnknBGPals
+ add hl, de
+ ld e, l
+ ld d, h
+ pop hl
+ call PlaceString
+ pop af
+ ld e, a
+ ld d, $0
+ pop hl
+ add hl, de
+ add hl, de
+ inc hl
+ inc hl
+ inc hl
+ ld e, l
+ ld d, h
+ ld l, c
+ ld h, b
+ scf
+ ret
+; 17f41d
+
+Function17f41d: ; 17f41d
+ pop hl
+ ld a, [hli]
+ push hl
+ push af
+ ld l, c
+ ld h, b
+ ld bc, -TileMap + $10000
+ add hl, bc
+ ld de, -SCREEN_WIDTH
+ ld c, $1
+.asm_17f42c
+ ld a, h
+ and a
+ jr nz, .asm_17f435
+ ld a, l
+ cp SCREEN_WIDTH
+ jr c, .asm_17f439
+
+.asm_17f435
+ add hl, de
+ inc c
+ jr .asm_17f42c
+
+.asm_17f439
+ hlcoord 0, 0
+ ld de, SCREEN_WIDTH
+ ld a, c
+.asm_17f440
+ and a
+ jr z, .asm_17f447
+ add hl, de
+ dec a
+ jr .asm_17f440
+
+.asm_17f447
+ pop af
+ ld e, a
+ ld d, 0
+ add hl, de
+ pop de
+ and a
+ ret
+; 17f44f
+
+Function17f44f: ; 17f44f
+ pop hl
+ call Function17f524
+ jr c, .asm_17f46d
+ ld de, $5
+ add hl, de
+ ld a, [hli]
+ inc hl
+ inc hl
+ ld e, l
+ ld d, h
+ ld l, c
+ ld h, b
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [de]
+ cp $50
+ jr z, .asm_17f46b
+ and a
+ ret
+
+.asm_17f46b
+ scf
+ ret
+
+.asm_17f46d
+ push bc
+ ld de, wcd54
+ ld bc, $8
+ call CopyBytes
+ pop bc
+ push hl
+ push bc
+ ld a, [wcd56]
+ cp $c0
+ jr c, .asm_17f488
+ ld a, [wcd54]
+ ld [rSVBK], a
+ jr .asm_17f48e
+
+.asm_17f488
+ ld a, [wcd54]
+ call GetSRAMBank
+
+.asm_17f48e
+ ld a, [wcd55]
+ ld l, a
+ ld a, [wcd56]
+ ld h, a
+ ld de, $c608
+ ld a, [wcd57]
+ ld c, a
+ ld b, $0
+ call CopyBytes
+ ld a, [wcd56]
+ cp $c0
+ jr c, .asm_17f4af
+ ld a, $4
+ ld [rSVBK], a
+ jr .asm_17f4b7
+
+.asm_17f4af
+ call CloseSRAM
+ ld a, $6
+ call GetSRAMBank
+
+.asm_17f4b7
+ ld de, $c608
+ pop hl
+ push hl
+ ld a, [wcd57]
+ ld b, a
+ ld a, [wcd58]
+ ld c, a
+ call MobilePrintNum
+ ld a, l
+ ld [wcd52], a
+ ld a, h
+ ld [wcd53], a
+ ld a, [wcd5a]
+ and a
+ jr z, .asm_17f4ec
+ ld c, a
+ ld a, [wcd58]
+ inc a
+ ld b, a
+ ld e, l
+ ld d, h
+ dec de
+.asm_17f4de
+ ld a, c
+ cp b
+ jr z, .asm_17f4e8
+ ld a, [de]
+ dec de
+ ld [hld], a
+ dec b
+ jr .asm_17f4de
+
+.asm_17f4e8
+ ld a, [wcd5b]
+ ld [hl], a
+
+.asm_17f4ec
+ pop hl
+ ld a, [wcd59]
+ call Function17f50f
+ pop de
+ and a
+ ret
+; 17f4f6
+
+Function17f4f6: ; 17f4f6
+ ld a, [wcd6a]
+ ld l, a
+ ld a, [wcd6b]
+ ld h, a
+ ld a, [wcd47]
+ ld c, a
+ ld a, [BGMapPalBuffer]
+ ld b, a
+ ld a, [wcd2e]
+.asm_17f509
+ and a
+ ret z
+ dec a
+ add hl, bc
+ jr .asm_17f509
+; 17f50f
+
+Function17f50f: ; 17f50f
+ and a
+ jr z, .asm_17f519
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld c, l
+ ld b, h
+ ret
+
+.asm_17f519
+ ld a, [wcd52]
+ ld c, a
+ ld l, a
+ ld a, [wcd53]
+ ld b, a
+ ld h, a
+ ret
+; 17f524
+
+Function17f524: ; 17f524
+ push hl
+ push bc
+ push de
+ ld a, [wcd42]
+ dec a
+ ld b, a
+ ld a, [wcd2e]
+ cp b
+ jr z, .asm_17f53a
+ ld hl, wcd68
+ cp [hl]
+.asm_17f536
+ pop de
+ pop bc
+ pop hl
+ ret
+
+.asm_17f53a
+ scf
+ jr .asm_17f536
+; 17f53d
+
+BattleTowerMobileError: ; 17f53d
+ call FadeToMenu
+ xor a
+ ld [wc303], a
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+
+ call DisplayMobileError
+
+ pop af
+ ld [rSVBK], a
+ call ExitAllMenus
+ ret
+; 17f555
+
+DisplayMobileError: ; 17f555
+.loop
+ call JoyTextDelay
+ call .RunJumptable
+ ld a, [wc303]
+ bit 7, a
+ jr nz, .quit
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
+ jr .loop
+
+.quit
+ call .deinit
+ ret
+
+.deinit
+ ld a, [wc300]
+ cp $22
+ jr z, .asm_17f597
+ cp $31
+ jr z, .asm_17f58a
+ cp $33
+ ret nz
+ ld a, [wc301]
+ cp $1
+ ret nz
+ ld a, [wc302]
+ cp $2
+ ret nz
+ jr .asm_17f5a1
+
+.asm_17f58a
+ ld a, [wc301]
+ cp $3
+ ret nz
+ ld a, [wc302]
+ and a
+ ret nz
+ jr .asm_17f5a1
+
+.asm_17f597
+ ld a, [wc301]
+ and a
+ ret nz
+ ld a, [wc302]
+ and a
+ ret nz
+
+.asm_17f5a1
+ ld a, BANK(sMobileLoginPassword)
+ call GetSRAMBank
+ xor a
+ ld [sMobileLoginPassword], a
+ call CloseSRAM
+ ret
+; 17f5ae
+
+.RunJumptable: ; 17f5ae
+ jumptable .Jumptable, wc303
+; 17f5bd
+
+.Jumptable: ; 17f5bd
+ dw Function17f5c3
+ dw Function17ff23
+ dw Function17f5d2
+; 17f5c3
+
+Function17f5c3: ; 17f5c3
+ call Function17f5e4
+ farcall FinishExitMenu
+ ld a, $1
+ ld [wc303], a
+ ret
+; 17f5d2
+
+Function17f5d2: ; 17f5d2
+ call Function17f5e4
+ farcall HDMATransferAttrMapAndTileMapToWRAMBank3
+ call SetPalettes
+ ld a, $1
+ ld [wc303], a
+ ret
+; 17f5e4
+
+Function17f5e4: ; 17f5e4
+ ld a, $8
+ ld [MusicFade], a
+ ld de, MUSIC_NONE
+ ld a, e
+ ld [MusicFadeID], a
+ ld a, d
+ ld [MusicFadeID + 1], a
+ ld a, " "
+ hlcoord 0, 0
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ call ByteFill
+ ld a, $6
+ hlcoord 0, 0, AttrMap
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
+ call ByteFill
+ hlcoord 2, 1
+ ld b, $1
+ ld c, $e
+ call Function3eea
+ hlcoord 1, 4
+ ld b, $c
+ ld c, $10
+ call Function3eea
+ hlcoord 3, 2
+ ld de, String_17f6dc
+ call PlaceString
+ call Function17ff3c
+ jr nc, .asm_17f632
+ hlcoord 11, 2
+ call Function17f6b7
+
+.asm_17f632
+ ld a, [wc300]
+ cp $d0
+ jr nc, .asm_17f684
+ cp $10
+ jr c, .asm_17f679
+ sub $10
+ cp $24
+ jr nc, .asm_17f679
+ ld e, a
+ ld d, $0
+ ld hl, Table_17f706
+ add hl, de
+ add hl, de
+ ld a, [wc301]
+ ld e, a
+ ld a, [wc302]
+ ld d, a
+ ld a, [hli]
+ ld c, a
+ ld a, [hl]
+ ld h, a
+ ld l, c
+ ld a, [hli]
+ and a
+ jr z, .asm_17f679
+ ld c, a
+.asm_17f65d
+ ld a, [hli]
+ ld b, a
+ ld a, [hli]
+ cp $ff
+ jr nz, .asm_17f667
+ cp b
+ jr z, .asm_17f66e
+
+.asm_17f667
+ xor d
+ jr nz, .asm_17f674
+ ld a, b
+ xor e
+ jr nz, .asm_17f674
+
+.asm_17f66e
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+ jr .asm_17f67d
+
+.asm_17f674
+ inc hl
+ inc hl
+ dec c
+ jr nz, .asm_17f65d
+
+.asm_17f679
+ ld a, $d9
+ jr .asm_17f684
+
+.asm_17f67d
+ hlcoord 2, 6
+ call PlaceString
+ ret
+
+.asm_17f684
+ sub $d0
+ ld e, a
+ ld d, 0
+ ld hl, Table_17f699
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld e, a
+ ld a, [hl]
+ ld d, a
+ hlcoord 2, 6
+ call PlaceString
+ ret
+; 17f699
+
+Table_17f699: ; 17f699
+ dw String_17fedf
+ dw String_17fdd9
+ dw String_17fdd9
+ dw String_17fe03
+ dw String_17fd84
+ dw String_17fe63
+ dw String_17fdb2
+ dw String_17fe4b
+ dw String_17fe03
+ dw String_17fe03
+ dw String_17fe03
+; 17f6af
+
+Palette_17f6af: ; 17f6af
+ RGB 5, 5, 16
+ RGB 8, 19, 28
+ RGB 0, 0, 0
+ RGB 31, 31, 31
+; 17f6b7
+
+Function17f6b7: ; 17f6b7
+ ld a, [wc300]
+ call .bcd_two_digits
+ inc hl
+ ld a, [wc302]
+ and $f
+ call .bcd_digit
+ ld a, [wc301]
+ call .bcd_two_digits
+ ret
+; 17f6cd
+
+.bcd_two_digits ; 17f6cd
+ ld c, a
+ and $f0
+ swap a
+ call .bcd_digit
+ ld a, c
+ and $f
+
+.bcd_digit ; 17f6d8
+ add "0"
+ ld [hli], a
+ ret
+; 17f6dc
+
+String_17f6dc: ; 17f6dc
+ db "つうしんエラー ー@"
+; 17f6e8
+
+String_17f6e8: ; 17f6e8
+ db "みていぎ", $25, "エラーです"
+ next "プログラム", $1f
+ next "かくにん してください"
+ db "@"
+; 17f706
+
+Table_17f706:
+ dw Unknown_17f74e
+ dw Unknown_17f753
+ dw Unknown_17f758
+ dw Unknown_17f75d
+ dw Unknown_17f762
+ dw Unknown_17f767
+ dw Unknown_17f778
+ dw Unknown_17f77d
+ dw Unknown_17f782
+ dw Unknown_17f782
+ dw Unknown_17f782
+ dw Unknown_17f782
+ dw Unknown_17f782
+ dw Unknown_17f782
+ dw Unknown_17f782
+ dw Unknown_17f782
+ dw Unknown_17f782
+ dw Unknown_17f787
+ dw Unknown_17f78c
+ dw Unknown_17f791
+ dw Unknown_17f796
+ dw Unknown_17f79b
+ dw Unknown_17f7a0
+ dw Unknown_17f7a5
+ dw Unknown_17f7a5
+ dw Unknown_17f7a5
+ dw Unknown_17f7a5
+ dw Unknown_17f7a5
+ dw Unknown_17f7a5
+ dw Unknown_17f7a5
+ dw Unknown_17f7a5
+ dw Unknown_17f7a5
+ dw Unknown_17f7a5
+ dw Unknown_17f7ea
+ dw Unknown_17f7ff
+ dw Unknown_17f844
+
+Unknown_17f74e: db 1
+ dbbw $0, $0, String_17f891
+
+Unknown_17f753: db 1
+ dbbw $0, $0, String_17f8d1
+
+Unknown_17f758: db 1
+ dbbw $0, $0, String_17f913
+
+Unknown_17f75d: db 1
+ dbbw $0, $0, String_17f8d1
+
+Unknown_17f762: db 1
+ dbbw $0, $0, String_17fa71
+
+Unknown_17f767: db 4
+ dbbw $0, $0, String_17f946
+ dbbw $1, $0, String_17f946
+ dbbw $2, $0, String_17f946
+ dbbw $3, $0, String_17f946
+
+Unknown_17f778: db 1
+ dbbw $0, $0, String_17f98e
+
+Unknown_17f77d: db 1
+ dbbw $0, $0, String_17f98e
+
+Unknown_17f782: db 1
+ dbbw $0, $0, String_17f98e
+
+Unknown_17f787: db 1
+ dbbw $0, $0, String_17f98e
+
+Unknown_17f78c: db 1
+ dbbw $0, $0, String_17f9d0
+
+Unknown_17f791: db 1
+ dbbw $0, $0, String_17fa14
+
+Unknown_17f796: db 1
+ dbbw $0, $0, String_17fcbf
+
+Unknown_17f79b: db 1
+ dbbw $0, $0, String_17fa71
+
+Unknown_17f7a0: db 1
+ dbbw $0, $0, String_17fbfe
+
+Unknown_17f7a5: db 17
+ dbbw $0, $0, String_17f98e
+ dbbw $21, $2, String_17fcbf
+ dbbw $21, $4, String_17fcbf
+ dbbw $50, $4, String_17faf9
+ dbbw $51, $4, String_17fcbf
+ dbbw $52, $4, String_17fcbf
+ dbbw $0, $5, String_17f98e
+ dbbw $1, $5, String_17f98e
+ dbbw $2, $5, String_17f98e
+ dbbw $3, $5, String_17f98e
+ dbbw $4, $5, String_17f98e
+ dbbw $50, $5, String_17faf9
+ dbbw $51, $5, String_17faf9
+ dbbw $52, $5, String_17fcbf
+ dbbw $53, $5, String_17faf9
+ dbbw $54, $5, String_17fcbf
+ dbbw $ff, $ff, String_17fcbf
+
+Unknown_17f7ea: db 5
+ dbbw $0, $0, String_17f98e
+ dbbw $2, $0, String_17fb2a
+ dbbw $3, $0, String_17fb6e
+ dbbw $4, $0, String_17f98e
+ dbbw $ff, $ff, String_17fcbf
+
+Unknown_17f7ff: db 17
+ dbbw $0, $0, String_17f98e
+ dbbw $1, $3, String_17f98e
+ dbbw $2, $3, String_17f98e
+ dbbw $0, $4, String_17f98e
+ dbbw $1, $4, String_17f98e
+ dbbw $3, $4, String_17fbb6
+ dbbw $4, $4, String_17fbb6
+ dbbw $5, $4, String_17f98e
+ dbbw $6, $4, String_17f98e
+ dbbw $7, $4, String_17f98e
+ dbbw $8, $4, String_17fbfe
+ dbbw $0, $5, String_17fa49
+ dbbw $1, $5, String_17f98e
+ dbbw $2, $5, String_17fa49
+ dbbw $3, $5, String_17fab0
+ dbbw $4, $5, String_17fa49
+ dbbw $ff, $ff, String_17fa49
+
+Unknown_17f844: db 19
+ dbbw $1, $1, String_17fc3e
+ dbbw $2, $1, String_17fc88
+ dbbw $3, $1, String_17fcff
+ dbbw $4, $1, String_17fd84
+ dbbw $5, $1, String_17fd84
+ dbbw $6, $1, String_17fd47
+ dbbw $1, $2, String_17fb6e
+ dbbw $2, $2, String_17f98e
+ dbbw $3, $2, String_17fd84
+ dbbw $4, $2, String_17f98e
+ dbbw $5, $2, String_17fa49
+ dbbw $6, $2, String_17fd84
+ dbbw $99, $2, String_17fc88
+ dbbw $1, $3, String_17fa49
+ dbbw $1, $4, String_17fa49
+ dbbw $2, $4, String_17fa49
+ dbbw $3, $4, String_17fa49
+ dbbw $4, $4, String_17fa49
+ dbbw $ff, $ff, String_17fa49
+
+String_17f891: ; 17f891
+ db "モバイルアダプタが ただしく"
+ next "さしこまれていません"
+ next "とりあつかいせつめいしょを"
+ next "ごらんのうえ しっかりと"
+ next "さしこんで ください"
+ db "@"
+
+String_17f8d1: ; 17f8d1
+ db "でんわが うまく かけられないか"
+ next "でんわかいせんが こんでいるので"
+ next "つうしん できません"
+ next "しばらく まって"
+ next "かけなおして ください"
+ db "@"
+
+String_17f913: ; 17f913
+ db "でんわかいせんが こんでいるため"
+ next "でんわが かけられません"
+ next "しばらく まって"
+ next "かけなおして ください"
+ db "@"
+
+String_17f946: ; 17f946
+ db "モバイルアダプタの エラーです"
+ next "しばらく まって"
+ next "かけなおして ください"
+ next "なおらない ときは"
+ next "モバイルサポートセンターへ"
+ next "おといあわせください"
+ db "@"
+
+String_17f98e: ; 17f98e
+ db "つうしんエラーです"
+ next "しばらく まって"
+ next "かけなおして ください"
+ next "なおらない ときは"
+ next "モバイルサポートセンターへ"
+ next "おといあわせください"
+ db "@"
+
+String_17f9d0: ; 17f9d0
+ db "ログインパスワードか"
+ next "ログイン アイディーに"
+ next "まちがいがあります"
+ next "パスワードを かくにんして"
+ next "しばらく まって"
+ next "かけなおして ください"
+ db "@"
+
+String_17fa14: ; 17fa14
+ db "でんわが きれました"
+ next "とりあつかいせつめいしょを"
+ next "ごらんのうえ"
+ next "しばらく まって"
+ next "かけなおして ください"
+ db "@"
+
+String_17fa49: ; 17fa49
+ db "モバイルセンターの"
+ next "つうしんエラーです"
+ next "しばらくまって"
+ next "かけなおして ください"
+ db "@"
+
+String_17fa71: ; 17fa71
+ db "モバイルアダプタに"
+ next "とうろくされた じょうほうが"
+ next "ただしく ありません"
+ next "モバイルトレーナーで"
+ next "しょきとうろくを してください"
+ db "@"
+
+String_17fab0: ; 17fab0
+ db "モバイルセンターが"
+ next "こんでいて つながりません"
+ next "しばらくまって"
+ next "かけなおして ください"
+ next "くわしくは とりあつかい"
+ next "せつめいしょを ごらんください"
+ db "@"
+
+String_17faf9: ; 17faf9
+ db "あてさき メールアドレスに"
+ next "まちがいがあります"
+ next "ただしい メールアドレスを"
+ next "いれなおしてください"
+ db "@"
+
+String_17fb2a: ; 17fb2a
+ db "メールアドレスに"
+ next "まちがいが あります"
+ next "とりあつかいせつめいしょを"
+ next "ごらんのうえ"
+ next "モバイルトレーナーで"
+ next "しょきとうろくを してください"
+ db "@"
+
+String_17fb6e: ; 17fb6e
+ db "ログインパスワードに"
+ next "まちがいが あるか"
+ next "モバイルセンターの エラーです"
+ next "パスワードを かくにんして"
+ next "しばらく まって"
+ next "かけなおして ください"
+ db "@"
+
+String_17fbb6: ; 17fbb6
+ db "データの よみこみが できません"
+ next "しばらくまって"
+ next "かけなおして ください"
+ next "なおらない ときは"
+ next "モバイルサポートセンターへ"
+ next "おといあわせください"
+ db "@"
+
+String_17fbfe: ; 17fbfe
+ db "じかんぎれです"
+ next "でんわが きれました"
+ next "でんわを かけなおしてください"
+ next "くわしくは とりあつかい"
+ next "せつめいしょを ごらんください"
+ db "@"
+
+String_17fc3e: ; 17fc3e
+ db "ごりよう りょうきんの "
+ next "おしはらいが おくれたばあいには"
+ next "ごりようが できなくなります"
+ next "くわしくは とりあつかい"
+ next "せつめいしょを ごらんください"
+ db "@"
+
+String_17fc88: ; 17fc88
+ db "おきゃくさまの ごつごうにより"
+ next "ごりようできません"
+ next "くわしくは とりあつかい"
+ next "せつめいしょを ごらんください"
+ db "@"
+
+String_17fcbf: ; 17fcbf
+ db "でんわかいせんが こんでいるか"
+ next "モバイルセンターの エラーで"
+ next "つうしんが できません"
+ next "しばらく まって"
+ next "かけなおして ください"
+ db "@"
+
+String_17fcff: ; 17fcff
+ db "ごりよう りょうきんが"
+ next "じょうげんを こえているため"
+ next "こんげつは ごりようできません"
+ next "くわしくは とりあつかい"
+ next "せつめいしょを ごらんください"
+ db "@"
+
+String_17fd47: ; 17fd47
+ db "げんざい モバイルセンターの"
+ next "てんけんを しているので"
+ next "つうしんが できません"
+ next "しばらく まって"
+ next "かけなおして ください"
+ db "@"
+
+String_17fd84: ; 17fd84
+ db "データの よみこみが できません"
+ next "くわしくは とりあつかい"
+ next "せつめいしょを ごらんください"
+ db "@"
+
+
+String_17fdb2: ; 17fdb2
+ db "3ぷん いじょう なにも"
+ next "にゅうりょく しなかったので"
+ next "でんわが きれました"
+ db "@"
+
+String_17fdd9: ; 17fdd9
+ db "つうしんが うまく"
+ next "できませんでした"
+ next "もういちど はじめから"
+ next "やりなおしてください"
+ db "@"
+
+String_17fe03: ; 17fe03
+ db "データの よみこみが できません"
+ next "しばらくまって"
+ next "かけなおして ください"
+ next "なおらない ときは"
+ next "モバイルサポートセンターへ"
+ next "おといあわせください"
+ db "@"
+
+String_17fe4b: ; 17fe4b
+ db "まちじかんが ながいので"
+ next "でんわが きれました"
+ db "@"
+
+String_17fe63: ; 17fe63
+ db "あいての モバイルアダプタと"
+ next "タイプが ちがいます"
+ next "くわしくは とりあつかい"
+ next "せつめいしょを ごらんください"
+ db "@"
+
+String_17fe9a: ; 17fe9a ; unreferenced
+ db "ポケモンニュースが"
+ next "あたらしくなっているので"
+ next "レポートを おくれません"
+ next "あたらしい ポケモンニュースの"
+ next "よみこみを さきに してください"
+ db "@"
+
+String_17fedf: ; 17fedf
+ db "つうしんの じょうきょうが"
+ next "よくないか かけるあいてが"
+ next "まちがっています"
+ next "もういちど かくにんをして"
+ next "でんわを かけなおして ください"
+ db "@"
+; 17ff23
+
+Function17ff23: ; 17ff23
+ ld a, [hJoyPressed]
+ and a
+ ret z
+ ld a, $8
+ ld [MusicFade], a
+ ld a, [wMapMusic]
+ ld [MusicFadeID], a
+ xor a
+ ld [MusicFadeID + 1], a
+ ld hl, wc303
+ set 7, [hl]
+ ret
+; 17ff3c
+
+Function17ff3c: ; 17ff3c
+ nop
+ ld a, [wc300]
+ cp $d0
+ ret c
+ hlcoord 10, 2
+ ld de, String_17ff68
+ call PlaceString
+ ld a, [wc300]
+ push af
+ sub $d0
+ inc a
+ ld [wc300], a
+ hlcoord 14, 2
+ ld de, wc300
+ lb bc, PRINTNUM_LEADINGZEROS | 1, 3
+ call PrintNum
+ pop af
+ ld [wc300], a
+ and a
+ ret
+; 17ff68
+
+String_17ff68: ; 17ff68
+ db "101@"
+; 17ff6c
diff --git a/mobile/mobile_menu.asm b/mobile/mobile_menu.asm
new file mode 100755
index 000000000..468d77fff
--- /dev/null
+++ b/mobile/mobile_menu.asm
@@ -0,0 +1,879 @@
+MainMenu_Mobile: ; 49efc
+ call ClearBGPalettes
+ ld a, MUSIC_MOBILE_ADAPTER_MENU
+ ld [wMapMusic], a
+ ld de, MUSIC_MOBILE_ADAPTER_MENU
+ call Function4a6c5
+Function49f0a: ; 49f0a
+ call ClearBGPalettes
+ call Function4a3a7
+ call Function4a492
+ call ClearBGPalettes
+Function49f16: ; 49f16
+ call MobileMenu_InitMenuBuffers
+ ld c, 12
+ call DelayFrames
+ hlcoord 4, 0
+ ld b, 10
+ ld c, 10
+ call Function48cdc
+ hlcoord 6, 2
+ ld de, MobileString1
+ call PlaceString
+ hlcoord 0, 12
+ ld b, 4
+ ld c, SCREEN_HEIGHT
+ call TextBox
+ xor a
+ ld de, String_0x49fe9
+ hlcoord 1, 14
+ call PlaceString
+ call WaitBGMap2
+ call SetPalettes
+ call StaticMenuJoypad
+ ld hl, wMenuCursorY
+ ld b, [hl]
+ push bc
+ jr .check_buttons
+
+.joy_loop
+ call ScrollingMenuJoypad
+ ld hl, wMenuCursorY
+ ld b, [hl]
+ push bc
+
+.check_buttons
+ bit A_BUTTON_F, a
+ jr nz, .a_button
+ bit B_BUTTON_F, a
+ jr nz, .b_button
+ jr .next
+
+.a_button
+ ld hl, wMenuCursorY
+ ld a, [hl]
+ cp 1
+ jp z, Function4a098
+ cp 2
+ jp z, Function4a0b9
+ cp 3
+ jp z, Function4a0c2
+ cp 4
+ jp z, Function4a100
+ ld a, 1
+ call MenuClickSound
+.b_button
+ pop bc
+ call ClearBGPalettes
+ call ClearTileMap
+ ld a, MUSIC_MAIN_MENU
+ ld [wMapMusic], a
+ ld de, MUSIC_MAIN_MENU
+ call Function4a6c5
+ ret
+
+.next
+ ld hl, wMenuCursorY
+ ld a, [hl]
+ dec a
+ ld hl, MobileStrings2
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 1, 13
+ ld b, 4
+ ld c, SCREEN_HEIGHT
+ call ClearBox
+ hlcoord 1, 14
+ call PlaceString
+ jp .useless_jump
+
+.useless_jump
+ call MobileMenu_InitMenuBuffers
+ pop bc
+ ld hl, wMenuCursorY
+ ld [hl], b
+ ld b, $a
+ ld c, $1
+ hlcoord 5, 1
+ call ClearBox
+ jp .joy_loop
+; 49fcc
+
+
+MobileString1: ; 49fcc
+ db "めいしフ,ルダー"
+ next "あいさつ"
+ next "プロフィール"
+ next "せ", $1e, "い"
+ next "もどる"
+ db "@"
+; 49fe9
+
+
+MobileStrings2:
+
+String_0x49fe9: ; 49fe9
+ db "めいし¯つくったり"
+ next "ほぞんしておける フ,ルダーです@"
+; 4a004
+
+String_0x4a004: ; 4a004
+ db "モバイルたいせんや じぶんのめいしで"
+ next "つかう あいさつ¯つくります@"
+; 4a026
+
+String_0x4a026: ; 4a026
+ db "あなた%じゅうしょや ねんれいの"
+ next "せ", $1e, "い¯かえられます@"
+; 4a042
+
+String_0x4a042: ; 4a042
+ db "モバイルセンター", $1d, "せつぞくするとき"
+ next "ひつような こと¯きめます@"
+; 4a062
+
+String_0x4a062: ; 4a062
+ db "まえ%がめん ", $1d, "もどります"
+ next "@"
+; 4a071
+
+MobileMenu_InitMenuBuffers: ; 4a071 (12:6071)
+ ld hl, w2DMenuCursorInitY
+ ld a, 2
+ ld [hli], a
+ ld a, 5 ; w2DMenuCursorInitX
+ ld [hli], a
+ ld a, 5 ; w2DMenuNumRows
+ ld [hli], a
+ ld a, 1 ; w2DMenuNumCols
+ ld [hli], a
+ ld [hl], $0 ; w2DMenuFlags1
+ set 5, [hl]
+ inc hl
+ xor a ; w2DMenuFlags2
+ ld [hli], a
+ ld a, $20 ; w2DMenuCursorOffsets
+ ld [hli], a
+ ; this is a stupid way to load $c3
+ ld a, A_BUTTON
+ add D_UP
+ add D_DOWN
+ add B_BUTTON
+ ld [hli], a ; wMenuJoypadFilter
+ ld a, 1
+ ld [hli], a ; wMenuCursorY, wMenuCursorX
+ ld [hli], a ; wMenuCursorY, wMenuCursorX
+ ret
+
+Function4a098: ; 4a098 (12:6098)
+ ld a, 2
+ call MenuClickSound
+ call PlaceHollowCursor
+ call WaitBGMap
+ call LoadStandardMenuDataHeader
+ farcall Function89de0
+ call Call_ExitMenu
+ call MG_Mobile_Layout_LoadPals
+ call Function4a485
+ pop bc
+ jp Function49f16
+
+Function4a0b9: ; 4a0b9 (12:60b9)
+ ld a, 2
+ call MenuClickSound
+ pop bc
+ jp Function4a4c4
+
+Function4a0c2: ; 4a0c2 (12:60c2)
+ ld a, 2
+ call MenuClickSound
+ ld a, BANK(sPlayerData)
+ call GetSRAMBank
+ ld hl, sPlayerData + PlayerName - wPlayerData
+ ld de, PlayerName
+ ld bc, NAME_LENGTH_JAPANESE
+ call CopyBytes
+ call CloseSRAM
+ farcall _LoadData
+ ld c, 2
+ call DelayFrames
+ ld c, $1
+ call InitMobileProfile
+ push af
+ call ClearBGPalettes
+ pop af
+ and a
+ jr nz, .skip_save
+ farcall _SaveData
+.skip_save
+ ld c, 5
+ call DelayFrames
+ jr asm_4a111
+
+Function4a100: ; 4a100 (12:6100)
+ ld a, 2
+ call MenuClickSound
+ call ClearBGPalettes
+ call Function4a13b
+ call ClearBGPalettes
+ call ClearTileMap
+
+asm_4a111: ; 4a111 (12:6111)
+ pop bc
+ call LoadFontsExtra
+ jp Function49f0a
+
+Function4a118: ; 4a118 (12:6118)
+ ld hl, w2DMenuCursorInitY
+ ld a, $1
+ ld [hli], a
+ ld a, $d
+ ld [hli], a
+ ld a, $3
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ ld [hl], $0
+ set 5, [hl]
+ inc hl
+ xor a
+ ld [hli], a
+ ld a, $20
+ ld [hli], a
+ ld a, $1
+ add $2
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ ld [hli], a
+ ret
+
+Function4a13b: ; 4a13b (12:613b)
+ call Function4a3a7
+ call Function4a492
+ call Function4a373
+ ld c, 10
+ call DelayFrames
+
+Function4a149: ; 4a149 (12:6149)
+ hlcoord 1, 2
+ ld b, $6
+ ld c, $10
+ call Function48cdc
+ hlcoord 3, 4
+ ld de, String_4a1ef
+ call PlaceString
+ hlcoord 0, 12
+ ld b, $4
+ ld c, $12
+ call TextBox
+ ld a, [wMenuCursorY]
+ dec a
+ ld hl, Strings_4a23d
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 1, 13
+ ld b, $4
+ ld c, $12
+ call ClearBox
+ hlcoord 1, 14
+ call PlaceString
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ call SetPalettes
+ call StaticMenuJoypad
+ ld hl, wMenuCursorY
+ ld b, [hl]
+ push bc
+ jr asm_4a19d
+
+Function4a195: ; 4a195 (12:6195)
+ call ScrollingMenuJoypad
+ ld hl, wMenuCursorY
+ ld b, [hl]
+ push bc
+
+asm_4a19d: ; 4a19d (12:619d)
+ bit 0, a
+ jr nz, .asm_4a1a7
+ bit 1, a
+ jr nz, .asm_4a1ba
+ jr .asm_4a1bc
+.asm_4a1a7
+ ld hl, wMenuCursorY
+ ld a, [hl]
+ cp $1
+ jp z, Function4a20e
+ cp $2
+ jp z, Function4a221
+ ld a, $1
+ call MenuClickSound
+.asm_4a1ba
+ pop bc
+ ret
+.asm_4a1bc
+ ld hl, wMenuCursorY
+ ld a, [hl]
+ dec a
+ ld hl, Strings_4a23d
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 1, 13
+ ld b, $4
+ ld c, $12
+ call ClearBox
+ hlcoord 1, 14
+ call PlaceString
+ jr .asm_4a1db
+.asm_4a1db
+ call Function4a373
+ pop bc
+ ld hl, wMenuCursorY
+ ld [hl], b
+ lb bc, 6, 1
+ hlcoord 2, 3
+ call ClearBox
+ jp Function4a195
+; 4a1ef (12:61ef)
+
+String_4a1ef: ; 4a1ef
+ db "モバイルセンター¯えらぶ"
+ next "ログインパスワード¯いれる"
+ next "もどる@"
+; 4a20e
+
+Function4a20e: ; 4a20e (12:620e)
+ ld a, $1
+ call MenuClickSound
+ farcall Function1719c8
+ call ClearBGPalettes
+ call DelayFrame
+ jr Function4a239
+
+Function4a221: ; 4a221 (12:6221)
+ ld a, $1
+ call MenuClickSound
+ call Function4a28a
+ jr c, Function4a239
+ call Function4a373
+ ld a, $2
+ ld [wMenuCursorY], a
+ jr .asm_4a235
+.asm_4a235
+ pop bc
+ jp Function4a149
+
+Function4a239: ; 4a239 (12:6239)
+ pop bc
+ jp Function4a13b
+; 4a23d (12:623d)
+
+Strings_4a23d: ; 4a23d
+ db "いつも せつぞく¯する"
+ next "モバイルセンター¯えらびます@"
+
+ db "モバイルセンター", $1d, "せつぞくするとき"
+ next "つかうパスワード¯ほぞんできます@"
+
+ db "まえ%がめん ", $1d, "もどります@"
+
+ db "@"
+; 4a28a
+
+Function4a28a: ; 4a28a (12:628a)
+ hlcoord 2, 3
+ lb bc, 6, 1
+ ld a, " "
+ call Function4a6d8
+ call PlaceHollowCursor
+ call WaitBGMap
+ call LoadStandardMenuDataHeader
+ ld a, $5
+ call GetSRAMBank
+ ld a, [$aa4b]
+ call CloseSRAM
+ and a
+ jr z, .asm_4a2df
+ hlcoord 12, 0
+ ld b, $5
+ ld c, $6
+ call Function48cdc
+ hlcoord 14, 1
+ ld de, String_4a34b
+ call PlaceString
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ call Function4a118
+ call ScrollingMenuJoypad
+ push af
+ call PlayClickSFX
+ pop af
+ bit B_BUTTON_F, a
+ jr nz, .quit
+ ld a, [wMenuCursorY]
+ cp $2
+ jr z, .DeleteLoginPassword
+ cp $3
+ jr z, .quit
+.asm_4a2df
+ farcall Function11765d
+ call ClearBGPalettes
+ call Call_ExitMenu
+ call LoadFontsExtra
+ scf
+ ret
+
+.DeleteLoginPassword:
+ call PlaceHollowCursor
+ ld hl, UnknownText_0x4a358
+ call PrintText
+ hlcoord 14, 7
+ ld b, 3
+ ld c, 4
+ call TextBox
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ ld hl, DeletePassword_YesNo_MenuDataHeader
+ call LoadMenuDataHeader
+ call VerticalMenu
+ bit B_BUTTON_F, a
+ jr nz, .dont_delete_password
+ ld a, [wMenuCursorY]
+ cp $2
+ jr z, .dont_delete_password
+ ld a, BANK(sMobileLoginPassword)
+ call GetSRAMBank
+ ld hl, sMobileLoginPassword
+ xor a
+ ld bc, MOBILE_LOGIN_PASSWORD_LENGTH
+ call ByteFill
+ call CloseSRAM
+ ld hl, UnknownText_0x4a35d
+ call PrintText
+ call JoyWaitAorB
+.dont_delete_password
+ call ExitMenu
+.quit
+ call Call_ExitMenu
+ farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap
+ xor a
+ ret
+; 4a346 (12:6346)
+
+MenuDataHeader_0x4a346: ; 0x4a346
+ db $40 ; flags
+ db 00, 12 ; start coords
+ db 06, 19 ; end coords
+
+String_4a34b: ; 4a34b
+ db "いれなおす"
+ next "けす"
+ next "もどる@"
+; 4a358
+
+UnknownText_0x4a358: ; 0x4a358
+ ; Delete the saved LOG-IN PASSWORD?
+ text_jump UnknownText_0x1c5196
+ db "@"
+; 0x4a35d
+
+UnknownText_0x4a35d: ; 0x4a35d
+ ; Deleted the LOG-IN PASSWORD.
+ text_jump UnknownText_0x1c51b9
+ db "@"
+; 0x4a362
+
+DeletePassword_YesNo_MenuDataHeader: ; 0x4a362
+ db $40 ; flags
+ db 07, 14 ; start coords
+ db 11, 19 ; end coords
+ dw MenuData2_0x4a36a
+ db 2 ; default option
+; 0x4a36a
+
+MenuData2_0x4a36a: ; 0x4a36a
+ db $e0 ; flags
+ db 2 ; items
+ db "はい@"
+ db "いいえ@"
+; 0x4a373
+
+Function4a373: ; 4a373 (12:6373)
+ ld hl, w2DMenuCursorInitY
+ ld a, $4
+ ld [hli], a
+ ld a, $2
+ ld [hli], a
+ ld a, $3
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ ld [hl], $0
+ set 5, [hl]
+ inc hl
+ xor a
+ ld [hli], a
+ ld a, $20
+ ld [hli], a
+ ld a, $1
+ add $40
+ add $80
+ add $2
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ ld [hli], a
+ ret
+; 4a39a (12:639a)
+
+Function4a39a: ; 4a39a
+ call Function4a485
+ call Function4a492
+ call Function4a3aa
+ call SetPalettes
+ ret
+; 4a3a7
+
+Function4a3a7: ; 4a3a7 (12:63a7)
+ call Function4a485
+Function4a3aa: ; 4a3aa
+ hlcoord 0, 0
+ lb bc, 3, 1
+ xor a
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, $1
+ call Function4a6d8
+ lb bc, 1, 1
+ xor a
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, $1
+ call Function4a6d8
+ lb bc, 4, 1
+ ld a, $2
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, $3
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, " "
+ call Function4a6d8
+ hlcoord 1, 0
+ ld a, $1
+ lb bc, 3, 18
+ call Function4a6d8
+ lb bc, 1, 18
+ ld a, $0
+ call Function4a6d8
+ lb bc, 1, 18
+ ld a, $1
+ call Function4a6d8
+ lb bc, 1, 18
+ ld a, $2
+ call Function4a6d8
+ lb bc, 11, 18
+ ld a, " "
+ call Function4a6d8
+ hlcoord 19, 0
+ lb bc, 3, 1
+ ld a, $0
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, $1
+ call Function4a6d8
+ lb bc, 1, 1
+ xor a
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, $1
+ call Function4a6d8
+ lb bc, 4, 1
+ ld a, $2
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, $3
+ call Function4a6d8
+ lb bc, 1, 1
+ ld a, " "
+ call Function4a6d8
+ ret
+; 4a449 (12:6449)
+
+Function4a449: ; 4a449
+ ld bc, 3 * SCREEN_WIDTH
+ ld a, $0
+ hlcoord 0, 0
+ call ByteFill
+ ld bc, 2 * SCREEN_WIDTH
+ ld a, $1
+ call ByteFill
+ ld bc, 2 * SCREEN_WIDTH
+ ld a, $0
+ call ByteFill
+ ld bc, 2 * SCREEN_WIDTH
+ ld a, $1
+ call ByteFill
+ ld bc, SCREEN_WIDTH
+ ld a, $2
+ call ByteFill
+ ld bc, SCREEN_WIDTH
+ ld a, $3
+ call ByteFill
+ ld bc, SCREEN_WIDTH
+ ld a, " "
+ call ByteFill
+ ret
+; 4a485
+
+Function4a485: ; 4a485 (12:6485)
+ ld de, GFX_49c0c
+ ld hl, VTiles2 tile $00
+ lb bc, BANK(GFX_49c0c), 13
+ call Get2bpp
+ ret
+
+Function4a492: ; 4a492 (12:6492)
+ call MG_Mobile_Layout00
+ ret
+
+
+MainMenu_MobileStudium: ; 4a496
+ ld a, [StartDay]
+ ld b, a
+ ld a, [StartHour]
+ ld c, a
+ ld a, [StartMinute]
+ ld d, a
+ ld a, [StartSecond]
+ ld e, a
+ push bc
+ push de
+ farcall MobileStudium
+ call ClearBGPalettes
+ pop de
+ pop bc
+ ld a, b
+ ld [StartDay], a
+ ld a, c
+ ld [StartHour], a
+ ld a, d
+ ld [StartMinute], a
+ ld a, e
+ ld [StartSecond], a
+ ret
+; 4a4c4
+
+
+Function4a4c4: ; 4a4c4 (12:64c4)
+ call ClearBGPalettes
+ call Function4a3a7
+ call Function4a492
+ call Function4a680
+ call ClearBGPalettes
+ ld c, 20
+ call DelayFrames
+ hlcoord 2, 0
+ ld b, $a
+ ld c, $e
+ call Function48cdc
+ hlcoord 4, 2
+ ld de, String_4a5c5
+ call PlaceString
+ hlcoord 4, 4
+ ld de, String_4a5cd
+ call PlaceString
+ hlcoord 4, 6
+ ld de, String_4a5da
+ call PlaceString
+ hlcoord 4, 8
+ ld de, String_4a5e6
+ call PlaceString
+ hlcoord 4, 10
+ ld de, String_4a5f2
+ call PlaceString
+ hlcoord 0, 12
+ ld b, $4
+ ld c, $12
+ call TextBox
+ xor a
+ ld hl, Strings_4a5f6
+ ld d, h
+ ld e, l
+ hlcoord 1, 14
+ call PlaceString
+ ld a, $1
+ ld hl, Strings_4a5f6
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 1, 16
+ call PlaceString
+ call WaitBGMap2
+ call SetPalettes
+ call StaticMenuJoypad
+ ld hl, wMenuCursorY
+ ld b, [hl]
+ push bc
+ jr asm_4a54d
+
+Function4a545: ; 4a545 (12:6545)
+ call ScrollingMenuJoypad
+ ld hl, wMenuCursorY
+ ld b, [hl]
+ push bc
+
+asm_4a54d: ; 4a54d (12:654d)
+ bit 0, a
+ jr nz, .asm_4a557
+ bit 1, a
+ jr nz, .asm_4a574
+ jr .asm_4a57e
+.asm_4a557
+ ld hl, wMenuCursorY
+ ld a, [hl]
+ cp $1
+ jp z, Function4a6ab
+ cp $2
+ jp z, Function4a6ab
+ cp $3
+ jp z, Function4a6ab
+ cp $4
+ jp z, Function4a6ab
+ ld a, $1
+ call MenuClickSound
+.asm_4a574
+ pop bc
+ call ClearBGPalettes
+ call ClearTileMap
+ jp Function49f0a
+.asm_4a57e
+ ld hl, wMenuCursorY
+ ld a, [hl]
+ dec a
+ add a
+ push af
+ ld hl, Strings_4a5f6
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 1, 13
+ ld b, $4
+ ld c, $12
+ call ClearBox
+ hlcoord 1, 14
+ call PlaceString
+ pop af
+ inc a
+ ld hl, Strings_4a5f6
+ call GetNthString
+ ld d, h
+ ld e, l
+ hlcoord 1, 16
+ call PlaceString
+ jp Function4a5b0
+
+Function4a5b0: ; 4a5b0 (12:65b0)
+ call Function4a680
+ pop bc
+ ld hl, wMenuCursorY
+ ld [hl], b
+ ld b, $a
+ ld c, $1
+ hlcoord 3, 1
+ call ClearBox
+ jp Function4a545
+; 4a5c5 (12:65c5)
+
+String_4a5c5: ; 4a5c5
+ db "じこしょうかい@"
+String_4a5cd: ; 4a5cd
+ db "たいせん ", $4a, "はじまるとき@"
+String_4a5da: ; 4a5da
+ db "たいせん ", $1d, "かったとき@"
+String_4a5e6: ; 4a5e6
+ db "たいせん ", $1d, "まけたとき@"
+String_4a5f2: ; 4a5f2
+ db "もどる@"
+; 4a5f6
+
+Strings_4a5f6: ; 4a5f6
+ db "めいし や ニュース ", $1d, "のせる@"
+ db "あなた%あいさつです@"
+ db "モバイル たいせん", $4a, "はじまるとき@"
+ db "あいて", $1d, "みえる あいさつです@"
+ db "モバイル たいせんで かったとき@"
+ db "あいて", $1d, "みえる あいさつです@"
+ db "モバイル たいせんで まけたとき@"
+ db "あいて", $1d, "みえる あいさつです@"
+ db "まえ%がめん ", $1d, "もどります@"
+ db "@"
+; 4a680
+
+Function4a680: ; 4a680 (12:6680)
+ ld hl, w2DMenuCursorInitY
+ ld a, $2
+ ld [hli], a
+ ld a, $3
+ ld [hli], a
+ ld a, $5
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ ld [hl], $0
+ set 5, [hl]
+ inc hl
+ xor a
+ ld [hli], a
+ ld a, $20
+ ld [hli], a
+ ld a, $1
+ add $40
+ add $80
+ add $2
+ ld [hli], a
+ ld a, $1
+ ld [hli], a
+ ld [hli], a
+ xor a
+ ld [hli], a
+ ld [hli], a
+ ld [hli], a
+ ret
+
+Function4a6ab: ; 4a6ab (12:66ab)
+ ld a, $2
+ call MenuClickSound
+ call ClearBGPalettes
+ ld b, SCGB_DIPLOMA
+ call GetSGBLayout
+ farcall Function11c1ab
+ pop bc
+ call LoadFontsExtra
+ jp Function4a4c4
+
+Function4a6c5: ; 4a6c5 (12:66c5)
+ ld a, $5
+ ld [MusicFade], a
+ ld a, e
+ ld [MusicFadeID], a
+ ld a, d
+ ld [MusicFadeID + 1], a
+ ld c, 22
+ call DelayFrames
+ ret
+
+Function4a6d8: ; 4a6d8 (12:66d8)
+ push bc
+ push hl
+.asm_4a6da
+ ld [hli], a
+ dec c
+ jr nz, .asm_4a6da
+ pop hl
+ ld bc, SCREEN_WIDTH
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, Function4a6d8
+ ret
diff --git a/mobile/news/news.asm b/mobile/news/news.asm
new file mode 100644
index 000000000..b95df06aa
--- /dev/null
+++ b/mobile/news/news.asm
@@ -0,0 +1,44 @@
+; http://forums.glitchcity.info/index.php?topic=7509.msg206449#msg206449
+
+ db $cc, $6b, $1e ; XXX
+
+Function1f4003: ; 1f4003
+; XXX
+ ld a, $6
+ call GetSRAMBank
+ ld hl, .news_data
+ ld de, $a000
+ ld bc, $1000
+ call CopyBytes
+ call CloseSRAM
+ ret
+
+.news_data
+INCBIN "mobile/news/news_1.bin"
+
+Function1f4dbe: ; 1f4dbe
+; XXX
+ ld a, $6
+ call GetSRAMBank
+ ld hl, .news_data
+ ld de, $a000
+ ld bc, $1000
+ call CopyBytes
+ call CloseSRAM
+ ret
+
+.news_data
+INCBIN "mobile/news/news_2.bin"
+
+Function1f5d9f: ; 1f5d9f
+ ld a, $6
+ call GetSRAMBank
+ ld hl, .news_data
+ ld de, $a000
+ ld bc, $1000
+ call CopyBytes
+ call CloseSRAM
+ ret
+
+.news_data
+INCBIN "mobile/news/news_3.bin"
diff --git a/unknown/1f4018.bin b/mobile/news/news_1.bin
index aa8c73e78..aa8c73e78 100644
--- a/unknown/1f4018.bin
+++ b/mobile/news/news_1.bin
Binary files differ
diff --git a/unknown/1f4dd3.bin b/mobile/news/news_2.bin
index 511d62cb7..511d62cb7 100644
--- a/unknown/1f4dd3.bin
+++ b/mobile/news/news_2.bin
Binary files differ
diff --git a/unknown/1f5db4.bin b/mobile/news/news_3.bin
index f4adbc0db..f4adbc0db 100644
--- a/unknown/1f5db4.bin
+++ b/mobile/news/news_3.bin
Binary files differ
diff --git a/mobile/print_opp_message.asm b/mobile/print_opp_message.asm
new file mode 100644
index 000000000..612a1b78d
--- /dev/null
+++ b/mobile/print_opp_message.asm
@@ -0,0 +1,30 @@
+Mobile_PrintOpponentBattleMessage: ; 4ea0a
+ ld a, c
+ push af
+ call SpeechTextBox
+ call MobileTextBorder
+ pop af
+ dec a
+ ld bc, $c
+ ld hl, w5_MobileOpponentBattleMessages
+ call AddNTimes
+ ld de, wMobileOpponentBattleMessage
+ ld bc, $c
+ ld a, $5 ; BANK(w5_MobileOpponentBattleMessages)
+ call FarCopyWRAM
+
+ ld a, [rSVBK]
+ push af
+ ld a, $1
+ ld [rSVBK], a
+
+ ld bc, wMobileOpponentBattleMessage
+ decoord 1, 14
+ farcall PrintEZChatBattleMessage
+
+ pop af
+ ld [rSVBK], a
+
+ ld c, 180
+ call DelayFrames
+ ret
diff --git a/misc/stadium2_1.bin b/mobile/stadium/stadium2_1.bin
index 155e8bab8..155e8bab8 100644
--- a/misc/stadium2_1.bin
+++ b/mobile/stadium/stadium2_1.bin
Binary files differ
diff --git a/misc/stadium2_2.bin b/mobile/stadium/stadium2_2.bin
index 2273d94f3..2273d94f3 100644
--- a/misc/stadium2_2.bin
+++ b/mobile/stadium/stadium2_2.bin
Binary files differ
diff --git a/pokecrystal.link b/pokecrystal.link
index 9bd693e0f..6002adbf5 100644
--- a/pokecrystal.link
+++ b/pokecrystal.link
@@ -45,7 +45,7 @@ ROMX $07
"Tileset Data 2"
"Extra Songs 1"
ROMX $08
- "bank8"
+ "Clock Reset"
"Tileset Data 3"
"Egg Moves"
ROMX $09
@@ -82,7 +82,7 @@ ROMX $17
ROMX $18
"Map Scripts 4"
ROMX $19
- "bank19"
+ "Crystal Phone Text"
ROMX $1a
"Map Scripts 5"
ROMX $1b
@@ -129,9 +129,9 @@ ROMX $2e
ROMX $2f
"bank2F"
ROMX $30
- "bank30"
+ "Sprites 1"
ROMX $31
- "bank31"
+ "Sprites 2"
ROMX $32
"bank32"
ROMX $33
@@ -142,7 +142,7 @@ ROMX $34
ROMX $35
"Pic Animations 2"
ROMX $36
- "bank36"
+ "Font Inversed"
"Pic Animations 3"
ROMX $37
"Tileset Data 6"
@@ -166,16 +166,15 @@ ROMX $3e
ROMX $3f
"bank3F"
ROMX $40
- "bank40"
+ "mobile_40"
"tetsuji"
"bank40_2"
"ascii 10186f"
"bank40_3"
ROMX $41
"bank41"
- "bank41_2"
ROMX $42
- "bank42"
+ "mobile_42"
"Intro Logo"
"Credits"
ROMX $43
@@ -189,11 +188,13 @@ ROMX $46
"bank46"
"bank46_2"
ROMX $47
- "bank47"
+ "battle_tower_47"
ROMX $48
+ org $4000
"Pic Pointers"
"Pics 1"
ROMX $49
+ org $4000
"Unown Pic Pointers"
"Pics 2"
ROMX $4a
@@ -234,14 +235,14 @@ ROMX $5a
ROMX $5b
"bank5B"
ROMX $5c
- "bank5C"
+ "mobile_5c"
ROMX $5d
- "bank5D"
+ "Crystal Phone Text 2"
ROMX $5e
"bank5E"
"Songs 5"
"Crystal Sound Effects"
- "Misc Crystal"
+ "mobile_5e"
ROMX $5f
"bank5F"
ROMX $60
@@ -273,7 +274,7 @@ ROMX $6c
"Common Text 1"
"Map Scripts 25"
ROMX $6d
- "bank6D"
+ "Special Phone Text"
ROMX $6e
"Pokedex Entries 065-128"
ROMX $6f
@@ -295,17 +296,17 @@ ROMX $77
ROMX $78
"Tileset Data 8"
ROMX $7b
- "bank7B"
+ "Battle Tower Text"
ROMX $7c
- "bank7C"
+ "Battle Tower Trainer Data"
ROMX $7d
- "bank7D"
+ "Mobile News Data"
ROMX $7e
"bank7E"
ROMX $7f
"bank7F"
org $7de0
- "stadium2"
+ "Mobile Stadium 2"
WRAM0
"Stack"
"Audio RAM"
@@ -330,11 +331,11 @@ WRAMX 5
org $d300
"Battle Animations"
org $d800
- "WRAM 5 MOBILE"
+ "Mobile RAM"
WRAMX 6
- "WRAM 6"
+ "Scratch RAM"
WRAMX 7
- "WRAM 7"
+ "Stack RAM"
VRAM $00
"VRAM0"
VRAM $01
diff --git a/predef/cgb.asm b/predef/cgb.asm
deleted file mode 100644
index 5ac243963..000000000
--- a/predef/cgb.asm
+++ /dev/null
@@ -1,1121 +0,0 @@
-; Replaces the functionality of sgb.asm to work with CGB hardware.
-
-CheckCGB: ; 8d55
- ld a, [hCGB]
- and a
- ret
-; 8d59
-
-Predef_LoadSGBLayoutCGB: ; 8d59
- ld a, b
- cp SCGB_RAM
- jr nz, .not_ram
- ld a, [SGBPredef]
-.not_ram
- cp SCGB_PARTY_MENU_HP_PALS
- jp z, CGB_ApplyPartyMenuHPPals
- call ResetBGPals
- ld l, a
- ld h, 0
- add hl, hl
- ld de, .dw
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, .ReturnFromJumpTable
- push de
- jp hl
-; 8d79
-
-.ReturnFromJumpTable: ; 8d79
- ret
-; 8d7a
-
-.dw ; 8d7a
- dw _CGB_BattleGrayscale
- dw _CGB_BattleColors
- dw _CGB_PokegearPals
- dw _CGB_StatsScreenHPPals
- dw _CGB_Pokedex
- dw _CGB_SlotMachine
- dw _CGB06
- dw _CGB07
- dw _CGB_Diploma
- dw _CGB_MapPals
- dw _CGB_PartyMenu
- dw _CGB_Evolution
- dw _CGB0c
- dw _CGB0d
- dw _CGB_MoveList
- dw _CGB0f
- dw _CGB_PokedexSearchOption
- dw _CGB11
- dw _CGB_Pokepic
- dw _CGB13
- dw _CGB_PackPals
- dw _CGB_TrainerCard
- dw _CGB_PokedexUnownMode
- dw _CGB_BillsPC
- dw _CGB_UnownPuzzle
- dw _CGB_GamefreakLogo ; called before copyright
- dw _CGB_PlayerOrMonFrontpicPals
- dw _CGB_TradeTube
- dw _CGB_TrainerOrMonFrontpicPals
- dw _CGB_MysteryGift
- dw _CGB1e
-; 8db8
-
-_CGB_BattleGrayscale: ; 8db8
- ld hl, PalPacket_9c66 + 1
- ld de, UnknBGPals
- ld c, $4
- call CopyPalettes
- ld hl, PalPacket_9c66 + 1
- ld de, UnknBGPals + 4 palettes
- ld c, $4
- call CopyPalettes
- ld hl, PalPacket_9c66 + 1
- ld de, UnknOBPals
- ld c, $2
- call CopyPalettes
- jr _CGB_FinishBattleScreenLayout
-
-_CGB_BattleColors: ; 8ddb
- ld de, UnknBGPals
- call GetBattlemonBackpicPalettePointer
- push hl
- call LoadPalette_White_Col1_Col2_Black
- call GetEnemyFrontpicPalettePointer
- push hl
- call LoadPalette_White_Col1_Col2_Black
- ld a, [EnemyHPPal]
- ld l, a
- ld h, $0
- add hl, hl
- add hl, hl
- ld bc, Palettes_a8be
- add hl, bc
- call LoadPalette_White_Col1_Col2_Black
- ld a, [PlayerHPPal]
- ld l, a
- ld h, $0
- add hl, hl
- add hl, hl
- ld bc, Palettes_a8be
- add hl, bc
- call LoadPalette_White_Col1_Col2_Black
- ld hl, Palettes_a8ca
- call LoadPalette_White_Col1_Col2_Black
- ld de, UnknOBPals
- pop hl
- call LoadPalette_White_Col1_Col2_Black
- pop hl
- call LoadPalette_White_Col1_Col2_Black
- ld a, SCGB_BATTLE_COLORS
- ld [SGBPredef], a
- call ApplyPals
-_CGB_FinishBattleScreenLayout: ; 8e23
- call InitPartyMenuBGPal7
- hlcoord 0, 0, AttrMap
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- ld a, $2
- call ByteFill
- hlcoord 0, 4, AttrMap
- lb bc, 8, 10
- ld a, $0
- call FillBoxCGB
- hlcoord 10, 0, AttrMap
- lb bc, 7, 10
- ld a, $1
- call FillBoxCGB
- hlcoord 0, 0, AttrMap
- lb bc, 4, 10
- ld a, $2
- call FillBoxCGB
- hlcoord 10, 7, AttrMap
- lb bc, 5, 10
- ld a, $3
- call FillBoxCGB
- hlcoord 10, 11, AttrMap
- lb bc, 1, 9
- ld a, $4
- call FillBoxCGB
- hlcoord 0, 12, AttrMap
- ld bc, 6 * SCREEN_WIDTH
- ld a, $7
- call ByteFill
- ld hl, Palettes_979c
- ld de, UnknOBPals + 2 palettes
- ld bc, 6 palettes
- ld a, $5
- call FarCopyWRAM
- call ApplyAttrMap
- ret
-; 8e85
-
-
-InitPartyMenuBGPal7: ; 8e85
- callba Function100dc0
-Mobile_InitPartyMenuBGPal7: ; 8e8b
- ld hl, Palette_b311
- jr nc, .not_mobile
- ld hl, Palette_b309
-.not_mobile
- ld de, UnknBGPals + 8 * 7
- ld bc, 1 palettes
- ld a, $5
- call FarCopyWRAM
- ret
-; 8e9f
-
-InitPartyMenuBGPal0: ; 8e9f
- callba Function100dc0
- ld hl, Palette_b311
- jr nc, .not_mobile
- ld hl, Palette_b309
-.not_mobile
- ld de, UnknBGPals
- ld bc, 1 palettes
- ld a, $5
- call FarCopyWRAM
- ret
-; 8eb9
-
-_CGB_PokegearPals: ; 8eb9
- ld a, [PlayerGender]
- bit 0, a
- jr z, .male
- ld hl, FemalePokegearPals
- jr .got_pals
-
-.male
- ld hl, MalePokegearPals
-.got_pals
- ld de, UnknBGPals
- ld bc, 6 palettes
- ld a, $5
- call FarCopyWRAM
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 8edb
-
-_CGB_StatsScreenHPPals: ; 8edb
- ld de, UnknBGPals
- ld a, [wcda1]
- ld l, a
- ld h, $0
- add hl, hl
- add hl, hl
- ld bc, Palettes_a8be
- add hl, bc
- call LoadPalette_White_Col1_Col2_Black
- ld a, [CurPartySpecies]
- ld bc, TempMonDVs
- call GetPlayerOrMonPalettePointer
- call LoadPalette_White_Col1_Col2_Black
- ld hl, Palettes_a8ca
- call LoadPalette_White_Col1_Col2_Black
- ld hl, Palette8f52
- ld de, UnknBGPals + 8 * 3
- ld bc, 3 palettes
- ld a, $5
- call FarCopyWRAM
- call WipeAttrMap
-
- hlcoord 0, 0, AttrMap
- lb bc, 8, SCREEN_WIDTH
- ld a, $1
- call FillBoxCGB
-
- hlcoord 10, 16, AttrMap
- ld bc, 10
- ld a, $2
- call ByteFill
-
- hlcoord 13, 5, AttrMap
- lb bc, 2, 2
- ld a, $3
- call FillBoxCGB
-
- hlcoord 15, 5, AttrMap
- lb bc, 2, 2
- ld a, $4
- call FillBoxCGB
-
- hlcoord 17, 5, AttrMap
- lb bc, 2, 2
- ld a, $5
- call FillBoxCGB
-
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 8f52
-
-Palette8f52: ; 8f52
- RGB 31, 31, 31
- RGB 31, 19, 31
- RGB 31, 15, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 21, 31, 14
- RGB 17, 31, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 17, 31, 31
- RGB 17, 31, 31
- RGB 00, 00, 00
-; 8f6a
-
-StatsScreenPals: ; 8f6a
- RGB 31, 19, 31
-
- RGB 21, 31, 14
-
- RGB 17, 31, 31
-; 8f70
-
-_CGB_Pokedex: ; 8f70
- ld de, UnknBGPals
- ld a, $1d
- call GetPredefPal
- call LoadHLPaletteIntoDE
- ld a, [CurPartySpecies]
- cp $ff
- jr nz, .is_pokemon
- ld hl, Palette8fba
- call LoadHLPaletteIntoDE
- jr .got_palette
-
-.is_pokemon
- call GetMonPalettePointer_
- call LoadPalette_White_Col1_Col2_Black
-.got_palette
- call WipeAttrMap
- hlcoord 1, 1, AttrMap
- lb bc, 7, 7
- ld a, $1
- call FillBoxCGB
- call InitPartyMenuOBPals
- ld hl, Palette8fc2
- ld de, UnknOBPals + 7 palettes
- ld bc, 1 palettes
- ld a, $5
- call FarCopyWRAM
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 8fba
-
-Palette8fba: ; 8fba
- RGB 11, 23, 00
- RGB 07, 17, 00
- RGB 06, 16, 03
- RGB 05, 12, 01
-
-Palette8fc2: ; 8fc2
- RGB 00, 00, 00
- RGB 11, 23, 00
- RGB 07, 17, 00
- RGB 00, 00, 00
-; 8fca
-
-_CGB_BillsPC: ; 8fca
- ld de, UnknBGPals
- ld a, $1d
- call GetPredefPal
- call LoadHLPaletteIntoDE
- ld a, [CurPartySpecies]
- cp $ff
- jr nz, .GetMonPalette
- ld hl, Palette9036
- call LoadHLPaletteIntoDE
- jr .Resume
-
-.GetMonPalette:
- ld bc, TempMonDVs
- call GetPlayerOrMonPalettePointer
- call LoadPalette_White_Col1_Col2_Black
-.Resume:
- call WipeAttrMap
- hlcoord 1, 4, AttrMap
- lb bc, 7, 7
- ld a, $1
- call FillBoxCGB
- call InitPartyMenuOBPals
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 9009
-
-Function9009: ; 9009
- ld hl, Palette9036
- call LoadHLPaletteIntoDE
- jr .asm_901a
-
-.unused
- ld bc, TempMonDVs
- call GetPlayerOrMonPalettePointer
- call LoadPalette_White_Col1_Col2_Black
-.asm_901a
- call WipeAttrMap
- hlcoord 1, 1, AttrMap
- lb bc, 7, 7
- ld a, $1
- call FillBoxCGB
- call InitPartyMenuOBPals
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 9036
-
-Palette9036: ; 9036
- RGB 31, 15, 00
- RGB 23, 12, 00
- RGB 15, 07, 00
- RGB 00, 00, 00
-; 903e
-
-_CGB_PokedexUnownMode: ; 903e
- ld de, UnknBGPals
- ld a, $1d
- call GetPredefPal
- call LoadHLPaletteIntoDE
- ld a, [CurPartySpecies]
- call GetMonPalettePointer_
- call LoadPalette_White_Col1_Col2_Black
- call WipeAttrMap
- hlcoord 7, 5, AttrMap
- lb bc, 7, 7
- ld a, $1
- call FillBoxCGB
- call InitPartyMenuOBPals
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 906e
-
-_CGB_SlotMachine: ; 906e
- ld hl, Palettes_b7a9
- ld de, UnknBGPals
- ld bc, $80
- ld a, $5
- call FarCopyWRAM
- call WipeAttrMap
- hlcoord 0, 2, AttrMap
- lb bc, 10, 3
- ld a, $2
- call FillBoxCGB
- hlcoord 17, 2, AttrMap
- lb bc, 10, 3
- ld a, $2
- call FillBoxCGB
- hlcoord 0, 4, AttrMap
- lb bc, 6, 3
- ld a, $3
- call FillBoxCGB
- hlcoord 17, 4, AttrMap
- lb bc, 6, 3
- ld a, $3
- call FillBoxCGB
- hlcoord 0, 6, AttrMap
- lb bc, 2, 3
- ld a, $4
- call FillBoxCGB
- hlcoord 17, 6, AttrMap
- lb bc, 2, 3
- ld a, $4
- call FillBoxCGB
- hlcoord 4, 2, AttrMap
- lb bc, 2, 12
- ld a, $1
- call FillBoxCGB
- hlcoord 3, 2, AttrMap
- lb bc, 10, 1
- ld a, $1
- call FillBoxCGB
- hlcoord 16, 2, AttrMap
- lb bc, 10, 1
- ld a, $1
- call FillBoxCGB
- hlcoord 0, 12, AttrMap
- ld bc, $78
- ld a, $7
- call ByteFill
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 90f8
-
-_CGB06: ; 90f8
- ld hl, PalPacket_9ca6 + 1
- call CopyFourPalettes
- call WipeAttrMap
- ld de, UnknOBPals
- ld a, $3c
- call GetPredefPal
- call LoadHLPaletteIntoDE
- hlcoord 0, 6, AttrMap
- lb bc, 12, SCREEN_WIDTH
- ld a, $1
- call FillBoxCGB
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 9122
-
-_CGB07: ; 9122
- ld b, 0
- ld hl, Jumptable_912d
- add hl, bc
- add hl, bc
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp hl
-; 912d
-
-Jumptable_912d: ; 912d
- dw Function9133
- dw Function9166
- dw Function9180
-; 9133
-
-Function9133: ; 9133
- ld hl, Palette_914e
- ld de, UnknBGPals
- call LoadHLPaletteIntoDE
- ld hl, Palette_9156
- ld de, UnknOBPals
- ld bc, 2 palettes
- ld a, $5
- call FarCopyWRAM
- call WipeAttrMap
- ret
-; 914e
-
-Palette_914e: ; 914e
- RGB 19, 31, 19
- RGB 18, 23, 31
- RGB 11, 21, 28
- RGB 04, 16, 24
-
-Palette_9156: ; 9156
- RGB 29, 29, 29
- RGB 20, 19, 20
- RGB 19, 06, 04
- RGB 03, 04, 06
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 31, 00, 00
- RGB 03, 04, 06
-; 9166
-
-Function9166: ; 9166
- ld de, UnknBGPals
- ld a, $38
- call GetPredefPal
- call LoadHLPaletteIntoDE
-
- ld de, UnknOBPals
- ld a, $39
- call GetPredefPal
- call LoadHLPaletteIntoDE
- call WipeAttrMap
- ret
-; 9180
-
-Function9180: ; 9180
- ld hl, PalPacket_9c36 + 1
- call CopyFourPalettes
- ld de, UnknOBPals
- ld a, $3a
- call GetPredefPal
- call LoadHLPaletteIntoDE
- call WipeAttrMap
- ret
-; 9195
-
-_CGB11: ; 9195
- ld hl, Palettes_b789
- ld de, UnknBGPals
- ld bc, 5 palettes
- ld a, $5
- call FarCopyWRAM
- call ApplyPals
- call WipeAttrMap
- call ApplyAttrMap
- ret
-; 91ad
-
-_CGB_Diploma: ; 91ad
- ld hl, DiplomaPalettes
- ld de, UnknBGPals
- ld bc, 16 palettes
- ld a, $5
- call FarCopyWRAM
-
- ld hl, PalPacket_9cb6 + 1
- call CopyFourPalettes
- call WipeAttrMap
- call ApplyAttrMap
- ret
-; 91c8
-
-_CGB_MapPals: ; 91c8
- call LoadMapPals
- ld a, SCGB_MAPPALS
- ld [SGBPredef], a
- ret
-; 91d1
-
-_CGB_PartyMenu: ; 91d1
- ld hl, PalPacket_9c56 + 1
- call CopyFourPalettes
- call InitPartyMenuBGPal0
- call InitPartyMenuBGPal7
- call InitPartyMenuOBPals
- call ApplyAttrMap
- ret
-; 91e4
-
-_CGB_Evolution: ; 91e4
- ld de, UnknBGPals
- ld a, c
- and a
- jr z, .pokemon
- ld a, $1a
- call GetPredefPal
- call LoadHLPaletteIntoDE
- jr .got_palette
-
-.pokemon
- ld hl, PartyMon1DVs
- ld bc, PARTYMON_STRUCT_LENGTH
- ld a, [CurPartyMon]
- call AddNTimes
- ld c, l
- ld b, h
- ld a, [PlayerHPPal]
- call GetPlayerOrMonPalettePointer
- call LoadPalette_White_Col1_Col2_Black
- ld hl, Palettes_979c
- ld de, UnknOBPals + 2 palettes
- ld bc, 6 palettes
- ld a, $5
- call FarCopyWRAM
-
-.got_palette
- call WipeAttrMap
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 9228
-
-_CGB0c: ; 9228
- ld hl, Palettes_b6f1
- ld de, UnknBGPals
- ld bc, 5 palettes
- ld a, $5
- call FarCopyWRAM
- ld hl, Palettes_b719
- ld de, UnknOBPals
- ld bc, 2 palettes
- ld a, $5
- call FarCopyWRAM
- ld a, SCGB_DIPLOMA
- ld [SGBPredef], a
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 9251
-
-_CGB0d: ; 9251
- ld hl, PalPacket_9cb6 + 1
- call CopyFourPalettes
- call WipeAttrMap
- call ApplyAttrMap
- ret
-; 925e
-
-_CGB_UnownPuzzle: ; 925e
- ld hl, PalPacket_9bc6 + 1
- call CopyFourPalettes
- ld de, UnknOBPals
- ld a, $4c
- call GetPredefPal
- call LoadHLPaletteIntoDE
- ld a, [rSVBK]
- push af
- ld a, $5
- ld [rSVBK], a
- ld hl, UnknOBPals
- ld a, $1f
- ld [hli], a
- ld a, $0
- ld [hl], a
- pop af
- ld [rSVBK], a
- call WipeAttrMap
- call ApplyAttrMap
- ret
-; 9289
-
-_CGB_TrainerCard: ; 9289
- ld de, UnknBGPals
- xor a
- call GetTrainerPalettePointer
- call LoadPalette_White_Col1_Col2_Black
- ld a, $1
- call GetTrainerPalettePointer
- call LoadPalette_White_Col1_Col2_Black
- ld a, $3
- call GetTrainerPalettePointer
- call LoadPalette_White_Col1_Col2_Black
- ld a, $2
- call GetTrainerPalettePointer
- call LoadPalette_White_Col1_Col2_Black
- ld a, $4
- call GetTrainerPalettePointer
- call LoadPalette_White_Col1_Col2_Black
- ld a, $7
- call GetTrainerPalettePointer
- call LoadPalette_White_Col1_Col2_Black
- ld a, $6
- call GetTrainerPalettePointer
- call LoadPalette_White_Col1_Col2_Black
- ld a, $5
- call GetTrainerPalettePointer
- call LoadPalette_White_Col1_Col2_Black
- ld a, $24
- call GetPredefPal
- call LoadHLPaletteIntoDE
-
- hlcoord 0, 0, AttrMap
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- ld a, [PlayerGender]
- and a
- ld a, $1
- jr z, .got_gender
- ld a, $0
-.got_gender
- call ByteFill
- hlcoord 14, 1, AttrMap
- lb bc, 7, 5
- ld a, [PlayerGender]
- and a
- ld a, $0
- jr z, .got_gender2
- ld a, $1
-.got_gender2
- call FillBoxCGB
- hlcoord 18, 1, AttrMap
- ld [hl], $1
- hlcoord 2, 11, AttrMap
- lb bc, 2, 4
- ld a, $1
- call FillBoxCGB
- hlcoord 6, 11, AttrMap
- lb bc, 2, 4
- ld a, $2
- call FillBoxCGB
- hlcoord 10, 11, AttrMap
- lb bc, 2, 4
- ld a, $3
- call FillBoxCGB
- hlcoord 14, 11, AttrMap
- lb bc, 2, 4
- ld a, $4
- call FillBoxCGB
- hlcoord 2, 14, AttrMap
- lb bc, 2, 4
- ld a, $5
- call FillBoxCGB
- hlcoord 6, 14, AttrMap
- lb bc, 2, 4
- ld a, $6
- call FillBoxCGB
- hlcoord 10, 14, AttrMap
- lb bc, 2, 4
- ld a, $7
- call FillBoxCGB
- ld a, [PlayerGender]
- and a
- push af
- jr z, .got_gender3
- hlcoord 14, 14, AttrMap
- lb bc, 2, 4
- ld a, $1
- call FillBoxCGB
-.got_gender3
- pop af
- ld c, $0
- jr nz, .got_gender4
- inc c
-.got_gender4
- ld a, c
- hlcoord 18, 1, AttrMap
- ld [hl], a
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 9373
-
-_CGB_MoveList: ; 9373
- ld de, UnknBGPals
- ld a, $10
- call GetPredefPal
- call LoadHLPaletteIntoDE
- ld a, [PlayerHPPal]
- ld l, a
- ld h, 0
- add hl, hl
- add hl, hl
- ld bc, Palettes_a8be
- add hl, bc
- call LoadPalette_White_Col1_Col2_Black
- call WipeAttrMap
- hlcoord 11, 1, AttrMap
- lb bc, 2, 9
- ld a, $1
- call FillBoxCGB
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 93a6
-
-_CGB0f: ; 93a6
- ld hl, PalPacket_9c46 + 1
- call CopyFourPalettes
- call WipeAttrMap
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 93ba
-
-_CGB_PokedexSearchOption: ; 93ba
- ld de, UnknBGPals
- ld a, $1d
- call GetPredefPal
- call LoadHLPaletteIntoDE
- call WipeAttrMap
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 93d3
-
-_CGB_PackPals: ; 93d3
-; pack pals
- ld a, [BattleType]
- cp BATTLETYPE_TUTORIAL
- jr z, .tutorial_male
-
- ld a, [PlayerGender]
- bit 0, a
- jr z, .tutorial_male
-
- ld hl, .KrisPackPals
- jr .got_gender
-
-.tutorial_male
- ld hl, .ChrisPackPals
-
-.got_gender
- ld de, UnknBGPals
- ld bc, 8 palettes ; 6 palettes?
- ld a, $5
- call FarCopyWRAM
- call WipeAttrMap
- hlcoord 0, 0, AttrMap
- lb bc, 1, 10
- ld a, $1
- call FillBoxCGB
- hlcoord 10, 0, AttrMap
- lb bc, 1, 10
- ld a, $2
- call FillBoxCGB
- hlcoord 7, 2, AttrMap
- lb bc, 9, 1
- ld a, $3
- call FillBoxCGB
- hlcoord 0, 7, AttrMap
- lb bc, 3, 5
- ld a, $4
- call FillBoxCGB
- hlcoord 0, 3, AttrMap
- lb bc, 3, 5
- ld a, $5
- call FillBoxCGB
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 9439
-
-.ChrisPackPals: ; 9439
- RGB 31, 31, 31
- RGB 15, 15, 31
- RGB 00, 00, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 15, 15, 31
- RGB 00, 00, 31
- RGB 00, 00, 00
-
- RGB 31, 11, 31
- RGB 15, 15, 31
- RGB 00, 00, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 15, 15, 31
- RGB 00, 00, 31
- RGB 31, 00, 00
-
- RGB 31, 31, 31
- RGB 15, 15, 31
- RGB 31, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 07, 19, 07
- RGB 07, 19, 07
- RGB 00, 00, 00
-; 9469
-
-.KrisPackPals: ; 9469
- RGB 31, 31, 31
- RGB 31, 14, 31
- RGB 31, 07, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 14, 31
- RGB 31, 07, 31
- RGB 00, 00, 00
-
- RGB 15, 15, 31
- RGB 31, 14, 31
- RGB 31, 07, 31
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 14, 31
- RGB 31, 07, 31
- RGB 31, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 14, 31
- RGB 31, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 07, 19, 07
- RGB 07, 19, 07
- RGB 00, 00, 00
-; 9499
-
-_CGB_Pokepic: ; 9499
- call _CGB_MapPals
- ld de, SCREEN_WIDTH
- hlcoord 0, 0, AttrMap
- ld a, [wMenuBorderTopCoord]
-.loop
- and a
- jr z, .found_top
- dec a
- add hl, de
- jr .loop
-
-.found_top
- ld a, [wMenuBorderLeftCoord]
- ld e, a
- ld d, $0
- add hl, de
- ld a, [wMenuBorderTopCoord]
- ld b, a
- ld a, [wMenuBorderBottomCoord]
- inc a
- sub b
- ld b, a
- ld a, [wMenuBorderLeftCoord]
- ld c, a
- ld a, [wMenuBorderRightCoord]
- sub c
- inc a
- ld c, a
- ld a, $0
- call FillBoxCGB
- call ApplyAttrMap
- ret
-; 94d0
-
-_CGB13: ; 94d0
- ld hl, PalPacket_9ba6 + 1
- call CopyFourPalettes
- call WipeAttrMap
- hlcoord 0, 4, AttrMap
- lb bc, 10, SCREEN_WIDTH
- ld a, $2
- call FillBoxCGB
- hlcoord 0, 6, AttrMap
- lb bc, 6, SCREEN_WIDTH
- ld a, $1
- call FillBoxCGB
- call ApplyAttrMap
- call ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 94fa
-
-_CGB_GamefreakLogo: ; 94fa
- ld de, UnknBGPals
- ld a, $4e
- call GetPredefPal
- call LoadHLPaletteIntoDE
- ld hl, .Palette
- ld de, UnknOBPals
- call LoadHLPaletteIntoDE
- ld hl, .Palette
- ld de, UnknOBPals + 1 palettes
- call LoadHLPaletteIntoDE
- call WipeAttrMap
- call ApplyAttrMap
- call ApplyPals
- ret
-; 9521
-
-.Palette: ; 9521
- RGB 31, 31, 31
- RGB 13, 11, 00
- RGB 23, 12, 28
- RGB 00, 00, 00
-; 9529
-
-_CGB_PlayerOrMonFrontpicPals: ; 9529
- ld de, UnknBGPals
- ld a, [CurPartySpecies]
- ld bc, TempMonDVs
- call GetPlayerOrMonPalettePointer
- call LoadPalette_White_Col1_Col2_Black
- call WipeAttrMap
- call ApplyAttrMap
- call ApplyPals
- ret
-; 9542
-
-_CGB1e: ; 9542
- ld de, UnknBGPals
- ld a, [CurPartySpecies]
- call GetMonPalettePointer_
- call LoadPalette_White_Col1_Col2_Black
- call WipeAttrMap
- call ApplyAttrMap
- ret
-; 9555
-
-_CGB_TradeTube: ; 9555
- ld hl, PalPacket_9cc6 + 1
- call CopyFourPalettes
- ld hl, Palettes_b681
- ld de, UnknOBPals
- ld bc, 1 palettes
- ld a, $5
- call FarCopyWRAM
- ld de, UnknOBPals + 7 palettes
- ld a, $1c
- call GetPredefPal
- call LoadHLPaletteIntoDE
- call WipeAttrMap
- ret
-; 9578
-
-_CGB_TrainerOrMonFrontpicPals: ; 9578
- ld de, UnknBGPals
- ld a, [CurPartySpecies]
- ld bc, TempMonDVs
- call GetFrontpicPalettePointer
- call LoadPalette_White_Col1_Col2_Black
- call WipeAttrMap
- call ApplyAttrMap
- call ApplyPals
- ret
-; 9591
-
-_CGB_MysteryGift: ; 9591
- ld hl, .Palettes
- ld de, UnknBGPals
- ld bc, 2 palettes
- ld a, $5
- call FarCopyWRAM
- call ApplyPals
- call WipeAttrMap
- hlcoord 3, 7, AttrMap
- lb bc, 8, 14
- ld a, $1
- call FillBoxCGB
- hlcoord 1, 5, AttrMap
- lb bc, 1, 18
- ld a, $1
- call FillBoxCGB
- hlcoord 1, 16, AttrMap
- lb bc, 1, 18
- ld a, $1
- call FillBoxCGB
- hlcoord 0, 0, AttrMap
- lb bc, 17, 2
- ld a, $1
- call FillBoxCGB
- hlcoord 18, 5, AttrMap
- lb bc, 12, 1
- ld a, $1
- call FillBoxCGB
- call ApplyAttrMap
- ret
-; 95e0
-
-.Palettes: ; 95e0
- RGB 31, 31, 31
- RGB 16, 31, 14
- RGB 05, 14, 21
- RGB 05, 13, 10
-
- RGB 31, 31, 31
- RGB 11, 21, 25
- RGB 05, 14, 21
- RGB 00, 03, 19
-; 95f0
diff --git a/predef/crystal.asm b/predef/crystal.asm
deleted file mode 100755
index 9aa0fbdf2..000000000
--- a/predef/crystal.asm
+++ /dev/null
@@ -1,614 +0,0 @@
-GetMysteryGift_MobileAdapterLayout: ; 4930f (mobile)
- ld a, b
- cp SCGB_RAM
- jr nz, .not_ram
- ld a, [SGBPredef]
-.not_ram
- push af
- callba ResetBGPals
- pop af
- ld l, a
- ld h, 0
- add hl, hl
- ld de, .dw
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, .done
- push de
- jp hl
-.done
- ret
-; 49330 (12:5330)
-
-.dw ; 49330
-
- dw MG_Mobile_Layout00
- dw MG_Mobile_Layout01
- dw MG_Mobile_Layout02
-; 49336
-
-MG_Mobile_Layout_FillBox: ; 49336
-.row
- push bc
- push hl
-.col
- ld [hli], a
- dec c
- jr nz, .col
- pop hl
- ld bc, SCREEN_WIDTH
- add hl, bc
- pop bc
- dec b
- jr nz, .row
- ret
-; 49346
-
-MG_Mobile_Layout_WipeAttrMap: ; 49346 (12:5346)
- hlcoord 0, 0, AttrMap
- ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
- xor a
- call ByteFill
- ret
-
-MG_Mobile_Layout_LoadPals: ; 49351 (12:5351)
- ld de, UnknBGPals
- ld hl, Palette_493e1
- ld bc, 5 palettes
- ld a, $5 ; BANK(UnknBGPals)
- call FarCopyWRAM
- ld de, UnknBGPals + 7 palettes
- ld hl, Palette_TextBG7
- ld bc, 1 palettes
- ld a, $5 ; BANK(UnknBGPals)
- call FarCopyWRAM
- ret
-
-MG_Mobile_Layout00: ; 4936e (12:536e)
- call MG_Mobile_Layout_LoadPals
- call MG_Mobile_Layout_WipeAttrMap
- call MG_Mobile_Layout_CreatePalBoxes
- callba ApplyAttrMap
- callba ApplyPals
- ret
-
-MG_Mobile_Layout_CreatePalBoxes: ; 49384 (12:5384)
- hlcoord 0, 0, AttrMap
- lb bc, 4, 1
- ld a, $1
- call MG_Mobile_Layout_FillBox
- lb bc, 2, 1
- ld a, $2
- call MG_Mobile_Layout_FillBox
- lb bc, 6, 1
- ld a, $3
- call MG_Mobile_Layout_FillBox
- hlcoord 1, 0, AttrMap
- ld a, $1
- lb bc, 3, 18
- call MG_Mobile_Layout_FillBox
- lb bc, 2, 18
- ld a, $2
- call MG_Mobile_Layout_FillBox
- lb bc, 12, 18
- ld a, $3
- call MG_Mobile_Layout_FillBox
- hlcoord 19, 0, AttrMap
- lb bc, 4, 1
- ld a, $1
- call MG_Mobile_Layout_FillBox
- lb bc, 2, 1
- ld a, $2
- call MG_Mobile_Layout_FillBox
- lb bc, 6, 1
- ld a, $3
- call MG_Mobile_Layout_FillBox
- hlcoord 0, 12, AttrMap
- ld bc, 6 * SCREEN_WIDTH
- ld a, $7
- call ByteFill
- ret
-; 493e1 (12:53e1)
-
-Palette_493e1: ; 493e1
- RGB 03, 07, 09
- RGB 26, 31, 00
- RGB 20, 16, 03
- RGB 31, 31, 31
-
- RGB 13, 24, 29
- RGB 11, 16, 30
- RGB 07, 11, 22
- RGB 05, 06, 18
-
- RGB 31, 31, 31
- RGB 20, 26, 31
- RGB 13, 24, 29
- RGB 11, 16, 30
-
- RGB 31, 31, 31
- RGB 20, 26, 31
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 20, 16, 08
- RGB 31, 00, 00
- RGB 00, 00, 00
-; 49409
-
-LoadOW_BGPal7:: ; 49409
- ld hl, Palette_TextBG7
- ld de, UnknBGPals + 8 * 7
- ld bc, 8
- ld a, $5
- call FarCopyWRAM
- ret
-; 49418
-
-Palette_TextBG7: ; 49418
- RGB 31, 31, 31
- RGB 08, 19, 28
- RGB 05, 05, 16
- RGB 00, 00, 00
-; 49420
-
-Function49420:: ; 49420 (12:5420)
- ld hl, MansionPalette4
- ld de, UnknBGPals + $30
- ld bc, $8
- ld a, $5 ; BANK(UnknBGPals)
- call FarCopyWRAM
- ret
-; 4942f (12:542f)
-
-MG_Mobile_Layout01: ; 4942f
- call MG_Mobile_Layout_LoadPals
- ld de, UnknBGPals + $38
- ld hl, Palette_49478
- ld bc, $8
- ld a, $5 ; BANK(UnknBGPals)
- call FarCopyWRAM
- call MG_Mobile_Layout_WipeAttrMap
- hlcoord 0, 0, AttrMap
- ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- xor a
- call ByteFill
- hlcoord 0, 14, AttrMap
- ld bc, 4 * SCREEN_WIDTH
- ld a, $7
- call ByteFill
- ld a, [wd002]
- bit 6, a
- jr z, .asm_49464
- call Function49480
- jr .asm_49467
-
-.asm_49464
- call Function49496
-
-.asm_49467
- callba ApplyAttrMap
- callba ApplyPals
- ld a, $1
- ld [hCGBPalUpdate], a
- ret
-; 49478
-
-Palette_49478: ; 49478
- RGB 31, 31, 31
- RGB 26, 31, 00
- RGB 20, 16, 03
- RGB 00, 00, 00
-; 49480
-
-Function49480: ; 49480
- hlcoord 0, 0, AttrMap
- lb bc, 4, SCREEN_WIDTH
- ld a, $7
- call MG_Mobile_Layout_FillBox
- hlcoord 0, 2, AttrMap
- ld a, $4
- ld [hl], a
- hlcoord 19, 2, AttrMap
- ld [hl], a
- ret
-; 49496
-
-Function49496: ; 49496
- hlcoord 0, 0, AttrMap
- lb bc, 2, SCREEN_WIDTH
- ld a, $7
- call MG_Mobile_Layout_FillBox
- hlcoord 0, 1, AttrMap
- ld a, $4
- ld [hl], a
- hlcoord 19, 1, AttrMap
- ld [hl], a
- ret
-; 494ac
-
-LoadSpecialMapPalette: ; 494ac
- ld a, [wTileset]
- cp TILESET_POKECOM_CENTER
- jr z, .pokecom_2f
- cp TILESET_BATTLE_TOWER
- jr z, .battle_tower
- cp TILESET_ICE_PATH
- jr z, .ice_path
- cp TILESET_HOUSE_1
- jr z, .house
- cp TILESET_RADIO_TOWER
- jr z, .radio_tower
- cp TILESET_CELADON_MANSION
- jr z, .mansion_mobile
- jr .do_nothing
-
-.pokecom_2f
- call LoadPokeComPalette
- scf
- ret
-
-.battle_tower
- call LoadBattleTowerPalette
- scf
- ret
-
-.ice_path
- ld a, [wPermission] ; permission
- and 7
- cp 3 ; Hall of Fame
- jr z, .do_nothing
- call LoadIcePathPalette
- scf
- ret
-
-.house
- call LoadHousePalette
- scf
- ret
-
-.radio_tower
- call LoadRadioTowerPalette
- scf
- ret
-
-.mansion_mobile
- call LoadMansionPalette
- scf
- ret
-
-.do_nothing
- and a
- ret
-; 494f2
-
-LoadPokeComPalette: ; 494f2
- ld a, $5
- ld de, UnknBGPals
- ld hl, PokeComPalette
- ld bc, 8 palettes
- call FarCopyWRAM
- ret
-; 49501
-
-PokeComPalette: ; 49501
-INCLUDE "tilesets/pokecom.pal"
-; 49541
-
-LoadBattleTowerPalette: ; 49541
- ld a, $5
- ld de, UnknBGPals
- ld hl, BattleTowerPalette
- ld bc, 8 palettes
- call FarCopyWRAM
- ret
-; 49550
-
-BattleTowerPalette: ; 49550
-INCLUDE "tilesets/battle_tower.pal"
-; 49590
-
-LoadIcePathPalette: ; 49590
- ld a, $5
- ld de, UnknBGPals
- ld hl, IcePathPalette
- ld bc, 8 palettes
- call FarCopyWRAM
- ret
-; 4959f
-
-IcePathPalette: ; 4959f
-INCLUDE "tilesets/ice_path.pal"
-; 495df
-
-LoadHousePalette: ; 495df
- ld a, $5
- ld de, UnknBGPals
- ld hl, HousePalette
- ld bc, 8 palettes
- call FarCopyWRAM
- ret
-; 495ee
-
-HousePalette: ; 495ee
-INCLUDE "tilesets/house.pal"
-; 4962e
-
-LoadRadioTowerPalette: ; 4962e
- ld a, $5
- ld de, UnknBGPals
- ld hl, RadioTowerPalette
- ld bc, 8 palettes
- call FarCopyWRAM
- ret
-; 4963d
-
-RadioTowerPalette: ; 4963d
-INCLUDE "tilesets/radio_tower.pal"
-; 4967d
-
-MansionPalette1: ; 4967d
- RGB 30, 28, 26
- RGB 19, 19, 19
- RGB 13, 13, 13
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 31, 19, 24
- RGB 30, 10, 06
- RGB 07, 07, 07
-
- RGB 18, 24, 09
- RGB 15, 20, 01
- RGB 09, 13, 00
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 15, 16, 31
- RGB 09, 09, 31
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 31, 31, 07
- RGB 31, 16, 01
- RGB 07, 07, 07
-
- RGB 26, 24, 17
- RGB 21, 17, 07
- RGB 16, 13, 03
- RGB 07, 07, 07
-
-MansionPalette3: ; 496ad
- RGB 30, 28, 26
- RGB 17, 19, 31
- RGB 14, 16, 31
- RGB 07, 07, 07
-
- RGB 31, 31, 16
- RGB 31, 31, 16
- RGB 14, 09, 00
- RGB 00, 00, 00
-; 496bd
-
-MansionPalette4: ; 496bd
- RGB 05, 05, 16
- RGB 08, 19, 28
- RGB 00, 00, 00
- RGB 31, 31, 31
-; 496c5
-
-LoadMansionPalette: ; 496c5
- ld a, $5
- ld de, UnknBGPals
- ld hl, MansionPalette1
- ld bc, 8 palettes
- call FarCopyWRAM
- ld a, $5
- ld de, UnknBGPals + 4 palettes
- ld hl, MansionPalette2
- ld bc, 1 palettes
- call FarCopyWRAM
- ld a, $5
- ld de, UnknBGPals + 3 palettes
- ld hl, MansionPalette3
- ld bc, 1 palettes
- call FarCopyWRAM
- ld a, $5
- ld de, UnknBGPals + 6 palettes
- ld hl, MansionPalette4
- ld bc, 1 palettes
- call FarCopyWRAM
- ret
-; 496fe
-
-MansionPalette2: ; 496fe
- RGB 25, 24, 23
- RGB 20, 19, 19
- RGB 14, 16, 31
- RGB 07, 07, 07
-; 49706
-
-MG_Mobile_Layout02: ; 49706
- ld hl, Palette_49732
- ld de, UnknBGPals
- ld bc, 1 palettes
- ld a, $5
- call FarCopyWRAM
- callba ApplyPals
- call MG_Mobile_Layout_WipeAttrMap
- callba ApplyAttrMap
- ld hl, Palette_4973a
- ld de, UnknOBPals
- ld bc, 1 palettes
- ld a, $5
- call FarCopyWRAM
- ret
-; 49732
-
-Palette_49732: ; 49732
- RGB 31, 31, 31
- RGB 23, 16, 07
- RGB 23, 07, 07
- RGB 03, 07, 20
-; 4973a
-
-Palette_4973a: ; 4973a
- RGB 00, 00, 00
- RGB 07, 05, 31
- RGB 14, 18, 31
- RGB 31, 31, 31
-; 49742
-
-Function49742: ; 49742
- ld hl, Palette_49757
- ld de, UnknBGPals
- ld bc, $40
- ld a, $5
- call FarCopyWRAM
- callba ApplyPals
- ret
-; 49757
-
-Palette_49757: ; 49757
- RGB 31, 31, 63
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 63
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 04, 02, 15
- RGB 21, 00, 21
- RGB 31, 00, 00
- RGB 31, 31, 31
-
- RGB 04, 02, 15
- RGB 21, 00, 21
- RGB 30, 16, 26
- RGB 31, 31, 31
-
- RGB 04, 02, 15
- RGB 21, 00, 21
- RGB 16, 16, 16
- RGB 31, 31, 31
-
- RGB 04, 02, 15
- RGB 21, 00, 21
- RGB 31, 12, 12
- RGB 31, 31, 31
-
- RGB 04, 02, 15
- RGB 21, 00, 21
- RGB 07, 08, 31
- RGB 31, 31, 31
-
- RGB 04, 02, 15
- RGB 21, 00, 21
- RGB 29, 28, 09
- RGB 31, 31, 31
-; 49797
-
-_InitMG_Mobile_LinkTradePalMap: ; 49797
- hlcoord 0, 0, AttrMap
- lb bc, 16, 2
- ld a, $4
- call MG_Mobile_Layout_FillBox
- ld a, $3
- ldcoord_a 0, 1, AttrMap
- ldcoord_a 0, 14, AttrMap
- hlcoord 2, 0, AttrMap
- lb bc, 8, 18
- ld a, $5
- call MG_Mobile_Layout_FillBox
- hlcoord 2, 8, AttrMap
- lb bc, 8, 18
- ld a, $6
- call MG_Mobile_Layout_FillBox
- hlcoord 0, 16, AttrMap
- lb bc, 2, SCREEN_WIDTH
- ld a, $4
- call MG_Mobile_Layout_FillBox
- ld a, $3
- lb bc, 6, 1
- hlcoord 6, 1, AttrMap
- call MG_Mobile_Layout_FillBox
- ld a, $3
- lb bc, 6, 1
- hlcoord 17, 1, AttrMap
- call MG_Mobile_Layout_FillBox
- ld a, $3
- lb bc, 6, 1
- hlcoord 6, 9, AttrMap
- call MG_Mobile_Layout_FillBox
- ld a, $3
- lb bc, 6, 1
- hlcoord 17, 9, AttrMap
- call MG_Mobile_Layout_FillBox
- ld a, $2
- hlcoord 2, 16, AttrMap
- ld [hli], a
- ld a, $7
- ld [hli], a
- ld [hli], a
- ld [hli], a
- ld a, $2
- ld [hl], a
- hlcoord 2, 17, AttrMap
- ld a, $3
- ld bc, 6
- call ByteFill
- ret
-; 49811
-
-LoadTradeRoomBGPals: ; 49811
- ld hl, Palette_49826
- ld de, UnknBGPals + $10
- ld bc, $30
- ld a, $5
- call FarCopyWRAM
- callba ApplyPals
- ret
-; 49826
-
-Palette_49826: ; 49826
- RGB 04, 02, 15
- RGB 07, 09, 31
- RGB 31, 00, 00
- RGB 31, 31, 31
-
- RGB 04, 02, 15
- RGB 07, 09, 31
- RGB 15, 23, 30
- RGB 31, 31, 31
-
- RGB 04, 02, 15
- RGB 07, 09, 31
- RGB 16, 16, 16
- RGB 31, 31, 31
-
- RGB 04, 02, 15
- RGB 07, 09, 31
- RGB 25, 07, 04
- RGB 31, 31, 31
-
- RGB 04, 02, 15
- RGB 07, 09, 31
- RGB 03, 22, 08
- RGB 31, 31, 31
-
- RGB 04, 02, 15
- RGB 07, 09, 31
- RGB 29, 28, 09
- RGB 31, 31, 31
-; 49856
-
-InitMG_Mobile_LinkTradePalMap: ; 49856
- call _InitMG_Mobile_LinkTradePalMap
- ret
-; 4985a
diff --git a/predef/sgb.asm b/predef/sgb.asm
deleted file mode 100644
index 1d8184cc2..000000000
--- a/predef/sgb.asm
+++ /dev/null
@@ -1,636 +0,0 @@
-Predef_LoadSGBLayout: ; 864c
-; LoadSGBLayout
- call CheckCGB
- jp nz, Predef_LoadSGBLayoutCGB
-
- ld a, b
- cp SCGB_RAM
- jr nz, .not_ram
- ld a, [SGBPredef]
-.not_ram
- cp SCGB_PARTY_MENU_HP_PALS
- jp z, SGB_ApplyPartyMenuHPPals
- ld l, a
- ld h, 0
- add hl, hl
- ld de, .Jumptable
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld de, .Finish
- push de
- jp hl
-; 866f
-
-.Jumptable: ; 866f
- dw .SGB_BattleGrayscale
- dw .SGB_BattleColors
- dw .SGB_PokegearPals
- dw .SGB_StatsScreenHPPals
- dw .SGB_Pokedex
- dw .SGB_SlotMachine
- dw .SGB06
- dw .SGB07
- dw .SGB_Diploma
- dw .SGB_MapPals
- dw .SGB_PartyMenu
- dw .SGB_Evolution
- dw .SGB0c
- dw .SGB0d
- dw .SGB_MoveList
- dw .SGB0f
- dw .SGB_PokedexSearchOption
- dw .SGB11
- dw .SGB12
- dw .SGB13
- dw .SGB_PackPals
- dw .SGB_TrainerCard
- dw .SGB_PokedexUnownMode
- dw .SGB_BillsPC
- dw .SGB_UnownPuzzle
- dw .SGB19
- dw .SGB_PlayerOrMonFrontpicPals
- dw .SGB_TradeTube
- dw .SGB_TrainerOrMonFrontpicPals
- dw .SGB_MysteryGift
- dw .SGB1e
-; 86ad
-
-.SGB_BattleGrayscale: ; 86ad
- ld hl, PalPacket_9c66
- ld de, BlkPacket_9aa6
- ret
-; 86b4
-
-.SGB_BattleColors: ; 86b4
- ld hl, BlkPacket_9aa6
- call PushSGBPals_
-
- ld hl, PalPacket_9ce6
- ld de, wSGBPals
- ld bc, $10
- call CopyBytes
-
- ld a, [PlayerHPPal]
- ld l, a
- ld h, 0
- add hl, hl
- add hl, hl
- ld de, Palettes_a8be
- add hl, de
-
- ld a, [hli]
- ld [wSGBPals + 3], a
- ld a, [hli]
- ld [wSGBPals + 4], a
- ld a, [hli]
- ld [wSGBPals + 5], a
- ld a, [hl]
- ld [wSGBPals + 6], a
-
- ld a, [EnemyHPPal]
- ld l, a
- ld h, 0
- add hl, hl
- add hl, hl
-
- ld de, Palettes_a8be
- add hl, de
- ld a, [hli]
- ld [wSGBPals + 9], a
- ld a, [hli]
- ld [wSGBPals + 10], a
- ld a, [hli]
- ld [wSGBPals + 11], a
- ld a, [hl]
- ld [wSGBPals + 12], a
-
- ld hl, PalPacket_9cf6
- ld de, wSGBPals + $10
- ld bc, $10
- call CopyBytes
-
- call GetBattlemonBackpicPalettePointer
-
- ld a, [hli]
- ld [wSGBPals + $13], a
- ld a, [hli]
- ld [wSGBPals + $14], a
- ld a, [hli]
- ld [wSGBPals + $15], a
- ld a, [hl]
- ld [wSGBPals + $16], a
- call GetEnemyFrontpicPalettePointer
- ld a, [hli]
- ld [wSGBPals + $19], a
- ld a, [hli]
- ld [wSGBPals + $1a], a
- ld a, [hli]
- ld [wSGBPals + $1b], a
- ld a, [hl]
- ld [wSGBPals + $1c], a
-
- ld hl, wSGBPals
- ld de, wSGBPals + $10
- ld a, SCGB_BATTLE_COLORS
- ld [SGBPredef], a
- ret
-; 873c
-
-.SGB_MoveList: ; 873c
- ld hl, PalPacket_9bd6
- ld de, wSGBPals
- ld bc, $10
- call CopyBytes
-
- ld hl, wSGBPals + 1
- ld [hl], $10
- inc hl
- inc hl
-
- ld a, [PlayerHPPal]
- add $2f
- ld [hl], a
- ld hl, wSGBPals
- ld de, BlkPacket_9ad6
- ret
-; 875c
-
-.SGB_PokegearPals: ; 875c
- ld hl, PalPacket_9c76
- ld de, BlkPacket_9a86
- ret
-; 8763
-
-.SGB_StatsScreenHPPals: ; 8763
- ld hl, PalPacket_9ce6
- ld de, wSGBPals
- ld bc, $10
- call CopyBytes
- ld a, [wcda1]
- ld l, a
- ld h, 0
- add hl, hl
- add hl, hl
- ld de, Palettes_a8be
- add hl, de
- ld a, [hli]
- ld [wSGBPals + 3], a
- ld a, [hli]
- ld [wSGBPals + 4], a
- ld a, [hli]
- ld [wSGBPals + 5], a
- ld a, [hl]
- ld [wSGBPals + 6], a
- ld a, [CurPartySpecies]
- ld bc, TempMonDVs
- call GetPlayerOrMonPalettePointer
- ld a, [hli]
- ld [wSGBPals + 9], a
- ld a, [hli]
- ld [wSGBPals + 10], a
- ld a, [hli]
- ld [wSGBPals + 11], a
- ld a, [hl]
- ld [wSGBPals + 12], a
- ld hl, wSGBPals
- ld de, BlkPacket_9ac6
- ret
-; 87ab
-
-.SGB_PartyMenu: ; 87ab
- ld hl, PalPacket_9c56
- ld de, wSGBPals + 1
- ret
-; 87b2
-
-.SGB_Pokedex: ; 87b2
- ld hl, PalPacket_9ce6
- ld de, wSGBPals
- ld bc, $10
- call CopyBytes
- ld hl, wSGBPals + 3
- ld [hl], $9f
- inc hl
- ld [hl], $2a
- inc hl
- ld [hl], $5a
- inc hl
- ld [hl], $19
- ld a, [CurPartySpecies]
- call GetMonPalettePointer_
- ld a, [hli]
- ld [wSGBPals + 9], a
- ld a, [hli]
- ld [wSGBPals + 10], a
- ld a, [hli]
- ld [wSGBPals + 11], a
- ld a, [hl]
- ld [wSGBPals + 12], a
- ld hl, wSGBPals
- ld de, BlkPacket_9ae6
- ret
-; 87e9
-
-.SGB_BillsPC: ; 87e9
- ld hl, PalPacket_9ce6
- ld de, wSGBPals
- ld bc, $10
- call CopyBytes
- ld hl, wSGBPals + 3
- ld [hl], $9f
- inc hl
- ld [hl], $2a
- inc hl
- ld [hl], $5a
- inc hl
- ld [hl], $19
- ld a, [CurPartySpecies]
- ld bc, TempMonDVs
- call GetPlayerOrMonPalettePointer
- ld a, [hli]
- ld [wSGBPals + 9], a
- ld a, [hli]
- ld [wSGBPals + 10], a
- ld a, [hli]
- ld [wSGBPals + 11], a
- ld a, [hl]
- ld [wSGBPals + 12], a
- ld hl, wSGBPals
- ld de, BlkPacket_9ae6
- ret
-; 8823
-
-.SGB_PokedexUnownMode: ; 8823
- call .SGB_Pokedex
- ld de, BlkPacket_9af6
- ret
-; 882a
-
-.SGB_PokedexSearchOption: ; 882a
- ld hl, PalPacket_9ce6
- ld de, wSGBPals
- ld bc, $10
- call CopyBytes
- ld hl, wSGBPals + 3
- ld [hl], $9f
- inc hl
- ld [hl], $2a
- inc hl
- ld [hl], $5a
- inc hl
- ld [hl], $19
- ld hl, wSGBPals
- ld de, BlkPacket_9a86
- ret
-; 884b
-
-.SGB_PackPals: ; 884b
- ld hl, PalPacket_9c36
- ld de, BlkPacket_9a86
- ret
-; 8852
-
-.SGB_SlotMachine: ; 8852
- ld hl, PalPacket_9c96
- ld de, BlkPacket_9b06
- ret
-; 8859
-
-.SGB06: ; 8859
- ld hl, PalPacket_9ca6
- ld de, BlkPacket_9b76
- ret
-; 8860
-
-.SGB_Diploma:
-.SGB_MysteryGift: ; 8860
- ld hl, PalPacket_9cb6
- ld de, BlkPacket_9a86
- ret
-; 8867
-
-.SGB07: ; 8867
- ld b, 0
- ld hl, .BlkPacketTable_SGB07
-rept 4
- add hl, bc
-endr
- ld e, [hl]
- inc hl
- ld d, [hl]
- inc hl
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ret
-; 8878
-
-.BlkPacketTable_SGB07: ; 8878
- dw BlkPacket_9a86, PalPacket_9be6
- dw BlkPacket_9a96, PalPacket_9c06
- dw BlkPacket_9a86, PalPacket_9c16
-; 8884
-
-.SGB0c: ; 8884
- ld hl, PalPacket_9b96
- ld de, BlkPacket_9b56
- ld a, SCGB_DIPLOMA
- ld [SGBPredef], a
- ret
-; 8890
-
-.SGB13: ; 8890
- ld hl, PalPacket_9ba6
- ld de, BlkPacket_9b86
- ret
-; 8897
-
-.SGB0f: ; 8897
- ld hl, PalPacket_9c46
- ld de, BlkPacket_9a86
- ret
-; 889e
-
-.SGB11: ; 889e
- ld hl, BlkPacket_9a86
- ld de, PlayerLightScreenCount
- ld bc, $10
- call CopyBytes
- ld hl, PalPacket_9bb6
- ld de, BlkPacket_9a86
- ret
-; 88b1
-
-.SGB_MapPals: ; 88b1
- ld hl, PalPacket_9bd6
- ld de, wSGBPals
- ld bc, $10
- call CopyBytes
- call .GetMapPalsIndex
- ld hl, wSGBPals + 1
- ld [hld], a
- ld de, BlkPacket_9a86
- ld a, SCGB_MAPPALS
- ld [SGBPredef], a
- ret
-; 88cd
-
-.SGB_Evolution: ; 88cd
- push bc
- ld hl, PalPacket_9ce6
- ld de, wSGBPals
- ld bc, $10
- call CopyBytes
- pop bc
- ld a, c
- and a
- jr z, .partymon
- ; Egg
- ld hl, wSGBPals + 3
- ; RGB 7, 7, 7
- ld [hl], $e7
- inc hl
- ld [hl], $1c
- inc hl
- ; RGB 2, 3, 3
- ld [hl], $62
- inc hl
- ld [hl], $c
- jr .done
-
-.partymon
- ld hl, PartyMon1DVs
- ld bc, PARTYMON_STRUCT_LENGTH
- ld a, [CurPartyMon]
- call AddNTimes
- ld c, l
- ld b, h
- ld a, [PlayerHPPal]
- call GetPlayerOrMonPalettePointer
- ld a, [hli]
- ld [wSGBPals + 3], a
- ld a, [hli]
- ld [wSGBPals + 4], a
- ld a, [hli]
- ld [wSGBPals + 5], a
- ld a, [hl]
- ld [wSGBPals + 6], a
-
-.done
- ld hl, wSGBPals
- ld de, BlkPacket_9a86
- ret
-; 891a
-
-.SGB0d:
-.SGB_TrainerCard: ; 891a
- ld hl, PalPacket_9cb6
- ld de, BlkPacket_9a86
- ret
-; 8921
-
-.SGB_UnownPuzzle: ; 8921
- ld hl, PalPacket_9bc6
- ld de, BlkPacket_9a86
- ret
-; 8928
-
-.SGB12: ; 8928
- ld hl, PalPacket_9bd6
- ld de, wSGBPals
- ld bc, $10
- call CopyBytes
- ld hl, BlkPacket_9a86
- ld de, wSGBPals + $10
- ld bc, $10
- call CopyBytes
- call .GetMapPalsIndex
- ld hl, wSGBPals + 1
- ld [hl], a
- ld hl, wSGBPals + 3
- ld [hl], $2e
- ld hl, wSGBPals + $13
- ld a, 5
- ld [hli], a
- ld a, [wMenuBorderLeftCoord]
- ld [hli], a
- ld a, [wMenuBorderTopCoord]
- ld [hli], a
- ld a, [wMenuBorderRightCoord]
- ld [hli], a
- ld a, [wMenuBorderBottomCoord]
- ld [hl], a
- ld hl, wSGBPals
- ld de, wSGBPals + $10
- ret
-; 8969
-
-.SGB1e: ; 8969
- ld hl, PalPacket_9ce6
- ld de, wSGBPals
- ld bc, $10
- call CopyBytes
- ld a, [CurPartySpecies]
- ld l, a
- ld h, 0
- add hl, hl
- add hl, hl
- add hl, hl
- ld de, PokemonPalettes
- add hl, de
- ld a, [wcf65]
- and 3
- sla a
- sla a
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [hli]
- ld [wSGBPals + 3], a
- ld a, [hli]
- ld [wSGBPals + 4], a
- ld a, [hli]
- ld [wSGBPals + 5], a
- ld a, [hl]
- ld [wSGBPals + 6], a
- ld hl, wSGBPals
- ld de, BlkPacket_9a86
- ret
-; 89a6
-
-.SGB19: ; 89a6
- ld hl, PalPacket_9cd6
- ld de, BlkPacket_9a86
- ret
-; 89ad
-
-.SGB_PlayerOrMonFrontpicPals: ; 89ad
- ld hl, PalPacket_9ce6
- ld de, wSGBPals
- ld bc, $10
- call CopyBytes
- ld a, [CurPartySpecies]
- ld bc, TempMonDVs
- call GetPlayerOrMonPalettePointer
- ld a, [hli]
- ld [wSGBPals + 3], a
- ld a, [hli]
- ld [wSGBPals + 4], a
- ld a, [hli]
- ld [wSGBPals + 5], a
- ld a, [hl]
- ld [wSGBPals + 6], a
- ld hl, wSGBPals
- ld de, BlkPacket_9a86
- ret
-; 89d9
-
-.SGB_TradeTube: ; 89d9
- ld hl, PalPacket_9cc6
- ld de, BlkPacket_9a86
- ret
-; 89e0
-
-.SGB_TrainerOrMonFrontpicPals: ; 89e0
- ld hl, PalPacket_9ce6
- ld de, wSGBPals
- ld bc, $10
- call CopyBytes
- ld a, [CurPartySpecies]
- ld bc, TempMonDVs
- call GetFrontpicPalettePointer
- ld a, [hli]
- ld [wSGBPals + 3], a
- ld a, [hli]
- ld [wSGBPals + 4], a
- ld a, [hli]
- ld [wSGBPals + 5], a
- ld a, [hl]
- ld [wSGBPals + 6], a
- ld hl, wSGBPals
- ld de, BlkPacket_9a86
- ret
-; 8a0c
-
-.GetMapPalsIndex: ; 8a0c
- ld a, [TimeOfDayPal]
- cp NITE
- jr c, .morn_day
- ld a, $19
- ret
-
-.morn_day
- ld a, [wPermission]
- cp ROUTE
- jr z, .route
- cp CAVE
- jr z, .cave
- cp DUNGEON
- jr z, .cave
- cp PERM_5
- jr z, .perm5
- cp GATE
- jr z, .gate
- ld a, [MapGroup]
- ld e, a
- ld d, 0
- ld hl, .SGBRoofPalInds
- add hl, de
- ld a, [hl]
- ret
-
-.route
- ld a, $00
- ret
-
-.cave
- ld a, $18
- ret
-
-.perm5
- ld a, $06
- ret
-
-.gate
- ld a, $03
- ret
-; 8a45
-
-.SGBRoofPalInds: ; 8a45
- db $00 ; Unused
- db $12 ; Olivine
- db $14 ; Mahogany
- db $18 ; Various Dungeons
- db $11 ; Ecruteak
- db $15 ; Blackthorn
- db $09 ; Cinnabar
- db $04 ; Cerulean
- db $0f ; Azalea
- db $16 ; Lake Of Rage
- db $0e ; Violet
- db $10 ; Goldenrod
- db $06 ; Vermilion
- db $01 ; Palette
- db $03 ; Pewter
- db $06 ; Fast Ship
- db $0b ; Indigo Plateau
- db $08 ; Fuchsia
- db $05 ; Lavender
- db $17 ; Silver Cave Outside
- db $08 ; Pokemon Center 2F
- db $07 ; Celadon
- db $13 ; Cianwood
- db $02 ; Viridian
- db $0c ; New Bark
- db $0a ; Saffron
- db $0d ; Cherrygrove
-; 8a60
-
-.Finish: ; 8a60
- push de
- call PushSGBPals_
- pop hl
- jp PushSGBPals_
-; 8a68
diff --git a/sram.asm b/sram.asm
index 22b377b3c..163de6bda 100644
--- a/sram.asm
+++ b/sram.asm
@@ -1,9 +1,11 @@
SRAM_Begin EQU $a000
SRAM_End EQU $c000
+
GLOBAL SRAM_Begin, SRAM_End
SECTION "Scratch", SRAM
+
sScratch::
@@ -11,12 +13,12 @@ SECTION "SRAM Bank 0", SRAM
; a600
sPartyMail::
-sPartyMon1Mail:: mailmsg sPartyMon1Mail
-sPartyMon2Mail:: mailmsg sPartyMon2Mail
-sPartyMon3Mail:: mailmsg sPartyMon3Mail
-sPartyMon4Mail:: mailmsg sPartyMon4Mail
-sPartyMon5Mail:: mailmsg sPartyMon5Mail
-sPartyMon6Mail:: mailmsg sPartyMon6Mail
+sPartyMon1Mail:: mailmsg sPartyMon1Mail
+sPartyMon2Mail:: mailmsg sPartyMon2Mail
+sPartyMon3Mail:: mailmsg sPartyMon3Mail
+sPartyMon4Mail:: mailmsg sPartyMon4Mail
+sPartyMon5Mail:: mailmsg sPartyMon5Mail
+sPartyMon6Mail:: mailmsg sPartyMon6Mail
; a71a
sPartyMailBackup::
@@ -28,45 +30,45 @@ sPartyMon5MailBackup:: mailmsg sPartyMon5MailBackup
sPartyMon6MailBackup:: mailmsg sPartyMon6MailBackup
; a834
-sMailboxCount:: ds 1
+sMailboxCount:: db
sMailbox::
-sMailbox1:: mailmsg sMailbox1
-sMailbox2:: mailmsg sMailbox2
-sMailbox3:: mailmsg sMailbox3
-sMailbox4:: mailmsg sMailbox4
-sMailbox5:: mailmsg sMailbox5
-sMailbox6:: mailmsg sMailbox6
-sMailbox7:: mailmsg sMailbox7
-sMailbox8:: mailmsg sMailbox8
-sMailbox9:: mailmsg sMailbox9
-sMailbox10:: mailmsg sMailbox10
+sMailbox1:: mailmsg sMailbox1
+sMailbox2:: mailmsg sMailbox2
+sMailbox3:: mailmsg sMailbox3
+sMailbox4:: mailmsg sMailbox4
+sMailbox5:: mailmsg sMailbox5
+sMailbox6:: mailmsg sMailbox6
+sMailbox7:: mailmsg sMailbox7
+sMailbox8:: mailmsg sMailbox8
+sMailbox9:: mailmsg sMailbox9
+sMailbox10:: mailmsg sMailbox10
; aa0b
-sMailboxCountBackup:: ds 1
+sMailboxCountBackup:: db
sMailboxBackup::
-sMailbox1Backup:: mailmsg sMailbox1Backup
-sMailbox2Backup:: mailmsg sMailbox2Backup
-sMailbox3Backup:: mailmsg sMailbox3Backup
-sMailbox4Backup:: mailmsg sMailbox4Backup
-sMailbox5Backup:: mailmsg sMailbox5Backup
-sMailbox6Backup:: mailmsg sMailbox6Backup
-sMailbox7Backup:: mailmsg sMailbox7Backup
-sMailbox8Backup:: mailmsg sMailbox8Backup
-sMailbox9Backup:: mailmsg sMailbox9Backup
-sMailbox10Backup:: mailmsg sMailbox10Backup
+sMailbox1Backup:: mailmsg sMailbox1Backup
+sMailbox2Backup:: mailmsg sMailbox2Backup
+sMailbox3Backup:: mailmsg sMailbox3Backup
+sMailbox4Backup:: mailmsg sMailbox4Backup
+sMailbox5Backup:: mailmsg sMailbox5Backup
+sMailbox6Backup:: mailmsg sMailbox6Backup
+sMailbox7Backup:: mailmsg sMailbox7Backup
+sMailbox8Backup:: mailmsg sMailbox8Backup
+sMailbox9Backup:: mailmsg sMailbox9Backup
+sMailbox10Backup:: mailmsg sMailbox10Backup
; abe2
-sMysteryGiftItem:: ds 1
-sMysteryGiftUnlocked:: ds 1
-sBackupMysteryGiftItem:: ds 1
-sNumDailyMysteryGiftPartnerIDs:: ds 1
+sMysteryGiftItem:: db
+sMysteryGiftUnlocked:: db
+sBackupMysteryGiftItem:: db
+sNumDailyMysteryGiftPartnerIDs:: db
sDailyMysteryGiftPartnerIDs:: ds 5 * 2 ; maximum 5 per day, 2 bytes per ID
sMysteryGiftDecorationsReceived:: flag_array NUM_NON_TROPHY_DECOS
ds 4
-sMysteryGiftTimer:: ds 1
-sMysteryGiftTimerStartDay:: ds 1
+sMysteryGiftTimer:: db
+sMysteryGiftTimerStartDay:: db
ds 1
-sMysteryGiftTrainerHouseFlag:: ds 1
+sMysteryGiftTrainerHouseFlag:: db
sMysteryGiftPartnerName:: ds NAME_LENGTH
s0_ac09:: ds 1
sMysteryGiftTrainer:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 2 ; ac0a
@@ -75,13 +77,15 @@ sBackupMysteryGiftItemEnd::
ds $30
sRTCStatusFlags:: ds 8
-sLuckyNumberDay:: ds 1
-sLuckyIDNumber:: ds 2
+sLuckyNumberDay:: db
+sLuckyIDNumber:: dw
+
SECTION "Backup Save", SRAM
+
sBackupOptions:: ds OptionsEnd - Options
-s0_b208:: ds 1 ; loaded with 99, used to check save corruption
+sBackupCheckValue1:: db ; loaded with SAVE_CHECK_VALUE_1, used to check save corruption
sBackupGameData:: ; b209
sBackupPlayerData:: ds wPlayerDataEnd - wPlayerData
@@ -93,16 +97,18 @@ sBackupGameDataEnd::
ds $18a
; bf0d
-sBackupChecksum:: ds 2
-s0_bf0f:: ds 1 ; loaded with 0x7f, used to check save corruption
-sStackTop:: ds 2
+sBackupChecksum:: dw
+
+sBackupCheckValue2:: db ; loaded with SAVE_CHECK_VALUE_2, used to check save corruption
+
+sStackTop:: dw
SECTION "Save", SRAM
sOptions:: ds OptionsEnd - Options
-s1_a008:: ds 1 ; loaded with 99, used to check save corruption
+sCheckValue1:: db ; loaded with SAVE_CHECK_VALUE_1, used to check save corruption
sGameData:: ; a009
sPlayerData:: ds wPlayerDataEnd - wPlayerData
@@ -114,29 +120,29 @@ sGameDataEnd::
ds $18a
; ad0d
-sChecksum:: ds 2
-s1_ad0f:: ds 1 ; loaded with 0x7f, used to check save corruption
+sChecksum:: dw
+
+sCheckValue2:: db ; loaded with SAVE_CHECK_VALUE_2, used to check save corruption
+
SECTION "Active Box", SRAM
+
; ad10
box sBox
; b160
ds $f4
+
+
SECTION "Link Battle Data", SRAM
+
sLinkBattleResults:: ds $c
-sLinkBattleStats:: ; b260
-sLinkBattleWins:: ds 2
-sLinkBattleLosses:: ds 2 ; b262
-sLinkBattleDraws:: ds 2 ; b264
-link_battle_record: MACRO
-\1Name:: ds NAME_LENGTH +- 1
-\1ID:: ds 2
-\1Wins:: ds 2
-\1Losses:: ds 2
-\1Draws:: ds 2
-endm
+sLinkBattleStats::
+sLinkBattleWins:: dw ; b260
+sLinkBattleLosses:: dw ; b262
+sLinkBattleDraws:: dw ; b264
+
sLinkBattleRecord::
sLinkBattleRecord1:: link_battle_record sLinkBattleRecord1
sLinkBattleRecord2:: link_battle_record sLinkBattleRecord2
@@ -145,88 +151,80 @@ sLinkBattleRecord4:: link_battle_record sLinkBattleRecord4
sLinkBattleRecord5:: link_battle_record sLinkBattleRecord5
sLinkBattleStatsEnd::
+
SECTION "SRAM Hall of Fame", SRAM
+
sHallOfFame:: ; b2c0
-; temporary until I can find a way to macrofy it
- hall_of_fame sHallOfFame01
- hall_of_fame sHallOfFame02
- hall_of_fame sHallOfFame03
- hall_of_fame sHallOfFame04
- hall_of_fame sHallOfFame05
- hall_of_fame sHallOfFame06
- hall_of_fame sHallOfFame07
- hall_of_fame sHallOfFame08
- hall_of_fame sHallOfFame09
- hall_of_fame sHallOfFame10
- hall_of_fame sHallOfFame11
- hall_of_fame sHallOfFame12
- hall_of_fame sHallOfFame13
- hall_of_fame sHallOfFame14
- hall_of_fame sHallOfFame15
- hall_of_fame sHallOfFame16
- hall_of_fame sHallOfFame17
- hall_of_fame sHallOfFame18
- hall_of_fame sHallOfFame19
- hall_of_fame sHallOfFame20
- hall_of_fame sHallOfFame21
- hall_of_fame sHallOfFame22
- hall_of_fame sHallOfFame23
- hall_of_fame sHallOfFame24
- hall_of_fame sHallOfFame25
- hall_of_fame sHallOfFame26
- hall_of_fame sHallOfFame27
- hall_of_fame sHallOfFame28
- hall_of_fame sHallOfFame29
- hall_of_fame sHallOfFame30
-
-; x = 1
-; rept NUM_HOF_TEAMS
-; ; PRINTT("{x}\n")
-; if STRLEN({x}) == 2
- ; PRINTT(STRSUB({x},2,1))
- ; hall_of_fame STRCAT("sHallOfFame0", STRSUB({x},2,1))
-; else
- ; PRINTT(STRSUB({x},2,2))
- ; hall_of_fame STRCAT("sHallOfFame", STRSUB({x},2,2))
-; endc
-; x = x + 1
-; endr
+sHallOfFame01:: hall_of_fame sHallOfFame01
+sHallOfFame02:: hall_of_fame sHallOfFame02
+sHallOfFame03:: hall_of_fame sHallOfFame03
+sHallOfFame04:: hall_of_fame sHallOfFame04
+sHallOfFame05:: hall_of_fame sHallOfFame05
+sHallOfFame06:: hall_of_fame sHallOfFame06
+sHallOfFame07:: hall_of_fame sHallOfFame07
+sHallOfFame08:: hall_of_fame sHallOfFame08
+sHallOfFame09:: hall_of_fame sHallOfFame09
+sHallOfFame10:: hall_of_fame sHallOfFame10
+sHallOfFame11:: hall_of_fame sHallOfFame11
+sHallOfFame12:: hall_of_fame sHallOfFame12
+sHallOfFame13:: hall_of_fame sHallOfFame13
+sHallOfFame14:: hall_of_fame sHallOfFame14
+sHallOfFame15:: hall_of_fame sHallOfFame15
+sHallOfFame16:: hall_of_fame sHallOfFame16
+sHallOfFame17:: hall_of_fame sHallOfFame17
+sHallOfFame18:: hall_of_fame sHallOfFame18
+sHallOfFame19:: hall_of_fame sHallOfFame19
+sHallOfFame20:: hall_of_fame sHallOfFame20
+sHallOfFame21:: hall_of_fame sHallOfFame21
+sHallOfFame22:: hall_of_fame sHallOfFame22
+sHallOfFame23:: hall_of_fame sHallOfFame23
+sHallOfFame24:: hall_of_fame sHallOfFame24
+sHallOfFame25:: hall_of_fame sHallOfFame25
+sHallOfFame26:: hall_of_fame sHallOfFame26
+sHallOfFame27:: hall_of_fame sHallOfFame27
+sHallOfFame28:: hall_of_fame sHallOfFame28
+sHallOfFame29:: hall_of_fame sHallOfFame29
+sHallOfFame30:: hall_of_fame sHallOfFame30
sHallOfFameEnd::
+
SECTION "SRAM Crystal Data", SRAM
-sMobileEventIndex:: ds 1 ; be3c
-sCrystalData::
- ds wCrystalDataEnd - wCrystalData
-sMobileEventIndexBackup:: ds 1
+sMobileEventIndex:: db ; be3c
+
+sCrystalData:: ds wCrystalDataEnd - wCrystalData
+sMobileEventIndexBackup:: db
+
SECTION "SRAM Battle Tower", SRAM
-; data of the BattleTower must be in SRAM because you can save and leave between battles
-sBattleTowerChallengeState:: ds 1
+
+; Battle Tower data must be in SRAM because you can save and leave between battles
+sBattleTowerChallengeState::
; 0: normal
; 2: battle tower
+ db
sBattleTower:: ; be46
-sNrOfBeatenBattleTowerTrainers:: ds 1
-sBTChoiceOfLevelGroup:: ds 1
-; The 7 trainers of the BattleTower are saved here, so nobody appears more than once
-sBTTrainers:: ; sbe48
- ds 7
-s1_be4f:: ds 1
-sBattleTowerReward:: ds 1
-; Pkmn of previous trainer
+sNrOfBeatenBattleTowerTrainers:: db
+sBTChoiceOfLevelGroup:: db
+; Battle Tower trainers are saved here, so nobody appears more than once
+sBTTrainers:: ds BATTLETOWER_NROFTRAINERS ; sbe48
+sBattleTowerSaveFileFlags:: db
+sBattleTowerReward:: db
+
+; team of previous trainer
sBTPkmnOfTrainers:: ; 0xbe51
-sBTPkmnPrevTrainer1::
- ds 1
-sBTPkmnPrevTrainer2:: ds 1
-sBTPkmnPrevTrainer3:: ds 1
-; Pkmn of preprevious trainer
-sBTPkmnPrevPrevTrainer1:: ds 1
-sBTPkmnPrevPrevTrainer2:: ds 1
-sBTPkmnPrevPrevTrainer3:: ds 1
+sBTPkmnPrevTrainer1:: db
+sBTPkmnPrevTrainer2:: db
+sBTPkmnPrevTrainer3:: db
+; team of preprevious trainer
+sBTPkmnPrevPrevTrainer1:: db
+sBTPkmnPrevPrevTrainer2:: db
+sBTPkmnPrevPrevTrainer3:: db
SECTION "Boxes 1-7", SRAM, BANK [2]
+
box sBox1
box sBox2
box sBox3
@@ -235,7 +233,9 @@ SECTION "Boxes 1-7", SRAM, BANK [2]
box sBox6
box sBox7
+
SECTION "Boxes 8-14", SRAM
+
box sBox8
box sBox9
box sBox10
@@ -245,7 +245,8 @@ SECTION "Boxes 8-14", SRAM
box sBox14
SECTION "SRAM Mobile", SRAM, BANK [5]
-ds 1 ; Former location for sMobileEventIndex, moved to 1:BE3C in English
+
+ ds 1 ; former location for sMobileEventIndex, moved to 1:BE3C in English
sTrainerRankings:: ; a001
sTrainerRankingGameTimeHOF:: ds 4
sTrainerRankingStepCountHOF:: ds 4
@@ -291,9 +292,11 @@ sTrainerRankingShortestMagikarp:: ds 2
sTrainerRankingBugContestScore:: ds 2
sTrainerRankingsChecksum:: ds 2
sTrainerRankingsEnd:: ; a083
+
ds 1 ; Former location for sMobileEventIndexBackup, moved to 1:BE44 in English
sTrainerRankingsBackup:: ds sTrainerRankingsEnd - sTrainerRankings
ds $945
; aa4b
+
sMobileLoginPassword:: ds MOBILE_LOGIN_PASSWORD_LENGTH
diff --git a/text/battle.asm b/text/battle.asm
index b9b121455..7e1b06069 100644
--- a/text/battle.asm
+++ b/text/battle.asm
@@ -1,3 +1,5 @@
+BattleText::
+
BattleText_PlayerPickedUpPayDayMoney: ; 0x80730
text "<PLAYER> picked up"
line "¥@"
diff --git a/text/common_text.asm b/text/common_text.asm
index c4891ab15..d21685480 100644
--- a/text/common_text.asm
+++ b/text/common_text.asm
@@ -1,12 +1,18 @@
INCLUDE "includes.asm"
+
SECTION "Text 1", ROMX
+
INCLUDE "text/common_1.asm"
+
SECTION "Text 2", ROMX
+
INCLUDE "text/common_2.asm"
INCLUDE "text/common_3.asm"
+
SECTION "Text 3", ROMX
+
INCLUDE "text/common_4.asm"
INCLUDE "text/common_5.asm"
diff --git a/text/phone/extra.asm b/text/phone/extra.asm
index 7953bee78..92ac0f508 100644
--- a/text/phone/extra.asm
+++ b/text/phone/extra.asm
@@ -205,7 +205,7 @@ UnknownText_0x645ff: ; 0x645ff
done
; 0x646a3
-UnknownText_0x646a3: ; 0x646a3
+IrwinCalledRightAwayText: ; 0x646a3
text "Hehe, I called"
line "right away!"
@@ -307,7 +307,7 @@ UnknownText_0x648dc: ; 0x648dc
done
; 0x649dc
-UnknownText_0x649dc: ; 0x649dc
+ArnieLovesTheCuteText: ; 0x649dc
text "I'm always with my"
line "@"
text_from_ram StringBuffer4
@@ -423,7 +423,7 @@ UnknownText_0x64c5a: ; 0x64c5a
done
; 0x64cbd
-UnknownText_0x64cbd: ; 0x64cbd
+AlanGettingStrongerText: ; 0x64cbd
text "My @"
text_from_ram StringBuffer4
text "'s"
@@ -651,7 +651,7 @@ UnknownText_0x6520f: ; 0x6520f
done
; 0x65271
-UnknownText_0x65271: ; 0x65271
+ChadObservingWildText: ; 0x65271
text "I recently began"
line "observing wild"
cont "@"
@@ -727,7 +727,7 @@ UnknownText_0x65471: ; 0x65471
done
; 0x65481
-UnknownText_0x65481: ; 0x65481
+ChadBlueGossipText: ; 0x65481
text "Do you know BLUE?"
para "He's PROF.OAK's"
@@ -741,7 +741,7 @@ UnknownText_0x65481: ; 0x65481
done
; 0x654ea
-UnknownText_0x654ea: ; 0x654ea
+ChadDaisyGossipText: ; 0x654ea
text "PROF.OAK has a"
line "granddaughter"
cont "named DAISY."
@@ -754,7 +754,7 @@ UnknownText_0x654ea: ; 0x654ea
done
; 0x65555
-UnknownText_0x65555: ; 0x65555
+ChadProfElmGossipText: ; 0x65555
text "Everyone's talking"
line "about PROF.ELM."
@@ -767,7 +767,7 @@ UnknownText_0x65555: ; 0x65555
done
; 0x655c7
-UnknownText_0x655c7: ; 0x655c7
+ChadDreamGossipText: ; 0x655c7
text "PROF.OAK's dream"
line "is to compile a"
@@ -780,7 +780,7 @@ UnknownText_0x655c7: ; 0x655c7
done
; 0x65628
-UnknownText_0x65628: ; 0x65628
+ChadKurtGossipText: ; 0x65628
text "Do you know KURT,"
line "the BALL creator?"
@@ -793,7 +793,7 @@ UnknownText_0x65628: ; 0x65628
done
; 0x6569b
-UnknownText_0x6569b: ; 0x6569b
+ChadLeagueGossipText: ; 0x6569b
text "#MON LEAGUE is"
line "the great gather-"
cont "ing place for all"
@@ -812,7 +812,7 @@ UnknownText_0x6569b: ; 0x6569b
done
; 0x6574a
-UnknownText_0x6574a: ; 0x6574a
+ChadRadioShowGossipText: ; 0x6574a
text "PROF.OAK'S #MON"
line "TALK is a popular"
cont "radio show, right?"
@@ -832,7 +832,7 @@ UnknownText_0x6574a: ; 0x6574a
done
; 0x65810
-UnknownText_0x65810: ; 0x65810
+ChadBattlingGossipText: ; 0x65810
text "PROF.OAK used to"
line "be a trainer a"
cont "long time ago."
@@ -851,7 +851,7 @@ UnknownText_0x65810: ; 0x65810
done
; 0x658c6
-UnknownText_0x658c6: ; 0x658c6
+ChadDaisyTeaGossipText: ; 0x658c6
text "PROF.OAK has a"
line "granddaughter"
cont "named DAISY."
@@ -870,7 +870,7 @@ UnknownText_0x658c6: ; 0x658c6
done
; 0x65969
-UnknownText_0x65969: ; 0x65969
+ChadTravelGossipText: ; 0x65969
text "Did you know?"
line "PROF.OAK traveled"
@@ -914,7 +914,7 @@ UnknownText_0x65a63: ; 0x65a63
done
; 0x65ab2
-UnknownText_0x65ab2: ; 0x65ab2
+DerekCheekPincherText: ; 0x65ab2
text "Listen to this."
line "My @"
text_from_ram StringBuffer4
@@ -976,7 +976,7 @@ UnknownText_0x65c4e: ; 0x65c4e
done
; 0x65c66
-UnknownText_0x65c66: ; 0x65c66
+DerekBugCatchingContestText: ; 0x65c66
text "Did you remember?"
line "The Bug-Catching"
cont "Contest is today."
@@ -1028,7 +1028,7 @@ UnknownText_0x65da6: ; 0x65da6
done
; 0x65de4
-UnknownText_0x65de4: ; 0x65de4
+TullyGrownText: ; 0x65de4
text "My @"
text_from_ram StringBuffer4
text " has"
@@ -1142,7 +1142,7 @@ UnknownText_0x66087: ; 0x66087
done
; 0x660be
-UnknownText_0x660be: ; 0x660be
+BrentRareTradeText: ; 0x660be
text "Oh yeah, I got an"
line "extremely rare"
@@ -1394,7 +1394,7 @@ UnknownText_0x66730: ; 0x66730
done
; 0x66796
-UnknownText_0x66796: ; 0x66796
+TiffanyItsAwfulText: ; 0x66796
text_from_ram StringBuffer4
text "!"
@@ -1471,7 +1471,7 @@ UnknownText_0x6691d: ; 0x6691d
done
; 0x66980
-UnknownText_0x66980: ; 0x66980
+VanceLiftoffText: ; 0x66980
text "My @"
text_from_ram StringBuffer4
text "'s"
@@ -1525,14 +1525,14 @@ UnknownText_0x66a93: ; 0x66a93
done
; 0x66aa5
-UnknownText_0x66aa5: ; 0x66aa5
+VanceLookingForwardText: ; 0x66aa5
text "I'll be looking"
line "forward to our"
cont "next battle!"
done
; 0x66ad1
-UnknownText_0x66ad1: ; 0x66ad1
+VanceHurryHurryText: ; 0x66ad1
text "Oh, <PLAY_G>!"
line "Hurry, hurry!"
@@ -1543,7 +1543,7 @@ UnknownText_0x66ad1: ; 0x66ad1
done
; 0x66afc
-UnknownText_0x66afc: ; 0x66afc
+WiltonGrownText: ; 0x66afc
text "My @"
text_from_ram StringBuffer4
text "'s"
@@ -1613,7 +1613,7 @@ UnknownText_0x66c6b: ; 0x66c6b
done
; 0x66ca7
-UnknownText_0x66ca7: ; 0x66ca7
+WiltonHaventFoundAnythingText: ; 0x66ca7
text "Nah, I haven't"
line "found anything"
@@ -1625,7 +1625,7 @@ UnknownText_0x66ca7: ; 0x66ca7
done
; 0x66cf7
-UnknownText_0x66cf7: ; 0x66cf7
+WiltonNotBitingText: ; 0x66cf7
text "Sigh…"
line "They're not biting"
@@ -1639,7 +1639,7 @@ UnknownText_0x66cf7: ; 0x66cf7
done
; 0x66d45
-UnknownText_0x66d45: ; 0x66d45
+WiltonWantThisText: ; 0x66d45
text "Don't you want"
line "this item?"
@@ -1707,7 +1707,7 @@ UnknownText_0x66ed3: ; 0x66ed3
done
; 0x66f11
-UnknownText_0x66f11: ; 0x66f11
+KenjiBreakText: ; 0x66f11
text "I'm taking a break"
line "on ROUTE 45!"
@@ -1727,7 +1727,7 @@ UnknownText_0x66f52: ; 0x66f52
done
; 0x66f9f
-UnknownText_0x66f9f: ; 0x66f9f
+ParryNoMatchText: ; 0x66f9f
text "Nothing can match"
line "my @"
text_from_ram StringBuffer4
@@ -1786,13 +1786,13 @@ UnknownText_0x670eb: ; 0x670eb
done
; 0x67106
-UnknownText_0x67106: ; 0x67106
+ParryBattleWithMeText: ; 0x67106
text "You'll battle with"
line "me again, right?"
done
; 0x6712a
-UnknownText_0x6712a: ; 0x6712a
+ParryHaventYouGottenToText: ; 0x6712a
text "Haven't you gotten"
line "to @"
text_from_ram StringBuffer5
@@ -1858,7 +1858,7 @@ UnknownText_0x67281: ; 0x67281
done
; 0x67294
-UnknownText_0x67294: ; 0x67294
+ErinWorkingHardText: ; 0x67294
text "I'm working hard"
line "to raise my"
cont "#MON!"
@@ -1868,7 +1868,7 @@ UnknownText_0x67294: ; 0x67294
done
; 0x672d5
-UnknownText_0x672d5: ; 0x672d5
+ErinComeBattleText: ; 0x672d5
text "Oh, <PLAY_G>!"
line "Come battle ERIN!"
diff --git a/text/phone/extra2.asm b/text/phone/extra2.asm
new file mode 100644
index 000000000..cef21f23b
--- /dev/null
+++ b/text/phone/extra2.asm
@@ -0,0 +1,1927 @@
+UnknownText_0x174000: ; 0x174000
+ text "Hi, <PLAY_G>!"
+ line "Our BICYCLE sales"
+
+ para "have gone through"
+ line "the roof!"
+
+ para "We owe it all to"
+ line "your advertising"
+
+ para "by riding around"
+ line "on our BICYCLE."
+
+ para "As our way of say-"
+ line "ing thanks, please"
+
+ para "keep that BICYCLE."
+ line "Thanks again!"
+ done
+; 0x1740c0
+
+JackIntelligenceText: ; 0x1740c0
+ text "My @"
+ text_from_ram StringBuffer4
+ text "'s"
+ line "intelligence keeps"
+
+ para "rising. It might"
+ line "be smarter than"
+ cont "yours!"
+ done
+; 0x174106
+
+JackDefeatedMonText: ; 0x174106
+ text "The other day, I"
+ line "easily defeated a"
+ cont "@"
+ text_from_ram StringBuffer4
+ text "."
+
+ para "I think swapping"
+ line "tips with you is"
+ cont "starting to help."
+ done
+; 0x174165
+
+UnknownText_0x174165: ; 0x174165
+ text "Oh, and listen."
+ line "I missed catching"
+
+ para "a @"
+ text_from_ram StringBuffer4
+ text " by"
+ line "just a tiny bit."
+
+ para "If I'd been a bit"
+ line "more informed, I'm"
+
+ para "sure I would've"
+ line "caught it…"
+ done
+; 0x1741e1
+
+UnknownText_0x1741e1: ; 0x1741e1
+ text "Do you want to"
+ line "battle? I'll show"
+
+ para "you how to battle"
+ line "logically."
+
+ para "I'll be in"
+ line "@"
+ text_from_ram StringBuffer5
+ text "."
+
+ para "Give me a shout if"
+ line "you're nearby."
+ done
+; 0x174251
+
+UnknownText_0x174251: ; 0x174251
+ text "See you later!"
+ done
+; 0x174261
+
+JackThunderTriviaText: ; 0x174261
+ text "Did you know?"
+
+ para "When it's raining,"
+ line "THUNDER is sure to"
+ cont "strike."
+ done
+; 0x17429d
+
+JackRolloutTriviaText: ; 0x17429d
+ text "Did you know…?"
+
+ para "If you use DEFENSE"
+ line "CURL, ROLLOUT's"
+
+ para "power goes way up"
+ line "past normal."
+ done
+; 0x1742ee
+
+JackSolarbeamTriviaText: ; 0x1742ee
+ text "Did you know…?"
+
+ para "If the sunlight is"
+ line "harsh, SOLARBEAM"
+
+ para "doesn't need to be"
+ line "charged up."
+ done
+; 0x174340
+
+JackStompTriviaText: ; 0x174340
+ text "Did you know…?"
+
+ para "If the opponent"
+ line "uses MINIMIZE,"
+
+ para "your STOMP becomes"
+ line "more powerful."
+ done
+; 0x174391
+
+JackGustTriviaText: ; 0x174391
+ text "Did you know…?"
+
+ para "If your opponent"
+ line "is FLYing, your"
+
+ para "GUST becomes much"
+ line "more powerful."
+ done
+; 0x1743e3
+
+JackTwisterTriviaText: ; 0x1743e3
+ text "Did you know…?"
+
+ para "If your opponent"
+ line "is FLYing, your"
+
+ para "TWISTER becomes"
+ line "more powerful."
+ done
+; 0x174433
+
+JackEarthquakeTriviaText: ; 0x174433
+ text "Did you know…?"
+
+ para "If your opponent"
+ line "uses DIG, your"
+
+ para "EARTHQUAKE becomes"
+ line "more powerful."
+ done
+; 0x174485
+
+JackMagnitudeTriviaText: ; 0x174485
+ text "Did you know…?"
+
+ para "If your opponent"
+ line "uses DIG, your"
+
+ para "MAGNITUDE becomes"
+ line "more powerful."
+ done
+; 0x1744d6
+
+JackSandstormTriviaText: ; 0x1744d6
+ text "Did you know…?"
+
+ para "The rock, ground"
+ line "and steel types"
+
+ para "can't be hurt by"
+ line "SANDSTORM."
+ done
+; 0x174522
+
+JackSunnyDayTriviaText: ; 0x174522
+ text "Did you know…?"
+
+ para "If the sunlight is"
+ line "harsh, water-type"
+
+ para "moves become much"
+ line "weaker."
+ done
+; 0x174571
+
+JackRainDanceTriviaText: ; 0x174571
+ text "Did you know…?"
+
+ para "When it's raining,"
+ line "fire-type moves"
+
+ para "become much weaker"
+ line "than usual."
+ done
+; 0x1745c2
+
+UnknownText_0x1745c2: ; 0x1745c2
+ text "My friend heard"
+ line "some great tips."
+
+ para "He's going to let"
+ line "me in on some."
+
+ para "When he tells me,"
+ line "I'll call right"
+ cont "away and tell you."
+ done
+; 0x174638
+
+UnknownText_0x174638: ; 0x174638
+ text "Hey, <PLAY_G>!"
+
+ para "Do you remember"
+ line "your promise?"
+
+ para "We have to battle"
+ line "soon!"
+
+ para "I'll be at"
+ line "@"
+ text_from_ram StringBuffer5
+ text "."
+ done
+; 0x174688
+
+UnknownText_0x174688: ; 0x174688
+ text "I fancied up my"
+ line "@"
+ text_from_ram StringBuffer4
+ text " and"
+
+ para "made it even cuter"
+ line "than before!"
+ done
+; 0x1746c3
+
+UnknownText_0x1746c3: ; 0x1746c3
+ text "I happened to come"
+ line "across a wild"
+ cont "SNUBBULL recently."
+
+ para "My SNUBBULL, I"
+ line "assure you, was"
+
+ para "far cuter than the"
+ line "wild one."
+ done
+; 0x174734
+
+UnknownText_0x174734: ; 0x174734
+ text "I happened to see"
+ line "a wild MARILL the"
+
+ para "other day."
+ line "Or so I thought."
+
+ para "A closer look"
+ line "showed it was"
+
+ para "@"
+ text_from_ram StringBuffer4
+ text ". I was"
+ line "quite miffed."
+ done
+; 0x1747ac
+
+UnknownText_0x1747ac: ; 0x1747ac
+ text "You can expect a"
+ line "call from me."
+ done
+; 0x1747cc
+
+BeverlyFoundNuggetText: ; 0x1747cc
+ text "My husband got"
+ line "some NUGGETS."
+
+ para "If you'd like, you"
+ line "could have one as"
+
+ para "thanks for helping"
+ line "me out."
+
+ para "I'll be at"
+ line "@"
+ text_from_ram StringBuffer5
+ text "."
+
+ para "Please come see me"
+ line "when you can."
+ done
+; 0x17485b
+
+UnknownText_0x17485b: ; 0x17485b
+ text "Are your #MON"
+ line "in prime form?"
+
+ para "Let's chat about"
+ line "#MON again."
+ done
+; 0x174895
+
+UnknownText_0x174895: ; 0x174895
+ text "Pardon?"
+ line "Oh, the NUGGET?"
+
+ para "There's no need to"
+ line "hurry. Come see me"
+
+ para "in @"
+ text_from_ram StringBuffer5
+ text ""
+ line "when you can."
+ done
+; 0x1748ea
+
+UnknownText_0x1748ea: ; 0x1748ea
+ text "Hey, I challenge"
+ line "you to a battle!"
+
+ para "It won't be like"
+ line "last time!"
+
+ para "@"
+ text_from_ram StringBuffer5
+ text "'s"
+ line "where I'm waiting"
+
+ para "for you. Hustle"
+ line "over here pronto!"
+ done
+; 0x174962
+
+UnknownText_0x174962: ; 0x174962
+ text "See ya!"
+ done
+; 0x17496b
+
+UnknownText_0x17496b: ; 0x17496b
+ text "We have to battle"
+ line "again sometime."
+
+ para "You can bet I'm"
+ line "going to keep"
+
+ para "challenging you"
+ line "till I win."
+ done
+; 0x1749c7
+
+UnknownText_0x1749c7: ; 0x1749c7
+ text "Hey, you'd better"
+ line "not have forgotten"
+ cont "about our battle!"
+
+ para "@"
+ text_from_ram StringBuffer5
+ text "!"
+
+ para "Hustle over quick!"
+ line "I'm waiting!"
+ done
+; 0x174a24
+
+GavenGreaterText: ; 0x174a24
+ text "My @"
+ text_from_ram StringBuffer4
+ text ""
+ line "might be greater"
+ cont "than I imagined."
+
+ para "I doubt I'll see a"
+ line "@"
+ text_from_ram StringBuffer4
+ text " that's"
+ cont "better than mine."
+ done
+; 0x174a80
+
+UnknownText_0x174a80: ; 0x174a80
+ text "Oh, and I managed"
+ line "to barely defeat"
+
+ para "@"
+ text_from_ram StringBuffer4
+ text " the"
+ line "other day."
+
+ para "I've never seen a"
+ line "@"
+ text_from_ram StringBuffer4
+ text " get"
+ cont "that strong…"
+
+ para "You shouldn't let"
+ line "your guard down,"
+
+ para "even against a"
+ line "#MON you're"
+ cont "used to seeing."
+ done
+; 0x174b2d
+
+UnknownText_0x174b2d: ; 0x174b2d
+ text "And a while back,"
+ line "I tried to catch a"
+ cont "wild @"
+ text_from_ram StringBuffer4
+ text "."
+
+ para "But it managed to"
+ line "elude me."
+
+ para "One wrong decision"
+ line "could mean total"
+
+ para "failure… You ought"
+ line "to be careful too."
+ done
+; 0x174bc5
+
+UnknownText_0x174bc5: ; 0x174bc5
+ text "Let's battle!"
+
+ para "I'll be waiting on"
+ line "@"
+ text_from_ram StringBuffer5
+ text "."
+
+ para "Give me a shout"
+ line "when you're close."
+ done
+; 0x174c0e
+
+UnknownText_0x174c0e: ; 0x174c0e
+ text "OK, I'll talk to"
+ line "you soon!"
+ done
+; 0x174c29
+
+UnknownText_0x174c29: ; 0x174c29
+ text "I obsess over how"
+ line "to beat you."
+ done
+; 0x174c49
+
+UnknownText_0x174c49: ; 0x174c49
+ text "<PLAY_G>, why"
+ line "aren't you here?"
+
+ para "I'll take you down"
+ line "with @"
+ text_from_ram StringBuffer5
+ text "!"
+ done
+; 0x174c7f
+
+UnknownText_0x174c7f: ; 0x174c7f
+ text "Do you remember my"
+ line "sweet @"
+ text_from_ram StringBuffer4
+ text "?"
+
+ para "@"
+ text_from_ram StringBuffer4
+ text " runs"
+ line "very fast."
+
+ para "It's exhilarating"
+ line "to ride on its"
+
+ para "back when it"
+ line "really gets going."
+ done
+; 0x174cf6
+
+UnknownText_0x174cf6: ; 0x174cf6
+ text "Oh, have you ever"
+ line "seen a @"
+ text_from_ram StringBuffer4
+ text ""
+ cont "before?"
+
+ para "I just battled"
+ line "one…"
+
+ para "It was much faster"
+ line "than I expected."
+
+ para "I was a little"
+ line "shocked."
+
+ para "I still won, of"
+ line "course."
+ done
+; 0x174d86
+
+UnknownText_0x174d86: ; 0x174d86
+ text "Oh, I just saw a"
+ line "wild @"
+ text_from_ram StringBuffer4
+ text "."
+
+ para "I was trying to"
+ line "catch it when I"
+
+ para "noticed that I was"
+ line "all out of #"
+ cont "BALLS."
+
+ para "If you don't check"
+ line "your items, you"
+
+ para "may run out at the"
+ line "worst time."
+
+ para "I hope you learn"
+ line "from my mistake."
+ done
+; 0x174e4e
+
+UnknownText_0x174e4e: ; 0x174e4e
+ text "Do you want to"
+ line "battle? I'm going"
+ cont "to win this time!"
+
+ para "I'll be waiting"
+ line "for you around"
+
+ para "@"
+ text_from_ram StringBuffer5
+ text "."
+ line "Look for me, OK?"
+ done
+; 0x174eb7
+
+UnknownText_0x174eb7: ; 0x174eb7
+ text "OK, bye-bye!"
+ done
+; 0x174ec5
+
+UnknownText_0x174ec5: ; 0x174ec5
+ text "Let's battle again"
+ line "sometime!"
+ done
+; 0x174ee2
+
+BethForgetDealText: ; 0x174ee2
+ text "Um… <PLAY_G>?"
+ line "What's wrong?"
+
+ para "Did you forget our"
+ line "deal?"
+
+ para "@"
+ text_from_ram StringBuffer5
+ text "."
+
+ para "That's where I'm"
+ line "waiting."
+ done
+; 0x174f2f
+
+JoseAromaText: ; 0x174f2f
+ text "Hey listen, my"
+ line "@"
+ text_from_ram StringBuffer4
+ text "'s stick"
+
+ para "has this really"
+ line "delicious aroma."
+
+ para "That aroma gets my"
+ line "appetite going!"
+ done
+; 0x174f90
+
+UnknownText_0x174f90: ; 0x174f90
+ text "A while ago, my"
+ line "FARFETCH'D KO'd"
+ cont "this @"
+ text_from_ram StringBuffer4
+ text "."
+
+ para "You should have"
+ line "seen FARFETCH'D"
+
+ para "wield that stick."
+ line "Amazing stuff!"
+ done
+; 0x174ffd
+
+UnknownText_0x174ffd: ; 0x174ffd
+ text "I ran into a wild"
+ line "@"
+ text_from_ram StringBuffer4
+ text "…"
+
+ para "I was trying to"
+ line "catch it, but it"
+
+ para "took off faster"
+ line "than I thought it"
+
+ para "would. It was a"
+ line "bit disappointing."
+ done
+; 0x17507d
+
+UnknownText_0x17507d: ; 0x17507d
+ text "Want to battle"
+ line "again?"
+
+ para "For some reason,"
+ line "my FARFETCH'D is"
+
+ para "all worked up and"
+ line "raring to go."
+
+ para "@"
+ text_from_ram StringBuffer5
+ text "'s"
+ line "where I'm at."
+
+ para "Keep an eye out"
+ line "for me, OK?"
+ done
+; 0x175106
+
+UnknownText_0x175106: ; 0x175106
+ text "Be seeing you!"
+ done
+; 0x175116
+
+JoseFoundSomethingText: ; 0x175116
+ text "My FARFETCH'D had"
+ line "something pretty"
+ cont "in its beak."
+
+ para "Like I promised,"
+ line "you can have it."
+
+ para "Catch up to me on"
+ line "@"
+ text_from_ram StringBuffer5
+ text ","
+
+ para "and I'll let you"
+ line "have it."
+ done
+; 0x17519b
+
+UnknownText_0x17519b: ; 0x17519b
+ text "I haven't gotten"
+ line "what I promised"
+ cont "you yet."
+
+ para "I'll call you as"
+ line "soon as I get it,"
+
+ para "so could you wait"
+ line "a little longer?"
+ done
+; 0x17520a
+
+UnknownText_0x17520a: ; 0x17520a
+ text "<PLAY_G>, could you"
+ line "hurry over?"
+
+ para "FARFETCH'D is"
+ line "agitated."
+
+ para "If you don't come"
+ line "soon, it might"
+
+ para "smack me with its"
+ line "stick!"
+
+ para "@"
+ text_from_ram StringBuffer5
+ text "!"
+
+ para "Please come as"
+ line "soon as you can!"
+ done
+; 0x17529c
+
+UnknownText_0x17529c: ; 0x17529c
+ text "What's wrong?"
+
+ para "Don't you want"
+ line "this gift?"
+
+ para "Catch up to me on"
+ line "@"
+ text_from_ram StringBuffer5
+ text ","
+
+ para "and I'll let you"
+ line "have it."
+ done
+; 0x1752f5
+
+UnknownText_0x1752f5: ; 0x1752f5
+ text "Listen, dear…"
+
+ para "Do you recall my"
+ line "@"
+ text_from_ram StringBuffer4
+ text "?"
+
+ para "Yes, exactly. That"
+ line "lovely @"
+ text_from_ram StringBuffer4
+ text "."
+
+ para "Wouldn't you agree"
+ line "it's a perfect"
+ cont "match for me?"
+ done
+; 0x17536b
+
+UnknownText_0x17536b: ; 0x17536b
+ text "Have I ever faced"
+ line "a wild @"
+ text_from_ram StringBuffer4
+ text "?"
+
+ para "You need to ask?"
+
+ para "@"
+ text_from_ram StringBuffer4
+ text " I've"
+ line "beaten on numerous"
+ cont "occasions!"
+ done
+; 0x1753c5
+
+UnknownText_0x1753c5: ; 0x1753c5
+ text "Have I ever failed"
+ line "to catch a wild"
+ cont "#MON?"
+
+ para "You need to ask?"
+
+ para "I would never fail"
+ line "to catch a wild"
+
+ para "@"
+ text_from_ram StringBuffer4
+ text "…"
+ line "Oh! Never mind!"
+ done
+; 0x17543a
+
+UnknownText_0x17543a: ; 0x17543a
+ text "We are going to"
+ line "battle!"
+
+ para "The place shall be"
+ line "@"
+ text_from_ram StringBuffer5
+ text "!"
+
+ para "Don't make me"
+ line "wait! Got it?"
+ done
+; 0x175488
+
+UnknownText_0x175488: ; 0x175488
+ text "Fine, you may go."
+ done
+; 0x17549b
+
+UnknownText_0x17549b: ; 0x17549b
+ text "Don't be too proud"
+ line "just because you"
+
+ para "happened to beat"
+ line "me… "
+
+ para "It was a fluke!"
+ done
+; 0x1754e5
+
+UnknownText_0x1754e5: ; 0x1754e5
+ text "What are you"
+ line "doing?"
+
+ para "I told you that"
+ line "the place was"
+
+ para "@"
+ text_from_ram StringBuffer5
+ text "!"
+ line "Don't try to run!"
+ done
+; 0x175530
+
+JoeySharperText: ; 0x175530
+ text "My @"
+ text_from_ram StringBuffer4
+ text "'s"
+ line "looking sharper"
+ cont "than before!"
+
+ para "I doubt there's a"
+ line "#MON as cool as"
+
+ para "this guy in your"
+ line "party!"
+ done
+; 0x175591
+
+UnknownText_0x175591: ; 0x175591
+ text "Oh yeah, I took"
+ line "down a @"
+ text_from_ram StringBuffer4
+ text ""
+ para "in the wild the"
+ line "other day."
+
+ para "It was a cakewalk."
+ line "Well, I guess it"
+
+ para "can't be helped,"
+ line "us being so tough."
+ done
+; 0x175611
+
+UnknownText_0x175611: ; 0x175611
+ text "Oh yeah, I saw a"
+ line "wild @"
+ text_from_ram StringBuffer4
+ text "!"
+
+ para "I thought about"
+ line "going for it, but"
+
+ para "I decided to work"
+ line "with my one-and-"
+
+ para "only right to the"
+ line "extreme end."
+ done
+; 0x175693
+
+UnknownText_0x175693: ; 0x175693
+ text "Let's get together"
+ line "and battle!"
+
+ para "I promise things"
+ line "will be different!"
+
+ para "@"
+ text_from_ram StringBuffer5
+ text "'s"
+ line "where I'll be."
+
+ para "Give me a shout"
+ line "when you come."
+ done
+; 0x17570a
+
+UnknownText_0x17570a: ; 0x17570a
+ text "All right. Later!"
+ done
+; 0x17571d
+
+UnknownText_0x17571d: ; 0x17571d
+ text "I'm checking out"
+ line "@"
+ text_from_ram StringBuffer4
+ text "'s moves"
+
+ para "and devising some"
+ line "strategies."
+
+ para "When I come up"
+ line "with a good one,"
+ cont "let's battle!"
+ done
+; 0x175786
+
+UnknownText_0x175786: ; 0x175786
+ text "What's keeping"
+ line "you, <PLAYER>!"
+
+ para "Let's get down and"
+ line "battle already!"
+
+ para "I'm waiting on"
+ line "@"
+ text_from_ram StringBuffer5
+ text "!"
+ done
+; 0x1757d4
+
+WadeAreYouGrowingText: ; 0x1757d4
+ text "Are your #MON"
+ line "growing?"
+
+ para "My #MON are"
+ line "growing a bit too"
+
+ para "quickly for me."
+ line "It's overwhelming!"
+
+ para "@"
+ text_from_ram StringBuffer4
+ text "'s grow-"
+ line "ing especially"
+
+ para "quickly. I think"
+ line "it'll get tough."
+ done
+; 0x175869
+
+UnknownText_0x175869: ; 0x175869
+ text "Oh yeah, we KO'd a"
+ line "wild @"
+ text_from_ram StringBuffer4
+ text ""
+ para "with one hit a"
+ line "while back."
+
+ para "It went down so"
+ line "easily, I felt a"
+
+ para "little sorry for"
+ line "the poor thing."
+ done
+; 0x1758e4
+
+UnknownText_0x1758e4: ; 0x1758e4
+ text "Oh yeah, a wild"
+ line "@"
+ text_from_ram StringBuffer4
+ text " got"
+
+ para "away from me at"
+ line "the last second."
+
+ para "I know it's a"
+ line "common #MON…"
+
+ para "But it does annoy"
+ line "me that it got"
+
+ para "away when I almost"
+ line "had it."
+ done
+; 0x175976
+
+UnknownText_0x175976: ; 0x175976
+ text "Do you feel like a"
+ line "#MON battle?"
+
+ para "It won't be like"
+ line "last time!"
+
+ para "@"
+ text_from_ram StringBuffer5
+ text "'s"
+ line "where I'll be."
+
+ para "Let me know when"
+ line "you get there."
+ done
+; 0x1759e7
+
+UnknownText_0x1759e7: ; 0x1759e7
+ text "See you later!"
+ done
+; 0x1759f7
+
+WadeBugCatchingContestText: ; 0x1759f7
+ text "The Bug-Catching"
+ line "Contest is at the"
+
+ para "NATIONAL PARK"
+ line "today."
+
+ para "Are you going,"
+ line "<PLAY_G>?"
+
+ para "I'm trying to make"
+ line "up my mind."
+ done
+; 0x175a60
+
+WadeFoundBerryText: ; 0x175a60
+ text "I found all kinds"
+ line "of BERRIES. If you"
+
+ para "want, I'll share"
+ line "some with you."
+
+ para "I'll be waiting on"
+ line "@"
+ text_from_ram StringBuffer5
+ text "."
+ done
+; 0x175abe
+
+UnknownText_0x175abe: ; 0x175abe
+ text "Huh? BERRIES?"
+
+ para "Sorry, I haven't"
+ line "found any yet."
+
+ para "I'll call you if I"
+ line "find any. Will you"
+ cont "please wait?"
+ done
+; 0x175b1e
+
+UnknownText_0x175b1e: ; 0x175b1e
+ text "Let's battle"
+ line "already!"
+
+ para "@"
+ text_from_ram StringBuffer5
+ text " is"
+ line "where I am."
+
+ para "Please get here as"
+ line "soon as you can!"
+ done
+; 0x175b6d
+
+UnknownText_0x175b6d: ; 0x175b6d
+ text "How come you're"
+ line "not here yet?"
+
+ para "@"
+ text_from_ram StringBuffer5
+ text " is"
+ line "where I am."
+
+ para "Please get here as"
+ line "soon as you can!"
+ done
+; 0x175bc4
+
+RalphNeglectingKidsText: ; 0x175bc4
+ text "I've been spending"
+ line "more time with my"
+
+ para "@"
+ text_from_ram StringBuffer4
+ text " than I"
+ line "have with my kids."
+
+ para "That's a bit sad,"
+ line "actually."
+ done
+; 0x175c24
+
+UnknownText_0x175c24: ; 0x175c24
+ text "I just beat a wild"
+ line "@"
+ text_from_ram StringBuffer4
+ text "."
+
+ para "I told my kid, but"
+ line "he scoffed that he"
+
+ para "could do the same"
+ line "thing easily."
+
+ para "Boy, has he gotten"
+ line "cocky…"
+ done
+; 0x175c9f
+
+UnknownText_0x175c9f: ; 0x175c9f
+ text "Yesterday a wild"
+ line "@"
+ text_from_ram StringBuffer4
+ text " slipped"
+
+ para "away from me, in"
+ line "front of my kid."
+
+ para "I was feeling down"
+ line "about it until he"
+
+ para "shared his #"
+ line "BALLS with me."
+
+ para "Hahah, that sure"
+ line "made my day!"
+ done
+; 0x175d40
+
+UnknownText_0x175d40: ; 0x175d40
+ text "What do you say to"
+ line "a battle with me?"
+
+ para "Good, you're going"
+ line "to do it!"
+
+ para "For a kid, you're"
+ line "quite agreeable."
+
+ para "@"
+ text_from_ram StringBuffer5
+ text " is"
+ line "the spot!"
+ done
+; 0x175db7
+
+UnknownText_0x175db7: ; 0x175db7
+ text "You call your mom"
+ line "sometimes too!"
+ done
+; 0x175dd9
+
+UnknownText_0x175dd9: ; 0x175dd9
+ text "Listen, I… Yowch!"
+
+ para "Uh, sorry! See,"
+ line "@"
+ text_from_ram StringBuffer4
+ text " are"
+
+ para "biting like there"
+ line "is no tomorrow"
+
+ para "over here on"
+ line "@"
+ text_from_ram StringBuffer5
+ text "!"
+
+ para "Aiyee! Ouch!"
+ line "One jabbed me!"
+
+ para "Heh, they're some"
+ line "kind of feisty!"
+
+ para "<PLAY_G>, you have"
+ line "to see this rare"
+
+ para "sight! Get ready"
+ line "to fish!"
+ done
+; 0x175eaf
+
+UnknownText_0x175eaf: ; 0x175eaf
+ text "Yeah, I know."
+
+ para "You're looking for"
+ line "rare #MON."
+
+ para "Recently, all I've"
+ line "been catching are"
+ cont "MAGIKARP, though…"
+ done
+; 0x175f11
+
+UnknownText_0x175f11: ; 0x175f11
+ text "So where are you?"
+ line "I'm waiting for"
+
+ para "you to show up on"
+ line "@"
+ text_from_ram StringBuffer5
+ text "."
+
+ para "You shouldn't make"
+ line "your elders wait!"
+ done
+; 0x175f70
+
+UnknownText_0x175f70: ; 0x175f70
+ text "Hey, what's the"
+ line "matter with you?"
+
+ para "Aren't you coming"
+ line "over to fish for"
+ cont "QWILFISH?"
+
+ para "I'm on ROUTE 32,"
+ line "so hurry up!"
+ done
+; 0x175fda
+
+UnknownText_0x175fda: ; 0x175fda
+ text "Oh, you have to"
+ line "hear this."
+
+ para "My @"
+ text_from_ram StringBuffer4
+ text " is"
+ line "so adorable!"
+
+ para "It always wants to"
+ line "nuzzle me!"
+ done
+; 0x17602d
+
+UnknownText_0x17602d: ; 0x17602d
+ text "And, and! Um…"
+
+ para "We beat a wild"
+ line "@"
+ text_from_ram StringBuffer4
+ text " with"
+
+ para "just one hit a"
+ line "little while ago."
+
+ para "We felt sorry for"
+ line "it, though."
+ done
+; 0x176095
+
+UnknownText_0x176095: ; 0x176095
+ text "And, and! Uh…"
+
+ para "We just saw a"
+ line "really gorgeous"
+ cont "@"
+ text_from_ram StringBuffer4
+ text "."
+
+ para "But I was on the"
+ line "phone, so it got"
+
+ para "away. It made us"
+ line "really angry!"
+ done
+; 0x17610a
+
+UnknownText_0x17610a: ; 0x17610a
+ text "Hi! Do you have"
+ line "some free time?"
+
+ para "I've got all sorts"
+ line "of time. If you're"
+
+ para "free, would you"
+ line "like to battle?"
+
+ para "I'll be waiting on"
+ line "@"
+ text_from_ram StringBuffer5
+ text "."
+
+ para "Let me know when"
+ line "you get here!"
+ done
+; 0x1761a7
+
+LizHiTaniaText: ; 0x1761a7
+ text "Hi, TANIA. How are"
+ line "you? This is LIZ."
+
+ para "I'm fine, but I'm"
+ line "bored silly!"
+
+ para "Huh… Wrong number?"
+ line "Oops! Sorry!"
+ done
+; 0x17620a
+
+UnknownText_0x17620a: ; 0x17620a
+ text "OK, I'll call you"
+ line "later!"
+ done
+; 0x176223
+
+UnknownText_0x176223: ; 0x176223
+ text "Listen, listen!"
+
+ para "I was listening to"
+ line "the radio in the"
+
+ para "RUINS OF ALPH when"
+ line "an odd broadcast"
+
+ para "suddenly cut it on"
+ line "the regular show."
+
+ para "I wonder what it"
+ line "was. So strange!"
+ done
+; 0x1762c3
+
+UnknownText_0x1762c3: ; 0x1762c3
+ text "Listen, listen!"
+
+ para "Don't you think"
+ line "FALKNER of VIOLET"
+
+ para "GYM is cool and"
+ line "handsome?"
+
+ para "But they say his"
+ line "dad, who's out"
+
+ para "training on the"
+ line "road, is even more"
+
+ para "cool and handsome"
+ line "than FALKNER."
+
+ para "I wish I could"
+ line "meet him!"
+ done
+; 0x17638a
+
+UnknownText_0x17638a: ; 0x17638a
+ text "Listen, listen!"
+
+ para "Do you know EARL,"
+ line "the teacher who"
+
+ para "runs the #MON"
+ line "ACADEMY in VIOLET?"
+
+ para "I saw him doing"
+ line "pirouettes while"
+
+ para "he was running. It"
+ line "was wildly funny!"
+ done
+; 0x176424
+
+UnknownText_0x176424: ; 0x176424
+ text "Listen, listen!"
+
+ para "I collect #MON"
+ line "plush dolls."
+
+ para "But I can't seem"
+ line "to get a hold of a"
+
+ para "SURF PIKACHU DOLL."
+ line "None of my friends"
+
+ para "have it. It must"
+ line "be totally rare!"
+
+ para "You could really"
+ line "brag about it if"
+ cont "you had one."
+ done
+; 0x1764eb
+
+UnknownText_0x1764eb: ; 0x1764eb
+ text "Listen, listen!"
+
+ para "Do you know about"
+ line "MOOMOO MILK?"
+
+ para "You can buy it at"
+ line "MOOMOO FARM."
+
+ para "It's supposed to"
+ line "be good for health"
+
+ para "and beauty."
+ line "I really want to"
+
+ para "try some. I bet"
+ line "it's delicious!"
+ done
+; 0x176599
+
+UnknownText_0x176599: ; 0x176599
+ text "Listen, listen!"
+
+ para "There's a #MON"
+ line "SALON in GOLDENROD"
+
+ para "that's run by two"
+ line "brothers."
+
+ para "The older brother"
+ line "is good, but the"
+
+ para "younger one really"
+ line "isn't."
+
+ para "But sometimes the"
+ line "younger one does a"
+
+ para "better job than"
+ line "his brother."
+
+ para "Every time I go, I"
+ line "have a hard time"
+
+ para "trying to decide"
+ line "whom I should use…"
+ done
+; 0x1766ac
+
+UnknownText_0x1766ac: ; 0x1766ac
+ text "Listen, listen!"
+
+ para "GOLDENROD GYM's"
+ line "WHITNEY began"
+
+ para "battling only a"
+ line "little while ago!"
+
+ para "But the #MON"
+ line "LEAGUE chose her"
+ cont "as a GYM LEADER!"
+
+ para "I bet she must be"
+ line "totally talented."
+ done
+; 0x17674f
+
+UnknownText_0x17674f: ; 0x17674f
+ text "Listen, listen!"
+
+ para "Have you ever"
+ line "taken part in a"
+
+ para "Bug-Catching"
+ line "Contest at the"
+ cont "NATIONAL PARK?"
+
+ para "I did once, but"
+ line "all I could catch"
+ cont "was a CATERPIE."
+
+ para "But guess what!"
+
+ para "I won with that"
+ line "CATERPIE. Isn't"
+ cont "that great?"
+ done
+; 0x176816
+
+UnknownText_0x176816: ; 0x176816
+ text "Listen, listen!"
+
+ para "I saw a beautiful"
+ line "@"
+ text_from_ram StringBuffer4
+ text "!"
+
+ para "I wish I could"
+ line "become a beautiful"
+ cont "@"
+ text_from_ram StringBuffer4
+ text " too."
+ done
+; 0x17686d
+
+UnknownText_0x17686d: ; 0x17686d
+ text "Listen, listen!"
+
+ para "Uh… Um… Whoops!"
+
+ para "I forgot what I"
+ line "was going to say!"
+ done
+; 0x1768b0
+
+UnknownText_0x1768b0: ; 0x1768b0
+ text "Listen, listen!"
+
+ para "My @"
+ text_from_ram StringBuffer4
+ text "…"
+ line "it… so pretty…"
+
+ para "and… giggle… so"
+ line "awesome… yes… but…"
+
+ para "very much… eeek!"
+ line "And… lovely…"
+
+ para "Just ravishing…"
+ line "Oh, too much!"
+
+ para "…Hug it… sleeping…"
+ line "That's right…"
+
+ para "pretty… sigh… So"
+ line "nice… Cute…"
+
+ para "…Oops! Look at the"
+ line "time! I chatted"
+ cont "too long!"
+
+ para "I'm sorry I took"
+ line "so much of your"
+
+ para "time!"
+ line "I love chatting!"
+ done
+; 0x1769da
+
+UnknownText_0x1769da: ; 0x1769da
+ text "I've got too much"
+ line "time on my hands!"
+
+ para "Let's battle right"
+ line "away!"
+
+ para "I'll be waiting on"
+ line "@"
+ text_from_ram StringBuffer5
+ text "!"
+ done
+; 0x176a2f
+
+AnthonyAteBerriesText: ; 0x176a2f
+ text "The other day, I"
+ line "was watching my"
+
+ para "@"
+ text_from_ram StringBuffer4
+ text " eat"
+ line "some BERRIES."
+
+ para "It looked like it"
+ line "was enjoying its"
+
+ para "meal, so I decided"
+ line "to try some."
+
+ para "I'm not sure if"
+ line "people should eat"
+
+ para "that stuff, but it"
+ line "was delicious!"
+ done
+; 0x176aef
+
+UnknownText_0x176aef: ; 0x176aef
+ text "Lately, I've been"
+ line "running across"
+
+ para "wild @"
+ text_from_ram StringBuffer4
+ text ""
+ line "quite often."
+
+ para "They're easily"
+ line "taken care of."
+ done
+; 0x176b45
+
+UnknownText_0x176b45: ; 0x176b45
+ text "Oh yeah, I was"
+ line "battling this"
+
+ para "@"
+ text_from_ram StringBuffer4
+ text " the"
+ line "other day…"
+
+ para "It took off when I"
+ line "got distracted by"
+ cont "a passing BEAUTY."
+
+ para "Learn from my"
+ line "mistake--always"
+
+ para "stay focused on"
+ line "the job at hand!"
+ done
+; 0x176bee
+
+UnknownText_0x176bee: ; 0x176bee
+ text "Come on--let's"
+ line "battle right now!"
+
+ para "@"
+ text_from_ram StringBuffer5
+ text " is"
+ line "where I am."
+
+ para "Come on down if"
+ line "you feel up to it!"
+ done
+; 0x176c47
+
+UnknownText_0x176c47: ; 0x176c47
+ text "All right then!"
+ line "Be good!"
+ done
+; 0x176c61
+
+UnknownText_0x176c61: ; 0x176c61
+ text "<PLAYER>! It's"
+ line "mind-blowing!"
+
+ para "I took a hike in"
+ line "@"
+ text_from_ram StringBuffer5
+ text ""
+ cont "yesterday, see?"
+
+ para "Well, there were"
+ line "tons of @"
+ text_from_ram StringBuffer4
+ text ""
+ para "around! You have"
+ line "to see it!"
+
+ para "I get this feeling"
+ line "that @"
+ text_from_ram StringBuffer4
+ text ""
+ para "may be timid."
+ line "I didn't see any"
+
+ para "where there are"
+ line "strong #MON."
+ done
+; 0x176d32
+
+UnknownText_0x176d32: ; 0x176d32
+ text "Rare #MON?"
+
+ para "Hey, sorry! I was"
+ line "too focused on my"
+
+ para "hike, so I wasn't"
+ line "paying attention."
+ done
+; 0x176d85
+
+UnknownText_0x176d85: ; 0x176d85
+ text "Hello! You haven't"
+ line "forgotten about"
+
+ para "our battle, have"
+ line "you?"
+
+ para "@"
+ text_from_ram StringBuffer5
+ text "!"
+ line "I'm waiting!"
+ done
+; 0x176dd1
+
+UnknownText_0x176dd1: ; 0x176dd1
+ text "Hello? What? Where"
+ line "is DUNSPARCE?"
+
+ para "DARK CAVE! Hurry!"
+
+ para "I know I've said"
+ line "it before, but"
+
+ para "DUNSPARCE don't"
+ line "appear when there"
+
+ para "are strong #MON"
+ line "around."
+ done
+; 0x176e5d
+
+ToddLooksCuteLikeMeText: ; 0x176e5d
+ text "My @"
+ text_from_ram StringBuffer4
+ text " is"
+ line "looking more and"
+
+ para "more like me. It's"
+ line "getting cuter!"
+ done
+; 0x176e9c
+
+UnknownText_0x176e9c: ; 0x176e9c
+ text "And, you know?"
+
+ para "Now we can KO"
+ line "@"
+ text_from_ram StringBuffer4
+ text " easily."
+
+ para "I should challenge"
+ line "the GOLDENROD GYM."
+ done
+; 0x176eee
+
+UnknownText_0x176eee: ; 0x176eee
+ text "And, you know?"
+ line "We just failed to"
+
+ para "beat @"
+ text_from_ram StringBuffer4
+ text " by"
+ line "a tiny margin."
+
+ para "I'm guessing my"
+ line "#MON's levels"
+
+ para "aren't high enough"
+ line "yet…"
+ done
+; 0x176f60
+
+UnknownText_0x176f60: ; 0x176f60
+ text "You must be a lot"
+ line "better now, huh?"
+
+ para "How about showing"
+ line "me your technique"
+
+ para "in a real battle"
+ line "with me?"
+
+ para "I'll be waiting on"
+ line "@"
+ text_from_ram StringBuffer5
+ text "."
+ done
+; 0x176fdb
+
+UnknownText_0x176fdb: ; 0x176fdb
+ text "See you later!"
+ done
+; 0x176feb
+
+UnknownText_0x176feb: ; 0x176feb
+ text "This is it--the"
+ line "one we've all been"
+ cont "waiting for!"
+
+ para "GOLDENROD DEPT."
+ line "STORE's bargain"
+ cont "sale is on now!"
+
+ para "Want it cheap?"
+ line "Want it lots?"
+
+ para "Don't miss this"
+ line "GOLDENROD chance!"
+
+ para "Huh? I sound like"
+ line "a huckster?"
+
+ para "Well, yeah. I was"
+ line "mimicking them…"
+
+ para "Anyway, you've got"
+ line "to get there as"
+ cont "soon as you can!"
+ done
+; 0x1770fb
+
+UnknownText_0x1770fb: ; 0x1770fb
+ text "I'm saving up for"
+ line "the next bargain"
+
+ para "sale. When's the"
+ line "next one?"
+ done
+; 0x177138
+
+UnknownText_0x177138: ; 0x177138
+ text "Where are you?"
+
+ para "Let's have our"
+ line "battle soon!"
+
+ para "I'll be waiting on"
+ line "@"
+ text_from_ram StringBuffer5
+ text "."
+ done
+; 0x17717c
+
+UnknownText_0x17717c: ; 0x17717c
+ text "Haven't you gone"
+ line "to GOLDENROD DEPT."
+
+ para "STORE? I've scoped"
+ line "it out already!"
+
+ para "They had some real"
+ line "bargains."
+
+ para "You should get"
+ line "there quickly."
+ done
+; 0x1771fd
+
+UnknownText_0x1771fd: ; 0x1771fd
+ text "My @"
+ text_from_ram StringBuffer4
+ text " and"
+ line "I are getting more"
+
+ para "in sync with each"
+ line "other."
+ done
+; 0x177237
+
+UnknownText_0x177237: ; 0x177237
+ text "We battled a wild"
+ line "@"
+ text_from_ram StringBuffer4
+ text " and"
+
+ para "managed to drop it"
+ line "in a close match."
+
+ para "We're getting into"
+ line "the groove!"
+ done
+; 0x177297
+
+UnknownText_0x177297: ; 0x177297
+ text "But, you know?"
+
+ para "I still haven't"
+ line "caught @"
+ text_from_ram StringBuffer4
+ text "."
+
+ para "It's getting past"
+ line "frustrating…"
+ done
+; 0x1772e2
+
+UnknownText_0x1772e2: ; 0x1772e2
+ text "Would you be my"
+ line "practice partner"
+ cont "again sometime?"
+
+ para "I'll be waiting on"
+ line "@"
+ text_from_ram StringBuffer5
+ text "."
+
+ para "…Could you take it"
+ line "a little easier on"
+ cont "me next time?"
+ done
+; 0x177361
+
+UnknownText_0x177361: ; 0x177361
+ text "Bye! Let's chat"
+ line "again!"
+ done
+; 0x177378
+
+UnknownText_0x177378: ; 0x177378
+ text "Have you heard"
+ line "about TEAM ROCKET?"
+
+ para "They've taken over"
+ line "the RADIO TOWER in"
+ cont "GOLDENROD."
+
+ para "Are the people"
+ line "inside safe?"
+ done
+; 0x1773e7
+
+UnknownText_0x1773e7: ; 0x1773e7
+ text "I picked up some-"
+ line "thing nice today."
+
+ para "I want you to have"
+ line "it, so I called!"
+
+ para "You will come for"
+ line "it, won't you?"
+
+ para "@"
+ text_from_ram StringBuffer5
+ text " is"
+ line "where I am."
+ done
+; 0x177465
+
+UnknownText_0x177465: ; 0x177465
+ text "Sorry, I haven't"
+ line "found anything"
+
+ para "useful yet…"
+ line "I promise, if I"
+
+ para "find anything, you"
+ line "can have it!"
+ done
+; 0x1774c1
+
+UnknownText_0x1774c1: ; 0x1774c1
+ text "Oh, <PLAY_G>!"
+ line "How soon can I"
+
+ para "expect to see you"
+ line "for our battle?"
+
+ para "Don't forget,"
+ line "@"
+ text_from_ram StringBuffer5
+ text "!"
+ done
+; 0x17750e
+
+UnknownText_0x17750e: ; 0x17750e
+ text "I'm getting really"
+ line "impatient, waiting"
+
+ para "to give you my"
+ line "present!"
+
+ para "Hurry over to"
+ line "@"
+ text_from_ram StringBuffer5
+ text "!"
+ done
+; 0x177561
diff --git a/text/phone/extra3.asm b/text/phone/extra3.asm
deleted file mode 100644
index 443338465..000000000
--- a/text/phone/extra3.asm
+++ /dev/null
@@ -1,1927 +0,0 @@
-UnknownText_0x174000: ; 0x174000
- text "Hi, <PLAY_G>!"
- line "Our BICYCLE sales"
-
- para "have gone through"
- line "the roof!"
-
- para "We owe it all to"
- line "your advertising"
-
- para "by riding around"
- line "on our BICYCLE."
-
- para "As our way of say-"
- line "ing thanks, please"
-
- para "keep that BICYCLE."
- line "Thanks again!"
- done
-; 0x1740c0
-
-UnknownText_0x1740c0: ; 0x1740c0
- text "My @"
- text_from_ram StringBuffer4
- text "'s"
- line "intelligence keeps"
-
- para "rising. It might"
- line "be smarter than"
- cont "yours!"
- done
-; 0x174106
-
-UnknownText_0x174106: ; 0x174106
- text "The other day, I"
- line "easily defeated a"
- cont "@"
- text_from_ram StringBuffer4
- text "."
-
- para "I think swapping"
- line "tips with you is"
- cont "starting to help."
- done
-; 0x174165
-
-UnknownText_0x174165: ; 0x174165
- text "Oh, and listen."
- line "I missed catching"
-
- para "a @"
- text_from_ram StringBuffer4
- text " by"
- line "just a tiny bit."
-
- para "If I'd been a bit"
- line "more informed, I'm"
-
- para "sure I would've"
- line "caught it…"
- done
-; 0x1741e1
-
-UnknownText_0x1741e1: ; 0x1741e1
- text "Do you want to"
- line "battle? I'll show"
-
- para "you how to battle"
- line "logically."
-
- para "I'll be in"
- line "@"
- text_from_ram StringBuffer5
- text "."
-
- para "Give me a shout if"
- line "you're nearby."
- done
-; 0x174251
-
-UnknownText_0x174251: ; 0x174251
- text "See you later!"
- done
-; 0x174261
-
-UnknownText_0x174261: ; 0x174261
- text "Did you know?"
-
- para "When it's raining,"
- line "THUNDER is sure to"
- cont "strike."
- done
-; 0x17429d
-
-UnknownText_0x17429d: ; 0x17429d
- text "Did you know…?"
-
- para "If you use DEFENSE"
- line "CURL, ROLLOUT's"
-
- para "power goes way up"
- line "past normal."
- done
-; 0x1742ee
-
-UnknownText_0x1742ee: ; 0x1742ee
- text "Did you know…?"
-
- para "If the sunlight is"
- line "harsh, SOLARBEAM"
-
- para "doesn't need to be"
- line "charged up."
- done
-; 0x174340
-
-UnknownText_0x174340: ; 0x174340
- text "Did you know…?"
-
- para "If the opponent"
- line "uses MINIMIZE,"
-
- para "your STOMP becomes"
- line "more powerful."
- done
-; 0x174391
-
-UnknownText_0x174391: ; 0x174391
- text "Did you know…?"
-
- para "If your opponent"
- line "is FLYing, your"
-
- para "GUST becomes much"
- line "more powerful."
- done
-; 0x1743e3
-
-UnknownText_0x1743e3: ; 0x1743e3
- text "Did you know…?"
-
- para "If your opponent"
- line "is FLYing, your"
-
- para "TWISTER becomes"
- line "more powerful."
- done
-; 0x174433
-
-UnknownText_0x174433: ; 0x174433
- text "Did you know…?"
-
- para "If your opponent"
- line "uses DIG, your"
-
- para "EARTHQUAKE becomes"
- line "more powerful."
- done
-; 0x174485
-
-UnknownText_0x174485: ; 0x174485
- text "Did you know…?"
-
- para "If your opponent"
- line "uses DIG, your"
-
- para "MAGNITUDE becomes"
- line "more powerful."
- done
-; 0x1744d6
-
-UnknownText_0x1744d6: ; 0x1744d6
- text "Did you know…?"
-
- para "The rock, ground"
- line "and steel types"
-
- para "can't be hurt by"
- line "SANDSTORM."
- done
-; 0x174522
-
-UnknownText_0x174522: ; 0x174522
- text "Did you know…?"
-
- para "If the sunlight is"
- line "harsh, water-type"
-
- para "moves become much"
- line "weaker."
- done
-; 0x174571
-
-UnknownText_0x174571: ; 0x174571
- text "Did you know…?"
-
- para "When it's raining,"
- line "fire-type moves"
-
- para "become much weaker"
- line "than usual."
- done
-; 0x1745c2
-
-UnknownText_0x1745c2: ; 0x1745c2
- text "My friend heard"
- line "some great tips."
-
- para "He's going to let"
- line "me in on some."
-
- para "When he tells me,"
- line "I'll call right"
- cont "away and tell you."
- done
-; 0x174638
-
-UnknownText_0x174638: ; 0x174638
- text "Hey, <PLAY_G>!"
-
- para "Do you remember"
- line "your promise?"
-
- para "We have to battle"
- line "soon!"
-
- para "I'll be at"
- line "@"
- text_from_ram StringBuffer5
- text "."
- done
-; 0x174688
-
-UnknownText_0x174688: ; 0x174688
- text "I fancied up my"
- line "@"
- text_from_ram StringBuffer4
- text " and"
-
- para "made it even cuter"
- line "than before!"
- done
-; 0x1746c3
-
-UnknownText_0x1746c3: ; 0x1746c3
- text "I happened to come"
- line "across a wild"
- cont "SNUBBULL recently."
-
- para "My SNUBBULL, I"
- line "assure you, was"
-
- para "far cuter than the"
- line "wild one."
- done
-; 0x174734
-
-UnknownText_0x174734: ; 0x174734
- text "I happened to see"
- line "a wild MARILL the"
-
- para "other day."
- line "Or so I thought."
-
- para "A closer look"
- line "showed it was"
-
- para "@"
- text_from_ram StringBuffer4
- text ". I was"
- line "quite miffed."
- done
-; 0x1747ac
-
-UnknownText_0x1747ac: ; 0x1747ac
- text "You can expect a"
- line "call from me."
- done
-; 0x1747cc
-
-UnknownText_0x1747cc: ; 0x1747cc
- text "My husband got"
- line "some NUGGETS."
-
- para "If you'd like, you"
- line "could have one as"
-
- para "thanks for helping"
- line "me out."
-
- para "I'll be at"
- line "@"
- text_from_ram StringBuffer5
- text "."
-
- para "Please come see me"
- line "when you can."
- done
-; 0x17485b
-
-UnknownText_0x17485b: ; 0x17485b
- text "Are your #MON"
- line "in prime form?"
-
- para "Let's chat about"
- line "#MON again."
- done
-; 0x174895
-
-UnknownText_0x174895: ; 0x174895
- text "Pardon?"
- line "Oh, the NUGGET?"
-
- para "There's no need to"
- line "hurry. Come see me"
-
- para "in @"
- text_from_ram StringBuffer5
- text ""
- line "when you can."
- done
-; 0x1748ea
-
-UnknownText_0x1748ea: ; 0x1748ea
- text "Hey, I challenge"
- line "you to a battle!"
-
- para "It won't be like"
- line "last time!"
-
- para "@"
- text_from_ram StringBuffer5
- text "'s"
- line "where I'm waiting"
-
- para "for you. Hustle"
- line "over here pronto!"
- done
-; 0x174962
-
-UnknownText_0x174962: ; 0x174962
- text "See ya!"
- done
-; 0x17496b
-
-UnknownText_0x17496b: ; 0x17496b
- text "We have to battle"
- line "again sometime."
-
- para "You can bet I'm"
- line "going to keep"
-
- para "challenging you"
- line "till I win."
- done
-; 0x1749c7
-
-UnknownText_0x1749c7: ; 0x1749c7
- text "Hey, you'd better"
- line "not have forgotten"
- cont "about our battle!"
-
- para "@"
- text_from_ram StringBuffer5
- text "!"
-
- para "Hustle over quick!"
- line "I'm waiting!"
- done
-; 0x174a24
-
-UnknownText_0x174a24: ; 0x174a24
- text "My @"
- text_from_ram StringBuffer4
- text ""
- line "might be greater"
- cont "than I imagined."
-
- para "I doubt I'll see a"
- line "@"
- text_from_ram StringBuffer4
- text " that's"
- cont "better than mine."
- done
-; 0x174a80
-
-UnknownText_0x174a80: ; 0x174a80
- text "Oh, and I managed"
- line "to barely defeat"
-
- para "@"
- text_from_ram StringBuffer4
- text " the"
- line "other day."
-
- para "I've never seen a"
- line "@"
- text_from_ram StringBuffer4
- text " get"
- cont "that strong…"
-
- para "You shouldn't let"
- line "your guard down,"
-
- para "even against a"
- line "#MON you're"
- cont "used to seeing."
- done
-; 0x174b2d
-
-UnknownText_0x174b2d: ; 0x174b2d
- text "And a while back,"
- line "I tried to catch a"
- cont "wild @"
- text_from_ram StringBuffer4
- text "."
-
- para "But it managed to"
- line "elude me."
-
- para "One wrong decision"
- line "could mean total"
-
- para "failure… You ought"
- line "to be careful too."
- done
-; 0x174bc5
-
-UnknownText_0x174bc5: ; 0x174bc5
- text "Let's battle!"
-
- para "I'll be waiting on"
- line "@"
- text_from_ram StringBuffer5
- text "."
-
- para "Give me a shout"
- line "when you're close."
- done
-; 0x174c0e
-
-UnknownText_0x174c0e: ; 0x174c0e
- text "OK, I'll talk to"
- line "you soon!"
- done
-; 0x174c29
-
-UnknownText_0x174c29: ; 0x174c29
- text "I obsess over how"
- line "to beat you."
- done
-; 0x174c49
-
-UnknownText_0x174c49: ; 0x174c49
- text "<PLAY_G>, why"
- line "aren't you here?"
-
- para "I'll take you down"
- line "with @"
- text_from_ram StringBuffer5
- text "!"
- done
-; 0x174c7f
-
-UnknownText_0x174c7f: ; 0x174c7f
- text "Do you remember my"
- line "sweet @"
- text_from_ram StringBuffer4
- text "?"
-
- para "@"
- text_from_ram StringBuffer4
- text " runs"
- line "very fast."
-
- para "It's exhilarating"
- line "to ride on its"
-
- para "back when it"
- line "really gets going."
- done
-; 0x174cf6
-
-UnknownText_0x174cf6: ; 0x174cf6
- text "Oh, have you ever"
- line "seen a @"
- text_from_ram StringBuffer4
- text ""
- cont "before?"
-
- para "I just battled"
- line "one…"
-
- para "It was much faster"
- line "than I expected."
-
- para "I was a little"
- line "shocked."
-
- para "I still won, of"
- line "course."
- done
-; 0x174d86
-
-UnknownText_0x174d86: ; 0x174d86
- text "Oh, I just saw a"
- line "wild @"
- text_from_ram StringBuffer4
- text "."
-
- para "I was trying to"
- line "catch it when I"
-
- para "noticed that I was"
- line "all out of #"
- cont "BALLS."
-
- para "If you don't check"
- line "your items, you"
-
- para "may run out at the"
- line "worst time."
-
- para "I hope you learn"
- line "from my mistake."
- done
-; 0x174e4e
-
-UnknownText_0x174e4e: ; 0x174e4e
- text "Do you want to"
- line "battle? I'm going"
- cont "to win this time!"
-
- para "I'll be waiting"
- line "for you around"
-
- para "@"
- text_from_ram StringBuffer5
- text "."
- line "Look for me, OK?"
- done
-; 0x174eb7
-
-UnknownText_0x174eb7: ; 0x174eb7
- text "OK, bye-bye!"
- done
-; 0x174ec5
-
-UnknownText_0x174ec5: ; 0x174ec5
- text "Let's battle again"
- line "sometime!"
- done
-; 0x174ee2
-
-UnknownText_0x174ee2: ; 0x174ee2
- text "Um… <PLAY_G>?"
- line "What's wrong?"
-
- para "Did you forget our"
- line "deal?"
-
- para "@"
- text_from_ram StringBuffer5
- text "."
-
- para "That's where I'm"
- line "waiting."
- done
-; 0x174f2f
-
-UnknownText_0x174f2f: ; 0x174f2f
- text "Hey listen, my"
- line "@"
- text_from_ram StringBuffer4
- text "'s stick"
-
- para "has this really"
- line "delicious aroma."
-
- para "That aroma gets my"
- line "appetite going!"
- done
-; 0x174f90
-
-UnknownText_0x174f90: ; 0x174f90
- text "A while ago, my"
- line "FARFETCH'D KO'd"
- cont "this @"
- text_from_ram StringBuffer4
- text "."
-
- para "You should have"
- line "seen FARFETCH'D"
-
- para "wield that stick."
- line "Amazing stuff!"
- done
-; 0x174ffd
-
-UnknownText_0x174ffd: ; 0x174ffd
- text "I ran into a wild"
- line "@"
- text_from_ram StringBuffer4
- text "…"
-
- para "I was trying to"
- line "catch it, but it"
-
- para "took off faster"
- line "than I thought it"
-
- para "would. It was a"
- line "bit disappointing."
- done
-; 0x17507d
-
-UnknownText_0x17507d: ; 0x17507d
- text "Want to battle"
- line "again?"
-
- para "For some reason,"
- line "my FARFETCH'D is"
-
- para "all worked up and"
- line "raring to go."
-
- para "@"
- text_from_ram StringBuffer5
- text "'s"
- line "where I'm at."
-
- para "Keep an eye out"
- line "for me, OK?"
- done
-; 0x175106
-
-UnknownText_0x175106: ; 0x175106
- text "Be seeing you!"
- done
-; 0x175116
-
-UnknownText_0x175116: ; 0x175116
- text "My FARFETCH'D had"
- line "something pretty"
- cont "in its beak."
-
- para "Like I promised,"
- line "you can have it."
-
- para "Catch up to me on"
- line "@"
- text_from_ram StringBuffer5
- text ","
-
- para "and I'll let you"
- line "have it."
- done
-; 0x17519b
-
-UnknownText_0x17519b: ; 0x17519b
- text "I haven't gotten"
- line "what I promised"
- cont "you yet."
-
- para "I'll call you as"
- line "soon as I get it,"
-
- para "so could you wait"
- line "a little longer?"
- done
-; 0x17520a
-
-UnknownText_0x17520a: ; 0x17520a
- text "<PLAY_G>, could you"
- line "hurry over?"
-
- para "FARFETCH'D is"
- line "agitated."
-
- para "If you don't come"
- line "soon, it might"
-
- para "smack me with its"
- line "stick!"
-
- para "@"
- text_from_ram StringBuffer5
- text "!"
-
- para "Please come as"
- line "soon as you can!"
- done
-; 0x17529c
-
-UnknownText_0x17529c: ; 0x17529c
- text "What's wrong?"
-
- para "Don't you want"
- line "this gift?"
-
- para "Catch up to me on"
- line "@"
- text_from_ram StringBuffer5
- text ","
-
- para "and I'll let you"
- line "have it."
- done
-; 0x1752f5
-
-UnknownText_0x1752f5: ; 0x1752f5
- text "Listen, dear…"
-
- para "Do you recall my"
- line "@"
- text_from_ram StringBuffer4
- text "?"
-
- para "Yes, exactly. That"
- line "lovely @"
- text_from_ram StringBuffer4
- text "."
-
- para "Wouldn't you agree"
- line "it's a perfect"
- cont "match for me?"
- done
-; 0x17536b
-
-UnknownText_0x17536b: ; 0x17536b
- text "Have I ever faced"
- line "a wild @"
- text_from_ram StringBuffer4
- text "?"
-
- para "You need to ask?"
-
- para "@"
- text_from_ram StringBuffer4
- text " I've"
- line "beaten on numerous"
- cont "occasions!"
- done
-; 0x1753c5
-
-UnknownText_0x1753c5: ; 0x1753c5
- text "Have I ever failed"
- line "to catch a wild"
- cont "#MON?"
-
- para "You need to ask?"
-
- para "I would never fail"
- line "to catch a wild"
-
- para "@"
- text_from_ram StringBuffer4
- text "…"
- line "Oh! Never mind!"
- done
-; 0x17543a
-
-UnknownText_0x17543a: ; 0x17543a
- text "We are going to"
- line "battle!"
-
- para "The place shall be"
- line "@"
- text_from_ram StringBuffer5
- text "!"
-
- para "Don't make me"
- line "wait! Got it?"
- done
-; 0x175488
-
-UnknownText_0x175488: ; 0x175488
- text "Fine, you may go."
- done
-; 0x17549b
-
-UnknownText_0x17549b: ; 0x17549b
- text "Don't be too proud"
- line "just because you"
-
- para "happened to beat"
- line "me… "
-
- para "It was a fluke!"
- done
-; 0x1754e5
-
-UnknownText_0x1754e5: ; 0x1754e5
- text "What are you"
- line "doing?"
-
- para "I told you that"
- line "the place was"
-
- para "@"
- text_from_ram StringBuffer5
- text "!"
- line "Don't try to run!"
- done
-; 0x175530
-
-UnknownText_0x175530: ; 0x175530
- text "My @"
- text_from_ram StringBuffer4
- text "'s"
- line "looking sharper"
- cont "than before!"
-
- para "I doubt there's a"
- line "#MON as cool as"
-
- para "this guy in your"
- line "party!"
- done
-; 0x175591
-
-UnknownText_0x175591: ; 0x175591
- text "Oh yeah, I took"
- line "down a @"
- text_from_ram StringBuffer4
- text ""
- para "in the wild the"
- line "other day."
-
- para "It was a cakewalk."
- line "Well, I guess it"
-
- para "can't be helped,"
- line "us being so tough."
- done
-; 0x175611
-
-UnknownText_0x175611: ; 0x175611
- text "Oh yeah, I saw a"
- line "wild @"
- text_from_ram StringBuffer4
- text "!"
-
- para "I thought about"
- line "going for it, but"
-
- para "I decided to work"
- line "with my one-and-"
-
- para "only right to the"
- line "extreme end."
- done
-; 0x175693
-
-UnknownText_0x175693: ; 0x175693
- text "Let's get together"
- line "and battle!"
-
- para "I promise things"
- line "will be different!"
-
- para "@"
- text_from_ram StringBuffer5
- text "'s"
- line "where I'll be."
-
- para "Give me a shout"
- line "when you come."
- done
-; 0x17570a
-
-UnknownText_0x17570a: ; 0x17570a
- text "All right. Later!"
- done
-; 0x17571d
-
-UnknownText_0x17571d: ; 0x17571d
- text "I'm checking out"
- line "@"
- text_from_ram StringBuffer4
- text "'s moves"
-
- para "and devising some"
- line "strategies."
-
- para "When I come up"
- line "with a good one,"
- cont "let's battle!"
- done
-; 0x175786
-
-UnknownText_0x175786: ; 0x175786
- text "What's keeping"
- line "you, <PLAYER>!"
-
- para "Let's get down and"
- line "battle already!"
-
- para "I'm waiting on"
- line "@"
- text_from_ram StringBuffer5
- text "!"
- done
-; 0x1757d4
-
-UnknownText_0x1757d4: ; 0x1757d4
- text "Are your #MON"
- line "growing?"
-
- para "My #MON are"
- line "growing a bit too"
-
- para "quickly for me."
- line "It's overwhelming!"
-
- para "@"
- text_from_ram StringBuffer4
- text "'s grow-"
- line "ing especially"
-
- para "quickly. I think"
- line "it'll get tough."
- done
-; 0x175869
-
-UnknownText_0x175869: ; 0x175869
- text "Oh yeah, we KO'd a"
- line "wild @"
- text_from_ram StringBuffer4
- text ""
- para "with one hit a"
- line "while back."
-
- para "It went down so"
- line "easily, I felt a"
-
- para "little sorry for"
- line "the poor thing."
- done
-; 0x1758e4
-
-UnknownText_0x1758e4: ; 0x1758e4
- text "Oh yeah, a wild"
- line "@"
- text_from_ram StringBuffer4
- text " got"
-
- para "away from me at"
- line "the last second."
-
- para "I know it's a"
- line "common #MON…"
-
- para "But it does annoy"
- line "me that it got"
-
- para "away when I almost"
- line "had it."
- done
-; 0x175976
-
-UnknownText_0x175976: ; 0x175976
- text "Do you feel like a"
- line "#MON battle?"
-
- para "It won't be like"
- line "last time!"
-
- para "@"
- text_from_ram StringBuffer5
- text "'s"
- line "where I'll be."
-
- para "Let me know when"
- line "you get there."
- done
-; 0x1759e7
-
-UnknownText_0x1759e7: ; 0x1759e7
- text "See you later!"
- done
-; 0x1759f7
-
-UnknownText_0x1759f7: ; 0x1759f7
- text "The Bug-Catching"
- line "Contest is at the"
-
- para "NATIONAL PARK"
- line "today."
-
- para "Are you going,"
- line "<PLAY_G>?"
-
- para "I'm trying to make"
- line "up my mind."
- done
-; 0x175a60
-
-UnknownText_0x175a60: ; 0x175a60
- text "I found all kinds"
- line "of BERRIES. If you"
-
- para "want, I'll share"
- line "some with you."
-
- para "I'll be waiting on"
- line "@"
- text_from_ram StringBuffer5
- text "."
- done
-; 0x175abe
-
-UnknownText_0x175abe: ; 0x175abe
- text "Huh? BERRIES?"
-
- para "Sorry, I haven't"
- line "found any yet."
-
- para "I'll call you if I"
- line "find any. Will you"
- cont "please wait?"
- done
-; 0x175b1e
-
-UnknownText_0x175b1e: ; 0x175b1e
- text "Let's battle"
- line "already!"
-
- para "@"
- text_from_ram StringBuffer5
- text " is"
- line "where I am."
-
- para "Please get here as"
- line "soon as you can!"
- done
-; 0x175b6d
-
-UnknownText_0x175b6d: ; 0x175b6d
- text "How come you're"
- line "not here yet?"
-
- para "@"
- text_from_ram StringBuffer5
- text " is"
- line "where I am."
-
- para "Please get here as"
- line "soon as you can!"
- done
-; 0x175bc4
-
-UnknownText_0x175bc4: ; 0x175bc4
- text "I've been spending"
- line "more time with my"
-
- para "@"
- text_from_ram StringBuffer4
- text " than I"
- line "have with my kids."
-
- para "That's a bit sad,"
- line "actually."
- done
-; 0x175c24
-
-UnknownText_0x175c24: ; 0x175c24
- text "I just beat a wild"
- line "@"
- text_from_ram StringBuffer4
- text "."
-
- para "I told my kid, but"
- line "he scoffed that he"
-
- para "could do the same"
- line "thing easily."
-
- para "Boy, has he gotten"
- line "cocky…"
- done
-; 0x175c9f
-
-UnknownText_0x175c9f: ; 0x175c9f
- text "Yesterday a wild"
- line "@"
- text_from_ram StringBuffer4
- text " slipped"
-
- para "away from me, in"
- line "front of my kid."
-
- para "I was feeling down"
- line "about it until he"
-
- para "shared his #"
- line "BALLS with me."
-
- para "Hahah, that sure"
- line "made my day!"
- done
-; 0x175d40
-
-UnknownText_0x175d40: ; 0x175d40
- text "What do you say to"
- line "a battle with me?"
-
- para "Good, you're going"
- line "to do it!"
-
- para "For a kid, you're"
- line "quite agreeable."
-
- para "@"
- text_from_ram StringBuffer5
- text " is"
- line "the spot!"
- done
-; 0x175db7
-
-UnknownText_0x175db7: ; 0x175db7
- text "You call your mom"
- line "sometimes too!"
- done
-; 0x175dd9
-
-UnknownText_0x175dd9: ; 0x175dd9
- text "Listen, I… Yowch!"
-
- para "Uh, sorry! See,"
- line "@"
- text_from_ram StringBuffer4
- text " are"
-
- para "biting like there"
- line "is no tomorrow"
-
- para "over here on"
- line "@"
- text_from_ram StringBuffer5
- text "!"
-
- para "Aiyee! Ouch!"
- line "One jabbed me!"
-
- para "Heh, they're some"
- line "kind of feisty!"
-
- para "<PLAY_G>, you have"
- line "to see this rare"
-
- para "sight! Get ready"
- line "to fish!"
- done
-; 0x175eaf
-
-UnknownText_0x175eaf: ; 0x175eaf
- text "Yeah, I know."
-
- para "You're looking for"
- line "rare #MON."
-
- para "Recently, all I've"
- line "been catching are"
- cont "MAGIKARP, though…"
- done
-; 0x175f11
-
-UnknownText_0x175f11: ; 0x175f11
- text "So where are you?"
- line "I'm waiting for"
-
- para "you to show up on"
- line "@"
- text_from_ram StringBuffer5
- text "."
-
- para "You shouldn't make"
- line "your elders wait!"
- done
-; 0x175f70
-
-UnknownText_0x175f70: ; 0x175f70
- text "Hey, what's the"
- line "matter with you?"
-
- para "Aren't you coming"
- line "over to fish for"
- cont "QWILFISH?"
-
- para "I'm on ROUTE 32,"
- line "so hurry up!"
- done
-; 0x175fda
-
-UnknownText_0x175fda: ; 0x175fda
- text "Oh, you have to"
- line "hear this."
-
- para "My @"
- text_from_ram StringBuffer4
- text " is"
- line "so adorable!"
-
- para "It always wants to"
- line "nuzzle me!"
- done
-; 0x17602d
-
-UnknownText_0x17602d: ; 0x17602d
- text "And, and! Um…"
-
- para "We beat a wild"
- line "@"
- text_from_ram StringBuffer4
- text " with"
-
- para "just one hit a"
- line "little while ago."
-
- para "We felt sorry for"
- line "it, though."
- done
-; 0x176095
-
-UnknownText_0x176095: ; 0x176095
- text "And, and! Uh…"
-
- para "We just saw a"
- line "really gorgeous"
- cont "@"
- text_from_ram StringBuffer4
- text "."
-
- para "But I was on the"
- line "phone, so it got"
-
- para "away. It made us"
- line "really angry!"
- done
-; 0x17610a
-
-UnknownText_0x17610a: ; 0x17610a
- text "Hi! Do you have"
- line "some free time?"
-
- para "I've got all sorts"
- line "of time. If you're"
-
- para "free, would you"
- line "like to battle?"
-
- para "I'll be waiting on"
- line "@"
- text_from_ram StringBuffer5
- text "."
-
- para "Let me know when"
- line "you get here!"
- done
-; 0x1761a7
-
-UnknownText_0x1761a7: ; 0x1761a7
- text "Hi, TANIA. How are"
- line "you? This is LIZ."
-
- para "I'm fine, but I'm"
- line "bored silly!"
-
- para "Huh… Wrong number?"
- line "Oops! Sorry!"
- done
-; 0x17620a
-
-UnknownText_0x17620a: ; 0x17620a
- text "OK, I'll call you"
- line "later!"
- done
-; 0x176223
-
-UnknownText_0x176223: ; 0x176223
- text "Listen, listen!"
-
- para "I was listening to"
- line "the radio in the"
-
- para "RUINS OF ALPH when"
- line "an odd broadcast"
-
- para "suddenly cut it on"
- line "the regular show."
-
- para "I wonder what it"
- line "was. So strange!"
- done
-; 0x1762c3
-
-UnknownText_0x1762c3: ; 0x1762c3
- text "Listen, listen!"
-
- para "Don't you think"
- line "FALKNER of VIOLET"
-
- para "GYM is cool and"
- line "handsome?"
-
- para "But they say his"
- line "dad, who's out"
-
- para "training on the"
- line "road, is even more"
-
- para "cool and handsome"
- line "than FALKNER."
-
- para "I wish I could"
- line "meet him!"
- done
-; 0x17638a
-
-UnknownText_0x17638a: ; 0x17638a
- text "Listen, listen!"
-
- para "Do you know EARL,"
- line "the teacher who"
-
- para "runs the #MON"
- line "ACADEMY in VIOLET?"
-
- para "I saw him doing"
- line "pirouettes while"
-
- para "he was running. It"
- line "was wildly funny!"
- done
-; 0x176424
-
-UnknownText_0x176424: ; 0x176424
- text "Listen, listen!"
-
- para "I collect #MON"
- line "plush dolls."
-
- para "But I can't seem"
- line "to get a hold of a"
-
- para "SURF PIKACHU DOLL."
- line "None of my friends"
-
- para "have it. It must"
- line "be totally rare!"
-
- para "You could really"
- line "brag about it if"
- cont "you had one."
- done
-; 0x1764eb
-
-UnknownText_0x1764eb: ; 0x1764eb
- text "Listen, listen!"
-
- para "Do you know about"
- line "MOOMOO MILK?"
-
- para "You can buy it at"
- line "MOOMOO FARM."
-
- para "It's supposed to"
- line "be good for health"
-
- para "and beauty."
- line "I really want to"
-
- para "try some. I bet"
- line "it's delicious!"
- done
-; 0x176599
-
-UnknownText_0x176599: ; 0x176599
- text "Listen, listen!"
-
- para "There's a #MON"
- line "SALON in GOLDENROD"
-
- para "that's run by two"
- line "brothers."
-
- para "The older brother"
- line "is good, but the"
-
- para "younger one really"
- line "isn't."
-
- para "But sometimes the"
- line "younger one does a"
-
- para "better job than"
- line "his brother."
-
- para "Every time I go, I"
- line "have a hard time"
-
- para "trying to decide"
- line "whom I should use…"
- done
-; 0x1766ac
-
-UnknownText_0x1766ac: ; 0x1766ac
- text "Listen, listen!"
-
- para "GOLDENROD GYM's"
- line "WHITNEY began"
-
- para "battling only a"
- line "little while ago!"
-
- para "But the #MON"
- line "LEAGUE chose her"
- cont "as a GYM LEADER!"
-
- para "I bet she must be"
- line "totally talented."
- done
-; 0x17674f
-
-UnknownText_0x17674f: ; 0x17674f
- text "Listen, listen!"
-
- para "Have you ever"
- line "taken part in a"
-
- para "Bug-Catching"
- line "Contest at the"
- cont "NATIONAL PARK?"
-
- para "I did once, but"
- line "all I could catch"
- cont "was a CATERPIE."
-
- para "But guess what!"
-
- para "I won with that"
- line "CATERPIE. Isn't"
- cont "that great?"
- done
-; 0x176816
-
-UnknownText_0x176816: ; 0x176816
- text "Listen, listen!"
-
- para "I saw a beautiful"
- line "@"
- text_from_ram StringBuffer4
- text "!"
-
- para "I wish I could"
- line "become a beautiful"
- cont "@"
- text_from_ram StringBuffer4
- text " too."
- done
-; 0x17686d
-
-UnknownText_0x17686d: ; 0x17686d
- text "Listen, listen!"
-
- para "Uh… Um… Whoops!"
-
- para "I forgot what I"
- line "was going to say!"
- done
-; 0x1768b0
-
-UnknownText_0x1768b0: ; 0x1768b0
- text "Listen, listen!"
-
- para "My @"
- text_from_ram StringBuffer4
- text "…"
- line "it… so pretty…"
-
- para "and… giggle… so"
- line "awesome… yes… but…"
-
- para "very much… eeek!"
- line "And… lovely…"
-
- para "Just ravishing…"
- line "Oh, too much!"
-
- para "…Hug it… sleeping…"
- line "That's right…"
-
- para "pretty… sigh… So"
- line "nice… Cute…"
-
- para "…Oops! Look at the"
- line "time! I chatted"
- cont "too long!"
-
- para "I'm sorry I took"
- line "so much of your"
-
- para "time!"
- line "I love chatting!"
- done
-; 0x1769da
-
-UnknownText_0x1769da: ; 0x1769da
- text "I've got too much"
- line "time on my hands!"
-
- para "Let's battle right"
- line "away!"
-
- para "I'll be waiting on"
- line "@"
- text_from_ram StringBuffer5
- text "!"
- done
-; 0x176a2f
-
-UnknownText_0x176a2f: ; 0x176a2f
- text "The other day, I"
- line "was watching my"
-
- para "@"
- text_from_ram StringBuffer4
- text " eat"
- line "some BERRIES."
-
- para "It looked like it"
- line "was enjoying its"
-
- para "meal, so I decided"
- line "to try some."
-
- para "I'm not sure if"
- line "people should eat"
-
- para "that stuff, but it"
- line "was delicious!"
- done
-; 0x176aef
-
-UnknownText_0x176aef: ; 0x176aef
- text "Lately, I've been"
- line "running across"
-
- para "wild @"
- text_from_ram StringBuffer4
- text ""
- line "quite often."
-
- para "They're easily"
- line "taken care of."
- done
-; 0x176b45
-
-UnknownText_0x176b45: ; 0x176b45
- text "Oh yeah, I was"
- line "battling this"
-
- para "@"
- text_from_ram StringBuffer4
- text " the"
- line "other day…"
-
- para "It took off when I"
- line "got distracted by"
- cont "a passing BEAUTY."
-
- para "Learn from my"
- line "mistake--always"
-
- para "stay focused on"
- line "the job at hand!"
- done
-; 0x176bee
-
-UnknownText_0x176bee: ; 0x176bee
- text "Come on--let's"
- line "battle right now!"
-
- para "@"
- text_from_ram StringBuffer5
- text " is"
- line "where I am."
-
- para "Come on down if"
- line "you feel up to it!"
- done
-; 0x176c47
-
-UnknownText_0x176c47: ; 0x176c47
- text "All right then!"
- line "Be good!"
- done
-; 0x176c61
-
-UnknownText_0x176c61: ; 0x176c61
- text "<PLAYER>! It's"
- line "mind-blowing!"
-
- para "I took a hike in"
- line "@"
- text_from_ram StringBuffer5
- text ""
- cont "yesterday, see?"
-
- para "Well, there were"
- line "tons of @"
- text_from_ram StringBuffer4
- text ""
- para "around! You have"
- line "to see it!"
-
- para "I get this feeling"
- line "that @"
- text_from_ram StringBuffer4
- text ""
- para "may be timid."
- line "I didn't see any"
-
- para "where there are"
- line "strong #MON."
- done
-; 0x176d32
-
-UnknownText_0x176d32: ; 0x176d32
- text "Rare #MON?"
-
- para "Hey, sorry! I was"
- line "too focused on my"
-
- para "hike, so I wasn't"
- line "paying attention."
- done
-; 0x176d85
-
-UnknownText_0x176d85: ; 0x176d85
- text "Hello! You haven't"
- line "forgotten about"
-
- para "our battle, have"
- line "you?"
-
- para "@"
- text_from_ram StringBuffer5
- text "!"
- line "I'm waiting!"
- done
-; 0x176dd1
-
-UnknownText_0x176dd1: ; 0x176dd1
- text "Hello? What? Where"
- line "is DUNSPARCE?"
-
- para "DARK CAVE! Hurry!"
-
- para "I know I've said"
- line "it before, but"
-
- para "DUNSPARCE don't"
- line "appear when there"
-
- para "are strong #MON"
- line "around."
- done
-; 0x176e5d
-
-UnknownText_0x176e5d: ; 0x176e5d
- text "My @"
- text_from_ram StringBuffer4
- text " is"
- line "looking more and"
-
- para "more like me. It's"
- line "getting cuter!"
- done
-; 0x176e9c
-
-UnknownText_0x176e9c: ; 0x176e9c
- text "And, you know?"
-
- para "Now we can KO"
- line "@"
- text_from_ram StringBuffer4
- text " easily."
-
- para "I should challenge"
- line "the GOLDENROD GYM."
- done
-; 0x176eee
-
-UnknownText_0x176eee: ; 0x176eee
- text "And, you know?"
- line "We just failed to"
-
- para "beat @"
- text_from_ram StringBuffer4
- text " by"
- line "a tiny margin."
-
- para "I'm guessing my"
- line "#MON's levels"
-
- para "aren't high enough"
- line "yet…"
- done
-; 0x176f60
-
-UnknownText_0x176f60: ; 0x176f60
- text "You must be a lot"
- line "better now, huh?"
-
- para "How about showing"
- line "me your technique"
-
- para "in a real battle"
- line "with me?"
-
- para "I'll be waiting on"
- line "@"
- text_from_ram StringBuffer5
- text "."
- done
-; 0x176fdb
-
-UnknownText_0x176fdb: ; 0x176fdb
- text "See you later!"
- done
-; 0x176feb
-
-UnknownText_0x176feb: ; 0x176feb
- text "This is it--the"
- line "one we've all been"
- cont "waiting for!"
-
- para "GOLDENROD DEPT."
- line "STORE's bargain"
- cont "sale is on now!"
-
- para "Want it cheap?"
- line "Want it lots?"
-
- para "Don't miss this"
- line "GOLDENROD chance!"
-
- para "Huh? I sound like"
- line "a huckster?"
-
- para "Well, yeah. I was"
- line "mimicking them…"
-
- para "Anyway, you've got"
- line "to get there as"
- cont "soon as you can!"
- done
-; 0x1770fb
-
-UnknownText_0x1770fb: ; 0x1770fb
- text "I'm saving up for"
- line "the next bargain"
-
- para "sale. When's the"
- line "next one?"
- done
-; 0x177138
-
-UnknownText_0x177138: ; 0x177138
- text "Where are you?"
-
- para "Let's have our"
- line "battle soon!"
-
- para "I'll be waiting on"
- line "@"
- text_from_ram StringBuffer5
- text "."
- done
-; 0x17717c
-
-UnknownText_0x17717c: ; 0x17717c
- text "Haven't you gone"
- line "to GOLDENROD DEPT."
-
- para "STORE? I've scoped"
- line "it out already!"
-
- para "They had some real"
- line "bargains."
-
- para "You should get"
- line "there quickly."
- done
-; 0x1771fd
-
-UnknownText_0x1771fd: ; 0x1771fd
- text "My @"
- text_from_ram StringBuffer4
- text " and"
- line "I are getting more"
-
- para "in sync with each"
- line "other."
- done
-; 0x177237
-
-UnknownText_0x177237: ; 0x177237
- text "We battled a wild"
- line "@"
- text_from_ram StringBuffer4
- text " and"
-
- para "managed to drop it"
- line "in a close match."
-
- para "We're getting into"
- line "the groove!"
- done
-; 0x177297
-
-UnknownText_0x177297: ; 0x177297
- text "But, you know?"
-
- para "I still haven't"
- line "caught @"
- text_from_ram StringBuffer4
- text "."
-
- para "It's getting past"
- line "frustrating…"
- done
-; 0x1772e2
-
-UnknownText_0x1772e2: ; 0x1772e2
- text "Would you be my"
- line "practice partner"
- cont "again sometime?"
-
- para "I'll be waiting on"
- line "@"
- text_from_ram StringBuffer5
- text "."
-
- para "…Could you take it"
- line "a little easier on"
- cont "me next time?"
- done
-; 0x177361
-
-UnknownText_0x177361: ; 0x177361
- text "Bye! Let's chat"
- line "again!"
- done
-; 0x177378
-
-UnknownText_0x177378: ; 0x177378
- text "Have you heard"
- line "about TEAM ROCKET?"
-
- para "They've taken over"
- line "the RADIO TOWER in"
- cont "GOLDENROD."
-
- para "Are the people"
- line "inside safe?"
- done
-; 0x1773e7
-
-UnknownText_0x1773e7: ; 0x1773e7
- text "I picked up some-"
- line "thing nice today."
-
- para "I want you to have"
- line "it, so I called!"
-
- para "You will come for"
- line "it, won't you?"
-
- para "@"
- text_from_ram StringBuffer5
- text " is"
- line "where I am."
- done
-; 0x177465
-
-UnknownText_0x177465: ; 0x177465
- text "Sorry, I haven't"
- line "found anything"
-
- para "useful yet…"
- line "I promise, if I"
-
- para "find anything, you"
- line "can have it!"
- done
-; 0x1774c1
-
-UnknownText_0x1774c1: ; 0x1774c1
- text "Oh, <PLAY_G>!"
- line "How soon can I"
-
- para "expect to see you"
- line "for our battle?"
-
- para "Don't forget,"
- line "@"
- text_from_ram StringBuffer5
- text "!"
- done
-; 0x17750e
-
-UnknownText_0x17750e: ; 0x17750e
- text "I'm getting really"
- line "impatient, waiting"
-
- para "to give you my"
- line "present!"
-
- para "Hurry over to"
- line "@"
- text_from_ram StringBuffer5
- text "!"
- done
-; 0x177561
diff --git a/text/phone/mom.asm b/text/phone/mom.asm
index 961297fb5..249b5c01d 100644
--- a/text/phone/mom.asm
+++ b/text/phone/mom.asm
@@ -81,12 +81,12 @@ MomCheckBalanceText: ; 0x1b41a7
line "keep on saving?"
done
-UnknownText_0x1b41ea: ; 0x1b41ea
+MomImportantToSaveText: ; 0x1b41ea
text "It's important to"
line "save your money."
done
-UnknownText_0x1b420d: ; 0x1b420d
+MomYoureNotSavingText: ; 0x1b420d
text "Oh, <PLAYER>,"
line "you're not saving"
@@ -94,7 +94,7 @@ UnknownText_0x1b420d: ; 0x1b420d
line "you like to save?"
done
-UnknownText_0x1b4249: ; 0x1b4249
+MomYouveSavedText: ; 0x1b4249
text "By the way, you've"
line "saved up ¥@"
text_from_ram StringBuffer3
@@ -104,7 +104,7 @@ UnknownText_0x1b4249: ; 0x1b4249
line "saving again?"
done
-UnknownText_0x1b4289: ; 0x1b4289
+MomOKIllSaveText: ; 0x1b4289
text "OK. I'll save your"
line "money."
done
diff --git a/text/stdtext.asm b/text/stdtext.asm
index 33827694f..7b558cc49 100644
--- a/text/stdtext.asm
+++ b/text/stdtext.asm
@@ -202,7 +202,7 @@ TrashCanText:
line "can break this."
done
-PokeCenterSignText:
+PokecenterSignText:
text "Heal Your #MON!"
line "#MON CENTER"
done
diff --git a/text/trainer_class_names.asm b/text/trainer_class_names.asm
deleted file mode 100755
index 555e6c652..000000000
--- a/text/trainer_class_names.asm
+++ /dev/null
@@ -1,67 +0,0 @@
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "RIVAL@"
- db "#MON PROF.@"
- db "ELITE FOUR@"
- db "<PKMN> TRAINER@"
- db "ELITE FOUR@"
- db "ELITE FOUR@"
- db "ELITE FOUR@"
- db "CHAMPION@"
- db "LEADER@"
- db "LEADER@"
- db "LEADER@"
- db "SCIENTIST@"
- db "LEADER@"
- db "YOUNGSTER@"
- db "SCHOOLBOY@"
- db "BIRD KEEPER@"
- db "LASS@"
- db "LEADER@"
- db "COOLTRAINER@"
- db "COOLTRAINER@"
- db "BEAUTY@"
- db "#MANIAC@"
- db "ROCKET@"
- db "GENTLEMAN@"
- db "SKIER@"
- db "TEACHER@"
- db "LEADER@"
- db "BUG CATCHER@"
- db "FISHER@"
- db "SWIMMER♂@"
- db "SWIMMER♀@"
- db "SAILOR@"
- db "SUPER NERD@"
- db "RIVAL@"
- db "GUITARIST@"
- db "HIKER@"
- db "BIKER@"
- db "LEADER@"
- db "BURGLAR@"
- db "FIREBREATHER@"
- db "JUGGLER@"
- db "BLACKBELT@"
- db "ROCKET@"
- db "PSYCHIC@"
- db "PICNICKER@"
- db "CAMPER@"
- db "ROCKET@"
- db "SAGE@"
- db "MEDIUM@"
- db "BOARDER@"
- db "#FAN@"
- db "KIMONO GIRL@"
- db "TWINS@"
- db "#FAN@"
- db "<PKMN> TRAINER@"
- db "LEADER@"
- db "OFFICER@"
- db "ROCKET@"
- db "MYSTICALMAN@"
diff --git a/text/unused_gen_1_trainers.asm b/text/unused_gen_1_trainers.asm
new file mode 100644
index 000000000..9a637d6a2
--- /dev/null
+++ b/text/unused_gen_1_trainers.asm
@@ -0,0 +1,92 @@
+GetGen1TrainerClassName: ; 50a28
+; XXX
+ ld hl, .Strings
+ ld a, [TrainerClass]
+ dec a
+ ld c, a
+ ld b, 0
+ add hl, bc
+ add hl, bc
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld de, StringBuffer1
+.copy
+ ld a, [hli]
+ ld [de], a
+ inc de
+ cp "@"
+ jr nz, .copy
+ ret
+
+.Strings: ; 50a42
+; Untranslated trainer class names from Red.
+ dw .Youngster
+ dw .BugCatcher
+ dw .Lass
+ dw OTClassName
+ dw .JrTrainerM
+ dw .JrTrainerF
+ dw .Pokemaniac
+ dw .SuperNerd
+ dw OTClassName
+ dw OTClassName
+ dw .Burglar
+ dw .Engineer
+ dw .Jack
+ dw OTClassName
+ dw .Swimmer
+ dw OTClassName
+ dw OTClassName
+ dw .Beauty
+ dw OTClassName
+ dw .Rocker
+ dw .Juggler
+ dw OTClassName
+ dw OTClassName
+ dw .Blackbelt
+ dw OTClassName
+ dw .ProfOak
+ dw .Chief
+ dw .Scientist
+ dw OTClassName
+ dw .Rocket
+ dw .CooltrainerM
+ dw .CooltrainerF
+ dw OTClassName
+ dw OTClassName
+ dw OTClassName
+ dw OTClassName
+ dw OTClassName
+ dw OTClassName
+ dw OTClassName
+ dw OTClassName
+ dw OTClassName
+ dw OTClassName
+ dw OTClassName
+ dw OTClassName
+ dw OTClassName
+ dw OTClassName
+ dw OTClassName
+
+.Youngster: db "たんパン@"
+.BugCatcher: db "むしとり@"
+.Lass: db "ミニスカ@"
+.JrTrainerM: db "ボーイ@"
+.JrTrainerF: db "ガール@"
+.Pokemaniac: db "マニア@"
+.SuperNerd: db "りかけい@"
+.Burglar: db "どろぼう@"
+.Engineer: db "ォヤジ@"
+.Jack: db "ジャック@"
+.Swimmer: db "かいパン@"
+.Beauty: db "おねえさん@"
+.Rocker: db "グループ@"
+.Juggler: db "ジャグラー@"
+.Blackbelt: db "からて@"
+.ProfOak: db "ォーキド@"
+.Chief: db "チーフ@"
+.Scientist: db "けんきゅういん@"
+.Rocket: db "だんいん@"
+.CooltrainerM: db "エりート♂@"
+.CooltrainerF: db "エりート♀@"
diff --git a/text/sweethoney.asm b/text/unused_sweet_honey.asm
index 9bfa4f6b1..9bfa4f6b1 100644
--- a/text/sweethoney.asm
+++ b/text/unused_sweet_honey.asm
diff --git a/tilesets/00_collision.bin b/tilesets/00_collision.bin
deleted file mode 100644
index 085171e36..000000000
--- a/tilesets/00_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/00_metatiles.bin b/tilesets/00_metatiles.bin
deleted file mode 100644
index 763df1997..000000000
--- a/tilesets/00_metatiles.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/01_collision.bin b/tilesets/01_collision.bin
deleted file mode 100644
index b3276e1cf..000000000
--- a/tilesets/01_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/01_palette_map.asm b/tilesets/01_palette_map.asm
deleted file mode 100644
index 62fbd2d00..000000000
--- a/tilesets/01_palette_map.asm
+++ /dev/null
@@ -1,29 +0,0 @@
- tilepal 0, GRAY, BROWN, BROWN, RED, GREEN, GREEN, GRAY, RED
- tilepal 0, RED, RED, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF
- tilepal 0, ROOF, ROOF, ROOF, GREEN, WATER, GREEN, BROWN, BROWN
- tilepal 0, RED, RED, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN
- tilepal 0, BROWN, BROWN, BROWN, RED, RED, BROWN, YELLOW, BROWN
- tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN
- tilepal 0, BROWN, BROWN, WATER, WATER, BROWN, BROWN, BROWN, YELLOW
- tilepal 0, YELLOW, BROWN, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN
- tilepal 0, RED, BROWN, WATER, WATER, BROWN, GREEN, BROWN, BROWN
- tilepal 0, BROWN, WATER, GRAY, BROWN, BROWN, BROWN, GRAY, GRAY
- tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN
- tilepal 0, WATER, GRAY, GRAY, GRAY, BROWN, BROWN, GRAY, GRAY
-
-rept 16
- db $ff
-endr
-
- tilepal 1, BROWN, BROWN, BROWN, RED, RED, RED, RED, RED
- tilepal 1, RED, RED, RED, RED, RED, RED, RED, RED
- tilepal 1, RED, RED, RED, RED, BROWN, BROWN, BROWN, BROWN
- tilepal 1, BROWN, BROWN, BROWN, GRAY, GRAY, BROWN, BROWN, BROWN
- tilepal 1, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, BROWN
- tilepal 1, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, BROWN
- tilepal 1, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, BROWN
- tilepal 1, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, BROWN
- tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN
- tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN
- tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN
- tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN
diff --git a/tilesets/02_collision.bin b/tilesets/02_collision.bin
deleted file mode 100644
index 6e5addd6d..000000000
--- a/tilesets/02_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/03_collision.bin b/tilesets/03_collision.bin
deleted file mode 100644
index f0038d731..000000000
--- a/tilesets/03_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/04_collision.bin b/tilesets/04_collision.bin
deleted file mode 100644
index 5ca0e3954..000000000
--- a/tilesets/04_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/05_collision.bin b/tilesets/05_collision.bin
deleted file mode 100644
index e11da7330..000000000
--- a/tilesets/05_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/06_collision.bin b/tilesets/06_collision.bin
deleted file mode 100644
index dc3a08bfb..000000000
--- a/tilesets/06_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/07_collision.bin b/tilesets/07_collision.bin
deleted file mode 100644
index 5e58e03c9..000000000
--- a/tilesets/07_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/08_collision.bin b/tilesets/08_collision.bin
deleted file mode 100644
index 5876a3fbe..000000000
--- a/tilesets/08_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/09_collision.bin b/tilesets/09_collision.bin
deleted file mode 100644
index af2e7fd34..000000000
--- a/tilesets/09_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/10_collision.bin b/tilesets/10_collision.bin
deleted file mode 100644
index 4396125f0..000000000
--- a/tilesets/10_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/11_collision.bin b/tilesets/11_collision.bin
deleted file mode 100644
index ee03c4528..000000000
--- a/tilesets/11_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/12_collision.bin b/tilesets/12_collision.bin
deleted file mode 100644
index 0f8763b7b..000000000
--- a/tilesets/12_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/13_collision.bin b/tilesets/13_collision.bin
deleted file mode 100644
index a07b03bce..000000000
--- a/tilesets/13_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/14_collision.bin b/tilesets/14_collision.bin
deleted file mode 100644
index 2bfcad418..000000000
--- a/tilesets/14_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/15_collision.bin b/tilesets/15_collision.bin
deleted file mode 100644
index fe8c334f0..000000000
--- a/tilesets/15_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/16_collision.bin b/tilesets/16_collision.bin
deleted file mode 100644
index 499a1d071..000000000
--- a/tilesets/16_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/17_collision.bin b/tilesets/17_collision.bin
deleted file mode 100644
index bd5c4c586..000000000
--- a/tilesets/17_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/18_collision.bin b/tilesets/18_collision.bin
deleted file mode 100644
index cf77d603e..000000000
--- a/tilesets/18_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/19_collision.bin b/tilesets/19_collision.bin
deleted file mode 100644
index f15ac266a..000000000
--- a/tilesets/19_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/20_collision.bin b/tilesets/20_collision.bin
deleted file mode 100644
index 9ceb978ab..000000000
--- a/tilesets/20_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/21_collision.bin b/tilesets/21_collision.bin
deleted file mode 100644
index 0dfed1d91..000000000
--- a/tilesets/21_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/22_collision.bin b/tilesets/22_collision.bin
deleted file mode 100644
index 5cb2b0eeb..000000000
--- a/tilesets/22_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/23_collision.bin b/tilesets/23_collision.bin
deleted file mode 100644
index 878803fb8..000000000
--- a/tilesets/23_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/24_collision.bin b/tilesets/24_collision.bin
deleted file mode 100644
index 701de1c0b..000000000
--- a/tilesets/24_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/25_collision.bin b/tilesets/25_collision.bin
deleted file mode 100644
index 29e6fa56d..000000000
--- a/tilesets/25_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/26_collision.bin b/tilesets/26_collision.bin
deleted file mode 100644
index 1eedacfe8..000000000
--- a/tilesets/26_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/27_collision.bin b/tilesets/27_collision.bin
deleted file mode 100644
index 0d77042b7..000000000
--- a/tilesets/27_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/28_collision.bin b/tilesets/28_collision.bin
deleted file mode 100644
index eccd3e3df..000000000
--- a/tilesets/28_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/29_collision.bin b/tilesets/29_collision.bin
deleted file mode 100644
index a4498cbee..000000000
--- a/tilesets/29_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/30_collision.bin b/tilesets/30_collision.bin
deleted file mode 100644
index 701de1c0b..000000000
--- a/tilesets/30_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/31_collision.bin b/tilesets/31_collision.bin
deleted file mode 100644
index 9f66b5fdd..000000000
--- a/tilesets/31_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/32_collision.bin b/tilesets/32_collision.bin
deleted file mode 100644
index a4da351d3..000000000
--- a/tilesets/32_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/33_collision.bin b/tilesets/33_collision.bin
deleted file mode 100644
index a4da351d3..000000000
--- a/tilesets/33_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/34_collision.bin b/tilesets/34_collision.bin
deleted file mode 100644
index a4da351d3..000000000
--- a/tilesets/34_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/35_collision.bin b/tilesets/35_collision.bin
deleted file mode 100644
index a4da351d3..000000000
--- a/tilesets/35_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/36_collision.bin b/tilesets/36_collision.bin
deleted file mode 100644
index a4da351d3..000000000
--- a/tilesets/36_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/aerodactyl_word_room_collision.asm b/tilesets/aerodactyl_word_room_collision.asm
new file mode 100644
index 000000000..138f07143
--- /dev/null
+++ b/tilesets/aerodactyl_word_room_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 14
+ tilecoll WALL, WALL, WALL, FLOOR ; 15
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 16
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 17
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 18
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 19
+ tilecoll WALL, WALL, FLOOR, WALL ; 1a
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1b
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1c
+ tilecoll FLOOR, FLOOR, FLOOR, PIT ; 1d
+ tilecoll WALL, WALL, WALL, WALL ; 1e
+ tilecoll WALL, WALL, WALL, WALL ; 1f
+ tilecoll WALL, WALL, WALL, WALL ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 25
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 40
diff --git a/tilesets/36_metatiles.bin b/tilesets/aerodactyl_word_room_metatiles.bin
index 0538baa98..0538baa98 100644
--- a/tilesets/36_metatiles.bin
+++ b/tilesets/aerodactyl_word_room_metatiles.bin
diff --git a/tilesets/26_palette_map.asm b/tilesets/aerodactyl_word_room_palette_map.asm
index 5ebde24ba..5ebde24ba 100644
--- a/tilesets/26_palette_map.asm
+++ b/tilesets/aerodactyl_word_room_palette_map.asm
diff --git a/tilesets/animations.asm b/tilesets/animations.asm
index 76b3c65f8..3de67ee6e 100644
--- a/tilesets/animations.asm
+++ b/tilesets/animations.asm
@@ -35,9 +35,9 @@ _AnimateTileset:: ; fc000
jp hl
; fc01b
-Tileset00Anim: ; 0xfc01b
-Tileset02Anim: ; 0xfc01b
-Tileset03Anim: ; 0xfc01b
+Tileset0Anim: ; 0xfc01b
+TilesetJohto2Anim: ; 0xfc01b
+TilesetKantoAnim: ; 0xfc01b
dw VTiles2 tile $14, AnimateWaterTile
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
@@ -51,7 +51,7 @@ Tileset03Anim: ; 0xfc01b
dw NULL, DoneTileAnimation
; 0xfc047
-Tileset25Anim: ; 0xfc047
+TilesetParkAnim: ; 0xfc047
dw VTiles2 tile $14, AnimateWaterTile
dw NULL, WaitTileAnimation
dw VTiles2 tile $5f, AnimateFountain
@@ -65,7 +65,7 @@ Tileset25Anim: ; 0xfc047
dw NULL, DoneTileAnimation
; 0xfc073
-Tileset31Anim: ; 0xfc073
+TilesetIlexForestAnim: ; 0xfc073
dw NULL, ForestTreeLeftAnimation
dw NULL, ForestTreeRightAnimation
dw NULL, WaitTileAnimation
@@ -80,7 +80,7 @@ Tileset31Anim: ; 0xfc073
dw NULL, DoneTileAnimation
; 0xfc0a3
-Tileset01Anim: ; 0xfc0a3
+TilesetJohto1Anim: ; 0xfc0a3
dw VTiles2 tile $14, AnimateWaterTile
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
@@ -124,7 +124,7 @@ TilesetAnimfc103: ; 0xfc103
dw NULL, DoneTileAnimation
; 0xfc12f
-Tileset09Anim: ; 0xfc12f
+TilesetPortAnim: ; 0xfc12f
dw VTiles2 tile $14, AnimateWaterTile
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
@@ -139,7 +139,7 @@ Tileset09Anim: ; 0xfc12f
dw NULL, DoneTileAnimation
; 0xfc15f
-Tileset15Anim: ; 0xfc15f
+TilesetGym1Anim: ; 0xfc15f
dw NULL, SafariFountainAnim2
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
@@ -182,8 +182,8 @@ TilesetAnimfc1af: ; 0xfc1af
dw NULL, DoneTileAnimation
; 0xfc1e7
-Tileset24Anim: ; 0xfc1e7
-Tileset30Anim: ; 0xfc1e7
+TilesetCaveAnim: ; 0xfc1e7
+TilesetWhirlIslandsAnim: ; 0xfc1e7
dw VTiles2 tile $14, WriteTileToBuffer
dw NULL, FlickeringCaveEntrancePalette
dw wTileAnimBuffer, ScrollTileRightLeft
@@ -205,7 +205,7 @@ Tileset30Anim: ; 0xfc1e7
dw NULL, DoneTileAnimation
; 0xfc233
-Tileset29Anim: ; 0xfc233
+TilesetIcePathAnim: ; 0xfc233
dw VTiles2 tile $35, WriteTileToBuffer
dw NULL, FlickeringCaveEntrancePalette
dw wTileAnimBuffer, ScrollTileRightLeft
@@ -227,7 +227,7 @@ Tileset29Anim: ; 0xfc233
dw NULL, DoneTileAnimation
; 0xfc27f
-Tileset23Anim: ; 0xfc27f
+TilesetSproutTowerAnim: ; 0xfc27f
dw SproutPillarTilePointer9, AnimateSproutPillarTile
dw SproutPillarTilePointer10, AnimateSproutPillarTile
dw SproutPillarTilePointer7, AnimateSproutPillarTile
@@ -259,31 +259,31 @@ TilesetAnimfc2bf: ; 0xfc2bf
dw NULL, DoneTileAnimation
; 0xfc2e7
-Tileset04Anim: ; 0xfc2e7
-Tileset05Anim: ; 0xfc2e7
-Tileset06Anim: ; 0xfc2e7
-Tileset07Anim: ; 0xfc2e7
-Tileset08Anim: ; 0xfc2e7
-Tileset10Anim: ; 0xfc2e7
-Tileset11Anim: ; 0xfc2e7
-Tileset12Anim: ; 0xfc2e7
-Tileset13Anim: ; 0xfc2e7
-Tileset14Anim: ; 0xfc2e7
-Tileset16Anim: ; 0xfc2e7
-Tileset17Anim: ; 0xfc2e7
-Tileset18Anim: ; 0xfc2e7
-Tileset19Anim: ; 0xfc2e7
-Tileset20Anim: ; 0xfc2e7
-Tileset21Anim: ; 0xfc2e7
-Tileset22Anim: ; 0xfc2e7
-Tileset26Anim: ; 0xfc2e7
-Tileset27Anim: ; 0xfc2e7
-Tileset28Anim: ; 0xfc2e7
-Tileset32Anim: ; 0xfc2e7
-Tileset33Anim: ; 0xfc2e7
-Tileset34Anim: ; 0xfc2e7
-Tileset35Anim: ; 0xfc2e7
-Tileset36Anim: ; 0xfc2e7
+TilesetBattleTowerOutsideAnim: ; 0xfc2e7
+TilesetHouse1Anim: ; 0xfc2e7
+TilesetPlayersHouseAnim: ; 0xfc2e7
+TilesetPokecenterAnim: ; 0xfc2e7
+TilesetGateAnim: ; 0xfc2e7
+TilesetLabAnim: ; 0xfc2e7
+TilesetPowerPlantAnim: ; 0xfc2e7
+TilesetMartAnim: ; 0xfc2e7
+TilesetCeladonMansionAnim: ; 0xfc2e7
+TilesetGameCornerAnim: ; 0xfc2e7
+TilesetKurtsHouseAnim: ; 0xfc2e7
+TilesetTrainStationAnim: ; 0xfc2e7
+TilesetOlivineGymAnim: ; 0xfc2e7
+TilesetLighthouseAnim: ; 0xfc2e7
+TilesetPlayersHouse2FAnim: ; 0xfc2e7
+TilesetPokeComCenterAnim: ; 0xfc2e7
+TilesetBattleTowerAnim: ; 0xfc2e7
+TilesetRuinsOfAlphAnim: ; 0xfc2e7
+TilesetRadioTowerAnim: ; 0xfc2e7
+TilesetUndergroundAnim: ; 0xfc2e7
+TilesetBetaWordRoomAnim: ; 0xfc2e7
+TilesetHoOhWordRoomAnim: ; 0xfc2e7
+TilesetKabutoWordRoomAnim: ; 0xfc2e7
+TilesetOmanyteWordRoomAnim: ; 0xfc2e7
+TilesetAerodactylWordRoomAnim: ; 0xfc2e7
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
@@ -304,7 +304,7 @@ WaitTileAnimation: ; fc2fe
StandingTileFrame8: ; fc2ff
ld a, [TileAnimationTimer]
inc a
- and a, 7
+ and 7
ld [TileAnimationTimer], a
ret
; fc309
@@ -492,7 +492,7 @@ AnimateWaterTile: ; fc402
; fc41c
WaterTileFrames: ; fc41c
- INCBIN "gfx/tilesets/water.2bpp"
+ INCBIN "gfx/tilesets/water/water.2bpp"
; fc45c
diff --git a/tilesets/battle_tower.pal b/tilesets/battle_tower.pal
index f7daec67a..4e71a5575 100644
--- a/tilesets/battle_tower.pal
+++ b/tilesets/battle_tower.pal
@@ -1,38 +1,39 @@
+; gray
RGB 30, 28, 26
RGB 19, 19, 19
RGB 13, 13, 13
RGB 07, 07, 07
-
+; red
RGB 30, 28, 26
RGB 31, 19, 24
RGB 30, 10, 06
RGB 07, 07, 07
-
+; green
RGB 18, 24, 09
RGB 15, 20, 01
RGB 09, 13, 00
RGB 07, 07, 07
-
+; water (blue)
RGB 30, 28, 26
RGB 15, 16, 31
RGB 09, 09, 31
RGB 07, 07, 07
-
+; yellow
RGB 30, 28, 26
RGB 31, 31, 07
RGB 31, 16, 01
RGB 07, 07, 07
-
+; brown
RGB 26, 24, 17
RGB 21, 17, 07
RGB 16, 13, 03
RGB 07, 07, 07
-
+; roof
RGB 05, 05, 16
RGB 08, 19, 28
RGB 00, 00, 00
RGB 31, 31, 31
-
+; text
RGB 31, 31, 16
RGB 31, 31, 16
RGB 14, 09, 00
diff --git a/tilesets/battle_tower_collision.asm b/tilesets/battle_tower_collision.asm
new file mode 100644
index 000000000..908fee326
--- /dev/null
+++ b/tilesets/battle_tower_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 03
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 04
+ tilecoll WALL, DOOR, FLOOR, FLOOR ; 05
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 06
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 07
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 08
+ tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 09
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 0a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 0c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10
+ tilecoll DOOR, WALL, FLOOR, FLOOR ; 11
+ tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 12
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 13
+ tilecoll WALL, WALL, WALL, WALL ; 14
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 15
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 16
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 17
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 18
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 19
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1a
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 1b
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1e
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1f
+ tilecoll WALL, WALL, FLOOR, WALL ; 20
+ tilecoll WALL, WALL, WALL, FLOOR ; 21
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 22
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 23
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 25
+ tilecoll WALL, FLOOR, FLOOR, DOOR ; 26
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 27
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 28
+ tilecoll WALL, PC, FLOOR, FLOOR ; 29
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2a
+ tilecoll WALL, WALL, WALL, FLOOR ; 2b
+ tilecoll WALL, WALL, FLOOR, WALL ; 2c
+ tilecoll FLOOR, FLOOR, FLOOR, DOOR ; 2d
+ tilecoll FLOOR, FLOOR, DOOR, FLOOR ; 2e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll WALL, WALL, FLOOR, WALL ; 37
+ tilecoll WALL, WALL, WALL, FLOOR ; 38
+ tilecoll WALL, WALL, FLOOR, WALL ; 39
+ tilecoll WALL, WALL, WALL, WALL ; 3a
+ tilecoll WALL, WALL, WALL, FLOOR ; 3b
+ tilecoll WALL, WALL, WALL, WALL ; 3c
+ tilecoll WALL, WALL, FLOOR, WALL ; 3d
+ tilecoll WALL, WALL, FLOOR, WALL ; 3e
+ tilecoll WALL, WALL, WALL, FLOOR ; 3f
+ tilecoll WALL, WALL, FLOOR, WALL ; 40
diff --git a/tilesets/22_metatiles.bin b/tilesets/battle_tower_metatiles.bin
index c64ef0a12..c64ef0a12 100644
--- a/tilesets/22_metatiles.bin
+++ b/tilesets/battle_tower_metatiles.bin
Binary files differ
diff --git a/tilesets/battle_tower_outside_collision.asm b/tilesets/battle_tower_outside_collision.asm
new file mode 100644
index 000000000..3aaa60113
--- /dev/null
+++ b/tilesets/battle_tower_outside_collision.asm
@@ -0,0 +1,128 @@
+ tilecoll 01, 01, 01, 01 ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll WALL, WALL, WALL, WALL ; 06
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08
+ tilecoll WALL, WALL, WALL, WALL ; 09
+ tilecoll WALL, WALL, WALL, WALL ; 0a
+ tilecoll WALL, WALL, WALL, WALL ; 0b
+ tilecoll WALL, WALL, WALL, WALL ; 0c
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 0d
+ tilecoll FLOOR, WALL, WALL, WALL ; 0e
+ tilecoll WALL, WALL, WALL, WALL ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 11
+ tilecoll WALL, WALL, FLOOR, WALL ; 12
+ tilecoll WALL, WALL, DOOR, DOOR ; 13
+ tilecoll WALL, WALL, WALL, FLOOR ; 14
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 15
+ tilecoll WALL, WALL, WALL, WALL ; 16
+ tilecoll WALL, WALL, DOOR, WALL ; 17
+ tilecoll WALL, WALL, WALL, WALL ; 18
+ tilecoll WALL, WALL, WALL, WALL ; 19
+ tilecoll WALL, WALL, WALL, WALL ; 1a
+ tilecoll WALL, WALL, WALL, WALL ; 1b
+ tilecoll WALL, WALL, WALL, WALL ; 1c
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, FLOOR ; 1d
+ tilecoll FLOOR, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 1e
+ tilecoll WALL, WALL, WALL, WALL ; 1f
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE ; 20
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 21
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 22
+ tilecoll WALL, WALL, WALL, WALL ; 23
+ tilecoll WALL, WALL, WALL, WALL ; 24
+ tilecoll WALL, WALL, WALL, WALL ; 25
+ tilecoll WALL, WALL, WALL, WALL ; 26
+ tilecoll WALL, WALL, WALL, WALL ; 27
+ tilecoll WALL, WALL, WALL, WALL ; 28
+ tilecoll WALL, WALL, WALL, WALL ; 29
+ tilecoll WALL, WALL, WALL, WALL ; 2a
+ tilecoll WALL, WALL, WALL, WALL ; 2b
+ tilecoll WALL, WALL, WALL, WALL ; 2c
+ tilecoll WALL, WALL, WALL, WALL ; 2d
+ tilecoll WALL, FLOOR, WALL, WALL ; 2e
+ tilecoll WALL, WALL, WALL, WALL ; 2f
+ tilecoll WALL, FLOOR, WALL, WALL ; 30
+ tilecoll WALL, WALL, WALL, WALL ; 31
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 32
+ tilecoll WALL, HEADBUTT_TREE, WALL, HEADBUTT_TREE ; 33
+ tilecoll WALL, WALL, WALL, WALL ; 34
+ tilecoll WHIRLPOOL, FLOOR, WHIRLPOOL, FLOOR ; 35
+ tilecoll WHIRLPOOL, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll 5B, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll 5B, 01, FLOOR, FLOOR ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 40
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 41
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 42
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 43
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 44
+ tilecoll FLOOR, FLOOR, BRAKE_45, FLOOR ; 45
+ tilecoll FLOOR, FLOOR, BRAKE_45, FLOOR ; 46
+ tilecoll FLOOR, FLOOR, BRAKE_45, FLOOR ; 47
+ tilecoll FLOOR, FLOOR, BRAKE_45, FLOOR ; 48
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 49
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 4a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 4b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 4c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 4d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 4e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 4f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 50
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 51
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 52
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 53
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 54
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 55
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 56
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 57
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 58
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 59
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 60
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 61
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 62
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 63
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 64
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 65
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 66
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 67
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 68
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 69
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 6a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 6b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 6c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 6d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 6e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 6f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 70
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 71
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 72
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 73
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 74
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 75
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 76
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 77
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 78
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 79
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 80
diff --git a/tilesets/04_metatiles.bin b/tilesets/battle_tower_outside_metatiles.bin
index c4390bcba..c4390bcba 100644
--- a/tilesets/04_metatiles.bin
+++ b/tilesets/battle_tower_outside_metatiles.bin
Binary files differ
diff --git a/tilesets/04_palette_map.asm b/tilesets/battle_tower_outside_palette_map.asm
index dfc74a9c0..dfc74a9c0 100644
--- a/tilesets/04_palette_map.asm
+++ b/tilesets/battle_tower_outside_palette_map.asm
diff --git a/tilesets/22_palette_map.asm b/tilesets/battle_tower_palette_map.asm
index 1abce2a16..1abce2a16 100644
--- a/tilesets/22_palette_map.asm
+++ b/tilesets/battle_tower_palette_map.asm
diff --git a/tilesets/beta_word_room_collision.asm b/tilesets/beta_word_room_collision.asm
new file mode 100644
index 000000000..138f07143
--- /dev/null
+++ b/tilesets/beta_word_room_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 14
+ tilecoll WALL, WALL, WALL, FLOOR ; 15
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 16
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 17
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 18
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 19
+ tilecoll WALL, WALL, FLOOR, WALL ; 1a
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1b
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1c
+ tilecoll FLOOR, FLOOR, FLOOR, PIT ; 1d
+ tilecoll WALL, WALL, WALL, WALL ; 1e
+ tilecoll WALL, WALL, WALL, WALL ; 1f
+ tilecoll WALL, WALL, WALL, WALL ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 25
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 40
diff --git a/tilesets/32_metatiles.bin b/tilesets/beta_word_room_metatiles.bin
index 47c531b2e..47c531b2e 100644
--- a/tilesets/32_metatiles.bin
+++ b/tilesets/beta_word_room_metatiles.bin
diff --git a/tilesets/32_palette_map.asm b/tilesets/beta_word_room_palette_map.asm
index 5ebde24ba..5ebde24ba 100644
--- a/tilesets/32_palette_map.asm
+++ b/tilesets/beta_word_room_palette_map.asm
diff --git a/tilesets/bg.pal b/tilesets/bg.pal
deleted file mode 100644
index 03b01b47c..000000000
--- a/tilesets/bg.pal
+++ /dev/null
@@ -1,209 +0,0 @@
- RGB 28, 31, 16
- RGB 21, 21, 21
- RGB 13, 13, 13
- RGB 07, 07, 07
-
- RGB 28, 31, 16
- RGB 31, 19, 24
- RGB 30, 10, 06
- RGB 07, 07, 07
-
- RGB 22, 31, 10
- RGB 12, 25, 01
- RGB 05, 14, 00
- RGB 07, 07, 07
-
- RGB 31, 31, 31
- RGB 08, 12, 31
- RGB 01, 04, 31
- RGB 07, 07, 07
-
- RGB 28, 31, 16
- RGB 31, 31, 07
- RGB 31, 16, 01
- RGB 07, 07, 07
-
- RGB 28, 31, 16
- RGB 24, 18, 07
- RGB 20, 15, 03
- RGB 07, 07, 07
-
- RGB 28, 31, 16
- RGB 15, 31, 31
- RGB 05, 17, 31
- RGB 07, 07, 07
-
- RGB 31, 31, 16
- RGB 31, 31, 16
- RGB 14, 09, 00
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 21, 21, 21
- RGB 13, 13, 13
- RGB 07, 07, 07
-
- RGB 27, 31, 27
- RGB 31, 19, 24
- RGB 30, 10, 06
- RGB 07, 07, 07
-
- RGB 22, 31, 10
- RGB 12, 25, 01
- RGB 05, 14, 00
- RGB 07, 07, 07
-
- RGB 31, 31, 31
- RGB 08, 12, 31
- RGB 01, 04, 31
- RGB 07, 07, 07
-
- RGB 27, 31, 27
- RGB 31, 31, 07
- RGB 31, 16, 01
- RGB 07, 07, 07
-
- RGB 27, 31, 27
- RGB 24, 18, 07
- RGB 20, 15, 03
- RGB 07, 07, 07
-
- RGB 27, 31, 27
- RGB 15, 31, 31
- RGB 05, 17, 31
- RGB 07, 07, 07
-
- RGB 31, 31, 16
- RGB 31, 31, 16
- RGB 14, 09, 00
- RGB 00, 00, 00
-
- RGB 15, 14, 24
- RGB 11, 11, 19
- RGB 07, 07, 12
- RGB 00, 00, 00
-
- RGB 15, 14, 24
- RGB 14, 07, 17
- RGB 13, 00, 08
- RGB 00, 00, 00
-
- RGB 15, 14, 24
- RGB 08, 13, 19
- RGB 00, 11, 13
- RGB 00, 00, 00
-
- RGB 15, 14, 24
- RGB 05, 05, 17
- RGB 03, 03, 10
- RGB 00, 00, 00
-
- RGB 30, 30, 11
- RGB 16, 14, 18
- RGB 16, 14, 10
- RGB 00, 00, 00
-
- RGB 15, 14, 24
- RGB 12, 09, 15
- RGB 08, 04, 05
- RGB 00, 00, 00
-
- RGB 15, 14, 24
- RGB 13, 12, 23
- RGB 11, 09, 20
- RGB 00, 00, 00
-
- RGB 31, 31, 16
- RGB 31, 31, 16
- RGB 14, 09, 00
- RGB 00, 00, 00
-
- RGB 01, 01, 02
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 01, 01, 02
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 01, 01, 02
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 01, 01, 02
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 30, 30, 11
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 01, 01, 02
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 01, 01, 02
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 31, 31, 16
- RGB 31, 31, 16
- RGB 14, 09, 00
- RGB 00, 00, 00
-
- RGB 30, 28, 26
- RGB 19, 19, 19
- RGB 13, 13, 13
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 31, 19, 24
- RGB 30, 10, 06
- RGB 07, 07, 07
-
- RGB 18, 24, 09
- RGB 15, 20, 01
- RGB 09, 13, 00
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 15, 16, 31
- RGB 09, 09, 31
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 31, 31, 07
- RGB 31, 16, 01
- RGB 07, 07, 07
-
- RGB 26, 24, 17
- RGB 21, 17, 07
- RGB 16, 13, 03
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 17, 19, 31
- RGB 14, 16, 31
- RGB 07, 07, 07
-
- RGB 31, 31, 16
- RGB 31, 31, 16
- RGB 14, 09, 00
- RGB 00, 00, 00
-
- RGB 23, 23, 31
- RGB 18, 19, 31
- RGB 13, 12, 31
- RGB 07, 07, 07
-
- RGB 15, 13, 27
- RGB 10, 09, 20
- RGB 04, 03, 18
- RGB 00, 00, 00
diff --git a/tilesets/cave_collision.asm b/tilesets/cave_collision.asm
new file mode 100644
index 000000000..3d5e0ae05
--- /dev/null
+++ b/tilesets/cave_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll WALL, WALL, WALL, WALL ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 04
+ tilecoll WALL, UP_WALL, WALL, FLOOR ; 05
+ tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 06
+ tilecoll UP_WALL, WALL, FLOOR, WALL ; 07
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 08
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 09
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 0b
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 0c
+ tilecoll WALL, FLOOR, WALL, WALL ; 0d
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 0e
+ tilecoll FLOOR, WALL, WALL, WALL ; 0f
+ tilecoll WATER, WATER, WATER, WATER ; 10
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 11
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 12
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 13
+ tilecoll FLOOR, FLOOR, WALL, CAVE ; 14
+ tilecoll UP_WALL, UP_WALL, FLOOR, LADDER ; 15
+ tilecoll UP_WALL, UP_WALL, FLOOR, LADDER ; 16
+ tilecoll WALL, FLOOR, WALL, WARP_CARPET_DOWN ; 17
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 18
+ tilecoll WALL, WALL, WALL, FLOOR ; 19
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1a
+ tilecoll WALL, WALL, FLOOR, WALL ; 1b
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 1c
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1d
+ tilecoll WALL, WALL, WALL, WALL ; 1e
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1f
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 20
+ tilecoll WALL, FLOOR, WALL, WALL ; 21
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 22
+ tilecoll FLOOR, WALL, WALL, WALL ; 23
+ tilecoll UP_WALL, WALL, FLOOR, FLOOR ; 24
+ tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 25
+ tilecoll WATER, WATER, WATER, WATER ; 26
+ tilecoll WATER, WATER, WATER, WATER ; 27
+ tilecoll WATER, WATER, WATER, WATER ; 28
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 29
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 2a
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 2c
+ tilecoll WATERFALL, WATERFALL, WATERFALL, WATERFALL ; 2d
+ tilecoll WALL, WALL, WALL, WALL ; 2e
+ tilecoll WALL, WALL, WALL, WALL ; 2f
+ tilecoll WALL, WALL, WALL, WALL ; 30
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 31
+ tilecoll WALL, WALL, WALL, WALL ; 32
+ tilecoll WATER, WATER, WATER, WATER ; 33
+ tilecoll WATER, WATER, WATER, WATER ; 34
+ tilecoll WALL, WALL, WALL, WALL ; 35
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 36
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 37
+ tilecoll WALL, WALL, WALL, CAVE ; 38
+ tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 39
+ tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 3a
+ tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 3b
+ tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 3c
+ tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 3d
+ tilecoll WATER, WATER, WATER, WATER ; 3e
+ tilecoll WATER, WATER, WATER, WATER ; 3f
+ tilecoll FLOOR, FLOOR, PIT, FLOOR ; 40
diff --git a/tilesets/24_metatiles.bin b/tilesets/cave_metatiles.bin
index a41b5b080..a41b5b080 100644
--- a/tilesets/24_metatiles.bin
+++ b/tilesets/cave_metatiles.bin
diff --git a/tilesets/24_palette_map.asm b/tilesets/cave_palette_map.asm
index 73c09ebe5..73c09ebe5 100644
--- a/tilesets/24_palette_map.asm
+++ b/tilesets/cave_palette_map.asm
diff --git a/tilesets/celadon_mansion_collision.asm b/tilesets/celadon_mansion_collision.asm
new file mode 100644
index 000000000..5db409be7
--- /dev/null
+++ b/tilesets/celadon_mansion_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll WALL, WALL, WALL, WALL ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 05
+ tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 06
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 07
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 08
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 09
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 0a
+ tilecoll WALL, WALL, FLOOR, WALL ; 0b
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 0c
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 0d
+ tilecoll WALL, WALL, FLOOR, WALL ; 0e
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 0f
+ tilecoll WALL, WALL, BOOKSHELF, INCENSE_BURNER ; 10
+ tilecoll WALL, WALL, WALL, WALL ; 11
+ tilecoll WALL, WALL, BOOKSHELF, WALL ; 12
+ tilecoll WALL, WALL, WALL, WALL ; 13
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 14
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 15
+ tilecoll STAIRCASE, STAIRCASE, FLOOR, FLOOR ; 16
+ tilecoll STAIRCASE, STAIRCASE, FLOOR, FLOOR ; 17
+ tilecoll WALL, DOOR, FLOOR, FLOOR ; 18
+ tilecoll WALL, WALL, BOOKSHELF, WALL ; 19
+ tilecoll WALL, WALL, WALL, WALL ; 1a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1c
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1d
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 1e
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 1f
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 20
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 21
+ tilecoll RIGHT_WALL, LEFT_WALL, WALL, FLOOR ; 22
+ tilecoll WALL, WALL, FLOOR, WALL ; 23
+ tilecoll WALL, WALL, STAIRCASE, LEFT_WALL ; 24
+ tilecoll WALL, WALL, WALL, STAIRCASE ; 25
+ tilecoll WALL, WALL, LEFT_WALL, FLOOR ; 26
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 27
+ tilecoll WALL, WALL, DOOR, WALL ; 28
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 29
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 2a
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c
+ tilecoll RIGHT_WALL, LEFT_WALL, RIGHT_WALL, LEFT_WALL ; 2d
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 2e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f
+ tilecoll WALL, WALL, WALL, FLOOR ; 30
+ tilecoll WALL, WALL, FLOOR, WALL ; 31
+ tilecoll WALL, WALL, FLOOR, WALL ; 32
+ tilecoll WALL, WALL, WALL, WALL ; 33
+ tilecoll WALL, WALL, WALL, FLOOR ; 34
+ tilecoll WALL, WALL, WALL, WALL ; 35
+ tilecoll FLOOR, WALL, WALL, WALL ; 36
+ tilecoll WALL, WALL, FLOOR, WALL ; 37
+ tilecoll WALL, FLOOR, WALL, WALL ; 38
+ tilecoll WALL, WALL, FLOOR, WALL ; 39
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 3a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 3b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll WALL, FLOOR, WALL, WALL ; 3e
+ tilecoll FLOOR, WALL, WALL, WALL ; 3f
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 40
diff --git a/tilesets/13_metatiles.bin b/tilesets/celadon_mansion_metatiles.bin
index d4506328f..d4506328f 100644
--- a/tilesets/13_metatiles.bin
+++ b/tilesets/celadon_mansion_metatiles.bin
diff --git a/tilesets/13_palette_map.asm b/tilesets/celadon_mansion_palette_map.asm
index 2bd27ad22..2bd27ad22 100644
--- a/tilesets/13_palette_map.asm
+++ b/tilesets/celadon_mansion_palette_map.asm
diff --git a/tilesets/collision.asm b/tilesets/collision.asm
deleted file mode 100755
index 29b61feed..000000000
--- a/tilesets/collision.asm
+++ /dev/null
@@ -1,264 +0,0 @@
-
-; 00 land
-; 01 water
-; 0f wall
-; 11 talkable water
-; 1f talkable wall
-NONTALKABLE EQUS "db"
-TALKABLE EQUS "db TALK +"
- NONTALKABLE LANDTILE ; 00
- NONTALKABLE LANDTILE ; 01
- NONTALKABLE LANDTILE ; 02
- NONTALKABLE LANDTILE ; 03
- NONTALKABLE LANDTILE ; 04
- NONTALKABLE LANDTILE ; 05
- NONTALKABLE LANDTILE ; 06
- NONTALKABLE WALLTILE ; 07
- NONTALKABLE LANDTILE ; 08
- NONTALKABLE LANDTILE ; 09
- NONTALKABLE LANDTILE ; 0a
- NONTALKABLE LANDTILE ; 0b
- NONTALKABLE LANDTILE ; 0c
- NONTALKABLE LANDTILE ; 0d
- NONTALKABLE LANDTILE ; 0e
- NONTALKABLE WALLTILE ; 0f
- NONTALKABLE LANDTILE ; 10
- NONTALKABLE LANDTILE ; 11
- TALKABLE WALLTILE ; 12
- NONTALKABLE LANDTILE ; 13
- NONTALKABLE LANDTILE ; 14
- TALKABLE WALLTILE ; 15
- NONTALKABLE LANDTILE ; 16
- NONTALKABLE LANDTILE ; 17
- NONTALKABLE LANDTILE ; 18
- NONTALKABLE LANDTILE ; 19
- TALKABLE WALLTILE ; 1a
- NONTALKABLE LANDTILE ; 1b
- NONTALKABLE LANDTILE ; 1c
- TALKABLE WALLTILE ; 1d
- NONTALKABLE LANDTILE ; 1e
- NONTALKABLE LANDTILE ; 1f
- NONTALKABLE WATERTILE ; 20
- NONTALKABLE WATERTILE ; 21
- TALKABLE WATERTILE ; 22
- NONTALKABLE LANDTILE ; 23
- TALKABLE WATERTILE ; 24
- NONTALKABLE WATERTILE ; 25
- NONTALKABLE WATERTILE ; 26
- NONTALKABLE WALLTILE ; 27
- NONTALKABLE WATERTILE ; 28
- NONTALKABLE WATERTILE ; 29
- TALKABLE WATERTILE ; 2a
- NONTALKABLE LANDTILE ; 2b
- TALKABLE WATERTILE ; 2c
- NONTALKABLE WATERTILE ; 2d
- NONTALKABLE WATERTILE ; 2e
- NONTALKABLE WALLTILE ; 2f
- NONTALKABLE WATERTILE ; 30
- NONTALKABLE WATERTILE ; 31
- NONTALKABLE WATERTILE ; 32
- NONTALKABLE WATERTILE ; 33
- NONTALKABLE WATERTILE ; 34
- NONTALKABLE WATERTILE ; 35
- NONTALKABLE WATERTILE ; 36
- NONTALKABLE WATERTILE ; 37
- NONTALKABLE WATERTILE ; 38
- NONTALKABLE WATERTILE ; 39
- NONTALKABLE WATERTILE ; 3a
- NONTALKABLE WATERTILE ; 3b
- NONTALKABLE WATERTILE ; 3c
- NONTALKABLE WATERTILE ; 3d
- NONTALKABLE WATERTILE ; 3e
- NONTALKABLE WATERTILE ; 3f
- NONTALKABLE LANDTILE ; 40
- NONTALKABLE LANDTILE ; 41
- NONTALKABLE LANDTILE ; 42
- NONTALKABLE LANDTILE ; 43
- NONTALKABLE LANDTILE ; 44
- NONTALKABLE LANDTILE ; 45
- NONTALKABLE LANDTILE ; 46
- NONTALKABLE LANDTILE ; 47
- NONTALKABLE LANDTILE ; 48
- NONTALKABLE LANDTILE ; 49
- NONTALKABLE LANDTILE ; 4a
- NONTALKABLE LANDTILE ; 4b
- NONTALKABLE LANDTILE ; 4c
- NONTALKABLE LANDTILE ; 4d
- NONTALKABLE LANDTILE ; 4e
- NONTALKABLE LANDTILE ; 4f
- NONTALKABLE LANDTILE ; 50
- NONTALKABLE LANDTILE ; 51
- NONTALKABLE LANDTILE ; 52
- NONTALKABLE LANDTILE ; 53
- NONTALKABLE LANDTILE ; 54
- NONTALKABLE LANDTILE ; 55
- NONTALKABLE LANDTILE ; 56
- NONTALKABLE LANDTILE ; 57
- NONTALKABLE LANDTILE ; 58
- NONTALKABLE LANDTILE ; 59
- NONTALKABLE LANDTILE ; 5a
- NONTALKABLE LANDTILE ; 5b
- NONTALKABLE LANDTILE ; 5c
- NONTALKABLE LANDTILE ; 5d
- NONTALKABLE LANDTILE ; 5e
- NONTALKABLE LANDTILE ; 5f
- NONTALKABLE LANDTILE ; 60
- NONTALKABLE LANDTILE ; 61
- NONTALKABLE WALLTILE ; 62
- NONTALKABLE LANDTILE ; 63
- NONTALKABLE LANDTILE ; 64
- NONTALKABLE LANDTILE ; 65
- NONTALKABLE LANDTILE ; 66
- NONTALKABLE LANDTILE ; 67
- NONTALKABLE LANDTILE ; 68
- NONTALKABLE LANDTILE ; 69
- NONTALKABLE WALLTILE ; 6a
- NONTALKABLE LANDTILE ; 6b
- NONTALKABLE LANDTILE ; 6c
- NONTALKABLE LANDTILE ; 6d
- NONTALKABLE LANDTILE ; 6e
- NONTALKABLE LANDTILE ; 6f
- NONTALKABLE LANDTILE ; 70
- NONTALKABLE LANDTILE ; 71
- NONTALKABLE LANDTILE ; 72
- NONTALKABLE LANDTILE ; 73
- NONTALKABLE LANDTILE ; 74
- NONTALKABLE LANDTILE ; 75
- NONTALKABLE LANDTILE ; 76
- NONTALKABLE LANDTILE ; 77
- NONTALKABLE LANDTILE ; 78
- NONTALKABLE LANDTILE ; 79
- NONTALKABLE LANDTILE ; 7a
- NONTALKABLE LANDTILE ; 7b
- NONTALKABLE LANDTILE ; 7c
- NONTALKABLE LANDTILE ; 7d
- NONTALKABLE LANDTILE ; 7e
- NONTALKABLE LANDTILE ; 7f
- NONTALKABLE WALLTILE ; 80
- NONTALKABLE WALLTILE ; 81
- NONTALKABLE WALLTILE ; 82
- NONTALKABLE WALLTILE ; 83
- NONTALKABLE WALLTILE ; 84
- NONTALKABLE LANDTILE ; 85
- NONTALKABLE LANDTILE ; 86
- NONTALKABLE LANDTILE ; 87
- NONTALKABLE WALLTILE ; 88
- NONTALKABLE WALLTILE ; 89
- NONTALKABLE WALLTILE ; 8a
- NONTALKABLE WALLTILE ; 8b
- NONTALKABLE WALLTILE ; 8c
- NONTALKABLE LANDTILE ; 8d
- NONTALKABLE LANDTILE ; 8e
- NONTALKABLE LANDTILE ; 8f
- NONTALKABLE WALLTILE ; 90
- NONTALKABLE WALLTILE ; 91
- NONTALKABLE WALLTILE ; 92
- NONTALKABLE WALLTILE ; 93
- NONTALKABLE WALLTILE ; 94
- NONTALKABLE WALLTILE ; 95
- NONTALKABLE WALLTILE ; 96
- NONTALKABLE WALLTILE ; 97
- NONTALKABLE WALLTILE ; 98
- NONTALKABLE WALLTILE ; 99
- NONTALKABLE WALLTILE ; 9a
- NONTALKABLE WALLTILE ; 9b
- NONTALKABLE WALLTILE ; 9c
- NONTALKABLE WALLTILE ; 9d
- NONTALKABLE WALLTILE ; 9e
- NONTALKABLE WALLTILE ; 9f
- NONTALKABLE LANDTILE ; a0
- NONTALKABLE LANDTILE ; a1
- NONTALKABLE LANDTILE ; a2
- NONTALKABLE LANDTILE ; a3
- NONTALKABLE LANDTILE ; a4
- NONTALKABLE LANDTILE ; a5
- NONTALKABLE LANDTILE ; a6
- NONTALKABLE LANDTILE ; a7
- NONTALKABLE LANDTILE ; a8
- NONTALKABLE LANDTILE ; a9
- NONTALKABLE LANDTILE ; aa
- NONTALKABLE LANDTILE ; ab
- NONTALKABLE LANDTILE ; ac
- NONTALKABLE LANDTILE ; ad
- NONTALKABLE LANDTILE ; ae
- NONTALKABLE LANDTILE ; af
- NONTALKABLE LANDTILE ; b0
- NONTALKABLE LANDTILE ; b1
- NONTALKABLE LANDTILE ; b2
- NONTALKABLE LANDTILE ; b3
- NONTALKABLE LANDTILE ; b4
- NONTALKABLE LANDTILE ; b5
- NONTALKABLE LANDTILE ; b6
- NONTALKABLE LANDTILE ; b7
- NONTALKABLE LANDTILE ; b8
- NONTALKABLE LANDTILE ; b9
- NONTALKABLE LANDTILE ; ba
- NONTALKABLE LANDTILE ; bb
- NONTALKABLE LANDTILE ; bc
- NONTALKABLE LANDTILE ; bd
- NONTALKABLE LANDTILE ; be
- NONTALKABLE LANDTILE ; bf
- NONTALKABLE WATERTILE ; c0
- NONTALKABLE WATERTILE ; c1
- NONTALKABLE WATERTILE ; c2
- NONTALKABLE WATERTILE ; c3
- NONTALKABLE WATERTILE ; c4
- NONTALKABLE WATERTILE ; c5
- NONTALKABLE WATERTILE ; c6
- NONTALKABLE WATERTILE ; c7
- NONTALKABLE WATERTILE ; c8
- NONTALKABLE WATERTILE ; c9
- NONTALKABLE WATERTILE ; ca
- NONTALKABLE WATERTILE ; cb
- NONTALKABLE WATERTILE ; cc
- NONTALKABLE WATERTILE ; cd
- NONTALKABLE WATERTILE ; ce
- NONTALKABLE WATERTILE ; cf
- NONTALKABLE LANDTILE ; d0
- NONTALKABLE LANDTILE ; d1
- NONTALKABLE LANDTILE ; d2
- NONTALKABLE LANDTILE ; d3
- NONTALKABLE LANDTILE ; d4
- NONTALKABLE LANDTILE ; d5
- NONTALKABLE LANDTILE ; d6
- NONTALKABLE LANDTILE ; d7
- NONTALKABLE LANDTILE ; d8
- NONTALKABLE LANDTILE ; d9
- NONTALKABLE LANDTILE ; da
- NONTALKABLE LANDTILE ; db
- NONTALKABLE LANDTILE ; dc
- NONTALKABLE LANDTILE ; dd
- NONTALKABLE LANDTILE ; de
- NONTALKABLE LANDTILE ; df
- NONTALKABLE LANDTILE ; e0
- NONTALKABLE LANDTILE ; e1
- NONTALKABLE LANDTILE ; e2
- NONTALKABLE LANDTILE ; e3
- NONTALKABLE LANDTILE ; e4
- NONTALKABLE LANDTILE ; e5
- NONTALKABLE LANDTILE ; e6
- NONTALKABLE LANDTILE ; e7
- NONTALKABLE LANDTILE ; e8
- NONTALKABLE LANDTILE ; e9
- NONTALKABLE LANDTILE ; ea
- NONTALKABLE LANDTILE ; eb
- NONTALKABLE LANDTILE ; ec
- NONTALKABLE LANDTILE ; ed
- NONTALKABLE LANDTILE ; ee
- NONTALKABLE LANDTILE ; ef
- NONTALKABLE LANDTILE ; f0
- NONTALKABLE LANDTILE ; f1
- NONTALKABLE LANDTILE ; f2
- NONTALKABLE LANDTILE ; f3
- NONTALKABLE LANDTILE ; f4
- NONTALKABLE LANDTILE ; f5
- NONTALKABLE LANDTILE ; f6
- NONTALKABLE LANDTILE ; f7
- NONTALKABLE LANDTILE ; f8
- NONTALKABLE LANDTILE ; f9
- NONTALKABLE LANDTILE ; fa
- NONTALKABLE LANDTILE ; fb
- NONTALKABLE LANDTILE ; fc
- NONTALKABLE LANDTILE ; fd
- NONTALKABLE LANDTILE ; fe
- NONTALKABLE WALLTILE ; ff
diff --git a/tilesets/data.asm b/tilesets/data.asm
new file mode 100644
index 000000000..7cd1b9072
--- /dev/null
+++ b/tilesets/data.asm
@@ -0,0 +1,434 @@
+SECTION "Roofs", ROMX
+
+INCLUDE "tilesets/roofs.asm"
+
+
+SECTION "Tileset Data 1", ROMX
+
+TilesetKantoGFX: ; 0x18000
+INCBIN "gfx/tilesets/kanto.2bpp.lz"
+; 0x18606
+
+TilesetKantoMeta: ; 0x18606
+INCBIN "tilesets/kanto_metatiles.bin"
+; 0x18e06
+
+TilesetKantoColl: ; 0x18e06
+INCLUDE "tilesets/kanto_collision.asm"
+; 0x19006
+
+Tileset0GFX: ; 0x19006
+TilesetJohto1GFX: ; 0x19006
+INCBIN "gfx/tilesets/johto_1.2bpp.lz"
+; 0x19c0e
+
+Tileset0Meta: ; 0x19c0e
+TilesetJohto1Meta: ; 0x19c0e
+INCBIN "tilesets/johto_1_metatiles.bin"
+; 0x1a40e
+
+Tileset0Coll: ; 0x1a40e
+TilesetJohto1Coll: ; 0x1a40e
+INCLUDE "tilesets/johto_1_collision.asm"
+; 0x1a60e
+
+TilesetIcePathGFX: ; 0x1a60e
+INCBIN "gfx/tilesets/ice_path.2bpp.lz"
+; 0x1af3e
+
+TilesetIcePathMeta: ; 0x1af3e
+INCBIN "tilesets/ice_path_metatiles.bin"
+; 0x1b33e
+
+TilesetIcePathColl: ; 0x1b33e
+INCLUDE "tilesets/ice_path_collision.asm"
+; 0x1b43e
+
+TilesetPlayersHouse2FGFX: ; 0x1b43e
+INCBIN "gfx/tilesets/players_house_2f.2bpp.lz"
+; 0x1b8fe
+
+TilesetPlayersHouse2FMeta: ; 0x1b8fe
+INCBIN "tilesets/players_house_2f_metatiles.bin"
+; 0x1bcfe
+
+TilesetPlayersHouse2FColl: ; 0x1bcfe
+INCLUDE "tilesets/players_house_2f_collision.asm"
+; 0x1bdfe
+
+
+SECTION "Tileset Data 2", ROMX
+
+TilesetPokecenterGFX: ; 0x1c30c
+INCBIN "gfx/tilesets/pokecenter.2bpp.lz"
+; 0x1c73c
+
+TilesetPokecenterMeta: ; 0x1c73c
+INCBIN "tilesets/pokecenter_metatiles.bin"
+; 0x1cb3c
+
+TilesetPokecenterColl: ; 0x1cb3c
+INCLUDE "tilesets/pokecenter_collision.asm"
+; 0x1cc3c
+
+TilesetPortGFX: ; 0x1cc3c
+INCBIN "gfx/tilesets/port.2bpp.lz"
+; 0x1d04c
+
+TilesetPortMeta: ; 0x1d04c
+INCBIN "tilesets/port_metatiles.bin"
+; 0x1d44c
+
+TilesetPortColl: ; 0x1d44c
+INCLUDE "tilesets/port_collision.asm"
+; 0x1d54c
+
+TilesetPlayersHouseGFX: ; 0x1d54c
+INCBIN "gfx/tilesets/players_house.2bpp.lz"
+; 0x1d92c
+
+TilesetPlayersHouseMeta: ; 0x1d92c
+INCBIN "tilesets/players_house_metatiles.bin"
+; 0x1dd2c
+
+TilesetPlayersHouseColl: ; 0x1dd2c
+INCLUDE "tilesets/players_house_collision.asm"
+; 0x1de2c
+
+TilesetCeladonMansionGFX: ; 0x1de2c
+INCBIN "gfx/tilesets/celadon_mansion.2bpp.lz"
+; 0x1e58c
+
+TilesetCeladonMansionMeta: ; 0x1e58c
+INCBIN "tilesets/celadon_mansion_metatiles.bin"
+; 0x1e98c
+
+TilesetCeladonMansionColl: ; 0x1e98c
+INCLUDE "tilesets/celadon_mansion_collision.asm"
+; 0x1ea8c
+
+TilesetCaveGFX: ; 0x1ea8c
+INCBIN "gfx/tilesets/cave.2bpp.lz"
+; 0x1ee1c
+
+TilesetCaveMeta: ; 0x1ee1c
+TilesetWhirlIslandsMeta: ; 0x1ee1c
+INCBIN "tilesets/cave_metatiles.bin"
+; 0x1f21c
+
+TilesetCaveColl: ; 0x1f21c
+TilesetWhirlIslandsColl: ; 0x1f21c
+INCLUDE "tilesets/cave_collision.asm"
+; 0x1f31c
+
+
+SECTION "Tileset Data 3", ROMX
+
+TilesetSproutTowerGFX: ; 0x20181
+INCBIN "gfx/tilesets/sprout_tower.2bpp.lz"
+; 0x206e1
+
+TilesetSproutTowerMeta: ; 0x206e1
+INCBIN "tilesets/sprout_tower_metatiles.bin"
+; 0x20ae1
+
+TilesetSproutTowerColl: ; 0x20ae1
+INCLUDE "tilesets/sprout_tower_collision.asm"
+; 0x20be1
+
+TilesetLabGFX: ; 0x20be1
+INCBIN "gfx/tilesets/lab.2bpp.lz"
+; 0x213e1
+
+TilesetLabMeta: ; 0x213e1
+INCBIN "tilesets/lab_metatiles.bin"
+; 0x217e1
+
+TilesetLabColl: ; 0x217e1
+INCLUDE "tilesets/lab_collision.asm"
+; 0x218e1
+
+TilesetMartGFX: ; 0x218e1
+INCBIN "gfx/tilesets/mart.2bpp.lz"
+; 0x22031
+
+TilesetMartMeta: ; 0x22031
+INCBIN "tilesets/mart_metatiles.bin"
+; 0x22431
+
+TilesetMartColl: ; 0x22431
+INCLUDE "tilesets/mart_collision.asm"
+; 0x22531
+
+TilesetGameCornerGFX: ; 0x22531
+INCBIN "gfx/tilesets/game_corner.2bpp.lz"
+; 0x22af1
+
+TilesetGameCornerMeta: ; 0x22af1
+INCBIN "tilesets/game_corner_metatiles.bin"
+; 0x22ef1
+
+TilesetGameCornerColl: ; 0x22ef1
+INCLUDE "tilesets/game_corner_collision.asm"
+; 0x22ff1
+
+TilesetTrainStationGFX: ; 0x22ff1
+INCBIN "gfx/tilesets/train_station.2bpp.lz"
+; 0x23391
+
+TilesetTrainStationMeta: ; 0x23391
+INCBIN "tilesets/train_station_metatiles.bin"
+; 0x23791
+
+TilesetTrainStationColl: ; 0x23791
+INCLUDE "tilesets/train_station_collision.asm"
+; 0x23891
+
+TilesetIlexForestMeta: ; 0x23891
+INCBIN "tilesets/ilex_forest_metatiles.bin"
+; 0x23b11
+
+
+SECTION "Tileset Data 4", ROMX
+
+TilesetGym1GFX: ; 0x30000
+INCBIN "gfx/tilesets/gym_1.2bpp.lz"
+; 0x304e0
+
+TilesetGym1Meta: ; 0x304e0
+INCBIN "tilesets/gym_1_metatiles.bin"
+; 0x308e0
+
+TilesetGym1Coll: ; 0x308e0
+INCLUDE "tilesets/gym_1_collision.asm"
+; 0x309e0
+
+TilesetParkGFX: ; 0x309e0
+INCBIN "gfx/tilesets/park.2bpp.lz"
+; 0x30e80
+
+TilesetParkMeta: ; 0x30e80
+INCBIN "tilesets/park_metatiles.bin"
+; 0x31280
+
+TilesetParkColl: ; 0x31280
+INCLUDE "tilesets/park_collision.asm"
+; 0x31380
+
+TilesetRadioTowerGFX: ; 0x31380
+INCBIN "gfx/tilesets/radio_tower.2bpp.lz"
+; 0x318e0
+
+TilesetRadioTowerMeta: ; 0x318e0
+INCBIN "tilesets/radio_tower_metatiles.bin"
+; 0x31ce0
+
+TilesetRadioTowerColl: ; 0x31ce0
+INCLUDE "tilesets/radio_tower_collision.asm"
+; 0x31de0
+
+TilesetUndergroundGFX: ; 0x31de0
+INCBIN "gfx/tilesets/underground.2bpp.lz"
+; 0x321b0
+
+TilesetUndergroundMeta: ; 0x321b0
+INCBIN "tilesets/underground_metatiles.bin"
+; 0x325b0
+
+TilesetUndergroundColl: ; 0x325b0
+INCLUDE "tilesets/underground_collision.asm"
+; 0x326b0
+
+TilesetWhirlIslandsGFX: ; 0x326b0
+INCBIN "gfx/tilesets/whirl_islands.2bpp.lz"
+; 0x329f0
+
+UnusedTilesetWhirlIslandsMeta: ; 0x329f0
+INCBIN "tilesets/unused_whirl_islands_metatiles.bin"
+; 0x331f0
+
+UnusedTilesetWhirlIslandsColl: ; 0x331f0
+INCLUDE "tilesets/unused_whirl_islands_collision.asm"
+; 0x333f0
+
+
+SECTION "Tileset Data 5", ROMX
+
+TilesetPokeComCenterGFX: ; 0xb4000
+INCBIN "gfx/tilesets/pokecom_center.2bpp.lz"
+; 0xb48a0
+
+TilesetPokeComCenterMeta: ; 0xb48a0
+INCBIN "tilesets/pokecom_center_metatiles.bin"
+; 0xb4ca0
+
+TilesetPokeComCenterColl: ; 0xb4ca0
+INCLUDE "tilesets/pokecom_center_collision.asm"
+; 0xb4da0
+
+TilesetBattleTowerGFX: ; 0xb4da0
+INCBIN "gfx/tilesets/battle_tower.2bpp.lz"
+; 0xb50e0
+
+TilesetBattleTowerMeta: ; 0xb50e0
+INCBIN "tilesets/battle_tower_metatiles.bin"
+; 0xb54e0
+
+TilesetBattleTowerColl: ; 0xb54e0
+INCLUDE "tilesets/battle_tower_collision.asm"
+; 0xb55e0
+
+TilesetGateGFX: ; 0xb55e0
+INCBIN "gfx/tilesets/gate.2bpp.lz"
+; 0xb59e0
+
+TilesetGateMeta: ; 0xb59e0
+INCBIN "tilesets/gate_metatiles.bin"
+; 0xb5de0
+
+TilesetGateColl: ; 0xb5de0
+INCLUDE "tilesets/gate_collision.asm"
+; 0xb5ee0
+
+TilesetJohto2GFX: ; 0xb5ee0
+TilesetBattleTowerOutsideGFX: ; 0xb5ee0
+INCBIN "gfx/tilesets/johto_2.2bpp.lz"
+; 0xb6ae8
+
+TilesetJohto2Meta: ; 0xb6ae8
+INCBIN "tilesets/johto_2_metatiles.bin"
+; 0xb72e8
+
+TilesetJohto2Coll: ; 0xb72e8
+INCLUDE "tilesets/johto_2_collision.asm"
+; 0xb74e8
+
+TilesetKurtsHouseGFX: ; 0xb74e8
+INCBIN "gfx/tilesets/kurts_house.2bpp.lz"
+; 0xb79a8
+
+TilesetKurtsHouseMeta: ; 0xb79a8
+INCBIN "tilesets/kurts_house_metatiles.bin"
+; 0xb7da8
+
+TilesetKurtsHouseColl: ; 0xb7da8
+INCLUDE "tilesets/kurts_house_collision.asm"
+; 0xb7ea8
+
+
+SECTION "Tileset Data 6", ROMX
+
+TilesetIlexForestGFX: ; 0xdc000
+INCBIN "gfx/tilesets/ilex_forest.2bpp.lz"
+; 0xdc3d0
+
+TilesetOlivineGymGFX: ; 0xdc3d0
+INCBIN "gfx/tilesets/olivine_gym.2bpp.lz"
+; 0xdcc50
+
+TilesetOlivineGymMeta: ; 0xdcc50
+INCBIN "tilesets/olivine_gym_metatiles.bin"
+; 0xdd050
+
+TilesetOlivineGymColl: ; 0xdd050
+INCLUDE "tilesets/olivine_gym_collision.asm"
+; 0xdd150
+
+TilesetHouse1GFX: ; 0xdd150
+INCBIN "gfx/tilesets/house_1.2bpp.lz"
+; 0xdd600
+
+TilesetHouse1Meta: ; 0xdd600
+INCBIN "tilesets/house_1_metatiles.bin"
+; 0xdda00
+
+TilesetHouse1Coll: ; 0xdda00
+INCLUDE "tilesets/house_1_collision.asm"
+; 0xddb00
+
+TilesetLighthouseGFX: ; 0xddb00
+INCBIN "gfx/tilesets/lighthouse.2bpp.lz"
+; 0xddf70
+
+TilesetLighthouseMeta: ; 0xddf70
+INCBIN "tilesets/lighthouse_metatiles.bin"
+; 0xde370
+
+TilesetLighthouseColl: ; 0xde370
+INCLUDE "tilesets/lighthouse_collision.asm"
+; 0xde470
+
+TilesetIlexForestColl: ; 0xde470
+INCLUDE "tilesets/ilex_forest_collision.asm"
+; 0xde570
+
+TilesetPowerPlantGFX: ; 0xde570
+INCBIN "gfx/tilesets/power_plant.2bpp.lz"
+; 0xde990
+
+TilesetPowerPlantMeta: ; 0xde990
+INCBIN "tilesets/power_plant_metatiles.bin"
+; 0xded90
+
+TilesetPowerPlantColl: ; 0xded90
+INCLUDE "tilesets/power_plant_collision.asm"
+; 0xdee90
+
+TilesetBattleTowerOutsideMeta: ; 0xdee90
+INCBIN "tilesets/battle_tower_outside_metatiles.bin"
+; 0xdf690
+
+TilesetBattleTowerOutsideColl: ; 0xdf690
+INCLUDE "tilesets/battle_tower_outside_collision.asm"
+; 0xdf890
+
+TilesetBetaWordRoomMeta: ; 0xdf890
+INCBIN "tilesets/beta_word_room_metatiles.bin"
+; 0xdfc90
+
+TilesetBetaWordRoomColl: ; 0xdfc90
+TilesetHoOhWordRoomColl: ; 0xdfc90
+TilesetKabutoWordRoomColl: ; 0xdfc90
+TilesetOmanyteWordRoomColl: ; 0xdfc90
+TilesetAerodactylWordRoomColl: ; 0xdfc90
+INCLUDE "tilesets/beta_word_room_collision.asm"
+; 0xdfd90
+
+
+SECTION "Tileset Data 7", ROMX
+
+TilesetRuinsOfAlphGFX: ; 0x1dc5a1
+TilesetBetaWordRoomGFX: ; 0x1dc5a1
+TilesetHoOhWordRoomGFX: ; 0x1dc5a1
+TilesetKabutoWordRoomGFX: ; 0x1dc5a1
+TilesetOmanyteWordRoomGFX: ; 0x1dc5a1
+TilesetAerodactylWordRoomGFX: ; 0x1dc5a1
+INCBIN "gfx/tilesets/ruins_of_alph.2bpp.lz"
+; 0x1dd1a9
+
+TilesetRuinsOfAlphMeta: ; 0x1dd1a9
+INCBIN "tilesets/ruins_of_alph_metatiles.bin"
+; 0x1dd5a9
+
+TilesetRuinsOfAlphColl: ; 0x1dd5a9
+INCLUDE "tilesets/ruins_of_alph_collision.asm"
+; 0x1dd6a9
+
+
+SECTION "Tileset Data 8", ROMX
+
+TilesetHoOhWordRoomMeta: ; 0x1e0000
+INCBIN "tilesets/ho_oh_word_room_metatiles.bin"
+; 0x1e0400
+
+TilesetKabutoWordRoomMeta: ; 0x1e0400
+INCBIN "tilesets/kabuto_word_room_metatiles.bin"
+; 0x1e0800
+
+TilesetOmanyteWordRoomMeta: ; 0x1e0800
+INCBIN "tilesets/omanyte_word_room_metatiles.bin"
+; 0x1e0c00
+
+TilesetAerodactylWordRoomMeta: ; 0x1e0c00
+INCBIN "tilesets/aerodactyl_word_room_metatiles.bin"
+; 0x1e1000
diff --git a/tilesets/data_1.asm b/tilesets/data_1.asm
deleted file mode 100644
index 307dac666..000000000
--- a/tilesets/data_1.asm
+++ /dev/null
@@ -1,50 +0,0 @@
-Tileset03GFX: ; 0x18000
-INCBIN "gfx/tilesets/03.2bpp.lz"
-; 0x18606
-
-Tileset03Meta: ; 0x18606
-INCBIN "tilesets/03_metatiles.bin"
-; 0x18e06
-
-Tileset03Coll: ; 0x18e06
-INCBIN "tilesets/03_collision.bin"
-; 0x19006
-
-Tileset00GFX: ; 0x19006
-Tileset01GFX: ; 0x19006
-INCBIN "gfx/tilesets/01.2bpp.lz"
-; 0x19c0e
-
-Tileset00Meta: ; 0x19c0e
-Tileset01Meta: ; 0x19c0e
-INCBIN "tilesets/01_metatiles.bin"
-; 0x1a40e
-
-Tileset00Coll: ; 0x1a40e
-Tileset01Coll: ; 0x1a40e
-INCBIN "tilesets/01_collision.bin"
-; 0x1a60e
-
-Tileset29GFX: ; 0x1a60e
-INCBIN "gfx/tilesets/29.2bpp.lz"
-; 0x1af3e
-
-Tileset29Meta: ; 0x1af3e
-INCBIN "tilesets/29_metatiles.bin"
-; 0x1b33e
-
-Tileset29Coll: ; 0x1b33e
-INCBIN "tilesets/29_collision.bin"
-; 0x1b43e
-
-Tileset20GFX: ; 0x1b43e
-INCBIN "gfx/tilesets/20.2bpp.lz"
-; 0x1b8fe
-
-Tileset20Meta: ; 0x1b8fe
-INCBIN "tilesets/20_metatiles.bin"
-; 0x1bcfe
-
-Tileset20Coll: ; 0x1bcfe
-INCBIN "tilesets/20_collision.bin"
-; 0x1bdfe
diff --git a/tilesets/data_2.asm b/tilesets/data_2.asm
deleted file mode 100644
index 9109cc235..000000000
--- a/tilesets/data_2.asm
+++ /dev/null
@@ -1,61 +0,0 @@
-Tileset07GFX: ; 0x1c30c
-INCBIN "gfx/tilesets/07.2bpp.lz"
-; 0x1c73c
-
-Tileset07Meta: ; 0x1c73c
-INCBIN "tilesets/07_metatiles.bin"
-; 0x1cb3c
-
-Tileset07Coll: ; 0x1cb3c
-INCBIN "tilesets/07_collision.bin"
-; 0x1cc3c
-
-Tileset09GFX: ; 0x1cc3c
-INCBIN "gfx/tilesets/09.2bpp.lz"
-; 0x1d04c
-
-Tileset09Meta: ; 0x1d04c
-INCBIN "tilesets/09_metatiles.bin"
-; 0x1d44c
-
-Tileset09Coll: ; 0x1d44c
-INCBIN "tilesets/09_collision.bin"
-; 0x1d54c
-
-Tileset06GFX: ; 0x1d54c
-INCBIN "gfx/tilesets/06.2bpp.lz"
-; 0x1d92c
-
-Tileset06Meta: ; 0x1d92c
-INCBIN "tilesets/06_metatiles.bin"
-; 0x1dd2c
-
-Tileset06Coll: ; 0x1dd2c
-INCBIN "tilesets/06_collision.bin"
-; 0x1de2c
-
-Tileset13GFX: ; 0x1de2c
-INCBIN "gfx/tilesets/13.2bpp.lz"
-; 0x1e58c
-
-Tileset13Meta: ; 0x1e58c
-INCBIN "tilesets/13_metatiles.bin"
-; 0x1e98c
-
-Tileset13Coll: ; 0x1e98c
-INCBIN "tilesets/13_collision.bin"
-; 0x1ea8c
-
-Tileset24GFX: ; 0x1ea8c
-INCBIN "gfx/tilesets/24.2bpp.lz"
-; 0x1ee1c
-
-Tileset24Meta: ; 0x1ee1c
-Tileset30Meta: ; 0x1ee1c
-INCBIN "tilesets/24_metatiles.bin"
-; 0x1f21c
-
-Tileset24Coll: ; 0x1f21c
-Tileset30Coll: ; 0x1f21c
-INCBIN "tilesets/24_collision.bin"
-; 0x1f31c
diff --git a/tilesets/data_3.asm b/tilesets/data_3.asm
deleted file mode 100644
index 72b2b72ff..000000000
--- a/tilesets/data_3.asm
+++ /dev/null
@@ -1,64 +0,0 @@
-Tileset23GFX: ; 0x20181
-INCBIN "gfx/tilesets/23.2bpp.lz"
-; 0x206e1
-
-Tileset23Meta: ; 0x206e1
-INCBIN "tilesets/23_metatiles.bin"
-; 0x20ae1
-
-Tileset23Coll: ; 0x20ae1
-INCBIN "tilesets/23_collision.bin"
-; 0x20be1
-
-Tileset10GFX: ; 0x20be1
-INCBIN "gfx/tilesets/10.2bpp.lz"
-; 0x213e1
-
-Tileset10Meta: ; 0x213e1
-INCBIN "tilesets/10_metatiles.bin"
-; 0x217e1
-
-Tileset10Coll: ; 0x217e1
-INCBIN "tilesets/10_collision.bin"
-; 0x218e1
-
-Tileset12GFX: ; 0x218e1
-INCBIN "gfx/tilesets/12.2bpp.lz"
-; 0x22031
-
-Tileset12Meta: ; 0x22031
-INCBIN "tilesets/12_metatiles.bin"
-; 0x22431
-
-Tileset12Coll: ; 0x22431
-INCBIN "tilesets/12_collision.bin"
-; 0x22531
-
-Tileset14GFX: ; 0x22531
-INCBIN "gfx/tilesets/14.2bpp.lz"
-; 0x22af1
-
-Tileset14Meta: ; 0x22af1
-INCBIN "tilesets/14_metatiles.bin"
-; 0x22ef1
-
-Tileset14Coll: ; 0x22ef1
-INCBIN "tilesets/14_collision.bin"
-; 0x22ff1
-
-Tileset17GFX: ; 0x22ff1
-INCBIN "gfx/tilesets/17.2bpp.lz"
-; 0x23391
-
-Tileset17Meta: ; 0x23391
-INCBIN "tilesets/17_metatiles.bin"
-; 0x23791
-
-Tileset17Coll: ; 0x23791
-INCBIN "tilesets/17_collision.bin"
-; 0x23891
-
-; todo
-Tileset31Meta: ; 0x23891
-INCBIN "tilesets/31_metatiles.bin"
-; 0x23b11
diff --git a/tilesets/data_4.asm b/tilesets/data_4.asm
deleted file mode 100644
index fb61d1f2b..000000000
--- a/tilesets/data_4.asm
+++ /dev/null
@@ -1,59 +0,0 @@
-Tileset15GFX: ; 0x30000
-INCBIN "gfx/tilesets/15.2bpp.lz"
-; 0x304e0
-
-Tileset15Meta: ; 0x304e0
-INCBIN "tilesets/15_metatiles.bin"
-; 0x308e0
-
-Tileset15Coll: ; 0x308e0
-INCBIN "tilesets/15_collision.bin"
-; 0x309e0
-
-Tileset25GFX: ; 0x309e0
-INCBIN "gfx/tilesets/25.2bpp.lz"
-; 0x30e80
-
-Tileset25Meta: ; 0x30e80
-INCBIN "tilesets/25_metatiles.bin"
-; 0x31280
-
-Tileset25Coll: ; 0x31280
-INCBIN "tilesets/25_collision.bin"
-; 0x31380
-
-Tileset27GFX: ; 0x31380
-INCBIN "gfx/tilesets/27.2bpp.lz"
-; 0x318e0
-
-Tileset27Meta: ; 0x318e0
-INCBIN "tilesets/27_metatiles.bin"
-; 0x31ce0
-
-Tileset27Coll: ; 0x31ce0
-INCBIN "tilesets/27_collision.bin"
-; 0x31de0
-
-Tileset28GFX: ; 0x31de0
-INCBIN "gfx/tilesets/28.2bpp.lz"
-; 0x321b0
-
-Tileset28Meta: ; 0x321b0
-INCBIN "tilesets/28_metatiles.bin"
-; 0x325b0
-
-Tileset28Coll: ; 0x325b0
-INCBIN "tilesets/28_collision.bin"
-; 0x326b0
-
-Tileset30GFX: ; 0x326b0
-INCBIN "gfx/tilesets/30.2bpp.lz"
-; 0x329f0
-
-UnusedTileset30Meta: ; 0x329f0
-INCBIN "tilesets/unused_30_metatiles.bin"
-; 0x331f0
-
-UnusedTileset30Coll: ; 0x331f0
-INCBIN "tilesets/unused_30_collision.bin"
-; 0x333f0
diff --git a/tilesets/data_5.asm b/tilesets/data_5.asm
deleted file mode 100644
index 109df2daf..000000000
--- a/tilesets/data_5.asm
+++ /dev/null
@@ -1,60 +0,0 @@
-Tileset21GFX: ; 0xb4000
-INCBIN "gfx/tilesets/21.2bpp.lz"
-; 0xb48a0
-
-Tileset21Meta: ; 0xb48a0
-INCBIN "tilesets/21_metatiles.bin"
-; 0xb4ca0
-
-Tileset21Coll: ; 0xb4ca0
-INCBIN "tilesets/21_collision.bin"
-; 0xb4da0
-
-Tileset22GFX: ; 0xb4da0
-INCBIN "gfx/tilesets/22.2bpp.lz"
-; 0xb50e0
-
-Tileset22Meta: ; 0xb50e0
-INCBIN "tilesets/22_metatiles.bin"
-; 0xb54e0
-
-Tileset22Coll: ; 0xb54e0
-INCBIN "tilesets/22_collision.bin"
-; 0xb55e0
-
-Tileset08GFX: ; 0xb55e0
-INCBIN "gfx/tilesets/08.2bpp.lz"
-; 0xb59e0
-
-Tileset08Meta: ; 0xb59e0
-INCBIN "tilesets/08_metatiles.bin"
-; 0xb5de0
-
-Tileset08Coll: ; 0xb5de0
-INCBIN "tilesets/08_collision.bin"
-; 0xb5ee0
-
-Tileset02GFX: ; 0xb5ee0
-Tileset04GFX: ; 0xb5ee0
-INCBIN "gfx/tilesets/04.2bpp.lz"
-; 0xb6ae8
-
-Tileset02Meta: ; 0xb6ae8
-INCBIN "tilesets/02_metatiles.bin"
-; 0xb72e8
-
-Tileset02Coll: ; 0xb72e8
-INCBIN "tilesets/02_collision.bin"
-; 0xb74e8
-
-Tileset16GFX: ; 0xb74e8
-INCBIN "gfx/tilesets/16.2bpp.lz"
-; 0xb79a8
-
-Tileset16Meta: ; 0xb79a8
-INCBIN "tilesets/16_metatiles.bin"
-; 0xb7da8
-
-Tileset16Coll: ; 0xb7da8
-INCBIN "tilesets/16_collision.bin"
-; 0xb7ea8
diff --git a/tilesets/data_6.asm b/tilesets/data_6.asm
deleted file mode 100644
index 695282bc7..000000000
--- a/tilesets/data_6.asm
+++ /dev/null
@@ -1,75 +0,0 @@
-Tileset31GFX: ; 0xdc000
-INCBIN "gfx/tilesets/31.2bpp.lz"
-; 0xdc3d0
-
-Tileset18GFX: ; 0xdc3d0
-INCBIN "gfx/tilesets/18.2bpp.lz"
-; 0xdcc50
-
-Tileset18Meta: ; 0xdcc50
-INCBIN "tilesets/18_metatiles.bin"
-; 0xdd050
-
-Tileset18Coll: ; 0xdd050
-INCBIN "tilesets/18_collision.bin"
-; 0xdd150
-
-Tileset05GFX: ; 0xdd150
-INCBIN "gfx/tilesets/05.2bpp.lz"
-; 0xdd600
-
-Tileset05Meta: ; 0xdd600
-INCBIN "tilesets/05_metatiles.bin"
-; 0xdda00
-
-Tileset05Coll: ; 0xdda00
-INCBIN "tilesets/05_collision.bin"
-; 0xddb00
-
-Tileset19GFX: ; 0xddb00
-INCBIN "gfx/tilesets/19.2bpp.lz"
-; 0xddf70
-
-Tileset19Meta: ; 0xddf70
-INCBIN "tilesets/19_metatiles.bin"
-; 0xde370
-
-Tileset19Coll: ; 0xde370
-INCBIN "tilesets/19_collision.bin"
-; 0xde470
-
-Tileset31Coll: ; 0xde470
-INCBIN "tilesets/31_collision.bin"
-; 0xde570
-
-Tileset11GFX: ; 0xde570
-INCBIN "gfx/tilesets/11.2bpp.lz"
-; 0xde990
-
-Tileset11Meta: ; 0xde990
-INCBIN "tilesets/11_metatiles.bin"
-; 0xded90
-
-Tileset11Coll: ; 0xded90
-INCBIN "tilesets/11_collision.bin"
-; 0xdee90
-
-Tileset04Meta: ; 0xdee90
-INCBIN "tilesets/04_metatiles.bin"
-; 0xdf690
-
-Tileset04Coll: ; 0xdf690
-INCBIN "tilesets/04_collision.bin"
-; 0xdf890
-
-Tileset32Meta: ; 0xdf890
-INCBIN "tilesets/32_metatiles.bin"
-; 0xdfc90
-
-Tileset32Coll: ; 0xdfc90
-Tileset33Coll: ; 0xdfc90
-Tileset34Coll: ; 0xdfc90
-Tileset35Coll: ; 0xdfc90
-Tileset36Coll: ; 0xdfc90
-INCBIN "tilesets/36_collision.bin"
-; 0xdfd90
diff --git a/tilesets/data_7.asm b/tilesets/data_7.asm
deleted file mode 100644
index d781ab518..000000000
--- a/tilesets/data_7.asm
+++ /dev/null
@@ -1,16 +0,0 @@
-Tileset26GFX: ; 0x1dc5a1
-Tileset32GFX: ; 0x1dc5a1
-Tileset33GFX: ; 0x1dc5a1
-Tileset34GFX: ; 0x1dc5a1
-Tileset35GFX: ; 0x1dc5a1
-Tileset36GFX: ; 0x1dc5a1
-INCBIN "gfx/tilesets/26.2bpp.lz"
-; 0x1dd1a9
-
-Tileset26Meta: ; 0x1dd1a9
-INCBIN "tilesets/26_metatiles.bin"
-; 0x1dd5a9
-
-Tileset26Coll: ; 0x1dd5a9
-INCBIN "tilesets/26_collision.bin"
-; 0x1dd6a9
diff --git a/tilesets/data_8.asm b/tilesets/data_8.asm
deleted file mode 100644
index 7ee2ecf3d..000000000
--- a/tilesets/data_8.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-Tileset33Meta: ; 0x1e0000
-INCBIN "tilesets/33_metatiles.bin"
-; 0x1e0400
-
-Tileset34Meta: ; 0x1e0400
-INCBIN "tilesets/34_metatiles.bin"
-; 0x1e0800
-
-Tileset35Meta: ; 0x1e0800
-INCBIN "tilesets/35_metatiles.bin"
-; 0x1e0c00
-
-Tileset36Meta: ; 0x1e0c00
-INCBIN "tilesets/36_metatiles.bin"
-; 0x1e1000
diff --git a/tilesets/game_corner_collision.asm b/tilesets/game_corner_collision.asm
new file mode 100644
index 000000000..65b99cf54
--- /dev/null
+++ b/tilesets/game_corner_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 03
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 05
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07
+ tilecoll COUNTER, COUNTER, COUNTER, COUNTER ; 08
+ tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 09
+ tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 0a
+ tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 0b
+ tilecoll WALL, WALL, WALL, WALL ; 0c
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 0d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 0e
+ tilecoll WALL, WALL, WALL, WALL ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll WALL, WALL, COUNTER, COUNTER ; 11
+ tilecoll WALL, WALL, COUNTER, COUNTER ; 12
+ tilecoll WALL, WALL, WALL, WALL ; 13
+ tilecoll WALL, WALL, COUNTER, FLOOR ; 14
+ tilecoll COUNTER, FLOOR, COUNTER, COUNTER ; 15
+ tilecoll WALL, WALL, WALL, WALL ; 16
+ tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 17
+ tilecoll COUNTER, FLOOR, COUNTER, COUNTER ; 18
+ tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 19
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1b
+ tilecoll FLOOR, COUNTER, COUNTER, COUNTER ; 1c
+ tilecoll WALL, WALL, FLOOR, COUNTER ; 1d
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1e
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1f
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll WALL, WALL, WALL, WALL ; 22
+ tilecoll WALL, WALL, WALL, WALL ; 23
+ tilecoll WALL, WALL, WALL, WALL ; 24
+ tilecoll WALL, WALL, WALL, WALL ; 25
+ tilecoll WALL, WALL, WALL, WALL ; 26
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 27
+ tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 28
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 29
+ tilecoll WALL, WALL, FLOOR, WALL ; 2a
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 2b
+ tilecoll WALL, WALL, FLOOR, WALL ; 2c
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 2d
+ tilecoll WALL, WALL, WALL, WALL ; 2e
+ tilecoll WALL, WALL, WALL, WALL ; 2f
+ tilecoll WALL, WALL, FLOOR, WALL ; 30
+ tilecoll WALL, WALL, WALL, FLOOR ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 40
diff --git a/tilesets/14_metatiles.bin b/tilesets/game_corner_metatiles.bin
index 24beba2d3..24beba2d3 100644
--- a/tilesets/14_metatiles.bin
+++ b/tilesets/game_corner_metatiles.bin
Binary files differ
diff --git a/tilesets/14_palette_map.asm b/tilesets/game_corner_palette_map.asm
index 34bb9f6f0..34bb9f6f0 100644
--- a/tilesets/14_palette_map.asm
+++ b/tilesets/game_corner_palette_map.asm
diff --git a/tilesets/gate_collision.asm b/tilesets/gate_collision.asm
new file mode 100644
index 000000000..54cd95d34
--- /dev/null
+++ b/tilesets/gate_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 03
+ tilecoll WALL, WALL, WALL, WALL ; 04
+ tilecoll DOOR, DOOR, FLOOR, FLOOR ; 05
+ tilecoll WALL, WALL, WALL, WALL ; 06
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 07
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 08
+ tilecoll COUNTER, COUNTER, COUNTER, FLOOR ; 09
+ tilecoll COUNTER, COUNTER, FLOOR, COUNTER ; 0a
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 0b
+ tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 0c
+ tilecoll COUNTER, FLOOR, COUNTER, COUNTER ; 0d
+ tilecoll FLOOR, COUNTER, COUNTER, COUNTER ; 0e
+ tilecoll WALL, WALL, COUNTER, FLOOR ; 0f
+ tilecoll WALL, WALL, FLOOR, COUNTER ; 10
+ tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 11
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 12
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 13
+ tilecoll WALL, WALL, FLOOR, COUNTER ; 14
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 15
+ tilecoll WALL, WALL, WALL, WALL ; 16
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 17
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 18
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 19
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 1a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1b
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 1c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 20
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 21
+ tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 22
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23
+ tilecoll WARP_CARPET_LEFT, FLOOR, WARP_CARPET_LEFT, FLOOR ; 24
+ tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 25
+ tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 26
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 27
+ tilecoll WALL, WALL, WALL, WALL ; 28
+ tilecoll FLOOR, COUNTER, FLOOR, COUNTER ; 29
+ tilecoll WALL, DOOR, FLOOR, FLOOR ; 2a
+ tilecoll DOOR, WALL, FLOOR, FLOOR ; 2b
+ tilecoll FLOOR, COUNTER, FLOOR, COUNTER ; 2c
+ tilecoll WALL, WALL, FLOOR, PC ; 2d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2e
+ tilecoll DOOR, WALL, FLOOR, FLOOR ; 2f
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 30
+ tilecoll FLOOR, FLOOR, FLOOR, COUNTER ; 31
+ tilecoll FLOOR, LADDER, FLOOR, FLOOR ; 32
+ tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 33
+ tilecoll COUNTER, FLOOR, FLOOR, WALL ; 34
+ tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 39
+ tilecoll WALL, WALL, WALL, WALL ; 3a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 3b
+ tilecoll FLOOR, FLOOR, LADDER, FLOOR ; 3c
+ tilecoll FLOOR, FLOOR, COUNTER, FLOOR ; 3d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 3e
+ tilecoll COUNTER, COUNTER, FLOOR, COUNTER ; 3f
+ tilecoll FLOOR, COUNTER, COUNTER, COUNTER ; 40
diff --git a/tilesets/08_metatiles.bin b/tilesets/gate_metatiles.bin
index 74076ff58..74076ff58 100644
--- a/tilesets/08_metatiles.bin
+++ b/tilesets/gate_metatiles.bin
Binary files differ
diff --git a/tilesets/08_palette_map.asm b/tilesets/gate_palette_map.asm
index 7854d3a81..7854d3a81 100644
--- a/tilesets/08_palette_map.asm
+++ b/tilesets/gate_palette_map.asm
diff --git a/tilesets/gym_1_collision.asm b/tilesets/gym_1_collision.asm
new file mode 100644
index 000000000..cc0b705f3
--- /dev/null
+++ b/tilesets/gym_1_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 04
+ tilecoll WALL, WALL, WALL, FLOOR ; 05
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 06
+ tilecoll WALL, WALL, FLOOR, WALL ; 07
+ tilecoll WALL, WALL, WALL, WALL ; 08
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 09
+ tilecoll FLOOR, FLOOR, PIT, FLOOR ; 0a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 0b
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 0c
+ tilecoll WALL, FLOOR, WALL, WALL ; 0d
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 0e
+ tilecoll FLOOR, WALL, WALL, WALL ; 0f
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 10
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 11
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 12
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 14
+ tilecoll WALL, WALL, WALL, WALL ; 15
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 16
+ tilecoll LADDER, LADDER, FLOOR, FLOOR ; 17
+ tilecoll WALL, WALL, WALL, WALL ; 18
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 19
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 1a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1b
+ tilecoll WALL, FLOOR, WALL, WALL ; 1c
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 1d
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1e
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1f
+ tilecoll WALL, WALL, WALL, WALL ; 20
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 21
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 22
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 23
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 24
+ tilecoll WALL, WALL, WALL, WALL ; 25
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 26
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 27
+ tilecoll WALL, WALL, WALL, WALL ; 28
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 29
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 2a
+ tilecoll WALL, WALL, WALL, WALL ; 2b
+ tilecoll WALL, WALL, WALL, WALL ; 2c
+ tilecoll WALL, WALL, WALL, WALL ; 2d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e
+ tilecoll ICE, ICE, ICE, FLOOR ; 2f
+ tilecoll ICE, ICE, FLOOR, ICE ; 30
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 31
+ tilecoll FLOOR, ICE, ICE, ICE ; 32
+ tilecoll ICE, FLOOR, ICE, ICE ; 33
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 34
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 35
+ tilecoll ICE, WALL, ICE, WALL ; 36
+ tilecoll WALL, ICE, WALL, ICE ; 37
+ tilecoll WALL, WALL, WALL, WALL ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39
+ tilecoll ICE, ICE, ICE, ICE ; 3a
+ tilecoll WALL, FLOOR, FLOOR, WALL ; 3b
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 3c
+ tilecoll DOOR, DOOR, FLOOR, FLOOR ; 3d
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 3e
+ tilecoll WALL, WALL, WALL, WALL ; 3f
+ tilecoll WALL, WALL, WALL, WALL ; 40
diff --git a/tilesets/15_metatiles.bin b/tilesets/gym_1_metatiles.bin
index a9df6062c..a9df6062c 100644
--- a/tilesets/15_metatiles.bin
+++ b/tilesets/gym_1_metatiles.bin
Binary files differ
diff --git a/tilesets/15_palette_map.asm b/tilesets/gym_1_palette_map.asm
index b20f49195..b20f49195 100644
--- a/tilesets/15_palette_map.asm
+++ b/tilesets/gym_1_palette_map.asm
diff --git a/tilesets/ho_oh_word_room_collision.asm b/tilesets/ho_oh_word_room_collision.asm
new file mode 100644
index 000000000..138f07143
--- /dev/null
+++ b/tilesets/ho_oh_word_room_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 14
+ tilecoll WALL, WALL, WALL, FLOOR ; 15
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 16
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 17
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 18
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 19
+ tilecoll WALL, WALL, FLOOR, WALL ; 1a
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1b
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1c
+ tilecoll FLOOR, FLOOR, FLOOR, PIT ; 1d
+ tilecoll WALL, WALL, WALL, WALL ; 1e
+ tilecoll WALL, WALL, WALL, WALL ; 1f
+ tilecoll WALL, WALL, WALL, WALL ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 25
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 40
diff --git a/tilesets/33_metatiles.bin b/tilesets/ho_oh_word_room_metatiles.bin
index 2b542c632..2b542c632 100644
--- a/tilesets/33_metatiles.bin
+++ b/tilesets/ho_oh_word_room_metatiles.bin
diff --git a/tilesets/33_palette_map.asm b/tilesets/ho_oh_word_room_palette_map.asm
index 5ebde24ba..5ebde24ba 100644
--- a/tilesets/33_palette_map.asm
+++ b/tilesets/ho_oh_word_room_palette_map.asm
diff --git a/tilesets/house.pal b/tilesets/house.pal
deleted file mode 100644
index 2d6d51790..000000000
--- a/tilesets/house.pal
+++ /dev/null
@@ -1,39 +0,0 @@
- RGB 30, 28, 26
- RGB 19, 19, 19
- RGB 13, 13, 13
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 31, 19, 24
- RGB 30, 10, 06
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 15, 20, 01
- RGB 09, 13, 00
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 15, 16, 31
- RGB 09, 09, 31
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 31, 31, 07
- RGB 31, 16, 01
- RGB 07, 07, 07
-
- RGB 26, 24, 17
- RGB 21, 17, 07
- RGB 16, 13, 03
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 31, 19, 24
- RGB 16, 13, 03
- RGB 07, 07, 07
-
- RGB 31, 31, 16
- RGB 31, 31, 16
- RGB 14, 09, 00
- RGB 00, 00, 00
diff --git a/tilesets/house_1.pal b/tilesets/house_1.pal
new file mode 100644
index 000000000..a9f8b74b6
--- /dev/null
+++ b/tilesets/house_1.pal
@@ -0,0 +1,40 @@
+; gray
+ RGB 30, 28, 26
+ RGB 19, 19, 19
+ RGB 13, 13, 13
+ RGB 07, 07, 07
+; red
+ RGB 30, 28, 26
+ RGB 31, 19, 24
+ RGB 30, 10, 06
+ RGB 07, 07, 07
+; green
+ RGB 30, 28, 26
+ RGB 15, 20, 01
+ RGB 09, 13, 00
+ RGB 07, 07, 07
+; water (blue)
+ RGB 30, 28, 26
+ RGB 15, 16, 31
+ RGB 09, 09, 31
+ RGB 07, 07, 07
+; yellow
+ RGB 30, 28, 26
+ RGB 31, 31, 07
+ RGB 31, 16, 01
+ RGB 07, 07, 07
+; brown
+ RGB 26, 24, 17
+ RGB 21, 17, 07
+ RGB 16, 13, 03
+ RGB 07, 07, 07
+; roof (glass)
+ RGB 30, 28, 26
+ RGB 31, 19, 24
+ RGB 16, 13, 03
+ RGB 07, 07, 07
+; text
+ RGB 31, 31, 16
+ RGB 31, 31, 16
+ RGB 14, 09, 00
+ RGB 00, 00, 00
diff --git a/tilesets/house_1_collision.asm b/tilesets/house_1_collision.asm
new file mode 100644
index 000000000..ae5580782
--- /dev/null
+++ b/tilesets/house_1_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 02
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 03
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 04
+ tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 05
+ tilecoll WALL, WINDOW, FLOOR, FLOOR ; 06
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 07
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 08
+ tilecoll WALL, WINDOW, FLOOR, FLOOR ; 09
+ tilecoll WALL, WALL, FLOOR, BOOKSHELF ; 0a
+ tilecoll WALL, WALL, WALL, WALL ; 0b
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 0c
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 0d
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 0e
+ tilecoll WALL, TOWN_MAP, FLOOR, FLOOR ; 0f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10
+ tilecoll WALL, WALL, PC, WALL ; 11
+ tilecoll WALL, WALL, WALL, FLOOR ; 12
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 13
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 14
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 15
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 16
+ tilecoll WINDOW, WALL, FLOOR, FLOOR ; 17
+ tilecoll FLOOR, FLOOR, WARP_CARPET_LEFT, FLOOR ; 18
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 19
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 1a
+ tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 1b
+ tilecoll WARP_CARPET_LEFT, FLOOR, FLOOR, FLOOR ; 1c
+ tilecoll WALL, WALL, FLOOR, PC ; 1d
+ tilecoll WALL, WALL, FLOOR, RADIO ; 1e
+ tilecoll WALL, TOWN_MAP, TV, FLOOR ; 1f
+ tilecoll WALL, WALL, WALL, WALL ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 22
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 23
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 24
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 25
+ tilecoll LADDER, FLOOR, FLOOR, FLOOR ; 26
+ tilecoll COUNTER, COUNTER, FLOOR, COUNTER ; 27
+ tilecoll FLOOR, COUNTER, FLOOR, COUNTER ; 28
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 29
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2a
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2b
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2c
+ tilecoll WALL, WALL, WALL, WALL ; 2d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f
+ tilecoll WALL, WALL, FLOOR, WALL ; 30
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 31
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 32
+ tilecoll WALL, WINDOW, WALL, WALL ; 33
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 40
diff --git a/tilesets/05_metatiles.bin b/tilesets/house_1_metatiles.bin
index 0d3a22f32..0d3a22f32 100644
--- a/tilesets/05_metatiles.bin
+++ b/tilesets/house_1_metatiles.bin
Binary files differ
diff --git a/tilesets/05_palette_map.asm b/tilesets/house_1_palette_map.asm
index ce7b988b7..ce7b988b7 100644
--- a/tilesets/05_palette_map.asm
+++ b/tilesets/house_1_palette_map.asm
diff --git a/tilesets/ice_path.pal b/tilesets/ice_path.pal
index f92281d79..cb7659f50 100644
--- a/tilesets/ice_path.pal
+++ b/tilesets/ice_path.pal
@@ -1,38 +1,39 @@
+; gray
RGB 15, 14, 24
RGB 11, 11, 19
RGB 07, 07, 12
RGB 00, 00, 00
-
+; red
RGB 15, 14, 24
RGB 14, 07, 17
RGB 13, 00, 08
RGB 00, 00, 00
-
+; green (ice)
RGB 22, 29, 31
RGB 10, 27, 31
RGB 31, 31, 31
RGB 05, 00, 09
-
+; water
RGB 15, 14, 24
RGB 05, 05, 17
RGB 03, 03, 10
RGB 00, 00, 00
-
+; yellow
RGB 30, 30, 11
RGB 16, 14, 18
RGB 16, 14, 10
RGB 00, 00, 00
-
+; brown
RGB 15, 14, 24
RGB 12, 09, 15
RGB 08, 04, 05
RGB 00, 00, 00
-
+; roof (snow)
RGB 25, 31, 31
RGB 09, 28, 31
RGB 16, 11, 31
RGB 05, 00, 09
-
+; text
RGB 31, 31, 16
RGB 31, 31, 16
RGB 14, 09, 00
diff --git a/tilesets/ice_path_collision.asm b/tilesets/ice_path_collision.asm
new file mode 100644
index 000000000..4fd9376ad
--- /dev/null
+++ b/tilesets/ice_path_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01
+ tilecoll WALL, WALL, WALL, WALL ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 04
+ tilecoll WALL, UP_WALL, WALL, FLOOR ; 05
+ tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 06
+ tilecoll UP_WALL, WALL, FLOOR, WALL ; 07
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 08
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 09
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 0b
+ tilecoll WALL, WALL, WALL, WALL ; 0c
+ tilecoll WALL, FLOOR, WALL, WALL ; 0d
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 0e
+ tilecoll FLOOR, WALL, WALL, WALL ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 11
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 12
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 13
+ tilecoll FLOOR, FLOOR, WALL, CAVE ; 14
+ tilecoll WALL, WALL, WALL, FLOOR ; 15
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 16
+ tilecoll WALL, WALL, FLOOR, WALL ; 17
+ tilecoll FLOOR, FLOOR, PIT, FLOOR ; 18
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 19
+ tilecoll WALL, WALL, WALL, WALL ; 1a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1b
+ tilecoll FLOOR, PIT, FLOOR, FLOOR ; 1c
+ tilecoll WALL, FLOOR, WALL, WALL ; 1d
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 1e
+ tilecoll FLOOR, WALL, WALL, WALL ; 1f
+ tilecoll ICE, ICE, ICE, ICE ; 20
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 21
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 22
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 23
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 24
+ tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 25
+ tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 26
+ tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 27
+ tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 28
+ tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 29
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 2a
+ tilecoll WALL, WALL, WALL, WALL ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c
+ tilecoll WALL, ICE, ICE, ICE ; 2d
+ tilecoll ICE, ICE, WALL, ICE ; 2e
+ tilecoll ICE, WALL, ICE, ICE ; 2f
+ tilecoll ICE, ICE, ICE, WALL ; 30
+ tilecoll WALL, WALL, FLOOR, WALL ; 31
+ tilecoll WALL, WALL, WALL, WALL ; 32
+ tilecoll WALL, WALL, WALL, FLOOR ; 33
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 34
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 39
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 3a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 3b
+ tilecoll WALL, WALL, WALL, WALL ; 3c
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 3e
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 3f
+ tilecoll ICE, ICE, ICE, LADDER ; 40
diff --git a/tilesets/29_metatiles.bin b/tilesets/ice_path_metatiles.bin
index c92246e8a..c92246e8a 100644
--- a/tilesets/29_metatiles.bin
+++ b/tilesets/ice_path_metatiles.bin
diff --git a/tilesets/29_palette_map.asm b/tilesets/ice_path_palette_map.asm
index 985844071..985844071 100644
--- a/tilesets/29_palette_map.asm
+++ b/tilesets/ice_path_palette_map.asm
diff --git a/tilesets/ilex_forest_collision.asm b/tilesets/ilex_forest_collision.asm
new file mode 100644
index 000000000..70cc72ff1
--- /dev/null
+++ b/tilesets/ilex_forest_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll WATER, WATER, WATER, WATER ; 03
+ tilecoll WATER, WATER, WATER, WATER ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll WALL, WALL, WALL, WALL ; 06
+ tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 07
+ tilecoll WATER, WATER, WATER, WATER ; 08
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, FLOOR ; 09
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, FLOOR ; 0a
+ tilecoll WATER, WATER, WATER, WATER ; 0b
+ tilecoll WATER, WATER, WATER, WATER ; 0c
+ tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, FLOOR ; 0d
+ tilecoll WATER, WATER, WATER, WATER ; 0e
+ tilecoll FLOOR, HEADBUTT_TREE, FLOOR, HEADBUTT_TREE ; 0f
+ tilecoll FLOOR, FLOOR, CUT_TREE, HEADBUTT_TREE ; 10
+ tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 11
+ tilecoll FLOOR, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 12
+ tilecoll FLOOR, HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE ; 13
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 14
+ tilecoll HEADBUTT_TREE, FLOOR, FLOOR, FLOOR ; 15
+ tilecoll FLOOR, HEADBUTT_TREE, FLOOR, FLOOR ; 16
+ tilecoll FLOOR, FLOOR, HEADBUTT_TREE, FLOOR ; 17
+ tilecoll FLOOR, FLOOR, FLOOR, HEADBUTT_TREE ; 18
+ tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 19
+ tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 1a
+ tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 1b
+ tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 1c
+ tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 1d
+ tilecoll WALL, WALL, WALL, WALL ; 1e
+ tilecoll WALL, WALL, WALL, WALL ; 1f
+ tilecoll WALL, WALL, WALL, WALL ; 20
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 21
+ tilecoll WALL, WALL, WALL, WALL ; 22
+ tilecoll WALL, WALL, WALL, WALL ; 23
+ tilecoll WALL, WALL, WALL, WALL ; 24
+ tilecoll WALL, WALL, WALL, DOOR ; 25
+ tilecoll WALL, WALL, WALL, WALL ; 26
+ tilecoll WALL, WALL, WALL, WALL ; 27
+ tilecoll WALL, WALL, WALL, WALL ; 28
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 29
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 2a
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 2b
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 2c
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 2d
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 2e
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 2f
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 30
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 31
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 32
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 33
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 34
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 35
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 36
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 37
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 38
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 39
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 3a
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 3b
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 3c
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 3d
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 3e
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 3f
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 40
diff --git a/tilesets/31_metatiles.bin b/tilesets/ilex_forest_metatiles.bin
index a8b82d8cf..a8b82d8cf 100644
--- a/tilesets/31_metatiles.bin
+++ b/tilesets/ilex_forest_metatiles.bin
diff --git a/tilesets/31_palette_map.asm b/tilesets/ilex_forest_palette_map.asm
index 696788084..696788084 100644
--- a/tilesets/31_palette_map.asm
+++ b/tilesets/ilex_forest_palette_map.asm
diff --git a/tilesets/johto_1_collision.asm b/tilesets/johto_1_collision.asm
new file mode 100644
index 000000000..4d6d2c072
--- /dev/null
+++ b/tilesets/johto_1_collision.asm
@@ -0,0 +1,128 @@
+ tilecoll 01, 01, 01, 01 ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll WALL, WALL, WALL, WALL ; 06
+ tilecoll LADDER, LADDER, LADDER, LADDER ; 07
+ tilecoll WHIRLPOOL, BUOY, WATER, BUOY ; 08
+ tilecoll WALL, WALL, WALL, WALL ; 09
+ tilecoll WALL, WALL, WALL, WALL ; 0a
+ tilecoll WALL, WALL, WALL, WALL ; 0b
+ tilecoll WARP_CARPET_LEFT, FLOOR, WARP_CARPET_LEFT, FLOOR ; 0c
+ tilecoll FLOOR, FLOOR, WALL, WARP_CARPET_DOWN ; 0d
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WALL ; 0e
+ tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll WALL, WALL, WALL, WALL ; 11
+ tilecoll WALL, WALL, WALL, WALL ; 12
+ tilecoll WALL, WALL, WALL, WALL ; 13
+ tilecoll WALL, WALL, WALL, WALL ; 14
+ tilecoll WALL, WALL, WALL, DOOR ; 15
+ tilecoll WALL, WALL, WALL, WALL ; 16
+ tilecoll WALL, WALL, WALL, DOOR ; 17
+ tilecoll WALL, WALL, WALL, WALL ; 18
+ tilecoll WALL, WALL, WALL, WALL ; 19
+ tilecoll WALL, WALL, WALL, WALL ; 1a
+ tilecoll WALL, WALL, WALL, DOOR ; 1b
+ tilecoll WALL, WALL, WALL, WALL ; 1c
+ tilecoll WALL, WALL, WALL, WALL ; 1d
+ tilecoll WALL, WALL, DOOR, WALL ; 1e
+ tilecoll WALL, WALL, WALL, WALL ; 1f
+ tilecoll WALL, WALL, WALL, WALL ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll WALL, WALL, WALL, WALL ; 22
+ tilecoll WALL, WALL, WALL, WALL ; 23
+ tilecoll WALL, WALL, WALL, WALL ; 24
+ tilecoll WALL, WALL, WALL, WALL ; 25
+ tilecoll WALL, WALL, WALL, WALL ; 26
+ tilecoll WALL, WALL, WALL, WALL ; 27
+ tilecoll WALL, WALL, DOOR, WALL ; 28
+ tilecoll WALL, WALL, WALL, DOOR ; 29
+ tilecoll WALL, WALL, WALL, WALL ; 2a
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, WALL, WALL ; 2b
+ tilecoll WALL, WALL, WALL, WALL ; 2c
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, WALL, WALL ; 2d
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, WALL, WALL ; 2e
+ tilecoll WALL, WALL, WALL, DOOR ; 2f
+ tilecoll WALL, WALL, WALL, WALL ; 30
+ tilecoll BUOY, BUOY, BUOY, WATER ; 31
+ tilecoll BUOY, BUOY, WATER, WATER ; 32
+ tilecoll BUOY, BUOY, WATER, BUOY ; 33
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 34
+ tilecoll BUOY, WATER, BUOY, WATER ; 35
+ tilecoll WATER, WATER, WATER, WATER ; 36
+ tilecoll WATER, BUOY, WATER, BUOY ; 37
+ tilecoll WALL, WALL, WALL, DOOR ; 38
+ tilecoll BUOY, WATER, BUOY, BUOY ; 39
+ tilecoll WATER, WATER, BUOY, BUOY ; 3a
+ tilecoll WATER, BUOY, BUOY, BUOY ; 3b
+ tilecoll WALL, WALL, WALL, WALL ; 3c
+ tilecoll HEADBUTT_TREE, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, HEADBUTT_TREE, FLOOR, FLOOR ; 3e
+ tilecoll FLOOR, FLOOR, HEADBUTT_TREE, FLOOR ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, HEADBUTT_TREE ; 40
+ tilecoll WALL, WALL, WALL, FLOOR ; 41
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 42
+ tilecoll WALL, WALL, FLOOR, WALL ; 43
+ tilecoll WATER, WATER, WATER, WATER ; 44
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 45
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 46
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 47
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 48
+ tilecoll WALL, FLOOR, WALL, WALL ; 49
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 4a
+ tilecoll FLOOR, WALL, WALL, WALL ; 4b
+ tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 4c
+ tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 4d
+ tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 4e
+ tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 4f
+ tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 50
+ tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 51
+ tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 52
+ tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 53
+ tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 54
+ tilecoll WATER, WATER, WATER, WATER ; 55
+ tilecoll WATER, WATER, WATER, WATER ; 56
+ tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 57
+ tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 58
+ tilecoll WATER, WATER, WATER, WATER ; 59
+ tilecoll WATER, WATER, WATER, WATER ; 5a
+ tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 5b
+ tilecoll HEADBUTT_TREE, CUT_TREE, FLOOR, FLOOR ; 5c
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, FLOOR ; 5d
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, FLOOR ; 5e
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, HEADBUTT_TREE ; 5f
+ tilecoll FLOOR, HEADBUTT_TREE, FLOOR, CUT_TREE ; 60
+ tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, FLOOR ; 61
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE ; 62
+ tilecoll FLOOR, HEADBUTT_TREE, FLOOR, HEADBUTT_TREE ; 63
+ tilecoll FLOOR, FLOOR, CUT_TREE, HEADBUTT_TREE ; 64
+ tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 65
+ tilecoll FLOOR, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 66
+ tilecoll FLOOR, HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE ; 67
+ tilecoll CUT_TREE, FLOOR, HEADBUTT_TREE, FLOOR ; 68
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 69
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 6a
+ tilecoll WALL, UP_WALL, WALL, FLOOR ; 6b
+ tilecoll UP_WALL, WALL, FLOOR, WALL ; 6c
+ tilecoll WALL, FLOOR, WALL, WALL ; 6d
+ tilecoll FLOOR, WALL, WALL, WALL ; 6e
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 6f
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 70
+ tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 71
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 72
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 73
+ tilecoll FLOOR, FLOOR, CAVE, WALL ; 74
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 75
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 76
+ tilecoll WATER, WATER, WATER, WATER ; 77
+ tilecoll WALL, WALL, DOOR, WALL ; 78
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 79
+ tilecoll WATER, WATER, WATER, WATER ; 7a
+ tilecoll WATER, WATER, WATER, WATER ; 7b
+ tilecoll WALL, WALL, WALL, WALL ; 7c
+ tilecoll WALL, WALL, WALL, WALL ; 7d
+ tilecoll WALL, WALL, WALL, WALL ; 7e
+ tilecoll WALL, WALL, WALL, WALL ; 7f
+ tilecoll WALL, WALL, WALL, WALL ; 80
diff --git a/tilesets/01_metatiles.bin b/tilesets/johto_1_metatiles.bin
index 9024f2ad6..9024f2ad6 100644
--- a/tilesets/01_metatiles.bin
+++ b/tilesets/johto_1_metatiles.bin
Binary files differ
diff --git a/tilesets/00_palette_map.asm b/tilesets/johto_1_palette_map.asm
index 62fbd2d00..62fbd2d00 100755..100644
--- a/tilesets/00_palette_map.asm
+++ b/tilesets/johto_1_palette_map.asm
diff --git a/tilesets/johto_2_collision.asm b/tilesets/johto_2_collision.asm
new file mode 100644
index 000000000..40255d744
--- /dev/null
+++ b/tilesets/johto_2_collision.asm
@@ -0,0 +1,128 @@
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll WALL, WALL, WALL, WALL ; 06
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08
+ tilecoll WALL, WALL, WALL, WALL ; 09
+ tilecoll WALL, WALL, WALL, WALL ; 0a
+ tilecoll WALL, WALL, WALL, WALL ; 0b
+ tilecoll WARP_CARPET_LEFT, FLOOR, WARP_CARPET_LEFT, FLOOR ; 0c
+ tilecoll FLOOR, FLOOR, WALL, WARP_CARPET_DOWN ; 0d
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WALL ; 0e
+ tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll WALL, WALL, WALL, WALL ; 11
+ tilecoll WALL, WALL, WALL, WALL ; 12
+ tilecoll WALL, WALL, WALL, WALL ; 13
+ tilecoll WALL, WALL, WALL, WALL ; 14
+ tilecoll WALL, WALL, WALL, DOOR ; 15
+ tilecoll WALL, WALL, WALL, WALL ; 16
+ tilecoll WALL, WALL, WALL, DOOR ; 17
+ tilecoll WALL, WALL, DOOR, WALL ; 18
+ tilecoll WALL, WALL, WALL, WALL ; 19
+ tilecoll WALL, WALL, WALL, WALL ; 1a
+ tilecoll WALL, WALL, WALL, DOOR ; 1b
+ tilecoll WALL, WALL, WALL, WALL ; 1c
+ tilecoll WALL, WALL, WALL, WALL ; 1d
+ tilecoll WALL, WALL, DOOR, WALL ; 1e
+ tilecoll WALL, WALL, WALL, WALL ; 1f
+ tilecoll WALL, WALL, WALL, WALL ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll WALL, WALL, WALL, WALL ; 22
+ tilecoll WALL, WALL, WALL, WALL ; 23
+ tilecoll WALL, WALL, WALL, WALL ; 24
+ tilecoll WALL, WALL, DOOR, WALL ; 25
+ tilecoll WALL, WALL, WALL, WALL ; 26
+ tilecoll WALL, WALL, WALL, WALL ; 27
+ tilecoll WALL, WALL, WALL, WALL ; 28
+ tilecoll WALL, WALL, WALL, WALL ; 29
+ tilecoll WALL, WALL, WALL, WALL ; 2a
+ tilecoll WALL, WALL, WALL, WALL ; 2b
+ tilecoll WALL, WALL, WALL, WALL ; 2c
+ tilecoll WALL, WALL, WALL, WALL ; 2d
+ tilecoll WALL, WALL, WALL, DOOR ; 2e
+ tilecoll WALL, WALL, WALL, WALL ; 2f
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, FLOOR ; 30
+ tilecoll BUOY, BUOY, BUOY, WATER ; 31
+ tilecoll BUOY, BUOY, WATER, WATER ; 32
+ tilecoll BUOY, BUOY, WATER, BUOY ; 33
+ tilecoll WALL, WALL, WALL, WALL ; 34
+ tilecoll BUOY, WATER, BUOY, WATER ; 35
+ tilecoll WATER, WATER, WATER, WATER ; 36
+ tilecoll WATER, BUOY, WATER, BUOY ; 37
+ tilecoll HEADBUTT_TREE, FLOOR, FLOOR, FLOOR ; 38
+ tilecoll BUOY, WATER, BUOY, BUOY ; 39
+ tilecoll WATER, WATER, BUOY, BUOY ; 3a
+ tilecoll WATER, BUOY, BUOY, BUOY ; 3b
+ tilecoll FLOOR, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 3c
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 3d
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, WALL, WALL ; 3e
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 3f
+ tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE ; 40
+ tilecoll WALL, WALL, WALL, FLOOR ; 41
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 42
+ tilecoll WALL, WALL, FLOOR, WALL ; 43
+ tilecoll WATER, WATER, WATER, WATER ; 44
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 45
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 46
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 47
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 48
+ tilecoll WALL, FLOOR, WALL, WALL ; 49
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 4a
+ tilecoll FLOOR, WALL, WALL, WALL ; 4b
+ tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 4c
+ tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 4d
+ tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 4e
+ tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 4f
+ tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 50
+ tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 51
+ tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 52
+ tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 53
+ tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 54
+ tilecoll WATER, WATER, WATER, WATER ; 55
+ tilecoll WATER, WATER, WATER, WATER ; 56
+ tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 57
+ tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 58
+ tilecoll WATER, WATER, WATER, WATER ; 59
+ tilecoll WATER, WATER, WATER, WATER ; 5a
+ tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 5b
+ tilecoll WALL, WALL, WALL, CAVE ; 5c
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 5d
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 5e
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 5f
+ tilecoll WALL, WALL, WALL, WALL ; 60
+ tilecoll WATER, WATER, WALL, WALL ; 61
+ tilecoll WATER, WATER, WALL, WALL ; 62
+ tilecoll WATER, WATER, WALL, WALL ; 63
+ tilecoll WATER, WATER, WATER, WATER ; 64
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 65
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 66
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 67
+ tilecoll WALL, WALL, WALL, WALL ; 68
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 69
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 6a
+ tilecoll WALL, UP_WALL, WALL, FLOOR ; 6b
+ tilecoll UP_WALL, WALL, FLOOR, WALL ; 6c
+ tilecoll WALL, FLOOR, WALL, WALL ; 6d
+ tilecoll FLOOR, WALL, WALL, WALL ; 6e
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 6f
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 70
+ tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 71
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 72
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 73
+ tilecoll FLOOR, FLOOR, WALL, CAVE ; 74
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 75
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 76
+ tilecoll WATER, WATER, WATER, WATER ; 77
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 78
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 79
+ tilecoll WATER, WATER, WATER, WATER ; 7a
+ tilecoll WATER, WATER, WATER, WATER ; 7b
+ tilecoll WALL, WALL, WALL, WALL ; 7c
+ tilecoll WALL, WALL, WALL, WALL ; 7d
+ tilecoll WALL, WALL, WALL, WALL ; 7e
+ tilecoll WALL, WALL, WALL, WALL ; 7f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 80
diff --git a/tilesets/02_metatiles.bin b/tilesets/johto_2_metatiles.bin
index a15c0c2c7..a15c0c2c7 100644
--- a/tilesets/02_metatiles.bin
+++ b/tilesets/johto_2_metatiles.bin
Binary files differ
diff --git a/tilesets/02_palette_map.asm b/tilesets/johto_2_palette_map.asm
index f2af7a92d..f2af7a92d 100644
--- a/tilesets/02_palette_map.asm
+++ b/tilesets/johto_2_palette_map.asm
diff --git a/tilesets/kabuto_word_room_collision.asm b/tilesets/kabuto_word_room_collision.asm
new file mode 100644
index 000000000..138f07143
--- /dev/null
+++ b/tilesets/kabuto_word_room_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 14
+ tilecoll WALL, WALL, WALL, FLOOR ; 15
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 16
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 17
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 18
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 19
+ tilecoll WALL, WALL, FLOOR, WALL ; 1a
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1b
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1c
+ tilecoll FLOOR, FLOOR, FLOOR, PIT ; 1d
+ tilecoll WALL, WALL, WALL, WALL ; 1e
+ tilecoll WALL, WALL, WALL, WALL ; 1f
+ tilecoll WALL, WALL, WALL, WALL ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 25
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 40
diff --git a/tilesets/34_metatiles.bin b/tilesets/kabuto_word_room_metatiles.bin
index 14d082e2a..14d082e2a 100644
--- a/tilesets/34_metatiles.bin
+++ b/tilesets/kabuto_word_room_metatiles.bin
diff --git a/tilesets/34_palette_map.asm b/tilesets/kabuto_word_room_palette_map.asm
index 5ebde24ba..5ebde24ba 100644
--- a/tilesets/34_palette_map.asm
+++ b/tilesets/kabuto_word_room_palette_map.asm
diff --git a/tilesets/kanto_collision.asm b/tilesets/kanto_collision.asm
new file mode 100644
index 000000000..9b0f0c275
--- /dev/null
+++ b/tilesets/kanto_collision.asm
@@ -0,0 +1,128 @@
+ tilecoll CUT_TREE, CUT_TREE, CUT_TREE, CUT_TREE ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll WALL, WALL, WALL, DOOR ; 03
+ tilecoll WALL, WALL, WALL, WALL ; 04
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 05
+ tilecoll LADDER, LADDER, LADDER, LADDER ; 06
+ tilecoll FLOOR, FLOOR, CAVE, WALL ; 07
+ tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 08
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 09
+ tilecoll WALL, WALL, WALL, WALL ; 0a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b
+ tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 0c
+ tilecoll WALL, WALL, WALL, WALL ; 0d
+ tilecoll WALL, WALL, WALL, WALL ; 0e
+ tilecoll WALL, WALL, WALL, WALL ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll WALL, WALL, WALL, WALL ; 11
+ tilecoll WALL, WALL, WALL, WALL ; 12
+ tilecoll WALL, WALL, DOOR, WALL ; 13
+ tilecoll WALL, WALL, WALL, WALL ; 14
+ tilecoll WALL, WATER, WALL, WALL ; 15
+ tilecoll WATER, WALL, WALL, WALL ; 16
+ tilecoll WARP_CARPET_LEFT, FLOOR, WARP_CARPET_LEFT, FLOOR ; 17
+ tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 18
+ tilecoll WALL, WATER, WALL, WATER ; 19
+ tilecoll WATER, WALL, WATER, WALL ; 1a
+ tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 1b
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1c
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 1d
+ tilecoll WATER, WATER, WATER, WATER ; 1e
+ tilecoll WATER, WATER, WATER, WATER ; 1f
+ tilecoll WATER, WATER, WATER, WATER ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll WALL, WALL, WALL, WALL ; 22
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24
+ tilecoll WALL, FLOOR, WALL, WALL ; 25
+ tilecoll FLOOR, WALL, WALL, WALL ; 26
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 29
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 2a
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 2c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d
+ tilecoll WATER, WATER, WATER, WATER ; 2e
+ tilecoll WATER, WATER, WATER, WATER ; 2f
+ tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 30
+ tilecoll WALL, WALL, WALL, WALL ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll WALL, CUT_TREE, WALL, FLOOR ; 33
+ tilecoll WALL, WALL, FLOOR, CUT_TREE ; 34
+ tilecoll CUT_TREE, FLOOR, WALL, WALL ; 35
+ tilecoll FLOOR, CUT_TREE, WALL, FLOOR ; 36
+ tilecoll WALL, WALL, FLOOR, WALL ; 37
+ tilecoll WALL, WALL, WALL, WALL ; 38
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 39
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 3a
+ tilecoll WALL, WALL, DOOR, WALL ; 3b
+ tilecoll UP_WALL, WALL, FLOOR, WALL ; 3c
+ tilecoll WALL, WALL, WALL, DOOR ; 3d
+ tilecoll WALL, WALL, WALL, WALL ; 3e
+ tilecoll WALL, UP_WALL, WALL, FLOOR ; 3f
+ tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 40
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 41
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 42
+ tilecoll HOP_DOWN, WALL, WALL, WALL ; 43
+ tilecoll WATER, WATER, WATER, WATER ; 44
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 45
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 46
+ tilecoll FLOOR, FLOOR, WALL, WARP_CARPET_DOWN ; 47
+ tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 48
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 49
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 4a
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WALL ; 4b
+ tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 4c
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 4d
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 4e
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 4f
+ tilecoll FLOOR, WALL, WALL, WALL ; 50
+ tilecoll WALL, FLOOR, WALL, WALL ; 51
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 52
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 53
+ tilecoll WALL, WALL, WALL, DOOR ; 54
+ tilecoll WALL, WALL, WALL, WALL ; 55
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 56
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 57
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 58
+ tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 59
+ tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 5a
+ tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 5b
+ tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 5c
+ tilecoll FLOOR, HOP_DOWN, FLOOR, WALL ; 5d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5f
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 60
+ tilecoll FLOOR, WALL, CUT_TREE, WALL ; 61
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 62
+ tilecoll WALL, WALL, WALL, FLOOR ; 63
+ tilecoll WALL, WALL, FLOOR, WALL ; 64
+ tilecoll WATER, WATER, WATER, WATER ; 65
+ tilecoll WATER, WATER, WATER, WATER ; 66
+ tilecoll WALL, WALL, WALL, WALL ; 67
+ tilecoll WALL, WATER, WALL, WATER ; 68
+ tilecoll WALL, WALL, WALL, WALL ; 69
+ tilecoll WALL, WALL, WALL, WALL ; 6a
+ tilecoll WATER, WALL, WATER, WALL ; 6b
+ tilecoll WATER, WATER, WALL, WALL ; 6c
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 6d
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 6e
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 6f
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 70
+ tilecoll FLOOR, WALL, CAVE, WALL ; 71
+ tilecoll WALL, WALL, WALL, WALL ; 72
+ tilecoll WALL, WALL, WALL, WALL ; 73
+ tilecoll WALL, WALL, WALL, WALL ; 74
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 75
+ tilecoll WALL, WALL, WALL, WALL ; 76
+ tilecoll WALL, WALL, WALL, WALL ; 77
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 78
+ tilecoll WATER, WATER, WATER, WATER ; 79
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 7a
+ tilecoll WALL, WALL, WALL, WALL ; 7b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7c
+ tilecoll WALL, WALL, WALL, DOOR ; 7d
+ tilecoll WALL, WALL, WALL, WALL ; 7e
+ tilecoll WALL, WALL, WALL, WALL ; 7f
+ tilecoll WALL, WALL, WALL, WALL ; 80
diff --git a/tilesets/03_metatiles.bin b/tilesets/kanto_metatiles.bin
index 41b0cfffd..41b0cfffd 100644
--- a/tilesets/03_metatiles.bin
+++ b/tilesets/kanto_metatiles.bin
Binary files differ
diff --git a/tilesets/03_palette_map.asm b/tilesets/kanto_palette_map.asm
index e3e497fb9..e3e497fb9 100644
--- a/tilesets/03_palette_map.asm
+++ b/tilesets/kanto_palette_map.asm
diff --git a/tilesets/kurts_house_collision.asm b/tilesets/kurts_house_collision.asm
new file mode 100644
index 000000000..95cb1c21d
--- /dev/null
+++ b/tilesets/kurts_house_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll WALL, WALL, RADIO, FLOOR ; 02
+ tilecoll WALL, WALL, MART_SHELF, MART_SHELF ; 03
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06
+ tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 07
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 08
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 09
+ tilecoll WALL, WALL, WALL, WALL ; 0a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 0b
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 0c
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 0d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 12
+ tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 13
+ tilecoll WALL, WALL, INCENSE_BURNER, BOOKSHELF ; 14
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 15
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 16
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 17
+ tilecoll WALL, WALL, WALL, WALL ; 18
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 19
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 1a
+ tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 1b
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 1c
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 1d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1e
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 1f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 20
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 21
+ tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 22
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 23
+ tilecoll WALL, WALL, RADIO, FLOOR ; 24
+ tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 25
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 26
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 27
+ tilecoll LADDER, FLOOR, FLOOR, FLOOR ; 28
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 29
+ tilecoll WALL, WALL, WALL, WALL ; 2a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c
+ tilecoll FLOOR, FLOOR, HOP_DOWN, HOP_DOWN ; 2d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2e
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 2f
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 30
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 31
+ tilecoll WALL, WALL, WALL, WALL ; 32
+ tilecoll WALL, WALL, WALL, WALL ; 33
+ tilecoll WALL, WALL, WALL, FLOOR ; 34
+ tilecoll WALL, WALL, WALL, FLOOR ; 35
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 36
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll WALL, WALL, FLOOR, WALL ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 39
+ tilecoll FLOOR, LADDER, FLOOR, FLOOR ; 3a
+ tilecoll 04, 03, 03, 03 ; 3b
+ tilecoll 03, 03, 03, 03 ; 3c
+ tilecoll 03, 03, 04, 04 ; 3d
+ tilecoll 04, 04, 04, 04 ; 3e
+ tilecoll 03, 03, 03, 03 ; 3f
+ tilecoll WARP_CARPET_DOWN, 04, 03, 03 ; 40
diff --git a/tilesets/16_metatiles.bin b/tilesets/kurts_house_metatiles.bin
index 3f6b41bd1..3f6b41bd1 100644
--- a/tilesets/16_metatiles.bin
+++ b/tilesets/kurts_house_metatiles.bin
Binary files differ
diff --git a/tilesets/16_palette_map.asm b/tilesets/kurts_house_palette_map.asm
index 5daa0da6b..5daa0da6b 100644
--- a/tilesets/16_palette_map.asm
+++ b/tilesets/kurts_house_palette_map.asm
diff --git a/tilesets/lab_collision.asm b/tilesets/lab_collision.asm
new file mode 100644
index 000000000..436c8e0a7
--- /dev/null
+++ b/tilesets/lab_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 03
+ tilecoll WALL, WALL, WALL, WALL ; 04
+ tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 05
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 06
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 07
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 08
+ tilecoll WALL, WALL, WALL, WALL ; 09
+ tilecoll WINDOW, WALL, FLOOR, FLOOR ; 0a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 0e
+ tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 0f
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 10
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 12
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 13
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 14
+ tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 15
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 16
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 17
+ tilecoll WALL, WALL, WALL, WALL ; 18
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 19
+ tilecoll FLOOR, LADDER, FLOOR, FLOOR ; 1a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1b
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1c
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1d
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1e
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1f
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 20
+ tilecoll WINDOW, WINDOW, FLOOR, FLOOR ; 21
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 22
+ tilecoll WALL, WALL, WALL, WALL ; 23
+ tilecoll WALL, WALL, WALL, WALL ; 24
+ tilecoll WALL, WALL, WALL, WALL ; 25
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26
+ tilecoll WALL, WALL, WALL, WALL ; 27
+ tilecoll WALL, WALL, WALL, WALL ; 28
+ tilecoll WALL, WALL, WALL, WALL ; 29
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2a
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2b
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 2f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 40
diff --git a/tilesets/10_metatiles.bin b/tilesets/lab_metatiles.bin
index 62da01e8b..62da01e8b 100644
--- a/tilesets/10_metatiles.bin
+++ b/tilesets/lab_metatiles.bin
Binary files differ
diff --git a/tilesets/10_palette_map.asm b/tilesets/lab_palette_map.asm
index 24399c6ea..24399c6ea 100644
--- a/tilesets/10_palette_map.asm
+++ b/tilesets/lab_palette_map.asm
diff --git a/tilesets/lighthouse_collision.asm b/tilesets/lighthouse_collision.asm
new file mode 100644
index 000000000..05b6cd614
--- /dev/null
+++ b/tilesets/lighthouse_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll WALL, WALL, WALL, WALL ; 02
+ tilecoll WALL, WALL, WALL, WALL ; 03
+ tilecoll WALL, WALL, WALL, WALL ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll WALL, WALL, WALL, WALL ; 06
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 07
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09
+ tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 0a
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 0b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c
+ tilecoll WALL, WALL, WALL, WALL ; 0d
+ tilecoll WALL, WALL, WALL, WALL ; 0e
+ tilecoll WALL, WALL, WALL, WALL ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll 9C, FLOOR, COUNTER, FLOOR ; 11
+ tilecoll WALL, WALL, WALL, WALL ; 12
+ tilecoll WALL, WALL, WALL, WALL ; 13
+ tilecoll WALL, WALL, WALL, WALL ; 14
+ tilecoll WALL, WARP_CARPET_DOWN, WALL, WALL ; 15
+ tilecoll WALL, WALL, WALL, WALL ; 16
+ tilecoll 9C, FLOOR, COUNTER, FLOOR ; 17
+ tilecoll WALL, WALL, WALL, WALL ; 18
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 19
+ tilecoll WALL, WALL, WALL, STAIRCASE ; 1a
+ tilecoll LADDER, FLOOR, FLOOR, FLOOR ; 1b
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 1c
+ tilecoll WALL, WALL, WALL, WALL ; 1d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1e
+ tilecoll WALL, WALL, WALL, WALL ; 1f
+ tilecoll WALL, WALL, WALL, WALL ; 20
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 21
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 22
+ tilecoll WALL, FLOOR, WALL, WALL ; 23
+ tilecoll FLOOR, WALL, WALL, WALL ; 24
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 25
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 26
+ tilecoll WALL, WALL, WALL, WALL ; 27
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28
+ tilecoll FLOOR, FLOOR, PIT, PIT ; 29
+ tilecoll WALL, WALL, WINDOW, WINDOW ; 2a
+ tilecoll WALL, WALL, WALL, WALL ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2d
+ tilecoll WALL, WALL, WALL, WALL ; 2e
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 2f
+ tilecoll WALL, WALL, WALL, BOOKSHELF ; 30
+ tilecoll WALL, WALL, FLOOR, WALL ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 32
+ tilecoll WALL, WALL, WALL, WALL ; 33
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 34
+ tilecoll WALL, WALL, PC, FLOOR ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 36
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 37
+ tilecoll WALL, WALL, WALL, WALL ; 38
+ tilecoll WALL, WALL, FLOOR, WALL ; 39
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 3b
+ tilecoll WALL, WALL, WALL, WALL ; 3c
+ tilecoll WALL, WALL, WALL, WALL ; 3d
+ tilecoll WALL, WALL, WINDOW, WALL ; 3e
+ tilecoll WALL, WALL, WALL, WALL ; 3f
+ tilecoll WALL, WALL, WALL, WALL ; 40
diff --git a/tilesets/19_metatiles.bin b/tilesets/lighthouse_metatiles.bin
index 21ca0f09a..21ca0f09a 100644
--- a/tilesets/19_metatiles.bin
+++ b/tilesets/lighthouse_metatiles.bin
Binary files differ
diff --git a/tilesets/19_palette_map.asm b/tilesets/lighthouse_palette_map.asm
index 5f80e3a4d..5f80e3a4d 100644
--- a/tilesets/19_palette_map.asm
+++ b/tilesets/lighthouse_palette_map.asm
diff --git a/tilesets/mart_collision.asm b/tilesets/mart_collision.asm
new file mode 100644
index 000000000..80076ac3f
--- /dev/null
+++ b/tilesets/mart_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 02
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 03
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 06
+ tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 07
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 08
+ tilecoll WALL, WALL, FLOOR, COUNTER ; 09
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 0a
+ tilecoll WALL, WALL, COUNTER, FLOOR ; 0b
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 0c
+ tilecoll FLOOR, COUNTER, FLOOR, FLOOR ; 0d
+ tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 0e
+ tilecoll COUNTER, FLOOR, FLOOR, FLOOR ; 0f
+ tilecoll FLOOR, WALL, WALL, WALL ; 10
+ tilecoll COUNTER, COUNTER, COUNTER, FLOOR ; 11
+ tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 12
+ tilecoll FLOOR, MART_SHELF, FLOOR, MART_SHELF ; 13
+ tilecoll WALL, WALL, MART_SHELF, MART_SHELF ; 14
+ tilecoll WALL, WALL, MART_SHELF, MART_SHELF ; 15
+ tilecoll WALL, WALL, MART_SHELF, MART_SHELF ; 16
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 17
+ tilecoll WALL, WALL, FLOOR, COUNTER ; 18
+ tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 19
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 1a
+ tilecoll COUNTER, COUNTER, COUNTER, FLOOR ; 1b
+ tilecoll COUNTER, COUNTER, FLOOR, COUNTER ; 1c
+ tilecoll WALL, WALL, WALL, WALL ; 1d
+ tilecoll WALL, WALL, WALL, WALL ; 1e
+ tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 1f
+ tilecoll WARP_CARPET_LEFT, FLOOR, WARP_CARPET_LEFT, FLOOR ; 20
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 21
+ tilecoll WALL, WALL, WALL, WALL ; 22
+ tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 23
+ tilecoll FLOOR, MART_SHELF, FLOOR, MART_SHELF ; 24
+ tilecoll WALL, WALL, WALL, WALL ; 25
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 26
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 27
+ tilecoll WALL, WALL, COUNTER, MART_SHELF ; 28
+ tilecoll FLOOR, MART_SHELF, FLOOR, MART_SHELF ; 29
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 2a
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c
+ tilecoll COUNTER, COUNTER, FLOOR, MART_SHELF ; 2d
+ tilecoll FLOOR, MART_SHELF, COUNTER, COUNTER ; 2e
+ tilecoll COUNTER, FLOOR, COUNTER, COUNTER ; 2f
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 30
+ tilecoll WALL, WALL, WALL, WALL ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll WALL, WALL, WALL, WALL ; 33
+ tilecoll WALL, FLOOR, WALL, WALL ; 34
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 35
+ tilecoll FLOOR, WALL, WALL, WALL ; 36
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 37
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39
+ tilecoll FLOOR, FLOOR, FLOOR, STAIRCASE ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll WALL, WALL, WALL, WALL ; 3c
+ tilecoll WALL, WALL, WALL, WALL ; 3d
+ tilecoll WALL, WALL, WALL, WALL ; 3e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f
+ tilecoll WALL, WALL, WALL, WALL ; 40
diff --git a/tilesets/12_metatiles.bin b/tilesets/mart_metatiles.bin
index 63b2f629d..63b2f629d 100644
--- a/tilesets/12_metatiles.bin
+++ b/tilesets/mart_metatiles.bin
diff --git a/tilesets/12_palette_map.asm b/tilesets/mart_palette_map.asm
index 991510d12..991510d12 100644
--- a/tilesets/12_palette_map.asm
+++ b/tilesets/mart_palette_map.asm
diff --git a/tilesets/ob.pal b/tilesets/ob.pal
deleted file mode 100644
index f9fa6699e..000000000
--- a/tilesets/ob.pal
+++ /dev/null
@@ -1,159 +0,0 @@
- RGB 28, 31, 16
- RGB 31, 19, 10
- RGB 31, 07, 01
- RGB 00, 00, 00
-
- RGB 28, 31, 16
- RGB 31, 19, 10
- RGB 10, 09, 31
- RGB 00, 00, 00
-
- RGB 28, 31, 16
- RGB 31, 19, 10
- RGB 07, 23, 03
- RGB 00, 00, 00
-
- RGB 28, 31, 16
- RGB 31, 19, 10
- RGB 15, 10, 03
- RGB 00, 00, 00
-
- RGB 28, 31, 16
- RGB 31, 19, 10
- RGB 30, 10, 06
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 13, 13, 13
- RGB 00, 00, 00
-
- RGB 22, 31, 10
- RGB 12, 25, 01
- RGB 05, 14, 00
- RGB 07, 07, 07
-
- RGB 28, 31, 16
- RGB 24, 18, 07
- RGB 20, 15, 03
- RGB 07, 07, 07
-
- RGB 27, 31, 27
- RGB 31, 19, 10
- RGB 31, 07, 01
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 31, 19, 10
- RGB 10, 09, 31
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 31, 19, 10
- RGB 07, 23, 03
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 31, 19, 10
- RGB 15, 10, 03
- RGB 00, 00, 00
-
- RGB 27, 31, 27
- RGB 31, 19, 10
- RGB 30, 10, 06
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 13, 13, 13
- RGB 00, 00, 00
-
- RGB 22, 31, 10
- RGB 12, 25, 01
- RGB 05, 14, 00
- RGB 07, 07, 07
-
- RGB 27, 31, 27
- RGB 24, 18, 07
- RGB 20, 15, 03
- RGB 07, 07, 07
-
- RGB 15, 14, 24
- RGB 31, 19, 10
- RGB 31, 07, 01
- RGB 00, 00, 00
-
- RGB 15, 14, 24
- RGB 31, 19, 10
- RGB 10, 09, 31
- RGB 00, 00, 00
-
- RGB 15, 14, 24
- RGB 31, 19, 10
- RGB 07, 23, 03
- RGB 00, 00, 00
-
- RGB 15, 14, 24
- RGB 31, 19, 10
- RGB 15, 10, 03
- RGB 00, 00, 00
-
- RGB 15, 14, 24
- RGB 31, 19, 10
- RGB 30, 10, 06
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 13, 13, 13
- RGB 00, 00, 00
-
- RGB 15, 14, 24
- RGB 08, 13, 19
- RGB 00, 11, 13
- RGB 00, 00, 00
-
- RGB 15, 14, 24
- RGB 12, 09, 15
- RGB 08, 04, 05
- RGB 00, 00, 00
-
- RGB 01, 01, 02
- RGB 31, 19, 10
- RGB 31, 07, 01
- RGB 00, 00, 00
-
- RGB 01, 01, 02
- RGB 31, 19, 10
- RGB 10, 09, 31
- RGB 00, 00, 00
-
- RGB 01, 01, 02
- RGB 31, 19, 10
- RGB 07, 23, 03
- RGB 00, 00, 00
-
- RGB 01, 01, 02
- RGB 31, 19, 10
- RGB 15, 10, 03
- RGB 00, 00, 00
-
- RGB 01, 01, 02
- RGB 31, 19, 10
- RGB 30, 10, 06
- RGB 00, 00, 00
-
- RGB 31, 31, 31
- RGB 31, 31, 31
- RGB 13, 13, 13
- RGB 00, 00, 00
-
- RGB 01, 01, 02
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
-
- RGB 01, 01, 02
- RGB 00, 00, 00
- RGB 00, 00, 00
- RGB 00, 00, 00
diff --git a/tilesets/olivine_gym_collision.asm b/tilesets/olivine_gym_collision.asm
new file mode 100644
index 000000000..351f76f61
--- /dev/null
+++ b/tilesets/olivine_gym_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll WALL, WALL, FLOOR, WALL ; 02
+ tilecoll WALL, WALL, WALL, FLOOR ; 03
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 04
+ tilecoll WALL, WALL, WALL, WALL ; 05
+ tilecoll WALL, WALL, COUNTER, FLOOR ; 06
+ tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 07
+ tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 08
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 09
+ tilecoll WALL, FLOOR, FLOOR, WALL ; 0a
+ tilecoll WALL, WALL, WALL, WALL ; 0b
+ tilecoll WALL, WALL, LADDER, LADDER ; 0c
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 0d
+ tilecoll WALL, WALL, WALL, WALL ; 0e
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11
+ tilecoll WALL, WALL, WALL, FLOOR ; 12
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13
+ tilecoll WALL, WALL, FLOOR, WALL ; 14
+ tilecoll WALL, FLOOR, WALL, WALL ; 15
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 16
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 17
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 18
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 19
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1a
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1b
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1c
+ tilecoll WALL, UP_WALL, WALL, FLOOR ; 1d
+ tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 1e
+ tilecoll UP_WALL, WALL, FLOOR, WALL ; 1f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 20
+ tilecoll WALL, FLOOR, WALL, WALL ; 21
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22
+ tilecoll FLOOR, WALL, WALL, WALL ; 23
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 24
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 25
+ tilecoll WALL, WALL, WALL, WALL ; 26
+ tilecoll WALL, WALL, WALL, WALL ; 27
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 28
+ tilecoll WALL, WALL, WALL, WALL ; 29
+ tilecoll WALL, WALL, WALL, WALL ; 2a
+ tilecoll WALL, WALL, WALL, WALL ; 2b
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 2c
+ tilecoll WALL, WALL, WALL, WALL ; 2d
+ tilecoll WALL, WALL, WALL, WALL ; 2e
+ tilecoll WALL, WALL, WALL, WALL ; 2f
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 30
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 34
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 35
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 36
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 37
+ tilecoll FLOOR, WALL, WALL, WALL ; 38
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 39
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 3a
+ tilecoll WALL, WALL, WALL, WALL ; 3b
+ tilecoll WALL, WALL, WALL, WALL ; 3c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e
+ tilecoll WALL, FLOOR, WALL, WALL ; 3f
+ tilecoll FLOOR, WALL, WALL, WALL ; 40
diff --git a/tilesets/18_metatiles.bin b/tilesets/olivine_gym_metatiles.bin
index a2adb197a..a2adb197a 100644
--- a/tilesets/18_metatiles.bin
+++ b/tilesets/olivine_gym_metatiles.bin
diff --git a/tilesets/18_palette_map.asm b/tilesets/olivine_gym_palette_map.asm
index 551a09351..551a09351 100644
--- a/tilesets/18_palette_map.asm
+++ b/tilesets/olivine_gym_palette_map.asm
diff --git a/tilesets/omanyte_word_room_collision.asm b/tilesets/omanyte_word_room_collision.asm
new file mode 100644
index 000000000..138f07143
--- /dev/null
+++ b/tilesets/omanyte_word_room_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 14
+ tilecoll WALL, WALL, WALL, FLOOR ; 15
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 16
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 17
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 18
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 19
+ tilecoll WALL, WALL, FLOOR, WALL ; 1a
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1b
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1c
+ tilecoll FLOOR, FLOOR, FLOOR, PIT ; 1d
+ tilecoll WALL, WALL, WALL, WALL ; 1e
+ tilecoll WALL, WALL, WALL, WALL ; 1f
+ tilecoll WALL, WALL, WALL, WALL ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 25
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 40
diff --git a/tilesets/35_metatiles.bin b/tilesets/omanyte_word_room_metatiles.bin
index 3cc62f562..3cc62f562 100644
--- a/tilesets/35_metatiles.bin
+++ b/tilesets/omanyte_word_room_metatiles.bin
diff --git a/tilesets/35_palette_map.asm b/tilesets/omanyte_word_room_palette_map.asm
index 5ebde24ba..5ebde24ba 100644
--- a/tilesets/35_palette_map.asm
+++ b/tilesets/omanyte_word_room_palette_map.asm
diff --git a/tilesets/palette_maps.asm b/tilesets/palette_maps.asm
index 7e19893d4..55391aeac 100644
--- a/tilesets/palette_maps.asm
+++ b/tilesets/palette_maps.asm
@@ -1,134 +1,130 @@
-Tileset03PalMap: ; 0x4c075
-INCLUDE "tilesets/03_palette_map.asm"
+TilesetKantoPalMap: ; 0x4c075
+INCLUDE "tilesets/kanto_palette_map.asm"
; 0x4c0e5
-Tileset00PalMap: ; 0x4c0e5
-Tileset01PalMap: ; 0x4c0e5
-INCLUDE "tilesets/01_palette_map.asm"
+Tileset0PalMap: ; 0x4c0e5
+TilesetJohto1PalMap: ; 0x4c0e5
+INCLUDE "tilesets/johto_1_palette_map.asm"
; 0x4c155
-Tileset02PalMap: ; 0x4c155
-INCLUDE "tilesets/02_palette_map.asm"
+TilesetJohto2PalMap: ; 0x4c155
+INCLUDE "tilesets/johto_2_palette_map.asm"
; 0x4c1c5
-Tileset05PalMap: ; 0x4c1c5
-INCLUDE "tilesets/05_palette_map.asm"
+TilesetHouse1PalMap: ; 0x4c1c5
+INCLUDE "tilesets/house_1_palette_map.asm"
; 0x4c235
-Tileset06PalMap: ; 0x4c235
-INCLUDE "tilesets/06_palette_map.asm"
+TilesetPlayersHousePalMap: ; 0x4c235
+INCLUDE "tilesets/players_house_palette_map.asm"
; 0x4c2a5
-Tileset07PalMap: ; 0x4c2a5
-INCLUDE "tilesets/07_palette_map.asm"
+TilesetPokecenterPalMap: ; 0x4c2a5
+INCLUDE "tilesets/pokecenter_palette_map.asm"
; 0x4c315
-Tileset08PalMap: ; 0x4c315
-INCLUDE "tilesets/08_palette_map.asm"
+TilesetGatePalMap: ; 0x4c315
+INCLUDE "tilesets/gate_palette_map.asm"
; 0x4c385
-Tileset09PalMap: ; 0x4c385
-INCLUDE "tilesets/09_palette_map.asm"
+TilesetPortPalMap: ; 0x4c385
+INCLUDE "tilesets/port_palette_map.asm"
; 0x4c3f5
-Tileset10PalMap: ; 0x4c3f5
-INCLUDE "tilesets/10_palette_map.asm"
+TilesetLabPalMap: ; 0x4c3f5
+INCLUDE "tilesets/lab_palette_map.asm"
; 0x4c465
-Tileset11PalMap: ; 0x4c465
-INCLUDE "tilesets/11_palette_map.asm"
+TilesetPowerPlantPalMap: ; 0x4c465
+INCLUDE "tilesets/power_plant_palette_map.asm"
; 0x4c4d5
-Tileset12PalMap: ; 0x4c4d5
-INCLUDE "tilesets/12_palette_map.asm"
+TilesetMartPalMap: ; 0x4c4d5
+INCLUDE "tilesets/mart_palette_map.asm"
; 0x4c545
-Tileset13PalMap: ; 0x4c545
-INCLUDE "tilesets/13_palette_map.asm"
+TilesetCeladonMansionPalMap: ; 0x4c545
+INCLUDE "tilesets/celadon_mansion_palette_map.asm"
; 0x4c5b5
-Tileset14PalMap: ; 0x4c5b5
-INCLUDE "tilesets/14_palette_map.asm"
+TilesetGameCornerPalMap: ; 0x4c5b5
+INCLUDE "tilesets/game_corner_palette_map.asm"
; 0x4c625
-Tileset15PalMap: ; 0x4c625
-INCLUDE "tilesets/15_palette_map.asm"
+TilesetGym1PalMap: ; 0x4c625
+INCLUDE "tilesets/gym_1_palette_map.asm"
; 0x4c695
-Tileset16PalMap: ; 0x4c695
-INCLUDE "tilesets/16_palette_map.asm"
+TilesetKurtsHousePalMap: ; 0x4c695
+INCLUDE "tilesets/kurts_house_palette_map.asm"
; 0x4c705
-Tileset23PalMap: ; 0x4c705
-INCLUDE "tilesets/23_palette_map.asm"
+TilesetSproutTowerPalMap: ; 0x4c705
+INCLUDE "tilesets/sprout_tower_palette_map.asm"
; 0x4c775
-Tileset24PalMap: ; 0x4c775
-Tileset30PalMap: ; 0x4c775
-INCLUDE "tilesets/30_palette_map.asm"
+TilesetCavePalMap: ; 0x4c775
+TilesetWhirlIslandsPalMap: ; 0x4c775
+INCLUDE "tilesets/cave_palette_map.asm"
; 0x4c7e5
-Tileset25PalMap: ; 0x4c7e5
-INCLUDE "tilesets/25_palette_map.asm"
+TilesetParkPalMap: ; 0x4c7e5
+INCLUDE "tilesets/park_palette_map.asm"
; 0x4c855
-Tileset26PalMap: ; 0x4c855
-Tileset32PalMap: ; 0x4c855
-Tileset33PalMap: ; 0x4c855
-Tileset34PalMap: ; 0x4c855
-Tileset35PalMap: ; 0x4c855
-Tileset36PalMap: ; 0x4c855
-INCLUDE "tilesets/36_palette_map.asm"
+TilesetRuinsOfAlphPalMap: ; 0x4c855
+TilesetBetaWordRoomPalMap: ; 0x4c855
+TilesetHoOhWordRoomPalMap: ; 0x4c855
+TilesetKabutoWordRoomPalMap: ; 0x4c855
+TilesetOmanyteWordRoomPalMap: ; 0x4c855
+TilesetAerodactylWordRoomPalMap: ; 0x4c855
+INCLUDE "tilesets/ruins_of_alph_palette_map.asm"
; 0x4c8c5
-Tileset27PalMap: ; 0x4c8c5
-INCLUDE "tilesets/27_palette_map.asm"
+TilesetRadioTowerPalMap: ; 0x4c8c5
+INCLUDE "tilesets/radio_tower_palette_map.asm"
; 0x4c935
-Tileset17PalMap: ; 0x4c935
-INCLUDE "tilesets/17_palette_map.asm"
+TilesetTrainStationPalMap: ; 0x4c935
+INCLUDE "tilesets/train_station_palette_map.asm"
; 0x4c9a5
-Tileset28PalMap: ; 0x4c9a5
-INCLUDE "tilesets/28_palette_map.asm"
+TilesetUndergroundPalMap: ; 0x4c9a5
+INCLUDE "tilesets/underground_palette_map.asm"
; 0x4ca15
-Tileset18PalMap: ; 0x4ca15
-INCLUDE "tilesets/18_palette_map.asm"
+TilesetOlivineGymPalMap: ; 0x4ca15
+INCLUDE "tilesets/olivine_gym_palette_map.asm"
; 0x4ca85
-Tileset19PalMap: ; 0x4ca85
-INCLUDE "tilesets/19_palette_map.asm"
+TilesetLighthousePalMap: ; 0x4ca85
+INCLUDE "tilesets/lighthouse_palette_map.asm"
; 0x4caf5
-Tileset20PalMap: ; 0x4caf5
-INCLUDE "tilesets/20_palette_map.asm"
+TilesetPlayersHouse2FPalMap: ; 0x4caf5
+INCLUDE "tilesets/players_house_2f_palette_map.asm"
; 0x4cb65
-UnusedPalMap1:
-INCBIN "tilesets/unused_palette_map_1.bin"
+UnusedMuseumPalMap: ; 0x4cb65
+INCLUDE "tilesets/unused_museum_palette_map.asm"
; 4cbd5
-Tileset29PalMap: ; 0x4cbd5
-INCLUDE "tilesets/29_palette_map.asm"
+TilesetIcePathPalMap: ; 0x4cbd5
+INCLUDE "tilesets/ice_path_palette_map.asm"
; 0x4cc45
-Tileset31PalMap: ; 0x4cc45
-INCLUDE "tilesets/31_palette_map.asm"
+TilesetIlexForestPalMap: ; 0x4cc45
+INCLUDE "tilesets/ilex_forest_palette_map.asm"
; 0x4ccb5
-Tileset21PalMap: ; 0x4ccb5
-INCLUDE "tilesets/21_palette_map.asm"
+TilesetPokeComCenterPalMap: ; 0x4ccb5
+INCLUDE "tilesets/pokecom_center_palette_map.asm"
; 0x4cd25
-Tileset22PalMap: ; 0x4cd25
-INCLUDE "tilesets/22_palette_map.asm"
+TilesetBattleTowerPalMap: ; 0x4cd25
+INCLUDE "tilesets/battle_tower_palette_map.asm"
; 0x4cd95
-Tileset04PalMap: ; 0x4cd95
-INCLUDE "tilesets/04_palette_map.asm"
+TilesetBattleTowerOutsidePalMap: ; 0x4cd95
+INCLUDE "tilesets/battle_tower_outside_palette_map.asm"
; 0x4ce05
-
-UnusedPalMap2:
-INCBIN "tilesets/unused_palette_map_2.bin"
-; 4ce1f
diff --git a/tilesets/park_collision.asm b/tilesets/park_collision.asm
new file mode 100644
index 000000000..c5965e0c9
--- /dev/null
+++ b/tilesets/park_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06
+ tilecoll WALL, WALL, WALL, WALL ; 07
+ tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 08
+ tilecoll WALL, WALL, WALL, WALL ; 09
+ tilecoll WALL, WALL, WALL, WALL ; 0a
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 0b
+ tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 0c
+ tilecoll WALL, WALL, WALL, WALL ; 0d
+ tilecoll WALL, WALL, WALL, WALL ; 0e
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 0f
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 10
+ tilecoll WALL, WALL, WALL, FLOOR ; 11
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 12
+ tilecoll WALL, WALL, FLOOR, WALL ; 13
+ tilecoll LONG_GRASS, LONG_GRASS, LONG_GRASS, LONG_GRASS ; 14
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 15
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 16
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 17
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 18
+ tilecoll WALL, FLOOR, WALL, WALL ; 19
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 1a
+ tilecoll FLOOR, WALL, WALL, WALL ; 1b
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 1c
+ tilecoll WALL, WALL, WALL, FLOOR ; 1d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1e
+ tilecoll WALL, WALL, FLOOR, WALL ; 1f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 20
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 21
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 23
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24
+ tilecoll WALL, FLOOR, WALL, WALL ; 25
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 26
+ tilecoll FLOOR, WALL, WALL, WALL ; 27
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28
+ tilecoll WALL, WALL, WALL, WALL ; 29
+ tilecoll WALL, WALL, WALL, WALL ; 2a
+ tilecoll WALL, WALL, WALL, WALL ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c
+ tilecoll WALL, WALL, WALL, WALL ; 2d
+ tilecoll WALL, WALL, WALL, WALL ; 2e
+ tilecoll WALL, WALL, WALL, WALL ; 2f
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 30
+ tilecoll WALL, WALL, WALL, WALL ; 31
+ tilecoll WALL, WALL, WALL, WALL ; 32
+ tilecoll WALL, WALL, WALL, WALL ; 33
+ tilecoll LONG_GRASS, LONG_GRASS, LONG_GRASS, LONG_GRASS ; 34
+ tilecoll WALL, WALL, WALL, WALL ; 35
+ tilecoll WALL, WALL, WALL, WALL ; 36
+ tilecoll WALL, WALL, WALL, WALL ; 37
+ tilecoll WALL, WALL, WALL, WALL ; 38
+ tilecoll WALL, WALL, WALL, WALL ; 39
+ tilecoll WALL, WALL, WALL, WALL ; 3a
+ tilecoll WALL, WALL, WALL, WALL ; 3b
+ tilecoll WALL, WALL, WALL, WALL ; 3c
+ tilecoll WALL, WALL, WALL, WALL ; 3d
+ tilecoll WALL, WALL, WALL, WALL ; 3e
+ tilecoll WALL, WALL, WALL, WALL ; 3f
+ tilecoll LONG_GRASS, LONG_GRASS, LONG_GRASS, LONG_GRASS ; 40
diff --git a/tilesets/25_metatiles.bin b/tilesets/park_metatiles.bin
index 1fe931640..1fe931640 100644
--- a/tilesets/25_metatiles.bin
+++ b/tilesets/park_metatiles.bin
Binary files differ
diff --git a/tilesets/25_palette_map.asm b/tilesets/park_palette_map.asm
index f9c65ef89..f9c65ef89 100644
--- a/tilesets/25_palette_map.asm
+++ b/tilesets/park_palette_map.asm
diff --git a/tilesets/players_house_2f_collision.asm b/tilesets/players_house_2f_collision.asm
new file mode 100644
index 000000000..464d80b83
--- /dev/null
+++ b/tilesets/players_house_2f_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll WALL, WALL, WALL, WALL ; 02
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 03
+ tilecoll WALL, WALL, TV, BOOKSHELF ; 04
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 05
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 08
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 09
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 0c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 0f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 12
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 14
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 15
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 16
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 17
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 18
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 19
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1b
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1c
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1d
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1e
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1f
+ tilecoll TOWN_MAP, STAIRCASE, FLOOR, FLOOR ; 20
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 21
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 22
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 23
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 24
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 25
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 26
+ tilecoll FF, FF, FF, FF ; 27
+ tilecoll FF, FF, FF, FF ; 28
+ tilecoll FF, FF, FF, FF ; 29
+ tilecoll FF, FF, FF, FF ; 2a
+ tilecoll FF, FF, FF, FF ; 2b
+ tilecoll FF, FF, FF, FF ; 2c
+ tilecoll FF, FF, FF, FF ; 2d
+ tilecoll FF, FF, FF, FF ; 2e
+ tilecoll FF, FF, FF, FF ; 2f
+ tilecoll FF, FF, FF, FF ; 30
+ tilecoll FF, FF, FF, FF ; 31
+ tilecoll FF, FF, FF, FF ; 32
+ tilecoll FF, FF, FF, FF ; 33
+ tilecoll FF, FF, FF, FF ; 34
+ tilecoll FF, FF, FF, FF ; 35
+ tilecoll FF, FF, FF, FF ; 36
+ tilecoll FF, FF, FF, FF ; 37
+ tilecoll FF, FF, FF, FF ; 38
+ tilecoll FF, FF, FF, FF ; 39
+ tilecoll FF, FF, FF, FF ; 3a
+ tilecoll FF, FF, FF, FF ; 3b
+ tilecoll FF, FF, FF, FF ; 3c
+ tilecoll FF, FF, FF, FF ; 3d
+ tilecoll FF, FF, FF, FF ; 3e
+ tilecoll FF, FF, FF, FF ; 3f
+ tilecoll FF, FF, FF, FF ; 40
diff --git a/tilesets/20_metatiles.bin b/tilesets/players_house_2f_metatiles.bin
index 0839798fe..0839798fe 100644
--- a/tilesets/20_metatiles.bin
+++ b/tilesets/players_house_2f_metatiles.bin
Binary files differ
diff --git a/tilesets/20_palette_map.asm b/tilesets/players_house_2f_palette_map.asm
index 1c0cb1f08..1c0cb1f08 100644
--- a/tilesets/20_palette_map.asm
+++ b/tilesets/players_house_2f_palette_map.asm
diff --git a/tilesets/players_house_collision.asm b/tilesets/players_house_collision.asm
new file mode 100644
index 000000000..ed6b70a29
--- /dev/null
+++ b/tilesets/players_house_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll WINDOW, WALL, FLOOR, FLOOR ; 02
+ tilecoll WALL, WALL, FLOOR, TV ; 03
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04
+ tilecoll WALL, WALL, WALL, WALL ; 05
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 06
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 07
+ tilecoll WALL, WALL, WALL, WALL ; 08
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 09
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 0a
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 0b
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 0c
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 0d
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 0e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll WALL, WALL, PC, FLOOR ; 11
+ tilecoll WALL, WALL, TV, WALL ; 12
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13
+ tilecoll FLOOR, TV, FLOOR, WALL ; 14
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 15
+ tilecoll WALL, WALL, FLOOR, WALL ; 16
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 17
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 18
+ tilecoll WALL, WALL, RADIO, PC ; 19
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1a
+ tilecoll WALL, WALL, RADIO, FLOOR ; 1b
+ tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 1c
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1e
+ tilecoll WALL, WALL, VIRTUAL_BOY, FLOOR ; 1f
+ tilecoll WALL, WALL, PC, RADIO ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll WALL, WALL, TV, BOOKSHELF ; 22
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 23
+ tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 24
+ tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 25
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 26
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 28
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 40
diff --git a/tilesets/06_metatiles.bin b/tilesets/players_house_metatiles.bin
index f316eb8c1..f316eb8c1 100644
--- a/tilesets/06_metatiles.bin
+++ b/tilesets/players_house_metatiles.bin
Binary files differ
diff --git a/tilesets/06_palette_map.asm b/tilesets/players_house_palette_map.asm
index 5d089835b..5d089835b 100644
--- a/tilesets/06_palette_map.asm
+++ b/tilesets/players_house_palette_map.asm
diff --git a/tilesets/pokecenter_collision.asm b/tilesets/pokecenter_collision.asm
new file mode 100644
index 000000000..5b776330e
--- /dev/null
+++ b/tilesets/pokecenter_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll WALL, WALL, WALL, WALL ; 02
+ tilecoll WALL, WALL, WALL, FLOOR ; 03
+ tilecoll WALL, WALL, FLOOR, WALL ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 06
+ tilecoll WALL, COUNTER, FLOOR, FLOOR ; 07
+ tilecoll COUNTER, WALL, FLOOR, FLOOR ; 08
+ tilecoll WALL, WALL, FLOOR, PC ; 09
+ tilecoll WALL, WALL, FLOOR, WALL ; 0a
+ tilecoll WALL, DOOR, FLOOR, FLOOR ; 0b
+ tilecoll WALL, WALL, WALL, WALL ; 0c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 0e
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 0f
+ tilecoll WALL, WALL, FLOOR, WALL ; 10
+ tilecoll FLOOR, FLOOR, LADDER, FLOOR ; 11
+ tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 12
+ tilecoll FLOOR, FLOOR, LADDER, FLOOR ; 13
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 14
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 15
+ tilecoll WALL, DOOR, FLOOR, FLOOR ; 16
+ tilecoll WALL, WALL, FLOOR, WALL ; 17
+ tilecoll WALL, WALL, WALL, WALL ; 18
+ tilecoll WALL, WALL, WALL, WALL ; 19
+ tilecoll WALL, WALL, WALL, WALL ; 1a
+ tilecoll WALL, WALL, WALL, WALL ; 1b
+ tilecoll WALL, WALL, WALL, WALL ; 1c
+ tilecoll WALL, WALL, WALL, WALL ; 1d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1e
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1f
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll WALL, WALL, FLOOR, PC ; 22
+ tilecoll WALL, WALL, WALL, FLOOR ; 23
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 25
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 26
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 27
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 28
+ tilecoll WALL, WALL, FLOOR, WALL ; 29
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 2a
+ tilecoll WALL, WALL, WALL, FLOOR ; 2b
+ tilecoll WALL, DOOR, FLOOR, FLOOR ; 2c
+ tilecoll WALL, WALL, WALL, WALL ; 2d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2e
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 2f
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 30
+ tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 31
+ tilecoll WALL, WALL, FLOOR, WALL ; 32
+ tilecoll PC, WALL, FLOOR, WALL ; 33
+ tilecoll FLOOR, WARP_PANEL, FLOOR, FLOOR ; 34
+ tilecoll DOOR, WALL, FLOOR, FLOOR ; 35
+ tilecoll DOOR, WALL, FLOOR, WALL ; 36
+ tilecoll DOOR, WALL, FLOOR, FLOOR ; 37
+ tilecoll DOOR, WALL, FLOOR, WALL ; 38
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 39
+ tilecoll WALL, WALL, FLOOR, WALL ; 3a
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll WALL, WALL, FLOOR, WALL ; 3c
+ tilecoll WARP_PANEL, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll WARP_PANEL, FLOOR, FLOOR, FLOOR ; 3e
+ tilecoll WARP_PANEL, WARP_PANEL, FLOOR, FLOOR ; 3f
+ tilecoll FLOOR, WARP_PANEL, FLOOR, FLOOR ; 40
diff --git a/tilesets/07_metatiles.bin b/tilesets/pokecenter_metatiles.bin
index c96c4843b..c96c4843b 100644
--- a/tilesets/07_metatiles.bin
+++ b/tilesets/pokecenter_metatiles.bin
Binary files differ
diff --git a/tilesets/07_palette_map.asm b/tilesets/pokecenter_palette_map.asm
index 78508b59e..78508b59e 100644
--- a/tilesets/07_palette_map.asm
+++ b/tilesets/pokecenter_palette_map.asm
diff --git a/tilesets/pokecom.pal b/tilesets/pokecom.pal
deleted file mode 100644
index 7b89faf62..000000000
--- a/tilesets/pokecom.pal
+++ /dev/null
@@ -1,39 +0,0 @@
- RGB 30, 28, 26
- RGB 19, 19, 19
- RGB 13, 13, 13
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 31, 19, 24
- RGB 30, 10, 06
- RGB 07, 07, 07
-
- RGB 18, 24, 09
- RGB 15, 20, 01
- RGB 09, 13, 00
- RGB 07, 07, 07
-
- RGB 30, 28, 26
- RGB 17, 19, 31
- RGB 14, 16, 31
- RGB 07, 07, 07
-
- RGB 31, 26, 21
- RGB 31, 20, 01
- RGB 14, 16, 31
- RGB 07, 07, 07
-
- RGB 21, 17, 07
- RGB 17, 19, 31
- RGB 16, 13, 03
- RGB 07, 07, 07
-
- RGB 05, 05, 16
- RGB 08, 19, 28
- RGB 00, 00, 00
- RGB 31, 31, 31
-
- RGB 31, 31, 16
- RGB 31, 31, 16
- RGB 14, 09, 00
- RGB 00, 00, 00
diff --git a/tilesets/pokecom_center.pal b/tilesets/pokecom_center.pal
new file mode 100644
index 000000000..9fe7b765a
--- /dev/null
+++ b/tilesets/pokecom_center.pal
@@ -0,0 +1,40 @@
+; gray
+ RGB 30, 28, 26
+ RGB 19, 19, 19
+ RGB 13, 13, 13
+ RGB 07, 07, 07
+; red
+ RGB 30, 28, 26
+ RGB 31, 19, 24
+ RGB 30, 10, 06
+ RGB 07, 07, 07
+; green
+ RGB 18, 24, 09
+ RGB 15, 20, 01
+ RGB 09, 13, 00
+ RGB 07, 07, 07
+; water (blue)
+ RGB 30, 28, 26
+ RGB 17, 19, 31
+ RGB 14, 16, 31
+ RGB 07, 07, 07
+; yellow
+ RGB 31, 26, 21
+ RGB 31, 20, 01
+ RGB 14, 16, 31
+ RGB 07, 07, 07
+; brown
+ RGB 21, 17, 07
+ RGB 17, 19, 31
+ RGB 16, 13, 03
+ RGB 07, 07, 07
+; roof
+ RGB 05, 05, 16
+ RGB 08, 19, 28
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+; text
+ RGB 31, 31, 16
+ RGB 31, 31, 16
+ RGB 14, 09, 00
+ RGB 00, 00, 00
diff --git a/tilesets/pokecom_center_collision.asm b/tilesets/pokecom_center_collision.asm
new file mode 100644
index 000000000..1ecef84de
--- /dev/null
+++ b/tilesets/pokecom_center_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 03
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 04
+ tilecoll WALL, WALL, WALL, FLOOR ; 05
+ tilecoll WALL, WALL, WALL, WALL ; 06
+ tilecoll WALL, WALL, WALL, FLOOR ; 07
+ tilecoll WALL, WALL, FLOOR, PC ; 08
+ tilecoll WALL, WALL, WALL, FLOOR ; 09
+ tilecoll WALL, COUNTER, FLOOR, FLOOR ; 0a
+ tilecoll WALL, COUNTER, FLOOR, FLOOR ; 0b
+ tilecoll WALL, WALL, WALL, WALL ; 0c
+ tilecoll WALL, WALL, FLOOR, WALL ; 0d
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 0e
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 0f
+ tilecoll WALL, WALL, FLOOR, WALL ; 10
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 11
+ tilecoll WALL, WALL, WALL, FLOOR ; 12
+ tilecoll WALL, WALL, WALL, WALL ; 13
+ tilecoll WALL, WALL, WALL, WALL ; 14
+ tilecoll WALL, WALL, WALL, WALL ; 15
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 16
+ tilecoll WALL, WALL, WALL, WALL ; 17
+ tilecoll WALL, WALL, WALL, WALL ; 18
+ tilecoll WALL, WALL, WALL, WALL ; 19
+ tilecoll WALL, WALL, WALL, WALL ; 1a
+ tilecoll WALL, WALL, FLOOR, WALL ; 1b
+ tilecoll WALL, WALL, WALL, WALL ; 1c
+ tilecoll WALL, WALL, WALL, WALL ; 1d
+ tilecoll WALL, WALL, WALL, WALL ; 1e
+ tilecoll WALL, WALL, WALL, WALL ; 1f
+ tilecoll WALL, WALL, WALL, WALL ; 20
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 21
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23
+ tilecoll WALL, WALL, WALL, WALL ; 24
+ tilecoll WALL, WALL, WALL, WALL ; 25
+ tilecoll WALL, WALL, WALL, WALL ; 26
+ tilecoll WALL, WALL, WALL, WALL ; 27
+ tilecoll WALL, WALL, WALL, WALL ; 28
+ tilecoll WALL, WALL, WALL, WALL ; 29
+ tilecoll WALL, WALL, WALL, WALL ; 2a
+ tilecoll WALL, WALL, WALL, WALL ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c
+ tilecoll FLOOR, FLOOR, LADDER, FLOOR ; 2d
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 2e
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2f
+ tilecoll WALL, WALL, WALL, WALL ; 30
+ tilecoll WALL, WALL, WALL, WALL ; 31
+ tilecoll WALL, WALL, WALL, WALL ; 32
+ tilecoll WALL, WALL, WALL, WALL ; 33
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 34
+ tilecoll WALL, WALL, WALL, WALL ; 35
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 36
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 38
+ tilecoll WALL, WALL, WALL, WALL ; 39
+ tilecoll WALL, WALL, WALL, WALL ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 3c
+ tilecoll WALL, WALL, WALL, WALL ; 3d
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 3e
+ tilecoll WALL, WALL, WALL, WALL ; 3f
+ tilecoll WALL, WALL, WALL, WALL ; 40
diff --git a/tilesets/21_metatiles.bin b/tilesets/pokecom_center_metatiles.bin
index 097a882fd..097a882fd 100644
--- a/tilesets/21_metatiles.bin
+++ b/tilesets/pokecom_center_metatiles.bin
diff --git a/tilesets/21_palette_map.asm b/tilesets/pokecom_center_palette_map.asm
index 75ee649f9..75ee649f9 100644
--- a/tilesets/21_palette_map.asm
+++ b/tilesets/pokecom_center_palette_map.asm
diff --git a/tilesets/port_collision.asm b/tilesets/port_collision.asm
new file mode 100644
index 000000000..fb37ee11e
--- /dev/null
+++ b/tilesets/port_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01
+ tilecoll WALL, WALL, WALL, WALL ; 02
+ tilecoll BUOY, WATER, BUOY, WATER ; 03
+ tilecoll WATER, BUOY, WATER, BUOY ; 04
+ tilecoll LADDER, LADDER, LADDER, LADDER ; 05
+ tilecoll WALL, WALL, WALL, WATER ; 06
+ tilecoll WALL, WALL, WATER, WATER ; 07
+ tilecoll WALL, WALL, WATER, WALL ; 08
+ tilecoll WATER, WATER, WATER, WATER ; 09
+ tilecoll WALL, WATER, WALL, WATER ; 0a
+ tilecoll WATER, WATER, WATER, WATER ; 0b
+ tilecoll WATER, WALL, WATER, WALL ; 0c
+ tilecoll WATER, WATER, FLOOR, FLOOR ; 0d
+ tilecoll WALL, WATER, WALL, WALL ; 0e
+ tilecoll WATER, WATER, WALL, WALL ; 0f
+ tilecoll WATER, WALL, WALL, WALL ; 10
+ tilecoll WATER, WATER, WATER, WATER ; 11
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12
+ tilecoll WATER, WATER, WATER, WATER ; 13
+ tilecoll WATER, FLOOR, WATER, FLOOR ; 14
+ tilecoll WATER, FLOOR, WATER, FLOOR ; 15
+ tilecoll WATER, WATER, WATER, WATER ; 16
+ tilecoll WATER, WATER, WATER, WATER ; 17
+ tilecoll WATER, FLOOR, WALL, WARP_CARPET_DOWN ; 18
+ tilecoll WATER, WATER, WALL, WALL ; 19
+ tilecoll WATER, FLOOR, WALL, WALL ; 1a
+ tilecoll WALL, WALL, WALL, WALL ; 1b
+ tilecoll WALL, WATER, WALL, WALL ; 1c
+ tilecoll WATER_21, WATER_21, WALL, WALL ; 1d
+ tilecoll WATER_21, WATER_21, WALL, WALL ; 1e
+ tilecoll WATER_21, WATER_21, WALL, WALL ; 1f
+ tilecoll WALL, WALL, WALL, WATER ; 20
+ tilecoll WALL, FLOOR, WATER, WARP_CARPET_DOWN ; 21
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22
+ tilecoll BUOY, BUOY, BUOY, WATER ; 23
+ tilecoll BUOY, BUOY, WATER, BUOY ; 24
+ tilecoll BUOY, BUOY, WATER, WATER ; 25
+ tilecoll BUOY, BUOY, WATER, WATER ; 26
+ tilecoll LADDER, LADDER, LADDER, LADDER ; 27
+ tilecoll FLOOR, FLOOR, WATER, WATER ; 28
+ tilecoll FLOOR, FLOOR, FLOOR, WATER ; 29
+ tilecoll FLOOR, FLOOR, WATER, FLOOR ; 2a
+ tilecoll WALL, WALL, WALL, WALL ; 2b
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2c
+ tilecoll FLOOR, WATER, FLOOR, FLOOR ; 2d
+ tilecoll WATER, FLOOR, FLOOR, FLOOR ; 2e
+ tilecoll FLOOR, WATER, FLOOR, WATER ; 2f
+ tilecoll WATER, FLOOR, WATER, FLOOR ; 30
+ tilecoll FLOOR, FLOOR, WATER, WATER ; 31
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 33
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 34
+ tilecoll FLOOR, WATER, FLOOR, WATER ; 35
+ tilecoll WALL, WALL, FLOOR, LADDER ; 36
+ tilecoll WATER, WATER, WATER, WATER ; 37
+ tilecoll FLOOR, WATER, FLOOR, WATER ; 38
+ tilecoll WATER, FLOOR, WATER, FLOOR ; 39
+ tilecoll WATER, WATER, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3b
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3c
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3d
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3e
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 40
diff --git a/tilesets/09_metatiles.bin b/tilesets/port_metatiles.bin
index 69a600707..69a600707 100644
--- a/tilesets/09_metatiles.bin
+++ b/tilesets/port_metatiles.bin
diff --git a/tilesets/09_palette_map.asm b/tilesets/port_palette_map.asm
index 6bfdf4686..6bfdf4686 100644
--- a/tilesets/09_palette_map.asm
+++ b/tilesets/port_palette_map.asm
diff --git a/tilesets/power_plant_collision.asm b/tilesets/power_plant_collision.asm
new file mode 100644
index 000000000..eb5cd8f33
--- /dev/null
+++ b/tilesets/power_plant_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 02
+ tilecoll WALL, WALL, WALL, WALL ; 03
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04
+ tilecoll FLOOR, LADDER, FLOOR, FLOOR ; 05
+ tilecoll FLOOR, LADDER, FLOOR, FLOOR ; 06
+ tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 07
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 09
+ tilecoll WALL, WALL, WALL, FLOOR ; 0a
+ tilecoll WALL, WALL, FLOOR, WALL ; 0b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 0d
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 0e
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 11
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 12
+ tilecoll WALL, WALL, WALL, WALL ; 13
+ tilecoll WALL, WALL, WALL, WALL ; 14
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 15
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 16
+ tilecoll WALL, WALL, WALL, WALL ; 17
+ tilecoll WALL, WALL, WALL, WALL ; 18
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 19
+ tilecoll WALL, WALL, WALL, WALL ; 1a
+ tilecoll WALL, WALL, WALL, FLOOR ; 1b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1c
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1d
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 1e
+ tilecoll WALL, WALL, FLOOR, COUNTER ; 1f
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 20
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 21
+ tilecoll WALL, WALL, WALL, FLOOR ; 22
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 23
+ tilecoll WALL, FLOOR, WALL, WALL ; 24
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 25
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 26
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 27
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 29
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2a
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 2b
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 2c
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 2d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2e
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 2f
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 30
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31
+ tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 32
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 33
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 34
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 35
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 36
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 38
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 39
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, WALL, WALL, WALL ; 3b
+ tilecoll WALL, WALL, FLOOR, WALL ; 3c
+ tilecoll WALL, WALL, WALL, FLOOR ; 3d
+ tilecoll WALL, WALL, FLOOR, WALL ; 3e
+ tilecoll WALL, FLOOR, WALL, WALL ; 3f
+ tilecoll FLOOR, COUNTER, COUNTER, COUNTER ; 40
diff --git a/tilesets/11_metatiles.bin b/tilesets/power_plant_metatiles.bin
index f6089d29c..f6089d29c 100644
--- a/tilesets/11_metatiles.bin
+++ b/tilesets/power_plant_metatiles.bin
diff --git a/tilesets/11_palette_map.asm b/tilesets/power_plant_palette_map.asm
index f79f9c01b..f79f9c01b 100644
--- a/tilesets/11_palette_map.asm
+++ b/tilesets/power_plant_palette_map.asm
diff --git a/tilesets/radio_tower_collision.asm b/tilesets/radio_tower_collision.asm
new file mode 100644
index 000000000..1713eb438
--- /dev/null
+++ b/tilesets/radio_tower_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 03
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 04
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 05
+ tilecoll FLOOR, FLOOR, WALL, COUNTER ; 06
+ tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 07
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 08
+ tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 09
+ tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 0a
+ tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 0b
+ tilecoll WALL, WALL, WALL, WALL ; 0c
+ tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 0d
+ tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 0e
+ tilecoll FLOOR, FLOOR, FLOOR, COUNTER ; 0f
+ tilecoll FLOOR, FLOOR, COUNTER, FLOOR ; 10
+ tilecoll FLOOR, COUNTER, FLOOR, FLOOR ; 11
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 12
+ tilecoll WALL, WALL, PC, FLOOR ; 13
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 14
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 15
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 16
+ tilecoll WALL, WALL, WALL, WALL ; 17
+ tilecoll FLOOR, FLOOR, COUNTER, FLOOR ; 18
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 19
+ tilecoll WALL, WALL, FLOOR, COUNTER ; 1a
+ tilecoll WALL, COUNTER, FLOOR, COUNTER ; 1b
+ tilecoll COUNTER, FLOOR, FLOOR, FLOOR ; 1c
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1d
+ tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 1e
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1f
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 20
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 21
+ tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 22
+ tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 23
+ tilecoll WALL, WALL, WALL, WALL ; 24
+ tilecoll WALL, WALL, FLOOR, BOOKSHELF ; 25
+ tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 26
+ tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 27
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28
+ tilecoll WALL, WALL, FLOOR, WALL ; 29
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 2a
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2b
+ tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 2c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d
+ tilecoll FLOOR, COUNTER, FLOOR, COUNTER ; 2e
+ tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 2f
+ tilecoll WALL, WALL, WALL, WALL ; 30
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 31
+ tilecoll WALL, WALL, FLOOR, WALL ; 32
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 33
+ tilecoll WALL, WALL, WALL, FLOOR ; 34
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 35
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 38
+ tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 39
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b
+ tilecoll WALL, WALL, WALL, WALL ; 3c
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 3d
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3e
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 40
diff --git a/tilesets/27_metatiles.bin b/tilesets/radio_tower_metatiles.bin
index 01c0b4aa5..01c0b4aa5 100644
--- a/tilesets/27_metatiles.bin
+++ b/tilesets/radio_tower_metatiles.bin
Binary files differ
diff --git a/tilesets/27_palette_map.asm b/tilesets/radio_tower_palette_map.asm
index 3530f7479..3530f7479 100644
--- a/tilesets/27_palette_map.asm
+++ b/tilesets/radio_tower_palette_map.asm
diff --git a/tilesets/roof.pal b/tilesets/roof.pal
deleted file mode 100644
index 67d59ed4d..000000000
--- a/tilesets/roof.pal
+++ /dev/null
@@ -1,161 +0,0 @@
-; group 0 (unused)
- RGB 21, 21, 21
- RGB 11, 11, 11
- RGB 21, 21, 21
- RGB 11, 11, 11
-
-; group 1
- RGB 14, 17, 31
- RGB 07, 11, 15
- RGB 09, 09, 17
- RGB 05, 07, 13
-
-; group 2
- RGB 12, 19, 00
- RGB 06, 10, 00
- RGB 06, 09, 07
- RGB 04, 05, 06
-
-; group 3
- RGB 21, 21, 21
- RGB 11, 11, 11
- RGB 21, 21, 21
- RGB 17, 08, 07
-
-; group 4
- RGB 31, 19, 00
- RGB 27, 10, 05
- RGB 15, 07, 02
- RGB 11, 04, 02
-
-; group 5
- RGB 11, 10, 16
- RGB 05, 06, 07
- RGB 03, 04, 08
- RGB 00, 00, 00
-
-; group 6
- RGB 31, 10, 00
- RGB 18, 06, 00
- RGB 18, 05, 09
- RGB 17, 08, 07
-
-; group 7
- RGB 17, 27, 31
- RGB 05, 15, 31
- RGB 07, 08, 22
- RGB 07, 07, 16
-
-; group 8
- RGB 22, 20, 10
- RGB 17, 14, 03
- RGB 11, 11, 05
- RGB 10, 09, 07
-
-; group 9
- RGB 31, 08, 04
- RGB 09, 09, 08
- RGB 18, 05, 09
- RGB 09, 09, 08
-
-; group 10
- RGB 24, 14, 31
- RGB 13, 07, 21
- RGB 12, 03, 18
- RGB 09, 03, 15
-
-; group 11
- RGB 25, 25, 00
- RGB 20, 17, 08
- RGB 12, 12, 00
- RGB 10, 09, 05
-
-; group 12
- RGB 27, 23, 01
- RGB 23, 11, 00
- RGB 15, 11, 01
- RGB 11, 10, 01
-
-; group 13
- RGB 27, 28, 31
- RGB 17, 19, 22
- RGB 14, 14, 18
- RGB 10, 09, 13
-
-; group 14
- RGB 19, 19, 16
- RGB 10, 12, 15
- RGB 09, 09, 11
- RGB 04, 05, 07
-
-; group 15
- RGB 14, 17, 31
- RGB 07, 11, 15
- RGB 09, 13, 19
- RGB 07, 07, 16
-
-; group 16
- RGB 21, 21, 21
- RGB 13, 13, 13
- RGB 11, 11, 19
- RGB 07, 07, 12
-
-; group 17
- RGB 31, 18, 29
- RGB 17, 13, 20
- RGB 14, 06, 12
- RGB 11, 03, 10
-
-; group 18
- RGB 23, 15, 31
- RGB 16, 05, 31
- RGB 12, 07, 17
- RGB 08, 06, 10
-
-; group 19
- RGB 21, 21, 25
- RGB 16, 16, 16
- RGB 13, 13, 13
- RGB 07, 07, 07
-
-; group 20
- RGB 21, 21, 21
- RGB 11, 11, 11
- RGB 21, 21, 21
- RGB 11, 11, 11
-
-; group 21
- RGB 19, 31, 15
- RGB 31, 22, 02
- RGB 12, 13, 09
- RGB 09, 12, 03
-
-; group 22
- RGB 15, 10, 31
- RGB 07, 05, 15
- RGB 06, 05, 17
- RGB 02, 02, 08
-
-; group 23
- RGB 21, 31, 07
- RGB 13, 25, 04
- RGB 09, 14, 08
- RGB 06, 10, 04
-
-; group 24
- RGB 20, 31, 14
- RGB 11, 23, 05
- RGB 09, 13, 08
- RGB 06, 09, 04
-
-; group 25
- RGB 31, 26, 00
- RGB 31, 15, 00
- RGB 13, 13, 01
- RGB 08, 08, 01
-
-; group 26
- RGB 31, 14, 28
- RGB 31, 05, 21
- RGB 14, 07, 17
- RGB 13, 00, 08
diff --git a/tilesets/roofs.asm b/tilesets/roofs.asm
index 2f9b99d2d..0e43854dd 100644
--- a/tilesets/roofs.asm
+++ b/tilesets/roofs.asm
@@ -1,4 +1,3 @@
-
LoadMapGroupRoof:: ; 1c000
ld a, [MapGroup]
ld e, a
@@ -17,35 +16,9 @@ LoadMapGroupRoof:: ; 1c000
ret
; 1c021
-MapGroupRoofs: ; 1c021i
- db -1 ; group 0 (unused)
- db 3 ; group 1
- db 2 ; group 2
- db -1 ; group 3
- db 1 ; group 4
- db 2 ; group 5
- db -1 ; group 6
- db -1 ; group 7
- db 2 ; group 8
- db 2 ; group 9
- db 1 ; group 10
- db 4 ; group 11
- db -1 ; group 12
- db -1 ; group 13
- db -1 ; group 14
- db -1 ; group 15
- db -1 ; group 16
- db -1 ; group 17
- db -1 ; group 18
- db 0 ; group 19
- db -1 ; group 20
- db -1 ; group 21
- db 3 ; group 22
- db -1 ; group 23
- db 0 ; group 24
- db -1 ; group 25
- db 0 ; group 26
-; 1c03c
+
+INCLUDE "data/maps/mapgroup_roofs.asm"
+
Roofs: ; 1c03c
INCBIN "gfx/tilesets/roofs/0.2bpp"
diff --git a/tilesets/ruins_of_alph_collision.asm b/tilesets/ruins_of_alph_collision.asm
new file mode 100644
index 000000000..8c65340ab
--- /dev/null
+++ b/tilesets/ruins_of_alph_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll WALL, WALL, WALL, FLOOR ; 02
+ tilecoll WALL, WALL, FLOOR, WALL ; 03
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll WALL, WALL, WALL, FLOOR ; 06
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 07
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 08
+ tilecoll WALL, WALL, FLOOR, WALL ; 09
+ tilecoll WALL, FLOOR, WALL, WALL ; 0a
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 0b
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 0c
+ tilecoll FLOOR, WALL, WALL, WALL ; 0d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 0f
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 10
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 11
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 12
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 13
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 14
+ tilecoll WALL, FLOOR, WALL, WALL ; 15
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 16
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 17
+ tilecoll FLOOR, WALL, WALL, WALL ; 18
+ tilecoll WALL, WALL, WALL, PIT ; 19
+ tilecoll WALL, WALL, PIT, WALL ; 1a
+ tilecoll FLOOR, FLOOR, LADDER, FLOOR ; 1b
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1c
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1d
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 1e
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 1f
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 20
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 21
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 22
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 23
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 24
+ tilecoll WALL, WALL, WALL, WALL ; 25
+ tilecoll WALL, WALL, WALL, WALL ; 26
+ tilecoll WALL, WALL, WALL, WALL ; 27
+ tilecoll WALL, WALL, WALL, WALL ; 28
+ tilecoll WALL, WALL, WALL, WALL ; 29
+ tilecoll WALL, WALL, WALL, WALL ; 2a
+ tilecoll WALL, WALL, WALL, WALL ; 2b
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WALL ; 2c
+ tilecoll FLOOR, FLOOR, WALL, WARP_CARPET_DOWN ; 2d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2e
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2f
+ tilecoll FLOOR, FLOOR, FLOOR, PIT ; 30
+ tilecoll CAVE, WALL, FLOOR, FLOOR ; 31
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 32
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 33
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34
+ tilecoll WALL, WALL, WALL, PIT ; 35
+ tilecoll WALL, WALL, PIT, WALL ; 36
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38
+ tilecoll FLOOR, FLOOR, GRASS_4A, FLOOR ; 39
+ tilecoll FLOOR, FLOOR, GRASS_4B, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, CUT_28, FLOOR ; 3b
+ tilecoll FLOOR, FLOOR, WATER, FLOOR ; 3c
+ tilecoll 64, FLOOR, WATERFALL_UP, FLOOR ; 3d
+ tilecoll 65, FLOOR, WATERFALL, FLOOR ; 3e
+ tilecoll WATERFALL_UP, FLOOR, WARP_CARPET_DOWN, FLOOR ; 3f
+ tilecoll WATERFALL, FLOOR, DOOR, FLOOR ; 40
diff --git a/tilesets/26_metatiles.bin b/tilesets/ruins_of_alph_metatiles.bin
index 61ef041b5..61ef041b5 100644
--- a/tilesets/26_metatiles.bin
+++ b/tilesets/ruins_of_alph_metatiles.bin
Binary files differ
diff --git a/tilesets/36_palette_map.asm b/tilesets/ruins_of_alph_palette_map.asm
index 5ebde24ba..5ebde24ba 100644
--- a/tilesets/36_palette_map.asm
+++ b/tilesets/ruins_of_alph_palette_map.asm
diff --git a/tilesets/special_palettes.asm b/tilesets/special_palettes.asm
new file mode 100644
index 000000000..5674d9f80
--- /dev/null
+++ b/tilesets/special_palettes.asm
@@ -0,0 +1,200 @@
+LoadSpecialMapPalette: ; 494ac
+ ld a, [wTileset]
+ cp TILESET_POKECOM_CENTER
+ jr z, .pokecom_2f
+ cp TILESET_BATTLE_TOWER
+ jr z, .battle_tower
+ cp TILESET_ICE_PATH
+ jr z, .ice_path
+ cp TILESET_HOUSE_1
+ jr z, .house
+ cp TILESET_RADIO_TOWER
+ jr z, .radio_tower
+ cp TILESET_CELADON_MANSION
+ jr z, .mansion_mobile
+ jr .do_nothing
+
+.pokecom_2f
+ call LoadPokeComPalette
+ scf
+ ret
+
+.battle_tower
+ call LoadBattleTowerPalette
+ scf
+ ret
+
+.ice_path
+ ld a, [wEnvironment]
+ and $7
+ cp INDOOR ; Hall of Fame
+ jr z, .do_nothing
+ call LoadIcePathPalette
+ scf
+ ret
+
+.house
+ call LoadHousePalette
+ scf
+ ret
+
+.radio_tower
+ call LoadRadioTowerPalette
+ scf
+ ret
+
+.mansion_mobile
+ call LoadMansionPalette
+ scf
+ ret
+
+.do_nothing
+ and a
+ ret
+; 494f2
+
+LoadPokeComPalette: ; 494f2
+ ld a, BANK(UnknBGPals)
+ ld de, UnknBGPals
+ ld hl, PokeComPalette
+ ld bc, 8 palettes
+ call FarCopyWRAM
+ ret
+; 49501
+
+PokeComPalette: ; 49501
+INCLUDE "tilesets/pokecom_center.pal"
+; 49541
+
+LoadBattleTowerPalette: ; 49541
+ ld a, BANK(UnknBGPals)
+ ld de, UnknBGPals
+ ld hl, BattleTowerPalette
+ ld bc, 8 palettes
+ call FarCopyWRAM
+ ret
+; 49550
+
+BattleTowerPalette: ; 49550
+INCLUDE "tilesets/battle_tower.pal"
+; 49590
+
+LoadIcePathPalette: ; 49590
+ ld a, BANK(UnknBGPals)
+ ld de, UnknBGPals
+ ld hl, IcePathPalette
+ ld bc, 8 palettes
+ call FarCopyWRAM
+ ret
+; 4959f
+
+IcePathPalette: ; 4959f
+INCLUDE "tilesets/ice_path.pal"
+; 495df
+
+LoadHousePalette: ; 495df
+ ld a, BANK(UnknBGPals)
+ ld de, UnknBGPals
+ ld hl, HousePalette
+ ld bc, 8 palettes
+ call FarCopyWRAM
+ ret
+; 495ee
+
+HousePalette: ; 495ee
+INCLUDE "tilesets/house_1.pal"
+; 4962e
+
+LoadRadioTowerPalette: ; 4962e
+ ld a, BANK(UnknBGPals)
+ ld de, UnknBGPals
+ ld hl, RadioTowerPalette
+ ld bc, 8 palettes
+ call FarCopyWRAM
+ ret
+; 4963d
+
+RadioTowerPalette: ; 4963d
+INCLUDE "tilesets/radio_tower.pal"
+; 4967d
+
+MansionPalette1: ; 4967d
+ RGB 30, 28, 26
+ RGB 19, 19, 19
+ RGB 13, 13, 13
+ RGB 07, 07, 07
+
+ RGB 30, 28, 26
+ RGB 31, 19, 24
+ RGB 30, 10, 06
+ RGB 07, 07, 07
+
+ RGB 18, 24, 09
+ RGB 15, 20, 01
+ RGB 09, 13, 00
+ RGB 07, 07, 07
+
+ RGB 30, 28, 26
+ RGB 15, 16, 31
+ RGB 09, 09, 31
+ RGB 07, 07, 07
+
+ RGB 30, 28, 26
+ RGB 31, 31, 07
+ RGB 31, 16, 01
+ RGB 07, 07, 07
+
+ RGB 26, 24, 17
+ RGB 21, 17, 07
+ RGB 16, 13, 03
+ RGB 07, 07, 07
+
+MansionPalette3: ; 496ad
+ RGB 30, 28, 26
+ RGB 17, 19, 31
+ RGB 14, 16, 31
+ RGB 07, 07, 07
+
+ RGB 31, 31, 16
+ RGB 31, 31, 16
+ RGB 14, 09, 00
+ RGB 00, 00, 00
+; 496bd
+
+MansionPalette4: ; 496bd
+ RGB 05, 05, 16
+ RGB 08, 19, 28
+ RGB 00, 00, 00
+ RGB 31, 31, 31
+; 496c5
+
+LoadMansionPalette: ; 496c5
+ ld a, BANK(UnknBGPals)
+ ld de, UnknBGPals
+ ld hl, MansionPalette1
+ ld bc, 8 palettes
+ call FarCopyWRAM
+ ld a, BANK(UnknBGPals)
+ ld de, UnknBGPals palette PAL_BG_YELLOW
+ ld hl, MansionPalette2
+ ld bc, 1 palettes
+ call FarCopyWRAM
+ ld a, BANK(UnknBGPals)
+ ld de, UnknBGPals palette PAL_BG_WATER
+ ld hl, MansionPalette3
+ ld bc, 1 palettes
+ call FarCopyWRAM
+ ld a, BANK(UnknBGPals)
+ ld de, UnknBGPals palette PAL_BG_ROOF
+ ld hl, MansionPalette4
+ ld bc, 1 palettes
+ call FarCopyWRAM
+ ret
+; 496fe
+
+MansionPalette2: ; 496fe
+ RGB 25, 24, 23
+ RGB 20, 19, 19
+ RGB 14, 16, 31
+ RGB 07, 07, 07
+; 49706
diff --git a/tilesets/sprout_tower_collision.asm b/tilesets/sprout_tower_collision.asm
new file mode 100644
index 000000000..9d02e9640
--- /dev/null
+++ b/tilesets/sprout_tower_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll WALL, WALL, WALL, WALL ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 03
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 04
+ tilecoll WALL, WALL, WALL, FLOOR ; 05
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 06
+ tilecoll WALL, WALL, FLOOR, WALL ; 07
+ tilecoll WALL, WALL, WALL, WALL ; 08
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 09
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 0b
+ tilecoll WALL, WALL, WALL, WALL ; 0c
+ tilecoll WALL, FLOOR, WALL, WALL ; 0d
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 0e
+ tilecoll FLOOR, WALL, WALL, WALL ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 11
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 12
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 13
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 14
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 15
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 16
+ tilecoll WALL, FLOOR, WALL, WALL ; 17
+ tilecoll FLOOR, WALL, WALL, WALL ; 18
+ tilecoll WALL, WALL, WALL, WALL ; 19
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1b
+ tilecoll WALL, WALL, WALL, WALL ; 1c
+ tilecoll WALL, WALL, WALL, WALL ; 1d
+ tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 1e
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 1f
+ tilecoll LADDER, FLOOR, FLOOR, FLOOR ; 20
+ tilecoll LADDER, FLOOR, FLOOR, FLOOR ; 21
+ tilecoll WALL, WALL, WALL, FLOOR ; 22
+ tilecoll WALL, WALL, FLOOR, WALL ; 23
+ tilecoll WALL, WALL, WALL, WALL ; 24
+ tilecoll FLOOR, FLOOR, WARP_PANEL, FLOOR ; 25
+ tilecoll WALL, WALL, PIT, FLOOR ; 26
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 27
+ tilecoll WARP_CARPET_UP, WARP_CARPET_UP, FLOOR, FLOOR ; 28
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a
+ tilecoll WALL, WALL, WALL, WALL ; 2b
+ tilecoll WALL, HOP_LEFT, WALL, WALL ; 2c
+ tilecoll HOP_RIGHT, WALL, WALL, WALL ; 2d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 2e
+ tilecoll WALL, WALL, WALL, FLOOR ; 2f
+ tilecoll WALL, WALL, FLOOR, WALL ; 30
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 31
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 32
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 33
+ tilecoll WALL, WALL, WALL, FLOOR ; 34
+ tilecoll WALL, WALL, FLOOR, WALL ; 35
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 36
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 37
+ tilecoll PIT, PIT, FLOOR, FLOOR ; 38
+ tilecoll FLOOR, PIT, FLOOR, PIT ; 39
+ tilecoll PIT, FLOOR, PIT, FLOOR ; 3a
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 3b
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 3c
+ tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 3d
+ tilecoll WALL, HOP_DOWN, WALL, WALL ; 3e
+ tilecoll HOP_DOWN, WALL, WALL, WALL ; 3f
+ tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 40
diff --git a/tilesets/23_metatiles.bin b/tilesets/sprout_tower_metatiles.bin
index b6668fcd4..b6668fcd4 100644
--- a/tilesets/23_metatiles.bin
+++ b/tilesets/sprout_tower_metatiles.bin
diff --git a/tilesets/23_palette_map.asm b/tilesets/sprout_tower_palette_map.asm
index 6e3c10115..6e3c10115 100644
--- a/tilesets/23_palette_map.asm
+++ b/tilesets/sprout_tower_palette_map.asm
diff --git a/tilesets/tileset_headers.asm b/tilesets/tileset_headers.asm
index 752ff1cc0..b63e962f1 100644
--- a/tilesets/tileset_headers.asm
+++ b/tilesets/tileset_headers.asm
@@ -5,42 +5,43 @@ tileset: macro
dw \1PalMap
endm
-Tileset00::
- tileset Tileset00
-Tileset01::
- tileset Tileset01
- tileset Tileset02
- tileset Tileset03
- tileset Tileset04
- tileset Tileset05
- tileset Tileset06
- tileset Tileset07
- tileset Tileset08
- tileset Tileset09
- tileset Tileset10
- tileset Tileset11
- tileset Tileset12
- tileset Tileset13
- tileset Tileset14
- tileset Tileset15
- tileset Tileset16
- tileset Tileset17
- tileset Tileset18
- tileset Tileset19
- tileset Tileset20
- tileset Tileset21
- tileset Tileset22
- tileset Tileset23
- tileset Tileset24
- tileset Tileset25
- tileset Tileset26
- tileset Tileset27
- tileset Tileset28
- tileset Tileset29
- tileset Tileset30
- tileset Tileset31
- tileset Tileset32
- tileset Tileset33
- tileset Tileset34
- tileset Tileset35
- tileset Tileset36
+Tilesets:: ; 4d596
+; entries correspond to TILESET_* constants
+ tileset Tileset0
+ tileset TilesetJohto1
+ tileset TilesetJohto2
+ tileset TilesetKanto
+ tileset TilesetBattleTowerOutside
+ tileset TilesetHouse1
+ tileset TilesetPlayersHouse
+ tileset TilesetPokecenter
+ tileset TilesetGate
+ tileset TilesetPort
+ tileset TilesetLab
+ tileset TilesetPowerPlant
+ tileset TilesetMart
+ tileset TilesetCeladonMansion
+ tileset TilesetGameCorner
+ tileset TilesetGym1
+ tileset TilesetKurtsHouse
+ tileset TilesetTrainStation
+ tileset TilesetOlivineGym
+ tileset TilesetLighthouse
+ tileset TilesetPlayersHouse2F
+ tileset TilesetPokeComCenter
+ tileset TilesetBattleTower
+ tileset TilesetSproutTower
+ tileset TilesetCave
+ tileset TilesetPark
+ tileset TilesetRuinsOfAlph
+ tileset TilesetRadioTower
+ tileset TilesetUnderground
+ tileset TilesetIcePath
+ tileset TilesetWhirlIslands
+ tileset TilesetIlexForest
+ tileset TilesetBetaWordRoom
+ tileset TilesetHoOhWordRoom
+ tileset TilesetKabutoWordRoom
+ tileset TilesetOmanyteWordRoom
+ tileset TilesetAerodactylWordRoom
+; 4d7c1
diff --git a/tilesets/train_station_collision.asm b/tilesets/train_station_collision.asm
new file mode 100644
index 000000000..55b147237
--- /dev/null
+++ b/tilesets/train_station_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll FF, FF, FF, FF ; 01
+ tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 02
+ tilecoll UP_WALL, FLOOR, UP_WALL, FLOOR ; 03
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 07
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 08
+ tilecoll WALL, FLOOR, WALL, WALL ; 09
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 0a
+ tilecoll WALL, WALL, WALL, WALL ; 0b
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 0d
+ tilecoll WALL, WALL, WALL, WALL ; 0e
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll WALL, WALL, WALL, WALL ; 11
+ tilecoll WALL, WALL, DOOR, WALL ; 12
+ tilecoll WALL, WALL, WALL, DOOR ; 13
+ tilecoll WALL, WALL, WALL, WALL ; 14
+ tilecoll WALL, WALL, WALL, WALL ; 15
+ tilecoll WALL, WALL, WALL, WALL ; 16
+ tilecoll WALL, WALL, WALL, WALL ; 17
+ tilecoll WALL, WALL, WALL, WALL ; 18
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 19
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1a
+ tilecoll WALL, WALL, WALL, WALL ; 1b
+ tilecoll WALL, WALL, WALL, WALL ; 1c
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1d
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1e
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1f
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 22
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 23
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 24
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 25
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 26
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 27
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 28
+ tilecoll WALL, WALL, WALL, FLOOR ; 29
+ tilecoll WALL, WALL, FLOOR, WALL ; 2a
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 2b
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 2c
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 2d
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 2e
+ tilecoll WALL, WALL, WALL, WALL ; 2f
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 30
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 31
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 32
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 33
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 34
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 35
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 36
+ tilecoll WALL, WALL, WALL, FLOOR ; 37
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 38
+ tilecoll WALL, WALL, FLOOR, WALL ; 39
+ tilecoll WALL, FLOOR, WALL, WALL ; 3a
+ tilecoll WALL, WALL, WALL, WALL ; 3b
+ tilecoll FLOOR, WALL, WALL, WALL ; 3c
+ tilecoll WALL, WALL, WALL, WALL ; 3d
+ tilecoll WALL, WALL, WALL, WALL ; 3e
+ tilecoll WALL, WALL, WALL, WALL ; 3f
+ tilecoll WALL, WALL, WALL, WALL ; 40
diff --git a/tilesets/17_metatiles.bin b/tilesets/train_station_metatiles.bin
index 9bbdd0bd2..9bbdd0bd2 100644
--- a/tilesets/17_metatiles.bin
+++ b/tilesets/train_station_metatiles.bin
Binary files differ
diff --git a/tilesets/17_palette_map.asm b/tilesets/train_station_palette_map.asm
index f52f5bbe7..f52f5bbe7 100644
--- a/tilesets/17_palette_map.asm
+++ b/tilesets/train_station_palette_map.asm
diff --git a/tilesets/underground_collision.asm b/tilesets/underground_collision.asm
new file mode 100644
index 000000000..0c3120451
--- /dev/null
+++ b/tilesets/underground_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll WALL, WALL, WALL, WALL ; 02
+ tilecoll FLOOR, LADDER, FLOOR, FLOOR ; 03
+ tilecoll FLOOR, LADDER, FLOOR, FLOOR ; 04
+ tilecoll WALL, WALL, WALL, FLOOR ; 05
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 07
+ tilecoll FLOOR, FLOOR, PIT, PIT ; 08
+ tilecoll WALL, WALL, WALL, FLOOR ; 09
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 0a
+ tilecoll WALL, WALL, FLOOR, WALL ; 0b
+ tilecoll WALL, WALL, WALL, WALL ; 0c
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 0d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 0f
+ tilecoll FLOOR, FLOOR, FLOOR, WARP_PANEL ; 10
+ tilecoll WALL, FLOOR, WALL, WALL ; 11
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 12
+ tilecoll FLOOR, WALL, WALL, WALL ; 13
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 14
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 15
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 16
+ tilecoll WALL, FLOOR, WALL, WALL ; 17
+ tilecoll FLOOR, WALL, WALL, WALL ; 18
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 19
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1b
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1c
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 1d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1e
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 1f
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 20
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 21
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 22
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 23
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 24
+ tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 25
+ tilecoll WALL, WARP_CARPET_UP, FLOOR, FLOOR ; 26
+ tilecoll WARP_CARPET_UP, WALL, FLOOR, FLOOR ; 27
+ tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 28
+ tilecoll WARP_CARPET_LEFT, FLOOR, WARP_CARPET_LEFT, FLOOR ; 29
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 2a
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 2b
+ tilecoll WALL, WALL, WALL, WALL ; 2c
+ tilecoll WALL, WALL, WALL, WALL ; 2d
+ tilecoll WALL, WALL, WALL, WALL ; 2e
+ tilecoll WARP_CARPET_DOWN, WARP_CARPET_DOWN, WALL, WALL ; 2f
+ tilecoll WALL, WALL, WALL, WALL ; 30
+ tilecoll WALL, WALL, WALL, WALL ; 31
+ tilecoll WALL, WALL, WALL, WALL ; 32
+ tilecoll WALL, WALL, WALL, WALL ; 33
+ tilecoll WALL, WALL, WALL, WALL ; 34
+ tilecoll WALL, WALL, WALL, WALL ; 35
+ tilecoll WALL, WALL, WALL, WALL ; 36
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 37
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 38
+ tilecoll WALL, WALL, WALL, WALL ; 39
+ tilecoll WALL, WALL, WALL, WALL ; 3a
+ tilecoll WALL, WALL, WALL, WALL ; 3b
+ tilecoll WALL, WALL, WALL, WALL ; 3c
+ tilecoll WALL, WALL, WALL, WALL ; 3d
+ tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 3e
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 40
diff --git a/tilesets/28_metatiles.bin b/tilesets/underground_metatiles.bin
index 28b807e1e..28b807e1e 100644
--- a/tilesets/28_metatiles.bin
+++ b/tilesets/underground_metatiles.bin
diff --git a/tilesets/28_palette_map.asm b/tilesets/underground_palette_map.asm
index 6b9b5546d..6b9b5546d 100644
--- a/tilesets/28_palette_map.asm
+++ b/tilesets/underground_palette_map.asm
diff --git a/tilesets/unused_30_collision.bin b/tilesets/unused_30_collision.bin
deleted file mode 100644
index 559aad109..000000000
--- a/tilesets/unused_30_collision.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/unused_museum_palette_map.asm b/tilesets/unused_museum_palette_map.asm
new file mode 100644
index 000000000..cfbe6dbcd
--- /dev/null
+++ b/tilesets/unused_museum_palette_map.asm
@@ -0,0 +1,32 @@
+; Matches pokered's "gate" tileset (notable for its Pewter Museum tiles)
+; https://tcrf.net/Pok%C3%A9mon_Gold_and_Silver#Unused_Tile_Palette_Assignment_Data
+
+ tilepal 0, WATER, RED, YELLOW, YELLOW, RED, GREEN, GREEN, BROWN
+ tilepal 0, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY
+ tilepal 0, GRAY, GRAY, YELLOW, YELLOW, RED, GREEN, GREEN, BROWN
+ tilepal 0, BROWN, ROOF, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY
+ tilepal 0, GRAY, GRAY, BROWN, BROWN, GRAY, BROWN, BROWN, ROOF
+ tilepal 0, ROOF, BROWN, BROWN, BROWN, ROOF, ROOF, ROOF, ROOF
+ tilepal 0, ROOF, ROOF, BROWN, BROWN, GRAY, BROWN, BROWN, ROOF
+ tilepal 0, ROOF, GRAY, ROOF, BROWN, ROOF, ROOF, GRAY, GRAY
+ tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, ROOF, ROOF
+ tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, RED, RED
+ tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY
+ tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY
+
+rept 16
+ db $ff
+endr
+
+ tilepal 1, WATER, RED, YELLOW, YELLOW, RED, GREEN, GREEN, BROWN
+ tilepal 1, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY
+ tilepal 1, GRAY, GRAY, YELLOW, YELLOW, RED, GREEN, GREEN, BROWN
+ tilepal 1, BROWN, ROOF, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY
+ tilepal 1, GRAY, GRAY, BROWN, BROWN, GRAY, BROWN, BROWN, ROOF
+ tilepal 1, ROOF, BROWN, BROWN, BROWN, ROOF, ROOF, ROOF, ROOF
+ tilepal 1, ROOF, ROOF, BROWN, BROWN, GRAY, BROWN, BROWN, ROOF
+ tilepal 1, ROOF, GRAY, ROOF, BROWN, ROOF, ROOF, GRAY, GRAY
+ tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, ROOF, ROOF
+ tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, RED, RED
+ tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY
+ tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY
diff --git a/tilesets/unused_palette_map_1.bin b/tilesets/unused_palette_map_1.bin
deleted file mode 100644
index 04cb3ff2d..000000000
--- a/tilesets/unused_palette_map_1.bin
+++ /dev/null
Binary files differ
diff --git a/tilesets/unused_palette_map_2.bin b/tilesets/unused_palette_map_2.bin
deleted file mode 100644
index aba1b3cbf..000000000
--- a/tilesets/unused_palette_map_2.bin
+++ /dev/null
@@ -1 +0,0 @@
- \ No newline at end of file
diff --git a/tilesets/unused_whirl_islands_collision.asm b/tilesets/unused_whirl_islands_collision.asm
new file mode 100644
index 000000000..0022d3881
--- /dev/null
+++ b/tilesets/unused_whirl_islands_collision.asm
@@ -0,0 +1,128 @@
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll TALL_GRASS_10, TALL_GRASS_10, TALL_GRASS_10, TALL_GRASS_10 ; 04
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05
+ tilecoll WALL, WALL, WALL, WALL ; 06
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08
+ tilecoll WALL, WALL, WALL, WALL ; 09
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a
+ tilecoll WALL, WALL, WALL, WALL ; 0b
+ tilecoll WARP_CARPET_LEFT, FLOOR, WARP_CARPET_LEFT, FLOOR ; 0c
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 0d
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e
+ tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 0f
+ tilecoll WALL, WALL, WALL, WALL ; 10
+ tilecoll WALL, WALL, WALL, WALL ; 11
+ tilecoll WALL, WALL, WALL, WALL ; 12
+ tilecoll WALL, WALL, WALL, WALL ; 13
+ tilecoll WALL, WALL, WALL, WALL ; 14
+ tilecoll WALL, WALL, WALL, DOOR ; 15
+ tilecoll WALL, WALL, WALL, WALL ; 16
+ tilecoll WALL, WALL, WALL, DOOR ; 17
+ tilecoll WALL, WALL, TOWN_MAP, WALL ; 18
+ tilecoll WALL, WALL, WALL, WALL ; 19
+ tilecoll WALL, WALL, WALL, WALL ; 1a
+ tilecoll WALL, WALL, WALL, DOOR ; 1b
+ tilecoll WALL, WALL, TOWN_MAP, WALL ; 1c
+ tilecoll WALL, WALL, WALL, WALL ; 1d
+ tilecoll WALL, WALL, DOOR, WALL ; 1e
+ tilecoll WALL, WALL, WALL, WALL ; 1f
+ tilecoll WALL, WALL, WALL, WALL ; 20
+ tilecoll WALL, WALL, WALL, WALL ; 21
+ tilecoll WALL, WALL, WALL, WALL ; 22
+ tilecoll WALL, WALL, WALL, WALL ; 23
+ tilecoll WALL, WALL, WALL, WALL ; 24
+ tilecoll WALL, WALL, WALL, WALL ; 25
+ tilecoll WALL, WALL, WALL, WALL ; 26
+ tilecoll WALL, WALL, WALL, WALL ; 27
+ tilecoll WALL, WALL, WALL, WALL ; 28
+ tilecoll WALL, WALL, WALL, DOOR ; 29
+ tilecoll WALL, WALL, WALL, WALL ; 2a
+ tilecoll WALL, WALL, WALL, DOOR ; 2b
+ tilecoll WALL, WALL, WALL, WALL ; 2c
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 2d
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 2e
+ tilecoll WALL, WALL, WALL, DOOR ; 2f
+ tilecoll WALL, WALL, WALL, WALL ; 30
+ tilecoll BUOY, BUOY, BUOY, WATER_21 ; 31
+ tilecoll BUOY, BUOY, WATER_21, WATER_21 ; 32
+ tilecoll BUOY, BUOY, WATER_21, BUOY ; 33
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 34
+ tilecoll BUOY, WATER_21, BUOY, WATER_21 ; 35
+ tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 36
+ tilecoll WATER_21, BUOY, WATER_21, BUOY ; 37
+ tilecoll WALL, WALL, WALL, WALL ; 38
+ tilecoll BUOY, WATER_21, BUOY, BUOY ; 39
+ tilecoll WATER_21, WATER_21, BUOY, BUOY ; 3a
+ tilecoll WATER_21, BUOY, BUOY, BUOY ; 3b
+ tilecoll WALL, WALL, WALL, WALL ; 3c
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 3d
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 3e
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 3f
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 40
+ tilecoll WALL, WALL, WALL, FLOOR ; 41
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 42
+ tilecoll WALL, WALL, FLOOR, WALL ; 43
+ tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 44
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 45
+ tilecoll TOWN_MAP, FLOOR, FLOOR, FLOOR ; 46
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 47
+ tilecoll FLOOR, FLOOR, FLOOR, TOWN_MAP ; 48
+ tilecoll WALL, FLOOR, WALL, WALL ; 49
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 4a
+ tilecoll FLOOR, WALL, WALL, WALL ; 4b
+ tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 4c
+ tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 4d
+ tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 4e
+ tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 4f
+ tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 50
+ tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 51
+ tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 52
+ tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 53
+ tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 54
+ tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 55
+ tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 56
+ tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 57
+ tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 58
+ tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 59
+ tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 5a
+ tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 5b
+ tilecoll WALL, CUT_TREE, FLOOR, FLOOR ; 5c
+ tilecoll WALL, WALL, WALL, FLOOR ; 5d
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 5e
+ tilecoll WALL, WALL, FLOOR, WALL ; 5f
+ tilecoll FLOOR, WALL, FLOOR, CUT_TREE ; 60
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 61
+ tilecoll WALL, WALL, WALL, WALL ; 62
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 63
+ tilecoll FLOOR, FLOOR, CUT_TREE, WALL ; 64
+ tilecoll WALL, FLOOR, WALL, WALL ; 65
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 66
+ tilecoll FLOOR, WALL, WALL, WALL ; 67
+ tilecoll CUT_TREE, FLOOR, WALL, FLOOR ; 68
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 69
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 6a
+ tilecoll WALL, UP_WALL, WALL, FLOOR ; 6b
+ tilecoll UP_WALL, WALL, FLOOR, WALL ; 6c
+ tilecoll WALL, FLOOR, WALL, WALL ; 6d
+ tilecoll FLOOR, WALL, WALL, WALL ; 6e
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 6f
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 70
+ tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 71
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 72
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 73
+ tilecoll FLOOR, FLOOR, DOOR, WALL ; 74
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 75
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 76
+ tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 77
+ tilecoll WALL, WALL, WALL, WALL ; 78
+ tilecoll WALL, WALL, WALL, WALL ; 79
+ tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 7a
+ tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 7b
+ tilecoll WALL, WALL, WALL, WALL ; 7c
+ tilecoll WALL, WALL, WALL, WALL ; 7d
+ tilecoll WALL, WALL, WALL, WALL ; 7e
+ tilecoll WALL, WALL, WALL, WALL ; 7f
+ tilecoll WALL, WALL, WALL, WALL ; 80
diff --git a/tilesets/unused_30_metatiles.bin b/tilesets/unused_whirl_islands_metatiles.bin
index b70f1a0e6..b70f1a0e6 100644
--- a/tilesets/unused_30_metatiles.bin
+++ b/tilesets/unused_whirl_islands_metatiles.bin
Binary files differ
diff --git a/tilesets/whirl_islands_collision.asm b/tilesets/whirl_islands_collision.asm
new file mode 100644
index 000000000..3d5e0ae05
--- /dev/null
+++ b/tilesets/whirl_islands_collision.asm
@@ -0,0 +1,64 @@
+ tilecoll WALL, WALL, WALL, WALL ; 01
+ tilecoll WALL, WALL, WALL, WALL ; 02
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
+ tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 04
+ tilecoll WALL, UP_WALL, WALL, FLOOR ; 05
+ tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 06
+ tilecoll UP_WALL, WALL, FLOOR, WALL ; 07
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 08
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 09
+ tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 0b
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 0c
+ tilecoll WALL, FLOOR, WALL, WALL ; 0d
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 0e
+ tilecoll FLOOR, WALL, WALL, WALL ; 0f
+ tilecoll WATER, WATER, WATER, WATER ; 10
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 11
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 12
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 13
+ tilecoll FLOOR, FLOOR, WALL, CAVE ; 14
+ tilecoll UP_WALL, UP_WALL, FLOOR, LADDER ; 15
+ tilecoll UP_WALL, UP_WALL, FLOOR, LADDER ; 16
+ tilecoll WALL, FLOOR, WALL, WARP_CARPET_DOWN ; 17
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 18
+ tilecoll WALL, WALL, WALL, FLOOR ; 19
+ tilecoll WALL, WALL, FLOOR, FLOOR ; 1a
+ tilecoll WALL, WALL, FLOOR, WALL ; 1b
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 1c
+ tilecoll WALL, FLOOR, WALL, FLOOR ; 1d
+ tilecoll WALL, WALL, WALL, WALL ; 1e
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 1f
+ tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 20
+ tilecoll WALL, FLOOR, WALL, WALL ; 21
+ tilecoll FLOOR, FLOOR, WALL, WALL ; 22
+ tilecoll FLOOR, WALL, WALL, WALL ; 23
+ tilecoll UP_WALL, WALL, FLOOR, FLOOR ; 24
+ tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 25
+ tilecoll WATER, WATER, WATER, WATER ; 26
+ tilecoll WATER, WATER, WATER, WATER ; 27
+ tilecoll WATER, WATER, WATER, WATER ; 28
+ tilecoll WALL, FLOOR, FLOOR, FLOOR ; 29
+ tilecoll FLOOR, FLOOR, WALL, FLOOR ; 2a
+ tilecoll FLOOR, WALL, FLOOR, FLOOR ; 2b
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 2c
+ tilecoll WATERFALL, WATERFALL, WATERFALL, WATERFALL ; 2d
+ tilecoll WALL, WALL, WALL, WALL ; 2e
+ tilecoll WALL, WALL, WALL, WALL ; 2f
+ tilecoll WALL, WALL, WALL, WALL ; 30
+ tilecoll FLOOR, FLOOR, FLOOR, WALL ; 31
+ tilecoll WALL, WALL, WALL, WALL ; 32
+ tilecoll WATER, WATER, WATER, WATER ; 33
+ tilecoll WATER, WATER, WATER, WATER ; 34
+ tilecoll WALL, WALL, WALL, WALL ; 35
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 36
+ tilecoll FLOOR, WALL, FLOOR, WALL ; 37
+ tilecoll WALL, WALL, WALL, CAVE ; 38
+ tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 39
+ tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 3a
+ tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 3b
+ tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 3c
+ tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 3d
+ tilecoll WATER, WATER, WATER, WATER ; 3e
+ tilecoll WATER, WATER, WATER, WATER ; 3f
+ tilecoll FLOOR, FLOOR, PIT, FLOOR ; 40
diff --git a/tilesets/30_metatiles.bin b/tilesets/whirl_islands_metatiles.bin
index a41b5b080..a41b5b080 100644
--- a/tilesets/30_metatiles.bin
+++ b/tilesets/whirl_islands_metatiles.bin
diff --git a/tilesets/30_palette_map.asm b/tilesets/whirl_islands_palette_map.asm
index 73c09ebe5..73c09ebe5 100644
--- a/tilesets/30_palette_map.asm
+++ b/tilesets/whirl_islands_palette_map.asm
diff --git a/compare.sh b/tools/compare.sh
index d013a88ab..d013a88ab 100755
--- a/compare.sh
+++ b/tools/compare.sh
diff --git a/compare2.sh b/tools/compare2.sh
index 64695229e..64695229e 100755
--- a/compare2.sh
+++ b/tools/compare2.sh
diff --git a/tools/toc.py b/tools/toc.py
new file mode 100644
index 000000000..9bdc8cca6
--- /dev/null
+++ b/tools/toc.py
@@ -0,0 +1,89 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+"""
+Usage: python3 toc.py [-n] files.md...
+Replace a "## TOC" heading in a Markdown file with a table of contents,
+generated from the other headings in the file. Supports multiple files.
+Headings must start with "##" signs to be detected.
+"""
+
+import sys
+import re
+from collections import namedtuple
+
+toc_name = 'Contents'
+valid_toc_headings = {'## TOC', '##TOC'}
+
+TocItem = namedtuple('TocItem', ['name', 'anchor', 'level'])
+punctuation_regexp = re.compile(r'[^\w\- ]+')
+
+def name_to_anchor(name):
+ # GitHub's algorithm for generating anchors from headings
+ # https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/toc_filter.rb
+ anchor = name.strip().lower() # lowercase
+ anchor = re.sub(punctuation_regexp, '', anchor) # remove punctuation
+ anchor = anchor.replace(' ', '-') # replace spaces with dash
+ return anchor
+
+def get_toc_index(lines):
+ toc_index = None
+ for i, line in enumerate(lines):
+ if line.rstrip() in valid_toc_headings:
+ toc_index = i
+ break
+ return toc_index
+
+def get_toc_items(lines, toc_index):
+ for i, line in enumerate(lines):
+ if i <= toc_index:
+ continue
+ if line.startswith('##'):
+ name = line.lstrip('#')
+ level = len(line) - len(name) - len('##')
+ name = name.strip()
+ anchor = name_to_anchor(name)
+ yield TocItem(name, anchor, level)
+
+def toc_string(toc_items):
+ lines = ['## %s' % toc_name, '']
+ for name, anchor, level in toc_items:
+ padding = ' ' * level
+ line = '%s- [%s](#%s)' % (padding, name, anchor)
+ lines.append(line)
+ return '\n'.join(lines) + '\n'
+
+def add_toc(filename):
+ with open(filename, 'r', encoding='utf-8') as f:
+ lines = f.readlines()
+ toc_index = get_toc_index(lines)
+ if toc_index is None:
+ return None # no TOC heading
+ toc_items = list(get_toc_items(lines, toc_index))
+ if not toc_items:
+ return False # no content headings
+ with open(filename, 'w', encoding='utf-8') as f:
+ for i, line in enumerate(lines):
+ if i == toc_index:
+ f.write(toc_string(toc_items))
+ else:
+ f.write(line)
+ return True # OK
+
+def main():
+ if len(sys.argv) < 2:
+ print('*** ERROR: No filenames specified')
+ print(__doc__)
+ exit(1)
+ for filename in sys.argv[1:]:
+ print(filename)
+ result = add_toc(filename)
+ if result is None:
+ print('*** WARNING: No "## TOC" heading found')
+ elif result is False:
+ print('*** WARNING: No content headings found')
+ else:
+ print('OK')
+
+if __name__ == '__main__':
+ main()
diff --git a/trainers/attributes.asm b/trainers/attributes.asm
deleted file mode 100644
index c8cdcc100..000000000
--- a/trainers/attributes.asm
+++ /dev/null
@@ -1,405 +0,0 @@
-TrainerClassAttributes: ; 3959c
-
-; Falkner
- db 0, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Whitney
- db 0, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Bugsy
- db 0, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Morty
- db 0, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Pryce
- db HYPER_POTION, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Jasmine
- db HYPER_POTION, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Chuck
- db FULL_HEAL, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Clair
- db FULL_HEAL, HYPER_POTION ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Rival1
- db 0, 0 ; items
- db 15 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Pokemon Prof
- db 0, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_AGGRESSIVE + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Will
- db MAX_POTION, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Cal
- db 0, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Bruno
- db MAX_POTION, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Karen
- db FULL_HEAL, MAX_POTION ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Koga
- db FULL_HEAL, FULL_RESTORE ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Champion
- db FULL_HEAL, FULL_RESTORE ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Brock
- db HYPER_POTION, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Misty
- db FULL_HEAL, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Lt Surge
- db HYPER_POTION, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Scientist
- db 0, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_TYPES + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Erika
- db HYPER_POTION, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Youngster
- db 0, 0 ; items
- db 4 ; base reward
- dw AI_BASIC + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Schoolboy
- db 0, 0 ; items
- db 8 ; base reward
- dw AI_BASIC + AI_SETUP + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS
- dw CONTEXT_USE + SWITCH_OFTEN
-
-; Bird Keeper
- db 0, 0 ; items
- db 6 ; base reward
- dw AI_BASIC + AI_TYPES + AI_OFFENSIVE + AI_OPPORTUNIST + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Lass
- db 0, 0 ; items
- db 6 ; base reward
- dw AI_BASIC + AI_CAUTIOUS + AI_STATUS
- dw CONTEXT_USE + SWITCH_OFTEN
-
-; Janine
- db DIRE_HIT, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Cooltrainerm
- db 0, 0 ; items
- db 12 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Cooltrainerf
- db 0, 0 ; items
- db 12 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Beauty
- db 0, 0 ; items
- db 22 ; base reward
- dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Pokemaniac
- db 0, 0 ; items
- db 15 ; base reward
- dw AI_BASIC + AI_SETUP + AI_OFFENSIVE + AI_AGGRESSIVE + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Gruntm
- db 0, 0 ; items
- db 10 ; base reward
- dw AI_BASIC + AI_SETUP + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Gentleman
- db 0, 0 ; items
- db 18 ; base reward
- dw AI_BASIC + AI_SETUP + AI_AGGRESSIVE + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Skier
- db 0, 0 ; items
- db 18 ; base reward
- dw AI_BASIC + AI_SETUP + AI_TYPES + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Teacher
- db 0, 0 ; items
- db 18 ; base reward
- dw AI_BASIC + AI_OPPORTUNIST + AI_AGGRESSIVE + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Sabrina
- db HYPER_POTION, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Bug Catcher
- db 0, 0 ; items
- db 4 ; base reward
- dw AI_BASIC + AI_SETUP + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Fisher
- db 0, 0 ; items
- db 10 ; base reward
- dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS
- dw CONTEXT_USE + SWITCH_OFTEN
-
-; Swimmerm
- db 0, 0 ; items
- db 2 ; base reward
- dw AI_BASIC + AI_SETUP + AI_TYPES + AI_OFFENSIVE + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Swimmerf
- db 0, 0 ; items
- db 5 ; base reward
- dw AI_BASIC + AI_SETUP + AI_TYPES + AI_CAUTIOUS + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Sailor
- db 0, 0 ; items
- db 10 ; base reward
- dw AI_BASIC + AI_OFFENSIVE + AI_OPPORTUNIST + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Super Nerd
- db 0, 0 ; items
- db 8 ; base reward
- dw AI_BASIC + AI_TYPES + AI_SMART + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Rival2
- db 0, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Guitarist
- db 0, 0 ; items
- db 8 ; base reward
- dw AI_BASIC + AI_SETUP + AI_TYPES + AI_CAUTIOUS + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Hiker
- db 0, 0 ; items
- db 8 ; base reward
- dw AI_BASIC + AI_OFFENSIVE + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Biker
- db 0, 0 ; items
- db 8 ; base reward
- dw AI_BASIC + AI_TYPES + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Blaine
- db MAX_POTION, FULL_HEAL ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Burglar
- db 0, 0 ; items
- db 22 ; base reward
- dw AI_BASIC + AI_OFFENSIVE + AI_CAUTIOUS + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Firebreather
- db 0, 0 ; items
- db 12 ; base reward
- dw AI_BASIC + AI_SETUP + AI_OFFENSIVE + AI_OPPORTUNIST + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Juggler
- db 0, 0 ; items
- db 10 ; base reward
- dw AI_BASIC + AI_TYPES + AI_SMART + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Blackbelt T
- db 0, 0 ; items
- db 6 ; base reward
- dw AI_BASIC + AI_OFFENSIVE + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Executivem
- db 0, 0 ; items
- db 18 ; base reward
- dw AI_BASIC + AI_SETUP + AI_TYPES + AI_SMART + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Psychic T
- db 0, 0 ; items
- db 8 ; base reward
- dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Picnicker
- db 0, 0 ; items
- db 5 ; base reward
- dw AI_BASIC + AI_CAUTIOUS + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Camper
- db 0, 0 ; items
- db 5 ; base reward
- dw AI_BASIC + AI_CAUTIOUS + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Executivef
- db 0, 0 ; items
- db 18 ; base reward
- dw AI_BASIC + AI_SETUP + AI_TYPES + AI_SMART + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Sage
- db 0, 0 ; items
- db 8 ; base reward
- dw AI_BASIC + AI_SETUP + AI_TYPES + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Medium
- db 0, 0 ; items
- db 10 ; base reward
- dw AI_BASIC + AI_SETUP + AI_TYPES + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Boarder
- db 0, 0 ; items
- db 18 ; base reward
- dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Pokefanm
- db 0, 0 ; items
- db 20 ; base reward
- dw AI_BASIC + AI_TYPES + AI_SMART + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Kimono Girl
- db 0, 0 ; items
- db 18 ; base reward
- dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Twins
- db 0, 0 ; items
- db 5 ; base reward
- dw NO_AI
- dw CONTEXT_USE + SWITCH_OFTEN
-
-; Pokefanf
- db 0, 0 ; items
- db 20 ; base reward
- dw AI_BASIC + AI_TYPES + AI_SMART + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Red
- db FULL_RESTORE, FULL_RESTORE ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Blue
- db FULL_RESTORE, FULL_RESTORE ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Officer
- db 0, 0 ; items
- db 10 ; base reward
- dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_STATUS
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Gruntf
- db 0, 0 ; items
- db 10 ; base reward
- dw AI_BASIC + AI_TYPES + AI_OPPORTUNIST + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; Mysticalman
- db 0, 0 ; items
- db 25 ; base reward
- dw AI_BASIC + AI_SETUP + AI_SMART + AI_AGGRESSIVE + AI_CAUTIOUS + AI_STATUS + AI_RISKY
- dw CONTEXT_USE + SWITCH_SOMETIMES
-
-; 39771
diff --git a/trainers/dvs.asm b/trainers/dvs.asm
deleted file mode 100644
index 2975d60fe..000000000
--- a/trainers/dvs.asm
+++ /dev/null
@@ -1,92 +0,0 @@
-GetTrainerDVs: ; 270c4
-; Return the DVs of OtherTrainerClass in bc
-
- push hl
- ld a, [OtherTrainerClass]
- dec a
- ld c, a
- ld b, 0
-
- ld hl, TrainerClassDVs
- add hl, bc
- add hl, bc
-
- ld a, [hli]
- ld b, a
- ld c, [hl]
-
- pop hl
- ret
-; 270d6
-
-TrainerClassDVs: ; 270d6
- ; Atk Spd
- ; Def Spc
- db $9A, $77 ; falkner
- db $88, $88 ; bugsy
- db $98, $88 ; whitney
- db $98, $88 ; morty
- db $98, $88 ; pryce
- db $98, $88 ; jasmine
- db $98, $88 ; chuck
- db $7C, $DD ; clair
- db $DD, $DD ; rival1
- db $98, $88 ; pokemon prof
- db $DC, $DD ; will
- db $DC, $DD ; cal
- db $DC, $DD ; bruno
- db $7F, $DF ; karen
- db $DC, $DD ; koga
- db $DC, $DD ; champion
- db $98, $88 ; brock
- db $78, $88 ; misty
- db $98, $88 ; lt surge
- db $98, $88 ; scientist
- db $78, $88 ; erika
- db $98, $88 ; youngster
- db $98, $88 ; schoolboy
- db $98, $88 ; bird keeper
- db $58, $88 ; lass
- db $98, $88 ; janine
- db $D8, $C8 ; cooltrainerm
- db $7C, $C8 ; cooltrainerf
- db $69, $C8 ; beauty
- db $98, $88 ; pokemaniac
- db $D8, $A8 ; gruntm
- db $98, $88 ; gentleman
- db $98, $88 ; skier
- db $68, $88 ; teacher
- db $7D, $87 ; sabrina
- db $98, $88 ; bug catcher
- db $98, $88 ; fisher
- db $98, $88 ; swimmerm
- db $78, $88 ; swimmerf
- db $98, $88 ; sailor
- db $98, $88 ; super nerd
- db $98, $88 ; rival2
- db $98, $88 ; guitarist
- db $A8, $88 ; hiker
- db $98, $88 ; biker
- db $98, $88 ; blaine
- db $98, $88 ; burglar
- db $98, $88 ; firebreather
- db $98, $88 ; juggler
- db $98, $88 ; blackbelt
- db $D8, $A8 ; executivem
- db $98, $88 ; psychic
- db $6A, $A8 ; picnicker
- db $98, $88 ; camper
- db $7E, $A8 ; executivef
- db $98, $88 ; sage
- db $78, $88 ; medium
- db $98, $88 ; boarder
- db $98, $88 ; pokefanm
- db $68, $8A ; kimono girl
- db $68, $A8 ; twins
- db $6D, $88 ; pokefanf
- db $FD, $DE ; red
- db $9D, $DD ; blue
- db $98, $88 ; officer
- db $7E, $A8 ; gruntf
- db $98, $88 ; mysticalman
-; 2715c
diff --git a/trainers/trainers.asm b/trainers/trainers.asm
deleted file mode 100644
index 2b4a68475..000000000
--- a/trainers/trainers.asm
+++ /dev/null
@@ -1,8829 +0,0 @@
-Trainers:
-
-; All trainers follow a basic structure:
- ; Name
- ; String in format "TEXT@"
- ; Type
- ; 0: Level, species
- ; 1: Level, species, moves
- ; 2: Level, species, item
- ; 3: Level, species, item, moves
- ; Party
- ; Up to six monsters following the data type
- ; $ff
-
-
-FalknerGroup:
-; ================================
-; ================
-
- ; FALKNER (1)
- db "FALKNER@"
- db 1 ; moves
-
- ; party
-
- db 7, PIDGEY
- db TACKLE
- db MUD_SLAP
- db 0
- db 0
-
- db 9, PIDGEOTTO
- db TACKLE
- db MUD_SLAP
- db GUST
- db 0
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-WhitneyGroup:
-; ================================
-; ================
-
- ; WHITNEY (1)
- db "WHITNEY@"
- db 1 ; moves
-
- ; party
-
- db 18, CLEFAIRY
- db DOUBLESLAP
- db MIMIC
- db ENCORE
- db METRONOME
-
- db 20, MILTANK
- db ROLLOUT
- db ATTRACT
- db STOMP
- db MILK_DRINK
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-BugsyGroup:
-; ================================
-; ================
-
- ; BUGSY (1)
- db "BUGSY@"
- db 1 ; moves
-
- ; party
-
- db 14, METAPOD
- db TACKLE
- db STRING_SHOT
- db HARDEN
- db 0
-
- db 14, KAKUNA
- db POISON_STING
- db STRING_SHOT
- db HARDEN
- db 0
-
- db 16, SCYTHER
- db QUICK_ATTACK
- db LEER
- db FURY_CUTTER
- db 0
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-MortyGroup:
-; ================================
-; ================
-
- ; MORTY (1)
- db "MORTY@"
- db 1 ; moves
-
- ; party
-
- db 21, GASTLY
- db LICK
- db SPITE
- db MEAN_LOOK
- db CURSE
-
- db 21, HAUNTER
- db HYPNOSIS
- db MIMIC
- db CURSE
- db NIGHT_SHADE
-
- db 25, GENGAR
- db HYPNOSIS
- db SHADOW_BALL
- db MEAN_LOOK
- db DREAM_EATER
-
- db 23, HAUNTER
- db SPITE
- db MEAN_LOOK
- db MIMIC
- db NIGHT_SHADE
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-PryceGroup:
-; ================================
-; ================
-
- ; PRYCE (1)
- db "PRYCE@"
- db 1 ; moves
-
- ; party
-
- db 27, SEEL
- db HEADBUTT
- db ICY_WIND
- db AURORA_BEAM
- db REST
-
- db 29, DEWGONG
- db HEADBUTT
- db ICY_WIND
- db AURORA_BEAM
- db REST
-
- db 31, PILOSWINE
- db ICY_WIND
- db FURY_ATTACK
- db MIST
- db BLIZZARD
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-JasmineGroup:
-; ================================
-; ================
-
- ; JASMINE (1)
- db "JASMINE@"
- db 1 ; moves
-
- ; party
-
- db 30, MAGNEMITE
- db THUNDERBOLT
- db SUPERSONIC
- db SONICBOOM
- db THUNDER_WAVE
-
- db 30, MAGNEMITE
- db THUNDERBOLT
- db SUPERSONIC
- db SONICBOOM
- db THUNDER_WAVE
-
- db 35, STEELIX
- db SCREECH
- db SUNNY_DAY
- db ROCK_THROW
- db IRON_TAIL
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-ChuckGroup:
-; ================================
-; ================
-
- ; CHUCK (1)
- db "CHUCK@"
- db 1 ; moves
-
- ; party
-
- db 27, PRIMEAPE
- db LEER
- db RAGE
- db KARATE_CHOP
- db FURY_SWIPES
-
- db 30, POLIWRATH
- db HYPNOSIS
- db MIND_READER
- db SURF
- db DYNAMICPUNCH
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-ClairGroup:
-; ================================
-; ================
-
- ; CLAIR (1)
- db "CLAIR@"
- db 1 ; moves
-
- ; party
-
- db 37, DRAGONAIR
- db THUNDER_WAVE
- db SURF
- db SLAM
- db DRAGONBREATH
-
- db 37, DRAGONAIR
- db THUNDER_WAVE
- db THUNDERBOLT
- db SLAM
- db DRAGONBREATH
-
- db 37, DRAGONAIR
- db THUNDER_WAVE
- db ICE_BEAM
- db SLAM
- db DRAGONBREATH
-
- db 40, KINGDRA
- db SMOKESCREEN
- db SURF
- db HYPER_BEAM
- db DRAGONBREATH
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-Rival1Group:
-; ================================
-; ================
-
- ; RIVAL1 (1)
- db "?@"
- db 0 ; normal
-
- ; party
- db 5, CHIKORITA
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (2)
- db "?@"
- db 0 ; normal
-
- ; party
- db 5, CYNDAQUIL
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (3)
- db "?@"
- db 0 ; normal
-
- ; party
- db 5, TOTODILE
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (4)
- db "?@"
- db 0 ; normal
-
- ; party
- db 12, GASTLY
- db 14, ZUBAT
- db 16, BAYLEEF
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (5)
- db "?@"
- db 0 ; normal
-
- ; party
- db 12, GASTLY
- db 14, ZUBAT
- db 16, QUILAVA
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (6)
- db "?@"
- db 0 ; normal
-
- ; party
- db 12, GASTLY
- db 14, ZUBAT
- db 16, CROCONAW
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (7)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 20, HAUNTER
- db LICK
- db SPITE
- db MEAN_LOOK
- db CURSE
-
- db 18, MAGNEMITE
- db TACKLE
- db THUNDERSHOCK
- db SUPERSONIC
- db SONICBOOM
-
- db 20, ZUBAT
- db LEECH_LIFE
- db SUPERSONIC
- db BITE
- db CONFUSE_RAY
-
- db 22, BAYLEEF
- db GROWL
- db REFLECT
- db RAZOR_LEAF
- db POISONPOWDER
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (8)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 20, HAUNTER
- db LICK
- db SPITE
- db MEAN_LOOK
- db CURSE
-
- db 18, MAGNEMITE
- db TACKLE
- db THUNDERSHOCK
- db SUPERSONIC
- db SONICBOOM
-
- db 20, ZUBAT
- db LEECH_LIFE
- db SUPERSONIC
- db BITE
- db CONFUSE_RAY
-
- db 22, QUILAVA
- db LEER
- db SMOKESCREEN
- db EMBER
- db QUICK_ATTACK
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (9)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 20, HAUNTER
- db LICK
- db SPITE
- db MEAN_LOOK
- db CURSE
-
- db 18, MAGNEMITE
- db TACKLE
- db THUNDERSHOCK
- db SUPERSONIC
- db SONICBOOM
-
- db 20, ZUBAT
- db LEECH_LIFE
- db SUPERSONIC
- db BITE
- db CONFUSE_RAY
-
- db 22, CROCONAW
- db LEER
- db RAGE
- db WATER_GUN
- db BITE
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (10)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 30, GOLBAT
- db LEECH_LIFE
- db BITE
- db CONFUSE_RAY
- db WING_ATTACK
-
- db 28, MAGNEMITE
- db TACKLE
- db THUNDERSHOCK
- db SONICBOOM
- db THUNDER_WAVE
-
- db 30, HAUNTER
- db LICK
- db MEAN_LOOK
- db CURSE
- db SHADOW_BALL
-
- db 32, SNEASEL
- db LEER
- db QUICK_ATTACK
- db SCREECH
- db FAINT_ATTACK
-
- db 32, MEGANIUM
- db REFLECT
- db RAZOR_LEAF
- db POISONPOWDER
- db BODY_SLAM
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (11)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 30, GOLBAT
- db LEECH_LIFE
- db BITE
- db CONFUSE_RAY
- db WING_ATTACK
-
- db 28, MAGNEMITE
- db TACKLE
- db THUNDERSHOCK
- db SONICBOOM
- db THUNDER_WAVE
-
- db 30, HAUNTER
- db LICK
- db MEAN_LOOK
- db CURSE
- db SHADOW_BALL
-
- db 32, SNEASEL
- db LEER
- db QUICK_ATTACK
- db SCREECH
- db FAINT_ATTACK
-
- db 32, QUILAVA
- db SMOKESCREEN
- db EMBER
- db QUICK_ATTACK
- db FLAME_WHEEL
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (12)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 30, GOLBAT
- db LEECH_LIFE
- db BITE
- db CONFUSE_RAY
- db WING_ATTACK
-
- db 28, MAGNEMITE
- db TACKLE
- db THUNDERSHOCK
- db SONICBOOM
- db THUNDER_WAVE
-
- db 30, HAUNTER
- db LICK
- db MEAN_LOOK
- db CURSE
- db SHADOW_BALL
-
- db 32, SNEASEL
- db LEER
- db QUICK_ATTACK
- db SCREECH
- db FAINT_ATTACK
-
- db 32, FERALIGATR
- db RAGE
- db WATER_GUN
- db BITE
- db SCARY_FACE
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (13)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 34, SNEASEL
- db QUICK_ATTACK
- db SCREECH
- db FAINT_ATTACK
- db FURY_CUTTER
-
- db 36, GOLBAT
- db LEECH_LIFE
- db BITE
- db CONFUSE_RAY
- db WING_ATTACK
-
- db 35, MAGNETON
- db THUNDERSHOCK
- db SONICBOOM
- db THUNDER_WAVE
- db SWIFT
-
- db 35, HAUNTER
- db MEAN_LOOK
- db CURSE
- db SHADOW_BALL
- db CONFUSE_RAY
-
- db 35, KADABRA
- db DISABLE
- db PSYBEAM
- db RECOVER
- db FUTURE_SIGHT
-
- db 38, MEGANIUM
- db REFLECT
- db RAZOR_LEAF
- db POISONPOWDER
- db BODY_SLAM
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (14)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 34, SNEASEL
- db QUICK_ATTACK
- db SCREECH
- db FAINT_ATTACK
- db FURY_CUTTER
-
- db 36, GOLBAT
- db LEECH_LIFE
- db BITE
- db CONFUSE_RAY
- db WING_ATTACK
-
- db 35, MAGNETON
- db THUNDERSHOCK
- db SONICBOOM
- db THUNDER_WAVE
- db SWIFT
-
- db 35, HAUNTER
- db MEAN_LOOK
- db CURSE
- db SHADOW_BALL
- db CONFUSE_RAY
-
- db 35, KADABRA
- db DISABLE
- db PSYBEAM
- db RECOVER
- db FUTURE_SIGHT
-
- db 38, TYPHLOSION
- db SMOKESCREEN
- db EMBER
- db QUICK_ATTACK
- db FLAME_WHEEL
-
- db $ff ; end
-
-; ================
-
- ; RIVAL1 (15)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 34, SNEASEL
- db QUICK_ATTACK
- db SCREECH
- db FAINT_ATTACK
- db FURY_CUTTER
-
- db 36, GOLBAT
- db LEECH_LIFE
- db BITE
- db CONFUSE_RAY
- db WING_ATTACK
-
- db 34, MAGNETON
- db THUNDERSHOCK
- db SONICBOOM
- db THUNDER_WAVE
- db SWIFT
-
- db 35, HAUNTER
- db MEAN_LOOK
- db CURSE
- db SHADOW_BALL
- db CONFUSE_RAY
-
- db 35, KADABRA
- db DISABLE
- db PSYBEAM
- db RECOVER
- db FUTURE_SIGHT
-
- db 38, FERALIGATR
- db RAGE
- db WATER_GUN
- db SCARY_FACE
- db SLASH
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-PokemonProfGroup:
-; ================================
-; ================
-; ================================
-
-
-WillGroup:
-; ================================
-; ================
-
- ; WILL (1)
- db "WILL@"
- db 1 ; moves
-
- ; party
-
- db 40, XATU
- db QUICK_ATTACK
- db FUTURE_SIGHT
- db CONFUSE_RAY
- db PSYCHIC_M
-
- db 41, JYNX
- db DOUBLESLAP
- db LOVELY_KISS
- db ICE_PUNCH
- db PSYCHIC_M
-
- db 41, EXEGGUTOR
- db REFLECT
- db LEECH_SEED
- db EGG_BOMB
- db PSYCHIC_M
-
- db 41, SLOWBRO
- db CURSE
- db AMNESIA
- db BODY_SLAM
- db PSYCHIC_M
-
- db 42, XATU
- db QUICK_ATTACK
- db FUTURE_SIGHT
- db CONFUSE_RAY
- db PSYCHIC_M
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-PKMNTrainerGroup:
-; ================================
-; ================
-
- ; CAL (1)
- db "CAL@"
- db 0 ; normal
-
- ; party
- db 10, CHIKORITA
- db 10, CYNDAQUIL
- db 10, TOTODILE
-
- db $ff ; end
-
-; ================
-
- ; CAL (2)
- db "CAL@"
- db 0 ; normal
-
- ; party
- db 30, BAYLEEF
- db 30, QUILAVA
- db 30, CROCONAW
-
- db $ff ; end
-
-; ================
-
- ; CAL (3)
- db "CAL@"
- db 0 ; normal
-
- ; party
- db 50, MEGANIUM
- db 50, TYPHLOSION
- db 50, FERALIGATR
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-BrunoGroup:
-; ================================
-; ================
-
- ; BRUNO (1)
- db "BRUNO@"
- db 1 ; moves
-
- ; party
-
- db 42, HITMONTOP
- db PURSUIT
- db QUICK_ATTACK
- db DIG
- db DETECT
-
- db 42, HITMONLEE
- db SWAGGER
- db DOUBLE_KICK
- db HI_JUMP_KICK
- db FORESIGHT
-
- db 42, HITMONCHAN
- db THUNDERPUNCH
- db ICE_PUNCH
- db FIRE_PUNCH
- db MACH_PUNCH
-
- db 43, ONIX
- db BIND
- db EARTHQUAKE
- db SANDSTORM
- db ROCK_SLIDE
-
- db 46, MACHAMP
- db ROCK_SLIDE
- db FORESIGHT
- db VITAL_THROW
- db CROSS_CHOP
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-KarenGroup:
-; ================================
-; ================
-
- ; KAREN (1)
- db "KAREN@"
- db 1 ; moves
-
- ; party
-
- db 42, UMBREON
- db SAND_ATTACK
- db CONFUSE_RAY
- db FAINT_ATTACK
- db MEAN_LOOK
-
- db 42, VILEPLUME
- db STUN_SPORE
- db ACID
- db MOONLIGHT
- db PETAL_DANCE
-
- db 45, GENGAR
- db LICK
- db SPITE
- db CURSE
- db DESTINY_BOND
-
- db 44, MURKROW
- db QUICK_ATTACK
- db WHIRLWIND
- db PURSUIT
- db FAINT_ATTACK
-
- db 47, HOUNDOOM
- db ROAR
- db PURSUIT
- db FLAMETHROWER
- db CRUNCH
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-KogaGroup:
-; ================================
-; ================
-
- ; KOGA (1)
- db "KOGA@"
- db 1 ; moves
-
- ; party
-
- db 40, ARIADOS
- db DOUBLE_TEAM
- db SPIDER_WEB
- db BATON_PASS
- db GIGA_DRAIN
-
- db 41, VENOMOTH
- db SUPERSONIC
- db GUST
- db PSYCHIC_M
- db TOXIC
-
- db 43, FORRETRESS
- db PROTECT
- db SWIFT
- db EXPLOSION
- db SPIKES
-
- db 42, MUK
- db MINIMIZE
- db ACID_ARMOR
- db SLUDGE_BOMB
- db TOXIC
-
- db 44, CROBAT
- db DOUBLE_TEAM
- db QUICK_ATTACK
- db WING_ATTACK
- db TOXIC
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-ChampionGroup:
-; ================================
-; ================
-
- ; CHAMPION (1)
- db "LANCE@"
- db 1 ; moves
-
- ; party
-
- db 44, GYARADOS
- db FLAIL
- db RAIN_DANCE
- db SURF
- db HYPER_BEAM
-
- db 47, DRAGONITE
- db THUNDER_WAVE
- db TWISTER
- db THUNDER
- db HYPER_BEAM
-
- db 47, DRAGONITE
- db THUNDER_WAVE
- db TWISTER
- db BLIZZARD
- db HYPER_BEAM
-
- db 46, AERODACTYL
- db WING_ATTACK
- db ANCIENTPOWER
- db ROCK_SLIDE
- db HYPER_BEAM
-
- db 46, CHARIZARD
- db FLAMETHROWER
- db WING_ATTACK
- db SLASH
- db HYPER_BEAM
-
- db 50, DRAGONITE
- db FIRE_BLAST
- db SAFEGUARD
- db OUTRAGE
- db HYPER_BEAM
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-BrockGroup:
-; ================================
-; ================
-
- ; BROCK (1)
- db "BROCK@"
- db 1 ; moves
-
- ; party
-
- db 41, GRAVELER
- db DEFENSE_CURL
- db ROCK_SLIDE
- db ROLLOUT
- db EARTHQUAKE
-
- db 41, RHYHORN
- db FURY_ATTACK
- db SCARY_FACE
- db EARTHQUAKE
- db HORN_DRILL
-
- db 42, OMASTAR
- db BITE
- db SURF
- db PROTECT
- db SPIKE_CANNON
-
- db 44, ONIX
- db BIND
- db ROCK_SLIDE
- db BIDE
- db SANDSTORM
-
- db 42, KABUTOPS
- db SLASH
- db SURF
- db ENDURE
- db GIGA_DRAIN
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-MistyGroup:
-; ================================
-; ================
-
- ; MISTY (1)
- db "MISTY@"
- db 1 ; moves
-
- ; party
-
- db 42, GOLDUCK
- db SURF
- db DISABLE
- db PSYCH_UP
- db PSYCHIC_M
-
- db 42, QUAGSIRE
- db SURF
- db AMNESIA
- db EARTHQUAKE
- db RAIN_DANCE
-
- db 44, LAPRAS
- db SURF
- db PERISH_SONG
- db BLIZZARD
- db RAIN_DANCE
-
- db 47, STARMIE
- db SURF
- db CONFUSE_RAY
- db RECOVER
- db ICE_BEAM
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-LtSurgeGroup:
-; ================================
-; ================
-
- ; LT_SURGE (1)
- db "LT.SURGE@"
- db 1 ; moves
-
- ; party
-
- db 44, RAICHU
- db THUNDER_WAVE
- db QUICK_ATTACK
- db THUNDERBOLT
- db THUNDER
-
- db 40, ELECTRODE
- db SCREECH
- db DOUBLE_TEAM
- db SWIFT
- db EXPLOSION
-
- db 40, MAGNETON
- db LOCK_ON
- db DOUBLE_TEAM
- db SWIFT
- db ZAP_CANNON
-
- db 40, ELECTRODE
- db SCREECH
- db DOUBLE_TEAM
- db SWIFT
- db EXPLOSION
-
- db 46, ELECTABUZZ
- db QUICK_ATTACK
- db THUNDERPUNCH
- db LIGHT_SCREEN
- db THUNDER
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-ScientistGroup:
-; ================================
-; ================
-
- ; SCIENTIST (1)
- db "ROSS@"
- db 0 ; normal
-
- ; party
- db 22, KOFFING
- db 22, KOFFING
-
- db $ff ; end
-
-; ================
-
- ; SCIENTIST (2)
- db "MITCH@"
- db 0 ; normal
-
- ; party
- db 24, DITTO
-
- db $ff ; end
-
-; ================
-
- ; SCIENTIST (3)
- db "JED@"
- db 0 ; normal
-
- ; party
- db 20, MAGNEMITE
- db 20, MAGNEMITE
- db 20, MAGNEMITE
-
- db $ff ; end
-
-; ================
-
- ; SCIENTIST (4)
- db "MARC@"
- db 0 ; normal
-
- ; party
- db 27, MAGNEMITE
- db 27, MAGNEMITE
- db 27, MAGNEMITE
-
- db $ff ; end
-
-; ================
-
- ; SCIENTIST (5)
- db "RICH@"
- db 1 ; moves
-
- ; party
-
- db 30, PORYGON
- db CONVERSION
- db CONVERSION2
- db RECOVER
- db TRI_ATTACK
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-ErikaGroup:
-; ================================
-; ================
-
- ; ERIKA (1)
- db "ERIKA@"
- db 1 ; moves
-
- ; party
-
- db 42, TANGELA
- db VINE_WHIP
- db BIND
- db GIGA_DRAIN
- db SLEEP_POWDER
-
- db 41, JUMPLUFF
- db MEGA_DRAIN
- db LEECH_SEED
- db COTTON_SPORE
- db GIGA_DRAIN
-
- db 46, VICTREEBEL
- db SUNNY_DAY
- db SYNTHESIS
- db ACID
- db RAZOR_LEAF
-
- db 46, BELLOSSOM
- db SUNNY_DAY
- db SYNTHESIS
- db PETAL_DANCE
- db SOLARBEAM
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-YoungsterGroup:
-; ================================
-; ================
-
- ; YOUNGSTER (1)
- db "JOEY@"
- db 0 ; normal
-
- ; party
- db 4, RATTATA
-
- db $ff ; end
-
-; ================
-
- ; YOUNGSTER (2)
- db "MIKEY@"
- db 0 ; normal
-
- ; party
- db 2, PIDGEY
- db 4, RATTATA
-
- db $ff ; end
-
-; ================
-
- ; YOUNGSTER (3)
- db "ALBERT@"
- db 0 ; normal
-
- ; party
- db 6, RATTATA
- db 8, ZUBAT
-
- db $ff ; end
-
-; ================
-
- ; YOUNGSTER (4)
- db "GORDON@"
- db 0 ; normal
-
- ; party
- db 10, WOOPER
-
- db $ff ; end
-
-; ================
-
- ; YOUNGSTER (5)
- db "SAMUEL@"
- db 0 ; normal
-
- ; party
- db 7, RATTATA
- db 10, SANDSHREW
- db 8, SPEAROW
- db 8, SPEAROW
-
- db $ff ; end
-
-; ================
-
- ; YOUNGSTER (6)
- db "IAN@"
- db 0 ; normal
-
- ; party
- db 10, MANKEY
- db 12, DIGLETT
-
- db $ff ; end
-
-; ================
-
- ; YOUNGSTER (7)
- db "JOEY@"
- db 0 ; normal
-
- ; party
- db 15, RATTATA
-
- db $ff ; end
-
-; ================
-
- ; YOUNGSTER (8)
- db "JOEY@"
- db 1 ; moves
-
- ; party
-
- db 21, RATICATE
- db TAIL_WHIP
- db QUICK_ATTACK
- db HYPER_FANG
- db SCARY_FACE
-
- db $ff ; end
-
-; ================
-
- ; YOUNGSTER (9)
- db "WARREN@"
- db 0 ; normal
-
- ; party
- db 35, FEAROW
-
- db $ff ; end
-
-; ================
-
- ; YOUNGSTER (10)
- db "JIMMY@"
- db 0 ; normal
-
- ; party
- db 33, RATICATE
- db 33, ARBOK
-
- db $ff ; end
-
-; ================
-
- ; YOUNGSTER (11)
- db "OWEN@"
- db 0 ; normal
-
- ; party
- db 35, GROWLITHE
-
- db $ff ; end
-
-; ================
-
- ; YOUNGSTER (12)
- db "JASON@"
- db 0 ; normal
-
- ; party
- db 33, SANDSLASH
- db 33, CROBAT
-
- db $ff ; end
-
-; ================
-
- ; YOUNGSTER (13)
- db "JOEY@"
- db 1 ; moves
-
- ; party
-
- db 30, RATICATE
- db TAIL_WHIP
- db QUICK_ATTACK
- db HYPER_FANG
- db PURSUIT
-
- db $ff ; end
-
-; ================
-
- ; YOUNGSTER (14)
- db "JOEY@"
- db 1 ; moves
-
- ; party
-
- db 37, RATICATE
- db HYPER_BEAM
- db QUICK_ATTACK
- db HYPER_FANG
- db PURSUIT
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-SchoolboyGroup:
-; ================================
-; ================
-
- ; SCHOOLBOY (1)
- db "JACK@"
- db 0 ; normal
-
- ; party
- db 12, ODDISH
- db 15, VOLTORB
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (2)
- db "KIPP@"
- db 0 ; normal
-
- ; party
- db 27, VOLTORB
- db 27, MAGNEMITE
- db 31, VOLTORB
- db 31, MAGNETON
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (3)
- db "ALAN@"
- db 0 ; normal
-
- ; party
- db 16, TANGELA
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (4)
- db "JOHNNY@"
- db 0 ; normal
-
- ; party
- db 29, BELLSPROUT
- db 31, WEEPINBELL
- db 33, VICTREEBEL
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (5)
- db "DANNY@"
- db 0 ; normal
-
- ; party
- db 31, JYNX
- db 31, ELECTABUZZ
- db 31, MAGMAR
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (6)
- db "TOMMY@"
- db 0 ; normal
-
- ; party
- db 32, XATU
- db 34, ALAKAZAM
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (7)
- db "DUDLEY@"
- db 0 ; normal
-
- ; party
- db 35, ODDISH
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (8)
- db "JOE@"
- db 0 ; normal
-
- ; party
- db 33, TANGELA
- db 33, VAPOREON
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (9)
- db "BILLY@"
- db 0 ; normal
-
- ; party
- db 27, PARAS
- db 27, PARAS
- db 27, POLIWHIRL
- db 35, DITTO
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (10)
- db "CHAD@"
- db 0 ; normal
-
- ; party
- db 19, MR__MIME
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (11)
- db "NATE@"
- db 0 ; normal
-
- ; party
- db 32, LEDIAN
- db 32, EXEGGUTOR
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (12)
- db "RICKY@"
- db 0 ; normal
-
- ; party
- db 32, AIPOM
- db 32, DITTO
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (13)
- db "JACK@"
- db 0 ; normal
-
- ; party
- db 14, ODDISH
- db 17, VOLTORB
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (14)
- db "JACK@"
- db 0 ; normal
-
- ; party
- db 28, GLOOM
- db 31, ELECTRODE
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (15)
- db "ALAN@"
- db 0 ; normal
-
- ; party
- db 17, TANGELA
- db 17, YANMA
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (16)
- db "ALAN@"
- db 0 ; normal
-
- ; party
- db 20, NATU
- db 22, TANGELA
- db 20, QUAGSIRE
- db 25, YANMA
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (17)
- db "CHAD@"
- db 0 ; normal
-
- ; party
- db 19, MR__MIME
- db 19, MAGNEMITE
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (18)
- db "CHAD@"
- db 0 ; normal
-
- ; party
- db 27, MR__MIME
- db 31, MAGNETON
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (19)
- db "JACK@"
- db 0 ; normal
-
- ; party
- db 30, GLOOM
- db 33, GROWLITHE
- db 33, ELECTRODE
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (20)
- db "JACK@"
- db 1 ; moves
-
- ; party
-
- db 35, ELECTRODE
- db SCREECH
- db SONICBOOM
- db ROLLOUT
- db LIGHT_SCREEN
-
- db 35, GROWLITHE
- db SUNNY_DAY
- db LEER
- db TAKE_DOWN
- db FLAME_WHEEL
-
- db 37, VILEPLUME
- db SOLARBEAM
- db SLEEP_POWDER
- db ACID
- db MOONLIGHT
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (21)
- db "ALAN@"
- db 0 ; normal
-
- ; party
- db 27, NATU
- db 27, TANGELA
- db 30, QUAGSIRE
- db 30, YANMA
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (22)
- db "ALAN@"
- db 1 ; moves
-
- ; party
-
- db 35, XATU
- db PECK
- db NIGHT_SHADE
- db SWIFT
- db FUTURE_SIGHT
-
- db 32, TANGELA
- db POISONPOWDER
- db VINE_WHIP
- db BIND
- db MEGA_DRAIN
-
- db 32, YANMA
- db QUICK_ATTACK
- db DOUBLE_TEAM
- db SONICBOOM
- db SUPERSONIC
-
- db 35, QUAGSIRE
- db TAIL_WHIP
- db SLAM
- db AMNESIA
- db EARTHQUAKE
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (23)
- db "CHAD@"
- db 0 ; normal
-
- ; party
- db 30, MR__MIME
- db 34, MAGNETON
-
- db $ff ; end
-
-; ================
-
- ; SCHOOLBOY (24)
- db "CHAD@"
- db 1 ; moves
-
- ; party
-
- db 34, MR__MIME
- db PSYCHIC_M
- db LIGHT_SCREEN
- db REFLECT
- db ENCORE
-
- db 38, MAGNETON
- db ZAP_CANNON
- db THUNDER_WAVE
- db LOCK_ON
- db SWIFT
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-BirdKeeperGroup:
-; ================================
-; ================
-
- ; BIRD_KEEPER (1)
- db "ROD@"
- db 0 ; normal
-
- ; party
- db 7, PIDGEY
- db 7, PIDGEY
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (2)
- db "ABE@"
- db 0 ; normal
-
- ; party
- db 9, SPEAROW
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (3)
- db "BRYAN@"
- db 0 ; normal
-
- ; party
- db 12, PIDGEY
- db 14, PIDGEOTTO
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (4)
- db "THEO@"
- db 0 ; normal
-
- ; party
- db 17, PIDGEY
- db 15, PIDGEY
- db 19, PIDGEY
- db 15, PIDGEY
- db 15, PIDGEY
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (5)
- db "TOBY@"
- db 0 ; normal
-
- ; party
- db 15, DODUO
- db 16, DODUO
- db 17, DODUO
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (6)
- db "DENIS@"
- db 0 ; normal
-
- ; party
- db 18, SPEAROW
- db 20, FEAROW
- db 18, SPEAROW
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (7)
- db "VANCE@"
- db 0 ; normal
-
- ; party
- db 25, PIDGEOTTO
- db 25, PIDGEOTTO
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (8)
- db "HANK@"
- db 0 ; normal
-
- ; party
- db 12, PIDGEY
- db 34, PIDGEOT
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (9)
- db "ROY@"
- db 0 ; normal
-
- ; party
- db 29, FEAROW
- db 35, FEAROW
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (10)
- db "BORIS@"
- db 0 ; normal
-
- ; party
- db 30, DODUO
- db 28, DODUO
- db 32, DODRIO
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (11)
- db "BOB@"
- db 0 ; normal
-
- ; party
- db 34, NOCTOWL
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (12)
- db "JOSE@"
- db 0 ; normal
-
- ; party
- db 36, FARFETCH_D
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (13)
- db "PETER@"
- db 0 ; normal
-
- ; party
- db 6, PIDGEY
- db 6, PIDGEY
- db 8, SPEAROW
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (14)
- db "JOSE@"
- db 0 ; normal
-
- ; party
- db 34, FARFETCH_D
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (15)
- db "PERRY@"
- db 0 ; normal
-
- ; party
- db 34, FARFETCH_D
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (16)
- db "BRET@"
- db 0 ; normal
-
- ; party
- db 32, PIDGEOTTO
- db 32, FEAROW
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (17)
- db "JOSE@"
- db 1 ; moves
-
- ; party
-
- db 40, FARFETCH_D
- db FURY_ATTACK
- db DETECT
- db FLY
- db SLASH
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (18)
- db "VANCE@"
- db 0 ; normal
-
- ; party
- db 32, PIDGEOTTO
- db 32, PIDGEOTTO
-
- db $ff ; end
-
-; ================
-
- ; BIRD_KEEPER (19)
- db "VANCE@"
- db 1 ; moves
-
- ; party
-
- db 38, PIDGEOT
- db TOXIC
- db QUICK_ATTACK
- db WHIRLWIND
- db FLY
-
- db 38, PIDGEOT
- db SWIFT
- db DETECT
- db STEEL_WING
- db FLY
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-LassGroup:
-; ================================
-; ================
-
- ; LASS (1)
- db "CARRIE@"
- db 1 ; moves
-
- ; party
-
- db 18, SNUBBULL
- db SCARY_FACE
- db CHARM
- db BITE
- db LICK
-
- db $ff ; end
-
-; ================
-
- ; LASS (2)
- db "BRIDGET@"
- db 0 ; normal
-
- ; party
- db 15, JIGGLYPUFF
- db 15, JIGGLYPUFF
- db 15, JIGGLYPUFF
-
- db $ff ; end
-
-; ================
-
- ; LASS (3)
- db "ALICE@"
- db 0 ; normal
-
- ; party
- db 30, GLOOM
- db 34, ARBOK
- db 30, GLOOM
-
- db $ff ; end
-
-; ================
-
- ; LASS (4)
- db "KRISE@"
- db 0 ; normal
-
- ; party
- db 12, ODDISH
- db 15, CUBONE
-
- db $ff ; end
-
-; ================
-
- ; LASS (5)
- db "CONNIE@"
- db 0 ; normal
-
- ; party
- db 21, MARILL
-
- db $ff ; end
-
-; ================
-
- ; LASS (6)
- db "LINDA@"
- db 0 ; normal
-
- ; party
- db 30, BULBASAUR
- db 32, IVYSAUR
- db 34, VENUSAUR
-
- db $ff ; end
-
-; ================
-
- ; LASS (7)
- db "LAURA@"
- db 0 ; normal
-
- ; party
- db 28, GLOOM
- db 31, PIDGEOTTO
- db 31, BELLOSSOM
-
- db $ff ; end
-
-; ================
-
- ; LASS (8)
- db "SHANNON@"
- db 0 ; normal
-
- ; party
- db 29, PARAS
- db 29, PARAS
- db 32, PARASECT
-
- db $ff ; end
-
-; ================
-
- ; LASS (9)
- db "MICHELLE@"
- db 0 ; normal
-
- ; party
- db 32, SKIPLOOM
- db 33, HOPPIP
- db 34, JUMPLUFF
-
- db $ff ; end
-
-; ================
-
- ; LASS (10)
- db "DANA@"
- db 1 ; moves
-
- ; party
-
- db 18, FLAAFFY
- db TACKLE
- db GROWL
- db THUNDERSHOCK
- db THUNDER_WAVE
-
- db 18, PSYDUCK
- db SCRATCH
- db TAIL_WHIP
- db DISABLE
- db CONFUSION
-
- db $ff ; end
-
-; ================
-
- ; LASS (11)
- db "ELLEN@"
- db 0 ; normal
-
- ; party
- db 30, WIGGLYTUFF
- db 34, GRANBULL
-
- db $ff ; end
-
-; ================
-
- ; LASS (12)
- db "CONNIE@"
- db 0 ; normal
-
- ; party
- db 21, MARILL
-
- db $ff ; end
-
-; ================
-
- ; LASS (13)
- db "CONNIE@"
- db 0 ; normal
-
- ; party
- db 21, MARILL
-
- db $ff ; end
-
-; ================
-
- ; LASS (14)
- db "DANA@"
- db 1 ; moves
-
- ; party
-
- db 21, FLAAFFY
- db TACKLE
- db GROWL
- db THUNDERSHOCK
- db THUNDER_WAVE
-
- db 21, PSYDUCK
- db SCRATCH
- db TAIL_WHIP
- db DISABLE
- db CONFUSION
-
- db $ff ; end
-
-; ================
-
- ; LASS (15)
- db "DANA@"
- db 1 ; moves
-
- ; party
-
- db 29, PSYDUCK
- db SCRATCH
- db DISABLE
- db CONFUSION
- db SCREECH
-
- db 29, AMPHAROS
- db TACKLE
- db THUNDERSHOCK
- db THUNDER_WAVE
- db COTTON_SPORE
-
- db $ff ; end
-
-; ================
-
- ; LASS (16)
- db "DANA@"
- db 1 ; moves
-
- ; party
-
- db 32, PSYDUCK
- db SCRATCH
- db DISABLE
- db CONFUSION
- db SCREECH
-
- db 32, AMPHAROS
- db TACKLE
- db THUNDERPUNCH
- db THUNDER_WAVE
- db COTTON_SPORE
-
- db $ff ; end
-
-; ================
-
- ; LASS (17)
- db "DANA@"
- db 1 ; moves
-
- ; party
-
- db 36, AMPHAROS
- db SWIFT
- db THUNDERPUNCH
- db THUNDER_WAVE
- db COTTON_SPORE
-
- db 36, GOLDUCK
- db DISABLE
- db SURF
- db PSYCHIC_M
- db SCREECH
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-JanineGroup:
-; ================================
-; ================
-
- ; JANINE (1)
- db "JANINE@"
- db 1 ; moves
-
- ; party
-
- db 36, CROBAT
- db SCREECH
- db SUPERSONIC
- db CONFUSE_RAY
- db WING_ATTACK
-
- db 36, WEEZING
- db SMOG
- db SLUDGE_BOMB
- db TOXIC
- db EXPLOSION
-
- db 36, WEEZING
- db SMOG
- db SLUDGE_BOMB
- db TOXIC
- db EXPLOSION
-
- db 33, ARIADOS
- db SCARY_FACE
- db GIGA_DRAIN
- db STRING_SHOT
- db NIGHT_SHADE
-
- db 39, VENOMOTH
- db FORESIGHT
- db DOUBLE_TEAM
- db GUST
- db PSYCHIC_M
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-CooltrainerMGroup:
-; ================================
-; ================
-
- ; COOLTRAINERM (1)
- db "NICK@"
- db 1 ; moves
-
- ; party
-
- db 26, CHARMANDER
- db EMBER
- db SMOKESCREEN
- db RAGE
- db SCARY_FACE
-
- db 26, SQUIRTLE
- db WITHDRAW
- db WATER_GUN
- db BITE
- db CURSE
-
- db 26, BULBASAUR
- db LEECH_SEED
- db POISONPOWDER
- db SLEEP_POWDER
- db RAZOR_LEAF
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (2)
- db "AARON@"
- db 0 ; normal
-
- ; party
- db 24, IVYSAUR
- db 24, CHARMELEON
- db 24, WARTORTLE
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (3)
- db "PAUL@"
- db 0 ; normal
-
- ; party
- db 34, DRATINI
- db 34, DRATINI
- db 34, DRATINI
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (4)
- db "CODY@"
- db 0 ; normal
-
- ; party
- db 34, HORSEA
- db 36, SEADRA
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (5)
- db "MIKE@"
- db 0 ; normal
-
- ; party
- db 37, DRAGONAIR
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (6)
- db "GAVEN@"
- db 1 ; moves
-
- ; party
-
- db 35, VICTREEBEL
- db WRAP
- db TOXIC
- db ACID
- db RAZOR_LEAF
-
- db 35, KINGLER
- db BUBBLEBEAM
- db STOMP
- db GUILLOTINE
- db PROTECT
-
- db 35, FLAREON
- db SAND_ATTACK
- db QUICK_ATTACK
- db BITE
- db FIRE_SPIN
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (7)
- db "GAVEN@"
- db 3 ; item + moves
-
- ; party
-
- db 39, VICTREEBEL, NO_ITEM
- db GIGA_DRAIN
- db TOXIC
- db SLUDGE_BOMB
- db RAZOR_LEAF
-
- db 39, KINGLER, KINGS_ROCK
- db SURF
- db STOMP
- db GUILLOTINE
- db BLIZZARD
-
- db 39, FLAREON, NO_ITEM
- db FLAMETHROWER
- db QUICK_ATTACK
- db BITE
- db FIRE_SPIN
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (8)
- db "RYAN@"
- db 1 ; moves
-
- ; party
-
- db 25, PIDGEOT
- db SAND_ATTACK
- db QUICK_ATTACK
- db WHIRLWIND
- db WING_ATTACK
-
- db 27, ELECTABUZZ
- db THUNDERPUNCH
- db LIGHT_SCREEN
- db SWIFT
- db SCREECH
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (9)
- db "JAKE@"
- db 1 ; moves
-
- ; party
-
- db 33, PARASECT
- db LEECH_LIFE
- db SPORE
- db SLASH
- db SWORDS_DANCE
-
- db 35, GOLDUCK
- db CONFUSION
- db SCREECH
- db PSYCH_UP
- db FURY_SWIPES
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (10)
- db "GAVEN@"
- db 1 ; moves
-
- ; party
-
- db 32, VICTREEBEL
- db WRAP
- db TOXIC
- db ACID
- db RAZOR_LEAF
-
- db 32, KINGLER
- db BUBBLEBEAM
- db STOMP
- db GUILLOTINE
- db PROTECT
-
- db 32, FLAREON
- db SAND_ATTACK
- db QUICK_ATTACK
- db BITE
- db FIRE_SPIN
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (11)
- db "BLAKE@"
- db 1 ; moves
-
- ; party
-
- db 33, MAGNETON
- db THUNDERBOLT
- db SUPERSONIC
- db SWIFT
- db SCREECH
-
- db 31, QUAGSIRE
- db WATER_GUN
- db SLAM
- db AMNESIA
- db EARTHQUAKE
-
- db 31, EXEGGCUTE
- db LEECH_SEED
- db CONFUSION
- db SLEEP_POWDER
- db SOLARBEAM
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (12)
- db "BRIAN@"
- db 1 ; moves
-
- ; party
-
- db 35, SANDSLASH
- db SAND_ATTACK
- db POISON_STING
- db SLASH
- db SWIFT
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (13)
- db "ERICK@"
- db 0 ; normal
-
- ; party
- db 10, BULBASAUR
- db 10, CHARMANDER
- db 10, SQUIRTLE
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (14)
- db "ANDY@"
- db 0 ; normal
-
- ; party
- db 10, BULBASAUR
- db 10, CHARMANDER
- db 10, SQUIRTLE
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (15)
- db "TYLER@"
- db 0 ; normal
-
- ; party
- db 10, BULBASAUR
- db 10, CHARMANDER
- db 10, SQUIRTLE
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (16)
- db "SEAN@"
- db 0 ; normal
-
- ; party
- db 35, FLAREON
- db 35, TANGELA
- db 35, TAUROS
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (17)
- db "KEVIN@"
- db 0 ; normal
-
- ; party
- db 38, RHYHORN
- db 35, CHARMELEON
- db 35, WARTORTLE
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (18)
- db "STEVE@"
- db 0 ; normal
-
- ; party
- db 14, BULBASAUR
- db 14, CHARMANDER
- db 14, SQUIRTLE
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (19)
- db "ALLEN@"
- db 1 ; moves
-
- ; party
-
- db 27, CHARMELEON
- db EMBER
- db SMOKESCREEN
- db RAGE
- db SCARY_FACE
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERM (20)
- db "DARIN@"
- db 1 ; moves
-
- ; party
-
- db 37, DRAGONAIR
- db WRAP
- db SURF
- db DRAGON_RAGE
- db SLAM
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-CooltrainerFGroup:
-; ================================
-; ================
-
- ; COOLTRAINERF (1)
- db "GWEN@"
- db 0 ; normal
-
- ; party
- db 26, EEVEE
- db 22, FLAREON
- db 22, VAPOREON
- db 22, JOLTEON
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (2)
- db "LOIS@"
- db 1 ; moves
-
- ; party
-
- db 25, SKIPLOOM
- db SYNTHESIS
- db POISONPOWDER
- db MEGA_DRAIN
- db LEECH_SEED
-
- db 25, NINETALES
- db EMBER
- db QUICK_ATTACK
- db CONFUSE_RAY
- db SAFEGUARD
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (3)
- db "FRAN@"
- db 0 ; normal
-
- ; party
- db 37, SEADRA
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (4)
- db "LOLA@"
- db 0 ; normal
-
- ; party
- db 34, DRATINI
- db 36, DRAGONAIR
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (5)
- db "KATE@"
- db 0 ; normal
-
- ; party
- db 26, SHELLDER
- db 28, CLOYSTER
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (6)
- db "IRENE@"
- db 0 ; normal
-
- ; party
- db 22, GOLDEEN
- db 24, SEAKING
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (7)
- db "KELLY@"
- db 0 ; normal
-
- ; party
- db 27, MARILL
- db 24, WARTORTLE
- db 24, WARTORTLE
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (8)
- db "JOYCE@"
- db 1 ; moves
-
- ; party
-
- db 36, PIKACHU
- db QUICK_ATTACK
- db DOUBLE_TEAM
- db THUNDERBOLT
- db THUNDER
-
- db 32, BLASTOISE
- db BITE
- db CURSE
- db SURF
- db RAIN_DANCE
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (9)
- db "BETH@"
- db 1 ; moves
-
- ; party
-
- db 36, RAPIDASH
- db STOMP
- db FIRE_SPIN
- db FURY_ATTACK
- db AGILITY
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (10)
- db "REENA@"
- db 0 ; normal
-
- ; party
- db 31, STARMIE
- db 33, NIDOQUEEN
- db 31, STARMIE
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (11)
- db "MEGAN@"
- db 1 ; moves
-
- ; party
-
- db 32, BULBASAUR
- db GROWL
- db LEECH_SEED
- db POISONPOWDER
- db RAZOR_LEAF
-
- db 32, IVYSAUR
- db GROWL
- db LEECH_SEED
- db POISONPOWDER
- db RAZOR_LEAF
-
- db 32, VENUSAUR
- db BODY_SLAM
- db SLEEP_POWDER
- db RAZOR_LEAF
- db SWEET_SCENT
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (12)
- db "BETH@"
- db 1 ; moves
-
- ; party
-
- db 39, RAPIDASH
- db STOMP
- db FIRE_SPIN
- db FURY_ATTACK
- db AGILITY
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (13)
- db "CAROL@"
- db 0 ; normal
-
- ; party
- db 35, ELECTRODE
- db 35, STARMIE
- db 35, NINETALES
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (14)
- db "QUINN@"
- db 0 ; normal
-
- ; party
- db 38, IVYSAUR
- db 38, STARMIE
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (15)
- db "EMMA@"
- db 0 ; normal
-
- ; party
- db 28, POLIWHIRL
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (16)
- db "CYBIL@"
- db 1 ; moves
-
- ; party
-
- db 25, BUTTERFREE
- db CONFUSION
- db SLEEP_POWDER
- db WHIRLWIND
- db GUST
-
- db 25, BELLOSSOM
- db ABSORB
- db STUN_SPORE
- db ACID
- db SOLARBEAM
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (17)
- db "JENN@"
- db 0 ; normal
-
- ; party
- db 24, STARYU
- db 26, STARMIE
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (18)
- db "BETH@"
- db 3 ; item + moves
-
- ; party
-
- db 43, RAPIDASH, FOCUS_BAND
- db STOMP
- db FIRE_SPIN
- db FURY_ATTACK
- db FIRE_BLAST
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (19)
- db "REENA@"
- db 0 ; normal
-
- ; party
- db 34, STARMIE
- db 36, NIDOQUEEN
- db 34, STARMIE
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (20)
- db "REENA@"
- db 3 ; item + moves
-
- ; party
-
- db 38, STARMIE, NO_ITEM
- db DOUBLE_TEAM
- db PSYCHIC_M
- db WATERFALL
- db CONFUSE_RAY
-
- db 40, NIDOQUEEN, PINK_BOW
- db EARTHQUAKE
- db DOUBLE_KICK
- db TOXIC
- db BODY_SLAM
-
- db 38, STARMIE, NO_ITEM
- db BLIZZARD
- db PSYCHIC_M
- db WATERFALL
- db RECOVER
-
- db $ff ; end
-
-; ================
-
- ; COOLTRAINERF (21)
- db "CARA@"
- db 1 ; moves
-
- ; party
-
- db 33, HORSEA
- db SMOKESCREEN
- db LEER
- db WHIRLPOOL
- db TWISTER
-
- db 33, HORSEA
- db SMOKESCREEN
- db LEER
- db WHIRLPOOL
- db TWISTER
-
- db 35, SEADRA
- db SWIFT
- db LEER
- db WATERFALL
- db TWISTER
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-BeautyGroup:
-; ================================
-; ================
-
- ; BEAUTY (1)
- db "VICTORIA@"
- db 0 ; normal
-
- ; party
- db 9, SENTRET
- db 13, SENTRET
- db 17, SENTRET
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (2)
- db "SAMANTHA@"
- db 1 ; moves
-
- ; party
-
- db 16, MEOWTH
- db SCRATCH
- db GROWL
- db BITE
- db PAY_DAY
-
- db 16, MEOWTH
- db SCRATCH
- db GROWL
- db BITE
- db SLASH
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (3)
- db "JULIE@"
- db 0 ; normal
-
- ; party
- db 15, SENTRET
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (4)
- db "JACLYN@"
- db 0 ; normal
-
- ; party
- db 15, SENTRET
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (5)
- db "BRENDA@"
- db 0 ; normal
-
- ; party
- db 16, FURRET
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (6)
- db "CASSIE@"
- db 0 ; normal
-
- ; party
- db 28, VILEPLUME
- db 34, BUTTERFREE
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (7)
- db "CAROLINE@"
- db 0 ; normal
-
- ; party
- db 30, MARILL
- db 32, SEEL
- db 30, MARILL
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (8)
- db "CARLENE@"
- db 0 ; normal
-
- ; party
- db 15, SENTRET
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (9)
- db "JESSICA@"
- db 0 ; normal
-
- ; party
- db 15, SENTRET
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (10)
- db "RACHAEL@"
- db 0 ; normal
-
- ; party
- db 15, SENTRET
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (11)
- db "ANGELICA@"
- db 0 ; normal
-
- ; party
- db 15, SENTRET
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (12)
- db "KENDRA@"
- db 0 ; normal
-
- ; party
- db 15, SENTRET
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (13)
- db "VERONICA@"
- db 0 ; normal
-
- ; party
- db 15, SENTRET
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (14)
- db "JULIA@"
- db 0 ; normal
-
- ; party
- db 32, PARAS
- db 32, EXEGGCUTE
- db 35, PARASECT
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (15)
- db "THERESA@"
- db 0 ; normal
-
- ; party
- db 15, SENTRET
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (16)
- db "VALERIE@"
- db 1 ; moves
-
- ; party
-
- db 17, HOPPIP
- db SYNTHESIS
- db TAIL_WHIP
- db TACKLE
- db POISONPOWDER
-
- db 17, SKIPLOOM
- db SYNTHESIS
- db TAIL_WHIP
- db TACKLE
- db STUN_SPORE
-
- db $ff ; end
-
-; ================
-
- ; BEAUTY (17)
- db "OLIVIA@"
- db 0 ; normal
-
- ; party
- db 19, CORSOLA
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-PokemaniacGroup:
-; ================================
-; ================
-
- ; POKEMANIAC (1)
- db "LARRY@"
- db 0 ; normal
-
- ; party
- db 10, SLOWPOKE
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (2)
- db "ANDREW@"
- db 0 ; normal
-
- ; party
- db 24, MAROWAK
- db 24, MAROWAK
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (3)
- db "CALVIN@"
- db 0 ; normal
-
- ; party
- db 26, KANGASKHAN
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (4)
- db "SHANE@"
- db 0 ; normal
-
- ; party
- db 16, NIDORINA
- db 16, NIDORINO
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (5)
- db "BEN@"
- db 0 ; normal
-
- ; party
- db 19, SLOWBRO
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (6)
- db "BRENT@"
- db 0 ; normal
-
- ; party
- db 19, LICKITUNG
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (7)
- db "RON@"
- db 0 ; normal
-
- ; party
- db 19, NIDOKING
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (8)
- db "ETHAN@"
- db 0 ; normal
-
- ; party
- db 31, RHYHORN
- db 31, RHYDON
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (9)
- db "BRENT@"
- db 0 ; normal
-
- ; party
- db 25, KANGASKHAN
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (10)
- db "BRENT@"
- db 1 ; moves
-
- ; party
-
- db 36, PORYGON
- db RECOVER
- db PSYCHIC_M
- db CONVERSION2
- db TRI_ATTACK
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (11)
- db "ISSAC@"
- db 1 ; moves
-
- ; party
-
- db 12, LICKITUNG
- db LICK
- db SUPERSONIC
- db CUT
- db 0
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (12)
- db "DONALD@"
- db 0 ; normal
-
- ; party
- db 10, SLOWPOKE
- db 10, SLOWPOKE
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (13)
- db "ZACH@"
- db 0 ; normal
-
- ; party
- db 27, RHYHORN
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (14)
- db "BRENT@"
- db 1 ; moves
-
- ; party
-
- db 41, CHANSEY
- db ROLLOUT
- db ATTRACT
- db EGG_BOMB
- db SOFTBOILED
-
- db $ff ; end
-
-; ================
-
- ; POKEMANIAC (15)
- db "MILLER@"
- db 0 ; normal
-
- ; party
- db 17, NIDOKING
- db 17, NIDOQUEEN
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-GruntMGroup:
-; ================================
-; ================
-
- ; GRUNTM (1)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 14, KOFFING
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (2)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 7, RATTATA
- db 9, ZUBAT
- db 9, ZUBAT
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (3)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 24, RATICATE
- db 24, RATICATE
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (4)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 23, GRIMER
- db 23, GRIMER
- db 25, MUK
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (5)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 21, RATTATA
- db 21, RATTATA
- db 23, RATTATA
- db 23, RATTATA
- db 23, RATTATA
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (6)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 26, ZUBAT
- db 26, ZUBAT
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (7)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 23, KOFFING
- db 23, GRIMER
- db 23, ZUBAT
- db 23, RATTATA
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (8)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 26, WEEZING
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (9)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 24, RATICATE
- db 26, KOFFING
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (10)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 22, ZUBAT
- db 24, GOLBAT
- db 22, GRIMER
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (11)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 23, MUK
- db 23, KOFFING
- db 25, RATTATA
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (12)
- db "EXECUTIVE@"
- db 0 ; normal
-
- ; party
- db 33, HOUNDOUR
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (13)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 27, RATTATA
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (14)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 24, RATICATE
- db 24, GOLBAT
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (15)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 26, GRIMER
- db 23, WEEZING
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (16)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 16, RATTATA
- db 16, RATTATA
- db 16, RATTATA
- db 16, RATTATA
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (17)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 18, GOLBAT
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (18)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 17, RATTATA
- db 17, ZUBAT
- db 17, RATTATA
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (19)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 18, VENONAT
- db 18, VENONAT
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (20)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 17, DROWZEE
- db 19, ZUBAT
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (21)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 16, ZUBAT
- db 17, GRIMER
- db 18, RATTATA
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (22)
- db "EXECUTIVE@"
- db 0 ; normal
-
- ; party
- db 36, GOLBAT
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (23)
- db "EXECUTIVE@"
- db 0 ; normal
-
- ; party
- db 30, KOFFING
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (24)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 25, KOFFING
- db 25, KOFFING
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (25)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 24, KOFFING
- db 24, MUK
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (26)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 15, RATTATA
- db 15, RATTATA
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (27)
- db "EXECUTIVE@"
- db 0 ; normal
-
- ; party
- db 22, ZUBAT
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (28)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 19, RATICATE
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (29)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 9, RATTATA
- db 9, RATTATA
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (30)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 25, GOLBAT
- db 25, GOLBAT
- db 30, ARBOK
-
- db $ff ; end
-
-; ================
-
- ; GRUNTM (31)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 30, GOLBAT
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-GentlemanGroup:
-; ================================
-; ================
-
- ; GENTLEMAN (1)
- db "PRESTON@"
- db 0 ; normal
-
- ; party
- db 18, GROWLITHE
- db 18, GROWLITHE
-
- db $ff ; end
-
-; ================
-
- ; GENTLEMAN (2)
- db "EDWARD@"
- db 0 ; normal
-
- ; party
- db 33, PERSIAN
-
- db $ff ; end
-
-; ================
-
- ; GENTLEMAN (3)
- db "GREGORY@"
- db 0 ; normal
-
- ; party
- db 37, PIKACHU
- db 33, FLAAFFY
-
- db $ff ; end
-
-; ================
-
- ; GENTLEMAN (4)
- db "VIRGIL@"
- db 0 ; normal
-
- ; party
- db 20, PONYTA
-
- db $ff ; end
-
-; ================
-
- ; GENTLEMAN (5)
- db "ALFRED@"
- db 0 ; normal
-
- ; party
- db 20, NOCTOWL
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-SkierGroup:
-; ================================
-; ================
-
- ; SKIER (1)
- db "ROXANNE@"
- db 0 ; normal
-
- ; party
- db 28, JYNX
-
- db $ff ; end
-
-; ================
-
- ; SKIER (2)
- db "CLARISSA@"
- db 0 ; normal
-
- ; party
- db 28, DEWGONG
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-TeacherGroup:
-; ================================
-; ================
-
- ; TEACHER (1)
- db "COLETTE@"
- db 0 ; normal
-
- ; party
- db 36, CLEFAIRY
-
- db $ff ; end
-
-; ================
-
- ; TEACHER (2)
- db "HILLARY@"
- db 0 ; normal
-
- ; party
- db 32, AIPOM
- db 36, CUBONE
-
- db $ff ; end
-
-; ================
-
- ; TEACHER (3)
- db "SHIRLEY@"
- db 0 ; normal
-
- ; party
- db 35, JIGGLYPUFF
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-SabrinaGroup:
-; ================================
-; ================
-
- ; SABRINA (1)
- db "SABRINA@"
- db 1 ; moves
-
- ; party
-
- db 46, ESPEON
- db SAND_ATTACK
- db QUICK_ATTACK
- db SWIFT
- db PSYCHIC_M
-
- db 46, MR__MIME
- db BARRIER
- db REFLECT
- db BATON_PASS
- db PSYCHIC_M
-
- db 48, ALAKAZAM
- db RECOVER
- db FUTURE_SIGHT
- db PSYCHIC_M
- db REFLECT
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-BugCatcherGroup:
-; ================================
-; ================
-
- ; BUG_CATCHER (1)
- db "DON@"
- db 0 ; normal
-
- ; party
- db 3, CATERPIE
- db 3, CATERPIE
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (2)
- db "ROB@"
- db 0 ; normal
-
- ; party
- db 32, BEEDRILL
- db 32, BUTTERFREE
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (3)
- db "ED@"
- db 0 ; normal
-
- ; party
- db 30, BEEDRILL
- db 30, BEEDRILL
- db 30, BEEDRILL
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (4)
- db "WADE@"
- db 0 ; normal
-
- ; party
- db 2, CATERPIE
- db 2, CATERPIE
- db 3, WEEDLE
- db 2, CATERPIE
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (5)
- db "BENNY@"
- db 0 ; normal
-
- ; party
- db 7, WEEDLE
- db 9, KAKUNA
- db 12, BEEDRILL
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (6)
- db "AL@"
- db 0 ; normal
-
- ; party
- db 12, CATERPIE
- db 12, WEEDLE
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (7)
- db "JOSH@"
- db 0 ; normal
-
- ; party
- db 13, PARAS
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (8)
- db "ARNIE@"
- db 0 ; normal
-
- ; party
- db 15, VENONAT
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (9)
- db "KEN@"
- db 0 ; normal
-
- ; party
- db 30, ARIADOS
- db 32, PINSIR
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (10)
- db "WADE@"
- db 0 ; normal
-
- ; party
- db 9, METAPOD
- db 9, METAPOD
- db 10, KAKUNA
- db 9, METAPOD
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (11)
- db "WADE@"
- db 0 ; normal
-
- ; party
- db 14, BUTTERFREE
- db 14, BUTTERFREE
- db 15, BEEDRILL
- db 14, BUTTERFREE
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (12)
- db "DOUG@"
- db 0 ; normal
-
- ; party
- db 34, ARIADOS
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (13)
- db "ARNIE@"
- db 0 ; normal
-
- ; party
- db 19, VENONAT
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (14)
- db "ARNIE@"
- db 1 ; moves
-
- ; party
-
- db 28, VENOMOTH
- db DISABLE
- db SUPERSONIC
- db CONFUSION
- db LEECH_LIFE
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (15)
- db "WADE@"
- db 1 ; moves
-
- ; party
-
- db 24, BUTTERFREE
- db CONFUSION
- db POISONPOWDER
- db SUPERSONIC
- db WHIRLWIND
-
- db 24, BUTTERFREE
- db CONFUSION
- db STUN_SPORE
- db SUPERSONIC
- db WHIRLWIND
-
- db 25, BEEDRILL
- db FURY_ATTACK
- db FOCUS_ENERGY
- db TWINEEDLE
- db RAGE
-
- db 24, BUTTERFREE
- db CONFUSION
- db SLEEP_POWDER
- db SUPERSONIC
- db WHIRLWIND
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (16)
- db "WADE@"
- db 1 ; moves
-
- ; party
-
- db 30, BUTTERFREE
- db CONFUSION
- db POISONPOWDER
- db SUPERSONIC
- db GUST
-
- db 30, BUTTERFREE
- db CONFUSION
- db STUN_SPORE
- db SUPERSONIC
- db GUST
-
- db 32, BEEDRILL
- db FURY_ATTACK
- db PURSUIT
- db TWINEEDLE
- db DOUBLE_TEAM
-
- db 34, BUTTERFREE
- db PSYBEAM
- db SLEEP_POWDER
- db GUST
- db WHIRLWIND
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (17)
- db "ARNIE@"
- db 1 ; moves
-
- ; party
-
- db 36, VENOMOTH
- db GUST
- db SUPERSONIC
- db PSYBEAM
- db LEECH_LIFE
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (18)
- db "ARNIE@"
- db 1 ; moves
-
- ; party
-
- db 40, VENOMOTH
- db GUST
- db SUPERSONIC
- db PSYCHIC_M
- db TOXIC
-
- db $ff ; end
-
-; ================
-
- ; BUG_CATCHER (19)
- db "WAYNE@"
- db 0 ; normal
-
- ; party
- db 8, LEDYBA
- db 10, PARAS
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-FisherGroup:
-; ================================
-; ================
-
- ; FISHER (1)
- db "JUSTIN@"
- db 0 ; normal
-
- ; party
- db 5, MAGIKARP
- db 5, MAGIKARP
- db 15, MAGIKARP
- db 5, MAGIKARP
-
- db $ff ; end
-
-; ================
-
- ; FISHER (2)
- db "RALPH@"
- db 0 ; normal
-
- ; party
- db 10, GOLDEEN
-
- db $ff ; end
-
-; ================
-
- ; FISHER (3)
- db "ARNOLD@"
- db 0 ; normal
-
- ; party
- db 34, TENTACRUEL
-
- db $ff ; end
-
-; ================
-
- ; FISHER (4)
- db "KYLE@"
- db 0 ; normal
-
- ; party
- db 28, SEAKING
- db 31, POLIWHIRL
- db 31, SEAKING
-
- db $ff ; end
-
-; ================
-
- ; FISHER (5)
- db "HENRY@"
- db 0 ; normal
-
- ; party
- db 8, POLIWAG
- db 8, POLIWAG
-
- db $ff ; end
-
-; ================
-
- ; FISHER (6)
- db "MARVIN@"
- db 0 ; normal
-
- ; party
- db 10, MAGIKARP
- db 10, GYARADOS
- db 15, MAGIKARP
- db 15, GYARADOS
-
- db $ff ; end
-
-; ================
-
- ; FISHER (7)
- db "TULLY@"
- db 0 ; normal
-
- ; party
- db 18, QWILFISH
-
- db $ff ; end
-
-; ================
-
- ; FISHER (8)
- db "ANDRE@"
- db 0 ; normal
-
- ; party
- db 27, GYARADOS
-
- db $ff ; end
-
-; ================
-
- ; FISHER (9)
- db "RAYMOND@"
- db 0 ; normal
-
- ; party
- db 22, MAGIKARP
- db 22, MAGIKARP
- db 22, MAGIKARP
- db 22, MAGIKARP
-
- db $ff ; end
-
-; ================
-
- ; FISHER (10)
- db "WILTON@"
- db 0 ; normal
-
- ; party
- db 23, GOLDEEN
- db 23, GOLDEEN
- db 25, SEAKING
-
- db $ff ; end
-
-; ================
-
- ; FISHER (11)
- db "EDGAR@"
- db 1 ; moves
-
- ; party
-
- db 25, REMORAID
- db LOCK_ON
- db PSYBEAM
- db AURORA_BEAM
- db BUBBLEBEAM
-
- db 25, REMORAID
- db LOCK_ON
- db PSYBEAM
- db AURORA_BEAM
- db BUBBLEBEAM
-
- db $ff ; end
-
-; ================
-
- ; FISHER (12)
- db "JONAH@"
- db 0 ; normal
-
- ; party
- db 25, SHELLDER
- db 29, OCTILLERY
- db 25, REMORAID
- db 29, CLOYSTER
-
- db $ff ; end
-
-; ================
-
- ; FISHER (13)
- db "MARTIN@"
- db 0 ; normal
-
- ; party
- db 32, REMORAID
- db 32, REMORAID
-
- db $ff ; end
-
-; ================
-
- ; FISHER (14)
- db "STEPHEN@"
- db 0 ; normal
-
- ; party
- db 25, MAGIKARP
- db 25, MAGIKARP
- db 31, QWILFISH
- db 31, TENTACRUEL
-
- db $ff ; end
-
-; ================
-
- ; FISHER (15)
- db "BARNEY@"
- db 0 ; normal
-
- ; party
- db 30, GYARADOS
- db 30, GYARADOS
- db 30, GYARADOS
-
- db $ff ; end
-
-; ================
-
- ; FISHER (16)
- db "RALPH@"
- db 0 ; normal
-
- ; party
- db 17, GOLDEEN
-
- db $ff ; end
-
-; ================
-
- ; FISHER (17)
- db "RALPH@"
- db 0 ; normal
-
- ; party
- db 17, QWILFISH
- db 19, GOLDEEN
-
- db $ff ; end
-
-; ================
-
- ; FISHER (18)
- db "TULLY@"
- db 0 ; normal
-
- ; party
- db 23, QWILFISH
-
- db $ff ; end
-
-; ================
-
- ; FISHER (19)
- db "TULLY@"
- db 0 ; normal
-
- ; party
- db 32, GOLDEEN
- db 32, GOLDEEN
- db 32, QWILFISH
-
- db $ff ; end
-
-; ================
-
- ; FISHER (20)
- db "WILTON@"
- db 0 ; normal
-
- ; party
- db 29, GOLDEEN
- db 29, GOLDEEN
- db 32, SEAKING
-
- db $ff ; end
-
-; ================
-
- ; FISHER (21)
- db "SCOTT@"
- db 0 ; normal
-
- ; party
- db 30, QWILFISH
- db 30, QWILFISH
- db 34, SEAKING
-
- db $ff ; end
-
-; ================
-
- ; FISHER (22)
- db "WILTON@"
- db 1 ; moves
-
- ; party
-
- db 34, SEAKING
- db SUPERSONIC
- db WATERFALL
- db FLAIL
- db FURY_ATTACK
-
- db 34, SEAKING
- db SUPERSONIC
- db WATERFALL
- db FLAIL
- db FURY_ATTACK
-
- db 38, REMORAID
- db PSYBEAM
- db AURORA_BEAM
- db BUBBLEBEAM
- db HYPER_BEAM
-
- db $ff ; end
-
-; ================
-
- ; FISHER (23)
- db "RALPH@"
- db 0 ; normal
-
- ; party
- db 30, QWILFISH
- db 32, GOLDEEN
-
- db $ff ; end
-
-; ================
-
- ; FISHER (24)
- db "RALPH@"
- db 1 ; moves
-
- ; party
-
- db 35, QWILFISH
- db TOXIC
- db MINIMIZE
- db SURF
- db PIN_MISSILE
-
- db 39, SEAKING
- db ENDURE
- db FLAIL
- db FURY_ATTACK
- db WATERFALL
-
- db $ff ; end
-
-; ================
-
- ; FISHER (25)
- db "TULLY@"
- db 1 ; moves
-
- ; party
-
- db 34, SEAKING
- db SUPERSONIC
- db RAIN_DANCE
- db WATERFALL
- db FURY_ATTACK
-
- db 34, SEAKING
- db SUPERSONIC
- db RAIN_DANCE
- db WATERFALL
- db FURY_ATTACK
-
- db 37, QWILFISH
- db ROLLOUT
- db SURF
- db PIN_MISSILE
- db TAKE_DOWN
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-SwimmerMGroup:
-; ================================
-; ================
-
- ; SWIMMERM (1)
- db "HAROLD@"
- db 0 ; normal
-
- ; party
- db 32, REMORAID
- db 30, SEADRA
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (2)
- db "SIMON@"
- db 0 ; normal
-
- ; party
- db 20, TENTACOOL
- db 20, TENTACOOL
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (3)
- db "RANDALL@"
- db 0 ; normal
-
- ; party
- db 18, SHELLDER
- db 20, WARTORTLE
- db 18, SHELLDER
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (4)
- db "CHARLIE@"
- db 0 ; normal
-
- ; party
- db 21, SHELLDER
- db 19, TENTACOOL
- db 19, TENTACRUEL
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (5)
- db "GEORGE@"
- db 0 ; normal
-
- ; party
- db 16, TENTACOOL
- db 17, TENTACOOL
- db 16, TENTACOOL
- db 19, STARYU
- db 17, TENTACOOL
- db 19, REMORAID
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (6)
- db "BERKE@"
- db 0 ; normal
-
- ; party
- db 23, QWILFISH
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (7)
- db "KIRK@"
- db 0 ; normal
-
- ; party
- db 20, GYARADOS
- db 20, GYARADOS
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (8)
- db "MATHEW@"
- db 0 ; normal
-
- ; party
- db 23, KRABBY
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (9)
- db "HAL@"
- db 0 ; normal
-
- ; party
- db 24, SEEL
- db 25, DEWGONG
- db 24, SEEL
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (10)
- db "PATON@"
- db 0 ; normal
-
- ; party
- db 26, PILOSWINE
- db 26, PILOSWINE
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (11)
- db "DARYL@"
- db 0 ; normal
-
- ; party
- db 24, SHELLDER
- db 25, CLOYSTER
- db 24, SHELLDER
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (12)
- db "WALTER@"
- db 0 ; normal
-
- ; party
- db 15, HORSEA
- db 15, HORSEA
- db 20, SEADRA
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (13)
- db "TONY@"
- db 0 ; normal
-
- ; party
- db 13, STARYU
- db 18, STARMIE
- db 16, HORSEA
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (14)
- db "JEROME@"
- db 0 ; normal
-
- ; party
- db 26, SEADRA
- db 28, TENTACOOL
- db 30, TENTACRUEL
- db 28, GOLDEEN
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (15)
- db "TUCKER@"
- db 0 ; normal
-
- ; party
- db 30, SHELLDER
- db 34, CLOYSTER
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (16)
- db "RICK@"
- db 0 ; normal
-
- ; party
- db 13, STARYU
- db 18, STARMIE
- db 16, HORSEA
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (17)
- db "CAMERON@"
- db 0 ; normal
-
- ; party
- db 34, MARILL
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (18)
- db "SETH@"
- db 0 ; normal
-
- ; party
- db 29, QUAGSIRE
- db 29, OCTILLERY
- db 32, QUAGSIRE
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (19)
- db "JAMES@"
- db 0 ; normal
-
- ; party
- db 13, STARYU
- db 18, STARMIE
- db 16, HORSEA
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (20)
- db "LEWIS@"
- db 0 ; normal
-
- ; party
- db 13, STARYU
- db 18, STARMIE
- db 16, HORSEA
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERM (21)
- db "PARKER@"
- db 0 ; normal
-
- ; party
- db 32, HORSEA
- db 32, HORSEA
- db 35, SEADRA
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-SwimmerFGroup:
-; ================================
-; ================
-
- ; SWIMMERF (1)
- db "ELAINE@"
- db 0 ; normal
-
- ; party
- db 21, STARYU
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (2)
- db "PAULA@"
- db 0 ; normal
-
- ; party
- db 19, STARYU
- db 19, SHELLDER
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (3)
- db "KAYLEE@"
- db 0 ; normal
-
- ; party
- db 18, GOLDEEN
- db 20, GOLDEEN
- db 20, SEAKING
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (4)
- db "SUSIE@"
- db 1 ; moves
-
- ; party
-
- db 20, PSYDUCK
- db SCRATCH
- db TAIL_WHIP
- db DISABLE
- db CONFUSION
-
- db 22, GOLDEEN
- db PECK
- db TAIL_WHIP
- db SUPERSONIC
- db HORN_ATTACK
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (5)
- db "DENISE@"
- db 0 ; normal
-
- ; party
- db 22, SEEL
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (6)
- db "KARA@"
- db 0 ; normal
-
- ; party
- db 20, STARYU
- db 20, STARMIE
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (7)
- db "WENDY@"
- db 1 ; moves
-
- ; party
-
- db 21, HORSEA
- db BUBBLE
- db SMOKESCREEN
- db LEER
- db WATER_GUN
-
- db 21, HORSEA
- db DRAGON_RAGE
- db SMOKESCREEN
- db LEER
- db WATER_GUN
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (8)
- db "LISA@"
- db 0 ; normal
-
- ; party
- db 28, JYNX
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (9)
- db "JILL@"
- db 0 ; normal
-
- ; party
- db 28, DEWGONG
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (10)
- db "MARY@"
- db 0 ; normal
-
- ; party
- db 20, SEAKING
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (11)
- db "KATIE@"
- db 0 ; normal
-
- ; party
- db 33, DEWGONG
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (12)
- db "DAWN@"
- db 0 ; normal
-
- ; party
- db 34, SEAKING
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (13)
- db "TARA@"
- db 0 ; normal
-
- ; party
- db 20, SEAKING
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (14)
- db "NICOLE@"
- db 0 ; normal
-
- ; party
- db 29, MARILL
- db 29, MARILL
- db 32, LAPRAS
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (15)
- db "LORI@"
- db 0 ; normal
-
- ; party
- db 32, STARMIE
- db 32, STARMIE
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (16)
- db "JODY@"
- db 0 ; normal
-
- ; party
- db 20, SEAKING
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (17)
- db "NIKKI@"
- db 0 ; normal
-
- ; party
- db 28, SEEL
- db 28, SEEL
- db 28, SEEL
- db 28, DEWGONG
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (18)
- db "DIANA@"
- db 0 ; normal
-
- ; party
- db 37, GOLDUCK
-
- db $ff ; end
-
-; ================
-
- ; SWIMMERF (19)
- db "BRIANA@"
- db 0 ; normal
-
- ; party
- db 35, SEAKING
- db 35, SEAKING
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-SailorGroup:
-; ================================
-; ================
-
- ; SAILOR (1)
- db "EUGENE@"
- db 0 ; normal
-
- ; party
- db 17, POLIWHIRL
- db 17, RATICATE
- db 19, KRABBY
-
- db $ff ; end
-
-; ================
-
- ; SAILOR (2)
- db "HUEY@"
- db 0 ; normal
-
- ; party
- db 18, POLIWAG
- db 18, POLIWHIRL
-
- db $ff ; end
-
-; ================
-
- ; SAILOR (3)
- db "TERRELL@"
- db 0 ; normal
-
- ; party
- db 20, POLIWHIRL
-
- db $ff ; end
-
-; ================
-
- ; SAILOR (4)
- db "KENT@"
- db 1 ; moves
-
- ; party
-
- db 18, KRABBY
- db BUBBLE
- db LEER
- db VICEGRIP
- db HARDEN
-
- db 20, KRABBY
- db BUBBLEBEAM
- db LEER
- db VICEGRIP
- db HARDEN
-
- db $ff ; end
-
-; ================
-
- ; SAILOR (5)
- db "ERNEST@"
- db 0 ; normal
-
- ; party
- db 18, MACHOP
- db 18, MACHOP
- db 18, POLIWHIRL
-
- db $ff ; end
-
-; ================
-
- ; SAILOR (6)
- db "JEFF@"
- db 0 ; normal
-
- ; party
- db 32, RATICATE
- db 32, RATICATE
-
- db $ff ; end
-
-; ================
-
- ; SAILOR (7)
- db "GARRETT@"
- db 0 ; normal
-
- ; party
- db 34, KINGLER
-
- db $ff ; end
-
-; ================
-
- ; SAILOR (8)
- db "KENNETH@"
- db 0 ; normal
-
- ; party
- db 28, MACHOP
- db 28, MACHOP
- db 28, POLIWRATH
- db 28, MACHOP
-
- db $ff ; end
-
-; ================
-
- ; SAILOR (9)
- db "STANLY@"
- db 0 ; normal
-
- ; party
- db 31, MACHOP
- db 33, MACHOKE
- db 26, PSYDUCK
-
- db $ff ; end
-
-; ================
-
- ; SAILOR (10)
- db "HARRY@"
- db 0 ; normal
-
- ; party
- db 19, WOOPER
-
- db $ff ; end
-
-; ================
-
- ; SAILOR (11)
- db "HUEY@"
- db 0 ; normal
-
- ; party
- db 28, POLIWHIRL
- db 28, POLIWHIRL
-
- db $ff ; end
-
-; ================
-
- ; SAILOR (12)
- db "HUEY@"
- db 0 ; normal
-
- ; party
- db 34, POLIWHIRL
- db 34, POLIWRATH
-
- db $ff ; end
-
-; ================
-
- ; SAILOR (13)
- db "HUEY@"
- db 1 ; moves
-
- ; party
-
- db 38, POLITOED
- db WHIRLPOOL
- db RAIN_DANCE
- db BODY_SLAM
- db PERISH_SONG
-
- db 38, POLIWRATH
- db SURF
- db STRENGTH
- db ICE_PUNCH
- db SUBMISSION
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-SuperNerdGroup:
-; ================================
-; ================
-
- ; SUPER_NERD (1)
- db "STAN@"
- db 0 ; normal
-
- ; party
- db 20, GRIMER
-
- db $ff ; end
-
-; ================
-
- ; SUPER_NERD (2)
- db "ERIC@"
- db 0 ; normal
-
- ; party
- db 11, GRIMER
- db 11, GRIMER
-
- db $ff ; end
-
-; ================
-
- ; SUPER_NERD (3)
- db "GREGG@"
- db 0 ; normal
-
- ; party
- db 20, MAGNEMITE
- db 20, MAGNEMITE
- db 20, MAGNEMITE
-
- db $ff ; end
-
-; ================
-
- ; SUPER_NERD (4)
- db "JAY@"
- db 0 ; normal
-
- ; party
- db 22, KOFFING
- db 22, KOFFING
-
- db $ff ; end
-
-; ================
-
- ; SUPER_NERD (5)
- db "DAVE@"
- db 0 ; normal
-
- ; party
- db 24, DITTO
-
- db $ff ; end
-
-; ================
-
- ; SUPER_NERD (6)
- db "SAM@"
- db 0 ; normal
-
- ; party
- db 34, GRIMER
- db 34, MUK
-
- db $ff ; end
-
-; ================
-
- ; SUPER_NERD (7)
- db "TOM@"
- db 0 ; normal
-
- ; party
- db 32, MAGNEMITE
- db 32, MAGNEMITE
- db 32, MAGNEMITE
-
- db $ff ; end
-
-; ================
-
- ; SUPER_NERD (8)
- db "PAT@"
- db 0 ; normal
-
- ; party
- db 36, PORYGON
-
- db $ff ; end
-
-; ================
-
- ; SUPER_NERD (9)
- db "SHAWN@"
- db 0 ; normal
-
- ; party
- db 31, MAGNEMITE
- db 33, MUK
- db 31, MAGNEMITE
-
- db $ff ; end
-
-; ================
-
- ; SUPER_NERD (10)
- db "TERU@"
- db 0 ; normal
-
- ; party
- db 7, MAGNEMITE
- db 11, VOLTORB
- db 7, MAGNEMITE
- db 9, MAGNEMITE
-
- db $ff ; end
-
-; ================
-
- ; SUPER_NERD (11)
- db "RUSS@"
- db 0 ; normal
-
- ; party
- db 27, MAGNEMITE
- db 27, MAGNEMITE
- db 27, MAGNEMITE
-
- db $ff ; end
-
-; ================
-
- ; SUPER_NERD (12)
- db "NORTON@"
- db 1 ; moves
-
- ; party
-
- db 30, PORYGON
- db CONVERSION
- db CONVERSION2
- db RECOVER
- db TRI_ATTACK
-
- db $ff ; end
-
-; ================
-
- ; SUPER_NERD (13)
- db "HUGH@"
- db 1 ; moves
-
- ; party
-
- db 39, SEADRA
- db SMOKESCREEN
- db TWISTER
- db SURF
- db WATERFALL
-
- db $ff ; end
-
-; ================
-
- ; SUPER_NERD (14)
- db "MARKUS@"
- db 1 ; moves
-
- ; party
-
- db 19, SLOWPOKE
- db CURSE
- db WATER_GUN
- db GROWL
- db STRENGTH
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-Rival2Group:
-; ================================
-; ================
-
- ; RIVAL2 (1)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 41, SNEASEL
- db QUICK_ATTACK
- db SCREECH
- db FAINT_ATTACK
- db FURY_CUTTER
-
- db 42, GOLBAT
- db LEECH_LIFE
- db BITE
- db CONFUSE_RAY
- db WING_ATTACK
-
- db 41, MAGNETON
- db THUNDERSHOCK
- db SONICBOOM
- db THUNDER_WAVE
- db SWIFT
-
- db 43, GENGAR
- db MEAN_LOOK
- db CURSE
- db SHADOW_BALL
- db CONFUSE_RAY
-
- db 43, ALAKAZAM
- db DISABLE
- db RECOVER
- db FUTURE_SIGHT
- db PSYCHIC_M
-
- db 45, MEGANIUM
- db RAZOR_LEAF
- db POISONPOWDER
- db BODY_SLAM
- db LIGHT_SCREEN
-
- db $ff ; end
-
-; ================
-
- ; RIVAL2 (2)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 41, SNEASEL
- db QUICK_ATTACK
- db SCREECH
- db FAINT_ATTACK
- db FURY_CUTTER
-
- db 42, GOLBAT
- db LEECH_LIFE
- db BITE
- db CONFUSE_RAY
- db WING_ATTACK
-
- db 41, MAGNETON
- db THUNDERSHOCK
- db SONICBOOM
- db THUNDER_WAVE
- db SWIFT
-
- db 43, GENGAR
- db MEAN_LOOK
- db CURSE
- db SHADOW_BALL
- db CONFUSE_RAY
-
- db 43, ALAKAZAM
- db DISABLE
- db RECOVER
- db FUTURE_SIGHT
- db PSYCHIC_M
-
- db 45, TYPHLOSION
- db SMOKESCREEN
- db QUICK_ATTACK
- db FLAME_WHEEL
- db SWIFT
-
- db $ff ; end
-
-; ================
-
- ; RIVAL2 (3)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 41, SNEASEL
- db QUICK_ATTACK
- db SCREECH
- db FAINT_ATTACK
- db FURY_CUTTER
-
- db 42, GOLBAT
- db LEECH_LIFE
- db BITE
- db CONFUSE_RAY
- db WING_ATTACK
-
- db 41, MAGNETON
- db THUNDERSHOCK
- db SONICBOOM
- db THUNDER_WAVE
- db SWIFT
-
- db 43, GENGAR
- db MEAN_LOOK
- db CURSE
- db SHADOW_BALL
- db CONFUSE_RAY
-
- db 43, ALAKAZAM
- db DISABLE
- db RECOVER
- db FUTURE_SIGHT
- db PSYCHIC_M
-
- db 45, FERALIGATR
- db RAGE
- db WATER_GUN
- db SCARY_FACE
- db SLASH
-
- db $ff ; end
-
-; ================
-
- ; RIVAL2 (4)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 45, SNEASEL
- db QUICK_ATTACK
- db SCREECH
- db FAINT_ATTACK
- db FURY_CUTTER
-
- db 48, CROBAT
- db TOXIC
- db BITE
- db CONFUSE_RAY
- db WING_ATTACK
-
- db 45, MAGNETON
- db THUNDER
- db SONICBOOM
- db THUNDER_WAVE
- db SWIFT
-
- db 46, GENGAR
- db MEAN_LOOK
- db CURSE
- db SHADOW_BALL
- db CONFUSE_RAY
-
- db 46, ALAKAZAM
- db RECOVER
- db FUTURE_SIGHT
- db PSYCHIC_M
- db REFLECT
-
- db 50, MEGANIUM
- db GIGA_DRAIN
- db BODY_SLAM
- db LIGHT_SCREEN
- db SAFEGUARD
-
- db $ff ; end
-
-; ================
-
- ; RIVAL2 (5)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 45, SNEASEL
- db QUICK_ATTACK
- db SCREECH
- db FAINT_ATTACK
- db FURY_CUTTER
-
- db 48, CROBAT
- db TOXIC
- db BITE
- db CONFUSE_RAY
- db WING_ATTACK
-
- db 45, MAGNETON
- db THUNDER
- db SONICBOOM
- db THUNDER_WAVE
- db SWIFT
-
- db 46, GENGAR
- db MEAN_LOOK
- db CURSE
- db SHADOW_BALL
- db CONFUSE_RAY
-
- db 46, ALAKAZAM
- db RECOVER
- db FUTURE_SIGHT
- db PSYCHIC_M
- db REFLECT
-
- db 50, TYPHLOSION
- db SMOKESCREEN
- db QUICK_ATTACK
- db FIRE_BLAST
- db SWIFT
-
- db $ff ; end
-
-; ================
-
- ; RIVAL2 (6)
- db "?@"
- db 1 ; moves
-
- ; party
-
- db 45, SNEASEL
- db QUICK_ATTACK
- db SCREECH
- db FAINT_ATTACK
- db FURY_CUTTER
-
- db 48, CROBAT
- db TOXIC
- db BITE
- db CONFUSE_RAY
- db WING_ATTACK
-
- db 45, MAGNETON
- db THUNDER
- db SONICBOOM
- db THUNDER_WAVE
- db SWIFT
-
- db 46, GENGAR
- db MEAN_LOOK
- db CURSE
- db SHADOW_BALL
- db CONFUSE_RAY
-
- db 46, ALAKAZAM
- db RECOVER
- db FUTURE_SIGHT
- db PSYCHIC_M
- db REFLECT
-
- db 50, FERALIGATR
- db SURF
- db RAIN_DANCE
- db SLASH
- db SCREECH
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-GuitaristGroup:
-; ================================
-; ================
-
- ; GUITARIST (1)
- db "CLYDE@"
- db 0 ; normal
-
- ; party
- db 34, ELECTABUZZ
-
- db $ff ; end
-
-; ================
-
- ; GUITARIST (2)
- db "VINCENT@"
- db 0 ; normal
-
- ; party
- db 27, MAGNEMITE
- db 33, VOLTORB
- db 32, MAGNEMITE
- db 32, MAGNEMITE
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-HikerGroup:
-; ================================
-; ================
-
- ; HIKER (1)
- db "ANTHONY@"
- db 0 ; normal
-
- ; party
- db 16, GEODUDE
- db 18, MACHAMP
-
- db $ff ; end
-
-; ================
-
- ; HIKER (2)
- db "RUSSELL@"
- db 0 ; normal
-
- ; party
- db 4, GEODUDE
- db 6, GEODUDE
- db 8, GEODUDE
-
- db $ff ; end
-
-; ================
-
- ; HIKER (3)
- db "PHILLIP@"
- db 0 ; normal
-
- ; party
- db 23, GEODUDE
- db 23, GEODUDE
- db 23, GRAVELER
-
- db $ff ; end
-
-; ================
-
- ; HIKER (4)
- db "LEONARD@"
- db 0 ; normal
-
- ; party
- db 23, GEODUDE
- db 25, MACHOP
-
- db $ff ; end
-
-; ================
-
- ; HIKER (5)
- db "ANTHONY@"
- db 0 ; normal
-
- ; party
- db 11, GEODUDE
- db 11, MACHOP
-
- db $ff ; end
-
-; ================
-
- ; HIKER (6)
- db "BENJAMIN@"
- db 0 ; normal
-
- ; party
- db 14, DIGLETT
- db 14, GEODUDE
- db 16, DUGTRIO
-
- db $ff ; end
-
-; ================
-
- ; HIKER (7)
- db "ERIK@"
- db 0 ; normal
-
- ; party
- db 24, MACHOP
- db 27, GRAVELER
- db 27, MACHOP
-
- db $ff ; end
-
-; ================
-
- ; HIKER (8)
- db "MICHAEL@"
- db 0 ; normal
-
- ; party
- db 25, GEODUDE
- db 25, GRAVELER
- db 25, GOLEM
-
- db $ff ; end
-
-; ================
-
- ; HIKER (9)
- db "PARRY@"
- db 0 ; normal
-
- ; party
- db 35, ONIX
- db 33, SWINUB
-
- db $ff ; end
-
-; ================
-
- ; HIKER (10)
- db "TIMOTHY@"
- db 1 ; moves
-
- ; party
-
- db 27, DIGLETT
- db MAGNITUDE
- db DIG
- db SAND_ATTACK
- db SLASH
-
- db 27, DUGTRIO
- db MAGNITUDE
- db DIG
- db SAND_ATTACK
- db SLASH
-
- db $ff ; end
-
-; ================
-
- ; HIKER (11)
- db "BAILEY@"
- db 0 ; normal
-
- ; party
- db 13, GEODUDE
- db 13, GEODUDE
- db 13, GEODUDE
- db 13, GEODUDE
- db 13, GEODUDE
-
- db $ff ; end
-
-; ================
-
- ; HIKER (12)
- db "ANTHONY@"
- db 0 ; normal
-
- ; party
- db 25, GRAVELER
- db 27, GRAVELER
- db 29, MACHOKE
-
- db $ff ; end
-
-; ================
-
- ; HIKER (13)
- db "TIM@"
- db 0 ; normal
-
- ; party
- db 31, GRAVELER
- db 31, GRAVELER
- db 31, GRAVELER
-
- db $ff ; end
-
-; ================
-
- ; HIKER (14)
- db "NOLAND@"
- db 0 ; normal
-
- ; party
- db 31, SANDSLASH
- db 33, GOLEM
-
- db $ff ; end
-
-; ================
-
- ; HIKER (15)
- db "SIDNEY@"
- db 0 ; normal
-
- ; party
- db 34, DUGTRIO
- db 32, ONIX
-
- db $ff ; end
-
-; ================
-
- ; HIKER (16)
- db "KENNY@"
- db 0 ; normal
-
- ; party
- db 27, SANDSLASH
- db 29, GRAVELER
- db 31, GOLEM
- db 29, GRAVELER
-
- db $ff ; end
-
-; ================
-
- ; HIKER (17)
- db "JIM@"
- db 0 ; normal
-
- ; party
- db 35, MACHAMP
-
- db $ff ; end
-
-; ================
-
- ; HIKER (18)
- db "DANIEL@"
- db 0 ; normal
-
- ; party
- db 11, ONIX
-
- db $ff ; end
-
-; ================
-
- ; HIKER (19)
- db "PARRY@"
- db 1 ; moves
-
- ; party
-
- db 35, PILOSWINE
- db EARTHQUAKE
- db BLIZZARD
- db REST
- db TAKE_DOWN
-
- db 35, DUGTRIO
- db MAGNITUDE
- db DIG
- db MUD_SLAP
- db SLASH
-
- db 38, STEELIX
- db DIG
- db IRON_TAIL
- db SANDSTORM
- db SLAM
-
- db $ff ; end
-
-; ================
-
- ; HIKER (20)
- db "PARRY@"
- db 0 ; normal
-
- ; party
- db 29, ONIX
-
- db $ff ; end
-
-; ================
-
- ; HIKER (21)
- db "ANTHONY@"
- db 0 ; normal
-
- ; party
- db 30, GRAVELER
- db 30, GRAVELER
- db 32, MACHOKE
-
- db $ff ; end
-
-; ================
-
- ; HIKER (22)
- db "ANTHONY@"
- db 1 ; moves
-
- ; party
-
- db 34, GRAVELER
- db MAGNITUDE
- db SELFDESTRUCT
- db DEFENSE_CURL
- db ROLLOUT
-
- db 36, GOLEM
- db MAGNITUDE
- db SELFDESTRUCT
- db DEFENSE_CURL
- db ROLLOUT
-
- db 34, MACHOKE
- db KARATE_CHOP
- db VITAL_THROW
- db HEADBUTT
- db DIG
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-BikerGroup:
-; ================================
-; ================
-
- ; BIKER (1)
- db "BENNY@"
- db 0 ; normal
-
- ; party
- db 20, KOFFING
- db 20, KOFFING
- db 20, KOFFING
-
- db $ff ; end
-
-; ================
-
- ; BIKER (2)
- db "KAZU@"
- db 0 ; normal
-
- ; party
- db 20, KOFFING
- db 20, KOFFING
- db 20, KOFFING
-
- db $ff ; end
-
-; ================
-
- ; BIKER (3)
- db "DWAYNE@"
- db 0 ; normal
-
- ; party
- db 27, KOFFING
- db 28, KOFFING
- db 29, KOFFING
- db 30, KOFFING
-
- db $ff ; end
-
-; ================
-
- ; BIKER (4)
- db "HARRIS@"
- db 0 ; normal
-
- ; party
- db 34, FLAREON
-
- db $ff ; end
-
-; ================
-
- ; BIKER (5)
- db "ZEKE@"
- db 0 ; normal
-
- ; party
- db 32, KOFFING
- db 32, KOFFING
-
- db $ff ; end
-
-; ================
-
- ; BIKER (6)
- db "CHARLES@"
- db 0 ; normal
-
- ; party
- db 30, KOFFING
- db 30, CHARMELEON
- db 30, WEEZING
-
- db $ff ; end
-
-; ================
-
- ; BIKER (7)
- db "RILEY@"
- db 0 ; normal
-
- ; party
- db 34, WEEZING
-
- db $ff ; end
-
-; ================
-
- ; BIKER (8)
- db "JOEL@"
- db 0 ; normal
-
- ; party
- db 32, MAGMAR
- db 32, MAGMAR
-
- db $ff ; end
-
-; ================
-
- ; BIKER (9)
- db "GLENN@"
- db 0 ; normal
-
- ; party
- db 28, KOFFING
- db 30, MAGMAR
- db 32, WEEZING
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-BlaineGroup:
-; ================================
-; ================
-
- ; BLAINE (1)
- db "BLAINE@"
- db 1 ; moves
-
- ; party
-
- db 45, MAGCARGO
- db CURSE
- db SMOG
- db FLAMETHROWER
- db ROCK_SLIDE
-
- db 45, MAGMAR
- db THUNDERPUNCH
- db FIRE_PUNCH
- db SUNNY_DAY
- db CONFUSE_RAY
-
- db 50, RAPIDASH
- db QUICK_ATTACK
- db FIRE_SPIN
- db FURY_ATTACK
- db FIRE_BLAST
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-BurglarGroup:
-; ================================
-; ================
-
- ; BURGLAR (1)
- db "DUNCAN@"
- db 0 ; normal
-
- ; party
- db 23, KOFFING
- db 25, MAGMAR
- db 23, KOFFING
-
- db $ff ; end
-
-; ================
-
- ; BURGLAR (2)
- db "EDDIE@"
- db 1 ; moves
-
- ; party
-
- db 26, GROWLITHE
- db ROAR
- db EMBER
- db LEER
- db TAKE_DOWN
-
- db 24, KOFFING
- db TACKLE
- db SMOG
- db SLUDGE
- db SMOKESCREEN
-
- db $ff ; end
-
-; ================
-
- ; BURGLAR (3)
- db "COREY@"
- db 0 ; normal
-
- ; party
- db 25, KOFFING
- db 28, MAGMAR
- db 25, KOFFING
- db 30, KOFFING
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-FirebreatherGroup:
-; ================================
-; ================
-
- ; FIREBREATHER (1)
- db "OTIS@"
- db 0 ; normal
-
- ; party
- db 29, MAGMAR
- db 32, WEEZING
- db 29, MAGMAR
-
- db $ff ; end
-
-; ================
-
- ; FIREBREATHER (2)
- db "DICK@"
- db 0 ; normal
-
- ; party
- db 17, CHARMELEON
-
- db $ff ; end
-
-; ================
-
- ; FIREBREATHER (3)
- db "NED@"
- db 0 ; normal
-
- ; party
- db 15, KOFFING
- db 16, GROWLITHE
- db 15, KOFFING
-
- db $ff ; end
-
-; ================
-
- ; FIREBREATHER (4)
- db "BURT@"
- db 0 ; normal
-
- ; party
- db 32, KOFFING
- db 32, SLUGMA
-
- db $ff ; end
-
-; ================
-
- ; FIREBREATHER (5)
- db "BILL@"
- db 0 ; normal
-
- ; party
- db 6, KOFFING
- db 6, KOFFING
-
- db $ff ; end
-
-; ================
-
- ; FIREBREATHER (6)
- db "WALT@"
- db 0 ; normal
-
- ; party
- db 11, MAGMAR
- db 13, MAGMAR
-
- db $ff ; end
-
-; ================
-
- ; FIREBREATHER (7)
- db "RAY@"
- db 0 ; normal
-
- ; party
- db 9, VULPIX
-
- db $ff ; end
-
-; ================
-
- ; FIREBREATHER (8)
- db "LYLE@"
- db 0 ; normal
-
- ; party
- db 28, KOFFING
- db 31, FLAREON
- db 28, KOFFING
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-JugglerGroup:
-; ================================
-; ================
-
- ; JUGGLER (1)
- db "IRWIN@"
- db 0 ; normal
-
- ; party
- db 2, VOLTORB
- db 6, VOLTORB
- db 10, VOLTORB
- db 14, VOLTORB
-
- db $ff ; end
-
-; ================
-
- ; JUGGLER (2)
- db "FRITZ@"
- db 0 ; normal
-
- ; party
- db 29, MR__MIME
- db 29, MAGMAR
- db 29, MACHOKE
-
- db $ff ; end
-
-; ================
-
- ; JUGGLER (3)
- db "HORTON@"
- db 0 ; normal
-
- ; party
- db 33, ELECTRODE
- db 33, ELECTRODE
- db 33, ELECTRODE
- db 33, ELECTRODE
-
- db $ff ; end
-
-; ================
-
- ; JUGGLER (4)
- db "IRWIN@"
- db 0 ; normal
-
- ; party
- db 6, VOLTORB
- db 10, VOLTORB
- db 14, VOLTORB
- db 18, VOLTORB
-
- db $ff ; end
-
-; ================
-
- ; JUGGLER (5)
- db "IRWIN@"
- db 0 ; normal
-
- ; party
- db 18, VOLTORB
- db 22, VOLTORB
- db 26, VOLTORB
- db 30, ELECTRODE
-
- db $ff ; end
-
-; ================
-
- ; JUGGLER (6)
- db "IRWIN@"
- db 0 ; normal
-
- ; party
- db 18, VOLTORB
- db 22, VOLTORB
- db 26, VOLTORB
- db 30, ELECTRODE
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-BlackbeltGroup:
-; ================================
-; ================
-
- ; BLACKBELT_T (1)
- db "KENJI@"
- db 0 ; normal
-
- ; party
- db 27, ONIX
- db 30, HITMONLEE
- db 27, ONIX
- db 32, MACHOKE
-
- db $ff ; end
-
-; ================
-
- ; BLACKBELT_T (2)
- db "YOSHI@"
- db 1 ; moves
-
- ; party
-
- db 27, HITMONLEE
- db DOUBLE_KICK
- db MEDITATE
- db JUMP_KICK
- db FOCUS_ENERGY
-
- db $ff ; end
-
-; ================
-
- ; BLACKBELT_T (3)
- db "KENJI@"
- db 1 ; moves
-
- ; party
-
- db 33, ONIX
- db BIND
- db ROCK_THROW
- db TOXIC
- db DIG
-
- db 38, MACHAMP
- db HEADBUTT
- db SWAGGER
- db THUNDERPUNCH
- db VITAL_THROW
-
- db 33, STEELIX
- db EARTHQUAKE
- db ROCK_THROW
- db IRON_TAIL
- db SANDSTORM
-
- db 36, HITMONLEE
- db DOUBLE_TEAM
- db HI_JUMP_KICK
- db MUD_SLAP
- db SWIFT
-
- db $ff ; end
-
-; ================
-
- ; BLACKBELT_T (4)
- db "LAO@"
- db 1 ; moves
-
- ; party
-
- db 27, HITMONCHAN
- db COMET_PUNCH
- db THUNDERPUNCH
- db ICE_PUNCH
- db FIRE_PUNCH
-
- db $ff ; end
-
-; ================
-
- ; BLACKBELT_T (5)
- db "NOB@"
- db 1 ; moves
-
- ; party
-
- db 25, MACHOP
- db LEER
- db FOCUS_ENERGY
- db KARATE_CHOP
- db SEISMIC_TOSS
-
- db 25, MACHOKE
- db LEER
- db KARATE_CHOP
- db SEISMIC_TOSS
- db ROCK_SLIDE
-
- db $ff ; end
-
-; ================
-
- ; BLACKBELT_T (6)
- db "KIYO@"
- db 0 ; normal
-
- ; party
- db 34, HITMONLEE
- db 34, HITMONCHAN
-
- db $ff ; end
-
-; ================
-
- ; BLACKBELT_T (7)
- db "LUNG@"
- db 0 ; normal
-
- ; party
- db 23, MANKEY
- db 23, MANKEY
- db 25, PRIMEAPE
-
- db $ff ; end
-
-; ================
-
- ; BLACKBELT_T (8)
- db "KENJI@"
- db 0 ; normal
-
- ; party
- db 28, MACHOKE
-
- db $ff ; end
-
-; ================
-
- ; BLACKBELT_T (9)
- db "WAI@"
- db 0 ; normal
-
- ; party
- db 30, MACHOKE
- db 32, MACHOKE
- db 34, MACHOKE
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-ExecutiveMGroup:
-; ================================
-; ================
-
- ; EXECUTIVEM (1)
- db "EXECUTIVE@"
- db 1 ; moves
-
- ; party
-
- db 33, HOUNDOUR
- db EMBER
- db ROAR
- db BITE
- db FAINT_ATTACK
-
- db 33, KOFFING
- db TACKLE
- db SLUDGE
- db SMOKESCREEN
- db HAZE
-
- db 35, HOUNDOOM
- db EMBER
- db SMOG
- db BITE
- db FAINT_ATTACK
-
- db $ff ; end
-
-; ================
-
- ; EXECUTIVEM (2)
- db "EXECUTIVE@"
- db 1 ; moves
-
- ; party
-
- db 36, GOLBAT
- db LEECH_LIFE
- db BITE
- db CONFUSE_RAY
- db WING_ATTACK
-
- db $ff ; end
-
-; ================
-
- ; EXECUTIVEM (3)
- db "EXECUTIVE@"
- db 1 ; moves
-
- ; party
-
- db 30, KOFFING
- db TACKLE
- db SELFDESTRUCT
- db SLUDGE
- db SMOKESCREEN
-
- db 30, KOFFING
- db TACKLE
- db SELFDESTRUCT
- db SLUDGE
- db SMOKESCREEN
-
- db 30, KOFFING
- db TACKLE
- db SELFDESTRUCT
- db SLUDGE
- db SMOKESCREEN
-
- db 32, WEEZING
- db TACKLE
- db EXPLOSION
- db SLUDGE
- db SMOKESCREEN
-
- db 30, KOFFING
- db TACKLE
- db SELFDESTRUCT
- db SLUDGE
- db SMOKESCREEN
-
- db 30, KOFFING
- db TACKLE
- db SMOG
- db SLUDGE
- db SMOKESCREEN
-
- db $ff ; end
-
-; ================
-
- ; EXECUTIVEM (4)
- db "EXECUTIVE@"
- db 0 ; normal
-
- ; party
- db 22, ZUBAT
- db 24, RATICATE
- db 22, KOFFING
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-PsychicGroup:
-; ================================
-; ================
-
- ; PSYCHIC_T (1)
- db "NATHAN@"
- db 0 ; normal
-
- ; party
- db 26, GIRAFARIG
-
- db $ff ; end
-
-; ================
-
- ; PSYCHIC_T (2)
- db "FRANKLIN@"
- db 0 ; normal
-
- ; party
- db 37, KADABRA
-
- db $ff ; end
-
-; ================
-
- ; PSYCHIC_T (3)
- db "HERMAN@"
- db 0 ; normal
-
- ; party
- db 30, EXEGGCUTE
- db 30, EXEGGCUTE
- db 30, EXEGGUTOR
-
- db $ff ; end
-
-; ================
-
- ; PSYCHIC_T (4)
- db "FIDEL@"
- db 0 ; normal
-
- ; party
- db 34, XATU
-
- db $ff ; end
-
-; ================
-
- ; PSYCHIC_T (5)
- db "GREG@"
- db 1 ; moves
-
- ; party
-
- db 17, DROWZEE
- db HYPNOSIS
- db DISABLE
- db DREAM_EATER
- db 0
-
- db $ff ; end
-
-; ================
-
- ; PSYCHIC_T (6)
- db "NORMAN@"
- db 1 ; moves
-
- ; party
-
- db 17, SLOWPOKE
- db TACKLE
- db GROWL
- db WATER_GUN
- db 0
-
- db 20, SLOWPOKE
- db CURSE
- db BODY_SLAM
- db WATER_GUN
- db CONFUSION
-
- db $ff ; end
-
-; ================
-
- ; PSYCHIC_T (7)
- db "MARK@"
- db 1 ; moves
-
- ; party
-
- db 13, ABRA
- db TELEPORT
- db FLASH
- db 0
- db 0
-
- db 13, ABRA
- db TELEPORT
- db FLASH
- db 0
- db 0
-
- db 15, KADABRA
- db TELEPORT
- db KINESIS
- db CONFUSION
- db 0
-
- db $ff ; end
-
-; ================
-
- ; PSYCHIC_T (8)
- db "PHIL@"
- db 1 ; moves
-
- ; party
-
- db 24, NATU
- db LEER
- db NIGHT_SHADE
- db FUTURE_SIGHT
- db CONFUSE_RAY
-
- db 26, KADABRA
- db DISABLE
- db PSYBEAM
- db RECOVER
- db FUTURE_SIGHT
-
- db $ff ; end
-
-; ================
-
- ; PSYCHIC_T (9)
- db "RICHARD@"
- db 0 ; normal
-
- ; party
- db 36, ESPEON
-
- db $ff ; end
-
-; ================
-
- ; PSYCHIC_T (10)
- db "GILBERT@"
- db 0 ; normal
-
- ; party
- db 30, STARMIE
- db 30, EXEGGCUTE
- db 34, GIRAFARIG
-
- db $ff ; end
-
-; ================
-
- ; PSYCHIC_T (11)
- db "JARED@"
- db 0 ; normal
-
- ; party
- db 32, MR__MIME
- db 32, EXEGGCUTE
- db 35, EXEGGCUTE
-
- db $ff ; end
-
-; ================
-
- ; PSYCHIC_T (12)
- db "RODNEY@"
- db 0 ; normal
-
- ; party
- db 29, DROWZEE
- db 33, HYPNO
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-PicnickerGroup:
-; ================================
-; ================
-
- ; PICNICKER (1)
- db "LIZ@"
- db 0 ; normal
-
- ; party
- db 9, NIDORAN_F
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (2)
- db "GINA@"
- db 0 ; normal
-
- ; party
- db 9, HOPPIP
- db 9, HOPPIP
- db 12, BULBASAUR
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (3)
- db "BROOKE@"
- db 1 ; moves
-
- ; party
-
- db 16, PIKACHU
- db THUNDERSHOCK
- db GROWL
- db QUICK_ATTACK
- db DOUBLE_TEAM
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (4)
- db "KIM@"
- db 0 ; normal
-
- ; party
- db 15, VULPIX
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (5)
- db "CINDY@"
- db 0 ; normal
-
- ; party
- db 36, NIDOQUEEN
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (6)
- db "HOPE@"
- db 0 ; normal
-
- ; party
- db 34, FLAAFFY
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (7)
- db "SHARON@"
- db 0 ; normal
-
- ; party
- db 31, FURRET
- db 33, RAPIDASH
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (8)
- db "DEBRA@"
- db 0 ; normal
-
- ; party
- db 33, SEAKING
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (9)
- db "GINA@"
- db 0 ; normal
-
- ; party
- db 14, HOPPIP
- db 14, HOPPIP
- db 17, IVYSAUR
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (10)
- db "ERIN@"
- db 0 ; normal
-
- ; party
- db 16, PONYTA
- db 16, PONYTA
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (11)
- db "LIZ@"
- db 0 ; normal
-
- ; party
- db 15, WEEPINBELL
- db 15, NIDORINA
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (12)
- db "LIZ@"
- db 0 ; normal
-
- ; party
- db 19, WEEPINBELL
- db 19, NIDORINO
- db 21, NIDOQUEEN
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (13)
- db "HEIDI@"
- db 0 ; normal
-
- ; party
- db 32, SKIPLOOM
- db 32, SKIPLOOM
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (14)
- db "EDNA@"
- db 0 ; normal
-
- ; party
- db 30, NIDORINA
- db 34, RAICHU
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (15)
- db "GINA@"
- db 0 ; normal
-
- ; party
- db 26, SKIPLOOM
- db 26, SKIPLOOM
- db 29, IVYSAUR
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (16)
- db "TIFFANY@"
- db 1 ; moves
-
- ; party
-
- db 31, CLEFAIRY
- db ENCORE
- db SING
- db DOUBLESLAP
- db MINIMIZE
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (17)
- db "TIFFANY@"
- db 1 ; moves
-
- ; party
-
- db 37, CLEFAIRY
- db ENCORE
- db DOUBLESLAP
- db MINIMIZE
- db METRONOME
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (18)
- db "ERIN@"
- db 0 ; normal
-
- ; party
- db 32, PONYTA
- db 32, PONYTA
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (19)
- db "TANYA@"
- db 0 ; normal
-
- ; party
- db 37, EXEGGUTOR
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (20)
- db "TIFFANY@"
- db 1 ; moves
-
- ; party
-
- db 20, CLEFAIRY
- db ENCORE
- db SING
- db DOUBLESLAP
- db MINIMIZE
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (21)
- db "ERIN@"
- db 1 ; moves
-
- ; party
-
- db 36, PONYTA
- db DOUBLE_TEAM
- db STOMP
- db FIRE_SPIN
- db SUNNY_DAY
-
- db 34, RAICHU
- db SWIFT
- db MUD_SLAP
- db QUICK_ATTACK
- db THUNDERBOLT
-
- db 36, PONYTA
- db DOUBLE_TEAM
- db STOMP
- db FIRE_SPIN
- db SUNNY_DAY
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (22)
- db "LIZ@"
- db 0 ; normal
-
- ; party
- db 24, WEEPINBELL
- db 26, NIDORINO
- db 26, NIDOQUEEN
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (23)
- db "LIZ@"
- db 1 ; moves
-
- ; party
-
- db 30, WEEPINBELL
- db SLEEP_POWDER
- db POISONPOWDER
- db STUN_SPORE
- db SLUDGE_BOMB
-
- db 32, NIDOKING
- db EARTHQUAKE
- db DOUBLE_KICK
- db POISON_STING
- db IRON_TAIL
-
- db 32, NIDOQUEEN
- db EARTHQUAKE
- db DOUBLE_KICK
- db TAIL_WHIP
- db BODY_SLAM
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (24)
- db "GINA@"
- db 0 ; normal
-
- ; party
- db 30, SKIPLOOM
- db 30, SKIPLOOM
- db 32, IVYSAUR
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (25)
- db "GINA@"
- db 1 ; moves
-
- ; party
-
- db 33, JUMPLUFF
- db STUN_SPORE
- db SUNNY_DAY
- db LEECH_SEED
- db COTTON_SPORE
-
- db 33, JUMPLUFF
- db SUNNY_DAY
- db SLEEP_POWDER
- db LEECH_SEED
- db COTTON_SPORE
-
- db 38, VENUSAUR
- db SOLARBEAM
- db RAZOR_LEAF
- db HEADBUTT
- db MUD_SLAP
-
- db $ff ; end
-
-; ================
-
- ; PICNICKER (26)
- db "TIFFANY@"
- db 1 ; moves
-
- ; party
-
- db 43, CLEFAIRY
- db METRONOME
- db ENCORE
- db MOONLIGHT
- db MINIMIZE
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-CamperGroup:
-; ================================
-; ================
-
- ; CAMPER (1)
- db "ROLAND@"
- db 0 ; normal
-
- ; party
- db 9, NIDORAN_M
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (2)
- db "TODD@"
- db 0 ; normal
-
- ; party
- db 14, PSYDUCK
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (3)
- db "IVAN@"
- db 0 ; normal
-
- ; party
- db 10, DIGLETT
- db 10, ZUBAT
- db 14, DIGLETT
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (4)
- db "ELLIOT@"
- db 0 ; normal
-
- ; party
- db 13, SANDSHREW
- db 15, MARILL
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (5)
- db "BARRY@"
- db 0 ; normal
-
- ; party
- db 36, NIDOKING
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (6)
- db "LLOYD@"
- db 0 ; normal
-
- ; party
- db 34, NIDOKING
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (7)
- db "DEAN@"
- db 0 ; normal
-
- ; party
- db 33, GOLDUCK
- db 31, SANDSLASH
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (8)
- db "SID@"
- db 0 ; normal
-
- ; party
- db 32, DUGTRIO
- db 29, PRIMEAPE
- db 29, POLIWRATH
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (9)
- db "HARVEY@"
- db 0 ; normal
-
- ; party
- db 15, NIDORINO
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (10)
- db "DALE@"
- db 0 ; normal
-
- ; party
- db 15, NIDORINO
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (11)
- db "TED@"
- db 0 ; normal
-
- ; party
- db 17, MANKEY
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (12)
- db "TODD@"
- db 0 ; normal
-
- ; party
- db 17, GEODUDE
- db 17, GEODUDE
- db 23, PSYDUCK
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (13)
- db "TODD@"
- db 0 ; normal
-
- ; party
- db 23, GEODUDE
- db 23, GEODUDE
- db 26, PSYDUCK
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (14)
- db "THOMAS@"
- db 0 ; normal
-
- ; party
- db 33, GRAVELER
- db 36, GRAVELER
- db 40, GOLBAT
- db 42, GOLDUCK
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (15)
- db "LEROY@"
- db 0 ; normal
-
- ; party
- db 33, GRAVELER
- db 36, GRAVELER
- db 40, GOLBAT
- db 42, GOLDUCK
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (16)
- db "DAVID@"
- db 0 ; normal
-
- ; party
- db 33, GRAVELER
- db 36, GRAVELER
- db 40, GOLBAT
- db 42, GOLDUCK
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (17)
- db "JOHN@"
- db 0 ; normal
-
- ; party
- db 33, GRAVELER
- db 36, GRAVELER
- db 40, GOLBAT
- db 42, GOLDUCK
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (18)
- db "JERRY@"
- db 0 ; normal
-
- ; party
- db 37, SANDSLASH
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (19)
- db "SPENCER@"
- db 0 ; normal
-
- ; party
- db 17, SANDSHREW
- db 17, SANDSLASH
- db 19, ZUBAT
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (20)
- db "TODD@"
- db 0 ; normal
-
- ; party
- db 30, GRAVELER
- db 30, GRAVELER
- db 30, SLUGMA
- db 32, PSYDUCK
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (21)
- db "TODD@"
- db 1 ; moves
-
- ; party
-
- db 33, GRAVELER
- db SELFDESTRUCT
- db ROCK_THROW
- db HARDEN
- db MAGNITUDE
-
- db 33, GRAVELER
- db SELFDESTRUCT
- db ROCK_THROW
- db HARDEN
- db MAGNITUDE
-
- db 36, MAGCARGO
- db ROCK_THROW
- db HARDEN
- db AMNESIA
- db FLAMETHROWER
-
- db 34, GOLDUCK
- db DISABLE
- db PSYCHIC_M
- db SURF
- db PSYCH_UP
-
- db $ff ; end
-
-; ================
-
- ; CAMPER (22)
- db "QUENTIN@"
- db 0 ; normal
-
- ; party
- db 30, FEAROW
- db 30, PRIMEAPE
- db 30, TAUROS
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-ExecutiveFGroup:
-; ================================
-; ================
-
- ; EXECUTIVEF (1)
- db "EXECUTIVE@"
- db 1 ; moves
-
- ; party
-
- db 32, ARBOK
- db WRAP
- db POISON_STING
- db BITE
- db GLARE
-
- db 32, VILEPLUME
- db ABSORB
- db SWEET_SCENT
- db SLEEP_POWDER
- db ACID
-
- db 32, MURKROW
- db PECK
- db PURSUIT
- db HAZE
- db NIGHT_SHADE
-
- db $ff ; end
-
-; ================
-
- ; EXECUTIVEF (2)
- db "EXECUTIVE@"
- db 1 ; moves
-
- ; party
-
- db 23, ARBOK
- db WRAP
- db LEER
- db POISON_STING
- db BITE
-
- db 23, GLOOM
- db ABSORB
- db SWEET_SCENT
- db SLEEP_POWDER
- db ACID
-
- db 25, MURKROW
- db PECK
- db PURSUIT
- db HAZE
- db 0
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-SageGroup:
-; ================================
-; ================
-
- ; SAGE (1)
- db "CHOW@"
- db 0 ; normal
-
- ; party
- db 3, BELLSPROUT
- db 3, BELLSPROUT
- db 3, BELLSPROUT
-
- db $ff ; end
-
-; ================
-
- ; SAGE (2)
- db "NICO@"
- db 0 ; normal
-
- ; party
- db 3, BELLSPROUT
- db 3, BELLSPROUT
- db 3, BELLSPROUT
-
- db $ff ; end
-
-; ================
-
- ; SAGE (3)
- db "JIN@"
- db 0 ; normal
-
- ; party
- db 6, BELLSPROUT
-
- db $ff ; end
-
-; ================
-
- ; SAGE (4)
- db "TROY@"
- db 0 ; normal
-
- ; party
- db 7, BELLSPROUT
- db 7, HOOTHOOT
-
- db $ff ; end
-
-; ================
-
- ; SAGE (5)
- db "JEFFREY@"
- db 0 ; normal
-
- ; party
- db 22, HAUNTER
-
- db $ff ; end
-
-; ================
-
- ; SAGE (6)
- db "PING@"
- db 0 ; normal
-
- ; party
- db 16, GASTLY
- db 16, GASTLY
- db 16, GASTLY
- db 16, GASTLY
- db 16, GASTLY
-
- db $ff ; end
-
-; ================
-
- ; SAGE (7)
- db "EDMOND@"
- db 0 ; normal
-
- ; party
- db 3, BELLSPROUT
- db 3, BELLSPROUT
- db 3, BELLSPROUT
-
- db $ff ; end
-
-; ================
-
- ; SAGE (8)
- db "NEAL@"
- db 0 ; normal
-
- ; party
- db 6, BELLSPROUT
-
- db $ff ; end
-
-; ================
-
- ; SAGE (9)
- db "LI@"
- db 0 ; normal
-
- ; party
- db 7, BELLSPROUT
- db 7, BELLSPROUT
- db 10, HOOTHOOT
-
- db $ff ; end
-
-; ================
-
- ; SAGE (10)
- db "GAKU@"
- db 0 ; normal
-
- ; party
- db 32, NOCTOWL
- db 32, FLAREON
-
- db $ff ; end
-
-; ================
-
- ; SAGE (11)
- db "MASA@"
- db 0 ; normal
-
- ; party
- db 32, NOCTOWL
- db 32, JOLTEON
-
- db $ff ; end
-
-; ================
-
- ; SAGE (12)
- db "KOJI@"
- db 0 ; normal
-
- ; party
- db 32, NOCTOWL
- db 32, VAPOREON
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-MediumGroup:
-; ================================
-; ================
-
- ; MEDIUM (1)
- db "MARTHA@"
- db 0 ; normal
-
- ; party
- db 18, GASTLY
- db 20, HAUNTER
- db 20, GASTLY
-
- db $ff ; end
-
-; ================
-
- ; MEDIUM (2)
- db "GRACE@"
- db 0 ; normal
-
- ; party
- db 20, HAUNTER
- db 20, HAUNTER
-
- db $ff ; end
-
-; ================
-
- ; MEDIUM (3)
- db "BETHANY@"
- db 0 ; normal
-
- ; party
- db 25, HAUNTER
-
- db $ff ; end
-
-; ================
-
- ; MEDIUM (4)
- db "MARGRET@"
- db 0 ; normal
-
- ; party
- db 25, HAUNTER
-
- db $ff ; end
-
-; ================
-
- ; MEDIUM (5)
- db "ETHEL@"
- db 0 ; normal
-
- ; party
- db 25, HAUNTER
-
- db $ff ; end
-
-; ================
-
- ; MEDIUM (6)
- db "REBECCA@"
- db 0 ; normal
-
- ; party
- db 35, DROWZEE
- db 35, HYPNO
-
- db $ff ; end
-
-; ================
-
- ; MEDIUM (7)
- db "DORIS@"
- db 0 ; normal
-
- ; party
- db 34, SLOWPOKE
- db 36, SLOWBRO
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-BoarderGroup:
-; ================================
-; ================
-
- ; BOARDER (1)
- db "RONALD@"
- db 0 ; normal
-
- ; party
- db 24, SEEL
- db 25, DEWGONG
- db 24, SEEL
-
- db $ff ; end
-
-; ================
-
- ; BOARDER (2)
- db "BRAD@"
- db 0 ; normal
-
- ; party
- db 26, SWINUB
- db 26, SWINUB
-
- db $ff ; end
-
-; ================
-
- ; BOARDER (3)
- db "DOUGLAS@"
- db 0 ; normal
-
- ; party
- db 24, SHELLDER
- db 25, CLOYSTER
- db 24, SHELLDER
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-PokefanMGroup:
-; ================================
-; ================
-
- ; POKEFANM (1)
- db "WILLIAM@"
- db 2 ; item
-
- ; party
- db 14, RAICHU, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANM (2)
- db "DEREK@"
- db 2 ; item
-
- ; party
- db 17, PIKACHU, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANM (3)
- db "ROBERT@"
- db 2 ; item
-
- ; party
- db 33, QUAGSIRE, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANM (4)
- db "JOSHUA@"
- db 2 ; item
-
- ; party
- db 23, PIKACHU, BERRY
- db 23, PIKACHU, BERRY
- db 23, PIKACHU, BERRY
- db 23, PIKACHU, BERRY
- db 23, PIKACHU, BERRY
- db 23, PIKACHU, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANM (5)
- db "CARTER@"
- db 2 ; item
-
- ; party
- db 29, BULBASAUR, BERRY
- db 29, CHARMANDER, BERRY
- db 29, SQUIRTLE, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANM (6)
- db "TREVOR@"
- db 2 ; item
-
- ; party
- db 33, PSYDUCK, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANM (7)
- db "BRANDON@"
- db 2 ; item
-
- ; party
- db 13, SNUBBULL, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANM (8)
- db "JEREMY@"
- db 2 ; item
-
- ; party
- db 28, MEOWTH, BERRY
- db 28, MEOWTH, BERRY
- db 28, MEOWTH, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANM (9)
- db "COLIN@"
- db 2 ; item
-
- ; party
- db 32, DELIBIRD, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANM (10)
- db "DEREK@"
- db 2 ; item
-
- ; party
- db 19, PIKACHU, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANM (11)
- db "DEREK@"
- db 2 ; item
-
- ; party
- db 36, PIKACHU, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANM (12)
- db "ALEX@"
- db 2 ; item
-
- ; party
- db 29, NIDOKING, BERRY
- db 29, SLOWKING, BERRY
- db 29, SEAKING, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANM (13)
- db "REX@"
- db 2 ; item
-
- ; party
- db 35, PHANPY, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANM (14)
- db "ALLAN@"
- db 2 ; item
-
- ; party
- db 35, TEDDIURSA, BERRY
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-KimonoGirlGroup:
-; ================================
-; ================
-
- ; KIMONO_GIRL (1)
- db "NAOKO@"
- db 0 ; normal
-
- ; party
- db 20, SKIPLOOM
- db 20, VULPIX
- db 18, SKIPLOOM
-
- db $ff ; end
-
-; ================
-
- ; KIMONO_GIRL (2)
- db "NAOKO@"
- db 0 ; normal
-
- ; party
- db 17, FLAREON
-
- db $ff ; end
-
-; ================
-
- ; KIMONO_GIRL (3)
- db "SAYO@"
- db 0 ; normal
-
- ; party
- db 17, ESPEON
-
- db $ff ; end
-
-; ================
-
- ; KIMONO_GIRL (4)
- db "ZUKI@"
- db 0 ; normal
-
- ; party
- db 17, UMBREON
-
- db $ff ; end
-
-; ================
-
- ; KIMONO_GIRL (5)
- db "KUNI@"
- db 0 ; normal
-
- ; party
- db 17, VAPOREON
-
- db $ff ; end
-
-; ================
-
- ; KIMONO_GIRL (6)
- db "MIKI@"
- db 0 ; normal
-
- ; party
- db 17, JOLTEON
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-TwinsGroup:
-; ================================
-; ================
-
- ; TWINS (1)
- db "AMY & MAY@"
- db 0 ; normal
-
- ; party
- db 10, SPINARAK
- db 10, LEDYBA
-
- db $ff ; end
-
-; ================
-
- ; TWINS (2)
- db "ANN & ANNE@"
- db 1 ; moves
-
- ; party
-
- db 16, CLEFAIRY
- db GROWL
- db ENCORE
- db DOUBLESLAP
- db METRONOME
-
- db 16, JIGGLYPUFF
- db SING
- db DEFENSE_CURL
- db POUND
- db DISABLE
-
- db $ff ; end
-
-; ================
-
- ; TWINS (3)
- db "ANN & ANNE@"
- db 1 ; moves
-
- ; party
-
- db 16, JIGGLYPUFF
- db SING
- db DEFENSE_CURL
- db POUND
- db DISABLE
-
- db 16, CLEFAIRY
- db GROWL
- db ENCORE
- db DOUBLESLAP
- db METRONOME
-
- db $ff ; end
-
-; ================
-
- ; TWINS (4)
- db "AMY & MAY@"
- db 0 ; normal
-
- ; party
- db 10, LEDYBA
- db 10, SPINARAK
-
- db $ff ; end
-
-; ================
-
- ; TWINS (5)
- db "JO & ZOE@"
- db 0 ; normal
-
- ; party
- db 35, VICTREEBEL
- db 35, VILEPLUME
-
- db $ff ; end
-
-; ================
-
- ; TWINS (6)
- db "JO & ZOE@"
- db 0 ; normal
-
- ; party
- db 35, VILEPLUME
- db 35, VICTREEBEL
-
- db $ff ; end
-
-; ================
-
- ; TWINS (7)
- db "MEG & PEG@"
- db 0 ; normal
-
- ; party
- db 31, TEDDIURSA
- db 31, PHANPY
-
- db $ff ; end
-
-; ================
-
- ; TWINS (8)
- db "MEG & PEG@"
- db 0 ; normal
-
- ; party
- db 31, PHANPY
- db 31, TEDDIURSA
-
- db $ff ; end
-
-; ================
-
- ; TWINS (9)
- db "LEA & PIA@"
- db 1 ; moves
-
- ; party
-
- db 35, DRATINI
- db THUNDER_WAVE
- db TWISTER
- db FLAMETHROWER
- db HEADBUTT
-
- db 35, DRATINI
- db THUNDER_WAVE
- db TWISTER
- db ICE_BEAM
- db HEADBUTT
-
- db $ff ; end
-
-; ================
-
- ; TWINS (10)
- db "LEA & PIA@"
- db 1 ; moves
-
- ; party
-
- db 38, DRATINI
- db THUNDER_WAVE
- db TWISTER
- db ICE_BEAM
- db HEADBUTT
-
- db 38, DRATINI
- db THUNDER_WAVE
- db TWISTER
- db FLAMETHROWER
- db HEADBUTT
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-PokefanFGroup:
-; ================================
-; ================
-
- ; POKEFANF (1)
- db "BEVERLY@"
- db 2 ; item
-
- ; party
- db 14, SNUBBULL, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANF (2)
- db "RUTH@"
- db 2 ; item
-
- ; party
- db 17, PIKACHU, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANF (3)
- db "BEVERLY@"
- db 2 ; item
-
- ; party
- db 18, SNUBBULL, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANF (4)
- db "BEVERLY@"
- db 2 ; item
-
- ; party
- db 30, GRANBULL, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANF (5)
- db "GEORGIA@"
- db 2 ; item
-
- ; party
- db 23, SENTRET, BERRY
- db 23, SENTRET, BERRY
- db 23, SENTRET, BERRY
- db 28, FURRET, BERRY
- db 23, SENTRET, BERRY
-
- db $ff ; end
-
-; ================
-
- ; POKEFANF (6)
- db "JAIME@"
- db 2 ; item
-
- ; party
- db 16, MEOWTH, BERRY
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-RedGroup:
-; ================================
-; ================
-
- ; RED (1)
- db "RED@"
- db 1 ; moves
-
- ; party
-
- db 81, PIKACHU
- db CHARM
- db QUICK_ATTACK
- db THUNDERBOLT
- db THUNDER
-
- db 73, ESPEON
- db MUD_SLAP
- db REFLECT
- db SWIFT
- db PSYCHIC_M
-
- db 75, SNORLAX
- db AMNESIA
- db SNORE
- db REST
- db BODY_SLAM
-
- db 77, VENUSAUR
- db SUNNY_DAY
- db GIGA_DRAIN
- db SYNTHESIS
- db SOLARBEAM
-
- db 77, CHARIZARD
- db FLAMETHROWER
- db WING_ATTACK
- db SLASH
- db FIRE_SPIN
-
- db 77, BLASTOISE
- db RAIN_DANCE
- db SURF
- db BLIZZARD
- db WHIRLPOOL
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-BlueGroup:
-; ================================
-; ================
-
- ; BLUE (1)
- db "BLUE@"
- db 1 ; moves
-
- ; party
-
- db 56, PIDGEOT
- db QUICK_ATTACK
- db WHIRLWIND
- db WING_ATTACK
- db MIRROR_MOVE
-
- db 54, ALAKAZAM
- db DISABLE
- db RECOVER
- db PSYCHIC_M
- db REFLECT
-
- db 56, RHYDON
- db FURY_ATTACK
- db SANDSTORM
- db ROCK_SLIDE
- db EARTHQUAKE
-
- db 58, GYARADOS
- db TWISTER
- db HYDRO_PUMP
- db RAIN_DANCE
- db HYPER_BEAM
-
- db 58, EXEGGUTOR
- db SUNNY_DAY
- db LEECH_SEED
- db EGG_BOMB
- db SOLARBEAM
-
- db 58, ARCANINE
- db ROAR
- db SWIFT
- db FLAMETHROWER
- db EXTREMESPEED
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-OfficerGroup:
-; ================================
-; ================
-
- ; OFFICER (1)
- db "KEITH@"
- db 0 ; normal
-
- ; party
- db 17, GROWLITHE
-
- db $ff ; end
-
-; ================
-
- ; OFFICER (2)
- db "DIRK@"
- db 0 ; normal
-
- ; party
- db 14, GROWLITHE
- db 14, GROWLITHE
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-GruntFGroup:
-; ================================
-; ================
-
- ; GRUNTF (1)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 9, ZUBAT
- db 11, EKANS
-
- db $ff ; end
-
-; ================
-
- ; GRUNTF (2)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 26, ARBOK
-
- db $ff ; end
-
-; ================
-
- ; GRUNTF (3)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 25, GLOOM
- db 25, GLOOM
-
- db $ff ; end
-
-; ================
-
- ; GRUNTF (4)
- db "GRUNT@"
- db 0 ; normal
-
- ; party
- db 21, EKANS
- db 23, ODDISH
- db 21, EKANS
- db 24, GLOOM
-
- db $ff ; end
-
-; ================
-
- ; GRUNTF (5)
- db "GRUNT@"
- db 1 ; moves
-
- ; party
-
- db 18, EKANS
- db WRAP
- db LEER
- db POISON_STING
- db BITE
-
- db 18, GLOOM
- db ABSORB
- db SWEET_SCENT
- db STUN_SPORE
- db SLEEP_POWDER
-
- db $ff ; end
-
-; ================
-; ================================
-
-
-MysticalmanGroup:
-; ================================
-; ================
-
- ; MYSTICALMAN (1)
- db "EUSINE@"
- db 1 ; moves
-
- ; party
-
- db 23, DROWZEE
- db DREAM_EATER
- db HYPNOSIS
- db DISABLE
- db CONFUSION
-
- db 23, HAUNTER
- db LICK
- db HYPNOSIS
- db MEAN_LOOK
- db CURSE
-
- db 25, ELECTRODE
- db SCREECH
- db SONICBOOM
- db THUNDER
- db ROLLOUT
-
- db $ff ; end
-
-; ================
-; ================================
diff --git a/unknown/013a47.asm b/unknown/013a47.asm
deleted file mode 100755
index dd0d2b722..000000000
--- a/unknown/013a47.asm
+++ /dev/null
@@ -1,229 +0,0 @@
-CorrectErrorsInPlayerParty: ; unreferenced
- ld hl, PartyCount
- ld a, [hl]
- and a
- ret z
-
- cp PARTY_LENGTH + 1
- jr c, .party_length_okay
- ld a, PARTY_LENGTH
- ld [hl], a
-.party_length_okay
- inc hl
-
- ld b, a
- ld c, 0
-.loop1
- ld a, [hl]
- and a
- jr z, .invalid_species
- cp NUM_POKEMON + 1
- jr z, .invalid_species
- cp EGG + 1
- jr c, .next_species
-
-.invalid_species
- ld [hl], SMEARGLE
- push hl
- push bc
- ld a, c
- ld hl, PartyMon1Species
- call GetPartyLocation
- ld [hl], SMEARGLE
- pop bc
- pop hl
-
-.next_species
- inc hl
- inc c
- dec b
- jr nz, .loop1
- ld [hl], $ff
-
- ld hl, PartyMon1
- ld a, [PartyCount]
- ld d, a
- ld e, 0
-.loop2
- push de
- push hl
- ld b, h
- ld c, l
- ld a, [hl]
- and a
- jr z, .invalid_species_2
- cp NUM_POKEMON + 1
- jr c, .check_level
-
-.invalid_species_2
- ld [hl], SMEARGLE
- push de
- ld d, 0
- ld hl, PartySpecies
- add hl, de
- pop de
- ld a, SMEARGLE
- ld [hl], a
-
-.check_level
- ld [CurSpecies], a
- call GetBaseData
- ld hl, MON_LEVEL
- add hl, bc
- ld a, [hl]
- cp MIN_LEVEL
- ld a, MIN_LEVEL
- jr c, .invalid_level
- ld a, [hl]
- cp MAX_LEVEL
- jr c, .load_level
- ld a, MAX_LEVEL
-.invalid_level
- ld [hl], a
-.load_level
- ld [CurPartyLevel], a
-
- ld hl, MON_MAXHP
- add hl, bc
- ld d, h
- ld e, l
- ld hl, MON_STAT_EXP - 1
- add hl, bc
- ld b, $1
- predef CalcPkmnStats
- pop hl
- ld bc, PARTYMON_STRUCT_LENGTH
- add hl, bc
- pop de
- inc e
- dec d
- jr nz, .loop2
-
- ld de, PartyMonNicknames
- ld a, [PartyCount]
- ld b, a
- ld c, 0
-.loop3
- push bc
- call .GetLengthOfStringWith6CharCap
- push de
- callba CheckStringForErrors
- pop hl
- pop bc
- jr nc, .valid_nickname
-
- push bc
- push hl
- ld hl, PartySpecies
- push bc
- ld b, 0
- add hl, bc
- pop bc
- ld a, [hl]
- cp EGG
- ld hl, .TAMAGO
- jr z, .got_nickname
- ld [wd265], a
- call GetPokemonName
- ld hl, StringBuffer1
-.got_nickname
- pop de
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
- pop bc
-
-.valid_nickname
- inc c
- dec b
- jr nz, .loop3
-
- ld de, PartyMonOT
- ld a, [PartyCount]
- ld b, a
- ld c, 0
-.loop4
- push bc
- call .GetLengthOfStringWith6CharCap
- push de
- callba CheckStringForErrors
- pop hl
- jr nc, .valid_ot_name
- ld d, h
- ld e, l
- ld hl, PlayerName
- ld bc, NAME_LENGTH
- call CopyBytes
-.valid_ot_name
- pop bc
- inc c
- dec b
- jr nz, .loop4
-
- ld hl, PartyMon1Moves
- ld a, [PartyCount]
- ld b, a
-.loop5
- push hl
- ld c, NUM_MOVES
- ld a, [hl]
- and a
- jr z, .invalid_move
- cp NUM_ATTACKS + 1
- jr c, .moves_loop
-.invalid_move
- ld [hl], POUND
-
-.moves_loop
- ld a, [hl]
- and a
- jr z, .fill_invalid_moves
- cp NUM_ATTACKS + 1
- jr c, .next_move
-
-.fill_invalid_moves
- xor a
- ld [hli], a
- dec c
- jr nz, .fill_invalid_moves
- jr .next_pokemon
-
-.next_move
- inc hl
- dec c
- jr nz, .moves_loop
-
-.next_pokemon
- pop hl
- push bc
- ld bc, PARTYMON_STRUCT_LENGTH
- add hl, bc
- pop bc
- dec b
- jr nz, .loop5
- ret
-; 13b6b
-
-.TAMAGO: ; 13b6b
- db "タマゴ@@@"
-; 13b71
-
-.GetLengthOfStringWith6CharCap: ; 13b71
- push de
- ld c, 1
- ld b, 6
-.search_loop
- ld a, [de]
- cp "@"
- jr z, .done
- inc de
- inc c
- dec b
- jr nz, .search_loop
- dec c
- dec de
- ld a, "@"
- ld [de], a
-.done
- pop de
- ret
-; 13b87
diff --git a/wram.asm b/wram.asm
index 582ad30c0..718d51d36 100644
--- a/wram.asm
+++ b/wram.asm
@@ -2,8 +2,10 @@ INCLUDE "includes.asm"
INCLUDE "macros/wram.asm"
INCLUDE "vram.asm"
+
SECTION "Stack", WRAM0
-wc000::
+
+wRAM0Start::
StackBottom::
ds $100 - 1
Stack::
@@ -12,10 +14,11 @@ StackTop::
SECTION "Audio RAM", WRAM0
+
wMusic::
-MusicPlaying:: ; c100
+
; nonzero if playing
- ds 1
+MusicPlaying:: db ; c100
Channels::
Channel1:: channel_struct Channel1 ; c101
@@ -30,16 +33,15 @@ Channel7:: channel_struct Channel7 ; c22d
Channel8:: channel_struct Channel8 ; c25f
ds 1 ; c291
-wCurTrackDuty:: ds 1
-wCurTrackIntensity:: ds 1
+
+wCurTrackDuty:: db
+wCurTrackIntensity:: db
wCurTrackFrequency:: dw
-wc296:: ds 1 ; BCD value, dummied out
-wCurNoteDuration:: ds 1 ; used in MusicE0 and LoadNote
+wc296:: db ; BCD value, dummied out
+wCurNoteDuration:: db ; used in MusicE0 and LoadNote
-CurMusicByte:: ; c298
- ds 1
-CurChannel:: ; c299
- ds 1
+CurMusicByte:: db ; c298
+CurChannel:: db ; c299
Volume:: ; c29a
; corresponds to $ff24
; Channel control / ON-OFF / Volume (R/W)
@@ -47,12 +49,12 @@ Volume:: ; c29a
; bit 6-4 - SO2 output level (volume) (# 0-7)
; bit 3 - Vin->SO1 ON/OFF
; bit 2-0 - SO1 output level (volume) (# 0-7)
- ds 1
+ db
SoundOutput:: ; c29b
; corresponds to $ff25
; bit 4-7: ch1-4 so2 on/off
; bit 0-3: ch1-4 so1 on/off
- ds 1
+ db
SoundInput:: ; c29c
; corresponds to $ff26
; bit 7: global on/off
@@ -60,80 +62,69 @@ SoundInput:: ; c29c
; bit 1: ch2 on/off
; bit 2: ch3 on/off
; bit 3: ch4 on/off
- ds 1
+ db
+
+MusicID:: dw ; c29d
+MusicBank:: db ; c29f
+NoiseSampleAddress:: dw ; c2a0
+wNoiseSampleDelay:: db ; c2a2
+ ds 1 ; c2a3
+MusicNoiseSampleSet:: db ; c2a4
+SFXNoiseSampleSet:: db ; c2a5
-MusicID::
-MusicIDLo:: ; c29d
- ds 1
-MusicIDHi:: ; c29e
- ds 1
-MusicBank:: ; c29f
- ds 1
-NoiseSampleAddress::
-NoiseSampleAddressLo:: ; c2a0
- ds 1
-NoiseSampleAddressHi:: ; c2a1
- ds 1
-wNoiseSampleDelay:: ; noise delay? ; c2a2
- ds 1
-; c2a3
- ds 1
-MusicNoiseSampleSet:: ; c2a4
- ds 1
-SFXNoiseSampleSet:: ; c2a5
- ds 1
Danger:: ; c2a6
; bit 7: on/off
; bit 4: pitch
; bit 0-3: counter
- ds 1
+ db
+
MusicFade:: ; c2a7
; fades volume over x frames
; bit 7: fade in/out
; bit 0-5: number of frames for each volume level
; $00 = none (default)
- ds 1
-MusicFadeCount:: ; c2a8
- ds 1
-MusicFadeID::
-wc2a9::
-MusicFadeIDLo:: ; c2a9
- ds 1
-wc2aa::
-MusicFadeIDHi:: ; c2aa
- ds 1
+ db
+MusicFadeCount:: db ; c2a8
+MusicFadeID:: dw ; c2a9
+
ds 5
-CryPitch:: ; c2b0
- ds 2
-CryLength:: ; c2b2
- ds 2
-LastVolume:: ; c2b4
- ds 1
-wc2b5:: ds 1
+
+CryPitch:: dw ; c2b0
+CryLength:: dw ; c2b2
+
+LastVolume:: db ; c2b4
+wc2b5:: db ; c2b5
+
SFXPriority:: ; c2b6
; if nonzero, turn off music when playing sfx
+ db
+
ds 1
- ds 1
-Channel1JumpCondition:: ds 1
-Channel2JumpCondition:: ds 1
-Channel3JumpCondition:: ds 1
-Channel4JumpCondition:: ds 1
-wStereoPanningMask:: ds 1 ; c2bc
+
+Channel1JumpCondition:: db
+Channel2JumpCondition:: db
+Channel3JumpCondition:: db
+Channel4JumpCondition:: db
+
+wStereoPanningMask:: db ; c2bc
+
CryTracks:: ; c2bd
; plays only in left or right track depending on what side the monster is on
; both tracks active outside of battle
- ds 1
-wSFXDuration:: ds 1
+ db
+
+wSFXDuration:: db
CurSFX:: ; c2bf
; id of sfx currently playing
- ds 1
+ db
ChannelsEnd::
-wMapMusic:: ; c2c0
- ds 1
-wDontPlayMapMusicOnReload:: ds 1
+wMapMusic:: db ; c2c0
+
+wDontPlayMapMusicOnReload:: db
wMusicEnd::
+
SECTION "WRAM", WRAM0
wLZAddress:: dw ; c2c2
@@ -141,69 +132,67 @@ wLZBank:: db ; c2c4
ds 1
-wBoxAlignment:: ds 1
-InputType:: ; c2c7
- ds 1
-AutoInputAddress:: ; c2c8
- ds 2
-AutoInputBank:: ; c2ca
- ds 1
-AutoInputLength:: ; c2cb
- ds 1
+wBoxAlignment:: db
+
+InputType:: db ; c2c7
+AutoInputAddress:: dw ; c2c8
+AutoInputBank:: db ; c2ca
+AutoInputLength:: db ; c2cb
+
+wMonStatusFlags:: db
+wGameLogicPaused:: db ; c2cd
+wSpriteUpdatesEnabled:: db
+
+wc2cf:: db ; ????
+
+wMapTimeOfDay:: db
-wMonStatusFlags:: ds 1
-wGameLogicPaused:: ds 1 ; c2cd
-wSpriteUpdatesEnabled:: ds 1
-wc2cf:: ds 1
-wMapTimeOfDay:: ds 1
ds 3
-wPrinterConnectionOpen:: ds 1
-wPrinterOpcode:: ds 1
-wLastDexEntry:: ds 1
-wDisableTextAcceleration:: ds 1
-wPreviousLandmark:: ds 1
-wCurrentLandmark:: ds 1
-wLandmarkSignTimer:: ds 2
+
+wPrinterConnectionOpen:: db
+wPrinterOpcode:: db
+wLastDexEntry:: db
+wDisableTextAcceleration:: db
+wPreviousLandmark:: db
+wCurrentLandmark:: db
+wLandmarkSignTimer:: dw
wLinkMode:: ; c2dc
; 0 not in link battle
; 1 link battle
; 4 mobile battle
- ds 1
+ db
-ScriptVar:: ; c2dd
- ds 1
+ScriptVar:: db ; c2dd
-wPlayerNextMovement:: ds 1
-wPlayerMovement:: ds 1
+wPlayerNextMovement:: db
+wPlayerMovement:: db
ds 2
wc2e2::
-wMovementPerson:: ds 1
+wMovementObject::
+ db
wMovementDataPointer:: ds 3 ; dba
wc2e6:: ds 4
-wMovementByteWasControlSwitch:: ds 1
-wMovementPointer:: ds 2 ; c2eb
+wMovementByteWasControlSwitch:: db
+wMovementPointer:: dw ; c2eb
+
ds 3
-wTempObjectCopyMapObjectIndex:: ds 1 ; c2f0
-wTempObjectCopySprite:: ds 1 ; c2f1
-wTempObjectCopySpriteVTile:: ds 1 ; c2f2
-wTempObjectCopyPalette:: ds 1 ; c2f3
-wTempObjectCopyMovement:: ds 1 ; c2f4
-wTempObjectCopyRange:: ds 1 ; c2f5
-wTempObjectCopyX:: ds 1 ; c2f6
-wTempObjectCopyY:: ds 1 ; c2f7
-wTempObjectCopyRadius:: ds 1 ; c2f8
+wTempObjectCopyMapObjectIndex:: db ; c2f0
+wTempObjectCopySprite:: db ; c2f1
+wTempObjectCopySpriteVTile:: db ; c2f2
+wTempObjectCopyPalette:: db ; c2f3
+wTempObjectCopyMovement:: db ; c2f4
+wTempObjectCopyRange:: db ; c2f5
+wTempObjectCopyX:: db ; c2f6
+wTempObjectCopyY:: db ; c2f7
+wTempObjectCopyRadius:: db ; c2f8
ds 1
-TileDown:: ; c2fa
- ds 1
-TileUp:: ; c2fb
- ds 1
-TileLeft:: ; c2fc
- ds 1
-TileRight:: ; c2fd
- ds 1
+TileDown:: db ; c2fa
+TileUp:: db ; c2fb
+TileLeft:: db ; c2fc
+TileRight:: db ; c2fd
TilePermissions:: ; c2fe
; set if tile behavior prevents
@@ -212,19 +201,36 @@ TilePermissions:: ; c2fe
; bit 2: up
; bit 1: left
; bit 0: right
- ds 1
+ db
ds 1
+
SECTION "wSpriteAnims", WRAM0
-; wc300 - wc313 is a 10x2 dictionary.
+
+UNION ; c300
+; wSpriteAnimDict is a 10x2 dictionary
; keys: taken from third column of SpriteAnimSeqData
; values: VTiles
-
-UNION
wSpriteAnimDict:: ds 10 * 2
-NEXTU
+wSpriteAnimationStructs::
+; field 0: index
+; fields 1-3: loaded from SpriteAnimSeqData
+SpriteAnim1:: sprite_anim_struct SpriteAnim1
+SpriteAnim2:: sprite_anim_struct SpriteAnim2
+SpriteAnim3:: sprite_anim_struct SpriteAnim3
+SpriteAnim4:: sprite_anim_struct SpriteAnim4
+SpriteAnim5:: sprite_anim_struct SpriteAnim5
+SpriteAnim6:: sprite_anim_struct SpriteAnim6
+SpriteAnim7:: sprite_anim_struct SpriteAnim7
+SpriteAnim8:: sprite_anim_struct SpriteAnim8
+SpriteAnim9:: sprite_anim_struct SpriteAnim9
+SpriteAnim10:: sprite_anim_struct SpriteAnim10
+wSpriteAnimationStructsEnd::
+
+NEXTU ; c300
+; mobile data
wc300:: ds 1
wc301:: ds 1
wc302:: ds 1
@@ -244,62 +250,32 @@ wc310:: ds 1
wc311:: ds 1
wc312:: ds 1
wc313:: ds 1
-ENDU
-
-wSpriteAnimationStructs::
-; Field 0: Index
-; Fields 1-3: Loaded from SpriteAnimSeqData
-wc314::
-SpriteAnim1:: sprite_anim_struct SpriteAnim1
-wc324::
-SpriteAnim2:: sprite_anim_struct SpriteAnim2
-wc334::
-SpriteAnim3:: sprite_anim_struct SpriteAnim3
-wc344::
-SpriteAnim4:: sprite_anim_struct SpriteAnim4
-wc354::
-SpriteAnim5:: sprite_anim_struct SpriteAnim5
-wc364::
-SpriteAnim6:: sprite_anim_struct SpriteAnim6
-wc374::
-SpriteAnim7:: sprite_anim_struct SpriteAnim7
-wc384::
-SpriteAnim8:: sprite_anim_struct SpriteAnim8
-wc394::
-SpriteAnim9:: sprite_anim_struct SpriteAnim9
-wc3a4::
-
-UNION
-SpriteAnim10:: sprite_anim_struct SpriteAnim10
-wSpriteAnimationStructsEnd::
-NEXTU
- ds 8
-wc3ac:: ds 8 ; c3ac
-ENDU
+wc314:: ds 152
+wc3ac:: ds 8
+ENDU ; c3b4
-wSpriteAnimCount:: ds 1
-wCurrSpriteOAMAddr:: ds 1
-
-CurIcon:: ; c3b6
- ds 1
+wSpriteAnimCount:: db
+wCurrSpriteOAMAddr:: db
+CurIcon:: db ; c3b6
-wCurIconTile:: ds 1
+wCurIconTile:: db
wSpriteAnimAddrBackup::
wSpriteAnimIDBuffer::
wCurrSpriteAddSubFlags::
- ds 2
-wCurrAnimVTile:: ds 1
-wCurrAnimXCoord:: ds 1
-wCurrAnimYCoord:: ds 1
-wCurrAnimXOffset:: ds 1
-wCurrAnimYOffset:: ds 1
-wGlobalAnimYOffset:: ds 1
-wGlobalAnimXOffset:: ds 1
+ dw
+wCurrAnimVTile:: db
+wCurrAnimXCoord:: db
+wCurrAnimYCoord:: db
+wCurrAnimXOffset:: db
+wCurrAnimYOffset:: db
+wGlobalAnimYOffset:: db
+wGlobalAnimXOffset:: db
wSpriteAnimsEnd::
ds 11
+; mobile data
wc3cc:: ds 1
wc3cd:: ds 31
wc3ec:: ds 1
@@ -352,30 +328,45 @@ TileMapEnd::
SECTION "Battle", WRAM0
-UNION
-wc608::
+
+UNION ; c608
+; unidentified uses
+wc608:: ds 480
+
+NEXTU ; c608
+; miscellaneous
+wMisc:: ds WMISC_WIDTH * WMISC_HEIGHT
+wMiscEnd::
+
+NEXTU ; c608
+; odd egg
wOddEgg:: party_struct OddEgg
wOddEggName:: ds PKMN_NAME_LENGTH
wOddEggOTName:: ds PKMN_NAME_LENGTH
-NEXTU
+NEXTU ; c608
+; battle tower temp struct
wBT_OTTemp:: battle_tower_struct wBT_OTTemp
-NEXTU
- hall_of_fame wHallOfFameTemp
+NEXTU ; c608
+; hall of fame temp struct
+wHallOfFameTemp:: hall_of_fame wHallOfFameTemp
-NEXTU
-wMisc:: ; ds (SCREEN_WIDTH + 4) * (SCREEN_HEIGHT + 2)
- ds 10
-wc612::
- ds 6
-wc618::
- ds 4
-wInitHourBuffer:: ; c61c
+NEXTU ; c608
+; timeset temp storage
+wTimeSetBuffer::
+ ds 20
+wInitHourBuffer:: db ; c61c
+ ds 9
+wInitMinuteBuffer:: db ; c626
+
+NEXTU ; c608
+; link engine data
ds 10
-wc626::
+wc612:: ds 10
-NEXTU
+NEXTU ; c608
+; battle data
wBattle::
wEnemyMoveStruct:: move_struct wEnemyMoveStruct ; c608
wPlayerMoveStruct:: move_struct wPlayerMoveStruct ; c60f
@@ -387,16 +378,15 @@ BattleMon:: battle_struct BattleMon ; c62c
ds 2
-wWildMon:: ds 1 ; c64e
+wWildMon:: db ; c64e
ds 1
-wEnemyTrainerItem1:: ds 1 ; c650
-wEnemyTrainerItem2:: ds 1 ; c651
-wEnemyTrainerBaseReward:: ds 1 ; c652
+wEnemyTrainerItem1:: db ; c650
+wEnemyTrainerItem2:: db ; c651
+wEnemyTrainerBaseReward:: db ; c652
wEnemyTrainerAIFlags:: ds 3 ; c653
OTClassName:: ds TRAINER_CLASS_NAME_LENGTH ; c656
-CurOTMon:: ; c663
- ds 1
+CurOTMon:: db ; c663
wBattleParticipantsNotFainted::
; Bit array. Bits 0 - 5 correspond to party members 1 - 6.
@@ -404,28 +394,28 @@ wBattleParticipantsNotFainted::
; Bit cleared if the mon faints.
; Backed up if the enemy switches.
; All bits cleared if the enemy faints.
- ds 1
+ db
TypeModifier:: ; c665
; >10: super-effective
; 10: normal
; <10: not very effective
; bit 7: stab
- ds 1
+ db
CriticalHit:: ; c666
; 0 if not critical
; 1 for a critical hit
; 2 for a OHKO
- ds 1
+ db
AttackMissed:: ; c667
; nonzero for a miss
- ds 1
+ db
PlayerSubStatus1:: ; c668
; bit
-; 7 attract
+; 7 in love
; 6 rollout
; 5 endure
; 4 perish song
@@ -433,7 +423,7 @@ PlayerSubStatus1:: ; c668
; 2 protect
; 1 curse
; 0 nightmare
- ds 1
+ db
PlayerSubStatus2:: ; c669
; bit
; 7
@@ -444,18 +434,18 @@ PlayerSubStatus2:: ; c669
; 2
; 1
; 0 curled
- ds 1
+ db
PlayerSubStatus3:: ; c66a
; bit
; 7 confused
; 6 flying
; 5 underground
; 4 charged
-; 3 flinch
-; 2
-; 1 rollout
+; 3 flinched
+; 2 in loop
+; 1 rampage
; 0 bide
- ds 1
+ db
PlayerSubStatus4:: ; c66b
; bit
; 7 leech seed
@@ -466,228 +456,182 @@ PlayerSubStatus4:: ; c66b
; 2 focus energy
; 1 mist
; 0 x accuracy
- ds 1
+ db
PlayerSubStatus5:: ; c66c
; bit
-; 7 cant run
+; 7 can't run
; 6 destiny bond
; 5 lock-on
-; 4 encore
+; 4 encored
; 3 transformed
; 2
; 1
; 0 toxic
- ds 1
+ db
EnemySubStatus1:: ; c66d
; see PlayerSubStatus1
- ds 1
+ db
EnemySubStatus2:: ; c66e
; see PlayerSubStatus2
- ds 1
+ db
EnemySubStatus3:: ; c66f
; see PlayerSubStatus3
- ds 1
+ db
EnemySubStatus4:: ; c670
; see PlayerSubStatus4
- ds 1
+ db
EnemySubStatus5:: ; c671
; see PlayerSubStatus5
- ds 1
-
-PlayerRolloutCount:: ; c672
- ds 1
-PlayerConfuseCount:: ; c673
- ds 1
-PlayerToxicCount:: ; c674
- ds 1
-PlayerDisableCount:: ; c675
- ds 1
-PlayerEncoreCount:: ; c676
- ds 1
-PlayerPerishCount:: ; c677
- ds 1
-PlayerFuryCutterCount:: ; c678
- ds 1
-PlayerProtectCount:: ; c679
- ds 1
-
-EnemyRolloutCount:: ; c67a
- ds 1
-EnemyConfuseCount:: ; c67b
- ds 1
-EnemyToxicCount:: ; c67c
- ds 1
-EnemyDisableCount:: ; c67d
- ds 1
-EnemyEncoreCount:: ; c67e
- ds 1
-EnemyPerishCount:: ; c67f
- ds 1
-EnemyFuryCutterCount:: ; c680
- ds 1
-EnemyProtectCount:: ; c681
- ds 1
-
-PlayerDamageTaken:: ; c682
- ds 2
-EnemyDamageTaken:: ; c684
- ds 2
+ db
+
+PlayerRolloutCount:: db ; c672
+PlayerConfuseCount:: db ; c673
+PlayerToxicCount:: db ; c674
+PlayerDisableCount:: db ; c675
+PlayerEncoreCount:: db ; c676
+PlayerPerishCount:: db ; c677
+PlayerFuryCutterCount:: db ; c678
+PlayerProtectCount:: db ; c679
+
+EnemyRolloutCount:: db ; c67a
+EnemyConfuseCount:: db ; c67b
+EnemyToxicCount:: db ; c67c
+EnemyDisableCount:: db ; c67d
+EnemyEncoreCount:: db ; c67e
+EnemyPerishCount:: db ; c67f
+EnemyFuryCutterCount:: db ; c680
+EnemyProtectCount:: db ; c681
+
+PlayerDamageTaken:: dw ; c682
+EnemyDamageTaken:: dw ; c684
wBattleReward:: ds 3 ; c686
wBattleAnimParam::
wKickCounter::
-wPresentPower:: ds 1 ; c689
-BattleScriptBuffer:: ; c68a
- ds 40
+wPresentPower::
+ db ; c689
+BattleScriptBuffer:: ds 40 ; c68a
-BattleScriptBufferLoc:: ; c6b2
- ds 2
+BattleScriptBufferAddress:: dw ; c6b2
+
+wTurnEnded:: db ; c6b4
-wTurnEnded:: ds 1 ; c6b4
ds 1
PlayerStats:: ; c6b6
-PlayerAttack:: ds 2
-PlayerDefense:: ds 2
-PlayerSpeed:: ds 2
-PlayerSpAtk:: ds 2
-PlayerSpDef:: ds 2
+PlayerAttack:: dw
+PlayerDefense:: dw
+PlayerSpeed:: dw
+PlayerSpAtk:: dw
+PlayerSpDef:: dw
ds 1
+
EnemyStats:: ; c6c1
-EnemyAttack:: ds 2
-EnemyDefense:: ds 2
-EnemySpeed:: ds 2
-EnemySpAtk:: ds 2
-EnemySpDef:: ds 2
+EnemyAttack:: dw
+EnemyDefense:: dw
+EnemySpeed:: dw
+EnemySpAtk:: dw
+EnemySpDef:: dw
ds 1
PlayerStatLevels:: ; c6cc
; 07 neutral
-PlayerAtkLevel:: ; c6cc
- ds 1
-PlayerDefLevel:: ; c6cd
- ds 1
-PlayerSpdLevel:: ; c6ce
- ds 1
-PlayerSAtkLevel:: ; c6cf
- ds 1
-
-UNION
-wc6d0::
-PlayerSDefLevel:: ; c6d0
- ds 1
-PlayerAccLevel:: ; c6d1
- ds 1
-PlayerEvaLevel:: ; c6d2
- ds 1
-; c6d3
- ds 1
+PlayerAtkLevel:: db ; c6cc
+PlayerDefLevel:: db ; c6cd
+PlayerSpdLevel:: db ; c6ce
+PlayerSAtkLevel:: db ; c6cf
+
+UNION ; c6d0
+; finish battle RAM
+PlayerSDefLevel:: db ; c6d0
+PlayerAccLevel:: db ; c6d1
+PlayerEvaLevel:: db ; c6d2
+ ds 1 ; c6d3
PlayerStatLevelsEnd::
EnemyStatLevels:: ; c6d4
; 07 neutral
-EnemyAtkLevel:: ; c6d4
- ds 1
-EnemyDefLevel:: ; c6d5
- ds 1
-EnemySpdLevel:: ; c6d6
- ds 1
-EnemySAtkLevel:: ; c6d7
- ds 1
-EnemySDefLevel:: ; c6d8
- ds 1
-EnemyAccLevel:: ; c6d9
- ds 1
-EnemyEvaLevel:: ; c6da
+EnemyAtkLevel:: db ; c6d4
+EnemyDefLevel:: db ; c6d5
+EnemySpdLevel:: db ; c6d6
+EnemySAtkLevel:: db ; c6d7
+EnemySDefLevel:: db ; c6d8
+EnemyAccLevel:: db ; c6d9
+EnemyEvaLevel:: db ; c6da
ds 1
- ds 1
-EnemyTurnsTaken:: ; c6dc
- ds 1
-PlayerTurnsTaken:: ; c6dd
+EnemyTurnsTaken:: db ; c6dc
+PlayerTurnsTaken:: db ; c6dd
ds 1
- ds 1
+PlayerSubstituteHP:: db ; c6df
+EnemySubstituteHP:: db ; c6e0
-PlayerSubstituteHP:: ; c6df
- ds 1
-EnemySubstituteHP:: ; c6e0
+wUnusedPlayerLockedMove:: db ; c6e1
ds 1
-wUnusedPlayerLockedMove:: ds 1 ; c6e1
- ds 1
-CurPlayerMove:: ; c6e3
- ds 1
-CurEnemyMove:: ; c6e4
- ds 1
+CurPlayerMove:: db ; c6e3
+CurEnemyMove:: db ; c6e4
LinkBattleRNCount:: ; c6e5
; how far through the prng stream
- ds 1
+ db
-wEnemyItemState:: ds 1 ; c6e6
+wEnemyItemState:: db ; c6e6
ds 2
-CurEnemyMoveNum:: ; c6e9
- ds 1
+CurEnemyMoveNum:: db ; c6e9
-wEnemyHPAtTimeOfPlayerSwitch:: ds 2 ; c6ea
+wEnemyHPAtTimeOfPlayerSwitch:: dw ; c6ea
wPayDayMoney:: ds 3 ; c6ec
-wSafariMonAngerCount:: ds 1
-wSafariMonEating:: ds 2
-wEnemyBackupDVs:: ; used when enemy is transformed
- ds 2
-AlreadyDisobeyed:: ; c6f4
+wSafariMonAngerCount:: db
+wSafariMonEating:: db
ds 1
+wEnemyBackupDVs:: dw ; used when enemy is transformed
+AlreadyDisobeyed:: db ; c6f4
-DisabledMove:: ; c6f5
- ds 1
-EnemyDisabledMove:: ; c6f6
- ds 1
-wWhichMonFaintedFirst:: ds 1
+DisabledMove:: db ; c6f5
+EnemyDisabledMove:: db ; c6f6
+wWhichMonFaintedFirst:: db
; exists so you can't counter on switch
-LastPlayerCounterMove:: ; c6f8
- ds 1
-LastEnemyCounterMove:: ; c6f9
- ds 1
+LastPlayerCounterMove:: db ; c6f8
+LastEnemyCounterMove:: db ; c6f9
-wEnemyMinimized:: ds 1 ; c6fa
+wEnemyMinimized:: db ; c6fa
-AlreadyFailed:: ; c6fb
- ds 1
+AlreadyFailed:: db ; c6fb
-wBattleParticipantsIncludingFainted:: ds 1 ; c6fc
-wDanger:: ds 1 ; c6fd
-wPlayerMinimized:: ds 1 ; c6fe
+wBattleParticipantsIncludingFainted:: db ; c6fc
+wDanger:: db ; c6fd
+wPlayerMinimized:: db ; c6fe
PlayerScreens:: ; c6ff
; bit
+; 7
+; 6
+; 5
; 4 reflect
; 3 light screen
; 2 safeguard
+; 1
; 0 spikes
- ds 1
+ db
EnemyScreens:: ; c700
; see PlayerScreens
- ds 1
+ db
-PlayerSafeguardCount:: ; c701
- ds 1
-PlayerLightScreenCount:: ; c702
- ds 1
-PlayerReflectCount:: ; c703
+PlayerSafeguardCount:: db ; c701
+PlayerLightScreenCount:: db ; c702
+PlayerReflectCount:: db ; c703
ds 1
- ds 1
-EnemySafeguardCount:: ; c705
- ds 1
-EnemyLightScreenCount:: ; c706
- ds 1
-EnemyReflectCount:: ; c707
- ds 1
+EnemySafeguardCount:: db ; c705
+EnemyLightScreenCount:: db ; c706
+EnemyReflectCount:: db ; c707
ds 2
+
Weather:: ; c70a
; 00 normal
; 01 rain
@@ -696,113 +640,110 @@ Weather:: ; c70a
; 04 rain stopped
; 05 sunliight faded
; 06 sandstorm subsided
- ds 1
+ db
WeatherCount:: ; c70b
; # turns remaining
- ds 1
+ db
-LoweredStat:: ; c70c
- ds 1
-EffectFailed:: ; c70d
- ds 1
-FailedMessage:: ; c70e
- ds 1
-wEnemyGoesFirst:: ; c70f
- ds 1
-wPlayerIsSwitching:: ds 1 ; c710
-wEnemyIsSwitching:: ds 1 ; c711
+LoweredStat:: db ; c70c
+EffectFailed:: db ; c70d
+FailedMessage:: db ; c70e
+wEnemyGoesFirst:: db ; c70f
+
+wPlayerIsSwitching:: db ; c710
+wEnemyIsSwitching:: db ; c711
PlayerUsedMoves:: ; c712
; add a move that has been used once by the player
; added in order of use
ds NUM_MOVES
-wEnemyAISwitchScore:: ds 1 ; c716
-wEnemySwitchMonParam:: ds 1 ; c717
-wEnemySwitchMonIndex:: ds 1 ; c718
-wTempLevel:: ds 1 ; c719
-LastPlayerMon:: ds 1 ; c71a
-LastPlayerMove:: ; c71b
- ds 1
-LastEnemyMove:: ; c71c
- ds 1
+wEnemyAISwitchScore:: db ; c716
+wEnemySwitchMonParam:: db ; c717
+wEnemySwitchMonIndex:: db ; c718
+wTempLevel:: db ; c719
+LastPlayerMon:: db ; c71a
+LastPlayerMove:: db ; c71b
+LastEnemyMove:: db ; c71c
+
+wPlayerFutureSightCount:: db ; c71d
+wEnemyFutureSightCount:: db ; c71e
+
+wGivingExperienceToExpShareHolders:: db ; c71f
-wPlayerFutureSightCount:: ds 1 ; c71d
-wEnemyFutureSightCount:: ds 1 ; c71e
-wGivingExperienceToExpShareHolders:: ds 1 ; c71f
wBackupEnemyMonBaseStats:: ds 5 ; c720
wBackupEnemyMonCatchRate:: db ; c725
wBackupEnemyMonBaseExp:: db ; c726
-wPlayerFutureSightDamage:: ds 2 ; c727
-wEnemyFutureSightDamage:: ds 2 ; c729
-wPlayerRageCounter:: ds 1 ; c72b
-wEnemyRageCounter:: ds 1 ; c72c
-wBeatUpHitAtLeastOnce:: ds 1 ; c72d
-wPlayerTrappingMove:: ds 1 ; c72e
-wEnemyTrappingMove:: ds 1 ; c72f
-wPlayerWrapCount:: ds 1 ; c730
-wEnemyWrapCount:: ds 1 ; c731
-wPlayerCharging:: ds 1 ; c732
-wEnemyCharging:: ds 1 ; c733
-BattleEnded:: ; c734
- ds 1
+
+wPlayerFutureSightDamage:: dw ; c727
+wEnemyFutureSightDamage:: dw ; c729
+wPlayerRageCounter:: db ; c72b
+wEnemyRageCounter:: db ; c72c
+
+wBeatUpHitAtLeastOnce:: db ; c72d
+
+wPlayerTrappingMove:: db ; c72e
+wEnemyTrappingMove:: db ; c72f
+wPlayerWrapCount:: db ; c730
+wEnemyWrapCount:: db ; c731
+wPlayerCharging:: db ; c732
+wEnemyCharging:: db ; c733
+
+BattleEnded:: db ; c734
wWildMonMoves:: ds NUM_MOVES ; c735
wWildMonPP:: ds NUM_MOVES ; c739
-wAmuletCoin:: ds 1 ; c73a
-wSomeoneIsRampaging:: ds 1 ; c73b
-wPlayerJustGotFrozen:: ds 1 ; c73c
-wEnemyJustGotFrozen:: ds 1 ; c73d
+
+wAmuletCoin:: db ; c73a
+
+wSomeoneIsRampaging:: db ; c73b
+
+wPlayerJustGotFrozen:: db ; c73c
+wEnemyJustGotFrozen:: db ; c73d
wBattleEnd::
; Battle RAM
-
; c741
-NEXTU
+
+NEXTU ; c6d0
+; trade
wTrademons::
wPlayerTrademon:: trademon wPlayerTrademon
wOTTrademon:: trademon wOTTrademon
wTrademonsEnd::
-wTradeAnimPointer::
- ds 2
+wTradeAnimAddress:: dw
wLinkPlayer1Name:: ds NAME_LENGTH
wLinkPlayer2Name:: ds NAME_LENGTH
-wLinkTradeSendmonSpecies:: ds 1
-wLinkTradeGetmonSpecies:: ds 1
-wc74e:: ds 107
-wc7b9:: ds 1
-wc7ba:: ds 1
-wc7bb:: ds 2
-wc7bd::
+wLinkTradeSendmonSpecies:: db
+wLinkTradeGetmonSpecies:: db
-NEXTU
+NEXTU ; c6d0
; naming screen
-wNamingScreenDestinationPointer:: ds 2 ; c6d0
-wNamingScreenCurrNameLength:: ds 1 ; c6d2
-wNamingScreenMaxNameLength:: ds 1 ; c6d3
-wNamingScreenType:: ds 1 ; c6d4
-wNamingScreenCursorObjectPointer:: ds 2 ; c6d5
-wNamingScreenLastCharacter:: ds 1 ; c6d7
-wNamingScreenStringEntryCoord:: ds 2 ; c6d8
-
-NEXTU
+wNamingScreenDestinationPointer:: dw ; c6d0
+wNamingScreenCurrNameLength:: db ; c6d2
+wNamingScreenMaxNameLength:: db ; c6d3
+wNamingScreenType:: db ; c6d4
+wNamingScreenCursorObjectPointer:: dw ; c6d5
+wNamingScreenLastCharacter:: db ; c6d7
+wNamingScreenStringEntryCoord:: dw ; c6d8
+
+NEXTU ; c6d0
; pokegear
-wPokegearPhoneLoadNameBuffer:: ds 1 ; c6d0
-wPokegearPhoneCursorPosition:: ds 1 ; c6d1
-wPokegearPhoneScrollPosition:: ds 1 ; c6d2
-wPokegearPhoneSelectedPerson:: ds 1 ; c6d3
-wPokegearPhoneSubmenuCursor:: ds 1 ; c6d4
-wPokegearMapCursorObjectPointer:: ds 2 ; c6d5
-wPokegearMapCursorLandmark:: ds 1 ; c6d7
-wPokegearMapPlayerIconLandmark:: ds 1 ; c6d8
-wPokegearRadioChannelBank:: ds 1 ; c6d9
-wPokegearRadioChannelAddr:: ds 2 ; c6da
-wPokegearRadioMusicPlaying:: ds 1 ; c6dc
-
-NEXTU
+wPokegearPhoneLoadNameBuffer:: db ; c6d0
+wPokegearPhoneCursorPosition:: db ; c6d1
+wPokegearPhoneScrollPosition:: db ; c6d2
+wPokegearPhoneSelectedPerson:: db ; c6d3
+wPokegearPhoneSubmenuCursor:: db ; c6d4
+wPokegearMapCursorObjectPointer:: dw ; c6d5
+wPokegearMapCursorLandmark:: db ; c6d7
+wPokegearMapPlayerIconLandmark:: db ; c6d8
+wPokegearRadioChannelBank:: db ; c6d9
+wPokegearRadioChannelAddr:: dw ; c6da
+wPokegearRadioMusicPlaying:: db ; c6dc
+
+NEXTU ; c6d0
+; slot machine
wSlots::
-; Slot Machine
-; c6d0
wReel1:: slot_reel wReel1
wReel2:: slot_reel wReel2
wReel3:: slot_reel wReel3
@@ -810,171 +751,174 @@ wReel3:: slot_reel wReel3
wReel1Stopped:: ds 3
wReel2Stopped:: ds 3
wReel3Stopped:: ds 3
-wSlotBias:: ds 1
-wSlotBet:: ds 1
-wFirstTwoReelsMatching:: ds 1
-wFirstTwoReelsMatchingSevens:: ds 1
-wSlotMatched:: ds 1
+wSlotBias:: db
+wSlotBet:: db
+wFirstTwoReelsMatching:: db
+wFirstTwoReelsMatchingSevens:: db
+wSlotMatched:: db
wCurrReelStopped:: ds 3
-wPayout:: ds 2
-wCurrReelXCoord:: ds 1
-wCurrReelYCoord:: ds 1
+wPayout:: dw
+wCurrReelXCoord:: db
+wCurrReelYCoord:: db
ds 2
-wSlotBuildingMatch:: ds 1
+wSlotBuildingMatch:: db
wSlotsDataEnd::
ds 28
wSlotsEnd::
-NEXTU
-; Card Flip
-; c6d0
+NEXTU ; c6d0
+; card flip
wCardFlip::
wDeck:: ds 24
wDeckEnd::
; c6e8
-wCardFlipNumCardsPlayed:: ds 1
-wCardFlipFaceUpCard:: ds 1
+wCardFlipNumCardsPlayed:: db
+wCardFlipFaceUpCard:: db
wDiscardPile:: ds 24
wDiscardPileEnd::
wCardFlipEnd::
-NEXTU
-; Dummy Game
-; c6d0
+NEXTU ; c6d0
+; dummy game
wDummyGame::
wDummyGameCards:: ds 9 * 5
wDummyGameCardsEnd::
-wDummyGameLastCardPicked:: ds 1 ; c6fd
-wDummyGameCard1:: ds 1 ; c6fe
-wDummyGameCard2:: ds 1 ; c6ff
-wDummyGameCard1Location:: ds 1 ; c700
-wDummyGameCard2Location:: ds 1 ; c701
-wDummyGameNumberTriesRemaining:: ds 1 ; c702
+wDummyGameLastCardPicked:: db ; c6fd
+wDummyGameCard1:: db ; c6fe
+wDummyGameCard2:: db ; c6ff
+wDummyGameCard1Location:: db ; c700
+wDummyGameCard2Location:: db ; c701
+wDummyGameNumberTriesRemaining:: db ; c702
wDummyGameLastMatches:: ds 5 ; c703
-wDummyGameCounter:: ds 1 ; c708
-wDummyGameNumCardsMatched:: ds 1 ; c709
+wDummyGameCounter:: db ; c708
+wDummyGameNumCardsMatched:: db ; c709
wDummyGameEnd::
-NEXTU
-; Unown Puzzle
+NEXTU ; c6d0
+; unown puzzle
wUnownPuzzle::
-wPuzzlePieces::
- ds 6 * 6
+wPuzzlePieces:: ds 6 * 6
wUnownPuzzleEnd::
-NEXTU
+NEXTU ; c6d0
+; pokedex
wPokedexDataStart::
-wPokedexOrder:: ds NUM_POKEMON +- 1
-wPokedexOrderEnd:: ds 6
+wPokedexOrder:: ds $100 ; >= NUM_POKEMON
+wPokedexOrderEnd::
wPokedexMetadata::
-wDexListingScrollOffset:: ; offset of the first displayed entry from the start
-wc7d0:: ds 1
-wDexListingCursor::
-wc7d1:: ds 1 ; Dex cursor
-wDexListingEnd::
-wc7d2:: ds 1 ; Last mon to display
-wDexListingHeight:: ; number of entries displayed at once in the dex listing
-wc7d3:: ds 1
-wCurrentDexMode:: ; Pokedex Mode
-wc7d4:: ds 1 ; Index of the topmost visible item in a scrolling menu
-wDexSearchMonType1:: ds 1 ; first type to search
-wDexSearchMonType2:: ds 1 ; second type to search
-wDexSearchResultCount:: ds 1
-wDexArrowCursorPosIndex:: ds 1
-wDexArrowCursorDelayCounter:: ds 1
-wDexArrowCursorBlinkCounter:: ds 1
-wDexSearchSlowpokeFrame:: ds 1
-wUnlockedUnownMode:: ds 1
-wDexCurrentUnownIndex:: ds 1
-wDexUnownCount:: ds 1
-wDexConvertedMonType:: ds 1 ; mon type converted from dex search mon type
-wDexListingScrollOffsetBackup:: ds 1
-wDexListingCursorBackup:: ds 1
-wBackupDexListingCursor::
-wc7e2:: ds 1
-wBackupDexListingPage::
-wc7e3:: ds 1
-wDexCurrentLocation::
-wc7e4:: ds 1
-IF DEF(CRYSTAL11)
-wPokedexStatus::
-ELSE
-wPokedexDataEnd::
-ENDC
- ds 1
+wDexListingScrollOffset:: db ; offset of the first displayed entry from the start
+wDexListingCursor:: db ; Dex cursor
+wDexListingEnd:: db ; Last mon to display
+wDexListingHeight:: db ; number of entries displayed at once in the dex listing
+wCurrentDexMode:: db ; Pokedex Mode
+wDexSearchMonType1:: db ; first type to search
+wDexSearchMonType2:: db ; second type to search
+wDexSearchResultCount:: db
+wDexArrowCursorPosIndex:: db
+wDexArrowCursorDelayCounter:: db
+wDexArrowCursorBlinkCounter:: db
+wDexSearchSlowpokeFrame:: db
+wUnlockedUnownMode:: db
+wDexCurrentUnownIndex:: db
+wDexUnownCount:: db
+wDexConvertedMonType:: db ; mon type converted from dex search mon type
+wDexListingScrollOffsetBackup:: db
+wDexListingCursorBackup:: db
+wBackupDexListingCursor:: db
+wBackupDexListingPage:: db
+wDexCurrentLocation:: db
IF DEF(CRYSTAL11)
+wPokedexStatus:: db
wPokedexDataEnd::
+ELSE
+wPokedexDataEnd:: ds 1
ENDC
ds 2
-wMiscEnd::
-ENDU
-ENDU
+NEXTU ; c6d0
+; mobile data
+wc6d0:: ds 126
+wc74e:: ds 107
+wc7b9:: ds 1
+wc7ba:: ds 1
+wc7bb:: ds 2
+wc7bd:: ds 19
+wc7d0:: ds 1
+wc7d1:: ds 1
+wc7d2:: ds 1
+wc7d3:: ds 1
+wc7d4:: ds 1
+ENDU ; c7e8
+ENDU ; c7e8
wc7e8:: ds 24 ; ????
+
SECTION "Overworld Map", WRAM0
-UNION
-OverworldMap:: ; c800
- ds 1300
+UNION ; c800
+OverworldMap:: ds 1300 ; c800
OverworldMapEnd::
-NEXTU
+NEXTU ; c800
+; GB Printer screen RAM
wGameboyPrinterRAM::
wGameboyPrinterScreen:: ds SCREEN_HEIGHT * SCREEN_WIDTH ; c800
wGameboyPrinterScreenEnd:: ; c968
-NEXTU
-wGameboyPrinter2bppSource::
- ds 40 tiles
+NEXTU ; c800
+; GB Printer data
+wGameboyPrinter2bppSource:: ds 40 tiles
wGameboyPrinter2bppSourceEnd::
-wca80:: ds 1
-wPrinterRowIndex:: ds 1
+wca80:: db
+wPrinterRowIndex:: db
; Printer data header
-wca82:: ds 1
-wca83:: ds 1
-wca84:: ds 1
-wca85:: ds 1
+wPrinterData:: ds 4
wPrinterChecksum:: dw ; ca86
-wPrinterHandshake:: ds 1
+wPrinterHandshake:: db
wPrinterStatusFlags::
; bit 7: set if error 1 (battery low)
; bit 6: set if error 4 (too hot or cold)
; bit 5: set if error 3 (paper jammed or empty)
; if this and the previous byte are both $ff: error 2 (connection error)
- ds 1
+ db
-wHandshakeFrameDelay:: ds 1
-wPrinterSerialFrameDelay:: ds 1
+wHandshakeFrameDelay:: db
+wPrinterSerialFrameDelay:: db
wPrinterSendByteOffset:: dw
wPrinterSendByteCounter:: dw
; tilemap backup?
wPrinterTileMapBuffer:: ds SCREEN_HEIGHT * SCREEN_WIDTH ; ca90
wPrinterTileMapBufferEnd::
-wPrinterStatus:: ds 1 ; cbf8
+wPrinterStatus:: db ; cbf8
ds 1
wcbfa:: ds 1
-wGBPrinterSettings:: ds 1
+wGBPrinterSettings:: db
ds 16
wGameboyPrinterRAMEnd::
-NEXTU
+NEXTU ; c800
+; bill's pc data
wBillsPCPokemonList:: ; c800
; Pokemon, box number, list index
+ ds 3 * 30
-wMysteryGiftPartyTemp:: ; ds PARTY_LENGTH * (1 + 1 + NUM_MOVES)
-wMysteryGiftStaging::
+NEXTU ; c800
+; raw link data
+wLinkData:: ds $514
+wLinkDataEnd::
-wLinkData:: ; ds $514
+NEXTU ; c800
+; link data members
wLinkPlayerName:: ds NAME_LENGTH
-wLinkPartyCount:: ds 1
+wLinkPartyCount:: db
wLinkPartySpecies:: ds PARTY_LENGTH
-wLinkPartySpeciesEnd:: ds 1
+wLinkPartySpeciesEnd:: db ; legacy scripts don't check PartyCount
-UNION
+UNION ; c813
+; time capsule party data
wTimeCapsulePlayerData::
wTimeCapsulePartyMon1:: red_party_struct wTimeCapsulePartyMon1
wTimeCapsulePartyMon2:: red_party_struct wTimeCapsulePartyMon2
@@ -986,7 +930,8 @@ wTimeCapsulePartyMonOTNames:: ds PARTY_LENGTH * NAME_LENGTH
wTimeCapsulePartyMonNicks:: ds PARTY_LENGTH * PKMN_NAME_LENGTH
wTimeCapsulePlayerDataEnd::
-NEXTU
+NEXTU ; c813
+; link player data
wLinkPlayerData::
wLinkPlayerPartyMon1:: party_struct wLinkPlayerPartyMon1
wLinkPlayerPartyMon2:: party_struct wLinkPlayerPartyMon2
@@ -997,13 +942,13 @@ wLinkPlayerPartyMon6:: party_struct wLinkPlayerPartyMon6
wLinkPlayerPartyMonOTNames:: ds PARTY_LENGTH * NAME_LENGTH
wLinkPlayerPartyMonNicks:: ds PARTY_LENGTH * PKMN_NAME_LENGTH
wLinkPlayerDataEnd::
-ENDU
- ds $35d
-
-wLinkDataEnd::
-NEXTU
+ENDU ; c9b7
-wc800:: ds 1
+NEXTU ; c800
+; mystery gift data
+wMysteryGiftPartyTemp:: ; ds PARTY_LENGTH * (1 + 1 + NUM_MOVES)
+wMysteryGiftStaging::
+wc800:: ds 1
wc801:: ds 1
wc802:: ds 1
wc803:: ds 4
@@ -1017,14 +962,13 @@ wc813:: ds 1
wc814:: ds 4
wc818:: ds 8
wc820:: ds 1
-wc821:: ds 15
-wc830:: ds 16
-wc840:: ds 16
-UNION
+wc821:: ds 47
+
+UNION ; c850
wMysteryGiftTrainerData:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 2
wMysteryGiftTrainerDataEnd::
-NEXTU
+NEXTU ; c850
wc850:: ds 16
wc860:: ds 16
wc870:: ds 16
@@ -1036,62 +980,53 @@ wc8c0:: ds 16
wc8d0:: ds 16
wc8e0:: ds 16
wc8f0:: ds 16
-ENDU
+ENDU ; c900
wMysteryGiftPartnerData::
-wc900:: ds 1
-wMysteryGiftPartnerID:: ds 2
+wc900:: db
+wMysteryGiftPartnerID:: dw
wMysteryGiftPartnerName:: ds NAME_LENGTH
-wMysteryGiftPartnerDexCaught:: ds 1
+wMysteryGiftPartnerDexCaught:: db
wc90f::
-wMysteryGiftPartnerSentDeco:: ds 1
-wMysteryGiftPartnerWhichItem:: ds 1
-wMysteryGiftPartnerWhichDeco:: ds 1
-wMysteryGiftPartnerBackupItem:: ds 2
+wMysteryGiftPartnerSentDeco:: db
+wMysteryGiftPartnerWhichItem:: db
+wMysteryGiftPartnerWhichDeco:: db
+wMysteryGiftPartnerBackupItem:: db
+ ds 1
wMysteryGiftPartnerDataEnd::
- ds 12
-wc920:: ds 16
-wc930:: ds 16
-wc940:: ds 16
+
+ ds 60
+
wMysteryGiftPlayerData::
-wc950:: ds 1
-wMysteryGiftPlayerID:: ds 2
+ ds 1
+wMysteryGiftPlayerID:: dw
wMysteryGiftPlayerName:: ds NAME_LENGTH
-wMysteryGiftPlayerDexCaught:: ds 1
-wMysteryGiftPlayerSentDeco:: ds 1
-wMysteryGiftPlayerWhichItem:: ds 1
-wMysteryGiftPlayerWhichDeco:: ds 1
-wMysteryGiftPlayerBackupItem:: ds 2
+wMysteryGiftPlayerDexCaught:: db
+wMysteryGiftPlayerSentDeco:: db
+wMysteryGiftPlayerWhichItem:: db
+wMysteryGiftPlayerWhichDeco:: db
+wMysteryGiftPlayerBackupItem:: db
+ ds 1
wMysteryGiftPlayerDataEnd::
-wc964:: ds 12
-wc970:: ds 16
-wc980:: ds 16
-wc990:: ds 16
-wc9a0:: ds 16
-wc9b0:: ds 16
-wc9c0:: ds 16
-wc9d0:: ds 16
-wc9e0:: ds 16
-wc9f0:: ds 4
+ ds 144
+
wc9f4:: ds 5
wc9f9:: ds 7
-wCreditsFaux2bpp::
-wca00:: ds 1
-wca01:: ds 1
-wca02:: ds 14
-wca10:: ds 16
-wca20:: ds 16
-wca30:: ds 16
-wca40:: ds 16
-wca50:: ds 16
-wca60:: ds 16
-wca70:: ds 16
-
- ds 35
-
-wcaa3:: ds 2 ; caa3
+UNION ; ca00
+; blank credits tile buffer
+wCreditsFaux2bpp:: ds 128
+
+NEXTU ; ca00
+; mystery gift data
+wca00:: db
+wca01:: db
+wca02:: db
+ ds 160
+ENDU ; caa3
+
+wcaa3:: ds 2
wcaa5:: ds 16
wcab5:: ds 10
wcabf:: ds 10
@@ -1100,24 +1035,25 @@ wcb08:: ds 6
wcb0e:: ds 5
wcb13:: ds 9
wcb1c:: ds 14
-wBillsPC_ScrollPosition:: ds 1
-wBillsPC_CursorPosition:: ds 1
-wBillsPC_NumMonsInBox:: ds 1
-wBillsPC_NumMonsOnScreen:: ds 1
-wBillsPC_LoadedBox:: ds 1 ; 0 if party, 1 - 14 if box, 15 if active box
-wBillsPC_BackupScrollPosition:: ds 1
-wBillsPC_BackupCursorPosition:: ds 1
-wBillsPC_BackupLoadedBox:: ds 1
-wBillsPC_MonHasMail:: ds 1
+
+wBillsPC_ScrollPosition:: db
+wBillsPC_CursorPosition:: db
+wBillsPC_NumMonsInBox:: db
+wBillsPC_NumMonsOnScreen:: db
+wBillsPC_LoadedBox:: db ; 0 if party, 1 - 14 if box, 15 if active box
+wBillsPC_BackupScrollPosition:: db
+wBillsPC_BackupCursorPosition:: db
+wBillsPC_BackupLoadedBox:: db
+wBillsPC_MonHasMail:: db
ds 18
+
wcb45:: ds 20
wcb59:: ds 20
wcb6d:: ds 1
wcb6e:: ds 22
wcb84:: ds 100
wcbe8:: dw
-wLinkOTPartyMonTypes::
- ds 2 * PARTY_LENGTH
+wLinkOTPartyMonTypes:: ds 2 * PARTY_LENGTH
ds 84
wcc4a:: ds 22
@@ -1132,26 +1068,37 @@ wccb5:: ds 3
wccb8:: ds 1
wccb9:: ds 1
wccba:: ds 102
-ENDU
+ENDU ; cd20
+
SECTION "Video", WRAM0
-UNION
-CreditsPos::
-BGMapBuffer::
+UNION ; cd20
+; BGMapBuffer
+BGMapBuffer:: ds 40 ; cd20
+BGMapPalBuffer:: ds 40 ; cd48
+BGMapBufferPtrs:: ds 40 ; cd70 ; 20 bg map addresses (16x8 tiles)
+BGMapBufferEnd::
+
+NEXTU ; cd20
+; credits
+CreditsPos:: db
+CreditsUnusedCD21:: db
+CreditsTimer:: db
+
+NEXTU ; cd20
+; mobile data
wMobileMonSpeciesPointerBuffer:: dw
wMobileMonStructurePointerBuffer:: dw
wMobileMonOTNamePointerBuffer:: dw
wMobileMonNicknamePointerBuffer:: dw
wMobileMonMailPointerBuffer:: dw
-NEXTU
+NEXTU ; cd20
+; more mobile data
wcd20:: ds 1
wcd21:: ds 1
-wcd22::
-CreditsTimer:: ; cd22
- ds 1
-
+wcd22:: ds 1
wcd23:: ds 1
wcd24:: ds 1
wMobileCommsJumptableIndex:: ds 1 ; cd25
@@ -1159,11 +1106,11 @@ wcd26:: ds 1
wcd27:: ds 1
wcd28:: ds 1
wcd29:: ds 1
-ENDU
wMobileMonSpeciesBuffer::
-wcd2a:: ds 1
-wTempOddEggNickname::
+wcd2a:: db
+
+wTempOddEggNickname:: ; ds 11
wcd2b:: ds 1
wcd2c:: ds 1
wcd2d:: ds 1
@@ -1177,9 +1124,9 @@ wcd34:: ds 1
wcd35:: ds 1
; current time for link/mobile?
-wcd36:: ds 1 ; hours
-wcd37:: ds 1 ; mins
-wcd38:: ds 1 ; secs
+wcd36:: db ; hours
+wcd37:: db ; mins
+wcd38:: db ; secs
wcd39:: ds 1
wcd3a:: ds 1
@@ -1194,29 +1141,31 @@ wcd42:: ds 1
wcd43:: ds 1
; some sort of timer in link battles
-wMobileInactivityTimerMinutes:: ds 1 ; mins
-wMobileInactivityTimerSeconds:: ds 1 ; secs
-wMobileInactivityTimerFrames:: ds 1 ; frames
-
+wMobileInactivityTimerMinutes:: db ; mins
+wMobileInactivityTimerSeconds:: db ; secs
+wMobileInactivityTimerFrames:: db ; frames
wcd47:: ds 1
-BGMapPalBuffer:: ; cd48
- ds 1 ; 40
+ ds 1
wBTTempOTSprite::
-wcd49:: ds 1
+wcd49:: db
+
wcd4a:: ds 1
wcd4b:: ds 1
+
wEZChatCursorXCoord::
-wcd4c:: ds 1
+wcd4c:: db
wEZChatCursorYCoord::
-wcd4d:: ds 1
+wcd4d:: db
+
wcd4e:: ds 1
wcd4f:: ds 1
wcd50:: ds 1
wcd51:: ds 1
wcd52:: ds 1
-wMobileOpponentBattleMessage:: ; dc $c
+
+wMobileOpponentBattleMessage:: ; ds 12
wcd53:: ds 1
wcd54:: ds 1
wcd55:: ds 1
@@ -1244,18 +1193,15 @@ wcd6b:: ds 1
wcd6c:: ds 1
wcd6d:: ds 1
wcd6e:: ds 1
-wcd6f:: ds 1
-
-BGMapBufferPtrs:: ; cd70
-; 20 bg map addresses (16x8 tiles)
- ds 1 ; 40
-
+wcd6f:: ds 2
wcd71:: ds 1
wcd72:: ds 1
wcd73:: ds 1
wcd74:: ds 1
+
wOTMonSelection:: ds 2 ; ds 3
wcd77:: ds 1
+
wcd78:: ds 1
wcd79:: ds 1
wcd7a:: ds 2
@@ -1272,17 +1218,18 @@ wcd8a:: ds 1
wcd8b:: ds 1
wcd8c:: ds 1
wcd8d:: ds 11
-BGMapBufferEnd::
+ENDU ; cd98
-SGBPredef:: ; cd98
- ds 1
-PlayerHPPal:: ; cd99
- ds 1
-EnemyHPPal:: ; cd9a
- ds 1
+SGBPredef:: db ; cd98
+
+PlayerHPPal:: db ; cd99
+EnemyHPPal:: db ; cd9a
wHPPals:: ds PARTY_LENGTH
-wcda1:: ds 8
+wCurHPPal:: db
+
+ ds 7
+
wSGBPals:: ds 48 ; cda9
AttrMap:: ; cdd9
@@ -1297,101 +1244,125 @@ AttrMap:: ; cdd9
ds SCREEN_WIDTH * SCREEN_HEIGHT
AttrMapEnd::
-UNION
+UNION ; cf41
+; addresses dealing with serial comms
+ ds 1
+wcf42:: db
ds 1
-wcf42:: ds 2
-wcf44:: ds 1
-wcf45::
+wcf44:: db
+wcf45:: db
-NEXTU
-wTileAnimBuffer::
- ds $10
-; addresses dealing with serial comms
-ENDU
+NEXTU ; cf41
+wTileAnimBuffer:: ds 1 tiles
+ENDU ; cf51
-wOtherPlayerLinkMode:: ds 1
-wOtherPlayerLinkAction:: ds 4
-wPlayerLinkAction:: ds 1
-wcf57:: ds 4
+; link data
+wOtherPlayerLinkMode:: db
+wOtherPlayerLinkAction:: db
+ ds 3
+wPlayerLinkAction:: db
+wcf57:: db
+ ds 3
wLinkTimeoutFrames:: dw ; cf5b
-wcf5d:: ds 2
+wcf5d:: dw
-MonType:: ; cf5f
- ds 1
+MonType:: db ; cf5f
-CurSpecies:: ; cf60
+CurSpecies::
CurMove::
- ds 1
+ db ; cf60
+
+wNamedObjectTypeBuffer:: db
-wNamedObjectTypeBuffer:: ds 1
ds 1
-wJumptableIndex::
+
wBattleTowerBattleEnded::
-wcf63:: ds 1
-wNrOfBeatenBattleTowerTrainers::
-wMomBankDigitCursorPosition::
-wIntroSceneFrameCounter::
-wHoldingUnownPuzzlePiece::
-wCardFlipCursorY::
-wCreditsBorderFrame::
-wDexEntryPrevJumptableIndex::
-wcf64:: ds 1
+wJumptableIndex::
+ db
+
+UNION ; cf64
+; unidentified
+wcf64:: db
+wcf65:: db
+wcf66:: db
+
+NEXTU ; cf64
+; intro and title data
+wIntroSceneFrameCounter:: db
+wTitleScreenTimer:: dw
+
+NEXTU ; cf64
+; credits data
+wCreditsBorderFrame:: db
+wCreditsBorderMon:: db
+wCreditsLYOverride:: db
+
+NEXTU ; cf64
+; unown puzzle data
+wHoldingUnownPuzzlePiece:: db
+wUnownPuzzleCursorPosition:: db
+wUnownPuzzleHeldPiece:: db
+
+NEXTU ; cf64
+; card flip data
+wCardFlipCursorY:: db
+wCardFlipCursorX:: db
+wCardFlipWhichCard:: db
+
+NEXTU ; cf64
+; pokedex
+wDexEntryPrevJumptableIndex:: db
IF !DEF(CRYSTAL11)
-wPokedexStatus::
+wPokedexStatus:: db
ENDC
-wCreditsBorderMon::
-wTitleScreenTimerLo::
-wUnownPuzzleCursorPosition::
-wCardFlipCursorX::
+
+NEXTU ; cf64
+; miscellaneous
+wNrOfBeatenBattleTowerTrainers::
+wMomBankDigitCursorPosition::
+ db
wCurrPocket::
wPrinterQueueLength::
-wcf65:: ds 1
-wCreditsLYOverride::
-wTitleScreenTimerHi::
-wUnownPuzzleHeldPiece::
-wCardFlipWhichCard::
-wcf66:: ds 1
-
-Requested2bpp:: ; cf67
-Requested2bppSize::
- ds 1
-Requested2bppSource:: ; cf68
- ds 2
-Requested2bppDest:: ; cf6a
- ds 2
+ db
+ENDU ; cf67
-Requested1bpp:: ; cf6c
-Requested1bppSize::
- ds 1
-Requested1bppSource:: ; cf6d
- ds 2
-Requested1bppDest:: ; cf6f
- ds 2
+Requested2bpp::
+Requested2bppSize:: db ; cf67
+Requested2bppSource:: dw ; cf68
+Requested2bppDest:: dw ; cf6a
+
+Requested1bpp::
+Requested1bppSize:: db ; cf6c
+Requested1bppSource:: dw ; cf6d
+Requested1bppDest:: dw ; cf6f
wWindowStackPointer:: dw ; cf71
-wMenuJoypad:: ds 1 ; cf73
-MenuSelection:: ds 1 ; cf74
-MenuSelectionQuantity:: ds 1 ; cf75
-wWhichIndexSet:: ds 1 ; cf76
-wScrollingMenuCursorPosition:: ds 1 ; cf77
-wWindowStackSize:: ds 9 ; cf78
+wMenuJoypad:: db ; cf73
+MenuSelection:: db ; cf74
+MenuSelectionQuantity:: db ; cf75
+wWhichIndexSet:: db ; cf76
+wScrollingMenuCursorPosition:: db ; cf77
+wWindowStackSize:: db ; cf78
+
+ ds 8
; menu data header
wMenuDataHeader:: ; cf81
-wMenuFlags:: ds 1
-wMenuBorderTopCoord:: ds 1
-wMenuBorderLeftCoord:: ds 1
-wMenuBorderBottomCoord:: ds 1
-wMenuBorderRightCoord:: ds 1
-wMenuData2Pointer:: ds 2
-wMenuCursorBuffer:: ds 2
-; end menu data header
-wMenuDataBank:: ds 1 ; menu data bank?
+wMenuFlags:: db
+wMenuBorderTopCoord:: db
+wMenuBorderLeftCoord:: db
+wMenuBorderBottomCoord:: db
+wMenuBorderRightCoord:: db
+wMenuData2Pointer:: dw
+wMenuCursorBuffer:: dw
+wMenuDataBank:: db
ds 6
wMenuDataHeaderEnd::
wMenuData2::
-wMenuData2Flags:: ds 1 ; cf91
+UNION ; cf91
+; MenuData2
+wMenuData2Flags:: ; cf91
; bit 7: When set, start printing text one tile to the right of the border
; In scrolling menus, SELECT is functional
; bit 6: When set, start printing text one tile below the border
@@ -1402,104 +1373,98 @@ wMenuData2Flags:: ds 1 ; cf91
; bit 2: ????
; bit 1: Enable Select button
; bit 0: Disable B button
-
-wMenuData2_ScrollingMenuHeight::
-wMenuData2Items::
- ds 1 ; cf92
-wMenuData2IndicesPointer::
-wMenuData2Spacing::
-wMenuData2_ScrollingMenuWidth::
- ds 1 ; cf93
-wMenuData2_2DMenuItemStringsBank::
-wMenuData2_ScrollingMenuSpacing::
- ds 1 ; cf94
-wMenuData2_2DMenuItemStringsAddr::
-wMenuData2DisplayFunctionPointer::
-wMenuData2_ItemsPointerBank::
- ds 1 ; cf95
-wMenuData2_ItemsPointerAddr::
- ds 1 ; cf96
-wMenuData2PointerTableAddr::
-wMenuData2_2DMenuFunctionBank::
- ds 1 ; cf97
-wMenuData2_2DMenuFunctionAddr::
-wMenuData2_ScrollingMenuFunction1::
- ds 3 ; cf98
-wMenuData2_ScrollingMenuFunction2::
- ds 3 ; cf9b
-wMenuData2_ScrollingMenuFunction3::
- ds 3 ; cf9e
+ db
+wMenuData2Items:: db ; cf92
+wMenuData2IndicesPointer:: dw ; cf94
+wMenuData2DisplayFunctionPointer:: dw ; cf96
+wMenuData2PointerTableAddr:: dw ; cf97
+
+NEXTU ; cf91
+; 2D menu
+ ds 2 ; cf91
+wMenuData2Spacing:: db ; cf93
+wMenuData2_2DMenuItemStringsBank:: db ; cf94
+wMenuData2_2DMenuItemStringsAddr:: dw ; cf96
+wMenuData2_2DMenuFunctionBank:: db ; cf97
+wMenuData2_2DMenuFunctionAddr:: dw ; cf98
+
+NEXTU ; cf91
+; scrolling menu
+ ds 1 ; cf91
+wMenuData2_ScrollingMenuHeight:: db ; cf92
+wMenuData2_ScrollingMenuWidth:: db ; cf93
+wMenuData2_ScrollingMenuSpacing:: db ; cf94
+wMenuData2_ItemsPointerBank:: db ; cf95
+wMenuData2_ItemsPointerAddr:: dw ; cf97
+wMenuData2_ScrollingMenuFunction1:: ds 3 ; cf98
+wMenuData2_ScrollingMenuFunction2:: ds 3 ; cf9b
+wMenuData2_ScrollingMenuFunction3:: ds 3 ; cf9e
+ENDU ; cfa1
wMenuData2End::
wMenuData3::
-w2DMenuCursorInitY:: ds 1 ; cfa1
-w2DMenuCursorInitX:: ds 1 ; cfa2
-w2DMenuNumRows:: ds 1 ; cfa3
-w2DMenuNumCols:: ds 1 ; cfa4
-w2DMenuFlags1:: ds 1 ; cfa5
-w2DMenuFlags2:: ds 1 ; cfa6
-w2DMenuCursorOffsets:: ds 1 ; cfa7
-wMenuJoypadFilter:: ds 1 ; cfa8
+w2DMenuCursorInitY:: db ; cfa1
+w2DMenuCursorInitX:: db ; cfa2
+w2DMenuNumRows:: db ; cfa3
+w2DMenuNumCols:: db ; cfa4
+w2DMenuFlags1:: db ; cfa5
+w2DMenuFlags2:: db ; cfa6
+w2DMenuCursorOffsets:: db ; cfa7
+wMenuJoypadFilter:: db ; cfa8
wMenuData3End::
-wMenuCursorY:: ds 1 ; cfa9
-wMenuCursorX:: ds 1 ; cfaa
-wCursorOffCharacter:: ds 1 ; cfab
-wCursorCurrentTile:: ds 2 ; cfac
+wMenuCursorY:: db ; cfa9
+wMenuCursorX:: db ; cfaa
+wCursorOffCharacter:: db ; cfab
+wCursorCurrentTile:: dw ; cfac
+
ds 3
-OverworldDelay:: ; cfb1
- ds 1
-TextDelayFrames:: ; cfb2
- ds 1
-VBlankOccurred:: ; cfb3
- ds 1
+OverworldDelay:: db ; cfb1
+TextDelayFrames:: db ; cfb2
+VBlankOccurred:: db ; cfb3
-PredefID:: ; cfb4
- ds 1
-PredefTemp:: ; cfb5
- ds 2
-PredefAddress:: ; cfb7
- ds 2
-wFarCallBCBuffer:: ; cfb9
- ds 2
+PredefID:: db ; cfb4
+PredefTemp:: dw ; cfb5
+PredefAddress:: dw ; cfb7
+wFarCallBCBuffer:: dw ; cfb9
+
+wcfbb:: db
-wcfbb:: ds 1
GameTimerPause:: ; cfbc
; bit 0
- ds 1
+ db
ds 1
-wcfbe::
-; SGB flags?
- ds 2
+wcfbe:: ; SGB flags?
+; bit 7
+ db
+
+ ds 1
InBattleTowerBattle:: ; cfc0
; 0 not in BattleTower-Battle
; 1 BattleTower-Battle
- ds 1
+ db
ds 1
-FXAnimID::
-FXAnimIDLo:: ; cfc2
- ds 1
-FXAnimIDHi:: ; cfc3
- ds 1
-wPlaceBallsX:: ; cfc4
- ds 1
-wPlaceBallsY:: ; cfc5
- ds 1
-TileAnimationTimer:: ; cfc6
- ds 1
+FXAnimID:: dw ; cfc2
+
+wPlaceBallsX:: db ; cfc4
+wPlaceBallsY:: db ; cfc5
+
+TileAnimationTimer:: db ; cfc6
; palette backups?
-wBGP:: ds 1
-wOBP0:: ds 1
-wOBP1:: ds 1
+wBGP:: db
+wOBP0:: db
+wOBP1:: db
-wNumHits:: ds 2
+wNumHits:: db
+
+ ds 1
Options:: ; cfcc
; bit 0-2: number of frames to delay when printing text
@@ -1509,16 +1474,12 @@ Options:: ; cfcc
; bit 5: stereo off/on
; bit 6: battle style shift/set
; bit 7: battle scene off/on
- ds 1
-
-wSaveFileExists:: ds 1
-
+ db
+wSaveFileExists:: db
TextBoxFrame:: ; cfce
; bits 0-2: textbox frame 0-7
- ds 1
-TextBoxFlags::
- ds 1
-
+ db
+TextBoxFlags:: db
GBPrinter:: ; cfd0
; bit 0-6: brightness
; lightest: $00
@@ -1526,56 +1487,55 @@ GBPrinter:: ; cfd0
; normal: $40 (default)
; darker: $60
; darkest: $7F
- ds 1
-
+ db
Options2:: ; cfd1
; bit 1: menu account off/on
- ds 1
-
+ db
ds 2
OptionsEnd::
; Time buffer, for counting the amount of time since
; an event began.
-
-wSecondsSince:: ds 1
-wMinutesSince:: ds 1
-wHoursSince:: ds 1
-wDaysSince:: ds 1
-
-wRAM0End:: ; cfd8
+wSecondsSince:: db
+wMinutesSince:: db
+wHoursSince:: db
+wDaysSince:: db
SECTION "WRAM 1", WRAMX
+wRAM1Start::
wd000:: ds 1
-DefaultSpawnpoint::
-wd001:: ds 1
-; d002
-UNION
+DefaultSpawnpoint:: db
+
+UNION ; d002
+; mail temp storage
wTempMail:: mailmsg wTempMail
-NEXTU
-wSeerAction:: ds 1
+NEXTU ; d002
+; poke seer
+wSeerAction:: db
wSeerNickname:: ds PKMN_NAME_LENGTH
wSeerCaughtLocation:: ds 17
wSeerTimeOfDay:: ds NAME_LENGTH
wSeerOTName:: ds NAME_LENGTH
-wSeerOTNameGrammar:: ds 1
+wSeerOTNameGrammar:: db
wSeerCaughtLevelString:: ds 4
-wSeerCaughtLevel:: ds 1
-wSeerCaughtData:: ds 1
-wSeerCaughtGender:: ds 1
+wSeerCaughtLevel:: db
+wSeerCaughtData:: db
+wSeerCaughtGender:: db
-NEXTU
+NEXTU ; d002
+; mon buffer
wBufferMonNick:: ds PKMN_NAME_LENGTH ; d002
wBufferMonOT:: ds NAME_LENGTH ; d00d
wBufferMon:: party_struct wBufferMon ; d018
ds 8
wMonOrItemNameBuffer::
-NEXTU
+NEXTU ; d002
+; bug-catching contest
wBugContestResults::
bugcontestwinner wBugContestFirstPlace
bugcontestwinner wBugContestSecondPlace
@@ -1585,89 +1545,122 @@ wBugContestWinnersEnd::
ds 4
wBugContestWinnerName:: ds NAME_LENGTH
+NEXTU ; d002
+; mart items
+wMartItem1BCD:: ds 3
+wMartItem2BCD:: ds 3
+wMartItem3BCD:: ds 3
+wMartItem4BCD:: ds 3
+wMartItem5BCD:: ds 3
+wMartItem6BCD:: ds 3
+wMartItem7BCD:: ds 3
+wMartItem8BCD:: ds 3
+wMartItem9BCD:: ds 3
+wMartItem10BCD:: ds 3
+wMartItemBCDEnd::
+
+NEXTU ; d002
+; town map data
+wTownMapPlayerIconLandmark:: ds 1
+UNION
+wTownMapCursorLandmark:: ds 1
+wTownMapCursorObjectPointer:: ds 2
NEXTU
-wd002::
+wTownMapCursorCoordinates:: ds 2
+ENDU
+
+NEXTU ; d002
+; phone call data
+PhoneScriptBank:: db
+PhoneCaller:: dw
+
+NEXTU ; d002
+; radio data
+wCurrentRadioLine:: db
+wNextRadioLine:: db
+wRadioTextDelay:: db
+wNumRadioLinesPrinted:: db
+wOaksPkmnTalkSegmentCounter:: db
+ ds 5
+wRadioText:: ds 2 * SCREEN_WIDTH
+wRadioTextEnd::
+
+NEXTU ; d002
+; lucky number show
+LuckyNumberDigit1Buffer:: db
+LuckyNumberDigit2Buffer:: db
+LuckyNumberDigit3Buffer:: db
+LuckyNumberDigit4Buffer:: db
+LuckyNumberDigit5Buffer:: db
+
+NEXTU ; d002
+; movement buffer data
+wMovementBufferCount:: db
+wMovementBufferObject:: db
+wUnusedMovementBufferBank:: db
+wUnusedMovementBufferPointer:: dw
+MovementBuffer:: ds 55
+
+NEXTU ; d002
+; box printing
+wWhichBoxMonToPrint:: db
+wFinishedPrintingBox:: db
+wAddrOfBoxToPrint:: dw
+wBankOfBoxToPrint:: db
+wWhichBoxToPrint:: db
+
+NEXTU ; d002
+; trainer HUD data
+ ds 1
+wPlaceBallsDirection:: db
+wTrainerHUDTiles:: db
+
+NEXTU ; d002
+; mobile participant nicknames
+ ds 4
+wMobileParticipant1Nickname:: ds NAME_LENGTH_JAPANESE
+wMobileParticipant2Nickname:: ds NAME_LENGTH_JAPANESE
+wMobileParticipant3Nickname:: ds NAME_LENGTH_JAPANESE
+
+NEXTU ; d002
+; earthquake data buffer
+wEarthquakeMovementDataBuffer:: ds 5
+
+NEXTU ; d002
+; miscellaneous
wTempDayOfWeek::
wApricorns::
-PhoneScriptBank::
-LuckyNumberDigit1Buffer::
-wCurrentRadioLine::
-wMovementBufferCount::
-wMartItem1BCD::
-wWhichBoxMonToPrint::
- ds 1
-wd003::
-LuckyNumberDigit2Buffer::
-PhoneCallerLo::
-wNextRadioLine::
-wMovementBufferPerson::
-wPlaceBallsDirection::
-wFinishedPrintingBox::
- ds 1
-wd004::
-LuckyNumberDigit3Buffer::
-PhoneCallerHi::
-wRadioTextDelay::
-wTrainerHUDTiles::
-wAddrOfBoxToPrint::
- ds 1
-wd005::
-LuckyNumberDigit4Buffer::
-StartFlypoint:: ; d005
-wNumRadioLinesPrinted::
-wMartItem2BCD::
- ds 1
-wd006::
-wMobileParticipant1Nickname::
-LuckyNumberDigit5Buffer::
-EndFlypoint:: ; d006
-wOaksPkmnTalkSegmentCounter::
-wBankOfBoxToPrint::
- ds 1
+ db
-wd007::
-wWhichBoxToPrint::
-MovementBuffer:: ; d007
- ds 1
+ ds 2
-wMartItem3BCD::
-wd008:: ds 2
-wd00a:: ds 1
-wMartItem4BCD::
-wd00b:: ds 1
+StartFlypoint:: db
+EndFlypoint:: db
-UNION
-wRadioText:: ds 2 * SCREEN_WIDTH
-wRadioTextEnd::
+NEXTU ; d002
+; unidentified
+wd002:: db
+wd003:: db
+wd004:: db
-NEXTU
-wMobileParticipant2Nickname::
+; mobile?
+ ds 3
+wd008:: ds 2
+ ds 2
wd00c:: ds 1
wd00d:: ds 1
-wMartItem5BCD::
-wd00e:: ds 1
+ ds 1
wd00f:: ds 1
wd010:: ds 1
-wMartItem6BCD::
wd011:: ds 1
-wMobileParticipant3Nickname::
wd012:: ds 1
wd013:: ds 1
-wMartItem7BCD::
wd014:: ds 2
-wd016:: ds 1
-wMartItem8BCD::
+ ds 1
wd017:: ds 1
-
wd018:: ds 1
wd019:: ds 1
-wMartItem9BCD::
-wd01a:: ds 3
-wMartItem10BCD:: ds 2
-wd01f:: ds 1
-wMartItemBCDEnd::
- ds 13
-
+ ds 19
wd02d:: ds 1
wd02e:: ds 1
wd02f:: ds 1
@@ -1677,129 +1670,145 @@ wd032:: ds 1
wd033:: ds 1
wd034:: ds 2
wd036:: ds 2
-wd038:: ds 3
-wd03b:: ds 3
-ENDU
-
-MenuItemsList::
-CurFruitTree::
-CurInput::
-wElevatorPointerBank::
-wCurCoordEventTriggerID::
-wCurSignpostYCoord::
-EngineBuffer1:: ; d03e
- ds 1
+ ds 6
-wd03f::
-wJumpStdScriptBuffer::
-CurFruit:: ; d03f
-MartPointerBank::
-wElevatorPointerLo::
-wCurCoordEventMapY::
-wCurSignpostXCoord::
-EngineBuffer2::
- ds 1
+UNION ; d03e
+; engine buffers
+EngineBuffer1:: db
+EngineBuffer2:: db
+EngineBuffer3:: db
+EngineBuffer4:: db
+EngineBuffer5:: db
+
+NEXTU ; d03e
+; menu items list
+MenuItemsList:: ds 16
+MenuItemsListEnd::
-wd040::
-wElevatorPointerHi::
-MartPointer:: ; d040
-wCurCoordEventMapX::
-wCurSignpostType::
-EngineBuffer3::
- ds 1
+NEXTU ; d03e
+; fruit tree data
+CurFruitTree:: db
+CurFruit:: db
-wd041::
-wElevatorOriginFloor::
-wTempTrainerHeader::
-wTempTrainerEventFlagLo::
-wCurSignpostScriptAddr::
-EngineBuffer4::
- ds 1
+NEXTU ; d03e
+; elevator data
+wElevatorPointerBank:: db
+wElevatorPointer:: dw
+wElevatorOriginFloor:: db
-wTempTrainerEventFlagHi::
-MovementAnimation:: ; d042
-wCurCoordEventScriptAddr::
-EngineBuffer5::
+NEXTU ; d03e
+; coord event data
+wCurCoordEventSceneID:: db
+wCurCoordEventMapY:: db
+wCurCoordEventMapX:: db
ds 1
+wCurCoordEventScriptAddr:: dw
-wTempTrainerClass::
-WalkingDirection:: ; d043
-wBargainShopFlags::
- ds 1
-
-wTempTrainerID::
-FacingDirection:: ; d044
- ds 1
+NEXTU ; d03e
+; BG event data
+wCurBGEventYCoord:: db
+wCurBGEventXCoord:: db
+wCurBGEventType:: db
+wCurBGEventScriptAddr:: dw
-wSeenTextPointer::
-WalkingX::
-wd045:: ; d045
+NEXTU ; d03e
+; mart data
ds 1
-WalkingY:: ; d046
- ds 1
-
-WalkingTile:: ; d047
-wWinTextPointer::
+MartPointerBank:: db
+MartPointer:: dw
ds 1
+wBargainShopFlags:: db
-wPhoneScriptPointer:: ds 1
-wLossTextPointer:: ds 2
-wScriptAfterPointer:: ds 2
-wRunningTrainerBattleScript:: ds 1
-MenuItemsListEnd::
+NEXTU ; d03e
+; trainer data
+ ds 3
+wTempTrainerHeader::
+wTempTrainerEventFlag:: dw
+wTempTrainerClass:: db
+wTempTrainerID:: db
+wSeenTextPointer:: dw
+wWinTextPointer:: dw
+wLossTextPointer:: dw
+wScriptAfterPointer:: dw
+wRunningTrainerBattleScript:: db
wTempTrainerHeaderEnd::
-wPlayerTurningDirection:: ; d04e
- ds 24
-ENDU
-wTMHMMoveNameBackup:: ds MOVE_NAME_LENGTH ; d066
-StringBuffer1:: ; d073
- ds 19
+NEXTU ; d03e
+; player movement data
+CurInput:: db
+wd03f:: db
+wd040:: db
+wd041:: db
+MovementAnimation:: db
+WalkingDirection:: db
+FacingDirection:: db
+WalkingX:: db
+WalkingY:: db
+WalkingTile:: db
+ ds 6
+wPlayerTurningDirection:: db
-StringBuffer2:: ; d086
- ds 19
+NEXTU ; d03e
+; std script buffer
+ ds 1
+wJumpStdScriptBuffer:: ds 3
-StringBuffer3:: ; d099
- ds 19
+NEXTU ; d03e
+; phone script pointer
+ ds 10
+wPhoneScriptPointer:: dw
-StringBuffer4:: ; d0ac
- ds 19
+NEXTU ; d03e
+; backup menu data
+ ds 7
+wMenuCursorBufferBackup:: db
+wMenuScrollPositionBackup:: db
+ ds 31
+ENDU ; d066
+ENDU ; d066
-StringBuffer5:: ; d0bf
- ds 19
+wTMHMMoveNameBackup:: ds MOVE_NAME_LENGTH ; d066
-wd0d2:: ds 2
+StringBuffer1:: ds 19 ; d073
+StringBuffer2:: ds 19 ; d086
+StringBuffer3:: ds 19 ; d099
+StringBuffer4:: ds 19 ; d0ac
+StringBuffer5:: ds 19 ; d0bf
-CurBattleMon:: ; d0d4
- ds 1
-CurMoveNum:: ; d0d5
- ds 1
+wBattleMenuCursorBuffer:: dw ; d0d2
-wLastPocket:: ds 1
+CurBattleMon:: db ; d0d4
+CurMoveNum:: db ; d0d5
-wPCItemsCursor:: ds 1
-wPartyMenuCursor:: ds 1
-wItemsPocketCursor:: ds 1
-wKeyItemsPocketCursor:: ds 1
-wBallsPocketCursor:: ds 1
-wTMHMPocketCursor:: ds 1
+wLastPocket:: db
-wPCItemsScrollPosition:: ds 1
-wPartyMenuScrollPosition:: ds 1 ; unused
-wItemsPocketScrollPosition:: ds 1
-wKeyItemsPocketScrollPosition:: ds 1
-wBallsPocketScrollPosition:: ds 1
-wTMHMPocketScrollPosition:: ds 1
+wPCItemsCursor:: db
+wPartyMenuCursor:: db
+wItemsPocketCursor:: db
+wKeyItemsPocketCursor:: db
+wBallsPocketCursor:: db
+wTMHMPocketCursor:: db
+
+wPCItemsScrollPosition:: db
+wPartyMenuScrollPosition:: db ; unused
+wItemsPocketScrollPosition:: db
+wKeyItemsPocketScrollPosition:: db
+wBallsPocketScrollPosition:: db
+wTMHMPocketScrollPosition:: db
-wMoveSwapBuffer::
wSwitchMon::
wSwitchItem::
-wd0e3:: ds 1
+wMoveSwapBuffer::
+wd0e3::
+ db
+
wMenuScrollPosition:: ds 4
-wQueuedScriptBank:: ds 1
-wQueuedScriptAddr:: ds 2
-wNumMoves::
-wd0eb:: ds 1
+
+wQueuedScriptBank:: db
+wQueuedScriptAddr:: dw
+
+wNumMoves:: db
+
wFieldMoveSucceeded::
wItemEffectSucceeded::
wPlayerAction::
@@ -1807,266 +1816,172 @@ wPlayerAction::
; 1 - use item
; 2 - switch
wSolvedUnownPuzzle::
- ds 1 ; d0ec
+ db ; d0ec
VramState:: ; d0ed
; bit 0: overworld sprite updating on/off
; bit 6: something to do with text
; bit 7: on when surf initiates
; flickers when climbing waterfall
- ds 1
+ db
-wBattleResult:: ds 1 ; d0ee
-wUsingItemWithSelect:: ds 1 ; d0ef
+wBattleResult:: db ; d0ee
+wUsingItemWithSelect:: db ; d0ef
-UNION
-CurMart:: ds 16 ; d0f0
+UNION ; d0f0
+; mart data
+CurMart:: ds 16
CurMartEnd::
-NEXTU
-CurElevator:: ds 1
-wd0f1::
-CurElevatorFloors::
-wCurMessageIndex:: ds 1
-wd0f2::
-wMailboxCount:: ds 1
+NEXTU ; d0f0
+; elevator data
+CurElevator:: db
+CurElevatorFloors:: db
+
+NEXTU ; d0f0
+; mailbox data
+ ds 1
+wCurMessageIndex:: db
+wMailboxCount:: db
wMailboxItems:: ds MAILBOX_CAPACITY
wMailboxEnd:: ds 1 ; d0fe
+ENDU ; d100
-ENDU
wListPointer:: dw ; d100
wUnusedD102:: dw ; d102
wItemAttributesPtr:: dw ; d104
-CurItem:: ds 1 ; d106
+CurItem:: db ; d106
CurItemQuantity:: ; d107
wMartItemID::
-wd107:: ds 1
+ db
-CurPartySpecies:: ; d108
- ds 1
+CurPartySpecies:: db ; d108
CurPartyMon:: ; d109
; contains which monster in a party
; is being dealt with at the moment
; 0-5
- ds 1
+ db
wWhichHPBar::
; 0: Enemy
; 1: Player
; 2: Party Menu
- ds 1
+ db
wPokemonWithdrawDepositParameter::
; 0: Take from PC
; 1: Put into PC
-; 2: Take from Daycare
-; 3: Put into Daycare
-wd10b:: ds 1
-wItemQuantityChangeBuffer:: ds 1
-wItemQuantityBuffer:: ds 1
+; 2: Take from Day-Care
+; 3: Put into Day-Care
+ db
-TempMon:: ; d10e
- party_struct TempMon
+wItemQuantityChangeBuffer:: db
+wItemQuantityBuffer:: db
-wSpriteFlags:: ds 1 ; d13e
+TempMon:: party_struct TempMon ; d10e
-wHandlePlayerStep:: ds 2 ; d13f
+wSpriteFlags:: db ; d13e
-PartyMenuActionText:: ; d141
- ds 1
+wHandlePlayerStep:: dw ; d13f
-wItemAttributeParamBuffer:: ; d142
- ds 1
+PartyMenuActionText:: db ; d141
-CurPartyLevel:: ; d143
- ds 1
+wItemAttributeParamBuffer:: db ; d142
+
+CurPartyLevel:: db ; d143
-wScrollingMenuListSize:: ds 2
+wScrollingMenuListSize:: dw
; used when following a map warp
; d146
-wNextWarp:: ds 1
-wNextMapGroup:: ds 1
-wNextMapNumber:: ds 1
-wPrevWarp:: ds 1
-wPrevMapGroup:: ds 1
-wPrevMapNumber:: ds 1
+wNextWarp:: db
+wNextMapGroup:: db
+wNextMapNumber:: db
+wPrevWarp:: db
+wPrevMapGroup:: db
+wPrevMapNumber:: db
; d14c
-wPlayerBGMapOffsetX:: ds 1 ; used in FollowNotExact; unit is pixels
-wPlayerBGMapOffsetY:: ds 1 ; used in FollowNotExact; unit is pixels
+wPlayerBGMapOffsetX:: db ; used in FollowNotExact; unit is pixels
+wPlayerBGMapOffsetY:: db ; used in FollowNotExact; unit is pixels
; Player movement
-wPlayerStepVectorX:: ds 1 ; d14e
-wPlayerStepVectorY:: ds 1 ; d14f
-wPlayerStepFlags:: ds 1 ; d150
+wPlayerStepVectorX:: db ; d14e
+wPlayerStepVectorY:: db ; d14f
+wPlayerStepFlags:: db ; d150
+wPlayerStepDirection:: ; d151
; bit 7: Start step
; bit 6: Stop step
; bit 5: Doing step
; bit 4: In midair
; bits 0-3: unused
-wPlayerStepDirection:: ds 1 ; d151
+ db
-wBGMapAnchor:: ds 2 ; d152
+wBGMapAnchor:: dw ; d152
-UNION
-UsedSprites:: ds 64 ; d154
+UNION ; d154
+UsedSprites:: ds 64
UsedSpritesEnd::
-NEXTU
-wd154:: ; d154
- ds 31 ; 64
-
-wd173:: ds 1 ; related to command queue type 3
- ds 13
-wd181:: ds 1
-wd182:: ds 1
- ds 14
-
-wd191:: ds 1
-wd192:: ds 1
-wd193:: ds 1
-ENDU
+NEXTU ; d154
+ ds 31
+wd173:: db ; related to command queue type 3
+ENDU ; d194
wOverworldMapAnchor:: dw ; d194
-wMetatileStandingY:: ds 1 ; d196
-wMetatileStandingX:: ds 1 ; d197
-wSecondMapHeaderBank:: ds 1 ; d198
-wTileset:: ds 1 ; d199
-wPermission:: ds 1 ; d19a
+wMetatileStandingY:: db ; d196
+wMetatileStandingX:: db ; d197
+
+wSecondMapHeaderBank:: db ; d198
+wTileset:: db ; d199
+wEnvironment:: db ; d19a
wSecondMapHeaderAddr:: dw ; d19b
; width/height are in blocks (2x2 walkable tiles, 4x4 graphics tiles)
MapHeader:: ; d19d
-MapBorderBlock:: ; d19d
- ds 1
-MapHeight:: ; d19e
- ds 1
-MapWidth:: ; d19f
- ds 1
-MapBlockDataBank:: ; d1a0
- ds 1
-MapBlockDataPointer:: ; d1a1
- ds 2
-MapScriptHeaderBank:: ; d1a3
- ds 1
-MapScriptHeaderPointer:: ; d1a4
- ds 2
-MapEventHeaderPointer:: ; d1a6
- ds 2
+MapBorderBlock:: db ; d19d
+MapHeight:: db ; d19e
+MapWidth:: db ; d19f
+MapBlockDataBank:: db; d1a0
+MapBlockDataPointer:: dw ; d1a1
+MapScriptHeaderBank:: db ; d1a3
+MapScriptHeaderPointer:: dw ; d1a4
+MapEventHeaderPointer:: dw ; d1a6
; bit set
-MapConnections:: ; d1a8
- ds 1
-NorthMapConnection:: ; d1a9
-NorthConnectedMapGroup:: ; d1a9
- ds 1
-NorthConnectedMapNumber:: ; d1aa
- ds 1
-NorthConnectionStripPointer:: ; d1ab
- ds 2
-NorthConnectionStripLocation:: ; d1ad
- ds 2
-NorthConnectionStripLength:: ; d1af
- ds 1
-NorthConnectedMapWidth:: ; d1b0
- ds 1
-NorthConnectionStripYOffset:: ; d1b1
- ds 1
-NorthConnectionStripXOffset:: ; d1b2
- ds 1
-NorthConnectionWindow:: ; d1b3
- ds 2
-
-SouthMapConnection:: ; d1b5
-SouthConnectedMapGroup:: ; d1b5
- ds 1
-SouthConnectedMapNumber:: ; d1b6
- ds 1
-SouthConnectionStripPointer:: ; d1b7
- ds 2
-SouthConnectionStripLocation:: ; d1b9
- ds 2
-SouthConnectionStripLength:: ; d1bb
- ds 1
-SouthConnectedMapWidth:: ; d1bc
- ds 1
-SouthConnectionStripYOffset:: ; d1bd
- ds 1
-SouthConnectionStripXOffset:: ; d1be
- ds 1
-SouthConnectionWindow:: ; d1bf
- ds 2
-
-WestMapConnection:: ; d1c1
-WestConnectedMapGroup:: ; d1c1
- ds 1
-WestConnectedMapNumber:: ; d1c2
- ds 1
-WestConnectionStripPointer:: ; d1c3
- ds 2
-WestConnectionStripLocation:: ; d1c5
- ds 2
-WestConnectionStripLength:: ; d1c7
- ds 1
-WestConnectedMapWidth:: ; d1c8
- ds 1
-WestConnectionStripYOffset:: ; d1c9
- ds 1
-WestConnectionStripXOffset:: ; d1ca
- ds 1
-WestConnectionWindow:: ; d1cb
- ds 2
-
-EastMapConnection:: ; d1cd
-EastConnectedMapGroup:: ; d1cd
- ds 1
-EastConnectedMapNumber:: ; d1ce
- ds 1
-EastConnectionStripPointer:: ; d1cf
- ds 2
-EastConnectionStripLocation:: ; d1d1
- ds 2
-EastConnectionStripLength:: ; d1d3
- ds 1
-EastConnectedMapWidth:: ; d1d4
- ds 1
-EastConnectionStripYOffset:: ; d1d5
- ds 1
-EastConnectionStripXOffset:: ; d1d6
- ds 1
-EastConnectionWindow:: ; d1d7
- ds 2
+MapConnections:: db ; d1a8
+NorthMapConnection:: map_connection_struct North ; d1a9
+SouthMapConnection:: map_connection_struct South ; d1b5
+WestMapConnection:: map_connection_struct West ; d1c1
+EastMapConnection:: map_connection_struct East ; d1cd
TilesetHeader::
-TilesetBank:: ; d1d9
- ds 1
-TilesetAddress:: ; d1da
- ds 2
-TilesetBlocksBank:: ; d1dc
- ds 1
-TilesetBlocksAddress:: ; d1dd
- ds 2
-TilesetCollisionBank:: ; d1df
- ds 1
-TilesetCollisionAddress:: ; d1e0
- ds 2
-TilesetAnim:: ; d1e2
-; bank 3f
- ds 2
-; unused ; d1e4
- ds 2
-TilesetPalettes:: ; d1e6
-; bank 3f
- ds 2
-
-EvolvableFlags:: ; d1e8
- flag_array PARTY_LENGTH
+TilesetBank:: db ; d1d9
+TilesetAddress:: dw ; d1da
+TilesetBlocksBank:: db ; d1dc
+TilesetBlocksAddress:: dw ; d1dd
+TilesetCollisionBank:: db ; d1df
+TilesetCollisionAddress:: dw ; d1e0
+TilesetAnim:: dw ; bank 3f ; d1e2
+ ds 2 ; unused ; d1e4
+TilesetPalettes:: dw ; bank 3f ; d1e6
+TilesetHeaderEnd::
+
+EvolvableFlags:: flag_array PARTY_LENGTH ; d1e8
wForceEvolution:: db ; d1e9
-UNION
+UNION ; d1ea
+; general-purpose buffers
+Buffer1:: db ; d1ea
+Buffer2:: db ; d1eb
+Buffer3:: db ; d1ec
+Buffer4:: db ; d1ed
+Buffer5:: db ; d1ee
+Buffer6:: db ; d1ef
+
+NEXTU ; d1ea
; HP bar animations
wCurHPAnimMaxHP:: dw ; d1ea
wCurHPAnimOldHP:: dw ; d1ec
@@ -2078,41 +1993,40 @@ wCurHPAnimDeltaHP:: dw ; d1f3
wCurHPAnimLowHP:: db ; d1f5
wCurHPAnimHighHP:: db ; d1f6
-NEXTU
-MagikarpLength::
-wEvolutionOldSpecies::
-Buffer1:: ; d1ea
- ds 1
-MovementType::
-wEvolutionNewSpecies::
-Buffer2:: ; d1eb
- ds 1
-wEvolutionPicOffset::
-Buffer3::
+NEXTU ; d1ea
+; evolution data
+wEvolutionOldSpecies:: db ; d1ea
+wEvolutionNewSpecies:: db ; d1eb
+wEvolutionPicOffset:: db ; d1ec
+wEvolutionCanceled:: db ; d1ed
+
+NEXTU ; d1ea
+; mobile
+ ds 2
wd1ec:: ds 1
-wEvolutionCanceled::
-Buffer4::
wd1ed:: ds 1
-Buffer5::
wd1ee:: ds 1
-Buffer6::
wd1ef:: ds 1
wd1f0:: ds 1
-CurEnemyItem::
wd1f1:: ds 1
wd1f2:: ds 1
-wd1f3:: ds 1
-wd1f4:: ds 1
-wd1f5:: ds 1
-wd1f6::
- ds 4
-ENDU
+wd1f3:: ds 4
-LinkBattleRNs:: ; d1fa
- ds 10
+NEXTU ; d1ea
+; miscellaneous
+wMagikarpLength:: dw
+wSelectedDecoration:: db
+wOtherDecoration:: db
+ ds 3
+CurEnemyItem:: db
+ENDU ; d1f7
+
+ ds 3
+
+LinkBattleRNs:: ds 10 ; d1fa
-TempEnemyMonSpecies:: ds 1 ; d204
-TempBattleMonSpecies:: ds 1 ; d205
+TempEnemyMonSpecies:: db ; d204
+TempBattleMonSpecies:: db ; d205
EnemyMon:: battle_struct EnemyMon ; d206
EnemyMonBaseStats:: ds 5 ; d226
@@ -2125,155 +2039,111 @@ wBattleMode:: ; d22d
; 0: overworld
; 1: wild battle
; 2: trainer battle
- ds 1
+ db
+
+TempWildMonSpecies:: db
-TempWildMonSpecies:: ds 1
OtherTrainerClass:: ; d22f
; class (Youngster, Bug Catcher, etc.) of opposing trainer
; 0 if opponent is a wild Pokémon, not a trainer
- ds 1
+ db
-BattleType:: ; d230
-; $00 normal
-; $01 can lose
-; $02 debug
-; $03 dude/tutorial
-; $04 fishing
-; $05 roaming
-; $06 contest
-; $07 shiny
-; $08 headbutt/rock smash
-; $09 trap
-; $0a force Item1
-; $0b celebi
-; $0c suicune
- ds 1
+; BATTLETYPE_* values
+BattleType:: db ; d230
OtherTrainerID:: ; d231
; which trainer of the class that you're fighting
; (Joey, Mikey, Albert, etc.)
- ds 1
+ db
-wForcedSwitch:: ds 1
+wForcedSwitch:: db
-TrainerClass:: ; d233
- ds 1
+TrainerClass:: db ; d233
-UnownLetter:: ; d234
- ds 1
+UnownLetter:: db ; d234
-wMoveSelectionMenuType:: ds 1
+wMoveSelectionMenuType:: db
+; corresponds to the data/pokemon/base_stats/*.asm contents
CurBaseData:: ; d236
-BaseDexNo:: ; d236
- ds 1
+BaseDexNo:: db ; d236
BaseStats:: ; d237
-BaseHP:: ; d237
- ds 1
-BaseAttack:: ; d238
- ds 1
-BaseDefense:: ; d239
- ds 1
-BaseSpeed:: ; d23a
- ds 1
-BaseSpecialAttack:: ; d23b
- ds 1
-BaseSpecialDefense:: ; d23c
- ds 1
+BaseHP:: db ; d237
+BaseAttack:: db ; d238
+BaseDefense:: db ; d239
+BaseSpeed:: db ; d23a
+BaseSpecialAttack:: db ; d23b
+BaseSpecialDefense:: db ; d23c
BaseType:: ; d23d
-BaseType1:: ; d23d
- ds 1
-BaseType2:: ; d23e
- ds 1
-BaseCatchRate:: ; d23f
- ds 1
-BaseExp:: ; d240
- ds 1
+BaseType1:: db ; d23d
+BaseType2:: db ; d23e
+BaseCatchRate:: db ; d23f
+BaseExp:: db ; d240
BaseItems:: ; d241
- ds 2
-BaseGender:: ; d243
- ds 1
-BaseUnknown1:: ; d244
- ds 1
-BaseEggSteps:: ; d245
- ds 1
-BaseUnknown2:: ; d246
- ds 1
-BasePicSize:: ; d247
- ds 1
-BasePadding:: ; d248
- ds 4
-BaseGrowthRate:: ; d24c
- ds 1
-BaseEggGroups:: ; d24d
- ds 1
-BaseTMHM:: ; d24e
- ds 8
-
-
-CurDamage:: ; d256
- ds 2
-
- ds 2
-wMornEncounterRate:: ds 1 ; d25a
-wDayEncounterRate:: ds 1 ; d25b
-wNiteEncounterRate:: ds 1 ; d25c
-wWaterEncounterRate:: ds 1 ; d25d
+BaseItem1:: db ; d241
+BaseItem2:: db ; d242
+BaseGender:: db ; d243
+BaseUnknown1:: db ; d244
+BaseEggSteps:: db ; d245
+BaseUnknown2:: db ; d246
+BasePicSize:: db ; d247
+BasePadding:: ds 4 ; d248
+BaseGrowthRate:: db ; d24c
+BaseEggGroups:: db ; d24d
+BaseTMHM:: flag_array NUM_TM_HM_TUTOR ; d24e
+CurBaseDataEnd::
+
+CurDamage:: dw ; d256
+
+ ds 2
+
+wMornEncounterRate:: db ; d25a
+wDayEncounterRate:: db ; d25b
+wNiteEncounterRate:: db ; d25c
+wWaterEncounterRate:: db ; d25d
wListMoves_MoveIndicesBuffer:: ds NUM_MOVES
-wPutativeTMHMMove:: ds 1
-wInitListType:: ds 1
-wBattleHasJustStarted:: ds 1
-wFoundMatchingIDInParty::
+wPutativeTMHMMove:: db
+wInitListType:: db
+wBattleHasJustStarted:: db
+
wNamedObjectIndexBuffer::
wCurTMHM::
wTypeMatchup::
-wd265:: ds 1
-wFailedToFlee:: ds 1
-wNumFleeAttempts:: ds 1
-wMonTriedToEvolve:: ds 1
+wFoundMatchingIDInParty::
+wd265::
+ db
-TimeOfDay:: ; d269
- ds 1
+wFailedToFlee:: db
+wNumFleeAttempts:: db
+wMonTriedToEvolve:: db
+
+TimeOfDay:: db ; d269
ds 1
+
SECTION "Enemy Party", WRAMX
-UNION
-wPokedexShowPointerAddr::
-wd26b:: ds 1
-wd26c:: ds 1
-wPokedexShowPointerBank::
-wd26d:: ds 1
+
+UNION ; d26b
+wd26b::
+wPokedexShowPointerAddr:: dw
+wPokedexShowPointerBank:: db
ds 3
wd271:: ds 5
-NEXTU
-; SECTION "Enemy Party", WRAMX
+NEXTU ; d26b
+; enemy party
OTPlayerName:: ds NAME_LENGTH ; d26b
-ENDU
+ENDU ; d276
OTPlayerID:: ds 2 ; d276
ds 8
OTPartyCount:: ds 1 ; d280
OTPartySpecies:: ds PARTY_LENGTH ; d281
-OTPartyEnd:: ds 1
-
-UNION
-wDudeBag:: ; d288
-wDudeNumItems:: ds 1
-wDudeItems:: ds 2 * 4
-wDudeItemsEnd:: ds 1
-
-wDudeNumKeyItems:: ds 1 ; d292
-wDudeKeyItems:: ds 18
-wDudeKeyItemsEnd:: ds 1
-
-wDudeNumBalls:: ds 1 ; d2a6
-wDudeBalls:: ds 2 * 4 ; d2a7
-wDudeBallsEnd:: ds 1 ; d2af
-wDudeBagEnd::
+OTPartyEnd:: ds 1 ; legacy scripts don't check PartyCount
-NEXTU
+UNION ; d288
+; ot party mons
OTPartyMons::
OTPartyMon1:: party_struct OTPartyMon1 ; d288
OTPartyMon2:: party_struct OTPartyMon2 ; d2b8
@@ -2287,72 +2157,84 @@ OTPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d3a8
OTPartyMonNicknames:: ds PKMN_NAME_LENGTH * PARTY_LENGTH ; d3ea
OTPartyDataEnd::
ds 4
-ENDU
+
+NEXTU ; d288
+; catch tutorial dude pack
+wDudeBag::
+wDudeNumItems:: db
+wDudeItems:: ds 2 * 4
+wDudeItemsEnd:: db
+
+wDudeNumKeyItems:: db ; d292
+wDudeKeyItems:: ds 18
+wDudeKeyItemsEnd:: db
+
+wDudeNumBalls:: db ; d2a6
+wDudeBalls:: ds 2 * 4 ; d2a7
+wDudeBallsEnd:: db ; d2af
+wDudeBagEnd::
+ENDU ; d430
wd430::
-wBattleAction:: ds 1 ; d430
+wBattleAction:: db ; d430
-wd431:: ds 1
-MapStatus:: ; d432
- ds 1
+wd431:: db
+MapStatus:: db ; d432
MapEventStatus:: ; d433
; 0: do map events
; 1: do background events
- ds 1
+ db
ScriptFlags:: ; d434
; bit 3: priority jump
- ds 1
+ db
ScriptFlags2:: ; d435
- ds 1
+ db
ScriptFlags3:: ; d436
; bit 0: count steps
-; bit 1: xy triggers
+; bit 1: coord events
; bit 2: warps and connections
; bit 4: wild encounters
; bit 5: unknown
- ds 1
+ db
-ScriptMode:: ; d437
- ds 1
-ScriptRunning:: ; d438
- ds 1
-ScriptBank:: ; d439
- ds 1
-ScriptPos:: ; d43a
- ds 2
+ScriptMode:: db ; d437
+ScriptRunning:: db ; d438
+ScriptBank:: db ; d439
+ScriptPos:: dw ; d43a
-wScriptStackSize:: ds 1
+wScriptStackSize:: db
wScriptStack:: ds 3 * 5
ds 1
-ScriptDelay:: ; d44d
- ds 1
+ScriptDelay:: db ; d44d
wPriorityScriptBank::
wScriptTextBank::
- ds 1 ; d44e
+ db ; d44e
wPriorityScriptAddr::
-wScriptTextAddr:: ds 2 ; d44f
+wScriptTextAddr::
+ dw ; d44f
ds 1
-wWildEncounterCooldown:: ds 1 ; d452
-wXYComparePointer:: ds 2 ; d453
+wWildEncounterCooldown:: db ; d452
+wXYComparePointer:: dw ; d453
ds 4
-wBattleScriptFlags:: ds 2 ; d459
-wPlayerSpriteSetupFlags:: ds 1 ; d45b
+wBattleScriptFlags:: dw ; d459
+wPlayerSpriteSetupFlags:: ; d45b
; bit 7: if set, cancel PlayerAction
; bit 5: if set, set facing according to bits 0-1
; bits 0-1: direction facing
-wMapReentryScriptQueueFlag:: ds 1 ; d45c MemScriptFlag
-wMapReentryScriptBank:: ds 1 ; d45d MemScriptBank
-wMapReentryScriptAddress:: ds 2 ; d45e MemScriptAddr
- ds 4 ; ?????????????
-wTimeCyclesSinceLastCall:: ds 1 ; d464
-wReceiveCallDelay_MinsRemaining:: ds 1 ; d465
+ db
+wMapReentryScriptQueueFlag:: db ; d45c MemScriptFlag
+wMapReentryScriptBank:: db ; d45d MemScriptBank
+wMapReentryScriptAddress:: dw ; d45e MemScriptAddr
+ ds 4
+wTimeCyclesSinceLastCall:: db ; d464
+wReceiveCallDelay_MinsRemaining:: db ; d465
wReceiveCallDelay_StartTime:: ds 3 ; d466
ds 3
-wBugContestMinsRemaining:: ds 1 ; d46c
-wBugContestSecsRemaining:: ds 1 ; d46d
+wBugContestMinsRemaining:: db ; d46c
+wBugContestSecsRemaining:: db ; d46d
ds 2
wMapStatusEnd:: ds 2 ; d470
@@ -2361,7 +2243,7 @@ PlayerGender:: ; d472
; bit 0:
; 0 male
; 1 female
- ds 1
+ db
wd473:: ds 1
wd474:: ds 1
wd475:: ds 1
@@ -2375,7 +2257,7 @@ wd479:: ds 2
wGameData::
wPlayerData::
PlayerID:: ; d47b
- ds 2
+ dw
PlayerName:: ds NAME_LENGTH ; d47d
MomsName:: ds NAME_LENGTH ; d488
@@ -2383,45 +2265,34 @@ RivalName:: ds NAME_LENGTH ; d493
RedsName:: ds NAME_LENGTH ; d49e
GreensName:: ds NAME_LENGTH ; d4a9
-wSavedAtLeastOnce:: ds 1
-wSpawnAfterChampion:: ds 1
+wSavedAtLeastOnce:: db
+wSpawnAfterChampion:: db
; init time set at newgame
-StartDay:: ; d4b6
- ds 1
-StartHour:: ; d4b7
- ds 1
-StartMinute:: ; d4b8
- ds 1
-StartSecond:: ; d4b9
- ds 1
+StartDay:: db ; d4b6
+StartHour:: db ; d4b7
+StartMinute:: db ; d4b8
+StartSecond:: db ; d4b9
-wRTC:: ; d4ba
- ds 8
-wDST:: ; d4c2
- ds 1
+wRTC:: ds 8 ; d4ba
+wDST:: db ; d4c2
-GameTimeCap:: ; d4c3
- ds 1
-GameTimeHours:: ; d4c4
- ds 2
-GameTimeMinutes:: ; d4c6
- ds 1
-GameTimeSeconds:: ; d4c7
- ds 1
-GameTimeFrames:: ; d4c8
- ds 1
+GameTimeCap:: db ; d4c3
+GameTimeHours:: dw ; d4c4
+GameTimeMinutes:: db ; d4c6
+GameTimeSeconds:: db ; d4c7
+GameTimeFrames:: db ; d4c8
ds 2
-CurDay:: ; d4cb
- ds 1
+CurDay:: db ; d4cb
ds 1
-wObjectFollow_Leader:: ds 1
-wObjectFollow_Follower:: ds 1
-wCenteredObject:: ds 1
-wFollowerMovementQueueLength:: ds 1
+
+wObjectFollow_Leader:: db
+wObjectFollow_Follower:: db
+wCenteredObject:: db
+wFollowerMovementQueueLength:: db
wFollowMovementQueue:: ds 5
ObjectStructs:: ; d4d6
@@ -2441,7 +2312,8 @@ ObjectStructs:: ; d4d6
ObjectStructsEnd:: ; d6de
wCmdQueue:: ds CMDQUEUE_CAPACITY * CMDQUEUE_ENTRY_SIZE
- ds $28
+
+ ds 40
MapObjects:: ; d71e
map_object Player
@@ -2464,23 +2336,19 @@ MapObjectsEnd::
wObjectMasks:: ds NUM_OBJECTS ; d81e
-VariableSprites:: ; d82e
- ds $10
+VariableSprites:: ds 16; d82e
-wEnteredMapFromContinue:: ds 1 ; d83e
+wEnteredMapFromContinue:: db ; d83e
ds 2
-TimeOfDayPal:: ; d841
- ds 1
+TimeOfDayPal:: db ; d841
ds 4
-; d846
-wTimeOfDayPalFlags:: ds 1
-wTimeOfDayPalset:: ds 1
-CurTimeOfDay:: ; d848
- ds 1
+wTimeOfDayPalFlags:: db ; d846
+wTimeOfDayPalset:: db
+CurTimeOfDay:: db ; d848
ds 1
-wSecretID:: ds 2
+wSecretID:: dw
StatusFlags:: ; d84c
; 0 - pokedex
; 1 - unown dex
@@ -2490,7 +2358,7 @@ StatusFlags:: ; d84c
; 5 - wild encounters on/off
; 6 - hall of fame
; 7 - bug contest on
- ds 1
+ db
StatusFlags2:: ; d84d
; 0 - rockets
@@ -2501,356 +2369,320 @@ StatusFlags2:: ; d84d
; 5 - pokerus
; 6 - berry juice?
; 7 - rockets in mahogany
- ds 1
+ db
-Money:: ; d84e
- ds 3
+Money:: ds 3 ; d84e
+wMomsMoney:: ds 3 ; d851
+wMomSavingMoney:: db ; d854
-wMomsMoney:: ; d851
- ds 3
-wMomSavingMoney:: ; d854
- ds 1
-
-Coins:: ; d855
- ds 2
+Coins:: dw ; d855
Badges::
-JohtoBadges:: ; d857
- flag_array 8
-KantoBadges:: ; d858
- flag_array 8
+JohtoBadges:: flag_array NUM_JOHTO_BADGES ; d857
+KantoBadges:: flag_array NUM_KANTO_BADGES ; d858
-TMsHMs:: ; d859
- ds NUM_TMS + NUM_HMS
+TMsHMs:: ds NUM_TMS + NUM_HMS ; d859
TMsHMsEnd::
-NumItems:: ; d892
- ds 1
-Items:: ; d893
- ds MAX_ITEMS * 2 + 1
+NumItems:: db ; d892
+Items:: ds MAX_ITEMS * 2 + 1 ; d893
ItemsEnd::
-NumKeyItems:: ; d8bc
- ds 1
-KeyItems:: ; d8bd
- ds MAX_KEY_ITEMS + 1
+NumKeyItems:: db ; d8bc
+KeyItems:: ds MAX_KEY_ITEMS + 1 ; d8bd
KeyItemsEnd::
-NumBalls:: ; d8d7
- ds 1
-Balls:: ; d8d8
- ds MAX_BALLS * 2 + 1
+NumBalls:: db ; d8d7
+Balls:: ds MAX_BALLS * 2 + 1 ; d8d8
BallsEnd::
-PCItems:: ; d8f1
- ds MAX_PC_ITEMS * 2 + 1
+PCItems:: ds MAX_PC_ITEMS * 2 + 1 ; d8f1
PCItemsEnd::
ds 1
-wPokegearFlags:: ds 1
+wPokegearFlags::
; bit 0: map
; bit 1: radio
; bit 2: phone
; bit 3: expn
; bit 7: on/off
-wRadioTuningKnob:: ds 1
-wLastDexMode:: ds 2
-WhichRegisteredItem:: ; d95b
- ds 1
-RegisteredItem:: ; d95c
+ db
+wRadioTuningKnob:: db
+wLastDexMode:: db
ds 1
+WhichRegisteredItem:: db ; d95b
+RegisteredItem:: db ; d95c
-PlayerState:: ; d95d
- ds 1
+PlayerState:: db ; d95d
-wHallOfFameCount:: ds 2
+wHallOfFameCount:: dw
wTradeFlags:: flag_array 6 ; d960
ds 1
-MooMooBerries:: ; d962
- ds 1 ; how many berries fed to MooMoo
-UndergroundSwitchPositions:: ; d963
- ds 1 ; which positions the switches are in
-FarfetchdPosition:: ; d964
- ds 1 ; which position the ilex farfetch'd is in
+MooMooBerries:: db ; d962
+UndergroundSwitchPositions:: db ; d963
+FarfetchdPosition:: db ; d964
ds 13
-
-;SECTION "Map Triggers", WRAMX
-
-wPokecenter2FTrigger:: ds 1 ; d972
-wTradeCenterTrigger:: ds 1 ; d973
-wColosseumTrigger:: ds 1 ; d974
-wTimeCapsuleTrigger:: ds 1 ; d975
-wPowerPlantTrigger:: ds 1 ; d976
-wCeruleanGymTrigger:: ds 1 ; d977
-wRoute25Trigger:: ds 1 ; d978
-wTrainerHouseB1FTrigger:: ds 1 ; d979
-wVictoryRoadGateTrigger:: ds 1 ; d97a
-wSaffronTrainStationTrigger:: ds 1 ; d97b
-wRoute16GateTrigger:: ds 1 ; d97c
-wRoute1718GateTrigger:: ds 1 ; d97d
-wIndigoPlateauPokecenter1FTrigger:: ds 1 ; d97e
-wWillsRoomTrigger:: ds 1 ; d97f
-wKogasRoomTrigger:: ds 1 ; d980
-wBrunosRoomTrigger:: ds 1 ; d981
-wKarensRoomTrigger:: ds 1 ; d982
-wLancesRoomTrigger:: ds 1 ; d983
-wHallOfFameTrigger:: ds 1 ; d984
-wRoute27Trigger:: ds 1 ; d985
-wNewBarkTownTrigger:: ds 1 ; d986
-wElmsLabTrigger:: ds 1 ; d987
-wKrissHouse1FTrigger:: ds 1 ; d988
-wRoute29Trigger:: ds 1 ; d989
-wCherrygroveCityTrigger:: ds 1 ; d98a
-wMrPokemonsHouseTrigger:: ds 1 ; d98b
-wRoute32Trigger:: ds 1 ; d98c
-wRoute35NationalParkGateTrigger:: ds 1 ; d98d
-wRoute36Trigger:: ds 1 ; d98e
-wRoute36NationalParkGateTrigger:: ds 1 ; d98f
-wAzaleaTownTrigger:: ds 1 ; d990
-wGoldenrodGymTrigger:: ds 1 ; d991
-wGoldenrodMagnetTrainStationTrigger:: ds 1 ; d992
-wGoldenrodPokecenter1FTrigger:: ds 1 ; d993
-wOlivineCityTrigger:: ds 1 ; d994
-wRoute34Trigger:: ds 1 ; d995
-wRoute34IlexForestGateTrigger:: ds 1 ; d996
-wEcruteakHouseTrigger:: ds 1 ; d997
-wWiseTriosRoomTrigger:: ds 1 ; d998
-wEcruteakPokecenter1FTrigger:: ds 1 ; d999
-wEcruteakGymTrigger:: ds 1 ; d99a
-wMahoganyTownTrigger:: ds 1 ; d99b
-wRoute42Trigger:: ds 1 ; d99c
-wCianwoodCityTrigger:: ds 1 ; d99d
-wBattleTower1FTrigger:: ds 1 ; d99e
-wBattleTowerBattleRoomTrigger:: ds 1 ; d99f
-wBattleTowerElevatorTrigger:: ds 1 ; d9a0
-wBattleTowerHallwayTrigger:: ds 1 ; d9a1
-wBattleTowerOutsideTrigger:: ds 1 ; d9a2
-wRoute43GateTrigger:: ds 1 ; d9a3
-wMountMoonTrigger:: ds 1 ; d9a4
-wSproutTower3FTrigger:: ds 1 ; d9a5
-wTinTower1FTrigger:: ds 1 ; d9a6
-wBurnedTower1FTrigger:: ds 1 ; d9a7
-wBurnedTowerB1FTrigger:: ds 1 ; d9a8
-wRadioTower5FTrigger:: ds 1 ; d9a9
-wRuinsOfAlphOutsideTrigger:: ds 1 ; d9aa
-wRuinsOfAlphResearchCenterTrigger:: ds 1 ; d9ab
-wRuinsOfAlphHoOhChamberTrigger:: ds 1 ; d9ac
-wRuinsOfAlphKabutoChamberTrigger:: ds 1 ; d9ad
-wRuinsOfAlphOmanyteChamberTrigger:: ds 1 ; d9ae
-wRuinsOfAlphAerodactylChamberTrigger:: ds 1 ; d9af
-wRuinsOfAlphInnerChamberTrigger:: ds 1 ; d9b0
-wMahoganyMart1FTrigger:: ds 1 ; d9b1
-wTeamRocketBaseB1FTrigger:: ds 1 ; d9b2
-wTeamRocketBaseB2FTrigger:: ds 1 ; d9b3
-wTeamRocketBaseB3FTrigger:: ds 1 ; d9b4
-wUndergroundPathSwitchRoomEntrancesTrigger:: ds 1 ; d9b5
-wSilverCaveRoom3Trigger:: ds 1 ; d9b6
-wVictoryRoadTrigger:: ds 1 ; d9b7
-wDragonsDenB1FTrigger:: ds 1 ; d9b8
-wDragonShrineTrigger:: ds 1 ; d9b9
-wOlivinePortTrigger:: ds 1 ; d9ba
-wVermilionPortTrigger:: ds 1 ; d9bb
-wFastShip1FTrigger:: ds 1 ; d9bc
-wFastShipB1FTrigger:: ds 1 ; d9bd
-wMountMoonSquareTrigger:: ds 1 ; d9be
-wMobileTradeRoomMobileTrigger:: ds 1 ; d9bf
-wMobileBattleRoomTrigger:: ds 1 ; d9c0
+; map scene ids
+wPokecenter2FSceneID:: db ; d972
+wTradeCenterSceneID:: db ; d973
+wColosseumSceneID:: db ; d974
+wTimeCapsuleSceneID:: db ; d975
+wPowerPlantSceneID:: db ; d976
+wCeruleanGymSceneID:: db ; d977
+wRoute25SceneID:: db ; d978
+wTrainerHouseB1FSceneID:: db ; d979
+wVictoryRoadGateSceneID:: db ; d97a
+wSaffronTrainStationSceneID:: db ; d97b
+wRoute16GateSceneID:: db ; d97c
+wRoute1718GateSceneID:: db ; d97d
+wIndigoPlateauPokecenter1FSceneID:: db ; d97e
+wWillsRoomSceneID:: db ; d97f
+wKogasRoomSceneID:: db ; d980
+wBrunosRoomSceneID:: db ; d981
+wKarensRoomSceneID:: db ; d982
+wLancesRoomSceneID:: db ; d983
+wHallOfFameSceneID:: db ; d984
+wRoute27SceneID:: db ; d985
+wNewBarkTownSceneID:: db ; d986
+wElmsLabSceneID:: db ; d987
+wKrissHouse1FSceneID:: db ; d988
+wRoute29SceneID:: db ; d989
+wCherrygroveCitySceneID:: db ; d98a
+wMrPokemonsHouseSceneID:: db ; d98b
+wRoute32SceneID:: db ; d98c
+wRoute35NationalParkGateSceneID:: db ; d98d
+wRoute36SceneID:: db ; d98e
+wRoute36NationalParkGateSceneID:: db ; d98f
+wAzaleaTownSceneID:: db ; d990
+wGoldenrodGymSceneID:: db ; d991
+wGoldenrodMagnetTrainStationSceneID:: db ; d992
+wGoldenrodPokecenter1FSceneID:: db ; d993
+wOlivineCitySceneID:: db ; d994
+wRoute34SceneID:: db ; d995
+wRoute34IlexForestGateSceneID:: db ; d996
+wEcruteakHouseSceneID:: db ; d997
+wWiseTriosRoomSceneID:: db ; d998
+wEcruteakPokecenter1FSceneID:: db ; d999
+wEcruteakGymSceneID:: db ; d99a
+wMahoganyTownSceneID:: db ; d99b
+wRoute42SceneID:: db ; d99c
+wCianwoodCitySceneID:: db ; d99d
+wBattleTower1FSceneID:: db ; d99e
+wBattleTowerBattleRoomSceneID:: db ; d99f
+wBattleTowerElevatorSceneID:: db ; d9a0
+wBattleTowerHallwaySceneID:: db ; d9a1
+wBattleTowerOutsideSceneID:: db ; d9a2
+wRoute43GateSceneID:: db ; d9a3
+wMountMoonSceneID:: db ; d9a4
+wSproutTower3FSceneID:: db ; d9a5
+wTinTower1FSceneID:: db ; d9a6
+wBurnedTower1FSceneID:: db ; d9a7
+wBurnedTowerB1FSceneID:: db ; d9a8
+wRadioTower5FSceneID:: db ; d9a9
+wRuinsOfAlphOutsideSceneID:: db ; d9aa
+wRuinsOfAlphResearchCenterSceneID:: db ; d9ab
+wRuinsOfAlphHoOhChamberSceneID:: db ; d9ac
+wRuinsOfAlphKabutoChamberSceneID:: db ; d9ad
+wRuinsOfAlphOmanyteChamberSceneID:: db ; d9ae
+wRuinsOfAlphAerodactylChamberSceneID:: db ; d9af
+wRuinsOfAlphInnerChamberSceneID:: db ; d9b0
+wMahoganyMart1FSceneID:: db ; d9b1
+wTeamRocketBaseB1FSceneID:: db ; d9b2
+wTeamRocketBaseB2FSceneID:: db ; d9b3
+wTeamRocketBaseB3FSceneID:: db ; d9b4
+wGoldenrodUndergroundSwitchRoomEntrancesSceneID:: db ; d9b5
+wSilverCaveRoom3SceneID:: db ; d9b6
+wVictoryRoadSceneID:: db ; d9b7
+wDragonsDenB1FSceneID:: db ; d9b8
+wDragonShrineSceneID:: db ; d9b9
+wOlivinePortSceneID:: db ; d9ba
+wVermilionPortSceneID:: db ; d9bb
+wFastShip1FSceneID:: db ; d9bc
+wFastShipB1FSceneID:: db ; d9bd
+wMountMoonSquareSceneID:: db ; d9be
+wMobileTradeRoomMobileSceneID:: db ; d9bf
+wMobileBattleRoomSceneID:: db ; d9c0
ds 49
-
-;SECTION "Events", WRAMX
-
-wJackFightCount:: ds 1 ; d9f2
-wBeverlyFightCount:: ds 1 ; unused
-wHueyFightCount:: ds 1
-wGavenFightCount:: ds 1
-wBethFightCount:: ds 1
-wJoseFightCount:: ds 1
-wReenaFightCount:: ds 1
-wJoeyFightCount:: ds 1
-wWadeFightCount:: ds 1
-wRalphFightCount:: ds 1
-wLizFightCount:: ds 1
-wAnthonyFightCount:: ds 1
-wToddFightCount:: ds 1
-wGinaFightCount:: ds 1
-wIrwinFightCount:: ds 1 ; unused
-wArnieFightCount:: ds 1
-wAlanFightCount:: ds 1
-wDanaFightCount:: ds 1
-wChadFightCount:: ds 1
-wDerekFightCount:: ds 1 ; unused
-wTullyFightCount:: ds 1
-wBrentFightCount:: ds 1
-wTiffanyFightCount:: ds 1
-wVanceFightCount:: ds 1
-wWiltonFightCount:: ds 1
-wKenjiFightCount:: ds 1 ; unused
-wParryFightCount:: ds 1
-wErinFightCount:: ds 1
+; fight counts
+wJackFightCount:: db ; d9f2
+wBeverlyFightCount:: db ; unused
+wHueyFightCount:: db
+wGavenFightCount:: db
+wBethFightCount:: db
+wJoseFightCount:: db
+wReenaFightCount:: db
+wJoeyFightCount:: db
+wWadeFightCount:: db
+wRalphFightCount:: db
+wLizFightCount:: db
+wAnthonyFightCount:: db
+wToddFightCount:: db
+wGinaFightCount:: db
+wIrwinFightCount:: db ; unused
+wArnieFightCount:: db
+wAlanFightCount:: db
+wDanaFightCount:: db
+wChadFightCount:: db
+wDerekFightCount:: db ; unused
+wTullyFightCount:: db
+wBrentFightCount:: db
+wTiffanyFightCount:: db
+wVanceFightCount:: db
+wWiltonFightCount:: db
+wKenjiFightCount:: db ; unused
+wParryFightCount:: db
+wErinFightCount:: db
; da0e
+
ds 100
-EventFlags:: ; da72
- flag_array NUM_EVENTS
+EventFlags:: flag_array NUM_EVENTS ; da72
; db6c
ds 6
-wCurBox:: ; db72
- ds 1
+wCurBox:: db ; db72
ds 2
; 8 chars + $50
wBoxNames:: ds BOX_NAME_LENGTH * NUM_BOXES ; db75
-wCelebiEvent:: ds 1
+wCelebiEvent:: db
+
ds 1
BikeFlags:: ; dbf5
; bit 0: using strength
; bit 1: always on bike
; bit 2: downhill
- ds 1
+ db
ds 1
-wCurrentMapTriggerPointer:: ds 2 ; dbf7
-
-wCurrentCaller:: ds 2 ; dbf9
-wCurrMapWarpCount:: ds 1 ; dbfb
-wCurrMapWarpHeaderPointer:: ds 2 ; dbfc
-wCurrentMapXYTriggerCount:: ds 1 ; dbfe
-wCurrentMapXYTriggerHeaderPointer:: ds 2 ; dbff
-wCurrentMapSignpostCount:: ds 1 ; dc01
-wCurrentMapSignpostHeaderPointer:: ds 2 ; dc02
-wCurrentMapPersonEventCount:: ds 1 ; dc04
-wCurrentMapPersonEventHeaderPointer:: ds 2 ; dc05
-wCurrMapTriggerCount:: ds 1 ; dc07
-wCurrMapTriggerHeaderPointer:: ds 2 ; dc08
-wCurrMapCallbackCount:: ds 1 ; dc0a
-wCurrMapCallbackHeaderPointer:: ds 2 ; dc0b
+
+wCurrMapSceneScriptPointer:: dw ; dbf7
+
+wCurrentCaller:: dw ; dbf9
+wCurrMapWarpCount:: db ; dbfb
+wCurrMapWarpHeaderPointer:: dw ; dbfc
+wCurrMapCoordEventCount:: db ; dbfe
+wCurrMapCoordEventHeaderPointer:: dw ; dbff
+wCurrMapBGEventCount:: db ; dc01
+wCurrMapBGEventHeaderPointer:: dw ; dc02
+wCurrMapObjectEventCount:: db ; dc04
+wCurrMapObjectEventHeaderPointer:: dw ; dc05
+wCurrMapSceneScriptCount:: db ; dc07
+wCurrMapSceneScriptHeaderPointer:: dw ; dc08
+wCurrMapCallbackCount:: db ; dc0a
+wCurrMapCallbackHeaderPointer:: dw ; dc0b
+
ds 2
; Sprite id of each decoration
-Bed:: ; dc0f
- ds 1
-Carpet:: ; dc10
- ds 1
-Plant:: ; dc11
- ds 1
-Poster:: ; dc12
- ds 1
-Console:: ; dc13
- ds 1
-LeftOrnament:: ; dc14
- ds 1
-RightOrnament:: ; dc15
- ds 1
-BigDoll:: ; dc16
- ds 1
+Bed:: db ; dc0f
+Carpet:: db ; dc10
+Plant:: db ; dc11
+Poster:: db ; dc12
+Console:: db ; dc13
+LeftOrnament:: db ; dc14
+RightOrnament:: db ; dc15
+BigDoll:: db ; dc16
; Items bought from Mom
-wWhichMomItem:: ds 1 ; dc17
-wWhichMomItemSet:: ds 1 ; dc18
+wWhichMomItem:: db ; dc17
+wWhichMomItemSet:: db ; dc18
MomItemTriggerBalance:: ds 3 ; dc19
-wDailyResetTimer:: ds 2 ; dc1c
-DailyFlags:: ds 1
-WeeklyFlags:: ds 1
-SwarmFlags:: ds 1
+wDailyResetTimer:: dw ; dc1c
+DailyFlags:: db
+WeeklyFlags:: db
+SwarmFlags:: db
ds 2
-wStartDay:: ds 1
+wStartDay:: db
ds 3
FruitTreeFlags:: flag_array NUM_FRUIT_TREES ; dc27
ds 2
-wLuckyNumberDayBuffer:: ds 2 ; dc2d
+wLuckyNumberDayBuffer:: dw ; dc2d
ds 2
-wSpecialPhoneCallID:: ds 1 ; dc31
+wSpecialPhoneCallID:: db ; dc31
ds 3
wBugContestStartTime:: ds 4 ; day, hour, min, sec ; dc35
-wUnusedTwoDayTimerOn:: ds 1 ; dc39
-wUnusedTwoDayTimer:: ds 1
-wUnusedTwoDayTimerStartDate:: ds 1
+wUnusedTwoDayTimerOn:: db ; dc39
+wUnusedTwoDayTimer:: db
+wUnusedTwoDayTimerStartDate:: db
ds 4
-wMobileOrCable_LastSelection:: ds 1
+wMobileOrCable_LastSelection:: db
wdc41:: ds 1
wdc42:: ds 8
-wBuenasPassword:: ds 1
-wBlueCardBalance:: ds 1
+wBuenasPassword:: db
+wBlueCardBalance:: db
wDailyRematchFlags:: ds 4
wDailyPhoneItemFlags:: ds 4
wDailyPhoneTimeOfDayFlags:: ds 4
wKenjiBreakTimer:: ds 2 ; Kenji
-wYanmaMapGroup:: ds 1 ; dc5a
-wYanmaMapNumber:: ds 1
+wYanmaMapGroup:: db ; dc5a
+wYanmaMapNumber:: db
wPlayerMonSelection:: ds 3
wdc5f:: ds 1
wdc60:: ds 19
-StepCount:: ; dc73
- ds 1
-PoisonStepCount:: ; dc74
- ds 1
-
+StepCount:: db ; dc73
+PoisonStepCount:: db ; dc74
ds 2
-wHappinessStepCount:: ds 1
+wHappinessStepCount:: db
ds 1
+
wParkBallsRemaining::
-wSafariBallsRemaining:: ds 1 ; dc79
-wSafariTimeRemaining:: ds 2 ; dc7a
+wSafariBallsRemaining:: db ; dc79
+wSafariTimeRemaining:: dw ; dc7a
+
wPhoneList:: ds CONTACT_LIST_SIZE ; dc7c
; dc86
ds 23
-wLuckyNumberShowFlag:: ds 2 ; dc9d
-wLuckyIDNumber:: ds 2 ; dc9f
-wRepelEffect:: ds 1 ; If a Repel is in use, it contains the nr of steps it's still active
-wBikeStep:: ds 2
-wKurtApricornQuantity:: ds 1
+
+wLuckyNumberShowFlag:: dw ; dc9d
+wLuckyIDNumber:: dw ; dc9f
+
+wRepelEffect:: db ; If a Repel is in use, it contains the nr of steps it's still active
+wBikeStep:: dw
+wKurtApricornQuantity:: db
wPlayerDataEnd::
wMapData::
-VisitedSpawns:: ; dca5
- flag_array NUM_SPAWNS
+VisitedSpawns:: flag_array NUM_SPAWNS ; dca5
+
+wDigWarpNumber:: db ; dcaa
+wDigMapGroup:: db ; dcab
+wDigMapNumber:: db ; dcac
-wDigWarp:: ds 1 ; dcaa
-wDigMapGroup:: ds 1 ; dcab
-wDigMapNumber:: ds 1 ; dcac
; used on maps like second floor pokécenter, which are reused, so we know which
; map to return to
-BackupWarpNumber:: ; dcad
- ds 1
-BackupMapGroup:: ; dcae
- ds 1
-BackupMapNumber:: ; dcaf
- ds 1
+BackupWarpNumber:: db ; dcad
+BackupMapGroup:: db ; dcae
+BackupMapNumber:: db ; dcaf
ds 3
-wLastSpawnMapGroup:: ds 1
-wLastSpawnMapNumber:: ds 1
+wLastSpawnMapGroup:: db
+wLastSpawnMapNumber:: db
-WarpNumber:: ; dcb4
- ds 1
-MapGroup:: ; dcb5
- ds 1 ; map group of current map
-MapNumber:: ; dcb6
- ds 1 ; map number of current map
-YCoord:: ; dcb7
- ds 1 ; current y coordinate relative to top-left corner of current map
-XCoord:: ; dcb8
- ds 1 ; current x coordinate relative to top-left corner of current map
+WarpNumber:: db ; dcb4
+MapGroup:: db ; dcb5 ; map group of current map
+MapNumber:: db ; dcb6 ; map number of current map
+YCoord:: db ; dcb7 ; current y coordinate relative to top-left corner of current map
+XCoord:: db ; dcb8 ; current x coordinate relative to top-left corner of current map
wScreenSave:: ds 6 * 5
wMapDataEnd::
@@ -2860,12 +2692,9 @@ SECTION "Party", WRAMX
wPokemonData::
-PartyCount:: ; dcd7
- ds 1 ; number of Pokémon in party
-PartySpecies:: ; dcd8
- ds PARTY_LENGTH ; species of each Pokémon in party
-PartyEnd:: ; dcde
- ds 1 ; legacy scripts don't check PartyCount
+PartyCount:: db ; dcd7 ; number of Pokémon in party
+PartySpecies:: ds PARTY_LENGTH ; dcd8 ; species of each Pokémon in party
+PartyEnd:: db ; dcde ; legacy scripts don't check PartyCount
PartyMons::
PartyMon1:: party_struct PartyMon1 ; dcdf
@@ -2880,49 +2709,41 @@ PartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; ddff
PartyMonNicknames:: ds PKMN_NAME_LENGTH * PARTY_LENGTH ; de41
PartyMonNicknamesEnd::
-
ds 22
-
-PokedexCaught:: ; de99
- flag_array NUM_POKEMON
+PokedexCaught:: flag_array NUM_POKEMON ; de99
EndPokedexCaught::
-PokedexSeen:: ; deb9
- flag_array NUM_POKEMON
+PokedexSeen:: flag_array NUM_POKEMON ; deb9
EndPokedexSeen::
-UnownDex:: ; ded9
- ds 26
-UnlockedUnowns:: ; def3
- ds 1
+UnownDex:: ds NUM_UNOWN ; ded9
+UnlockedUnowns:: db ; def3
+wFirstUnownSeen:: db
-wFirstUnownSeen:: ds 1
-
-
-wDaycareMan:: ; def5
+wDayCareMan:: ; def5
; bit 7: active
; bit 6: monsters are compatible
; bit 5: egg ready
-; bit 0: monster 1 in daycare
- ds 1
+; bit 0: monster 1 in day-care
+ db
wBreedMon1::
wBreedMon1Nick:: ds PKMN_NAME_LENGTH ; def6
wBreedMon1OT:: ds NAME_LENGTH ; df01
wBreedMon1Stats:: box_struct wBreedMon1 ; df0c
-wDaycareLady:: ; df2c
+wDayCareLady:: ; df2c
; bit 7: active
-; bit 0: monster 2 in daycare
- ds 1
+; bit 0: monster 2 in day-care
+ db
wStepsToEgg:: ; df2d
- ds 1
+ db
wBreedMotherOrNonDitto:: ; df2e
; z: yes
; nz: no
- ds 1
+ db
wBreedMon2::
wBreedMon2Nick:: ds PKMN_NAME_LENGTH ; df2f
@@ -2933,62 +2754,66 @@ wEggNick:: ds PKMN_NAME_LENGTH ; df65
wEggOT:: ds NAME_LENGTH ; df70
wEggMon:: box_struct wEggMon ; df7b
-wBugContestSecondPartySpecies:: ds 1
+wBugContestSecondPartySpecies:: db
wContestMon:: party_struct wContestMon ; df9c
-wDunsparceMapGroup:: ds 1
-wDunsparceMapNumber:: ds 1
-wFishingSwarmFlag:: ds 1
+wDunsparceMapGroup:: db
+wDunsparceMapNumber:: db
+wFishingSwarmFlag:: db
wRoamMon1:: roam_struct wRoamMon1 ; dfcf
wRoamMon2:: roam_struct wRoamMon2 ; dfd6
wRoamMon3:: roam_struct wRoamMon3 ; dfdd
-wRoamMons_CurrentMapNumber:: ds 1
-wRoamMons_CurrentMapGroup:: ds 1
-wRoamMons_LastMapNumber:: ds 1
-wRoamMons_LastMapGroup:: ds 1
-wBestMagikarpLengthFeet:: ds 1
-wBestMagikarpLengthInches:: ds 1
+wRoamMons_CurrentMapNumber:: db
+wRoamMons_CurrentMapGroup:: db
+wRoamMons_LastMapNumber:: db
+wRoamMons_LastMapGroup:: db
+
+wBestMagikarpLengthFeet:: db
+wBestMagikarpLengthInches:: db
wMagikarpRecordHoldersName:: ds NAME_LENGTH
-; dff5
+
wPokemonDataEnd::
wGameDataEnd::
+; dff5
+
SECTION "Pic Animations", WRAMX
TempTileMap::
; 20x18 grid of 8x8 tiles
ds SCREEN_WIDTH * SCREEN_HEIGHT ; $168 = 360
+
; PokeAnim Header
-wPokeAnimSceneIndex:: ds 1
-wPokeAnimPointer:: ds 2
-wPokeAnimSpecies:: ds 1
-wPokeAnimUnownLetter:: ds 1
-wPokeAnimSpeciesOrUnown:: ds 1
-wPokeAnimGraphicStartTile:: ds 1
-wPokeAnimCoord:: ds 2
-wPokeAnimFrontpicHeight:: ds 1
+wPokeAnimSceneIndex:: db
+wPokeAnimPointer:: dw
+wPokeAnimSpecies:: db
+wPokeAnimUnownLetter:: db
+wPokeAnimSpeciesOrUnown:: db
+wPokeAnimGraphicStartTile:: db
+wPokeAnimCoord:: dw
+wPokeAnimFrontpicHeight:: db
; PokeAnim Data
-wPokeAnimExtraFlag:: ds 1
-wPokeAnimSpeed:: ds 1
-wPokeAnimPointerBank:: ds 1
-wPokeAnimPointerAddr:: ds 2
-wPokeAnimFramesBank:: ds 1
-wPokeAnimFramesAddr:: ds 2
-wPokeAnimBitmaskBank:: ds 1
-wPokeAnimBitmaskAddr:: ds 2
-wPokeAnimFrame:: ds 1
-wPokeAnimJumptableIndex:: ds 1
-wPokeAnimRepeatTimer:: ds 1
-wPokeAnimCurBitmask:: ds 1
-wPokeAnimWaitCounter:: ds 1
-wPokeAnimCommand:: ds 1
-wPokeAnimParameter:: ds 1
- ds 1
-wPokeAnimBitmaskCurCol:: ds 1
-wPokeAnimBitmaskCurRow:: ds 1
-wPokeAnimBitmaskCurBit:: ds 1
+wPokeAnimExtraFlag:: db
+wPokeAnimSpeed:: db
+wPokeAnimPointerBank:: db
+wPokeAnimPointerAddr:: dw
+wPokeAnimFramesBank:: db
+wPokeAnimFramesAddr:: dw
+wPokeAnimBitmaskBank:: db
+wPokeAnimBitmaskAddr:: dw
+wPokeAnimFrame:: db
+wPokeAnimJumptableIndex:: db
+wPokeAnimRepeatTimer:: db
+wPokeAnimCurBitmask:: db
+wPokeAnimWaitCounter:: db
+wPokeAnimCommand:: db
+wPokeAnimParameter:: db
+ ds 1
+wPokeAnimBitmaskCurCol:: db
+wPokeAnimBitmaskCurRow:: db
+wPokeAnimBitmaskCurBit:: db
wPokeAnimBitmaskBuffer:: ds 7
ds 2
wPokeAnimStructEnd::
@@ -2998,41 +2823,37 @@ SECTION "Battle Tower", WRAMX
w3_d000:: ds 1 ; d000
w3_d001:: ds 1
-w3_d002::
- ds $7e
-w3_d080::
- ds $10
-w3_d090::
- ds $70
-
-w3_d100:: ; BattleTower OpponentTrainer-Data (length = 0xe0 = $a + $1 + 3*$3b + $24)
+w3_d002:: ds $7e
+w3_d080:: ds $10
+w3_d090:: ds $70
+
+w3_d100::
BT_OTTrainer:: battle_tower_struct BT_OT
-; d1e0
ds $20
-; d200
-BT_TrainerTextIndex:: ds 2
+BT_TrainerTextIndex:: db ; d200
+ ds 1
w3_d202:: battle_tower_struct w3_d202
w3_d2e2:: battle_tower_struct w3_d2e2
w3_d3c2:: battle_tower_struct w3_d3c2
w3_d4a2:: battle_tower_struct w3_d4a2
w3_d582:: battle_tower_struct w3_d582
w3_d662:: battle_tower_struct w3_d662
-UNION
+
+UNION ; d742
w3_d742:: battle_tower_struct w3_d742
; d822
-NEXTU
+NEXTU ; d742
ds $be
+w3_d800:: ds BG_MAP_WIDTH * SCREEN_HEIGHT
-wBTChoiceOfLvlGroup::
-w3_d800:: ; ds BG_MAP_WIDTH * SCREEN_HEIGHT ($240)
- ds $69
-ENDU
+NEXTU ; d742
+ ds $be
+wBTChoiceOfLvlGroup:: db
+ ds $68
w3_d869:: ds $17
w3_d880:: ds 1
-w3_d881:: ds 1
-w3_d882:: ds 1
-w3_d883:: ds 7
+w3_d881:: ds 9
w3_d88a:: ds 5
w3_d88f:: ds 5
w3_d894:: ds 1
@@ -3040,37 +2861,42 @@ w3_d895:: ds 11
w3_d8a0:: ds 1
w3_d8a1:: ds 1
w3_d8a2:: ds 1
-w3_d8a3:: ds $19d
-w3_da40:: ds $1c0
+w3_d8a3:: ds 1
+ENDU ; d8a4
+
+ ds $1c0
w3_dc00:: ds SCREEN_WIDTH * SCREEN_HEIGHT
w3_dd68:: ds SCREEN_WIDTH * SCREEN_HEIGHT
+
ds $11c
+
w3_dfec:: ds $10
w3_dffc:: ds 4
+
SECTION "GBC Video", WRAMX
-; 8 4-color palettes
+; eight 4-color palettes each
UnknBGPals:: ds 8 palettes ; d000
UnknOBPals:: ds 8 palettes ; d040
BGPals:: ds 8 palettes ; d080
OBPals:: ds 8 palettes ; d0c0
-LYOverrides:: ; d100
- ds SCREEN_HEIGHT_PX
+LYOverrides:: ds SCREEN_HEIGHT_PX ; d100
LYOverridesEnd:: ; d190
ds 1
-wMagnetTrainDirection:: ds 1
-wMagnetTrainInitPosition:: ds 1
-wMagnetTrainHoldPosition:: ds 1
-wMagnetTrainFinalPosition:: ds 1
-wMagnetTrainPlayerSpriteInitX:: ds 1
+
+wMagnetTrainDirection:: db
+wMagnetTrainInitPosition:: db
+wMagnetTrainHoldPosition:: db
+wMagnetTrainFinalPosition:: db
+wMagnetTrainPlayerSpriteInitX:: db
+
ds 106
-LYOverridesBackup:: ; d200
- ds SCREEN_HEIGHT_PX
+LYOverridesBackup:: ds SCREEN_HEIGHT_PX ; d200
LYOverridesBackupEnd::
@@ -3099,51 +2925,53 @@ BGEffect4:: battle_bg_effect BGEffect4
BGEffect5:: battle_bg_effect BGEffect5
ActiveBGEffectsEnd::
-wNumActiveBattleAnims:: ds 1 ; d40e
-
-BattleAnimFlags:: ; d40f
- ds 1
-BattleAnimAddress:: ; d410
- ds 2
-BattleAnimDuration:: ; d412
- ds 1
-BattleAnimParent:: ; d413
- ds 2
-BattleAnimLoops:: ; d415
- ds 1
-BattleAnimVar:: ; d416
- ds 1
-BattleAnimByte:: ; d417
- ds 1
-wBattleAnimOAMPointerLo:: ds 1 ; d418
-BattleAnimTemps:: ; d419
-wBattleAnimTempOAMFlags::
-wBattleAnimTemp0:: ds 1
-wBattleAnimTemp1:: ds 1
-wBattleAnimTempTileID::
-wBattleAnimTemp2:: ds 1
-wBattleAnimTempXCoord::
-wBattleAnimTemp3:: ds 1
-wBattleAnimTempYCoord::
-wBattleAnimTemp4:: ds 1
-wBattleAnimTempXOffset::
-wBattleAnimTemp5:: ds 1
-wBattleAnimTempYOffset::
-wBattleAnimTemp6:: ds 1
-wBattleAnimTemp7:: ds 1
-wBattleAnimTempPalette::
-wBattleAnimTemp8:: ds 1
+wNumActiveBattleAnims:: db ; d40e
+
+BattleAnimFlags:: db ; d40f
+BattleAnimAddress:: dw ; d410
+BattleAnimDuration:: db ; d412
+BattleAnimParent:: dw ; d413
+BattleAnimLoops:: db ; d415
+BattleAnimVar:: db ; d416
+BattleAnimByte:: db ; d417
+wBattleAnimOAMPointerLo:: db ; d418
+
+UNION ; d419
+; unidentified
+wBattleAnimTemp0:: db
+wBattleAnimTemp1:: db
+wBattleAnimTemp2:: db
+wBattleAnimTemp3:: db
+wBattleAnimTemp4:: db
+wBattleAnimTemp5:: db
+wBattleAnimTemp6:: db
+wBattleAnimTemp7:: db
+wBattleAnimTemp8:: db
+
+NEXTU ; d419
+wBattleAnimTempOAMFlags:: db
+ ds 1
+wBattleAnimTempTileID:: db
+wBattleAnimTempXCoord:: db
+wBattleAnimTempYCoord:: db
+wBattleAnimTempXOffset:: db
+wBattleAnimTempYOffset:: db
+ ds 1
+wBattleAnimTempPalette:: db
+ENDU ; d422
+
+UNION ; d422
+ ds $32
+wBattleAnimEnd::
-UNION
+NEXTU ; d422
wSurfWaveBGEffect:: ds $40
wSurfWaveBGEffectEnd::
+ENDU ; d462
-NEXTU
- ds $32
-wBattleAnimEnd::
-ENDU
-SECTION "WRAM 5 MOBILE", WRAMX
+SECTION "Mobile RAM", WRAMX
+
w5_d800:: ds $200
w5_da00:: ds $200
w5_dc00:: ds $d
@@ -3154,17 +2982,23 @@ w5_MobileOpponentBattleStartMessage:: ds $c ; dc26
w5_MobileOpponentBattleWinMessage:: ds $c ; dc32
w5_MobileOpponentBattleLossMessage:: ds $c ; dc3e
-SECTION "WRAM 6", WRAMX
-wDecompressScratch::
-wScratchTileMap::
- ds BG_MAP_WIDTH * BG_MAP_HEIGHT
-wScratchAttrMap:: ds $200
-w6_d600:: ds $200
-w6_d800::
+SECTION "Scratch RAM", WRAMX
-INCLUDE "sram.asm"
+UNION ; d000
+wScratchTileMap:: ds BG_MAP_WIDTH * BG_MAP_HEIGHT
+wScratchAttrMap:: ds BG_MAP_WIDTH * BG_MAP_HEIGHT
+
+NEXTU ; d000
+wDecompressScratch:: ds $80 tiles
+wDecompressEnemyFrontpic:: ds $80 tiles
+ENDU ; e000
+
+
+SECTION "Stack RAM", WRAMX
-SECTION "WRAM 7", WRAMX
wWindowStack:: ds $1000 - 1
wWindowStackBottom:: ds 1
+
+
+INCLUDE "sram.asm"